@firela/api-types 0.0.0-canary.09a8ff4c → 0.0.0-canary.0f069763

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,10 +69,6 @@ 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
  */
@@ -121,17 +109,17 @@ export type AccountResponseDto = {
121
109
  */
122
110
  isCustom: boolean;
123
111
  /**
124
- * i18n key for display name
112
+ * Localized display name (ADR-0114, read-time projection)
125
113
  */
126
- i18nKey?: string;
114
+ displayName?: string;
127
115
  /**
128
116
  * Icon identifier
129
117
  */
130
118
  icon?: string;
131
119
  /**
132
- * Account metadata
120
+ * Open directive metadata (ADR-0115 Decision 9)
133
121
  */
134
- openMeta?: {
122
+ openDirectiveMeta?: {
135
123
  [key: string]: unknown;
136
124
  };
137
125
  /**
@@ -178,10 +166,6 @@ export type AccountListResponseDto = {
178
166
  };
179
167
 
180
168
  export type UpdateAccountDto = {
181
- /**
182
- * Display name to distinguish accounts at the same path
183
- */
184
- displayName?: string;
185
169
  /**
186
170
  * Allowed currencies (null = no restriction)
187
171
  */
@@ -197,18 +181,14 @@ export type UpdateAccountDto = {
197
181
  | 'STRICT'
198
182
  | 'STRICT_WITH_SIZE'
199
183
  | 'NONE';
200
- /**
201
- * i18n key for display name
202
- */
203
- i18nKey?: string;
204
184
  /**
205
185
  * Icon identifier
206
186
  */
207
187
  icon?: string;
208
188
  /**
209
- * Additional metadata (merged with existing)
189
+ * Open directive metadata (merged with existing; NOT an opening-balance amount)
210
190
  */
211
- openMeta?: {
191
+ openDirectiveMeta?: {
212
192
  [key: string]: unknown;
213
193
  };
214
194
  /**
@@ -237,6 +217,28 @@ export type ReopenAccountDto = {
237
217
  reopenDate?: string;
238
218
  };
239
219
 
220
+ export type CreateOpeningBalanceDto = {
221
+ /**
222
+ * Opening balance amount (non-negative)
223
+ */
224
+ amount: number;
225
+ /**
226
+ * Currency code
227
+ */
228
+ currency: string;
229
+ /**
230
+ * Opening-balance date (defaults to now)
231
+ */
232
+ date?: string;
233
+ };
234
+
235
+ export type OpeningBalanceResultDto = {
236
+ /**
237
+ * Created opening-balance transaction id.
238
+ */
239
+ transactionId: string;
240
+ };
241
+
240
242
  export type AccountStandardResponseDto = {
241
243
  /**
242
244
  * Account path (hierarchical, colon-separated)
@@ -246,10 +248,6 @@ export type AccountStandardResponseDto = {
246
248
  * Account type in Beancount hierarchy
247
249
  */
248
250
  type: 'Assets' | 'Liabilities' | 'Income' | 'Expenses' | 'Equity';
249
- /**
250
- * i18n key for localized display name
251
- */
252
- i18nKey: string;
253
251
  /**
254
252
  * Short localized display name
255
253
  */
@@ -284,10 +282,6 @@ export type AccountStandardListResponseDto = {
284
282
  };
285
283
 
286
284
  export type TemplateMetadataDto = {
287
- /**
288
- * Whether this path can be extended
289
- */
290
- extendable: boolean;
291
285
  /**
292
286
  * Root account type
293
287
  */
@@ -848,6 +842,51 @@ export type flag2 =
848
842
  */
849
843
  export type status2 = 'ACTIVE' | 'VOIDED' | 'SUPERSEDED';
850
844
 
845
+ export type BalanceByCurrencyDto = {
846
+ /**
847
+ * ISO 4217 currency code
848
+ */
849
+ currency: string;
850
+ /**
851
+ * Balance amount
852
+ */
853
+ balance: string;
854
+ };
855
+
856
+ export type ExchangeRateWarningDto = {
857
+ /**
858
+ * Warning type
859
+ */
860
+ type: string;
861
+ /**
862
+ * Currency without exchange rate
863
+ */
864
+ currency: string;
865
+ /**
866
+ * Total amount affected
867
+ */
868
+ totalAmount: string;
869
+ };
870
+
871
+ export type TransactionListSummaryDto = {
872
+ /**
873
+ * 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.
874
+ */
875
+ totalAmount: string;
876
+ /**
877
+ * Base currency (ISO 4217)
878
+ */
879
+ currency: string;
880
+ /**
881
+ * Raw (unconverted) balance per currency
882
+ */
883
+ balanceByCurrency: Array<BalanceByCurrencyDto>;
884
+ /**
885
+ * Currencies missing an FX rate (omitted when empty)
886
+ */
887
+ warnings?: Array<ExchangeRateWarningDto>;
888
+ };
889
+
851
890
  export type TransactionListResponseDto = {
852
891
  /**
853
892
  * List of transactions
@@ -865,6 +904,10 @@ export type TransactionListResponseDto = {
865
904
  * Number of items skipped
866
905
  */
867
906
  offset: number;
907
+ /**
908
+ * 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.
909
+ */
910
+ summary?: TransactionListSummaryDto;
868
911
  };
869
912
 
870
913
  export type TagSuggestionDto = {
@@ -1917,6 +1960,108 @@ export type UpdateCommodityDto = {
1917
1960
  };
1918
1961
  };
1919
1962
 
1963
+ export type CreateBeanPriceDto = {
1964
+ /**
1965
+ * Currency being priced (e.g., USD, AAPL, BTC)
1966
+ */
1967
+ currency: string;
1968
+ /**
1969
+ * Quote currency (pricing currency, e.g., CNY, EUR)
1970
+ */
1971
+ quoteCurrency: string;
1972
+ /**
1973
+ * Price amount (MUST be >= 0 per Beancount spec, supports up to 15 decimal places). Zero allowed for conversion entries, negative strictly prohibited.
1974
+ */
1975
+ amount: number;
1976
+ /**
1977
+ * Price date (ISO 8601 format)
1978
+ */
1979
+ date: string;
1980
+ /**
1981
+ * Metadata (validated by Zod schema, max field lengths enforced)
1982
+ */
1983
+ metadata?: {
1984
+ [key: string]: unknown;
1985
+ };
1986
+ };
1987
+
1988
+ export type PriceResponseDto = {
1989
+ /**
1990
+ * Unique identifier
1991
+ */
1992
+ id: string;
1993
+ /**
1994
+ * User ID (owner of the price)
1995
+ */
1996
+ userId: string;
1997
+ /**
1998
+ * Currency being priced (e.g., USD, AAPL, BTC)
1999
+ */
2000
+ currency: string;
2001
+ /**
2002
+ * Quote currency (pricing currency, e.g., USD, CNY)
2003
+ */
2004
+ quoteCurrency: string;
2005
+ /**
2006
+ * Price amount (corresponds to Beancount Amount.number). Supports up to 15 decimal places.
2007
+ */
2008
+ amount: number;
2009
+ /**
2010
+ * Price date (ISO 8601 format). Represents the date this price was valid.
2011
+ */
2012
+ date: string;
2013
+ /**
2014
+ * Metadata (corresponds to Beancount meta field). Contains source, confidence, note, etc.
2015
+ */
2016
+ meta: {
2017
+ [key: string]: unknown;
2018
+ };
2019
+ /**
2020
+ * Creation timestamp
2021
+ */
2022
+ createdAt: string;
2023
+ /**
2024
+ * Last update timestamp
2025
+ */
2026
+ updatedAt: string;
2027
+ };
2028
+
2029
+ export type PriceListResponseDto = {
2030
+ /**
2031
+ * List of prices
2032
+ */
2033
+ items: Array<PriceResponseDto>;
2034
+ /**
2035
+ * Total number of prices
2036
+ */
2037
+ total: number;
2038
+ };
2039
+
2040
+ export type UpdateBeanPriceDto = {
2041
+ /**
2042
+ * Currency being priced
2043
+ */
2044
+ currency?: string;
2045
+ /**
2046
+ * Quote currency (pricing currency)
2047
+ */
2048
+ quoteCurrency?: string;
2049
+ /**
2050
+ * Price amount (MUST be >= 0 per Beancount spec)
2051
+ */
2052
+ amount?: number;
2053
+ /**
2054
+ * Price date (ISO 8601 format)
2055
+ */
2056
+ date?: string;
2057
+ /**
2058
+ * Metadata
2059
+ */
2060
+ metadata?: {
2061
+ [key: string]: unknown;
2062
+ };
2063
+ };
2064
+
1920
2065
  export type CreateRecurringRuleDto = {
1921
2066
  /**
1922
2067
  * Rule name (unique per user)
@@ -3119,95 +3264,249 @@ export type UpdateBeanEventDto = {
3119
3264
  };
3120
3265
  };
3121
3266
 
3122
- export type FileImportDto = {
3267
+ export type OnboardingAccountDto = {
3123
3268
  /**
3124
- * Bill file to import (CSV, PDF, OFX, etc.)
3269
+ * Account path (Assets/Liabilities only; format validated by the account service)
3125
3270
  */
3126
- file: Blob | File;
3271
+ path: string;
3272
+ /**
3273
+ * ISO 4217 currency code (3 letters)
3274
+ */
3275
+ currency: string;
3276
+ /**
3277
+ * Opening balance as a non-negative Decimal string (e.g. "1000.00")
3278
+ */
3279
+ openingBalance?: string;
3280
+ /**
3281
+ * Platform ID to bind the account to (references Platform.id); omit for unbound
3282
+ */
3283
+ platformId?: string;
3127
3284
  };
3128
3285
 
3129
- export type ImportErrorDto = {
3286
+ export type OnboardingDto = {
3130
3287
  /**
3131
- * Index of failed transaction in the file
3288
+ * Asset/Liability accounts to register with opening balances
3132
3289
  */
3133
- index: number;
3290
+ accounts?: Array<OnboardingAccountDto>;
3134
3291
  /**
3135
- * Error message
3292
+ * Skip asset registration; only bootstrap the core account set
3136
3293
  */
3137
- error: string;
3294
+ skipAssetRegistration?: boolean;
3138
3295
  };
3139
3296
 
3140
- export type ReviewItemPreviewDto = {
3297
+ export type ActualBalanceDto = {
3141
3298
  /**
3142
- * Index in the import batch (for tracking)
3299
+ * Actual balance amount as a decimal string (preserves precision for tolerance inference).
3143
3300
  */
3144
- index: number;
3301
+ amount: string;
3145
3302
  /**
3146
- * Transaction date (ISO format)
3303
+ * Currency code (ISO 4217 or commodity ticker).
3147
3304
  */
3148
- date: string;
3305
+ ccy: string;
3306
+ };
3307
+
3308
+ export type ComputeReconciliationDto = {
3149
3309
  /**
3150
- * Transaction amount (absolute value)
3310
+ * BeanAccount id to reconcile.
3151
3311
  */
3152
- amount?: number;
3312
+ accountId: string;
3153
3313
  /**
3154
- * Currency code
3314
+ * Assertion date (ISO 8601, e.g. "2026-07-24").
3155
3315
  */
3156
- currency?: string;
3316
+ asOfDate: string;
3157
3317
  /**
3158
- * Transaction narration/description
3318
+ * Actual balance from the external statement.
3159
3319
  */
3160
- narration: string;
3320
+ actualBalance: ActualBalanceDto;
3321
+ };
3322
+
3323
+ export type ReconciliationComputeResultDto = {
3324
+ accountId: string;
3325
+ asOfDate: string;
3161
3326
  /**
3162
- * Payee name
3327
+ * System-computed book balance (decimal string).
3163
3328
  */
3164
- payee?: string;
3329
+ bookBalance: string;
3165
3330
  /**
3166
- * Inferred category from rule matching
3331
+ * User-entered actual balance (decimal string).
3167
3332
  */
3168
- category?: string;
3333
+ actualBalance: string;
3334
+ currency: string;
3169
3335
  /**
3170
- * Confidence score for the match (0-1)
3336
+ * Diff = book − actual (decimal string).
3171
3337
  */
3172
- confidence?: number;
3338
+ diff: string;
3173
3339
  /**
3174
- * Type of branch requiring review
3340
+ * Applied tolerance (decimal string).
3175
3341
  */
3176
- branchType?:
3177
- | 'DUPLICATE'
3178
- | 'PAYEE_MATCH'
3179
- | 'RULE_MATCH'
3180
- | 'ACCOUNT_VALIDATION'
3181
- | 'PIPELINE_ERROR';
3342
+ tolerance: string;
3182
3343
  /**
3183
- * Human-readable reasons for requiring review
3344
+ * true when |diff| ≤ tolerance.
3184
3345
  */
3185
- reasons?: Array<string>;
3346
+ withinTolerance: boolean;
3347
+ /**
3348
+ * Suggested next action: assert when within tolerance, pad otherwise.
3349
+ */
3350
+ suggestedAction: 'assert' | 'pad';
3186
3351
  };
3187
3352
 
3188
3353
  /**
3189
- * Type of branch requiring review
3354
+ * Suggested next action: assert when within tolerance, pad otherwise.
3190
3355
  */
3191
- export type branchType =
3192
- | 'DUPLICATE'
3193
- | 'PAYEE_MATCH'
3194
- | 'RULE_MATCH'
3195
- | 'ACCOUNT_VALIDATION'
3196
- | 'PIPELINE_ERROR';
3356
+ export type suggestedAction = 'assert' | 'pad';
3197
3357
 
3198
- export type ImportResultDto = {
3358
+ export type AssertReconciliationDto = {
3199
3359
  /**
3200
- * Number of successfully imported transactions
3360
+ * BeanAccount id to reconcile.
3201
3361
  */
3202
- imported: number;
3362
+ accountId: string;
3203
3363
  /**
3204
- * Number of failed transactions
3364
+ * Assertion date (ISO 8601, e.g. "2026-07-24").
3205
3365
  */
3206
- failed: number;
3366
+ asOfDate: string;
3207
3367
  /**
3208
- * Number of skipped transactions (high confidence duplicates, auto-skipped)
3368
+ * Actual balance from the external statement.
3209
3369
  */
3210
- skipped: number;
3370
+ actualBalance: ActualBalanceDto;
3371
+ /**
3372
+ * Optional explicit tolerance override. Omit to infer from amount precision (Beancount default).
3373
+ */
3374
+ tolerance?: string;
3375
+ };
3376
+
3377
+ export type ReconciliationRecordDto = {
3378
+ id: string;
3379
+ accountId: string;
3380
+ date: string;
3381
+ /**
3382
+ * Asserted (actual) amount.
3383
+ */
3384
+ amount: string;
3385
+ currency: string;
3386
+ tolerance?: string;
3387
+ /**
3388
+ * book − actual.
3389
+ */
3390
+ diffAmount?: string;
3391
+ diffCurrency?: string;
3392
+ createdAt: string;
3393
+ };
3394
+
3395
+ export type PadReconciliationDto = {
3396
+ /**
3397
+ * BeanAccount id to reconcile.
3398
+ */
3399
+ accountId: string;
3400
+ /**
3401
+ * Assertion date (ISO 8601, e.g. "2026-07-24").
3402
+ */
3403
+ asOfDate: string;
3404
+ /**
3405
+ * Actual balance from the external statement.
3406
+ */
3407
+ actualBalance: ActualBalanceDto;
3408
+ /**
3409
+ * Pad source account. Defaults to Equity:Opening-Balances (official Beancount convention).
3410
+ */
3411
+ sourceAccount?: string;
3412
+ };
3413
+
3414
+ export type PadResultDto = {
3415
+ /**
3416
+ * Created pad adjusting transaction id.
3417
+ */
3418
+ transactionId: string;
3419
+ };
3420
+
3421
+ export type FileImportDto = {
3422
+ /**
3423
+ * Bill file to import (CSV, PDF, OFX, etc.)
3424
+ */
3425
+ file: Blob | File;
3426
+ };
3427
+
3428
+ export type ImportErrorDto = {
3429
+ /**
3430
+ * Index of failed transaction in the file
3431
+ */
3432
+ index: number;
3433
+ /**
3434
+ * Error message
3435
+ */
3436
+ error: string;
3437
+ };
3438
+
3439
+ export type ReviewItemPreviewDto = {
3440
+ /**
3441
+ * Index in the import batch (for tracking)
3442
+ */
3443
+ index: number;
3444
+ /**
3445
+ * Transaction date (ISO format)
3446
+ */
3447
+ date: string;
3448
+ /**
3449
+ * Transaction amount (absolute value)
3450
+ */
3451
+ amount?: number;
3452
+ /**
3453
+ * Currency code
3454
+ */
3455
+ currency?: string;
3456
+ /**
3457
+ * Transaction narration/description
3458
+ */
3459
+ narration: string;
3460
+ /**
3461
+ * Payee name
3462
+ */
3463
+ payee?: string;
3464
+ /**
3465
+ * Inferred category from rule matching
3466
+ */
3467
+ category?: string;
3468
+ /**
3469
+ * Confidence score for the match (0-1)
3470
+ */
3471
+ confidence?: number;
3472
+ /**
3473
+ * Type of branch requiring review
3474
+ */
3475
+ branchType?:
3476
+ | 'DUPLICATE'
3477
+ | 'PAYEE_MATCH'
3478
+ | 'RULE_MATCH'
3479
+ | 'ACCOUNT_VALIDATION'
3480
+ | 'PIPELINE_ERROR';
3481
+ /**
3482
+ * Human-readable reasons for requiring review
3483
+ */
3484
+ reasons?: Array<string>;
3485
+ };
3486
+
3487
+ /**
3488
+ * Type of branch requiring review
3489
+ */
3490
+ export type branchType =
3491
+ | 'DUPLICATE'
3492
+ | 'PAYEE_MATCH'
3493
+ | 'RULE_MATCH'
3494
+ | 'ACCOUNT_VALIDATION'
3495
+ | 'PIPELINE_ERROR';
3496
+
3497
+ export type ImportResultDto = {
3498
+ /**
3499
+ * Number of successfully imported transactions
3500
+ */
3501
+ imported: number;
3502
+ /**
3503
+ * Number of failed transactions
3504
+ */
3505
+ failed: number;
3506
+ /**
3507
+ * Number of skipped transactions (high confidence duplicates, auto-skipped)
3508
+ */
3509
+ skipped: number;
3211
3510
  /**
3212
3511
  * Number of transactions pending review (medium confidence duplicates)
3213
3512
  */
@@ -3417,94 +3716,6 @@ export type UpdateImporterConfigDto = {
3417
3716
  data?: UpdateConfigDataDto;
3418
3717
  };
3419
3718
 
3420
- export type CreatePlatformDto = {
3421
- /**
3422
- * Platform name
3423
- */
3424
- name: string;
3425
- /**
3426
- * Platform canonical identifier (lowercase, kebab-case)
3427
- */
3428
- canonical: string;
3429
- /**
3430
- * Platform aliases (multi-language names for lookup)
3431
- */
3432
- aliases: Array<string>;
3433
- /**
3434
- * Platform URL
3435
- */
3436
- url: string;
3437
- /**
3438
- * Platform type
3439
- */
3440
- type:
3441
- | 'BANK'
3442
- | 'BROKERAGE'
3443
- | 'CRYPTO_EXCHANGE'
3444
- | 'PAYMENT'
3445
- | 'INVESTMENT'
3446
- | 'INSURANCE'
3447
- | 'OTHER';
3448
- /**
3449
- * Platform logo URL
3450
- */
3451
- logoUrl?: string;
3452
- /**
3453
- * Whether the platform is active
3454
- */
3455
- isActive?: boolean;
3456
- };
3457
-
3458
- /**
3459
- * Platform type
3460
- */
3461
- export type type3 =
3462
- | 'BANK'
3463
- | 'BROKERAGE'
3464
- | 'CRYPTO_EXCHANGE'
3465
- | 'PAYMENT'
3466
- | 'INVESTMENT'
3467
- | 'INSURANCE'
3468
- | 'OTHER';
3469
-
3470
- export type UpdatePlatformDto = {
3471
- /**
3472
- * Platform name
3473
- */
3474
- name?: string;
3475
- /**
3476
- * Platform canonical identifier (lowercase, kebab-case)
3477
- */
3478
- canonical?: string;
3479
- /**
3480
- * Platform aliases (multi-language names for lookup)
3481
- */
3482
- aliases?: Array<string>;
3483
- /**
3484
- * Platform URL
3485
- */
3486
- url?: string;
3487
- /**
3488
- * Platform type
3489
- */
3490
- type?:
3491
- | 'BANK'
3492
- | 'BROKERAGE'
3493
- | 'CRYPTO_EXCHANGE'
3494
- | 'PAYMENT'
3495
- | 'INVESTMENT'
3496
- | 'INSURANCE'
3497
- | 'OTHER';
3498
- /**
3499
- * Platform logo URL
3500
- */
3501
- logoUrl?: string;
3502
- /**
3503
- * Whether the platform is active
3504
- */
3505
- isActive?: boolean;
3506
- };
3507
-
3508
3719
  export type ProviderSyncConfigDto = {
3509
3720
  /**
3510
3721
  * Source account for the first posting
@@ -3526,6 +3737,10 @@ export type ProviderSyncConfigDto = {
3526
3737
  * Filter pending transactions
3527
3738
  */
3528
3739
  filterPending?: boolean;
3740
+ /**
3741
+ * External account ID for per-batch providers (e.g. GoCardless). Overrides sourceAccount when an ExternalAccountLink mapping exists.
3742
+ */
3743
+ externalAccountId?: string;
3529
3744
  };
3530
3745
 
3531
3746
  export type ProviderSyncDto = {
@@ -3581,6 +3796,61 @@ export type SupportedProvidersResponseDto = {
3581
3796
  providers: Array<string>;
3582
3797
  };
3583
3798
 
3799
+ export type CreateExternalAccountLinkDto = {
3800
+ /**
3801
+ * Open Banking provider (whitelist)
3802
+ */
3803
+ provider:
3804
+ | 'plaid'
3805
+ | 'teller'
3806
+ | 'truelayer'
3807
+ | 'gocardless'
3808
+ | 'simplefin'
3809
+ | 'yodlee'
3810
+ | 'beancount-direct'
3811
+ | 'parsed-bill';
3812
+ /**
3813
+ * External account ID from the provider
3814
+ */
3815
+ externalAccountId: string;
3816
+ /**
3817
+ * Target BeanAccount ID (must belong to the JWT user)
3818
+ */
3819
+ beanAccountId: string;
3820
+ };
3821
+
3822
+ /**
3823
+ * Open Banking provider (whitelist)
3824
+ */
3825
+ export type provider =
3826
+ | 'plaid'
3827
+ | 'teller'
3828
+ | 'truelayer'
3829
+ | 'gocardless'
3830
+ | 'simplefin'
3831
+ | 'yodlee'
3832
+ | 'beancount-direct'
3833
+ | 'parsed-bill';
3834
+
3835
+ export type ExternalAccountLinkResponseDto = {
3836
+ id: string;
3837
+ provider: string;
3838
+ externalAccountId: string;
3839
+ beanAccountId: string;
3840
+ isActive: boolean;
3841
+ createdAt: string;
3842
+ updatedAt: string;
3843
+ };
3844
+
3845
+ export type ExternalAccountLinkListResponseDto = {
3846
+ items: Array<ExternalAccountLinkResponseDto>;
3847
+ total: number;
3848
+ /**
3849
+ * Filter by provider (query param)
3850
+ */
3851
+ provider?: string;
3852
+ };
3853
+
3584
3854
  export type ParserTelemetryReportDto = unknown;
3585
3855
 
3586
3856
  export type UncoveredFormatMissDto = unknown;
@@ -4160,20 +4430,206 @@ export type liabilitySubType = 'borrow' | 'repay';
4160
4430
  */
4161
4431
  export type equitySubType = 'opening' | 'adjustment';
4162
4432
 
4163
- export type BalanceByCurrencyDto = {
4433
+ export type PlatformListItemDto = {
4164
4434
  /**
4165
- * ISO 4217 currency code
4435
+ * Global platform ID
4166
4436
  */
4167
- currency: string;
4437
+ id: string;
4168
4438
  /**
4169
- * Balance amount
4439
+ * Platform name
4170
4440
  */
4171
- balance: string;
4172
- };
4173
-
4174
- export type NetWorthByCurrencyDto = {
4441
+ name: string;
4175
4442
  /**
4176
- * Net worth by currency
4443
+ * Platform URL
4444
+ */
4445
+ url: string;
4446
+ /**
4447
+ * Platform type
4448
+ */
4449
+ type:
4450
+ | 'BANK'
4451
+ | 'BROKERAGE'
4452
+ | 'CRYPTO_EXCHANGE'
4453
+ | 'PAYMENT'
4454
+ | 'INVESTMENT'
4455
+ | 'INSURANCE'
4456
+ | 'OTHER';
4457
+ /**
4458
+ * Canonical identifier in ACCOUNT_RE format (e.g., "icbc")
4459
+ */
4460
+ canonical: string;
4461
+ /**
4462
+ * Suggested path segment — canonical with first char uppercased (ACC_COMP_NAME_RE)
4463
+ */
4464
+ suggestedSegment: string;
4465
+ /**
4466
+ * Logo URL
4467
+ */
4468
+ logoUrl: string | null;
4469
+ /**
4470
+ * Whether user has accounts using this platform
4471
+ */
4472
+ isBound: boolean;
4473
+ };
4474
+
4475
+ /**
4476
+ * Platform type
4477
+ */
4478
+ export type type3 =
4479
+ | 'BANK'
4480
+ | 'BROKERAGE'
4481
+ | 'CRYPTO_EXCHANGE'
4482
+ | 'PAYMENT'
4483
+ | 'INVESTMENT'
4484
+ | 'INSURANCE'
4485
+ | 'OTHER';
4486
+
4487
+ export type PlatformMatchResultDto = {
4488
+ /**
4489
+ * Global platform ID
4490
+ */
4491
+ id: string;
4492
+ /**
4493
+ * Platform name (e.g., "ICBC")
4494
+ */
4495
+ name: string;
4496
+ /**
4497
+ * Canonical identifier in ACCOUNT_RE format (e.g., "icbc")
4498
+ */
4499
+ canonical: string;
4500
+ /**
4501
+ * Platform type
4502
+ */
4503
+ type:
4504
+ | 'BANK'
4505
+ | 'BROKERAGE'
4506
+ | 'CRYPTO_EXCHANGE'
4507
+ | 'PAYMENT'
4508
+ | 'INVESTMENT'
4509
+ | 'INSURANCE'
4510
+ | 'OTHER';
4511
+ /**
4512
+ * Suggested path segment — canonical, already in ACCOUNT_RE format
4513
+ */
4514
+ suggestedSegment: string;
4515
+ /**
4516
+ * Logo URL
4517
+ */
4518
+ logoUrl: string | null;
4519
+ /**
4520
+ * How this row matched: 'exact' > 'prefix' > 'substring'
4521
+ */
4522
+ matchType: 'exact' | 'prefix' | 'substring';
4523
+ };
4524
+
4525
+ /**
4526
+ * How this row matched: 'exact' > 'prefix' > 'substring'
4527
+ */
4528
+ export type matchType = 'exact' | 'prefix' | 'substring';
4529
+
4530
+ export type PlatformMatchResponseDto = {
4531
+ /**
4532
+ * Ranked matches, best tier first (at most 10 rows)
4533
+ */
4534
+ platforms: Array<PlatformMatchResultDto>;
4535
+ /**
4536
+ * Overall match quality — top row's tier, or 'none' when no hits
4537
+ */
4538
+ matchType: 'none' | 'exact' | 'prefix' | 'substring';
4539
+ /**
4540
+ * Total matches before LIMIT (truncation transparency)
4541
+ */
4542
+ total: number;
4543
+ /**
4544
+ * true when total > platforms.length (more matches exist)
4545
+ */
4546
+ hasMore: boolean;
4547
+ };
4548
+
4549
+ /**
4550
+ * Overall match quality — top row's tier, or 'none' when no hits
4551
+ */
4552
+ export type matchType2 = 'none' | 'exact' | 'prefix' | 'substring';
4553
+
4554
+ export type CreatePlatformDto = {
4555
+ /**
4556
+ * Platform name
4557
+ */
4558
+ name: string;
4559
+ /**
4560
+ * Platform canonical identifier (lowercase, kebab-case)
4561
+ */
4562
+ canonical: string;
4563
+ /**
4564
+ * Platform aliases (multi-language names for lookup)
4565
+ */
4566
+ aliases: Array<string>;
4567
+ /**
4568
+ * Platform URL
4569
+ */
4570
+ url: string;
4571
+ /**
4572
+ * Platform type
4573
+ */
4574
+ type:
4575
+ | 'BANK'
4576
+ | 'BROKERAGE'
4577
+ | 'CRYPTO_EXCHANGE'
4578
+ | 'PAYMENT'
4579
+ | 'INVESTMENT'
4580
+ | 'INSURANCE'
4581
+ | 'OTHER';
4582
+ /**
4583
+ * Platform logo URL
4584
+ */
4585
+ logoUrl?: string;
4586
+ /**
4587
+ * Whether the platform is active
4588
+ */
4589
+ isActive?: boolean;
4590
+ };
4591
+
4592
+ export type UpdatePlatformDto = {
4593
+ /**
4594
+ * Platform name
4595
+ */
4596
+ name?: string;
4597
+ /**
4598
+ * Platform canonical identifier (lowercase, kebab-case)
4599
+ */
4600
+ canonical?: string;
4601
+ /**
4602
+ * Platform aliases (multi-language names for lookup)
4603
+ */
4604
+ aliases?: Array<string>;
4605
+ /**
4606
+ * Platform URL
4607
+ */
4608
+ url?: string;
4609
+ /**
4610
+ * Platform type
4611
+ */
4612
+ type?:
4613
+ | 'BANK'
4614
+ | 'BROKERAGE'
4615
+ | 'CRYPTO_EXCHANGE'
4616
+ | 'PAYMENT'
4617
+ | 'INVESTMENT'
4618
+ | 'INSURANCE'
4619
+ | 'OTHER';
4620
+ /**
4621
+ * Platform logo URL
4622
+ */
4623
+ logoUrl?: string;
4624
+ /**
4625
+ * Whether the platform is active
4626
+ */
4627
+ isActive?: boolean;
4628
+ };
4629
+
4630
+ export type NetWorthByCurrencyDto = {
4631
+ /**
4632
+ * Net worth by currency
4177
4633
  */
4178
4634
  netWorth: Array<BalanceByCurrencyDto>;
4179
4635
  /**
@@ -4211,21 +4667,6 @@ export type ConvertedNetWorthDto = {
4211
4667
  };
4212
4668
  };
4213
4669
 
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
4670
  export type NetWorthResponseDto = {
4230
4671
  /**
4231
4672
  * Total net worth (assets - liabilities, converted to base currency)
@@ -4290,6 +4731,10 @@ export type AccountItemDto = {
4290
4731
  * Currency code
4291
4732
  */
4292
4733
  currency: string;
4734
+ /**
4735
+ * FX-converted balance in base currency; omitted when not convertible
4736
+ */
4737
+ convertedBalance?: string;
4293
4738
  };
4294
4739
 
4295
4740
  export type PlatformGroupDto = {
@@ -4306,9 +4751,40 @@ export type PlatformGroupDto = {
4306
4751
  */
4307
4752
  accounts: Array<AccountItemDto>;
4308
4753
  /**
4309
- * Total balance across all accounts in platform
4754
+ * FX-converted total balance in base currency
4310
4755
  */
4311
4756
  totalBalance: string;
4757
+ /**
4758
+ * Raw (unconverted) balances grouped by currency
4759
+ */
4760
+ balanceByCurrency: Array<BalanceByCurrencyDto>;
4761
+ /**
4762
+ * Converted balance in base currency (omitted when no currency is convertible)
4763
+ */
4764
+ convertedBalance?: string;
4765
+ /**
4766
+ * Share of the grand converted total (0-100); 0 when grand total is 0
4767
+ */
4768
+ sharePct: number;
4769
+ };
4770
+
4771
+ export type AccountExchangeRateWarningDto = {
4772
+ /**
4773
+ * Warning type
4774
+ */
4775
+ type: string;
4776
+ /**
4777
+ * Currency without exchange rate
4778
+ */
4779
+ currency: string;
4780
+ /**
4781
+ * Affected account paths
4782
+ */
4783
+ accounts: Array<string>;
4784
+ /**
4785
+ * Total amount in this currency
4786
+ */
4787
+ totalAmount: string;
4312
4788
  };
4313
4789
 
4314
4790
  export type AccountsSummaryDto = {
@@ -4320,6 +4796,14 @@ export type AccountsSummaryDto = {
4320
4796
  * Total number of platforms
4321
4797
  */
4322
4798
  totalPlatforms: number;
4799
+ /**
4800
+ * Base currency for conversion
4801
+ */
4802
+ baseCurrency: string;
4803
+ /**
4804
+ * Per-account exchange rate warnings
4805
+ */
4806
+ warnings?: Array<AccountExchangeRateWarningDto>;
4323
4807
  };
4324
4808
 
4325
4809
  export type AccountsResponseDto = {
@@ -4354,6 +4838,10 @@ export type AccountItemWithAssetClassDto = {
4354
4838
  * Currency code
4355
4839
  */
4356
4840
  currency: string;
4841
+ /**
4842
+ * FX-converted balance in base currency; omitted when not convertible
4843
+ */
4844
+ convertedBalance?: string;
4357
4845
  /**
4358
4846
  * Asset class
4359
4847
  */
@@ -4435,25 +4923,6 @@ export type assetClass =
4435
4923
  | 'REAL_ESTATE'
4436
4924
  | 'INDEX';
4437
4925
 
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
4926
  export type AssetClassSummaryDto = {
4458
4927
  /**
4459
4928
  * Total number of accounts
@@ -4619,33 +5088,90 @@ export type CashFlowResponseDto = {
4619
5088
  warnings?: Array<ExchangeRateWarningDto>;
4620
5089
  };
4621
5090
 
4622
- export type MonetaryDto = {
5091
+ export type CategoryGroupDto = {
4623
5092
  /**
4624
- * Amount (Decimal string)
5093
+ * Functional category (account-path Group segment); regional and universal account paths merge under it
4625
5094
  */
4626
- amount: string;
5095
+ category: string;
4627
5096
  /**
4628
- * ISO 4217 currency
5097
+ * Converted total for this category in base currency (expense amount when flow=expense, income amount when flow=income)
4629
5098
  */
4630
- currency: string;
5099
+ totalExpense: string;
4631
5100
  /**
4632
- * Converted to user base currency (Decimal string)
5101
+ * Share of grand total (0-100); 0 when grand total is 0
4633
5102
  */
4634
- baseCcyEquivalent?: {
4635
- [key: string]: unknown;
4636
- } | null;
4637
- };
4638
-
4639
- export type CurrentPriceDto = {
5103
+ sharePct: number;
4640
5104
  /**
4641
- * Price amount (Decimal string)
5105
+ * Raw (unconverted) expense per currency
4642
5106
  */
4643
- amount: string;
5107
+ balanceByCurrency: Array<BalanceByCurrencyDto>;
4644
5108
  /**
4645
- * Price currency (ISO 4217)
5109
+ * Converted total in base currency (omitted when FX missing for all currencies in this category)
4646
5110
  */
4647
- currency: string;
4648
- /**
5111
+ convertedBalance?: string;
5112
+ };
5113
+
5114
+ export type ExpensesByCategorySummaryDto = {
5115
+ /**
5116
+ * Total across all categories, converted (convertible categories only); expense totals when flow=expense, income totals when flow=income
5117
+ */
5118
+ totalExpense: string;
5119
+ /**
5120
+ * Number of categories
5121
+ */
5122
+ categoryCount: number;
5123
+ };
5124
+
5125
+ export type ExpensesByCategoryResponseDto = {
5126
+ /**
5127
+ * Period requested
5128
+ */
5129
+ period: string;
5130
+ /**
5131
+ * Base currency for converted values
5132
+ */
5133
+ baseCurrency: string;
5134
+ /**
5135
+ * Expense groups by functional category, sorted by converted total desc
5136
+ */
5137
+ groups: Array<CategoryGroupDto>;
5138
+ /**
5139
+ * Summary statistics
5140
+ */
5141
+ summary: ExpensesByCategorySummaryDto;
5142
+ /**
5143
+ * Exchange rate warnings (e.g. missing rate for a currency)
5144
+ */
5145
+ warnings?: Array<ExchangeRateWarningDto>;
5146
+ };
5147
+
5148
+ export type MonetaryDto = {
5149
+ /**
5150
+ * Amount (Decimal string)
5151
+ */
5152
+ amount: string;
5153
+ /**
5154
+ * ISO 4217 currency
5155
+ */
5156
+ currency: string;
5157
+ /**
5158
+ * Converted to user base currency (Decimal string)
5159
+ */
5160
+ baseCcyEquivalent?: {
5161
+ [key: string]: unknown;
5162
+ } | null;
5163
+ };
5164
+
5165
+ export type CurrentPriceDto = {
5166
+ /**
5167
+ * Price amount (Decimal string)
5168
+ */
5169
+ amount: string;
5170
+ /**
5171
+ * Price currency (ISO 4217)
5172
+ */
5173
+ currency: string;
5174
+ /**
4649
5175
  * Price date (ISO 8601)
4650
5176
  */
4651
5177
  date: string;
@@ -4814,108 +5340,6 @@ export type HoldingPnlResponseDto = {
4814
5340
  */
4815
5341
  export type method = 'average' | 'FIFO';
4816
5342
 
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;
4877
- /**
4878
- * Last update timestamp
4879
- */
4880
- updatedAt: string;
4881
- };
4882
-
4883
- export type PriceListResponseDto = {
4884
- /**
4885
- * List of prices
4886
- */
4887
- items: Array<PriceResponseDto>;
4888
- /**
4889
- * Total number of prices
4890
- */
4891
- total: number;
4892
- };
4893
-
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?: {
4915
- [key: string]: unknown;
4916
- };
4917
- };
4918
-
4919
5343
  export type CurrencyBalanceDto = {
4920
5344
  /**
4921
5345
  * ISO 4217 currency code
@@ -4942,6 +5366,14 @@ export type TimeSeriesPointDto = {
4942
5366
  change?: {
4943
5367
  [key: string]: unknown;
4944
5368
  };
5369
+ /**
5370
+ * Total assets at this date (in base currency)
5371
+ */
5372
+ assets?: string;
5373
+ /**
5374
+ * Total liabilities at this date (in base currency)
5375
+ */
5376
+ liabilities?: string;
4945
5377
  /**
4946
5378
  * Multi-currency breakdown for this point
4947
5379
  */
@@ -5117,7 +5549,7 @@ export type AccountControllerFindAllData = {
5117
5549
  */
5118
5550
  region: 'cn' | 'us' | 'de' | 'gb';
5119
5551
  /**
5120
- * Search term for path or i18nKey
5552
+ * Search term for account path
5121
5553
  */
5122
5554
  search?: string;
5123
5555
  /**
@@ -5200,6 +5632,21 @@ export type AccountControllerReopenData = {
5200
5632
 
5201
5633
  export type AccountControllerReopenResponse = AccountResponseDto;
5202
5634
 
5635
+ export type AccountControllerAddOpeningBalanceData = {
5636
+ /**
5637
+ * Account UUID
5638
+ */
5639
+ id: string;
5640
+ /**
5641
+ * Region code for tenant context
5642
+ */
5643
+ region: 'cn' | 'us' | 'de' | 'gb';
5644
+ requestBody: CreateOpeningBalanceDto;
5645
+ };
5646
+
5647
+ export type AccountControllerAddOpeningBalanceResponse =
5648
+ OpeningBalanceResultDto;
5649
+
5203
5650
  export type AccountStandardsControllerGetTemplatesData = {
5204
5651
  /**
5205
5652
  * Region code (cn, us, de)
@@ -5260,6 +5707,10 @@ export type TransactionControllerListData = {
5260
5707
  * Filter by account ID (transactions with postings to this account)
5261
5708
  */
5262
5709
  accountId?: string;
5710
+ /**
5711
+ * Filter by ADR-0075 functional category (Group segment); matches any posting to an Expenses/Income account whose derived Group segment equals this value
5712
+ */
5713
+ category?: string;
5263
5714
  /**
5264
5715
  * Filter by start date (inclusive), format: YYYY-MM-DD
5265
5716
  */
@@ -5384,7 +5835,7 @@ export type TransactionControllerDeleteResponse = void;
5384
5835
 
5385
5836
  export type BalanceControllerGetBalanceData = {
5386
5837
  /**
5387
- * Account name (e.g., "Assets:Bank:Checking")
5838
+ * Account name (e.g., "Assets:Checking")
5388
5839
  */
5389
5840
  account: string;
5390
5841
  /**
@@ -5786,56 +6237,56 @@ export type CommodityControllerBulkCreateData = {
5786
6237
 
5787
6238
  export type CommodityControllerBulkCreateResponse = Array<CommodityResponseDto>;
5788
6239
 
5789
- export type RecurringRuleControllerCreateData = {
6240
+ export type PriceControllerCreateData = {
5790
6241
  /**
5791
6242
  * Region code for tenant context
5792
6243
  */
5793
6244
  region: 'cn' | 'us' | 'de' | 'gb';
5794
- requestBody: CreateRecurringRuleDto;
6245
+ requestBody: CreateBeanPriceDto;
5795
6246
  };
5796
6247
 
5797
- export type RecurringRuleControllerCreateResponse = RecurringRuleResponseDto;
6248
+ export type PriceControllerCreateResponse = PriceResponseDto;
5798
6249
 
5799
- export type RecurringRuleControllerFindAllData = {
6250
+ export type PriceControllerFindAllData = {
5800
6251
  /**
5801
- * Filter by frequency (WEEKLY, MONTHLY, etc.)
6252
+ * Filter by currency (e.g., BTC, AAPL, USD)
5802
6253
  */
5803
- frequency?: string;
6254
+ currency?: string;
5804
6255
  /**
5805
- * Filter by autoCreate enabled
6256
+ * Filter prices from this date (ISO 8601 format)
5806
6257
  */
5807
- hasAutoCreate?: boolean;
6258
+ dateFrom?: string;
5808
6259
  /**
5809
- * Filter by active status
6260
+ * Filter prices to this date (ISO 8601 format)
5810
6261
  */
5811
- isActive?: boolean;
6262
+ dateTo?: string;
5812
6263
  /**
5813
- * Region code for tenant context
6264
+ * Number of items per page (default: 20, max: 100)
5814
6265
  */
5815
- region: 'cn' | 'us' | 'de' | 'gb';
5816
- };
5817
-
5818
- export type RecurringRuleControllerFindAllResponse =
5819
- Array<RecurringRuleResponseDto>;
5820
-
5821
- export type RecurringRuleControllerCreateFromTransactionData = {
6266
+ limit?: number;
6267
+ /**
6268
+ * Page number for pagination (default: 1)
6269
+ */
6270
+ page?: number;
6271
+ /**
6272
+ * Filter by quote currency (pricing currency, e.g., USD, CNY)
6273
+ */
6274
+ quoteCurrency?: string;
5822
6275
  /**
5823
6276
  * Region code for tenant context
5824
6277
  */
5825
6278
  region: 'cn' | 'us' | 'de' | 'gb';
5826
- requestBody: CreateRuleFromTransactionDto;
5827
6279
  /**
5828
- * Source transaction ID
6280
+ * Search term for currency or quoteCurrency (case-insensitive partial match)
5829
6281
  */
5830
- transactionId: string;
6282
+ search?: string;
5831
6283
  };
5832
6284
 
5833
- export type RecurringRuleControllerCreateFromTransactionResponse =
5834
- RecurringRuleResponseDto;
6285
+ export type PriceControllerFindAllResponse = PriceListResponseDto;
5835
6286
 
5836
- export type RecurringRuleControllerFindOneData = {
6287
+ export type PriceControllerFindOneData = {
5837
6288
  /**
5838
- * Rule ID
6289
+ * Price ID
5839
6290
  */
5840
6291
  id: string;
5841
6292
  /**
@@ -5844,25 +6295,25 @@ export type RecurringRuleControllerFindOneData = {
5844
6295
  region: 'cn' | 'us' | 'de' | 'gb';
5845
6296
  };
5846
6297
 
5847
- export type RecurringRuleControllerFindOneResponse = RecurringRuleResponseDto;
6298
+ export type PriceControllerFindOneResponse = PriceResponseDto;
5848
6299
 
5849
- export type RecurringRuleControllerUpdateData = {
6300
+ export type PriceControllerUpdateData = {
5850
6301
  /**
5851
- * Rule ID
6302
+ * Price ID
5852
6303
  */
5853
6304
  id: string;
5854
6305
  /**
5855
6306
  * Region code for tenant context
5856
6307
  */
5857
6308
  region: 'cn' | 'us' | 'de' | 'gb';
5858
- requestBody: UpdateRecurringRuleDto;
6309
+ requestBody: UpdateBeanPriceDto;
5859
6310
  };
5860
6311
 
5861
- export type RecurringRuleControllerUpdateResponse = RecurringRuleResponseDto;
6312
+ export type PriceControllerUpdateResponse = PriceResponseDto;
5862
6313
 
5863
- export type RecurringRuleControllerDeleteData = {
6314
+ export type PriceControllerDeleteData = {
5864
6315
  /**
5865
- * Rule ID
6316
+ * Price ID
5866
6317
  */
5867
6318
  id: string;
5868
6319
  /**
@@ -5871,25 +6322,122 @@ export type RecurringRuleControllerDeleteData = {
5871
6322
  region: 'cn' | 'us' | 'de' | 'gb';
5872
6323
  };
5873
6324
 
5874
- export type RecurringRuleControllerDeleteResponse = void;
6325
+ export type PriceControllerDeleteResponse = void;
5875
6326
 
5876
- export type RecurringRuleControllerGetWithStatsData = {
5877
- /**
5878
- * Rule ID
5879
- */
5880
- id: string;
6327
+ export type PriceControllerBulkCreateData = {
5881
6328
  /**
5882
6329
  * Region code for tenant context
5883
6330
  */
5884
6331
  region: 'cn' | 'us' | 'de' | 'gb';
6332
+ requestBody: Array<string>;
5885
6333
  };
5886
6334
 
5887
- export type RecurringRuleControllerGetWithStatsResponse =
5888
- RecurringRuleWithStatsResponseDto;
6335
+ export type PriceControllerBulkCreateResponse = Array<PriceResponseDto>;
5889
6336
 
5890
- export type ExpectedTransactionControllerFindAllData = {
6337
+ export type RecurringRuleControllerCreateData = {
5891
6338
  /**
5892
- * Filter by date range start (YYYY-MM-DD)
6339
+ * Region code for tenant context
6340
+ */
6341
+ region: 'cn' | 'us' | 'de' | 'gb';
6342
+ requestBody: CreateRecurringRuleDto;
6343
+ };
6344
+
6345
+ export type RecurringRuleControllerCreateResponse = RecurringRuleResponseDto;
6346
+
6347
+ export type RecurringRuleControllerFindAllData = {
6348
+ /**
6349
+ * Filter by frequency (WEEKLY, MONTHLY, etc.)
6350
+ */
6351
+ frequency?: string;
6352
+ /**
6353
+ * Filter by autoCreate enabled
6354
+ */
6355
+ hasAutoCreate?: boolean;
6356
+ /**
6357
+ * Filter by active status
6358
+ */
6359
+ isActive?: boolean;
6360
+ /**
6361
+ * Region code for tenant context
6362
+ */
6363
+ region: 'cn' | 'us' | 'de' | 'gb';
6364
+ };
6365
+
6366
+ export type RecurringRuleControllerFindAllResponse =
6367
+ Array<RecurringRuleResponseDto>;
6368
+
6369
+ export type RecurringRuleControllerCreateFromTransactionData = {
6370
+ /**
6371
+ * Region code for tenant context
6372
+ */
6373
+ region: 'cn' | 'us' | 'de' | 'gb';
6374
+ requestBody: CreateRuleFromTransactionDto;
6375
+ /**
6376
+ * Source transaction ID
6377
+ */
6378
+ transactionId: string;
6379
+ };
6380
+
6381
+ export type RecurringRuleControllerCreateFromTransactionResponse =
6382
+ RecurringRuleResponseDto;
6383
+
6384
+ export type RecurringRuleControllerFindOneData = {
6385
+ /**
6386
+ * Rule ID
6387
+ */
6388
+ id: string;
6389
+ /**
6390
+ * Region code for tenant context
6391
+ */
6392
+ region: 'cn' | 'us' | 'de' | 'gb';
6393
+ };
6394
+
6395
+ export type RecurringRuleControllerFindOneResponse = RecurringRuleResponseDto;
6396
+
6397
+ export type RecurringRuleControllerUpdateData = {
6398
+ /**
6399
+ * Rule ID
6400
+ */
6401
+ id: string;
6402
+ /**
6403
+ * Region code for tenant context
6404
+ */
6405
+ region: 'cn' | 'us' | 'de' | 'gb';
6406
+ requestBody: UpdateRecurringRuleDto;
6407
+ };
6408
+
6409
+ export type RecurringRuleControllerUpdateResponse = RecurringRuleResponseDto;
6410
+
6411
+ export type RecurringRuleControllerDeleteData = {
6412
+ /**
6413
+ * Rule ID
6414
+ */
6415
+ id: string;
6416
+ /**
6417
+ * Region code for tenant context
6418
+ */
6419
+ region: 'cn' | 'us' | 'de' | 'gb';
6420
+ };
6421
+
6422
+ export type RecurringRuleControllerDeleteResponse = void;
6423
+
6424
+ export type RecurringRuleControllerGetWithStatsData = {
6425
+ /**
6426
+ * Rule ID
6427
+ */
6428
+ id: string;
6429
+ /**
6430
+ * Region code for tenant context
6431
+ */
6432
+ region: 'cn' | 'us' | 'de' | 'gb';
6433
+ };
6434
+
6435
+ export type RecurringRuleControllerGetWithStatsResponse =
6436
+ RecurringRuleWithStatsResponseDto;
6437
+
6438
+ export type ExpectedTransactionControllerFindAllData = {
6439
+ /**
6440
+ * Filter by date range start (YYYY-MM-DD)
5893
6441
  */
5894
6442
  fromDate?: string;
5895
6443
  /**
@@ -6349,6 +6897,61 @@ export type EventControllerGetSliceData = {
6349
6897
 
6350
6898
  export type EventControllerGetSliceResponse = unknown;
6351
6899
 
6900
+ export type OnboardingControllerBootstrapData = {
6901
+ /**
6902
+ * Region code for tenant context
6903
+ */
6904
+ region: 'cn' | 'us' | 'de' | 'gb';
6905
+ requestBody: OnboardingDto;
6906
+ };
6907
+
6908
+ export type OnboardingControllerBootstrapResponse = unknown;
6909
+
6910
+ export type ReconciliationControllerComputeData = {
6911
+ /**
6912
+ * Region code for tenant context (decorative for reconciliation)
6913
+ */
6914
+ region: 'cn' | 'us' | 'de' | 'gb';
6915
+ requestBody: ComputeReconciliationDto;
6916
+ };
6917
+
6918
+ export type ReconciliationControllerComputeResponse =
6919
+ ReconciliationComputeResultDto;
6920
+
6921
+ export type ReconciliationControllerAssertData = {
6922
+ /**
6923
+ * Region code for tenant context (decorative for reconciliation)
6924
+ */
6925
+ region: 'cn' | 'us' | 'de' | 'gb';
6926
+ requestBody: AssertReconciliationDto;
6927
+ };
6928
+
6929
+ export type ReconciliationControllerAssertResponse = ReconciliationRecordDto;
6930
+
6931
+ export type ReconciliationControllerPadData = {
6932
+ /**
6933
+ * Region code for tenant context (decorative for reconciliation)
6934
+ */
6935
+ region: 'cn' | 'us' | 'de' | 'gb';
6936
+ requestBody: PadReconciliationDto;
6937
+ };
6938
+
6939
+ export type ReconciliationControllerPadResponse = PadResultDto;
6940
+
6941
+ export type ReconciliationControllerHistoryData = {
6942
+ /**
6943
+ * BeanAccount id
6944
+ */
6945
+ accountId: string;
6946
+ /**
6947
+ * Region code for tenant context (decorative for reconciliation)
6948
+ */
6949
+ region: 'cn' | 'us' | 'de' | 'gb';
6950
+ };
6951
+
6952
+ export type ReconciliationControllerHistoryResponse =
6953
+ Array<ReconciliationRecordDto>;
6954
+
6352
6955
  export type ExportControllerExportBeancountResponse = unknown;
6353
6956
 
6354
6957
  export type FileImportControllerImportFileData = {
@@ -6441,48 +7044,6 @@ export type ImporterConfigControllerResetConfigData = {
6441
7044
 
6442
7045
  export type ImporterConfigControllerResetConfigResponse = ImporterConfigDto;
6443
7046
 
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
7047
  export type ProviderSyncControllerSyncData = {
6487
7048
  /**
6488
7049
  * Provider name
@@ -6528,6 +7089,49 @@ export type ProviderSyncControllerIsProviderSupportedData = {
6528
7089
 
6529
7090
  export type ProviderSyncControllerIsProviderSupportedResponse = unknown;
6530
7091
 
7092
+ export type ExternalAccountLinkControllerCreateData = {
7093
+ /**
7094
+ * Region code for tenant context
7095
+ */
7096
+ region: 'cn' | 'us' | 'de' | 'gb';
7097
+ requestBody: CreateExternalAccountLinkDto;
7098
+ };
7099
+
7100
+ export type ExternalAccountLinkControllerCreateResponse =
7101
+ ExternalAccountLinkResponseDto;
7102
+
7103
+ export type ExternalAccountLinkControllerFindAllData = {
7104
+ provider: string;
7105
+ /**
7106
+ * Region code for tenant context
7107
+ */
7108
+ region: 'cn' | 'us' | 'de' | 'gb';
7109
+ };
7110
+
7111
+ export type ExternalAccountLinkControllerFindAllResponse =
7112
+ ExternalAccountLinkListResponseDto;
7113
+
7114
+ export type ExternalAccountLinkControllerFindOneData = {
7115
+ id: string;
7116
+ /**
7117
+ * Region code for tenant context
7118
+ */
7119
+ region: 'cn' | 'us' | 'de' | 'gb';
7120
+ };
7121
+
7122
+ export type ExternalAccountLinkControllerFindOneResponse =
7123
+ ExternalAccountLinkResponseDto;
7124
+
7125
+ export type ExternalAccountLinkControllerRemoveData = {
7126
+ id: string;
7127
+ /**
7128
+ * Region code for tenant context
7129
+ */
7130
+ region: 'cn' | 'us' | 'de' | 'gb';
7131
+ };
7132
+
7133
+ export type ExternalAccountLinkControllerRemoveResponse = void;
7134
+
6531
7135
  export type TelemetryControllerReportTelemetryData = {
6532
7136
  /**
6533
7137
  * Region code for tenant context
@@ -6600,6 +7204,49 @@ export type NlpControllerGetSessionData = {
6600
7204
 
6601
7205
  export type NlpControllerGetSessionResponse = unknown;
6602
7206
 
7207
+ export type PlatformControllerFindAllResponse = unknown;
7208
+
7209
+ export type PlatformControllerCreateData = {
7210
+ requestBody: CreatePlatformDto;
7211
+ };
7212
+
7213
+ export type PlatformControllerCreateResponse = unknown;
7214
+
7215
+ export type PlatformControllerGetPlatformListResponse =
7216
+ Array<PlatformListItemDto>;
7217
+
7218
+ export type PlatformControllerMatchPlatformsData = {
7219
+ /**
7220
+ * Search query — Chinese name, English name, or abbreviation
7221
+ */
7222
+ q: string;
7223
+ /**
7224
+ * Region code for category override lookup
7225
+ */
7226
+ region?: string;
7227
+ };
7228
+
7229
+ export type PlatformControllerMatchPlatformsResponse = PlatformMatchResponseDto;
7230
+
7231
+ export type PlatformControllerUpdateData = {
7232
+ /**
7233
+ * Platform ID
7234
+ */
7235
+ id: string;
7236
+ requestBody: UpdatePlatformDto;
7237
+ };
7238
+
7239
+ export type PlatformControllerUpdateResponse = unknown;
7240
+
7241
+ export type PlatformControllerDeleteData = {
7242
+ /**
7243
+ * Platform ID
7244
+ */
7245
+ id: string;
7246
+ };
7247
+
7248
+ export type PlatformControllerDeleteResponse = void;
7249
+
6603
7250
  export type DashboardControllerGetNetWorthData = {
6604
7251
  /**
6605
7252
  * Date for balance calculation (ISO 8601 format)
@@ -6654,123 +7301,48 @@ export type DashboardControllerGetCashFlowData = {
6654
7301
 
6655
7302
  export type DashboardControllerGetCashFlowResponse = CashFlowResponseDto;
6656
7303
 
6657
- export type HoldingPnlControllerGetHoldingPnlData = {
7304
+ export type DashboardControllerGetExpensesData = {
6658
7305
  /**
6659
- * Scope to a single account
7306
+ * Account root to aggregate (expense → ^Expenses:, income → ^Income:)
6660
7307
  */
6661
- accountId?: string;
7308
+ flow?: 'expense' | 'income';
6662
7309
  /**
6663
- * As-of date (ISO 8601), defaults to today
7310
+ * Grouping strategy
6664
7311
  */
6665
- asOf?: string;
7312
+ groupBy?: 'category';
6666
7313
  /**
6667
- * Realized-P&L lot-matching method (default average). Does not affect the average-cost unrealized basis.
7314
+ * Time window (1m = current calendar month)
6668
7315
  */
6669
- method?: 'FIFO' | 'average';
7316
+ period?: '1m' | '3m' | '6m' | '1y';
6670
7317
  /**
6671
7318
  * Region code for tenant context
6672
7319
  */
6673
7320
  region: 'cn' | 'us' | 'de' | 'gb';
6674
7321
  };
6675
7322
 
6676
- export type HoldingPnlControllerGetHoldingPnlResponse = HoldingPnlResponseDto;
7323
+ export type DashboardControllerGetExpensesResponse =
7324
+ ExpensesByCategoryResponseDto;
6677
7325
 
6678
- export type PriceControllerCreateData = {
6679
- /**
6680
- * Region code for tenant context
6681
- */
6682
- region: 'cn' | 'us' | 'de' | 'gb';
6683
- requestBody: CreateBeanPriceDto;
6684
- };
6685
-
6686
- export type PriceControllerCreateResponse = PriceResponseDto;
6687
-
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';
6717
- /**
6718
- * Search term for currency or quoteCurrency (case-insensitive partial match)
6719
- */
6720
- search?: string;
6721
- };
6722
-
6723
- export type PriceControllerFindAllResponse = PriceListResponseDto;
6724
-
6725
- export type PriceControllerFindOneData = {
6726
- /**
6727
- * Price ID
6728
- */
6729
- id: string;
6730
- /**
6731
- * Region code for tenant context
6732
- */
6733
- region: 'cn' | 'us' | 'de' | 'gb';
6734
- };
6735
-
6736
- export type PriceControllerFindOneResponse = PriceResponseDto;
6737
-
6738
- export type PriceControllerUpdateData = {
6739
- /**
6740
- * Price ID
6741
- */
6742
- id: string;
7326
+ export type HoldingPnlControllerGetHoldingPnlData = {
6743
7327
  /**
6744
- * Region code for tenant context
7328
+ * Scope to a single account
6745
7329
  */
6746
- region: 'cn' | 'us' | 'de' | 'gb';
6747
- requestBody: UpdateBeanPriceDto;
6748
- };
6749
-
6750
- export type PriceControllerUpdateResponse = PriceResponseDto;
6751
-
6752
- export type PriceControllerDeleteData = {
7330
+ accountId?: string;
6753
7331
  /**
6754
- * Price ID
7332
+ * As-of date (ISO 8601), defaults to today
6755
7333
  */
6756
- id: string;
7334
+ asOf?: string;
6757
7335
  /**
6758
- * Region code for tenant context
7336
+ * Realized-P&L lot-matching method (default average). Does not affect the average-cost unrealized basis.
6759
7337
  */
6760
- region: 'cn' | 'us' | 'de' | 'gb';
6761
- };
6762
-
6763
- export type PriceControllerDeleteResponse = void;
6764
-
6765
- export type PriceControllerBulkCreateData = {
7338
+ method?: 'FIFO' | 'average';
6766
7339
  /**
6767
7340
  * Region code for tenant context
6768
7341
  */
6769
7342
  region: 'cn' | 'us' | 'de' | 'gb';
6770
- requestBody: Array<string>;
6771
7343
  };
6772
7344
 
6773
- export type PriceControllerBulkCreateResponse = Array<PriceResponseDto>;
7345
+ export type HoldingPnlControllerGetHoldingPnlResponse = HoldingPnlResponseDto;
6774
7346
 
6775
7347
  export type ReportingControllerGetPortfolioTrendsData = {
6776
7348
  /**
@@ -6987,6 +7559,25 @@ export type $OpenApiTs = {
6987
7559
  };
6988
7560
  };
6989
7561
  };
7562
+ '/api/v1/{region}/bean/accounts/{id}/opening-balance': {
7563
+ post: {
7564
+ req: AccountControllerAddOpeningBalanceData;
7565
+ res: {
7566
+ /**
7567
+ * Opening-balance transaction created
7568
+ */
7569
+ 201: OpeningBalanceResultDto;
7570
+ /**
7571
+ * Account not found
7572
+ */
7573
+ 404: unknown;
7574
+ /**
7575
+ * An opening balance already exists for this account
7576
+ */
7577
+ 409: unknown;
7578
+ };
7579
+ };
7580
+ };
6990
7581
  '/api/v1/{region}/bean/account-standards': {
6991
7582
  get: {
6992
7583
  req: AccountStandardsControllerGetTemplatesData;
@@ -7595,6 +8186,90 @@ export type $OpenApiTs = {
7595
8186
  };
7596
8187
  };
7597
8188
  };
8189
+ '/api/v1/{region}/bean/prices': {
8190
+ post: {
8191
+ req: PriceControllerCreateData;
8192
+ res: {
8193
+ /**
8194
+ * Price created successfully
8195
+ */
8196
+ 201: PriceResponseDto;
8197
+ /**
8198
+ * Currency or quoteCurrency commodity not found
8199
+ */
8200
+ 404: unknown;
8201
+ /**
8202
+ * Price already exists for this currency pair and date
8203
+ */
8204
+ 409: unknown;
8205
+ };
8206
+ };
8207
+ get: {
8208
+ req: PriceControllerFindAllData;
8209
+ res: {
8210
+ /**
8211
+ * Prices retrieved successfully
8212
+ */
8213
+ 200: PriceListResponseDto;
8214
+ };
8215
+ };
8216
+ };
8217
+ '/api/v1/{region}/bean/prices/{id}': {
8218
+ get: {
8219
+ req: PriceControllerFindOneData;
8220
+ res: {
8221
+ /**
8222
+ * Price retrieved successfully
8223
+ */
8224
+ 200: PriceResponseDto;
8225
+ /**
8226
+ * Price not found
8227
+ */
8228
+ 404: unknown;
8229
+ };
8230
+ };
8231
+ put: {
8232
+ req: PriceControllerUpdateData;
8233
+ res: {
8234
+ /**
8235
+ * Price updated successfully
8236
+ */
8237
+ 200: PriceResponseDto;
8238
+ /**
8239
+ * Price not found
8240
+ */
8241
+ 404: unknown;
8242
+ /**
8243
+ * Updated price conflicts with existing price
8244
+ */
8245
+ 409: unknown;
8246
+ };
8247
+ };
8248
+ delete: {
8249
+ req: PriceControllerDeleteData;
8250
+ res: {
8251
+ /**
8252
+ * Price deleted successfully
8253
+ */
8254
+ 204: void;
8255
+ /**
8256
+ * Price not found
8257
+ */
8258
+ 404: unknown;
8259
+ };
8260
+ };
8261
+ };
8262
+ '/api/v1/{region}/bean/prices/bulk': {
8263
+ post: {
8264
+ req: PriceControllerBulkCreateData;
8265
+ res: {
8266
+ /**
8267
+ * Prices created successfully
8268
+ */
8269
+ 201: Array<PriceResponseDto>;
8270
+ };
8271
+ };
8272
+ };
7598
8273
  '/api/v1/{region}/bean/recurring-rules': {
7599
8274
  post: {
7600
8275
  req: RecurringRuleControllerCreateData;
@@ -8335,6 +9010,85 @@ export type $OpenApiTs = {
8335
9010
  };
8336
9011
  };
8337
9012
  };
9013
+ '/api/v1/{region}/bean/onboarding': {
9014
+ post: {
9015
+ req: OnboardingControllerBootstrapData;
9016
+ res: {
9017
+ /**
9018
+ * Onboarding bootstrap result.
9019
+ */
9020
+ 201: unknown;
9021
+ /**
9022
+ * Invalid region/account path/duplicate paths.
9023
+ */
9024
+ 422: unknown;
9025
+ };
9026
+ };
9027
+ };
9028
+ '/api/v1/{region}/bean/reconciliations': {
9029
+ post: {
9030
+ req: ReconciliationControllerComputeData;
9031
+ res: {
9032
+ /**
9033
+ * Reconciliation preview
9034
+ */
9035
+ 200: ReconciliationComputeResultDto;
9036
+ /**
9037
+ * Account not found
9038
+ */
9039
+ 404: unknown;
9040
+ };
9041
+ };
9042
+ };
9043
+ '/api/v1/{region}/bean/reconciliations/assert': {
9044
+ post: {
9045
+ req: ReconciliationControllerAssertData;
9046
+ res: {
9047
+ /**
9048
+ * Balance assertion recorded
9049
+ */
9050
+ 201: ReconciliationRecordDto;
9051
+ /**
9052
+ * Account not found
9053
+ */
9054
+ 404: unknown;
9055
+ };
9056
+ };
9057
+ };
9058
+ '/api/v1/{region}/bean/reconciliations/pad': {
9059
+ post: {
9060
+ req: ReconciliationControllerPadData;
9061
+ res: {
9062
+ /**
9063
+ * Pad adjusting entry generated
9064
+ */
9065
+ 201: PadResultDto;
9066
+ /**
9067
+ * Book already within tolerance — no pad needed
9068
+ */
9069
+ 400: unknown;
9070
+ /**
9071
+ * Account not found
9072
+ */
9073
+ 404: unknown;
9074
+ };
9075
+ };
9076
+ };
9077
+ '/api/v1/{region}/bean/accounts/{accountId}/reconciliations': {
9078
+ get: {
9079
+ req: ReconciliationControllerHistoryData;
9080
+ res: {
9081
+ /**
9082
+ * Reconciliation history
9083
+ */
9084
+ 200: Array<ReconciliationRecordDto>;
9085
+ /**
9086
+ * Account not found
9087
+ */
9088
+ 404: unknown;
9089
+ };
9090
+ };
9091
+ };
8338
9092
  '/api/v1/{region}/bean/export/beancount': {
8339
9093
  get: {
8340
9094
  res: {
@@ -8485,128 +9239,104 @@ export type $OpenApiTs = {
8485
9239
  };
8486
9240
  };
8487
9241
  };
8488
- '/api/v1/bean/platforms': {
8489
- get: {
9242
+ '/api/v1/{region}/bean/import/provider/{providerName}/sync': {
9243
+ post: {
9244
+ req: ProviderSyncControllerSyncData;
8490
9245
  res: {
8491
9246
  /**
8492
- * List of platforms with binding and account counts
9247
+ * Sync completed successfully
8493
9248
  */
8494
- 200: unknown;
8495
- };
8496
- };
8497
- post: {
8498
- req: PlatformControllerCreateData;
8499
- res: {
9249
+ 200: ProviderSyncResponseDto;
8500
9250
  /**
8501
- * Platform created successfully
9251
+ * Invalid request data
8502
9252
  */
8503
- 201: unknown;
9253
+ 400: unknown;
8504
9254
  /**
8505
- * Platform already exists
9255
+ * Missing or invalid authentication
8506
9256
  */
8507
- 409: unknown;
8508
- };
8509
- };
8510
- };
8511
- '/api/v1/bean/platforms/list': {
8512
- get: {
8513
- res: {
9257
+ 401: unknown;
8514
9258
  /**
8515
- * List of platforms with user binding status
9259
+ * Provider not supported
8516
9260
  */
8517
- 200: unknown;
9261
+ 404: unknown;
8518
9262
  };
8519
9263
  };
8520
9264
  };
8521
- '/api/v1/bean/platforms/match': {
9265
+ '/api/v1/{region}/bean/import/provider/supported': {
8522
9266
  get: {
8523
- req: PlatformControllerMatchPlatformsData;
9267
+ req: ProviderSyncControllerGetSupportedProvidersData;
8524
9268
  res: {
8525
9269
  /**
8526
- * List of matching platforms with suggested segment names
9270
+ * List of supported providers
8527
9271
  */
8528
- 200: unknown;
9272
+ 200: SupportedProvidersResponseDto;
9273
+ /**
9274
+ * Missing or invalid authentication
9275
+ */
9276
+ 401: unknown;
8529
9277
  };
8530
9278
  };
8531
9279
  };
8532
- '/api/v1/bean/platforms/{id}': {
8533
- put: {
8534
- req: PlatformControllerUpdateData;
9280
+ '/api/v1/{region}/bean/import/provider/{providerName}/supported': {
9281
+ get: {
9282
+ req: ProviderSyncControllerIsProviderSupportedData;
8535
9283
  res: {
8536
9284
  /**
8537
- * Platform updated successfully
9285
+ * Provider support status
8538
9286
  */
8539
9287
  200: unknown;
8540
9288
  /**
8541
- * Platform not found
9289
+ * Missing or invalid authentication
8542
9290
  */
8543
- 404: unknown;
9291
+ 401: unknown;
8544
9292
  };
8545
9293
  };
8546
- delete: {
8547
- req: PlatformControllerDeleteData;
9294
+ };
9295
+ '/api/v1/{region}/bean/external-account-links': {
9296
+ post: {
9297
+ req: ExternalAccountLinkControllerCreateData;
8548
9298
  res: {
8549
9299
  /**
8550
- * Platform deleted successfully
9300
+ * Link created.
8551
9301
  */
8552
- 204: void;
9302
+ 201: ExternalAccountLinkResponseDto;
8553
9303
  /**
8554
- * Platform not found
9304
+ * beanAccountId not owned, or an active link already exists.
8555
9305
  */
8556
- 404: unknown;
9306
+ 422: unknown;
8557
9307
  };
8558
9308
  };
8559
- };
8560
- '/api/v1/{region}/bean/import/provider/{providerName}/sync': {
8561
- post: {
8562
- req: ProviderSyncControllerSyncData;
9309
+ get: {
9310
+ req: ExternalAccountLinkControllerFindAllData;
8563
9311
  res: {
8564
9312
  /**
8565
- * Sync completed successfully
8566
- */
8567
- 200: ProviderSyncResponseDto;
8568
- /**
8569
- * Invalid request data
8570
- */
8571
- 400: unknown;
8572
- /**
8573
- * Missing or invalid authentication
8574
- */
8575
- 401: unknown;
8576
- /**
8577
- * Provider not supported
9313
+ * Links retrieved.
8578
9314
  */
8579
- 404: unknown;
9315
+ 200: ExternalAccountLinkListResponseDto;
8580
9316
  };
8581
9317
  };
8582
9318
  };
8583
- '/api/v1/{region}/bean/import/provider/supported': {
9319
+ '/api/v1/{region}/bean/external-account-links/{id}': {
8584
9320
  get: {
8585
- req: ProviderSyncControllerGetSupportedProvidersData;
9321
+ req: ExternalAccountLinkControllerFindOneData;
8586
9322
  res: {
8587
9323
  /**
8588
- * List of supported providers
9324
+ * Link retrieved.
8589
9325
  */
8590
- 200: SupportedProvidersResponseDto;
9326
+ 200: ExternalAccountLinkResponseDto;
8591
9327
  /**
8592
- * Missing or invalid authentication
9328
+ * Link not found or not owned by the user.
8593
9329
  */
8594
- 401: unknown;
9330
+ 422: unknown;
8595
9331
  };
8596
9332
  };
8597
- };
8598
- '/api/v1/{region}/bean/import/provider/{providerName}/supported': {
8599
- get: {
8600
- req: ProviderSyncControllerIsProviderSupportedData;
9333
+ delete: {
9334
+ req: ExternalAccountLinkControllerRemoveData;
8601
9335
  res: {
8602
9336
  /**
8603
- * Provider support status
9337
+ * Link soft-deleted; historical transactions are unaffected.
8604
9338
  */
8605
- 200: unknown;
8606
- /**
8607
- * Missing or invalid authentication
8608
- */
8609
- 401: unknown;
9339
+ 204: void;
8610
9340
  };
8611
9341
  };
8612
9342
  };
@@ -8698,158 +9428,165 @@ export type $OpenApiTs = {
8698
9428
  };
8699
9429
  };
8700
9430
  };
8701
- '/api/v1/{region}/dashboard/net-worth': {
9431
+ '/api/v1/bean/platforms': {
8702
9432
  get: {
8703
- req: DashboardControllerGetNetWorthData;
8704
9433
  res: {
8705
9434
  /**
8706
- * Net worth retrieved successfully
8707
- */
8708
- 200: NetWorthResponseDto;
8709
- /**
8710
- * User not authenticated
9435
+ * List of platforms with binding and account counts
8711
9436
  */
8712
- 401: unknown;
9437
+ 200: unknown;
8713
9438
  };
8714
9439
  };
8715
- };
8716
- '/api/v1/{region}/dashboard/accounts': {
8717
- get: {
8718
- req: DashboardControllerGetAccountsData;
9440
+ post: {
9441
+ req: PlatformControllerCreateData;
8719
9442
  res: {
8720
9443
  /**
8721
- * Accounts retrieved successfully. Response type depends on groupBy parameter.
9444
+ * Platform created successfully
8722
9445
  */
8723
- 200:
8724
- | AccountsResponseDto
8725
- | AssetClassAccountsResponseDto
8726
- | HoldingAssetClassCrossAccountResponseDto;
9446
+ 201: unknown;
8727
9447
  /**
8728
- * User not authenticated
9448
+ * Platform already exists
8729
9449
  */
8730
- 401: unknown;
9450
+ 409: unknown;
8731
9451
  };
8732
9452
  };
8733
9453
  };
8734
- '/api/v1/{region}/dashboard/cash-flow': {
9454
+ '/api/v1/bean/platforms/list': {
8735
9455
  get: {
8736
- req: DashboardControllerGetCashFlowData;
8737
9456
  res: {
8738
9457
  /**
8739
- * Cash flow retrieved successfully
8740
- */
8741
- 200: CashFlowResponseDto;
8742
- /**
8743
- * Invalid period format
8744
- */
8745
- 400: unknown;
8746
- /**
8747
- * User not authenticated
9458
+ * List of platforms with user binding status
8748
9459
  */
8749
- 401: unknown;
9460
+ 200: Array<PlatformListItemDto>;
8750
9461
  };
8751
9462
  };
8752
9463
  };
8753
- '/api/v1/{region}/investment/holdings/pnl': {
9464
+ '/api/v1/bean/platforms/match': {
8754
9465
  get: {
8755
- req: HoldingPnlControllerGetHoldingPnlData;
9466
+ req: PlatformControllerMatchPlatformsData;
8756
9467
  res: {
8757
9468
  /**
8758
- * Holding P&L retrieved successfully
9469
+ * Matching platforms with overall match type and truncation flag
8759
9470
  */
8760
- 200: HoldingPnlResponseDto;
9471
+ 200: PlatformMatchResponseDto;
9472
+ };
9473
+ };
9474
+ };
9475
+ '/api/v1/bean/platforms/{id}': {
9476
+ put: {
9477
+ req: PlatformControllerUpdateData;
9478
+ res: {
8761
9479
  /**
8762
- * Invalid asOf format/value/future date, invalid accountId format, or unsupported method
9480
+ * Platform updated successfully
8763
9481
  */
8764
- 400: unknown;
9482
+ 200: unknown;
8765
9483
  /**
8766
- * User not authenticated
9484
+ * Platform not found
8767
9485
  */
8768
- 401: unknown;
9486
+ 404: unknown;
8769
9487
  };
8770
9488
  };
8771
- };
8772
- '/api/v1/{region}/bean/prices': {
8773
- post: {
8774
- req: PriceControllerCreateData;
9489
+ delete: {
9490
+ req: PlatformControllerDeleteData;
8775
9491
  res: {
8776
9492
  /**
8777
- * Price created successfully
9493
+ * Platform deleted successfully
8778
9494
  */
8779
- 201: PriceResponseDto;
9495
+ 204: void;
8780
9496
  /**
8781
- * Currency or quoteCurrency commodity not found
9497
+ * Platform not found
8782
9498
  */
8783
9499
  404: unknown;
8784
- /**
8785
- * Price already exists for this currency pair and date
8786
- */
8787
- 409: unknown;
8788
9500
  };
8789
9501
  };
9502
+ };
9503
+ '/api/v1/{region}/dashboard/net-worth': {
8790
9504
  get: {
8791
- req: PriceControllerFindAllData;
9505
+ req: DashboardControllerGetNetWorthData;
8792
9506
  res: {
8793
9507
  /**
8794
- * Prices retrieved successfully
9508
+ * Net worth retrieved successfully
8795
9509
  */
8796
- 200: PriceListResponseDto;
9510
+ 200: NetWorthResponseDto;
9511
+ /**
9512
+ * User not authenticated
9513
+ */
9514
+ 401: unknown;
8797
9515
  };
8798
9516
  };
8799
9517
  };
8800
- '/api/v1/{region}/bean/prices/{id}': {
9518
+ '/api/v1/{region}/dashboard/accounts': {
8801
9519
  get: {
8802
- req: PriceControllerFindOneData;
9520
+ req: DashboardControllerGetAccountsData;
8803
9521
  res: {
8804
9522
  /**
8805
- * Price retrieved successfully
9523
+ * Accounts retrieved successfully. Response type depends on groupBy parameter.
8806
9524
  */
8807
- 200: PriceResponseDto;
9525
+ 200:
9526
+ | AccountsResponseDto
9527
+ | AssetClassAccountsResponseDto
9528
+ | HoldingAssetClassCrossAccountResponseDto;
8808
9529
  /**
8809
- * Price not found
9530
+ * User not authenticated
8810
9531
  */
8811
- 404: unknown;
9532
+ 401: unknown;
8812
9533
  };
8813
9534
  };
8814
- put: {
8815
- req: PriceControllerUpdateData;
9535
+ };
9536
+ '/api/v1/{region}/dashboard/cash-flow': {
9537
+ get: {
9538
+ req: DashboardControllerGetCashFlowData;
8816
9539
  res: {
8817
9540
  /**
8818
- * Price updated successfully
9541
+ * Cash flow retrieved successfully
8819
9542
  */
8820
- 200: PriceResponseDto;
9543
+ 200: CashFlowResponseDto;
8821
9544
  /**
8822
- * Price not found
9545
+ * Invalid period format
8823
9546
  */
8824
- 404: unknown;
9547
+ 400: unknown;
8825
9548
  /**
8826
- * Updated price conflicts with existing price
9549
+ * User not authenticated
8827
9550
  */
8828
- 409: unknown;
9551
+ 401: unknown;
8829
9552
  };
8830
9553
  };
8831
- delete: {
8832
- req: PriceControllerDeleteData;
9554
+ };
9555
+ '/api/v1/{region}/dashboard/expenses': {
9556
+ get: {
9557
+ req: DashboardControllerGetExpensesData;
8833
9558
  res: {
8834
9559
  /**
8835
- * Price deleted successfully
9560
+ * Expenses retrieved successfully
8836
9561
  */
8837
- 204: void;
9562
+ 200: ExpensesByCategoryResponseDto;
8838
9563
  /**
8839
- * Price not found
9564
+ * Invalid groupBy or period
8840
9565
  */
8841
- 404: unknown;
9566
+ 400: unknown;
9567
+ /**
9568
+ * User not authenticated
9569
+ */
9570
+ 401: unknown;
8842
9571
  };
8843
9572
  };
8844
9573
  };
8845
- '/api/v1/{region}/bean/prices/bulk': {
8846
- post: {
8847
- req: PriceControllerBulkCreateData;
9574
+ '/api/v1/{region}/investment/holdings/pnl': {
9575
+ get: {
9576
+ req: HoldingPnlControllerGetHoldingPnlData;
8848
9577
  res: {
8849
9578
  /**
8850
- * Prices created successfully
9579
+ * Holding P&L retrieved successfully
8851
9580
  */
8852
- 201: Array<PriceResponseDto>;
9581
+ 200: HoldingPnlResponseDto;
9582
+ /**
9583
+ * Invalid asOf format/value/future date, invalid accountId format, or unsupported method
9584
+ */
9585
+ 400: unknown;
9586
+ /**
9587
+ * User not authenticated
9588
+ */
9589
+ 401: unknown;
8853
9590
  };
8854
9591
  };
8855
9592
  };