/* tslint:disable */ /* eslint-disable */ /** * Identity Security Cloud API - Public Identities Config * 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 GetPublicIdentityConfigV1401Response */ export interface GetPublicIdentityConfigV1401Response { /** * A message describing the error * @type {any} * @memberof GetPublicIdentityConfigV1401Response */ 'error'?: any; } /** * * @export * @interface GetPublicIdentityConfigV1429Response */ export interface GetPublicIdentityConfigV1429Response { /** * A message describing the error * @type {any} * @memberof GetPublicIdentityConfigV1429Response */ '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]; /** * Used to map an attribute key for an Identity to its display name. * @export * @interface PublicIdentityAttributeConfig */ export interface PublicIdentityAttributeConfig { /** * The attribute key * @type {string} * @memberof PublicIdentityAttributeConfig */ 'key'?: string; /** * The attribute display name * @type {string} * @memberof PublicIdentityAttributeConfig */ 'name'?: string; } /** * Details of up to 5 Identity attributes that will be publicly accessible for all Identities to anyone in the org. * @export * @interface PublicIdentityConfig */ export interface PublicIdentityConfig { /** * Up to 5 identity attributes that will be available to everyone in the org for all users in the org. * @type {Array} * @memberof PublicIdentityConfig */ 'attributes'?: Array; /** * When this configuration was last modified. * @type {string} * @memberof PublicIdentityConfig */ 'modified'?: string | null; /** * * @type {IdentityReference} * @memberof PublicIdentityConfig */ 'modifiedBy'?: IdentityReference | null; } /** * PublicIdentitiesConfigApi - axios parameter creator * @export */ export const PublicIdentitiesConfigApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * Returns the publicly visible attributes of an identity available to request approvers for Access Requests and Certification Campaigns. * @summary Get the public identities configuration * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ getPublicIdentityConfigV1: async (axiosOptions: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/public-identities-config/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, }; }, /** * Updates the publicly visible attributes of an identity available to request approvers for Access Requests and Certification Campaigns. * @summary Update the public identities configuration * @param {PublicIdentityConfig} publicIdentityConfig * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ updatePublicIdentityConfigV1: async (publicIdentityConfig: PublicIdentityConfig, axiosOptions: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'publicIdentityConfig' is not null or undefined assertParamExists('updatePublicIdentityConfigV1', 'publicIdentityConfig', publicIdentityConfig) const localVarPath = `/public-identities-config/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: 'PUT', ...baseOptions, ...axiosOptions}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...axiosOptions.headers}; localVarRequestOptions.data = serializeDataIfNeeded(publicIdentityConfig, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), axiosOptions: localVarRequestOptions, }; }, } }; /** * PublicIdentitiesConfigApi - functional programming interface * @export */ export const PublicIdentitiesConfigApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = PublicIdentitiesConfigApiAxiosParamCreator(configuration) return { /** * Returns the publicly visible attributes of an identity available to request approvers for Access Requests and Certification Campaigns. * @summary Get the public identities configuration * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ async getPublicIdentityConfigV1(axiosOptions?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getPublicIdentityConfigV1(axiosOptions); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['PublicIdentitiesConfigApi.getPublicIdentityConfigV1']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Updates the publicly visible attributes of an identity available to request approvers for Access Requests and Certification Campaigns. * @summary Update the public identities configuration * @param {PublicIdentityConfig} publicIdentityConfig * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ async updatePublicIdentityConfigV1(publicIdentityConfig: PublicIdentityConfig, axiosOptions?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updatePublicIdentityConfigV1(publicIdentityConfig, axiosOptions); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['PublicIdentitiesConfigApi.updatePublicIdentityConfigV1']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } }; /** * PublicIdentitiesConfigApi - factory interface * @export */ export const PublicIdentitiesConfigApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = PublicIdentitiesConfigApiFp(configuration) return { /** * Returns the publicly visible attributes of an identity available to request approvers for Access Requests and Certification Campaigns. * @summary Get the public identities configuration * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ getPublicIdentityConfigV1(axiosOptions?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.getPublicIdentityConfigV1(axiosOptions).then((request) => request(axios, basePath)); }, /** * Updates the publicly visible attributes of an identity available to request approvers for Access Requests and Certification Campaigns. * @summary Update the public identities configuration * @param {PublicIdentitiesConfigApiUpdatePublicIdentityConfigV1Request} requestParameters Request parameters. * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ updatePublicIdentityConfigV1(requestParameters: PublicIdentitiesConfigApiUpdatePublicIdentityConfigV1Request, axiosOptions?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.updatePublicIdentityConfigV1(requestParameters.publicIdentityConfig, axiosOptions).then((request) => request(axios, basePath)); }, }; }; /** * Request parameters for updatePublicIdentityConfigV1 operation in PublicIdentitiesConfigApi. * @export * @interface PublicIdentitiesConfigApiUpdatePublicIdentityConfigV1Request */ export interface PublicIdentitiesConfigApiUpdatePublicIdentityConfigV1Request { /** * * @type {PublicIdentityConfig} * @memberof PublicIdentitiesConfigApiUpdatePublicIdentityConfigV1 */ readonly publicIdentityConfig: PublicIdentityConfig } /** * PublicIdentitiesConfigApi - object-oriented interface * @export * @class PublicIdentitiesConfigApi * @extends {BaseAPI} */ export class PublicIdentitiesConfigApi extends BaseAPI { /** * Returns the publicly visible attributes of an identity available to request approvers for Access Requests and Certification Campaigns. * @summary Get the public identities configuration * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} * @memberof PublicIdentitiesConfigApi */ public getPublicIdentityConfigV1(axiosOptions?: RawAxiosRequestConfig) { return PublicIdentitiesConfigApiFp(this.configuration).getPublicIdentityConfigV1(axiosOptions).then((request) => request(this.axios, this.basePath)); } /** * Updates the publicly visible attributes of an identity available to request approvers for Access Requests and Certification Campaigns. * @summary Update the public identities configuration * @param {PublicIdentitiesConfigApiUpdatePublicIdentityConfigV1Request} requestParameters Request parameters. * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} * @memberof PublicIdentitiesConfigApi */ public updatePublicIdentityConfigV1(requestParameters: PublicIdentitiesConfigApiUpdatePublicIdentityConfigV1Request, axiosOptions?: RawAxiosRequestConfig) { return PublicIdentitiesConfigApiFp(this.configuration).updatePublicIdentityConfigV1(requestParameters.publicIdentityConfig, axiosOptions).then((request) => request(this.axios, this.basePath)); } }