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

278 lines (253 loc) 15.9 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 { DxpSingleResponseFinal } from '../models'; // @ts-ignore import type { ObtainSMSOTPResp } from '../models'; /** * CommonManagementApi - axios parameter creator * @export */ export const CommonManagementApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * Obtain SMS OTP. * @summary Obtain SMS OTP * @param {string} serviceNumber The service number associated with the subscriber. * @param {DxpCommonManagementV1OtpGetBusinessTypeEnum} businessType Type of business scenario. Possible values are: / register-Register; / login-Login; / resetPassword-Reset Password; / modAcct-Modify Account; / changePlan-Change Plan; / qryCdrUsage-Query CDR Usage; / newConnection-New Connection; / transfer-Transfer; / createCase-Create Case; / qrySimCard-Query SIM Card; / qryOrder-Query Order; / recharge-Recharge; / pointExchange-Point Exchange; / loan-Loan; / setVas-Set Value-Added Service; / cancelVas-Cancel Value-Added Service; / suspension-Suspension; / reactivation-Reactivation; / switchSubs-Switch Subscription * @param {string} [prefix] The prefix associated with the subscriber\&#39;s service number. * @param {*} [options] Override http request option. * @throws {RequiredError} */ dxpCommonManagementV1OtpGet: async (serviceNumber: string, businessType: DxpCommonManagementV1OtpGetBusinessTypeEnum, prefix?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => { // verify required parameter 'serviceNumber' is not null or undefined assertParamExists('dxpCommonManagementV1OtpGet', 'serviceNumber', serviceNumber) // verify required parameter 'businessType' is not null or undefined assertParamExists('dxpCommonManagementV1OtpGet', 'businessType', businessType) const localVarPath = `/dxp/common-management/v1/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 (prefix !== undefined) { localVarQueryParameter['prefix'] = prefix; } if (serviceNumber !== undefined) { localVarQueryParameter['serviceNumber'] = serviceNumber; } if (businessType !== undefined) { localVarQueryParameter['businessType'] = businessType; } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Query Remote Configs * @summary Query Remote Configs * @param {string} [configCodes] List of remote config codes, separated by commas. * @param {*} [options] Override http request option. * @throws {RequiredError} */ dxpCommonManagementV1RemoteConfigsGet: async (configCodes?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => { const localVarPath = `/dxp/common-management/v1/remote-configs`; // 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 (configCodes !== undefined) { localVarQueryParameter['configCodes'] = configCodes; } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, } }; /** * CommonManagementApi - functional programming interface * @export */ export const CommonManagementApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = CommonManagementApiAxiosParamCreator(configuration) return { /** * Obtain SMS OTP. * @summary Obtain SMS OTP * @param {string} serviceNumber The service number associated with the subscriber. * @param {DxpCommonManagementV1OtpGetBusinessTypeEnum} businessType Type of business scenario. Possible values are: / register-Register; / login-Login; / resetPassword-Reset Password; / modAcct-Modify Account; / changePlan-Change Plan; / qryCdrUsage-Query CDR Usage; / newConnection-New Connection; / transfer-Transfer; / createCase-Create Case; / qrySimCard-Query SIM Card; / qryOrder-Query Order; / recharge-Recharge; / pointExchange-Point Exchange; / loan-Loan; / setVas-Set Value-Added Service; / cancelVas-Cancel Value-Added Service; / suspension-Suspension; / reactivation-Reactivation; / switchSubs-Switch Subscription * @param {string} [prefix] The prefix associated with the subscriber\&#39;s service number. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async dxpCommonManagementV1OtpGet(serviceNumber: string, businessType: DxpCommonManagementV1OtpGetBusinessTypeEnum, prefix?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ObtainSMSOTPResp>> { const localVarAxiosArgs = await localVarAxiosParamCreator.dxpCommonManagementV1OtpGet(serviceNumber, businessType, prefix, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['CommonManagementApi.dxpCommonManagementV1OtpGet']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Query Remote Configs * @summary Query Remote Configs * @param {string} [configCodes] List of remote config codes, separated by commas. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async dxpCommonManagementV1RemoteConfigsGet(configCodes?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DxpSingleResponseFinal>> { const localVarAxiosArgs = await localVarAxiosParamCreator.dxpCommonManagementV1RemoteConfigsGet(configCodes, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['CommonManagementApi.dxpCommonManagementV1RemoteConfigsGet']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } }; /** * CommonManagementApi - factory interface * @export */ export const CommonManagementApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = CommonManagementApiFp(configuration) return { /** * Obtain SMS OTP. * @summary Obtain SMS OTP * @param {string} serviceNumber The service number associated with the subscriber. * @param {DxpCommonManagementV1OtpGetBusinessTypeEnum} businessType Type of business scenario. Possible values are: / register-Register; / login-Login; / resetPassword-Reset Password; / modAcct-Modify Account; / changePlan-Change Plan; / qryCdrUsage-Query CDR Usage; / newConnection-New Connection; / transfer-Transfer; / createCase-Create Case; / qrySimCard-Query SIM Card; / qryOrder-Query Order; / recharge-Recharge; / pointExchange-Point Exchange; / loan-Loan; / setVas-Set Value-Added Service; / cancelVas-Cancel Value-Added Service; / suspension-Suspension; / reactivation-Reactivation; / switchSubs-Switch Subscription * @param {string} [prefix] The prefix associated with the subscriber\&#39;s service number. * @param {*} [options] Override http request option. * @throws {RequiredError} */ dxpCommonManagementV1OtpGet(serviceNumber: string, businessType: DxpCommonManagementV1OtpGetBusinessTypeEnum, prefix?: string, options?: any): AxiosPromise<ObtainSMSOTPResp> { return localVarFp.dxpCommonManagementV1OtpGet(serviceNumber, businessType, prefix, options).then((request) => request(axios, basePath)); }, /** * Query Remote Configs * @summary Query Remote Configs * @param {string} [configCodes] List of remote config codes, separated by commas. * @param {*} [options] Override http request option. * @throws {RequiredError} */ dxpCommonManagementV1RemoteConfigsGet(configCodes?: string, options?: any): AxiosPromise<DxpSingleResponseFinal> { return localVarFp.dxpCommonManagementV1RemoteConfigsGet(configCodes, options).then((request) => request(axios, basePath)); }, }; }; /** * CommonManagementApi - interface * @export * @interface CommonManagementApi */ export interface CommonManagementApiInterface { /** * Obtain SMS OTP. * @summary Obtain SMS OTP * @param {string} serviceNumber The service number associated with the subscriber. * @param {DxpCommonManagementV1OtpGetBusinessTypeEnum} businessType Type of business scenario. Possible values are: / register-Register; / login-Login; / resetPassword-Reset Password; / modAcct-Modify Account; / changePlan-Change Plan; / qryCdrUsage-Query CDR Usage; / newConnection-New Connection; / transfer-Transfer; / createCase-Create Case; / qrySimCard-Query SIM Card; / qryOrder-Query Order; / recharge-Recharge; / pointExchange-Point Exchange; / loan-Loan; / setVas-Set Value-Added Service; / cancelVas-Cancel Value-Added Service; / suspension-Suspension; / reactivation-Reactivation; / switchSubs-Switch Subscription * @param {string} [prefix] The prefix associated with the subscriber\&#39;s service number. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CommonManagementApiInterface */ dxpCommonManagementV1OtpGet(serviceNumber: string, businessType: DxpCommonManagementV1OtpGetBusinessTypeEnum, prefix?: string, options?: RawAxiosRequestConfig): AxiosPromise<ObtainSMSOTPResp>; /** * Query Remote Configs * @summary Query Remote Configs * @param {string} [configCodes] List of remote config codes, separated by commas. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CommonManagementApiInterface */ dxpCommonManagementV1RemoteConfigsGet(configCodes?: string, options?: RawAxiosRequestConfig): AxiosPromise<DxpSingleResponseFinal>; } /** * CommonManagementApi - object-oriented interface * @export * @class CommonManagementApi * @extends {BaseAPI} */ export class CommonManagementApi extends BaseAPI implements CommonManagementApiInterface { /** * Obtain SMS OTP. * @summary Obtain SMS OTP * @param {string} serviceNumber The service number associated with the subscriber. * @param {DxpCommonManagementV1OtpGetBusinessTypeEnum} businessType Type of business scenario. Possible values are: / register-Register; / login-Login; / resetPassword-Reset Password; / modAcct-Modify Account; / changePlan-Change Plan; / qryCdrUsage-Query CDR Usage; / newConnection-New Connection; / transfer-Transfer; / createCase-Create Case; / qrySimCard-Query SIM Card; / qryOrder-Query Order; / recharge-Recharge; / pointExchange-Point Exchange; / loan-Loan; / setVas-Set Value-Added Service; / cancelVas-Cancel Value-Added Service; / suspension-Suspension; / reactivation-Reactivation; / switchSubs-Switch Subscription * @param {string} [prefix] The prefix associated with the subscriber\&#39;s service number. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CommonManagementApi */ public dxpCommonManagementV1OtpGet(serviceNumber: string, businessType: DxpCommonManagementV1OtpGetBusinessTypeEnum, prefix?: string, options?: RawAxiosRequestConfig) { return CommonManagementApiFp(this.configuration).dxpCommonManagementV1OtpGet(serviceNumber, businessType, prefix, options).then((request) => request(this.axios, this.basePath)); } /** * Query Remote Configs * @summary Query Remote Configs * @param {string} [configCodes] List of remote config codes, separated by commas. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CommonManagementApi */ public dxpCommonManagementV1RemoteConfigsGet(configCodes?: string, options?: RawAxiosRequestConfig) { return CommonManagementApiFp(this.configuration).dxpCommonManagementV1RemoteConfigsGet(configCodes, options).then((request) => request(this.axios, this.basePath)); } } /** * @export */ export const DxpCommonManagementV1OtpGetBusinessTypeEnum = { Register: 'register', Login: 'login', ResetPassword: 'resetPassword', ModAcct: 'modAcct', ChangePlan: 'changePlan', QryCdrUsage: 'qryCdrUsage', NewConnection: 'newConnection', Transfer: 'transfer', CreateCase: 'createCase', QrySimCard: 'qrySimCard', QryOrder: 'qryOrder', Recharge: 'recharge', Loan: 'loan', SetVas: 'setVas', Suspension: 'suspension', Reactivation: 'reactivation', LogOff: 'logOff' } as const; export type DxpCommonManagementV1OtpGetBusinessTypeEnum = typeof DxpCommonManagementV1OtpGetBusinessTypeEnum[keyof typeof DxpCommonManagementV1OtpGetBusinessTypeEnum];