Compare commits
2
Commits
9915189d6e
...
206e6b3fa4
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
206e6b3fa4 | ||
|
|
62c0e1aab2 |
No files matched your search
+7
-12
@@ -959,7 +959,7 @@ paths:
|
||||
/ledgers/{ledgerId}/profit:
|
||||
get:
|
||||
tags:
|
||||
- transaction
|
||||
- profit
|
||||
summary: Get the daily profit series for a single ledger
|
||||
operationId: profitPerDayInLedger
|
||||
parameters:
|
||||
@@ -987,8 +987,8 @@ paths:
|
||||
/ledgers/{ledgerId}/margin:
|
||||
get:
|
||||
tags:
|
||||
- transaction
|
||||
summary: Get the daily FIFO-realized profit series for a single ledger
|
||||
- profit
|
||||
summary: Get the daily FIFO-realized margin series for a single ledger
|
||||
operationId: marginPerDayInLedger
|
||||
parameters:
|
||||
- name: ledgerId
|
||||
@@ -1000,10 +1000,10 @@ paths:
|
||||
format: uuid
|
||||
responses:
|
||||
"200":
|
||||
description: "Daily FIFO-realized profit for the ledger, ascending by date,\
|
||||
\ only for days with a sale. iskIn is the sum of that day's profitable\
|
||||
\ trades, iskOut is the sum of that day's losing trades (as a positive\
|
||||
\ deficit); profit is iskIn minus iskOut."
|
||||
description: "Daily FIFO-realized margin for the ledger, ascending by date,\
|
||||
\ only for days with a consumption. iskIn is the sum of that day's profitable\
|
||||
\ consumptions, iskOut is the sum of that day's losing consumptions (as\
|
||||
\ a positive deficit); profit is iskIn minus iskOut."
|
||||
content:
|
||||
'*/*':
|
||||
schema:
|
||||
@@ -2310,10 +2310,6 @@ components:
|
||||
format: uuid
|
||||
description: Ledger the acquisition is held in.
|
||||
example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
|
||||
source:
|
||||
$ref: "#/components/schemas/ActivitySourceResponse"
|
||||
description: "Where the acquisition came from: a character, a corporation,\
|
||||
\ or nothing."
|
||||
marketTypeId:
|
||||
type: integer
|
||||
format: int64
|
||||
@@ -2345,5 +2341,4 @@ components:
|
||||
- marketTypeId
|
||||
- quantity
|
||||
- remaining
|
||||
- source
|
||||
- unitCost
|
||||
+169
-140
@@ -35,10 +35,6 @@ export interface AcquisitionResponse {
|
||||
* Ledger the acquisition is held in.
|
||||
*/
|
||||
'ledgerId': string;
|
||||
/**
|
||||
* Where the acquisition came from: a character, a corporation, or nothing.
|
||||
*/
|
||||
'source': ActivitySourceResponse;
|
||||
/**
|
||||
* EVE market type (item) id that was acquired.
|
||||
*/
|
||||
@@ -3636,6 +3632,175 @@ export class MarketHistoryAdminControllerApi extends BaseAPI {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* ProfitApi - axios parameter creator
|
||||
*/
|
||||
export const ProfitApiAxiosParamCreator = function (configuration?: Configuration) {
|
||||
return {
|
||||
/**
|
||||
*
|
||||
* @summary Get the daily FIFO-realized margin series for a single ledger
|
||||
* @param {string} ledgerId Id of the ledger
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
marginPerDayInLedger: async (ledgerId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'ledgerId' is not null or undefined
|
||||
assertParamExists('marginPerDayInLedger', 'ledgerId', ledgerId)
|
||||
const localVarPath = `/ledgers/{ledgerId}/margin`
|
||||
.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 Get the daily profit series for a single ledger
|
||||
* @param {string} ledgerId Id of the ledger
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
profitPerDayInLedger: async (ledgerId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'ledgerId' is not null or undefined
|
||||
assertParamExists('profitPerDayInLedger', 'ledgerId', ledgerId)
|
||||
const localVarPath = `/ledgers/{ledgerId}/profit`
|
||||
.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,
|
||||
};
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* ProfitApi - functional programming interface
|
||||
*/
|
||||
export const ProfitApiFp = function(configuration?: Configuration) {
|
||||
const localVarAxiosParamCreator = ProfitApiAxiosParamCreator(configuration)
|
||||
return {
|
||||
/**
|
||||
*
|
||||
* @summary Get the daily FIFO-realized margin series for a single ledger
|
||||
* @param {string} ledgerId Id of the ledger
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async marginPerDayInLedger(ledgerId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<DailyProfitResponse>>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.marginPerDayInLedger(ledgerId, options);
|
||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||
const localVarOperationServerBasePath = operationServerMap['ProfitApi.marginPerDayInLedger']?.[localVarOperationServerIndex]?.url;
|
||||
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary Get the daily profit series for a single ledger
|
||||
* @param {string} ledgerId Id of the ledger
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async profitPerDayInLedger(ledgerId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<DailyProfitResponse>>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.profitPerDayInLedger(ledgerId, options);
|
||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||
const localVarOperationServerBasePath = operationServerMap['ProfitApi.profitPerDayInLedger']?.[localVarOperationServerIndex]?.url;
|
||||
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* ProfitApi - factory interface
|
||||
*/
|
||||
export const ProfitApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
||||
const localVarFp = ProfitApiFp(configuration)
|
||||
return {
|
||||
/**
|
||||
*
|
||||
* @summary Get the daily FIFO-realized margin series for a single ledger
|
||||
* @param {string} ledgerId Id of the ledger
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
marginPerDayInLedger(ledgerId: string, options?: RawAxiosRequestConfig): AxiosPromise<Array<DailyProfitResponse>> {
|
||||
return localVarFp.marginPerDayInLedger(ledgerId, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary Get the daily profit series for a single ledger
|
||||
* @param {string} ledgerId Id of the ledger
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
profitPerDayInLedger(ledgerId: string, options?: RawAxiosRequestConfig): AxiosPromise<Array<DailyProfitResponse>> {
|
||||
return localVarFp.profitPerDayInLedger(ledgerId, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* ProfitApi - object-oriented interface
|
||||
*/
|
||||
export class ProfitApi extends BaseAPI {
|
||||
/**
|
||||
*
|
||||
* @summary Get the daily FIFO-realized margin series for a single ledger
|
||||
* @param {string} ledgerId Id of the ledger
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
public marginPerDayInLedger(ledgerId: string, options?: RawAxiosRequestConfig) {
|
||||
return ProfitApiFp(this.configuration).marginPerDayInLedger(ledgerId, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary Get the daily profit series for a single ledger
|
||||
* @param {string} ledgerId Id of the ledger
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
public profitPerDayInLedger(ledgerId: string, options?: RawAxiosRequestConfig) {
|
||||
return ProfitApiFp(this.configuration).profitPerDayInLedger(ledgerId, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* ReprocessingApi - axios parameter creator
|
||||
*/
|
||||
@@ -4192,74 +4357,6 @@ export const TransactionApiAxiosParamCreator = function (configuration?: Configu
|
||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary Get the daily FIFO-realized profit series for a single ledger
|
||||
* @param {string} ledgerId Id of the ledger
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
marginPerDayInLedger: async (ledgerId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'ledgerId' is not null or undefined
|
||||
assertParamExists('marginPerDayInLedger', 'ledgerId', ledgerId)
|
||||
const localVarPath = `/ledgers/{ledgerId}/margin`
|
||||
.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 Get the daily profit series for a single ledger
|
||||
* @param {string} ledgerId Id of the ledger
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
profitPerDayInLedger: async (ledgerId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'ledgerId' is not null or undefined
|
||||
assertParamExists('profitPerDayInLedger', 'ledgerId', ledgerId)
|
||||
const localVarPath = `/ledgers/{ledgerId}/profit`
|
||||
.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,
|
||||
@@ -4287,32 +4384,6 @@ export const TransactionApiFp = function(configuration?: Configuration) {
|
||||
const localVarOperationServerBasePath = operationServerMap['TransactionApi.finAllTransactionsInLedger']?.[localVarOperationServerIndex]?.url;
|
||||
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary Get the daily FIFO-realized profit series for a single ledger
|
||||
* @param {string} ledgerId Id of the ledger
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async marginPerDayInLedger(ledgerId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<DailyProfitResponse>>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.marginPerDayInLedger(ledgerId, options);
|
||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||
const localVarOperationServerBasePath = operationServerMap['TransactionApi.marginPerDayInLedger']?.[localVarOperationServerIndex]?.url;
|
||||
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary Get the daily profit series for a single ledger
|
||||
* @param {string} ledgerId Id of the ledger
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async profitPerDayInLedger(ledgerId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<DailyProfitResponse>>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.profitPerDayInLedger(ledgerId, options);
|
||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||
const localVarOperationServerBasePath = operationServerMap['TransactionApi.profitPerDayInLedger']?.[localVarOperationServerIndex]?.url;
|
||||
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
@@ -4332,26 +4403,6 @@ export const TransactionApiFactory = function (configuration?: Configuration, ba
|
||||
finAllTransactionsInLedger(ledgerId: string, options?: RawAxiosRequestConfig): AxiosPromise<Array<TransactionResponse>> {
|
||||
return localVarFp.finAllTransactionsInLedger(ledgerId, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary Get the daily FIFO-realized profit series for a single ledger
|
||||
* @param {string} ledgerId Id of the ledger
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
marginPerDayInLedger(ledgerId: string, options?: RawAxiosRequestConfig): AxiosPromise<Array<DailyProfitResponse>> {
|
||||
return localVarFp.marginPerDayInLedger(ledgerId, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary Get the daily profit series for a single ledger
|
||||
* @param {string} ledgerId Id of the ledger
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
profitPerDayInLedger(ledgerId: string, options?: RawAxiosRequestConfig): AxiosPromise<Array<DailyProfitResponse>> {
|
||||
return localVarFp.profitPerDayInLedger(ledgerId, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
@@ -4369,28 +4420,6 @@ export class TransactionApi extends BaseAPI {
|
||||
public finAllTransactionsInLedger(ledgerId: string, options?: RawAxiosRequestConfig) {
|
||||
return TransactionApiFp(this.configuration).finAllTransactionsInLedger(ledgerId, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary Get the daily FIFO-realized profit series for a single ledger
|
||||
* @param {string} ledgerId Id of the ledger
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
public marginPerDayInLedger(ledgerId: string, options?: RawAxiosRequestConfig) {
|
||||
return TransactionApiFp(this.configuration).marginPerDayInLedger(ledgerId, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary Get the daily profit series for a single ledger
|
||||
* @param {string} ledgerId Id of the ledger
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
public profitPerDayInLedger(ledgerId: string, options?: RawAxiosRequestConfig) {
|
||||
return TransactionApiFp(this.configuration).profitPerDayInLedger(ledgerId, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@ import {
|
||||
LocationApi,
|
||||
MarketApi,
|
||||
MeResponse,
|
||||
ProfitApi,
|
||||
ReprocessingApi,
|
||||
RuleBookApi,
|
||||
RuleScriptApi,
|
||||
@@ -108,6 +109,7 @@ export const postLogout = (): Promise<void> =>
|
||||
|
||||
export const ledgerApi = new LedgerApi(undefined, mammonUrl, mammonAxiosInstance);
|
||||
export const transactionApi = new TransactionApi(undefined, mammonUrl, mammonAxiosInstance);
|
||||
export const profitApi = new ProfitApi(undefined, mammonUrl, mammonAxiosInstance);
|
||||
export const characterApi = new CharacterApi(undefined, mammonUrl, mammonAxiosInstance);
|
||||
export const corporationApi = new CorporationApi(undefined, mammonUrl, mammonAxiosInstance);
|
||||
export const ruleBookApi = new RuleBookApi(undefined, mammonUrl, mammonAxiosInstance);
|
||||
|
||||
@@ -18,7 +18,7 @@ import {
|
||||
} from "chart.js";
|
||||
import {Chart} from "vue-chartjs";
|
||||
import {useLedgerParam} from "@/ledger";
|
||||
import {transactionApi} from "@/mammon";
|
||||
import {profitApi} from "@/mammon";
|
||||
import {useProcessedResource} from "@/activity";
|
||||
import {DailyProfitResponse} from "@/generated/mammon";
|
||||
import {IskLabel} from "@/market";
|
||||
@@ -48,8 +48,8 @@ const profits = useProcessedResource<DailyProfitResponse[]>(async () => {
|
||||
}
|
||||
|
||||
const {data} = mode.value === ProfitModes.Margin
|
||||
? await transactionApi.marginPerDayInLedger(ledgerId.value)
|
||||
: await transactionApi.profitPerDayInLedger(ledgerId.value);
|
||||
? await profitApi.marginPerDayInLedger(ledgerId.value)
|
||||
: await profitApi.profitPerDayInLedger(ledgerId.value);
|
||||
|
||||
return data;
|
||||
}, []);
|
||||
|
||||
Reference in new issue
Block a user