call mammon for single scan
This commit is contained in:
+137
-43
@@ -296,11 +296,11 @@ export const ActivityApiAxiosParamCreator = function (configuration?: Configurat
|
||||
/**
|
||||
*
|
||||
* @summary Fetch new activities for a character from the EVE API
|
||||
* @param {number} characterId Id of the character
|
||||
* @param {string} characterId Id of the character
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
fetchNewActivitiesForCharacter: async (characterId: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
fetchNewActivitiesForCharacter: async (characterId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'characterId' is not null or undefined
|
||||
assertParamExists('fetchNewActivitiesForCharacter', 'characterId', characterId)
|
||||
const localVarPath = `/activity/fetch/{characterId}`
|
||||
@@ -316,6 +316,7 @@ export const ActivityApiAxiosParamCreator = function (configuration?: Configurat
|
||||
const localVarHeaderParameter = {} as any;
|
||||
const localVarQueryParameter = {} as any;
|
||||
|
||||
localVarHeaderParameter['Accept'] = '*/*';
|
||||
|
||||
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
@@ -350,11 +351,11 @@ export const ActivityApiFp = function(configuration?: Configuration) {
|
||||
/**
|
||||
*
|
||||
* @summary Fetch new activities for a character from the EVE API
|
||||
* @param {number} characterId Id of the character
|
||||
* @param {string} characterId Id of the character
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async fetchNewActivitiesForCharacter(characterId: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
async fetchNewActivitiesForCharacter(characterId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.fetchNewActivitiesForCharacter(characterId, options);
|
||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||
const localVarOperationServerBasePath = operationServerMap['ActivityApi.fetchNewActivitiesForCharacter']?.[localVarOperationServerIndex]?.url;
|
||||
@@ -381,11 +382,11 @@ export const ActivityApiFactory = function (configuration?: Configuration, baseP
|
||||
/**
|
||||
*
|
||||
* @summary Fetch new activities for a character from the EVE API
|
||||
* @param {number} characterId Id of the character
|
||||
* @param {string} characterId Id of the character
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
fetchNewActivitiesForCharacter(characterId: number, options?: RawAxiosRequestConfig): AxiosPromise<void> {
|
||||
fetchNewActivitiesForCharacter(characterId: string, options?: RawAxiosRequestConfig): AxiosPromise<void> {
|
||||
return localVarFp.fetchNewActivitiesForCharacter(characterId, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
};
|
||||
@@ -408,11 +409,11 @@ export class ActivityApi extends BaseAPI {
|
||||
/**
|
||||
*
|
||||
* @summary Fetch new activities for a character from the EVE API
|
||||
* @param {number} characterId Id of the character
|
||||
* @param {string} characterId Id of the character
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
public fetchNewActivitiesForCharacter(characterId: number, options?: RawAxiosRequestConfig) {
|
||||
public fetchNewActivitiesForCharacter(characterId: string, options?: RawAxiosRequestConfig) {
|
||||
return ActivityApiFp(this.configuration).fetchNewActivitiesForCharacter(characterId, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
}
|
||||
@@ -551,11 +552,11 @@ export const CharacterRuleBookApiAxiosParamCreator = function (configuration?: C
|
||||
/**
|
||||
*
|
||||
* @summary Find the rule book assigned to a character
|
||||
* @param {number} characterId Id of the character
|
||||
* @param {string} characterId Id of the character
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
findCharacterRuleBookByCharacterId: async (characterId: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
findCharacterRuleBookByCharacterId: async (characterId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'characterId' is not null or undefined
|
||||
assertParamExists('findCharacterRuleBookByCharacterId', 'characterId', characterId)
|
||||
const localVarPath = `/characters/{characterId}/rule-book`
|
||||
@@ -585,12 +586,12 @@ export const CharacterRuleBookApiAxiosParamCreator = function (configuration?: C
|
||||
/**
|
||||
*
|
||||
* @summary Assign a rule book to a character
|
||||
* @param {number} characterId Id of the character
|
||||
* @param {string} characterId Id of the character
|
||||
* @param {SetCharacterRuleBookRequest} setCharacterRuleBookRequest Rule book and ledger bindings to assign
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
setCharacterRuleBookForCharacter: async (characterId: number, setCharacterRuleBookRequest: SetCharacterRuleBookRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
setCharacterRuleBookForCharacter: async (characterId: string, setCharacterRuleBookRequest: SetCharacterRuleBookRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'characterId' is not null or undefined
|
||||
assertParamExists('setCharacterRuleBookForCharacter', 'characterId', characterId)
|
||||
// verify required parameter 'setCharacterRuleBookRequest' is not null or undefined
|
||||
@@ -645,11 +646,11 @@ export const CharacterRuleBookApiFp = function(configuration?: Configuration) {
|
||||
/**
|
||||
*
|
||||
* @summary Find the rule book assigned to a character
|
||||
* @param {number} characterId Id of the character
|
||||
* @param {string} characterId Id of the character
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async findCharacterRuleBookByCharacterId(characterId: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CharacterRuleBookResponse>> {
|
||||
async findCharacterRuleBookByCharacterId(characterId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CharacterRuleBookResponse>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.findCharacterRuleBookByCharacterId(characterId, options);
|
||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||
const localVarOperationServerBasePath = operationServerMap['CharacterRuleBookApi.findCharacterRuleBookByCharacterId']?.[localVarOperationServerIndex]?.url;
|
||||
@@ -658,12 +659,12 @@ export const CharacterRuleBookApiFp = function(configuration?: Configuration) {
|
||||
/**
|
||||
*
|
||||
* @summary Assign a rule book to a character
|
||||
* @param {number} characterId Id of the character
|
||||
* @param {string} characterId Id of the character
|
||||
* @param {SetCharacterRuleBookRequest} setCharacterRuleBookRequest Rule book and ledger bindings to assign
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async setCharacterRuleBookForCharacter(characterId: number, setCharacterRuleBookRequest: SetCharacterRuleBookRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CharacterRuleBookResponse>> {
|
||||
async setCharacterRuleBookForCharacter(characterId: string, setCharacterRuleBookRequest: SetCharacterRuleBookRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CharacterRuleBookResponse>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.setCharacterRuleBookForCharacter(characterId, setCharacterRuleBookRequest, options);
|
||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||
const localVarOperationServerBasePath = operationServerMap['CharacterRuleBookApi.setCharacterRuleBookForCharacter']?.[localVarOperationServerIndex]?.url;
|
||||
@@ -690,22 +691,22 @@ export const CharacterRuleBookApiFactory = function (configuration?: Configurati
|
||||
/**
|
||||
*
|
||||
* @summary Find the rule book assigned to a character
|
||||
* @param {number} characterId Id of the character
|
||||
* @param {string} characterId Id of the character
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
findCharacterRuleBookByCharacterId(characterId: number, options?: RawAxiosRequestConfig): AxiosPromise<CharacterRuleBookResponse> {
|
||||
findCharacterRuleBookByCharacterId(characterId: string, options?: RawAxiosRequestConfig): AxiosPromise<CharacterRuleBookResponse> {
|
||||
return localVarFp.findCharacterRuleBookByCharacterId(characterId, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary Assign a rule book to a character
|
||||
* @param {number} characterId Id of the character
|
||||
* @param {string} characterId Id of the character
|
||||
* @param {SetCharacterRuleBookRequest} setCharacterRuleBookRequest Rule book and ledger bindings to assign
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
setCharacterRuleBookForCharacter(characterId: number, setCharacterRuleBookRequest: SetCharacterRuleBookRequest, options?: RawAxiosRequestConfig): AxiosPromise<CharacterRuleBookResponse> {
|
||||
setCharacterRuleBookForCharacter(characterId: string, setCharacterRuleBookRequest: SetCharacterRuleBookRequest, options?: RawAxiosRequestConfig): AxiosPromise<CharacterRuleBookResponse> {
|
||||
return localVarFp.setCharacterRuleBookForCharacter(characterId, setCharacterRuleBookRequest, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
};
|
||||
@@ -728,23 +729,23 @@ export class CharacterRuleBookApi extends BaseAPI {
|
||||
/**
|
||||
*
|
||||
* @summary Find the rule book assigned to a character
|
||||
* @param {number} characterId Id of the character
|
||||
* @param {string} characterId Id of the character
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
public findCharacterRuleBookByCharacterId(characterId: number, options?: RawAxiosRequestConfig) {
|
||||
public findCharacterRuleBookByCharacterId(characterId: string, options?: RawAxiosRequestConfig) {
|
||||
return CharacterRuleBookApiFp(this.configuration).findCharacterRuleBookByCharacterId(characterId, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary Assign a rule book to a character
|
||||
* @param {number} characterId Id of the character
|
||||
* @param {string} characterId Id of the character
|
||||
* @param {SetCharacterRuleBookRequest} setCharacterRuleBookRequest Rule book and ledger bindings to assign
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
public setCharacterRuleBookForCharacter(characterId: number, setCharacterRuleBookRequest: SetCharacterRuleBookRequest, options?: RawAxiosRequestConfig) {
|
||||
public setCharacterRuleBookForCharacter(characterId: string, setCharacterRuleBookRequest: SetCharacterRuleBookRequest, options?: RawAxiosRequestConfig) {
|
||||
return CharacterRuleBookApiFp(this.configuration).setCharacterRuleBookForCharacter(characterId, setCharacterRuleBookRequest, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
}
|
||||
@@ -1279,11 +1280,11 @@ export const MarketApiAxiosParamCreator = function (configuration?: Configuratio
|
||||
/**
|
||||
*
|
||||
* @summary Return the current Jita order book (highest buy, lowest sell, order count) for each requested market type
|
||||
* @param {Array<number>} types Market type ids to price, e.g. types=34,35
|
||||
* @param {string} types Market type ids to price, e.g. types=34,35
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
currentPrices: async (types: Array<number>, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
currentPrices: async (types: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'types' is not null or undefined
|
||||
assertParamExists('currentPrices', 'types', types)
|
||||
const localVarPath = `/market/prices`;
|
||||
@@ -1298,7 +1299,7 @@ export const MarketApiAxiosParamCreator = function (configuration?: Configuratio
|
||||
const localVarHeaderParameter = {} as any;
|
||||
const localVarQueryParameter = {} as any;
|
||||
|
||||
if (types) {
|
||||
if (types !== undefined) {
|
||||
localVarQueryParameter['types'] = types;
|
||||
}
|
||||
|
||||
@@ -1316,12 +1317,12 @@ export const MarketApiAxiosParamCreator = function (configuration?: Configuratio
|
||||
/**
|
||||
*
|
||||
* @summary Find the market history of a type, most recent first
|
||||
* @param {number} marketTypeId Id of the market type
|
||||
* @param {string} marketTypeId Id of the market type
|
||||
* @param {number} [days] Optional number of most recent days to return; omit for the full history
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
findHistory: async (marketTypeId: number, days?: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
findHistory: async (marketTypeId: string, days?: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'marketTypeId' is not null or undefined
|
||||
assertParamExists('findHistory', 'marketTypeId', marketTypeId)
|
||||
const localVarPath = `/market/{marketTypeId}/history`
|
||||
@@ -1392,6 +1393,55 @@ export const MarketApiAxiosParamCreator = function (configuration?: Configuratio
|
||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary Scan a single market type, returning its volume-weighted price quartiles
|
||||
* @param {string} marketTypeId The market type id to scan
|
||||
* @param {number} [days] Number of most recent days of history to analyse
|
||||
* @param {number} [brokerFee] Broker fee as a fraction (e.g. 0.015 for 1.5%), paid on both buy and sell orders
|
||||
* @param {number} [salesTax] Sales tax as a fraction (e.g. 0.036 for 3.6%), paid on sell orders
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
scanMarketType: async (marketTypeId: string, days?: number, brokerFee?: number, salesTax?: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'marketTypeId' is not null or undefined
|
||||
assertParamExists('scanMarketType', 'marketTypeId', marketTypeId)
|
||||
const localVarPath = `/market/{marketTypeId}/scan`
|
||||
.replace('{marketTypeId}', encodeURIComponent(String(marketTypeId)));
|
||||
// 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;
|
||||
|
||||
if (days !== undefined) {
|
||||
localVarQueryParameter['days'] = days;
|
||||
}
|
||||
|
||||
if (brokerFee !== undefined) {
|
||||
localVarQueryParameter['brokerFee'] = brokerFee;
|
||||
}
|
||||
|
||||
if (salesTax !== undefined) {
|
||||
localVarQueryParameter['salesTax'] = salesTax;
|
||||
}
|
||||
|
||||
localVarHeaderParameter['Accept'] = '*/*';
|
||||
|
||||
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
@@ -1409,11 +1459,11 @@ export const MarketApiFp = function(configuration?: Configuration) {
|
||||
/**
|
||||
*
|
||||
* @summary Return the current Jita order book (highest buy, lowest sell, order count) for each requested market type
|
||||
* @param {Array<number>} types Market type ids to price, e.g. types=34,35
|
||||
* @param {string} types Market type ids to price, e.g. types=34,35
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async currentPrices(types: Array<number>, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<MarketPriceResponse>>> {
|
||||
async currentPrices(types: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<MarketPriceResponse>>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.currentPrices(types, options);
|
||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||
const localVarOperationServerBasePath = operationServerMap['MarketApi.currentPrices']?.[localVarOperationServerIndex]?.url;
|
||||
@@ -1422,12 +1472,12 @@ export const MarketApiFp = function(configuration?: Configuration) {
|
||||
/**
|
||||
*
|
||||
* @summary Find the market history of a type, most recent first
|
||||
* @param {number} marketTypeId Id of the market type
|
||||
* @param {string} marketTypeId Id of the market type
|
||||
* @param {number} [days] Optional number of most recent days to return; omit for the full history
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async findHistory(marketTypeId: number, days?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<MarketHistoryResponse>>> {
|
||||
async findHistory(marketTypeId: string, days?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<MarketHistoryResponse>>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.findHistory(marketTypeId, days, options);
|
||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||
const localVarOperationServerBasePath = operationServerMap['MarketApi.findHistory']?.[localVarOperationServerIndex]?.url;
|
||||
@@ -1448,6 +1498,22 @@ export const MarketApiFp = function(configuration?: Configuration) {
|
||||
const localVarOperationServerBasePath = operationServerMap['MarketApi.scanMarket']?.[localVarOperationServerIndex]?.url;
|
||||
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary Scan a single market type, returning its volume-weighted price quartiles
|
||||
* @param {string} marketTypeId The market type id to scan
|
||||
* @param {number} [days] Number of most recent days of history to analyse
|
||||
* @param {number} [brokerFee] Broker fee as a fraction (e.g. 0.015 for 1.5%), paid on both buy and sell orders
|
||||
* @param {number} [salesTax] Sales tax as a fraction (e.g. 0.036 for 3.6%), paid on sell orders
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async scanMarketType(marketTypeId: string, days?: number, brokerFee?: number, salesTax?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<MarketScanResponse>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.scanMarketType(marketTypeId, days, brokerFee, salesTax, options);
|
||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||
const localVarOperationServerBasePath = operationServerMap['MarketApi.scanMarketType']?.[localVarOperationServerIndex]?.url;
|
||||
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1460,22 +1526,22 @@ export const MarketApiFactory = function (configuration?: Configuration, basePat
|
||||
/**
|
||||
*
|
||||
* @summary Return the current Jita order book (highest buy, lowest sell, order count) for each requested market type
|
||||
* @param {Array<number>} types Market type ids to price, e.g. types=34,35
|
||||
* @param {string} types Market type ids to price, e.g. types=34,35
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
currentPrices(types: Array<number>, options?: RawAxiosRequestConfig): AxiosPromise<Array<MarketPriceResponse>> {
|
||||
currentPrices(types: string, options?: RawAxiosRequestConfig): AxiosPromise<Array<MarketPriceResponse>> {
|
||||
return localVarFp.currentPrices(types, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary Find the market history of a type, most recent first
|
||||
* @param {number} marketTypeId Id of the market type
|
||||
* @param {string} marketTypeId Id of the market type
|
||||
* @param {number} [days] Optional number of most recent days to return; omit for the full history
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
findHistory(marketTypeId: number, days?: number, options?: RawAxiosRequestConfig): AxiosPromise<Array<MarketHistoryResponse>> {
|
||||
findHistory(marketTypeId: string, days?: number, options?: RawAxiosRequestConfig): AxiosPromise<Array<MarketHistoryResponse>> {
|
||||
return localVarFp.findHistory(marketTypeId, days, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
@@ -1490,6 +1556,19 @@ export const MarketApiFactory = function (configuration?: Configuration, basePat
|
||||
scanMarket(days?: number, brokerFee?: number, salesTax?: number, options?: RawAxiosRequestConfig): AxiosPromise<Array<MarketScanResponse>> {
|
||||
return localVarFp.scanMarket(days, brokerFee, salesTax, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary Scan a single market type, returning its volume-weighted price quartiles
|
||||
* @param {string} marketTypeId The market type id to scan
|
||||
* @param {number} [days] Number of most recent days of history to analyse
|
||||
* @param {number} [brokerFee] Broker fee as a fraction (e.g. 0.015 for 1.5%), paid on both buy and sell orders
|
||||
* @param {number} [salesTax] Sales tax as a fraction (e.g. 0.036 for 3.6%), paid on sell orders
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
scanMarketType(marketTypeId: string, days?: number, brokerFee?: number, salesTax?: number, options?: RawAxiosRequestConfig): AxiosPromise<MarketScanResponse> {
|
||||
return localVarFp.scanMarketType(marketTypeId, days, brokerFee, salesTax, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1500,23 +1579,23 @@ export class MarketApi extends BaseAPI {
|
||||
/**
|
||||
*
|
||||
* @summary Return the current Jita order book (highest buy, lowest sell, order count) for each requested market type
|
||||
* @param {Array<number>} types Market type ids to price, e.g. types=34,35
|
||||
* @param {string} types Market type ids to price, e.g. types=34,35
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
public currentPrices(types: Array<number>, options?: RawAxiosRequestConfig) {
|
||||
public currentPrices(types: string, options?: RawAxiosRequestConfig) {
|
||||
return MarketApiFp(this.configuration).currentPrices(types, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary Find the market history of a type, most recent first
|
||||
* @param {number} marketTypeId Id of the market type
|
||||
* @param {string} marketTypeId Id of the market type
|
||||
* @param {number} [days] Optional number of most recent days to return; omit for the full history
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
public findHistory(marketTypeId: number, days?: number, options?: RawAxiosRequestConfig) {
|
||||
public findHistory(marketTypeId: string, days?: number, options?: RawAxiosRequestConfig) {
|
||||
return MarketApiFp(this.configuration).findHistory(marketTypeId, days, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@@ -1532,6 +1611,20 @@ export class MarketApi extends BaseAPI {
|
||||
public scanMarket(days?: number, brokerFee?: number, salesTax?: number, options?: RawAxiosRequestConfig) {
|
||||
return MarketApiFp(this.configuration).scanMarket(days, brokerFee, salesTax, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary Scan a single market type, returning its volume-weighted price quartiles
|
||||
* @param {string} marketTypeId The market type id to scan
|
||||
* @param {number} [days] Number of most recent days of history to analyse
|
||||
* @param {number} [brokerFee] Broker fee as a fraction (e.g. 0.015 for 1.5%), paid on both buy and sell orders
|
||||
* @param {number} [salesTax] Sales tax as a fraction (e.g. 0.036 for 3.6%), paid on sell orders
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
public scanMarketType(marketTypeId: string, days?: number, brokerFee?: number, salesTax?: number, options?: RawAxiosRequestConfig) {
|
||||
return MarketApiFp(this.configuration).scanMarketType(marketTypeId, days, brokerFee, salesTax, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1692,6 +1785,7 @@ export const RuleBookApiAxiosParamCreator = function (configuration?: Configurat
|
||||
const localVarHeaderParameter = {} as any;
|
||||
const localVarQueryParameter = {} as any;
|
||||
|
||||
localVarHeaderParameter['Accept'] = '*/*';
|
||||
|
||||
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
@@ -1864,7 +1958,7 @@ export const RuleBookApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async deleteRuleBook(ruleBookId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
async deleteRuleBook(ruleBookId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: any; }>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.deleteRuleBook(ruleBookId, options);
|
||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||
const localVarOperationServerBasePath = operationServerMap['RuleBookApi.deleteRuleBook']?.[localVarOperationServerIndex]?.url;
|
||||
@@ -1947,7 +2041,7 @@ export const RuleBookApiFactory = function (configuration?: Configuration, baseP
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deleteRuleBook(ruleBookId: string, options?: RawAxiosRequestConfig): AxiosPromise<void> {
|
||||
deleteRuleBook(ruleBookId: string, options?: RawAxiosRequestConfig): AxiosPromise<{ [key: string]: any; }> {
|
||||
return localVarFp.deleteRuleBook(ruleBookId, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
|
||||
+1
-28
@@ -1,4 +1,4 @@
|
||||
import { getHistory, getHistoryQuartils, HistoryQuartils, MarketType, MarketTypePrice } from "@/market";
|
||||
import { MarketType } from "@/market";
|
||||
import { MarketScanResponse } from "@/generated/mammon";
|
||||
|
||||
export type ScanResult = {
|
||||
@@ -13,14 +13,6 @@ export type ScanResult = {
|
||||
score: number;
|
||||
}
|
||||
|
||||
// Mirrors mammon's MarketScoreCalculator so the client-side path matches the backend scan.
|
||||
export const calculateScore = (quartils: HistoryQuartils, profit: number, orderCount: number, days: number): number => {
|
||||
if (profit <= 0) {
|
||||
return 0;
|
||||
}
|
||||
return Math.sqrt((Math.pow(quartils.totalVolume, 1.1) * Math.pow(quartils.q1, 1.2) * Math.pow(profit, 0.5) * Math.pow(Math.max(1, orderCount), -0.7)) / days);
|
||||
}
|
||||
|
||||
export const toScanResult = (res: MarketScanResponse, type: MarketType): ScanResult => ({
|
||||
type,
|
||||
buy: res.buy,
|
||||
@@ -32,22 +24,3 @@ export const toScanResult = (res: MarketScanResponse, type: MarketType): ScanRes
|
||||
profit: res.profit,
|
||||
score: res.score,
|
||||
});
|
||||
|
||||
// Client-side scan result for a single type (used where the scan endpoint can't be queried per-type).
|
||||
export const buildScanResult = async (price: MarketTypePrice, days: number, calculateProfit: (buy: number, sell: number) => number): Promise<ScanResult> => {
|
||||
const history = await getHistory(price.type.id);
|
||||
const quartils = getHistoryQuartils(history, days);
|
||||
const profit = quartils.q1 === 0 || quartils.q3 === 0 ? 0 : calculateProfit(quartils.q1, quartils.q3);
|
||||
|
||||
return {
|
||||
type: price.type,
|
||||
buy: price.buy,
|
||||
sell: price.sell,
|
||||
q1: quartils.q1,
|
||||
median: quartils.median,
|
||||
q3: quartils.q3,
|
||||
totalVolume: quartils.totalVolume,
|
||||
profit,
|
||||
score: calculateScore(quartils, profit, price.orderCount, days),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
import {ClipboardButton} from '@/components';
|
||||
import {getMarketType, MarketType, MarketTypeInput, useApraisalStore, useMarketTaxStore} from "@/market";
|
||||
import {AcquisitionResultTable, BuyModal, useAcquiredTypesStore} from '@/market/acquisition';
|
||||
import {buildScanResult, ScanResultTable} from '@/market/scan';
|
||||
import {ScanResultTable, toScanResult} from '@/market/scan';
|
||||
import {marketApi} from "@/mammon";
|
||||
import {ShoppingCartIcon} from '@heroicons/vue/24/outline';
|
||||
import log from "loglevel";
|
||||
import {computed, ref, watch} from "vue";
|
||||
@@ -21,7 +22,20 @@ const apraisalStore = useApraisalStore();
|
||||
const marketTaxStore = useMarketTaxStore();
|
||||
const days = useStorage('market-scan-days', 365);
|
||||
const price = computedAsync(() => item.value ? apraisalStore.getPrice(item.value) : undefined);
|
||||
const result = computedAsync(async () => price.value ? await buildScanResult(price.value, days.value, marketTaxStore.calculateProfit) : undefined);
|
||||
const result = computedAsync(async () => {
|
||||
if (!item.value) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
const { data } = await marketApi.scanMarketType(
|
||||
String(item.value.id),
|
||||
days.value,
|
||||
marketTaxStore.brokerFee / 100,
|
||||
marketTaxStore.scc / 100
|
||||
);
|
||||
|
||||
return toScanResult(data, item.value);
|
||||
});
|
||||
const acquiredTypesStore = useAcquiredTypesStore();
|
||||
|
||||
const acquisitions = computed(() => {
|
||||
|
||||
Reference in New Issue
Block a user