/* tslint:disable */ /* eslint-disable */ /** * Identity Security Cloud API - Public Identities * 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'; /** * An enumeration of the types of DTOs supported within the IdentityNow infrastructure. * @export * @enum {string} */ export const DtoType = { AccountCorrelationConfig: 'ACCOUNT_CORRELATION_CONFIG', AccessProfile: 'ACCESS_PROFILE', AccessRequestApproval: 'ACCESS_REQUEST_APPROVAL', Account: 'ACCOUNT', Application: 'APPLICATION', Campaign: 'CAMPAIGN', CampaignFilter: 'CAMPAIGN_FILTER', Certification: 'CERTIFICATION', Cluster: 'CLUSTER', ConnectorSchema: 'CONNECTOR_SCHEMA', Entitlement: 'ENTITLEMENT', GovernanceGroup: 'GOVERNANCE_GROUP', Identity: 'IDENTITY', IdentityProfile: 'IDENTITY_PROFILE', IdentityRequest: 'IDENTITY_REQUEST', MachineIdentity: 'MACHINE_IDENTITY', LifecycleState: 'LIFECYCLE_STATE', PasswordPolicy: 'PASSWORD_POLICY', Role: 'ROLE', Rule: 'RULE', SodPolicy: 'SOD_POLICY', Source: 'SOURCE', Tag: 'TAG', TagCategory: 'TAG_CATEGORY', TaskResult: 'TASK_RESULT', ReportResult: 'REPORT_RESULT', SodViolation: 'SOD_VIOLATION', AccountActivity: 'ACCOUNT_ACTIVITY', Workgroup: 'WORKGROUP' } as const; export type DtoType = typeof DtoType[keyof typeof DtoType]; /** * * @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 GetPublicIdentitiesV1401Response */ export interface GetPublicIdentitiesV1401Response { /** * A message describing the error * @type {any} * @memberof GetPublicIdentitiesV1401Response */ 'error'?: any; } /** * * @export * @interface GetPublicIdentitiesV1429Response */ export interface GetPublicIdentitiesV1429Response { /** * A message describing the error * @type {any} * @memberof GetPublicIdentitiesV1429Response */ 'message'?: any; } /** * The manager for the identity. * @export * @interface IdentityReference */ export interface IdentityReference { /** * * @type {DtoType} * @memberof IdentityReference */ 'type'?: DtoType; /** * Identity id * @type {string} * @memberof IdentityReference */ 'id'?: string; /** * Human-readable display name of identity. * @type {string} * @memberof IdentityReference */ 'name'?: 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]; /** * Details about a public identity * @export * @interface PublicIdentity */ export interface PublicIdentity { /** * Identity id * @type {string} * @memberof PublicIdentity */ 'id'?: string; /** * Human-readable display name of identity. * @type {string} * @memberof PublicIdentity */ 'name'?: string; /** * Alternate unique identifier for the identity. * @type {string} * @memberof PublicIdentity */ 'alias'?: string; /** * Email address of identity. * @type {string} * @memberof PublicIdentity */ 'email'?: string | null; /** * The lifecycle status for the identity * @type {string} * @memberof PublicIdentity */ 'status'?: string | null; /** * The current state of the identity, which determines how Identity Security Cloud interacts with the identity. An identity that is Active will be included identity picklists in Request Center, identity processing, and more. Identities that are Inactive will be excluded from these features. * @type {string} * @memberof PublicIdentity */ 'identityState'?: PublicIdentityIdentityStateEnum | null; /** * * @type {IdentityReference} * @memberof PublicIdentity */ 'manager'?: IdentityReference | null; /** * The public identity attributes of the identity * @type {Array} * @memberof PublicIdentity */ 'attributes'?: Array; } export const PublicIdentityIdentityStateEnum = { Active: 'ACTIVE', InactiveShortTerm: 'INACTIVE_SHORT_TERM', InactiveLongTerm: 'INACTIVE_LONG_TERM' } as const; export type PublicIdentityIdentityStateEnum = typeof PublicIdentityIdentityStateEnum[keyof typeof PublicIdentityIdentityStateEnum]; /** * * @export * @interface PublicIdentityAttributesInner */ export interface PublicIdentityAttributesInner { /** * The attribute key * @type {string} * @memberof PublicIdentityAttributesInner */ 'key'?: string; /** * Human-readable display name of the attribute * @type {string} * @memberof PublicIdentityAttributesInner */ 'name'?: string; /** * The attribute value * @type {string} * @memberof PublicIdentityAttributesInner */ 'value'?: string | null; } /** * PublicIdentitiesApi - axios parameter creator * @export */ export const PublicIdentitiesApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * Get a list of public identities. Set `add-core-filters` to `true` to exclude incomplete identities and uncorrelated accounts. * @summary Get list of public identities * @param {number} [limit] Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. * @param {number} [offset] Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. * @param {boolean} [count] If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. * @param {string} [filters] Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **id**: *eq, in* **alias**: *eq, sw* **email**: *eq, sw* **firstname**: *eq, sw* **lastname**: *eq, sw* * @param {boolean} [addCoreFilters] If *true*, only get identities which satisfy ALL the following criteria in addition to any criteria specified by *filters*: - Should be either correlated or protected. - Should not be \"spadmin\" or \"cloudadmin\". - uid should not be null. - lastname should not be null. - email should not be null. * @param {string} [sorters] Sort results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#sorting-results) Sorting is supported for the following fields: **name** * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ getPublicIdentitiesV1: async (limit?: number, offset?: number, count?: boolean, filters?: string, addCoreFilters?: boolean, sorters?: string, axiosOptions: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/public-identities/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; if (limit !== undefined) { localVarQueryParameter['limit'] = limit; } if (offset !== undefined) { localVarQueryParameter['offset'] = offset; } if (count !== undefined) { localVarQueryParameter['count'] = count; } if (filters !== undefined) { localVarQueryParameter['filters'] = filters; } if (addCoreFilters !== undefined) { localVarQueryParameter['add-core-filters'] = addCoreFilters; } if (sorters !== undefined) { localVarQueryParameter['sorters'] = sorters; } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...axiosOptions.headers}; return { url: toPathString(localVarUrlObj), axiosOptions: localVarRequestOptions, }; }, } }; /** * PublicIdentitiesApi - functional programming interface * @export */ export const PublicIdentitiesApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = PublicIdentitiesApiAxiosParamCreator(configuration) return { /** * Get a list of public identities. Set `add-core-filters` to `true` to exclude incomplete identities and uncorrelated accounts. * @summary Get list of public identities * @param {number} [limit] Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. * @param {number} [offset] Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. * @param {boolean} [count] If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. * @param {string} [filters] Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **id**: *eq, in* **alias**: *eq, sw* **email**: *eq, sw* **firstname**: *eq, sw* **lastname**: *eq, sw* * @param {boolean} [addCoreFilters] If *true*, only get identities which satisfy ALL the following criteria in addition to any criteria specified by *filters*: - Should be either correlated or protected. - Should not be \"spadmin\" or \"cloudadmin\". - uid should not be null. - lastname should not be null. - email should not be null. * @param {string} [sorters] Sort results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#sorting-results) Sorting is supported for the following fields: **name** * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ async getPublicIdentitiesV1(limit?: number, offset?: number, count?: boolean, filters?: string, addCoreFilters?: boolean, sorters?: string, axiosOptions?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.getPublicIdentitiesV1(limit, offset, count, filters, addCoreFilters, sorters, axiosOptions); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['PublicIdentitiesApi.getPublicIdentitiesV1']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } }; /** * PublicIdentitiesApi - factory interface * @export */ export const PublicIdentitiesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = PublicIdentitiesApiFp(configuration) return { /** * Get a list of public identities. Set `add-core-filters` to `true` to exclude incomplete identities and uncorrelated accounts. * @summary Get list of public identities * @param {PublicIdentitiesApiGetPublicIdentitiesV1Request} requestParameters Request parameters. * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ getPublicIdentitiesV1(requestParameters: PublicIdentitiesApiGetPublicIdentitiesV1Request = {}, axiosOptions?: RawAxiosRequestConfig): AxiosPromise> { return localVarFp.getPublicIdentitiesV1(requestParameters.limit, requestParameters.offset, requestParameters.count, requestParameters.filters, requestParameters.addCoreFilters, requestParameters.sorters, axiosOptions).then((request) => request(axios, basePath)); }, }; }; /** * Request parameters for getPublicIdentitiesV1 operation in PublicIdentitiesApi. * @export * @interface PublicIdentitiesApiGetPublicIdentitiesV1Request */ export interface PublicIdentitiesApiGetPublicIdentitiesV1Request { /** * Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. * @type {number} * @memberof PublicIdentitiesApiGetPublicIdentitiesV1 */ readonly limit?: number /** * Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. * @type {number} * @memberof PublicIdentitiesApiGetPublicIdentitiesV1 */ readonly offset?: number /** * If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. * @type {boolean} * @memberof PublicIdentitiesApiGetPublicIdentitiesV1 */ readonly count?: boolean /** * Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **id**: *eq, in* **alias**: *eq, sw* **email**: *eq, sw* **firstname**: *eq, sw* **lastname**: *eq, sw* * @type {string} * @memberof PublicIdentitiesApiGetPublicIdentitiesV1 */ readonly filters?: string /** * If *true*, only get identities which satisfy ALL the following criteria in addition to any criteria specified by *filters*: - Should be either correlated or protected. - Should not be \"spadmin\" or \"cloudadmin\". - uid should not be null. - lastname should not be null. - email should not be null. * @type {boolean} * @memberof PublicIdentitiesApiGetPublicIdentitiesV1 */ readonly addCoreFilters?: boolean /** * Sort results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#sorting-results) Sorting is supported for the following fields: **name** * @type {string} * @memberof PublicIdentitiesApiGetPublicIdentitiesV1 */ readonly sorters?: string } /** * PublicIdentitiesApi - object-oriented interface * @export * @class PublicIdentitiesApi * @extends {BaseAPI} */ export class PublicIdentitiesApi extends BaseAPI { /** * Get a list of public identities. Set `add-core-filters` to `true` to exclude incomplete identities and uncorrelated accounts. * @summary Get list of public identities * @param {PublicIdentitiesApiGetPublicIdentitiesV1Request} requestParameters Request parameters. * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} * @memberof PublicIdentitiesApi */ public getPublicIdentitiesV1(requestParameters: PublicIdentitiesApiGetPublicIdentitiesV1Request = {}, axiosOptions?: RawAxiosRequestConfig) { return PublicIdentitiesApiFp(this.configuration).getPublicIdentitiesV1(requestParameters.limit, requestParameters.offset, requestParameters.count, requestParameters.filters, requestParameters.addCoreFilters, requestParameters.sorters, axiosOptions).then((request) => request(this.axios, this.basePath)); } }