@firela/api-types 0.0.0-canary.8c68ebbe → 0.0.0-canary.8c88fc4

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