/* tslint:disable */ /* eslint-disable */ /** * OpenAPI definition * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v0 * * * 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 BalanceResponse { 'iskBalance': number; 'itemBalances': Array; } export interface CharacterResponse { 'characterId': number; 'name': string; } export interface CharacterRuleBookResponse { 'characterId': number; 'ruleBookId': string; 'bindings': { [key: string]: string; }; } export interface CombinedLedgerResponse extends LedgerResponse { 'ledgerId': string; 'name': string; 'balance': number; 'memberLedgerIds': Array; 'type'?: CombinedLedgerResponseTypeEnum; } export const CombinedLedgerResponseTypeEnum = { Combined: 'COMBINED', } as const; export type CombinedLedgerResponseTypeEnum = typeof CombinedLedgerResponseTypeEnum[keyof typeof CombinedLedgerResponseTypeEnum]; export interface CreateCombinedLedgerRequest { 'name': string; 'memberLedgerIds': Array; } export interface CreateMainLedgerRequest { 'name': string; } export interface CreateRuleBookRequest { 'name': string; 'ledgerRefs': Array; 'rules': { [key: string]: RuleResponse; }; } /** * @type FindAllLedgers200ResponseInner */ export type FindAllLedgers200ResponseInner = CombinedLedgerResponse | MainLedgerResponse; export interface IskTransferResponse extends TransferResponse { 'fromLedgerId': string; 'toLedgerId': string; 'amount': number; 'type'?: IskTransferResponseTypeEnum; } export const IskTransferResponseTypeEnum = { Isk: 'ISK', } as const; export type IskTransferResponseTypeEnum = typeof IskTransferResponseTypeEnum[keyof typeof IskTransferResponseTypeEnum]; export interface ItemBalanceResponse { 'typeId': number; 'quantity': number; } export interface ItemTransferResponse extends TransferResponse { 'fromLedgerId': string; 'toLedgerId': string; 'marketTypeId': number; 'quantity': number; 'type'?: ItemTransferResponseTypeEnum; } export const ItemTransferResponseTypeEnum = { Item: 'ITEM', } as const; export type ItemTransferResponseTypeEnum = typeof ItemTransferResponseTypeEnum[keyof typeof ItemTransferResponseTypeEnum]; export interface LedgerResponse { 'type'?: LedgerResponseTypeEnum; } export const LedgerResponseTypeEnum = { Main: 'MAIN', Combined: 'COMBINED', } as const; export type LedgerResponseTypeEnum = typeof LedgerResponseTypeEnum[keyof typeof LedgerResponseTypeEnum]; export interface MainLedgerResponse extends LedgerResponse { 'ledgerId': string; 'name': string; 'balance': number; 'type'?: MainLedgerResponseTypeEnum; } export const MainLedgerResponseTypeEnum = { Main: 'MAIN', } as const; export type MainLedgerResponseTypeEnum = typeof MainLedgerResponseTypeEnum[keyof typeof MainLedgerResponseTypeEnum]; export interface RuleBookResponse { 'ruleBookId': string; 'name': string; 'ledgerRefs': Array; 'rules': { [key: string]: RuleResponse; }; } export interface RuleClauseResponse { 'rate': RuleClauseResponseRateEnum; 'fromLedgerRef': string; 'toLedgerRef': string; } export const RuleClauseResponseRateEnum = { None: 'NONE', Value: 'VALUE', JitaBuy: 'JITA_BUY', JitaSell: 'JITA_SELL', EveEstimate: 'EVE_ESTIMATE', } as const; export type RuleClauseResponseRateEnum = typeof RuleClauseResponseRateEnum[keyof typeof RuleClauseResponseRateEnum]; export interface RuleResponse { 'clauses': Array; } export interface SetCharacterRuleBookRequest { 'ruleBookId': string; 'bindings': { [key: string]: string; }; } export interface TransactionResponse { 'transactionId': string; 'characterId': number; 'datetime': string; 'description': string; 'transfers': Array; } /** * @type TransactionResponseTransfersInner */ export type TransactionResponseTransfersInner = IskTransferResponse | ItemTransferResponse; export interface TransferResponse { 'type'?: TransferResponseTypeEnum; } export const TransferResponseTypeEnum = { Isk: 'ISK', Item: 'ITEM', } as const; export type TransferResponseTypeEnum = typeof TransferResponseTypeEnum[keyof typeof TransferResponseTypeEnum]; export interface UpdateCombinedLedgerRequest { 'name': string; 'memberLedgerIds': Array; } export interface UpdateMainLedgerRequest { 'name': string; } export interface UpdateRuleBookRequest { 'name': string; 'ledgerRefs': Array; 'rules': { [key: string]: RuleResponse; }; } /** * ActivityApi - axios parameter creator */ export const ActivityApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * * @summary Fetch new activities for a character from the EVE API * @param {number} characterId Id of the character * @param {*} [options] Override http request option. * @throws {RequiredError} */ fetchNewActivitiesForCharacter: async (characterId: number, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'characterId' is not null or undefined assertParamExists('fetchNewActivitiesForCharacter', 'characterId', characterId) const localVarPath = `/activity/fetch/{characterId}` .replace('{characterId}', encodeURIComponent(String(characterId))); // 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; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, } }; /** * ActivityApi - functional programming interface */ export const ActivityApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = ActivityApiAxiosParamCreator(configuration) return { /** * * @summary Fetch new activities for a character from the EVE API * @param {number} characterId Id of the character * @param {*} [options] Override http request option. * @throws {RequiredError} */ async fetchNewActivitiesForCharacter(characterId: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.fetchNewActivitiesForCharacter(characterId, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['ActivityApi.fetchNewActivitiesForCharacter']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } }; /** * ActivityApi - factory interface */ export const ActivityApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = ActivityApiFp(configuration) return { /** * * @summary Fetch new activities for a character from the EVE API * @param {number} characterId Id of the character * @param {*} [options] Override http request option. * @throws {RequiredError} */ fetchNewActivitiesForCharacter(characterId: number, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.fetchNewActivitiesForCharacter(characterId, options).then((request) => request(axios, basePath)); }, }; }; /** * ActivityApi - object-oriented interface */ export class ActivityApi extends BaseAPI { /** * * @summary Fetch new activities for a character from the EVE API * @param {number} characterId Id of the character * @param {*} [options] Override http request option. * @throws {RequiredError} */ public fetchNewActivitiesForCharacter(characterId: number, options?: RawAxiosRequestConfig) { return ActivityApiFp(this.configuration).fetchNewActivitiesForCharacter(characterId, options).then((request) => request(this.axios, this.basePath)); } } /** * CharacterApi - axios parameter creator */ export const CharacterApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * * @summary Find all characters with a usable token * @param {*} [options] Override http request option. * @throws {RequiredError} */ findAllCharacters: async (options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/characters`; // 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'] = '*/*'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, } }; /** * CharacterApi - functional programming interface */ export const CharacterApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = CharacterApiAxiosParamCreator(configuration) return { /** * * @summary Find all characters with a usable token * @param {*} [options] Override http request option. * @throws {RequiredError} */ async findAllCharacters(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.findAllCharacters(options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['CharacterApi.findAllCharacters']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } }; /** * CharacterApi - factory interface */ export const CharacterApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = CharacterApiFp(configuration) return { /** * * @summary Find all characters with a usable token * @param {*} [options] Override http request option. * @throws {RequiredError} */ findAllCharacters(options?: RawAxiosRequestConfig): AxiosPromise> { return localVarFp.findAllCharacters(options).then((request) => request(axios, basePath)); }, }; }; /** * CharacterApi - object-oriented interface */ export class CharacterApi extends BaseAPI { /** * * @summary Find all characters with a usable token * @param {*} [options] Override http request option. * @throws {RequiredError} */ public findAllCharacters(options?: RawAxiosRequestConfig) { return CharacterApiFp(this.configuration).findAllCharacters(options).then((request) => request(this.axios, this.basePath)); } } /** * CharacterRuleBookApi - axios parameter creator */ export const CharacterRuleBookApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * * @summary Find the rule book assigned to a character * @param {number} characterId Id of the character * @param {*} [options] Override http request option. * @throws {RequiredError} */ findCharacterRuleBookByCharacterId: async (characterId: number, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'characterId' is not null or undefined assertParamExists('findCharacterRuleBookByCharacterId', 'characterId', characterId) const localVarPath = `/characters/{characterId}/rule-book` .replace('{characterId}', encodeURIComponent(String(characterId))); // 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'] = '*/*'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Assign a rule book to a character * @param {number} characterId Id of the character * @param {SetCharacterRuleBookRequest} setCharacterRuleBookRequest Rule book and ledger bindings to assign * @param {*} [options] Override http request option. * @throws {RequiredError} */ setCharacterRuleBookForCharacter: async (characterId: number, setCharacterRuleBookRequest: SetCharacterRuleBookRequest, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'characterId' is not null or undefined assertParamExists('setCharacterRuleBookForCharacter', 'characterId', characterId) // verify required parameter 'setCharacterRuleBookRequest' is not null or undefined assertParamExists('setCharacterRuleBookForCharacter', 'setCharacterRuleBookRequest', setCharacterRuleBookRequest) const localVarPath = `/characters/{characterId}/rule-book` .replace('{characterId}', encodeURIComponent(String(characterId))); // 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: 'PUT', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarHeaderParameter['Accept'] = '*/*'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(setCharacterRuleBookRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, } }; /** * CharacterRuleBookApi - functional programming interface */ export const CharacterRuleBookApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = CharacterRuleBookApiAxiosParamCreator(configuration) return { /** * * @summary Find the rule book assigned to a character * @param {number} characterId Id of the character * @param {*} [options] Override http request option. * @throws {RequiredError} */ async findCharacterRuleBookByCharacterId(characterId: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.findCharacterRuleBookByCharacterId(characterId, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['CharacterRuleBookApi.findCharacterRuleBookByCharacterId']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Assign a rule book to a character * @param {number} characterId Id of the character * @param {SetCharacterRuleBookRequest} setCharacterRuleBookRequest Rule book and ledger bindings to assign * @param {*} [options] Override http request option. * @throws {RequiredError} */ async setCharacterRuleBookForCharacter(characterId: number, setCharacterRuleBookRequest: SetCharacterRuleBookRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.setCharacterRuleBookForCharacter(characterId, setCharacterRuleBookRequest, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['CharacterRuleBookApi.setCharacterRuleBookForCharacter']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } }; /** * CharacterRuleBookApi - factory interface */ export const CharacterRuleBookApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = CharacterRuleBookApiFp(configuration) return { /** * * @summary Find the rule book assigned to a character * @param {number} characterId Id of the character * @param {*} [options] Override http request option. * @throws {RequiredError} */ findCharacterRuleBookByCharacterId(characterId: number, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.findCharacterRuleBookByCharacterId(characterId, options).then((request) => request(axios, basePath)); }, /** * * @summary Assign a rule book to a character * @param {number} characterId Id of the character * @param {SetCharacterRuleBookRequest} setCharacterRuleBookRequest Rule book and ledger bindings to assign * @param {*} [options] Override http request option. * @throws {RequiredError} */ setCharacterRuleBookForCharacter(characterId: number, setCharacterRuleBookRequest: SetCharacterRuleBookRequest, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.setCharacterRuleBookForCharacter(characterId, setCharacterRuleBookRequest, options).then((request) => request(axios, basePath)); }, }; }; /** * CharacterRuleBookApi - object-oriented interface */ export class CharacterRuleBookApi extends BaseAPI { /** * * @summary Find the rule book assigned to a character * @param {number} characterId Id of the character * @param {*} [options] Override http request option. * @throws {RequiredError} */ public findCharacterRuleBookByCharacterId(characterId: number, options?: RawAxiosRequestConfig) { return CharacterRuleBookApiFp(this.configuration).findCharacterRuleBookByCharacterId(characterId, options).then((request) => request(this.axios, this.basePath)); } /** * * @summary Assign a rule book to a character * @param {number} characterId Id of the character * @param {SetCharacterRuleBookRequest} setCharacterRuleBookRequest Rule book and ledger bindings to assign * @param {*} [options] Override http request option. * @throws {RequiredError} */ public setCharacterRuleBookForCharacter(characterId: number, setCharacterRuleBookRequest: SetCharacterRuleBookRequest, options?: RawAxiosRequestConfig) { return CharacterRuleBookApiFp(this.configuration).setCharacterRuleBookForCharacter(characterId, setCharacterRuleBookRequest, options).then((request) => request(this.axios, this.basePath)); } } /** * LedgerApi - axios parameter creator */ export const LedgerApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * * @summary Create a combined ledger * @param {CreateCombinedLedgerRequest} createCombinedLedgerRequest Combined ledger to create * @param {*} [options] Override http request option. * @throws {RequiredError} */ createCombinedLedger: async (createCombinedLedgerRequest: CreateCombinedLedgerRequest, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'createCombinedLedgerRequest' is not null or undefined assertParamExists('createCombinedLedger', 'createCombinedLedgerRequest', createCombinedLedgerRequest) const localVarPath = `/ledgers/combined`; // 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'] = '*/*'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(createCombinedLedgerRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Create a main ledger * @param {CreateMainLedgerRequest} createMainLedgerRequest Main ledger to create * @param {*} [options] Override http request option. * @throws {RequiredError} */ createMainLedger: async (createMainLedgerRequest: CreateMainLedgerRequest, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'createMainLedgerRequest' is not null or undefined assertParamExists('createMainLedger', 'createMainLedgerRequest', createMainLedgerRequest) const localVarPath = `/ledgers/main`; // 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'] = '*/*'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(createMainLedgerRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Find all ledgers * @param {*} [options] Override http request option. * @throws {RequiredError} */ findAllLedgers: async (options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/ledgers`; // 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'] = '*/*'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Find the balance of a ledger * @param {string} ledgerId Id of the ledger * @param {*} [options] Override http request option. * @throws {RequiredError} */ findBalanceByLedgerId: async (ledgerId: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'ledgerId' is not null or undefined assertParamExists('findBalanceByLedgerId', 'ledgerId', ledgerId) const localVarPath = `/ledgers/{ledgerId}/balance` .replace('{ledgerId}', encodeURIComponent(String(ledgerId))); // 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'] = '*/*'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Find a ledger by its id * @param {string} ledgerId Id of the ledger * @param {*} [options] Override http request option. * @throws {RequiredError} */ findLedgerById: async (ledgerId: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'ledgerId' is not null or undefined assertParamExists('findLedgerById', 'ledgerId', ledgerId) const localVarPath = `/ledgers/{ledgerId}` .replace('{ledgerId}', encodeURIComponent(String(ledgerId))); // 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'] = '*/*'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Update a combined ledger * @param {string} ledgerId Id of the combined ledger * @param {UpdateCombinedLedgerRequest} updateCombinedLedgerRequest New state of the combined ledger * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateCombinedLedger: async (ledgerId: string, updateCombinedLedgerRequest: UpdateCombinedLedgerRequest, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'ledgerId' is not null or undefined assertParamExists('updateCombinedLedger', 'ledgerId', ledgerId) // verify required parameter 'updateCombinedLedgerRequest' is not null or undefined assertParamExists('updateCombinedLedger', 'updateCombinedLedgerRequest', updateCombinedLedgerRequest) const localVarPath = `/ledgers/combined/{ledgerId}` .replace('{ledgerId}', encodeURIComponent(String(ledgerId))); // 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: 'PUT', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarHeaderParameter['Accept'] = '*/*'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(updateCombinedLedgerRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Update a main ledger * @param {string} ledgerId Id of the main ledger * @param {UpdateMainLedgerRequest} updateMainLedgerRequest New state of the main ledger * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateMainLedger: async (ledgerId: string, updateMainLedgerRequest: UpdateMainLedgerRequest, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'ledgerId' is not null or undefined assertParamExists('updateMainLedger', 'ledgerId', ledgerId) // verify required parameter 'updateMainLedgerRequest' is not null or undefined assertParamExists('updateMainLedger', 'updateMainLedgerRequest', updateMainLedgerRequest) const localVarPath = `/ledgers/main/{ledgerId}` .replace('{ledgerId}', encodeURIComponent(String(ledgerId))); // 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: 'PUT', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarHeaderParameter['Accept'] = '*/*'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(updateMainLedgerRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, } }; /** * LedgerApi - functional programming interface */ export const LedgerApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = LedgerApiAxiosParamCreator(configuration) return { /** * * @summary Create a combined ledger * @param {CreateCombinedLedgerRequest} createCombinedLedgerRequest Combined ledger to create * @param {*} [options] Override http request option. * @throws {RequiredError} */ async createCombinedLedger(createCombinedLedgerRequest: CreateCombinedLedgerRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createCombinedLedger(createCombinedLedgerRequest, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['LedgerApi.createCombinedLedger']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Create a main ledger * @param {CreateMainLedgerRequest} createMainLedgerRequest Main ledger to create * @param {*} [options] Override http request option. * @throws {RequiredError} */ async createMainLedger(createMainLedgerRequest: CreateMainLedgerRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createMainLedger(createMainLedgerRequest, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['LedgerApi.createMainLedger']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Find all ledgers * @param {*} [options] Override http request option. * @throws {RequiredError} */ async findAllLedgers(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.findAllLedgers(options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['LedgerApi.findAllLedgers']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Find the balance of a ledger * @param {string} ledgerId Id of the ledger * @param {*} [options] Override http request option. * @throws {RequiredError} */ async findBalanceByLedgerId(ledgerId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.findBalanceByLedgerId(ledgerId, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['LedgerApi.findBalanceByLedgerId']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Find a ledger by its id * @param {string} ledgerId Id of the ledger * @param {*} [options] Override http request option. * @throws {RequiredError} */ async findLedgerById(ledgerId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.findLedgerById(ledgerId, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['LedgerApi.findLedgerById']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Update a combined ledger * @param {string} ledgerId Id of the combined ledger * @param {UpdateCombinedLedgerRequest} updateCombinedLedgerRequest New state of the combined ledger * @param {*} [options] Override http request option. * @throws {RequiredError} */ async updateCombinedLedger(ledgerId: string, updateCombinedLedgerRequest: UpdateCombinedLedgerRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updateCombinedLedger(ledgerId, updateCombinedLedgerRequest, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['LedgerApi.updateCombinedLedger']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Update a main ledger * @param {string} ledgerId Id of the main ledger * @param {UpdateMainLedgerRequest} updateMainLedgerRequest New state of the main ledger * @param {*} [options] Override http request option. * @throws {RequiredError} */ async updateMainLedger(ledgerId: string, updateMainLedgerRequest: UpdateMainLedgerRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updateMainLedger(ledgerId, updateMainLedgerRequest, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['LedgerApi.updateMainLedger']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } }; /** * LedgerApi - factory interface */ export const LedgerApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = LedgerApiFp(configuration) return { /** * * @summary Create a combined ledger * @param {CreateCombinedLedgerRequest} createCombinedLedgerRequest Combined ledger to create * @param {*} [options] Override http request option. * @throws {RequiredError} */ createCombinedLedger(createCombinedLedgerRequest: CreateCombinedLedgerRequest, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.createCombinedLedger(createCombinedLedgerRequest, options).then((request) => request(axios, basePath)); }, /** * * @summary Create a main ledger * @param {CreateMainLedgerRequest} createMainLedgerRequest Main ledger to create * @param {*} [options] Override http request option. * @throws {RequiredError} */ createMainLedger(createMainLedgerRequest: CreateMainLedgerRequest, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.createMainLedger(createMainLedgerRequest, options).then((request) => request(axios, basePath)); }, /** * * @summary Find all ledgers * @param {*} [options] Override http request option. * @throws {RequiredError} */ findAllLedgers(options?: RawAxiosRequestConfig): AxiosPromise> { return localVarFp.findAllLedgers(options).then((request) => request(axios, basePath)); }, /** * * @summary Find the balance of a ledger * @param {string} ledgerId Id of the ledger * @param {*} [options] Override http request option. * @throws {RequiredError} */ findBalanceByLedgerId(ledgerId: string, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.findBalanceByLedgerId(ledgerId, options).then((request) => request(axios, basePath)); }, /** * * @summary Find a ledger by its id * @param {string} ledgerId Id of the ledger * @param {*} [options] Override http request option. * @throws {RequiredError} */ findLedgerById(ledgerId: string, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.findLedgerById(ledgerId, options).then((request) => request(axios, basePath)); }, /** * * @summary Update a combined ledger * @param {string} ledgerId Id of the combined ledger * @param {UpdateCombinedLedgerRequest} updateCombinedLedgerRequest New state of the combined ledger * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateCombinedLedger(ledgerId: string, updateCombinedLedgerRequest: UpdateCombinedLedgerRequest, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.updateCombinedLedger(ledgerId, updateCombinedLedgerRequest, options).then((request) => request(axios, basePath)); }, /** * * @summary Update a main ledger * @param {string} ledgerId Id of the main ledger * @param {UpdateMainLedgerRequest} updateMainLedgerRequest New state of the main ledger * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateMainLedger(ledgerId: string, updateMainLedgerRequest: UpdateMainLedgerRequest, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.updateMainLedger(ledgerId, updateMainLedgerRequest, options).then((request) => request(axios, basePath)); }, }; }; /** * LedgerApi - object-oriented interface */ export class LedgerApi extends BaseAPI { /** * * @summary Create a combined ledger * @param {CreateCombinedLedgerRequest} createCombinedLedgerRequest Combined ledger to create * @param {*} [options] Override http request option. * @throws {RequiredError} */ public createCombinedLedger(createCombinedLedgerRequest: CreateCombinedLedgerRequest, options?: RawAxiosRequestConfig) { return LedgerApiFp(this.configuration).createCombinedLedger(createCombinedLedgerRequest, options).then((request) => request(this.axios, this.basePath)); } /** * * @summary Create a main ledger * @param {CreateMainLedgerRequest} createMainLedgerRequest Main ledger to create * @param {*} [options] Override http request option. * @throws {RequiredError} */ public createMainLedger(createMainLedgerRequest: CreateMainLedgerRequest, options?: RawAxiosRequestConfig) { return LedgerApiFp(this.configuration).createMainLedger(createMainLedgerRequest, options).then((request) => request(this.axios, this.basePath)); } /** * * @summary Find all ledgers * @param {*} [options] Override http request option. * @throws {RequiredError} */ public findAllLedgers(options?: RawAxiosRequestConfig) { return LedgerApiFp(this.configuration).findAllLedgers(options).then((request) => request(this.axios, this.basePath)); } /** * * @summary Find the balance of a ledger * @param {string} ledgerId Id of the ledger * @param {*} [options] Override http request option. * @throws {RequiredError} */ public findBalanceByLedgerId(ledgerId: string, options?: RawAxiosRequestConfig) { return LedgerApiFp(this.configuration).findBalanceByLedgerId(ledgerId, options).then((request) => request(this.axios, this.basePath)); } /** * * @summary Find a ledger by its id * @param {string} ledgerId Id of the ledger * @param {*} [options] Override http request option. * @throws {RequiredError} */ public findLedgerById(ledgerId: string, options?: RawAxiosRequestConfig) { return LedgerApiFp(this.configuration).findLedgerById(ledgerId, options).then((request) => request(this.axios, this.basePath)); } /** * * @summary Update a combined ledger * @param {string} ledgerId Id of the combined ledger * @param {UpdateCombinedLedgerRequest} updateCombinedLedgerRequest New state of the combined ledger * @param {*} [options] Override http request option. * @throws {RequiredError} */ public updateCombinedLedger(ledgerId: string, updateCombinedLedgerRequest: UpdateCombinedLedgerRequest, options?: RawAxiosRequestConfig) { return LedgerApiFp(this.configuration).updateCombinedLedger(ledgerId, updateCombinedLedgerRequest, options).then((request) => request(this.axios, this.basePath)); } /** * * @summary Update a main ledger * @param {string} ledgerId Id of the main ledger * @param {UpdateMainLedgerRequest} updateMainLedgerRequest New state of the main ledger * @param {*} [options] Override http request option. * @throws {RequiredError} */ public updateMainLedger(ledgerId: string, updateMainLedgerRequest: UpdateMainLedgerRequest, options?: RawAxiosRequestConfig) { return LedgerApiFp(this.configuration).updateMainLedger(ledgerId, updateMainLedgerRequest, options).then((request) => request(this.axios, this.basePath)); } } /** * ProcessingApi - axios parameter creator */ export const ProcessingApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * * @summary Process new activities for all characters with a usable token * @param {*} [options] Override http request option. * @throws {RequiredError} */ processNewActivities: async (options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/process-activities`; // 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; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, } }; /** * ProcessingApi - functional programming interface */ export const ProcessingApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = ProcessingApiAxiosParamCreator(configuration) return { /** * * @summary Process new activities for all characters with a usable token * @param {*} [options] Override http request option. * @throws {RequiredError} */ async processNewActivities(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.processNewActivities(options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['ProcessingApi.processNewActivities']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } }; /** * ProcessingApi - factory interface */ export const ProcessingApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = ProcessingApiFp(configuration) return { /** * * @summary Process new activities for all characters with a usable token * @param {*} [options] Override http request option. * @throws {RequiredError} */ processNewActivities(options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.processNewActivities(options).then((request) => request(axios, basePath)); }, }; }; /** * ProcessingApi - object-oriented interface */ export class ProcessingApi extends BaseAPI { /** * * @summary Process new activities for all characters with a usable token * @param {*} [options] Override http request option. * @throws {RequiredError} */ public processNewActivities(options?: RawAxiosRequestConfig) { return ProcessingApiFp(this.configuration).processNewActivities(options).then((request) => request(this.axios, this.basePath)); } } /** * RuleBookApi - axios parameter creator */ export const RuleBookApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * * @summary Create a rule book * @param {CreateRuleBookRequest} createRuleBookRequest Rule book to create * @param {*} [options] Override http request option. * @throws {RequiredError} */ createRuleBook: async (createRuleBookRequest: CreateRuleBookRequest, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'createRuleBookRequest' is not null or undefined assertParamExists('createRuleBook', 'createRuleBookRequest', createRuleBookRequest) const localVarPath = `/rule-books`; // 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'] = '*/*'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(createRuleBookRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Find all rule books * @param {*} [options] Override http request option. * @throws {RequiredError} */ findAllRuleBooks: async (options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/rule-books`; // 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'] = '*/*'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Find a rule book by its id * @param {string} ruleBookId Id of the rule book * @param {*} [options] Override http request option. * @throws {RequiredError} */ findRuleBookById: async (ruleBookId: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'ruleBookId' is not null or undefined assertParamExists('findRuleBookById', 'ruleBookId', ruleBookId) const localVarPath = `/rule-books/{ruleBookId}` .replace('{ruleBookId}', encodeURIComponent(String(ruleBookId))); // 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'] = '*/*'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Update a rule book * @param {string} ruleBookId Id of the rule book * @param {UpdateRuleBookRequest} updateRuleBookRequest New state of the rule book * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateRuleBook: async (ruleBookId: string, updateRuleBookRequest: UpdateRuleBookRequest, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'ruleBookId' is not null or undefined assertParamExists('updateRuleBook', 'ruleBookId', ruleBookId) // verify required parameter 'updateRuleBookRequest' is not null or undefined assertParamExists('updateRuleBook', 'updateRuleBookRequest', updateRuleBookRequest) const localVarPath = `/rule-books/{ruleBookId}` .replace('{ruleBookId}', encodeURIComponent(String(ruleBookId))); // 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: 'PUT', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarHeaderParameter['Accept'] = '*/*'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(updateRuleBookRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, } }; /** * RuleBookApi - functional programming interface */ export const RuleBookApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = RuleBookApiAxiosParamCreator(configuration) return { /** * * @summary Create a rule book * @param {CreateRuleBookRequest} createRuleBookRequest Rule book to create * @param {*} [options] Override http request option. * @throws {RequiredError} */ async createRuleBook(createRuleBookRequest: CreateRuleBookRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createRuleBook(createRuleBookRequest, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['RuleBookApi.createRuleBook']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Find all rule books * @param {*} [options] Override http request option. * @throws {RequiredError} */ async findAllRuleBooks(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.findAllRuleBooks(options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['RuleBookApi.findAllRuleBooks']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Find a rule book by its id * @param {string} ruleBookId Id of the rule book * @param {*} [options] Override http request option. * @throws {RequiredError} */ async findRuleBookById(ruleBookId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.findRuleBookById(ruleBookId, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['RuleBookApi.findRuleBookById']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Update a rule book * @param {string} ruleBookId Id of the rule book * @param {UpdateRuleBookRequest} updateRuleBookRequest New state of the rule book * @param {*} [options] Override http request option. * @throws {RequiredError} */ async updateRuleBook(ruleBookId: string, updateRuleBookRequest: UpdateRuleBookRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updateRuleBook(ruleBookId, updateRuleBookRequest, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['RuleBookApi.updateRuleBook']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } }; /** * RuleBookApi - factory interface */ export const RuleBookApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = RuleBookApiFp(configuration) return { /** * * @summary Create a rule book * @param {CreateRuleBookRequest} createRuleBookRequest Rule book to create * @param {*} [options] Override http request option. * @throws {RequiredError} */ createRuleBook(createRuleBookRequest: CreateRuleBookRequest, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.createRuleBook(createRuleBookRequest, options).then((request) => request(axios, basePath)); }, /** * * @summary Find all rule books * @param {*} [options] Override http request option. * @throws {RequiredError} */ findAllRuleBooks(options?: RawAxiosRequestConfig): AxiosPromise> { return localVarFp.findAllRuleBooks(options).then((request) => request(axios, basePath)); }, /** * * @summary Find a rule book by its id * @param {string} ruleBookId Id of the rule book * @param {*} [options] Override http request option. * @throws {RequiredError} */ findRuleBookById(ruleBookId: string, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.findRuleBookById(ruleBookId, options).then((request) => request(axios, basePath)); }, /** * * @summary Update a rule book * @param {string} ruleBookId Id of the rule book * @param {UpdateRuleBookRequest} updateRuleBookRequest New state of the rule book * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateRuleBook(ruleBookId: string, updateRuleBookRequest: UpdateRuleBookRequest, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.updateRuleBook(ruleBookId, updateRuleBookRequest, options).then((request) => request(axios, basePath)); }, }; }; /** * RuleBookApi - object-oriented interface */ export class RuleBookApi extends BaseAPI { /** * * @summary Create a rule book * @param {CreateRuleBookRequest} createRuleBookRequest Rule book to create * @param {*} [options] Override http request option. * @throws {RequiredError} */ public createRuleBook(createRuleBookRequest: CreateRuleBookRequest, options?: RawAxiosRequestConfig) { return RuleBookApiFp(this.configuration).createRuleBook(createRuleBookRequest, options).then((request) => request(this.axios, this.basePath)); } /** * * @summary Find all rule books * @param {*} [options] Override http request option. * @throws {RequiredError} */ public findAllRuleBooks(options?: RawAxiosRequestConfig) { return RuleBookApiFp(this.configuration).findAllRuleBooks(options).then((request) => request(this.axios, this.basePath)); } /** * * @summary Find a rule book by its id * @param {string} ruleBookId Id of the rule book * @param {*} [options] Override http request option. * @throws {RequiredError} */ public findRuleBookById(ruleBookId: string, options?: RawAxiosRequestConfig) { return RuleBookApiFp(this.configuration).findRuleBookById(ruleBookId, options).then((request) => request(this.axios, this.basePath)); } /** * * @summary Update a rule book * @param {string} ruleBookId Id of the rule book * @param {UpdateRuleBookRequest} updateRuleBookRequest New state of the rule book * @param {*} [options] Override http request option. * @throws {RequiredError} */ public updateRuleBook(ruleBookId: string, updateRuleBookRequest: UpdateRuleBookRequest, options?: RawAxiosRequestConfig) { return RuleBookApiFp(this.configuration).updateRuleBook(ruleBookId, updateRuleBookRequest, options).then((request) => request(this.axios, this.basePath)); } } /** * TransactionApi - axios parameter creator */ export const TransactionApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * * @summary Find all transactions in a ledger * @param {string} ledgerId Id of the ledger * @param {*} [options] Override http request option. * @throws {RequiredError} */ finAllTransactionsInLedger: async (ledgerId: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'ledgerId' is not null or undefined assertParamExists('finAllTransactionsInLedger', 'ledgerId', ledgerId) const localVarPath = `/ledgers/{ledgerId}/transactions` .replace('{ledgerId}', encodeURIComponent(String(ledgerId))); // 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'] = '*/*'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, } }; /** * TransactionApi - functional programming interface */ export const TransactionApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = TransactionApiAxiosParamCreator(configuration) return { /** * * @summary Find all transactions in a ledger * @param {string} ledgerId Id of the ledger * @param {*} [options] Override http request option. * @throws {RequiredError} */ async finAllTransactionsInLedger(ledgerId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.finAllTransactionsInLedger(ledgerId, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['TransactionApi.finAllTransactionsInLedger']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } }; /** * TransactionApi - factory interface */ export const TransactionApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = TransactionApiFp(configuration) return { /** * * @summary Find all transactions in a ledger * @param {string} ledgerId Id of the ledger * @param {*} [options] Override http request option. * @throws {RequiredError} */ finAllTransactionsInLedger(ledgerId: string, options?: RawAxiosRequestConfig): AxiosPromise> { return localVarFp.finAllTransactionsInLedger(ledgerId, options).then((request) => request(axios, basePath)); }, }; }; /** * TransactionApi - object-oriented interface */ export class TransactionApi extends BaseAPI { /** * * @summary Find all transactions in a ledger * @param {string} ledgerId Id of the ledger * @param {*} [options] Override http request option. * @throws {RequiredError} */ public finAllTransactionsInLedger(ledgerId: string, options?: RawAxiosRequestConfig) { return TransactionApiFp(this.configuration).finAllTransactionsInLedger(ledgerId, options).then((request) => request(this.axios, this.basePath)); } }