/* tslint:disable */ /* eslint-disable */ /** * Identity Security Cloud API - Tenant * Use these APIs to interact with the Identity Security Cloud platform to achieve repeatable, automated processes with greater scalability. We encourage you to join the SailPoint Developer Community forum at https://developer.sailpoint.com/discuss to connect with other developers using our APIs. * * The version of the OpenAPI document: v1 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import type { Configuration } from '../configuration'; import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; // 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'; import type { RequestArgs } from './base'; // @ts-ignore import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError, operationServerMap } from './base'; /** * * @export * @interface ErrorMessageDto */ export interface ErrorMessageDto { /** * The locale for the message text, a BCP 47 language tag. * @type {string} * @memberof ErrorMessageDto */ 'locale'?: string | null; /** * * @type {LocaleOrigin} * @memberof ErrorMessageDto */ 'localeOrigin'?: LocaleOrigin | null; /** * Actual text of the error message in the indicated locale. * @type {string} * @memberof ErrorMessageDto */ 'text'?: string; } /** * * @export * @interface ErrorResponseDto */ export interface ErrorResponseDto { /** * Fine-grained error code providing more detail of the error. * @type {string} * @memberof ErrorResponseDto */ 'detailCode'?: string; /** * Unique tracking id for the error. * @type {string} * @memberof ErrorResponseDto */ 'trackingId'?: string; /** * Generic localized reason for error * @type {Array} * @memberof ErrorResponseDto */ 'messages'?: Array; /** * Plain-text descriptive reasons to provide additional detail to the text provided in the messages field * @type {Array} * @memberof ErrorResponseDto */ 'causes'?: Array; } /** * * @export * @interface GetTenantV1401Response */ export interface GetTenantV1401Response { /** * A message describing the error * @type {any} * @memberof GetTenantV1401Response */ 'error'?: any; } /** * * @export * @interface GetTenantV1429Response */ export interface GetTenantV1429Response { /** * A message describing the error * @type {any} * @memberof GetTenantV1429Response */ 'message'?: any; } /** * * @export * @interface License */ export interface License { /** * Name of the license * @type {string} * @memberof License */ 'licenseId'?: string; /** * Legacy name of the license * @type {string} * @memberof License */ 'legacyFeatureName'?: string; } /** * An indicator of how the locale was selected. *DEFAULT* means the locale is the system default. *REQUEST* means the locale was selected from the request context (i.e., best match based on the *Accept-Language* header). Additional values may be added in the future without notice. * @export * @enum {string} */ export const LocaleOrigin = { Default: 'DEFAULT', Request: 'REQUEST' } as const; export type LocaleOrigin = typeof LocaleOrigin[keyof typeof LocaleOrigin]; /** * * @export * @interface Product */ export interface Product { /** * Name of the Product * @type {string} * @memberof Product */ 'productName'?: string; /** * URL of the Product * @type {string} * @memberof Product */ 'url'?: string; /** * An identifier for a specific product-tenant combination * @type {string} * @memberof Product */ 'productTenantId'?: string; /** * Product region * @type {string} * @memberof Product */ 'productRegion'?: string; /** * Right needed for the Product * @type {string} * @memberof Product */ 'productRight'?: string; /** * API URL of the Product * @type {string} * @memberof Product */ 'apiUrl'?: string | null; /** * * @type {Array} * @memberof Product */ 'licenses'?: Array; /** * Additional attributes for a product * @type {{ [key: string]: any; }} * @memberof Product */ 'attributes'?: { [key: string]: any; }; /** * Zone * @type {string} * @memberof Product */ 'zone'?: string; /** * Status of the product * @type {string} * @memberof Product */ 'status'?: string; /** * Status datetime * @type {string} * @memberof Product */ 'statusDateTime'?: string; /** * If there\'s a tenant provisioning failure then reason will have the description of error * @type {string} * @memberof Product */ 'reason'?: string; /** * Product could have additional notes added during tenant provisioning. * @type {string} * @memberof Product */ 'notes'?: string; /** * Date when the product was created * @type {string} * @memberof Product */ 'dateCreated'?: string | null; /** * Date when the product was last updated * @type {string} * @memberof Product */ 'lastUpdated'?: string | null; /** * Type of org * @type {string} * @memberof Product */ 'orgType'?: ProductOrgTypeEnum | null; } export const ProductOrgTypeEnum = { Development: 'development', Staging: 'staging', Production: 'production', Test: 'test', Partner: 'partner', Training: 'training', Demonstration: 'demonstration', Sandbox: 'sandbox' } as const; export type ProductOrgTypeEnum = typeof ProductOrgTypeEnum[keyof typeof ProductOrgTypeEnum]; /** * * @export * @interface Tenant */ export interface Tenant { /** * The unique identifier for the Tenant * @type {string} * @memberof Tenant */ 'id'?: string; /** * Abbreviated name of the Tenant * @type {string} * @memberof Tenant */ 'name'?: string; /** * Human-readable name of the Tenant * @type {string} * @memberof Tenant */ 'fullName'?: string; /** * Deployment pod for the Tenant * @type {string} * @memberof Tenant */ 'pod'?: string; /** * Deployment region for the Tenant * @type {string} * @memberof Tenant */ 'region'?: string; /** * Description of the Tenant * @type {string} * @memberof Tenant */ 'description'?: string; /** * * @type {Array} * @memberof Tenant */ 'products'?: Array; } /** * TenantApi - axios parameter creator * @export */ export const TenantApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * This rest endpoint can be used to retrieve tenant details. * @summary Get tenant information. * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ getTenantV1: async (axiosOptions: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/tenant/v1`; // 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, ...axiosOptions}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...axiosOptions.headers}; return { url: toPathString(localVarUrlObj), axiosOptions: localVarRequestOptions, }; }, } }; /** * TenantApi - functional programming interface * @export */ export const TenantApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = TenantApiAxiosParamCreator(configuration) return { /** * This rest endpoint can be used to retrieve tenant details. * @summary Get tenant information. * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ async getTenantV1(axiosOptions?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getTenantV1(axiosOptions); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['TenantApi.getTenantV1']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } }; /** * TenantApi - factory interface * @export */ export const TenantApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = TenantApiFp(configuration) return { /** * This rest endpoint can be used to retrieve tenant details. * @summary Get tenant information. * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ getTenantV1(axiosOptions?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.getTenantV1(axiosOptions).then((request) => request(axios, basePath)); }, }; }; /** * TenantApi - object-oriented interface * @export * @class TenantApi * @extends {BaseAPI} */ export class TenantApi extends BaseAPI { /** * This rest endpoint can be used to retrieve tenant details. * @summary Get tenant information. * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} * @memberof TenantApi */ public getTenantV1(axiosOptions?: RawAxiosRequestConfig) { return TenantApiFp(this.configuration).getTenantV1(axiosOptions).then((request) => request(this.axios, this.basePath)); } }