feat(#8): Handle polymorphic activity source

This commit is contained in:
Sirttas
2026-07-03 14:00:42 +02:00
parent 052a0a5d03
commit 8d73fe3ed1
8 changed files with 154 additions and 31 deletions
+51 -15
View File
@@ -1499,6 +1499,46 @@ components:
type: string
required:
- type
ActivitySourceResponse:
type: object
description: "Where an activity or transaction came from: a character, a corporation\
\ wallet, or nothing (a manual entry)."
properties:
type:
type: string
description: The kind of source.
enum:
- CHARACTER
- CORPORATION
- NONE
example: CHARACTER
characterId:
type:
- integer
- "null"
format: int64
description: "EVE character id, when the source is a character."
example: 2112625428
corporationId:
type:
- integer
- "null"
format: int64
description: "EVE corporation id, when the source is a corporation."
example: 98000001
division:
type:
- integer
- "null"
format: int32
description: "Corporation wallet division (1-7), when the source is a corporation\
\ and it is known."
example: 4
required:
- characterId
- corporationId
- division
- type
IskTransferResponse:
allOf:
- $ref: "#/components/schemas/TransferResponse"
@@ -1563,13 +1603,10 @@ components:
format: uuid
description: Unique transaction identifier.
example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
characterId:
type:
- integer
- "null"
format: int64
description: "EVE character id the transaction is attributed to, if any."
example: 2112625428
source:
$ref: "#/components/schemas/ActivitySourceResponse"
description: "Where the transaction is attributed: a character, a corporation,\
\ or nothing."
datetime:
type: string
format: date-time
@@ -1585,9 +1622,9 @@ components:
items:
$ref: "#/components/schemas/TransferResponse"
required:
- characterId
- datetime
- description
- source
- transactionId
- transfers
TransferResponse:
@@ -1649,17 +1686,16 @@ components:
format: uuid
description: Unique acquisition identifier.
example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
characterId:
type: integer
format: int64
description: EVE character id that made the acquisition.
example: 2112625428
source:
$ref: "#/components/schemas/ActivitySourceResponse"
description: "Where the acquisition came from: a character, a corporation,\
\ or nothing."
marketTypeId:
type: integer
format: int64
description: EVE market type (item) id that was acquired.
example: 34
source:
origin:
type: string
description: How the item entered the inventory.
enum:
@@ -1686,9 +1722,9 @@ components:
example: 5.42
required:
- acquisitionId
- characterId
- datetime
- marketTypeId
- origin
- quantity
- remaining
- source