/* tslint:disable */ /* eslint-disable */ /** * Identity Security Cloud API - Auth Profile * 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 ArrayInner */ export interface ArrayInner { } /** * * @export * @interface AuthProfile */ export interface AuthProfile { /** * Authentication Profile name. * @type {string} * @memberof AuthProfile */ 'name'?: string; /** * Use it to block access from off network. * @type {boolean} * @memberof AuthProfile */ 'offNetwork'?: boolean; /** * Use it to block access from untrusted geoographies. * @type {boolean} * @memberof AuthProfile */ 'untrustedGeography'?: boolean; /** * Application ID. * @type {string} * @memberof AuthProfile */ 'applicationId'?: string | null; /** * Application name. * @type {string} * @memberof AuthProfile */ 'applicationName'?: string | null; /** * Type of the Authentication Profile. * @type {string} * @memberof AuthProfile */ 'type'?: AuthProfileTypeEnum; /** * Use it to enable strong authentication. * @type {boolean} * @memberof AuthProfile */ 'strongAuthLogin'?: boolean; } export const AuthProfileTypeEnum = { Block: 'BLOCK', Mfa: 'MFA', NonPta: 'NON_PTA', Pta: 'PTA' } as const; export type AuthProfileTypeEnum = typeof AuthProfileTypeEnum[keyof typeof AuthProfileTypeEnum]; /** * * @export * @interface AuthProfileSummary */ export interface AuthProfileSummary { /** * Tenant name. * @type {string} * @memberof AuthProfileSummary */ 'tenant'?: string; /** * Identity ID. * @type {string} * @memberof AuthProfileSummary */ 'id'?: string; } /** * * @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 GetProfileConfigListV1401Response */ export interface GetProfileConfigListV1401Response { /** * A message describing the error * @type {any} * @memberof GetProfileConfigListV1401Response */ 'error'?: any; } /** * * @export * @interface GetProfileConfigListV1429Response */ export interface GetProfileConfigListV1429Response { /** * A message describing the error * @type {any} * @memberof GetProfileConfigListV1429Response */ 'message'?: any; } /** * A JSONPatch Operation as defined by [RFC 6902 - JSON Patch](https://tools.ietf.org/html/rfc6902) * @export * @interface JsonPatchOperation */ export interface JsonPatchOperation { /** * The operation to be performed * @type {string} * @memberof JsonPatchOperation */ 'op': JsonPatchOperationOpEnum; /** * A string JSON Pointer representing the target path to an element to be affected by the operation * @type {string} * @memberof JsonPatchOperation */ 'path': string; /** * * @type {JsonPatchOperationValue} * @memberof JsonPatchOperation */ 'value'?: JsonPatchOperationValue; } export const JsonPatchOperationOpEnum = { Add: 'add', Remove: 'remove', Replace: 'replace', Move: 'move', Copy: 'copy', Test: 'test' } as const; export type JsonPatchOperationOpEnum = typeof JsonPatchOperationOpEnum[keyof typeof JsonPatchOperationOpEnum]; /** * @type JsonPatchOperationValue * The value to be used for the operation, required for \"add\" and \"replace\" operations * @export */ export type JsonPatchOperationValue = Array | boolean | number | object | 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]; /** * AuthProfileApi - axios parameter creator * @export */ export const AuthProfileApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * This API returns a list of auth profiles. * @summary Get list of auth profiles * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ getProfileConfigListV1: async (axiosOptions: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/auth-profiles/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 returns auth profile information. * @summary Get auth profile * @param {string} id ID of the Auth Profile to patch. * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ getProfileConfigV1: async (id: string, axiosOptions: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('getProfileConfigV1', 'id', id) const localVarPath = `/auth-profiles/v1/{id}` .replace(`{${"id"}}`, encodeURIComponent(String(id))); // 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 an existing Auth Profile. The following fields are patchable: **offNetwork**, **untrustedGeography**, **applicationId**, **applicationName**, **type** * @summary Patch a specified auth profile * @param {string} id ID of the Auth Profile to patch. * @param {Array} jsonPatchOperation * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ patchProfileConfigV1: async (id: string, jsonPatchOperation: Array, axiosOptions: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('patchProfileConfigV1', 'id', id) // verify required parameter 'jsonPatchOperation' is not null or undefined assertParamExists('patchProfileConfigV1', 'jsonPatchOperation', jsonPatchOperation) const localVarPath = `/auth-profiles/v1/{id}` .replace(`{${"id"}}`, encodeURIComponent(String(id))); // 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: 'PATCH', ...baseOptions, ...axiosOptions}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; localVarHeaderParameter['Content-Type'] = 'application/json-patch+json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...axiosOptions.headers}; localVarRequestOptions.data = serializeDataIfNeeded(jsonPatchOperation, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), axiosOptions: localVarRequestOptions, }; }, } }; /** * AuthProfileApi - functional programming interface * @export */ export const AuthProfileApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = AuthProfileApiAxiosParamCreator(configuration) return { /** * This API returns a list of auth profiles. * @summary Get list of auth profiles * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ async getProfileConfigListV1(axiosOptions?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.getProfileConfigListV1(axiosOptions); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['AuthProfileApi.getProfileConfigListV1']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * This API returns auth profile information. * @summary Get auth profile * @param {string} id ID of the Auth Profile to patch. * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ async getProfileConfigV1(id: string, axiosOptions?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getProfileConfigV1(id, axiosOptions); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['AuthProfileApi.getProfileConfigV1']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * This API updates an existing Auth Profile. The following fields are patchable: **offNetwork**, **untrustedGeography**, **applicationId**, **applicationName**, **type** * @summary Patch a specified auth profile * @param {string} id ID of the Auth Profile to patch. * @param {Array} jsonPatchOperation * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ async patchProfileConfigV1(id: string, jsonPatchOperation: Array, axiosOptions?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.patchProfileConfigV1(id, jsonPatchOperation, axiosOptions); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['AuthProfileApi.patchProfileConfigV1']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } }; /** * AuthProfileApi - factory interface * @export */ export const AuthProfileApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = AuthProfileApiFp(configuration) return { /** * This API returns a list of auth profiles. * @summary Get list of auth profiles * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ getProfileConfigListV1(axiosOptions?: RawAxiosRequestConfig): AxiosPromise> { return localVarFp.getProfileConfigListV1(axiosOptions).then((request) => request(axios, basePath)); }, /** * This API returns auth profile information. * @summary Get auth profile * @param {AuthProfileApiGetProfileConfigV1Request} requestParameters Request parameters. * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ getProfileConfigV1(requestParameters: AuthProfileApiGetProfileConfigV1Request, axiosOptions?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.getProfileConfigV1(requestParameters.id, axiosOptions).then((request) => request(axios, basePath)); }, /** * This API updates an existing Auth Profile. The following fields are patchable: **offNetwork**, **untrustedGeography**, **applicationId**, **applicationName**, **type** * @summary Patch a specified auth profile * @param {AuthProfileApiPatchProfileConfigV1Request} requestParameters Request parameters. * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ patchProfileConfigV1(requestParameters: AuthProfileApiPatchProfileConfigV1Request, axiosOptions?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.patchProfileConfigV1(requestParameters.id, requestParameters.jsonPatchOperation, axiosOptions).then((request) => request(axios, basePath)); }, }; }; /** * Request parameters for getProfileConfigV1 operation in AuthProfileApi. * @export * @interface AuthProfileApiGetProfileConfigV1Request */ export interface AuthProfileApiGetProfileConfigV1Request { /** * ID of the Auth Profile to patch. * @type {string} * @memberof AuthProfileApiGetProfileConfigV1 */ readonly id: string } /** * Request parameters for patchProfileConfigV1 operation in AuthProfileApi. * @export * @interface AuthProfileApiPatchProfileConfigV1Request */ export interface AuthProfileApiPatchProfileConfigV1Request { /** * ID of the Auth Profile to patch. * @type {string} * @memberof AuthProfileApiPatchProfileConfigV1 */ readonly id: string /** * * @type {Array} * @memberof AuthProfileApiPatchProfileConfigV1 */ readonly jsonPatchOperation: Array } /** * AuthProfileApi - object-oriented interface * @export * @class AuthProfileApi * @extends {BaseAPI} */ export class AuthProfileApi extends BaseAPI { /** * This API returns a list of auth profiles. * @summary Get list of auth profiles * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} * @memberof AuthProfileApi */ public getProfileConfigListV1(axiosOptions?: RawAxiosRequestConfig) { return AuthProfileApiFp(this.configuration).getProfileConfigListV1(axiosOptions).then((request) => request(this.axios, this.basePath)); } /** * This API returns auth profile information. * @summary Get auth profile * @param {AuthProfileApiGetProfileConfigV1Request} requestParameters Request parameters. * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} * @memberof AuthProfileApi */ public getProfileConfigV1(requestParameters: AuthProfileApiGetProfileConfigV1Request, axiosOptions?: RawAxiosRequestConfig) { return AuthProfileApiFp(this.configuration).getProfileConfigV1(requestParameters.id, axiosOptions).then((request) => request(this.axios, this.basePath)); } /** * This API updates an existing Auth Profile. The following fields are patchable: **offNetwork**, **untrustedGeography**, **applicationId**, **applicationName**, **type** * @summary Patch a specified auth profile * @param {AuthProfileApiPatchProfileConfigV1Request} requestParameters Request parameters. * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} * @memberof AuthProfileApi */ public patchProfileConfigV1(requestParameters: AuthProfileApiPatchProfileConfigV1Request, axiosOptions?: RawAxiosRequestConfig) { return AuthProfileApiFp(this.configuration).patchProfileConfigV1(requestParameters.id, requestParameters.jsonPatchOperation, axiosOptions).then((request) => request(this.axios, this.basePath)); } }