character rule book store

This commit is contained in:
Sirttas
2026-06-11 19:42:56 +02:00
parent 9cd0d5fb5e
commit f3cb4798d5
5 changed files with 540 additions and 55 deletions
+279 -2
View File
@@ -50,8 +50,8 @@ export interface CharacterResponse {
'name': string;
}
export interface CharacterRuleBookResponse {
'characterId': number;
'ruleBookId': string;
'character': CharacterResponse;
'ruleBook': RuleBookSummaryResponse;
'bindings': { [key: string]: string; };
}
export interface CombinedLedgerResponse extends LedgerResponse {
@@ -98,6 +98,24 @@ export interface MainLedgerResponse extends LedgerResponse {
'name': string;
'balance': number;
}
export interface MarketHistoryResponse {
'marketTypeId': number;
'date': string;
'average': number;
'highest': number;
'lowest': number;
'orderCount': number;
'volume': number;
}
export interface MarketScanResponse {
'marketTypeId': number;
'q1': number;
'median': number;
'q3': number;
'totalVolume': number;
'profit': number;
'score': number;
}
export interface RuleBookResponse {
'ruleBookId': string;
'name': string;
@@ -105,6 +123,10 @@ export interface RuleBookResponse {
'ledgerRefs': Array<string>;
'script': string;
}
export interface RuleBookSummaryResponse {
'ruleBookId': string;
'name': string;
}
export interface SetCharacterRuleBookRequest {
'ruleBookId': string;
'bindings': { [key: string]: string; };
@@ -488,6 +510,36 @@ export class CharacterApi extends BaseAPI {
*/
export const CharacterRuleBookApiAxiosParamCreator = function (configuration?: Configuration) {
return {
/**
*
* @summary Find the rule books of all characters that have a token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
findAllCharacterRuleBooks: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
const localVarPath = `/characters/rule-books`;
// 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 Find the rule book assigned to a character
@@ -570,6 +622,18 @@ export const CharacterRuleBookApiAxiosParamCreator = function (configuration?: C
export const CharacterRuleBookApiFp = function(configuration?: Configuration) {
const localVarAxiosParamCreator = CharacterRuleBookApiAxiosParamCreator(configuration)
return {
/**
*
* @summary Find the rule books of all characters that have a token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async findAllCharacterRuleBooks(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<CharacterRuleBookResponse>>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.findAllCharacterRuleBooks(options);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath = operationServerMap['CharacterRuleBookApi.findAllCharacterRuleBooks']?.[localVarOperationServerIndex]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
},
/**
*
* @summary Find the rule book assigned to a character
@@ -606,6 +670,15 @@ export const CharacterRuleBookApiFp = function(configuration?: Configuration) {
export const CharacterRuleBookApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
const localVarFp = CharacterRuleBookApiFp(configuration)
return {
/**
*
* @summary Find the rule books of all characters that have a token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
findAllCharacterRuleBooks(options?: RawAxiosRequestConfig): AxiosPromise<Array<CharacterRuleBookResponse>> {
return localVarFp.findAllCharacterRuleBooks(options).then((request) => request(axios, basePath));
},
/**
*
* @summary Find the rule book assigned to a character
@@ -634,6 +707,16 @@ export const CharacterRuleBookApiFactory = function (configuration?: Configurati
* CharacterRuleBookApi - object-oriented interface
*/
export class CharacterRuleBookApi extends BaseAPI {
/**
*
* @summary Find the rule books of all characters that have a token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
public findAllCharacterRuleBooks(options?: RawAxiosRequestConfig) {
return CharacterRuleBookApiFp(this.configuration).findAllCharacterRuleBooks(options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary Find the rule book assigned to a character
@@ -1180,6 +1263,200 @@ export class LedgerApi extends BaseAPI {
/**
* MarketApi - axios parameter creator
*/
export const MarketApiAxiosParamCreator = function (configuration?: Configuration) {
return {
/**
*
* @summary Find the market history of a type, most recent first
* @param {number} marketTypeId Id of the market type
* @param {string} [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?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'marketTypeId' is not null or undefined
assertParamExists('findHistory', 'marketTypeId', marketTypeId)
const localVarPath = `/market/{marketTypeId}/history`
.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;
}
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 Scan every tracked market type, returning volume-weighted price quartiles for each
* @param {string} [days] Number of most recent days of history to analyse
* @param {string} [brokerFee] Broker fee as a fraction (e.g. 0.015 for 1.5%), paid on both buy and sell orders
* @param {string} [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}
*/
scanMarket: async (days?: string, brokerFee?: string, salesTax?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
const localVarPath = `/market/scan`;
// 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,
};
},
}
};
/**
* MarketApi - functional programming interface
*/
export const MarketApiFp = function(configuration?: Configuration) {
const localVarAxiosParamCreator = MarketApiAxiosParamCreator(configuration)
return {
/**
*
* @summary Find the market history of a type, most recent first
* @param {number} marketTypeId Id of the market type
* @param {string} [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?: string, 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;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
},
/**
*
* @summary Scan every tracked market type, returning volume-weighted price quartiles for each
* @param {string} [days] Number of most recent days of history to analyse
* @param {string} [brokerFee] Broker fee as a fraction (e.g. 0.015 for 1.5%), paid on both buy and sell orders
* @param {string} [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 scanMarket(days?: string, brokerFee?: string, salesTax?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<MarketScanResponse>>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.scanMarket(days, brokerFee, salesTax, options);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath = operationServerMap['MarketApi.scanMarket']?.[localVarOperationServerIndex]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
},
}
};
/**
* MarketApi - factory interface
*/
export const MarketApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
const localVarFp = MarketApiFp(configuration)
return {
/**
*
* @summary Find the market history of a type, most recent first
* @param {number} marketTypeId Id of the market type
* @param {string} [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?: string, options?: RawAxiosRequestConfig): AxiosPromise<Array<MarketHistoryResponse>> {
return localVarFp.findHistory(marketTypeId, days, options).then((request) => request(axios, basePath));
},
/**
*
* @summary Scan every tracked market type, returning volume-weighted price quartiles for each
* @param {string} [days] Number of most recent days of history to analyse
* @param {string} [brokerFee] Broker fee as a fraction (e.g. 0.015 for 1.5%), paid on both buy and sell orders
* @param {string} [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}
*/
scanMarket(days?: string, brokerFee?: string, salesTax?: string, options?: RawAxiosRequestConfig): AxiosPromise<Array<MarketScanResponse>> {
return localVarFp.scanMarket(days, brokerFee, salesTax, options).then((request) => request(axios, basePath));
},
};
};
/**
* MarketApi - object-oriented interface
*/
export class MarketApi extends BaseAPI {
/**
*
* @summary Find the market history of a type, most recent first
* @param {number} marketTypeId Id of the market type
* @param {string} [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?: string, options?: RawAxiosRequestConfig) {
return MarketApiFp(this.configuration).findHistory(marketTypeId, days, options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary Scan every tracked market type, returning volume-weighted price quartiles for each
* @param {string} [days] Number of most recent days of history to analyse
* @param {string} [brokerFee] Broker fee as a fraction (e.g. 0.015 for 1.5%), paid on both buy and sell orders
* @param {string} [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 scanMarket(days?: string, brokerFee?: string, salesTax?: string, options?: RawAxiosRequestConfig) {
return MarketApiFp(this.configuration).scanMarket(days, brokerFee, salesTax, options).then((request) => request(this.axios, this.basePath));
}
}
/**
* ProcessingApi - axios parameter creator
*/