@firela/api-types 0.0.0-canary.e1146c01 → 0.0.0-canary.e7524e0a

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,48 @@ import type {
171
173
  PropertyControllerUpdateResponse,
172
174
  PropertyControllerDeleteData,
173
175
  PropertyControllerDeleteResponse,
176
+ TransactionRuleControllerCreateData,
177
+ TransactionRuleControllerCreateResponse,
178
+ TransactionRuleControllerListData,
179
+ TransactionRuleControllerListResponse,
180
+ TransactionRuleControllerValidateData,
181
+ TransactionRuleControllerValidateResponse,
182
+ TransactionRuleControllerBulkCreateData,
183
+ TransactionRuleControllerBulkCreateResponse,
184
+ TransactionRuleControllerExportData,
185
+ TransactionRuleControllerExportResponse,
186
+ TransactionRuleControllerGetStatisticsData,
187
+ TransactionRuleControllerGetStatisticsResponse,
188
+ TransactionRuleControllerGetDetailData,
189
+ TransactionRuleControllerGetDetailResponse,
190
+ TransactionRuleControllerUpdateData,
191
+ TransactionRuleControllerUpdateResponse,
192
+ TransactionRuleControllerDeleteData,
193
+ TransactionRuleControllerDeleteResponse,
194
+ TransactionRuleControllerTestData,
195
+ TransactionRuleControllerTestResponse,
196
+ 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,
174
218
  ExportControllerExportBeancountResponse,
175
219
  FileImportControllerImportFileData,
176
220
  FileImportControllerImportFileResponse,
@@ -184,42 +228,52 @@ import type {
184
228
  ImporterConfigControllerUpdateConfigResponse,
185
229
  ImporterConfigControllerResetConfigData,
186
230
  ImporterConfigControllerResetConfigResponse,
187
- PlatformControllerFindAllResponse,
188
- PlatformControllerCreateData,
189
- PlatformControllerCreateResponse,
190
- PlatformControllerGetPlatformListResponse,
191
- PlatformControllerMatchPlatformsData,
192
- PlatformControllerMatchPlatformsResponse,
193
- PlatformControllerUpdateData,
194
- PlatformControllerUpdateResponse,
195
- PlatformControllerDeleteData,
196
- PlatformControllerDeleteResponse,
197
231
  ProviderSyncControllerSyncData,
198
232
  ProviderSyncControllerSyncResponse,
199
233
  ProviderSyncControllerGetSupportedProvidersData,
200
234
  ProviderSyncControllerGetSupportedProvidersResponse,
201
235
  ProviderSyncControllerIsProviderSupportedData,
202
236
  ProviderSyncControllerIsProviderSupportedResponse,
237
+ ExternalAccountLinkControllerCreateData,
238
+ ExternalAccountLinkControllerCreateResponse,
239
+ ExternalAccountLinkControllerFindAllData,
240
+ ExternalAccountLinkControllerFindAllResponse,
241
+ ExternalAccountLinkControllerFindOneData,
242
+ ExternalAccountLinkControllerFindOneResponse,
243
+ ExternalAccountLinkControllerRemoveData,
244
+ ExternalAccountLinkControllerRemoveResponse,
203
245
  TelemetryControllerReportTelemetryData,
204
246
  TelemetryControllerReportTelemetryResponse,
247
+ TelemetryControllerReportCoverageMissData,
248
+ TelemetryControllerReportCoverageMissResponse,
249
+ TelemetryControllerGetCoverageMetricsData,
250
+ TelemetryControllerGetCoverageMetricsResponse,
205
251
  NlpControllerProcessNaturalLanguageData,
206
252
  NlpControllerProcessNaturalLanguageResponse,
207
253
  NlpControllerClearSessionData,
208
254
  NlpControllerClearSessionResponse,
209
255
  NlpControllerGetSessionData,
210
256
  NlpControllerGetSessionResponse,
257
+ PlatformControllerFindAllResponse,
258
+ PlatformControllerCreateData,
259
+ PlatformControllerCreateResponse,
260
+ PlatformControllerGetPlatformListResponse,
261
+ PlatformControllerMatchPlatformsData,
262
+ PlatformControllerMatchPlatformsResponse,
263
+ PlatformControllerUpdateData,
264
+ PlatformControllerUpdateResponse,
265
+ PlatformControllerDeleteData,
266
+ PlatformControllerDeleteResponse,
211
267
  DashboardControllerGetNetWorthData,
212
268
  DashboardControllerGetNetWorthResponse,
213
269
  DashboardControllerGetAccountsData,
214
270
  DashboardControllerGetAccountsResponse,
215
271
  DashboardControllerGetCashFlowData,
216
272
  DashboardControllerGetCashFlowResponse,
217
- ReportingControllerGetPortfolioTrendsData,
218
- ReportingControllerGetPortfolioTrendsResponse,
219
- ReportingControllerGenerateSnapshotData,
220
- ReportingControllerGenerateSnapshotResponse,
221
- ReportingControllerBackfillSnapshotsData,
222
- ReportingControllerBackfillSnapshotsResponse,
273
+ DashboardControllerGetExpensesData,
274
+ DashboardControllerGetExpensesResponse,
275
+ HoldingPnlControllerGetHoldingPnlData,
276
+ HoldingPnlControllerGetHoldingPnlResponse,
223
277
  ApiKeysControllerCreateApiKeyResponse,
224
278
  AuthControllerAccessTokenLoginData,
225
279
  AuthControllerAccessTokenLoginResponse,
@@ -234,7 +288,11 @@ import type {
234
288
  HealthControllerResetCircuitBreakerData,
235
289
  HealthControllerResetCircuitBreakerResponse,
236
290
  HealthControllerGetMetricsResponse,
237
- InfoControllerGetInfoResponse
291
+ InfoControllerGetInfoResponse,
292
+ SymbolControllerSearchData,
293
+ SymbolControllerSearchResponse,
294
+ SymbolControllerGetQuoteData,
295
+ SymbolControllerGetQuoteResponse
238
296
  } from './types.gen';
239
297
 
240
298
  export class BeanAccountsService {
@@ -272,7 +330,7 @@ export class BeanAccountsService {
272
330
  * @param data.type Filter by account type
273
331
  * @param data.status Filter by status
274
332
  * @param data.isCustom Filter by custom (user-created) accounts only
275
- * @param data.search Search term for path or i18nKey
333
+ * @param data.search Search term for account path
276
334
  * @param data.limit Maximum number of results
277
335
  * @param data.offset Number of results to skip
278
336
  * @returns AccountListResponseDto Accounts retrieved successfully
@@ -353,7 +411,7 @@ export class BeanAccountsService {
353
411
 
354
412
  /**
355
413
  * Delete account
356
- * Deletes an account (only if no transactions)
414
+ * Deletes an account (only if no active transactions; voided/superseded residual postings are cleaned up)
357
415
  * @param data The data for the request.
358
416
  * @param data.id Account UUID
359
417
  * @param data.region Region code for tenant context
@@ -372,7 +430,7 @@ export class BeanAccountsService {
372
430
  },
373
431
  errors: {
374
432
  404: 'Account not found',
375
- 409: 'Account has transactions and cannot be deleted'
433
+ 409: 'Account has active transactions and cannot be deleted'
376
434
  }
377
435
  });
378
436
  }
@@ -434,6 +492,35 @@ export class BeanAccountsService {
434
492
  }
435
493
  });
436
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
+ }
437
524
  }
438
525
 
439
526
  export class BeanAccountStandardsService {
@@ -465,7 +552,7 @@ export class BeanAccountStandardsService {
465
552
 
466
553
  /**
467
554
  * Get template metadata for an account path
468
- * Returns extendable status and root type for a template path.
555
+ * Returns root type for a template path.
469
556
  * @param data The data for the request.
470
557
  * @param data.region Region code for tenant context
471
558
  * @param data.path Account path to check
@@ -551,6 +638,7 @@ export class BeanTransactionsService {
551
638
  * @param data.status Filter by transaction status
552
639
  * @param data.search Search in narration and payee fields (max 200 chars)
553
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
554
642
  * @returns TransactionListResponseDto Transaction list
555
643
  * @throws ApiError
556
644
  */
@@ -570,7 +658,8 @@ export class BeanTransactionsService {
570
658
  dateTo: data.dateTo,
571
659
  status: data.status,
572
660
  search: data.search,
573
- accountId: data.accountId
661
+ accountId: data.accountId,
662
+ category: data.category
574
663
  },
575
664
  errors: {
576
665
  400: 'Validation failed',
@@ -758,7 +847,7 @@ export class BeanBalancesService {
758
847
  * Query account balance
759
848
  * Calculate account balance at a specific date for a single currency
760
849
  * @param data The data for the request.
761
- * @param data.account Account name (e.g., "Assets:Bank:Checking")
850
+ * @param data.account Account name (e.g., "Assets:Checking")
762
851
  * @param data.region Region code for tenant context
763
852
  * @param data.date Date to calculate balance at (ISO 8601 format)
764
853
  * @param data.currency Currency to query (e.g., "USD", "CNY")
@@ -1479,6 +1568,173 @@ export class BeanCommoditiesService {
1479
1568
  }
1480
1569
  }
1481
1570
 
1571
+ export class BeanPricesService {
1572
+ /**
1573
+ * Create a new price
1574
+ * Creates a new price entry for the authenticated user
1575
+ * @param data The data for the request.
1576
+ * @param data.region Region code for tenant context
1577
+ * @param data.requestBody
1578
+ * @returns PriceResponseDto Price created successfully
1579
+ * @throws ApiError
1580
+ */
1581
+ public static priceControllerCreate(
1582
+ data: PriceControllerCreateData
1583
+ ): CancelablePromise<PriceControllerCreateResponse> {
1584
+ return __request(OpenAPI, {
1585
+ method: 'POST',
1586
+ url: '/api/v1/{region}/bean/prices',
1587
+ path: {
1588
+ region: data.region
1589
+ },
1590
+ body: data.requestBody,
1591
+ mediaType: 'application/json',
1592
+ errors: {
1593
+ 404: 'Currency or quoteCurrency commodity not found',
1594
+ 409: 'Price already exists for this currency pair and date'
1595
+ }
1596
+ });
1597
+ }
1598
+
1599
+ /**
1600
+ * List user prices
1601
+ * Returns all price entries for the authenticated user with optional filtering
1602
+ * @param data The data for the request.
1603
+ * @param data.region Region code for tenant context
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
1612
+ * @throws ApiError
1613
+ */
1614
+ public static priceControllerFindAll(
1615
+ data: PriceControllerFindAllData
1616
+ ): CancelablePromise<PriceControllerFindAllResponse> {
1617
+ return __request(OpenAPI, {
1618
+ method: 'GET',
1619
+ url: '/api/v1/{region}/bean/prices',
1620
+ path: {
1621
+ region: data.region
1622
+ },
1623
+ query: {
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
1631
+ }
1632
+ });
1633
+ }
1634
+
1635
+ /**
1636
+ * Get price by ID
1637
+ * Returns a single price entry by its ID
1638
+ * @param data The data for the request.
1639
+ * @param data.id Price ID
1640
+ * @param data.region Region code for tenant context
1641
+ * @returns PriceResponseDto Price retrieved successfully
1642
+ * @throws ApiError
1643
+ */
1644
+ public static priceControllerFindOne(
1645
+ data: PriceControllerFindOneData
1646
+ ): CancelablePromise<PriceControllerFindOneResponse> {
1647
+ return __request(OpenAPI, {
1648
+ method: 'GET',
1649
+ url: '/api/v1/{region}/bean/prices/{id}',
1650
+ path: {
1651
+ id: data.id,
1652
+ region: data.region
1653
+ },
1654
+ errors: {
1655
+ 404: 'Price not found'
1656
+ }
1657
+ });
1658
+ }
1659
+
1660
+ /**
1661
+ * Update a price
1662
+ * Updates an existing price entry
1663
+ * @param data The data for the request.
1664
+ * @param data.id Price ID
1665
+ * @param data.region Region code for tenant context
1666
+ * @param data.requestBody
1667
+ * @returns PriceResponseDto Price updated successfully
1668
+ * @throws ApiError
1669
+ */
1670
+ public static priceControllerUpdate(
1671
+ data: PriceControllerUpdateData
1672
+ ): CancelablePromise<PriceControllerUpdateResponse> {
1673
+ return __request(OpenAPI, {
1674
+ method: 'PUT',
1675
+ url: '/api/v1/{region}/bean/prices/{id}',
1676
+ path: {
1677
+ id: data.id,
1678
+ region: data.region
1679
+ },
1680
+ body: data.requestBody,
1681
+ mediaType: 'application/json',
1682
+ errors: {
1683
+ 404: 'Price not found',
1684
+ 409: 'Updated price conflicts with existing price'
1685
+ }
1686
+ });
1687
+ }
1688
+
1689
+ /**
1690
+ * Delete a price
1691
+ * Deletes a price entry (hard delete)
1692
+ * @param data The data for the request.
1693
+ * @param data.id Price ID
1694
+ * @param data.region Region code for tenant context
1695
+ * @returns void Price deleted successfully
1696
+ * @throws ApiError
1697
+ */
1698
+ public static priceControllerDelete(
1699
+ data: PriceControllerDeleteData
1700
+ ): CancelablePromise<PriceControllerDeleteResponse> {
1701
+ return __request(OpenAPI, {
1702
+ method: 'DELETE',
1703
+ url: '/api/v1/{region}/bean/prices/{id}',
1704
+ path: {
1705
+ id: data.id,
1706
+ region: data.region
1707
+ },
1708
+ errors: {
1709
+ 404: 'Price not found'
1710
+ }
1711
+ });
1712
+ }
1713
+
1714
+ /**
1715
+ * Bulk create prices
1716
+ * Creates multiple price entries at once (skips duplicates)
1717
+ * @param data The data for the request.
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
+
1482
1738
  export class RecurringRulesService {
1483
1739
  /**
1484
1740
  * Create a new recurring rule
@@ -1909,49 +2165,461 @@ export class RecurringForecastService {
1909
2165
  }
1910
2166
  }
1911
2167
 
1912
- export class BeanTransactionRulesService {
2168
+ export class ReportingService {
1913
2169
  /**
1914
- * Create a new transaction rule (or upsert if upsertByPayee=true)
1915
- * 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
+ *
1916
2183
  * @param data The data for the request.
1917
2184
  * @param data.region Region code for tenant context
1918
- * @param data.requestBody
1919
- * @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
1920
2188
  * @throws ApiError
1921
2189
  */
1922
- public static transactionRuleControllerCreate(
1923
- data: TransactionRuleControllerCreateData
1924
- ): CancelablePromise<TransactionRuleControllerCreateResponse> {
2190
+ public static reportingControllerGetPortfolioTrends(
2191
+ data: ReportingControllerGetPortfolioTrendsData
2192
+ ): CancelablePromise<ReportingControllerGetPortfolioTrendsResponse> {
1925
2193
  return __request(OpenAPI, {
1926
- method: 'POST',
1927
- url: '/api/v1/{region}/bean/transaction-rules',
2194
+ method: 'GET',
2195
+ url: '/api/v1/{region}/reporting/portfolio/trends',
1928
2196
  path: {
1929
2197
  region: data.region
1930
2198
  },
1931
- body: data.requestBody,
1932
- mediaType: 'application/json',
2199
+ query: {
2200
+ period: data.period,
2201
+ granularity: data.granularity
2202
+ },
1933
2203
  errors: {
1934
- 400: 'Validation failed',
1935
- 401: 'Unauthorized',
1936
- 409: 'Resource conflict - another process is updating this rule'
2204
+ 401: 'User not authenticated'
1937
2205
  }
1938
2206
  });
1939
2207
  }
1940
2208
 
1941
2209
  /**
1942
- * 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
+ *
1943
2219
  * @param data The data for the request.
1944
2220
  * @param data.region Region code for tenant context
1945
- * @param data.limit Max results per page (default: 20, max: 100)
1946
- * @param data.offset Pagination offset (default: 0)
1947
- * @param data.enabled Filter by enabled status
1948
- * @param data.learningSource Filter by learning source. Omit this parameter or pass empty string to get manually created rules (learningSource is null in database).
1949
- * @param data.autoApplyEnabled Filter by auto-apply status
1950
- * @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
1951
2224
  * @throws ApiError
1952
2225
  */
1953
- public static transactionRuleControllerList(
1954
- data: TransactionRuleControllerListData
2226
+ public static reportingControllerGetCashFlowTrends(
2227
+ data: ReportingControllerGetCashFlowTrendsData
2228
+ ): CancelablePromise<ReportingControllerGetCashFlowTrendsResponse> {
2229
+ return __request(OpenAPI, {
2230
+ method: 'GET',
2231
+ url: '/api/v1/{region}/reporting/cash-flow/trends',
2232
+ path: {
2233
+ region: data.region
2234
+ },
2235
+ query: {
2236
+ period: data.period,
2237
+ granularity: data.granularity
2238
+ },
2239
+ errors: {
2240
+ 401: 'User not authenticated'
2241
+ }
2242
+ });
2243
+ }
2244
+
2245
+ /**
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
+ *
2260
+ * @param data The data for the request.
2261
+ * @param data.region Region code for tenant context
2262
+ * @param data.requestBody Optional date (defaults to today)
2263
+ * @returns GenerateSnapshotResponse Snapshot generated successfully
2264
+ * @throws ApiError
2265
+ */
2266
+ public static reportingControllerGenerateSnapshot(
2267
+ data: ReportingControllerGenerateSnapshotData
2268
+ ): CancelablePromise<ReportingControllerGenerateSnapshotResponse> {
2269
+ return __request(OpenAPI, {
2270
+ method: 'POST',
2271
+ url: '/api/v1/{region}/reporting/snapshots/generate',
2272
+ path: {
2273
+ region: data.region
2274
+ },
2275
+ body: data.requestBody,
2276
+ mediaType: 'application/json',
2277
+ errors: {
2278
+ 400: 'Invalid date format',
2279
+ 401: 'User not authenticated'
2280
+ }
2281
+ });
2282
+ }
2283
+
2284
+ /**
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
+ *
2299
+ * @param data The data for the request.
2300
+ * @param data.region Region code for tenant context
2301
+ * @param data.requestBody
2302
+ * @returns BackfillSnapshotsResponse Backfill completed successfully
2303
+ * @throws ApiError
2304
+ */
2305
+ public static reportingControllerBackfillSnapshots(
2306
+ data: ReportingControllerBackfillSnapshotsData
2307
+ ): CancelablePromise<ReportingControllerBackfillSnapshotsResponse> {
2308
+ return __request(OpenAPI, {
2309
+ method: 'POST',
2310
+ url: '/api/v1/{region}/reporting/snapshots/backfill',
2311
+ path: {
2312
+ region: data.region
2313
+ },
2314
+ body: data.requestBody,
2315
+ mediaType: 'application/json',
2316
+ errors: {
2317
+ 400: 'Invalid date format or range',
2318
+ 401: 'User not authenticated',
2319
+ 409: 'Backfill already in progress for this user'
2320
+ }
2321
+ });
2322
+ }
2323
+ }
2324
+
2325
+ export class UsersService {
2326
+ /**
2327
+ * Delete own user account
2328
+ * @param data The data for the request.
2329
+ * @param data.requestBody
2330
+ * @returns void User deleted successfully
2331
+ * @throws ApiError
2332
+ */
2333
+ public static userControllerDeleteOwnUser(
2334
+ data: UserControllerDeleteOwnUserData
2335
+ ): CancelablePromise<UserControllerDeleteOwnUserResponse> {
2336
+ return __request(OpenAPI, {
2337
+ method: 'DELETE',
2338
+ url: '/api/v1/users',
2339
+ body: data.requestBody,
2340
+ mediaType: 'application/json',
2341
+ errors: {
2342
+ 403: 'Invalid access token'
2343
+ }
2344
+ });
2345
+ }
2346
+
2347
+ /**
2348
+ * Get current authenticated user
2349
+ * @param data The data for the request.
2350
+ * @param data.acceptLanguage
2351
+ * @returns unknown User retrieved successfully
2352
+ * @throws ApiError
2353
+ */
2354
+ public static userControllerGetUser(
2355
+ data: UserControllerGetUserData
2356
+ ): CancelablePromise<UserControllerGetUserResponse> {
2357
+ return __request(OpenAPI, {
2358
+ method: 'GET',
2359
+ url: '/api/v1/users',
2360
+ headers: {
2361
+ 'accept-language': data.acceptLanguage
2362
+ }
2363
+ });
2364
+ }
2365
+
2366
+ /**
2367
+ * Sign up new user
2368
+ * Create a new account with auto-generated access token. Protected by Cloudflare Turnstile to prevent automated signup (when enabled).
2369
+ * @param data The data for the request.
2370
+ * @param data.requestBody
2371
+ * @returns SignupResponseDto User created successfully
2372
+ * @throws ApiError
2373
+ */
2374
+ public static userControllerSignupUser(
2375
+ data: UserControllerSignupUserData
2376
+ ): CancelablePromise<UserControllerSignupUserResponse> {
2377
+ return __request(OpenAPI, {
2378
+ method: 'POST',
2379
+ url: '/api/v1/users',
2380
+ body: data.requestBody,
2381
+ mediaType: 'application/json',
2382
+ errors: {
2383
+ 400: 'Invalid Turnstile token (when Turnstile is enabled)',
2384
+ 403: 'User signup is disabled'
2385
+ }
2386
+ });
2387
+ }
2388
+
2389
+ /**
2390
+ * Delete user by ID (admin only)
2391
+ * @param data The data for the request.
2392
+ * @param data.id User ID to delete
2393
+ * @returns void User deleted successfully
2394
+ * @throws ApiError
2395
+ */
2396
+ public static userControllerDeleteUser(
2397
+ data: UserControllerDeleteUserData
2398
+ ): CancelablePromise<UserControllerDeleteUserResponse> {
2399
+ return __request(OpenAPI, {
2400
+ method: 'DELETE',
2401
+ url: '/api/v1/users/{id}',
2402
+ path: {
2403
+ id: data.id
2404
+ },
2405
+ errors: {
2406
+ 403: 'Cannot delete own account or insufficient permissions'
2407
+ }
2408
+ });
2409
+ }
2410
+
2411
+ /**
2412
+ * Get user info by user ID
2413
+ * @param data The data for the request.
2414
+ * @param data.id User ID
2415
+ * @returns unknown User info retrieved successfully
2416
+ * @throws ApiError
2417
+ */
2418
+ public static userControllerGetUserInfo(
2419
+ data: UserControllerGetUserInfoData
2420
+ ): CancelablePromise<UserControllerGetUserInfoResponse> {
2421
+ return __request(OpenAPI, {
2422
+ method: 'GET',
2423
+ url: '/api/v1/users/{id}/info',
2424
+ path: {
2425
+ id: data.id
2426
+ },
2427
+ errors: {
2428
+ 403: 'Cannot access other user info without admin permission'
2429
+ }
2430
+ });
2431
+ }
2432
+
2433
+ /**
2434
+ * Update user settings
2435
+ * @param data The data for the request.
2436
+ * @param data.requestBody
2437
+ * @returns unknown Settings updated successfully
2438
+ * @throws ApiError
2439
+ */
2440
+ public static userControllerUpdateUserSetting(
2441
+ data: UserControllerUpdateUserSettingData
2442
+ ): CancelablePromise<UserControllerUpdateUserSettingResponse> {
2443
+ return __request(OpenAPI, {
2444
+ method: 'PUT',
2445
+ url: '/api/v1/users/setting',
2446
+ body: data.requestBody,
2447
+ mediaType: 'application/json',
2448
+ errors: {
2449
+ 403: 'Insufficient permissions'
2450
+ }
2451
+ });
2452
+ }
2453
+
2454
+ /**
2455
+ * Get all user settings paginated (admin only)
2456
+ * @param data The data for the request.
2457
+ * @param data.pageNo Page number
2458
+ * @param data.pageSize Page size
2459
+ * @returns unknown Settings list retrieved successfully
2460
+ * @throws ApiError
2461
+ */
2462
+ public static userControllerGetAllUserSettingsByPage(
2463
+ data: UserControllerGetAllUserSettingsByPageData
2464
+ ): CancelablePromise<UserControllerGetAllUserSettingsByPageResponse> {
2465
+ return __request(OpenAPI, {
2466
+ method: 'GET',
2467
+ url: '/api/v1/users/settings-by-page',
2468
+ query: {
2469
+ pageNo: data.pageNo,
2470
+ pageSize: data.pageSize
2471
+ }
2472
+ });
2473
+ }
2474
+
2475
+ /**
2476
+ * Get asset and liability summary for current user
2477
+ * @returns unknown Summary retrieved successfully
2478
+ * @throws ApiError
2479
+ */
2480
+ public static userControllerGetAssetLiabilitySummary(): CancelablePromise<UserControllerGetAssetLiabilitySummaryResponse> {
2481
+ return __request(OpenAPI, {
2482
+ method: 'GET',
2483
+ url: '/api/v1/users/asset-liability-summary'
2484
+ });
2485
+ }
2486
+ }
2487
+
2488
+ export class PropertiesService {
2489
+ /**
2490
+ * Get all system properties
2491
+ * @returns unknown Properties retrieved successfully
2492
+ * @throws ApiError
2493
+ */
2494
+ public static propertyControllerGetAll(): CancelablePromise<PropertyControllerGetAllResponse> {
2495
+ return __request(OpenAPI, {
2496
+ method: 'GET',
2497
+ url: '/api/v1/admin/properties',
2498
+ errors: {
2499
+ 401: 'Unauthorized',
2500
+ 403: 'Forbidden - insufficient permissions'
2501
+ }
2502
+ });
2503
+ }
2504
+
2505
+ /**
2506
+ * Get property by key
2507
+ * @param data The data for the request.
2508
+ * @param data.key Property key
2509
+ * @returns unknown Property retrieved successfully
2510
+ * @throws ApiError
2511
+ */
2512
+ public static propertyControllerGetByKey(
2513
+ data: PropertyControllerGetByKeyData
2514
+ ): CancelablePromise<PropertyControllerGetByKeyResponse> {
2515
+ return __request(OpenAPI, {
2516
+ method: 'GET',
2517
+ url: '/api/v1/admin/properties/{key}',
2518
+ path: {
2519
+ key: data.key
2520
+ },
2521
+ errors: {
2522
+ 401: 'Unauthorized',
2523
+ 403: 'Forbidden - insufficient permissions',
2524
+ 404: 'Property not found'
2525
+ }
2526
+ });
2527
+ }
2528
+
2529
+ /**
2530
+ * Update a system property
2531
+ * @param data The data for the request.
2532
+ * @param data.key Property key
2533
+ * @param data.requestBody
2534
+ * @returns unknown Property updated successfully
2535
+ * @throws ApiError
2536
+ */
2537
+ public static propertyControllerUpdate(
2538
+ data: PropertyControllerUpdateData
2539
+ ): CancelablePromise<PropertyControllerUpdateResponse> {
2540
+ return __request(OpenAPI, {
2541
+ method: 'PUT',
2542
+ url: '/api/v1/admin/properties/{key}',
2543
+ path: {
2544
+ key: data.key
2545
+ },
2546
+ body: data.requestBody,
2547
+ mediaType: 'application/json',
2548
+ errors: {
2549
+ 401: 'Unauthorized',
2550
+ 403: 'Forbidden - insufficient permissions'
2551
+ }
2552
+ });
2553
+ }
2554
+
2555
+ /**
2556
+ * Delete a system property
2557
+ * @param data The data for the request.
2558
+ * @param data.key Property key
2559
+ * @returns void Property deleted successfully
2560
+ * @throws ApiError
2561
+ */
2562
+ public static propertyControllerDelete(
2563
+ data: PropertyControllerDeleteData
2564
+ ): CancelablePromise<PropertyControllerDeleteResponse> {
2565
+ return __request(OpenAPI, {
2566
+ method: 'DELETE',
2567
+ url: '/api/v1/admin/properties/{key}',
2568
+ path: {
2569
+ key: data.key
2570
+ },
2571
+ errors: {
2572
+ 401: 'Unauthorized',
2573
+ 403: 'Forbidden - insufficient permissions',
2574
+ 404: 'Property not found'
2575
+ }
2576
+ });
2577
+ }
2578
+ }
2579
+
2580
+ export class BeanTransactionRulesService {
2581
+ /**
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.
2584
+ * @param data The data for the request.
2585
+ * @param data.region Region code for tenant context
2586
+ * @param data.requestBody
2587
+ * @returns TransactionRuleResponseDto Rule updated successfully (upsert mode)
2588
+ * @throws ApiError
2589
+ */
2590
+ public static transactionRuleControllerCreate(
2591
+ data: TransactionRuleControllerCreateData
2592
+ ): CancelablePromise<TransactionRuleControllerCreateResponse> {
2593
+ return __request(OpenAPI, {
2594
+ method: 'POST',
2595
+ url: '/api/v1/{region}/bean/transaction-rules',
2596
+ path: {
2597
+ region: data.region
2598
+ },
2599
+ body: data.requestBody,
2600
+ mediaType: 'application/json',
2601
+ errors: {
2602
+ 400: 'Validation failed',
2603
+ 401: 'Unauthorized',
2604
+ 409: 'Resource conflict - another process is updating this rule'
2605
+ }
2606
+ });
2607
+ }
2608
+
2609
+ /**
2610
+ * Get all transaction rules for user
2611
+ * @param data The data for the request.
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
2619
+ * @throws ApiError
2620
+ */
2621
+ public static transactionRuleControllerList(
2622
+ data: TransactionRuleControllerListData
1955
2623
  ): CancelablePromise<TransactionRuleControllerListResponse> {
1956
2624
  return __request(OpenAPI, {
1957
2625
  method: 'GET',
@@ -2187,256 +2855,309 @@ export class BeanTransactionRulesService {
2187
2855
  }
2188
2856
  }
2189
2857
 
2190
- export class UsersService {
2858
+ export class LifeEventsService {
2191
2859
  /**
2192
- * Delete own user account
2860
+ * Create a new life event
2861
+ * Creates a new life event entry for the authenticated user. Returns ETag header carrying the row updatedAt.
2193
2862
  * @param data The data for the request.
2863
+ * @param data.region Region code for tenant context (decorative for life events)
2194
2864
  * @param data.requestBody
2195
- * @returns void User deleted successfully
2865
+ * @returns EventResponseDto Life event created successfully
2196
2866
  * @throws ApiError
2197
2867
  */
2198
- public static userControllerDeleteOwnUser(
2199
- data: UserControllerDeleteOwnUserData
2200
- ): CancelablePromise<UserControllerDeleteOwnUserResponse> {
2868
+ public static eventControllerCreate(
2869
+ data: EventControllerCreateData
2870
+ ): CancelablePromise<EventControllerCreateResponse> {
2201
2871
  return __request(OpenAPI, {
2202
- method: 'DELETE',
2203
- url: '/api/v1/users',
2872
+ method: 'POST',
2873
+ url: '/api/v1/{region}/bean/events',
2874
+ path: {
2875
+ region: data.region
2876
+ },
2204
2877
  body: data.requestBody,
2205
2878
  mediaType: 'application/json',
2206
2879
  errors: {
2207
- 403: 'Invalid access token'
2880
+ 409: 'Life event already exists for this (userId, type, date) combination'
2208
2881
  }
2209
2882
  });
2210
2883
  }
2211
2884
 
2212
2885
  /**
2213
- * Get current authenticated user
2886
+ * List user life events
2887
+ * Returns life events for the authenticated user with optional filtering by type, description search, and date range.
2214
2888
  * @param data The data for the request.
2215
- * @param data.acceptLanguage
2216
- * @returns unknown User retrieved successfully
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
2217
2897
  * @throws ApiError
2218
2898
  */
2219
- public static userControllerGetUser(
2220
- data: UserControllerGetUserData
2221
- ): CancelablePromise<UserControllerGetUserResponse> {
2899
+ public static eventControllerFindAll(
2900
+ data: EventControllerFindAllData
2901
+ ): CancelablePromise<EventControllerFindAllResponse> {
2222
2902
  return __request(OpenAPI, {
2223
2903
  method: 'GET',
2224
- url: '/api/v1/users',
2225
- headers: {
2226
- 'accept-language': data.acceptLanguage
2904
+ url: '/api/v1/{region}/bean/events',
2905
+ path: {
2906
+ region: data.region
2907
+ },
2908
+ query: {
2909
+ type: data.type,
2910
+ q: data.q,
2911
+ from: data.from,
2912
+ to: data.to,
2913
+ page: data.page,
2914
+ limit: data.limit
2227
2915
  }
2228
2916
  });
2229
2917
  }
2230
2918
 
2231
2919
  /**
2232
- * Sign up new user
2233
- * Create a new account with auto-generated access token. Protected by Cloudflare Turnstile to prevent automated signup (when enabled).
2920
+ * Get life event by ID
2921
+ * Returns a single life event by its ID. Returns ETag header.
2234
2922
  * @param data The data for the request.
2235
- * @param data.requestBody
2236
- * @returns unknown User created successfully
2923
+ * @param data.id Life event ID
2924
+ * @param data.region Region code for tenant context (decorative for life events)
2925
+ * @returns EventResponseDto Life event retrieved successfully
2237
2926
  * @throws ApiError
2238
2927
  */
2239
- public static userControllerSignupUser(
2240
- data: UserControllerSignupUserData
2241
- ): CancelablePromise<UserControllerSignupUserResponse> {
2928
+ public static eventControllerFindOne(
2929
+ data: EventControllerFindOneData
2930
+ ): CancelablePromise<EventControllerFindOneResponse> {
2242
2931
  return __request(OpenAPI, {
2243
- method: 'POST',
2244
- url: '/api/v1/users',
2245
- body: data.requestBody,
2246
- mediaType: 'application/json',
2932
+ method: 'GET',
2933
+ url: '/api/v1/{region}/bean/events/{id}',
2934
+ path: {
2935
+ id: data.id,
2936
+ region: data.region
2937
+ },
2247
2938
  errors: {
2248
- 400: 'Invalid Turnstile token (when Turnstile is enabled)',
2249
- 403: 'User signup is disabled'
2939
+ 404: 'Life event not found'
2250
2940
  }
2251
2941
  });
2252
2942
  }
2253
2943
 
2254
2944
  /**
2255
- * Delete user by ID (admin only)
2945
+ * Update a life event
2946
+ * Updates an existing life event. If If-Match header is provided, performs optimistic concurrency check; mismatched updatedAt returns 412.
2256
2947
  * @param data The data for the request.
2257
- * @param data.id User ID to delete
2258
- * @returns void User deleted successfully
2948
+ * @param data.id Life event ID
2949
+ * @param data.region Region code for tenant context (decorative for life events)
2950
+ * @param data.requestBody
2951
+ * @returns EventResponseDto Life event updated successfully
2259
2952
  * @throws ApiError
2260
2953
  */
2261
- public static userControllerDeleteUser(
2262
- data: UserControllerDeleteUserData
2263
- ): CancelablePromise<UserControllerDeleteUserResponse> {
2954
+ public static eventControllerUpdate(
2955
+ data: EventControllerUpdateData
2956
+ ): CancelablePromise<EventControllerUpdateResponse> {
2264
2957
  return __request(OpenAPI, {
2265
- method: 'DELETE',
2266
- url: '/api/v1/users/{id}',
2958
+ method: 'PUT',
2959
+ url: '/api/v1/{region}/bean/events/{id}',
2267
2960
  path: {
2268
- id: data.id
2961
+ id: data.id,
2962
+ region: data.region
2269
2963
  },
2964
+ body: data.requestBody,
2965
+ mediaType: 'application/json',
2270
2966
  errors: {
2271
- 403: 'Cannot delete own account or insufficient permissions'
2967
+ 400: 'If-Match header is not a valid ISO 8601 date',
2968
+ 404: 'Life event not found',
2969
+ 409: 'Updated event conflicts with an existing (userId, type, date) combination',
2970
+ 412: 'If-Match precondition failed (updatedAt mismatch)'
2272
2971
  }
2273
2972
  });
2274
2973
  }
2275
2974
 
2276
2975
  /**
2277
- * Get user info by user ID
2976
+ * Delete a life event
2977
+ * Deletes a life event entry (hard delete). Returns 204.
2278
2978
  * @param data The data for the request.
2279
- * @param data.id User ID
2280
- * @returns unknown User info retrieved successfully
2979
+ * @param data.id Life event ID
2980
+ * @param data.region Region code for tenant context (decorative for life events)
2981
+ * @returns void Life event deleted successfully
2281
2982
  * @throws ApiError
2282
2983
  */
2283
- public static userControllerGetUserInfo(
2284
- data: UserControllerGetUserInfoData
2285
- ): CancelablePromise<UserControllerGetUserInfoResponse> {
2984
+ public static eventControllerDelete(
2985
+ data: EventControllerDeleteData
2986
+ ): CancelablePromise<EventControllerDeleteResponse> {
2286
2987
  return __request(OpenAPI, {
2287
- method: 'GET',
2288
- url: '/api/v1/users/{id}/info',
2988
+ method: 'DELETE',
2989
+ url: '/api/v1/{region}/bean/events/{id}',
2289
2990
  path: {
2290
- id: data.id
2991
+ id: data.id,
2992
+ region: data.region
2291
2993
  },
2292
2994
  errors: {
2293
- 403: 'Cannot access other user info without admin permission'
2995
+ 404: 'Life event not found'
2294
2996
  }
2295
2997
  });
2296
2998
  }
2297
2999
 
2298
3000
  /**
2299
- * Update user settings
3001
+ * Slice time-series by a life event (Phase 79)
3002
+ * Returns aggregated time-series for postings matching accountPattern within the half-open date range of the given life event.
2300
3003
  * @param data The data for the request.
2301
- * @param data.requestBody
2302
- * @returns unknown Settings updated successfully
3004
+ * @param data.id Life event ID
3005
+ * @param data.accountPattern
3006
+ * @param data.granularity
3007
+ * @param data.region Region code for tenant context (decorative for life events)
3008
+ * @returns unknown Time-series sliced by the life event range
2303
3009
  * @throws ApiError
2304
3010
  */
2305
- public static userControllerUpdateUserSetting(
2306
- data: UserControllerUpdateUserSettingData
2307
- ): CancelablePromise<UserControllerUpdateUserSettingResponse> {
3011
+ public static eventControllerGetSlice(
3012
+ data: EventControllerGetSliceData
3013
+ ): CancelablePromise<EventControllerGetSliceResponse> {
2308
3014
  return __request(OpenAPI, {
2309
- method: 'PUT',
2310
- url: '/api/v1/users/setting',
2311
- body: data.requestBody,
2312
- mediaType: 'application/json',
3015
+ method: 'GET',
3016
+ url: '/api/v1/{region}/bean/events/{id}/slice',
3017
+ path: {
3018
+ id: data.id,
3019
+ region: data.region
3020
+ },
3021
+ query: {
3022
+ accountPattern: data.accountPattern,
3023
+ granularity: data.granularity
3024
+ },
2313
3025
  errors: {
2314
- 403: 'Insufficient permissions'
3026
+ 400: 'accountPattern query param is empty',
3027
+ 404: 'Life event not found'
2315
3028
  }
2316
3029
  });
2317
3030
  }
3031
+ }
2318
3032
 
3033
+ export class OnboardingService {
2319
3034
  /**
2320
- * Get all user settings paginated (admin only)
3035
+ * Bootstrap core accounts + register asset accounts with opening balances (ADR-0113)
2321
3036
  * @param data The data for the request.
2322
- * @param data.pageNo Page number
2323
- * @param data.pageSize Page size
2324
- * @returns unknown Settings list retrieved successfully
3037
+ * @param data.region Region code for tenant context
3038
+ * @param data.requestBody
3039
+ * @returns unknown Onboarding bootstrap result.
2325
3040
  * @throws ApiError
2326
3041
  */
2327
- public static userControllerGetAllUserSettingsByPage(
2328
- data: UserControllerGetAllUserSettingsByPageData
2329
- ): CancelablePromise<UserControllerGetAllUserSettingsByPageResponse> {
3042
+ public static onboardingControllerBootstrap(
3043
+ data: OnboardingControllerBootstrapData
3044
+ ): CancelablePromise<OnboardingControllerBootstrapResponse> {
2330
3045
  return __request(OpenAPI, {
2331
- method: 'GET',
2332
- url: '/api/v1/users/settings-by-page',
2333
- query: {
2334
- pageNo: data.pageNo,
2335
- pageSize: data.pageSize
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.'
2336
3055
  }
2337
3056
  });
2338
3057
  }
2339
-
2340
- /**
2341
- * Get asset and liability summary for current user
2342
- * @returns unknown Summary retrieved successfully
2343
- * @throws ApiError
2344
- */
2345
- public static userControllerGetAssetLiabilitySummary(): CancelablePromise<UserControllerGetAssetLiabilitySummaryResponse> {
2346
- return __request(OpenAPI, {
2347
- method: 'GET',
2348
- url: '/api/v1/users/asset-liability-summary'
2349
- });
2350
- }
2351
3058
  }
2352
3059
 
2353
- export class PropertiesService {
3060
+ export class BalanceReconciliationService {
2354
3061
  /**
2355
- * Get all system properties
2356
- * @returns unknown Properties retrieved successfully
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
2357
3068
  * @throws ApiError
2358
3069
  */
2359
- public static propertyControllerGetAll(): CancelablePromise<PropertyControllerGetAllResponse> {
3070
+ public static reconciliationControllerCompute(
3071
+ data: ReconciliationControllerComputeData
3072
+ ): CancelablePromise<ReconciliationControllerComputeResponse> {
2360
3073
  return __request(OpenAPI, {
2361
- method: 'GET',
2362
- url: '/api/v1/admin/properties',
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',
2363
3081
  errors: {
2364
- 401: 'Unauthorized',
2365
- 403: 'Forbidden - insufficient permissions'
3082
+ 404: 'Account not found'
2366
3083
  }
2367
3084
  });
2368
3085
  }
2369
3086
 
2370
3087
  /**
2371
- * Get property by key
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.
2372
3090
  * @param data The data for the request.
2373
- * @param data.key Property key
2374
- * @returns unknown Property retrieved successfully
3091
+ * @param data.region Region code for tenant context (decorative for reconciliation)
3092
+ * @param data.requestBody
3093
+ * @returns ReconciliationRecordDto Balance assertion recorded
2375
3094
  * @throws ApiError
2376
3095
  */
2377
- public static propertyControllerGetByKey(
2378
- data: PropertyControllerGetByKeyData
2379
- ): CancelablePromise<PropertyControllerGetByKeyResponse> {
2380
- return __request(OpenAPI, {
2381
- method: 'GET',
2382
- url: '/api/v1/admin/properties/{key}',
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',
2383
3102
  path: {
2384
- key: data.key
3103
+ region: data.region
2385
3104
  },
3105
+ body: data.requestBody,
3106
+ mediaType: 'application/json',
2386
3107
  errors: {
2387
- 401: 'Unauthorized',
2388
- 403: 'Forbidden - insufficient permissions',
2389
- 404: 'Property not found'
3108
+ 404: 'Account not found'
2390
3109
  }
2391
3110
  });
2392
3111
  }
2393
3112
 
2394
3113
  /**
2395
- * Update a system property
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.
2396
3116
  * @param data The data for the request.
2397
- * @param data.key Property key
3117
+ * @param data.region Region code for tenant context (decorative for reconciliation)
2398
3118
  * @param data.requestBody
2399
- * @returns unknown Property updated successfully
3119
+ * @returns PadResultDto Pad adjusting entry generated
2400
3120
  * @throws ApiError
2401
3121
  */
2402
- public static propertyControllerUpdate(
2403
- data: PropertyControllerUpdateData
2404
- ): CancelablePromise<PropertyControllerUpdateResponse> {
3122
+ public static reconciliationControllerPad(
3123
+ data: ReconciliationControllerPadData
3124
+ ): CancelablePromise<ReconciliationControllerPadResponse> {
2405
3125
  return __request(OpenAPI, {
2406
- method: 'PUT',
2407
- url: '/api/v1/admin/properties/{key}',
3126
+ method: 'POST',
3127
+ url: '/api/v1/{region}/bean/reconciliations/pad',
2408
3128
  path: {
2409
- key: data.key
3129
+ region: data.region
2410
3130
  },
2411
3131
  body: data.requestBody,
2412
3132
  mediaType: 'application/json',
2413
3133
  errors: {
2414
- 401: 'Unauthorized',
2415
- 403: 'Forbidden - insufficient permissions'
3134
+ 400: 'Book already within tolerance — no pad needed',
3135
+ 404: 'Account not found'
2416
3136
  }
2417
3137
  });
2418
3138
  }
2419
3139
 
2420
3140
  /**
2421
- * Delete a system property
3141
+ * List reconciliation history for an account
3142
+ * Returns recorded balance assertions (most recent first). The latest drives the account-detail "Last <date>" badge.
2422
3143
  * @param data The data for the request.
2423
- * @param data.key Property key
2424
- * @returns void Property deleted successfully
3144
+ * @param data.accountId BeanAccount id
3145
+ * @param data.region Region code for tenant context (decorative for reconciliation)
3146
+ * @returns ReconciliationRecordDto Reconciliation history
2425
3147
  * @throws ApiError
2426
3148
  */
2427
- public static propertyControllerDelete(
2428
- data: PropertyControllerDeleteData
2429
- ): CancelablePromise<PropertyControllerDeleteResponse> {
3149
+ public static reconciliationControllerHistory(
3150
+ data: ReconciliationControllerHistoryData
3151
+ ): CancelablePromise<ReconciliationControllerHistoryResponse> {
2430
3152
  return __request(OpenAPI, {
2431
- method: 'DELETE',
2432
- url: '/api/v1/admin/properties/{key}',
3153
+ method: 'GET',
3154
+ url: '/api/v1/{region}/bean/accounts/{accountId}/reconciliations',
2433
3155
  path: {
2434
- key: data.key
3156
+ accountId: data.accountId,
3157
+ region: data.region
2435
3158
  },
2436
3159
  errors: {
2437
- 401: 'Unauthorized',
2438
- 403: 'Forbidden - insufficient permissions',
2439
- 404: 'Property not found'
3160
+ 404: 'Account not found'
2440
3161
  }
2441
3162
  });
2442
3163
  }
@@ -2620,243 +3341,271 @@ export class BeanImportService {
2620
3341
  }
2621
3342
  }
2622
3343
 
2623
- export class BeanPlatformsService {
2624
- /**
2625
- * Get all platforms with statistics
2626
- * @returns unknown List of platforms with binding and account counts
2627
- * @throws ApiError
2628
- */
2629
- public static platformControllerFindAll(): CancelablePromise<PlatformControllerFindAllResponse> {
2630
- return __request(OpenAPI, {
2631
- method: 'GET',
2632
- url: '/api/v1/bean/platforms'
2633
- });
2634
- }
2635
-
3344
+ export class ProviderSyncService {
2636
3345
  /**
2637
- * Create a new platform
3346
+ * Sync transactions from financial data provider
3347
+ *
3348
+ * Accepts raw transactions from external financial data providers, transforms them to Beancount format, and processes them through the ingestion pipeline.
3349
+ *
3350
+ * **Supported Providers:**
3351
+ * - **plaid**: Plaid API (US, Canada, Europe)
3352
+ * - **teller**: Teller API (US)
3353
+ * - **truelayer**: TrueLayer Open Banking (UK, Europe)
3354
+ * - **gocardless**: GoCardless Bank Account Data (Europe)
3355
+ * - **simplefin**: SimpleFIN (Self-hosted)
3356
+ * - **yodlee**: Yodlee (Global)
3357
+ * - **beancount-direct**: Beancount format transactions
3358
+ * - **parsed-bill**: Client-side parsed bill transactions
3359
+ *
3360
+ * **Processing Flow:**
3361
+ * 1. Transform raw data via provider adapter
3362
+ * 2. Validate transaction format
3363
+ * 3. Deduplicate using originalId
3364
+ * 4. Classify using rule engine
3365
+ * 5. Route low-confidence to Review Center
3366
+ * 6. Persist validated transactions
3367
+ *
2638
3368
  * @param data The data for the request.
3369
+ * @param data.providerName Provider name
3370
+ * @param data.region Region code for tenant context
2639
3371
  * @param data.requestBody
2640
- * @returns unknown Platform created successfully
3372
+ * @returns ProviderSyncResponseDto Sync completed successfully
2641
3373
  * @throws ApiError
2642
3374
  */
2643
- public static platformControllerCreate(
2644
- data: PlatformControllerCreateData
2645
- ): CancelablePromise<PlatformControllerCreateResponse> {
3375
+ public static providerSyncControllerSync(
3376
+ data: ProviderSyncControllerSyncData
3377
+ ): CancelablePromise<ProviderSyncControllerSyncResponse> {
2646
3378
  return __request(OpenAPI, {
2647
3379
  method: 'POST',
2648
- url: '/api/v1/bean/platforms',
3380
+ url: '/api/v1/{region}/bean/import/provider/{providerName}/sync',
3381
+ path: {
3382
+ providerName: data.providerName,
3383
+ region: data.region
3384
+ },
2649
3385
  body: data.requestBody,
2650
3386
  mediaType: 'application/json',
2651
3387
  errors: {
2652
- 409: 'Platform already exists'
3388
+ 400: 'Invalid request data',
3389
+ 401: 'Missing or invalid authentication',
3390
+ 404: 'Provider not supported'
2653
3391
  }
2654
3392
  });
2655
3393
  }
2656
3394
 
2657
3395
  /**
2658
- * Get platform list for current user
2659
- * @returns unknown List of platforms with user binding status
3396
+ * Get supported providers
3397
+ * Returns a list of all providers supported by the sync endpoint.
3398
+ * @param data The data for the request.
3399
+ * @param data.region Region code for tenant context
3400
+ * @returns SupportedProvidersResponseDto List of supported providers
2660
3401
  * @throws ApiError
2661
3402
  */
2662
- public static platformControllerGetPlatformList(): CancelablePromise<PlatformControllerGetPlatformListResponse> {
3403
+ public static providerSyncControllerGetSupportedProviders(
3404
+ data: ProviderSyncControllerGetSupportedProvidersData
3405
+ ): CancelablePromise<ProviderSyncControllerGetSupportedProvidersResponse> {
2663
3406
  return __request(OpenAPI, {
2664
3407
  method: 'GET',
2665
- url: '/api/v1/bean/platforms/list'
3408
+ url: '/api/v1/{region}/bean/import/provider/supported',
3409
+ path: {
3410
+ region: data.region
3411
+ },
3412
+ errors: {
3413
+ 401: 'Missing or invalid authentication'
3414
+ }
2666
3415
  });
2667
3416
  }
2668
3417
 
2669
3418
  /**
2670
- * Match platforms by name or alias
3419
+ * Check if provider is supported
3420
+ * Returns whether a specific provider is supported.
2671
3421
  * @param data The data for the request.
2672
- * @param data.q Search query — Chinese name, English name, or abbreviation
2673
- * @param data.region Region code for category override lookup
2674
- * @returns unknown List of matching platforms with suggested segment names
3422
+ * @param data.providerName Provider name to check
3423
+ * @param data.region Region code for tenant context
3424
+ * @returns unknown Provider support status
2675
3425
  * @throws ApiError
2676
3426
  */
2677
- public static platformControllerMatchPlatforms(
2678
- data: PlatformControllerMatchPlatformsData
2679
- ): CancelablePromise<PlatformControllerMatchPlatformsResponse> {
3427
+ public static providerSyncControllerIsProviderSupported(
3428
+ data: ProviderSyncControllerIsProviderSupportedData
3429
+ ): CancelablePromise<ProviderSyncControllerIsProviderSupportedResponse> {
2680
3430
  return __request(OpenAPI, {
2681
3431
  method: 'GET',
2682
- url: '/api/v1/bean/platforms/match',
2683
- query: {
2684
- q: data.q,
3432
+ url: '/api/v1/{region}/bean/import/provider/{providerName}/supported',
3433
+ path: {
3434
+ providerName: data.providerName,
2685
3435
  region: data.region
3436
+ },
3437
+ errors: {
3438
+ 401: 'Missing or invalid authentication'
2686
3439
  }
2687
3440
  });
2688
3441
  }
3442
+ }
2689
3443
 
3444
+ export class ExternalAccountLinksService {
2690
3445
  /**
2691
- * Update a platform
3446
+ * Create an external account → BeanAccount mapping (ADR-0113)
2692
3447
  * @param data The data for the request.
2693
- * @param data.id Platform ID
3448
+ * @param data.region Region code for tenant context
2694
3449
  * @param data.requestBody
2695
- * @returns unknown Platform updated successfully
3450
+ * @returns ExternalAccountLinkResponseDto Link created.
2696
3451
  * @throws ApiError
2697
3452
  */
2698
- public static platformControllerUpdate(
2699
- data: PlatformControllerUpdateData
2700
- ): CancelablePromise<PlatformControllerUpdateResponse> {
3453
+ public static externalAccountLinkControllerCreate(
3454
+ data: ExternalAccountLinkControllerCreateData
3455
+ ): CancelablePromise<ExternalAccountLinkControllerCreateResponse> {
2701
3456
  return __request(OpenAPI, {
2702
- method: 'PUT',
2703
- url: '/api/v1/bean/platforms/{id}',
3457
+ method: 'POST',
3458
+ url: '/api/v1/{region}/bean/external-account-links',
2704
3459
  path: {
2705
- id: data.id
3460
+ region: data.region
2706
3461
  },
2707
3462
  body: data.requestBody,
2708
3463
  mediaType: 'application/json',
2709
3464
  errors: {
2710
- 404: 'Platform not found'
3465
+ 422: 'beanAccountId not owned, or an active link already exists.'
2711
3466
  }
2712
3467
  });
2713
3468
  }
2714
3469
 
2715
3470
  /**
2716
- * Delete a platform
3471
+ * List the user's active external account links
2717
3472
  * @param data The data for the request.
2718
- * @param data.id Platform ID
2719
- * @returns void Platform deleted successfully
3473
+ * @param data.provider
3474
+ * @param data.region Region code for tenant context
3475
+ * @returns ExternalAccountLinkListResponseDto Links retrieved.
2720
3476
  * @throws ApiError
2721
3477
  */
2722
- public static platformControllerDelete(
2723
- data: PlatformControllerDeleteData
2724
- ): CancelablePromise<PlatformControllerDeleteResponse> {
3478
+ public static externalAccountLinkControllerFindAll(
3479
+ data: ExternalAccountLinkControllerFindAllData
3480
+ ): CancelablePromise<ExternalAccountLinkControllerFindAllResponse> {
2725
3481
  return __request(OpenAPI, {
2726
- method: 'DELETE',
2727
- url: '/api/v1/bean/platforms/{id}',
3482
+ method: 'GET',
3483
+ url: '/api/v1/{region}/bean/external-account-links',
2728
3484
  path: {
2729
- id: data.id
3485
+ region: data.region
2730
3486
  },
2731
- errors: {
2732
- 404: 'Platform not found'
3487
+ query: {
3488
+ provider: data.provider
2733
3489
  }
2734
3490
  });
2735
3491
  }
2736
- }
2737
3492
 
2738
- export class ProviderSyncService {
2739
3493
  /**
2740
- * Sync transactions from financial data provider
2741
- *
2742
- * Accepts raw transactions from external financial data providers, transforms them to Beancount format, and processes them through the ingestion pipeline.
2743
- *
2744
- * **Supported Providers:**
2745
- * - **plaid**: Plaid API (US, Canada, Europe)
2746
- * - **teller**: Teller API (US)
2747
- * - **truelayer**: TrueLayer Open Banking (UK, Europe)
2748
- * - **gocardless**: GoCardless Bank Account Data (Europe)
2749
- * - **simplefin**: SimpleFIN (Self-hosted)
2750
- * - **yodlee**: Yodlee (Global)
2751
- * - **beancount-direct**: Beancount format transactions
2752
- * - **parsed-bill**: Client-side parsed bill transactions
2753
- *
2754
- * **Processing Flow:**
2755
- * 1. Transform raw data via provider adapter
2756
- * 2. Validate transaction format
2757
- * 3. Deduplicate using originalId
2758
- * 4. Classify using rule engine
2759
- * 5. Route low-confidence to Review Center
2760
- * 6. Persist validated transactions
2761
- *
3494
+ * Get a single external account link
2762
3495
  * @param data The data for the request.
2763
- * @param data.providerName Provider name
2764
- * @param data.region Region code
2765
- * @param data.requestBody
2766
- * @returns ProviderSyncResponseDto Sync completed successfully
3496
+ * @param data.id
3497
+ * @param data.region Region code for tenant context
3498
+ * @returns ExternalAccountLinkResponseDto Link retrieved.
2767
3499
  * @throws ApiError
2768
3500
  */
2769
- public static providerSyncControllerSync(
2770
- data: ProviderSyncControllerSyncData
2771
- ): CancelablePromise<ProviderSyncControllerSyncResponse> {
3501
+ public static externalAccountLinkControllerFindOne(
3502
+ data: ExternalAccountLinkControllerFindOneData
3503
+ ): CancelablePromise<ExternalAccountLinkControllerFindOneResponse> {
2772
3504
  return __request(OpenAPI, {
2773
- method: 'POST',
2774
- url: '/api/v1/{region}/bean/import/provider/{providerName}/sync',
3505
+ method: 'GET',
3506
+ url: '/api/v1/{region}/bean/external-account-links/{id}',
2775
3507
  path: {
2776
- providerName: data.providerName,
3508
+ id: data.id,
2777
3509
  region: data.region
2778
3510
  },
2779
- body: data.requestBody,
2780
- mediaType: 'application/json',
2781
3511
  errors: {
2782
- 400: 'Invalid request data',
2783
- 401: 'Missing or invalid authentication',
2784
- 404: 'Provider not supported'
3512
+ 422: 'Link not found or not owned by the user.'
2785
3513
  }
2786
3514
  });
2787
3515
  }
2788
3516
 
2789
3517
  /**
2790
- * Get supported providers
2791
- * Returns a list of all providers supported by the sync endpoint.
3518
+ * Soft-delete (disconnect) an external account link
2792
3519
  * @param data The data for the request.
3520
+ * @param data.id
2793
3521
  * @param data.region Region code for tenant context
2794
- * @returns SupportedProvidersResponseDto List of supported providers
3522
+ * @returns void Link soft-deleted; historical transactions are unaffected.
2795
3523
  * @throws ApiError
2796
3524
  */
2797
- public static providerSyncControllerGetSupportedProviders(
2798
- data: ProviderSyncControllerGetSupportedProvidersData
2799
- ): CancelablePromise<ProviderSyncControllerGetSupportedProvidersResponse> {
3525
+ public static externalAccountLinkControllerRemove(
3526
+ data: ExternalAccountLinkControllerRemoveData
3527
+ ): CancelablePromise<ExternalAccountLinkControllerRemoveResponse> {
2800
3528
  return __request(OpenAPI, {
2801
- method: 'GET',
2802
- url: '/api/v1/{region}/bean/import/provider/supported',
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
+
3539
+ export class ImportTelemetryService {
3540
+ /**
3541
+ * Receive anonymous parser failure telemetry
3542
+ * @param data The data for the request.
3543
+ * @param data.region Region code for tenant context
3544
+ * @param data.requestBody
3545
+ * @returns unknown Telemetry report received
3546
+ * @throws ApiError
3547
+ */
3548
+ public static telemetryControllerReportTelemetry(
3549
+ data: TelemetryControllerReportTelemetryData
3550
+ ): CancelablePromise<TelemetryControllerReportTelemetryResponse> {
3551
+ return __request(OpenAPI, {
3552
+ method: 'POST',
3553
+ url: '/api/v1/{region}/bean/import/parser-telemetry',
2803
3554
  path: {
2804
3555
  region: data.region
2805
3556
  },
3557
+ body: data.requestBody,
3558
+ mediaType: 'application/json',
2806
3559
  errors: {
2807
- 401: 'Missing or invalid authentication'
3560
+ 401: 'Unauthorized'
2808
3561
  }
2809
3562
  });
2810
3563
  }
2811
3564
 
2812
3565
  /**
2813
- * Check if provider is supported
2814
- * Returns whether a specific provider is supported.
3566
+ * Receive anonymous zero-hit coverage miss report
2815
3567
  * @param data The data for the request.
2816
- * @param data.providerName Provider name to check
2817
3568
  * @param data.region Region code for tenant context
2818
- * @returns unknown Provider support status
3569
+ * @param data.requestBody
3570
+ * @returns unknown Coverage miss report received
2819
3571
  * @throws ApiError
2820
3572
  */
2821
- public static providerSyncControllerIsProviderSupported(
2822
- data: ProviderSyncControllerIsProviderSupportedData
2823
- ): CancelablePromise<ProviderSyncControllerIsProviderSupportedResponse> {
3573
+ public static telemetryControllerReportCoverageMiss(
3574
+ data: TelemetryControllerReportCoverageMissData
3575
+ ): CancelablePromise<TelemetryControllerReportCoverageMissResponse> {
2824
3576
  return __request(OpenAPI, {
2825
- method: 'GET',
2826
- url: '/api/v1/{region}/bean/import/provider/{providerName}/supported',
3577
+ method: 'POST',
3578
+ url: '/api/v1/{region}/bean/import/parser-coverage-miss',
2827
3579
  path: {
2828
- providerName: data.providerName,
2829
3580
  region: data.region
2830
3581
  },
3582
+ body: data.requestBody,
3583
+ mediaType: 'application/json',
2831
3584
  errors: {
2832
- 401: 'Missing or invalid authentication'
3585
+ 401: 'Unauthorized'
2833
3586
  }
2834
3587
  });
2835
3588
  }
2836
- }
2837
3589
 
2838
- export class ImportTelemetryService {
2839
3590
  /**
2840
- * Receive anonymous parser failure telemetry
3591
+ * Coverage metrics (uncovered format aggregation)
2841
3592
  * @param data The data for the request.
2842
3593
  * @param data.region Region code for tenant context
2843
- * @param data.requestBody
2844
- * @returns unknown Telemetry report received
3594
+ * @param data.topN Top-N uncovered formats (default 10)
3595
+ * @returns unknown Coverage metrics
2845
3596
  * @throws ApiError
2846
3597
  */
2847
- public static telemetryControllerReportTelemetry(
2848
- data: TelemetryControllerReportTelemetryData
2849
- ): CancelablePromise<TelemetryControllerReportTelemetryResponse> {
3598
+ public static telemetryControllerGetCoverageMetrics(
3599
+ data: TelemetryControllerGetCoverageMetricsData
3600
+ ): CancelablePromise<TelemetryControllerGetCoverageMetricsResponse> {
2850
3601
  return __request(OpenAPI, {
2851
- method: 'POST',
2852
- url: '/api/v1/{region}/bean/import/parser-telemetry',
3602
+ method: 'GET',
3603
+ url: '/api/v1/{region}/bean/import/parser-coverage-metrics',
2853
3604
  path: {
2854
3605
  region: data.region
2855
3606
  },
2856
- body: data.requestBody,
2857
- mediaType: 'application/json',
2858
- errors: {
2859
- 401: 'Unauthorized'
3607
+ query: {
3608
+ topN: data.topN
2860
3609
  }
2861
3610
  });
2862
3611
  }
@@ -2945,6 +3694,121 @@ export class BeanNlpService {
2945
3694
  }
2946
3695
  }
2947
3696
 
3697
+ export class BeanPlatformsService {
3698
+ /**
3699
+ * Get all platforms with statistics
3700
+ * @returns unknown List of platforms with binding and account counts
3701
+ * @throws ApiError
3702
+ */
3703
+ public static platformControllerFindAll(): CancelablePromise<PlatformControllerFindAllResponse> {
3704
+ return __request(OpenAPI, {
3705
+ method: 'GET',
3706
+ url: '/api/v1/bean/platforms'
3707
+ });
3708
+ }
3709
+
3710
+ /**
3711
+ * Create a new platform
3712
+ * @param data The data for the request.
3713
+ * @param data.requestBody
3714
+ * @returns unknown Platform created successfully
3715
+ * @throws ApiError
3716
+ */
3717
+ public static platformControllerCreate(
3718
+ data: PlatformControllerCreateData
3719
+ ): CancelablePromise<PlatformControllerCreateResponse> {
3720
+ return __request(OpenAPI, {
3721
+ method: 'POST',
3722
+ url: '/api/v1/bean/platforms',
3723
+ body: data.requestBody,
3724
+ mediaType: 'application/json',
3725
+ errors: {
3726
+ 409: 'Platform already exists'
3727
+ }
3728
+ });
3729
+ }
3730
+
3731
+ /**
3732
+ * Get platform list for current user
3733
+ * @returns PlatformListItemDto List of platforms with user binding status
3734
+ * @throws ApiError
3735
+ */
3736
+ public static platformControllerGetPlatformList(): CancelablePromise<PlatformControllerGetPlatformListResponse> {
3737
+ return __request(OpenAPI, {
3738
+ method: 'GET',
3739
+ url: '/api/v1/bean/platforms/list'
3740
+ });
3741
+ }
3742
+
3743
+ /**
3744
+ * Match platforms by name or alias
3745
+ * @param data The data for the request.
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
3749
+ * @throws ApiError
3750
+ */
3751
+ public static platformControllerMatchPlatforms(
3752
+ data: PlatformControllerMatchPlatformsData
3753
+ ): CancelablePromise<PlatformControllerMatchPlatformsResponse> {
3754
+ return __request(OpenAPI, {
3755
+ method: 'GET',
3756
+ url: '/api/v1/bean/platforms/match',
3757
+ query: {
3758
+ q: data.q,
3759
+ region: data.region
3760
+ }
3761
+ });
3762
+ }
3763
+
3764
+ /**
3765
+ * Update a platform
3766
+ * @param data The data for the request.
3767
+ * @param data.id Platform ID
3768
+ * @param data.requestBody
3769
+ * @returns unknown Platform updated successfully
3770
+ * @throws ApiError
3771
+ */
3772
+ public static platformControllerUpdate(
3773
+ data: PlatformControllerUpdateData
3774
+ ): CancelablePromise<PlatformControllerUpdateResponse> {
3775
+ return __request(OpenAPI, {
3776
+ method: 'PUT',
3777
+ url: '/api/v1/bean/platforms/{id}',
3778
+ path: {
3779
+ id: data.id
3780
+ },
3781
+ body: data.requestBody,
3782
+ mediaType: 'application/json',
3783
+ errors: {
3784
+ 404: 'Platform not found'
3785
+ }
3786
+ });
3787
+ }
3788
+
3789
+ /**
3790
+ * Delete a platform
3791
+ * @param data The data for the request.
3792
+ * @param data.id Platform ID
3793
+ * @returns void Platform deleted successfully
3794
+ * @throws ApiError
3795
+ */
3796
+ public static platformControllerDelete(
3797
+ data: PlatformControllerDeleteData
3798
+ ): CancelablePromise<PlatformControllerDeleteResponse> {
3799
+ return __request(OpenAPI, {
3800
+ method: 'DELETE',
3801
+ url: '/api/v1/bean/platforms/{id}',
3802
+ path: {
3803
+ id: data.id
3804
+ },
3805
+ errors: {
3806
+ 404: 'Platform not found'
3807
+ }
3808
+ });
3809
+ }
3810
+ }
3811
+
2948
3812
  export class DashboardService {
2949
3813
  /**
2950
3814
  * Get net worth overview
@@ -2980,6 +3844,7 @@ export class DashboardService {
2980
3844
  * @param data.region Region code for tenant context
2981
3845
  * @param data.groupBy Grouping strategy
2982
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)
2983
3848
  * @returns unknown Accounts retrieved successfully. Response type depends on groupBy parameter.
2984
3849
  * @throws ApiError
2985
3850
  */
@@ -2994,7 +3859,8 @@ export class DashboardService {
2994
3859
  },
2995
3860
  query: {
2996
3861
  groupBy: data.groupBy,
2997
- date: data.date
3862
+ date: data.date,
3863
+ accountId: data.accountId
2998
3864
  },
2999
3865
  errors: {
3000
3866
  401: 'User not authenticated'
@@ -3029,124 +3895,69 @@ export class DashboardService {
3029
3895
  }
3030
3896
  });
3031
3897
  }
3032
- }
3033
3898
 
3034
- export class ReportingService {
3035
3899
  /**
3036
- * Get portfolio value trends
3037
- *
3038
- * Returns time series data of portfolio net worth.
3039
- *
3040
- * **Multi-currency Support:**
3041
- * - `series[].byCurrency` - Currency breakdown for each data point
3042
- * - `byCurrency` - Separate time series grouped by currency
3043
- * - `warnings` - Exchange rate warnings if conversion failed
3044
- *
3045
- * **Parameters:**
3046
- * - `period`: Time period (1m, 3m, 6m, 1y)
3047
- * - `granularity`: Data granularity (day, week, month)
3048
- *
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)
3049
3902
  * @param data The data for the request.
3050
3903
  * @param data.region Region code for tenant context
3051
- * @param data.period Time period
3052
- * @param data.granularity Data granularity
3053
- * @returns PortfolioTrendsResponseDto Trends retrieved 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
3054
3908
  * @throws ApiError
3055
3909
  */
3056
- public static reportingControllerGetPortfolioTrends(
3057
- data: ReportingControllerGetPortfolioTrendsData
3058
- ): CancelablePromise<ReportingControllerGetPortfolioTrendsResponse> {
3910
+ public static dashboardControllerGetExpenses(
3911
+ data: DashboardControllerGetExpensesData
3912
+ ): CancelablePromise<DashboardControllerGetExpensesResponse> {
3059
3913
  return __request(OpenAPI, {
3060
3914
  method: 'GET',
3061
- url: '/api/v1/{region}/reporting/portfolio/trends',
3915
+ url: '/api/v1/{region}/dashboard/expenses',
3062
3916
  path: {
3063
3917
  region: data.region
3064
3918
  },
3065
3919
  query: {
3920
+ groupBy: data.groupBy,
3066
3921
  period: data.period,
3067
- granularity: data.granularity
3922
+ flow: data.flow
3068
3923
  },
3069
3924
  errors: {
3925
+ 400: 'Invalid groupBy or period',
3070
3926
  401: 'User not authenticated'
3071
3927
  }
3072
3928
  });
3073
3929
  }
3930
+ }
3074
3931
 
3932
+ export class InvestmentService {
3075
3933
  /**
3076
- * Generate portfolio snapshot
3077
- *
3078
- * Manually generate a portfolio snapshot for a specific date.
3079
- *
3080
- * **Multi-currency Support:**
3081
- * - Fetches balances grouped by currency
3082
- * - Uses user's baseCurrency setting for conversion
3083
- * - Stores exchange rates and warnings
3084
- *
3085
- * **Use Cases:**
3086
- * - Testing snapshot generation
3087
- * - Force regeneration after data correction
3088
- * - Initial setup for new users
3089
- *
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).
3090
3936
  * @param data The data for the request.
3091
3937
  * @param data.region Region code for tenant context
3092
- * @param data.requestBody Optional date (defaults to today)
3093
- * @returns GenerateSnapshotResponse Snapshot generated 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
3094
3942
  * @throws ApiError
3095
3943
  */
3096
- public static reportingControllerGenerateSnapshot(
3097
- data: ReportingControllerGenerateSnapshotData
3098
- ): CancelablePromise<ReportingControllerGenerateSnapshotResponse> {
3944
+ public static holdingPnlControllerGetHoldingPnl(
3945
+ data: HoldingPnlControllerGetHoldingPnlData
3946
+ ): CancelablePromise<HoldingPnlControllerGetHoldingPnlResponse> {
3099
3947
  return __request(OpenAPI, {
3100
- method: 'POST',
3101
- url: '/api/v1/{region}/reporting/snapshots/generate',
3948
+ method: 'GET',
3949
+ url: '/api/v1/{region}/investment/holdings/pnl',
3102
3950
  path: {
3103
3951
  region: data.region
3104
3952
  },
3105
- body: data.requestBody,
3106
- mediaType: 'application/json',
3107
- errors: {
3108
- 400: 'Invalid date format',
3109
- 401: 'User not authenticated'
3110
- }
3111
- });
3112
- }
3113
-
3114
- /**
3115
- * Backfill portfolio snapshots
3116
- *
3117
- * Generate snapshots for a date range (historical data backfill).
3118
- *
3119
- * **Multi-currency Support:**
3120
- * - Each snapshot includes multi-currency data
3121
- * - Uses exchange rates available at generation time
3122
- * - Warnings stored for missing exchange rates
3123
- *
3124
- * **Best Practices:**
3125
- * - Use for initial setup after account configuration
3126
- * - Run during low-traffic periods for large date ranges
3127
- * - Existing snapshots are skipped (not regenerated)
3128
- *
3129
- * @param data The data for the request.
3130
- * @param data.region Region code for tenant context
3131
- * @param data.requestBody
3132
- * @returns BackfillSnapshotsResponse Backfill completed successfully
3133
- * @throws ApiError
3134
- */
3135
- public static reportingControllerBackfillSnapshots(
3136
- data: ReportingControllerBackfillSnapshotsData
3137
- ): CancelablePromise<ReportingControllerBackfillSnapshotsResponse> {
3138
- return __request(OpenAPI, {
3139
- method: 'POST',
3140
- url: '/api/v1/{region}/reporting/snapshots/backfill',
3141
- path: {
3142
- region: data.region
3953
+ query: {
3954
+ asOf: data.asOf,
3955
+ accountId: data.accountId,
3956
+ method: data.method
3143
3957
  },
3144
- body: data.requestBody,
3145
- mediaType: 'application/json',
3146
3958
  errors: {
3147
- 400: 'Invalid date format or range',
3148
- 401: 'User not authenticated',
3149
- 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'
3150
3961
  }
3151
3962
  });
3152
3963
  }
@@ -3175,7 +3986,7 @@ export class AuthService {
3175
3986
  * Anonymous login with access token
3176
3987
  * @param data The data for the request.
3177
3988
  * @param data.requestBody
3178
- * @returns unknown Login successful
3989
+ * @returns AnonymousLoginResponseDto Login successful
3179
3990
  * @throws ApiError
3180
3991
  */
3181
3992
  public static authControllerAccessTokenLogin(
@@ -3362,3 +4173,53 @@ export class InfoService {
3362
4173
  });
3363
4174
  }
3364
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
+ }