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

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,31 @@ 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,
199
+ EventControllerCreateData,
200
+ EventControllerCreateResponse,
201
+ EventControllerFindAllData,
202
+ EventControllerFindAllResponse,
203
+ EventControllerFindOneData,
204
+ EventControllerFindOneResponse,
205
+ EventControllerUpdateData,
206
+ EventControllerUpdateResponse,
207
+ EventControllerDeleteData,
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,
174
222
  ExportControllerExportBeancountResponse,
175
223
  FileImportControllerImportFileData,
176
224
  FileImportControllerImportFileResponse,
@@ -184,45 +232,64 @@ import type {
184
232
  ImporterConfigControllerUpdateConfigResponse,
185
233
  ImporterConfigControllerResetConfigData,
186
234
  ImporterConfigControllerResetConfigResponse,
187
- PlatformControllerFindAllResponse,
188
- PlatformControllerCreateData,
189
- PlatformControllerCreateResponse,
190
- PlatformControllerGetPlatformListResponse,
191
- PlatformControllerMatchPlatformsData,
192
- PlatformControllerMatchPlatformsResponse,
193
- PlatformControllerUpdateData,
194
- PlatformControllerUpdateResponse,
195
- PlatformControllerDeleteData,
196
- PlatformControllerDeleteResponse,
197
235
  ProviderSyncControllerSyncData,
198
236
  ProviderSyncControllerSyncResponse,
199
237
  ProviderSyncControllerGetSupportedProvidersData,
200
238
  ProviderSyncControllerGetSupportedProvidersResponse,
201
239
  ProviderSyncControllerIsProviderSupportedData,
202
240
  ProviderSyncControllerIsProviderSupportedResponse,
241
+ ExternalAccountLinkControllerCreateData,
242
+ ExternalAccountLinkControllerCreateResponse,
243
+ ExternalAccountLinkControllerFindAllData,
244
+ ExternalAccountLinkControllerFindAllResponse,
245
+ ExternalAccountLinkControllerFindOneData,
246
+ ExternalAccountLinkControllerFindOneResponse,
247
+ ExternalAccountLinkControllerRemoveData,
248
+ ExternalAccountLinkControllerRemoveResponse,
203
249
  TelemetryControllerReportTelemetryData,
204
250
  TelemetryControllerReportTelemetryResponse,
251
+ TelemetryControllerReportCoverageMissData,
252
+ TelemetryControllerReportCoverageMissResponse,
253
+ TelemetryControllerGetCoverageMetricsData,
254
+ TelemetryControllerGetCoverageMetricsResponse,
205
255
  NlpControllerProcessNaturalLanguageData,
206
256
  NlpControllerProcessNaturalLanguageResponse,
207
257
  NlpControllerClearSessionData,
208
258
  NlpControllerClearSessionResponse,
209
259
  NlpControllerGetSessionData,
210
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,
211
274
  DashboardControllerGetNetWorthData,
212
275
  DashboardControllerGetNetWorthResponse,
213
276
  DashboardControllerGetAccountsData,
214
277
  DashboardControllerGetAccountsResponse,
215
278
  DashboardControllerGetCashFlowData,
216
279
  DashboardControllerGetCashFlowResponse,
217
- ReportingControllerGetPortfolioTrendsData,
218
- ReportingControllerGetPortfolioTrendsResponse,
219
- ReportingControllerGenerateSnapshotData,
220
- ReportingControllerGenerateSnapshotResponse,
221
- ReportingControllerBackfillSnapshotsData,
222
- ReportingControllerBackfillSnapshotsResponse,
280
+ DashboardControllerGetExpensesData,
281
+ DashboardControllerGetExpensesResponse,
282
+ DashboardControllerGetAdvisorContextData,
283
+ DashboardControllerGetAdvisorContextResponse,
284
+ HoldingPnlControllerGetHoldingPnlData,
285
+ HoldingPnlControllerGetHoldingPnlResponse,
223
286
  ApiKeysControllerCreateApiKeyResponse,
224
287
  AuthControllerAccessTokenLoginData,
225
288
  AuthControllerAccessTokenLoginResponse,
289
+ AuthControllerAdvisorTokenLoginData,
290
+ AuthControllerAdvisorTokenLoginResponse,
291
+ ParserContributionControllerCreateData,
292
+ ParserContributionControllerCreateResponse,
226
293
  CacheControllerFlushCacheResponse,
227
294
  ExchangeRateControllerGetExchangeRateData,
228
295
  ExchangeRateControllerGetExchangeRateResponse,
@@ -234,7 +301,11 @@ import type {
234
301
  HealthControllerResetCircuitBreakerData,
235
302
  HealthControllerResetCircuitBreakerResponse,
236
303
  HealthControllerGetMetricsResponse,
237
- InfoControllerGetInfoResponse
304
+ InfoControllerGetInfoResponse,
305
+ SymbolControllerSearchData,
306
+ SymbolControllerSearchResponse,
307
+ SymbolControllerGetQuoteData,
308
+ SymbolControllerGetQuoteResponse
238
309
  } from './types.gen';
239
310
 
240
311
  export class BeanAccountsService {
@@ -272,7 +343,7 @@ export class BeanAccountsService {
272
343
  * @param data.type Filter by account type
273
344
  * @param data.status Filter by status
274
345
  * @param data.isCustom Filter by custom (user-created) accounts only
275
- * @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)
276
347
  * @param data.limit Maximum number of results
277
348
  * @param data.offset Number of results to skip
278
349
  * @returns AccountListResponseDto Accounts retrieved successfully
@@ -353,7 +424,7 @@ export class BeanAccountsService {
353
424
 
354
425
  /**
355
426
  * Delete account
356
- * Deletes an account (only if no transactions)
427
+ * Deletes an account (only if no active transactions; voided/superseded residual postings are cleaned up)
357
428
  * @param data The data for the request.
358
429
  * @param data.id Account UUID
359
430
  * @param data.region Region code for tenant context
@@ -372,7 +443,7 @@ export class BeanAccountsService {
372
443
  },
373
444
  errors: {
374
445
  404: 'Account not found',
375
- 409: 'Account has transactions and cannot be deleted'
446
+ 409: 'Account has active transactions and cannot be deleted'
376
447
  }
377
448
  });
378
449
  }
@@ -434,16 +505,45 @@ export class BeanAccountsService {
434
505
  }
435
506
  });
436
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
+ }
437
537
  }
438
538
 
439
539
  export class BeanAccountStandardsService {
440
540
  /**
441
541
  * Get account templates
442
- * 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).
443
543
  * @param data The data for the request.
444
- * @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)
445
545
  * @param data.type Filter by account type
446
- * @param data.search Search term for path or description
546
+ * @param data.search Search term for path, description, aliases, or localized display name
447
547
  * @returns AccountStandardListResponseDto Account templates retrieved successfully
448
548
  * @throws ApiError
449
549
  */
@@ -465,9 +565,9 @@ export class BeanAccountStandardsService {
465
565
 
466
566
  /**
467
567
  * Get template metadata for an account path
468
- * Returns extendable status and root type for a template path.
568
+ * Returns root type for a template path.
469
569
  * @param data The data for the request.
470
- * @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)
471
571
  * @param data.path Account path to check
472
572
  * @returns TemplateMetadataResponseDto Template metadata retrieved successfully
473
573
  * @throws ApiError
@@ -489,9 +589,9 @@ export class BeanAccountStandardsService {
489
589
 
490
590
  /**
491
591
  * Get available regions with hierarchy
492
- * 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)
493
593
  * @param data The data for the request.
494
- * @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)
495
595
  * @returns RegionsMetadataResponseDto Regions metadata retrieved successfully
496
596
  * @throws ApiError
497
597
  */
@@ -548,9 +648,11 @@ export class BeanTransactionsService {
548
648
  * @param data.offset Number of items to skip (default: 0)
549
649
  * @param data.dateFrom Filter by start date (inclusive), format: YYYY-MM-DD
550
650
  * @param data.dateTo Filter by end date (inclusive), format: YYYY-MM-DD
551
- * @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).
552
652
  * @param data.search Search in narration and payee fields (max 200 chars)
553
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.
554
656
  * @returns TransactionListResponseDto Transaction list
555
657
  * @throws ApiError
556
658
  */
@@ -570,7 +672,9 @@ export class BeanTransactionsService {
570
672
  dateTo: data.dateTo,
571
673
  status: data.status,
572
674
  search: data.search,
573
- accountId: data.accountId
675
+ accountId: data.accountId,
676
+ category: data.category,
677
+ flow: data.flow
574
678
  },
575
679
  errors: {
576
680
  400: 'Validation failed',
@@ -758,7 +862,7 @@ export class BeanBalancesService {
758
862
  * Query account balance
759
863
  * Calculate account balance at a specific date for a single currency
760
864
  * @param data The data for the request.
761
- * @param data.account Account name (e.g., "Assets:Bank:Checking")
865
+ * @param data.account Account name (e.g., "Assets:Checking")
762
866
  * @param data.region Region code for tenant context
763
867
  * @param data.date Date to calculate balance at (ISO 8601 format)
764
868
  * @param data.currency Currency to query (e.g., "USD", "CNY")
@@ -951,98 +1055,631 @@ export class BeanReviewsService {
951
1055
  }
952
1056
  }
953
1057
 
954
- export class BeanPayeesService {
1058
+ export class BeanTransactionRulesService {
955
1059
  /**
956
- * Create a new payee
957
- * 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.
958
1062
  * @param data The data for the request.
1063
+ * @param data.region Region code for tenant context
959
1064
  * @param data.requestBody
960
- * @returns PayeeResponseDto Payee created successfully
1065
+ * @returns TransactionRuleResponseDto Rule updated successfully (upsert mode)
961
1066
  * @throws ApiError
962
1067
  */
963
- public static payeeControllerCreate(
964
- data: PayeeControllerCreateData
965
- ): CancelablePromise<PayeeControllerCreateResponse> {
1068
+ public static transactionRuleControllerCreate(
1069
+ data: TransactionRuleControllerCreateData
1070
+ ): CancelablePromise<TransactionRuleControllerCreateResponse> {
966
1071
  return __request(OpenAPI, {
967
1072
  method: 'POST',
968
- url: '/api/v1/bean/payees',
1073
+ url: '/api/v1/{region}/bean/transaction-rules',
1074
+ path: {
1075
+ region: data.region
1076
+ },
969
1077
  body: data.requestBody,
970
1078
  mediaType: 'application/json',
971
1079
  errors: {
972
- 400: 'Invalid input data',
973
- 409: 'Payee already exists'
1080
+ 400: 'Validation failed',
1081
+ 401: 'Unauthorized',
1082
+ 409: 'Resource conflict - another process is updating this rule'
974
1083
  }
975
1084
  });
976
1085
  }
977
1086
 
978
1087
  /**
979
- * List user payees
980
- * Returns all payee mappings for the authenticated user with optional filtering
1088
+ * Get all transaction rules for user
981
1089
  * @param data The data for the request.
982
- * @param data.search Search term for payee name (partial match, case-insensitive). Useful for autocomplete.
983
- * @param data.payee Filter by exact payee name match
984
- * @param data.category Filter by custom category
985
- * @param data.tag Filter by custom tag (returns payees that have this tag)
986
- * @param data.isActive Filter by active status. Defaults to true (show only active payees).
987
- * @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
988
1097
  * @throws ApiError
989
1098
  */
990
- public static payeeControllerFindAll(
991
- data: PayeeControllerFindAllData = {}
992
- ): CancelablePromise<PayeeControllerFindAllResponse> {
1099
+ public static transactionRuleControllerList(
1100
+ data: TransactionRuleControllerListData
1101
+ ): CancelablePromise<TransactionRuleControllerListResponse> {
993
1102
  return __request(OpenAPI, {
994
1103
  method: 'GET',
995
- url: '/api/v1/bean/payees',
1104
+ url: '/api/v1/{region}/bean/transaction-rules',
1105
+ path: {
1106
+ region: data.region
1107
+ },
996
1108
  query: {
997
- search: data.search,
998
- payee: data.payee,
999
- category: data.category,
1000
- tag: data.tag,
1001
- 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'
1002
1117
  }
1003
1118
  });
1004
1119
  }
1005
1120
 
1006
1121
  /**
1007
- * Get payee autocomplete suggestions
1008
- * Returns active payee names matching the query, sorted by recent usage. Used for transaction input autocomplete.
1122
+ * Validate transaction rule configuration
1009
1123
  * @param data The data for the request.
1010
- * @param data.q Search query for payee name (partial match, case-insensitive)
1011
- * @param data.limit Maximum number of suggestions
1012
- * @returns PayeeAutocompleteResponseDto Autocomplete suggestions retrieved successfully
1124
+ * @param data.region Region code for tenant context
1125
+ * @param data.requestBody
1126
+ * @returns ValidateRuleResponseDto Validation result
1013
1127
  * @throws ApiError
1014
1128
  */
1015
- public static payeeControllerAutocomplete(
1016
- data: PayeeControllerAutocompleteData
1017
- ): CancelablePromise<PayeeControllerAutocompleteResponse> {
1129
+ public static transactionRuleControllerValidate(
1130
+ data: TransactionRuleControllerValidateData
1131
+ ): CancelablePromise<TransactionRuleControllerValidateResponse> {
1018
1132
  return __request(OpenAPI, {
1019
- method: 'GET',
1020
- url: '/api/v1/bean/payees/autocomplete',
1021
- query: {
1022
- q: data.q,
1023
- limit: data.limit
1133
+ method: 'POST',
1134
+ url: '/api/v1/{region}/bean/transaction-rules/validate',
1135
+ path: {
1136
+ region: data.region
1137
+ },
1138
+ body: data.requestBody,
1139
+ mediaType: 'application/json',
1140
+ errors: {
1141
+ 400: 'Validation failed',
1142
+ 401: 'Unauthorized'
1024
1143
  }
1025
1144
  });
1026
1145
  }
1027
1146
 
1028
1147
  /**
1029
- * Get top payees by usage
1030
- * Returns the most frequently used payees, sorted by use count. Used for statistics and analytics.
1148
+ * Bulk create transaction rules
1031
1149
  * @param data The data for the request.
1032
- * @param data.limit Maximum number of results
1033
- * @returns PayeeStatsResponseDto Top payees retrieved successfully
1150
+ * @param data.region Region code for tenant context
1151
+ * @param data.requestBody
1152
+ * @returns BulkCreateRulesResponseDto Bulk create completed
1034
1153
  * @throws ApiError
1035
1154
  */
1036
- public static payeeControllerGetTopPayees(
1037
- data: PayeeControllerGetTopPayeesData = {}
1038
- ): CancelablePromise<PayeeControllerGetTopPayeesResponse> {
1155
+ public static transactionRuleControllerBulkCreate(
1156
+ data: TransactionRuleControllerBulkCreateData
1157
+ ): CancelablePromise<TransactionRuleControllerBulkCreateResponse> {
1039
1158
  return __request(OpenAPI, {
1040
- method: 'GET',
1041
- url: '/api/v1/bean/payees/top',
1042
- query: {
1043
- limit: data.limit
1044
- }
1045
- });
1159
+ method: 'POST',
1160
+ url: '/api/v1/{region}/bean/transaction-rules/bulk',
1161
+ path: {
1162
+ region: data.region
1163
+ },
1164
+ body: data.requestBody,
1165
+ mediaType: 'application/json',
1166
+ errors: {
1167
+ 400: 'Invalid bulk create data',
1168
+ 401: 'Unauthorized'
1169
+ }
1170
+ });
1171
+ }
1172
+
1173
+ /**
1174
+ * Export transaction rules
1175
+ * @param data The data for the request.
1176
+ * @param data.format Export format (currently only JSON supported)
1177
+ * @param data.region Region code for tenant context
1178
+ * @returns ExportRulesResponseDto Exported rules
1179
+ * @throws ApiError
1180
+ */
1181
+ public static transactionRuleControllerExport(
1182
+ data: TransactionRuleControllerExportData
1183
+ ): CancelablePromise<TransactionRuleControllerExportResponse> {
1184
+ return __request(OpenAPI, {
1185
+ method: 'GET',
1186
+ url: '/api/v1/{region}/bean/transaction-rules/export/{format}',
1187
+ path: {
1188
+ format: data.format,
1189
+ region: data.region
1190
+ },
1191
+ errors: {
1192
+ 400: 'Unsupported format',
1193
+ 401: 'Unauthorized'
1194
+ }
1195
+ });
1196
+ }
1197
+
1198
+ /**
1199
+ * Get transaction rule statistics
1200
+ * @param data The data for the request.
1201
+ * @param data.period Statistics time period
1202
+ * @param data.region Region code for tenant context
1203
+ * @returns RuleStatisticsResponseDto Rule statistics
1204
+ * @throws ApiError
1205
+ */
1206
+ public static transactionRuleControllerGetStatistics(
1207
+ data: TransactionRuleControllerGetStatisticsData
1208
+ ): CancelablePromise<TransactionRuleControllerGetStatisticsResponse> {
1209
+ return __request(OpenAPI, {
1210
+ method: 'GET',
1211
+ url: '/api/v1/{region}/bean/transaction-rules/statistics/{period}',
1212
+ path: {
1213
+ period: data.period,
1214
+ region: data.region
1215
+ },
1216
+ errors: {
1217
+ 401: 'Unauthorized'
1218
+ }
1219
+ });
1220
+ }
1221
+
1222
+ /**
1223
+ * Get transaction rule detail
1224
+ * @param data The data for the request.
1225
+ * @param data.ruleId Rule ID
1226
+ * @param data.region Region code for tenant context
1227
+ * @returns TransactionRuleResponseDto Rule details
1228
+ * @throws ApiError
1229
+ */
1230
+ public static transactionRuleControllerGetDetail(
1231
+ data: TransactionRuleControllerGetDetailData
1232
+ ): CancelablePromise<TransactionRuleControllerGetDetailResponse> {
1233
+ return __request(OpenAPI, {
1234
+ method: 'GET',
1235
+ url: '/api/v1/{region}/bean/transaction-rules/{ruleId}',
1236
+ path: {
1237
+ ruleId: data.ruleId,
1238
+ region: data.region
1239
+ },
1240
+ errors: {
1241
+ 401: 'Unauthorized',
1242
+ 403: 'Forbidden - not owner of rule',
1243
+ 404: 'Rule not found'
1244
+ }
1245
+ });
1246
+ }
1247
+
1248
+ /**
1249
+ * Update a transaction rule
1250
+ * @param data The data for the request.
1251
+ * @param data.ruleId Rule ID to update
1252
+ * @param data.region Region code for tenant context
1253
+ * @param data.requestBody
1254
+ * @returns TransactionRuleResponseDto Rule updated successfully
1255
+ * @throws ApiError
1256
+ */
1257
+ public static transactionRuleControllerUpdate(
1258
+ data: TransactionRuleControllerUpdateData
1259
+ ): CancelablePromise<TransactionRuleControllerUpdateResponse> {
1260
+ return __request(OpenAPI, {
1261
+ method: 'PUT',
1262
+ url: '/api/v1/{region}/bean/transaction-rules/{ruleId}',
1263
+ path: {
1264
+ ruleId: data.ruleId,
1265
+ region: data.region
1266
+ },
1267
+ body: data.requestBody,
1268
+ mediaType: 'application/json',
1269
+ errors: {
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'
1275
+ }
1276
+ });
1277
+ }
1278
+
1279
+ /**
1280
+ * Delete a transaction rule
1281
+ * @param data The data for the request.
1282
+ * @param data.ruleId Rule ID to delete
1283
+ * @param data.region Region code for tenant context
1284
+ * @returns void Rule deleted successfully
1285
+ * @throws ApiError
1286
+ */
1287
+ public static transactionRuleControllerDelete(
1288
+ data: TransactionRuleControllerDeleteData
1289
+ ): CancelablePromise<TransactionRuleControllerDeleteResponse> {
1290
+ return __request(OpenAPI, {
1291
+ method: 'DELETE',
1292
+ url: '/api/v1/{region}/bean/transaction-rules/{ruleId}',
1293
+ path: {
1294
+ ruleId: data.ruleId,
1295
+ region: data.region
1296
+ },
1297
+ errors: {
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'
1302
+ }
1303
+ });
1304
+ }
1305
+
1306
+ /**
1307
+ * Test rule matching
1308
+ * @param data The data for the request.
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
1313
+ * @throws ApiError
1314
+ */
1315
+ public static transactionRuleControllerTest(
1316
+ data: TransactionRuleControllerTestData
1317
+ ): CancelablePromise<TransactionRuleControllerTestResponse> {
1318
+ return __request(OpenAPI, {
1319
+ method: 'POST',
1320
+ url: '/api/v1/{region}/bean/transaction-rules/{ruleId}/test',
1321
+ path: {
1322
+ ruleId: data.ruleId,
1323
+ region: data.region
1324
+ },
1325
+ body: data.requestBody,
1326
+ mediaType: 'application/json',
1327
+ errors: {
1328
+ 401: 'Unauthorized',
1329
+ 403: 'Forbidden - not owner of rule',
1330
+ 404: 'Rule not found'
1331
+ }
1332
+ });
1333
+ }
1334
+ }
1335
+
1336
+ export class UsersService {
1337
+ /**
1338
+ * Delete own user account
1339
+ * @param data The data for the request.
1340
+ * @param data.requestBody
1341
+ * @returns void User deleted successfully
1342
+ * @throws ApiError
1343
+ */
1344
+ public static userControllerDeleteOwnUser(
1345
+ data: UserControllerDeleteOwnUserData
1346
+ ): CancelablePromise<UserControllerDeleteOwnUserResponse> {
1347
+ return __request(OpenAPI, {
1348
+ method: 'DELETE',
1349
+ url: '/api/v1/users',
1350
+ body: data.requestBody,
1351
+ mediaType: 'application/json',
1352
+ errors: {
1353
+ 403: 'Invalid access token'
1354
+ }
1355
+ });
1356
+ }
1357
+
1358
+ /**
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).
1380
+ * @param data The data for the request.
1381
+ * @param data.requestBody
1382
+ * @returns SignupResponseDto User created successfully
1383
+ * @throws ApiError
1384
+ */
1385
+ public static userControllerSignupUser(
1386
+ data: UserControllerSignupUserData
1387
+ ): CancelablePromise<UserControllerSignupUserResponse> {
1388
+ return __request(OpenAPI, {
1389
+ method: 'POST',
1390
+ url: '/api/v1/users',
1391
+ body: data.requestBody,
1392
+ mediaType: 'application/json',
1393
+ errors: {
1394
+ 400: 'Invalid Turnstile token (when Turnstile is enabled)',
1395
+ 403: 'User signup is disabled'
1396
+ }
1397
+ });
1398
+ }
1399
+
1400
+ /**
1401
+ * Delete user by ID (admin only)
1402
+ * @param data The data for the request.
1403
+ * @param data.id User ID to delete
1404
+ * @returns void User deleted successfully
1405
+ * @throws ApiError
1406
+ */
1407
+ public static userControllerDeleteUser(
1408
+ data: UserControllerDeleteUserData
1409
+ ): CancelablePromise<UserControllerDeleteUserResponse> {
1410
+ return __request(OpenAPI, {
1411
+ method: 'DELETE',
1412
+ url: '/api/v1/users/{id}',
1413
+ path: {
1414
+ id: data.id
1415
+ },
1416
+ errors: {
1417
+ 403: 'Cannot delete own account or insufficient permissions'
1418
+ }
1419
+ });
1420
+ }
1421
+
1422
+ /**
1423
+ * Get user info by user ID
1424
+ * @param data The data for the request.
1425
+ * @param data.id User ID
1426
+ * @returns unknown User info retrieved successfully
1427
+ * @throws ApiError
1428
+ */
1429
+ public static userControllerGetUserInfo(
1430
+ data: UserControllerGetUserInfoData
1431
+ ): CancelablePromise<UserControllerGetUserInfoResponse> {
1432
+ return __request(OpenAPI, {
1433
+ method: 'GET',
1434
+ url: '/api/v1/users/{id}/info',
1435
+ path: {
1436
+ id: data.id
1437
+ },
1438
+ errors: {
1439
+ 403: 'Cannot access other user info without admin permission'
1440
+ }
1441
+ });
1442
+ }
1443
+
1444
+ /**
1445
+ * Update user settings
1446
+ * @param data The data for the request.
1447
+ * @param data.requestBody
1448
+ * @returns unknown Settings updated successfully
1449
+ * @throws ApiError
1450
+ */
1451
+ public static userControllerUpdateUserSetting(
1452
+ data: UserControllerUpdateUserSettingData
1453
+ ): CancelablePromise<UserControllerUpdateUserSettingResponse> {
1454
+ return __request(OpenAPI, {
1455
+ method: 'PUT',
1456
+ url: '/api/v1/users/setting',
1457
+ body: data.requestBody,
1458
+ mediaType: 'application/json',
1459
+ errors: {
1460
+ 403: 'Insufficient permissions'
1461
+ }
1462
+ });
1463
+ }
1464
+
1465
+ /**
1466
+ * Get all user settings paginated (admin only)
1467
+ * @param data The data for the request.
1468
+ * @param data.pageNo Page number
1469
+ * @param data.pageSize Page size
1470
+ * @returns unknown Settings list retrieved successfully
1471
+ * @throws ApiError
1472
+ */
1473
+ public static userControllerGetAllUserSettingsByPage(
1474
+ data: UserControllerGetAllUserSettingsByPageData
1475
+ ): CancelablePromise<UserControllerGetAllUserSettingsByPageResponse> {
1476
+ return __request(OpenAPI, {
1477
+ method: 'GET',
1478
+ url: '/api/v1/users/settings-by-page',
1479
+ query: {
1480
+ pageNo: data.pageNo,
1481
+ pageSize: data.pageSize
1482
+ }
1483
+ });
1484
+ }
1485
+
1486
+ /**
1487
+ * Get asset and liability summary for current user
1488
+ * @returns unknown Summary retrieved successfully
1489
+ * @throws ApiError
1490
+ */
1491
+ public static userControllerGetAssetLiabilitySummary(): CancelablePromise<UserControllerGetAssetLiabilitySummaryResponse> {
1492
+ return __request(OpenAPI, {
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'
1512
+ }
1513
+ });
1514
+ }
1515
+
1516
+ /**
1517
+ * Get property by key
1518
+ * @param data The data for the request.
1519
+ * @param data.key Property key
1520
+ * @returns unknown Property retrieved successfully
1521
+ * @throws ApiError
1522
+ */
1523
+ public static propertyControllerGetByKey(
1524
+ data: PropertyControllerGetByKeyData
1525
+ ): CancelablePromise<PropertyControllerGetByKeyResponse> {
1526
+ return __request(OpenAPI, {
1527
+ method: 'GET',
1528
+ url: '/api/v1/admin/properties/{key}',
1529
+ path: {
1530
+ key: data.key
1531
+ },
1532
+ errors: {
1533
+ 401: 'Unauthorized',
1534
+ 403: 'Forbidden - insufficient permissions',
1535
+ 404: 'Property not found'
1536
+ }
1537
+ });
1538
+ }
1539
+
1540
+ /**
1541
+ * Update a system property
1542
+ * @param data The data for the request.
1543
+ * @param data.key Property key
1544
+ * @param data.requestBody
1545
+ * @returns unknown Property updated successfully
1546
+ * @throws ApiError
1547
+ */
1548
+ public static propertyControllerUpdate(
1549
+ data: PropertyControllerUpdateData
1550
+ ): CancelablePromise<PropertyControllerUpdateResponse> {
1551
+ return __request(OpenAPI, {
1552
+ method: 'PUT',
1553
+ url: '/api/v1/admin/properties/{key}',
1554
+ path: {
1555
+ key: data.key
1556
+ },
1557
+ body: data.requestBody,
1558
+ mediaType: 'application/json',
1559
+ errors: {
1560
+ 401: 'Unauthorized',
1561
+ 403: 'Forbidden - insufficient permissions'
1562
+ }
1563
+ });
1564
+ }
1565
+
1566
+ /**
1567
+ * Delete a system property
1568
+ * @param data The data for the request.
1569
+ * @param data.key Property key
1570
+ * @returns void Property deleted successfully
1571
+ * @throws ApiError
1572
+ */
1573
+ public static propertyControllerDelete(
1574
+ data: PropertyControllerDeleteData
1575
+ ): CancelablePromise<PropertyControllerDeleteResponse> {
1576
+ return __request(OpenAPI, {
1577
+ method: 'DELETE',
1578
+ url: '/api/v1/admin/properties/{key}',
1579
+ path: {
1580
+ key: data.key
1581
+ },
1582
+ errors: {
1583
+ 401: 'Unauthorized',
1584
+ 403: 'Forbidden - insufficient permissions',
1585
+ 404: 'Property not found'
1586
+ }
1587
+ });
1588
+ }
1589
+ }
1590
+
1591
+ export class BeanPayeesService {
1592
+ /**
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.
1595
+ * @param data The data for the request.
1596
+ * @param data.requestBody
1597
+ * @returns PayeeResponseDto Payee created successfully
1598
+ * @throws ApiError
1599
+ */
1600
+ public static payeeControllerCreate(
1601
+ data: PayeeControllerCreateData
1602
+ ): CancelablePromise<PayeeControllerCreateResponse> {
1603
+ return __request(OpenAPI, {
1604
+ method: 'POST',
1605
+ url: '/api/v1/bean/payees',
1606
+ body: data.requestBody,
1607
+ mediaType: 'application/json',
1608
+ errors: {
1609
+ 400: 'Invalid input data',
1610
+ 409: 'Payee already exists'
1611
+ }
1612
+ });
1613
+ }
1614
+
1615
+ /**
1616
+ * List user payees
1617
+ * Returns all payee mappings for the authenticated user with optional filtering
1618
+ * @param data The data for the request.
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
1625
+ * @throws ApiError
1626
+ */
1627
+ public static payeeControllerFindAll(
1628
+ data: PayeeControllerFindAllData = {}
1629
+ ): CancelablePromise<PayeeControllerFindAllResponse> {
1630
+ return __request(OpenAPI, {
1631
+ method: 'GET',
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
1639
+ }
1640
+ });
1641
+ }
1642
+
1643
+ /**
1644
+ * Get payee autocomplete suggestions
1645
+ * Returns active payee names matching the query, sorted by recent usage. Used for transaction input autocomplete.
1646
+ * @param data The data for the request.
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
1650
+ * @throws ApiError
1651
+ */
1652
+ public static payeeControllerAutocomplete(
1653
+ data: PayeeControllerAutocompleteData
1654
+ ): CancelablePromise<PayeeControllerAutocompleteResponse> {
1655
+ return __request(OpenAPI, {
1656
+ method: 'GET',
1657
+ url: '/api/v1/bean/payees/autocomplete',
1658
+ query: {
1659
+ q: data.q,
1660
+ limit: data.limit
1661
+ }
1662
+ });
1663
+ }
1664
+
1665
+ /**
1666
+ * Get top payees by usage
1667
+ * Returns the most frequently used payees, sorted by use count. Used for statistics and analytics.
1668
+ * @param data The data for the request.
1669
+ * @param data.limit Maximum number of results
1670
+ * @returns PayeeStatsResponseDto Top payees retrieved successfully
1671
+ * @throws ApiError
1672
+ */
1673
+ public static payeeControllerGetTopPayees(
1674
+ data: PayeeControllerGetTopPayeesData = {}
1675
+ ): CancelablePromise<PayeeControllerGetTopPayeesResponse> {
1676
+ return __request(OpenAPI, {
1677
+ method: 'GET',
1678
+ url: '/api/v1/bean/payees/top',
1679
+ query: {
1680
+ limit: data.limit
1681
+ }
1682
+ });
1046
1683
  }
1047
1684
 
1048
1685
  /**
@@ -1283,7 +1920,7 @@ export class AdminPayeeProfilesService {
1283
1920
  * Removes verification status by setting verifiedAt to null.
1284
1921
  * @param data The data for the request.
1285
1922
  * @param data.id Payee profile ID (UUID)
1286
- * @returns PayeeProfileResponseDto Payee profile unverified successfully
1923
+ * @returns void Payee profile unverified successfully
1287
1924
  * @throws ApiError
1288
1925
  */
1289
1926
  public static payeeProfileAdminControllerUnverify(
@@ -1303,6 +1940,24 @@ export class AdminPayeeProfilesService {
1303
1940
  }
1304
1941
  }
1305
1942
 
1943
+ export class PayeeProfilesService {
1944
+ /**
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
+
1306
1961
  export class BeanCommoditiesService {
1307
1962
  /**
1308
1963
  * Create a new commodity
@@ -1438,1005 +2093,1132 @@ export class BeanCommoditiesService {
1438
2093
 
1439
2094
  /**
1440
2095
  * Ensure commodity exists
1441
- * Gets existing commodity or creates it with automatic initialization from OpenBB
1442
- * @param data The data for the request.
1443
- * @param data.symbol Commodity symbol
1444
- * @param data.region Region code for tenant context
1445
- * @returns CommodityResponseDto Commodity retrieved or created
1446
- * @throws ApiError
1447
- */
1448
- public static commodityControllerGetOrCreate(
1449
- data: CommodityControllerGetOrCreateData
1450
- ): CancelablePromise<CommodityControllerGetOrCreateResponse> {
1451
- return __request(OpenAPI, {
1452
- method: 'POST',
1453
- url: '/api/v1/{region}/bean/commodities/{symbol}/ensure',
1454
- path: {
1455
- symbol: data.symbol,
1456
- region: data.region
1457
- }
1458
- });
1459
- }
1460
-
1461
- /**
1462
- * Bulk create commodities
1463
- * Creates multiple commodities from a list of symbols, useful for initialization
1464
- * @param data The data for the request.
1465
- * @param data.region Region code for tenant context
1466
- * @returns CommodityResponseDto Commodities created successfully
1467
- * @throws ApiError
1468
- */
1469
- public static commodityControllerBulkCreate(
1470
- data: CommodityControllerBulkCreateData
1471
- ): CancelablePromise<CommodityControllerBulkCreateResponse> {
1472
- return __request(OpenAPI, {
1473
- method: 'POST',
1474
- url: '/api/v1/{region}/bean/commodities/bulk',
1475
- path: {
1476
- region: data.region
1477
- }
1478
- });
1479
- }
1480
- }
1481
-
1482
- export class RecurringRulesService {
1483
- /**
1484
- * Create a new recurring rule
1485
- * Creates a new recurring transaction rule for the authenticated user
2096
+ * Gets existing commodity or creates it with automatic initialization from OpenBB
1486
2097
  * @param data The data for the request.
2098
+ * @param data.symbol Commodity symbol
1487
2099
  * @param data.region Region code for tenant context
1488
- * @param data.requestBody
1489
- * @returns RecurringRuleResponseDto Rule created successfully
2100
+ * @returns CommodityResponseDto Commodity retrieved or created
1490
2101
  * @throws ApiError
1491
2102
  */
1492
- public static recurringRuleControllerCreate(
1493
- data: RecurringRuleControllerCreateData
1494
- ): CancelablePromise<RecurringRuleControllerCreateResponse> {
2103
+ public static commodityControllerGetOrCreate(
2104
+ data: CommodityControllerGetOrCreateData
2105
+ ): CancelablePromise<CommodityControllerGetOrCreateResponse> {
1495
2106
  return __request(OpenAPI, {
1496
2107
  method: 'POST',
1497
- url: '/api/v1/{region}/bean/recurring-rules',
2108
+ url: '/api/v1/{region}/bean/commodities/{symbol}/ensure',
1498
2109
  path: {
2110
+ symbol: data.symbol,
1499
2111
  region: data.region
1500
- },
1501
- body: data.requestBody,
1502
- mediaType: 'application/json',
1503
- errors: {
1504
- 400: 'Invalid input data (e.g., autoCreate without accounts)',
1505
- 409: 'Rule with same name already exists'
1506
2112
  }
1507
2113
  });
1508
2114
  }
1509
2115
 
1510
2116
  /**
1511
- * List recurring rules
1512
- * Returns all recurring rules for the authenticated user with optional filtering
2117
+ * Bulk create commodities
2118
+ * Creates multiple commodities from a list of symbols, useful for initialization
1513
2119
  * @param data The data for the request.
1514
2120
  * @param data.region Region code for tenant context
1515
- * @param data.isActive Filter by active status
1516
- * @param data.frequency Filter by frequency (WEEKLY, MONTHLY, etc.)
1517
- * @param data.hasAutoCreate Filter by autoCreate enabled
1518
- * @returns RecurringRuleResponseDto Rules retrieved successfully
2121
+ * @returns CommodityResponseDto Commodities created successfully
1519
2122
  * @throws ApiError
1520
2123
  */
1521
- public static recurringRuleControllerFindAll(
1522
- data: RecurringRuleControllerFindAllData
1523
- ): CancelablePromise<RecurringRuleControllerFindAllResponse> {
2124
+ public static commodityControllerBulkCreate(
2125
+ data: CommodityControllerBulkCreateData
2126
+ ): CancelablePromise<CommodityControllerBulkCreateResponse> {
1524
2127
  return __request(OpenAPI, {
1525
- method: 'GET',
1526
- url: '/api/v1/{region}/bean/recurring-rules',
2128
+ method: 'POST',
2129
+ url: '/api/v1/{region}/bean/commodities/bulk',
1527
2130
  path: {
1528
2131
  region: data.region
1529
- },
1530
- query: {
1531
- isActive: data.isActive,
1532
- frequency: data.frequency,
1533
- hasAutoCreate: data.hasAutoCreate
1534
2132
  }
1535
2133
  });
1536
2134
  }
2135
+ }
1537
2136
 
2137
+ export class ReportingService {
1538
2138
  /**
1539
- * Create recurring rule from transaction
1540
- * Auto-creates a recurring rule using transaction data. User only confirms frequency.
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
+ *
1541
2152
  * @param data The data for the request.
1542
- * @param data.transactionId Source transaction ID
1543
2153
  * @param data.region Region code for tenant context
1544
- * @param data.requestBody
1545
- * @returns RecurringRuleResponseDto Rule created successfully
2154
+ * @param data.period Time period
2155
+ * @param data.granularity Data granularity
2156
+ * @returns PortfolioTrendsResponseDto Trends retrieved successfully
1546
2157
  * @throws ApiError
1547
2158
  */
1548
- public static recurringRuleControllerCreateFromTransaction(
1549
- data: RecurringRuleControllerCreateFromTransactionData
1550
- ): CancelablePromise<RecurringRuleControllerCreateFromTransactionResponse> {
2159
+ public static reportingControllerGetPortfolioTrends(
2160
+ data: ReportingControllerGetPortfolioTrendsData
2161
+ ): CancelablePromise<ReportingControllerGetPortfolioTrendsResponse> {
1551
2162
  return __request(OpenAPI, {
1552
- method: 'POST',
1553
- url: '/api/v1/{region}/bean/recurring-rules/from-transaction/{transactionId}',
2163
+ method: 'GET',
2164
+ url: '/api/v1/{region}/reporting/portfolio/trends',
1554
2165
  path: {
1555
- transactionId: data.transactionId,
1556
2166
  region: data.region
1557
2167
  },
1558
- body: data.requestBody,
1559
- mediaType: 'application/json',
2168
+ query: {
2169
+ period: data.period,
2170
+ granularity: data.granularity
2171
+ },
1560
2172
  errors: {
1561
- 404: 'Transaction not found',
1562
- 409: 'Rule with same name already exists or transaction already linked'
2173
+ 401: 'User not authenticated'
1563
2174
  }
1564
2175
  });
1565
2176
  }
1566
2177
 
1567
2178
  /**
1568
- * Get recurring rule by ID
1569
- * Returns a specific recurring rule with its details
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
+ *
1570
2188
  * @param data The data for the request.
1571
- * @param data.id Rule ID
1572
2189
  * @param data.region Region code for tenant context
1573
- * @returns RecurringRuleResponseDto Rule retrieved 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
1574
2193
  * @throws ApiError
1575
2194
  */
1576
- public static recurringRuleControllerFindOne(
1577
- data: RecurringRuleControllerFindOneData
1578
- ): CancelablePromise<RecurringRuleControllerFindOneResponse> {
2195
+ public static reportingControllerGetCashFlowTrends(
2196
+ data: ReportingControllerGetCashFlowTrendsData
2197
+ ): CancelablePromise<ReportingControllerGetCashFlowTrendsResponse> {
1579
2198
  return __request(OpenAPI, {
1580
2199
  method: 'GET',
1581
- url: '/api/v1/{region}/bean/recurring-rules/{id}',
2200
+ url: '/api/v1/{region}/reporting/cash-flow/trends',
1582
2201
  path: {
1583
- id: data.id,
1584
2202
  region: data.region
1585
2203
  },
2204
+ query: {
2205
+ period: data.period,
2206
+ granularity: data.granularity
2207
+ },
1586
2208
  errors: {
1587
- 404: 'Rule not found'
2209
+ 401: 'User not authenticated'
1588
2210
  }
1589
2211
  });
1590
2212
  }
1591
2213
 
1592
2214
  /**
1593
- * Update recurring rule
1594
- * Updates an existing recurring rule
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
+ *
1595
2229
  * @param data The data for the request.
1596
- * @param data.id Rule ID
1597
2230
  * @param data.region Region code for tenant context
1598
- * @param data.requestBody
1599
- * @returns RecurringRuleResponseDto Rule updated successfully
2231
+ * @param data.requestBody Optional date (defaults to today)
2232
+ * @returns GenerateSnapshotResponse Snapshot generated successfully
1600
2233
  * @throws ApiError
1601
2234
  */
1602
- public static recurringRuleControllerUpdate(
1603
- data: RecurringRuleControllerUpdateData
1604
- ): CancelablePromise<RecurringRuleControllerUpdateResponse> {
2235
+ public static reportingControllerGenerateSnapshot(
2236
+ data: ReportingControllerGenerateSnapshotData
2237
+ ): CancelablePromise<ReportingControllerGenerateSnapshotResponse> {
1605
2238
  return __request(OpenAPI, {
1606
- method: 'PATCH',
1607
- url: '/api/v1/{region}/bean/recurring-rules/{id}',
2239
+ method: 'POST',
2240
+ url: '/api/v1/{region}/reporting/snapshots/generate',
1608
2241
  path: {
1609
- id: data.id,
1610
2242
  region: data.region
1611
2243
  },
1612
2244
  body: data.requestBody,
1613
2245
  mediaType: 'application/json',
1614
2246
  errors: {
1615
- 400: 'Invalid input data',
1616
- 404: 'Rule not found'
2247
+ 400: 'Invalid date format',
2248
+ 401: 'User not authenticated'
1617
2249
  }
1618
2250
  });
1619
2251
  }
1620
2252
 
1621
2253
  /**
1622
- * Delete recurring rule
1623
- * Soft deletes a recurring rule (sets isActive to false)
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
+ *
1624
2268
  * @param data The data for the request.
1625
- * @param data.id Rule ID
1626
2269
  * @param data.region Region code for tenant context
1627
- * @returns void Rule deleted successfully
2270
+ * @param data.requestBody
2271
+ * @returns BackfillSnapshotsResponse Backfill completed successfully
1628
2272
  * @throws ApiError
1629
2273
  */
1630
- public static recurringRuleControllerDelete(
1631
- data: RecurringRuleControllerDeleteData
1632
- ): CancelablePromise<RecurringRuleControllerDeleteResponse> {
2274
+ public static reportingControllerBackfillSnapshots(
2275
+ data: ReportingControllerBackfillSnapshotsData
2276
+ ): CancelablePromise<ReportingControllerBackfillSnapshotsResponse> {
1633
2277
  return __request(OpenAPI, {
1634
- method: 'DELETE',
1635
- url: '/api/v1/{region}/bean/recurring-rules/{id}',
2278
+ method: 'POST',
2279
+ url: '/api/v1/{region}/reporting/snapshots/backfill',
1636
2280
  path: {
1637
- id: data.id,
1638
2281
  region: data.region
1639
2282
  },
2283
+ body: data.requestBody,
2284
+ mediaType: 'application/json',
1640
2285
  errors: {
1641
- 404: 'Rule not found'
2286
+ 400: 'Invalid date format or range',
2287
+ 401: 'User not authenticated',
2288
+ 409: 'Backfill already in progress for this user'
1642
2289
  }
1643
2290
  });
1644
2291
  }
2292
+ }
1645
2293
 
2294
+ export class BeanPricesService {
1646
2295
  /**
1647
- * Get rule with statistics
1648
- * Returns a rule with pending/overdue counts and next expected date
2296
+ * Create a new price
2297
+ * Creates a new price entry for the authenticated user
1649
2298
  * @param data The data for the request.
1650
- * @param data.id Rule ID
1651
2299
  * @param data.region Region code for tenant context
1652
- * @returns RecurringRuleWithStatsResponseDto Rule with stats retrieved successfully
2300
+ * @param data.requestBody
2301
+ * @returns PriceResponseDto Price created successfully
1653
2302
  * @throws ApiError
1654
2303
  */
1655
- public static recurringRuleControllerGetWithStats(
1656
- data: RecurringRuleControllerGetWithStatsData
1657
- ): CancelablePromise<RecurringRuleControllerGetWithStatsResponse> {
2304
+ public static priceControllerCreate(
2305
+ data: PriceControllerCreateData
2306
+ ): CancelablePromise<PriceControllerCreateResponse> {
1658
2307
  return __request(OpenAPI, {
1659
- method: 'GET',
1660
- url: '/api/v1/{region}/bean/recurring-rules/{id}/stats',
2308
+ method: 'POST',
2309
+ url: '/api/v1/{region}/bean/prices',
1661
2310
  path: {
1662
- id: data.id,
1663
2311
  region: data.region
1664
2312
  },
2313
+ body: data.requestBody,
2314
+ mediaType: 'application/json',
1665
2315
  errors: {
1666
- 404: 'Rule not found'
2316
+ 404: 'Currency or quoteCurrency commodity not found',
2317
+ 409: 'Price already exists for this currency pair and date'
1667
2318
  }
1668
2319
  });
1669
2320
  }
1670
- }
1671
2321
 
1672
- export class ExpectedTransactionsService {
1673
2322
  /**
1674
- * List expected transactions
1675
- * Returns expected transactions for the authenticated user with optional filtering
2323
+ * List user prices
2324
+ * Returns all price entries for the authenticated user with optional filtering
1676
2325
  * @param data The data for the request.
1677
2326
  * @param data.region Region code for tenant context
1678
- * @param data.ruleId Filter by recurring rule ID
1679
- * @param data.status Filter by status (PENDING, COMPLETED, SKIPPED)
1680
- * @param data.fromDate Filter by date range start (YYYY-MM-DD)
1681
- * @param data.toDate Filter by date range end (YYYY-MM-DD)
1682
- * @returns ExpectedTransactionListResponseDto Expected transactions retrieved successfully
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
1683
2335
  * @throws ApiError
1684
2336
  */
1685
- public static expectedTransactionControllerFindAll(
1686
- data: ExpectedTransactionControllerFindAllData
1687
- ): CancelablePromise<ExpectedTransactionControllerFindAllResponse> {
2337
+ public static priceControllerFindAll(
2338
+ data: PriceControllerFindAllData
2339
+ ): CancelablePromise<PriceControllerFindAllResponse> {
1688
2340
  return __request(OpenAPI, {
1689
2341
  method: 'GET',
1690
- url: '/api/v1/{region}/bean/expected-transactions',
2342
+ url: '/api/v1/{region}/bean/prices',
1691
2343
  path: {
1692
2344
  region: data.region
1693
2345
  },
1694
2346
  query: {
1695
- ruleId: data.ruleId,
1696
- status: data.status,
1697
- fromDate: data.fromDate,
1698
- toDate: data.toDate
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
1699
2354
  }
1700
2355
  });
1701
2356
  }
1702
2357
 
1703
2358
  /**
1704
- * List overdue expected transactions
1705
- * Returns all overdue expected transactions (PENDING past tolerance)
2359
+ * Get price by ID
2360
+ * Returns a single price entry by its ID
1706
2361
  * @param data The data for the request.
2362
+ * @param data.id Price ID
1707
2363
  * @param data.region Region code for tenant context
1708
- * @returns ExpectedTransactionListResponseDto Overdue transactions retrieved successfully
2364
+ * @returns PriceResponseDto Price retrieved successfully
1709
2365
  * @throws ApiError
1710
2366
  */
1711
- public static expectedTransactionControllerFindOverdue(
1712
- data: ExpectedTransactionControllerFindOverdueData
1713
- ): CancelablePromise<ExpectedTransactionControllerFindOverdueResponse> {
2367
+ public static priceControllerFindOne(
2368
+ data: PriceControllerFindOneData
2369
+ ): CancelablePromise<PriceControllerFindOneResponse> {
1714
2370
  return __request(OpenAPI, {
1715
2371
  method: 'GET',
1716
- url: '/api/v1/{region}/bean/expected-transactions/overdue',
2372
+ url: '/api/v1/{region}/bean/prices/{id}',
1717
2373
  path: {
2374
+ id: data.id,
1718
2375
  region: data.region
2376
+ },
2377
+ errors: {
2378
+ 404: 'Price not found'
1719
2379
  }
1720
2380
  });
1721
2381
  }
1722
2382
 
1723
2383
  /**
1724
- * Get expected transaction by ID
1725
- * Returns a specific expected transaction with rule details
2384
+ * Update a price
2385
+ * Updates an existing price entry
1726
2386
  * @param data The data for the request.
1727
- * @param data.id Expected transaction ID
2387
+ * @param data.id Price ID
1728
2388
  * @param data.region Region code for tenant context
1729
- * @returns ExpectedTransactionResponseDto Expected transaction retrieved successfully
2389
+ * @param data.requestBody
2390
+ * @returns PriceResponseDto Price updated successfully
1730
2391
  * @throws ApiError
1731
2392
  */
1732
- public static expectedTransactionControllerFindOne(
1733
- data: ExpectedTransactionControllerFindOneData
1734
- ): CancelablePromise<ExpectedTransactionControllerFindOneResponse> {
2393
+ public static priceControllerUpdate(
2394
+ data: PriceControllerUpdateData
2395
+ ): CancelablePromise<PriceControllerUpdateResponse> {
1735
2396
  return __request(OpenAPI, {
1736
- method: 'GET',
1737
- url: '/api/v1/{region}/bean/expected-transactions/{id}',
2397
+ method: 'PUT',
2398
+ url: '/api/v1/{region}/bean/prices/{id}',
1738
2399
  path: {
1739
2400
  id: data.id,
1740
2401
  region: data.region
1741
2402
  },
2403
+ body: data.requestBody,
2404
+ mediaType: 'application/json',
1742
2405
  errors: {
1743
- 404: 'Expected transaction not found'
2406
+ 404: 'Price not found',
2407
+ 409: 'Updated price conflicts with existing price'
1744
2408
  }
1745
2409
  });
1746
2410
  }
1747
2411
 
1748
2412
  /**
1749
- * Skip expected transaction
1750
- * Marks an expected transaction as skipped (PENDING -> SKIPPED)
2413
+ * Delete a price
2414
+ * Deletes a price entry (hard delete)
1751
2415
  * @param data The data for the request.
1752
- * @param data.id Expected transaction ID
2416
+ * @param data.id Price ID
1753
2417
  * @param data.region Region code for tenant context
1754
- * @returns ExpectedTransactionResponseDto Expected transaction skipped successfully
2418
+ * @returns void Price deleted successfully
1755
2419
  * @throws ApiError
1756
2420
  */
1757
- public static expectedTransactionControllerSkip(
1758
- data: ExpectedTransactionControllerSkipData
1759
- ): CancelablePromise<ExpectedTransactionControllerSkipResponse> {
2421
+ public static priceControllerDelete(
2422
+ data: PriceControllerDeleteData
2423
+ ): CancelablePromise<PriceControllerDeleteResponse> {
1760
2424
  return __request(OpenAPI, {
1761
- method: 'POST',
1762
- url: '/api/v1/{region}/bean/expected-transactions/{id}/skip',
2425
+ method: 'DELETE',
2426
+ url: '/api/v1/{region}/bean/prices/{id}',
1763
2427
  path: {
1764
2428
  id: data.id,
1765
2429
  region: data.region
1766
2430
  },
1767
2431
  errors: {
1768
- 400: 'Cannot skip - not in PENDING status',
1769
- 404: 'Expected transaction not found'
2432
+ 404: 'Price not found'
1770
2433
  }
1771
2434
  });
1772
2435
  }
1773
2436
 
1774
2437
  /**
1775
- * Undo skip
1776
- * Reverses a skip operation (SKIPPED -> PENDING)
2438
+ * Bulk create prices
2439
+ * Creates multiple price entries at once (skips duplicates)
1777
2440
  * @param data The data for the request.
1778
- * @param data.id Expected transaction ID
1779
2441
  * @param data.region Region code for tenant context
1780
- * @returns ExpectedTransactionResponseDto Skip undone successfully
2442
+ * @param data.requestBody
2443
+ * @returns PriceResponseDto Prices created successfully
1781
2444
  * @throws ApiError
1782
2445
  */
1783
- public static expectedTransactionControllerUndoSkip(
1784
- data: ExpectedTransactionControllerUndoSkipData
1785
- ): CancelablePromise<ExpectedTransactionControllerUndoSkipResponse> {
2446
+ public static priceControllerBulkCreate(
2447
+ data: PriceControllerBulkCreateData
2448
+ ): CancelablePromise<PriceControllerBulkCreateResponse> {
1786
2449
  return __request(OpenAPI, {
1787
- method: 'DELETE',
1788
- url: '/api/v1/{region}/bean/expected-transactions/{id}/skip',
2450
+ method: 'POST',
2451
+ url: '/api/v1/{region}/bean/prices/bulk',
1789
2452
  path: {
1790
- id: data.id,
1791
2453
  region: data.region
1792
2454
  },
1793
- errors: {
1794
- 400: 'Cannot undo - not in SKIPPED status',
1795
- 404: 'Expected transaction not found'
1796
- }
2455
+ body: data.requestBody,
2456
+ mediaType: 'application/json'
1797
2457
  });
1798
2458
  }
2459
+ }
1799
2460
 
2461
+ export class RecurringRulesService {
1800
2462
  /**
1801
- * Confirm transaction match
1802
- * Manually matches an expected transaction with an actual transaction
2463
+ * Create a new recurring rule
2464
+ * Creates a new recurring transaction rule for the authenticated user
1803
2465
  * @param data The data for the request.
1804
- * @param data.id Expected transaction ID
1805
2466
  * @param data.region Region code for tenant context
1806
2467
  * @param data.requestBody
1807
- * @returns unknown Match confirmed successfully
2468
+ * @returns RecurringRuleResponseDto Rule created successfully
1808
2469
  * @throws ApiError
1809
2470
  */
1810
- public static expectedTransactionControllerConfirmMatch(
1811
- data: ExpectedTransactionControllerConfirmMatchData
1812
- ): CancelablePromise<ExpectedTransactionControllerConfirmMatchResponse> {
2471
+ public static recurringRuleControllerCreate(
2472
+ data: RecurringRuleControllerCreateData
2473
+ ): CancelablePromise<RecurringRuleControllerCreateResponse> {
1813
2474
  return __request(OpenAPI, {
1814
2475
  method: 'POST',
1815
- url: '/api/v1/{region}/bean/expected-transactions/{id}/match',
2476
+ url: '/api/v1/{region}/bean/recurring-rules',
1816
2477
  path: {
1817
- id: data.id,
1818
2478
  region: data.region
1819
2479
  },
1820
2480
  body: data.requestBody,
1821
2481
  mediaType: 'application/json',
1822
2482
  errors: {
1823
- 400: 'Cannot match - not in PENDING status',
1824
- 404: 'Expected or actual transaction not found',
1825
- 409: 'Actual transaction already matched to another rule'
2483
+ 400: 'Invalid input data (e.g., autoCreate without accounts)',
2484
+ 409: 'Rule with same name already exists'
1826
2485
  }
1827
2486
  });
1828
2487
  }
1829
2488
 
1830
2489
  /**
1831
- * Unmatch transaction
1832
- * Removes the match between expected and actual transaction (COMPLETED -> PENDING)
2490
+ * List recurring rules
2491
+ * Returns all recurring rules for the authenticated user with optional filtering
1833
2492
  * @param data The data for the request.
1834
- * @param data.id Expected transaction ID
1835
2493
  * @param data.region Region code for tenant context
1836
- * @returns unknown Match removed successfully
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
1837
2498
  * @throws ApiError
1838
2499
  */
1839
- public static expectedTransactionControllerUnmatch(
1840
- data: ExpectedTransactionControllerUnmatchData
1841
- ): CancelablePromise<ExpectedTransactionControllerUnmatchResponse> {
2500
+ public static recurringRuleControllerFindAll(
2501
+ data: RecurringRuleControllerFindAllData
2502
+ ): CancelablePromise<RecurringRuleControllerFindAllResponse> {
1842
2503
  return __request(OpenAPI, {
1843
- method: 'DELETE',
1844
- url: '/api/v1/{region}/bean/expected-transactions/{id}/match',
2504
+ method: 'GET',
2505
+ url: '/api/v1/{region}/bean/recurring-rules',
1845
2506
  path: {
1846
- id: data.id,
1847
2507
  region: data.region
1848
2508
  },
1849
- errors: {
1850
- 400: 'Cannot unmatch - not in COMPLETED status',
1851
- 404: 'Expected transaction not found'
2509
+ query: {
2510
+ isActive: data.isActive,
2511
+ frequency: data.frequency,
2512
+ hasAutoCreate: data.hasAutoCreate
1852
2513
  }
1853
2514
  });
1854
2515
  }
1855
2516
 
1856
2517
  /**
1857
- * Enter Now
1858
- * Creates an actual transaction for an expected transaction (YNAB-style Enter Now)
2518
+ * Create recurring rule from transaction
2519
+ * Auto-creates a recurring rule using transaction data. User only confirms frequency.
1859
2520
  * @param data The data for the request.
1860
- * @param data.id Expected transaction ID
2521
+ * @param data.transactionId Source transaction ID
1861
2522
  * @param data.region Region code for tenant context
1862
2523
  * @param data.requestBody
1863
- * @returns unknown Transaction created successfully
2524
+ * @returns RecurringRuleResponseDto Rule created successfully
1864
2525
  * @throws ApiError
1865
2526
  */
1866
- public static expectedTransactionControllerEnterNow(
1867
- data: ExpectedTransactionControllerEnterNowData
1868
- ): CancelablePromise<ExpectedTransactionControllerEnterNowResponse> {
2527
+ public static recurringRuleControllerCreateFromTransaction(
2528
+ data: RecurringRuleControllerCreateFromTransactionData
2529
+ ): CancelablePromise<RecurringRuleControllerCreateFromTransactionResponse> {
1869
2530
  return __request(OpenAPI, {
1870
2531
  method: 'POST',
1871
- url: '/api/v1/{region}/bean/expected-transactions/{id}/enter',
2532
+ url: '/api/v1/{region}/bean/recurring-rules/from-transaction/{transactionId}',
1872
2533
  path: {
1873
- id: data.id,
2534
+ transactionId: data.transactionId,
1874
2535
  region: data.region
1875
2536
  },
1876
2537
  body: data.requestBody,
1877
2538
  mediaType: 'application/json',
1878
2539
  errors: {
1879
- 400: 'Cannot enter - not in PENDING status or missing accounts',
1880
- 404: 'Expected transaction or accounts not found'
2540
+ 404: 'Transaction not found',
2541
+ 409: 'Rule with same name already exists or transaction already linked'
1881
2542
  }
1882
2543
  });
1883
2544
  }
1884
- }
1885
2545
 
1886
- export class RecurringForecastService {
1887
2546
  /**
1888
- * Get cash flow forecast
1889
- * Returns predicted outflows for the next N months based on active recurring rules
2547
+ * Get recurring rule by ID
2548
+ * Returns a specific recurring rule with its details
1890
2549
  * @param data The data for the request.
2550
+ * @param data.id Rule ID
1891
2551
  * @param data.region Region code for tenant context
1892
- * @param data.months Number of months to forecast (1-12, default 3)
1893
- * @returns ForecastResponseDto Forecast retrieved successfully
2552
+ * @returns RecurringRuleResponseDto Rule retrieved successfully
1894
2553
  * @throws ApiError
1895
2554
  */
1896
- public static forecastControllerGetForecast(
1897
- data: ForecastControllerGetForecastData
1898
- ): CancelablePromise<ForecastControllerGetForecastResponse> {
2555
+ public static recurringRuleControllerFindOne(
2556
+ data: RecurringRuleControllerFindOneData
2557
+ ): CancelablePromise<RecurringRuleControllerFindOneResponse> {
1899
2558
  return __request(OpenAPI, {
1900
2559
  method: 'GET',
1901
- url: '/api/v1/{region}/bean/recurring/forecast',
2560
+ url: '/api/v1/{region}/bean/recurring-rules/{id}',
1902
2561
  path: {
2562
+ id: data.id,
1903
2563
  region: data.region
1904
2564
  },
1905
- query: {
1906
- months: data.months
2565
+ errors: {
2566
+ 404: 'Rule not found'
1907
2567
  }
1908
2568
  });
1909
2569
  }
1910
- }
1911
2570
 
1912
- export class BeanTransactionRulesService {
1913
2571
  /**
1914
- * Create a new transaction rule (or upsert if upsertByPayee=true)
1915
- * Creates a new rule. If upsertByPayee=true, updates existing rule matching payeeKeywords[0] instead of creating duplicate.
2572
+ * Update recurring rule
2573
+ * Updates an existing recurring rule
1916
2574
  * @param data The data for the request.
2575
+ * @param data.id Rule ID
1917
2576
  * @param data.region Region code for tenant context
1918
2577
  * @param data.requestBody
1919
- * @returns TransactionRuleResponseDto Rule updated successfully (upsert mode)
2578
+ * @returns RecurringRuleResponseDto Rule updated successfully
1920
2579
  * @throws ApiError
1921
2580
  */
1922
- public static transactionRuleControllerCreate(
1923
- data: TransactionRuleControllerCreateData
1924
- ): CancelablePromise<TransactionRuleControllerCreateResponse> {
2581
+ public static recurringRuleControllerUpdate(
2582
+ data: RecurringRuleControllerUpdateData
2583
+ ): CancelablePromise<RecurringRuleControllerUpdateResponse> {
1925
2584
  return __request(OpenAPI, {
1926
- method: 'POST',
1927
- url: '/api/v1/{region}/bean/transaction-rules',
2585
+ method: 'PATCH',
2586
+ url: '/api/v1/{region}/bean/recurring-rules/{id}',
1928
2587
  path: {
2588
+ id: data.id,
1929
2589
  region: data.region
1930
2590
  },
1931
2591
  body: data.requestBody,
1932
2592
  mediaType: 'application/json',
1933
2593
  errors: {
1934
- 400: 'Validation failed',
1935
- 401: 'Unauthorized',
1936
- 409: 'Resource conflict - another process is updating this rule'
2594
+ 400: 'Invalid input data',
2595
+ 404: 'Rule not found'
1937
2596
  }
1938
2597
  });
1939
2598
  }
1940
2599
 
1941
2600
  /**
1942
- * Get all transaction rules for user
2601
+ * Delete recurring rule
2602
+ * Soft deletes a recurring rule (sets isActive to false)
1943
2603
  * @param data The data for the request.
2604
+ * @param data.id Rule ID
1944
2605
  * @param data.region Region code for tenant context
1945
- * @param data.limit Max results per page (default: 20, max: 100)
1946
- * @param data.offset Pagination offset (default: 0)
1947
- * @param data.enabled Filter by enabled status
1948
- * @param data.learningSource Filter by learning source. Omit this parameter or pass empty string to get manually created rules (learningSource is null in database).
1949
- * @param data.autoApplyEnabled Filter by auto-apply status
1950
- * @returns TransactionRuleListResponseDto List of rules
2606
+ * @returns void Rule deleted successfully
1951
2607
  * @throws ApiError
1952
2608
  */
1953
- public static transactionRuleControllerList(
1954
- data: TransactionRuleControllerListData
1955
- ): CancelablePromise<TransactionRuleControllerListResponse> {
2609
+ public static recurringRuleControllerDelete(
2610
+ data: RecurringRuleControllerDeleteData
2611
+ ): CancelablePromise<RecurringRuleControllerDeleteResponse> {
1956
2612
  return __request(OpenAPI, {
1957
- method: 'GET',
1958
- url: '/api/v1/{region}/bean/transaction-rules',
2613
+ method: 'DELETE',
2614
+ url: '/api/v1/{region}/bean/recurring-rules/{id}',
1959
2615
  path: {
2616
+ id: data.id,
1960
2617
  region: data.region
1961
2618
  },
1962
- query: {
1963
- limit: data.limit,
1964
- offset: data.offset,
1965
- enabled: data.enabled,
1966
- learningSource: data.learningSource,
1967
- autoApplyEnabled: data.autoApplyEnabled
1968
- },
1969
2619
  errors: {
1970
- 401: 'Unauthorized'
2620
+ 404: 'Rule not found'
1971
2621
  }
1972
2622
  });
1973
2623
  }
1974
2624
 
1975
2625
  /**
1976
- * Validate transaction rule configuration
2626
+ * Get rule with statistics
2627
+ * Returns a rule with pending/overdue counts and next expected date
1977
2628
  * @param data The data for the request.
2629
+ * @param data.id Rule ID
1978
2630
  * @param data.region Region code for tenant context
1979
- * @param data.requestBody
1980
- * @returns ValidateRuleResponseDto Validation result
2631
+ * @returns RecurringRuleWithStatsResponseDto Rule with stats retrieved successfully
1981
2632
  * @throws ApiError
1982
2633
  */
1983
- public static transactionRuleControllerValidate(
1984
- data: TransactionRuleControllerValidateData
1985
- ): CancelablePromise<TransactionRuleControllerValidateResponse> {
2634
+ public static recurringRuleControllerGetWithStats(
2635
+ data: RecurringRuleControllerGetWithStatsData
2636
+ ): CancelablePromise<RecurringRuleControllerGetWithStatsResponse> {
1986
2637
  return __request(OpenAPI, {
1987
- method: 'POST',
1988
- url: '/api/v1/{region}/bean/transaction-rules/validate',
2638
+ method: 'GET',
2639
+ url: '/api/v1/{region}/bean/recurring-rules/{id}/stats',
1989
2640
  path: {
2641
+ id: data.id,
1990
2642
  region: data.region
1991
2643
  },
1992
- body: data.requestBody,
1993
- mediaType: 'application/json',
1994
2644
  errors: {
1995
- 400: 'Validation failed',
1996
- 401: 'Unauthorized'
2645
+ 404: 'Rule not found'
1997
2646
  }
1998
2647
  });
1999
2648
  }
2649
+ }
2000
2650
 
2651
+ export class ExpectedTransactionsService {
2001
2652
  /**
2002
- * Bulk create transaction rules
2653
+ * List expected transactions
2654
+ * Returns expected transactions for the authenticated user with optional filtering
2003
2655
  * @param data The data for the request.
2004
2656
  * @param data.region Region code for tenant context
2005
- * @param data.requestBody
2006
- * @returns BulkCreateRulesResponseDto Bulk create completed
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
2007
2662
  * @throws ApiError
2008
2663
  */
2009
- public static transactionRuleControllerBulkCreate(
2010
- data: TransactionRuleControllerBulkCreateData
2011
- ): CancelablePromise<TransactionRuleControllerBulkCreateResponse> {
2664
+ public static expectedTransactionControllerFindAll(
2665
+ data: ExpectedTransactionControllerFindAllData
2666
+ ): CancelablePromise<ExpectedTransactionControllerFindAllResponse> {
2012
2667
  return __request(OpenAPI, {
2013
- method: 'POST',
2014
- url: '/api/v1/{region}/bean/transaction-rules/bulk',
2668
+ method: 'GET',
2669
+ url: '/api/v1/{region}/bean/expected-transactions',
2015
2670
  path: {
2016
2671
  region: data.region
2017
2672
  },
2018
- body: data.requestBody,
2019
- mediaType: 'application/json',
2020
- errors: {
2021
- 400: 'Invalid bulk create data',
2022
- 401: 'Unauthorized'
2673
+ query: {
2674
+ ruleId: data.ruleId,
2675
+ status: data.status,
2676
+ fromDate: data.fromDate,
2677
+ toDate: data.toDate
2023
2678
  }
2024
2679
  });
2025
2680
  }
2026
2681
 
2027
2682
  /**
2028
- * Export transaction rules
2683
+ * List overdue expected transactions
2684
+ * Returns all overdue expected transactions (PENDING past tolerance)
2029
2685
  * @param data The data for the request.
2030
- * @param data.format Export format (currently only JSON supported)
2031
2686
  * @param data.region Region code for tenant context
2032
- * @returns ExportRulesResponseDto Exported rules
2687
+ * @returns ExpectedTransactionListResponseDto Overdue transactions retrieved successfully
2033
2688
  * @throws ApiError
2034
2689
  */
2035
- public static transactionRuleControllerExport(
2036
- data: TransactionRuleControllerExportData
2037
- ): CancelablePromise<TransactionRuleControllerExportResponse> {
2690
+ public static expectedTransactionControllerFindOverdue(
2691
+ data: ExpectedTransactionControllerFindOverdueData
2692
+ ): CancelablePromise<ExpectedTransactionControllerFindOverdueResponse> {
2038
2693
  return __request(OpenAPI, {
2039
2694
  method: 'GET',
2040
- url: '/api/v1/{region}/bean/transaction-rules/export/{format}',
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}',
2041
2717
  path: {
2042
- format: data.format,
2718
+ id: data.id,
2043
2719
  region: data.region
2044
2720
  },
2045
2721
  errors: {
2046
- 400: 'Unsupported format',
2047
- 401: 'Unauthorized'
2722
+ 404: 'Expected transaction not found'
2048
2723
  }
2049
2724
  });
2050
2725
  }
2051
2726
 
2052
2727
  /**
2053
- * Get transaction rule statistics
2728
+ * Skip expected transaction
2729
+ * Marks an expected transaction as skipped (PENDING -> SKIPPED)
2054
2730
  * @param data The data for the request.
2055
- * @param data.period Statistics time period
2731
+ * @param data.id Expected transaction ID
2056
2732
  * @param data.region Region code for tenant context
2057
- * @returns RuleStatisticsResponseDto Rule statistics
2733
+ * @returns ExpectedTransactionResponseDto Expected transaction skipped successfully
2058
2734
  * @throws ApiError
2059
2735
  */
2060
- public static transactionRuleControllerGetStatistics(
2061
- data: TransactionRuleControllerGetStatisticsData
2062
- ): CancelablePromise<TransactionRuleControllerGetStatisticsResponse> {
2736
+ public static expectedTransactionControllerSkip(
2737
+ data: ExpectedTransactionControllerSkipData
2738
+ ): CancelablePromise<ExpectedTransactionControllerSkipResponse> {
2063
2739
  return __request(OpenAPI, {
2064
- method: 'GET',
2065
- url: '/api/v1/{region}/bean/transaction-rules/statistics/{period}',
2740
+ method: 'POST',
2741
+ url: '/api/v1/{region}/bean/expected-transactions/{id}/skip',
2066
2742
  path: {
2067
- period: data.period,
2743
+ id: data.id,
2068
2744
  region: data.region
2069
2745
  },
2070
2746
  errors: {
2071
- 401: 'Unauthorized'
2747
+ 400: 'Cannot skip - not in PENDING status',
2748
+ 404: 'Expected transaction not found'
2072
2749
  }
2073
2750
  });
2074
2751
  }
2075
2752
 
2076
2753
  /**
2077
- * Get transaction rule detail
2754
+ * Undo skip
2755
+ * Reverses a skip operation (SKIPPED -> PENDING)
2078
2756
  * @param data The data for the request.
2079
- * @param data.ruleId Rule ID
2757
+ * @param data.id Expected transaction ID
2080
2758
  * @param data.region Region code for tenant context
2081
- * @returns TransactionRuleResponseDto Rule details
2759
+ * @returns void Skip undone successfully
2082
2760
  * @throws ApiError
2083
2761
  */
2084
- public static transactionRuleControllerGetDetail(
2085
- data: TransactionRuleControllerGetDetailData
2086
- ): CancelablePromise<TransactionRuleControllerGetDetailResponse> {
2762
+ public static expectedTransactionControllerUndoSkip(
2763
+ data: ExpectedTransactionControllerUndoSkipData
2764
+ ): CancelablePromise<ExpectedTransactionControllerUndoSkipResponse> {
2087
2765
  return __request(OpenAPI, {
2088
- method: 'GET',
2089
- url: '/api/v1/{region}/bean/transaction-rules/{ruleId}',
2766
+ method: 'DELETE',
2767
+ url: '/api/v1/{region}/bean/expected-transactions/{id}/skip',
2090
2768
  path: {
2091
- ruleId: data.ruleId,
2769
+ id: data.id,
2092
2770
  region: data.region
2093
2771
  },
2094
2772
  errors: {
2095
- 401: 'Unauthorized',
2096
- 403: 'Forbidden - not owner of rule',
2097
- 404: 'Rule not found'
2773
+ 400: 'Cannot undo - not in SKIPPED status',
2774
+ 404: 'Expected transaction not found'
2098
2775
  }
2099
2776
  });
2100
2777
  }
2101
2778
 
2102
2779
  /**
2103
- * Update a transaction rule
2780
+ * Confirm transaction match
2781
+ * Manually matches an expected transaction with an actual transaction
2104
2782
  * @param data The data for the request.
2105
- * @param data.ruleId Rule ID to update
2783
+ * @param data.id Expected transaction ID
2106
2784
  * @param data.region Region code for tenant context
2107
2785
  * @param data.requestBody
2108
- * @returns TransactionRuleResponseDto Rule updated successfully
2786
+ * @returns unknown Match confirmed successfully
2109
2787
  * @throws ApiError
2110
2788
  */
2111
- public static transactionRuleControllerUpdate(
2112
- data: TransactionRuleControllerUpdateData
2113
- ): CancelablePromise<TransactionRuleControllerUpdateResponse> {
2789
+ public static expectedTransactionControllerConfirmMatch(
2790
+ data: ExpectedTransactionControllerConfirmMatchData
2791
+ ): CancelablePromise<ExpectedTransactionControllerConfirmMatchResponse> {
2114
2792
  return __request(OpenAPI, {
2115
- method: 'PUT',
2116
- url: '/api/v1/{region}/bean/transaction-rules/{ruleId}',
2793
+ method: 'POST',
2794
+ url: '/api/v1/{region}/bean/expected-transactions/{id}/match',
2117
2795
  path: {
2118
- ruleId: data.ruleId,
2796
+ id: data.id,
2119
2797
  region: data.region
2120
2798
  },
2121
2799
  body: data.requestBody,
2122
2800
  mediaType: 'application/json',
2123
2801
  errors: {
2124
- 400: 'Validation failed',
2125
- 401: 'Unauthorized',
2126
- 403: 'Forbidden - not owner of rule',
2127
- 404: 'Rule not found',
2128
- 409: 'Resource conflict - rule is being modified by another process'
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'
2129
2805
  }
2130
2806
  });
2131
2807
  }
2132
2808
 
2133
2809
  /**
2134
- * Delete a transaction rule
2810
+ * Unmatch transaction
2811
+ * Removes the match between expected and actual transaction (COMPLETED -> PENDING)
2135
2812
  * @param data The data for the request.
2136
- * @param data.ruleId Rule ID to delete
2813
+ * @param data.id Expected transaction ID
2137
2814
  * @param data.region Region code for tenant context
2138
- * @returns void Rule deleted successfully
2815
+ * @returns void Match removed successfully
2139
2816
  * @throws ApiError
2140
2817
  */
2141
- public static transactionRuleControllerDelete(
2142
- data: TransactionRuleControllerDeleteData
2143
- ): CancelablePromise<TransactionRuleControllerDeleteResponse> {
2818
+ public static expectedTransactionControllerUnmatch(
2819
+ data: ExpectedTransactionControllerUnmatchData
2820
+ ): CancelablePromise<ExpectedTransactionControllerUnmatchResponse> {
2144
2821
  return __request(OpenAPI, {
2145
2822
  method: 'DELETE',
2146
- url: '/api/v1/{region}/bean/transaction-rules/{ruleId}',
2823
+ url: '/api/v1/{region}/bean/expected-transactions/{id}/match',
2147
2824
  path: {
2148
- ruleId: data.ruleId,
2825
+ id: data.id,
2149
2826
  region: data.region
2150
2827
  },
2151
2828
  errors: {
2152
- 401: 'Unauthorized',
2153
- 403: 'Forbidden - not owner of rule',
2154
- 404: 'Rule not found',
2155
- 409: 'Resource conflict - rule is being modified by another process'
2829
+ 400: 'Cannot unmatch - not in COMPLETED status',
2830
+ 404: 'Expected transaction not found'
2156
2831
  }
2157
2832
  });
2158
2833
  }
2159
2834
 
2160
2835
  /**
2161
- * Test rule matching
2836
+ * Enter Now
2837
+ * Creates an actual transaction for an expected transaction (YNAB-style Enter Now)
2162
2838
  * @param data The data for the request.
2163
- * @param data.ruleId Rule ID to test
2839
+ * @param data.id Expected transaction ID
2164
2840
  * @param data.region Region code for tenant context
2165
2841
  * @param data.requestBody
2166
- * @returns TestRuleResponseDto Test result
2842
+ * @returns unknown Transaction created successfully
2167
2843
  * @throws ApiError
2168
2844
  */
2169
- public static transactionRuleControllerTest(
2170
- data: TransactionRuleControllerTestData
2171
- ): CancelablePromise<TransactionRuleControllerTestResponse> {
2845
+ public static expectedTransactionControllerEnterNow(
2846
+ data: ExpectedTransactionControllerEnterNowData
2847
+ ): CancelablePromise<ExpectedTransactionControllerEnterNowResponse> {
2172
2848
  return __request(OpenAPI, {
2173
2849
  method: 'POST',
2174
- url: '/api/v1/{region}/bean/transaction-rules/{ruleId}/test',
2850
+ url: '/api/v1/{region}/bean/expected-transactions/{id}/enter',
2175
2851
  path: {
2176
- ruleId: data.ruleId,
2852
+ id: data.id,
2177
2853
  region: data.region
2178
2854
  },
2179
2855
  body: data.requestBody,
2180
2856
  mediaType: 'application/json',
2181
2857
  errors: {
2182
- 401: 'Unauthorized',
2183
- 403: 'Forbidden - not owner of rule',
2184
- 404: 'Rule not found'
2858
+ 400: 'Cannot enter - not in PENDING status or missing accounts',
2859
+ 404: 'Expected transaction or accounts not found'
2185
2860
  }
2186
2861
  });
2187
2862
  }
2188
2863
  }
2189
2864
 
2190
- export class UsersService {
2865
+ export class RecurringForecastService {
2191
2866
  /**
2192
- * Delete own user account
2867
+ * Get cash flow forecast
2868
+ * Returns predicted outflows for the next N months based on active recurring rules
2193
2869
  * @param data The data for the request.
2194
- * @param data.requestBody
2195
- * @returns void User deleted successfully
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
2196
2873
  * @throws ApiError
2197
2874
  */
2198
- public static userControllerDeleteOwnUser(
2199
- data: UserControllerDeleteOwnUserData
2200
- ): CancelablePromise<UserControllerDeleteOwnUserResponse> {
2875
+ public static forecastControllerGetForecast(
2876
+ data: ForecastControllerGetForecastData
2877
+ ): CancelablePromise<ForecastControllerGetForecastResponse> {
2201
2878
  return __request(OpenAPI, {
2202
- method: 'DELETE',
2203
- url: '/api/v1/users',
2204
- body: data.requestBody,
2205
- mediaType: 'application/json',
2206
- errors: {
2207
- 403: 'Invalid access token'
2879
+ method: 'GET',
2880
+ url: '/api/v1/{region}/bean/recurring/forecast',
2881
+ path: {
2882
+ region: data.region
2883
+ },
2884
+ query: {
2885
+ months: data.months
2208
2886
  }
2209
2887
  });
2210
2888
  }
2889
+ }
2211
2890
 
2891
+ export class BeanCategoryCatalogService {
2212
2892
  /**
2213
- * Get current authenticated user
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.
2214
2895
  * @param data The data for the request.
2215
- * @param data.acceptLanguage
2216
- * @returns unknown User retrieved 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
2217
2900
  * @throws ApiError
2218
2901
  */
2219
- public static userControllerGetUser(
2220
- data: UserControllerGetUserData
2221
- ): CancelablePromise<UserControllerGetUserResponse> {
2902
+ public static categoryCatalogControllerList(
2903
+ data: CategoryCatalogControllerListData
2904
+ ): CancelablePromise<CategoryCatalogControllerListResponse> {
2222
2905
  return __request(OpenAPI, {
2223
2906
  method: 'GET',
2224
- url: '/api/v1/users',
2225
- headers: {
2226
- 'accept-language': data.acceptLanguage
2907
+ url: '/api/v1/{region}/bean/categories',
2908
+ path: {
2909
+ region: data.region
2910
+ },
2911
+ query: {
2912
+ scenario: data.scenario,
2913
+ routeBearing: data.routeBearing
2227
2914
  }
2228
2915
  });
2229
2916
  }
2917
+ }
2230
2918
 
2919
+ export class LifeEventsService {
2231
2920
  /**
2232
- * Sign up new user
2233
- * Create a new account with auto-generated access token. Protected by Cloudflare Turnstile to prevent automated signup (when enabled).
2921
+ * Create a new life event
2922
+ * Creates a new life event entry for the authenticated user. Returns ETag header carrying the row updatedAt.
2234
2923
  * @param data The data for the request.
2924
+ * @param data.region Region code for tenant context (decorative for life events)
2235
2925
  * @param data.requestBody
2236
- * @returns unknown User created successfully
2926
+ * @returns EventResponseDto Life event created successfully
2237
2927
  * @throws ApiError
2238
2928
  */
2239
- public static userControllerSignupUser(
2240
- data: UserControllerSignupUserData
2241
- ): CancelablePromise<UserControllerSignupUserResponse> {
2929
+ public static eventControllerCreate(
2930
+ data: EventControllerCreateData
2931
+ ): CancelablePromise<EventControllerCreateResponse> {
2242
2932
  return __request(OpenAPI, {
2243
2933
  method: 'POST',
2244
- url: '/api/v1/users',
2934
+ url: '/api/v1/{region}/bean/events',
2935
+ path: {
2936
+ region: data.region
2937
+ },
2245
2938
  body: data.requestBody,
2246
2939
  mediaType: 'application/json',
2247
2940
  errors: {
2248
- 400: 'Invalid Turnstile token (when Turnstile is enabled)',
2249
- 403: 'User signup is disabled'
2941
+ 409: 'Life event already exists for this (userId, type, date) combination'
2250
2942
  }
2251
2943
  });
2252
2944
  }
2253
2945
 
2254
2946
  /**
2255
- * Delete user by ID (admin only)
2947
+ * List user life events
2948
+ * Returns life events for the authenticated user with optional filtering by type, description search, and date range.
2256
2949
  * @param data The data for the request.
2257
- * @param data.id User ID to delete
2258
- * @returns void User deleted successfully
2950
+ * @param data.region Region code for tenant context (decorative for life events)
2951
+ * @param data.type Filter by life event type (exact match)
2952
+ * @param data.q Search term for description (case-insensitive partial match)
2953
+ * @param data.from Filter life events from this date (ISO 8601 format)
2954
+ * @param data.to Filter life events to this date (ISO 8601 format)
2955
+ * @param data.page Page number for pagination (default: 1)
2956
+ * @param data.limit Number of items per page (default: 20, max: 100)
2957
+ * @returns EventListResponseDto Life events retrieved successfully
2259
2958
  * @throws ApiError
2260
2959
  */
2261
- public static userControllerDeleteUser(
2262
- data: UserControllerDeleteUserData
2263
- ): CancelablePromise<UserControllerDeleteUserResponse> {
2960
+ public static eventControllerFindAll(
2961
+ data: EventControllerFindAllData
2962
+ ): CancelablePromise<EventControllerFindAllResponse> {
2264
2963
  return __request(OpenAPI, {
2265
- method: 'DELETE',
2266
- url: '/api/v1/users/{id}',
2964
+ method: 'GET',
2965
+ url: '/api/v1/{region}/bean/events',
2267
2966
  path: {
2268
- id: data.id
2967
+ region: data.region
2269
2968
  },
2270
- errors: {
2271
- 403: 'Cannot delete own account or insufficient permissions'
2969
+ query: {
2970
+ type: data.type,
2971
+ q: data.q,
2972
+ from: data.from,
2973
+ to: data.to,
2974
+ page: data.page,
2975
+ limit: data.limit
2272
2976
  }
2273
2977
  });
2274
2978
  }
2275
2979
 
2276
2980
  /**
2277
- * Get user info by user ID
2981
+ * Get life event by ID
2982
+ * Returns a single life event by its ID. Returns ETag header.
2278
2983
  * @param data The data for the request.
2279
- * @param data.id User ID
2280
- * @returns unknown User info retrieved successfully
2984
+ * @param data.id Life event ID
2985
+ * @param data.region Region code for tenant context (decorative for life events)
2986
+ * @returns EventResponseDto Life event retrieved successfully
2281
2987
  * @throws ApiError
2282
2988
  */
2283
- public static userControllerGetUserInfo(
2284
- data: UserControllerGetUserInfoData
2285
- ): CancelablePromise<UserControllerGetUserInfoResponse> {
2989
+ public static eventControllerFindOne(
2990
+ data: EventControllerFindOneData
2991
+ ): CancelablePromise<EventControllerFindOneResponse> {
2286
2992
  return __request(OpenAPI, {
2287
2993
  method: 'GET',
2288
- url: '/api/v1/users/{id}/info',
2994
+ url: '/api/v1/{region}/bean/events/{id}',
2289
2995
  path: {
2290
- id: data.id
2996
+ id: data.id,
2997
+ region: data.region
2291
2998
  },
2292
2999
  errors: {
2293
- 403: 'Cannot access other user info without admin permission'
3000
+ 404: 'Life event not found'
2294
3001
  }
2295
3002
  });
2296
3003
  }
2297
3004
 
2298
3005
  /**
2299
- * Update user settings
3006
+ * Update a life event
3007
+ * Updates an existing life event. If If-Match header is provided, performs optimistic concurrency check; mismatched updatedAt returns 412.
2300
3008
  * @param data The data for the request.
3009
+ * @param data.id Life event ID
3010
+ * @param data.region Region code for tenant context (decorative for life events)
2301
3011
  * @param data.requestBody
2302
- * @returns unknown Settings updated successfully
3012
+ * @returns EventResponseDto Life event updated successfully
2303
3013
  * @throws ApiError
2304
3014
  */
2305
- public static userControllerUpdateUserSetting(
2306
- data: UserControllerUpdateUserSettingData
2307
- ): CancelablePromise<UserControllerUpdateUserSettingResponse> {
3015
+ public static eventControllerUpdate(
3016
+ data: EventControllerUpdateData
3017
+ ): CancelablePromise<EventControllerUpdateResponse> {
2308
3018
  return __request(OpenAPI, {
2309
3019
  method: 'PUT',
2310
- url: '/api/v1/users/setting',
3020
+ url: '/api/v1/{region}/bean/events/{id}',
3021
+ path: {
3022
+ id: data.id,
3023
+ region: data.region
3024
+ },
2311
3025
  body: data.requestBody,
2312
3026
  mediaType: 'application/json',
2313
3027
  errors: {
2314
- 403: 'Insufficient permissions'
3028
+ 400: 'If-Match header is not a valid ISO 8601 date',
3029
+ 404: 'Life event not found',
3030
+ 409: 'Updated event conflicts with an existing (userId, type, date) combination',
3031
+ 412: 'If-Match precondition failed (updatedAt mismatch)'
2315
3032
  }
2316
3033
  });
2317
3034
  }
2318
3035
 
2319
3036
  /**
2320
- * Get all user settings paginated (admin only)
3037
+ * Delete a life event
3038
+ * Deletes a life event entry (hard delete). Returns 204.
2321
3039
  * @param data The data for the request.
2322
- * @param data.pageNo Page number
2323
- * @param data.pageSize Page size
2324
- * @returns unknown Settings list retrieved successfully
3040
+ * @param data.id Life event ID
3041
+ * @param data.region Region code for tenant context (decorative for life events)
3042
+ * @returns void Life event deleted successfully
2325
3043
  * @throws ApiError
2326
3044
  */
2327
- public static userControllerGetAllUserSettingsByPage(
2328
- data: UserControllerGetAllUserSettingsByPageData
2329
- ): CancelablePromise<UserControllerGetAllUserSettingsByPageResponse> {
3045
+ public static eventControllerDelete(
3046
+ data: EventControllerDeleteData
3047
+ ): CancelablePromise<EventControllerDeleteResponse> {
3048
+ return __request(OpenAPI, {
3049
+ method: 'DELETE',
3050
+ url: '/api/v1/{region}/bean/events/{id}',
3051
+ path: {
3052
+ id: data.id,
3053
+ region: data.region
3054
+ },
3055
+ errors: {
3056
+ 404: 'Life event not found'
3057
+ }
3058
+ });
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> {
2330
3075
  return __request(OpenAPI, {
2331
3076
  method: 'GET',
2332
- url: '/api/v1/users/settings-by-page',
3077
+ url: '/api/v1/{region}/bean/events/{id}/slice',
3078
+ path: {
3079
+ id: data.id,
3080
+ region: data.region
3081
+ },
2333
3082
  query: {
2334
- pageNo: data.pageNo,
2335
- pageSize: data.pageSize
3083
+ accountPattern: data.accountPattern,
3084
+ granularity: data.granularity
3085
+ },
3086
+ errors: {
3087
+ 400: 'accountPattern query param is empty',
3088
+ 404: 'Life event not found'
2336
3089
  }
2337
3090
  });
2338
3091
  }
3092
+ }
2339
3093
 
3094
+ export class OnboardingService {
2340
3095
  /**
2341
- * Get asset and liability summary for current user
2342
- * @returns unknown Summary retrieved successfully
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.
2343
3101
  * @throws ApiError
2344
3102
  */
2345
- public static userControllerGetAssetLiabilitySummary(): CancelablePromise<UserControllerGetAssetLiabilitySummaryResponse> {
3103
+ public static onboardingControllerBootstrap(
3104
+ data: OnboardingControllerBootstrapData
3105
+ ): CancelablePromise<OnboardingControllerBootstrapResponse> {
2346
3106
  return __request(OpenAPI, {
2347
- method: 'GET',
2348
- url: '/api/v1/users/asset-liability-summary'
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
+ }
2349
3117
  });
2350
3118
  }
2351
3119
  }
2352
3120
 
2353
- export class PropertiesService {
3121
+ export class BalanceReconciliationService {
2354
3122
  /**
2355
- * Get all system properties
2356
- * @returns unknown Properties retrieved successfully
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
2357
3129
  * @throws ApiError
2358
3130
  */
2359
- public static propertyControllerGetAll(): CancelablePromise<PropertyControllerGetAllResponse> {
3131
+ public static reconciliationControllerCompute(
3132
+ data: ReconciliationControllerComputeData
3133
+ ): CancelablePromise<ReconciliationControllerComputeResponse> {
2360
3134
  return __request(OpenAPI, {
2361
- method: 'GET',
2362
- url: '/api/v1/admin/properties',
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',
2363
3142
  errors: {
2364
- 401: 'Unauthorized',
2365
- 403: 'Forbidden - insufficient permissions'
3143
+ 404: 'Account not found'
2366
3144
  }
2367
3145
  });
2368
3146
  }
2369
3147
 
2370
3148
  /**
2371
- * Get property by key
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.
2372
3151
  * @param data The data for the request.
2373
- * @param data.key Property key
2374
- * @returns unknown Property retrieved successfully
3152
+ * @param data.region Region code for tenant context (decorative for reconciliation)
3153
+ * @param data.requestBody
3154
+ * @returns ReconciliationRecordDto Balance assertion recorded
2375
3155
  * @throws ApiError
2376
3156
  */
2377
- public static propertyControllerGetByKey(
2378
- data: PropertyControllerGetByKeyData
2379
- ): CancelablePromise<PropertyControllerGetByKeyResponse> {
3157
+ public static reconciliationControllerAssert(
3158
+ data: ReconciliationControllerAssertData
3159
+ ): CancelablePromise<ReconciliationControllerAssertResponse> {
2380
3160
  return __request(OpenAPI, {
2381
- method: 'GET',
2382
- url: '/api/v1/admin/properties/{key}',
3161
+ method: 'POST',
3162
+ url: '/api/v1/{region}/bean/reconciliations/assert',
2383
3163
  path: {
2384
- key: data.key
3164
+ region: data.region
2385
3165
  },
3166
+ body: data.requestBody,
3167
+ mediaType: 'application/json',
2386
3168
  errors: {
2387
- 401: 'Unauthorized',
2388
- 403: 'Forbidden - insufficient permissions',
2389
- 404: 'Property not found'
3169
+ 404: 'Account not found'
2390
3170
  }
2391
3171
  });
2392
3172
  }
2393
3173
 
2394
3174
  /**
2395
- * Update a system property
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.
2396
3177
  * @param data The data for the request.
2397
- * @param data.key Property key
3178
+ * @param data.region Region code for tenant context (decorative for reconciliation)
2398
3179
  * @param data.requestBody
2399
- * @returns unknown Property updated successfully
3180
+ * @returns PadResultDto Pad adjusting entry generated
2400
3181
  * @throws ApiError
2401
3182
  */
2402
- public static propertyControllerUpdate(
2403
- data: PropertyControllerUpdateData
2404
- ): CancelablePromise<PropertyControllerUpdateResponse> {
3183
+ public static reconciliationControllerPad(
3184
+ data: ReconciliationControllerPadData
3185
+ ): CancelablePromise<ReconciliationControllerPadResponse> {
2405
3186
  return __request(OpenAPI, {
2406
- method: 'PUT',
2407
- url: '/api/v1/admin/properties/{key}',
3187
+ method: 'POST',
3188
+ url: '/api/v1/{region}/bean/reconciliations/pad',
2408
3189
  path: {
2409
- key: data.key
3190
+ region: data.region
2410
3191
  },
2411
3192
  body: data.requestBody,
2412
3193
  mediaType: 'application/json',
2413
3194
  errors: {
2414
- 401: 'Unauthorized',
2415
- 403: 'Forbidden - insufficient permissions'
3195
+ 400: 'Book already within tolerance — no pad needed',
3196
+ 404: 'Account not found'
2416
3197
  }
2417
3198
  });
2418
3199
  }
2419
3200
 
2420
3201
  /**
2421
- * Delete a system property
3202
+ * List reconciliation history for an account
3203
+ * Returns recorded balance assertions (most recent first). The latest drives the account-detail "Last <date>" badge.
2422
3204
  * @param data The data for the request.
2423
- * @param data.key Property key
2424
- * @returns void Property deleted successfully
3205
+ * @param data.accountId BeanAccount id
3206
+ * @param data.region Region code for tenant context (decorative for reconciliation)
3207
+ * @returns ReconciliationRecordDto Reconciliation history
2425
3208
  * @throws ApiError
2426
3209
  */
2427
- public static propertyControllerDelete(
2428
- data: PropertyControllerDeleteData
2429
- ): CancelablePromise<PropertyControllerDeleteResponse> {
3210
+ public static reconciliationControllerHistory(
3211
+ data: ReconciliationControllerHistoryData
3212
+ ): CancelablePromise<ReconciliationControllerHistoryResponse> {
2430
3213
  return __request(OpenAPI, {
2431
- method: 'DELETE',
2432
- url: '/api/v1/admin/properties/{key}',
3214
+ method: 'GET',
3215
+ url: '/api/v1/{region}/bean/accounts/{accountId}/reconciliations',
2433
3216
  path: {
2434
- key: data.key
3217
+ accountId: data.accountId,
3218
+ region: data.region
2435
3219
  },
2436
3220
  errors: {
2437
- 401: 'Unauthorized',
2438
- 403: 'Forbidden - insufficient permissions',
2439
- 404: 'Property not found'
3221
+ 404: 'Account not found'
2440
3222
  }
2441
3223
  });
2442
3224
  }
@@ -2446,13 +3228,20 @@ export class BeanExportService {
2446
3228
  /**
2447
3229
  * Export Beancount ledger as ZIP
2448
3230
  * Export all user Beancount data as a ZIP file containing ledger.beancount and yearly files in community format.
2449
- * @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
2450
3234
  * @throws ApiError
2451
3235
  */
2452
- public static exportControllerExportBeancount(): CancelablePromise<ExportControllerExportBeancountResponse> {
3236
+ public static exportControllerExportBeancount(
3237
+ data: ExportControllerExportBeancountData
3238
+ ): CancelablePromise<ExportControllerExportBeancountResponse> {
2453
3239
  return __request(OpenAPI, {
2454
3240
  method: 'GET',
2455
- url: '/api/v1/{region}/bean/export/beancount'
3241
+ url: '/api/v1/{region}/bean/export/beancount',
3242
+ path: {
3243
+ region: data.region
3244
+ }
2456
3245
  });
2457
3246
  }
2458
3247
  }
@@ -2489,7 +3278,7 @@ export class BeanImportService {
2489
3278
 
2490
3279
  /**
2491
3280
  * Identify file type
2492
- * Upload a file to check if it can be processed by any registered importer. Does not perform actual import - useful for pre-validation. Uses user-specific importer configuration.
3281
+ * Server-side importer identification has been removed (ADR-0101); file matching is handled client-side via the community parser pipeline. Always returns identified=false with an explanatory message; kept for backward compatibility. Does not perform actual import.
2493
3282
  * @param data The data for the request.
2494
3283
  * @param data.region Region code for tenant context
2495
3284
  * @param data.formData File to identify
@@ -2543,403 +3332,578 @@ export class BeanImportService {
2543
3332
  * Get importer configuration
2544
3333
  * Returns the current configuration for the specified importer. Creates default configuration if none exists.
2545
3334
  * @param data The data for the request.
2546
- * @param data.importerId Importer identifier. Supported importers: alipay, alipay-web, wechat, boc, boc-credit, ccb, cmb, cmbc, cmbc-credit, icbc, icbc-credit, hsbc-hk-credit, hsbc-hk-debit
3335
+ * @param data.importerId Importer identifier. Supported importers: alipay, alipay-web, wechat, boc, boc-credit, ccb, cmb, cmbc, cmbc-credit, icbc, icbc-credit, hsbc-hk-credit, hsbc-hk-debit
3336
+ * @param data.region Region code for tenant context
3337
+ * @returns ImporterConfigDto Configuration retrieved successfully
3338
+ * @throws ApiError
3339
+ */
3340
+ public static importerConfigControllerGetConfig(
3341
+ data: ImporterConfigControllerGetConfigData
3342
+ ): CancelablePromise<ImporterConfigControllerGetConfigResponse> {
3343
+ return __request(OpenAPI, {
3344
+ method: 'GET',
3345
+ url: '/api/v1/{region}/bean/import/config/{importerId}',
3346
+ path: {
3347
+ importerId: data.importerId,
3348
+ region: data.region
3349
+ },
3350
+ errors: {
3351
+ 400: 'Invalid input - Unsupported importer',
3352
+ 401: 'Unauthorized - Authentication required'
3353
+ }
3354
+ });
3355
+ }
3356
+
3357
+ /**
3358
+ * Update importer configuration
3359
+ * Updates the configuration for the specified importer. Partial updates are supported.
3360
+ * @param data The data for the request.
3361
+ * @param data.importerId Importer identifier. Supported importers: alipay, alipay-web, wechat, boc, boc-credit, ccb, cmb, cmbc, cmbc-credit, icbc, icbc-credit, hsbc-hk-credit, hsbc-hk-debit
3362
+ * @param data.region Region code for tenant context
3363
+ * @param data.requestBody Partial configuration update. Only provided fields will be updated.
3364
+ * @returns ImporterConfigDto Configuration updated successfully
3365
+ * @throws ApiError
3366
+ */
3367
+ public static importerConfigControllerUpdateConfig(
3368
+ data: ImporterConfigControllerUpdateConfigData
3369
+ ): CancelablePromise<ImporterConfigControllerUpdateConfigResponse> {
3370
+ return __request(OpenAPI, {
3371
+ method: 'PUT',
3372
+ url: '/api/v1/{region}/bean/import/config/{importerId}',
3373
+ path: {
3374
+ importerId: data.importerId,
3375
+ region: data.region
3376
+ },
3377
+ body: data.requestBody,
3378
+ mediaType: 'application/json',
3379
+ errors: {
3380
+ 400: 'Invalid input - Validation failed',
3381
+ 404: 'Configuration not found'
3382
+ }
3383
+ });
3384
+ }
3385
+
3386
+ /**
3387
+ * Reset configuration to default
3388
+ * Resets the configuration for the specified importer to default values. This operation overwrites all existing configuration.
3389
+ * @param data The data for the request.
3390
+ * @param data.importerId Importer identifier. Supported importers: alipay, alipay-web, wechat, boc, boc-credit, ccb, cmb, cmbc, cmbc-credit, icbc, icbc-credit, hsbc-hk-credit, hsbc-hk-debit
3391
+ * @param data.region Region code for tenant context
3392
+ * @returns ImporterConfigDto Configuration reset successfully
3393
+ * @throws ApiError
3394
+ */
3395
+ public static importerConfigControllerResetConfig(
3396
+ data: ImporterConfigControllerResetConfigData
3397
+ ): CancelablePromise<ImporterConfigControllerResetConfigResponse> {
3398
+ return __request(OpenAPI, {
3399
+ method: 'POST',
3400
+ url: '/api/v1/{region}/bean/import/config/{importerId}/reset',
3401
+ path: {
3402
+ importerId: data.importerId,
3403
+ region: data.region
3404
+ },
3405
+ errors: {
3406
+ 400: 'Invalid input - Unsupported importer'
3407
+ }
3408
+ });
3409
+ }
3410
+ }
3411
+
3412
+ export class ProviderSyncService {
3413
+ /**
3414
+ * Sync transactions from financial data provider
3415
+ *
3416
+ * Accepts raw transactions from external financial data providers, transforms them to Beancount format, and processes them through the ingestion pipeline.
3417
+ *
3418
+ * **Supported Providers:**
3419
+ * - **plaid**: Plaid API (US, Canada, Europe)
3420
+ * - **teller**: Teller API (US)
3421
+ * - **truelayer**: TrueLayer Open Banking (UK, Europe)
3422
+ * - **gocardless**: GoCardless Bank Account Data (Europe)
3423
+ * - **simplefin**: SimpleFIN (Self-hosted)
3424
+ * - **yodlee**: Yodlee (Global)
3425
+ * - **beancount-direct**: Beancount format transactions
3426
+ * - **parsed-bill**: Client-side parsed bill transactions
3427
+ *
3428
+ * **Processing Flow:**
3429
+ * 1. Transform raw data via provider adapter
3430
+ * 2. Validate transaction format
3431
+ * 3. Deduplicate using originalId
3432
+ * 4. Classify using rule engine
3433
+ * 5. Route low-confidence to Review Center
3434
+ * 6. Persist validated transactions
3435
+ *
3436
+ * @param data The data for the request.
3437
+ * @param data.providerName Provider name
3438
+ * @param data.region Region code for tenant context
3439
+ * @param data.requestBody
3440
+ * @returns ProviderSyncResponseDto Sync completed successfully
3441
+ * @throws ApiError
3442
+ */
3443
+ public static providerSyncControllerSync(
3444
+ data: ProviderSyncControllerSyncData
3445
+ ): CancelablePromise<ProviderSyncControllerSyncResponse> {
3446
+ return __request(OpenAPI, {
3447
+ method: 'POST',
3448
+ url: '/api/v1/{region}/bean/import/provider/{providerName}/sync',
3449
+ path: {
3450
+ providerName: data.providerName,
3451
+ region: data.region
3452
+ },
3453
+ body: data.requestBody,
3454
+ mediaType: 'application/json',
3455
+ errors: {
3456
+ 400: 'Invalid request data',
3457
+ 401: 'Missing or invalid authentication',
3458
+ 404: 'Provider not supported'
3459
+ }
3460
+ });
3461
+ }
3462
+
3463
+ /**
3464
+ * Get supported providers
3465
+ * Returns a list of all providers supported by the sync endpoint.
3466
+ * @param data The data for the request.
3467
+ * @param data.region Region code for tenant context
3468
+ * @returns SupportedProvidersResponseDto List of supported providers
3469
+ * @throws ApiError
3470
+ */
3471
+ public static providerSyncControllerGetSupportedProviders(
3472
+ data: ProviderSyncControllerGetSupportedProvidersData
3473
+ ): CancelablePromise<ProviderSyncControllerGetSupportedProvidersResponse> {
3474
+ return __request(OpenAPI, {
3475
+ method: 'GET',
3476
+ url: '/api/v1/{region}/bean/import/provider/supported',
3477
+ path: {
3478
+ region: data.region
3479
+ },
3480
+ errors: {
3481
+ 401: 'Missing or invalid authentication'
3482
+ }
3483
+ });
3484
+ }
3485
+
3486
+ /**
3487
+ * Check if provider is supported
3488
+ * Returns whether a specific provider is supported.
3489
+ * @param data The data for the request.
3490
+ * @param data.providerName Provider name to check
3491
+ * @param data.region Region code for tenant context
3492
+ * @returns unknown Provider support status
3493
+ * @throws ApiError
3494
+ */
3495
+ public static providerSyncControllerIsProviderSupported(
3496
+ data: ProviderSyncControllerIsProviderSupportedData
3497
+ ): CancelablePromise<ProviderSyncControllerIsProviderSupportedResponse> {
3498
+ return __request(OpenAPI, {
3499
+ method: 'GET',
3500
+ url: '/api/v1/{region}/bean/import/provider/{providerName}/supported',
3501
+ path: {
3502
+ providerName: data.providerName,
3503
+ region: data.region
3504
+ },
3505
+ errors: {
3506
+ 401: 'Missing or invalid authentication'
3507
+ }
3508
+ });
3509
+ }
3510
+ }
3511
+
3512
+ export class ExternalAccountLinksService {
3513
+ /**
3514
+ * Create an external account → BeanAccount mapping (ADR-0113)
3515
+ * @param data The data for the request.
2547
3516
  * @param data.region Region code for tenant context
2548
- * @returns ImporterConfigDto Configuration retrieved successfully
3517
+ * @param data.requestBody
3518
+ * @returns ExternalAccountLinkResponseDto Link created.
2549
3519
  * @throws ApiError
2550
3520
  */
2551
- public static importerConfigControllerGetConfig(
2552
- data: ImporterConfigControllerGetConfigData
2553
- ): CancelablePromise<ImporterConfigControllerGetConfigResponse> {
3521
+ public static externalAccountLinkControllerCreate(
3522
+ data: ExternalAccountLinkControllerCreateData
3523
+ ): CancelablePromise<ExternalAccountLinkControllerCreateResponse> {
2554
3524
  return __request(OpenAPI, {
2555
- method: 'GET',
2556
- url: '/api/v1/{region}/bean/import/config/{importerId}',
3525
+ method: 'POST',
3526
+ url: '/api/v1/{region}/bean/external-account-links',
2557
3527
  path: {
2558
- importerId: data.importerId,
2559
3528
  region: data.region
2560
3529
  },
3530
+ body: data.requestBody,
3531
+ mediaType: 'application/json',
2561
3532
  errors: {
2562
- 400: 'Invalid input - Unsupported importer',
2563
- 401: 'Unauthorized - Authentication required'
3533
+ 422: 'beanAccountId not owned, or an active link already exists.'
2564
3534
  }
2565
3535
  });
2566
3536
  }
2567
3537
 
2568
3538
  /**
2569
- * Update importer configuration
2570
- * Updates the configuration for the specified importer. Partial updates are supported.
3539
+ * List the user's active external account links
2571
3540
  * @param data The data for the request.
2572
- * @param data.importerId Importer identifier. Supported importers: alipay, alipay-web, wechat, boc, boc-credit, ccb, cmb, cmbc, cmbc-credit, icbc, icbc-credit, hsbc-hk-credit, hsbc-hk-debit
3541
+ * @param data.provider
2573
3542
  * @param data.region Region code for tenant context
2574
- * @param data.requestBody Partial configuration update. Only provided fields will be updated.
2575
- * @returns ImporterConfigDto Configuration updated successfully
3543
+ * @returns ExternalAccountLinkListResponseDto Links retrieved.
2576
3544
  * @throws ApiError
2577
3545
  */
2578
- public static importerConfigControllerUpdateConfig(
2579
- data: ImporterConfigControllerUpdateConfigData
2580
- ): CancelablePromise<ImporterConfigControllerUpdateConfigResponse> {
3546
+ public static externalAccountLinkControllerFindAll(
3547
+ data: ExternalAccountLinkControllerFindAllData
3548
+ ): CancelablePromise<ExternalAccountLinkControllerFindAllResponse> {
2581
3549
  return __request(OpenAPI, {
2582
- method: 'PUT',
2583
- url: '/api/v1/{region}/bean/import/config/{importerId}',
3550
+ method: 'GET',
3551
+ url: '/api/v1/{region}/bean/external-account-links',
2584
3552
  path: {
2585
- importerId: data.importerId,
2586
3553
  region: data.region
2587
3554
  },
2588
- body: data.requestBody,
2589
- mediaType: 'application/json',
2590
- errors: {
2591
- 400: 'Invalid input - Validation failed',
2592
- 404: 'Configuration not found'
3555
+ query: {
3556
+ provider: data.provider
2593
3557
  }
2594
3558
  });
2595
3559
  }
2596
3560
 
2597
3561
  /**
2598
- * Reset configuration to default
2599
- * Resets the configuration for the specified importer to default values. This operation overwrites all existing configuration.
3562
+ * Get a single external account link
2600
3563
  * @param data The data for the request.
2601
- * @param data.importerId Importer identifier. Supported importers: alipay, alipay-web, wechat, boc, boc-credit, ccb, cmb, cmbc, cmbc-credit, icbc, icbc-credit, hsbc-hk-credit, hsbc-hk-debit
3564
+ * @param data.id
2602
3565
  * @param data.region Region code for tenant context
2603
- * @returns ImporterConfigDto Configuration reset successfully
3566
+ * @returns ExternalAccountLinkResponseDto Link retrieved.
2604
3567
  * @throws ApiError
2605
3568
  */
2606
- public static importerConfigControllerResetConfig(
2607
- data: ImporterConfigControllerResetConfigData
2608
- ): CancelablePromise<ImporterConfigControllerResetConfigResponse> {
3569
+ public static externalAccountLinkControllerFindOne(
3570
+ data: ExternalAccountLinkControllerFindOneData
3571
+ ): CancelablePromise<ExternalAccountLinkControllerFindOneResponse> {
2609
3572
  return __request(OpenAPI, {
2610
- method: 'POST',
2611
- url: '/api/v1/{region}/bean/import/config/{importerId}/reset',
3573
+ method: 'GET',
3574
+ url: '/api/v1/{region}/bean/external-account-links/{id}',
2612
3575
  path: {
2613
- importerId: data.importerId,
3576
+ id: data.id,
2614
3577
  region: data.region
2615
3578
  },
2616
3579
  errors: {
2617
- 400: 'Invalid input - Unsupported importer'
3580
+ 422: 'Link not found or not owned by the user.'
2618
3581
  }
2619
3582
  });
2620
3583
  }
2621
- }
2622
3584
 
2623
- export class BeanPlatformsService {
2624
3585
  /**
2625
- * Get all platforms with statistics
2626
- * @returns unknown List of platforms with binding and account counts
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.
2627
3591
  * @throws ApiError
2628
3592
  */
2629
- public static platformControllerFindAll(): CancelablePromise<PlatformControllerFindAllResponse> {
3593
+ public static externalAccountLinkControllerRemove(
3594
+ data: ExternalAccountLinkControllerRemoveData
3595
+ ): CancelablePromise<ExternalAccountLinkControllerRemoveResponse> {
2630
3596
  return __request(OpenAPI, {
2631
- method: 'GET',
2632
- url: '/api/v1/bean/platforms'
3597
+ method: 'DELETE',
3598
+ url: '/api/v1/{region}/bean/external-account-links/{id}',
3599
+ path: {
3600
+ id: data.id,
3601
+ region: data.region
3602
+ }
2633
3603
  });
2634
3604
  }
3605
+ }
2635
3606
 
3607
+ export class ImportTelemetryService {
2636
3608
  /**
2637
- * Create a new platform
3609
+ * Receive anonymous parser failure telemetry
2638
3610
  * @param data The data for the request.
3611
+ * @param data.region Region code for tenant context
2639
3612
  * @param data.requestBody
2640
- * @returns unknown Platform created successfully
3613
+ * @returns unknown Telemetry report received
2641
3614
  * @throws ApiError
2642
3615
  */
2643
- public static platformControllerCreate(
2644
- data: PlatformControllerCreateData
2645
- ): CancelablePromise<PlatformControllerCreateResponse> {
3616
+ public static telemetryControllerReportTelemetry(
3617
+ data: TelemetryControllerReportTelemetryData
3618
+ ): CancelablePromise<TelemetryControllerReportTelemetryResponse> {
2646
3619
  return __request(OpenAPI, {
2647
3620
  method: 'POST',
2648
- url: '/api/v1/bean/platforms',
3621
+ url: '/api/v1/{region}/bean/import/parser-telemetry',
3622
+ path: {
3623
+ region: data.region
3624
+ },
2649
3625
  body: data.requestBody,
2650
3626
  mediaType: 'application/json',
2651
3627
  errors: {
2652
- 409: 'Platform already exists'
3628
+ 401: 'Unauthorized'
2653
3629
  }
2654
3630
  });
2655
3631
  }
2656
3632
 
2657
3633
  /**
2658
- * Get platform list for current user
2659
- * @returns unknown List of platforms with user binding status
3634
+ * Receive anonymous zero-hit coverage miss report
3635
+ * @param data The data for the request.
3636
+ * @param data.region Region code for tenant context
3637
+ * @param data.requestBody
3638
+ * @returns unknown Coverage miss report received
2660
3639
  * @throws ApiError
2661
3640
  */
2662
- public static platformControllerGetPlatformList(): CancelablePromise<PlatformControllerGetPlatformListResponse> {
3641
+ public static telemetryControllerReportCoverageMiss(
3642
+ data: TelemetryControllerReportCoverageMissData
3643
+ ): CancelablePromise<TelemetryControllerReportCoverageMissResponse> {
2663
3644
  return __request(OpenAPI, {
2664
- method: 'GET',
2665
- url: '/api/v1/bean/platforms/list'
3645
+ method: 'POST',
3646
+ url: '/api/v1/{region}/bean/import/parser-coverage-miss',
3647
+ path: {
3648
+ region: data.region
3649
+ },
3650
+ body: data.requestBody,
3651
+ mediaType: 'application/json',
3652
+ errors: {
3653
+ 401: 'Unauthorized'
3654
+ }
2666
3655
  });
2667
3656
  }
2668
3657
 
2669
3658
  /**
2670
- * Match platforms by name or alias
3659
+ * Coverage metrics (uncovered format aggregation)
2671
3660
  * @param data The data for the request.
2672
- * @param data.q Search query — Chinese name, English name, or abbreviation
2673
- * @param data.region Region code for category override lookup
2674
- * @returns unknown List of matching platforms with suggested segment names
3661
+ * @param data.region Region code for tenant context
3662
+ * @param data.topN Top-N uncovered formats (default 10)
3663
+ * @returns unknown Coverage metrics
2675
3664
  * @throws ApiError
2676
3665
  */
2677
- public static platformControllerMatchPlatforms(
2678
- data: PlatformControllerMatchPlatformsData
2679
- ): CancelablePromise<PlatformControllerMatchPlatformsResponse> {
3666
+ public static telemetryControllerGetCoverageMetrics(
3667
+ data: TelemetryControllerGetCoverageMetricsData
3668
+ ): CancelablePromise<TelemetryControllerGetCoverageMetricsResponse> {
2680
3669
  return __request(OpenAPI, {
2681
3670
  method: 'GET',
2682
- url: '/api/v1/bean/platforms/match',
2683
- query: {
2684
- q: data.q,
3671
+ url: '/api/v1/{region}/bean/import/parser-coverage-metrics',
3672
+ path: {
2685
3673
  region: data.region
3674
+ },
3675
+ query: {
3676
+ topN: data.topN
2686
3677
  }
2687
3678
  });
2688
3679
  }
3680
+ }
2689
3681
 
3682
+ export class BeanNlpService {
2690
3683
  /**
2691
- * Update a platform
3684
+ * Process natural language input
3685
+ * Parse natural language text (Chinese/English) describing a transaction. Supports multi-turn dialogue for collecting missing information. When confidence < 0.75, returns "confirm" action requiring user verification. User can reply with confirmation words (确认/yes/ok) or provide corrections. Examples: "yesterday Starbucks spent 35 yuan", "today lunch 28 yuan", "spent $50 at Walmart"
2692
3686
  * @param data The data for the request.
2693
- * @param data.id Platform ID
2694
- * @param data.requestBody
2695
- * @returns unknown Platform updated successfully
3687
+ * @param data.region Region code for tenant context
3688
+ * @param data.requestBody Natural language transaction input with optional session ID
3689
+ * @returns NlpResponseDto NLP processing result - either created transaction or asking for more info
2696
3690
  * @throws ApiError
2697
3691
  */
2698
- public static platformControllerUpdate(
2699
- data: PlatformControllerUpdateData
2700
- ): CancelablePromise<PlatformControllerUpdateResponse> {
3692
+ public static nlpControllerProcessNaturalLanguage(
3693
+ data: NlpControllerProcessNaturalLanguageData
3694
+ ): CancelablePromise<NlpControllerProcessNaturalLanguageResponse> {
2701
3695
  return __request(OpenAPI, {
2702
- method: 'PUT',
2703
- url: '/api/v1/bean/platforms/{id}',
3696
+ method: 'POST',
3697
+ url: '/api/v1/{region}/bean/nlp/process',
2704
3698
  path: {
2705
- id: data.id
3699
+ region: data.region
2706
3700
  },
2707
3701
  body: data.requestBody,
2708
3702
  mediaType: 'application/json',
2709
3703
  errors: {
2710
- 404: 'Platform not found'
3704
+ 400: 'Invalid input',
3705
+ 401: 'Unauthorized'
2711
3706
  }
2712
3707
  });
2713
3708
  }
2714
3709
 
2715
3710
  /**
2716
- * Delete a platform
3711
+ * Clear dialogue session
3712
+ * Clear the current NLP dialogue session. Use this to cancel an ongoing multi-turn dialogue.
2717
3713
  * @param data The data for the request.
2718
- * @param data.id Platform ID
2719
- * @returns void Platform deleted successfully
3714
+ * @param data.region Region code for tenant context
3715
+ * @param data.sessionId Specific session ID to clear (defaults to user session)
3716
+ * @returns void Session cleared successfully
2720
3717
  * @throws ApiError
2721
3718
  */
2722
- public static platformControllerDelete(
2723
- data: PlatformControllerDeleteData
2724
- ): CancelablePromise<PlatformControllerDeleteResponse> {
3719
+ public static nlpControllerClearSession(
3720
+ data: NlpControllerClearSessionData
3721
+ ): CancelablePromise<NlpControllerClearSessionResponse> {
2725
3722
  return __request(OpenAPI, {
2726
3723
  method: 'DELETE',
2727
- url: '/api/v1/bean/platforms/{id}',
3724
+ url: '/api/v1/{region}/bean/nlp/session',
2728
3725
  path: {
2729
- id: data.id
3726
+ region: data.region
3727
+ },
3728
+ query: {
3729
+ sessionId: data.sessionId
2730
3730
  },
2731
3731
  errors: {
2732
- 404: 'Platform not found'
3732
+ 401: 'Unauthorized'
2733
3733
  }
2734
3734
  });
2735
3735
  }
2736
- }
2737
3736
 
2738
- export class ProviderSyncService {
2739
3737
  /**
2740
- * Sync transactions from financial data provider
2741
- *
2742
- * Accepts raw transactions from external financial data providers, transforms them to Beancount format, and processes them through the ingestion pipeline.
2743
- *
2744
- * **Supported Providers:**
2745
- * - **plaid**: Plaid API (US, Canada, Europe)
2746
- * - **teller**: Teller API (US)
2747
- * - **truelayer**: TrueLayer Open Banking (UK, Europe)
2748
- * - **gocardless**: GoCardless Bank Account Data (Europe)
2749
- * - **simplefin**: SimpleFIN (Self-hosted)
2750
- * - **yodlee**: Yodlee (Global)
2751
- * - **beancount-direct**: Beancount format transactions
2752
- * - **parsed-bill**: Client-side parsed bill transactions
2753
- *
2754
- * **Processing Flow:**
2755
- * 1. Transform raw data via provider adapter
2756
- * 2. Validate transaction format
2757
- * 3. Deduplicate using originalId
2758
- * 4. Classify using rule engine
2759
- * 5. Route low-confidence to Review Center
2760
- * 6. Persist validated transactions
2761
- *
3738
+ * Get current session state
3739
+ * Get the current NLP dialogue session state. Useful for debugging and displaying session context in UI.
2762
3740
  * @param data The data for the request.
2763
- * @param data.providerName Provider name
2764
- * @param data.region Region code
2765
- * @param data.requestBody
2766
- * @returns ProviderSyncResponseDto Sync completed successfully
3741
+ * @param data.region Region code for tenant context
3742
+ * @param data.sessionId Specific session ID to get (defaults to user session)
3743
+ * @returns unknown Current session state (or null if no active session)
2767
3744
  * @throws ApiError
2768
3745
  */
2769
- public static providerSyncControllerSync(
2770
- data: ProviderSyncControllerSyncData
2771
- ): CancelablePromise<ProviderSyncControllerSyncResponse> {
3746
+ public static nlpControllerGetSession(
3747
+ data: NlpControllerGetSessionData
3748
+ ): CancelablePromise<NlpControllerGetSessionResponse> {
2772
3749
  return __request(OpenAPI, {
2773
- method: 'POST',
2774
- url: '/api/v1/{region}/bean/import/provider/{providerName}/sync',
3750
+ method: 'GET',
3751
+ url: '/api/v1/{region}/bean/nlp/session',
2775
3752
  path: {
2776
- providerName: data.providerName,
2777
3753
  region: data.region
2778
3754
  },
2779
- body: data.requestBody,
2780
- mediaType: 'application/json',
3755
+ query: {
3756
+ sessionId: data.sessionId
3757
+ },
2781
3758
  errors: {
2782
- 400: 'Invalid request data',
2783
- 401: 'Missing or invalid authentication',
2784
- 404: 'Provider not supported'
3759
+ 401: 'Unauthorized'
2785
3760
  }
2786
3761
  });
2787
3762
  }
3763
+ }
2788
3764
 
3765
+ export class BeanPlatformsService {
2789
3766
  /**
2790
- * Get supported providers
2791
- * Returns a list of all providers supported by the sync endpoint.
2792
- * @param data The data for the request.
2793
- * @param data.region Region code for tenant context
2794
- * @returns SupportedProvidersResponseDto List of supported providers
3767
+ * Get all platforms with statistics
3768
+ * @returns unknown List of platforms with binding and account counts
2795
3769
  * @throws ApiError
2796
3770
  */
2797
- public static providerSyncControllerGetSupportedProviders(
2798
- data: ProviderSyncControllerGetSupportedProvidersData
2799
- ): CancelablePromise<ProviderSyncControllerGetSupportedProvidersResponse> {
3771
+ public static platformControllerFindAll(): CancelablePromise<PlatformControllerFindAllResponse> {
2800
3772
  return __request(OpenAPI, {
2801
3773
  method: 'GET',
2802
- url: '/api/v1/{region}/bean/import/provider/supported',
2803
- path: {
2804
- region: data.region
2805
- },
3774
+ url: '/api/v1/bean/platforms'
3775
+ });
3776
+ }
3777
+
3778
+ /**
3779
+ * Create a new platform
3780
+ * @param data The data for the request.
3781
+ * @param data.requestBody
3782
+ * @returns unknown Platform created successfully
3783
+ * @throws ApiError
3784
+ */
3785
+ public static platformControllerCreate(
3786
+ data: PlatformControllerCreateData
3787
+ ): CancelablePromise<PlatformControllerCreateResponse> {
3788
+ return __request(OpenAPI, {
3789
+ method: 'POST',
3790
+ url: '/api/v1/bean/platforms',
3791
+ body: data.requestBody,
3792
+ mediaType: 'application/json',
2806
3793
  errors: {
2807
- 401: 'Missing or invalid authentication'
3794
+ 409: 'Platform already exists'
2808
3795
  }
2809
3796
  });
2810
3797
  }
2811
3798
 
2812
3799
  /**
2813
- * Check if provider is supported
2814
- * Returns whether a specific provider is supported.
3800
+ * Get platform list for current user
2815
3801
  * @param data The data for the request.
2816
- * @param data.providerName Provider name to check
2817
- * @param data.region Region code for tenant context
2818
- * @returns unknown Provider support status
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
2819
3804
  * @throws ApiError
2820
3805
  */
2821
- public static providerSyncControllerIsProviderSupported(
2822
- data: ProviderSyncControllerIsProviderSupportedData
2823
- ): CancelablePromise<ProviderSyncControllerIsProviderSupportedResponse> {
3806
+ public static platformControllerGetPlatformList(
3807
+ data: PlatformControllerGetPlatformListData = {}
3808
+ ): CancelablePromise<PlatformControllerGetPlatformListResponse> {
2824
3809
  return __request(OpenAPI, {
2825
3810
  method: 'GET',
2826
- url: '/api/v1/{region}/bean/import/provider/{providerName}/supported',
2827
- path: {
2828
- providerName: data.providerName,
3811
+ url: '/api/v1/bean/platforms/list',
3812
+ query: {
2829
3813
  region: data.region
2830
- },
2831
- errors: {
2832
- 401: 'Missing or invalid authentication'
2833
3814
  }
2834
3815
  });
2835
3816
  }
2836
- }
2837
3817
 
2838
- export class ImportTelemetryService {
2839
3818
  /**
2840
- * Receive anonymous parser failure telemetry
3819
+ * Match platforms by name or alias
2841
3820
  * @param data The data for the request.
2842
- * @param data.region Region code for tenant context
2843
- * @param data.requestBody
2844
- * @returns unknown Telemetry report received
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
2845
3824
  * @throws ApiError
2846
3825
  */
2847
- public static telemetryControllerReportTelemetry(
2848
- data: TelemetryControllerReportTelemetryData
2849
- ): CancelablePromise<TelemetryControllerReportTelemetryResponse> {
3826
+ public static platformControllerMatchPlatforms(
3827
+ data: PlatformControllerMatchPlatformsData
3828
+ ): CancelablePromise<PlatformControllerMatchPlatformsResponse> {
2850
3829
  return __request(OpenAPI, {
2851
- method: 'POST',
2852
- url: '/api/v1/{region}/bean/import/parser-telemetry',
2853
- path: {
3830
+ method: 'GET',
3831
+ url: '/api/v1/bean/platforms/match',
3832
+ query: {
3833
+ q: data.q,
2854
3834
  region: data.region
2855
- },
2856
- body: data.requestBody,
2857
- mediaType: 'application/json',
2858
- errors: {
2859
- 401: 'Unauthorized'
2860
3835
  }
2861
3836
  });
2862
3837
  }
2863
- }
2864
3838
 
2865
- export class BeanNlpService {
2866
3839
  /**
2867
- * Process natural language input
2868
- * Parse natural language text (Chinese/English) describing a transaction. Supports multi-turn dialogue for collecting missing information. When confidence < 0.75, returns "confirm" action requiring user verification. User can reply with confirmation words (确认/yes/ok) or provide corrections. Examples: "yesterday Starbucks spent 35 yuan", "today lunch 28 yuan", "spent $50 at Walmart"
3840
+ * Get the region and candidate account standards for a platform
2869
3841
  * @param data The data for the request.
2870
- * @param data.region Region code for tenant context
2871
- * @param data.requestBody Natural language transaction input with optional session ID
2872
- * @returns NlpResponseDto NLP processing result - either created transaction or asking for more info
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)
2873
3846
  * @throws ApiError
2874
3847
  */
2875
- public static nlpControllerProcessNaturalLanguage(
2876
- data: NlpControllerProcessNaturalLanguageData
2877
- ): CancelablePromise<NlpControllerProcessNaturalLanguageResponse> {
3848
+ public static platformControllerGetPlatformStandards(
3849
+ data: PlatformControllerGetPlatformStandardsData
3850
+ ): CancelablePromise<PlatformControllerGetPlatformStandardsResponse> {
2878
3851
  return __request(OpenAPI, {
2879
- method: 'POST',
2880
- url: '/api/v1/{region}/bean/nlp/process',
3852
+ method: 'GET',
3853
+ url: '/api/v1/bean/platforms/{id}/standards',
2881
3854
  path: {
2882
- region: data.region
3855
+ id: data.id
2883
3856
  },
2884
- body: data.requestBody,
2885
- mediaType: 'application/json',
2886
- errors: {
2887
- 400: 'Invalid input',
2888
- 401: 'Unauthorized'
3857
+ query: {
3858
+ region: data.region,
3859
+ type: data.type
2889
3860
  }
2890
3861
  });
2891
3862
  }
2892
3863
 
2893
3864
  /**
2894
- * Clear dialogue session
2895
- * Clear the current NLP dialogue session. Use this to cancel an ongoing multi-turn dialogue.
3865
+ * Update a platform
2896
3866
  * @param data The data for the request.
2897
- * @param data.region Region code for tenant context
2898
- * @param data.sessionId Specific session ID to clear (defaults to user session)
2899
- * @returns void Session cleared successfully
3867
+ * @param data.id Platform ID
3868
+ * @param data.requestBody
3869
+ * @returns unknown Platform updated successfully
2900
3870
  * @throws ApiError
2901
3871
  */
2902
- public static nlpControllerClearSession(
2903
- data: NlpControllerClearSessionData
2904
- ): CancelablePromise<NlpControllerClearSessionResponse> {
3872
+ public static platformControllerUpdate(
3873
+ data: PlatformControllerUpdateData
3874
+ ): CancelablePromise<PlatformControllerUpdateResponse> {
2905
3875
  return __request(OpenAPI, {
2906
- method: 'DELETE',
2907
- url: '/api/v1/{region}/bean/nlp/session',
3876
+ method: 'PUT',
3877
+ url: '/api/v1/bean/platforms/{id}',
2908
3878
  path: {
2909
- region: data.region
2910
- },
2911
- query: {
2912
- sessionId: data.sessionId
3879
+ id: data.id
2913
3880
  },
3881
+ body: data.requestBody,
3882
+ mediaType: 'application/json',
2914
3883
  errors: {
2915
- 401: 'Unauthorized'
3884
+ 404: 'Platform not found'
2916
3885
  }
2917
3886
  });
2918
3887
  }
2919
3888
 
2920
3889
  /**
2921
- * Get current session state
2922
- * Get the current NLP dialogue session state. Useful for debugging and displaying session context in UI.
3890
+ * Delete a platform
2923
3891
  * @param data The data for the request.
2924
- * @param data.region Region code for tenant context
2925
- * @param data.sessionId Specific session ID to get (defaults to user session)
2926
- * @returns unknown Current session state (or null if no active session)
3892
+ * @param data.id Platform ID
3893
+ * @returns void Platform deleted successfully
2927
3894
  * @throws ApiError
2928
3895
  */
2929
- public static nlpControllerGetSession(
2930
- data: NlpControllerGetSessionData
2931
- ): CancelablePromise<NlpControllerGetSessionResponse> {
3896
+ public static platformControllerDelete(
3897
+ data: PlatformControllerDeleteData
3898
+ ): CancelablePromise<PlatformControllerDeleteResponse> {
2932
3899
  return __request(OpenAPI, {
2933
- method: 'GET',
2934
- url: '/api/v1/{region}/bean/nlp/session',
3900
+ method: 'DELETE',
3901
+ url: '/api/v1/bean/platforms/{id}',
2935
3902
  path: {
2936
- region: data.region
2937
- },
2938
- query: {
2939
- sessionId: data.sessionId
3903
+ id: data.id
2940
3904
  },
2941
3905
  errors: {
2942
- 401: 'Unauthorized'
3906
+ 404: 'Platform not found'
2943
3907
  }
2944
3908
  });
2945
3909
  }
@@ -2980,6 +3944,7 @@ export class DashboardService {
2980
3944
  * @param data.region Region code for tenant context
2981
3945
  * @param data.groupBy Grouping strategy
2982
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)
2983
3948
  * @returns unknown Accounts retrieved successfully. Response type depends on groupBy parameter.
2984
3949
  * @throws ApiError
2985
3950
  */
@@ -2994,7 +3959,8 @@ export class DashboardService {
2994
3959
  },
2995
3960
  query: {
2996
3961
  groupBy: data.groupBy,
2997
- date: data.date
3962
+ date: data.date,
3963
+ accountId: data.accountId
2998
3964
  },
2999
3965
  errors: {
3000
3966
  401: 'User not authenticated'
@@ -3029,124 +3995,97 @@ export class DashboardService {
3029
3995
  }
3030
3996
  });
3031
3997
  }
3032
- }
3033
3998
 
3034
- export class ReportingService {
3035
3999
  /**
3036
- * Get portfolio value trends
3037
- *
3038
- * Returns time series data of portfolio net worth.
3039
- *
3040
- * **Multi-currency Support:**
3041
- * - `series[].byCurrency` - Currency breakdown for each data point
3042
- * - `byCurrency` - Separate time series grouped by currency
3043
- * - `warnings` - Exchange rate warnings if conversion failed
3044
- *
3045
- * **Parameters:**
3046
- * - `period`: Time period (1m, 3m, 6m, 1y)
3047
- * - `granularity`: Data granularity (day, week, month)
3048
- *
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)
3049
4002
  * @param data The data for the request.
3050
4003
  * @param data.region Region code for tenant context
3051
- * @param data.period Time period
3052
- * @param data.granularity Data granularity
3053
- * @returns PortfolioTrendsResponseDto Trends retrieved successfully
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
3054
4008
  * @throws ApiError
3055
4009
  */
3056
- public static reportingControllerGetPortfolioTrends(
3057
- data: ReportingControllerGetPortfolioTrendsData
3058
- ): CancelablePromise<ReportingControllerGetPortfolioTrendsResponse> {
4010
+ public static dashboardControllerGetExpenses(
4011
+ data: DashboardControllerGetExpensesData
4012
+ ): CancelablePromise<DashboardControllerGetExpensesResponse> {
3059
4013
  return __request(OpenAPI, {
3060
4014
  method: 'GET',
3061
- url: '/api/v1/{region}/reporting/portfolio/trends',
4015
+ url: '/api/v1/{region}/dashboard/expenses',
3062
4016
  path: {
3063
4017
  region: data.region
3064
4018
  },
3065
4019
  query: {
4020
+ groupBy: data.groupBy,
3066
4021
  period: data.period,
3067
- granularity: data.granularity
4022
+ flow: data.flow
3068
4023
  },
3069
4024
  errors: {
4025
+ 400: 'Invalid groupBy or period',
3070
4026
  401: 'User not authenticated'
3071
4027
  }
3072
4028
  });
3073
4029
  }
3074
4030
 
3075
4031
  /**
3076
- * Generate portfolio snapshot
3077
- *
3078
- * Manually generate a portfolio snapshot for a specific date.
3079
- *
3080
- * **Multi-currency Support:**
3081
- * - Fetches balances grouped by currency
3082
- * - Uses user's baseCurrency setting for conversion
3083
- * - Stores exchange rates and warnings
3084
- *
3085
- * **Use Cases:**
3086
- * - Testing snapshot generation
3087
- * - Force regeneration after data correction
3088
- * - Initial setup for new users
3089
- *
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
3090
4034
  * @param data The data for the request.
3091
4035
  * @param data.region Region code for tenant context
3092
- * @param data.requestBody Optional date (defaults to today)
3093
- * @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
3094
4038
  * @throws ApiError
3095
4039
  */
3096
- public static reportingControllerGenerateSnapshot(
3097
- data: ReportingControllerGenerateSnapshotData
3098
- ): CancelablePromise<ReportingControllerGenerateSnapshotResponse> {
4040
+ public static dashboardControllerGetAdvisorContext(
4041
+ data: DashboardControllerGetAdvisorContextData
4042
+ ): CancelablePromise<DashboardControllerGetAdvisorContextResponse> {
3099
4043
  return __request(OpenAPI, {
3100
- method: 'POST',
3101
- url: '/api/v1/{region}/reporting/snapshots/generate',
4044
+ method: 'GET',
4045
+ url: '/api/v1/{region}/dashboard/advisor-context',
3102
4046
  path: {
3103
4047
  region: data.region
3104
4048
  },
3105
- body: data.requestBody,
3106
- mediaType: 'application/json',
4049
+ query: {
4050
+ date: data.date
4051
+ },
3107
4052
  errors: {
3108
4053
  400: 'Invalid date format',
3109
- 401: 'User not authenticated'
4054
+ 401: 'User not authenticated, or the token is not advisor-scoped (exchange via POST /auth/sessions/advisor, #1512)'
3110
4055
  }
3111
4056
  });
3112
4057
  }
4058
+ }
3113
4059
 
4060
+ export class InvestmentService {
3114
4061
  /**
3115
- * Backfill portfolio snapshots
3116
- *
3117
- * Generate snapshots for a date range (historical data backfill).
3118
- *
3119
- * **Multi-currency Support:**
3120
- * - Each snapshot includes multi-currency data
3121
- * - Uses exchange rates available at generation time
3122
- * - Warnings stored for missing exchange rates
3123
- *
3124
- * **Best Practices:**
3125
- * - Use for initial setup after account configuration
3126
- * - Run during low-traffic periods for large date ranges
3127
- * - Existing snapshots are skipped (not regenerated)
3128
- *
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).
3129
4064
  * @param data The data for the request.
3130
4065
  * @param data.region Region code for tenant context
3131
- * @param data.requestBody
3132
- * @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
3133
4070
  * @throws ApiError
3134
4071
  */
3135
- public static reportingControllerBackfillSnapshots(
3136
- data: ReportingControllerBackfillSnapshotsData
3137
- ): CancelablePromise<ReportingControllerBackfillSnapshotsResponse> {
4072
+ public static holdingPnlControllerGetHoldingPnl(
4073
+ data: HoldingPnlControllerGetHoldingPnlData
4074
+ ): CancelablePromise<HoldingPnlControllerGetHoldingPnlResponse> {
3138
4075
  return __request(OpenAPI, {
3139
- method: 'POST',
3140
- url: '/api/v1/{region}/reporting/snapshots/backfill',
4076
+ method: 'GET',
4077
+ url: '/api/v1/{region}/investment/holdings/pnl',
3141
4078
  path: {
3142
4079
  region: data.region
3143
4080
  },
3144
- body: data.requestBody,
3145
- mediaType: 'application/json',
4081
+ query: {
4082
+ asOf: data.asOf,
4083
+ accountId: data.accountId,
4084
+ method: data.method
4085
+ },
3146
4086
  errors: {
3147
- 400: 'Invalid date format or range',
3148
- 401: 'User not authenticated',
3149
- 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'
3150
4089
  }
3151
4090
  });
3152
4091
  }
@@ -3175,7 +4114,7 @@ export class AuthService {
3175
4114
  * Anonymous login with access token
3176
4115
  * @param data The data for the request.
3177
4116
  * @param data.requestBody
3178
- * @returns unknown Login successful
4117
+ * @returns AnonymousLoginResponseDto Login successful
3179
4118
  * @throws ApiError
3180
4119
  */
3181
4120
  public static authControllerAccessTokenLogin(
@@ -3191,17 +4130,75 @@ export class AuthService {
3191
4130
  }
3192
4131
  });
3193
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
+ }
3194
4186
  }
3195
4187
 
3196
- export class DefaultService {
4188
+ export class AdminCacheService {
3197
4189
  /**
3198
- * @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
3199
4193
  * @throws ApiError
3200
4194
  */
3201
4195
  public static cacheControllerFlushCache(): CancelablePromise<CacheControllerFlushCacheResponse> {
3202
4196
  return __request(OpenAPI, {
3203
4197
  method: 'POST',
3204
- url: '/api/v1/cache/flush'
4198
+ url: '/api/v1/cache/flush',
4199
+ errors: {
4200
+ 403: 'Admin access required'
4201
+ }
3205
4202
  });
3206
4203
  }
3207
4204
  }
@@ -3362,3 +4359,53 @@ export class InfoService {
3362
4359
  });
3363
4360
  }
3364
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
+ }