added api docs

This commit is contained in:
Arseni
2026-02-24 21:26:31 +03:00
parent 0646f55189
commit fa54088b25
87 changed files with 2299 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
components:
schemas:
AccountData:
allOf:
- $ref: ./account_public.yaml#/components/schemas/AccountPublic
- type: object
additionalProperties: false
required:
- isAnonymous
properties:
isAnonymous:
type: boolean

View File

@@ -0,0 +1,26 @@
components:
schemas:
AccountPublic:
allOf:
- $ref: ../storable.yaml#/components/schemas/Storable
- $ref: ../common/describable.yaml#/components/schemas/Describable
- type: object
additionalProperties: false
required:
- login
- locale
- lastName
- isArchived
properties:
login:
type: string
format: email
locale:
type: string
lastName:
type: string
avatarUrl:
type: string
nullable: true
isArchived:
type: boolean

View File

@@ -0,0 +1,12 @@
components:
schemas:
ClientRefreshToken:
allOf:
- $ref: ./session_identifier.yaml#/components/schemas/SessionIdentifier
- type: object
additionalProperties: false
required:
- token
properties:
token:
type: string

View File

@@ -0,0 +1,17 @@
components:
schemas:
LoginData:
type: object
additionalProperties: false
required:
- login
- password
properties:
login:
type: string
format: email
password:
type: string
format: password
locale:
type: string

View File

@@ -0,0 +1,13 @@
components:
schemas:
SessionIdentifier:
type: object
additionalProperties: false
required:
- clientId
- deviceId
properties:
clientId:
type: string
deviceId:
type: string

View File

@@ -0,0 +1,14 @@
components:
schemas:
TokenData:
type: object
additionalProperties: false
required:
- token
- expiration
properties:
token:
type: string
expiration:
type: string
format: date-time

View File

@@ -0,0 +1,13 @@
components:
schemas:
Describable:
type: object
additionalProperties: false
required:
- name
properties:
name:
type: string
description:
type: string
nullable: true

View File

@@ -0,0 +1,16 @@
components:
schemas:
Money:
type: object
additionalProperties: false
required:
- amount
- currency
properties:
amount:
type: string
description: Decimal string amount.
example: '125.50'
currency:
type: string
example: USD

View File

@@ -0,0 +1,8 @@
components:
schemas:
CursorPageResponse:
type: object
additionalProperties: false
properties:
next_cursor:
type: string

View File

@@ -0,0 +1,7 @@
components:
schemas:
ObjectId:
type: string
pattern: '^[a-fA-F0-9]{24}$'
examples:
- 64f85f5f4c7dbf7cfb8f3f10

View File

@@ -0,0 +1,32 @@
components:
schemas:
OrganizationBase:
allOf:
- $ref: ../permission_bound.yaml#/components/schemas/PermissionBound
- $ref: ../common/describable.yaml#/components/schemas/Describable
- type: object
additionalProperties: false
required:
- tenantRef
- timeZone
properties:
tenantRef:
$ref: ../objectid.yaml#/components/schemas/ObjectId
timeZone:
type: string
logoUrl:
type: string
nullable: true
Organization:
allOf:
- $ref: ./organization.yaml#/components/schemas/OrganizationBase
- type: object
additionalProperties: false
required:
- members
properties:
members:
type: array
items:
$ref: ../objectid.yaml#/components/schemas/ObjectId

View File

