/* tslint:disable */ /* eslint-disable */ /** * Identity Security Cloud API - Password Dictionary * 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 GetPasswordDictionaryV1401Response */ export interface GetPasswordDictionaryV1401Response { /** * A message describing the error * @type {any} * @memberof GetPasswordDictionaryV1401Response */ 'error'?: any; } /** * * @export * @interface GetPasswordDictionaryV1429Response */ export interface GetPasswordDictionaryV1429Response { /** * A message describing the error * @type {any} * @memberof GetPasswordDictionaryV1429Response */ '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 PutPasswordDictionaryV1Request */ export interface PutPasswordDictionaryV1Request { /** * * @type {File} * @memberof PutPasswordDictionaryV1Request */ 'file'?: File; } /** * PasswordDictionaryApi - axios parameter creator * @export */ export const PasswordDictionaryApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * This gets password dictionary for the organization. The password dictionary file can contain lines that are: 1. comment lines - the first character is \'#\', can be 128 Unicode codepoints in length, and are ignored during processing 2. empty lines 3. locale line - the first line that starts with \"locale=\" is considered to be locale line, the rest are treated as normal content lines 4. line containing the password dictionary word - it must start with non-whitespace character and only non-whitespace characters are allowed; maximum length of the line is 128 Unicode codepoints Password dictionary file may not contain more than 2,500 lines (not counting whitespace lines, comment lines and locale line). Password dict file must contain UTF-8 characters only. # Sample password text file ``` # Password dictionary small test file locale=en_US # Password dictionary prohibited words qwerty abcd aaaaa password qazxsws ``` * @summary Get password dictionary * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ getPasswordDictionaryV1: async (axiosOptions: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/password-dictionary/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 updates password dictionary for the organization. The password dictionary file can contain lines that are: 1. comment lines - the first character is \'#\', can be 128 Unicode codepoints in length, and are ignored during processing 2. empty lines 3. locale line - the first line that starts with \"locale=\" is considered to be locale line, the rest are treated as normal content lines 4. line containing the password dictionary word - it must start with non-whitespace character and only non-whitespace characters are allowed; maximum length of the line is 128 Unicode codepoints Password dictionary file may not contain more than 2,500 lines (not counting whitespace lines, comment lines and locale line). Password dict file must contain UTF-8 characters only. # Sample password text file ``` # Password dictionary small test file locale=en_US # Password dictionary prohibited words qwerty abcd aaaaa password qazxsws ``` * @summary Update password dictionary * @param {File} [file] * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ putPasswordDictionaryV1: async (file?: File, axiosOptions: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/password-dictionary/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; const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)(); if (file !== undefined) { localVarFormParams.append('file', file as any); } localVarHeaderParameter['Content-Type'] = 'multipart/form-data'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...axiosOptions.headers}; localVarRequestOptions.data = localVarFormParams; return { url: toPathString(localVarUrlObj), axiosOptions: localVarRequestOptions, }; }, } }; /** * PasswordDictionaryApi - functional programming interface * @export */ export const PasswordDictionaryApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = PasswordDictionaryApiAxiosParamCreator(configuration) return { /** * This gets password dictionary for the organization. The password dictionary file can contain lines that are: 1. comment lines - the first character is \'#\', can be 128 Unicode codepoints in length, and are ignored during processing 2. empty lines 3. locale line - the first line that starts with \"locale=\" is considered to be locale line, the rest are treated as normal content lines 4. line containing the password dictionary word - it must start with non-whitespace character and only non-whitespace characters are allowed; maximum length of the line is 128 Unicode codepoints Password dictionary file may not contain more than 2,500 lines (not counting whitespace lines, comment lines and locale line). Password dict file must contain UTF-8 characters only. # Sample password text file ``` # Password dictionary small test file locale=en_US # Password dictionary prohibited words qwerty abcd aaaaa password qazxsws ``` * @summary Get password dictionary * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ async getPasswordDictionaryV1(axiosOptions?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getPasswordDictionaryV1(axiosOptions); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['PasswordDictionaryApi.getPasswordDictionaryV1']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * This updates password dictionary for the organization. The password dictionary file can contain lines that are: 1. comment lines - the first character is \'#\', can be 128 Unicode codepoints in length, and are ignored during processing 2. empty lines 3. locale line - the first line that starts with \"locale=\" is considered to be locale line, the rest are treated as normal content lines 4. line containing the password dictionary word - it must start with non-whitespace character and only non-whitespace characters are allowed; maximum length of the line is 128 Unicode codepoints Password dictionary file may not contain more than 2,500 lines (not counting whitespace lines, comment lines and locale line). Password dict file must contain UTF-8 characters only. # Sample password text file ``` # Password dictionary small test file locale=en_US # Password dictionary prohibited words qwerty abcd aaaaa password qazxsws ``` * @summary Update password dictionary * @param {File} [file] * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ async putPasswordDictionaryV1(file?: File, axiosOptions?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.putPasswordDictionaryV1(file, axiosOptions); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['PasswordDictionaryApi.putPasswordDictionaryV1']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } }; /** * PasswordDictionaryApi - factory interface * @export */ export const PasswordDictionaryApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = PasswordDictionaryApiFp(configuration) return { /** * This gets password dictionary for the organization. The password dictionary file can contain lines that are: 1. comment lines - the first character is \'#\', can be 128 Unicode codepoints in length, and are ignored during processing 2. empty lines 3. locale line - the first line that starts with \"locale=\" is considered to be locale line, the rest are treated as normal content lines 4. line containing the password dictionary word - it must start with non-whitespace character and only non-whitespace characters are allowed; maximum length of the line is 128 Unicode codepoints Password dictionary file may not contain more than 2,500 lines (not counting whitespace lines, comment lines and locale line). Password dict file must contain UTF-8 characters only. # Sample password text file ``` # Password dictionary small test file locale=en_US # Password dictionary prohibited words qwerty abcd aaaaa password qazxsws ``` * @summary Get password dictionary * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ getPasswordDictionaryV1(axiosOptions?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.getPasswordDictionaryV1(axiosOptions).then((request) => request(axios, basePath)); }, /** * This updates password dictionary for the organization. The password dictionary file can contain lines that are: 1. comment lines - the first character is \'#\', can be 128 Unicode codepoints in length, and are ignored during processing 2. empty lines 3. locale line - the first line that starts with \"locale=\" is considered to be locale line, the rest are treated as normal content lines 4. line containing the password dictionary word - it must start with non-whitespace character and only non-whitespace characters are allowed; maximum length of the line is 128 Unicode codepoints Password dictionary file may not contain more than 2,500 lines (not counting whitespace lines, comment lines and locale line). Password dict file must contain UTF-8 characters only. # Sample password text file ``` # Password dictionary small test file locale=en_US # Password dictionary prohibited words qwerty abcd aaaaa password qazxsws ``` * @summary Update password dictionary * @param {PasswordDictionaryApiPutPasswordDictionaryV1Request} requestParameters Request parameters. * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ putPasswordDictionaryV1(requestParameters: PasswordDictionaryApiPutPasswordDictionaryV1Request = {}, axiosOptions?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.putPasswordDictionaryV1(requestParameters.file, axiosOptions).then((request) => request(axios, basePath)); }, }; }; /** * Request parameters for putPasswordDictionaryV1 operation in PasswordDictionaryApi. * @export * @interface PasswordDictionaryApiPutPasswordDictionaryV1Request */ export interface PasswordDictionaryApiPutPasswordDictionaryV1Request { /** * * @type {File} * @memberof PasswordDictionaryApiPutPasswordDictionaryV1 */ readonly file?: File } /** * PasswordDictionaryApi - object-oriented interface * @export * @class PasswordDictionaryApi * @extends {BaseAPI} */ export class PasswordDictionaryApi extends BaseAPI { /** * This gets password dictionary for the organization. The password dictionary file can contain lines that are: 1. comment lines - the first character is \'#\', can be 128 Unicode codepoints in length, and are ignored during processing 2. empty lines 3. locale line - the first line that starts with \"locale=\" is considered to be locale line, the rest are treated as normal content lines 4. line containing the password dictionary word - it must start with non-whitespace character and only non-whitespace characters are allowed; maximum length of the line is 128 Unicode codepoints Password dictionary file may not contain more than 2,500 lines (not counting whitespace lines, comment lines and locale line). Password dict file must contain UTF-8 characters only. # Sample password text file ``` # Password dictionary small test file locale=en_US # Password dictionary prohibited words qwerty abcd aaaaa password qazxsws ``` * @summary Get password dictionary * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} * @memberof PasswordDictionaryApi */ public getPasswordDictionaryV1(axiosOptions?: RawAxiosRequestConfig) { return PasswordDictionaryApiFp(this.configuration).getPasswordDictionaryV1(axiosOptions).then((request) => request(this.axios, this.basePath)); } /** * This updates password dictionary for the organization. The password dictionary file can contain lines that are: 1. comment lines - the first character is \'#\', can be 128 Unicode codepoints in length, and are ignored during processing 2. empty lines 3. locale line - the first line that starts with \"locale=\" is considered to be locale line, the rest are treated as normal content lines 4. line containing the password dictionary word - it must start with non-whitespace character and only non-whitespace characters are allowed; maximum length of the line is 128 Unicode codepoints Password dictionary file may not contain more than 2,500 lines (not counting whitespace lines, comment lines and locale line). Password dict file must contain UTF-8 characters only. # Sample password text file ``` # Password dictionary small test file locale=en_US # Password dictionary prohibited words qwerty abcd aaaaa password qazxsws ``` * @summary Update password dictionary * @param {PasswordDictionaryApiPutPasswordDictionaryV1Request} requestParameters Request parameters. * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} * @memberof PasswordDictionaryApi */ public putPasswordDictionaryV1(requestParameters: PasswordDictionaryApiPutPasswordDictionaryV1Request = {}, axiosOptions?: RawAxiosRequestConfig) { return PasswordDictionaryApiFp(this.configuration).putPasswordDictionaryV1(requestParameters.file, axiosOptions).then((request) => request(this.axios, this.basePath)); } }