@firela/api-types 0.0.0-canary.6a42fd0e → 0.0.0-canary.6af2ffd3

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,14 @@ import type {
97
99
  CommodityControllerGetOrCreateResponse,
98
100
  CommodityControllerBulkCreateData,
99
101
  CommodityControllerBulkCreateResponse,
102
+ ReportingControllerGetPortfolioTrendsData,
103
+ ReportingControllerGetPortfolioTrendsResponse,
104
+ ReportingControllerGetCashFlowTrendsData,
105
+ ReportingControllerGetCashFlowTrendsResponse,
106
+ ReportingControllerGenerateSnapshotData,
107
+ ReportingControllerGenerateSnapshotResponse,
108
+ ReportingControllerBackfillSnapshotsData,
109
+ ReportingControllerBackfillSnapshotsResponse,
100
110
  PriceControllerCreateData,
101
111
  PriceControllerCreateResponse,
102
112
  PriceControllerFindAllData,
@@ -109,6 +119,28 @@ import type {
109
119
  PriceControllerDeleteResponse,
110
120
  PriceControllerBulkCreateData,
111
121
  PriceControllerBulkCreateResponse,
122
+ UserControllerDeleteOwnUserData,
123
+ UserControllerDeleteOwnUserResponse,
124
+ UserControllerGetUserData,
125
+ UserControllerGetUserResponse,
126
+ UserControllerSignupUserData,
127
+ UserControllerSignupUserResponse,
128
+ UserControllerDeleteUserData,
129
+ UserControllerDeleteUserResponse,
130
+ UserControllerGetUserInfoData,
131
+ UserControllerGetUserInfoResponse,
132
+ UserControllerUpdateUserSettingData,
133
+ UserControllerUpdateUserSettingResponse,
134
+ UserControllerGetAllUserSettingsByPageData,
135
+ UserControllerGetAllUserSettingsByPageResponse,
136
+ UserControllerGetAssetLiabilitySummaryResponse,
137
+ PropertyControllerGetAllResponse,
138
+ PropertyControllerGetByKeyData,
139
+ PropertyControllerGetByKeyResponse,
140
+ PropertyControllerUpdateData,
141
+ PropertyControllerUpdateResponse,
142
+ PropertyControllerDeleteData,
143
+ PropertyControllerDeleteResponse,
112
144
  RecurringRuleControllerCreateData,
113
145
  RecurringRuleControllerCreateResponse,
114
146
  RecurringRuleControllerFindAllData,
@@ -161,28 +193,8 @@ import type {
161
193
  TransactionRuleControllerDeleteResponse,
162
194
  TransactionRuleControllerTestData,
163
195
  TransactionRuleControllerTestResponse,
164
- UserControllerDeleteOwnUserData,
165
- UserControllerDeleteOwnUserResponse,
166
- UserControllerGetUserData,
167
- UserControllerGetUserResponse,
168
- UserControllerSignupUserData,
169
- UserControllerSignupUserResponse,
170
- UserControllerDeleteUserData,
171
- UserControllerDeleteUserResponse,
172
- UserControllerGetUserInfoData,
173
- UserControllerGetUserInfoResponse,
174
- UserControllerUpdateUserSettingData,
175
- UserControllerUpdateUserSettingResponse,
176
- UserControllerGetAllUserSettingsByPageData,
177
- UserControllerGetAllUserSettingsByPageResponse,
178
- UserControllerGetAssetLiabilitySummaryResponse,
179
- PropertyControllerGetAllResponse,
180
- PropertyControllerGetByKeyData,
181
- PropertyControllerGetByKeyResponse,
182
- PropertyControllerUpdateData,
183
- PropertyControllerUpdateResponse,
184
- PropertyControllerDeleteData,
185
- PropertyControllerDeleteResponse,
196
+ CategoryCatalogControllerListData,
197
+ CategoryCatalogControllerListResponse,
186
198
  EventControllerCreateData,
187
199
  EventControllerCreateResponse,
188
200
  EventControllerFindAllData,
@@ -195,6 +207,8 @@ import type {
195
207
  EventControllerDeleteResponse,
196
208
  EventControllerGetSliceData,
197
209
  EventControllerGetSliceResponse,
210
+ OnboardingControllerBootstrapData,
211
+ OnboardingControllerBootstrapResponse,
198
212
  ReconciliationControllerComputeData,
199
213
  ReconciliationControllerComputeResponse,
200
214
  ReconciliationControllerAssertData,
@@ -216,22 +230,20 @@ import type {
216
230
  ImporterConfigControllerUpdateConfigResponse,
217
231
  ImporterConfigControllerResetConfigData,
218
232
  ImporterConfigControllerResetConfigResponse,
219
- PlatformControllerFindAllResponse,
220
- PlatformControllerCreateData,
221
- PlatformControllerCreateResponse,
222
- PlatformControllerGetPlatformListResponse,
223
- PlatformControllerMatchPlatformsData,
224
- PlatformControllerMatchPlatformsResponse,
225
- PlatformControllerUpdateData,
226
- PlatformControllerUpdateResponse,
227
- PlatformControllerDeleteData,
228
- PlatformControllerDeleteResponse,
229
233
  ProviderSyncControllerSyncData,
230
234
  ProviderSyncControllerSyncResponse,
231
235
  ProviderSyncControllerGetSupportedProvidersData,
232
236
  ProviderSyncControllerGetSupportedProvidersResponse,
233
237
  ProviderSyncControllerIsProviderSupportedData,
234
238
  ProviderSyncControllerIsProviderSupportedResponse,
239
+ ExternalAccountLinkControllerCreateData,
240
+ ExternalAccountLinkControllerCreateResponse,
241
+ ExternalAccountLinkControllerFindAllData,
242
+ ExternalAccountLinkControllerFindAllResponse,
243
+ ExternalAccountLinkControllerFindOneData,
244
+ ExternalAccountLinkControllerFindOneResponse,
245
+ ExternalAccountLinkControllerRemoveData,
246
+ ExternalAccountLinkControllerRemoveResponse,
235
247
  TelemetryControllerReportTelemetryData,
236
248
  TelemetryControllerReportTelemetryResponse,
237
249
  TelemetryControllerReportCoverageMissData,
@@ -244,6 +256,19 @@ import type {
244
256
  NlpControllerClearSessionResponse,
245
257
  NlpControllerGetSessionData,
246
258
  NlpControllerGetSessionResponse,
259
+ PlatformControllerFindAllResponse,
260
+ PlatformControllerCreateData,
261
+ PlatformControllerCreateResponse,
262
+ PlatformControllerGetPlatformListData,
263
+ PlatformControllerGetPlatformListResponse,
264
+ PlatformControllerMatchPlatformsData,
265
+ PlatformControllerMatchPlatformsResponse,
266
+ PlatformControllerGetPlatformStandardsData,
267
+ PlatformControllerGetPlatformStandardsResponse,
268
+ PlatformControllerUpdateData,
269
+ PlatformControllerUpdateResponse,
270
+ PlatformControllerDeleteData,
271
+ PlatformControllerDeleteResponse,
247
272
  DashboardControllerGetNetWorthData,
248
273
  DashboardControllerGetNetWorthResponse,
249
274
  DashboardControllerGetAccountsData,
@@ -254,17 +279,11 @@ import type {
254
279
  DashboardControllerGetExpensesResponse,
255
280
  HoldingPnlControllerGetHoldingPnlData,
256
281
  HoldingPnlControllerGetHoldingPnlResponse,
257
- ReportingControllerGetPortfolioTrendsData,
258
- ReportingControllerGetPortfolioTrendsResponse,
259
- ReportingControllerGetCashFlowTrendsData,
260
- ReportingControllerGetCashFlowTrendsResponse,
261
- ReportingControllerGenerateSnapshotData,
262
- ReportingControllerGenerateSnapshotResponse,
263
- ReportingControllerBackfillSnapshotsData,
264
- ReportingControllerBackfillSnapshotsResponse,
265
282
  ApiKeysControllerCreateApiKeyResponse,
266
283
  AuthControllerAccessTokenLoginData,
267
284
  AuthControllerAccessTokenLoginResponse,
285
+ ParserContributionControllerCreateData,
286
+ ParserContributionControllerCreateResponse,
268
287
  CacheControllerFlushCacheResponse,
269
288
  ExchangeRateControllerGetExchangeRateData,
270
289
  ExchangeRateControllerGetExchangeRateResponse,
@@ -276,7 +295,11 @@ import type {
276
295
  HealthControllerResetCircuitBreakerData,
277
296
  HealthControllerResetCircuitBreakerResponse,
278
297
  HealthControllerGetMetricsResponse,
279
- InfoControllerGetInfoResponse
298
+ InfoControllerGetInfoResponse,
299
+ SymbolControllerSearchData,
300
+ SymbolControllerSearchResponse,
301
+ SymbolControllerGetQuoteData,
302
+ SymbolControllerGetQuoteResponse
280
303
  } from './types.gen';
281
304
 
282
305
  export class BeanAccountsService {
@@ -314,7 +337,7 @@ export class BeanAccountsService {
314
337
  * @param data.type Filter by account type
315
338
  * @param data.status Filter by status
316
339
  * @param data.isCustom Filter by custom (user-created) accounts only
317
- * @param data.search Search term for path or i18nKey
340
+ * @param data.search Search term matched against account path and user-set display name (case-insensitive)
318
341
  * @param data.limit Maximum number of results
319
342
  * @param data.offset Number of results to skip
320
343
  * @returns AccountListResponseDto Accounts retrieved successfully
@@ -395,7 +418,7 @@ export class BeanAccountsService {
395
418
 
396
419
  /**
397
420
  * Delete account
398
- * Deletes an account (only if no transactions)
421
+ * Deletes an account (only if no active transactions; voided/superseded residual postings are cleaned up)
399
422
  * @param data The data for the request.
400
423
  * @param data.id Account UUID
401
424
  * @param data.region Region code for tenant context
@@ -414,7 +437,7 @@ export class BeanAccountsService {
414
437
  },
415
438
  errors: {
416
439
  404: 'Account not found',
417
- 409: 'Account has transactions and cannot be deleted'
440
+ 409: 'Account has active transactions and cannot be deleted'
418
441
  }
419
442
  });
420
443
  }
@@ -476,16 +499,45 @@ export class BeanAccountsService {
476
499
  }
477
500
  });
478
501
  }
502
+
503
+ /**
504
+ * Post an opening-balance transaction
505
+ * 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.
506
+ * @param data The data for the request.
507
+ * @param data.id Account UUID
508
+ * @param data.region Region code for tenant context
509
+ * @param data.requestBody
510
+ * @returns OpeningBalanceResultDto Opening-balance transaction created
511
+ * @throws ApiError
512
+ */
513
+ public static accountControllerAddOpeningBalance(
514
+ data: AccountControllerAddOpeningBalanceData
515
+ ): CancelablePromise<AccountControllerAddOpeningBalanceResponse> {
516
+ return __request(OpenAPI, {
517
+ method: 'POST',
518
+ url: '/api/v1/{region}/bean/accounts/{id}/opening-balance',
519
+ path: {
520
+ id: data.id,
521
+ region: data.region
522
+ },
523
+ body: data.requestBody,
524
+ mediaType: 'application/json',
525
+ errors: {
526
+ 404: 'Account not found',
527
+ 409: 'An opening balance already exists for this account'
528
+ }
529
+ });
530
+ }
479
531
  }
480
532
 
481
533
  export class BeanAccountStandardsService {
482
534
  /**
483
535
  * Get account templates
484
- * Returns predefined account templates for a region. Supports filtering by account type and search term.
536
+ * Returns predefined account templates for a region. Supports filtering by account type and search term. Not-yet-open region codes return the universal-only catalog (#759).
485
537
  * @param data The data for the request.
486
- * @param data.region Region code (cn, us, de)
538
+ * @param data.region Region code (any ISO alpha-2; not-yet-open codes return the universal-only catalog)
487
539
  * @param data.type Filter by account type
488
- * @param data.search Search term for path or description
540
+ * @param data.search Search term for path, description, aliases, or localized display name
489
541
  * @returns AccountStandardListResponseDto Account templates retrieved successfully
490
542
  * @throws ApiError
491
543
  */
@@ -507,9 +559,9 @@ export class BeanAccountStandardsService {
507
559
 
508
560
  /**
509
561
  * Get template metadata for an account path
510
- * Returns extendable status and root type for a template path.
562
+ * Returns root type for a template path.
511
563
  * @param data The data for the request.
512
- * @param data.region Region code for tenant context
564
+ * @param data.region Region code for tenant context. Not-yet-open codes degrade to the universal-only catalog (#759)
513
565
  * @param data.path Account path to check
514
566
  * @returns TemplateMetadataResponseDto Template metadata retrieved successfully
515
567
  * @throws ApiError
@@ -531,9 +583,9 @@ export class BeanAccountStandardsService {
531
583
 
532
584
  /**
533
585
  * Get available regions with hierarchy
534
- * Returns supported regions with inheritance metadata
586
+ * Returns the full region catalog (every ISO 3166-1 entry) with an 'open' flag and inheritance metadata (#759)
535
587
  * @param data The data for the request.
536
- * @param data.region Region code for tenant context
588
+ * @param data.region Region code for tenant context. Not-yet-open codes degrade to the universal-only catalog (#759)
537
589
  * @returns RegionsMetadataResponseDto Regions metadata retrieved successfully
538
590
  * @throws ApiError
539
591
  */
@@ -590,10 +642,11 @@ export class BeanTransactionsService {
590
642
  * @param data.offset Number of items to skip (default: 0)
591
643
  * @param data.dateFrom Filter by start date (inclusive), format: YYYY-MM-DD
592
644
  * @param data.dateTo Filter by end date (inclusive), format: YYYY-MM-DD
593
- * @param data.status Filter by transaction status
645
+ * @param data.status Filter by transaction status: single value, comma-separated multi-value (e.g. VOIDED,SUPERSEDED), or ALL to include audit rows. Defaults to ACTIVE-only (ADR-0128; previously unfiltered — breaking change).
594
646
  * @param data.search Search in narration and payee fields (max 200 chars)
595
647
  * @param data.accountId Filter by account ID (transactions with postings to this account)
596
- * @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
648
+ * @param data.category Filter by ADR-0075 functional category (Group segment); matches any posting to an account whose derived Group segment equals this value. Must be accompanied by flow (ADR-0126).
649
+ * @param data.flow Required when category is present (400 otherwise) and vice versa (ADR-0126). Restricts the category account set to the flow root (income → Income:, expense → Expenses:) and drives the per-leg sign normalization of row viewpointAmount and the summary. OpenAPI cannot express conditional requiredness — the pairing is enforced at runtime.
597
650
  * @returns TransactionListResponseDto Transaction list
598
651
  * @throws ApiError
599
652
  */
@@ -614,7 +667,8 @@ export class BeanTransactionsService {
614
667
  status: data.status,
615
668
  search: data.search,
616
669
  accountId: data.accountId,
617
- category: data.category
670
+ category: data.category,
671
+ flow: data.flow
618
672
  },
619
673
  errors: {
620
674
  400: 'Validation failed',
@@ -802,7 +856,7 @@ export class BeanBalancesService {
802
856
  * Query account balance
803
857
  * Calculate account balance at a specific date for a single currency
804
858
  * @param data The data for the request.
805
- * @param data.account Account name (e.g., "Assets:Bank:Checking")
859
+ * @param data.account Account name (e.g., "Assets:Checking")
806
860
  * @param data.region Region code for tenant context
807
861
  * @param data.date Date to calculate balance at (ISO 8601 format)
808
862
  * @param data.currency Currency to query (e.g., "USD", "CNY")
@@ -1327,7 +1381,7 @@ export class AdminPayeeProfilesService {
1327
1381
  * Removes verification status by setting verifiedAt to null.
1328
1382
  * @param data The data for the request.
1329
1383
  * @param data.id Payee profile ID (UUID)
1330
- * @returns PayeeProfileResponseDto Payee profile unverified successfully
1384
+ * @returns void Payee profile unverified successfully
1331
1385
  * @throws ApiError
1332
1386
  */
1333
1387
  public static payeeProfileAdminControllerUnverify(
@@ -1523,120 +1577,277 @@ export class BeanCommoditiesService {
1523
1577
  }
1524
1578
  }
1525
1579
 
1526
- export class BeanPricesService {
1580
+ export class ReportingService {
1527
1581
  /**
1528
- * Create a new price
1529
- * Creates a new price entry for the authenticated user
1582
+ * Get portfolio value trends
1583
+ *
1584
+ * Returns time series data of portfolio net worth.
1585
+ *
1586
+ * **Multi-currency Support:**
1587
+ * - `series[].byCurrency` - Currency breakdown for each data point
1588
+ * - `byCurrency` - Separate time series grouped by currency
1589
+ * - `warnings` - Exchange rate warnings if conversion failed
1590
+ *
1591
+ * **Parameters:**
1592
+ * - `period`: Time period (1m, 3m, 6m, 1y)
1593
+ * - `granularity`: Data granularity (day, week, month)
1594
+ *
1530
1595
  * @param data The data for the request.
1531
1596
  * @param data.region Region code for tenant context
1532
- * @param data.requestBody
1533
- * @returns PriceResponseDto Price created successfully
1597
+ * @param data.period Time period
1598
+ * @param data.granularity Data granularity
1599
+ * @returns PortfolioTrendsResponseDto Trends retrieved successfully
1534
1600
  * @throws ApiError
1535
1601
  */
1536
- public static priceControllerCreate(
1537
- data: PriceControllerCreateData
1538
- ): CancelablePromise<PriceControllerCreateResponse> {
1602
+ public static reportingControllerGetPortfolioTrends(
1603
+ data: ReportingControllerGetPortfolioTrendsData
1604
+ ): CancelablePromise<ReportingControllerGetPortfolioTrendsResponse> {
1539
1605
  return __request(OpenAPI, {
1540
- method: 'POST',
1541
- url: '/api/v1/{region}/bean/prices',
1606
+ method: 'GET',
1607
+ url: '/api/v1/{region}/reporting/portfolio/trends',
1542
1608
  path: {
1543
1609
  region: data.region
1544
1610
  },
1545
- body: data.requestBody,
1546
- mediaType: 'application/json',
1611
+ query: {
1612
+ period: data.period,
1613
+ granularity: data.granularity
1614
+ },
1547
1615
  errors: {
1548
- 404: 'Currency or quoteCurrency commodity not found',
1549
- 409: 'Price already exists for this currency pair and date'
1616
+ 401: 'User not authenticated'
1550
1617
  }
1551
1618
  });
1552
1619
  }
1553
1620
 
1554
1621
  /**
1555
- * List user prices
1556
- * Returns all price entries for the authenticated user with optional filtering
1622
+ * Get cash-flow trends
1623
+ *
1624
+ * Monthly income / expense / netSavings over a fixed N-month window
1625
+ * (current month + N−1 prior). Missing months are zero-filled (flow metric).
1626
+ *
1627
+ * **Parameters:**
1628
+ * - `period`: 1m | 3m | 6m | 1y (default 6m)
1629
+ * - `granularity`: accepted for API symmetry; v1 returns month buckets
1630
+ *
1557
1631
  * @param data The data for the request.
1558
1632
  * @param data.region Region code for tenant context
1559
- * @param data.currency Filter by currency (e.g., BTC, AAPL, USD)
1560
- * @param data.quoteCurrency Filter by quote currency (pricing currency, e.g., USD, CNY)
1561
- * @param data.dateFrom Filter prices from this date (ISO 8601 format)
1562
- * @param data.dateTo Filter prices to this date (ISO 8601 format)
1563
- * @param data.search Search term for currency or quoteCurrency (case-insensitive partial match)
1564
- * @param data.page Page number for pagination (default: 1)
1565
- * @param data.limit Number of items per page (default: 20, max: 100)
1566
- * @returns PriceListResponseDto Prices retrieved successfully
1633
+ * @param data.period Time period
1634
+ * @param data.granularity Data granularity (accepted for API symmetry; v1 returns month buckets)
1635
+ * @returns CashFlowTrendsResponseDto Cash-flow trends retrieved successfully
1567
1636
  * @throws ApiError
1568
1637
  */
1569
- public static priceControllerFindAll(
1570
- data: PriceControllerFindAllData
1571
- ): CancelablePromise<PriceControllerFindAllResponse> {
1638
+ public static reportingControllerGetCashFlowTrends(
1639
+ data: ReportingControllerGetCashFlowTrendsData
1640
+ ): CancelablePromise<ReportingControllerGetCashFlowTrendsResponse> {
1572
1641
  return __request(OpenAPI, {
1573
1642
  method: 'GET',
1574
- url: '/api/v1/{region}/bean/prices',
1643
+ url: '/api/v1/{region}/reporting/cash-flow/trends',
1575
1644
  path: {
1576
1645
  region: data.region
1577
1646
  },
1578
1647
  query: {
1579
- currency: data.currency,
1580
- quoteCurrency: data.quoteCurrency,
1581
- dateFrom: data.dateFrom,
1582
- dateTo: data.dateTo,
1583
- search: data.search,
1584
- page: data.page,
1585
- limit: data.limit
1648
+ period: data.period,
1649
+ granularity: data.granularity
1650
+ },
1651
+ errors: {
1652
+ 401: 'User not authenticated'
1586
1653
  }
1587
1654
  });
1588
1655
  }
1589
1656
 
1590
1657
  /**
1591
- * Get price by ID
1592
- * Returns a single price entry by its ID
1658
+ * Generate portfolio snapshot
1659
+ *
1660
+ * Manually generate a portfolio snapshot for a specific date.
1661
+ *
1662
+ * **Multi-currency Support:**
1663
+ * - Fetches balances grouped by currency
1664
+ * - Uses user's baseCurrency setting for conversion
1665
+ * - Stores exchange rates and warnings
1666
+ *
1667
+ * **Use Cases:**
1668
+ * - Testing snapshot generation
1669
+ * - Force regeneration after data correction
1670
+ * - Initial setup for new users
1671
+ *
1593
1672
  * @param data The data for the request.
1594
- * @param data.id Price ID
1595
1673
  * @param data.region Region code for tenant context
1596
- * @returns PriceResponseDto Price retrieved successfully
1674
+ * @param data.requestBody Optional date (defaults to today)
1675
+ * @returns GenerateSnapshotResponse Snapshot generated successfully
1597
1676
  * @throws ApiError
1598
1677
  */
1599
- public static priceControllerFindOne(
1600
- data: PriceControllerFindOneData
1601
- ): CancelablePromise<PriceControllerFindOneResponse> {
1678
+ public static reportingControllerGenerateSnapshot(
1679
+ data: ReportingControllerGenerateSnapshotData
1680
+ ): CancelablePromise<ReportingControllerGenerateSnapshotResponse> {
1602
1681
  return __request(OpenAPI, {
1603
- method: 'GET',
1604
- url: '/api/v1/{region}/bean/prices/{id}',
1682
+ method: 'POST',
1683
+ url: '/api/v1/{region}/reporting/snapshots/generate',
1605
1684
  path: {
1606
- id: data.id,
1607
1685
  region: data.region
1608
1686
  },
1687
+ body: data.requestBody,
1688
+ mediaType: 'application/json',
1609
1689
  errors: {
1610
- 404: 'Price not found'
1690
+ 400: 'Invalid date format',
1691
+ 401: 'User not authenticated'
1611
1692
  }
1612
1693
  });
1613
1694
  }
1614
1695
 
1615
1696
  /**
1616
- * Update a price
1617
- * Updates an existing price entry
1697
+ * Backfill portfolio snapshots
1698
+ *
1699
+ * Generate snapshots for a date range (historical data backfill).
1700
+ *
1701
+ * **Multi-currency Support:**
1702
+ * - Each snapshot includes multi-currency data
1703
+ * - Uses exchange rates available at generation time
1704
+ * - Warnings stored for missing exchange rates
1705
+ *
1706
+ * **Best Practices:**
1707
+ * - Use for initial setup after account configuration
1708
+ * - Run during low-traffic periods for large date ranges
1709
+ * - Existing snapshots are skipped (not regenerated)
1710
+ *
1618
1711
  * @param data The data for the request.
1619
- * @param data.id Price ID
1620
1712
  * @param data.region Region code for tenant context
1621
1713
  * @param data.requestBody
1622
- * @returns PriceResponseDto Price updated successfully
1714
+ * @returns BackfillSnapshotsResponse Backfill completed successfully
1623
1715
  * @throws ApiError
1624
1716
  */
1625
- public static priceControllerUpdate(
1626
- data: PriceControllerUpdateData
1627
- ): CancelablePromise<PriceControllerUpdateResponse> {
1717
+ public static reportingControllerBackfillSnapshots(
1718
+ data: ReportingControllerBackfillSnapshotsData
1719
+ ): CancelablePromise<ReportingControllerBackfillSnapshotsResponse> {
1628
1720
  return __request(OpenAPI, {
1629
- method: 'PUT',
1630
- url: '/api/v1/{region}/bean/prices/{id}',
1721
+ method: 'POST',
1722
+ url: '/api/v1/{region}/reporting/snapshots/backfill',
1631
1723
  path: {
1632
- id: data.id,
1633
1724
  region: data.region
1634
1725
  },
1635
1726
  body: data.requestBody,
1636
1727
  mediaType: 'application/json',
1637
1728
  errors: {
1638
- 404: 'Price not found',
1639
- 409: 'Updated price conflicts with existing price'
1729
+ 400: 'Invalid date format or range',
1730
+ 401: 'User not authenticated',
1731
+ 409: 'Backfill already in progress for this user'
1732
+ }
1733
+ });
1734
+ }
1735
+ }
1736
+
1737
+ export class BeanPricesService {
1738
+ /**
1739
+ * Create a new price
1740
+ * Creates a new price entry for the authenticated user
1741
+ * @param data The data for the request.
1742
+ * @param data.region Region code for tenant context
1743
+ * @param data.requestBody
1744
+ * @returns PriceResponseDto Price created successfully
1745
+ * @throws ApiError
1746
+ */
1747
+ public static priceControllerCreate(
1748
+ data: PriceControllerCreateData
1749
+ ): CancelablePromise<PriceControllerCreateResponse> {
1750
+ return __request(OpenAPI, {
1751
+ method: 'POST',
1752
+ url: '/api/v1/{region}/bean/prices',
1753
+ path: {
1754
+ region: data.region
1755
+ },
1756
+ body: data.requestBody,
1757
+ mediaType: 'application/json',
1758
+ errors: {
1759
+ 404: 'Currency or quoteCurrency commodity not found',
1760
+ 409: 'Price already exists for this currency pair and date'
1761
+ }
1762
+ });
1763
+ }
1764
+
1765
+ /**
1766
+ * List user prices
1767
+ * Returns all price entries for the authenticated user with optional filtering
1768
+ * @param data The data for the request.
1769
+ * @param data.region Region code for tenant context
1770
+ * @param data.currency Filter by currency (e.g., BTC, AAPL, USD)
1771
+ * @param data.quoteCurrency Filter by quote currency (pricing currency, e.g., USD, CNY)
1772
+ * @param data.dateFrom Filter prices from this date (ISO 8601 format)
1773
+ * @param data.dateTo Filter prices to this date (ISO 8601 format)
1774
+ * @param data.search Search term for currency or quoteCurrency (case-insensitive partial match)
1775
+ * @param data.page Page number for pagination (default: 1)
1776
+ * @param data.limit Number of items per page (default: 20, max: 100)
1777
+ * @returns PriceListResponseDto Prices retrieved successfully
1778
+ * @throws ApiError
1779
+ */
1780
+ public static priceControllerFindAll(
1781
+ data: PriceControllerFindAllData
1782
+ ): CancelablePromise<PriceControllerFindAllResponse> {
1783
+ return __request(OpenAPI, {
1784
+ method: 'GET',
1785
+ url: '/api/v1/{region}/bean/prices',
1786
+ path: {
1787
+ region: data.region
1788
+ },
1789
+ query: {
1790
+ currency: data.currency,
1791
+ quoteCurrency: data.quoteCurrency,
1792
+ dateFrom: data.dateFrom,
1793
+ dateTo: data.dateTo,
1794
+ search: data.search,
1795
+ page: data.page,
1796
+ limit: data.limit
1797
+ }
1798
+ });
1799
+ }
1800
+
1801
+ /**
1802
+ * Get price by ID
1803
+ * Returns a single price entry by its ID
1804
+ * @param data The data for the request.
1805
+ * @param data.id Price ID
1806
+ * @param data.region Region code for tenant context
1807
+ * @returns PriceResponseDto Price retrieved successfully
1808
+ * @throws ApiError
1809
+ */
1810
+ public static priceControllerFindOne(
1811
+ data: PriceControllerFindOneData
1812
+ ): CancelablePromise<PriceControllerFindOneResponse> {
1813
+ return __request(OpenAPI, {
1814
+ method: 'GET',
1815
+ url: '/api/v1/{region}/bean/prices/{id}',
1816
+ path: {
1817
+ id: data.id,
1818
+ region: data.region
1819
+ },
1820
+ errors: {
1821
+ 404: 'Price not found'
1822
+ }
1823
+ });
1824
+ }
1825
+
1826
+ /**
1827
+ * Update a price
1828
+ * Updates an existing price entry
1829
+ * @param data The data for the request.
1830
+ * @param data.id Price ID
1831
+ * @param data.region Region code for tenant context
1832
+ * @param data.requestBody
1833
+ * @returns PriceResponseDto Price updated successfully
1834
+ * @throws ApiError
1835
+ */
1836
+ public static priceControllerUpdate(
1837
+ data: PriceControllerUpdateData
1838
+ ): CancelablePromise<PriceControllerUpdateResponse> {
1839
+ return __request(OpenAPI, {
1840
+ method: 'PUT',
1841
+ url: '/api/v1/{region}/bean/prices/{id}',
1842
+ path: {
1843
+ id: data.id,
1844
+ region: data.region
1845
+ },
1846
+ body: data.requestBody,
1847
+ mediaType: 'application/json',
1848
+ errors: {
1849
+ 404: 'Price not found',
1850
+ 409: 'Updated price conflicts with existing price'
1640
1851
  }
1641
1852
  });
1642
1853
  }
@@ -1690,396 +1901,387 @@ export class BeanPricesService {
1690
1901
  }
1691
1902
  }
1692
1903
 
1693
- export class RecurringRulesService {
1904
+ export class UsersService {
1694
1905
  /**
1695
- * Create a new recurring rule
1696
- * Creates a new recurring transaction rule for the authenticated user
1906
+ * Delete own user account
1697
1907
  * @param data The data for the request.
1698
- * @param data.region Region code for tenant context
1699
1908
  * @param data.requestBody
1700
- * @returns RecurringRuleResponseDto Rule created successfully
1909
+ * @returns void User deleted successfully
1701
1910
  * @throws ApiError
1702
1911
  */
1703
- public static recurringRuleControllerCreate(
1704
- data: RecurringRuleControllerCreateData
1705
- ): CancelablePromise<RecurringRuleControllerCreateResponse> {
1912
+ public static userControllerDeleteOwnUser(
1913
+ data: UserControllerDeleteOwnUserData
1914
+ ): CancelablePromise<UserControllerDeleteOwnUserResponse> {
1706
1915
  return __request(OpenAPI, {
1707
- method: 'POST',
1708
- url: '/api/v1/{region}/bean/recurring-rules',
1709
- path: {
1710
- region: data.region
1711
- },
1916
+ method: 'DELETE',
1917
+ url: '/api/v1/users',
1712
1918
  body: data.requestBody,
1713
1919
  mediaType: 'application/json',
1714
1920
  errors: {
1715
- 400: 'Invalid input data (e.g., autoCreate without accounts)',
1716
- 409: 'Rule with same name already exists'
1921
+ 403: 'Invalid access token'
1717
1922
  }
1718
1923
  });
1719
1924
  }
1720
1925
 
1721
1926
  /**
1722
- * List recurring rules
1723
- * Returns all recurring rules for the authenticated user with optional filtering
1927
+ * Get current authenticated user
1724
1928
  * @param data The data for the request.
1725
- * @param data.region Region code for tenant context
1726
- * @param data.isActive Filter by active status
1727
- * @param data.frequency Filter by frequency (WEEKLY, MONTHLY, etc.)
1728
- * @param data.hasAutoCreate Filter by autoCreate enabled
1729
- * @returns RecurringRuleResponseDto Rules retrieved successfully
1929
+ * @param data.acceptLanguage
1930
+ * @returns UserResponseDto User retrieved successfully
1730
1931
  * @throws ApiError
1731
1932
  */
1732
- public static recurringRuleControllerFindAll(
1733
- data: RecurringRuleControllerFindAllData
1734
- ): CancelablePromise<RecurringRuleControllerFindAllResponse> {
1933
+ public static userControllerGetUser(
1934
+ data: UserControllerGetUserData
1935
+ ): CancelablePromise<UserControllerGetUserResponse> {
1735
1936
  return __request(OpenAPI, {
1736
1937
  method: 'GET',
1737
- url: '/api/v1/{region}/bean/recurring-rules',
1738
- path: {
1739
- region: data.region
1740
- },
1741
- query: {
1742
- isActive: data.isActive,
1743
- frequency: data.frequency,
1744
- hasAutoCreate: data.hasAutoCreate
1938
+ url: '/api/v1/users',
1939
+ headers: {
1940
+ 'accept-language': data.acceptLanguage
1745
1941
  }
1746
1942
  });
1747
1943
  }
1748
1944
 
1749
1945
  /**
1750
- * Create recurring rule from transaction
1751
- * Auto-creates a recurring rule using transaction data. User only confirms frequency.
1946
+ * Sign up new user
1947
+ * Create a new account with auto-generated access token. Protected by Cloudflare Turnstile to prevent automated signup (when enabled).
1752
1948
  * @param data The data for the request.
1753
- * @param data.transactionId Source transaction ID
1754
- * @param data.region Region code for tenant context
1755
1949
  * @param data.requestBody
1756
- * @returns RecurringRuleResponseDto Rule created successfully
1950
+ * @returns SignupResponseDto User created successfully
1757
1951
  * @throws ApiError
1758
1952
  */
1759
- public static recurringRuleControllerCreateFromTransaction(
1760
- data: RecurringRuleControllerCreateFromTransactionData
1761
- ): CancelablePromise<RecurringRuleControllerCreateFromTransactionResponse> {
1953
+ public static userControllerSignupUser(
1954
+ data: UserControllerSignupUserData
1955
+ ): CancelablePromise<UserControllerSignupUserResponse> {
1762
1956
  return __request(OpenAPI, {
1763
1957
  method: 'POST',
1764
- url: '/api/v1/{region}/bean/recurring-rules/from-transaction/{transactionId}',
1765
- path: {
1766
- transactionId: data.transactionId,
1767
- region: data.region
1768
- },
1958
+ url: '/api/v1/users',
1769
1959
  body: data.requestBody,
1770
1960
  mediaType: 'application/json',
1771
1961
  errors: {
1772
- 404: 'Transaction not found',
1773
- 409: 'Rule with same name already exists or transaction already linked'
1962
+ 400: 'Invalid Turnstile token (when Turnstile is enabled)',
1963
+ 403: 'User signup is disabled'
1774
1964
  }
1775
1965
  });
1776
1966
  }
1777
1967
 
1778
1968
  /**
1779
- * Get recurring rule by ID
1780
- * Returns a specific recurring rule with its details
1969
+ * Delete user by ID (admin only)
1781
1970
  * @param data The data for the request.
1782
- * @param data.id Rule ID
1783
- * @param data.region Region code for tenant context
1784
- * @returns RecurringRuleResponseDto Rule retrieved successfully
1971
+ * @param data.id User ID to delete
1972
+ * @returns void User deleted successfully
1785
1973
  * @throws ApiError
1786
1974
  */
1787
- public static recurringRuleControllerFindOne(
1788
- data: RecurringRuleControllerFindOneData
1789
- ): CancelablePromise<RecurringRuleControllerFindOneResponse> {
1975
+ public static userControllerDeleteUser(
1976
+ data: UserControllerDeleteUserData
1977
+ ): CancelablePromise<UserControllerDeleteUserResponse> {
1790
1978
  return __request(OpenAPI, {
1791
- method: 'GET',
1792
- url: '/api/v1/{region}/bean/recurring-rules/{id}',
1979
+ method: 'DELETE',
1980
+ url: '/api/v1/users/{id}',
1793
1981
  path: {
1794
- id: data.id,
1795
- region: data.region
1982
+ id: data.id
1796
1983
  },
1797
1984
  errors: {
1798
- 404: 'Rule not found'
1985
+ 403: 'Cannot delete own account or insufficient permissions'
1799
1986
  }
1800
1987
  });
1801
1988
  }
1802
1989
 
1803
1990
  /**
1804
- * Update recurring rule
1805
- * Updates an existing recurring rule
1991
+ * Get user info by user ID
1806
1992
  * @param data The data for the request.
1807
- * @param data.id Rule ID
1808
- * @param data.region Region code for tenant context
1809
- * @param data.requestBody
1810
- * @returns RecurringRuleResponseDto Rule updated successfully
1993
+ * @param data.id User ID
1994
+ * @returns unknown User info retrieved successfully
1811
1995
  * @throws ApiError
1812
1996
  */
1813
- public static recurringRuleControllerUpdate(
1814
- data: RecurringRuleControllerUpdateData
1815
- ): CancelablePromise<RecurringRuleControllerUpdateResponse> {
1997
+ public static userControllerGetUserInfo(
1998
+ data: UserControllerGetUserInfoData
1999
+ ): CancelablePromise<UserControllerGetUserInfoResponse> {
1816
2000
  return __request(OpenAPI, {
1817
- method: 'PATCH',
1818
- url: '/api/v1/{region}/bean/recurring-rules/{id}',
2001
+ method: 'GET',
2002
+ url: '/api/v1/users/{id}/info',
1819
2003
  path: {
1820
- id: data.id,
1821
- region: data.region
2004
+ id: data.id
1822
2005
  },
1823
- body: data.requestBody,
1824
- mediaType: 'application/json',
1825
2006
  errors: {
1826
- 400: 'Invalid input data',
1827
- 404: 'Rule not found'
2007
+ 403: 'Cannot access other user info without admin permission'
1828
2008
  }
1829
2009
  });
1830
2010
  }
1831
2011
 
1832
2012
  /**
1833
- * Delete recurring rule
1834
- * Soft deletes a recurring rule (sets isActive to false)
2013
+ * Update user settings
1835
2014
  * @param data The data for the request.
1836
- * @param data.id Rule ID
1837
- * @param data.region Region code for tenant context
1838
- * @returns void Rule deleted successfully
2015
+ * @param data.requestBody
2016
+ * @returns unknown Settings updated successfully
1839
2017
  * @throws ApiError
1840
2018
  */
1841
- public static recurringRuleControllerDelete(
1842
- data: RecurringRuleControllerDeleteData
1843
- ): CancelablePromise<RecurringRuleControllerDeleteResponse> {
2019
+ public static userControllerUpdateUserSetting(
2020
+ data: UserControllerUpdateUserSettingData
2021
+ ): CancelablePromise<UserControllerUpdateUserSettingResponse> {
1844
2022
  return __request(OpenAPI, {
1845
- method: 'DELETE',
1846
- url: '/api/v1/{region}/bean/recurring-rules/{id}',
1847
- path: {
1848
- id: data.id,
1849
- region: data.region
1850
- },
2023
+ method: 'PUT',
2024
+ url: '/api/v1/users/setting',
2025
+ body: data.requestBody,
2026
+ mediaType: 'application/json',
1851
2027
  errors: {
1852
- 404: 'Rule not found'
2028
+ 403: 'Insufficient permissions'
1853
2029
  }
1854
2030
  });
1855
2031
  }
1856
2032
 
1857
2033
  /**
1858
- * Get rule with statistics
1859
- * Returns a rule with pending/overdue counts and next expected date
2034
+ * Get all user settings paginated (admin only)
1860
2035
  * @param data The data for the request.
1861
- * @param data.id Rule ID
1862
- * @param data.region Region code for tenant context
1863
- * @returns RecurringRuleWithStatsResponseDto Rule with stats retrieved successfully
2036
+ * @param data.pageNo Page number
2037
+ * @param data.pageSize Page size
2038
+ * @returns unknown Settings list retrieved successfully
1864
2039
  * @throws ApiError
1865
2040
  */
1866
- public static recurringRuleControllerGetWithStats(
1867
- data: RecurringRuleControllerGetWithStatsData
1868
- ): CancelablePromise<RecurringRuleControllerGetWithStatsResponse> {
2041
+ public static userControllerGetAllUserSettingsByPage(
2042
+ data: UserControllerGetAllUserSettingsByPageData
2043
+ ): CancelablePromise<UserControllerGetAllUserSettingsByPageResponse> {
1869
2044
  return __request(OpenAPI, {
1870
2045
  method: 'GET',
1871
- url: '/api/v1/{region}/bean/recurring-rules/{id}/stats',
1872
- path: {
1873
- id: data.id,
1874
- region: data.region
1875
- },
1876
- errors: {
1877
- 404: 'Rule not found'
2046
+ url: '/api/v1/users/settings-by-page',
2047
+ query: {
2048
+ pageNo: data.pageNo,
2049
+ pageSize: data.pageSize
1878
2050
  }
1879
2051
  });
1880
2052
  }
2053
+
2054
+ /**
2055
+ * Get asset and liability summary for current user
2056
+ * @returns unknown Summary retrieved successfully
2057
+ * @throws ApiError
2058
+ */
2059
+ public static userControllerGetAssetLiabilitySummary(): CancelablePromise<UserControllerGetAssetLiabilitySummaryResponse> {
2060
+ return __request(OpenAPI, {
2061
+ method: 'GET',
2062
+ url: '/api/v1/users/asset-liability-summary'
2063
+ });
2064
+ }
1881
2065
  }
1882
2066
 
1883
- export class ExpectedTransactionsService {
2067
+ export class PropertiesService {
1884
2068
  /**
1885
- * List expected transactions
1886
- * Returns expected transactions for the authenticated user with optional filtering
2069
+ * Get all system properties
2070
+ * @returns unknown Properties retrieved successfully
2071
+ * @throws ApiError
2072
+ */
2073
+ public static propertyControllerGetAll(): CancelablePromise<PropertyControllerGetAllResponse> {
2074
+ return __request(OpenAPI, {
2075
+ method: 'GET',
2076
+ url: '/api/v1/admin/properties',
2077
+ errors: {
2078
+ 401: 'Unauthorized',
2079
+ 403: 'Forbidden - insufficient permissions'
2080
+ }
2081
+ });
2082
+ }
2083
+
2084
+ /**
2085
+ * Get property by key
1887
2086
  * @param data The data for the request.
1888
- * @param data.region Region code for tenant context
1889
- * @param data.ruleId Filter by recurring rule ID
1890
- * @param data.status Filter by status (PENDING, COMPLETED, SKIPPED)
1891
- * @param data.fromDate Filter by date range start (YYYY-MM-DD)
1892
- * @param data.toDate Filter by date range end (YYYY-MM-DD)
1893
- * @returns ExpectedTransactionListResponseDto Expected transactions retrieved successfully
2087
+ * @param data.key Property key
2088
+ * @returns unknown Property retrieved successfully
1894
2089
  * @throws ApiError
1895
2090
  */
1896
- public static expectedTransactionControllerFindAll(
1897
- data: ExpectedTransactionControllerFindAllData
1898
- ): CancelablePromise<ExpectedTransactionControllerFindAllResponse> {
2091
+ public static propertyControllerGetByKey(
2092
+ data: PropertyControllerGetByKeyData
2093
+ ): CancelablePromise<PropertyControllerGetByKeyResponse> {
1899
2094
  return __request(OpenAPI, {
1900
2095
  method: 'GET',
1901
- url: '/api/v1/{region}/bean/expected-transactions',
2096
+ url: '/api/v1/admin/properties/{key}',
1902
2097
  path: {
1903
- region: data.region
2098
+ key: data.key
1904
2099
  },
1905
- query: {
1906
- ruleId: data.ruleId,
1907
- status: data.status,
1908
- fromDate: data.fromDate,
1909
- toDate: data.toDate
2100
+ errors: {
2101
+ 401: 'Unauthorized',
2102
+ 403: 'Forbidden - insufficient permissions',
2103
+ 404: 'Property not found'
1910
2104
  }
1911
2105
  });
1912
2106
  }
1913
2107
 
1914
2108
  /**
1915
- * List overdue expected transactions
1916
- * Returns all overdue expected transactions (PENDING past tolerance)
2109
+ * Update a system property
1917
2110
  * @param data The data for the request.
1918
- * @param data.region Region code for tenant context
1919
- * @returns ExpectedTransactionListResponseDto Overdue transactions retrieved successfully
2111
+ * @param data.key Property key
2112
+ * @param data.requestBody
2113
+ * @returns unknown Property updated successfully
1920
2114
  * @throws ApiError
1921
2115
  */
1922
- public static expectedTransactionControllerFindOverdue(
1923
- data: ExpectedTransactionControllerFindOverdueData
1924
- ): CancelablePromise<ExpectedTransactionControllerFindOverdueResponse> {
2116
+ public static propertyControllerUpdate(
2117
+ data: PropertyControllerUpdateData
2118
+ ): CancelablePromise<PropertyControllerUpdateResponse> {
1925
2119
  return __request(OpenAPI, {
1926
- method: 'GET',
1927
- url: '/api/v1/{region}/bean/expected-transactions/overdue',
2120
+ method: 'PUT',
2121
+ url: '/api/v1/admin/properties/{key}',
1928
2122
  path: {
1929
- region: data.region
2123
+ key: data.key
2124
+ },
2125
+ body: data.requestBody,
2126
+ mediaType: 'application/json',
2127
+ errors: {
2128
+ 401: 'Unauthorized',
2129
+ 403: 'Forbidden - insufficient permissions'
1930
2130
  }
1931
2131
  });
1932
2132
  }
1933
2133
 
1934
2134
  /**
1935
- * Get expected transaction by ID
1936
- * Returns a specific expected transaction with rule details
2135
+ * Delete a system property
1937
2136
  * @param data The data for the request.
1938
- * @param data.id Expected transaction ID
1939
- * @param data.region Region code for tenant context
1940
- * @returns ExpectedTransactionResponseDto Expected transaction retrieved successfully
2137
+ * @param data.key Property key
2138
+ * @returns void Property deleted successfully
1941
2139
  * @throws ApiError
1942
2140
  */
1943
- public static expectedTransactionControllerFindOne(
1944
- data: ExpectedTransactionControllerFindOneData
1945
- ): CancelablePromise<ExpectedTransactionControllerFindOneResponse> {
2141
+ public static propertyControllerDelete(
2142
+ data: PropertyControllerDeleteData
2143
+ ): CancelablePromise<PropertyControllerDeleteResponse> {
1946
2144
  return __request(OpenAPI, {
1947
- method: 'GET',
1948
- url: '/api/v1/{region}/bean/expected-transactions/{id}',
2145
+ method: 'DELETE',
2146
+ url: '/api/v1/admin/properties/{key}',
1949
2147
  path: {
1950
- id: data.id,
1951
- region: data.region
2148
+ key: data.key
1952
2149
  },
1953
2150
  errors: {
1954
- 404: 'Expected transaction not found'
2151
+ 401: 'Unauthorized',
2152
+ 403: 'Forbidden - insufficient permissions',
2153
+ 404: 'Property not found'
1955
2154
  }
1956
2155
  });
1957
2156
  }
2157
+ }
1958
2158
 
2159
+ export class RecurringRulesService {
1959
2160
  /**
1960
- * Skip expected transaction
1961
- * Marks an expected transaction as skipped (PENDING -> SKIPPED)
2161
+ * Create a new recurring rule
2162
+ * Creates a new recurring transaction rule for the authenticated user
1962
2163
  * @param data The data for the request.
1963
- * @param data.id Expected transaction ID
1964
2164
  * @param data.region Region code for tenant context
1965
- * @returns ExpectedTransactionResponseDto Expected transaction skipped successfully
2165
+ * @param data.requestBody
2166
+ * @returns RecurringRuleResponseDto Rule created successfully
1966
2167
  * @throws ApiError
1967
2168
  */
1968
- public static expectedTransactionControllerSkip(
1969
- data: ExpectedTransactionControllerSkipData
1970
- ): CancelablePromise<ExpectedTransactionControllerSkipResponse> {
2169
+ public static recurringRuleControllerCreate(
2170
+ data: RecurringRuleControllerCreateData
2171
+ ): CancelablePromise<RecurringRuleControllerCreateResponse> {
1971
2172
  return __request(OpenAPI, {
1972
2173
  method: 'POST',
1973
- url: '/api/v1/{region}/bean/expected-transactions/{id}/skip',
2174
+ url: '/api/v1/{region}/bean/recurring-rules',
1974
2175
  path: {
1975
- id: data.id,
1976
2176
  region: data.region
1977
2177
  },
2178
+ body: data.requestBody,
2179
+ mediaType: 'application/json',
1978
2180
  errors: {
1979
- 400: 'Cannot skip - not in PENDING status',
1980
- 404: 'Expected transaction not found'
2181
+ 400: 'Invalid input data (e.g., autoCreate without accounts)',
2182
+ 409: 'Rule with same name already exists'
1981
2183
  }
1982
2184
  });
1983
2185
  }
1984
2186
 
1985
2187
  /**
1986
- * Undo skip
1987
- * Reverses a skip operation (SKIPPED -> PENDING)
2188
+ * List recurring rules
2189
+ * Returns all recurring rules for the authenticated user with optional filtering
1988
2190
  * @param data The data for the request.
1989
- * @param data.id Expected transaction ID
1990
2191
  * @param data.region Region code for tenant context
1991
- * @returns ExpectedTransactionResponseDto Skip undone successfully
2192
+ * @param data.isActive Filter by active status
2193
+ * @param data.frequency Filter by frequency (WEEKLY, MONTHLY, etc.)
2194
+ * @param data.hasAutoCreate Filter by autoCreate enabled
2195
+ * @returns RecurringRuleResponseDto Rules retrieved successfully
1992
2196
  * @throws ApiError
1993
2197
  */
1994
- public static expectedTransactionControllerUndoSkip(
1995
- data: ExpectedTransactionControllerUndoSkipData
1996
- ): CancelablePromise<ExpectedTransactionControllerUndoSkipResponse> {
2198
+ public static recurringRuleControllerFindAll(
2199
+ data: RecurringRuleControllerFindAllData
2200
+ ): CancelablePromise<RecurringRuleControllerFindAllResponse> {
1997
2201
  return __request(OpenAPI, {
1998
- method: 'DELETE',
1999
- url: '/api/v1/{region}/bean/expected-transactions/{id}/skip',
2202
+ method: 'GET',
2203
+ url: '/api/v1/{region}/bean/recurring-rules',
2000
2204
  path: {
2001
- id: data.id,
2002
2205
  region: data.region
2003
2206
  },
2004
- errors: {
2005
- 400: 'Cannot undo - not in SKIPPED status',
2006
- 404: 'Expected transaction not found'
2207
+ query: {
2208
+ isActive: data.isActive,
2209
+ frequency: data.frequency,
2210
+ hasAutoCreate: data.hasAutoCreate
2007
2211
  }
2008
2212
  });
2009
2213
  }
2010
2214
 
2011
2215
  /**
2012
- * Confirm transaction match
2013
- * Manually matches an expected transaction with an actual transaction
2216
+ * Create recurring rule from transaction
2217
+ * Auto-creates a recurring rule using transaction data. User only confirms frequency.
2014
2218
  * @param data The data for the request.
2015
- * @param data.id Expected transaction ID
2219
+ * @param data.transactionId Source transaction ID
2016
2220
  * @param data.region Region code for tenant context
2017
2221
  * @param data.requestBody
2018
- * @returns unknown Match confirmed successfully
2222
+ * @returns RecurringRuleResponseDto Rule created successfully
2019
2223
  * @throws ApiError
2020
2224
  */
2021
- public static expectedTransactionControllerConfirmMatch(
2022
- data: ExpectedTransactionControllerConfirmMatchData
2023
- ): CancelablePromise<ExpectedTransactionControllerConfirmMatchResponse> {
2225
+ public static recurringRuleControllerCreateFromTransaction(
2226
+ data: RecurringRuleControllerCreateFromTransactionData
2227
+ ): CancelablePromise<RecurringRuleControllerCreateFromTransactionResponse> {
2024
2228
  return __request(OpenAPI, {
2025
2229
  method: 'POST',
2026
- url: '/api/v1/{region}/bean/expected-transactions/{id}/match',
2230
+ url: '/api/v1/{region}/bean/recurring-rules/from-transaction/{transactionId}',
2027
2231
  path: {
2028
- id: data.id,
2232
+ transactionId: data.transactionId,
2029
2233
  region: data.region
2030
2234
  },
2031
2235
  body: data.requestBody,
2032
2236
  mediaType: 'application/json',
2033
2237
  errors: {
2034
- 400: 'Cannot match - not in PENDING status',
2035
- 404: 'Expected or actual transaction not found',
2036
- 409: 'Actual transaction already matched to another rule'
2238
+ 404: 'Transaction not found',
2239
+ 409: 'Rule with same name already exists or transaction already linked'
2037
2240
  }
2038
2241
  });
2039
2242
  }
2040
2243
 
2041
2244
  /**
2042
- * Unmatch transaction
2043
- * Removes the match between expected and actual transaction (COMPLETED -> PENDING)
2245
+ * Get recurring rule by ID
2246
+ * Returns a specific recurring rule with its details
2044
2247
  * @param data The data for the request.
2045
- * @param data.id Expected transaction ID
2248
+ * @param data.id Rule ID
2046
2249
  * @param data.region Region code for tenant context
2047
- * @returns unknown Match removed successfully
2250
+ * @returns RecurringRuleResponseDto Rule retrieved successfully
2048
2251
  * @throws ApiError
2049
2252
  */
2050
- public static expectedTransactionControllerUnmatch(
2051
- data: ExpectedTransactionControllerUnmatchData
2052
- ): CancelablePromise<ExpectedTransactionControllerUnmatchResponse> {
2253
+ public static recurringRuleControllerFindOne(
2254
+ data: RecurringRuleControllerFindOneData
2255
+ ): CancelablePromise<RecurringRuleControllerFindOneResponse> {
2053
2256
  return __request(OpenAPI, {
2054
- method: 'DELETE',
2055
- url: '/api/v1/{region}/bean/expected-transactions/{id}/match',
2257
+ method: 'GET',
2258
+ url: '/api/v1/{region}/bean/recurring-rules/{id}',
2056
2259
  path: {
2057
2260
  id: data.id,
2058
2261
  region: data.region
2059
2262
  },
2060
2263
  errors: {
2061
- 400: 'Cannot unmatch - not in COMPLETED status',
2062
- 404: 'Expected transaction not found'
2264
+ 404: 'Rule not found'
2063
2265
  }
2064
2266
  });
2065
2267
  }
2066
2268
 
2067
2269
  /**
2068
- * Enter Now
2069
- * Creates an actual transaction for an expected transaction (YNAB-style Enter Now)
2270
+ * Update recurring rule
2271
+ * Updates an existing recurring rule
2070
2272
  * @param data The data for the request.
2071
- * @param data.id Expected transaction ID
2273
+ * @param data.id Rule ID
2072
2274
  * @param data.region Region code for tenant context
2073
2275
  * @param data.requestBody
2074
- * @returns unknown Transaction created successfully
2276
+ * @returns RecurringRuleResponseDto Rule updated successfully
2075
2277
  * @throws ApiError
2076
2278
  */
2077
- public static expectedTransactionControllerEnterNow(
2078
- data: ExpectedTransactionControllerEnterNowData
2079
- ): CancelablePromise<ExpectedTransactionControllerEnterNowResponse> {
2279
+ public static recurringRuleControllerUpdate(
2280
+ data: RecurringRuleControllerUpdateData
2281
+ ): CancelablePromise<RecurringRuleControllerUpdateResponse> {
2080
2282
  return __request(OpenAPI, {
2081
- method: 'POST',
2082
- url: '/api/v1/{region}/bean/expected-transactions/{id}/enter',
2283
+ method: 'PATCH',
2284
+ url: '/api/v1/{region}/bean/recurring-rules/{id}',
2083
2285
  path: {
2084
2286
  id: data.id,
2085
2287
  region: data.region
@@ -2087,567 +2289,604 @@ export class ExpectedTransactionsService {
2087
2289
  body: data.requestBody,
2088
2290
  mediaType: 'application/json',
2089
2291
  errors: {
2090
- 400: 'Cannot enter - not in PENDING status or missing accounts',
2091
- 404: 'Expected transaction or accounts not found'
2292
+ 400: 'Invalid input data',
2293
+ 404: 'Rule not found'
2092
2294
  }
2093
2295
  });
2094
2296
  }
2095
- }
2096
2297
 
2097
- export class RecurringForecastService {
2098
2298
  /**
2099
- * Get cash flow forecast
2100
- * Returns predicted outflows for the next N months based on active recurring rules
2299
+ * Delete recurring rule
2300
+ * Soft deletes a recurring rule (sets isActive to false)
2101
2301
  * @param data The data for the request.
2302
+ * @param data.id Rule ID
2102
2303
  * @param data.region Region code for tenant context
2103
- * @param data.months Number of months to forecast (1-12, default 3)
2104
- * @returns ForecastResponseDto Forecast retrieved successfully
2304
+ * @returns void Rule deleted successfully
2105
2305
  * @throws ApiError
2106
2306
  */
2107
- public static forecastControllerGetForecast(
2108
- data: ForecastControllerGetForecastData
2109
- ): CancelablePromise<ForecastControllerGetForecastResponse> {
2307
+ public static recurringRuleControllerDelete(
2308
+ data: RecurringRuleControllerDeleteData
2309
+ ): CancelablePromise<RecurringRuleControllerDeleteResponse> {
2110
2310
  return __request(OpenAPI, {
2111
- method: 'GET',
2112
- url: '/api/v1/{region}/bean/recurring/forecast',
2311
+ method: 'DELETE',
2312
+ url: '/api/v1/{region}/bean/recurring-rules/{id}',
2113
2313
  path: {
2314
+ id: data.id,
2114
2315
  region: data.region
2115
2316
  },
2116
- query: {
2117
- months: data.months
2317
+ errors: {
2318
+ 404: 'Rule not found'
2118
2319
  }
2119
2320
  });
2120
2321
  }
2121
- }
2122
2322
 
2123
- export class BeanTransactionRulesService {
2124
2323
  /**
2125
- * Create a new transaction rule (or upsert if upsertByPayee=true)
2126
- * Creates a new rule. If upsertByPayee=true, updates existing rule matching payeeKeywords[0] instead of creating duplicate.
2324
+ * Get rule with statistics
2325
+ * Returns a rule with pending/overdue counts and next expected date
2127
2326
  * @param data The data for the request.
2327
+ * @param data.id Rule ID
2128
2328
  * @param data.region Region code for tenant context
2129
- * @param data.requestBody
2130
- * @returns TransactionRuleResponseDto Rule updated successfully (upsert mode)
2329
+ * @returns RecurringRuleWithStatsResponseDto Rule with stats retrieved successfully
2131
2330
  * @throws ApiError
2132
2331
  */
2133
- public static transactionRuleControllerCreate(
2134
- data: TransactionRuleControllerCreateData
2135
- ): CancelablePromise<TransactionRuleControllerCreateResponse> {
2332
+ public static recurringRuleControllerGetWithStats(
2333
+ data: RecurringRuleControllerGetWithStatsData
2334
+ ): CancelablePromise<RecurringRuleControllerGetWithStatsResponse> {
2136
2335
  return __request(OpenAPI, {
2137
- method: 'POST',
2138
- url: '/api/v1/{region}/bean/transaction-rules',
2336
+ method: 'GET',
2337
+ url: '/api/v1/{region}/bean/recurring-rules/{id}/stats',
2139
2338
  path: {
2339
+ id: data.id,
2140
2340
  region: data.region
2141
2341
  },
2142
- body: data.requestBody,
2143
- mediaType: 'application/json',
2144
2342
  errors: {
2145
- 400: 'Validation failed',
2146
- 401: 'Unauthorized',
2147
- 409: 'Resource conflict - another process is updating this rule'
2343
+ 404: 'Rule not found'
2148
2344
  }
2149
2345
  });
2150
2346
  }
2347
+ }
2151
2348
 
2349
+ export class ExpectedTransactionsService {
2152
2350
  /**
2153
- * Get all transaction rules for user
2351
+ * List expected transactions
2352
+ * Returns expected transactions for the authenticated user with optional filtering
2154
2353
  * @param data The data for the request.
2155
2354
  * @param data.region Region code for tenant context
2156
- * @param data.limit Max results per page (default: 20, max: 100)
2157
- * @param data.offset Pagination offset (default: 0)
2158
- * @param data.enabled Filter by enabled status
2159
- * @param data.learningSource Filter by learning source. Omit this parameter or pass empty string to get manually created rules (learningSource is null in database).
2160
- * @param data.autoApplyEnabled Filter by auto-apply status
2161
- * @returns TransactionRuleListResponseDto List of rules
2355
+ * @param data.ruleId Filter by recurring rule ID
2356
+ * @param data.status Filter by status (PENDING, COMPLETED, SKIPPED)
2357
+ * @param data.fromDate Filter by date range start (YYYY-MM-DD)
2358
+ * @param data.toDate Filter by date range end (YYYY-MM-DD)
2359
+ * @returns ExpectedTransactionListResponseDto Expected transactions retrieved successfully
2162
2360
  * @throws ApiError
2163
2361
  */
2164
- public static transactionRuleControllerList(
2165
- data: TransactionRuleControllerListData
2166
- ): CancelablePromise<TransactionRuleControllerListResponse> {
2362
+ public static expectedTransactionControllerFindAll(
2363
+ data: ExpectedTransactionControllerFindAllData
2364
+ ): CancelablePromise<ExpectedTransactionControllerFindAllResponse> {
2167
2365
  return __request(OpenAPI, {
2168
2366
  method: 'GET',
2169
- url: '/api/v1/{region}/bean/transaction-rules',
2367
+ url: '/api/v1/{region}/bean/expected-transactions',
2170
2368
  path: {
2171
2369
  region: data.region
2172
2370
  },
2173
2371
  query: {
2174
- limit: data.limit,
2175
- offset: data.offset,
2176
- enabled: data.enabled,
2177
- learningSource: data.learningSource,
2178
- autoApplyEnabled: data.autoApplyEnabled
2179
- },
2180
- errors: {
2181
- 401: 'Unauthorized'
2372
+ ruleId: data.ruleId,
2373
+ status: data.status,
2374
+ fromDate: data.fromDate,
2375
+ toDate: data.toDate
2182
2376
  }
2183
2377
  });
2184
2378
  }
2185
2379
 
2186
2380
  /**
2187
- * Validate transaction rule configuration
2381
+ * List overdue expected transactions
2382
+ * Returns all overdue expected transactions (PENDING past tolerance)
2188
2383
  * @param data The data for the request.
2189
2384
  * @param data.region Region code for tenant context
2190
- * @param data.requestBody
2191
- * @returns ValidateRuleResponseDto Validation result
2385
+ * @returns ExpectedTransactionListResponseDto Overdue transactions retrieved successfully
2192
2386
  * @throws ApiError
2193
2387
  */
2194
- public static transactionRuleControllerValidate(
2195
- data: TransactionRuleControllerValidateData
2196
- ): CancelablePromise<TransactionRuleControllerValidateResponse> {
2388
+ public static expectedTransactionControllerFindOverdue(
2389
+ data: ExpectedTransactionControllerFindOverdueData
2390
+ ): CancelablePromise<ExpectedTransactionControllerFindOverdueResponse> {
2197
2391
  return __request(OpenAPI, {
2198
- method: 'POST',
2199
- url: '/api/v1/{region}/bean/transaction-rules/validate',
2392
+ method: 'GET',
2393
+ url: '/api/v1/{region}/bean/expected-transactions/overdue',
2200
2394
  path: {
2201
2395
  region: data.region
2202
- },
2203
- body: data.requestBody,
2204
- mediaType: 'application/json',
2205
- errors: {
2206
- 400: 'Validation failed',
2207
- 401: 'Unauthorized'
2208
2396
  }
2209
2397
  });
2210
2398
  }
2211
2399
 
2212
2400
  /**
2213
- * Bulk create transaction rules
2401
+ * Get expected transaction by ID
2402
+ * Returns a specific expected transaction with rule details
2214
2403
  * @param data The data for the request.
2404
+ * @param data.id Expected transaction ID
2215
2405
  * @param data.region Region code for tenant context
2216
- * @param data.requestBody
2217
- * @returns BulkCreateRulesResponseDto Bulk create completed
2406
+ * @returns ExpectedTransactionResponseDto Expected transaction retrieved successfully
2218
2407
  * @throws ApiError
2219
2408
  */
2220
- public static transactionRuleControllerBulkCreate(
2221
- data: TransactionRuleControllerBulkCreateData
2222
- ): CancelablePromise<TransactionRuleControllerBulkCreateResponse> {
2409
+ public static expectedTransactionControllerFindOne(
2410
+ data: ExpectedTransactionControllerFindOneData
2411
+ ): CancelablePromise<ExpectedTransactionControllerFindOneResponse> {
2223
2412
  return __request(OpenAPI, {
2224
- method: 'POST',
2225
- url: '/api/v1/{region}/bean/transaction-rules/bulk',
2413
+ method: 'GET',
2414
+ url: '/api/v1/{region}/bean/expected-transactions/{id}',
2226
2415
  path: {
2416
+ id: data.id,
2227
2417
  region: data.region
2228
2418
  },
2229
- body: data.requestBody,
2230
- mediaType: 'application/json',
2231
2419
  errors: {
2232
- 400: 'Invalid bulk create data',
2233
- 401: 'Unauthorized'
2420
+ 404: 'Expected transaction not found'
2234
2421
  }
2235
2422
  });
2236
2423
  }
2237
2424
 
2238
2425
  /**
2239
- * Export transaction rules
2426
+ * Skip expected transaction
2427
+ * Marks an expected transaction as skipped (PENDING -> SKIPPED)
2240
2428
  * @param data The data for the request.
2241
- * @param data.format Export format (currently only JSON supported)
2429
+ * @param data.id Expected transaction ID
2242
2430
  * @param data.region Region code for tenant context
2243
- * @returns ExportRulesResponseDto Exported rules
2431
+ * @returns ExpectedTransactionResponseDto Expected transaction skipped successfully
2244
2432
  * @throws ApiError
2245
2433
  */
2246
- public static transactionRuleControllerExport(
2247
- data: TransactionRuleControllerExportData
2248
- ): CancelablePromise<TransactionRuleControllerExportResponse> {
2434
+ public static expectedTransactionControllerSkip(
2435
+ data: ExpectedTransactionControllerSkipData
2436
+ ): CancelablePromise<ExpectedTransactionControllerSkipResponse> {
2249
2437
  return __request(OpenAPI, {
2250
- method: 'GET',
2251
- url: '/api/v1/{region}/bean/transaction-rules/export/{format}',
2438
+ method: 'POST',
2439
+ url: '/api/v1/{region}/bean/expected-transactions/{id}/skip',
2252
2440
  path: {
2253
- format: data.format,
2441
+ id: data.id,
2254
2442
  region: data.region
2255
2443
  },
2256
2444
  errors: {
2257
- 400: 'Unsupported format',
2258
- 401: 'Unauthorized'
2445
+ 400: 'Cannot skip - not in PENDING status',
2446
+ 404: 'Expected transaction not found'
2259
2447
  }
2260
2448
  });
2261
2449
  }
2262
2450
 
2263
2451
  /**
2264
- * Get transaction rule statistics
2452
+ * Undo skip
2453
+ * Reverses a skip operation (SKIPPED -> PENDING)
2265
2454
  * @param data The data for the request.
2266
- * @param data.period Statistics time period
2455
+ * @param data.id Expected transaction ID
2267
2456
  * @param data.region Region code for tenant context
2268
- * @returns RuleStatisticsResponseDto Rule statistics
2457
+ * @returns void Skip undone successfully
2269
2458
  * @throws ApiError
2270
2459
  */
2271
- public static transactionRuleControllerGetStatistics(
2272
- data: TransactionRuleControllerGetStatisticsData
2273
- ): CancelablePromise<TransactionRuleControllerGetStatisticsResponse> {
2460
+ public static expectedTransactionControllerUndoSkip(
2461
+ data: ExpectedTransactionControllerUndoSkipData
2462
+ ): CancelablePromise<ExpectedTransactionControllerUndoSkipResponse> {
2274
2463
  return __request(OpenAPI, {
2275
- method: 'GET',
2276
- url: '/api/v1/{region}/bean/transaction-rules/statistics/{period}',
2464
+ method: 'DELETE',
2465
+ url: '/api/v1/{region}/bean/expected-transactions/{id}/skip',
2277
2466
  path: {
2278
- period: data.period,
2467
+ id: data.id,
2279
2468
  region: data.region
2280
2469
  },
2281
2470
  errors: {
2282
- 401: 'Unauthorized'
2471
+ 400: 'Cannot undo - not in SKIPPED status',
2472
+ 404: 'Expected transaction not found'
2283
2473
  }
2284
2474
  });
2285
2475
  }
2286
2476
 
2287
2477
  /**
2288
- * Get transaction rule detail
2478
+ * Confirm transaction match
2479
+ * Manually matches an expected transaction with an actual transaction
2289
2480
  * @param data The data for the request.
2290
- * @param data.ruleId Rule ID
2481
+ * @param data.id Expected transaction ID
2291
2482
  * @param data.region Region code for tenant context
2292
- * @returns TransactionRuleResponseDto Rule details
2483
+ * @param data.requestBody
2484
+ * @returns unknown Match confirmed successfully
2293
2485
  * @throws ApiError
2294
2486
  */
2295
- public static transactionRuleControllerGetDetail(
2296
- data: TransactionRuleControllerGetDetailData
2297
- ): CancelablePromise<TransactionRuleControllerGetDetailResponse> {
2487
+ public static expectedTransactionControllerConfirmMatch(
2488
+ data: ExpectedTransactionControllerConfirmMatchData
2489
+ ): CancelablePromise<ExpectedTransactionControllerConfirmMatchResponse> {
2298
2490
  return __request(OpenAPI, {
2299
- method: 'GET',
2300
- url: '/api/v1/{region}/bean/transaction-rules/{ruleId}',
2491
+ method: 'POST',
2492
+ url: '/api/v1/{region}/bean/expected-transactions/{id}/match',
2301
2493
  path: {
2302
- ruleId: data.ruleId,
2494
+ id: data.id,
2303
2495
  region: data.region
2304
2496
  },
2497
+ body: data.requestBody,
2498
+ mediaType: 'application/json',
2305
2499
  errors: {
2306
- 401: 'Unauthorized',
2307
- 403: 'Forbidden - not owner of rule',
2308
- 404: 'Rule not found'
2500
+ 400: 'Cannot match - not in PENDING status',
2501
+ 404: 'Expected or actual transaction not found',
2502
+ 409: 'Actual transaction already matched to another rule'
2309
2503
  }
2310
2504
  });
2311
2505
  }
2312
2506
 
2313
2507
  /**
2314
- * Update a transaction rule
2508
+ * Unmatch transaction
2509
+ * Removes the match between expected and actual transaction (COMPLETED -> PENDING)
2315
2510
  * @param data The data for the request.
2316
- * @param data.ruleId Rule ID to update
2511
+ * @param data.id Expected transaction ID
2317
2512
  * @param data.region Region code for tenant context
2318
- * @param data.requestBody
2319
- * @returns TransactionRuleResponseDto Rule updated successfully
2513
+ * @returns void Match removed successfully
2320
2514
  * @throws ApiError
2321
2515
  */
2322
- public static transactionRuleControllerUpdate(
2323
- data: TransactionRuleControllerUpdateData
2324
- ): CancelablePromise<TransactionRuleControllerUpdateResponse> {
2516
+ public static expectedTransactionControllerUnmatch(
2517
+ data: ExpectedTransactionControllerUnmatchData
2518
+ ): CancelablePromise<ExpectedTransactionControllerUnmatchResponse> {
2325
2519
  return __request(OpenAPI, {
2326
- method: 'PUT',
2327
- url: '/api/v1/{region}/bean/transaction-rules/{ruleId}',
2520
+ method: 'DELETE',
2521
+ url: '/api/v1/{region}/bean/expected-transactions/{id}/match',
2328
2522
  path: {
2329
- ruleId: data.ruleId,
2523
+ id: data.id,
2330
2524
  region: data.region
2331
2525
  },
2332
- body: data.requestBody,
2333
- mediaType: 'application/json',
2334
2526
  errors: {
2335
- 400: 'Validation failed',
2336
- 401: 'Unauthorized',
2337
- 403: 'Forbidden - not owner of rule',
2338
- 404: 'Rule not found',
2339
- 409: 'Resource conflict - rule is being modified by another process'
2527
+ 400: 'Cannot unmatch - not in COMPLETED status',
2528
+ 404: 'Expected transaction not found'
2340
2529
  }
2341
2530
  });
2342
2531
  }
2343
2532
 
2344
2533
  /**
2345
- * Delete a transaction rule
2534
+ * Enter Now
2535
+ * Creates an actual transaction for an expected transaction (YNAB-style Enter Now)
2346
2536
  * @param data The data for the request.
2347
- * @param data.ruleId Rule ID to delete
2537
+ * @param data.id Expected transaction ID
2348
2538
  * @param data.region Region code for tenant context
2349
- * @returns void Rule deleted successfully
2539
+ * @param data.requestBody
2540
+ * @returns unknown Transaction created successfully
2350
2541
  * @throws ApiError
2351
2542
  */
2352
- public static transactionRuleControllerDelete(
2353
- data: TransactionRuleControllerDeleteData
2354
- ): CancelablePromise<TransactionRuleControllerDeleteResponse> {
2543
+ public static expectedTransactionControllerEnterNow(
2544
+ data: ExpectedTransactionControllerEnterNowData
2545
+ ): CancelablePromise<ExpectedTransactionControllerEnterNowResponse> {
2355
2546
  return __request(OpenAPI, {
2356
- method: 'DELETE',
2357
- url: '/api/v1/{region}/bean/transaction-rules/{ruleId}',
2547
+ method: 'POST',
2548
+ url: '/api/v1/{region}/bean/expected-transactions/{id}/enter',
2358
2549
  path: {
2359
- ruleId: data.ruleId,
2550
+ id: data.id,
2360
2551
  region: data.region
2361
2552
  },
2553
+ body: data.requestBody,
2554
+ mediaType: 'application/json',
2362
2555
  errors: {
2363
- 401: 'Unauthorized',
2364
- 403: 'Forbidden - not owner of rule',
2365
- 404: 'Rule not found',
2366
- 409: 'Resource conflict - rule is being modified by another process'
2556
+ 400: 'Cannot enter - not in PENDING status or missing accounts',
2557
+ 404: 'Expected transaction or accounts not found'
2367
2558
  }
2368
2559
  });
2369
2560
  }
2561
+ }
2370
2562
 
2563
+ export class RecurringForecastService {
2371
2564
  /**
2372
- * Test rule matching
2565
+ * Get cash flow forecast
2566
+ * Returns predicted outflows for the next N months based on active recurring rules
2373
2567
  * @param data The data for the request.
2374
- * @param data.ruleId Rule ID to test
2375
2568
  * @param data.region Region code for tenant context
2376
- * @param data.requestBody
2377
- * @returns TestRuleResponseDto Test result
2569
+ * @param data.months Number of months to forecast (1-12, default 3)
2570
+ * @returns ForecastResponseDto Forecast retrieved successfully
2378
2571
  * @throws ApiError
2379
2572
  */
2380
- public static transactionRuleControllerTest(
2381
- data: TransactionRuleControllerTestData
2382
- ): CancelablePromise<TransactionRuleControllerTestResponse> {
2573
+ public static forecastControllerGetForecast(
2574
+ data: ForecastControllerGetForecastData
2575
+ ): CancelablePromise<ForecastControllerGetForecastResponse> {
2383
2576
  return __request(OpenAPI, {
2384
- method: 'POST',
2385
- url: '/api/v1/{region}/bean/transaction-rules/{ruleId}/test',
2577
+ method: 'GET',
2578
+ url: '/api/v1/{region}/bean/recurring/forecast',
2386
2579
  path: {
2387
- ruleId: data.ruleId,
2388
2580
  region: data.region
2389
2581
  },
2390
- body: data.requestBody,
2391
- mediaType: 'application/json',
2392
- errors: {
2393
- 401: 'Unauthorized',
2394
- 403: 'Forbidden - not owner of rule',
2395
- 404: 'Rule not found'
2582
+ query: {
2583
+ months: data.months
2396
2584
  }
2397
2585
  });
2398
2586
  }
2399
2587
  }
2400
2588
 
2401
- export class UsersService {
2589
+ export class BeanTransactionRulesService {
2402
2590
  /**
2403
- * Delete own user account
2591
+ * Create a new transaction rule (or upsert if upsertByPayee=true)
2592
+ * Creates a new rule. If upsertByPayee=true, updates existing rule matching payeeKeywords[0] instead of creating duplicate.
2404
2593
  * @param data The data for the request.
2594
+ * @param data.region Region code for tenant context
2405
2595
  * @param data.requestBody
2406
- * @returns void User deleted successfully
2596
+ * @returns TransactionRuleResponseDto Rule updated successfully (upsert mode)
2407
2597
  * @throws ApiError
2408
2598
  */
2409
- public static userControllerDeleteOwnUser(
2410
- data: UserControllerDeleteOwnUserData
2411
- ): CancelablePromise<UserControllerDeleteOwnUserResponse> {
2599
+ public static transactionRuleControllerCreate(
2600
+ data: TransactionRuleControllerCreateData
2601
+ ): CancelablePromise<TransactionRuleControllerCreateResponse> {
2412
2602
  return __request(OpenAPI, {
2413
- method: 'DELETE',
2414
- url: '/api/v1/users',
2603
+ method: 'POST',
2604
+ url: '/api/v1/{region}/bean/transaction-rules',
2605
+ path: {
2606
+ region: data.region
2607
+ },
2415
2608
  body: data.requestBody,
2416
2609
  mediaType: 'application/json',
2417
2610
  errors: {
2418
- 403: 'Invalid access token'
2611
+ 400: 'Validation failed',
2612
+ 401: 'Unauthorized',
2613
+ 409: 'Resource conflict - another process is updating this rule'
2419
2614
  }
2420
2615
  });
2421
2616
  }
2422
2617
 
2423
2618
  /**
2424
- * Get current authenticated user
2619
+ * Get all transaction rules for user
2425
2620
  * @param data The data for the request.
2426
- * @param data.acceptLanguage
2427
- * @returns unknown User retrieved successfully
2621
+ * @param data.region Region code for tenant context
2622
+ * @param data.limit Max results per page (default: 20, max: 100)
2623
+ * @param data.offset Pagination offset (default: 0)
2624
+ * @param data.enabled Filter by enabled status
2625
+ * @param data.learningSource Filter by learning source. Omit this parameter or pass empty string to get manually created rules (learningSource is null in database).
2626
+ * @param data.autoApplyEnabled Filter by auto-apply status
2627
+ * @returns TransactionRuleListResponseDto List of rules
2428
2628
  * @throws ApiError
2429
2629
  */
2430
- public static userControllerGetUser(
2431
- data: UserControllerGetUserData
2432
- ): CancelablePromise<UserControllerGetUserResponse> {
2630
+ public static transactionRuleControllerList(
2631
+ data: TransactionRuleControllerListData
2632
+ ): CancelablePromise<TransactionRuleControllerListResponse> {
2433
2633
  return __request(OpenAPI, {
2434
2634
  method: 'GET',
2435
- url: '/api/v1/users',
2436
- headers: {
2437
- 'accept-language': data.acceptLanguage
2635
+ url: '/api/v1/{region}/bean/transaction-rules',
2636
+ path: {
2637
+ region: data.region
2638
+ },
2639
+ query: {
2640
+ limit: data.limit,
2641
+ offset: data.offset,
2642
+ enabled: data.enabled,
2643
+ learningSource: data.learningSource,
2644
+ autoApplyEnabled: data.autoApplyEnabled
2645
+ },
2646
+ errors: {
2647
+ 401: 'Unauthorized'
2438
2648
  }
2439
2649
  });
2440
2650
  }
2441
2651
 
2442
2652
  /**
2443
- * Sign up new user
2444
- * Create a new account with auto-generated access token. Protected by Cloudflare Turnstile to prevent automated signup (when enabled).
2653
+ * Validate transaction rule configuration
2445
2654
  * @param data The data for the request.
2655
+ * @param data.region Region code for tenant context
2446
2656
  * @param data.requestBody
2447
- * @returns unknown User created successfully
2657
+ * @returns ValidateRuleResponseDto Validation result
2448
2658
  * @throws ApiError
2449
2659
  */
2450
- public static userControllerSignupUser(
2451
- data: UserControllerSignupUserData
2452
- ): CancelablePromise<UserControllerSignupUserResponse> {
2660
+ public static transactionRuleControllerValidate(
2661
+ data: TransactionRuleControllerValidateData
2662
+ ): CancelablePromise<TransactionRuleControllerValidateResponse> {
2453
2663
  return __request(OpenAPI, {
2454
2664
  method: 'POST',
2455
- url: '/api/v1/users',
2665
+ url: '/api/v1/{region}/bean/transaction-rules/validate',
2666
+ path: {
2667
+ region: data.region
2668
+ },
2456
2669
  body: data.requestBody,
2457
2670
  mediaType: 'application/json',
2458
2671
  errors: {
2459
- 400: 'Invalid Turnstile token (when Turnstile is enabled)',
2460
- 403: 'User signup is disabled'
2672
+ 400: 'Validation failed',
2673
+ 401: 'Unauthorized'
2461
2674
  }
2462
2675
  });
2463
2676
  }
2464
2677
 
2465
2678
  /**
2466
- * Delete user by ID (admin only)
2679
+ * Bulk create transaction rules
2467
2680
  * @param data The data for the request.
2468
- * @param data.id User ID to delete
2469
- * @returns void User deleted successfully
2681
+ * @param data.region Region code for tenant context
2682
+ * @param data.requestBody
2683
+ * @returns BulkCreateRulesResponseDto Bulk create completed
2470
2684
  * @throws ApiError
2471
2685
  */
2472
- public static userControllerDeleteUser(
2473
- data: UserControllerDeleteUserData
2474
- ): CancelablePromise<UserControllerDeleteUserResponse> {
2686
+ public static transactionRuleControllerBulkCreate(
2687
+ data: TransactionRuleControllerBulkCreateData
2688
+ ): CancelablePromise<TransactionRuleControllerBulkCreateResponse> {
2475
2689
  return __request(OpenAPI, {
2476
- method: 'DELETE',
2477
- url: '/api/v1/users/{id}',
2690
+ method: 'POST',
2691
+ url: '/api/v1/{region}/bean/transaction-rules/bulk',
2478
2692
  path: {
2479
- id: data.id
2693
+ region: data.region
2480
2694
  },
2695
+ body: data.requestBody,
2696
+ mediaType: 'application/json',
2481
2697
  errors: {
2482
- 403: 'Cannot delete own account or insufficient permissions'
2698
+ 400: 'Invalid bulk create data',
2699
+ 401: 'Unauthorized'
2483
2700
  }
2484
2701
  });
2485
2702
  }
2486
2703
 
2487
2704
  /**
2488
- * Get user info by user ID
2705
+ * Export transaction rules
2489
2706
  * @param data The data for the request.
2490
- * @param data.id User ID
2491
- * @returns unknown User info retrieved successfully
2707
+ * @param data.format Export format (currently only JSON supported)
2708
+ * @param data.region Region code for tenant context
2709
+ * @returns ExportRulesResponseDto Exported rules
2492
2710
  * @throws ApiError
2493
2711
  */
2494
- public static userControllerGetUserInfo(
2495
- data: UserControllerGetUserInfoData
2496
- ): CancelablePromise<UserControllerGetUserInfoResponse> {
2712
+ public static transactionRuleControllerExport(
2713
+ data: TransactionRuleControllerExportData
2714
+ ): CancelablePromise<TransactionRuleControllerExportResponse> {
2497
2715
  return __request(OpenAPI, {
2498
2716
  method: 'GET',
2499
- url: '/api/v1/users/{id}/info',
2717
+ url: '/api/v1/{region}/bean/transaction-rules/export/{format}',
2500
2718
  path: {
2501
- id: data.id
2719
+ format: data.format,
2720
+ region: data.region
2502
2721
  },
2503
2722
  errors: {
2504
- 403: 'Cannot access other user info without admin permission'
2505
- }
2506
- });
2507
- }
2508
-
2509
- /**
2510
- * Update user settings
2511
- * @param data The data for the request.
2512
- * @param data.requestBody
2513
- * @returns unknown Settings updated successfully
2514
- * @throws ApiError
2515
- */
2516
- public static userControllerUpdateUserSetting(
2517
- data: UserControllerUpdateUserSettingData
2518
- ): CancelablePromise<UserControllerUpdateUserSettingResponse> {
2519
- return __request(OpenAPI, {
2520
- method: 'PUT',
2521
- url: '/api/v1/users/setting',
2522
- body: data.requestBody,
2523
- mediaType: 'application/json',
2524
- errors: {
2525
- 403: 'Insufficient permissions'
2723
+ 400: 'Unsupported format',
2724
+ 401: 'Unauthorized'
2526
2725
  }
2527
2726
  });
2528
2727
  }
2529
2728
 
2530
2729
  /**
2531
- * Get all user settings paginated (admin only)
2730
+ * Get transaction rule statistics
2532
2731
  * @param data The data for the request.
2533
- * @param data.pageNo Page number
2534
- * @param data.pageSize Page size
2535
- * @returns unknown Settings list retrieved successfully
2732
+ * @param data.period Statistics time period
2733
+ * @param data.region Region code for tenant context
2734
+ * @returns RuleStatisticsResponseDto Rule statistics
2536
2735
  * @throws ApiError
2537
2736
  */
2538
- public static userControllerGetAllUserSettingsByPage(
2539
- data: UserControllerGetAllUserSettingsByPageData
2540
- ): CancelablePromise<UserControllerGetAllUserSettingsByPageResponse> {
2737
+ public static transactionRuleControllerGetStatistics(
2738
+ data: TransactionRuleControllerGetStatisticsData
2739
+ ): CancelablePromise<TransactionRuleControllerGetStatisticsResponse> {
2541
2740
  return __request(OpenAPI, {
2542
2741
  method: 'GET',
2543
- url: '/api/v1/users/settings-by-page',
2544
- query: {
2545
- pageNo: data.pageNo,
2546
- pageSize: data.pageSize
2742
+ url: '/api/v1/{region}/bean/transaction-rules/statistics/{period}',
2743
+ path: {
2744
+ period: data.period,
2745
+ region: data.region
2746
+ },
2747
+ errors: {
2748
+ 401: 'Unauthorized'
2547
2749
  }
2548
2750
  });
2549
2751
  }
2550
2752
 
2551
2753
  /**
2552
- * Get asset and liability summary for current user
2553
- * @returns unknown Summary retrieved successfully
2754
+ * Get transaction rule detail
2755
+ * @param data The data for the request.
2756
+ * @param data.ruleId Rule ID
2757
+ * @param data.region Region code for tenant context
2758
+ * @returns TransactionRuleResponseDto Rule details
2554
2759
  * @throws ApiError
2555
2760
  */
2556
- public static userControllerGetAssetLiabilitySummary(): CancelablePromise<UserControllerGetAssetLiabilitySummaryResponse> {
2761
+ public static transactionRuleControllerGetDetail(
2762
+ data: TransactionRuleControllerGetDetailData
2763
+ ): CancelablePromise<TransactionRuleControllerGetDetailResponse> {
2557
2764
  return __request(OpenAPI, {
2558
2765
  method: 'GET',
2559
- url: '/api/v1/users/asset-liability-summary'
2766
+ url: '/api/v1/{region}/bean/transaction-rules/{ruleId}',
2767
+ path: {
2768
+ ruleId: data.ruleId,
2769
+ region: data.region
2770
+ },
2771
+ errors: {
2772
+ 401: 'Unauthorized',
2773
+ 403: 'Forbidden - not owner of rule',
2774
+ 404: 'Rule not found'
2775
+ }
2560
2776
  });
2561
2777
  }
2562
- }
2563
2778
 
2564
- export class PropertiesService {
2565
2779
  /**
2566
- * Get all system properties
2567
- * @returns unknown Properties retrieved successfully
2780
+ * Update a transaction rule
2781
+ * @param data The data for the request.
2782
+ * @param data.ruleId Rule ID to update
2783
+ * @param data.region Region code for tenant context
2784
+ * @param data.requestBody
2785
+ * @returns TransactionRuleResponseDto Rule updated successfully
2568
2786
  * @throws ApiError
2569
2787
  */
2570
- public static propertyControllerGetAll(): CancelablePromise<PropertyControllerGetAllResponse> {
2788
+ public static transactionRuleControllerUpdate(
2789
+ data: TransactionRuleControllerUpdateData
2790
+ ): CancelablePromise<TransactionRuleControllerUpdateResponse> {
2571
2791
  return __request(OpenAPI, {
2572
- method: 'GET',
2573
- url: '/api/v1/admin/properties',
2792
+ method: 'PUT',
2793
+ url: '/api/v1/{region}/bean/transaction-rules/{ruleId}',
2794
+ path: {
2795
+ ruleId: data.ruleId,
2796
+ region: data.region
2797
+ },
2798
+ body: data.requestBody,
2799
+ mediaType: 'application/json',
2574
2800
  errors: {
2801
+ 400: 'Validation failed',
2575
2802
  401: 'Unauthorized',
2576
- 403: 'Forbidden - insufficient permissions'
2803
+ 403: 'Forbidden - not owner of rule',
2804
+ 404: 'Rule not found',
2805
+ 409: 'Resource conflict - rule is being modified by another process'
2577
2806
  }
2578
2807
  });
2579
2808
  }
2580
2809
 
2581
2810
  /**
2582
- * Get property by key
2811
+ * Delete a transaction rule
2583
2812
  * @param data The data for the request.
2584
- * @param data.key Property key
2585
- * @returns unknown Property retrieved successfully
2813
+ * @param data.ruleId Rule ID to delete
2814
+ * @param data.region Region code for tenant context
2815
+ * @returns void Rule deleted successfully
2586
2816
  * @throws ApiError
2587
2817
  */
2588
- public static propertyControllerGetByKey(
2589
- data: PropertyControllerGetByKeyData
2590
- ): CancelablePromise<PropertyControllerGetByKeyResponse> {
2818
+ public static transactionRuleControllerDelete(
2819
+ data: TransactionRuleControllerDeleteData
2820
+ ): CancelablePromise<TransactionRuleControllerDeleteResponse> {
2591
2821
  return __request(OpenAPI, {
2592
- method: 'GET',
2593
- url: '/api/v1/admin/properties/{key}',
2822
+ method: 'DELETE',
2823
+ url: '/api/v1/{region}/bean/transaction-rules/{ruleId}',
2594
2824
  path: {
2595
- key: data.key
2825
+ ruleId: data.ruleId,
2826
+ region: data.region
2596
2827
  },
2597
2828
  errors: {
2598
2829
  401: 'Unauthorized',
2599
- 403: 'Forbidden - insufficient permissions',
2600
- 404: 'Property not found'
2830
+ 403: 'Forbidden - not owner of rule',
2831
+ 404: 'Rule not found',
2832
+ 409: 'Resource conflict - rule is being modified by another process'
2601
2833
  }
2602
2834
  });
2603
2835
  }
2604
2836
 
2605
2837
  /**
2606
- * Update a system property
2838
+ * Test rule matching
2607
2839
  * @param data The data for the request.
2608
- * @param data.key Property key
2840
+ * @param data.ruleId Rule ID to test
2841
+ * @param data.region Region code for tenant context
2609
2842
  * @param data.requestBody
2610
- * @returns unknown Property updated successfully
2843
+ * @returns TestRuleResponseDto Test result
2611
2844
  * @throws ApiError
2612
2845
  */
2613
- public static propertyControllerUpdate(
2614
- data: PropertyControllerUpdateData
2615
- ): CancelablePromise<PropertyControllerUpdateResponse> {
2846
+ public static transactionRuleControllerTest(
2847
+ data: TransactionRuleControllerTestData
2848
+ ): CancelablePromise<TransactionRuleControllerTestResponse> {
2616
2849
  return __request(OpenAPI, {
2617
- method: 'PUT',
2618
- url: '/api/v1/admin/properties/{key}',
2850
+ method: 'POST',
2851
+ url: '/api/v1/{region}/bean/transaction-rules/{ruleId}/test',
2619
2852
  path: {
2620
- key: data.key
2853
+ ruleId: data.ruleId,
2854
+ region: data.region
2621
2855
  },
2622
2856
  body: data.requestBody,
2623
2857
  mediaType: 'application/json',
2624
2858
  errors: {
2625
2859
  401: 'Unauthorized',
2626
- 403: 'Forbidden - insufficient permissions'
2860
+ 403: 'Forbidden - not owner of rule',
2861
+ 404: 'Rule not found'
2627
2862
  }
2628
2863
  });
2629
2864
  }
2865
+ }
2630
2866
 
2867
+ export class BeanCategoryCatalogService {
2631
2868
  /**
2632
- * Delete a system property
2869
+ * List category catalog for a region
2870
+ * Returns the region-scoped category slugs (expense/income/investment/banking/transfer/payment) for the NLP result picker, each with the categoryAccount paths the region-enabled system rules map it to (#816). CN-exclusive payment instruments (huabei/baitiao) appear only under /cn.
2633
2871
  * @param data The data for the request.
2634
- * @param data.key Property key
2635
- * @returns void Property deleted successfully
2872
+ * @param data.region Region code for tenant context
2873
+ * @param data.scenario Filter by scenario
2874
+ * @param data.routeBearing Filter by routeBearing (entity-router route() consumes it)
2875
+ * @returns CategoryCatalogListResponseDto Category catalog retrieved successfully
2636
2876
  * @throws ApiError
2637
2877
  */
2638
- public static propertyControllerDelete(
2639
- data: PropertyControllerDeleteData
2640
- ): CancelablePromise<PropertyControllerDeleteResponse> {
2878
+ public static categoryCatalogControllerList(
2879
+ data: CategoryCatalogControllerListData
2880
+ ): CancelablePromise<CategoryCatalogControllerListResponse> {
2641
2881
  return __request(OpenAPI, {
2642
- method: 'DELETE',
2643
- url: '/api/v1/admin/properties/{key}',
2882
+ method: 'GET',
2883
+ url: '/api/v1/{region}/bean/categories',
2644
2884
  path: {
2645
- key: data.key
2885
+ region: data.region
2646
2886
  },
2647
- errors: {
2648
- 401: 'Unauthorized',
2649
- 403: 'Forbidden - insufficient permissions',
2650
- 404: 'Property not found'
2887
+ query: {
2888
+ scenario: data.scenario,
2889
+ routeBearing: data.routeBearing
2651
2890
  }
2652
2891
  });
2653
2892
  }
@@ -2828,6 +3067,33 @@ export class LifeEventsService {
2828
3067
  }
2829
3068
  }
2830
3069
 
3070
+ export class OnboardingService {
3071
+ /**
3072
+ * Bootstrap core accounts + register asset accounts with opening balances (ADR-0113)
3073
+ * @param data The data for the request.
3074
+ * @param data.region Region code for tenant context. Not-yet-open codes are accepted: the universal catalog backs onboarding regardless of region (#759)
3075
+ * @param data.requestBody
3076
+ * @returns unknown Onboarding bootstrap result.
3077
+ * @throws ApiError
3078
+ */
3079
+ public static onboardingControllerBootstrap(
3080
+ data: OnboardingControllerBootstrapData
3081
+ ): CancelablePromise<OnboardingControllerBootstrapResponse> {
3082
+ return __request(OpenAPI, {
3083
+ method: 'POST',
3084
+ url: '/api/v1/{region}/bean/onboarding',
3085
+ path: {
3086
+ region: data.region
3087
+ },
3088
+ body: data.requestBody,
3089
+ mediaType: 'application/json',
3090
+ errors: {
3091
+ 422: 'Invalid region/account path/duplicate paths.'
3092
+ }
3093
+ });
3094
+ }
3095
+ }
3096
+
2831
3097
  export class BalanceReconciliationService {
2832
3098
  /**
2833
3099
  * Preview reconciliation (book vs actual)
@@ -2938,7 +3204,7 @@ export class BeanExportService {
2938
3204
  /**
2939
3205
  * Export Beancount ledger as ZIP
2940
3206
  * Export all user Beancount data as a ZIP file containing ledger.beancount and yearly files in community format.
2941
- * @returns unknown
3207
+ * @returns binary ZIP archive (application/zip) streamed as an attachment
2942
3208
  * @throws ApiError
2943
3209
  */
2944
3210
  public static exportControllerExportBeancount(): CancelablePromise<ExportControllerExportBeancountResponse> {
@@ -3041,187 +3307,72 @@ export class BeanImportService {
3041
3307
  * @throws ApiError
3042
3308
  */
3043
3309
  public static importerConfigControllerGetConfig(
3044
- data: ImporterConfigControllerGetConfigData
3045
- ): CancelablePromise<ImporterConfigControllerGetConfigResponse> {
3046
- return __request(OpenAPI, {
3047
- method: 'GET',
3048
- url: '/api/v1/{region}/bean/import/config/{importerId}',
3049
- path: {
3050
- importerId: data.importerId,
3051
- region: data.region
3052
- },
3053
- errors: {
3054
- 400: 'Invalid input - Unsupported importer',
3055
- 401: 'Unauthorized - Authentication required'
3056
- }
3057
- });
3058
- }
3059
-
3060
- /**
3061
- * Update importer configuration
3062
- * Updates the configuration for the specified importer. Partial updates are supported.
3063
- * @param data The data for the request.
3064
- * @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
3065
- * @param data.region Region code for tenant context
3066
- * @param data.requestBody Partial configuration update. Only provided fields will be updated.
3067
- * @returns ImporterConfigDto Configuration updated successfully
3068
- * @throws ApiError
3069
- */
3070
- public static importerConfigControllerUpdateConfig(
3071
- data: ImporterConfigControllerUpdateConfigData
3072
- ): CancelablePromise<ImporterConfigControllerUpdateConfigResponse> {
3073
- return __request(OpenAPI, {
3074
- method: 'PUT',
3075
- url: '/api/v1/{region}/bean/import/config/{importerId}',
3076
- path: {
3077
- importerId: data.importerId,
3078
- region: data.region
3079
- },
3080
- body: data.requestBody,
3081
- mediaType: 'application/json',
3082
- errors: {
3083
- 400: 'Invalid input - Validation failed',
3084
- 404: 'Configuration not found'
3085
- }
3086
- });
3087
- }
3088
-
3089
- /**
3090
- * Reset configuration to default
3091
- * Resets the configuration for the specified importer to default values. This operation overwrites all existing configuration.
3092
- * @param data The data for the request.
3093
- * @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
3094
- * @param data.region Region code for tenant context
3095
- * @returns ImporterConfigDto Configuration reset successfully
3096
- * @throws ApiError
3097
- */
3098
- public static importerConfigControllerResetConfig(
3099
- data: ImporterConfigControllerResetConfigData
3100
- ): CancelablePromise<ImporterConfigControllerResetConfigResponse> {
3101
- return __request(OpenAPI, {
3102
- method: 'POST',
3103
- url: '/api/v1/{region}/bean/import/config/{importerId}/reset',
3104
- path: {
3105
- importerId: data.importerId,
3106
- region: data.region
3107
- },
3108
- errors: {
3109
- 400: 'Invalid input - Unsupported importer'
3110
- }
3111
- });
3112
- }
3113
- }
3114
-
3115
- export class BeanPlatformsService {
3116
- /**
3117
- * Get all platforms with statistics
3118
- * @returns unknown List of platforms with binding and account counts
3119
- * @throws ApiError
3120
- */
3121
- public static platformControllerFindAll(): CancelablePromise<PlatformControllerFindAllResponse> {
3122
- return __request(OpenAPI, {
3123
- method: 'GET',
3124
- url: '/api/v1/bean/platforms'
3125
- });
3126
- }
3127
-
3128
- /**
3129
- * Create a new platform
3130
- * @param data The data for the request.
3131
- * @param data.requestBody
3132
- * @returns unknown Platform created successfully
3133
- * @throws ApiError
3134
- */
3135
- public static platformControllerCreate(
3136
- data: PlatformControllerCreateData
3137
- ): CancelablePromise<PlatformControllerCreateResponse> {
3138
- return __request(OpenAPI, {
3139
- method: 'POST',
3140
- url: '/api/v1/bean/platforms',
3141
- body: data.requestBody,
3142
- mediaType: 'application/json',
3143
- errors: {
3144
- 409: 'Platform already exists'
3145
- }
3146
- });
3147
- }
3148
-
3149
- /**
3150
- * Get platform list for current user
3151
- * @returns unknown List of platforms with user binding status
3152
- * @throws ApiError
3153
- */
3154
- public static platformControllerGetPlatformList(): CancelablePromise<PlatformControllerGetPlatformListResponse> {
3155
- return __request(OpenAPI, {
3156
- method: 'GET',
3157
- url: '/api/v1/bean/platforms/list'
3158
- });
3159
- }
3160
-
3161
- /**
3162
- * Match platforms by name or alias
3163
- * @param data The data for the request.
3164
- * @param data.q Search query — Chinese name, English name, or abbreviation
3165
- * @param data.region Region code for category override lookup
3166
- * @returns unknown List of matching platforms with suggested segment names
3167
- * @throws ApiError
3168
- */
3169
- public static platformControllerMatchPlatforms(
3170
- data: PlatformControllerMatchPlatformsData
3171
- ): CancelablePromise<PlatformControllerMatchPlatformsResponse> {
3310
+ data: ImporterConfigControllerGetConfigData
3311
+ ): CancelablePromise<ImporterConfigControllerGetConfigResponse> {
3172
3312
  return __request(OpenAPI, {
3173
3313
  method: 'GET',
3174
- url: '/api/v1/bean/platforms/match',
3175
- query: {
3176
- q: data.q,
3314
+ url: '/api/v1/{region}/bean/import/config/{importerId}',
3315
+ path: {
3316
+ importerId: data.importerId,
3177
3317
  region: data.region
3318
+ },
3319
+ errors: {
3320
+ 400: 'Invalid input - Unsupported importer',
3321
+ 401: 'Unauthorized - Authentication required'
3178
3322
  }
3179
3323
  });
3180
3324
  }
3181
3325
 
3182
3326
  /**
3183
- * Update a platform
3327
+ * Update importer configuration
3328
+ * Updates the configuration for the specified importer. Partial updates are supported.
3184
3329
  * @param data The data for the request.
3185
- * @param data.id Platform ID
3186
- * @param data.requestBody
3187
- * @returns unknown Platform updated successfully
3330
+ * @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
3331
+ * @param data.region Region code for tenant context
3332
+ * @param data.requestBody Partial configuration update. Only provided fields will be updated.
3333
+ * @returns ImporterConfigDto Configuration updated successfully
3188
3334
  * @throws ApiError
3189
3335
  */
3190
- public static platformControllerUpdate(
3191
- data: PlatformControllerUpdateData
3192
- ): CancelablePromise<PlatformControllerUpdateResponse> {
3336
+ public static importerConfigControllerUpdateConfig(
3337
+ data: ImporterConfigControllerUpdateConfigData
3338
+ ): CancelablePromise<ImporterConfigControllerUpdateConfigResponse> {
3193
3339
  return __request(OpenAPI, {
3194
3340
  method: 'PUT',
3195
- url: '/api/v1/bean/platforms/{id}',
3341
+ url: '/api/v1/{region}/bean/import/config/{importerId}',
3196
3342
  path: {
3197
- id: data.id
3343
+ importerId: data.importerId,
3344
+ region: data.region
3198
3345
  },
3199
3346
  body: data.requestBody,
3200
3347
  mediaType: 'application/json',
3201
3348
  errors: {
3202
- 404: 'Platform not found'
3349
+ 400: 'Invalid input - Validation failed',
3350
+ 404: 'Configuration not found'
3203
3351
  }
3204
3352
  });
3205
3353
  }
3206
3354
 
3207
3355
  /**
3208
- * Delete a platform
3356
+ * Reset configuration to default
3357
+ * Resets the configuration for the specified importer to default values. This operation overwrites all existing configuration.
3209
3358
  * @param data The data for the request.
3210
- * @param data.id Platform ID
3211
- * @returns void Platform deleted successfully
3359
+ * @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
3360
+ * @param data.region Region code for tenant context
3361
+ * @returns ImporterConfigDto Configuration reset successfully
3212
3362
  * @throws ApiError
3213
3363
  */
3214
- public static platformControllerDelete(
3215
- data: PlatformControllerDeleteData
3216
- ): CancelablePromise<PlatformControllerDeleteResponse> {
3364
+ public static importerConfigControllerResetConfig(
3365
+ data: ImporterConfigControllerResetConfigData
3366
+ ): CancelablePromise<ImporterConfigControllerResetConfigResponse> {
3217
3367
  return __request(OpenAPI, {
3218
- method: 'DELETE',
3219
- url: '/api/v1/bean/platforms/{id}',
3368
+ method: 'POST',
3369
+ url: '/api/v1/{region}/bean/import/config/{importerId}/reset',
3220
3370
  path: {
3221
- id: data.id
3371
+ importerId: data.importerId,
3372
+ region: data.region
3222
3373
  },
3223
3374
  errors: {
3224
- 404: 'Platform not found'
3375
+ 400: 'Invalid input - Unsupported importer'
3225
3376
  }
3226
3377
  });
3227
3378
  }
@@ -3327,6 +3478,101 @@ export class ProviderSyncService {
3327
3478
  }
3328
3479
  }
3329
3480
 
3481
+ export class ExternalAccountLinksService {
3482
+ /**
3483
+ * Create an external account → BeanAccount mapping (ADR-0113)
3484
+ * @param data The data for the request.
3485
+ * @param data.region Region code for tenant context
3486
+ * @param data.requestBody
3487
+ * @returns ExternalAccountLinkResponseDto Link created.
3488
+ * @throws ApiError
3489
+ */
3490
+ public static externalAccountLinkControllerCreate(
3491
+ data: ExternalAccountLinkControllerCreateData
3492
+ ): CancelablePromise<ExternalAccountLinkControllerCreateResponse> {
3493
+ return __request(OpenAPI, {
3494
+ method: 'POST',
3495
+ url: '/api/v1/{region}/bean/external-account-links',
3496
+ path: {
3497
+ region: data.region
3498
+ },
3499
+ body: data.requestBody,
3500
+ mediaType: 'application/json',
3501
+ errors: {
3502
+ 422: 'beanAccountId not owned, or an active link already exists.'
3503
+ }
3504
+ });
3505
+ }
3506
+
3507
+ /**
3508
+ * List the user's active external account links
3509
+ * @param data The data for the request.
3510
+ * @param data.provider
3511
+ * @param data.region Region code for tenant context
3512
+ * @returns ExternalAccountLinkListResponseDto Links retrieved.
3513
+ * @throws ApiError
3514
+ */
3515
+ public static externalAccountLinkControllerFindAll(
3516
+ data: ExternalAccountLinkControllerFindAllData
3517
+ ): CancelablePromise<ExternalAccountLinkControllerFindAllResponse> {
3518
+ return __request(OpenAPI, {
3519
+ method: 'GET',
3520
+ url: '/api/v1/{region}/bean/external-account-links',
3521
+ path: {
3522
+ region: data.region
3523
+ },
3524
+ query: {
3525
+ provider: data.provider
3526
+ }
3527
+ });
3528
+ }
3529
+
3530
+ /**
3531
+ * Get a single external account link
3532
+ * @param data The data for the request.
3533
+ * @param data.id
3534
+ * @param data.region Region code for tenant context
3535
+ * @returns ExternalAccountLinkResponseDto Link retrieved.
3536
+ * @throws ApiError
3537
+ */
3538
+ public static externalAccountLinkControllerFindOne(
3539
+ data: ExternalAccountLinkControllerFindOneData
3540
+ ): CancelablePromise<ExternalAccountLinkControllerFindOneResponse> {
3541
+ return __request(OpenAPI, {
3542
+ method: 'GET',
3543
+ url: '/api/v1/{region}/bean/external-account-links/{id}',
3544
+ path: {
3545
+ id: data.id,
3546
+ region: data.region
3547
+ },
3548
+ errors: {
3549
+ 422: 'Link not found or not owned by the user.'
3550
+ }
3551
+ });
3552
+ }
3553
+
3554
+ /**
3555
+ * Soft-delete (disconnect) an external account link
3556
+ * @param data The data for the request.
3557
+ * @param data.id
3558
+ * @param data.region Region code for tenant context
3559
+ * @returns void Link soft-deleted; historical transactions are unaffected.
3560
+ * @throws ApiError
3561
+ */
3562
+ public static externalAccountLinkControllerRemove(
3563
+ data: ExternalAccountLinkControllerRemoveData
3564
+ ): CancelablePromise<ExternalAccountLinkControllerRemoveResponse> {
3565
+ return __request(OpenAPI, {
3566
+ method: 'DELETE',
3567
+ url: '/api/v1/{region}/bean/external-account-links/{id}',
3568
+ path: {
3569
+ id: data.id,
3570
+ region: data.region
3571
+ }
3572
+ });
3573
+ }
3574
+ }
3575
+
3330
3576
  export class ImportTelemetryService {
3331
3577
  /**
3332
3578
  * Receive anonymous parser failure telemetry
@@ -3434,52 +3680,199 @@ export class BeanNlpService {
3434
3680
  * Clear dialogue session
3435
3681
  * Clear the current NLP dialogue session. Use this to cancel an ongoing multi-turn dialogue.
3436
3682
  * @param data The data for the request.
3437
- * @param data.region Region code for tenant context
3438
- * @param data.sessionId Specific session ID to clear (defaults to user session)
3439
- * @returns void Session cleared successfully
3683
+ * @param data.region Region code for tenant context
3684
+ * @param data.sessionId Specific session ID to clear (defaults to user session)
3685
+ * @returns void Session cleared successfully
3686
+ * @throws ApiError
3687
+ */
3688
+ public static nlpControllerClearSession(
3689
+ data: NlpControllerClearSessionData
3690
+ ): CancelablePromise<NlpControllerClearSessionResponse> {
3691
+ return __request(OpenAPI, {
3692
+ method: 'DELETE',
3693
+ url: '/api/v1/{region}/bean/nlp/session',
3694
+ path: {
3695
+ region: data.region
3696
+ },
3697
+ query: {
3698
+ sessionId: data.sessionId
3699
+ },
3700
+ errors: {
3701
+ 401: 'Unauthorized'
3702
+ }
3703
+ });
3704
+ }
3705
+
3706
+ /**
3707
+ * Get current session state
3708
+ * Get the current NLP dialogue session state. Useful for debugging and displaying session context in UI.
3709
+ * @param data The data for the request.
3710
+ * @param data.region Region code for tenant context
3711
+ * @param data.sessionId Specific session ID to get (defaults to user session)
3712
+ * @returns unknown Current session state (or null if no active session)
3713
+ * @throws ApiError
3714
+ */
3715
+ public static nlpControllerGetSession(
3716
+ data: NlpControllerGetSessionData
3717
+ ): CancelablePromise<NlpControllerGetSessionResponse> {
3718
+ return __request(OpenAPI, {
3719
+ method: 'GET',
3720
+ url: '/api/v1/{region}/bean/nlp/session',
3721
+ path: {
3722
+ region: data.region
3723
+ },
3724
+ query: {
3725
+ sessionId: data.sessionId
3726
+ },
3727
+ errors: {
3728
+ 401: 'Unauthorized'
3729
+ }
3730
+ });
3731
+ }
3732
+ }
3733
+
3734
+ export class BeanPlatformsService {
3735
+ /**
3736
+ * Get all platforms with statistics
3737
+ * @returns unknown List of platforms with binding and account counts
3738
+ * @throws ApiError
3739
+ */
3740
+ public static platformControllerFindAll(): CancelablePromise<PlatformControllerFindAllResponse> {
3741
+ return __request(OpenAPI, {
3742
+ method: 'GET',
3743
+ url: '/api/v1/bean/platforms'
3744
+ });
3745
+ }
3746
+
3747
+ /**
3748
+ * Create a new platform
3749
+ * @param data The data for the request.
3750
+ * @param data.requestBody
3751
+ * @returns unknown Platform created successfully
3752
+ * @throws ApiError
3753
+ */
3754
+ public static platformControllerCreate(
3755
+ data: PlatformControllerCreateData
3756
+ ): CancelablePromise<PlatformControllerCreateResponse> {
3757
+ return __request(OpenAPI, {
3758
+ method: 'POST',
3759
+ url: '/api/v1/bean/platforms',
3760
+ body: data.requestBody,
3761
+ mediaType: 'application/json',
3762
+ errors: {
3763
+ 409: 'Platform already exists'
3764
+ }
3765
+ });
3766
+ }
3767
+
3768
+ /**
3769
+ * Get platform list for current user
3770
+ * @param data The data for the request.
3771
+ * @param data.region Region code (ISO 3166-1 alpha-2) that biases within-type-bucket ordering (local-region platforms first). Case-insensitive — stored/compared UPPERCASE ("cn" == "CN").
3772
+ * @returns PlatformListItemDto List of platforms with user binding status
3773
+ * @throws ApiError
3774
+ */
3775
+ public static platformControllerGetPlatformList(
3776
+ data: PlatformControllerGetPlatformListData = {}
3777
+ ): CancelablePromise<PlatformControllerGetPlatformListResponse> {
3778
+ return __request(OpenAPI, {
3779
+ method: 'GET',
3780
+ url: '/api/v1/bean/platforms/list',
3781
+ query: {
3782
+ region: data.region
3783
+ }
3784
+ });
3785
+ }
3786
+
3787
+ /**
3788
+ * Match platforms by name or alias
3789
+ * @param data The data for the request.
3790
+ * @param data.q Search query — Chinese name, English name, or abbreviation
3791
+ * @param data.region Region code (ISO 3166-1 alpha-2) that biases within-tier ordering (local-region platforms first); also the intended categoryOverrides key. Case-insensitive — stored/compared UPPERCASE ("cn" == "CN").
3792
+ * @returns PlatformMatchResponseDto Matching platforms with overall match type and truncation flag
3793
+ * @throws ApiError
3794
+ */
3795
+ public static platformControllerMatchPlatforms(
3796
+ data: PlatformControllerMatchPlatformsData
3797
+ ): CancelablePromise<PlatformControllerMatchPlatformsResponse> {
3798
+ return __request(OpenAPI, {
3799
+ method: 'GET',
3800
+ url: '/api/v1/bean/platforms/match',
3801
+ query: {
3802
+ q: data.q,
3803
+ region: data.region
3804
+ }
3805
+ });
3806
+ }
3807
+
3808
+ /**
3809
+ * Get the region and candidate account standards for a platform
3810
+ * @param data The data for the request.
3811
+ * @param data.id Platform ID (from a match result)
3812
+ * @param data.region Region code (ISO 3166-1 alpha-2, case-insensitive). Required for global platforms (countryCode null) — resolved as their template region; ignored when the platform has its own countryCode.
3813
+ * @param data.type Filter templates by account type (path first segment)
3814
+ * @returns PlatformStandardsResponseDto Resolved region plus the merged account-standard catalog of that region (groupable by productCategory client-side)
3815
+ * @throws ApiError
3816
+ */
3817
+ public static platformControllerGetPlatformStandards(
3818
+ data: PlatformControllerGetPlatformStandardsData
3819
+ ): CancelablePromise<PlatformControllerGetPlatformStandardsResponse> {
3820
+ return __request(OpenAPI, {
3821
+ method: 'GET',
3822
+ url: '/api/v1/bean/platforms/{id}/standards',
3823
+ path: {
3824
+ id: data.id
3825
+ },
3826
+ query: {
3827
+ region: data.region,
3828
+ type: data.type
3829
+ }
3830
+ });
3831
+ }
3832
+
3833
+ /**
3834
+ * Update a platform
3835
+ * @param data The data for the request.
3836
+ * @param data.id Platform ID
3837
+ * @param data.requestBody
3838
+ * @returns unknown Platform updated successfully
3440
3839
  * @throws ApiError
3441
3840
  */
3442
- public static nlpControllerClearSession(
3443
- data: NlpControllerClearSessionData
3444
- ): CancelablePromise<NlpControllerClearSessionResponse> {
3841
+ public static platformControllerUpdate(
3842
+ data: PlatformControllerUpdateData
3843
+ ): CancelablePromise<PlatformControllerUpdateResponse> {
3445
3844
  return __request(OpenAPI, {
3446
- method: 'DELETE',
3447
- url: '/api/v1/{region}/bean/nlp/session',
3845
+ method: 'PUT',
3846
+ url: '/api/v1/bean/platforms/{id}',
3448
3847
  path: {
3449
- region: data.region
3450
- },
3451
- query: {
3452
- sessionId: data.sessionId
3848
+ id: data.id
3453
3849
  },
3850
+ body: data.requestBody,
3851
+ mediaType: 'application/json',
3454
3852
  errors: {
3455
- 401: 'Unauthorized'
3853
+ 404: 'Platform not found'
3456
3854
  }
3457
3855
  });
3458
3856
  }
3459
3857
 
3460
3858
  /**
3461
- * Get current session state
3462
- * Get the current NLP dialogue session state. Useful for debugging and displaying session context in UI.
3859
+ * Delete a platform
3463
3860
  * @param data The data for the request.
3464
- * @param data.region Region code for tenant context
3465
- * @param data.sessionId Specific session ID to get (defaults to user session)
3466
- * @returns unknown Current session state (or null if no active session)
3861
+ * @param data.id Platform ID
3862
+ * @returns void Platform deleted successfully
3467
3863
  * @throws ApiError
3468
3864
  */
3469
- public static nlpControllerGetSession(
3470
- data: NlpControllerGetSessionData
3471
- ): CancelablePromise<NlpControllerGetSessionResponse> {
3865
+ public static platformControllerDelete(
3866
+ data: PlatformControllerDeleteData
3867
+ ): CancelablePromise<PlatformControllerDeleteResponse> {
3472
3868
  return __request(OpenAPI, {
3473
- method: 'GET',
3474
- url: '/api/v1/{region}/bean/nlp/session',
3869
+ method: 'DELETE',
3870
+ url: '/api/v1/bean/platforms/{id}',
3475
3871
  path: {
3476
- region: data.region
3477
- },
3478
- query: {
3479
- sessionId: data.sessionId
3872
+ id: data.id
3480
3873
  },
3481
3874
  errors: {
3482
- 401: 'Unauthorized'
3875
+ 404: 'Platform not found'
3483
3876
  }
3484
3877
  });
3485
3878
  }
@@ -3639,217 +4032,97 @@ export class InvestmentService {
3639
4032
  }
3640
4033
  }
3641
4034
 
3642
- export class ReportingService {
3643
- /**
3644
- * Get portfolio value trends
3645
- *
3646
- * Returns time series data of portfolio net worth.
3647
- *
3648
- * **Multi-currency Support:**
3649
- * - `series[].byCurrency` - Currency breakdown for each data point
3650
- * - `byCurrency` - Separate time series grouped by currency
3651
- * - `warnings` - Exchange rate warnings if conversion failed
3652
- *
3653
- * **Parameters:**
3654
- * - `period`: Time period (1m, 3m, 6m, 1y)
3655
- * - `granularity`: Data granularity (day, week, month)
3656
- *
3657
- * @param data The data for the request.
3658
- * @param data.region Region code for tenant context
3659
- * @param data.period Time period
3660
- * @param data.granularity Data granularity
3661
- * @returns PortfolioTrendsResponseDto Trends retrieved successfully
3662
- * @throws ApiError
3663
- */
3664
- public static reportingControllerGetPortfolioTrends(
3665
- data: ReportingControllerGetPortfolioTrendsData
3666
- ): CancelablePromise<ReportingControllerGetPortfolioTrendsResponse> {
3667
- return __request(OpenAPI, {
3668
- method: 'GET',
3669
- url: '/api/v1/{region}/reporting/portfolio/trends',
3670
- path: {
3671
- region: data.region
3672
- },
3673
- query: {
3674
- period: data.period,
3675
- granularity: data.granularity
3676
- },
3677
- errors: {
3678
- 401: 'User not authenticated'
3679
- }
3680
- });
3681
- }
3682
-
4035
+ export class ApiKeysService {
3683
4036
  /**
3684
- * Get cash-flow trends
3685
- *
3686
- * Monthly income / expense / netSavings over a fixed N-month window
3687
- * (current month + N−1 prior). Missing months are zero-filled (flow metric).
3688
- *
3689
- * **Parameters:**
3690
- * - `period`: 1m | 3m | 6m | 1y (default 6m)
3691
- * - `granularity`: accepted for API symmetry; v1 returns month buckets
3692
- *
3693
- * @param data The data for the request.
3694
- * @param data.region Region code for tenant context
3695
- * @param data.period Time period
3696
- * @param data.granularity Data granularity (accepted for API symmetry; v1 returns month buckets)
3697
- * @returns CashFlowTrendsResponseDto Cash-flow trends retrieved successfully
4037
+ * Create API key
4038
+ * Generates a new API key for the authenticated user
4039
+ * @returns unknown API key created successfully
3698
4040
  * @throws ApiError
3699
4041
  */
3700
- public static reportingControllerGetCashFlowTrends(
3701
- data: ReportingControllerGetCashFlowTrendsData
3702
- ): CancelablePromise<ReportingControllerGetCashFlowTrendsResponse> {
4042
+ public static apiKeysControllerCreateApiKey(): CancelablePromise<ApiKeysControllerCreateApiKeyResponse> {
3703
4043
  return __request(OpenAPI, {
3704
- method: 'GET',
3705
- url: '/api/v1/{region}/reporting/cash-flow/trends',
3706
- path: {
3707
- region: data.region
3708
- },
3709
- query: {
3710
- period: data.period,
3711
- granularity: data.granularity
3712
- },
4044
+ method: 'POST',
4045
+ url: '/api/v1/auth/api-keys',
3713
4046
  errors: {
3714
- 401: 'User not authenticated'
4047
+ 403: 'Insufficient permissions to create API key'
3715
4048
  }
3716
4049
  });
3717
4050
  }
4051
+ }
3718
4052
 
4053
+ export class AuthService {
3719
4054
  /**
3720
- * Generate portfolio snapshot
3721
- *
3722
- * Manually generate a portfolio snapshot for a specific date.
3723
- *
3724
- * **Multi-currency Support:**
3725
- * - Fetches balances grouped by currency
3726
- * - Uses user's baseCurrency setting for conversion
3727
- * - Stores exchange rates and warnings
3728
- *
3729
- * **Use Cases:**
3730
- * - Testing snapshot generation
3731
- * - Force regeneration after data correction
3732
- * - Initial setup for new users
3733
- *
4055
+ * Anonymous login with access token
3734
4056
  * @param data The data for the request.
3735
- * @param data.region Region code for tenant context
3736
- * @param data.requestBody Optional date (defaults to today)
3737
- * @returns GenerateSnapshotResponse Snapshot generated successfully
4057
+ * @param data.requestBody
4058
+ * @returns AnonymousLoginResponseDto Login successful
3738
4059
  * @throws ApiError
3739
4060
  */
3740
- public static reportingControllerGenerateSnapshot(
3741
- data: ReportingControllerGenerateSnapshotData
3742
- ): CancelablePromise<ReportingControllerGenerateSnapshotResponse> {
4061
+ public static authControllerAccessTokenLogin(
4062
+ data: AuthControllerAccessTokenLoginData
4063
+ ): CancelablePromise<AuthControllerAccessTokenLoginResponse> {
3743
4064
  return __request(OpenAPI, {
3744
4065
  method: 'POST',
3745
- url: '/api/v1/{region}/reporting/snapshots/generate',
3746
- path: {
3747
- region: data.region
3748
- },
4066
+ url: '/api/v1/auth/sessions/anonymous',
3749
4067
  body: data.requestBody,
3750
4068
  mediaType: 'application/json',
3751
4069
  errors: {
3752
- 400: 'Invalid date format',
3753
- 401: 'User not authenticated'
4070
+ 401: 'Invalid access token'
3754
4071
  }
3755
4072
  });
3756
4073
  }
4074
+ }
3757
4075
 
4076
+ export class CommunityService {
3758
4077
  /**
3759
- * Backfill portfolio snapshots
3760
- *
3761
- * Generate snapshots for a date range (historical data backfill).
3762
- *
3763
- * **Multi-currency Support:**
3764
- * - Each snapshot includes multi-currency data
3765
- * - Uses exchange rates available at generation time
3766
- * - Warnings stored for missing exchange rates
3767
- *
3768
- * **Best Practices:**
3769
- * - Use for initial setup after account configuration
3770
- * - Run during low-traffic periods for large date ranges
3771
- * - Existing snapshots are skipped (not regenerated)
3772
- *
4078
+ * Relay a sanitized parser-contribution payload
4079
+ * A server-side bot re-sanitizes the payload and opens an issue on the target repository; the issue URL is returned. The payload is never persisted or logged (forward-and-drop).
3773
4080
  * @param data The data for the request.
3774
- * @param data.region Region code for tenant context
4081
+ * @param data.region Region code for tenant context (routing only; the institution region rides in the payload meta)
3775
4082
  * @param data.requestBody
3776
- * @returns BackfillSnapshotsResponse Backfill completed successfully
4083
+ * @returns ParserContributionRelayResponseDto Issue created by the bot
3777
4084
  * @throws ApiError
3778
4085
  */
3779
- public static reportingControllerBackfillSnapshots(
3780
- data: ReportingControllerBackfillSnapshotsData
3781
- ): CancelablePromise<ReportingControllerBackfillSnapshotsResponse> {
4086
+ public static parserContributionControllerCreate(
4087
+ data: ParserContributionControllerCreateData
4088
+ ): CancelablePromise<ParserContributionControllerCreateResponse> {
3782
4089
  return __request(OpenAPI, {
3783
4090
  method: 'POST',
3784
- url: '/api/v1/{region}/reporting/snapshots/backfill',
4091
+ url: '/api/v1/{region}/community/parser-contributions',
3785
4092
  path: {
3786
4093
  region: data.region
3787
4094
  },
3788
4095
  body: data.requestBody,
3789
4096
  mediaType: 'application/json',
3790
4097
  errors: {
3791
- 400: 'Invalid date format or range',
3792
- 401: 'User not authenticated',
3793
- 409: 'Backfill already in progress for this user'
3794
- }
3795
- });
3796
- }
3797
- }
3798
-
3799
- export class ApiKeysService {
3800
- /**
3801
- * Create API key
3802
- * Generates a new API key for the authenticated user
3803
- * @returns unknown API key created successfully
3804
- * @throws ApiError
3805
- */
3806
- public static apiKeysControllerCreateApiKey(): CancelablePromise<ApiKeysControllerCreateApiKeyResponse> {
3807
- return __request(OpenAPI, {
3808
- method: 'POST',
3809
- url: '/api/v1/auth/api-keys',
3810
- errors: {
3811
- 403: 'Insufficient permissions to create API key'
4098
+ 401: 'Unauthorized',
4099
+ 422: 'Validation failed (institution slug, empty samples, row/cell size limits)',
4100
+ 429: 'Rate limited (5 submissions per user per hour)',
4101
+ 501: 'Relay not configured on this deployment — clients fall back to the clipboard flow',
4102
+ 502: 'GitHub bot failure (upstream), safe to retry'
3812
4103
  }
3813
4104
  });
3814
4105
  }
3815
4106
  }
3816
4107
 
3817
- export class AuthService {
4108
+ export class AdminCacheService {
3818
4109
  /**
3819
- * Anonymous login with access token
3820
- * @param data The data for the request.
3821
- * @param data.requestBody
3822
- * @returns unknown Login successful
4110
+ * Flush entire cache (L1 + L2)
4111
+ * Clears ALL cache entries across ALL namespaces and users. Use only for emergency cache corruption recovery, maintenance-window refresh, or development resets.
4112
+ * @returns unknown Cache flushed successfully
3823
4113
  * @throws ApiError
3824
4114
  */
3825
- public static authControllerAccessTokenLogin(
3826
- data: AuthControllerAccessTokenLoginData
3827
- ): CancelablePromise<AuthControllerAccessTokenLoginResponse> {
4115
+ public static cacheControllerFlushCache(): CancelablePromise<CacheControllerFlushCacheResponse> {
3828
4116
  return __request(OpenAPI, {
3829
4117
  method: 'POST',
3830
- url: '/api/v1/auth/sessions/anonymous',
3831
- body: data.requestBody,
3832
- mediaType: 'application/json',
4118
+ url: '/api/v1/cache/flush',
3833
4119
  errors: {
3834
- 401: 'Invalid access token'
4120
+ 403: 'Admin access required'
3835
4121
  }
3836
4122
  });
3837
4123
  }
3838
4124
  }
3839
4125
 
3840
- export class DefaultService {
3841
- /**
3842
- * @returns unknown
3843
- * @throws ApiError
3844
- */
3845
- public static cacheControllerFlushCache(): CancelablePromise<CacheControllerFlushCacheResponse> {
3846
- return __request(OpenAPI, {
3847
- method: 'POST',
3848
- url: '/api/v1/cache/flush'
3849
- });
3850
- }
3851
- }
3852
-
3853
4126
  export class ExchangeRateService {
3854
4127
  /**
3855
4128
  * Get exchange rate for currency pair
@@ -4006,3 +4279,53 @@ export class InfoService {
4006
4279
  });
4007
4280
  }
4008
4281
  }
4282
+
4283
+ export class MarketDataService {
4284
+ /**
4285
+ * Search market symbols by name or code
4286
+ * Ranked search over the openbb catalog. Empty `q` returns [].
4287
+ * @param data The data for the request.
4288
+ * @param data.q Search term — matched against symbol and instrument name. Empty string returns [].
4289
+ * @param data.limit Maximum number of results (clamped 1..50)
4290
+ * @param data.exchange Filter by exchange code (e.g. US, HK, SS, SZ)
4291
+ * @param data.assetType Filter by OpenBB asset_type (e.g. stock, etf)
4292
+ * @returns SymbolSearchResultDto Ranked search results
4293
+ * @throws ApiError
4294
+ */
4295
+ public static symbolControllerSearch(
4296
+ data: SymbolControllerSearchData
4297
+ ): CancelablePromise<SymbolControllerSearchResponse> {
4298
+ return __request(OpenAPI, {
4299
+ method: 'GET',
4300
+ url: '/api/v1/market/symbols/search',
4301
+ query: {
4302
+ q: data.q,
4303
+ limit: data.limit,
4304
+ exchange: data.exchange,
4305
+ assetType: data.assetType
4306
+ }
4307
+ });
4308
+ }
4309
+
4310
+ /**
4311
+ * Get a market symbol quote
4312
+ * @param data The data for the request.
4313
+ * @param data.symbol
4314
+ * @returns SymbolQuoteDto Symbol quote
4315
+ * @throws ApiError
4316
+ */
4317
+ public static symbolControllerGetQuote(
4318
+ data: SymbolControllerGetQuoteData
4319
+ ): CancelablePromise<SymbolControllerGetQuoteResponse> {
4320
+ return __request(OpenAPI, {
4321
+ method: 'GET',
4322
+ url: '/api/v1/market/symbols/{symbol}/quote',
4323
+ path: {
4324
+ symbol: data.symbol
4325
+ },
4326
+ errors: {
4327
+ 404: 'Symbol not found in the openbb catalog'
4328
+ }
4329
+ });
4330
+ }
4331
+ }