@firela/api-types 0.0.0-canary.14a6ef5a → 0.0.0-canary.19fa1e7e

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 = {
@@ -387,6 +442,25 @@ export type CreateTransactionDto = {
387
442
  */
388
443
  export type flag = '*' | '!';
389
444
 
445
+ export type CostDetailDto = {
446
+ /**
447
+ * Per-unit cost basis (mirrors engine Cost.number)
448
+ */
449
+ number?: string;
450
+ /**
451
+ * Cost currency
452
+ */
453
+ currency?: string;
454
+ /**
455
+ * Lot acquisition date (ISO yyyy-mm-dd)
456
+ */
457
+ date?: string;
458
+ /**
459
+ * Lot label
460
+ */
461
+ label?: string;
462
+ };
463
+
390
464
  export type PostingResponseDto = {
391
465
  /**
392
466
  * Account name
@@ -400,6 +474,10 @@ export type PostingResponseDto = {
400
474
  * Currency
401
475
  */
402
476
  currency?: string;
477
+ /**
478
+ * Booking-resolved cost (mirrors engine Cost). Undefined when the posting has no cost basis.
479
+ */
480
+ cost?: CostDetailDto;
403
481
  };
404
482
 
405
483
  export type RecurringSuggestionDto = {
@@ -561,6 +639,55 @@ export type BatchTransactionResponseDto = {
561
639
  failed: Array<BatchTransactionErrorDto>;
562
640
  };
563
641
 
642
+ export type CorrectTransactionDto = {
643
+ /**
644
+ * Transaction date (ISO 8601 format)
645
+ */
646
+ date: string;
647
+ /**
648
+ * Transaction flag: * (cleared), ! (pending)
649
+ */
650
+ flag?: '*' | '!';
651
+ /**
652
+ * Payee name
653
+ */
654
+ payee?: string;
655
+ /**
656
+ * Transaction narration/description
657
+ */
658
+ narration: string;
659
+ /**
660
+ * Transaction tags (without # prefix)
661
+ */
662
+ tags?: Array<string>;
663
+ /**
664
+ * Transaction links (without ^ prefix)
665
+ */
666
+ links?: Array<string>;
667
+ /**
668
+ * Transaction postings (minimum 1, typically 2 for double-entry)
669
+ */
670
+ postings: Array<CreatePostingDto>;
671
+ /**
672
+ * Transaction-level metadata
673
+ */
674
+ meta?: {
675
+ [key: string]: unknown;
676
+ };
677
+ /**
678
+ * Unique key for idempotent transaction creation. If provided, duplicate requests with the same key will return the existing transaction.
679
+ */
680
+ idempotencyKey?: string;
681
+ /**
682
+ * 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.
683
+ */
684
+ autoCreateAccounts?: boolean;
685
+ /**
686
+ * Reason for correcting/superseding the original transaction
687
+ */
688
+ correctionReason?: string;
689
+ };
690
+
564
691
  export type PostingDetailDto = {
565
692
  /**
566
693
  * Posting ID
@@ -571,9 +698,9 @@ export type PostingDetailDto = {
571
698
  */
572
699
  accountId: string;
573
700
  /**
574
- * Account name
701
+ * Fully-qualified Beancount account path
575
702
  */
576
- accountName: string;
703
+ account: string;
577
704
  /**
578
705
  * Amount as decimal string. Typed optional but always present in responses: interpolation fills any MISSING posting before it is persisted or returned.
579
706
  */
@@ -594,6 +721,10 @@ export type PostingDetailDto = {
594
721
  * Cost date
595
722
  */
596
723
  costDate?: string;
724
+ /**
725
+ * Booking-resolved cost (mirrors engine Cost). Undefined when the posting has no cost basis.
726
+ */
727
+ cost?: CostDetailDto;
597
728
  /**
598
729
  * Price amount
599
730
  */
@@ -691,6 +822,14 @@ export type TransactionDetailDto = {
691
822
  * Correction reason (if voided or superseded)
692
823
  */
693
824
  correctionReason?: string;
825
+ /**
826
+ * ID of the transaction that supersedes this one (set when status=SUPERSEDED)
827
+ */
828
+ supersededBy?: string;
829
+ /**
830
+ * ID of the transaction this one corrected/replaced (back-link on the replacement)
831
+ */
832
+ originalTxn?: string;
694
833
  };
695
834
 
696
835
  /**
@@ -1185,17 +1324,17 @@ export type ResolveResultDto = {
1185
1324
  [key: string]: string;
1186
1325
  };
1187
1326
  /**
1188
- * Resolution ID for undo
1327
+ * Resolution ID for undo. Absent when the resolver rejected the decision (review stayed PENDING).
1189
1328
  */
1190
- resolutionId: string;
1329
+ resolutionId?: string;
1191
1330
  /**
1192
1331
  * Whether this decision can be undone
1193
1332
  */
1194
- canUndo: boolean;
1333
+ canUndo?: boolean;
1195
1334
  /**
1196
1335
  * Deadline for undo (24h from resolution)
1197
1336
  */
1198
- undoDeadline: string;
1337
+ undoDeadline?: string;
1199
1338
  /**
1200
1339
  * Rule ID if learning was triggered (ACCEPT_AND_LEARN actions). Use this to deep-link to the rule management page.
1201
1340
  */
@@ -2890,6 +3029,96 @@ export type UpdatePropertyDto = {
2890
3029
  value: string;
2891
3030
  };
2892
3031
 
3032
+ export type CreateBeanEventDto = {
3033
+ /**
3034
+ * Life event date (ISO 8601)
3035
+ */
3036
+ date: string;
3037
+ /**
3038
+ * Life event type (e.g., "employer", "location", "marital-status") — user-defined, no enum constraint at engine layer
3039
+ */
3040
+ type: string;
3041
+ /**
3042
+ * Life event description. Empty string is a VALID value (distinct from absence).
3043
+ */
3044
+ description: string;
3045
+ /**
3046
+ * Product-side metadata (lives in BeanEvent.meta JSON, never in engine Event fields)
3047
+ */
3048
+ meta?: {
3049
+ [key: string]: unknown;
3050
+ };
3051
+ };
3052
+
3053
+ export type EventResponseDto = {
3054
+ /**
3055
+ * Unique identifier
3056
+ */
3057
+ id: string;
3058
+ /**
3059
+ * User ID (owner of the life event)
3060
+ */
3061
+ userId: string;
3062
+ /**
3063
+ * Life event date (ISO 8601 format)
3064
+ */
3065
+ date: string;
3066
+ /**
3067
+ * Life event type (user-defined, e.g., "employer", "location")
3068
+ */
3069
+ type: string;
3070
+ /**
3071
+ * Life event description. May be an empty string (a valid value distinct from absence).
3072
+ */
3073
+ description: string;
3074
+ /**
3075
+ * Product-side metadata (free-form JSON)
3076
+ */
3077
+ meta: {
3078
+ [key: string]: unknown;
3079
+ };
3080
+ /**
3081
+ * Creation timestamp
3082
+ */
3083
+ createdAt: string;
3084
+ /**
3085
+ * Last update timestamp. Also emitted as the ETag response header for If-Match optimistic concurrency.
3086
+ */
3087
+ updatedAt: string;
3088
+ };
3089
+
3090
+ export type EventListResponseDto = {
3091
+ /**
3092
+ * List of life events
3093
+ */
3094
+ items: Array<EventResponseDto>;
3095
+ /**
3096
+ * Total number of life events matching the query
3097
+ */
3098
+ total: number;
3099
+ };
3100
+
3101
+ export type UpdateBeanEventDto = {
3102
+ /**
3103
+ * Life event date (ISO 8601)
3104
+ */
3105
+ date?: string;
3106
+ /**
3107
+ * Life event type (user-defined)
3108
+ */
3109
+ type?: string;
3110
+ /**
3111
+ * Life event description. Empty string is a VALID value (distinct from absence).
3112
+ */
3113
+ description?: string;
3114
+ /**
3115
+ * Product-side metadata (free-form JSON)
3116
+ */
3117
+ meta?: {
3118
+ [key: string]: unknown;
3119
+ };
3120
+ };
3121
+
2893
3122
  export type FileImportDto = {
2894
3123
  /**
2895
3124
  * Bill file to import (CSV, PDF, OFX, etc.)
@@ -3354,6 +3583,8 @@ export type SupportedProvidersResponseDto = {
3354
3583
 
3355
3584
  export type ParserTelemetryReportDto = unknown;
3356
3585
 
3586
+ export type UncoveredFormatMissDto = unknown;
3587
+
3357
3588
  export type ProcessNlpDto = {
3358
3589
  /**
3359
3590
  * Natural language text describing a transaction (Chinese)
@@ -4139,8 +4370,21 @@ export type AccountItemWithAssetClassDto = {
4139
4370
  * Risk level
4140
4371
  */
4141
4372
  riskLevel?: string;
4373
+ /**
4374
+ * ADR-0105 classification provenance (holding level always; account level only on FALLBACK)
4375
+ */
4376
+ source?: 'USER_META' | 'FIAT_CURRENCY' | 'OPENBB_MAPPING' | 'FALLBACK';
4142
4377
  };
4143
4378
 
4379
+ /**
4380
+ * ADR-0105 classification provenance (holding level always; account level only on FALLBACK)
4381
+ */
4382
+ export type source2 =
4383
+ | 'USER_META'
4384
+ | 'FIAT_CURRENCY'
4385
+ | 'OPENBB_MAPPING'
4386
+ | 'FALLBACK';
4387
+
4144
4388
  export type AssetClassGroupDto = {
4145
4389
  /**
4146
4390
  * Asset class name
@@ -4227,6 +4471,12 @@ export type AssetClassSummaryDto = {
4227
4471
  * Exchange rate warnings
4228
4472
  */
4229
4473
  warnings?: Array<AccountExchangeRateWarningDto>;
4474
+ /**
4475
+ * 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.
4476
+ */
4477
+ fallback?: {
4478
+ [key: string]: unknown;
4479
+ };
4230
4480
  };
4231
4481
 
4232
4482
  export type AssetClassAccountsResponseDto = {
@@ -4238,6 +4488,56 @@ export type AssetClassAccountsResponseDto = {
4238
4488
  * Summary statistics
4239
4489
  */
4240
4490
  summary: AssetClassSummaryDto;
4491
+ /**
4492
+ * ADR-0105 §6 holding-level grey-area bucket (source=FALLBACK holdings peeled out of groups). Present only for groupBy=holdingAssetClass when FALLBACK holdings exist.
4493
+ */
4494
+ uncategorized?: AssetClassGroupDto;
4495
+ };
4496
+
4497
+ export type HoldingAssetClassAccountSliceDto = {
4498
+ /**
4499
+ * Account ID
4500
+ */
4501
+ accountId: string;
4502
+ /**
4503
+ * Full account path
4504
+ */
4505
+ accountPath: string;
4506
+ /**
4507
+ * Currency of the holding with the largest converted base value; undefined when no holding is convertible
4508
+ */
4509
+ accountCurrency?: string;
4510
+ /**
4511
+ * Account's market value in base currency (Σ converted holdings; grey bucket included)
4512
+ */
4513
+ marketValueBase: string;
4514
+ /**
4515
+ * Share of the global total (0-100). 0 when globalTotal is zero (no NaN/Infinity).
4516
+ */
4517
+ shareOfTotalPct: number;
4518
+ /**
4519
+ * Per-account asset-class breakdown
4520
+ */
4521
+ groups: Array<AssetClassGroupDto>;
4522
+ /**
4523
+ * Per-account grey bucket (source=FALLBACK holdings, incl. broker cash)
4524
+ */
4525
+ uncategorized?: AssetClassGroupDto;
4526
+ /**
4527
+ * Every holding row for this account (account ID in each row’s `id` field)
4528
+ */
4529
+ holdings: Array<AccountItemWithAssetClassDto>;
4530
+ };
4531
+
4532
+ export type HoldingAssetClassCrossAccountResponseDto = {
4533
+ /**
4534
+ * Merged cross-account holding aggregation
4535
+ */
4536
+ global: AssetClassAccountsResponseDto;
4537
+ /**
4538
+ * Per-account slices
4539
+ */
4540
+ byAccount: Array<HoldingAssetClassAccountSliceDto>;
4241
4541
  };
4242
4542
 
4243
4543
  export type CashFlowByCurrencyDto = {
@@ -4319,66 +4619,428 @@ export type CashFlowResponseDto = {
4319
4619
  warnings?: Array<ExchangeRateWarningDto>;
4320
4620
  };
4321
4621
 
4322
- export type CurrencyBalanceDto = {
4622
+ export type CategoryGroupDto = {
4323
4623
  /**
4324
- * ISO 4217 currency code
4624
+ * Functional category (account-path Group segment); regional and universal account paths merge under it
4325
4625
  */
4326
- currency: string;
4626
+ category: string;
4327
4627
  /**
4328
- * Balance amount
4628
+ * Converted total expense in base currency
4329
4629
  */
4330
- balance: string;
4331
- };
4332
-
4333
- export type TimeSeriesPointDto = {
4630
+ totalExpense: string;
4334
4631
  /**
4335
- * Date in YYYY-MM-DD format
4632
+ * Share of grand total (0-100); 0 when grand total is 0
4336
4633
  */
4337
- date: string;
4634
+ sharePct: number;
4338
4635
  /**
4339
- * Value at this date (in base currency)
4636
+ * Raw (unconverted) expense per currency
4340
4637
  */
4341
- value: string;
4638
+ balanceByCurrency: Array<BalanceByCurrencyDto>;
4342
4639
  /**
4343
- * Change from previous point
4640
+ * Converted total in base currency (omitted when FX missing for all currencies in this category)
4344
4641
  */
4345
- change?: {
4346
- [key: string]: unknown;
4347
- };
4642
+ convertedBalance?: string;
4643
+ };
4644
+
4645
+ export type ExpensesByCategorySummaryDto = {
4348
4646
  /**
4349
- * Multi-currency breakdown for this point
4647
+ * Total expense across all categories (converted; convertible categories only)
4350
4648
  */
4351
- byCurrency?: Array<CurrencyBalanceDto>;
4649
+ totalExpense: string;
4650
+ /**
4651
+ * Number of categories
4652
+ */
4653
+ categoryCount: number;
4352
4654
  };
4353
4655
 
4354
- export type TrendSummaryDto = {
4656
+ export type ExpensesByCategoryResponseDto = {
4355
4657
  /**
4356
- * Value at start of period
4658
+ * Period requested
4357
4659
  */
4358
- startValue: string;
4660
+ period: string;
4359
4661
  /**
4360
- * Value at end of period
4662
+ * Base currency for converted values
4361
4663
  */
4362
- endValue: string;
4664
+ baseCurrency: string;
4363
4665
  /**
4364
- * Total change over period
4666
+ * Expense groups by functional category, sorted by converted total desc
4365
4667
  */
4366
- totalChange: string;
4668
+ groups: Array<CategoryGroupDto>;
4367
4669
  /**
4368
- * Total change percentage
4670
+ * Summary statistics
4369
4671
  */
4370
- totalChangePercentage: string;
4672
+ summary: ExpensesByCategorySummaryDto;
4673
+ /**
4674
+ * Exchange rate warnings (e.g. missing rate for a currency)
4675
+ */
4676
+ warnings?: Array<ExchangeRateWarningDto>;
4371
4677
  };
4372
4678
 
4373
- export type MultiCurrencyPointDto = {
4679
+ export type MonetaryDto = {
4374
4680
  /**
4375
- * Date in YYYY-MM-DD format
4681
+ * Amount (Decimal string)
4376
4682
  */
4377
- date: string;
4683
+ amount: string;
4378
4684
  /**
4379
- * Balances by currency
4685
+ * ISO 4217 currency
4380
4686
  */
4381
- byCurrency: Array<CurrencyBalanceDto>;
4687
+ currency: string;
4688
+ /**
4689
+ * Converted to user base currency (Decimal string)
4690
+ */
4691
+ baseCcyEquivalent?: {
4692
+ [key: string]: unknown;
4693
+ } | null;
4694
+ };
4695
+
4696
+ export type CurrentPriceDto = {
4697
+ /**
4698
+ * Price amount (Decimal string)
4699
+ */
4700
+ amount: string;
4701
+ /**
4702
+ * Price currency (ISO 4217)
4703
+ */
4704
+ currency: string;
4705
+ /**
4706
+ * Price date (ISO 8601)
4707
+ */
4708
+ date: string;
4709
+ /**
4710
+ * Price source
4711
+ */
4712
+ source: 'USER_OVERRIDE' | 'OPENBB_EQUITY' | 'OPENBB_CURRENCY';
4713
+ };
4714
+
4715
+ /**
4716
+ * Price source
4717
+ */
4718
+ export type source3 = 'USER_OVERRIDE' | 'OPENBB_EQUITY' | 'OPENBB_CURRENCY';
4719
+
4720
+ export type FxRateDto = {
4721
+ from: string;
4722
+ to: string;
4723
+ /**
4724
+ * FX rate (Decimal string)
4725
+ */
4726
+ rate: string;
4727
+ /**
4728
+ * Rate date (ISO 8601)
4729
+ */
4730
+ date: string;
4731
+ };
4732
+
4733
+ export type HoldingPnlRowDto = {
4734
+ /**
4735
+ * Account UUID
4736
+ */
4737
+ accountId: string;
4738
+ /**
4739
+ * Full account path
4740
+ */
4741
+ accountPath: string;
4742
+ /**
4743
+ * Account settlement currency (ISO 4217), from cost currency
4744
+ */
4745
+ accountCcy?: {
4746
+ [key: string]: unknown;
4747
+ } | null;
4748
+ /**
4749
+ * Broker type derived from Platform.type
4750
+ */
4751
+ brokerType?: {
4752
+ [key: string]: unknown;
4753
+ } | null;
4754
+ /**
4755
+ * Commodity symbol
4756
+ */
4757
+ symbol: string;
4758
+ /**
4759
+ * Chart segment token (libs/common resolver)
4760
+ */
4761
+ chartToken: 'equity' | 'fund' | 'bond' | 'cash' | 'other';
4762
+ assetClass: string;
4763
+ assetSubClass?: {
4764
+ [key: string]: unknown;
4765
+ } | null;
4766
+ /**
4767
+ * Net held units (Decimal string)
4768
+ */
4769
+ units: string;
4770
+ /**
4771
+ * Average cost per unit; null when cost currency conflicts or no cost
4772
+ */
4773
+ averageCostPerUnit?: MonetaryDto | null;
4774
+ /**
4775
+ * Cost basis of held units
4776
+ */
4777
+ costBasis?: MonetaryDto | null;
4778
+ /**
4779
+ * Market value at asOf price
4780
+ */
4781
+ marketValue?: MonetaryDto | null;
4782
+ /**
4783
+ * Price used for market value
4784
+ */
4785
+ currentPrice?: CurrentPriceDto | null;
4786
+ /**
4787
+ * Unrealized P&L in base currency (Decimal string); null when any FX/price missing
4788
+ */
4789
+ unrealizedPnlBase?: {
4790
+ [key: string]: unknown;
4791
+ } | null;
4792
+ /**
4793
+ * Unrealized P&L % (Decimal string)
4794
+ */
4795
+ unrealizedPnlPct?: {
4796
+ [key: string]: unknown;
4797
+ } | null;
4798
+ /**
4799
+ * Historical FX rate applied to cost basis
4800
+ */
4801
+ costFxRate?: FxRateDto | null;
4802
+ /**
4803
+ * FX rate applied to market value
4804
+ */
4805
+ marketFxRate?: FxRateDto | null;
4806
+ /**
4807
+ * Share of invested assets % (Decimal string); only for invested chartTokens
4808
+ */
4809
+ pctOfInvestedAssets?: {
4810
+ [key: string]: unknown;
4811
+ } | null;
4812
+ /**
4813
+ * 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
4814
+ */
4815
+ realizedPnl?: MonetaryDto | null;
4816
+ };
4817
+
4818
+ /**
4819
+ * Chart segment token (libs/common resolver)
4820
+ */
4821
+ export type chartToken = 'equity' | 'fund' | 'bond' | 'cash' | 'other';
4822
+
4823
+ export type HoldingPnlWarningDto = {
4824
+ /**
4825
+ * Warning type
4826
+ */
4827
+ type:
4828
+ | 'MISSING_COST_FX_RATE'
4829
+ | 'MISSING_MARKET_FX_RATE'
4830
+ | 'MISSING_SALE_PRICE'
4831
+ | 'MISSING_REALIZED_FX_RATE'
4832
+ | 'OVERSOLD_LOTS'
4833
+ | 'NO_PRICE'
4834
+ | 'MIXED_COST_CURRENCY';
4835
+ symbol?: {
4836
+ [key: string]: unknown;
4837
+ } | null;
4838
+ accountId?: {
4839
+ [key: string]: unknown;
4840
+ } | null;
4841
+ currency?: {
4842
+ [key: string]: unknown;
4843
+ } | null;
4844
+ };
4845
+
4846
+ /**
4847
+ * Warning type
4848
+ */
4849
+ export type type4 =
4850
+ | 'MISSING_COST_FX_RATE'
4851
+ | 'MISSING_MARKET_FX_RATE'
4852
+ | 'MISSING_SALE_PRICE'
4853
+ | 'MISSING_REALIZED_FX_RATE'
4854
+ | 'OVERSOLD_LOTS'
4855
+ | 'NO_PRICE'
4856
+ | 'MIXED_COST_CURRENCY';
4857
+
4858
+ export type HoldingPnlResponseDto = {
4859
+ asOfDate: string;
4860
+ baseCurrency: string;
4861
+ /**
4862
+ * Realized-P&L lot-matching method (FIFO or average). Unrealized cost basis remains average regardless of this value (#473).
4863
+ */
4864
+ method: 'average' | 'FIFO';
4865
+ rows: Array<HoldingPnlRowDto>;
4866
+ warnings: Array<HoldingPnlWarningDto>;
4867
+ };
4868
+
4869
+ /**
4870
+ * Realized-P&L lot-matching method (FIFO or average). Unrealized cost basis remains average regardless of this value (#473).
4871
+ */
4872
+ export type method = 'average' | 'FIFO';
4873
+
4874
+ export type CreateBeanPriceDto = {
4875
+ /**
4876
+ * Currency being priced (e.g., USD, AAPL, BTC)
4877
+ */
4878
+ currency: string;
4879
+ /**
4880
+ * Quote currency (pricing currency, e.g., CNY, EUR)
4881
+ */
4882
+ quoteCurrency: string;
4883
+ /**
4884
+ * Price amount (MUST be >= 0 per Beancount spec, supports up to 15 decimal places). Zero allowed for conversion entries, negative strictly prohibited.
4885
+ */
4886
+ amount: number;
4887
+ /**
4888
+ * Price date (ISO 8601 format)
4889
+ */
4890
+ date: string;
4891
+ /**
4892
+ * Metadata (validated by Zod schema, max field lengths enforced)
4893
+ */
4894
+ metadata?: {
4895
+ [key: string]: unknown;
4896
+ };
4897
+ };
4898
+
4899
+ export type PriceResponseDto = {
4900
+ /**
4901
+ * Unique identifier
4902
+ */
4903
+ id: string;
4904
+ /**
4905
+ * User ID (owner of the price)
4906
+ */
4907
+ userId: string;
4908
+ /**
4909
+ * Currency being priced (e.g., USD, AAPL, BTC)
4910
+ */
4911
+ currency: string;
4912
+ /**
4913
+ * Quote currency (pricing currency, e.g., USD, CNY)
4914
+ */
4915
+ quoteCurrency: string;
4916
+ /**
4917
+ * Price amount (corresponds to Beancount Amount.number). Supports up to 15 decimal places.
4918
+ */
4919
+ amount: number;
4920
+ /**
4921
+ * Price date (ISO 8601 format). Represents the date this price was valid.
4922
+ */
4923
+ date: string;
4924
+ /**
4925
+ * Metadata (corresponds to Beancount meta field). Contains source, confidence, note, etc.
4926
+ */
4927
+ meta: {
4928
+ [key: string]: unknown;
4929
+ };
4930
+ /**
4931
+ * Creation timestamp
4932
+ */
4933
+ createdAt: string;
4934
+ /**
4935
+ * Last update timestamp
4936
+ */
4937
+ updatedAt: string;
4938
+ };
4939
+
4940
+ export type PriceListResponseDto = {
4941
+ /**
4942
+ * List of prices
4943
+ */
4944
+ items: Array<PriceResponseDto>;
4945
+ /**
4946
+ * Total number of prices
4947
+ */
4948
+ total: number;
4949
+ };
4950
+
4951
+ export type UpdateBeanPriceDto = {
4952
+ /**
4953
+ * Currency being priced
4954
+ */
4955
+ currency?: string;
4956
+ /**
4957
+ * Quote currency (pricing currency)
4958
+ */
4959
+ quoteCurrency?: string;
4960
+ /**
4961
+ * Price amount (MUST be >= 0 per Beancount spec)
4962
+ */
4963
+ amount?: number;
4964
+ /**
4965
+ * Price date (ISO 8601 format)
4966
+ */
4967
+ date?: string;
4968
+ /**
4969
+ * Metadata
4970
+ */
4971
+ metadata?: {
4972
+ [key: string]: unknown;
4973
+ };
4974
+ };
4975
+
4976
+ export type CurrencyBalanceDto = {
4977
+ /**
4978
+ * ISO 4217 currency code
4979
+ */
4980
+ currency: string;
4981
+ /**
4982
+ * Balance amount
4983
+ */
4984
+ balance: string;
4985
+ };
4986
+
4987
+ export type TimeSeriesPointDto = {
4988
+ /**
4989
+ * Date in YYYY-MM-DD format
4990
+ */
4991
+ date: string;
4992
+ /**
4993
+ * Value at this date (in base currency)
4994
+ */
4995
+ value: string;
4996
+ /**
4997
+ * Change from previous point
4998
+ */
4999
+ change?: {
5000
+ [key: string]: unknown;
5001
+ };
5002
+ /**
5003
+ * Total assets at this date (in base currency)
5004
+ */
5005
+ assets?: string;
5006
+ /**
5007
+ * Total liabilities at this date (in base currency)
5008
+ */
5009
+ liabilities?: string;
5010
+ /**
5011
+ * Multi-currency breakdown for this point
5012
+ */
5013
+ byCurrency?: Array<CurrencyBalanceDto>;
5014
+ };
5015
+
5016
+ export type TrendSummaryDto = {
5017
+ /**
5018
+ * Value at start of period
5019
+ */
5020
+ startValue: string;
5021
+ /**
5022
+ * Value at end of period
5023
+ */
5024
+ endValue: string;
5025
+ /**
5026
+ * Total change over period
5027
+ */
5028
+ totalChange: string;
5029
+ /**
5030
+ * Total change percentage
5031
+ */
5032
+ totalChangePercentage: string;
5033
+ };
5034
+
5035
+ export type MultiCurrencyPointDto = {
5036
+ /**
5037
+ * Date in YYYY-MM-DD format
5038
+ */
5039
+ date: string;
5040
+ /**
5041
+ * Balances by currency
5042
+ */
5043
+ byCurrency: Array<CurrencyBalanceDto>;
4382
5044
  };
4383
5045
 
4384
5046
  export type PortfolioTrendsResponseDto = {
@@ -4412,6 +5074,71 @@ export type PortfolioTrendsResponseDto = {
4412
5074
  warnings?: Array<ExchangeRateWarningDto>;
4413
5075
  };
4414
5076
 
5077
+ export type CashFlowPointDto = {
5078
+ /**
5079
+ * Month key (YYYY-MM)
5080
+ */
5081
+ month: string;
5082
+ /**
5083
+ * Income in base currency (absolute, converted)
5084
+ */
5085
+ income: string;
5086
+ /**
5087
+ * Expense in base currency (absolute, converted)
5088
+ */
5089
+ expense: string;
5090
+ /**
5091
+ * netSavings = income − expense (savings positive)
5092
+ */
5093
+ netSavings: string;
5094
+ };
5095
+
5096
+ export type CashFlowTrendSummaryDto = {
5097
+ /**
5098
+ * Total income across the period
5099
+ */
5100
+ totalIncome: string;
5101
+ /**
5102
+ * Total expense across the period
5103
+ */
5104
+ totalExpense: string;
5105
+ /**
5106
+ * income − expense across the period
5107
+ */
5108
+ totalNetSavings: string;
5109
+ /**
5110
+ * totalNetSavings divided by the window length (N months, incl. zero-filled)
5111
+ */
5112
+ averageMonthlyNetSavings: string;
5113
+ };
5114
+
5115
+ export type CashFlowTrendsResponseDto = {
5116
+ /**
5117
+ * Monthly cash-flow series (fixed N-month window, zero-filled)
5118
+ */
5119
+ series: Array<CashFlowPointDto>;
5120
+ /**
5121
+ * Period totals
5122
+ */
5123
+ summary: CashFlowTrendSummaryDto;
5124
+ /**
5125
+ * Period requested
5126
+ */
5127
+ period: string;
5128
+ /**
5129
+ * Data granularity (v1 returns month buckets)
5130
+ */
5131
+ granularity: string;
5132
+ /**
5133
+ * Base currency for converted values
5134
+ */
5135
+ currency: string;
5136
+ /**
5137
+ * Exchange rate warnings (e.g. missing rate for a currency)
5138
+ */
5139
+ warnings?: Array<ExchangeRateWarningDto>;
5140
+ };
5141
+
4415
5142
  export type GenerateSnapshotBody = unknown;
4416
5143
 
4417
5144
  export type GenerateSnapshotResponse = unknown;
@@ -4598,6 +5325,10 @@ export type TransactionControllerListData = {
4598
5325
  * Filter by account ID (transactions with postings to this account)
4599
5326
  */
4600
5327
  accountId?: string;
5328
+ /**
5329
+ * Filter by ADR-0075 functional category (Group segment); matches any posting to an Expenses/Income account whose derived Group segment equals this value
5330
+ */
5331
+ category?: string;
4601
5332
  /**
4602
5333
  * Filter by start date (inclusive), format: YYYY-MM-DD
4603
5334
  */
@@ -4641,6 +5372,20 @@ export type TransactionControllerCreateBatchData = {
4641
5372
  export type TransactionControllerCreateBatchResponse =
4642
5373
  BatchTransactionResponseDto;
4643
5374
 
5375
+ export type TransactionControllerCorrectData = {
5376
+ /**
5377
+ * Original transaction ID to correct
5378
+ */
5379
+ id: string;
5380
+ /**
5381
+ * Region code for tenant context
5382
+ */
5383
+ region: 'cn' | 'us' | 'de' | 'gb';
5384
+ requestBody: CorrectTransactionDto;
5385
+ };
5386
+
5387
+ export type TransactionControllerCorrectResponse = TransactionDetailDto;
5388
+
4644
5389
  export type TransactionControllerSuggestTagsData = {
4645
5390
  /**
4646
5391
  * Max suggestions (1-100, default 10)
@@ -5575,6 +6320,104 @@ export type PropertyControllerDeleteData = {
5575
6320
 
5576
6321
  export type PropertyControllerDeleteResponse = void;
5577
6322
 
6323
+ export type EventControllerCreateData = {
6324
+ /**
6325
+ * Region code for tenant context (decorative for life events)
6326
+ */
6327
+ region: 'cn' | 'us' | 'de' | 'gb';
6328
+ requestBody: CreateBeanEventDto;
6329
+ };
6330
+
6331
+ export type EventControllerCreateResponse = EventResponseDto;
6332
+
6333
+ export type EventControllerFindAllData = {
6334
+ /**
6335
+ * Filter life events from this date (ISO 8601 format)
6336
+ */
6337
+ from?: string;
6338
+ /**
6339
+ * Number of items per page (default: 20, max: 100)
6340
+ */
6341
+ limit?: number;
6342
+ /**
6343
+ * Page number for pagination (default: 1)
6344
+ */
6345
+ page?: number;
6346
+ /**
6347
+ * Search term for description (case-insensitive partial match)
6348
+ */
6349
+ q?: string;
6350
+ /**
6351
+ * Region code for tenant context (decorative for life events)
6352
+ */
6353
+ region: 'cn' | 'us' | 'de' | 'gb';
6354
+ /**
6355
+ * Filter life events to this date (ISO 8601 format)
6356
+ */
6357
+ to?: string;
6358
+ /**
6359
+ * Filter by life event type (exact match)
6360
+ */
6361
+ type?: string;
6362
+ };
6363
+
6364
+ export type EventControllerFindAllResponse = EventListResponseDto;
6365
+
6366
+ export type EventControllerFindOneData = {
6367
+ /**
6368
+ * Life event ID
6369
+ */
6370
+ id: string;
6371
+ /**
6372
+ * Region code for tenant context (decorative for life events)
6373
+ */
6374
+ region: 'cn' | 'us' | 'de' | 'gb';
6375
+ };
6376
+
6377
+ export type EventControllerFindOneResponse = EventResponseDto;
6378
+
6379
+ export type EventControllerUpdateData = {
6380
+ /**
6381
+ * Life event ID
6382
+ */
6383
+ id: string;
6384
+ /**
6385
+ * Region code for tenant context (decorative for life events)
6386
+ */
6387
+ region: 'cn' | 'us' | 'de' | 'gb';
6388
+ requestBody: UpdateBeanEventDto;
6389
+ };
6390
+
6391
+ export type EventControllerUpdateResponse = EventResponseDto;
6392
+
6393
+ export type EventControllerDeleteData = {
6394
+ /**
6395
+ * Life event ID
6396
+ */
6397
+ id: string;
6398
+ /**
6399
+ * Region code for tenant context (decorative for life events)
6400
+ */
6401
+ region: 'cn' | 'us' | 'de' | 'gb';
6402
+ };
6403
+
6404
+ export type EventControllerDeleteResponse = void;
6405
+
6406
+ export type EventControllerGetSliceData = {
6407
+ accountPattern: string;
6408
+ granularity: string;
6409
+ /**
6410
+ * Life event ID
6411
+ */
6412
+ id: string;
6413
+ /**
6414
+ * Region code for tenant context (decorative for life events)
6415
+ */
6416
+ region: 'cn' | 'us' | 'de' | 'gb';
6417
+ };
6418
+
6419
+ export type EventControllerGetSliceResponse = unknown;
6420
+
5578
6421
  export type ExportControllerExportBeancountResponse = unknown;
5579
6422
 
5580
6423
  export type FileImportControllerImportFileData = {
@@ -5723,9 +6566,9 @@ export type ProviderSyncControllerSyncData = {
5723
6566
  | 'beancount-direct'
5724
6567
  | 'parsed-bill';
5725
6568
  /**
5726
- * Region code
6569
+ * Region code for tenant context
5727
6570
  */
5728
- region: unknown;
6571
+ region: 'cn' | 'us' | 'de' | 'gb';
5729
6572
  requestBody: ProviderSyncDto;
5730
6573
  };
5731
6574
 
@@ -5764,89 +6607,257 @@ export type TelemetryControllerReportTelemetryData = {
5764
6607
 
5765
6608
  export type TelemetryControllerReportTelemetryResponse = unknown;
5766
6609
 
6610
+ export type TelemetryControllerReportCoverageMissData = {
6611
+ /**
6612
+ * Region code for tenant context
6613
+ */
6614
+ region: 'cn' | 'us' | 'de' | 'gb';
6615
+ requestBody: UncoveredFormatMissDto;
6616
+ };
6617
+
6618
+ export type TelemetryControllerReportCoverageMissResponse = unknown;
6619
+
6620
+ export type TelemetryControllerGetCoverageMetricsData = {
6621
+ /**
6622
+ * Region code for tenant context
6623
+ */
6624
+ region: 'cn' | 'us' | 'de' | 'gb';
6625
+ /**
6626
+ * Top-N uncovered formats (default 10)
6627
+ */
6628
+ topN?: unknown;
6629
+ };
6630
+
6631
+ export type TelemetryControllerGetCoverageMetricsResponse = unknown;
6632
+
5767
6633
  export type NlpControllerProcessNaturalLanguageData = {
5768
6634
  /**
5769
6635
  * Region code for tenant context
5770
6636
  */
5771
- region: 'cn' | 'us' | 'de' | 'gb';
6637
+ region: 'cn' | 'us' | 'de' | 'gb';
6638
+ /**
6639
+ * Natural language transaction input with optional session ID
6640
+ */
6641
+ requestBody: ProcessNlpDto;
6642
+ };
6643
+
6644
+ export type NlpControllerProcessNaturalLanguageResponse = NlpResponseDto;
6645
+
6646
+ export type NlpControllerClearSessionData = {
6647
+ /**
6648
+ * Region code for tenant context
6649
+ */
6650
+ region: 'cn' | 'us' | 'de' | 'gb';
6651
+ /**
6652
+ * Specific session ID to clear (defaults to user session)
6653
+ */
6654
+ sessionId?: string;
6655
+ };
6656
+
6657
+ export type NlpControllerClearSessionResponse = void;
6658
+
6659
+ export type NlpControllerGetSessionData = {
6660
+ /**
6661
+ * Region code for tenant context
6662
+ */
6663
+ region: 'cn' | 'us' | 'de' | 'gb';
6664
+ /**
6665
+ * Specific session ID to get (defaults to user session)
6666
+ */
6667
+ sessionId?: string;
6668
+ };
6669
+
6670
+ export type NlpControllerGetSessionResponse = unknown;
6671
+
6672
+ export type DashboardControllerGetNetWorthData = {
6673
+ /**
6674
+ * Date for balance calculation (ISO 8601 format)
6675
+ */
6676
+ date?: string;
6677
+ /**
6678
+ * Region code for tenant context
6679
+ */
6680
+ region: 'cn' | 'us' | 'de' | 'gb';
6681
+ };
6682
+
6683
+ export type DashboardControllerGetNetWorthResponse = NetWorthResponseDto;
6684
+
6685
+ export type DashboardControllerGetAccountsData = {
6686
+ /**
6687
+ * Scope to a single account (only valid with groupBy=holdingAssetClass, ADR-0105 §6)
6688
+ */
6689
+ accountId?: string;
6690
+ /**
6691
+ * Date for balance calculation (ISO 8601 format)
6692
+ */
6693
+ date?: string;
6694
+ /**
6695
+ * Grouping strategy
6696
+ */
6697
+ groupBy?:
6698
+ | 'platform'
6699
+ | 'assetClass'
6700
+ | 'holdingAssetClass'
6701
+ | 'holdingAssetClassByAccount';
6702
+ /**
6703
+ * Region code for tenant context
6704
+ */
6705
+ region: 'cn' | 'us' | 'de' | 'gb';
6706
+ };
6707
+
6708
+ export type DashboardControllerGetAccountsResponse =
6709
+ | AccountsResponseDto
6710
+ | AssetClassAccountsResponseDto
6711
+ | HoldingAssetClassCrossAccountResponseDto;
6712
+
6713
+ export type DashboardControllerGetCashFlowData = {
6714
+ /**
6715
+ * Period in YYYY-MM format
6716
+ */
6717
+ period: string;
6718
+ /**
6719
+ * Region code for tenant context
6720
+ */
6721
+ region: 'cn' | 'us' | 'de' | 'gb';
6722
+ };
6723
+
6724
+ export type DashboardControllerGetCashFlowResponse = CashFlowResponseDto;
6725
+
6726
+ export type DashboardControllerGetExpensesData = {
6727
+ /**
6728
+ * Grouping strategy
6729
+ */
6730
+ groupBy?: 'category';
6731
+ /**
6732
+ * Time window (1m = current calendar month)
6733
+ */
6734
+ period?: '1m' | '3m' | '6m' | '1y';
6735
+ /**
6736
+ * Region code for tenant context
6737
+ */
6738
+ region: 'cn' | 'us' | 'de' | 'gb';
6739
+ };
6740
+
6741
+ export type DashboardControllerGetExpensesResponse =
6742
+ ExpensesByCategoryResponseDto;
6743
+
6744
+ export type HoldingPnlControllerGetHoldingPnlData = {
6745
+ /**
6746
+ * Scope to a single account
6747
+ */
6748
+ accountId?: string;
6749
+ /**
6750
+ * As-of date (ISO 8601), defaults to today
6751
+ */
6752
+ asOf?: string;
6753
+ /**
6754
+ * Realized-P&L lot-matching method (default average). Does not affect the average-cost unrealized basis.
6755
+ */
6756
+ method?: 'FIFO' | 'average';
6757
+ /**
6758
+ * Region code for tenant context
6759
+ */
6760
+ region: 'cn' | 'us' | 'de' | 'gb';
6761
+ };
6762
+
6763
+ export type HoldingPnlControllerGetHoldingPnlResponse = HoldingPnlResponseDto;
6764
+
6765
+ export type PriceControllerCreateData = {
6766
+ /**
6767
+ * Region code for tenant context
6768
+ */
6769
+ region: 'cn' | 'us' | 'de' | 'gb';
6770
+ requestBody: CreateBeanPriceDto;
6771
+ };
6772
+
6773
+ export type PriceControllerCreateResponse = PriceResponseDto;
6774
+
6775
+ export type PriceControllerFindAllData = {
6776
+ /**
6777
+ * Filter by currency (e.g., BTC, AAPL, USD)
6778
+ */
6779
+ currency?: string;
6780
+ /**
6781
+ * Filter prices from this date (ISO 8601 format)
6782
+ */
6783
+ dateFrom?: string;
6784
+ /**
6785
+ * Filter prices to this date (ISO 8601 format)
6786
+ */
6787
+ dateTo?: string;
6788
+ /**
6789
+ * Number of items per page (default: 20, max: 100)
6790
+ */
6791
+ limit?: number;
6792
+ /**
6793
+ * Page number for pagination (default: 1)
6794
+ */
6795
+ page?: number;
5772
6796
  /**
5773
- * Natural language transaction input with optional session ID
6797
+ * Filter by quote currency (pricing currency, e.g., USD, CNY)
5774
6798
  */
5775
- requestBody: ProcessNlpDto;
5776
- };
5777
-
5778
- export type NlpControllerProcessNaturalLanguageResponse = NlpResponseDto;
5779
-
5780
- export type NlpControllerClearSessionData = {
6799
+ quoteCurrency?: string;
5781
6800
  /**
5782
6801
  * Region code for tenant context
5783
6802
  */
5784
6803
  region: 'cn' | 'us' | 'de' | 'gb';
5785
6804
  /**
5786
- * Specific session ID to clear (defaults to user session)
6805
+ * Search term for currency or quoteCurrency (case-insensitive partial match)
5787
6806
  */
5788
- sessionId?: string;
6807
+ search?: string;
5789
6808
  };
5790
6809
 
5791
- export type NlpControllerClearSessionResponse = void;
6810
+ export type PriceControllerFindAllResponse = PriceListResponseDto;
5792
6811
 
5793
- export type NlpControllerGetSessionData = {
6812
+ export type PriceControllerFindOneData = {
5794
6813
  /**
5795
- * Region code for tenant context
6814
+ * Price ID
5796
6815
  */
5797
- region: 'cn' | 'us' | 'de' | 'gb';
6816
+ id: string;
5798
6817
  /**
5799
- * Specific session ID to get (defaults to user session)
6818
+ * Region code for tenant context
5800
6819
  */
5801
- sessionId?: string;
6820
+ region: 'cn' | 'us' | 'de' | 'gb';
5802
6821
  };
5803
6822
 
5804
- export type NlpControllerGetSessionResponse = unknown;
6823
+ export type PriceControllerFindOneResponse = PriceResponseDto;
5805
6824
 
5806
- export type DashboardControllerGetNetWorthData = {
6825
+ export type PriceControllerUpdateData = {
5807
6826
  /**
5808
- * Date for balance calculation (ISO 8601 format)
6827
+ * Price ID
5809
6828
  */
5810
- date?: string;
6829
+ id: string;
5811
6830
  /**
5812
6831
  * Region code for tenant context
5813
6832
  */
5814
6833
  region: 'cn' | 'us' | 'de' | 'gb';
6834
+ requestBody: UpdateBeanPriceDto;
5815
6835
  };
5816
6836
 
5817
- export type DashboardControllerGetNetWorthResponse = NetWorthResponseDto;
6837
+ export type PriceControllerUpdateResponse = PriceResponseDto;
5818
6838
 
5819
- export type DashboardControllerGetAccountsData = {
5820
- /**
5821
- * Date for balance calculation (ISO 8601 format)
5822
- */
5823
- date?: string;
6839
+ export type PriceControllerDeleteData = {
5824
6840
  /**
5825
- * Grouping strategy
6841
+ * Price ID
5826
6842
  */
5827
- groupBy?: 'platform' | 'assetClass';
6843
+ id: string;
5828
6844
  /**
5829
6845
  * Region code for tenant context
5830
6846
  */
5831
6847
  region: 'cn' | 'us' | 'de' | 'gb';
5832
6848
  };
5833
6849
 
5834
- export type DashboardControllerGetAccountsResponse =
5835
- | AccountsResponseDto
5836
- | AssetClassAccountsResponseDto;
6850
+ export type PriceControllerDeleteResponse = void;
5837
6851
 
5838
- export type DashboardControllerGetCashFlowData = {
5839
- /**
5840
- * Period in YYYY-MM format
5841
- */
5842
- period: string;
6852
+ export type PriceControllerBulkCreateData = {
5843
6853
  /**
5844
6854
  * Region code for tenant context
5845
6855
  */
5846
6856
  region: 'cn' | 'us' | 'de' | 'gb';
6857
+ requestBody: Array<string>;
5847
6858
  };
5848
6859
 
5849
- export type DashboardControllerGetCashFlowResponse = CashFlowResponseDto;
6860
+ export type PriceControllerBulkCreateResponse = Array<PriceResponseDto>;
5850
6861
 
5851
6862
  export type ReportingControllerGetPortfolioTrendsData = {
5852
6863
  /**
@@ -5866,6 +6877,24 @@ export type ReportingControllerGetPortfolioTrendsData = {
5866
6877
  export type ReportingControllerGetPortfolioTrendsResponse =
5867
6878
  PortfolioTrendsResponseDto;
5868
6879
 
6880
+ export type ReportingControllerGetCashFlowTrendsData = {
6881
+ /**
6882
+ * Data granularity (accepted for API symmetry; v1 returns month buckets)
6883
+ */
6884
+ granularity?: 'day' | 'week' | 'month';
6885
+ /**
6886
+ * Time period
6887
+ */
6888
+ period?: '1m' | '3m' | '6m' | '1y';
6889
+ /**
6890
+ * Region code for tenant context
6891
+ */
6892
+ region: 'cn' | 'us' | 'de' | 'gb';
6893
+ };
6894
+
6895
+ export type ReportingControllerGetCashFlowTrendsResponse =
6896
+ CashFlowTrendsResponseDto;
6897
+
5869
6898
  export type ReportingControllerGenerateSnapshotData = {
5870
6899
  /**
5871
6900
  * Region code for tenant context
@@ -6141,6 +7170,29 @@ export type $OpenApiTs = {
6141
7170
  };
6142
7171
  };
6143
7172
  };
7173
+ '/api/v1/{region}/bean/transactions/{id}/correct': {
7174
+ post: {
7175
+ req: TransactionControllerCorrectData;
7176
+ res: {
7177
+ /**
7178
+ * Corrected transaction created
7179
+ */
7180
+ 201: TransactionDetailDto;
7181
+ /**
7182
+ * Original transaction not found
7183
+ */
7184
+ 404: ApiProblemResponseDto;
7185
+ /**
7186
+ * Original no longer ACTIVE (concurrent modification)
7187
+ */
7188
+ 409: ApiProblemResponseDto;
7189
+ /**
7190
+ * Pipeline validation failed (does not balance, invalid accounts)
7191
+ */
7192
+ 422: ApiProblemResponseDto;
7193
+ };
7194
+ };
7195
+ };
6144
7196
  '/api/v1/{region}/bean/transactions/tags': {
6145
7197
  get: {
6146
7198
  req: TransactionControllerSuggestTagsData;
@@ -7274,6 +8326,102 @@ export type $OpenApiTs = {
7274
8326
  };
7275
8327
  };
7276
8328
  };
8329
+ '/api/v1/{region}/bean/events': {
8330
+ post: {
8331
+ req: EventControllerCreateData;
8332
+ res: {
8333
+ /**
8334
+ * Life event created successfully
8335
+ */
8336
+ 201: EventResponseDto;
8337
+ /**
8338
+ * Life event already exists for this (userId, type, date) combination
8339
+ */
8340
+ 409: unknown;
8341
+ };
8342
+ };
8343
+ get: {
8344
+ req: EventControllerFindAllData;
8345
+ res: {
8346
+ /**
8347
+ * Life events retrieved successfully
8348
+ */
8349
+ 200: EventListResponseDto;
8350
+ };
8351
+ };
8352
+ };
8353
+ '/api/v1/{region}/bean/events/{id}': {
8354
+ get: {
8355
+ req: EventControllerFindOneData;
8356
+ res: {
8357
+ /**
8358
+ * Life event retrieved successfully
8359
+ */
8360
+ 200: EventResponseDto;
8361
+ /**
8362
+ * Life event not found
8363
+ */
8364
+ 404: unknown;
8365
+ };
8366
+ };
8367
+ put: {
8368
+ req: EventControllerUpdateData;
8369
+ res: {
8370
+ /**
8371
+ * Life event updated successfully
8372
+ */
8373
+ 200: EventResponseDto;
8374
+ /**
8375
+ * If-Match header is not a valid ISO 8601 date
8376
+ */
8377
+ 400: unknown;
8378
+ /**
8379
+ * Life event not found
8380
+ */
8381
+ 404: unknown;
8382
+ /**
8383
+ * Updated event conflicts with an existing (userId, type, date) combination
8384
+ */
8385
+ 409: unknown;
8386
+ /**
8387
+ * If-Match precondition failed (updatedAt mismatch)
8388
+ */
8389
+ 412: unknown;
8390
+ };
8391
+ };
8392
+ delete: {
8393
+ req: EventControllerDeleteData;
8394
+ res: {
8395
+ /**
8396
+ * Life event deleted successfully
8397
+ */
8398
+ 204: void;
8399
+ /**
8400
+ * Life event not found
8401
+ */
8402
+ 404: unknown;
8403
+ };
8404
+ };
8405
+ };
8406
+ '/api/v1/{region}/bean/events/{id}/slice': {
8407
+ get: {
8408
+ req: EventControllerGetSliceData;
8409
+ res: {
8410
+ /**
8411
+ * Time-series sliced by the life event range
8412
+ */
8413
+ 200: unknown;
8414
+ /**
8415
+ * accountPattern query param is empty
8416
+ */
8417
+ 400: unknown;
8418
+ /**
8419
+ * Life event not found
8420
+ */
8421
+ 404: unknown;
8422
+ };
8423
+ };
8424
+ };
7277
8425
  '/api/v1/{region}/bean/export/beancount': {
7278
8426
  get: {
7279
8427
  res: {
@@ -7564,6 +8712,32 @@ export type $OpenApiTs = {
7564
8712
  };
7565
8713
  };
7566
8714
  };
8715
+ '/api/v1/{region}/bean/import/parser-coverage-miss': {
8716
+ post: {
8717
+ req: TelemetryControllerReportCoverageMissData;
8718
+ res: {
8719
+ /**
8720
+ * Coverage miss report received
8721
+ */
8722
+ 200: unknown;
8723
+ /**
8724
+ * Unauthorized
8725
+ */
8726
+ 401: unknown;
8727
+ };
8728
+ };
8729
+ };
8730
+ '/api/v1/{region}/bean/import/parser-coverage-metrics': {
8731
+ get: {
8732
+ req: TelemetryControllerGetCoverageMetricsData;
8733
+ res: {
8734
+ /**
8735
+ * Coverage metrics
8736
+ */
8737
+ 200: unknown;
8738
+ };
8739
+ };
8740
+ };
7567
8741
  '/api/v1/{region}/bean/nlp/process': {
7568
8742
  post: {
7569
8743
  req: NlpControllerProcessNaturalLanguageData;
@@ -7633,7 +8807,10 @@ export type $OpenApiTs = {
7633
8807
  /**
7634
8808
  * Accounts retrieved successfully. Response type depends on groupBy parameter.
7635
8809
  */
7636
- 200: AccountsResponseDto | AssetClassAccountsResponseDto;
8810
+ 200:
8811
+ | AccountsResponseDto
8812
+ | AssetClassAccountsResponseDto
8813
+ | HoldingAssetClassCrossAccountResponseDto;
7637
8814
  /**
7638
8815
  * User not authenticated
7639
8816
  */
@@ -7660,6 +8837,128 @@ export type $OpenApiTs = {
7660
8837
  };
7661
8838
  };
7662
8839
  };
8840
+ '/api/v1/{region}/dashboard/expenses': {
8841
+ get: {
8842
+ req: DashboardControllerGetExpensesData;
8843
+ res: {
8844
+ /**
8845
+ * Expenses retrieved successfully
8846
+ */
8847
+ 200: ExpensesByCategoryResponseDto;
8848
+ /**
8849
+ * Invalid groupBy or period
8850
+ */
8851
+ 400: unknown;
8852
+ /**
8853
+ * User not authenticated
8854
+ */
8855
+ 401: unknown;
8856
+ };
8857
+ };
8858
+ };
8859
+ '/api/v1/{region}/investment/holdings/pnl': {
8860
+ get: {
8861
+ req: HoldingPnlControllerGetHoldingPnlData;
8862
+ res: {
8863
+ /**
8864
+ * Holding P&L retrieved successfully
8865
+ */
8866
+ 200: HoldingPnlResponseDto;
8867
+ /**
8868
+ * Invalid asOf format/value/future date, invalid accountId format, or unsupported method
8869
+ */
8870
+ 400: unknown;
8871
+ /**
8872
+ * User not authenticated
8873
+ */
8874
+ 401: unknown;
8875
+ };
8876
+ };
8877
+ };
8878
+ '/api/v1/{region}/bean/prices': {
8879
+ post: {
8880
+ req: PriceControllerCreateData;
8881
+ res: {
8882
+ /**
8883
+ * Price created successfully
8884
+ */
8885
+ 201: PriceResponseDto;
8886
+ /**
8887
+ * Currency or quoteCurrency commodity not found
8888
+ */
8889
+ 404: unknown;
8890
+ /**
8891
+ * Price already exists for this currency pair and date
8892
+ */
8893
+ 409: unknown;
8894
+ };
8895
+ };
8896
+ get: {
8897
+ req: PriceControllerFindAllData;
8898
+ res: {
8899
+ /**
8900
+ * Prices retrieved successfully
8901
+ */
8902
+ 200: PriceListResponseDto;
8903
+ };
8904
+ };
8905
+ };
8906
+ '/api/v1/{region}/bean/prices/{id}': {
8907
+ get: {
8908
+ req: PriceControllerFindOneData;
8909
+ res: {
8910
+ /**
8911
+ * Price retrieved successfully
8912
+ */
8913
+ 200: PriceResponseDto;
8914
+ /**
8915
+ * Price not found
8916
+ */
8917
+ 404: unknown;
8918
+ };
8919
+ };
8920
+ put: {
8921
+ req: PriceControllerUpdateData;
8922
+ res: {
8923
+ /**
8924
+ * Price updated successfully
8925
+ */
8926
+ 200: PriceResponseDto;
8927
+ /**
8928
+ * Price not found
8929
+ */
8930
+ 404: unknown;
8931
+ /**
8932
+ * Updated price conflicts with existing price
8933
+ */
8934
+ 409: unknown;
8935
+ };
8936
+ };
8937
+ delete: {
8938
+ req: PriceControllerDeleteData;
8939
+ res: {
8940
+ /**
8941
+ * Price deleted successfully
8942
+ */
8943
+ 204: void;
8944
+ /**
8945
+ * Price not found
8946
+ */
8947
+ 404: unknown;
8948
+ };
8949
+ };
8950
+ };
8951
+ '/api/v1/{region}/bean/prices/bulk': {
8952
+ post: {
8953
+ req: PriceControllerBulkCreateData;
8954
+ res: {
8955
+ /**
8956
+ * Prices created successfully
8957
+ */
8958
+ 201: Array<PriceResponseDto>;
8959
+ };
8960
+ };
8961
+ };
7663
8962
  '/api/v1/{region}/reporting/portfolio/trends': {
7664
8963
  get: {
7665
8964
  req: ReportingControllerGetPortfolioTrendsData;
@@ -7675,6 +8974,21 @@ export type $OpenApiTs = {
7675
8974
  };
7676
8975
  };
7677
8976
  };
8977
+ '/api/v1/{region}/reporting/cash-flow/trends': {
8978
+ get: {
8979
+ req: ReportingControllerGetCashFlowTrendsData;
8980
+ res: {
8981
+ /**
8982
+ * Cash-flow trends retrieved successfully
8983
+ */
8984
+ 200: CashFlowTrendsResponseDto;
8985
+ /**
8986
+ * User not authenticated
8987
+ */
8988
+ 401: unknown;
8989
+ };
8990
+ };
8991
+ };
7678
8992
  '/api/v1/{region}/reporting/snapshots/generate': {
7679
8993
  post: {
7680
8994
  req: ReportingControllerGenerateSnapshotData;