/* tslint:disable */ /* eslint-disable */ /** * Identity Security Cloud API - Icons * 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; } /** * 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 SetIconV1200Response */ export interface SetIconV1200Response { /** * url to file with icon * @type {string} * @memberof SetIconV1200Response */ 'icon'?: string; } /** * * @export * @interface SetIconV1401Response */ export interface SetIconV1401Response { /** * A message describing the error * @type {any} * @memberof SetIconV1401Response */ 'error'?: any; } /** * * @export * @interface SetIconV1429Response */ export interface SetIconV1429Response { /** * A message describing the error * @type {any} * @memberof SetIconV1429Response */ 'message'?: any; } /** * * @export * @interface SetIconV1Request */ export interface SetIconV1Request { /** * file with icon. Allowed mime-types [\'image/png\', \'image/jpeg\'] * @type {File} * @memberof SetIconV1Request */ 'image': File; } /** * IconsApi - axios parameter creator * @export */ export const IconsApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * This API endpoint delete an icon by object type and object id. A token with ORG_ADMIN authority is required to call this API. * @summary Delete an icon * @param {DeleteIconV1ObjectTypeEnum} objectType Object type. Available options [\'application\'] * @param {string} objectId Object id. * @param {string} [xSailPointExperimental] Use this header to enable this experimental API. * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ deleteIconV1: async (objectType: DeleteIconV1ObjectTypeEnum, objectId: string, xSailPointExperimental?: string, axiosOptions: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'objectType' is not null or undefined assertParamExists('deleteIconV1', 'objectType', objectType) // verify required parameter 'objectId' is not null or undefined assertParamExists('deleteIconV1', 'objectId', objectId) if (xSailPointExperimental === undefined) { xSailPointExperimental = 'true'; } const localVarPath = `/icons/v1/{objectType}/{objectId}` .replace(`{${"objectType"}}`, encodeURIComponent(String(objectType))) .replace(`{${"objectId"}}`, encodeURIComponent(String(objectId))); // 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: 'DELETE', ...baseOptions, ...axiosOptions}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; if (xSailPointExperimental != null) { localVarHeaderParameter['X-SailPoint-Experimental'] = String(xSailPointExperimental); } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...axiosOptions.headers}; return { url: toPathString(localVarUrlObj), axiosOptions: localVarRequestOptions, }; }, /** * This API endpoint updates an icon by object type and object id. A token with ORG_ADMIN authority is required to call this API. * @summary Update an icon * @param {SetIconV1ObjectTypeEnum} objectType Object type. Available options [\'application\'] * @param {string} objectId Object id. * @param {File} image file with icon. Allowed mime-types [\\\'image/png\\\', \\\'image/jpeg\\\'] * @param {string} [xSailPointExperimental] Use this header to enable this experimental API. * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ setIconV1: async (objectType: SetIconV1ObjectTypeEnum, objectId: string, image: File, xSailPointExperimental?: string, axiosOptions: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'objectType' is not null or undefined assertParamExists('setIconV1', 'objectType', objectType) // verify required parameter 'objectId' is not null or undefined assertParamExists('setIconV1', 'objectId', objectId) // verify required parameter 'image' is not null or undefined assertParamExists('setIconV1', 'image', image) if (xSailPointExperimental === undefined) { xSailPointExperimental = 'true'; } const localVarPath = `/icons/v1/{objectType}/{objectId}` .replace(`{${"objectType"}}`, encodeURIComponent(String(objectType))) .replace(`{${"objectId"}}`, encodeURIComponent(String(objectId))); // 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: 'PUT', ...baseOptions, ...axiosOptions}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)(); if (image !== undefined) { localVarFormParams.append('image', image as any); } localVarHeaderParameter['Content-Type'] = 'multipart/form-data'; if (xSailPointExperimental != null) { localVarHeaderParameter['X-SailPoint-Experimental'] = String(xSailPointExperimental); } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...axiosOptions.headers}; localVarRequestOptions.data = localVarFormParams; return { url: toPathString(localVarUrlObj), axiosOptions: localVarRequestOptions, }; }, } }; /** * IconsApi - functional programming interface * @export */ export const IconsApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = IconsApiAxiosParamCreator(configuration) return { /** * This API endpoint delete an icon by object type and object id. A token with ORG_ADMIN authority is required to call this API. * @summary Delete an icon * @param {DeleteIconV1ObjectTypeEnum} objectType Object type. Available options [\'application\'] * @param {string} objectId Object id. * @param {string} [xSailPointExperimental] Use this header to enable this experimental API. * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ async deleteIconV1(objectType: DeleteIconV1ObjectTypeEnum, objectId: string, xSailPointExperimental?: string, axiosOptions?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteIconV1(objectType, objectId, xSailPointExperimental, axiosOptions); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['IconsApi.deleteIconV1']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * This API endpoint updates an icon by object type and object id. A token with ORG_ADMIN authority is required to call this API. * @summary Update an icon * @param {SetIconV1ObjectTypeEnum} objectType Object type. Available options [\'application\'] * @param {string} objectId Object id. * @param {File} image file with icon. Allowed mime-types [\\\'image/png\\\', \\\'image/jpeg\\\'] * @param {string} [xSailPointExperimental] Use this header to enable this experimental API. * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ async setIconV1(objectType: SetIconV1ObjectTypeEnum, objectId: string, image: File, xSailPointExperimental?: string, axiosOptions?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.setIconV1(objectType, objectId, image, xSailPointExperimental, axiosOptions); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['IconsApi.setIconV1']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } }; /** * IconsApi - factory interface * @export */ export const IconsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = IconsApiFp(configuration) return { /** * This API endpoint delete an icon by object type and object id. A token with ORG_ADMIN authority is required to call this API. * @summary Delete an icon * @param {IconsApiDeleteIconV1Request} requestParameters Request parameters. * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ deleteIconV1(requestParameters: IconsApiDeleteIconV1Request, axiosOptions?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.deleteIconV1(requestParameters.objectType, requestParameters.objectId, requestParameters.xSailPointExperimental, axiosOptions).then((request) => request(axios, basePath)); }, /** * This API endpoint updates an icon by object type and object id. A token with ORG_ADMIN authority is required to call this API. * @summary Update an icon * @param {IconsApiSetIconV1Request} requestParameters Request parameters. * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ setIconV1(requestParameters: IconsApiSetIconV1Request, axiosOptions?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.setIconV1(requestParameters.objectType, requestParameters.objectId, requestParameters.image, requestParameters.xSailPointExperimental, axiosOptions).then((request) => request(axios, basePath)); }, }; }; /** * Request parameters for deleteIconV1 operation in IconsApi. * @export * @interface IconsApiDeleteIconV1Request */ export interface IconsApiDeleteIconV1Request { /** * Object type. Available options [\'application\'] * @type {'application'} * @memberof IconsApiDeleteIconV1 */ readonly objectType: DeleteIconV1ObjectTypeEnum /** * Object id. * @type {string} * @memberof IconsApiDeleteIconV1 */ readonly objectId: string /** * Use this header to enable this experimental API. * @type {string} * @memberof IconsApiDeleteIconV1 */ readonly xSailPointExperimental?: string } /** * Request parameters for setIconV1 operation in IconsApi. * @export * @interface IconsApiSetIconV1Request */ export interface IconsApiSetIconV1Request { /** * Object type. Available options [\'application\'] * @type {'application'} * @memberof IconsApiSetIconV1 */ readonly objectType: SetIconV1ObjectTypeEnum /** * Object id. * @type {string} * @memberof IconsApiSetIconV1 */ readonly objectId: string /** * file with icon. Allowed mime-types [\\\'image/png\\\', \\\'image/jpeg\\\'] * @type {File} * @memberof IconsApiSetIconV1 */ readonly image: File /** * Use this header to enable this experimental API. * @type {string} * @memberof IconsApiSetIconV1 */ readonly xSailPointExperimental?: string } /** * IconsApi - object-oriented interface * @export * @class IconsApi * @extends {BaseAPI} */ export class IconsApi extends BaseAPI { /** * This API endpoint delete an icon by object type and object id. A token with ORG_ADMIN authority is required to call this API. * @summary Delete an icon * @param {IconsApiDeleteIconV1Request} requestParameters Request parameters. * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} * @memberof IconsApi */ public deleteIconV1(requestParameters: IconsApiDeleteIconV1Request, axiosOptions?: RawAxiosRequestConfig) { return IconsApiFp(this.configuration).deleteIconV1(requestParameters.objectType, requestParameters.objectId, requestParameters.xSailPointExperimental, axiosOptions).then((request) => request(this.axios, this.basePath)); } /** * This API endpoint updates an icon by object type and object id. A token with ORG_ADMIN authority is required to call this API. * @summary Update an icon * @param {IconsApiSetIconV1Request} requestParameters Request parameters. * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} * @memberof IconsApi */ public setIconV1(requestParameters: IconsApiSetIconV1Request, axiosOptions?: RawAxiosRequestConfig) { return IconsApiFp(this.configuration).setIconV1(requestParameters.objectType, requestParameters.objectId, requestParameters.image, requestParameters.xSailPointExperimental, axiosOptions).then((request) => request(this.axios, this.basePath)); } } /** * @export */ export const DeleteIconV1ObjectTypeEnum = { Application: 'application' } as const; export type DeleteIconV1ObjectTypeEnum = typeof DeleteIconV1ObjectTypeEnum[keyof typeof DeleteIconV1ObjectTypeEnum]; /** * @export */ export const SetIconV1ObjectTypeEnum = { Application: 'application' } as const; export type SetIconV1ObjectTypeEnum = typeof SetIconV1ObjectTypeEnum[keyof typeof SetIconV1ObjectTypeEnum];