/* tslint:disable */ /* eslint-disable */ /** * Identity Security Cloud API - Password Configuration * 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 GetPasswordOrgConfigV1401Response */ export interface GetPasswordOrgConfigV1401Response { /** * A message describing the error * @type {any} * @memberof GetPasswordOrgConfigV1401Response */ 'error'?: any; } /** * * @export * @interface GetPasswordOrgConfigV1429Response */ export interface GetPasswordOrgConfigV1429Response { /** * A message describing the error * @type {any} * @memberof GetPasswordOrgConfigV1429Response */ '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 PasswordOrgConfig */ export interface PasswordOrgConfig { /** * Indicator whether custom password instructions feature is enabled. The default value is false. * @type {boolean} * @memberof PasswordOrgConfig */ 'customInstructionsEnabled'?: boolean; /** * Indicator whether \"digit token\" feature is enabled. The default value is false. * @type {boolean} * @memberof PasswordOrgConfig */ 'digitTokenEnabled'?: boolean; /** * The duration of \"digit token\" in minutes. The default value is 5. * @type {number} * @memberof PasswordOrgConfig */ 'digitTokenDurationMinutes'?: number; /** * The length of \"digit token\". The default value is 6. * @type {number} * @memberof PasswordOrgConfig */ 'digitTokenLength'?: number; } /** * PasswordConfigurationApi - axios parameter creator * @export */ export const PasswordConfigurationApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * This API creates the password org config. Unspecified fields will use default value. To be able to use the custom password instructions, you must set the `customInstructionsEnabled` field to \"true\". Requires ORG_ADMIN, API role or authorization scope of \'idn:password-org-config:write\' * @summary Create password org config * @param {PasswordOrgConfig} passwordOrgConfig * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ createPasswordOrgConfigV1: async (passwordOrgConfig: PasswordOrgConfig, axiosOptions: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'passwordOrgConfig' is not null or undefined assertParamExists('createPasswordOrgConfigV1', 'passwordOrgConfig', passwordOrgConfig) const localVarPath = `/password-org-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: 'POST', ...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(passwordOrgConfig, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), axiosOptions: localVarRequestOptions, }; }, /** * This API returns the password org config . Requires ORG_ADMIN, API role or authorization scope of \'idn:password-org-config:read\' * @summary Get password org config * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ getPasswordOrgConfigV1: async (axiosOptions: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/password-org-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, }; }, /** * This API updates the password org config for specified fields. Other fields will keep original value. You must set the `customInstructionsEnabled` field to \"true\" to be able to use custom password instructions. Requires ORG_ADMIN, API role or authorization scope of \'idn:password-org-config:write\' * @summary Update password org config * @param {PasswordOrgConfig} passwordOrgConfig * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ putPasswordOrgConfigV1: async (passwordOrgConfig: PasswordOrgConfig, axiosOptions: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'passwordOrgConfig' is not null or undefined assertParamExists('putPasswordOrgConfigV1', 'passwordOrgConfig', passwordOrgConfig) const localVarPath = `/password-org-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(passwordOrgConfig, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), axiosOptions: localVarRequestOptions, }; }, } }; /** * PasswordConfigurationApi - functional programming interface * @export */ export const PasswordConfigurationApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = PasswordConfigurationApiAxiosParamCreator(configuration) return { /** * This API creates the password org config. Unspecified fields will use default value. To be able to use the custom password instructions, you must set the `customInstructionsEnabled` field to \"true\". Requires ORG_ADMIN, API role or authorization scope of \'idn:password-org-config:write\' * @summary Create password org config * @param {PasswordOrgConfig} passwordOrgConfig * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ async createPasswordOrgConfigV1(passwordOrgConfig: PasswordOrgConfig, axiosOptions?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createPasswordOrgConfigV1(passwordOrgConfig, axiosOptions); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['PasswordConfigurationApi.createPasswordOrgConfigV1']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * This API returns the password org config . Requires ORG_ADMIN, API role or authorization scope of \'idn:password-org-config:read\' * @summary Get password org config * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ async getPasswordOrgConfigV1(axiosOptions?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getPasswordOrgConfigV1(axiosOptions); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['PasswordConfigurationApi.getPasswordOrgConfigV1']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * This API updates the password org config for specified fields. Other fields will keep original value. You must set the `customInstructionsEnabled` field to \"true\" to be able to use custom password instructions. Requires ORG_ADMIN, API role or authorization scope of \'idn:password-org-config:write\' * @summary Update password org config * @param {PasswordOrgConfig} passwordOrgConfig * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ async putPasswordOrgConfigV1(passwordOrgConfig: PasswordOrgConfig, axiosOptions?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.putPasswordOrgConfigV1(passwordOrgConfig, axiosOptions); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['PasswordConfigurationApi.putPasswordOrgConfigV1']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } }; /** * PasswordConfigurationApi - factory interface * @export */ export const PasswordConfigurationApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = PasswordConfigurationApiFp(configuration) return { /** * This API creates the password org config. Unspecified fields will use default value. To be able to use the custom password instructions, you must set the `customInstructionsEnabled` field to \"true\". Requires ORG_ADMIN, API role or authorization scope of \'idn:password-org-config:write\' * @summary Create password org config * @param {PasswordConfigurationApiCreatePasswordOrgConfigV1Request} requestParameters Request parameters. * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ createPasswordOrgConfigV1(requestParameters: PasswordConfigurationApiCreatePasswordOrgConfigV1Request, axiosOptions?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.createPasswordOrgConfigV1(requestParameters.passwordOrgConfig, axiosOptions).then((request) => request(axios, basePath)); }, /** * This API returns the password org config . Requires ORG_ADMIN, API role or authorization scope of \'idn:password-org-config:read\' * @summary Get password org config * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ getPasswordOrgConfigV1(axiosOptions?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.getPasswordOrgConfigV1(axiosOptions).then((request) => request(axios, basePath)); }, /** * This API updates the password org config for specified fields. Other fields will keep original value. You must set the `customInstructionsEnabled` field to \"true\" to be able to use custom password instructions. Requires ORG_ADMIN, API role or authorization scope of \'idn:password-org-config:write\' * @summary Update password org config * @param {PasswordConfigurationApiPutPasswordOrgConfigV1Request} requestParameters Request parameters. * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ putPasswordOrgConfigV1(requestParameters: PasswordConfigurationApiPutPasswordOrgConfigV1Request, axiosOptions?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.putPasswordOrgConfigV1(requestParameters.passwordOrgConfig, axiosOptions).then((request) => request(axios, basePath)); }, }; }; /** * Request parameters for createPasswordOrgConfigV1 operation in PasswordConfigurationApi. * @export * @interface PasswordConfigurationApiCreatePasswordOrgConfigV1Request */ export interface PasswordConfigurationApiCreatePasswordOrgConfigV1Request { /** * * @type {PasswordOrgConfig} * @memberof PasswordConfigurationApiCreatePasswordOrgConfigV1 */ readonly passwordOrgConfig: PasswordOrgConfig } /** * Request parameters for putPasswordOrgConfigV1 operation in PasswordConfigurationApi. * @export * @interface PasswordConfigurationApiPutPasswordOrgConfigV1Request */ export interface PasswordConfigurationApiPutPasswordOrgConfigV1Request { /** * * @type {PasswordOrgConfig} * @memberof PasswordConfigurationApiPutPasswordOrgConfigV1 */ readonly passwordOrgConfig: PasswordOrgConfig } /** * PasswordConfigurationApi - object-oriented interface * @export * @class PasswordConfigurationApi * @extends {BaseAPI} */ export class PasswordConfigurationApi extends BaseAPI { /** * This API creates the password org config. Unspecified fields will use default value. To be able to use the custom password instructions, you must set the `customInstructionsEnabled` field to \"true\". Requires ORG_ADMIN, API role or authorization scope of \'idn:password-org-config:write\' * @summary Create password org config * @param {PasswordConfigurationApiCreatePasswordOrgConfigV1Request} requestParameters Request parameters. * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} * @memberof PasswordConfigurationApi */ public createPasswordOrgConfigV1(requestParameters: PasswordConfigurationApiCreatePasswordOrgConfigV1Request, axiosOptions?: RawAxiosRequestConfig) { return PasswordConfigurationApiFp(this.configuration).createPasswordOrgConfigV1(requestParameters.passwordOrgConfig, axiosOptions).then((request) => request(this.axios, this.basePath)); } /** * This API returns the password org config . Requires ORG_ADMIN, API role or authorization scope of \'idn:password-org-config:read\' * @summary Get password org config * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} * @memberof PasswordConfigurationApi */ public getPasswordOrgConfigV1(axiosOptions?: RawAxiosRequestConfig) { return PasswordConfigurationApiFp(this.configuration).getPasswordOrgConfigV1(axiosOptions).then((request) => request(this.axios, this.basePath)); } /** * This API updates the password org config for specified fields. Other fields will keep original value. You must set the `customInstructionsEnabled` field to \"true\" to be able to use custom password instructions. Requires ORG_ADMIN, API role or authorization scope of \'idn:password-org-config:write\' * @summary Update password org config * @param {PasswordConfigurationApiPutPasswordOrgConfigV1Request} requestParameters Request parameters. * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} * @memberof PasswordConfigurationApi */ public putPasswordOrgConfigV1(requestParameters: PasswordConfigurationApiPutPasswordOrgConfigV1Request, axiosOptions?: RawAxiosRequestConfig) { return PasswordConfigurationApiFp(this.configuration).putPasswordOrgConfigV1(requestParameters.passwordOrgConfig, axiosOptions).then((request) => request(this.axios, this.basePath)); } }