corporation transactions + cleanup
This commit is contained in:
+46
-86
@@ -59,15 +59,7 @@ export interface CombinedLedgerResponse extends LedgerResponse {
|
||||
'name': string;
|
||||
'balance': number;
|
||||
'memberLedgerIds': Array<string>;
|
||||
'type'?: CombinedLedgerResponseTypeEnum;
|
||||
}
|
||||
|
||||
export const CombinedLedgerResponseTypeEnum = {
|
||||
Combined: 'COMBINED',
|
||||
} as const;
|
||||
|
||||
export type CombinedLedgerResponseTypeEnum = typeof CombinedLedgerResponseTypeEnum[keyof typeof CombinedLedgerResponseTypeEnum];
|
||||
|
||||
export interface CreateCombinedLedgerRequest {
|
||||
'name': string;
|
||||
'memberLedgerIds': Array<string>;
|
||||
@@ -77,82 +69,32 @@ export interface CreateMainLedgerRequest {
|
||||
}
|
||||
export interface CreateRuleBookRequest {
|
||||
'name': string;
|
||||
'usedForAcquisitions': boolean;
|
||||
'ledgerRefs': Array<string>;
|
||||
'rules': { [key: string]: RuleResponse; };
|
||||
}
|
||||
/**
|
||||
* @type FindAllLedgers200ResponseInner
|
||||
*/
|
||||
export type FindAllLedgers200ResponseInner = CombinedLedgerResponse | MainLedgerResponse;
|
||||
export interface IskRuleClauseResponse extends RuleClauseResponse {
|
||||
'fromLedgerRef': string;
|
||||
'toLedgerRef': string;
|
||||
}
|
||||
|
||||
|
||||
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<string>;
|
||||
'rules': { [key: string]: RuleResponse; };
|
||||
}
|
||||
export interface RuleClauseResponse {
|
||||
'rate': RuleClauseResponseRateEnum;
|
||||
export interface ItemExchangeRuleClauseResponse extends RuleClauseResponse {
|
||||
'rate': ItemExchangeRuleClauseResponseRateEnum;
|
||||
'fromLedgerRef': string;
|
||||
'toLedgerRef': string;
|
||||
}
|
||||
|
||||
export const RuleClauseResponseRateEnum = {
|
||||
export const ItemExchangeRuleClauseResponseRateEnum = {
|
||||
None: 'NONE',
|
||||
Value: 'VALUE',
|
||||
JitaBuy: 'JITA_BUY',
|
||||
@@ -160,7 +102,35 @@ export const RuleClauseResponseRateEnum = {
|
||||
EveEstimate: 'EVE_ESTIMATE',
|
||||
} as const;
|
||||
|
||||
export type RuleClauseResponseRateEnum = typeof RuleClauseResponseRateEnum[keyof typeof RuleClauseResponseRateEnum];
|
||||
export type ItemExchangeRuleClauseResponseRateEnum = typeof ItemExchangeRuleClauseResponseRateEnum[keyof typeof ItemExchangeRuleClauseResponseRateEnum];
|
||||
|
||||
export interface ItemTransferResponse extends TransferResponse {
|
||||
'fromLedgerId': string;
|
||||
'toLedgerId': string;
|
||||
'marketTypeId': number;
|
||||
'quantity': number;
|
||||
}
|
||||
/**
|
||||
* @type LedgerResponse
|
||||
*/
|
||||
export type LedgerResponse = { type: 'COMBINED' } & CombinedLedgerResponse | { type: 'MAIN' } & MainLedgerResponse;
|
||||
|
||||
export interface MainLedgerResponse extends LedgerResponse {
|
||||
'ledgerId': string;
|
||||
'name': string;
|
||||
'balance': number;
|
||||
}
|
||||
export interface RuleBookResponse {
|
||||
'ruleBookId': string;
|
||||
'name': string;
|
||||
'usedForAcquisitions': boolean;
|
||||
'ledgerRefs': Array<string>;
|
||||
'rules': { [key: string]: RuleResponse; };
|
||||
}
|
||||
/**
|
||||
* @type RuleClauseResponse
|
||||
*/
|
||||
export type RuleClauseResponse = { type: 'ISK' } & IskRuleClauseResponse | { type: 'ITEM_EXCHANGE' } & ItemExchangeRuleClauseResponse;
|
||||
|
||||
export interface RuleResponse {
|
||||
'clauses': Array<RuleClauseResponse>;
|
||||
@@ -174,23 +144,12 @@ export interface TransactionResponse {
|
||||
'characterId': number;
|
||||
'datetime': string;
|
||||
'description': string;
|
||||
'transfers': Array<TransactionResponseTransfersInner>;
|
||||
'transfers': Array<TransferResponse>;
|
||||
}
|
||||
/**
|
||||
* @type TransactionResponseTransfersInner
|
||||
* @type TransferResponse
|
||||
*/
|
||||
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 type TransferResponse = { type: 'ISK' } & IskTransferResponse | { type: 'ITEM' } & ItemTransferResponse;
|
||||
|
||||
export interface UpdateCombinedLedgerRequest {
|
||||
'name': string;
|
||||
@@ -201,6 +160,7 @@ export interface UpdateMainLedgerRequest {
|
||||
}
|
||||
export interface UpdateRuleBookRequest {
|
||||
'name': string;
|
||||
'usedForAcquisitions': boolean;
|
||||
'ledgerRefs': Array<string>;
|
||||
'rules': { [key: string]: RuleResponse; };
|
||||
}
|
||||
@@ -1022,7 +982,7 @@ export const LedgerApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async findAllLedgers(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<FindAllLedgers200ResponseInner>>> {
|
||||
async findAllLedgers(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<LedgerResponse>>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.findAllLedgers(options);
|
||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||
const localVarOperationServerBasePath = operationServerMap['LedgerApi.findAllLedgers']?.[localVarOperationServerIndex]?.url;
|
||||
@@ -1048,7 +1008,7 @@ export const LedgerApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async findLedgerById(ledgerId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<FindAllLedgers200ResponseInner>> {
|
||||
async findLedgerById(ledgerId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<LedgerResponse>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.findLedgerById(ledgerId, options);
|
||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||
const localVarOperationServerBasePath = operationServerMap['LedgerApi.findLedgerById']?.[localVarOperationServerIndex]?.url;
|
||||
@@ -1117,7 +1077,7 @@ export const LedgerApiFactory = function (configuration?: Configuration, basePat
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
findAllLedgers(options?: RawAxiosRequestConfig): AxiosPromise<Array<FindAllLedgers200ResponseInner>> {
|
||||
findAllLedgers(options?: RawAxiosRequestConfig): AxiosPromise<Array<LedgerResponse>> {
|
||||
return localVarFp.findAllLedgers(options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
@@ -1137,7 +1097,7 @@ export const LedgerApiFactory = function (configuration?: Configuration, basePat
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
findLedgerById(ledgerId: string, options?: RawAxiosRequestConfig): AxiosPromise<FindAllLedgers200ResponseInner> {
|
||||
findLedgerById(ledgerId: string, options?: RawAxiosRequestConfig): AxiosPromise<LedgerResponse> {
|
||||
return localVarFp.findLedgerById(ledgerId, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user