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

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.
@@ -17,6 +17,8 @@ import type {
17
17
  AccountControllerCloseResponse,
18
18
  AccountControllerReopenData,
19
19
  AccountControllerReopenResponse,
20
+ AccountControllerAddOpeningBalanceData,
21
+ AccountControllerAddOpeningBalanceResponse,
20
22
  AccountStandardsControllerGetTemplatesData,
21
23
  AccountStandardsControllerGetTemplatesResponse,
22
24
  AccountStandardsControllerGetTemplateMetadataData,
@@ -97,6 +99,18 @@ import type {
97
99
  CommodityControllerGetOrCreateResponse,
98
100
  CommodityControllerBulkCreateData,
99
101
  CommodityControllerBulkCreateResponse,
102
+ PriceControllerCreateData,
103
+ PriceControllerCreateResponse,
104
+ PriceControllerFindAllData,
105
+ PriceControllerFindAllResponse,
106
+ PriceControllerFindOneData,
107
+ PriceControllerFindOneResponse,
108
+ PriceControllerUpdateData,
109
+ PriceControllerUpdateResponse,
110
+ PriceControllerDeleteData,
111
+ PriceControllerDeleteResponse,
112
+ PriceControllerBulkCreateData,
113
+ PriceControllerBulkCreateResponse,
100
114
  RecurringRuleControllerCreateData,
101
115
  RecurringRuleControllerCreateResponse,
102
116
  RecurringRuleControllerFindAllData,
@@ -129,26 +143,14 @@ import type {
129
143
  ExpectedTransactionControllerEnterNowResponse,
130
144
  ForecastControllerGetForecastData,
131
145
  ForecastControllerGetForecastResponse,
132
- TransactionRuleControllerCreateData,
133
- TransactionRuleControllerCreateResponse,
134
- TransactionRuleControllerListData,
135
- TransactionRuleControllerListResponse,
136
- TransactionRuleControllerValidateData,
137
- TransactionRuleControllerValidateResponse,
138
- TransactionRuleControllerBulkCreateData,
139
- TransactionRuleControllerBulkCreateResponse,
140
- TransactionRuleControllerExportData,
141
- TransactionRuleControllerExportResponse,
142
- TransactionRuleControllerGetStatisticsData,
143
- TransactionRuleControllerGetStatisticsResponse,
144
- TransactionRuleControllerGetDetailData,
145
- TransactionRuleControllerGetDetailResponse,
146
- TransactionRuleControllerUpdateData,
147
- TransactionRuleControllerUpdateResponse,
148
- TransactionRuleControllerDeleteData,
149
- TransactionRuleControllerDeleteResponse,
150
- TransactionRuleControllerTestData,
151
- TransactionRuleControllerTestResponse,
146
+ ReportingControllerGetPortfolioTrendsData,
147
+ ReportingControllerGetPortfolioTrendsResponse,
148
+ ReportingControllerGetCashFlowTrendsData,
149
+ ReportingControllerGetCashFlowTrendsResponse,
150
+ ReportingControllerGenerateSnapshotData,
151
+ ReportingControllerGenerateSnapshotResponse,
152
+ ReportingControllerBackfillSnapshotsData,
153
+ ReportingControllerBackfillSnapshotsResponse,
152
154
  UserControllerDeleteOwnUserData,
153
155
  UserControllerDeleteOwnUserResponse,
154
156
  UserControllerGetUserData,
@@ -171,6 +173,28 @@ import type {
171
173
  PropertyControllerUpdateResponse,
172
174
  PropertyControllerDeleteData,
173
175
  PropertyControllerDeleteResponse,
176
+ TransactionRuleControllerCreateData,
177
+ TransactionRuleControllerCreateResponse,
178
+ TransactionRuleControllerListData,
179
+ TransactionRuleControllerListResponse,
180
+ TransactionRuleControllerValidateData,
181
+ TransactionRuleControllerValidateResponse,
182
+ TransactionRuleControllerBulkCreateData,
183
+ TransactionRuleControllerBulkCreateResponse,
184
+ TransactionRuleControllerExportData,
185
+ TransactionRuleControllerExportResponse,
186
+ TransactionRuleControllerGetStatisticsData,
187
+ TransactionRuleControllerGetStatisticsResponse,
188
+ TransactionRuleControllerGetDetailData,
189
+ TransactionRuleControllerGetDetailResponse,
190
+ TransactionRuleControllerUpdateData,
191
+ TransactionRuleControllerUpdateResponse,
192
+ TransactionRuleControllerDeleteData,
193
+ TransactionRuleControllerDeleteResponse,
194
+ TransactionRuleControllerTestData,
195
+ TransactionRuleControllerTestResponse,
196
+ CategoryCatalogControllerListData,
197
+ CategoryCatalogControllerListResponse,
174
198
  EventControllerCreateData,
175
199
  EventControllerCreateResponse,
176
200
  EventControllerFindAllData,
@@ -183,6 +207,8 @@ import type {
183
207
  EventControllerDeleteResponse,
184
208
  EventControllerGetSliceData,
185
209
  EventControllerGetSliceResponse,
210
+ OnboardingControllerBootstrapData,
211
+ OnboardingControllerBootstrapResponse,
186
212
  ReconciliationControllerComputeData,
187
213
  ReconciliationControllerComputeResponse,
188
214
  ReconciliationControllerAssertData,
@@ -204,22 +230,20 @@ import type {
204
230
  ImporterConfigControllerUpdateConfigResponse,
205
231
  ImporterConfigControllerResetConfigData,
206
232
  ImporterConfigControllerResetConfigResponse,
207
- PlatformControllerFindAllResponse,
208
- PlatformControllerCreateData,
209
- PlatformControllerCreateResponse,
210
- PlatformControllerGetPlatformListResponse,
211
- PlatformControllerMatchPlatformsData,
212
- PlatformControllerMatchPlatformsResponse,
213
- PlatformControllerUpdateData,
214
- PlatformControllerUpdateResponse,
215
- PlatformControllerDeleteData,
216
- PlatformControllerDeleteResponse,
217
233
  ProviderSyncControllerSyncData,
218
234
  ProviderSyncControllerSyncResponse,
219
235
  ProviderSyncControllerGetSupportedProvidersData,
220
236
  ProviderSyncControllerGetSupportedProvidersResponse,
221
237
  ProviderSyncControllerIsProviderSupportedData,
222
238
  ProviderSyncControllerIsProviderSupportedResponse,
239
+ ExternalAccountLinkControllerCreateData,
240
+ ExternalAccountLinkControllerCreateResponse,
241
+ ExternalAccountLinkControllerFindAllData,
242
+ ExternalAccountLinkControllerFindAllResponse,
243
+ ExternalAccountLinkControllerFindOneData,
244
+ ExternalAccountLinkControllerFindOneResponse,
245
+ ExternalAccountLinkControllerRemoveData,
246
+ ExternalAccountLinkControllerRemoveResponse,
223
247
  TelemetryControllerReportTelemetryData,
224
248
  TelemetryControllerReportTelemetryResponse,
225
249
  TelemetryControllerReportCoverageMissData,
@@ -232,6 +256,17 @@ import type {
232
256
  NlpControllerClearSessionResponse,
233
257
  NlpControllerGetSessionData,
234
258
  NlpControllerGetSessionResponse,
259
+ PlatformControllerFindAllResponse,
260
+ PlatformControllerCreateData,
261
+ PlatformControllerCreateResponse,
262
+ PlatformControllerGetPlatformListData,
263
+ PlatformControllerGetPlatformListResponse,
264
+ PlatformControllerMatchPlatformsData,
265
+ PlatformControllerMatchPlatformsResponse,
266
+ PlatformControllerUpdateData,
267
+ PlatformControllerUpdateResponse,
268
+ PlatformControllerDeleteData,
269
+ PlatformControllerDeleteResponse,
235
270
  DashboardControllerGetNetWorthData,
236
271
  DashboardControllerGetNetWorthResponse,
237
272
  DashboardControllerGetAccountsData,
@@ -242,26 +277,6 @@ import type {
242
277
  DashboardControllerGetExpensesResponse,
243
278
  HoldingPnlControllerGetHoldingPnlData,
244
279
  HoldingPnlControllerGetHoldingPnlResponse,
245
- PriceControllerCreateData,
246
- PriceControllerCreateResponse,
247
- PriceControllerFindAllData,
248
- PriceControllerFindAllResponse,
249
- PriceControllerFindOneData,
250
- PriceControllerFindOneResponse,
251
- PriceControllerUpdateData,
252
- PriceControllerUpdateResponse,
253
- PriceControllerDeleteData,
254
- PriceControllerDeleteResponse,
255
- PriceControllerBulkCreateData,
256
- PriceControllerBulkCreateResponse,
257
- ReportingControllerGetPortfolioTrendsData,
258
- ReportingControllerGetPortfolioTrendsResponse,
259
- ReportingControllerGetCashFlowTrendsData,
260
- ReportingControllerGetCashFlowTrendsResponse,
261
- ReportingControllerGenerateSnapshotData,
262
- ReportingControllerGenerateSnapshotResponse,
263
- ReportingControllerBackfillSnapshotsData,
264
- ReportingControllerBackfillSnapshotsResponse,
265
280
  ApiKeysControllerCreateApiKeyResponse,
266
281
  AuthControllerAccessTokenLoginData,
267
282
  AuthControllerAccessTokenLoginResponse,
@@ -276,7 +291,11 @@ import type {
276
291
  HealthControllerResetCircuitBreakerData,
277
292
  HealthControllerResetCircuitBreakerResponse,
278
293
  HealthControllerGetMetricsResponse,
279
- InfoControllerGetInfoResponse
294
+ InfoControllerGetInfoResponse,
295
+ SymbolControllerSearchData,
296
+ SymbolControllerSearchResponse,
297
+ SymbolControllerGetQuoteData,
298
+ SymbolControllerGetQuoteResponse
280
299
  } from './types.gen';
281
300
 
282
301
  export class BeanAccountsService {
@@ -314,7 +333,7 @@ export class BeanAccountsService {
314
333
  * @param data.type Filter by account type
315
334
  * @param data.status Filter by status
316
335
  * @param data.isCustom Filter by custom (user-created) accounts only
317
- * @param data.search Search term for path or i18nKey
336
+ * @param data.search Search term for account path
318
337
  * @param data.limit Maximum number of results
319
338
  * @param data.offset Number of results to skip
320
339
  * @returns AccountListResponseDto Accounts retrieved successfully
@@ -395,7 +414,7 @@ export class BeanAccountsService {
395
414
 
396
415
  /**
397
416
  * Delete account
398
- * Deletes an account (only if no transactions)
417
+ * Deletes an account (only if no active transactions; voided/superseded residual postings are cleaned up)
399
418
  * @param data The data for the request.
400
419
  * @param data.id Account UUID
401
420
  * @param data.region Region code for tenant context
@@ -414,7 +433,7 @@ export class BeanAccountsService {
414
433
  },
415
434
  errors: {
416
435
  404: 'Account not found',
417
- 409: 'Account has transactions and cannot be deleted'
436
+ 409: 'Account has active transactions and cannot be deleted'
418
437
  }
419
438
  });
420
439
  }
@@ -476,6 +495,35 @@ export class BeanAccountsService {
476
495
  }
477
496
  });
478
497
  }
498
+
499
+ /**
500
+ * Post an opening-balance transaction
501
+ * Posts a double-entry opening-balance transaction against Equity:Opening-Balances for an existing Assets/Liabilities account. At most one active opening balance per account.
502
+ * @param data The data for the request.
503
+ * @param data.id Account UUID
504
+ * @param data.region Region code for tenant context
505
+ * @param data.requestBody
506
+ * @returns OpeningBalanceResultDto Opening-balance transaction created
507
+ * @throws ApiError
508
+ */
509
+ public static accountControllerAddOpeningBalance(
510
+ data: AccountControllerAddOpeningBalanceData
511
+ ): CancelablePromise<AccountControllerAddOpeningBalanceResponse> {
512
+ return __request(OpenAPI, {
513
+ method: 'POST',
514
+ url: '/api/v1/{region}/bean/accounts/{id}/opening-balance',
515
+ path: {
516
+ id: data.id,
517
+ region: data.region
518
+ },
519
+ body: data.requestBody,
520
+ mediaType: 'application/json',
521
+ errors: {
522
+ 404: 'Account not found',
523
+ 409: 'An opening balance already exists for this account'
524
+ }
525
+ });
526
+ }
479
527
  }
480
528
 
481
529
  export class BeanAccountStandardsService {
@@ -507,7 +555,7 @@ export class BeanAccountStandardsService {
507
555
 
508
556
  /**
509
557
  * Get template metadata for an account path
510
- * Returns extendable status and root type for a template path.
558
+ * Returns root type for a template path.
511
559
  * @param data The data for the request.
512
560
  * @param data.region Region code for tenant context
513
561
  * @param data.path Account path to check
@@ -802,7 +850,7 @@ export class BeanBalancesService {
802
850
  * Query account balance
803
851
  * Calculate account balance at a specific date for a single currency
804
852
  * @param data The data for the request.
805
- * @param data.account Account name (e.g., "Assets:Bank:Checking")
853
+ * @param data.account Account name (e.g., "Assets:Checking")
806
854
  * @param data.region Region code for tenant context
807
855
  * @param data.date Date to calculate balance at (ISO 8601 format)
808
856
  * @param data.currency Currency to query (e.g., "USD", "CNY")
@@ -1523,153 +1571,320 @@ export class BeanCommoditiesService {
1523
1571
  }
1524
1572
  }
1525
1573
 
1526
- export class RecurringRulesService {
1574
+ export class BeanPricesService {
1527
1575
  /**
1528
- * Create a new recurring rule
1529
- * Creates a new recurring transaction rule for the authenticated user
1576
+ * Create a new price
1577
+ * Creates a new price entry for the authenticated user
1530
1578
  * @param data The data for the request.
1531
1579
  * @param data.region Region code for tenant context
1532
1580
  * @param data.requestBody
1533
- * @returns RecurringRuleResponseDto Rule created successfully
1581
+ * @returns PriceResponseDto Price created successfully
1534
1582
  * @throws ApiError
1535
1583
  */
1536
- public static recurringRuleControllerCreate(
1537
- data: RecurringRuleControllerCreateData
1538
- ): CancelablePromise<RecurringRuleControllerCreateResponse> {
1584
+ public static priceControllerCreate(
1585
+ data: PriceControllerCreateData
1586
+ ): CancelablePromise<PriceControllerCreateResponse> {
1539
1587
  return __request(OpenAPI, {
1540
1588
  method: 'POST',
1541
- url: '/api/v1/{region}/bean/recurring-rules',
1589
+ url: '/api/v1/{region}/bean/prices',
1542
1590
  path: {
1543
1591
  region: data.region
1544
1592
  },
1545
1593
  body: data.requestBody,
1546
1594
  mediaType: 'application/json',
1547
1595
  errors: {
1548
- 400: 'Invalid input data (e.g., autoCreate without accounts)',
1549
- 409: 'Rule with same name already exists'
1596
+ 404: 'Currency or quoteCurrency commodity not found',
1597
+ 409: 'Price already exists for this currency pair and date'
1550
1598
  }
1551
1599
  });
1552
1600
  }
1553
1601
 
1554
1602
  /**
1555
- * List recurring rules
1556
- * Returns all recurring rules for the authenticated user with optional filtering
1603
+ * List user prices
1604
+ * Returns all price entries for the authenticated user with optional filtering
1557
1605
  * @param data The data for the request.
1558
1606
  * @param data.region Region code for tenant context
1559
- * @param data.isActive Filter by active status
1560
- * @param data.frequency Filter by frequency (WEEKLY, MONTHLY, etc.)
1561
- * @param data.hasAutoCreate Filter by autoCreate enabled
1562
- * @returns RecurringRuleResponseDto Rules retrieved successfully
1607
+ * @param data.currency Filter by currency (e.g., BTC, AAPL, USD)
1608
+ * @param data.quoteCurrency Filter by quote currency (pricing currency, e.g., USD, CNY)
1609
+ * @param data.dateFrom Filter prices from this date (ISO 8601 format)
1610
+ * @param data.dateTo Filter prices to this date (ISO 8601 format)
1611
+ * @param data.search Search term for currency or quoteCurrency (case-insensitive partial match)
1612
+ * @param data.page Page number for pagination (default: 1)
1613
+ * @param data.limit Number of items per page (default: 20, max: 100)
1614
+ * @returns PriceListResponseDto Prices retrieved successfully
1563
1615
  * @throws ApiError
1564
1616
  */
1565
- public static recurringRuleControllerFindAll(
1566
- data: RecurringRuleControllerFindAllData
1567
- ): CancelablePromise<RecurringRuleControllerFindAllResponse> {
1617
+ public static priceControllerFindAll(
1618
+ data: PriceControllerFindAllData
1619
+ ): CancelablePromise<PriceControllerFindAllResponse> {
1568
1620
  return __request(OpenAPI, {
1569
1621
  method: 'GET',
1570
- url: '/api/v1/{region}/bean/recurring-rules',
1622
+ url: '/api/v1/{region}/bean/prices',
1571
1623
  path: {
1572
1624
  region: data.region
1573
1625
  },
1574
1626
  query: {
1575
- isActive: data.isActive,
1576
- frequency: data.frequency,
1577
- hasAutoCreate: data.hasAutoCreate
1627
+ currency: data.currency,
1628
+ quoteCurrency: data.quoteCurrency,
1629
+ dateFrom: data.dateFrom,
1630
+ dateTo: data.dateTo,
1631
+ search: data.search,
1632
+ page: data.page,
1633
+ limit: data.limit
1578
1634
  }
1579
1635
  });
1580
1636
  }
1581
1637
 
1582
1638
  /**
1583
- * Create recurring rule from transaction
1584
- * Auto-creates a recurring rule using transaction data. User only confirms frequency.
1639
+ * Get price by ID
1640
+ * Returns a single price entry by its ID
1585
1641
  * @param data The data for the request.
1586
- * @param data.transactionId Source transaction ID
1642
+ * @param data.id Price ID
1587
1643
  * @param data.region Region code for tenant context
1588
- * @param data.requestBody
1589
- * @returns RecurringRuleResponseDto Rule created successfully
1644
+ * @returns PriceResponseDto Price retrieved successfully
1590
1645
  * @throws ApiError
1591
1646
  */
1592
- public static recurringRuleControllerCreateFromTransaction(
1593
- data: RecurringRuleControllerCreateFromTransactionData
1594
- ): CancelablePromise<RecurringRuleControllerCreateFromTransactionResponse> {
1647
+ public static priceControllerFindOne(
1648
+ data: PriceControllerFindOneData
1649
+ ): CancelablePromise<PriceControllerFindOneResponse> {
1595
1650
  return __request(OpenAPI, {
1596
- method: 'POST',
1597
- url: '/api/v1/{region}/bean/recurring-rules/from-transaction/{transactionId}',
1651
+ method: 'GET',
1652
+ url: '/api/v1/{region}/bean/prices/{id}',
1598
1653
  path: {
1599
- transactionId: data.transactionId,
1654
+ id: data.id,
1600
1655
  region: data.region
1601
1656
  },
1602
- body: data.requestBody,
1603
- mediaType: 'application/json',
1604
1657
  errors: {
1605
- 404: 'Transaction not found',
1606
- 409: 'Rule with same name already exists or transaction already linked'
1658
+ 404: 'Price not found'
1607
1659
  }
1608
1660
  });
1609
1661
  }
1610
1662
 
1611
1663
  /**
1612
- * Get recurring rule by ID
1613
- * Returns a specific recurring rule with its details
1664
+ * Update a price
1665
+ * Updates an existing price entry
1614
1666
  * @param data The data for the request.
1615
- * @param data.id Rule ID
1667
+ * @param data.id Price ID
1616
1668
  * @param data.region Region code for tenant context
1617
- * @returns RecurringRuleResponseDto Rule retrieved successfully
1669
+ * @param data.requestBody
1670
+ * @returns PriceResponseDto Price updated successfully
1618
1671
  * @throws ApiError
1619
1672
  */
1620
- public static recurringRuleControllerFindOne(
1621
- data: RecurringRuleControllerFindOneData
1622
- ): CancelablePromise<RecurringRuleControllerFindOneResponse> {
1673
+ public static priceControllerUpdate(
1674
+ data: PriceControllerUpdateData
1675
+ ): CancelablePromise<PriceControllerUpdateResponse> {
1623
1676
  return __request(OpenAPI, {
1624
- method: 'GET',
1625
- url: '/api/v1/{region}/bean/recurring-rules/{id}',
1677
+ method: 'PUT',
1678
+ url: '/api/v1/{region}/bean/prices/{id}',
1626
1679
  path: {
1627
1680
  id: data.id,
1628
1681
  region: data.region
1629
1682
  },
1683
+ body: data.requestBody,
1684
+ mediaType: 'application/json',
1630
1685
  errors: {
1631
- 404: 'Rule not found'
1686
+ 404: 'Price not found',
1687
+ 409: 'Updated price conflicts with existing price'
1632
1688
  }
1633
1689
  });
1634
1690
  }
1635
1691
 
1636
1692
  /**
1637
- * Update recurring rule
1638
- * Updates an existing recurring rule
1693
+ * Delete a price
1694
+ * Deletes a price entry (hard delete)
1639
1695
  * @param data The data for the request.
1640
- * @param data.id Rule ID
1696
+ * @param data.id Price ID
1641
1697
  * @param data.region Region code for tenant context
1642
- * @param data.requestBody
1643
- * @returns RecurringRuleResponseDto Rule updated successfully
1698
+ * @returns void Price deleted successfully
1644
1699
  * @throws ApiError
1645
1700
  */
1646
- public static recurringRuleControllerUpdate(
1647
- data: RecurringRuleControllerUpdateData
1648
- ): CancelablePromise<RecurringRuleControllerUpdateResponse> {
1701
+ public static priceControllerDelete(
1702
+ data: PriceControllerDeleteData
1703
+ ): CancelablePromise<PriceControllerDeleteResponse> {
1649
1704
  return __request(OpenAPI, {
1650
- method: 'PATCH',
1651
- url: '/api/v1/{region}/bean/recurring-rules/{id}',
1705
+ method: 'DELETE',
1706
+ url: '/api/v1/{region}/bean/prices/{id}',
1652
1707
  path: {
1653
1708
  id: data.id,
1654
1709
  region: data.region
1655
1710
  },
1656
- body: data.requestBody,
1657
- mediaType: 'application/json',
1658
1711
  errors: {
1659
- 400: 'Invalid input data',
1660
- 404: 'Rule not found'
1712
+ 404: 'Price not found'
1661
1713
  }
1662
1714
  });
1663
1715
  }
1664
1716
 
1665
1717
  /**
1666
- * Delete recurring rule
1667
- * Soft deletes a recurring rule (sets isActive to false)
1718
+ * Bulk create prices
1719
+ * Creates multiple price entries at once (skips duplicates)
1668
1720
  * @param data The data for the request.
1669
- * @param data.id Rule ID
1670
1721
  * @param data.region Region code for tenant context
1671
- * @returns void Rule deleted successfully
1672
- * @throws ApiError
1722
+ * @param data.requestBody
1723
+ * @returns PriceResponseDto Prices created successfully
1724
+ * @throws ApiError
1725
+ */
1726
+ public static priceControllerBulkCreate(
1727
+ data: PriceControllerBulkCreateData
1728
+ ): CancelablePromise<PriceControllerBulkCreateResponse> {
1729
+ return __request(OpenAPI, {
1730
+ method: 'POST',
1731
+ url: '/api/v1/{region}/bean/prices/bulk',
1732
+ path: {
1733
+ region: data.region
1734
+ },
1735
+ body: data.requestBody,
1736
+ mediaType: 'application/json'
1737
+ });
1738
+ }
1739
+ }
1740
+
1741
+ export class RecurringRulesService {
1742
+ /**
1743
+ * Create a new recurring rule
1744
+ * Creates a new recurring transaction rule for the authenticated user
1745
+ * @param data The data for the request.
1746
+ * @param data.region Region code for tenant context
1747
+ * @param data.requestBody
1748
+ * @returns RecurringRuleResponseDto Rule created successfully
1749
+ * @throws ApiError
1750
+ */
1751
+ public static recurringRuleControllerCreate(
1752
+ data: RecurringRuleControllerCreateData
1753
+ ): CancelablePromise<RecurringRuleControllerCreateResponse> {
1754
+ return __request(OpenAPI, {
1755
+ method: 'POST',
1756
+ url: '/api/v1/{region}/bean/recurring-rules',
1757
+ path: {
1758
+ region: data.region
1759
+ },
1760
+ body: data.requestBody,
1761
+ mediaType: 'application/json',
1762
+ errors: {
1763
+ 400: 'Invalid input data (e.g., autoCreate without accounts)',
1764
+ 409: 'Rule with same name already exists'
1765
+ }
1766
+ });
1767
+ }
1768
+
1769
+ /**
1770
+ * List recurring rules
1771
+ * Returns all recurring rules for the authenticated user with optional filtering
1772
+ * @param data The data for the request.
1773
+ * @param data.region Region code for tenant context
1774
+ * @param data.isActive Filter by active status
1775
+ * @param data.frequency Filter by frequency (WEEKLY, MONTHLY, etc.)
1776
+ * @param data.hasAutoCreate Filter by autoCreate enabled
1777
+ * @returns RecurringRuleResponseDto Rules retrieved successfully
1778
+ * @throws ApiError
1779
+ */
1780
+ public static recurringRuleControllerFindAll(
1781
+ data: RecurringRuleControllerFindAllData
1782
+ ): CancelablePromise<RecurringRuleControllerFindAllResponse> {
1783
+ return __request(OpenAPI, {
1784
+ method: 'GET',
1785
+ url: '/api/v1/{region}/bean/recurring-rules',
1786
+ path: {
1787
+ region: data.region
1788
+ },
1789
+ query: {
1790
+ isActive: data.isActive,
1791
+ frequency: data.frequency,
1792
+ hasAutoCreate: data.hasAutoCreate
1793
+ }
1794
+ });
1795
+ }
1796
+
1797
+ /**
1798
+ * Create recurring rule from transaction
1799
+ * Auto-creates a recurring rule using transaction data. User only confirms frequency.
1800
+ * @param data The data for the request.
1801
+ * @param data.transactionId Source transaction ID
1802
+ * @param data.region Region code for tenant context
1803
+ * @param data.requestBody
1804
+ * @returns RecurringRuleResponseDto Rule created successfully
1805
+ * @throws ApiError
1806
+ */
1807
+ public static recurringRuleControllerCreateFromTransaction(
1808
+ data: RecurringRuleControllerCreateFromTransactionData
1809
+ ): CancelablePromise<RecurringRuleControllerCreateFromTransactionResponse> {
1810
+ return __request(OpenAPI, {
1811
+ method: 'POST',
1812
+ url: '/api/v1/{region}/bean/recurring-rules/from-transaction/{transactionId}',
1813
+ path: {
1814
+ transactionId: data.transactionId,
1815
+ region: data.region
1816
+ },
1817
+ body: data.requestBody,
1818
+ mediaType: 'application/json',
1819
+ errors: {
1820
+ 404: 'Transaction not found',
1821
+ 409: 'Rule with same name already exists or transaction already linked'
1822
+ }
1823
+ });
1824
+ }
1825
+
1826
+ /**
1827
+ * Get recurring rule by ID
1828
+ * Returns a specific recurring rule with its details
1829
+ * @param data The data for the request.
1830
+ * @param data.id Rule ID
1831
+ * @param data.region Region code for tenant context
1832
+ * @returns RecurringRuleResponseDto Rule retrieved successfully
1833
+ * @throws ApiError
1834
+ */
1835
+ public static recurringRuleControllerFindOne(
1836
+ data: RecurringRuleControllerFindOneData
1837
+ ): CancelablePromise<RecurringRuleControllerFindOneResponse> {
1838
+ return __request(OpenAPI, {
1839
+ method: 'GET',
1840
+ url: '/api/v1/{region}/bean/recurring-rules/{id}',
1841
+ path: {
1842
+ id: data.id,
1843
+ region: data.region
1844
+ },
1845
+ errors: {
1846
+ 404: 'Rule not found'
1847
+ }
1848
+ });
1849
+ }
1850
+
1851
+ /**
1852
+ * Update recurring rule
1853
+ * Updates an existing recurring rule
1854
+ * @param data The data for the request.
1855
+ * @param data.id Rule ID
1856
+ * @param data.region Region code for tenant context
1857
+ * @param data.requestBody
1858
+ * @returns RecurringRuleResponseDto Rule updated successfully
1859
+ * @throws ApiError
1860
+ */
1861
+ public static recurringRuleControllerUpdate(
1862
+ data: RecurringRuleControllerUpdateData
1863
+ ): CancelablePromise<RecurringRuleControllerUpdateResponse> {
1864
+ return __request(OpenAPI, {
1865
+ method: 'PATCH',
1866
+ url: '/api/v1/{region}/bean/recurring-rules/{id}',
1867
+ path: {
1868
+ id: data.id,
1869
+ region: data.region
1870
+ },
1871
+ body: data.requestBody,
1872
+ mediaType: 'application/json',
1873
+ errors: {
1874
+ 400: 'Invalid input data',
1875
+ 404: 'Rule not found'
1876
+ }
1877
+ });
1878
+ }
1879
+
1880
+ /**
1881
+ * Delete recurring rule
1882
+ * Soft deletes a recurring rule (sets isActive to false)
1883
+ * @param data The data for the request.
1884
+ * @param data.id Rule ID
1885
+ * @param data.region Region code for tenant context
1886
+ * @returns void Rule deleted successfully
1887
+ * @throws ApiError
1673
1888
  */
1674
1889
  public static recurringRuleControllerDelete(
1675
1890
  data: RecurringRuleControllerDeleteData
@@ -1953,279 +2168,158 @@ export class RecurringForecastService {
1953
2168
  }
1954
2169
  }
1955
2170
 
1956
- export class BeanTransactionRulesService {
2171
+ export class ReportingService {
1957
2172
  /**
1958
- * Create a new transaction rule (or upsert if upsertByPayee=true)
1959
- * Creates a new rule. If upsertByPayee=true, updates existing rule matching payeeKeywords[0] instead of creating duplicate.
2173
+ * Get portfolio value trends
2174
+ *
2175
+ * Returns time series data of portfolio net worth.
2176
+ *
2177
+ * **Multi-currency Support:**
2178
+ * - `series[].byCurrency` - Currency breakdown for each data point
2179
+ * - `byCurrency` - Separate time series grouped by currency
2180
+ * - `warnings` - Exchange rate warnings if conversion failed
2181
+ *
2182
+ * **Parameters:**
2183
+ * - `period`: Time period (1m, 3m, 6m, 1y)
2184
+ * - `granularity`: Data granularity (day, week, month)
2185
+ *
1960
2186
  * @param data The data for the request.
1961
2187
  * @param data.region Region code for tenant context
1962
- * @param data.requestBody
1963
- * @returns TransactionRuleResponseDto Rule updated successfully (upsert mode)
2188
+ * @param data.period Time period
2189
+ * @param data.granularity Data granularity
2190
+ * @returns PortfolioTrendsResponseDto Trends retrieved successfully
1964
2191
  * @throws ApiError
1965
2192
  */
1966
- public static transactionRuleControllerCreate(
1967
- data: TransactionRuleControllerCreateData
1968
- ): CancelablePromise<TransactionRuleControllerCreateResponse> {
2193
+ public static reportingControllerGetPortfolioTrends(
2194
+ data: ReportingControllerGetPortfolioTrendsData
2195
+ ): CancelablePromise<ReportingControllerGetPortfolioTrendsResponse> {
1969
2196
  return __request(OpenAPI, {
1970
- method: 'POST',
1971
- url: '/api/v1/{region}/bean/transaction-rules',
2197
+ method: 'GET',
2198
+ url: '/api/v1/{region}/reporting/portfolio/trends',
1972
2199
  path: {
1973
2200
  region: data.region
1974
2201
  },
1975
- body: data.requestBody,
1976
- mediaType: 'application/json',
2202
+ query: {
2203
+ period: data.period,
2204
+ granularity: data.granularity
2205
+ },
1977
2206
  errors: {
1978
- 400: 'Validation failed',
1979
- 401: 'Unauthorized',
1980
- 409: 'Resource conflict - another process is updating this rule'
2207
+ 401: 'User not authenticated'
1981
2208
  }
1982
2209
  });
1983
2210
  }
1984
2211
 
1985
2212
  /**
1986
- * Get all transaction rules for user
2213
+ * Get cash-flow trends
2214
+ *
2215
+ * Monthly income / expense / netSavings over a fixed N-month window
2216
+ * (current month + N−1 prior). Missing months are zero-filled (flow metric).
2217
+ *
2218
+ * **Parameters:**
2219
+ * - `period`: 1m | 3m | 6m | 1y (default 6m)
2220
+ * - `granularity`: accepted for API symmetry; v1 returns month buckets
2221
+ *
1987
2222
  * @param data The data for the request.
1988
2223
  * @param data.region Region code for tenant context
1989
- * @param data.limit Max results per page (default: 20, max: 100)
1990
- * @param data.offset Pagination offset (default: 0)
1991
- * @param data.enabled Filter by enabled status
1992
- * @param data.learningSource Filter by learning source. Omit this parameter or pass empty string to get manually created rules (learningSource is null in database).
1993
- * @param data.autoApplyEnabled Filter by auto-apply status
1994
- * @returns TransactionRuleListResponseDto List of rules
2224
+ * @param data.period Time period
2225
+ * @param data.granularity Data granularity (accepted for API symmetry; v1 returns month buckets)
2226
+ * @returns CashFlowTrendsResponseDto Cash-flow trends retrieved successfully
1995
2227
  * @throws ApiError
1996
2228
  */
1997
- public static transactionRuleControllerList(
1998
- data: TransactionRuleControllerListData
1999
- ): CancelablePromise<TransactionRuleControllerListResponse> {
2229
+ public static reportingControllerGetCashFlowTrends(
2230
+ data: ReportingControllerGetCashFlowTrendsData
2231
+ ): CancelablePromise<ReportingControllerGetCashFlowTrendsResponse> {
2000
2232
  return __request(OpenAPI, {
2001
2233
  method: 'GET',
2002
- url: '/api/v1/{region}/bean/transaction-rules',
2234
+ url: '/api/v1/{region}/reporting/cash-flow/trends',
2003
2235
  path: {
2004
2236
  region: data.region
2005
2237
  },
2006
2238
  query: {
2007
- limit: data.limit,
2008
- offset: data.offset,
2009
- enabled: data.enabled,
2010
- learningSource: data.learningSource,
2011
- autoApplyEnabled: data.autoApplyEnabled
2239
+ period: data.period,
2240
+ granularity: data.granularity
2012
2241
  },
2013
2242
  errors: {
2014
- 401: 'Unauthorized'
2243
+ 401: 'User not authenticated'
2015
2244
  }
2016
2245
  });
2017
2246
  }
2018
2247
 
2019
2248
  /**
2020
- * Validate transaction rule configuration
2021
- * @param data The data for the request.
2022
- * @param data.region Region code for tenant context
2023
- * @param data.requestBody
2024
- * @returns ValidateRuleResponseDto Validation result
2025
- * @throws ApiError
2026
- */
2027
- public static transactionRuleControllerValidate(
2028
- data: TransactionRuleControllerValidateData
2029
- ): CancelablePromise<TransactionRuleControllerValidateResponse> {
2030
- return __request(OpenAPI, {
2031
- method: 'POST',
2032
- url: '/api/v1/{region}/bean/transaction-rules/validate',
2033
- path: {
2034
- region: data.region
2035
- },
2036
- body: data.requestBody,
2037
- mediaType: 'application/json',
2038
- errors: {
2039
- 400: 'Validation failed',
2040
- 401: 'Unauthorized'
2041
- }
2042
- });
2043
- }
2044
-
2045
- /**
2046
- * Bulk create transaction rules
2249
+ * Generate portfolio snapshot
2250
+ *
2251
+ * Manually generate a portfolio snapshot for a specific date.
2252
+ *
2253
+ * **Multi-currency Support:**
2254
+ * - Fetches balances grouped by currency
2255
+ * - Uses user's baseCurrency setting for conversion
2256
+ * - Stores exchange rates and warnings
2257
+ *
2258
+ * **Use Cases:**
2259
+ * - Testing snapshot generation
2260
+ * - Force regeneration after data correction
2261
+ * - Initial setup for new users
2262
+ *
2047
2263
  * @param data The data for the request.
2048
2264
  * @param data.region Region code for tenant context
2049
- * @param data.requestBody
2050
- * @returns BulkCreateRulesResponseDto Bulk create completed
2265
+ * @param data.requestBody Optional date (defaults to today)
2266
+ * @returns GenerateSnapshotResponse Snapshot generated successfully
2051
2267
  * @throws ApiError
2052
2268
  */
2053
- public static transactionRuleControllerBulkCreate(
2054
- data: TransactionRuleControllerBulkCreateData
2055
- ): CancelablePromise<TransactionRuleControllerBulkCreateResponse> {
2269
+ public static reportingControllerGenerateSnapshot(
2270
+ data: ReportingControllerGenerateSnapshotData
2271
+ ): CancelablePromise<ReportingControllerGenerateSnapshotResponse> {
2056
2272
  return __request(OpenAPI, {
2057
2273
  method: 'POST',
2058
- url: '/api/v1/{region}/bean/transaction-rules/bulk',
2059
- path: {
2060
- region: data.region
2061
- },
2062
- body: data.requestBody,
2063
- mediaType: 'application/json',
2064
- errors: {
2065
- 400: 'Invalid bulk create data',
2066
- 401: 'Unauthorized'
2067
- }
2068
- });
2069
- }
2070
-
2071
- /**
2072
- * Export transaction rules
2073
- * @param data The data for the request.
2074
- * @param data.format Export format (currently only JSON supported)
2075
- * @param data.region Region code for tenant context
2076
- * @returns ExportRulesResponseDto Exported rules
2077
- * @throws ApiError
2078
- */
2079
- public static transactionRuleControllerExport(
2080
- data: TransactionRuleControllerExportData
2081
- ): CancelablePromise<TransactionRuleControllerExportResponse> {
2082
- return __request(OpenAPI, {
2083
- method: 'GET',
2084
- url: '/api/v1/{region}/bean/transaction-rules/export/{format}',
2085
- path: {
2086
- format: data.format,
2087
- region: data.region
2088
- },
2089
- errors: {
2090
- 400: 'Unsupported format',
2091
- 401: 'Unauthorized'
2092
- }
2093
- });
2094
- }
2095
-
2096
- /**
2097
- * Get transaction rule statistics
2098
- * @param data The data for the request.
2099
- * @param data.period Statistics time period
2100
- * @param data.region Region code for tenant context
2101
- * @returns RuleStatisticsResponseDto Rule statistics
2102
- * @throws ApiError
2103
- */
2104
- public static transactionRuleControllerGetStatistics(
2105
- data: TransactionRuleControllerGetStatisticsData
2106
- ): CancelablePromise<TransactionRuleControllerGetStatisticsResponse> {
2107
- return __request(OpenAPI, {
2108
- method: 'GET',
2109
- url: '/api/v1/{region}/bean/transaction-rules/statistics/{period}',
2110
- path: {
2111
- period: data.period,
2112
- region: data.region
2113
- },
2114
- errors: {
2115
- 401: 'Unauthorized'
2116
- }
2117
- });
2118
- }
2119
-
2120
- /**
2121
- * Get transaction rule detail
2122
- * @param data The data for the request.
2123
- * @param data.ruleId Rule ID
2124
- * @param data.region Region code for tenant context
2125
- * @returns TransactionRuleResponseDto Rule details
2126
- * @throws ApiError
2127
- */
2128
- public static transactionRuleControllerGetDetail(
2129
- data: TransactionRuleControllerGetDetailData
2130
- ): CancelablePromise<TransactionRuleControllerGetDetailResponse> {
2131
- return __request(OpenAPI, {
2132
- method: 'GET',
2133
- url: '/api/v1/{region}/bean/transaction-rules/{ruleId}',
2134
- path: {
2135
- ruleId: data.ruleId,
2136
- region: data.region
2137
- },
2138
- errors: {
2139
- 401: 'Unauthorized',
2140
- 403: 'Forbidden - not owner of rule',
2141
- 404: 'Rule not found'
2142
- }
2143
- });
2144
- }
2145
-
2146
- /**
2147
- * Update a transaction rule
2148
- * @param data The data for the request.
2149
- * @param data.ruleId Rule ID to update
2150
- * @param data.region Region code for tenant context
2151
- * @param data.requestBody
2152
- * @returns TransactionRuleResponseDto Rule updated successfully
2153
- * @throws ApiError
2154
- */
2155
- public static transactionRuleControllerUpdate(
2156
- data: TransactionRuleControllerUpdateData
2157
- ): CancelablePromise<TransactionRuleControllerUpdateResponse> {
2158
- return __request(OpenAPI, {
2159
- method: 'PUT',
2160
- url: '/api/v1/{region}/bean/transaction-rules/{ruleId}',
2274
+ url: '/api/v1/{region}/reporting/snapshots/generate',
2161
2275
  path: {
2162
- ruleId: data.ruleId,
2163
2276
  region: data.region
2164
2277
  },
2165
2278
  body: data.requestBody,
2166
2279
  mediaType: 'application/json',
2167
2280
  errors: {
2168
- 400: 'Validation failed',
2169
- 401: 'Unauthorized',
2170
- 403: 'Forbidden - not owner of rule',
2171
- 404: 'Rule not found',
2172
- 409: 'Resource conflict - rule is being modified by another process'
2173
- }
2174
- });
2175
- }
2176
-
2177
- /**
2178
- * Delete a transaction rule
2179
- * @param data The data for the request.
2180
- * @param data.ruleId Rule ID to delete
2181
- * @param data.region Region code for tenant context
2182
- * @returns void Rule deleted successfully
2183
- * @throws ApiError
2184
- */
2185
- public static transactionRuleControllerDelete(
2186
- data: TransactionRuleControllerDeleteData
2187
- ): CancelablePromise<TransactionRuleControllerDeleteResponse> {
2188
- return __request(OpenAPI, {
2189
- method: 'DELETE',
2190
- url: '/api/v1/{region}/bean/transaction-rules/{ruleId}',
2191
- path: {
2192
- ruleId: data.ruleId,
2193
- region: data.region
2194
- },
2195
- errors: {
2196
- 401: 'Unauthorized',
2197
- 403: 'Forbidden - not owner of rule',
2198
- 404: 'Rule not found',
2199
- 409: 'Resource conflict - rule is being modified by another process'
2281
+ 400: 'Invalid date format',
2282
+ 401: 'User not authenticated'
2200
2283
  }
2201
2284
  });
2202
2285
  }
2203
2286
 
2204
2287
  /**
2205
- * Test rule matching
2288
+ * Backfill portfolio snapshots
2289
+ *
2290
+ * Generate snapshots for a date range (historical data backfill).
2291
+ *
2292
+ * **Multi-currency Support:**
2293
+ * - Each snapshot includes multi-currency data
2294
+ * - Uses exchange rates available at generation time
2295
+ * - Warnings stored for missing exchange rates
2296
+ *
2297
+ * **Best Practices:**
2298
+ * - Use for initial setup after account configuration
2299
+ * - Run during low-traffic periods for large date ranges
2300
+ * - Existing snapshots are skipped (not regenerated)
2301
+ *
2206
2302
  * @param data The data for the request.
2207
- * @param data.ruleId Rule ID to test
2208
2303
  * @param data.region Region code for tenant context
2209
2304
  * @param data.requestBody
2210
- * @returns TestRuleResponseDto Test result
2305
+ * @returns BackfillSnapshotsResponse Backfill completed successfully
2211
2306
  * @throws ApiError
2212
2307
  */
2213
- public static transactionRuleControllerTest(
2214
- data: TransactionRuleControllerTestData
2215
- ): CancelablePromise<TransactionRuleControllerTestResponse> {
2308
+ public static reportingControllerBackfillSnapshots(
2309
+ data: ReportingControllerBackfillSnapshotsData
2310
+ ): CancelablePromise<ReportingControllerBackfillSnapshotsResponse> {
2216
2311
  return __request(OpenAPI, {
2217
2312
  method: 'POST',
2218
- url: '/api/v1/{region}/bean/transaction-rules/{ruleId}/test',
2313
+ url: '/api/v1/{region}/reporting/snapshots/backfill',
2219
2314
  path: {
2220
- ruleId: data.ruleId,
2221
2315
  region: data.region
2222
2316
  },
2223
2317
  body: data.requestBody,
2224
2318
  mediaType: 'application/json',
2225
2319
  errors: {
2226
- 401: 'Unauthorized',
2227
- 403: 'Forbidden - not owner of rule',
2228
- 404: 'Rule not found'
2320
+ 400: 'Invalid date format or range',
2321
+ 401: 'User not authenticated',
2322
+ 409: 'Backfill already in progress for this user'
2229
2323
  }
2230
2324
  });
2231
2325
  }
@@ -2257,7 +2351,7 @@ export class UsersService {
2257
2351
  * Get current authenticated user
2258
2352
  * @param data The data for the request.
2259
2353
  * @param data.acceptLanguage
2260
- * @returns unknown User retrieved successfully
2354
+ * @returns UserResponseDto User retrieved successfully
2261
2355
  * @throws ApiError
2262
2356
  */
2263
2357
  public static userControllerGetUser(
@@ -2277,7 +2371,7 @@ export class UsersService {
2277
2371
  * Create a new account with auto-generated access token. Protected by Cloudflare Turnstile to prevent automated signup (when enabled).
2278
2372
  * @param data The data for the request.
2279
2373
  * @param data.requestBody
2280
- * @returns unknown User created successfully
2374
+ * @returns SignupResponseDto User created successfully
2281
2375
  * @throws ApiError
2282
2376
  */
2283
2377
  public static userControllerSignupUser(
@@ -2486,52 +2580,358 @@ export class PropertiesService {
2486
2580
  }
2487
2581
  }
2488
2582
 
2489
- export class LifeEventsService {
2583
+ export class BeanTransactionRulesService {
2490
2584
  /**
2491
- * Create a new life event
2492
- * Creates a new life event entry for the authenticated user. Returns ETag header carrying the row updatedAt.
2585
+ * Create a new transaction rule (or upsert if upsertByPayee=true)
2586
+ * Creates a new rule. If upsertByPayee=true, updates existing rule matching payeeKeywords[0] instead of creating duplicate.
2493
2587
  * @param data The data for the request.
2494
- * @param data.region Region code for tenant context (decorative for life events)
2588
+ * @param data.region Region code for tenant context
2495
2589
  * @param data.requestBody
2496
- * @returns EventResponseDto Life event created successfully
2590
+ * @returns TransactionRuleResponseDto Rule updated successfully (upsert mode)
2497
2591
  * @throws ApiError
2498
2592
  */
2499
- public static eventControllerCreate(
2500
- data: EventControllerCreateData
2501
- ): CancelablePromise<EventControllerCreateResponse> {
2593
+ public static transactionRuleControllerCreate(
2594
+ data: TransactionRuleControllerCreateData
2595
+ ): CancelablePromise<TransactionRuleControllerCreateResponse> {
2502
2596
  return __request(OpenAPI, {
2503
2597
  method: 'POST',
2504
- url: '/api/v1/{region}/bean/events',
2598
+ url: '/api/v1/{region}/bean/transaction-rules',
2505
2599
  path: {
2506
2600
  region: data.region
2507
2601
  },
2508
2602
  body: data.requestBody,
2509
2603
  mediaType: 'application/json',
2510
2604
  errors: {
2511
- 409: 'Life event already exists for this (userId, type, date) combination'
2605
+ 400: 'Validation failed',
2606
+ 401: 'Unauthorized',
2607
+ 409: 'Resource conflict - another process is updating this rule'
2512
2608
  }
2513
2609
  });
2514
2610
  }
2515
2611
 
2516
2612
  /**
2517
- * List user life events
2518
- * Returns life events for the authenticated user with optional filtering by type, description search, and date range.
2613
+ * Get all transaction rules for user
2519
2614
  * @param data The data for the request.
2520
- * @param data.region Region code for tenant context (decorative for life events)
2521
- * @param data.type Filter by life event type (exact match)
2522
- * @param data.q Search term for description (case-insensitive partial match)
2523
- * @param data.from Filter life events from this date (ISO 8601 format)
2524
- * @param data.to Filter life events to this date (ISO 8601 format)
2525
- * @param data.page Page number for pagination (default: 1)
2526
- * @param data.limit Number of items per page (default: 20, max: 100)
2527
- * @returns EventListResponseDto Life events retrieved successfully
2615
+ * @param data.region Region code for tenant context
2616
+ * @param data.limit Max results per page (default: 20, max: 100)
2617
+ * @param data.offset Pagination offset (default: 0)
2618
+ * @param data.enabled Filter by enabled status
2619
+ * @param data.learningSource Filter by learning source. Omit this parameter or pass empty string to get manually created rules (learningSource is null in database).
2620
+ * @param data.autoApplyEnabled Filter by auto-apply status
2621
+ * @returns TransactionRuleListResponseDto List of rules
2528
2622
  * @throws ApiError
2529
2623
  */
2530
- public static eventControllerFindAll(
2531
- data: EventControllerFindAllData
2532
- ): CancelablePromise<EventControllerFindAllResponse> {
2533
- return __request(OpenAPI, {
2534
- method: 'GET',
2624
+ public static transactionRuleControllerList(
2625
+ data: TransactionRuleControllerListData
2626
+ ): CancelablePromise<TransactionRuleControllerListResponse> {
2627
+ return __request(OpenAPI, {
2628
+ method: 'GET',
2629
+ url: '/api/v1/{region}/bean/transaction-rules',
2630
+ path: {
2631
+ region: data.region
2632
+ },
2633
+ query: {
2634
+ limit: data.limit,
2635
+ offset: data.offset,
2636
+ enabled: data.enabled,
2637
+ learningSource: data.learningSource,
2638
+ autoApplyEnabled: data.autoApplyEnabled
2639
+ },
2640
+ errors: {
2641
+ 401: 'Unauthorized'
2642
+ }
2643
+ });
2644
+ }
2645
+
2646
+ /**
2647
+ * Validate transaction rule configuration
2648
+ * @param data The data for the request.
2649
+ * @param data.region Region code for tenant context
2650
+ * @param data.requestBody
2651
+ * @returns ValidateRuleResponseDto Validation result
2652
+ * @throws ApiError
2653
+ */
2654
+ public static transactionRuleControllerValidate(
2655
+ data: TransactionRuleControllerValidateData
2656
+ ): CancelablePromise<TransactionRuleControllerValidateResponse> {
2657
+ return __request(OpenAPI, {
2658
+ method: 'POST',
2659
+ url: '/api/v1/{region}/bean/transaction-rules/validate',
2660
+ path: {
2661
+ region: data.region
2662
+ },
2663
+ body: data.requestBody,
2664
+ mediaType: 'application/json',
2665
+ errors: {
2666
+ 400: 'Validation failed',
2667
+ 401: 'Unauthorized'
2668
+ }
2669
+ });
2670
+ }
2671
+
2672
+ /**
2673
+ * Bulk create transaction rules
2674
+ * @param data The data for the request.
2675
+ * @param data.region Region code for tenant context
2676
+ * @param data.requestBody
2677
+ * @returns BulkCreateRulesResponseDto Bulk create completed
2678
+ * @throws ApiError
2679
+ */
2680
+ public static transactionRuleControllerBulkCreate(
2681
+ data: TransactionRuleControllerBulkCreateData
2682
+ ): CancelablePromise<TransactionRuleControllerBulkCreateResponse> {
2683
+ return __request(OpenAPI, {
2684
+ method: 'POST',
2685
+ url: '/api/v1/{region}/bean/transaction-rules/bulk',
2686
+ path: {
2687
+ region: data.region
2688
+ },
2689
+ body: data.requestBody,
2690
+ mediaType: 'application/json',
2691
+ errors: {
2692
+ 400: 'Invalid bulk create data',
2693
+ 401: 'Unauthorized'
2694
+ }
2695
+ });
2696
+ }
2697
+
2698
+ /**
2699
+ * Export transaction rules
2700
+ * @param data The data for the request.
2701
+ * @param data.format Export format (currently only JSON supported)
2702
+ * @param data.region Region code for tenant context
2703
+ * @returns ExportRulesResponseDto Exported rules
2704
+ * @throws ApiError
2705
+ */
2706
+ public static transactionRuleControllerExport(
2707
+ data: TransactionRuleControllerExportData
2708
+ ): CancelablePromise<TransactionRuleControllerExportResponse> {
2709
+ return __request(OpenAPI, {
2710
+ method: 'GET',
2711
+ url: '/api/v1/{region}/bean/transaction-rules/export/{format}',
2712
+ path: {
2713
+ format: data.format,
2714
+ region: data.region
2715
+ },
2716
+ errors: {
2717
+ 400: 'Unsupported format',
2718
+ 401: 'Unauthorized'
2719
+ }
2720
+ });
2721
+ }
2722
+
2723
+ /**
2724
+ * Get transaction rule statistics
2725
+ * @param data The data for the request.
2726
+ * @param data.period Statistics time period
2727
+ * @param data.region Region code for tenant context
2728
+ * @returns RuleStatisticsResponseDto Rule statistics
2729
+ * @throws ApiError
2730
+ */
2731
+ public static transactionRuleControllerGetStatistics(
2732
+ data: TransactionRuleControllerGetStatisticsData
2733
+ ): CancelablePromise<TransactionRuleControllerGetStatisticsResponse> {
2734
+ return __request(OpenAPI, {
2735
+ method: 'GET',
2736
+ url: '/api/v1/{region}/bean/transaction-rules/statistics/{period}',
2737
+ path: {
2738
+ period: data.period,
2739
+ region: data.region
2740
+ },
2741
+ errors: {
2742
+ 401: 'Unauthorized'
2743
+ }
2744
+ });
2745
+ }
2746
+
2747
+ /**
2748
+ * Get transaction rule detail
2749
+ * @param data The data for the request.
2750
+ * @param data.ruleId Rule ID
2751
+ * @param data.region Region code for tenant context
2752
+ * @returns TransactionRuleResponseDto Rule details
2753
+ * @throws ApiError
2754
+ */
2755
+ public static transactionRuleControllerGetDetail(
2756
+ data: TransactionRuleControllerGetDetailData
2757
+ ): CancelablePromise<TransactionRuleControllerGetDetailResponse> {
2758
+ return __request(OpenAPI, {
2759
+ method: 'GET',
2760
+ url: '/api/v1/{region}/bean/transaction-rules/{ruleId}',
2761
+ path: {
2762
+ ruleId: data.ruleId,
2763
+ region: data.region
2764
+ },
2765
+ errors: {
2766
+ 401: 'Unauthorized',
2767
+ 403: 'Forbidden - not owner of rule',
2768
+ 404: 'Rule not found'
2769
+ }
2770
+ });
2771
+ }
2772
+
2773
+ /**
2774
+ * Update a transaction rule
2775
+ * @param data The data for the request.
2776
+ * @param data.ruleId Rule ID to update
2777
+ * @param data.region Region code for tenant context
2778
+ * @param data.requestBody
2779
+ * @returns TransactionRuleResponseDto Rule updated successfully
2780
+ * @throws ApiError
2781
+ */
2782
+ public static transactionRuleControllerUpdate(
2783
+ data: TransactionRuleControllerUpdateData
2784
+ ): CancelablePromise<TransactionRuleControllerUpdateResponse> {
2785
+ return __request(OpenAPI, {
2786
+ method: 'PUT',
2787
+ url: '/api/v1/{region}/bean/transaction-rules/{ruleId}',
2788
+ path: {
2789
+ ruleId: data.ruleId,
2790
+ region: data.region
2791
+ },
2792
+ body: data.requestBody,
2793
+ mediaType: 'application/json',
2794
+ errors: {
2795
+ 400: 'Validation failed',
2796
+ 401: 'Unauthorized',
2797
+ 403: 'Forbidden - not owner of rule',
2798
+ 404: 'Rule not found',
2799
+ 409: 'Resource conflict - rule is being modified by another process'
2800
+ }
2801
+ });
2802
+ }
2803
+
2804
+ /**
2805
+ * Delete a transaction rule
2806
+ * @param data The data for the request.
2807
+ * @param data.ruleId Rule ID to delete
2808
+ * @param data.region Region code for tenant context
2809
+ * @returns void Rule deleted successfully
2810
+ * @throws ApiError
2811
+ */
2812
+ public static transactionRuleControllerDelete(
2813
+ data: TransactionRuleControllerDeleteData
2814
+ ): CancelablePromise<TransactionRuleControllerDeleteResponse> {
2815
+ return __request(OpenAPI, {
2816
+ method: 'DELETE',
2817
+ url: '/api/v1/{region}/bean/transaction-rules/{ruleId}',
2818
+ path: {
2819
+ ruleId: data.ruleId,
2820
+ region: data.region
2821
+ },
2822
+ errors: {
2823
+ 401: 'Unauthorized',
2824
+ 403: 'Forbidden - not owner of rule',
2825
+ 404: 'Rule not found',
2826
+ 409: 'Resource conflict - rule is being modified by another process'
2827
+ }
2828
+ });
2829
+ }
2830
+
2831
+ /**
2832
+ * Test rule matching
2833
+ * @param data The data for the request.
2834
+ * @param data.ruleId Rule ID to test
2835
+ * @param data.region Region code for tenant context
2836
+ * @param data.requestBody
2837
+ * @returns TestRuleResponseDto Test result
2838
+ * @throws ApiError
2839
+ */
2840
+ public static transactionRuleControllerTest(
2841
+ data: TransactionRuleControllerTestData
2842
+ ): CancelablePromise<TransactionRuleControllerTestResponse> {
2843
+ return __request(OpenAPI, {
2844
+ method: 'POST',
2845
+ url: '/api/v1/{region}/bean/transaction-rules/{ruleId}/test',
2846
+ path: {
2847
+ ruleId: data.ruleId,
2848
+ region: data.region
2849
+ },
2850
+ body: data.requestBody,
2851
+ mediaType: 'application/json',
2852
+ errors: {
2853
+ 401: 'Unauthorized',
2854
+ 403: 'Forbidden - not owner of rule',
2855
+ 404: 'Rule not found'
2856
+ }
2857
+ });
2858
+ }
2859
+ }
2860
+
2861
+ export class BeanCategoryCatalogService {
2862
+ /**
2863
+ * List category catalog for a region
2864
+ * Returns the region-scoped category slugs (expense/income/investment/banking/transfer/payment) for the NLP result picker. CN-exclusive payment instruments (huabei/baitiao) appear only under /cn.
2865
+ * @param data The data for the request.
2866
+ * @param data.region Region code for tenant context
2867
+ * @param data.scenario Filter by scenario
2868
+ * @param data.routeBearing Filter by routeBearing (entity-router route() consumes it)
2869
+ * @returns CategoryCatalogListResponseDto Category catalog retrieved successfully
2870
+ * @throws ApiError
2871
+ */
2872
+ public static categoryCatalogControllerList(
2873
+ data: CategoryCatalogControllerListData
2874
+ ): CancelablePromise<CategoryCatalogControllerListResponse> {
2875
+ return __request(OpenAPI, {
2876
+ method: 'GET',
2877
+ url: '/api/v1/{region}/bean/categories',
2878
+ path: {
2879
+ region: data.region
2880
+ },
2881
+ query: {
2882
+ scenario: data.scenario,
2883
+ routeBearing: data.routeBearing
2884
+ }
2885
+ });
2886
+ }
2887
+ }
2888
+
2889
+ export class LifeEventsService {
2890
+ /**
2891
+ * Create a new life event
2892
+ * Creates a new life event entry for the authenticated user. Returns ETag header carrying the row updatedAt.
2893
+ * @param data The data for the request.
2894
+ * @param data.region Region code for tenant context (decorative for life events)
2895
+ * @param data.requestBody
2896
+ * @returns EventResponseDto Life event created successfully
2897
+ * @throws ApiError
2898
+ */
2899
+ public static eventControllerCreate(
2900
+ data: EventControllerCreateData
2901
+ ): CancelablePromise<EventControllerCreateResponse> {
2902
+ return __request(OpenAPI, {
2903
+ method: 'POST',
2904
+ url: '/api/v1/{region}/bean/events',
2905
+ path: {
2906
+ region: data.region
2907
+ },
2908
+ body: data.requestBody,
2909
+ mediaType: 'application/json',
2910
+ errors: {
2911
+ 409: 'Life event already exists for this (userId, type, date) combination'
2912
+ }
2913
+ });
2914
+ }
2915
+
2916
+ /**
2917
+ * List user life events
2918
+ * Returns life events for the authenticated user with optional filtering by type, description search, and date range.
2919
+ * @param data The data for the request.
2920
+ * @param data.region Region code for tenant context (decorative for life events)
2921
+ * @param data.type Filter by life event type (exact match)
2922
+ * @param data.q Search term for description (case-insensitive partial match)
2923
+ * @param data.from Filter life events from this date (ISO 8601 format)
2924
+ * @param data.to Filter life events to this date (ISO 8601 format)
2925
+ * @param data.page Page number for pagination (default: 1)
2926
+ * @param data.limit Number of items per page (default: 20, max: 100)
2927
+ * @returns EventListResponseDto Life events retrieved successfully
2928
+ * @throws ApiError
2929
+ */
2930
+ public static eventControllerFindAll(
2931
+ data: EventControllerFindAllData
2932
+ ): CancelablePromise<EventControllerFindAllResponse> {
2933
+ return __request(OpenAPI, {
2934
+ method: 'GET',
2535
2935
  url: '/api/v1/{region}/bean/events',
2536
2936
  path: {
2537
2937
  region: data.region
@@ -2661,6 +3061,33 @@ export class LifeEventsService {
2661
3061
  }
2662
3062
  }
2663
3063
 
3064
+ export class OnboardingService {
3065
+ /**
3066
+ * Bootstrap core accounts + register asset accounts with opening balances (ADR-0113)
3067
+ * @param data The data for the request.
3068
+ * @param data.region Region code for tenant context
3069
+ * @param data.requestBody
3070
+ * @returns unknown Onboarding bootstrap result.
3071
+ * @throws ApiError
3072
+ */
3073
+ public static onboardingControllerBootstrap(
3074
+ data: OnboardingControllerBootstrapData
3075
+ ): CancelablePromise<OnboardingControllerBootstrapResponse> {
3076
+ return __request(OpenAPI, {
3077
+ method: 'POST',
3078
+ url: '/api/v1/{region}/bean/onboarding',
3079
+ path: {
3080
+ region: data.region
3081
+ },
3082
+ body: data.requestBody,
3083
+ mediaType: 'application/json',
3084
+ errors: {
3085
+ 422: 'Invalid region/account path/duplicate paths.'
3086
+ }
3087
+ });
3088
+ }
3089
+ }
3090
+
2664
3091
  export class BalanceReconciliationService {
2665
3092
  /**
2666
3093
  * Preview reconciliation (book vs actual)
@@ -2945,216 +3372,196 @@ export class BeanImportService {
2945
3372
  }
2946
3373
  }
2947
3374
 
2948
- export class BeanPlatformsService {
2949
- /**
2950
- * Get all platforms with statistics
2951
- * @returns unknown List of platforms with binding and account counts
2952
- * @throws ApiError
2953
- */
2954
- public static platformControllerFindAll(): CancelablePromise<PlatformControllerFindAllResponse> {
2955
- return __request(OpenAPI, {
2956
- method: 'GET',
2957
- url: '/api/v1/bean/platforms'
2958
- });
2959
- }
2960
-
3375
+ export class ProviderSyncService {
2961
3376
  /**
2962
- * Create a new platform
3377
+ * Sync transactions from financial data provider
3378
+ *
3379
+ * Accepts raw transactions from external financial data providers, transforms them to Beancount format, and processes them through the ingestion pipeline.
3380
+ *
3381
+ * **Supported Providers:**
3382
+ * - **plaid**: Plaid API (US, Canada, Europe)
3383
+ * - **teller**: Teller API (US)
3384
+ * - **truelayer**: TrueLayer Open Banking (UK, Europe)
3385
+ * - **gocardless**: GoCardless Bank Account Data (Europe)
3386
+ * - **simplefin**: SimpleFIN (Self-hosted)
3387
+ * - **yodlee**: Yodlee (Global)
3388
+ * - **beancount-direct**: Beancount format transactions
3389
+ * - **parsed-bill**: Client-side parsed bill transactions
3390
+ *
3391
+ * **Processing Flow:**
3392
+ * 1. Transform raw data via provider adapter
3393
+ * 2. Validate transaction format
3394
+ * 3. Deduplicate using originalId
3395
+ * 4. Classify using rule engine
3396
+ * 5. Route low-confidence to Review Center
3397
+ * 6. Persist validated transactions
3398
+ *
2963
3399
  * @param data The data for the request.
3400
+ * @param data.providerName Provider name
3401
+ * @param data.region Region code for tenant context
2964
3402
  * @param data.requestBody
2965
- * @returns unknown Platform created successfully
3403
+ * @returns ProviderSyncResponseDto Sync completed successfully
2966
3404
  * @throws ApiError
2967
3405
  */
2968
- public static platformControllerCreate(
2969
- data: PlatformControllerCreateData
2970
- ): CancelablePromise<PlatformControllerCreateResponse> {
3406
+ public static providerSyncControllerSync(
3407
+ data: ProviderSyncControllerSyncData
3408
+ ): CancelablePromise<ProviderSyncControllerSyncResponse> {
2971
3409
  return __request(OpenAPI, {
2972
3410
  method: 'POST',
2973
- url: '/api/v1/bean/platforms',
3411
+ url: '/api/v1/{region}/bean/import/provider/{providerName}/sync',
3412
+ path: {
3413
+ providerName: data.providerName,
3414
+ region: data.region
3415
+ },
2974
3416
  body: data.requestBody,
2975
3417
  mediaType: 'application/json',
2976
3418
  errors: {
2977
- 409: 'Platform already exists'
3419
+ 400: 'Invalid request data',
3420
+ 401: 'Missing or invalid authentication',
3421
+ 404: 'Provider not supported'
2978
3422
  }
2979
3423
  });
2980
3424
  }
2981
3425
 
2982
3426
  /**
2983
- * Get platform list for current user
2984
- * @returns unknown List of platforms with user binding status
2985
- * @throws ApiError
2986
- */
2987
- public static platformControllerGetPlatformList(): CancelablePromise<PlatformControllerGetPlatformListResponse> {
2988
- return __request(OpenAPI, {
2989
- method: 'GET',
2990
- url: '/api/v1/bean/platforms/list'
2991
- });
2992
- }
2993
-
2994
- /**
2995
- * Match platforms by name or alias
3427
+ * Get supported providers
3428
+ * Returns a list of all providers supported by the sync endpoint.
2996
3429
  * @param data The data for the request.
2997
- * @param data.q Search query — Chinese name, English name, or abbreviation
2998
- * @param data.region Region code for category override lookup
2999
- * @returns unknown List of matching platforms with suggested segment names
3430
+ * @param data.region Region code for tenant context
3431
+ * @returns SupportedProvidersResponseDto List of supported providers
3000
3432
  * @throws ApiError
3001
3433
  */
3002
- public static platformControllerMatchPlatforms(
3003
- data: PlatformControllerMatchPlatformsData
3004
- ): CancelablePromise<PlatformControllerMatchPlatformsResponse> {
3434
+ public static providerSyncControllerGetSupportedProviders(
3435
+ data: ProviderSyncControllerGetSupportedProvidersData
3436
+ ): CancelablePromise<ProviderSyncControllerGetSupportedProvidersResponse> {
3005
3437
  return __request(OpenAPI, {
3006
3438
  method: 'GET',
3007
- url: '/api/v1/bean/platforms/match',
3008
- query: {
3009
- q: data.q,
3010
- region: data.region
3011
- }
3012
- });
3013
- }
3014
-
3015
- /**
3016
- * Update a platform
3017
- * @param data The data for the request.
3018
- * @param data.id Platform ID
3019
- * @param data.requestBody
3020
- * @returns unknown Platform updated successfully
3021
- * @throws ApiError
3022
- */
3023
- public static platformControllerUpdate(
3024
- data: PlatformControllerUpdateData
3025
- ): CancelablePromise<PlatformControllerUpdateResponse> {
3026
- return __request(OpenAPI, {
3027
- method: 'PUT',
3028
- url: '/api/v1/bean/platforms/{id}',
3439
+ url: '/api/v1/{region}/bean/import/provider/supported',
3029
3440
  path: {
3030
- id: data.id
3441
+ region: data.region
3031
3442
  },
3032
- body: data.requestBody,
3033
- mediaType: 'application/json',
3034
3443
  errors: {
3035
- 404: 'Platform not found'
3444
+ 401: 'Missing or invalid authentication'
3036
3445
  }
3037
3446
  });
3038
3447
  }
3039
3448
 
3040
3449
  /**
3041
- * Delete a platform
3450
+ * Check if provider is supported
3451
+ * Returns whether a specific provider is supported.
3042
3452
  * @param data The data for the request.
3043
- * @param data.id Platform ID
3044
- * @returns void Platform deleted successfully
3453
+ * @param data.providerName Provider name to check
3454
+ * @param data.region Region code for tenant context
3455
+ * @returns unknown Provider support status
3045
3456
  * @throws ApiError
3046
3457
  */
3047
- public static platformControllerDelete(
3048
- data: PlatformControllerDeleteData
3049
- ): CancelablePromise<PlatformControllerDeleteResponse> {
3458
+ public static providerSyncControllerIsProviderSupported(
3459
+ data: ProviderSyncControllerIsProviderSupportedData
3460
+ ): CancelablePromise<ProviderSyncControllerIsProviderSupportedResponse> {
3050
3461
  return __request(OpenAPI, {
3051
- method: 'DELETE',
3052
- url: '/api/v1/bean/platforms/{id}',
3462
+ method: 'GET',
3463
+ url: '/api/v1/{region}/bean/import/provider/{providerName}/supported',
3053
3464
  path: {
3054
- id: data.id
3465
+ providerName: data.providerName,
3466
+ region: data.region
3055
3467
  },
3056
3468
  errors: {
3057
- 404: 'Platform not found'
3469
+ 401: 'Missing or invalid authentication'
3058
3470
  }
3059
3471
  });
3060
3472
  }
3061
3473
  }
3062
3474
 
3063
- export class ProviderSyncService {
3475
+ export class ExternalAccountLinksService {
3064
3476
  /**
3065
- * Sync transactions from financial data provider
3066
- *
3067
- * Accepts raw transactions from external financial data providers, transforms them to Beancount format, and processes them through the ingestion pipeline.
3068
- *
3069
- * **Supported Providers:**
3070
- * - **plaid**: Plaid API (US, Canada, Europe)
3071
- * - **teller**: Teller API (US)
3072
- * - **truelayer**: TrueLayer Open Banking (UK, Europe)
3073
- * - **gocardless**: GoCardless Bank Account Data (Europe)
3074
- * - **simplefin**: SimpleFIN (Self-hosted)
3075
- * - **yodlee**: Yodlee (Global)
3076
- * - **beancount-direct**: Beancount format transactions
3077
- * - **parsed-bill**: Client-side parsed bill transactions
3078
- *
3079
- * **Processing Flow:**
3080
- * 1. Transform raw data via provider adapter
3081
- * 2. Validate transaction format
3082
- * 3. Deduplicate using originalId
3083
- * 4. Classify using rule engine
3084
- * 5. Route low-confidence to Review Center
3085
- * 6. Persist validated transactions
3086
- *
3477
+ * Create an external account → BeanAccount mapping (ADR-0113)
3087
3478
  * @param data The data for the request.
3088
- * @param data.providerName Provider name
3089
3479
  * @param data.region Region code for tenant context
3090
3480
  * @param data.requestBody
3091
- * @returns ProviderSyncResponseDto Sync completed successfully
3481
+ * @returns ExternalAccountLinkResponseDto Link created.
3092
3482
  * @throws ApiError
3093
3483
  */
3094
- public static providerSyncControllerSync(
3095
- data: ProviderSyncControllerSyncData
3096
- ): CancelablePromise<ProviderSyncControllerSyncResponse> {
3484
+ public static externalAccountLinkControllerCreate(
3485
+ data: ExternalAccountLinkControllerCreateData
3486
+ ): CancelablePromise<ExternalAccountLinkControllerCreateResponse> {
3097
3487
  return __request(OpenAPI, {
3098
3488
  method: 'POST',
3099
- url: '/api/v1/{region}/bean/import/provider/{providerName}/sync',
3489
+ url: '/api/v1/{region}/bean/external-account-links',
3100
3490
  path: {
3101
- providerName: data.providerName,
3102
3491
  region: data.region
3103
3492
  },
3104
3493
  body: data.requestBody,
3105
3494
  mediaType: 'application/json',
3106
3495
  errors: {
3107
- 400: 'Invalid request data',
3108
- 401: 'Missing or invalid authentication',
3109
- 404: 'Provider not supported'
3496
+ 422: 'beanAccountId not owned, or an active link already exists.'
3110
3497
  }
3111
3498
  });
3112
3499
  }
3113
3500
 
3114
3501
  /**
3115
- * Get supported providers
3116
- * Returns a list of all providers supported by the sync endpoint.
3502
+ * List the user's active external account links
3117
3503
  * @param data The data for the request.
3504
+ * @param data.provider
3118
3505
  * @param data.region Region code for tenant context
3119
- * @returns SupportedProvidersResponseDto List of supported providers
3506
+ * @returns ExternalAccountLinkListResponseDto Links retrieved.
3120
3507
  * @throws ApiError
3121
3508
  */
3122
- public static providerSyncControllerGetSupportedProviders(
3123
- data: ProviderSyncControllerGetSupportedProvidersData
3124
- ): CancelablePromise<ProviderSyncControllerGetSupportedProvidersResponse> {
3509
+ public static externalAccountLinkControllerFindAll(
3510
+ data: ExternalAccountLinkControllerFindAllData
3511
+ ): CancelablePromise<ExternalAccountLinkControllerFindAllResponse> {
3125
3512
  return __request(OpenAPI, {
3126
3513
  method: 'GET',
3127
- url: '/api/v1/{region}/bean/import/provider/supported',
3514
+ url: '/api/v1/{region}/bean/external-account-links',
3128
3515
  path: {
3129
3516
  region: data.region
3130
3517
  },
3131
- errors: {
3132
- 401: 'Missing or invalid authentication'
3518
+ query: {
3519
+ provider: data.provider
3133
3520
  }
3134
3521
  });
3135
3522
  }
3136
3523
 
3137
3524
  /**
3138
- * Check if provider is supported
3139
- * Returns whether a specific provider is supported.
3525
+ * Get a single external account link
3140
3526
  * @param data The data for the request.
3141
- * @param data.providerName Provider name to check
3527
+ * @param data.id
3142
3528
  * @param data.region Region code for tenant context
3143
- * @returns unknown Provider support status
3529
+ * @returns ExternalAccountLinkResponseDto Link retrieved.
3144
3530
  * @throws ApiError
3145
3531
  */
3146
- public static providerSyncControllerIsProviderSupported(
3147
- data: ProviderSyncControllerIsProviderSupportedData
3148
- ): CancelablePromise<ProviderSyncControllerIsProviderSupportedResponse> {
3532
+ public static externalAccountLinkControllerFindOne(
3533
+ data: ExternalAccountLinkControllerFindOneData
3534
+ ): CancelablePromise<ExternalAccountLinkControllerFindOneResponse> {
3149
3535
  return __request(OpenAPI, {
3150
3536
  method: 'GET',
3151
- url: '/api/v1/{region}/bean/import/provider/{providerName}/supported',
3537
+ url: '/api/v1/{region}/bean/external-account-links/{id}',
3152
3538
  path: {
3153
- providerName: data.providerName,
3539
+ id: data.id,
3154
3540
  region: data.region
3155
3541
  },
3156
3542
  errors: {
3157
- 401: 'Missing or invalid authentication'
3543
+ 422: 'Link not found or not owned by the user.'
3544
+ }
3545
+ });
3546
+ }
3547
+
3548
+ /**
3549
+ * Soft-delete (disconnect) an external account link
3550
+ * @param data The data for the request.
3551
+ * @param data.id
3552
+ * @param data.region Region code for tenant context
3553
+ * @returns void Link soft-deleted; historical transactions are unaffected.
3554
+ * @throws ApiError
3555
+ */
3556
+ public static externalAccountLinkControllerRemove(
3557
+ data: ExternalAccountLinkControllerRemoveData
3558
+ ): CancelablePromise<ExternalAccountLinkControllerRemoveResponse> {
3559
+ return __request(OpenAPI, {
3560
+ method: 'DELETE',
3561
+ url: '/api/v1/{region}/bean/external-account-links/{id}',
3562
+ path: {
3563
+ id: data.id,
3564
+ region: data.region
3158
3565
  }
3159
3566
  });
3160
3567
  }
@@ -3318,361 +3725,180 @@ export class BeanNlpService {
3318
3725
  }
3319
3726
  }
3320
3727
 
3321
- export class DashboardService {
3322
- /**
3323
- * Get net worth overview
3324
- * Returns total net worth with breakdown of assets and liabilities
3325
- * @param data The data for the request.
3326
- * @param data.region Region code for tenant context
3327
- * @param data.date Date for balance calculation (ISO 8601 format)
3328
- * @returns NetWorthResponseDto Net worth retrieved successfully
3329
- * @throws ApiError
3330
- */
3331
- public static dashboardControllerGetNetWorth(
3332
- data: DashboardControllerGetNetWorthData
3333
- ): CancelablePromise<DashboardControllerGetNetWorthResponse> {
3334
- return __request(OpenAPI, {
3335
- method: 'GET',
3336
- url: '/api/v1/{region}/dashboard/net-worth',
3337
- path: {
3338
- region: data.region
3339
- },
3340
- query: {
3341
- date: data.date
3342
- },
3343
- errors: {
3344
- 401: 'User not authenticated'
3345
- }
3346
- });
3347
- }
3348
-
3349
- /**
3350
- * Get accounts grouped by platform
3351
- * Returns accounts with balances grouped by financial platform
3352
- * @param data The data for the request.
3353
- * @param data.region Region code for tenant context
3354
- * @param data.groupBy Grouping strategy
3355
- * @param data.date Date for balance calculation (ISO 8601 format)
3356
- * @param data.accountId Scope to a single account (only valid with groupBy=holdingAssetClass, ADR-0105 §6)
3357
- * @returns unknown Accounts retrieved successfully. Response type depends on groupBy parameter.
3358
- * @throws ApiError
3359
- */
3360
- public static dashboardControllerGetAccounts(
3361
- data: DashboardControllerGetAccountsData
3362
- ): CancelablePromise<DashboardControllerGetAccountsResponse> {
3363
- return __request(OpenAPI, {
3364
- method: 'GET',
3365
- url: '/api/v1/{region}/dashboard/accounts',
3366
- path: {
3367
- region: data.region
3368
- },
3369
- query: {
3370
- groupBy: data.groupBy,
3371
- date: data.date,
3372
- accountId: data.accountId
3373
- },
3374
- errors: {
3375
- 401: 'User not authenticated'
3376
- }
3377
- });
3378
- }
3379
-
3380
- /**
3381
- * Get cash flow summary
3382
- * Returns income, expenses, and savings for a monthly period
3383
- * @param data The data for the request.
3384
- * @param data.period Period in YYYY-MM format
3385
- * @param data.region Region code for tenant context
3386
- * @returns CashFlowResponseDto Cash flow retrieved successfully
3387
- * @throws ApiError
3388
- */
3389
- public static dashboardControllerGetCashFlow(
3390
- data: DashboardControllerGetCashFlowData
3391
- ): CancelablePromise<DashboardControllerGetCashFlowResponse> {
3392
- return __request(OpenAPI, {
3393
- method: 'GET',
3394
- url: '/api/v1/{region}/dashboard/cash-flow',
3395
- path: {
3396
- region: data.region
3397
- },
3398
- query: {
3399
- period: data.period
3400
- },
3401
- errors: {
3402
- 400: 'Invalid period format',
3403
- 401: 'User not authenticated'
3404
- }
3405
- });
3406
- }
3407
-
3408
- /**
3409
- * Get expenses/income grouped by functional category
3410
- * Returns amounts pre-aggregated by functional category (account-path Group segment) with server-side multi-currency conversion. flow=expense (default) aggregates ^Expenses: accounts; flow=income aggregates ^Income: accounts (issue #518)
3411
- * @param data The data for the request.
3412
- * @param data.region Region code for tenant context
3413
- * @param data.groupBy Grouping strategy
3414
- * @param data.period Time window (1m = current calendar month)
3415
- * @param data.flow Account root to aggregate (expense → ^Expenses:, income → ^Income:)
3416
- * @returns ExpensesByCategoryResponseDto Expenses retrieved successfully
3417
- * @throws ApiError
3418
- */
3419
- public static dashboardControllerGetExpenses(
3420
- data: DashboardControllerGetExpensesData
3421
- ): CancelablePromise<DashboardControllerGetExpensesResponse> {
3422
- return __request(OpenAPI, {
3423
- method: 'GET',
3424
- url: '/api/v1/{region}/dashboard/expenses',
3425
- path: {
3426
- region: data.region
3427
- },
3428
- query: {
3429
- groupBy: data.groupBy,
3430
- period: data.period,
3431
- flow: data.flow
3432
- },
3433
- errors: {
3434
- 400: 'Invalid groupBy or period',
3435
- 401: 'User not authenticated'
3436
- }
3437
- });
3438
- }
3439
- }
3440
-
3441
- export class InvestmentService {
3728
+ export class BeanPlatformsService {
3442
3729
  /**
3443
- * Get per-holding unrealized + realized P&L
3444
- * Average-cost unrealized P&L per account × commodity, plus cumulative realized P&L on sold lots (method = FIFO | average, default average).
3445
- * @param data The data for the request.
3446
- * @param data.region Region code for tenant context
3447
- * @param data.asOf As-of date (ISO 8601), defaults to today
3448
- * @param data.accountId Scope to a single account
3449
- * @param data.method Realized-P&L lot-matching method (default average). Does not affect the average-cost unrealized basis.
3450
- * @returns HoldingPnlResponseDto Holding P&L retrieved successfully
3730
+ * Get all platforms with statistics
3731
+ * @returns unknown List of platforms with binding and account counts
3451
3732
  * @throws ApiError
3452
3733
  */
3453
- public static holdingPnlControllerGetHoldingPnl(
3454
- data: HoldingPnlControllerGetHoldingPnlData
3455
- ): CancelablePromise<HoldingPnlControllerGetHoldingPnlResponse> {
3734
+ public static platformControllerFindAll(): CancelablePromise<PlatformControllerFindAllResponse> {
3456
3735
  return __request(OpenAPI, {
3457
3736
  method: 'GET',
3458
- url: '/api/v1/{region}/investment/holdings/pnl',
3459
- path: {
3460
- region: data.region
3461
- },
3462
- query: {
3463
- asOf: data.asOf,
3464
- accountId: data.accountId,
3465
- method: data.method
3466
- },
3467
- errors: {
3468
- 400: 'Invalid asOf format/value/future date, invalid accountId format, or unsupported method',
3469
- 401: 'User not authenticated'
3470
- }
3737
+ url: '/api/v1/bean/platforms'
3471
3738
  });
3472
3739
  }
3473
- }
3474
3740
 
3475
- export class BeanPricesService {
3476
3741
  /**
3477
- * Create a new price
3478
- * Creates a new price entry for the authenticated user
3742
+ * Create a new platform
3479
3743
  * @param data The data for the request.
3480
- * @param data.region Region code for tenant context
3481
3744
  * @param data.requestBody
3482
- * @returns PriceResponseDto Price created successfully
3745
+ * @returns unknown Platform created successfully
3483
3746
  * @throws ApiError
3484
3747
  */
3485
- public static priceControllerCreate(
3486
- data: PriceControllerCreateData
3487
- ): CancelablePromise<PriceControllerCreateResponse> {
3748
+ public static platformControllerCreate(
3749
+ data: PlatformControllerCreateData
3750
+ ): CancelablePromise<PlatformControllerCreateResponse> {
3488
3751
  return __request(OpenAPI, {
3489
3752
  method: 'POST',
3490
- url: '/api/v1/{region}/bean/prices',
3491
- path: {
3492
- region: data.region
3493
- },
3753
+ url: '/api/v1/bean/platforms',
3494
3754
  body: data.requestBody,
3495
3755
  mediaType: 'application/json',
3496
3756
  errors: {
3497
- 404: 'Currency or quoteCurrency commodity not found',
3498
- 409: 'Price already exists for this currency pair and date'
3757
+ 409: 'Platform already exists'
3499
3758
  }
3500
3759
  });
3501
3760
  }
3502
3761
 
3503
3762
  /**
3504
- * List user prices
3505
- * Returns all price entries for the authenticated user with optional filtering
3763
+ * Get platform list for current user
3506
3764
  * @param data The data for the request.
3507
- * @param data.region Region code for tenant context
3508
- * @param data.currency Filter by currency (e.g., BTC, AAPL, USD)
3509
- * @param data.quoteCurrency Filter by quote currency (pricing currency, e.g., USD, CNY)
3510
- * @param data.dateFrom Filter prices from this date (ISO 8601 format)
3511
- * @param data.dateTo Filter prices to this date (ISO 8601 format)
3512
- * @param data.search Search term for currency or quoteCurrency (case-insensitive partial match)
3513
- * @param data.page Page number for pagination (default: 1)
3514
- * @param data.limit Number of items per page (default: 20, max: 100)
3515
- * @returns PriceListResponseDto Prices retrieved successfully
3765
+ * @param data.region Region code (ISO 3166-1 alpha-2) that biases within-type-bucket ordering (local-region platforms first). Case-insensitive — stored/compared UPPERCASE ("cn" == "CN").
3766
+ * @returns PlatformListItemDto List of platforms with user binding status
3516
3767
  * @throws ApiError
3517
3768
  */
3518
- public static priceControllerFindAll(
3519
- data: PriceControllerFindAllData
3520
- ): CancelablePromise<PriceControllerFindAllResponse> {
3769
+ public static platformControllerGetPlatformList(
3770
+ data: PlatformControllerGetPlatformListData = {}
3771
+ ): CancelablePromise<PlatformControllerGetPlatformListResponse> {
3521
3772
  return __request(OpenAPI, {
3522
3773
  method: 'GET',
3523
- url: '/api/v1/{region}/bean/prices',
3524
- path: {
3525
- region: data.region
3526
- },
3774
+ url: '/api/v1/bean/platforms/list',
3527
3775
  query: {
3528
- currency: data.currency,
3529
- quoteCurrency: data.quoteCurrency,
3530
- dateFrom: data.dateFrom,
3531
- dateTo: data.dateTo,
3532
- search: data.search,
3533
- page: data.page,
3534
- limit: data.limit
3776
+ region: data.region
3535
3777
  }
3536
3778
  });
3537
3779
  }
3538
3780
 
3539
3781
  /**
3540
- * Get price by ID
3541
- * Returns a single price entry by its ID
3782
+ * Match platforms by name or alias
3542
3783
  * @param data The data for the request.
3543
- * @param data.id Price ID
3544
- * @param data.region Region code for tenant context
3545
- * @returns PriceResponseDto Price retrieved successfully
3784
+ * @param data.q Search query — Chinese name, English name, or abbreviation
3785
+ * @param data.region Region code (ISO 3166-1 alpha-2) that biases within-tier ordering (local-region platforms first); also the intended categoryOverrides key. Case-insensitive — stored/compared UPPERCASE ("cn" == "CN").
3786
+ * @returns PlatformMatchResponseDto Matching platforms with overall match type and truncation flag
3546
3787
  * @throws ApiError
3547
3788
  */
3548
- public static priceControllerFindOne(
3549
- data: PriceControllerFindOneData
3550
- ): CancelablePromise<PriceControllerFindOneResponse> {
3789
+ public static platformControllerMatchPlatforms(
3790
+ data: PlatformControllerMatchPlatformsData
3791
+ ): CancelablePromise<PlatformControllerMatchPlatformsResponse> {
3551
3792
  return __request(OpenAPI, {
3552
3793
  method: 'GET',
3553
- url: '/api/v1/{region}/bean/prices/{id}',
3554
- path: {
3555
- id: data.id,
3794
+ url: '/api/v1/bean/platforms/match',
3795
+ query: {
3796
+ q: data.q,
3556
3797
  region: data.region
3557
- },
3558
- errors: {
3559
- 404: 'Price not found'
3560
3798
  }
3561
3799
  });
3562
3800
  }
3563
3801
 
3564
3802
  /**
3565
- * Update a price
3566
- * Updates an existing price entry
3803
+ * Update a platform
3567
3804
  * @param data The data for the request.
3568
- * @param data.id Price ID
3569
- * @param data.region Region code for tenant context
3805
+ * @param data.id Platform ID
3570
3806
  * @param data.requestBody
3571
- * @returns PriceResponseDto Price updated successfully
3807
+ * @returns unknown Platform updated successfully
3572
3808
  * @throws ApiError
3573
3809
  */
3574
- public static priceControllerUpdate(
3575
- data: PriceControllerUpdateData
3576
- ): CancelablePromise<PriceControllerUpdateResponse> {
3810
+ public static platformControllerUpdate(
3811
+ data: PlatformControllerUpdateData
3812
+ ): CancelablePromise<PlatformControllerUpdateResponse> {
3577
3813
  return __request(OpenAPI, {
3578
3814
  method: 'PUT',
3579
- url: '/api/v1/{region}/bean/prices/{id}',
3815
+ url: '/api/v1/bean/platforms/{id}',
3580
3816
  path: {
3581
- id: data.id,
3582
- region: data.region
3817
+ id: data.id
3583
3818
  },
3584
3819
  body: data.requestBody,
3585
3820
  mediaType: 'application/json',
3586
3821
  errors: {
3587
- 404: 'Price not found',
3588
- 409: 'Updated price conflicts with existing price'
3822
+ 404: 'Platform not found'
3589
3823
  }
3590
3824
  });
3591
3825
  }
3592
3826
 
3593
3827
  /**
3594
- * Delete a price
3595
- * Deletes a price entry (hard delete)
3828
+ * Delete a platform
3596
3829
  * @param data The data for the request.
3597
- * @param data.id Price ID
3598
- * @param data.region Region code for tenant context
3599
- * @returns void Price deleted successfully
3830
+ * @param data.id Platform ID
3831
+ * @returns void Platform deleted successfully
3600
3832
  * @throws ApiError
3601
3833
  */
3602
- public static priceControllerDelete(
3603
- data: PriceControllerDeleteData
3604
- ): CancelablePromise<PriceControllerDeleteResponse> {
3834
+ public static platformControllerDelete(
3835
+ data: PlatformControllerDeleteData
3836
+ ): CancelablePromise<PlatformControllerDeleteResponse> {
3605
3837
  return __request(OpenAPI, {
3606
3838
  method: 'DELETE',
3607
- url: '/api/v1/{region}/bean/prices/{id}',
3839
+ url: '/api/v1/bean/platforms/{id}',
3608
3840
  path: {
3609
- id: data.id,
3610
- region: data.region
3841
+ id: data.id
3611
3842
  },
3612
3843
  errors: {
3613
- 404: 'Price not found'
3844
+ 404: 'Platform not found'
3614
3845
  }
3615
3846
  });
3616
3847
  }
3848
+ }
3617
3849
 
3850
+ export class DashboardService {
3618
3851
  /**
3619
- * Bulk create prices
3620
- * Creates multiple price entries at once (skips duplicates)
3852
+ * Get net worth overview
3853
+ * Returns total net worth with breakdown of assets and liabilities
3621
3854
  * @param data The data for the request.
3622
3855
  * @param data.region Region code for tenant context
3623
- * @param data.requestBody
3624
- * @returns PriceResponseDto Prices created successfully
3856
+ * @param data.date Date for balance calculation (ISO 8601 format)
3857
+ * @returns NetWorthResponseDto Net worth retrieved successfully
3625
3858
  * @throws ApiError
3626
3859
  */
3627
- public static priceControllerBulkCreate(
3628
- data: PriceControllerBulkCreateData
3629
- ): CancelablePromise<PriceControllerBulkCreateResponse> {
3860
+ public static dashboardControllerGetNetWorth(
3861
+ data: DashboardControllerGetNetWorthData
3862
+ ): CancelablePromise<DashboardControllerGetNetWorthResponse> {
3630
3863
  return __request(OpenAPI, {
3631
- method: 'POST',
3632
- url: '/api/v1/{region}/bean/prices/bulk',
3864
+ method: 'GET',
3865
+ url: '/api/v1/{region}/dashboard/net-worth',
3633
3866
  path: {
3634
3867
  region: data.region
3635
3868
  },
3636
- body: data.requestBody,
3637
- mediaType: 'application/json'
3869
+ query: {
3870
+ date: data.date
3871
+ },
3872
+ errors: {
3873
+ 401: 'User not authenticated'
3874
+ }
3638
3875
  });
3639
3876
  }
3640
- }
3641
3877
 
3642
- export class ReportingService {
3643
3878
  /**
3644
- * Get portfolio value trends
3645
- *
3646
- * Returns time series data of portfolio net worth.
3647
- *
3648
- * **Multi-currency Support:**
3649
- * - `series[].byCurrency` - Currency breakdown for each data point
3650
- * - `byCurrency` - Separate time series grouped by currency
3651
- * - `warnings` - Exchange rate warnings if conversion failed
3652
- *
3653
- * **Parameters:**
3654
- * - `period`: Time period (1m, 3m, 6m, 1y)
3655
- * - `granularity`: Data granularity (day, week, month)
3656
- *
3879
+ * Get accounts grouped by platform
3880
+ * Returns accounts with balances grouped by financial platform
3657
3881
  * @param data The data for the request.
3658
3882
  * @param data.region Region code for tenant context
3659
- * @param data.period Time period
3660
- * @param data.granularity Data granularity
3661
- * @returns PortfolioTrendsResponseDto Trends retrieved successfully
3883
+ * @param data.groupBy Grouping strategy
3884
+ * @param data.date Date for balance calculation (ISO 8601 format)
3885
+ * @param data.accountId Scope to a single account (only valid with groupBy=holdingAssetClass, ADR-0105 §6)
3886
+ * @returns unknown Accounts retrieved successfully. Response type depends on groupBy parameter.
3662
3887
  * @throws ApiError
3663
3888
  */
3664
- public static reportingControllerGetPortfolioTrends(
3665
- data: ReportingControllerGetPortfolioTrendsData
3666
- ): CancelablePromise<ReportingControllerGetPortfolioTrendsResponse> {
3889
+ public static dashboardControllerGetAccounts(
3890
+ data: DashboardControllerGetAccountsData
3891
+ ): CancelablePromise<DashboardControllerGetAccountsResponse> {
3667
3892
  return __request(OpenAPI, {
3668
3893
  method: 'GET',
3669
- url: '/api/v1/{region}/reporting/portfolio/trends',
3894
+ url: '/api/v1/{region}/dashboard/accounts',
3670
3895
  path: {
3671
3896
  region: data.region
3672
3897
  },
3673
3898
  query: {
3674
- period: data.period,
3675
- granularity: data.granularity
3899
+ groupBy: data.groupBy,
3900
+ date: data.date,
3901
+ accountId: data.accountId
3676
3902
  },
3677
3903
  errors: {
3678
3904
  401: 'User not authenticated'
@@ -3681,116 +3907,95 @@ export class ReportingService {
3681
3907
  }
3682
3908
 
3683
3909
  /**
3684
- * Get cash-flow trends
3685
- *
3686
- * Monthly income / expense / netSavings over a fixed N-month window
3687
- * (current month + N−1 prior). Missing months are zero-filled (flow metric).
3688
- *
3689
- * **Parameters:**
3690
- * - `period`: 1m | 3m | 6m | 1y (default 6m)
3691
- * - `granularity`: accepted for API symmetry; v1 returns month buckets
3692
- *
3910
+ * Get cash flow summary
3911
+ * Returns income, expenses, and savings for a monthly period
3693
3912
  * @param data The data for the request.
3913
+ * @param data.period Period in YYYY-MM format
3694
3914
  * @param data.region Region code for tenant context
3695
- * @param data.period Time period
3696
- * @param data.granularity Data granularity (accepted for API symmetry; v1 returns month buckets)
3697
- * @returns CashFlowTrendsResponseDto Cash-flow trends retrieved successfully
3915
+ * @returns CashFlowResponseDto Cash flow retrieved successfully
3698
3916
  * @throws ApiError
3699
3917
  */
3700
- public static reportingControllerGetCashFlowTrends(
3701
- data: ReportingControllerGetCashFlowTrendsData
3702
- ): CancelablePromise<ReportingControllerGetCashFlowTrendsResponse> {
3918
+ public static dashboardControllerGetCashFlow(
3919
+ data: DashboardControllerGetCashFlowData
3920
+ ): CancelablePromise<DashboardControllerGetCashFlowResponse> {
3703
3921
  return __request(OpenAPI, {
3704
3922
  method: 'GET',
3705
- url: '/api/v1/{region}/reporting/cash-flow/trends',
3923
+ url: '/api/v1/{region}/dashboard/cash-flow',
3706
3924
  path: {
3707
3925
  region: data.region
3708
3926
  },
3709
3927
  query: {
3710
- period: data.period,
3711
- granularity: data.granularity
3928
+ period: data.period
3712
3929
  },
3713
3930
  errors: {
3931
+ 400: 'Invalid period format',
3714
3932
  401: 'User not authenticated'
3715
3933
  }
3716
3934
  });
3717
3935
  }
3718
3936
 
3719
3937
  /**
3720
- * Generate portfolio snapshot
3721
- *
3722
- * Manually generate a portfolio snapshot for a specific date.
3723
- *
3724
- * **Multi-currency Support:**
3725
- * - Fetches balances grouped by currency
3726
- * - Uses user's baseCurrency setting for conversion
3727
- * - Stores exchange rates and warnings
3728
- *
3729
- * **Use Cases:**
3730
- * - Testing snapshot generation
3731
- * - Force regeneration after data correction
3732
- * - Initial setup for new users
3733
- *
3938
+ * Get expenses/income grouped by functional category
3939
+ * Returns amounts pre-aggregated by functional category (account-path Group segment) with server-side multi-currency conversion. flow=expense (default) aggregates ^Expenses: accounts; flow=income aggregates ^Income: accounts (issue #518)
3734
3940
  * @param data The data for the request.
3735
3941
  * @param data.region Region code for tenant context
3736
- * @param data.requestBody Optional date (defaults to today)
3737
- * @returns GenerateSnapshotResponse Snapshot generated successfully
3942
+ * @param data.groupBy Grouping strategy
3943
+ * @param data.period Time window (1m = current calendar month)
3944
+ * @param data.flow Account root to aggregate (expense → ^Expenses:, income → ^Income:)
3945
+ * @returns ExpensesByCategoryResponseDto Expenses retrieved successfully
3738
3946
  * @throws ApiError
3739
3947
  */
3740
- public static reportingControllerGenerateSnapshot(
3741
- data: ReportingControllerGenerateSnapshotData
3742
- ): CancelablePromise<ReportingControllerGenerateSnapshotResponse> {
3948
+ public static dashboardControllerGetExpenses(
3949
+ data: DashboardControllerGetExpensesData
3950
+ ): CancelablePromise<DashboardControllerGetExpensesResponse> {
3743
3951
  return __request(OpenAPI, {
3744
- method: 'POST',
3745
- url: '/api/v1/{region}/reporting/snapshots/generate',
3952
+ method: 'GET',
3953
+ url: '/api/v1/{region}/dashboard/expenses',
3746
3954
  path: {
3747
3955
  region: data.region
3748
3956
  },
3749
- body: data.requestBody,
3750
- mediaType: 'application/json',
3957
+ query: {
3958
+ groupBy: data.groupBy,
3959
+ period: data.period,
3960
+ flow: data.flow
3961
+ },
3751
3962
  errors: {
3752
- 400: 'Invalid date format',
3963
+ 400: 'Invalid groupBy or period',
3753
3964
  401: 'User not authenticated'
3754
3965
  }
3755
3966
  });
3756
3967
  }
3968
+ }
3757
3969
 
3970
+ export class InvestmentService {
3758
3971
  /**
3759
- * Backfill portfolio snapshots
3760
- *
3761
- * Generate snapshots for a date range (historical data backfill).
3762
- *
3763
- * **Multi-currency Support:**
3764
- * - Each snapshot includes multi-currency data
3765
- * - Uses exchange rates available at generation time
3766
- * - Warnings stored for missing exchange rates
3767
- *
3768
- * **Best Practices:**
3769
- * - Use for initial setup after account configuration
3770
- * - Run during low-traffic periods for large date ranges
3771
- * - Existing snapshots are skipped (not regenerated)
3772
- *
3972
+ * Get per-holding unrealized + realized P&L
3973
+ * Average-cost unrealized P&L per account × commodity, plus cumulative realized P&L on sold lots (method = FIFO | average, default average).
3773
3974
  * @param data The data for the request.
3774
3975
  * @param data.region Region code for tenant context
3775
- * @param data.requestBody
3776
- * @returns BackfillSnapshotsResponse Backfill completed successfully
3976
+ * @param data.asOf As-of date (ISO 8601), defaults to today
3977
+ * @param data.accountId Scope to a single account
3978
+ * @param data.method Realized-P&L lot-matching method (default average). Does not affect the average-cost unrealized basis.
3979
+ * @returns HoldingPnlResponseDto Holding P&L retrieved successfully
3777
3980
  * @throws ApiError
3778
3981
  */
3779
- public static reportingControllerBackfillSnapshots(
3780
- data: ReportingControllerBackfillSnapshotsData
3781
- ): CancelablePromise<ReportingControllerBackfillSnapshotsResponse> {
3982
+ public static holdingPnlControllerGetHoldingPnl(
3983
+ data: HoldingPnlControllerGetHoldingPnlData
3984
+ ): CancelablePromise<HoldingPnlControllerGetHoldingPnlResponse> {
3782
3985
  return __request(OpenAPI, {
3783
- method: 'POST',
3784
- url: '/api/v1/{region}/reporting/snapshots/backfill',
3986
+ method: 'GET',
3987
+ url: '/api/v1/{region}/investment/holdings/pnl',
3785
3988
  path: {
3786
3989
  region: data.region
3787
3990
  },
3788
- body: data.requestBody,
3789
- mediaType: 'application/json',
3991
+ query: {
3992
+ asOf: data.asOf,
3993
+ accountId: data.accountId,
3994
+ method: data.method
3995
+ },
3790
3996
  errors: {
3791
- 400: 'Invalid date format or range',
3792
- 401: 'User not authenticated',
3793
- 409: 'Backfill already in progress for this user'
3997
+ 400: 'Invalid asOf format/value/future date, invalid accountId format, or unsupported method',
3998
+ 401: 'User not authenticated'
3794
3999
  }
3795
4000
  });
3796
4001
  }
@@ -3819,7 +4024,7 @@ export class AuthService {
3819
4024
  * Anonymous login with access token
3820
4025
  * @param data The data for the request.
3821
4026
  * @param data.requestBody
3822
- * @returns unknown Login successful
4027
+ * @returns AnonymousLoginResponseDto Login successful
3823
4028
  * @throws ApiError
3824
4029
  */
3825
4030
  public static authControllerAccessTokenLogin(
@@ -4006,3 +4211,53 @@ export class InfoService {
4006
4211
  });
4007
4212
  }
4008
4213
  }
4214
+
4215
+ export class MarketDataService {
4216
+ /**
4217
+ * Search market symbols by name or code
4218
+ * Ranked search over the openbb catalog. Empty `q` returns [].
4219
+ * @param data The data for the request.
4220
+ * @param data.q Search term — matched against symbol and instrument name. Empty string returns [].
4221
+ * @param data.limit Maximum number of results (clamped 1..50)
4222
+ * @param data.exchange Filter by exchange code (e.g. US, HK, SS, SZ)
4223
+ * @param data.assetType Filter by OpenBB asset_type (e.g. stock, etf)
4224
+ * @returns SymbolSearchResultDto Ranked search results
4225
+ * @throws ApiError
4226
+ */
4227
+ public static symbolControllerSearch(
4228
+ data: SymbolControllerSearchData
4229
+ ): CancelablePromise<SymbolControllerSearchResponse> {
4230
+ return __request(OpenAPI, {
4231
+ method: 'GET',
4232
+ url: '/api/v1/market/symbols/search',
4233
+ query: {
4234
+ q: data.q,
4235
+ limit: data.limit,
4236
+ exchange: data.exchange,
4237
+ assetType: data.assetType
4238
+ }
4239
+ });
4240
+ }
4241
+
4242
+ /**
4243
+ * Get a market symbol quote
4244
+ * @param data The data for the request.
4245
+ * @param data.symbol
4246
+ * @returns SymbolQuoteDto Symbol quote
4247
+ * @throws ApiError
4248
+ */
4249
+ public static symbolControllerGetQuote(
4250
+ data: SymbolControllerGetQuoteData
4251
+ ): CancelablePromise<SymbolControllerGetQuoteResponse> {
4252
+ return __request(OpenAPI, {
4253
+ method: 'GET',
4254
+ url: '/api/v1/market/symbols/{symbol}/quote',
4255
+ path: {
4256
+ symbol: data.symbol
4257
+ },
4258
+ errors: {
4259
+ 404: 'Symbol not found in the openbb catalog'
4260
+ }
4261
+ });
4262
+ }
4263
+ }