diff --git a/docs/mammon-api.yml b/docs/mammon-api.yml index 8f744e6..c4dcc67 100644 --- a/docs/mammon-api.yml +++ b/docs/mammon-api.yml @@ -286,6 +286,73 @@ paths: type: array items: $ref: "#/components/schemas/ReprocessingResultResponse" + /reprocessing/raw: + post: + tags: + - reprocessing + summary: "Reprocess a pasted EVE inventory listing for a character, resolving\ + \ item names before appraising the input and resulting materials" + operationId: reprocessRawItems + parameters: + - name: characterId + in: query + description: Character to reprocess for + required: true + schema: + type: integer + format: int64 + - name: locationId + in: query + description: Location to derive reprocessing efficiency at; defaults to the + character's current location when omitted + required: false + schema: + type: integer + format: int64 + requestBody: + description: Raw tab-separated inventory listing copied from the EVE client + content: + text/plain: + schema: + type: string + required: true + responses: + "200": + description: The reprocessing result for each resolved input stack + content: + '*/*': + schema: + type: array + items: + $ref: "#/components/schemas/ReprocessingResultResponse" + /market/types/parse: + post: + tags: + - market + summary: "Parse a pasted EVE inventory listing into market type stacks, resolving\ + \ names to type ids" + operationId: parseStacks + requestBody: + description: Raw tab-separated inventory listing copied from the EVE client + content: + text/plain: + schema: + type: string + required: true + responses: + "200": + description: The resolved stacks; lines whose name does not match any type + are omitted and lines resolving to the same type are merged with their + quantities summed + content: + '*/*': + schema: + type: array + items: + $ref: "#/components/schemas/MarketTypeStackResponse" + "400": + description: Returned when a line carries a quantity that is not a positive + whole number /ledgers/main: post: tags: @@ -992,6 +1059,18 @@ components: required: - input - output + MarketTypeStackResponse: + type: object + properties: + marketTypeId: + type: integer + format: int64 + quantity: + type: integer + format: int64 + required: + - marketTypeId + - quantity CreateMainLedgerRequest: type: object properties: diff --git a/src/generated/mammon/api.ts b/src/generated/mammon/api.ts index 1022003..ef314df 100644 --- a/src/generated/mammon/api.ts +++ b/src/generated/mammon/api.ts @@ -147,6 +147,10 @@ export interface MarketTypeStackRequest { 'marketTypeId': number; 'quantity': number; } +export interface MarketTypeStackResponse { + 'marketTypeId': number; + 'quantity': number; +} export interface ReprocessItemsRequest { 'characterId': number; 'items': Array; @@ -1480,6 +1484,41 @@ export const MarketApiAxiosParamCreator = function (configuration?: Configuratio options: localVarRequestOptions, }; }, + /** + * + * @summary Parse a pasted EVE inventory listing into market type stacks, resolving names to type ids + * @param {string} body Raw tab-separated inventory listing copied from the EVE client + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + parseStacks: async (body: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'body' is not null or undefined + assertParamExists('parseStacks', 'body', body) + const localVarPath = `/market/types/parse`; + // 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: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + localVarHeaderParameter['Content-Type'] = 'text/plain'; + localVarHeaderParameter['Accept'] = '*/*'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, /** * * @summary Scan every tracked market type, returning volume-weighted price quartiles for each @@ -1665,6 +1704,19 @@ export const MarketApiFp = function(configuration?: Configuration) { const localVarOperationServerBasePath = operationServerMap['MarketApi.findTypes']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, + /** + * + * @summary Parse a pasted EVE inventory listing into market type stacks, resolving names to type ids + * @param {string} body Raw tab-separated inventory listing copied from the EVE client + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async parseStacks(body: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.parseStacks(body, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['MarketApi.parseStacks']?.[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 @@ -1750,6 +1802,16 @@ export const MarketApiFactory = function (configuration?: Configuration, basePat findTypes(ids: Array, options?: RawAxiosRequestConfig): AxiosPromise> { return localVarFp.findTypes(ids, options).then((request) => request(axios, basePath)); }, + /** + * + * @summary Parse a pasted EVE inventory listing into market type stacks, resolving names to type ids + * @param {string} body Raw tab-separated inventory listing copied from the EVE client + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + parseStacks(body: string, options?: RawAxiosRequestConfig): AxiosPromise> { + return localVarFp.parseStacks(body, options).then((request) => request(axios, basePath)); + }, /** * * @summary Scan every tracked market type, returning volume-weighted price quartiles for each @@ -1827,6 +1889,17 @@ export class MarketApi extends BaseAPI { return MarketApiFp(this.configuration).findTypes(ids, options).then((request) => request(this.axios, this.basePath)); } + /** + * + * @summary Parse a pasted EVE inventory listing into market type stacks, resolving names to type ids + * @param {string} body Raw tab-separated inventory listing copied from the EVE client + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public parseStacks(body: string, options?: RawAxiosRequestConfig) { + return MarketApiFp(this.configuration).parseStacks(body, options).then((request) => request(this.axios, this.basePath)); + } + /** * * @summary Scan every tracked market type, returning volume-weighted price quartiles for each @@ -1909,6 +1982,53 @@ export const ReprocessingApiAxiosParamCreator = function (configuration?: Config localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(reprocessItemsRequest, localVarRequestOptions, configuration) + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Reprocess a pasted EVE inventory listing for a character, resolving item names before appraising the input and resulting materials + * @param {number} characterId Character to reprocess for + * @param {string} body Raw tab-separated inventory listing copied from the EVE client + * @param {number} [locationId] Location to derive reprocessing efficiency at; defaults to the character\'s current location when omitted + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + reprocessRawItems: async (characterId: number, body: string, locationId?: number, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'characterId' is not null or undefined + assertParamExists('reprocessRawItems', 'characterId', characterId) + // verify required parameter 'body' is not null or undefined + assertParamExists('reprocessRawItems', 'body', body) + const localVarPath = `/reprocessing/raw`; + // 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: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (characterId !== undefined) { + localVarQueryParameter['characterId'] = characterId; + } + + if (locationId !== undefined) { + localVarQueryParameter['locationId'] = locationId; + } + + localVarHeaderParameter['Content-Type'] = 'text/plain'; + localVarHeaderParameter['Accept'] = '*/*'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) + return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, @@ -1937,6 +2057,21 @@ export const ReprocessingApiFp = function(configuration?: Configuration) { const localVarOperationServerBasePath = operationServerMap['ReprocessingApi.reprocessItems']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, + /** + * + * @summary Reprocess a pasted EVE inventory listing for a character, resolving item names before appraising the input and resulting materials + * @param {number} characterId Character to reprocess for + * @param {string} body Raw tab-separated inventory listing copied from the EVE client + * @param {number} [locationId] Location to derive reprocessing efficiency at; defaults to the character\'s current location when omitted + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async reprocessRawItems(characterId: number, body: string, locationId?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.reprocessRawItems(characterId, body, locationId, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ReprocessingApi.reprocessRawItems']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, } }; @@ -1957,6 +2092,18 @@ export const ReprocessingApiFactory = function (configuration?: Configuration, b reprocessItems(reprocessItemsRequest: ReprocessItemsRequest, locationId?: number, options?: RawAxiosRequestConfig): AxiosPromise> { return localVarFp.reprocessItems(reprocessItemsRequest, locationId, options).then((request) => request(axios, basePath)); }, + /** + * + * @summary Reprocess a pasted EVE inventory listing for a character, resolving item names before appraising the input and resulting materials + * @param {number} characterId Character to reprocess for + * @param {string} body Raw tab-separated inventory listing copied from the EVE client + * @param {number} [locationId] Location to derive reprocessing efficiency at; defaults to the character\'s current location when omitted + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + reprocessRawItems(characterId: number, body: string, locationId?: number, options?: RawAxiosRequestConfig): AxiosPromise> { + return localVarFp.reprocessRawItems(characterId, body, locationId, options).then((request) => request(axios, basePath)); + }, }; }; @@ -1975,6 +2122,19 @@ export class ReprocessingApi extends BaseAPI { public reprocessItems(reprocessItemsRequest: ReprocessItemsRequest, locationId?: number, options?: RawAxiosRequestConfig) { return ReprocessingApiFp(this.configuration).reprocessItems(reprocessItemsRequest, locationId, options).then((request) => request(this.axios, this.basePath)); } + + /** + * + * @summary Reprocess a pasted EVE inventory listing for a character, resolving item names before appraising the input and resulting materials + * @param {number} characterId Character to reprocess for + * @param {string} body Raw tab-separated inventory listing copied from the EVE client + * @param {number} [locationId] Location to derive reprocessing efficiency at; defaults to the character\'s current location when omitted + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public reprocessRawItems(characterId: number, body: string, locationId?: number, options?: RawAxiosRequestConfig) { + return ReprocessingApiFp(this.configuration).reprocessRawItems(characterId, body, locationId, options).then((request) => request(this.axios, this.basePath)); + } }