/* tslint:disable */ /* eslint-disable */ /** * Credify external API doc v2 * API documentations for integration version 2. * * The version of the OpenAPI document: 1.0.0-oas3 * Contact: dev@credify.one * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; import { Configuration } from '../configuration'; // 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'; // @ts-ignore import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base'; // @ts-ignore import { APIErrorV2 } from '../model'; // @ts-ignore import { ClientFeedbackRequest } from '../model'; // @ts-ignore import { IntrospectionRequest } from '../model'; // @ts-ignore import { IntrospectionResponse } from '../model'; // @ts-ignore import { JWKS } from '../model'; /** * DefaultOrganizationApi - axios parameter creator * @export */ export const DefaultOrganizationApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * This returns public key of signing and encryption. * @summary Gets public key * @param {string} entityId * @param {*} [options] Override http request option. * @throws {RequiredError} */ getPublicKey: async (entityId: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'entityId' is not null or undefined assertParamExists('getPublicKey', 'entityId', entityId) const localVarPath = `/v2/integration/entities/{entity_id}/jwks` .replace(`{${"entity_id"}}`, encodeURIComponent(String(entityId))); // 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, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication bearerAuth required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * The introspection endpoint allows to check if a token (both refresh and access) is active or not. An active token is neither expired nor revoked. If a token is active, additional information on the token will be included. * @summary Token introspection * @param {IntrospectionRequest} introspectionRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ introspectToken: async (introspectionRequest: IntrospectionRequest, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'introspectionRequest' is not null or undefined assertParamExists('introspectToken', 'introspectionRequest', introspectionRequest) const localVarPath = `/v2/oauth2/introspect`; // 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, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication bearerAuth required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = introspectionRequest return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This sends feedback of the user from client and will forward to support email of the system. * @summary User feedback * @param {ClientFeedbackRequest} clientFeedbackRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ sendUserFeedback: async (clientFeedbackRequest: ClientFeedbackRequest, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'clientFeedbackRequest' is not null or undefined assertParamExists('sendUserFeedback', 'clientFeedbackRequest', clientFeedbackRequest) const localVarPath = `/v2/integration/organization/feedbacks`; // 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, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication bearerAuth required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = clientFeedbackRequest return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, } }; /** * DefaultOrganizationApi - functional programming interface * @export */ export const DefaultOrganizationApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = DefaultOrganizationApiAxiosParamCreator(configuration) return { /** * This returns public key of signing and encryption. * @summary Gets public key * @param {string} entityId * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getPublicKey(entityId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getPublicKey(entityId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * The introspection endpoint allows to check if a token (both refresh and access) is active or not. An active token is neither expired nor revoked. If a token is active, additional information on the token will be included. * @summary Token introspection * @param {IntrospectionRequest} introspectionRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ async introspectToken(introspectionRequest: IntrospectionRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.introspectToken(introspectionRequest, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This sends feedback of the user from client and will forward to support email of the system. * @summary User feedback * @param {ClientFeedbackRequest} clientFeedbackRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ async sendUserFeedback(clientFeedbackRequest: ClientFeedbackRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.sendUserFeedback(clientFeedbackRequest, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, } }; /** * DefaultOrganizationApi - factory interface * @export */ export const DefaultOrganizationApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = DefaultOrganizationApiFp(configuration) return { /** * This returns public key of signing and encryption. * @summary Gets public key * @param {string} entityId * @param {*} [options] Override http request option. * @throws {RequiredError} */ getPublicKey(entityId: string, options?: any): AxiosPromise { return localVarFp.getPublicKey(entityId, options).then((request) => request(axios, basePath)); }, /** * The introspection endpoint allows to check if a token (both refresh and access) is active or not. An active token is neither expired nor revoked. If a token is active, additional information on the token will be included. * @summary Token introspection * @param {IntrospectionRequest} introspectionRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ introspectToken(introspectionRequest: IntrospectionRequest, options?: any): AxiosPromise { return localVarFp.introspectToken(introspectionRequest, options).then((request) => request(axios, basePath)); }, /** * This sends feedback of the user from client and will forward to support email of the system. * @summary User feedback * @param {ClientFeedbackRequest} clientFeedbackRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ sendUserFeedback(clientFeedbackRequest: ClientFeedbackRequest, options?: any): AxiosPromise { return localVarFp.sendUserFeedback(clientFeedbackRequest, options).then((request) => request(axios, basePath)); }, }; }; /** * DefaultOrganizationApi - interface * @export * @interface DefaultOrganizationApi */ export interface DefaultOrganizationApiInterface { /** * This returns public key of signing and encryption. * @summary Gets public key * @param {string} entityId * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DefaultOrganizationApiInterface */ getPublicKey(entityId: string, options?: AxiosRequestConfig): AxiosPromise; /** * The introspection endpoint allows to check if a token (both refresh and access) is active or not. An active token is neither expired nor revoked. If a token is active, additional information on the token will be included. * @summary Token introspection * @param {IntrospectionRequest} introspectionRequest * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DefaultOrganizationApiInterface */ introspectToken(introspectionRequest: IntrospectionRequest, options?: AxiosRequestConfig): AxiosPromise; /** * This sends feedback of the user from client and will forward to support email of the system. * @summary User feedback * @param {ClientFeedbackRequest} clientFeedbackRequest * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DefaultOrganizationApiInterface */ sendUserFeedback(clientFeedbackRequest: ClientFeedbackRequest, options?: AxiosRequestConfig): AxiosPromise; } /** * DefaultOrganizationApi - object-oriented interface * @export * @class DefaultOrganizationApi * @extends {BaseAPI} */ export class DefaultOrganizationApi extends BaseAPI implements DefaultOrganizationApiInterface { /** * This returns public key of signing and encryption. * @summary Gets public key * @param {string} entityId * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DefaultOrganizationApi */ public getPublicKey(entityId: string, options?: AxiosRequestConfig) { return DefaultOrganizationApiFp(this.configuration).getPublicKey(entityId, options).then((request) => request(this.axios, this.basePath)); } /** * The introspection endpoint allows to check if a token (both refresh and access) is active or not. An active token is neither expired nor revoked. If a token is active, additional information on the token will be included. * @summary Token introspection * @param {IntrospectionRequest} introspectionRequest * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DefaultOrganizationApi */ public introspectToken(introspectionRequest: IntrospectionRequest, options?: AxiosRequestConfig) { return DefaultOrganizationApiFp(this.configuration).introspectToken(introspectionRequest, options).then((request) => request(this.axios, this.basePath)); } /** * This sends feedback of the user from client and will forward to support email of the system. * @summary User feedback * @param {ClientFeedbackRequest} clientFeedbackRequest * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DefaultOrganizationApi */ public sendUserFeedback(clientFeedbackRequest: ClientFeedbackRequest, options?: AxiosRequestConfig) { return DefaultOrganizationApiFp(this.configuration).sendUserFeedback(clientFeedbackRequest, options).then((request) => request(this.axios, this.basePath)); } }