@firela/api-types 0.0.0-canary.5c1ed455 → 0.0.0-canary.610daafc
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +563 -48
- package/dist/index.d.ts +563 -48
- package/dist/index.js +3 -1
- package/dist/index.mjs +3 -1
- package/package.json +1 -1
- package/src/generated/schemas.gen.ts +513 -73
- package/src/generated/services.gen.ts +262 -1
- package/src/generated/types.gen.ts +593 -50
|
@@ -1247,6 +1247,77 @@ export const $TransactionDetailDto = {
|
|
|
1247
1247
|
]
|
|
1248
1248
|
} as const;
|
|
1249
1249
|
|
|
1250
|
+
export const $BalanceByCurrencyDto = {
|
|
1251
|
+
type: 'object',
|
|
1252
|
+
properties: {
|
|
1253
|
+
currency: {
|
|
1254
|
+
type: 'string',
|
|
1255
|
+
description: 'ISO 4217 currency code',
|
|
1256
|
+
example: 'CNY'
|
|
1257
|
+
},
|
|
1258
|
+
balance: {
|
|
1259
|
+
type: 'string',
|
|
1260
|
+
description: 'Balance amount',
|
|
1261
|
+
example: '50000.00'
|
|
1262
|
+
}
|
|
1263
|
+
},
|
|
1264
|
+
required: ['currency', 'balance']
|
|
1265
|
+
} as const;
|
|
1266
|
+
|
|
1267
|
+
export const $ExchangeRateWarningDto = {
|
|
1268
|
+
type: 'object',
|
|
1269
|
+
properties: {
|
|
1270
|
+
type: {
|
|
1271
|
+
type: 'string',
|
|
1272
|
+
description: 'Warning type',
|
|
1273
|
+
example: 'MISSING_EXCHANGE_RATE'
|
|
1274
|
+
},
|
|
1275
|
+
currency: {
|
|
1276
|
+
type: 'string',
|
|
1277
|
+
description: 'Currency without exchange rate',
|
|
1278
|
+
example: 'EUR'
|
|
1279
|
+
},
|
|
1280
|
+
totalAmount: {
|
|
1281
|
+
type: 'string',
|
|
1282
|
+
description: 'Total amount affected',
|
|
1283
|
+
example: '1000.00'
|
|
1284
|
+
}
|
|
1285
|
+
},
|
|
1286
|
+
required: ['type', 'currency', 'totalAmount']
|
|
1287
|
+
} as const;
|
|
1288
|
+
|
|
1289
|
+
export const $TransactionListSummaryDto = {
|
|
1290
|
+
type: 'object',
|
|
1291
|
+
properties: {
|
|
1292
|
+
totalAmount: {
|
|
1293
|
+
type: 'string',
|
|
1294
|
+
description:
|
|
1295
|
+
'Partial converted total in base currency (rated currencies only, raw Beancount sign). When warnings is non-empty this excludes currencies missing an FX rate; may be "0.00" if ALL non-base currencies lack a rate. Converted at the dateTo (or current) available rate.',
|
|
1296
|
+
example: '-6000.00'
|
|
1297
|
+
},
|
|
1298
|
+
currency: {
|
|
1299
|
+
type: 'string',
|
|
1300
|
+
description: 'Base currency (ISO 4217)',
|
|
1301
|
+
example: 'CNY'
|
|
1302
|
+
},
|
|
1303
|
+
balanceByCurrency: {
|
|
1304
|
+
description: 'Raw (unconverted) balance per currency',
|
|
1305
|
+
type: 'array',
|
|
1306
|
+
items: {
|
|
1307
|
+
$ref: '#/components/schemas/BalanceByCurrencyDto'
|
|
1308
|
+
}
|
|
1309
|
+
},
|
|
1310
|
+
warnings: {
|
|
1311
|
+
description: 'Currencies missing an FX rate (omitted when empty)',
|
|
1312
|
+
type: 'array',
|
|
1313
|
+
items: {
|
|
1314
|
+
$ref: '#/components/schemas/ExchangeRateWarningDto'
|
|
1315
|
+
}
|
|
1316
|
+
}
|
|
1317
|
+
},
|
|
1318
|
+
required: ['totalAmount', 'currency', 'balanceByCurrency']
|
|
1319
|
+
} as const;
|
|
1320
|
+
|
|
1250
1321
|
export const $TransactionListResponseDto = {
|
|
1251
1322
|
type: 'object',
|
|
1252
1323
|
properties: {
|
|
@@ -1271,6 +1342,15 @@ export const $TransactionListResponseDto = {
|
|
|
1271
1342
|
type: 'number',
|
|
1272
1343
|
description: 'Number of items skipped',
|
|
1273
1344
|
example: 0
|
|
1345
|
+
},
|
|
1346
|
+
summary: {
|
|
1347
|
+
description:
|
|
1348
|
+
'Amount summary for the full filtered set (#514). Present only when the request has a single account OR category viewpoint; omitted for search-only / plain-list / dual-perspective requests.',
|
|
1349
|
+
allOf: [
|
|
1350
|
+
{
|
|
1351
|
+
$ref: '#/components/schemas/TransactionListSummaryDto'
|
|
1352
|
+
}
|
|
1353
|
+
]
|
|
1274
1354
|
}
|
|
1275
1355
|
},
|
|
1276
1356
|
required: ['data', 'total', 'limit', 'offset']
|
|
@@ -1855,7 +1935,8 @@ export const $ResolveResultDto = {
|
|
|
1855
1935
|
},
|
|
1856
1936
|
resolutionId: {
|
|
1857
1937
|
type: 'string',
|
|
1858
|
-
description:
|
|
1938
|
+
description:
|
|
1939
|
+
'Resolution ID for undo. Absent when the resolver rejected the decision (review stayed PENDING).'
|
|
1859
1940
|
},
|
|
1860
1941
|
canUndo: {
|
|
1861
1942
|
type: 'boolean',
|
|
@@ -1873,7 +1954,7 @@ export const $ResolveResultDto = {
|
|
|
1873
1954
|
example: 'rule_01HXK5V8N2M3P4Q5R6S7T8U9V0'
|
|
1874
1955
|
}
|
|
1875
1956
|
},
|
|
1876
|
-
required: ['success'
|
|
1957
|
+
required: ['success']
|
|
1877
1958
|
} as const;
|
|
1878
1959
|
|
|
1879
1960
|
export const $UndoResultDto = {
|
|
@@ -4311,6 +4392,144 @@ export const $UpdatePropertyDto = {
|
|
|
4311
4392
|
required: ['value']
|
|
4312
4393
|
} as const;
|
|
4313
4394
|
|
|
4395
|
+
export const $CreateBeanEventDto = {
|
|
4396
|
+
type: 'object',
|
|
4397
|
+
properties: {
|
|
4398
|
+
date: {
|
|
4399
|
+
type: 'string',
|
|
4400
|
+
description: 'Life event date (ISO 8601)',
|
|
4401
|
+
example: '2024-03-15'
|
|
4402
|
+
},
|
|
4403
|
+
type: {
|
|
4404
|
+
type: 'string',
|
|
4405
|
+
description:
|
|
4406
|
+
'Life event type (e.g., "employer", "location", "marital-status") — user-defined, no enum constraint at engine layer',
|
|
4407
|
+
example: 'employer'
|
|
4408
|
+
},
|
|
4409
|
+
description: {
|
|
4410
|
+
type: 'string',
|
|
4411
|
+
description:
|
|
4412
|
+
'Life event description. Empty string is a VALID value (distinct from absence).',
|
|
4413
|
+
example: 'Acme Corp'
|
|
4414
|
+
},
|
|
4415
|
+
meta: {
|
|
4416
|
+
type: 'object',
|
|
4417
|
+
description:
|
|
4418
|
+
'Product-side metadata (lives in BeanEvent.meta JSON, never in engine Event fields)',
|
|
4419
|
+
example: {
|
|
4420
|
+
note: 'Promotion'
|
|
4421
|
+
}
|
|
4422
|
+
}
|
|
4423
|
+
},
|
|
4424
|
+
required: ['date', 'type', 'description']
|
|
4425
|
+
} as const;
|
|
4426
|
+
|
|
4427
|
+
export const $EventResponseDto = {
|
|
4428
|
+
type: 'object',
|
|
4429
|
+
properties: {
|
|
4430
|
+
id: {
|
|
4431
|
+
type: 'string',
|
|
4432
|
+
description: 'Unique identifier',
|
|
4433
|
+
example: 'uuid-123-456'
|
|
4434
|
+
},
|
|
4435
|
+
userId: {
|
|
4436
|
+
type: 'string',
|
|
4437
|
+
description: 'User ID (owner of the life event)',
|
|
4438
|
+
example: 'user-123'
|
|
4439
|
+
},
|
|
4440
|
+
date: {
|
|
4441
|
+
type: 'string',
|
|
4442
|
+
description: 'Life event date (ISO 8601 format)',
|
|
4443
|
+
example: '2024-03-15',
|
|
4444
|
+
format: 'date'
|
|
4445
|
+
},
|
|
4446
|
+
type: {
|
|
4447
|
+
type: 'string',
|
|
4448
|
+
description:
|
|
4449
|
+
'Life event type (user-defined, e.g., "employer", "location")',
|
|
4450
|
+
example: 'employer'
|
|
4451
|
+
},
|
|
4452
|
+
description: {
|
|
4453
|
+
type: 'string',
|
|
4454
|
+
description:
|
|
4455
|
+
'Life event description. May be an empty string (a valid value distinct from absence).',
|
|
4456
|
+
example: 'Acme Corp'
|
|
4457
|
+
},
|
|
4458
|
+
meta: {
|
|
4459
|
+
type: 'object',
|
|
4460
|
+
description: 'Product-side metadata (free-form JSON)',
|
|
4461
|
+
example: {
|
|
4462
|
+
note: 'Promotion'
|
|
4463
|
+
}
|
|
4464
|
+
},
|
|
4465
|
+
createdAt: {
|
|
4466
|
+
format: 'date-time',
|
|
4467
|
+
type: 'string',
|
|
4468
|
+
description: 'Creation timestamp',
|
|
4469
|
+
example: '2024-03-15T10:00:00Z'
|
|
4470
|
+
},
|
|
4471
|
+
updatedAt: {
|
|
4472
|
+
format: 'date-time',
|
|
4473
|
+
type: 'string',
|
|
4474
|
+
description:
|
|
4475
|
+
'Last update timestamp. Also emitted as the ETag response header for If-Match optimistic concurrency.',
|
|
4476
|
+
example: '2024-03-15T10:00:00Z'
|
|
4477
|
+
}
|
|
4478
|
+
},
|
|
4479
|
+
required: [
|
|
4480
|
+
'id',
|
|
4481
|
+
'userId',
|
|
4482
|
+
'date',
|
|
4483
|
+
'type',
|
|
4484
|
+
'description',
|
|
4485
|
+
'meta',
|
|
4486
|
+
'createdAt',
|
|
4487
|
+
'updatedAt'
|
|
4488
|
+
]
|
|
4489
|
+
} as const;
|
|
4490
|
+
|
|
4491
|
+
export const $EventListResponseDto = {
|
|
4492
|
+
type: 'object',
|
|
4493
|
+
properties: {
|
|
4494
|
+
items: {
|
|
4495
|
+
description: 'List of life events',
|
|
4496
|
+
type: 'array',
|
|
4497
|
+
items: {
|
|
4498
|
+
$ref: '#/components/schemas/EventResponseDto'
|
|
4499
|
+
}
|
|
4500
|
+
},
|
|
4501
|
+
total: {
|
|
4502
|
+
type: 'number',
|
|
4503
|
+
description: 'Total number of life events matching the query',
|
|
4504
|
+
example: 42
|
|
4505
|
+
}
|
|
4506
|
+
},
|
|
4507
|
+
required: ['items', 'total']
|
|
4508
|
+
} as const;
|
|
4509
|
+
|
|
4510
|
+
export const $UpdateBeanEventDto = {
|
|
4511
|
+
type: 'object',
|
|
4512
|
+
properties: {
|
|
4513
|
+
date: {
|
|
4514
|
+
type: 'string',
|
|
4515
|
+
description: 'Life event date (ISO 8601)'
|
|
4516
|
+
},
|
|
4517
|
+
type: {
|
|
4518
|
+
type: 'string',
|
|
4519
|
+
description: 'Life event type (user-defined)'
|
|
4520
|
+
},
|
|
4521
|
+
description: {
|
|
4522
|
+
type: 'string',
|
|
4523
|
+
description:
|
|
4524
|
+
'Life event description. Empty string is a VALID value (distinct from absence).'
|
|
4525
|
+
},
|
|
4526
|
+
meta: {
|
|
4527
|
+
type: 'object',
|
|
4528
|
+
description: 'Product-side metadata (free-form JSON)'
|
|
4529
|
+
}
|
|
4530
|
+
}
|
|
4531
|
+
} as const;
|
|
4532
|
+
|
|
4314
4533
|
export const $FileImportDto = {
|
|
4315
4534
|
type: 'object',
|
|
4316
4535
|
properties: {
|
|
@@ -5790,23 +6009,6 @@ export const $NlpResponseDto = {
|
|
|
5790
6009
|
required: ['status', 'action']
|
|
5791
6010
|
} as const;
|
|
5792
6011
|
|
|
5793
|
-
export const $BalanceByCurrencyDto = {
|
|
5794
|
-
type: 'object',
|
|
5795
|
-
properties: {
|
|
5796
|
-
currency: {
|
|
5797
|
-
type: 'string',
|
|
5798
|
-
description: 'ISO 4217 currency code',
|
|
5799
|
-
example: 'CNY'
|
|
5800
|
-
},
|
|
5801
|
-
balance: {
|
|
5802
|
-
type: 'string',
|
|
5803
|
-
description: 'Balance amount',
|
|
5804
|
-
example: '50000.00'
|
|
5805
|
-
}
|
|
5806
|
-
},
|
|
5807
|
-
required: ['currency', 'balance']
|
|
5808
|
-
} as const;
|
|
5809
|
-
|
|
5810
6012
|
export const $NetWorthByCurrencyDto = {
|
|
5811
6013
|
type: 'object',
|
|
5812
6014
|
properties: {
|
|
@@ -5876,28 +6078,6 @@ export const $ConvertedNetWorthDto = {
|
|
|
5876
6078
|
]
|
|
5877
6079
|
} as const;
|
|
5878
6080
|
|
|
5879
|
-
export const $ExchangeRateWarningDto = {
|
|
5880
|
-
type: 'object',
|
|
5881
|
-
properties: {
|
|
5882
|
-
type: {
|
|
5883
|
-
type: 'string',
|
|
5884
|
-
description: 'Warning type',
|
|
5885
|
-
example: 'MISSING_EXCHANGE_RATE'
|
|
5886
|
-
},
|
|
5887
|
-
currency: {
|
|
5888
|
-
type: 'string',
|
|
5889
|
-
description: 'Currency without exchange rate',
|
|
5890
|
-
example: 'EUR'
|
|
5891
|
-
},
|
|
5892
|
-
totalAmount: {
|
|
5893
|
-
type: 'string',
|
|
5894
|
-
description: 'Total amount affected',
|
|
5895
|
-
example: '1000.00'
|
|
5896
|
-
}
|
|
5897
|
-
},
|
|
5898
|
-
required: ['type', 'currency', 'totalAmount']
|
|
5899
|
-
} as const;
|
|
5900
|
-
|
|
5901
6081
|
export const $NetWorthResponseDto = {
|
|
5902
6082
|
type: 'object',
|
|
5903
6083
|
properties: {
|
|
@@ -5999,6 +6179,12 @@ export const $AccountItemDto = {
|
|
|
5999
6179
|
type: 'string',
|
|
6000
6180
|
description: 'Currency code',
|
|
6001
6181
|
example: 'CNY'
|
|
6182
|
+
},
|
|
6183
|
+
convertedBalance: {
|
|
6184
|
+
type: 'string',
|
|
6185
|
+
description:
|
|
6186
|
+
'FX-converted balance in base currency; omitted when not convertible',
|
|
6187
|
+
example: '50000.00'
|
|
6002
6188
|
}
|
|
6003
6189
|
},
|
|
6004
6190
|
required: ['id', 'name', 'displayName', 'balance', 'currency']
|
|
@@ -6025,11 +6211,66 @@ export const $PlatformGroupDto = {
|
|
|
6025
6211
|
},
|
|
6026
6212
|
totalBalance: {
|
|
6027
6213
|
type: 'string',
|
|
6028
|
-
description: '
|
|
6214
|
+
description: 'FX-converted total balance in base currency',
|
|
6215
|
+
example: '100000.00'
|
|
6216
|
+
},
|
|
6217
|
+
balanceByCurrency: {
|
|
6218
|
+
description: 'Raw (unconverted) balances grouped by currency',
|
|
6219
|
+
type: 'array',
|
|
6220
|
+
items: {
|
|
6221
|
+
$ref: '#/components/schemas/BalanceByCurrencyDto'
|
|
6222
|
+
}
|
|
6223
|
+
},
|
|
6224
|
+
convertedBalance: {
|
|
6225
|
+
type: 'string',
|
|
6226
|
+
description:
|
|
6227
|
+
'Converted balance in base currency (omitted when no currency is convertible)',
|
|
6029
6228
|
example: '100000.00'
|
|
6229
|
+
},
|
|
6230
|
+
sharePct: {
|
|
6231
|
+
type: 'number',
|
|
6232
|
+
description:
|
|
6233
|
+
'Share of the grand converted total (0-100); 0 when grand total is 0',
|
|
6234
|
+
example: 42.5
|
|
6235
|
+
}
|
|
6236
|
+
},
|
|
6237
|
+
required: [
|
|
6238
|
+
'platformId',
|
|
6239
|
+
'platformName',
|
|
6240
|
+
'accounts',
|
|
6241
|
+
'totalBalance',
|
|
6242
|
+
'balanceByCurrency',
|
|
6243
|
+
'sharePct'
|
|
6244
|
+
]
|
|
6245
|
+
} as const;
|
|
6246
|
+
|
|
6247
|
+
export const $AccountExchangeRateWarningDto = {
|
|
6248
|
+
type: 'object',
|
|
6249
|
+
properties: {
|
|
6250
|
+
type: {
|
|
6251
|
+
type: 'string',
|
|
6252
|
+
description: 'Warning type',
|
|
6253
|
+
example: 'MISSING_EXCHANGE_RATE'
|
|
6254
|
+
},
|
|
6255
|
+
currency: {
|
|
6256
|
+
type: 'string',
|
|
6257
|
+
description: 'Currency without exchange rate',
|
|
6258
|
+
example: 'USD'
|
|
6259
|
+
},
|
|
6260
|
+
accounts: {
|
|
6261
|
+
description: 'Affected account paths',
|
|
6262
|
+
type: 'array',
|
|
6263
|
+
items: {
|
|
6264
|
+
type: 'string'
|
|
6265
|
+
}
|
|
6266
|
+
},
|
|
6267
|
+
totalAmount: {
|
|
6268
|
+
type: 'string',
|
|
6269
|
+
description: 'Total amount in this currency',
|
|
6270
|
+
example: '5000.00'
|
|
6030
6271
|
}
|
|
6031
6272
|
},
|
|
6032
|
-
required: ['
|
|
6273
|
+
required: ['type', 'currency', 'accounts', 'totalAmount']
|
|
6033
6274
|
} as const;
|
|
6034
6275
|
|
|
6035
6276
|
export const $AccountsSummaryDto = {
|
|
@@ -6042,9 +6283,21 @@ export const $AccountsSummaryDto = {
|
|
|
6042
6283
|
totalPlatforms: {
|
|
6043
6284
|
type: 'number',
|
|
6044
6285
|
description: 'Total number of platforms'
|
|
6286
|
+
},
|
|
6287
|
+
baseCurrency: {
|
|
6288
|
+
type: 'string',
|
|
6289
|
+
description: 'Base currency for conversion',
|
|
6290
|
+
example: 'CNY'
|
|
6291
|
+
},
|
|
6292
|
+
warnings: {
|
|
6293
|
+
description: 'Per-account exchange rate warnings',
|
|
6294
|
+
type: 'array',
|
|
6295
|
+
items: {
|
|
6296
|
+
$ref: '#/components/schemas/AccountExchangeRateWarningDto'
|
|
6297
|
+
}
|
|
6045
6298
|
}
|
|
6046
6299
|
},
|
|
6047
|
-
required: ['totalAccounts', 'totalPlatforms']
|
|
6300
|
+
required: ['totalAccounts', 'totalPlatforms', 'baseCurrency']
|
|
6048
6301
|
} as const;
|
|
6049
6302
|
|
|
6050
6303
|
export const $AccountsResponseDto = {
|
|
@@ -6096,6 +6349,12 @@ export const $AccountItemWithAssetClassDto = {
|
|
|
6096
6349
|
description: 'Currency code',
|
|
6097
6350
|
example: 'CNY'
|
|
6098
6351
|
},
|
|
6352
|
+
convertedBalance: {
|
|
6353
|
+
type: 'string',
|
|
6354
|
+
description:
|
|
6355
|
+
'FX-converted balance in base currency; omitted when not convertible',
|
|
6356
|
+
example: '50000.00'
|
|
6357
|
+
},
|
|
6099
6358
|
assetClass: {
|
|
6100
6359
|
type: 'string',
|
|
6101
6360
|
description: 'Asset class',
|
|
@@ -6175,35 +6434,6 @@ export const $AssetClassGroupDto = {
|
|
|
6175
6434
|
required: ['assetClass', 'accounts', 'balanceByCurrency']
|
|
6176
6435
|
} as const;
|
|
6177
6436
|
|
|
6178
|
-
export const $AccountExchangeRateWarningDto = {
|
|
6179
|
-
type: 'object',
|
|
6180
|
-
properties: {
|
|
6181
|
-
type: {
|
|
6182
|
-
type: 'string',
|
|
6183
|
-
description: 'Warning type',
|
|
6184
|
-
example: 'MISSING_EXCHANGE_RATE'
|
|
6185
|
-
},
|
|
6186
|
-
currency: {
|
|
6187
|
-
type: 'string',
|
|
6188
|
-
description: 'Currency without exchange rate',
|
|
6189
|
-
example: 'USD'
|
|
6190
|
-
},
|
|
6191
|
-
accounts: {
|
|
6192
|
-
description: 'Affected account paths',
|
|
6193
|
-
type: 'array',
|
|
6194
|
-
items: {
|
|
6195
|
-
type: 'string'
|
|
6196
|
-
}
|
|
6197
|
-
},
|
|
6198
|
-
totalAmount: {
|
|
6199
|
-
type: 'string',
|
|
6200
|
-
description: 'Total amount in this currency',
|
|
6201
|
-
example: '5000.00'
|
|
6202
|
-
}
|
|
6203
|
-
},
|
|
6204
|
-
required: ['type', 'currency', 'accounts', 'totalAmount']
|
|
6205
|
-
} as const;
|
|
6206
|
-
|
|
6207
6437
|
export const $AssetClassSummaryDto = {
|
|
6208
6438
|
type: 'object',
|
|
6209
6439
|
properties: {
|
|
@@ -6483,6 +6713,101 @@ export const $CashFlowResponseDto = {
|
|
|
6483
6713
|
]
|
|
6484
6714
|
} as const;
|
|
6485
6715
|
|
|
6716
|
+
export const $CategoryGroupDto = {
|
|
6717
|
+
type: 'object',
|
|
6718
|
+
properties: {
|
|
6719
|
+
category: {
|
|
6720
|
+
type: 'string',
|
|
6721
|
+
description:
|
|
6722
|
+
'Functional category (account-path Group segment); regional and universal account paths merge under it',
|
|
6723
|
+
example: 'Food'
|
|
6724
|
+
},
|
|
6725
|
+
totalExpense: {
|
|
6726
|
+
type: 'string',
|
|
6727
|
+
description:
|
|
6728
|
+
'Converted total for this category in base currency (expense amount when flow=expense, income amount when flow=income)',
|
|
6729
|
+
example: '1200.00'
|
|
6730
|
+
},
|
|
6731
|
+
sharePct: {
|
|
6732
|
+
type: 'number',
|
|
6733
|
+
description: 'Share of grand total (0-100); 0 when grand total is 0',
|
|
6734
|
+
example: 42.5
|
|
6735
|
+
},
|
|
6736
|
+
balanceByCurrency: {
|
|
6737
|
+
description: 'Raw (unconverted) expense per currency',
|
|
6738
|
+
type: 'array',
|
|
6739
|
+
items: {
|
|
6740
|
+
$ref: '#/components/schemas/BalanceByCurrencyDto'
|
|
6741
|
+
}
|
|
6742
|
+
},
|
|
6743
|
+
convertedBalance: {
|
|
6744
|
+
type: 'string',
|
|
6745
|
+
description:
|
|
6746
|
+
'Converted total in base currency (omitted when FX missing for all currencies in this category)',
|
|
6747
|
+
example: '1200.00'
|
|
6748
|
+
}
|
|
6749
|
+
},
|
|
6750
|
+
required: ['category', 'totalExpense', 'sharePct', 'balanceByCurrency']
|
|
6751
|
+
} as const;
|
|
6752
|
+
|
|
6753
|
+
export const $ExpensesByCategorySummaryDto = {
|
|
6754
|
+
type: 'object',
|
|
6755
|
+
properties: {
|
|
6756
|
+
totalExpense: {
|
|
6757
|
+
type: 'string',
|
|
6758
|
+
description:
|
|
6759
|
+
'Total across all categories, converted (convertible categories only); expense totals when flow=expense, income totals when flow=income',
|
|
6760
|
+
example: '5000.00'
|
|
6761
|
+
},
|
|
6762
|
+
categoryCount: {
|
|
6763
|
+
type: 'number',
|
|
6764
|
+
description: 'Number of categories',
|
|
6765
|
+
example: 8
|
|
6766
|
+
}
|
|
6767
|
+
},
|
|
6768
|
+
required: ['totalExpense', 'categoryCount']
|
|
6769
|
+
} as const;
|
|
6770
|
+
|
|
6771
|
+
export const $ExpensesByCategoryResponseDto = {
|
|
6772
|
+
type: 'object',
|
|
6773
|
+
properties: {
|
|
6774
|
+
period: {
|
|
6775
|
+
type: 'string',
|
|
6776
|
+
description: 'Period requested',
|
|
6777
|
+
example: '1m'
|
|
6778
|
+
},
|
|
6779
|
+
baseCurrency: {
|
|
6780
|
+
type: 'string',
|
|
6781
|
+
description: 'Base currency for converted values',
|
|
6782
|
+
example: 'CNY'
|
|
6783
|
+
},
|
|
6784
|
+
groups: {
|
|
6785
|
+
description:
|
|
6786
|
+
'Expense groups by functional category, sorted by converted total desc',
|
|
6787
|
+
type: 'array',
|
|
6788
|
+
items: {
|
|
6789
|
+
$ref: '#/components/schemas/CategoryGroupDto'
|
|
6790
|
+
}
|
|
6791
|
+
},
|
|
6792
|
+
summary: {
|
|
6793
|
+
description: 'Summary statistics',
|
|
6794
|
+
allOf: [
|
|
6795
|
+
{
|
|
6796
|
+
$ref: '#/components/schemas/ExpensesByCategorySummaryDto'
|
|
6797
|
+
}
|
|
6798
|
+
]
|
|
6799
|
+
},
|
|
6800
|
+
warnings: {
|
|
6801
|
+
description: 'Exchange rate warnings (e.g. missing rate for a currency)',
|
|
6802
|
+
type: 'array',
|
|
6803
|
+
items: {
|
|
6804
|
+
$ref: '#/components/schemas/ExchangeRateWarningDto'
|
|
6805
|
+
}
|
|
6806
|
+
}
|
|
6807
|
+
},
|
|
6808
|
+
required: ['period', 'baseCurrency', 'groups', 'summary']
|
|
6809
|
+
} as const;
|
|
6810
|
+
|
|
6486
6811
|
export const $MonetaryDto = {
|
|
6487
6812
|
type: 'object',
|
|
6488
6813
|
properties: {
|
|
@@ -6964,6 +7289,16 @@ export const $TimeSeriesPointDto = {
|
|
|
6964
7289
|
description: 'Change from previous point',
|
|
6965
7290
|
example: '5000.00'
|
|
6966
7291
|
},
|
|
7292
|
+
assets: {
|
|
7293
|
+
type: 'string',
|
|
7294
|
+
description: 'Total assets at this date (in base currency)',
|
|
7295
|
+
example: '494338.00'
|
|
7296
|
+
},
|
|
7297
|
+
liabilities: {
|
|
7298
|
+
type: 'string',
|
|
7299
|
+
description: 'Total liabilities at this date (in base currency)',
|
|
7300
|
+
example: '310098.00'
|
|
7301
|
+
},
|
|
6967
7302
|
byCurrency: {
|
|
6968
7303
|
description: 'Multi-currency breakdown for this point',
|
|
6969
7304
|
type: 'array',
|
|
@@ -7073,6 +7408,111 @@ export const $PortfolioTrendsResponseDto = {
|
|
|
7073
7408
|
required: ['series', 'summary', 'period', 'granularity', 'currency']
|
|
7074
7409
|
} as const;
|
|
7075
7410
|
|
|
7411
|
+
export const $CashFlowPointDto = {
|
|
7412
|
+
type: 'object',
|
|
7413
|
+
properties: {
|
|
7414
|
+
month: {
|
|
7415
|
+
type: 'string',
|
|
7416
|
+
description: 'Month key (YYYY-MM)',
|
|
7417
|
+
example: '2024-03'
|
|
7418
|
+
},
|
|
7419
|
+
income: {
|
|
7420
|
+
type: 'string',
|
|
7421
|
+
description: 'Income in base currency (absolute, converted)',
|
|
7422
|
+
example: '10000.00'
|
|
7423
|
+
},
|
|
7424
|
+
expense: {
|
|
7425
|
+
type: 'string',
|
|
7426
|
+
description: 'Expense in base currency (absolute, converted)',
|
|
7427
|
+
example: '5000.00'
|
|
7428
|
+
},
|
|
7429
|
+
netSavings: {
|
|
7430
|
+
type: 'string',
|
|
7431
|
+
description: 'netSavings = income − expense (savings positive)',
|
|
7432
|
+
example: '5000.00'
|
|
7433
|
+
}
|
|
7434
|
+
},
|
|
7435
|
+
required: ['month', 'income', 'expense', 'netSavings']
|
|
7436
|
+
} as const;
|
|
7437
|
+
|
|
7438
|
+
export const $CashFlowTrendSummaryDto = {
|
|
7439
|
+
type: 'object',
|
|
7440
|
+
properties: {
|
|
7441
|
+
totalIncome: {
|
|
7442
|
+
type: 'string',
|
|
7443
|
+
description: 'Total income across the period',
|
|
7444
|
+
example: '60000.00'
|
|
7445
|
+
},
|
|
7446
|
+
totalExpense: {
|
|
7447
|
+
type: 'string',
|
|
7448
|
+
description: 'Total expense across the period',
|
|
7449
|
+
example: '30000.00'
|
|
7450
|
+
},
|
|
7451
|
+
totalNetSavings: {
|
|
7452
|
+
type: 'string',
|
|
7453
|
+
description: 'income − expense across the period',
|
|
7454
|
+
example: '30000.00'
|
|
7455
|
+
},
|
|
7456
|
+
averageMonthlyNetSavings: {
|
|
7457
|
+
type: 'string',
|
|
7458
|
+
description:
|
|
7459
|
+
'totalNetSavings divided by the window length (N months, incl. zero-filled)',
|
|
7460
|
+
example: '5000.00'
|
|
7461
|
+
}
|
|
7462
|
+
},
|
|
7463
|
+
required: [
|
|
7464
|
+
'totalIncome',
|
|
7465
|
+
'totalExpense',
|
|
7466
|
+
'totalNetSavings',
|
|
7467
|
+
'averageMonthlyNetSavings'
|
|
7468
|
+
]
|
|
7469
|
+
} as const;
|
|
7470
|
+
|
|
7471
|
+
export const $CashFlowTrendsResponseDto = {
|
|
7472
|
+
type: 'object',
|
|
7473
|
+
properties: {
|
|
7474
|
+
series: {
|
|
7475
|
+
description:
|
|
7476
|
+
'Monthly cash-flow series (fixed N-month window, zero-filled)',
|
|
7477
|
+
type: 'array',
|
|
7478
|
+
items: {
|
|
7479
|
+
$ref: '#/components/schemas/CashFlowPointDto'
|
|
7480
|
+
}
|
|
7481
|
+
},
|
|
7482
|
+
summary: {
|
|
7483
|
+
description: 'Period totals',
|
|
7484
|
+
allOf: [
|
|
7485
|
+
{
|
|
7486
|
+
$ref: '#/components/schemas/CashFlowTrendSummaryDto'
|
|
7487
|
+
}
|
|
7488
|
+
]
|
|
7489
|
+
},
|
|
7490
|
+
period: {
|
|
7491
|
+
type: 'string',
|
|
7492
|
+
description: 'Period requested',
|
|
7493
|
+
example: '6m'
|
|
7494
|
+
},
|
|
7495
|
+
granularity: {
|
|
7496
|
+
type: 'string',
|
|
7497
|
+
description: 'Data granularity (v1 returns month buckets)',
|
|
7498
|
+
example: 'month'
|
|
7499
|
+
},
|
|
7500
|
+
currency: {
|
|
7501
|
+
type: 'string',
|
|
7502
|
+
description: 'Base currency for converted values',
|
|
7503
|
+
example: 'CNY'
|
|
7504
|
+
},
|
|
7505
|
+
warnings: {
|
|
7506
|
+
description: 'Exchange rate warnings (e.g. missing rate for a currency)',
|
|
7507
|
+
type: 'array',
|
|
7508
|
+
items: {
|
|
7509
|
+
$ref: '#/components/schemas/ExchangeRateWarningDto'
|
|
7510
|
+
}
|
|
7511
|
+
}
|
|
7512
|
+
},
|
|
7513
|
+
required: ['series', 'summary', 'period', 'granularity', 'currency']
|
|
7514
|
+
} as const;
|
|
7515
|
+
|
|
7076
7516
|
export const $GenerateSnapshotBody = {
|
|
7077
7517
|
type: 'object',
|
|
7078
7518
|
properties: {}
|