@firela/api-types 0.0.0-canary.6feee68d → 0.0.0-canary.792fa5f1

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.
@@ -316,6 +316,53 @@ export type RegionsMetadataResponseDto = {
316
316
  regions: Array<RegionInfoDto>;
317
317
  };
318
318
 
319
+ export type CostSpecDto = {
320
+ /**
321
+ * Cost specification mode (mirrors engine CostSpec)
322
+ */
323
+ mode: 'per-unit' | 'total' | 'date' | 'label' | 'auto';
324
+ /**
325
+ * Per-unit cost (required when mode is "per-unit")
326
+ */
327
+ numberPerUnit?: string;
328
+ /**
329
+ * Total cost for all units (required when mode is "total")
330
+ */
331
+ totalNumber?: string;
332
+ /**
333
+ * Cost currency (required in all modes)
334
+ */
335
+ currency: string;
336
+ /**
337
+ * Lot acquisition date, ISO 8601 (required when mode is "date")
338
+ */
339
+ date?: string;
340
+ /**
341
+ * Lot label (required when mode is "label"; optional tag in buy modes)
342
+ */
343
+ label?: string;
344
+ /**
345
+ * Merge lots for AVERAGE booking (mode: auto)
346
+ */
347
+ merge?: boolean;
348
+ };
349
+
350
+ /**
351
+ * Cost specification mode (mirrors engine CostSpec)
352
+ */
353
+ export type mode = 'per-unit' | 'total' | 'date' | 'label' | 'auto';
354
+
355
+ export type AmountDto = {
356
+ /**
357
+ * Amount as decimal string (max 15 integer + 15 decimal digits)
358
+ */
359
+ number: string;
360
+ /**
361
+ * Currency/commodity code
362
+ */
363
+ currency: string;
364
+ };
365
+
319
366
  export type CreatePostingDto = {
320
367
  /**
321
368
  * Account name in Beancount format (must start with uppercase, colon-separated)
@@ -335,6 +382,14 @@ export type CreatePostingDto = {
335
382
  meta?: {
336
383
  [key: string]: unknown;
337
384
  };
385
+ /**
386
+ * Cost basis (Beancount `{...}`). Maps to engine costSpec. Required for commodity holdings so they carry a monetary weight that can balance.
387
+ */
388
+ cost?: CostSpecDto;
389
+ /**
390
+ * Price annotation (Beancount `@...`). Maps to engine price. Used for valuation; cost takes priority for balance weight.
391
+ */
392
+ price?: AmountDto;
338
393
  };
339
394
 
