@firela/api-types 0.0.0-canary.45a6cc23 → 0.0.0-canary.4e3af49c

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.
@@ -6,13 +6,9 @@ export type CreateAccountDto = {
6
6
  */
7
7
  path: string;
8
8
  /**
9
- * Display name to distinguish accounts at the same path (default: "")
9
+ * Account open date (server defaults to today)
10
10
  */
11
- displayName?: string;
12
- /**
13
- * Account open date
14
- */
15
- openDate: string;
11
+ openDate?: string;
16
12
  /**
17
13
  * Allowed currencies (null = no restriction)
18
14
  */
@@ -36,18 +32,14 @@ export type CreateAccountDto = {
36
32
  * Whether this is a custom (user-created) account
37
33
  */
38
34
  isCustom?: boolean;
39
- /**
40
- * i18n key for display name (overrides template)
41
- */
42
- i18nKey?: string;
43
35
  /**
44
36
  * Icon identifier (overrides template)
45
37
  */
46
38
  icon?: string;
47
39
  /**
48
- * Additional metadata
40
+ * Open directive metadata (NOT an opening-balance amount — use the opening-balance endpoint)
49
41
  */
50
- openMeta?: {
42
+ openDirectiveMeta?: {
51
43
  [key: string]: unknown;
52
44
  };
53
45
  /**
@@ -77,14 +69,47 @@ export type AccountResponseDto = {
77
69
  * Account path (hierarchical, colon-separated)
78
70
  */
79
71
  path: string;
80
- /**
81
- * Display name distinguishing multiple accounts at the same path
82
- */
83
- displayName: string;
84
72
  /**
85
73
  * Account type (root segment)
86
74
  */
87
75
  type: 'Assets' | 'Liabilities' | 'Income' | 'Expenses' | 'Equity';
76
+ /**
77
+ * Account-level asset sub-class (product type, e.g. STOCK/DEPOSIT/CREDIT_CARD/PERSONAL_LOAN). Computed from the account path via the asset-classifier (ADR-0077). Null for non-asset accounts (Income/Expenses/Equity) or unmatched paths.
78
+ */
79
+ assetSubClass?:
80
+ | 'DEPOSIT'
81
+ | 'CASH'
82
+ | 'MONEY_MARKET_FUND'
83
+ | 'STOCK'
84
+ | 'ETF'
85
+ | 'MUTUAL_FUND'
86
+ | 'EQUITY_COMPENSATION'
87
+ | 'GOVERNMENT_BOND'
88
+ | 'CORPORATE_BOND'
89
+ | 'BOND_FUND'
90
+ | 'PRIMARY_RESIDENCE'
91
+ | 'INVESTMENT_PROPERTY'
92
+ | 'REIT'
93
+ | 'GOLD'
94
+ | 'SILVER'
95
+ | 'PRECIOUS_METAL'
96
+ | 'PRECIOUS_METAL_FUND'
97
+ | 'COMMODITY'
98
+ | 'COMMODITY_FUND'
99
+ | 'CRYPTOCURRENCY'
100
+ | 'RETIREMENT_ACCOUNT'
101
+ | 'HEALTH_ACCOUNT'
102
+ | 'EDUCATION_ACCOUNT'
103
+ | 'INSURANCE'
104
+ | 'PRIVATE_EQUITY'
105
+ | 'HEDGE_FUND'
106
+ | 'COLLECTIBLES'
107
+ | 'MORTGAGE'
108
+ | 'STUDENT_LOAN'
109
+ | 'CREDIT_CARD'
110
+ | 'PERSONAL_LOAN'
111
+ | 'OTHER'
112
+ | null;
88
113
  /**
89
114
  * Account status
90
115
  */
@@ -121,17 +146,17 @@ export type AccountResponseDto = {
121
146
  */
122
147
  isCustom: boolean;
123
148
  /**
124
- * i18n key for display name
149
+ * Localized display name (ADR-0114, read-time projection)
125
150
  */
126
- i18nKey?: string;
151
+ displayName?: string;
127
152
  /**
128
153
  * Icon identifier
129
154
  */
130
155
  icon?: string;
131
156
  /**
132
- * Account metadata
157
+ * Open directive metadata (ADR-0115 Decision 9)
133
158
  */
134
- openMeta?: {
159
+ openDirectiveMeta?: {
135
160
  [key: string]: unknown;
136
161
  };
137
162
  /**
@@ -161,6 +186,43 @@ export type AccountResponseDto = {
161
186
  */
162
187
  export type type = 'Assets' | 'Liabilities' | 'Income' | 'Expenses' | 'Equity';
163
188
 
189
+ /**
190
+ * Account-level asset sub-class (product type, e.g. STOCK/DEPOSIT/CREDIT_CARD/PERSONAL_LOAN). Computed from the account path via the asset-classifier (ADR-0077). Null for non-asset accounts (Income/Expenses/Equity) or unmatched paths.
191
+ */
192
+ export type assetSubClass =
193
+ | 'DEPOSIT'
194
+ | 'CASH'
195
+ | 'MONEY_MARKET_FUND'
196
+ | 'STOCK'
197
+ | 'ETF'
198
+ | 'MUTUAL_FUND'
199
+ | 'EQUITY_COMPENSATION'
200
+ | 'GOVERNMENT_BOND'
201
+ | 'CORPORATE_BOND'
202
+ | 'BOND_FUND'
203
+ | 'PRIMARY_RESIDENCE'
204
+ | 'INVESTMENT_PROPERTY'
205
+ | 'REIT'
206
+ | 'GOLD'
207
+ | 'SILVER'
208
+ | 'PRECIOUS_METAL'
209
+ | 'PRECIOUS_METAL_FUND'
210
+ | 'COMMODITY'
211
+ | 'COMMODITY_FUND'
212
+ | 'CRYPTOCURRENCY'
213
+ | 'RETIREMENT_ACCOUNT'
214
+ | 'HEALTH_ACCOUNT'
215
+ | 'EDUCATION_ACCOUNT'
216
+ | 'INSURANCE'
217
+ | 'PRIVATE_EQUITY'
218
+ | 'HEDGE_FUND'
219
+ | 'COLLECTIBLES'
220
+ | 'MORTGAGE'
221
+ | 'STUDENT_LOAN'
222
+ | 'CREDIT_CARD'
223
+ | 'PERSONAL_LOAN'
224
+ | 'OTHER';
225
+
164
226
  /**
165
227
  * Account status
166
228
  */
@@ -178,10 +240,6 @@ export type AccountListResponseDto = {
178
240
  };
179
241
 
180
242
  export type UpdateAccountDto = {
181
- /**
182
- * Display name to distinguish accounts at the same path
183
- */
184
- displayName?: string;
185
243
  /**
186
244
  * Allowed currencies (null = no restriction)
187
245
  */
@@ -197,18 +255,14 @@ export type UpdateAccountDto = {
197
255
  | 'STRICT'
198
256
  | 'STRICT_WITH_SIZE'
199
257
  | 'NONE';
200
- /**
201
- * i18n key for display name
202
- */
203
- i18nKey?: string;
204
258
  /**
205
259
  * Icon identifier
206
260
  */
207
261
  icon?: string;
208
262
  /**
209
- * Additional metadata (merged with existing)
263
+ * Open directive metadata (merged with existing; NOT an opening-balance amount)
210
264
  */
211
- openMeta?: {
265
+ openDirectiveMeta?: {
212
266
  [key: string]: unknown;
213
267
  };
214
268
  /**
@@ -237,6 +291,28 @@ export type ReopenAccountDto = {
237
291
  reopenDate?: string;
238
292
  };
239
293
 
294
+ export type CreateOpeningBalanceDto = {
295
+ /**
296
+ * Opening balance amount (non-negative)
297
+ */
298
+ amount: number;
299
+ /**
300
+ * Currency code
301
+ */
302
+ currency: string;
303
+ /**
304
+ * Opening-balance date (defaults to now)
305
+ */
306
+ date?: string;
307
+ };
308
+
309
+ export type OpeningBalanceResultDto = {
310
+ /**
311
+ * Created opening-balance transaction id.
312
+ */
313
+ transactionId: string;
314
+ };
315
+
240
316
  export type AccountStandardResponseDto = {
241
317
  /**
242
318
  * Account path (hierarchical, colon-separated)
@@ -246,10 +322,6 @@ export type AccountStandardResponseDto = {
246
322
  * Account type in Beancount hierarchy
247
323
  */
248
324
  type: 'Assets' | 'Liabilities' | 'Income' | 'Expenses' | 'Equity';
249
- /**
250
- * i18n key for localized display name
251
- */
252
- i18nKey: string;
253
325
  /**
254
326
  * Short localized display name
255
327
  */
@@ -284,10 +356,6 @@ export type AccountStandardListResponseDto = {
284
356
  };
285
357
 
286
358
  export type TemplateMetadataDto = {
287
- /**
288
- * Whether this path can be extended
289
- */
290
- extendable: boolean;
291
359
  /**
292
360
  * Root account type
293
361
  */
@@ -848,6 +916,51 @@ export type flag2 =
848
916
  */
849
917
  export type status2 = 'ACTIVE' | 'VOIDED' | 'SUPERSEDED';
850
918
 
919
+ export type BalanceByCurrencyDto = {
920
+ /**
921
+ * ISO 4217 currency code
922
+ */
923
+ currency: string;
924
+ /**
925
+ * Balance amount
926
+ */
927
+ balance: string;
928
+ };
929
+
930
+ export type ExchangeRateWarningDto = {
931
+ /**
932
+ * Warning type
933
+ */
934
+ type: string;
935
+ /**
936
+ * Currency without exchange rate
937
+ */
938
+ currency: string;
939
+ /**
940
+ * Total amount affected
941
+ */
942
+ totalAmount: string;
943
+ };
944
+
945
+ export type TransactionListSummaryDto = {
946
+ /**
947
+ * Partial converted total in base currency (rated currencies only, raw Beancount sign). When warnings is non-empty this excludes currencies missing an FX rate; may be "0.00" if ALL non-base currencies lack a rate. Converted at the dateTo (or current) available rate.
948
+ */
949
+ totalAmount: string;
950
+ /**
951
+ * Base currency (ISO 4217)
952
+ */
953
+ currency: string;
954
+ /**
955
+ * Raw (unconverted) balance per currency
956
+ */
957
+ balanceByCurrency: Array<BalanceByCurrencyDto>;
958
+ /**
959
+ * Currencies missing an FX rate (omitted when empty)
960
+ */
961
+ warnings?: Array<ExchangeRateWarningDto>;
962
+ };
963
+
851
964
  export type TransactionListResponseDto = {
852
965
  /**
853
966
  * List of transactions
@@ -865,6 +978,10 @@ export type TransactionListResponseDto = {
865
978
  * Number of items skipped
866
979
  */
867
980
  offset: number;
981
+ /**
982
+ * Amount summary for the full filtered set (#514). Present only when the request has a single account OR category viewpoint; omitted for search-only / plain-list / dual-perspective requests.
983
+ */
984
+ summary?: TransactionListSummaryDto;
868
985
  };
869
986
 
870
987
  export type TagSuggestionDto = {
@@ -1917,6 +2034,108 @@ export type UpdateCommodityDto = {
1917
2034
  };
1918
2035
  };
1919
2036
 
2037
+ export type CreateBeanPriceDto = {
2038
+ /**
2039
+ * Currency being priced (e.g., USD, AAPL, BTC)
2040
+ */
2041
+ currency: string;
2042
+ /**
2043
+ * Quote currency (pricing currency, e.g., CNY, EUR)
2044
+ */
2045
+ quoteCurrency: string;
2046
+ /**
2047
+ * Price amount (MUST be >= 0 per Beancount spec, supports up to 15 decimal places). Zero allowed for conversion entries, negative strictly prohibited.
2048
+ */
2049
+ amount: number;
2050
+ /**
2051
+ * Price date (ISO 8601 format)
2052
+ */
2053
+ date: string;
2054
+ /**
2055
+ * Metadata (validated by Zod schema, max field lengths enforced)
2056
+ */
2057
+ metadata?: {
2058
+ [key: string]: unknown;
2059
+ };
2060
+ };
2061
+
2062
+ export type PriceResponseDto = {
2063
+ /**
2064
+ * Unique identifier
2065
+ */
2066
+ id: string;
2067
+ /**
2068
+ * User ID (owner of the price)
2069
+ */
2070
+ userId: string;
2071
+ /**
2072
+ * Currency being priced (e.g., USD, AAPL, BTC)
2073
+ */
2074
+ currency: string;
2075
+ /**
2076
+ * Quote currency (pricing currency, e.g., USD, CNY)
2077
+ */
2078
+ quoteCurrency: string;
2079
+ /**
2080
+ * Price amount (corresponds to Beancount Amount.number). Supports up to 15 decimal places.
2081
+ */
2082
+ amount: number;
2083
+ /**
2084
+ * Price date (ISO 8601 format). Represents the date this price was valid.
2085
+ */
2086
+ date: string;
2087
+ /**
2088
+ * Metadata (corresponds to Beancount meta field). Contains source, confidence, note, etc.
2089
+ */
2090
+ meta: {
2091
+ [key: string]: unknown;
2092
+ };
2093
+ /**
2094
+ * Creation timestamp
2095
+ */
2096
+ createdAt: string;
2097
+ /**
2098
+ * Last update timestamp
2099
+ */
2100
+ updatedAt: string;
2101
+ };
2102
+
2103
+ export type PriceListResponseDto = {
2104
+ /**
2105
+ * List of prices
2106
+ */
2107
+ items: Array<PriceResponseDto>;
2108
+ /**
2109
+ * Total number of prices
2110
+ */
2111
+ total: number;
2112
+ };
2113
+
2114
+ export type UpdateBeanPriceDto = {
2115
+ /**
2116
+ * Currency being priced
2117
+ */
2118
+ currency?: string;
2119
+ /**
2120
+ * Quote currency (pricing currency)
2121
+ */
2122
+ quoteCurrency?: string;
2123
+ /**
2124
+ * Price amount (MUST be >= 0 per Beancount spec)
2125
+ */
2126
+ amount?: number;
2127
+ /**
2128
+ * Price date (ISO 8601 format)
2129
+ */
2130
+ date?: string;
2131
+ /**
2132
+ * Metadata
2133
+ */
2134
+ metadata?: {
2135
+ [key: string]: unknown;
2136
+ };
2137
+ };
2138
+
1920
2139
  export type CreateRecurringRuleDto = {
1921
2140
  /**
1922
2141
  * Rule name (unique per user)
@@ -2556,511 +2775,705 @@ export type ForecastResponseDto = {
2556
2775
  periodEnd: string;
2557
2776
  };
2558
2777
 
2559
- export type CreateTransactionRuleDto = {
2560
- name: string;
2561
- description?: string;
2562
- narrationKeywords?: Array<unknown[]>;
2563
- payeeKeywords?: Array<unknown[]>;
2564
- categoryKeywords?: Array<unknown[]>;
2778
+ export type CurrencyBalanceDto = {
2565
2779
  /**
2566
- * Payment method keywords (e.g., HuaBei, YuEBao)
2780
+ * ISO 4217 currency code
2567
2781
  */
2568
- methodKeywords?: Array<unknown[]>;
2782
+ currency: string;
2569
2783
  /**
2570
- * Destination account for expenses/income (e.g., Expenses:Food:Coffee)
2784
+ * Balance amount
2571
2785
  */
2572
- categoryAccount?: string;
2573
- matchLogic: 'OR' | 'AND';
2786
+ balance: string;
2787
+ };
2788
+
2789
+ export type TimeSeriesPointDto = {
2574
2790
  /**
2575
- * Minimum transaction amount (inclusive)
2791
+ * Date in YYYY-MM-DD format
2576
2792
  */
2577
- amountMin?: number;
2793
+ date: string;
2578
2794
  /**
2579
- * Maximum transaction amount (inclusive)
2795
+ * Value at this date (in base currency)
2580
2796
  */
2581
- amountMax?: number;
2582
- priority: number;
2583
- additionalTags?: Array<unknown[]>;
2584
- additionalMetadata?: {
2797
+ value: string;
2798
+ /**
2799
+ * Change from previous point
2800
+ */
2801
+ change?: {
2585
2802
  [key: string]: unknown;
2586
2803
  };
2587
2804
  /**
2588
- * If true, update existing rule with matching payeeKeywords[0] instead of creating new rule
2805
+ * Total assets at this date (in base currency)
2589
2806
  */
2590
- upsertByPayee?: boolean;
2591
- };
2592
-
2593
- export type matchLogic = 'OR' | 'AND';
2594
-
2595
- export type AmountRangeDto = {
2807
+ assets?: string;
2596
2808
  /**
2597
- * Minimum amount
2809
+ * Total liabilities at this date (in base currency)
2598
2810
  */
2599
- min?: number;
2811
+ liabilities?: string;
2600
2812
  /**
2601
- * Maximum amount
2813
+ * Multi-currency breakdown for this point
2602
2814
  */
2603
- max?: number;
2815
+ byCurrency?: Array<CurrencyBalanceDto>;
2604
2816
  };
2605
2817
 
2606
- export type TransactionRuleResponseDto = {
2818
+ export type TrendSummaryDto = {
2607
2819
  /**
2608
- * Rule ID
2820
+ * Value at start of period
2609
2821
  */
2610
- id: string;
2822
+ startValue: string;
2611
2823
  /**
2612
- * Rule name
2824
+ * Value at end of period
2613
2825
  */
2614
- name: string;
2826
+ endValue: string;
2615
2827
  /**
2616
- * Rule description
2617
- */
2618
- description?: string;
2619
- /**
2620
- * Keywords to match in transaction narration
2621
- */
2622
- narrationKeywords: Array<string>;
2623
- /**
2624
- * Keywords to match in payee name
2828
+ * Total change over period
2625
2829
  */
2626
- payeeKeywords: Array<string>;
2830
+ totalChange: string;
2627
2831
  /**
2628
- * Keywords to match in category
2832
+ * Total change percentage
2629
2833
  */
2630
- categoryKeywords: Array<string>;
2834
+ totalChangePercentage: string;
2835
+ };
2836
+
2837
+ export type MultiCurrencyPointDto = {
2631
2838
  /**
2632
- * Keywords to match in payment method
2839
+ * Date in YYYY-MM-DD format
2633
2840
  */
2634
- methodKeywords: Array<string>;
2841
+ date: string;
2635
2842
  /**
2636
- * Destination account for categorization
2843
+ * Balances by currency
2637
2844
  */
2638
- categoryAccount?: string;
2845
+ byCurrency: Array<CurrencyBalanceDto>;
2846
+ };
2847
+
2848
+ export type PortfolioTrendsResponseDto = {
2639
2849
  /**
2640
- * Keyword matching logic
2850
+ * Time series data points
2641
2851
  */
2642
- matchLogic: 'OR' | 'AND';
2852
+ series: Array<TimeSeriesPointDto>;
2643
2853
  /**
2644
- * Amount range for matching
2854
+ * Period summary
2645
2855
  */
2646
- amountRange?: AmountRangeDto;
2856
+ summary: TrendSummaryDto;
2647
2857
  /**
2648
- * Rule priority (0-1000, higher = first match)
2858
+ * Period requested
2649
2859
  */
2650
- priority: number;
2860
+ period: string;
2651
2861
  /**
2652
- * Whether the rule is enabled
2862
+ * Data granularity
2653
2863
  */
2654
- enabled: boolean;
2864
+ granularity: string;
2655
2865
  /**
2656
- * Learning source: NLP, REVIEW_CENTER, or null for manual
2866
+ * Base currency for converted values
2657
2867
  */
2658
- learningSource?: 'NLP' | 'REVIEW_CENTER' | null;
2868
+ currency: string;
2659
2869
  /**
2660
- * Whether auto-apply is enabled for this rule
2870
+ * Multi-currency time series (each point has currency breakdown)
2661
2871
  */
2662
- autoApplyEnabled: boolean;
2872
+ byCurrency?: Array<MultiCurrencyPointDto>;
2663
2873
  /**
2664
- * Number of confirmations for NLP-learned rules
2874
+ * Exchange rate warnings
2665
2875
  */
2666
- confirmationCount: number;
2876
+ warnings?: Array<ExchangeRateWarningDto>;
2877
+ };
2878
+
2879
+ export type CashFlowPointDto = {
2667
2880
  /**
2668
- * Additional tags
2881
+ * Month key (YYYY-MM)
2669
2882
  */
2670
- additionalTags: Array<string>;
2883
+ month: string;
2671
2884
  /**
2672
- * Additional metadata
2885
+ * Income in base currency (absolute, converted)
2673
2886
  */
2674
- additionalMetadata?: {
2675
- [key: string]: string;
2676
- };
2887
+ income: string;
2677
2888
  /**
2678
- * Created timestamp
2889
+ * Expense in base currency (absolute, converted)
2679
2890
  */
2680
- createdAt: string;
2891
+ expense: string;
2681
2892
  /**
2682
- * Updated timestamp
2893
+ * netSavings = income − expense (savings positive)
2683
2894
  */
2684
- updatedAt: string;
2895
+ netSavings: string;
2685
2896
  };
2686
2897
 
2687
- /**
2688
- * Learning source: NLP, REVIEW_CENTER, or null for manual
2689
- */
2690
- export type learningSource = 'NLP' | 'REVIEW_CENTER';
2691
-
2692
- export type TransactionRuleListResponseDto = {
2693
- data: Array<TransactionRuleResponseDto>;
2898
+ export type CashFlowTrendSummaryDto = {
2694
2899
  /**
2695
- * Total count of rules
2900
+ * Total income across the period
2696
2901
  */
2697
- total: number;
2902
+ totalIncome: string;
2698
2903
  /**
2699
- * Results per page
2904
+ * Total expense across the period
2700
2905
  */
2701
- limit: number;
2906
+ totalExpense: string;
2702
2907
  /**
2703
- * Pagination offset
2908
+ * income − expense across the period
2704
2909
  */
2705
- offset: number;
2910
+ totalNetSavings: string;
2911
+ /**
2912
+ * totalNetSavings divided by the window length (N months, incl. zero-filled)
2913
+ */
2914
+ averageMonthlyNetSavings: string;
2706
2915
  };
2707
2916
 
2708
- export type ValidateRuleDto = {
2709
- name: string;
2710
- description?: string;
2711
- narrationKeywords?: Array<unknown[]>;
2712
- payeeKeywords?: Array<unknown[]>;
2713
- categoryKeywords?: Array<unknown[]>;
2917
+ export type CashFlowTrendsResponseDto = {
2714
2918
  /**
2715
- * Payment method keywords (e.g., HuaBei, YuEBao)
2919
+ * Monthly cash-flow series (fixed N-month window, zero-filled)
2716
2920
  */
2717
- methodKeywords?: Array<unknown[]>;
2921
+ series: Array<CashFlowPointDto>;
2718
2922
  /**
2719
- * Destination account for expenses/income (e.g., Expenses:Food:Coffee)
2923
+ * Period totals
2720
2924
  */
2721
- categoryAccount?: string;
2722
- matchLogic: 'OR' | 'AND';
2925
+ summary: CashFlowTrendSummaryDto;
2723
2926
  /**
2724
- * Minimum transaction amount (inclusive)
2927
+ * Period requested
2725
2928
  */
2726
- amountMin?: number;
2929
+ period: string;
2727
2930
  /**
2728
- * Maximum transaction amount (inclusive)
2931
+ * Data granularity (v1 returns month buckets)
2729
2932
  */
2730
- amountMax?: number;
2731
- priority: number;
2732
- additionalTags?: Array<unknown[]>;
2733
- additionalMetadata?: {
2734
- [key: string]: unknown;
2735
- };
2933
+ granularity: string;
2736
2934
  /**
2737
- * If true, update existing rule with matching payeeKeywords[0] instead of creating new rule
2935
+ * Base currency for converted values
2738
2936
  */
2739
- upsertByPayee?: boolean;
2740
- };
2741
-
2742
- export type ValidateRuleResponseDto = {
2937
+ currency: string;
2743
2938
  /**
2744
- * Whether the rule configuration is valid
2939
+ * Exchange rate warnings (e.g. missing rate for a currency)
2745
2940
  */
2746
- valid: boolean;
2941
+ warnings?: Array<ExchangeRateWarningDto>;
2942
+ };
2943
+
2944
+ export type GenerateSnapshotBody = unknown;
2945
+
2946
+ export type GenerateSnapshotResponse = unknown;
2947
+
2948
+ export type BackfillSnapshotsBody = unknown;
2949
+
2950
+ export type BackfillSnapshotsResponse = unknown;
2951
+
2952
+ export type DeleteOwnUserDto = {
2747
2953
  /**
2748
- * List of validation errors (empty if valid)
2954
+ * Access token for user verification
2749
2955
  */
2750
- errors: Array<unknown[]>;
2956
+ accessToken: string;
2957
+ };
2958
+
2959
+ export type SignupDto = {
2751
2960
  /**
2752
- * List of validation warnings (non-blocking issues)
2961
+ * Cloudflare Turnstile verification token (optional when Turnstile disabled)
2753
2962
  */
2754
- warnings: Array<unknown[]>;
2963
+ turnstileToken?: string;
2755
2964
  };
2756
2965
 
2757
- export type BulkCreateRulesDto = {
2966
+ export type SignupResponseDto = {
2758
2967
  /**
2759
- * Array of rules to import
2968
+ * JWT auth token
2760
2969
  */
2761
- rules: Array<unknown[]>;
2970
+ authToken: string;
2762
2971
  /**
2763
- * Conflict handling strategy: skip (default) ignores duplicates, replace soft-deletes existing rule
2972
+ * Auto-generated access token
2764
2973
  */
2765
- conflictStrategy: 'replace' | 'skip';
2974
+ accessToken: string;
2975
+ /**
2976
+ * Assigned user role
2977
+ */
2978
+ role: 'USER' | 'ADMIN' | 'DEMO' | 'INACTIVE' | 'PAID' | 'OPS';
2766
2979
  };
2767
2980
 
2768
2981
  /**
2769
- * Conflict handling strategy: skip (default) ignores duplicates, replace soft-deletes existing rule
2982
+ * Assigned user role
2770
2983
  */
2771
- export type conflictStrategy = 'replace' | 'skip';
2984
+ export type role = 'USER' | 'ADMIN' | 'DEMO' | 'INACTIVE' | 'PAID' | 'OPS';
2772
2985
 
2773
- export type BulkCreateRulesResponseDto = {
2986
+ export type UpdateUserSettingDto = {
2774
2987
  /**
2775
- * Number of successfully created rules
2988
+ * Security ID
2776
2989
  */
2777
- successCount: number;
2990
+ secId?: number;
2778
2991
  /**
2779
- * Number of failed rules
2992
+ * Annual interest rate
2780
2993
  */
2781
- failureCount: number;
2994
+ annualInterestRate?: number;
2782
2995
  /**
2783
- * Error details for failed rules
2996
+ * Currency code
2784
2997
  */
2785
- errors: Array<{
2786
- index?: number;
2787
- message?: string;
2788
- }>;
2998
+ currency?: string;
2789
2999
  /**
2790
- * IDs of successfully created rules
3000
+ * Base currency code
2791
3001
  */
2792
- createdRuleIds: Array<string>;
2793
- };
2794
-
2795
- export type ExportRulesResponseDto = {
3002
+ baseCurrency?: string;
2796
3003
  /**
2797
- * Export timestamp
3004
+ * Benchmark symbol
2798
3005
  */
2799
- exportedAt: string;
3006
+ benchmark?: string;
2800
3007
  /**
2801
- * User ID
3008
+ * Color scheme
2802
3009
  */
2803
- userId: string;
3010
+ colorScheme?: 'DARK' | 'LIGHT';
2804
3011
  /**
2805
- * Number of exported rules
3012
+ * Date range filter
2806
3013
  */
2807
- ruleCount: number;
3014
+ dateRange?: string;
2808
3015
  /**
2809
- * Exported rules
3016
+ * Emergency fund amount
2810
3017
  */
2811
- rules: unknown[];
2812
- };
2813
-
2814
- export type RuleStatisticsResponseDto = {
3018
+ emergencyFund?: number;
2815
3019
  /**
2816
- * Statistics time period
3020
+ * Account filter IDs
2817
3021
  */
2818
- period: '7d' | '30d' | '90d';
3022
+ 'filters.accounts'?: Array<string>;
2819
3023
  /**
2820
- * Total number of rules
3024
+ * Asset class filters
2821
3025
  */
2822
- totalRules: number;
3026
+ 'filters.assetClasses'?: Array<string>;
2823
3027
  /**
2824
- * Number of rules with at least one match
3028
+ * Data source filter
2825
3029
  */
2826
- rulesWithMatches: number;
3030
+ 'filters.dataSource'?: string;
2827
3031
  /**
2828
- * Total number of matches across all rules
3032
+ * Symbol filter
2829
3033
  */
2830
- totalMatches: number;
3034
+ 'filters.symbol'?: string;
2831
3035
  /**
2832
- * Average confidence score across all matches
3036
+ * Tag filters
2833
3037
  */
2834
- averageConfidence: number;
3038
+ 'filters.tags'?: Array<string>;
2835
3039
  /**
2836
- * Per-rule statistics
3040
+ * Enable experimental features
2837
3041
  */
2838
- ruleStats: Array<{
2839
- ruleId?: string;
2840
- ruleName?: string;
2841
- matchCount?: number;
2842
- averageConfidence?: number;
2843
- }>;
2844
- };
2845
-
2846
- /**
2847
- * Statistics time period
2848
- */
2849
- export type period = '7d' | '30d' | '90d';
2850
-
2851
- export type UpdateTransactionRuleDto = {
2852
- name?: string;
2853
- description?: string;
2854
- narrationKeywords?: Array<unknown[]>;
2855
- payeeKeywords?: Array<unknown[]>;
2856
- categoryKeywords?: Array<unknown[]>;
3042
+ isExperimentalFeatures?: boolean;
2857
3043
  /**
2858
- * Payment method keywords (e.g., HuaBei, YuEBao)
3044
+ * Enable restricted view mode
2859
3045
  */
2860
- methodKeywords?: Array<unknown[]>;
3046
+ isRestrictedView?: boolean;
2861
3047
  /**
2862
- * Destination account for expenses/income (e.g., Expenses:Food:Coffee)
3048
+ * Language code
2863
3049
  */
2864
- categoryAccount?: string;
2865
- matchLogic?: 'OR' | 'AND';
3050
+ language?: string;
2866
3051
  /**
2867
- * Minimum transaction amount (inclusive)
3052
+ * Locale code
2868
3053
  */
2869
- amountMin?: number;
3054
+ locale?: string;
2870
3055
  /**
2871
- * Maximum transaction amount (inclusive)
3056
+ * Projected total amount
2872
3057
  */
2873
- amountMax?: number;
2874
- priority?: number;
3058
+ projectedTotalAmount?: number;
2875
3059
  /**
2876
- * Enable or disable the rule
3060
+ * Retirement date in ISO 8601 format
2877
3061
  */
2878
- enabled?: boolean;
2879
- additionalTags?: Array<unknown[]>;
2880
- additionalMetadata?: {
2881
- [key: string]: unknown;
2882
- };
3062
+ retirementDate?: string;
3063
+ /**
3064
+ * Savings rate percentage
3065
+ */
3066
+ savingsRate?: number;
3067
+ /**
3068
+ * View mode
3069
+ */
3070
+ viewMode?: 'DEFAULT' | 'ZEN';
2883
3071
  };
2884
3072
 
2885
- export type TestRuleDto = {
2886
- narration: string;
2887
- payee?: string;
2888
- categoryAccount?: string;
2889
- amount?: number;
2890
- currency?: string;
3073
+ /**
3074
+ * Color scheme
3075
+ */
3076
+ export type colorScheme = 'DARK' | 'LIGHT';
3077
+
3078
+ /**
3079
+ * View mode
3080
+ */
3081
+ export type viewMode = 'DEFAULT' | 'ZEN';
3082
+
3083
+ export type UpdatePropertyDto = {
3084
+ /**
3085
+ * Property value
3086
+ */
3087
+ value: string;
2891
3088
  };
2892
3089
 
2893
- export type TestRuleResponseDto = {
3090
+ export type CreateTransactionRuleDto = {
3091
+ name: string;
3092
+ description?: string;
3093
+ narrationKeywords?: Array<unknown[]>;
3094
+ payeeKeywords?: Array<unknown[]>;
3095
+ categoryKeywords?: Array<unknown[]>;
2894
3096
  /**
2895
- * Rule ID that was tested
3097
+ * Payment method keywords (e.g., HuaBei, YuEBao)
2896
3098
  */
2897
- ruleId: string;
3099
+ methodKeywords?: Array<unknown[]>;
2898
3100
  /**
2899
- * Whether the rule matched the test data
3101
+ * Destination account for expenses/income (e.g., Expenses:Food:Coffee)
2900
3102
  */
2901
- matches: boolean;
3103
+ categoryAccount?: string;
3104
+ matchLogic: 'OR' | 'AND';
2902
3105
  /**
2903
- * Match confidence score (0-1)
3106
+ * Minimum transaction amount (inclusive)
2904
3107
  */
2905
- confidence: number;
3108
+ amountMin?: number;
2906
3109
  /**
2907
- * Details of which fields matched
3110
+ * Maximum transaction amount (inclusive)
2908
3111
  */
2909
- matchDetails: {
3112
+ amountMax?: number;
3113
+ priority: number;
3114
+ additionalTags?: Array<unknown[]>;
3115
+ additionalMetadata?: {
2910
3116
  [key: string]: unknown;
2911
3117
  };
2912
- };
2913
-
2914
- export type DeleteOwnUserDto = {
2915
3118
  /**
2916
- * Access token for user verification
3119
+ * If true, update existing rule with matching payeeKeywords[0] instead of creating new rule
2917
3120
  */
2918
- accessToken: string;
3121
+ upsertByPayee?: boolean;
2919
3122
  };
2920
3123
 
2921
- export type SignupDto = {
2922
- /**
2923
- * Cloudflare Turnstile verification token (optional when Turnstile disabled)
2924
- */
2925
- turnstileToken?: string;
2926
- };
3124
+ export type matchLogic = 'OR' | 'AND';
2927
3125
 
2928
- export type UpdateUserSettingDto = {
3126
+ export type AmountRangeDto = {
2929
3127
  /**
2930
- * Security ID
3128
+ * Minimum amount
2931
3129
  */
2932
- secId?: number;
3130
+ min?: number;
2933
3131
  /**
2934
- * Annual interest rate
3132
+ * Maximum amount
2935
3133
  */
2936
- annualInterestRate?: number;
3134
+ max?: number;
3135
+ };
3136
+
3137
+ export type TransactionRuleResponseDto = {
2937
3138
  /**
2938
- * Currency code
3139
+ * Rule ID
2939
3140
  */
2940
- currency?: string;
3141
+ id: string;
2941
3142
  /**
2942
- * Base currency code
3143
+ * Rule name
2943
3144
  */
2944
- baseCurrency?: string;
3145
+ name: string;
2945
3146
  /**
2946
- * Benchmark symbol
3147
+ * Rule description
2947
3148
  */
2948
- benchmark?: string;
3149
+ description?: string;
2949
3150
  /**
2950
- * Color scheme
3151
+ * Keywords to match in transaction narration
2951
3152
  */
2952
- colorScheme?: 'DARK' | 'LIGHT';
3153
+ narrationKeywords: Array<string>;
2953
3154
  /**
2954
- * Date range filter
3155
+ * Keywords to match in payee name
2955
3156
  */
2956
- dateRange?: string;
3157
+ payeeKeywords: Array<string>;
2957
3158
  /**
2958
- * Emergency fund amount
3159
+ * Keywords to match in category
2959
3160
  */
2960
- emergencyFund?: number;
3161
+ categoryKeywords: Array<string>;
2961
3162
  /**
2962
- * Account filter IDs
3163
+ * Keywords to match in payment method
2963
3164
  */
2964
- 'filters.accounts'?: Array<string>;
3165
+ methodKeywords: Array<string>;
2965
3166
  /**
2966
- * Asset class filters
3167
+ * Destination account for categorization
2967
3168
  */
2968
- 'filters.assetClasses'?: Array<string>;
3169
+ categoryAccount?: string;
2969
3170
  /**
2970
- * Data source filter
3171
+ * Keyword matching logic
2971
3172
  */
2972
- 'filters.dataSource'?: string;
3173
+ matchLogic: 'OR' | 'AND';
2973
3174
  /**
2974
- * Symbol filter
3175
+ * Amount range for matching
2975
3176
  */
2976
- 'filters.symbol'?: string;
3177
+ amountRange?: AmountRangeDto;
2977
3178
  /**
2978
- * Tag filters
3179
+ * Rule priority (0-1000, higher = first match)
2979
3180
  */
2980
- 'filters.tags'?: Array<string>;
3181
+ priority: number;
2981
3182
  /**
2982
- * Enable experimental features
3183
+ * Whether the rule is enabled
2983
3184
  */
2984
- isExperimentalFeatures?: boolean;
3185
+ enabled: boolean;
2985
3186
  /**
2986
- * Enable restricted view mode
3187
+ * Learning source: NLP, REVIEW_CENTER, or null for manual
2987
3188
  */
2988
- isRestrictedView?: boolean;
3189
+ learningSource?: 'NLP' | 'REVIEW_CENTER' | null;
2989
3190
  /**
2990
- * Language code
3191
+ * Whether auto-apply is enabled for this rule
2991
3192
  */
2992
- language?: string;
3193
+ autoApplyEnabled: boolean;
2993
3194
  /**
2994
- * Locale code
3195
+ * Number of confirmations for NLP-learned rules
2995
3196
  */
2996
- locale?: string;
3197
+ confirmationCount: number;
2997
3198
  /**
2998
- * Projected total amount
3199
+ * Additional tags
2999
3200
  */
3000
- projectedTotalAmount?: number;
3201
+ additionalTags: Array<string>;
3001
3202
  /**
3002
- * Retirement date in ISO 8601 format
3203
+ * Additional metadata
3003
3204
  */
3004
- retirementDate?: string;
3205
+ additionalMetadata?: {
3206
+ [key: string]: string;
3207
+ };
3005
3208
  /**
3006
- * Savings rate percentage
3209
+ * Created timestamp
3007
3210
  */
3008
- savingsRate?: number;
3211
+ createdAt: string;
3009
3212
  /**
3010
- * View mode
3213
+ * Updated timestamp
3011
3214
  */
3012
- viewMode?: 'DEFAULT' | 'ZEN';
3215
+ updatedAt: string;
3013
3216
  };
3014
3217
 
3015
3218
  /**
3016
- * Color scheme
3017
- */
3018
- export type colorScheme = 'DARK' | 'LIGHT';
3019
-
3020
- /**
3021
- * View mode
3219
+ * Learning source: NLP, REVIEW_CENTER, or null for manual
3022
3220
  */
3023
- export type viewMode = 'DEFAULT' | 'ZEN';
3221
+ export type learningSource = 'NLP' | 'REVIEW_CENTER';
3024
3222
 
3025
- export type UpdatePropertyDto = {
3223
+ export type TransactionRuleListResponseDto = {
3224
+ data: Array<TransactionRuleResponseDto>;
3026
3225
  /**
3027
- * Property value
3226
+ * Total count of rules
3028
3227
  */
3029
- value: string;
3228
+ total: number;
3229
+ /**
3230
+ * Results per page
3231
+ */
3232
+ limit: number;
3233
+ /**
3234
+ * Pagination offset
3235
+ */
3236
+ offset: number;
3030
3237
  };
3031
3238
 
3032
- export type CreateBeanEventDto = {
3239
+ export type ValidateRuleDto = {
3240
+ name: string;
3241
+ description?: string;
3242
+ narrationKeywords?: Array<unknown[]>;
3243
+ payeeKeywords?: Array<unknown[]>;
3244
+ categoryKeywords?: Array<unknown[]>;
3033
3245
  /**
3034
- * Life event date (ISO 8601)
3246
+ * Payment method keywords (e.g., HuaBei, YuEBao)
3035
3247
  */
3036
- date: string;
3248
+ methodKeywords?: Array<unknown[]>;
3037
3249
  /**
3038
- * Life event type (e.g., "employer", "location", "marital-status") — user-defined, no enum constraint at engine layer
3250
+ * Destination account for expenses/income (e.g., Expenses:Food:Coffee)
3039
3251
  */
3040
- type: string;
3252
+ categoryAccount?: string;
3253
+ matchLogic: 'OR' | 'AND';
3041
3254
  /**
3042
- * Life event description. Empty string is a VALID value (distinct from absence).
3255
+ * Minimum transaction amount (inclusive)
3043
3256
  */
3044
- description: string;
3257
+ amountMin?: number;
3045
3258
  /**
3046
- * Product-side metadata (lives in BeanEvent.meta JSON, never in engine Event fields)
3259
+ * Maximum transaction amount (inclusive)
3047
3260
  */
3048
- meta?: {
3261
+ amountMax?: number;
3262
+ priority: number;
3263
+ additionalTags?: Array<unknown[]>;
3264
+ additionalMetadata?: {
3049
3265
  [key: string]: unknown;
3050
3266
  };
3267
+ /**
3268
+ * If true, update existing rule with matching payeeKeywords[0] instead of creating new rule
3269
+ */
3270
+ upsertByPayee?: boolean;
3051
3271
  };
3052
3272
 
3053
- export type EventResponseDto = {
3273
+ export type ValidateRuleResponseDto = {
3054
3274
  /**
3055
- * Unique identifier
3275
+ * Whether the rule configuration is valid
3056
3276
  */
3057
- id: string;
3277
+ valid: boolean;
3058
3278
  /**
3059
- * User ID (owner of the life event)
3279
+ * List of validation errors (empty if valid)
3060
3280
  */
3061
- userId: string;
3281
+ errors: Array<unknown[]>;
3062
3282
  /**
3063
- * Life event date (ISO 8601 format)
3283
+ * List of validation warnings (non-blocking issues)
3284
+ */
3285
+ warnings: Array<unknown[]>;
3286
+ };
3287
+
3288
+ export type BulkCreateRulesDto = {
3289
+ /**
3290
+ * Array of rules to import
3291
+ */
3292
+ rules: Array<unknown[]>;
3293
+ /**
3294
+ * Conflict handling strategy: skip (default) ignores duplicates, replace soft-deletes existing rule
3295
+ */
3296
+ conflictStrategy: 'replace' | 'skip';
3297
+ };
3298
+
3299
+ /**
3300
+ * Conflict handling strategy: skip (default) ignores duplicates, replace soft-deletes existing rule
3301
+ */
3302
+ export type conflictStrategy = 'replace' | 'skip';
3303
+
3304
+ export type BulkCreateRulesResponseDto = {
3305
+ /**
3306
+ * Number of successfully created rules
3307
+ */
3308
+ successCount: number;
3309
+ /**
3310
+ * Number of failed rules
3311
+ */
3312
+ failureCount: number;
3313
+ /**
3314
+ * Error details for failed rules
3315
+ */
3316
+ errors: Array<{
3317
+ index?: number;
3318
+ message?: string;
3319
+ }>;
3320
+ /**
3321
+ * IDs of successfully created rules
3322
+ */
3323
+ createdRuleIds: Array<string>;
3324
+ };
3325
+
3326
+ export type ExportRulesResponseDto = {
3327
+ /**
3328
+ * Export timestamp
3329
+ */
3330
+ exportedAt: string;
3331
+ /**
3332
+ * User ID
3333
+ */
3334
+ userId: string;
3335
+ /**
3336
+ * Number of exported rules
3337
+ */
3338
+ ruleCount: number;
3339
+ /**
3340
+ * Exported rules
3341
+ */
3342
+ rules: unknown[];
3343
+ };
3344
+
3345
+ export type RuleStatisticsResponseDto = {
3346
+ /**
3347
+ * Statistics time period
3348
+ */
3349
+ period: '7d' | '30d' | '90d';
3350
+ /**
3351
+ * Total number of rules
3352
+ */
3353
+ totalRules: number;
3354
+ /**
3355
+ * Number of rules with at least one match
3356
+ */
3357
+ rulesWithMatches: number;
3358
+ /**
3359
+ * Total number of matches across all rules
3360
+ */
3361
+ totalMatches: number;
3362
+ /**
3363
+ * Average confidence score across all matches
3364
+ */
3365
+ averageConfidence: number;
3366
+ /**
3367
+ * Per-rule statistics
3368
+ */
3369
+ ruleStats: Array<{
3370
+ ruleId?: string;
3371
+ ruleName?: string;
3372
+ matchCount?: number;
3373
+ averageConfidence?: number;
3374
+ }>;
3375
+ };
3376
+
3377
+ /**
3378
+ * Statistics time period
3379
+ */
3380
+ export type period = '7d' | '30d' | '90d';
3381
+
3382
+ export type UpdateTransactionRuleDto = {
3383
+ name?: string;
3384
+ description?: string;
3385
+ narrationKeywords?: Array<unknown[]>;
3386
+ payeeKeywords?: Array<unknown[]>;
3387
+ categoryKeywords?: Array<unknown[]>;
3388
+ /**
3389
+ * Payment method keywords (e.g., HuaBei, YuEBao)
3390
+ */
3391
+ methodKeywords?: Array<unknown[]>;
3392
+ /**
3393
+ * Destination account for expenses/income (e.g., Expenses:Food:Coffee)
3394
+ */
3395
+ categoryAccount?: string;
3396
+ matchLogic?: 'OR' | 'AND';
3397
+ /**
3398
+ * Minimum transaction amount (inclusive)
3399
+ */
3400
+ amountMin?: number;
3401
+ /**
3402
+ * Maximum transaction amount (inclusive)
3403
+ */
3404
+ amountMax?: number;
3405
+ priority?: number;
3406
+ /**
3407
+ * Enable or disable the rule
3408
+ */
3409
+ enabled?: boolean;
3410
+ additionalTags?: Array<unknown[]>;
3411
+ additionalMetadata?: {
3412
+ [key: string]: unknown;
3413
+ };
3414
+ };
3415
+
3416
+ export type TestRuleDto = {
3417
+ narration: string;
3418
+ payee?: string;
3419
+ categoryAccount?: string;
3420
+ amount?: number;
3421
+ currency?: string;
3422
+ };
3423
+
3424
+ export type TestRuleResponseDto = {
3425
+ /**
3426
+ * Rule ID that was tested
3427
+ */
3428
+ ruleId: string;
3429
+ /**
3430
+ * Whether the rule matched the test data
3431
+ */
3432
+ matches: boolean;
3433
+ /**
3434
+ * Match confidence score (0-1)
3435
+ */
3436
+ confidence: number;
3437
+ /**
3438
+ * Details of which fields matched
3439
+ */
3440
+ matchDetails: {
3441
+ [key: string]: unknown;
3442
+ };
3443
+ };
3444
+
3445
+ export type CreateBeanEventDto = {
3446
+ /**
3447
+ * Life event date (ISO 8601)
3448
+ */
3449
+ date: string;
3450
+ /**
3451
+ * Life event type (e.g., "employer", "location", "marital-status") — user-defined, no enum constraint at engine layer
3452
+ */
3453
+ type: string;
3454
+ /**
3455
+ * Life event description. Empty string is a VALID value (distinct from absence).
3456
+ */
3457
+ description: string;
3458
+ /**
3459
+ * Product-side metadata (lives in BeanEvent.meta JSON, never in engine Event fields)
3460
+ */
3461
+ meta?: {
3462
+ [key: string]: unknown;
3463
+ };
3464
+ };
3465
+
3466
+ export type EventResponseDto = {
3467
+ /**
3468
+ * Unique identifier
3469
+ */
3470
+ id: string;
3471
+ /**
3472
+ * User ID (owner of the life event)
3473
+ */
3474
+ userId: string;
3475
+ /**
3476
+ * Life event date (ISO 8601 format)
3064
3477
  */
3065
3478
  date: string;
3066
3479
  /**
@@ -3119,81 +3532,235 @@ export type UpdateBeanEventDto = {
3119
3532
  };
3120
3533
  };
3121
3534
 
3122
- export type FileImportDto = {
3535
+ export type OnboardingAccountDto = {
3123
3536
  /**
3124
- * Bill file to import (CSV, PDF, OFX, etc.)
3537
+ * Account path (Assets/Liabilities only; format validated by the account service)
3125
3538
  */
3126
- file: Blob | File;
3539
+ path: string;
3540
+ /**
3541
+ * ISO 4217 currency code (3 letters)
3542
+ */
3543
+ currency: string;
3544
+ /**
3545
+ * Opening balance as a non-negative Decimal string (e.g. "1000.00")
3546
+ */
3547
+ openingBalance?: string;
3548
+ /**
3549
+ * Platform ID to bind the account to (references Platform.id); omit for unbound
3550
+ */
3551
+ platformId?: string;
3127
3552
  };
3128
3553
 
3129
- export type ImportErrorDto = {
3554
+ export type OnboardingDto = {
3130
3555
  /**
3131
- * Index of failed transaction in the file
3556
+ * Asset/Liability accounts to register with opening balances
3132
3557
  */
3133
- index: number;
3558
+ accounts?: Array<OnboardingAccountDto>;
3134
3559
  /**
3135
- * Error message
3560
+ * Skip asset registration; only bootstrap the core account set
3136
3561
  */
3137
- error: string;
3562
+ skipAssetRegistration?: boolean;
3138
3563
  };
3139
3564
 
3140
- export type ReviewItemPreviewDto = {
3565
+ export type ActualBalanceDto = {
3141
3566
  /**
3142
- * Index in the import batch (for tracking)
3567
+ * Actual balance amount as a decimal string (preserves precision for tolerance inference).
3143
3568
  */
3144
- index: number;
3569
+ amount: string;
3145
3570
  /**
3146
- * Transaction date (ISO format)
3571
+ * Currency code (ISO 4217 or commodity ticker).
3147
3572
  */
3148
- date: string;
3573
+ ccy: string;
3574
+ };
3575
+
3576
+ export type ComputeReconciliationDto = {
3149
3577
  /**
3150
- * Transaction amount (absolute value)
3578
+ * BeanAccount id to reconcile.
3151
3579
  */
3152
- amount?: number;
3580
+ accountId: string;
3153
3581
  /**
3154
- * Currency code
3582
+ * Assertion date (ISO 8601, e.g. "2026-07-24").
3155
3583
  */
3156
- currency?: string;
3584
+ asOfDate: string;
3157
3585
  /**
3158
- * Transaction narration/description
3586
+ * Actual balance from the external statement.
3159
3587
  */
3160
- narration: string;
3588
+ actualBalance: ActualBalanceDto;
3589
+ };
3590
+
3591
+ export type ReconciliationComputeResultDto = {
3592
+ accountId: string;
3593
+ asOfDate: string;
3161
3594
  /**
3162
- * Payee name
3595
+ * System-computed book balance (decimal string).
3163
3596
  */
3164
- payee?: string;
3597
+ bookBalance: string;
3165
3598
  /**
3166
- * Inferred category from rule matching
3599
+ * User-entered actual balance (decimal string).
3167
3600
  */
3168
- category?: string;
3601
+ actualBalance: string;
3602
+ currency: string;
3169
3603
  /**
3170
- * Confidence score for the match (0-1)
3604
+ * Diff = book − actual (decimal string).
3171
3605
  */
3172
- confidence?: number;
3606
+ diff: string;
3173
3607
  /**
3174
- * Type of branch requiring review
3608
+ * Applied tolerance (decimal string).
3175
3609
  */
3176
- branchType?:
3177
- | 'DUPLICATE'
3178
- | 'PAYEE_MATCH'
3179
- | 'RULE_MATCH'
3180
- | 'ACCOUNT_VALIDATION'
3181
- | 'PIPELINE_ERROR';
3610
+ tolerance: string;
3182
3611
  /**
3183
- * Human-readable reasons for requiring review
3612
+ * true when |diff| ≤ tolerance.
3184
3613
  */
3185
- reasons?: Array<string>;
3614
+ withinTolerance: boolean;
3615
+ /**
3616
+ * Suggested next action: assert when within tolerance, pad otherwise.
3617
+ */
3618
+ suggestedAction: 'assert' | 'pad';
3186
3619
  };
3187
3620
 
3188
3621
  /**
3189
- * Type of branch requiring review
3622
+ * Suggested next action: assert when within tolerance, pad otherwise.
3190
3623
  */
3191
- export type branchType =
3192
- | 'DUPLICATE'
3193
- | 'PAYEE_MATCH'
3194
- | 'RULE_MATCH'
3195
- | 'ACCOUNT_VALIDATION'
3196
- | 'PIPELINE_ERROR';
3624
+ export type suggestedAction = 'assert' | 'pad';
3625
+
3626
+ export type AssertReconciliationDto = {
3627
+ /**
3628
+ * BeanAccount id to reconcile.
3629
+ */
3630
+ accountId: string;
3631
+ /**
3632
+ * Assertion date (ISO 8601, e.g. "2026-07-24").
3633
+ */
3634
+ asOfDate: string;
3635
+ /**
3636
+ * Actual balance from the external statement.
3637
+ */
3638
+ actualBalance: ActualBalanceDto;
3639
+ /**
3640
+ * Optional explicit tolerance override. Omit to infer from amount precision (Beancount default).
3641
+ */
3642
+ tolerance?: string;
3643
+ };
3644
+
3645
+ export type ReconciliationRecordDto = {
3646
+ id: string;
3647
+ accountId: string;
3648
+ date: string;
3649
+ /**
3650
+ * Asserted (actual) amount.
3651
+ */
3652
+ amount: string;
3653
+ currency: string;
3654
+ tolerance?: string;
3655
+ /**
3656
+ * book − actual.
3657
+ */
3658
+ diffAmount?: string;
3659
+ diffCurrency?: string;
3660
+ createdAt: string;
3661
+ };
3662
+
3663
+ export type PadReconciliationDto = {
3664
+ /**
3665
+ * BeanAccount id to reconcile.
3666
+ */
3667
+ accountId: string;
3668
+ /**
3669
+ * Assertion date (ISO 8601, e.g. "2026-07-24").
3670
+ */
3671
+ asOfDate: string;
3672
+ /**
3673
+ * Actual balance from the external statement.
3674
+ */
3675
+ actualBalance: ActualBalanceDto;
3676
+ /**
3677
+ * Pad source account. Defaults to Equity:Opening-Balances (official Beancount convention).
3678
+ */
3679
+ sourceAccount?: string;
3680
+ };
3681
+
3682
+ export type PadResultDto = {
3683
+ /**
3684
+ * Created pad adjusting transaction id.
3685
+ */
3686
+ transactionId: string;
3687
+ };
3688
+
3689
+ export type FileImportDto = {
3690
+ /**
3691
+ * Bill file to import (CSV, PDF, OFX, etc.)
3692
+ */
3693
+ file: Blob | File;
3694
+ };
3695
+
3696
+ export type ImportErrorDto = {
3697
+ /**
3698
+ * Index of failed transaction in the file
3699
+ */
3700
+ index: number;
3701
+ /**
3702
+ * Error message
3703
+ */
3704
+ error: string;
3705
+ };
3706
+
3707
+ export type ReviewItemPreviewDto = {
3708
+ /**
3709
+ * Index in the import batch (for tracking)
3710
+ */
3711
+ index: number;
3712
+ /**
3713
+ * Transaction date (ISO format)
3714
+ */
3715
+ date: string;
3716
+ /**
3717
+ * Transaction amount (absolute value)
3718
+ */
3719
+ amount?: number;
3720
+ /**
3721
+ * Currency code
3722
+ */
3723
+ currency?: string;
3724
+ /**
3725
+ * Transaction narration/description
3726
+ */
3727
+ narration: string;
3728
+ /**
3729
+ * Payee name
3730
+ */
3731
+ payee?: string;
3732
+ /**
3733
+ * Inferred category from rule matching
3734
+ */
3735
+ category?: string;
3736
+ /**
3737
+ * Confidence score for the match (0-1)
3738
+ */
3739
+ confidence?: number;
3740
+ /**
3741
+ * Type of branch requiring review
3742
+ */
3743
+ branchType?:
3744
+ | 'DUPLICATE'
3745
+ | 'PAYEE_MATCH'
3746
+ | 'RULE_MATCH'
3747
+ | 'ACCOUNT_VALIDATION'
3748
+ | 'PIPELINE_ERROR';
3749
+ /**
3750
+ * Human-readable reasons for requiring review
3751
+ */
3752
+ reasons?: Array<string>;
3753
+ };
3754
+
3755
+ /**
3756
+ * Type of branch requiring review
3757
+ */
3758
+ export type branchType =
3759
+ | 'DUPLICATE'
3760
+ | 'PAYEE_MATCH'
3761
+ | 'RULE_MATCH'
3762
+ | 'ACCOUNT_VALIDATION'
3763
+ | 'PIPELINE_ERROR';
3197
3764
 
3198
3765
  export type ImportResultDto = {
3199
3766
  /**
@@ -3417,94 +3984,6 @@ export type UpdateImporterConfigDto = {
3417
3984
  data?: UpdateConfigDataDto;
3418
3985
  };
3419
3986
 
3420
- export type CreatePlatformDto = {
3421
- /**
3422
- * Platform name
3423
- */
3424
- name: string;
3425
- /**
3426
- * Platform canonical identifier (lowercase, kebab-case)
3427
- */
3428
- canonical: string;
3429
- /**
3430
- * Platform aliases (multi-language names for lookup)
3431
- */
3432
- aliases: Array<string>;
3433
- /**
3434
- * Platform URL
3435
- */
3436
- url: string;
3437
- /**
3438
- * Platform type
3439
- */
3440
- type:
3441
- | 'BANK'
3442
- | 'BROKERAGE'
3443
- | 'CRYPTO_EXCHANGE'
3444
- | 'PAYMENT'
3445
- | 'INVESTMENT'
3446
- | 'INSURANCE'
3447
- | 'OTHER';
3448
- /**
3449
- * Platform logo URL
3450
- */
3451
- logoUrl?: string;
3452
- /**
3453
- * Whether the platform is active
3454
- */
3455
- isActive?: boolean;
3456
- };
3457
-
3458
- /**
3459
- * Platform type
3460
- */
3461
- export type type3 =
3462
- | 'BANK'
3463
- | 'BROKERAGE'
3464
- | 'CRYPTO_EXCHANGE'
3465
- | 'PAYMENT'
3466
- | 'INVESTMENT'
3467
- | 'INSURANCE'
3468
- | 'OTHER';
3469
-
3470
- export type UpdatePlatformDto = {
3471
- /**
3472
- * Platform name
3473
- */
3474
- name?: string;
3475
- /**
3476
- * Platform canonical identifier (lowercase, kebab-case)
3477
- */
3478
- canonical?: string;
3479
- /**
3480
- * Platform aliases (multi-language names for lookup)
3481
- */
3482
- aliases?: Array<string>;
3483
- /**
3484
- * Platform URL
3485
- */
3486
- url?: string;
3487
- /**
3488
- * Platform type
3489
- */
3490
- type?:
3491
- | 'BANK'
3492
- | 'BROKERAGE'
3493
- | 'CRYPTO_EXCHANGE'
3494
- | 'PAYMENT'
3495
- | 'INVESTMENT'
3496
- | 'INSURANCE'
3497
- | 'OTHER';
3498
- /**
3499
- * Platform logo URL
3500
- */
3501
- logoUrl?: string;
3502
- /**
3503
- * Whether the platform is active
3504
- */
3505
- isActive?: boolean;
3506
- };
3507
-
3508
3987
  export type ProviderSyncConfigDto = {
3509
3988
  /**
3510
3989
  * Source account for the first posting
@@ -3526,6 +4005,10 @@ export type ProviderSyncConfigDto = {
3526
4005
  * Filter pending transactions
3527
4006
  */
3528
4007
  filterPending?: boolean;
4008
+ /**
4009
+ * External account ID for per-batch providers (e.g. GoCardless). Overrides sourceAccount when an ExternalAccountLink mapping exists.
4010
+ */
4011
+ externalAccountId?: string;
3529
4012
  };
3530
4013
 
3531
4014
  export type ProviderSyncDto = {
@@ -3581,6 +4064,61 @@ export type SupportedProvidersResponseDto = {
3581
4064
  providers: Array<string>;
3582
4065
  };
3583
4066
 
4067
+ export type CreateExternalAccountLinkDto = {
4068
+ /**
4069
+ * Open Banking provider (whitelist)
4070
+ */
4071
+ provider:
4072
+ | 'plaid'
4073
+ | 'teller'
4074
+ | 'truelayer'
4075
+ | 'gocardless'
4076
+ | 'simplefin'
4077
+ | 'yodlee'
4078
+ | 'beancount-direct'
4079
+ | 'parsed-bill';
4080
+ /**
4081
+ * External account ID from the provider
4082
+ */
4083
+ externalAccountId: string;
4084
+ /**
4085
+ * Target BeanAccount ID (must belong to the JWT user)
4086
+ */
4087
+ beanAccountId: string;
4088
+ };
4089
+
4090
+ /**
4091
+ * Open Banking provider (whitelist)
4092
+ */
4093
+ export type provider =
4094
+ | 'plaid'
4095
+ | 'teller'
4096
+ | 'truelayer'
4097
+ | 'gocardless'
4098
+ | 'simplefin'
4099
+ | 'yodlee'
4100
+ | 'beancount-direct'
4101
+ | 'parsed-bill';
4102
+
4103
+ export type ExternalAccountLinkResponseDto = {
4104
+ id: string;
4105
+ provider: string;
4106
+ externalAccountId: string;
4107
+ beanAccountId: string;
4108
+ isActive: boolean;
4109
+ createdAt: string;
4110
+ updatedAt: string;
4111
+ };
4112
+
4113
+ export type ExternalAccountLinkListResponseDto = {
4114
+ items: Array<ExternalAccountLinkResponseDto>;
4115
+ total: number;
4116
+ /**
4117
+ * Filter by provider (query param)
4118
+ */
4119
+ provider?: string;
4120
+ };
4121
+
3584
4122
  export type ParserTelemetryReportDto = unknown;
3585
4123
 
3586
4124
  export type UncoveredFormatMissDto = unknown;
@@ -3843,9 +4381,9 @@ export type NlpAccountConfirmationDataDto = {
3843
4381
  */
3844
4382
  invalidAccount: string;
3845
4383
  /**
3846
- * Suggested replacement account
4384
+ * Suggested replacement account (omitted when no clear candidate)
3847
4385
  */
3848
- suggestedAccount: string;
4386
+ suggestedAccount?: string;
3849
4387
  /**
3850
4388
  * Similar accounts for user selection
3851
4389
  */
@@ -4024,7 +4562,8 @@ export type NlpResponseDto = {
4024
4562
  | 'confirm_rule'
4025
4563
  | 'confirm_account'
4026
4564
  | 'confirm_payee'
4027
- | 'cancel';
4565
+ | 'cancel'
4566
+ | 'aborted';
4028
4567
  /**
4029
4568
  * Transaction intent detected by EntityRouter (v6.0: 5 core intents). Frontend uses this to render scenario-specific form fields.
4030
4569
  */
@@ -4138,7 +4677,8 @@ export type action2 =
4138
4677
  | 'confirm_rule'
4139
4678
  | 'confirm_account'
4140
4679
  | 'confirm_payee'
4141
- | 'cancel';
4680
+ | 'cancel'
4681
+ | 'aborted';
4142
4682
 
4143
4683
  /**
4144
4684
  * Transaction intent detected by EntityRouter (v6.0: 5 core intents). Frontend uses this to render scenario-specific form fields.
@@ -4160,26 +4700,212 @@ export type liabilitySubType = 'borrow' | 'repay';
4160
4700
  */
4161
4701
  export type equitySubType = 'opening' | 'adjustment';
4162
4702
 
4163
- export type BalanceByCurrencyDto = {
4703
+ export type PlatformListItemDto = {
4164
4704
  /**
4165
- * ISO 4217 currency code
4705
+ * Global platform ID
4166
4706
  */
4167
- currency: string;
4707
+ id: string;
4168
4708
  /**
4169
- * Balance amount
4709
+ * Platform name
4170
4710
  */
4171
- balance: string;
4172
- };
4173
-
4174
- export type NetWorthByCurrencyDto = {
4711
+ name: string;
4175
4712
  /**
4176
- * Net worth by currency
4713
+ * Platform URL
4177
4714
  */
4178
- netWorth: Array<BalanceByCurrencyDto>;
4715
+ url: string;
4179
4716
  /**
4180
- * Assets by currency
4717
+ * Platform type
4181
4718
  */
4182
- assets: Array<BalanceByCurrencyDto>;
4719
+ type:
4720
+ | 'BANK'
4721
+ | 'BROKERAGE'
4722
+ | 'CRYPTO_EXCHANGE'
4723
+ | 'PAYMENT'
4724
+ | 'INVESTMENT'
4725
+ | 'INSURANCE'
4726
+ | 'OTHER';
4727
+ /**
4728
+ * Canonical identifier in ACCOUNT_RE format (e.g., "icbc")
4729
+ */
4730
+ canonical: string;
4731
+ /**
4732
+ * Suggested path segment — canonical with first char uppercased (ACC_COMP_NAME_RE)
4733
+ */
4734
+ suggestedSegment: string;
4735
+ /**
4736
+ * Logo URL
4737
+ */
4738
+ logoUrl: string | null;
4739
+ /**
4740
+ * Whether user has accounts using this platform
4741
+ */
4742
+ isBound: boolean;
4743
+ };
4744
+
4745
+ /**
4746
+ * Platform type
4747
+ */
4748
+ export type type3 =
4749
+ | 'BANK'
4750
+ | 'BROKERAGE'
4751
+ | 'CRYPTO_EXCHANGE'
4752
+ | 'PAYMENT'
4753
+ | 'INVESTMENT'
4754
+ | 'INSURANCE'
4755
+ | 'OTHER';
4756
+
4757
+ export type PlatformMatchResultDto = {
4758
+ /**
4759
+ * Global platform ID
4760
+ */
4761
+ id: string;
4762
+ /**
4763
+ * Platform name (e.g., "ICBC")
4764
+ */
4765
+ name: string;
4766
+ /**
4767
+ * Canonical identifier in ACCOUNT_RE format (e.g., "icbc")
4768
+ */
4769
+ canonical: string;
4770
+ /**
4771
+ * Platform type
4772
+ */
4773
+ type:
4774
+ | 'BANK'
4775
+ | 'BROKERAGE'
4776
+ | 'CRYPTO_EXCHANGE'
4777
+ | 'PAYMENT'
4778
+ | 'INVESTMENT'
4779
+ | 'INSURANCE'
4780
+ | 'OTHER';
4781
+ /**
4782
+ * Suggested path segment — canonical, already in ACCOUNT_RE format
4783
+ */
4784
+ suggestedSegment: string;
4785
+ /**
4786
+ * Logo URL
4787
+ */
4788
+ logoUrl: string | null;
4789
+ /**
4790
+ * How this row matched: 'exact' > 'prefix' > 'substring'
4791
+ */
4792
+ matchType: 'exact' | 'prefix' | 'substring';
4793
+ };
4794
+
4795
+ /**
4796
+ * How this row matched: 'exact' > 'prefix' > 'substring'
4797
+ */
4798
+ export type matchType = 'exact' | 'prefix' | 'substring';
4799
+
4800
+ export type PlatformMatchResponseDto = {
4801
+ /**
4802
+ * Ranked matches, best tier first (at most 10 rows)
4803
+ */
4804
+ platforms: Array<PlatformMatchResultDto>;
4805
+ /**
4806
+ * Overall match quality — top row's tier, or 'none' when no hits
4807
+ */
4808
+ matchType: 'none' | 'exact' | 'prefix' | 'substring';
4809
+ /**
4810
+ * Total matches before LIMIT (truncation transparency)
4811
+ */
4812
+ total: number;
4813
+ /**
4814
+ * true when total > platforms.length (more matches exist)
4815
+ */
4816
+ hasMore: boolean;
4817
+ };
4818
+
4819
+ /**
4820
+ * Overall match quality — top row's tier, or 'none' when no hits
4821
+ */
4822
+ export type matchType2 = 'none' | 'exact' | 'prefix' | 'substring';
4823
+
4824
+ export type CreatePlatformDto = {
4825
+ /**
4826
+ * Platform name
4827
+ */
4828
+ name: string;
4829
+ /**
4830
+ * Platform canonical identifier (lowercase, kebab-case)
4831
+ */
4832
+ canonical: string;
4833
+ /**
4834
+ * Platform aliases (multi-language names for lookup)
4835
+ */
4836
+ aliases: Array<string>;
4837
+ /**
4838
+ * Platform URL
4839
+ */
4840
+ url: string;
4841
+ /**
4842
+ * Platform type
4843
+ */
4844
+ type:
4845
+ | 'BANK'
4846
+ | 'BROKERAGE'
4847
+ | 'CRYPTO_EXCHANGE'
4848
+ | 'PAYMENT'
4849
+ | 'INVESTMENT'
4850
+ | 'INSURANCE'
4851
+ | 'OTHER';
4852
+ /**
4853
+ * Platform logo URL
4854
+ */
4855
+ logoUrl?: string;
4856
+ /**
4857
+ * Whether the platform is active
4858
+ */
4859
+ isActive?: boolean;
4860
+ };
4861
+
4862
+ export type UpdatePlatformDto = {
4863
+ /**
4864
+ * Platform name
4865
+ */
4866
+ name?: string;
4867
+ /**
4868
+ * Platform canonical identifier (lowercase, kebab-case)
4869
+ */
4870
+ canonical?: string;
4871
+ /**
4872
+ * Platform aliases (multi-language names for lookup)
4873
+ */
4874
+ aliases?: Array<string>;
4875
+ /**
4876
+ * Platform URL
4877
+ */
4878
+ url?: string;
4879
+ /**
4880
+ * Platform type
4881
+ */
4882
+ type?:
4883
+ | 'BANK'
4884
+ | 'BROKERAGE'
4885
+ | 'CRYPTO_EXCHANGE'
4886
+ | 'PAYMENT'
4887
+ | 'INVESTMENT'
4888
+ | 'INSURANCE'
4889
+ | 'OTHER';
4890
+ /**
4891
+ * Platform logo URL
4892
+ */
4893
+ logoUrl?: string;
4894
+ /**
4895
+ * Whether the platform is active
4896
+ */
4897
+ isActive?: boolean;
4898
+ };
4899
+
4900
+ export type NetWorthByCurrencyDto = {
4901
+ /**
4902
+ * Net worth by currency
4903
+ */
4904
+ netWorth: Array<BalanceByCurrencyDto>;
4905
+ /**
4906
+ * Assets by currency
4907
+ */
4908
+ assets: Array<BalanceByCurrencyDto>;
4183
4909
  /**
4184
4910
  * Liabilities by currency
4185
4911
  */
@@ -4211,21 +4937,6 @@ export type ConvertedNetWorthDto = {
4211
4937
  };
4212
4938
  };
4213
4939
 
4214
- export type ExchangeRateWarningDto = {
4215
- /**
4216
- * Warning type
4217
- */
4218
- type: string;
4219
- /**
4220
- * Currency without exchange rate
4221
- */
4222
- currency: string;
4223
- /**
4224
- * Total amount affected
4225
- */
4226
- totalAmount: string;
4227
- };
4228
-
4229
4940
  export type NetWorthResponseDto = {
4230
4941
  /**
4231
4942
  * Total net worth (assets - liabilities, converted to base currency)
@@ -4290,6 +5001,10 @@ export type AccountItemDto = {
4290
5001
  * Currency code
4291
5002
  */
4292
5003
  currency: string;
5004
+ /**
5005
+ * FX-converted balance in base currency; omitted when not convertible
5006
+ */
5007
+ convertedBalance?: string;
4293
5008
  };
4294
5009
 
4295
5010
  export type PlatformGroupDto = {
@@ -4306,9 +5021,40 @@ export type PlatformGroupDto = {
4306
5021
  */
4307
5022
  accounts: Array<AccountItemDto>;
4308
5023
  /**
4309
- * Total balance across all accounts in platform
5024
+ * FX-converted total balance in base currency
4310
5025
  */
4311
5026
  totalBalance: string;
5027
+ /**
5028
+ * Raw (unconverted) balances grouped by currency
5029
+ */
5030
+ balanceByCurrency: Array<BalanceByCurrencyDto>;
5031
+ /**
5032
+ * Converted balance in base currency (omitted when no currency is convertible)
5033
+ */
5034
+ convertedBalance?: string;
5035
+ /**
5036
+ * Share of the grand converted total (0-100); 0 when grand total is 0
5037
+ */
5038
+ sharePct: number;
5039
+ };
5040
+
5041
+ export type AccountExchangeRateWarningDto = {
5042
+ /**
5043
+ * Warning type
5044
+ */
5045
+ type: string;
5046
+ /**
5047
+ * Currency without exchange rate
5048
+ */
5049
+ currency: string;
5050
+ /**
5051
+ * Affected account paths
5052
+ */
5053
+ accounts: Array<string>;
5054
+ /**
5055
+ * Total amount in this currency
5056
+ */
5057
+ totalAmount: string;
4312
5058
  };
4313
5059
 
4314
5060
  export type AccountsSummaryDto = {
@@ -4320,6 +5066,14 @@ export type AccountsSummaryDto = {
4320
5066
  * Total number of platforms
4321
5067
  */
4322
5068
  totalPlatforms: number;
5069
+ /**
5070
+ * Base currency for conversion
5071
+ */
5072
+ baseCurrency: string;
5073
+ /**
5074
+ * Per-account exchange rate warnings
5075
+ */
5076
+ warnings?: Array<AccountExchangeRateWarningDto>;
4323
5077
  };
4324
5078
 
4325
5079
  export type AccountsResponseDto = {
@@ -4354,6 +5108,10 @@ export type AccountItemWithAssetClassDto = {
4354
5108
  * Currency code
4355
5109
  */
4356
5110
  currency: string;
5111
+ /**
5112
+ * FX-converted balance in base currency; omitted when not convertible
5113
+ */
5114
+ convertedBalance?: string;
4357
5115
  /**
4358
5116
  * Asset class
4359
5117
  */
@@ -4435,25 +5193,6 @@ export type assetClass =
4435
5193
  | 'REAL_ESTATE'
4436
5194
  | 'INDEX';
4437
5195
 
4438
- export type AccountExchangeRateWarningDto = {
4439
- /**
4440
- * Warning type
4441
- */
4442
- type: string;
4443
- /**
4444
- * Currency without exchange rate
4445
- */
4446
- currency: string;
4447
- /**
4448
- * Affected account paths
4449
- */
4450
- accounts: Array<string>;
4451
- /**
4452
- * Total amount in this currency
4453
- */
4454
- totalAmount: string;
4455
- };
4456
-
4457
5196
  export type AssetClassSummaryDto = {
4458
5197
  /**
4459
5198
  * Total number of accounts
@@ -4625,7 +5364,7 @@ export type CategoryGroupDto = {
4625
5364
  */
4626
5365
  category: string;
4627
5366
  /**
4628
- * Converted total expense in base currency
5367
+ * Converted total for this category in base currency (expense amount when flow=expense, income amount when flow=income)
4629
5368
  */
4630
5369
  totalExpense: string;
4631
5370
  /**
@@ -4644,7 +5383,7 @@ export type CategoryGroupDto = {
4644
5383
 
4645
5384
  export type ExpensesByCategorySummaryDto = {
4646
5385
  /**
4647
- * Total expense across all categories (converted; convertible categories only)
5386
+ * Total across all categories, converted (convertible categories only); expense totals when flow=expense, income totals when flow=income
4648
5387
  */
4649
5388
  totalExpense: string;
4650
5389
  /**
@@ -4856,296 +5595,20 @@ export type type4 =
4856
5595
  | 'MIXED_COST_CURRENCY';
4857
5596
 
4858
5597
  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>;
5044
- };
5045
-
5046
- export type PortfolioTrendsResponseDto = {
5047
- /**
5048
- * Time series data points
5049
- */
5050
- series: Array<TimeSeriesPointDto>;
5051
- /**
5052
- * Period summary
5053
- */
5054
- summary: TrendSummaryDto;
5055
- /**
5056
- * Period requested
5057
- */
5058
- period: string;
5059
- /**
5060
- * Data granularity
5061
- */
5062
- granularity: string;
5063
- /**
5064
- * Base currency for converted values
5065
- */
5066
- currency: string;
5067
- /**
5068
- * Multi-currency time series (each point has currency breakdown)
5069
- */
5070
- byCurrency?: Array<MultiCurrencyPointDto>;
5071
- /**
5072
- * Exchange rate warnings
5073
- */
5074
- warnings?: Array<ExchangeRateWarningDto>;
5075
- };
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;
5598
+ asOfDate: string;
5599
+ baseCurrency: string;
5136
5600
  /**
5137
- * Exchange rate warnings (e.g. missing rate for a currency)
5601
+ * Realized-P&L lot-matching method (FIFO or average). Unrealized cost basis remains average regardless of this value (#473).
5138
5602
  */
5139
- warnings?: Array<ExchangeRateWarningDto>;
5603
+ method: 'average' | 'FIFO';
5604
+ rows: Array<HoldingPnlRowDto>;
5605
+ warnings: Array<HoldingPnlWarningDto>;
5140
5606
  };
5141
5607
 
5142
- export type GenerateSnapshotBody = unknown;
5143
-
5144
- export type GenerateSnapshotResponse = unknown;
5145
-
5146
- export type BackfillSnapshotsBody = unknown;
5147
-
5148
- export type BackfillSnapshotsResponse = unknown;
5608
+ /**
5609
+ * Realized-P&L lot-matching method (FIFO or average). Unrealized cost basis remains average regardless of this value (#473).
5610
+ */
5611
+ export type method = 'average' | 'FIFO';
5149
5612
 
5150
5613
  export type AnonymousLoginDto = {
5151
5614
  /**
@@ -5154,6 +5617,13 @@ export type AnonymousLoginDto = {
5154
5617
  accessToken: string;
5155
5618
  };
5156
5619
 
5620
+ export type AnonymousLoginResponseDto = {
5621
+ /**
5622
+ * JWT auth token
5623
+ */
5624
+ authToken: string;
5625
+ };
5626
+
5157
5627
  export type AccountControllerCreateData = {
5158
5628
  /**
5159
5629
  * Region code for tenant context
@@ -5182,7 +5652,7 @@ export type AccountControllerFindAllData = {
5182
5652
  */
5183
5653
  region: 'cn' | 'us' | 'de' | 'gb';
5184
5654
  /**
5185
- * Search term for path or i18nKey
5655
+ * Search term for account path
5186
5656
  */
5187
5657
  search?: string;
5188
5658
  /**
@@ -5265,6 +5735,21 @@ export type AccountControllerReopenData = {
5265
5735
 
5266
5736
  export type AccountControllerReopenResponse = AccountResponseDto;
5267
5737
 
5738
+ export type AccountControllerAddOpeningBalanceData = {
5739
+ /**
5740
+ * Account UUID
5741
+ */
5742
+ id: string;
5743
+ /**
5744
+ * Region code for tenant context
5745
+ */
5746
+ region: 'cn' | 'us' | 'de' | 'gb';
5747
+ requestBody: CreateOpeningBalanceDto;
5748
+ };
5749
+
5750
+ export type AccountControllerAddOpeningBalanceResponse =
5751
+ OpeningBalanceResultDto;
5752
+
5268
5753
  export type AccountStandardsControllerGetTemplatesData = {
5269
5754
  /**
5270
5755
  * Region code (cn, us, de)
@@ -5453,7 +5938,7 @@ export type TransactionControllerDeleteResponse = void;
5453
5938
 
5454
5939
  export type BalanceControllerGetBalanceData = {
5455
5940
  /**
5456
- * Account name (e.g., "Assets:Bank:Checking")
5941
+ * Account name (e.g., "Assets:Checking")
5457
5942
  */
5458
5943
  account: string;
5459
5944
  /**
@@ -5855,6 +6340,103 @@ export type CommodityControllerBulkCreateData = {
5855
6340
 
5856
6341
  export type CommodityControllerBulkCreateResponse = Array<CommodityResponseDto>;
5857
6342
 
6343
+ export type PriceControllerCreateData = {
6344
+ /**
6345
+ * Region code for tenant context
6346
+ */
6347
+ region: 'cn' | 'us' | 'de' | 'gb';
6348
+ requestBody: CreateBeanPriceDto;
6349
+ };
6350
+
6351
+ export type PriceControllerCreateResponse = PriceResponseDto;
6352
+
6353
+ export type PriceControllerFindAllData = {
6354
+ /**
6355
+ * Filter by currency (e.g., BTC, AAPL, USD)
6356
+ */
6357
+ currency?: string;
6358
+ /**
6359
+ * Filter prices from this date (ISO 8601 format)
6360
+ */
6361
+ dateFrom?: string;
6362
+ /**
6363
+ * Filter prices to this date (ISO 8601 format)
6364
+ */
6365
+ dateTo?: string;
6366
+ /**
6367
+ * Number of items per page (default: 20, max: 100)
6368
+ */
6369
+ limit?: number;
6370
+ /**
6371
+ * Page number for pagination (default: 1)
6372
+ */
6373
+ page?: number;
6374
+ /**
6375
+ * Filter by quote currency (pricing currency, e.g., USD, CNY)
6376
+ */
6377
+ quoteCurrency?: string;
6378
+ /**
6379
+ * Region code for tenant context
6380
+ */
6381
+ region: 'cn' | 'us' | 'de' | 'gb';
6382
+ /**
6383
+ * Search term for currency or quoteCurrency (case-insensitive partial match)
6384
+ */
6385
+ search?: string;
6386
+ };
6387
+
6388
+ export type PriceControllerFindAllResponse = PriceListResponseDto;
6389
+
6390
+ export type PriceControllerFindOneData = {
6391
+ /**
6392
+ * Price ID
6393
+ */
6394
+ id: string;
6395
+ /**
6396
+ * Region code for tenant context
6397
+ */
6398
+ region: 'cn' | 'us' | 'de' | 'gb';
6399
+ };
6400
+
6401
+ export type PriceControllerFindOneResponse = PriceResponseDto;
6402
+
6403
+ export type PriceControllerUpdateData = {
6404
+ /**
6405
+ * Price ID
6406
+ */
6407
+ id: string;
6408
+ /**
6409
+ * Region code for tenant context
6410
+ */
6411
+ region: 'cn' | 'us' | 'de' | 'gb';
6412
+ requestBody: UpdateBeanPriceDto;
6413
+ };
6414
+
6415
+ export type PriceControllerUpdateResponse = PriceResponseDto;
6416
+
6417
+ export type PriceControllerDeleteData = {
6418
+ /**
6419
+ * Price ID
6420
+ */
6421
+ id: string;
6422
+ /**
6423
+ * Region code for tenant context
6424
+ */
6425
+ region: 'cn' | 'us' | 'de' | 'gb';
6426
+ };
6427
+
6428
+ export type PriceControllerDeleteResponse = void;
6429
+
6430
+ export type PriceControllerBulkCreateData = {
6431
+ /**
6432
+ * Region code for tenant context
6433
+ */
6434
+ region: 'cn' | 'us' | 'de' | 'gb';
6435
+ requestBody: Array<string>;
6436
+ };
6437
+
6438
+ export type PriceControllerBulkCreateResponse = Array<PriceResponseDto>;
6439
+
5858
6440
  export type RecurringRuleControllerCreateData = {
5859
6441
  /**
5860
6442
  * Region code for tenant context
@@ -6003,90 +6585,238 @@ export type ExpectedTransactionControllerFindOneData = {
6003
6585
  region: 'cn' | 'us' | 'de' | 'gb';
6004
6586
  };
6005
6587
 
6006
- export type ExpectedTransactionControllerFindOneResponse =
6007
- ExpectedTransactionResponseDto;
6588
+ export type ExpectedTransactionControllerFindOneResponse =
6589
+ ExpectedTransactionResponseDto;
6590
+
6591
+ export type ExpectedTransactionControllerSkipData = {
6592
+ /**
6593
+ * Expected transaction ID
6594
+ */
6595
+ id: string;
6596
+ /**
6597
+ * Region code for tenant context
6598
+ */
6599
+ region: 'cn' | 'us' | 'de' | 'gb';
6600
+ };
6601
+
6602
+ export type ExpectedTransactionControllerSkipResponse =
6603
+ ExpectedTransactionResponseDto;
6604
+
6605
+ export type ExpectedTransactionControllerUndoSkipData = {
6606
+ /**
6607
+ * Expected transaction ID
6608
+ */
6609
+ id: string;
6610
+ /**
6611
+ * Region code for tenant context
6612
+ */
6613
+ region: 'cn' | 'us' | 'de' | 'gb';
6614
+ };
6615
+
6616
+ export type ExpectedTransactionControllerUndoSkipResponse =
6617
+ ExpectedTransactionResponseDto;
6618
+
6619
+ export type ExpectedTransactionControllerConfirmMatchData = {
6620
+ /**
6621
+ * Expected transaction ID
6622
+ */
6623
+ id: string;
6624
+ /**
6625
+ * Region code for tenant context
6626
+ */
6627
+ region: 'cn' | 'us' | 'de' | 'gb';
6628
+ requestBody: ConfirmMatchDto;
6629
+ };
6630
+
6631
+ export type ExpectedTransactionControllerConfirmMatchResponse = unknown;
6632
+
6633
+ export type ExpectedTransactionControllerUnmatchData = {
6634
+ /**
6635
+ * Expected transaction ID
6636
+ */
6637
+ id: string;
6638
+ /**
6639
+ * Region code for tenant context
6640
+ */
6641
+ region: 'cn' | 'us' | 'de' | 'gb';
6642
+ };
6643
+
6644
+ export type ExpectedTransactionControllerUnmatchResponse = unknown;
6645
+
6646
+ export type ExpectedTransactionControllerEnterNowData = {
6647
+ /**
6648
+ * Expected transaction ID
6649
+ */
6650
+ id: string;
6651
+ /**
6652
+ * Region code for tenant context
6653
+ */
6654
+ region: 'cn' | 'us' | 'de' | 'gb';
6655
+ requestBody: EnterNowDto;
6656
+ };
6657
+
6658
+ export type ExpectedTransactionControllerEnterNowResponse = unknown;
6659
+
6660
+ export type ForecastControllerGetForecastData = {
6661
+ /**
6662
+ * Number of months to forecast (1-12, default 3)
6663
+ */
6664
+ months?: number;
6665
+ /**
6666
+ * Region code for tenant context
6667
+ */
6668
+ region: 'cn' | 'us' | 'de' | 'gb';
6669
+ };
6670
+
6671
+ export type ForecastControllerGetForecastResponse = ForecastResponseDto;
6672
+
6673
+ export type ReportingControllerGetPortfolioTrendsData = {
6674
+ /**
6675
+ * Data granularity
6676
+ */
6677
+ granularity?: 'day' | 'week' | 'month';
6678
+ /**
6679
+ * Time period
6680
+ */
6681
+ period?: '1m' | '3m' | '6m' | '1y';
6682
+ /**
6683
+ * Region code for tenant context
6684
+ */
6685
+ region: 'cn' | 'us' | 'de' | 'gb';
6686
+ };
6687
+
6688
+ export type ReportingControllerGetPortfolioTrendsResponse =
6689
+ PortfolioTrendsResponseDto;
6690
+
6691
+ export type ReportingControllerGetCashFlowTrendsData = {
6692
+ /**
6693
+ * Data granularity (accepted for API symmetry; v1 returns month buckets)
6694
+ */
6695
+ granularity?: 'day' | 'week' | 'month';
6696
+ /**
6697
+ * Time period
6698
+ */
6699
+ period?: '1m' | '3m' | '6m' | '1y';
6700
+ /**
6701
+ * Region code for tenant context
6702
+ */
6703
+ region: 'cn' | 'us' | 'de' | 'gb';
6704
+ };
6705
+
6706
+ export type ReportingControllerGetCashFlowTrendsResponse =
6707
+ CashFlowTrendsResponseDto;
6708
+
6709
+ export type ReportingControllerGenerateSnapshotData = {
6710
+ /**
6711
+ * Region code for tenant context
6712
+ */
6713
+ region: 'cn' | 'us' | 'de' | 'gb';
6714
+ /**
6715
+ * Optional date (defaults to today)
6716
+ */
6717
+ requestBody: GenerateSnapshotBody;
6718
+ };
6719
+
6720
+ export type ReportingControllerGenerateSnapshotResponse =
6721
+ GenerateSnapshotResponse;
6008
6722
 
6009
- export type ExpectedTransactionControllerSkipData = {
6010
- /**
6011
- * Expected transaction ID
6012
- */
6013
- id: string;
6723
+ export type ReportingControllerBackfillSnapshotsData = {
6014
6724
  /**
6015
6725
  * Region code for tenant context
6016
6726
  */
6017
6727
  region: 'cn' | 'us' | 'de' | 'gb';
6728
+ requestBody: BackfillSnapshotsBody;
6018
6729
  };
6019
6730
 
6020
- export type ExpectedTransactionControllerSkipResponse =
6021
- ExpectedTransactionResponseDto;
6731
+ export type ReportingControllerBackfillSnapshotsResponse =
6732
+ BackfillSnapshotsResponse;
6022
6733
 
6023
- export type ExpectedTransactionControllerUndoSkipData = {
6734
+ export type UserControllerDeleteOwnUserData = {
6735
+ requestBody: DeleteOwnUserDto;
6736
+ };
6737
+
6738
+ export type UserControllerDeleteOwnUserResponse = void;
6739
+
6740
+ export type UserControllerGetUserData = {
6741
+ acceptLanguage: string;
6742
+ };
6743
+
6744
+ export type UserControllerGetUserResponse = unknown;
6745
+
6746
+ export type UserControllerSignupUserData = {
6747
+ requestBody: SignupDto;
6748
+ };
6749
+
6750
+ export type UserControllerSignupUserResponse = SignupResponseDto;
6751
+
6752
+ export type UserControllerDeleteUserData = {
6024
6753
  /**
6025
- * Expected transaction ID
6754
+ * User ID to delete
6026
6755
  */
6027
6756
  id: string;
6028
- /**
6029
- * Region code for tenant context
6030
- */
6031
- region: 'cn' | 'us' | 'de' | 'gb';
6032
6757
  };
6033
6758
 
6034
- export type ExpectedTransactionControllerUndoSkipResponse =
6035
- ExpectedTransactionResponseDto;
6759
+ export type UserControllerDeleteUserResponse = void;
6036
6760
 
6037
- export type ExpectedTransactionControllerConfirmMatchData = {
6761
+ export type UserControllerGetUserInfoData = {
6038
6762
  /**
6039
- * Expected transaction ID
6763
+ * User ID
6040
6764
  */
6041
6765
  id: string;
6042
- /**
6043
- * Region code for tenant context
6044
- */
6045
- region: 'cn' | 'us' | 'de' | 'gb';
6046
- requestBody: ConfirmMatchDto;
6047
6766
  };
6048
6767
 
6049
- export type ExpectedTransactionControllerConfirmMatchResponse = unknown;
6768
+ export type UserControllerGetUserInfoResponse = unknown;
6050
6769
 
6051
- export type ExpectedTransactionControllerUnmatchData = {
6770
+ export type UserControllerUpdateUserSettingData = {
6771
+ requestBody: UpdateUserSettingDto;
6772
+ };
6773
+
6774
+ export type UserControllerUpdateUserSettingResponse = unknown;
6775
+
6776
+ export type UserControllerGetAllUserSettingsByPageData = {
6052
6777
  /**
6053
- * Expected transaction ID
6778
+ * Page number
6054
6779
  */
6055
- id: string;
6780
+ pageNo: number;
6056
6781
  /**
6057
- * Region code for tenant context
6782
+ * Page size
6058
6783
  */
6059
- region: 'cn' | 'us' | 'de' | 'gb';
6784
+ pageSize: number;
6060
6785
  };
6061
6786
 
6062
- export type ExpectedTransactionControllerUnmatchResponse = unknown;
6787
+ export type UserControllerGetAllUserSettingsByPageResponse = unknown;
6063
6788
 
6064
- export type ExpectedTransactionControllerEnterNowData = {
6065
- /**
6066
- * Expected transaction ID
6067
- */
6068
- id: string;
6789
+ export type UserControllerGetAssetLiabilitySummaryResponse = unknown;
6790
+
6791
+ export type PropertyControllerGetAllResponse = unknown;
6792
+
6793
+ export type PropertyControllerGetByKeyData = {
6069
6794
  /**
6070
- * Region code for tenant context
6795
+ * Property key
6071
6796
  */
6072
- region: 'cn' | 'us' | 'de' | 'gb';
6073
- requestBody: EnterNowDto;
6797
+ key: string;
6074
6798
  };
6075
6799
 
6076
- export type ExpectedTransactionControllerEnterNowResponse = unknown;
6800
+ export type PropertyControllerGetByKeyResponse = unknown;
6077
6801
 
6078
- export type ForecastControllerGetForecastData = {
6802
+ export type PropertyControllerUpdateData = {
6079
6803
  /**
6080
- * Number of months to forecast (1-12, default 3)
6804
+ * Property key
6081
6805
  */
6082
- months?: number;
6806
+ key: string;
6807
+ requestBody: UpdatePropertyDto;
6808
+ };
6809
+
6810
+ export type PropertyControllerUpdateResponse = unknown;
6811
+
6812
+ export type PropertyControllerDeleteData = {
6083
6813
  /**
6084
- * Region code for tenant context
6814
+ * Property key
6085
6815
  */
6086
- region: 'cn' | 'us' | 'de' | 'gb';
6816
+ key: string;
6087
6817
  };
6088
6818
 
6089
- export type ForecastControllerGetForecastResponse = ForecastResponseDto;
6819
+ export type PropertyControllerDeleteResponse = void;
6090
6820
 
6091
6821
  export type TransactionRuleControllerCreateData = {
6092
6822
  /**
@@ -6233,93 +6963,6 @@ export type TransactionRuleControllerTestData = {
6233
6963
 
6234
6964
  export type TransactionRuleControllerTestResponse = TestRuleResponseDto;
6235
6965
 
6236
- export type UserControllerDeleteOwnUserData = {
6237
- requestBody: DeleteOwnUserDto;
6238
- };
6239
-
6240
- export type UserControllerDeleteOwnUserResponse = void;
6241
-
6242
- export type UserControllerGetUserData = {
6243
- acceptLanguage: string;
6244
- };
6245
-
6246
- export type UserControllerGetUserResponse = unknown;
6247
-
6248
- export type UserControllerSignupUserData = {
6249
- requestBody: SignupDto;
6250
- };
6251
-
6252
- export type UserControllerSignupUserResponse = unknown;
6253
-
6254
- export type UserControllerDeleteUserData = {
6255
- /**
6256
- * User ID to delete
6257
- */
6258
- id: string;
6259
- };
6260
-
6261
- export type UserControllerDeleteUserResponse = void;
6262
-
6263
- export type UserControllerGetUserInfoData = {
6264
- /**
6265
- * User ID
6266
- */
6267
- id: string;
6268
- };
6269
-
6270
- export type UserControllerGetUserInfoResponse = unknown;
6271
-
6272
- export type UserControllerUpdateUserSettingData = {
6273
- requestBody: UpdateUserSettingDto;
6274
- };
6275
-
6276
- export type UserControllerUpdateUserSettingResponse = unknown;
6277
-
6278
- export type UserControllerGetAllUserSettingsByPageData = {
6279
- /**
6280
- * Page number
6281
- */
6282
- pageNo: number;
6283
- /**
6284
- * Page size
6285
- */
6286
- pageSize: number;
6287
- };
6288
-
6289
- export type UserControllerGetAllUserSettingsByPageResponse = unknown;
6290
-
6291
- export type UserControllerGetAssetLiabilitySummaryResponse = unknown;
6292
-
6293
- export type PropertyControllerGetAllResponse = unknown;
6294
-
6295
- export type PropertyControllerGetByKeyData = {
6296
- /**
6297
- * Property key
6298
- */
6299
- key: string;
6300
- };
6301
-
6302
- export type PropertyControllerGetByKeyResponse = unknown;
6303
-
6304
- export type PropertyControllerUpdateData = {
6305
- /**
6306
- * Property key
6307
- */
6308
- key: string;
6309
- requestBody: UpdatePropertyDto;
6310
- };
6311
-
6312
- export type PropertyControllerUpdateResponse = unknown;
6313
-
6314
- export type PropertyControllerDeleteData = {
6315
- /**
6316
- * Property key
6317
- */
6318
- key: string;
6319
- };
6320
-
6321
- export type PropertyControllerDeleteResponse = void;
6322
-
6323
6966
  export type EventControllerCreateData = {
6324
6967
  /**
6325
6968
  * Region code for tenant context (decorative for life events)
@@ -6374,49 +7017,104 @@ export type EventControllerFindOneData = {
6374
7017
  region: 'cn' | 'us' | 'de' | 'gb';
6375
7018
  };
6376
7019
 
6377
- export type EventControllerFindOneResponse = EventResponseDto;
7020
+ export type EventControllerFindOneResponse = EventResponseDto;
7021
+
7022
+ export type EventControllerUpdateData = {
7023
+ /**
7024
+ * Life event ID
7025
+ */
7026
+ id: string;
7027
+ /**
7028
+ * Region code for tenant context (decorative for life events)
7029
+ */
7030
+ region: 'cn' | 'us' | 'de' | 'gb';
7031
+ requestBody: UpdateBeanEventDto;
7032
+ };
7033
+
7034
+ export type EventControllerUpdateResponse = EventResponseDto;
7035
+
7036
+ export type EventControllerDeleteData = {
7037
+ /**
7038
+ * Life event ID
7039
+ */
7040
+ id: string;
7041
+ /**
7042
+ * Region code for tenant context (decorative for life events)
7043
+ */
7044
+ region: 'cn' | 'us' | 'de' | 'gb';
7045
+ };
7046
+
7047
+ export type EventControllerDeleteResponse = void;
7048
+
7049
+ export type EventControllerGetSliceData = {
7050
+ accountPattern: string;
7051
+ granularity: string;
7052
+ /**
7053
+ * Life event ID
7054
+ */
7055
+ id: string;
7056
+ /**
7057
+ * Region code for tenant context (decorative for life events)
7058
+ */
7059
+ region: 'cn' | 'us' | 'de' | 'gb';
7060
+ };
7061
+
7062
+ export type EventControllerGetSliceResponse = unknown;
7063
+
7064
+ export type OnboardingControllerBootstrapData = {
7065
+ /**
7066
+ * Region code for tenant context
7067
+ */
7068
+ region: 'cn' | 'us' | 'de' | 'gb';
7069
+ requestBody: OnboardingDto;
7070
+ };
7071
+
7072
+ export type OnboardingControllerBootstrapResponse = unknown;
7073
+
7074
+ export type ReconciliationControllerComputeData = {
7075
+ /**
7076
+ * Region code for tenant context (decorative for reconciliation)
7077
+ */
7078
+ region: 'cn' | 'us' | 'de' | 'gb';
7079
+ requestBody: ComputeReconciliationDto;
7080
+ };
7081
+
7082
+ export type ReconciliationControllerComputeResponse =
7083
+ ReconciliationComputeResultDto;
6378
7084
 
6379
- export type EventControllerUpdateData = {
6380
- /**
6381
- * Life event ID
6382
- */
6383
- id: string;
7085
+ export type ReconciliationControllerAssertData = {
6384
7086
  /**
6385
- * Region code for tenant context (decorative for life events)
7087
+ * Region code for tenant context (decorative for reconciliation)
6386
7088
  */
6387
7089
  region: 'cn' | 'us' | 'de' | 'gb';
6388
- requestBody: UpdateBeanEventDto;
7090
+ requestBody: AssertReconciliationDto;
6389
7091
  };
6390
7092
 
6391
- export type EventControllerUpdateResponse = EventResponseDto;
7093
+ export type ReconciliationControllerAssertResponse = ReconciliationRecordDto;
6392
7094
 
6393
- export type EventControllerDeleteData = {
6394
- /**
6395
- * Life event ID
6396
- */
6397
- id: string;
7095
+ export type ReconciliationControllerPadData = {
6398
7096
  /**
6399
- * Region code for tenant context (decorative for life events)
7097
+ * Region code for tenant context (decorative for reconciliation)
6400
7098
  */
6401
7099
  region: 'cn' | 'us' | 'de' | 'gb';
7100
+ requestBody: PadReconciliationDto;
6402
7101
  };
6403
7102
 
6404
- export type EventControllerDeleteResponse = void;
7103
+ export type ReconciliationControllerPadResponse = PadResultDto;
6405
7104
 
6406
- export type EventControllerGetSliceData = {
6407
- accountPattern: string;
6408
- granularity: string;
7105
+ export type ReconciliationControllerHistoryData = {
6409
7106
  /**
6410
- * Life event ID
7107
+ * BeanAccount id
6411
7108
  */
6412
- id: string;
7109
+ accountId: string;
6413
7110
  /**
6414
- * Region code for tenant context (decorative for life events)
7111
+ * Region code for tenant context (decorative for reconciliation)
6415
7112
  */
6416
7113
  region: 'cn' | 'us' | 'de' | 'gb';
6417
7114
  };
6418
7115
 
6419
- export type EventControllerGetSliceResponse = unknown;
7116
+ export type ReconciliationControllerHistoryResponse =
7117
+ Array<ReconciliationRecordDto>;
6420
7118
 
6421
7119
  export type ExportControllerExportBeancountResponse = unknown;
6422
7120
 
@@ -6510,48 +7208,6 @@ export type ImporterConfigControllerResetConfigData = {
6510
7208
 
6511
7209
  export type ImporterConfigControllerResetConfigResponse = ImporterConfigDto;
6512
7210
 
6513
- export type PlatformControllerFindAllResponse = unknown;
6514
-
6515
- export type PlatformControllerCreateData = {
6516
- requestBody: CreatePlatformDto;
6517
- };
6518
-
6519
- export type PlatformControllerCreateResponse = unknown;
6520
-
6521
- export type PlatformControllerGetPlatformListResponse = unknown;
6522
-
6523
- export type PlatformControllerMatchPlatformsData = {
6524
- /**
6525
- * Search query — Chinese name, English name, or abbreviation
6526
- */
6527
- q: string;
6528
- /**
6529
- * Region code for category override lookup
6530
- */
6531
- region?: string;
6532
- };
6533
-
6534
- export type PlatformControllerMatchPlatformsResponse = unknown;
6535
-
6536
- export type PlatformControllerUpdateData = {
6537
- /**
6538
- * Platform ID
6539
- */
6540
- id: string;
6541
- requestBody: UpdatePlatformDto;
6542
- };
6543
-
6544
- export type PlatformControllerUpdateResponse = unknown;
6545
-
6546
- export type PlatformControllerDeleteData = {
6547
- /**
6548
- * Platform ID
6549
- */
6550
- id: string;
6551
- };
6552
-
6553
- export type PlatformControllerDeleteResponse = void;
6554
-
6555
7211
  export type ProviderSyncControllerSyncData = {
6556
7212
  /**
6557
7213
  * Provider name
@@ -6597,6 +7253,49 @@ export type ProviderSyncControllerIsProviderSupportedData = {
6597
7253
 
6598
7254
  export type ProviderSyncControllerIsProviderSupportedResponse = unknown;
6599
7255
 
7256
+ export type ExternalAccountLinkControllerCreateData = {
7257
+ /**
7258
+ * Region code for tenant context
7259
+ */
7260
+ region: 'cn' | 'us' | 'de' | 'gb';
7261
+ requestBody: CreateExternalAccountLinkDto;
7262
+ };
7263
+
7264
+ export type ExternalAccountLinkControllerCreateResponse =
7265
+ ExternalAccountLinkResponseDto;
7266
+
7267
+ export type ExternalAccountLinkControllerFindAllData = {
7268
+ provider: string;
7269
+ /**
7270
+ * Region code for tenant context
7271
+ */
7272
+ region: 'cn' | 'us' | 'de' | 'gb';
7273
+ };
7274
+
7275
+ export type ExternalAccountLinkControllerFindAllResponse =
7276
+ ExternalAccountLinkListResponseDto;
7277
+
7278
+ export type ExternalAccountLinkControllerFindOneData = {
7279
+ id: string;
7280
+ /**
7281
+ * Region code for tenant context
7282
+ */
7283
+ region: 'cn' | 'us' | 'de' | 'gb';
7284
+ };
7285
+
7286
+ export type ExternalAccountLinkControllerFindOneResponse =
7287
+ ExternalAccountLinkResponseDto;
7288
+
7289
+ export type ExternalAccountLinkControllerRemoveData = {
7290
+ id: string;
7291
+ /**
7292
+ * Region code for tenant context
7293
+ */
7294
+ region: 'cn' | 'us' | 'de' | 'gb';
7295
+ };
7296
+
7297
+ export type ExternalAccountLinkControllerRemoveResponse = void;
7298
+
6600
7299
  export type TelemetryControllerReportTelemetryData = {
6601
7300
  /**
6602
7301
  * Region code for tenant context
@@ -6669,221 +7368,114 @@ export type NlpControllerGetSessionData = {
6669
7368
 
6670
7369
  export type NlpControllerGetSessionResponse = unknown;
6671
7370
 
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;
7371
+ export type PlatformControllerFindAllResponse = unknown;
6743
7372
 
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';
7373
+ export type PlatformControllerCreateData = {
7374
+ requestBody: CreatePlatformDto;
6761
7375
  };
6762
7376
 
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
- };
7377
+ export type PlatformControllerCreateResponse = unknown;
6772
7378
 
6773
- export type PriceControllerCreateResponse = PriceResponseDto;
7379
+ export type PlatformControllerGetPlatformListResponse =
7380
+ Array<PlatformListItemDto>;
6774
7381
 
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;
6796
- /**
6797
- * Filter by quote currency (pricing currency, e.g., USD, CNY)
6798
- */
6799
- quoteCurrency?: string;
7382
+ export type PlatformControllerMatchPlatformsData = {
6800
7383
  /**
6801
- * Region code for tenant context
7384
+ * Search query — Chinese name, English name, or abbreviation
6802
7385
  */
6803
- region: 'cn' | 'us' | 'de' | 'gb';
7386
+ q: string;
6804
7387
  /**
6805
- * Search term for currency or quoteCurrency (case-insensitive partial match)
7388
+ * Region code for category override lookup
6806
7389
  */
6807
- search?: string;
7390
+ region?: string;
6808
7391
  };
6809
7392
 
6810
- export type PriceControllerFindAllResponse = PriceListResponseDto;
7393
+ export type PlatformControllerMatchPlatformsResponse = PlatformMatchResponseDto;
6811
7394
 
6812
- export type PriceControllerFindOneData = {
7395
+ export type PlatformControllerUpdateData = {
6813
7396
  /**
6814
- * Price ID
7397
+ * Platform ID
6815
7398
  */
6816
7399
  id: string;
6817
- /**
6818
- * Region code for tenant context
6819
- */
6820
- region: 'cn' | 'us' | 'de' | 'gb';
7400
+ requestBody: UpdatePlatformDto;
6821
7401
  };
6822
7402
 
6823
- export type PriceControllerFindOneResponse = PriceResponseDto;
7403
+ export type PlatformControllerUpdateResponse = unknown;
6824
7404
 
6825
- export type PriceControllerUpdateData = {
7405
+ export type PlatformControllerDeleteData = {
6826
7406
  /**
6827
- * Price ID
7407
+ * Platform ID
6828
7408
  */
6829
7409
  id: string;
6830
- /**
6831
- * Region code for tenant context
6832
- */
6833
- region: 'cn' | 'us' | 'de' | 'gb';
6834
- requestBody: UpdateBeanPriceDto;
6835
7410
  };
6836
7411
 
6837
- export type PriceControllerUpdateResponse = PriceResponseDto;
7412
+ export type PlatformControllerDeleteResponse = void;
6838
7413
 
6839
- export type PriceControllerDeleteData = {
7414
+ export type DashboardControllerGetNetWorthData = {
6840
7415
  /**
6841
- * Price ID
7416
+ * Date for balance calculation (ISO 8601 format)
6842
7417
  */
6843
- id: string;
7418
+ date?: string;
6844
7419
  /**
6845
7420
  * Region code for tenant context
6846
7421
  */
6847
7422
  region: 'cn' | 'us' | 'de' | 'gb';
6848
7423
  };
6849
7424
 
6850
- export type PriceControllerDeleteResponse = void;
7425
+ export type DashboardControllerGetNetWorthResponse = NetWorthResponseDto;
6851
7426
 
6852
- export type PriceControllerBulkCreateData = {
7427
+ export type DashboardControllerGetAccountsData = {
7428
+ /**
7429
+ * Scope to a single account (only valid with groupBy=holdingAssetClass, ADR-0105 §6)
7430
+ */
7431
+ accountId?: string;
7432
+ /**
7433
+ * Date for balance calculation (ISO 8601 format)
7434
+ */
7435
+ date?: string;
7436
+ /**
7437
+ * Grouping strategy
7438
+ */
7439
+ groupBy?:
7440
+ | 'platform'
7441
+ | 'assetClass'
7442
+ | 'holdingAssetClass'
7443
+ | 'holdingAssetClassByAccount';
6853
7444
  /**
6854
7445
  * Region code for tenant context
6855
7446
  */
6856
7447
  region: 'cn' | 'us' | 'de' | 'gb';
6857
- requestBody: Array<string>;
6858
7448
  };
6859
7449
 
6860
- export type PriceControllerBulkCreateResponse = Array<PriceResponseDto>;
7450
+ export type DashboardControllerGetAccountsResponse =
7451
+ | AccountsResponseDto
7452
+ | AssetClassAccountsResponseDto
7453
+ | HoldingAssetClassCrossAccountResponseDto;
6861
7454
 
6862
- export type ReportingControllerGetPortfolioTrendsData = {
6863
- /**
6864
- * Data granularity
6865
- */
6866
- granularity?: 'day' | 'week' | 'month';
7455
+ export type DashboardControllerGetCashFlowData = {
6867
7456
  /**
6868
- * Time period
7457
+ * Period in YYYY-MM format
6869
7458
  */
6870
- period?: '1m' | '3m' | '6m' | '1y';
7459
+ period: string;
6871
7460
  /**
6872
7461
  * Region code for tenant context
6873
7462
  */
6874
7463
  region: 'cn' | 'us' | 'de' | 'gb';
6875
7464
  };
6876
7465
 
6877
- export type ReportingControllerGetPortfolioTrendsResponse =
6878
- PortfolioTrendsResponseDto;
7466
+ export type DashboardControllerGetCashFlowResponse = CashFlowResponseDto;
6879
7467
 
6880
- export type ReportingControllerGetCashFlowTrendsData = {
7468
+ export type DashboardControllerGetExpensesData = {
6881
7469
  /**
6882
- * Data granularity (accepted for API symmetry; v1 returns month buckets)
7470
+ * Account root to aggregate (expense → ^Expenses:, income → ^Income:)
6883
7471
  */
6884
- granularity?: 'day' | 'week' | 'month';
7472
+ flow?: 'expense' | 'income';
6885
7473
  /**
6886
- * Time period
7474
+ * Grouping strategy
7475
+ */
7476
+ groupBy?: 'category';
7477
+ /**
7478
+ * Time window (1m = current calendar month)
6887
7479
  */
6888
7480
  period?: '1m' | '3m' | '6m' | '1y';
6889
7481
  /**
@@ -6892,33 +7484,29 @@ export type ReportingControllerGetCashFlowTrendsData = {
6892
7484
  region: 'cn' | 'us' | 'de' | 'gb';
6893
7485
  };
6894
7486
 
6895
- export type ReportingControllerGetCashFlowTrendsResponse =
6896
- CashFlowTrendsResponseDto;
7487
+ export type DashboardControllerGetExpensesResponse =
7488
+ ExpensesByCategoryResponseDto;
6897
7489
 
6898
- export type ReportingControllerGenerateSnapshotData = {
7490
+ export type HoldingPnlControllerGetHoldingPnlData = {
6899
7491
  /**
6900
- * Region code for tenant context
7492
+ * Scope to a single account
6901
7493
  */
6902
- region: 'cn' | 'us' | 'de' | 'gb';
7494
+ accountId?: string;
6903
7495
  /**
6904
- * Optional date (defaults to today)
7496
+ * As-of date (ISO 8601), defaults to today
6905
7497
  */
6906
- requestBody: GenerateSnapshotBody;
6907
- };
6908
-
6909
- export type ReportingControllerGenerateSnapshotResponse =
6910
- GenerateSnapshotResponse;
6911
-
6912
- export type ReportingControllerBackfillSnapshotsData = {
7498
+ asOf?: string;
7499
+ /**
7500
+ * Realized-P&L lot-matching method (default average). Does not affect the average-cost unrealized basis.
7501
+ */
7502
+ method?: 'FIFO' | 'average';
6913
7503
  /**
6914
7504
  * Region code for tenant context
6915
7505
  */
6916
7506
  region: 'cn' | 'us' | 'de' | 'gb';
6917
- requestBody: BackfillSnapshotsBody;
6918
7507
  };
6919
7508
 
6920
- export type ReportingControllerBackfillSnapshotsResponse =
6921
- BackfillSnapshotsResponse;
7509
+ export type HoldingPnlControllerGetHoldingPnlResponse = HoldingPnlResponseDto;
6922
7510
 
6923
7511
  export type ApiKeysControllerCreateApiKeyResponse = unknown;
6924
7512
 
@@ -6926,7 +7514,7 @@ export type AuthControllerAccessTokenLoginData = {
6926
7514
  requestBody: AnonymousLoginDto;
6927
7515
  };
6928
7516
 
6929
- export type AuthControllerAccessTokenLoginResponse = unknown;
7517
+ export type AuthControllerAccessTokenLoginResponse = AnonymousLoginResponseDto;
6930
7518
 
6931
7519
  export type CacheControllerFlushCacheResponse = unknown;
6932
7520
 
@@ -7074,6 +7662,25 @@ export type $OpenApiTs = {
7074
7662
  };
7075
7663
  };
7076
7664
  };
7665
+ '/api/v1/{region}/bean/accounts/{id}/opening-balance': {
7666
+ post: {
7667
+ req: AccountControllerAddOpeningBalanceData;
7668
+ res: {
7669
+ /**
7670
+ * Opening-balance transaction created
7671
+ */
7672
+ 201: OpeningBalanceResultDto;
7673
+ /**
7674
+ * Account not found
7675
+ */
7676
+ 404: unknown;
7677
+ /**
7678
+ * An opening balance already exists for this account
7679
+ */
7680
+ 409: unknown;
7681
+ };
7682
+ };
7683
+ };
7077
7684
  '/api/v1/{region}/bean/account-standards': {
7078
7685
  get: {
7079
7686
  req: AccountStandardsControllerGetTemplatesData;
@@ -7682,6 +8289,90 @@ export type $OpenApiTs = {
7682
8289
  };
7683
8290
  };
7684
8291
  };
8292
+ '/api/v1/{region}/bean/prices': {
8293
+ post: {
8294
+ req: PriceControllerCreateData;
8295
+ res: {
8296
+ /**
8297
+ * Price created successfully
8298
+ */
8299
+ 201: PriceResponseDto;
8300
+ /**
8301
+ * Currency or quoteCurrency commodity not found
8302
+ */
8303
+ 404: unknown;
8304
+ /**
8305
+ * Price already exists for this currency pair and date
8306
+ */
8307
+ 409: unknown;
8308
+ };
8309
+ };
8310
+ get: {
8311
+ req: PriceControllerFindAllData;
8312
+ res: {
8313
+ /**
8314
+ * Prices retrieved successfully
8315
+ */
8316
+ 200: PriceListResponseDto;
8317
+ };
8318
+ };
8319
+ };
8320
+ '/api/v1/{region}/bean/prices/{id}': {
8321
+ get: {
8322
+ req: PriceControllerFindOneData;
8323
+ res: {
8324
+ /**
8325
+ * Price retrieved successfully
8326
+ */
8327
+ 200: PriceResponseDto;
8328
+ /**
8329
+ * Price not found
8330
+ */
8331
+ 404: unknown;
8332
+ };
8333
+ };
8334
+ put: {
8335
+ req: PriceControllerUpdateData;
8336
+ res: {
8337
+ /**
8338
+ * Price updated successfully
8339
+ */
8340
+ 200: PriceResponseDto;
8341
+ /**
8342
+ * Price not found
8343
+ */
8344
+ 404: unknown;
8345
+ /**
8346
+ * Updated price conflicts with existing price
8347
+ */
8348
+ 409: unknown;
8349
+ };
8350
+ };
8351
+ delete: {
8352
+ req: PriceControllerDeleteData;
8353
+ res: {
8354
+ /**
8355
+ * Price deleted successfully
8356
+ */
8357
+ 204: void;
8358
+ /**
8359
+ * Price not found
8360
+ */
8361
+ 404: unknown;
8362
+ };
8363
+ };
8364
+ };
8365
+ '/api/v1/{region}/bean/prices/bulk': {
8366
+ post: {
8367
+ req: PriceControllerBulkCreateData;
8368
+ res: {
8369
+ /**
8370
+ * Prices created successfully
8371
+ */
8372
+ 201: Array<PriceResponseDto>;
8373
+ };
8374
+ };
8375
+ };
7685
8376
  '/api/v1/{region}/bean/recurring-rules': {
7686
8377
  post: {
7687
8378
  req: RecurringRuleControllerCreateData;
@@ -7932,397 +8623,469 @@ export type $OpenApiTs = {
7932
8623
  };
7933
8624
  };
7934
8625
  };
7935
- '/api/v1/{region}/bean/transaction-rules': {
8626
+ '/api/v1/{region}/reporting/portfolio/trends': {
8627
+ get: {
8628
+ req: ReportingControllerGetPortfolioTrendsData;
8629
+ res: {
8630
+ /**
8631
+ * Trends retrieved successfully
8632
+ */
8633
+ 200: PortfolioTrendsResponseDto;
8634
+ /**
8635
+ * User not authenticated
8636
+ */
8637
+ 401: unknown;
8638
+ };
8639
+ };
8640
+ };
8641
+ '/api/v1/{region}/reporting/cash-flow/trends': {
8642
+ get: {
8643
+ req: ReportingControllerGetCashFlowTrendsData;
8644
+ res: {
8645
+ /**
8646
+ * Cash-flow trends retrieved successfully
8647
+ */
8648
+ 200: CashFlowTrendsResponseDto;
8649
+ /**
8650
+ * User not authenticated
8651
+ */
8652
+ 401: unknown;
8653
+ };
8654
+ };
8655
+ };
8656
+ '/api/v1/{region}/reporting/snapshots/generate': {
7936
8657
  post: {
7937
- req: TransactionRuleControllerCreateData;
8658
+ req: ReportingControllerGenerateSnapshotData;
7938
8659
  res: {
7939
8660
  /**
7940
- * Rule updated successfully (upsert mode)
8661
+ * Snapshot generated successfully
7941
8662
  */
7942
- 200: TransactionRuleResponseDto;
8663
+ 200: GenerateSnapshotResponse;
7943
8664
  /**
7944
- * Validation failed
8665
+ * Invalid date format
7945
8666
  */
7946
- 400: ApiProblemResponseDto;
8667
+ 400: unknown;
7947
8668
  /**
7948
- * Unauthorized
8669
+ * User not authenticated
8670
+ */
8671
+ 401: unknown;
8672
+ };
8673
+ };
8674
+ };
8675
+ '/api/v1/{region}/reporting/snapshots/backfill': {
8676
+ post: {
8677
+ req: ReportingControllerBackfillSnapshotsData;
8678
+ res: {
8679
+ /**
8680
+ * Backfill completed successfully
8681
+ */
8682
+ 200: BackfillSnapshotsResponse;
8683
+ /**
8684
+ * Invalid date format or range
8685
+ */
8686
+ 400: unknown;
8687
+ /**
8688
+ * User not authenticated
8689
+ */
8690
+ 401: unknown;
8691
+ /**
8692
+ * Backfill already in progress for this user
8693
+ */
8694
+ 409: unknown;
8695
+ };
8696
+ };
8697
+ };
8698
+ '/api/v1/users': {
8699
+ delete: {
8700
+ req: UserControllerDeleteOwnUserData;
8701
+ res: {
8702
+ /**
8703
+ * User deleted successfully
7949
8704
  */
7950
- 401: ApiProblemResponseDto;
8705
+ 204: void;
7951
8706
  /**
7952
- * Resource conflict - another process is updating this rule
8707
+ * Invalid access token
7953
8708
  */
7954
- 409: ApiProblemResponseDto;
8709
+ 403: unknown;
7955
8710
  };
7956
8711
  };
7957
8712
  get: {
7958
- req: TransactionRuleControllerListData;
8713
+ req: UserControllerGetUserData;
7959
8714
  res: {
7960
8715
  /**
7961
- * List of rules
7962
- */
7963
- 200: TransactionRuleListResponseDto;
7964
- /**
7965
- * Unauthorized
8716
+ * User retrieved successfully
7966
8717
  */
7967
- 401: ApiProblemResponseDto;
8718
+ 200: unknown;
7968
8719
  };
7969
8720
  };
7970
- };
7971
- '/api/v1/{region}/bean/transaction-rules/validate': {
7972
8721
  post: {
7973
- req: TransactionRuleControllerValidateData;
8722
+ req: UserControllerSignupUserData;
7974
8723
  res: {
7975
8724
  /**
7976
- * Validation result
8725
+ * User created successfully
7977
8726
  */
7978
- 200: ValidateRuleResponseDto;
8727
+ 201: SignupResponseDto;
7979
8728
  /**
7980
- * Validation failed
8729
+ * Invalid Turnstile token (when Turnstile is enabled)
7981
8730
  */
7982
- 400: ApiProblemResponseDto;
8731
+ 400: unknown;
7983
8732
  /**
7984
- * Unauthorized
8733
+ * User signup is disabled
7985
8734
  */
7986
- 401: ApiProblemResponseDto;
8735
+ 403: unknown;
7987
8736
  };
7988
8737
  };
7989
8738
  };
7990
- '/api/v1/{region}/bean/transaction-rules/bulk': {
7991
- post: {
7992
- req: TransactionRuleControllerBulkCreateData;
8739
+ '/api/v1/users/{id}': {
8740
+ delete: {
8741
+ req: UserControllerDeleteUserData;
7993
8742
  res: {
7994
8743
  /**
7995
- * Bulk create completed
7996
- */
7997
- 201: BulkCreateRulesResponseDto;
7998
- /**
7999
- * Invalid bulk create data
8744
+ * User deleted successfully
8000
8745
  */
8001
- 400: ApiProblemResponseDto;
8746
+ 204: void;
8002
8747
  /**
8003
- * Unauthorized
8748
+ * Cannot delete own account or insufficient permissions
8004
8749
  */
8005
- 401: ApiProblemResponseDto;
8750
+ 403: unknown;
8006
8751
  };
8007
8752
  };
8008
8753
  };
8009
- '/api/v1/{region}/bean/transaction-rules/export/{format}': {
8754
+ '/api/v1/users/{id}/info': {
8010
8755
  get: {
8011
- req: TransactionRuleControllerExportData;
8756
+ req: UserControllerGetUserInfoData;
8012
8757
  res: {
8013
8758
  /**
8014
- * Exported rules
8015
- */
8016
- 200: ExportRulesResponseDto;
8017
- /**
8018
- * Unsupported format
8759
+ * User info retrieved successfully
8019
8760
  */
8020
- 400: ApiProblemResponseDto;
8761
+ 200: unknown;
8021
8762
  /**
8022
- * Unauthorized
8763
+ * Cannot access other user info without admin permission
8023
8764
  */
8024
- 401: ApiProblemResponseDto;
8765
+ 403: unknown;
8025
8766
  };
8026
8767
  };
8027
8768
  };
8028
- '/api/v1/{region}/bean/transaction-rules/statistics/{period}': {
8029
- get: {
8030
- req: TransactionRuleControllerGetStatisticsData;
8769
+ '/api/v1/users/setting': {
8770
+ put: {
8771
+ req: UserControllerUpdateUserSettingData;
8031
8772
  res: {
8032
8773
  /**
8033
- * Rule statistics
8774
+ * Settings updated successfully
8034
8775
  */
8035
- 200: RuleStatisticsResponseDto;
8776
+ 200: unknown;
8036
8777
  /**
8037
- * Unauthorized
8778
+ * Insufficient permissions
8038
8779
  */
8039
- 401: ApiProblemResponseDto;
8780
+ 403: unknown;
8040
8781
  };
8041
8782
  };
8042
8783
  };
8043
- '/api/v1/{region}/bean/transaction-rules/{ruleId}': {
8784
+ '/api/v1/users/settings-by-page': {
8044
8785
  get: {
8045
- req: TransactionRuleControllerGetDetailData;
8786
+ req: UserControllerGetAllUserSettingsByPageData;
8046
8787
  res: {
8047
8788
  /**
8048
- * Rule details
8049
- */
8050
- 200: TransactionRuleResponseDto;
8051
- /**
8052
- * Unauthorized
8053
- */
8054
- 401: ApiProblemResponseDto;
8055
- /**
8056
- * Forbidden - not owner of rule
8057
- */
8058
- 403: ApiProblemResponseDto;
8059
- /**
8060
- * Rule not found
8789
+ * Settings list retrieved successfully
8061
8790
  */
8062
- 404: ApiProblemResponseDto;
8791
+ 200: unknown;
8063
8792
  };
8064
8793
  };
8065
- put: {
8066
- req: TransactionRuleControllerUpdateData;
8794
+ };
8795
+ '/api/v1/users/asset-liability-summary': {
8796
+ get: {
8067
8797
  res: {
8068
8798
  /**
8069
- * Rule updated successfully
8799
+ * Summary retrieved successfully
8070
8800
  */
8071
- 200: TransactionRuleResponseDto;
8801
+ 200: unknown;
8802
+ };
8803
+ };
8804
+ };
8805
+ '/api/v1/admin/properties': {
8806
+ get: {
8807
+ res: {
8072
8808
  /**
8073
- * Validation failed
8809
+ * Properties retrieved successfully
8074
8810
  */
8075
- 400: ApiProblemResponseDto;
8811
+ 200: unknown;
8076
8812
  /**
8077
8813
  * Unauthorized
8078
8814
  */
8079
- 401: ApiProblemResponseDto;
8080
- /**
8081
- * Forbidden - not owner of rule
8082
- */
8083
- 403: ApiProblemResponseDto;
8084
- /**
8085
- * Rule not found
8086
- */
8087
- 404: ApiProblemResponseDto;
8815
+ 401: unknown;
8088
8816
  /**
8089
- * Resource conflict - rule is being modified by another process
8817
+ * Forbidden - insufficient permissions
8090
8818
  */
8091
- 409: ApiProblemResponseDto;
8819
+ 403: unknown;
8092
8820
  };
8093
8821
  };
8094
- delete: {
8095
- req: TransactionRuleControllerDeleteData;
8822
+ };
8823
+ '/api/v1/admin/properties/{key}': {
8824
+ get: {
8825
+ req: PropertyControllerGetByKeyData;
8096
8826
  res: {
8097
8827
  /**
8098
- * Rule deleted successfully
8828
+ * Property retrieved successfully
8099
8829
  */
8100
- 204: void;
8830
+ 200: unknown;
8101
8831
  /**
8102
8832
  * Unauthorized
8103
8833
  */
8104
- 401: ApiProblemResponseDto;
8105
- /**
8106
- * Forbidden - not owner of rule
8107
- */
8108
- 403: ApiProblemResponseDto;
8834
+ 401: unknown;
8109
8835
  /**
8110
- * Rule not found
8836
+ * Forbidden - insufficient permissions
8111
8837
  */
8112
- 404: ApiProblemResponseDto;
8838
+ 403: unknown;
8113
8839
  /**
8114
- * Resource conflict - rule is being modified by another process
8840
+ * Property not found
8115
8841
  */
8116
- 409: ApiProblemResponseDto;
8842
+ 404: unknown;
8117
8843
  };
8118
8844
  };
8119
- };
8120
- '/api/v1/{region}/bean/transaction-rules/{ruleId}/test': {
8121
- post: {
8122
- req: TransactionRuleControllerTestData;
8845
+ put: {
8846
+ req: PropertyControllerUpdateData;
8123
8847
  res: {
8124
8848
  /**
8125
- * Test result
8849
+ * Property updated successfully
8126
8850
  */
8127
- 200: TestRuleResponseDto;
8851
+ 200: unknown;
8128
8852
  /**
8129
8853
  * Unauthorized
8130
8854
  */
8131
- 401: ApiProblemResponseDto;
8132
- /**
8133
- * Forbidden - not owner of rule
8134
- */
8135
- 403: ApiProblemResponseDto;
8855
+ 401: unknown;
8136
8856
  /**
8137
- * Rule not found
8857
+ * Forbidden - insufficient permissions
8138
8858
  */
8139
- 404: ApiProblemResponseDto;
8859
+ 403: unknown;
8140
8860
  };
8141
8861
  };
8142
- };
8143
- '/api/v1/users': {
8144
8862
  delete: {
8145
- req: UserControllerDeleteOwnUserData;
8863
+ req: PropertyControllerDeleteData;
8146
8864
  res: {
8147
8865
  /**
8148
- * User deleted successfully
8866
+ * Property deleted successfully
8149
8867
  */
8150
8868
  204: void;
8151
8869
  /**
8152
- * Invalid access token
8870
+ * Unauthorized
8871
+ */
8872
+ 401: unknown;
8873
+ /**
8874
+ * Forbidden - insufficient permissions
8153
8875
  */
8154
8876
  403: unknown;
8155
- };
8156
- };
8157
- get: {
8158
- req: UserControllerGetUserData;
8159
- res: {
8160
8877
  /**
8161
- * User retrieved successfully
8878
+ * Property not found
8162
8879
  */
8163
- 200: unknown;
8880
+ 404: unknown;
8164
8881
  };
8165
8882
  };
8883
+ };
8884
+ '/api/v1/{region}/bean/transaction-rules': {
8166
8885
  post: {
8167
- req: UserControllerSignupUserData;
8886
+ req: TransactionRuleControllerCreateData;
8168
8887
  res: {
8169
8888
  /**
8170
- * User created successfully
8889
+ * Rule updated successfully (upsert mode)
8171
8890
  */
8172
- 201: unknown;
8891
+ 200: TransactionRuleResponseDto;
8173
8892
  /**
8174
- * Invalid Turnstile token (when Turnstile is enabled)
8893
+ * Validation failed
8175
8894
  */
8176
- 400: unknown;
8895
+ 400: ApiProblemResponseDto;
8177
8896
  /**
8178
- * User signup is disabled
8897
+ * Unauthorized
8179
8898
  */
8180
- 403: unknown;
8899
+ 401: ApiProblemResponseDto;
8900
+ /**
8901
+ * Resource conflict - another process is updating this rule
8902
+ */
8903
+ 409: ApiProblemResponseDto;
8181
8904
  };
8182
8905
  };
8183
- };
8184
- '/api/v1/users/{id}': {
8185
- delete: {
8186
- req: UserControllerDeleteUserData;
8906
+ get: {
8907
+ req: TransactionRuleControllerListData;
8187
8908
  res: {
8188
8909
  /**
8189
- * User deleted successfully
8910
+ * List of rules
8190
8911
  */
8191
- 204: void;
8912
+ 200: TransactionRuleListResponseDto;
8192
8913
  /**
8193
- * Cannot delete own account or insufficient permissions
8914
+ * Unauthorized
8194
8915
  */
8195
- 403: unknown;
8916
+ 401: ApiProblemResponseDto;
8196
8917
  };
8197
8918
  };
8198
8919
  };
8199
- '/api/v1/users/{id}/info': {
8200
- get: {
8201
- req: UserControllerGetUserInfoData;
8920
+ '/api/v1/{region}/bean/transaction-rules/validate': {
8921
+ post: {
8922
+ req: TransactionRuleControllerValidateData;
8202
8923
  res: {
8203
8924
  /**
8204
- * User info retrieved successfully
8925
+ * Validation result
8205
8926
  */
8206
- 200: unknown;
8927
+ 200: ValidateRuleResponseDto;
8207
8928
  /**
8208
- * Cannot access other user info without admin permission
8929
+ * Validation failed
8209
8930
  */
8210
- 403: unknown;
8931
+ 400: ApiProblemResponseDto;
8932
+ /**
8933
+ * Unauthorized
8934
+ */
8935
+ 401: ApiProblemResponseDto;
8211
8936
  };
8212
8937
  };
8213
8938
  };
8214
- '/api/v1/users/setting': {
8215
- put: {
8216
- req: UserControllerUpdateUserSettingData;
8939
+ '/api/v1/{region}/bean/transaction-rules/bulk': {
8940
+ post: {
8941
+ req: TransactionRuleControllerBulkCreateData;
8217
8942
  res: {
8218
8943
  /**
8219
- * Settings updated successfully
8944
+ * Bulk create completed
8945
+ */
8946
+ 201: BulkCreateRulesResponseDto;
8947
+ /**
8948
+ * Invalid bulk create data
8220
8949
  */
8221
- 200: unknown;
8950
+ 400: ApiProblemResponseDto;
8222
8951
  /**
8223
- * Insufficient permissions
8952
+ * Unauthorized
8224
8953
  */
8225
- 403: unknown;
8954
+ 401: ApiProblemResponseDto;
8226
8955
  };
8227
8956
  };
8228
8957
  };
8229
- '/api/v1/users/settings-by-page': {
8958
+ '/api/v1/{region}/bean/transaction-rules/export/{format}': {
8230
8959
  get: {
8231
- req: UserControllerGetAllUserSettingsByPageData;
8960
+ req: TransactionRuleControllerExportData;
8232
8961
  res: {
8233
8962
  /**
8234
- * Settings list retrieved successfully
8963
+ * Exported rules
8235
8964
  */
8236
- 200: unknown;
8965
+ 200: ExportRulesResponseDto;
8966
+ /**
8967
+ * Unsupported format
8968
+ */
8969
+ 400: ApiProblemResponseDto;
8970
+ /**
8971
+ * Unauthorized
8972
+ */
8973
+ 401: ApiProblemResponseDto;
8237
8974
  };
8238
8975
  };
8239
8976
  };
8240
- '/api/v1/users/asset-liability-summary': {
8977
+ '/api/v1/{region}/bean/transaction-rules/statistics/{period}': {
8241
8978
  get: {
8979
+ req: TransactionRuleControllerGetStatisticsData;
8242
8980
  res: {
8243
8981
  /**
8244
- * Summary retrieved successfully
8982
+ * Rule statistics
8245
8983
  */
8246
- 200: unknown;
8984
+ 200: RuleStatisticsResponseDto;
8985
+ /**
8986
+ * Unauthorized
8987
+ */
8988
+ 401: ApiProblemResponseDto;
8247
8989
  };
8248
8990
  };
8249
8991
  };
8250
- '/api/v1/admin/properties': {
8992
+ '/api/v1/{region}/bean/transaction-rules/{ruleId}': {
8251
8993
  get: {
8994
+ req: TransactionRuleControllerGetDetailData;
8252
8995
  res: {
8253
8996
  /**
8254
- * Properties retrieved successfully
8997
+ * Rule details
8255
8998
  */
8256
- 200: unknown;
8999
+ 200: TransactionRuleResponseDto;
8257
9000
  /**
8258
9001
  * Unauthorized
8259
9002
  */
8260
- 401: unknown;
9003
+ 401: ApiProblemResponseDto;
8261
9004
  /**
8262
- * Forbidden - insufficient permissions
9005
+ * Forbidden - not owner of rule
8263
9006
  */
8264
- 403: unknown;
9007
+ 403: ApiProblemResponseDto;
9008
+ /**
9009
+ * Rule not found
9010
+ */
9011
+ 404: ApiProblemResponseDto;
8265
9012
  };
8266
9013
  };
8267
- };
8268
- '/api/v1/admin/properties/{key}': {
8269
- get: {
8270
- req: PropertyControllerGetByKeyData;
9014
+ put: {
9015
+ req: TransactionRuleControllerUpdateData;
8271
9016
  res: {
8272
9017
  /**
8273
- * Property retrieved successfully
9018
+ * Rule updated successfully
8274
9019
  */
8275
- 200: unknown;
9020
+ 200: TransactionRuleResponseDto;
9021
+ /**
9022
+ * Validation failed
9023
+ */
9024
+ 400: ApiProblemResponseDto;
8276
9025
  /**
8277
9026
  * Unauthorized
8278
9027
  */
8279
- 401: unknown;
9028
+ 401: ApiProblemResponseDto;
8280
9029
  /**
8281
- * Forbidden - insufficient permissions
9030
+ * Forbidden - not owner of rule
8282
9031
  */
8283
- 403: unknown;
9032
+ 403: ApiProblemResponseDto;
8284
9033
  /**
8285
- * Property not found
9034
+ * Rule not found
8286
9035
  */
8287
- 404: unknown;
9036
+ 404: ApiProblemResponseDto;
9037
+ /**
9038
+ * Resource conflict - rule is being modified by another process
9039
+ */
9040
+ 409: ApiProblemResponseDto;
8288
9041
  };
8289
9042
  };
8290
- put: {
8291
- req: PropertyControllerUpdateData;
9043
+ delete: {
9044
+ req: TransactionRuleControllerDeleteData;
8292
9045
  res: {
8293
9046
  /**
8294
- * Property updated successfully
9047
+ * Rule deleted successfully
8295
9048
  */
8296
- 200: unknown;
9049
+ 204: void;
8297
9050
  /**
8298
9051
  * Unauthorized
8299
9052
  */
8300
- 401: unknown;
9053
+ 401: ApiProblemResponseDto;
8301
9054
  /**
8302
- * Forbidden - insufficient permissions
9055
+ * Forbidden - not owner of rule
8303
9056
  */
8304
- 403: unknown;
9057
+ 403: ApiProblemResponseDto;
9058
+ /**
9059
+ * Rule not found
9060
+ */
9061
+ 404: ApiProblemResponseDto;
9062
+ /**
9063
+ * Resource conflict - rule is being modified by another process
9064
+ */
9065
+ 409: ApiProblemResponseDto;
8305
9066
  };
8306
9067
  };
8307
- delete: {
8308
- req: PropertyControllerDeleteData;
9068
+ };
9069
+ '/api/v1/{region}/bean/transaction-rules/{ruleId}/test': {
9070
+ post: {
9071
+ req: TransactionRuleControllerTestData;
8309
9072
  res: {
8310
9073
  /**
8311
- * Property deleted successfully
9074
+ * Test result
8312
9075
  */
8313
- 204: void;
9076
+ 200: TestRuleResponseDto;
8314
9077
  /**
8315
9078
  * Unauthorized
8316
9079
  */
8317
- 401: unknown;
9080
+ 401: ApiProblemResponseDto;
8318
9081
  /**
8319
- * Forbidden - insufficient permissions
9082
+ * Forbidden - not owner of rule
8320
9083
  */
8321
- 403: unknown;
9084
+ 403: ApiProblemResponseDto;
8322
9085
  /**
8323
- * Property not found
9086
+ * Rule not found
8324
9087
  */
8325
- 404: unknown;
9088
+ 404: ApiProblemResponseDto;
8326
9089
  };
8327
9090
  };
8328
9091
  };
@@ -8422,6 +9185,85 @@ export type $OpenApiTs = {
8422
9185
  };
8423
9186
  };
8424
9187
  };
9188
+ '/api/v1/{region}/bean/onboarding': {
9189
+ post: {
9190
+ req: OnboardingControllerBootstrapData;
9191
+ res: {
9192
+ /**
9193
+ * Onboarding bootstrap result.
9194
+ */
9195
+ 201: unknown;
9196
+ /**
9197
+ * Invalid region/account path/duplicate paths.
9198
+ */
9199
+ 422: unknown;
9200
+ };
9201
+ };
9202
+ };
9203
+ '/api/v1/{region}/bean/reconciliations': {
9204
+ post: {
9205
+ req: ReconciliationControllerComputeData;
9206
+ res: {
9207
+ /**
9208
+ * Reconciliation preview
9209
+ */
9210
+ 200: ReconciliationComputeResultDto;
9211
+ /**
9212
+ * Account not found
9213
+ */
9214
+ 404: unknown;
9215
+ };
9216
+ };
9217
+ };
9218
+ '/api/v1/{region}/bean/reconciliations/assert': {
9219
+ post: {
9220
+ req: ReconciliationControllerAssertData;
9221
+ res: {
9222
+ /**
9223
+ * Balance assertion recorded
9224
+ */
9225
+ 201: ReconciliationRecordDto;
9226
+ /**
9227
+ * Account not found
9228
+ */
9229
+ 404: unknown;
9230
+ };
9231
+ };
9232
+ };
9233
+ '/api/v1/{region}/bean/reconciliations/pad': {
9234
+ post: {
9235
+ req: ReconciliationControllerPadData;
9236
+ res: {
9237
+ /**
9238
+ * Pad adjusting entry generated
9239
+ */
9240
+ 201: PadResultDto;
9241
+ /**
9242
+ * Book already within tolerance — no pad needed
9243
+ */
9244
+ 400: unknown;
9245
+ /**
9246
+ * Account not found
9247
+ */
9248
+ 404: unknown;
9249
+ };
9250
+ };
9251
+ };
9252
+ '/api/v1/{region}/bean/accounts/{accountId}/reconciliations': {
9253
+ get: {
9254
+ req: ReconciliationControllerHistoryData;
9255
+ res: {
9256
+ /**
9257
+ * Reconciliation history
9258
+ */
9259
+ 200: Array<ReconciliationRecordDto>;
9260
+ /**
9261
+ * Account not found
9262
+ */
9263
+ 404: unknown;
9264
+ };
9265
+ };
9266
+ };
8425
9267
  '/api/v1/{region}/bean/export/beancount': {
8426
9268
  get: {
8427
9269
  res: {
@@ -8545,102 +9387,30 @@ export type $OpenApiTs = {
8545
9387
  /**
8546
9388
  * Configuration updated successfully
8547
9389
  */
8548
- 200: ImporterConfigDto;
8549
- /**
8550
- * Invalid input - Validation failed
8551
- */
8552
- 400: ApiProblemResponseDto;
8553
- /**
8554
- * Configuration not found
8555
- */
8556
- 404: ApiProblemResponseDto;
8557
- };
8558
- };
8559
- };
8560
- '/api/v1/{region}/bean/import/config/{importerId}/reset': {
8561
- post: {
8562
- req: ImporterConfigControllerResetConfigData;
8563
- res: {
8564
- /**
8565
- * Configuration reset successfully
8566
- */
8567
- 200: ImporterConfigDto;
8568
- /**
8569
- * Invalid input - Unsupported importer
8570
- */
8571
- 400: ApiProblemResponseDto;
8572
- };
8573
- };
8574
- };
8575
- '/api/v1/bean/platforms': {
8576
- get: {
8577
- res: {
8578
- /**
8579
- * List of platforms with binding and account counts
8580
- */
8581
- 200: unknown;
8582
- };
8583
- };
8584
- post: {
8585
- req: PlatformControllerCreateData;
8586
- res: {
8587
- /**
8588
- * Platform created successfully
8589
- */
8590
- 201: unknown;
8591
- /**
8592
- * Platform already exists
8593
- */
8594
- 409: unknown;
8595
- };
8596
- };
8597
- };
8598
- '/api/v1/bean/platforms/list': {
8599
- get: {
8600
- res: {
8601
- /**
8602
- * List of platforms with user binding status
8603
- */
8604
- 200: unknown;
8605
- };
8606
- };
8607
- };
8608
- '/api/v1/bean/platforms/match': {
8609
- get: {
8610
- req: PlatformControllerMatchPlatformsData;
8611
- res: {
8612
- /**
8613
- * List of matching platforms with suggested segment names
8614
- */
8615
- 200: unknown;
8616
- };
8617
- };
8618
- };
8619
- '/api/v1/bean/platforms/{id}': {
8620
- put: {
8621
- req: PlatformControllerUpdateData;
8622
- res: {
9390
+ 200: ImporterConfigDto;
8623
9391
  /**
8624
- * Platform updated successfully
9392
+ * Invalid input - Validation failed
8625
9393
  */
8626
- 200: unknown;
9394
+ 400: ApiProblemResponseDto;
8627
9395
  /**
8628
- * Platform not found
9396
+ * Configuration not found
8629
9397
  */
8630
- 404: unknown;
9398
+ 404: ApiProblemResponseDto;
8631
9399
  };
8632
9400
  };
8633
- delete: {
8634
- req: PlatformControllerDeleteData;
9401
+ };
9402
+ '/api/v1/{region}/bean/import/config/{importerId}/reset': {
9403
+ post: {
9404
+ req: ImporterConfigControllerResetConfigData;
8635
9405
  res: {
8636
9406
  /**
8637
- * Platform deleted successfully
9407
+ * Configuration reset successfully
8638
9408
  */
8639
- 204: void;
9409
+ 200: ImporterConfigDto;
8640
9410
  /**
8641
- * Platform not found
9411
+ * Invalid input - Unsupported importer
8642
9412
  */
8643
- 404: unknown;
9413
+ 400: ApiProblemResponseDto;
8644
9414
  };
8645
9415
  };
8646
9416
  };
@@ -8697,6 +9467,54 @@ export type $OpenApiTs = {
8697
9467
  };
8698
9468
  };
8699
9469
  };
9470
+ '/api/v1/{region}/bean/external-account-links': {
9471
+ post: {
9472
+ req: ExternalAccountLinkControllerCreateData;
9473
+ res: {
9474
+ /**
9475
+ * Link created.
9476
+ */
9477
+ 201: ExternalAccountLinkResponseDto;
9478
+ /**
9479
+ * beanAccountId not owned, or an active link already exists.
9480
+ */
9481
+ 422: unknown;
9482
+ };
9483
+ };
9484
+ get: {
9485
+ req: ExternalAccountLinkControllerFindAllData;
9486
+ res: {
9487
+ /**
9488
+ * Links retrieved.
9489
+ */
9490
+ 200: ExternalAccountLinkListResponseDto;
9491
+ };
9492
+ };
9493
+ };
9494
+ '/api/v1/{region}/bean/external-account-links/{id}': {
9495
+ get: {
9496
+ req: ExternalAccountLinkControllerFindOneData;
9497
+ res: {
9498
+ /**
9499
+ * Link retrieved.
9500
+ */
9501
+ 200: ExternalAccountLinkResponseDto;
9502
+ /**
9503
+ * Link not found or not owned by the user.
9504
+ */
9505
+ 422: unknown;
9506
+ };
9507
+ };
9508
+ delete: {
9509
+ req: ExternalAccountLinkControllerRemoveData;
9510
+ res: {
9511
+ /**
9512
+ * Link soft-deleted; historical transactions are unaffected.
9513
+ */
9514
+ 204: void;
9515
+ };
9516
+ };
9517
+ };
8700
9518
  '/api/v1/{region}/bean/import/parser-telemetry': {
8701
9519
  post: {
8702
9520
  req: TelemetryControllerReportTelemetryData;
@@ -8785,188 +9603,104 @@ export type $OpenApiTs = {
8785
9603
  };
8786
9604
  };
8787
9605
  };
8788
- '/api/v1/{region}/dashboard/net-worth': {
8789
- get: {
8790
- req: DashboardControllerGetNetWorthData;
8791
- res: {
8792
- /**
8793
- * Net worth retrieved successfully
8794
- */
8795
- 200: NetWorthResponseDto;
8796
- /**
8797
- * User not authenticated
8798
- */
8799
- 401: unknown;
8800
- };
8801
- };
8802
- };
8803
- '/api/v1/{region}/dashboard/accounts': {
8804
- get: {
8805
- req: DashboardControllerGetAccountsData;
8806
- res: {
8807
- /**
8808
- * Accounts retrieved successfully. Response type depends on groupBy parameter.
8809
- */
8810
- 200:
8811
- | AccountsResponseDto
8812
- | AssetClassAccountsResponseDto
8813
- | HoldingAssetClassCrossAccountResponseDto;
8814
- /**
8815
- * User not authenticated
8816
- */
8817
- 401: unknown;
8818
- };
8819
- };
8820
- };
8821
- '/api/v1/{region}/dashboard/cash-flow': {
8822
- get: {
8823
- req: DashboardControllerGetCashFlowData;
8824
- res: {
8825
- /**
8826
- * Cash flow retrieved successfully
8827
- */
8828
- 200: CashFlowResponseDto;
8829
- /**
8830
- * Invalid period format
8831
- */
8832
- 400: unknown;
8833
- /**
8834
- * User not authenticated
8835
- */
8836
- 401: unknown;
8837
- };
8838
- };
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': {
9606
+ '/api/v1/bean/platforms': {
8860
9607
  get: {
8861
- req: HoldingPnlControllerGetHoldingPnlData;
8862
9608
  res: {
8863
9609
  /**
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
9610
+ * List of platforms with binding and account counts
8873
9611
  */
8874
- 401: unknown;
9612
+ 200: unknown;
8875
9613
  };
8876
9614
  };
8877
- };
8878
- '/api/v1/{region}/bean/prices': {
8879
9615
  post: {
8880
- req: PriceControllerCreateData;
9616
+ req: PlatformControllerCreateData;
8881
9617
  res: {
8882
9618
  /**
8883
- * Price created successfully
8884
- */
8885
- 201: PriceResponseDto;
8886
- /**
8887
- * Currency or quoteCurrency commodity not found
9619
+ * Platform created successfully
8888
9620
  */
8889
- 404: unknown;
9621
+ 201: unknown;
8890
9622
  /**
8891
- * Price already exists for this currency pair and date
9623
+ * Platform already exists
8892
9624
  */
8893
9625
  409: unknown;
8894
9626
  };
8895
9627
  };
9628
+ };
9629
+ '/api/v1/bean/platforms/list': {
8896
9630
  get: {
8897
- req: PriceControllerFindAllData;
8898
9631
  res: {
8899
9632
  /**
8900
- * Prices retrieved successfully
9633
+ * List of platforms with user binding status
8901
9634
  */
8902
- 200: PriceListResponseDto;
9635
+ 200: Array<PlatformListItemDto>;
8903
9636
  };
8904
9637
  };
8905
9638
  };
8906
- '/api/v1/{region}/bean/prices/{id}': {
9639
+ '/api/v1/bean/platforms/match': {
8907
9640
  get: {
8908
- req: PriceControllerFindOneData;
9641
+ req: PlatformControllerMatchPlatformsData;
8909
9642
  res: {
8910
9643
  /**
8911
- * Price retrieved successfully
8912
- */
8913
- 200: PriceResponseDto;
8914
- /**
8915
- * Price not found
9644
+ * Matching platforms with overall match type and truncation flag
8916
9645
  */
8917
- 404: unknown;
9646
+ 200: PlatformMatchResponseDto;
8918
9647
  };
8919
9648
  };
9649
+ };
9650
+ '/api/v1/bean/platforms/{id}': {
8920
9651
  put: {
8921
- req: PriceControllerUpdateData;
9652
+ req: PlatformControllerUpdateData;
8922
9653
  res: {
8923
9654
  /**
8924
- * Price updated successfully
9655
+ * Platform updated successfully
8925
9656
  */
8926
- 200: PriceResponseDto;
9657
+ 200: unknown;
8927
9658
  /**
8928
- * Price not found
9659
+ * Platform not found
8929
9660
  */
8930
9661
  404: unknown;
8931
- /**
8932
- * Updated price conflicts with existing price
8933
- */
8934
- 409: unknown;
8935
9662
  };
8936
9663
  };
8937
9664
  delete: {
8938
- req: PriceControllerDeleteData;
9665
+ req: PlatformControllerDeleteData;
8939
9666
  res: {
8940
9667
  /**
8941
- * Price deleted successfully
9668
+ * Platform deleted successfully
8942
9669
  */
8943
9670
  204: void;
8944
9671
  /**
8945
- * Price not found
9672
+ * Platform not found
8946
9673
  */
8947
9674
  404: unknown;
8948
9675
  };
8949
9676
  };
8950
9677
  };
8951
- '/api/v1/{region}/bean/prices/bulk': {
8952
- post: {
8953
- req: PriceControllerBulkCreateData;
9678
+ '/api/v1/{region}/dashboard/net-worth': {
9679
+ get: {
9680
+ req: DashboardControllerGetNetWorthData;
8954
9681
  res: {
8955
9682
  /**
8956
- * Prices created successfully
9683
+ * Net worth retrieved successfully
8957
9684
  */
8958
- 201: Array<PriceResponseDto>;
9685
+ 200: NetWorthResponseDto;
9686
+ /**
9687
+ * User not authenticated
9688
+ */
9689
+ 401: unknown;
8959
9690
  };
8960
9691
  };
8961
9692
  };
8962
- '/api/v1/{region}/reporting/portfolio/trends': {
9693
+ '/api/v1/{region}/dashboard/accounts': {
8963
9694
  get: {
8964
- req: ReportingControllerGetPortfolioTrendsData;
9695
+ req: DashboardControllerGetAccountsData;
8965
9696
  res: {
8966
9697
  /**
8967
- * Trends retrieved successfully
9698
+ * Accounts retrieved successfully. Response type depends on groupBy parameter.
8968
9699
  */
8969
- 200: PortfolioTrendsResponseDto;
9700
+ 200:
9701
+ | AccountsResponseDto
9702
+ | AssetClassAccountsResponseDto
9703
+ | HoldingAssetClassCrossAccountResponseDto;
8970
9704
  /**
8971
9705
  * User not authenticated
8972
9706
  */
@@ -8974,14 +9708,18 @@ export type $OpenApiTs = {
8974
9708
  };
8975
9709
  };
8976
9710
  };
8977
- '/api/v1/{region}/reporting/cash-flow/trends': {
9711
+ '/api/v1/{region}/dashboard/cash-flow': {
8978
9712
  get: {
8979
- req: ReportingControllerGetCashFlowTrendsData;
9713
+ req: DashboardControllerGetCashFlowData;
8980
9714
  res: {
8981
9715
  /**
8982
- * Cash-flow trends retrieved successfully
9716
+ * Cash flow retrieved successfully
8983
9717
  */
8984
- 200: CashFlowTrendsResponseDto;
9718
+ 200: CashFlowResponseDto;
9719
+ /**
9720
+ * Invalid period format
9721
+ */
9722
+ 400: unknown;
8985
9723
  /**
8986
9724
  * User not authenticated
8987
9725
  */
@@ -8989,16 +9727,16 @@ export type $OpenApiTs = {
8989
9727
  };
8990
9728
  };
8991
9729
  };
8992
- '/api/v1/{region}/reporting/snapshots/generate': {
8993
- post: {
8994
- req: ReportingControllerGenerateSnapshotData;
9730
+ '/api/v1/{region}/dashboard/expenses': {
9731
+ get: {
9732
+ req: DashboardControllerGetExpensesData;
8995
9733
  res: {
8996
9734
  /**
8997
- * Snapshot generated successfully
9735
+ * Expenses retrieved successfully
8998
9736
  */
8999
- 200: GenerateSnapshotResponse;
9737
+ 200: ExpensesByCategoryResponseDto;
9000
9738
  /**
9001
- * Invalid date format
9739
+ * Invalid groupBy or period
9002
9740
  */
9003
9741
  400: unknown;
9004
9742
  /**
@@ -9008,26 +9746,22 @@ export type $OpenApiTs = {
9008
9746
  };
9009
9747
  };
9010
9748
  };
9011
- '/api/v1/{region}/reporting/snapshots/backfill': {
9012
- post: {
9013
- req: ReportingControllerBackfillSnapshotsData;
9749
+ '/api/v1/{region}/investment/holdings/pnl': {
9750
+ get: {
9751
+ req: HoldingPnlControllerGetHoldingPnlData;
9014
9752
  res: {
9015
9753
  /**
9016
- * Backfill completed successfully
9754
+ * Holding P&L retrieved successfully
9017
9755
  */
9018
- 200: BackfillSnapshotsResponse;
9756
+ 200: HoldingPnlResponseDto;
9019
9757
  /**
9020
- * Invalid date format or range
9758
+ * Invalid asOf format/value/future date, invalid accountId format, or unsupported method
9021
9759
  */
9022
9760
  400: unknown;
9023
9761
  /**
9024
9762
  * User not authenticated
9025
9763
  */
9026
9764
  401: unknown;
9027
- /**
9028
- * Backfill already in progress for this user
9029
- */
9030
- 409: unknown;
9031
9765
  };
9032
9766
  };
9033
9767
  };
@@ -9052,7 +9786,7 @@ export type $OpenApiTs = {
9052
9786
  /**
9053
9787
  * Login successful
9054
9788
  */
9055
- 200: unknown;
9789
+ 200: AnonymousLoginResponseDto;
9056
9790
  /**
9057
9791
  * Invalid access token
9058
9792
  */