ledger list and modal
This commit is contained in:
@@ -0,0 +1,270 @@
|
||||
/* 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 CombiningLedgerDto extends LedgerDto {
|
||||
'ledgerId': number;
|
||||
'name': string;
|
||||
'memberLedgerIds': Array<number>;
|
||||
}
|
||||
export interface CreateCombiningLedgerCommand {
|
||||
'name': string;
|
||||
'memberLedgerIds': Array<number>;
|
||||
}
|
||||
export interface CreateMainLedgerCommand {
|
||||
'name': string;
|
||||
}
|
||||
/**
|
||||
* @type FindAll200ResponseInner
|
||||
*/
|
||||
export type FindAll200ResponseInner = CombiningLedgerDto | MainLedgerDto;
|
||||
|
||||
export interface LedgerDto {
|
||||
'type': string;
|
||||
}
|
||||
export interface MainLedgerDto extends LedgerDto {
|
||||
'ledgerId': number;
|
||||
'name': string;
|
||||
}
|
||||
|
||||
/**
|
||||
* LegerControllerApi - axios parameter creator
|
||||
*/
|
||||
export const LegerControllerApiAxiosParamCreator = function (configuration?: Configuration) {
|
||||
return {
|
||||
/**
|
||||
*
|
||||
* @param {CreateCombiningLedgerCommand} createCombiningLedgerCommand
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createCombiningLedger: async (createCombiningLedgerCommand: CreateCombiningLedgerCommand, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'createCombiningLedgerCommand' is not null or undefined
|
||||
assertParamExists('createCombiningLedger', 'createCombiningLedgerCommand', createCombiningLedgerCommand)
|
||||
const localVarPath = `/ledgers/combining`;
|
||||
// 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(createCombiningLedgerCommand, localVarRequestOptions, configuration)
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @param {CreateMainLedgerCommand} createMainLedgerCommand
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createMainLedger: async (createMainLedgerCommand: CreateMainLedgerCommand, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'createMainLedgerCommand' is not null or undefined
|
||||
assertParamExists('createMainLedger', 'createMainLedgerCommand', createMainLedgerCommand)
|
||||
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(createMainLedgerCommand, localVarRequestOptions, configuration)
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
findAll: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
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,
|
||||
};
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* LegerControllerApi - functional programming interface
|
||||
*/
|
||||
export const LegerControllerApiFp = function(configuration?: Configuration) {
|
||||
const localVarAxiosParamCreator = LegerControllerApiAxiosParamCreator(configuration)
|
||||
return {
|
||||
/**
|
||||
*
|
||||
* @param {CreateCombiningLedgerCommand} createCombiningLedgerCommand
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async createCombiningLedger(createCombiningLedgerCommand: CreateCombiningLedgerCommand, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CombiningLedgerDto>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.createCombiningLedger(createCombiningLedgerCommand, options);
|
||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||
const localVarOperationServerBasePath = operationServerMap['LegerControllerApi.createCombiningLedger']?.[localVarOperationServerIndex]?.url;
|
||||
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @param {CreateMainLedgerCommand} createMainLedgerCommand
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async createMainLedger(createMainLedgerCommand: CreateMainLedgerCommand, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<MainLedgerDto>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.createMainLedger(createMainLedgerCommand, options);
|
||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||
const localVarOperationServerBasePath = operationServerMap['LegerControllerApi.createMainLedger']?.[localVarOperationServerIndex]?.url;
|
||||
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async findAll(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<FindAll200ResponseInner>>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.findAll(options);
|
||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||
const localVarOperationServerBasePath = operationServerMap['LegerControllerApi.findAll']?.[localVarOperationServerIndex]?.url;
|
||||
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* LegerControllerApi - factory interface
|
||||
*/
|
||||
export const LegerControllerApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
||||
const localVarFp = LegerControllerApiFp(configuration)
|
||||
return {
|
||||
/**
|
||||
*
|
||||
* @param {CreateCombiningLedgerCommand} createCombiningLedgerCommand
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createCombiningLedger(createCombiningLedgerCommand: CreateCombiningLedgerCommand, options?: RawAxiosRequestConfig): AxiosPromise<CombiningLedgerDto> {
|
||||
return localVarFp.createCombiningLedger(createCombiningLedgerCommand, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @param {CreateMainLedgerCommand} createMainLedgerCommand
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createMainLedger(createMainLedgerCommand: CreateMainLedgerCommand, options?: RawAxiosRequestConfig): AxiosPromise<MainLedgerDto> {
|
||||
return localVarFp.createMainLedger(createMainLedgerCommand, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
findAll(options?: RawAxiosRequestConfig): AxiosPromise<Array<FindAll200ResponseInner>> {
|
||||
return localVarFp.findAll(options).then((request) => request(axios, basePath));
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* LegerControllerApi - object-oriented interface
|
||||
*/
|
||||
export class LegerControllerApi extends BaseAPI {
|
||||
/**
|
||||
*
|
||||
* @param {CreateCombiningLedgerCommand} createCombiningLedgerCommand
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
public createCombiningLedger(createCombiningLedgerCommand: CreateCombiningLedgerCommand, options?: RawAxiosRequestConfig) {
|
||||
return LegerControllerApiFp(this.configuration).createCombiningLedger(createCombiningLedgerCommand, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {CreateMainLedgerCommand} createMainLedgerCommand
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
public createMainLedger(createMainLedgerCommand: CreateMainLedgerCommand, options?: RawAxiosRequestConfig) {
|
||||
return LegerControllerApiFp(this.configuration).createMainLedger(createMainLedgerCommand, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
public findAll(options?: RawAxiosRequestConfig) {
|
||||
return LegerControllerApiFp(this.configuration).findAll(options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user