@firela/api-types 0.0.0-canary.32edff08 → 0.0.0-canary.3d558482

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,
@@ -29,6 +31,8 @@ import type {
29
31
  TransactionControllerListResponse,
30
32
  TransactionControllerCreateBatchData,
31
33
  TransactionControllerCreateBatchResponse,
34
+ TransactionControllerCorrectData,
35
+ TransactionControllerCorrectResponse,
32
36
  TransactionControllerSuggestTagsData,
33
37
  TransactionControllerSuggestTagsResponse,
34
38
  TransactionControllerGetDetailData,
@@ -95,6 +99,18 @@ import type {
95
99
  CommodityControllerGetOrCreateResponse,
96
100
  CommodityControllerBulkCreateData,
97
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,
98
114
  RecurringRuleControllerCreateData,
99
115
  RecurringRuleControllerCreateResponse,
100
116
  RecurringRuleControllerFindAllData,
@@ -169,6 +185,36 @@ import type {
169
185
  PropertyControllerUpdateResponse,
170
186
  PropertyControllerDeleteData,
171
187
  PropertyControllerDeleteResponse,
188
+ ReportingControllerGetPortfolioTrendsData,
189
+ ReportingControllerGetPortfolioTrendsResponse,
190
+ ReportingControllerGetCashFlowTrendsData,
191
+ ReportingControllerGetCashFlowTrendsResponse,
192
+ ReportingControllerGenerateSnapshotData,
193
+ ReportingControllerGenerateSnapshotResponse,
194
+ ReportingControllerBackfillSnapshotsData,
195
+ ReportingControllerBackfillSnapshotsResponse,
196
+ EventControllerCreateData,
197
+ EventControllerCreateResponse,
198
+ EventControllerFindAllData,
199
+ EventControllerFindAllResponse,
200
+ EventControllerFindOneData,
201
+ EventControllerFindOneResponse,
202
+ EventControllerUpdateData,
203
+ EventControllerUpdateResponse,
204
+ EventControllerDeleteData,
205
+ EventControllerDeleteResponse,
206
+ EventControllerGetSliceData,
207
+ EventControllerGetSliceResponse,
208
+ OnboardingControllerBootstrapData,
209
+ OnboardingControllerBootstrapResponse,
210
+ ReconciliationControllerComputeData,
211
+ ReconciliationControllerComputeResponse,
212
+ ReconciliationControllerAssertData,
213
+ ReconciliationControllerAssertResponse,
214
+ ReconciliationControllerPadData,
215
+ ReconciliationControllerPadResponse,
216
+ ReconciliationControllerHistoryData,
217
+ ReconciliationControllerHistoryResponse,
172
218
  ExportControllerExportBeancountResponse,
173
219
  FileImportControllerImportFileData,
174
220
  FileImportControllerImportFileResponse,
@@ -182,42 +228,52 @@ import type {
182
228
  ImporterConfigControllerUpdateConfigResponse,
183
229
  ImporterConfigControllerResetConfigData,
184
230
  ImporterConfigControllerResetConfigResponse,
185
- PlatformControllerFindAllResponse,
186
- PlatformControllerCreateData,
187
- PlatformControllerCreateResponse,
188
- PlatformControllerGetPlatformListResponse,
189
- PlatformControllerMatchPlatformsData,
190
- PlatformControllerMatchPlatformsResponse,
191
- PlatformControllerUpdateData,
192
- PlatformControllerUpdateResponse,
193
- PlatformControllerDeleteData,
194
- PlatformControllerDeleteResponse,
195
231
  ProviderSyncControllerSyncData,
196
232
  ProviderSyncControllerSyncResponse,
197
233
  ProviderSyncControllerGetSupportedProvidersData,
198
234
  ProviderSyncControllerGetSupportedProvidersResponse,
199
235
  ProviderSyncControllerIsProviderSupportedData,
200
236
  ProviderSyncControllerIsProviderSupportedResponse,
237
+ ExternalAccountLinkControllerCreateData,
238
+ ExternalAccountLinkControllerCreateResponse,
239
+ ExternalAccountLinkControllerFindAllData,
240
+ ExternalAccountLinkControllerFindAllResponse,
241
+ ExternalAccountLinkControllerFindOneData,
242
+ ExternalAccountLinkControllerFindOneResponse,
243
+ ExternalAccountLinkControllerRemoveData,
244
+ ExternalAccountLinkControllerRemoveResponse,
201
245
  TelemetryControllerReportTelemetryData,
202
246
  TelemetryControllerReportTelemetryResponse,
247
+ TelemetryControllerReportCoverageMissData,
248
+ TelemetryControllerReportCoverageMissResponse,
249
+ TelemetryControllerGetCoverageMetricsData,
250
+ TelemetryControllerGetCoverageMetricsResponse,
203
251
  NlpControllerProcessNaturalLanguageData,
204
252
  NlpControllerProcessNaturalLanguageResponse,
205
253
  NlpControllerClearSessionData,
206
254
  NlpControllerClearSessionResponse,
207
255
  NlpControllerGetSessionData,
208
256
  NlpControllerGetSessionResponse,
257
+ PlatformControllerFindAllResponse,
258
+ PlatformControllerCreateData,
259
+ PlatformControllerCreateResponse,
260
+ PlatformControllerGetPlatformListResponse,
261
+ PlatformControllerMatchPlatformsData,
262
+ PlatformControllerMatchPlatformsResponse,
263
+ PlatformControllerUpdateData,
264
+ PlatformControllerUpdateResponse,
265
+ PlatformControllerDeleteData,
266
+ PlatformControllerDeleteResponse,
209
267
  DashboardControllerGetNetWorthData,
210
268
  DashboardControllerGetNetWorthResponse,
211
269
  DashboardControllerGetAccountsData,
212
270
  DashboardControllerGetAccountsResponse,
213
271
  DashboardControllerGetCashFlowData,
214
272
  DashboardControllerGetCashFlowResponse,
215
- ReportingControllerGetPortfolioTrendsData,
216
- ReportingControllerGetPortfolioTrendsResponse,
217
- ReportingControllerGenerateSnapshotData,
218
- ReportingControllerGenerateSnapshotResponse,
219
- ReportingControllerBackfillSnapshotsData,
220
- ReportingControllerBackfillSnapshotsResponse,
273
+ DashboardControllerGetExpensesData,
274
+ DashboardControllerGetExpensesResponse,
275
+ HoldingPnlControllerGetHoldingPnlData,
276
+ HoldingPnlControllerGetHoldingPnlResponse,
221
277
  ApiKeysControllerCreateApiKeyResponse,
222
278
  AuthControllerAccessTokenLoginData,
223
279
  AuthControllerAccessTokenLoginResponse,
@@ -270,7 +326,7 @@ export class BeanAccountsService {
270
326
  * @param data.type Filter by account type
271
327
  * @param data.status Filter by status
272
328
  * @param data.isCustom Filter by custom (user-created) accounts only
273
- * @param data.search Search term for path or i18nKey
329
+ * @param data.search Search term for account path
274
330
  * @param data.limit Maximum number of results
275
331
  * @param data.offset Number of results to skip
276
332
  * @returns AccountListResponseDto Accounts retrieved successfully
@@ -432,6 +488,35 @@ export class BeanAccountsService {
432
488
  }
433
489
  });
434
490
  }
491
+
492
+ /**
493
+ * Post an opening-balance transaction
494
+ * 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.
495
+ * @param data The data for the request.
496
+ * @param data.id Account UUID
497
+ * @param data.region Region code for tenant context
498
+ * @param data.requestBody
499
+ * @returns OpeningBalanceResultDto Opening-balance transaction created
500
+ * @throws ApiError
501
+ */
502
+ public static accountControllerAddOpeningBalance(
503
+ data: AccountControllerAddOpeningBalanceData
504
+ ): CancelablePromise<AccountControllerAddOpeningBalanceResponse> {
505
+ return __request(OpenAPI, {
506
+ method: 'POST',
507
+ url: '/api/v1/{region}/bean/accounts/{id}/opening-balance',
508
+ path: {
509
+ id: data.id,
510
+ region: data.region
511
+ },
512
+ body: data.requestBody,
513
+ mediaType: 'application/json',
514
+ errors: {
515
+ 404: 'Account not found',
516
+ 409: 'An opening balance already exists for this account'
517
+ }
518
+ });
519
+ }
435
520
  }
436
521
 
437
522
  export class BeanAccountStandardsService {
@@ -463,7 +548,7 @@ export class BeanAccountStandardsService {
463
548
 
464
549
  /**
465
550
  * Get template metadata for an account path
466
- * Returns extendable status and root type for a template path.
551
+ * Returns root type for a template path.
467
552
  * @param data The data for the request.
468
553
  * @param data.region Region code for tenant context
469
554
  * @param data.path Account path to check
@@ -549,6 +634,7 @@ export class BeanTransactionsService {
549
634
  * @param data.status Filter by transaction status
550
635
  * @param data.search Search in narration and payee fields (max 200 chars)
551
636
  * @param data.accountId Filter by account ID (transactions with postings to this account)
637
+ * @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
552
638
  * @returns TransactionListResponseDto Transaction list
553
639
  * @throws ApiError
554
640
  */
@@ -568,7 +654,8 @@ export class BeanTransactionsService {
568
654
  dateTo: data.dateTo,
569
655
  status: data.status,
570
656
  search: data.search,
571
- accountId: data.accountId
657
+ accountId: data.accountId,
658
+ category: data.category
572
659
  },
573
660
  errors: {
574
661
  400: 'Validation failed',
@@ -605,6 +692,36 @@ export class BeanTransactionsService {
605
692
  });
606
693
  }
607
694
 
695
+ /**
696
+ * Correct (supersede) a transaction
697
+ * Atomically voids the original (SUPERSEDED) and creates a replacement through the full validation pipeline.
698
+ * @param data The data for the request.
699
+ * @param data.id Original transaction ID to correct
700
+ * @param data.region Region code for tenant context
701
+ * @param data.requestBody
702
+ * @returns TransactionDetailDto Corrected transaction created
703
+ * @throws ApiError
704
+ */
705
+ public static transactionControllerCorrect(
706
+ data: TransactionControllerCorrectData
707
+ ): CancelablePromise<TransactionControllerCorrectResponse> {
708
+ return __request(OpenAPI, {
709
+ method: 'POST',
710
+ url: '/api/v1/{region}/bean/transactions/{id}/correct',
711
+ path: {
712
+ id: data.id,
713
+ region: data.region
714
+ },
715
+ body: data.requestBody,
716
+ mediaType: 'application/json',
717
+ errors: {
718
+ 404: 'Original transaction not found',
719
+ 409: 'Original no longer ACTIVE (concurrent modification)',
720
+ 422: 'Pipeline validation failed (does not balance, invalid accounts)'
721
+ }
722
+ });
723
+ }
724
+
608
725
  /**
609
726
  * Suggest transaction tags
610
727
  * Returns distinct tags from the user ACTIVE transactions, sorted by usage, for autocomplete. Optional q performs a case-insensitive prefix match.
@@ -726,7 +843,7 @@ export class BeanBalancesService {
726
843
  * Query account balance
727
844
  * Calculate account balance at a specific date for a single currency
728
845
  * @param data The data for the request.
729
- * @param data.account Account name (e.g., "Assets:Bank:Checking")
846
+ * @param data.account Account name (e.g., "Assets:Checking")
730
847
  * @param data.region Region code for tenant context
731
848
  * @param data.date Date to calculate balance at (ISO 8601 format)
732
849
  * @param data.currency Currency to query (e.g., "USD", "CNY")
@@ -1447,6 +1564,173 @@ export class BeanCommoditiesService {
1447
1564
  }
1448
1565
  }
1449
1566
 
1567
+ export class BeanPricesService {
1568
+ /**
1569
+ * Create a new price
1570
+ * Creates a new price entry for the authenticated user
1571
+ * @param data The data for the request.
1572
+ * @param data.region Region code for tenant context
1573
+ * @param data.requestBody
1574
+ * @returns PriceResponseDto Price created successfully
1575
+ * @throws ApiError
1576
+ */
1577
+ public static priceControllerCreate(
1578
+ data: PriceControllerCreateData
1579
+ ): CancelablePromise<PriceControllerCreateResponse> {
1580
+ return __request(OpenAPI, {
1581
+ method: 'POST',
1582
+ url: '/api/v1/{region}/bean/prices',
1583
+ path: {
1584
+ region: data.region
1585
+ },
1586
+ body: data.requestBody,
1587
+ mediaType: 'application/json',
1588
+ errors: {
1589
+ 404: 'Currency or quoteCurrency commodity not found',
1590
+ 409: 'Price already exists for this currency pair and date'
1591
+ }
1592
+ });
1593
+ }
1594
+
1595
+ /**
1596
+ * List user prices
1597
+ * Returns all price entries for the authenticated user with optional filtering
1598
+ * @param data The data for the request.
1599
+ * @param data.region Region code for tenant context
1600
+ * @param data.currency Filter by currency (e.g., BTC, AAPL, USD)
1601
+ * @param data.quoteCurrency Filter by quote currency (pricing currency, e.g., USD, CNY)
1602
+ * @param data.dateFrom Filter prices from this date (ISO 8601 format)
1603
+ * @param data.dateTo Filter prices to this date (ISO 8601 format)
1604
+ * @param data.search Search term for currency or quoteCurrency (case-insensitive partial match)
1605
+ * @param data.page Page number for pagination (default: 1)
1606
+ * @param data.limit Number of items per page (default: 20, max: 100)
1607
+ * @returns PriceListResponseDto Prices retrieved successfully
1608
+ * @throws ApiError
1609
+ */
1610
+ public static priceControllerFindAll(
1611
+ data: PriceControllerFindAllData
1612
+ ): CancelablePromise<PriceControllerFindAllResponse> {
1613
+ return __request(OpenAPI, {
1614
+ method: 'GET',
1615
+ url: '/api/v1/{region}/bean/prices',
1616
+ path: {
1617
+ region: data.region
1618
+ },
1619
+ query: {
1620
+ currency: data.currency,
1621
+ quoteCurrency: data.quoteCurrency,
1622
+ dateFrom: data.dateFrom,
1623
+ dateTo: data.dateTo,
1624
+ search: data.search,
1625
+ page: data.page,
1626
+ limit: data.limit
1627
+ }
1628
+ });
1629
+ }
1630
+
1631
+ /**
1632
+ * Get price by ID
1633
+ * Returns a single price entry by its ID
1634
+ * @param data The data for the request.
1635
+ * @param data.id Price ID
1636
+ * @param data.region Region code for tenant context
1637
+ * @returns PriceResponseDto Price retrieved successfully
1638
+ * @throws ApiError
1639
+ */
1640
+ public static priceControllerFindOne(
1641
+ data: PriceControllerFindOneData
1642
+ ): CancelablePromise<PriceControllerFindOneResponse> {
1643
+ return __request(OpenAPI, {
1644
+ method: 'GET',
1645
+ url: '/api/v1/{region}/bean/prices/{id}',
1646
+ path: {
1647
+ id: data.id,
1648
+ region: data.region
1649
+ },
1650
+ errors: {
1651
+ 404: 'Price not found'
1652
+ }
1653
+ });
1654
+ }
1655
+
1656
+ /**
1657
+ * Update a price
1658
+ * Updates an existing price entry
1659
+ * @param data The data for the request.
1660
+ * @param data.id Price ID
1661
+ * @param data.region Region code for tenant context
1662
+ * @param data.requestBody
1663
+ * @returns PriceResponseDto Price updated successfully
1664
+ * @throws ApiError
1665
+ */
1666
+ public static priceControllerUpdate(
1667
+ data: PriceControllerUpdateData
1668
+ ): CancelablePromise<PriceControllerUpdateResponse> {
1669
+ return __request(OpenAPI, {
1670
+ method: 'PUT',
1671
+ url: '/api/v1/{region}/bean/prices/{id}',
1672
+ path: {
1673
+ id: data.id,
1674
+ region: data.region
1675
+ },
1676
+ body: data.requestBody,
1677
+ mediaType: 'application/json',
1678
+ errors: {
1679
+ 404: 'Price not found',
1680
+ 409: 'Updated price conflicts with existing price'
1681
+ }
1682
+ });
1683
+ }
1684
+
1685
+ /**
1686
+ * Delete a price
1687
+ * Deletes a price entry (hard delete)
1688
+ * @param data The data for the request.
1689
+ * @param data.id Price ID
1690
+ * @param data.region Region code for tenant context
1691
+ * @returns void Price deleted successfully
1692
+ * @throws ApiError
1693
+ */
1694
+ public static priceControllerDelete(
1695
+ data: PriceControllerDeleteData
1696
+ ): CancelablePromise<PriceControllerDeleteResponse> {
1697
+ return __request(OpenAPI, {
1698
+ method: 'DELETE',
1699
+ url: '/api/v1/{region}/bean/prices/{id}',
1700
+ path: {
1701
+ id: data.id,
1702
+ region: data.region
1703
+ },
1704
+ errors: {
1705
+ 404: 'Price not found'
1706
+ }
1707
+ });
1708
+ }
1709
+
1710
+ /**
1711
+ * Bulk create prices
1712
+ * Creates multiple price entries at once (skips duplicates)
1713
+ * @param data The data for the request.
1714
+ * @param data.region Region code for tenant context
1715
+ * @param data.requestBody
1716
+ * @returns PriceResponseDto Prices created successfully
1717
+ * @throws ApiError
1718
+ */
1719
+ public static priceControllerBulkCreate(
1720
+ data: PriceControllerBulkCreateData
1721
+ ): CancelablePromise<PriceControllerBulkCreateResponse> {
1722
+ return __request(OpenAPI, {
1723
+ method: 'POST',
1724
+ url: '/api/v1/{region}/bean/prices/bulk',
1725
+ path: {
1726
+ region: data.region
1727
+ },
1728
+ body: data.requestBody,
1729
+ mediaType: 'application/json'
1730
+ });
1731
+ }
1732
+ }
1733
+
1450
1734
  export class RecurringRulesService {
1451
1735
  /**
1452
1736
  * Create a new recurring rule
@@ -2201,7 +2485,7 @@ export class UsersService {
2201
2485
  * Create a new account with auto-generated access token. Protected by Cloudflare Turnstile to prevent automated signup (when enabled).
2202
2486
  * @param data The data for the request.
2203
2487
  * @param data.requestBody
2204
- * @returns unknown User created successfully
2488
+ * @returns SignupResponseDto User created successfully
2205
2489
  * @throws ApiError
2206
2490
  */
2207
2491
  public static userControllerSignupUser(
@@ -2410,294 +2694,644 @@ export class PropertiesService {
2410
2694
  }
2411
2695
  }
2412
2696
 
2413
- export class BeanExportService {
2414
- /**
2415
- * Export Beancount ledger as ZIP
2416
- * Export all user Beancount data as a ZIP file containing ledger.beancount and yearly files in community format.
2417
- * @returns unknown
2418
- * @throws ApiError
2419
- */
2420
- public static exportControllerExportBeancount(): CancelablePromise<ExportControllerExportBeancountResponse> {
2421
- return __request(OpenAPI, {
2422
- method: 'GET',
2423
- url: '/api/v1/{region}/bean/export/beancount'
2424
- });
2425
- }
2426
- }
2427
-
2428
- export class BeanImportService {
2697
+ export class ReportingService {
2429
2698
  /**
2430
- * Import a bill file
2431
- * Upload and process a bill file (CSV, PDF, OFX, etc.). The system automatically identifies the file type, extracts transactions, validates them, and stores only validated transactions to the database. Maximum file size: 50MB. Only 1 import per user at a time (concurrent imports rejected with 429).
2699
+ * Get portfolio value trends
2700
+ *
2701
+ * Returns time series data of portfolio net worth.
2702
+ *
2703
+ * **Multi-currency Support:**
2704
+ * - `series[].byCurrency` - Currency breakdown for each data point
2705
+ * - `byCurrency` - Separate time series grouped by currency
2706
+ * - `warnings` - Exchange rate warnings if conversion failed
2707
+ *
2708
+ * **Parameters:**
2709
+ * - `period`: Time period (1m, 3m, 6m, 1y)
2710
+ * - `granularity`: Data granularity (day, week, month)
2711
+ *
2432
2712
  * @param data The data for the request.
2433
2713
  * @param data.region Region code for tenant context
2434
- * @param data.formData Bill file to import
2435
- * @returns ImportResultDto File imported successfully
2714
+ * @param data.period Time period
2715
+ * @param data.granularity Data granularity
2716
+ * @returns PortfolioTrendsResponseDto Trends retrieved successfully
2436
2717
  * @throws ApiError
2437
2718
  */
2438
- public static fileImportControllerImportFile(
2439
- data: FileImportControllerImportFileData
2440
- ): CancelablePromise<FileImportControllerImportFileResponse> {
2719
+ public static reportingControllerGetPortfolioTrends(
2720
+ data: ReportingControllerGetPortfolioTrendsData
2721
+ ): CancelablePromise<ReportingControllerGetPortfolioTrendsResponse> {
2441
2722
  return __request(OpenAPI, {
2442
- method: 'POST',
2443
- url: '/api/v1/{region}/bean/import/file',
2723
+ method: 'GET',
2724
+ url: '/api/v1/{region}/reporting/portfolio/trends',
2444
2725
  path: {
2445
2726
  region: data.region
2446
2727
  },
2447
- formData: data.formData,
2448
- mediaType: 'multipart/form-data',
2728
+ query: {
2729
+ period: data.period,
2730
+ granularity: data.granularity
2731
+ },
2449
2732
  errors: {
2450
- 400: 'Bad request - file-format-unsupported or file-import-failed',
2451
- 413: 'Payload too large - file exceeds 50MB limit',
2452
- 429: 'Too many requests - user already has import in progress',
2453
- 500: 'Internal server error - DATABASE_ERROR'
2733
+ 401: 'User not authenticated'
2454
2734
  }
2455
2735
  });
2456
2736
  }
2457
2737
 
2458
2738
  /**
2459
- * Identify file type
2460
- * Upload a file to check if it can be processed by any registered importer. Does not perform actual import - useful for pre-validation. Uses user-specific importer configuration.
2739
+ * Get cash-flow trends
2740
+ *
2741
+ * Monthly income / expense / netSavings over a fixed N-month window
2742
+ * (current month + N−1 prior). Missing months are zero-filled (flow metric).
2743
+ *
2744
+ * **Parameters:**
2745
+ * - `period`: 1m | 3m | 6m | 1y (default 6m)
2746
+ * - `granularity`: accepted for API symmetry; v1 returns month buckets
2747
+ *
2461
2748
  * @param data The data for the request.
2462
2749
  * @param data.region Region code for tenant context
2463
- * @param data.formData File to identify
2464
- * @returns IdentifyResultDto File identification result
2750
+ * @param data.period Time period
2751
+ * @param data.granularity Data granularity (accepted for API symmetry; v1 returns month buckets)
2752
+ * @returns CashFlowTrendsResponseDto Cash-flow trends retrieved successfully
2465
2753
  * @throws ApiError
2466
2754
  */
2467
- public static fileImportControllerIdentifyFile(
2468
- data: FileImportControllerIdentifyFileData
2469
- ): CancelablePromise<FileImportControllerIdentifyFileResponse> {
2755
+ public static reportingControllerGetCashFlowTrends(
2756
+ data: ReportingControllerGetCashFlowTrendsData
2757
+ ): CancelablePromise<ReportingControllerGetCashFlowTrendsResponse> {
2470
2758
  return __request(OpenAPI, {
2471
- method: 'POST',
2472
- url: '/api/v1/{region}/bean/import/identify',
2759
+ method: 'GET',
2760
+ url: '/api/v1/{region}/reporting/cash-flow/trends',
2473
2761
  path: {
2474
2762
  region: data.region
2475
2763
  },
2476
- formData: data.formData,
2477
- mediaType: 'multipart/form-data',
2478
- errors: {
2479
- 400: 'Bad request - No file uploaded'
2764
+ query: {
2765
+ period: data.period,
2766
+ granularity: data.granularity
2767
+ },
2768
+ errors: {
2769
+ 401: 'User not authenticated'
2480
2770
  }
2481
2771
  });
2482
2772
  }
2483
2773
 
2484
2774
  /**
2485
- * Import a Beancount file in community format
2486
- * Upload a .beancount file to import. The system parses community-format paths, converts to internal format using category metadata, auto-creates accounts, and imports transactions with deduplication. Maximum file size: 50MB. Only 1 import per user at a time.
2775
+ * Generate portfolio snapshot
2776
+ *
2777
+ * Manually generate a portfolio snapshot for a specific date.
2778
+ *
2779
+ * **Multi-currency Support:**
2780
+ * - Fetches balances grouped by currency
2781
+ * - Uses user's baseCurrency setting for conversion
2782
+ * - Stores exchange rates and warnings
2783
+ *
2784
+ * **Use Cases:**
2785
+ * - Testing snapshot generation
2786
+ * - Force regeneration after data correction
2787
+ * - Initial setup for new users
2788
+ *
2487
2789
  * @param data The data for the request.
2488
2790
  * @param data.region Region code for tenant context
2489
- * @param data.formData Beancount file to import
2490
- * @returns unknown Beancount file imported successfully
2791
+ * @param data.requestBody Optional date (defaults to today)
2792
+ * @returns GenerateSnapshotResponse Snapshot generated successfully
2491
2793
  * @throws ApiError
2492
2794
  */
2493
- public static fileImportControllerImportBeancount(
2494
- data: FileImportControllerImportBeancountData
2495
- ): CancelablePromise<FileImportControllerImportBeancountResponse> {
2795
+ public static reportingControllerGenerateSnapshot(
2796
+ data: ReportingControllerGenerateSnapshotData
2797
+ ): CancelablePromise<ReportingControllerGenerateSnapshotResponse> {
2496
2798
  return __request(OpenAPI, {
2497
2799
  method: 'POST',
2498
- url: '/api/v1/{region}/bean/import/beancount',
2800
+ url: '/api/v1/{region}/reporting/snapshots/generate',
2499
2801
  path: {
2500
2802
  region: data.region
2501
2803
  },
2502
- formData: data.formData,
2503
- mediaType: 'multipart/form-data',
2804
+ body: data.requestBody,
2805
+ mediaType: 'application/json',
2504
2806
  errors: {
2505
- 400: 'Bad request - invalid file or no file uploaded'
2807
+ 400: 'Invalid date format',
2808
+ 401: 'User not authenticated'
2506
2809
  }
2507
2810
  });
2508
2811
  }
2509
2812
 
2510
2813
  /**
2511
- * Get importer configuration
2512
- * Returns the current configuration for the specified importer. Creates default configuration if none exists.
2814
+ * Backfill portfolio snapshots
2815
+ *
2816
+ * Generate snapshots for a date range (historical data backfill).
2817
+ *
2818
+ * **Multi-currency Support:**
2819
+ * - Each snapshot includes multi-currency data
2820
+ * - Uses exchange rates available at generation time
2821
+ * - Warnings stored for missing exchange rates
2822
+ *
2823
+ * **Best Practices:**
2824
+ * - Use for initial setup after account configuration
2825
+ * - Run during low-traffic periods for large date ranges
2826
+ * - Existing snapshots are skipped (not regenerated)
2827
+ *
2513
2828
  * @param data The data for the request.
2514
- * @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
2515
2829
  * @param data.region Region code for tenant context
2516
- * @returns ImporterConfigDto Configuration retrieved successfully
2830
+ * @param data.requestBody
2831
+ * @returns BackfillSnapshotsResponse Backfill completed successfully
2517
2832
  * @throws ApiError
2518
2833
  */
2519
- public static importerConfigControllerGetConfig(
2520
- data: ImporterConfigControllerGetConfigData
2521
- ): CancelablePromise<ImporterConfigControllerGetConfigResponse> {
2834
+ public static reportingControllerBackfillSnapshots(
2835
+ data: ReportingControllerBackfillSnapshotsData
2836
+ ): CancelablePromise<ReportingControllerBackfillSnapshotsResponse> {
2837
+ return __request(OpenAPI, {
2838
+ method: 'POST',
2839
+ url: '/api/v1/{region}/reporting/snapshots/backfill',
2840
+ path: {
2841
+ region: data.region
2842
+ },
2843
+ body: data.requestBody,
2844
+ mediaType: 'application/json',
2845
+ errors: {
2846
+ 400: 'Invalid date format or range',
2847
+ 401: 'User not authenticated',
2848
+ 409: 'Backfill already in progress for this user'
2849
+ }
2850
+ });
2851
+ }
2852
+ }
2853
+
2854
+ export class LifeEventsService {
2855
+ /**
2856
+ * Create a new life event
2857
+ * Creates a new life event entry for the authenticated user. Returns ETag header carrying the row updatedAt.
2858
+ * @param data The data for the request.
2859
+ * @param data.region Region code for tenant context (decorative for life events)
2860
+ * @param data.requestBody
2861
+ * @returns EventResponseDto Life event created successfully
2862
+ * @throws ApiError
2863
+ */
2864
+ public static eventControllerCreate(
2865
+ data: EventControllerCreateData
2866
+ ): CancelablePromise<EventControllerCreateResponse> {
2867
+ return __request(OpenAPI, {
2868
+ method: 'POST',
2869
+ url: '/api/v1/{region}/bean/events',
2870
+ path: {
2871
+ region: data.region
2872
+ },
2873
+ body: data.requestBody,
2874
+ mediaType: 'application/json',
2875
+ errors: {
2876
+ 409: 'Life event already exists for this (userId, type, date) combination'
2877
+ }
2878
+ });
2879
+ }
2880
+
2881
+ /**
2882
+ * List user life events
2883
+ * Returns life events for the authenticated user with optional filtering by type, description search, and date range.
2884
+ * @param data The data for the request.
2885
+ * @param data.region Region code for tenant context (decorative for life events)
2886
+ * @param data.type Filter by life event type (exact match)
2887
+ * @param data.q Search term for description (case-insensitive partial match)
2888
+ * @param data.from Filter life events from this date (ISO 8601 format)
2889
+ * @param data.to Filter life events to this date (ISO 8601 format)
2890
+ * @param data.page Page number for pagination (default: 1)
2891
+ * @param data.limit Number of items per page (default: 20, max: 100)
2892
+ * @returns EventListResponseDto Life events retrieved successfully
2893
+ * @throws ApiError
2894
+ */
2895
+ public static eventControllerFindAll(
2896
+ data: EventControllerFindAllData
2897
+ ): CancelablePromise<EventControllerFindAllResponse> {
2522
2898
  return __request(OpenAPI, {
2523
2899
  method: 'GET',
2524
- url: '/api/v1/{region}/bean/import/config/{importerId}',
2900
+ url: '/api/v1/{region}/bean/events',
2525
2901
  path: {
2526
- importerId: data.importerId,
2902
+ region: data.region
2903
+ },
2904
+ query: {
2905
+ type: data.type,
2906
+ q: data.q,
2907
+ from: data.from,
2908
+ to: data.to,
2909
+ page: data.page,
2910
+ limit: data.limit
2911
+ }
2912
+ });
2913
+ }
2914
+
2915
+ /**
2916
+ * Get life event by ID
2917
+ * Returns a single life event by its ID. Returns ETag header.
2918
+ * @param data The data for the request.
2919
+ * @param data.id Life event ID
2920
+ * @param data.region Region code for tenant context (decorative for life events)
2921
+ * @returns EventResponseDto Life event retrieved successfully
2922
+ * @throws ApiError
2923
+ */
2924
+ public static eventControllerFindOne(
2925
+ data: EventControllerFindOneData
2926
+ ): CancelablePromise<EventControllerFindOneResponse> {
2927
+ return __request(OpenAPI, {
2928
+ method: 'GET',
2929
+ url: '/api/v1/{region}/bean/events/{id}',
2930
+ path: {
2931
+ id: data.id,
2527
2932
  region: data.region
2528
2933
  },
2529
2934
  errors: {
2530
- 400: 'Invalid input - Unsupported importer',
2531
- 401: 'Unauthorized - Authentication required'
2935
+ 404: 'Life event not found'
2532
2936
  }
2533
2937
  });
2534
2938
  }
2535
2939
 
2536
2940
  /**
2537
- * Update importer configuration
2538
- * Updates the configuration for the specified importer. Partial updates are supported.
2941
+ * Update a life event
2942
+ * Updates an existing life event. If If-Match header is provided, performs optimistic concurrency check; mismatched updatedAt returns 412.
2539
2943
  * @param data The data for the request.
2540
- * @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
2541
- * @param data.region Region code for tenant context
2542
- * @param data.requestBody Partial configuration update. Only provided fields will be updated.
2543
- * @returns ImporterConfigDto Configuration updated successfully
2944
+ * @param data.id Life event ID
2945
+ * @param data.region Region code for tenant context (decorative for life events)
2946
+ * @param data.requestBody
2947
+ * @returns EventResponseDto Life event updated successfully
2544
2948
  * @throws ApiError
2545
2949
  */
2546
- public static importerConfigControllerUpdateConfig(
2547
- data: ImporterConfigControllerUpdateConfigData
2548
- ): CancelablePromise<ImporterConfigControllerUpdateConfigResponse> {
2950
+ public static eventControllerUpdate(
2951
+ data: EventControllerUpdateData
2952
+ ): CancelablePromise<EventControllerUpdateResponse> {
2549
2953
  return __request(OpenAPI, {
2550
2954
  method: 'PUT',
2551
- url: '/api/v1/{region}/bean/import/config/{importerId}',
2955
+ url: '/api/v1/{region}/bean/events/{id}',
2552
2956
  path: {
2553
- importerId: data.importerId,
2957
+ id: data.id,
2554
2958
  region: data.region
2555
2959
  },
2556
2960
  body: data.requestBody,
2557
2961
  mediaType: 'application/json',
2558
2962
  errors: {
2559
- 400: 'Invalid input - Validation failed',
2560
- 404: 'Configuration not found'
2963
+ 400: 'If-Match header is not a valid ISO 8601 date',
2964
+ 404: 'Life event not found',
2965
+ 409: 'Updated event conflicts with an existing (userId, type, date) combination',
2966
+ 412: 'If-Match precondition failed (updatedAt mismatch)'
2561
2967
  }
2562
2968
  });
2563
2969
  }
2564
2970
 
2565
2971
  /**
2566
- * Reset configuration to default
2567
- * Resets the configuration for the specified importer to default values. This operation overwrites all existing configuration.
2972
+ * Delete a life event
2973
+ * Deletes a life event entry (hard delete). Returns 204.
2974
+ * @param data The data for the request.
2975
+ * @param data.id Life event ID
2976
+ * @param data.region Region code for tenant context (decorative for life events)
2977
+ * @returns void Life event deleted successfully
2978
+ * @throws ApiError
2979
+ */
2980
+ public static eventControllerDelete(
2981
+ data: EventControllerDeleteData
2982
+ ): CancelablePromise<EventControllerDeleteResponse> {
2983
+ return __request(OpenAPI, {
2984
+ method: 'DELETE',
2985
+ url: '/api/v1/{region}/bean/events/{id}',
2986
+ path: {
2987
+ id: data.id,
2988
+ region: data.region
2989
+ },
2990
+ errors: {
2991
+ 404: 'Life event not found'
2992
+ }
2993
+ });
2994
+ }
2995
+
2996
+ /**
2997
+ * Slice time-series by a life event (Phase 79)
2998
+ * Returns aggregated time-series for postings matching accountPattern within the half-open date range of the given life event.
2999
+ * @param data The data for the request.
3000
+ * @param data.id Life event ID
3001
+ * @param data.accountPattern
3002
+ * @param data.granularity
3003
+ * @param data.region Region code for tenant context (decorative for life events)
3004
+ * @returns unknown Time-series sliced by the life event range
3005
+ * @throws ApiError
3006
+ */
3007
+ public static eventControllerGetSlice(
3008
+ data: EventControllerGetSliceData
3009
+ ): CancelablePromise<EventControllerGetSliceResponse> {
3010
+ return __request(OpenAPI, {
3011
+ method: 'GET',
3012
+ url: '/api/v1/{region}/bean/events/{id}/slice',
3013
+ path: {
3014
+ id: data.id,
3015
+ region: data.region
3016
+ },
3017
+ query: {
3018
+ accountPattern: data.accountPattern,
3019
+ granularity: data.granularity
3020
+ },
3021
+ errors: {
3022
+ 400: 'accountPattern query param is empty',
3023
+ 404: 'Life event not found'
3024
+ }
3025
+ });
3026
+ }
3027
+ }
3028
+
3029
+ export class OnboardingService {
3030
+ /**
3031
+ * Bootstrap core accounts + register asset accounts with opening balances (ADR-0113)
2568
3032
  * @param data The data for the request.
2569
- * @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
2570
3033
  * @param data.region Region code for tenant context
2571
- * @returns ImporterConfigDto Configuration reset successfully
3034
+ * @param data.requestBody
3035
+ * @returns unknown Onboarding bootstrap result.
2572
3036
  * @throws ApiError
2573
3037
  */
2574
- public static importerConfigControllerResetConfig(
2575
- data: ImporterConfigControllerResetConfigData
2576
- ): CancelablePromise<ImporterConfigControllerResetConfigResponse> {
3038
+ public static onboardingControllerBootstrap(
3039
+ data: OnboardingControllerBootstrapData
3040
+ ): CancelablePromise<OnboardingControllerBootstrapResponse> {
2577
3041
  return __request(OpenAPI, {
2578
3042
  method: 'POST',
2579
- url: '/api/v1/{region}/bean/import/config/{importerId}/reset',
3043
+ url: '/api/v1/{region}/bean/onboarding',
2580
3044
  path: {
2581
- importerId: data.importerId,
2582
3045
  region: data.region
2583
3046
  },
3047
+ body: data.requestBody,
3048
+ mediaType: 'application/json',
2584
3049
  errors: {
2585
- 400: 'Invalid input - Unsupported importer'
3050
+ 422: 'Invalid region/account path/duplicate paths.'
2586
3051
  }
2587
3052
  });
2588
3053
  }
2589
3054
  }
2590
3055
 
2591
- export class BeanPlatformsService {
3056
+ export class BalanceReconciliationService {
2592
3057
  /**
2593
- * Get all platforms with statistics
2594
- * @returns unknown List of platforms with binding and account counts
3058
+ * Preview reconciliation (book vs actual)
3059
+ * Computes book balance, diff, Beancount-inferred tolerance, and suggested action without persisting.
3060
+ * @param data The data for the request.
3061
+ * @param data.region Region code for tenant context (decorative for reconciliation)
3062
+ * @param data.requestBody
3063
+ * @returns ReconciliationComputeResultDto Reconciliation preview
2595
3064
  * @throws ApiError
2596
3065
  */
2597
- public static platformControllerFindAll(): CancelablePromise<PlatformControllerFindAllResponse> {
3066
+ public static reconciliationControllerCompute(
3067
+ data: ReconciliationControllerComputeData
3068
+ ): CancelablePromise<ReconciliationControllerComputeResponse> {
2598
3069
  return __request(OpenAPI, {
2599
- method: 'GET',
2600
- url: '/api/v1/bean/platforms'
3070
+ method: 'POST',
3071
+ url: '/api/v1/{region}/bean/reconciliations',
3072
+ path: {
3073
+ region: data.region
3074
+ },
3075
+ body: data.requestBody,
3076
+ mediaType: 'application/json',
3077
+ errors: {
3078
+ 404: 'Account not found'
3079
+ }
2601
3080
  });
2602
3081
  }
2603
3082
 
2604
3083
  /**
2605
- * Create a new platform
3084
+ * Record a balance assertion
3085
+ * Persists the reconciliation as a BeanBalance assertion (amount = actual, diffAmount = book − actual). Re-reconciling the same day/currency upserts.
2606
3086
  * @param data The data for the request.
3087
+ * @param data.region Region code for tenant context (decorative for reconciliation)
2607
3088
  * @param data.requestBody
2608
- * @returns unknown Platform created successfully
3089
+ * @returns ReconciliationRecordDto Balance assertion recorded
2609
3090
  * @throws ApiError
2610
3091
  */
2611
- public static platformControllerCreate(
2612
- data: PlatformControllerCreateData
2613
- ): CancelablePromise<PlatformControllerCreateResponse> {
3092
+ public static reconciliationControllerAssert(
3093
+ data: ReconciliationControllerAssertData
3094
+ ): CancelablePromise<ReconciliationControllerAssertResponse> {
2614
3095
  return __request(OpenAPI, {
2615
3096
  method: 'POST',
2616
- url: '/api/v1/bean/platforms',
3097
+ url: '/api/v1/{region}/bean/reconciliations/assert',
3098
+ path: {
3099
+ region: data.region
3100
+ },
2617
3101
  body: data.requestBody,
2618
3102
  mediaType: 'application/json',
2619
3103
  errors: {
2620
- 409: 'Platform already exists'
3104
+ 404: 'Account not found'
2621
3105
  }
2622
3106
  });
2623
3107
  }
2624
3108
 
2625
3109
  /**
2626
- * Get platform list for current user
2627
- * @returns unknown List of platforms with user binding status
3110
+ * Generate a pad adjusting entry
3111
+ * 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.
3112
+ * @param data The data for the request.
3113
+ * @param data.region Region code for tenant context (decorative for reconciliation)
3114
+ * @param data.requestBody
3115
+ * @returns PadResultDto Pad adjusting entry generated
2628
3116
  * @throws ApiError
2629
3117
  */
2630
- public static platformControllerGetPlatformList(): CancelablePromise<PlatformControllerGetPlatformListResponse> {
3118
+ public static reconciliationControllerPad(
3119
+ data: ReconciliationControllerPadData
3120
+ ): CancelablePromise<ReconciliationControllerPadResponse> {
3121
+ return __request(OpenAPI, {
3122
+ method: 'POST',
3123
+ url: '/api/v1/{region}/bean/reconciliations/pad',
3124
+ path: {
3125
+ region: data.region
3126
+ },
3127
+ body: data.requestBody,
3128
+ mediaType: 'application/json',
3129
+ errors: {
3130
+ 400: 'Book already within tolerance — no pad needed',
3131
+ 404: 'Account not found'
3132
+ }
3133
+ });
3134
+ }
3135
+
3136
+ /**
3137
+ * List reconciliation history for an account
3138
+ * Returns recorded balance assertions (most recent first). The latest drives the account-detail "Last <date>" badge.
3139
+ * @param data The data for the request.
3140
+ * @param data.accountId BeanAccount id
3141
+ * @param data.region Region code for tenant context (decorative for reconciliation)
3142
+ * @returns ReconciliationRecordDto Reconciliation history
3143
+ * @throws ApiError
3144
+ */
3145
+ public static reconciliationControllerHistory(
3146
+ data: ReconciliationControllerHistoryData
3147
+ ): CancelablePromise<ReconciliationControllerHistoryResponse> {
2631
3148
  return __request(OpenAPI, {
2632
3149
  method: 'GET',
2633
- url: '/api/v1/bean/platforms/list'
3150
+ url: '/api/v1/{region}/bean/accounts/{accountId}/reconciliations',
3151
+ path: {
3152
+ accountId: data.accountId,
3153
+ region: data.region
3154
+ },
3155
+ errors: {
3156
+ 404: 'Account not found'
3157
+ }
2634
3158
  });
2635
3159
  }
3160
+ }
2636
3161
 
3162
+ export class BeanExportService {
2637
3163
  /**
2638
- * Match platforms by name or alias
3164
+ * Export Beancount ledger as ZIP
3165
+ * Export all user Beancount data as a ZIP file containing ledger.beancount and yearly files in community format.
3166
+ * @returns unknown
3167
+ * @throws ApiError
3168
+ */
3169
+ public static exportControllerExportBeancount(): CancelablePromise<ExportControllerExportBeancountResponse> {
3170
+ return __request(OpenAPI, {
3171
+ method: 'GET',
3172
+ url: '/api/v1/{region}/bean/export/beancount'
3173
+ });
3174
+ }
3175
+ }
3176
+
3177
+ export class BeanImportService {
3178
+ /**
3179
+ * Import a bill file
3180
+ * Upload and process a bill file (CSV, PDF, OFX, etc.). The system automatically identifies the file type, extracts transactions, validates them, and stores only validated transactions to the database. Maximum file size: 50MB. Only 1 import per user at a time (concurrent imports rejected with 429).
2639
3181
  * @param data The data for the request.
2640
- * @param data.q Search query — Chinese name, English name, or abbreviation
2641
- * @param data.region Region code for category override lookup
2642
- * @returns unknown List of matching platforms with suggested segment names
3182
+ * @param data.region Region code for tenant context
3183
+ * @param data.formData Bill file to import
3184
+ * @returns ImportResultDto File imported successfully
2643
3185
  * @throws ApiError
2644
3186
  */
2645
- public static platformControllerMatchPlatforms(
2646
- data: PlatformControllerMatchPlatformsData
2647
- ): CancelablePromise<PlatformControllerMatchPlatformsResponse> {
3187
+ public static fileImportControllerImportFile(
3188
+ data: FileImportControllerImportFileData
3189
+ ): CancelablePromise<FileImportControllerImportFileResponse> {
3190
+ return __request(OpenAPI, {
3191
+ method: 'POST',
3192
+ url: '/api/v1/{region}/bean/import/file',
3193
+ path: {
3194
+ region: data.region
3195
+ },
3196
+ formData: data.formData,
3197
+ mediaType: 'multipart/form-data',
3198
+ errors: {
3199
+ 400: 'Bad request - file-format-unsupported or file-import-failed',
3200
+ 413: 'Payload too large - file exceeds 50MB limit',
3201
+ 429: 'Too many requests - user already has import in progress',
3202
+ 500: 'Internal server error - DATABASE_ERROR'
3203
+ }
3204
+ });
3205
+ }
3206
+
3207
+ /**
3208
+ * Identify file type
3209
+ * Upload a file to check if it can be processed by any registered importer. Does not perform actual import - useful for pre-validation. Uses user-specific importer configuration.
3210
+ * @param data The data for the request.
3211
+ * @param data.region Region code for tenant context
3212
+ * @param data.formData File to identify
3213
+ * @returns IdentifyResultDto File identification result
3214
+ * @throws ApiError
3215
+ */
3216
+ public static fileImportControllerIdentifyFile(
3217
+ data: FileImportControllerIdentifyFileData
3218
+ ): CancelablePromise<FileImportControllerIdentifyFileResponse> {
3219
+ return __request(OpenAPI, {
3220
+ method: 'POST',
3221
+ url: '/api/v1/{region}/bean/import/identify',
3222
+ path: {
3223
+ region: data.region
3224
+ },
3225
+ formData: data.formData,
3226
+ mediaType: 'multipart/form-data',
3227
+ errors: {
3228
+ 400: 'Bad request - No file uploaded'
3229
+ }
3230
+ });
3231
+ }
3232
+
3233
+ /**
3234
+ * Import a Beancount file in community format
3235
+ * Upload a .beancount file to import. The system parses community-format paths, converts to internal format using category metadata, auto-creates accounts, and imports transactions with deduplication. Maximum file size: 50MB. Only 1 import per user at a time.
3236
+ * @param data The data for the request.
3237
+ * @param data.region Region code for tenant context
3238
+ * @param data.formData Beancount file to import
3239
+ * @returns unknown Beancount file imported successfully
3240
+ * @throws ApiError
3241
+ */
3242
+ public static fileImportControllerImportBeancount(
3243
+ data: FileImportControllerImportBeancountData
3244
+ ): CancelablePromise<FileImportControllerImportBeancountResponse> {
3245
+ return __request(OpenAPI, {
3246
+ method: 'POST',
3247
+ url: '/api/v1/{region}/bean/import/beancount',
3248
+ path: {
3249
+ region: data.region
3250
+ },
3251
+ formData: data.formData,
3252
+ mediaType: 'multipart/form-data',
3253
+ errors: {
3254
+ 400: 'Bad request - invalid file or no file uploaded'
3255
+ }
3256
+ });
3257
+ }
3258
+
3259
+ /**
3260
+ * Get importer configuration
3261
+ * Returns the current configuration for the specified importer. Creates default configuration if none exists.
3262
+ * @param data The data for the request.
3263
+ * @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
3264
+ * @param data.region Region code for tenant context
3265
+ * @returns ImporterConfigDto Configuration retrieved successfully
3266
+ * @throws ApiError
3267
+ */
3268
+ public static importerConfigControllerGetConfig(
3269
+ data: ImporterConfigControllerGetConfigData
3270
+ ): CancelablePromise<ImporterConfigControllerGetConfigResponse> {
2648
3271
  return __request(OpenAPI, {
2649
3272
  method: 'GET',
2650
- url: '/api/v1/bean/platforms/match',
2651
- query: {
2652
- q: data.q,
3273
+ url: '/api/v1/{region}/bean/import/config/{importerId}',
3274
+ path: {
3275
+ importerId: data.importerId,
2653
3276
  region: data.region
3277
+ },
3278
+ errors: {
3279
+ 400: 'Invalid input - Unsupported importer',
3280
+ 401: 'Unauthorized - Authentication required'
2654
3281
  }
2655
3282
  });
2656
3283
  }
2657
3284
 
2658
3285
  /**
2659
- * Update a platform
3286
+ * Update importer configuration
3287
+ * Updates the configuration for the specified importer. Partial updates are supported.
2660
3288
  * @param data The data for the request.
2661
- * @param data.id Platform ID
2662
- * @param data.requestBody
2663
- * @returns unknown Platform updated successfully
3289
+ * @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
3290
+ * @param data.region Region code for tenant context
3291
+ * @param data.requestBody Partial configuration update. Only provided fields will be updated.
3292
+ * @returns ImporterConfigDto Configuration updated successfully
2664
3293
  * @throws ApiError
2665
3294
  */
2666
- public static platformControllerUpdate(
2667
- data: PlatformControllerUpdateData
2668
- ): CancelablePromise<PlatformControllerUpdateResponse> {
3295
+ public static importerConfigControllerUpdateConfig(
3296
+ data: ImporterConfigControllerUpdateConfigData
3297
+ ): CancelablePromise<ImporterConfigControllerUpdateConfigResponse> {
2669
3298
  return __request(OpenAPI, {
2670
3299
  method: 'PUT',
2671
- url: '/api/v1/bean/platforms/{id}',
3300
+ url: '/api/v1/{region}/bean/import/config/{importerId}',
2672
3301
  path: {
2673
- id: data.id
3302
+ importerId: data.importerId,
3303
+ region: data.region
2674
3304
  },
2675
3305
  body: data.requestBody,
2676
3306
  mediaType: 'application/json',
2677
3307
  errors: {
2678
- 404: 'Platform not found'
3308
+ 400: 'Invalid input - Validation failed',
3309
+ 404: 'Configuration not found'
2679
3310
  }
2680
3311
  });
2681
3312
  }
2682
3313
 
2683
3314
  /**
2684
- * Delete a platform
3315
+ * Reset configuration to default
3316
+ * Resets the configuration for the specified importer to default values. This operation overwrites all existing configuration.
2685
3317
  * @param data The data for the request.
2686
- * @param data.id Platform ID
2687
- * @returns void Platform deleted successfully
3318
+ * @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
3319
+ * @param data.region Region code for tenant context
3320
+ * @returns ImporterConfigDto Configuration reset successfully
2688
3321
  * @throws ApiError
2689
3322
  */
2690
- public static platformControllerDelete(
2691
- data: PlatformControllerDeleteData
2692
- ): CancelablePromise<PlatformControllerDeleteResponse> {
3323
+ public static importerConfigControllerResetConfig(
3324
+ data: ImporterConfigControllerResetConfigData
3325
+ ): CancelablePromise<ImporterConfigControllerResetConfigResponse> {
2693
3326
  return __request(OpenAPI, {
2694
- method: 'DELETE',
2695
- url: '/api/v1/bean/platforms/{id}',
3327
+ method: 'POST',
3328
+ url: '/api/v1/{region}/bean/import/config/{importerId}/reset',
2696
3329
  path: {
2697
- id: data.id
3330
+ importerId: data.importerId,
3331
+ region: data.region
2698
3332
  },
2699
3333
  errors: {
2700
- 404: 'Platform not found'
3334
+ 400: 'Invalid input - Unsupported importer'
2701
3335
  }
2702
3336
  });
2703
3337
  }
@@ -2729,7 +3363,7 @@ export class ProviderSyncService {
2729
3363
  *
2730
3364
  * @param data The data for the request.
2731
3365
  * @param data.providerName Provider name
2732
- * @param data.region Region code
3366
+ * @param data.region Region code for tenant context
2733
3367
  * @param data.requestBody
2734
3368
  * @returns ProviderSyncResponseDto Sync completed successfully
2735
3369
  * @throws ApiError
@@ -2781,23 +3415,118 @@ export class ProviderSyncService {
2781
3415
  * Check if provider is supported
2782
3416
  * Returns whether a specific provider is supported.
2783
3417
  * @param data The data for the request.
2784
- * @param data.providerName Provider name to check
3418
+ * @param data.providerName Provider name to check
3419
+ * @param data.region Region code for tenant context
3420
+ * @returns unknown Provider support status
3421
+ * @throws ApiError
3422
+ */
3423
+ public static providerSyncControllerIsProviderSupported(
3424
+ data: ProviderSyncControllerIsProviderSupportedData
3425
+ ): CancelablePromise<ProviderSyncControllerIsProviderSupportedResponse> {
3426
+ return __request(OpenAPI, {
3427
+ method: 'GET',
3428
+ url: '/api/v1/{region}/bean/import/provider/{providerName}/supported',
3429
+ path: {
3430
+ providerName: data.providerName,
3431
+ region: data.region
3432
+ },
3433
+ errors: {
3434
+ 401: 'Missing or invalid authentication'
3435
+ }
3436
+ });
3437
+ }
3438
+ }
3439
+
3440
+ export class ExternalAccountLinksService {
3441
+ /**
3442
+ * Create an external account → BeanAccount mapping (ADR-0113)
3443
+ * @param data The data for the request.
3444
+ * @param data.region Region code for tenant context
3445
+ * @param data.requestBody
3446
+ * @returns ExternalAccountLinkResponseDto Link created.
3447
+ * @throws ApiError
3448
+ */
3449
+ public static externalAccountLinkControllerCreate(
3450
+ data: ExternalAccountLinkControllerCreateData
3451
+ ): CancelablePromise<ExternalAccountLinkControllerCreateResponse> {
3452
+ return __request(OpenAPI, {
3453
+ method: 'POST',
3454
+ url: '/api/v1/{region}/bean/external-account-links',
3455
+ path: {
3456
+ region: data.region
3457
+ },
3458
+ body: data.requestBody,
3459
+ mediaType: 'application/json',
3460
+ errors: {
3461
+ 422: 'beanAccountId not owned, or an active link already exists.'
3462
+ }
3463
+ });
3464
+ }
3465
+
3466
+ /**
3467
+ * List the user's active external account links
3468
+ * @param data The data for the request.
3469
+ * @param data.provider
3470
+ * @param data.region Region code for tenant context
3471
+ * @returns ExternalAccountLinkListResponseDto Links retrieved.
3472
+ * @throws ApiError
3473
+ */
3474
+ public static externalAccountLinkControllerFindAll(
3475
+ data: ExternalAccountLinkControllerFindAllData
3476
+ ): CancelablePromise<ExternalAccountLinkControllerFindAllResponse> {
3477
+ return __request(OpenAPI, {
3478
+ method: 'GET',
3479
+ url: '/api/v1/{region}/bean/external-account-links',
3480
+ path: {
3481
+ region: data.region
3482
+ },
3483
+ query: {
3484
+ provider: data.provider
3485
+ }
3486
+ });
3487
+ }
3488
+
3489
+ /**
3490
+ * Get a single external account link
3491
+ * @param data The data for the request.
3492
+ * @param data.id
3493
+ * @param data.region Region code for tenant context
3494
+ * @returns ExternalAccountLinkResponseDto Link retrieved.
3495
+ * @throws ApiError
3496
+ */
3497
+ public static externalAccountLinkControllerFindOne(
3498
+ data: ExternalAccountLinkControllerFindOneData
3499
+ ): CancelablePromise<ExternalAccountLinkControllerFindOneResponse> {
3500
+ return __request(OpenAPI, {
3501
+ method: 'GET',
3502
+ url: '/api/v1/{region}/bean/external-account-links/{id}',
3503
+ path: {
3504
+ id: data.id,
3505
+ region: data.region
3506
+ },
3507
+ errors: {
3508
+ 422: 'Link not found or not owned by the user.'
3509
+ }
3510
+ });
3511
+ }
3512
+
3513
+ /**
3514
+ * Soft-delete (disconnect) an external account link
3515
+ * @param data The data for the request.
3516
+ * @param data.id
2785
3517
  * @param data.region Region code for tenant context
2786
- * @returns unknown Provider support status
3518
+ * @returns void Link soft-deleted; historical transactions are unaffected.
2787
3519
  * @throws ApiError
2788
3520
  */
2789
- public static providerSyncControllerIsProviderSupported(
2790
- data: ProviderSyncControllerIsProviderSupportedData
2791
- ): CancelablePromise<ProviderSyncControllerIsProviderSupportedResponse> {
3521
+ public static externalAccountLinkControllerRemove(
3522
+ data: ExternalAccountLinkControllerRemoveData
3523
+ ): CancelablePromise<ExternalAccountLinkControllerRemoveResponse> {
2792
3524
  return __request(OpenAPI, {
2793
- method: 'GET',
2794
- url: '/api/v1/{region}/bean/import/provider/{providerName}/supported',
3525
+ method: 'DELETE',
3526
+ url: '/api/v1/{region}/bean/external-account-links/{id}',
2795
3527
  path: {
2796
- providerName: data.providerName,
3528
+ id: data.id,
2797
3529
  region: data.region
2798
- },
2799
- errors: {
2800
- 401: 'Missing or invalid authentication'
2801
3530
  }
2802
3531
  });
2803
3532
  }
@@ -2828,6 +3557,54 @@ export class ImportTelemetryService {
2828
3557
  }
2829
3558
  });
2830
3559
  }
3560
+
3561
+ /**
3562
+ * Receive anonymous zero-hit coverage miss report
3563
+ * @param data The data for the request.
3564
+ * @param data.region Region code for tenant context
3565
+ * @param data.requestBody
3566
+ * @returns unknown Coverage miss report received
3567
+ * @throws ApiError
3568
+ */
3569
+ public static telemetryControllerReportCoverageMiss(
3570
+ data: TelemetryControllerReportCoverageMissData
3571
+ ): CancelablePromise<TelemetryControllerReportCoverageMissResponse> {
3572
+ return __request(OpenAPI, {
3573
+ method: 'POST',
3574
+ url: '/api/v1/{region}/bean/import/parser-coverage-miss',
3575
+ path: {
3576
+ region: data.region
3577
+ },
3578
+ body: data.requestBody,
3579
+ mediaType: 'application/json',
3580
+ errors: {
3581
+ 401: 'Unauthorized'
3582
+ }
3583
+ });
3584
+ }
3585
+
3586
+ /**
3587
+ * Coverage metrics (uncovered format aggregation)
3588
+ * @param data The data for the request.
3589
+ * @param data.region Region code for tenant context
3590
+ * @param data.topN Top-N uncovered formats (default 10)
3591
+ * @returns unknown Coverage metrics
3592
+ * @throws ApiError
3593
+ */
3594
+ public static telemetryControllerGetCoverageMetrics(
3595
+ data: TelemetryControllerGetCoverageMetricsData
3596
+ ): CancelablePromise<TelemetryControllerGetCoverageMetricsResponse> {
3597
+ return __request(OpenAPI, {
3598
+ method: 'GET',
3599
+ url: '/api/v1/{region}/bean/import/parser-coverage-metrics',
3600
+ path: {
3601
+ region: data.region
3602
+ },
3603
+ query: {
3604
+ topN: data.topN
3605
+ }
3606
+ });
3607
+ }
2831
3608
  }
2832
3609
 
2833
3610
  export class BeanNlpService {
@@ -2913,6 +3690,121 @@ export class BeanNlpService {
2913
3690
  }
2914
3691
  }
2915
3692
 
3693
+ export class BeanPlatformsService {
3694
+ /**
3695
+ * Get all platforms with statistics
3696
+ * @returns unknown List of platforms with binding and account counts
3697
+ * @throws ApiError
3698
+ */
3699
+ public static platformControllerFindAll(): CancelablePromise<PlatformControllerFindAllResponse> {
3700
+ return __request(OpenAPI, {
3701
+ method: 'GET',
3702
+ url: '/api/v1/bean/platforms'
3703
+ });
3704
+ }
3705
+
3706
+ /**
3707
+ * Create a new platform
3708
+ * @param data The data for the request.
3709
+ * @param data.requestBody
3710
+ * @returns unknown Platform created successfully
3711
+ * @throws ApiError
3712
+ */
3713
+ public static platformControllerCreate(
3714
+ data: PlatformControllerCreateData
3715
+ ): CancelablePromise<PlatformControllerCreateResponse> {
3716
+ return __request(OpenAPI, {
3717
+ method: 'POST',
3718
+ url: '/api/v1/bean/platforms',
3719
+ body: data.requestBody,
3720
+ mediaType: 'application/json',
3721
+ errors: {
3722
+ 409: 'Platform already exists'
3723
+ }
3724
+ });
3725
+ }
3726
+
3727
+ /**
3728
+ * Get platform list for current user
3729
+ * @returns PlatformListItemDto List of platforms with user binding status
3730
+ * @throws ApiError
3731
+ */
3732
+ public static platformControllerGetPlatformList(): CancelablePromise<PlatformControllerGetPlatformListResponse> {
3733
+ return __request(OpenAPI, {
3734
+ method: 'GET',
3735
+ url: '/api/v1/bean/platforms/list'
3736
+ });
3737
+ }
3738
+
3739
+ /**
3740
+ * Match platforms by name or alias
3741
+ * @param data The data for the request.
3742
+ * @param data.q Search query — Chinese name, English name, or abbreviation
3743
+ * @param data.region Region code for category override lookup
3744
+ * @returns PlatformMatchResponseDto Matching platforms with overall match type and truncation flag
3745
+ * @throws ApiError
3746
+ */
3747
+ public static platformControllerMatchPlatforms(
3748
+ data: PlatformControllerMatchPlatformsData
3749
+ ): CancelablePromise<PlatformControllerMatchPlatformsResponse> {
3750
+ return __request(OpenAPI, {
3751
+ method: 'GET',
3752
+ url: '/api/v1/bean/platforms/match',
3753
+ query: {
3754
+ q: data.q,
3755
+ region: data.region
3756
+ }
3757
+ });
3758
+ }
3759
+
3760
+ /**
3761
+ * Update a platform
3762
+ * @param data The data for the request.
3763
+ * @param data.id Platform ID
3764
+ * @param data.requestBody
3765
+ * @returns unknown Platform updated successfully
3766
+ * @throws ApiError
3767
+ */
3768
+ public static platformControllerUpdate(
3769
+ data: PlatformControllerUpdateData
3770
+ ): CancelablePromise<PlatformControllerUpdateResponse> {
3771
+ return __request(OpenAPI, {
3772
+ method: 'PUT',
3773
+ url: '/api/v1/bean/platforms/{id}',
3774
+ path: {
3775
+ id: data.id
3776
+ },
3777
+ body: data.requestBody,
3778
+ mediaType: 'application/json',
3779
+ errors: {
3780
+ 404: 'Platform not found'
3781
+ }
3782
+ });
3783
+ }
3784
+
3785
+ /**
3786
+ * Delete a platform
3787
+ * @param data The data for the request.
3788
+ * @param data.id Platform ID
3789
+ * @returns void Platform deleted successfully
3790
+ * @throws ApiError
3791
+ */
3792
+ public static platformControllerDelete(
3793
+ data: PlatformControllerDeleteData
3794
+ ): CancelablePromise<PlatformControllerDeleteResponse> {
3795
+ return __request(OpenAPI, {
3796
+ method: 'DELETE',
3797
+ url: '/api/v1/bean/platforms/{id}',
3798
+ path: {
3799
+ id: data.id
3800
+ },
3801
+ errors: {
3802
+ 404: 'Platform not found'
3803
+ }
3804
+ });
3805
+ }
3806
+ }
3807
+
2916
3808
  export class DashboardService {
2917
3809
  /**
2918
3810
  * Get net worth overview
@@ -2948,6 +3840,7 @@ export class DashboardService {
2948
3840
  * @param data.region Region code for tenant context
2949
3841
  * @param data.groupBy Grouping strategy
2950
3842
  * @param data.date Date for balance calculation (ISO 8601 format)
3843
+ * @param data.accountId Scope to a single account (only valid with groupBy=holdingAssetClass, ADR-0105 §6)
2951
3844
  * @returns unknown Accounts retrieved successfully. Response type depends on groupBy parameter.
2952
3845
  * @throws ApiError
2953
3846
  */
@@ -2962,7 +3855,8 @@ export class DashboardService {
2962
3855
  },
2963
3856
  query: {
2964
3857
  groupBy: data.groupBy,
2965
- date: data.date
3858
+ date: data.date,
3859
+ accountId: data.accountId
2966
3860
  },
2967
3861
  errors: {
2968
3862
  401: 'User not authenticated'
@@ -2997,124 +3891,69 @@ export class DashboardService {
2997
3891
  }
2998
3892
  });
2999
3893
  }
3000
- }
3001
3894
 
3002
- export class ReportingService {
3003
3895
  /**
3004
- * Get portfolio value trends
3005
- *
3006
- * Returns time series data of portfolio net worth.
3007
- *
3008
- * **Multi-currency Support:**
3009
- * - `series[].byCurrency` - Currency breakdown for each data point
3010
- * - `byCurrency` - Separate time series grouped by currency
3011
- * - `warnings` - Exchange rate warnings if conversion failed
3012
- *
3013
- * **Parameters:**
3014
- * - `period`: Time period (1m, 3m, 6m, 1y)
3015
- * - `granularity`: Data granularity (day, week, month)
3016
- *
3896
+ * Get expenses/income grouped by functional category
3897
+ * 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)
3017
3898
  * @param data The data for the request.
3018
3899
  * @param data.region Region code for tenant context
3019
- * @param data.period Time period
3020
- * @param data.granularity Data granularity
3021
- * @returns PortfolioTrendsResponseDto Trends retrieved successfully
3900
+ * @param data.groupBy Grouping strategy
3901
+ * @param data.period Time window (1m = current calendar month)
3902
+ * @param data.flow Account root to aggregate (expense → ^Expenses:, income → ^Income:)
3903
+ * @returns ExpensesByCategoryResponseDto Expenses retrieved successfully
3022
3904
  * @throws ApiError
3023
3905
  */
3024
- public static reportingControllerGetPortfolioTrends(
3025
- data: ReportingControllerGetPortfolioTrendsData
3026
- ): CancelablePromise<ReportingControllerGetPortfolioTrendsResponse> {
3906
+ public static dashboardControllerGetExpenses(
3907
+ data: DashboardControllerGetExpensesData
3908
+ ): CancelablePromise<DashboardControllerGetExpensesResponse> {
3027
3909
  return __request(OpenAPI, {
3028
3910
  method: 'GET',
3029
- url: '/api/v1/{region}/reporting/portfolio/trends',
3911
+ url: '/api/v1/{region}/dashboard/expenses',
3030
3912
  path: {
3031
3913
  region: data.region
3032
3914
  },
3033
3915
  query: {
3916
+ groupBy: data.groupBy,
3034
3917
  period: data.period,
3035
- granularity: data.granularity
3918
+ flow: data.flow
3036
3919
  },
3037
3920
  errors: {
3921
+ 400: 'Invalid groupBy or period',
3038
3922
  401: 'User not authenticated'
3039
3923
  }
3040
3924
  });
3041
3925
  }
3926
+ }
3042
3927
 
3928
+ export class InvestmentService {
3043
3929
  /**
3044
- * Generate portfolio snapshot
3045
- *
3046
- * Manually generate a portfolio snapshot for a specific date.
3047
- *
3048
- * **Multi-currency Support:**
3049
- * - Fetches balances grouped by currency
3050
- * - Uses user's baseCurrency setting for conversion
3051
- * - Stores exchange rates and warnings
3052
- *
3053
- * **Use Cases:**
3054
- * - Testing snapshot generation
3055
- * - Force regeneration after data correction
3056
- * - Initial setup for new users
3057
- *
3930
+ * Get per-holding unrealized + realized P&L
3931
+ * Average-cost unrealized P&L per account × commodity, plus cumulative realized P&L on sold lots (method = FIFO | average, default average).
3058
3932
  * @param data The data for the request.
3059
3933
  * @param data.region Region code for tenant context
3060
- * @param data.requestBody Optional date (defaults to today)
3061
- * @returns GenerateSnapshotResponse Snapshot generated successfully
3934
+ * @param data.asOf As-of date (ISO 8601), defaults to today
3935
+ * @param data.accountId Scope to a single account
3936
+ * @param data.method Realized-P&L lot-matching method (default average). Does not affect the average-cost unrealized basis.
3937
+ * @returns HoldingPnlResponseDto Holding P&L retrieved successfully
3062
3938
  * @throws ApiError
3063
3939
  */
3064
- public static reportingControllerGenerateSnapshot(
3065
- data: ReportingControllerGenerateSnapshotData
3066
- ): CancelablePromise<ReportingControllerGenerateSnapshotResponse> {
3940
+ public static holdingPnlControllerGetHoldingPnl(
3941
+ data: HoldingPnlControllerGetHoldingPnlData
3942
+ ): CancelablePromise<HoldingPnlControllerGetHoldingPnlResponse> {
3067
3943
  return __request(OpenAPI, {
3068
- method: 'POST',
3069
- url: '/api/v1/{region}/reporting/snapshots/generate',
3944
+ method: 'GET',
3945
+ url: '/api/v1/{region}/investment/holdings/pnl',
3070
3946
  path: {
3071
3947
  region: data.region
3072
3948
  },
3073
- body: data.requestBody,
3074
- mediaType: 'application/json',
3075
- errors: {
3076
- 400: 'Invalid date format',
3077
- 401: 'User not authenticated'
3078
- }
3079
- });
3080
- }
3081
-
3082
- /**
3083
- * Backfill portfolio snapshots
3084
- *
3085
- * Generate snapshots for a date range (historical data backfill).
3086
- *
3087
- * **Multi-currency Support:**
3088
- * - Each snapshot includes multi-currency data
3089
- * - Uses exchange rates available at generation time
3090
- * - Warnings stored for missing exchange rates
3091
- *
3092
- * **Best Practices:**
3093
- * - Use for initial setup after account configuration
3094
- * - Run during low-traffic periods for large date ranges
3095
- * - Existing snapshots are skipped (not regenerated)
3096
- *
3097
- * @param data The data for the request.
3098
- * @param data.region Region code for tenant context
3099
- * @param data.requestBody
3100
- * @returns BackfillSnapshotsResponse Backfill completed successfully
3101
- * @throws ApiError
3102
- */
3103
- public static reportingControllerBackfillSnapshots(
3104
- data: ReportingControllerBackfillSnapshotsData
3105
- ): CancelablePromise<ReportingControllerBackfillSnapshotsResponse> {
3106
- return __request(OpenAPI, {
3107
- method: 'POST',
3108
- url: '/api/v1/{region}/reporting/snapshots/backfill',
3109
- path: {
3110
- region: data.region
3949
+ query: {
3950
+ asOf: data.asOf,
3951
+ accountId: data.accountId,
3952
+ method: data.method
3111
3953
  },
3112
- body: data.requestBody,
3113
- mediaType: 'application/json',
3114
3954
  errors: {
3115
- 400: 'Invalid date format or range',
3116
- 401: 'User not authenticated',
3117
- 409: 'Backfill already in progress for this user'
3955
+ 400: 'Invalid asOf format/value/future date, invalid accountId format, or unsupported method',
3956
+ 401: 'User not authenticated'
3118
3957
  }
3119
3958
  });
3120
3959
  }
@@ -3143,7 +3982,7 @@ export class AuthService {
3143
3982
  * Anonymous login with access token
3144
3983
  * @param data The data for the request.
3145
3984
  * @param data.requestBody
3146
- * @returns unknown Login successful
3985
+ * @returns AnonymousLoginResponseDto Login successful
3147
3986
  * @throws ApiError
3148
3987
  */
3149
3988
  public static authControllerAccessTokenLogin(