@@ -0,0 +1,279 @@
components:
schemas:
Asset:
type: object
additionalProperties: false
properties:
chain:
$ref: ../../external/chain_network.yaml#/components/schemas/ChainNetwork
token_symbol:
type: string
contract_address:
type: string
LedgerEndpoint:
type: object
properties:
ledger_account_ref:
type: string
contra_ledger_account_ref:
type: string
ManagedWalletEndpoint:
type: object
properties:
managed_wallet_ref:
type: string
asset:
$ref: ./payment.yaml#/components/schemas/Asset
ExternalChainEndpoint:
type: object
properties:
asset:
$ref: ./payment.yaml#/components/schemas/Asset
address:
type: string
memo:
type: string
CardEndpoint:
type: object
properties:
pan:
type: string
firstName:
type: string
lastName:
type: string
exp_month:
type: integer
format: int32
exp_year:
type: integer
format: int32
country:
type: string
CardTokenEndpoint:
type: object
properties:
token:
type: string
masked_pan:
type: string
Endpoint:
type: object
additionalProperties: false
required:
- type
- data
properties:
type:
$ref: ../../external/endpoint_type.yaml#/components/schemas/EndpointType
data:
type: object
additionalProperties: true
metadata:
type: object
additionalProperties:
type: string
Customer:
type: object
additionalProperties: false
properties:
id:
type: string
first_name:
type: string
middle_name:
type: string
last_name:
type: string
ip:
type: string
zip:
type: string
country:
type: string
state:
type: string
city:
type: string
address:
type: string
CurrencyPair:
type: object
additionalProperties: false
required:
- base
- quote
properties:
base:
type: string
quote:
type: string
FxIntent:
type: object
additionalProperties: false
required:
- side
properties:
pair:
$ref: ./payment.yaml#/components/schemas/CurrencyPair
side:
$ref: ../../external/fx_side.yaml#/components/schemas/FxSide
firm:
type: boolean
ttl_ms:
type: integer
format: int64
preferred_provider:
type: string
max_age_ms:
type: integer
format: int32
PaymentIntent:
type: object
additionalProperties: false
required:
- kind
- source
- destination
- amount
properties:
kind:
$ref: ../../external/payment_kind.yaml#/components/schemas/PaymentKind
source:
$ref: ./payment.yaml#/components/schemas/Endpoint
destination:
$ref: ./payment.yaml#/components/schemas/Endpoint
amount:
$ref: ../common/money.yaml#/components/schemas/Money
fx:
$ref: ./payment.yaml#/components/schemas/FxIntent
settlement_mode:
$ref: ../../external/settlement_mode.yaml#/components/schemas/SettlementMode
settlement_currency:
type: string
attributes:
type: object
additionalProperties:
type: string
customer:
$ref: ./payment.yaml#/components/schemas/Customer
PaymentQuote:
type: object
additionalProperties: false
properties:
quoteRef:
type: string
debitAmount:
$ref: ../common/money.yaml#/components/schemas/Money
debitSettlementAmount:
$ref: ../common/money.yaml#/components/schemas/Money
expectedSettlementAmount:
$ref: ../common/money.yaml#/components/schemas/Money
expectedFeeTotal:
$ref: ../common/money.yaml#/components/schemas/Money
feeLines:
type: array
items:
$ref: ./payment.yaml#/components/schemas/FeeLine
fxQuote:
$ref: ./payment.yaml#/components/schemas/FxQuote
FeeLine:
type: object
additionalProperties: false
properties:
ledgerAccountRef:
type: string
amount:
$ref: ../common/money.yaml#/components/schemas/Money
lineType:
type: string
side:
type: string
meta:
type: object
additionalProperties:
type: string
FxQuote:
type: object
additionalProperties: false
properties:
quoteRef:
type: string
baseCurrency:
type: string
quoteCurrency:
type: string
side:
type: string
price:
type: string
baseAmount:
$ref: ../common/money.yaml#/components/schemas/Money
quoteAmount:
$ref: ../common/money.yaml#/components/schemas/Money
expiresAtUnixMs:
type: integer
format: int64
pricedAtUnixMs:
type: integer
format: int64
provider:
type: string
rateRef:
type: string
firm:
type: boolean
PaymentQuoteAggregate:
type: object
additionalProperties: false
properties:
debitAmounts:
type: array
items:
$ref: ../common/money.yaml#/components/schemas/Money
expectedSettlementAmounts:
type: array
items:
$ref: ../common/money.yaml#/components/schemas/Money
expectedFeeTotals:
type: array
items:
$ref: ../common/money.yaml#/components/schemas/Money
Payment:
type: object
additionalProperties: false
properties:
paymentRef:
type: string
idempotencyKey:
type: string
state:
$ref: ../../external/payment_state.yaml#/components/schemas/PaymentState
failureCode:
type: string
failureReason:
type: string
lastQuote:
$ref: ./payment.yaml#/components/schemas/PaymentQuote
createdAt:
type: string
format: date-time
meta:
type: object
additionalProperties:
type: string

View File

@@ -0,0 +1,22 @@
components:
schemas:
PaymentMethod:
allOf:
- $ref: ../permission_bound.yaml#/components/schemas/PermissionBound
- $ref: ../common/describable.yaml#/components/schemas/Describable
- type: object
additionalProperties: false
required:
- recipientRef
- type
- isMain
properties:
recipientRef:
$ref: ../objectid.yaml#/components/schemas/ObjectId
type:
$ref: ../../external/payment_method_type.yaml#/components/schemas/PaymentMethodType
data:
type: object
additionalProperties: true
isMain:
type: boolean

View File

@@ -0,0 +1,18 @@
components:
schemas:
PermissionBound:
allOf:
- $ref: ./storable.yaml#/components/schemas/Storable
- type: object
additionalProperties: false
required:
- organizationRef
- permissionRef
- isArchived
properties:
organizationRef:
$ref: ./objectid.yaml#/components/schemas/ObjectId
permissionRef:
$ref: ./objectid.yaml#/components/schemas/ObjectId
isArchived:
type: boolean

View File

@@ -0,0 +1,30 @@
components:
schemas:
Recipient:
allOf:
- $ref: ../permission_bound.yaml#/components/schemas/PermissionBound
- $ref: ../common/describable.yaml#/components/schemas/Describable
- type: object
additionalProperties: false
required:
- email
- status
- type
properties:
email:
type: string
format: email
avatarUrl:
type: string
nullable: true
status:
type: string
enum:
- ready
- registered
- notRegistered
type:
type: string
enum:
- internal
- external

View File

@@ -0,0 +1,18 @@
components:
schemas:
Storable:
type: object
additionalProperties: false
required:
- id
- createdAt
- updatedAt
properties:
id:
$ref: ./objectid.yaml#/components/schemas/ObjectId
createdAt:
type: string
format: date-time
updatedAt:
type: string
format: date-time