@firela/api-types 0.0.0-canary.e7fcdb9d → 0.0.0-canary.e85e9088

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.
@@ -99,6 +99,14 @@ import type {
99
99
  CommodityControllerGetOrCreateResponse,
100
100
  CommodityControllerBulkCreateData,
101
101
  CommodityControllerBulkCreateResponse,
102
+ ReportingControllerGetPortfolioTrendsData,
103
+ ReportingControllerGetPortfolioTrendsResponse,
104
+ ReportingControllerGetCashFlowTrendsData,
105
+ ReportingControllerGetCashFlowTrendsResponse,
106
+ ReportingControllerGenerateSnapshotData,
107
+ ReportingControllerGenerateSnapshotResponse,
108
+ ReportingControllerBackfillSnapshotsData,
109
+ ReportingControllerBackfillSnapshotsResponse,
102
110
  PriceControllerCreateData,
103
111
  PriceControllerCreateResponse,
104
112
  PriceControllerFindAllData,
@@ -111,6 +119,28 @@ import type {
111
119
  PriceControllerDeleteResponse,
112
120
  PriceControllerBulkCreateData,
113
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,
114
144
  RecurringRuleControllerCreateData,
115
145
  RecurringRuleControllerCreateResponse,
116
146
  RecurringRuleControllerFindAllData,
@@ -143,36 +173,6 @@ import type {
143
173
  ExpectedTransactionControllerEnterNowResponse,
144
174
  ForecastControllerGetForecastData,
145
175
  ForecastControllerGetForecastResponse,
146
- ReportingControllerGetPortfolioTrendsData,
147
- ReportingControllerGetPortfolioTrendsResponse,
148
- ReportingControllerGetCashFlowTrendsData,
149
- ReportingControllerGetCashFlowTrendsResponse,
150
- ReportingControllerGenerateSnapshotData,
151
- ReportingControllerGenerateSnapshotResponse,
152
- ReportingControllerBackfillSnapshotsData,
153
- ReportingControllerBackfillSnapshotsResponse,
154
- UserControllerDeleteOwnUserData,
155
- UserControllerDeleteOwnUserResponse,
156
- UserControllerGetUserData,
157
- UserControllerGetUserResponse,
158
- UserControllerSignupUserData,
159
- UserControllerSignupUserResponse,
160
- UserControllerDeleteUserData,
161
- UserControllerDeleteUserResponse,
162
- UserControllerGetUserInfoData,
163
- UserControllerGetUserInfoResponse,
164
- UserControllerUpdateUserSettingData,
165
- UserControllerUpdateUserSettingResponse,
166
- UserControllerGetAllUserSettingsByPageData,
167
- UserControllerGetAllUserSettingsByPageResponse,
168
- UserControllerGetAssetLiabilitySummaryResponse,
169
- PropertyControllerGetAllResponse,
170
- PropertyControllerGetByKeyData,
171
- PropertyControllerGetByKeyResponse,
172
- PropertyControllerUpdateData,
173
- PropertyControllerUpdateResponse,
174
- PropertyControllerDeleteData,
175
- PropertyControllerDeleteResponse,
176
176
  TransactionRuleControllerCreateData,
177
177
  TransactionRuleControllerCreateResponse,
178
178
  TransactionRuleControllerListData,
@@ -193,6 +193,8 @@ import type {
193
193
  TransactionRuleControllerDeleteResponse,
194
194
  TransactionRuleControllerTestData,
195
195
  TransactionRuleControllerTestResponse,
196
+ CategoryCatalogControllerListData,
197
+ CategoryCatalogControllerListResponse,
196
198
  EventControllerCreateData,
197
199
  EventControllerCreateResponse,
198
200
  EventControllerFindAllData,
@@ -261,6 +263,8 @@ import type {
261
263
  PlatformControllerGetPlatformListResponse,
262
264
  PlatformControllerMatchPlatformsData,
263
265
  PlatformControllerMatchPlatformsResponse,
266
+ PlatformControllerGetPlatformStandardsData,
267
+ PlatformControllerGetPlatformStandardsResponse,
264
268
  PlatformControllerUpdateData,
265
269
  PlatformControllerUpdateResponse,
266
270
  PlatformControllerDeleteData,
@@ -278,6 +282,8 @@ import type {
278
282
  ApiKeysControllerCreateApiKeyResponse,
279
283
  AuthControllerAccessTokenLoginData,
280
284
  AuthControllerAccessTokenLoginResponse,
285
+ ParserContributionControllerCreateData,
286
+ ParserContributionControllerCreateResponse,
281
287
  CacheControllerFlushCacheResponse,
282
288
  ExchangeRateControllerGetExchangeRateData,
283
289
  ExchangeRateControllerGetExchangeRateResponse,
@@ -527,11 +533,11 @@ export class BeanAccountsService {
527
533
  export class BeanAccountStandardsService {
528
534
  /**
529
535
  * Get account templates
530
- * 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).
531
537
  * @param data The data for the request.
532
- * @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)
533
539
  * @param data.type Filter by account type
534
- * @param data.search Search term for path or description
540
+ * @param data.search Search term for path, description, aliases, or localized display name
535
541
  * @returns AccountStandardListResponseDto Account templates retrieved successfully
536
542
  * @throws ApiError
537
543
  */
@@ -555,7 +561,7 @@ export class BeanAccountStandardsService {
555
561
  * Get template metadata for an account path
556
562
  * Returns root type for a template path.
557
563
  * @param data The data for the request.
558
- * @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)
559
565
  * @param data.path Account path to check
560
566
  * @returns TemplateMetadataResponseDto Template metadata retrieved successfully
561
567
  * @throws ApiError
@@ -577,9 +583,9 @@ export class BeanAccountStandardsService {
577
583
 
578
584
  /**
579
585
  * Get available regions with hierarchy
580
- * 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)
581
587
  * @param data The data for the request.
582
- * @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)
583
589
  * @returns RegionsMetadataResponseDto Regions metadata retrieved successfully
584
590
  * @throws ApiError
585
591
  */
@@ -636,10 +642,11 @@ export class BeanTransactionsService {
636
642
  * @param data.offset Number of items to skip (default: 0)
637
643
  * @param data.dateFrom Filter by start date (inclusive), format: YYYY-MM-DD
638
644
  * @param data.dateTo Filter by end date (inclusive), format: YYYY-MM-DD
639
- * @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).
640
646
  * @param data.search Search in narration and payee fields (max 200 chars)
641
647
  * @param data.accountId Filter by account ID (transactions with postings to this account)
642
- * @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.
643
650
  * @returns TransactionListResponseDto Transaction list
644
651
  * @throws ApiError
645
652
  */
@@ -660,7 +667,8 @@ export class BeanTransactionsService {
660
667
  status: data.status,
661
668
  search: data.search,
662
669
  accountId: data.accountId,
663
- category: data.category
670
+ category: data.category,
671
+ flow: data.flow
664
672
  },
665
673
  errors: {
666
674
  400: 'Validation failed',
@@ -1373,7 +1381,7 @@ export class AdminPayeeProfilesService {
1373
1381
  * Removes verification status by setting verifiedAt to null.
1374
1382
  * @param data The data for the request.
1375
1383
  * @param data.id Payee profile ID (UUID)
1376
- * @returns PayeeProfileResponseDto Payee profile unverified successfully
1384
+ * @returns void Payee profile unverified successfully
1377
1385
  * @throws ApiError
1378
1386
  */
1379
1387
  public static payeeProfileAdminControllerUnverify(
@@ -1569,6 +1577,163 @@ export class BeanCommoditiesService {
1569
1577
  }
1570
1578
  }
1571
1579
 
1580
+ export class ReportingService {
1581
+ /**
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
+ *
1595
+ * @param data The data for the request.
1596
+ * @param data.region Region code for tenant context
1597
+ * @param data.period Time period
1598
+ * @param data.granularity Data granularity
1599
+ * @returns PortfolioTrendsResponseDto Trends retrieved successfully
1600
+ * @throws ApiError
1601
+ */
1602
+ public static reportingControllerGetPortfolioTrends(
1603
+ data: ReportingControllerGetPortfolioTrendsData
1604
+ ): CancelablePromise<ReportingControllerGetPortfolioTrendsResponse> {
1605
+ return __request(OpenAPI, {
1606
+ method: 'GET',
1607
+ url: '/api/v1/{region}/reporting/portfolio/trends',
1608
+ path: {
1609
+ region: data.region
1610
+ },
1611
+ query: {
1612
+ period: data.period,
1613
+ granularity: data.granularity
1614
+ },
1615
+ errors: {
1616
+ 401: 'User not authenticated'
1617
+ }
1618
+ });
1619
+ }
1620
+
1621
+ /**
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
+ *
1631
+ * @param data The data for the request.
1632
+ * @param data.region Region code for tenant context
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
1636
+ * @throws ApiError
1637
+ */
1638
+ public static reportingControllerGetCashFlowTrends(
1639
+ data: ReportingControllerGetCashFlowTrendsData
1640
+ ): CancelablePromise<ReportingControllerGetCashFlowTrendsResponse> {
1641
+ return __request(OpenAPI, {
1642
+ method: 'GET',
1643
+ url: '/api/v1/{region}/reporting/cash-flow/trends',
1644
+ path: {
1645
+ region: data.region
1646
+ },
1647
+ query: {
1648
+ period: data.period,
1649
+ granularity: data.granularity
1650
+ },
1651
+ errors: {
1652
+ 401: 'User not authenticated'
1653
+ }
1654
+ });
1655
+ }
1656
+
1657
+ /**
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
+ *
1672
+ * @param data The data for the request.
1673
+ * @param data.region Region code for tenant context
1674
+ * @param data.requestBody Optional date (defaults to today)
1675
+ * @returns GenerateSnapshotResponse Snapshot generated successfully
1676
+ * @throws ApiError
1677
+ */
1678
+ public static reportingControllerGenerateSnapshot(
1679
+ data: ReportingControllerGenerateSnapshotData
1680
+ ): CancelablePromise<ReportingControllerGenerateSnapshotResponse> {
1681
+ return __request(OpenAPI, {
1682
+ method: 'POST',
1683
+ url: '/api/v1/{region}/reporting/snapshots/generate',
1684
+ path: {
1685
+ region: data.region
1686
+ },
1687
+ body: data.requestBody,
1688
+ mediaType: 'application/json',
1689
+ errors: {
1690
+ 400: 'Invalid date format',
1691
+ 401: 'User not authenticated'
1692
+ }
1693
+ });
1694
+ }
1695
+
1696
+ /**
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
+ *
1711
+ * @param data The data for the request.
1712
+ * @param data.region Region code for tenant context
1713
+ * @param data.requestBody
1714
+ * @returns BackfillSnapshotsResponse Backfill completed successfully
1715
+ * @throws ApiError
1716
+ */
1717
+ public static reportingControllerBackfillSnapshots(
1718
+ data: ReportingControllerBackfillSnapshotsData
1719
+ ): CancelablePromise<ReportingControllerBackfillSnapshotsResponse> {
1720
+ return __request(OpenAPI, {
1721
+ method: 'POST',
1722
+ url: '/api/v1/{region}/reporting/snapshots/backfill',
1723
+ path: {
1724
+ region: data.region
1725
+ },
1726
+ body: data.requestBody,
1727
+ mediaType: 'application/json',
1728
+ errors: {
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
+
1572
1737
  export class BeanPricesService {
1573
1738
  /**
1574
1739
  * Create a new price
@@ -1736,843 +1901,686 @@ export class BeanPricesService {
1736
1901
  }
1737
1902
  }
1738
1903
 
1739
- export class RecurringRulesService {
1904
+ export class UsersService {
1740
1905
  /**
1741
- * Create a new recurring rule
1742
- * Creates a new recurring transaction rule for the authenticated user
1906
+ * Delete own user account
1743
1907
  * @param data The data for the request.
1744
- * @param data.region Region code for tenant context
1745
1908
  * @param data.requestBody
1746
- * @returns RecurringRuleResponseDto Rule created successfully
1909
+ * @returns void User deleted successfully
1747
1910
  * @throws ApiError
1748
1911
  */
1749
- public static recurringRuleControllerCreate(
1750
- data: RecurringRuleControllerCreateData
1751
- ): CancelablePromise<RecurringRuleControllerCreateResponse> {
1912
+ public static userControllerDeleteOwnUser(
1913
+ data: UserControllerDeleteOwnUserData
1914
+ ): CancelablePromise<UserControllerDeleteOwnUserResponse> {
1752
1915
  return __request(OpenAPI, {
1753
- method: 'POST',
1754
- url: '/api/v1/{region}/bean/recurring-rules',
1755
- path: {
1756
- region: data.region
1757
- },
1916
+ method: 'DELETE',
1917
+ url: '/api/v1/users',
1758
1918
  body: data.requestBody,
1759
1919
  mediaType: 'application/json',
1760
1920
  errors: {
1761
- 400: 'Invalid input data (e.g., autoCreate without accounts)',
1762
- 409: 'Rule with same name already exists'
1921
+ 403: 'Invalid access token'
1763
1922
  }
1764
1923
  });
1765
1924
  }
1766
1925
 
1767
1926
  /**
1768
- * List recurring rules
1769
- * Returns all recurring rules for the authenticated user with optional filtering
1927
+ * Get current authenticated user
1770
1928
  * @param data The data for the request.
1771
- * @param data.region Region code for tenant context
1772
- * @param data.isActive Filter by active status
1773
- * @param data.frequency Filter by frequency (WEEKLY, MONTHLY, etc.)
1774
- * @param data.hasAutoCreate Filter by autoCreate enabled
1775
- * @returns RecurringRuleResponseDto Rules retrieved successfully
1929
+ * @param data.acceptLanguage
1930
+ * @returns UserResponseDto User retrieved successfully
1776
1931
  * @throws ApiError
1777
1932
  */
1778
- public static recurringRuleControllerFindAll(
1779
- data: RecurringRuleControllerFindAllData
1780
- ): CancelablePromise<RecurringRuleControllerFindAllResponse> {
1933
+ public static userControllerGetUser(
1934
+ data: UserControllerGetUserData
1935
+ ): CancelablePromise<UserControllerGetUserResponse> {
1781
1936
  return __request(OpenAPI, {
1782
1937
  method: 'GET',
1783
- url: '/api/v1/{region}/bean/recurring-rules',
1784
- path: {
1785
- region: data.region
1786
- },
1787
- query: {
1788
- isActive: data.isActive,
1789
- frequency: data.frequency,
1790
- hasAutoCreate: data.hasAutoCreate
1938
+ url: '/api/v1/users',
1939
+ headers: {
1940
+ 'accept-language': data.acceptLanguage
1791
1941
  }
1792
1942
  });
1793
1943
  }
1794
1944
 
1795
1945
  /**
1796
- * Create recurring rule from transaction
1797
- * 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).
1798
1948
  * @param data The data for the request.
1799
- * @param data.transactionId Source transaction ID
1800
- * @param data.region Region code for tenant context
1801
1949
  * @param data.requestBody
1802
- * @returns RecurringRuleResponseDto Rule created successfully
1950
+ * @returns SignupResponseDto User created successfully
1803
1951
  * @throws ApiError
1804
1952
  */
1805
- public static recurringRuleControllerCreateFromTransaction(
1806
- data: RecurringRuleControllerCreateFromTransactionData
1807
- ): CancelablePromise<RecurringRuleControllerCreateFromTransactionResponse> {
1953
+ public static userControllerSignupUser(
1954
+ data: UserControllerSignupUserData
1955
+ ): CancelablePromise<UserControllerSignupUserResponse> {
1808
1956
  return __request(OpenAPI, {
1809
1957
  method: 'POST',
1810
- url: '/api/v1/{region}/bean/recurring-rules/from-transaction/{transactionId}',
1811
- path: {
1812
- transactionId: data.transactionId,
1813
- region: data.region
1814
- },
1958
+ url: '/api/v1/users',
1815
1959
  body: data.requestBody,
1816
1960
  mediaType: 'application/json',
1817
1961
  errors: {
1818
- 404: 'Transaction not found',
1819
- 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'
1820
1964
  }
1821
1965
  });
1822
1966
  }
1823
1967
 
1824
1968
  /**
1825
- * Get recurring rule by ID
1826
- * Returns a specific recurring rule with its details
1969
+ * Delete user by ID (admin only)
1827
1970
  * @param data The data for the request.
1828
- * @param data.id Rule ID
1829
- * @param data.region Region code for tenant context
1830
- * @returns RecurringRuleResponseDto Rule retrieved successfully
1971
+ * @param data.id User ID to delete
1972
+ * @returns void User deleted successfully
1831
1973
  * @throws ApiError
1832
1974
  */
1833
- public static recurringRuleControllerFindOne(
1834
- data: RecurringRuleControllerFindOneData
1835
- ): CancelablePromise<RecurringRuleControllerFindOneResponse> {
1975
+ public static userControllerDeleteUser(
1976
+ data: UserControllerDeleteUserData
1977
+ ): CancelablePromise<UserControllerDeleteUserResponse> {
1836
1978
  return __request(OpenAPI, {
1837
- method: 'GET',
1838
- url: '/api/v1/{region}/bean/recurring-rules/{id}',
1979
+ method: 'DELETE',
1980
+ url: '/api/v1/users/{id}',
1839
1981
  path: {
1840
- id: data.id,
1841
- region: data.region
1982
+ id: data.id
1842
1983
  },
1843
1984
  errors: {
1844
- 404: 'Rule not found'
1985
+ 403: 'Cannot delete own account or insufficient permissions'
1845
1986
  }
1846
1987
  });
1847
1988
  }
1848
1989
 
1849
1990
  /**
1850
- * Update recurring rule
1851
- * Updates an existing recurring rule
1991
+ * Get user info by user ID
1852
1992
  * @param data The data for the request.
1853
- * @param data.id Rule ID
1854
- * @param data.region Region code for tenant context
1855
- * @param data.requestBody
1856
- * @returns RecurringRuleResponseDto Rule updated successfully
1993
+ * @param data.id User ID
1994
+ * @returns unknown User info retrieved successfully
1857
1995
  * @throws ApiError
1858
1996
  */
1859
- public static recurringRuleControllerUpdate(
1860
- data: RecurringRuleControllerUpdateData
1861
- ): CancelablePromise<RecurringRuleControllerUpdateResponse> {
1997
+ public static userControllerGetUserInfo(
1998
+ data: UserControllerGetUserInfoData
1999
+ ): CancelablePromise<UserControllerGetUserInfoResponse> {
1862
2000
  return __request(OpenAPI, {
1863
- method: 'PATCH',
1864
- url: '/api/v1/{region}/bean/recurring-rules/{id}',
2001
+ method: 'GET',
2002
+ url: '/api/v1/users/{id}/info',
1865
2003
  path: {
1866
- id: data.id,
1867
- region: data.region
2004
+ id: data.id
1868
2005
  },
1869
- body: data.requestBody,
1870
- mediaType: 'application/json',
1871
2006
  errors: {
1872
- 400: 'Invalid input data',
1873
- 404: 'Rule not found'
2007
+ 403: 'Cannot access other user info without admin permission'
1874
2008
  }
1875
2009
  });
1876
2010
  }
1877
2011
 
1878
2012
  /**
1879
- * Delete recurring rule
1880
- * Soft deletes a recurring rule (sets isActive to false)
2013
+ * Update user settings
1881
2014
  * @param data The data for the request.
1882
- * @param data.id Rule ID
1883
- * @param data.region Region code for tenant context
1884
- * @returns void Rule deleted successfully
2015
+ * @param data.requestBody
2016
+ * @returns unknown Settings updated successfully
1885
2017
  * @throws ApiError
1886
2018
  */
1887
- public static recurringRuleControllerDelete(
1888
- data: RecurringRuleControllerDeleteData
1889
- ): CancelablePromise<RecurringRuleControllerDeleteResponse> {
2019
+ public static userControllerUpdateUserSetting(
2020
+ data: UserControllerUpdateUserSettingData
2021
+ ): CancelablePromise<UserControllerUpdateUserSettingResponse> {
1890
2022
  return __request(OpenAPI, {
1891
- method: 'DELETE',
1892
- url: '/api/v1/{region}/bean/recurring-rules/{id}',
1893
- path: {
1894
- id: data.id,
1895
- region: data.region
1896
- },
2023
+ method: 'PUT',
2024
+ url: '/api/v1/users/setting',
2025
+ body: data.requestBody,
2026
+ mediaType: 'application/json',
1897
2027
  errors: {
1898
- 404: 'Rule not found'
2028
+ 403: 'Insufficient permissions'
1899
2029
  }
1900
2030
  });
1901
2031
  }
1902
2032
 
1903
2033
  /**
1904
- * Get rule with statistics
1905
- * Returns a rule with pending/overdue counts and next expected date
2034
+ * Get all user settings paginated (admin only)
1906
2035
  * @param data The data for the request.
1907
- * @param data.id Rule ID
1908
- * @param data.region Region code for tenant context
1909
- * @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
1910
2039
  * @throws ApiError
1911
2040
  */
1912
- public static recurringRuleControllerGetWithStats(
1913
- data: RecurringRuleControllerGetWithStatsData
1914
- ): CancelablePromise<RecurringRuleControllerGetWithStatsResponse> {
2041
+ public static userControllerGetAllUserSettingsByPage(
2042
+ data: UserControllerGetAllUserSettingsByPageData
2043
+ ): CancelablePromise<UserControllerGetAllUserSettingsByPageResponse> {
1915
2044
  return __request(OpenAPI, {
1916
2045
  method: 'GET',
1917
- url: '/api/v1/{region}/bean/recurring-rules/{id}/stats',
1918
- path: {
1919
- id: data.id,
1920
- region: data.region
1921
- },
1922
- errors: {
1923
- 404: 'Rule not found'
2046
+ url: '/api/v1/users/settings-by-page',
2047
+ query: {
2048
+ pageNo: data.pageNo,
2049
+ pageSize: data.pageSize
1924
2050
  }
1925
2051
  });
1926
2052
  }
1927
- }
1928
2053
 
1929
- export class ExpectedTransactionsService {
1930
2054
  /**
1931
- * List expected transactions
1932
- * Returns expected transactions for the authenticated user with optional filtering
1933
- * @param data The data for the request.
1934
- * @param data.region Region code for tenant context
1935
- * @param data.ruleId Filter by recurring rule ID
1936
- * @param data.status Filter by status (PENDING, COMPLETED, SKIPPED)
1937
- * @param data.fromDate Filter by date range start (YYYY-MM-DD)
1938
- * @param data.toDate Filter by date range end (YYYY-MM-DD)
1939
- * @returns ExpectedTransactionListResponseDto Expected transactions retrieved successfully
2055
+ * Get asset and liability summary for current user
2056
+ * @returns unknown Summary retrieved successfully
1940
2057
  * @throws ApiError
1941
2058
  */
1942
- public static expectedTransactionControllerFindAll(
1943
- data: ExpectedTransactionControllerFindAllData
1944
- ): CancelablePromise<ExpectedTransactionControllerFindAllResponse> {
2059
+ public static userControllerGetAssetLiabilitySummary(): CancelablePromise<UserControllerGetAssetLiabilitySummaryResponse> {
1945
2060
  return __request(OpenAPI, {
1946
2061
  method: 'GET',
1947
- url: '/api/v1/{region}/bean/expected-transactions',
1948
- path: {
1949
- region: data.region
1950
- },
1951
- query: {
1952
- ruleId: data.ruleId,
1953
- status: data.status,
1954
- fromDate: data.fromDate,
1955
- toDate: data.toDate
1956
- }
2062
+ url: '/api/v1/users/asset-liability-summary'
1957
2063
  });
1958
2064
  }
2065
+ }
1959
2066
 
2067
+ export class PropertiesService {
1960
2068
  /**
1961
- * List overdue expected transactions
1962
- * Returns all overdue expected transactions (PENDING past tolerance)
1963
- * @param data The data for the request.
1964
- * @param data.region Region code for tenant context
1965
- * @returns ExpectedTransactionListResponseDto Overdue transactions retrieved successfully
2069
+ * Get all system properties
2070
+ * @returns unknown Properties retrieved successfully
1966
2071
  * @throws ApiError
1967
2072
  */
1968
- public static expectedTransactionControllerFindOverdue(
1969
- data: ExpectedTransactionControllerFindOverdueData
1970
- ): CancelablePromise<ExpectedTransactionControllerFindOverdueResponse> {
2073
+ public static propertyControllerGetAll(): CancelablePromise<PropertyControllerGetAllResponse> {
1971
2074
  return __request(OpenAPI, {
1972
2075
  method: 'GET',
1973
- url: '/api/v1/{region}/bean/expected-transactions/overdue',
1974
- path: {
1975
- region: data.region
2076
+ url: '/api/v1/admin/properties',
2077
+ errors: {
2078
+ 401: 'Unauthorized',
2079
+ 403: 'Forbidden - insufficient permissions'
1976
2080
  }
1977
2081
  });
1978
2082
  }
1979
2083
 
1980
2084
  /**
1981
- * Get expected transaction by ID
1982
- * Returns a specific expected transaction with rule details
2085
+ * Get property by key
1983
2086
  * @param data The data for the request.
1984
- * @param data.id Expected transaction ID
1985
- * @param data.region Region code for tenant context
1986
- * @returns ExpectedTransactionResponseDto Expected transaction retrieved successfully
2087
+ * @param data.key Property key
2088
+ * @returns unknown Property retrieved successfully
1987
2089
  * @throws ApiError
1988
2090
  */
1989
- public static expectedTransactionControllerFindOne(
1990
- data: ExpectedTransactionControllerFindOneData
1991
- ): CancelablePromise<ExpectedTransactionControllerFindOneResponse> {
2091
+ public static propertyControllerGetByKey(
2092
+ data: PropertyControllerGetByKeyData
2093
+ ): CancelablePromise<PropertyControllerGetByKeyResponse> {
1992
2094
  return __request(OpenAPI, {
1993
2095
  method: 'GET',
1994
- url: '/api/v1/{region}/bean/expected-transactions/{id}',
2096
+ url: '/api/v1/admin/properties/{key}',
1995
2097
  path: {
1996
- id: data.id,
1997
- region: data.region
2098
+ key: data.key
1998
2099
  },
1999
2100
  errors: {
2000
- 404: 'Expected transaction not found'
2101
+ 401: 'Unauthorized',
2102
+ 403: 'Forbidden - insufficient permissions',
2103
+ 404: 'Property not found'
2001
2104
  }
2002
2105
  });
2003
2106
  }
2004
2107
 
2005
2108
  /**
2006
- * Skip expected transaction
2007
- * Marks an expected transaction as skipped (PENDING -> SKIPPED)
2109
+ * Update a system property
2008
2110
  * @param data The data for the request.
2009
- * @param data.id Expected transaction ID
2010
- * @param data.region Region code for tenant context
2011
- * @returns ExpectedTransactionResponseDto Expected transaction skipped successfully
2111
+ * @param data.key Property key
2112
+ * @param data.requestBody
2113
+ * @returns unknown Property updated successfully
2012
2114
  * @throws ApiError
2013
2115
  */
2014
- public static expectedTransactionControllerSkip(
2015
- data: ExpectedTransactionControllerSkipData
2016
- ): CancelablePromise<ExpectedTransactionControllerSkipResponse> {
2116
+ public static propertyControllerUpdate(
2117
+ data: PropertyControllerUpdateData
2118
+ ): CancelablePromise<PropertyControllerUpdateResponse> {
2017
2119
  return __request(OpenAPI, {
2018
- method: 'POST',
2019
- url: '/api/v1/{region}/bean/expected-transactions/{id}/skip',
2120
+ method: 'PUT',
2121
+ url: '/api/v1/admin/properties/{key}',
2020
2122
  path: {
2021
- id: data.id,
2022
- region: data.region
2123
+ key: data.key
2023
2124
  },
2125
+ body: data.requestBody,
2126
+ mediaType: 'application/json',
2024
2127
  errors: {
2025
- 400: 'Cannot skip - not in PENDING status',
2026
- 404: 'Expected transaction not found'
2128
+ 401: 'Unauthorized',
2129
+ 403: 'Forbidden - insufficient permissions'
2027
2130
  }
2028
2131
  });
2029
2132
  }
2030
2133
 
2031
2134
  /**
2032
- * Undo skip
2033
- * Reverses a skip operation (SKIPPED -> PENDING)
2135
+ * Delete a system property
2034
2136
  * @param data The data for the request.
2035
- * @param data.id Expected transaction ID
2036
- * @param data.region Region code for tenant context
2037
- * @returns ExpectedTransactionResponseDto Skip undone successfully
2137
+ * @param data.key Property key
2138
+ * @returns void Property deleted successfully
2038
2139
  * @throws ApiError
2039
2140
  */
2040
- public static expectedTransactionControllerUndoSkip(
2041
- data: ExpectedTransactionControllerUndoSkipData
2042
- ): CancelablePromise<ExpectedTransactionControllerUndoSkipResponse> {
2141
+ public static propertyControllerDelete(
2142
+ data: PropertyControllerDeleteData
2143
+ ): CancelablePromise<PropertyControllerDeleteResponse> {
2043
2144
  return __request(OpenAPI, {
2044
2145
  method: 'DELETE',
2045
- url: '/api/v1/{region}/bean/expected-transactions/{id}/skip',
2146
+ url: '/api/v1/admin/properties/{key}',
2046
2147
  path: {
2047
- id: data.id,
2048
- region: data.region
2148
+ key: data.key
2049
2149
  },
2050
2150
  errors: {
2051
- 400: 'Cannot undo - not in SKIPPED status',
2052
- 404: 'Expected transaction not found'
2151
+ 401: 'Unauthorized',
2152
+ 403: 'Forbidden - insufficient permissions',
2153
+ 404: 'Property not found'
2053
2154
  }
2054
2155
  });
2055
2156
  }
2157
+ }
2056
2158
 
2159
+ export class RecurringRulesService {
2057
2160
  /**
2058
- * Confirm transaction match
2059
- * Manually matches an expected transaction with an actual transaction
2161
+ * Create a new recurring rule
2162
+ * Creates a new recurring transaction rule for the authenticated user
2060
2163
  * @param data The data for the request.
2061
- * @param data.id Expected transaction ID
2062
2164
  * @param data.region Region code for tenant context
2063
2165
  * @param data.requestBody
2064
- * @returns unknown Match confirmed successfully
2166
+ * @returns RecurringRuleResponseDto Rule created successfully
2065
2167
  * @throws ApiError
2066
2168
  */
2067
- public static expectedTransactionControllerConfirmMatch(
2068
- data: ExpectedTransactionControllerConfirmMatchData
2069
- ): CancelablePromise<ExpectedTransactionControllerConfirmMatchResponse> {
2169
+ public static recurringRuleControllerCreate(
2170
+ data: RecurringRuleControllerCreateData
2171
+ ): CancelablePromise<RecurringRuleControllerCreateResponse> {
2070
2172
  return __request(OpenAPI, {
2071
2173
  method: 'POST',
2072
- url: '/api/v1/{region}/bean/expected-transactions/{id}/match',
2174
+ url: '/api/v1/{region}/bean/recurring-rules',
2073
2175
  path: {
2074
- id: data.id,
2075
2176
  region: data.region
2076
2177
  },
2077
2178
  body: data.requestBody,
2078
2179
  mediaType: 'application/json',
2079
2180
  errors: {
2080
- 400: 'Cannot match - not in PENDING status',
2081
- 404: 'Expected or actual transaction not found',
2082
- 409: 'Actual transaction already matched to another rule'
2181
+ 400: 'Invalid input data (e.g., autoCreate without accounts)',
2182
+ 409: 'Rule with same name already exists'
2083
2183
  }
2084
2184
  });
2085
2185
  }
2086
2186
 
2087
2187
  /**
2088
- * Unmatch transaction
2089
- * Removes the match between expected and actual transaction (COMPLETED -> PENDING)
2188
+ * List recurring rules
2189
+ * Returns all recurring rules for the authenticated user with optional filtering
2090
2190
  * @param data The data for the request.
2091
- * @param data.id Expected transaction ID
2092
2191
  * @param data.region Region code for tenant context
2093
- * @returns unknown Match removed 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
2094
2196
  * @throws ApiError
2095
2197
  */
2096
- public static expectedTransactionControllerUnmatch(
2097
- data: ExpectedTransactionControllerUnmatchData
2098
- ): CancelablePromise<ExpectedTransactionControllerUnmatchResponse> {
2198
+ public static recurringRuleControllerFindAll(
2199
+ data: RecurringRuleControllerFindAllData
2200
+ ): CancelablePromise<RecurringRuleControllerFindAllResponse> {
2099
2201
  return __request(OpenAPI, {
2100
- method: 'DELETE',
2101
- url: '/api/v1/{region}/bean/expected-transactions/{id}/match',
2202
+ method: 'GET',
2203
+ url: '/api/v1/{region}/bean/recurring-rules',
2102
2204
  path: {
2103
- id: data.id,
2104
2205
  region: data.region
2105
2206
  },
2106
- errors: {
2107
- 400: 'Cannot unmatch - not in COMPLETED status',
2108
- 404: 'Expected transaction not found'
2207
+ query: {
2208
+ isActive: data.isActive,
2209
+ frequency: data.frequency,
2210
+ hasAutoCreate: data.hasAutoCreate
2109
2211
  }
2110
2212
  });
2111
2213
  }
2112
2214
 
2113
2215
  /**
2114
- * Enter Now
2115
- * Creates an actual transaction for an expected transaction (YNAB-style Enter Now)
2216
+ * Create recurring rule from transaction
2217
+ * Auto-creates a recurring rule using transaction data. User only confirms frequency.
2116
2218
  * @param data The data for the request.
2117
- * @param data.id Expected transaction ID
2219
+ * @param data.transactionId Source transaction ID
2118
2220
  * @param data.region Region code for tenant context
2119
2221
  * @param data.requestBody
2120
- * @returns unknown Transaction created successfully
2222
+ * @returns RecurringRuleResponseDto Rule created successfully
2121
2223
  * @throws ApiError
2122
2224
  */
2123
- public static expectedTransactionControllerEnterNow(
2124
- data: ExpectedTransactionControllerEnterNowData
2125
- ): CancelablePromise<ExpectedTransactionControllerEnterNowResponse> {
2225
+ public static recurringRuleControllerCreateFromTransaction(
2226
+ data: RecurringRuleControllerCreateFromTransactionData
2227
+ ): CancelablePromise<RecurringRuleControllerCreateFromTransactionResponse> {
2126
2228
  return __request(OpenAPI, {
2127
2229
  method: 'POST',
2128
- url: '/api/v1/{region}/bean/expected-transactions/{id}/enter',
2230
+ url: '/api/v1/{region}/bean/recurring-rules/from-transaction/{transactionId}',
2129
2231
  path: {
2130
- id: data.id,
2232
+ transactionId: data.transactionId,
2131
2233
  region: data.region
2132
2234
  },
2133
2235
  body: data.requestBody,
2134
2236
  mediaType: 'application/json',
2135
2237
  errors: {
2136
- 400: 'Cannot enter - not in PENDING status or missing accounts',
2137
- 404: 'Expected transaction or accounts not found'
2238
+ 404: 'Transaction not found',
2239
+ 409: 'Rule with same name already exists or transaction already linked'
2138
2240
  }
2139
2241
  });
2140
2242
  }
2141
- }
2142
2243
 
2143
- export class RecurringForecastService {
2144
2244
  /**
2145
- * Get cash flow forecast
2146
- * Returns predicted outflows for the next N months based on active recurring rules
2245
+ * Get recurring rule by ID
2246
+ * Returns a specific recurring rule with its details
2147
2247
  * @param data The data for the request.
2248
+ * @param data.id Rule ID
2148
2249
  * @param data.region Region code for tenant context
2149
- * @param data.months Number of months to forecast (1-12, default 3)
2150
- * @returns ForecastResponseDto Forecast retrieved successfully
2250
+ * @returns RecurringRuleResponseDto Rule retrieved successfully
2151
2251
  * @throws ApiError
2152
2252
  */
2153
- public static forecastControllerGetForecast(
2154
- data: ForecastControllerGetForecastData
2155
- ): CancelablePromise<ForecastControllerGetForecastResponse> {
2253
+ public static recurringRuleControllerFindOne(
2254
+ data: RecurringRuleControllerFindOneData
2255
+ ): CancelablePromise<RecurringRuleControllerFindOneResponse> {
2156
2256
  return __request(OpenAPI, {
2157
2257
  method: 'GET',
2158
- url: '/api/v1/{region}/bean/recurring/forecast',
2258
+ url: '/api/v1/{region}/bean/recurring-rules/{id}',
2159
2259
  path: {
2260
+ id: data.id,
2160
2261
  region: data.region
2161
2262
  },
2162
- query: {
2163
- months: data.months
2263
+ errors: {
2264
+ 404: 'Rule not found'
2164
2265
  }
2165
2266
  });
2166
2267
  }
2167
- }
2168
2268
 
2169
- export class ReportingService {
2170
2269
  /**
2171
- * Get portfolio value trends
2172
- *
2173
- * Returns time series data of portfolio net worth.
2174
- *
2175
- * **Multi-currency Support:**
2176
- * - `series[].byCurrency` - Currency breakdown for each data point
2177
- * - `byCurrency` - Separate time series grouped by currency
2178
- * - `warnings` - Exchange rate warnings if conversion failed
2179
- *
2180
- * **Parameters:**
2181
- * - `period`: Time period (1m, 3m, 6m, 1y)
2182
- * - `granularity`: Data granularity (day, week, month)
2183
- *
2270
+ * Update recurring rule
2271
+ * Updates an existing recurring rule
2184
2272
  * @param data The data for the request.
2273
+ * @param data.id Rule ID
2185
2274
  * @param data.region Region code for tenant context
2186
- * @param data.period Time period
2187
- * @param data.granularity Data granularity
2188
- * @returns PortfolioTrendsResponseDto Trends retrieved successfully
2275
+ * @param data.requestBody
2276
+ * @returns RecurringRuleResponseDto Rule updated successfully
2189
2277
  * @throws ApiError
2190
2278
  */
2191
- public static reportingControllerGetPortfolioTrends(
2192
- data: ReportingControllerGetPortfolioTrendsData
2193
- ): CancelablePromise<ReportingControllerGetPortfolioTrendsResponse> {
2279
+ public static recurringRuleControllerUpdate(
2280
+ data: RecurringRuleControllerUpdateData
2281
+ ): CancelablePromise<RecurringRuleControllerUpdateResponse> {
2194
2282
  return __request(OpenAPI, {
2195
- method: 'GET',
2196
- url: '/api/v1/{region}/reporting/portfolio/trends',
2283
+ method: 'PATCH',
2284
+ url: '/api/v1/{region}/bean/recurring-rules/{id}',
2197
2285
  path: {
2286
+ id: data.id,
2198
2287
  region: data.region
2199
2288
  },
2200
- query: {
2201
- period: data.period,
2202
- granularity: data.granularity
2203
- },
2289
+ body: data.requestBody,
2290
+ mediaType: 'application/json',
2204
2291
  errors: {
2205
- 401: 'User not authenticated'
2292
+ 400: 'Invalid input data',
2293
+ 404: 'Rule not found'
2206
2294
  }
2207
2295
  });
2208
2296
  }
2209
2297
 
2210
2298
  /**
2211
- * Get cash-flow trends
2212
- *
2213
- * Monthly income / expense / netSavings over a fixed N-month window
2214
- * (current month + N−1 prior). Missing months are zero-filled (flow metric).
2215
- *
2216
- * **Parameters:**
2217
- * - `period`: 1m | 3m | 6m | 1y (default 6m)
2218
- * - `granularity`: accepted for API symmetry; v1 returns month buckets
2219
- *
2299
+ * Delete recurring rule
2300
+ * Soft deletes a recurring rule (sets isActive to false)
2220
2301
  * @param data The data for the request.
2302
+ * @param data.id Rule ID
2221
2303
  * @param data.region Region code for tenant context
2222
- * @param data.period Time period
2223
- * @param data.granularity Data granularity (accepted for API symmetry; v1 returns month buckets)
2224
- * @returns CashFlowTrendsResponseDto Cash-flow trends retrieved successfully
2304
+ * @returns void Rule deleted successfully
2225
2305
  * @throws ApiError
2226
2306
  */
2227
- public static reportingControllerGetCashFlowTrends(
2228
- data: ReportingControllerGetCashFlowTrendsData
2229
- ): CancelablePromise<ReportingControllerGetCashFlowTrendsResponse> {
2307
+ public static recurringRuleControllerDelete(
2308
+ data: RecurringRuleControllerDeleteData
2309
+ ): CancelablePromise<RecurringRuleControllerDeleteResponse> {
2230
2310
  return __request(OpenAPI, {
2231
- method: 'GET',
2232
- url: '/api/v1/{region}/reporting/cash-flow/trends',
2311
+ method: 'DELETE',
2312
+ url: '/api/v1/{region}/bean/recurring-rules/{id}',
2233
2313
  path: {
2314
+ id: data.id,
2234
2315
  region: data.region
2235
2316
  },
2236
- query: {
2237
- period: data.period,
2238
- granularity: data.granularity
2239
- },
2240
2317
  errors: {
2241
- 401: 'User not authenticated'
2318
+ 404: 'Rule not found'
2242
2319
  }
2243
2320
  });
2244
2321
  }
2245
2322
 
2246
2323
  /**
2247
- * Generate portfolio snapshot
2248
- *
2249
- * Manually generate a portfolio snapshot for a specific date.
2250
- *
2251
- * **Multi-currency Support:**
2252
- * - Fetches balances grouped by currency
2253
- * - Uses user's baseCurrency setting for conversion
2254
- * - Stores exchange rates and warnings
2255
- *
2256
- * **Use Cases:**
2257
- * - Testing snapshot generation
2258
- * - Force regeneration after data correction
2259
- * - Initial setup for new users
2260
- *
2324
+ * Get rule with statistics
2325
+ * Returns a rule with pending/overdue counts and next expected date
2261
2326
  * @param data The data for the request.
2327
+ * @param data.id Rule ID
2262
2328
  * @param data.region Region code for tenant context
2263
- * @param data.requestBody Optional date (defaults to today)
2264
- * @returns GenerateSnapshotResponse Snapshot generated successfully
2329
+ * @returns RecurringRuleWithStatsResponseDto Rule with stats retrieved successfully
2265
2330
  * @throws ApiError
2266
2331
  */
2267
- public static reportingControllerGenerateSnapshot(
2268
- data: ReportingControllerGenerateSnapshotData
2269
- ): CancelablePromise<ReportingControllerGenerateSnapshotResponse> {
2332
+ public static recurringRuleControllerGetWithStats(
2333
+ data: RecurringRuleControllerGetWithStatsData
2334
+ ): CancelablePromise<RecurringRuleControllerGetWithStatsResponse> {
2270
2335
  return __request(OpenAPI, {
2271
- method: 'POST',
2272
- url: '/api/v1/{region}/reporting/snapshots/generate',
2336
+ method: 'GET',
2337
+ url: '/api/v1/{region}/bean/recurring-rules/{id}/stats',
2273
2338
  path: {
2339
+ id: data.id,
2274
2340
  region: data.region
2275
2341
  },
2276
- body: data.requestBody,
2277
- mediaType: 'application/json',
2278
2342
  errors: {
2279
- 400: 'Invalid date format',
2280
- 401: 'User not authenticated'
2343
+ 404: 'Rule not found'
2281
2344
  }
2282
2345
  });
2283
2346
  }
2347
+ }
2284
2348
 
2349
+ export class ExpectedTransactionsService {
2285
2350
  /**
2286
- * Backfill portfolio snapshots
2287
- *
2288
- * Generate snapshots for a date range (historical data backfill).
2289
- *
2290
- * **Multi-currency Support:**
2291
- * - Each snapshot includes multi-currency data
2292
- * - Uses exchange rates available at generation time
2293
- * - Warnings stored for missing exchange rates
2294
- *
2295
- * **Best Practices:**
2296
- * - Use for initial setup after account configuration
2297
- * - Run during low-traffic periods for large date ranges
2298
- * - Existing snapshots are skipped (not regenerated)
2299
- *
2351
+ * List expected transactions
2352
+ * Returns expected transactions for the authenticated user with optional filtering
2300
2353
  * @param data The data for the request.
2301
2354
  * @param data.region Region code for tenant context
2302
- * @param data.requestBody
2303
- * @returns BackfillSnapshotsResponse Backfill completed successfully
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
2304
2360
  * @throws ApiError
2305
2361
  */
2306
- public static reportingControllerBackfillSnapshots(
2307
- data: ReportingControllerBackfillSnapshotsData
2308
- ): CancelablePromise<ReportingControllerBackfillSnapshotsResponse> {
2362
+ public static expectedTransactionControllerFindAll(
2363
+ data: ExpectedTransactionControllerFindAllData
2364
+ ): CancelablePromise<ExpectedTransactionControllerFindAllResponse> {
2309
2365
  return __request(OpenAPI, {
2310
- method: 'POST',
2311
- url: '/api/v1/{region}/reporting/snapshots/backfill',
2366
+ method: 'GET',
2367
+ url: '/api/v1/{region}/bean/expected-transactions',
2312
2368
  path: {
2313
2369
  region: data.region
2314
2370
  },
2315
- body: data.requestBody,
2316
- mediaType: 'application/json',
2317
- errors: {
2318
- 400: 'Invalid date format or range',
2319
- 401: 'User not authenticated',
2320
- 409: 'Backfill already in progress for this user'
2321
- }
2322
- });
2323
- }
2324
- }
2325
-
2326
- export class UsersService {
2327
- /**
2328
- * Delete own user account
2329
- * @param data The data for the request.
2330
- * @param data.requestBody
2331
- * @returns void User deleted successfully
2332
- * @throws ApiError
2333
- */
2334
- public static userControllerDeleteOwnUser(
2335
- data: UserControllerDeleteOwnUserData
2336
- ): CancelablePromise<UserControllerDeleteOwnUserResponse> {
2337
- return __request(OpenAPI, {
2338
- method: 'DELETE',
2339
- url: '/api/v1/users',
2340
- body: data.requestBody,
2341
- mediaType: 'application/json',
2342
- errors: {
2343
- 403: 'Invalid access token'
2344
- }
2345
- });
2346
- }
2347
-
2348
- /**
2349
- * Get current authenticated user
2350
- * @param data The data for the request.
2351
- * @param data.acceptLanguage
2352
- * @returns unknown User retrieved successfully
2353
- * @throws ApiError
2354
- */
2355
- public static userControllerGetUser(
2356
- data: UserControllerGetUserData
2357
- ): CancelablePromise<UserControllerGetUserResponse> {
2358
- return __request(OpenAPI, {
2359
- method: 'GET',
2360
- url: '/api/v1/users',
2361
- headers: {
2362
- 'accept-language': data.acceptLanguage
2363
- }
2364
- });
2365
- }
2366
-
2367
- /**
2368
- * Sign up new user
2369
- * Create a new account with auto-generated access token. Protected by Cloudflare Turnstile to prevent automated signup (when enabled).
2370
- * @param data The data for the request.
2371
- * @param data.requestBody
2372
- * @returns SignupResponseDto User created successfully
2373
- * @throws ApiError
2374
- */
2375
- public static userControllerSignupUser(
2376
- data: UserControllerSignupUserData
2377
- ): CancelablePromise<UserControllerSignupUserResponse> {
2378
- return __request(OpenAPI, {
2379
- method: 'POST',
2380
- url: '/api/v1/users',
2381
- body: data.requestBody,
2382
- mediaType: 'application/json',
2383
- errors: {
2384
- 400: 'Invalid Turnstile token (when Turnstile is enabled)',
2385
- 403: 'User signup is disabled'
2371
+ query: {
2372
+ ruleId: data.ruleId,
2373
+ status: data.status,
2374
+ fromDate: data.fromDate,
2375
+ toDate: data.toDate
2386
2376
  }
2387
2377
  });
2388
2378
  }
2389
2379
 
2390
2380
  /**
2391
- * Delete user by ID (admin only)
2381
+ * List overdue expected transactions
2382
+ * Returns all overdue expected transactions (PENDING past tolerance)
2392
2383
  * @param data The data for the request.
2393
- * @param data.id User ID to delete
2394
- * @returns void User deleted successfully
2384
+ * @param data.region Region code for tenant context
2385
+ * @returns ExpectedTransactionListResponseDto Overdue transactions retrieved successfully
2395
2386
  * @throws ApiError
2396
2387
  */
2397
- public static userControllerDeleteUser(
2398
- data: UserControllerDeleteUserData
2399
- ): CancelablePromise<UserControllerDeleteUserResponse> {
2388
+ public static expectedTransactionControllerFindOverdue(
2389
+ data: ExpectedTransactionControllerFindOverdueData
2390
+ ): CancelablePromise<ExpectedTransactionControllerFindOverdueResponse> {
2400
2391
  return __request(OpenAPI, {
2401
- method: 'DELETE',
2402
- url: '/api/v1/users/{id}',
2392
+ method: 'GET',
2393
+ url: '/api/v1/{region}/bean/expected-transactions/overdue',
2403
2394
  path: {
2404
- id: data.id
2405
- },
2406
- errors: {
2407
- 403: 'Cannot delete own account or insufficient permissions'
2395
+ region: data.region
2408
2396
  }
2409
2397
  });
2410
2398
  }
2411
2399
 
2412
2400
  /**
2413
- * Get user info by user ID
2401
+ * Get expected transaction by ID
2402
+ * Returns a specific expected transaction with rule details
2414
2403
  * @param data The data for the request.
2415
- * @param data.id User ID
2416
- * @returns unknown User info retrieved successfully
2404
+ * @param data.id Expected transaction ID
2405
+ * @param data.region Region code for tenant context
2406
+ * @returns ExpectedTransactionResponseDto Expected transaction retrieved successfully
2417
2407
  * @throws ApiError
2418
2408
  */
2419
- public static userControllerGetUserInfo(
2420
- data: UserControllerGetUserInfoData
2421
- ): CancelablePromise<UserControllerGetUserInfoResponse> {
2409
+ public static expectedTransactionControllerFindOne(
2410
+ data: ExpectedTransactionControllerFindOneData
2411
+ ): CancelablePromise<ExpectedTransactionControllerFindOneResponse> {
2422
2412
  return __request(OpenAPI, {
2423
2413
  method: 'GET',
2424
- url: '/api/v1/users/{id}/info',
2414
+ url: '/api/v1/{region}/bean/expected-transactions/{id}',
2425
2415
  path: {
2426
- id: data.id
2416
+ id: data.id,
2417
+ region: data.region
2427
2418
  },
2428
2419
  errors: {
2429
- 403: 'Cannot access other user info without admin permission'
2420
+ 404: 'Expected transaction not found'
2430
2421
  }
2431
2422
  });
2432
2423
  }
2433
2424
 
2434
2425
  /**
2435
- * Update user settings
2426
+ * Skip expected transaction
2427
+ * Marks an expected transaction as skipped (PENDING -> SKIPPED)
2436
2428
  * @param data The data for the request.
2437
- * @param data.requestBody
2438
- * @returns unknown Settings updated successfully
2429
+ * @param data.id Expected transaction ID
2430
+ * @param data.region Region code for tenant context
2431
+ * @returns ExpectedTransactionResponseDto Expected transaction skipped successfully
2439
2432
  * @throws ApiError
2440
2433
  */
2441
- public static userControllerUpdateUserSetting(
2442
- data: UserControllerUpdateUserSettingData
2443
- ): CancelablePromise<UserControllerUpdateUserSettingResponse> {
2434
+ public static expectedTransactionControllerSkip(
2435
+ data: ExpectedTransactionControllerSkipData
2436
+ ): CancelablePromise<ExpectedTransactionControllerSkipResponse> {
2444
2437
  return __request(OpenAPI, {
2445
- method: 'PUT',
2446
- url: '/api/v1/users/setting',
2447
- body: data.requestBody,
2448
- mediaType: 'application/json',
2438
+ method: 'POST',
2439
+ url: '/api/v1/{region}/bean/expected-transactions/{id}/skip',
2440
+ path: {
2441
+ id: data.id,
2442
+ region: data.region
2443
+ },
2449
2444
  errors: {
2450
- 403: 'Insufficient permissions'
2445
+ 400: 'Cannot skip - not in PENDING status',
2446
+ 404: 'Expected transaction not found'
2451
2447
  }
2452
2448
  });
2453
2449
  }
2454
2450
 
2455
2451
  /**
2456
- * Get all user settings paginated (admin only)
2452
+ * Undo skip
2453
+ * Reverses a skip operation (SKIPPED -> PENDING)
2457
2454
  * @param data The data for the request.
2458
- * @param data.pageNo Page number
2459
- * @param data.pageSize Page size
2460
- * @returns unknown Settings list retrieved successfully
2455
+ * @param data.id Expected transaction ID
2456
+ * @param data.region Region code for tenant context
2457
+ * @returns void Skip undone successfully
2461
2458
  * @throws ApiError
2462
2459
  */
2463
- public static userControllerGetAllUserSettingsByPage(
2464
- data: UserControllerGetAllUserSettingsByPageData
2465
- ): CancelablePromise<UserControllerGetAllUserSettingsByPageResponse> {
2460
+ public static expectedTransactionControllerUndoSkip(
2461
+ data: ExpectedTransactionControllerUndoSkipData
2462
+ ): CancelablePromise<ExpectedTransactionControllerUndoSkipResponse> {
2466
2463
  return __request(OpenAPI, {
2467
- method: 'GET',
2468
- url: '/api/v1/users/settings-by-page',
2469
- query: {
2470
- pageNo: data.pageNo,
2471
- pageSize: data.pageSize
2464
+ method: 'DELETE',
2465
+ url: '/api/v1/{region}/bean/expected-transactions/{id}/skip',
2466
+ path: {
2467
+ id: data.id,
2468
+ region: data.region
2469
+ },
2470
+ errors: {
2471
+ 400: 'Cannot undo - not in SKIPPED status',
2472
+ 404: 'Expected transaction not found'
2472
2473
  }
2473
2474
  });
2474
2475
  }
2475
2476
 
2476
2477
  /**
2477
- * Get asset and liability summary for current user
2478
- * @returns unknown Summary retrieved successfully
2479
- * @throws ApiError
2480
- */
2481
- public static userControllerGetAssetLiabilitySummary(): CancelablePromise<UserControllerGetAssetLiabilitySummaryResponse> {
2482
- return __request(OpenAPI, {
2483
- method: 'GET',
2484
- url: '/api/v1/users/asset-liability-summary'
2485
- });
2486
- }
2487
- }
2488
-
2489
- export class PropertiesService {
2490
- /**
2491
- * Get all system properties
2492
- * @returns unknown Properties retrieved successfully
2478
+ * Confirm transaction match
2479
+ * Manually matches an expected transaction with an actual transaction
2480
+ * @param data The data for the request.
2481
+ * @param data.id Expected transaction ID
2482
+ * @param data.region Region code for tenant context
2483
+ * @param data.requestBody
2484
+ * @returns unknown Match confirmed successfully
2493
2485
  * @throws ApiError
2494
2486
  */
2495
- public static propertyControllerGetAll(): CancelablePromise<PropertyControllerGetAllResponse> {
2487
+ public static expectedTransactionControllerConfirmMatch(
2488
+ data: ExpectedTransactionControllerConfirmMatchData
2489
+ ): CancelablePromise<ExpectedTransactionControllerConfirmMatchResponse> {
2496
2490
  return __request(OpenAPI, {
2497
- method: 'GET',
2498
- url: '/api/v1/admin/properties',
2491
+ method: 'POST',
2492
+ url: '/api/v1/{region}/bean/expected-transactions/{id}/match',
2493
+ path: {
2494
+ id: data.id,
2495
+ region: data.region
2496
+ },
2497
+ body: data.requestBody,
2498
+ mediaType: 'application/json',
2499
2499
  errors: {
2500
- 401: 'Unauthorized',
2501
- 403: 'Forbidden - insufficient permissions'
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'
2502
2503
  }
2503
2504
  });
2504
2505
  }
2505
2506
 
2506
2507
  /**
2507
- * Get property by key
2508
+ * Unmatch transaction
2509
+ * Removes the match between expected and actual transaction (COMPLETED -> PENDING)
2508
2510
  * @param data The data for the request.
2509
- * @param data.key Property key
2510
- * @returns unknown Property retrieved successfully
2511
+ * @param data.id Expected transaction ID
2512
+ * @param data.region Region code for tenant context
2513
+ * @returns void Match removed successfully
2511
2514
  * @throws ApiError
2512
2515
  */
2513
- public static propertyControllerGetByKey(
2514
- data: PropertyControllerGetByKeyData
2515
- ): CancelablePromise<PropertyControllerGetByKeyResponse> {
2516
+ public static expectedTransactionControllerUnmatch(
2517
+ data: ExpectedTransactionControllerUnmatchData
2518
+ ): CancelablePromise<ExpectedTransactionControllerUnmatchResponse> {
2516
2519
  return __request(OpenAPI, {
2517
- method: 'GET',
2518
- url: '/api/v1/admin/properties/{key}',
2520
+ method: 'DELETE',
2521
+ url: '/api/v1/{region}/bean/expected-transactions/{id}/match',
2519
2522
  path: {
2520
- key: data.key
2523
+ id: data.id,
2524
+ region: data.region
2521
2525
  },
2522
2526
  errors: {
2523
- 401: 'Unauthorized',
2524
- 403: 'Forbidden - insufficient permissions',
2525
- 404: 'Property not found'
2527
+ 400: 'Cannot unmatch - not in COMPLETED status',
2528
+ 404: 'Expected transaction not found'
2526
2529
  }
2527
2530
  });
2528
2531
  }
2529
2532
 
2530
2533
  /**
2531
- * Update a system property
2534
+ * Enter Now
2535
+ * Creates an actual transaction for an expected transaction (YNAB-style Enter Now)
2532
2536
  * @param data The data for the request.
2533
- * @param data.key Property key
2537
+ * @param data.id Expected transaction ID
2538
+ * @param data.region Region code for tenant context
2534
2539
  * @param data.requestBody
2535
- * @returns unknown Property updated successfully
2540
+ * @returns unknown Transaction created successfully
2536
2541
  * @throws ApiError
2537
2542
  */
2538
- public static propertyControllerUpdate(
2539
- data: PropertyControllerUpdateData
2540
- ): CancelablePromise<PropertyControllerUpdateResponse> {
2543
+ public static expectedTransactionControllerEnterNow(
2544
+ data: ExpectedTransactionControllerEnterNowData
2545
+ ): CancelablePromise<ExpectedTransactionControllerEnterNowResponse> {
2541
2546
  return __request(OpenAPI, {
2542
- method: 'PUT',
2543
- url: '/api/v1/admin/properties/{key}',
2547
+ method: 'POST',
2548
+ url: '/api/v1/{region}/bean/expected-transactions/{id}/enter',
2544
2549
  path: {
2545
- key: data.key
2550
+ id: data.id,
2551
+ region: data.region
2546
2552
  },
2547
2553
  body: data.requestBody,
2548
2554
  mediaType: 'application/json',
2549
2555
  errors: {
2550
- 401: 'Unauthorized',
2551
- 403: 'Forbidden - insufficient permissions'
2556
+ 400: 'Cannot enter - not in PENDING status or missing accounts',
2557
+ 404: 'Expected transaction or accounts not found'
2552
2558
  }
2553
2559
  });
2554
2560
  }
2561
+ }
2555
2562
 
2563
+ export class RecurringForecastService {
2556
2564
  /**
2557
- * Delete a system property
2565
+ * Get cash flow forecast
2566
+ * Returns predicted outflows for the next N months based on active recurring rules
2558
2567
  * @param data The data for the request.
2559
- * @param data.key Property key
2560
- * @returns void Property deleted successfully
2568
+ * @param data.region Region code for tenant context
2569
+ * @param data.months Number of months to forecast (1-12, default 3)
2570
+ * @returns ForecastResponseDto Forecast retrieved successfully
2561
2571
  * @throws ApiError
2562
2572
  */
2563
- public static propertyControllerDelete(
2564
- data: PropertyControllerDeleteData
2565
- ): CancelablePromise<PropertyControllerDeleteResponse> {
2573
+ public static forecastControllerGetForecast(
2574
+ data: ForecastControllerGetForecastData
2575
+ ): CancelablePromise<ForecastControllerGetForecastResponse> {
2566
2576
  return __request(OpenAPI, {
2567
- method: 'DELETE',
2568
- url: '/api/v1/admin/properties/{key}',
2577
+ method: 'GET',
2578
+ url: '/api/v1/{region}/bean/recurring/forecast',
2569
2579
  path: {
2570
- key: data.key
2580
+ region: data.region
2571
2581
  },
2572
- errors: {
2573
- 401: 'Unauthorized',
2574
- 403: 'Forbidden - insufficient permissions',
2575
- 404: 'Property not found'
2582
+ query: {
2583
+ months: data.months
2576
2584
  }
2577
2585
  });
2578
2586
  }
@@ -2856,6 +2864,34 @@ export class BeanTransactionRulesService {
2856
2864
  }
2857
2865
  }
2858
2866
 
2867
+ export class BeanCategoryCatalogService {
2868
+ /**
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. CN-exclusive payment instruments (huabei/baitiao) appear only under /cn.
2871
+ * @param data The data for the request.
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
2876
+ * @throws ApiError
2877
+ */
2878
+ public static categoryCatalogControllerList(
2879
+ data: CategoryCatalogControllerListData
2880
+ ): CancelablePromise<CategoryCatalogControllerListResponse> {
2881
+ return __request(OpenAPI, {
2882
+ method: 'GET',
2883
+ url: '/api/v1/{region}/bean/categories',
2884
+ path: {
2885
+ region: data.region
2886
+ },
2887
+ query: {
2888
+ scenario: data.scenario,
2889
+ routeBearing: data.routeBearing
2890
+ }
2891
+ });
2892
+ }
2893
+ }
2894
+
2859
2895
  export class LifeEventsService {
2860
2896
  /**
2861
2897
  * Create a new life event
@@ -3035,7 +3071,7 @@ export class OnboardingService {
3035
3071
  /**
3036
3072
  * Bootstrap core accounts + register asset accounts with opening balances (ADR-0113)
3037
3073
  * @param data The data for the request.
3038
- * @param data.region Region code for tenant context
3074
+ * @param data.region Region code for tenant context. Not-yet-open codes are accepted: the universal catalog backs onboarding regardless of region (#759)
3039
3075
  * @param data.requestBody
3040
3076
  * @returns unknown Onboarding bootstrap result.
3041
3077
  * @throws ApiError
@@ -3168,7 +3204,7 @@ export class BeanExportService {
3168
3204
  /**
3169
3205
  * Export Beancount ledger as ZIP
3170
3206
  * Export all user Beancount data as a ZIP file containing ledger.beancount and yearly files in community format.
3171
- * @returns unknown
3207
+ * @returns binary ZIP archive (application/zip) streamed as an attachment
3172
3208
  * @throws ApiError
3173
3209
  */
3174
3210
  public static exportControllerExportBeancount(): CancelablePromise<ExportControllerExportBeancountResponse> {
@@ -3769,6 +3805,31 @@ export class BeanPlatformsService {
3769
3805
  });
3770
3806
  }
3771
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
+
3772
3833
  /**
3773
3834
  * Update a platform
3774
3835
  * @param data The data for the request.
@@ -4012,15 +4073,52 @@ export class AuthService {
4012
4073
  }
4013
4074
  }
4014
4075
 
4015
- export class DefaultService {
4076
+ export class CommunityService {
4077
+ /**
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).
4080
+ * @param data The data for the request.
4081
+ * @param data.region Region code for tenant context (routing only; the institution region rides in the payload meta)
4082
+ * @param data.requestBody
4083
+ * @returns ParserContributionRelayResponseDto Issue created by the bot
4084
+ * @throws ApiError
4085
+ */
4086
+ public static parserContributionControllerCreate(
4087
+ data: ParserContributionControllerCreateData
4088
+ ): CancelablePromise<ParserContributionControllerCreateResponse> {
4089
+ return __request(OpenAPI, {
4090
+ method: 'POST',
4091
+ url: '/api/v1/{region}/community/parser-contributions',
4092
+ path: {
4093
+ region: data.region
4094
+ },
4095
+ body: data.requestBody,
4096
+ mediaType: 'application/json',
4097
+ errors: {
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'
4103
+ }
4104
+ });
4105
+ }
4106
+ }
4107
+
4108
+ export class AdminCacheService {
4016
4109
  /**
4017
- * @returns unknown
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
4018
4113
  * @throws ApiError
4019
4114
  */
4020
4115
  public static cacheControllerFlushCache(): CancelablePromise<CacheControllerFlushCacheResponse> {
4021
4116
  return __request(OpenAPI, {
4022
4117
  method: 'POST',
4023
- url: '/api/v1/cache/flush'
4118
+ url: '/api/v1/cache/flush',
4119
+ errors: {
4120
+ 403: 'Admin access required'
4121
+ }
4024
4122
  });
4025
4123
  }
4026
4124
  }