UNPKG

whalecloud-dxp-api-react-native

Version:

This section explains how to use the SDK and illustrates it with an example: - This chapter is essential to learn - For specific business development, see [Bussiness Scenario](https://www.digchan.info/en-US/dxp/user-sso/sign-up) - The Business Scenario pr

406 lines (366 loc) 21 kB
/* tslint:disable */ /* eslint-disable */ /** * DXP API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: * * * 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'; // @ts-ignore import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base'; // @ts-ignore import type { AcquireOtpResp } from '../models'; // @ts-ignore import type { DxpResponseFinal } from '../models'; // @ts-ignore import type { ReusableVerifyOtpReq } from '../models'; /** * UserManagementLinkApi - axios parameter creator * @export */ export const UserManagementLinkApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * Obtain OTP for user binding customer. * @summary Acquire an OTP for Binding Customer * @param {string} identificationType The type of identification document. * @param {string} identificationNbr The number of the identification document. This is used to uniquely identify the document. * @param {string} [nationality] Nationality. * @param {*} [options] Override http request option. * @throws {RequiredError} */ dxpUserManagementV1UserLinkCustomerOtpGet: async (identificationType: string, identificationNbr: string, nationality?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => { // verify required parameter 'identificationType' is not null or undefined assertParamExists('dxpUserManagementV1UserLinkCustomerOtpGet', 'identificationType', identificationType) // verify required parameter 'identificationNbr' is not null or undefined assertParamExists('dxpUserManagementV1UserLinkCustomerOtpGet', 'identificationNbr', identificationNbr) const localVarPath = `/dxp/user-management/v1/user/link/customer/otp`; // 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; if (identificationType !== undefined) { localVarQueryParameter['identificationType'] = identificationType; } if (identificationNbr !== undefined) { localVarQueryParameter['identificationNbr'] = identificationNbr; } if (nationality !== undefined) { localVarQueryParameter['nationality'] = nationality; } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * User binding customer. * @summary Binding Customer * @param {ReusableVerifyOtpReq} [reusableVerifyOtpReq] * @param {*} [options] Override http request option. * @throws {RequiredError} */ dxpUserManagementV1UserLinkCustomerPost: async (reusableVerifyOtpReq?: ReusableVerifyOtpReq, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => { const localVarPath = `/dxp/user-management/v1/user/link/customer`; // 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; localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(reusableVerifyOtpReq, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Obtain OTP for user unbind customer. * @summary Acquire an OTP for Unbind Customer * @param {*} [options] Override http request option. * @throws {RequiredError} */ dxpUserManagementV1UserUnlinkCustomerOtpGet: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => { const localVarPath = `/dxp/user-management/v1/user/unlink/customer/otp`; // 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; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * User unbind customer. * @summary Unbind Customer * @param {ReusableVerifyOtpReq} [reusableVerifyOtpReq] * @param {*} [options] Override http request option. * @throws {RequiredError} */ dxpUserManagementV1UserUnlinkCustomerPost: async (reusableVerifyOtpReq?: ReusableVerifyOtpReq, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => { const localVarPath = `/dxp/user-management/v1/user/unlink/customer`; // 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; localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(reusableVerifyOtpReq, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, } }; /** * UserManagementLinkApi - functional programming interface * @export */ export const UserManagementLinkApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = UserManagementLinkApiAxiosParamCreator(configuration) return { /** * Obtain OTP for user binding customer. * @summary Acquire an OTP for Binding Customer * @param {string} identificationType The type of identification document. * @param {string} identificationNbr The number of the identification document. This is used to uniquely identify the document. * @param {string} [nationality] Nationality. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async dxpUserManagementV1UserLinkCustomerOtpGet(identificationType: string, identificationNbr: string, nationality?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AcquireOtpResp>> { const localVarAxiosArgs = await localVarAxiosParamCreator.dxpUserManagementV1UserLinkCustomerOtpGet(identificationType, identificationNbr, nationality, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['UserManagementLinkApi.dxpUserManagementV1UserLinkCustomerOtpGet']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * User binding customer. * @summary Binding Customer * @param {ReusableVerifyOtpReq} [reusableVerifyOtpReq] * @param {*} [options] Override http request option. * @throws {RequiredError} */ async dxpUserManagementV1UserLinkCustomerPost(reusableVerifyOtpReq?: ReusableVerifyOtpReq, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DxpResponseFinal>> { const localVarAxiosArgs = await localVarAxiosParamCreator.dxpUserManagementV1UserLinkCustomerPost(reusableVerifyOtpReq, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['UserManagementLinkApi.dxpUserManagementV1UserLinkCustomerPost']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Obtain OTP for user unbind customer. * @summary Acquire an OTP for Unbind Customer * @param {*} [options] Override http request option. * @throws {RequiredError} */ async dxpUserManagementV1UserUnlinkCustomerOtpGet(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AcquireOtpResp>> { const localVarAxiosArgs = await localVarAxiosParamCreator.dxpUserManagementV1UserUnlinkCustomerOtpGet(options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['UserManagementLinkApi.dxpUserManagementV1UserUnlinkCustomerOtpGet']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * User unbind customer. * @summary Unbind Customer * @param {ReusableVerifyOtpReq} [reusableVerifyOtpReq] * @param {*} [options] Override http request option. * @throws {RequiredError} */ async dxpUserManagementV1UserUnlinkCustomerPost(reusableVerifyOtpReq?: ReusableVerifyOtpReq, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DxpResponseFinal>> { const localVarAxiosArgs = await localVarAxiosParamCreator.dxpUserManagementV1UserUnlinkCustomerPost(reusableVerifyOtpReq, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['UserManagementLinkApi.dxpUserManagementV1UserUnlinkCustomerPost']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } }; /** * UserManagementLinkApi - factory interface * @export */ export const UserManagementLinkApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = UserManagementLinkApiFp(configuration) return { /** * Obtain OTP for user binding customer. * @summary Acquire an OTP for Binding Customer * @param {string} identificationType The type of identification document. * @param {string} identificationNbr The number of the identification document. This is used to uniquely identify the document. * @param {string} [nationality] Nationality. * @param {*} [options] Override http request option. * @throws {RequiredError} */ dxpUserManagementV1UserLinkCustomerOtpGet(identificationType: string, identificationNbr: string, nationality?: string, options?: any): AxiosPromise<AcquireOtpResp> { return localVarFp.dxpUserManagementV1UserLinkCustomerOtpGet(identificationType, identificationNbr, nationality, options).then((request) => request(axios, basePath)); }, /** * User binding customer. * @summary Binding Customer * @param {ReusableVerifyOtpReq} [reusableVerifyOtpReq] * @param {*} [options] Override http request option. * @throws {RequiredError} */ dxpUserManagementV1UserLinkCustomerPost(reusableVerifyOtpReq?: ReusableVerifyOtpReq, options?: any): AxiosPromise<DxpResponseFinal> { return localVarFp.dxpUserManagementV1UserLinkCustomerPost(reusableVerifyOtpReq, options).then((request) => request(axios, basePath)); }, /** * Obtain OTP for user unbind customer. * @summary Acquire an OTP for Unbind Customer * @param {*} [options] Override http request option. * @throws {RequiredError} */ dxpUserManagementV1UserUnlinkCustomerOtpGet(options?: any): AxiosPromise<AcquireOtpResp> { return localVarFp.dxpUserManagementV1UserUnlinkCustomerOtpGet(options).then((request) => request(axios, basePath)); }, /** * User unbind customer. * @summary Unbind Customer * @param {ReusableVerifyOtpReq} [reusableVerifyOtpReq] * @param {*} [options] Override http request option. * @throws {RequiredError} */ dxpUserManagementV1UserUnlinkCustomerPost(reusableVerifyOtpReq?: ReusableVerifyOtpReq, options?: any): AxiosPromise<DxpResponseFinal> { return localVarFp.dxpUserManagementV1UserUnlinkCustomerPost(reusableVerifyOtpReq, options).then((request) => request(axios, basePath)); }, }; }; /** * UserManagementLinkApi - interface * @export * @interface UserManagementLinkApi */ export interface UserManagementLinkApiInterface { /** * Obtain OTP for user binding customer. * @summary Acquire an OTP for Binding Customer * @param {string} identificationType The type of identification document. * @param {string} identificationNbr The number of the identification document. This is used to uniquely identify the document. * @param {string} [nationality] Nationality. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof UserManagementLinkApiInterface */ dxpUserManagementV1UserLinkCustomerOtpGet(identificationType: string, identificationNbr: string, nationality?: string, options?: RawAxiosRequestConfig): AxiosPromise<AcquireOtpResp>; /** * User binding customer. * @summary Binding Customer * @param {ReusableVerifyOtpReq} [reusableVerifyOtpReq] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof UserManagementLinkApiInterface */ dxpUserManagementV1UserLinkCustomerPost(reusableVerifyOtpReq?: ReusableVerifyOtpReq, options?: RawAxiosRequestConfig): AxiosPromise<DxpResponseFinal>; /** * Obtain OTP for user unbind customer. * @summary Acquire an OTP for Unbind Customer * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof UserManagementLinkApiInterface */ dxpUserManagementV1UserUnlinkCustomerOtpGet(options?: RawAxiosRequestConfig): AxiosPromise<AcquireOtpResp>; /** * User unbind customer. * @summary Unbind Customer * @param {ReusableVerifyOtpReq} [reusableVerifyOtpReq] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof UserManagementLinkApiInterface */ dxpUserManagementV1UserUnlinkCustomerPost(reusableVerifyOtpReq?: ReusableVerifyOtpReq, options?: RawAxiosRequestConfig): AxiosPromise<DxpResponseFinal>; } /** * UserManagementLinkApi - object-oriented interface * @export * @class UserManagementLinkApi * @extends {BaseAPI} */ export class UserManagementLinkApi extends BaseAPI implements UserManagementLinkApiInterface { /** * Obtain OTP for user binding customer. * @summary Acquire an OTP for Binding Customer * @param {string} identificationType The type of identification document. * @param {string} identificationNbr The number of the identification document. This is used to uniquely identify the document. * @param {string} [nationality] Nationality. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof UserManagementLinkApi */ public dxpUserManagementV1UserLinkCustomerOtpGet(identificationType: string, identificationNbr: string, nationality?: string, options?: RawAxiosRequestConfig) { return UserManagementLinkApiFp(this.configuration).dxpUserManagementV1UserLinkCustomerOtpGet(identificationType, identificationNbr, nationality, options).then((request) => request(this.axios, this.basePath)); } /** * User binding customer. * @summary Binding Customer * @param {ReusableVerifyOtpReq} [reusableVerifyOtpReq] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof UserManagementLinkApi */ public dxpUserManagementV1UserLinkCustomerPost(reusableVerifyOtpReq?: ReusableVerifyOtpReq, options?: RawAxiosRequestConfig) { return UserManagementLinkApiFp(this.configuration).dxpUserManagementV1UserLinkCustomerPost(reusableVerifyOtpReq, options).then((request) => request(this.axios, this.basePath)); } /** * Obtain OTP for user unbind customer. * @summary Acquire an OTP for Unbind Customer * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof UserManagementLinkApi */ public dxpUserManagementV1UserUnlinkCustomerOtpGet(options?: RawAxiosRequestConfig) { return UserManagementLinkApiFp(this.configuration).dxpUserManagementV1UserUnlinkCustomerOtpGet(options).then((request) => request(this.axios, this.basePath)); } /** * User unbind customer. * @summary Unbind Customer * @param {ReusableVerifyOtpReq} [reusableVerifyOtpReq] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof UserManagementLinkApi */ public dxpUserManagementV1UserUnlinkCustomerPost(reusableVerifyOtpReq?: ReusableVerifyOtpReq, options?: RawAxiosRequestConfig) { return UserManagementLinkApiFp(this.configuration).dxpUserManagementV1UserUnlinkCustomerPost(reusableVerifyOtpReq, options).then((request) => request(this.axios, this.basePath)); } }