340
395
  export type CreateTransactionDto = {
@@ -393,7 +448,7 @@ export type PostingResponseDto = {
393
448
  */
394
449
  account: string;
395
450
  /**
396
- * Amount (may be null if interpolated)
451
+ * Amount as decimal string. Typed optional but always present in responses: interpolation fills any MISSING posting before it is persisted or returned.
397
452
  */
398
453
  units?: string;
399
454
  /**
@@ -561,6 +616,55 @@ export type BatchTransactionResponseDto = {
561
616
  failed: Array<BatchTransactionErrorDto>;
562
617
  };
563
618
 
619
+ export type CorrectTransactionDto = {
620
+ /**
621
+ * Transaction date (ISO 8601 format)
622
+ */
623
+ date: string;
624
+ /**
625
+ * Transaction flag: * (cleared), ! (pending)
626
+ */
627
+ flag?: '*' | '!';
628
+ /**
629
+ * Payee name
630
+ */
631
+ payee?: string;
632
+ /**
633
+ * Transaction narration/description
634
+ */
635
+ narration: string;
636
+ /**
637
+ * Transaction tags (without # prefix)
638
+ */
639
+ tags?: Array<string>;
640
+ /**
641
+ * Transaction links (without ^ prefix)
642
+ */
643
+ links?: Array<string>;
644
+ /**
645
+ * Transaction postings (minimum 1, typically 2 for double-entry)
646
+ */
647
+ postings: Array<CreatePostingDto>;
648
+ /**
649
+ * Transaction-level metadata
650
+ */
651
+ meta?: {
652
+ [key: string]: unknown;
653
+ };
654
+ /**
655
+ * Unique key for idempotent transaction creation. If provided, duplicate requests with the same key will return the existing transaction.
656
+ */
657
+ idempotencyKey?: string;
658
+ /**
659
+ * Auto-create accounts if not found. When true, missing accounts will be automatically created. When false (default for API), missing accounts will cause a validation error. Set to true for quick entry scenarios where you want to create accounts on-the-fly.
660
+ */
661
+ autoCreateAccounts?: boolean;
662
+ /**
663
+ * Reason for correcting/superseding the original transaction
664
+ */
665
+ correctionReason?: string;
666
+ };
667
+
564
668
  export type PostingDetailDto = {
565
669
  /**
566
670
  * Posting ID
@@ -571,11 +675,11 @@ export type PostingDetailDto = {
571
675
  */
572
676
  accountId: string;
573
677
  /**
574
- * Account name
678
+ * Fully-qualified Beancount account path
575
679
  */
576
- accountName: string;
680
+ account: string;
577
681
  /**
578
- * Amount (may be null if interpolated)
682
+ * Amount as decimal string. Typed optional but always present in responses: interpolation fills any MISSING posting before it is persisted or returned.
579
683
  */
580
684
  units?: string;
581
685
  /**
@@ -664,9 +768,9 @@ export type TransactionDetailDto = {
664
768
  */
665
769
  status: 'ACTIVE' | 'VOIDED' | 'SUPERSEDED';
666
770
  /**
667
- * Source type (how the transaction was created)
771
+ * Source type (free-form string from transaction metadata, e.g. import, api)
668
772
  */
669
- sourceType?: 'NLP' | 'CSV' | 'OCR' | 'API';
773
+ sourceType?: string;
670
774
  /**
671
775
  * Source platform (e.g., alipay, wechat)
672
776
  */
@@ -691,6 +795,14 @@ export type TransactionDetailDto = {
691
795
  * Correction reason (if voided or superseded)
692
796
  */
693
797
  correctionReason?: string;
798
+ /**
799
+ * ID of the transaction that supersedes this one (set when status=SUPERSEDED)
800
+ */
801
+ supersededBy?: string;
802
+ /**
803
+ * ID of the transaction this one corrected/replaced (back-link on the replacement)
804
+ */
805
+ originalTxn?: string;
694
806
  };
695
807
 
696
808
  /**
@@ -709,11 +821,6 @@ export type flag2 =
709
821
  */
710
822
  export type status2 = 'ACTIVE' | 'VOIDED' | 'SUPERSEDED';
711
823
 
712
- /**
713
- * Source type (how the transaction was created)
714
- */
715
- export type sourceType = 'NLP' | 'CSV' | 'OCR' | 'API';
716
-
717
824
  export type TransactionListResponseDto = {
718
825
  /**
719
826
  * List of transactions
@@ -733,6 +840,24 @@ export type TransactionListResponseDto = {
733
840
  offset: number;
734
841
  };
735
842
 
843
+ export type TagSuggestionDto = {
844
+ /**
845
+ * Tag name
846
+ */
847
+ tag: string;
848
+ /**
849
+ * Usage count across ACTIVE transactions
850
+ */
851
+ count: number;
852
+ };
853
+
854
+ export type TagSuggestionsResponseDto = {
855
+ /**
856
+ * Tag suggestions sorted as requested
857
+ */
858
+ data: Array<TagSuggestionDto>;
859
+ };
860
+
736
861
  export type UpdateTransactionDto = {
737
862
  /**
738
863
  * Transaction flag (CLEARED, PENDING, etc.)
@@ -834,9 +959,9 @@ export type TransactionSummaryDto = {
834
959
  */
835
960
  accountName?: string;
836
961
  /**
837
- * Source type (NLP, CSV, OCR, API)
962
+ * Source type (free-form string from transaction metadata, e.g. import, api)
838
963
  */
839
- sourceType?: 'NLP' | 'CSV' | 'OCR' | 'API';
964
+ sourceType?: string;
840
965
  /**
841
966
  * Source platform (e.g., alipay, wechat)
842
967
  */
@@ -866,9 +991,9 @@ export type ReviewSummaryDto = {
866
991
  */
867
992
  confidence: number;
868
993
  /**
869
- * Confidence level derived from score
994
+ * Confidence level derived from score. Null for error-type reviews (ACCOUNT_VALIDATION/PIPELINE_ERROR) which carry no confidence.
870
995
  */
871
- confidenceLevel: 'HIGH' | 'MEDIUM' | 'LOW';
996
+ confidenceLevel: 'HIGH' | 'MEDIUM' | 'LOW' | null;
872
997
  /**
873
998
  * i18n message key for summary (e.g., review.summary.duplicate). Translate on frontend with summaryParams.
874
999
  */
@@ -884,7 +1009,7 @@ export type ReviewSummaryDto = {
884
1009
  */
885
1010
  matchReasons: Array<string>;
886
1011
  /**
887
- * Source type (NLP, CSV, OCR, API)
1012
+ * Source type (free-form string from transaction metadata, e.g. import, api)
888
1013
  */
889
1014
  sourceType: string;
890
1015
  /**
@@ -937,7 +1062,7 @@ export type type2 =
937
1062
  export type status3 = 'PENDING' | 'RESOLVED' | 'EXPIRED' | 'CANCELLED';
938
1063
 
939
1064
  /**
940
- * Confidence level derived from score
1065
+ * Confidence level derived from score. Null for error-type reviews (ACCOUNT_VALIDATION/PIPELINE_ERROR) which carry no confidence.
941
1066
  */
942
1067
  export type confidenceLevel = 'HIGH' | 'MEDIUM' | 'LOW';
943
1068
 
@@ -982,7 +1107,18 @@ export type DecisionOptionDto = {
982
1107
  /**
983
1108
  * The action value to submit (e.g., UPGRADE_REPLACE, ACCEPT)
984
1109
  */
985
- value: string;
1110
+ value:
1111
+ | 'UPGRADE_REPLACE'
1112
+ | 'LINK_KEEP_BOTH'
1113
+ | 'IGNORE_NEW'
1114
+ | 'CONFIRM_DIFFERENT'
1115
+ | 'ACCEPT'
1116
+ | 'REJECT'
1117
+ | 'ACCEPT_AND_LEARN'
1118
+ | 'CHOOSE_OTHER'
1119
+ | 'CANCEL'
1120
+ | 'FIX'
1121
+ | 'IGNORE';
986
1122
  /**
987
1123
  * i18n message key for display label (e.g., review.payee.accept.label)
988
1124
  */
@@ -997,6 +1133,22 @@ export type DecisionOptionDto = {
997
1133
  recommended?: boolean;
998
1134
  };
999
1135
 
1136
+ /**
1137
+ * The action value to submit (e.g., UPGRADE_REPLACE, ACCEPT)
1138
+ */
1139
+ export type value =
1140
+ | 'UPGRADE_REPLACE'
1141
+ | 'LINK_KEEP_BOTH'
1142
+ | 'IGNORE_NEW'
1143
+ | 'CONFIRM_DIFFERENT'
1144
+ | 'ACCEPT'
1145
+ | 'REJECT'
1146
+ | 'ACCEPT_AND_LEARN'
1147
+ | 'CHOOSE_OTHER'
1148
+ | 'CANCEL'
1149
+ | 'FIX'
1150
+ | 'IGNORE';
1151
+
1000
1152
  export type ReviewDetailDto = {
1001
1153
  /**
1002
1154
  * Review item ID
@@ -1020,9 +1172,9 @@ export type ReviewDetailDto = {
1020
1172
  */
1021
1173
  confidence: number;
1022
1174
  /**
1023
- * Confidence level derived from score
1175
+ * Confidence level derived from score. Null for error-type reviews (ACCOUNT_VALIDATION/PIPELINE_ERROR) which carry no confidence.
1024
1176
  */
1025
- confidenceLevel: 'HIGH' | 'MEDIUM' | 'LOW';
1177
+ confidenceLevel: 'HIGH' | 'MEDIUM' | 'LOW' | null;
1026
1178
  /**
1027
1179
  * i18n message key for summary (e.g., review.summary.duplicate). Translate on frontend with summaryParams.
1028
1180
  */
@@ -1038,7 +1190,7 @@ export type ReviewDetailDto = {
1038
1190
  */
1039
1191
  matchReasons: Array<string>;
1040
1192
  /**
1041
- * Source type (NLP, CSV, OCR, API)
1193
+ * Source type (free-form string from transaction metadata, e.g. import, api)
1042
1194
  */
1043
1195
  sourceType: string;
1044
1196
  /**
@@ -1091,9 +1243,20 @@ export type ReviewDetailDto = {
1091
1243
 
1092
1244
  export type ResolveReviewDto = {
1093
1245
  /**
1094
- * Decision action. Available actions vary by review type: DUPLICATE: UPGRADE_REPLACE, KEEP_EXISTING, KEEP_BOTH | PAYEE_MATCH: ACCEPT, REJECT, ACCEPT_AND_LEARN | ACCOUNT_VALIDATION: FIX, REJECT | RULE_MATCH: ACCEPT, REJECT, ACCEPT_AND_LEARN
1246
+ * Decision action. Valid actions vary by review type see DecisionOptionDto.value returned by the review detail endpoint.
1095
1247
  */
1096
- action: string;
1248
+ action:
1249
+ | 'UPGRADE_REPLACE'
1250
+ | 'LINK_KEEP_BOTH'
1251
+ | 'IGNORE_NEW'
1252
+ | 'CONFIRM_DIFFERENT'
1253
+ | 'ACCEPT'
1254
+ | 'REJECT'
1255
+ | 'ACCEPT_AND_LEARN'
1256
+ | 'CHOOSE_OTHER'
1257
+ | 'CANCEL'
1258
+ | 'FIX'
1259
+ | 'IGNORE';
1097
1260
  /**
1098
1261
  * Additional data for the decision (e.g., selected account ID)
1099
1262
  */
@@ -1102,6 +1265,22 @@ export type ResolveReviewDto = {
1102
1265
  };
1103
1266
  };
1104
1267
 
1268
+ /**
1269
+ * Decision action. Valid actions vary by review type — see DecisionOptionDto.value returned by the review detail endpoint.
1270
+ */
1271
+ export type action =
1272
+ | 'UPGRADE_REPLACE'
1273
+ | 'LINK_KEEP_BOTH'
1274
+ | 'IGNORE_NEW'
1275
+ | 'CONFIRM_DIFFERENT'
1276
+ | 'ACCEPT'
1277
+ | 'REJECT'
1278
+ | 'ACCEPT_AND_LEARN'
1279
+ | 'CHOOSE_OTHER'
1280
+ | 'CANCEL'
1281
+ | 'FIX'
1282
+ | 'IGNORE';
1283
+
1105
1284
  export type ResolveResultDto = {
1106
1285
  /**
1107
1286
  * Whether resolution was successful
@@ -1158,7 +1337,18 @@ export type BatchResolveDto = {
1158
1337
  /**
1159
1338
  * Decision action to apply to all items
1160
1339
  */
1161
- action: string;
1340
+ action:
1341
+ | 'UPGRADE_REPLACE'
1342
+ | 'LINK_KEEP_BOTH'
1343
+ | 'IGNORE_NEW'
1344
+ | 'CONFIRM_DIFFERENT'
1345
+ | 'ACCEPT'
1346
+ | 'REJECT'
1347
+ | 'ACCEPT_AND_LEARN'
1348
+ | 'CHOOSE_OTHER'
1349
+ | 'CANCEL'
1350
+ | 'FIX'
1351
+ | 'IGNORE';
1162
1352
  /**
1163
1353
  * Additional data for the decision
1164
1354
  */
@@ -3276,6 +3466,8 @@ export type SupportedProvidersResponseDto = {
3276
3466
 
3277
3467
  export type ParserTelemetryReportDto = unknown;
3278
3468
 
3469
+ export type UncoveredFormatMissDto = unknown;
3470
+
3279
3471
  export type ProcessNlpDto = {
3280
3472
  /**
3281
3473
  * Natural language text describing a transaction (Chinese)
@@ -3821,7 +4013,7 @@ export type status4 = 'success' | 'pending' | 'error';
3821
4013
  /**
3822
4014
  * Action taken or requested
3823
4015
  */
3824
- export type action =
4016
+ export type action2 =
3825
4017
  | 'created'
3826
4018
  | 'ask'
3827
4019
  | 'confirm'
@@ -4061,8 +4253,21 @@ export type AccountItemWithAssetClassDto = {
4061
4253
  * Risk level
4062
4254
  */
4063
4255
  riskLevel?: string;
4256
+ /**
4257
+ * ADR-0105 classification provenance (holding level always; account level only on FALLBACK)
4258
+ */
4259
+ source?: 'USER_META' | 'FIAT_CURRENCY' | 'OPENBB_MAPPING' | 'FALLBACK';
4064
4260
  };
4065
4261
 
4262
+ /**
4263
+ * ADR-0105 classification provenance (holding level always; account level only on FALLBACK)
4264
+ */
4265
+ export type source2 =
4266
+ | 'USER_META'
4267
+ | 'FIAT_CURRENCY'
4268
+ | 'OPENBB_MAPPING'
4269
+ | 'FALLBACK';
4270
+
4066
4271
  export type AssetClassGroupDto = {
4067
4272
  /**
4068
4273
  * Asset class name
@@ -4149,6 +4354,12 @@ export type AssetClassSummaryDto = {
4149
4354
  * Exchange rate warnings
4150
4355
  */
4151
4356
  warnings?: Array<AccountExchangeRateWarningDto>;
4357
+ /**
4358
+ * ADR-0105 §4 fallback provenance stats (holding level only). valueRatio is the grey-area share of total converted value; count is the number of source=FALLBACK holdings.
4359
+ */
4360
+ fallback?: {
4361
+ [key: string]: unknown;
4362
+ };
4152
4363
  };
4153
4364
 
4154
4365
  export type AssetClassAccountsResponseDto = {
@@ -4160,6 +4371,56 @@ export type AssetClassAccountsResponseDto = {
4160
4371
  * Summary statistics
4161
4372
  */
4162
4373
  summary: AssetClassSummaryDto;
4374
+ /**
4375
+ * ADR-0105 §6 holding-level grey-area bucket (source=FALLBACK holdings peeled out of groups). Present only for groupBy=holdingAssetClass when FALLBACK holdings exist.
4376
+ */
4377
+ uncategorized?: AssetClassGroupDto;
4378
+ };
4379
+
4380
+ export type HoldingAssetClassAccountSliceDto = {
4381
+ /**
4382
+ * Account ID
4383
+ */
4384
+ accountId: string;
4385
+ /**
4386
+ * Full account path
4387
+ */
4388
+ accountPath: string;
4389
+ /**
4390
+ * Currency of the holding with the largest converted base value; undefined when no holding is convertible
4391
+ */
4392
+ accountCurrency?: string;
4393
+ /**
4394
+ * Account's market value in base currency (Σ converted holdings; grey bucket included)
4395
+ */
4396
+ marketValueBase: string;
4397
+ /**
4398
+ * Share of the global total (0-100). 0 when globalTotal is zero (no NaN/Infinity).
4399
+ */
4400
+ shareOfTotalPct: number;
4401
+ /**
4402
+ * Per-account asset-class breakdown
4403
+ */
4404
+ groups: Array<AssetClassGroupDto>;
4405
+ /**
4406
+ * Per-account grey bucket (source=FALLBACK holdings, incl. broker cash)
4407
+ */
4408
+ uncategorized?: AssetClassGroupDto;
4409
+ /**
4410
+ * Every holding row for this account (account ID in each row’s `id` field)
4411
+ */
4412
+ holdings: Array<AccountItemWithAssetClassDto>;
4413
+ };
4414
+
4415
+ export type HoldingAssetClassCrossAccountResponseDto = {
4416
+ /**
4417
+ * Merged cross-account holding aggregation
4418
+ */
4419
+ global: AssetClassAccountsResponseDto;
4420
+ /**
4421
+ * Per-account slices
4422
+ */
4423
+ byAccount: Array<HoldingAssetClassAccountSliceDto>;
4163
4424
  };
4164
4425
 
4165
4426
  export type CashFlowByCurrencyDto = {
@@ -4241,151 +4502,448 @@ export type CashFlowResponseDto = {
4241
4502
  warnings?: Array<ExchangeRateWarningDto>;
4242
4503
  };
4243
4504
 
4244
- export type CurrencyBalanceDto = {
4245
- /**
4246
- * ISO 4217 currency code
4247
- */
4248
- currency: string;
4249
- /**
4250
- * Balance amount
4251
- */
4252
- balance: string;
4253
- };
4254
-
4255
- export type TimeSeriesPointDto = {
4505
+ export type MonetaryDto = {
4256
4506
  /**
4257
- * Date in YYYY-MM-DD format
4507
+ * Amount (Decimal string)
4258
4508
  */
4259
- date: string;
4509
+ amount: string;
4260
4510
  /**
4261
- * Value at this date (in base currency)
4511
+ * ISO 4217 currency
4262
4512
  */
4263
- value: string;
4513
+ currency: string;
4264
4514
  /**
4265
- * Change from previous point
4515
+ * Converted to user base currency (Decimal string)
4266
4516
  */
4267
- change?: {
4517
+ baseCcyEquivalent?: {
4268
4518
  [key: string]: unknown;
4269
- };
4270
- /**
4271
- * Multi-currency breakdown for this point
4272
- */
4273
- byCurrency?: Array<CurrencyBalanceDto>;
4519
+ } | null;
4274
4520
  };
4275
4521
 
4276
- export type TrendSummaryDto = {
4522
+ export type CurrentPriceDto = {
4277
4523
  /**
4278
- * Value at start of period
4524
+ * Price amount (Decimal string)
4279
4525
  */
4280
- startValue: string;
4526
+ amount: string;
4281
4527
  /**
4282
- * Value at end of period
4528
+ * Price currency (ISO 4217)
4283
4529
  */
4284
- endValue: string;
4530
+ currency: string;
4285
4531
  /**
4286
- * Total change over period
4532
+ * Price date (ISO 8601)
4287
4533
  */
4288
- totalChange: string;
4534
+ date: string;
4289
4535
  /**
4290
- * Total change percentage
4536
+ * Price source
4291
4537
  */
4292
- totalChangePercentage: string;
4538
+ source: 'USER_OVERRIDE' | 'OPENBB_EQUITY' | 'OPENBB_CURRENCY';
4293
4539
  };
4294
4540
 
4295
- export type MultiCurrencyPointDto = {
4541
+ /**
4542
+ * Price source
4543
+ */
4544
+ export type source3 = 'USER_OVERRIDE' | 'OPENBB_EQUITY' | 'OPENBB_CURRENCY';
4545
+
4546
+ export type FxRateDto = {
4547
+ from: string;
4548
+ to: string;
4296
4549
  /**
4297
- * Date in YYYY-MM-DD format
4550
+ * FX rate (Decimal string)
4298
4551
  */
4299
- date: string;
4552
+ rate: string;
4300
4553
  /**
4301
- * Balances by currency
4554
+ * Rate date (ISO 8601)
4302
4555
  */
4303
- byCurrency: Array<CurrencyBalanceDto>;
4556
+ date: string;
4304
4557
  };
4305
4558
 
4306
- export type PortfolioTrendsResponseDto = {
4559
+ export type HoldingPnlRowDto = {
4307
4560
  /**
4308
- * Time series data points
4561
+ * Account UUID
4309
4562
  */
4310
- series: Array<TimeSeriesPointDto>;
4563
+ accountId: string;
4311
4564
  /**
4312
- * Period summary
4565
+ * Full account path
4313
4566
  */
4314
- summary: TrendSummaryDto;
4567
+ accountPath: string;
4315
4568
  /**
4316
- * Period requested
4569
+ * Account settlement currency (ISO 4217), from cost currency
4317
4570
  */
4318
- period: string;
4571
+ accountCcy?: {
4572
+ [key: string]: unknown;
4573
+ } | null;
4319
4574
  /**
4320
- * Data granularity
4575
+ * Broker type derived from Platform.type
4321
4576
  */
4322
- granularity: string;
4577
+ brokerType?: {
4578
+ [key: string]: unknown;
4579
+ } | null;
4323
4580
  /**
4324
- * Base currency for converted values
4581
+ * Commodity symbol
4325
4582
  */
4326
- currency: string;
4583
+ symbol: string;
4327
4584
  /**
4328
- * Multi-currency time series (each point has currency breakdown)
4585
+ * Chart segment token (libs/common resolver)
4329
4586
  */
4330
- byCurrency?: Array<MultiCurrencyPointDto>;
4587
+ chartToken: 'equity' | 'fund' | 'bond' | 'cash' | 'other';
4588
+ assetClass: string;
4589
+ assetSubClass?: {
4590
+ [key: string]: unknown;
4591
+ } | null;
4331
4592
  /**
4332
- * Exchange rate warnings
4593
+ * Net held units (Decimal string)
4333
4594
  */
4334
- warnings?: Array<ExchangeRateWarningDto>;
4335
- };
4336
-
4337
- export type GenerateSnapshotBody = unknown;
4338
-
4339
- export type GenerateSnapshotResponse = unknown;
4340
-
4341
- export type BackfillSnapshotsBody = unknown;
4342
-
4343
- export type BackfillSnapshotsResponse = unknown;
4344
-
4345
- export type AnonymousLoginDto = {
4595
+ units: string;
4346
4596
  /**
4347
- * Access token for anonymous login
4597
+ * Average cost per unit; null when cost currency conflicts or no cost
4348
4598
  */
4349
- accessToken: string;
4350
- };
4351
-
4352
- export type AccountControllerCreateData = {
4599
+ averageCostPerUnit?: MonetaryDto | null;
4353
4600
  /**
4354
- * Region code for tenant context
4601
+ * Cost basis of held units
4355
4602
  */
4356
- region: 'cn' | 'us' | 'de' | 'gb';
4357
- requestBody: CreateAccountDto;
4358
- };
4359
-
4360
- export type AccountControllerCreateResponse = AccountResponseDto;
4361
-
4362
- export type AccountControllerFindAllData = {
4603
+ costBasis?: MonetaryDto | null;
4363
4604
  /**
4364
- * Filter by custom (user-created) accounts only
4605
+ * Market value at asOf price
4365
4606
  */
4366
- isCustom?: boolean;
4607
+ marketValue?: MonetaryDto | null;
4367
4608
  /**
4368
- * Maximum number of results
4609
+ * Price used for market value
4369
4610
  */
4370
- limit?: number;
4611
+ currentPrice?: CurrentPriceDto | null;
4371
4612
  /**
4372
- * Number of results to skip
4613
+ * Unrealized P&L in base currency (Decimal string); null when any FX/price missing
4373
4614
  */
4374
- offset?: number;
4615
+ unrealizedPnlBase?: {
4616
+ [key: string]: unknown;
4617
+ } | null;
4375
4618
  /**
4376
- * Region code for tenant context
4619
+ * Unrealized P&L % (Decimal string)
4377
4620
  */
4378
- region: 'cn' | 'us' | 'de' | 'gb';
4621
+ unrealizedPnlPct?: {
4622
+ [key: string]: unknown;
4623
+ } | null;
4379
4624
  /**
4380
- * Search term for path or i18nKey
4625
+ * Historical FX rate applied to cost basis
4381
4626
  */
4382
- search?: string;
4627
+ costFxRate?: FxRateDto | null;
4383
4628
  /**
4384
- * Filter by status
4629
+ * FX rate applied to market value
4385
4630
  */
4386
- status?: 'OPEN' | 'CLOSED' | 'SUSPENDED';
4631
+ marketFxRate?: FxRateDto | null;
4387
4632
  /**
4388
- * Filter by account type
4633
+ * Share of invested assets % (Decimal string); only for invested chartTokens
4634
+ */
4635
+ pctOfInvestedAssets?: {
4636
+ [key: string]: unknown;
4637
+ } | null;
4638
+ /**
4639
+ * Cumulative realized P&L on sold lots (asOf-date cutoff); null when the method has no applicable sells, a sell lacks a price, or any required FX rate is missing (never-mix). When a sell spans multiple currencies (cross-currency sale), amount and currency reflect the base currency; baseCcyEquivalent is always the authoritative dual-FX figure
4640
+ */
4641
+ realizedPnl?: MonetaryDto | null;
4642
+ };
4643
+
4644
+ /**
4645
+ * Chart segment token (libs/common resolver)
4646
+ */
4647
+ export type chartToken = 'equity' | 'fund' | 'bond' | 'cash' | 'other';
4648
+
4649
+ export type HoldingPnlWarningDto = {
4650
+ /**
4651
+ * Warning type
4652
+ */
4653
+ type:
4654
+ | 'MISSING_COST_FX_RATE'
4655
+ | 'MISSING_MARKET_FX_RATE'
4656
+ | 'MISSING_SALE_PRICE'
4657
+ | 'MISSING_REALIZED_FX_RATE'
4658
+ | 'OVERSOLD_LOTS'
4659
+ | 'NO_PRICE'
4660
+ | 'MIXED_COST_CURRENCY';
4661
+ symbol?: {
4662
+ [key: string]: unknown;
4663
+ } | null;
4664
+ accountId?: {
4665
+ [key: string]: unknown;
4666
+ } | null;
4667
+ currency?: {
4668
+ [key: string]: unknown;
4669
+ } | null;
4670
+ };
4671
+
4672
+ /**
4673
+ * Warning type
4674
+ */
4675
+ export type type4 =
4676
+ | 'MISSING_COST_FX_RATE'
4677
+ | 'MISSING_MARKET_FX_RATE'
4678
+ | 'MISSING_SALE_PRICE'
4679
+ | 'MISSING_REALIZED_FX_RATE'
4680
+ | 'OVERSOLD_LOTS'
4681
+ | 'NO_PRICE'
4682
+ | 'MIXED_COST_CURRENCY';
4683
+
4684
+ export type HoldingPnlResponseDto = {
4685
+ asOfDate: string;
4686
+ baseCurrency: string;
4687
+ /**
4688
+ * Realized-P&L lot-matching method (FIFO or average). Unrealized cost basis remains average regardless of this value (#473).
4689
+ */
4690
+ method: 'average' | 'FIFO';
4691
+ rows: Array<HoldingPnlRowDto>;
4692
+ warnings: Array<HoldingPnlWarningDto>;
4693
+ };
4694
+
4695
+ /**
4696
+ * Realized-P&L lot-matching method (FIFO or average). Unrealized cost basis remains average regardless of this value (#473).
4697
+ */
4698
+ export type method = 'average' | 'FIFO';
4699
+
4700
+ export type CreateBeanPriceDto = {
4701
+ /**
4702
+ * Currency being priced (e.g., USD, AAPL, BTC)
4703
+ */
4704
+ currency: string;
4705
+ /**
4706
+ * Quote currency (pricing currency, e.g., CNY, EUR)
4707
+ */
4708
+ quoteCurrency: string;
4709
+ /**
4710
+ * Price amount (MUST be >= 0 per Beancount spec, supports up to 15 decimal places). Zero allowed for conversion entries, negative strictly prohibited.
4711
+ */
4712
+ amount: number;
4713
+ /**
4714
+ * Price date (ISO 8601 format)
4715
+ */
4716
+ date: string;
4717
+ /**
4718
+ * Metadata (validated by Zod schema, max field lengths enforced)
4719
+ */
4720
+ metadata?: {
4721
+ [key: string]: unknown;
4722
+ };
4723
+ };
4724
+
4725
+ export type PriceResponseDto = {
4726
+ /**
4727
+ * Unique identifier
4728
+ */
4729
+ id: string;
4730
+ /**
4731
+ * User ID (owner of the price)
4732
+ */
4733
+ userId: string;
4734
+ /**
4735
+ * Currency being priced (e.g., USD, AAPL, BTC)
4736
+ */
4737
+ currency: string;
4738
+ /**
4739
+ * Quote currency (pricing currency, e.g., USD, CNY)
4740
+ */
4741
+ quoteCurrency: string;
4742
+ /**
4743
+ * Price amount (corresponds to Beancount Amount.number). Supports up to 15 decimal places.
4744
+ */
4745
+ amount: number;
4746
+ /**
4747
+ * Price date (ISO 8601 format). Represents the date this price was valid.
4748
+ */
4749
+ date: string;
4750
+ /**
4751
+ * Metadata (corresponds to Beancount meta field). Contains source, confidence, note, etc.
4752
+ */
4753
+ meta: {
4754
+ [key: string]: unknown;
4755
+ };
4756
+ /**
4757
+ * Creation timestamp
4758
+ */
4759
+ createdAt: string;
4760
+ /**
4761
+ * Last update timestamp
4762
+ */
4763
+ updatedAt: string;
4764
+ };
4765
+
4766
+ export type PriceListResponseDto = {
4767
+ /**
4768
+ * List of prices
4769
+ */
4770
+ items: Array<PriceResponseDto>;
4771
+ /**
4772
+ * Total number of prices
4773
+ */
4774
+ total: number;
4775
+ };
4776
+
4777
+ export type UpdateBeanPriceDto = {
4778
+ /**
4779
+ * Currency being priced
4780
+ */
4781
+ currency?: string;
4782
+ /**
4783
+ * Quote currency (pricing currency)
4784
+ */
4785
+ quoteCurrency?: string;
4786
+ /**
4787
+ * Price amount (MUST be >= 0 per Beancount spec)
4788
+ */
4789
+ amount?: number;
4790
+ /**
4791
+ * Price date (ISO 8601 format)
4792
+ */
4793
+ date?: string;
4794
+ /**
4795
+ * Metadata
4796
+ */
4797
+ metadata?: {
4798
+ [key: string]: unknown;
4799
+ };
4800
+ };
4801
+
4802
+ export type CurrencyBalanceDto = {
4803
+ /**
4804
+ * ISO 4217 currency code
4805
+ */
4806
+ currency: string;
4807
+ /**
4808
+ * Balance amount
4809
+ */
4810
+ balance: string;
4811
+ };
4812
+
4813
+ export type TimeSeriesPointDto = {
4814
+ /**
4815
+ * Date in YYYY-MM-DD format
4816
+ */
4817
+ date: string;
4818
+ /**
4819
+ * Value at this date (in base currency)
4820
+ */
4821
+ value: string;
4822
+ /**
4823
+ * Change from previous point
4824
+ */
4825
+ change?: {
4826
+ [key: string]: unknown;
4827
+ };
4828
+ /**
4829
+ * Multi-currency breakdown for this point
4830
+ */
4831
+ byCurrency?: Array<CurrencyBalanceDto>;
4832
+ };
4833
+
4834
+ export type TrendSummaryDto = {
4835
+ /**
4836
+ * Value at start of period
4837
+ */
4838
+ startValue: string;
4839
+ /**
4840
+ * Value at end of period
4841
+ */
4842
+ endValue: string;
4843
+ /**
4844
+ * Total change over period
4845
+ */
4846
+ totalChange: string;
4847
+ /**
4848
+ * Total change percentage
4849
+ */
4850
+ totalChangePercentage: string;
4851
+ };
4852
+
4853
+ export type MultiCurrencyPointDto = {
4854
+ /**
4855
+ * Date in YYYY-MM-DD format
4856
+ */
4857
+ date: string;
4858
+ /**
4859
+ * Balances by currency
4860
+ */
4861
+ byCurrency: Array<CurrencyBalanceDto>;
4862
+ };
4863
+
4864
+ export type PortfolioTrendsResponseDto = {
4865
+ /**
4866
+ * Time series data points
4867
+ */
4868
+ series: Array<TimeSeriesPointDto>;
4869
+ /**
4870
+ * Period summary
4871
+ */
4872
+ summary: TrendSummaryDto;
4873
+ /**
4874
+ * Period requested
4875
+ */
4876
+ period: string;
4877
+ /**
4878
+ * Data granularity
4879
+ */
4880
+ granularity: string;
4881
+ /**
4882
+ * Base currency for converted values
4883
+ */
4884
+ currency: string;
4885
+ /**
4886
+ * Multi-currency time series (each point has currency breakdown)
4887
+ */
4888
+ byCurrency?: Array<MultiCurrencyPointDto>;
4889
+ /**
4890
+ * Exchange rate warnings
4891
+ */
4892
+ warnings?: Array<ExchangeRateWarningDto>;
4893
+ };
4894
+
4895
+ export type GenerateSnapshotBody = unknown;
4896
+
4897
+ export type GenerateSnapshotResponse = unknown;
4898
+
4899
+ export type BackfillSnapshotsBody = unknown;
4900
+
4901
+ export type BackfillSnapshotsResponse = unknown;
4902
+
4903
+ export type AnonymousLoginDto = {
4904
+ /**
4905
+ * Access token for anonymous login
4906
+ */
4907
+ accessToken: string;
4908
+ };
4909
+
4910
+ export type AccountControllerCreateData = {
4911
+ /**
4912
+ * Region code for tenant context
4913
+ */
4914
+ region: 'cn' | 'us' | 'de' | 'gb';
4915
+ requestBody: CreateAccountDto;
4916
+ };
4917
+
4918
+ export type AccountControllerCreateResponse = AccountResponseDto;
4919
+
4920
+ export type AccountControllerFindAllData = {
4921
+ /**
4922
+ * Filter by custom (user-created) accounts only
4923
+ */
4924
+ isCustom?: boolean;
4925
+ /**
4926
+ * Maximum number of results
4927
+ */
4928
+ limit?: number;
4929
+ /**
4930
+ * Number of results to skip
4931
+ */
4932
+ offset?: number;
4933
+ /**
4934
+ * Region code for tenant context
4935
+ */
4936
+ region: 'cn' | 'us' | 'de' | 'gb';
4937
+ /**
4938
+ * Search term for path or i18nKey
4939
+ */
4940
+ search?: string;
4941
+ /**
4942
+ * Filter by status
4943
+ */
4944
+ status?: 'OPEN' | 'CLOSED' | 'SUSPENDED';
4945
+ /**
4946
+ * Filter by account type
4389
4947
  */
4390
4948
  type?: 'Assets' | 'Liabilities' | 'Income' | 'Expenses' | 'Equity';
4391
4949
  };
@@ -4563,6 +5121,42 @@ export type TransactionControllerCreateBatchData = {
4563
5121
  export type TransactionControllerCreateBatchResponse =
4564
5122
  BatchTransactionResponseDto;
4565
5123
 
5124
+ export type TransactionControllerCorrectData = {
5125
+ /**
5126
+ * Original transaction ID to correct
5127
+ */
5128
+ id: string;
5129
+ /**
5130
+ * Region code for tenant context
5131
+ */
5132
+ region: 'cn' | 'us' | 'de' | 'gb';
5133
+ requestBody: CorrectTransactionDto;
5134
+ };
5135
+
5136
+ export type TransactionControllerCorrectResponse = TransactionDetailDto;
5137
+
5138
+ export type TransactionControllerSuggestTagsData = {
5139
+ /**
5140
+ * Max suggestions (1-100, default 10)
5141
+ */
5142
+ limit?: number;
5143
+ /**
5144
+ * Prefix match, case-insensitive (max 50 chars)
5145
+ */
5146
+ q?: string;
5147
+ /**
5148
+ * Region code for tenant context
5149
+ */
5150
+ region: 'cn' | 'us' | 'de' | 'gb';
5151
+ /**
5152
+ * usage (default) or name
5153
+ */
5154
+ sort?: 'usage' | 'name';
5155
+ };
5156
+
5157
+ export type TransactionControllerSuggestTagsResponse =
5158
+ TagSuggestionsResponseDto;
5159
+
4566
5160
  export type TransactionControllerGetDetailData = {
4567
5161
  /**
4568
5162
  * Transaction ID
@@ -5623,9 +6217,9 @@ export type ProviderSyncControllerSyncData = {
5623
6217
  | 'beancount-direct'
5624
6218
  | 'parsed-bill';
5625
6219
  /**
5626
- * Region code
6220
+ * Region code for tenant context
5627
6221
  */
5628
- region: unknown;
6222
+ region: 'cn' | 'us' | 'de' | 'gb';
5629
6223
  requestBody: ProviderSyncDto;
5630
6224
  };
5631
6225
 
@@ -5664,6 +6258,29 @@ export type TelemetryControllerReportTelemetryData = {
5664
6258
 
5665
6259
  export type TelemetryControllerReportTelemetryResponse = unknown;
5666
6260
 
6261
+ export type TelemetryControllerReportCoverageMissData = {
6262
+ /**
6263
+ * Region code for tenant context
6264
+ */
6265
+ region: 'cn' | 'us' | 'de' | 'gb';
6266
+ requestBody: UncoveredFormatMissDto;
6267
+ };
6268
+
6269
+ export type TelemetryControllerReportCoverageMissResponse = unknown;
6270
+
6271
+ export type TelemetryControllerGetCoverageMetricsData = {
6272
+ /**
6273
+ * Region code for tenant context
6274
+ */
6275
+ region: 'cn' | 'us' | 'de' | 'gb';
6276
+ /**
6277
+ * Top-N uncovered formats (default 10)
6278
+ */
6279
+ topN?: unknown;
6280
+ };
6281
+
6282
+ export type TelemetryControllerGetCoverageMetricsResponse = unknown;
6283
+
5667
6284
  export type NlpControllerProcessNaturalLanguageData = {
5668
6285
  /**
5669
6286
  * Region code for tenant context
@@ -5717,6 +6334,10 @@ export type DashboardControllerGetNetWorthData = {
5717
6334
  export type DashboardControllerGetNetWorthResponse = NetWorthResponseDto;
5718
6335
 
5719
6336
  export type DashboardControllerGetAccountsData = {
6337
+ /**
6338
+ * Scope to a single account (only valid with groupBy=holdingAssetClass, ADR-0105 §6)
6339
+ */
6340
+ accountId?: string;
5720
6341
  /**
5721
6342
  * Date for balance calculation (ISO 8601 format)
5722
6343
  */
@@ -5724,7 +6345,11 @@ export type DashboardControllerGetAccountsData = {
5724
6345
  /**
5725
6346
  * Grouping strategy
5726
6347
  */
5727
- groupBy?: 'platform' | 'assetClass';
6348
+ groupBy?:
6349
+ | 'platform'
6350
+ | 'assetClass'
6351
+ | 'holdingAssetClass'
6352
+ | 'holdingAssetClassByAccount';
5728
6353
  /**
5729
6354
  * Region code for tenant context
5730
6355
  */
@@ -5733,7 +6358,8 @@ export type DashboardControllerGetAccountsData = {
5733
6358
 
5734
6359
  export type DashboardControllerGetAccountsResponse =
5735
6360
  | AccountsResponseDto
5736
- | AssetClassAccountsResponseDto;
6361
+ | AssetClassAccountsResponseDto
6362
+ | HoldingAssetClassCrossAccountResponseDto;
5737
6363
 
5738
6364
  export type DashboardControllerGetCashFlowData = {
5739
6365
  /**
@@ -5748,6 +6374,124 @@ export type DashboardControllerGetCashFlowData = {
5748
6374
 
5749
6375
  export type DashboardControllerGetCashFlowResponse = CashFlowResponseDto;
5750
6376
 
6377
+ export type HoldingPnlControllerGetHoldingPnlData = {
6378
+ /**
6379
+ * Scope to a single account
6380
+ */
6381
+ accountId?: string;
6382
+ /**
6383
+ * As-of date (ISO 8601), defaults to today
6384
+ */
6385
+ asOf?: string;
6386
+ /**
6387
+ * Realized-P&L lot-matching method (default average). Does not affect the average-cost unrealized basis.
6388
+ */
6389
+ method?: 'FIFO' | 'average';
6390
+ /**
6391
+ * Region code for tenant context
6392
+ */
6393
+ region: 'cn' | 'us' | 'de' | 'gb';
6394
+ };
6395
+
6396
+ export type HoldingPnlControllerGetHoldingPnlResponse = HoldingPnlResponseDto;
6397
+
6398
+ export type PriceControllerCreateData = {
6399
+ /**
6400
+ * Region code for tenant context
6401
+ */
6402
+ region: 'cn' | 'us' | 'de' | 'gb';
6403
+ requestBody: CreateBeanPriceDto;
6404
+ };
6405
+
6406
+ export type PriceControllerCreateResponse = PriceResponseDto;
6407
+
6408
+ export type PriceControllerFindAllData = {
6409
+ /**
6410
+ * Filter by currency (e.g., BTC, AAPL, USD)
6411
+ */
6412
+ currency?: string;
6413
+ /**
6414
+ * Filter prices from this date (ISO 8601 format)
6415
+ */
6416
+ dateFrom?: string;
6417
+ /**
6418
+ * Filter prices to this date (ISO 8601 format)
6419
+ */
6420
+ dateTo?: string;
6421
+ /**
6422
+ * Number of items per page (default: 20, max: 100)
6423
+ */
6424
+ limit?: number;
6425
+ /**
6426
+ * Page number for pagination (default: 1)
6427
+ */
6428
+ page?: number;
6429
+ /**
6430
+ * Filter by quote currency (pricing currency, e.g., USD, CNY)
6431
+ */
6432
+ quoteCurrency?: string;
6433
+ /**
6434
+ * Region code for tenant context
6435
+ */
6436
+ region: 'cn' | 'us' | 'de' | 'gb';
6437
+ /**
6438
+ * Search term for currency or quoteCurrency (case-insensitive partial match)
6439
+ */
6440
+ search?: string;
6441
+ };
6442
+
6443
+ export type PriceControllerFindAllResponse = PriceListResponseDto;
6444
+
6445
+ export type PriceControllerFindOneData = {
6446
+ /**
6447
+ * Price ID
6448
+ */
6449
+ id: string;
6450
+ /**
6451
+ * Region code for tenant context
6452
+ */
6453
+ region: 'cn' | 'us' | 'de' | 'gb';
6454
+ };
6455
+
6456
+ export type PriceControllerFindOneResponse = PriceResponseDto;
6457
+
6458
+ export type PriceControllerUpdateData = {
6459
+ /**
6460
+ * Price ID
6461
+ */
6462
+ id: string;
6463
+ /**
6464
+ * Region code for tenant context
6465
+ */
6466
+ region: 'cn' | 'us' | 'de' | 'gb';
6467
+ requestBody: UpdateBeanPriceDto;
6468
+ };
6469
+
6470
+ export type PriceControllerUpdateResponse = PriceResponseDto;
6471
+
6472
+ export type PriceControllerDeleteData = {
6473
+ /**
6474
+ * Price ID
6475
+ */
6476
+ id: string;
6477
+ /**
6478
+ * Region code for tenant context
6479
+ */
6480
+ region: 'cn' | 'us' | 'de' | 'gb';
6481
+ };
6482
+
6483
+ export type PriceControllerDeleteResponse = void;
6484
+
6485
+ export type PriceControllerBulkCreateData = {
6486
+ /**
6487
+ * Region code for tenant context
6488
+ */
6489
+ region: 'cn' | 'us' | 'de' | 'gb';
6490
+ requestBody: Array<string>;
6491
+ };
6492
+
6493
+ export type PriceControllerBulkCreateResponse = Array<PriceResponseDto>;
6494
+
5751
6495
  export type ReportingControllerGetPortfolioTrendsData = {
5752
6496
  /**
5753
6497
  * Data granularity
@@ -6041,6 +6785,48 @@ export type $OpenApiTs = {
6041
6785
  };
6042
6786
  };
6043
6787
  };
6788
+ '/api/v1/{region}/bean/transactions/{id}/correct': {
6789
+ post: {
6790
+ req: TransactionControllerCorrectData;
6791
+ res: {
6792
+ /**
6793
+ * Corrected transaction created
6794
+ */
6795
+ 201: TransactionDetailDto;
6796
+ /**
6797
+ * Original transaction not found
6798
+ */
6799
+ 404: ApiProblemResponseDto;
6800
+ /**
6801
+ * Original no longer ACTIVE (concurrent modification)
6802
+ */
6803
+ 409: ApiProblemResponseDto;
6804
+ /**
6805
+ * Pipeline validation failed (does not balance, invalid accounts)
6806
+ */
6807
+ 422: ApiProblemResponseDto;
6808
+ };
6809
+ };
6810
+ };
6811
+ '/api/v1/{region}/bean/transactions/tags': {
6812
+ get: {
6813
+ req: TransactionControllerSuggestTagsData;
6814
+ res: {
6815
+ /**
6816
+ * Tag suggestions
6817
+ */
6818
+ 200: TagSuggestionsResponseDto;
6819
+ /**
6820
+ * Validation failed
6821
+ */
6822
+ 400: ApiProblemResponseDto;
6823
+ /**
6824
+ * Authentication required
6825
+ */
6826
+ 401: ApiProblemResponseDto;
6827
+ };
6828
+ };
6829
+ };
6044
6830
  '/api/v1/{region}/bean/transactions/{id}': {
6045
6831
  get: {
6046
6832
  req: TransactionControllerGetDetailData;
@@ -7445,6 +8231,32 @@ export type $OpenApiTs = {
7445
8231
  };
7446
8232
  };
7447
8233
  };
8234
+ '/api/v1/{region}/bean/import/parser-coverage-miss': {
8235
+ post: {
8236
+ req: TelemetryControllerReportCoverageMissData;
8237
+ res: {
8238
+ /**
8239
+ * Coverage miss report received
8240
+ */
8241
+ 200: unknown;
8242
+ /**
8243
+ * Unauthorized
8244
+ */
8245
+ 401: unknown;
8246
+ };
8247
+ };
8248
+ };
8249
+ '/api/v1/{region}/bean/import/parser-coverage-metrics': {
8250
+ get: {
8251
+ req: TelemetryControllerGetCoverageMetricsData;
8252
+ res: {
8253
+ /**
8254
+ * Coverage metrics
8255
+ */
8256
+ 200: unknown;
8257
+ };
8258
+ };
8259
+ };
7448
8260
  '/api/v1/{region}/bean/nlp/process': {
7449
8261
  post: {
7450
8262
  req: NlpControllerProcessNaturalLanguageData;
@@ -7514,7 +8326,10 @@ export type $OpenApiTs = {
7514
8326
  /**
7515
8327
  * Accounts retrieved successfully. Response type depends on groupBy parameter.
7516
8328
  */
7517
- 200: AccountsResponseDto | AssetClassAccountsResponseDto;
8329
+ 200:
8330
+ | AccountsResponseDto
8331
+ | AssetClassAccountsResponseDto
8332
+ | HoldingAssetClassCrossAccountResponseDto;
7518
8333
  /**
7519
8334
  * User not authenticated
7520
8335
  */
@@ -7541,6 +8356,109 @@ export type $OpenApiTs = {
7541
8356
  };
7542
8357
  };
7543
8358
  };
8359
+ '/api/v1/{region}/investment/holdings/pnl': {
8360
+ get: {
8361
+ req: HoldingPnlControllerGetHoldingPnlData;
8362
+ res: {
8363
+ /**
8364
+ * Holding P&L retrieved successfully
8365
+ */
8366
+ 200: HoldingPnlResponseDto;
8367
+ /**
8368
+ * Invalid asOf format/value/future date, invalid accountId format, or unsupported method
8369
+ */
8370
+ 400: unknown;
8371
+ /**
8372
+ * User not authenticated
8373
+ */
8374
+ 401: unknown;
8375
+ };
8376
+ };
8377
+ };
8378
+ '/api/v1/{region}/bean/prices': {
8379
+ post: {
8380
+ req: PriceControllerCreateData;
8381
+ res: {
8382
+ /**
8383
+ * Price created successfully
8384
+ */
8385
+ 201: PriceResponseDto;
8386
+ /**
8387
+ * Currency or quoteCurrency commodity not found
8388
+ */
8389
+ 404: unknown;
8390
+ /**
8391
+ * Price already exists for this currency pair and date
8392
+ */
8393
+ 409: unknown;
8394
+ };
8395
+ };
8396
+ get: {
8397
+ req: PriceControllerFindAllData;
8398
+ res: {
8399
+ /**
8400
+ * Prices retrieved successfully
8401
+ */
8402
+ 200: PriceListResponseDto;
8403
+ };
8404
+ };
8405
+ };
8406
+ '/api/v1/{region}/bean/prices/{id}': {
8407
+ get: {
8408
+ req: PriceControllerFindOneData;
8409
+ res: {
8410
+ /**
8411
+ * Price retrieved successfully
8412
+ */
8413
+ 200: PriceResponseDto;
8414
+ /**
8415
+ * Price not found
8416
+ */
8417
+ 404: unknown;
8418
+ };
8419
+ };
8420
+ put: {
8421
+ req: PriceControllerUpdateData;
8422
+ res: {
8423
+ /**
8424
+ * Price updated successfully
8425
+ */
8426
+ 200: PriceResponseDto;
8427
+ /**
8428
+ * Price not found
8429
+ */
8430
+ 404: unknown;
8431
+ /**
8432
+ * Updated price conflicts with existing price
8433
+ */
8434
+ 409: unknown;
8435
+ };
8436
+ };
8437
+ delete: {
8438
+ req: PriceControllerDeleteData;
8439
+ res: {
8440
+ /**
8441
+ * Price deleted successfully
8442
+ */
8443
+ 204: void;
8444
+ /**
8445
+ * Price not found
8446
+ */
8447
+ 404: unknown;
8448
+ };
8449
+ };
8450
+ };
8451
+ '/api/v1/{region}/bean/prices/bulk': {
8452
+ post: {
8453
+ req: PriceControllerBulkCreateData;
8454
+ res: {
8455
+ /**
8456
+ * Prices created successfully
8457
+ */
8458
+ 201: Array<PriceResponseDto>;
8459
+ };
8460
+ };
8461
+ };
7544
8462
  '/api/v1/{region}/reporting/portfolio/trends': {
7545
8463
  get: {
7546
8464
  req: ReportingControllerGetPortfolioTrendsData;