feat(#10): Add per-ledger acquisitions view + ledger column
This commit is contained in:
+23
-31
@@ -31,6 +31,10 @@ export interface AcquisitionResponse {
|
||||
* Unique acquisition identifier.
|
||||
*/
|
||||
'acquisitionId': string;
|
||||
/**
|
||||
* Ledger the acquisition is held in.
|
||||
*/
|
||||
'ledgerId': string;
|
||||
/**
|
||||
* Where the acquisition came from: a character, a corporation, or nothing.
|
||||
*/
|
||||
@@ -39,10 +43,6 @@ export interface AcquisitionResponse {
|
||||
* EVE market type (item) id that was acquired.
|
||||
*/
|
||||
'marketTypeId': number;
|
||||
/**
|
||||
* How the item entered the inventory.
|
||||
*/
|
||||
'origin': AcquisitionResponseOriginEnum;
|
||||
/**
|
||||
* When the acquisition occurred.
|
||||
*/
|
||||
@@ -60,14 +60,6 @@ export interface AcquisitionResponse {
|
||||
*/
|
||||
'unitCost': number;
|
||||
}
|
||||
|
||||
export const AcquisitionResponseOriginEnum = {
|
||||
Bought: 'BOUGHT',
|
||||
Manual: 'MANUAL',
|
||||
} as const;
|
||||
|
||||
export type AcquisitionResponseOriginEnum = typeof AcquisitionResponseOriginEnum[keyof typeof AcquisitionResponseOriginEnum];
|
||||
|
||||
/**
|
||||
* Where an activity or transaction came from: a character, a corporation wallet, or nothing (a manual entry).
|
||||
*/
|
||||
@@ -612,10 +604,6 @@ export interface RuleBookResponse {
|
||||
* Owning user identifier.
|
||||
*/
|
||||
'userId': string;
|
||||
/**
|
||||
* Whether this rule book is used to derive acquisitions.
|
||||
*/
|
||||
'usedForAcquisitions': boolean;
|
||||
/**
|
||||
* Ledger references the script writes to, each bound to one of the user\'s ledgers.
|
||||
*/
|
||||
@@ -682,10 +670,6 @@ export interface UpdateMainLedgerRequest {
|
||||
* Request to update the caller\'s rule book; replaces its mutable fields.
|
||||
*/
|
||||
export interface UpdateRuleBookRequest {
|
||||
/**
|
||||
* Whether this rule book is used to derive acquisitions.
|
||||
*/
|
||||
'usedForAcquisitions': boolean;
|
||||
/**
|
||||
* Ledger references the script writes to, each bound to one of the user\'s ledgers.
|
||||
*/
|
||||
@@ -703,13 +687,14 @@ export const AcquisitionApiAxiosParamCreator = function (configuration?: Configu
|
||||
return {
|
||||
/**
|
||||
*
|
||||
* @summary Find acquisitions, optionally filtered by market type and consumption state
|
||||
* @summary Find the caller\'s acquisitions, optionally filtered by ledger, market type and consumption state
|
||||
* @param {string} [ledgerId] Only return acquisitions held in this ledger
|
||||
* @param {number} [marketTypeId] Only return acquisitions of this market type
|
||||
* @param {boolean} [includeConsumed] Include fully consumed acquisitions (no remaining stock)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
findAllAcquisitions: async (marketTypeId?: number, includeConsumed?: boolean, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
findAllAcquisitions: async (ledgerId?: string, marketTypeId?: number, includeConsumed?: boolean, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
const localVarPath = `/acquisitions`;
|
||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
||||
@@ -722,6 +707,10 @@ export const AcquisitionApiAxiosParamCreator = function (configuration?: Configu
|
||||
const localVarHeaderParameter = {} as any;
|
||||
const localVarQueryParameter = {} as any;
|
||||
|
||||
if (ledgerId !== undefined) {
|
||||
localVarQueryParameter['ledgerId'] = ledgerId;
|
||||
}
|
||||
|
||||
if (marketTypeId !== undefined) {
|
||||
localVarQueryParameter['marketTypeId'] = marketTypeId;
|
||||
}
|
||||
@@ -752,14 +741,15 @@ export const AcquisitionApiFp = function(configuration?: Configuration) {
|
||||
return {
|
||||
/**
|
||||
*
|
||||
* @summary Find acquisitions, optionally filtered by market type and consumption state
|
||||
* @summary Find the caller\'s acquisitions, optionally filtered by ledger, market type and consumption state
|
||||
* @param {string} [ledgerId] Only return acquisitions held in this ledger
|
||||
* @param {number} [marketTypeId] Only return acquisitions of this market type
|
||||
* @param {boolean} [includeConsumed] Include fully consumed acquisitions (no remaining stock)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async findAllAcquisitions(marketTypeId?: number, includeConsumed?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<AcquisitionResponse>>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.findAllAcquisitions(marketTypeId, includeConsumed, options);
|
||||
async findAllAcquisitions(ledgerId?: string, marketTypeId?: number, includeConsumed?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<AcquisitionResponse>>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.findAllAcquisitions(ledgerId, marketTypeId, includeConsumed, options);
|
||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||
const localVarOperationServerBasePath = operationServerMap['AcquisitionApi.findAllAcquisitions']?.[localVarOperationServerIndex]?.url;
|
||||
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
||||
@@ -775,14 +765,15 @@ export const AcquisitionApiFactory = function (configuration?: Configuration, ba
|
||||
return {
|
||||
/**
|
||||
*
|
||||
* @summary Find acquisitions, optionally filtered by market type and consumption state
|
||||
* @summary Find the caller\'s acquisitions, optionally filtered by ledger, market type and consumption state
|
||||
* @param {string} [ledgerId] Only return acquisitions held in this ledger
|
||||
* @param {number} [marketTypeId] Only return acquisitions of this market type
|
||||
* @param {boolean} [includeConsumed] Include fully consumed acquisitions (no remaining stock)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
findAllAcquisitions(marketTypeId?: number, includeConsumed?: boolean, options?: RawAxiosRequestConfig): AxiosPromise<Array<AcquisitionResponse>> {
|
||||
return localVarFp.findAllAcquisitions(marketTypeId, includeConsumed, options).then((request) => request(axios, basePath));
|
||||
findAllAcquisitions(ledgerId?: string, marketTypeId?: number, includeConsumed?: boolean, options?: RawAxiosRequestConfig): AxiosPromise<Array<AcquisitionResponse>> {
|
||||
return localVarFp.findAllAcquisitions(ledgerId, marketTypeId, includeConsumed, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
};
|
||||
};
|
||||
@@ -793,14 +784,15 @@ export const AcquisitionApiFactory = function (configuration?: Configuration, ba
|
||||
export class AcquisitionApi extends BaseAPI {
|
||||
/**
|
||||
*
|
||||
* @summary Find acquisitions, optionally filtered by market type and consumption state
|
||||
* @summary Find the caller\'s acquisitions, optionally filtered by ledger, market type and consumption state
|
||||
* @param {string} [ledgerId] Only return acquisitions held in this ledger
|
||||
* @param {number} [marketTypeId] Only return acquisitions of this market type
|
||||
* @param {boolean} [includeConsumed] Include fully consumed acquisitions (no remaining stock)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
public findAllAcquisitions(marketTypeId?: number, includeConsumed?: boolean, options?: RawAxiosRequestConfig) {
|
||||
return AcquisitionApiFp(this.configuration).findAllAcquisitions(marketTypeId, includeConsumed, options).then((request) => request(this.axios, this.basePath));
|
||||
public findAllAcquisitions(ledgerId?: string, marketTypeId?: number, includeConsumed?: boolean, options?: RawAxiosRequestConfig) {
|
||||
return AcquisitionApiFp(this.configuration).findAllAcquisitions(ledgerId, marketTypeId, includeConsumed, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user