From 5de6a5627c9ac22b9b95e2cebfaa3b1129845904 Mon Sep 17 00:00:00 2001 From: kong-apiops <122612077+kong-apiops@users.noreply.github.com> Date: Thu, 23 Nov 2023 14:53:03 +0000 Subject: [PATCH] Automated OAS Update (#63) * Automated OAS update: openapi.yaml * chore: build SDK from openapi.yaml changes --------- Co-authored-by: team-devx --- openapi.yaml | 40 ++++++++++++++++++++++ src/api.ts | 96 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 136 insertions(+) diff --git a/openapi.yaml b/openapi.yaml index 0c6d3ce..a3b3a53 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -251,6 +251,40 @@ paths: - credentials security: - portalAccessToken: [] + /api/v2/applications/{applicationId}/product-versions/{productVersionId}/granted-scopes: + get: + x-unstable: true + summary: Get the granted scopes + description: >- + **Pre-release Endpoint** + + This endpoint is currently in beta and is subject to change. + + + Retrieves the granted scopes of a specified application and product + version directly from the IDP. + + Scopes shared between product versions will be returned, even if not + currently registered for given product version. + + Will return 409 if this feature is not supported by the application. + operationId: get-application-product-version-granted-scopes + parameters: + - $ref: '#/components/parameters/ApplicationId' + - $ref: '#/components/parameters/ProductVersionId' + responses: + '200': + $ref: '#/components/responses/GetGrantedScopesProductVersion' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + '409': + $ref: '#/components/responses/Conflict' + tags: + - applications + security: + - portalAccessToken: [] /api/v2/applications/{applicationId}/refresh-token: post: summary: Refresh Client Secret @@ -3142,6 +3176,12 @@ components: application/json: schema: $ref: '#/components/schemas/ApplicationUpdateResponse' + GetGrantedScopesProductVersion: + description: Get granted scopes response. + content: + application/json: + schema: + $ref: '#/components/schemas/GetGrantedScopesProductVersionResponse' BadRequest: description: Bad Request content: diff --git a/src/api.ts b/src/api.ts index aa2e5db..0426bf4 100644 --- a/src/api.ts +++ b/src/api.ts @@ -3476,6 +3476,46 @@ export const ApplicationsApiAxiosParamCreator = function (configuration?: Config + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * **Pre-release Endpoint** This endpoint is currently in beta and is subject to change. Retrieves the granted scopes of a specified application and product version directly from the IDP. Scopes shared between product versions will be returned, even if not currently registered for given product version. Will return 409 if this feature is not supported by the application. + * @summary Get the granted scopes + * @param {string} applicationId Id of the targeted application + * @param {string} productVersionId Contains a unique identifier used by the Portal API for this resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getApplicationProductVersionGrantedScopes: async (applicationId: string, productVersionId: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'applicationId' is not null or undefined + assertParamExists('getApplicationProductVersionGrantedScopes', 'applicationId', applicationId) + // verify required parameter 'productVersionId' is not null or undefined + assertParamExists('getApplicationProductVersionGrantedScopes', 'productVersionId', productVersionId) + const localVarPath = `/api/v2/applications/{applicationId}/product-versions/{productVersionId}/granted-scopes` + .replace(`{${"applicationId"}}`, encodeURIComponent(String(applicationId))) + .replace(`{${"productVersionId"}}`, encodeURIComponent(String(productVersionId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication portalAccessToken required + + + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -3627,6 +3667,18 @@ export const ApplicationsApiFp = function(configuration?: Configuration) { const localVarAxiosArgs = await localVarAxiosParamCreator.getApplication(applicationId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, + /** + * **Pre-release Endpoint** This endpoint is currently in beta and is subject to change. Retrieves the granted scopes of a specified application and product version directly from the IDP. Scopes shared between product versions will be returned, even if not currently registered for given product version. Will return 409 if this feature is not supported by the application. + * @summary Get the granted scopes + * @param {string} applicationId Id of the targeted application + * @param {string} productVersionId Contains a unique identifier used by the Portal API for this resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getApplicationProductVersionGrantedScopes(applicationId: string, productVersionId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getApplicationProductVersionGrantedScopes(applicationId, productVersionId, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, /** * List applications owned by the developer currently logged in. * @summary List Applications @@ -3694,6 +3746,17 @@ export const ApplicationsApiFactory = function (configuration?: Configuration, b getApplication(applicationId: string, options?: any): AxiosPromise { return localVarFp.getApplication(applicationId, options).then((request) => request(axios, basePath)); }, + /** + * **Pre-release Endpoint** This endpoint is currently in beta and is subject to change. Retrieves the granted scopes of a specified application and product version directly from the IDP. Scopes shared between product versions will be returned, even if not currently registered for given product version. Will return 409 if this feature is not supported by the application. + * @summary Get the granted scopes + * @param {string} applicationId Id of the targeted application + * @param {string} productVersionId Contains a unique identifier used by the Portal API for this resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getApplicationProductVersionGrantedScopes(applicationId: string, productVersionId: string, options?: any): AxiosPromise { + return localVarFp.getApplicationProductVersionGrantedScopes(applicationId, productVersionId, options).then((request) => request(axios, basePath)); + }, /** * List applications owned by the developer currently logged in. * @summary List Applications @@ -3764,6 +3827,27 @@ export interface ApplicationsApiGetApplicationRequest { readonly applicationId: string } +/** + * Request parameters for getApplicationProductVersionGrantedScopes operation in ApplicationsApi. + * @export + * @interface ApplicationsApiGetApplicationProductVersionGrantedScopesRequest + */ +export interface ApplicationsApiGetApplicationProductVersionGrantedScopesRequest { + /** + * Id of the targeted application + * @type {string} + * @memberof ApplicationsApiGetApplicationProductVersionGrantedScopes + */ + readonly applicationId: string + + /** + * Contains a unique identifier used by the Portal API for this resource. + * @type {string} + * @memberof ApplicationsApiGetApplicationProductVersionGrantedScopes + */ + readonly productVersionId: string +} + /** * Request parameters for listApplications operation in ApplicationsApi. * @export @@ -3870,6 +3954,18 @@ export class ApplicationsApi extends BaseAPI { return ApplicationsApiFp(this.configuration).getApplication(requestParameters.applicationId, options).then((request) => request(this.axios, this.basePath)); } + /** + * **Pre-release Endpoint** This endpoint is currently in beta and is subject to change. Retrieves the granted scopes of a specified application and product version directly from the IDP. Scopes shared between product versions will be returned, even if not currently registered for given product version. Will return 409 if this feature is not supported by the application. + * @summary Get the granted scopes + * @param {ApplicationsApiGetApplicationProductVersionGrantedScopesRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ApplicationsApi + */ + public getApplicationProductVersionGrantedScopes(requestParameters: ApplicationsApiGetApplicationProductVersionGrantedScopesRequest, options?: AxiosRequestConfig) { + return ApplicationsApiFp(this.configuration).getApplicationProductVersionGrantedScopes(requestParameters.applicationId, requestParameters.productVersionId, options).then((request) => request(this.axios, this.basePath)); + } + /** * List applications owned by the developer currently logged in. * @summary List Applications