@firela/api-types 0.0.0-canary.d41ffbd5 → 0.0.0-canary.d484b9ac
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 +1590 -1200
- package/dist/index.d.ts +1590 -1200
- package/dist/index.js +5 -3
- package/dist/index.mjs +5 -3
- package/package.json +1 -1
- package/src/generated/schemas.gen.ts +1768 -1014
- package/src/generated/services.gen.ts +641 -543
- package/src/generated/types.gen.ts +19781 -1476
|
@@ -51,6 +51,14 @@ export const $CreateAccountDto = {
|
|
|
51
51
|
description: 'Icon identifier (overrides template)',
|
|
52
52
|
example: 'bank-custom'
|
|
53
53
|
},
|
|
54
|
+
displayName: {
|
|
55
|
+
type: 'string',
|
|
56
|
+
description:
|
|
57
|
+
'User-set display name override (omit/null = keep the derived name)',
|
|
58
|
+
nullable: true,
|
|
59
|
+
maxLength: 50,
|
|
60
|
+
example: 'Salary card'
|
|
61
|
+
},
|
|
54
62
|
openDirectiveMeta: {
|
|
55
63
|
type: 'object',
|
|
56
64
|
description:
|
|
@@ -181,7 +189,8 @@ export const $AccountResponseDto = {
|
|
|
181
189
|
},
|
|
182
190
|
displayName: {
|
|
183
191
|
type: 'string',
|
|
184
|
-
description:
|
|
192
|
+
description:
|
|
193
|
+
'Display name with precedence: user-set name (#762) > ADR-0114 localized name > path leaf (read-time projection)',
|
|
185
194
|
example: 'Checking'
|
|
186
195
|
},
|
|
187
196
|
icon: {
|
|
@@ -197,7 +206,7 @@ export const $AccountResponseDto = {
|
|
|
197
206
|
}
|
|
198
207
|
},
|
|
199
208
|
platformId: {
|
|
200
|
-
type: '
|
|
209
|
+
type: 'string',
|
|
201
210
|
description: 'Platform ID (null if unbound)',
|
|
202
211
|
example: 'c98e5d4a-2f71-4a5a-bb3c-92c9f231d5e2'
|
|
203
212
|
},
|
|
@@ -277,6 +286,14 @@ export const $UpdateAccountDto = {
|
|
|
277
286
|
description: 'Icon identifier',
|
|
278
287
|
example: 'bank-custom'
|
|
279
288
|
},
|
|
289
|
+
displayName: {
|
|
290
|
+
type: 'string',
|
|
291
|
+
description:
|
|
292
|
+
'User-set display name override (null = clear the override and fall back to the derived name, omit = unchanged)',
|
|
293
|
+
nullable: true,
|
|
294
|
+
maxLength: 50,
|
|
295
|
+
example: 'Salary card'
|
|
296
|
+
},
|
|
280
297
|
openDirectiveMeta: {
|
|
281
298
|
type: 'object',
|
|
282
299
|
description:
|
|
@@ -377,16 +394,43 @@ export const $AccountStandardResponseDto = {
|
|
|
377
394
|
},
|
|
378
395
|
name: {
|
|
379
396
|
type: 'string',
|
|
380
|
-
description:
|
|
397
|
+
description:
|
|
398
|
+
'Short display name. Universal rows project to the request locale (Accept-Language); regional rows keep the authored native name — mixed-language by design (ADR-0131 class P vs class A).',
|
|
381
399
|
example: 'Housing Fund'
|
|
382
400
|
},
|
|
401
|
+
aliases: {
|
|
402
|
+
description:
|
|
403
|
+
'Authored market-language alternative names delivered verbatim (not localized copy, not xlf-managed, not locale-projected). Flat string[] per ADR-0129 D1; ADR-0131 class A.',
|
|
404
|
+
example: ['Alipay', 'WeChat Pay'],
|
|
405
|
+
type: 'array',
|
|
406
|
+
items: {
|
|
407
|
+
type: 'string'
|
|
408
|
+
}
|
|
409
|
+
},
|
|
410
|
+
searchTerms: {
|
|
411
|
+
description:
|
|
412
|
+
'Locale-projected search synonyms (e.g. the zh bank-card / debit-card everyday terms for the checking account). Pure-locale projection — absent when the locale has no seeded synonyms; English fallback rides the authored aliases field. Search-only vocabulary, not the NLP routing corpus (#698, ADR-0131 fourth-class adjudication).',
|
|
413
|
+
example: ['yinhangka', 'jiejika'],
|
|
414
|
+
type: 'array',
|
|
415
|
+
items: {
|
|
416
|
+
type: 'string'
|
|
417
|
+
}
|
|
418
|
+
},
|
|
419
|
+
currency: {
|
|
420
|
+
type: 'string',
|
|
421
|
+
description:
|
|
422
|
+
'Product denomination as a 3-letter ISO 4217 code, authored market data delivered verbatim (not localized, not xlf-managed). ADR-0131 class A. Absent = single-currency not asserted — consumers fall back to their own region currency (#714).',
|
|
423
|
+
example: 'HKD'
|
|
424
|
+
},
|
|
383
425
|
description: {
|
|
384
426
|
type: 'string',
|
|
385
|
-
description:
|
|
427
|
+
description:
|
|
428
|
+
'Account description (stable semantics only). Mixed-language contract: universal rows project to the request locale via the accountDesc xlf axis with an en fallback (ADR-0131 class P, ADR-0132; unseeded locales falling back to English are expected); regional rows deliver the authored market language (ADR-0131 class A, verbatim, never xlf-managed).',
|
|
386
429
|
example: 'ICBC checking account for daily transactions'
|
|
387
430
|
},
|
|
388
431
|
tags: {
|
|
389
|
-
description:
|
|
432
|
+
description:
|
|
433
|
+
'Account tags for categorization — structured metadata delivered verbatim (not localized, not xlf-managed). ADR-0131 class A.',
|
|
390
434
|
example: ['bank', 'checking', 'primary'],
|
|
391
435
|
type: 'array',
|
|
392
436
|
items: {
|
|
@@ -498,7 +542,10 @@ export const $RegionConfigDto = {
|
|
|
498
542
|
},
|
|
499
543
|
locale: {
|
|
500
544
|
type: 'string',
|
|
501
|
-
example: 'de-DE'
|
|
545
|
+
example: 'de-DE',
|
|
546
|
+
pattern: '^[a-z]{2,8}-[A-Z]{2}$',
|
|
547
|
+
description:
|
|
548
|
+
"Region-qualified BCP-47 tag whose region subtag equals the region's own ISO 3166-1 code (e.g., ja-JP, zh-CN, zh-HK)"
|
|
502
549
|
}
|
|
503
550
|
},
|
|
504
551
|
required: ['currency', 'dateFormat', 'locale']
|
|
@@ -511,6 +558,12 @@ export const $RegionInfoDto = {
|
|
|
511
558
|
type: 'string',
|
|
512
559
|
example: 'de'
|
|
513
560
|
},
|
|
561
|
+
open: {
|
|
562
|
+
type: 'boolean',
|
|
563
|
+
example: true,
|
|
564
|
+
description:
|
|
565
|
+
'Whether the region is open (has a ready regional account template). Not-yet-open regions still return identity metadata and degrade to the universal-only catalog.'
|
|
566
|
+
},
|
|
514
567
|
displayName: {
|
|
515
568
|
type: 'string',
|
|
516
569
|
example: 'Germany'
|
|
@@ -529,7 +582,7 @@ export const $RegionInfoDto = {
|
|
|
529
582
|
$ref: '#/components/schemas/RegionConfigDto'
|
|
530
583
|
}
|
|
531
584
|
},
|
|
532
|
-
required: ['code', 'displayName', 'chain', 'config']
|
|
585
|
+
required: ['code', 'open', 'displayName', 'chain', 'config']
|
|
533
586
|
} as const;
|
|
534
587
|
|
|
535
588
|
export const $RegionsMetadataResponseDto = {
|
|
@@ -776,7 +829,7 @@ export const $PostingResponseDto = {
|
|
|
776
829
|
units: {
|
|
777
830
|
type: 'string',
|
|
778
831
|
description:
|
|
779
|
-
'Amount as decimal string. Typed optional but always present in responses: interpolation fills any MISSING posting before it is persisted or returned.',
|
|
832
|
+
'Amount as decimal string. Typed optional but always present in responses: interpolation fills any MISSING posting before it is persisted or returned. Carries the raw Beancount sign (credit-normal accounts such as Income post negative — the accounting truth, ADR-0126); renderers must not infer economic semantics from this sign.',
|
|
780
833
|
example: '100.50'
|
|
781
834
|
},
|
|
782
835
|
currency: {
|
|
@@ -1142,7 +1195,7 @@ export const $PostingDetailDto = {
|
|
|
1142
1195
|
units: {
|
|
1143
1196
|
type: 'string',
|
|
1144
1197
|
description:
|
|
1145
|
-
'Amount as decimal string. Typed optional but always present in responses: interpolation fills any MISSING posting before it is persisted or returned.',
|
|
1198
|
+
'Amount as decimal string. Typed optional but always present in responses: interpolation fills any MISSING posting before it is persisted or returned. Carries the raw Beancount sign (credit-normal accounts such as Income post negative — the accounting truth, ADR-0126); renderers must not infer economic semantics from this sign.',
|
|
1146
1199
|
example: '100.50'
|
|
1147
1200
|
},
|
|
1148
1201
|
currency: {
|
|
@@ -1326,6 +1379,147 @@ export const $TransactionDetailDto = {
|
|
|
1326
1379
|
]
|
|
1327
1380
|
} as const;
|
|
1328
1381
|
|
|
1382
|
+
export const $TransactionListItemDto = {
|
|
1383
|
+
type: 'object',
|
|
1384
|
+
properties: {
|
|
1385
|
+
id: {
|
|
1386
|
+
type: 'string',
|
|
1387
|
+
description: 'Transaction ID',
|
|
1388
|
+
example: 'clh1234567890abcdef'
|
|
1389
|
+
},
|
|
1390
|
+
date: {
|
|
1391
|
+
type: 'string',
|
|
1392
|
+
description: 'Transaction date',
|
|
1393
|
+
example: '2024-11-28'
|
|
1394
|
+
},
|
|
1395
|
+
flag: {
|
|
1396
|
+
type: 'string',
|
|
1397
|
+
description: 'Transaction flag',
|
|
1398
|
+
enum: [
|
|
1399
|
+
'CLEARED',
|
|
1400
|
+
'PENDING',
|
|
1401
|
+
'PADDING',
|
|
1402
|
+
'SUMMARIZE',
|
|
1403
|
+
'TRANSFER',
|
|
1404
|
+
'CONVERSIONS'
|
|
1405
|
+
],
|
|
1406
|
+
example: 'CLEARED'
|
|
1407
|
+
},
|
|
1408
|
+
customFlag: {
|
|
1409
|
+
type: 'string',
|
|
1410
|
+
description: 'Custom flag (if not using standard flags)',
|
|
1411
|
+
example: 'R'
|
|
1412
|
+
},
|
|
1413
|
+
payee: {
|
|
1414
|
+
type: 'string',
|
|
1415
|
+
description: 'Payee name',
|
|
1416
|
+
example: 'Whole Foods Market'
|
|
1417
|
+
},
|
|
1418
|
+
narration: {
|
|
1419
|
+
type: 'string',
|
|
1420
|
+
description: 'Transaction narration',
|
|
1421
|
+
example: 'Grocery shopping'
|
|
1422
|
+
},
|
|
1423
|
+
tags: {
|
|
1424
|
+
description: 'Transaction tags',
|
|
1425
|
+
example: ['groceries'],
|
|
1426
|
+
type: 'array',
|
|
1427
|
+
items: {
|
|
1428
|
+
type: 'string'
|
|
1429
|
+
}
|
|
1430
|
+
},
|
|
1431
|
+
links: {
|
|
1432
|
+
description: 'Transaction links',
|
|
1433
|
+
example: ['invoice-2024-001'],
|
|
1434
|
+
type: 'array',
|
|
1435
|
+
items: {
|
|
1436
|
+
type: 'string'
|
|
1437
|
+
}
|
|
1438
|
+
},
|
|
1439
|
+
meta: {
|
|
1440
|
+
type: 'object',
|
|
1441
|
+
description: 'Transaction metadata'
|
|
1442
|
+
},
|
|
1443
|
+
status: {
|
|
1444
|
+
type: 'string',
|
|
1445
|
+
description: 'Transaction status',
|
|
1446
|
+
enum: ['ACTIVE', 'VOIDED', 'SUPERSEDED'],
|
|
1447
|
+
example: 'ACTIVE'
|
|
1448
|
+
},
|
|
1449
|
+
sourceType: {
|
|
1450
|
+
type: 'string',
|
|
1451
|
+
description:
|
|
1452
|
+
'Source type (free-form string from transaction metadata, e.g. import, api)'
|
|
1453
|
+
},
|
|
1454
|
+
sourcePlatform: {
|
|
1455
|
+
type: 'string',
|
|
1456
|
+
description: 'Source platform (e.g., alipay, wechat)',
|
|
1457
|
+
example: 'alipay'
|
|
1458
|
+
},
|
|
1459
|
+
postings: {
|
|
1460
|
+
description: 'Transaction postings',
|
|
1461
|
+
type: 'array',
|
|
1462
|
+
items: {
|
|
1463
|
+
$ref: '#/components/schemas/PostingDetailDto'
|
|
1464
|
+
}
|
|
1465
|
+
},
|
|
1466
|
+
createdAt: {
|
|
1467
|
+
type: 'string',
|
|
1468
|
+
description: 'Created at timestamp',
|
|
1469
|
+
example: '2024-11-28T10:30:00.000Z'
|
|
1470
|
+
},
|
|
1471
|
+
voidedAt: {
|
|
1472
|
+
type: 'string',
|
|
1473
|
+
description: 'Voided at timestamp (if voided)',
|
|
1474
|
+
example: '2024-11-29T15:00:00.000Z'
|
|
1475
|
+
},
|
|
1476
|
+
voidedBy: {
|
|
1477
|
+
type: 'string',
|
|
1478
|
+
description: 'User ID who voided this transaction',
|
|
1479
|
+
example: 'clh1234567890abcdef'
|
|
1480
|
+
},
|
|
1481
|
+
correctionReason: {
|
|
1482
|
+
type: 'string',
|
|
1483
|
+
description: 'Correction reason (if voided or superseded)',
|
|
1484
|
+
example: 'Duplicate entry'
|
|
1485
|
+
},
|
|
1486
|
+
supersededBy: {
|
|
1487
|
+
type: 'string',
|
|
1488
|
+
description:
|
|
1489
|
+
'ID of the transaction that supersedes this one (set when status=SUPERSEDED)',
|
|
1490
|
+
example: 'clh1234567890abcdef'
|
|
1491
|
+
},
|
|
1492
|
+
originalTxn: {
|
|
1493
|
+
type: 'string',
|
|
1494
|
+
description:
|
|
1495
|
+
'ID of the transaction this one corrected/replaced (back-link on the replacement)',
|
|
1496
|
+
example: 'clh1234567890abcdef'
|
|
1497
|
+
},
|
|
1498
|
+
viewpointAmount: {
|
|
1499
|
+
type: 'string',
|
|
1500
|
+
description:
|
|
1501
|
+
'Row amount under the request viewpoint (ADR-0126). Category viewpoint (category + flow): per-leg sign-normalized sum over the category account set (Income-root legs negated, Expenses-root identity) — positive under normal booking but NOT clamped (explicit negative expense legs and net-flip refund months stay negative). No viewpoint (plain list / search, no accountId): wallet money-flow net = raw-sign sum over cost-less Assets/Liabilities legs (income positive, expenses negative, transfers net ~0); color cue is the wallet sign (net < 0 = wealth-decreasing). Status-orthogonal: audit views match too (ADR-0128 amount-as-matching-key). Omitted under the account viewpoint (incl. dual) and for rows with no wallet leg.',
|
|
1502
|
+
example: '10000.00'
|
|
1503
|
+
},
|
|
1504
|
+
viewpointCurrency: {
|
|
1505
|
+
type: 'string',
|
|
1506
|
+
description:
|
|
1507
|
+
'Currency of viewpointAmount. A row spanning multiple currencies takes the largest-magnitude currency group (known simplification, ADR-0126).',
|
|
1508
|
+
example: 'CNY'
|
|
1509
|
+
}
|
|
1510
|
+
},
|
|
1511
|
+
required: [
|
|
1512
|
+
'id',
|
|
1513
|
+
'date',
|
|
1514
|
+
'narration',
|
|
1515
|
+
'tags',
|
|
1516
|
+
'links',
|
|
1517
|
+
'status',
|
|
1518
|
+
'postings',
|
|
1519
|
+
'createdAt'
|
|
1520
|
+
]
|
|
1521
|
+
} as const;
|
|
1522
|
+
|
|
1329
1523
|
export const $BalanceByCurrencyDto = {
|
|
1330
1524
|
type: 'object',
|
|
1331
1525
|
properties: {
|
|
@@ -1371,7 +1565,7 @@ export const $TransactionListSummaryDto = {
|
|
|
1371
1565
|
totalAmount: {
|
|
1372
1566
|
type: 'string',
|
|
1373
1567
|
description:
|
|
1374
|
-
'Partial converted total in base currency (rated currencies only
|
|
1568
|
+
'Partial converted total in base currency (rated currencies only). Sign by viewpoint (ADR-0126): account viewpoint keeps the raw Beancount sign (income negative); category viewpoint is per-leg sign-normalized (Income legs negated, Expenses legs identity — positive under normal booking, not clamped). 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.',
|
|
1375
1569
|
example: '-6000.00'
|
|
1376
1570
|
},
|
|
1377
1571
|
currency: {
|
|
@@ -1397,6 +1591,26 @@ export const $TransactionListSummaryDto = {
|
|
|
1397
1591
|
required: ['totalAmount', 'currency', 'balanceByCurrency']
|
|
1398
1592
|
} as const;
|
|
1399
1593
|
|
|
1594
|
+
export const $TransactionListViewpointDto = {
|
|
1595
|
+
type: 'object',
|
|
1596
|
+
properties: {
|
|
1597
|
+
type: {
|
|
1598
|
+
type: 'string',
|
|
1599
|
+
description:
|
|
1600
|
+
'Viewpoint type (only category drill-down carries a viewpoint today)',
|
|
1601
|
+
enum: ['category'],
|
|
1602
|
+
example: 'category'
|
|
1603
|
+
},
|
|
1604
|
+
flow: {
|
|
1605
|
+
type: 'string',
|
|
1606
|
+
description: 'Flow root the category account set is restricted to',
|
|
1607
|
+
enum: ['income', 'expense'],
|
|
1608
|
+
example: 'expense'
|
|
1609
|
+
}
|
|
1610
|
+
},
|
|
1611
|
+
required: ['type', 'flow']
|
|
1612
|
+
} as const;
|
|
1613
|
+
|
|
1400
1614
|
export const $TransactionListResponseDto = {
|
|
1401
1615
|
type: 'object',
|
|
1402
1616
|
properties: {
|
|
@@ -1404,7 +1618,7 @@ export const $TransactionListResponseDto = {
|
|
|
1404
1618
|
description: 'List of transactions',
|
|
1405
1619
|
type: 'array',
|
|
1406
1620
|
items: {
|
|
1407
|
-
$ref: '#/components/schemas/
|
|
1621
|
+
$ref: '#/components/schemas/TransactionListItemDto'
|
|
1408
1622
|
}
|
|
1409
1623
|
},
|
|
1410
1624
|
total: {
|
|
@@ -1430,6 +1644,15 @@ export const $TransactionListResponseDto = {
|
|
|
1430
1644
|
$ref: '#/components/schemas/TransactionListSummaryDto'
|
|
1431
1645
|
}
|
|
1432
1646
|
]
|
|
1647
|
+
},
|
|
1648
|
+
viewpoint: {
|
|
1649
|
+
description:
|
|
1650
|
+
'Viewpoint metadata (ADR-0126). Present only for a single category filter (category + flow, no accountId); dual-perspective requests are viewpoint-less (raw signs, no viewpointAmount).',
|
|
1651
|
+
allOf: [
|
|
1652
|
+
{
|
|
1653
|
+
$ref: '#/components/schemas/TransactionListViewpointDto'
|
|
1654
|
+
}
|
|
1655
|
+
]
|
|
1433
1656
|
}
|
|
1434
1657
|
},
|
|
1435
1658
|
required: ['data', 'total', 'limit', 'offset']
|
|
@@ -2340,10 +2563,10 @@ export const $UpdatePayeeDto = {
|
|
|
2340
2563
|
meta: {
|
|
2341
2564
|
type: 'object',
|
|
2342
2565
|
description:
|
|
2343
|
-
'Metadata for extended information (location, notes, contact info, etc.)
|
|
2566
|
+
'Metadata for extended information (location, notes, contact info, etc.)',
|
|
2344
2567
|
example: {
|
|
2345
2568
|
location: 'Zhongguancun',
|
|
2346
|
-
note: '
|
|
2569
|
+
note: 'Near subway station',
|
|
2347
2570
|
favorite: true
|
|
2348
2571
|
}
|
|
2349
2572
|
},
|
|
@@ -2904,568 +3127,660 @@ export const $UpdateCommodityDto = {
|
|
|
2904
3127
|
}
|
|
2905
3128
|
} as const;
|
|
2906
3129
|
|
|
2907
|
-
export const $
|
|
3130
|
+
export const $CurrencyBalanceDto = {
|
|
2908
3131
|
type: 'object',
|
|
2909
3132
|
properties: {
|
|
2910
3133
|
currency: {
|
|
2911
3134
|
type: 'string',
|
|
2912
|
-
description: '
|
|
2913
|
-
example: 'USD'
|
|
2914
|
-
},
|
|
2915
|
-
quoteCurrency: {
|
|
2916
|
-
type: 'string',
|
|
2917
|
-
description: 'Quote currency (pricing currency, e.g., CNY, EUR)',
|
|
3135
|
+
description: 'ISO 4217 currency code',
|
|
2918
3136
|
example: 'CNY'
|
|
2919
3137
|
},
|
|
2920
|
-
|
|
2921
|
-
type: 'number',
|
|
2922
|
-
description:
|
|
2923
|
-
'Price amount (MUST be >= 0 per Beancount spec, supports up to 15 decimal places). Zero allowed for conversion entries, negative strictly prohibited.',
|
|
2924
|
-
example: 175.5,
|
|
2925
|
-
minimum: 0
|
|
2926
|
-
},
|
|
2927
|
-
date: {
|
|
3138
|
+
balance: {
|
|
2928
3139
|
type: 'string',
|
|
2929
|
-
description: '
|
|
2930
|
-
example: '
|
|
2931
|
-
},
|
|
2932
|
-
metadata: {
|
|
2933
|
-
type: 'object',
|
|
2934
|
-
description:
|
|
2935
|
-
'Metadata (validated by Zod schema, max field lengths enforced)',
|
|
2936
|
-
example: {
|
|
2937
|
-
source: 'MANUAL',
|
|
2938
|
-
note: 'Bank valuation report',
|
|
2939
|
-
confidence: 0.95
|
|
2940
|
-
}
|
|
3140
|
+
description: 'Balance amount',
|
|
3141
|
+
example: '500000.00'
|
|
2941
3142
|
}
|
|
2942
3143
|
},
|
|
2943
|
-
required: ['currency', '
|
|
3144
|
+
required: ['currency', 'balance']
|
|
2944
3145
|
} as const;
|
|
2945
3146
|
|
|
2946
|
-
export const $
|
|
3147
|
+
export const $TimeSeriesPointDto = {
|
|
2947
3148
|
type: 'object',
|
|
2948
3149
|
properties: {
|
|
2949
|
-
|
|
3150
|
+
date: {
|
|
2950
3151
|
type: 'string',
|
|
2951
|
-
description: '
|
|
2952
|
-
example: '
|
|
3152
|
+
description: 'Date in YYYY-MM-DD format',
|
|
3153
|
+
example: '2024-06-15'
|
|
2953
3154
|
},
|
|
2954
|
-
|
|
3155
|
+
value: {
|
|
2955
3156
|
type: 'string',
|
|
2956
|
-
description: '
|
|
2957
|
-
example: '
|
|
3157
|
+
description: 'Value at this date (in base currency)',
|
|
3158
|
+
example: '500000.00'
|
|
2958
3159
|
},
|
|
2959
|
-
|
|
3160
|
+
change: {
|
|
2960
3161
|
type: 'string',
|
|
2961
|
-
description: '
|
|
2962
|
-
example: '
|
|
3162
|
+
description: 'Change from previous point',
|
|
3163
|
+
example: '5000.00'
|
|
2963
3164
|
},
|
|
2964
|
-
|
|
3165
|
+
assets: {
|
|
2965
3166
|
type: 'string',
|
|
2966
|
-
description: '
|
|
2967
|
-
example: '
|
|
3167
|
+
description: 'Total assets at this date (in base currency)',
|
|
3168
|
+
example: '494338.00'
|
|
2968
3169
|
},
|
|
2969
|
-
|
|
2970
|
-
type: 'number',
|
|
2971
|
-
description:
|
|
2972
|
-
'Price amount (corresponds to Beancount Amount.number). Supports up to 15 decimal places.',
|
|
2973
|
-
example: 50000
|
|
2974
|
-
},
|
|
2975
|
-
date: {
|
|
2976
|
-
type: 'string',
|
|
2977
|
-
description:
|
|
2978
|
-
'Price date (ISO 8601 format). Represents the date this price was valid.',
|
|
2979
|
-
example: '2024-01-01',
|
|
2980
|
-
format: 'date'
|
|
2981
|
-
},
|
|
2982
|
-
meta: {
|
|
2983
|
-
type: 'object',
|
|
2984
|
-
description:
|
|
2985
|
-
'Metadata (corresponds to Beancount meta field). Contains source, confidence, note, etc.',
|
|
2986
|
-
example: {
|
|
2987
|
-
source: 'MANUAL',
|
|
2988
|
-
note: 'User-defined price',
|
|
2989
|
-
confidence: 1
|
|
2990
|
-
}
|
|
2991
|
-
},
|
|
2992
|
-
createdAt: {
|
|
2993
|
-
format: 'date-time',
|
|
3170
|
+
liabilities: {
|
|
2994
3171
|
type: 'string',
|
|
2995
|
-
description: '
|
|
2996
|
-
example: '
|
|
3172
|
+
description: 'Total liabilities at this date (in base currency)',
|
|
3173
|
+
example: '310098.00'
|
|
2997
3174
|
},
|
|
2998
|
-
|
|
2999
|
-
|
|
3000
|
-
type: 'string',
|
|
3001
|
-
description: 'Last update timestamp',
|
|
3002
|
-
example: '2024-11-03T10:00:00Z'
|
|
3003
|
-
}
|
|
3004
|
-
},
|
|
3005
|
-
required: [
|
|
3006
|
-
'id',
|
|
3007
|
-
'userId',
|
|
3008
|
-
'currency',
|
|
3009
|
-
'quoteCurrency',
|
|
3010
|
-
'amount',
|
|
3011
|
-
'date',
|
|
3012
|
-
'meta',
|
|
3013
|
-
'createdAt',
|
|
3014
|
-
'updatedAt'
|
|
3015
|
-
]
|
|
3016
|
-
} as const;
|
|
3017
|
-
|
|
3018
|
-
export const $PriceListResponseDto = {
|
|
3019
|
-
type: 'object',
|
|
3020
|
-
properties: {
|
|
3021
|
-
items: {
|
|
3022
|
-
description: 'List of prices',
|
|
3175
|
+
byCurrency: {
|
|
3176
|
+
description: 'Multi-currency breakdown for this point',
|
|
3023
3177
|
type: 'array',
|
|
3024
3178
|
items: {
|
|
3025
|
-
$ref: '#/components/schemas/
|
|
3179
|
+
$ref: '#/components/schemas/CurrencyBalanceDto'
|
|
3026
3180
|
}
|
|
3027
|
-
},
|
|
3028
|
-
total: {
|
|
3029
|
-
type: 'number',
|
|
3030
|
-
description: 'Total number of prices',
|
|
3031
|
-
example: 42
|
|
3032
3181
|
}
|
|
3033
3182
|
},
|
|
3034
|
-
required: ['
|
|
3183
|
+
required: ['date', 'value']
|
|
3035
3184
|
} as const;
|
|
3036
3185
|
|
|
3037
|
-
export const $
|
|
3186
|
+
export const $TrendSummaryDto = {
|
|
3038
3187
|
type: 'object',
|
|
3039
3188
|
properties: {
|
|
3040
|
-
|
|
3189
|
+
startValue: {
|
|
3041
3190
|
type: 'string',
|
|
3042
|
-
description: '
|
|
3191
|
+
description: 'Value at start of period',
|
|
3192
|
+
example: '450000.00'
|
|
3043
3193
|
},
|
|
3044
|
-
|
|
3194
|
+
endValue: {
|
|
3045
3195
|
type: 'string',
|
|
3046
|
-
description: '
|
|
3047
|
-
|
|
3048
|
-
amount: {
|
|
3049
|
-
type: 'number',
|
|
3050
|
-
description: 'Price amount (MUST be >= 0 per Beancount spec)',
|
|
3051
|
-
minimum: 0
|
|
3196
|
+
description: 'Value at end of period',
|
|
3197
|
+
example: '500000.00'
|
|
3052
3198
|
},
|
|
3053
|
-
|
|
3199
|
+
totalChange: {
|
|
3054
3200
|
type: 'string',
|
|
3055
|
-
description: '
|
|
3201
|
+
description: 'Total change over period',
|
|
3202
|
+
example: '50000.00'
|
|
3056
3203
|
},
|
|
3057
|
-
|
|
3058
|
-
type: '
|
|
3059
|
-
description: '
|
|
3204
|
+
totalChangePercentage: {
|
|
3205
|
+
type: 'string',
|
|
3206
|
+
description: 'Total change percentage',
|
|
3207
|
+
example: '+11.11%'
|
|
3060
3208
|
}
|
|
3061
|
-
}
|
|
3209
|
+
},
|
|
3210
|
+
required: ['startValue', 'endValue', 'totalChange', 'totalChangePercentage']
|
|
3062
3211
|
} as const;
|
|
3063
3212
|
|
|
3064
|
-
export const $
|
|
3213
|
+
export const $MultiCurrencyPointDto = {
|
|
3065
3214
|
type: 'object',
|
|
3066
3215
|
properties: {
|
|
3067
|
-
|
|
3216
|
+
date: {
|
|
3068
3217
|
type: 'string',
|
|
3069
|
-
description: '
|
|
3070
|
-
|
|
3218
|
+
description: 'Date in YYYY-MM-DD format',
|
|
3219
|
+
example: '2024-06-15'
|
|
3071
3220
|
},
|
|
3072
|
-
|
|
3073
|
-
|
|
3074
|
-
|
|
3075
|
-
|
|
3221
|
+
byCurrency: {
|
|
3222
|
+
description: 'Balances by currency',
|
|
3223
|
+
type: 'array',
|
|
3224
|
+
items: {
|
|
3225
|
+
$ref: '#/components/schemas/CurrencyBalanceDto'
|
|
3226
|
+
}
|
|
3227
|
+
}
|
|
3228
|
+
},
|
|
3229
|
+
required: ['date', 'byCurrency']
|
|
3230
|
+
} as const;
|
|
3231
|
+
|
|
3232
|
+
export const $PortfolioTrendsResponseDto = {
|
|
3233
|
+
type: 'object',
|
|
3234
|
+
properties: {
|
|
3235
|
+
series: {
|
|
3236
|
+
description: 'Time series data points',
|
|
3237
|
+
type: 'array',
|
|
3238
|
+
items: {
|
|
3239
|
+
$ref: '#/components/schemas/TimeSeriesPointDto'
|
|
3240
|
+
}
|
|
3076
3241
|
},
|
|
3077
|
-
|
|
3078
|
-
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
'MONTHLY',
|
|
3084
|
-
'BIMONTHLY',
|
|
3085
|
-
'QUARTERLY',
|
|
3086
|
-
'YEARLY',
|
|
3087
|
-
'CUSTOM'
|
|
3242
|
+
summary: {
|
|
3243
|
+
description: 'Period summary',
|
|
3244
|
+
allOf: [
|
|
3245
|
+
{
|
|
3246
|
+
$ref: '#/components/schemas/TrendSummaryDto'
|
|
3247
|
+
}
|
|
3088
3248
|
]
|
|
3089
3249
|
},
|
|
3090
|
-
|
|
3091
|
-
type: 'number',
|
|
3092
|
-
description: 'Expected amount (positive number)',
|
|
3093
|
-
minimum: 0
|
|
3094
|
-
},
|
|
3095
|
-
expectedDay: {
|
|
3096
|
-
type: 'number',
|
|
3097
|
-
description: 'Expected day of month (1-31)',
|
|
3098
|
-
minimum: 1,
|
|
3099
|
-
maximum: 31
|
|
3100
|
-
},
|
|
3101
|
-
customIntervalDays: {
|
|
3102
|
-
type: 'number',
|
|
3103
|
-
description: 'Custom interval in days (required for CUSTOM frequency)',
|
|
3104
|
-
minimum: 1
|
|
3105
|
-
},
|
|
3106
|
-
currency: {
|
|
3250
|
+
period: {
|
|
3107
3251
|
type: 'string',
|
|
3108
|
-
description: '
|
|
3109
|
-
|
|
3110
|
-
maxLength: 10
|
|
3252
|
+
description: 'Period requested',
|
|
3253
|
+
example: '6m'
|
|
3111
3254
|
},
|
|
3112
|
-
|
|
3255
|
+
granularity: {
|
|
3113
3256
|
type: 'string',
|
|
3114
|
-
description: '
|
|
3115
|
-
|
|
3116
|
-
},
|
|
3117
|
-
matchAmountTolerance: {
|
|
3118
|
-
type: 'number',
|
|
3119
|
-
description: 'Amount tolerance percentage (0-1)',
|
|
3120
|
-
default: 0.075,
|
|
3121
|
-
minimum: 0,
|
|
3122
|
-
maximum: 1
|
|
3257
|
+
description: 'Data granularity',
|
|
3258
|
+
example: 'month'
|
|
3123
3259
|
},
|
|
3124
|
-
|
|
3260
|
+
currency: {
|
|
3125
3261
|
type: 'string',
|
|
3126
|
-
description: '
|
|
3127
|
-
|
|
3262
|
+
description: 'Base currency for converted values',
|
|
3263
|
+
example: 'CNY'
|
|
3128
3264
|
},
|
|
3129
|
-
|
|
3130
|
-
|
|
3131
|
-
|
|
3132
|
-
|
|
3265
|
+
byCurrency: {
|
|
3266
|
+
description:
|
|
3267
|
+
'Multi-currency time series (each point has currency breakdown)',
|
|
3268
|
+
type: 'array',
|
|
3269
|
+
items: {
|
|
3270
|
+
$ref: '#/components/schemas/MultiCurrencyPointDto'
|
|
3271
|
+
}
|
|
3133
3272
|
},
|
|
3134
|
-
|
|
3273
|
+
warnings: {
|
|
3274
|
+
description: 'Exchange rate warnings',
|
|
3275
|
+
type: 'array',
|
|
3276
|
+
items: {
|
|
3277
|
+
$ref: '#/components/schemas/ExchangeRateWarningDto'
|
|
3278
|
+
}
|
|
3279
|
+
}
|
|
3280
|
+
},
|
|
3281
|
+
required: ['series', 'summary', 'period', 'granularity', 'currency']
|
|
3282
|
+
} as const;
|
|
3283
|
+
|
|
3284
|
+
export const $CashFlowPointDto = {
|
|
3285
|
+
type: 'object',
|
|
3286
|
+
properties: {
|
|
3287
|
+
month: {
|
|
3135
3288
|
type: 'string',
|
|
3136
|
-
description: '
|
|
3137
|
-
|
|
3289
|
+
description: 'Month key (YYYY-MM)',
|
|
3290
|
+
example: '2024-03'
|
|
3138
3291
|
},
|
|
3139
|
-
|
|
3140
|
-
type: '
|
|
3141
|
-
description: '
|
|
3142
|
-
|
|
3292
|
+
income: {
|
|
3293
|
+
type: 'string',
|
|
3294
|
+
description: 'Income in base currency (absolute, converted)',
|
|
3295
|
+
example: '10000.00'
|
|
3143
3296
|
},
|
|
3144
|
-
|
|
3297
|
+
expense: {
|
|
3145
3298
|
type: 'string',
|
|
3146
|
-
description: '
|
|
3299
|
+
description: 'Expense in base currency (absolute, converted)',
|
|
3300
|
+
example: '5000.00'
|
|
3147
3301
|
},
|
|
3148
|
-
|
|
3302
|
+
netSavings: {
|
|
3149
3303
|
type: 'string',
|
|
3150
|
-
description: '
|
|
3304
|
+
description: 'netSavings = income − expense (savings positive)',
|
|
3305
|
+
example: '5000.00'
|
|
3151
3306
|
}
|
|
3152
3307
|
},
|
|
3153
|
-
required: [
|
|
3154
|
-
'name',
|
|
3155
|
-
'frequency',
|
|
3156
|
-
'expectedAmount',
|
|
3157
|
-
'currency',
|
|
3158
|
-
'matchAmountTolerance',
|
|
3159
|
-
'autoCreate'
|
|
3160
|
-
]
|
|
3308
|
+
required: ['month', 'income', 'expense', 'netSavings']
|
|
3161
3309
|
} as const;
|
|
3162
3310
|
|
|
3163
|
-
export const $
|
|
3311
|
+
export const $CashFlowTrendSummaryDto = {
|
|
3164
3312
|
type: 'object',
|
|
3165
3313
|
properties: {
|
|
3166
|
-
|
|
3314
|
+
totalIncome: {
|
|
3167
3315
|
type: 'string',
|
|
3168
|
-
description: '
|
|
3316
|
+
description: 'Total income across the period',
|
|
3317
|
+
example: '60000.00'
|
|
3169
3318
|
},
|
|
3170
|
-
|
|
3319
|
+
totalExpense: {
|
|
3171
3320
|
type: 'string',
|
|
3172
|
-
description: '
|
|
3321
|
+
description: 'Total expense across the period',
|
|
3322
|
+
example: '30000.00'
|
|
3173
3323
|
},
|
|
3174
|
-
|
|
3324
|
+
totalNetSavings: {
|
|
3175
3325
|
type: 'string',
|
|
3176
|
-
description: '
|
|
3177
|
-
|
|
3178
|
-
icon: {
|
|
3179
|
-
type: 'object',
|
|
3180
|
-
description: 'Icon emoji'
|
|
3326
|
+
description: 'income − expense across the period',
|
|
3327
|
+
example: '30000.00'
|
|
3181
3328
|
},
|
|
3182
|
-
|
|
3329
|
+
averageMonthlyNetSavings: {
|
|
3183
3330
|
type: 'string',
|
|
3184
|
-
description:
|
|
3331
|
+
description:
|
|
3332
|
+
'totalNetSavings divided by the window length (N months, incl. zero-filled)',
|
|
3333
|
+
example: '5000.00'
|
|
3334
|
+
}
|
|
3335
|
+
},
|
|
3336
|
+
required: [
|
|
3337
|
+
'totalIncome',
|
|
3338
|
+
'totalExpense',
|
|
3339
|
+
'totalNetSavings',
|
|
3340
|
+
'averageMonthlyNetSavings'
|
|
3341
|
+
]
|
|
3342
|
+
} as const;
|
|
3343
|
+
|
|
3344
|
+
export const $CashFlowTrendsResponseDto = {
|
|
3345
|
+
type: 'object',
|
|
3346
|
+
properties: {
|
|
3347
|
+
series: {
|
|
3348
|
+
description:
|
|
3349
|
+
'Monthly cash-flow series (fixed N-month window, zero-filled)',
|
|
3350
|
+
type: 'array',
|
|
3351
|
+
items: {
|
|
3352
|
+
$ref: '#/components/schemas/CashFlowPointDto'
|
|
3353
|
+
}
|
|
3185
3354
|
},
|
|
3186
|
-
|
|
3187
|
-
|
|
3188
|
-
|
|
3355
|
+
summary: {
|
|
3356
|
+
description: 'Period totals',
|
|
3357
|
+
allOf: [
|
|
3358
|
+
{
|
|
3359
|
+
$ref: '#/components/schemas/CashFlowTrendSummaryDto'
|
|
3360
|
+
}
|
|
3361
|
+
]
|
|
3189
3362
|
},
|
|
3190
|
-
|
|
3191
|
-
type: '
|
|
3192
|
-
description: '
|
|
3363
|
+
period: {
|
|
3364
|
+
type: 'string',
|
|
3365
|
+
description: 'Period requested',
|
|
3366
|
+
example: '6m'
|
|
3193
3367
|
},
|
|
3194
|
-
|
|
3195
|
-
type: '
|
|
3196
|
-
description: '
|
|
3368
|
+
granularity: {
|
|
3369
|
+
type: 'string',
|
|
3370
|
+
description: 'Data granularity (v1 returns month buckets)',
|
|
3371
|
+
example: 'month'
|
|
3197
3372
|
},
|
|
3198
3373
|
currency: {
|
|
3199
3374
|
type: 'string',
|
|
3200
|
-
description: '
|
|
3375
|
+
description: 'Base currency for converted values',
|
|
3376
|
+
example: 'CNY'
|
|
3201
3377
|
},
|
|
3202
|
-
|
|
3203
|
-
|
|
3204
|
-
|
|
3378
|
+
warnings: {
|
|
3379
|
+
description: 'Exchange rate warnings (e.g. missing rate for a currency)',
|
|
3380
|
+
type: 'array',
|
|
3381
|
+
items: {
|
|
3382
|
+
$ref: '#/components/schemas/ExchangeRateWarningDto'
|
|
3383
|
+
}
|
|
3384
|
+
}
|
|
3385
|
+
},
|
|
3386
|
+
required: ['series', 'summary', 'period', 'granularity', 'currency']
|
|
3387
|
+
} as const;
|
|
3388
|
+
|
|
3389
|
+
export const $GenerateSnapshotBody = {
|
|
3390
|
+
type: 'object',
|
|
3391
|
+
properties: {}
|
|
3392
|
+
} as const;
|
|
3393
|
+
|
|
3394
|
+
export const $GenerateSnapshotResponse = {
|
|
3395
|
+
type: 'object',
|
|
3396
|
+
properties: {}
|
|
3397
|
+
} as const;
|
|
3398
|
+
|
|
3399
|
+
export const $BackfillSnapshotsBody = {
|
|
3400
|
+
type: 'object',
|
|
3401
|
+
properties: {}
|
|
3402
|
+
} as const;
|
|
3403
|
+
|
|
3404
|
+
export const $BackfillSnapshotsResponse = {
|
|
3405
|
+
type: 'object',
|
|
3406
|
+
properties: {}
|
|
3407
|
+
} as const;
|
|
3408
|
+
|
|
3409
|
+
export const $CreateBeanPriceDto = {
|
|
3410
|
+
type: 'object',
|
|
3411
|
+
properties: {
|
|
3412
|
+
currency: {
|
|
3413
|
+
type: 'string',
|
|
3414
|
+
description: 'Currency being priced (e.g., USD, AAPL, BTC)',
|
|
3415
|
+
example: 'USD'
|
|
3205
3416
|
},
|
|
3206
|
-
|
|
3417
|
+
quoteCurrency: {
|
|
3418
|
+
type: 'string',
|
|
3419
|
+
description: 'Quote currency (pricing currency, e.g., CNY, EUR)',
|
|
3420
|
+
example: 'CNY'
|
|
3421
|
+
},
|
|
3422
|
+
amount: {
|
|
3207
3423
|
type: 'number',
|
|
3208
|
-
description:
|
|
3424
|
+
description:
|
|
3425
|
+
'Price amount (MUST be >= 0 per Beancount spec, supports up to 15 decimal places). Zero allowed for conversion entries, negative strictly prohibited.',
|
|
3426
|
+
example: 175.5,
|
|
3427
|
+
minimum: 0
|
|
3209
3428
|
},
|
|
3210
|
-
|
|
3211
|
-
type: '
|
|
3212
|
-
description: '
|
|
3429
|
+
date: {
|
|
3430
|
+
type: 'string',
|
|
3431
|
+
description: 'Price date (ISO 8601 format)',
|
|
3432
|
+
example: '2024-11-05'
|
|
3213
3433
|
},
|
|
3214
|
-
|
|
3434
|
+
metadata: {
|
|
3215
3435
|
type: 'object',
|
|
3216
|
-
description:
|
|
3436
|
+
description:
|
|
3437
|
+
'Metadata (validated by Zod schema, max field lengths enforced)',
|
|
3438
|
+
example: {
|
|
3439
|
+
source: 'MANUAL',
|
|
3440
|
+
note: 'Bank valuation report',
|
|
3441
|
+
confidence: 0.95
|
|
3442
|
+
}
|
|
3443
|
+
}
|
|
3444
|
+
},
|
|
3445
|
+
required: ['currency', 'quoteCurrency', 'amount', 'date']
|
|
3446
|
+
} as const;
|
|
3447
|
+
|
|
3448
|
+
export const $PriceResponseDto = {
|
|
3449
|
+
type: 'object',
|
|
3450
|
+
properties: {
|
|
3451
|
+
id: {
|
|
3452
|
+
type: 'string',
|
|
3453
|
+
description: 'Unique identifier',
|
|
3454
|
+
example: 'uuid-123-456'
|
|
3217
3455
|
},
|
|
3218
|
-
|
|
3219
|
-
type: '
|
|
3220
|
-
description: '
|
|
3456
|
+
userId: {
|
|
3457
|
+
type: 'string',
|
|
3458
|
+
description: 'User ID (owner of the price)',
|
|
3459
|
+
example: 'user-123'
|
|
3221
3460
|
},
|
|
3222
|
-
|
|
3223
|
-
type: '
|
|
3224
|
-
description: '
|
|
3461
|
+
currency: {
|
|
3462
|
+
type: 'string',
|
|
3463
|
+
description: 'Currency being priced (e.g., USD, AAPL, BTC)',
|
|
3464
|
+
example: 'BTC'
|
|
3225
3465
|
},
|
|
3226
|
-
|
|
3466
|
+
quoteCurrency: {
|
|
3227
3467
|
type: 'string',
|
|
3228
|
-
description: '
|
|
3468
|
+
description: 'Quote currency (pricing currency, e.g., USD, CNY)',
|
|
3469
|
+
example: 'USD'
|
|
3229
3470
|
},
|
|
3230
|
-
|
|
3231
|
-
type: '
|
|
3232
|
-
description:
|
|
3471
|
+
amount: {
|
|
3472
|
+
type: 'number',
|
|
3473
|
+
description:
|
|
3474
|
+
'Price amount (corresponds to Beancount Amount.number). Supports up to 15 decimal places.',
|
|
3475
|
+
example: 50000
|
|
3233
3476
|
},
|
|
3234
|
-
|
|
3235
|
-
type: '
|
|
3236
|
-
description:
|
|
3477
|
+
date: {
|
|
3478
|
+
type: 'string',
|
|
3479
|
+
description:
|
|
3480
|
+
'Price date (ISO 8601 format). Represents the date this price was valid.',
|
|
3481
|
+
example: '2024-01-01',
|
|
3482
|
+
format: 'date'
|
|
3237
3483
|
},
|
|
3238
|
-
|
|
3484
|
+
meta: {
|
|
3239
3485
|
type: 'object',
|
|
3240
|
-
description:
|
|
3241
|
-
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
|
|
3486
|
+
description:
|
|
3487
|
+
'Metadata (corresponds to Beancount meta field). Contains source, confidence, note, etc.',
|
|
3488
|
+
example: {
|
|
3489
|
+
source: 'MANUAL',
|
|
3490
|
+
note: 'User-defined price',
|
|
3491
|
+
confidence: 1
|
|
3492
|
+
}
|
|
3245
3493
|
},
|
|
3246
3494
|
createdAt: {
|
|
3247
3495
|
format: 'date-time',
|
|
3248
3496
|
type: 'string',
|
|
3249
|
-
description: '
|
|
3497
|
+
description: 'Creation timestamp',
|
|
3498
|
+
example: '2024-11-03T10:00:00Z'
|
|
3250
3499
|
},
|
|
3251
3500
|
updatedAt: {
|
|
3252
3501
|
format: 'date-time',
|
|
3253
3502
|
type: 'string',
|
|
3254
|
-
description: '
|
|
3503
|
+
description: 'Last update timestamp',
|
|
3504
|
+
example: '2024-11-03T10:00:00Z'
|
|
3255
3505
|
}
|
|
3256
3506
|
},
|
|
3257
3507
|
required: [
|
|
3258
3508
|
'id',
|
|
3259
3509
|
'userId',
|
|
3260
|
-
'name',
|
|
3261
|
-
'frequency',
|
|
3262
|
-
'expectedAmount',
|
|
3263
3510
|
'currency',
|
|
3264
|
-
'
|
|
3265
|
-
'
|
|
3266
|
-
'
|
|
3267
|
-
'
|
|
3268
|
-
'totalCount',
|
|
3511
|
+
'quoteCurrency',
|
|
3512
|
+
'amount',
|
|
3513
|
+
'date',
|
|
3514
|
+
'meta',
|
|
3269
3515
|
'createdAt',
|
|
3270
3516
|
'updatedAt'
|
|
3271
3517
|
]
|
|
3272
3518
|
} as const;
|
|
3273
3519
|
|
|
3274
|
-
export const $
|
|
3520
|
+
export const $PriceListResponseDto = {
|
|
3275
3521
|
type: 'object',
|
|
3276
3522
|
properties: {
|
|
3277
|
-
|
|
3278
|
-
|
|
3279
|
-
|
|
3280
|
-
|
|
3281
|
-
'
|
|
3282
|
-
|
|
3283
|
-
'MONTHLY',
|
|
3284
|
-
'BIMONTHLY',
|
|
3285
|
-
'QUARTERLY',
|
|
3286
|
-
'YEARLY',
|
|
3287
|
-
'CUSTOM'
|
|
3288
|
-
],
|
|
3289
|
-
example: 'MONTHLY'
|
|
3290
|
-
},
|
|
3291
|
-
name: {
|
|
3292
|
-
type: 'string',
|
|
3293
|
-
description: 'Optional name override (default: transaction payee)',
|
|
3294
|
-
maxLength: 100
|
|
3523
|
+
items: {
|
|
3524
|
+
description: 'List of prices',
|
|
3525
|
+
type: 'array',
|
|
3526
|
+
items: {
|
|
3527
|
+
$ref: '#/components/schemas/PriceResponseDto'
|
|
3528
|
+
}
|
|
3295
3529
|
},
|
|
3296
|
-
|
|
3297
|
-
type: '
|
|
3298
|
-
description: '
|
|
3299
|
-
|
|
3530
|
+
total: {
|
|
3531
|
+
type: 'number',
|
|
3532
|
+
description: 'Total number of prices',
|
|
3533
|
+
example: 42
|
|
3300
3534
|
}
|
|
3301
3535
|
},
|
|
3302
|
-
required: ['
|
|
3536
|
+
required: ['items', 'total']
|
|
3303
3537
|
} as const;
|
|
3304
3538
|
|
|
3305
|
-
export const $
|
|
3539
|
+
export const $UpdateBeanPriceDto = {
|
|
3306
3540
|
type: 'object',
|
|
3307
3541
|
properties: {
|
|
3308
|
-
|
|
3542
|
+
currency: {
|
|
3309
3543
|
type: 'string',
|
|
3310
|
-
description: '
|
|
3544
|
+
description: 'Currency being priced'
|
|
3311
3545
|
},
|
|
3312
|
-
|
|
3546
|
+
quoteCurrency: {
|
|
3313
3547
|
type: 'string',
|
|
3314
|
-
description: '
|
|
3548
|
+
description: 'Quote currency (pricing currency)'
|
|
3315
3549
|
},
|
|
3316
|
-
|
|
3550
|
+
amount: {
|
|
3551
|
+
type: 'number',
|
|
3552
|
+
description: 'Price amount (MUST be >= 0 per Beancount spec)',
|
|
3553
|
+
minimum: 0
|
|
3554
|
+
},
|
|
3555
|
+
date: {
|
|
3317
3556
|
type: 'string',
|
|
3318
|
-
description: '
|
|
3557
|
+
description: 'Price date (ISO 8601 format)'
|
|
3319
3558
|
},
|
|
3320
|
-
|
|
3559
|
+
metadata: {
|
|
3321
3560
|
type: 'object',
|
|
3322
|
-
description: '
|
|
3323
|
-
}
|
|
3324
|
-
|
|
3561
|
+
description: 'Metadata'
|
|
3562
|
+
}
|
|
3563
|
+
}
|
|
3564
|
+
} as const;
|
|
3565
|
+
|
|
3566
|
+
export const $DeleteOwnUserDto = {
|
|
3567
|
+
type: 'object',
|
|
3568
|
+
properties: {
|
|
3569
|
+
accessToken: {
|
|
3325
3570
|
type: 'string',
|
|
3326
|
-
description: '
|
|
3327
|
-
|
|
3328
|
-
|
|
3329
|
-
|
|
3330
|
-
|
|
3571
|
+
description: 'Access token for user verification',
|
|
3572
|
+
example: 'abc123xyz'
|
|
3573
|
+
}
|
|
3574
|
+
},
|
|
3575
|
+
required: ['accessToken']
|
|
3576
|
+
} as const;
|
|
3577
|
+
|
|
3578
|
+
export const $UserSettingsResponseDto = {
|
|
3579
|
+
type: 'object',
|
|
3580
|
+
properties: {
|
|
3581
|
+
baseCurrency: {
|
|
3582
|
+
type: 'string',
|
|
3583
|
+
description:
|
|
3584
|
+
'Stored base currency choice (ISO 4217) for net-worth/report aggregation. null = user never chose; aggregates fall back to the region default at display time (#713).',
|
|
3585
|
+
example: 'USD',
|
|
3586
|
+
nullable: true
|
|
3587
|
+
}
|
|
3588
|
+
},
|
|
3589
|
+
required: ['baseCurrency']
|
|
3590
|
+
} as const;
|
|
3591
|
+
|
|
3592
|
+
export const $UserResponseDto = {
|
|
3593
|
+
type: 'object',
|
|
3594
|
+
properties: {
|
|
3595
|
+
id: {
|
|
3596
|
+
type: 'string',
|
|
3597
|
+
description: 'User ID'
|
|
3331
3598
|
},
|
|
3332
|
-
|
|
3333
|
-
type: '
|
|
3334
|
-
description: '
|
|
3599
|
+
role: {
|
|
3600
|
+
type: 'string',
|
|
3601
|
+
description: 'Assigned user role'
|
|
3335
3602
|
},
|
|
3336
|
-
|
|
3337
|
-
|
|
3338
|
-
|
|
3603
|
+
permissions: {
|
|
3604
|
+
description: 'Permission strings',
|
|
3605
|
+
type: 'array',
|
|
3606
|
+
items: {
|
|
3607
|
+
type: 'string'
|
|
3608
|
+
}
|
|
3339
3609
|
},
|
|
3340
|
-
|
|
3610
|
+
settings: {
|
|
3611
|
+
description: 'User settings',
|
|
3612
|
+
allOf: [
|
|
3613
|
+
{
|
|
3614
|
+
$ref: '#/components/schemas/UserSettingsResponseDto'
|
|
3615
|
+
}
|
|
3616
|
+
]
|
|
3617
|
+
}
|
|
3618
|
+
},
|
|
3619
|
+
required: ['id', 'role', 'permissions', 'settings']
|
|
3620
|
+
} as const;
|
|
3621
|
+
|
|
3622
|
+
export const $SignupDto = {
|
|
3623
|
+
type: 'object',
|
|
3624
|
+
properties: {
|
|
3625
|
+
turnstileToken: {
|
|
3341
3626
|
type: 'string',
|
|
3342
|
-
description:
|
|
3627
|
+
description:
|
|
3628
|
+
'Cloudflare Turnstile verification token (optional when Turnstile disabled)',
|
|
3629
|
+
example: '0.abc123def456...'
|
|
3630
|
+
}
|
|
3631
|
+
}
|
|
3632
|
+
} as const;
|
|
3633
|
+
|
|
3634
|
+
export const $SignupResponseDto = {
|
|
3635
|
+
type: 'object',
|
|
3636
|
+
properties: {
|
|
3637
|
+
authToken: {
|
|
3638
|
+
type: 'string',
|
|
3639
|
+
description: 'JWT auth token',
|
|
3640
|
+
example: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...'
|
|
3343
3641
|
},
|
|
3344
|
-
|
|
3345
|
-
type: '
|
|
3346
|
-
description: '
|
|
3642
|
+
accessToken: {
|
|
3643
|
+
type: 'string',
|
|
3644
|
+
description: 'Auto-generated access token'
|
|
3347
3645
|
},
|
|
3348
|
-
|
|
3646
|
+
role: {
|
|
3647
|
+
type: 'string',
|
|
3648
|
+
description: 'Assigned user role',
|
|
3649
|
+
enum: ['USER', 'ADMIN', 'DEMO', 'INACTIVE', 'PAID', 'OPS']
|
|
3650
|
+
}
|
|
3651
|
+
},
|
|
3652
|
+
required: ['authToken', 'accessToken', 'role']
|
|
3653
|
+
} as const;
|
|
3654
|
+
|
|
3655
|
+
export const $UpdateUserSettingDto = {
|
|
3656
|
+
type: 'object',
|
|
3657
|
+
properties: {
|
|
3658
|
+
secId: {
|
|
3349
3659
|
type: 'number',
|
|
3350
|
-
description: '
|
|
3660
|
+
description: 'Security ID'
|
|
3351
3661
|
},
|
|
3352
|
-
|
|
3353
|
-
type: '
|
|
3354
|
-
description: '
|
|
3662
|
+
annualInterestRate: {
|
|
3663
|
+
type: 'number',
|
|
3664
|
+
description: 'Annual interest rate',
|
|
3665
|
+
example: 0.05
|
|
3355
3666
|
},
|
|
3356
|
-
|
|
3357
|
-
type: '
|
|
3358
|
-
description: '
|
|
3667
|
+
currency: {
|
|
3668
|
+
type: 'string',
|
|
3669
|
+
description: 'Currency code',
|
|
3670
|
+
example: 'USD'
|
|
3359
3671
|
},
|
|
3360
|
-
|
|
3361
|
-
type: '
|
|
3362
|
-
description: '
|
|
3672
|
+
baseCurrency: {
|
|
3673
|
+
type: 'string',
|
|
3674
|
+
description: 'Base currency code',
|
|
3675
|
+
example: 'USD'
|
|
3363
3676
|
},
|
|
3364
|
-
|
|
3365
|
-
type: '
|
|
3366
|
-
description: '
|
|
3677
|
+
benchmark: {
|
|
3678
|
+
type: 'string',
|
|
3679
|
+
description: 'Benchmark symbol',
|
|
3680
|
+
example: 'SPY'
|
|
3367
3681
|
},
|
|
3368
|
-
|
|
3682
|
+
colorScheme: {
|
|
3369
3683
|
type: 'string',
|
|
3370
|
-
description: '
|
|
3684
|
+
description: 'Color scheme',
|
|
3685
|
+
enum: ['DARK', 'LIGHT']
|
|
3371
3686
|
},
|
|
3372
|
-
|
|
3373
|
-
type: '
|
|
3374
|
-
description: '
|
|
3687
|
+
dateRange: {
|
|
3688
|
+
type: 'string',
|
|
3689
|
+
description: 'Date range filter',
|
|
3690
|
+
example: '1y'
|
|
3375
3691
|
},
|
|
3376
|
-
|
|
3377
|
-
type: '
|
|
3378
|
-
description: '
|
|
3692
|
+
emergencyFund: {
|
|
3693
|
+
type: 'number',
|
|
3694
|
+
description: 'Emergency fund amount',
|
|
3695
|
+
example: 10000
|
|
3379
3696
|
},
|
|
3380
|
-
|
|
3381
|
-
|
|
3382
|
-
|
|
3697
|
+
'filters.accounts': {
|
|
3698
|
+
description: 'Account filter IDs',
|
|
3699
|
+
type: 'array',
|
|
3700
|
+
items: {
|
|
3701
|
+
type: 'string'
|
|
3702
|
+
}
|
|
3383
3703
|
},
|
|
3384
|
-
|
|
3385
|
-
|
|
3386
|
-
|
|
3704
|
+
'filters.assetClasses': {
|
|
3705
|
+
description: 'Asset class filters',
|
|
3706
|
+
type: 'array',
|
|
3707
|
+
items: {
|
|
3708
|
+
type: 'string'
|
|
3709
|
+
}
|
|
3387
3710
|
},
|
|
3388
|
-
|
|
3389
|
-
format: 'date-time',
|
|
3711
|
+
'filters.dataSource': {
|
|
3390
3712
|
type: 'string',
|
|
3391
|
-
description: '
|
|
3713
|
+
description: 'Data source filter'
|
|
3392
3714
|
},
|
|
3393
|
-
|
|
3394
|
-
format: 'date-time',
|
|
3715
|
+
'filters.symbol': {
|
|
3395
3716
|
type: 'string',
|
|
3396
|
-
description: '
|
|
3717
|
+
description: 'Symbol filter'
|
|
3397
3718
|
},
|
|
3398
|
-
|
|
3399
|
-
|
|
3400
|
-
|
|
3719
|
+
'filters.tags': {
|
|
3720
|
+
description: 'Tag filters',
|
|
3721
|
+
type: 'array',
|
|
3722
|
+
items: {
|
|
3723
|
+
type: 'string'
|
|
3724
|
+
}
|
|
3401
3725
|
},
|
|
3402
|
-
|
|
3403
|
-
type: '
|
|
3404
|
-
description: '
|
|
3726
|
+
isExperimentalFeatures: {
|
|
3727
|
+
type: 'boolean',
|
|
3728
|
+
description: 'Enable experimental features'
|
|
3405
3729
|
},
|
|
3406
|
-
|
|
3407
|
-
type: '
|
|
3408
|
-
description: '
|
|
3730
|
+
isRestrictedView: {
|
|
3731
|
+
type: 'boolean',
|
|
3732
|
+
description: 'Enable restricted view mode'
|
|
3409
3733
|
},
|
|
3410
|
-
|
|
3411
|
-
type: '
|
|
3412
|
-
description: '
|
|
3734
|
+
language: {
|
|
3735
|
+
type: 'string',
|
|
3736
|
+
description: 'Language code',
|
|
3737
|
+
example: 'en'
|
|
3413
3738
|
},
|
|
3414
|
-
|
|
3415
|
-
type: '
|
|
3416
|
-
description: '
|
|
3739
|
+
locale: {
|
|
3740
|
+
type: 'string',
|
|
3741
|
+
description: 'Locale code',
|
|
3742
|
+
example: 'en-US'
|
|
3417
3743
|
},
|
|
3418
|
-
|
|
3744
|
+
projectedTotalAmount: {
|
|
3419
3745
|
type: 'number',
|
|
3420
|
-
description: '
|
|
3421
|
-
|
|
3422
|
-
firstDate: {
|
|
3423
|
-
type: 'object',
|
|
3424
|
-
description: 'First matched transaction date (YYYY-MM-DD)'
|
|
3746
|
+
description: 'Projected total amount',
|
|
3747
|
+
example: 1000000
|
|
3425
3748
|
},
|
|
3426
|
-
|
|
3427
|
-
type: '
|
|
3428
|
-
description: '
|
|
3749
|
+
retirementDate: {
|
|
3750
|
+
type: 'string',
|
|
3751
|
+
description: 'Retirement date in ISO 8601 format',
|
|
3752
|
+
example: '2050-01-01'
|
|
3429
3753
|
},
|
|
3430
|
-
|
|
3754
|
+
savingsRate: {
|
|
3431
3755
|
type: 'number',
|
|
3432
|
-
description: '
|
|
3756
|
+
description: 'Savings rate percentage',
|
|
3757
|
+
example: 0.2
|
|
3433
3758
|
},
|
|
3434
|
-
|
|
3435
|
-
type: '
|
|
3436
|
-
description: '
|
|
3759
|
+
viewMode: {
|
|
3760
|
+
type: 'string',
|
|
3761
|
+
description: 'View mode',
|
|
3762
|
+
enum: ['DEFAULT', 'ZEN']
|
|
3763
|
+
}
|
|
3764
|
+
}
|
|
3765
|
+
} as const;
|
|
3766
|
+
|
|
3767
|
+
export const $UpdatePropertyDto = {
|
|
3768
|
+
type: 'object',
|
|
3769
|
+
properties: {
|
|
3770
|
+
value: {
|
|
3771
|
+
type: 'string',
|
|
3772
|
+
description: 'Property value'
|
|
3437
3773
|
}
|
|
3438
3774
|
},
|
|
3439
|
-
required: [
|
|
3440
|
-
'id',
|
|
3441
|
-
'userId',
|
|
3442
|
-
'name',
|
|
3443
|
-
'frequency',
|
|
3444
|
-
'expectedAmount',
|
|
3445
|
-
'currency',
|
|
3446
|
-
'matchAmountTolerance',
|
|
3447
|
-
'isActive',
|
|
3448
|
-
'startDate',
|
|
3449
|
-
'autoCreate',
|
|
3450
|
-
'totalCount',
|
|
3451
|
-
'createdAt',
|
|
3452
|
-
'updatedAt',
|
|
3453
|
-
'pendingCount',
|
|
3454
|
-
'overdueCount',
|
|
3455
|
-
'totalAmount',
|
|
3456
|
-
'averageAmount',
|
|
3457
|
-
'transactionCount',
|
|
3458
|
-
'variance',
|
|
3459
|
-
'upcomingCount'
|
|
3460
|
-
]
|
|
3775
|
+
required: ['value']
|
|
3461
3776
|
} as const;
|
|
3462
3777
|
|
|
3463
|
-
export const $
|
|
3778
|
+
export const $CreateRecurringRuleDto = {
|
|
3464
3779
|
type: 'object',
|
|
3465
3780
|
properties: {
|
|
3466
3781
|
name: {
|
|
3467
3782
|
type: 'string',
|
|
3468
|
-
description: 'Rule name',
|
|
3783
|
+
description: 'Rule name (unique per user)',
|
|
3469
3784
|
maxLength: 100
|
|
3470
3785
|
},
|
|
3471
3786
|
icon: {
|
|
@@ -3488,7 +3803,7 @@ export const $UpdateRecurringRuleDto = {
|
|
|
3488
3803
|
},
|
|
3489
3804
|
expectedAmount: {
|
|
3490
3805
|
type: 'number',
|
|
3491
|
-
description: 'Expected amount',
|
|
3806
|
+
description: 'Expected amount (positive number)',
|
|
3492
3807
|
minimum: 0
|
|
3493
3808
|
},
|
|
3494
3809
|
expectedDay: {
|
|
@@ -3499,7 +3814,7 @@ export const $UpdateRecurringRuleDto = {
|
|
|
3499
3814
|
},
|
|
3500
3815
|
customIntervalDays: {
|
|
3501
3816
|
type: 'number',
|
|
3502
|
-
description: 'Custom interval in days',
|
|
3817
|
+
description: 'Custom interval in days (required for CUSTOM frequency)',
|
|
3503
3818
|
minimum: 1
|
|
3504
3819
|
},
|
|
3505
3820
|
currency: {
|
|
@@ -3509,118 +3824,136 @@ export const $UpdateRecurringRuleDto = {
|
|
|
3509
3824
|
},
|
|
3510
3825
|
matchPayeePattern: {
|
|
3511
3826
|
type: 'string',
|
|
3512
|
-
description: 'Payee matching pattern',
|
|
3827
|
+
description: 'Payee matching pattern (supports wildcards)',
|
|
3513
3828
|
maxLength: 200
|
|
3514
3829
|
},
|
|
3515
3830
|
matchAmountTolerance: {
|
|
3516
3831
|
type: 'number',
|
|
3517
3832
|
description: 'Amount tolerance percentage (0-1)',
|
|
3833
|
+
default: 0.075,
|
|
3518
3834
|
minimum: 0,
|
|
3519
3835
|
maximum: 1
|
|
3520
3836
|
},
|
|
3521
3837
|
defaultExpenseAccount: {
|
|
3522
3838
|
type: 'string',
|
|
3523
|
-
description: 'Default expense account',
|
|
3839
|
+
description: 'Default expense account for auto-create',
|
|
3524
3840
|
maxLength: 200
|
|
3525
3841
|
},
|
|
3526
3842
|
defaultPaymentAccount: {
|
|
3527
3843
|
type: 'string',
|
|
3528
|
-
description: 'Default payment account',
|
|
3844
|
+
description: 'Default payment account for auto-create',
|
|
3529
3845
|
maxLength: 200
|
|
3530
3846
|
},
|
|
3531
3847
|
defaultPayee: {
|
|
3532
3848
|
type: 'string',
|
|
3533
|
-
description: 'Default payee',
|
|
3849
|
+
description: 'Default payee for auto-create',
|
|
3534
3850
|
maxLength: 200
|
|
3535
3851
|
},
|
|
3536
3852
|
autoCreate: {
|
|
3537
3853
|
type: 'boolean',
|
|
3538
|
-
description: 'Auto-create transaction'
|
|
3854
|
+
description: 'Auto-create transaction when expected date arrives',
|
|
3855
|
+
default: false
|
|
3539
3856
|
},
|
|
3540
|
-
|
|
3541
|
-
type: '
|
|
3542
|
-
description: 'Rule
|
|
3857
|
+
startDate: {
|
|
3858
|
+
type: 'string',
|
|
3859
|
+
description: 'Rule start date (ISO format)'
|
|
3543
3860
|
},
|
|
3544
3861
|
endDate: {
|
|
3545
3862
|
type: 'string',
|
|
3546
3863
|
description: 'Rule end date (ISO format)'
|
|
3547
3864
|
}
|
|
3548
|
-
}
|
|
3865
|
+
},
|
|
3866
|
+
required: [
|
|
3867
|
+
'name',
|
|
3868
|
+
'frequency',
|
|
3869
|
+
'expectedAmount',
|
|
3870
|
+
'matchAmountTolerance',
|
|
3871
|
+
'autoCreate'
|
|
3872
|
+
]
|
|
3549
3873
|
} as const;
|
|
3550
3874
|
|
|
3551
|
-
export const $
|
|
3875
|
+
export const $RecurringRuleResponseDto = {
|
|
3552
3876
|
type: 'object',
|
|
3553
3877
|
properties: {
|
|
3878
|
+
id: {
|
|
3879
|
+
type: 'string',
|
|
3880
|
+
description: 'Rule ID'
|
|
3881
|
+
},
|
|
3882
|
+
userId: {
|
|
3883
|
+
type: 'string',
|
|
3884
|
+
description: 'User ID'
|
|
3885
|
+
},
|
|
3554
3886
|
name: {
|
|
3555
3887
|
type: 'string',
|
|
3556
3888
|
description: 'Rule name'
|
|
3557
3889
|
},
|
|
3558
3890
|
icon: {
|
|
3559
|
-
type: '
|
|
3560
|
-
description: '
|
|
3891
|
+
type: 'string',
|
|
3892
|
+
description: 'Icon emoji'
|
|
3561
3893
|
},
|
|
3562
3894
|
frequency: {
|
|
3563
3895
|
type: 'string',
|
|
3564
|
-
description: '
|
|
3896
|
+
description: 'Recurring frequency'
|
|
3897
|
+
},
|
|
3898
|
+
expectedAmount: {
|
|
3899
|
+
type: 'number',
|
|
3900
|
+
description: 'Expected amount'
|
|
3901
|
+
},
|
|
3902
|
+
expectedDay: {
|
|
3903
|
+
type: 'number',
|
|
3904
|
+
description: 'Expected day of month'
|
|
3905
|
+
},
|
|
3906
|
+
customIntervalDays: {
|
|
3907
|
+
type: 'number',
|
|
3908
|
+
description: 'Custom interval in days'
|
|
3565
3909
|
},
|
|
3566
3910
|
currency: {
|
|
3567
3911
|
type: 'string',
|
|
3568
3912
|
description: 'Currency code'
|
|
3569
|
-
}
|
|
3570
|
-
},
|
|
3571
|
-
required: ['name', 'frequency', 'currency']
|
|
3572
|
-
} as const;
|
|
3573
|
-
|
|
3574
|
-
export const $ExpectedTransactionResponseDto = {
|
|
3575
|
-
type: 'object',
|
|
3576
|
-
properties: {
|
|
3577
|
-
id: {
|
|
3578
|
-
type: 'string',
|
|
3579
|
-
description: 'Expected transaction ID'
|
|
3580
3913
|
},
|
|
3581
|
-
|
|
3914
|
+
matchPayeePattern: {
|
|
3582
3915
|
type: 'string',
|
|
3583
|
-
description: '
|
|
3916
|
+
description: 'Payee matching pattern'
|
|
3584
3917
|
},
|
|
3585
|
-
|
|
3586
|
-
type: '
|
|
3587
|
-
description: '
|
|
3918
|
+
matchAmountTolerance: {
|
|
3919
|
+
type: 'number',
|
|
3920
|
+
description: 'Amount tolerance percentage'
|
|
3588
3921
|
},
|
|
3589
|
-
|
|
3922
|
+
defaultExpenseAccount: {
|
|
3590
3923
|
type: 'string',
|
|
3591
|
-
description: '
|
|
3924
|
+
description: 'Default expense account'
|
|
3592
3925
|
},
|
|
3593
|
-
|
|
3594
|
-
type: '
|
|
3595
|
-
description: '
|
|
3926
|
+
defaultPaymentAccount: {
|
|
3927
|
+
type: 'string',
|
|
3928
|
+
description: 'Default payment account'
|
|
3596
3929
|
},
|
|
3597
|
-
|
|
3930
|
+
defaultPayee: {
|
|
3598
3931
|
type: 'string',
|
|
3599
|
-
description: '
|
|
3932
|
+
description: 'Default payee'
|
|
3600
3933
|
},
|
|
3601
|
-
|
|
3602
|
-
type: '
|
|
3603
|
-
description: '
|
|
3934
|
+
isActive: {
|
|
3935
|
+
type: 'boolean',
|
|
3936
|
+
description: 'Whether rule is active'
|
|
3604
3937
|
},
|
|
3605
|
-
|
|
3606
|
-
type: '
|
|
3607
|
-
description: '
|
|
3938
|
+
startDate: {
|
|
3939
|
+
type: 'string',
|
|
3940
|
+
description: 'Rule start date (YYYY-MM-DD)'
|
|
3608
3941
|
},
|
|
3609
|
-
|
|
3610
|
-
type: '
|
|
3611
|
-
description: '
|
|
3942
|
+
endDate: {
|
|
3943
|
+
type: 'string',
|
|
3944
|
+
description: 'Rule end date (YYYY-MM-DD)'
|
|
3612
3945
|
},
|
|
3613
|
-
|
|
3946
|
+
autoCreate: {
|
|
3614
3947
|
type: 'boolean',
|
|
3615
|
-
description: '
|
|
3948
|
+
description: 'Auto-create transaction on expected date'
|
|
3616
3949
|
},
|
|
3617
|
-
|
|
3618
|
-
|
|
3619
|
-
|
|
3620
|
-
|
|
3621
|
-
|
|
3622
|
-
|
|
3623
|
-
|
|
3950
|
+
lastOccurrence: {
|
|
3951
|
+
type: 'string',
|
|
3952
|
+
description: 'Last matched occurrence date (YYYY-MM-DD)'
|
|
3953
|
+
},
|
|
3954
|
+
totalCount: {
|
|
3955
|
+
type: 'number',
|
|
3956
|
+
description: 'Total matched transactions count'
|
|
3624
3957
|
},
|
|
3625
3958
|
createdAt: {
|
|
3626
3959
|
format: 'date-time',
|
|
@@ -3636,647 +3969,581 @@ export const $ExpectedTransactionResponseDto = {
|
|
|
3636
3969
|
required: [
|
|
3637
3970
|
'id',
|
|
3638
3971
|
'userId',
|
|
3639
|
-
'
|
|
3640
|
-
'
|
|
3972
|
+
'name',
|
|
3973
|
+
'frequency',
|
|
3641
3974
|
'expectedAmount',
|
|
3642
|
-
'
|
|
3643
|
-
'
|
|
3644
|
-
'
|
|
3975
|
+
'currency',
|
|
3976
|
+
'matchAmountTolerance',
|
|
3977
|
+
'isActive',
|
|
3978
|
+
'startDate',
|
|
3979
|
+
'autoCreate',
|
|
3980
|
+
'totalCount',
|
|
3645
3981
|
'createdAt',
|
|
3646
3982
|
'updatedAt'
|
|
3647
3983
|
]
|
|
3648
3984
|
} as const;
|
|
3649
3985
|
|
|
3650
|
-
export const $
|
|
3986
|
+
export const $CreateRuleFromTransactionDto = {
|
|
3651
3987
|
type: 'object',
|
|
3652
3988
|
properties: {
|
|
3653
|
-
|
|
3654
|
-
type: '
|
|
3655
|
-
|
|
3656
|
-
|
|
3657
|
-
|
|
3989
|
+
frequency: {
|
|
3990
|
+
type: 'string',
|
|
3991
|
+
description: 'Recurring frequency',
|
|
3992
|
+
enum: [
|
|
3993
|
+
'WEEKLY',
|
|
3994
|
+
'BIWEEKLY',
|
|
3995
|
+
'MONTHLY',
|
|
3996
|
+
'BIMONTHLY',
|
|
3997
|
+
'QUARTERLY',
|
|
3998
|
+
'YEARLY',
|
|
3999
|
+
'CUSTOM'
|
|
4000
|
+
],
|
|
4001
|
+
example: 'MONTHLY'
|
|
3658
4002
|
},
|
|
3659
|
-
|
|
3660
|
-
type: 'number',
|
|
3661
|
-
description: 'Total count'
|
|
3662
|
-
}
|
|
3663
|
-
},
|
|
3664
|
-
required: ['items', 'total']
|
|
3665
|
-
} as const;
|
|
3666
|
-
|
|
3667
|
-
export const $ConfirmMatchDto = {
|
|
3668
|
-
type: 'object',
|
|
3669
|
-
properties: {
|
|
3670
|
-
transactionId: {
|
|
4003
|
+
name: {
|
|
3671
4004
|
type: 'string',
|
|
3672
|
-
description: '
|
|
4005
|
+
description: 'Optional name override (default: transaction payee)',
|
|
4006
|
+
maxLength: 100
|
|
4007
|
+
},
|
|
4008
|
+
icon: {
|
|
4009
|
+
type: 'string',
|
|
4010
|
+
description: 'Optional icon emoji',
|
|
4011
|
+
maxLength: 10
|
|
3673
4012
|
}
|
|
3674
4013
|
},
|
|
3675
|
-
required: ['
|
|
4014
|
+
required: ['frequency']
|
|
3676
4015
|
} as const;
|
|
3677
4016
|
|
|
3678
|
-
export const $
|
|
4017
|
+
export const $RecurringRuleWithStatsResponseDto = {
|
|
3679
4018
|
type: 'object',
|
|
3680
4019
|
properties: {
|
|
3681
|
-
|
|
4020
|
+
id: {
|
|
4021
|
+
type: 'string',
|
|
4022
|
+
description: 'Rule ID'
|
|
4023
|
+
},
|
|
4024
|
+
userId: {
|
|
4025
|
+
type: 'string',
|
|
4026
|
+
description: 'User ID'
|
|
4027
|
+
},
|
|
4028
|
+
name: {
|
|
4029
|
+
type: 'string',
|
|
4030
|
+
description: 'Rule name'
|
|
4031
|
+
},
|
|
4032
|
+
icon: {
|
|
4033
|
+
type: 'string',
|
|
4034
|
+
description: 'Icon emoji'
|
|
4035
|
+
},
|
|
4036
|
+
frequency: {
|
|
4037
|
+
type: 'string',
|
|
4038
|
+
description: 'Recurring frequency'
|
|
4039
|
+
},
|
|
4040
|
+
expectedAmount: {
|
|
4041
|
+
type: 'number',
|
|
4042
|
+
description: 'Expected amount'
|
|
4043
|
+
},
|
|
4044
|
+
expectedDay: {
|
|
4045
|
+
type: 'number',
|
|
4046
|
+
description: 'Expected day of month'
|
|
4047
|
+
},
|
|
4048
|
+
customIntervalDays: {
|
|
4049
|
+
type: 'number',
|
|
4050
|
+
description: 'Custom interval in days'
|
|
4051
|
+
},
|
|
4052
|
+
currency: {
|
|
3682
4053
|
type: 'string',
|
|
3683
|
-
description:
|
|
3684
|
-
'Override expense account (uses rule default if not provided)',
|
|
3685
|
-
maxLength: 200
|
|
4054
|
+
description: 'Currency code'
|
|
3686
4055
|
},
|
|
3687
|
-
|
|
4056
|
+
matchPayeePattern: {
|
|
3688
4057
|
type: 'string',
|
|
3689
|
-
description:
|
|
3690
|
-
'Override payment account (uses rule default if not provided)',
|
|
3691
|
-
maxLength: 200
|
|
4058
|
+
description: 'Payee matching pattern'
|
|
3692
4059
|
},
|
|
3693
|
-
|
|
4060
|
+
matchAmountTolerance: {
|
|
3694
4061
|
type: 'number',
|
|
3695
|
-
description: '
|
|
3696
|
-
minimum: 0
|
|
4062
|
+
description: 'Amount tolerance percentage'
|
|
3697
4063
|
},
|
|
3698
|
-
|
|
4064
|
+
defaultExpenseAccount: {
|
|
3699
4065
|
type: 'string',
|
|
3700
|
-
description: '
|
|
3701
|
-
maxLength: 200
|
|
4066
|
+
description: 'Default expense account'
|
|
3702
4067
|
},
|
|
3703
|
-
|
|
3704
|
-
type: 'string',
|
|
3705
|
-
description: 'Optional narration',
|
|
3706
|
-
maxLength: 500
|
|
3707
|
-
}
|
|
3708
|
-
}
|
|
3709
|
-
} as const;
|
|
3710
|
-
|
|
3711
|
-
export const $ForecastItemDto = {
|
|
3712
|
-
type: 'object',
|
|
3713
|
-
properties: {
|
|
3714
|
-
rule: {
|
|
4068
|
+
defaultPaymentAccount: {
|
|
3715
4069
|
type: 'string',
|
|
3716
|
-
description: '
|
|
3717
|
-
example: 'Rent'
|
|
4070
|
+
description: 'Default payment account'
|
|
3718
4071
|
},
|
|
3719
|
-
|
|
4072
|
+
defaultPayee: {
|
|
3720
4073
|
type: 'string',
|
|
3721
|
-
description: '
|
|
3722
|
-
example: 'clx123...'
|
|
4074
|
+
description: 'Default payee'
|
|
3723
4075
|
},
|
|
3724
|
-
|
|
3725
|
-
type: '
|
|
3726
|
-
description: '
|
|
3727
|
-
example: 3000
|
|
4076
|
+
isActive: {
|
|
4077
|
+
type: 'boolean',
|
|
4078
|
+
description: 'Whether rule is active'
|
|
3728
4079
|
},
|
|
3729
|
-
|
|
4080
|
+
startDate: {
|
|
3730
4081
|
type: 'string',
|
|
3731
|
-
description: '
|
|
3732
|
-
example: '2024-04-01'
|
|
4082
|
+
description: 'Rule start date (YYYY-MM-DD)'
|
|
3733
4083
|
},
|
|
3734
|
-
|
|
4084
|
+
endDate: {
|
|
3735
4085
|
type: 'string',
|
|
3736
|
-
description: 'Rule
|
|
3737
|
-
example: '🏠',
|
|
3738
|
-
nullable: true
|
|
4086
|
+
description: 'Rule end date (YYYY-MM-DD)'
|
|
3739
4087
|
},
|
|
3740
|
-
|
|
3741
|
-
type: '
|
|
3742
|
-
description: '
|
|
3743
|
-
|
|
3744
|
-
|
|
3745
|
-
},
|
|
3746
|
-
required: ['rule', 'ruleId', 'amount', 'date', 'icon', 'currency']
|
|
3747
|
-
} as const;
|
|
3748
|
-
|
|
3749
|
-
export const $MonthlyForecastDto = {
|
|
3750
|
-
type: 'object',
|
|
3751
|
-
properties: {
|
|
3752
|
-
month: {
|
|
4088
|
+
autoCreate: {
|
|
4089
|
+
type: 'boolean',
|
|
4090
|
+
description: 'Auto-create transaction on expected date'
|
|
4091
|
+
},
|
|
4092
|
+
lastOccurrence: {
|
|
3753
4093
|
type: 'string',
|
|
3754
|
-
description: '
|
|
3755
|
-
example: '2024-04'
|
|
4094
|
+
description: 'Last matched occurrence date (YYYY-MM-DD)'
|
|
3756
4095
|
},
|
|
3757
|
-
|
|
4096
|
+
totalCount: {
|
|
3758
4097
|
type: 'number',
|
|
3759
|
-
description: 'Total
|
|
3760
|
-
example: 8500
|
|
4098
|
+
description: 'Total matched transactions count'
|
|
3761
4099
|
},
|
|
3762
|
-
|
|
4100
|
+
createdAt: {
|
|
4101
|
+
format: 'date-time',
|
|
4102
|
+
type: 'string',
|
|
4103
|
+
description: 'Created at timestamp'
|
|
4104
|
+
},
|
|
4105
|
+
updatedAt: {
|
|
4106
|
+
format: 'date-time',
|
|
4107
|
+
type: 'string',
|
|
4108
|
+
description: 'Updated at timestamp'
|
|
4109
|
+
},
|
|
4110
|
+
pendingCount: {
|
|
3763
4111
|
type: 'number',
|
|
3764
|
-
description: 'Number of expected transactions'
|
|
3765
|
-
example: 3
|
|
4112
|
+
description: 'Number of pending expected transactions'
|
|
3766
4113
|
},
|
|
3767
|
-
|
|
3768
|
-
type: '
|
|
3769
|
-
description: '
|
|
3770
|
-
example: {
|
|
3771
|
-
CNY: 8500,
|
|
3772
|
-
USD: 100
|
|
3773
|
-
}
|
|
4114
|
+
overdueCount: {
|
|
4115
|
+
type: 'number',
|
|
4116
|
+
description: 'Number of overdue expected transactions'
|
|
3774
4117
|
},
|
|
3775
|
-
|
|
3776
|
-
|
|
3777
|
-
|
|
3778
|
-
items: {
|
|
3779
|
-
$ref: '#/components/schemas/ForecastItemDto'
|
|
3780
|
-
}
|
|
3781
|
-
}
|
|
3782
|
-
},
|
|
3783
|
-
required: ['month', 'expectedOutflow', 'itemCount', 'byCurrency', 'items']
|
|
3784
|
-
} as const;
|
|
3785
|
-
|
|
3786
|
-
export const $ForecastResponseDto = {
|
|
3787
|
-
type: 'object',
|
|
3788
|
-
properties: {
|
|
3789
|
-
forecast: {
|
|
3790
|
-
description: 'Monthly forecast data',
|
|
3791
|
-
type: 'array',
|
|
3792
|
-
items: {
|
|
3793
|
-
$ref: '#/components/schemas/MonthlyForecastDto'
|
|
3794
|
-
}
|
|
4118
|
+
nextExpectedDate: {
|
|
4119
|
+
type: 'string',
|
|
4120
|
+
description: 'Next expected date (YYYY-MM-DD)'
|
|
3795
4121
|
},
|
|
3796
|
-
|
|
4122
|
+
totalAmount: {
|
|
3797
4123
|
type: 'number',
|
|
3798
|
-
description: 'Total
|
|
3799
|
-
example: 25500
|
|
4124
|
+
description: 'Total amount of all matched transactions'
|
|
3800
4125
|
},
|
|
3801
|
-
|
|
3802
|
-
type: '
|
|
3803
|
-
description: '
|
|
3804
|
-
example: {
|
|
3805
|
-
CNY: 25500,
|
|
3806
|
-
USD: 300
|
|
3807
|
-
}
|
|
4126
|
+
averageAmount: {
|
|
4127
|
+
type: 'number',
|
|
4128
|
+
description: 'Average amount per transaction'
|
|
3808
4129
|
},
|
|
3809
|
-
|
|
4130
|
+
transactionCount: {
|
|
3810
4131
|
type: 'number',
|
|
3811
|
-
description: 'Number of
|
|
3812
|
-
example: 5
|
|
4132
|
+
description: 'Number of matched transactions'
|
|
3813
4133
|
},
|
|
3814
|
-
|
|
4134
|
+
firstDate: {
|
|
3815
4135
|
type: 'string',
|
|
3816
|
-
description: '
|
|
3817
|
-
example: '2024-04-01'
|
|
4136
|
+
description: 'First matched transaction date (YYYY-MM-DD)'
|
|
3818
4137
|
},
|
|
3819
|
-
|
|
4138
|
+
lastDate: {
|
|
3820
4139
|
type: 'string',
|
|
3821
|
-
description: '
|
|
3822
|
-
|
|
4140
|
+
description: 'Last matched transaction date (YYYY-MM-DD)'
|
|
4141
|
+
},
|
|
4142
|
+
variance: {
|
|
4143
|
+
type: 'number',
|
|
4144
|
+
description: 'Amount variance (standard deviation squared)'
|
|
4145
|
+
},
|
|
4146
|
+
upcomingCount: {
|
|
4147
|
+
type: 'number',
|
|
4148
|
+
description: 'Number of upcoming expected transactions'
|
|
3823
4149
|
}
|
|
3824
4150
|
},
|
|
3825
4151
|
required: [
|
|
3826
|
-
'
|
|
3827
|
-
'
|
|
3828
|
-
'
|
|
3829
|
-
'
|
|
3830
|
-
'
|
|
3831
|
-
'
|
|
4152
|
+
'id',
|
|
4153
|
+
'userId',
|
|
4154
|
+
'name',
|
|
4155
|
+
'frequency',
|
|
4156
|
+
'expectedAmount',
|
|
4157
|
+
'currency',
|
|
4158
|
+
'matchAmountTolerance',
|
|
4159
|
+
'isActive',
|
|
4160
|
+
'startDate',
|
|
4161
|
+
'autoCreate',
|
|
4162
|
+
'totalCount',
|
|
4163
|
+
'createdAt',
|
|
4164
|
+
'updatedAt',
|
|
4165
|
+
'pendingCount',
|
|
4166
|
+
'overdueCount',
|
|
4167
|
+
'totalAmount',
|
|
4168
|
+
'averageAmount',
|
|
4169
|
+
'transactionCount',
|
|
4170
|
+
'variance',
|
|
4171
|
+
'upcomingCount'
|
|
3832
4172
|
]
|
|
3833
4173
|
} as const;
|
|
3834
4174
|
|
|
3835
|
-
export const $
|
|
4175
|
+
export const $UpdateRecurringRuleDto = {
|
|
3836
4176
|
type: 'object',
|
|
3837
4177
|
properties: {
|
|
3838
|
-
|
|
4178
|
+
name: {
|
|
3839
4179
|
type: 'string',
|
|
3840
|
-
description: '
|
|
3841
|
-
|
|
4180
|
+
description: 'Rule name (unique per user)',
|
|
4181
|
+
maxLength: 100
|
|
3842
4182
|
},
|
|
3843
|
-
|
|
4183
|
+
icon: {
|
|
3844
4184
|
type: 'string',
|
|
3845
|
-
description: '
|
|
3846
|
-
|
|
3847
|
-
}
|
|
3848
|
-
|
|
3849
|
-
required: ['currency', 'balance']
|
|
3850
|
-
} as const;
|
|
3851
|
-
|
|
3852
|
-
export const $TimeSeriesPointDto = {
|
|
3853
|
-
type: 'object',
|
|
3854
|
-
properties: {
|
|
3855
|
-
date: {
|
|
4185
|
+
description: 'Icon emoji',
|
|
4186
|
+
maxLength: 10
|
|
4187
|
+
},
|
|
4188
|
+
frequency: {
|
|
3856
4189
|
type: 'string',
|
|
3857
|
-
description: '
|
|
3858
|
-
|
|
4190
|
+
description: 'Recurring frequency',
|
|
4191
|
+
enum: [
|
|
4192
|
+
'WEEKLY',
|
|
4193
|
+
'BIWEEKLY',
|
|
4194
|
+
'MONTHLY',
|
|
4195
|
+
'BIMONTHLY',
|
|
4196
|
+
'QUARTERLY',
|
|
4197
|
+
'YEARLY',
|
|
4198
|
+
'CUSTOM'
|
|
4199
|
+
]
|
|
4200
|
+
},
|
|
4201
|
+
expectedAmount: {
|
|
4202
|
+
type: 'number',
|
|
4203
|
+
description: 'Expected amount (positive number)',
|
|
4204
|
+
minimum: 0
|
|
4205
|
+
},
|
|
4206
|
+
expectedDay: {
|
|
4207
|
+
type: 'number',
|
|
4208
|
+
description: 'Expected day of month (1-31)',
|
|
4209
|
+
minimum: 1,
|
|
4210
|
+
maximum: 31
|
|
4211
|
+
},
|
|
4212
|
+
currency: {
|
|
4213
|
+
type: 'string',
|
|
4214
|
+
description: 'Currency code',
|
|
4215
|
+
maxLength: 10
|
|
3859
4216
|
},
|
|
3860
|
-
|
|
4217
|
+
matchPayeePattern: {
|
|
3861
4218
|
type: 'string',
|
|
3862
|
-
description: '
|
|
3863
|
-
|
|
4219
|
+
description: 'Payee matching pattern (supports wildcards)',
|
|
4220
|
+
maxLength: 200
|
|
3864
4221
|
},
|
|
3865
|
-
|
|
3866
|
-
type: '
|
|
3867
|
-
description: '
|
|
3868
|
-
|
|
4222
|
+
matchAmountTolerance: {
|
|
4223
|
+
type: 'number',
|
|
4224
|
+
description: 'Amount tolerance percentage (0-1)',
|
|
4225
|
+
default: 0.075,
|
|
4226
|
+
minimum: 0,
|
|
4227
|
+
maximum: 1
|
|
3869
4228
|
},
|
|
3870
|
-
|
|
4229
|
+
defaultExpenseAccount: {
|
|
3871
4230
|
type: 'string',
|
|
3872
|
-
description: '
|
|
3873
|
-
|
|
4231
|
+
description: 'Default expense account for auto-create',
|
|
4232
|
+
maxLength: 200
|
|
3874
4233
|
},
|
|
3875
|
-
|
|
4234
|
+
defaultPaymentAccount: {
|
|
3876
4235
|
type: 'string',
|
|
3877
|
-
description: '
|
|
3878
|
-
|
|
4236
|
+
description: 'Default payment account for auto-create',
|
|
4237
|
+
maxLength: 200
|
|
3879
4238
|
},
|
|
3880
|
-
|
|
3881
|
-
description: 'Multi-currency breakdown for this point',
|
|
3882
|
-
type: 'array',
|
|
3883
|
-
items: {
|
|
3884
|
-
$ref: '#/components/schemas/CurrencyBalanceDto'
|
|
3885
|
-
}
|
|
3886
|
-
}
|
|
3887
|
-
},
|
|
3888
|
-
required: ['date', 'value']
|
|
3889
|
-
} as const;
|
|
3890
|
-
|
|
3891
|
-
export const $TrendSummaryDto = {
|
|
3892
|
-
type: 'object',
|
|
3893
|
-
properties: {
|
|
3894
|
-
startValue: {
|
|
4239
|
+
defaultPayee: {
|
|
3895
4240
|
type: 'string',
|
|
3896
|
-
description: '
|
|
3897
|
-
|
|
4241
|
+
description: 'Default payee for auto-create',
|
|
4242
|
+
maxLength: 200
|
|
3898
4243
|
},
|
|
3899
|
-
|
|
3900
|
-
type: '
|
|
3901
|
-
description: '
|
|
3902
|
-
|
|
4244
|
+
autoCreate: {
|
|
4245
|
+
type: 'boolean',
|
|
4246
|
+
description: 'Auto-create transaction when expected date arrives',
|
|
4247
|
+
default: false
|
|
3903
4248
|
},
|
|
3904
|
-
|
|
4249
|
+
endDate: {
|
|
3905
4250
|
type: 'string',
|
|
3906
|
-
description: '
|
|
3907
|
-
example: '50000.00'
|
|
4251
|
+
description: 'Rule end date (ISO format)'
|
|
3908
4252
|
},
|
|
3909
|
-
|
|
3910
|
-
type: '
|
|
3911
|
-
description: '
|
|
3912
|
-
|
|
3913
|
-
}
|
|
3914
|
-
},
|
|
3915
|
-
required: ['startValue', 'endValue', 'totalChange', 'totalChangePercentage']
|
|
3916
|
-
} as const;
|
|
3917
|
-
|
|
3918
|
-
export const $MultiCurrencyPointDto = {
|
|
3919
|
-
type: 'object',
|
|
3920
|
-
properties: {
|
|
3921
|
-
date: {
|
|
3922
|
-
type: 'string',
|
|
3923
|
-
description: 'Date in YYYY-MM-DD format',
|
|
3924
|
-
example: '2024-06-15'
|
|
4253
|
+
customIntervalDays: {
|
|
4254
|
+
type: 'number',
|
|
4255
|
+
description: 'Custom interval in days',
|
|
4256
|
+
minimum: 1
|
|
3925
4257
|
},
|
|
3926
|
-
|
|
3927
|
-
|
|
3928
|
-
|
|
3929
|
-
items: {
|
|
3930
|
-
$ref: '#/components/schemas/CurrencyBalanceDto'
|
|
3931
|
-
}
|
|
4258
|
+
isActive: {
|
|
4259
|
+
type: 'boolean',
|
|
4260
|
+
description: 'Rule active status'
|
|
3932
4261
|
}
|
|
3933
|
-
}
|
|
3934
|
-
required: ['date', 'byCurrency']
|
|
4262
|
+
}
|
|
3935
4263
|
} as const;
|
|
3936
4264
|
|
|
3937
|
-
export const $
|
|
4265
|
+
export const $ExpectedTransactionRuleDto = {
|
|
3938
4266
|
type: 'object',
|
|
3939
4267
|
properties: {
|
|
3940
|
-
|
|
3941
|
-
|
|
3942
|
-
|
|
3943
|
-
items: {
|
|
3944
|
-
$ref: '#/components/schemas/TimeSeriesPointDto'
|
|
3945
|
-
}
|
|
3946
|
-
},
|
|
3947
|
-
summary: {
|
|
3948
|
-
description: 'Period summary',
|
|
3949
|
-
allOf: [
|
|
3950
|
-
{
|
|
3951
|
-
$ref: '#/components/schemas/TrendSummaryDto'
|
|
3952
|
-
}
|
|
3953
|
-
]
|
|
4268
|
+
name: {
|
|
4269
|
+
type: 'string',
|
|
4270
|
+
description: 'Rule name'
|
|
3954
4271
|
},
|
|
3955
|
-
|
|
4272
|
+
icon: {
|
|
3956
4273
|
type: 'string',
|
|
3957
|
-
description: '
|
|
3958
|
-
example: '6m'
|
|
4274
|
+
description: 'Rule icon'
|
|
3959
4275
|
},
|
|
3960
|
-
|
|
4276
|
+
frequency: {
|
|
3961
4277
|
type: 'string',
|
|
3962
|
-
description: '
|
|
3963
|
-
example: 'month'
|
|
4278
|
+
description: 'Rule frequency'
|
|
3964
4279
|
},
|
|
3965
4280
|
currency: {
|
|
3966
4281
|
type: 'string',
|
|
3967
|
-
description: '
|
|
3968
|
-
example: 'CNY'
|
|
3969
|
-
},
|
|
3970
|
-
byCurrency: {
|
|
3971
|
-
description:
|
|
3972
|
-
'Multi-currency time series (each point has currency breakdown)',
|
|
3973
|
-
type: 'array',
|
|
3974
|
-
items: {
|
|
3975
|
-
$ref: '#/components/schemas/MultiCurrencyPointDto'
|
|
3976
|
-
}
|
|
3977
|
-
},
|
|
3978
|
-
warnings: {
|
|
3979
|
-
description: 'Exchange rate warnings',
|
|
3980
|
-
type: 'array',
|
|
3981
|
-
items: {
|
|
3982
|
-
$ref: '#/components/schemas/ExchangeRateWarningDto'
|
|
3983
|
-
}
|
|
4282
|
+
description: 'Currency code'
|
|
3984
4283
|
}
|
|
3985
4284
|
},
|
|
3986
|
-
required: ['
|
|
4285
|
+
required: ['name', 'frequency', 'currency']
|
|
3987
4286
|
} as const;
|
|
3988
4287
|
|
|
3989
|
-
export const $
|
|
4288
|
+
export const $ExpectedTransactionResponseDto = {
|
|
3990
4289
|
type: 'object',
|
|
3991
4290
|
properties: {
|
|
3992
|
-
|
|
4291
|
+
id: {
|
|
3993
4292
|
type: 'string',
|
|
3994
|
-
description: '
|
|
3995
|
-
example: '2024-03'
|
|
4293
|
+
description: 'Expected transaction ID'
|
|
3996
4294
|
},
|
|
3997
|
-
|
|
4295
|
+
userId: {
|
|
3998
4296
|
type: 'string',
|
|
3999
|
-
description: '
|
|
4000
|
-
example: '10000.00'
|
|
4297
|
+
description: 'User ID'
|
|
4001
4298
|
},
|
|
4002
|
-
|
|
4299
|
+
ruleId: {
|
|
4003
4300
|
type: 'string',
|
|
4004
|
-
description: '
|
|
4005
|
-
example: '5000.00'
|
|
4301
|
+
description: 'Associated rule ID'
|
|
4006
4302
|
},
|
|
4007
|
-
|
|
4008
|
-
type: 'string',
|
|
4009
|
-
description: 'netSavings = income − expense (savings positive)',
|
|
4010
|
-
example: '5000.00'
|
|
4011
|
-
}
|
|
4012
|
-
},
|
|
4013
|
-
required: ['month', 'income', 'expense', 'netSavings']
|
|
4014
|
-
} as const;
|
|
4015
|
-
|
|
4016
|
-
export const $CashFlowTrendSummaryDto = {
|
|
4017
|
-
type: 'object',
|
|
4018
|
-
properties: {
|
|
4019
|
-
totalIncome: {
|
|
4303
|
+
expectedDate: {
|
|
4020
4304
|
type: 'string',
|
|
4021
|
-
description: '
|
|
4022
|
-
example: '60000.00'
|
|
4305
|
+
description: 'Expected date (YYYY-MM-DD)'
|
|
4023
4306
|
},
|
|
4024
|
-
|
|
4307
|
+
expectedAmount: {
|
|
4308
|
+
type: 'number',
|
|
4309
|
+
description: 'Expected amount'
|
|
4310
|
+
},
|
|
4311
|
+
status: {
|
|
4025
4312
|
type: 'string',
|
|
4026
|
-
description: '
|
|
4027
|
-
example: '30000.00'
|
|
4313
|
+
description: 'Status (PENDING, COMPLETED, SKIPPED)'
|
|
4028
4314
|
},
|
|
4029
|
-
|
|
4315
|
+
matchedTransactionId: {
|
|
4030
4316
|
type: 'string',
|
|
4031
|
-
description: '
|
|
4032
|
-
example: '30000.00'
|
|
4317
|
+
description: 'Matched transaction ID'
|
|
4033
4318
|
},
|
|
4034
|
-
|
|
4319
|
+
matchedAt: {
|
|
4035
4320
|
type: 'string',
|
|
4036
|
-
description:
|
|
4037
|
-
'totalNetSavings divided by the window length (N months, incl. zero-filled)',
|
|
4038
|
-
example: '5000.00'
|
|
4039
|
-
}
|
|
4040
|
-
},
|
|
4041
|
-
required: [
|
|
4042
|
-
'totalIncome',
|
|
4043
|
-
'totalExpense',
|
|
4044
|
-
'totalNetSavings',
|
|
4045
|
-
'averageMonthlyNetSavings'
|
|
4046
|
-
]
|
|
4047
|
-
} as const;
|
|
4048
|
-
|
|
4049
|
-
export const $CashFlowTrendsResponseDto = {
|
|
4050
|
-
type: 'object',
|
|
4051
|
-
properties: {
|
|
4052
|
-
series: {
|
|
4053
|
-
description:
|
|
4054
|
-
'Monthly cash-flow series (fixed N-month window, zero-filled)',
|
|
4055
|
-
type: 'array',
|
|
4056
|
-
items: {
|
|
4057
|
-
$ref: '#/components/schemas/CashFlowPointDto'
|
|
4058
|
-
}
|
|
4321
|
+
description: 'Match timestamp (ISO 8601)'
|
|
4059
4322
|
},
|
|
4060
|
-
|
|
4061
|
-
|
|
4323
|
+
matchConfidence: {
|
|
4324
|
+
type: 'number',
|
|
4325
|
+
description: 'Match confidence score (0-1)'
|
|
4326
|
+
},
|
|
4327
|
+
isOverdue: {
|
|
4328
|
+
type: 'boolean',
|
|
4329
|
+
description: 'Whether this expected transaction is overdue'
|
|
4330
|
+
},
|
|
4331
|
+
rule: {
|
|
4332
|
+
description: 'Rule information',
|
|
4062
4333
|
allOf: [
|
|
4063
4334
|
{
|
|
4064
|
-
$ref: '#/components/schemas/
|
|
4335
|
+
$ref: '#/components/schemas/ExpectedTransactionRuleDto'
|
|
4065
4336
|
}
|
|
4066
4337
|
]
|
|
4067
4338
|
},
|
|
4068
|
-
|
|
4069
|
-
|
|
4070
|
-
description: 'Period requested',
|
|
4071
|
-
example: '6m'
|
|
4072
|
-
},
|
|
4073
|
-
granularity: {
|
|
4339
|
+
createdAt: {
|
|
4340
|
+
format: 'date-time',
|
|
4074
4341
|
type: 'string',
|
|
4075
|
-
description: '
|
|
4076
|
-
example: 'month'
|
|
4342
|
+
description: 'Created at timestamp'
|
|
4077
4343
|
},
|
|
4078
|
-
|
|
4344
|
+
updatedAt: {
|
|
4345
|
+
format: 'date-time',
|
|
4079
4346
|
type: 'string',
|
|
4080
|
-
description: '
|
|
4081
|
-
example: 'CNY'
|
|
4082
|
-
},
|
|
4083
|
-
warnings: {
|
|
4084
|
-
description: 'Exchange rate warnings (e.g. missing rate for a currency)',
|
|
4085
|
-
type: 'array',
|
|
4086
|
-
items: {
|
|
4087
|
-
$ref: '#/components/schemas/ExchangeRateWarningDto'
|
|
4088
|
-
}
|
|
4347
|
+
description: 'Updated at timestamp'
|
|
4089
4348
|
}
|
|
4090
4349
|
},
|
|
4091
|
-
required: [
|
|
4092
|
-
|
|
4093
|
-
|
|
4094
|
-
|
|
4095
|
-
|
|
4096
|
-
|
|
4097
|
-
|
|
4098
|
-
|
|
4099
|
-
|
|
4100
|
-
|
|
4101
|
-
|
|
4102
|
-
|
|
4103
|
-
|
|
4104
|
-
export const $BackfillSnapshotsBody = {
|
|
4105
|
-
type: 'object',
|
|
4106
|
-
properties: {}
|
|
4107
|
-
} as const;
|
|
4108
|
-
|
|
4109
|
-
export const $BackfillSnapshotsResponse = {
|
|
4110
|
-
type: 'object',
|
|
4111
|
-
properties: {}
|
|
4350
|
+
required: [
|
|
4351
|
+
'id',
|
|
4352
|
+
'userId',
|
|
4353
|
+
'ruleId',
|
|
4354
|
+
'expectedDate',
|
|
4355
|
+
'expectedAmount',
|
|
4356
|
+
'status',
|
|
4357
|
+
'isOverdue',
|
|
4358
|
+
'rule',
|
|
4359
|
+
'createdAt',
|
|
4360
|
+
'updatedAt'
|
|
4361
|
+
]
|
|
4112
4362
|
} as const;
|
|
4113
4363
|
|
|
4114
|
-
export const $
|
|
4364
|
+
export const $ExpectedTransactionListResponseDto = {
|
|
4115
4365
|
type: 'object',
|
|
4116
4366
|
properties: {
|
|
4117
|
-
|
|
4118
|
-
type: '
|
|
4119
|
-
|
|
4120
|
-
|
|
4367
|
+
items: {
|
|
4368
|
+
type: 'array',
|
|
4369
|
+
items: {
|
|
4370
|
+
$ref: '#/components/schemas/ExpectedTransactionResponseDto'
|
|
4371
|
+
}
|
|
4372
|
+
},
|
|
4373
|
+
total: {
|
|
4374
|
+
type: 'number',
|
|
4375
|
+
description: 'Total count'
|
|
4121
4376
|
}
|
|
4122
4377
|
},
|
|
4123
|
-
required: ['
|
|
4378
|
+
required: ['items', 'total']
|
|
4124
4379
|
} as const;
|
|
4125
4380
|
|
|
4126
|
-
export const $
|
|
4381
|
+
export const $ConfirmMatchDto = {
|
|
4127
4382
|
type: 'object',
|
|
4128
4383
|
properties: {
|
|
4129
|
-
|
|
4384
|
+
transactionId: {
|
|
4130
4385
|
type: 'string',
|
|
4131
|
-
description:
|
|
4132
|
-
'Cloudflare Turnstile verification token (optional when Turnstile disabled)',
|
|
4133
|
-
example: '0.abc123def456...'
|
|
4386
|
+
description: 'Transaction ID to match with'
|
|
4134
4387
|
}
|
|
4135
|
-
}
|
|
4388
|
+
},
|
|
4389
|
+
required: ['transactionId']
|
|
4136
4390
|
} as const;
|
|
4137
4391
|
|
|
4138
|
-
export const $
|
|
4392
|
+
export const $EnterNowDto = {
|
|
4139
4393
|
type: 'object',
|
|
4140
4394
|
properties: {
|
|
4141
|
-
|
|
4395
|
+
expenseAccount: {
|
|
4142
4396
|
type: 'string',
|
|
4143
|
-
description:
|
|
4144
|
-
|
|
4397
|
+
description:
|
|
4398
|
+
'Override expense account (uses rule default if not provided)',
|
|
4399
|
+
maxLength: 200
|
|
4145
4400
|
},
|
|
4146
|
-
|
|
4401
|
+
paymentAccount: {
|
|
4147
4402
|
type: 'string',
|
|
4148
|
-
description:
|
|
4403
|
+
description:
|
|
4404
|
+
'Override payment account (uses rule default if not provided)',
|
|
4405
|
+
maxLength: 200
|
|
4149
4406
|
},
|
|
4150
|
-
|
|
4407
|
+
amount: {
|
|
4408
|
+
type: 'number',
|
|
4409
|
+
description: 'Override amount (uses expected amount if not provided)',
|
|
4410
|
+
minimum: 0
|
|
4411
|
+
},
|
|
4412
|
+
payee: {
|
|
4151
4413
|
type: 'string',
|
|
4152
|
-
description: '
|
|
4153
|
-
|
|
4414
|
+
description: 'Override payee (uses rule default if not provided)',
|
|
4415
|
+
maxLength: 200
|
|
4416
|
+
},
|
|
4417
|
+
narration: {
|
|
4418
|
+
type: 'string',
|
|
4419
|
+
description: 'Optional narration',
|
|
4420
|
+
maxLength: 500
|
|
4154
4421
|
}
|
|
4155
|
-
}
|
|
4156
|
-
required: ['authToken', 'accessToken', 'role']
|
|
4422
|
+
}
|
|
4157
4423
|
} as const;
|
|
4158
4424
|
|
|
4159
|
-
export const $
|
|
4425
|
+
export const $ForecastItemDto = {
|
|
4160
4426
|
type: 'object',
|
|
4161
4427
|
properties: {
|
|
4162
|
-
|
|
4163
|
-
type: '
|
|
4164
|
-
description: '
|
|
4428
|
+
rule: {
|
|
4429
|
+
type: 'string',
|
|
4430
|
+
description: 'Rule name',
|
|
4431
|
+
example: 'Rent'
|
|
4165
4432
|
},
|
|
4166
|
-
|
|
4433
|
+
ruleId: {
|
|
4434
|
+
type: 'string',
|
|
4435
|
+
description: 'Rule ID',
|
|
4436
|
+
example: 'clx123...'
|
|
4437
|
+
},
|
|
4438
|
+
amount: {
|
|
4167
4439
|
type: 'number',
|
|
4168
|
-
description: '
|
|
4169
|
-
example:
|
|
4440
|
+
description: 'Expected amount',
|
|
4441
|
+
example: 3000
|
|
4170
4442
|
},
|
|
4171
|
-
|
|
4443
|
+
date: {
|
|
4172
4444
|
type: 'string',
|
|
4173
|
-
description: '
|
|
4174
|
-
example: '
|
|
4445
|
+
description: 'Expected date (YYYY-MM-DD)',
|
|
4446
|
+
example: '2024-04-01'
|
|
4175
4447
|
},
|
|
4176
|
-
|
|
4448
|
+
icon: {
|
|
4177
4449
|
type: 'string',
|
|
4178
|
-
description: '
|
|
4179
|
-
example: '
|
|
4450
|
+
description: 'Rule icon emoji',
|
|
4451
|
+
example: '🏠',
|
|
4452
|
+
nullable: true
|
|
4180
4453
|
},
|
|
4181
|
-
|
|
4454
|
+
currency: {
|
|
4182
4455
|
type: 'string',
|
|
4183
|
-
description: '
|
|
4184
|
-
example: '
|
|
4185
|
-
}
|
|
4186
|
-
|
|
4456
|
+
description: 'Currency code',
|
|
4457
|
+
example: 'CNY'
|
|
4458
|
+
}
|
|
4459
|
+
},
|
|
4460
|
+
required: ['rule', 'ruleId', 'amount', 'date', 'icon', 'currency']
|
|
4461
|
+
} as const;
|
|
4462
|
+
|
|
4463
|
+
export const $MonthlyForecastDto = {
|
|
4464
|
+
type: 'object',
|
|
4465
|
+
properties: {
|
|
4466
|
+
month: {
|
|
4187
4467
|
type: 'string',
|
|
4188
|
-
description: '
|
|
4189
|
-
|
|
4468
|
+
description: 'Month (YYYY-MM)',
|
|
4469
|
+
example: '2024-04'
|
|
4190
4470
|
},
|
|
4191
|
-
|
|
4192
|
-
type: '
|
|
4193
|
-
description: '
|
|
4194
|
-
example:
|
|
4471
|
+
expectedOutflow: {
|
|
4472
|
+
type: 'number',
|
|
4473
|
+
description: 'Total expected outflow for the month',
|
|
4474
|
+
example: 8500
|
|
4195
4475
|
},
|
|
4196
|
-
|
|
4476
|
+
itemCount: {
|
|
4197
4477
|
type: 'number',
|
|
4198
|
-
description: '
|
|
4199
|
-
example:
|
|
4478
|
+
description: 'Number of expected transactions',
|
|
4479
|
+
example: 3
|
|
4200
4480
|
},
|
|
4201
|
-
|
|
4202
|
-
|
|
4203
|
-
|
|
4204
|
-
|
|
4205
|
-
|
|
4481
|
+
byCurrency: {
|
|
4482
|
+
type: 'object',
|
|
4483
|
+
description: 'Breakdown by currency',
|
|
4484
|
+
example: {
|
|
4485
|
+
CNY: 8500,
|
|
4486
|
+
USD: 100
|
|
4206
4487
|
}
|
|
4207
4488
|
},
|
|
4208
|
-
|
|
4209
|
-
description: '
|
|
4489
|
+
items: {
|
|
4490
|
+
description: 'Individual forecast items',
|
|
4210
4491
|
type: 'array',
|
|
4211
4492
|
items: {
|
|
4212
|
-
|
|
4493
|
+
$ref: '#/components/schemas/ForecastItemDto'
|
|
4213
4494
|
}
|
|
4214
|
-
}
|
|
4215
|
-
|
|
4216
|
-
|
|
4217
|
-
|
|
4218
|
-
|
|
4219
|
-
|
|
4220
|
-
|
|
4221
|
-
|
|
4222
|
-
|
|
4223
|
-
|
|
4224
|
-
description: 'Tag filters',
|
|
4495
|
+
}
|
|
4496
|
+
},
|
|
4497
|
+
required: ['month', 'expectedOutflow', 'itemCount', 'byCurrency', 'items']
|
|
4498
|
+
} as const;
|
|
4499
|
+
|
|
4500
|
+
export const $ForecastResponseDto = {
|
|
4501
|
+
type: 'object',
|
|
4502
|
+
properties: {
|
|
4503
|
+
forecast: {
|
|
4504
|
+
description: 'Monthly forecast data',
|
|
4225
4505
|
type: 'array',
|
|
4226
4506
|
items: {
|
|
4227
|
-
|
|
4507
|
+
$ref: '#/components/schemas/MonthlyForecastDto'
|
|
4228
4508
|
}
|
|
4229
4509
|
},
|
|
4230
|
-
|
|
4231
|
-
type: 'boolean',
|
|
4232
|
-
description: 'Enable experimental features'
|
|
4233
|
-
},
|
|
4234
|
-
isRestrictedView: {
|
|
4235
|
-
type: 'boolean',
|
|
4236
|
-
description: 'Enable restricted view mode'
|
|
4237
|
-
},
|
|
4238
|
-
language: {
|
|
4239
|
-
type: 'string',
|
|
4240
|
-
description: 'Language code',
|
|
4241
|
-
example: 'en'
|
|
4242
|
-
},
|
|
4243
|
-
locale: {
|
|
4244
|
-
type: 'string',
|
|
4245
|
-
description: 'Locale code',
|
|
4246
|
-
example: 'en-US'
|
|
4247
|
-
},
|
|
4248
|
-
projectedTotalAmount: {
|
|
4510
|
+
totalOutflow: {
|
|
4249
4511
|
type: 'number',
|
|
4250
|
-
description: '
|
|
4251
|
-
example:
|
|
4512
|
+
description: 'Total expected outflow across all months',
|
|
4513
|
+
example: 25500
|
|
4252
4514
|
},
|
|
4253
|
-
|
|
4254
|
-
type: '
|
|
4255
|
-
description: '
|
|
4256
|
-
example:
|
|
4515
|
+
totalByCurrency: {
|
|
4516
|
+
type: 'object',
|
|
4517
|
+
description: 'Total by currency across all months',
|
|
4518
|
+
example: {
|
|
4519
|
+
CNY: 25500,
|
|
4520
|
+
USD: 300
|
|
4521
|
+
}
|
|
4257
4522
|
},
|
|
4258
|
-
|
|
4523
|
+
rulesCount: {
|
|
4259
4524
|
type: 'number',
|
|
4260
|
-
description: '
|
|
4261
|
-
example:
|
|
4525
|
+
description: 'Number of active recurring rules included',
|
|
4526
|
+
example: 5
|
|
4262
4527
|
},
|
|
4263
|
-
|
|
4528
|
+
periodStart: {
|
|
4264
4529
|
type: 'string',
|
|
4265
|
-
description: '
|
|
4266
|
-
|
|
4267
|
-
}
|
|
4268
|
-
|
|
4269
|
-
} as const;
|
|
4270
|
-
|
|
4271
|
-
export const $UpdatePropertyDto = {
|
|
4272
|
-
type: 'object',
|
|
4273
|
-
properties: {
|
|
4274
|
-
value: {
|
|
4530
|
+
description: 'Forecast period start date',
|
|
4531
|
+
example: '2024-04-01'
|
|
4532
|
+
},
|
|
4533
|
+
periodEnd: {
|
|
4275
4534
|
type: 'string',
|
|
4276
|
-
description: '
|
|
4535
|
+
description: 'Forecast period end date',
|
|
4536
|
+
example: '2024-06-30'
|
|
4277
4537
|
}
|
|
4278
4538
|
},
|
|
4279
|
-
required: [
|
|
4539
|
+
required: [
|
|
4540
|
+
'forecast',
|
|
4541
|
+
'totalOutflow',
|
|
4542
|
+
'totalByCurrency',
|
|
4543
|
+
'rulesCount',
|
|
4544
|
+
'periodStart',
|
|
4545
|
+
'periodEnd'
|
|
4546
|
+
]
|
|
4280
4547
|
} as const;
|
|
4281
4548
|
|
|
4282
4549
|
export const $CreateTransactionRuleDto = {
|
|
@@ -4838,7 +5105,8 @@ export const $UpdateTransactionRuleDto = {
|
|
|
4838
5105
|
},
|
|
4839
5106
|
matchLogic: {
|
|
4840
5107
|
type: 'string',
|
|
4841
|
-
enum: ['OR', 'AND']
|
|
5108
|
+
enum: ['OR', 'AND'],
|
|
5109
|
+
default: 'OR'
|
|
4842
5110
|
},
|
|
4843
5111
|
amountMin: {
|
|
4844
5112
|
type: 'number',
|
|
@@ -4852,13 +5120,10 @@ export const $UpdateTransactionRuleDto = {
|
|
|
4852
5120
|
},
|
|
4853
5121
|
priority: {
|
|
4854
5122
|
type: 'number',
|
|
5123
|
+
default: 50,
|
|
4855
5124
|
minimum: 0,
|
|
4856
5125
|
maximum: 1000
|
|
4857
5126
|
},
|
|
4858
|
-
enabled: {
|
|
4859
|
-
type: 'boolean',
|
|
4860
|
-
description: 'Enable or disable the rule'
|
|
4861
|
-
},
|
|
4862
5127
|
additionalTags: {
|
|
4863
5128
|
items: {
|
|
4864
5129
|
type: 'array'
|
|
@@ -4868,6 +5133,10 @@ export const $UpdateTransactionRuleDto = {
|
|
|
4868
5133
|
},
|
|
4869
5134
|
additionalMetadata: {
|
|
4870
5135
|
type: 'object'
|
|
5136
|
+
},
|
|
5137
|
+
enabled: {
|
|
5138
|
+
type: 'boolean',
|
|
5139
|
+
description: 'Enable or disable the rule'
|
|
4871
5140
|
}
|
|
4872
5141
|
}
|
|
4873
5142
|
} as const;
|
|
@@ -4928,6 +5197,69 @@ export const $TestRuleResponseDto = {
|
|
|
4928
5197
|
required: ['ruleId', 'matches', 'confidence', 'matchDetails']
|
|
4929
5198
|
} as const;
|
|
4930
5199
|
|
|
5200
|
+
export const $CategoryCatalogEntryDto = {
|
|
5201
|
+
type: 'object',
|
|
5202
|
+
properties: {
|
|
5203
|
+
slug: {
|
|
5204
|
+
type: 'string',
|
|
5205
|
+
description: 'Category slug (single source-of-truth)',
|
|
5206
|
+
example: 'food'
|
|
5207
|
+
},
|
|
5208
|
+
scenario: {
|
|
5209
|
+
type: 'string',
|
|
5210
|
+
description: 'Display scenario group (maps to frontend picker _scenario)',
|
|
5211
|
+
enum: [
|
|
5212
|
+
'expense',
|
|
5213
|
+
'income',
|
|
5214
|
+
'investment',
|
|
5215
|
+
'banking',
|
|
5216
|
+
'transfer',
|
|
5217
|
+
'payment'
|
|
5218
|
+
],
|
|
5219
|
+
example: 'expense'
|
|
5220
|
+
},
|
|
5221
|
+
icon: {
|
|
5222
|
+
type: 'string',
|
|
5223
|
+
description: 'Lucide icon name',
|
|
5224
|
+
example: 'utensils'
|
|
5225
|
+
},
|
|
5226
|
+
regions: {
|
|
5227
|
+
description: "Applicable regions ('*' = all, 'cn' = CN-only)",
|
|
5228
|
+
example: ['*'],
|
|
5229
|
+
type: 'array',
|
|
5230
|
+
items: {
|
|
5231
|
+
type: 'string'
|
|
5232
|
+
}
|
|
5233
|
+
}
|
|
5234
|
+
},
|
|
5235
|
+
required: ['slug', 'scenario', 'icon', 'regions']
|
|
5236
|
+
} as const;
|
|
5237
|
+
|
|
5238
|
+
export const $CategoryCatalogListResponseDto = {
|
|
5239
|
+
type: 'object',
|
|
5240
|
+
properties: {
|
|
5241
|
+
items: {
|
|
5242
|
+
description: 'Category entries (region-scoped, query-filtered)',
|
|
5243
|
+
type: 'array',
|
|
5244
|
+
items: {
|
|
5245
|
+
$ref: '#/components/schemas/CategoryCatalogEntryDto'
|
|
5246
|
+
}
|
|
5247
|
+
},
|
|
5248
|
+
total: {
|
|
5249
|
+
type: 'number',
|
|
5250
|
+
description:
|
|
5251
|
+
'Total category entries for the region (before query filtering)',
|
|
5252
|
+
example: 30
|
|
5253
|
+
},
|
|
5254
|
+
region: {
|
|
5255
|
+
type: 'string',
|
|
5256
|
+
description: 'Region code',
|
|
5257
|
+
example: 'cn'
|
|
5258
|
+
}
|
|
5259
|
+
},
|
|
5260
|
+
required: ['items', 'total', 'region']
|
|
5261
|
+
} as const;
|
|
5262
|
+
|
|
4931
5263
|
export const $CreateBeanEventDto = {
|
|
4932
5264
|
type: 'object',
|
|
4933
5265
|
properties: {
|
|
@@ -5091,6 +5423,14 @@ export const $OnboardingAccountDto = {
|
|
|
5091
5423
|
description:
|
|
5092
5424
|
'Platform ID to bind the account to (references Platform.id); omit for unbound',
|
|
5093
5425
|
example: 'c98e5d4a-2f71-4a5a-bb3c-92c9f231d5e2'
|
|
5426
|
+
},
|
|
5427
|
+
displayName: {
|
|
5428
|
+
type: 'string',
|
|
5429
|
+
description:
|
|
5430
|
+
'User-set display name override (omit/null = keep the derived name)',
|
|
5431
|
+
nullable: true,
|
|
5432
|
+
maxLength: 50,
|
|
5433
|
+
example: 'Salary card'
|
|
5094
5434
|
}
|
|
5095
5435
|
},
|
|
5096
5436
|
required: ['path', 'currency']
|
|
@@ -5982,6 +6322,89 @@ export const $UncoveredFormatMissDto = {
|
|
|
5982
6322
|
properties: {}
|
|
5983
6323
|
} as const;
|
|
5984
6324
|
|
|
6325
|
+
export const $ClientParsedDataDto = {
|
|
6326
|
+
type: 'object',
|
|
6327
|
+
properties: {
|
|
6328
|
+
amount: {
|
|
6329
|
+
type: 'number',
|
|
6330
|
+
description: 'Transaction amount',
|
|
6331
|
+
example: 35
|
|
6332
|
+
},
|
|
6333
|
+
currency: {
|
|
6334
|
+
type: 'string',
|
|
6335
|
+
description: 'Currency code',
|
|
6336
|
+
example: 'CNY'
|
|
6337
|
+
},
|
|
6338
|
+
date: {
|
|
6339
|
+
type: 'string',
|
|
6340
|
+
description: 'Transaction date (ISO 8601)',
|
|
6341
|
+
example: '2026-08-15'
|
|
6342
|
+
},
|
|
6343
|
+
payee: {
|
|
6344
|
+
type: 'string',
|
|
6345
|
+
description: 'Payee/merchant name',
|
|
6346
|
+
example: 'Starbucks'
|
|
6347
|
+
},
|
|
6348
|
+
narration: {
|
|
6349
|
+
type: 'string',
|
|
6350
|
+
description: 'Transaction narration'
|
|
6351
|
+
},
|
|
6352
|
+
category: {
|
|
6353
|
+
type: 'string',
|
|
6354
|
+
description: 'Category slug',
|
|
6355
|
+
example: 'food_restaurant'
|
|
6356
|
+
},
|
|
6357
|
+
incomeType: {
|
|
6358
|
+
type: 'string',
|
|
6359
|
+
description: 'Income type',
|
|
6360
|
+
example: 'Salary'
|
|
6361
|
+
},
|
|
6362
|
+
incomeSource: {
|
|
6363
|
+
type: 'string',
|
|
6364
|
+
description: 'Income source',
|
|
6365
|
+
example: 'Anthropic Inc.'
|
|
6366
|
+
},
|
|
6367
|
+
symbol: {
|
|
6368
|
+
type: 'string',
|
|
6369
|
+
description: 'Security symbol code (e.g., 600519, AAPL)',
|
|
6370
|
+
example: 'AAPL'
|
|
6371
|
+
},
|
|
6372
|
+
quantity: {
|
|
6373
|
+
type: 'number',
|
|
6374
|
+
description: 'Quantity of shares/units',
|
|
6375
|
+
example: 100
|
|
6376
|
+
},
|
|
6377
|
+
price: {
|
|
6378
|
+
type: 'number',
|
|
6379
|
+
description: 'Unit price per share/unit',
|
|
6380
|
+
example: 1900
|
|
6381
|
+
},
|
|
6382
|
+
investmentAction: {
|
|
6383
|
+
type: 'string',
|
|
6384
|
+
description: 'Investment action',
|
|
6385
|
+
enum: ['buy', 'sell'],
|
|
6386
|
+
example: 'buy'
|
|
6387
|
+
},
|
|
6388
|
+
paymentSource: {
|
|
6389
|
+
type: 'string',
|
|
6390
|
+
description: 'Payment source: asset (default) or liability (credit card)',
|
|
6391
|
+
enum: ['asset', 'liability'],
|
|
6392
|
+
example: 'asset'
|
|
6393
|
+
},
|
|
6394
|
+
liabilityHint: {
|
|
6395
|
+
type: 'string',
|
|
6396
|
+
description: 'Liability account hint (CreditCard/Huabei/Baitiao)',
|
|
6397
|
+
example: 'CreditCard'
|
|
6398
|
+
},
|
|
6399
|
+
warning: {
|
|
6400
|
+
type: 'string',
|
|
6401
|
+
description:
|
|
6402
|
+
'Display-only warning from the prior response; accepted but ignored.',
|
|
6403
|
+
example: 'Cross-currency settlement applies.'
|
|
6404
|
+
}
|
|
6405
|
+
}
|
|
6406
|
+
} as const;
|
|
6407
|
+
|
|
5985
6408
|
export const $ProcessNlpDto = {
|
|
5986
6409
|
type: 'object',
|
|
5987
6410
|
properties: {
|
|
@@ -6005,14 +6428,18 @@ export const $ProcessNlpDto = {
|
|
|
6005
6428
|
example: 'session_abc123'
|
|
6006
6429
|
},
|
|
6007
6430
|
parsedData: {
|
|
6008
|
-
type: 'object',
|
|
6009
6431
|
description:
|
|
6010
6432
|
'Parsed data from previous NLP response for session recovery. Send back the parsedData received in confirm_payee/confirm responses.',
|
|
6011
6433
|
example: {
|
|
6012
6434
|
amount: 35,
|
|
6013
6435
|
currency: 'CNY',
|
|
6014
6436
|
payee: 'Starbucks'
|
|
6015
|
-
}
|
|
6437
|
+
},
|
|
6438
|
+
allOf: [
|
|
6439
|
+
{
|
|
6440
|
+
$ref: '#/components/schemas/ClientParsedDataDto'
|
|
6441
|
+
}
|
|
6442
|
+
]
|
|
6016
6443
|
},
|
|
6017
6444
|
selectedRuleId: {
|
|
6018
6445
|
type: 'string',
|
|
@@ -6023,8 +6450,27 @@ export const $ProcessNlpDto = {
|
|
|
6023
6450
|
selectedAccount: {
|
|
6024
6451
|
type: 'string',
|
|
6025
6452
|
description:
|
|
6026
|
-
'confirm_account echo-back: account path selected from the prior confirm_account response (suggestedAccount, similarAccounts[i], or a typed path). Applied directly when the session is confirming_account — no NL re-parse.',
|
|
6453
|
+
'confirm_account echo-back: account path selected from the prior confirm_account response (suggestedAccount, similarAccounts[i].path, or a typed path). Applied directly when the session is confirming_account — no NL re-parse.',
|
|
6027
6454
|
example: 'Expenses:Food:Coffee'
|
|
6455
|
+
},
|
|
6456
|
+
viewpointAccount: {
|
|
6457
|
+
type: 'string',
|
|
6458
|
+
description:
|
|
6459
|
+
'Viewpoint account hint: the beancount path the user drilled into (e.g. from an account drill-down). Tie-break only — never overrides accounts resolved from the text. Must be an owned, OPEN Assets:/Liabilities: account; unresolvable hints are silently ignored.',
|
|
6460
|
+
example: 'Assets:CN:Bank:ICBC'
|
|
6461
|
+
},
|
|
6462
|
+
viewpointCategory: {
|
|
6463
|
+
type: 'string',
|
|
6464
|
+
description:
|
|
6465
|
+
"Viewpoint category hint: the ADR-0075 Group segment the user drilled into (e.g. 'Food'). Resolved to a concrete OPEN account in that group; tie-break only — never overrides a category resolved from the text.",
|
|
6466
|
+
example: 'Food'
|
|
6467
|
+
},
|
|
6468
|
+
viewpointFlow: {
|
|
6469
|
+
type: 'string',
|
|
6470
|
+
description:
|
|
6471
|
+
"Companion flow root for viewpointCategory ('income' | 'expense'), mirroring the ADR-0126 list-endpoint invariant. Derived from the session's routed intent (multi-turn) when absent; a first-turn flow-less category hint is dropped — send the flow explicitly.",
|
|
6472
|
+
enum: ['income', 'expense'],
|
|
6473
|
+
example: 'expense'
|
|
6028
6474
|
}
|
|
6029
6475
|
}
|
|
6030
6476
|
} as const;
|
|
@@ -6338,6 +6784,24 @@ export const $NlpRuleConfirmationDataDto = {
|
|
|
6338
6784
|
]
|
|
6339
6785
|
} as const;
|
|
6340
6786
|
|
|
6787
|
+
export const $NlpAccountCandidateDto = {
|
|
6788
|
+
type: 'object',
|
|
6789
|
+
properties: {
|
|
6790
|
+
path: {
|
|
6791
|
+
type: 'string',
|
|
6792
|
+
description: 'Canonical beancount account path (echo back on selection)',
|
|
6793
|
+
example: 'Expenses:Food:Dining'
|
|
6794
|
+
},
|
|
6795
|
+
name: {
|
|
6796
|
+
type: 'string',
|
|
6797
|
+
description:
|
|
6798
|
+
'Localized display name (ADR-0114 read-time projection, user locale)',
|
|
6799
|
+
example: '餐饮'
|
|
6800
|
+
}
|
|
6801
|
+
},
|
|
6802
|
+
required: ['path', 'name']
|
|
6803
|
+
} as const;
|
|
6804
|
+
|
|
6341
6805
|
export const $NlpAccountConfirmationDataDto = {
|
|
6342
6806
|
type: 'object',
|
|
6343
6807
|
properties: {
|
|
@@ -6353,10 +6817,11 @@ export const $NlpAccountConfirmationDataDto = {
|
|
|
6353
6817
|
example: 'Expenses:Food:Drinks'
|
|
6354
6818
|
},
|
|
6355
6819
|
similarAccounts: {
|
|
6356
|
-
description:
|
|
6820
|
+
description:
|
|
6821
|
+
'Similar accounts for user selection (path + localized name, #680)',
|
|
6357
6822
|
type: 'array',
|
|
6358
6823
|
items: {
|
|
6359
|
-
|
|
6824
|
+
$ref: '#/components/schemas/NlpAccountCandidateDto'
|
|
6360
6825
|
}
|
|
6361
6826
|
},
|
|
6362
6827
|
errorMessage: {
|
|
@@ -6644,7 +7109,7 @@ export const $NlpResponseDto = {
|
|
|
6644
7109
|
type: 'string',
|
|
6645
7110
|
description:
|
|
6646
7111
|
'Asset sub-type (only present when intent is "asset"). Determines which asset-related form to render.',
|
|
6647
|
-
enum: ['transfer', 'banking', 'investment'],
|
|
7112
|
+
enum: ['transfer', 'banking', 'investment', 'lend', 'lend_collect'],
|
|
6648
7113
|
example: 'investment'
|
|
6649
7114
|
},
|
|
6650
7115
|
liabilitySubType: {
|
|
@@ -6933,55 +7398,128 @@ export const $PlatformMatchResultDto = {
|
|
|
6933
7398
|
category: {
|
|
6934
7399
|
type: 'string',
|
|
6935
7400
|
description:
|
|
6936
|
-
'Region-aware category (institution vocab, e.g. DigitalWallet/Bank). null = no region-aware suggestion; fall back to type.',
|
|
7401
|
+
'Region-aware category (institution vocab, e.g. DigitalWallet/Bank). null = no region-aware suggestion; fall back to type.',
|
|
7402
|
+
nullable: true,
|
|
7403
|
+
example: 'DigitalWallet'
|
|
7404
|
+
},
|
|
7405
|
+
matchType: {
|
|
7406
|
+
type: 'string',
|
|
7407
|
+
description: "How this row matched: 'exact' > 'prefix' > 'substring'",
|
|
7408
|
+
enum: ['exact', 'prefix', 'substring']
|
|
7409
|
+
}
|
|
7410
|
+
},
|
|
7411
|
+
required: [
|
|
7412
|
+
'id',
|
|
7413
|
+
'name',
|
|
7414
|
+
'canonical',
|
|
7415
|
+
'type',
|
|
7416
|
+
'suggestedSegment',
|
|
7417
|
+
'logoUrl',
|
|
7418
|
+
'countryCode',
|
|
7419
|
+
'category',
|
|
7420
|
+
'matchType'
|
|
7421
|
+
]
|
|
7422
|
+
} as const;
|
|
7423
|
+
|
|
7424
|
+
export const $PlatformMatchResponseDto = {
|
|
7425
|
+
type: 'object',
|
|
7426
|
+
properties: {
|
|
7427
|
+
platforms: {
|
|
7428
|
+
description: 'Ranked matches, best tier first (at most 10 rows)',
|
|
7429
|
+
type: 'array',
|
|
7430
|
+
items: {
|
|
7431
|
+
$ref: '#/components/schemas/PlatformMatchResultDto'
|
|
7432
|
+
}
|
|
7433
|
+
},
|
|
7434
|
+
matchType: {
|
|
7435
|
+
type: 'string',
|
|
7436
|
+
description:
|
|
7437
|
+
"Overall match quality — top row's tier, or 'none' when no hits",
|
|
7438
|
+
enum: ['none', 'exact', 'prefix', 'substring']
|
|
7439
|
+
},
|
|
7440
|
+
total: {
|
|
7441
|
+
type: 'number',
|
|
7442
|
+
description: 'Total matches before LIMIT (truncation transparency)'
|
|
7443
|
+
},
|
|
7444
|
+
hasMore: {
|
|
7445
|
+
type: 'boolean',
|
|
7446
|
+
description: 'true when total > platforms.length (more matches exist)'
|
|
7447
|
+
}
|
|
7448
|
+
},
|
|
7449
|
+
required: ['platforms', 'matchType', 'total', 'hasMore']
|
|
7450
|
+
} as const;
|
|
7451
|
+
|
|
7452
|
+
export const $PlatformStandardsPlatformDto = {
|
|
7453
|
+
type: 'object',
|
|
7454
|
+
properties: {
|
|
7455
|
+
id: {
|
|
7456
|
+
type: 'string',
|
|
7457
|
+
description: 'Global platform ID'
|
|
7458
|
+
},
|
|
7459
|
+
name: {
|
|
7460
|
+
type: 'string',
|
|
7461
|
+
description: 'Platform name (e.g., "ICBC")'
|
|
7462
|
+
},
|
|
7463
|
+
canonical: {
|
|
7464
|
+
type: 'string',
|
|
7465
|
+
description: 'Canonical identifier in ACCOUNT_RE format (e.g., "icbc")'
|
|
7466
|
+
},
|
|
7467
|
+
suggestedSegment: {
|
|
7468
|
+
type: 'string',
|
|
7469
|
+
description:
|
|
7470
|
+
'Suggested path segment — canonical PascalCased per hyphen-part, hyphens preserved (e.g. "Apple-Pay")'
|
|
7471
|
+
},
|
|
7472
|
+
type: {
|
|
7473
|
+
type: 'string',
|
|
7474
|
+
description: 'Platform type',
|
|
7475
|
+
enum: [
|
|
7476
|
+
'BANK',
|
|
7477
|
+
'BROKERAGE',
|
|
7478
|
+
'CRYPTO_EXCHANGE',
|
|
7479
|
+
'PAYMENT',
|
|
7480
|
+
'INVESTMENT',
|
|
7481
|
+
'INSURANCE',
|
|
7482
|
+
'OTHER'
|
|
7483
|
+
]
|
|
7484
|
+
},
|
|
7485
|
+
category: {
|
|
7486
|
+
type: 'string',
|
|
7487
|
+
description:
|
|
7488
|
+
'Region-aware category (institution vocab, e.g. DigitalWallet/Bank) resolved against the final region. null = no region-aware suggestion; fall back to type.',
|
|
6937
7489
|
nullable: true,
|
|
6938
|
-
example: '
|
|
6939
|
-
},
|
|
6940
|
-
matchType: {
|
|
6941
|
-
type: 'string',
|
|
6942
|
-
description: "How this row matched: 'exact' > 'prefix' > 'substring'",
|
|
6943
|
-
enum: ['exact', 'prefix', 'substring']
|
|
7490
|
+
example: 'Bank'
|
|
6944
7491
|
}
|
|
6945
7492
|
},
|
|
6946
|
-
required: [
|
|
6947
|
-
'id',
|
|
6948
|
-
'name',
|
|
6949
|
-
'canonical',
|
|
6950
|
-
'type',
|
|
6951
|
-
'suggestedSegment',
|
|
6952
|
-
'logoUrl',
|
|
6953
|
-
'countryCode',
|
|
6954
|
-
'category',
|
|
6955
|
-
'matchType'
|
|
6956
|
-
]
|
|
7493
|
+
required: ['id', 'name', 'canonical', 'suggestedSegment', 'type', 'category']
|
|
6957
7494
|
} as const;
|
|
6958
7495
|
|
|
6959
|
-
export const $
|
|
7496
|
+
export const $PlatformStandardsResponseDto = {
|
|
6960
7497
|
type: 'object',
|
|
6961
7498
|
properties: {
|
|
6962
|
-
|
|
6963
|
-
description: '
|
|
6964
|
-
|
|
6965
|
-
|
|
6966
|
-
|
|
6967
|
-
|
|
7499
|
+
platform: {
|
|
7500
|
+
description: 'The selected platform (institution lock source)',
|
|
7501
|
+
allOf: [
|
|
7502
|
+
{
|
|
7503
|
+
$ref: '#/components/schemas/PlatformStandardsPlatformDto'
|
|
7504
|
+
}
|
|
7505
|
+
]
|
|
6968
7506
|
},
|
|
6969
|
-
|
|
7507
|
+
region: {
|
|
6970
7508
|
type: 'string',
|
|
6971
7509
|
description:
|
|
6972
|
-
"
|
|
6973
|
-
|
|
6974
|
-
},
|
|
6975
|
-
total: {
|
|
6976
|
-
type: 'number',
|
|
6977
|
-
description: 'Total matches before LIMIT (truncation transparency)'
|
|
7510
|
+
"Resolved template region (ISO 3166-1 alpha-2, UPPERCASE): the platform's own countryCode when set, else the region query param. For regions without a regional template file the template list falls back to the universal-only catalog while region still echoes the code.",
|
|
7511
|
+
example: 'CN'
|
|
6978
7512
|
},
|
|
6979
|
-
|
|
6980
|
-
|
|
6981
|
-
|
|
7513
|
+
templates: {
|
|
7514
|
+
description:
|
|
7515
|
+
'Candidate account-standard templates of the resolved region (groupable by productCategory client-side)',
|
|
7516
|
+
type: 'array',
|
|
7517
|
+
items: {
|
|
7518
|
+
$ref: '#/components/schemas/AccountStandardResponseDto'
|
|
7519
|
+
}
|
|
6982
7520
|
}
|
|
6983
7521
|
},
|
|
6984
|
-
required: ['
|
|
7522
|
+
required: ['platform', 'region', 'templates']
|
|
6985
7523
|
} as const;
|
|
6986
7524
|
|
|
6987
7525
|
export const $CreatePlatformDto = {
|
|
@@ -7085,7 +7623,8 @@ export const $UpdatePlatformDto = {
|
|
|
7085
7623
|
},
|
|
7086
7624
|
isActive: {
|
|
7087
7625
|
type: 'boolean',
|
|
7088
|
-
description: 'Whether the platform is active'
|
|
7626
|
+
description: 'Whether the platform is active',
|
|
7627
|
+
default: true
|
|
7089
7628
|
}
|
|
7090
7629
|
}
|
|
7091
7630
|
} as const;
|
|
@@ -7248,7 +7787,8 @@ export const $AccountItemDto = {
|
|
|
7248
7787
|
},
|
|
7249
7788
|
displayName: {
|
|
7250
7789
|
type: 'string',
|
|
7251
|
-
description:
|
|
7790
|
+
description:
|
|
7791
|
+
'Display name: user-set name if provided (#762), else the ADR-0114 chain — request-locale catalog name, en pivot, then the last part of the account path (#771)',
|
|
7252
7792
|
example: 'Savings'
|
|
7253
7793
|
},
|
|
7254
7794
|
balance: {
|
|
@@ -7284,7 +7824,8 @@ export const $PlatformGroupDto = {
|
|
|
7284
7824
|
example: 'CMB Bank'
|
|
7285
7825
|
},
|
|
7286
7826
|
accounts: {
|
|
7287
|
-
description:
|
|
7827
|
+
description:
|
|
7828
|
+
'Accounts within this platform (Assets and Liabilities rows, #696)',
|
|
7288
7829
|
type: 'array',
|
|
7289
7830
|
items: {
|
|
7290
7831
|
$ref: '#/components/schemas/AccountItemDto'
|
|
@@ -7292,7 +7833,8 @@ export const $PlatformGroupDto = {
|
|
|
7292
7833
|
},
|
|
7293
7834
|
totalBalance: {
|
|
7294
7835
|
type: 'string',
|
|
7295
|
-
description:
|
|
7836
|
+
description:
|
|
7837
|
+
'FX-converted total balance in base currency (nets Assets + Liabilities rows; can be negative)',
|
|
7296
7838
|
example: '100000.00'
|
|
7297
7839
|
},
|
|
7298
7840
|
balanceByCurrency: {
|
|
@@ -7311,7 +7853,7 @@ export const $PlatformGroupDto = {
|
|
|
7311
7853
|
sharePct: {
|
|
7312
7854
|
type: 'number',
|
|
7313
7855
|
description:
|
|
7314
|
-
'Share of the grand
|
|
7856
|
+
'Share of the converted asset-side grand total (0-100); liability balances are excluded from the basis; 0 when grand total is 0 (#696)',
|
|
7315
7857
|
example: 42.5
|
|
7316
7858
|
}
|
|
7317
7859
|
},
|
|
@@ -7359,7 +7901,8 @@ export const $AccountsSummaryDto = {
|
|
|
7359
7901
|
properties: {
|
|
7360
7902
|
totalAccounts: {
|
|
7361
7903
|
type: 'number',
|
|
7362
|
-
description:
|
|
7904
|
+
description:
|
|
7905
|
+
'Total number of accounts (balance sheet: Assets + Liabilities, #696)'
|
|
7363
7906
|
},
|
|
7364
7907
|
totalPlatforms: {
|
|
7365
7908
|
type: 'number',
|
|
@@ -7417,7 +7960,8 @@ export const $AccountItemWithAssetClassDto = {
|
|
|
7417
7960
|
},
|
|
7418
7961
|
displayName: {
|
|
7419
7962
|
type: 'string',
|
|
7420
|
-
description:
|
|
7963
|
+
description:
|
|
7964
|
+
'Display name: user-set name if provided (#762), else the ADR-0114 chain — request-locale catalog name, en pivot, then the last part of the account path (#771)',
|
|
7421
7965
|
example: 'Savings'
|
|
7422
7966
|
},
|
|
7423
7967
|
balance: {
|
|
@@ -7903,7 +8447,7 @@ export const $MonetaryDto = {
|
|
|
7903
8447
|
example: 'USD'
|
|
7904
8448
|
},
|
|
7905
8449
|
baseCcyEquivalent: {
|
|
7906
|
-
type: '
|
|
8450
|
+
type: 'string',
|
|
7907
8451
|
description: 'Converted to user base currency (Decimal string)',
|
|
7908
8452
|
example: '21600',
|
|
7909
8453
|
nullable: true
|
|
@@ -7979,13 +8523,13 @@ export const $HoldingPnlRowDto = {
|
|
|
7979
8523
|
example: 'Assets:US:Broker:AAPL'
|
|
7980
8524
|
},
|
|
7981
8525
|
accountCcy: {
|
|
7982
|
-
type: '
|
|
8526
|
+
type: 'string',
|
|
7983
8527
|
description: 'Account settlement currency (ISO 4217), from cost currency',
|
|
7984
8528
|
nullable: true,
|
|
7985
8529
|
example: 'USD'
|
|
7986
8530
|
},
|
|
7987
8531
|
brokerType: {
|
|
7988
|
-
type: '
|
|
8532
|
+
type: 'string',
|
|
7989
8533
|
description: 'Broker type derived from Platform.type',
|
|
7990
8534
|
nullable: true,
|
|
7991
8535
|
example: 'broker'
|
|
@@ -8006,7 +8550,7 @@ export const $HoldingPnlRowDto = {
|
|
|
8006
8550
|
example: 'EQUITY'
|
|
8007
8551
|
},
|
|
8008
8552
|
assetSubClass: {
|
|
8009
|
-
type: '
|
|
8553
|
+
type: 'string',
|
|
8010
8554
|
nullable: true,
|
|
8011
8555
|
example: 'STOCK'
|
|
8012
8556
|
},
|
|
@@ -8053,14 +8597,14 @@ export const $HoldingPnlRowDto = {
|
|
|
8053
8597
|
]
|
|
8054
8598
|
},
|
|
8055
8599
|
unrealizedPnlBase: {
|
|
8056
|
-
type: '
|
|
8600
|
+
type: 'string',
|
|
8057
8601
|
description:
|
|
8058
8602
|
'Unrealized P&L in base currency (Decimal string); null when any FX/price missing',
|
|
8059
8603
|
nullable: true,
|
|
8060
8604
|
example: '6000'
|
|
8061
8605
|
},
|
|
8062
8606
|
unrealizedPnlPct: {
|
|
8063
|
-
type: '
|
|
8607
|
+
type: 'string',
|
|
8064
8608
|
description: 'Unrealized P&L % (Decimal string)',
|
|
8065
8609
|
nullable: true,
|
|
8066
8610
|
example: '25'
|
|
@@ -8084,7 +8628,7 @@ export const $HoldingPnlRowDto = {
|
|
|
8084
8628
|
]
|
|
8085
8629
|
},
|
|
8086
8630
|
pctOfInvestedAssets: {
|
|
8087
|
-
type: '
|
|
8631
|
+
type: 'string',
|
|
8088
8632
|
description:
|
|
8089
8633
|
'Share of invested assets % (Decimal string); only for invested chartTokens',
|
|
8090
8634
|
nullable: true,
|
|
@@ -8129,15 +8673,15 @@ export const $HoldingPnlWarningDto = {
|
|
|
8129
8673
|
]
|
|
8130
8674
|
},
|
|
8131
8675
|
symbol: {
|
|
8132
|
-
type: '
|
|
8676
|
+
type: 'string',
|
|
8133
8677
|
nullable: true
|
|
8134
8678
|
},
|
|
8135
8679
|
accountId: {
|
|
8136
|
-
type: '
|
|
8680
|
+
type: 'string',
|
|
8137
8681
|
nullable: true
|
|
8138
8682
|
},
|
|
8139
8683
|
currency: {
|
|
8140
|
-
type: '
|
|
8684
|
+
type: 'string',
|
|
8141
8685
|
nullable: true
|
|
8142
8686
|
}
|
|
8143
8687
|
},
|
|
@@ -8201,6 +8745,216 @@ export const $AnonymousLoginResponseDto = {
|
|
|
8201
8745
|
required: ['authToken']
|
|
8202
8746
|
} as const;
|
|
8203
8747
|
|
|
8748
|
+
export const $ParserContributionMetaDto = {
|
|
8749
|
+
type: 'object',
|
|
8750
|
+
properties: {
|
|
8751
|
+
institution: {
|
|
8752
|
+
type: 'string',
|
|
8753
|
+
description: 'Institution slug (lowercase kebab-case)',
|
|
8754
|
+
pattern: '^[a-z0-9]+(-[a-z0-9]+)*$',
|
|
8755
|
+
example: 'icbc'
|
|
8756
|
+
},
|
|
8757
|
+
region: {
|
|
8758
|
+
type: 'string',
|
|
8759
|
+
enum: [
|
|
8760
|
+
'cn',
|
|
8761
|
+
'us',
|
|
8762
|
+
'de',
|
|
8763
|
+
'fr',
|
|
8764
|
+
'gb',
|
|
8765
|
+
'hk',
|
|
8766
|
+
'jp',
|
|
8767
|
+
'sg',
|
|
8768
|
+
'au',
|
|
8769
|
+
'ca',
|
|
8770
|
+
'other'
|
|
8771
|
+
]
|
|
8772
|
+
},
|
|
8773
|
+
accountType: {
|
|
8774
|
+
type: 'string',
|
|
8775
|
+
enum: ['checking', 'savings', 'credit', 'debit', 'investment']
|
|
8776
|
+
},
|
|
8777
|
+
format: {
|
|
8778
|
+
type: 'string',
|
|
8779
|
+
enum: ['csv', 'xlsx', 'pdf', 'ofx', 'qif']
|
|
8780
|
+
},
|
|
8781
|
+
institutionDisplayName: {
|
|
8782
|
+
type: 'string',
|
|
8783
|
+
example: '中国工商银行'
|
|
8784
|
+
},
|
|
8785
|
+
encoding: {
|
|
8786
|
+
type: 'string',
|
|
8787
|
+
example: 'utf-8'
|
|
8788
|
+
},
|
|
8789
|
+
delimiter: {
|
|
8790
|
+
type: 'string',
|
|
8791
|
+
description: 'CSV delimiter character: ",", ";", "\\t" or "|"'
|
|
8792
|
+
},
|
|
8793
|
+
headerRows: {
|
|
8794
|
+
type: 'number',
|
|
8795
|
+
default: 1,
|
|
8796
|
+
description: 'Header row count; the client omits the field when it is 1'
|
|
8797
|
+
},
|
|
8798
|
+
notes: {
|
|
8799
|
+
type: 'string',
|
|
8800
|
+
maxLength: 2000
|
|
8801
|
+
}
|
|
8802
|
+
},
|
|
8803
|
+
required: ['institution', 'region', 'accountType', 'format']
|
|
8804
|
+
} as const;
|
|
8805
|
+
|
|
8806
|
+
export const $ParserContributionSamplesDto = {
|
|
8807
|
+
type: 'object',
|
|
8808
|
+
properties: {
|
|
8809
|
+
rows: {
|
|
8810
|
+
description:
|
|
8811
|
+
'Client-sanitized sample rows (key = column name, value = cell)',
|
|
8812
|
+
type: 'array',
|
|
8813
|
+
items: {
|
|
8814
|
+
type: 'object'
|
|
8815
|
+
}
|
|
8816
|
+
},
|
|
8817
|
+
rawHeaders: {
|
|
8818
|
+
type: 'array',
|
|
8819
|
+
items: {
|
|
8820
|
+
type: 'string'
|
|
8821
|
+
}
|
|
8822
|
+
}
|
|
8823
|
+
},
|
|
8824
|
+
required: ['rows']
|
|
8825
|
+
} as const;
|
|
8826
|
+
|
|
8827
|
+
export const $FieldHintDto = {
|
|
8828
|
+
type: 'object',
|
|
8829
|
+
properties: {
|
|
8830
|
+
columnName: {
|
|
8831
|
+
type: 'string',
|
|
8832
|
+
example: '交易日期'
|
|
8833
|
+
},
|
|
8834
|
+
format: {
|
|
8835
|
+
type: 'string',
|
|
8836
|
+
description: 'Date format, e.g. yyyy-MM-dd HH:mm',
|
|
8837
|
+
example: 'yyyy-MM-dd'
|
|
8838
|
+
},
|
|
8839
|
+
signConvention: {
|
|
8840
|
+
type: 'string',
|
|
8841
|
+
enum: ['negative-expense', 'positive-expense', 'separate-columns']
|
|
8842
|
+
},
|
|
8843
|
+
creditColumn: {
|
|
8844
|
+
type: 'string'
|
|
8845
|
+
},
|
|
8846
|
+
debitColumn: {
|
|
8847
|
+
type: 'string'
|
|
8848
|
+
}
|
|
8849
|
+
},
|
|
8850
|
+
required: ['columnName']
|
|
8851
|
+
} as const;
|
|
8852
|
+
|
|
8853
|
+
export const $ParserContributionFieldHintsDto = {
|
|
8854
|
+
type: 'object',
|
|
8855
|
+
properties: {
|
|
8856
|
+
date: {
|
|
8857
|
+
$ref: '#/components/schemas/FieldHintDto'
|
|
8858
|
+
},
|
|
8859
|
+
amount: {
|
|
8860
|
+
$ref: '#/components/schemas/FieldHintDto'
|
|
8861
|
+
},
|
|
8862
|
+
description: {
|
|
8863
|
+
$ref: '#/components/schemas/FieldHintDto'
|
|
8864
|
+
},
|
|
8865
|
+
balance: {
|
|
8866
|
+
$ref: '#/components/schemas/FieldHintDto'
|
|
8867
|
+
},
|
|
8868
|
+
payee: {
|
|
8869
|
+
$ref: '#/components/schemas/FieldHintDto'
|
|
8870
|
+
},
|
|
8871
|
+
reference: {
|
|
8872
|
+
$ref: '#/components/schemas/FieldHintDto'
|
|
8873
|
+
},
|
|
8874
|
+
category: {
|
|
8875
|
+
$ref: '#/components/schemas/FieldHintDto'
|
|
8876
|
+
}
|
|
8877
|
+
},
|
|
8878
|
+
required: ['date', 'amount']
|
|
8879
|
+
} as const;
|
|
8880
|
+
|
|
8881
|
+
export const $ExpectedTransactionDto = {
|
|
8882
|
+
type: 'object',
|
|
8883
|
+
properties: {
|
|
8884
|
+
date: {
|
|
8885
|
+
type: 'string',
|
|
8886
|
+
example: '2026-08-01'
|
|
8887
|
+
},
|
|
8888
|
+
amount: {
|
|
8889
|
+
type: 'number',
|
|
8890
|
+
example: -45.5
|
|
8891
|
+
},
|
|
8892
|
+
description: {
|
|
8893
|
+
type: 'string',
|
|
8894
|
+
example: '星巴克-***店'
|
|
8895
|
+
},
|
|
8896
|
+
payee: {
|
|
8897
|
+
type: 'string'
|
|
8898
|
+
},
|
|
8899
|
+
category: {
|
|
8900
|
+
type: 'string'
|
|
8901
|
+
}
|
|
8902
|
+
},
|
|
8903
|
+
required: ['date', 'amount', 'description']
|
|
8904
|
+
} as const;
|
|
8905
|
+
|
|
8906
|
+
export const $ParserContributionExamplesDto = {
|
|
8907
|
+
type: 'object',
|
|
8908
|
+
properties: {
|
|
8909
|
+
expectedTransactions: {
|
|
8910
|
+
type: 'array',
|
|
8911
|
+
items: {
|
|
8912
|
+
$ref: '#/components/schemas/ExpectedTransactionDto'
|
|
8913
|
+
}
|
|
8914
|
+
}
|
|
8915
|
+
},
|
|
8916
|
+
required: ['expectedTransactions']
|
|
8917
|
+
} as const;
|
|
8918
|
+
|
|
8919
|
+
export const $ParserContributionRequestDto = {
|
|
8920
|
+
type: 'object',
|
|
8921
|
+
properties: {
|
|
8922
|
+
meta: {
|
|
8923
|
+
$ref: '#/components/schemas/ParserContributionMetaDto'
|
|
8924
|
+
},
|
|
8925
|
+
samples: {
|
|
8926
|
+
$ref: '#/components/schemas/ParserContributionSamplesDto'
|
|
8927
|
+
},
|
|
8928
|
+
fieldHints: {
|
|
8929
|
+
$ref: '#/components/schemas/ParserContributionFieldHintsDto'
|
|
8930
|
+
},
|
|
8931
|
+
examples: {
|
|
8932
|
+
description: 'Omitted entirely by the client when empty',
|
|
8933
|
+
allOf: [
|
|
8934
|
+
{
|
|
8935
|
+
$ref: '#/components/schemas/ParserContributionExamplesDto'
|
|
8936
|
+
}
|
|
8937
|
+
]
|
|
8938
|
+
}
|
|
8939
|
+
},
|
|
8940
|
+
required: ['meta', 'samples', 'fieldHints']
|
|
8941
|
+
} as const;
|
|
8942
|
+
|
|
8943
|
+
export const $ParserContributionRelayResponseDto = {
|
|
8944
|
+
type: 'object',
|
|
8945
|
+
properties: {
|
|
8946
|
+
issueUrl: {
|
|
8947
|
+
type: 'string',
|
|
8948
|
+
example: 'https://github.com/fire-zu/firela-vlt/issues/42'
|
|
8949
|
+
},
|
|
8950
|
+
issueNumber: {
|
|
8951
|
+
type: 'number',
|
|
8952
|
+
example: 42
|
|
8953
|
+
}
|
|
8954
|
+
},
|
|
8955
|
+
required: ['issueUrl', 'issueNumber']
|
|
8956
|
+
} as const;
|
|
8957
|
+
|
|
8204
8958
|
export const $SymbolSearchResultDto = {
|
|
8205
8959
|
type: 'object',
|
|
8206
8960
|
properties: {
|
|
@@ -8209,35 +8963,35 @@ export const $SymbolSearchResultDto = {
|
|
|
8209
8963
|
example: 'AAPL'
|
|
8210
8964
|
},
|
|
8211
8965
|
name: {
|
|
8212
|
-
type: '
|
|
8966
|
+
type: 'string',
|
|
8213
8967
|
example: 'Apple Inc.',
|
|
8214
8968
|
nullable: true
|
|
8215
8969
|
},
|
|
8216
8970
|
exchange: {
|
|
8217
|
-
type: '
|
|
8971
|
+
type: 'string',
|
|
8218
8972
|
example: 'US',
|
|
8219
8973
|
nullable: true
|
|
8220
8974
|
},
|
|
8221
8975
|
assetType: {
|
|
8222
|
-
type: '
|
|
8976
|
+
type: 'string',
|
|
8223
8977
|
description: 'OpenBB asset_type (e.g. stock, etf)',
|
|
8224
8978
|
example: 'stock',
|
|
8225
8979
|
nullable: true
|
|
8226
8980
|
},
|
|
8227
8981
|
assetClass: {
|
|
8228
|
-
type: '
|
|
8982
|
+
type: 'string',
|
|
8229
8983
|
description: 'IGN asset class (region.types.ts ASSET_CLASSES)',
|
|
8230
8984
|
example: 'EQUITY',
|
|
8231
8985
|
nullable: true
|
|
8232
8986
|
},
|
|
8233
8987
|
assetSubClass: {
|
|
8234
|
-
type: '
|
|
8988
|
+
type: 'string',
|
|
8235
8989
|
description: 'IGN asset sub-class (region.types.ts ASSET_SUB_CLASSES)',
|
|
8236
8990
|
example: 'STOCK',
|
|
8237
8991
|
nullable: true
|
|
8238
8992
|
},
|
|
8239
8993
|
currency: {
|
|
8240
|
-
type: '
|
|
8994
|
+
type: 'string',
|
|
8241
8995
|
description: 'Trading currency (extra_data or inferred from exchange)',
|
|
8242
8996
|
example: 'USD',
|
|
8243
8997
|
nullable: true
|
|
@@ -8254,90 +9008,90 @@ export const $SymbolQuoteDto = {
|
|
|
8254
9008
|
example: 'AAPL'
|
|
8255
9009
|
},
|
|
8256
9010
|
name: {
|
|
8257
|
-
type: '
|
|
9011
|
+
type: 'string',
|
|
8258
9012
|
example: 'Apple Inc.',
|
|
8259
9013
|
nullable: true
|
|
8260
9014
|
},
|
|
8261
9015
|
exchange: {
|
|
8262
|
-
type: '
|
|
9016
|
+
type: 'string',
|
|
8263
9017
|
example: 'US',
|
|
8264
9018
|
nullable: true
|
|
8265
9019
|
},
|
|
8266
9020
|
assetType: {
|
|
8267
|
-
type: '
|
|
9021
|
+
type: 'string',
|
|
8268
9022
|
description: 'OpenBB asset_type',
|
|
8269
9023
|
example: 'stock',
|
|
8270
9024
|
nullable: true
|
|
8271
9025
|
},
|
|
8272
9026
|
assetClass: {
|
|
8273
|
-
type: '
|
|
9027
|
+
type: 'string',
|
|
8274
9028
|
description: 'IGN asset class',
|
|
8275
9029
|
example: 'EQUITY',
|
|
8276
9030
|
nullable: true
|
|
8277
9031
|
},
|
|
8278
9032
|
assetSubClass: {
|
|
8279
|
-
type: '
|
|
9033
|
+
type: 'string',
|
|
8280
9034
|
description: 'IGN asset sub-class',
|
|
8281
9035
|
example: 'STOCK',
|
|
8282
9036
|
nullable: true
|
|
8283
9037
|
},
|
|
8284
9038
|
currency: {
|
|
8285
|
-
type: '
|
|
9039
|
+
type: 'string',
|
|
8286
9040
|
description: 'Trading currency (extra_data or inferred from exchange)',
|
|
8287
9041
|
example: 'USD',
|
|
8288
9042
|
nullable: true
|
|
8289
9043
|
},
|
|
8290
9044
|
price: {
|
|
8291
|
-
type: '
|
|
9045
|
+
type: 'string',
|
|
8292
9046
|
description: 'Latest price (Decimal string)',
|
|
8293
9047
|
example: '189.84',
|
|
8294
9048
|
nullable: true
|
|
8295
9049
|
},
|
|
8296
9050
|
priceDate: {
|
|
8297
|
-
type: '
|
|
9051
|
+
type: 'string',
|
|
8298
9052
|
description: 'Date the price was observed (ISO yyyy-MM-dd)',
|
|
8299
9053
|
example: '2026-08-05',
|
|
8300
9054
|
nullable: true
|
|
8301
9055
|
},
|
|
8302
9056
|
changePercent: {
|
|
8303
|
-
type: '
|
|
9057
|
+
type: 'number',
|
|
8304
9058
|
description:
|
|
8305
9059
|
'Change vs previous close, in percentage points (1.7 == 1.7%). openbb stores change_percent as a normalized decimal; this exposes percentage points for frontend convenience.',
|
|
8306
9060
|
example: 1.7,
|
|
8307
9061
|
nullable: true
|
|
8308
9062
|
},
|
|
8309
9063
|
prevClose: {
|
|
8310
|
-
type: '
|
|
9064
|
+
type: 'string',
|
|
8311
9065
|
description: 'Previous close (Decimal string)',
|
|
8312
9066
|
nullable: true
|
|
8313
9067
|
},
|
|
8314
9068
|
open: {
|
|
8315
|
-
type: '
|
|
9069
|
+
type: 'string',
|
|
8316
9070
|
description: 'Day open (Decimal string)',
|
|
8317
9071
|
nullable: true
|
|
8318
9072
|
},
|
|
8319
9073
|
high: {
|
|
8320
|
-
type: '
|
|
9074
|
+
type: 'string',
|
|
8321
9075
|
description: 'Day high (Decimal string)',
|
|
8322
9076
|
nullable: true
|
|
8323
9077
|
},
|
|
8324
9078
|
low: {
|
|
8325
|
-
type: '
|
|
9079
|
+
type: 'string',
|
|
8326
9080
|
description: 'Day low (Decimal string)',
|
|
8327
9081
|
nullable: true
|
|
8328
9082
|
},
|
|
8329
9083
|
volume: {
|
|
8330
|
-
type: '
|
|
9084
|
+
type: 'string',
|
|
8331
9085
|
description: 'Day volume (Decimal string)',
|
|
8332
9086
|
nullable: true
|
|
8333
9087
|
},
|
|
8334
9088
|
yearHigh: {
|
|
8335
|
-
type: '
|
|
9089
|
+
type: 'string',
|
|
8336
9090
|
description: '52-week high (Decimal string)',
|
|
8337
9091
|
nullable: true
|
|
8338
9092
|
},
|
|
8339
9093
|
yearLow: {
|
|
8340
|
-
type: '
|
|
9094
|
+
type: 'string',
|
|
8341
9095
|
description: '52-week low (Decimal string)',
|
|
8342
9096
|
nullable: true
|
|
8343
9097
|
}
|