@firela/api-types 0.0.0-canary.610daafc → 0.0.0-canary.63a53b7d

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
  */
@@ -1966,6 +1960,108 @@ export type UpdateCommodityDto = {
1966
1960
  };
1967
1961
  };
1968
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
+
1969
2065
  export type CreateRecurringRuleDto = {
1970
2066
  /**
1971
2067
  * Rule name (unique per user)
@@ -3168,6 +3264,160 @@ export type UpdateBeanEventDto = {
3168
3264
  };
3169
3265
  };
3170
3266
 
3267
+ export type OnboardingAccountDto = {
3268
+ /**
3269
+ * Account path (Assets/Liabilities only; format validated by the account service)
3270
+ */
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;
3284
+ };
3285
+
3286
+ export type OnboardingDto = {
3287
+ /**
3288
+ * Asset/Liability accounts to register with opening balances
3289
+ */
3290
+ accounts?: Array<OnboardingAccountDto>;
3291
+ /**
3292
+ * Skip asset registration; only bootstrap the core account set
3293
+ */
3294
+ skipAssetRegistration?: boolean;
3295
+ };
3296
+
3297
+ export type ActualBalanceDto = {
3298
+ /**
3299
+ * Actual balance amount as a decimal string (preserves precision for tolerance inference).
3300
+ */
3301
+ amount: string;
3302
+ /**
3303
+ * Currency code (ISO 4217 or commodity ticker).
3304
+ */
3305
+ ccy: string;
3306
+ };
3307
+
3308
+ export type ComputeReconciliationDto = {
3309
+ /**
3310
+ * BeanAccount id to reconcile.
3311
+ */
3312
+ accountId: string;
3313
+ /**
3314
+ * Assertion date (ISO 8601, e.g. "2026-07-24").
3315
+ */
3316
+ asOfDate: string;
3317
+ /**
3318
+ * Actual balance from the external statement.
3319
+ */
3320
+ actualBalance: ActualBalanceDto;
3321
+ };
3322
+
3323
+ export type ReconciliationComputeResultDto = {
3324
+ accountId: string;
3325
+ asOfDate: string;
3326
+ /**
3327
+ * System-computed book balance (decimal string).
3328
+ */
3329
+ bookBalance: string;
3330
+ /**
3331
+ * User-entered actual balance (decimal string).
3332
+ */
3333
+ actualBalance: string;
3334
+ currency: string;
3335
+ /**
3336
+ * Diff = book − actual (decimal string).
3337
+ */
3338
+ diff: string;
3339
+ /**
3340
+ * Applied tolerance (decimal string).
3341
+ */
3342
+ tolerance: string;
3343
+ /**
3344
+ * true when |diff| ≤ tolerance.
3345
+ */
3346
+ withinTolerance: boolean;
3347
+ /**
3348
+ * Suggested next action: assert when within tolerance, pad otherwise.
3349
+ */
3350
+ suggestedAction: 'assert' | 'pad';
3351
+ };
3352
+
3353
+ /**
3354
+ * Suggested next action: assert when within tolerance, pad otherwise.
3355
+ */
3356
+ export type suggestedAction = 'assert' | 'pad';
3357
+
3358
+ export type AssertReconciliationDto = {
3359
+ /**
3360
+ * BeanAccount id to reconcile.
3361
+ */
3362
+ accountId: string;
3363
+ /**
3364
+ * Assertion date (ISO 8601, e.g. "2026-07-24").
3365
+ */
3366
+ asOfDate: string;
3367
+ /**
3368
+ * Actual balance from the external statement.
3369
+ */
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
+
3171
3421
  export type FileImportDto = {
3172
3422
  /**
3173
3423
  * Bill file to import (CSV, PDF, OFX, etc.)
@@ -3466,107 +3716,19 @@ export type UpdateImporterConfigDto = {
3466
3716
  data?: UpdateConfigDataDto;
3467
3717
  };
3468
3718
 
3469
- export type CreatePlatformDto = {
3719
+ export type ProviderSyncConfigDto = {
3470
3720
  /**
3471
- * Platform name
3721
+ * Source account for the first posting
3472
3722
  */
3473
- name: string;
3723
+ sourceAccount: string;
3474
3724
  /**
3475
- * Platform canonical identifier (lowercase, kebab-case)
3725
+ * Default currency for transactions
3476
3726
  */
3477
- canonical: string;
3727
+ defaultCurrency: string;
3478
3728
  /**
3479
- * Platform aliases (multi-language names for lookup)
3729
+ * Default expense account for the second posting
3480
3730
  */
3481
- aliases: Array<string>;
3482
- /**
3483
- * Platform URL
3484
- */
3485
- url: string;
3486
- /**
3487
- * Platform type
3488
- */
3489
- type:
3490
- | 'BANK'
3491
- | 'BROKERAGE'
3492
- | 'CRYPTO_EXCHANGE'
3493
- | 'PAYMENT'
3494
- | 'INVESTMENT'
3495
- | 'INSURANCE'
3496
- | 'OTHER';
3497
- /**
3498
- * Platform logo URL
3499
- */
3500
- logoUrl?: string;
3501
- /**
3502
- * Whether the platform is active
3503
- */
3504
- isActive?: boolean;
3505
- };
3506
-
3507
- /**
3508
- * Platform type
3509
- */
3510
- export type type3 =
3511
- | 'BANK'
3512
- | 'BROKERAGE'
3513
- | 'CRYPTO_EXCHANGE'
3514
- | 'PAYMENT'
3515
- | 'INVESTMENT'
3516
- | 'INSURANCE'
3517
- | 'OTHER';
3518
-
3519
- export type UpdatePlatformDto = {
3520
- /**
3521
- * Platform name
3522
- */
3523
- name?: string;
3524
- /**
3525
- * Platform canonical identifier (lowercase, kebab-case)
3526
- */
3527
- canonical?: string;
3528
- /**
3529
- * Platform aliases (multi-language names for lookup)
3530
- */
3531
- aliases?: Array<string>;
3532
- /**
3533
- * Platform URL
3534
- */
3535
- url?: string;
3536
- /**
3537
- * Platform type
3538
- */
3539
- type?:
3540
- | 'BANK'
3541
- | 'BROKERAGE'
3542
- | 'CRYPTO_EXCHANGE'
3543
- | 'PAYMENT'
3544
- | 'INVESTMENT'
3545
- | 'INSURANCE'
3546
- | 'OTHER';
3547
- /**
3548
- * Platform logo URL
3549
- */
3550
- logoUrl?: string;
3551
- /**
3552
- * Whether the platform is active
3553
- */
3554
- isActive?: boolean;
3555
- };
3556
-
3557
- export type ProviderSyncConfigDto = {
3558
- /**
3559
- * Source account for the first posting
3560
- */
3561
- sourceAccount: string;
3562
- /**
3563
- * Default currency for transactions
3564
- */
3565
- defaultCurrency: string;
3566
- /**
3567
- * Default expense account for the second posting
3568
- */
3569
- defaultExpenseAccount: string;
3731
+ defaultExpenseAccount: string;
3570
3732
  /**
3571
3733
  * Default income account for the second posting
3572
3734
  */
@@ -3575,6 +3737,10 @@ export type ProviderSyncConfigDto = {
3575
3737
  * Filter pending transactions
3576
3738
  */
3577
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;
3578
3744
  };
3579
3745
 
3580
3746
  export type ProviderSyncDto = {
@@ -3630,6 +3796,61 @@ export type SupportedProvidersResponseDto = {
3630
3796
  providers: Array<string>;
3631
3797
  };
3632
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
+
3633
3854
  export type ParserTelemetryReportDto = unknown;
3634
3855
 
3635
3856
  export type UncoveredFormatMissDto = unknown;
@@ -4209,6 +4430,94 @@ export type liabilitySubType = 'borrow' | 'repay';
4209
4430
  */
4210
4431
  export type equitySubType = 'opening' | 'adjustment';
4211
4432
 
4433
+ export type CreatePlatformDto = {
4434
+ /**
4435
+ * Platform name
4436
+ */
4437
+ name: string;
4438
+ /**
4439
+ * Platform canonical identifier (lowercase, kebab-case)
4440
+ */
4441
+ canonical: string;
4442
+ /**
4443
+ * Platform aliases (multi-language names for lookup)
4444
+ */
4445
+ aliases: Array<string>;
4446
+ /**
4447
+ * Platform URL
4448
+ */
4449
+ url: string;
4450
+ /**
4451
+ * Platform type
4452
+ */
4453
+ type:
4454
+ | 'BANK'
4455
+ | 'BROKERAGE'
4456
+ | 'CRYPTO_EXCHANGE'
4457
+ | 'PAYMENT'
4458
+ | 'INVESTMENT'
4459
+ | 'INSURANCE'
4460
+ | 'OTHER';
4461
+ /**
4462
+ * Platform logo URL
4463
+ */
4464
+ logoUrl?: string;
4465
+ /**
4466
+ * Whether the platform is active
4467
+ */
4468
+ isActive?: boolean;
4469
+ };
4470
+
4471
+ /**
4472
+ * Platform type
4473
+ */
4474
+ export type type3 =
4475
+ | 'BANK'
4476
+ | 'BROKERAGE'
4477
+ | 'CRYPTO_EXCHANGE'
4478
+ | 'PAYMENT'
4479
+ | 'INVESTMENT'
4480
+ | 'INSURANCE'
4481
+ | 'OTHER';
4482
+
4483
+ export type UpdatePlatformDto = {
4484
+ /**
4485
+ * Platform name
4486
+ */
4487
+ name?: string;
4488
+ /**
4489
+ * Platform canonical identifier (lowercase, kebab-case)
4490
+ */
4491
+ canonical?: string;
4492
+ /**
4493
+ * Platform aliases (multi-language names for lookup)
4494
+ */
4495
+ aliases?: Array<string>;
4496
+ /**
4497
+ * Platform URL
4498
+ */
4499
+ url?: 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
+ * Platform logo URL
4513
+ */
4514
+ logoUrl?: string;
4515
+ /**
4516
+ * Whether the platform is active
4517
+ */
4518
+ isActive?: boolean;
4519
+ };
4520
+
4212
4521
  export type NetWorthByCurrencyDto = {
4213
4522
  /**
4214
4523
  * Net worth by currency
@@ -4922,157 +5231,55 @@ export type HoldingPnlResponseDto = {
4922
5231
  */
4923
5232
  export type method = 'average' | 'FIFO';
4924
5233
 
4925
- export type CreateBeanPriceDto = {
5234
+ export type CurrencyBalanceDto = {
4926
5235
  /**
4927
- * Currency being priced (e.g., USD, AAPL, BTC)
5236
+ * ISO 4217 currency code
4928
5237
  */
4929
5238
  currency: string;
4930
5239
  /**
4931
- * Quote currency (pricing currency, e.g., CNY, EUR)
5240
+ * Balance amount
4932
5241
  */
4933
- quoteCurrency: string;
5242
+ balance: string;
5243
+ };
5244
+
5245
+ export type TimeSeriesPointDto = {
4934
5246
  /**
4935
- * Price amount (MUST be >= 0 per Beancount spec, supports up to 15 decimal places). Zero allowed for conversion entries, negative strictly prohibited.
5247
+ * Date in YYYY-MM-DD format
4936
5248
  */
4937
- amount: number;
5249
+ date: string;
4938
5250
  /**
4939
- * Price date (ISO 8601 format)
5251
+ * Value at this date (in base currency)
4940
5252
  */
4941
- date: string;
5253
+ value: string;
4942
5254
  /**
4943
- * Metadata (validated by Zod schema, max field lengths enforced)
5255
+ * Change from previous point
4944
5256
  */
4945
- metadata?: {
5257
+ change?: {
4946
5258
  [key: string]: unknown;
4947
5259
  };
4948
- };
4949
-
4950
- export type PriceResponseDto = {
4951
5260
  /**
4952
- * Unique identifier
5261
+ * Total assets at this date (in base currency)
4953
5262
  */
4954
- id: string;
5263
+ assets?: string;
4955
5264
  /**
4956
- * User ID (owner of the price)
5265
+ * Total liabilities at this date (in base currency)
4957
5266
  */
4958
- userId: string;
5267
+ liabilities?: string;
4959
5268
  /**
4960
- * Currency being priced (e.g., USD, AAPL, BTC)
5269
+ * Multi-currency breakdown for this point
4961
5270
  */
4962
- currency: string;
5271
+ byCurrency?: Array<CurrencyBalanceDto>;
5272
+ };
5273
+
5274
+ export type TrendSummaryDto = {
4963
5275
  /**
4964
- * Quote currency (pricing currency, e.g., USD, CNY)
5276
+ * Value at start of period
4965
5277
  */
4966
- quoteCurrency: string;
5278
+ startValue: string;
4967
5279
  /**
4968
- * Price amount (corresponds to Beancount Amount.number). Supports up to 15 decimal places.
5280
+ * Value at end of period
4969
5281
  */
4970
- amount: number;
4971
- /**
4972
- * Price date (ISO 8601 format). Represents the date this price was valid.
4973
- */
4974
- date: string;
4975
- /**
4976
- * Metadata (corresponds to Beancount meta field). Contains source, confidence, note, etc.
4977
- */
4978
- meta: {
4979
- [key: string]: unknown;
4980
- };
4981
- /**
4982
- * Creation timestamp
4983
- */
4984
- createdAt: string;
4985
- /**
4986
- * Last update timestamp
4987
- */
4988
- updatedAt: string;
4989
- };
4990
-
4991
- export type PriceListResponseDto = {
4992
- /**
4993
- * List of prices
4994
- */
4995
- items: Array<PriceResponseDto>;
4996
- /**
4997
- * Total number of prices
4998
- */
4999
- total: number;
5000
- };
5001
-
5002
- export type UpdateBeanPriceDto = {
5003
- /**
5004
- * Currency being priced
5005
- */
5006
- currency?: string;
5007
- /**
5008
- * Quote currency (pricing currency)
5009
- */
5010
- quoteCurrency?: string;
5011
- /**
5012
- * Price amount (MUST be >= 0 per Beancount spec)
5013
- */
5014
- amount?: number;
5015
- /**
5016
- * Price date (ISO 8601 format)
5017
- */
5018
- date?: string;
5019
- /**
5020
- * Metadata
5021
- */
5022
- metadata?: {
5023
- [key: string]: unknown;
5024
- };
5025
- };
5026
-
5027
- export type CurrencyBalanceDto = {
5028
- /**
5029
- * ISO 4217 currency code
5030
- */
5031
- currency: string;
5032
- /**
5033
- * Balance amount
5034
- */
5035
- balance: string;
5036
- };
5037
-
5038
- export type TimeSeriesPointDto = {
5039
- /**
5040
- * Date in YYYY-MM-DD format
5041
- */
5042
- date: string;
5043
- /**
5044
- * Value at this date (in base currency)
5045
- */
5046
- value: string;
5047
- /**
5048
- * Change from previous point
5049
- */
5050
- change?: {
5051
- [key: string]: unknown;
5052
- };
5053
- /**
5054
- * Total assets at this date (in base currency)
5055
- */
5056
- assets?: string;
5057
- /**
5058
- * Total liabilities at this date (in base currency)
5059
- */
5060
- liabilities?: string;
5061
- /**
5062
- * Multi-currency breakdown for this point
5063
- */
5064
- byCurrency?: Array<CurrencyBalanceDto>;
5065
- };
5066
-
5067
- export type TrendSummaryDto = {
5068
- /**
5069
- * Value at start of period
5070
- */
5071
- startValue: string;
5072
- /**
5073
- * Value at end of period
5074
- */
5075
- endValue: string;
5282
+ endValue: string;
5076
5283
  /**
5077
5284
  * Total change over period
5078
5285
  */
@@ -5233,7 +5440,7 @@ export type AccountControllerFindAllData = {
5233
5440
  */
5234
5441
  region: 'cn' | 'us' | 'de' | 'gb';
5235
5442
  /**
5236
- * Search term for path or i18nKey
5443
+ * Search term for account path
5237
5444
  */
5238
5445
  search?: string;
5239
5446
  /**
@@ -5316,6 +5523,21 @@ export type AccountControllerReopenData = {
5316
5523
 
5317
5524
  export type AccountControllerReopenResponse = AccountResponseDto;
5318
5525
 
5526
+ export type AccountControllerAddOpeningBalanceData = {
5527
+ /**
5528
+ * Account UUID
5529
+ */
5530
+ id: string;
5531
+ /**
5532
+ * Region code for tenant context
5533
+ */
5534
+ region: 'cn' | 'us' | 'de' | 'gb';
5535
+ requestBody: CreateOpeningBalanceDto;
5536
+ };
5537
+
5538
+ export type AccountControllerAddOpeningBalanceResponse =
5539
+ OpeningBalanceResultDto;
5540
+
5319
5541
  export type AccountStandardsControllerGetTemplatesData = {
5320
5542
  /**
5321
5543
  * Region code (cn, us, de)
@@ -5504,7 +5726,7 @@ export type TransactionControllerDeleteResponse = void;
5504
5726
 
5505
5727
  export type BalanceControllerGetBalanceData = {
5506
5728
  /**
5507
- * Account name (e.g., "Assets:Bank:Checking")
5729
+ * Account name (e.g., "Assets:Checking")
5508
5730
  */
5509
5731
  account: string;
5510
5732
  /**
@@ -5906,6 +6128,103 @@ export type CommodityControllerBulkCreateData = {
5906
6128
 
5907
6129
  export type CommodityControllerBulkCreateResponse = Array<CommodityResponseDto>;
5908
6130
 
6131
+ export type PriceControllerCreateData = {
6132
+ /**
6133
+ * Region code for tenant context
6134
+ */
6135
+ region: 'cn' | 'us' | 'de' | 'gb';
6136
+ requestBody: CreateBeanPriceDto;
6137
+ };
6138
+
6139
+ export type PriceControllerCreateResponse = PriceResponseDto;
6140
+
6141
+ export type PriceControllerFindAllData = {
6142
+ /**
6143
+ * Filter by currency (e.g., BTC, AAPL, USD)
6144
+ */
6145
+ currency?: string;
6146
+ /**
6147
+ * Filter prices from this date (ISO 8601 format)
6148
+ */
6149
+ dateFrom?: string;
6150
+ /**
6151
+ * Filter prices to this date (ISO 8601 format)
6152
+ */
6153
+ dateTo?: string;
6154
+ /**
6155
+ * Number of items per page (default: 20, max: 100)
6156
+ */
6157
+ limit?: number;
6158
+ /**
6159
+ * Page number for pagination (default: 1)
6160
+ */
6161
+ page?: number;
6162
+ /**
6163
+ * Filter by quote currency (pricing currency, e.g., USD, CNY)
6164
+ */
6165
+ quoteCurrency?: string;
6166
+ /**
6167
+ * Region code for tenant context
6168
+ */
6169
+ region: 'cn' | 'us' | 'de' | 'gb';
6170
+ /**
6171
+ * Search term for currency or quoteCurrency (case-insensitive partial match)
6172
+ */
6173
+ search?: string;
6174
+ };
6175
+
6176
+ export type PriceControllerFindAllResponse = PriceListResponseDto;
6177
+
6178
+ export type PriceControllerFindOneData = {
6179
+ /**
6180
+ * Price ID
6181
+ */
6182
+ id: string;
6183
+ /**
6184
+ * Region code for tenant context
6185
+ */
6186
+ region: 'cn' | 'us' | 'de' | 'gb';
6187
+ };
6188
+
6189
+ export type PriceControllerFindOneResponse = PriceResponseDto;
6190
+
6191
+ export type PriceControllerUpdateData = {
6192
+ /**
6193
+ * Price ID
6194
+ */
6195
+ id: string;
6196
+ /**
6197
+ * Region code for tenant context
6198
+ */
6199
+ region: 'cn' | 'us' | 'de' | 'gb';
6200
+ requestBody: UpdateBeanPriceDto;
6201
+ };
6202
+
6203
+ export type PriceControllerUpdateResponse = PriceResponseDto;
6204
+
6205
+ export type PriceControllerDeleteData = {
6206
+ /**
6207
+ * Price ID
6208
+ */
6209
+ id: string;
6210
+ /**
6211
+ * Region code for tenant context
6212
+ */
6213
+ region: 'cn' | 'us' | 'de' | 'gb';
6214
+ };
6215
+
6216
+ export type PriceControllerDeleteResponse = void;
6217
+
6218
+ export type PriceControllerBulkCreateData = {
6219
+ /**
6220
+ * Region code for tenant context
6221
+ */
6222
+ region: 'cn' | 'us' | 'de' | 'gb';
6223
+ requestBody: Array<string>;
6224
+ };
6225
+
6226
+ export type PriceControllerBulkCreateResponse = Array<PriceResponseDto>;
6227
+
5909
6228
  export type RecurringRuleControllerCreateData = {
5910
6229
  /**
5911
6230
  * Region code for tenant context
@@ -6469,6 +6788,61 @@ export type EventControllerGetSliceData = {
6469
6788
 
6470
6789
  export type EventControllerGetSliceResponse = unknown;
6471
6790
 
6791
+ export type OnboardingControllerBootstrapData = {
6792
+ /**
6793
+ * Region code for tenant context
6794
+ */
6795
+ region: 'cn' | 'us' | 'de' | 'gb';
6796
+ requestBody: OnboardingDto;
6797
+ };
6798
+
6799
+ export type OnboardingControllerBootstrapResponse = unknown;
6800
+
6801
+ export type ReconciliationControllerComputeData = {
6802
+ /**
6803
+ * Region code for tenant context (decorative for reconciliation)
6804
+ */
6805
+ region: 'cn' | 'us' | 'de' | 'gb';
6806
+ requestBody: ComputeReconciliationDto;
6807
+ };
6808
+
6809
+ export type ReconciliationControllerComputeResponse =
6810
+ ReconciliationComputeResultDto;
6811
+
6812
+ export type ReconciliationControllerAssertData = {
6813
+ /**
6814
+ * Region code for tenant context (decorative for reconciliation)
6815
+ */
6816
+ region: 'cn' | 'us' | 'de' | 'gb';
6817
+ requestBody: AssertReconciliationDto;
6818
+ };
6819
+
6820
+ export type ReconciliationControllerAssertResponse = ReconciliationRecordDto;
6821
+
6822
+ export type ReconciliationControllerPadData = {
6823
+ /**
6824
+ * Region code for tenant context (decorative for reconciliation)
6825
+ */
6826
+ region: 'cn' | 'us' | 'de' | 'gb';
6827
+ requestBody: PadReconciliationDto;
6828
+ };
6829
+
6830
+ export type ReconciliationControllerPadResponse = PadResultDto;
6831
+
6832
+ export type ReconciliationControllerHistoryData = {
6833
+ /**
6834
+ * BeanAccount id
6835
+ */
6836
+ accountId: string;
6837
+ /**
6838
+ * Region code for tenant context (decorative for reconciliation)
6839
+ */
6840
+ region: 'cn' | 'us' | 'de' | 'gb';
6841
+ };
6842
+
6843
+ export type ReconciliationControllerHistoryResponse =
6844
+ Array<ReconciliationRecordDto>;
6845
+
6472
6846
  export type ExportControllerExportBeancountResponse = unknown;
6473
6847
 
6474
6848
  export type FileImportControllerImportFileData = {
@@ -6561,48 +6935,6 @@ export type ImporterConfigControllerResetConfigData = {
6561
6935
 
6562
6936
  export type ImporterConfigControllerResetConfigResponse = ImporterConfigDto;
6563
6937
 
6564
- export type PlatformControllerFindAllResponse = unknown;
6565
-
6566
- export type PlatformControllerCreateData = {
6567
- requestBody: CreatePlatformDto;
6568
- };
6569
-
6570
- export type PlatformControllerCreateResponse = unknown;
6571
-
6572
- export type PlatformControllerGetPlatformListResponse = unknown;
6573
-
6574
- export type PlatformControllerMatchPlatformsData = {
6575
- /**
6576
- * Search query — Chinese name, English name, or abbreviation
6577
- */
6578
- q: string;
6579
- /**
6580
- * Region code for category override lookup
6581
- */
6582
- region?: string;
6583
- };
6584
-
6585
- export type PlatformControllerMatchPlatformsResponse = unknown;
6586
-
6587
- export type PlatformControllerUpdateData = {
6588
- /**
6589
- * Platform ID
6590
- */
6591
- id: string;
6592
- requestBody: UpdatePlatformDto;
6593
- };
6594
-
6595
- export type PlatformControllerUpdateResponse = unknown;
6596
-
6597
- export type PlatformControllerDeleteData = {
6598
- /**
6599
- * Platform ID
6600
- */
6601
- id: string;
6602
- };
6603
-
6604
- export type PlatformControllerDeleteResponse = void;
6605
-
6606
6938
  export type ProviderSyncControllerSyncData = {
6607
6939
  /**
6608
6940
  * Provider name
@@ -6648,6 +6980,49 @@ export type ProviderSyncControllerIsProviderSupportedData = {
6648
6980
 
6649
6981
  export type ProviderSyncControllerIsProviderSupportedResponse = unknown;
6650
6982
 
6983
+ export type ExternalAccountLinkControllerCreateData = {
6984
+ /**
6985
+ * Region code for tenant context
6986
+ */
6987
+ region: 'cn' | 'us' | 'de' | 'gb';
6988
+ requestBody: CreateExternalAccountLinkDto;
6989
+ };
6990
+
6991
+ export type ExternalAccountLinkControllerCreateResponse =
6992
+ ExternalAccountLinkResponseDto;
6993
+
6994
+ export type ExternalAccountLinkControllerFindAllData = {
6995
+ provider: string;
6996
+ /**
6997
+ * Region code for tenant context
6998
+ */
6999
+ region: 'cn' | 'us' | 'de' | 'gb';
7000
+ };
7001
+
7002
+ export type ExternalAccountLinkControllerFindAllResponse =
7003
+ ExternalAccountLinkListResponseDto;
7004
+
7005
+ export type ExternalAccountLinkControllerFindOneData = {
7006
+ id: string;
7007
+ /**
7008
+ * Region code for tenant context
7009
+ */
7010
+ region: 'cn' | 'us' | 'de' | 'gb';
7011
+ };
7012
+
7013
+ export type ExternalAccountLinkControllerFindOneResponse =
7014
+ ExternalAccountLinkResponseDto;
7015
+
7016
+ export type ExternalAccountLinkControllerRemoveData = {
7017
+ id: string;
7018
+ /**
7019
+ * Region code for tenant context
7020
+ */
7021
+ region: 'cn' | 'us' | 'de' | 'gb';
7022
+ };
7023
+
7024
+ export type ExternalAccountLinkControllerRemoveResponse = void;
7025
+
6651
7026
  export type TelemetryControllerReportTelemetryData = {
6652
7027
  /**
6653
7028
  * Region code for tenant context
@@ -6720,6 +7095,48 @@ export type NlpControllerGetSessionData = {
6720
7095
 
6721
7096
  export type NlpControllerGetSessionResponse = unknown;
6722
7097
 
7098
+ export type PlatformControllerFindAllResponse = unknown;
7099
+
7100
+ export type PlatformControllerCreateData = {
7101
+ requestBody: CreatePlatformDto;
7102
+ };
7103
+
7104
+ export type PlatformControllerCreateResponse = unknown;
7105
+
7106
+ export type PlatformControllerGetPlatformListResponse = unknown;
7107
+
7108
+ export type PlatformControllerMatchPlatformsData = {
7109
+ /**
7110
+ * Search query — Chinese name, English name, or abbreviation
7111
+ */
7112
+ q: string;
7113
+ /**
7114
+ * Region code for category override lookup
7115
+ */
7116
+ region?: string;
7117
+ };
7118
+
7119
+ export type PlatformControllerMatchPlatformsResponse = unknown;
7120
+
7121
+ export type PlatformControllerUpdateData = {
7122
+ /**
7123
+ * Platform ID
7124
+ */
7125
+ id: string;
7126
+ requestBody: UpdatePlatformDto;
7127
+ };
7128
+
7129
+ export type PlatformControllerUpdateResponse = unknown;
7130
+
7131
+ export type PlatformControllerDeleteData = {
7132
+ /**
7133
+ * Platform ID
7134
+ */
7135
+ id: string;
7136
+ };
7137
+
7138
+ export type PlatformControllerDeleteResponse = void;
7139
+
6723
7140
  export type DashboardControllerGetNetWorthData = {
6724
7141
  /**
6725
7142
  * Date for balance calculation (ISO 8601 format)
@@ -6817,103 +7234,6 @@ export type HoldingPnlControllerGetHoldingPnlData = {
6817
7234
 
6818
7235
  export type HoldingPnlControllerGetHoldingPnlResponse = HoldingPnlResponseDto;
6819
7236
 
6820
- export type PriceControllerCreateData = {
6821
- /**
6822
- * Region code for tenant context
6823
- */
6824
- region: 'cn' | 'us' | 'de' | 'gb';
6825
- requestBody: CreateBeanPriceDto;
6826
- };
6827
-
6828
- export type PriceControllerCreateResponse = PriceResponseDto;
6829
-
6830
- export type PriceControllerFindAllData = {
6831
- /**
6832
- * Filter by currency (e.g., BTC, AAPL, USD)
6833
- */
6834
- currency?: string;
6835
- /**
6836
- * Filter prices from this date (ISO 8601 format)
6837
- */
6838
- dateFrom?: string;
6839
- /**
6840
- * Filter prices to this date (ISO 8601 format)
6841
- */
6842
- dateTo?: string;
6843
- /**
6844
- * Number of items per page (default: 20, max: 100)
6845
- */
6846
- limit?: number;
6847
- /**
6848
- * Page number for pagination (default: 1)
6849
- */
6850
- page?: number;
6851
- /**
6852
- * Filter by quote currency (pricing currency, e.g., USD, CNY)
6853
- */
6854
- quoteCurrency?: string;
6855
- /**
6856
- * Region code for tenant context
6857
- */
6858
- region: 'cn' | 'us' | 'de' | 'gb';
6859
- /**
6860
- * Search term for currency or quoteCurrency (case-insensitive partial match)
6861
- */
6862
- search?: string;
6863
- };
6864
-
6865
- export type PriceControllerFindAllResponse = PriceListResponseDto;
6866
-
6867
- export type PriceControllerFindOneData = {
6868
- /**
6869
- * Price ID
6870
- */
6871
- id: string;
6872
- /**
6873
- * Region code for tenant context
6874
- */
6875
- region: 'cn' | 'us' | 'de' | 'gb';
6876
- };
6877
-
6878
- export type PriceControllerFindOneResponse = PriceResponseDto;
6879
-
6880
- export type PriceControllerUpdateData = {
6881
- /**
6882
- * Price ID
6883
- */
6884
- id: string;
6885
- /**
6886
- * Region code for tenant context
6887
- */
6888
- region: 'cn' | 'us' | 'de' | 'gb';
6889
- requestBody: UpdateBeanPriceDto;
6890
- };
6891
-
6892
- export type PriceControllerUpdateResponse = PriceResponseDto;
6893
-
6894
- export type PriceControllerDeleteData = {
6895
- /**
6896
- * Price ID
6897
- */
6898
- id: string;
6899
- /**
6900
- * Region code for tenant context
6901
- */
6902
- region: 'cn' | 'us' | 'de' | 'gb';
6903
- };
6904
-
6905
- export type PriceControllerDeleteResponse = void;
6906
-
6907
- export type PriceControllerBulkCreateData = {
6908
- /**
6909
- * Region code for tenant context
6910
- */
6911
- region: 'cn' | 'us' | 'de' | 'gb';
6912
- requestBody: Array<string>;
6913
- };
6914
-
6915
- export type PriceControllerBulkCreateResponse = Array<PriceResponseDto>;
6916
-
6917
7237
  export type ReportingControllerGetPortfolioTrendsData = {
6918
7238
  /**
6919
7239
  * Data granularity
@@ -7129,6 +7449,25 @@ export type $OpenApiTs = {
7129
7449
  };
7130
7450
  };
7131
7451
  };
7452
+ '/api/v1/{region}/bean/accounts/{id}/opening-balance': {
7453
+ post: {
7454
+ req: AccountControllerAddOpeningBalanceData;
7455
+ res: {
7456
+ /**
7457
+ * Opening-balance transaction created
7458
+ */
7459
+ 201: OpeningBalanceResultDto;
7460
+ /**
7461
+ * Account not found
7462
+ */
7463
+ 404: unknown;
7464
+ /**
7465
+ * An opening balance already exists for this account
7466
+ */
7467
+ 409: unknown;
7468
+ };
7469
+ };
7470
+ };
7132
7471
  '/api/v1/{region}/bean/account-standards': {
7133
7472
  get: {
7134
7473
  req: AccountStandardsControllerGetTemplatesData;
@@ -7737,54 +8076,138 @@ export type $OpenApiTs = {
7737
8076
  };
7738
8077
  };
7739
8078
  };
7740
- '/api/v1/{region}/bean/recurring-rules': {
8079
+ '/api/v1/{region}/bean/prices': {
7741
8080
  post: {
7742
- req: RecurringRuleControllerCreateData;
8081
+ req: PriceControllerCreateData;
7743
8082
  res: {
7744
8083
  /**
7745
- * Rule created successfully
8084
+ * Price created successfully
7746
8085
  */
7747
- 201: RecurringRuleResponseDto;
8086
+ 201: PriceResponseDto;
7748
8087
  /**
7749
- * Invalid input data (e.g., autoCreate without accounts)
8088
+ * Currency or quoteCurrency commodity not found
7750
8089
  */
7751
- 400: unknown;
8090
+ 404: unknown;
7752
8091
  /**
7753
- * Rule with same name already exists
8092
+ * Price already exists for this currency pair and date
7754
8093
  */
7755
8094
  409: unknown;
7756
8095
  };
7757
8096
  };
7758
8097
  get: {
7759
- req: RecurringRuleControllerFindAllData;
8098
+ req: PriceControllerFindAllData;
7760
8099
  res: {
7761
8100
  /**
7762
- * Rules retrieved successfully
8101
+ * Prices retrieved successfully
7763
8102
  */
7764
- 200: Array<RecurringRuleResponseDto>;
8103
+ 200: PriceListResponseDto;
7765
8104
  };
7766
8105
  };
7767
8106
  };
7768
- '/api/v1/{region}/bean/recurring-rules/from-transaction/{transactionId}': {
7769
- post: {
7770
- req: RecurringRuleControllerCreateFromTransactionData;
8107
+ '/api/v1/{region}/bean/prices/{id}': {
8108
+ get: {
8109
+ req: PriceControllerFindOneData;
7771
8110
  res: {
7772
8111
  /**
7773
- * Rule created successfully
7774
- */
7775
- 201: RecurringRuleResponseDto;
7776
- /**
7777
- * Transaction not found
8112
+ * Price retrieved successfully
7778
8113
  */
7779
- 404: ApiProblemResponseDto;
8114
+ 200: PriceResponseDto;
7780
8115
  /**
7781
- * Rule with same name already exists or transaction already linked
8116
+ * Price not found
7782
8117
  */
7783
- 409: ApiProblemResponseDto;
8118
+ 404: unknown;
7784
8119
  };
7785
8120
  };
7786
- };
7787
- '/api/v1/{region}/bean/recurring-rules/{id}': {
8121
+ put: {
8122
+ req: PriceControllerUpdateData;
8123
+ res: {
8124
+ /**
8125
+ * Price updated successfully
8126
+ */
8127
+ 200: PriceResponseDto;
8128
+ /**
8129
+ * Price not found
8130
+ */
8131
+ 404: unknown;
8132
+ /**
8133
+ * Updated price conflicts with existing price
8134
+ */
8135
+ 409: unknown;
8136
+ };
8137
+ };
8138
+ delete: {
8139
+ req: PriceControllerDeleteData;
8140
+ res: {
8141
+ /**
8142
+ * Price deleted successfully
8143
+ */
8144
+ 204: void;
8145
+ /**
8146
+ * Price not found
8147
+ */
8148
+ 404: unknown;
8149
+ };
8150
+ };
8151
+ };
8152
+ '/api/v1/{region}/bean/prices/bulk': {
8153
+ post: {
8154
+ req: PriceControllerBulkCreateData;
8155
+ res: {
8156
+ /**
8157
+ * Prices created successfully
8158
+ */
8159
+ 201: Array<PriceResponseDto>;
8160
+ };
8161
+ };
8162
+ };
8163
+ '/api/v1/{region}/bean/recurring-rules': {
8164
+ post: {
8165
+ req: RecurringRuleControllerCreateData;
8166
+ res: {
8167
+ /**
8168
+ * Rule created successfully
8169
+ */
8170
+ 201: RecurringRuleResponseDto;
8171
+ /**
8172
+ * Invalid input data (e.g., autoCreate without accounts)
8173
+ */
8174
+ 400: unknown;
8175
+ /**
8176
+ * Rule with same name already exists
8177
+ */
8178
+ 409: unknown;
8179
+ };
8180
+ };
8181
+ get: {
8182
+ req: RecurringRuleControllerFindAllData;
8183
+ res: {
8184
+ /**
8185
+ * Rules retrieved successfully
8186
+ */
8187
+ 200: Array<RecurringRuleResponseDto>;
8188
+ };
8189
+ };
8190
+ };
8191
+ '/api/v1/{region}/bean/recurring-rules/from-transaction/{transactionId}': {
8192
+ post: {
8193
+ req: RecurringRuleControllerCreateFromTransactionData;
8194
+ res: {
8195
+ /**
8196
+ * Rule created successfully
8197
+ */
8198
+ 201: RecurringRuleResponseDto;
8199
+ /**
8200
+ * Transaction not found
8201
+ */
8202
+ 404: ApiProblemResponseDto;
8203
+ /**
8204
+ * Rule with same name already exists or transaction already linked
8205
+ */
8206
+ 409: ApiProblemResponseDto;
8207
+ };
8208
+ };
8209
+ };
8210
+ '/api/v1/{region}/bean/recurring-rules/{id}': {
7788
8211
  get: {
7789
8212
  req: RecurringRuleControllerFindOneData;
7790
8213
  res: {
@@ -8477,6 +8900,85 @@ export type $OpenApiTs = {
8477
8900
  };
8478
8901
  };
8479
8902
  };
8903
+ '/api/v1/{region}/bean/onboarding': {
8904
+ post: {
8905
+ req: OnboardingControllerBootstrapData;
8906
+ res: {
8907
+ /**
8908
+ * Onboarding bootstrap result.
8909
+ */
8910
+ 201: unknown;
8911
+ /**
8912
+ * Invalid region/account path/duplicate paths.
8913
+ */
8914
+ 422: unknown;
8915
+ };
8916
+ };
8917
+ };
8918
+ '/api/v1/{region}/bean/reconciliations': {
8919
+ post: {
8920
+ req: ReconciliationControllerComputeData;
8921
+ res: {
8922
+ /**
8923
+ * Reconciliation preview
8924
+ */
8925
+ 200: ReconciliationComputeResultDto;
8926
+ /**
8927
+ * Account not found
8928
+ */
8929
+ 404: unknown;
8930
+ };
8931
+ };
8932
+ };
8933
+ '/api/v1/{region}/bean/reconciliations/assert': {
8934
+ post: {
8935
+ req: ReconciliationControllerAssertData;
8936
+ res: {
8937
+ /**
8938
+ * Balance assertion recorded
8939
+ */
8940
+ 201: ReconciliationRecordDto;
8941
+ /**
8942
+ * Account not found
8943
+ */
8944
+ 404: unknown;
8945
+ };
8946
+ };
8947
+ };
8948
+ '/api/v1/{region}/bean/reconciliations/pad': {
8949
+ post: {
8950
+ req: ReconciliationControllerPadData;
8951
+ res: {
8952
+ /**
8953
+ * Pad adjusting entry generated
8954
+ */
8955
+ 201: PadResultDto;
8956
+ /**
8957
+ * Book already within tolerance — no pad needed
8958
+ */
8959
+ 400: unknown;
8960
+ /**
8961
+ * Account not found
8962
+ */
8963
+ 404: unknown;
8964
+ };
8965
+ };
8966
+ };
8967
+ '/api/v1/{region}/bean/accounts/{accountId}/reconciliations': {
8968
+ get: {
8969
+ req: ReconciliationControllerHistoryData;
8970
+ res: {
8971
+ /**
8972
+ * Reconciliation history
8973
+ */
8974
+ 200: Array<ReconciliationRecordDto>;
8975
+ /**
8976
+ * Account not found
8977
+ */
8978
+ 404: unknown;
8979
+ };
8980
+ };
8981
+ };
8480
8982
  '/api/v1/{region}/bean/export/beancount': {
8481
8983
  get: {
8482
8984
  res: {
@@ -8627,128 +9129,104 @@ export type $OpenApiTs = {
8627
9129
  };
8628
9130
  };
8629
9131
  };
8630
- '/api/v1/bean/platforms': {
8631
- get: {
9132
+ '/api/v1/{region}/bean/import/provider/{providerName}/sync': {
9133
+ post: {
9134
+ req: ProviderSyncControllerSyncData;
8632
9135
  res: {
8633
9136
  /**
8634
- * List of platforms with binding and account counts
9137
+ * Sync completed successfully
8635
9138
  */
8636
- 200: unknown;
8637
- };
8638
- };
8639
- post: {
8640
- req: PlatformControllerCreateData;
8641
- res: {
9139
+ 200: ProviderSyncResponseDto;
8642
9140
  /**
8643
- * Platform created successfully
9141
+ * Invalid request data
8644
9142
  */
8645
- 201: unknown;
9143
+ 400: unknown;
8646
9144
  /**
8647
- * Platform already exists
9145
+ * Missing or invalid authentication
8648
9146
  */
8649
- 409: unknown;
8650
- };
8651
- };
8652
- };
8653
- '/api/v1/bean/platforms/list': {
8654
- get: {
8655
- res: {
9147
+ 401: unknown;
8656
9148
  /**
8657
- * List of platforms with user binding status
9149
+ * Provider not supported
8658
9150
  */
8659
- 200: unknown;
9151
+ 404: unknown;
8660
9152
  };
8661
9153
  };
8662
9154
  };
8663
- '/api/v1/bean/platforms/match': {
9155
+ '/api/v1/{region}/bean/import/provider/supported': {
8664
9156
  get: {
8665
- req: PlatformControllerMatchPlatformsData;
9157
+ req: ProviderSyncControllerGetSupportedProvidersData;
8666
9158
  res: {
8667
9159
  /**
8668
- * List of matching platforms with suggested segment names
9160
+ * List of supported providers
8669
9161
  */
8670
- 200: unknown;
9162
+ 200: SupportedProvidersResponseDto;
9163
+ /**
9164
+ * Missing or invalid authentication
9165
+ */
9166
+ 401: unknown;
8671
9167
  };
8672
9168
  };
8673
9169
  };
8674
- '/api/v1/bean/platforms/{id}': {
8675
- put: {
8676
- req: PlatformControllerUpdateData;
9170
+ '/api/v1/{region}/bean/import/provider/{providerName}/supported': {
9171
+ get: {
9172
+ req: ProviderSyncControllerIsProviderSupportedData;
8677
9173
  res: {
8678
9174
  /**
8679
- * Platform updated successfully
9175
+ * Provider support status
8680
9176
  */
8681
9177
  200: unknown;
8682
9178
  /**
8683
- * Platform not found
9179
+ * Missing or invalid authentication
8684
9180
  */
8685
- 404: unknown;
9181
+ 401: unknown;
8686
9182
  };
8687
9183
  };
8688
- delete: {
8689
- req: PlatformControllerDeleteData;
9184
+ };
9185
+ '/api/v1/{region}/bean/external-account-links': {
9186
+ post: {
9187
+ req: ExternalAccountLinkControllerCreateData;
8690
9188
  res: {
8691
9189
  /**
8692
- * Platform deleted successfully
9190
+ * Link created.
8693
9191
  */
8694
- 204: void;
9192
+ 201: ExternalAccountLinkResponseDto;
8695
9193
  /**
8696
- * Platform not found
9194
+ * beanAccountId not owned, or an active link already exists.
8697
9195
  */
8698
- 404: unknown;
9196
+ 422: unknown;
8699
9197
  };
8700
9198
  };
8701
- };
8702
- '/api/v1/{region}/bean/import/provider/{providerName}/sync': {
8703
- post: {
8704
- req: ProviderSyncControllerSyncData;
9199
+ get: {
9200
+ req: ExternalAccountLinkControllerFindAllData;
8705
9201
  res: {
8706
9202
  /**
8707
- * Sync completed successfully
9203
+ * Links retrieved.
8708
9204
  */
8709
- 200: ProviderSyncResponseDto;
8710
- /**
8711
- * Invalid request data
8712
- */
8713
- 400: unknown;
8714
- /**
8715
- * Missing or invalid authentication
8716
- */
8717
- 401: unknown;
8718
- /**
8719
- * Provider not supported
8720
- */
8721
- 404: unknown;
9205
+ 200: ExternalAccountLinkListResponseDto;
8722
9206
  };
8723
9207
  };
8724
9208
  };
8725
- '/api/v1/{region}/bean/import/provider/supported': {
9209
+ '/api/v1/{region}/bean/external-account-links/{id}': {
8726
9210
  get: {
8727
- req: ProviderSyncControllerGetSupportedProvidersData;
9211
+ req: ExternalAccountLinkControllerFindOneData;
8728
9212
  res: {
8729
9213
  /**
8730
- * List of supported providers
9214
+ * Link retrieved.
8731
9215
  */
8732
- 200: SupportedProvidersResponseDto;
9216
+ 200: ExternalAccountLinkResponseDto;
8733
9217
  /**
8734
- * Missing or invalid authentication
9218
+ * Link not found or not owned by the user.
8735
9219
  */
8736
- 401: unknown;
9220
+ 422: unknown;
8737
9221
  };
8738
9222
  };
8739
- };
8740
- '/api/v1/{region}/bean/import/provider/{providerName}/supported': {
8741
- get: {
8742
- req: ProviderSyncControllerIsProviderSupportedData;
9223
+ delete: {
9224
+ req: ExternalAccountLinkControllerRemoveData;
8743
9225
  res: {
8744
9226
  /**
8745
- * Provider support status
8746
- */
8747
- 200: unknown;
8748
- /**
8749
- * Missing or invalid authentication
9227
+ * Link soft-deleted; historical transactions are unaffected.
8750
9228
  */
8751
- 401: unknown;
9229
+ 204: void;
8752
9230
  };
8753
9231
  };
8754
9232
  };
@@ -8840,6 +9318,78 @@ export type $OpenApiTs = {
8840
9318
  };
8841
9319
  };
8842
9320
  };
9321
+ '/api/v1/bean/platforms': {
9322
+ get: {
9323
+ res: {
9324
+ /**
9325
+ * List of platforms with binding and account counts
9326
+ */
9327
+ 200: unknown;
9328
+ };
9329
+ };
9330
+ post: {
9331
+ req: PlatformControllerCreateData;
9332
+ res: {
9333
+ /**
9334
+ * Platform created successfully
9335
+ */
9336
+ 201: unknown;
9337
+ /**
9338
+ * Platform already exists
9339
+ */
9340
+ 409: unknown;
9341
+ };
9342
+ };
9343
+ };
9344
+ '/api/v1/bean/platforms/list': {
9345
+ get: {
9346
+ res: {
9347
+ /**
9348
+ * List of platforms with user binding status
9349
+ */
9350
+ 200: unknown;
9351
+ };
9352
+ };
9353
+ };
9354
+ '/api/v1/bean/platforms/match': {
9355
+ get: {
9356
+ req: PlatformControllerMatchPlatformsData;
9357
+ res: {
9358
+ /**
9359
+ * List of matching platforms with suggested segment names
9360
+ */
9361
+ 200: unknown;
9362
+ };
9363
+ };
9364
+ };
9365
+ '/api/v1/bean/platforms/{id}': {
9366
+ put: {
9367
+ req: PlatformControllerUpdateData;
9368
+ res: {
9369
+ /**
9370
+ * Platform updated successfully
9371
+ */
9372
+ 200: unknown;
9373
+ /**
9374
+ * Platform not found
9375
+ */
9376
+ 404: unknown;
9377
+ };
9378
+ };
9379
+ delete: {
9380
+ req: PlatformControllerDeleteData;
9381
+ res: {
9382
+ /**
9383
+ * Platform deleted successfully
9384
+ */
9385
+ 204: void;
9386
+ /**
9387
+ * Platform not found
9388
+ */
9389
+ 404: unknown;
9390
+ };
9391
+ };
9392
+ };
8843
9393
  '/api/v1/{region}/dashboard/net-worth': {
8844
9394
  get: {
8845
9395
  req: DashboardControllerGetNetWorthData;
@@ -8930,90 +9480,6 @@ export type $OpenApiTs = {
8930
9480
  };
8931
9481
  };
8932
9482
  };
8933
- '/api/v1/{region}/bean/prices': {
8934
- post: {
8935
- req: PriceControllerCreateData;
8936
- res: {
8937
- /**
8938
- * Price created successfully
8939
- */
8940
- 201: PriceResponseDto;
8941
- /**
8942
- * Currency or quoteCurrency commodity not found
8943
- */
8944
- 404: unknown;
8945
- /**
8946
- * Price already exists for this currency pair and date
8947
- */
8948
- 409: unknown;
8949
- };
8950
- };
8951
- get: {
8952
- req: PriceControllerFindAllData;
8953
- res: {
8954
- /**
8955
- * Prices retrieved successfully
8956
- */
8957
- 200: PriceListResponseDto;
8958
- };
8959
- };
8960
- };
8961
- '/api/v1/{region}/bean/prices/{id}': {
8962
- get: {
8963
- req: PriceControllerFindOneData;
8964
- res: {
8965
- /**
8966
- * Price retrieved successfully
8967
- */
8968
- 200: PriceResponseDto;
8969
- /**
8970
- * Price not found
8971
- */
8972
- 404: unknown;
8973
- };
8974
- };
8975
- put: {
8976
- req: PriceControllerUpdateData;
8977
- res: {
8978
- /**
8979
- * Price updated successfully
8980
- */
8981
- 200: PriceResponseDto;
8982
- /**
8983
- * Price not found
8984
- */
8985
- 404: unknown;
8986
- /**
8987
- * Updated price conflicts with existing price
8988
- */
8989
- 409: unknown;
8990
- };
8991
- };
8992
- delete: {
8993
- req: PriceControllerDeleteData;
8994
- res: {
8995
- /**
8996
- * Price deleted successfully
8997
- */
8998
- 204: void;
8999
- /**
9000
- * Price not found
9001
- */
9002
- 404: unknown;
9003
- };
9004
- };
9005
- };
9006
- '/api/v1/{region}/bean/prices/bulk': {
9007
- post: {
9008
- req: PriceControllerBulkCreateData;
9009
- res: {
9010
- /**
9011
- * Prices created successfully
9012
- */
9013
- 201: Array<PriceResponseDto>;
9014
- };
9015
- };
9016
- };
9017
9483
  '/api/v1/{region}/reporting/portfolio/trends': {
9018
9484
  get: {
9019
9485
  req: ReportingControllerGetPortfolioTrendsData;