diff options
Diffstat (limited to 'jb-ui/src/api_jb/api.ts')
| -rw-r--r-- | jb-ui/src/api_jb/api.ts | 1341 |
1 files changed, 1341 insertions, 0 deletions
diff --git a/jb-ui/src/api_jb/api.ts b/jb-ui/src/api_jb/api.ts new file mode 100644 index 0000000..89a4bac --- /dev/null +++ b/jb-ui/src/api_jb/api.ts @@ -0,0 +1,1341 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * jb + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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, replaceWithSerializableTypeIfNeeded } from './common'; +import type { RequestArgs } from './base'; +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError, operationServerMap } from './base'; + +export interface AccountLogin { + 'email': string; +} +export interface AmtAccountLink { + 'email': string; + 'amt_worker_id': string; +} +export interface CashoutConfirmation { + 'token': string; +} +export interface CashoutPostback { + 'cashout_id': string; +} +export interface CashoutRequest { + /** + * Amount in USD cents + */ + 'amount': number; + /** + * Cashout method ID + */ + 'cashout_method_id': string; +} +/** + * See models.thl.payout: PayoutEvent. We\'ve confused a CashOut and a Payout. This is used only in the API response. + */ +export interface CashoutRequestInfo { + /** + * Unique ID for this cashout. This may be NULL if the status is REJECTED or FAILED, which may happen if the request is invalid. + */ + 'id': string | null; + /** + * This is the name of the cashout method. + */ + 'description': string; + 'message'?: string | null; + /** + * - `PENDING` = PENDING - `APPROVED` = APPROVED - `REJECTED` = REJECTED - `CANCELLED` = CANCELLED - `FAILED` = FAILED - `COMPLETE` = COMPLETE + */ + 'status'?: PayoutStatus | null; + 'transaction_info'?: { [key: string]: any; } | null; + 'product_id': string; + 'product_user_id': string; + /** + * - `PAYPAL` = PAYPAL - `TANGO` = TANGO - `TREMENDOUS` = TREMENDOUS - `DWOLLA` = DWOLLA - `ACH` = ACH - `WIRE` = WIRE - `CASH_IN_MAIL` = CASH_IN_MAIL - `PRIZE` = PRIZE - `AMT` = AMT - `AMT_BONUS` = AMT_BONUS - `AMT_ASSIGNMENT` = AMT_HIT + */ + 'payout_type': PayoutType; + /** + * The USDCent amount int. This cannot be 0 or negative + */ + 'amount': number; +} + + +export interface HTTPValidationError { + 'detail'?: Array<ValidationError>; +} +export interface LocationInner { +} +export interface MagicLinkExchangeRequest { + 'token': string; +} +/** + * The max size of the db field that holds this value is 20, so please don\'t add new values longer than that! + */ + +export const PayoutStatus = { + Pending: 'PENDING', + Approved: 'APPROVED', + Rejected: 'REJECTED', + Cancelled: 'CANCELLED', + Failed: 'FAILED', + Complete: 'COMPLETE', +} as const; + +export type PayoutStatus = typeof PayoutStatus[keyof typeof PayoutStatus]; + + +/** + * The method in which the requested payout is delivered. + */ + +export const PayoutType = { + Paypal: 'PAYPAL', + Tango: 'TANGO', + Tremendous: 'TREMENDOUS', + Dwolla: 'DWOLLA', + Ach: 'ACH', + Wire: 'WIRE', + CashInMail: 'CASH_IN_MAIL', + Prize: 'PRIZE', + Amt: 'AMT', + AmtBonus: 'AMT_BONUS', + AmtAssignment: 'AMT_ASSIGNMENT', + AmtAssignment2: 'AMT_ASSIGNMENT', +} as const; + +export type PayoutType = typeof PayoutType[keyof typeof PayoutType]; + + +/** + * A user that has been authenticated and exists in THL + */ +export interface User { + 'email': string; + 'display_name'?: string | null; + 'blocked'?: boolean; + 'product_user_id': string; +} +export interface ValidationError { + 'loc': Array<LocationInner>; + 'msg': string; + 'type': string; +} + +/** + * APIApi - axios parameter creator + */ +export const APIApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * View for direct work (not on AMT). Makes sure user is authenticated. + * @summary Work Direct + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + workDirectWorkDirectGet: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => { + const localVarPath = `/work/direct/`; + // 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 HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + localVarHeaderParameter['Accept'] = 'text/html'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * HTML Page that the worker lands on in an iFrame. They can either be previewing the HIT, or have already accepted it. + * @summary Work + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + workWorkGet: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => { + const localVarPath = `/work/`; + // 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; + + localVarHeaderParameter['Accept'] = 'text/html'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * APIApi - functional programming interface + */ +export const APIApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = APIApiAxiosParamCreator(configuration) + return { + /** + * View for direct work (not on AMT). Makes sure user is authenticated. + * @summary Work Direct + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async workDirectWorkDirectGet(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<string>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.workDirectWorkDirectGet(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['APIApi.workDirectWorkDirectGet']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * HTML Page that the worker lands on in an iFrame. They can either be previewing the HIT, or have already accepted it. + * @summary Work + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async workWorkGet(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<string>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.workWorkGet(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['APIApi.workWorkGet']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * APIApi - factory interface + */ +export const APIApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = APIApiFp(configuration) + return { + /** + * View for direct work (not on AMT). Makes sure user is authenticated. + * @summary Work Direct + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + workDirectWorkDirectGet(options?: RawAxiosRequestConfig): AxiosPromise<string> { + return localVarFp.workDirectWorkDirectGet(options).then((request) => request(axios, basePath)); + }, + /** + * HTML Page that the worker lands on in an iFrame. They can either be previewing the HIT, or have already accepted it. + * @summary Work + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + workWorkGet(options?: RawAxiosRequestConfig): AxiosPromise<string> { + return localVarFp.workWorkGet(options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * APIApi - object-oriented interface + */ +export class APIApi extends BaseAPI { + /** + * View for direct work (not on AMT). Makes sure user is authenticated. + * @summary Work Direct + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public workDirectWorkDirectGet(options?: RawAxiosRequestConfig) { + return APIApiFp(this.configuration).workDirectWorkDirectGet(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * HTML Page that the worker lands on in an iFrame. They can either be previewing the HIT, or have already accepted it. + * @summary Work + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public workWorkGet(options?: RawAxiosRequestConfig) { + return APIApiFp(this.configuration).workWorkGet(options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * AuthApi - axios parameter creator + */ +export const AuthApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * + * @summary Delete Session + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteSessionAuthSessionDelete: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => { + const localVarPath = `/auth/session/`; + // 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: 'DELETE', ...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, + }; + }, + /** + * Validate the email link, then transition the bound AMT account. + * @summary Exchange Amt Account Link + * @param {MagicLinkExchangeRequest} magicLinkExchangeRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + exchangeAmtAccountLinkAuthLinkAmtExchangePost: async (magicLinkExchangeRequest: MagicLinkExchangeRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => { + // verify required parameter 'magicLinkExchangeRequest' is not null or undefined + assertParamExists('exchangeAmtAccountLinkAuthLinkAmtExchangePost', 'magicLinkExchangeRequest', magicLinkExchangeRequest) + const localVarPath = `/auth/link-amt/exchange/`; + // 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'; + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(magicLinkExchangeRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Exchange a magic link only after its landing page makes an explicit POST. + * @summary Exchange Magic Link + * @param {MagicLinkExchangeRequest} magicLinkExchangeRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + exchangeMagicLinkAuthMagicLinkExchangePost: async (magicLinkExchangeRequest: MagicLinkExchangeRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => { + // verify required parameter 'magicLinkExchangeRequest' is not null or undefined + assertParamExists('exchangeMagicLinkAuthMagicLinkExchangePost', 'magicLinkExchangeRequest', magicLinkExchangeRequest) + const localVarPath = `/auth/magic-link/exchange/`; + // 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'; + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(magicLinkExchangeRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Get Session + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSessionAuthSessionGet: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => { + const localVarPath = `/auth/session/`; + // 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 HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Create a long-lived AMT account-link URL without sending an email. + * @summary Invite Amt Account Link + * @param {AmtAccountLink} amtAccountLink + * @param {string | null} [authorization] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + inviteAmtAccountLinkAuthLinkAmtInvitePost: async (amtAccountLink: AmtAccountLink, authorization?: string | null, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => { + // verify required parameter 'amtAccountLink' is not null or undefined + assertParamExists('inviteAmtAccountLinkAuthLinkAmtInvitePost', 'amtAccountLink', amtAccountLink) + const localVarPath = `/auth/link-amt/invite/`; + // 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'; + localVarHeaderParameter['Accept'] = 'application/json'; + + if (authorization != null) { + localVarHeaderParameter['authorization'] = String(authorization); + } + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(amtAccountLink, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Link an AMT account and login. + * @summary Link Amt Account + * @param {AmtAccountLink} amtAccountLink + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + linkAmtAccountAuthLinkAmtRequestPost: async (amtAccountLink: AmtAccountLink, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => { + // verify required parameter 'amtAccountLink' is not null or undefined + assertParamExists('linkAmtAccountAuthLinkAmtRequestPost', 'amtAccountLink', amtAccountLink) + const localVarPath = `/auth/link-amt/request/`; + // 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'; + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(amtAccountLink, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Create a magic link. + * @summary Request Magic Link + * @param {AccountLogin} accountLogin + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + requestMagicLinkAuthMagicLinkRequestPost: async (accountLogin: AccountLogin, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => { + // verify required parameter 'accountLogin' is not null or undefined + assertParamExists('requestMagicLinkAuthMagicLinkRequestPost', 'accountLogin', accountLogin) + const localVarPath = `/auth/magic-link/request/`; + // 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'; + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(accountLogin, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * AuthApi - functional programming interface + */ +export const AuthApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = AuthApiAxiosParamCreator(configuration) + return { + /** + * + * @summary Delete Session + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deleteSessionAuthSessionDelete(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteSessionAuthSessionDelete(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AuthApi.deleteSessionAuthSessionDelete']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Validate the email link, then transition the bound AMT account. + * @summary Exchange Amt Account Link + * @param {MagicLinkExchangeRequest} magicLinkExchangeRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async exchangeAmtAccountLinkAuthLinkAmtExchangePost(magicLinkExchangeRequest: MagicLinkExchangeRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.exchangeAmtAccountLinkAuthLinkAmtExchangePost(magicLinkExchangeRequest, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AuthApi.exchangeAmtAccountLinkAuthLinkAmtExchangePost']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Exchange a magic link only after its landing page makes an explicit POST. + * @summary Exchange Magic Link + * @param {MagicLinkExchangeRequest} magicLinkExchangeRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async exchangeMagicLinkAuthMagicLinkExchangePost(magicLinkExchangeRequest: MagicLinkExchangeRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.exchangeMagicLinkAuthMagicLinkExchangePost(magicLinkExchangeRequest, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AuthApi.exchangeMagicLinkAuthMagicLinkExchangePost']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @summary Get Session + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getSessionAuthSessionGet(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<User>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getSessionAuthSessionGet(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AuthApi.getSessionAuthSessionGet']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Create a long-lived AMT account-link URL without sending an email. + * @summary Invite Amt Account Link + * @param {AmtAccountLink} amtAccountLink + * @param {string | null} [authorization] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async inviteAmtAccountLinkAuthLinkAmtInvitePost(amtAccountLink: AmtAccountLink, authorization?: string | null, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: string | null; }>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.inviteAmtAccountLinkAuthLinkAmtInvitePost(amtAccountLink, authorization, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AuthApi.inviteAmtAccountLinkAuthLinkAmtInvitePost']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Link an AMT account and login. + * @summary Link Amt Account + * @param {AmtAccountLink} amtAccountLink + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async linkAmtAccountAuthLinkAmtRequestPost(amtAccountLink: AmtAccountLink, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: string | null; }>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.linkAmtAccountAuthLinkAmtRequestPost(amtAccountLink, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AuthApi.linkAmtAccountAuthLinkAmtRequestPost']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Create a magic link. + * @summary Request Magic Link + * @param {AccountLogin} accountLogin + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async requestMagicLinkAuthMagicLinkRequestPost(accountLogin: AccountLogin, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: string | null; }>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.requestMagicLinkAuthMagicLinkRequestPost(accountLogin, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AuthApi.requestMagicLinkAuthMagicLinkRequestPost']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * AuthApi - factory interface + */ +export const AuthApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = AuthApiFp(configuration) + return { + /** + * + * @summary Delete Session + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteSessionAuthSessionDelete(options?: RawAxiosRequestConfig): AxiosPromise<void> { + return localVarFp.deleteSessionAuthSessionDelete(options).then((request) => request(axios, basePath)); + }, + /** + * Validate the email link, then transition the bound AMT account. + * @summary Exchange Amt Account Link + * @param {MagicLinkExchangeRequest} magicLinkExchangeRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + exchangeAmtAccountLinkAuthLinkAmtExchangePost(magicLinkExchangeRequest: MagicLinkExchangeRequest, options?: RawAxiosRequestConfig): AxiosPromise<void> { + return localVarFp.exchangeAmtAccountLinkAuthLinkAmtExchangePost(magicLinkExchangeRequest, options).then((request) => request(axios, basePath)); + }, + /** + * Exchange a magic link only after its landing page makes an explicit POST. + * @summary Exchange Magic Link + * @param {MagicLinkExchangeRequest} magicLinkExchangeRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + exchangeMagicLinkAuthMagicLinkExchangePost(magicLinkExchangeRequest: MagicLinkExchangeRequest, options?: RawAxiosRequestConfig): AxiosPromise<void> { + return localVarFp.exchangeMagicLinkAuthMagicLinkExchangePost(magicLinkExchangeRequest, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Get Session + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSessionAuthSessionGet(options?: RawAxiosRequestConfig): AxiosPromise<User> { + return localVarFp.getSessionAuthSessionGet(options).then((request) => request(axios, basePath)); + }, + /** + * Create a long-lived AMT account-link URL without sending an email. + * @summary Invite Amt Account Link + * @param {AmtAccountLink} amtAccountLink + * @param {string | null} [authorization] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + inviteAmtAccountLinkAuthLinkAmtInvitePost(amtAccountLink: AmtAccountLink, authorization?: string | null, options?: RawAxiosRequestConfig): AxiosPromise<{ [key: string]: string | null; }> { + return localVarFp.inviteAmtAccountLinkAuthLinkAmtInvitePost(amtAccountLink, authorization, options).then((request) => request(axios, basePath)); + }, + /** + * Link an AMT account and login. + * @summary Link Amt Account + * @param {AmtAccountLink} amtAccountLink + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + linkAmtAccountAuthLinkAmtRequestPost(amtAccountLink: AmtAccountLink, options?: RawAxiosRequestConfig): AxiosPromise<{ [key: string]: string | null; }> { + return localVarFp.linkAmtAccountAuthLinkAmtRequestPost(amtAccountLink, options).then((request) => request(axios, basePath)); + }, + /** + * Create a magic link. + * @summary Request Magic Link + * @param {AccountLogin} accountLogin + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + requestMagicLinkAuthMagicLinkRequestPost(accountLogin: AccountLogin, options?: RawAxiosRequestConfig): AxiosPromise<{ [key: string]: string | null; }> { + return localVarFp.requestMagicLinkAuthMagicLinkRequestPost(accountLogin, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * AuthApi - object-oriented interface + */ +export class AuthApi extends BaseAPI { + /** + * + * @summary Delete Session + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public deleteSessionAuthSessionDelete(options?: RawAxiosRequestConfig) { + return AuthApiFp(this.configuration).deleteSessionAuthSessionDelete(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Validate the email link, then transition the bound AMT account. + * @summary Exchange Amt Account Link + * @param {MagicLinkExchangeRequest} magicLinkExchangeRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public exchangeAmtAccountLinkAuthLinkAmtExchangePost(magicLinkExchangeRequest: MagicLinkExchangeRequest, options?: RawAxiosRequestConfig) { + return AuthApiFp(this.configuration).exchangeAmtAccountLinkAuthLinkAmtExchangePost(magicLinkExchangeRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Exchange a magic link only after its landing page makes an explicit POST. + * @summary Exchange Magic Link + * @param {MagicLinkExchangeRequest} magicLinkExchangeRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public exchangeMagicLinkAuthMagicLinkExchangePost(magicLinkExchangeRequest: MagicLinkExchangeRequest, options?: RawAxiosRequestConfig) { + return AuthApiFp(this.configuration).exchangeMagicLinkAuthMagicLinkExchangePost(magicLinkExchangeRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Get Session + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getSessionAuthSessionGet(options?: RawAxiosRequestConfig) { + return AuthApiFp(this.configuration).getSessionAuthSessionGet(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Create a long-lived AMT account-link URL without sending an email. + * @summary Invite Amt Account Link + * @param {AmtAccountLink} amtAccountLink + * @param {string | null} [authorization] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public inviteAmtAccountLinkAuthLinkAmtInvitePost(amtAccountLink: AmtAccountLink, authorization?: string | null, options?: RawAxiosRequestConfig) { + return AuthApiFp(this.configuration).inviteAmtAccountLinkAuthLinkAmtInvitePost(amtAccountLink, authorization, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Link an AMT account and login. + * @summary Link Amt Account + * @param {AmtAccountLink} amtAccountLink + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public linkAmtAccountAuthLinkAmtRequestPost(amtAccountLink: AmtAccountLink, options?: RawAxiosRequestConfig) { + return AuthApiFp(this.configuration).linkAmtAccountAuthLinkAmtRequestPost(amtAccountLink, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Create a magic link. + * @summary Request Magic Link + * @param {AccountLogin} accountLogin + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public requestMagicLinkAuthMagicLinkRequestPost(accountLogin: AccountLogin, options?: RawAxiosRequestConfig) { + return AuthApiFp(this.configuration).requestMagicLinkAuthMagicLinkRequestPost(accountLogin, options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * DefaultApi - axios parameter creator + */ +export const DefaultApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * + * @summary Return Nothing + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + returnNothingFaviconIcoGet: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => { + const localVarPath = `/favicon.ico`; + // 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; + + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Return Nothing + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + returnNothingRobotsTxtGet: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => { + const localVarPath = `/robots.txt`; + // 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; + + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Return Nothing + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + returnNothingSitemapXmlGet: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => { + const localVarPath = `/sitemap.xml`; + // 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; + + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Serve React App + * @param {string} fullPath + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + serveReactAppFullPathGet: async (fullPath: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => { + // verify required parameter 'fullPath' is not null or undefined + assertParamExists('serveReactAppFullPathGet', 'fullPath', fullPath) + const localVarPath = `/{full_path}` + .replace('{full_path}', encodeURIComponent(String(fullPath))); + // 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; + + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * DefaultApi - functional programming interface + */ +export const DefaultApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = DefaultApiAxiosParamCreator(configuration) + return { + /** + * + * @summary Return Nothing + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async returnNothingFaviconIcoGet(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: any | null; }>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.returnNothingFaviconIcoGet(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DefaultApi.returnNothingFaviconIcoGet']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @summary Return Nothing + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async returnNothingRobotsTxtGet(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: any | null; }>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.returnNothingRobotsTxtGet(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DefaultApi.returnNothingRobotsTxtGet']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @summary Return Nothing + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async returnNothingSitemapXmlGet(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: any | null; }>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.returnNothingSitemapXmlGet(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DefaultApi.returnNothingSitemapXmlGet']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @summary Serve React App + * @param {string} fullPath + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async serveReactAppFullPathGet(fullPath: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<any>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.serveReactAppFullPathGet(fullPath, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DefaultApi.serveReactAppFullPathGet']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * DefaultApi - factory interface + */ +export const DefaultApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = DefaultApiFp(configuration) + return { + /** + * + * @summary Return Nothing + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + returnNothingFaviconIcoGet(options?: RawAxiosRequestConfig): AxiosPromise<{ [key: string]: any | null; }> { + return localVarFp.returnNothingFaviconIcoGet(options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Return Nothing + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + returnNothingRobotsTxtGet(options?: RawAxiosRequestConfig): AxiosPromise<{ [key: string]: any | null; }> { + return localVarFp.returnNothingRobotsTxtGet(options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Return Nothing + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + returnNothingSitemapXmlGet(options?: RawAxiosRequestConfig): AxiosPromise<{ [key: string]: any | null; }> { + return localVarFp.returnNothingSitemapXmlGet(options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Serve React App + * @param {string} fullPath + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + serveReactAppFullPathGet(fullPath: string, options?: RawAxiosRequestConfig): AxiosPromise<any> { + return localVarFp.serveReactAppFullPathGet(fullPath, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * DefaultApi - object-oriented interface + */ +export class DefaultApi extends BaseAPI { + /** + * + * @summary Return Nothing + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public returnNothingFaviconIcoGet(options?: RawAxiosRequestConfig) { + return DefaultApiFp(this.configuration).returnNothingFaviconIcoGet(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Return Nothing + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public returnNothingRobotsTxtGet(options?: RawAxiosRequestConfig) { + return DefaultApiFp(this.configuration).returnNothingRobotsTxtGet(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Return Nothing + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public returnNothingSitemapXmlGet(options?: RawAxiosRequestConfig) { + return DefaultApiFp(this.configuration).returnNothingSitemapXmlGet(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Serve React App + * @param {string} fullPath + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public serveReactAppFullPathGet(fullPath: string, options?: RawAxiosRequestConfig) { + return DefaultApiFp(this.configuration).serveReactAppFullPathGet(fullPath, options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * WalletApi - axios parameter creator + */ +export const WalletApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * + * @summary Cashout Postback + * @param {CashoutPostback} cashoutPostback + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + cashoutPostbackWalletCashoutPostbackPost: async (cashoutPostback: CashoutPostback, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => { + // verify required parameter 'cashoutPostback' is not null or undefined + assertParamExists('cashoutPostbackWalletCashoutPostbackPost', 'cashoutPostback', cashoutPostback) + const localVarPath = `/wallet/cashout/postback/`; + // 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'; + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(cashoutPostback, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Confirm Cashout + * @param {CashoutConfirmation} cashoutConfirmation + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + confirmCashoutWalletCashoutConfirmPost: async (cashoutConfirmation: CashoutConfirmation, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => { + // verify required parameter 'cashoutConfirmation' is not null or undefined + assertParamExists('confirmCashoutWalletCashoutConfirmPost', 'cashoutConfirmation', cashoutConfirmation) + const localVarPath = `/wallet/cashout/confirm/`; + // 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 HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(cashoutConfirmation, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Email the authenticated user a link confirming the requested amount. + * @summary Request Cashout + * @param {CashoutRequest} cashoutRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + requestCashoutWalletCashoutRequestPost: async (cashoutRequest: CashoutRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => { + // verify required parameter 'cashoutRequest' is not null or undefined + assertParamExists('requestCashoutWalletCashoutRequestPost', 'cashoutRequest', cashoutRequest) + const localVarPath = `/wallet/cashout/request/`; + // 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 HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(cashoutRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * WalletApi - functional programming interface + */ +export const WalletApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = WalletApiAxiosParamCreator(configuration) + return { + /** + * + * @summary Cashout Postback + * @param {CashoutPostback} cashoutPostback + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async cashoutPostbackWalletCashoutPostbackPost(cashoutPostback: CashoutPostback, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.cashoutPostbackWalletCashoutPostbackPost(cashoutPostback, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['WalletApi.cashoutPostbackWalletCashoutPostbackPost']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @summary Confirm Cashout + * @param {CashoutConfirmation} cashoutConfirmation + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async confirmCashoutWalletCashoutConfirmPost(cashoutConfirmation: CashoutConfirmation, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CashoutRequestInfo>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.confirmCashoutWalletCashoutConfirmPost(cashoutConfirmation, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['WalletApi.confirmCashoutWalletCashoutConfirmPost']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Email the authenticated user a link confirming the requested amount. + * @summary Request Cashout + * @param {CashoutRequest} cashoutRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async requestCashoutWalletCashoutRequestPost(cashoutRequest: CashoutRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: string | null; }>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.requestCashoutWalletCashoutRequestPost(cashoutRequest, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['WalletApi.requestCashoutWalletCashoutRequestPost']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * WalletApi - factory interface + */ +export const WalletApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = WalletApiFp(configuration) + return { + /** + * + * @summary Cashout Postback + * @param {CashoutPostback} cashoutPostback + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + cashoutPostbackWalletCashoutPostbackPost(cashoutPostback: CashoutPostback, options?: RawAxiosRequestConfig): AxiosPromise<void> { + return localVarFp.cashoutPostbackWalletCashoutPostbackPost(cashoutPostback, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Confirm Cashout + * @param {CashoutConfirmation} cashoutConfirmation + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + confirmCashoutWalletCashoutConfirmPost(cashoutConfirmation: CashoutConfirmation, options?: RawAxiosRequestConfig): AxiosPromise<CashoutRequestInfo> { + return localVarFp.confirmCashoutWalletCashoutConfirmPost(cashoutConfirmation, options).then((request) => request(axios, basePath)); + }, + /** + * Email the authenticated user a link confirming the requested amount. + * @summary Request Cashout + * @param {CashoutRequest} cashoutRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + requestCashoutWalletCashoutRequestPost(cashoutRequest: CashoutRequest, options?: RawAxiosRequestConfig): AxiosPromise<{ [key: string]: string | null; }> { + return localVarFp.requestCashoutWalletCashoutRequestPost(cashoutRequest, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * WalletApi - object-oriented interface + */ +export class WalletApi extends BaseAPI { + /** + * + * @summary Cashout Postback + * @param {CashoutPostback} cashoutPostback + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public cashoutPostbackWalletCashoutPostbackPost(cashoutPostback: CashoutPostback, options?: RawAxiosRequestConfig) { + return WalletApiFp(this.configuration).cashoutPostbackWalletCashoutPostbackPost(cashoutPostback, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Confirm Cashout + * @param {CashoutConfirmation} cashoutConfirmation + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public confirmCashoutWalletCashoutConfirmPost(cashoutConfirmation: CashoutConfirmation, options?: RawAxiosRequestConfig) { + return WalletApiFp(this.configuration).confirmCashoutWalletCashoutConfirmPost(cashoutConfirmation, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Email the authenticated user a link confirming the requested amount. + * @summary Request Cashout + * @param {CashoutRequest} cashoutRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public requestCashoutWalletCashoutRequestPost(cashoutRequest: CashoutRequest, options?: RawAxiosRequestConfig) { + return WalletApiFp(this.configuration).requestCashoutWalletCashoutRequestPost(cashoutRequest, options).then((request) => request(this.axios, this.basePath)); + } +} + + + |
