@firela/api-types 0.0.0-canary.7b647d33 → 0.0.0-canary.7f2ecc16

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,49 @@ 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
+ | 'ACCOUNTS_PAYABLE'
112
+ | 'TAX_PAYABLE'
113
+ | 'OTHER'
114
+ | null;
88
115
  /**
89
116
  * Account status
90
117
  */
@@ -121,17 +148,17 @@ export type AccountResponseDto = {
121
148
  */
122
149
  isCustom: boolean;
123
150
  /**
124
- * i18n key for display name
151
+ * Localized display name (ADR-0114, read-time projection)
125
152
  */
126
- i18nKey?: string;
153
+ displayName?: string;
127
154
  /**
128
155
  * Icon identifier
129
156
  */
130
157
  icon?: string;
131
158
  /**
132
- * Account metadata
159
+ * Open directive metadata (ADR-0115 Decision 9)
133
160
  */
134
- openMeta?: {
161
+ openDirectiveMeta?: {
135
162
  [key: string]: unknown;
136
163
  };
137
164
  /**
@@ -161,6 +188,45 @@ export type AccountResponseDto = {
161
188
  */
162
189
  export type type = 'Assets' | 'Liabilities' | 'Income' | 'Expenses' | 'Equity';
163
190
 
191
+ /**
192
+ * 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.
193
+ */
194
+ export type assetSubClass =
195
+ | 'DEPOSIT'
196
+ | 'CASH'
197
+ | 'MONEY_MARKET_FUND'
198
+ | 'STOCK'
199
+ | 'ETF'
200
+ | 'MUTUAL_FUND'
201
+ | 'EQUITY_COMPENSATION'
202
+ | 'GOVERNMENT_BOND'
203
+ | 'CORPORATE_BOND'
204
+ | 'BOND_FUND'
205
+ | 'PRIMARY_RESIDENCE'
206
+ | 'INVESTMENT_PROPERTY'
207
+ | 'REIT'
208
+ | 'GOLD'
209
+ | 'SILVER'
210
+ | 'PRECIOUS_METAL'
211
+ | 'PRECIOUS_METAL_FUND'
212
+ | 'COMMODITY'
213
+ | 'COMMODITY_FUND'
214
+ | 'CRYPTOCURRENCY'
215
+ | 'RETIREMENT_ACCOUNT'
216
+ | 'HEALTH_ACCOUNT'
217
+ | 'EDUCATION_ACCOUNT'
218
+ | 'INSURANCE'
219
+ | 'PRIVATE_EQUITY'
220
+ | 'HEDGE_FUND'
221
+ | 'COLLECTIBLES'
222
+ | 'MORTGAGE'
223
+ | 'STUDENT_LOAN'
224
+ | 'CREDIT_CARD'
225
+ | 'PERSONAL_LOAN'
226
+ | 'ACCOUNTS_PAYABLE'
227
+ | 'TAX_PAYABLE'
228
+ | 'OTHER';
229
+
164
230
  /**
165
231
  * Account status
166
232
  */
@@ -178,10 +244,6 @@ export type AccountListResponseDto = {
178
244
  };
179
245
 
180
246
  export type UpdateAccountDto = {
181
- /**
182
- * Display name to distinguish accounts at the same path
183
- */
184
- displayName?: string;
185
247
  /**
186
248
  * Allowed currencies (null = no restriction)
187
249
  */
@@ -197,18 +259,14 @@ export type UpdateAccountDto = {
197
259
  | 'STRICT'
198
260
  | 'STRICT_WITH_SIZE'
199
261
  | 'NONE';
200
- /**
201
- * i18n key for display name
202
- */
203
- i18nKey?: string;
204
262
  /**
205
263
  * Icon identifier
206
264
  */
207
265
  icon?: string;
208
266
  /**
209
- * Additional metadata (merged with existing)
267
+ * Open directive metadata (merged with existing; NOT an opening-balance amount)
210
268
  */
211
- openMeta?: {
269
+ openDirectiveMeta?: {
212
270
  [key: string]: unknown;
213
271
  };
214
272
  /**
@@ -237,6 +295,28 @@ export type ReopenAccountDto = {
237
295
  reopenDate?: string;
238
296
  };
239
297
 
298
+ export type CreateOpeningBalanceDto = {
299
+ /**
300
+ * Opening balance amount (non-negative)
301
+ */
302
+ amount: number;
303
+ /**
304
+ * Currency code
305
+ */
306
+ currency: string;
307
+ /**
308
+ * Opening-balance date (defaults to now)
309
+ */
310
+ date?: string;
311
+ };
312
+
313
+ export type OpeningBalanceResultDto = {
314
+ /**
315
+ * Created opening-balance transaction id.
316
+ */
317
+ transactionId: string;
318
+ };
319
+
240
320
  export type AccountStandardResponseDto = {
241
321
  /**
242
322
  * Account path (hierarchical, colon-separated)
@@ -246,10 +326,6 @@ export type AccountStandardResponseDto = {
246
326
  * Account type in Beancount hierarchy
247
327
  */
248
328
  type: 'Assets' | 'Liabilities' | 'Income' | 'Expenses' | 'Equity';
249
- /**
250
- * i18n key for localized display name
251
- */
252
- i18nKey: string;
253
329
  /**
254
330
  * Short localized display name
255
331
  */
@@ -266,8 +342,64 @@ export type AccountStandardResponseDto = {
266
342
  * Icon identifier for UI display
267
343
  */
268
344
  icon: string;
345
+ /**
346
+ * Onboarding product category (coarse grouping derived from assetSubClass)
347
+ */
348
+ productCategory:
349
+ | 'cash'
350
+ | 'investment'
351
+ | 'credit_card'
352
+ | 'loan'
353
+ | 'payable_tax'
354
+ | 'other';
355
+ /**
356
+ * Asset class (LIQUIDITY/EQUITY/.../LIABILITY), derived at read time from classification rules
357
+ */
358
+ assetClass?:
359
+ | 'LIQUIDITY'
360
+ | 'EQUITY'
361
+ | 'FIXED_INCOME'
362
+ | 'PRECIOUS_METALS'
363
+ | 'COMMODITY'
364
+ | 'INSURANCE'
365
+ | 'ALTERNATIVE_INVESTMENT'
366
+ | 'PERSONAL_ASSETS'
367
+ | 'LIABILITY'
368
+ | 'REAL_ESTATE'
369
+ | 'INDEX';
370
+ /**
371
+ * Asset sub-class (product type, derived at read time from classification rules)
372
+ */
373
+ assetSubClass?: string;
269
374
  };
270
375
 
376
+ /**
377
+ * Onboarding product category (coarse grouping derived from assetSubClass)
378
+ */
379
+ export type productCategory =
380
+ | 'cash'
381
+ | 'investment'
382
+ | 'credit_card'
383
+ | 'loan'
384
+ | 'payable_tax'
385
+ | 'other';
386
+
387
+ /**
388
+ * Asset class (LIQUIDITY/EQUITY/.../LIABILITY), derived at read time from classification rules
389
+ */
390
+ export type assetClass =
391
+ | 'LIQUIDITY'
392
+ | 'EQUITY'
393
+ | 'FIXED_INCOME'
394
+ | 'PRECIOUS_METALS'
395
+ | 'COMMODITY'
396
+ | 'INSURANCE'
397
+ | 'ALTERNATIVE_INVESTMENT'
398
+ | 'PERSONAL_ASSETS'
399
+ | 'LIABILITY'
400
+ | 'REAL_ESTATE'
401
+ | 'INDEX';
402
+
271
403
  export type AccountStandardListResponseDto = {
272
404
  /**
273
405
  * Array of account templates
@@ -284,10 +416,6 @@ export type AccountStandardListResponseDto = {
284
416
  };
285
417
 
286
418
  export type TemplateMetadataDto = {
287
- /**
288
- * Whether this path can be extended
289
- */
290
- extendable: boolean;
291
419
  /**
292
420
  * Root account type
293
421
  */
@@ -848,6 +976,51 @@ export type flag2 =
848
976
  */
849
977
  export type status2 = 'ACTIVE' | 'VOIDED' | 'SUPERSEDED';
850
978
 
979
+ export type BalanceByCurrencyDto = {
980
+ /**
981
+ * ISO 4217 currency code
982
+ */
983
+ currency: string;
984
+ /**
985
+ * Balance amount
986
+ */
987
+ balance: string;
988
+ };
989
+
990
+ export type ExchangeRateWarningDto = {
991
+ /**
992
+ * Warning type
993
+ */
994
+ type: string;
995
+ /**
996
+ * Currency without exchange rate
997
+ */
998
+ currency: string;
999
+ /**
1000
+ * Total amount affected
1001
+ */
1002
+ totalAmount: string;
1003
+ };
1004
+
1005
+ export type TransactionListSummaryDto = {
1006
+ /**
1007
+ * Partial converted total in base currency (rated currencies only, raw Beancount sign). When warnings is non-empty this excludes currencies missing an FX rate; may be "0.00" if ALL non-base currencies lack a rate. Converted at the dateTo (or current) available rate.
1008
+ */
1009
+ totalAmount: string;
1010
+ /**
1011
+ * Base currency (ISO 4217)
1012
+ */
1013
+ currency: string;
1014
+ /**
1015
+ * Raw (unconverted) balance per currency
1016
+ */
1017
+ balanceByCurrency: Array<BalanceByCurrencyDto>;
1018
+ /**
1019
+ * Currencies missing an FX rate (omitted when empty)
1020
+ */
1021
+ warnings?: Array<ExchangeRateWarningDto>;
1022
+ };
1023
+
851
1024
  export type TransactionListResponseDto = {
852
1025
  /**
853
1026
  * List of transactions
@@ -865,6 +1038,10 @@ export type TransactionListResponseDto = {
865
1038
  * Number of items skipped
866
1039
  */
867
1040
  offset: number;
1041
+ /**
1042
+ * Amount summary for the full filtered set (#514). Present only when the request has a single account OR category viewpoint; omitted for search-only / plain-list / dual-perspective requests.
1043
+ */
1044
+ summary?: TransactionListSummaryDto;
868
1045
  };
869
1046
 
870
1047
  export type TagSuggestionDto = {
@@ -1917,6 +2094,108 @@ export type UpdateCommodityDto = {
1917
2094
  };
1918
2095
  };
1919
2096
 
2097
+ export type CreateBeanPriceDto = {
2098
+ /**
2099
+ * Currency being priced (e.g., USD, AAPL, BTC)
2100
+ */
2101
+ currency: string;
2102
+ /**
2103
+ * Quote currency (pricing currency, e.g., CNY, EUR)
2104
+ */
2105
+ quoteCurrency: string;
2106
+ /**
2107
+ * Price amount (MUST be >= 0 per Beancount spec, supports up to 15 decimal places). Zero allowed for conversion entries, negative strictly prohibited.
2108
+ */
2109
+ amount: number;
2110
+ /**
2111
+ * Price date (ISO 8601 format)
2112
+ */
2113
+ date: string;
2114
+ /**
2115
+ * Metadata (validated by Zod schema, max field lengths enforced)
2116
+ */
2117
+ metadata?: {
2118
+ [key: string]: unknown;
2119
+ };
2120
+ };
2121
+
2122
+ export type PriceResponseDto = {
2123
+ /**
2124
+ * Unique identifier
2125
+ */
2126
+ id: string;
2127
+ /**
2128
+ * User ID (owner of the price)
2129
+ */
2130
+ userId: string;
2131
+ /**
2132
+ * Currency being priced (e.g., USD, AAPL, BTC)
2133
+ */
2134
+ currency: string;
2135
+ /**
2136
+ * Quote currency (pricing currency, e.g., USD, CNY)
2137
+ */
2138
+ quoteCurrency: string;
2139
+ /**
2140
+ * Price amount (corresponds to Beancount Amount.number). Supports up to 15 decimal places.
2141
+ */
2142
+ amount: number;
2143
+ /**
2144
+ * Price date (ISO 8601 format). Represents the date this price was valid.
2145
+ */
2146
+ date: string;
2147
+ /**
2148
+ * Metadata (corresponds to Beancount meta field). Contains source, confidence, note, etc.
2149
+ */
2150
+ meta: {
2151
+ [key: string]: unknown;
2152
+ };
2153
+ /**
2154
+ * Creation timestamp
2155
+ */
2156
+ createdAt: string;
2157
+ /**
2158
+ * Last update timestamp
2159
+ */
2160
+ updatedAt: string;
2161
+ };
2162
+
2163
+ export type PriceListResponseDto = {
2164
+ /**
2165
+ * List of prices
2166
+ */
2167
+ items: Array<PriceResponseDto>;
2168
+ /**
2169
+ * Total number of prices
2170
+ */
2171
+ total: number;
2172
+ };
2173
+
2174
+ export type UpdateBeanPriceDto = {
2175
+ /**
2176
+ * Currency being priced
2177
+ */
2178
+ currency?: string;
2179
+ /**
2180
+ * Quote currency (pricing currency)
2181
+ */
2182
+ quoteCurrency?: string;
2183
+ /**
2184
+ * Price amount (MUST be >= 0 per Beancount spec)
2185
+ */
2186
+ amount?: number;
2187
+ /**
2188
+ * Price date (ISO 8601 format)
2189
+ */
2190
+ date?: string;
2191
+ /**
2192
+ * Metadata
2193
+ */
2194
+ metadata?: {
2195
+ [key: string]: unknown;
2196
+ };
2197
+ };
2198
+
1920
2199
  export type CreateRecurringRuleDto = {
1921
2200
  /**
1922
2201
  * Rule name (unique per user)
@@ -2556,29 +2835,341 @@ export type ForecastResponseDto = {
2556
2835
  periodEnd: string;
2557
2836
  };
2558
2837
 
2559
- export type CreateTransactionRuleDto = {
2560
- name: string;
2561
- description?: string;
2562
- narrationKeywords?: Array<unknown[]>;
2563
- payeeKeywords?: Array<unknown[]>;
2564
- categoryKeywords?: Array<unknown[]>;
2838
+ export type CurrencyBalanceDto = {
2565
2839
  /**
2566
- * Payment method keywords (e.g., HuaBei, YuEBao)
2840
+ * ISO 4217 currency code
2567
2841
  */
2568
- methodKeywords?: Array<unknown[]>;
2842
+ currency: string;
2569
2843
  /**
2570
- * Destination account for expenses/income (e.g., Expenses:Food:Coffee)
2844
+ * Balance amount
2571
2845
  */
2572
- categoryAccount?: string;
2573
- matchLogic: 'OR' | 'AND';
2846
+ balance: string;
2847
+ };
2848
+
2849
+ export type TimeSeriesPointDto = {
2574
2850
  /**
2575
- * Minimum transaction amount (inclusive)
2851
+ * Date in YYYY-MM-DD format
2576
2852
  */
2577
- amountMin?: number;
2853
+ date: string;
2578
2854
  /**
2579
- * Maximum transaction amount (inclusive)
2855
+ * Value at this date (in base currency)
2580
2856
  */
2581
- amountMax?: number;
2857
+ value: string;
2858
+ /**
2859
+ * Change from previous point
2860
+ */
2861
+ change?: {
2862
+ [key: string]: unknown;
2863
+ };
2864
+ /**
2865
+ * Total assets at this date (in base currency)
2866
+ */
2867
+ assets?: string;
2868
+ /**
2869
+ * Total liabilities at this date (in base currency)
2870
+ */
2871
+ liabilities?: string;
2872
+ /**
2873
+ * Multi-currency breakdown for this point
2874
+ */
2875
+ byCurrency?: Array<CurrencyBalanceDto>;
2876
+ };
2877
+
2878
+ export type TrendSummaryDto = {
2879
+ /**
2880
+ * Value at start of period
2881
+ */
2882
+ startValue: string;
2883
+ /**
2884
+ * Value at end of period
2885
+ */
2886
+ endValue: string;
2887
+ /**
2888
+ * Total change over period
2889
+ */
2890
+ totalChange: string;
2891
+ /**
2892
+ * Total change percentage
2893
+ */
2894
+ totalChangePercentage: string;
2895
+ };
2896
+
2897
+ export type MultiCurrencyPointDto = {
2898
+ /**
2899
+ * Date in YYYY-MM-DD format
2900
+ */
2901
+ date: string;
2902
+ /**
2903
+ * Balances by currency
2904
+ */
2905
+ byCurrency: Array<CurrencyBalanceDto>;
2906
+ };
2907
+
2908
+ export type PortfolioTrendsResponseDto = {
2909
+ /**
2910
+ * Time series data points
2911
+ */
2912
+ series: Array<TimeSeriesPointDto>;
2913
+ /**
2914
+ * Period summary
2915
+ */
2916
+ summary: TrendSummaryDto;
2917
+ /**
2918
+ * Period requested
2919
+ */
2920
+ period: string;
2921
+ /**
2922
+ * Data granularity
2923
+ */
2924
+ granularity: string;
2925
+ /**
2926
+ * Base currency for converted values
2927
+ */
2928
+ currency: string;
2929
+ /**
2930
+ * Multi-currency time series (each point has currency breakdown)
2931
+ */
2932
+ byCurrency?: Array<MultiCurrencyPointDto>;
2933
+ /**
2934
+ * Exchange rate warnings
2935
+ */
2936
+ warnings?: Array<ExchangeRateWarningDto>;
2937
+ };
2938
+
2939
+ export type CashFlowPointDto = {
2940
+ /**
2941
+ * Month key (YYYY-MM)
2942
+ */
2943
+ month: string;
2944
+ /**
2945
+ * Income in base currency (absolute, converted)
2946
+ */
2947
+ income: string;
2948
+ /**
2949
+ * Expense in base currency (absolute, converted)
2950
+ */
2951
+ expense: string;
2952
+ /**
2953
+ * netSavings = income − expense (savings positive)
2954
+ */
2955
+ netSavings: string;
2956
+ };
2957
+
2958
+ export type CashFlowTrendSummaryDto = {
2959
+ /**
2960
+ * Total income across the period
2961
+ */
2962
+ totalIncome: string;
2963
+ /**
2964
+ * Total expense across the period
2965
+ */
2966
+ totalExpense: string;
2967
+ /**
2968
+ * income − expense across the period
2969
+ */
2970
+ totalNetSavings: string;
2971
+ /**
2972
+ * totalNetSavings divided by the window length (N months, incl. zero-filled)
2973
+ */
2974
+ averageMonthlyNetSavings: string;
2975
+ };
2976
+
2977
+ export type CashFlowTrendsResponseDto = {
2978
+ /**
2979
+ * Monthly cash-flow series (fixed N-month window, zero-filled)
2980
+ */
2981
+ series: Array<CashFlowPointDto>;
2982
+ /**
2983
+ * Period totals
2984
+ */
2985
+ summary: CashFlowTrendSummaryDto;
2986
+ /**
2987
+ * Period requested
2988
+ */
2989
+ period: string;
2990
+ /**
2991
+ * Data granularity (v1 returns month buckets)
2992
+ */
2993
+ granularity: string;
2994
+ /**
2995
+ * Base currency for converted values
2996
+ */
2997
+ currency: string;
2998
+ /**
2999
+ * Exchange rate warnings (e.g. missing rate for a currency)
3000
+ */
3001
+ warnings?: Array<ExchangeRateWarningDto>;
3002
+ };
3003
+
3004
+ export type GenerateSnapshotBody = unknown;
3005
+
3006
+ export type GenerateSnapshotResponse = unknown;
3007
+
3008
+ export type BackfillSnapshotsBody = unknown;
3009
+
3010
+ export type BackfillSnapshotsResponse = unknown;
3011
+
3012
+ export type DeleteOwnUserDto = {
3013
+ /**
3014
+ * Access token for user verification
3015
+ */
3016
+ accessToken: string;
3017
+ };
3018
+
3019
+ export type SignupDto = {
3020
+ /**
3021
+ * Cloudflare Turnstile verification token (optional when Turnstile disabled)
3022
+ */
3023
+ turnstileToken?: string;
3024
+ };
3025
+
3026
+ export type SignupResponseDto = {
3027
+ /**
3028
+ * JWT auth token
3029
+ */
3030
+ authToken: string;
3031
+ /**
3032
+ * Auto-generated access token
3033
+ */
3034
+ accessToken: string;
3035
+ /**
3036
+ * Assigned user role
3037
+ */
3038
+ role: 'USER' | 'ADMIN' | 'DEMO' | 'INACTIVE' | 'PAID' | 'OPS';
3039
+ };
3040
+
3041
+ /**
3042
+ * Assigned user role
3043
+ */
3044
+ export type role = 'USER' | 'ADMIN' | 'DEMO' | 'INACTIVE' | 'PAID' | 'OPS';
3045
+
3046
+ export type UpdateUserSettingDto = {
3047
+ /**
3048
+ * Security ID
3049
+ */
3050
+ secId?: number;
3051
+ /**
3052
+ * Annual interest rate
3053
+ */
3054
+ annualInterestRate?: number;
3055
+ /**
3056
+ * Currency code
3057
+ */
3058
+ currency?: string;
3059
+ /**
3060
+ * Base currency code
3061
+ */
3062
+ baseCurrency?: string;
3063
+ /**
3064
+ * Benchmark symbol
3065
+ */
3066
+ benchmark?: string;
3067
+ /**
3068
+ * Color scheme
3069
+ */
3070
+ colorScheme?: 'DARK' | 'LIGHT';
3071
+ /**
3072
+ * Date range filter
3073
+ */
3074
+ dateRange?: string;
3075
+ /**
3076
+ * Emergency fund amount
3077
+ */
3078
+ emergencyFund?: number;
3079
+ /**
3080
+ * Account filter IDs
3081
+ */
3082
+ 'filters.accounts'?: Array<string>;
3083
+ /**
3084
+ * Asset class filters
3085
+ */
3086
+ 'filters.assetClasses'?: Array<string>;
3087
+ /**
3088
+ * Data source filter
3089
+ */
3090
+ 'filters.dataSource'?: string;
3091
+ /**
3092
+ * Symbol filter
3093
+ */
3094
+ 'filters.symbol'?: string;
3095
+ /**
3096
+ * Tag filters
3097
+ */
3098
+ 'filters.tags'?: Array<string>;
3099
+ /**
3100
+ * Enable experimental features
3101
+ */
3102
+ isExperimentalFeatures?: boolean;
3103
+ /**
3104
+ * Enable restricted view mode
3105
+ */
3106
+ isRestrictedView?: boolean;
3107
+ /**
3108
+ * Language code
3109
+ */
3110
+ language?: string;
3111
+ /**
3112
+ * Locale code
3113
+ */
3114
+ locale?: string;
3115
+ /**
3116
+ * Projected total amount
3117
+ */
3118
+ projectedTotalAmount?: number;
3119
+ /**
3120
+ * Retirement date in ISO 8601 format
3121
+ */
3122
+ retirementDate?: string;
3123
+ /**
3124
+ * Savings rate percentage
3125
+ */
3126
+ savingsRate?: number;
3127
+ /**
3128
+ * View mode
3129
+ */
3130
+ viewMode?: 'DEFAULT' | 'ZEN';
3131
+ };
3132
+
3133
+ /**
3134
+ * Color scheme
3135
+ */
3136
+ export type colorScheme = 'DARK' | 'LIGHT';
3137
+
3138
+ /**
3139
+ * View mode
3140
+ */
3141
+ export type viewMode = 'DEFAULT' | 'ZEN';
3142
+
3143
+ export type UpdatePropertyDto = {
3144
+ /**
3145
+ * Property value
3146
+ */
3147
+ value: string;
3148
+ };
3149
+
3150
+ export type CreateTransactionRuleDto = {
3151
+ name: string;
3152
+ description?: string;
3153
+ narrationKeywords?: Array<unknown[]>;
3154
+ payeeKeywords?: Array<unknown[]>;
3155
+ categoryKeywords?: Array<unknown[]>;
3156
+ /**
3157
+ * Payment method keywords (e.g., HuaBei, YuEBao)
3158
+ */
3159
+ methodKeywords?: Array<unknown[]>;
3160
+ /**
3161
+ * Destination account for expenses/income (e.g., Expenses:Food:Coffee)
3162
+ */
3163
+ categoryAccount?: string;
3164
+ matchLogic: 'OR' | 'AND';
3165
+ /**
3166
+ * Minimum transaction amount (inclusive)
3167
+ */
3168
+ amountMin?: number;
3169
+ /**
3170
+ * Maximum transaction amount (inclusive)
3171
+ */
3172
+ amountMax?: number;
2582
3173
  priority: number;
2583
3174
  additionalTags?: Array<unknown[]>;
2584
3175
  additionalMetadata?: {
@@ -2853,180 +3444,62 @@ export type UpdateTransactionRuleDto = {
2853
3444
  description?: string;
2854
3445
  narrationKeywords?: Array<unknown[]>;
2855
3446
  payeeKeywords?: Array<unknown[]>;
2856
- categoryKeywords?: Array<unknown[]>;
2857
- /**
2858
- * Payment method keywords (e.g., HuaBei, YuEBao)
2859
- */
2860
- methodKeywords?: Array<unknown[]>;
2861
- /**
2862
- * Destination account for expenses/income (e.g., Expenses:Food:Coffee)
2863
- */
2864
- categoryAccount?: string;
2865
- matchLogic?: 'OR' | 'AND';
2866
- /**
2867
- * Minimum transaction amount (inclusive)
2868
- */
2869
- amountMin?: number;
2870
- /**
2871
- * Maximum transaction amount (inclusive)
2872
- */
2873
- amountMax?: number;
2874
- priority?: number;
2875
- /**
2876
- * Enable or disable the rule
2877
- */
2878
- enabled?: boolean;
2879
- additionalTags?: Array<unknown[]>;
2880
- additionalMetadata?: {
2881
- [key: string]: unknown;
2882
- };
2883
- };
2884
-
2885
- export type TestRuleDto = {
2886
- narration: string;
2887
- payee?: string;
2888
- categoryAccount?: string;
2889
- amount?: number;
2890
- currency?: string;
2891
- };
2892
-
2893
- export type TestRuleResponseDto = {
2894
- /**
2895
- * Rule ID that was tested
2896
- */
2897
- ruleId: string;
2898
- /**
2899
- * Whether the rule matched the test data
2900
- */
2901
- matches: boolean;
2902
- /**
2903
- * Match confidence score (0-1)
2904
- */
2905
- confidence: number;
2906
- /**
2907
- * Details of which fields matched
2908
- */
2909
- matchDetails: {
2910
- [key: string]: unknown;
2911
- };
2912
- };
2913
-
2914
- export type DeleteOwnUserDto = {
2915
- /**
2916
- * Access token for user verification
2917
- */
2918
- accessToken: string;
2919
- };
2920
-
2921
- export type SignupDto = {
2922
- /**
2923
- * Cloudflare Turnstile verification token (optional when Turnstile disabled)
2924
- */
2925
- turnstileToken?: string;
2926
- };
2927
-
2928
- export type UpdateUserSettingDto = {
2929
- /**
2930
- * Security ID
2931
- */
2932
- secId?: number;
2933
- /**
2934
- * Annual interest rate
2935
- */
2936
- annualInterestRate?: number;
2937
- /**
2938
- * Currency code
2939
- */
2940
- currency?: string;
2941
- /**
2942
- * Base currency code
2943
- */
2944
- baseCurrency?: string;
2945
- /**
2946
- * Benchmark symbol
2947
- */
2948
- benchmark?: string;
2949
- /**
2950
- * Color scheme
2951
- */
2952
- colorScheme?: 'DARK' | 'LIGHT';
2953
- /**
2954
- * Date range filter
2955
- */
2956
- dateRange?: string;
2957
- /**
2958
- * Emergency fund amount
2959
- */
2960
- emergencyFund?: number;
2961
- /**
2962
- * Account filter IDs
2963
- */
2964
- 'filters.accounts'?: Array<string>;
2965
- /**
2966
- * Asset class filters
2967
- */
2968
- 'filters.assetClasses'?: Array<string>;
2969
- /**
2970
- * Data source filter
2971
- */
2972
- 'filters.dataSource'?: string;
2973
- /**
2974
- * Symbol filter
2975
- */
2976
- 'filters.symbol'?: string;
2977
- /**
2978
- * Tag filters
2979
- */
2980
- 'filters.tags'?: Array<string>;
3447
+ categoryKeywords?: Array<unknown[]>;
2981
3448
  /**
2982
- * Enable experimental features
3449
+ * Payment method keywords (e.g., HuaBei, YuEBao)
2983
3450
  */
2984
- isExperimentalFeatures?: boolean;
3451
+ methodKeywords?: Array<unknown[]>;
2985
3452
  /**
2986
- * Enable restricted view mode
3453
+ * Destination account for expenses/income (e.g., Expenses:Food:Coffee)
2987
3454
  */
2988
- isRestrictedView?: boolean;
3455
+ categoryAccount?: string;
3456
+ matchLogic?: 'OR' | 'AND';
2989
3457
  /**
2990
- * Language code
3458
+ * Minimum transaction amount (inclusive)
2991
3459
  */
2992
- language?: string;
3460
+ amountMin?: number;
2993
3461
  /**
2994
- * Locale code
3462
+ * Maximum transaction amount (inclusive)
2995
3463
  */
2996
- locale?: string;
3464
+ amountMax?: number;
3465
+ priority?: number;
2997
3466
  /**
2998
- * Projected total amount
3467
+ * Enable or disable the rule
2999
3468
  */
3000
- projectedTotalAmount?: number;
3469
+ enabled?: boolean;
3470
+ additionalTags?: Array<unknown[]>;
3471
+ additionalMetadata?: {
3472
+ [key: string]: unknown;
3473
+ };
3474
+ };
3475
+
3476
+ export type TestRuleDto = {
3477
+ narration: string;
3478
+ payee?: string;
3479
+ categoryAccount?: string;
3480
+ amount?: number;
3481
+ currency?: string;
3482
+ };
3483
+
3484
+ export type TestRuleResponseDto = {
3001
3485
  /**
3002
- * Retirement date in ISO 8601 format
3486
+ * Rule ID that was tested
3003
3487
  */
3004
- retirementDate?: string;
3488
+ ruleId: string;
3005
3489
  /**
3006
- * Savings rate percentage
3490
+ * Whether the rule matched the test data
3007
3491
  */
3008
- savingsRate?: number;
3492
+ matches: boolean;
3009
3493
  /**
3010
- * View mode
3494
+ * Match confidence score (0-1)
3011
3495
  */
3012
- viewMode?: 'DEFAULT' | 'ZEN';
3013
- };
3014
-
3015
- /**
3016
- * Color scheme
3017
- */
3018
- export type colorScheme = 'DARK' | 'LIGHT';
3019
-
3020
- /**
3021
- * View mode
3022
- */
3023
- export type viewMode = 'DEFAULT' | 'ZEN';
3024
-
3025
- export type UpdatePropertyDto = {
3496
+ confidence: number;
3026
3497
  /**
3027
- * Property value
3498
+ * Details of which fields matched
3028
3499
  */
3029
- value: string;
3500
+ matchDetails: {
3501
+ [key: string]: unknown;
3502
+ };
3030
3503
  };
3031
3504
 
3032
3505
  export type CreateBeanEventDto = {
@@ -3119,6 +3592,160 @@ export type UpdateBeanEventDto = {
3119
3592
  };
3120
3593
  };
3121
3594
 
3595
+ export type OnboardingAccountDto = {
3596
+ /**
3597
+ * Account path (Assets/Liabilities only; format validated by the account service)
3598
+ */
3599
+ path: string;
3600
+ /**
3601
+ * ISO 4217 currency code (3 letters)
3602
+ */
3603
+ currency: string;
3604
+ /**
3605
+ * Opening balance as a non-negative Decimal string (e.g. "1000.00")
3606
+ */
3607
+ openingBalance?: string;
3608
+ /**
3609
+ * Platform ID to bind the account to (references Platform.id); omit for unbound
3610
+ */
3611
+ platformId?: string;
3612
+ };
3613
+
3614
+ export type OnboardingDto = {
3615
+ /**
3616
+ * Asset/Liability accounts to register with opening balances
3617
+ */
3618
+ accounts?: Array<OnboardingAccountDto>;
3619
+ /**
3620
+ * Skip asset registration; only bootstrap the core account set
3621
+ */
3622
+ skipAssetRegistration?: boolean;
3623
+ };
3624
+
3625
+ export type ActualBalanceDto = {
3626
+ /**
3627
+ * Actual balance amount as a decimal string (preserves precision for tolerance inference).
3628
+ */
3629
+ amount: string;
3630
+ /**
3631
+ * Currency code (ISO 4217 or commodity ticker).
3632
+ */
3633
+ ccy: string;
3634
+ };
3635
+
3636
+ export type ComputeReconciliationDto = {
3637
+ /**
3638
+ * BeanAccount id to reconcile.
3639
+ */
3640
+ accountId: string;
3641
+ /**
3642
+ * Assertion date (ISO 8601, e.g. "2026-07-24").
3643
+ */
3644
+ asOfDate: string;
3645
+ /**
3646
+ * Actual balance from the external statement.
3647
+ */
3648
+ actualBalance: ActualBalanceDto;
3649
+ };
3650
+
3651
+ export type ReconciliationComputeResultDto = {
3652
+ accountId: string;
3653
+ asOfDate: string;
3654
+ /**
3655
+ * System-computed book balance (decimal string).
3656
+ */
3657
+ bookBalance: string;
3658
+ /**
3659
+ * User-entered actual balance (decimal string).
3660
+ */
3661
+ actualBalance: string;
3662
+ currency: string;
3663
+ /**
3664
+ * Diff = book − actual (decimal string).
3665
+ */
3666
+ diff: string;
3667
+ /**
3668
+ * Applied tolerance (decimal string).
3669
+ */
3670
+ tolerance: string;
3671
+ /**
3672
+ * true when |diff| ≤ tolerance.
3673
+ */
3674
+ withinTolerance: boolean;
3675
+ /**
3676
+ * Suggested next action: assert when within tolerance, pad otherwise.
3677
+ */
3678
+ suggestedAction: 'assert' | 'pad';
3679
+ };
3680
+
3681
+ /**
3682
+ * Suggested next action: assert when within tolerance, pad otherwise.
3683
+ */
3684
+ export type suggestedAction = 'assert' | 'pad';
3685
+
3686
+ export type AssertReconciliationDto = {
3687
+ /**
3688
+ * BeanAccount id to reconcile.
3689
+ */
3690
+ accountId: string;
3691
+ /**
3692
+ * Assertion date (ISO 8601, e.g. "2026-07-24").
3693
+ */
3694
+ asOfDate: string;
3695
+ /**
3696
+ * Actual balance from the external statement.
3697
+ */
3698
+ actualBalance: ActualBalanceDto;
3699
+ /**
3700
+ * Optional explicit tolerance override. Omit to infer from amount precision (Beancount default).
3701
+ */
3702
+ tolerance?: string;
3703
+ };
3704
+
3705
+ export type ReconciliationRecordDto = {
3706
+ id: string;
3707
+ accountId: string;
3708
+ date: string;
3709
+ /**
3710
+ * Asserted (actual) amount.
3711
+ */
3712
+ amount: string;
3713
+ currency: string;
3714
+ tolerance?: string;
3715
+ /**
3716
+ * book − actual.
3717
+ */
3718
+ diffAmount?: string;
3719
+ diffCurrency?: string;
3720
+ createdAt: string;
3721
+ };
3722
+
3723
+ export type PadReconciliationDto = {
3724
+ /**
3725
+ * BeanAccount id to reconcile.
3726
+ */
3727
+ accountId: string;
3728
+ /**
3729
+ * Assertion date (ISO 8601, e.g. "2026-07-24").
3730
+ */
3731
+ asOfDate: string;
3732
+ /**
3733
+ * Actual balance from the external statement.
3734
+ */
3735
+ actualBalance: ActualBalanceDto;
3736
+ /**
3737
+ * Pad source account. Defaults to Equity:Opening-Balances (official Beancount convention).
3738
+ */
3739
+ sourceAccount?: string;
3740
+ };
3741
+
3742
+ export type PadResultDto = {
3743
+ /**
3744
+ * Created pad adjusting transaction id.
3745
+ */
3746
+ transactionId: string;
3747
+ };
3748
+
3122
3749
  export type FileImportDto = {
3123
3750
  /**
3124
3751
  * Bill file to import (CSV, PDF, OFX, etc.)
@@ -3382,127 +4009,39 @@ export type UpdateMapperDefaultsDto = {
3382
4009
  /**
3383
4010
  * Source account for transactions (Beancount format)
3384
4011
  */
3385
- sourceAccount?: string;
3386
- /**
3387
- * Default currency (ISO 4217 code)
3388
- */
3389
- currency?: string;
3390
- /**
3391
- * Default expense account (optional)
3392
- */
3393
- expenseAccount?: string;
3394
- /**
3395
- * Default income account (optional)
3396
- */
3397
- incomeAccount?: string;
3398
- /**
3399
- * 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).
3400
- */
3401
- methodAccountMapping?: {
3402
- [key: string]: unknown;
3403
- };
3404
- };
3405
-
3406
- export type UpdateConfigDataDto = {
3407
- /**
3408
- * Mapper defaults configuration
3409
- */
3410
- defaults?: UpdateMapperDefaultsDto;
3411
- };
3412
-
3413
- export type UpdateImporterConfigDto = {
3414
- /**
3415
- * Configuration data (v1 schema)
3416
- */
3417
- data?: UpdateConfigDataDto;
3418
- };
3419
-
3420
- export type CreatePlatformDto = {
3421
- /**
3422
- * Platform name
3423
- */
3424
- name: string;
3425
- /**
3426
- * Platform canonical identifier (lowercase, kebab-case)
3427
- */
3428
- canonical: string;
3429
- /**
3430
- * Platform aliases (multi-language names for lookup)
3431
- */
3432
- aliases: Array<string>;
3433
- /**
3434
- * Platform URL
3435
- */
3436
- url: string;
3437
- /**
3438
- * Platform type
3439
- */
3440
- type:
3441
- | 'BANK'
3442
- | 'BROKERAGE'
3443
- | 'CRYPTO_EXCHANGE'
3444
- | 'PAYMENT'
3445
- | 'INVESTMENT'
3446
- | 'INSURANCE'
3447
- | 'OTHER';
3448
- /**
3449
- * Platform logo URL
3450
- */
3451
- logoUrl?: string;
3452
- /**
3453
- * Whether the platform is active
3454
- */
3455
- isActive?: boolean;
3456
- };
3457
-
3458
- /**
3459
- * Platform type
3460
- */
3461
- export type type3 =
3462
- | 'BANK'
3463
- | 'BROKERAGE'
3464
- | 'CRYPTO_EXCHANGE'
3465
- | 'PAYMENT'
3466
- | 'INVESTMENT'
3467
- | 'INSURANCE'
3468
- | 'OTHER';
3469
-
3470
- export type UpdatePlatformDto = {
3471
- /**
3472
- * Platform name
3473
- */
3474
- name?: string;
4012
+ sourceAccount?: string;
3475
4013
  /**
3476
- * Platform canonical identifier (lowercase, kebab-case)
4014
+ * Default currency (ISO 4217 code)
3477
4015
  */
3478
- canonical?: string;
4016
+ currency?: string;
3479
4017
  /**
3480
- * Platform aliases (multi-language names for lookup)
4018
+ * Default expense account (optional)
3481
4019
  */
3482
- aliases?: Array<string>;
4020
+ expenseAccount?: string;
3483
4021
  /**
3484
- * Platform URL
4022
+ * Default income account (optional)
3485
4023
  */
3486
- url?: string;
4024
+ incomeAccount?: string;
3487
4025
  /**
3488
- * Platform type
4026
+ * 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).
3489
4027
  */
3490
- type?:
3491
- | 'BANK'
3492
- | 'BROKERAGE'
3493
- | 'CRYPTO_EXCHANGE'
3494
- | 'PAYMENT'
3495
- | 'INVESTMENT'
3496
- | 'INSURANCE'
3497
- | 'OTHER';
4028
+ methodAccountMapping?: {
4029
+ [key: string]: unknown;
4030
+ };
4031
+ };
4032
+
4033
+ export type UpdateConfigDataDto = {
3498
4034
  /**
3499
- * Platform logo URL
4035
+ * Mapper defaults configuration
3500
4036
  */
3501
- logoUrl?: string;
4037
+ defaults?: UpdateMapperDefaultsDto;
4038
+ };
4039
+
4040
+ export type UpdateImporterConfigDto = {
3502
4041
  /**
3503
- * Whether the platform is active
4042
+ * Configuration data (v1 schema)
3504
4043
  */
3505
- isActive?: boolean;
4044
+ data?: UpdateConfigDataDto;
3506
4045
  };
3507
4046
 
3508
4047
  export type ProviderSyncConfigDto = {
@@ -3526,6 +4065,10 @@ export type ProviderSyncConfigDto = {
3526
4065
  * Filter pending transactions
3527
4066
  */
3528
4067
  filterPending?: boolean;
4068
+ /**
4069
+ * External account ID for per-batch providers (e.g. GoCardless). Overrides sourceAccount when an ExternalAccountLink mapping exists.
4070
+ */
4071
+ externalAccountId?: string;
3529
4072
  };
3530
4073
 
3531
4074
  export type ProviderSyncDto = {
@@ -3581,6 +4124,61 @@ export type SupportedProvidersResponseDto = {
3581
4124
  providers: Array<string>;
3582
4125
  };
3583
4126
 
4127
+ export type CreateExternalAccountLinkDto = {
4128
+ /**
4129
+ * Open Banking provider (whitelist)
4130
+ */
4131
+ provider:
4132
+ | 'plaid'
4133
+ | 'teller'
4134
+ | 'truelayer'
4135
+ | 'gocardless'
4136
+ | 'simplefin'
4137
+ | 'yodlee'
4138
+ | 'beancount-direct'
4139
+ | 'parsed-bill';
4140
+ /**
4141
+ * External account ID from the provider
4142
+ */
4143
+ externalAccountId: string;
4144
+ /**
4145
+ * Target BeanAccount ID (must belong to the JWT user)
4146
+ */
4147
+ beanAccountId: string;
4148
+ };
4149
+
4150
+ /**
4151
+ * Open Banking provider (whitelist)
4152
+ */
4153
+ export type provider =
4154
+ | 'plaid'
4155
+ | 'teller'
4156
+ | 'truelayer'
4157
+ | 'gocardless'
4158
+ | 'simplefin'
4159
+ | 'yodlee'
4160
+ | 'beancount-direct'
4161
+ | 'parsed-bill';
4162
+
4163
+ export type ExternalAccountLinkResponseDto = {
4164
+ id: string;
4165
+ provider: string;
4166
+ externalAccountId: string;
4167
+ beanAccountId: string;
4168
+ isActive: boolean;
4169
+ createdAt: string;
4170
+ updatedAt: string;
4171
+ };
4172
+
4173
+ export type ExternalAccountLinkListResponseDto = {
4174
+ items: Array<ExternalAccountLinkResponseDto>;
4175
+ total: number;
4176
+ /**
4177
+ * Filter by provider (query param)
4178
+ */
4179
+ provider?: string;
4180
+ };
4181
+
3584
4182
  export type ParserTelemetryReportDto = unknown;
3585
4183
 
3586
4184
  export type UncoveredFormatMissDto = unknown;
@@ -3600,6 +4198,14 @@ export type ProcessNlpDto = {
3600
4198
  parsedData?: {
3601
4199
  [key: string]: unknown;
3602
4200
  };
4201
+ /**
4202
+ * 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.
4203
+ */
4204
+ selectedRuleId?: string;
4205
+ /**
4206
+ * 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.
4207
+ */
4208
+ selectedAccount?: string;
3603
4209
  };
3604
4210
 
3605
4211
  export type NlpTransactionInfoDto = {
@@ -3843,9 +4449,9 @@ export type NlpAccountConfirmationDataDto = {
3843
4449
  */
3844
4450
  invalidAccount: string;
3845
4451
  /**
3846
- * Suggested replacement account
4452
+ * Suggested replacement account (omitted when no clear candidate)
3847
4453
  */
3848
- suggestedAccount: string;
4454
+ suggestedAccount?: string;
3849
4455
  /**
3850
4456
  * Similar accounts for user selection
3851
4457
  */
@@ -3973,7 +4579,7 @@ export type NlpSuggestedAccountDto = {
3973
4579
  */
3974
4580
  account: string;
3975
4581
  /**
3976
- * Confidence score for this suggestion (0-1)
4582
+ * Confidence score for this suggestion (0-1). Present = predicted (confirm/confirm_rule/confirm_account); omitted = actual persisted account (created). (#586)
3977
4583
  */
3978
4584
  confidence?: number;
3979
4585
  };
@@ -3991,21 +4597,21 @@ export type NlpSuggestedAccountsDto = {
3991
4597
 
3992
4598
  export type NlpDefaultAccountsDto = {
3993
4599
  /**
3994
- * Default asset account
4600
+ * Default OPEN asset account (MRU when multiple), or null when none/ambiguous
3995
4601
  */
3996
- asset: string;
4602
+ asset: string | null;
3997
4603
  /**
3998
- * Default expense account
4604
+ * Default OPEN expense account (MRU when multiple), or null when none/ambiguous
3999
4605
  */
4000
- expense: string;
4606
+ expense: string | null;
4001
4607
  /**
4002
- * Default income account
4608
+ * Default OPEN income account (MRU when multiple), or null when none/ambiguous
4003
4609
  */
4004
- income: string;
4610
+ income: string | null;
4005
4611
  /**
4006
- * Default liability account
4612
+ * Default OPEN liability account (MRU when multiple), or null when none/ambiguous
4007
4613
  */
4008
- liability: string;
4614
+ liability: string | null;
4009
4615
  };
4010
4616
 
4011
4617
  export type NlpResponseDto = {
@@ -4024,7 +4630,8 @@ export type NlpResponseDto = {
4024
4630
  | 'confirm_rule'
4025
4631
  | 'confirm_account'
4026
4632
  | 'confirm_payee'
4027
- | 'cancel';
4633
+ | 'cancel'
4634
+ | 'aborted';
4028
4635
  /**
4029
4636
  * Transaction intent detected by EntityRouter (v6.0: 5 core intents). Frontend uses this to render scenario-specific form fields.
4030
4637
  */
@@ -4065,110 +4672,297 @@ export type NlpResponseDto = {
4065
4672
  [key: string]: unknown;
4066
4673
  };
4067
4674
  /**
4068
- * Session ID for multi-turn dialogue. Must be included in subsequent requests to continue the conversation.
4675
+ * Session ID for multi-turn dialogue. Must be included in subsequent requests to continue the conversation.
4676
+ */
4677
+ sessionId?: string;
4678
+ /**
4679
+ * Which slot is waiting for user input
4680
+ */
4681
+ waitingFor?: string;
4682
+ /**
4683
+ * Created transaction info (for created action)
4684
+ */
4685
+ transaction?: NlpTransactionInfoDto;
4686
+ /**
4687
+ * Parsed data for confirmation (when action is "confirm"). Contains extracted fields that user should verify before transaction creation.
4688
+ */
4689
+ parsedData?: NlpParsedDataDto;
4690
+ /**
4691
+ * Duplicate detection data (when action is "confirm_duplicate"). Contains information about potential duplicate transaction for user confirmation.
4692
+ */
4693
+ duplicateData?: NlpDuplicateConfirmationDataDto;
4694
+ /**
4695
+ * Rule match data (when action is "confirm_rule"). Contains information about medium-confidence rule match for user confirmation.
4696
+ */
4697
+ ruleData?: NlpRuleConfirmationDataDto;
4698
+ /**
4699
+ * Account validation data (when action is "confirm_account"). Contains information about invalid account for user correction.
4700
+ */
4701
+ accountData?: NlpAccountConfirmationDataDto;
4702
+ /**
4703
+ * Payee confirmation data (when action is "confirm_payee"). Contains information about medium/low confidence payee match for user confirmation.
4704
+ */
4705
+ payeeData?: NlpPayeeConfirmationDataDto;
4706
+ /**
4707
+ * Overall confidence score (0-1)
4708
+ */
4709
+ confidence?: number;
4710
+ /**
4711
+ * Confidence threshold for automatic creation (default: 0.75). When confidence < threshold, action will be "confirm" requiring user verification.
4712
+ */
4713
+ confidenceThreshold?: number;
4714
+ /**
4715
+ * Recurring transaction match info (when action is "created"). Contains match details when transaction matches a pending expected transaction.
4716
+ */
4717
+ recurringMatch?: RecurringMatchInfoDto;
4718
+ /**
4719
+ * 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.
4720
+ */
4721
+ recurringSuggestion?: RecurringSuggestionDto;
4722
+ /**
4723
+ * 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.
4724
+ */
4725
+ suggestedAccounts?: NlpSuggestedAccountsDto;
4726
+ /**
4727
+ * Default fallback accounts for the user/region (#586). v1 returns universal constants; per-user personalization is planned.
4728
+ */
4729
+ defaultAccounts?: NlpDefaultAccountsDto;
4730
+ };
4731
+
4732
+ /**
4733
+ * Response status
4734
+ */
4735
+ export type status4 = 'success' | 'pending' | 'error';
4736
+
4737
+ /**
4738
+ * Action taken or requested
4739
+ */
4740
+ export type action2 =
4741
+ | 'created'
4742
+ | 'ask'
4743
+ | 'confirm'
4744
+ | 'confirm_duplicate'
4745
+ | 'confirm_rule'
4746
+ | 'confirm_account'
4747
+ | 'confirm_payee'
4748
+ | 'cancel'
4749
+ | 'aborted';
4750
+
4751
+ /**
4752
+ * Transaction intent detected by EntityRouter (v6.0: 5 core intents). Frontend uses this to render scenario-specific form fields.
4753
+ */
4754
+ export type intent = 'expense' | 'asset' | 'income' | 'liability' | 'equity';
4755
+
4756
+ /**
4757
+ * Asset sub-type (only present when intent is "asset"). Determines which asset-related form to render.
4758
+ */
4759
+ export type assetSubType = 'transfer' | 'banking' | 'investment';
4760
+
4761
+ /**
4762
+ * Liability sub-type (only present when intent is "liability"). borrow: borrowing money (Liabilities → Assets), repay: repaying debt (Assets → Liabilities).
4763
+ */
4764
+ export type liabilitySubType = 'borrow' | 'repay';
4765
+
4766
+ /**
4767
+ * Equity sub-type (only present when intent is "equity"). opening: account opening balance (Equity → Assets), adjustment: balance correction.
4768
+ */
4769
+ export type equitySubType = 'opening' | 'adjustment';
4770
+
4771
+ export type PlatformListItemDto = {
4772
+ /**
4773
+ * Global platform ID
4774
+ */
4775
+ id: string;
4776
+ /**
4777
+ * Platform name
4778
+ */
4779
+ name: string;
4780
+ /**
4781
+ * Platform URL
4782
+ */
4783
+ url: string;
4784
+ /**
4785
+ * Platform type
4786
+ */
4787
+ type:
4788
+ | 'BANK'
4789
+ | 'BROKERAGE'
4790
+ | 'CRYPTO_EXCHANGE'
4791
+ | 'PAYMENT'
4792
+ | 'INVESTMENT'
4793
+ | 'INSURANCE'
4794
+ | 'OTHER';
4795
+ /**
4796
+ * Canonical identifier in ACCOUNT_RE format (e.g., "icbc")
4797
+ */
4798
+ canonical: string;
4799
+ /**
4800
+ * Suggested path segment — canonical with first char uppercased (ACC_COMP_NAME_RE)
4801
+ */
4802
+ suggestedSegment: string;
4803
+ /**
4804
+ * Logo URL
4805
+ */
4806
+ logoUrl: string | null;
4807
+ /**
4808
+ * Whether user has accounts using this platform
4809
+ */
4810
+ isBound: boolean;
4811
+ };
4812
+
4813
+ /**
4814
+ * Platform type
4815
+ */
4816
+ export type type3 =
4817
+ | 'BANK'
4818
+ | 'BROKERAGE'
4819
+ | 'CRYPTO_EXCHANGE'
4820
+ | 'PAYMENT'
4821
+ | 'INVESTMENT'
4822
+ | 'INSURANCE'
4823
+ | 'OTHER';
4824
+
4825
+ export type PlatformMatchResultDto = {
4826
+ /**
4827
+ * Global platform ID
4828
+ */
4829
+ id: string;
4830
+ /**
4831
+ * Platform name (e.g., "ICBC")
4832
+ */
4833
+ name: string;
4834
+ /**
4835
+ * Canonical identifier in ACCOUNT_RE format (e.g., "icbc")
4836
+ */
4837
+ canonical: string;
4838
+ /**
4839
+ * Platform type
4840
+ */
4841
+ type:
4842
+ | 'BANK'
4843
+ | 'BROKERAGE'
4844
+ | 'CRYPTO_EXCHANGE'
4845
+ | 'PAYMENT'
4846
+ | 'INVESTMENT'
4847
+ | 'INSURANCE'
4848
+ | 'OTHER';
4849
+ /**
4850
+ * Suggested path segment — canonical, already in ACCOUNT_RE format
4851
+ */
4852
+ suggestedSegment: string;
4853
+ /**
4854
+ * Logo URL
4855
+ */
4856
+ logoUrl: string | null;
4857
+ /**
4858
+ * How this row matched: 'exact' > 'prefix' > 'substring'
4859
+ */
4860
+ matchType: 'exact' | 'prefix' | 'substring';
4861
+ };
4862
+
4863
+ /**
4864
+ * How this row matched: 'exact' > 'prefix' > 'substring'
4865
+ */
4866
+ export type matchType = 'exact' | 'prefix' | 'substring';
4867
+
4868
+ export type PlatformMatchResponseDto = {
4869
+ /**
4870
+ * Ranked matches, best tier first (at most 10 rows)
4871
+ */
4872
+ platforms: Array<PlatformMatchResultDto>;
4873
+ /**
4874
+ * Overall match quality — top row's tier, or 'none' when no hits
4875
+ */
4876
+ matchType: 'none' | 'exact' | 'prefix' | 'substring';
4877
+ /**
4878
+ * Total matches before LIMIT (truncation transparency)
4069
4879
  */
4070
- sessionId?: string;
4880
+ total: number;
4071
4881
  /**
4072
- * Which slot is waiting for user input
4882
+ * true when total > platforms.length (more matches exist)
4073
4883
  */
4074
- waitingFor?: string;
4884
+ hasMore: boolean;
4885
+ };
4886
+
4887
+ /**
4888
+ * Overall match quality — top row's tier, or 'none' when no hits
4889
+ */
4890
+ export type matchType2 = 'none' | 'exact' | 'prefix' | 'substring';
4891
+
4892
+ export type CreatePlatformDto = {
4075
4893
  /**
4076
- * Created transaction info (for created action)
4894
+ * Platform name
4077
4895
  */
4078
- transaction?: NlpTransactionInfoDto;
4896
+ name: string;
4079
4897
  /**
4080
- * Parsed data for confirmation (when action is "confirm"). Contains extracted fields that user should verify before transaction creation.
4898
+ * Platform canonical identifier (lowercase, kebab-case)
4081
4899
  */
4082
- parsedData?: NlpParsedDataDto;
4900
+ canonical: string;
4083
4901
  /**
4084
- * Duplicate detection data (when action is "confirm_duplicate"). Contains information about potential duplicate transaction for user confirmation.
4902
+ * Platform aliases (multi-language names for lookup)
4085
4903
  */
4086
- duplicateData?: NlpDuplicateConfirmationDataDto;
4904
+ aliases: Array<string>;
4087
4905
  /**
4088
- * Rule match data (when action is "confirm_rule"). Contains information about medium-confidence rule match for user confirmation.
4906
+ * Platform URL
4089
4907
  */
4090
- ruleData?: NlpRuleConfirmationDataDto;
4908
+ url: string;
4091
4909
  /**
4092
- * Account validation data (when action is "confirm_account"). Contains information about invalid account for user correction.
4910
+ * Platform type
4093
4911
  */
4094
- accountData?: NlpAccountConfirmationDataDto;
4912
+ type:
4913
+ | 'BANK'
4914
+ | 'BROKERAGE'
4915
+ | 'CRYPTO_EXCHANGE'
4916
+ | 'PAYMENT'
4917
+ | 'INVESTMENT'
4918
+ | 'INSURANCE'
4919
+ | 'OTHER';
4095
4920
  /**
4096
- * Payee confirmation data (when action is "confirm_payee"). Contains information about medium/low confidence payee match for user confirmation.
4921
+ * Platform logo URL
4097
4922
  */
4098
- payeeData?: NlpPayeeConfirmationDataDto;
4923
+ logoUrl?: string;
4099
4924
  /**
4100
- * Overall confidence score (0-1)
4925
+ * Whether the platform is active
4101
4926
  */
4102
- confidence?: number;
4927
+ isActive?: boolean;
4928
+ };
4929
+
4930
+ export type UpdatePlatformDto = {
4103
4931
  /**
4104
- * Confidence threshold for automatic creation (default: 0.75). When confidence < threshold, action will be "confirm" requiring user verification.
4932
+ * Platform name
4105
4933
  */
4106
- confidenceThreshold?: number;
4934
+ name?: string;
4107
4935
  /**
4108
- * Recurring transaction match info (when action is "created"). Contains match details when transaction matches a pending expected transaction.
4936
+ * Platform canonical identifier (lowercase, kebab-case)
4109
4937
  */
4110
- recurringMatch?: RecurringMatchInfoDto;
4938
+ canonical?: string;
4111
4939
  /**
4112
- * 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.
4940
+ * Platform aliases (multi-language names for lookup)
4113
4941
  */
4114
- recurringSuggestion?: RecurringSuggestionDto;
4942
+ aliases?: Array<string>;
4115
4943
  /**
4116
- * Suggested accounts for this transaction. Contains recommended source and destination accounts based on the detected intent and rules.
4944
+ * Platform URL
4117
4945
  */
4118
- suggestedAccounts?: NlpSuggestedAccountsDto;
4946
+ url?: string;
4119
4947
  /**
4120
- * Default accounts for the user/region. These are fallback accounts used when no specific suggestion is available.
4948
+ * Platform type
4121
4949
  */
4122
- defaultAccounts?: NlpDefaultAccountsDto;
4123
- };
4124
-
4125
- /**
4126
- * Response status
4127
- */
4128
- export type status4 = 'success' | 'pending' | 'error';
4129
-
4130
- /**
4131
- * Action taken or requested
4132
- */
4133
- export type action2 =
4134
- | 'created'
4135
- | 'ask'
4136
- | 'confirm'
4137
- | 'confirm_duplicate'
4138
- | 'confirm_rule'
4139
- | 'confirm_account'
4140
- | 'confirm_payee'
4141
- | 'cancel';
4142
-
4143
- /**
4144
- * Transaction intent detected by EntityRouter (v6.0: 5 core intents). Frontend uses this to render scenario-specific form fields.
4145
- */
4146
- export type intent = 'expense' | 'asset' | 'income' | 'liability' | 'equity';
4147
-
4148
- /**
4149
- * Asset sub-type (only present when intent is "asset"). Determines which asset-related form to render.
4150
- */
4151
- export type assetSubType = 'transfer' | 'banking' | 'investment';
4152
-
4153
- /**
4154
- * Liability sub-type (only present when intent is "liability"). borrow: borrowing money (Liabilities → Assets), repay: repaying debt (Assets → Liabilities).
4155
- */
4156
- export type liabilitySubType = 'borrow' | 'repay';
4157
-
4158
- /**
4159
- * Equity sub-type (only present when intent is "equity"). opening: account opening balance (Equity → Assets), adjustment: balance correction.
4160
- */
4161
- export type equitySubType = 'opening' | 'adjustment';
4162
-
4163
- export type BalanceByCurrencyDto = {
4950
+ type?:
4951
+ | 'BANK'
4952
+ | 'BROKERAGE'
4953
+ | 'CRYPTO_EXCHANGE'
4954
+ | 'PAYMENT'
4955
+ | 'INVESTMENT'
4956
+ | 'INSURANCE'
4957
+ | 'OTHER';
4164
4958
  /**
4165
- * ISO 4217 currency code
4959
+ * Platform logo URL
4166
4960
  */
4167
- currency: string;
4961
+ logoUrl?: string;
4168
4962
  /**
4169
- * Balance amount
4963
+ * Whether the platform is active
4170
4964
  */
4171
- balance: string;
4965
+ isActive?: boolean;
4172
4966
  };
4173
4967
 
4174
4968
  export type NetWorthByCurrencyDto = {
@@ -4211,21 +5005,6 @@ export type ConvertedNetWorthDto = {
4211
5005
  };
4212
5006
  };
4213
5007
 
4214
- export type ExchangeRateWarningDto = {
4215
- /**
4216
- * Warning type
4217
- */
4218
- type: string;
4219
- /**
4220
- * Currency without exchange rate
4221
- */
4222
- currency: string;
4223
- /**
4224
- * Total amount affected
4225
- */
4226
- totalAmount: string;
4227
- };
4228
-
4229
5008
  export type NetWorthResponseDto = {
4230
5009
  /**
4231
5010
  * Total net worth (assets - liabilities, converted to base currency)
@@ -4290,6 +5069,10 @@ export type AccountItemDto = {
4290
5069
  * Currency code
4291
5070
  */
4292
5071
  currency: string;
5072
+ /**
5073
+ * FX-converted balance in base currency; omitted when not convertible
5074
+ */
5075
+ convertedBalance?: string;
4293
5076
  };
4294
5077
 
4295
5078
  export type PlatformGroupDto = {
@@ -4306,9 +5089,40 @@ export type PlatformGroupDto = {
4306
5089
  */
4307
5090
  accounts: Array<AccountItemDto>;
4308
5091
  /**
4309
- * Total balance across all accounts in platform
5092
+ * FX-converted total balance in base currency
4310
5093
  */
4311
5094
  totalBalance: string;
5095
+ /**
5096
+ * Raw (unconverted) balances grouped by currency
5097
+ */
5098
+ balanceByCurrency: Array<BalanceByCurrencyDto>;
5099
+ /**
5100
+ * Converted balance in base currency (omitted when no currency is convertible)
5101
+ */
5102
+ convertedBalance?: string;
5103
+ /**
5104
+ * Share of the grand converted total (0-100); 0 when grand total is 0
5105
+ */
5106
+ sharePct: number;
5107
+ };
5108
+
5109
+ export type AccountExchangeRateWarningDto = {
5110
+ /**
5111
+ * Warning type
5112
+ */
5113
+ type: string;
5114
+ /**
5115
+ * Currency without exchange rate
5116
+ */
5117
+ currency: string;
5118
+ /**
5119
+ * Affected account paths
5120
+ */
5121
+ accounts: Array<string>;
5122
+ /**
5123
+ * Total amount in this currency
5124
+ */
5125
+ totalAmount: string;
4312
5126
  };
4313
5127
 
4314
5128
  export type AccountsSummaryDto = {
@@ -4320,6 +5134,14 @@ export type AccountsSummaryDto = {
4320
5134
  * Total number of platforms
4321
5135
  */
4322
5136
  totalPlatforms: number;
5137
+ /**
5138
+ * Base currency for conversion
5139
+ */
5140
+ baseCurrency: string;
5141
+ /**
5142
+ * Per-account exchange rate warnings
5143
+ */
5144
+ warnings?: Array<AccountExchangeRateWarningDto>;
4323
5145
  };
4324
5146
 
4325
5147
  export type AccountsResponseDto = {
@@ -4354,6 +5176,10 @@ export type AccountItemWithAssetClassDto = {
4354
5176
  * Currency code
4355
5177
  */
4356
5178
  currency: string;
5179
+ /**
5180
+ * FX-converted balance in base currency; omitted when not convertible
5181
+ */
5182
+ convertedBalance?: string;
4357
5183
  /**
4358
5184
  * Asset class
4359
5185
  */
@@ -4419,41 +5245,6 @@ export type AssetClassGroupDto = {
4419
5245
  convertedBalance?: string;
4420
5246
  };
4421
5247
 
4422
- /**
4423
- * Asset class name
4424
- */
4425
- export type assetClass =
4426
- | 'LIQUIDITY'
4427
- | 'EQUITY'
4428
- | 'FIXED_INCOME'
4429
- | 'PRECIOUS_METALS'
4430
- | 'COMMODITY'
4431
- | 'INSURANCE'
4432
- | 'ALTERNATIVE_INVESTMENT'
4433
- | 'PERSONAL_ASSETS'
4434
- | 'LIABILITY'
4435
- | 'REAL_ESTATE'
4436
- | 'INDEX';
4437
-
4438
- export type AccountExchangeRateWarningDto = {
4439
- /**
4440
- * Warning type
4441
- */
4442
- type: string;
4443
- /**
4444
- * Currency without exchange rate
4445
- */
4446
- currency: string;
4447
- /**
4448
- * Affected account paths
4449
- */
4450
- accounts: Array<string>;
4451
- /**
4452
- * Total amount in this currency
4453
- */
4454
- totalAmount: string;
4455
- };
4456
-
4457
5248
  export type AssetClassSummaryDto = {
4458
5249
  /**
4459
5250
  * Total number of accounts
@@ -4600,21 +5391,78 @@ export type CashFlowResponseDto = {
4600
5391
  /**
4601
5392
  * Savings rate percentage (netSavings / income * 100)
4602
5393
  */
4603
- savingsRate: string;
5394
+ savingsRate: string;
5395
+ /**
5396
+ * Base currency code
5397
+ */
5398
+ currency: string;
5399
+ /**
5400
+ * Cash flow grouped by original currency
5401
+ */
5402
+ byCurrency?: CashFlowByCurrencyDto;
5403
+ /**
5404
+ * Converted values in base currency
5405
+ */
5406
+ converted?: ConvertedCashFlowDto;
5407
+ /**
5408
+ * Exchange rate warnings
5409
+ */
5410
+ warnings?: Array<ExchangeRateWarningDto>;
5411
+ };
5412
+
5413
+ export type CategoryGroupDto = {
5414
+ /**
5415
+ * Functional category (account-path Group segment); regional and universal account paths merge under it
5416
+ */
5417
+ category: string;
5418
+ /**
5419
+ * Converted total for this category in base currency (expense amount when flow=expense, income amount when flow=income)
5420
+ */
5421
+ totalExpense: string;
5422
+ /**
5423
+ * Share of grand total (0-100); 0 when grand total is 0
5424
+ */
5425
+ sharePct: number;
5426
+ /**
5427
+ * Raw (unconverted) expense per currency
5428
+ */
5429
+ balanceByCurrency: Array<BalanceByCurrencyDto>;
5430
+ /**
5431
+ * Converted total in base currency (omitted when FX missing for all currencies in this category)
5432
+ */
5433
+ convertedBalance?: string;
5434
+ };
5435
+
5436
+ export type ExpensesByCategorySummaryDto = {
5437
+ /**
5438
+ * Total across all categories, converted (convertible categories only); expense totals when flow=expense, income totals when flow=income
5439
+ */
5440
+ totalExpense: string;
5441
+ /**
5442
+ * Number of categories
5443
+ */
5444
+ categoryCount: number;
5445
+ };
5446
+
5447
+ export type ExpensesByCategoryResponseDto = {
5448
+ /**
5449
+ * Period requested
5450
+ */
5451
+ period: string;
4604
5452
  /**
4605
- * Base currency code
5453
+ * Base currency for converted values
4606
5454
  */
4607
- currency: string;
5455
+ baseCurrency: string;
4608
5456
  /**
4609
- * Cash flow grouped by original currency
5457
+ * Expense groups by functional category, sorted by converted total desc
4610
5458
  */
4611
- byCurrency?: CashFlowByCurrencyDto;
5459
+ groups: Array<CategoryGroupDto>;
4612
5460
  /**
4613
- * Converted values in base currency
5461
+ * Summary statistics
4614
5462
  */
4615
- converted?: ConvertedCashFlowDto;
5463
+ summary: ExpensesByCategorySummaryDto;
4616
5464
  /**
4617
- * Exchange rate warnings
5465
+ * Exchange rate warnings (e.g. missing rate for a currency)
4618
5466
  */
4619
5467
  warnings?: Array<ExchangeRateWarningDto>;
4620
5468
  };
@@ -4814,279 +5662,146 @@ export type HoldingPnlResponseDto = {
4814
5662
  */
4815
5663
  export type method = 'average' | 'FIFO';
4816
5664
 
4817
- export type CreateBeanPriceDto = {
4818
- /**
4819
- * Currency being priced (e.g., USD, AAPL, BTC)
4820
- */
4821
- currency: string;
4822
- /**
4823
- * Quote currency (pricing currency, e.g., CNY, EUR)
4824
- */
4825
- quoteCurrency: string;
4826
- /**
4827
- * Price amount (MUST be >= 0 per Beancount spec, supports up to 15 decimal places). Zero allowed for conversion entries, negative strictly prohibited.
4828
- */
4829
- amount: number;
4830
- /**
4831
- * Price date (ISO 8601 format)
4832
- */
4833
- date: string;
4834
- /**
4835
- * Metadata (validated by Zod schema, max field lengths enforced)
4836
- */
4837
- metadata?: {
4838
- [key: string]: unknown;
4839
- };
4840
- };
4841
-
4842
- export type PriceResponseDto = {
4843
- /**
4844
- * Unique identifier
4845
- */
4846
- id: string;
4847
- /**
4848
- * User ID (owner of the price)
4849
- */
4850
- userId: string;
4851
- /**
4852
- * Currency being priced (e.g., USD, AAPL, BTC)
4853
- */
4854
- currency: string;
4855
- /**
4856
- * Quote currency (pricing currency, e.g., USD, CNY)
4857
- */
4858
- quoteCurrency: string;
4859
- /**
4860
- * Price amount (corresponds to Beancount Amount.number). Supports up to 15 decimal places.
4861
- */
4862
- amount: number;
4863
- /**
4864
- * Price date (ISO 8601 format). Represents the date this price was valid.
4865
- */
4866
- date: string;
4867
- /**
4868
- * Metadata (corresponds to Beancount meta field). Contains source, confidence, note, etc.
4869
- */
4870
- meta: {
4871
- [key: string]: unknown;
4872
- };
4873
- /**
4874
- * Creation timestamp
4875
- */
4876
- createdAt: string;
5665
+ export type AnonymousLoginDto = {
4877
5666
  /**
4878
- * Last update timestamp
5667
+ * Access token for anonymous login
4879
5668
  */
4880
- updatedAt: string;
5669
+ accessToken: string;
4881
5670
  };
4882
5671
 
4883
- export type PriceListResponseDto = {
4884
- /**
4885
- * List of prices
4886
- */
4887
- items: Array<PriceResponseDto>;
5672
+ export type AnonymousLoginResponseDto = {
4888
5673
  /**
4889
- * Total number of prices
5674
+ * JWT auth token
4890
5675
  */
4891
- total: number;
5676
+ authToken: string;
4892
5677
  };
4893
5678
 
4894
- export type UpdateBeanPriceDto = {
4895
- /**
4896
- * Currency being priced
4897
- */
4898
- currency?: string;
4899
- /**
4900
- * Quote currency (pricing currency)
4901
- */
4902
- quoteCurrency?: string;
4903
- /**
4904
- * Price amount (MUST be >= 0 per Beancount spec)
4905
- */
4906
- amount?: number;
4907
- /**
4908
- * Price date (ISO 8601 format)
4909
- */
4910
- date?: string;
4911
- /**
4912
- * Metadata
4913
- */
4914
- metadata?: {
5679
+ export type SymbolSearchResultDto = {
5680
+ symbol: string;
5681
+ name?: {
4915
5682
  [key: string]: unknown;
4916
- };
4917
- };
4918
-
4919
- export type CurrencyBalanceDto = {
4920
- /**
4921
- * ISO 4217 currency code
4922
- */
4923
- currency: string;
4924
- /**
4925
- * Balance amount
4926
- */
4927
- balance: string;
4928
- };
4929
-
4930
- export type TimeSeriesPointDto = {
4931
- /**
4932
- * Date in YYYY-MM-DD format
4933
- */
4934
- date: string;
4935
- /**
4936
- * Value at this date (in base currency)
4937
- */
4938
- value: string;
4939
- /**
4940
- * Change from previous point
4941
- */
4942
- change?: {
5683
+ } | null;
5684
+ exchange?: {
4943
5685
  [key: string]: unknown;
4944
- };
4945
- /**
4946
- * Multi-currency breakdown for this point
4947
- */
4948
- byCurrency?: Array<CurrencyBalanceDto>;
4949
- };
4950
-
4951
- export type TrendSummaryDto = {
4952
- /**
4953
- * Value at start of period
4954
- */
4955
- startValue: string;
4956
- /**
4957
- * Value at end of period
4958
- */
4959
- endValue: string;
4960
- /**
4961
- * Total change over period
4962
- */
4963
- totalChange: string;
4964
- /**
4965
- * Total change percentage
4966
- */
4967
- totalChangePercentage: string;
4968
- };
4969
-
4970
- export type MultiCurrencyPointDto = {
4971
- /**
4972
- * Date in YYYY-MM-DD format
4973
- */
4974
- date: string;
4975
- /**
4976
- * Balances by currency
4977
- */
4978
- byCurrency: Array<CurrencyBalanceDto>;
4979
- };
4980
-
4981
- export type PortfolioTrendsResponseDto = {
4982
- /**
4983
- * Time series data points
4984
- */
4985
- series: Array<TimeSeriesPointDto>;
4986
- /**
4987
- * Period summary
4988
- */
4989
- summary: TrendSummaryDto;
4990
- /**
4991
- * Period requested
4992
- */
4993
- period: string;
5686
+ } | null;
4994
5687
  /**
4995
- * Data granularity
5688
+ * OpenBB asset_type (e.g. stock, etf)
4996
5689
  */
4997
- granularity: string;
5690
+ assetType?: {
5691
+ [key: string]: unknown;
5692
+ } | null;
4998
5693
  /**
4999
- * Base currency for converted values
5694
+ * IGN asset class (region.types.ts ASSET_CLASSES)
5000
5695
  */
5001
- currency: string;
5696
+ assetClass?: {
5697
+ [key: string]: unknown;
5698
+ } | null;
5002
5699
  /**
5003
- * Multi-currency time series (each point has currency breakdown)
5700
+ * IGN asset sub-class (region.types.ts ASSET_SUB_CLASSES)
5004
5701
  */
5005
- byCurrency?: Array<MultiCurrencyPointDto>;
5702
+ assetSubClass?: {
5703
+ [key: string]: unknown;
5704
+ } | null;
5006
5705
  /**
5007
- * Exchange rate warnings
5706
+ * Trading currency (extra_data or inferred from exchange)
5008
5707
  */
5009
- warnings?: Array<ExchangeRateWarningDto>;
5708
+ currency?: {
5709
+ [key: string]: unknown;
5710
+ } | null;
5010
5711
  };
5011
5712
 
5012
- export type CashFlowPointDto = {
5013
- /**
5014
- * Month key (YYYY-MM)
5015
- */
5016
- month: string;
5713
+ export type SymbolQuoteDto = {
5714
+ symbol?: string;
5715
+ name?: {
5716
+ [key: string]: unknown;
5717
+ } | null;
5718
+ exchange?: {
5719
+ [key: string]: unknown;
5720
+ } | null;
5017
5721
  /**
5018
- * Income in base currency (absolute, converted)
5722
+ * OpenBB asset_type
5019
5723
  */
5020
- income: string;
5724
+ assetType?: {
5725
+ [key: string]: unknown;
5726
+ } | null;
5021
5727
  /**
5022
- * Expense in base currency (absolute, converted)
5728
+ * IGN asset class
5023
5729
  */
5024
- expense: string;
5730
+ assetClass?: {
5731
+ [key: string]: unknown;
5732
+ } | null;
5025
5733
  /**
5026
- * netSavings = income − expense (savings positive)
5734
+ * IGN asset sub-class
5027
5735
  */
5028
- netSavings: string;
5029
- };
5030
-
5031
- export type CashFlowTrendSummaryDto = {
5736
+ assetSubClass?: {
5737
+ [key: string]: unknown;
5738
+ } | null;
5032
5739
  /**
5033
- * Total income across the period
5740
+ * Trading currency (extra_data or inferred from exchange)
5034
5741
  */
5035
- totalIncome: string;
5742
+ currency?: {
5743
+ [key: string]: unknown;
5744
+ } | null;
5036
5745
  /**
5037
- * Total expense across the period
5746
+ * Latest price (Decimal string)
5038
5747
  */
5039
- totalExpense: string;
5748
+ price?: {
5749
+ [key: string]: unknown;
5750
+ } | null;
5040
5751
  /**
5041
- * income − expense across the period
5752
+ * Date the price was observed (ISO yyyy-MM-dd)
5042
5753
  */
5043
- totalNetSavings: string;
5754
+ priceDate?: {
5755
+ [key: string]: unknown;
5756
+ } | null;
5044
5757
  /**
5045
- * totalNetSavings divided by the window length (N months, incl. zero-filled)
5758
+ * 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.
5046
5759
  */
5047
- averageMonthlyNetSavings: string;
5048
- };
5049
-
5050
- export type CashFlowTrendsResponseDto = {
5760
+ changePercent?: {
5761
+ [key: string]: unknown;
5762
+ } | null;
5051
5763
  /**
5052
- * Monthly cash-flow series (fixed N-month window, zero-filled)
5764
+ * Previous close (Decimal string)
5053
5765
  */
5054
- series: Array<CashFlowPointDto>;
5766
+ prevClose?: {
5767
+ [key: string]: unknown;
5768
+ } | null;
5055
5769
  /**
5056
- * Period totals
5770
+ * Day open (Decimal string)
5057
5771
  */
5058
- summary: CashFlowTrendSummaryDto;
5772
+ open?: {
5773
+ [key: string]: unknown;
5774
+ } | null;
5059
5775
  /**
5060
- * Period requested
5776
+ * Day high (Decimal string)
5061
5777
  */
5062
- period: string;
5778
+ high?: {
5779
+ [key: string]: unknown;
5780
+ } | null;
5063
5781
  /**
5064
- * Data granularity (v1 returns month buckets)
5782
+ * Day low (Decimal string)
5065
5783
  */
5066
- granularity: string;
5784
+ low?: {
5785
+ [key: string]: unknown;
5786
+ } | null;
5067
5787
  /**
5068
- * Base currency for converted values
5788
+ * Day volume (Decimal string)
5069
5789
  */
5070
- currency: string;
5790
+ volume?: {
5791
+ [key: string]: unknown;
5792
+ } | null;
5071
5793
  /**
5072
- * Exchange rate warnings (e.g. missing rate for a currency)
5794
+ * 52-week high (Decimal string)
5073
5795
  */
5074
- warnings?: Array<ExchangeRateWarningDto>;
5075
- };
5076
-
5077
- export type GenerateSnapshotBody = unknown;
5078
-
5079
- export type GenerateSnapshotResponse = unknown;
5080
-
5081
- export type BackfillSnapshotsBody = unknown;
5082
-
5083
- export type BackfillSnapshotsResponse = unknown;
5084
-
5085
- export type AnonymousLoginDto = {
5796
+ yearHigh?: {
5797
+ [key: string]: unknown;
5798
+ } | null;
5086
5799
  /**
5087
- * Access token for anonymous login
5800
+ * 52-week low (Decimal string)
5088
5801
  */
5089
- accessToken: string;
5802
+ yearLow?: {
5803
+ [key: string]: unknown;
5804
+ } | null;
5090
5805
  };
5091
5806
 
5092
5807
  export type AccountControllerCreateData = {
@@ -5117,7 +5832,7 @@ export type AccountControllerFindAllData = {
5117
5832
  */
5118
5833
  region: 'cn' | 'us' | 'de' | 'gb';
5119
5834
  /**
5120
- * Search term for path or i18nKey
5835
+ * Search term for account path
5121
5836
  */
5122
5837
  search?: string;
5123
5838
  /**
@@ -5200,6 +5915,21 @@ export type AccountControllerReopenData = {
5200
5915
 
5201
5916
  export type AccountControllerReopenResponse = AccountResponseDto;
5202
5917
 
5918
+ export type AccountControllerAddOpeningBalanceData = {
5919
+ /**
5920
+ * Account UUID
5921
+ */
5922
+ id: string;
5923
+ /**
5924
+ * Region code for tenant context
5925
+ */
5926
+ region: 'cn' | 'us' | 'de' | 'gb';
5927
+ requestBody: CreateOpeningBalanceDto;
5928
+ };
5929
+
5930
+ export type AccountControllerAddOpeningBalanceResponse =
5931
+ OpeningBalanceResultDto;
5932
+
5203
5933
  export type AccountStandardsControllerGetTemplatesData = {
5204
5934
  /**
5205
5935
  * Region code (cn, us, de)
@@ -5260,6 +5990,10 @@ export type TransactionControllerListData = {
5260
5990
  * Filter by account ID (transactions with postings to this account)
5261
5991
  */
5262
5992
  accountId?: string;
5993
+ /**
5994
+ * Filter by ADR-0075 functional category (Group segment); matches any posting to an Expenses/Income account whose derived Group segment equals this value
5995
+ */
5996
+ category?: string;
5263
5997
  /**
5264
5998
  * Filter by start date (inclusive), format: YYYY-MM-DD
5265
5999
  */
@@ -5384,7 +6118,7 @@ export type TransactionControllerDeleteResponse = void;
5384
6118
 
5385
6119
  export type BalanceControllerGetBalanceData = {
5386
6120
  /**
5387
- * Account name (e.g., "Assets:Bank:Checking")
6121
+ * Account name (e.g., "Assets:Checking")
5388
6122
  */
5389
6123
  account: string;
5390
6124
  /**
@@ -5786,6 +6520,103 @@ export type CommodityControllerBulkCreateData = {
5786
6520
 
5787
6521
  export type CommodityControllerBulkCreateResponse = Array<CommodityResponseDto>;
5788
6522
 
6523
+ export type PriceControllerCreateData = {
6524
+ /**
6525
+ * Region code for tenant context
6526
+ */
6527
+ region: 'cn' | 'us' | 'de' | 'gb';
6528
+ requestBody: CreateBeanPriceDto;
6529
+ };
6530
+
6531
+ export type PriceControllerCreateResponse = PriceResponseDto;
6532
+
6533
+ export type PriceControllerFindAllData = {
6534
+ /**
6535
+ * Filter by currency (e.g., BTC, AAPL, USD)
6536
+ */
6537
+ currency?: string;
6538
+ /**
6539
+ * Filter prices from this date (ISO 8601 format)
6540
+ */
6541
+ dateFrom?: string;
6542
+ /**
6543
+ * Filter prices to this date (ISO 8601 format)
6544
+ */
6545
+ dateTo?: string;
6546
+ /**
6547
+ * Number of items per page (default: 20, max: 100)
6548
+ */
6549
+ limit?: number;
6550
+ /**
6551
+ * Page number for pagination (default: 1)
6552
+ */
6553
+ page?: number;
6554
+ /**
6555
+ * Filter by quote currency (pricing currency, e.g., USD, CNY)
6556
+ */
6557
+ quoteCurrency?: string;
6558
+ /**
6559
+ * Region code for tenant context
6560
+ */
6561
+ region: 'cn' | 'us' | 'de' | 'gb';
6562
+ /**
6563
+ * Search term for currency or quoteCurrency (case-insensitive partial match)
6564
+ */
6565
+ search?: string;
6566
+ };
6567
+
6568
+ export type PriceControllerFindAllResponse = PriceListResponseDto;
6569
+
6570
+ export type PriceControllerFindOneData = {
6571
+ /**
6572
+ * Price ID
6573
+ */
6574
+ id: string;
6575
+ /**
6576
+ * Region code for tenant context
6577
+ */
6578
+ region: 'cn' | 'us' | 'de' | 'gb';
6579
+ };
6580
+
6581
+ export type PriceControllerFindOneResponse = PriceResponseDto;
6582
+
6583
+ export type PriceControllerUpdateData = {
6584
+ /**
6585
+ * Price ID
6586
+ */
6587
+ id: string;
6588
+ /**
6589
+ * Region code for tenant context
6590
+ */
6591
+ region: 'cn' | 'us' | 'de' | 'gb';
6592
+ requestBody: UpdateBeanPriceDto;
6593
+ };
6594
+
6595
+ export type PriceControllerUpdateResponse = PriceResponseDto;
6596
+
6597
+ export type PriceControllerDeleteData = {
6598
+ /**
6599
+ * Price ID
6600
+ */
6601
+ id: string;
6602
+ /**
6603
+ * Region code for tenant context
6604
+ */
6605
+ region: 'cn' | 'us' | 'de' | 'gb';
6606
+ };
6607
+
6608
+ export type PriceControllerDeleteResponse = void;
6609
+
6610
+ export type PriceControllerBulkCreateData = {
6611
+ /**
6612
+ * Region code for tenant context
6613
+ */
6614
+ region: 'cn' | 'us' | 'de' | 'gb';
6615
+ requestBody: Array<string>;
6616
+ };
6617
+
6618
+ export type PriceControllerBulkCreateResponse = Array<PriceResponseDto>;
6619
+
5789
6620
  export type RecurringRuleControllerCreateData = {
5790
6621
  /**
5791
6622
  * Region code for tenant context
@@ -5920,104 +6751,252 @@ export type ExpectedTransactionControllerFindOverdueData = {
5920
6751
  region: 'cn' | 'us' | 'de' | 'gb';
5921
6752
  };
5922
6753
 
5923
- export type ExpectedTransactionControllerFindOverdueResponse =
5924
- ExpectedTransactionListResponseDto;
6754
+ export type ExpectedTransactionControllerFindOverdueResponse =
6755
+ ExpectedTransactionListResponseDto;
6756
+
6757
+ export type ExpectedTransactionControllerFindOneData = {
6758
+ /**
6759
+ * Expected transaction ID
6760
+ */
6761
+ id: string;
6762
+ /**
6763
+ * Region code for tenant context
6764
+ */
6765
+ region: 'cn' | 'us' | 'de' | 'gb';
6766
+ };
6767
+
6768
+ export type ExpectedTransactionControllerFindOneResponse =
6769
+ ExpectedTransactionResponseDto;
6770
+
6771
+ export type ExpectedTransactionControllerSkipData = {
6772
+ /**
6773
+ * Expected transaction ID
6774
+ */
6775
+ id: string;
6776
+ /**
6777
+ * Region code for tenant context
6778
+ */
6779
+ region: 'cn' | 'us' | 'de' | 'gb';
6780
+ };
6781
+
6782
+ export type ExpectedTransactionControllerSkipResponse =
6783
+ ExpectedTransactionResponseDto;
6784
+
6785
+ export type ExpectedTransactionControllerUndoSkipData = {
6786
+ /**
6787
+ * Expected transaction ID
6788
+ */
6789
+ id: string;
6790
+ /**
6791
+ * Region code for tenant context
6792
+ */
6793
+ region: 'cn' | 'us' | 'de' | 'gb';
6794
+ };
6795
+
6796
+ export type ExpectedTransactionControllerUndoSkipResponse =
6797
+ ExpectedTransactionResponseDto;
6798
+
6799
+ export type ExpectedTransactionControllerConfirmMatchData = {
6800
+ /**
6801
+ * Expected transaction ID
6802
+ */
6803
+ id: string;
6804
+ /**
6805
+ * Region code for tenant context
6806
+ */
6807
+ region: 'cn' | 'us' | 'de' | 'gb';
6808
+ requestBody: ConfirmMatchDto;
6809
+ };
6810
+
6811
+ export type ExpectedTransactionControllerConfirmMatchResponse = unknown;
6812
+
6813
+ export type ExpectedTransactionControllerUnmatchData = {
6814
+ /**
6815
+ * Expected transaction ID
6816
+ */
6817
+ id: string;
6818
+ /**
6819
+ * Region code for tenant context
6820
+ */
6821
+ region: 'cn' | 'us' | 'de' | 'gb';
6822
+ };
6823
+
6824
+ export type ExpectedTransactionControllerUnmatchResponse = unknown;
6825
+
6826
+ export type ExpectedTransactionControllerEnterNowData = {
6827
+ /**
6828
+ * Expected transaction ID
6829
+ */
6830
+ id: string;
6831
+ /**
6832
+ * Region code for tenant context
6833
+ */
6834
+ region: 'cn' | 'us' | 'de' | 'gb';
6835
+ requestBody: EnterNowDto;
6836
+ };
6837
+
6838
+ export type ExpectedTransactionControllerEnterNowResponse = unknown;
6839
+
6840
+ export type ForecastControllerGetForecastData = {
6841
+ /**
6842
+ * Number of months to forecast (1-12, default 3)
6843
+ */
6844
+ months?: number;
6845
+ /**
6846
+ * Region code for tenant context
6847
+ */
6848
+ region: 'cn' | 'us' | 'de' | 'gb';
6849
+ };
6850
+
6851
+ export type ForecastControllerGetForecastResponse = ForecastResponseDto;
6852
+
6853
+ export type ReportingControllerGetPortfolioTrendsData = {
6854
+ /**
6855
+ * Data granularity
6856
+ */
6857
+ granularity?: 'day' | 'week' | 'month';
6858
+ /**
6859
+ * Time period
6860
+ */
6861
+ period?: '1m' | '3m' | '6m' | '1y';
6862
+ /**
6863
+ * Region code for tenant context
6864
+ */
6865
+ region: 'cn' | 'us' | 'de' | 'gb';
6866
+ };
6867
+
6868
+ export type ReportingControllerGetPortfolioTrendsResponse =
6869
+ PortfolioTrendsResponseDto;
5925
6870
 
5926
- export type ExpectedTransactionControllerFindOneData = {
6871
+ export type ReportingControllerGetCashFlowTrendsData = {
5927
6872
  /**
5928
- * Expected transaction ID
6873
+ * Data granularity (accepted for API symmetry; v1 returns month buckets)
5929
6874
  */
5930
- id: string;
6875
+ granularity?: 'day' | 'week' | 'month';
6876
+ /**
6877
+ * Time period
6878
+ */
6879
+ period?: '1m' | '3m' | '6m' | '1y';
5931
6880
  /**
5932
6881
  * Region code for tenant context
5933
6882
  */
5934
6883
  region: 'cn' | 'us' | 'de' | 'gb';
5935
6884
  };
5936
6885
 
5937
- export type ExpectedTransactionControllerFindOneResponse =
5938
- ExpectedTransactionResponseDto;
6886
+ export type ReportingControllerGetCashFlowTrendsResponse =
6887
+ CashFlowTrendsResponseDto;
5939
6888
 
5940
- export type ExpectedTransactionControllerSkipData = {
5941
- /**
5942
- * Expected transaction ID
5943
- */
5944
- id: string;
6889
+ export type ReportingControllerGenerateSnapshotData = {
5945
6890
  /**
5946
6891
  * Region code for tenant context
5947
6892
  */
5948
6893
  region: 'cn' | 'us' | 'de' | 'gb';
6894
+ /**
6895
+ * Optional date (defaults to today)
6896
+ */
6897
+ requestBody: GenerateSnapshotBody;
5949
6898
  };
5950
6899
 
5951
- export type ExpectedTransactionControllerSkipResponse =
5952
- ExpectedTransactionResponseDto;
6900
+ export type ReportingControllerGenerateSnapshotResponse =
6901
+ GenerateSnapshotResponse;
5953
6902
 
5954
- export type ExpectedTransactionControllerUndoSkipData = {
5955
- /**
5956
- * Expected transaction ID
5957
- */
5958
- id: string;
6903
+ export type ReportingControllerBackfillSnapshotsData = {
5959
6904
  /**
5960
6905
  * Region code for tenant context
5961
6906
  */
5962
6907
  region: 'cn' | 'us' | 'de' | 'gb';
6908
+ requestBody: BackfillSnapshotsBody;
5963
6909
  };
5964
6910
 
5965
- export type ExpectedTransactionControllerUndoSkipResponse =
5966
- ExpectedTransactionResponseDto;
6911
+ export type ReportingControllerBackfillSnapshotsResponse =
6912
+ BackfillSnapshotsResponse;
5967
6913
 
5968
- export type ExpectedTransactionControllerConfirmMatchData = {
6914
+ export type UserControllerDeleteOwnUserData = {
6915
+ requestBody: DeleteOwnUserDto;
6916
+ };
6917
+
6918
+ export type UserControllerDeleteOwnUserResponse = void;
6919
+
6920
+ export type UserControllerGetUserData = {
6921
+ acceptLanguage: string;
6922
+ };
6923
+
6924
+ export type UserControllerGetUserResponse = unknown;
6925
+
6926
+ export type UserControllerSignupUserData = {
6927
+ requestBody: SignupDto;
6928
+ };
6929
+
6930
+ export type UserControllerSignupUserResponse = SignupResponseDto;
6931
+
6932
+ export type UserControllerDeleteUserData = {
5969
6933
  /**
5970
- * Expected transaction ID
6934
+ * User ID to delete
5971
6935
  */
5972
6936
  id: string;
6937
+ };
6938
+
6939
+ export type UserControllerDeleteUserResponse = void;
6940
+
6941
+ export type UserControllerGetUserInfoData = {
5973
6942
  /**
5974
- * Region code for tenant context
6943
+ * User ID
5975
6944
  */
5976
- region: 'cn' | 'us' | 'de' | 'gb';
5977
- requestBody: ConfirmMatchDto;
6945
+ id: string;
5978
6946
  };
5979
6947
 
5980
- export type ExpectedTransactionControllerConfirmMatchResponse = unknown;
6948
+ export type UserControllerGetUserInfoResponse = unknown;
5981
6949
 
5982
- export type ExpectedTransactionControllerUnmatchData = {
6950
+ export type UserControllerUpdateUserSettingData = {
6951
+ requestBody: UpdateUserSettingDto;
6952
+ };
6953
+
6954
+ export type UserControllerUpdateUserSettingResponse = unknown;
6955
+
6956
+ export type UserControllerGetAllUserSettingsByPageData = {
5983
6957
  /**
5984
- * Expected transaction ID
6958
+ * Page number
5985
6959
  */
5986
- id: string;
6960
+ pageNo: number;
5987
6961
  /**
5988
- * Region code for tenant context
6962
+ * Page size
5989
6963
  */
5990
- region: 'cn' | 'us' | 'de' | 'gb';
6964
+ pageSize: number;
5991
6965
  };
5992
6966
 
5993
- export type ExpectedTransactionControllerUnmatchResponse = unknown;
6967
+ export type UserControllerGetAllUserSettingsByPageResponse = unknown;
5994
6968
 
5995
- export type ExpectedTransactionControllerEnterNowData = {
5996
- /**
5997
- * Expected transaction ID
5998
- */
5999
- id: string;
6969
+ export type UserControllerGetAssetLiabilitySummaryResponse = unknown;
6970
+
6971
+ export type PropertyControllerGetAllResponse = unknown;
6972
+
6973
+ export type PropertyControllerGetByKeyData = {
6000
6974
  /**
6001
- * Region code for tenant context
6975
+ * Property key
6002
6976
  */
6003
- region: 'cn' | 'us' | 'de' | 'gb';
6004
- requestBody: EnterNowDto;
6977
+ key: string;
6005
6978
  };
6006
6979
 
6007
- export type ExpectedTransactionControllerEnterNowResponse = unknown;
6980
+ export type PropertyControllerGetByKeyResponse = unknown;
6008
6981
 
6009
- export type ForecastControllerGetForecastData = {
6982
+ export type PropertyControllerUpdateData = {
6010
6983
  /**
6011
- * Number of months to forecast (1-12, default 3)
6984
+ * Property key
6012
6985
  */
6013
- months?: number;
6986
+ key: string;
6987
+ requestBody: UpdatePropertyDto;
6988
+ };
6989
+
6990
+ export type PropertyControllerUpdateResponse = unknown;
6991
+
6992
+ export type PropertyControllerDeleteData = {
6014
6993
  /**
6015
- * Region code for tenant context
6994
+ * Property key
6016
6995
  */
6017
- region: 'cn' | 'us' | 'de' | 'gb';
6996
+ key: string;
6018
6997
  };
6019
6998
 
6020
- export type ForecastControllerGetForecastResponse = ForecastResponseDto;
6999
+ export type PropertyControllerDeleteResponse = void;
6021
7000
 
6022
7001
  export type TransactionRuleControllerCreateData = {
6023
7002
  /**
@@ -6164,93 +7143,6 @@ export type TransactionRuleControllerTestData = {
6164
7143
 
6165
7144
  export type TransactionRuleControllerTestResponse = TestRuleResponseDto;
6166
7145
 
6167
- export type UserControllerDeleteOwnUserData = {
6168
- requestBody: DeleteOwnUserDto;
6169
- };
6170
-
6171
- export type UserControllerDeleteOwnUserResponse = void;
6172
-
6173
- export type UserControllerGetUserData = {
6174
- acceptLanguage: string;
6175
- };
6176
-
6177
- export type UserControllerGetUserResponse = unknown;
6178
-
6179
- export type UserControllerSignupUserData = {
6180
- requestBody: SignupDto;
6181
- };
6182
-
6183
- export type UserControllerSignupUserResponse = unknown;
6184
-
6185
- export type UserControllerDeleteUserData = {
6186
- /**
6187
- * User ID to delete
6188
- */
6189
- id: string;
6190
- };
6191
-
6192
- export type UserControllerDeleteUserResponse = void;
6193
-
6194
- export type UserControllerGetUserInfoData = {
6195
- /**
6196
- * User ID
6197
- */
6198
- id: string;
6199
- };
6200
-
6201
- export type UserControllerGetUserInfoResponse = unknown;
6202
-
6203
- export type UserControllerUpdateUserSettingData = {
6204
- requestBody: UpdateUserSettingDto;
6205
- };
6206
-
6207
- export type UserControllerUpdateUserSettingResponse = unknown;
6208
-
6209
- export type UserControllerGetAllUserSettingsByPageData = {
6210
- /**
6211
- * Page number
6212
- */
6213
- pageNo: number;
6214
- /**
6215
- * Page size
6216
- */
6217
- pageSize: number;
6218
- };
6219
-
6220
- export type UserControllerGetAllUserSettingsByPageResponse = unknown;
6221
-
6222
- export type UserControllerGetAssetLiabilitySummaryResponse = unknown;
6223
-
6224
- export type PropertyControllerGetAllResponse = unknown;
6225
-
6226
- export type PropertyControllerGetByKeyData = {
6227
- /**
6228
- * Property key
6229
- */
6230
- key: string;
6231
- };
6232
-
6233
- export type PropertyControllerGetByKeyResponse = unknown;
6234
-
6235
- export type PropertyControllerUpdateData = {
6236
- /**
6237
- * Property key
6238
- */
6239
- key: string;
6240
- requestBody: UpdatePropertyDto;
6241
- };
6242
-
6243
- export type PropertyControllerUpdateResponse = unknown;
6244
-
6245
- export type PropertyControllerDeleteData = {
6246
- /**
6247
- * Property key
6248
- */
6249
- key: string;
6250
- };
6251
-
6252
- export type PropertyControllerDeleteResponse = void;
6253
-
6254
7146
  export type EventControllerCreateData = {
6255
7147
  /**
6256
7148
  * Region code for tenant context (decorative for life events)
@@ -6305,49 +7197,104 @@ export type EventControllerFindOneData = {
6305
7197
  region: 'cn' | 'us' | 'de' | 'gb';
6306
7198
  };
6307
7199
 
6308
- export type EventControllerFindOneResponse = EventResponseDto;
7200
+ export type EventControllerFindOneResponse = EventResponseDto;
7201
+
7202
+ export type EventControllerUpdateData = {
7203
+ /**
7204
+ * Life event ID
7205
+ */
7206
+ id: string;
7207
+ /**
7208
+ * Region code for tenant context (decorative for life events)
7209
+ */
7210
+ region: 'cn' | 'us' | 'de' | 'gb';
7211
+ requestBody: UpdateBeanEventDto;
7212
+ };
7213
+
7214
+ export type EventControllerUpdateResponse = EventResponseDto;
7215
+
7216
+ export type EventControllerDeleteData = {
7217
+ /**
7218
+ * Life event ID
7219
+ */
7220
+ id: string;
7221
+ /**
7222
+ * Region code for tenant context (decorative for life events)
7223
+ */
7224
+ region: 'cn' | 'us' | 'de' | 'gb';
7225
+ };
7226
+
7227
+ export type EventControllerDeleteResponse = void;
7228
+
7229
+ export type EventControllerGetSliceData = {
7230
+ accountPattern: string;
7231
+ granularity: string;
7232
+ /**
7233
+ * Life event ID
7234
+ */
7235
+ id: string;
7236
+ /**
7237
+ * Region code for tenant context (decorative for life events)
7238
+ */
7239
+ region: 'cn' | 'us' | 'de' | 'gb';
7240
+ };
7241
+
7242
+ export type EventControllerGetSliceResponse = unknown;
6309
7243
 
6310
- export type EventControllerUpdateData = {
7244
+ export type OnboardingControllerBootstrapData = {
6311
7245
  /**
6312
- * Life event ID
7246
+ * Region code for tenant context
6313
7247
  */
6314
- id: string;
7248
+ region: 'cn' | 'us' | 'de' | 'gb';
7249
+ requestBody: OnboardingDto;
7250
+ };
7251
+
7252
+ export type OnboardingControllerBootstrapResponse = unknown;
7253
+
7254
+ export type ReconciliationControllerComputeData = {
6315
7255
  /**
6316
- * Region code for tenant context (decorative for life events)
7256
+ * Region code for tenant context (decorative for reconciliation)
6317
7257
  */
6318
7258
  region: 'cn' | 'us' | 'de' | 'gb';
6319
- requestBody: UpdateBeanEventDto;
7259
+ requestBody: ComputeReconciliationDto;
6320
7260
  };
6321
7261
 
6322
- export type EventControllerUpdateResponse = EventResponseDto;
7262
+ export type ReconciliationControllerComputeResponse =
7263
+ ReconciliationComputeResultDto;
6323
7264
 
6324
- export type EventControllerDeleteData = {
7265
+ export type ReconciliationControllerAssertData = {
6325
7266
  /**
6326
- * Life event ID
7267
+ * Region code for tenant context (decorative for reconciliation)
6327
7268
  */
6328
- id: string;
7269
+ region: 'cn' | 'us' | 'de' | 'gb';
7270
+ requestBody: AssertReconciliationDto;
7271
+ };
7272
+
7273
+ export type ReconciliationControllerAssertResponse = ReconciliationRecordDto;
7274
+
7275
+ export type ReconciliationControllerPadData = {
6329
7276
  /**
6330
- * Region code for tenant context (decorative for life events)
7277
+ * Region code for tenant context (decorative for reconciliation)
6331
7278
  */
6332
7279
  region: 'cn' | 'us' | 'de' | 'gb';
7280
+ requestBody: PadReconciliationDto;
6333
7281
  };
6334
7282
 
6335
- export type EventControllerDeleteResponse = void;
7283
+ export type ReconciliationControllerPadResponse = PadResultDto;
6336
7284
 
6337
- export type EventControllerGetSliceData = {
6338
- accountPattern: string;
6339
- granularity: string;
7285
+ export type ReconciliationControllerHistoryData = {
6340
7286
  /**
6341
- * Life event ID
7287
+ * BeanAccount id
6342
7288
  */
6343
- id: string;
7289
+ accountId: string;
6344
7290
  /**
6345
- * Region code for tenant context (decorative for life events)
7291
+ * Region code for tenant context (decorative for reconciliation)
6346
7292
  */
6347
7293
  region: 'cn' | 'us' | 'de' | 'gb';
6348
7294
  };
6349
7295
 
6350
- export type EventControllerGetSliceResponse = unknown;
7296
+ export type ReconciliationControllerHistoryResponse =
7297
+ Array<ReconciliationRecordDto>;
6351
7298
 
6352
7299
  export type ExportControllerExportBeancountResponse = unknown;
6353
7300
 
@@ -6441,48 +7388,6 @@ export type ImporterConfigControllerResetConfigData = {
6441
7388
 
6442
7389
  export type ImporterConfigControllerResetConfigResponse = ImporterConfigDto;
6443
7390
 
6444
- export type PlatformControllerFindAllResponse = unknown;
6445
-
6446
- export type PlatformControllerCreateData = {
6447
- requestBody: CreatePlatformDto;
6448
- };
6449
-
6450
- export type PlatformControllerCreateResponse = unknown;
6451
-
6452
- export type PlatformControllerGetPlatformListResponse = unknown;
6453
-
6454
- export type PlatformControllerMatchPlatformsData = {
6455
- /**
6456
- * Search query — Chinese name, English name, or abbreviation
6457
- */
6458
- q: string;
6459
- /**
6460
- * Region code for category override lookup
6461
- */
6462
- region?: string;
6463
- };
6464
-
6465
- export type PlatformControllerMatchPlatformsResponse = unknown;
6466
-
6467
- export type PlatformControllerUpdateData = {
6468
- /**
6469
- * Platform ID
6470
- */
6471
- id: string;
6472
- requestBody: UpdatePlatformDto;
6473
- };
6474
-
6475
- export type PlatformControllerUpdateResponse = unknown;
6476
-
6477
- export type PlatformControllerDeleteData = {
6478
- /**
6479
- * Platform ID
6480
- */
6481
- id: string;
6482
- };
6483
-
6484
- export type PlatformControllerDeleteResponse = void;
6485
-
6486
7391
  export type ProviderSyncControllerSyncData = {
6487
7392
  /**
6488
7393
  * Provider name
@@ -6528,6 +7433,49 @@ export type ProviderSyncControllerIsProviderSupportedData = {
6528
7433
 
6529
7434
  export type ProviderSyncControllerIsProviderSupportedResponse = unknown;
6530
7435
 
7436
+ export type ExternalAccountLinkControllerCreateData = {
7437
+ /**
7438
+ * Region code for tenant context
7439
+ */
7440
+ region: 'cn' | 'us' | 'de' | 'gb';
7441
+ requestBody: CreateExternalAccountLinkDto;
7442
+ };
7443
+
7444
+ export type ExternalAccountLinkControllerCreateResponse =
7445
+ ExternalAccountLinkResponseDto;
7446
+
7447
+ export type ExternalAccountLinkControllerFindAllData = {
7448
+ provider: string;
7449
+ /**
7450
+ * Region code for tenant context
7451
+ */
7452
+ region: 'cn' | 'us' | 'de' | 'gb';
7453
+ };
7454
+
7455
+ export type ExternalAccountLinkControllerFindAllResponse =
7456
+ ExternalAccountLinkListResponseDto;
7457
+
7458
+ export type ExternalAccountLinkControllerFindOneData = {
7459
+ id: string;
7460
+ /**
7461
+ * Region code for tenant context
7462
+ */
7463
+ region: 'cn' | 'us' | 'de' | 'gb';
7464
+ };
7465
+
7466
+ export type ExternalAccountLinkControllerFindOneResponse =
7467
+ ExternalAccountLinkResponseDto;
7468
+
7469
+ export type ExternalAccountLinkControllerRemoveData = {
7470
+ id: string;
7471
+ /**
7472
+ * Region code for tenant context
7473
+ */
7474
+ region: 'cn' | 'us' | 'de' | 'gb';
7475
+ };
7476
+
7477
+ export type ExternalAccountLinkControllerRemoveResponse = void;
7478
+
6531
7479
  export type TelemetryControllerReportTelemetryData = {
6532
7480
  /**
6533
7481
  * Region code for tenant context
@@ -6600,203 +7548,114 @@ export type NlpControllerGetSessionData = {
6600
7548
 
6601
7549
  export type NlpControllerGetSessionResponse = unknown;
6602
7550
 
6603
- export type DashboardControllerGetNetWorthData = {
6604
- /**
6605
- * Date for balance calculation (ISO 8601 format)
6606
- */
6607
- date?: string;
6608
- /**
6609
- * Region code for tenant context
6610
- */
6611
- region: 'cn' | 'us' | 'de' | 'gb';
6612
- };
6613
-
6614
- export type DashboardControllerGetNetWorthResponse = NetWorthResponseDto;
7551
+ export type PlatformControllerFindAllResponse = unknown;
6615
7552
 
6616
- export type DashboardControllerGetAccountsData = {
6617
- /**
6618
- * Scope to a single account (only valid with groupBy=holdingAssetClass, ADR-0105 §6)
6619
- */
6620
- accountId?: string;
6621
- /**
6622
- * Date for balance calculation (ISO 8601 format)
6623
- */
6624
- date?: string;
6625
- /**
6626
- * Grouping strategy
6627
- */
6628
- groupBy?:
6629
- | 'platform'
6630
- | 'assetClass'
6631
- | 'holdingAssetClass'
6632
- | 'holdingAssetClassByAccount';
6633
- /**
6634
- * Region code for tenant context
6635
- */
6636
- region: 'cn' | 'us' | 'de' | 'gb';
7553
+ export type PlatformControllerCreateData = {
7554
+ requestBody: CreatePlatformDto;
6637
7555
  };
6638
7556
 
6639
- export type DashboardControllerGetAccountsResponse =
6640
- | AccountsResponseDto
6641
- | AssetClassAccountsResponseDto
6642
- | HoldingAssetClassCrossAccountResponseDto;
6643
-
6644
- export type DashboardControllerGetCashFlowData = {
6645
- /**
6646
- * Period in YYYY-MM format
6647
- */
6648
- period: string;
6649
- /**
6650
- * Region code for tenant context
6651
- */
6652
- region: 'cn' | 'us' | 'de' | 'gb';
6653
- };
7557
+ export type PlatformControllerCreateResponse = unknown;
6654
7558
 
6655
- export type DashboardControllerGetCashFlowResponse = CashFlowResponseDto;
7559
+ export type PlatformControllerGetPlatformListResponse =
7560
+ Array<PlatformListItemDto>;
6656
7561
 
6657
- export type HoldingPnlControllerGetHoldingPnlData = {
6658
- /**
6659
- * Scope to a single account
6660
- */
6661
- accountId?: string;
6662
- /**
6663
- * As-of date (ISO 8601), defaults to today
6664
- */
6665
- asOf?: string;
6666
- /**
6667
- * Realized-P&L lot-matching method (default average). Does not affect the average-cost unrealized basis.
6668
- */
6669
- method?: 'FIFO' | 'average';
7562
+ export type PlatformControllerMatchPlatformsData = {
6670
7563
  /**
6671
- * Region code for tenant context
7564
+ * Search query — Chinese name, English name, or abbreviation
6672
7565
  */
6673
- region: 'cn' | 'us' | 'de' | 'gb';
6674
- };
6675
-
6676
- export type HoldingPnlControllerGetHoldingPnlResponse = HoldingPnlResponseDto;
6677
-
6678
- export type PriceControllerCreateData = {
7566
+ q: string;
6679
7567
  /**
6680
- * Region code for tenant context
7568
+ * Region code for category override lookup
6681
7569
  */
6682
- region: 'cn' | 'us' | 'de' | 'gb';
6683
- requestBody: CreateBeanPriceDto;
7570
+ region?: string;
6684
7571
  };
6685
7572
 
6686
- export type PriceControllerCreateResponse = PriceResponseDto;
7573
+ export type PlatformControllerMatchPlatformsResponse = PlatformMatchResponseDto;
6687
7574
 
6688
- export type PriceControllerFindAllData = {
6689
- /**
6690
- * Filter by currency (e.g., BTC, AAPL, USD)
6691
- */
6692
- currency?: string;
6693
- /**
6694
- * Filter prices from this date (ISO 8601 format)
6695
- */
6696
- dateFrom?: string;
6697
- /**
6698
- * Filter prices to this date (ISO 8601 format)
6699
- */
6700
- dateTo?: string;
6701
- /**
6702
- * Number of items per page (default: 20, max: 100)
6703
- */
6704
- limit?: number;
6705
- /**
6706
- * Page number for pagination (default: 1)
6707
- */
6708
- page?: number;
6709
- /**
6710
- * Filter by quote currency (pricing currency, e.g., USD, CNY)
6711
- */
6712
- quoteCurrency?: string;
6713
- /**
6714
- * Region code for tenant context
6715
- */
6716
- region: 'cn' | 'us' | 'de' | 'gb';
7575
+ export type PlatformControllerUpdateData = {
6717
7576
  /**
6718
- * Search term for currency or quoteCurrency (case-insensitive partial match)
7577
+ * Platform ID
6719
7578
  */
6720
- search?: string;
7579
+ id: string;
7580
+ requestBody: UpdatePlatformDto;
6721
7581
  };
6722
7582
 
6723
- export type PriceControllerFindAllResponse = PriceListResponseDto;
7583
+ export type PlatformControllerUpdateResponse = unknown;
6724
7584
 
6725
- export type PriceControllerFindOneData = {
7585
+ export type PlatformControllerDeleteData = {
6726
7586
  /**
6727
- * Price ID
7587
+ * Platform ID
6728
7588
  */
6729
7589
  id: string;
6730
- /**
6731
- * Region code for tenant context
6732
- */
6733
- region: 'cn' | 'us' | 'de' | 'gb';
6734
7590
  };
6735
7591
 
6736
- export type PriceControllerFindOneResponse = PriceResponseDto;
7592
+ export type PlatformControllerDeleteResponse = void;
6737
7593
 
6738
- export type PriceControllerUpdateData = {
7594
+ export type DashboardControllerGetNetWorthData = {
6739
7595
  /**
6740
- * Price ID
7596
+ * Date for balance calculation (ISO 8601 format)
6741
7597
  */
6742
- id: string;
7598
+ date?: string;
6743
7599
  /**
6744
7600
  * Region code for tenant context
6745
7601
  */
6746
7602
  region: 'cn' | 'us' | 'de' | 'gb';
6747
- requestBody: UpdateBeanPriceDto;
6748
7603
  };
6749
7604
 
6750
- export type PriceControllerUpdateResponse = PriceResponseDto;
7605
+ export type DashboardControllerGetNetWorthResponse = NetWorthResponseDto;
6751
7606
 
6752
- export type PriceControllerDeleteData = {
7607
+ export type DashboardControllerGetAccountsData = {
6753
7608
  /**
6754
- * Price ID
7609
+ * Scope to a single account (only valid with groupBy=holdingAssetClass, ADR-0105 §6)
6755
7610
  */
6756
- id: string;
7611
+ accountId?: string;
6757
7612
  /**
6758
- * Region code for tenant context
6759
- */
6760
- region: 'cn' | 'us' | 'de' | 'gb';
6761
- };
6762
-
6763
- export type PriceControllerDeleteResponse = void;
6764
-
6765
- export type PriceControllerBulkCreateData = {
7613
+ * Date for balance calculation (ISO 8601 format)
7614
+ */
7615
+ date?: string;
7616
+ /**
7617
+ * Grouping strategy
7618
+ */
7619
+ groupBy?:
7620
+ | 'platform'
7621
+ | 'assetClass'
7622
+ | 'holdingAssetClass'
7623
+ | 'holdingAssetClassByAccount';
6766
7624
  /**
6767
7625
  * Region code for tenant context
6768
7626
  */
6769
7627
  region: 'cn' | 'us' | 'de' | 'gb';
6770
- requestBody: Array<string>;
6771
7628
  };
6772
7629
 
6773
- export type PriceControllerBulkCreateResponse = Array<PriceResponseDto>;
7630
+ export type DashboardControllerGetAccountsResponse =
7631
+ | AccountsResponseDto
7632
+ | AssetClassAccountsResponseDto
7633
+ | HoldingAssetClassCrossAccountResponseDto;
6774
7634
 
6775
- export type ReportingControllerGetPortfolioTrendsData = {
6776
- /**
6777
- * Data granularity
6778
- */
6779
- granularity?: 'day' | 'week' | 'month';
7635
+ export type DashboardControllerGetCashFlowData = {
6780
7636
  /**
6781
- * Time period
7637
+ * Period in YYYY-MM format
6782
7638
  */
6783
- period?: '1m' | '3m' | '6m' | '1y';
7639
+ period: string;
6784
7640
  /**
6785
7641
  * Region code for tenant context
6786
7642
  */
6787
7643
  region: 'cn' | 'us' | 'de' | 'gb';
6788
7644
  };
6789
7645
 
6790
- export type ReportingControllerGetPortfolioTrendsResponse =
6791
- PortfolioTrendsResponseDto;
7646
+ export type DashboardControllerGetCashFlowResponse = CashFlowResponseDto;
6792
7647
 
6793
- export type ReportingControllerGetCashFlowTrendsData = {
7648
+ export type DashboardControllerGetExpensesData = {
6794
7649
  /**
6795
- * Data granularity (accepted for API symmetry; v1 returns month buckets)
7650
+ * Account root to aggregate (expense → ^Expenses:, income → ^Income:)
6796
7651
  */
6797
- granularity?: 'day' | 'week' | 'month';
7652
+ flow?: 'expense' | 'income';
6798
7653
  /**
6799
- * Time period
7654
+ * Grouping strategy
7655
+ */
7656
+ groupBy?: 'category';
7657
+ /**
7658
+ * Time window (1m = current calendar month)
6800
7659
  */
6801
7660
  period?: '1m' | '3m' | '6m' | '1y';
6802
7661
  /**
@@ -6805,33 +7664,29 @@ export type ReportingControllerGetCashFlowTrendsData = {
6805
7664
  region: 'cn' | 'us' | 'de' | 'gb';
6806
7665
  };
6807
7666
 
6808
- export type ReportingControllerGetCashFlowTrendsResponse =
6809
- CashFlowTrendsResponseDto;
7667
+ export type DashboardControllerGetExpensesResponse =
7668
+ ExpensesByCategoryResponseDto;
6810
7669
 
6811
- export type ReportingControllerGenerateSnapshotData = {
7670
+ export type HoldingPnlControllerGetHoldingPnlData = {
6812
7671
  /**
6813
- * Region code for tenant context
7672
+ * Scope to a single account
6814
7673
  */
6815
- region: 'cn' | 'us' | 'de' | 'gb';
7674
+ accountId?: string;
6816
7675
  /**
6817
- * Optional date (defaults to today)
7676
+ * As-of date (ISO 8601), defaults to today
6818
7677
  */
6819
- requestBody: GenerateSnapshotBody;
6820
- };
6821
-
6822
- export type ReportingControllerGenerateSnapshotResponse =
6823
- GenerateSnapshotResponse;
6824
-
6825
- export type ReportingControllerBackfillSnapshotsData = {
7678
+ asOf?: string;
7679
+ /**
7680
+ * Realized-P&L lot-matching method (default average). Does not affect the average-cost unrealized basis.
7681
+ */
7682
+ method?: 'FIFO' | 'average';
6826
7683
  /**
6827
7684
  * Region code for tenant context
6828
7685
  */
6829
7686
  region: 'cn' | 'us' | 'de' | 'gb';
6830
- requestBody: BackfillSnapshotsBody;
6831
7687
  };
6832
7688
 
6833
- export type ReportingControllerBackfillSnapshotsResponse =
6834
- BackfillSnapshotsResponse;
7689
+ export type HoldingPnlControllerGetHoldingPnlResponse = HoldingPnlResponseDto;
6835
7690
 
6836
7691
  export type ApiKeysControllerCreateApiKeyResponse = unknown;
6837
7692
 
@@ -6839,7 +7694,7 @@ export type AuthControllerAccessTokenLoginData = {
6839
7694
  requestBody: AnonymousLoginDto;
6840
7695
  };
6841
7696
 
6842
- export type AuthControllerAccessTokenLoginResponse = unknown;
7697
+ export type AuthControllerAccessTokenLoginResponse = AnonymousLoginResponseDto;
6843
7698
 
6844
7699
  export type CacheControllerFlushCacheResponse = unknown;
6845
7700
 
@@ -6879,6 +7734,33 @@ export type HealthControllerGetMetricsResponse = unknown;
6879
7734
 
6880
7735
  export type InfoControllerGetInfoResponse = unknown;
6881
7736
 
7737
+ export type SymbolControllerSearchData = {
7738
+ /**
7739
+ * Filter by OpenBB asset_type (e.g. stock, etf)
7740
+ */
7741
+ assetType?: string;
7742
+ /**
7743
+ * Filter by exchange code (e.g. US, HK, SS, SZ)
7744
+ */
7745
+ exchange?: string;
7746
+ /**
7747
+ * Maximum number of results (clamped 1..50)
7748
+ */
7749
+ limit?: number;
7750
+ /**
7751
+ * Search term — matched against symbol and instrument name. Empty string returns [].
7752
+ */
7753
+ q: string;
7754
+ };
7755
+
7756
+ export type SymbolControllerSearchResponse = Array<SymbolSearchResultDto>;
7757
+
7758
+ export type SymbolControllerGetQuoteData = {
7759
+ symbol: string;
7760
+ };
7761
+
7762
+ export type SymbolControllerGetQuoteResponse = SymbolQuoteDto;
7763
+
6882
7764
  export type $OpenApiTs = {
6883
7765
  '/api/v1/{region}/bean/accounts': {
6884
7766
  post: {
@@ -6943,7 +7825,7 @@ export type $OpenApiTs = {
6943
7825
  */
6944
7826
  404: unknown;
6945
7827
  /**
6946
- * Account has transactions and cannot be deleted
7828
+ * Account has active transactions and cannot be deleted
6947
7829
  */
6948
7830
  409: unknown;
6949
7831
  };
@@ -6987,6 +7869,25 @@ export type $OpenApiTs = {
6987
7869
  };
6988
7870
  };
6989
7871
  };
7872
+ '/api/v1/{region}/bean/accounts/{id}/opening-balance': {
7873
+ post: {
7874
+ req: AccountControllerAddOpeningBalanceData;
7875
+ res: {
7876
+ /**
7877
+ * Opening-balance transaction created
7878
+ */
7879
+ 201: OpeningBalanceResultDto;
7880
+ /**
7881
+ * Account not found
7882
+ */
7883
+ 404: unknown;
7884
+ /**
7885
+ * An opening balance already exists for this account
7886
+ */
7887
+ 409: unknown;
7888
+ };
7889
+ };
7890
+ };
6990
7891
  '/api/v1/{region}/bean/account-standards': {
6991
7892
  get: {
6992
7893
  req: AccountStandardsControllerGetTemplatesData;
@@ -7595,6 +8496,90 @@ export type $OpenApiTs = {
7595
8496
  };
7596
8497
  };
7597
8498
  };
8499
+ '/api/v1/{region}/bean/prices': {
8500
+ post: {
8501
+ req: PriceControllerCreateData;
8502
+ res: {
8503
+ /**
8504
+ * Price created successfully
8505
+ */
8506
+ 201: PriceResponseDto;
8507
+ /**
8508
+ * Currency or quoteCurrency commodity not found
8509
+ */
8510
+ 404: unknown;
8511
+ /**
8512
+ * Price already exists for this currency pair and date
8513
+ */
8514
+ 409: unknown;
8515
+ };
8516
+ };
8517
+ get: {
8518
+ req: PriceControllerFindAllData;
8519
+ res: {
8520
+ /**
8521
+ * Prices retrieved successfully
8522
+ */
8523
+ 200: PriceListResponseDto;
8524
+ };
8525
+ };
8526
+ };
8527
+ '/api/v1/{region}/bean/prices/{id}': {
8528
+ get: {
8529
+ req: PriceControllerFindOneData;
8530
+ res: {
8531
+ /**
8532
+ * Price retrieved successfully
8533
+ */
8534
+ 200: PriceResponseDto;
8535
+ /**
8536
+ * Price not found
8537
+ */
8538
+ 404: unknown;
8539
+ };
8540
+ };
8541
+ put: {
8542
+ req: PriceControllerUpdateData;
8543
+ res: {
8544
+ /**
8545
+ * Price updated successfully
8546
+ */
8547
+ 200: PriceResponseDto;
8548
+ /**
8549
+ * Price not found
8550
+ */
8551
+ 404: unknown;
8552
+ /**
8553
+ * Updated price conflicts with existing price
8554
+ */
8555
+ 409: unknown;
8556
+ };
8557
+ };
8558
+ delete: {
8559
+ req: PriceControllerDeleteData;
8560
+ res: {
8561
+ /**
8562
+ * Price deleted successfully
8563
+ */
8564
+ 204: void;
8565
+ /**
8566
+ * Price not found
8567
+ */
8568
+ 404: unknown;
8569
+ };
8570
+ };
8571
+ };
8572
+ '/api/v1/{region}/bean/prices/bulk': {
8573
+ post: {
8574
+ req: PriceControllerBulkCreateData;
8575
+ res: {
8576
+ /**
8577
+ * Prices created successfully
8578
+ */
8579
+ 201: Array<PriceResponseDto>;
8580
+ };
8581
+ };
8582
+ };
7598
8583
  '/api/v1/{region}/bean/recurring-rules': {
7599
8584
  post: {
7600
8585
  req: RecurringRuleControllerCreateData;
@@ -7845,397 +8830,469 @@ export type $OpenApiTs = {
7845
8830
  };
7846
8831
  };
7847
8832
  };
7848
- '/api/v1/{region}/bean/transaction-rules': {
8833
+ '/api/v1/{region}/reporting/portfolio/trends': {
8834
+ get: {
8835
+ req: ReportingControllerGetPortfolioTrendsData;
8836
+ res: {
8837
+ /**
8838
+ * Trends retrieved successfully
8839
+ */
8840
+ 200: PortfolioTrendsResponseDto;
8841
+ /**
8842
+ * User not authenticated
8843
+ */
8844
+ 401: unknown;
8845
+ };
8846
+ };
8847
+ };
8848
+ '/api/v1/{region}/reporting/cash-flow/trends': {
8849
+ get: {
8850
+ req: ReportingControllerGetCashFlowTrendsData;
8851
+ res: {
8852
+ /**
8853
+ * Cash-flow trends retrieved successfully
8854
+ */
8855
+ 200: CashFlowTrendsResponseDto;
8856
+ /**
8857
+ * User not authenticated
8858
+ */
8859
+ 401: unknown;
8860
+ };
8861
+ };
8862
+ };
8863
+ '/api/v1/{region}/reporting/snapshots/generate': {
7849
8864
  post: {
7850
- req: TransactionRuleControllerCreateData;
8865
+ req: ReportingControllerGenerateSnapshotData;
7851
8866
  res: {
7852
8867
  /**
7853
- * Rule updated successfully (upsert mode)
8868
+ * Snapshot generated successfully
7854
8869
  */
7855
- 200: TransactionRuleResponseDto;
8870
+ 200: GenerateSnapshotResponse;
7856
8871
  /**
7857
- * Validation failed
8872
+ * Invalid date format
7858
8873
  */
7859
- 400: ApiProblemResponseDto;
8874
+ 400: unknown;
7860
8875
  /**
7861
- * Unauthorized
8876
+ * User not authenticated
7862
8877
  */
7863
- 401: ApiProblemResponseDto;
8878
+ 401: unknown;
8879
+ };
8880
+ };
8881
+ };
8882
+ '/api/v1/{region}/reporting/snapshots/backfill': {
8883
+ post: {
8884
+ req: ReportingControllerBackfillSnapshotsData;
8885
+ res: {
8886
+ /**
8887
+ * Backfill completed successfully
8888
+ */
8889
+ 200: BackfillSnapshotsResponse;
8890
+ /**
8891
+ * Invalid date format or range
8892
+ */
8893
+ 400: unknown;
8894
+ /**
8895
+ * User not authenticated
8896
+ */
8897
+ 401: unknown;
8898
+ /**
8899
+ * Backfill already in progress for this user
8900
+ */
8901
+ 409: unknown;
8902
+ };
8903
+ };
8904
+ };
8905
+ '/api/v1/users': {
8906
+ delete: {
8907
+ req: UserControllerDeleteOwnUserData;
8908
+ res: {
8909
+ /**
8910
+ * User deleted successfully
8911
+ */
8912
+ 204: void;
7864
8913
  /**
7865
- * Resource conflict - another process is updating this rule
8914
+ * Invalid access token
7866
8915
  */
7867
- 409: ApiProblemResponseDto;
8916
+ 403: unknown;
7868
8917
  };
7869
8918
  };
7870
8919
  get: {
7871
- req: TransactionRuleControllerListData;
8920
+ req: UserControllerGetUserData;
7872
8921
  res: {
7873
8922
  /**
7874
- * List of rules
7875
- */
7876
- 200: TransactionRuleListResponseDto;
7877
- /**
7878
- * Unauthorized
8923
+ * User retrieved successfully
7879
8924
  */
7880
- 401: ApiProblemResponseDto;
8925
+ 200: unknown;
7881
8926
  };
7882
8927
  };
7883
- };
7884
- '/api/v1/{region}/bean/transaction-rules/validate': {
7885
8928
  post: {
7886
- req: TransactionRuleControllerValidateData;
8929
+ req: UserControllerSignupUserData;
7887
8930
  res: {
7888
8931
  /**
7889
- * Validation result
8932
+ * User created successfully
7890
8933
  */
7891
- 200: ValidateRuleResponseDto;
8934
+ 201: SignupResponseDto;
7892
8935
  /**
7893
- * Validation failed
8936
+ * Invalid Turnstile token (when Turnstile is enabled)
7894
8937
  */
7895
- 400: ApiProblemResponseDto;
8938
+ 400: unknown;
7896
8939
  /**
7897
- * Unauthorized
8940
+ * User signup is disabled
7898
8941
  */
7899
- 401: ApiProblemResponseDto;
8942
+ 403: unknown;
7900
8943
  };
7901
8944
  };
7902
8945
  };
7903
- '/api/v1/{region}/bean/transaction-rules/bulk': {
7904
- post: {
7905
- req: TransactionRuleControllerBulkCreateData;
8946
+ '/api/v1/users/{id}': {
8947
+ delete: {
8948
+ req: UserControllerDeleteUserData;
7906
8949
  res: {
7907
8950
  /**
7908
- * Bulk create completed
7909
- */
7910
- 201: BulkCreateRulesResponseDto;
7911
- /**
7912
- * Invalid bulk create data
8951
+ * User deleted successfully
7913
8952
  */
7914
- 400: ApiProblemResponseDto;
8953
+ 204: void;
7915
8954
  /**
7916
- * Unauthorized
8955
+ * Cannot delete own account or insufficient permissions
7917
8956
  */
7918
- 401: ApiProblemResponseDto;
8957
+ 403: unknown;
7919
8958
  };
7920
8959
  };
7921
8960
  };
7922
- '/api/v1/{region}/bean/transaction-rules/export/{format}': {
8961
+ '/api/v1/users/{id}/info': {
7923
8962
  get: {
7924
- req: TransactionRuleControllerExportData;
8963
+ req: UserControllerGetUserInfoData;
7925
8964
  res: {
7926
8965
  /**
7927
- * Exported rules
7928
- */
7929
- 200: ExportRulesResponseDto;
7930
- /**
7931
- * Unsupported format
8966
+ * User info retrieved successfully
7932
8967
  */
7933
- 400: ApiProblemResponseDto;
8968
+ 200: unknown;
7934
8969
  /**
7935
- * Unauthorized
8970
+ * Cannot access other user info without admin permission
7936
8971
  */
7937
- 401: ApiProblemResponseDto;
8972
+ 403: unknown;
7938
8973
  };
7939
8974
  };
7940
8975
  };
7941
- '/api/v1/{region}/bean/transaction-rules/statistics/{period}': {
7942
- get: {
7943
- req: TransactionRuleControllerGetStatisticsData;
8976
+ '/api/v1/users/setting': {
8977
+ put: {
8978
+ req: UserControllerUpdateUserSettingData;
7944
8979
  res: {
7945
8980
  /**
7946
- * Rule statistics
8981
+ * Settings updated successfully
7947
8982
  */
7948
- 200: RuleStatisticsResponseDto;
8983
+ 200: unknown;
7949
8984
  /**
7950
- * Unauthorized
8985
+ * Insufficient permissions
7951
8986
  */
7952
- 401: ApiProblemResponseDto;
8987
+ 403: unknown;
7953
8988
  };
7954
8989
  };
7955
8990
  };
7956
- '/api/v1/{region}/bean/transaction-rules/{ruleId}': {
8991
+ '/api/v1/users/settings-by-page': {
7957
8992
  get: {
7958
- req: TransactionRuleControllerGetDetailData;
8993
+ req: UserControllerGetAllUserSettingsByPageData;
7959
8994
  res: {
7960
8995
  /**
7961
- * Rule details
7962
- */
7963
- 200: TransactionRuleResponseDto;
7964
- /**
7965
- * Unauthorized
7966
- */
7967
- 401: ApiProblemResponseDto;
7968
- /**
7969
- * Forbidden - not owner of rule
7970
- */
7971
- 403: ApiProblemResponseDto;
7972
- /**
7973
- * Rule not found
8996
+ * Settings list retrieved successfully
7974
8997
  */
7975
- 404: ApiProblemResponseDto;
8998
+ 200: unknown;
7976
8999
  };
7977
9000
  };
7978
- put: {
7979
- req: TransactionRuleControllerUpdateData;
9001
+ };
9002
+ '/api/v1/users/asset-liability-summary': {
9003
+ get: {
7980
9004
  res: {
7981
9005
  /**
7982
- * Rule updated successfully
9006
+ * Summary retrieved successfully
7983
9007
  */
7984
- 200: TransactionRuleResponseDto;
9008
+ 200: unknown;
9009
+ };
9010
+ };
9011
+ };
9012
+ '/api/v1/admin/properties': {
9013
+ get: {
9014
+ res: {
7985
9015
  /**
7986
- * Validation failed
9016
+ * Properties retrieved successfully
7987
9017
  */
7988
- 400: ApiProblemResponseDto;
9018
+ 200: unknown;
7989
9019
  /**
7990
9020
  * Unauthorized
7991
9021
  */
7992
- 401: ApiProblemResponseDto;
7993
- /**
7994
- * Forbidden - not owner of rule
7995
- */
7996
- 403: ApiProblemResponseDto;
7997
- /**
7998
- * Rule not found
7999
- */
8000
- 404: ApiProblemResponseDto;
9022
+ 401: unknown;
8001
9023
  /**
8002
- * Resource conflict - rule is being modified by another process
9024
+ * Forbidden - insufficient permissions
8003
9025
  */
8004
- 409: ApiProblemResponseDto;
9026
+ 403: unknown;
8005
9027
  };
8006
9028
  };
8007
- delete: {
8008
- req: TransactionRuleControllerDeleteData;
9029
+ };
9030
+ '/api/v1/admin/properties/{key}': {
9031
+ get: {
9032
+ req: PropertyControllerGetByKeyData;
8009
9033
  res: {
8010
9034
  /**
8011
- * Rule deleted successfully
9035
+ * Property retrieved successfully
8012
9036
  */
8013
- 204: void;
9037
+ 200: unknown;
8014
9038
  /**
8015
9039
  * Unauthorized
8016
9040
  */
8017
- 401: ApiProblemResponseDto;
8018
- /**
8019
- * Forbidden - not owner of rule
8020
- */
8021
- 403: ApiProblemResponseDto;
9041
+ 401: unknown;
8022
9042
  /**
8023
- * Rule not found
9043
+ * Forbidden - insufficient permissions
8024
9044
  */
8025
- 404: ApiProblemResponseDto;
9045
+ 403: unknown;
8026
9046
  /**
8027
- * Resource conflict - rule is being modified by another process
9047
+ * Property not found
8028
9048
  */
8029
- 409: ApiProblemResponseDto;
9049
+ 404: unknown;
8030
9050
  };
8031
9051
  };
8032
- };
8033
- '/api/v1/{region}/bean/transaction-rules/{ruleId}/test': {
8034
- post: {
8035
- req: TransactionRuleControllerTestData;
9052
+ put: {
9053
+ req: PropertyControllerUpdateData;
8036
9054
  res: {
8037
9055
  /**
8038
- * Test result
9056
+ * Property updated successfully
8039
9057
  */
8040
- 200: TestRuleResponseDto;
9058
+ 200: unknown;
8041
9059
  /**
8042
9060
  * Unauthorized
8043
9061
  */
8044
- 401: ApiProblemResponseDto;
8045
- /**
8046
- * Forbidden - not owner of rule
8047
- */
8048
- 403: ApiProblemResponseDto;
9062
+ 401: unknown;
8049
9063
  /**
8050
- * Rule not found
9064
+ * Forbidden - insufficient permissions
8051
9065
  */
8052
- 404: ApiProblemResponseDto;
9066
+ 403: unknown;
8053
9067
  };
8054
9068
  };
8055
- };
8056
- '/api/v1/users': {
8057
9069
  delete: {
8058
- req: UserControllerDeleteOwnUserData;
9070
+ req: PropertyControllerDeleteData;
8059
9071
  res: {
8060
9072
  /**
8061
- * User deleted successfully
9073
+ * Property deleted successfully
8062
9074
  */
8063
9075
  204: void;
8064
9076
  /**
8065
- * Invalid access token
9077
+ * Unauthorized
9078
+ */
9079
+ 401: unknown;
9080
+ /**
9081
+ * Forbidden - insufficient permissions
8066
9082
  */
8067
9083
  403: unknown;
8068
- };
8069
- };
8070
- get: {
8071
- req: UserControllerGetUserData;
8072
- res: {
8073
9084
  /**
8074
- * User retrieved successfully
9085
+ * Property not found
8075
9086
  */
8076
- 200: unknown;
9087
+ 404: unknown;
8077
9088
  };
8078
9089
  };
9090
+ };
9091
+ '/api/v1/{region}/bean/transaction-rules': {
8079
9092
  post: {
8080
- req: UserControllerSignupUserData;
9093
+ req: TransactionRuleControllerCreateData;
8081
9094
  res: {
8082
9095
  /**
8083
- * User created successfully
9096
+ * Rule updated successfully (upsert mode)
8084
9097
  */
8085
- 201: unknown;
9098
+ 200: TransactionRuleResponseDto;
8086
9099
  /**
8087
- * Invalid Turnstile token (when Turnstile is enabled)
9100
+ * Validation failed
8088
9101
  */
8089
- 400: unknown;
9102
+ 400: ApiProblemResponseDto;
8090
9103
  /**
8091
- * User signup is disabled
9104
+ * Unauthorized
8092
9105
  */
8093
- 403: unknown;
9106
+ 401: ApiProblemResponseDto;
9107
+ /**
9108
+ * Resource conflict - another process is updating this rule
9109
+ */
9110
+ 409: ApiProblemResponseDto;
8094
9111
  };
8095
9112
  };
8096
- };
8097
- '/api/v1/users/{id}': {
8098
- delete: {
8099
- req: UserControllerDeleteUserData;
9113
+ get: {
9114
+ req: TransactionRuleControllerListData;
8100
9115
  res: {
8101
9116
  /**
8102
- * User deleted successfully
9117
+ * List of rules
8103
9118
  */
8104
- 204: void;
9119
+ 200: TransactionRuleListResponseDto;
8105
9120
  /**
8106
- * Cannot delete own account or insufficient permissions
9121
+ * Unauthorized
8107
9122
  */
8108
- 403: unknown;
9123
+ 401: ApiProblemResponseDto;
8109
9124
  };
8110
9125
  };
8111
9126
  };
8112
- '/api/v1/users/{id}/info': {
8113
- get: {
8114
- req: UserControllerGetUserInfoData;
9127
+ '/api/v1/{region}/bean/transaction-rules/validate': {
9128
+ post: {
9129
+ req: TransactionRuleControllerValidateData;
8115
9130
  res: {
8116
9131
  /**
8117
- * User info retrieved successfully
9132
+ * Validation result
8118
9133
  */
8119
- 200: unknown;
9134
+ 200: ValidateRuleResponseDto;
8120
9135
  /**
8121
- * Cannot access other user info without admin permission
9136
+ * Validation failed
8122
9137
  */
8123
- 403: unknown;
9138
+ 400: ApiProblemResponseDto;
9139
+ /**
9140
+ * Unauthorized
9141
+ */
9142
+ 401: ApiProblemResponseDto;
8124
9143
  };
8125
9144
  };
8126
9145
  };
8127
- '/api/v1/users/setting': {
8128
- put: {
8129
- req: UserControllerUpdateUserSettingData;
9146
+ '/api/v1/{region}/bean/transaction-rules/bulk': {
9147
+ post: {
9148
+ req: TransactionRuleControllerBulkCreateData;
8130
9149
  res: {
8131
9150
  /**
8132
- * Settings updated successfully
9151
+ * Bulk create completed
9152
+ */
9153
+ 201: BulkCreateRulesResponseDto;
9154
+ /**
9155
+ * Invalid bulk create data
8133
9156
  */
8134
- 200: unknown;
9157
+ 400: ApiProblemResponseDto;
8135
9158
  /**
8136
- * Insufficient permissions
9159
+ * Unauthorized
8137
9160
  */
8138
- 403: unknown;
9161
+ 401: ApiProblemResponseDto;
8139
9162
  };
8140
9163
  };
8141
9164
  };
8142
- '/api/v1/users/settings-by-page': {
9165
+ '/api/v1/{region}/bean/transaction-rules/export/{format}': {
8143
9166
  get: {
8144
- req: UserControllerGetAllUserSettingsByPageData;
9167
+ req: TransactionRuleControllerExportData;
8145
9168
  res: {
8146
9169
  /**
8147
- * Settings list retrieved successfully
9170
+ * Exported rules
8148
9171
  */
8149
- 200: unknown;
9172
+ 200: ExportRulesResponseDto;
9173
+ /**
9174
+ * Unsupported format
9175
+ */
9176
+ 400: ApiProblemResponseDto;
9177
+ /**
9178
+ * Unauthorized
9179
+ */
9180
+ 401: ApiProblemResponseDto;
8150
9181
  };
8151
9182
  };
8152
9183
  };
8153
- '/api/v1/users/asset-liability-summary': {
9184
+ '/api/v1/{region}/bean/transaction-rules/statistics/{period}': {
8154
9185
  get: {
9186
+ req: TransactionRuleControllerGetStatisticsData;
8155
9187
  res: {
8156
9188
  /**
8157
- * Summary retrieved successfully
9189
+ * Rule statistics
8158
9190
  */
8159
- 200: unknown;
9191
+ 200: RuleStatisticsResponseDto;
9192
+ /**
9193
+ * Unauthorized
9194
+ */
9195
+ 401: ApiProblemResponseDto;
8160
9196
  };
8161
9197
  };
8162
9198
  };
8163
- '/api/v1/admin/properties': {
9199
+ '/api/v1/{region}/bean/transaction-rules/{ruleId}': {
8164
9200
  get: {
9201
+ req: TransactionRuleControllerGetDetailData;
8165
9202
  res: {
8166
9203
  /**
8167
- * Properties retrieved successfully
9204
+ * Rule details
8168
9205
  */
8169
- 200: unknown;
9206
+ 200: TransactionRuleResponseDto;
8170
9207
  /**
8171
9208
  * Unauthorized
8172
9209
  */
8173
- 401: unknown;
9210
+ 401: ApiProblemResponseDto;
8174
9211
  /**
8175
- * Forbidden - insufficient permissions
9212
+ * Forbidden - not owner of rule
8176
9213
  */
8177
- 403: unknown;
9214
+ 403: ApiProblemResponseDto;
9215
+ /**
9216
+ * Rule not found
9217
+ */
9218
+ 404: ApiProblemResponseDto;
8178
9219
  };
8179
9220
  };
8180
- };
8181
- '/api/v1/admin/properties/{key}': {
8182
- get: {
8183
- req: PropertyControllerGetByKeyData;
9221
+ put: {
9222
+ req: TransactionRuleControllerUpdateData;
8184
9223
  res: {
8185
9224
  /**
8186
- * Property retrieved successfully
9225
+ * Rule updated successfully
8187
9226
  */
8188
- 200: unknown;
9227
+ 200: TransactionRuleResponseDto;
9228
+ /**
9229
+ * Validation failed
9230
+ */
9231
+ 400: ApiProblemResponseDto;
8189
9232
  /**
8190
9233
  * Unauthorized
8191
9234
  */
8192
- 401: unknown;
9235
+ 401: ApiProblemResponseDto;
8193
9236
  /**
8194
- * Forbidden - insufficient permissions
9237
+ * Forbidden - not owner of rule
8195
9238
  */
8196
- 403: unknown;
9239
+ 403: ApiProblemResponseDto;
8197
9240
  /**
8198
- * Property not found
9241
+ * Rule not found
8199
9242
  */
8200
- 404: unknown;
9243
+ 404: ApiProblemResponseDto;
9244
+ /**
9245
+ * Resource conflict - rule is being modified by another process
9246
+ */
9247
+ 409: ApiProblemResponseDto;
8201
9248
  };
8202
9249
  };
8203
- put: {
8204
- req: PropertyControllerUpdateData;
9250
+ delete: {
9251
+ req: TransactionRuleControllerDeleteData;
8205
9252
  res: {
8206
9253
  /**
8207
- * Property updated successfully
9254
+ * Rule deleted successfully
8208
9255
  */
8209
- 200: unknown;
9256
+ 204: void;
8210
9257
  /**
8211
9258
  * Unauthorized
8212
9259
  */
8213
- 401: unknown;
9260
+ 401: ApiProblemResponseDto;
8214
9261
  /**
8215
- * Forbidden - insufficient permissions
9262
+ * Forbidden - not owner of rule
8216
9263
  */
8217
- 403: unknown;
9264
+ 403: ApiProblemResponseDto;
9265
+ /**
9266
+ * Rule not found
9267
+ */
9268
+ 404: ApiProblemResponseDto;
9269
+ /**
9270
+ * Resource conflict - rule is being modified by another process
9271
+ */
9272
+ 409: ApiProblemResponseDto;
8218
9273
  };
8219
9274
  };
8220
- delete: {
8221
- req: PropertyControllerDeleteData;
9275
+ };
9276
+ '/api/v1/{region}/bean/transaction-rules/{ruleId}/test': {
9277
+ post: {
9278
+ req: TransactionRuleControllerTestData;
8222
9279
  res: {
8223
9280
  /**
8224
- * Property deleted successfully
9281
+ * Test result
8225
9282
  */
8226
- 204: void;
9283
+ 200: TestRuleResponseDto;
8227
9284
  /**
8228
9285
  * Unauthorized
8229
9286
  */
8230
- 401: unknown;
9287
+ 401: ApiProblemResponseDto;
8231
9288
  /**
8232
- * Forbidden - insufficient permissions
9289
+ * Forbidden - not owner of rule
8233
9290
  */
8234
- 403: unknown;
9291
+ 403: ApiProblemResponseDto;
8235
9292
  /**
8236
- * Property not found
9293
+ * Rule not found
8237
9294
  */
8238
- 404: unknown;
9295
+ 404: ApiProblemResponseDto;
8239
9296
  };
8240
9297
  };
8241
9298
  };
@@ -8335,6 +9392,85 @@ export type $OpenApiTs = {
8335
9392
  };
8336
9393
  };
8337
9394
  };
9395
+ '/api/v1/{region}/bean/onboarding': {
9396
+ post: {
9397
+ req: OnboardingControllerBootstrapData;
9398
+ res: {
9399
+ /**
9400
+ * Onboarding bootstrap result.
9401
+ */
9402
+ 201: unknown;
9403
+ /**
9404
+ * Invalid region/account path/duplicate paths.
9405
+ */
9406
+ 422: unknown;
9407
+ };
9408
+ };
9409
+ };
9410
+ '/api/v1/{region}/bean/reconciliations': {
9411
+ post: {
9412
+ req: ReconciliationControllerComputeData;
9413
+ res: {
9414
+ /**
9415
+ * Reconciliation preview
9416
+ */
9417
+ 200: ReconciliationComputeResultDto;
9418
+ /**
9419
+ * Account not found
9420
+ */
9421
+ 404: unknown;
9422
+ };
9423
+ };
9424
+ };
9425
+ '/api/v1/{region}/bean/reconciliations/assert': {
9426
+ post: {
9427
+ req: ReconciliationControllerAssertData;
9428
+ res: {
9429
+ /**
9430
+ * Balance assertion recorded
9431
+ */
9432
+ 201: ReconciliationRecordDto;
9433
+ /**
9434
+ * Account not found
9435
+ */
9436
+ 404: unknown;
9437
+ };
9438
+ };
9439
+ };
9440
+ '/api/v1/{region}/bean/reconciliations/pad': {
9441
+ post: {
9442
+ req: ReconciliationControllerPadData;
9443
+ res: {
9444
+ /**
9445
+ * Pad adjusting entry generated
9446
+ */
9447
+ 201: PadResultDto;
9448
+ /**
9449
+ * Book already within tolerance — no pad needed
9450
+ */
9451
+ 400: unknown;
9452
+ /**
9453
+ * Account not found
9454
+ */
9455
+ 404: unknown;
9456
+ };
9457
+ };
9458
+ };
9459
+ '/api/v1/{region}/bean/accounts/{accountId}/reconciliations': {
9460
+ get: {
9461
+ req: ReconciliationControllerHistoryData;
9462
+ res: {
9463
+ /**
9464
+ * Reconciliation history
9465
+ */
9466
+ 200: Array<ReconciliationRecordDto>;
9467
+ /**
9468
+ * Account not found
9469
+ */
9470
+ 404: unknown;
9471
+ };
9472
+ };
9473
+ };
8338
9474
  '/api/v1/{region}/bean/export/beancount': {
8339
9475
  get: {
8340
9476
  res: {
@@ -8453,107 +9589,35 @@ export type $OpenApiTs = {
8453
9589
  };
8454
9590
  };
8455
9591
  put: {
8456
- req: ImporterConfigControllerUpdateConfigData;
8457
- res: {
8458
- /**
8459
- * Configuration updated successfully
8460
- */
8461
- 200: ImporterConfigDto;
8462
- /**
8463
- * Invalid input - Validation failed
8464
- */
8465
- 400: ApiProblemResponseDto;
8466
- /**
8467
- * Configuration not found
8468
- */
8469
- 404: ApiProblemResponseDto;
8470
- };
8471
- };
8472
- };
8473
- '/api/v1/{region}/bean/import/config/{importerId}/reset': {
8474
- post: {
8475
- req: ImporterConfigControllerResetConfigData;
8476
- res: {
8477
- /**
8478
- * Configuration reset successfully
8479
- */
8480
- 200: ImporterConfigDto;
8481
- /**
8482
- * Invalid input - Unsupported importer
8483
- */
8484
- 400: ApiProblemResponseDto;
8485
- };
8486
- };
8487
- };
8488
- '/api/v1/bean/platforms': {
8489
- get: {
8490
- res: {
8491
- /**
8492
- * List of platforms with binding and account counts
8493
- */
8494
- 200: unknown;
8495
- };
8496
- };
8497
- post: {
8498
- req: PlatformControllerCreateData;
8499
- res: {
8500
- /**
8501
- * Platform created successfully
8502
- */
8503
- 201: unknown;
8504
- /**
8505
- * Platform already exists
8506
- */
8507
- 409: unknown;
8508
- };
8509
- };
8510
- };
8511
- '/api/v1/bean/platforms/list': {
8512
- get: {
8513
- res: {
8514
- /**
8515
- * List of platforms with user binding status
8516
- */
8517
- 200: unknown;
8518
- };
8519
- };
8520
- };
8521
- '/api/v1/bean/platforms/match': {
8522
- get: {
8523
- req: PlatformControllerMatchPlatformsData;
8524
- res: {
8525
- /**
8526
- * List of matching platforms with suggested segment names
8527
- */
8528
- 200: unknown;
8529
- };
8530
- };
8531
- };
8532
- '/api/v1/bean/platforms/{id}': {
8533
- put: {
8534
- req: PlatformControllerUpdateData;
9592
+ req: ImporterConfigControllerUpdateConfigData;
8535
9593
  res: {
8536
9594
  /**
8537
- * Platform updated successfully
9595
+ * Configuration updated successfully
8538
9596
  */
8539
- 200: unknown;
9597
+ 200: ImporterConfigDto;
8540
9598
  /**
8541
- * Platform not found
9599
+ * Invalid input - Validation failed
8542
9600
  */
8543
- 404: unknown;
9601
+ 400: ApiProblemResponseDto;
9602
+ /**
9603
+ * Configuration not found
9604
+ */
9605
+ 404: ApiProblemResponseDto;
8544
9606
  };
8545
9607
  };
8546
- delete: {
8547
- req: PlatformControllerDeleteData;
9608
+ };
9609
+ '/api/v1/{region}/bean/import/config/{importerId}/reset': {
9610
+ post: {
9611
+ req: ImporterConfigControllerResetConfigData;
8548
9612
  res: {
8549
9613
  /**
8550
- * Platform deleted successfully
9614
+ * Configuration reset successfully
8551
9615
  */
8552
- 204: void;
9616
+ 200: ImporterConfigDto;
8553
9617
  /**
8554
- * Platform not found
9618
+ * Invalid input - Unsupported importer
8555
9619
  */
8556
- 404: unknown;
9620
+ 400: ApiProblemResponseDto;
8557
9621
  };
8558
9622
  };
8559
9623
  };
@@ -8610,6 +9674,54 @@ export type $OpenApiTs = {
8610
9674
  };
8611
9675
  };
8612
9676
  };
9677
+ '/api/v1/{region}/bean/external-account-links': {
9678
+ post: {
9679
+ req: ExternalAccountLinkControllerCreateData;
9680
+ res: {
9681
+ /**
9682
+ * Link created.
9683
+ */
9684
+ 201: ExternalAccountLinkResponseDto;
9685
+ /**
9686
+ * beanAccountId not owned, or an active link already exists.
9687
+ */
9688
+ 422: unknown;
9689
+ };
9690
+ };
9691
+ get: {
9692
+ req: ExternalAccountLinkControllerFindAllData;
9693
+ res: {
9694
+ /**
9695
+ * Links retrieved.
9696
+ */
9697
+ 200: ExternalAccountLinkListResponseDto;
9698
+ };
9699
+ };
9700
+ };
9701
+ '/api/v1/{region}/bean/external-account-links/{id}': {
9702
+ get: {
9703
+ req: ExternalAccountLinkControllerFindOneData;
9704
+ res: {
9705
+ /**
9706
+ * Link retrieved.
9707
+ */
9708
+ 200: ExternalAccountLinkResponseDto;
9709
+ /**
9710
+ * Link not found or not owned by the user.
9711
+ */
9712
+ 422: unknown;
9713
+ };
9714
+ };
9715
+ delete: {
9716
+ req: ExternalAccountLinkControllerRemoveData;
9717
+ res: {
9718
+ /**
9719
+ * Link soft-deleted; historical transactions are unaffected.
9720
+ */
9721
+ 204: void;
9722
+ };
9723
+ };
9724
+ };
8613
9725
  '/api/v1/{region}/bean/import/parser-telemetry': {
8614
9726
  post: {
8615
9727
  req: TelemetryControllerReportTelemetryData;
@@ -8698,169 +9810,104 @@ export type $OpenApiTs = {
8698
9810
  };
8699
9811
  };
8700
9812
  };
8701
- '/api/v1/{region}/dashboard/net-worth': {
8702
- get: {
8703
- req: DashboardControllerGetNetWorthData;
8704
- res: {
8705
- /**
8706
- * Net worth retrieved successfully
8707
- */
8708
- 200: NetWorthResponseDto;
8709
- /**
8710
- * User not authenticated
8711
- */
8712
- 401: unknown;
8713
- };
8714
- };
8715
- };
8716
- '/api/v1/{region}/dashboard/accounts': {
8717
- get: {
8718
- req: DashboardControllerGetAccountsData;
8719
- res: {
8720
- /**
8721
- * Accounts retrieved successfully. Response type depends on groupBy parameter.
8722
- */
8723
- 200:
8724
- | AccountsResponseDto
8725
- | AssetClassAccountsResponseDto
8726
- | HoldingAssetClassCrossAccountResponseDto;
8727
- /**
8728
- * User not authenticated
8729
- */
8730
- 401: unknown;
8731
- };
8732
- };
8733
- };
8734
- '/api/v1/{region}/dashboard/cash-flow': {
8735
- get: {
8736
- req: DashboardControllerGetCashFlowData;
8737
- res: {
8738
- /**
8739
- * Cash flow retrieved successfully
8740
- */
8741
- 200: CashFlowResponseDto;
8742
- /**
8743
- * Invalid period format
8744
- */
8745
- 400: unknown;
8746
- /**
8747
- * User not authenticated
8748
- */
8749
- 401: unknown;
8750
- };
8751
- };
8752
- };
8753
- '/api/v1/{region}/investment/holdings/pnl': {
9813
+ '/api/v1/bean/platforms': {
8754
9814
  get: {
8755
- req: HoldingPnlControllerGetHoldingPnlData;
8756
9815
  res: {
8757
9816
  /**
8758
- * Holding P&L retrieved successfully
8759
- */
8760
- 200: HoldingPnlResponseDto;
8761
- /**
8762
- * Invalid asOf format/value/future date, invalid accountId format, or unsupported method
8763
- */
8764
- 400: unknown;
8765
- /**
8766
- * User not authenticated
9817
+ * List of platforms with binding and account counts
8767
9818
  */
8768
- 401: unknown;
9819
+ 200: unknown;
8769
9820
  };
8770
9821
  };
8771
- };
8772
- '/api/v1/{region}/bean/prices': {
8773
9822
  post: {
8774
- req: PriceControllerCreateData;
9823
+ req: PlatformControllerCreateData;
8775
9824
  res: {
8776
9825
  /**
8777
- * Price created successfully
8778
- */
8779
- 201: PriceResponseDto;
8780
- /**
8781
- * Currency or quoteCurrency commodity not found
9826
+ * Platform created successfully
8782
9827
  */
8783
- 404: unknown;
9828
+ 201: unknown;
8784
9829
  /**
8785
- * Price already exists for this currency pair and date
9830
+ * Platform already exists
8786
9831
  */
8787
9832
  409: unknown;
8788
9833
  };
8789
9834
  };
9835
+ };
9836
+ '/api/v1/bean/platforms/list': {
8790
9837
  get: {
8791
- req: PriceControllerFindAllData;
8792
9838
  res: {
8793
9839
  /**
8794
- * Prices retrieved successfully
9840
+ * List of platforms with user binding status
8795
9841
  */
8796
- 200: PriceListResponseDto;
9842
+ 200: Array<PlatformListItemDto>;
8797
9843
  };
8798
9844
  };
8799
9845
  };
8800
- '/api/v1/{region}/bean/prices/{id}': {
9846
+ '/api/v1/bean/platforms/match': {
8801
9847
  get: {
8802
- req: PriceControllerFindOneData;
9848
+ req: PlatformControllerMatchPlatformsData;
8803
9849
  res: {
8804
9850
  /**
8805
- * Price retrieved successfully
8806
- */
8807
- 200: PriceResponseDto;
8808
- /**
8809
- * Price not found
9851
+ * Matching platforms with overall match type and truncation flag
8810
9852
  */
8811
- 404: unknown;
9853
+ 200: PlatformMatchResponseDto;
8812
9854
  };
8813
9855
  };
9856
+ };
9857
+ '/api/v1/bean/platforms/{id}': {
8814
9858
  put: {
8815
- req: PriceControllerUpdateData;
9859
+ req: PlatformControllerUpdateData;
8816
9860
  res: {
8817
9861
  /**
8818
- * Price updated successfully
9862
+ * Platform updated successfully
8819
9863
  */
8820
- 200: PriceResponseDto;
9864
+ 200: unknown;
8821
9865
  /**
8822
- * Price not found
9866
+ * Platform not found
8823
9867
  */
8824
9868
  404: unknown;
8825
- /**
8826
- * Updated price conflicts with existing price
8827
- */
8828
- 409: unknown;
8829
9869
  };
8830
9870
  };
8831
9871
  delete: {
8832
- req: PriceControllerDeleteData;
9872
+ req: PlatformControllerDeleteData;
8833
9873
  res: {
8834
9874
  /**
8835
- * Price deleted successfully
9875
+ * Platform deleted successfully
8836
9876
  */
8837
9877
  204: void;
8838
9878
  /**
8839
- * Price not found
9879
+ * Platform not found
8840
9880
  */
8841
9881
  404: unknown;
8842
9882
  };
8843
9883
  };
8844
9884
  };
8845
- '/api/v1/{region}/bean/prices/bulk': {
8846
- post: {
8847
- req: PriceControllerBulkCreateData;
9885
+ '/api/v1/{region}/dashboard/net-worth': {
9886
+ get: {
9887
+ req: DashboardControllerGetNetWorthData;
8848
9888
  res: {
8849
9889
  /**
8850
- * Prices created successfully
9890
+ * Net worth retrieved successfully
8851
9891
  */
8852
- 201: Array<PriceResponseDto>;
9892
+ 200: NetWorthResponseDto;
9893
+ /**
9894
+ * User not authenticated
9895
+ */
9896
+ 401: unknown;
8853
9897
  };
8854
9898
  };
8855
9899
  };
8856
- '/api/v1/{region}/reporting/portfolio/trends': {
9900
+ '/api/v1/{region}/dashboard/accounts': {
8857
9901
  get: {
8858
- req: ReportingControllerGetPortfolioTrendsData;
9902
+ req: DashboardControllerGetAccountsData;
8859
9903
  res: {
8860
9904
  /**
8861
- * Trends retrieved successfully
9905
+ * Accounts retrieved successfully. Response type depends on groupBy parameter.
8862
9906
  */
8863
- 200: PortfolioTrendsResponseDto;
9907
+ 200:
9908
+ | AccountsResponseDto
9909
+ | AssetClassAccountsResponseDto
9910
+ | HoldingAssetClassCrossAccountResponseDto;
8864
9911
  /**
8865
9912
  * User not authenticated
8866
9913
  */
@@ -8868,14 +9915,18 @@ export type $OpenApiTs = {
8868
9915
  };
8869
9916
  };
8870
9917
  };
8871
- '/api/v1/{region}/reporting/cash-flow/trends': {
9918
+ '/api/v1/{region}/dashboard/cash-flow': {
8872
9919
  get: {
8873
- req: ReportingControllerGetCashFlowTrendsData;
9920
+ req: DashboardControllerGetCashFlowData;
8874
9921
  res: {
8875
9922
  /**
8876
- * Cash-flow trends retrieved successfully
9923
+ * Cash flow retrieved successfully
8877
9924
  */
8878
- 200: CashFlowTrendsResponseDto;
9925
+ 200: CashFlowResponseDto;
9926
+ /**
9927
+ * Invalid period format
9928
+ */
9929
+ 400: unknown;
8879
9930
  /**
8880
9931
  * User not authenticated
8881
9932
  */
@@ -8883,16 +9934,16 @@ export type $OpenApiTs = {
8883
9934
  };
8884
9935
  };
8885
9936
  };
8886
- '/api/v1/{region}/reporting/snapshots/generate': {
8887
- post: {
8888
- req: ReportingControllerGenerateSnapshotData;
9937
+ '/api/v1/{region}/dashboard/expenses': {
9938
+ get: {
9939
+ req: DashboardControllerGetExpensesData;
8889
9940
  res: {
8890
9941
  /**
8891
- * Snapshot generated successfully
9942
+ * Expenses retrieved successfully
8892
9943
  */
8893
- 200: GenerateSnapshotResponse;
9944
+ 200: ExpensesByCategoryResponseDto;
8894
9945
  /**
8895
- * Invalid date format
9946
+ * Invalid groupBy or period
8896
9947
  */
8897
9948
  400: unknown;
8898
9949
  /**
@@ -8902,26 +9953,22 @@ export type $OpenApiTs = {
8902
9953
  };
8903
9954
  };
8904
9955
  };
8905
- '/api/v1/{region}/reporting/snapshots/backfill': {
8906
- post: {
8907
- req: ReportingControllerBackfillSnapshotsData;
9956
+ '/api/v1/{region}/investment/holdings/pnl': {
9957
+ get: {
9958
+ req: HoldingPnlControllerGetHoldingPnlData;
8908
9959
  res: {
8909
9960
  /**
8910
- * Backfill completed successfully
9961
+ * Holding P&L retrieved successfully
8911
9962
  */
8912
- 200: BackfillSnapshotsResponse;
9963
+ 200: HoldingPnlResponseDto;
8913
9964
  /**
8914
- * Invalid date format or range
9965
+ * Invalid asOf format/value/future date, invalid accountId format, or unsupported method
8915
9966
  */
8916
9967
  400: unknown;
8917
9968
  /**
8918
9969
  * User not authenticated
8919
9970
  */
8920
9971
  401: unknown;
8921
- /**
8922
- * Backfill already in progress for this user
8923
- */
8924
- 409: unknown;
8925
9972
  };
8926
9973
  };
8927
9974
  };
@@ -8946,7 +9993,7 @@ export type $OpenApiTs = {
8946
9993
  /**
8947
9994
  * Login successful
8948
9995
  */
8949
- 200: unknown;
9996
+ 200: AnonymousLoginResponseDto;
8950
9997
  /**
8951
9998
  * Invalid access token
8952
9999
  */
@@ -9093,4 +10140,30 @@ export type $OpenApiTs = {
9093
10140
  };
9094
10141
  };
9095
10142
  };
10143
+ '/api/v1/market/symbols/search': {
10144
+ get: {
10145
+ req: SymbolControllerSearchData;
10146
+ res: {
10147
+ /**
10148
+ * Ranked search results
10149
+ */
10150
+ 200: Array<SymbolSearchResultDto>;
10151
+ };
10152
+ };
10153
+ };
10154
+ '/api/v1/market/symbols/{symbol}/quote': {
10155
+ get: {
10156
+ req: SymbolControllerGetQuoteData;
10157
+ res: {
10158
+ /**
10159
+ * Symbol quote
10160
+ */
10161
+ 200: SymbolQuoteDto;
10162
+ /**
10163
+ * Symbol not found in the openbb catalog
10164
+ */
10165
+ 404: unknown;
10166
+ };
10167
+ };
10168
+ };
9096
10169
  };