/* tslint:disable */ /* eslint-disable */ /** * Identity Security Cloud API - Classify Source * 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 GetClassifyMachineAccountFromSourceStatusV1401Response */ export interface GetClassifyMachineAccountFromSourceStatusV1401Response { /** * A message describing the error * @type {any} * @memberof GetClassifyMachineAccountFromSourceStatusV1401Response */ 'error'?: any; } /** * * @export * @interface GetClassifyMachineAccountFromSourceStatusV1429Response */ export interface GetClassifyMachineAccountFromSourceStatusV1429Response { /** * A message describing the error * @type {any} * @memberof GetClassifyMachineAccountFromSourceStatusV1429Response */ 'message'?: any; } /** * 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 SendClassifyMachineAccountFromSourceV1200Response */ export interface SendClassifyMachineAccountFromSourceV1200Response { /** * Returns the number of all the accounts from source submitted for processing. * @type {number} * @memberof SendClassifyMachineAccountFromSourceV1200Response */ 'Accounts submitted for processing'?: number; } /** * * @export * @interface SourceClassificationStatus */ export interface SourceClassificationStatus { /** * Status of Classification Process * @type {string} * @memberof SourceClassificationStatus */ 'status'?: SourceClassificationStatusStatusEnum; /** * Time when the process was started * @type {string} * @memberof SourceClassificationStatus */ 'started'?: string; /** * Time when the process status was last updated * @type {string} * @memberof SourceClassificationStatus */ 'updated'?: string | null; /** * * @type {SourceClassificationStatusAllOfCounts} * @memberof SourceClassificationStatus */ 'counts'?: SourceClassificationStatusAllOfCounts; } export const SourceClassificationStatusStatusEnum = { Started: 'STARTED', Collected: 'COLLECTED', Completed: 'COMPLETED', Cancelled: 'CANCELLED', Terminated: 'TERMINATED' } as const; export type SourceClassificationStatusStatusEnum = typeof SourceClassificationStatusStatusEnum[keyof typeof SourceClassificationStatusStatusEnum]; /** * A map containing numbers relevant to the source classification process * @export * @interface SourceClassificationStatusAllOfCounts */ export interface SourceClassificationStatusAllOfCounts { /** * total number of source accounts * @type {number} * @memberof SourceClassificationStatusAllOfCounts */ 'EXPECTED': number; /** * number of accounts that have been sent for processing (should be the same as expected when all accounts are collected) * @type {number} * @memberof SourceClassificationStatusAllOfCounts */ 'RECEIVED': number; /** * number of accounts that have been classified * @type {number} * @memberof SourceClassificationStatusAllOfCounts */ 'COMPLETED': number; } /** * ClassifySourceApi - axios parameter creator * @export */ export const ClassifySourceApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * Use this API to cancel account classification process on a source. A token with API, ORG_ADMIN, ROLE_ADMIN, ROLE_SUBADMIN, SOURCE_ADMIN, or SOURCE_SUBADMIN authority is required to call this API. * @summary Cancel classify source\'s accounts process * @param {string} sourceId Source ID. * @param {string} [xSailPointExperimental] Use this header to enable this experimental API. * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ deleteClassifyMachineAccountFromSourceV1: async (sourceId: string, xSailPointExperimental?: string, axiosOptions: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'sourceId' is not null or undefined assertParamExists('deleteClassifyMachineAccountFromSourceV1', 'sourceId', sourceId) if (xSailPointExperimental === undefined) { xSailPointExperimental = 'true'; } const localVarPath = `/sources/v1/{sourceId}/classify` .replace(`{${"sourceId"}}`, encodeURIComponent(String(sourceId))); // 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, }; }, /** * Use this API to get the status of Machine Account Classification process for a source. A token with API, ORG_ADMIN, ROLE_ADMIN, ROLE_SUBADMIN, SOURCE_ADMIN, or SOURCE_SUBADMIN authority is required to call this API. * @summary Source accounts classification status * @param {string} sourceId Source ID. * @param {string} [xSailPointExperimental] Use this header to enable this experimental API. * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ getClassifyMachineAccountFromSourceStatusV1: async (sourceId: string, xSailPointExperimental?: string, axiosOptions: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'sourceId' is not null or undefined assertParamExists('getClassifyMachineAccountFromSourceStatusV1', 'sourceId', sourceId) if (xSailPointExperimental === undefined) { xSailPointExperimental = 'true'; } const localVarPath = `/sources/v1/{sourceId}/classify` .replace(`{${"sourceId"}}`, encodeURIComponent(String(sourceId))); // 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; 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, }; }, /** * Use this API to classify all the accounts from a source. A token with API, ORG_ADMIN, ROLE_ADMIN, ROLE_SUBADMIN, SOURCE_ADMIN, or SOURCE_SUBADMIN authority is required to call this API. * @summary Classify source\'s all accounts * @param {string} sourceId Source ID. * @param {string} [xSailPointExperimental] Use this header to enable this experimental API. * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ sendClassifyMachineAccountFromSourceV1: async (sourceId: string, xSailPointExperimental?: string, axiosOptions: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'sourceId' is not null or undefined assertParamExists('sendClassifyMachineAccountFromSourceV1', 'sourceId', sourceId) if (xSailPointExperimental === undefined) { xSailPointExperimental = 'true'; } const localVarPath = `/sources/v1/{sourceId}/classify` .replace(`{${"sourceId"}}`, encodeURIComponent(String(sourceId))); // 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, ...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, }; }, } }; /** * ClassifySourceApi - functional programming interface * @export */ export const ClassifySourceApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = ClassifySourceApiAxiosParamCreator(configuration) return { /** * Use this API to cancel account classification process on a source. A token with API, ORG_ADMIN, ROLE_ADMIN, ROLE_SUBADMIN, SOURCE_ADMIN, or SOURCE_SUBADMIN authority is required to call this API. * @summary Cancel classify source\'s accounts process * @param {string} sourceId Source ID. * @param {string} [xSailPointExperimental] Use this header to enable this experimental API. * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ async deleteClassifyMachineAccountFromSourceV1(sourceId: string, xSailPointExperimental?: string, axiosOptions?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteClassifyMachineAccountFromSourceV1(sourceId, xSailPointExperimental, axiosOptions); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['ClassifySourceApi.deleteClassifyMachineAccountFromSourceV1']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Use this API to get the status of Machine Account Classification process for a source. A token with API, ORG_ADMIN, ROLE_ADMIN, ROLE_SUBADMIN, SOURCE_ADMIN, or SOURCE_SUBADMIN authority is required to call this API. * @summary Source accounts classification status * @param {string} sourceId Source ID. * @param {string} [xSailPointExperimental] Use this header to enable this experimental API. * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ async getClassifyMachineAccountFromSourceStatusV1(sourceId: string, xSailPointExperimental?: string, axiosOptions?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getClassifyMachineAccountFromSourceStatusV1(sourceId, xSailPointExperimental, axiosOptions); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['ClassifySourceApi.getClassifyMachineAccountFromSourceStatusV1']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Use this API to classify all the accounts from a source. A token with API, ORG_ADMIN, ROLE_ADMIN, ROLE_SUBADMIN, SOURCE_ADMIN, or SOURCE_SUBADMIN authority is required to call this API. * @summary Classify source\'s all accounts * @param {string} sourceId Source ID. * @param {string} [xSailPointExperimental] Use this header to enable this experimental API. * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ async sendClassifyMachineAccountFromSourceV1(sourceId: string, xSailPointExperimental?: string, axiosOptions?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.sendClassifyMachineAccountFromSourceV1(sourceId, xSailPointExperimental, axiosOptions); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['ClassifySourceApi.sendClassifyMachineAccountFromSourceV1']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } }; /** * ClassifySourceApi - factory interface * @export */ export const ClassifySourceApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = ClassifySourceApiFp(configuration) return { /** * Use this API to cancel account classification process on a source. A token with API, ORG_ADMIN, ROLE_ADMIN, ROLE_SUBADMIN, SOURCE_ADMIN, or SOURCE_SUBADMIN authority is required to call this API. * @summary Cancel classify source\'s accounts process * @param {ClassifySourceApiDeleteClassifyMachineAccountFromSourceV1Request} requestParameters Request parameters. * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ deleteClassifyMachineAccountFromSourceV1(requestParameters: ClassifySourceApiDeleteClassifyMachineAccountFromSourceV1Request, axiosOptions?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.deleteClassifyMachineAccountFromSourceV1(requestParameters.sourceId, requestParameters.xSailPointExperimental, axiosOptions).then((request) => request(axios, basePath)); }, /** * Use this API to get the status of Machine Account Classification process for a source. A token with API, ORG_ADMIN, ROLE_ADMIN, ROLE_SUBADMIN, SOURCE_ADMIN, or SOURCE_SUBADMIN authority is required to call this API. * @summary Source accounts classification status * @param {ClassifySourceApiGetClassifyMachineAccountFromSourceStatusV1Request} requestParameters Request parameters. * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ getClassifyMachineAccountFromSourceStatusV1(requestParameters: ClassifySourceApiGetClassifyMachineAccountFromSourceStatusV1Request, axiosOptions?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.getClassifyMachineAccountFromSourceStatusV1(requestParameters.sourceId, requestParameters.xSailPointExperimental, axiosOptions).then((request) => request(axios, basePath)); }, /** * Use this API to classify all the accounts from a source. A token with API, ORG_ADMIN, ROLE_ADMIN, ROLE_SUBADMIN, SOURCE_ADMIN, or SOURCE_SUBADMIN authority is required to call this API. * @summary Classify source\'s all accounts * @param {ClassifySourceApiSendClassifyMachineAccountFromSourceV1Request} requestParameters Request parameters. * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ sendClassifyMachineAccountFromSourceV1(requestParameters: ClassifySourceApiSendClassifyMachineAccountFromSourceV1Request, axiosOptions?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.sendClassifyMachineAccountFromSourceV1(requestParameters.sourceId, requestParameters.xSailPointExperimental, axiosOptions).then((request) => request(axios, basePath)); }, }; }; /** * Request parameters for deleteClassifyMachineAccountFromSourceV1 operation in ClassifySourceApi. * @export * @interface ClassifySourceApiDeleteClassifyMachineAccountFromSourceV1Request */ export interface ClassifySourceApiDeleteClassifyMachineAccountFromSourceV1Request { /** * Source ID. * @type {string} * @memberof ClassifySourceApiDeleteClassifyMachineAccountFromSourceV1 */ readonly sourceId: string /** * Use this header to enable this experimental API. * @type {string} * @memberof ClassifySourceApiDeleteClassifyMachineAccountFromSourceV1 */ readonly xSailPointExperimental?: string } /** * Request parameters for getClassifyMachineAccountFromSourceStatusV1 operation in ClassifySourceApi. * @export * @interface ClassifySourceApiGetClassifyMachineAccountFromSourceStatusV1Request */ export interface ClassifySourceApiGetClassifyMachineAccountFromSourceStatusV1Request { /** * Source ID. * @type {string} * @memberof ClassifySourceApiGetClassifyMachineAccountFromSourceStatusV1 */ readonly sourceId: string /** * Use this header to enable this experimental API. * @type {string} * @memberof ClassifySourceApiGetClassifyMachineAccountFromSourceStatusV1 */ readonly xSailPointExperimental?: string } /** * Request parameters for sendClassifyMachineAccountFromSourceV1 operation in ClassifySourceApi. * @export * @interface ClassifySourceApiSendClassifyMachineAccountFromSourceV1Request */ export interface ClassifySourceApiSendClassifyMachineAccountFromSourceV1Request { /** * Source ID. * @type {string} * @memberof ClassifySourceApiSendClassifyMachineAccountFromSourceV1 */ readonly sourceId: string /** * Use this header to enable this experimental API. * @type {string} * @memberof ClassifySourceApiSendClassifyMachineAccountFromSourceV1 */ readonly xSailPointExperimental?: string } /** * ClassifySourceApi - object-oriented interface * @export * @class ClassifySourceApi * @extends {BaseAPI} */ export class ClassifySourceApi extends BaseAPI { /** * Use this API to cancel account classification process on a source. A token with API, ORG_ADMIN, ROLE_ADMIN, ROLE_SUBADMIN, SOURCE_ADMIN, or SOURCE_SUBADMIN authority is required to call this API. * @summary Cancel classify source\'s accounts process * @param {ClassifySourceApiDeleteClassifyMachineAccountFromSourceV1Request} requestParameters Request parameters. * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} * @memberof ClassifySourceApi */ public deleteClassifyMachineAccountFromSourceV1(requestParameters: ClassifySourceApiDeleteClassifyMachineAccountFromSourceV1Request, axiosOptions?: RawAxiosRequestConfig) { return ClassifySourceApiFp(this.configuration).deleteClassifyMachineAccountFromSourceV1(requestParameters.sourceId, requestParameters.xSailPointExperimental, axiosOptions).then((request) => request(this.axios, this.basePath)); } /** * Use this API to get the status of Machine Account Classification process for a source. A token with API, ORG_ADMIN, ROLE_ADMIN, ROLE_SUBADMIN, SOURCE_ADMIN, or SOURCE_SUBADMIN authority is required to call this API. * @summary Source accounts classification status * @param {ClassifySourceApiGetClassifyMachineAccountFromSourceStatusV1Request} requestParameters Request parameters. * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} * @memberof ClassifySourceApi */ public getClassifyMachineAccountFromSourceStatusV1(requestParameters: ClassifySourceApiGetClassifyMachineAccountFromSourceStatusV1Request, axiosOptions?: RawAxiosRequestConfig) { return ClassifySourceApiFp(this.configuration).getClassifyMachineAccountFromSourceStatusV1(requestParameters.sourceId, requestParameters.xSailPointExperimental, axiosOptions).then((request) => request(this.axios, this.basePath)); } /** * Use this API to classify all the accounts from a source. A token with API, ORG_ADMIN, ROLE_ADMIN, ROLE_SUBADMIN, SOURCE_ADMIN, or SOURCE_SUBADMIN authority is required to call this API. * @summary Classify source\'s all accounts * @param {ClassifySourceApiSendClassifyMachineAccountFromSourceV1Request} requestParameters Request parameters. * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} * @memberof ClassifySourceApi */ public sendClassifyMachineAccountFromSourceV1(requestParameters: ClassifySourceApiSendClassifyMachineAccountFromSourceV1Request, axiosOptions?: RawAxiosRequestConfig) { return ClassifySourceApiFp(this.configuration).sendClassifyMachineAccountFromSourceV1(requestParameters.sourceId, requestParameters.xSailPointExperimental, axiosOptions).then((request) => request(this.axios, this.basePath)); } }