@firela/api-types 0.0.0-canary.aba78d68 → 0.0.0-canary.ad70e5a

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -17,6 +17,8 @@ import type {
17
17
  AccountControllerCloseResponse,
18
18
  AccountControllerReopenData,
19
19
  AccountControllerReopenResponse,
20
+ AccountControllerAddOpeningBalanceData,
21
+ AccountControllerAddOpeningBalanceResponse,
20
22
  AccountStandardsControllerGetTemplatesData,
21
23
  AccountStandardsControllerGetTemplatesResponse,
22
24
  AccountStandardsControllerGetTemplateMetadataData,
@@ -29,6 +31,8 @@ import type {
29
31
  TransactionControllerListResponse,
30
32
  TransactionControllerCreateBatchData,
31
33
  TransactionControllerCreateBatchResponse,
34
+ TransactionControllerBatchVoidData,
35
+ TransactionControllerBatchVoidResponse,
32
36
  TransactionControllerCorrectData,
33
37
  TransactionControllerCorrectResponse,
34
38
  TransactionControllerSuggestTagsData,
@@ -55,6 +59,48 @@ import type {
55
59
  ReviewControllerUndoResponse,
56
60
  ReviewControllerBatchResolveData,
57
61
  ReviewControllerBatchResolveResponse,
62
+ TransactionRuleControllerCreateData,
63
+ TransactionRuleControllerCreateResponse,
64
+ TransactionRuleControllerListData,
65
+ TransactionRuleControllerListResponse,
66
+ TransactionRuleControllerValidateData,
67
+ TransactionRuleControllerValidateResponse,
68
+ TransactionRuleControllerBulkCreateData,
69
+ TransactionRuleControllerBulkCreateResponse,
70
+ TransactionRuleControllerExportData,
71
+ TransactionRuleControllerExportResponse,
72
+ TransactionRuleControllerGetStatisticsData,
73
+ TransactionRuleControllerGetStatisticsResponse,
74
+ TransactionRuleControllerGetDetailData,
75
+ TransactionRuleControllerGetDetailResponse,
76
+ TransactionRuleControllerUpdateData,
77
+ TransactionRuleControllerUpdateResponse,
78
+ TransactionRuleControllerDeleteData,
79
+ TransactionRuleControllerDeleteResponse,
80
+ TransactionRuleControllerTestData,
81
+ TransactionRuleControllerTestResponse,
82
+ UserControllerDeleteOwnUserData,
83
+ UserControllerDeleteOwnUserResponse,
84
+ UserControllerGetUserData,
85
+ UserControllerGetUserResponse,
86
+ UserControllerSignupUserData,
87
+ UserControllerSignupUserResponse,
88
+ UserControllerDeleteUserData,
89
+ UserControllerDeleteUserResponse,
90
+ UserControllerGetUserInfoData,
91
+ UserControllerGetUserInfoResponse,
92
+ UserControllerUpdateUserSettingData,
93
+ UserControllerUpdateUserSettingResponse,
94
+ UserControllerGetAllUserSettingsByPageData,
95
+ UserControllerGetAllUserSettingsByPageResponse,
96
+ UserControllerGetAssetLiabilitySummaryResponse,
97
+ PropertyControllerGetAllResponse,
98
+ PropertyControllerGetByKeyData,
99
+ PropertyControllerGetByKeyResponse,
100
+ PropertyControllerUpdateData,
101
+ PropertyControllerUpdateResponse,
102
+ PropertyControllerDeleteData,
103
+ PropertyControllerDeleteResponse,
58
104
  PayeeControllerCreateData,
59
105
  PayeeControllerCreateResponse,
60
106
  PayeeControllerFindAllData,
@@ -83,6 +129,7 @@ import type {
83
129
  PayeeProfileAdminControllerVerifyResponse,
84
130
  PayeeProfileAdminControllerUnverifyData,
85
131
  PayeeProfileAdminControllerUnverifyResponse,
132
+ PayeeProfileControllerListActiveResponse,
86
133
  CommodityControllerCreateData,
87
134
  CommodityControllerCreateResponse,
88
135
  CommodityControllerFindAllData,
@@ -97,6 +144,26 @@ import type {
97
144
  CommodityControllerGetOrCreateResponse,
98
145
  CommodityControllerBulkCreateData,
99
146
  CommodityControllerBulkCreateResponse,
147
+ ReportingControllerGetPortfolioTrendsData,
148
+ ReportingControllerGetPortfolioTrendsResponse,
149
+ ReportingControllerGetCashFlowTrendsData,
150
+ ReportingControllerGetCashFlowTrendsResponse,
151
+ ReportingControllerGenerateSnapshotData,
152
+ ReportingControllerGenerateSnapshotResponse,
153
+ ReportingControllerBackfillSnapshotsData,
154
+ ReportingControllerBackfillSnapshotsResponse,
155
+ PriceControllerCreateData,
156
+ PriceControllerCreateResponse,
157
+ PriceControllerFindAllData,
158
+ PriceControllerFindAllResponse,
159
+ PriceControllerFindOneData,
160
+ PriceControllerFindOneResponse,
161
+ PriceControllerUpdateData,
162
+ PriceControllerUpdateResponse,
163
+ PriceControllerDeleteData,
164
+ PriceControllerDeleteResponse,
165
+ PriceControllerBulkCreateData,
166
+ PriceControllerBulkCreateResponse,
100
167
  RecurringRuleControllerCreateData,
101
168
  RecurringRuleControllerCreateResponse,
102
169
  RecurringRuleControllerFindAllData,
@@ -129,48 +196,8 @@ import type {
129
196
  ExpectedTransactionControllerEnterNowResponse,
130
197
  ForecastControllerGetForecastData,
131
198
  ForecastControllerGetForecastResponse,
132
- TransactionRuleControllerCreateData,
133
- TransactionRuleControllerCreateResponse,
134
- TransactionRuleControllerListData,
135
- TransactionRuleControllerListResponse,
136
- TransactionRuleControllerValidateData,
137
- TransactionRuleControllerValidateResponse,
138
- TransactionRuleControllerBulkCreateData,
139
- TransactionRuleControllerBulkCreateResponse,
140
- TransactionRuleControllerExportData,
141
- TransactionRuleControllerExportResponse,
142
- TransactionRuleControllerGetStatisticsData,
143
- TransactionRuleControllerGetStatisticsResponse,
144
- TransactionRuleControllerGetDetailData,
145
- TransactionRuleControllerGetDetailResponse,
146
- TransactionRuleControllerUpdateData,
147
- TransactionRuleControllerUpdateResponse,
148
- TransactionRuleControllerDeleteData,
149
- TransactionRuleControllerDeleteResponse,
150
- TransactionRuleControllerTestData,
151
- TransactionRuleControllerTestResponse,
152
- UserControllerDeleteOwnUserData,
153
- UserControllerDeleteOwnUserResponse,
154
- UserControllerGetUserData,
155
- UserControllerGetUserResponse,
156
- UserControllerSignupUserData,
157
- UserControllerSignupUserResponse,
158
- UserControllerDeleteUserData,
159
- UserControllerDeleteUserResponse,
160
- UserControllerGetUserInfoData,
161
- UserControllerGetUserInfoResponse,
162
- UserControllerUpdateUserSettingData,
163
- UserControllerUpdateUserSettingResponse,
164
- UserControllerGetAllUserSettingsByPageData,
165
- UserControllerGetAllUserSettingsByPageResponse,
166
- UserControllerGetAssetLiabilitySummaryResponse,
167
- PropertyControllerGetAllResponse,
168
- PropertyControllerGetByKeyData,
169
- PropertyControllerGetByKeyResponse,
170
- PropertyControllerUpdateData,
171
- PropertyControllerUpdateResponse,
172
- PropertyControllerDeleteData,
173
- PropertyControllerDeleteResponse,
199
+ CategoryCatalogControllerListData,
200
+ CategoryCatalogControllerListResponse,
174
201
  EventControllerCreateData,
175
202
  EventControllerCreateResponse,
176
203
  EventControllerFindAllData,
@@ -183,6 +210,17 @@ import type {
183
210
  EventControllerDeleteResponse,
184
211
  EventControllerGetSliceData,
185
212
  EventControllerGetSliceResponse,
213
+ OnboardingControllerBootstrapData,
214
+ OnboardingControllerBootstrapResponse,
215
+ ReconciliationControllerComputeData,
216
+ ReconciliationControllerComputeResponse,
217
+ ReconciliationControllerAssertData,
218
+ ReconciliationControllerAssertResponse,
219
+ ReconciliationControllerPadData,
220
+ ReconciliationControllerPadResponse,
221
+ ReconciliationControllerHistoryData,
222
+ ReconciliationControllerHistoryResponse,
223
+ ExportControllerExportBeancountData,
186
224
  ExportControllerExportBeancountResponse,
187
225
  FileImportControllerImportFileData,
188
226
  FileImportControllerImportFileResponse,
@@ -196,22 +234,20 @@ import type {
196
234
  ImporterConfigControllerUpdateConfigResponse,
197
235
  ImporterConfigControllerResetConfigData,
198
236
  ImporterConfigControllerResetConfigResponse,
199
- PlatformControllerFindAllResponse,
200
- PlatformControllerCreateData,
201
- PlatformControllerCreateResponse,
202
- PlatformControllerGetPlatformListResponse,
203
- PlatformControllerMatchPlatformsData,
204
- PlatformControllerMatchPlatformsResponse,
205
- PlatformControllerUpdateData,
206
- PlatformControllerUpdateResponse,
207
- PlatformControllerDeleteData,
208
- PlatformControllerDeleteResponse,
209
237
  ProviderSyncControllerSyncData,
210
238
  ProviderSyncControllerSyncResponse,
211
239
  ProviderSyncControllerGetSupportedProvidersData,
212
240
  ProviderSyncControllerGetSupportedProvidersResponse,
213
241
  ProviderSyncControllerIsProviderSupportedData,
214
242
  ProviderSyncControllerIsProviderSupportedResponse,
243
+ ExternalAccountLinkControllerCreateData,
244
+ ExternalAccountLinkControllerCreateResponse,
245
+ ExternalAccountLinkControllerFindAllData,
246
+ ExternalAccountLinkControllerFindAllResponse,
247
+ ExternalAccountLinkControllerFindOneData,
248
+ ExternalAccountLinkControllerFindOneResponse,
249
+ ExternalAccountLinkControllerRemoveData,
250
+ ExternalAccountLinkControllerRemoveResponse,
215
251
  TelemetryControllerReportTelemetryData,
216
252
  TelemetryControllerReportTelemetryResponse,
217
253
  TelemetryControllerReportCoverageMissData,
@@ -224,37 +260,38 @@ import type {
224
260
  NlpControllerClearSessionResponse,
225
261
  NlpControllerGetSessionData,
226
262
  NlpControllerGetSessionResponse,
263
+ PlatformControllerFindAllResponse,
264
+ PlatformControllerCreateData,
265
+ PlatformControllerCreateResponse,
266
+ PlatformControllerGetPlatformListData,
267
+ PlatformControllerGetPlatformListResponse,
268
+ PlatformControllerMatchPlatformsData,
269
+ PlatformControllerMatchPlatformsResponse,
270
+ PlatformControllerGetPlatformStandardsData,
271
+ PlatformControllerGetPlatformStandardsResponse,
272
+ PlatformControllerUpdateData,
273
+ PlatformControllerUpdateResponse,
274
+ PlatformControllerDeleteData,
275
+ PlatformControllerDeleteResponse,
227
276
  DashboardControllerGetNetWorthData,
228
277
  DashboardControllerGetNetWorthResponse,
229
278
  DashboardControllerGetAccountsData,
230
279
  DashboardControllerGetAccountsResponse,
231
280
  DashboardControllerGetCashFlowData,
232
281
  DashboardControllerGetCashFlowResponse,
282
+ DashboardControllerGetExpensesData,
283
+ DashboardControllerGetExpensesResponse,
284
+ DashboardControllerGetAdvisorContextData,
285
+ DashboardControllerGetAdvisorContextResponse,
233
286
  HoldingPnlControllerGetHoldingPnlData,
234
287
  HoldingPnlControllerGetHoldingPnlResponse,
235
- PriceControllerCreateData,
236
- PriceControllerCreateResponse,
237
- PriceControllerFindAllData,
238
- PriceControllerFindAllResponse,
239
- PriceControllerFindOneData,
240
- PriceControllerFindOneResponse,
241
- PriceControllerUpdateData,
242
- PriceControllerUpdateResponse,
243
- PriceControllerDeleteData,
244
- PriceControllerDeleteResponse,
245
- PriceControllerBulkCreateData,
246
- PriceControllerBulkCreateResponse,
247
- ReportingControllerGetPortfolioTrendsData,
248
- ReportingControllerGetPortfolioTrendsResponse,
249
- ReportingControllerGetCashFlowTrendsData,
250
- ReportingControllerGetCashFlowTrendsResponse,
251
- ReportingControllerGenerateSnapshotData,
252
- ReportingControllerGenerateSnapshotResponse,
253
- ReportingControllerBackfillSnapshotsData,
254
- ReportingControllerBackfillSnapshotsResponse,
255
288
  ApiKeysControllerCreateApiKeyResponse,
256
289
  AuthControllerAccessTokenLoginData,
257
290
  AuthControllerAccessTokenLoginResponse,
291
+ AuthControllerAdvisorTokenLoginData,
292
+ AuthControllerAdvisorTokenLoginResponse,
293
+ ParserContributionControllerCreateData,
294
+ ParserContributionControllerCreateResponse,
258
295
  CacheControllerFlushCacheResponse,
259
296
  ExchangeRateControllerGetExchangeRateData,
260
297
  ExchangeRateControllerGetExchangeRateResponse,
@@ -266,7 +303,11 @@ import type {
266
303
  HealthControllerResetCircuitBreakerData,
267
304
  HealthControllerResetCircuitBreakerResponse,
268
305
  HealthControllerGetMetricsResponse,
269
- InfoControllerGetInfoResponse
306
+ InfoControllerGetInfoResponse,
307
+ SymbolControllerSearchData,
308
+ SymbolControllerSearchResponse,
309
+ SymbolControllerGetQuoteData,
310
+ SymbolControllerGetQuoteResponse
270
311
  } from './types.gen';
271
312
 
272
313
  export class BeanAccountsService {
@@ -304,7 +345,7 @@ export class BeanAccountsService {
304
345
  * @param data.type Filter by account type
305
346
  * @param data.status Filter by status
306
347
  * @param data.isCustom Filter by custom (user-created) accounts only
307
- * @param data.search Search term for path or i18nKey
348
+ * @param data.search Search term matched against account path and user-set display name (case-insensitive)
308
349
  * @param data.limit Maximum number of results
309
350
  * @param data.offset Number of results to skip
310
351
  * @returns AccountListResponseDto Accounts retrieved successfully
@@ -385,7 +426,7 @@ export class BeanAccountsService {
385
426
 
386
427
  /**
387
428
  * Delete account
388
- * Deletes an account (only if no transactions)
429
+ * Deletes an account (only if no active transactions; voided/superseded residual postings are cleaned up)
389
430
  * @param data The data for the request.
390
431
  * @param data.id Account UUID
391
432
  * @param data.region Region code for tenant context
@@ -404,7 +445,7 @@ export class BeanAccountsService {
404
445
  },
405
446
  errors: {
406
447
  404: 'Account not found',
407
- 409: 'Account has transactions and cannot be deleted'
448
+ 409: 'Account has active transactions and cannot be deleted'
408
449
  }
409
450
  });
410
451
  }
@@ -466,16 +507,45 @@ export class BeanAccountsService {
466
507
  }
467
508
  });
468
509
  }
510
+
511
+ /**
512
+ * Post an opening-balance transaction
513
+ * 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.
514
+ * @param data The data for the request.
515
+ * @param data.id Account UUID
516
+ * @param data.region Region code for tenant context
517
+ * @param data.requestBody
518
+ * @returns OpeningBalanceResultDto Opening-balance transaction created
519
+ * @throws ApiError
520
+ */
521
+ public static accountControllerAddOpeningBalance(
522
+ data: AccountControllerAddOpeningBalanceData
523
+ ): CancelablePromise<AccountControllerAddOpeningBalanceResponse> {
524
+ return __request(OpenAPI, {
525
+ method: 'POST',
526
+ url: '/api/v1/{region}/bean/accounts/{id}/opening-balance',
527
+ path: {
528
+ id: data.id,
529
+ region: data.region
530
+ },
531
+ body: data.requestBody,
532
+ mediaType: 'application/json',
533
+ errors: {
534
+ 404: 'Account not found',
535
+ 409: 'An opening balance already exists for this account'
536
+ }
537
+ });
538
+ }
469
539
  }
470
540
 
471
541
  export class BeanAccountStandardsService {
472
542
  /**
473
543
  * Get account templates
474
- * Returns predefined account templates for a region. Supports filtering by account type and search term.
544
+ * 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).
475
545
  * @param data The data for the request.
476
- * @param data.region Region code (cn, us, de)
546
+ * @param data.region Region code (any ISO alpha-2; not-yet-open codes return the universal-only catalog)
477
547
  * @param data.type Filter by account type
478
- * @param data.search Search term for path or description
548
+ * @param data.search Search term for path, description, aliases, or localized display name
479
549
  * @returns AccountStandardListResponseDto Account templates retrieved successfully
480
550
  * @throws ApiError
481
551
  */
@@ -497,9 +567,9 @@ export class BeanAccountStandardsService {
497
567
 
498
568
  /**
499
569
  * Get template metadata for an account path
500
- * Returns extendable status and root type for a template path.
570
+ * Returns root type for a template path.
501
571
  * @param data The data for the request.
502
- * @param data.region Region code for tenant context
572
+ * @param data.region Region code for tenant context. Not-yet-open codes degrade to the universal-only catalog (#759)
503
573
  * @param data.path Account path to check
504
574
  * @returns TemplateMetadataResponseDto Template metadata retrieved successfully
505
575
  * @throws ApiError
@@ -521,9 +591,9 @@ export class BeanAccountStandardsService {
521
591
 
522
592
  /**
523
593
  * Get available regions with hierarchy
524
- * Returns supported regions with inheritance metadata
594
+ * Returns the full region catalog (every ISO 3166-1 entry) with an 'open' flag and inheritance metadata (#759)
525
595
  * @param data The data for the request.
526
- * @param data.region Region code for tenant context
596
+ * @param data.region Region code for tenant context. Not-yet-open codes degrade to the universal-only catalog (#759)
527
597
  * @returns RegionsMetadataResponseDto Regions metadata retrieved successfully
528
598
  * @throws ApiError
529
599
  */
@@ -580,9 +650,11 @@ export class BeanTransactionsService {
580
650
  * @param data.offset Number of items to skip (default: 0)
581
651
  * @param data.dateFrom Filter by start date (inclusive), format: YYYY-MM-DD
582
652
  * @param data.dateTo Filter by end date (inclusive), format: YYYY-MM-DD
583
- * @param data.status Filter by transaction status
653
+ * @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).
584
654
  * @param data.search Search in narration and payee fields (max 200 chars)
585
655
  * @param data.accountId Filter by account ID (transactions with postings to this account)
656
+ * @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).
657
+ * @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.
586
658
  * @returns TransactionListResponseDto Transaction list
587
659
  * @throws ApiError
588
660
  */
@@ -602,7 +674,9 @@ export class BeanTransactionsService {
602
674
  dateTo: data.dateTo,
603
675
  status: data.status,
604
676
  search: data.search,
605
- accountId: data.accountId
677
+ accountId: data.accountId,
678
+ category: data.category,
679
+ flow: data.flow
606
680
  },
607
681
  errors: {
608
682
  400: 'Validation failed',
@@ -639,6 +713,34 @@ export class BeanTransactionsService {
639
713
  });
640
714
  }
641
715
 
716
+ /**
717
+ * Batch void transactions
718
+ * Soft-deletes (VOIDED) a batch of the caller's ACTIVE transactions in one DB transaction. Voiding releases each row's importId dedup slot, so re-importing the same file after an undo batch-void imports every row again instead of skipping them as duplicates.
719
+ * @param data The data for the request.
720
+ * @param data.region Region code for tenant context
721
+ * @param data.requestBody Batch void request (1-500 unique transaction IDs)
722
+ * @returns BatchVoidResultDto Batch void result: count of rows voided plus ids not found / no longer ACTIVE
723
+ * @throws ApiError
724
+ */
725
+ public static transactionControllerBatchVoid(
726
+ data: TransactionControllerBatchVoidData
727
+ ): CancelablePromise<TransactionControllerBatchVoidResponse> {
728
+ return __request(OpenAPI, {
729
+ method: 'POST',
730
+ url: '/api/v1/{region}/bean/transactions/batch-void',
731
+ path: {
732
+ region: data.region
733
+ },
734
+ body: data.requestBody,
735
+ mediaType: 'application/json',
736
+ errors: {
737
+ 400: 'Validation failed (empty, over 500, duplicate or non-string ids)',
738
+ 401: 'Authentication required',
739
+ 403: 'Batch contains ids owned by another user — whole request rejected, nothing committed'
740
+ }
741
+ });
742
+ }
743
+
642
744
  /**
643
745
  * Correct (supersede) a transaction
644
746
  * Atomically voids the original (SUPERSEDED) and creates a replacement through the full validation pipeline.
@@ -790,7 +892,7 @@ export class BeanBalancesService {
790
892
  * Query account balance
791
893
  * Calculate account balance at a specific date for a single currency
792
894
  * @param data The data for the request.
793
- * @param data.account Account name (e.g., "Assets:Bank:Checking")
895
+ * @param data.account Account name (e.g., "Assets:Checking")
794
896
  * @param data.region Region code for tenant context
795
897
  * @param data.date Date to calculate balance at (ISO 8601 format)
796
898
  * @param data.currency Currency to query (e.g., "USD", "CNY")
@@ -983,1492 +1085,1862 @@ export class BeanReviewsService {
983
1085
  }
984
1086
  }
985
1087
 
986
- export class BeanPayeesService {
1088
+ export class BeanTransactionRulesService {
987
1089
  /**
988
- * Create a new payee
989
- * Creates a new payee mapping for the authenticated user. The payee name must be unique within the user's account.
1090
+ * Create a new transaction rule (or upsert if upsertByPayee=true)
1091
+ * Creates a new rule. If upsertByPayee=true, updates existing rule matching payeeKeywords[0] instead of creating duplicate.
990
1092
  * @param data The data for the request.
1093
+ * @param data.region Region code for tenant context
991
1094
  * @param data.requestBody
992
- * @returns PayeeResponseDto Payee created successfully
1095
+ * @returns TransactionRuleResponseDto Rule updated successfully (upsert mode)
993
1096
  * @throws ApiError
994
1097
  */
995
- public static payeeControllerCreate(
996
- data: PayeeControllerCreateData
997
- ): CancelablePromise<PayeeControllerCreateResponse> {
1098
+ public static transactionRuleControllerCreate(
1099
+ data: TransactionRuleControllerCreateData
1100
+ ): CancelablePromise<TransactionRuleControllerCreateResponse> {
998
1101
  return __request(OpenAPI, {
999
1102
  method: 'POST',
1000
- url: '/api/v1/bean/payees',
1103
+ url: '/api/v1/{region}/bean/transaction-rules',
1104
+ path: {
1105
+ region: data.region
1106
+ },
1001
1107
  body: data.requestBody,
1002
1108
  mediaType: 'application/json',
1003
1109
  errors: {
1004
- 400: 'Invalid input data',
1005
- 409: 'Payee already exists'
1110
+ 400: 'Validation failed',
1111
+ 401: 'Unauthorized',
1112
+ 409: 'Resource conflict - another process is updating this rule'
1006
1113
  }
1007
1114
  });
1008
1115
  }
1009
1116
 
1010
1117
  /**
1011
- * List user payees
1012
- * Returns all payee mappings for the authenticated user with optional filtering
1118
+ * Get all transaction rules for user
1013
1119
  * @param data The data for the request.
1014
- * @param data.search Search term for payee name (partial match, case-insensitive). Useful for autocomplete.
1015
- * @param data.payee Filter by exact payee name match
1016
- * @param data.category Filter by custom category
1017
- * @param data.tag Filter by custom tag (returns payees that have this tag)
1018
- * @param data.isActive Filter by active status. Defaults to true (show only active payees).
1019
- * @returns PayeeListResponseDto Payees retrieved successfully
1120
+ * @param data.region Region code for tenant context
1121
+ * @param data.limit Max results per page (default: 20, max: 100)
1122
+ * @param data.offset Pagination offset (default: 0)
1123
+ * @param data.enabled Filter by enabled status
1124
+ * @param data.learningSource Filter by learning source. Omit this parameter or pass empty string to get manually created rules (learningSource is null in database).
1125
+ * @param data.autoApplyEnabled Filter by auto-apply status
1126
+ * @returns TransactionRuleListResponseDto List of rules
1020
1127
  * @throws ApiError
1021
1128
  */
1022
- public static payeeControllerFindAll(
1023
- data: PayeeControllerFindAllData = {}
1024
- ): CancelablePromise<PayeeControllerFindAllResponse> {
1129
+ public static transactionRuleControllerList(
1130
+ data: TransactionRuleControllerListData
1131
+ ): CancelablePromise<TransactionRuleControllerListResponse> {
1025
1132
  return __request(OpenAPI, {
1026
1133
  method: 'GET',
1027
- url: '/api/v1/bean/payees',
1134
+ url: '/api/v1/{region}/bean/transaction-rules',
1135
+ path: {
1136
+ region: data.region
1137
+ },
1028
1138
  query: {
1029
- search: data.search,
1030
- payee: data.payee,
1031
- category: data.category,
1032
- tag: data.tag,
1033
- isActive: data.isActive
1139
+ limit: data.limit,
1140
+ offset: data.offset,
1141
+ enabled: data.enabled,
1142
+ learningSource: data.learningSource,
1143
+ autoApplyEnabled: data.autoApplyEnabled
1144
+ },
1145
+ errors: {
1146
+ 401: 'Unauthorized'
1034
1147
  }
1035
1148
  });
1036
1149
  }
1037
1150
 
1038
1151
  /**
1039
- * Get payee autocomplete suggestions
1040
- * Returns active payee names matching the query, sorted by recent usage. Used for transaction input autocomplete.
1152
+ * Validate transaction rule configuration
1041
1153
  * @param data The data for the request.
1042
- * @param data.q Search query for payee name (partial match, case-insensitive)
1043
- * @param data.limit Maximum number of suggestions
1044
- * @returns PayeeAutocompleteResponseDto Autocomplete suggestions retrieved successfully
1154
+ * @param data.region Region code for tenant context
1155
+ * @param data.requestBody
1156
+ * @returns ValidateRuleResponseDto Validation result
1045
1157
  * @throws ApiError
1046
1158
  */
1047
- public static payeeControllerAutocomplete(
1048
- data: PayeeControllerAutocompleteData
1049
- ): CancelablePromise<PayeeControllerAutocompleteResponse> {
1159
+ public static transactionRuleControllerValidate(
1160
+ data: TransactionRuleControllerValidateData
1161
+ ): CancelablePromise<TransactionRuleControllerValidateResponse> {
1050
1162
  return __request(OpenAPI, {
1051
- method: 'GET',
1052
- url: '/api/v1/bean/payees/autocomplete',
1053
- query: {
1054
- q: data.q,
1055
- limit: data.limit
1163
+ method: 'POST',
1164
+ url: '/api/v1/{region}/bean/transaction-rules/validate',
1165
+ path: {
1166
+ region: data.region
1167
+ },
1168
+ body: data.requestBody,
1169
+ mediaType: 'application/json',
1170
+ errors: {
1171
+ 400: 'Validation failed',
1172
+ 401: 'Unauthorized'
1056
1173
  }
1057
1174
  });
1058
1175
  }
1059
1176
 
1060
1177
  /**
1061
- * Get top payees by usage
1062
- * Returns the most frequently used payees, sorted by use count. Used for statistics and analytics.
1178
+ * Bulk create transaction rules
1063
1179
  * @param data The data for the request.
1064
- * @param data.limit Maximum number of results
1065
- * @returns PayeeStatsResponseDto Top payees retrieved successfully
1180
+ * @param data.region Region code for tenant context
1181
+ * @param data.requestBody
1182
+ * @returns BulkCreateRulesResponseDto Bulk create completed
1066
1183
  * @throws ApiError
1067
1184
  */
1068
- public static payeeControllerGetTopPayees(
1069
- data: PayeeControllerGetTopPayeesData = {}
1070
- ): CancelablePromise<PayeeControllerGetTopPayeesResponse> {
1185
+ public static transactionRuleControllerBulkCreate(
1186
+ data: TransactionRuleControllerBulkCreateData
1187
+ ): CancelablePromise<TransactionRuleControllerBulkCreateResponse> {
1071
1188
  return __request(OpenAPI, {
1072
- method: 'GET',
1073
- url: '/api/v1/bean/payees/top',
1074
- query: {
1075
- limit: data.limit
1189
+ method: 'POST',
1190
+ url: '/api/v1/{region}/bean/transaction-rules/bulk',
1191
+ path: {
1192
+ region: data.region
1193
+ },
1194
+ body: data.requestBody,
1195
+ mediaType: 'application/json',
1196
+ errors: {
1197
+ 400: 'Invalid bulk create data',
1198
+ 401: 'Unauthorized'
1076
1199
  }
1077
1200
  });
1078
1201
  }
1079
1202
 
1080
1203
  /**
1081
- * Get payee by ID
1082
- * Returns a specific payee mapping by its UUID
1204
+ * Export transaction rules
1083
1205
  * @param data The data for the request.
1084
- * @param data.id Payee UUID
1085
- * @returns PayeeResponseDto Payee retrieved successfully
1206
+ * @param data.format Export format (currently only JSON supported)
1207
+ * @param data.region Region code for tenant context
1208
+ * @returns ExportRulesResponseDto Exported rules
1086
1209
  * @throws ApiError
1087
1210
  */
1088
- public static payeeControllerFindOne(
1089
- data: PayeeControllerFindOneData
1090
- ): CancelablePromise<PayeeControllerFindOneResponse> {
1211
+ public static transactionRuleControllerExport(
1212
+ data: TransactionRuleControllerExportData
1213
+ ): CancelablePromise<TransactionRuleControllerExportResponse> {
1091
1214
  return __request(OpenAPI, {
1092
1215
  method: 'GET',
1093
- url: '/api/v1/bean/payees/{id}',
1216
+ url: '/api/v1/{region}/bean/transaction-rules/export/{format}',
1094
1217
  path: {
1095
- id: data.id
1218
+ format: data.format,
1219
+ region: data.region
1096
1220
  },
1097
1221
  errors: {
1098
- 403: 'Payee belongs to another user',
1099
- 404: 'Payee not found'
1222
+ 400: 'Unsupported format',
1223
+ 401: 'Unauthorized'
1100
1224
  }
1101
1225
  });
1102
1226
  }
1103
1227
 
1104
1228
  /**
1105
- * Update payee
1106
- * Updates a payee mapping. The payee name cannot be changed after creation.
1229
+ * Get transaction rule statistics
1107
1230
  * @param data The data for the request.
1108
- * @param data.id Payee UUID
1109
- * @param data.requestBody
1110
- * @returns PayeeResponseDto Payee updated successfully
1231
+ * @param data.period Statistics time period
1232
+ * @param data.region Region code for tenant context
1233
+ * @returns RuleStatisticsResponseDto Rule statistics
1111
1234
  * @throws ApiError
1112
1235
  */
1113
- public static payeeControllerUpdate(
1114
- data: PayeeControllerUpdateData
1115
- ): CancelablePromise<PayeeControllerUpdateResponse> {
1236
+ public static transactionRuleControllerGetStatistics(
1237
+ data: TransactionRuleControllerGetStatisticsData
1238
+ ): CancelablePromise<TransactionRuleControllerGetStatisticsResponse> {
1116
1239
  return __request(OpenAPI, {
1117
- method: 'PUT',
1118
- url: '/api/v1/bean/payees/{id}',
1240
+ method: 'GET',
1241
+ url: '/api/v1/{region}/bean/transaction-rules/statistics/{period}',
1119
1242
  path: {
1120
- id: data.id
1243
+ period: data.period,
1244
+ region: data.region
1121
1245
  },
1122
- body: data.requestBody,
1123
- mediaType: 'application/json',
1124
1246
  errors: {
1125
- 400: 'Invalid input data',
1126
- 404: 'Payee not found'
1247
+ 401: 'Unauthorized'
1127
1248
  }
1128
1249
  });
1129
1250
  }
1130
1251
 
1131
1252
  /**
1132
- * Delete payee
1133
- * Soft deletes a payee by marking it as inactive. Inactive payees will not appear in autocomplete suggestions.
1253
+ * Get transaction rule detail
1134
1254
  * @param data The data for the request.
1135
- * @param data.id Payee UUID
1136
- * @returns void Payee deleted successfully
1255
+ * @param data.ruleId Rule ID
1256
+ * @param data.region Region code for tenant context
1257
+ * @returns TransactionRuleResponseDto Rule details
1137
1258
  * @throws ApiError
1138
1259
  */
1139
- public static payeeControllerDelete(
1140
- data: PayeeControllerDeleteData
1141
- ): CancelablePromise<PayeeControllerDeleteResponse> {
1260
+ public static transactionRuleControllerGetDetail(
1261
+ data: TransactionRuleControllerGetDetailData
1262
+ ): CancelablePromise<TransactionRuleControllerGetDetailResponse> {
1142
1263
  return __request(OpenAPI, {
1143
- method: 'DELETE',
1144
- url: '/api/v1/bean/payees/{id}',
1264
+ method: 'GET',
1265
+ url: '/api/v1/{region}/bean/transaction-rules/{ruleId}',
1145
1266
  path: {
1146
- id: data.id
1267
+ ruleId: data.ruleId,
1268
+ region: data.region
1147
1269
  },
1148
1270
  errors: {
1149
- 404: 'Payee not found'
1271
+ 401: 'Unauthorized',
1272
+ 403: 'Forbidden - not owner of rule',
1273
+ 404: 'Rule not found'
1150
1274
  }
1151
1275
  });
1152
1276
  }
1153
- }
1154
1277
 
1155
- export class AdminPayeeProfilesService {
1156
1278
  /**
1157
- * Create payee profile (Admin only)
1158
- * Creates a new global payee profile. The canonical name must be unique (case-insensitive).
1279
+ * Update a transaction rule
1159
1280
  * @param data The data for the request.
1281
+ * @param data.ruleId Rule ID to update
1282
+ * @param data.region Region code for tenant context
1160
1283
  * @param data.requestBody
1161
- * @returns PayeeProfileResponseDto Payee profile created successfully
1284
+ * @returns TransactionRuleResponseDto Rule updated successfully
1162
1285
  * @throws ApiError
1163
1286
  */
1164
- public static payeeProfileAdminControllerCreate(
1165
- data: PayeeProfileAdminControllerCreateData
1166
- ): CancelablePromise<PayeeProfileAdminControllerCreateResponse> {
1287
+ public static transactionRuleControllerUpdate(
1288
+ data: TransactionRuleControllerUpdateData
1289
+ ): CancelablePromise<TransactionRuleControllerUpdateResponse> {
1167
1290
  return __request(OpenAPI, {
1168
- method: 'POST',
1169
- url: '/api/v1/admin/payee-profiles',
1291
+ method: 'PUT',
1292
+ url: '/api/v1/{region}/bean/transaction-rules/{ruleId}',
1293
+ path: {
1294
+ ruleId: data.ruleId,
1295
+ region: data.region
1296
+ },
1170
1297
  body: data.requestBody,
1171
1298
  mediaType: 'application/json',
1172
1299
  errors: {
1173
1300
  400: 'Validation failed',
1174
- 403: 'Admin access required',
1175
- 409: 'Payee profile already exists'
1301
+ 401: 'Unauthorized',
1302
+ 403: 'Forbidden - not owner of rule',
1303
+ 404: 'Rule not found',
1304
+ 409: 'Resource conflict - rule is being modified by another process'
1176
1305
  }
1177
1306
  });
1178
1307
  }
1179
1308
 
1180
1309
  /**
1181
- * List payee profiles (Admin only)
1182
- * Returns all payee profiles with optional filtering by category, country, verification status, etc.
1310
+ * Delete a transaction rule
1183
1311
  * @param data The data for the request.
1184
- * @param data.search Search term for canonical name and aliases (case-insensitive)
1185
- * @param data.category Filter by category
1186
- * @param data.country Filter by country (ISO 3166-1 alpha-2)
1187
- * @param data.isActive Filter by active status (default: true - show only active)
1188
- * @param data.verified Filter by verification status. true = verified only, false = unverified only
1189
- * @param data.dataSource Filter by data source
1190
- * @returns PayeeProfileListResponseDto Payee profiles retrieved successfully
1312
+ * @param data.ruleId Rule ID to delete
1313
+ * @param data.region Region code for tenant context
1314
+ * @returns void Rule deleted successfully
1191
1315
  * @throws ApiError
1192
1316
  */
1193
- public static payeeProfileAdminControllerFindAll(
1194
- data: PayeeProfileAdminControllerFindAllData = {}
1195
- ): CancelablePromise<PayeeProfileAdminControllerFindAllResponse> {
1317
+ public static transactionRuleControllerDelete(
1318
+ data: TransactionRuleControllerDeleteData
1319
+ ): CancelablePromise<TransactionRuleControllerDeleteResponse> {
1196
1320
  return __request(OpenAPI, {
1197
- method: 'GET',
1198
- url: '/api/v1/admin/payee-profiles',
1199
- query: {
1200
- search: data.search,
1201
- category: data.category,
1202
- country: data.country,
1203
- isActive: data.isActive,
1204
- verified: data.verified,
1205
- dataSource: data.dataSource
1321
+ method: 'DELETE',
1322
+ url: '/api/v1/{region}/bean/transaction-rules/{ruleId}',
1323
+ path: {
1324
+ ruleId: data.ruleId,
1325
+ region: data.region
1206
1326
  },
1207
1327
  errors: {
1208
- 403: 'Admin access required'
1328
+ 401: 'Unauthorized',
1329
+ 403: 'Forbidden - not owner of rule',
1330
+ 404: 'Rule not found',
1331
+ 409: 'Resource conflict - rule is being modified by another process'
1209
1332
  }
1210
1333
  });
1211
1334
  }
1212
1335
 
1213
1336
  /**
1214
- * Get payee profile by ID (Admin only)
1215
- * Returns a single payee profile by its ID.
1337
+ * Test rule matching
1216
1338
  * @param data The data for the request.
1217
- * @param data.id Payee profile ID (UUID)
1218
- * @returns PayeeProfileResponseDto Payee profile retrieved successfully
1339
+ * @param data.ruleId Rule ID to test
1340
+ * @param data.region Region code for tenant context
1341
+ * @param data.requestBody
1342
+ * @returns TestRuleResponseDto Test result
1219
1343
  * @throws ApiError
1220
1344
  */
1221
- public static payeeProfileAdminControllerFindOne(
1222
- data: PayeeProfileAdminControllerFindOneData
1223
- ): CancelablePromise<PayeeProfileAdminControllerFindOneResponse> {
1345
+ public static transactionRuleControllerTest(
1346
+ data: TransactionRuleControllerTestData
1347
+ ): CancelablePromise<TransactionRuleControllerTestResponse> {
1224
1348
  return __request(OpenAPI, {
1225
- method: 'GET',
1226
- url: '/api/v1/admin/payee-profiles/{id}',
1349
+ method: 'POST',
1350
+ url: '/api/v1/{region}/bean/transaction-rules/{ruleId}/test',
1227
1351
  path: {
1228
- id: data.id
1352
+ ruleId: data.ruleId,
1353
+ region: data.region
1229
1354
  },
1355
+ body: data.requestBody,
1356
+ mediaType: 'application/json',
1230
1357
  errors: {
1231
- 403: 'Admin access required',
1232
- 404: 'Payee profile not found'
1358
+ 401: 'Unauthorized',
1359
+ 403: 'Forbidden - not owner of rule',
1360
+ 404: 'Rule not found'
1233
1361
  }
1234
1362
  });
1235
1363
  }
1364
+ }
1236
1365
 
1366
+ export class UsersService {
1237
1367
  /**
1238
- * Update payee profile (Admin only)
1239
- * Updates an existing payee profile. The canonical name cannot be changed.
1368
+ * Delete own user account
1240
1369
  * @param data The data for the request.
1241
- * @param data.id Payee profile ID (UUID)
1242
1370
  * @param data.requestBody
1243
- * @returns PayeeProfileResponseDto Payee profile updated successfully
1371
+ * @returns void User deleted successfully
1244
1372
  * @throws ApiError
1245
1373
  */
1246
- public static payeeProfileAdminControllerUpdate(
1247
- data: PayeeProfileAdminControllerUpdateData
1248
- ): CancelablePromise<PayeeProfileAdminControllerUpdateResponse> {
1374
+ public static userControllerDeleteOwnUser(
1375
+ data: UserControllerDeleteOwnUserData
1376
+ ): CancelablePromise<UserControllerDeleteOwnUserResponse> {
1249
1377
  return __request(OpenAPI, {
1250
- method: 'PUT',
1251
- url: '/api/v1/admin/payee-profiles/{id}',
1252
- path: {
1253
- id: data.id
1254
- },
1378
+ method: 'DELETE',
1379
+ url: '/api/v1/users',
1255
1380
  body: data.requestBody,
1256
1381
  mediaType: 'application/json',
1257
1382
  errors: {
1258
- 403: 'Admin access required',
1259
- 404: 'Payee profile not found'
1383
+ 403: 'Invalid access token'
1260
1384
  }
1261
1385
  });
1262
1386
  }
1263
1387
 
1264
1388
  /**
1265
- * Soft delete payee profile (Admin only)
1266
- * Marks a payee profile as inactive (soft delete). The profile cannot be deleted if it is referenced by user payees.
1389
+ * Get current authenticated user
1267
1390
  * @param data The data for the request.
1268
- * @param data.id Payee profile ID (UUID)
1269
- * @returns void Payee profile deleted successfully
1391
+ * @param data.acceptLanguage
1392
+ * @returns UserResponseDto User retrieved successfully
1270
1393
  * @throws ApiError
1271
1394
  */
1272
- public static payeeProfileAdminControllerDelete(
1273
- data: PayeeProfileAdminControllerDeleteData
1274
- ): CancelablePromise<PayeeProfileAdminControllerDeleteResponse> {
1395
+ public static userControllerGetUser(
1396
+ data: UserControllerGetUserData
1397
+ ): CancelablePromise<UserControllerGetUserResponse> {
1275
1398
  return __request(OpenAPI, {
1276
- method: 'DELETE',
1277
- url: '/api/v1/admin/payee-profiles/{id}',
1278
- path: {
1279
- id: data.id
1280
- },
1281
- errors: {
1282
- 403: 'Admin access required',
1283
- 404: 'Payee profile not found',
1284
- 409: 'Payee profile is in use and cannot be deleted'
1399
+ method: 'GET',
1400
+ url: '/api/v1/users',
1401
+ headers: {
1402
+ 'accept-language': data.acceptLanguage
1285
1403
  }
1286
1404
  });
1287
1405
  }
1288
1406
 
1289
1407
  /**
1290
- * Verify payee profile (Admin only)
1291
- * Marks a payee profile as verified by setting verifiedAt to current timestamp.
1408
+ * Sign up new user
1409
+ * Create a new account with auto-generated access token. Protected by Cloudflare Turnstile to prevent automated signup (when enabled).
1292
1410
  * @param data The data for the request.
1293
- * @param data.id Payee profile ID (UUID)
1294
- * @returns PayeeProfileResponseDto Payee profile verified successfully
1411
+ * @param data.requestBody
1412
+ * @returns SignupResponseDto User created successfully
1295
1413
  * @throws ApiError
1296
1414
  */
1297
- public static payeeProfileAdminControllerVerify(
1298
- data: PayeeProfileAdminControllerVerifyData
1299
- ): CancelablePromise<PayeeProfileAdminControllerVerifyResponse> {
1415
+ public static userControllerSignupUser(
1416
+ data: UserControllerSignupUserData
1417
+ ): CancelablePromise<UserControllerSignupUserResponse> {
1300
1418
  return __request(OpenAPI, {
1301
1419
  method: 'POST',
1302
- url: '/api/v1/admin/payee-profiles/{id}/verify',
1420
+ url: '/api/v1/users',
1421
+ body: data.requestBody,
1422
+ mediaType: 'application/json',
1423
+ errors: {
1424
+ 400: 'Invalid Turnstile token (when Turnstile is enabled)',
1425
+ 403: 'User signup is disabled'
1426
+ }
1427
+ });
1428
+ }
1429
+
1430
+ /**
1431
+ * Delete user by ID (admin only)
1432
+ * @param data The data for the request.
1433
+ * @param data.id User ID to delete
1434
+ * @returns void User deleted successfully
1435
+ * @throws ApiError
1436
+ */
1437
+ public static userControllerDeleteUser(
1438
+ data: UserControllerDeleteUserData
1439
+ ): CancelablePromise<UserControllerDeleteUserResponse> {
1440
+ return __request(OpenAPI, {
1441
+ method: 'DELETE',
1442
+ url: '/api/v1/users/{id}',
1303
1443
  path: {
1304
1444
  id: data.id
1305
1445
  },
1306
1446
  errors: {
1307
- 403: 'Admin access required',
1308
- 404: 'Payee profile not found'
1447
+ 403: 'Cannot delete own account or insufficient permissions'
1309
1448
  }
1310
1449
  });
1311
1450
  }
1312
1451
 
1313
1452
  /**
1314
- * Unverify payee profile (Admin only)
1315
- * Removes verification status by setting verifiedAt to null.
1453
+ * Get user info by user ID
1316
1454
  * @param data The data for the request.
1317
- * @param data.id Payee profile ID (UUID)
1318
- * @returns PayeeProfileResponseDto Payee profile unverified successfully
1455
+ * @param data.id User ID
1456
+ * @returns unknown User info retrieved successfully
1319
1457
  * @throws ApiError
1320
1458
  */
1321
- public static payeeProfileAdminControllerUnverify(
1322
- data: PayeeProfileAdminControllerUnverifyData
1323
- ): CancelablePromise<PayeeProfileAdminControllerUnverifyResponse> {
1459
+ public static userControllerGetUserInfo(
1460
+ data: UserControllerGetUserInfoData
1461
+ ): CancelablePromise<UserControllerGetUserInfoResponse> {
1324
1462
  return __request(OpenAPI, {
1325
- method: 'DELETE',
1326
- url: '/api/v1/admin/payee-profiles/{id}/verify',
1463
+ method: 'GET',
1464
+ url: '/api/v1/users/{id}/info',
1327
1465
  path: {
1328
1466
  id: data.id
1329
1467
  },
1330
1468
  errors: {
1331
- 403: 'Admin access required',
1332
- 404: 'Payee profile not found'
1469
+ 403: 'Cannot access other user info without admin permission'
1333
1470
  }
1334
1471
  });
1335
1472
  }
1336
- }
1337
1473
 
1338
- export class BeanCommoditiesService {
1339
1474
  /**
1340
- * Create a new commodity
1341
- * Creates a new commodity definition for the authenticated user
1475
+ * Update user settings
1342
1476
  * @param data The data for the request.
1343
- * @param data.region Region code for tenant context
1344
1477
  * @param data.requestBody
1345
- * @returns CommodityResponseDto Commodity created successfully
1478
+ * @returns unknown Settings updated successfully
1346
1479
  * @throws ApiError
1347
1480
  */
1348
- public static commodityControllerCreate(
1349
- data: CommodityControllerCreateData
1350
- ): CancelablePromise<CommodityControllerCreateResponse> {
1481
+ public static userControllerUpdateUserSetting(
1482
+ data: UserControllerUpdateUserSettingData
1483
+ ): CancelablePromise<UserControllerUpdateUserSettingResponse> {
1351
1484
  return __request(OpenAPI, {
1352
- method: 'POST',
1353
- url: '/api/v1/{region}/bean/commodities',
1354
- path: {
1355
- region: data.region
1356
- },
1485
+ method: 'PUT',
1486
+ url: '/api/v1/users/setting',
1357
1487
  body: data.requestBody,
1358
1488
  mediaType: 'application/json',
1359
1489
  errors: {
1360
- 400: 'Invalid input data',
1361
- 409: 'Commodity already exists'
1490
+ 403: 'Insufficient permissions'
1362
1491
  }
1363
1492
  });
1364
1493
  }
1365
1494
 
1366
1495
  /**
1367
- * List user commodities
1368
- * Returns all commodity definitions for the authenticated user with optional filtering
1496
+ * Get all user settings paginated (admin only)
1369
1497
  * @param data The data for the request.
1370
- * @param data.region Region code for tenant context
1371
- * @param data.search Search term for symbol or metadata fields (partial match). Searches symbol and metadata.name.
1372
- * @param data.symbol Filter by exact symbol match
1373
- * @returns CommodityListResponseDto Commodities retrieved successfully
1498
+ * @param data.pageNo Page number
1499
+ * @param data.pageSize Page size
1500
+ * @returns unknown Settings list retrieved successfully
1374
1501
  * @throws ApiError
1375
1502
  */
1376
- public static commodityControllerFindAll(
1377
- data: CommodityControllerFindAllData
1378
- ): CancelablePromise<CommodityControllerFindAllResponse> {
1503
+ public static userControllerGetAllUserSettingsByPage(
1504
+ data: UserControllerGetAllUserSettingsByPageData
1505
+ ): CancelablePromise<UserControllerGetAllUserSettingsByPageResponse> {
1379
1506
  return __request(OpenAPI, {
1380
1507
  method: 'GET',
1381
- url: '/api/v1/{region}/bean/commodities',
1382
- path: {
1383
- region: data.region
1384
- },
1508
+ url: '/api/v1/users/settings-by-page',
1385
1509
  query: {
1386
- search: data.search,
1387
- symbol: data.symbol
1510
+ pageNo: data.pageNo,
1511
+ pageSize: data.pageSize
1388
1512
  }
1389
1513
  });
1390
1514
  }
1391
1515
 
1392
1516
  /**
1393
- * Get commodity by symbol
1394
- * Returns a specific commodity definition by its symbol
1517
+ * Get asset and liability summary for current user
1518
+ * @returns unknown Summary retrieved successfully
1519
+ * @throws ApiError
1520
+ */
1521
+ public static userControllerGetAssetLiabilitySummary(): CancelablePromise<UserControllerGetAssetLiabilitySummaryResponse> {
1522
+ return __request(OpenAPI, {
1523
+ method: 'GET',
1524
+ url: '/api/v1/users/asset-liability-summary'
1525
+ });
1526
+ }
1527
+ }
1528
+
1529
+ export class PropertiesService {
1530
+ /**
1531
+ * Get all system properties
1532
+ * @returns unknown Properties retrieved successfully
1533
+ * @throws ApiError
1534
+ */
1535
+ public static propertyControllerGetAll(): CancelablePromise<PropertyControllerGetAllResponse> {
1536
+ return __request(OpenAPI, {
1537
+ method: 'GET',
1538
+ url: '/api/v1/admin/properties',
1539
+ errors: {
1540
+ 401: 'Unauthorized',
1541
+ 403: 'Forbidden - insufficient permissions'
1542
+ }
1543
+ });
1544
+ }
1545
+
1546
+ /**
1547
+ * Get property by key
1395
1548
  * @param data The data for the request.
1396
- * @param data.symbol Commodity symbol
1397
- * @param data.region Region code for tenant context
1398
- * @returns CommodityResponseDto Commodity retrieved successfully
1549
+ * @param data.key Property key
1550
+ * @returns unknown Property retrieved successfully
1399
1551
  * @throws ApiError
1400
1552
  */
1401
- public static commodityControllerFindOne(
1402
- data: CommodityControllerFindOneData
1403
- ): CancelablePromise<CommodityControllerFindOneResponse> {
1553
+ public static propertyControllerGetByKey(
1554
+ data: PropertyControllerGetByKeyData
1555
+ ): CancelablePromise<PropertyControllerGetByKeyResponse> {
1404
1556
  return __request(OpenAPI, {
1405
1557
  method: 'GET',
1406
- url: '/api/v1/{region}/bean/commodities/{symbol}',
1558
+ url: '/api/v1/admin/properties/{key}',
1407
1559
  path: {
1408
- symbol: data.symbol,
1409
- region: data.region
1560
+ key: data.key
1410
1561
  },
1411
1562
  errors: {
1412
- 404: 'Commodity not found'
1563
+ 401: 'Unauthorized',
1564
+ 403: 'Forbidden - insufficient permissions',
1565
+ 404: 'Property not found'
1413
1566
  }
1414
1567
  });
1415
1568
  }
1416
1569
 
1417
1570
  /**
1418
- * Update commodity
1419
- * Updates an existing commodity definition. Symbol cannot be changed.
1571
+ * Update a system property
1420
1572
  * @param data The data for the request.
1421
- * @param data.symbol Commodity symbol
1422
- * @param data.region Region code for tenant context
1573
+ * @param data.key Property key
1423
1574
  * @param data.requestBody
1424
- * @returns CommodityResponseDto Commodity updated successfully
1575
+ * @returns unknown Property updated successfully
1425
1576
  * @throws ApiError
1426
1577
  */
1427
- public static commodityControllerUpdate(
1428
- data: CommodityControllerUpdateData
1429
- ): CancelablePromise<CommodityControllerUpdateResponse> {
1578
+ public static propertyControllerUpdate(
1579
+ data: PropertyControllerUpdateData
1580
+ ): CancelablePromise<PropertyControllerUpdateResponse> {
1430
1581
  return __request(OpenAPI, {
1431
1582
  method: 'PUT',
1432
- url: '/api/v1/{region}/bean/commodities/{symbol}',
1583
+ url: '/api/v1/admin/properties/{key}',
1433
1584
  path: {
1434
- symbol: data.symbol,
1435
- region: data.region
1585
+ key: data.key
1436
1586
  },
1437
1587
  body: data.requestBody,
1438
1588
  mediaType: 'application/json',
1439
1589
  errors: {
1440
- 400: 'Invalid input data',
1441
- 404: 'Commodity not found'
1590
+ 401: 'Unauthorized',
1591
+ 403: 'Forbidden - insufficient permissions'
1442
1592
  }
1443
1593
  });
1444
1594
  }
1445
1595
 
1446
1596
  /**
1447
- * Delete commodity
1448
- * Deletes a commodity definition
1597
+ * Delete a system property
1449
1598
  * @param data The data for the request.
1450
- * @param data.symbol Commodity symbol
1451
- * @param data.region Region code for tenant context
1452
- * @returns void Commodity deleted successfully
1599
+ * @param data.key Property key
1600
+ * @returns void Property deleted successfully
1453
1601
  * @throws ApiError
1454
1602
  */
1455
- public static commodityControllerDelete(
1456
- data: CommodityControllerDeleteData
1457
- ): CancelablePromise<CommodityControllerDeleteResponse> {
1603
+ public static propertyControllerDelete(
1604
+ data: PropertyControllerDeleteData
1605
+ ): CancelablePromise<PropertyControllerDeleteResponse> {
1458
1606
  return __request(OpenAPI, {
1459
1607
  method: 'DELETE',
1460
- url: '/api/v1/{region}/bean/commodities/{symbol}',
1608
+ url: '/api/v1/admin/properties/{key}',
1461
1609
  path: {
1462
- symbol: data.symbol,
1463
- region: data.region
1610
+ key: data.key
1464
1611
  },
1465
1612
  errors: {
1466
- 404: 'Commodity not found'
1613
+ 401: 'Unauthorized',
1614
+ 403: 'Forbidden - insufficient permissions',
1615
+ 404: 'Property not found'
1467
1616
  }
1468
1617
  });
1469
1618
  }
1619
+ }
1470
1620
 
1621
+ export class BeanPayeesService {
1471
1622
  /**
1472
- * Ensure commodity exists
1473
- * Gets existing commodity or creates it with automatic initialization from OpenBB
1623
+ * Create a new payee
1624
+ * Creates a new payee mapping for the authenticated user. The payee name must be unique within the user's account.
1474
1625
  * @param data The data for the request.
1475
- * @param data.symbol Commodity symbol
1476
- * @param data.region Region code for tenant context
1477
- * @returns CommodityResponseDto Commodity retrieved or created
1626
+ * @param data.requestBody
1627
+ * @returns PayeeResponseDto Payee created successfully
1478
1628
  * @throws ApiError
1479
1629
  */
1480
- public static commodityControllerGetOrCreate(
1481
- data: CommodityControllerGetOrCreateData
1482
- ): CancelablePromise<CommodityControllerGetOrCreateResponse> {
1630
+ public static payeeControllerCreate(
1631
+ data: PayeeControllerCreateData
1632
+ ): CancelablePromise<PayeeControllerCreateResponse> {
1483
1633
  return __request(OpenAPI, {
1484
1634
  method: 'POST',
1485
- url: '/api/v1/{region}/bean/commodities/{symbol}/ensure',
1486
- path: {
1487
- symbol: data.symbol,
1488
- region: data.region
1635
+ url: '/api/v1/bean/payees',
1636
+ body: data.requestBody,
1637
+ mediaType: 'application/json',
1638
+ errors: {
1639
+ 400: 'Invalid input data',
1640
+ 409: 'Payee already exists'
1489
1641
  }
1490
1642
  });
1491
1643
  }
1492
1644
 
1493
1645
  /**
1494
- * Bulk create commodities
1495
- * Creates multiple commodities from a list of symbols, useful for initialization
1496
- * @param data The data for the request.
1497
- * @param data.region Region code for tenant context
1498
- * @returns CommodityResponseDto Commodities created successfully
1646
+ * List user payees
1647
+ * Returns all payee mappings for the authenticated user with optional filtering
1648
+ * @param data The data for the request.
1649
+ * @param data.search Search term for payee name (partial match, case-insensitive). Useful for autocomplete.
1650
+ * @param data.payee Filter by exact payee name match
1651
+ * @param data.category Filter by custom category
1652
+ * @param data.tag Filter by custom tag (returns payees that have this tag)
1653
+ * @param data.isActive Filter by active status. Defaults to true (show only active payees).
1654
+ * @returns PayeeListResponseDto Payees retrieved successfully
1499
1655
  * @throws ApiError
1500
1656
  */
1501
- public static commodityControllerBulkCreate(
1502
- data: CommodityControllerBulkCreateData
1503
- ): CancelablePromise<CommodityControllerBulkCreateResponse> {
1657
+ public static payeeControllerFindAll(
1658
+ data: PayeeControllerFindAllData = {}
1659
+ ): CancelablePromise<PayeeControllerFindAllResponse> {
1504
1660
  return __request(OpenAPI, {
1505
- method: 'POST',
1506
- url: '/api/v1/{region}/bean/commodities/bulk',
1661
+ method: 'GET',
1662
+ url: '/api/v1/bean/payees',
1663
+ query: {
1664
+ search: data.search,
1665
+ payee: data.payee,
1666
+ category: data.category,
1667
+ tag: data.tag,
1668
+ isActive: data.isActive
1669
+ }
1670
+ });
1671
+ }
1672
+
1673
+ /**
1674
+ * Get payee autocomplete suggestions
1675
+ * Returns active payee names matching the query, sorted by recent usage. Used for transaction input autocomplete.
1676
+ * @param data The data for the request.
1677
+ * @param data.q Search query for payee name (partial match, case-insensitive)
1678
+ * @param data.limit Maximum number of suggestions
1679
+ * @returns PayeeAutocompleteResponseDto Autocomplete suggestions retrieved successfully
1680
+ * @throws ApiError
1681
+ */
1682
+ public static payeeControllerAutocomplete(
1683
+ data: PayeeControllerAutocompleteData
1684
+ ): CancelablePromise<PayeeControllerAutocompleteResponse> {
1685
+ return __request(OpenAPI, {
1686
+ method: 'GET',
1687
+ url: '/api/v1/bean/payees/autocomplete',
1688
+ query: {
1689
+ q: data.q,
1690
+ limit: data.limit
1691
+ }
1692
+ });
1693
+ }
1694
+
1695
+ /**
1696
+ * Get top payees by usage
1697
+ * Returns the most frequently used payees, sorted by use count. Used for statistics and analytics.
1698
+ * @param data The data for the request.
1699
+ * @param data.limit Maximum number of results
1700
+ * @returns PayeeStatsResponseDto Top payees retrieved successfully
1701
+ * @throws ApiError
1702
+ */
1703
+ public static payeeControllerGetTopPayees(
1704
+ data: PayeeControllerGetTopPayeesData = {}
1705
+ ): CancelablePromise<PayeeControllerGetTopPayeesResponse> {
1706
+ return __request(OpenAPI, {
1707
+ method: 'GET',
1708
+ url: '/api/v1/bean/payees/top',
1709
+ query: {
1710
+ limit: data.limit
1711
+ }
1712
+ });
1713
+ }
1714
+
1715
+ /**
1716
+ * Get payee by ID
1717
+ * Returns a specific payee mapping by its UUID
1718
+ * @param data The data for the request.
1719
+ * @param data.id Payee UUID
1720
+ * @returns PayeeResponseDto Payee retrieved successfully
1721
+ * @throws ApiError
1722
+ */
1723
+ public static payeeControllerFindOne(
1724
+ data: PayeeControllerFindOneData
1725
+ ): CancelablePromise<PayeeControllerFindOneResponse> {
1726
+ return __request(OpenAPI, {
1727
+ method: 'GET',
1728
+ url: '/api/v1/bean/payees/{id}',
1507
1729
  path: {
1508
- region: data.region
1730
+ id: data.id
1731
+ },
1732
+ errors: {
1733
+ 403: 'Payee belongs to another user',
1734
+ 404: 'Payee not found'
1509
1735
  }
1510
1736
  });
1511
1737
  }
1512
- }
1513
1738
 
1514
- export class RecurringRulesService {
1515
1739
  /**
1516
- * Create a new recurring rule
1517
- * Creates a new recurring transaction rule for the authenticated user
1740
+ * Update payee
1741
+ * Updates a payee mapping. The payee name cannot be changed after creation.
1518
1742
  * @param data The data for the request.
1519
- * @param data.region Region code for tenant context
1743
+ * @param data.id Payee UUID
1520
1744
  * @param data.requestBody
1521
- * @returns RecurringRuleResponseDto Rule created successfully
1745
+ * @returns PayeeResponseDto Payee updated successfully
1522
1746
  * @throws ApiError
1523
1747
  */
1524
- public static recurringRuleControllerCreate(
1525
- data: RecurringRuleControllerCreateData
1526
- ): CancelablePromise<RecurringRuleControllerCreateResponse> {
1748
+ public static payeeControllerUpdate(
1749
+ data: PayeeControllerUpdateData
1750
+ ): CancelablePromise<PayeeControllerUpdateResponse> {
1527
1751
  return __request(OpenAPI, {
1528
- method: 'POST',
1529
- url: '/api/v1/{region}/bean/recurring-rules',
1752
+ method: 'PUT',
1753
+ url: '/api/v1/bean/payees/{id}',
1530
1754
  path: {
1531
- region: data.region
1755
+ id: data.id
1532
1756
  },
1533
1757
  body: data.requestBody,
1534
1758
  mediaType: 'application/json',
1535
1759
  errors: {
1536
- 400: 'Invalid input data (e.g., autoCreate without accounts)',
1537
- 409: 'Rule with same name already exists'
1760
+ 400: 'Invalid input data',
1761
+ 404: 'Payee not found'
1538
1762
  }
1539
1763
  });
1540
1764
  }
1541
1765
 
1542
1766
  /**
1543
- * List recurring rules
1544
- * Returns all recurring rules for the authenticated user with optional filtering
1767
+ * Delete payee
1768
+ * Soft deletes a payee by marking it as inactive. Inactive payees will not appear in autocomplete suggestions.
1545
1769
  * @param data The data for the request.
1546
- * @param data.region Region code for tenant context
1547
- * @param data.isActive Filter by active status
1548
- * @param data.frequency Filter by frequency (WEEKLY, MONTHLY, etc.)
1549
- * @param data.hasAutoCreate Filter by autoCreate enabled
1550
- * @returns RecurringRuleResponseDto Rules retrieved successfully
1770
+ * @param data.id Payee UUID
1771
+ * @returns void Payee deleted successfully
1551
1772
  * @throws ApiError
1552
1773
  */
1553
- public static recurringRuleControllerFindAll(
1554
- data: RecurringRuleControllerFindAllData
1555
- ): CancelablePromise<RecurringRuleControllerFindAllResponse> {
1774
+ public static payeeControllerDelete(
1775
+ data: PayeeControllerDeleteData
1776
+ ): CancelablePromise<PayeeControllerDeleteResponse> {
1556
1777
  return __request(OpenAPI, {
1557
- method: 'GET',
1558
- url: '/api/v1/{region}/bean/recurring-rules',
1778
+ method: 'DELETE',
1779
+ url: '/api/v1/bean/payees/{id}',
1559
1780
  path: {
1560
- region: data.region
1781
+ id: data.id
1561
1782
  },
1783
+ errors: {
1784
+ 404: 'Payee not found'
1785
+ }
1786
+ });
1787
+ }
1788
+ }
1789
+
1790
+ export class AdminPayeeProfilesService {
1791
+ /**
1792
+ * Create payee profile (Admin only)
1793
+ * Creates a new global payee profile. The canonical name must be unique (case-insensitive).
1794
+ * @param data The data for the request.
1795
+ * @param data.requestBody
1796
+ * @returns PayeeProfileResponseDto Payee profile created successfully
1797
+ * @throws ApiError
1798
+ */
1799
+ public static payeeProfileAdminControllerCreate(
1800
+ data: PayeeProfileAdminControllerCreateData
1801
+ ): CancelablePromise<PayeeProfileAdminControllerCreateResponse> {
1802
+ return __request(OpenAPI, {
1803
+ method: 'POST',
1804
+ url: '/api/v1/admin/payee-profiles',
1805
+ body: data.requestBody,
1806
+ mediaType: 'application/json',
1807
+ errors: {
1808
+ 400: 'Validation failed',
1809
+ 403: 'Admin access required',
1810
+ 409: 'Payee profile already exists'
1811
+ }
1812
+ });
1813
+ }
1814
+
1815
+ /**
1816
+ * List payee profiles (Admin only)
1817
+ * Returns all payee profiles with optional filtering by category, country, verification status, etc.
1818
+ * @param data The data for the request.
1819
+ * @param data.search Search term for canonical name and aliases (case-insensitive)
1820
+ * @param data.category Filter by category
1821
+ * @param data.country Filter by country (ISO 3166-1 alpha-2)
1822
+ * @param data.isActive Filter by active status (default: true - show only active)
1823
+ * @param data.verified Filter by verification status. true = verified only, false = unverified only
1824
+ * @param data.dataSource Filter by data source
1825
+ * @returns PayeeProfileListResponseDto Payee profiles retrieved successfully
1826
+ * @throws ApiError
1827
+ */
1828
+ public static payeeProfileAdminControllerFindAll(
1829
+ data: PayeeProfileAdminControllerFindAllData = {}
1830
+ ): CancelablePromise<PayeeProfileAdminControllerFindAllResponse> {
1831
+ return __request(OpenAPI, {
1832
+ method: 'GET',
1833
+ url: '/api/v1/admin/payee-profiles',
1562
1834
  query: {
1835
+ search: data.search,
1836
+ category: data.category,
1837
+ country: data.country,
1563
1838
  isActive: data.isActive,
1564
- frequency: data.frequency,
1565
- hasAutoCreate: data.hasAutoCreate
1839
+ verified: data.verified,
1840
+ dataSource: data.dataSource
1841
+ },
1842
+ errors: {
1843
+ 403: 'Admin access required'
1566
1844
  }
1567
1845
  });
1568
1846
  }
1569
1847
 
1570
1848
  /**
1571
- * Create recurring rule from transaction
1572
- * Auto-creates a recurring rule using transaction data. User only confirms frequency.
1849
+ * Get payee profile by ID (Admin only)
1850
+ * Returns a single payee profile by its ID.
1851
+ * @param data The data for the request.
1852
+ * @param data.id Payee profile ID (UUID)
1853
+ * @returns PayeeProfileResponseDto Payee profile retrieved successfully
1854
+ * @throws ApiError
1855
+ */
1856
+ public static payeeProfileAdminControllerFindOne(
1857
+ data: PayeeProfileAdminControllerFindOneData
1858
+ ): CancelablePromise<PayeeProfileAdminControllerFindOneResponse> {
1859
+ return __request(OpenAPI, {
1860
+ method: 'GET',
1861
+ url: '/api/v1/admin/payee-profiles/{id}',
1862
+ path: {
1863
+ id: data.id
1864
+ },
1865
+ errors: {
1866
+ 403: 'Admin access required',
1867
+ 404: 'Payee profile not found'
1868
+ }
1869
+ });
1870
+ }
1871
+
1872
+ /**
1873
+ * Update payee profile (Admin only)
1874
+ * Updates an existing payee profile. The canonical name cannot be changed.
1875
+ * @param data The data for the request.
1876
+ * @param data.id Payee profile ID (UUID)
1877
+ * @param data.requestBody
1878
+ * @returns PayeeProfileResponseDto Payee profile updated successfully
1879
+ * @throws ApiError
1880
+ */
1881
+ public static payeeProfileAdminControllerUpdate(
1882
+ data: PayeeProfileAdminControllerUpdateData
1883
+ ): CancelablePromise<PayeeProfileAdminControllerUpdateResponse> {
1884
+ return __request(OpenAPI, {
1885
+ method: 'PUT',
1886
+ url: '/api/v1/admin/payee-profiles/{id}',
1887
+ path: {
1888
+ id: data.id
1889
+ },
1890
+ body: data.requestBody,
1891
+ mediaType: 'application/json',
1892
+ errors: {
1893
+ 403: 'Admin access required',
1894
+ 404: 'Payee profile not found'
1895
+ }
1896
+ });
1897
+ }
1898
+
1899
+ /**
1900
+ * Soft delete payee profile (Admin only)
1901
+ * Marks a payee profile as inactive (soft delete). The profile cannot be deleted if it is referenced by user payees.
1902
+ * @param data The data for the request.
1903
+ * @param data.id Payee profile ID (UUID)
1904
+ * @returns void Payee profile deleted successfully
1905
+ * @throws ApiError
1906
+ */
1907
+ public static payeeProfileAdminControllerDelete(
1908
+ data: PayeeProfileAdminControllerDeleteData
1909
+ ): CancelablePromise<PayeeProfileAdminControllerDeleteResponse> {
1910
+ return __request(OpenAPI, {
1911
+ method: 'DELETE',
1912
+ url: '/api/v1/admin/payee-profiles/{id}',
1913
+ path: {
1914
+ id: data.id
1915
+ },
1916
+ errors: {
1917
+ 403: 'Admin access required',
1918
+ 404: 'Payee profile not found',
1919
+ 409: 'Payee profile is in use and cannot be deleted'
1920
+ }
1921
+ });
1922
+ }
1923
+
1924
+ /**
1925
+ * Verify payee profile (Admin only)
1926
+ * Marks a payee profile as verified by setting verifiedAt to current timestamp.
1927
+ * @param data The data for the request.
1928
+ * @param data.id Payee profile ID (UUID)
1929
+ * @returns PayeeProfileResponseDto Payee profile verified successfully
1930
+ * @throws ApiError
1931
+ */
1932
+ public static payeeProfileAdminControllerVerify(
1933
+ data: PayeeProfileAdminControllerVerifyData
1934
+ ): CancelablePromise<PayeeProfileAdminControllerVerifyResponse> {
1935
+ return __request(OpenAPI, {
1936
+ method: 'POST',
1937
+ url: '/api/v1/admin/payee-profiles/{id}/verify',
1938
+ path: {
1939
+ id: data.id
1940
+ },
1941
+ errors: {
1942
+ 403: 'Admin access required',
1943
+ 404: 'Payee profile not found'
1944
+ }
1945
+ });
1946
+ }
1947
+
1948
+ /**
1949
+ * Unverify payee profile (Admin only)
1950
+ * Removes verification status by setting verifiedAt to null.
1951
+ * @param data The data for the request.
1952
+ * @param data.id Payee profile ID (UUID)
1953
+ * @returns void Payee profile unverified successfully
1954
+ * @throws ApiError
1955
+ */
1956
+ public static payeeProfileAdminControllerUnverify(
1957
+ data: PayeeProfileAdminControllerUnverifyData
1958
+ ): CancelablePromise<PayeeProfileAdminControllerUnverifyResponse> {
1959
+ return __request(OpenAPI, {
1960
+ method: 'DELETE',
1961
+ url: '/api/v1/admin/payee-profiles/{id}/verify',
1962
+ path: {
1963
+ id: data.id
1964
+ },
1965
+ errors: {
1966
+ 403: 'Admin access required',
1967
+ 404: 'Payee profile not found'
1968
+ }
1969
+ });
1970
+ }
1971
+ }
1972
+
1973
+ export class PayeeProfilesService {
1974
+ /**
1975
+ * List active payee profiles (directory dump)
1976
+ * Returns the full active PayeeProfile set as a trimmed projection for client-side dictionary caching. Aliases are verbatim as stored; clients normalize on their side.
1977
+ * @returns PayeeProfileDirectoryResponseDto Active payee profiles
1978
+ * @throws ApiError
1979
+ */
1980
+ public static payeeProfileControllerListActive(): CancelablePromise<PayeeProfileControllerListActiveResponse> {
1981
+ return __request(OpenAPI, {
1982
+ method: 'GET',
1983
+ url: '/api/v1/bean/payee-profiles',
1984
+ errors: {
1985
+ 401: 'Missing or invalid token'
1986
+ }
1987
+ });
1988
+ }
1989
+ }
1990
+
1991
+ export class BeanCommoditiesService {
1992
+ /**
1993
+ * Create a new commodity
1994
+ * Creates a new commodity definition for the authenticated user
1573
1995
  * @param data The data for the request.
1574
- * @param data.transactionId Source transaction ID
1575
1996
  * @param data.region Region code for tenant context
1576
1997
  * @param data.requestBody
1577
- * @returns RecurringRuleResponseDto Rule created successfully
1998
+ * @returns CommodityResponseDto Commodity created successfully
1578
1999
  * @throws ApiError
1579
2000
  */
1580
- public static recurringRuleControllerCreateFromTransaction(
1581
- data: RecurringRuleControllerCreateFromTransactionData
1582
- ): CancelablePromise<RecurringRuleControllerCreateFromTransactionResponse> {
2001
+ public static commodityControllerCreate(
2002
+ data: CommodityControllerCreateData
2003
+ ): CancelablePromise<CommodityControllerCreateResponse> {
1583
2004
  return __request(OpenAPI, {
1584
2005
  method: 'POST',
1585
- url: '/api/v1/{region}/bean/recurring-rules/from-transaction/{transactionId}',
2006
+ url: '/api/v1/{region}/bean/commodities',
1586
2007
  path: {
1587
- transactionId: data.transactionId,
1588
2008
  region: data.region
1589
2009
  },
1590
2010
  body: data.requestBody,
1591
2011
  mediaType: 'application/json',
1592
2012
  errors: {
1593
- 404: 'Transaction not found',
1594
- 409: 'Rule with same name already exists or transaction already linked'
2013
+ 400: 'Invalid input data',
2014
+ 409: 'Commodity already exists'
1595
2015
  }
1596
2016
  });
1597
2017
  }
1598
2018
 
1599
2019
  /**
1600
- * Get recurring rule by ID
1601
- * Returns a specific recurring rule with its details
2020
+ * List user commodities
2021
+ * Returns all commodity definitions for the authenticated user with optional filtering
1602
2022
  * @param data The data for the request.
1603
- * @param data.id Rule ID
1604
2023
  * @param data.region Region code for tenant context
1605
- * @returns RecurringRuleResponseDto Rule retrieved successfully
2024
+ * @param data.search Search term for symbol or metadata fields (partial match). Searches symbol and metadata.name.
2025
+ * @param data.symbol Filter by exact symbol match
2026
+ * @returns CommodityListResponseDto Commodities retrieved successfully
1606
2027
  * @throws ApiError
1607
2028
  */
1608
- public static recurringRuleControllerFindOne(
1609
- data: RecurringRuleControllerFindOneData
1610
- ): CancelablePromise<RecurringRuleControllerFindOneResponse> {
2029
+ public static commodityControllerFindAll(
2030
+ data: CommodityControllerFindAllData
2031
+ ): CancelablePromise<CommodityControllerFindAllResponse> {
1611
2032
  return __request(OpenAPI, {
1612
2033
  method: 'GET',
1613
- url: '/api/v1/{region}/bean/recurring-rules/{id}',
2034
+ url: '/api/v1/{region}/bean/commodities',
1614
2035
  path: {
1615
- id: data.id,
1616
2036
  region: data.region
1617
2037
  },
1618
- errors: {
1619
- 404: 'Rule not found'
2038
+ query: {
2039
+ search: data.search,
2040
+ symbol: data.symbol
1620
2041
  }
1621
2042
  });
1622
2043
  }
1623
2044
 
1624
2045
  /**
1625
- * Update recurring rule
1626
- * Updates an existing recurring rule
2046
+ * Get commodity by symbol
2047
+ * Returns a specific commodity definition by its symbol
1627
2048
  * @param data The data for the request.
1628
- * @param data.id Rule ID
2049
+ * @param data.symbol Commodity symbol
1629
2050
  * @param data.region Region code for tenant context
1630
- * @param data.requestBody
1631
- * @returns RecurringRuleResponseDto Rule updated successfully
2051
+ * @returns CommodityResponseDto Commodity retrieved successfully
1632
2052
  * @throws ApiError
1633
2053
  */
1634
- public static recurringRuleControllerUpdate(
1635
- data: RecurringRuleControllerUpdateData
1636
- ): CancelablePromise<RecurringRuleControllerUpdateResponse> {
2054
+ public static commodityControllerFindOne(
2055
+ data: CommodityControllerFindOneData
2056
+ ): CancelablePromise<CommodityControllerFindOneResponse> {
1637
2057
  return __request(OpenAPI, {
1638
- method: 'PATCH',
1639
- url: '/api/v1/{region}/bean/recurring-rules/{id}',
2058
+ method: 'GET',
2059
+ url: '/api/v1/{region}/bean/commodities/{symbol}',
1640
2060
  path: {
1641
- id: data.id,
2061
+ symbol: data.symbol,
1642
2062
  region: data.region
1643
2063
  },
1644
- body: data.requestBody,
1645
- mediaType: 'application/json',
1646
2064
  errors: {
1647
- 400: 'Invalid input data',
1648
- 404: 'Rule not found'
2065
+ 404: 'Commodity not found'
1649
2066
  }
1650
2067
  });
1651
2068
  }
1652
2069
 
1653
2070
  /**
1654
- * Delete recurring rule
1655
- * Soft deletes a recurring rule (sets isActive to false)
2071
+ * Update commodity
2072
+ * Updates an existing commodity definition. Symbol cannot be changed.
1656
2073
  * @param data The data for the request.
1657
- * @param data.id Rule ID
2074
+ * @param data.symbol Commodity symbol
1658
2075
  * @param data.region Region code for tenant context
1659
- * @returns void Rule deleted successfully
2076
+ * @param data.requestBody
2077
+ * @returns CommodityResponseDto Commodity updated successfully
1660
2078
  * @throws ApiError
1661
2079
  */
1662
- public static recurringRuleControllerDelete(
1663
- data: RecurringRuleControllerDeleteData
1664
- ): CancelablePromise<RecurringRuleControllerDeleteResponse> {
2080
+ public static commodityControllerUpdate(
2081
+ data: CommodityControllerUpdateData
2082
+ ): CancelablePromise<CommodityControllerUpdateResponse> {
1665
2083
  return __request(OpenAPI, {
1666
- method: 'DELETE',
1667
- url: '/api/v1/{region}/bean/recurring-rules/{id}',
2084
+ method: 'PUT',
2085
+ url: '/api/v1/{region}/bean/commodities/{symbol}',
1668
2086
  path: {
1669
- id: data.id,
2087
+ symbol: data.symbol,
1670
2088
  region: data.region
1671
2089
  },
2090
+ body: data.requestBody,
2091
+ mediaType: 'application/json',
1672
2092
  errors: {
1673
- 404: 'Rule not found'
2093
+ 400: 'Invalid input data',
2094
+ 404: 'Commodity not found'
1674
2095
  }
1675
2096
  });
1676
2097
  }
1677
2098
 
1678
2099
  /**
1679
- * Get rule with statistics
1680
- * Returns a rule with pending/overdue counts and next expected date
2100
+ * Delete commodity
2101
+ * Deletes a commodity definition
1681
2102
  * @param data The data for the request.
1682
- * @param data.id Rule ID
2103
+ * @param data.symbol Commodity symbol
1683
2104
  * @param data.region Region code for tenant context
1684
- * @returns RecurringRuleWithStatsResponseDto Rule with stats retrieved successfully
2105
+ * @returns void Commodity deleted successfully
1685
2106
  * @throws ApiError
1686
2107
  */
1687
- public static recurringRuleControllerGetWithStats(
1688
- data: RecurringRuleControllerGetWithStatsData
1689
- ): CancelablePromise<RecurringRuleControllerGetWithStatsResponse> {
2108
+ public static commodityControllerDelete(
2109
+ data: CommodityControllerDeleteData
2110
+ ): CancelablePromise<CommodityControllerDeleteResponse> {
1690
2111
  return __request(OpenAPI, {
1691
- method: 'GET',
1692
- url: '/api/v1/{region}/bean/recurring-rules/{id}/stats',
2112
+ method: 'DELETE',
2113
+ url: '/api/v1/{region}/bean/commodities/{symbol}',
1693
2114
  path: {
1694
- id: data.id,
2115
+ symbol: data.symbol,
1695
2116
  region: data.region
1696
2117
  },
1697
2118
  errors: {
1698
- 404: 'Rule not found'
2119
+ 404: 'Commodity not found'
1699
2120
  }
1700
2121
  });
1701
2122
  }
1702
- }
1703
2123
 
1704
- export class ExpectedTransactionsService {
1705
2124
  /**
1706
- * List expected transactions
1707
- * Returns expected transactions for the authenticated user with optional filtering
2125
+ * Ensure commodity exists
2126
+ * Gets existing commodity or creates it with automatic initialization from OpenBB
1708
2127
  * @param data The data for the request.
2128
+ * @param data.symbol Commodity symbol
1709
2129
  * @param data.region Region code for tenant context
1710
- * @param data.ruleId Filter by recurring rule ID
1711
- * @param data.status Filter by status (PENDING, COMPLETED, SKIPPED)
1712
- * @param data.fromDate Filter by date range start (YYYY-MM-DD)
1713
- * @param data.toDate Filter by date range end (YYYY-MM-DD)
1714
- * @returns ExpectedTransactionListResponseDto Expected transactions retrieved successfully
2130
+ * @returns CommodityResponseDto Commodity retrieved or created
1715
2131
  * @throws ApiError
1716
2132
  */
1717
- public static expectedTransactionControllerFindAll(
1718
- data: ExpectedTransactionControllerFindAllData
1719
- ): CancelablePromise<ExpectedTransactionControllerFindAllResponse> {
2133
+ public static commodityControllerGetOrCreate(
2134
+ data: CommodityControllerGetOrCreateData
2135
+ ): CancelablePromise<CommodityControllerGetOrCreateResponse> {
1720
2136
  return __request(OpenAPI, {
1721
- method: 'GET',
1722
- url: '/api/v1/{region}/bean/expected-transactions',
2137
+ method: 'POST',
2138
+ url: '/api/v1/{region}/bean/commodities/{symbol}/ensure',
1723
2139
  path: {
2140
+ symbol: data.symbol,
1724
2141
  region: data.region
1725
- },
1726
- query: {
1727
- ruleId: data.ruleId,
1728
- status: data.status,
1729
- fromDate: data.fromDate,
1730
- toDate: data.toDate
1731
2142
  }
1732
2143
  });
1733
2144
  }
1734
2145
 
1735
2146
  /**
1736
- * List overdue expected transactions
1737
- * Returns all overdue expected transactions (PENDING past tolerance)
2147
+ * Bulk create commodities
2148
+ * Creates multiple commodities from a list of symbols, useful for initialization
1738
2149
  * @param data The data for the request.
1739
2150
  * @param data.region Region code for tenant context
1740
- * @returns ExpectedTransactionListResponseDto Overdue transactions retrieved successfully
2151
+ * @returns CommodityResponseDto Commodities created successfully
1741
2152
  * @throws ApiError
1742
2153
  */
1743
- public static expectedTransactionControllerFindOverdue(
1744
- data: ExpectedTransactionControllerFindOverdueData
1745
- ): CancelablePromise<ExpectedTransactionControllerFindOverdueResponse> {
2154
+ public static commodityControllerBulkCreate(
2155
+ data: CommodityControllerBulkCreateData
2156
+ ): CancelablePromise<CommodityControllerBulkCreateResponse> {
1746
2157
  return __request(OpenAPI, {
1747
- method: 'GET',
1748
- url: '/api/v1/{region}/bean/expected-transactions/overdue',
2158
+ method: 'POST',
2159
+ url: '/api/v1/{region}/bean/commodities/bulk',
1749
2160
  path: {
1750
2161
  region: data.region
1751
2162
  }
1752
2163
  });
1753
2164
  }
2165
+ }
1754
2166
 
2167
+ export class ReportingService {
1755
2168
  /**
1756
- * Get expected transaction by ID
1757
- * Returns a specific expected transaction with rule details
2169
+ * Get portfolio value trends
2170
+ *
2171
+ * Returns time series data of portfolio net worth.
2172
+ *
2173
+ * **Multi-currency Support:**
2174
+ * - `series[].byCurrency` - Currency breakdown for each data point
2175
+ * - `byCurrency` - Separate time series grouped by currency
2176
+ * - `warnings` - Exchange rate warnings if conversion failed
2177
+ *
2178
+ * **Parameters:**
2179
+ * - `period`: Time period (1m, 3m, 6m, 1y)
2180
+ * - `granularity`: Data granularity (day, week, month)
2181
+ *
1758
2182
  * @param data The data for the request.
1759
- * @param data.id Expected transaction ID
1760
2183
  * @param data.region Region code for tenant context
1761
- * @returns ExpectedTransactionResponseDto Expected transaction retrieved successfully
2184
+ * @param data.period Time period
2185
+ * @param data.granularity Data granularity
2186
+ * @returns PortfolioTrendsResponseDto Trends retrieved successfully
1762
2187
  * @throws ApiError
1763
2188
  */
1764
- public static expectedTransactionControllerFindOne(
1765
- data: ExpectedTransactionControllerFindOneData
1766
- ): CancelablePromise<ExpectedTransactionControllerFindOneResponse> {
2189
+ public static reportingControllerGetPortfolioTrends(
2190
+ data: ReportingControllerGetPortfolioTrendsData
2191
+ ): CancelablePromise<ReportingControllerGetPortfolioTrendsResponse> {
1767
2192
  return __request(OpenAPI, {
1768
2193
  method: 'GET',
1769
- url: '/api/v1/{region}/bean/expected-transactions/{id}',
2194
+ url: '/api/v1/{region}/reporting/portfolio/trends',
1770
2195
  path: {
1771
- id: data.id,
1772
2196
  region: data.region
1773
2197
  },
2198
+ query: {
2199
+ period: data.period,
2200
+ granularity: data.granularity
2201
+ },
1774
2202
  errors: {
1775
- 404: 'Expected transaction not found'
2203
+ 401: 'User not authenticated'
1776
2204
  }
1777
2205
  });
1778
2206
  }
1779
2207
 
1780
2208
  /**
1781
- * Skip expected transaction
1782
- * Marks an expected transaction as skipped (PENDING -> SKIPPED)
2209
+ * Get cash-flow trends
2210
+ *
2211
+ * Monthly income / expense / netSavings over a fixed N-month window
2212
+ * (current month + N−1 prior). Missing months are zero-filled (flow metric).
2213
+ *
2214
+ * **Parameters:**
2215
+ * - `period`: 1m | 3m | 6m | 1y (default 6m)
2216
+ * - `granularity`: accepted for API symmetry; v1 returns month buckets
2217
+ *
1783
2218
  * @param data The data for the request.
1784
- * @param data.id Expected transaction ID
1785
2219
  * @param data.region Region code for tenant context
1786
- * @returns ExpectedTransactionResponseDto Expected transaction skipped successfully
2220
+ * @param data.period Time period
2221
+ * @param data.granularity Data granularity (accepted for API symmetry; v1 returns month buckets)
2222
+ * @returns CashFlowTrendsResponseDto Cash-flow trends retrieved successfully
1787
2223
  * @throws ApiError
1788
2224
  */
1789
- public static expectedTransactionControllerSkip(
1790
- data: ExpectedTransactionControllerSkipData
1791
- ): CancelablePromise<ExpectedTransactionControllerSkipResponse> {
2225
+ public static reportingControllerGetCashFlowTrends(
2226
+ data: ReportingControllerGetCashFlowTrendsData
2227
+ ): CancelablePromise<ReportingControllerGetCashFlowTrendsResponse> {
1792
2228
  return __request(OpenAPI, {
1793
- method: 'POST',
1794
- url: '/api/v1/{region}/bean/expected-transactions/{id}/skip',
2229
+ method: 'GET',
2230
+ url: '/api/v1/{region}/reporting/cash-flow/trends',
1795
2231
  path: {
1796
- id: data.id,
1797
2232
  region: data.region
1798
2233
  },
2234
+ query: {
2235
+ period: data.period,
2236
+ granularity: data.granularity
2237
+ },
1799
2238
  errors: {
1800
- 400: 'Cannot skip - not in PENDING status',
1801
- 404: 'Expected transaction not found'
2239
+ 401: 'User not authenticated'
1802
2240
  }
1803
2241
  });
1804
2242
  }
1805
2243
 
1806
2244
  /**
1807
- * Undo skip
1808
- * Reverses a skip operation (SKIPPED -> PENDING)
2245
+ * Generate portfolio snapshot
2246
+ *
2247
+ * Manually generate a portfolio snapshot for a specific date.
2248
+ *
2249
+ * **Multi-currency Support:**
2250
+ * - Fetches balances grouped by currency
2251
+ * - Uses user's baseCurrency setting for conversion
2252
+ * - Stores exchange rates and warnings
2253
+ *
2254
+ * **Use Cases:**
2255
+ * - Testing snapshot generation
2256
+ * - Force regeneration after data correction
2257
+ * - Initial setup for new users
2258
+ *
1809
2259
  * @param data The data for the request.
1810
- * @param data.id Expected transaction ID
1811
2260
  * @param data.region Region code for tenant context
1812
- * @returns ExpectedTransactionResponseDto Skip undone successfully
2261
+ * @param data.requestBody Optional date (defaults to today)
2262
+ * @returns GenerateSnapshotResponse Snapshot generated successfully
1813
2263
  * @throws ApiError
1814
2264
  */
1815
- public static expectedTransactionControllerUndoSkip(
1816
- data: ExpectedTransactionControllerUndoSkipData
1817
- ): CancelablePromise<ExpectedTransactionControllerUndoSkipResponse> {
2265
+ public static reportingControllerGenerateSnapshot(
2266
+ data: ReportingControllerGenerateSnapshotData
2267
+ ): CancelablePromise<ReportingControllerGenerateSnapshotResponse> {
1818
2268
  return __request(OpenAPI, {
1819
- method: 'DELETE',
1820
- url: '/api/v1/{region}/bean/expected-transactions/{id}/skip',
2269
+ method: 'POST',
2270
+ url: '/api/v1/{region}/reporting/snapshots/generate',
1821
2271
  path: {
1822
- id: data.id,
1823
2272
  region: data.region
1824
2273
  },
2274
+ body: data.requestBody,
2275
+ mediaType: 'application/json',
1825
2276
  errors: {
1826
- 400: 'Cannot undo - not in SKIPPED status',
1827
- 404: 'Expected transaction not found'
2277
+ 400: 'Invalid date format',
2278
+ 401: 'User not authenticated'
1828
2279
  }
1829
2280
  });
1830
2281
  }
1831
2282
 
1832
2283
  /**
1833
- * Confirm transaction match
1834
- * Manually matches an expected transaction with an actual transaction
2284
+ * Backfill portfolio snapshots
2285
+ *
2286
+ * Generate snapshots for a date range (historical data backfill).
2287
+ *
2288
+ * **Multi-currency Support:**
2289
+ * - Each snapshot includes multi-currency data
2290
+ * - Uses exchange rates available at generation time
2291
+ * - Warnings stored for missing exchange rates
2292
+ *
2293
+ * **Best Practices:**
2294
+ * - Use for initial setup after account configuration
2295
+ * - Run during low-traffic periods for large date ranges
2296
+ * - Existing snapshots are skipped (not regenerated)
2297
+ *
1835
2298
  * @param data The data for the request.
1836
- * @param data.id Expected transaction ID
1837
2299
  * @param data.region Region code for tenant context
1838
2300
  * @param data.requestBody
1839
- * @returns unknown Match confirmed successfully
2301
+ * @returns BackfillSnapshotsResponse Backfill completed successfully
1840
2302
  * @throws ApiError
1841
2303
  */
1842
- public static expectedTransactionControllerConfirmMatch(
1843
- data: ExpectedTransactionControllerConfirmMatchData
1844
- ): CancelablePromise<ExpectedTransactionControllerConfirmMatchResponse> {
2304
+ public static reportingControllerBackfillSnapshots(
2305
+ data: ReportingControllerBackfillSnapshotsData
2306
+ ): CancelablePromise<ReportingControllerBackfillSnapshotsResponse> {
1845
2307
  return __request(OpenAPI, {
1846
2308
  method: 'POST',
1847
- url: '/api/v1/{region}/bean/expected-transactions/{id}/match',
2309
+ url: '/api/v1/{region}/reporting/snapshots/backfill',
1848
2310
  path: {
1849
- id: data.id,
1850
2311
  region: data.region
1851
2312
  },
1852
2313
  body: data.requestBody,
1853
2314
  mediaType: 'application/json',
1854
2315
  errors: {
1855
- 400: 'Cannot match - not in PENDING status',
1856
- 404: 'Expected or actual transaction not found',
1857
- 409: 'Actual transaction already matched to another rule'
2316
+ 400: 'Invalid date format or range',
2317
+ 401: 'User not authenticated',
2318
+ 409: 'Backfill already in progress for this user'
1858
2319
  }
1859
2320
  });
1860
2321
  }
2322
+ }
1861
2323
 
2324
+ export class BeanPricesService {
1862
2325
  /**
1863
- * Unmatch transaction
1864
- * Removes the match between expected and actual transaction (COMPLETED -> PENDING)
2326
+ * Create a new price
2327
+ * Creates a new price entry for the authenticated user
1865
2328
  * @param data The data for the request.
1866
- * @param data.id Expected transaction ID
1867
2329
  * @param data.region Region code for tenant context
1868
- * @returns unknown Match removed successfully
2330
+ * @param data.requestBody
2331
+ * @returns PriceResponseDto Price created successfully
1869
2332
  * @throws ApiError
1870
2333
  */
1871
- public static expectedTransactionControllerUnmatch(
1872
- data: ExpectedTransactionControllerUnmatchData
1873
- ): CancelablePromise<ExpectedTransactionControllerUnmatchResponse> {
2334
+ public static priceControllerCreate(
2335
+ data: PriceControllerCreateData
2336
+ ): CancelablePromise<PriceControllerCreateResponse> {
1874
2337
  return __request(OpenAPI, {
1875
- method: 'DELETE',
1876
- url: '/api/v1/{region}/bean/expected-transactions/{id}/match',
2338
+ method: 'POST',
2339
+ url: '/api/v1/{region}/bean/prices',
1877
2340
  path: {
1878
- id: data.id,
1879
2341
  region: data.region
1880
2342
  },
2343
+ body: data.requestBody,
2344
+ mediaType: 'application/json',
1881
2345
  errors: {
1882
- 400: 'Cannot unmatch - not in COMPLETED status',
1883
- 404: 'Expected transaction not found'
2346
+ 404: 'Currency or quoteCurrency commodity not found',
2347
+ 409: 'Price already exists for this currency pair and date'
1884
2348
  }
1885
2349
  });
1886
2350
  }
1887
2351
 
1888
2352
  /**
1889
- * Enter Now
1890
- * Creates an actual transaction for an expected transaction (YNAB-style Enter Now)
2353
+ * List user prices
2354
+ * Returns all price entries for the authenticated user with optional filtering
1891
2355
  * @param data The data for the request.
1892
- * @param data.id Expected transaction ID
1893
2356
  * @param data.region Region code for tenant context
1894
- * @param data.requestBody
1895
- * @returns unknown Transaction created successfully
2357
+ * @param data.currency Filter by currency (e.g., BTC, AAPL, USD)
2358
+ * @param data.quoteCurrency Filter by quote currency (pricing currency, e.g., USD, CNY)
2359
+ * @param data.dateFrom Filter prices from this date (ISO 8601 format)
2360
+ * @param data.dateTo Filter prices to this date (ISO 8601 format)
2361
+ * @param data.search Search term for currency or quoteCurrency (case-insensitive partial match)
2362
+ * @param data.page Page number for pagination (default: 1)
2363
+ * @param data.limit Number of items per page (default: 20, max: 100)
2364
+ * @returns PriceListResponseDto Prices retrieved successfully
1896
2365
  * @throws ApiError
1897
2366
  */
1898
- public static expectedTransactionControllerEnterNow(
1899
- data: ExpectedTransactionControllerEnterNowData
1900
- ): CancelablePromise<ExpectedTransactionControllerEnterNowResponse> {
2367
+ public static priceControllerFindAll(
2368
+ data: PriceControllerFindAllData
2369
+ ): CancelablePromise<PriceControllerFindAllResponse> {
1901
2370
  return __request(OpenAPI, {
1902
- method: 'POST',
1903
- url: '/api/v1/{region}/bean/expected-transactions/{id}/enter',
2371
+ method: 'GET',
2372
+ url: '/api/v1/{region}/bean/prices',
1904
2373
  path: {
1905
- id: data.id,
1906
2374
  region: data.region
1907
2375
  },
1908
- body: data.requestBody,
1909
- mediaType: 'application/json',
1910
- errors: {
1911
- 400: 'Cannot enter - not in PENDING status or missing accounts',
1912
- 404: 'Expected transaction or accounts not found'
2376
+ query: {
2377
+ currency: data.currency,
2378
+ quoteCurrency: data.quoteCurrency,
2379
+ dateFrom: data.dateFrom,
2380
+ dateTo: data.dateTo,
2381
+ search: data.search,
2382
+ page: data.page,
2383
+ limit: data.limit
1913
2384
  }
1914
2385
  });
1915
2386
  }
1916
- }
1917
2387
 
1918
- export class RecurringForecastService {
1919
2388
  /**
1920
- * Get cash flow forecast
1921
- * Returns predicted outflows for the next N months based on active recurring rules
2389
+ * Get price by ID
2390
+ * Returns a single price entry by its ID
1922
2391
  * @param data The data for the request.
2392
+ * @param data.id Price ID
1923
2393
  * @param data.region Region code for tenant context
1924
- * @param data.months Number of months to forecast (1-12, default 3)
1925
- * @returns ForecastResponseDto Forecast retrieved successfully
2394
+ * @returns PriceResponseDto Price retrieved successfully
1926
2395
  * @throws ApiError
1927
2396
  */
1928
- public static forecastControllerGetForecast(
1929
- data: ForecastControllerGetForecastData
1930
- ): CancelablePromise<ForecastControllerGetForecastResponse> {
2397
+ public static priceControllerFindOne(
2398
+ data: PriceControllerFindOneData
2399
+ ): CancelablePromise<PriceControllerFindOneResponse> {
1931
2400
  return __request(OpenAPI, {
1932
2401
  method: 'GET',
1933
- url: '/api/v1/{region}/bean/recurring/forecast',
2402
+ url: '/api/v1/{region}/bean/prices/{id}',
1934
2403
  path: {
2404
+ id: data.id,
1935
2405
  region: data.region
1936
2406
  },
1937
- query: {
1938
- months: data.months
2407
+ errors: {
2408
+ 404: 'Price not found'
1939
2409
  }
1940
2410
  });
1941
2411
  }
1942
- }
1943
2412
 
1944
- export class BeanTransactionRulesService {
1945
2413
  /**
1946
- * Create a new transaction rule (or upsert if upsertByPayee=true)
1947
- * Creates a new rule. If upsertByPayee=true, updates existing rule matching payeeKeywords[0] instead of creating duplicate.
2414
+ * Update a price
2415
+ * Updates an existing price entry
1948
2416
  * @param data The data for the request.
2417
+ * @param data.id Price ID
1949
2418
  * @param data.region Region code for tenant context
1950
2419
  * @param data.requestBody
1951
- * @returns TransactionRuleResponseDto Rule updated successfully (upsert mode)
2420
+ * @returns PriceResponseDto Price updated successfully
1952
2421
  * @throws ApiError
1953
2422
  */
1954
- public static transactionRuleControllerCreate(
1955
- data: TransactionRuleControllerCreateData
1956
- ): CancelablePromise<TransactionRuleControllerCreateResponse> {
2423
+ public static priceControllerUpdate(
2424
+ data: PriceControllerUpdateData
2425
+ ): CancelablePromise<PriceControllerUpdateResponse> {
1957
2426
  return __request(OpenAPI, {
1958
- method: 'POST',
1959
- url: '/api/v1/{region}/bean/transaction-rules',
2427
+ method: 'PUT',
2428
+ url: '/api/v1/{region}/bean/prices/{id}',
1960
2429
  path: {
2430
+ id: data.id,
1961
2431
  region: data.region
1962
2432
  },
1963
2433
  body: data.requestBody,
1964
2434
  mediaType: 'application/json',
1965
2435
  errors: {
1966
- 400: 'Validation failed',
1967
- 401: 'Unauthorized',
1968
- 409: 'Resource conflict - another process is updating this rule'
2436
+ 404: 'Price not found',
2437
+ 409: 'Updated price conflicts with existing price'
1969
2438
  }
1970
2439
  });
1971
2440
  }
1972
2441
 
1973
2442
  /**
1974
- * Get all transaction rules for user
2443
+ * Delete a price
2444
+ * Deletes a price entry (hard delete)
1975
2445
  * @param data The data for the request.
2446
+ * @param data.id Price ID
1976
2447
  * @param data.region Region code for tenant context
1977
- * @param data.limit Max results per page (default: 20, max: 100)
1978
- * @param data.offset Pagination offset (default: 0)
1979
- * @param data.enabled Filter by enabled status
1980
- * @param data.learningSource Filter by learning source. Omit this parameter or pass empty string to get manually created rules (learningSource is null in database).
1981
- * @param data.autoApplyEnabled Filter by auto-apply status
1982
- * @returns TransactionRuleListResponseDto List of rules
2448
+ * @returns void Price deleted successfully
1983
2449
  * @throws ApiError
1984
2450
  */
1985
- public static transactionRuleControllerList(
1986
- data: TransactionRuleControllerListData
1987
- ): CancelablePromise<TransactionRuleControllerListResponse> {
2451
+ public static priceControllerDelete(
2452
+ data: PriceControllerDeleteData
2453
+ ): CancelablePromise<PriceControllerDeleteResponse> {
1988
2454
  return __request(OpenAPI, {
1989
- method: 'GET',
1990
- url: '/api/v1/{region}/bean/transaction-rules',
2455
+ method: 'DELETE',
2456
+ url: '/api/v1/{region}/bean/prices/{id}',
1991
2457
  path: {
2458
+ id: data.id,
1992
2459
  region: data.region
1993
2460
  },
1994
- query: {
1995
- limit: data.limit,
1996
- offset: data.offset,
1997
- enabled: data.enabled,
1998
- learningSource: data.learningSource,
1999
- autoApplyEnabled: data.autoApplyEnabled
2000
- },
2001
2461
  errors: {
2002
- 401: 'Unauthorized'
2462
+ 404: 'Price not found'
2003
2463
  }
2004
2464
  });
2005
2465
  }
2006
2466
 
2007
2467
  /**
2008
- * Validate transaction rule configuration
2468
+ * Bulk create prices
2469
+ * Creates multiple price entries at once (skips duplicates)
2009
2470
  * @param data The data for the request.
2010
2471
  * @param data.region Region code for tenant context
2011
2472
  * @param data.requestBody
2012
- * @returns ValidateRuleResponseDto Validation result
2473
+ * @returns PriceResponseDto Prices created successfully
2013
2474
  * @throws ApiError
2014
2475
  */
2015
- public static transactionRuleControllerValidate(
2016
- data: TransactionRuleControllerValidateData
2017
- ): CancelablePromise<TransactionRuleControllerValidateResponse> {
2476
+ public static priceControllerBulkCreate(
2477
+ data: PriceControllerBulkCreateData
2478
+ ): CancelablePromise<PriceControllerBulkCreateResponse> {
2018
2479
  return __request(OpenAPI, {
2019
2480
  method: 'POST',
2020
- url: '/api/v1/{region}/bean/transaction-rules/validate',
2481
+ url: '/api/v1/{region}/bean/prices/bulk',
2021
2482
  path: {
2022
2483
  region: data.region
2023
2484
  },
2024
2485
  body: data.requestBody,
2025
- mediaType: 'application/json',
2026
- errors: {
2027
- 400: 'Validation failed',
2028
- 401: 'Unauthorized'
2029
- }
2486
+ mediaType: 'application/json'
2030
2487
  });
2031
2488
  }
2489
+ }
2032
2490
 
2491
+ export class RecurringRulesService {
2033
2492
  /**
2034
- * Bulk create transaction rules
2493
+ * Create a new recurring rule
2494
+ * Creates a new recurring transaction rule for the authenticated user
2035
2495
  * @param data The data for the request.
2036
2496
  * @param data.region Region code for tenant context
2037
2497
  * @param data.requestBody
2038
- * @returns BulkCreateRulesResponseDto Bulk create completed
2498
+ * @returns RecurringRuleResponseDto Rule created successfully
2039
2499
  * @throws ApiError
2040
2500
  */
2041
- public static transactionRuleControllerBulkCreate(
2042
- data: TransactionRuleControllerBulkCreateData
2043
- ): CancelablePromise<TransactionRuleControllerBulkCreateResponse> {
2501
+ public static recurringRuleControllerCreate(
2502
+ data: RecurringRuleControllerCreateData
2503
+ ): CancelablePromise<RecurringRuleControllerCreateResponse> {
2044
2504
  return __request(OpenAPI, {
2045
2505
  method: 'POST',
2046
- url: '/api/v1/{region}/bean/transaction-rules/bulk',
2506
+ url: '/api/v1/{region}/bean/recurring-rules',
2047
2507
  path: {
2048
2508
  region: data.region
2049
2509
  },
2050
2510
  body: data.requestBody,
2051
2511
  mediaType: 'application/json',
2052
2512
  errors: {
2053
- 400: 'Invalid bulk create data',
2054
- 401: 'Unauthorized'
2513
+ 400: 'Invalid input data (e.g., autoCreate without accounts)',
2514
+ 409: 'Rule with same name already exists'
2055
2515
  }
2056
2516
  });
2057
2517
  }
2058
2518
 
2059
2519
  /**
2060
- * Export transaction rules
2520
+ * List recurring rules
2521
+ * Returns all recurring rules for the authenticated user with optional filtering
2061
2522
  * @param data The data for the request.
2062
- * @param data.format Export format (currently only JSON supported)
2063
2523
  * @param data.region Region code for tenant context
2064
- * @returns ExportRulesResponseDto Exported rules
2524
+ * @param data.isActive Filter by active status
2525
+ * @param data.frequency Filter by frequency (WEEKLY, MONTHLY, etc.)
2526
+ * @param data.hasAutoCreate Filter by autoCreate enabled
2527
+ * @returns RecurringRuleResponseDto Rules retrieved successfully
2065
2528
  * @throws ApiError
2066
2529
  */
2067
- public static transactionRuleControllerExport(
2068
- data: TransactionRuleControllerExportData
2069
- ): CancelablePromise<TransactionRuleControllerExportResponse> {
2530
+ public static recurringRuleControllerFindAll(
2531
+ data: RecurringRuleControllerFindAllData
2532
+ ): CancelablePromise<RecurringRuleControllerFindAllResponse> {
2070
2533
  return __request(OpenAPI, {
2071
2534
  method: 'GET',
2072
- url: '/api/v1/{region}/bean/transaction-rules/export/{format}',
2535
+ url: '/api/v1/{region}/bean/recurring-rules',
2073
2536
  path: {
2074
- format: data.format,
2075
2537
  region: data.region
2076
2538
  },
2077
- errors: {
2078
- 400: 'Unsupported format',
2079
- 401: 'Unauthorized'
2539
+ query: {
2540
+ isActive: data.isActive,
2541
+ frequency: data.frequency,
2542
+ hasAutoCreate: data.hasAutoCreate
2080
2543
  }
2081
2544
  });
2082
2545
  }
2083
2546
 
2084
2547
  /**
2085
- * Get transaction rule statistics
2548
+ * Create recurring rule from transaction
2549
+ * Auto-creates a recurring rule using transaction data. User only confirms frequency.
2086
2550
  * @param data The data for the request.
2087
- * @param data.period Statistics time period
2551
+ * @param data.transactionId Source transaction ID
2088
2552
  * @param data.region Region code for tenant context
2089
- * @returns RuleStatisticsResponseDto Rule statistics
2553
+ * @param data.requestBody
2554
+ * @returns RecurringRuleResponseDto Rule created successfully
2090
2555
  * @throws ApiError
2091
2556
  */
2092
- public static transactionRuleControllerGetStatistics(
2093
- data: TransactionRuleControllerGetStatisticsData
2094
- ): CancelablePromise<TransactionRuleControllerGetStatisticsResponse> {
2557
+ public static recurringRuleControllerCreateFromTransaction(
2558
+ data: RecurringRuleControllerCreateFromTransactionData
2559
+ ): CancelablePromise<RecurringRuleControllerCreateFromTransactionResponse> {
2095
2560
  return __request(OpenAPI, {
2096
- method: 'GET',
2097
- url: '/api/v1/{region}/bean/transaction-rules/statistics/{period}',
2561
+ method: 'POST',
2562
+ url: '/api/v1/{region}/bean/recurring-rules/from-transaction/{transactionId}',
2098
2563
  path: {
2099
- period: data.period,
2564
+ transactionId: data.transactionId,
2100
2565
  region: data.region
2101
2566
  },
2567
+ body: data.requestBody,
2568
+ mediaType: 'application/json',
2102
2569
  errors: {
2103
- 401: 'Unauthorized'
2570
+ 404: 'Transaction not found',
2571
+ 409: 'Rule with same name already exists or transaction already linked'
2104
2572
  }
2105
2573
  });
2106
2574
  }
2107
2575
 
2108
2576
  /**
2109
- * Get transaction rule detail
2577
+ * Get recurring rule by ID
2578
+ * Returns a specific recurring rule with its details
2110
2579
  * @param data The data for the request.
2111
- * @param data.ruleId Rule ID
2580
+ * @param data.id Rule ID
2112
2581
  * @param data.region Region code for tenant context
2113
- * @returns TransactionRuleResponseDto Rule details
2582
+ * @returns RecurringRuleResponseDto Rule retrieved successfully
2114
2583
  * @throws ApiError
2115
2584
  */
2116
- public static transactionRuleControllerGetDetail(
2117
- data: TransactionRuleControllerGetDetailData
2118
- ): CancelablePromise<TransactionRuleControllerGetDetailResponse> {
2585
+ public static recurringRuleControllerFindOne(
2586
+ data: RecurringRuleControllerFindOneData
2587
+ ): CancelablePromise<RecurringRuleControllerFindOneResponse> {
2119
2588
  return __request(OpenAPI, {
2120
2589
  method: 'GET',
2121
- url: '/api/v1/{region}/bean/transaction-rules/{ruleId}',
2590
+ url: '/api/v1/{region}/bean/recurring-rules/{id}',
2122
2591
  path: {
2123
- ruleId: data.ruleId,
2592
+ id: data.id,
2124
2593
  region: data.region
2125
2594
  },
2126
2595
  errors: {
2127
- 401: 'Unauthorized',
2128
- 403: 'Forbidden - not owner of rule',
2129
2596
  404: 'Rule not found'
2130
2597
  }
2131
2598
  });
2132
2599
  }
2133
2600
 
2134
2601
  /**
2135
- * Update a transaction rule
2602
+ * Update recurring rule
2603
+ * Updates an existing recurring rule
2136
2604
  * @param data The data for the request.
2137
- * @param data.ruleId Rule ID to update
2605
+ * @param data.id Rule ID
2138
2606
  * @param data.region Region code for tenant context
2139
2607
  * @param data.requestBody
2140
- * @returns TransactionRuleResponseDto Rule updated successfully
2608
+ * @returns RecurringRuleResponseDto Rule updated successfully
2141
2609
  * @throws ApiError
2142
2610
  */
2143
- public static transactionRuleControllerUpdate(
2144
- data: TransactionRuleControllerUpdateData
2145
- ): CancelablePromise<TransactionRuleControllerUpdateResponse> {
2611
+ public static recurringRuleControllerUpdate(
2612
+ data: RecurringRuleControllerUpdateData
2613
+ ): CancelablePromise<RecurringRuleControllerUpdateResponse> {
2146
2614
  return __request(OpenAPI, {
2147
- method: 'PUT',
2148
- url: '/api/v1/{region}/bean/transaction-rules/{ruleId}',
2615
+ method: 'PATCH',
2616
+ url: '/api/v1/{region}/bean/recurring-rules/{id}',
2149
2617
  path: {
2150
- ruleId: data.ruleId,
2618
+ id: data.id,
2151
2619
  region: data.region
2152
2620
  },
2153
2621
  body: data.requestBody,
2154
2622
  mediaType: 'application/json',
2155
2623
  errors: {
2156
- 400: 'Validation failed',
2157
- 401: 'Unauthorized',
2158
- 403: 'Forbidden - not owner of rule',
2159
- 404: 'Rule not found',
2160
- 409: 'Resource conflict - rule is being modified by another process'
2624
+ 400: 'Invalid input data',
2625
+ 404: 'Rule not found'
2161
2626
  }
2162
2627
  });
2163
2628
  }
2164
2629
 
2165
2630
  /**
2166
- * Delete a transaction rule
2631
+ * Delete recurring rule
2632
+ * Soft deletes a recurring rule (sets isActive to false)
2167
2633
  * @param data The data for the request.
2168
- * @param data.ruleId Rule ID to delete
2634
+ * @param data.id Rule ID
2169
2635
  * @param data.region Region code for tenant context
2170
2636
  * @returns void Rule deleted successfully
2171
2637
  * @throws ApiError
2172
2638
  */
2173
- public static transactionRuleControllerDelete(
2174
- data: TransactionRuleControllerDeleteData
2175
- ): CancelablePromise<TransactionRuleControllerDeleteResponse> {
2639
+ public static recurringRuleControllerDelete(
2640
+ data: RecurringRuleControllerDeleteData
2641
+ ): CancelablePromise<RecurringRuleControllerDeleteResponse> {
2176
2642
  return __request(OpenAPI, {
2177
2643
  method: 'DELETE',
2178
- url: '/api/v1/{region}/bean/transaction-rules/{ruleId}',
2644
+ url: '/api/v1/{region}/bean/recurring-rules/{id}',
2179
2645
  path: {
2180
- ruleId: data.ruleId,
2646
+ id: data.id,
2181
2647
  region: data.region
2182
2648
  },
2183
2649
  errors: {
2184
- 401: 'Unauthorized',
2185
- 403: 'Forbidden - not owner of rule',
2186
- 404: 'Rule not found',
2187
- 409: 'Resource conflict - rule is being modified by another process'
2650
+ 404: 'Rule not found'
2188
2651
  }
2189
2652
  });
2190
2653
  }
2191
2654
 
2192
2655
  /**
2193
- * Test rule matching
2656
+ * Get rule with statistics
2657
+ * Returns a rule with pending/overdue counts and next expected date
2194
2658
  * @param data The data for the request.
2195
- * @param data.ruleId Rule ID to test
2659
+ * @param data.id Rule ID
2196
2660
  * @param data.region Region code for tenant context
2197
- * @param data.requestBody
2198
- * @returns TestRuleResponseDto Test result
2661
+ * @returns RecurringRuleWithStatsResponseDto Rule with stats retrieved successfully
2199
2662
  * @throws ApiError
2200
2663
  */
2201
- public static transactionRuleControllerTest(
2202
- data: TransactionRuleControllerTestData
2203
- ): CancelablePromise<TransactionRuleControllerTestResponse> {
2664
+ public static recurringRuleControllerGetWithStats(
2665
+ data: RecurringRuleControllerGetWithStatsData
2666
+ ): CancelablePromise<RecurringRuleControllerGetWithStatsResponse> {
2204
2667
  return __request(OpenAPI, {
2205
- method: 'POST',
2206
- url: '/api/v1/{region}/bean/transaction-rules/{ruleId}/test',
2668
+ method: 'GET',
2669
+ url: '/api/v1/{region}/bean/recurring-rules/{id}/stats',
2207
2670
  path: {
2208
- ruleId: data.ruleId,
2671
+ id: data.id,
2209
2672
  region: data.region
2210
2673
  },
2211
- body: data.requestBody,
2212
- mediaType: 'application/json',
2213
2674
  errors: {
2214
- 401: 'Unauthorized',
2215
- 403: 'Forbidden - not owner of rule',
2216
2675
  404: 'Rule not found'
2217
2676
  }
2218
2677
  });
2219
2678
  }
2220
2679
  }
2221
2680
 
2222
- export class UsersService {
2681
+ export class ExpectedTransactionsService {
2223
2682
  /**
2224
- * Delete own user account
2683
+ * List expected transactions
2684
+ * Returns expected transactions for the authenticated user with optional filtering
2225
2685
  * @param data The data for the request.
2226
- * @param data.requestBody
2227
- * @returns void User deleted successfully
2686
+ * @param data.region Region code for tenant context
2687
+ * @param data.ruleId Filter by recurring rule ID
2688
+ * @param data.status Filter by status (PENDING, COMPLETED, SKIPPED)
2689
+ * @param data.fromDate Filter by date range start (YYYY-MM-DD)
2690
+ * @param data.toDate Filter by date range end (YYYY-MM-DD)
2691
+ * @returns ExpectedTransactionListResponseDto Expected transactions retrieved successfully
2228
2692
  * @throws ApiError
2229
2693
  */
2230
- public static userControllerDeleteOwnUser(
2231
- data: UserControllerDeleteOwnUserData
2232
- ): CancelablePromise<UserControllerDeleteOwnUserResponse> {
2694
+ public static expectedTransactionControllerFindAll(
2695
+ data: ExpectedTransactionControllerFindAllData
2696
+ ): CancelablePromise<ExpectedTransactionControllerFindAllResponse> {
2233
2697
  return __request(OpenAPI, {
2234
- method: 'DELETE',
2235
- url: '/api/v1/users',
2236
- body: data.requestBody,
2237
- mediaType: 'application/json',
2238
- errors: {
2239
- 403: 'Invalid access token'
2698
+ method: 'GET',
2699
+ url: '/api/v1/{region}/bean/expected-transactions',
2700
+ path: {
2701
+ region: data.region
2702
+ },
2703
+ query: {
2704
+ ruleId: data.ruleId,
2705
+ status: data.status,
2706
+ fromDate: data.fromDate,
2707
+ toDate: data.toDate
2240
2708
  }
2241
2709
  });
2242
2710
  }
2243
2711
 
2244
2712
  /**
2245
- * Get current authenticated user
2713
+ * List overdue expected transactions
2714
+ * Returns all overdue expected transactions (PENDING past tolerance)
2246
2715
  * @param data The data for the request.
2247
- * @param data.acceptLanguage
2248
- * @returns unknown User retrieved successfully
2716
+ * @param data.region Region code for tenant context
2717
+ * @returns ExpectedTransactionListResponseDto Overdue transactions retrieved successfully
2249
2718
  * @throws ApiError
2250
2719
  */
2251
- public static userControllerGetUser(
2252
- data: UserControllerGetUserData
2253
- ): CancelablePromise<UserControllerGetUserResponse> {
2720
+ public static expectedTransactionControllerFindOverdue(
2721
+ data: ExpectedTransactionControllerFindOverdueData
2722
+ ): CancelablePromise<ExpectedTransactionControllerFindOverdueResponse> {
2254
2723
  return __request(OpenAPI, {
2255
2724
  method: 'GET',
2256
- url: '/api/v1/users',
2257
- headers: {
2258
- 'accept-language': data.acceptLanguage
2725
+ url: '/api/v1/{region}/bean/expected-transactions/overdue',
2726
+ path: {
2727
+ region: data.region
2259
2728
  }
2260
2729
  });
2261
2730
  }
2262
2731
 
2263
2732
  /**
2264
- * Sign up new user
2265
- * Create a new account with auto-generated access token. Protected by Cloudflare Turnstile to prevent automated signup (when enabled).
2733
+ * Get expected transaction by ID
2734
+ * Returns a specific expected transaction with rule details
2266
2735
  * @param data The data for the request.
2267
- * @param data.requestBody
2268
- * @returns unknown User created successfully
2736
+ * @param data.id Expected transaction ID
2737
+ * @param data.region Region code for tenant context
2738
+ * @returns ExpectedTransactionResponseDto Expected transaction retrieved successfully
2269
2739
  * @throws ApiError
2270
2740
  */
2271
- public static userControllerSignupUser(
2272
- data: UserControllerSignupUserData
2273
- ): CancelablePromise<UserControllerSignupUserResponse> {
2741
+ public static expectedTransactionControllerFindOne(
2742
+ data: ExpectedTransactionControllerFindOneData
2743
+ ): CancelablePromise<ExpectedTransactionControllerFindOneResponse> {
2274
2744
  return __request(OpenAPI, {
2275
- method: 'POST',
2276
- url: '/api/v1/users',
2277
- body: data.requestBody,
2278
- mediaType: 'application/json',
2745
+ method: 'GET',
2746
+ url: '/api/v1/{region}/bean/expected-transactions/{id}',
2747
+ path: {
2748
+ id: data.id,
2749
+ region: data.region
2750
+ },
2279
2751
  errors: {
2280
- 400: 'Invalid Turnstile token (when Turnstile is enabled)',
2281
- 403: 'User signup is disabled'
2752
+ 404: 'Expected transaction not found'
2282
2753
  }
2283
2754
  });
2284
2755
  }
2285
2756
 
2286
2757
  /**
2287
- * Delete user by ID (admin only)
2758
+ * Skip expected transaction
2759
+ * Marks an expected transaction as skipped (PENDING -> SKIPPED)
2288
2760
  * @param data The data for the request.
2289
- * @param data.id User ID to delete
2290
- * @returns void User deleted successfully
2761
+ * @param data.id Expected transaction ID
2762
+ * @param data.region Region code for tenant context
2763
+ * @returns ExpectedTransactionResponseDto Expected transaction skipped successfully
2291
2764
  * @throws ApiError
2292
2765
  */
2293
- public static userControllerDeleteUser(
2294
- data: UserControllerDeleteUserData
2295
- ): CancelablePromise<UserControllerDeleteUserResponse> {
2766
+ public static expectedTransactionControllerSkip(
2767
+ data: ExpectedTransactionControllerSkipData
2768
+ ): CancelablePromise<ExpectedTransactionControllerSkipResponse> {
2296
2769
  return __request(OpenAPI, {
2297
- method: 'DELETE',
2298
- url: '/api/v1/users/{id}',
2770
+ method: 'POST',
2771
+ url: '/api/v1/{region}/bean/expected-transactions/{id}/skip',
2299
2772
  path: {
2300
- id: data.id
2773
+ id: data.id,
2774
+ region: data.region
2301
2775
  },
2302
2776
  errors: {
2303
- 403: 'Cannot delete own account or insufficient permissions'
2777
+ 400: 'Cannot skip - not in PENDING status',
2778
+ 404: 'Expected transaction not found'
2304
2779
  }
2305
2780
  });
2306
2781
  }
2307
2782
 
2308
2783
  /**
2309
- * Get user info by user ID
2784
+ * Undo skip
2785
+ * Reverses a skip operation (SKIPPED -> PENDING)
2310
2786
  * @param data The data for the request.
2311
- * @param data.id User ID
2312
- * @returns unknown User info retrieved successfully
2787
+ * @param data.id Expected transaction ID
2788
+ * @param data.region Region code for tenant context
2789
+ * @returns void Skip undone successfully
2313
2790
  * @throws ApiError
2314
2791
  */
2315
- public static userControllerGetUserInfo(
2316
- data: UserControllerGetUserInfoData
2317
- ): CancelablePromise<UserControllerGetUserInfoResponse> {
2792
+ public static expectedTransactionControllerUndoSkip(
2793
+ data: ExpectedTransactionControllerUndoSkipData
2794
+ ): CancelablePromise<ExpectedTransactionControllerUndoSkipResponse> {
2318
2795
  return __request(OpenAPI, {
2319
- method: 'GET',
2320
- url: '/api/v1/users/{id}/info',
2796
+ method: 'DELETE',
2797
+ url: '/api/v1/{region}/bean/expected-transactions/{id}/skip',
2321
2798
  path: {
2322
- id: data.id
2799
+ id: data.id,
2800
+ region: data.region
2323
2801
  },
2324
2802
  errors: {
2325
- 403: 'Cannot access other user info without admin permission'
2803
+ 400: 'Cannot undo - not in SKIPPED status',
2804
+ 404: 'Expected transaction not found'
2326
2805
  }
2327
2806
  });
2328
2807
  }
2329
2808
 
2330
2809
  /**
2331
- * Update user settings
2810
+ * Confirm transaction match
2811
+ * Manually matches an expected transaction with an actual transaction
2332
2812
  * @param data The data for the request.
2813
+ * @param data.id Expected transaction ID
2814
+ * @param data.region Region code for tenant context
2333
2815
  * @param data.requestBody
2334
- * @returns unknown Settings updated successfully
2816
+ * @returns unknown Match confirmed successfully
2335
2817
  * @throws ApiError
2336
2818
  */
2337
- public static userControllerUpdateUserSetting(
2338
- data: UserControllerUpdateUserSettingData
2339
- ): CancelablePromise<UserControllerUpdateUserSettingResponse> {
2819
+ public static expectedTransactionControllerConfirmMatch(
2820
+ data: ExpectedTransactionControllerConfirmMatchData
2821
+ ): CancelablePromise<ExpectedTransactionControllerConfirmMatchResponse> {
2340
2822
  return __request(OpenAPI, {
2341
- method: 'PUT',
2342
- url: '/api/v1/users/setting',
2823
+ method: 'POST',
2824
+ url: '/api/v1/{region}/bean/expected-transactions/{id}/match',
2825
+ path: {
2826
+ id: data.id,
2827
+ region: data.region
2828
+ },
2343
2829
  body: data.requestBody,
2344
2830
  mediaType: 'application/json',
2345
2831
  errors: {
2346
- 403: 'Insufficient permissions'
2832
+ 400: 'Cannot match - not in PENDING status',
2833
+ 404: 'Expected or actual transaction not found',
2834
+ 409: 'Actual transaction already matched to another rule'
2347
2835
  }
2348
2836
  });
2349
2837
  }
2350
2838
 
2351
2839
  /**
2352
- * Get all user settings paginated (admin only)
2840
+ * Unmatch transaction
2841
+ * Removes the match between expected and actual transaction (COMPLETED -> PENDING)
2353
2842
  * @param data The data for the request.
2354
- * @param data.pageNo Page number
2355
- * @param data.pageSize Page size
2356
- * @returns unknown Settings list retrieved successfully
2357
- * @throws ApiError
2358
- */
2359
- public static userControllerGetAllUserSettingsByPage(
2360
- data: UserControllerGetAllUserSettingsByPageData
2361
- ): CancelablePromise<UserControllerGetAllUserSettingsByPageResponse> {
2362
- return __request(OpenAPI, {
2363
- method: 'GET',
2364
- url: '/api/v1/users/settings-by-page',
2365
- query: {
2366
- pageNo: data.pageNo,
2367
- pageSize: data.pageSize
2368
- }
2369
- });
2370
- }
2371
-
2372
- /**
2373
- * Get asset and liability summary for current user
2374
- * @returns unknown Summary retrieved successfully
2375
- * @throws ApiError
2376
- */
2377
- public static userControllerGetAssetLiabilitySummary(): CancelablePromise<UserControllerGetAssetLiabilitySummaryResponse> {
2378
- return __request(OpenAPI, {
2379
- method: 'GET',
2380
- url: '/api/v1/users/asset-liability-summary'
2381
- });
2382
- }
2383
- }
2384
-
2385
- export class PropertiesService {
2386
- /**
2387
- * Get all system properties
2388
- * @returns unknown Properties retrieved successfully
2843
+ * @param data.id Expected transaction ID
2844
+ * @param data.region Region code for tenant context
2845
+ * @returns void Match removed successfully
2389
2846
  * @throws ApiError
2390
2847
  */
2391
- public static propertyControllerGetAll(): CancelablePromise<PropertyControllerGetAllResponse> {
2848
+ public static expectedTransactionControllerUnmatch(
2849
+ data: ExpectedTransactionControllerUnmatchData
2850
+ ): CancelablePromise<ExpectedTransactionControllerUnmatchResponse> {
2392
2851
  return __request(OpenAPI, {
2393
- method: 'GET',
2394
- url: '/api/v1/admin/properties',
2852
+ method: 'DELETE',
2853
+ url: '/api/v1/{region}/bean/expected-transactions/{id}/match',
2854
+ path: {
2855
+ id: data.id,
2856
+ region: data.region
2857
+ },
2395
2858
  errors: {
2396
- 401: 'Unauthorized',
2397
- 403: 'Forbidden - insufficient permissions'
2859
+ 400: 'Cannot unmatch - not in COMPLETED status',
2860
+ 404: 'Expected transaction not found'
2398
2861
  }
2399
2862
  });
2400
2863
  }
2401
2864
 
2402
2865
  /**
2403
- * Get property by key
2866
+ * Enter Now
2867
+ * Creates an actual transaction for an expected transaction (YNAB-style Enter Now)
2404
2868
  * @param data The data for the request.
2405
- * @param data.key Property key
2406
- * @returns unknown Property retrieved successfully
2869
+ * @param data.id Expected transaction ID
2870
+ * @param data.region Region code for tenant context
2871
+ * @param data.requestBody
2872
+ * @returns unknown Transaction created successfully
2407
2873
  * @throws ApiError
2408
2874
  */
2409
- public static propertyControllerGetByKey(
2410
- data: PropertyControllerGetByKeyData
2411
- ): CancelablePromise<PropertyControllerGetByKeyResponse> {
2875
+ public static expectedTransactionControllerEnterNow(
2876
+ data: ExpectedTransactionControllerEnterNowData
2877
+ ): CancelablePromise<ExpectedTransactionControllerEnterNowResponse> {
2412
2878
  return __request(OpenAPI, {
2413
- method: 'GET',
2414
- url: '/api/v1/admin/properties/{key}',
2879
+ method: 'POST',
2880
+ url: '/api/v1/{region}/bean/expected-transactions/{id}/enter',
2415
2881
  path: {
2416
- key: data.key
2882
+ id: data.id,
2883
+ region: data.region
2417
2884
  },
2885
+ body: data.requestBody,
2886
+ mediaType: 'application/json',
2418
2887
  errors: {
2419
- 401: 'Unauthorized',
2420
- 403: 'Forbidden - insufficient permissions',
2421
- 404: 'Property not found'
2888
+ 400: 'Cannot enter - not in PENDING status or missing accounts',
2889
+ 404: 'Expected transaction or accounts not found'
2422
2890
  }
2423
2891
  });
2424
2892
  }
2893
+ }
2425
2894
 
2895
+ export class RecurringForecastService {
2426
2896
  /**
2427
- * Update a system property
2897
+ * Get cash flow forecast
2898
+ * Returns predicted outflows for the next N months based on active recurring rules
2428
2899
  * @param data The data for the request.
2429
- * @param data.key Property key
2430
- * @param data.requestBody
2431
- * @returns unknown Property updated successfully
2900
+ * @param data.region Region code for tenant context
2901
+ * @param data.months Number of months to forecast (1-12, default 3)
2902
+ * @returns ForecastResponseDto Forecast retrieved successfully
2432
2903
  * @throws ApiError
2433
2904
  */
2434
- public static propertyControllerUpdate(
2435
- data: PropertyControllerUpdateData
2436
- ): CancelablePromise<PropertyControllerUpdateResponse> {
2905
+ public static forecastControllerGetForecast(
2906
+ data: ForecastControllerGetForecastData
2907
+ ): CancelablePromise<ForecastControllerGetForecastResponse> {
2437
2908
  return __request(OpenAPI, {
2438
- method: 'PUT',
2439
- url: '/api/v1/admin/properties/{key}',
2909
+ method: 'GET',
2910
+ url: '/api/v1/{region}/bean/recurring/forecast',
2440
2911
  path: {
2441
- key: data.key
2912
+ region: data.region
2442
2913
  },
2443
- body: data.requestBody,
2444
- mediaType: 'application/json',
2445
- errors: {
2446
- 401: 'Unauthorized',
2447
- 403: 'Forbidden - insufficient permissions'
2914
+ query: {
2915
+ months: data.months
2448
2916
  }
2449
2917
  });
2450
2918
  }
2919
+ }
2451
2920
 
2921
+ export class BeanCategoryCatalogService {
2452
2922
  /**
2453
- * Delete a system property
2923
+ * List category catalog for a region
2924
+ * 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.
2454
2925
  * @param data The data for the request.
2455
- * @param data.key Property key
2456
- * @returns void Property deleted successfully
2926
+ * @param data.region Region code for tenant context
2927
+ * @param data.scenario Filter by scenario
2928
+ * @param data.routeBearing Filter by routeBearing (entity-router route() consumes it)
2929
+ * @returns CategoryCatalogListResponseDto Category catalog retrieved successfully
2457
2930
  * @throws ApiError
2458
2931
  */
2459
- public static propertyControllerDelete(
2460
- data: PropertyControllerDeleteData
2461
- ): CancelablePromise<PropertyControllerDeleteResponse> {
2932
+ public static categoryCatalogControllerList(
2933
+ data: CategoryCatalogControllerListData
2934
+ ): CancelablePromise<CategoryCatalogControllerListResponse> {
2462
2935
  return __request(OpenAPI, {
2463
- method: 'DELETE',
2464
- url: '/api/v1/admin/properties/{key}',
2936
+ method: 'GET',
2937
+ url: '/api/v1/{region}/bean/categories',
2465
2938
  path: {
2466
- key: data.key
2467
- },
2468
- errors: {
2469
- 401: 'Unauthorized',
2470
- 403: 'Forbidden - insufficient permissions',
2471
- 404: 'Property not found'
2939
+ region: data.region
2940
+ },
2941
+ query: {
2942
+ scenario: data.scenario,
2943
+ routeBearing: data.routeBearing
2472
2944
  }
2473
2945
  });
2474
2946
  }
@@ -2649,17 +3121,157 @@ export class LifeEventsService {
2649
3121
  }
2650
3122
  }
2651
3123
 
3124
+ export class OnboardingService {
3125
+ /**
3126
+ * Bootstrap core accounts + register asset accounts with opening balances (ADR-0113)
3127
+ * @param data The data for the request.
3128
+ * @param data.region Region code for tenant context. Not-yet-open codes are accepted: the universal catalog backs onboarding regardless of region (#759)
3129
+ * @param data.requestBody
3130
+ * @returns unknown Onboarding bootstrap result.
3131
+ * @throws ApiError
3132
+ */
3133
+ public static onboardingControllerBootstrap(
3134
+ data: OnboardingControllerBootstrapData
3135
+ ): CancelablePromise<OnboardingControllerBootstrapResponse> {
3136
+ return __request(OpenAPI, {
3137
+ method: 'POST',
3138
+ url: '/api/v1/{region}/bean/onboarding',
3139
+ path: {
3140
+ region: data.region
3141
+ },
3142
+ body: data.requestBody,
3143
+ mediaType: 'application/json',
3144
+ errors: {
3145
+ 422: 'Invalid region/account path/duplicate paths.'
3146
+ }
3147
+ });
3148
+ }
3149
+ }
3150
+
3151
+ export class BalanceReconciliationService {
3152
+ /**
3153
+ * Preview reconciliation (book vs actual)
3154
+ * Computes book balance, diff, Beancount-inferred tolerance, and suggested action without persisting.
3155
+ * @param data The data for the request.
3156
+ * @param data.region Region code for tenant context (decorative for reconciliation)
3157
+ * @param data.requestBody
3158
+ * @returns ReconciliationComputeResultDto Reconciliation preview
3159
+ * @throws ApiError
3160
+ */
3161
+ public static reconciliationControllerCompute(
3162
+ data: ReconciliationControllerComputeData
3163
+ ): CancelablePromise<ReconciliationControllerComputeResponse> {
3164
+ return __request(OpenAPI, {
3165
+ method: 'POST',
3166
+ url: '/api/v1/{region}/bean/reconciliations',
3167
+ path: {
3168
+ region: data.region
3169
+ },
3170
+ body: data.requestBody,
3171
+ mediaType: 'application/json',
3172
+ errors: {
3173
+ 404: 'Account not found'
3174
+ }
3175
+ });
3176
+ }
3177
+
3178
+ /**
3179
+ * Record a balance assertion
3180
+ * Persists the reconciliation as a BeanBalance assertion (amount = actual, diffAmount = book − actual). Re-reconciling the same day/currency upserts.
3181
+ * @param data The data for the request.
3182
+ * @param data.region Region code for tenant context (decorative for reconciliation)
3183
+ * @param data.requestBody
3184
+ * @returns ReconciliationRecordDto Balance assertion recorded
3185
+ * @throws ApiError
3186
+ */
3187
+ public static reconciliationControllerAssert(
3188
+ data: ReconciliationControllerAssertData
3189
+ ): CancelablePromise<ReconciliationControllerAssertResponse> {
3190
+ return __request(OpenAPI, {
3191
+ method: 'POST',
3192
+ url: '/api/v1/{region}/bean/reconciliations/assert',
3193
+ path: {
3194
+ region: data.region
3195
+ },
3196
+ body: data.requestBody,
3197
+ mediaType: 'application/json',
3198
+ errors: {
3199
+ 404: 'Account not found'
3200
+ }
3201
+ });
3202
+ }
3203
+
3204
+ /**
3205
+ * Generate a pad adjusting entry
3206
+ * When book is outside tolerance, synthesizes a Beancount pad transaction (flag P) booking the diff from source_account and persists it. Source defaults to Equity:Opening-Balances.
3207
+ * @param data The data for the request.
3208
+ * @param data.region Region code for tenant context (decorative for reconciliation)
3209
+ * @param data.requestBody
3210
+ * @returns PadResultDto Pad adjusting entry generated
3211
+ * @throws ApiError
3212
+ */
3213
+ public static reconciliationControllerPad(
3214
+ data: ReconciliationControllerPadData
3215
+ ): CancelablePromise<ReconciliationControllerPadResponse> {
3216
+ return __request(OpenAPI, {
3217
+ method: 'POST',
3218
+ url: '/api/v1/{region}/bean/reconciliations/pad',
3219
+ path: {
3220
+ region: data.region
3221
+ },
3222
+ body: data.requestBody,
3223
+ mediaType: 'application/json',
3224
+ errors: {
3225
+ 400: 'Book already within tolerance — no pad needed',
3226
+ 404: 'Account not found'
3227
+ }
3228
+ });
3229
+ }
3230
+
3231
+ /**
3232
+ * List reconciliation history for an account
3233
+ * Returns recorded balance assertions (most recent first). The latest drives the account-detail "Last <date>" badge.
3234
+ * @param data The data for the request.
3235
+ * @param data.accountId BeanAccount id
3236
+ * @param data.region Region code for tenant context (decorative for reconciliation)
3237
+ * @returns ReconciliationRecordDto Reconciliation history
3238
+ * @throws ApiError
3239
+ */
3240
+ public static reconciliationControllerHistory(
3241
+ data: ReconciliationControllerHistoryData
3242
+ ): CancelablePromise<ReconciliationControllerHistoryResponse> {
3243
+ return __request(OpenAPI, {
3244
+ method: 'GET',
3245
+ url: '/api/v1/{region}/bean/accounts/{accountId}/reconciliations',
3246
+ path: {
3247
+ accountId: data.accountId,
3248
+ region: data.region
3249
+ },
3250
+ errors: {
3251
+ 404: 'Account not found'
3252
+ }
3253
+ });
3254
+ }
3255
+ }
3256
+
2652
3257
  export class BeanExportService {
2653
3258
  /**
2654
3259
  * Export Beancount ledger as ZIP
2655
3260
  * Export all user Beancount data as a ZIP file containing ledger.beancount and yearly files in community format.
2656
- * @returns unknown
3261
+ * @param data The data for the request.
3262
+ * @param data.region Region code for tenant context
3263
+ * @returns binary ZIP archive (application/zip) streamed as an attachment
2657
3264
  * @throws ApiError
2658
3265
  */
2659
- public static exportControllerExportBeancount(): CancelablePromise<ExportControllerExportBeancountResponse> {
3266
+ public static exportControllerExportBeancount(
3267
+ data: ExportControllerExportBeancountData
3268
+ ): CancelablePromise<ExportControllerExportBeancountResponse> {
2660
3269
  return __request(OpenAPI, {
2661
3270
  method: 'GET',
2662
- url: '/api/v1/{region}/bean/export/beancount'
3271
+ url: '/api/v1/{region}/bean/export/beancount',
3272
+ path: {
3273
+ region: data.region
3274
+ }
2663
3275
  });
2664
3276
  }
2665
3277
  }
@@ -2696,7 +3308,7 @@ export class BeanImportService {
2696
3308
 
2697
3309
  /**
2698
3310
  * Identify file type
2699
- * Upload a file to check if it can be processed by any registered importer. Does not perform actual import - useful for pre-validation. Uses user-specific importer configuration.
3311
+ * Server-side importer identification has been removed (ADR-0101); file matching is handled client-side via the community parser pipeline. Always returns identified=false with an explanatory message; kept for backward compatibility. Does not perform actual import.
2700
3312
  * @param data The data for the request.
2701
3313
  * @param data.region Region code for tenant context
2702
3314
  * @param data.formData File to identify
@@ -2827,216 +3439,196 @@ export class BeanImportService {
2827
3439
  }
2828
3440
  }
2829
3441
 
2830
- export class BeanPlatformsService {
2831
- /**
2832
- * Get all platforms with statistics
2833
- * @returns unknown List of platforms with binding and account counts
2834
- * @throws ApiError
2835
- */
2836
- public static platformControllerFindAll(): CancelablePromise<PlatformControllerFindAllResponse> {
2837
- return __request(OpenAPI, {
2838
- method: 'GET',
2839
- url: '/api/v1/bean/platforms'
2840
- });
2841
- }
2842
-
3442
+ export class ProviderSyncService {
2843
3443
  /**
2844
- * Create a new platform
3444
+ * Sync transactions from financial data provider
3445
+ *
3446
+ * Accepts raw transactions from external financial data providers, transforms them to Beancount format, and processes them through the ingestion pipeline.
3447
+ *
3448
+ * **Supported Providers:**
3449
+ * - **plaid**: Plaid API (US, Canada, Europe)
3450
+ * - **teller**: Teller API (US)
3451
+ * - **truelayer**: TrueLayer Open Banking (UK, Europe)
3452
+ * - **gocardless**: GoCardless Bank Account Data (Europe)
3453
+ * - **simplefin**: SimpleFIN (Self-hosted)
3454
+ * - **yodlee**: Yodlee (Global)
3455
+ * - **beancount-direct**: Beancount format transactions
3456
+ * - **parsed-bill**: Client-side parsed bill transactions
3457
+ *
3458
+ * **Processing Flow:**
3459
+ * 1. Transform raw data via provider adapter
3460
+ * 2. Validate transaction format
3461
+ * 3. Deduplicate using originalId
3462
+ * 4. Classify using rule engine
3463
+ * 5. Route low-confidence to Review Center
3464
+ * 6. Persist validated transactions
3465
+ *
2845
3466
  * @param data The data for the request.
3467
+ * @param data.providerName Provider name
3468
+ * @param data.region Region code for tenant context
2846
3469
  * @param data.requestBody
2847
- * @returns unknown Platform created successfully
3470
+ * @returns ProviderSyncResponseDto Sync completed successfully
2848
3471
  * @throws ApiError
2849
3472
  */
2850
- public static platformControllerCreate(
2851
- data: PlatformControllerCreateData
2852
- ): CancelablePromise<PlatformControllerCreateResponse> {
3473
+ public static providerSyncControllerSync(
3474
+ data: ProviderSyncControllerSyncData
3475
+ ): CancelablePromise<ProviderSyncControllerSyncResponse> {
2853
3476
  return __request(OpenAPI, {
2854
3477
  method: 'POST',
2855
- url: '/api/v1/bean/platforms',
3478
+ url: '/api/v1/{region}/bean/import/provider/{providerName}/sync',
3479
+ path: {
3480
+ providerName: data.providerName,
3481
+ region: data.region
3482
+ },
2856
3483
  body: data.requestBody,
2857
3484
  mediaType: 'application/json',
2858
3485
  errors: {
2859
- 409: 'Platform already exists'
3486
+ 400: 'Invalid request data',
3487
+ 401: 'Missing or invalid authentication',
3488
+ 404: 'Provider not supported'
2860
3489
  }
2861
3490
  });
2862
3491
  }
2863
3492
 
2864
3493
  /**
2865
- * Get platform list for current user
2866
- * @returns unknown List of platforms with user binding status
2867
- * @throws ApiError
2868
- */
2869
- public static platformControllerGetPlatformList(): CancelablePromise<PlatformControllerGetPlatformListResponse> {
2870
- return __request(OpenAPI, {
2871
- method: 'GET',
2872
- url: '/api/v1/bean/platforms/list'
2873
- });
2874
- }
2875
-
2876
- /**
2877
- * Match platforms by name or alias
3494
+ * Get supported providers
3495
+ * Returns a list of all providers supported by the sync endpoint.
2878
3496
  * @param data The data for the request.
2879
- * @param data.q Search query — Chinese name, English name, or abbreviation
2880
- * @param data.region Region code for category override lookup
2881
- * @returns unknown List of matching platforms with suggested segment names
3497
+ * @param data.region Region code for tenant context
3498
+ * @returns SupportedProvidersResponseDto List of supported providers
2882
3499
  * @throws ApiError
2883
3500
  */
2884
- public static platformControllerMatchPlatforms(
2885
- data: PlatformControllerMatchPlatformsData
2886
- ): CancelablePromise<PlatformControllerMatchPlatformsResponse> {
3501
+ public static providerSyncControllerGetSupportedProviders(
3502
+ data: ProviderSyncControllerGetSupportedProvidersData
3503
+ ): CancelablePromise<ProviderSyncControllerGetSupportedProvidersResponse> {
2887
3504
  return __request(OpenAPI, {
2888
3505
  method: 'GET',
2889
- url: '/api/v1/bean/platforms/match',
2890
- query: {
2891
- q: data.q,
2892
- region: data.region
2893
- }
2894
- });
2895
- }
2896
-
2897
- /**
2898
- * Update a platform
2899
- * @param data The data for the request.
2900
- * @param data.id Platform ID
2901
- * @param data.requestBody
2902
- * @returns unknown Platform updated successfully
2903
- * @throws ApiError
2904
- */
2905
- public static platformControllerUpdate(
2906
- data: PlatformControllerUpdateData
2907
- ): CancelablePromise<PlatformControllerUpdateResponse> {
2908
- return __request(OpenAPI, {
2909
- method: 'PUT',
2910
- url: '/api/v1/bean/platforms/{id}',
3506
+ url: '/api/v1/{region}/bean/import/provider/supported',
2911
3507
  path: {
2912
- id: data.id
3508
+ region: data.region
2913
3509
  },
2914
- body: data.requestBody,
2915
- mediaType: 'application/json',
2916
3510
  errors: {
2917
- 404: 'Platform not found'
3511
+ 401: 'Missing or invalid authentication'
2918
3512
  }
2919
3513
  });
2920
3514
  }
2921
3515
 
2922
3516
  /**
2923
- * Delete a platform
3517
+ * Check if provider is supported
3518
+ * Returns whether a specific provider is supported.
2924
3519
  * @param data The data for the request.
2925
- * @param data.id Platform ID
2926
- * @returns void Platform deleted successfully
3520
+ * @param data.providerName Provider name to check
3521
+ * @param data.region Region code for tenant context
3522
+ * @returns unknown Provider support status
2927
3523
  * @throws ApiError
2928
3524
  */
2929
- public static platformControllerDelete(
2930
- data: PlatformControllerDeleteData
2931
- ): CancelablePromise<PlatformControllerDeleteResponse> {
3525
+ public static providerSyncControllerIsProviderSupported(
3526
+ data: ProviderSyncControllerIsProviderSupportedData
3527
+ ): CancelablePromise<ProviderSyncControllerIsProviderSupportedResponse> {
2932
3528
  return __request(OpenAPI, {
2933
- method: 'DELETE',
2934
- url: '/api/v1/bean/platforms/{id}',
3529
+ method: 'GET',
3530
+ url: '/api/v1/{region}/bean/import/provider/{providerName}/supported',
2935
3531
  path: {
2936
- id: data.id
3532
+ providerName: data.providerName,
3533
+ region: data.region
2937
3534
  },
2938
- errors: {
2939
- 404: 'Platform not found'
2940
- }
2941
- });
2942
- }
2943
- }
2944
-
2945
- export class ProviderSyncService {
2946
- /**
2947
- * Sync transactions from financial data provider
2948
- *
2949
- * Accepts raw transactions from external financial data providers, transforms them to Beancount format, and processes them through the ingestion pipeline.
2950
- *
2951
- * **Supported Providers:**
2952
- * - **plaid**: Plaid API (US, Canada, Europe)
2953
- * - **teller**: Teller API (US)
2954
- * - **truelayer**: TrueLayer Open Banking (UK, Europe)
2955
- * - **gocardless**: GoCardless Bank Account Data (Europe)
2956
- * - **simplefin**: SimpleFIN (Self-hosted)
2957
- * - **yodlee**: Yodlee (Global)
2958
- * - **beancount-direct**: Beancount format transactions
2959
- * - **parsed-bill**: Client-side parsed bill transactions
2960
- *
2961
- * **Processing Flow:**
2962
- * 1. Transform raw data via provider adapter
2963
- * 2. Validate transaction format
2964
- * 3. Deduplicate using originalId
2965
- * 4. Classify using rule engine
2966
- * 5. Route low-confidence to Review Center
2967
- * 6. Persist validated transactions
2968
- *
3535
+ errors: {
3536
+ 401: 'Missing or invalid authentication'
3537
+ }
3538
+ });
3539
+ }
3540
+ }
3541
+
3542
+ export class ExternalAccountLinksService {
3543
+ /**
3544
+ * Create an external account → BeanAccount mapping (ADR-0113)
2969
3545
  * @param data The data for the request.
2970
- * @param data.providerName Provider name
2971
3546
  * @param data.region Region code for tenant context
2972
3547
  * @param data.requestBody
2973
- * @returns ProviderSyncResponseDto Sync completed successfully
3548
+ * @returns ExternalAccountLinkResponseDto Link created.
2974
3549
  * @throws ApiError
2975
3550
  */
2976
- public static providerSyncControllerSync(
2977
- data: ProviderSyncControllerSyncData
2978
- ): CancelablePromise<ProviderSyncControllerSyncResponse> {
3551
+ public static externalAccountLinkControllerCreate(
3552
+ data: ExternalAccountLinkControllerCreateData
3553
+ ): CancelablePromise<ExternalAccountLinkControllerCreateResponse> {
2979
3554
  return __request(OpenAPI, {
2980
3555
  method: 'POST',
2981
- url: '/api/v1/{region}/bean/import/provider/{providerName}/sync',
3556
+ url: '/api/v1/{region}/bean/external-account-links',
2982
3557
  path: {
2983
- providerName: data.providerName,
2984
3558
  region: data.region
2985
3559
  },
2986
3560
  body: data.requestBody,
2987
3561
  mediaType: 'application/json',
2988
3562
  errors: {
2989
- 400: 'Invalid request data',
2990
- 401: 'Missing or invalid authentication',
2991
- 404: 'Provider not supported'
3563
+ 422: 'beanAccountId not owned, or an active link already exists.'
2992
3564
  }
2993
3565
  });
2994
3566
  }
2995
3567
 
2996
3568
  /**
2997
- * Get supported providers
2998
- * Returns a list of all providers supported by the sync endpoint.
3569
+ * List the user's active external account links
2999
3570
  * @param data The data for the request.
3571
+ * @param data.provider
3000
3572
  * @param data.region Region code for tenant context
3001
- * @returns SupportedProvidersResponseDto List of supported providers
3573
+ * @returns ExternalAccountLinkListResponseDto Links retrieved.
3002
3574
  * @throws ApiError
3003
3575
  */
3004
- public static providerSyncControllerGetSupportedProviders(
3005
- data: ProviderSyncControllerGetSupportedProvidersData
3006
- ): CancelablePromise<ProviderSyncControllerGetSupportedProvidersResponse> {
3576
+ public static externalAccountLinkControllerFindAll(
3577
+ data: ExternalAccountLinkControllerFindAllData
3578
+ ): CancelablePromise<ExternalAccountLinkControllerFindAllResponse> {
3007
3579
  return __request(OpenAPI, {
3008
3580
  method: 'GET',
3009
- url: '/api/v1/{region}/bean/import/provider/supported',
3581
+ url: '/api/v1/{region}/bean/external-account-links',
3010
3582
  path: {
3011
3583
  region: data.region
3012
3584
  },
3013
- errors: {
3014
- 401: 'Missing or invalid authentication'
3585
+ query: {
3586
+ provider: data.provider
3015
3587
  }
3016
3588
  });
3017
3589
  }
3018
3590
 
3019
3591
  /**
3020
- * Check if provider is supported
3021
- * Returns whether a specific provider is supported.
3592
+ * Get a single external account link
3022
3593
  * @param data The data for the request.
3023
- * @param data.providerName Provider name to check
3594
+ * @param data.id
3024
3595
  * @param data.region Region code for tenant context
3025
- * @returns unknown Provider support status
3596
+ * @returns ExternalAccountLinkResponseDto Link retrieved.
3026
3597
  * @throws ApiError
3027
3598
  */
3028
- public static providerSyncControllerIsProviderSupported(
3029
- data: ProviderSyncControllerIsProviderSupportedData
3030
- ): CancelablePromise<ProviderSyncControllerIsProviderSupportedResponse> {
3599
+ public static externalAccountLinkControllerFindOne(
3600
+ data: ExternalAccountLinkControllerFindOneData
3601
+ ): CancelablePromise<ExternalAccountLinkControllerFindOneResponse> {
3031
3602
  return __request(OpenAPI, {
3032
3603
  method: 'GET',
3033
- url: '/api/v1/{region}/bean/import/provider/{providerName}/supported',
3604
+ url: '/api/v1/{region}/bean/external-account-links/{id}',
3034
3605
  path: {
3035
- providerName: data.providerName,
3606
+ id: data.id,
3036
3607
  region: data.region
3037
3608
  },
3038
3609
  errors: {
3039
- 401: 'Missing or invalid authentication'
3610
+ 422: 'Link not found or not owned by the user.'
3611
+ }
3612
+ });
3613
+ }
3614
+
3615
+ /**
3616
+ * Soft-delete (disconnect) an external account link
3617
+ * @param data The data for the request.
3618
+ * @param data.id
3619
+ * @param data.region Region code for tenant context
3620
+ * @returns void Link soft-deleted; historical transactions are unaffected.
3621
+ * @throws ApiError
3622
+ */
3623
+ public static externalAccountLinkControllerRemove(
3624
+ data: ExternalAccountLinkControllerRemoveData
3625
+ ): CancelablePromise<ExternalAccountLinkControllerRemoveResponse> {
3626
+ return __request(OpenAPI, {
3627
+ method: 'DELETE',
3628
+ url: '/api/v1/{region}/bean/external-account-links/{id}',
3629
+ path: {
3630
+ id: data.id,
3631
+ region: data.region
3040
3632
  }
3041
3633
  });
3042
3634
  }
@@ -3200,447 +3792,330 @@ export class BeanNlpService {
3200
3792
  }
3201
3793
  }
3202
3794
 
3203
- export class DashboardService {
3795
+ export class BeanPlatformsService {
3204
3796
  /**
3205
- * Get net worth overview
3206
- * Returns total net worth with breakdown of assets and liabilities
3207
- * @param data The data for the request.
3208
- * @param data.region Region code for tenant context
3209
- * @param data.date Date for balance calculation (ISO 8601 format)
3210
- * @returns NetWorthResponseDto Net worth retrieved successfully
3797
+ * Get all platforms with statistics
3798
+ * @returns unknown List of platforms with binding and account counts
3211
3799
  * @throws ApiError
3212
3800
  */
3213
- public static dashboardControllerGetNetWorth(
3214
- data: DashboardControllerGetNetWorthData
3215
- ): CancelablePromise<DashboardControllerGetNetWorthResponse> {
3801
+ public static platformControllerFindAll(): CancelablePromise<PlatformControllerFindAllResponse> {
3216
3802
  return __request(OpenAPI, {
3217
3803
  method: 'GET',
3218
- url: '/api/v1/{region}/dashboard/net-worth',
3219
- path: {
3220
- region: data.region
3221
- },
3222
- query: {
3223
- date: data.date
3224
- },
3225
- errors: {
3226
- 401: 'User not authenticated'
3227
- }
3804
+ url: '/api/v1/bean/platforms'
3228
3805
  });
3229
3806
  }
3230
3807
 
3231
3808
  /**
3232
- * Get accounts grouped by platform
3233
- * Returns accounts with balances grouped by financial platform
3809
+ * Create a new platform
3234
3810
  * @param data The data for the request.
3235
- * @param data.region Region code for tenant context
3236
- * @param data.groupBy Grouping strategy
3237
- * @param data.date Date for balance calculation (ISO 8601 format)
3238
- * @param data.accountId Scope to a single account (only valid with groupBy=holdingAssetClass, ADR-0105 §6)
3239
- * @returns unknown Accounts retrieved successfully. Response type depends on groupBy parameter.
3811
+ * @param data.requestBody
3812
+ * @returns unknown Platform created successfully
3240
3813
  * @throws ApiError
3241
3814
  */
3242
- public static dashboardControllerGetAccounts(
3243
- data: DashboardControllerGetAccountsData
3244
- ): CancelablePromise<DashboardControllerGetAccountsResponse> {
3815
+ public static platformControllerCreate(
3816
+ data: PlatformControllerCreateData
3817
+ ): CancelablePromise<PlatformControllerCreateResponse> {
3245
3818
  return __request(OpenAPI, {
3246
- method: 'GET',
3247
- url: '/api/v1/{region}/dashboard/accounts',
3248
- path: {
3249
- region: data.region
3250
- },
3251
- query: {
3252
- groupBy: data.groupBy,
3253
- date: data.date,
3254
- accountId: data.accountId
3255
- },
3819
+ method: 'POST',
3820
+ url: '/api/v1/bean/platforms',
3821
+ body: data.requestBody,
3822
+ mediaType: 'application/json',
3256
3823
  errors: {
3257
- 401: 'User not authenticated'
3824
+ 409: 'Platform already exists'
3258
3825
  }
3259
3826
  });
3260
3827
  }
3261
3828
 
3262
3829
  /**
3263
- * Get cash flow summary
3264
- * Returns income, expenses, and savings for a monthly period
3830
+ * Get platform list for current user
3265
3831
  * @param data The data for the request.
3266
- * @param data.period Period in YYYY-MM format
3267
- * @param data.region Region code for tenant context
3268
- * @returns CashFlowResponseDto Cash flow retrieved successfully
3832
+ * @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").
3833
+ * @returns PlatformListItemDto List of platforms with user binding status
3269
3834
  * @throws ApiError
3270
3835
  */
3271
- public static dashboardControllerGetCashFlow(
3272
- data: DashboardControllerGetCashFlowData
3273
- ): CancelablePromise<DashboardControllerGetCashFlowResponse> {
3836
+ public static platformControllerGetPlatformList(
3837
+ data: PlatformControllerGetPlatformListData = {}
3838
+ ): CancelablePromise<PlatformControllerGetPlatformListResponse> {
3274
3839
  return __request(OpenAPI, {
3275
3840
  method: 'GET',
3276
- url: '/api/v1/{region}/dashboard/cash-flow',
3277
- path: {
3278
- region: data.region
3279
- },
3841
+ url: '/api/v1/bean/platforms/list',
3280
3842
  query: {
3281
- period: data.period
3282
- },
3283
- errors: {
3284
- 400: 'Invalid period format',
3285
- 401: 'User not authenticated'
3843
+ region: data.region
3286
3844
  }
3287
3845
  });
3288
3846
  }
3289
- }
3290
3847
 
3291
- export class InvestmentService {
3292
3848
  /**
3293
- * Get per-holding unrealized + realized P&L
3294
- * Average-cost unrealized P&L per account × commodity, plus cumulative realized P&L on sold lots (method = FIFO | average, default average).
3849
+ * Match platforms by name or alias
3295
3850
  * @param data The data for the request.
3296
- * @param data.region Region code for tenant context
3297
- * @param data.asOf As-of date (ISO 8601), defaults to today
3298
- * @param data.accountId Scope to a single account
3299
- * @param data.method Realized-P&L lot-matching method (default average). Does not affect the average-cost unrealized basis.
3300
- * @returns HoldingPnlResponseDto Holding P&L retrieved successfully
3851
+ * @param data.q Search query — Chinese name, English name, or abbreviation
3852
+ * @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").
3853
+ * @returns PlatformMatchResponseDto Matching platforms with overall match type and truncation flag
3301
3854
  * @throws ApiError
3302
3855
  */
3303
- public static holdingPnlControllerGetHoldingPnl(
3304
- data: HoldingPnlControllerGetHoldingPnlData
3305
- ): CancelablePromise<HoldingPnlControllerGetHoldingPnlResponse> {
3856
+ public static platformControllerMatchPlatforms(
3857
+ data: PlatformControllerMatchPlatformsData
3858
+ ): CancelablePromise<PlatformControllerMatchPlatformsResponse> {
3306
3859
  return __request(OpenAPI, {
3307
3860
  method: 'GET',
3308
- url: '/api/v1/{region}/investment/holdings/pnl',
3309
- path: {
3310
- region: data.region
3311
- },
3861
+ url: '/api/v1/bean/platforms/match',
3312
3862
  query: {
3313
- asOf: data.asOf,
3314
- accountId: data.accountId,
3315
- method: data.method
3316
- },
3317
- errors: {
3318
- 400: 'Invalid asOf format/value/future date, invalid accountId format, or unsupported method',
3319
- 401: 'User not authenticated'
3320
- }
3321
- });
3322
- }
3323
- }
3324
-
3325
- export class BeanPricesService {
3326
- /**
3327
- * Create a new price
3328
- * Creates a new price entry for the authenticated user
3329
- * @param data The data for the request.
3330
- * @param data.region Region code for tenant context
3331
- * @param data.requestBody
3332
- * @returns PriceResponseDto Price created successfully
3333
- * @throws ApiError
3334
- */
3335
- public static priceControllerCreate(
3336
- data: PriceControllerCreateData
3337
- ): CancelablePromise<PriceControllerCreateResponse> {
3338
- return __request(OpenAPI, {
3339
- method: 'POST',
3340
- url: '/api/v1/{region}/bean/prices',
3341
- path: {
3863
+ q: data.q,
3342
3864
  region: data.region
3343
- },
3344
- body: data.requestBody,
3345
- mediaType: 'application/json',
3346
- errors: {
3347
- 404: 'Currency or quoteCurrency commodity not found',
3348
- 409: 'Price already exists for this currency pair and date'
3349
3865
  }
3350
3866
  });
3351
3867
  }
3352
3868
 
3353
3869
  /**
3354
- * List user prices
3355
- * Returns all price entries for the authenticated user with optional filtering
3870
+ * Get the region and candidate account standards for a platform
3356
3871
  * @param data The data for the request.
3357
- * @param data.region Region code for tenant context
3358
- * @param data.currency Filter by currency (e.g., BTC, AAPL, USD)
3359
- * @param data.quoteCurrency Filter by quote currency (pricing currency, e.g., USD, CNY)
3360
- * @param data.dateFrom Filter prices from this date (ISO 8601 format)
3361
- * @param data.dateTo Filter prices to this date (ISO 8601 format)
3362
- * @param data.search Search term for currency or quoteCurrency (case-insensitive partial match)
3363
- * @param data.page Page number for pagination (default: 1)
3364
- * @param data.limit Number of items per page (default: 20, max: 100)
3365
- * @returns PriceListResponseDto Prices retrieved successfully
3872
+ * @param data.id Platform ID (from a match result)
3873
+ * @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.
3874
+ * @param data.type Filter templates by account type (path first segment)
3875
+ * @returns PlatformStandardsResponseDto Resolved region plus the merged account-standard catalog of that region (groupable by productCategory client-side)
3366
3876
  * @throws ApiError
3367
3877
  */
3368
- public static priceControllerFindAll(
3369
- data: PriceControllerFindAllData
3370
- ): CancelablePromise<PriceControllerFindAllResponse> {
3878
+ public static platformControllerGetPlatformStandards(
3879
+ data: PlatformControllerGetPlatformStandardsData
3880
+ ): CancelablePromise<PlatformControllerGetPlatformStandardsResponse> {
3371
3881
  return __request(OpenAPI, {
3372
3882
  method: 'GET',
3373
- url: '/api/v1/{region}/bean/prices',
3883
+ url: '/api/v1/bean/platforms/{id}/standards',
3374
3884
  path: {
3375
- region: data.region
3885
+ id: data.id
3376
3886
  },
3377
3887
  query: {
3378
- currency: data.currency,
3379
- quoteCurrency: data.quoteCurrency,
3380
- dateFrom: data.dateFrom,
3381
- dateTo: data.dateTo,
3382
- search: data.search,
3383
- page: data.page,
3384
- limit: data.limit
3888
+ region: data.region,
3889
+ type: data.type
3385
3890
  }
3386
3891
  });
3387
3892
  }
3388
3893
 
3389
3894
  /**
3390
- * Get price by ID
3391
- * Returns a single price entry by its ID
3895
+ * Update a platform
3392
3896
  * @param data The data for the request.
3393
- * @param data.id Price ID
3394
- * @param data.region Region code for tenant context
3395
- * @returns PriceResponseDto Price retrieved successfully
3897
+ * @param data.id Platform ID
3898
+ * @param data.requestBody
3899
+ * @returns unknown Platform updated successfully
3396
3900
  * @throws ApiError
3397
3901
  */
3398
- public static priceControllerFindOne(
3399
- data: PriceControllerFindOneData
3400
- ): CancelablePromise<PriceControllerFindOneResponse> {
3902
+ public static platformControllerUpdate(
3903
+ data: PlatformControllerUpdateData
3904
+ ): CancelablePromise<PlatformControllerUpdateResponse> {
3401
3905
  return __request(OpenAPI, {
3402
- method: 'GET',
3403
- url: '/api/v1/{region}/bean/prices/{id}',
3906
+ method: 'PUT',
3907
+ url: '/api/v1/bean/platforms/{id}',
3404
3908
  path: {
3405
- id: data.id,
3406
- region: data.region
3909
+ id: data.id
3407
3910
  },
3911
+ body: data.requestBody,
3912
+ mediaType: 'application/json',
3408
3913
  errors: {
3409
- 404: 'Price not found'
3914
+ 404: 'Platform not found'
3410
3915
  }
3411
3916
  });
3412
3917
  }
3413
3918
 
3414
3919
  /**
3415
- * Update a price
3416
- * Updates an existing price entry
3920
+ * Delete a platform
3417
3921
  * @param data The data for the request.
3418
- * @param data.id Price ID
3419
- * @param data.region Region code for tenant context
3420
- * @param data.requestBody
3421
- * @returns PriceResponseDto Price updated successfully
3922
+ * @param data.id Platform ID
3923
+ * @returns void Platform deleted successfully
3422
3924
  * @throws ApiError
3423
3925
  */
3424
- public static priceControllerUpdate(
3425
- data: PriceControllerUpdateData
3426
- ): CancelablePromise<PriceControllerUpdateResponse> {
3926
+ public static platformControllerDelete(
3927
+ data: PlatformControllerDeleteData
3928
+ ): CancelablePromise<PlatformControllerDeleteResponse> {
3427
3929
  return __request(OpenAPI, {
3428
- method: 'PUT',
3429
- url: '/api/v1/{region}/bean/prices/{id}',
3930
+ method: 'DELETE',
3931
+ url: '/api/v1/bean/platforms/{id}',
3430
3932
  path: {
3431
- id: data.id,
3432
- region: data.region
3933
+ id: data.id
3433
3934
  },
3434
- body: data.requestBody,
3435
- mediaType: 'application/json',
3436
3935
  errors: {
3437
- 404: 'Price not found',
3438
- 409: 'Updated price conflicts with existing price'
3936
+ 404: 'Platform not found'
3439
3937
  }
3440
3938
  });
3441
3939
  }
3940
+ }
3442
3941
 
3942
+ export class DashboardService {
3443
3943
  /**
3444
- * Delete a price
3445
- * Deletes a price entry (hard delete)
3944
+ * Get net worth overview
3945
+ * Returns total net worth with breakdown of assets and liabilities
3446
3946
  * @param data The data for the request.
3447
- * @param data.id Price ID
3448
3947
  * @param data.region Region code for tenant context
3449
- * @returns void Price deleted successfully
3948
+ * @param data.date Date for balance calculation (ISO 8601 format)
3949
+ * @returns NetWorthResponseDto Net worth retrieved successfully
3450
3950
  * @throws ApiError
3451
3951
  */
3452
- public static priceControllerDelete(
3453
- data: PriceControllerDeleteData
3454
- ): CancelablePromise<PriceControllerDeleteResponse> {
3952
+ public static dashboardControllerGetNetWorth(
3953
+ data: DashboardControllerGetNetWorthData
3954
+ ): CancelablePromise<DashboardControllerGetNetWorthResponse> {
3455
3955
  return __request(OpenAPI, {
3456
- method: 'DELETE',
3457
- url: '/api/v1/{region}/bean/prices/{id}',
3956
+ method: 'GET',
3957
+ url: '/api/v1/{region}/dashboard/net-worth',
3458
3958
  path: {
3459
- id: data.id,
3460
3959
  region: data.region
3461
3960
  },
3961
+ query: {
3962
+ date: data.date
3963
+ },
3462
3964
  errors: {
3463
- 404: 'Price not found'
3965
+ 401: 'User not authenticated'
3464
3966
  }
3465
3967
  });
3466
3968
  }
3467
3969
 
3468
3970
  /**
3469
- * Bulk create prices
3470
- * Creates multiple price entries at once (skips duplicates)
3971
+ * Get accounts grouped by platform
3972
+ * Returns accounts with balances grouped by financial platform
3471
3973
  * @param data The data for the request.
3472
3974
  * @param data.region Region code for tenant context
3473
- * @param data.requestBody
3474
- * @returns PriceResponseDto Prices created successfully
3975
+ * @param data.groupBy Grouping strategy
3976
+ * @param data.date Date for balance calculation (ISO 8601 format)
3977
+ * @param data.accountId Scope to a single account (only valid with groupBy=holdingAssetClass, ADR-0105 §6)
3978
+ * @returns unknown Accounts retrieved successfully. Response type depends on groupBy parameter.
3475
3979
  * @throws ApiError
3476
3980
  */
3477
- public static priceControllerBulkCreate(
3478
- data: PriceControllerBulkCreateData
3479
- ): CancelablePromise<PriceControllerBulkCreateResponse> {
3981
+ public static dashboardControllerGetAccounts(
3982
+ data: DashboardControllerGetAccountsData
3983
+ ): CancelablePromise<DashboardControllerGetAccountsResponse> {
3480
3984
  return __request(OpenAPI, {
3481
- method: 'POST',
3482
- url: '/api/v1/{region}/bean/prices/bulk',
3985
+ method: 'GET',
3986
+ url: '/api/v1/{region}/dashboard/accounts',
3483
3987
  path: {
3484
3988
  region: data.region
3485
3989
  },
3486
- body: data.requestBody,
3487
- mediaType: 'application/json'
3990
+ query: {
3991
+ groupBy: data.groupBy,
3992
+ date: data.date,
3993
+ accountId: data.accountId
3994
+ },
3995
+ errors: {
3996
+ 401: 'User not authenticated'
3997
+ }
3488
3998
  });
3489
3999
  }
3490
- }
3491
4000
 
3492
- export class ReportingService {
3493
4001
  /**
3494
- * Get portfolio value trends
3495
- *
3496
- * Returns time series data of portfolio net worth.
3497
- *
3498
- * **Multi-currency Support:**
3499
- * - `series[].byCurrency` - Currency breakdown for each data point
3500
- * - `byCurrency` - Separate time series grouped by currency
3501
- * - `warnings` - Exchange rate warnings if conversion failed
3502
- *
3503
- * **Parameters:**
3504
- * - `period`: Time period (1m, 3m, 6m, 1y)
3505
- * - `granularity`: Data granularity (day, week, month)
3506
- *
4002
+ * Get cash flow summary
4003
+ * Returns income, expenses, and savings for a monthly period
3507
4004
  * @param data The data for the request.
4005
+ * @param data.period Period in YYYY-MM format
3508
4006
  * @param data.region Region code for tenant context
3509
- * @param data.period Time period
3510
- * @param data.granularity Data granularity
3511
- * @returns PortfolioTrendsResponseDto Trends retrieved successfully
4007
+ * @returns CashFlowResponseDto Cash flow retrieved successfully
3512
4008
  * @throws ApiError
3513
4009
  */
3514
- public static reportingControllerGetPortfolioTrends(
3515
- data: ReportingControllerGetPortfolioTrendsData
3516
- ): CancelablePromise<ReportingControllerGetPortfolioTrendsResponse> {
4010
+ public static dashboardControllerGetCashFlow(
4011
+ data: DashboardControllerGetCashFlowData
4012
+ ): CancelablePromise<DashboardControllerGetCashFlowResponse> {
3517
4013
  return __request(OpenAPI, {
3518
4014
  method: 'GET',
3519
- url: '/api/v1/{region}/reporting/portfolio/trends',
4015
+ url: '/api/v1/{region}/dashboard/cash-flow',
3520
4016
  path: {
3521
4017
  region: data.region
3522
4018
  },
3523
4019
  query: {
3524
- period: data.period,
3525
- granularity: data.granularity
4020
+ period: data.period
3526
4021
  },
3527
4022
  errors: {
4023
+ 400: 'Invalid period format',
3528
4024
  401: 'User not authenticated'
3529
4025
  }
3530
4026
  });
3531
4027
  }
3532
4028
 
3533
4029
  /**
3534
- * Get cash-flow trends
3535
- *
3536
- * Monthly income / expense / netSavings over a fixed N-month window
3537
- * (current month + N−1 prior). Missing months are zero-filled (flow metric).
3538
- *
3539
- * **Parameters:**
3540
- * - `period`: 1m | 3m | 6m | 1y (default 6m)
3541
- * - `granularity`: accepted for API symmetry; v1 returns month buckets
3542
- *
4030
+ * Get expenses/income grouped by functional category
4031
+ * Returns amounts pre-aggregated by functional category (account-path Group segment) with server-side multi-currency conversion. flow=expense (default) aggregates ^Expenses: accounts; flow=income aggregates ^Income: accounts (issue #518)
3543
4032
  * @param data The data for the request.
3544
4033
  * @param data.region Region code for tenant context
3545
- * @param data.period Time period
3546
- * @param data.granularity Data granularity (accepted for API symmetry; v1 returns month buckets)
3547
- * @returns CashFlowTrendsResponseDto Cash-flow trends retrieved successfully
4034
+ * @param data.groupBy Grouping strategy
4035
+ * @param data.period Time window (1m = current calendar month)
4036
+ * @param data.flow Account root to aggregate (expense → ^Expenses:, income → ^Income:)
4037
+ * @returns ExpensesByCategoryResponseDto Expenses retrieved successfully
3548
4038
  * @throws ApiError
3549
4039
  */
3550
- public static reportingControllerGetCashFlowTrends(
3551
- data: ReportingControllerGetCashFlowTrendsData
3552
- ): CancelablePromise<ReportingControllerGetCashFlowTrendsResponse> {
4040
+ public static dashboardControllerGetExpenses(
4041
+ data: DashboardControllerGetExpensesData
4042
+ ): CancelablePromise<DashboardControllerGetExpensesResponse> {
3553
4043
  return __request(OpenAPI, {
3554
4044
  method: 'GET',
3555
- url: '/api/v1/{region}/reporting/cash-flow/trends',
4045
+ url: '/api/v1/{region}/dashboard/expenses',
3556
4046
  path: {
3557
4047
  region: data.region
3558
4048
  },
3559
4049
  query: {
4050
+ groupBy: data.groupBy,
3560
4051
  period: data.period,
3561
- granularity: data.granularity
4052
+ flow: data.flow
3562
4053
  },
3563
4054
  errors: {
4055
+ 400: 'Invalid groupBy or period',
3564
4056
  401: 'User not authenticated'
3565
4057
  }
3566
4058
  });
3567
4059
  }
3568
4060
 
3569
4061
  /**
3570
- * Generate portfolio snapshot
3571
- *
3572
- * Manually generate a portfolio snapshot for a specific date.
3573
- *
3574
- * **Multi-currency Support:**
3575
- * - Fetches balances grouped by currency
3576
- * - Uses user's baseCurrency setting for conversion
3577
- * - Stores exchange rates and warnings
3578
- *
3579
- * **Use Cases:**
3580
- * - Testing snapshot generation
3581
- * - Force regeneration after data correction
3582
- * - Initial setup for new users
3583
- *
4062
+ * Get the composite P8 advisor context
4063
+ * Assembles the P8 data context in one call: net worth (verbatim GET /dashboard/net-worth shape, user base currency semantics per ADR-0070), trailing-12m flow totals over the 12 calendar months including the as-of month, and top-3 expense categories by account-path leaf key — both flow blocks priced in CNY per the P8 contract. The P8 snake_case field spellings (as_of, net_worth, trailing_12m) are mapped by the consumer; the wire keeps the family camelCase
3584
4064
  * @param data The data for the request.
3585
4065
  * @param data.region Region code for tenant context
3586
- * @param data.requestBody Optional date (defaults to today)
3587
- * @returns GenerateSnapshotResponse Snapshot generated successfully
4066
+ * @param data.date As-of date for the snapshot and the trailing-12m window anchor (ISO 8601 format)
4067
+ * @returns AdvisorContextResponseDto Advisor context retrieved successfully
3588
4068
  * @throws ApiError
3589
4069
  */
3590
- public static reportingControllerGenerateSnapshot(
3591
- data: ReportingControllerGenerateSnapshotData
3592
- ): CancelablePromise<ReportingControllerGenerateSnapshotResponse> {
4070
+ public static dashboardControllerGetAdvisorContext(
4071
+ data: DashboardControllerGetAdvisorContextData
4072
+ ): CancelablePromise<DashboardControllerGetAdvisorContextResponse> {
3593
4073
  return __request(OpenAPI, {
3594
- method: 'POST',
3595
- url: '/api/v1/{region}/reporting/snapshots/generate',
4074
+ method: 'GET',
4075
+ url: '/api/v1/{region}/dashboard/advisor-context',
3596
4076
  path: {
3597
4077
  region: data.region
3598
4078
  },
3599
- body: data.requestBody,
3600
- mediaType: 'application/json',
4079
+ query: {
4080
+ date: data.date
4081
+ },
3601
4082
  errors: {
3602
4083
  400: 'Invalid date format',
3603
- 401: 'User not authenticated'
4084
+ 401: 'User not authenticated, or the token is not advisor-scoped (exchange via POST /auth/sessions/advisor, #1512)'
3604
4085
  }
3605
4086
  });
3606
4087
  }
4088
+ }
3607
4089
 
4090
+ export class InvestmentService {
3608
4091
  /**
3609
- * Backfill portfolio snapshots
3610
- *
3611
- * Generate snapshots for a date range (historical data backfill).
3612
- *
3613
- * **Multi-currency Support:**
3614
- * - Each snapshot includes multi-currency data
3615
- * - Uses exchange rates available at generation time
3616
- * - Warnings stored for missing exchange rates
3617
- *
3618
- * **Best Practices:**
3619
- * - Use for initial setup after account configuration
3620
- * - Run during low-traffic periods for large date ranges
3621
- * - Existing snapshots are skipped (not regenerated)
3622
- *
4092
+ * Get per-holding unrealized + realized P&L
4093
+ * Average-cost unrealized P&L per account × commodity, plus cumulative realized P&L on sold lots (method = FIFO | average, default average).
3623
4094
  * @param data The data for the request.
3624
4095
  * @param data.region Region code for tenant context
3625
- * @param data.requestBody
3626
- * @returns BackfillSnapshotsResponse Backfill completed successfully
4096
+ * @param data.asOf As-of date (ISO 8601), defaults to today
4097
+ * @param data.accountId Scope to a single account
4098
+ * @param data.method Realized-P&L lot-matching method (default average). Does not affect the average-cost unrealized basis.
4099
+ * @returns HoldingPnlResponseDto Holding P&L retrieved successfully
3627
4100
  * @throws ApiError
3628
4101
  */
3629
- public static reportingControllerBackfillSnapshots(
3630
- data: ReportingControllerBackfillSnapshotsData
3631
- ): CancelablePromise<ReportingControllerBackfillSnapshotsResponse> {
4102
+ public static holdingPnlControllerGetHoldingPnl(
4103
+ data: HoldingPnlControllerGetHoldingPnlData
4104
+ ): CancelablePromise<HoldingPnlControllerGetHoldingPnlResponse> {
3632
4105
  return __request(OpenAPI, {
3633
- method: 'POST',
3634
- url: '/api/v1/{region}/reporting/snapshots/backfill',
4106
+ method: 'GET',
4107
+ url: '/api/v1/{region}/investment/holdings/pnl',
3635
4108
  path: {
3636
4109
  region: data.region
3637
4110
  },
3638
- body: data.requestBody,
3639
- mediaType: 'application/json',
4111
+ query: {
4112
+ asOf: data.asOf,
4113
+ accountId: data.accountId,
4114
+ method: data.method
4115
+ },
3640
4116
  errors: {
3641
- 400: 'Invalid date format or range',
3642
- 401: 'User not authenticated',
3643
- 409: 'Backfill already in progress for this user'
4117
+ 400: 'Invalid asOf format/value/future date, invalid accountId format, or unsupported method',
4118
+ 401: 'User not authenticated'
3644
4119
  }
3645
4120
  });
3646
4121
  }
@@ -3669,7 +4144,7 @@ export class AuthService {
3669
4144
  * Anonymous login with access token
3670
4145
  * @param data The data for the request.
3671
4146
  * @param data.requestBody
3672
- * @returns unknown Login successful
4147
+ * @returns AnonymousLoginResponseDto Login successful
3673
4148
  * @throws ApiError
3674
4149
  */
3675
4150
  public static authControllerAccessTokenLogin(
@@ -3685,17 +4160,75 @@ export class AuthService {
3685
4160
  }
3686
4161
  });
3687
4162
  }
4163
+
4164
+ /**
4165
+ * Exchange an access token for an advisor-scoped, short-TTL JWT (#1512)
4166
+ * @param data The data for the request.
4167
+ * @param data.requestBody
4168
+ * @returns AdvisorLoginResponseDto Advisor-scope login successful — the token is valid only on advisor tool-face endpoints (e.g. GET /:region/dashboard/advisor-context)
4169
+ * @throws ApiError
4170
+ */
4171
+ public static authControllerAdvisorTokenLogin(
4172
+ data: AuthControllerAdvisorTokenLoginData
4173
+ ): CancelablePromise<AuthControllerAdvisorTokenLoginResponse> {
4174
+ return __request(OpenAPI, {
4175
+ method: 'POST',
4176
+ url: '/api/v1/auth/sessions/advisor',
4177
+ body: data.requestBody,
4178
+ mediaType: 'application/json',
4179
+ errors: {
4180
+ 401: 'Invalid access token'
4181
+ }
4182
+ });
4183
+ }
4184
+ }
4185
+
4186
+ export class CommunityService {
4187
+ /**
4188
+ * Relay a sanitized parser-contribution payload
4189
+ * 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).
4190
+ * @param data The data for the request.
4191
+ * @param data.region Region code for tenant context (routing only; the institution region rides in the payload meta)
4192
+ * @param data.requestBody
4193
+ * @returns ParserContributionRelayResponseDto Issue created by the bot
4194
+ * @throws ApiError
4195
+ */
4196
+ public static parserContributionControllerCreate(
4197
+ data: ParserContributionControllerCreateData
4198
+ ): CancelablePromise<ParserContributionControllerCreateResponse> {
4199
+ return __request(OpenAPI, {
4200
+ method: 'POST',
4201
+ url: '/api/v1/{region}/community/parser-contributions',
4202
+ path: {
4203
+ region: data.region
4204
+ },
4205
+ body: data.requestBody,
4206
+ mediaType: 'application/json',
4207
+ errors: {
4208
+ 401: 'Unauthorized',
4209
+ 422: 'Validation failed (institution slug, empty samples, row/cell size limits)',
4210
+ 429: 'Rate limited (5 submissions per user per hour)',
4211
+ 501: 'Relay not configured on this deployment — clients fall back to the clipboard flow',
4212
+ 502: 'GitHub bot failure (upstream), safe to retry'
4213
+ }
4214
+ });
4215
+ }
3688
4216
  }
3689
4217
 
3690
- export class DefaultService {
4218
+ export class AdminCacheService {
3691
4219
  /**
3692
- * @returns unknown
4220
+ * Flush entire cache (L1 + L2)
4221
+ * Clears ALL cache entries across ALL namespaces and users. Use only for emergency cache corruption recovery, maintenance-window refresh, or development resets.
4222
+ * @returns unknown Cache flushed successfully
3693
4223
  * @throws ApiError
3694
4224
  */
3695
4225
  public static cacheControllerFlushCache(): CancelablePromise<CacheControllerFlushCacheResponse> {
3696
4226
  return __request(OpenAPI, {
3697
4227
  method: 'POST',
3698
- url: '/api/v1/cache/flush'
4228
+ url: '/api/v1/cache/flush',
4229
+ errors: {
4230
+ 403: 'Admin access required'
4231
+ }
3699
4232
  });
3700
4233
  }
3701
4234
  }
@@ -3856,3 +4389,53 @@ export class InfoService {
3856
4389
  });
3857
4390
  }
3858
4391
  }
4392
+
4393
+ export class MarketDataService {
4394
+ /**
4395
+ * Search market symbols by name or code
4396
+ * Ranked search over the openbb catalog. Empty `q` returns [].
4397
+ * @param data The data for the request.
4398
+ * @param data.q Search term — matched against symbol and instrument name. Empty string returns [].
4399
+ * @param data.limit Maximum number of results (clamped 1..50)
4400
+ * @param data.exchange Filter by exchange code (e.g. US, HK, SS, SZ). A-share codes also match symbol notations and venue-code aliases (exchange=SS matches SH/SHH column values and bare 6-digit Shanghai symbols; SZ likewise)
4401
+ * @param data.assetType Filter by OpenBB asset_type (e.g. stock, etf)
4402
+ * @returns SymbolSearchResultDto Ranked search results
4403
+ * @throws ApiError
4404
+ */
4405
+ public static symbolControllerSearch(
4406
+ data: SymbolControllerSearchData
4407
+ ): CancelablePromise<SymbolControllerSearchResponse> {
4408
+ return __request(OpenAPI, {
4409
+ method: 'GET',
4410
+ url: '/api/v1/market/symbols/search',
4411
+ query: {
4412
+ q: data.q,
4413
+ limit: data.limit,
4414
+ exchange: data.exchange,
4415
+ assetType: data.assetType
4416
+ }
4417
+ });
4418
+ }
4419
+
4420
+ /**
4421
+ * Get a market symbol quote
4422
+ * @param data The data for the request.
4423
+ * @param data.symbol
4424
+ * @returns SymbolQuoteDto Symbol quote
4425
+ * @throws ApiError
4426
+ */
4427
+ public static symbolControllerGetQuote(
4428
+ data: SymbolControllerGetQuoteData
4429
+ ): CancelablePromise<SymbolControllerGetQuoteResponse> {
4430
+ return __request(OpenAPI, {
4431
+ method: 'GET',
4432
+ url: '/api/v1/market/symbols/{symbol}/quote',
4433
+ path: {
4434
+ symbol: data.symbol
4435
+ },
4436
+ errors: {
4437
+ 404: 'Symbol not found in the openbb catalog'
4438
+ }
4439
+ });
4440
+ }
4441
+ }