/* tslint:disable */ /* eslint-disable */ /** * Credify API doc version 2 * API documentations 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'; /** * KYCApi - axios parameter creator * @export */ export const KYCApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * This is a proxy base URL of VNPT eKYC API. - https://ekyc.vnpt.vn/admin-dashboard/en/documents/api#6-api-extracting-paper-information- - https://ekyc.vnpt.vn/admin-dashboard/en/documents/api#7-api-comparing-the-face-on-paper-with-the-portrait-face - https://ekyc.vnpt.vn/admin-dashboard/en/documents/api#8-check-the-real-face * @summary VNPT Proxy * @param {string} xIntentId Intent ID of the current context * @param {*} [options] Override http request option. * @throws {RequiredError} */ requestVnptEkyc: async (xIntentId: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'xIntentId' is not null or undefined assertParamExists('requestVnptEkyc', 'xIntentId', xIntentId) const localVarPath = `/v2/private/ekyc/vnpt`; // 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) if (xIntentId !== undefined && xIntentId !== null) { localVarHeaderParameter['X-Intent-Id'] = String(xIntentId); } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, } }; /** * KYCApi - functional programming interface * @export */ export const KYCApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = KYCApiAxiosParamCreator(configuration) return { /** * This is a proxy base URL of VNPT eKYC API. - https://ekyc.vnpt.vn/admin-dashboard/en/documents/api#6-api-extracting-paper-information- - https://ekyc.vnpt.vn/admin-dashboard/en/documents/api#7-api-comparing-the-face-on-paper-with-the-portrait-face - https://ekyc.vnpt.vn/admin-dashboard/en/documents/api#8-check-the-real-face * @summary VNPT Proxy * @param {string} xIntentId Intent ID of the current context * @param {*} [options] Override http request option. * @throws {RequiredError} */ async requestVnptEkyc(xIntentId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.requestVnptEkyc(xIntentId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, } }; /** * KYCApi - factory interface * @export */ export const KYCApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = KYCApiFp(configuration) return { /** * This is a proxy base URL of VNPT eKYC API. - https://ekyc.vnpt.vn/admin-dashboard/en/documents/api#6-api-extracting-paper-information- - https://ekyc.vnpt.vn/admin-dashboard/en/documents/api#7-api-comparing-the-face-on-paper-with-the-portrait-face - https://ekyc.vnpt.vn/admin-dashboard/en/documents/api#8-check-the-real-face * @summary VNPT Proxy * @param {string} xIntentId Intent ID of the current context * @param {*} [options] Override http request option. * @throws {RequiredError} */ requestVnptEkyc(xIntentId: string, options?: any): AxiosPromise { return localVarFp.requestVnptEkyc(xIntentId, options).then((request) => request(axios, basePath)); }, }; }; /** * KYCApi - interface * @export * @interface KYCApi */ export interface KYCApiInterface { /** * This is a proxy base URL of VNPT eKYC API. - https://ekyc.vnpt.vn/admin-dashboard/en/documents/api#6-api-extracting-paper-information- - https://ekyc.vnpt.vn/admin-dashboard/en/documents/api#7-api-comparing-the-face-on-paper-with-the-portrait-face - https://ekyc.vnpt.vn/admin-dashboard/en/documents/api#8-check-the-real-face * @summary VNPT Proxy * @param {string} xIntentId Intent ID of the current context * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof KYCApiInterface */ requestVnptEkyc(xIntentId: string, options?: AxiosRequestConfig): AxiosPromise; } /** * KYCApi - object-oriented interface * @export * @class KYCApi * @extends {BaseAPI} */ export class KYCApi extends BaseAPI implements KYCApiInterface { /** * This is a proxy base URL of VNPT eKYC API. - https://ekyc.vnpt.vn/admin-dashboard/en/documents/api#6-api-extracting-paper-information- - https://ekyc.vnpt.vn/admin-dashboard/en/documents/api#7-api-comparing-the-face-on-paper-with-the-portrait-face - https://ekyc.vnpt.vn/admin-dashboard/en/documents/api#8-check-the-real-face * @summary VNPT Proxy * @param {string} xIntentId Intent ID of the current context * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof KYCApi */ public requestVnptEkyc(xIntentId: string, options?: AxiosRequestConfig) { return KYCApiFp(this.configuration).requestVnptEkyc(xIntentId, options).then((request) => request(this.axios, this.basePath)); } }