transaction list api
This commit is contained in:
@@ -63,6 +63,33 @@ export interface CreateRuleBookRequest {
|
||||
*/
|
||||
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 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;
|
||||
}
|
||||
@@ -116,6 +143,28 @@ export interface SetCharacterRuleBookRequest {
|
||||
'ruleBookId': string;
|
||||
'bindings': { [key: string]: string; };
|
||||
}
|
||||
export interface TransactionResponse {
|
||||
'transactionId': string;
|
||||
'datetime': string;
|
||||
'description': string;
|
||||
'transfers': Array<TransactionResponseTransfersInner>;
|
||||
}
|
||||
/**
|
||||
* @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<string>;
|
||||
@@ -1292,3 +1341,100 @@ export class RuleBookApi extends BaseAPI {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* TransactionApi - axios parameter creator
|
||||
*/
|
||||
export const TransactionApiAxiosParamCreator = function (configuration?: Configuration) {
|
||||
return {
|
||||
/**
|
||||
*
|
||||
* @param {string} ledgerId
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
finAllTransactionsInLedger: async (ledgerId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// 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 {
|
||||
/**
|
||||
*
|
||||
* @param {string} ledgerId
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async finAllTransactionsInLedger(ledgerId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<TransactionResponse>>> {
|
||||
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 {
|
||||
/**
|
||||
*
|
||||
* @param {string} ledgerId
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
finAllTransactionsInLedger(ledgerId: string, options?: RawAxiosRequestConfig): AxiosPromise<Array<TransactionResponse>> {
|
||||
return localVarFp.finAllTransactionsInLedger(ledgerId, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* TransactionApi - object-oriented interface
|
||||
*/
|
||||
export class TransactionApi extends BaseAPI {
|
||||
/**
|
||||
*
|
||||
* @param {string} ledgerId
|
||||
* @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));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user