-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
62b5e08
commit 7c1d8cd
Showing
20 changed files
with
118 additions
and
20 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
// @ts-ignore | ||
import type { AxiosPromise, AxiosInstance, AxiosRequestConfig, Method } from 'axios'; | ||
// @ts-ignore | ||
import { COLLECTION_FORMATS, RequiredError, AuthTypeEnum, DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '@redhat-cloud-services/javascript-clients-shared/dist/common'; | ||
import type { RequestArgs } from '@redhat-cloud-services/javascript-clients-shared/dist/common'; | ||
// @ts-ignore | ||
import { BaseAPI } from '@redhat-cloud-services/javascript-clients-shared/dist/base'; | ||
import { Configuration } from '@redhat-cloud-services/javascript-clients-shared/dist/configuration'; | ||
|
||
// @ts-ignore | ||
import type { } from '../types'; | ||
|
||
|
||
export type ReportTestResultsSGParams = { | ||
/** | ||
* | ||
* @type { any } | ||
* @memberof ReportTestResultsSGApi | ||
*/ | ||
reportId: any, | ||
/** | ||
* For internal use only | ||
* @type { any } | ||
* @memberof ReportTestResultsSGApi | ||
*/ | ||
xRHIDENTITY?: any, | ||
options?: AxiosRequestConfig | ||
} | ||
|
||
const isReportTestResultsSGObjectParams = (params: [ReportTestResultsSGParams] | unknown[]): params is [ReportTestResultsSGParams] => { | ||
return params.length === 1 && Object.prototype.hasOwnProperty.call(params, 'reportId') && true | ||
} | ||
/** | ||
* This feature is exclusively used by the frontend | ||
* @summary Request the list of available Security Guide versions | ||
* @param {ReportTestResultsSGParams} config with all available params. | ||
* @param {*} [options] Override http request option. | ||
* @deprecated | ||
* @throws {RequiredError} | ||
*/ | ||
export const reportTestResultsSGParamCreator = async (...config: ([ReportTestResultsSGParams] | [any, any, AxiosRequestConfig])): Promise<RequestArgs> => { | ||
const params = isReportTestResultsSGObjectParams(config) ? config[0] : ['reportId', 'xRHIDENTITY', 'options'].reduce((acc, curr, index) => ({ ...acc, [curr]: config[index] }), {}) as ReportTestResultsSGParams; | ||
const { reportId, xRHIDENTITY, options = {} } = params; | ||
const localVarPath = `/reports/{report_id}/test_results/security_guide_versions` | ||
.replace(`{${"report_id"}}`, encodeURIComponent(String(reportId))); | ||
// use dummy base URL string because the URL constructor only accepts absolute URLs. | ||
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); | ||
const localVarRequestOptions = { method: 'GET' as Method, ...options}; | ||
const localVarHeaderParameter = {} as any; | ||
const localVarQueryParameter = {} as any; | ||
|
||
if (xRHIDENTITY != null) { | ||
localVarHeaderParameter['X-RH-IDENTITY'] = typeof xRHIDENTITY === 'string' | ||
? xRHIDENTITY | ||
: JSON.stringify(xRHIDENTITY); | ||
} | ||
|
||
|
||
|
||
setSearchParams(localVarUrlObj, localVarQueryParameter); | ||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...options.headers}; | ||
|
||
return { | ||
urlObj: localVarUrlObj, | ||
options: localVarRequestOptions, | ||
}; | ||
} | ||
|
||
export default reportTestResultsSGParamCreator; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.