/* tslint:disable */ /* eslint-disable */ /** * Identity Security Cloud API - Auth Users * 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 ArrayInner */ export interface ArrayInner { } /** * * @export * @interface AuthUser */ export interface AuthUser { /** * Tenant name. * @type {string} * @memberof AuthUser */ 'tenant'?: string; /** * Identity ID. * @type {string} * @memberof AuthUser */ 'id'?: string; /** * Identity\'s unique identitifier. * @type {string} * @memberof AuthUser */ 'uid'?: string; /** * ID of the auth profile associated with the auth user. * @type {string} * @memberof AuthUser */ 'profile'?: string; /** * Auth user\'s employee number. * @type {string} * @memberof AuthUser */ 'identificationNumber'?: string | null; /** * Auth user\'s email. * @type {string} * @memberof AuthUser */ 'email'?: string | null; /** * Auth user\'s phone number. * @type {string} * @memberof AuthUser */ 'phone'?: string | null; /** * Auth user\'s work phone number. * @type {string} * @memberof AuthUser */ 'workPhone'?: string | null; /** * Auth user\'s personal email. * @type {string} * @memberof AuthUser */ 'personalEmail'?: string | null; /** * Auth user\'s first name. * @type {string} * @memberof AuthUser */ 'firstname'?: string | null; /** * Auth user\'s last name. * @type {string} * @memberof AuthUser */ 'lastname'?: string | null; /** * Auth user\'s name in displayed format. * @type {string} * @memberof AuthUser */ 'displayName'?: string; /** * Auth user\'s alias. * @type {string} * @memberof AuthUser */ 'alias'?: string; /** * Date of last password change. * @type {string} * @memberof AuthUser */ 'lastPasswordChangeDate'?: string | null; /** * Timestamp of the last login (long type value). * @type {number} * @memberof AuthUser */ 'lastLoginTimestamp'?: number; /** * Timestamp of the current login (long type value). * @type {number} * @memberof AuthUser */ 'currentLoginTimestamp'?: number; /** * The date and time when the user was last unlocked. * @type {string} * @memberof AuthUser */ 'lastUnlockTimestamp'?: string | null; /** * Array of the auth user\'s capabilities. * @type {Array} * @memberof AuthUser */ 'capabilities'?: Array | null; } export const AuthUserCapabilitiesEnum = { CertAdmin: 'CERT_ADMIN', CloudGovAdmin: 'CLOUD_GOV_ADMIN', CloudGovUser: 'CLOUD_GOV_USER', Helpdesk: 'HELPDESK', Internal: 'INTERNAL', OrgAdmin: 'ORG_ADMIN', PolicyAdmin: 'POLICY_ADMIN', ReportAdmin: 'REPORT_ADMIN', RoleAdmin: 'ROLE_ADMIN', RoleSubadmin: 'ROLE_SUBADMIN', SaasManagementAdmin: 'SAAS_MANAGEMENT_ADMIN', SaasManagementReader: 'SAAS_MANAGEMENT_READER', SourceAdmin: 'SOURCE_ADMIN', SourceSubadmin: 'SOURCE_SUBADMIN', DasUiAdministrator: 'das:ui-administrator', DasUiComplianceManager: 'das:ui-compliance_manager', DasUiAuditor: 'das:ui-auditor', DasUiDataScope: 'das:ui-data-scope', SpAicDashboardRead: 'sp:aic-dashboard-read', SpAicDashboardWrite: 'sp:aic-dashboard-write', SpUiConfigHubAdmin: 'sp:ui-config-hub-admin', SpUiConfigHubBackupAdmin: 'sp:ui-config-hub-backup-admin', SpUiConfigHubRead: 'sp:ui-config-hub-read' } as const; export type AuthUserCapabilitiesEnum = typeof AuthUserCapabilitiesEnum[keyof typeof AuthUserCapabilitiesEnum]; /** * * @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 GetAuthUserV1401Response */ export interface GetAuthUserV1401Response { /** * A message describing the error * @type {any} * @memberof GetAuthUserV1401Response */ 'error'?: any; } /** * * @export * @interface GetAuthUserV1429Response */ export interface GetAuthUserV1429Response { /** * A message describing the error * @type {any} * @memberof GetAuthUserV1429Response */ 'message'?: any; } /** * A JSONPatch Operation as defined by [RFC 6902 - JSON Patch](https://tools.ietf.org/html/rfc6902) * @export * @interface JsonPatchOperation */ export interface JsonPatchOperation { /** * The operation to be performed * @type {string} * @memberof JsonPatchOperation */ 'op': JsonPatchOperationOpEnum; /** * A string JSON Pointer representing the target path to an element to be affected by the operation * @type {string} * @memberof JsonPatchOperation */ 'path': string; /** * * @type {JsonPatchOperationValue} * @memberof JsonPatchOperation */ 'value'?: JsonPatchOperationValue; } export const JsonPatchOperationOpEnum = { Add: 'add', Remove: 'remove', Replace: 'replace', Move: 'move', Copy: 'copy', Test: 'test' } as const; export type JsonPatchOperationOpEnum = typeof JsonPatchOperationOpEnum[keyof typeof JsonPatchOperationOpEnum]; /** * @type JsonPatchOperationValue * The value to be used for the operation, required for \"add\" and \"replace\" operations * @export */ export type JsonPatchOperationValue = Array | boolean | number | object | 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]; /** * AuthUsersApi - axios parameter creator * @export */ export const AuthUsersApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * Return the specified user\'s authentication system details. * @summary Auth user details * @param {string} id Identity ID * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ getAuthUserV1: async (id: string, axiosOptions: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('getAuthUserV1', 'id', id) const localVarPath = `/auth-users/v1/{id}` .replace(`{${"id"}}`, encodeURIComponent(String(id))); // 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, }; }, /** * Use a PATCH request to update an existing user in the authentication system. Use this endpoint to modify these fields: * `capabilities` A \'400.1.1 Illegal update attempt\' detail code indicates that you attempted to PATCH a field that is not allowed. * @summary Auth user update * @param {string} id Identity ID * @param {Array} jsonPatchOperation A list of auth user update operations according to the [JSON Patch](https://tools.ietf.org/html/rfc6902) standard. * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ patchAuthUserV1: async (id: string, jsonPatchOperation: Array, axiosOptions: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('patchAuthUserV1', 'id', id) // verify required parameter 'jsonPatchOperation' is not null or undefined assertParamExists('patchAuthUserV1', 'jsonPatchOperation', jsonPatchOperation) const localVarPath = `/auth-users/v1/{id}` .replace(`{${"id"}}`, encodeURIComponent(String(id))); // 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: 'PATCH', ...baseOptions, ...axiosOptions}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; localVarHeaderParameter['Content-Type'] = 'application/json-patch+json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...axiosOptions.headers}; localVarRequestOptions.data = serializeDataIfNeeded(jsonPatchOperation, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), axiosOptions: localVarRequestOptions, }; }, } }; /** * AuthUsersApi - functional programming interface * @export */ export const AuthUsersApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = AuthUsersApiAxiosParamCreator(configuration) return { /** * Return the specified user\'s authentication system details. * @summary Auth user details * @param {string} id Identity ID * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ async getAuthUserV1(id: string, axiosOptions?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getAuthUserV1(id, axiosOptions); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['AuthUsersApi.getAuthUserV1']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Use a PATCH request to update an existing user in the authentication system. Use this endpoint to modify these fields: * `capabilities` A \'400.1.1 Illegal update attempt\' detail code indicates that you attempted to PATCH a field that is not allowed. * @summary Auth user update * @param {string} id Identity ID * @param {Array} jsonPatchOperation A list of auth user update operations according to the [JSON Patch](https://tools.ietf.org/html/rfc6902) standard. * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ async patchAuthUserV1(id: string, jsonPatchOperation: Array, axiosOptions?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.patchAuthUserV1(id, jsonPatchOperation, axiosOptions); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['AuthUsersApi.patchAuthUserV1']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } }; /** * AuthUsersApi - factory interface * @export */ export const AuthUsersApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = AuthUsersApiFp(configuration) return { /** * Return the specified user\'s authentication system details. * @summary Auth user details * @param {AuthUsersApiGetAuthUserV1Request} requestParameters Request parameters. * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ getAuthUserV1(requestParameters: AuthUsersApiGetAuthUserV1Request, axiosOptions?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.getAuthUserV1(requestParameters.id, axiosOptions).then((request) => request(axios, basePath)); }, /** * Use a PATCH request to update an existing user in the authentication system. Use this endpoint to modify these fields: * `capabilities` A \'400.1.1 Illegal update attempt\' detail code indicates that you attempted to PATCH a field that is not allowed. * @summary Auth user update * @param {AuthUsersApiPatchAuthUserV1Request} requestParameters Request parameters. * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ patchAuthUserV1(requestParameters: AuthUsersApiPatchAuthUserV1Request, axiosOptions?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.patchAuthUserV1(requestParameters.id, requestParameters.jsonPatchOperation, axiosOptions).then((request) => request(axios, basePath)); }, }; }; /** * Request parameters for getAuthUserV1 operation in AuthUsersApi. * @export * @interface AuthUsersApiGetAuthUserV1Request */ export interface AuthUsersApiGetAuthUserV1Request { /** * Identity ID * @type {string} * @memberof AuthUsersApiGetAuthUserV1 */ readonly id: string } /** * Request parameters for patchAuthUserV1 operation in AuthUsersApi. * @export * @interface AuthUsersApiPatchAuthUserV1Request */ export interface AuthUsersApiPatchAuthUserV1Request { /** * Identity ID * @type {string} * @memberof AuthUsersApiPatchAuthUserV1 */ readonly id: string /** * A list of auth user update operations according to the [JSON Patch](https://tools.ietf.org/html/rfc6902) standard. * @type {Array} * @memberof AuthUsersApiPatchAuthUserV1 */ readonly jsonPatchOperation: Array } /** * AuthUsersApi - object-oriented interface * @export * @class AuthUsersApi * @extends {BaseAPI} */ export class AuthUsersApi extends BaseAPI { /** * Return the specified user\'s authentication system details. * @summary Auth user details * @param {AuthUsersApiGetAuthUserV1Request} requestParameters Request parameters. * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} * @memberof AuthUsersApi */ public getAuthUserV1(requestParameters: AuthUsersApiGetAuthUserV1Request, axiosOptions?: RawAxiosRequestConfig) { return AuthUsersApiFp(this.configuration).getAuthUserV1(requestParameters.id, axiosOptions).then((request) => request(this.axios, this.basePath)); } /** * Use a PATCH request to update an existing user in the authentication system. Use this endpoint to modify these fields: * `capabilities` A \'400.1.1 Illegal update attempt\' detail code indicates that you attempted to PATCH a field that is not allowed. * @summary Auth user update * @param {AuthUsersApiPatchAuthUserV1Request} requestParameters Request parameters. * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} * @memberof AuthUsersApi */ public patchAuthUserV1(requestParameters: AuthUsersApiPatchAuthUserV1Request, axiosOptions?: RawAxiosRequestConfig) { return AuthUsersApiFp(this.configuration).patchAuthUserV1(requestParameters.id, requestParameters.jsonPatchOperation, axiosOptions).then((request) => request(this.axios, this.basePath)); } }