diff --git a/docs/mammon-api.yml b/docs/mammon-api.yml index 9297720..efd9d9c 100644 --- a/docs/mammon-api.yml +++ b/docs/mammon-api.yml @@ -10,174 +10,182 @@ paths: get: tags: - rule-book + summary: Find a rule book by its id operationId: findRuleBookById parameters: - name: ruleBookId in: path + description: Id of the rule book required: true schema: type: string format: uuid responses: - "404": - description: Not Found - "400": - description: Bad Request "200": - description: OK + description: The rule book content: '*/*': schema: $ref: "#/components/schemas/RuleBookResponse" + "404": + description: No rule book with this id put: tags: - rule-book + summary: Update a rule book operationId: updateRuleBook parameters: - name: ruleBookId in: path + description: Id of the rule book required: true schema: type: string format: uuid requestBody: + description: New state of the rule book content: application/json: schema: $ref: "#/components/schemas/UpdateRuleBookRequest" required: true responses: - "404": - description: Not Found - "400": - description: Bad Request "200": - description: OK + description: The updated rule book content: '*/*': schema: $ref: "#/components/schemas/RuleBookResponse" + "400": + description: Invalid request (e.g. blank name) /ledgers/main/{ledgerId}: put: tags: - ledger + summary: Update a main ledger operationId: updateMainLedger parameters: - name: ledgerId in: path + description: Id of the main ledger required: true schema: type: string format: uuid requestBody: + description: New state of the main ledger content: application/json: schema: $ref: "#/components/schemas/UpdateMainLedgerRequest" required: true responses: - "404": - description: Not Found - "400": - description: Bad Request "200": - description: OK + description: The updated main ledger content: '*/*': schema: $ref: "#/components/schemas/MainLedgerResponse" + "400": + description: "The ledger is not a main ledger, or the request is invalid" + "404": + description: No ledger with this id /ledgers/combined/{ledgerId}: put: tags: - ledger + summary: Update a combined ledger operationId: updateCombinedLedger parameters: - name: ledgerId in: path + description: Id of the combined ledger required: true schema: type: string format: uuid requestBody: + description: New state of the combined ledger content: application/json: schema: $ref: "#/components/schemas/UpdateCombinedLedgerRequest" required: true responses: - "404": - description: Not Found - "400": - description: Bad Request "200": - description: OK + description: The updated combined ledger content: '*/*': schema: $ref: "#/components/schemas/CombinedLedgerResponse" + "400": + description: "The ledger is not a combined ledger, or the request is invalid" + "404": + description: No ledger with this id /characters/{characterId}/rule-book: get: tags: - character-rule-book + summary: Find the rule book assigned to a character operationId: findCharacterRuleBookByCharacterId parameters: - name: characterId in: path + description: Id of the character required: true schema: type: integer format: int64 responses: - "404": - description: Not Found - "400": - description: Bad Request "200": - description: OK + description: The rule book assignment of the character content: '*/*': schema: $ref: "#/components/schemas/CharacterRuleBookResponse" + "400": + description: Invalid character id + "404": + description: No rule book assigned to this character put: tags: - character-rule-book + summary: Assign a rule book to a character operationId: setCharacterRuleBookForCharacter parameters: - name: characterId in: path + description: Id of the character required: true schema: type: integer format: int64 requestBody: + description: Rule book and ledger bindings to assign content: application/json: schema: $ref: "#/components/schemas/SetCharacterRuleBookRequest" required: true responses: - "404": - description: Not Found - "400": - description: Bad Request "200": - description: OK + description: The rule book assignment of the character content: '*/*': schema: $ref: "#/components/schemas/CharacterRuleBookResponse" + "400": + description: "The referenced rule book or a bound ledger does not exist,\ + \ or a ledger binding is missing" /rule-books: get: tags: - rule-book + summary: Find all rule books operationId: findAllRuleBooks responses: - "404": - description: Not Found - "400": - description: Bad Request "200": - description: OK + description: All rule books content: '*/*': schema: @@ -187,111 +195,106 @@ paths: post: tags: - rule-book + summary: Create a rule book operationId: createRuleBook requestBody: + description: Rule book to create content: application/json: schema: $ref: "#/components/schemas/CreateRuleBookRequest" required: true responses: - "404": - description: Not Found - "400": - description: Bad Request - "200": - description: OK + "201": + description: The created rule book content: '*/*': schema: $ref: "#/components/schemas/RuleBookResponse" + "400": + description: Invalid request (e.g. blank name) /process-activities: post: tags: - processing + summary: Process new activities for all characters with a usable token operationId: processNewActivities responses: - "404": - description: Not Found - "400": - description: Bad Request "200": - description: OK + description: New activities processed /ledgers/main: post: tags: - ledger + summary: Create a main ledger operationId: createMainLedger requestBody: + description: Main ledger to create content: application/json: schema: $ref: "#/components/schemas/CreateMainLedgerRequest" required: true responses: - "404": - description: Not Found - "400": - description: Bad Request - "200": - description: OK + "201": + description: The created main ledger content: '*/*': schema: $ref: "#/components/schemas/MainLedgerResponse" + "400": + description: Invalid request (e.g. blank name) /ledgers/combined: post: tags: - ledger + summary: Create a combined ledger operationId: createCombinedLedger requestBody: + description: Combined ledger to create content: application/json: schema: $ref: "#/components/schemas/CreateCombinedLedgerRequest" required: true responses: - "404": - description: Not Found - "400": - description: Bad Request - "200": - description: OK + "201": + description: The created combined ledger content: '*/*': schema: $ref: "#/components/schemas/CombinedLedgerResponse" + "400": + description: "Invalid request (e.g. blank name, a member ledger missing\ + \ or already contained)" /activity/fetch/{characterId}: post: tags: - activity + summary: Fetch new activities for a character from the EVE API operationId: fetchNewActivitiesForCharacter parameters: - name: characterId in: path + description: Id of the character required: true schema: type: integer format: int64 responses: - "404": - description: Not Found - "400": - description: Bad Request "200": - description: OK + description: New activities fetched and stored + "400": + description: No character with this id /ledgers: get: tags: - ledger + summary: Find all ledgers operationId: findAllLedgers responses: - "404": - description: Not Found - "400": - description: Bad Request "200": - description: OK + description: All ledgers content: '*/*': schema: @@ -304,87 +307,86 @@ paths: get: tags: - ledger + summary: Find a ledger by its id operationId: findLedgerById parameters: - name: ledgerId in: path + description: Id of the ledger required: true schema: type: string format: uuid responses: - "404": - description: Not Found - "400": - description: Bad Request "200": - description: OK + description: The ledger content: '*/*': schema: oneOf: - $ref: "#/components/schemas/CombinedLedgerResponse" - $ref: "#/components/schemas/MainLedgerResponse" + "400": + description: The ledger cannot be exposed (system ledger) + "404": + description: No ledger with this id /ledgers/{ledgerId}/transactions: get: tags: - transaction + summary: Find all transactions in a ledger operationId: finAllTransactionsInLedger parameters: - name: ledgerId in: path + description: Id of the ledger required: true schema: type: string format: uuid responses: - "404": - description: Not Found - "400": - description: Bad Request "200": - description: OK + description: All transactions in the ledger content: '*/*': schema: type: array items: $ref: "#/components/schemas/TransactionResponse" + "404": + description: No ledger with this id /ledgers/{ledgerId}/balance: get: tags: - ledger + summary: Find the balance of a ledger operationId: findBalanceByLedgerId parameters: - name: ledgerId in: path + description: Id of the ledger required: true schema: type: string format: uuid responses: - "404": - description: Not Found - "400": - description: Bad Request "200": - description: OK + description: The balance of the ledger content: '*/*': schema: $ref: "#/components/schemas/BalanceResponse" + "404": + description: No ledger with this id /characters: get: tags: - character + summary: Find all characters with a usable token operationId: findAllCharacters responses: - "404": - description: Not Found - "400": - description: Bad Request "200": - description: OK + description: All characters with a usable token content: '*/*': schema: @@ -406,8 +408,10 @@ components: - EVE_ESTIMATE fromLedgerRef: type: string + pattern: "[a-z]+(-[a-z]+)*" toLedgerRef: type: string + pattern: "[a-z]+(-[a-z]+)*" required: - fromLedgerRef - rate @@ -430,6 +434,7 @@ components: type: array items: type: string + pattern: "[a-z]+(-[a-z]+)*" rules: type: object additionalProperties: @@ -450,6 +455,7 @@ components: type: array items: type: string + pattern: "[a-z]+(-[a-z]+)*" rules: type: object additionalProperties: @@ -566,6 +572,7 @@ components: type: array items: type: string + pattern: "[a-z]+(-[a-z]+)*" rules: type: object additionalProperties: @@ -657,6 +664,9 @@ components: transactionId: type: string format: uuid + characterId: + type: integer + format: int64 datetime: type: string format: date-time @@ -669,6 +679,7 @@ components: - $ref: "#/components/schemas/IskTransferResponse" - $ref: "#/components/schemas/ItemTransferResponse" required: + - characterId - datetime - description - transactionId diff --git a/src/generated/mammon/api.ts b/src/generated/mammon/api.ts index d73e605..2ee1219 100644 --- a/src/generated/mammon/api.ts +++ b/src/generated/mammon/api.ts @@ -153,6 +153,7 @@ export interface SetCharacterRuleBookRequest { } export interface TransactionResponse { 'transactionId': string; + 'characterId': number; 'datetime': string; 'description': string; 'transfers': Array; @@ -193,7 +194,8 @@ export const ActivityApiAxiosParamCreator = function (configuration?: Configurat return { /** * - * @param {number} characterId + * @summary Fetch new activities for a character from the EVE API + * @param {number} characterId Id of the character * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -234,7 +236,8 @@ export const ActivityApiFp = function(configuration?: Configuration) { return { /** * - * @param {number} characterId + * @summary Fetch new activities for a character from the EVE API + * @param {number} characterId Id of the character * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -255,7 +258,8 @@ export const ActivityApiFactory = function (configuration?: Configuration, baseP return { /** * - * @param {number} characterId + * @summary Fetch new activities for a character from the EVE API + * @param {number} characterId Id of the character * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -271,7 +275,8 @@ export const ActivityApiFactory = function (configuration?: Configuration, baseP export class ActivityApi extends BaseAPI { /** * - * @param {number} characterId + * @summary Fetch new activities for a character from the EVE API + * @param {number} characterId Id of the character * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -289,6 +294,7 @@ export const CharacterApiAxiosParamCreator = function (configuration?: Configura return { /** * + * @summary Find all characters with a usable token * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -327,6 +333,7 @@ export const CharacterApiFp = function(configuration?: Configuration) { return { /** * + * @summary Find all characters with a usable token * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -347,6 +354,7 @@ export const CharacterApiFactory = function (configuration?: Configuration, base return { /** * + * @summary Find all characters with a usable token * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -362,6 +370,7 @@ export const CharacterApiFactory = function (configuration?: Configuration, base export class CharacterApi extends BaseAPI { /** * + * @summary Find all characters with a usable token * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -379,7 +388,8 @@ export const CharacterRuleBookApiAxiosParamCreator = function (configuration?: C return { /** * - * @param {number} characterId + * @summary Find the rule book assigned to a character + * @param {number} characterId Id of the character * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -412,8 +422,9 @@ export const CharacterRuleBookApiAxiosParamCreator = function (configuration?: C }, /** * - * @param {number} characterId - * @param {SetCharacterRuleBookRequest} setCharacterRuleBookRequest + * @summary Assign a rule book to a character + * @param {number} characterId Id of the character + * @param {SetCharacterRuleBookRequest} setCharacterRuleBookRequest Rule book and ledger bindings to assign * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -459,7 +470,8 @@ export const CharacterRuleBookApiFp = function(configuration?: Configuration) { return { /** * - * @param {number} characterId + * @summary Find the rule book assigned to a character + * @param {number} characterId Id of the character * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -471,8 +483,9 @@ export const CharacterRuleBookApiFp = function(configuration?: Configuration) { }, /** * - * @param {number} characterId - * @param {SetCharacterRuleBookRequest} setCharacterRuleBookRequest + * @summary Assign a rule book to a character + * @param {number} characterId Id of the character + * @param {SetCharacterRuleBookRequest} setCharacterRuleBookRequest Rule book and ledger bindings to assign * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -493,7 +506,8 @@ export const CharacterRuleBookApiFactory = function (configuration?: Configurati return { /** * - * @param {number} characterId + * @summary Find the rule book assigned to a character + * @param {number} characterId Id of the character * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -502,8 +516,9 @@ export const CharacterRuleBookApiFactory = function (configuration?: Configurati }, /** * - * @param {number} characterId - * @param {SetCharacterRuleBookRequest} setCharacterRuleBookRequest + * @summary Assign a rule book to a character + * @param {number} characterId Id of the character + * @param {SetCharacterRuleBookRequest} setCharacterRuleBookRequest Rule book and ledger bindings to assign * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -519,7 +534,8 @@ export const CharacterRuleBookApiFactory = function (configuration?: Configurati export class CharacterRuleBookApi extends BaseAPI { /** * - * @param {number} characterId + * @summary Find the rule book assigned to a character + * @param {number} characterId Id of the character * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -529,8 +545,9 @@ export class CharacterRuleBookApi extends BaseAPI { /** * - * @param {number} characterId - * @param {SetCharacterRuleBookRequest} setCharacterRuleBookRequest + * @summary Assign a rule book to a character + * @param {number} characterId Id of the character + * @param {SetCharacterRuleBookRequest} setCharacterRuleBookRequest Rule book and ledger bindings to assign * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -548,7 +565,8 @@ export const LedgerApiAxiosParamCreator = function (configuration?: Configuratio return { /** * - * @param {CreateCombinedLedgerRequest} createCombinedLedgerRequest + * @summary Create a combined ledger + * @param {CreateCombinedLedgerRequest} createCombinedLedgerRequest Combined ledger to create * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -582,7 +600,8 @@ export const LedgerApiAxiosParamCreator = function (configuration?: Configuratio }, /** * - * @param {CreateMainLedgerRequest} createMainLedgerRequest + * @summary Create a main ledger + * @param {CreateMainLedgerRequest} createMainLedgerRequest Main ledger to create * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -616,6 +635,7 @@ export const LedgerApiAxiosParamCreator = function (configuration?: Configuratio }, /** * + * @summary Find all ledgers * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -645,7 +665,8 @@ export const LedgerApiAxiosParamCreator = function (configuration?: Configuratio }, /** * - * @param {string} ledgerId + * @summary Find the balance of a ledger + * @param {string} ledgerId Id of the ledger * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -678,7 +699,8 @@ export const LedgerApiAxiosParamCreator = function (configuration?: Configuratio }, /** * - * @param {string} ledgerId + * @summary Find a ledger by its id + * @param {string} ledgerId Id of the ledger * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -711,8 +733,9 @@ export const LedgerApiAxiosParamCreator = function (configuration?: Configuratio }, /** * - * @param {string} ledgerId - * @param {UpdateCombinedLedgerRequest} updateCombinedLedgerRequest + * @summary Update a combined ledger + * @param {string} ledgerId Id of the combined ledger + * @param {UpdateCombinedLedgerRequest} updateCombinedLedgerRequest New state of the combined ledger * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -749,8 +772,9 @@ export const LedgerApiAxiosParamCreator = function (configuration?: Configuratio }, /** * - * @param {string} ledgerId - * @param {UpdateMainLedgerRequest} updateMainLedgerRequest + * @summary Update a main ledger + * @param {string} ledgerId Id of the main ledger + * @param {UpdateMainLedgerRequest} updateMainLedgerRequest New state of the main ledger * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -796,7 +820,8 @@ export const LedgerApiFp = function(configuration?: Configuration) { return { /** * - * @param {CreateCombinedLedgerRequest} createCombinedLedgerRequest + * @summary Create a combined ledger + * @param {CreateCombinedLedgerRequest} createCombinedLedgerRequest Combined ledger to create * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -808,7 +833,8 @@ export const LedgerApiFp = function(configuration?: Configuration) { }, /** * - * @param {CreateMainLedgerRequest} createMainLedgerRequest + * @summary Create a main ledger + * @param {CreateMainLedgerRequest} createMainLedgerRequest Main ledger to create * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -820,6 +846,7 @@ export const LedgerApiFp = function(configuration?: Configuration) { }, /** * + * @summary Find all ledgers * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -831,7 +858,8 @@ export const LedgerApiFp = function(configuration?: Configuration) { }, /** * - * @param {string} ledgerId + * @summary Find the balance of a ledger + * @param {string} ledgerId Id of the ledger * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -843,7 +871,8 @@ export const LedgerApiFp = function(configuration?: Configuration) { }, /** * - * @param {string} ledgerId + * @summary Find a ledger by its id + * @param {string} ledgerId Id of the ledger * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -855,8 +884,9 @@ export const LedgerApiFp = function(configuration?: Configuration) { }, /** * - * @param {string} ledgerId - * @param {UpdateCombinedLedgerRequest} updateCombinedLedgerRequest + * @summary Update a combined ledger + * @param {string} ledgerId Id of the combined ledger + * @param {UpdateCombinedLedgerRequest} updateCombinedLedgerRequest New state of the combined ledger * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -868,8 +898,9 @@ export const LedgerApiFp = function(configuration?: Configuration) { }, /** * - * @param {string} ledgerId - * @param {UpdateMainLedgerRequest} updateMainLedgerRequest + * @summary Update a main ledger + * @param {string} ledgerId Id of the main ledger + * @param {UpdateMainLedgerRequest} updateMainLedgerRequest New state of the main ledger * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -890,7 +921,8 @@ export const LedgerApiFactory = function (configuration?: Configuration, basePat return { /** * - * @param {CreateCombinedLedgerRequest} createCombinedLedgerRequest + * @summary Create a combined ledger + * @param {CreateCombinedLedgerRequest} createCombinedLedgerRequest Combined ledger to create * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -899,7 +931,8 @@ export const LedgerApiFactory = function (configuration?: Configuration, basePat }, /** * - * @param {CreateMainLedgerRequest} createMainLedgerRequest + * @summary Create a main ledger + * @param {CreateMainLedgerRequest} createMainLedgerRequest Main ledger to create * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -908,6 +941,7 @@ export const LedgerApiFactory = function (configuration?: Configuration, basePat }, /** * + * @summary Find all ledgers * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -916,7 +950,8 @@ export const LedgerApiFactory = function (configuration?: Configuration, basePat }, /** * - * @param {string} ledgerId + * @summary Find the balance of a ledger + * @param {string} ledgerId Id of the ledger * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -925,7 +960,8 @@ export const LedgerApiFactory = function (configuration?: Configuration, basePat }, /** * - * @param {string} ledgerId + * @summary Find a ledger by its id + * @param {string} ledgerId Id of the ledger * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -934,8 +970,9 @@ export const LedgerApiFactory = function (configuration?: Configuration, basePat }, /** * - * @param {string} ledgerId - * @param {UpdateCombinedLedgerRequest} updateCombinedLedgerRequest + * @summary Update a combined ledger + * @param {string} ledgerId Id of the combined ledger + * @param {UpdateCombinedLedgerRequest} updateCombinedLedgerRequest New state of the combined ledger * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -944,8 +981,9 @@ export const LedgerApiFactory = function (configuration?: Configuration, basePat }, /** * - * @param {string} ledgerId - * @param {UpdateMainLedgerRequest} updateMainLedgerRequest + * @summary Update a main ledger + * @param {string} ledgerId Id of the main ledger + * @param {UpdateMainLedgerRequest} updateMainLedgerRequest New state of the main ledger * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -961,7 +999,8 @@ export const LedgerApiFactory = function (configuration?: Configuration, basePat export class LedgerApi extends BaseAPI { /** * - * @param {CreateCombinedLedgerRequest} createCombinedLedgerRequest + * @summary Create a combined ledger + * @param {CreateCombinedLedgerRequest} createCombinedLedgerRequest Combined ledger to create * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -971,7 +1010,8 @@ export class LedgerApi extends BaseAPI { /** * - * @param {CreateMainLedgerRequest} createMainLedgerRequest + * @summary Create a main ledger + * @param {CreateMainLedgerRequest} createMainLedgerRequest Main ledger to create * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -981,6 +1021,7 @@ export class LedgerApi extends BaseAPI { /** * + * @summary Find all ledgers * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -990,7 +1031,8 @@ export class LedgerApi extends BaseAPI { /** * - * @param {string} ledgerId + * @summary Find the balance of a ledger + * @param {string} ledgerId Id of the ledger * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -1000,7 +1042,8 @@ export class LedgerApi extends BaseAPI { /** * - * @param {string} ledgerId + * @summary Find a ledger by its id + * @param {string} ledgerId Id of the ledger * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -1010,8 +1053,9 @@ export class LedgerApi extends BaseAPI { /** * - * @param {string} ledgerId - * @param {UpdateCombinedLedgerRequest} updateCombinedLedgerRequest + * @summary Update a combined ledger + * @param {string} ledgerId Id of the combined ledger + * @param {UpdateCombinedLedgerRequest} updateCombinedLedgerRequest New state of the combined ledger * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -1021,8 +1065,9 @@ export class LedgerApi extends BaseAPI { /** * - * @param {string} ledgerId - * @param {UpdateMainLedgerRequest} updateMainLedgerRequest + * @summary Update a main ledger + * @param {string} ledgerId Id of the main ledger + * @param {UpdateMainLedgerRequest} updateMainLedgerRequest New state of the main ledger * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -1040,6 +1085,7 @@ export const ProcessingApiAxiosParamCreator = function (configuration?: Configur return { /** * + * @summary Process new activities for all characters with a usable token * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -1077,6 +1123,7 @@ export const ProcessingApiFp = function(configuration?: Configuration) { return { /** * + * @summary Process new activities for all characters with a usable token * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -1097,6 +1144,7 @@ export const ProcessingApiFactory = function (configuration?: Configuration, bas return { /** * + * @summary Process new activities for all characters with a usable token * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -1112,6 +1160,7 @@ export const ProcessingApiFactory = function (configuration?: Configuration, bas export class ProcessingApi extends BaseAPI { /** * + * @summary Process new activities for all characters with a usable token * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -1129,7 +1178,8 @@ export const RuleBookApiAxiosParamCreator = function (configuration?: Configurat return { /** * - * @param {CreateRuleBookRequest} createRuleBookRequest + * @summary Create a rule book + * @param {CreateRuleBookRequest} createRuleBookRequest Rule book to create * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -1163,6 +1213,7 @@ export const RuleBookApiAxiosParamCreator = function (configuration?: Configurat }, /** * + * @summary Find all rule books * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -1192,7 +1243,8 @@ export const RuleBookApiAxiosParamCreator = function (configuration?: Configurat }, /** * - * @param {string} ruleBookId + * @summary Find a rule book by its id + * @param {string} ruleBookId Id of the rule book * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -1225,8 +1277,9 @@ export const RuleBookApiAxiosParamCreator = function (configuration?: Configurat }, /** * - * @param {string} ruleBookId - * @param {UpdateRuleBookRequest} updateRuleBookRequest + * @summary Update a rule book + * @param {string} ruleBookId Id of the rule book + * @param {UpdateRuleBookRequest} updateRuleBookRequest New state of the rule book * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -1272,7 +1325,8 @@ export const RuleBookApiFp = function(configuration?: Configuration) { return { /** * - * @param {CreateRuleBookRequest} createRuleBookRequest + * @summary Create a rule book + * @param {CreateRuleBookRequest} createRuleBookRequest Rule book to create * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -1284,6 +1338,7 @@ export const RuleBookApiFp = function(configuration?: Configuration) { }, /** * + * @summary Find all rule books * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -1295,7 +1350,8 @@ export const RuleBookApiFp = function(configuration?: Configuration) { }, /** * - * @param {string} ruleBookId + * @summary Find a rule book by its id + * @param {string} ruleBookId Id of the rule book * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -1307,8 +1363,9 @@ export const RuleBookApiFp = function(configuration?: Configuration) { }, /** * - * @param {string} ruleBookId - * @param {UpdateRuleBookRequest} updateRuleBookRequest + * @summary Update a rule book + * @param {string} ruleBookId Id of the rule book + * @param {UpdateRuleBookRequest} updateRuleBookRequest New state of the rule book * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -1329,7 +1386,8 @@ export const RuleBookApiFactory = function (configuration?: Configuration, baseP return { /** * - * @param {CreateRuleBookRequest} createRuleBookRequest + * @summary Create a rule book + * @param {CreateRuleBookRequest} createRuleBookRequest Rule book to create * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -1338,6 +1396,7 @@ export const RuleBookApiFactory = function (configuration?: Configuration, baseP }, /** * + * @summary Find all rule books * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -1346,7 +1405,8 @@ export const RuleBookApiFactory = function (configuration?: Configuration, baseP }, /** * - * @param {string} ruleBookId + * @summary Find a rule book by its id + * @param {string} ruleBookId Id of the rule book * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -1355,8 +1415,9 @@ export const RuleBookApiFactory = function (configuration?: Configuration, baseP }, /** * - * @param {string} ruleBookId - * @param {UpdateRuleBookRequest} updateRuleBookRequest + * @summary Update a rule book + * @param {string} ruleBookId Id of the rule book + * @param {UpdateRuleBookRequest} updateRuleBookRequest New state of the rule book * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -1372,7 +1433,8 @@ export const RuleBookApiFactory = function (configuration?: Configuration, baseP export class RuleBookApi extends BaseAPI { /** * - * @param {CreateRuleBookRequest} createRuleBookRequest + * @summary Create a rule book + * @param {CreateRuleBookRequest} createRuleBookRequest Rule book to create * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -1382,6 +1444,7 @@ export class RuleBookApi extends BaseAPI { /** * + * @summary Find all rule books * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -1391,7 +1454,8 @@ export class RuleBookApi extends BaseAPI { /** * - * @param {string} ruleBookId + * @summary Find a rule book by its id + * @param {string} ruleBookId Id of the rule book * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -1401,8 +1465,9 @@ export class RuleBookApi extends BaseAPI { /** * - * @param {string} ruleBookId - * @param {UpdateRuleBookRequest} updateRuleBookRequest + * @summary Update a rule book + * @param {string} ruleBookId Id of the rule book + * @param {UpdateRuleBookRequest} updateRuleBookRequest New state of the rule book * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -1420,7 +1485,8 @@ export const TransactionApiAxiosParamCreator = function (configuration?: Configu return { /** * - * @param {string} ledgerId + * @summary Find all transactions in a ledger + * @param {string} ledgerId Id of the ledger * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -1462,7 +1528,8 @@ export const TransactionApiFp = function(configuration?: Configuration) { return { /** * - * @param {string} ledgerId + * @summary Find all transactions in a ledger + * @param {string} ledgerId Id of the ledger * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -1483,7 +1550,8 @@ export const TransactionApiFactory = function (configuration?: Configuration, ba return { /** * - * @param {string} ledgerId + * @summary Find all transactions in a ledger + * @param {string} ledgerId Id of the ledger * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -1499,7 +1567,8 @@ export const TransactionApiFactory = function (configuration?: Configuration, ba export class TransactionApi extends BaseAPI { /** * - * @param {string} ledgerId + * @summary Find all transactions in a ledger + * @param {string} ledgerId Id of the ledger * @param {*} [options] Override http request option. * @throws {RequiredError} */ diff --git a/src/pages/ledger/ListLedgerTransactions.vue b/src/pages/ledger/ListLedgerTransactions.vue index 64a6054..36b136c 100644 --- a/src/pages/ledger/ListLedgerTransactions.vue +++ b/src/pages/ledger/ListLedgerTransactions.vue @@ -3,13 +3,15 @@ import {findAllTransactionInLeger, useLedgerParam} from "@/ledger"; import {computedAsync} from "@vueuse/core"; import {TransactionResponse} from "@/generated/mammon"; -import {formatEveDate} from "@/formaters.ts"; import {IskLabel} from "@/market"; import {SortableHeader, useSort, VirtualScrollTable} from "@/components/table"; import {TransferList, TransferTypes} from "@/transaction"; import {Dropdown} from "@/components"; +import {CharacterLabel, useCharactersStore} from "@/characters"; +import {formatEveDate} from "@/formaters.ts"; const {ledgerId} = useLedgerParam(); +const {findById} = useCharactersStore(); const transactions = computedAsync(async () => { if (ledgerId.value) { @@ -18,15 +20,18 @@ const transactions = computedAsync(async () => { return []; }, []); -const { sortedArray, headerProps } = useSort(() => transactions.value.map(transaction => { +const { sortedArray, headerProps } = useSort(computedAsync(() => Promise.all(transactions.value.map(async transaction => { + const character = await findById(transaction.characterId); return { + character, + characterName: character?.name ?? "", transactionId: transaction.transactionId, description: transaction.description, date: new Date(transaction.datetime), balance: getIskBalance(transaction), transfers: transaction.transfers } -}), { defaultSortKey: 'date', defaultSortDirection: 'desc' }); +})), []), { defaultSortKey: 'date', defaultSortDirection: 'desc' }); const getIskBalance = (transaction: TransactionResponse) => { if (!ledgerId.value) { @@ -54,6 +59,7 @@ const getIskBalance = (transaction: TransactionResponse) => {