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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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,26 @@ 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,
174
196
  EventControllerCreateData,
175
197
  EventControllerCreateResponse,
176
198
  EventControllerFindAllData,
@@ -183,6 +205,16 @@ import type {
183
205
  EventControllerDeleteResponse,
184
206
  EventControllerGetSliceData,
185
207
  EventControllerGetSliceResponse,
208
+ OnboardingControllerBootstrapData,
209
+ OnboardingControllerBootstrapResponse,
210
+ ReconciliationControllerComputeData,
211
+ ReconciliationControllerComputeResponse,
212
+ ReconciliationControllerAssertData,
213
+ ReconciliationControllerAssertResponse,
214
+ ReconciliationControllerPadData,
215
+ ReconciliationControllerPadResponse,
216
+ ReconciliationControllerHistoryData,
217
+ ReconciliationControllerHistoryResponse,
186
218
  ExportControllerExportBeancountResponse,
187
219
  FileImportControllerImportFileData,
188
220
  FileImportControllerImportFileResponse,
@@ -196,22 +228,20 @@ import type {
196
228
  ImporterConfigControllerUpdateConfigResponse,
197
229
  ImporterConfigControllerResetConfigData,
198
230
  ImporterConfigControllerResetConfigResponse,
199
- PlatformControllerFindAllResponse,
200
- PlatformControllerCreateData,
201
- PlatformControllerCreateResponse,
202
- PlatformControllerGetPlatformListResponse,
203
- PlatformControllerMatchPlatformsData,
204
- PlatformControllerMatchPlatformsResponse,
205
- PlatformControllerUpdateData,
206
- PlatformControllerUpdateResponse,
207
- PlatformControllerDeleteData,
208
- PlatformControllerDeleteResponse,
209
231
  ProviderSyncControllerSyncData,
210
232
  ProviderSyncControllerSyncResponse,
211
233
  ProviderSyncControllerGetSupportedProvidersData,
212
234
  ProviderSyncControllerGetSupportedProvidersResponse,
213
235
  ProviderSyncControllerIsProviderSupportedData,
214
236
  ProviderSyncControllerIsProviderSupportedResponse,
237
+ ExternalAccountLinkControllerCreateData,
238
+ ExternalAccountLinkControllerCreateResponse,
239
+ ExternalAccountLinkControllerFindAllData,
240
+ ExternalAccountLinkControllerFindAllResponse,
241
+ ExternalAccountLinkControllerFindOneData,
242
+ ExternalAccountLinkControllerFindOneResponse,
243
+ ExternalAccountLinkControllerRemoveData,
244
+ ExternalAccountLinkControllerRemoveResponse,
215
245
  TelemetryControllerReportTelemetryData,
216
246
  TelemetryControllerReportTelemetryResponse,
217
247
  TelemetryControllerReportCoverageMissData,
@@ -224,34 +254,26 @@ import type {
224
254
  NlpControllerClearSessionResponse,
225
255
  NlpControllerGetSessionData,
226
256
  NlpControllerGetSessionResponse,
257
+ PlatformControllerFindAllResponse,
258
+ PlatformControllerCreateData,
259
+ PlatformControllerCreateResponse,
260
+ PlatformControllerGetPlatformListResponse,
261
+ PlatformControllerMatchPlatformsData,
262
+ PlatformControllerMatchPlatformsResponse,
263
+ PlatformControllerUpdateData,
264
+ PlatformControllerUpdateResponse,
265
+ PlatformControllerDeleteData,
266
+ PlatformControllerDeleteResponse,
227
267
  DashboardControllerGetNetWorthData,
228
268
  DashboardControllerGetNetWorthResponse,
229
269
  DashboardControllerGetAccountsData,
230
270
  DashboardControllerGetAccountsResponse,
231
271
  DashboardControllerGetCashFlowData,
232
272
  DashboardControllerGetCashFlowResponse,
273
+ DashboardControllerGetExpensesData,
274
+ DashboardControllerGetExpensesResponse,
233
275
  HoldingPnlControllerGetHoldingPnlData,
234
276
  HoldingPnlControllerGetHoldingPnlResponse,
235
- PriceControllerCreateData,
236
- PriceControllerCreateResponse,
237
- PriceControllerFindAllData,
238
- PriceControllerFindAllResponse,
239
- PriceControllerFindOneData,
240
- PriceControllerFindOneResponse,
241
- PriceControllerUpdateData,
242
- PriceControllerUpdateResponse,
243
- PriceControllerDeleteData,
244
- PriceControllerDeleteResponse,
245
- PriceControllerBulkCreateData,
246
- PriceControllerBulkCreateResponse,
247
- ReportingControllerGetPortfolioTrendsData,
248
- ReportingControllerGetPortfolioTrendsResponse,
249
- ReportingControllerGetCashFlowTrendsData,
250
- ReportingControllerGetCashFlowTrendsResponse,
251
- ReportingControllerGenerateSnapshotData,
252
- ReportingControllerGenerateSnapshotResponse,
253
- ReportingControllerBackfillSnapshotsData,
254
- ReportingControllerBackfillSnapshotsResponse,
255
277
  ApiKeysControllerCreateApiKeyResponse,
256
278
  AuthControllerAccessTokenLoginData,
257
279
  AuthControllerAccessTokenLoginResponse,
@@ -266,7 +288,11 @@ import type {
266
288
  HealthControllerResetCircuitBreakerData,
267
289
  HealthControllerResetCircuitBreakerResponse,
268
290
  HealthControllerGetMetricsResponse,
269
- InfoControllerGetInfoResponse
291
+ InfoControllerGetInfoResponse,
292
+ SymbolControllerSearchData,
293
+ SymbolControllerSearchResponse,
294
+ SymbolControllerGetQuoteData,
295
+ SymbolControllerGetQuoteResponse
270
296
  } from './types.gen';
271
297
 
272
298
  export class BeanAccountsService {
@@ -304,7 +330,7 @@ export class BeanAccountsService {
304
330
  * @param data.type Filter by account type
305
331
  * @param data.status Filter by status
306
332
  * @param data.isCustom Filter by custom (user-created) accounts only
307
- * @param data.search Search term for path or i18nKey
333
+ * @param data.search Search term for account path
308
334
  * @param data.limit Maximum number of results
309
335
  * @param data.offset Number of results to skip
310
336
  * @returns AccountListResponseDto Accounts retrieved successfully
@@ -385,7 +411,7 @@ export class BeanAccountsService {
385
411
 
386
412
  /**
387
413
  * Delete account
388
- * Deletes an account (only if no transactions)
414
+ * Deletes an account (only if no active transactions; voided/superseded residual postings are cleaned up)
389
415
  * @param data The data for the request.
390
416
  * @param data.id Account UUID
391
417
  * @param data.region Region code for tenant context
@@ -404,7 +430,7 @@ export class BeanAccountsService {
404
430
  },
405
431
  errors: {
406
432
  404: 'Account not found',
407
- 409: 'Account has transactions and cannot be deleted'
433
+ 409: 'Account has active transactions and cannot be deleted'
408
434
  }
409
435
  });
410
436
  }
@@ -466,6 +492,35 @@ export class BeanAccountsService {
466
492
  }
467
493
  });
468
494
  }
495
+
496
+ /**
497
+ * Post an opening-balance transaction
498
+ * 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.
499
+ * @param data The data for the request.
500
+ * @param data.id Account UUID
501
+ * @param data.region Region code for tenant context
502
+ * @param data.requestBody
503
+ * @returns OpeningBalanceResultDto Opening-balance transaction created
504
+ * @throws ApiError
505
+ */
506
+ public static accountControllerAddOpeningBalance(
507
+ data: AccountControllerAddOpeningBalanceData
508
+ ): CancelablePromise<AccountControllerAddOpeningBalanceResponse> {
509
+ return __request(OpenAPI, {
510
+ method: 'POST',
511
+ url: '/api/v1/{region}/bean/accounts/{id}/opening-balance',
512
+ path: {
513
+ id: data.id,
514
+ region: data.region
515
+ },
516
+ body: data.requestBody,
517
+ mediaType: 'application/json',
518
+ errors: {
519
+ 404: 'Account not found',
520
+ 409: 'An opening balance already exists for this account'
521
+ }
522
+ });
523
+ }
469
524
  }
470
525
 
471
526
  export class BeanAccountStandardsService {
@@ -497,7 +552,7 @@ export class BeanAccountStandardsService {
497
552
 
498
553
  /**
499
554
  * Get template metadata for an account path
500
- * Returns extendable status and root type for a template path.
555
+ * Returns root type for a template path.
501
556
  * @param data The data for the request.
502
557
  * @param data.region Region code for tenant context
503
558
  * @param data.path Account path to check
@@ -583,6 +638,7 @@ export class BeanTransactionsService {
583
638
  * @param data.status Filter by transaction status
584
639
  * @param data.search Search in narration and payee fields (max 200 chars)
585
640
  * @param data.accountId Filter by account ID (transactions with postings to this account)
641
+ * @param data.category Filter by ADR-0075 functional category (Group segment); matches any posting to an Expenses/Income account whose derived Group segment equals this value
586
642
  * @returns TransactionListResponseDto Transaction list
587
643
  * @throws ApiError
588
644
  */
@@ -602,7 +658,8 @@ export class BeanTransactionsService {
602
658
  dateTo: data.dateTo,
603
659
  status: data.status,
604
660
  search: data.search,
605
- accountId: data.accountId
661
+ accountId: data.accountId,
662
+ category: data.category
606
663
  },
607
664
  errors: {
608
665
  400: 'Validation failed',
@@ -790,7 +847,7 @@ export class BeanBalancesService {
790
847
  * Query account balance
791
848
  * Calculate account balance at a specific date for a single currency
792
849
  * @param data The data for the request.
793
- * @param data.account Account name (e.g., "Assets:Bank:Checking")
850
+ * @param data.account Account name (e.g., "Assets:Checking")
794
851
  * @param data.region Region code for tenant context
795
852
  * @param data.date Date to calculate balance at (ISO 8601 format)
796
853
  * @param data.currency Currency to query (e.g., "USD", "CNY")
@@ -1511,150 +1568,317 @@ export class BeanCommoditiesService {
1511
1568
  }
1512
1569
  }
1513
1570
 
1514
- export class RecurringRulesService {
1571
+ export class BeanPricesService {
1515
1572
  /**
1516
- * Create a new recurring rule
1517
- * Creates a new recurring transaction rule for the authenticated user
1573
+ * Create a new price
1574
+ * Creates a new price entry for the authenticated user
1518
1575
  * @param data The data for the request.
1519
1576
  * @param data.region Region code for tenant context
1520
1577
  * @param data.requestBody
1521
- * @returns RecurringRuleResponseDto Rule created successfully
1578
+ * @returns PriceResponseDto Price created successfully
1522
1579
  * @throws ApiError
1523
1580
  */
1524
- public static recurringRuleControllerCreate(
1525
- data: RecurringRuleControllerCreateData
1526
- ): CancelablePromise<RecurringRuleControllerCreateResponse> {
1581
+ public static priceControllerCreate(
1582
+ data: PriceControllerCreateData
1583
+ ): CancelablePromise<PriceControllerCreateResponse> {
1527
1584
  return __request(OpenAPI, {
1528
1585
  method: 'POST',
1529
- url: '/api/v1/{region}/bean/recurring-rules',
1586
+ url: '/api/v1/{region}/bean/prices',
1530
1587
  path: {
1531
1588
  region: data.region
1532
1589
  },
1533
1590
  body: data.requestBody,
1534
1591
  mediaType: 'application/json',
1535
1592
  errors: {
1536
- 400: 'Invalid input data (e.g., autoCreate without accounts)',
1537
- 409: 'Rule with same name already exists'
1593
+ 404: 'Currency or quoteCurrency commodity not found',
1594
+ 409: 'Price already exists for this currency pair and date'
1538
1595
  }
1539
1596
  });
1540
1597
  }
1541
1598
 
1542
1599
  /**
1543
- * List recurring rules
1544
- * Returns all recurring rules for the authenticated user with optional filtering
1600
+ * List user prices
1601
+ * Returns all price entries for the authenticated user with optional filtering
1545
1602
  * @param data The data for the request.
1546
1603
  * @param data.region Region code for tenant context
1547
- * @param data.isActive Filter by active status
1548
- * @param data.frequency Filter by frequency (WEEKLY, MONTHLY, etc.)
1549
- * @param data.hasAutoCreate Filter by autoCreate enabled
1550
- * @returns RecurringRuleResponseDto Rules retrieved successfully
1604
+ * @param data.currency Filter by currency (e.g., BTC, AAPL, USD)
1605
+ * @param data.quoteCurrency Filter by quote currency (pricing currency, e.g., USD, CNY)
1606
+ * @param data.dateFrom Filter prices from this date (ISO 8601 format)
1607
+ * @param data.dateTo Filter prices to this date (ISO 8601 format)
1608
+ * @param data.search Search term for currency or quoteCurrency (case-insensitive partial match)
1609
+ * @param data.page Page number for pagination (default: 1)
1610
+ * @param data.limit Number of items per page (default: 20, max: 100)
1611
+ * @returns PriceListResponseDto Prices retrieved successfully
1551
1612
  * @throws ApiError
1552
1613
  */
1553
- public static recurringRuleControllerFindAll(
1554
- data: RecurringRuleControllerFindAllData
1555
- ): CancelablePromise<RecurringRuleControllerFindAllResponse> {
1614
+ public static priceControllerFindAll(
1615
+ data: PriceControllerFindAllData
1616
+ ): CancelablePromise<PriceControllerFindAllResponse> {
1556
1617
  return __request(OpenAPI, {
1557
1618
  method: 'GET',
1558
- url: '/api/v1/{region}/bean/recurring-rules',
1619
+ url: '/api/v1/{region}/bean/prices',
1559
1620
  path: {
1560
1621
  region: data.region
1561
1622
  },
1562
1623
  query: {
1563
- isActive: data.isActive,
1564
- frequency: data.frequency,
1565
- hasAutoCreate: data.hasAutoCreate
1624
+ currency: data.currency,
1625
+ quoteCurrency: data.quoteCurrency,
1626
+ dateFrom: data.dateFrom,
1627
+ dateTo: data.dateTo,
1628
+ search: data.search,
1629
+ page: data.page,
1630
+ limit: data.limit
1566
1631
  }
1567
1632
  });
1568
1633
  }
1569
1634
 
1570
1635
  /**
1571
- * Create recurring rule from transaction
1572
- * Auto-creates a recurring rule using transaction data. User only confirms frequency.
1636
+ * Get price by ID
1637
+ * Returns a single price entry by its ID
1573
1638
  * @param data The data for the request.
1574
- * @param data.transactionId Source transaction ID
1639
+ * @param data.id Price ID
1575
1640
  * @param data.region Region code for tenant context
1576
- * @param data.requestBody
1577
- * @returns RecurringRuleResponseDto Rule created successfully
1641
+ * @returns PriceResponseDto Price retrieved successfully
1578
1642
  * @throws ApiError
1579
1643
  */
1580
- public static recurringRuleControllerCreateFromTransaction(
1581
- data: RecurringRuleControllerCreateFromTransactionData
1582
- ): CancelablePromise<RecurringRuleControllerCreateFromTransactionResponse> {
1644
+ public static priceControllerFindOne(
1645
+ data: PriceControllerFindOneData
1646
+ ): CancelablePromise<PriceControllerFindOneResponse> {
1583
1647
  return __request(OpenAPI, {
1584
- method: 'POST',
1585
- url: '/api/v1/{region}/bean/recurring-rules/from-transaction/{transactionId}',
1648
+ method: 'GET',
1649
+ url: '/api/v1/{region}/bean/prices/{id}',
1586
1650
  path: {
1587
- transactionId: data.transactionId,
1651
+ id: data.id,
1588
1652
  region: data.region
1589
1653
  },
1590
- body: data.requestBody,
1591
- mediaType: 'application/json',
1592
1654
  errors: {
1593
- 404: 'Transaction not found',
1594
- 409: 'Rule with same name already exists or transaction already linked'
1655
+ 404: 'Price not found'
1595
1656
  }
1596
1657
  });
1597
1658
  }
1598
1659
 
1599
1660
  /**
1600
- * Get recurring rule by ID
1601
- * Returns a specific recurring rule with its details
1661
+ * Update a price
1662
+ * Updates an existing price entry
1602
1663
  * @param data The data for the request.
1603
- * @param data.id Rule ID
1664
+ * @param data.id Price ID
1604
1665
  * @param data.region Region code for tenant context
1605
- * @returns RecurringRuleResponseDto Rule retrieved successfully
1666
+ * @param data.requestBody
1667
+ * @returns PriceResponseDto Price updated successfully
1606
1668
  * @throws ApiError
1607
1669
  */
1608
- public static recurringRuleControllerFindOne(
1609
- data: RecurringRuleControllerFindOneData
1610
- ): CancelablePromise<RecurringRuleControllerFindOneResponse> {
1670
+ public static priceControllerUpdate(
1671
+ data: PriceControllerUpdateData
1672
+ ): CancelablePromise<PriceControllerUpdateResponse> {
1611
1673
  return __request(OpenAPI, {
1612
- method: 'GET',
1613
- url: '/api/v1/{region}/bean/recurring-rules/{id}',
1674
+ method: 'PUT',
1675
+ url: '/api/v1/{region}/bean/prices/{id}',
1614
1676
  path: {
1615
1677
  id: data.id,
1616
1678
  region: data.region
1617
1679
  },
1680
+ body: data.requestBody,
1681
+ mediaType: 'application/json',
1618
1682
  errors: {
1619
- 404: 'Rule not found'
1683
+ 404: 'Price not found',
1684
+ 409: 'Updated price conflicts with existing price'
1620
1685
  }
1621
1686
  });
1622
1687
  }
1623
1688
 
1624
1689
  /**
1625
- * Update recurring rule
1626
- * Updates an existing recurring rule
1690
+ * Delete a price
1691
+ * Deletes a price entry (hard delete)
1627
1692
  * @param data The data for the request.
1628
- * @param data.id Rule ID
1693
+ * @param data.id Price ID
1629
1694
  * @param data.region Region code for tenant context
1630
- * @param data.requestBody
1631
- * @returns RecurringRuleResponseDto Rule updated successfully
1695
+ * @returns void Price deleted successfully
1632
1696
  * @throws ApiError
1633
1697
  */
1634
- public static recurringRuleControllerUpdate(
1635
- data: RecurringRuleControllerUpdateData
1636
- ): CancelablePromise<RecurringRuleControllerUpdateResponse> {
1698
+ public static priceControllerDelete(
1699
+ data: PriceControllerDeleteData
1700
+ ): CancelablePromise<PriceControllerDeleteResponse> {
1637
1701
  return __request(OpenAPI, {
1638
- method: 'PATCH',
1639
- url: '/api/v1/{region}/bean/recurring-rules/{id}',
1702
+ method: 'DELETE',
1703
+ url: '/api/v1/{region}/bean/prices/{id}',
1640
1704
  path: {
1641
1705
  id: data.id,
1642
1706
  region: data.region
1643
1707
  },
1644
- body: data.requestBody,
1645
- mediaType: 'application/json',
1646
1708
  errors: {
1647
- 400: 'Invalid input data',
1648
- 404: 'Rule not found'
1709
+ 404: 'Price not found'
1649
1710
  }
1650
1711
  });
1651
1712
  }
1652
1713
 
1653
1714
  /**
1654
- * Delete recurring rule
1655
- * Soft deletes a recurring rule (sets isActive to false)
1715
+ * Bulk create prices
1716
+ * Creates multiple price entries at once (skips duplicates)
1656
1717
  * @param data The data for the request.
1657
- * @param data.id Rule ID
1718
+ * @param data.region Region code for tenant context
1719
+ * @param data.requestBody
1720
+ * @returns PriceResponseDto Prices created successfully
1721
+ * @throws ApiError
1722
+ */
1723
+ public static priceControllerBulkCreate(
1724
+ data: PriceControllerBulkCreateData
1725
+ ): CancelablePromise<PriceControllerBulkCreateResponse> {
1726
+ return __request(OpenAPI, {
1727
+ method: 'POST',
1728
+ url: '/api/v1/{region}/bean/prices/bulk',
1729
+ path: {
1730
+ region: data.region
1731
+ },
1732
+ body: data.requestBody,
1733
+ mediaType: 'application/json'
1734
+ });
1735
+ }
1736
+ }
1737
+
1738
+ export class RecurringRulesService {
1739
+ /**
1740
+ * Create a new recurring rule
1741
+ * Creates a new recurring transaction rule for the authenticated user
1742
+ * @param data The data for the request.
1743
+ * @param data.region Region code for tenant context
1744
+ * @param data.requestBody
1745
+ * @returns RecurringRuleResponseDto Rule created successfully
1746
+ * @throws ApiError
1747
+ */
1748
+ public static recurringRuleControllerCreate(
1749
+ data: RecurringRuleControllerCreateData
1750
+ ): CancelablePromise<RecurringRuleControllerCreateResponse> {
1751
+ return __request(OpenAPI, {
1752
+ method: 'POST',
1753
+ url: '/api/v1/{region}/bean/recurring-rules',
1754
+ path: {
1755
+ region: data.region
1756
+ },
1757
+ body: data.requestBody,
1758
+ mediaType: 'application/json',
1759
+ errors: {
1760
+ 400: 'Invalid input data (e.g., autoCreate without accounts)',
1761
+ 409: 'Rule with same name already exists'
1762
+ }
1763
+ });
1764
+ }
1765
+
1766
+ /**
1767
+ * List recurring rules
1768
+ * Returns all recurring rules for the authenticated user with optional filtering
1769
+ * @param data The data for the request.
1770
+ * @param data.region Region code for tenant context
1771
+ * @param data.isActive Filter by active status
1772
+ * @param data.frequency Filter by frequency (WEEKLY, MONTHLY, etc.)
1773
+ * @param data.hasAutoCreate Filter by autoCreate enabled
1774
+ * @returns RecurringRuleResponseDto Rules retrieved successfully
1775
+ * @throws ApiError
1776
+ */
1777
+ public static recurringRuleControllerFindAll(
1778
+ data: RecurringRuleControllerFindAllData
1779
+ ): CancelablePromise<RecurringRuleControllerFindAllResponse> {
1780
+ return __request(OpenAPI, {
1781
+ method: 'GET',
1782
+ url: '/api/v1/{region}/bean/recurring-rules',
1783
+ path: {
1784
+ region: data.region
1785
+ },
1786
+ query: {
1787
+ isActive: data.isActive,
1788
+ frequency: data.frequency,
1789
+ hasAutoCreate: data.hasAutoCreate
1790
+ }
1791
+ });
1792
+ }
1793
+
1794
+ /**
1795
+ * Create recurring rule from transaction
1796
+ * Auto-creates a recurring rule using transaction data. User only confirms frequency.
1797
+ * @param data The data for the request.
1798
+ * @param data.transactionId Source transaction ID
1799
+ * @param data.region Region code for tenant context
1800
+ * @param data.requestBody
1801
+ * @returns RecurringRuleResponseDto Rule created successfully
1802
+ * @throws ApiError
1803
+ */
1804
+ public static recurringRuleControllerCreateFromTransaction(
1805
+ data: RecurringRuleControllerCreateFromTransactionData
1806
+ ): CancelablePromise<RecurringRuleControllerCreateFromTransactionResponse> {
1807
+ return __request(OpenAPI, {
1808
+ method: 'POST',
1809
+ url: '/api/v1/{region}/bean/recurring-rules/from-transaction/{transactionId}',
1810
+ path: {
1811
+ transactionId: data.transactionId,
1812
+ region: data.region
1813
+ },
1814
+ body: data.requestBody,
1815
+ mediaType: 'application/json',
1816
+ errors: {
1817
+ 404: 'Transaction not found',
1818
+ 409: 'Rule with same name already exists or transaction already linked'
1819
+ }
1820
+ });
1821
+ }
1822
+
1823
+ /**
1824
+ * Get recurring rule by ID
1825
+ * Returns a specific recurring rule with its details
1826
+ * @param data The data for the request.
1827
+ * @param data.id Rule ID
1828
+ * @param data.region Region code for tenant context
1829
+ * @returns RecurringRuleResponseDto Rule retrieved successfully
1830
+ * @throws ApiError
1831
+ */
1832
+ public static recurringRuleControllerFindOne(
1833
+ data: RecurringRuleControllerFindOneData
1834
+ ): CancelablePromise<RecurringRuleControllerFindOneResponse> {
1835
+ return __request(OpenAPI, {
1836
+ method: 'GET',
1837
+ url: '/api/v1/{region}/bean/recurring-rules/{id}',
1838
+ path: {
1839
+ id: data.id,
1840
+ region: data.region
1841
+ },
1842
+ errors: {
1843
+ 404: 'Rule not found'
1844
+ }
1845
+ });
1846
+ }
1847
+
1848
+ /**
1849
+ * Update recurring rule
1850
+ * Updates an existing recurring rule
1851
+ * @param data The data for the request.
1852
+ * @param data.id Rule ID
1853
+ * @param data.region Region code for tenant context
1854
+ * @param data.requestBody
1855
+ * @returns RecurringRuleResponseDto Rule updated successfully
1856
+ * @throws ApiError
1857
+ */
1858
+ public static recurringRuleControllerUpdate(
1859
+ data: RecurringRuleControllerUpdateData
1860
+ ): CancelablePromise<RecurringRuleControllerUpdateResponse> {
1861
+ return __request(OpenAPI, {
1862
+ method: 'PATCH',
1863
+ url: '/api/v1/{region}/bean/recurring-rules/{id}',
1864
+ path: {
1865
+ id: data.id,
1866
+ region: data.region
1867
+ },
1868
+ body: data.requestBody,
1869
+ mediaType: 'application/json',
1870
+ errors: {
1871
+ 400: 'Invalid input data',
1872
+ 404: 'Rule not found'
1873
+ }
1874
+ });
1875
+ }
1876
+
1877
+ /**
1878
+ * Delete recurring rule
1879
+ * Soft deletes a recurring rule (sets isActive to false)
1880
+ * @param data The data for the request.
1881
+ * @param data.id Rule ID
1658
1882
  * @param data.region Region code for tenant context
1659
1883
  * @returns void Rule deleted successfully
1660
1884
  * @throws ApiError
@@ -1941,279 +2165,158 @@ export class RecurringForecastService {
1941
2165
  }
1942
2166
  }
1943
2167
 
1944
- export class BeanTransactionRulesService {
2168
+ export class ReportingService {
1945
2169
  /**
1946
- * Create a new transaction rule (or upsert if upsertByPayee=true)
1947
- * Creates a new rule. If upsertByPayee=true, updates existing rule matching payeeKeywords[0] instead of creating duplicate.
2170
+ * Get portfolio value trends
2171
+ *
2172
+ * Returns time series data of portfolio net worth.
2173
+ *
2174
+ * **Multi-currency Support:**
2175
+ * - `series[].byCurrency` - Currency breakdown for each data point
2176
+ * - `byCurrency` - Separate time series grouped by currency
2177
+ * - `warnings` - Exchange rate warnings if conversion failed
2178
+ *
2179
+ * **Parameters:**
2180
+ * - `period`: Time period (1m, 3m, 6m, 1y)
2181
+ * - `granularity`: Data granularity (day, week, month)
2182
+ *
1948
2183
  * @param data The data for the request.
1949
2184
  * @param data.region Region code for tenant context
1950
- * @param data.requestBody
1951
- * @returns TransactionRuleResponseDto Rule updated successfully (upsert mode)
2185
+ * @param data.period Time period
2186
+ * @param data.granularity Data granularity
2187
+ * @returns PortfolioTrendsResponseDto Trends retrieved successfully
1952
2188
  * @throws ApiError
1953
2189
  */
1954
- public static transactionRuleControllerCreate(
1955
- data: TransactionRuleControllerCreateData
1956
- ): CancelablePromise<TransactionRuleControllerCreateResponse> {
2190
+ public static reportingControllerGetPortfolioTrends(
2191
+ data: ReportingControllerGetPortfolioTrendsData
2192
+ ): CancelablePromise<ReportingControllerGetPortfolioTrendsResponse> {
1957
2193
  return __request(OpenAPI, {
1958
- method: 'POST',
1959
- url: '/api/v1/{region}/bean/transaction-rules',
2194
+ method: 'GET',
2195
+ url: '/api/v1/{region}/reporting/portfolio/trends',
1960
2196
  path: {
1961
2197
  region: data.region
1962
2198
  },
1963
- body: data.requestBody,
1964
- mediaType: 'application/json',
2199
+ query: {
2200
+ period: data.period,
2201
+ granularity: data.granularity
2202
+ },
1965
2203
  errors: {
1966
- 400: 'Validation failed',
1967
- 401: 'Unauthorized',
1968
- 409: 'Resource conflict - another process is updating this rule'
2204
+ 401: 'User not authenticated'
1969
2205
  }
1970
2206
  });
1971
2207
  }
1972
2208
 
1973
2209
  /**
1974
- * Get all transaction rules for user
2210
+ * Get cash-flow trends
2211
+ *
2212
+ * Monthly income / expense / netSavings over a fixed N-month window
2213
+ * (current month + N−1 prior). Missing months are zero-filled (flow metric).
2214
+ *
2215
+ * **Parameters:**
2216
+ * - `period`: 1m | 3m | 6m | 1y (default 6m)
2217
+ * - `granularity`: accepted for API symmetry; v1 returns month buckets
2218
+ *
1975
2219
  * @param data The data for the request.
1976
2220
  * @param data.region Region code for tenant context
1977
- * @param data.limit Max results per page (default: 20, max: 100)
1978
- * @param data.offset Pagination offset (default: 0)
1979
- * @param data.enabled Filter by enabled status
1980
- * @param data.learningSource Filter by learning source. Omit this parameter or pass empty string to get manually created rules (learningSource is null in database).
1981
- * @param data.autoApplyEnabled Filter by auto-apply status
1982
- * @returns TransactionRuleListResponseDto List of rules
2221
+ * @param data.period Time period
2222
+ * @param data.granularity Data granularity (accepted for API symmetry; v1 returns month buckets)
2223
+ * @returns CashFlowTrendsResponseDto Cash-flow trends retrieved successfully
1983
2224
  * @throws ApiError
1984
2225
  */
1985
- public static transactionRuleControllerList(
1986
- data: TransactionRuleControllerListData
1987
- ): CancelablePromise<TransactionRuleControllerListResponse> {
2226
+ public static reportingControllerGetCashFlowTrends(
2227
+ data: ReportingControllerGetCashFlowTrendsData
2228
+ ): CancelablePromise<ReportingControllerGetCashFlowTrendsResponse> {
1988
2229
  return __request(OpenAPI, {
1989
2230
  method: 'GET',
1990
- url: '/api/v1/{region}/bean/transaction-rules',
2231
+ url: '/api/v1/{region}/reporting/cash-flow/trends',
1991
2232
  path: {
1992
2233
  region: data.region
1993
2234
  },
1994
2235
  query: {
1995
- limit: data.limit,
1996
- offset: data.offset,
1997
- enabled: data.enabled,
1998
- learningSource: data.learningSource,
1999
- autoApplyEnabled: data.autoApplyEnabled
2236
+ period: data.period,
2237
+ granularity: data.granularity
2000
2238
  },
2001
2239
  errors: {
2002
- 401: 'Unauthorized'
2240
+ 401: 'User not authenticated'
2003
2241
  }
2004
2242
  });
2005
2243
  }
2006
2244
 
2007
2245
  /**
2008
- * Validate transaction rule configuration
2009
- * @param data The data for the request.
2010
- * @param data.region Region code for tenant context
2011
- * @param data.requestBody
2012
- * @returns ValidateRuleResponseDto Validation result
2013
- * @throws ApiError
2014
- */
2015
- public static transactionRuleControllerValidate(
2016
- data: TransactionRuleControllerValidateData
2017
- ): CancelablePromise<TransactionRuleControllerValidateResponse> {
2018
- return __request(OpenAPI, {
2019
- method: 'POST',
2020
- url: '/api/v1/{region}/bean/transaction-rules/validate',
2021
- path: {
2022
- region: data.region
2023
- },
2024
- body: data.requestBody,
2025
- mediaType: 'application/json',
2026
- errors: {
2027
- 400: 'Validation failed',
2028
- 401: 'Unauthorized'
2029
- }
2030
- });
2031
- }
2032
-
2033
- /**
2034
- * Bulk create transaction rules
2246
+ * Generate portfolio snapshot
2247
+ *
2248
+ * Manually generate a portfolio snapshot for a specific date.
2249
+ *
2250
+ * **Multi-currency Support:**
2251
+ * - Fetches balances grouped by currency
2252
+ * - Uses user's baseCurrency setting for conversion
2253
+ * - Stores exchange rates and warnings
2254
+ *
2255
+ * **Use Cases:**
2256
+ * - Testing snapshot generation
2257
+ * - Force regeneration after data correction
2258
+ * - Initial setup for new users
2259
+ *
2035
2260
  * @param data The data for the request.
2036
2261
  * @param data.region Region code for tenant context
2037
- * @param data.requestBody
2038
- * @returns BulkCreateRulesResponseDto Bulk create completed
2262
+ * @param data.requestBody Optional date (defaults to today)
2263
+ * @returns GenerateSnapshotResponse Snapshot generated successfully
2039
2264
  * @throws ApiError
2040
2265
  */
2041
- public static transactionRuleControllerBulkCreate(
2042
- data: TransactionRuleControllerBulkCreateData
2043
- ): CancelablePromise<TransactionRuleControllerBulkCreateResponse> {
2266
+ public static reportingControllerGenerateSnapshot(
2267
+ data: ReportingControllerGenerateSnapshotData
2268
+ ): CancelablePromise<ReportingControllerGenerateSnapshotResponse> {
2044
2269
  return __request(OpenAPI, {
2045
2270
  method: 'POST',
2046
- url: '/api/v1/{region}/bean/transaction-rules/bulk',
2047
- path: {
2048
- region: data.region
2049
- },
2050
- body: data.requestBody,
2051
- mediaType: 'application/json',
2052
- errors: {
2053
- 400: 'Invalid bulk create data',
2054
- 401: 'Unauthorized'
2055
- }
2056
- });
2057
- }
2058
-
2059
- /**
2060
- * Export transaction rules
2061
- * @param data The data for the request.
2062
- * @param data.format Export format (currently only JSON supported)
2063
- * @param data.region Region code for tenant context
2064
- * @returns ExportRulesResponseDto Exported rules
2065
- * @throws ApiError
2066
- */
2067
- public static transactionRuleControllerExport(
2068
- data: TransactionRuleControllerExportData
2069
- ): CancelablePromise<TransactionRuleControllerExportResponse> {
2070
- return __request(OpenAPI, {
2071
- method: 'GET',
2072
- url: '/api/v1/{region}/bean/transaction-rules/export/{format}',
2073
- path: {
2074
- format: data.format,
2075
- region: data.region
2076
- },
2077
- errors: {
2078
- 400: 'Unsupported format',
2079
- 401: 'Unauthorized'
2080
- }
2081
- });
2082
- }
2083
-
2084
- /**
2085
- * Get transaction rule statistics
2086
- * @param data The data for the request.
2087
- * @param data.period Statistics time period
2088
- * @param data.region Region code for tenant context
2089
- * @returns RuleStatisticsResponseDto Rule statistics
2090
- * @throws ApiError
2091
- */
2092
- public static transactionRuleControllerGetStatistics(
2093
- data: TransactionRuleControllerGetStatisticsData
2094
- ): CancelablePromise<TransactionRuleControllerGetStatisticsResponse> {
2095
- return __request(OpenAPI, {
2096
- method: 'GET',
2097
- url: '/api/v1/{region}/bean/transaction-rules/statistics/{period}',
2098
- path: {
2099
- period: data.period,
2100
- region: data.region
2101
- },
2102
- errors: {
2103
- 401: 'Unauthorized'
2104
- }
2105
- });
2106
- }
2107
-
2108
- /**
2109
- * Get transaction rule detail
2110
- * @param data The data for the request.
2111
- * @param data.ruleId Rule ID
2112
- * @param data.region Region code for tenant context
2113
- * @returns TransactionRuleResponseDto Rule details
2114
- * @throws ApiError
2115
- */
2116
- public static transactionRuleControllerGetDetail(
2117
- data: TransactionRuleControllerGetDetailData
2118
- ): CancelablePromise<TransactionRuleControllerGetDetailResponse> {
2119
- return __request(OpenAPI, {
2120
- method: 'GET',
2121
- url: '/api/v1/{region}/bean/transaction-rules/{ruleId}',
2122
- path: {
2123
- ruleId: data.ruleId,
2124
- region: data.region
2125
- },
2126
- errors: {
2127
- 401: 'Unauthorized',
2128
- 403: 'Forbidden - not owner of rule',
2129
- 404: 'Rule not found'
2130
- }
2131
- });
2132
- }
2133
-
2134
- /**
2135
- * Update a transaction rule
2136
- * @param data The data for the request.
2137
- * @param data.ruleId Rule ID to update
2138
- * @param data.region Region code for tenant context
2139
- * @param data.requestBody
2140
- * @returns TransactionRuleResponseDto Rule updated successfully
2141
- * @throws ApiError
2142
- */
2143
- public static transactionRuleControllerUpdate(
2144
- data: TransactionRuleControllerUpdateData
2145
- ): CancelablePromise<TransactionRuleControllerUpdateResponse> {
2146
- return __request(OpenAPI, {
2147
- method: 'PUT',
2148
- url: '/api/v1/{region}/bean/transaction-rules/{ruleId}',
2271
+ url: '/api/v1/{region}/reporting/snapshots/generate',
2149
2272
  path: {
2150
- ruleId: data.ruleId,
2151
2273
  region: data.region
2152
2274
  },
2153
2275
  body: data.requestBody,
2154
2276
  mediaType: 'application/json',
2155
2277
  errors: {
2156
- 400: 'Validation failed',
2157
- 401: 'Unauthorized',
2158
- 403: 'Forbidden - not owner of rule',
2159
- 404: 'Rule not found',
2160
- 409: 'Resource conflict - rule is being modified by another process'
2161
- }
2162
- });
2163
- }
2164
-
2165
- /**
2166
- * Delete a transaction rule
2167
- * @param data The data for the request.
2168
- * @param data.ruleId Rule ID to delete
2169
- * @param data.region Region code for tenant context
2170
- * @returns void Rule deleted successfully
2171
- * @throws ApiError
2172
- */
2173
- public static transactionRuleControllerDelete(
2174
- data: TransactionRuleControllerDeleteData
2175
- ): CancelablePromise<TransactionRuleControllerDeleteResponse> {
2176
- return __request(OpenAPI, {
2177
- method: 'DELETE',
2178
- url: '/api/v1/{region}/bean/transaction-rules/{ruleId}',
2179
- path: {
2180
- ruleId: data.ruleId,
2181
- region: data.region
2182
- },
2183
- errors: {
2184
- 401: 'Unauthorized',
2185
- 403: 'Forbidden - not owner of rule',
2186
- 404: 'Rule not found',
2187
- 409: 'Resource conflict - rule is being modified by another process'
2278
+ 400: 'Invalid date format',
2279
+ 401: 'User not authenticated'
2188
2280
  }
2189
2281
  });
2190
2282
  }
2191
2283
 
2192
2284
  /**
2193
- * Test rule matching
2285
+ * Backfill portfolio snapshots
2286
+ *
2287
+ * Generate snapshots for a date range (historical data backfill).
2288
+ *
2289
+ * **Multi-currency Support:**
2290
+ * - Each snapshot includes multi-currency data
2291
+ * - Uses exchange rates available at generation time
2292
+ * - Warnings stored for missing exchange rates
2293
+ *
2294
+ * **Best Practices:**
2295
+ * - Use for initial setup after account configuration
2296
+ * - Run during low-traffic periods for large date ranges
2297
+ * - Existing snapshots are skipped (not regenerated)
2298
+ *
2194
2299
  * @param data The data for the request.
2195
- * @param data.ruleId Rule ID to test
2196
2300
  * @param data.region Region code for tenant context
2197
2301
  * @param data.requestBody
2198
- * @returns TestRuleResponseDto Test result
2302
+ * @returns BackfillSnapshotsResponse Backfill completed successfully
2199
2303
  * @throws ApiError
2200
2304
  */
2201
- public static transactionRuleControllerTest(
2202
- data: TransactionRuleControllerTestData
2203
- ): CancelablePromise<TransactionRuleControllerTestResponse> {
2305
+ public static reportingControllerBackfillSnapshots(
2306
+ data: ReportingControllerBackfillSnapshotsData
2307
+ ): CancelablePromise<ReportingControllerBackfillSnapshotsResponse> {
2204
2308
  return __request(OpenAPI, {
2205
2309
  method: 'POST',
2206
- url: '/api/v1/{region}/bean/transaction-rules/{ruleId}/test',
2310
+ url: '/api/v1/{region}/reporting/snapshots/backfill',
2207
2311
  path: {
2208
- ruleId: data.ruleId,
2209
2312
  region: data.region
2210
2313
  },
2211
2314
  body: data.requestBody,
2212
2315
  mediaType: 'application/json',
2213
2316
  errors: {
2214
- 401: 'Unauthorized',
2215
- 403: 'Forbidden - not owner of rule',
2216
- 404: 'Rule not found'
2317
+ 400: 'Invalid date format or range',
2318
+ 401: 'User not authenticated',
2319
+ 409: 'Backfill already in progress for this user'
2217
2320
  }
2218
2321
  });
2219
2322
  }
@@ -2265,7 +2368,7 @@ export class UsersService {
2265
2368
  * Create a new account with auto-generated access token. Protected by Cloudflare Turnstile to prevent automated signup (when enabled).
2266
2369
  * @param data The data for the request.
2267
2370
  * @param data.requestBody
2268
- * @returns unknown User created successfully
2371
+ * @returns SignupResponseDto User created successfully
2269
2372
  * @throws ApiError
2270
2373
  */
2271
2374
  public static userControllerSignupUser(
@@ -2474,53 +2577,331 @@ export class PropertiesService {
2474
2577
  }
2475
2578
  }
2476
2579
 
2477
- export class LifeEventsService {
2580
+ export class BeanTransactionRulesService {
2478
2581
  /**
2479
- * Create a new life event
2480
- * Creates a new life event entry for the authenticated user. Returns ETag header carrying the row updatedAt.
2582
+ * Create a new transaction rule (or upsert if upsertByPayee=true)
2583
+ * Creates a new rule. If upsertByPayee=true, updates existing rule matching payeeKeywords[0] instead of creating duplicate.
2481
2584
  * @param data The data for the request.
2482
- * @param data.region Region code for tenant context (decorative for life events)
2585
+ * @param data.region Region code for tenant context
2483
2586
  * @param data.requestBody
2484
- * @returns EventResponseDto Life event created successfully
2587
+ * @returns TransactionRuleResponseDto Rule updated successfully (upsert mode)
2485
2588
  * @throws ApiError
2486
2589
  */
2487
- public static eventControllerCreate(
2488
- data: EventControllerCreateData
2489
- ): CancelablePromise<EventControllerCreateResponse> {
2590
+ public static transactionRuleControllerCreate(
2591
+ data: TransactionRuleControllerCreateData
2592
+ ): CancelablePromise<TransactionRuleControllerCreateResponse> {
2490
2593
  return __request(OpenAPI, {
2491
2594
  method: 'POST',
2492
- url: '/api/v1/{region}/bean/events',
2595
+ url: '/api/v1/{region}/bean/transaction-rules',
2493
2596
  path: {
2494
2597
  region: data.region
2495
2598
  },
2496
2599
  body: data.requestBody,
2497
2600
  mediaType: 'application/json',
2498
2601
  errors: {
2499
- 409: 'Life event already exists for this (userId, type, date) combination'
2602
+ 400: 'Validation failed',
2603
+ 401: 'Unauthorized',
2604
+ 409: 'Resource conflict - another process is updating this rule'
2500
2605
  }
2501
2606
  });
2502
2607
  }
2503
2608
 
2504
2609
  /**
2505
- * List user life events
2506
- * Returns life events for the authenticated user with optional filtering by type, description search, and date range.
2610
+ * Get all transaction rules for user
2507
2611
  * @param data The data for the request.
2508
- * @param data.region Region code for tenant context (decorative for life events)
2509
- * @param data.type Filter by life event type (exact match)
2510
- * @param data.q Search term for description (case-insensitive partial match)
2511
- * @param data.from Filter life events from this date (ISO 8601 format)
2512
- * @param data.to Filter life events to this date (ISO 8601 format)
2513
- * @param data.page Page number for pagination (default: 1)
2514
- * @param data.limit Number of items per page (default: 20, max: 100)
2515
- * @returns EventListResponseDto Life events retrieved successfully
2612
+ * @param data.region Region code for tenant context
2613
+ * @param data.limit Max results per page (default: 20, max: 100)
2614
+ * @param data.offset Pagination offset (default: 0)
2615
+ * @param data.enabled Filter by enabled status
2616
+ * @param data.learningSource Filter by learning source. Omit this parameter or pass empty string to get manually created rules (learningSource is null in database).
2617
+ * @param data.autoApplyEnabled Filter by auto-apply status
2618
+ * @returns TransactionRuleListResponseDto List of rules
2516
2619
  * @throws ApiError
2517
2620
  */
2518
- public static eventControllerFindAll(
2519
- data: EventControllerFindAllData
2520
- ): CancelablePromise<EventControllerFindAllResponse> {
2621
+ public static transactionRuleControllerList(
2622
+ data: TransactionRuleControllerListData
2623
+ ): CancelablePromise<TransactionRuleControllerListResponse> {
2521
2624
  return __request(OpenAPI, {
2522
2625
  method: 'GET',
2523
- url: '/api/v1/{region}/bean/events',
2626
+ url: '/api/v1/{region}/bean/transaction-rules',
2627
+ path: {
2628
+ region: data.region
2629
+ },
2630
+ query: {
2631
+ limit: data.limit,
2632
+ offset: data.offset,
2633
+ enabled: data.enabled,
2634
+ learningSource: data.learningSource,
2635
+ autoApplyEnabled: data.autoApplyEnabled
2636
+ },
2637
+ errors: {
2638
+ 401: 'Unauthorized'
2639
+ }
2640
+ });
2641
+ }
2642
+
2643
+ /**
2644
+ * Validate transaction rule configuration
2645
+ * @param data The data for the request.
2646
+ * @param data.region Region code for tenant context
2647
+ * @param data.requestBody
2648
+ * @returns ValidateRuleResponseDto Validation result
2649
+ * @throws ApiError
2650
+ */
2651
+ public static transactionRuleControllerValidate(
2652
+ data: TransactionRuleControllerValidateData
2653
+ ): CancelablePromise<TransactionRuleControllerValidateResponse> {
2654
+ return __request(OpenAPI, {
2655
+ method: 'POST',
2656
+ url: '/api/v1/{region}/bean/transaction-rules/validate',
2657
+ path: {
2658
+ region: data.region
2659
+ },
2660
+ body: data.requestBody,
2661
+ mediaType: 'application/json',
2662
+ errors: {
2663
+ 400: 'Validation failed',
2664
+ 401: 'Unauthorized'
2665
+ }
2666
+ });
2667
+ }
2668
+
2669
+ /**
2670
+ * Bulk create transaction rules
2671
+ * @param data The data for the request.
2672
+ * @param data.region Region code for tenant context
2673
+ * @param data.requestBody
2674
+ * @returns BulkCreateRulesResponseDto Bulk create completed
2675
+ * @throws ApiError
2676
+ */
2677
+ public static transactionRuleControllerBulkCreate(
2678
+ data: TransactionRuleControllerBulkCreateData
2679
+ ): CancelablePromise<TransactionRuleControllerBulkCreateResponse> {
2680
+ return __request(OpenAPI, {
2681
+ method: 'POST',
2682
+ url: '/api/v1/{region}/bean/transaction-rules/bulk',
2683
+ path: {
2684
+ region: data.region
2685
+ },
2686
+ body: data.requestBody,
2687
+ mediaType: 'application/json',
2688
+ errors: {
2689
+ 400: 'Invalid bulk create data',
2690
+ 401: 'Unauthorized'
2691
+ }
2692
+ });
2693
+ }
2694
+
2695
+ /**
2696
+ * Export transaction rules
2697
+ * @param data The data for the request.
2698
+ * @param data.format Export format (currently only JSON supported)
2699
+ * @param data.region Region code for tenant context
2700
+ * @returns ExportRulesResponseDto Exported rules
2701
+ * @throws ApiError
2702
+ */
2703
+ public static transactionRuleControllerExport(
2704
+ data: TransactionRuleControllerExportData
2705
+ ): CancelablePromise<TransactionRuleControllerExportResponse> {
2706
+ return __request(OpenAPI, {
2707
+ method: 'GET',
2708
+ url: '/api/v1/{region}/bean/transaction-rules/export/{format}',
2709
+ path: {
2710
+ format: data.format,
2711
+ region: data.region
2712
+ },
2713
+ errors: {
2714
+ 400: 'Unsupported format',
2715
+ 401: 'Unauthorized'
2716
+ }
2717
+ });
2718
+ }
2719
+
2720
+ /**
2721
+ * Get transaction rule statistics
2722
+ * @param data The data for the request.
2723
+ * @param data.period Statistics time period
2724
+ * @param data.region Region code for tenant context
2725
+ * @returns RuleStatisticsResponseDto Rule statistics
2726
+ * @throws ApiError
2727
+ */
2728
+ public static transactionRuleControllerGetStatistics(
2729
+ data: TransactionRuleControllerGetStatisticsData
2730
+ ): CancelablePromise<TransactionRuleControllerGetStatisticsResponse> {
2731
+ return __request(OpenAPI, {
2732
+ method: 'GET',
2733
+ url: '/api/v1/{region}/bean/transaction-rules/statistics/{period}',
2734
+ path: {
2735
+ period: data.period,
2736
+ region: data.region
2737
+ },
2738
+ errors: {
2739
+ 401: 'Unauthorized'
2740
+ }
2741
+ });
2742
+ }
2743
+
2744
+ /**
2745
+ * Get transaction rule detail
2746
+ * @param data The data for the request.
2747
+ * @param data.ruleId Rule ID
2748
+ * @param data.region Region code for tenant context
2749
+ * @returns TransactionRuleResponseDto Rule details
2750
+ * @throws ApiError
2751
+ */
2752
+ public static transactionRuleControllerGetDetail(
2753
+ data: TransactionRuleControllerGetDetailData
2754
+ ): CancelablePromise<TransactionRuleControllerGetDetailResponse> {
2755
+ return __request(OpenAPI, {
2756
+ method: 'GET',
2757
+ url: '/api/v1/{region}/bean/transaction-rules/{ruleId}',
2758
+ path: {
2759
+ ruleId: data.ruleId,
2760
+ region: data.region
2761
+ },
2762
+ errors: {
2763
+ 401: 'Unauthorized',
2764
+ 403: 'Forbidden - not owner of rule',
2765
+ 404: 'Rule not found'
2766
+ }
2767
+ });
2768
+ }
2769
+
2770
+ /**
2771
+ * Update a transaction rule
2772
+ * @param data The data for the request.
2773
+ * @param data.ruleId Rule ID to update
2774
+ * @param data.region Region code for tenant context
2775
+ * @param data.requestBody
2776
+ * @returns TransactionRuleResponseDto Rule updated successfully
2777
+ * @throws ApiError
2778
+ */
2779
+ public static transactionRuleControllerUpdate(
2780
+ data: TransactionRuleControllerUpdateData
2781
+ ): CancelablePromise<TransactionRuleControllerUpdateResponse> {
2782
+ return __request(OpenAPI, {
2783
+ method: 'PUT',
2784
+ url: '/api/v1/{region}/bean/transaction-rules/{ruleId}',
2785
+ path: {
2786
+ ruleId: data.ruleId,
2787
+ region: data.region
2788
+ },
2789
+ body: data.requestBody,
2790
+ mediaType: 'application/json',
2791
+ errors: {
2792
+ 400: 'Validation failed',
2793
+ 401: 'Unauthorized',
2794
+ 403: 'Forbidden - not owner of rule',
2795
+ 404: 'Rule not found',
2796
+ 409: 'Resource conflict - rule is being modified by another process'
2797
+ }
2798
+ });
2799
+ }
2800
+
2801
+ /**
2802
+ * Delete a transaction rule
2803
+ * @param data The data for the request.
2804
+ * @param data.ruleId Rule ID to delete
2805
+ * @param data.region Region code for tenant context
2806
+ * @returns void Rule deleted successfully
2807
+ * @throws ApiError
2808
+ */
2809
+ public static transactionRuleControllerDelete(
2810
+ data: TransactionRuleControllerDeleteData
2811
+ ): CancelablePromise<TransactionRuleControllerDeleteResponse> {
2812
+ return __request(OpenAPI, {
2813
+ method: 'DELETE',
2814
+ url: '/api/v1/{region}/bean/transaction-rules/{ruleId}',
2815
+ path: {
2816
+ ruleId: data.ruleId,
2817
+ region: data.region
2818
+ },
2819
+ errors: {
2820
+ 401: 'Unauthorized',
2821
+ 403: 'Forbidden - not owner of rule',
2822
+ 404: 'Rule not found',
2823
+ 409: 'Resource conflict - rule is being modified by another process'
2824
+ }
2825
+ });
2826
+ }
2827
+
2828
+ /**
2829
+ * Test rule matching
2830
+ * @param data The data for the request.
2831
+ * @param data.ruleId Rule ID to test
2832
+ * @param data.region Region code for tenant context
2833
+ * @param data.requestBody
2834
+ * @returns TestRuleResponseDto Test result
2835
+ * @throws ApiError
2836
+ */
2837
+ public static transactionRuleControllerTest(
2838
+ data: TransactionRuleControllerTestData
2839
+ ): CancelablePromise<TransactionRuleControllerTestResponse> {
2840
+ return __request(OpenAPI, {
2841
+ method: 'POST',
2842
+ url: '/api/v1/{region}/bean/transaction-rules/{ruleId}/test',
2843
+ path: {
2844
+ ruleId: data.ruleId,
2845
+ region: data.region
2846
+ },
2847
+ body: data.requestBody,
2848
+ mediaType: 'application/json',
2849
+ errors: {
2850
+ 401: 'Unauthorized',
2851
+ 403: 'Forbidden - not owner of rule',
2852
+ 404: 'Rule not found'
2853
+ }
2854
+ });
2855
+ }
2856
+ }
2857
+
2858
+ export class LifeEventsService {
2859
+ /**
2860
+ * Create a new life event
2861
+ * Creates a new life event entry for the authenticated user. Returns ETag header carrying the row updatedAt.
2862
+ * @param data The data for the request.
2863
+ * @param data.region Region code for tenant context (decorative for life events)
2864
+ * @param data.requestBody
2865
+ * @returns EventResponseDto Life event created successfully
2866
+ * @throws ApiError
2867
+ */
2868
+ public static eventControllerCreate(
2869
+ data: EventControllerCreateData
2870
+ ): CancelablePromise<EventControllerCreateResponse> {
2871
+ return __request(OpenAPI, {
2872
+ method: 'POST',
2873
+ url: '/api/v1/{region}/bean/events',
2874
+ path: {
2875
+ region: data.region
2876
+ },
2877
+ body: data.requestBody,
2878
+ mediaType: 'application/json',
2879
+ errors: {
2880
+ 409: 'Life event already exists for this (userId, type, date) combination'
2881
+ }
2882
+ });
2883
+ }
2884
+
2885
+ /**
2886
+ * List user life events
2887
+ * Returns life events for the authenticated user with optional filtering by type, description search, and date range.
2888
+ * @param data The data for the request.
2889
+ * @param data.region Region code for tenant context (decorative for life events)
2890
+ * @param data.type Filter by life event type (exact match)
2891
+ * @param data.q Search term for description (case-insensitive partial match)
2892
+ * @param data.from Filter life events from this date (ISO 8601 format)
2893
+ * @param data.to Filter life events to this date (ISO 8601 format)
2894
+ * @param data.page Page number for pagination (default: 1)
2895
+ * @param data.limit Number of items per page (default: 20, max: 100)
2896
+ * @returns EventListResponseDto Life events retrieved successfully
2897
+ * @throws ApiError
2898
+ */
2899
+ public static eventControllerFindAll(
2900
+ data: EventControllerFindAllData
2901
+ ): CancelablePromise<EventControllerFindAllResponse> {
2902
+ return __request(OpenAPI, {
2903
+ method: 'GET',
2904
+ url: '/api/v1/{region}/bean/events',
2524
2905
  path: {
2525
2906
  region: data.region
2526
2907
  },
@@ -2649,6 +3030,139 @@ export class LifeEventsService {
2649
3030
  }
2650
3031
  }
2651
3032
 
3033
+ export class OnboardingService {
3034
+ /**
3035
+ * Bootstrap core accounts + register asset accounts with opening balances (ADR-0113)
3036
+ * @param data The data for the request.
3037
+ * @param data.region Region code for tenant context
3038
+ * @param data.requestBody
3039
+ * @returns unknown Onboarding bootstrap result.
3040
+ * @throws ApiError
3041
+ */
3042
+ public static onboardingControllerBootstrap(
3043
+ data: OnboardingControllerBootstrapData
3044
+ ): CancelablePromise<OnboardingControllerBootstrapResponse> {
3045
+ return __request(OpenAPI, {
3046
+ method: 'POST',
3047
+ url: '/api/v1/{region}/bean/onboarding',
3048
+ path: {
3049
+ region: data.region
3050
+ },
3051
+ body: data.requestBody,
3052
+ mediaType: 'application/json',
3053
+ errors: {
3054
+ 422: 'Invalid region/account path/duplicate paths.'
3055
+ }
3056
+ });
3057
+ }
3058
+ }
3059
+
3060
+ export class BalanceReconciliationService {
3061
+ /**
3062
+ * Preview reconciliation (book vs actual)
3063
+ * Computes book balance, diff, Beancount-inferred tolerance, and suggested action without persisting.
3064
+ * @param data The data for the request.
3065
+ * @param data.region Region code for tenant context (decorative for reconciliation)
3066
+ * @param data.requestBody
3067
+ * @returns ReconciliationComputeResultDto Reconciliation preview
3068
+ * @throws ApiError
3069
+ */
3070
+ public static reconciliationControllerCompute(
3071
+ data: ReconciliationControllerComputeData
3072
+ ): CancelablePromise<ReconciliationControllerComputeResponse> {
3073
+ return __request(OpenAPI, {
3074
+ method: 'POST',
3075
+ url: '/api/v1/{region}/bean/reconciliations',
3076
+ path: {
3077
+ region: data.region
3078
+ },
3079
+ body: data.requestBody,
3080
+ mediaType: 'application/json',
3081
+ errors: {
3082
+ 404: 'Account not found'
3083
+ }
3084
+ });
3085
+ }
3086
+
3087
+ /**
3088
+ * Record a balance assertion
3089
+ * Persists the reconciliation as a BeanBalance assertion (amount = actual, diffAmount = book − actual). Re-reconciling the same day/currency upserts.
3090
+ * @param data The data for the request.
3091
+ * @param data.region Region code for tenant context (decorative for reconciliation)
3092
+ * @param data.requestBody
3093
+ * @returns ReconciliationRecordDto Balance assertion recorded
3094
+ * @throws ApiError
3095
+ */
3096
+ public static reconciliationControllerAssert(
3097
+ data: ReconciliationControllerAssertData
3098
+ ): CancelablePromise<ReconciliationControllerAssertResponse> {
3099
+ return __request(OpenAPI, {
3100
+ method: 'POST',
3101
+ url: '/api/v1/{region}/bean/reconciliations/assert',
3102
+ path: {
3103
+ region: data.region
3104
+ },
3105
+ body: data.requestBody,
3106
+ mediaType: 'application/json',
3107
+ errors: {
3108
+ 404: 'Account not found'
3109
+ }
3110
+ });
3111
+ }
3112
+
3113
+ /**
3114
+ * Generate a pad adjusting entry
3115
+ * When book is outside tolerance, synthesizes a Beancount pad transaction (flag P) booking the diff from source_account and persists it. Source defaults to Equity:Opening-Balances.
3116
+ * @param data The data for the request.
3117
+ * @param data.region Region code for tenant context (decorative for reconciliation)
3118
+ * @param data.requestBody
3119
+ * @returns PadResultDto Pad adjusting entry generated
3120
+ * @throws ApiError
3121
+ */
3122
+ public static reconciliationControllerPad(
3123
+ data: ReconciliationControllerPadData
3124
+ ): CancelablePromise<ReconciliationControllerPadResponse> {
3125
+ return __request(OpenAPI, {
3126
+ method: 'POST',
3127
+ url: '/api/v1/{region}/bean/reconciliations/pad',
3128
+ path: {
3129
+ region: data.region
3130
+ },
3131
+ body: data.requestBody,
3132
+ mediaType: 'application/json',
3133
+ errors: {
3134
+ 400: 'Book already within tolerance — no pad needed',
3135
+ 404: 'Account not found'
3136
+ }
3137
+ });
3138
+ }
3139
+
3140
+ /**
3141
+ * List reconciliation history for an account
3142
+ * Returns recorded balance assertions (most recent first). The latest drives the account-detail "Last <date>" badge.
3143
+ * @param data The data for the request.
3144
+ * @param data.accountId BeanAccount id
3145
+ * @param data.region Region code for tenant context (decorative for reconciliation)
3146
+ * @returns ReconciliationRecordDto Reconciliation history
3147
+ * @throws ApiError
3148
+ */
3149
+ public static reconciliationControllerHistory(
3150
+ data: ReconciliationControllerHistoryData
3151
+ ): CancelablePromise<ReconciliationControllerHistoryResponse> {
3152
+ return __request(OpenAPI, {
3153
+ method: 'GET',
3154
+ url: '/api/v1/{region}/bean/accounts/{accountId}/reconciliations',
3155
+ path: {
3156
+ accountId: data.accountId,
3157
+ region: data.region
3158
+ },
3159
+ errors: {
3160
+ 404: 'Account not found'
3161
+ }
3162
+ });
3163
+ }
3164
+ }
3165
+
2652
3166
  export class BeanExportService {
2653
3167
  /**
2654
3168
  * Export Beancount ledger as ZIP
@@ -2808,135 +3322,20 @@ export class BeanImportService {
2808
3322
  * @param data.importerId Importer identifier. Supported importers: alipay, alipay-web, wechat, boc, boc-credit, ccb, cmb, cmbc, cmbc-credit, icbc, icbc-credit, hsbc-hk-credit, hsbc-hk-debit
2809
3323
  * @param data.region Region code for tenant context
2810
3324
  * @returns ImporterConfigDto Configuration reset successfully
2811
- * @throws ApiError
2812
- */
2813
- public static importerConfigControllerResetConfig(
2814
- data: ImporterConfigControllerResetConfigData
2815
- ): CancelablePromise<ImporterConfigControllerResetConfigResponse> {
2816
- return __request(OpenAPI, {
2817
- method: 'POST',
2818
- url: '/api/v1/{region}/bean/import/config/{importerId}/reset',
2819
- path: {
2820
- importerId: data.importerId,
2821
- region: data.region
2822
- },
2823
- errors: {
2824
- 400: 'Invalid input - Unsupported importer'
2825
- }
2826
- });
2827
- }
2828
- }
2829
-
2830
- export class BeanPlatformsService {
2831
- /**
2832
- * Get all platforms with statistics
2833
- * @returns unknown List of platforms with binding and account counts
2834
- * @throws ApiError
2835
- */
2836
- public static platformControllerFindAll(): CancelablePromise<PlatformControllerFindAllResponse> {
2837
- return __request(OpenAPI, {
2838
- method: 'GET',
2839
- url: '/api/v1/bean/platforms'
2840
- });
2841
- }
2842
-
2843
- /**
2844
- * Create a new platform
2845
- * @param data The data for the request.
2846
- * @param data.requestBody
2847
- * @returns unknown Platform created successfully
2848
- * @throws ApiError
2849
- */
2850
- public static platformControllerCreate(
2851
- data: PlatformControllerCreateData
2852
- ): CancelablePromise<PlatformControllerCreateResponse> {
2853
- return __request(OpenAPI, {
2854
- method: 'POST',
2855
- url: '/api/v1/bean/platforms',
2856
- body: data.requestBody,
2857
- mediaType: 'application/json',
2858
- errors: {
2859
- 409: 'Platform already exists'
2860
- }
2861
- });
2862
- }
2863
-
2864
- /**
2865
- * Get platform list for current user
2866
- * @returns unknown List of platforms with user binding status
2867
- * @throws ApiError
2868
- */
2869
- public static platformControllerGetPlatformList(): CancelablePromise<PlatformControllerGetPlatformListResponse> {
2870
- return __request(OpenAPI, {
2871
- method: 'GET',
2872
- url: '/api/v1/bean/platforms/list'
2873
- });
2874
- }
2875
-
2876
- /**
2877
- * Match platforms by name or alias
2878
- * @param data The data for the request.
2879
- * @param data.q Search query — Chinese name, English name, or abbreviation
2880
- * @param data.region Region code for category override lookup
2881
- * @returns unknown List of matching platforms with suggested segment names
2882
- * @throws ApiError
2883
- */
2884
- public static platformControllerMatchPlatforms(
2885
- data: PlatformControllerMatchPlatformsData
2886
- ): CancelablePromise<PlatformControllerMatchPlatformsResponse> {
2887
- return __request(OpenAPI, {
2888
- method: 'GET',
2889
- url: '/api/v1/bean/platforms/match',
2890
- query: {
2891
- q: data.q,
2892
- region: data.region
2893
- }
2894
- });
2895
- }
2896
-
2897
- /**
2898
- * Update a platform
2899
- * @param data The data for the request.
2900
- * @param data.id Platform ID
2901
- * @param data.requestBody
2902
- * @returns unknown Platform updated successfully
2903
- * @throws ApiError
2904
- */
2905
- public static platformControllerUpdate(
2906
- data: PlatformControllerUpdateData
2907
- ): CancelablePromise<PlatformControllerUpdateResponse> {
2908
- return __request(OpenAPI, {
2909
- method: 'PUT',
2910
- url: '/api/v1/bean/platforms/{id}',
2911
- path: {
2912
- id: data.id
2913
- },
2914
- body: data.requestBody,
2915
- mediaType: 'application/json',
2916
- errors: {
2917
- 404: 'Platform not found'
2918
- }
2919
- });
2920
- }
2921
-
2922
- /**
2923
- * Delete a platform
2924
- * @param data The data for the request.
2925
- * @param data.id Platform ID
2926
- * @returns void Platform deleted successfully
2927
- * @throws ApiError
2928
- */
2929
- public static platformControllerDelete(
2930
- data: PlatformControllerDeleteData
2931
- ): CancelablePromise<PlatformControllerDeleteResponse> {
3325
+ * @throws ApiError
3326
+ */
3327
+ public static importerConfigControllerResetConfig(
3328
+ data: ImporterConfigControllerResetConfigData
3329
+ ): CancelablePromise<ImporterConfigControllerResetConfigResponse> {
2932
3330
  return __request(OpenAPI, {
2933
- method: 'DELETE',
2934
- url: '/api/v1/bean/platforms/{id}',
3331
+ method: 'POST',
3332
+ url: '/api/v1/{region}/bean/import/config/{importerId}/reset',
2935
3333
  path: {
2936
- id: data.id
3334
+ importerId: data.importerId,
3335
+ region: data.region
2937
3336
  },
2938
3337
  errors: {
2939
- 404: 'Platform not found'
3338
+ 400: 'Invalid input - Unsupported importer'
2940
3339
  }
2941
3340
  });
2942
3341
  }
@@ -3042,6 +3441,101 @@ export class ProviderSyncService {
3042
3441
  }
3043
3442
  }
3044
3443
 
3444
+ export class ExternalAccountLinksService {
3445
+ /**
3446
+ * Create an external account → BeanAccount mapping (ADR-0113)
3447
+ * @param data The data for the request.
3448
+ * @param data.region Region code for tenant context
3449
+ * @param data.requestBody
3450
+ * @returns ExternalAccountLinkResponseDto Link created.
3451
+ * @throws ApiError
3452
+ */
3453
+ public static externalAccountLinkControllerCreate(
3454
+ data: ExternalAccountLinkControllerCreateData
3455
+ ): CancelablePromise<ExternalAccountLinkControllerCreateResponse> {
3456
+ return __request(OpenAPI, {
3457
+ method: 'POST',
3458
+ url: '/api/v1/{region}/bean/external-account-links',
3459
+ path: {
3460
+ region: data.region
3461
+ },
3462
+ body: data.requestBody,
3463
+ mediaType: 'application/json',
3464
+ errors: {
3465
+ 422: 'beanAccountId not owned, or an active link already exists.'
3466
+ }
3467
+ });
3468
+ }
3469
+
3470
+ /**
3471
+ * List the user's active external account links
3472
+ * @param data The data for the request.
3473
+ * @param data.provider
3474
+ * @param data.region Region code for tenant context
3475
+ * @returns ExternalAccountLinkListResponseDto Links retrieved.
3476
+ * @throws ApiError
3477
+ */
3478
+ public static externalAccountLinkControllerFindAll(
3479
+ data: ExternalAccountLinkControllerFindAllData
3480
+ ): CancelablePromise<ExternalAccountLinkControllerFindAllResponse> {
3481
+ return __request(OpenAPI, {
3482
+ method: 'GET',
3483
+ url: '/api/v1/{region}/bean/external-account-links',
3484
+ path: {
3485
+ region: data.region
3486
+ },
3487
+ query: {
3488
+ provider: data.provider
3489
+ }
3490
+ });
3491
+ }
3492
+
3493
+ /**
3494
+ * Get a single external account link
3495
+ * @param data The data for the request.
3496
+ * @param data.id
3497
+ * @param data.region Region code for tenant context
3498
+ * @returns ExternalAccountLinkResponseDto Link retrieved.
3499
+ * @throws ApiError
3500
+ */
3501
+ public static externalAccountLinkControllerFindOne(
3502
+ data: ExternalAccountLinkControllerFindOneData
3503
+ ): CancelablePromise<ExternalAccountLinkControllerFindOneResponse> {
3504
+ return __request(OpenAPI, {
3505
+ method: 'GET',
3506
+ url: '/api/v1/{region}/bean/external-account-links/{id}',
3507
+ path: {
3508
+ id: data.id,
3509
+ region: data.region
3510
+ },
3511
+ errors: {
3512
+ 422: 'Link not found or not owned by the user.'
3513
+ }
3514
+ });
3515
+ }
3516
+
3517
+ /**
3518
+ * Soft-delete (disconnect) an external account link
3519
+ * @param data The data for the request.
3520
+ * @param data.id
3521
+ * @param data.region Region code for tenant context
3522
+ * @returns void Link soft-deleted; historical transactions are unaffected.
3523
+ * @throws ApiError
3524
+ */
3525
+ public static externalAccountLinkControllerRemove(
3526
+ data: ExternalAccountLinkControllerRemoveData
3527
+ ): CancelablePromise<ExternalAccountLinkControllerRemoveResponse> {
3528
+ return __request(OpenAPI, {
3529
+ method: 'DELETE',
3530
+ url: '/api/v1/{region}/bean/external-account-links/{id}',
3531
+ path: {
3532
+ id: data.id,
3533
+ region: data.region
3534
+ }
3535
+ });
3536
+ }
3537
+ }
3538
+
3045
3539
  export class ImportTelemetryService {
3046
3540
  /**
3047
3541
  * Receive anonymous parser failure telemetry
@@ -3200,329 +3694,173 @@ export class BeanNlpService {
3200
3694
  }
3201
3695
  }
3202
3696
 
3203
- export class DashboardService {
3204
- /**
3205
- * Get net worth overview
3206
- * Returns total net worth with breakdown of assets and liabilities
3207
- * @param data The data for the request.
3208
- * @param data.region Region code for tenant context
3209
- * @param data.date Date for balance calculation (ISO 8601 format)
3210
- * @returns NetWorthResponseDto Net worth retrieved successfully
3211
- * @throws ApiError
3212
- */
3213
- public static dashboardControllerGetNetWorth(
3214
- data: DashboardControllerGetNetWorthData
3215
- ): CancelablePromise<DashboardControllerGetNetWorthResponse> {
3216
- return __request(OpenAPI, {
3217
- method: 'GET',
3218
- url: '/api/v1/{region}/dashboard/net-worth',
3219
- path: {
3220
- region: data.region
3221
- },
3222
- query: {
3223
- date: data.date
3224
- },
3225
- errors: {
3226
- 401: 'User not authenticated'
3227
- }
3228
- });
3229
- }
3230
-
3231
- /**
3232
- * Get accounts grouped by platform
3233
- * Returns accounts with balances grouped by financial platform
3234
- * @param data The data for the request.
3235
- * @param data.region Region code for tenant context
3236
- * @param data.groupBy Grouping strategy
3237
- * @param data.date Date for balance calculation (ISO 8601 format)
3238
- * @param data.accountId Scope to a single account (only valid with groupBy=holdingAssetClass, ADR-0105 §6)
3239
- * @returns unknown Accounts retrieved successfully. Response type depends on groupBy parameter.
3240
- * @throws ApiError
3241
- */
3242
- public static dashboardControllerGetAccounts(
3243
- data: DashboardControllerGetAccountsData
3244
- ): CancelablePromise<DashboardControllerGetAccountsResponse> {
3245
- return __request(OpenAPI, {
3246
- method: 'GET',
3247
- url: '/api/v1/{region}/dashboard/accounts',
3248
- path: {
3249
- region: data.region
3250
- },
3251
- query: {
3252
- groupBy: data.groupBy,
3253
- date: data.date,
3254
- accountId: data.accountId
3255
- },
3256
- errors: {
3257
- 401: 'User not authenticated'
3258
- }
3259
- });
3260
- }
3261
-
3262
- /**
3263
- * Get cash flow summary
3264
- * Returns income, expenses, and savings for a monthly period
3265
- * @param data The data for the request.
3266
- * @param data.period Period in YYYY-MM format
3267
- * @param data.region Region code for tenant context
3268
- * @returns CashFlowResponseDto Cash flow retrieved successfully
3269
- * @throws ApiError
3270
- */
3271
- public static dashboardControllerGetCashFlow(
3272
- data: DashboardControllerGetCashFlowData
3273
- ): CancelablePromise<DashboardControllerGetCashFlowResponse> {
3274
- return __request(OpenAPI, {
3275
- method: 'GET',
3276
- url: '/api/v1/{region}/dashboard/cash-flow',
3277
- path: {
3278
- region: data.region
3279
- },
3280
- query: {
3281
- period: data.period
3282
- },
3283
- errors: {
3284
- 400: 'Invalid period format',
3285
- 401: 'User not authenticated'
3286
- }
3287
- });
3288
- }
3289
- }
3290
-
3291
- export class InvestmentService {
3697
+ export class BeanPlatformsService {
3292
3698
  /**
3293
- * Get per-holding unrealized + realized P&L
3294
- * Average-cost unrealized P&L per account × commodity, plus cumulative realized P&L on sold lots (method = FIFO | average, default average).
3295
- * @param data The data for the request.
3296
- * @param data.region Region code for tenant context
3297
- * @param data.asOf As-of date (ISO 8601), defaults to today
3298
- * @param data.accountId Scope to a single account
3299
- * @param data.method Realized-P&L lot-matching method (default average). Does not affect the average-cost unrealized basis.
3300
- * @returns HoldingPnlResponseDto Holding P&L retrieved successfully
3699
+ * Get all platforms with statistics
3700
+ * @returns unknown List of platforms with binding and account counts
3301
3701
  * @throws ApiError
3302
3702
  */
3303
- public static holdingPnlControllerGetHoldingPnl(
3304
- data: HoldingPnlControllerGetHoldingPnlData
3305
- ): CancelablePromise<HoldingPnlControllerGetHoldingPnlResponse> {
3703
+ public static platformControllerFindAll(): CancelablePromise<PlatformControllerFindAllResponse> {
3306
3704
  return __request(OpenAPI, {
3307
3705
  method: 'GET',
3308
- url: '/api/v1/{region}/investment/holdings/pnl',
3309
- path: {
3310
- region: data.region
3311
- },
3312
- query: {
3313
- asOf: data.asOf,
3314
- accountId: data.accountId,
3315
- method: data.method
3316
- },
3317
- errors: {
3318
- 400: 'Invalid asOf format/value/future date, invalid accountId format, or unsupported method',
3319
- 401: 'User not authenticated'
3320
- }
3706
+ url: '/api/v1/bean/platforms'
3321
3707
  });
3322
3708
  }
3323
- }
3324
3709
 
3325
- export class BeanPricesService {
3326
3710
  /**
3327
- * Create a new price
3328
- * Creates a new price entry for the authenticated user
3711
+ * Create a new platform
3329
3712
  * @param data The data for the request.
3330
- * @param data.region Region code for tenant context
3331
3713
  * @param data.requestBody
3332
- * @returns PriceResponseDto Price created successfully
3714
+ * @returns unknown Platform created successfully
3333
3715
  * @throws ApiError
3334
3716
  */
3335
- public static priceControllerCreate(
3336
- data: PriceControllerCreateData
3337
- ): CancelablePromise<PriceControllerCreateResponse> {
3717
+ public static platformControllerCreate(
3718
+ data: PlatformControllerCreateData
3719
+ ): CancelablePromise<PlatformControllerCreateResponse> {
3338
3720
  return __request(OpenAPI, {
3339
3721
  method: 'POST',
3340
- url: '/api/v1/{region}/bean/prices',
3341
- path: {
3342
- region: data.region
3343
- },
3722
+ url: '/api/v1/bean/platforms',
3344
3723
  body: data.requestBody,
3345
3724
  mediaType: 'application/json',
3346
3725
  errors: {
3347
- 404: 'Currency or quoteCurrency commodity not found',
3348
- 409: 'Price already exists for this currency pair and date'
3726
+ 409: 'Platform already exists'
3349
3727
  }
3350
3728
  });
3351
3729
  }
3352
3730
 
3353
3731
  /**
3354
- * List user prices
3355
- * Returns all price entries for the authenticated user with optional filtering
3356
- * @param data The data for the request.
3357
- * @param data.region Region code for tenant context
3358
- * @param data.currency Filter by currency (e.g., BTC, AAPL, USD)
3359
- * @param data.quoteCurrency Filter by quote currency (pricing currency, e.g., USD, CNY)
3360
- * @param data.dateFrom Filter prices from this date (ISO 8601 format)
3361
- * @param data.dateTo Filter prices to this date (ISO 8601 format)
3362
- * @param data.search Search term for currency or quoteCurrency (case-insensitive partial match)
3363
- * @param data.page Page number for pagination (default: 1)
3364
- * @param data.limit Number of items per page (default: 20, max: 100)
3365
- * @returns PriceListResponseDto Prices retrieved successfully
3732
+ * Get platform list for current user
3733
+ * @returns PlatformListItemDto List of platforms with user binding status
3366
3734
  * @throws ApiError
3367
3735
  */
3368
- public static priceControllerFindAll(
3369
- data: PriceControllerFindAllData
3370
- ): CancelablePromise<PriceControllerFindAllResponse> {
3736
+ public static platformControllerGetPlatformList(): CancelablePromise<PlatformControllerGetPlatformListResponse> {
3371
3737
  return __request(OpenAPI, {
3372
3738
  method: 'GET',
3373
- url: '/api/v1/{region}/bean/prices',
3374
- path: {
3375
- region: data.region
3376
- },
3377
- query: {
3378
- currency: data.currency,
3379
- quoteCurrency: data.quoteCurrency,
3380
- dateFrom: data.dateFrom,
3381
- dateTo: data.dateTo,
3382
- search: data.search,
3383
- page: data.page,
3384
- limit: data.limit
3385
- }
3739
+ url: '/api/v1/bean/platforms/list'
3386
3740
  });
3387
3741
  }
3388
3742
 
3389
3743
  /**
3390
- * Get price by ID
3391
- * Returns a single price entry by its ID
3744
+ * Match platforms by name or alias
3392
3745
  * @param data The data for the request.
3393
- * @param data.id Price ID
3394
- * @param data.region Region code for tenant context
3395
- * @returns PriceResponseDto Price retrieved successfully
3746
+ * @param data.q Search query — Chinese name, English name, or abbreviation
3747
+ * @param data.region Region code for category override lookup
3748
+ * @returns PlatformMatchResponseDto Matching platforms with overall match type and truncation flag
3396
3749
  * @throws ApiError
3397
3750
  */
3398
- public static priceControllerFindOne(
3399
- data: PriceControllerFindOneData
3400
- ): CancelablePromise<PriceControllerFindOneResponse> {
3751
+ public static platformControllerMatchPlatforms(
3752
+ data: PlatformControllerMatchPlatformsData
3753
+ ): CancelablePromise<PlatformControllerMatchPlatformsResponse> {
3401
3754
  return __request(OpenAPI, {
3402
3755
  method: 'GET',
3403
- url: '/api/v1/{region}/bean/prices/{id}',
3404
- path: {
3405
- id: data.id,
3756
+ url: '/api/v1/bean/platforms/match',
3757
+ query: {
3758
+ q: data.q,
3406
3759
  region: data.region
3407
- },
3408
- errors: {
3409
- 404: 'Price not found'
3410
3760
  }
3411
3761
  });
3412
3762
  }
3413
3763
 
3414
3764
  /**
3415
- * Update a price
3416
- * Updates an existing price entry
3765
+ * Update a platform
3417
3766
  * @param data The data for the request.
3418
- * @param data.id Price ID
3419
- * @param data.region Region code for tenant context
3767
+ * @param data.id Platform ID
3420
3768
  * @param data.requestBody
3421
- * @returns PriceResponseDto Price updated successfully
3769
+ * @returns unknown Platform updated successfully
3422
3770
  * @throws ApiError
3423
3771
  */
3424
- public static priceControllerUpdate(
3425
- data: PriceControllerUpdateData
3426
- ): CancelablePromise<PriceControllerUpdateResponse> {
3772
+ public static platformControllerUpdate(
3773
+ data: PlatformControllerUpdateData
3774
+ ): CancelablePromise<PlatformControllerUpdateResponse> {
3427
3775
  return __request(OpenAPI, {
3428
3776
  method: 'PUT',
3429
- url: '/api/v1/{region}/bean/prices/{id}',
3777
+ url: '/api/v1/bean/platforms/{id}',
3430
3778
  path: {
3431
- id: data.id,
3432
- region: data.region
3779
+ id: data.id
3433
3780
  },
3434
3781
  body: data.requestBody,
3435
3782
  mediaType: 'application/json',
3436
3783
  errors: {
3437
- 404: 'Price not found',
3438
- 409: 'Updated price conflicts with existing price'
3784
+ 404: 'Platform not found'
3439
3785
  }
3440
3786
  });
3441
3787
  }
3442
3788
 
3443
3789
  /**
3444
- * Delete a price
3445
- * Deletes a price entry (hard delete)
3790
+ * Delete a platform
3446
3791
  * @param data The data for the request.
3447
- * @param data.id Price ID
3448
- * @param data.region Region code for tenant context
3449
- * @returns void Price deleted successfully
3792
+ * @param data.id Platform ID
3793
+ * @returns void Platform deleted successfully
3450
3794
  * @throws ApiError
3451
3795
  */
3452
- public static priceControllerDelete(
3453
- data: PriceControllerDeleteData
3454
- ): CancelablePromise<PriceControllerDeleteResponse> {
3796
+ public static platformControllerDelete(
3797
+ data: PlatformControllerDeleteData
3798
+ ): CancelablePromise<PlatformControllerDeleteResponse> {
3455
3799
  return __request(OpenAPI, {
3456
3800
  method: 'DELETE',
3457
- url: '/api/v1/{region}/bean/prices/{id}',
3801
+ url: '/api/v1/bean/platforms/{id}',
3458
3802
  path: {
3459
- id: data.id,
3460
- region: data.region
3803
+ id: data.id
3461
3804
  },
3462
3805
  errors: {
3463
- 404: 'Price not found'
3806
+ 404: 'Platform not found'
3464
3807
  }
3465
3808
  });
3466
3809
  }
3810
+ }
3467
3811
 
3812
+ export class DashboardService {
3468
3813
  /**
3469
- * Bulk create prices
3470
- * Creates multiple price entries at once (skips duplicates)
3814
+ * Get net worth overview
3815
+ * Returns total net worth with breakdown of assets and liabilities
3471
3816
  * @param data The data for the request.
3472
3817
  * @param data.region Region code for tenant context
3473
- * @param data.requestBody
3474
- * @returns PriceResponseDto Prices created successfully
3818
+ * @param data.date Date for balance calculation (ISO 8601 format)
3819
+ * @returns NetWorthResponseDto Net worth retrieved successfully
3475
3820
  * @throws ApiError
3476
3821
  */
3477
- public static priceControllerBulkCreate(
3478
- data: PriceControllerBulkCreateData
3479
- ): CancelablePromise<PriceControllerBulkCreateResponse> {
3822
+ public static dashboardControllerGetNetWorth(
3823
+ data: DashboardControllerGetNetWorthData
3824
+ ): CancelablePromise<DashboardControllerGetNetWorthResponse> {
3480
3825
  return __request(OpenAPI, {
3481
- method: 'POST',
3482
- url: '/api/v1/{region}/bean/prices/bulk',
3826
+ method: 'GET',
3827
+ url: '/api/v1/{region}/dashboard/net-worth',
3483
3828
  path: {
3484
3829
  region: data.region
3485
3830
  },
3486
- body: data.requestBody,
3487
- mediaType: 'application/json'
3831
+ query: {
3832
+ date: data.date
3833
+ },
3834
+ errors: {
3835
+ 401: 'User not authenticated'
3836
+ }
3488
3837
  });
3489
3838
  }
3490
- }
3491
3839
 
3492
- export class ReportingService {
3493
3840
  /**
3494
- * Get portfolio value trends
3495
- *
3496
- * Returns time series data of portfolio net worth.
3497
- *
3498
- * **Multi-currency Support:**
3499
- * - `series[].byCurrency` - Currency breakdown for each data point
3500
- * - `byCurrency` - Separate time series grouped by currency
3501
- * - `warnings` - Exchange rate warnings if conversion failed
3502
- *
3503
- * **Parameters:**
3504
- * - `period`: Time period (1m, 3m, 6m, 1y)
3505
- * - `granularity`: Data granularity (day, week, month)
3506
- *
3841
+ * Get accounts grouped by platform
3842
+ * Returns accounts with balances grouped by financial platform
3507
3843
  * @param data The data for the request.
3508
3844
  * @param data.region Region code for tenant context
3509
- * @param data.period Time period
3510
- * @param data.granularity Data granularity
3511
- * @returns PortfolioTrendsResponseDto Trends retrieved successfully
3845
+ * @param data.groupBy Grouping strategy
3846
+ * @param data.date Date for balance calculation (ISO 8601 format)
3847
+ * @param data.accountId Scope to a single account (only valid with groupBy=holdingAssetClass, ADR-0105 §6)
3848
+ * @returns unknown Accounts retrieved successfully. Response type depends on groupBy parameter.
3512
3849
  * @throws ApiError
3513
3850
  */
3514
- public static reportingControllerGetPortfolioTrends(
3515
- data: ReportingControllerGetPortfolioTrendsData
3516
- ): CancelablePromise<ReportingControllerGetPortfolioTrendsResponse> {
3851
+ public static dashboardControllerGetAccounts(
3852
+ data: DashboardControllerGetAccountsData
3853
+ ): CancelablePromise<DashboardControllerGetAccountsResponse> {
3517
3854
  return __request(OpenAPI, {
3518
3855
  method: 'GET',
3519
- url: '/api/v1/{region}/reporting/portfolio/trends',
3856
+ url: '/api/v1/{region}/dashboard/accounts',
3520
3857
  path: {
3521
3858
  region: data.region
3522
3859
  },
3523
3860
  query: {
3524
- period: data.period,
3525
- granularity: data.granularity
3861
+ groupBy: data.groupBy,
3862
+ date: data.date,
3863
+ accountId: data.accountId
3526
3864
  },
3527
3865
  errors: {
3528
3866
  401: 'User not authenticated'
@@ -3531,116 +3869,95 @@ export class ReportingService {
3531
3869
  }
3532
3870
 
3533
3871
  /**
3534
- * Get cash-flow trends
3535
- *
3536
- * Monthly income / expense / netSavings over a fixed N-month window
3537
- * (current month + N−1 prior). Missing months are zero-filled (flow metric).
3538
- *
3539
- * **Parameters:**
3540
- * - `period`: 1m | 3m | 6m | 1y (default 6m)
3541
- * - `granularity`: accepted for API symmetry; v1 returns month buckets
3542
- *
3872
+ * Get cash flow summary
3873
+ * Returns income, expenses, and savings for a monthly period
3543
3874
  * @param data The data for the request.
3875
+ * @param data.period Period in YYYY-MM format
3544
3876
  * @param data.region Region code for tenant context
3545
- * @param data.period Time period
3546
- * @param data.granularity Data granularity (accepted for API symmetry; v1 returns month buckets)
3547
- * @returns CashFlowTrendsResponseDto Cash-flow trends retrieved successfully
3877
+ * @returns CashFlowResponseDto Cash flow retrieved successfully
3548
3878
  * @throws ApiError
3549
3879
  */
3550
- public static reportingControllerGetCashFlowTrends(
3551
- data: ReportingControllerGetCashFlowTrendsData
3552
- ): CancelablePromise<ReportingControllerGetCashFlowTrendsResponse> {
3880
+ public static dashboardControllerGetCashFlow(
3881
+ data: DashboardControllerGetCashFlowData
3882
+ ): CancelablePromise<DashboardControllerGetCashFlowResponse> {
3553
3883
  return __request(OpenAPI, {
3554
3884
  method: 'GET',
3555
- url: '/api/v1/{region}/reporting/cash-flow/trends',
3885
+ url: '/api/v1/{region}/dashboard/cash-flow',
3556
3886
  path: {
3557
3887
  region: data.region
3558
3888
  },
3559
3889
  query: {
3560
- period: data.period,
3561
- granularity: data.granularity
3890
+ period: data.period
3562
3891
  },
3563
3892
  errors: {
3893
+ 400: 'Invalid period format',
3564
3894
  401: 'User not authenticated'
3565
3895
  }
3566
3896
  });
3567
3897
  }
3568
3898
 
3569
3899
  /**
3570
- * Generate portfolio snapshot
3571
- *
3572
- * Manually generate a portfolio snapshot for a specific date.
3573
- *
3574
- * **Multi-currency Support:**
3575
- * - Fetches balances grouped by currency
3576
- * - Uses user's baseCurrency setting for conversion
3577
- * - Stores exchange rates and warnings
3578
- *
3579
- * **Use Cases:**
3580
- * - Testing snapshot generation
3581
- * - Force regeneration after data correction
3582
- * - Initial setup for new users
3583
- *
3900
+ * Get expenses/income grouped by functional category
3901
+ * 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)
3584
3902
  * @param data The data for the request.
3585
3903
  * @param data.region Region code for tenant context
3586
- * @param data.requestBody Optional date (defaults to today)
3587
- * @returns GenerateSnapshotResponse Snapshot generated successfully
3904
+ * @param data.groupBy Grouping strategy
3905
+ * @param data.period Time window (1m = current calendar month)
3906
+ * @param data.flow Account root to aggregate (expense → ^Expenses:, income → ^Income:)
3907
+ * @returns ExpensesByCategoryResponseDto Expenses retrieved successfully
3588
3908
  * @throws ApiError
3589
3909
  */
3590
- public static reportingControllerGenerateSnapshot(
3591
- data: ReportingControllerGenerateSnapshotData
3592
- ): CancelablePromise<ReportingControllerGenerateSnapshotResponse> {
3910
+ public static dashboardControllerGetExpenses(
3911
+ data: DashboardControllerGetExpensesData
3912
+ ): CancelablePromise<DashboardControllerGetExpensesResponse> {
3593
3913
  return __request(OpenAPI, {
3594
- method: 'POST',
3595
- url: '/api/v1/{region}/reporting/snapshots/generate',
3914
+ method: 'GET',
3915
+ url: '/api/v1/{region}/dashboard/expenses',
3596
3916
  path: {
3597
3917
  region: data.region
3598
3918
  },
3599
- body: data.requestBody,
3600
- mediaType: 'application/json',
3919
+ query: {
3920
+ groupBy: data.groupBy,
3921
+ period: data.period,
3922
+ flow: data.flow
3923
+ },
3601
3924
  errors: {
3602
- 400: 'Invalid date format',
3925
+ 400: 'Invalid groupBy or period',
3603
3926
  401: 'User not authenticated'
3604
3927
  }
3605
3928
  });
3606
3929
  }
3930
+ }
3607
3931
 
3932
+ export class InvestmentService {
3608
3933
  /**
3609
- * Backfill portfolio snapshots
3610
- *
3611
- * Generate snapshots for a date range (historical data backfill).
3612
- *
3613
- * **Multi-currency Support:**
3614
- * - Each snapshot includes multi-currency data
3615
- * - Uses exchange rates available at generation time
3616
- * - Warnings stored for missing exchange rates
3617
- *
3618
- * **Best Practices:**
3619
- * - Use for initial setup after account configuration
3620
- * - Run during low-traffic periods for large date ranges
3621
- * - Existing snapshots are skipped (not regenerated)
3622
- *
3934
+ * Get per-holding unrealized + realized P&L
3935
+ * Average-cost unrealized P&L per account × commodity, plus cumulative realized P&L on sold lots (method = FIFO | average, default average).
3623
3936
  * @param data The data for the request.
3624
3937
  * @param data.region Region code for tenant context
3625
- * @param data.requestBody
3626
- * @returns BackfillSnapshotsResponse Backfill completed successfully
3938
+ * @param data.asOf As-of date (ISO 8601), defaults to today
3939
+ * @param data.accountId Scope to a single account
3940
+ * @param data.method Realized-P&L lot-matching method (default average). Does not affect the average-cost unrealized basis.
3941
+ * @returns HoldingPnlResponseDto Holding P&L retrieved successfully
3627
3942
  * @throws ApiError
3628
3943
  */
3629
- public static reportingControllerBackfillSnapshots(
3630
- data: ReportingControllerBackfillSnapshotsData
3631
- ): CancelablePromise<ReportingControllerBackfillSnapshotsResponse> {
3944
+ public static holdingPnlControllerGetHoldingPnl(
3945
+ data: HoldingPnlControllerGetHoldingPnlData
3946
+ ): CancelablePromise<HoldingPnlControllerGetHoldingPnlResponse> {
3632
3947
  return __request(OpenAPI, {
3633
- method: 'POST',
3634
- url: '/api/v1/{region}/reporting/snapshots/backfill',
3948
+ method: 'GET',
3949
+ url: '/api/v1/{region}/investment/holdings/pnl',
3635
3950
  path: {
3636
3951
  region: data.region
3637
3952
  },
3638
- body: data.requestBody,
3639
- mediaType: 'application/json',
3953
+ query: {
3954
+ asOf: data.asOf,
3955
+ accountId: data.accountId,
3956
+ method: data.method
3957
+ },
3640
3958
  errors: {
3641
- 400: 'Invalid date format or range',
3642
- 401: 'User not authenticated',
3643
- 409: 'Backfill already in progress for this user'
3959
+ 400: 'Invalid asOf format/value/future date, invalid accountId format, or unsupported method',
3960
+ 401: 'User not authenticated'
3644
3961
  }
3645
3962
  });
3646
3963
  }
@@ -3669,7 +3986,7 @@ export class AuthService {
3669
3986
  * Anonymous login with access token
3670
3987
  * @param data The data for the request.
3671
3988
  * @param data.requestBody
3672
- * @returns unknown Login successful
3989
+ * @returns AnonymousLoginResponseDto Login successful
3673
3990
  * @throws ApiError
3674
3991
  */
3675
3992
  public static authControllerAccessTokenLogin(
@@ -3856,3 +4173,53 @@ export class InfoService {
3856
4173
  });
3857
4174
  }
3858
4175
  }
4176
+
4177
+ export class MarketDataService {
4178
+ /**
4179
+ * Search market symbols by name or code
4180
+ * Ranked search over the openbb catalog. Empty `q` returns [].
4181
+ * @param data The data for the request.
4182
+ * @param data.q Search term — matched against symbol and instrument name. Empty string returns [].
4183
+ * @param data.limit Maximum number of results (clamped 1..50)
4184
+ * @param data.exchange Filter by exchange code (e.g. US, HK, SS, SZ)
4185
+ * @param data.assetType Filter by OpenBB asset_type (e.g. stock, etf)
4186
+ * @returns SymbolSearchResultDto Ranked search results
4187
+ * @throws ApiError
4188
+ */
4189
+ public static symbolControllerSearch(
4190
+ data: SymbolControllerSearchData
4191
+ ): CancelablePromise<SymbolControllerSearchResponse> {
4192
+ return __request(OpenAPI, {
4193
+ method: 'GET',
4194
+ url: '/api/v1/market/symbols/search',
4195
+ query: {
4196
+ q: data.q,
4197
+ limit: data.limit,
4198
+ exchange: data.exchange,
4199
+ assetType: data.assetType
4200
+ }
4201
+ });
4202
+ }
4203
+
4204
+ /**
4205
+ * Get a market symbol quote
4206
+ * @param data The data for the request.
4207
+ * @param data.symbol
4208
+ * @returns SymbolQuoteDto Symbol quote
4209
+ * @throws ApiError
4210
+ */
4211
+ public static symbolControllerGetQuote(
4212
+ data: SymbolControllerGetQuoteData
4213
+ ): CancelablePromise<SymbolControllerGetQuoteResponse> {
4214
+ return __request(OpenAPI, {
4215
+ method: 'GET',
4216
+ url: '/api/v1/market/symbols/{symbol}/quote',
4217
+ path: {
4218
+ symbol: data.symbol
4219
+ },
4220
+ errors: {
4221
+ 404: 'Symbol not found in the openbb catalog'
4222
+ }
4223
+ });
4224
+ }
4225
+ }