/* tslint:disable */ /* eslint-disable */ /** * Identity Security Cloud API - MFA 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 GetMFAOktaConfigV1401Response */ export interface GetMFAOktaConfigV1401Response { /** * A message describing the error * @type {any} * @memberof GetMFAOktaConfigV1401Response */ 'error'?: any; } /** * * @export * @interface GetMFAOktaConfigV1429Response */ export interface GetMFAOktaConfigV1429Response { /** * A message describing the error * @type {any} * @memberof GetMFAOktaConfigV1429Response */ 'message'?: any; } /** * * @export * @interface KbaAnswerRequestItem */ export interface KbaAnswerRequestItem { /** * Question Id * @type {string} * @memberof KbaAnswerRequestItem */ 'id': string; /** * An answer for the KBA question * @type {string} * @memberof KbaAnswerRequestItem */ 'answer': string; } /** * * @export * @interface KbaAnswerResponseItem */ export interface KbaAnswerResponseItem { /** * Question Id * @type {string} * @memberof KbaAnswerResponseItem */ 'id': string; /** * Question description * @type {string} * @memberof KbaAnswerResponseItem */ 'question': string; /** * Denotes whether the KBA question has an answer configured for the current user * @type {boolean} * @memberof KbaAnswerResponseItem */ 'hasAnswer': boolean; } /** * KBA Configuration * @export * @interface KbaQuestion */ export interface KbaQuestion { /** * KBA Question Id * @type {string} * @memberof KbaQuestion */ 'id': string; /** * KBA Question description * @type {string} * @memberof KbaQuestion */ 'text': string; /** * Denotes whether the KBA question has an answer configured for any user in the tenant * @type {boolean} * @memberof KbaQuestion */ 'hasAnswer': boolean; /** * Denotes the number of KBA configurations for this question * @type {number} * @memberof KbaQuestion */ 'numAnswers': number; } /** * 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]; /** * Response model for configuration test of a given MFA method * @export * @interface MfaConfigTestResponse */ export interface MfaConfigTestResponse { /** * The configuration test result. * @type {string} * @memberof MfaConfigTestResponse */ 'state'?: MfaConfigTestResponseStateEnum; /** * The error message to indicate the failure of configuration test. * @type {string} * @memberof MfaConfigTestResponse */ 'error'?: string; } export const MfaConfigTestResponseStateEnum = { Success: 'SUCCESS', Failed: 'FAILED' } as const; export type MfaConfigTestResponseStateEnum = typeof MfaConfigTestResponseStateEnum[keyof typeof MfaConfigTestResponseStateEnum]; /** * * @export * @interface MfaDuoConfig */ export interface MfaDuoConfig { /** * Mfa method name * @type {string} * @memberof MfaDuoConfig */ 'mfaMethod'?: string | null; /** * If MFA method is enabled. * @type {boolean} * @memberof MfaDuoConfig */ 'enabled'?: boolean; /** * The server host name or IP address of the MFA provider. * @type {string} * @memberof MfaDuoConfig */ 'host'?: string | null; /** * The secret key for authenticating requests to the MFA provider. * @type {string} * @memberof MfaDuoConfig */ 'accessKey'?: string | null; /** * Optional. The name of the attribute for mapping IdentityNow identity to the MFA provider. * @type {string} * @memberof MfaDuoConfig */ 'identityAttribute'?: string | null; /** * A map with additional config properties for the given MFA method - duo-web. * @type {{ [key: string]: any; }} * @memberof MfaDuoConfig */ 'configProperties'?: { [key: string]: any; } | null; } /** * * @export * @interface MfaOktaConfig */ export interface MfaOktaConfig { /** * Mfa method name * @type {string} * @memberof MfaOktaConfig */ 'mfaMethod'?: string | null; /** * If MFA method is enabled. * @type {boolean} * @memberof MfaOktaConfig */ 'enabled'?: boolean; /** * The server host name or IP address of the MFA provider. * @type {string} * @memberof MfaOktaConfig */ 'host'?: string | null; /** * The secret key for authenticating requests to the MFA provider. * @type {string} * @memberof MfaOktaConfig */ 'accessKey'?: string | null; /** * Optional. The name of the attribute for mapping IdentityNow identity to the MFA provider. * @type {string} * @memberof MfaOktaConfig */ 'identityAttribute'?: string | null; } /** * MFAConfigurationApi - axios parameter creator * @export */ export const MFAConfigurationApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * This API returns the configuration of an Duo MFA method. * @summary Configuration of duo mfa method * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ getMFADuoConfigV1: async (axiosOptions: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/mfa/v1/duo-web/config`; // 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 returns the KBA configuration for MFA. * @summary Configuration of kba mfa method * @param {boolean} [allLanguages] Indicator whether the question text should be returned in all configured languages * If true, the question text is returned in all languages that it is configured in. * If false, the question text is returned in the user locale if available, else for the default locale. * If not passed, it behaves the same way as passing this parameter as false * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ getMFAKbaConfigV1: async (allLanguages?: boolean, axiosOptions: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/mfa/v1/kba/config`; // 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 (allLanguages !== undefined) { localVarQueryParameter['allLanguages'] = allLanguages; } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...axiosOptions.headers}; return { url: toPathString(localVarUrlObj), axiosOptions: localVarRequestOptions, }; }, /** * This API returns the configuration of an Okta MFA method. * @summary Configuration of okta mfa method * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ getMFAOktaConfigV1: async (axiosOptions: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/mfa/v1/okta-verify/config`; // 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 sets the configuration of an Duo MFA method. * @summary Set duo mfa configuration * @param {MfaDuoConfig} mfaDuoConfig * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ setMFADuoConfigV1: async (mfaDuoConfig: MfaDuoConfig, axiosOptions: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'mfaDuoConfig' is not null or undefined assertParamExists('setMFADuoConfigV1', 'mfaDuoConfig', mfaDuoConfig) const localVarPath = `/mfa/v1/duo-web/config`; // 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(mfaDuoConfig, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), axiosOptions: localVarRequestOptions, }; }, /** * This API sets answers to challenge questions. Any configured questions omitted from the request are removed from user KBA configuration. * @summary Set mfa kba configuration * @param {Array} kbaAnswerRequestItem * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ setMFAKBAConfigV1: async (kbaAnswerRequestItem: Array, axiosOptions: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'kbaAnswerRequestItem' is not null or undefined assertParamExists('setMFAKBAConfigV1', 'kbaAnswerRequestItem', kbaAnswerRequestItem) const localVarPath = `/mfa/v1/kba/config/answers`; // 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(kbaAnswerRequestItem, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), axiosOptions: localVarRequestOptions, }; }, /** * This API sets the configuration of an Okta MFA method. * @summary Set okta mfa configuration * @param {MfaOktaConfig} mfaOktaConfig * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ setMFAOktaConfigV1: async (mfaOktaConfig: MfaOktaConfig, axiosOptions: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'mfaOktaConfig' is not null or undefined assertParamExists('setMFAOktaConfigV1', 'mfaOktaConfig', mfaOktaConfig) const localVarPath = `/mfa/v1/okta-verify/config`; // 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(mfaOktaConfig, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), axiosOptions: localVarRequestOptions, }; }, /** * This API validates that the configuration is valid and will properly authenticate with the MFA provider identified by the method path parameter. * @summary Mfa method\'s test configuration * @param {TestMFAConfigV1MethodEnum} method The name of the MFA method. The currently supported method names are \'okta-verify\' and \'duo-web\'. * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ testMFAConfigV1: async (method: TestMFAConfigV1MethodEnum, axiosOptions: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'method' is not null or undefined assertParamExists('testMFAConfigV1', 'method', method) const localVarPath = `/mfa/v1/{method}/test` .replace(`{${"method"}}`, encodeURIComponent(String(method))); // 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, }; }, } }; /** * MFAConfigurationApi - functional programming interface * @export */ export const MFAConfigurationApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = MFAConfigurationApiAxiosParamCreator(configuration) return { /** * This API returns the configuration of an Duo MFA method. * @summary Configuration of duo mfa method * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ async getMFADuoConfigV1(axiosOptions?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getMFADuoConfigV1(axiosOptions); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['MFAConfigurationApi.getMFADuoConfigV1']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * This API returns the KBA configuration for MFA. * @summary Configuration of kba mfa method * @param {boolean} [allLanguages] Indicator whether the question text should be returned in all configured languages * If true, the question text is returned in all languages that it is configured in. * If false, the question text is returned in the user locale if available, else for the default locale. * If not passed, it behaves the same way as passing this parameter as false * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ async getMFAKbaConfigV1(allLanguages?: boolean, axiosOptions?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.getMFAKbaConfigV1(allLanguages, axiosOptions); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['MFAConfigurationApi.getMFAKbaConfigV1']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * This API returns the configuration of an Okta MFA method. * @summary Configuration of okta mfa method * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ async getMFAOktaConfigV1(axiosOptions?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getMFAOktaConfigV1(axiosOptions); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['MFAConfigurationApi.getMFAOktaConfigV1']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * This API sets the configuration of an Duo MFA method. * @summary Set duo mfa configuration * @param {MfaDuoConfig} mfaDuoConfig * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ async setMFADuoConfigV1(mfaDuoConfig: MfaDuoConfig, axiosOptions?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.setMFADuoConfigV1(mfaDuoConfig, axiosOptions); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['MFAConfigurationApi.setMFADuoConfigV1']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * This API sets answers to challenge questions. Any configured questions omitted from the request are removed from user KBA configuration. * @summary Set mfa kba configuration * @param {Array} kbaAnswerRequestItem * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ async setMFAKBAConfigV1(kbaAnswerRequestItem: Array, axiosOptions?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.setMFAKBAConfigV1(kbaAnswerRequestItem, axiosOptions); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['MFAConfigurationApi.setMFAKBAConfigV1']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * This API sets the configuration of an Okta MFA method. * @summary Set okta mfa configuration * @param {MfaOktaConfig} mfaOktaConfig * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ async setMFAOktaConfigV1(mfaOktaConfig: MfaOktaConfig, axiosOptions?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.setMFAOktaConfigV1(mfaOktaConfig, axiosOptions); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['MFAConfigurationApi.setMFAOktaConfigV1']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * This API validates that the configuration is valid and will properly authenticate with the MFA provider identified by the method path parameter. * @summary Mfa method\'s test configuration * @param {TestMFAConfigV1MethodEnum} method The name of the MFA method. The currently supported method names are \'okta-verify\' and \'duo-web\'. * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ async testMFAConfigV1(method: TestMFAConfigV1MethodEnum, axiosOptions?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testMFAConfigV1(method, axiosOptions); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['MFAConfigurationApi.testMFAConfigV1']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } }; /** * MFAConfigurationApi - factory interface * @export */ export const MFAConfigurationApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = MFAConfigurationApiFp(configuration) return { /** * This API returns the configuration of an Duo MFA method. * @summary Configuration of duo mfa method * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ getMFADuoConfigV1(axiosOptions?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.getMFADuoConfigV1(axiosOptions).then((request) => request(axios, basePath)); }, /** * This API returns the KBA configuration for MFA. * @summary Configuration of kba mfa method * @param {MFAConfigurationApiGetMFAKbaConfigV1Request} requestParameters Request parameters. * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ getMFAKbaConfigV1(requestParameters: MFAConfigurationApiGetMFAKbaConfigV1Request = {}, axiosOptions?: RawAxiosRequestConfig): AxiosPromise> { return localVarFp.getMFAKbaConfigV1(requestParameters.allLanguages, axiosOptions).then((request) => request(axios, basePath)); }, /** * This API returns the configuration of an Okta MFA method. * @summary Configuration of okta mfa method * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ getMFAOktaConfigV1(axiosOptions?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.getMFAOktaConfigV1(axiosOptions).then((request) => request(axios, basePath)); }, /** * This API sets the configuration of an Duo MFA method. * @summary Set duo mfa configuration * @param {MFAConfigurationApiSetMFADuoConfigV1Request} requestParameters Request parameters. * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ setMFADuoConfigV1(requestParameters: MFAConfigurationApiSetMFADuoConfigV1Request, axiosOptions?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.setMFADuoConfigV1(requestParameters.mfaDuoConfig, axiosOptions).then((request) => request(axios, basePath)); }, /** * This API sets answers to challenge questions. Any configured questions omitted from the request are removed from user KBA configuration. * @summary Set mfa kba configuration * @param {MFAConfigurationApiSetMFAKBAConfigV1Request} requestParameters Request parameters. * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ setMFAKBAConfigV1(requestParameters: MFAConfigurationApiSetMFAKBAConfigV1Request, axiosOptions?: RawAxiosRequestConfig): AxiosPromise> { return localVarFp.setMFAKBAConfigV1(requestParameters.kbaAnswerRequestItem, axiosOptions).then((request) => request(axios, basePath)); }, /** * This API sets the configuration of an Okta MFA method. * @summary Set okta mfa configuration * @param {MFAConfigurationApiSetMFAOktaConfigV1Request} requestParameters Request parameters. * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ setMFAOktaConfigV1(requestParameters: MFAConfigurationApiSetMFAOktaConfigV1Request, axiosOptions?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.setMFAOktaConfigV1(requestParameters.mfaOktaConfig, axiosOptions).then((request) => request(axios, basePath)); }, /** * This API validates that the configuration is valid and will properly authenticate with the MFA provider identified by the method path parameter. * @summary Mfa method\'s test configuration * @param {MFAConfigurationApiTestMFAConfigV1Request} requestParameters Request parameters. * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ testMFAConfigV1(requestParameters: MFAConfigurationApiTestMFAConfigV1Request, axiosOptions?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.testMFAConfigV1(requestParameters.method, axiosOptions).then((request) => request(axios, basePath)); }, }; }; /** * Request parameters for getMFAKbaConfigV1 operation in MFAConfigurationApi. * @export * @interface MFAConfigurationApiGetMFAKbaConfigV1Request */ export interface MFAConfigurationApiGetMFAKbaConfigV1Request { /** * Indicator whether the question text should be returned in all configured languages * If true, the question text is returned in all languages that it is configured in. * If false, the question text is returned in the user locale if available, else for the default locale. * If not passed, it behaves the same way as passing this parameter as false * @type {boolean} * @memberof MFAConfigurationApiGetMFAKbaConfigV1 */ readonly allLanguages?: boolean } /** * Request parameters for setMFADuoConfigV1 operation in MFAConfigurationApi. * @export * @interface MFAConfigurationApiSetMFADuoConfigV1Request */ export interface MFAConfigurationApiSetMFADuoConfigV1Request { /** * * @type {MfaDuoConfig} * @memberof MFAConfigurationApiSetMFADuoConfigV1 */ readonly mfaDuoConfig: MfaDuoConfig } /** * Request parameters for setMFAKBAConfigV1 operation in MFAConfigurationApi. * @export * @interface MFAConfigurationApiSetMFAKBAConfigV1Request */ export interface MFAConfigurationApiSetMFAKBAConfigV1Request { /** * * @type {Array} * @memberof MFAConfigurationApiSetMFAKBAConfigV1 */ readonly kbaAnswerRequestItem: Array } /** * Request parameters for setMFAOktaConfigV1 operation in MFAConfigurationApi. * @export * @interface MFAConfigurationApiSetMFAOktaConfigV1Request */ export interface MFAConfigurationApiSetMFAOktaConfigV1Request { /** * * @type {MfaOktaConfig} * @memberof MFAConfigurationApiSetMFAOktaConfigV1 */ readonly mfaOktaConfig: MfaOktaConfig } /** * Request parameters for testMFAConfigV1 operation in MFAConfigurationApi. * @export * @interface MFAConfigurationApiTestMFAConfigV1Request */ export interface MFAConfigurationApiTestMFAConfigV1Request { /** * The name of the MFA method. The currently supported method names are \'okta-verify\' and \'duo-web\'. * @type {'okta-verify' | 'duo-web'} * @memberof MFAConfigurationApiTestMFAConfigV1 */ readonly method: TestMFAConfigV1MethodEnum } /** * MFAConfigurationApi - object-oriented interface * @export * @class MFAConfigurationApi * @extends {BaseAPI} */ export class MFAConfigurationApi extends BaseAPI { /** * This API returns the configuration of an Duo MFA method. * @summary Configuration of duo mfa method * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} * @memberof MFAConfigurationApi */ public getMFADuoConfigV1(axiosOptions?: RawAxiosRequestConfig) { return MFAConfigurationApiFp(this.configuration).getMFADuoConfigV1(axiosOptions).then((request) => request(this.axios, this.basePath)); } /** * This API returns the KBA configuration for MFA. * @summary Configuration of kba mfa method * @param {MFAConfigurationApiGetMFAKbaConfigV1Request} requestParameters Request parameters. * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} * @memberof MFAConfigurationApi */ public getMFAKbaConfigV1(requestParameters: MFAConfigurationApiGetMFAKbaConfigV1Request = {}, axiosOptions?: RawAxiosRequestConfig) { return MFAConfigurationApiFp(this.configuration).getMFAKbaConfigV1(requestParameters.allLanguages, axiosOptions).then((request) => request(this.axios, this.basePath)); } /** * This API returns the configuration of an Okta MFA method. * @summary Configuration of okta mfa method * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} * @memberof MFAConfigurationApi */ public getMFAOktaConfigV1(axiosOptions?: RawAxiosRequestConfig) { return MFAConfigurationApiFp(this.configuration).getMFAOktaConfigV1(axiosOptions).then((request) => request(this.axios, this.basePath)); } /** * This API sets the configuration of an Duo MFA method. * @summary Set duo mfa configuration * @param {MFAConfigurationApiSetMFADuoConfigV1Request} requestParameters Request parameters. * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} * @memberof MFAConfigurationApi */ public setMFADuoConfigV1(requestParameters: MFAConfigurationApiSetMFADuoConfigV1Request, axiosOptions?: RawAxiosRequestConfig) { return MFAConfigurationApiFp(this.configuration).setMFADuoConfigV1(requestParameters.mfaDuoConfig, axiosOptions).then((request) => request(this.axios, this.basePath)); } /** * This API sets answers to challenge questions. Any configured questions omitted from the request are removed from user KBA configuration. * @summary Set mfa kba configuration * @param {MFAConfigurationApiSetMFAKBAConfigV1Request} requestParameters Request parameters. * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} * @memberof MFAConfigurationApi */ public setMFAKBAConfigV1(requestParameters: MFAConfigurationApiSetMFAKBAConfigV1Request, axiosOptions?: RawAxiosRequestConfig) { return MFAConfigurationApiFp(this.configuration).setMFAKBAConfigV1(requestParameters.kbaAnswerRequestItem, axiosOptions).then((request) => request(this.axios, this.basePath)); } /** * This API sets the configuration of an Okta MFA method. * @summary Set okta mfa configuration * @param {MFAConfigurationApiSetMFAOktaConfigV1Request} requestParameters Request parameters. * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} * @memberof MFAConfigurationApi */ public setMFAOktaConfigV1(requestParameters: MFAConfigurationApiSetMFAOktaConfigV1Request, axiosOptions?: RawAxiosRequestConfig) { return MFAConfigurationApiFp(this.configuration).setMFAOktaConfigV1(requestParameters.mfaOktaConfig, axiosOptions).then((request) => request(this.axios, this.basePath)); } /** * This API validates that the configuration is valid and will properly authenticate with the MFA provider identified by the method path parameter. * @summary Mfa method\'s test configuration * @param {MFAConfigurationApiTestMFAConfigV1Request} requestParameters Request parameters. * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} * @memberof MFAConfigurationApi */ public testMFAConfigV1(requestParameters: MFAConfigurationApiTestMFAConfigV1Request, axiosOptions?: RawAxiosRequestConfig) { return MFAConfigurationApiFp(this.configuration).testMFAConfigV1(requestParameters.method, axiosOptions).then((request) => request(this.axios, this.basePath)); } } /** * @export */ export const TestMFAConfigV1MethodEnum = { OktaVerify: 'okta-verify', DuoWeb: 'duo-web' } as const; export type TestMFAConfigV1MethodEnum = typeof TestMFAConfigV1MethodEnum[keyof typeof TestMFAConfigV1MethodEnum];