@firela/api-types 0.0.0-canary.a4e21680 → 0.0.0-canary.a5198363

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
  */
@@ -1966,6 +2034,108 @@ export type UpdateCommodityDto = {
1966
2034
  };
1967
2035
  };
1968
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
+
1969
2139
  export type CreateRecurringRuleDto = {
1970
2140
  /**
1971
2141
  * Rule name (unique per user)
@@ -2605,100 +2775,412 @@ export type ForecastResponseDto = {
2605
2775
  periodEnd: string;
2606
2776
  };
2607
2777
 
2608
- export type CreateTransactionRuleDto = {
2609
- name: string;
2610
- description?: string;
2611
- narrationKeywords?: Array<unknown[]>;
2612
- payeeKeywords?: Array<unknown[]>;
2613
- categoryKeywords?: Array<unknown[]>;
2778
+ export type CurrencyBalanceDto = {
2614
2779
  /**
2615
- * Payment method keywords (e.g., HuaBei, YuEBao)
2780
+ * ISO 4217 currency code
2616
2781
  */
2617
- methodKeywords?: Array<unknown[]>;
2782
+ currency: string;
2618
2783
  /**
2619
- * Destination account for expenses/income (e.g., Expenses:Food:Coffee)
2784
+ * Balance amount
2620
2785
  */
2621
- categoryAccount?: string;
2622
- matchLogic: 'OR' | 'AND';
2786
+ balance: string;
2787
+ };
2788
+
2789
+ export type TimeSeriesPointDto = {
2623
2790
  /**
2624
- * Minimum transaction amount (inclusive)
2791
+ * Date in YYYY-MM-DD format
2625
2792
  */
2626
- amountMin?: number;
2793
+ date: string;
2627
2794
  /**
2628
- * Maximum transaction amount (inclusive)
2795
+ * Value at this date (in base currency)
2629
2796
  */
2630
- amountMax?: number;
2631
- priority: number;
2632
- additionalTags?: Array<unknown[]>;
2633
- additionalMetadata?: {
2797
+ value: string;
2798
+ /**
2799
+ * Change from previous point
2800
+ */
2801
+ change?: {
2634
2802
  [key: string]: unknown;
2635
2803
  };
2636
2804
  /**
2637
- * If true, update existing rule with matching payeeKeywords[0] instead of creating new rule
2805
+ * Total assets at this date (in base currency)
2638
2806
  */
2639
- upsertByPayee?: boolean;
2640
- };
2641
-
2642
- export type matchLogic = 'OR' | 'AND';
2643
-
2644
- export type AmountRangeDto = {
2807
+ assets?: string;
2645
2808
  /**
2646
- * Minimum amount
2809
+ * Total liabilities at this date (in base currency)
2647
2810
  */
2648
- min?: number;
2811
+ liabilities?: string;
2649
2812
  /**
2650
- * Maximum amount
2813
+ * Multi-currency breakdown for this point
2651
2814
  */
2652
- max?: number;
2815
+ byCurrency?: Array<CurrencyBalanceDto>;
2653
2816
  };
2654
2817
 
2655
- export type TransactionRuleResponseDto = {
2818
+ export type TrendSummaryDto = {
2656
2819
  /**
2657
- * Rule ID
2820
+ * Value at start of period
2658
2821
  */
2659
- id: string;
2822
+ startValue: string;
2660
2823
  /**
2661
- * Rule name
2824
+ * Value at end of period
2662
2825
  */
2663
- name: string;
2826
+ endValue: string;
2664
2827
  /**
2665
- * Rule description
2828
+ * Total change over period
2666
2829
  */
2667
- description?: string;
2830
+ totalChange: string;
2668
2831
  /**
2669
- * Keywords to match in transaction narration
2832
+ * Total change percentage
2670
2833
  */
2671
- narrationKeywords: Array<string>;
2834
+ totalChangePercentage: string;
2835
+ };
2836
+
2837
+ export type MultiCurrencyPointDto = {
2672
2838
  /**
2673
- * Keywords to match in payee name
2839
+ * Date in YYYY-MM-DD format
2674
2840
  */
2675
- payeeKeywords: Array<string>;
2841
+ date: string;
2676
2842
  /**
2677
- * Keywords to match in category
2843
+ * Balances by currency
2678
2844
  */
2679
- categoryKeywords: Array<string>;
2845
+ byCurrency: Array<CurrencyBalanceDto>;
2846
+ };
2847
+
2848
+ export type PortfolioTrendsResponseDto = {
2680
2849
  /**
2681
- * Keywords to match in payment method
2850
+ * Time series data points
2682
2851
  */
2683
- methodKeywords: Array<string>;
2852
+ series: Array<TimeSeriesPointDto>;
2684
2853
  /**
2685
- * Destination account for categorization
2854
+ * Period summary
2686
2855
  */
2687
- categoryAccount?: string;
2856
+ summary: TrendSummaryDto;
2688
2857
  /**
2689
- * Keyword matching logic
2858
+ * Period requested
2690
2859
  */
2691
- matchLogic: 'OR' | 'AND';
2860
+ period: string;
2692
2861
  /**
2693
- * Amount range for matching
2862
+ * Data granularity
2694
2863
  */
2695
- amountRange?: AmountRangeDto;
2864
+ granularity: string;
2696
2865
  /**
2697
- * Rule priority (0-1000, higher = first match)
2866
+ * Base currency for converted values
2698
2867
  */
2699
- priority: number;
2868
+ currency: string;
2700
2869
  /**
2701
- * Whether the rule is enabled
2870
+ * Multi-currency time series (each point has currency breakdown)
2871
+ */
2872
+ byCurrency?: Array<MultiCurrencyPointDto>;
2873
+ /**
2874
+ * Exchange rate warnings
2875
+ */
2876
+ warnings?: Array<ExchangeRateWarningDto>;
2877
+ };
2878
+
2879
+ export type CashFlowPointDto = {
2880
+ /**
2881
+ * Month key (YYYY-MM)
2882
+ */
2883
+ month: string;
2884
+ /**
2885
+ * Income in base currency (absolute, converted)
2886
+ */
2887
+ income: string;
2888
+ /**
2889
+ * Expense in base currency (absolute, converted)
2890
+ */
2891
+ expense: string;
2892
+ /**
2893
+ * netSavings = income − expense (savings positive)
2894
+ */
2895
+ netSavings: string;
2896
+ };
2897
+
2898
+ export type CashFlowTrendSummaryDto = {
2899
+ /**
2900
+ * Total income across the period
2901
+ */
2902
+ totalIncome: string;
2903
+ /**
2904
+ * Total expense across the period
2905
+ */
2906
+ totalExpense: string;
2907
+ /**
2908
+ * income − expense across the period
2909
+ */
2910
+ totalNetSavings: string;
2911
+ /**
2912
+ * totalNetSavings divided by the window length (N months, incl. zero-filled)
2913
+ */
2914
+ averageMonthlyNetSavings: string;
2915
+ };
2916
+
2917
+ export type CashFlowTrendsResponseDto = {
2918
+ /**
2919
+ * Monthly cash-flow series (fixed N-month window, zero-filled)
2920
+ */
2921
+ series: Array<CashFlowPointDto>;
2922
+ /**
2923
+ * Period totals
2924
+ */
2925
+ summary: CashFlowTrendSummaryDto;
2926
+ /**
2927
+ * Period requested
2928
+ */
2929
+ period: string;
2930
+ /**
2931
+ * Data granularity (v1 returns month buckets)
2932
+ */
2933
+ granularity: string;
2934
+ /**
2935
+ * Base currency for converted values
2936
+ */
2937
+ currency: string;
2938
+ /**
2939
+ * Exchange rate warnings (e.g. missing rate for a currency)
2940
+ */
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 = {
2953
+ /**
2954
+ * Access token for user verification
2955
+ */
2956
+ accessToken: string;
2957
+ };
2958
+
2959
+ export type SignupDto = {
2960
+ /**
2961
+ * Cloudflare Turnstile verification token (optional when Turnstile disabled)
2962
+ */
2963
+ turnstileToken?: string;
2964
+ };
2965
+
2966
+ export type SignupResponseDto = {
2967
+ /**
2968
+ * JWT auth token
2969
+ */
2970
+ authToken: string;
2971
+ /**
2972
+ * Auto-generated access token
2973
+ */
2974
+ accessToken: string;
2975
+ /**
2976
+ * Assigned user role
2977
+ */
2978
+ role: 'USER' | 'ADMIN' | 'DEMO' | 'INACTIVE' | 'PAID' | 'OPS';
2979
+ };
2980
+
2981
+ /**
2982
+ * Assigned user role
2983
+ */
2984
+ export type role = 'USER' | 'ADMIN' | 'DEMO' | 'INACTIVE' | 'PAID' | 'OPS';
2985
+
2986
+ export type UpdateUserSettingDto = {
2987
+ /**
2988
+ * Security ID
2989
+ */
2990
+ secId?: number;
2991
+ /**
2992
+ * Annual interest rate
2993
+ */
2994
+ annualInterestRate?: number;
2995
+ /**
2996
+ * Currency code
2997
+ */
2998
+ currency?: string;
2999
+ /**
3000
+ * Base currency code
3001
+ */
3002
+ baseCurrency?: string;
3003
+ /**
3004
+ * Benchmark symbol
3005
+ */
3006
+ benchmark?: string;
3007
+ /**
3008
+ * Color scheme
3009
+ */
3010
+ colorScheme?: 'DARK' | 'LIGHT';
3011
+ /**
3012
+ * Date range filter
3013
+ */
3014
+ dateRange?: string;
3015
+ /**
3016
+ * Emergency fund amount
3017
+ */
3018
+ emergencyFund?: number;
3019
+ /**
3020
+ * Account filter IDs
3021
+ */
3022
+ 'filters.accounts'?: Array<string>;
3023
+ /**
3024
+ * Asset class filters
3025
+ */
3026
+ 'filters.assetClasses'?: Array<string>;
3027
+ /**
3028
+ * Data source filter
3029
+ */
3030
+ 'filters.dataSource'?: string;
3031
+ /**
3032
+ * Symbol filter
3033
+ */
3034
+ 'filters.symbol'?: string;
3035
+ /**
3036
+ * Tag filters
3037
+ */
3038
+ 'filters.tags'?: Array<string>;
3039
+ /**
3040
+ * Enable experimental features
3041
+ */
3042
+ isExperimentalFeatures?: boolean;
3043
+ /**
3044
+ * Enable restricted view mode
3045
+ */
3046
+ isRestrictedView?: boolean;
3047
+ /**
3048
+ * Language code
3049
+ */
3050
+ language?: string;
3051
+ /**
3052
+ * Locale code
3053
+ */
3054
+ locale?: string;
3055
+ /**
3056
+ * Projected total amount
3057
+ */
3058
+ projectedTotalAmount?: number;
3059
+ /**
3060
+ * Retirement date in ISO 8601 format
3061
+ */
3062
+ retirementDate?: string;
3063
+ /**
3064
+ * Savings rate percentage
3065
+ */
3066
+ savingsRate?: number;
3067
+ /**
3068
+ * View mode
3069
+ */
3070
+ viewMode?: 'DEFAULT' | 'ZEN';
3071
+ };
3072
+
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;
3088
+ };
3089
+
3090
+ export type CreateTransactionRuleDto = {
3091
+ name: string;
3092
+ description?: string;
3093
+ narrationKeywords?: Array<unknown[]>;
3094
+ payeeKeywords?: Array<unknown[]>;
3095
+ categoryKeywords?: Array<unknown[]>;
3096
+ /**
3097
+ * Payment method keywords (e.g., HuaBei, YuEBao)
3098
+ */
3099
+ methodKeywords?: Array<unknown[]>;
3100
+ /**
3101
+ * Destination account for expenses/income (e.g., Expenses:Food:Coffee)
3102
+ */
3103
+ categoryAccount?: string;
3104
+ matchLogic: 'OR' | 'AND';
3105
+ /**
3106
+ * Minimum transaction amount (inclusive)
3107
+ */
3108
+ amountMin?: number;
3109
+ /**
3110
+ * Maximum transaction amount (inclusive)
3111
+ */
3112
+ amountMax?: number;
3113
+ priority: number;
3114
+ additionalTags?: Array<unknown[]>;
3115
+ additionalMetadata?: {
3116
+ [key: string]: unknown;
3117
+ };
3118
+ /**
3119
+ * If true, update existing rule with matching payeeKeywords[0] instead of creating new rule
3120
+ */
3121
+ upsertByPayee?: boolean;
3122
+ };
3123
+
3124
+ export type matchLogic = 'OR' | 'AND';
3125
+
3126
+ export type AmountRangeDto = {
3127
+ /**
3128
+ * Minimum amount
3129
+ */
3130
+ min?: number;
3131
+ /**
3132
+ * Maximum amount
3133
+ */
3134
+ max?: number;
3135
+ };
3136
+
3137
+ export type TransactionRuleResponseDto = {
3138
+ /**
3139
+ * Rule ID
3140
+ */
3141
+ id: string;
3142
+ /**
3143
+ * Rule name
3144
+ */
3145
+ name: string;
3146
+ /**
3147
+ * Rule description
3148
+ */
3149
+ description?: string;
3150
+ /**
3151
+ * Keywords to match in transaction narration
3152
+ */
3153
+ narrationKeywords: Array<string>;
3154
+ /**
3155
+ * Keywords to match in payee name
3156
+ */
3157
+ payeeKeywords: Array<string>;
3158
+ /**
3159
+ * Keywords to match in category
3160
+ */
3161
+ categoryKeywords: Array<string>;
3162
+ /**
3163
+ * Keywords to match in payment method
3164
+ */
3165
+ methodKeywords: Array<string>;
3166
+ /**
3167
+ * Destination account for categorization
3168
+ */
3169
+ categoryAccount?: string;
3170
+ /**
3171
+ * Keyword matching logic
3172
+ */
3173
+ matchLogic: 'OR' | 'AND';
3174
+ /**
3175
+ * Amount range for matching
3176
+ */
3177
+ amountRange?: AmountRangeDto;
3178
+ /**
3179
+ * Rule priority (0-1000, higher = first match)
3180
+ */
3181
+ priority: number;
3182
+ /**
3183
+ * Whether the rule is enabled
2702
3184
  */
2703
3185
  enabled: boolean;
2704
3186
  /**
@@ -2960,124 +3442,6 @@ export type TestRuleResponseDto = {
2960
3442
  };
2961
3443
  };
2962
3444
 
2963
- export type DeleteOwnUserDto = {
2964
- /**
2965
- * Access token for user verification
2966
- */
2967
- accessToken: string;
2968
- };
2969
-
2970
- export type SignupDto = {
2971
- /**
2972
- * Cloudflare Turnstile verification token (optional when Turnstile disabled)
2973
- */
2974
- turnstileToken?: string;
2975
- };
2976
-
2977
- export type UpdateUserSettingDto = {
2978
- /**
2979
- * Security ID
2980
- */
2981
- secId?: number;
2982
- /**
2983
- * Annual interest rate
2984
- */
2985
- annualInterestRate?: number;
2986
- /**
2987
- * Currency code
2988
- */
2989
- currency?: string;
2990
- /**
2991
- * Base currency code
2992
- */
2993
- baseCurrency?: string;
2994
- /**
2995
- * Benchmark symbol
2996
- */
2997
- benchmark?: string;
2998
- /**
2999
- * Color scheme
3000
- */
3001
- colorScheme?: 'DARK' | 'LIGHT';
3002
- /**
3003
- * Date range filter
3004
- */
3005
- dateRange?: string;
3006
- /**
3007
- * Emergency fund amount
3008
- */
3009
- emergencyFund?: number;
3010
- /**
3011
- * Account filter IDs
3012
- */
3013
- 'filters.accounts'?: Array<string>;
3014
- /**
3015
- * Asset class filters
3016
- */
3017
- 'filters.assetClasses'?: Array<string>;
3018
- /**
3019
- * Data source filter
3020
- */
3021
- 'filters.dataSource'?: string;
3022
- /**
3023
- * Symbol filter
3024
- */
3025
- 'filters.symbol'?: string;
3026
- /**
3027
- * Tag filters
3028
- */
3029
- 'filters.tags'?: Array<string>;
3030
- /**
3031
- * Enable experimental features
3032
- */
3033
- isExperimentalFeatures?: boolean;
3034
- /**
3035
- * Enable restricted view mode
3036
- */
3037
- isRestrictedView?: boolean;
3038
- /**
3039
- * Language code
3040
- */
3041
- language?: string;
3042
- /**
3043
- * Locale code
3044
- */
3045
- locale?: string;
3046
- /**
3047
- * Projected total amount
3048
- */
3049
- projectedTotalAmount?: number;
3050
- /**
3051
- * Retirement date in ISO 8601 format
3052
- */
3053
- retirementDate?: string;
3054
- /**
3055
- * Savings rate percentage
3056
- */
3057
- savingsRate?: number;
3058
- /**
3059
- * View mode
3060
- */
3061
- viewMode?: 'DEFAULT' | 'ZEN';
3062
- };
3063
-
3064
- /**
3065
- * Color scheme
3066
- */
3067
- export type colorScheme = 'DARK' | 'LIGHT';
3068
-
3069
- /**
3070
- * View mode
3071
- */
3072
- export type viewMode = 'DEFAULT' | 'ZEN';
3073
-
3074
- export type UpdatePropertyDto = {
3075
- /**
3076
- * Property value
3077
- */
3078
- value: string;
3079
- };
3080
-
3081
3445
  export type CreateBeanEventDto = {
3082
3446
  /**
3083
3447
  * Life event date (ISO 8601)
@@ -3168,6 +3532,36 @@ export type UpdateBeanEventDto = {
3168
3532
  };
3169
3533
  };
3170
3534
 
3535
+ export type OnboardingAccountDto = {
3536
+ /**
3537
+ * Account path (Assets/Liabilities only; format validated by the account service)
3538
+ */
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;
3552
+ };
3553
+
3554
+ export type OnboardingDto = {
3555
+ /**
3556
+ * Asset/Liability accounts to register with opening balances
3557
+ */
3558
+ accounts?: Array<OnboardingAccountDto>;
3559
+ /**
3560
+ * Skip asset registration; only bootstrap the core account set
3561
+ */
3562
+ skipAssetRegistration?: boolean;
3563
+ };
3564
+
3171
3565
  export type ActualBalanceDto = {
3172
3566
  /**
3173
3567
  * Actual balance amount as a decimal string (preserves precision for tolerance inference).
@@ -3566,116 +3960,28 @@ export type UpdateMapperDefaultsDto = {
3566
3960
  expenseAccount?: string;
3567
3961
  /**
3568
3962
  * Default income account (optional)
3569
- */
3570
- incomeAccount?: string;
3571
- /**
3572
- * Payment method to source account mapping. Maps payment method keywords to Beancount account paths. Used by Alipay/WeChat importers to determine sourceAccount based on payment method (e.g., HuaBei, CreditCard).
3573
- */
3574
- methodAccountMapping?: {
3575
- [key: string]: unknown;
3576
- };
3577
- };
3578
-
3579
- export type UpdateConfigDataDto = {
3580
- /**
3581
- * Mapper defaults configuration
3582
- */
3583
- defaults?: UpdateMapperDefaultsDto;
3584
- };
3585
-
3586
- export type UpdateImporterConfigDto = {
3587
- /**
3588
- * Configuration data (v1 schema)
3589
- */
3590
- data?: UpdateConfigDataDto;
3591
- };
3592
-
3593
- export type CreatePlatformDto = {
3594
- /**
3595
- * Platform name
3596
- */
3597
- name: string;
3598
- /**
3599
- * Platform canonical identifier (lowercase, kebab-case)
3600
- */
3601
- canonical: string;
3602
- /**
3603
- * Platform aliases (multi-language names for lookup)
3604
- */
3605
- aliases: Array<string>;
3606
- /**
3607
- * Platform URL
3608
- */
3609
- url: string;
3610
- /**
3611
- * Platform type
3612
- */
3613
- type:
3614
- | 'BANK'
3615
- | 'BROKERAGE'
3616
- | 'CRYPTO_EXCHANGE'
3617
- | 'PAYMENT'
3618
- | 'INVESTMENT'
3619
- | 'INSURANCE'
3620
- | 'OTHER';
3621
- /**
3622
- * Platform logo URL
3623
- */
3624
- logoUrl?: string;
3625
- /**
3626
- * Whether the platform is active
3627
- */
3628
- isActive?: boolean;
3629
- };
3630
-
3631
- /**
3632
- * Platform type
3633
- */
3634
- export type type3 =
3635
- | 'BANK'
3636
- | 'BROKERAGE'
3637
- | 'CRYPTO_EXCHANGE'
3638
- | 'PAYMENT'
3639
- | 'INVESTMENT'
3640
- | 'INSURANCE'
3641
- | 'OTHER';
3642
-
3643
- export type UpdatePlatformDto = {
3644
- /**
3645
- * Platform name
3646
- */
3647
- name?: string;
3648
- /**
3649
- * Platform canonical identifier (lowercase, kebab-case)
3650
- */
3651
- canonical?: string;
3652
- /**
3653
- * Platform aliases (multi-language names for lookup)
3654
- */
3655
- aliases?: Array<string>;
3656
- /**
3657
- * Platform URL
3658
- */
3659
- url?: string;
3660
- /**
3661
- * Platform type
3662
- */
3663
- type?:
3664
- | 'BANK'
3665
- | 'BROKERAGE'
3666
- | 'CRYPTO_EXCHANGE'
3667
- | 'PAYMENT'
3668
- | 'INVESTMENT'
3669
- | 'INSURANCE'
3670
- | 'OTHER';
3963
+ */
3964
+ incomeAccount?: string;
3671
3965
  /**
3672
- * Platform logo URL
3966
+ * Payment method to source account mapping. Maps payment method keywords to Beancount account paths. Used by Alipay/WeChat importers to determine sourceAccount based on payment method (e.g., HuaBei, CreditCard).
3673
3967
  */
3674
- logoUrl?: string;
3968
+ methodAccountMapping?: {
3969
+ [key: string]: unknown;
3970
+ };
3971
+ };
3972
+
3973
+ export type UpdateConfigDataDto = {
3675
3974
  /**
3676
- * Whether the platform is active
3975
+ * Mapper defaults configuration
3677
3976
  */
3678
- isActive?: boolean;
3977
+ defaults?: UpdateMapperDefaultsDto;
3978
+ };
3979
+
3980
+ export type UpdateImporterConfigDto = {
3981
+ /**
3982
+ * Configuration data (v1 schema)
3983
+ */
3984
+ data?: UpdateConfigDataDto;
3679
3985
  };
3680
3986
 
3681
3987
  export type ProviderSyncConfigDto = {
@@ -3699,6 +4005,10 @@ export type ProviderSyncConfigDto = {
3699
4005
  * Filter pending transactions
3700
4006
  */
3701
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;
3702
4012
  };
3703
4013
 
3704
4014
  export type ProviderSyncDto = {
@@ -3754,6 +4064,61 @@ export type SupportedProvidersResponseDto = {
3754
4064
  providers: Array<string>;
3755
4065
  };
3756
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
+
3757
4122
  export type ParserTelemetryReportDto = unknown;
3758
4123
 
3759
4124
  export type UncoveredFormatMissDto = unknown;
@@ -3773,6 +4138,14 @@ export type ProcessNlpDto = {
3773
4138
  parsedData?: {
3774
4139
  [key: string]: unknown;
3775
4140
  };
4141
+ /**
4142
+ * confirm_rule echo-back: rule id selected from the prior confirm_rule response (matchedRule.id or alternatives[i].ruleId). Applied directly when the session is confirming_rule — no NL re-parse.
4143
+ */
4144
+ selectedRuleId?: string;
4145
+ /**
4146
+ * confirm_account echo-back: account path selected from the prior confirm_account response (suggestedAccount, similarAccounts[i], or a typed path). Applied directly when the session is confirming_account — no NL re-parse.
4147
+ */
4148
+ selectedAccount?: string;
3776
4149
  };
3777
4150
 
3778
4151
  export type NlpTransactionInfoDto = {
@@ -4016,9 +4389,9 @@ export type NlpAccountConfirmationDataDto = {
4016
4389
  */
4017
4390
  invalidAccount: string;
4018
4391
  /**
4019
- * Suggested replacement account
4392
+ * Suggested replacement account (omitted when no clear candidate)
4020
4393
  */
4021
- suggestedAccount: string;
4394
+ suggestedAccount?: string;
4022
4395
  /**
4023
4396
  * Similar accounts for user selection
4024
4397
  */
@@ -4146,7 +4519,7 @@ export type NlpSuggestedAccountDto = {
4146
4519
  */
4147
4520
  account: string;
4148
4521
  /**
4149
- * Confidence score for this suggestion (0-1)
4522
+ * Confidence score for this suggestion (0-1). Present = predicted (confirm/confirm_rule/confirm_account); omitted = actual persisted account (created). (#586)
4150
4523
  */
4151
4524
  confidence?: number;
4152
4525
  };
@@ -4164,21 +4537,21 @@ export type NlpSuggestedAccountsDto = {
4164
4537
 
4165
4538
  export type NlpDefaultAccountsDto = {
4166
4539
  /**
4167
- * Default asset account
4540
+ * Default OPEN asset account (MRU when multiple), or null when none/ambiguous
4168
4541
  */
4169
- asset: string;
4542
+ asset: string | null;
4170
4543
  /**
4171
- * Default expense account
4544
+ * Default OPEN expense account (MRU when multiple), or null when none/ambiguous
4172
4545
  */
4173
- expense: string;
4546
+ expense: string | null;
4174
4547
  /**
4175
- * Default income account
4548
+ * Default OPEN income account (MRU when multiple), or null when none/ambiguous
4176
4549
  */
4177
- income: string;
4550
+ income: string | null;
4178
4551
  /**
4179
- * Default liability account
4552
+ * Default OPEN liability account (MRU when multiple), or null when none/ambiguous
4180
4553
  */
4181
- liability: string;
4554
+ liability: string | null;
4182
4555
  };
4183
4556
 
4184
4557
  export type NlpResponseDto = {
@@ -4197,7 +4570,8 @@ export type NlpResponseDto = {
4197
4570
  | 'confirm_rule'
4198
4571
  | 'confirm_account'
4199
4572
  | 'confirm_payee'
4200
- | 'cancel';
4573
+ | 'cancel'
4574
+ | 'aborted';
4201
4575
  /**
4202
4576
  * Transaction intent detected by EntityRouter (v6.0: 5 core intents). Frontend uses this to render scenario-specific form fields.
4203
4577
  */
@@ -4260,79 +4634,277 @@ export type NlpResponseDto = {
4260
4634
  /**
4261
4635
  * Rule match data (when action is "confirm_rule"). Contains information about medium-confidence rule match for user confirmation.
4262
4636
  */
4263
- ruleData?: NlpRuleConfirmationDataDto;
4637
+ ruleData?: NlpRuleConfirmationDataDto;
4638
+ /**
4639
+ * Account validation data (when action is "confirm_account"). Contains information about invalid account for user correction.
4640
+ */
4641
+ accountData?: NlpAccountConfirmationDataDto;
4642
+ /**
4643
+ * Payee confirmation data (when action is "confirm_payee"). Contains information about medium/low confidence payee match for user confirmation.
4644
+ */
4645
+ payeeData?: NlpPayeeConfirmationDataDto;
4646
+ /**
4647
+ * Overall confidence score (0-1)
4648
+ */
4649
+ confidence?: number;
4650
+ /**
4651
+ * Confidence threshold for automatic creation (default: 0.75). When confidence < threshold, action will be "confirm" requiring user verification.
4652
+ */
4653
+ confidenceThreshold?: number;
4654
+ /**
4655
+ * Recurring transaction match info (when action is "created"). Contains match details when transaction matches a pending expected transaction.
4656
+ */
4657
+ recurringMatch?: RecurringMatchInfoDto;
4658
+ /**
4659
+ * Recurring rule creation suggestion (when action is "created"). Contains suggestion to create a recurring rule based on detected patterns. Only present when no existing rule matched and similar historical transactions were found.
4660
+ */
4661
+ recurringSuggestion?: RecurringSuggestionDto;
4662
+ /**
4663
+ * Suggested accounts for this transaction (#586). confirm/confirm_rule/confirm_account: predicted (source/destination carry confidence); created: actual persisted accounts (confidence omitted). confirm_account destination is the suggested replacement, never the invalid account.
4664
+ */
4665
+ suggestedAccounts?: NlpSuggestedAccountsDto;
4666
+ /**
4667
+ * Default fallback accounts for the user/region (#586). v1 returns universal constants; per-user personalization is planned.
4668
+ */
4669
+ defaultAccounts?: NlpDefaultAccountsDto;
4670
+ };
4671
+
4672
+ /**
4673
+ * Response status
4674
+ */
4675
+ export type status4 = 'success' | 'pending' | 'error';
4676
+
4677
+ /**
4678
+ * Action taken or requested
4679
+ */
4680
+ export type action2 =
4681
+ | 'created'
4682
+ | 'ask'
4683
+ | 'confirm'
4684
+ | 'confirm_duplicate'
4685
+ | 'confirm_rule'
4686
+ | 'confirm_account'
4687
+ | 'confirm_payee'
4688
+ | 'cancel'
4689
+ | 'aborted';
4690
+
4691
+ /**
4692
+ * Transaction intent detected by EntityRouter (v6.0: 5 core intents). Frontend uses this to render scenario-specific form fields.
4693
+ */
4694
+ export type intent = 'expense' | 'asset' | 'income' | 'liability' | 'equity';
4695
+
4696
+ /**
4697
+ * Asset sub-type (only present when intent is "asset"). Determines which asset-related form to render.
4698
+ */
4699
+ export type assetSubType = 'transfer' | 'banking' | 'investment';
4700
+
4701
+ /**
4702
+ * Liability sub-type (only present when intent is "liability"). borrow: borrowing money (Liabilities → Assets), repay: repaying debt (Assets → Liabilities).
4703
+ */
4704
+ export type liabilitySubType = 'borrow' | 'repay';
4705
+
4706
+ /**
4707
+ * Equity sub-type (only present when intent is "equity"). opening: account opening balance (Equity → Assets), adjustment: balance correction.
4708
+ */
4709
+ export type equitySubType = 'opening' | 'adjustment';
4710
+
4711
+ export type PlatformListItemDto = {
4712
+ /**
4713
+ * Global platform ID
4714
+ */
4715
+ id: string;
4716
+ /**
4717
+ * Platform name
4718
+ */
4719
+ name: string;
4720
+ /**
4721
+ * Platform URL
4722
+ */
4723
+ url: string;
4724
+ /**
4725
+ * Platform type
4726
+ */
4727
+ type:
4728
+ | 'BANK'
4729
+ | 'BROKERAGE'
4730
+ | 'CRYPTO_EXCHANGE'
4731
+ | 'PAYMENT'
4732
+ | 'INVESTMENT'
4733
+ | 'INSURANCE'
4734
+ | 'OTHER';
4735
+ /**
4736
+ * Canonical identifier in ACCOUNT_RE format (e.g., "icbc")
4737
+ */
4738
+ canonical: string;
4739
+ /**
4740
+ * Suggested path segment — canonical with first char uppercased (ACC_COMP_NAME_RE)
4741
+ */
4742
+ suggestedSegment: string;
4743
+ /**
4744
+ * Logo URL
4745
+ */
4746
+ logoUrl: string | null;
4747
+ /**
4748
+ * Whether user has accounts using this platform
4749
+ */
4750
+ isBound: boolean;
4751
+ };
4752
+
4753
+ /**
4754
+ * Platform type
4755
+ */
4756
+ export type type3 =
4757
+ | 'BANK'
4758
+ | 'BROKERAGE'
4759
+ | 'CRYPTO_EXCHANGE'
4760
+ | 'PAYMENT'
4761
+ | 'INVESTMENT'
4762
+ | 'INSURANCE'
4763
+ | 'OTHER';
4764
+
4765
+ export type PlatformMatchResultDto = {
4766
+ /**
4767
+ * Global platform ID
4768
+ */
4769
+ id: string;
4770
+ /**
4771
+ * Platform name (e.g., "ICBC")
4772
+ */
4773
+ name: string;
4774
+ /**
4775
+ * Canonical identifier in ACCOUNT_RE format (e.g., "icbc")
4776
+ */
4777
+ canonical: string;
4778
+ /**
4779
+ * Platform type
4780
+ */
4781
+ type:
4782
+ | 'BANK'
4783
+ | 'BROKERAGE'
4784
+ | 'CRYPTO_EXCHANGE'
4785
+ | 'PAYMENT'
4786
+ | 'INVESTMENT'
4787
+ | 'INSURANCE'
4788
+ | 'OTHER';
4789
+ /**
4790
+ * Suggested path segment — canonical, already in ACCOUNT_RE format
4791
+ */
4792
+ suggestedSegment: string;
4793
+ /**
4794
+ * Logo URL
4795
+ */
4796
+ logoUrl: string | null;
4797
+ /**
4798
+ * How this row matched: 'exact' > 'prefix' > 'substring'
4799
+ */
4800
+ matchType: 'exact' | 'prefix' | 'substring';
4801
+ };
4802
+
4803
+ /**
4804
+ * How this row matched: 'exact' > 'prefix' > 'substring'
4805
+ */
4806
+ export type matchType = 'exact' | 'prefix' | 'substring';
4807
+
4808
+ export type PlatformMatchResponseDto = {
4809
+ /**
4810
+ * Ranked matches, best tier first (at most 10 rows)
4811
+ */
4812
+ platforms: Array<PlatformMatchResultDto>;
4813
+ /**
4814
+ * Overall match quality — top row's tier, or 'none' when no hits
4815
+ */
4816
+ matchType: 'none' | 'exact' | 'prefix' | 'substring';
4817
+ /**
4818
+ * Total matches before LIMIT (truncation transparency)
4819
+ */
4820
+ total: number;
4821
+ /**
4822
+ * true when total > platforms.length (more matches exist)
4823
+ */
4824
+ hasMore: boolean;
4825
+ };
4826
+
4827
+ /**
4828
+ * Overall match quality — top row's tier, or 'none' when no hits
4829
+ */
4830
+ export type matchType2 = 'none' | 'exact' | 'prefix' | 'substring';
4831
+
4832
+ export type CreatePlatformDto = {
4833
+ /**
4834
+ * Platform name
4835
+ */
4836
+ name: string;
4837
+ /**
4838
+ * Platform canonical identifier (lowercase, kebab-case)
4839
+ */
4840
+ canonical: string;
4841
+ /**
4842
+ * Platform aliases (multi-language names for lookup)
4843
+ */
4844
+ aliases: Array<string>;
4845
+ /**
4846
+ * Platform URL
4847
+ */
4848
+ url: string;
4849
+ /**
4850
+ * Platform type
4851
+ */
4852
+ type:
4853
+ | 'BANK'
4854
+ | 'BROKERAGE'
4855
+ | 'CRYPTO_EXCHANGE'
4856
+ | 'PAYMENT'
4857
+ | 'INVESTMENT'
4858
+ | 'INSURANCE'
4859
+ | 'OTHER';
4860
+ /**
4861
+ * Platform logo URL
4862
+ */
4863
+ logoUrl?: string;
4264
4864
  /**
4265
- * Account validation data (when action is "confirm_account"). Contains information about invalid account for user correction.
4865
+ * Whether the platform is active
4266
4866
  */
4267
- accountData?: NlpAccountConfirmationDataDto;
4867
+ isActive?: boolean;
4868
+ };
4869
+
4870
+ export type UpdatePlatformDto = {
4268
4871
  /**
4269
- * Payee confirmation data (when action is "confirm_payee"). Contains information about medium/low confidence payee match for user confirmation.
4872
+ * Platform name
4270
4873
  */
4271
- payeeData?: NlpPayeeConfirmationDataDto;
4874
+ name?: string;
4272
4875
  /**
4273
- * Overall confidence score (0-1)
4876
+ * Platform canonical identifier (lowercase, kebab-case)
4274
4877
  */
4275
- confidence?: number;
4878
+ canonical?: string;
4276
4879
  /**
4277
- * Confidence threshold for automatic creation (default: 0.75). When confidence < threshold, action will be "confirm" requiring user verification.
4880
+ * Platform aliases (multi-language names for lookup)
4278
4881
  */
4279
- confidenceThreshold?: number;
4882
+ aliases?: Array<string>;
4280
4883
  /**
4281
- * Recurring transaction match info (when action is "created"). Contains match details when transaction matches a pending expected transaction.
4884
+ * Platform URL
4282
4885
  */
4283
- recurringMatch?: RecurringMatchInfoDto;
4886
+ url?: string;
4284
4887
  /**
4285
- * Recurring rule creation suggestion (when action is "created"). Contains suggestion to create a recurring rule based on detected patterns. Only present when no existing rule matched and similar historical transactions were found.
4888
+ * Platform type
4286
4889
  */
4287
- recurringSuggestion?: RecurringSuggestionDto;
4890
+ type?:
4891
+ | 'BANK'
4892
+ | 'BROKERAGE'
4893
+ | 'CRYPTO_EXCHANGE'
4894
+ | 'PAYMENT'
4895
+ | 'INVESTMENT'
4896
+ | 'INSURANCE'
4897
+ | 'OTHER';
4288
4898
  /**
4289
- * Suggested accounts for this transaction. Contains recommended source and destination accounts based on the detected intent and rules.
4899
+ * Platform logo URL
4290
4900
  */
4291
- suggestedAccounts?: NlpSuggestedAccountsDto;
4901
+ logoUrl?: string;
4292
4902
  /**
4293
- * Default accounts for the user/region. These are fallback accounts used when no specific suggestion is available.
4903
+ * Whether the platform is active
4294
4904
  */
4295
- defaultAccounts?: NlpDefaultAccountsDto;
4905
+ isActive?: boolean;
4296
4906
  };
4297
4907
 
4298
- /**
4299
- * Response status
4300
- */
4301
- export type status4 = 'success' | 'pending' | 'error';
4302
-
4303
- /**
4304
- * Action taken or requested
4305
- */
4306
- export type action2 =
4307
- | 'created'
4308
- | 'ask'
4309
- | 'confirm'
4310
- | 'confirm_duplicate'
4311
- | 'confirm_rule'
4312
- | 'confirm_account'
4313
- | 'confirm_payee'
4314
- | 'cancel';
4315
-
4316
- /**
4317
- * Transaction intent detected by EntityRouter (v6.0: 5 core intents). Frontend uses this to render scenario-specific form fields.
4318
- */
4319
- export type intent = 'expense' | 'asset' | 'income' | 'liability' | 'equity';
4320
-
4321
- /**
4322
- * Asset sub-type (only present when intent is "asset"). Determines which asset-related form to render.
4323
- */
4324
- export type assetSubType = 'transfer' | 'banking' | 'investment';
4325
-
4326
- /**
4327
- * Liability sub-type (only present when intent is "liability"). borrow: borrowing money (Liabilities → Assets), repay: repaying debt (Assets → Liabilities).
4328
- */
4329
- export type liabilitySubType = 'borrow' | 'repay';
4330
-
4331
- /**
4332
- * Equity sub-type (only present when intent is "equity"). opening: account opening balance (Equity → Assets), adjustment: balance correction.
4333
- */
4334
- export type equitySubType = 'opening' | 'adjustment';
4335
-
4336
4908
  export type NetWorthByCurrencyDto = {
4337
4909
  /**
4338
4910
  * Net worth by currency
@@ -5024,309 +5596,168 @@ export type HoldingPnlWarningDto = {
5024
5596
  export type type4 =
5025
5597
  | 'MISSING_COST_FX_RATE'
5026
5598
  | 'MISSING_MARKET_FX_RATE'
5027
- | 'MISSING_SALE_PRICE'
5028
- | 'MISSING_REALIZED_FX_RATE'
5029
- | 'OVERSOLD_LOTS'
5030
- | 'NO_PRICE'
5031
- | 'MIXED_COST_CURRENCY';
5032
-
5033
- export type HoldingPnlResponseDto = {
5034
- asOfDate: string;
5035
- baseCurrency: string;
5036
- /**
5037
- * Realized-P&L lot-matching method (FIFO or average). Unrealized cost basis remains average regardless of this value (#473).
5038
- */
5039
- method: 'average' | 'FIFO';
5040
- rows: Array<HoldingPnlRowDto>;
5041
- warnings: Array<HoldingPnlWarningDto>;
5042
- };
5043
-
5044
- /**
5045
- * Realized-P&L lot-matching method (FIFO or average). Unrealized cost basis remains average regardless of this value (#473).
5046
- */
5047
- export type method = 'average' | 'FIFO';
5048
-
5049
- export type CreateBeanPriceDto = {
5050
- /**
5051
- * Currency being priced (e.g., USD, AAPL, BTC)
5052
- */
5053
- currency: string;
5054
- /**
5055
- * Quote currency (pricing currency, e.g., CNY, EUR)
5056
- */
5057
- quoteCurrency: string;
5058
- /**
5059
- * Price amount (MUST be >= 0 per Beancount spec, supports up to 15 decimal places). Zero allowed for conversion entries, negative strictly prohibited.
5060
- */
5061
- amount: number;
5062
- /**
5063
- * Price date (ISO 8601 format)
5064
- */
5065
- date: string;
5066
- /**
5067
- * Metadata (validated by Zod schema, max field lengths enforced)
5068
- */
5069
- metadata?: {
5070
- [key: string]: unknown;
5071
- };
5072
- };
5073
-
5074
- export type PriceResponseDto = {
5075
- /**
5076
- * Unique identifier
5077
- */
5078
- id: string;
5079
- /**
5080
- * User ID (owner of the price)
5081
- */
5082
- userId: string;
5083
- /**
5084
- * Currency being priced (e.g., USD, AAPL, BTC)
5085
- */
5086
- currency: string;
5087
- /**
5088
- * Quote currency (pricing currency, e.g., USD, CNY)
5089
- */
5090
- quoteCurrency: string;
5091
- /**
5092
- * Price amount (corresponds to Beancount Amount.number). Supports up to 15 decimal places.
5093
- */
5094
- amount: number;
5095
- /**
5096
- * Price date (ISO 8601 format). Represents the date this price was valid.
5097
- */
5098
- date: string;
5099
- /**
5100
- * Metadata (corresponds to Beancount meta field). Contains source, confidence, note, etc.
5101
- */
5102
- meta: {
5103
- [key: string]: unknown;
5104
- };
5105
- /**
5106
- * Creation timestamp
5107
- */
5108
- createdAt: string;
5109
- /**
5110
- * Last update timestamp
5111
- */
5112
- updatedAt: string;
5113
- };
5114
-
5115
- export type PriceListResponseDto = {
5116
- /**
5117
- * List of prices
5118
- */
5119
- items: Array<PriceResponseDto>;
5120
- /**
5121
- * Total number of prices
5122
- */
5123
- total: number;
5124
- };
5125
-
5126
- export type UpdateBeanPriceDto = {
5127
- /**
5128
- * Currency being priced
5129
- */
5130
- currency?: string;
5131
- /**
5132
- * Quote currency (pricing currency)
5133
- */
5134
- quoteCurrency?: string;
5135
- /**
5136
- * Price amount (MUST be >= 0 per Beancount spec)
5137
- */
5138
- amount?: number;
5139
- /**
5140
- * Price date (ISO 8601 format)
5141
- */
5142
- date?: string;
5143
- /**
5144
- * Metadata
5145
- */
5146
- metadata?: {
5147
- [key: string]: unknown;
5148
- };
5149
- };
5150
-
5151
- export type CurrencyBalanceDto = {
5152
- /**
5153
- * ISO 4217 currency code
5154
- */
5155
- currency: string;
5156
- /**
5157
- * Balance amount
5158
- */
5159
- balance: string;
5160
- };
5161
-
5162
- export type TimeSeriesPointDto = {
5163
- /**
5164
- * Date in YYYY-MM-DD format
5165
- */
5166
- date: string;
5167
- /**
5168
- * Value at this date (in base currency)
5169
- */
5170
- value: string;
5171
- /**
5172
- * Change from previous point
5173
- */
5174
- change?: {
5175
- [key: string]: unknown;
5176
- };
5177
- /**
5178
- * Total assets at this date (in base currency)
5179
- */
5180
- assets?: string;
5181
- /**
5182
- * Total liabilities at this date (in base currency)
5183
- */
5184
- liabilities?: string;
5185
- /**
5186
- * Multi-currency breakdown for this point
5187
- */
5188
- byCurrency?: Array<CurrencyBalanceDto>;
5189
- };
5190
-
5191
- export type TrendSummaryDto = {
5192
- /**
5193
- * Value at start of period
5194
- */
5195
- startValue: string;
5196
- /**
5197
- * Value at end of period
5198
- */
5199
- endValue: string;
5200
- /**
5201
- * Total change over period
5202
- */
5203
- totalChange: string;
5599
+ | 'MISSING_SALE_PRICE'
5600
+ | 'MISSING_REALIZED_FX_RATE'
5601
+ | 'OVERSOLD_LOTS'
5602
+ | 'NO_PRICE'
5603
+ | 'MIXED_COST_CURRENCY';
5604
+
5605
+ export type HoldingPnlResponseDto = {
5606
+ asOfDate: string;
5607
+ baseCurrency: string;
5204
5608
  /**
5205
- * Total change percentage
5609
+ * Realized-P&L lot-matching method (FIFO or average). Unrealized cost basis remains average regardless of this value (#473).
5206
5610
  */
5207
- totalChangePercentage: string;
5611
+ method: 'average' | 'FIFO';
5612
+ rows: Array<HoldingPnlRowDto>;
5613
+ warnings: Array<HoldingPnlWarningDto>;
5208
5614
  };
5209
5615
 
5210
- export type MultiCurrencyPointDto = {
5211
- /**
5212
- * Date in YYYY-MM-DD format
5213
- */
5214
- date: string;
5616
+ /**
5617
+ * Realized-P&L lot-matching method (FIFO or average). Unrealized cost basis remains average regardless of this value (#473).
5618
+ */
5619
+ export type method = 'average' | 'FIFO';
5620
+
5621
+ export type AnonymousLoginDto = {
5215
5622
  /**
5216
- * Balances by currency
5623
+ * Access token for anonymous login
5217
5624
  */
5218
- byCurrency: Array<CurrencyBalanceDto>;
5625
+ accessToken: string;
5219
5626
  };
5220
5627
 
5221
- export type PortfolioTrendsResponseDto = {
5222
- /**
5223
- * Time series data points
5224
- */
5225
- series: Array<TimeSeriesPointDto>;
5226
- /**
5227
- * Period summary
5228
- */
5229
- summary: TrendSummaryDto;
5628
+ export type AnonymousLoginResponseDto = {
5230
5629
  /**
5231
- * Period requested
5630
+ * JWT auth token
5232
5631
  */
5233
- period: string;
5632
+ authToken: string;
5633
+ };
5634
+
5635
+ export type SymbolSearchResultDto = {
5636
+ symbol: string;
5637
+ name?: {
5638
+ [key: string]: unknown;
5639
+ } | null;
5640
+ exchange?: {
5641
+ [key: string]: unknown;
5642
+ } | null;
5234
5643
  /**
5235
- * Data granularity
5644
+ * OpenBB asset_type (e.g. stock, etf)
5236
5645
  */
5237
- granularity: string;
5646
+ assetType?: {
5647
+ [key: string]: unknown;
5648
+ } | null;
5238
5649
  /**
5239
- * Base currency for converted values
5650
+ * IGN asset class (region.types.ts ASSET_CLASSES)
5240
5651
  */
5241
- currency: string;
5652
+ assetClass?: {
5653
+ [key: string]: unknown;
5654
+ } | null;
5242
5655
  /**
5243
- * Multi-currency time series (each point has currency breakdown)
5656
+ * IGN asset sub-class (region.types.ts ASSET_SUB_CLASSES)
5244
5657
  */
5245
- byCurrency?: Array<MultiCurrencyPointDto>;
5658
+ assetSubClass?: {
5659
+ [key: string]: unknown;
5660
+ } | null;
5246
5661
  /**
5247
- * Exchange rate warnings
5662
+ * Trading currency (extra_data or inferred from exchange)
5248
5663
  */
5249
- warnings?: Array<ExchangeRateWarningDto>;
5664
+ currency?: {
5665
+ [key: string]: unknown;
5666
+ } | null;
5250
5667
  };
5251
5668
 
5252
- export type CashFlowPointDto = {
5253
- /**
5254
- * Month key (YYYY-MM)
5255
- */
5256
- month: string;
5669
+ export type SymbolQuoteDto = {
5670
+ symbol?: string;
5671
+ name?: {
5672
+ [key: string]: unknown;
5673
+ } | null;
5674
+ exchange?: {
5675
+ [key: string]: unknown;
5676
+ } | null;
5257
5677
  /**
5258
- * Income in base currency (absolute, converted)
5678
+ * OpenBB asset_type
5259
5679
  */
5260
- income: string;
5680
+ assetType?: {
5681
+ [key: string]: unknown;
5682
+ } | null;
5261
5683
  /**
5262
- * Expense in base currency (absolute, converted)
5684
+ * IGN asset class
5263
5685
  */
5264
- expense: string;
5686
+ assetClass?: {
5687
+ [key: string]: unknown;
5688
+ } | null;
5265
5689
  /**
5266
- * netSavings = income − expense (savings positive)
5690
+ * IGN asset sub-class
5267
5691
  */
5268
- netSavings: string;
5269
- };
5270
-
5271
- export type CashFlowTrendSummaryDto = {
5692
+ assetSubClass?: {
5693
+ [key: string]: unknown;
5694
+ } | null;
5272
5695
  /**
5273
- * Total income across the period
5696
+ * Trading currency (extra_data or inferred from exchange)
5274
5697
  */
5275
- totalIncome: string;
5698
+ currency?: {
5699
+ [key: string]: unknown;
5700
+ } | null;
5276
5701
  /**
5277
- * Total expense across the period
5702
+ * Latest price (Decimal string)
5278
5703
  */
5279
- totalExpense: string;
5704
+ price?: {
5705
+ [key: string]: unknown;
5706
+ } | null;
5280
5707
  /**
5281
- * income − expense across the period
5708
+ * Date the price was observed (ISO yyyy-MM-dd)
5282
5709
  */
5283
- totalNetSavings: string;
5710
+ priceDate?: {
5711
+ [key: string]: unknown;
5712
+ } | null;
5284
5713
  /**
5285
- * totalNetSavings divided by the window length (N months, incl. zero-filled)
5714
+ * Change vs previous close, in percentage points (1.7 == 1.7%). openbb stores change_percent as a normalized decimal; this exposes percentage points for frontend convenience.
5286
5715
  */
5287
- averageMonthlyNetSavings: string;
5288
- };
5289
-
5290
- export type CashFlowTrendsResponseDto = {
5716
+ changePercent?: {
5717
+ [key: string]: unknown;
5718
+ } | null;
5291
5719
  /**
5292
- * Monthly cash-flow series (fixed N-month window, zero-filled)
5720
+ * Previous close (Decimal string)
5293
5721
  */
5294
- series: Array<CashFlowPointDto>;
5722
+ prevClose?: {
5723
+ [key: string]: unknown;
5724
+ } | null;
5295
5725
  /**
5296
- * Period totals
5726
+ * Day open (Decimal string)
5297
5727
  */
5298
- summary: CashFlowTrendSummaryDto;
5728
+ open?: {
5729
+ [key: string]: unknown;
5730
+ } | null;
5299
5731
  /**
5300
- * Period requested
5732
+ * Day high (Decimal string)
5301
5733
  */
5302
- period: string;
5734
+ high?: {
5735
+ [key: string]: unknown;
5736
+ } | null;
5303
5737
  /**
5304
- * Data granularity (v1 returns month buckets)
5738
+ * Day low (Decimal string)
5305
5739
  */
5306
- granularity: string;
5740
+ low?: {
5741
+ [key: string]: unknown;
5742
+ } | null;
5307
5743
  /**
5308
- * Base currency for converted values
5744
+ * Day volume (Decimal string)
5309
5745
  */
5310
- currency: string;
5746
+ volume?: {
5747
+ [key: string]: unknown;
5748
+ } | null;
5311
5749
  /**
5312
- * Exchange rate warnings (e.g. missing rate for a currency)
5750
+ * 52-week high (Decimal string)
5313
5751
  */
5314
- warnings?: Array<ExchangeRateWarningDto>;
5315
- };
5316
-
5317
- export type GenerateSnapshotBody = unknown;
5318
-
5319
- export type GenerateSnapshotResponse = unknown;
5320
-
5321
- export type BackfillSnapshotsBody = unknown;
5322
-
5323
- export type BackfillSnapshotsResponse = unknown;
5324
-
5325
- export type AnonymousLoginDto = {
5752
+ yearHigh?: {
5753
+ [key: string]: unknown;
5754
+ } | null;
5326
5755
  /**
5327
- * Access token for anonymous login
5756
+ * 52-week low (Decimal string)
5328
5757
  */
5329
- accessToken: string;
5758
+ yearLow?: {
5759
+ [key: string]: unknown;
5760
+ } | null;
5330
5761
  };
5331
5762
 
5332
5763
  export type AccountControllerCreateData = {
@@ -5357,7 +5788,7 @@ export type AccountControllerFindAllData = {
5357
5788
  */
5358
5789
  region: 'cn' | 'us' | 'de' | 'gb';
5359
5790
  /**
5360
- * Search term for path or i18nKey
5791
+ * Search term for account path
5361
5792
  */
5362
5793
  search?: string;
5363
5794
  /**
@@ -5440,6 +5871,21 @@ export type AccountControllerReopenData = {
5440
5871
 
5441
5872
  export type AccountControllerReopenResponse = AccountResponseDto;
5442
5873
 
5874
+ export type AccountControllerAddOpeningBalanceData = {
5875
+ /**
5876
+ * Account UUID
5877
+ */
5878
+ id: string;
5879
+ /**
5880
+ * Region code for tenant context
5881
+ */
5882
+ region: 'cn' | 'us' | 'de' | 'gb';
5883
+ requestBody: CreateOpeningBalanceDto;
5884
+ };
5885
+
5886
+ export type AccountControllerAddOpeningBalanceResponse =
5887
+ OpeningBalanceResultDto;
5888
+
5443
5889
  export type AccountStandardsControllerGetTemplatesData = {
5444
5890
  /**
5445
5891
  * Region code (cn, us, de)
@@ -5628,7 +6074,7 @@ export type TransactionControllerDeleteResponse = void;
5628
6074
 
5629
6075
  export type BalanceControllerGetBalanceData = {
5630
6076
  /**
5631
- * Account name (e.g., "Assets:Bank:Checking")
6077
+ * Account name (e.g., "Assets:Checking")
5632
6078
  */
5633
6079
  account: string;
5634
6080
  /**
@@ -6003,32 +6449,129 @@ export type CommodityControllerDeleteData = {
6003
6449
  /**
6004
6450
  * Commodity symbol
6005
6451
  */
6006
- symbol: string;
6452
+ symbol: string;
6453
+ };
6454
+
6455
+ export type CommodityControllerDeleteResponse = void;
6456
+
6457
+ export type CommodityControllerGetOrCreateData = {
6458
+ /**
6459
+ * Region code for tenant context
6460
+ */
6461
+ region: 'cn' | 'us' | 'de' | 'gb';
6462
+ /**
6463
+ * Commodity symbol
6464
+ */
6465
+ symbol: string;
6466
+ };
6467
+
6468
+ export type CommodityControllerGetOrCreateResponse = CommodityResponseDto;
6469
+
6470
+ export type CommodityControllerBulkCreateData = {
6471
+ /**
6472
+ * Region code for tenant context
6473
+ */
6474
+ region: 'cn' | 'us' | 'de' | 'gb';
6475
+ };
6476
+
6477
+ export type CommodityControllerBulkCreateResponse = Array<CommodityResponseDto>;
6478
+
6479
+ export type PriceControllerCreateData = {
6480
+ /**
6481
+ * Region code for tenant context
6482
+ */
6483
+ region: 'cn' | 'us' | 'de' | 'gb';
6484
+ requestBody: CreateBeanPriceDto;
6485
+ };
6486
+
6487
+ export type PriceControllerCreateResponse = PriceResponseDto;
6488
+
6489
+ export type PriceControllerFindAllData = {
6490
+ /**
6491
+ * Filter by currency (e.g., BTC, AAPL, USD)
6492
+ */
6493
+ currency?: string;
6494
+ /**
6495
+ * Filter prices from this date (ISO 8601 format)
6496
+ */
6497
+ dateFrom?: string;
6498
+ /**
6499
+ * Filter prices to this date (ISO 8601 format)
6500
+ */
6501
+ dateTo?: string;
6502
+ /**
6503
+ * Number of items per page (default: 20, max: 100)
6504
+ */
6505
+ limit?: number;
6506
+ /**
6507
+ * Page number for pagination (default: 1)
6508
+ */
6509
+ page?: number;
6510
+ /**
6511
+ * Filter by quote currency (pricing currency, e.g., USD, CNY)
6512
+ */
6513
+ quoteCurrency?: string;
6514
+ /**
6515
+ * Region code for tenant context
6516
+ */
6517
+ region: 'cn' | 'us' | 'de' | 'gb';
6518
+ /**
6519
+ * Search term for currency or quoteCurrency (case-insensitive partial match)
6520
+ */
6521
+ search?: string;
6522
+ };
6523
+
6524
+ export type PriceControllerFindAllResponse = PriceListResponseDto;
6525
+
6526
+ export type PriceControllerFindOneData = {
6527
+ /**
6528
+ * Price ID
6529
+ */
6530
+ id: string;
6531
+ /**
6532
+ * Region code for tenant context
6533
+ */
6534
+ region: 'cn' | 'us' | 'de' | 'gb';
6535
+ };
6536
+
6537
+ export type PriceControllerFindOneResponse = PriceResponseDto;
6538
+
6539
+ export type PriceControllerUpdateData = {
6540
+ /**
6541
+ * Price ID
6542
+ */
6543
+ id: string;
6544
+ /**
6545
+ * Region code for tenant context
6546
+ */
6547
+ region: 'cn' | 'us' | 'de' | 'gb';
6548
+ requestBody: UpdateBeanPriceDto;
6007
6549
  };
6008
6550
 
6009
- export type CommodityControllerDeleteResponse = void;
6551
+ export type PriceControllerUpdateResponse = PriceResponseDto;
6010
6552
 
6011
- export type CommodityControllerGetOrCreateData = {
6553
+ export type PriceControllerDeleteData = {
6012
6554
  /**
6013
- * Region code for tenant context
6555
+ * Price ID
6014
6556
  */
6015
- region: 'cn' | 'us' | 'de' | 'gb';
6557
+ id: string;
6016
6558
  /**
6017
- * Commodity symbol
6559
+ * Region code for tenant context
6018
6560
  */
6019
- symbol: string;
6561
+ region: 'cn' | 'us' | 'de' | 'gb';
6020
6562
  };
6021
6563
 
6022
- export type CommodityControllerGetOrCreateResponse = CommodityResponseDto;
6564
+ export type PriceControllerDeleteResponse = void;
6023
6565
 
6024
- export type CommodityControllerBulkCreateData = {
6566
+ export type PriceControllerBulkCreateData = {
6025
6567
  /**
6026
6568
  * Region code for tenant context
6027
6569
  */
6028
6570
  region: 'cn' | 'us' | 'de' | 'gb';
6571
+ requestBody: Array<string>;
6029
6572
  };
6030
6573
 
6031
- export type CommodityControllerBulkCreateResponse = Array<CommodityResponseDto>;
6574
+ export type PriceControllerBulkCreateResponse = Array<PriceResponseDto>;
6032
6575
 
6033
6576
  export type RecurringRuleControllerCreateData = {
6034
6577
  /**
@@ -6263,6 +6806,154 @@ export type ForecastControllerGetForecastData = {
6263
6806
 
6264
6807
  export type ForecastControllerGetForecastResponse = ForecastResponseDto;
6265
6808
 
6809
+ export type ReportingControllerGetPortfolioTrendsData = {
6810
+ /**
6811
+ * Data granularity
6812
+ */
6813
+ granularity?: 'day' | 'week' | 'month';
6814
+ /**
6815
+ * Time period
6816
+ */
6817
+ period?: '1m' | '3m' | '6m' | '1y';
6818
+ /**
6819
+ * Region code for tenant context
6820
+ */
6821
+ region: 'cn' | 'us' | 'de' | 'gb';
6822
+ };
6823
+
6824
+ export type ReportingControllerGetPortfolioTrendsResponse =
6825
+ PortfolioTrendsResponseDto;
6826
+
6827
+ export type ReportingControllerGetCashFlowTrendsData = {
6828
+ /**
6829
+ * Data granularity (accepted for API symmetry; v1 returns month buckets)
6830
+ */
6831
+ granularity?: 'day' | 'week' | 'month';
6832
+ /**
6833
+ * Time period
6834
+ */
6835
+ period?: '1m' | '3m' | '6m' | '1y';
6836
+ /**
6837
+ * Region code for tenant context
6838
+ */
6839
+ region: 'cn' | 'us' | 'de' | 'gb';
6840
+ };
6841
+
6842
+ export type ReportingControllerGetCashFlowTrendsResponse =
6843
+ CashFlowTrendsResponseDto;
6844
+
6845
+ export type ReportingControllerGenerateSnapshotData = {
6846
+ /**
6847
+ * Region code for tenant context
6848
+ */
6849
+ region: 'cn' | 'us' | 'de' | 'gb';
6850
+ /**
6851
+ * Optional date (defaults to today)
6852
+ */
6853
+ requestBody: GenerateSnapshotBody;
6854
+ };
6855
+
6856
+ export type ReportingControllerGenerateSnapshotResponse =
6857
+ GenerateSnapshotResponse;
6858
+
6859
+ export type ReportingControllerBackfillSnapshotsData = {
6860
+ /**
6861
+ * Region code for tenant context
6862
+ */
6863
+ region: 'cn' | 'us' | 'de' | 'gb';
6864
+ requestBody: BackfillSnapshotsBody;
6865
+ };
6866
+
6867
+ export type ReportingControllerBackfillSnapshotsResponse =
6868
+ BackfillSnapshotsResponse;
6869
+
6870
+ export type UserControllerDeleteOwnUserData = {
6871
+ requestBody: DeleteOwnUserDto;
6872
+ };
6873
+
6874
+ export type UserControllerDeleteOwnUserResponse = void;
6875
+
6876
+ export type UserControllerGetUserData = {
6877
+ acceptLanguage: string;
6878
+ };
6879
+
6880
+ export type UserControllerGetUserResponse = unknown;
6881
+
6882
+ export type UserControllerSignupUserData = {
6883
+ requestBody: SignupDto;
6884
+ };
6885
+
6886
+ export type UserControllerSignupUserResponse = SignupResponseDto;
6887
+
6888
+ export type UserControllerDeleteUserData = {
6889
+ /**
6890
+ * User ID to delete
6891
+ */
6892
+ id: string;
6893
+ };
6894
+
6895
+ export type UserControllerDeleteUserResponse = void;
6896
+
6897
+ export type UserControllerGetUserInfoData = {
6898
+ /**
6899
+ * User ID
6900
+ */
6901
+ id: string;
6902
+ };
6903
+
6904
+ export type UserControllerGetUserInfoResponse = unknown;
6905
+
6906
+ export type UserControllerUpdateUserSettingData = {
6907
+ requestBody: UpdateUserSettingDto;
6908
+ };
6909
+
6910
+ export type UserControllerUpdateUserSettingResponse = unknown;
6911
+
6912
+ export type UserControllerGetAllUserSettingsByPageData = {
6913
+ /**
6914
+ * Page number
6915
+ */
6916
+ pageNo: number;
6917
+ /**
6918
+ * Page size
6919
+ */
6920
+ pageSize: number;
6921
+ };
6922
+
6923
+ export type UserControllerGetAllUserSettingsByPageResponse = unknown;
6924
+
6925
+ export type UserControllerGetAssetLiabilitySummaryResponse = unknown;
6926
+
6927
+ export type PropertyControllerGetAllResponse = unknown;
6928
+
6929
+ export type PropertyControllerGetByKeyData = {
6930
+ /**
6931
+ * Property key
6932
+ */
6933
+ key: string;
6934
+ };
6935
+
6936
+ export type PropertyControllerGetByKeyResponse = unknown;
6937
+
6938
+ export type PropertyControllerUpdateData = {
6939
+ /**
6940
+ * Property key
6941
+ */
6942
+ key: string;
6943
+ requestBody: UpdatePropertyDto;
6944
+ };
6945
+
6946
+ export type PropertyControllerUpdateResponse = unknown;
6947
+
6948
+ export type PropertyControllerDeleteData = {
6949
+ /**
6950
+ * Property key
6951
+ */
6952
+ key: string;
6953
+ };
6954
+
6955
+ export type PropertyControllerDeleteResponse = void;
6956
+
6266
6957
  export type TransactionRuleControllerCreateData = {
6267
6958
  /**
6268
6959
  * Region code for tenant context
@@ -6406,94 +7097,7 @@ export type TransactionRuleControllerTestData = {
6406
7097
  ruleId: string;
6407
7098
  };
6408
7099
 
6409
- export type TransactionRuleControllerTestResponse = TestRuleResponseDto;
6410
-
6411
- export type UserControllerDeleteOwnUserData = {
6412
- requestBody: DeleteOwnUserDto;
6413
- };
6414
-
6415
- export type UserControllerDeleteOwnUserResponse = void;
6416
-
6417
- export type UserControllerGetUserData = {
6418
- acceptLanguage: string;
6419
- };
6420
-
6421
- export type UserControllerGetUserResponse = unknown;
6422
-
6423
- export type UserControllerSignupUserData = {
6424
- requestBody: SignupDto;
6425
- };
6426
-
6427
- export type UserControllerSignupUserResponse = unknown;
6428
-
6429
- export type UserControllerDeleteUserData = {
6430
- /**
6431
- * User ID to delete
6432
- */
6433
- id: string;
6434
- };
6435
-
6436
- export type UserControllerDeleteUserResponse = void;
6437
-
6438
- export type UserControllerGetUserInfoData = {
6439
- /**
6440
- * User ID
6441
- */
6442
- id: string;
6443
- };
6444
-
6445
- export type UserControllerGetUserInfoResponse = unknown;
6446
-
6447
- export type UserControllerUpdateUserSettingData = {
6448
- requestBody: UpdateUserSettingDto;
6449
- };
6450
-
6451
- export type UserControllerUpdateUserSettingResponse = unknown;
6452
-
6453
- export type UserControllerGetAllUserSettingsByPageData = {
6454
- /**
6455
- * Page number
6456
- */
6457
- pageNo: number;
6458
- /**
6459
- * Page size
6460
- */
6461
- pageSize: number;
6462
- };
6463
-
6464
- export type UserControllerGetAllUserSettingsByPageResponse = unknown;
6465
-
6466
- export type UserControllerGetAssetLiabilitySummaryResponse = unknown;
6467
-
6468
- export type PropertyControllerGetAllResponse = unknown;
6469
-
6470
- export type PropertyControllerGetByKeyData = {
6471
- /**
6472
- * Property key
6473
- */
6474
- key: string;
6475
- };
6476
-
6477
- export type PropertyControllerGetByKeyResponse = unknown;
6478
-
6479
- export type PropertyControllerUpdateData = {
6480
- /**
6481
- * Property key
6482
- */
6483
- key: string;
6484
- requestBody: UpdatePropertyDto;
6485
- };
6486
-
6487
- export type PropertyControllerUpdateResponse = unknown;
6488
-
6489
- export type PropertyControllerDeleteData = {
6490
- /**
6491
- * Property key
6492
- */
6493
- key: string;
6494
- };
6495
-
6496
- export type PropertyControllerDeleteResponse = void;
7100
+ export type TransactionRuleControllerTestResponse = TestRuleResponseDto;
6497
7101
 
6498
7102
  export type EventControllerCreateData = {
6499
7103
  /**
@@ -6593,6 +7197,16 @@ export type EventControllerGetSliceData = {
6593
7197
 
6594
7198
  export type EventControllerGetSliceResponse = unknown;
6595
7199
 
7200
+ export type OnboardingControllerBootstrapData = {
7201
+ /**
7202
+ * Region code for tenant context
7203
+ */
7204
+ region: 'cn' | 'us' | 'de' | 'gb';
7205
+ requestBody: OnboardingDto;
7206
+ };
7207
+
7208
+ export type OnboardingControllerBootstrapResponse = unknown;
7209
+
6596
7210
  export type ReconciliationControllerComputeData = {
6597
7211
  /**
6598
7212
  * Region code for tenant context (decorative for reconciliation)
@@ -6730,48 +7344,6 @@ export type ImporterConfigControllerResetConfigData = {
6730
7344
 
6731
7345
  export type ImporterConfigControllerResetConfigResponse = ImporterConfigDto;
6732
7346
 
6733
- export type PlatformControllerFindAllResponse = unknown;
6734
-
6735
- export type PlatformControllerCreateData = {
6736
- requestBody: CreatePlatformDto;
6737
- };
6738
-
6739
- export type PlatformControllerCreateResponse = unknown;
6740
-
6741
- export type PlatformControllerGetPlatformListResponse = unknown;
6742
-
6743
- export type PlatformControllerMatchPlatformsData = {
6744
- /**
6745
- * Search query — Chinese name, English name, or abbreviation
6746
- */
6747
- q: string;
6748
- /**
6749
- * Region code for category override lookup
6750
- */
6751
- region?: string;
6752
- };
6753
-
6754
- export type PlatformControllerMatchPlatformsResponse = unknown;
6755
-
6756
- export type PlatformControllerUpdateData = {
6757
- /**
6758
- * Platform ID
6759
- */
6760
- id: string;
6761
- requestBody: UpdatePlatformDto;
6762
- };
6763
-
6764
- export type PlatformControllerUpdateResponse = unknown;
6765
-
6766
- export type PlatformControllerDeleteData = {
6767
- /**
6768
- * Platform ID
6769
- */
6770
- id: string;
6771
- };
6772
-
6773
- export type PlatformControllerDeleteResponse = void;
6774
-
6775
7347
  export type ProviderSyncControllerSyncData = {
6776
7348
  /**
6777
7349
  * Provider name
@@ -6817,6 +7389,49 @@ export type ProviderSyncControllerIsProviderSupportedData = {
6817
7389
 
6818
7390
  export type ProviderSyncControllerIsProviderSupportedResponse = unknown;
6819
7391
 
7392
+ export type ExternalAccountLinkControllerCreateData = {
7393
+ /**
7394
+ * Region code for tenant context
7395
+ */
7396
+ region: 'cn' | 'us' | 'de' | 'gb';
7397
+ requestBody: CreateExternalAccountLinkDto;
7398
+ };
7399
+
7400
+ export type ExternalAccountLinkControllerCreateResponse =
7401
+ ExternalAccountLinkResponseDto;
7402
+
7403
+ export type ExternalAccountLinkControllerFindAllData = {
7404
+ provider: string;
7405
+ /**
7406
+ * Region code for tenant context
7407
+ */
7408
+ region: 'cn' | 'us' | 'de' | 'gb';
7409
+ };
7410
+
7411
+ export type ExternalAccountLinkControllerFindAllResponse =
7412
+ ExternalAccountLinkListResponseDto;
7413
+
7414
+ export type ExternalAccountLinkControllerFindOneData = {
7415
+ id: string;
7416
+ /**
7417
+ * Region code for tenant context
7418
+ */
7419
+ region: 'cn' | 'us' | 'de' | 'gb';
7420
+ };
7421
+
7422
+ export type ExternalAccountLinkControllerFindOneResponse =
7423
+ ExternalAccountLinkResponseDto;
7424
+
7425
+ export type ExternalAccountLinkControllerRemoveData = {
7426
+ id: string;
7427
+ /**
7428
+ * Region code for tenant context
7429
+ */
7430
+ region: 'cn' | 'us' | 'de' | 'gb';
7431
+ };
7432
+
7433
+ export type ExternalAccountLinkControllerRemoveResponse = void;
7434
+
6820
7435
  export type TelemetryControllerReportTelemetryData = {
6821
7436
  /**
6822
7437
  * Region code for tenant context
@@ -6889,225 +7504,114 @@ export type NlpControllerGetSessionData = {
6889
7504
 
6890
7505
  export type NlpControllerGetSessionResponse = unknown;
6891
7506
 
6892
- export type DashboardControllerGetNetWorthData = {
6893
- /**
6894
- * Date for balance calculation (ISO 8601 format)
6895
- */
6896
- date?: string;
6897
- /**
6898
- * Region code for tenant context
6899
- */
6900
- region: 'cn' | 'us' | 'de' | 'gb';
6901
- };
6902
-
6903
- export type DashboardControllerGetNetWorthResponse = NetWorthResponseDto;
6904
-
6905
- export type DashboardControllerGetAccountsData = {
6906
- /**
6907
- * Scope to a single account (only valid with groupBy=holdingAssetClass, ADR-0105 §6)
6908
- */
6909
- accountId?: string;
6910
- /**
6911
- * Date for balance calculation (ISO 8601 format)
6912
- */
6913
- date?: string;
6914
- /**
6915
- * Grouping strategy
6916
- */
6917
- groupBy?:
6918
- | 'platform'
6919
- | 'assetClass'
6920
- | 'holdingAssetClass'
6921
- | 'holdingAssetClassByAccount';
6922
- /**
6923
- * Region code for tenant context
6924
- */
6925
- region: 'cn' | 'us' | 'de' | 'gb';
6926
- };
6927
-
6928
- export type DashboardControllerGetAccountsResponse =
6929
- | AccountsResponseDto
6930
- | AssetClassAccountsResponseDto
6931
- | HoldingAssetClassCrossAccountResponseDto;
7507
+ export type PlatformControllerFindAllResponse = unknown;
6932
7508
 
6933
- export type DashboardControllerGetCashFlowData = {
6934
- /**
6935
- * Period in YYYY-MM format
6936
- */
6937
- period: string;
6938
- /**
6939
- * Region code for tenant context
6940
- */
6941
- region: 'cn' | 'us' | 'de' | 'gb';
7509
+ export type PlatformControllerCreateData = {
7510
+ requestBody: CreatePlatformDto;
6942
7511
  };
6943
7512
 
6944
- export type DashboardControllerGetCashFlowResponse = CashFlowResponseDto;
6945
-
6946
- export type DashboardControllerGetExpensesData = {
6947
- /**
6948
- * Account root to aggregate (expense → ^Expenses:, income → ^Income:)
6949
- */
6950
- flow?: 'expense' | 'income';
6951
- /**
6952
- * Grouping strategy
6953
- */
6954
- groupBy?: 'category';
6955
- /**
6956
- * Time window (1m = current calendar month)
6957
- */
6958
- period?: '1m' | '3m' | '6m' | '1y';
6959
- /**
6960
- * Region code for tenant context
6961
- */
6962
- region: 'cn' | 'us' | 'de' | 'gb';
6963
- };
7513
+ export type PlatformControllerCreateResponse = unknown;
6964
7514
 
6965
- export type DashboardControllerGetExpensesResponse =
6966
- ExpensesByCategoryResponseDto;
7515
+ export type PlatformControllerGetPlatformListResponse =
7516
+ Array<PlatformListItemDto>;
6967
7517
 
6968
- export type HoldingPnlControllerGetHoldingPnlData = {
6969
- /**
6970
- * Scope to a single account
6971
- */
6972
- accountId?: string;
6973
- /**
6974
- * As-of date (ISO 8601), defaults to today
6975
- */
6976
- asOf?: string;
7518
+ export type PlatformControllerMatchPlatformsData = {
6977
7519
  /**
6978
- * Realized-P&L lot-matching method (default average). Does not affect the average-cost unrealized basis.
7520
+ * Search query — Chinese name, English name, or abbreviation
6979
7521
  */
6980
- method?: 'FIFO' | 'average';
7522
+ q: string;
6981
7523
  /**
6982
- * Region code for tenant context
7524
+ * Region code for category override lookup
6983
7525
  */
6984
- region: 'cn' | 'us' | 'de' | 'gb';
7526
+ region?: string;
6985
7527
  };
6986
7528
 
6987
- export type HoldingPnlControllerGetHoldingPnlResponse = HoldingPnlResponseDto;
7529
+ export type PlatformControllerMatchPlatformsResponse = PlatformMatchResponseDto;
6988
7530
 
6989
- export type PriceControllerCreateData = {
7531
+ export type PlatformControllerUpdateData = {
6990
7532
  /**
6991
- * Region code for tenant context
7533
+ * Platform ID
6992
7534
  */
6993
- region: 'cn' | 'us' | 'de' | 'gb';
6994
- requestBody: CreateBeanPriceDto;
7535
+ id: string;
7536
+ requestBody: UpdatePlatformDto;
6995
7537
  };
6996
7538
 
6997
- export type PriceControllerCreateResponse = PriceResponseDto;
7539
+ export type PlatformControllerUpdateResponse = unknown;
6998
7540
 
6999
- export type PriceControllerFindAllData = {
7000
- /**
7001
- * Filter by currency (e.g., BTC, AAPL, USD)
7002
- */
7003
- currency?: string;
7004
- /**
7005
- * Filter prices from this date (ISO 8601 format)
7006
- */
7007
- dateFrom?: string;
7008
- /**
7009
- * Filter prices to this date (ISO 8601 format)
7010
- */
7011
- dateTo?: string;
7012
- /**
7013
- * Number of items per page (default: 20, max: 100)
7014
- */
7015
- limit?: number;
7016
- /**
7017
- * Page number for pagination (default: 1)
7018
- */
7019
- page?: number;
7020
- /**
7021
- * Filter by quote currency (pricing currency, e.g., USD, CNY)
7022
- */
7023
- quoteCurrency?: string;
7024
- /**
7025
- * Region code for tenant context
7026
- */
7027
- region: 'cn' | 'us' | 'de' | 'gb';
7541
+ export type PlatformControllerDeleteData = {
7028
7542
  /**
7029
- * Search term for currency or quoteCurrency (case-insensitive partial match)
7543
+ * Platform ID
7030
7544
  */
7031
- search?: string;
7545
+ id: string;
7032
7546
  };
7033
7547
 
7034
- export type PriceControllerFindAllResponse = PriceListResponseDto;
7548
+ export type PlatformControllerDeleteResponse = void;
7035
7549
 
7036
- export type PriceControllerFindOneData = {
7550
+ export type DashboardControllerGetNetWorthData = {
7037
7551
  /**
7038
- * Price ID
7552
+ * Date for balance calculation (ISO 8601 format)
7039
7553
  */
7040
- id: string;
7554
+ date?: string;
7041
7555
  /**
7042
7556
  * Region code for tenant context
7043
7557
  */
7044
7558
  region: 'cn' | 'us' | 'de' | 'gb';
7045
7559
  };
7046
7560
 
7047
- export type PriceControllerFindOneResponse = PriceResponseDto;
7561
+ export type DashboardControllerGetNetWorthResponse = NetWorthResponseDto;
7048
7562
 
7049
- export type PriceControllerUpdateData = {
7050
- /**
7051
- * Price ID
7052
- */
7053
- id: string;
7563
+ export type DashboardControllerGetAccountsData = {
7054
7564
  /**
7055
- * Region code for tenant context
7565
+ * Scope to a single account (only valid with groupBy=holdingAssetClass, ADR-0105 §6)
7056
7566
  */
7057
- region: 'cn' | 'us' | 'de' | 'gb';
7058
- requestBody: UpdateBeanPriceDto;
7059
- };
7060
-
7061
- export type PriceControllerUpdateResponse = PriceResponseDto;
7062
-
7063
- export type PriceControllerDeleteData = {
7567
+ accountId?: string;
7064
7568
  /**
7065
- * Price ID
7569
+ * Date for balance calculation (ISO 8601 format)
7066
7570
  */
7067
- id: string;
7571
+ date?: string;
7068
7572
  /**
7069
- * Region code for tenant context
7573
+ * Grouping strategy
7070
7574
  */
7071
- region: 'cn' | 'us' | 'de' | 'gb';
7072
- };
7073
-
7074
- export type PriceControllerDeleteResponse = void;
7075
-
7076
- export type PriceControllerBulkCreateData = {
7575
+ groupBy?:
7576
+ | 'platform'
7577
+ | 'assetClass'
7578
+ | 'holdingAssetClass'
7579
+ | 'holdingAssetClassByAccount';
7077
7580
  /**
7078
7581
  * Region code for tenant context
7079
7582
  */
7080
7583
  region: 'cn' | 'us' | 'de' | 'gb';
7081
- requestBody: Array<string>;
7082
7584
  };
7083
7585
 
7084
- export type PriceControllerBulkCreateResponse = Array<PriceResponseDto>;
7586
+ export type DashboardControllerGetAccountsResponse =
7587
+ | AccountsResponseDto
7588
+ | AssetClassAccountsResponseDto
7589
+ | HoldingAssetClassCrossAccountResponseDto;
7085
7590
 
7086
- export type ReportingControllerGetPortfolioTrendsData = {
7087
- /**
7088
- * Data granularity
7089
- */
7090
- granularity?: 'day' | 'week' | 'month';
7591
+ export type DashboardControllerGetCashFlowData = {
7091
7592
  /**
7092
- * Time period
7593
+ * Period in YYYY-MM format
7093
7594
  */
7094
- period?: '1m' | '3m' | '6m' | '1y';
7595
+ period: string;
7095
7596
  /**
7096
7597
  * Region code for tenant context
7097
7598
  */
7098
7599
  region: 'cn' | 'us' | 'de' | 'gb';
7099
7600
  };
7100
7601
 
7101
- export type ReportingControllerGetPortfolioTrendsResponse =
7102
- PortfolioTrendsResponseDto;
7602
+ export type DashboardControllerGetCashFlowResponse = CashFlowResponseDto;
7103
7603
 
7104
- export type ReportingControllerGetCashFlowTrendsData = {
7604
+ export type DashboardControllerGetExpensesData = {
7105
7605
  /**
7106
- * Data granularity (accepted for API symmetry; v1 returns month buckets)
7606
+ * Account root to aggregate (expense → ^Expenses:, income → ^Income:)
7107
7607
  */
7108
- granularity?: 'day' | 'week' | 'month';
7608
+ flow?: 'expense' | 'income';
7109
7609
  /**
7110
- * Time period
7610
+ * Grouping strategy
7611
+ */
7612
+ groupBy?: 'category';
7613
+ /**
7614
+ * Time window (1m = current calendar month)
7111
7615
  */
7112
7616
  period?: '1m' | '3m' | '6m' | '1y';
7113
7617
  /**
@@ -7116,33 +7620,29 @@ export type ReportingControllerGetCashFlowTrendsData = {
7116
7620
  region: 'cn' | 'us' | 'de' | 'gb';
7117
7621
  };
7118
7622
 
7119
- export type ReportingControllerGetCashFlowTrendsResponse =
7120
- CashFlowTrendsResponseDto;
7623
+ export type DashboardControllerGetExpensesResponse =
7624
+ ExpensesByCategoryResponseDto;
7121
7625
 
7122
- export type ReportingControllerGenerateSnapshotData = {
7626
+ export type HoldingPnlControllerGetHoldingPnlData = {
7123
7627
  /**
7124
- * Region code for tenant context
7628
+ * Scope to a single account
7125
7629
  */
7126
- region: 'cn' | 'us' | 'de' | 'gb';
7630
+ accountId?: string;
7127
7631
  /**
7128
- * Optional date (defaults to today)
7632
+ * As-of date (ISO 8601), defaults to today
7129
7633
  */
7130
- requestBody: GenerateSnapshotBody;
7131
- };
7132
-
7133
- export type ReportingControllerGenerateSnapshotResponse =
7134
- GenerateSnapshotResponse;
7135
-
7136
- export type ReportingControllerBackfillSnapshotsData = {
7634
+ asOf?: string;
7635
+ /**
7636
+ * Realized-P&L lot-matching method (default average). Does not affect the average-cost unrealized basis.
7637
+ */
7638
+ method?: 'FIFO' | 'average';
7137
7639
  /**
7138
7640
  * Region code for tenant context
7139
7641
  */
7140
7642
  region: 'cn' | 'us' | 'de' | 'gb';
7141
- requestBody: BackfillSnapshotsBody;
7142
7643
  };
7143
7644
 
7144
- export type ReportingControllerBackfillSnapshotsResponse =
7145
- BackfillSnapshotsResponse;
7645
+ export type HoldingPnlControllerGetHoldingPnlResponse = HoldingPnlResponseDto;
7146
7646
 
7147
7647
  export type ApiKeysControllerCreateApiKeyResponse = unknown;
7148
7648
 
@@ -7150,7 +7650,7 @@ export type AuthControllerAccessTokenLoginData = {
7150
7650
  requestBody: AnonymousLoginDto;
7151
7651
  };
7152
7652
 
7153
- export type AuthControllerAccessTokenLoginResponse = unknown;
7653
+ export type AuthControllerAccessTokenLoginResponse = AnonymousLoginResponseDto;
7154
7654
 
7155
7655
  export type CacheControllerFlushCacheResponse = unknown;
7156
7656
 
@@ -7190,6 +7690,33 @@ export type HealthControllerGetMetricsResponse = unknown;
7190
7690
 
7191
7691
  export type InfoControllerGetInfoResponse = unknown;
7192
7692
 
7693
+ export type SymbolControllerSearchData = {
7694
+ /**
7695
+ * Filter by OpenBB asset_type (e.g. stock, etf)
7696
+ */
7697
+ assetType?: string;
7698
+ /**
7699
+ * Filter by exchange code (e.g. US, HK, SS, SZ)
7700
+ */
7701
+ exchange?: string;
7702
+ /**
7703
+ * Maximum number of results (clamped 1..50)
7704
+ */
7705
+ limit?: number;
7706
+ /**
7707
+ * Search term — matched against symbol and instrument name. Empty string returns [].
7708
+ */
7709
+ q: string;
7710
+ };
7711
+
7712
+ export type SymbolControllerSearchResponse = Array<SymbolSearchResultDto>;
7713
+
7714
+ export type SymbolControllerGetQuoteData = {
7715
+ symbol: string;
7716
+ };
7717
+
7718
+ export type SymbolControllerGetQuoteResponse = SymbolQuoteDto;
7719
+
7193
7720
  export type $OpenApiTs = {
7194
7721
  '/api/v1/{region}/bean/accounts': {
7195
7722
  post: {
@@ -7298,6 +7825,25 @@ export type $OpenApiTs = {
7298
7825
  };
7299
7826
  };
7300
7827
  };
7828
+ '/api/v1/{region}/bean/accounts/{id}/opening-balance': {
7829
+ post: {
7830
+ req: AccountControllerAddOpeningBalanceData;
7831
+ res: {
7832
+ /**
7833
+ * Opening-balance transaction created
7834
+ */
7835
+ 201: OpeningBalanceResultDto;
7836
+ /**
7837
+ * Account not found
7838
+ */
7839
+ 404: unknown;
7840
+ /**
7841
+ * An opening balance already exists for this account
7842
+ */
7843
+ 409: unknown;
7844
+ };
7845
+ };
7846
+ };
7301
7847
  '/api/v1/{region}/bean/account-standards': {
7302
7848
  get: {
7303
7849
  req: AccountStandardsControllerGetTemplatesData;
@@ -7906,6 +8452,90 @@ export type $OpenApiTs = {
7906
8452
  };
7907
8453
  };
7908
8454
  };
8455
+ '/api/v1/{region}/bean/prices': {
8456
+ post: {
8457
+ req: PriceControllerCreateData;
8458
+ res: {
8459
+ /**
8460
+ * Price created successfully
8461
+ */
8462
+ 201: PriceResponseDto;
8463
+ /**
8464
+ * Currency or quoteCurrency commodity not found
8465
+ */
8466
+ 404: unknown;
8467
+ /**
8468
+ * Price already exists for this currency pair and date
8469
+ */
8470
+ 409: unknown;
8471
+ };
8472
+ };
8473
+ get: {
8474
+ req: PriceControllerFindAllData;
8475
+ res: {
8476
+ /**
8477
+ * Prices retrieved successfully
8478
+ */
8479
+ 200: PriceListResponseDto;
8480
+ };
8481
+ };
8482
+ };
8483
+ '/api/v1/{region}/bean/prices/{id}': {
8484
+ get: {
8485
+ req: PriceControllerFindOneData;
8486
+ res: {
8487
+ /**
8488
+ * Price retrieved successfully
8489
+ */
8490
+ 200: PriceResponseDto;
8491
+ /**
8492
+ * Price not found
8493
+ */
8494
+ 404: unknown;
8495
+ };
8496
+ };
8497
+ put: {
8498
+ req: PriceControllerUpdateData;
8499
+ res: {
8500
+ /**
8501
+ * Price updated successfully
8502
+ */
8503
+ 200: PriceResponseDto;
8504
+ /**
8505
+ * Price not found
8506
+ */
8507
+ 404: unknown;
8508
+ /**
8509
+ * Updated price conflicts with existing price
8510
+ */
8511
+ 409: unknown;
8512
+ };
8513
+ };
8514
+ delete: {
8515
+ req: PriceControllerDeleteData;
8516
+ res: {
8517
+ /**
8518
+ * Price deleted successfully
8519
+ */
8520
+ 204: void;
8521
+ /**
8522
+ * Price not found
8523
+ */
8524
+ 404: unknown;
8525
+ };
8526
+ };
8527
+ };
8528
+ '/api/v1/{region}/bean/prices/bulk': {
8529
+ post: {
8530
+ req: PriceControllerBulkCreateData;
8531
+ res: {
8532
+ /**
8533
+ * Prices created successfully
8534
+ */
8535
+ 201: Array<PriceResponseDto>;
8536
+ };
8537
+ };
8538
+ };
7909
8539
  '/api/v1/{region}/bean/recurring-rules': {
7910
8540
  post: {
7911
8541
  req: RecurringRuleControllerCreateData;
@@ -8114,439 +8744,511 @@ export type $OpenApiTs = {
8114
8744
  /**
8115
8745
  * Match removed successfully
8116
8746
  */
8117
- 200: unknown;
8747
+ 200: unknown;
8748
+ /**
8749
+ * Cannot unmatch - not in COMPLETED status
8750
+ */
8751
+ 400: unknown;
8752
+ /**
8753
+ * Expected transaction not found
8754
+ */
8755
+ 404: unknown;
8756
+ };
8757
+ };
8758
+ };
8759
+ '/api/v1/{region}/bean/expected-transactions/{id}/enter': {
8760
+ post: {
8761
+ req: ExpectedTransactionControllerEnterNowData;
8762
+ res: {
8763
+ /**
8764
+ * Transaction created successfully
8765
+ */
8766
+ 201: unknown;
8767
+ /**
8768
+ * Cannot enter - not in PENDING status or missing accounts
8769
+ */
8770
+ 400: unknown;
8771
+ /**
8772
+ * Expected transaction or accounts not found
8773
+ */
8774
+ 404: unknown;
8775
+ };
8776
+ };
8777
+ };
8778
+ '/api/v1/{region}/bean/recurring/forecast': {
8779
+ get: {
8780
+ req: ForecastControllerGetForecastData;
8781
+ res: {
8782
+ /**
8783
+ * Forecast retrieved successfully
8784
+ */
8785
+ 200: ForecastResponseDto;
8786
+ };
8787
+ };
8788
+ };
8789
+ '/api/v1/{region}/reporting/portfolio/trends': {
8790
+ get: {
8791
+ req: ReportingControllerGetPortfolioTrendsData;
8792
+ res: {
8793
+ /**
8794
+ * Trends retrieved successfully
8795
+ */
8796
+ 200: PortfolioTrendsResponseDto;
8797
+ /**
8798
+ * User not authenticated
8799
+ */
8800
+ 401: unknown;
8801
+ };
8802
+ };
8803
+ };
8804
+ '/api/v1/{region}/reporting/cash-flow/trends': {
8805
+ get: {
8806
+ req: ReportingControllerGetCashFlowTrendsData;
8807
+ res: {
8808
+ /**
8809
+ * Cash-flow trends retrieved successfully
8810
+ */
8811
+ 200: CashFlowTrendsResponseDto;
8812
+ /**
8813
+ * User not authenticated
8814
+ */
8815
+ 401: unknown;
8816
+ };
8817
+ };
8818
+ };
8819
+ '/api/v1/{region}/reporting/snapshots/generate': {
8820
+ post: {
8821
+ req: ReportingControllerGenerateSnapshotData;
8822
+ res: {
8823
+ /**
8824
+ * Snapshot generated successfully
8825
+ */
8826
+ 200: GenerateSnapshotResponse;
8118
8827
  /**
8119
- * Cannot unmatch - not in COMPLETED status
8828
+ * Invalid date format
8120
8829
  */
8121
8830
  400: unknown;
8122
8831
  /**
8123
- * Expected transaction not found
8832
+ * User not authenticated
8124
8833
  */
8125
- 404: unknown;
8834
+ 401: unknown;
8126
8835
  };
8127
8836
  };
8128
8837
  };
8129
- '/api/v1/{region}/bean/expected-transactions/{id}/enter': {
8838
+ '/api/v1/{region}/reporting/snapshots/backfill': {
8130
8839
  post: {
8131
- req: ExpectedTransactionControllerEnterNowData;
8840
+ req: ReportingControllerBackfillSnapshotsData;
8132
8841
  res: {
8133
8842
  /**
8134
- * Transaction created successfully
8843
+ * Backfill completed successfully
8135
8844
  */
8136
- 201: unknown;
8845
+ 200: BackfillSnapshotsResponse;
8137
8846
  /**
8138
- * Cannot enter - not in PENDING status or missing accounts
8847
+ * Invalid date format or range
8139
8848
  */
8140
8849
  400: unknown;
8141
8850
  /**
8142
- * Expected transaction or accounts not found
8851
+ * User not authenticated
8143
8852
  */
8144
- 404: unknown;
8145
- };
8146
- };
8147
- };
8148
- '/api/v1/{region}/bean/recurring/forecast': {
8149
- get: {
8150
- req: ForecastControllerGetForecastData;
8151
- res: {
8853
+ 401: unknown;
8152
8854
  /**
8153
- * Forecast retrieved successfully
8855
+ * Backfill already in progress for this user
8154
8856
  */
8155
- 200: ForecastResponseDto;
8857
+ 409: unknown;
8156
8858
  };
8157
8859
  };
8158
8860
  };
8159
- '/api/v1/{region}/bean/transaction-rules': {
8160
- post: {
8161
- req: TransactionRuleControllerCreateData;
8861
+ '/api/v1/users': {
8862
+ delete: {
8863
+ req: UserControllerDeleteOwnUserData;
8162
8864
  res: {
8163
8865
  /**
8164
- * Rule updated successfully (upsert mode)
8165
- */
8166
- 200: TransactionRuleResponseDto;
8167
- /**
8168
- * Validation failed
8169
- */
8170
- 400: ApiProblemResponseDto;
8171
- /**
8172
- * Unauthorized
8866
+ * User deleted successfully
8173
8867
  */
8174
- 401: ApiProblemResponseDto;
8868
+ 204: void;
8175
8869
  /**
8176
- * Resource conflict - another process is updating this rule
8870
+ * Invalid access token
8177
8871
  */
8178
- 409: ApiProblemResponseDto;
8872
+ 403: unknown;
8179
8873
  };
8180
8874
  };
8181
8875
  get: {
8182
- req: TransactionRuleControllerListData;
8876
+ req: UserControllerGetUserData;
8183
8877
  res: {
8184
8878
  /**
8185
- * List of rules
8186
- */
8187
- 200: TransactionRuleListResponseDto;
8188
- /**
8189
- * Unauthorized
8879
+ * User retrieved successfully
8190
8880
  */
8191
- 401: ApiProblemResponseDto;
8881
+ 200: unknown;
8192
8882
  };
8193
8883
  };
8194
- };
8195
- '/api/v1/{region}/bean/transaction-rules/validate': {
8196
8884
  post: {
8197
- req: TransactionRuleControllerValidateData;
8885
+ req: UserControllerSignupUserData;
8198
8886
  res: {
8199
8887
  /**
8200
- * Validation result
8888
+ * User created successfully
8201
8889
  */
8202
- 200: ValidateRuleResponseDto;
8890
+ 201: SignupResponseDto;
8203
8891
  /**
8204
- * Validation failed
8892
+ * Invalid Turnstile token (when Turnstile is enabled)
8205
8893
  */
8206
- 400: ApiProblemResponseDto;
8894
+ 400: unknown;
8207
8895
  /**
8208
- * Unauthorized
8896
+ * User signup is disabled
8209
8897
  */
8210
- 401: ApiProblemResponseDto;
8898
+ 403: unknown;
8211
8899
  };
8212
8900
  };
8213
8901
  };
8214
- '/api/v1/{region}/bean/transaction-rules/bulk': {
8215
- post: {
8216
- req: TransactionRuleControllerBulkCreateData;
8902
+ '/api/v1/users/{id}': {
8903
+ delete: {
8904
+ req: UserControllerDeleteUserData;
8217
8905
  res: {
8218
8906
  /**
8219
- * Bulk create completed
8220
- */
8221
- 201: BulkCreateRulesResponseDto;
8222
- /**
8223
- * Invalid bulk create data
8907
+ * User deleted successfully
8224
8908
  */
8225
- 400: ApiProblemResponseDto;
8909
+ 204: void;
8226
8910
  /**
8227
- * Unauthorized
8911
+ * Cannot delete own account or insufficient permissions
8228
8912
  */
8229
- 401: ApiProblemResponseDto;
8913
+ 403: unknown;
8230
8914
  };
8231
8915
  };
8232
8916
  };
8233
- '/api/v1/{region}/bean/transaction-rules/export/{format}': {
8917
+ '/api/v1/users/{id}/info': {
8234
8918
  get: {
8235
- req: TransactionRuleControllerExportData;
8919
+ req: UserControllerGetUserInfoData;
8236
8920
  res: {
8237
8921
  /**
8238
- * Exported rules
8239
- */
8240
- 200: ExportRulesResponseDto;
8241
- /**
8242
- * Unsupported format
8922
+ * User info retrieved successfully
8243
8923
  */
8244
- 400: ApiProblemResponseDto;
8924
+ 200: unknown;
8245
8925
  /**
8246
- * Unauthorized
8926
+ * Cannot access other user info without admin permission
8247
8927
  */
8248
- 401: ApiProblemResponseDto;
8928
+ 403: unknown;
8249
8929
  };
8250
8930
  };
8251
8931
  };
8252
- '/api/v1/{region}/bean/transaction-rules/statistics/{period}': {
8253
- get: {
8254
- req: TransactionRuleControllerGetStatisticsData;
8932
+ '/api/v1/users/setting': {
8933
+ put: {
8934
+ req: UserControllerUpdateUserSettingData;
8255
8935
  res: {
8256
8936
  /**
8257
- * Rule statistics
8937
+ * Settings updated successfully
8258
8938
  */
8259
- 200: RuleStatisticsResponseDto;
8939
+ 200: unknown;
8260
8940
  /**
8261
- * Unauthorized
8941
+ * Insufficient permissions
8262
8942
  */
8263
- 401: ApiProblemResponseDto;
8943
+ 403: unknown;
8264
8944
  };
8265
8945
  };
8266
8946
  };
8267
- '/api/v1/{region}/bean/transaction-rules/{ruleId}': {
8947
+ '/api/v1/users/settings-by-page': {
8268
8948
  get: {
8269
- req: TransactionRuleControllerGetDetailData;
8949
+ req: UserControllerGetAllUserSettingsByPageData;
8270
8950
  res: {
8271
8951
  /**
8272
- * Rule details
8273
- */
8274
- 200: TransactionRuleResponseDto;
8275
- /**
8276
- * Unauthorized
8277
- */
8278
- 401: ApiProblemResponseDto;
8279
- /**
8280
- * Forbidden - not owner of rule
8281
- */
8282
- 403: ApiProblemResponseDto;
8283
- /**
8284
- * Rule not found
8952
+ * Settings list retrieved successfully
8285
8953
  */
8286
- 404: ApiProblemResponseDto;
8954
+ 200: unknown;
8287
8955
  };
8288
8956
  };
8289
- put: {
8290
- req: TransactionRuleControllerUpdateData;
8957
+ };
8958
+ '/api/v1/users/asset-liability-summary': {
8959
+ get: {
8291
8960
  res: {
8292
8961
  /**
8293
- * Rule updated successfully
8962
+ * Summary retrieved successfully
8294
8963
  */
8295
- 200: TransactionRuleResponseDto;
8964
+ 200: unknown;
8965
+ };
8966
+ };
8967
+ };
8968
+ '/api/v1/admin/properties': {
8969
+ get: {
8970
+ res: {
8296
8971
  /**
8297
- * Validation failed
8972
+ * Properties retrieved successfully
8298
8973
  */
8299
- 400: ApiProblemResponseDto;
8974
+ 200: unknown;
8300
8975
  /**
8301
8976
  * Unauthorized
8302
8977
  */
8303
- 401: ApiProblemResponseDto;
8304
- /**
8305
- * Forbidden - not owner of rule
8306
- */
8307
- 403: ApiProblemResponseDto;
8308
- /**
8309
- * Rule not found
8310
- */
8311
- 404: ApiProblemResponseDto;
8978
+ 401: unknown;
8312
8979
  /**
8313
- * Resource conflict - rule is being modified by another process
8980
+ * Forbidden - insufficient permissions
8314
8981
  */
8315
- 409: ApiProblemResponseDto;
8982
+ 403: unknown;
8316
8983
  };
8317
8984
  };
8318
- delete: {
8319
- req: TransactionRuleControllerDeleteData;
8985
+ };
8986
+ '/api/v1/admin/properties/{key}': {
8987
+ get: {
8988
+ req: PropertyControllerGetByKeyData;
8320
8989
  res: {
8321
8990
  /**
8322
- * Rule deleted successfully
8991
+ * Property retrieved successfully
8323
8992
  */
8324
- 204: void;
8993
+ 200: unknown;
8325
8994
  /**
8326
8995
  * Unauthorized
8327
8996
  */
8328
- 401: ApiProblemResponseDto;
8329
- /**
8330
- * Forbidden - not owner of rule
8331
- */
8332
- 403: ApiProblemResponseDto;
8997
+ 401: unknown;
8333
8998
  /**
8334
- * Rule not found
8999
+ * Forbidden - insufficient permissions
8335
9000
  */
8336
- 404: ApiProblemResponseDto;
9001
+ 403: unknown;
8337
9002
  /**
8338
- * Resource conflict - rule is being modified by another process
9003
+ * Property not found
8339
9004
  */
8340
- 409: ApiProblemResponseDto;
9005
+ 404: unknown;
8341
9006
  };
8342
9007
  };
8343
- };
8344
- '/api/v1/{region}/bean/transaction-rules/{ruleId}/test': {
8345
- post: {
8346
- req: TransactionRuleControllerTestData;
9008
+ put: {
9009
+ req: PropertyControllerUpdateData;
8347
9010
  res: {
8348
9011
  /**
8349
- * Test result
9012
+ * Property updated successfully
8350
9013
  */
8351
- 200: TestRuleResponseDto;
9014
+ 200: unknown;
8352
9015
  /**
8353
9016
  * Unauthorized
8354
9017
  */
8355
- 401: ApiProblemResponseDto;
8356
- /**
8357
- * Forbidden - not owner of rule
8358
- */
8359
- 403: ApiProblemResponseDto;
9018
+ 401: unknown;
8360
9019
  /**
8361
- * Rule not found
9020
+ * Forbidden - insufficient permissions
8362
9021
  */
8363
- 404: ApiProblemResponseDto;
9022
+ 403: unknown;
8364
9023
  };
8365
9024
  };
8366
- };
8367
- '/api/v1/users': {
8368
9025
  delete: {
8369
- req: UserControllerDeleteOwnUserData;
9026
+ req: PropertyControllerDeleteData;
8370
9027
  res: {
8371
9028
  /**
8372
- * User deleted successfully
9029
+ * Property deleted successfully
8373
9030
  */
8374
9031
  204: void;
8375
9032
  /**
8376
- * Invalid access token
9033
+ * Unauthorized
9034
+ */
9035
+ 401: unknown;
9036
+ /**
9037
+ * Forbidden - insufficient permissions
8377
9038
  */
8378
9039
  403: unknown;
8379
- };
8380
- };
8381
- get: {
8382
- req: UserControllerGetUserData;
8383
- res: {
8384
9040
  /**
8385
- * User retrieved successfully
9041
+ * Property not found
8386
9042
  */
8387
- 200: unknown;
9043
+ 404: unknown;
8388
9044
  };
8389
9045
  };
9046
+ };
9047
+ '/api/v1/{region}/bean/transaction-rules': {
8390
9048
  post: {
8391
- req: UserControllerSignupUserData;
9049
+ req: TransactionRuleControllerCreateData;
8392
9050
  res: {
8393
9051
  /**
8394
- * User created successfully
9052
+ * Rule updated successfully (upsert mode)
9053
+ */
9054
+ 200: TransactionRuleResponseDto;
9055
+ /**
9056
+ * Validation failed
8395
9057
  */
8396
- 201: unknown;
9058
+ 400: ApiProblemResponseDto;
8397
9059
  /**
8398
- * Invalid Turnstile token (when Turnstile is enabled)
9060
+ * Unauthorized
8399
9061
  */
8400
- 400: unknown;
9062
+ 401: ApiProblemResponseDto;
8401
9063
  /**
8402
- * User signup is disabled
9064
+ * Resource conflict - another process is updating this rule
8403
9065
  */
8404
- 403: unknown;
9066
+ 409: ApiProblemResponseDto;
8405
9067
  };
8406
9068
  };
8407
- };
8408
- '/api/v1/users/{id}': {
8409
- delete: {
8410
- req: UserControllerDeleteUserData;
9069
+ get: {
9070
+ req: TransactionRuleControllerListData;
8411
9071
  res: {
8412
9072
  /**
8413
- * User deleted successfully
9073
+ * List of rules
8414
9074
  */
8415
- 204: void;
9075
+ 200: TransactionRuleListResponseDto;
8416
9076
  /**
8417
- * Cannot delete own account or insufficient permissions
9077
+ * Unauthorized
8418
9078
  */
8419
- 403: unknown;
9079
+ 401: ApiProblemResponseDto;
8420
9080
  };
8421
9081
  };
8422
9082
  };
8423
- '/api/v1/users/{id}/info': {
8424
- get: {
8425
- req: UserControllerGetUserInfoData;
9083
+ '/api/v1/{region}/bean/transaction-rules/validate': {
9084
+ post: {
9085
+ req: TransactionRuleControllerValidateData;
8426
9086
  res: {
8427
9087
  /**
8428
- * User info retrieved successfully
9088
+ * Validation result
8429
9089
  */
8430
- 200: unknown;
9090
+ 200: ValidateRuleResponseDto;
8431
9091
  /**
8432
- * Cannot access other user info without admin permission
9092
+ * Validation failed
8433
9093
  */
8434
- 403: unknown;
9094
+ 400: ApiProblemResponseDto;
9095
+ /**
9096
+ * Unauthorized
9097
+ */
9098
+ 401: ApiProblemResponseDto;
8435
9099
  };
8436
9100
  };
8437
9101
  };
8438
- '/api/v1/users/setting': {
8439
- put: {
8440
- req: UserControllerUpdateUserSettingData;
9102
+ '/api/v1/{region}/bean/transaction-rules/bulk': {
9103
+ post: {
9104
+ req: TransactionRuleControllerBulkCreateData;
8441
9105
  res: {
8442
9106
  /**
8443
- * Settings updated successfully
9107
+ * Bulk create completed
8444
9108
  */
8445
- 200: unknown;
9109
+ 201: BulkCreateRulesResponseDto;
8446
9110
  /**
8447
- * Insufficient permissions
9111
+ * Invalid bulk create data
8448
9112
  */
8449
- 403: unknown;
9113
+ 400: ApiProblemResponseDto;
9114
+ /**
9115
+ * Unauthorized
9116
+ */
9117
+ 401: ApiProblemResponseDto;
8450
9118
  };
8451
9119
  };
8452
9120
  };
8453
- '/api/v1/users/settings-by-page': {
9121
+ '/api/v1/{region}/bean/transaction-rules/export/{format}': {
8454
9122
  get: {
8455
- req: UserControllerGetAllUserSettingsByPageData;
9123
+ req: TransactionRuleControllerExportData;
8456
9124
  res: {
8457
9125
  /**
8458
- * Settings list retrieved successfully
9126
+ * Exported rules
8459
9127
  */
8460
- 200: unknown;
9128
+ 200: ExportRulesResponseDto;
9129
+ /**
9130
+ * Unsupported format
9131
+ */
9132
+ 400: ApiProblemResponseDto;
9133
+ /**
9134
+ * Unauthorized
9135
+ */
9136
+ 401: ApiProblemResponseDto;
8461
9137
  };
8462
9138
  };
8463
9139
  };
8464
- '/api/v1/users/asset-liability-summary': {
9140
+ '/api/v1/{region}/bean/transaction-rules/statistics/{period}': {
8465
9141
  get: {
9142
+ req: TransactionRuleControllerGetStatisticsData;
8466
9143
  res: {
8467
9144
  /**
8468
- * Summary retrieved successfully
9145
+ * Rule statistics
8469
9146
  */
8470
- 200: unknown;
9147
+ 200: RuleStatisticsResponseDto;
9148
+ /**
9149
+ * Unauthorized
9150
+ */
9151
+ 401: ApiProblemResponseDto;
8471
9152
  };
8472
9153
  };
8473
9154
  };
8474
- '/api/v1/admin/properties': {
9155
+ '/api/v1/{region}/bean/transaction-rules/{ruleId}': {
8475
9156
  get: {
9157
+ req: TransactionRuleControllerGetDetailData;
8476
9158
  res: {
8477
9159
  /**
8478
- * Properties retrieved successfully
9160
+ * Rule details
8479
9161
  */
8480
- 200: unknown;
9162
+ 200: TransactionRuleResponseDto;
8481
9163
  /**
8482
9164
  * Unauthorized
8483
9165
  */
8484
- 401: unknown;
9166
+ 401: ApiProblemResponseDto;
8485
9167
  /**
8486
- * Forbidden - insufficient permissions
9168
+ * Forbidden - not owner of rule
8487
9169
  */
8488
- 403: unknown;
9170
+ 403: ApiProblemResponseDto;
9171
+ /**
9172
+ * Rule not found
9173
+ */
9174
+ 404: ApiProblemResponseDto;
8489
9175
  };
8490
9176
  };
8491
- };
8492
- '/api/v1/admin/properties/{key}': {
8493
- get: {
8494
- req: PropertyControllerGetByKeyData;
9177
+ put: {
9178
+ req: TransactionRuleControllerUpdateData;
8495
9179
  res: {
8496
9180
  /**
8497
- * Property retrieved successfully
9181
+ * Rule updated successfully
8498
9182
  */
8499
- 200: unknown;
9183
+ 200: TransactionRuleResponseDto;
9184
+ /**
9185
+ * Validation failed
9186
+ */
9187
+ 400: ApiProblemResponseDto;
8500
9188
  /**
8501
9189
  * Unauthorized
8502
9190
  */
8503
- 401: unknown;
9191
+ 401: ApiProblemResponseDto;
8504
9192
  /**
8505
- * Forbidden - insufficient permissions
9193
+ * Forbidden - not owner of rule
8506
9194
  */
8507
- 403: unknown;
9195
+ 403: ApiProblemResponseDto;
8508
9196
  /**
8509
- * Property not found
9197
+ * Rule not found
8510
9198
  */
8511
- 404: unknown;
9199
+ 404: ApiProblemResponseDto;
9200
+ /**
9201
+ * Resource conflict - rule is being modified by another process
9202
+ */
9203
+ 409: ApiProblemResponseDto;
8512
9204
  };
8513
9205
  };
8514
- put: {
8515
- req: PropertyControllerUpdateData;
9206
+ delete: {
9207
+ req: TransactionRuleControllerDeleteData;
8516
9208
  res: {
8517
9209
  /**
8518
- * Property updated successfully
9210
+ * Rule deleted successfully
8519
9211
  */
8520
- 200: unknown;
9212
+ 204: void;
8521
9213
  /**
8522
9214
  * Unauthorized
8523
9215
  */
8524
- 401: unknown;
9216
+ 401: ApiProblemResponseDto;
8525
9217
  /**
8526
- * Forbidden - insufficient permissions
9218
+ * Forbidden - not owner of rule
8527
9219
  */
8528
- 403: unknown;
9220
+ 403: ApiProblemResponseDto;
9221
+ /**
9222
+ * Rule not found
9223
+ */
9224
+ 404: ApiProblemResponseDto;
9225
+ /**
9226
+ * Resource conflict - rule is being modified by another process
9227
+ */
9228
+ 409: ApiProblemResponseDto;
8529
9229
  };
8530
9230
  };
8531
- delete: {
8532
- req: PropertyControllerDeleteData;
9231
+ };
9232
+ '/api/v1/{region}/bean/transaction-rules/{ruleId}/test': {
9233
+ post: {
9234
+ req: TransactionRuleControllerTestData;
8533
9235
  res: {
8534
9236
  /**
8535
- * Property deleted successfully
9237
+ * Test result
8536
9238
  */
8537
- 204: void;
9239
+ 200: TestRuleResponseDto;
8538
9240
  /**
8539
9241
  * Unauthorized
8540
9242
  */
8541
- 401: unknown;
9243
+ 401: ApiProblemResponseDto;
8542
9244
  /**
8543
- * Forbidden - insufficient permissions
9245
+ * Forbidden - not owner of rule
8544
9246
  */
8545
- 403: unknown;
9247
+ 403: ApiProblemResponseDto;
8546
9248
  /**
8547
- * Property not found
9249
+ * Rule not found
8548
9250
  */
8549
- 404: unknown;
9251
+ 404: ApiProblemResponseDto;
8550
9252
  };
8551
9253
  };
8552
9254
  };
@@ -8646,6 +9348,21 @@ export type $OpenApiTs = {
8646
9348
  };
8647
9349
  };
8648
9350
  };
9351
+ '/api/v1/{region}/bean/onboarding': {
9352
+ post: {
9353
+ req: OnboardingControllerBootstrapData;
9354
+ res: {
9355
+ /**
9356
+ * Onboarding bootstrap result.
9357
+ */
9358
+ 201: unknown;
9359
+ /**
9360
+ * Invalid region/account path/duplicate paths.
9361
+ */
9362
+ 422: unknown;
9363
+ };
9364
+ };
9365
+ };
8649
9366
  '/api/v1/{region}/bean/reconciliations': {
8650
9367
  post: {
8651
9368
  req: ReconciliationControllerComputeData;
@@ -8852,83 +9569,11 @@ export type $OpenApiTs = {
8852
9569
  /**
8853
9570
  * Configuration reset successfully
8854
9571
  */
8855
- 200: ImporterConfigDto;
8856
- /**
8857
- * Invalid input - Unsupported importer
8858
- */
8859
- 400: ApiProblemResponseDto;
8860
- };
8861
- };
8862
- };
8863
- '/api/v1/bean/platforms': {
8864
- get: {
8865
- res: {
8866
- /**
8867
- * List of platforms with binding and account counts
8868
- */
8869
- 200: unknown;
8870
- };
8871
- };
8872
- post: {
8873
- req: PlatformControllerCreateData;
8874
- res: {
8875
- /**
8876
- * Platform created successfully
8877
- */
8878
- 201: unknown;
8879
- /**
8880
- * Platform already exists
8881
- */
8882
- 409: unknown;
8883
- };
8884
- };
8885
- };
8886
- '/api/v1/bean/platforms/list': {
8887
- get: {
8888
- res: {
8889
- /**
8890
- * List of platforms with user binding status
8891
- */
8892
- 200: unknown;
8893
- };
8894
- };
8895
- };
8896
- '/api/v1/bean/platforms/match': {
8897
- get: {
8898
- req: PlatformControllerMatchPlatformsData;
8899
- res: {
8900
- /**
8901
- * List of matching platforms with suggested segment names
8902
- */
8903
- 200: unknown;
8904
- };
8905
- };
8906
- };
8907
- '/api/v1/bean/platforms/{id}': {
8908
- put: {
8909
- req: PlatformControllerUpdateData;
8910
- res: {
8911
- /**
8912
- * Platform updated successfully
8913
- */
8914
- 200: unknown;
8915
- /**
8916
- * Platform not found
8917
- */
8918
- 404: unknown;
8919
- };
8920
- };
8921
- delete: {
8922
- req: PlatformControllerDeleteData;
8923
- res: {
8924
- /**
8925
- * Platform deleted successfully
8926
- */
8927
- 204: void;
9572
+ 200: ImporterConfigDto;
8928
9573
  /**
8929
- * Platform not found
9574
+ * Invalid input - Unsupported importer
8930
9575
  */
8931
- 404: unknown;
9576
+ 400: ApiProblemResponseDto;
8932
9577
  };
8933
9578
  };
8934
9579
  };
@@ -8985,6 +9630,54 @@ export type $OpenApiTs = {
8985
9630
  };
8986
9631
  };
8987
9632
  };
9633
+ '/api/v1/{region}/bean/external-account-links': {
9634
+ post: {
9635
+ req: ExternalAccountLinkControllerCreateData;
9636
+ res: {
9637
+ /**
9638
+ * Link created.
9639
+ */
9640
+ 201: ExternalAccountLinkResponseDto;
9641
+ /**
9642
+ * beanAccountId not owned, or an active link already exists.
9643
+ */
9644
+ 422: unknown;
9645
+ };
9646
+ };
9647
+ get: {
9648
+ req: ExternalAccountLinkControllerFindAllData;
9649
+ res: {
9650
+ /**
9651
+ * Links retrieved.
9652
+ */
9653
+ 200: ExternalAccountLinkListResponseDto;
9654
+ };
9655
+ };
9656
+ };
9657
+ '/api/v1/{region}/bean/external-account-links/{id}': {
9658
+ get: {
9659
+ req: ExternalAccountLinkControllerFindOneData;
9660
+ res: {
9661
+ /**
9662
+ * Link retrieved.
9663
+ */
9664
+ 200: ExternalAccountLinkResponseDto;
9665
+ /**
9666
+ * Link not found or not owned by the user.
9667
+ */
9668
+ 422: unknown;
9669
+ };
9670
+ };
9671
+ delete: {
9672
+ req: ExternalAccountLinkControllerRemoveData;
9673
+ res: {
9674
+ /**
9675
+ * Link soft-deleted; historical transactions are unaffected.
9676
+ */
9677
+ 204: void;
9678
+ };
9679
+ };
9680
+ };
8988
9681
  '/api/v1/{region}/bean/import/parser-telemetry': {
8989
9682
  post: {
8990
9683
  req: TelemetryControllerReportTelemetryData;
@@ -9073,188 +9766,104 @@ export type $OpenApiTs = {
9073
9766
  };
9074
9767
  };
9075
9768
  };
9076
- '/api/v1/{region}/dashboard/net-worth': {
9077
- get: {
9078
- req: DashboardControllerGetNetWorthData;
9079
- res: {
9080
- /**
9081
- * Net worth retrieved successfully
9082
- */
9083
- 200: NetWorthResponseDto;
9084
- /**
9085
- * User not authenticated
9086
- */
9087
- 401: unknown;
9088
- };
9089
- };
9090
- };
9091
- '/api/v1/{region}/dashboard/accounts': {
9092
- get: {
9093
- req: DashboardControllerGetAccountsData;
9094
- res: {
9095
- /**
9096
- * Accounts retrieved successfully. Response type depends on groupBy parameter.
9097
- */
9098
- 200:
9099
- | AccountsResponseDto
9100
- | AssetClassAccountsResponseDto
9101
- | HoldingAssetClassCrossAccountResponseDto;
9102
- /**
9103
- * User not authenticated
9104
- */
9105
- 401: unknown;
9106
- };
9107
- };
9108
- };
9109
- '/api/v1/{region}/dashboard/cash-flow': {
9110
- get: {
9111
- req: DashboardControllerGetCashFlowData;
9112
- res: {
9113
- /**
9114
- * Cash flow retrieved successfully
9115
- */
9116
- 200: CashFlowResponseDto;
9117
- /**
9118
- * Invalid period format
9119
- */
9120
- 400: unknown;
9121
- /**
9122
- * User not authenticated
9123
- */
9124
- 401: unknown;
9125
- };
9126
- };
9127
- };
9128
- '/api/v1/{region}/dashboard/expenses': {
9129
- get: {
9130
- req: DashboardControllerGetExpensesData;
9131
- res: {
9132
- /**
9133
- * Expenses retrieved successfully
9134
- */
9135
- 200: ExpensesByCategoryResponseDto;
9136
- /**
9137
- * Invalid groupBy or period
9138
- */
9139
- 400: unknown;
9140
- /**
9141
- * User not authenticated
9142
- */
9143
- 401: unknown;
9144
- };
9145
- };
9146
- };
9147
- '/api/v1/{region}/investment/holdings/pnl': {
9769
+ '/api/v1/bean/platforms': {
9148
9770
  get: {
9149
- req: HoldingPnlControllerGetHoldingPnlData;
9150
9771
  res: {
9151
9772
  /**
9152
- * Holding P&L retrieved successfully
9153
- */
9154
- 200: HoldingPnlResponseDto;
9155
- /**
9156
- * Invalid asOf format/value/future date, invalid accountId format, or unsupported method
9157
- */
9158
- 400: unknown;
9159
- /**
9160
- * User not authenticated
9773
+ * List of platforms with binding and account counts
9161
9774
  */
9162
- 401: unknown;
9775
+ 200: unknown;
9163
9776
  };
9164
9777
  };
9165
- };
9166
- '/api/v1/{region}/bean/prices': {
9167
9778
  post: {
9168
- req: PriceControllerCreateData;
9779
+ req: PlatformControllerCreateData;
9169
9780
  res: {
9170
9781
  /**
9171
- * Price created successfully
9172
- */
9173
- 201: PriceResponseDto;
9174
- /**
9175
- * Currency or quoteCurrency commodity not found
9782
+ * Platform created successfully
9176
9783
  */
9177
- 404: unknown;
9784
+ 201: unknown;
9178
9785
  /**
9179
- * Price already exists for this currency pair and date
9786
+ * Platform already exists
9180
9787
  */
9181
9788
  409: unknown;
9182
9789
  };
9183
9790
  };
9791
+ };
9792
+ '/api/v1/bean/platforms/list': {
9184
9793
  get: {
9185
- req: PriceControllerFindAllData;
9186
9794
  res: {
9187
9795
  /**
9188
- * Prices retrieved successfully
9796
+ * List of platforms with user binding status
9189
9797
  */
9190
- 200: PriceListResponseDto;
9798
+ 200: Array<PlatformListItemDto>;
9191
9799
  };
9192
9800
  };
9193
9801
  };
9194
- '/api/v1/{region}/bean/prices/{id}': {
9802
+ '/api/v1/bean/platforms/match': {
9195
9803
  get: {
9196
- req: PriceControllerFindOneData;
9804
+ req: PlatformControllerMatchPlatformsData;
9197
9805
  res: {
9198
9806
  /**
9199
- * Price retrieved successfully
9200
- */
9201
- 200: PriceResponseDto;
9202
- /**
9203
- * Price not found
9807
+ * Matching platforms with overall match type and truncation flag
9204
9808
  */
9205
- 404: unknown;
9809
+ 200: PlatformMatchResponseDto;
9206
9810
  };
9207
9811
  };
9812
+ };
9813
+ '/api/v1/bean/platforms/{id}': {
9208
9814
  put: {
9209
- req: PriceControllerUpdateData;
9815
+ req: PlatformControllerUpdateData;
9210
9816
  res: {
9211
9817
  /**
9212
- * Price updated successfully
9818
+ * Platform updated successfully
9213
9819
  */
9214
- 200: PriceResponseDto;
9820
+ 200: unknown;
9215
9821
  /**
9216
- * Price not found
9822
+ * Platform not found
9217
9823
  */
9218
9824
  404: unknown;
9219
- /**
9220
- * Updated price conflicts with existing price
9221
- */
9222
- 409: unknown;
9223
9825
  };
9224
9826
  };
9225
9827
  delete: {
9226
- req: PriceControllerDeleteData;
9828
+ req: PlatformControllerDeleteData;
9227
9829
  res: {
9228
9830
  /**
9229
- * Price deleted successfully
9831
+ * Platform deleted successfully
9230
9832
  */
9231
9833
  204: void;
9232
9834
  /**
9233
- * Price not found
9835
+ * Platform not found
9234
9836
  */
9235
9837
  404: unknown;
9236
9838
  };
9237
9839
  };
9238
9840
  };
9239
- '/api/v1/{region}/bean/prices/bulk': {
9240
- post: {
9241
- req: PriceControllerBulkCreateData;
9841
+ '/api/v1/{region}/dashboard/net-worth': {
9842
+ get: {
9843
+ req: DashboardControllerGetNetWorthData;
9242
9844
  res: {
9243
9845
  /**
9244
- * Prices created successfully
9846
+ * Net worth retrieved successfully
9245
9847
  */
9246
- 201: Array<PriceResponseDto>;
9848
+ 200: NetWorthResponseDto;
9849
+ /**
9850
+ * User not authenticated
9851
+ */
9852
+ 401: unknown;
9247
9853
  };
9248
9854
  };
9249
9855
  };
9250
- '/api/v1/{region}/reporting/portfolio/trends': {
9856
+ '/api/v1/{region}/dashboard/accounts': {
9251
9857
  get: {
9252
- req: ReportingControllerGetPortfolioTrendsData;
9858
+ req: DashboardControllerGetAccountsData;
9253
9859
  res: {
9254
9860
  /**
9255
- * Trends retrieved successfully
9861
+ * Accounts retrieved successfully. Response type depends on groupBy parameter.
9256
9862
  */
9257
- 200: PortfolioTrendsResponseDto;
9863
+ 200:
9864
+ | AccountsResponseDto
9865
+ | AssetClassAccountsResponseDto
9866
+ | HoldingAssetClassCrossAccountResponseDto;
9258
9867
  /**
9259
9868
  * User not authenticated
9260
9869
  */
@@ -9262,14 +9871,18 @@ export type $OpenApiTs = {
9262
9871
  };
9263
9872
  };
9264
9873
  };
9265
- '/api/v1/{region}/reporting/cash-flow/trends': {
9874
+ '/api/v1/{region}/dashboard/cash-flow': {
9266
9875
  get: {
9267
- req: ReportingControllerGetCashFlowTrendsData;
9876
+ req: DashboardControllerGetCashFlowData;
9268
9877
  res: {
9269
9878
  /**
9270
- * Cash-flow trends retrieved successfully
9879
+ * Cash flow retrieved successfully
9271
9880
  */
9272
- 200: CashFlowTrendsResponseDto;
9881
+ 200: CashFlowResponseDto;
9882
+ /**
9883
+ * Invalid period format
9884
+ */
9885
+ 400: unknown;
9273
9886
  /**
9274
9887
  * User not authenticated
9275
9888
  */
@@ -9277,16 +9890,16 @@ export type $OpenApiTs = {
9277
9890
  };
9278
9891
  };
9279
9892
  };
9280
- '/api/v1/{region}/reporting/snapshots/generate': {
9281
- post: {
9282
- req: ReportingControllerGenerateSnapshotData;
9893
+ '/api/v1/{region}/dashboard/expenses': {
9894
+ get: {
9895
+ req: DashboardControllerGetExpensesData;
9283
9896
  res: {
9284
9897
  /**
9285
- * Snapshot generated successfully
9898
+ * Expenses retrieved successfully
9286
9899
  */
9287
- 200: GenerateSnapshotResponse;
9900
+ 200: ExpensesByCategoryResponseDto;
9288
9901
  /**
9289
- * Invalid date format
9902
+ * Invalid groupBy or period
9290
9903
  */
9291
9904
  400: unknown;
9292
9905
  /**
@@ -9296,26 +9909,22 @@ export type $OpenApiTs = {
9296
9909
  };
9297
9910
  };
9298
9911
  };
9299
- '/api/v1/{region}/reporting/snapshots/backfill': {
9300
- post: {
9301
- req: ReportingControllerBackfillSnapshotsData;
9912
+ '/api/v1/{region}/investment/holdings/pnl': {
9913
+ get: {
9914
+ req: HoldingPnlControllerGetHoldingPnlData;
9302
9915
  res: {
9303
9916
  /**
9304
- * Backfill completed successfully
9917
+ * Holding P&L retrieved successfully
9305
9918
  */
9306
- 200: BackfillSnapshotsResponse;
9919
+ 200: HoldingPnlResponseDto;
9307
9920
  /**
9308
- * Invalid date format or range
9921
+ * Invalid asOf format/value/future date, invalid accountId format, or unsupported method
9309
9922
  */
9310
9923
  400: unknown;
9311
9924
  /**
9312
9925
  * User not authenticated
9313
9926
  */
9314
9927
  401: unknown;
9315
- /**
9316
- * Backfill already in progress for this user
9317
- */
9318
- 409: unknown;
9319
9928
  };
9320
9929
  };
9321
9930
  };
@@ -9340,7 +9949,7 @@ export type $OpenApiTs = {
9340
9949
  /**
9341
9950
  * Login successful
9342
9951
  */
9343
- 200: unknown;
9952
+ 200: AnonymousLoginResponseDto;
9344
9953
  /**
9345
9954
  * Invalid access token
9346
9955
  */
@@ -9487,4 +10096,30 @@ export type $OpenApiTs = {
9487
10096
  };
9488
10097
  };
9489
10098
  };
10099
+ '/api/v1/market/symbols/search': {
10100
+ get: {
10101
+ req: SymbolControllerSearchData;
10102
+ res: {
10103
+ /**
10104
+ * Ranked search results
10105
+ */
10106
+ 200: Array<SymbolSearchResultDto>;
10107
+ };
10108
+ };
10109
+ };
10110
+ '/api/v1/market/symbols/{symbol}/quote': {
10111
+ get: {
10112
+ req: SymbolControllerGetQuoteData;
10113
+ res: {
10114
+ /**
10115
+ * Symbol quote
10116
+ */
10117
+ 200: SymbolQuoteDto;
10118
+ /**
10119
+ * Symbol not found in the openbb catalog
10120
+ */
10121
+ 404: unknown;
10122
+ };
10123
+ };
10124
+ };
9490
10125
  };