/* tslint:disable */ /* eslint-disable */ /** * Account Management Service API * Manage user subscriptions and clusters * * The version of the OpenAPI document: 0.0.1 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; import { Configuration } from '../configuration'; // Some imports not used depending on template conditions // @ts-ignore import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common'; // @ts-ignore import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base'; // @ts-ignore import { AccessTokenCfg } from '../model'; // @ts-ignore import { Account } from '../model'; // @ts-ignore import { QuotaCostList } from '../model'; // @ts-ignore import { SelfTermsReview } from '../model'; // @ts-ignore import { TermsReviewResponse } from '../model'; /** * AppServicesApi - axios parameter creator * @export */ export const AppServicesApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * * @summary Return access token generated from registries in docker format * @param {*} [options] Override http request option. * @throws {RequiredError} */ apiAccountsMgmtV1AccessTokenPost: async (options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/api/accounts_mgmt/v1/access_token`; // 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: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication Bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Get the authenticated account * @param {boolean} [fetchLabels] If true, includes the labels on a subscription/organization/account in the output. Could slow request response time. * @param {*} [options] Override http request option. * @throws {RequiredError} */ apiAccountsMgmtV1CurrentAccountGet: async (fetchLabels?: boolean, options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/api/accounts_mgmt/v1/current_account`; // 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 AccessToken required await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) // authentication Bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (fetchLabels !== undefined) { localVarQueryParameter['fetchLabels'] = fetchLabels; } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Returns a summary of quota cost * @param {string} orgId The id of organization * @param {string} [search] Specifies the search criteria. The syntax of this parameter is similar to the syntax of the _where_ clause of an SQL statement, using the names of the json attributes / column names of the account. For example, in order to retrieve all the accounts with a username starting with `my`: ```sql username like \'my%\' ``` The search criteria can also be applied on related resource. For example, in order to retrieve all the subscriptions labeled by `foo=bar`, ```sql labels.key = \'foo\' and labels.value = \'bar\' ``` If the parameter isn\'t provided, or if the value is empty, then all the accounts that the user has permission to see will be returned. * @param {boolean} [fetchRelatedResources] If true, includes the related resources in the output. Could slow request response time. * @param {boolean} [forceRecalc] If true, includes that ConsumedQuota should be recalculated. * @param {boolean} [fetchCloudAccounts] If true, includes the marketplace cloud accounts in the output. Could slow request response time. * @param {*} [options] Override http request option. * @throws {RequiredError} */ apiAccountsMgmtV1OrganizationsOrgIdQuotaCostGet: async (orgId: string, search?: string, fetchRelatedResources?: boolean, forceRecalc?: boolean, fetchCloudAccounts?: boolean, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'orgId' is not null or undefined assertParamExists('apiAccountsMgmtV1OrganizationsOrgIdQuotaCostGet', 'orgId', orgId) const localVarPath = `/api/accounts_mgmt/v1/organizations/{orgId}/quota_cost` .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))); // 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 Bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (search !== undefined) { localVarQueryParameter['search'] = search; } if (fetchRelatedResources !== undefined) { localVarQueryParameter['fetchRelatedResources'] = fetchRelatedResources; } if (forceRecalc !== undefined) { localVarQueryParameter['forceRecalc'] = forceRecalc; } if (fetchCloudAccounts !== undefined) { localVarQueryParameter['fetchCloudAccounts'] = fetchCloudAccounts; } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Review your status of Terms * @param {SelfTermsReview} selfTermsReview Data to check self terms for * @param {*} [options] Override http request option. * @throws {RequiredError} */ apiAuthorizationsV1SelfTermsReviewPost: async (selfTermsReview: SelfTermsReview, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'selfTermsReview' is not null or undefined assertParamExists('apiAuthorizationsV1SelfTermsReviewPost', 'selfTermsReview', selfTermsReview) const localVarPath = `/api/authorizations/v1/self_terms_review`; // 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: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication Bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(selfTermsReview, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, } }; /** * AppServicesApi - functional programming interface * @export */ export const AppServicesApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = AppServicesApiAxiosParamCreator(configuration) return { /** * * @summary Return access token generated from registries in docker format * @param {*} [options] Override http request option. * @throws {RequiredError} */ async apiAccountsMgmtV1AccessTokenPost(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.apiAccountsMgmtV1AccessTokenPost(options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * * @summary Get the authenticated account * @param {boolean} [fetchLabels] If true, includes the labels on a subscription/organization/account in the output. Could slow request response time. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async apiAccountsMgmtV1CurrentAccountGet(fetchLabels?: boolean, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.apiAccountsMgmtV1CurrentAccountGet(fetchLabels, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * * @summary Returns a summary of quota cost * @param {string} orgId The id of organization * @param {string} [search] Specifies the search criteria. The syntax of this parameter is similar to the syntax of the _where_ clause of an SQL statement, using the names of the json attributes / column names of the account. For example, in order to retrieve all the accounts with a username starting with `my`: ```sql username like \'my%\' ``` The search criteria can also be applied on related resource. For example, in order to retrieve all the subscriptions labeled by `foo=bar`, ```sql labels.key = \'foo\' and labels.value = \'bar\' ``` If the parameter isn\'t provided, or if the value is empty, then all the accounts that the user has permission to see will be returned. * @param {boolean} [fetchRelatedResources] If true, includes the related resources in the output. Could slow request response time. * @param {boolean} [forceRecalc] If true, includes that ConsumedQuota should be recalculated. * @param {boolean} [fetchCloudAccounts] If true, includes the marketplace cloud accounts in the output. Could slow request response time. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async apiAccountsMgmtV1OrganizationsOrgIdQuotaCostGet(orgId: string, search?: string, fetchRelatedResources?: boolean, forceRecalc?: boolean, fetchCloudAccounts?: boolean, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.apiAccountsMgmtV1OrganizationsOrgIdQuotaCostGet(orgId, search, fetchRelatedResources, forceRecalc, fetchCloudAccounts, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * * @summary Review your status of Terms * @param {SelfTermsReview} selfTermsReview Data to check self terms for * @param {*} [options] Override http request option. * @throws {RequiredError} */ async apiAuthorizationsV1SelfTermsReviewPost(selfTermsReview: SelfTermsReview, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.apiAuthorizationsV1SelfTermsReviewPost(selfTermsReview, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, } }; /** * AppServicesApi - factory interface * @export */ export const AppServicesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = AppServicesApiFp(configuration) return { /** * * @summary Return access token generated from registries in docker format * @param {*} [options] Override http request option. * @throws {RequiredError} */ apiAccountsMgmtV1AccessTokenPost(options?: any): AxiosPromise { return localVarFp.apiAccountsMgmtV1AccessTokenPost(options).then((request) => request(axios, basePath)); }, /** * * @summary Get the authenticated account * @param {boolean} [fetchLabels] If true, includes the labels on a subscription/organization/account in the output. Could slow request response time. * @param {*} [options] Override http request option. * @throws {RequiredError} */ apiAccountsMgmtV1CurrentAccountGet(fetchLabels?: boolean, options?: any): AxiosPromise { return localVarFp.apiAccountsMgmtV1CurrentAccountGet(fetchLabels, options).then((request) => request(axios, basePath)); }, /** * * @summary Returns a summary of quota cost * @param {string} orgId The id of organization * @param {string} [search] Specifies the search criteria. The syntax of this parameter is similar to the syntax of the _where_ clause of an SQL statement, using the names of the json attributes / column names of the account. For example, in order to retrieve all the accounts with a username starting with `my`: ```sql username like \'my%\' ``` The search criteria can also be applied on related resource. For example, in order to retrieve all the subscriptions labeled by `foo=bar`, ```sql labels.key = \'foo\' and labels.value = \'bar\' ``` If the parameter isn\'t provided, or if the value is empty, then all the accounts that the user has permission to see will be returned. * @param {boolean} [fetchRelatedResources] If true, includes the related resources in the output. Could slow request response time. * @param {boolean} [forceRecalc] If true, includes that ConsumedQuota should be recalculated. * @param {boolean} [fetchCloudAccounts] If true, includes the marketplace cloud accounts in the output. Could slow request response time. * @param {*} [options] Override http request option. * @throws {RequiredError} */ apiAccountsMgmtV1OrganizationsOrgIdQuotaCostGet(orgId: string, search?: string, fetchRelatedResources?: boolean, forceRecalc?: boolean, fetchCloudAccounts?: boolean, options?: any): AxiosPromise { return localVarFp.apiAccountsMgmtV1OrganizationsOrgIdQuotaCostGet(orgId, search, fetchRelatedResources, forceRecalc, fetchCloudAccounts, options).then((request) => request(axios, basePath)); }, /** * * @summary Review your status of Terms * @param {SelfTermsReview} selfTermsReview Data to check self terms for * @param {*} [options] Override http request option. * @throws {RequiredError} */ apiAuthorizationsV1SelfTermsReviewPost(selfTermsReview: SelfTermsReview, options?: any): AxiosPromise { return localVarFp.apiAuthorizationsV1SelfTermsReviewPost(selfTermsReview, options).then((request) => request(axios, basePath)); }, }; }; /** * AppServicesApi - interface * @export * @interface AppServicesApi */ export interface AppServicesApiInterface { /** * * @summary Return access token generated from registries in docker format * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AppServicesApiInterface */ apiAccountsMgmtV1AccessTokenPost(options?: AxiosRequestConfig): AxiosPromise; /** * * @summary Get the authenticated account * @param {boolean} [fetchLabels] If true, includes the labels on a subscription/organization/account in the output. Could slow request response time. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AppServicesApiInterface */ apiAccountsMgmtV1CurrentAccountGet(fetchLabels?: boolean, options?: AxiosRequestConfig): AxiosPromise; /** * * @summary Returns a summary of quota cost * @param {string} orgId The id of organization * @param {string} [search] Specifies the search criteria. The syntax of this parameter is similar to the syntax of the _where_ clause of an SQL statement, using the names of the json attributes / column names of the account. For example, in order to retrieve all the accounts with a username starting with `my`: ```sql username like \'my%\' ``` The search criteria can also be applied on related resource. For example, in order to retrieve all the subscriptions labeled by `foo=bar`, ```sql labels.key = \'foo\' and labels.value = \'bar\' ``` If the parameter isn\'t provided, or if the value is empty, then all the accounts that the user has permission to see will be returned. * @param {boolean} [fetchRelatedResources] If true, includes the related resources in the output. Could slow request response time. * @param {boolean} [forceRecalc] If true, includes that ConsumedQuota should be recalculated. * @param {boolean} [fetchCloudAccounts] If true, includes the marketplace cloud accounts in the output. Could slow request response time. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AppServicesApiInterface */ apiAccountsMgmtV1OrganizationsOrgIdQuotaCostGet(orgId: string, search?: string, fetchRelatedResources?: boolean, forceRecalc?: boolean, fetchCloudAccounts?: boolean, options?: AxiosRequestConfig): AxiosPromise; /** * * @summary Review your status of Terms * @param {SelfTermsReview} selfTermsReview Data to check self terms for * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AppServicesApiInterface */ apiAuthorizationsV1SelfTermsReviewPost(selfTermsReview: SelfTermsReview, options?: AxiosRequestConfig): AxiosPromise; } /** * AppServicesApi - object-oriented interface * @export * @class AppServicesApi * @extends {BaseAPI} */ export class AppServicesApi extends BaseAPI implements AppServicesApiInterface { /** * * @summary Return access token generated from registries in docker format * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AppServicesApi */ public apiAccountsMgmtV1AccessTokenPost(options?: AxiosRequestConfig) { return AppServicesApiFp(this.configuration).apiAccountsMgmtV1AccessTokenPost(options).then((request) => request(this.axios, this.basePath)); } /** * * @summary Get the authenticated account * @param {boolean} [fetchLabels] If true, includes the labels on a subscription/organization/account in the output. Could slow request response time. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AppServicesApi */ public apiAccountsMgmtV1CurrentAccountGet(fetchLabels?: boolean, options?: AxiosRequestConfig) { return AppServicesApiFp(this.configuration).apiAccountsMgmtV1CurrentAccountGet(fetchLabels, options).then((request) => request(this.axios, this.basePath)); } /** * * @summary Returns a summary of quota cost * @param {string} orgId The id of organization * @param {string} [search] Specifies the search criteria. The syntax of this parameter is similar to the syntax of the _where_ clause of an SQL statement, using the names of the json attributes / column names of the account. For example, in order to retrieve all the accounts with a username starting with `my`: ```sql username like \'my%\' ``` The search criteria can also be applied on related resource. For example, in order to retrieve all the subscriptions labeled by `foo=bar`, ```sql labels.key = \'foo\' and labels.value = \'bar\' ``` If the parameter isn\'t provided, or if the value is empty, then all the accounts that the user has permission to see will be returned. * @param {boolean} [fetchRelatedResources] If true, includes the related resources in the output. Could slow request response time. * @param {boolean} [forceRecalc] If true, includes that ConsumedQuota should be recalculated. * @param {boolean} [fetchCloudAccounts] If true, includes the marketplace cloud accounts in the output. Could slow request response time. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AppServicesApi */ public apiAccountsMgmtV1OrganizationsOrgIdQuotaCostGet(orgId: string, search?: string, fetchRelatedResources?: boolean, forceRecalc?: boolean, fetchCloudAccounts?: boolean, options?: AxiosRequestConfig) { return AppServicesApiFp(this.configuration).apiAccountsMgmtV1OrganizationsOrgIdQuotaCostGet(orgId, search, fetchRelatedResources, forceRecalc, fetchCloudAccounts, options).then((request) => request(this.axios, this.basePath)); } /** * * @summary Review your status of Terms * @param {SelfTermsReview} selfTermsReview Data to check self terms for * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AppServicesApi */ public apiAuthorizationsV1SelfTermsReviewPost(selfTermsReview: SelfTermsReview, options?: AxiosRequestConfig) { return AppServicesApiFp(this.configuration).apiAuthorizationsV1SelfTermsReviewPost(selfTermsReview, options).then((request) => request(this.axios, this.basePath)); } }