From acde42b406c51f05841417702c6097c86c67c23f Mon Sep 17 00:00:00 2001 From: Sirttas Date: Thu, 11 Jun 2026 20:39:50 +0200 Subject: [PATCH] fix maket endpoints --- docs/mammon-api.yml | 16 +++++++------ src/generated/mammon/api.ts | 48 ++++++++++++++++++------------------- 2 files changed, 33 insertions(+), 31 deletions(-) diff --git a/docs/mammon-api.yml b/docs/mammon-api.yml index 2974a14..aacbbb2 100644 --- a/docs/mammon-api.yml +++ b/docs/mammon-api.yml @@ -383,7 +383,8 @@ paths: history required: false schema: - type: string + type: integer + format: int32 minimum: 1 responses: "200": @@ -409,8 +410,9 @@ paths: description: Number of most recent days of history to analyse required: false schema: - type: string - default: "365" + type: integer + format: int32 + default: 365 minimum: 1 - name: brokerFee in: query @@ -418,8 +420,8 @@ paths: \ buy and sell orders" required: false schema: - type: string - default: "0.015" + type: number + default: 0.015 maximum: 1 minimum: 0 - name: salesTax @@ -428,8 +430,8 @@ paths: \ orders" required: false schema: - type: string - default: "0.036" + type: number + default: 0.036 maximum: 1 minimum: 0 responses: diff --git a/src/generated/mammon/api.ts b/src/generated/mammon/api.ts index fee3b45..2c2425d 100644 --- a/src/generated/mammon/api.ts +++ b/src/generated/mammon/api.ts @@ -1272,11 +1272,11 @@ 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} [days] Optional number of most recent days to return; omit for the full history + * @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?: string, options: RawAxiosRequestConfig = {}): Promise => { + findHistory: async (marketTypeId: number, days?: number, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'marketTypeId' is not null or undefined assertParamExists('findHistory', 'marketTypeId', marketTypeId) const localVarPath = `/market/{marketTypeId}/history` @@ -1310,13 +1310,13 @@ export const MarketApiAxiosParamCreator = function (configuration?: Configuratio /** * * @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 {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} */ - scanMarket: async (days?: string, brokerFee?: string, salesTax?: string, options: RawAxiosRequestConfig = {}): Promise => { + scanMarket: async (days?: number, brokerFee?: number, salesTax?: number, options: RawAxiosRequestConfig = {}): Promise => { 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); @@ -1365,11 +1365,11 @@ 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} [days] Optional number of most recent days to return; omit for the full history + * @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?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + async findHistory(marketTypeId: number, days?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.findHistory(marketTypeId, days, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['MarketApi.findHistory']?.[localVarOperationServerIndex]?.url; @@ -1378,13 +1378,13 @@ export const MarketApiFp = function(configuration?: Configuration) { /** * * @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 {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 scanMarket(days?: string, brokerFee?: string, salesTax?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + async scanMarket(days?: number, brokerFee?: number, salesTax?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.scanMarket(days, brokerFee, salesTax, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['MarketApi.scanMarket']?.[localVarOperationServerIndex]?.url; @@ -1403,23 +1403,23 @@ export const MarketApiFactory = function (configuration?: Configuration, basePat * * @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 {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?: string, options?: RawAxiosRequestConfig): AxiosPromise> { + findHistory(marketTypeId: number, days?: number, options?: RawAxiosRequestConfig): AxiosPromise> { 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 {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} */ - scanMarket(days?: string, brokerFee?: string, salesTax?: string, options?: RawAxiosRequestConfig): AxiosPromise> { + scanMarket(days?: number, brokerFee?: number, salesTax?: number, options?: RawAxiosRequestConfig): AxiosPromise> { return localVarFp.scanMarket(days, brokerFee, salesTax, options).then((request) => request(axios, basePath)); }, }; @@ -1433,24 +1433,24 @@ 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 {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?: string, options?: RawAxiosRequestConfig) { + public findHistory(marketTypeId: number, days?: number, 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 {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 scanMarket(days?: string, brokerFee?: string, salesTax?: string, options?: RawAxiosRequestConfig) { + 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)); } }