feat: regenerate open api

This commit is contained in:
2026-08-08 20:47:13 +02:00
parent 3419f3d4c9
commit 0040a5c33b
2 changed files with 362 additions and 42 deletions
+179 -21
View File
@@ -43,8 +43,7 @@ paths:
"400": "400":
description: |- description: |-
Returned when: Returned when:
- a binding references a ledger the caller does not own - a ledger scope reference is not one of the caller's own main ledgers
- a binding references a ledger that is not a main ledger
/ledgers/main/{ledgerId}: /ledgers/main/{ledgerId}:
put: put:
tags: tags:
@@ -438,11 +437,38 @@ paths:
get: get:
tags: tags:
- rule-script - rule-script
summary: Download the TypeScript definitions for the rule script runtime summary: List the available rule script type definition files
operationId: getScriptDefinitions operationId: listScriptDefinitions
responses: responses:
"200": "200":
description: The rule-runner.d.ts type definitions description: The names of the available .d.ts type definitions
content:
'*/*':
schema:
type: array
items:
type: string
/rule-scripts/definitions/{name}:
get:
tags:
- rule-script
summary: Download a rule script type definition file by name
operationId: getScriptDefinition
parameters:
- name: name
in: path
required: true
schema:
type: string
responses:
"200":
description: The requested .d.ts type definitions
content:
text/plain:
schema:
type: string
"404":
description: No type definition with that name exists
content: content:
text/plain: text/plain:
schema: schema:
@@ -974,8 +1000,10 @@ paths:
format: uuid format: uuid
responses: responses:
"200": "200":
description: "Daily realized profit for the ledger, ascending by date, only\ description: "Daily FIFO-realized profit for the ledger, ascending by date,\
\ for days with a sale" \ 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."
content: content:
'*/*': '*/*':
schema: schema:
@@ -1127,50 +1155,180 @@ paths:
$ref: "#/components/schemas/AcquisitionResponse" $ref: "#/components/schemas/AcquisitionResponse"
components: components:
schemas: schemas:
UpdateRuleBookRequest: RuleScopeRequest:
type: object type: object
description: Request to update the caller's rule book; replaces its mutable description: The ledgers and other resources to bind to a rule script.
fields.
properties: properties:
bindings: ledgers:
type: object type: object
additionalProperties: additionalProperties:
type: string type: string
format: uuid format: uuid
description: "Ledger references the script writes to, each bound to one\ description: "Ledger references the script writes to, each bound to one\
\ of the user's ledgers." \ of the user's own main ledgers."
characters:
type: object
additionalProperties:
type: integer
format: int64
description: "Character references the script can read, each bound to one\
\ of the user's own characters."
corporations:
type: object
additionalProperties:
type: integer
format: int64
description: "Corporation references the script can read, each bound to\
\ a corporation of one of the user's own characters."
walletDivisions:
type: object
additionalProperties:
$ref: "#/components/schemas/WalletDivisionTargetRequest"
description: "Corporation wallet division references the script can read,\
\ each bound to a corporation of one of the user's own characters."
required:
- characters
- corporations
- ledgers
- walletDivisions
RuleScriptRequest:
type: object
description: "A named rule script to store in the book, together with its scope."
properties:
name:
type: string
description: Unique script name within the book; a lowercase alphanumeric
identifier.
example: sales
scope:
$ref: "#/components/schemas/RuleScopeRequest"
description: The ledgers and other resources bound to this script.
script: script:
type: string type: string
description: The classification script source. description: The classification script source.
example: transfer.to('sales') example: transfer.to('wallet')
required: required:
- bindings - name
- scope
- script - script
UpdateRuleBookRequest:
type: object
description: Request to update the caller's rule book; replaces its rule scripts.
properties:
scripts:
type: array
description: The rule scripts making up the book.
items:
$ref: "#/components/schemas/RuleScriptRequest"
required:
- scripts
WalletDivisionTargetRequest:
type: object
description: A corporation wallet division to bind.
properties:
corporationId:
type: integer
format: int64
description: The corporation the wallet division belongs to.
example: 98000001
division:
type: integer
format: int32
description: "The wallet division number, from 1 to 7."
example: 1
required:
- corporationId
- division
RuleBookResponse: RuleBookResponse:
type: object type: object
description: "The caller's rule book: a script that classifies transactions,\ description: "The caller's rule book: the named rule scripts that classify transactions,\
\ together with its ledger bindings." \ each with its scope."
properties: properties:
userId: userId:
type: string type: string
format: uuid format: uuid
description: Owning user identifier. description: Owning user identifier.
example: 3fa85f64-5717-4562-b3fc-2c963f66afa6 example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
bindings: scripts:
type: array
description: The rule scripts making up the book.
items:
$ref: "#/components/schemas/RuleScriptResponse"
required:
- scripts
- userId
RuleScopeResponse:
type: object
description: The ledgers and other resources bound to a rule script.
properties:
ledgers:
type: object type: object
additionalProperties: additionalProperties:
type: string type: string
format: uuid format: uuid
description: "Ledger references the script writes to, each bound to one\ description: "Ledger references the script writes to, each bound to one\
\ of the user's ledgers." \ of the user's own main ledgers."
characters:
type: object
additionalProperties:
type: integer
format: int64
description: "Character references the script can read, each bound to one\
\ of the user's own characters."
corporations:
type: object
additionalProperties:
type: integer
format: int64
description: "Corporation references the script can read, each bound to\
\ a corporation of one of the user's own characters."
walletDivisions:
type: object
additionalProperties:
$ref: "#/components/schemas/WalletDivisionTargetResponse"
description: "Corporation wallet division references the script can read,\
\ each bound to a corporation of one of the user's own characters."
required:
- characters
- corporations
- ledgers
- walletDivisions
RuleScriptResponse:
type: object
description: "A named rule script within the book, together with its scope."
properties:
name:
type: string
description: Unique script name within the book.
example: sales
scope:
$ref: "#/components/schemas/RuleScopeResponse"
description: The ledgers and other resources bound to this script.
script: script:
type: string type: string
description: The classification script source. description: The classification script source.
example: transfer.to('sales') example: transfer.to('wallet')
required: required:
- bindings - name
- scope
- script - script
- userId WalletDivisionTargetResponse:
type: object
description: A corporation wallet division bound to the script.
properties:
corporationId:
type: integer
format: int64
description: The corporation the wallet division belongs to.
example: 98000001
division:
type: integer
format: int32
description: "The wallet division number, from 1 to 7."
example: 1
required:
- corporationId
- division
UpdateMainLedgerRequest: UpdateMainLedgerRequest:
type: object type: object
description: Request to update an existing main ledger. description: Request to update an existing main ledger.
+183 -21
View File
@@ -732,7 +732,7 @@ export interface ReprocessingResultResponse {
'output': Array<MarketTypeStackAppraisalResponse>; 'output': Array<MarketTypeStackAppraisalResponse>;
} }
/** /**
* The caller\'s rule book: a script that classifies transactions, together with its ledger bindings. * The caller\'s rule book: the named rule scripts that classify transactions, each with its scope.
*/ */
export interface RuleBookResponse { export interface RuleBookResponse {
/** /**
@@ -740,9 +740,81 @@ export interface RuleBookResponse {
*/ */
'userId': string; 'userId': string;
/** /**
* Ledger references the script writes to, each bound to one of the user\'s ledgers. * The rule scripts making up the book.
*/ */
'bindings': { [key: string]: string; }; 'scripts': Array<RuleScriptResponse>;
}
/**
* The ledgers and other resources to bind to a rule script.
*/
export interface RuleScopeRequest {
/**
* Ledger references the script writes to, each bound to one of the user\'s own main ledgers.
*/
'ledgers': { [key: string]: string; };
/**
* Character references the script can read, each bound to one of the user\'s own characters.
*/
'characters': { [key: string]: number; };
/**
* Corporation references the script can read, each bound to a corporation of one of the user\'s own characters.
*/
'corporations': { [key: string]: number; };
/**
* Corporation wallet division references the script can read, each bound to a corporation of one of the user\'s own characters.
*/
'walletDivisions': { [key: string]: WalletDivisionTargetRequest; };
}
/**
* The ledgers and other resources bound to a rule script.
*/
export interface RuleScopeResponse {
/**
* Ledger references the script writes to, each bound to one of the user\'s own main ledgers.
*/
'ledgers': { [key: string]: string; };
/**
* Character references the script can read, each bound to one of the user\'s own characters.
*/
'characters': { [key: string]: number; };
/**
* Corporation references the script can read, each bound to a corporation of one of the user\'s own characters.
*/
'corporations': { [key: string]: number; };
/**
* Corporation wallet division references the script can read, each bound to a corporation of one of the user\'s own characters.
*/
'walletDivisions': { [key: string]: WalletDivisionTargetResponse; };
}
/**
* A named rule script to store in the book, together with its scope.
*/
export interface RuleScriptRequest {
/**
* Unique script name within the book; a lowercase alphanumeric identifier.
*/
'name': string;
/**
* The ledgers and other resources bound to this script.
*/
'scope': RuleScopeRequest;
/**
* The classification script source.
*/
'script': string;
}
/**
* A named rule script within the book, together with its scope.
*/
export interface RuleScriptResponse {
/**
* Unique script name within the book.
*/
'name': string;
/**
* The ledgers and other resources bound to this script.
*/
'scope': RuleScopeResponse;
/** /**
* The classification script source. * The classification script source.
*/ */
@@ -805,17 +877,39 @@ export interface UpdateMainLedgerRequest {
'name': string; 'name': string;
} }
/** /**
* Request to update the caller\'s rule book; replaces its mutable fields. * Request to update the caller\'s rule book; replaces its rule scripts.
*/ */
export interface UpdateRuleBookRequest { export interface UpdateRuleBookRequest {
/** /**
* Ledger references the script writes to, each bound to one of the user\'s ledgers. * The rule scripts making up the book.
*/ */
'bindings': { [key: string]: string; }; 'scripts': Array<RuleScriptRequest>;
}
/**
* A corporation wallet division to bind.
*/
export interface WalletDivisionTargetRequest {
/** /**
* The classification script source. * The corporation the wallet division belongs to.
*/ */
'script': string; 'corporationId': number;
/**
* The wallet division number, from 1 to 7.
*/
'division': number;
}
/**
* A corporation wallet division bound to the script.
*/
export interface WalletDivisionTargetResponse {
/**
* The corporation the wallet division belongs to.
*/
'corporationId': number;
/**
* The wallet division number, from 1 to 7.
*/
'division': number;
} }
/** /**
@@ -3909,12 +4003,16 @@ export const RuleScriptApiAxiosParamCreator = function (configuration?: Configur
return { return {
/** /**
* *
* @summary Download the TypeScript definitions for the rule script runtime * @summary Download a rule script type definition file by name
* @param {string} name
* @param {*} [options] Override http request option. * @param {*} [options] Override http request option.
* @throws {RequiredError} * @throws {RequiredError}
*/ */
getScriptDefinitions: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => { getScriptDefinition: async (name: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
const localVarPath = `/rule-scripts/definitions`; // verify required parameter 'name' is not null or undefined
assertParamExists('getScriptDefinition', 'name', name)
const localVarPath = `/rule-scripts/definitions/{name}`
.replace('{name}', encodeURIComponent(String(name)));
// use dummy base URL string because the URL constructor only accepts absolute URLs. // use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions; let baseOptions;
@@ -3932,6 +4030,36 @@ export const RuleScriptApiAxiosParamCreator = function (configuration?: Configur
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary List the available rule script type definition files
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listScriptDefinitions: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
const localVarPath = `/rule-scripts/definitions`;
// 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 { return {
url: toPathString(localVarUrlObj), url: toPathString(localVarUrlObj),
options: localVarRequestOptions, options: localVarRequestOptions,
@@ -3948,14 +4076,27 @@ export const RuleScriptApiFp = function(configuration?: Configuration) {
return { return {
/** /**
* *
* @summary Download the TypeScript definitions for the rule script runtime * @summary Download a rule script type definition file by name
* @param {string} name
* @param {*} [options] Override http request option. * @param {*} [options] Override http request option.
* @throws {RequiredError} * @throws {RequiredError}
*/ */
async getScriptDefinitions(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<string>> { async getScriptDefinition(name: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<string>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.getScriptDefinitions(options); const localVarAxiosArgs = await localVarAxiosParamCreator.getScriptDefinition(name, options);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath = operationServerMap['RuleScriptApi.getScriptDefinitions']?.[localVarOperationServerIndex]?.url; const localVarOperationServerBasePath = operationServerMap['RuleScriptApi.getScriptDefinition']?.[localVarOperationServerIndex]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
},
/**
*
* @summary List the available rule script type definition files
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async listScriptDefinitions(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<string>>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.listScriptDefinitions(options);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath = operationServerMap['RuleScriptApi.listScriptDefinitions']?.[localVarOperationServerIndex]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
}, },
} }
@@ -3969,12 +4110,22 @@ export const RuleScriptApiFactory = function (configuration?: Configuration, bas
return { return {
/** /**
* *
* @summary Download the TypeScript definitions for the rule script runtime * @summary Download a rule script type definition file by name
* @param {string} name
* @param {*} [options] Override http request option. * @param {*} [options] Override http request option.
* @throws {RequiredError} * @throws {RequiredError}
*/ */
getScriptDefinitions(options?: RawAxiosRequestConfig): AxiosPromise<string> { getScriptDefinition(name: string, options?: RawAxiosRequestConfig): AxiosPromise<string> {
return localVarFp.getScriptDefinitions(options).then((request) => request(axios, basePath)); return localVarFp.getScriptDefinition(name, options).then((request) => request(axios, basePath));
},
/**
*
* @summary List the available rule script type definition files
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listScriptDefinitions(options?: RawAxiosRequestConfig): AxiosPromise<Array<string>> {
return localVarFp.listScriptDefinitions(options).then((request) => request(axios, basePath));
}, },
}; };
}; };
@@ -3985,12 +4136,23 @@ export const RuleScriptApiFactory = function (configuration?: Configuration, bas
export class RuleScriptApi extends BaseAPI { export class RuleScriptApi extends BaseAPI {
/** /**
* *
* @summary Download the TypeScript definitions for the rule script runtime * @summary Download a rule script type definition file by name
* @param {string} name
* @param {*} [options] Override http request option. * @param {*} [options] Override http request option.
* @throws {RequiredError} * @throws {RequiredError}
*/ */
public getScriptDefinitions(options?: RawAxiosRequestConfig) { public getScriptDefinition(name: string, options?: RawAxiosRequestConfig) {
return RuleScriptApiFp(this.configuration).getScriptDefinitions(options).then((request) => request(this.axios, this.basePath)); return RuleScriptApiFp(this.configuration).getScriptDefinition(name, options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary List the available rule script type definition files
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
public listScriptDefinitions(options?: RawAxiosRequestConfig) {
return RuleScriptApiFp(this.configuration).listScriptDefinitions(options).then((request) => request(this.axios, this.basePath));
} }
} }