@firela/api-types 0.0.0-canary.209967 → 0.0.0-canary.20e5bd10

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,22 +17,30 @@ import type {
17
17
  AccountControllerCloseResponse,
18
18
  AccountControllerReopenData,
19
19
  AccountControllerReopenResponse,
20
+ AccountControllerAddOpeningBalanceData,
21
+ AccountControllerAddOpeningBalanceResponse,
22
+ AccountStandardsControllerGetTemplatesData,
23
+ AccountStandardsControllerGetTemplatesResponse,
24
+ AccountStandardsControllerGetTemplateMetadataData,
25
+ AccountStandardsControllerGetTemplateMetadataResponse,
26
+ AccountStandardsControllerGetRegionsData,
27
+ AccountStandardsControllerGetRegionsResponse,
20
28
  TransactionControllerCreateData,
21
29
  TransactionControllerCreateResponse,
22
30
  TransactionControllerListData,
23
31
  TransactionControllerListResponse,
24
- TransactionControllerData,
25
- TransactionControllerResponse,
32
+ TransactionControllerCreateBatchData,
33
+ TransactionControllerCreateBatchResponse,
34
+ TransactionControllerCorrectData,
35
+ TransactionControllerCorrectResponse,
36
+ TransactionControllerSuggestTagsData,
37
+ TransactionControllerSuggestTagsResponse,
26
38
  TransactionControllerGetDetailData,
27
39
  TransactionControllerGetDetailResponse,
28
40
  TransactionControllerUpdateData,
29
41
  TransactionControllerUpdateResponse,
30
- TransactionController1Data,
31
- TransactionController1Response,
32
- AccountStandardsControllerGetTemplatesData,
33
- AccountStandardsControllerGetTemplatesResponse,
34
- AccountStandardsControllerGetRegionsData,
35
- AccountStandardsControllerGetRegionsResponse,
42
+ TransactionControllerDeleteData,
43
+ TransactionControllerDeleteResponse,
36
44
  BalanceControllerGetBalanceData,
37
45
  BalanceControllerGetBalanceResponse,
38
46
  BalanceControllerGetMultiCurrencyBalanceData,
@@ -43,14 +51,14 @@ import type {
43
51
  ReviewControllerGetStatsResponse,
44
52
  ReviewControllerFindOneData,
45
53
  ReviewControllerFindOneResponse,
46
- ReviewControllerData,
47
- ReviewControllerResponse,
48
- ReviewController1Data,
49
- ReviewController1Response,
50
- ReviewController2Data,
51
- ReviewController2Response,
52
- PayeeControllerData,
53
- PayeeControllerResponse,
54
+ ReviewControllerResolveData,
55
+ ReviewControllerResolveResponse,
56
+ ReviewControllerUndoData,
57
+ ReviewControllerUndoResponse,
58
+ ReviewControllerBatchResolveData,
59
+ ReviewControllerBatchResolveResponse,
60
+ PayeeControllerCreateData,
61
+ PayeeControllerCreateResponse,
54
62
  PayeeControllerFindAllData,
55
63
  PayeeControllerFindAllResponse,
56
64
  PayeeControllerAutocompleteData,
@@ -59,50 +67,62 @@ import type {
59
67
  PayeeControllerGetTopPayeesResponse,
60
68
  PayeeControllerFindOneData,
61
69
  PayeeControllerFindOneResponse,
62
- PayeeController1Data,
63
- PayeeController1Response,
64
- PayeeController2Data,
65
- PayeeController2Response,
66
- PayeeProfileAdminControllerData,
67
- PayeeProfileAdminControllerResponse,
70
+ PayeeControllerUpdateData,
71
+ PayeeControllerUpdateResponse,
72
+ PayeeControllerDeleteData,
73
+ PayeeControllerDeleteResponse,
74
+ PayeeProfileAdminControllerCreateData,
75
+ PayeeProfileAdminControllerCreateResponse,
68
76
  PayeeProfileAdminControllerFindAllData,
69
77
  PayeeProfileAdminControllerFindAllResponse,
70
78
  PayeeProfileAdminControllerFindOneData,
71
79
  PayeeProfileAdminControllerFindOneResponse,
72
- PayeeProfileAdminController1Data,
73
- PayeeProfileAdminController1Response,
74
- PayeeProfileAdminController2Data,
75
- PayeeProfileAdminController2Response,
76
- PayeeProfileAdminController3Data,
77
- PayeeProfileAdminController3Response,
78
- PayeeProfileAdminController4Data,
79
- PayeeProfileAdminController4Response,
80
- CommodityControllerData,
81
- CommodityControllerResponse,
80
+ PayeeProfileAdminControllerUpdateData,
81
+ PayeeProfileAdminControllerUpdateResponse,
82
+ PayeeProfileAdminControllerDeleteData,
83
+ PayeeProfileAdminControllerDeleteResponse,
84
+ PayeeProfileAdminControllerVerifyData,
85
+ PayeeProfileAdminControllerVerifyResponse,
86
+ PayeeProfileAdminControllerUnverifyData,
87
+ PayeeProfileAdminControllerUnverifyResponse,
88
+ CommodityControllerCreateData,
89
+ CommodityControllerCreateResponse,
82
90
  CommodityControllerFindAllData,
83
91
  CommodityControllerFindAllResponse,
84
92
  CommodityControllerFindOneData,
85
93
  CommodityControllerFindOneResponse,
86
- CommodityController1Data,
87
- CommodityController1Response,
88
- CommodityController2Data,
89
- CommodityController2Response,
90
- CommodityController3Data,
91
- CommodityController3Response,
92
- CommodityController4Data,
93
- CommodityController4Response,
94
- RecurringRuleControllerData,
95
- RecurringRuleControllerResponse,
94
+ CommodityControllerUpdateData,
95
+ CommodityControllerUpdateResponse,
96
+ CommodityControllerDeleteData,
97
+ CommodityControllerDeleteResponse,
98
+ CommodityControllerGetOrCreateData,
99
+ CommodityControllerGetOrCreateResponse,
100
+ CommodityControllerBulkCreateData,
101
+ CommodityControllerBulkCreateResponse,
102
+ PriceControllerCreateData,
103
+ PriceControllerCreateResponse,
104
+ PriceControllerFindAllData,
105
+ PriceControllerFindAllResponse,
106
+ PriceControllerFindOneData,
107
+ PriceControllerFindOneResponse,
108
+ PriceControllerUpdateData,
109
+ PriceControllerUpdateResponse,
110
+ PriceControllerDeleteData,
111
+ PriceControllerDeleteResponse,
112
+ PriceControllerBulkCreateData,
113
+ PriceControllerBulkCreateResponse,
114
+ RecurringRuleControllerCreateData,
115
+ RecurringRuleControllerCreateResponse,
96
116
  RecurringRuleControllerFindAllData,
97
117
  RecurringRuleControllerFindAllResponse,
98
- RecurringRuleController1Data,
99
- RecurringRuleController1Response,
118
+ RecurringRuleControllerCreateFromTransactionData,
119
+ RecurringRuleControllerCreateFromTransactionResponse,
100
120
  RecurringRuleControllerFindOneData,
101
121
  RecurringRuleControllerFindOneResponse,
102
- RecurringRuleController2Data,
103
- RecurringRuleController2Response,
104
- RecurringRuleController3Data,
105
- RecurringRuleController3Response,
122
+ RecurringRuleControllerUpdateData,
123
+ RecurringRuleControllerUpdateResponse,
124
+ RecurringRuleControllerDeleteData,
125
+ RecurringRuleControllerDeleteResponse,
106
126
  RecurringRuleControllerGetWithStatsData,
107
127
  RecurringRuleControllerGetWithStatsResponse,
108
128
  ExpectedTransactionControllerFindAllData,
@@ -111,38 +131,26 @@ import type {
111
131
  ExpectedTransactionControllerFindOverdueResponse,
112
132
  ExpectedTransactionControllerFindOneData,
113
133
  ExpectedTransactionControllerFindOneResponse,
114
- ExpectedTransactionControllerData,
115
- ExpectedTransactionControllerResponse,
116
- ExpectedTransactionController1Data,
117
- ExpectedTransactionController1Response,
118
- ExpectedTransactionController2Data,
119
- ExpectedTransactionController2Response,
120
- ExpectedTransactionController3Data,
121
- ExpectedTransactionController3Response,
122
- ExpectedTransactionController4Data,
123
- ExpectedTransactionController4Response,
134
+ ExpectedTransactionControllerSkipData,
135
+ ExpectedTransactionControllerSkipResponse,
136
+ ExpectedTransactionControllerUndoSkipData,
137
+ ExpectedTransactionControllerUndoSkipResponse,
138
+ ExpectedTransactionControllerConfirmMatchData,
139
+ ExpectedTransactionControllerConfirmMatchResponse,
140
+ ExpectedTransactionControllerUnmatchData,
141
+ ExpectedTransactionControllerUnmatchResponse,
142
+ ExpectedTransactionControllerEnterNowData,
143
+ ExpectedTransactionControllerEnterNowResponse,
124
144
  ForecastControllerGetForecastData,
125
145
  ForecastControllerGetForecastResponse,
126
- TransactionRuleControllerData,
127
- TransactionRuleControllerResponse,
128
- TransactionRuleControllerListData,
129
- TransactionRuleControllerListResponse,
130
- TransactionRuleControllerValidateData,
131
- TransactionRuleControllerValidateResponse,
132
- TransactionRuleController1Data,
133
- TransactionRuleController1Response,
134
- TransactionRuleControllerExportData,
135
- TransactionRuleControllerExportResponse,
136
- TransactionRuleControllerGetStatisticsData,
137
- TransactionRuleControllerGetStatisticsResponse,
138
- TransactionRuleControllerGetDetailData,
139
- TransactionRuleControllerGetDetailResponse,
140
- TransactionRuleController2Data,
141
- TransactionRuleController2Response,
142
- TransactionRuleController3Data,
143
- TransactionRuleController3Response,
144
- TransactionRuleControllerTestData,
145
- TransactionRuleControllerTestResponse,
146
+ ReportingControllerGetPortfolioTrendsData,
147
+ ReportingControllerGetPortfolioTrendsResponse,
148
+ ReportingControllerGetCashFlowTrendsData,
149
+ ReportingControllerGetCashFlowTrendsResponse,
150
+ ReportingControllerGenerateSnapshotData,
151
+ ReportingControllerGenerateSnapshotResponse,
152
+ ReportingControllerBackfillSnapshotsData,
153
+ ReportingControllerBackfillSnapshotsResponse,
146
154
  UserControllerDeleteOwnUserData,
147
155
  UserControllerDeleteOwnUserResponse,
148
156
  UserControllerGetUserData,
@@ -157,104 +165,137 @@ import type {
157
165
  UserControllerUpdateUserSettingResponse,
158
166
  UserControllerGetAllUserSettingsByPageData,
159
167
  UserControllerGetAllUserSettingsByPageResponse,
160
- UserControllerGetAssetLiabilitySummaryData,
161
168
  UserControllerGetAssetLiabilitySummaryResponse,
162
- PropertyControllerGetAllData,
163
169
  PropertyControllerGetAllResponse,
164
170
  PropertyControllerGetByKeyData,
165
171
  PropertyControllerGetByKeyResponse,
166
- PropertyControllerData,
167
- PropertyControllerResponse,
168
- PropertyController1Data,
169
- PropertyController1Response,
172
+ PropertyControllerUpdateData,
173
+ PropertyControllerUpdateResponse,
174
+ PropertyControllerDeleteData,
175
+ PropertyControllerDeleteResponse,
176
+ TransactionRuleControllerCreateData,
177
+ TransactionRuleControllerCreateResponse,
178
+ TransactionRuleControllerListData,
179
+ TransactionRuleControllerListResponse,
180
+ TransactionRuleControllerValidateData,
181
+ TransactionRuleControllerValidateResponse,
182
+ TransactionRuleControllerBulkCreateData,
183
+ TransactionRuleControllerBulkCreateResponse,
184
+ TransactionRuleControllerExportData,
185
+ TransactionRuleControllerExportResponse,
186
+ TransactionRuleControllerGetStatisticsData,
187
+ TransactionRuleControllerGetStatisticsResponse,
188
+ TransactionRuleControllerGetDetailData,
189
+ TransactionRuleControllerGetDetailResponse,
190
+ TransactionRuleControllerUpdateData,
191
+ TransactionRuleControllerUpdateResponse,
192
+ TransactionRuleControllerDeleteData,
193
+ TransactionRuleControllerDeleteResponse,
194
+ TransactionRuleControllerTestData,
195
+ TransactionRuleControllerTestResponse,
196
+ CategoryCatalogControllerListData,
197
+ CategoryCatalogControllerListResponse,
198
+ EventControllerCreateData,
199
+ EventControllerCreateResponse,
200
+ EventControllerFindAllData,
201
+ EventControllerFindAllResponse,
202
+ EventControllerFindOneData,
203
+ EventControllerFindOneResponse,
204
+ EventControllerUpdateData,
205
+ EventControllerUpdateResponse,
206
+ EventControllerDeleteData,
207
+ EventControllerDeleteResponse,
208
+ EventControllerGetSliceData,
209
+ EventControllerGetSliceResponse,
210
+ OnboardingControllerBootstrapData,
211
+ OnboardingControllerBootstrapResponse,
212
+ ReconciliationControllerComputeData,
213
+ ReconciliationControllerComputeResponse,
214
+ ReconciliationControllerAssertData,
215
+ ReconciliationControllerAssertResponse,
216
+ ReconciliationControllerPadData,
217
+ ReconciliationControllerPadResponse,
218
+ ReconciliationControllerHistoryData,
219
+ ReconciliationControllerHistoryResponse,
220
+ ExportControllerExportBeancountResponse,
170
221
  FileImportControllerImportFileData,
171
222
  FileImportControllerImportFileResponse,
172
223
  FileImportControllerIdentifyFileData,
173
224
  FileImportControllerIdentifyFileResponse,
225
+ FileImportControllerImportBeancountData,
226
+ FileImportControllerImportBeancountResponse,
174
227
  ImporterConfigControllerGetConfigData,
175
228
  ImporterConfigControllerGetConfigResponse,
176
- ImporterConfigControllerData,
177
- ImporterConfigControllerResponse,
178
- ImporterConfigController1Data,
179
- ImporterConfigController1Response,
229
+ ImporterConfigControllerUpdateConfigData,
230
+ ImporterConfigControllerUpdateConfigResponse,
231
+ ImporterConfigControllerResetConfigData,
232
+ ImporterConfigControllerResetConfigResponse,
180
233
  ProviderSyncControllerSyncData,
181
234
  ProviderSyncControllerSyncResponse,
182
235
  ProviderSyncControllerGetSupportedProvidersData,
183
236
  ProviderSyncControllerGetSupportedProvidersResponse,
184
237
  ProviderSyncControllerIsProviderSupportedData,
185
238
  ProviderSyncControllerIsProviderSupportedResponse,
239
+ ExternalAccountLinkControllerCreateData,
240
+ ExternalAccountLinkControllerCreateResponse,
241
+ ExternalAccountLinkControllerFindAllData,
242
+ ExternalAccountLinkControllerFindAllResponse,
243
+ ExternalAccountLinkControllerFindOneData,
244
+ ExternalAccountLinkControllerFindOneResponse,
245
+ ExternalAccountLinkControllerRemoveData,
246
+ ExternalAccountLinkControllerRemoveResponse,
247
+ TelemetryControllerReportTelemetryData,
248
+ TelemetryControllerReportTelemetryResponse,
249
+ TelemetryControllerReportCoverageMissData,
250
+ TelemetryControllerReportCoverageMissResponse,
251
+ TelemetryControllerGetCoverageMetricsData,
252
+ TelemetryControllerGetCoverageMetricsResponse,
186
253
  NlpControllerProcessNaturalLanguageData,
187
254
  NlpControllerProcessNaturalLanguageResponse,
188
255
  NlpControllerClearSessionData,
189
256
  NlpControllerClearSessionResponse,
190
257
  NlpControllerGetSessionData,
191
258
  NlpControllerGetSessionResponse,
192
- PlatformControllerFindAllData,
193
259
  PlatformControllerFindAllResponse,
194
- PlatformControllerData,
195
- PlatformControllerResponse,
260
+ PlatformControllerCreateData,
261
+ PlatformControllerCreateResponse,
196
262
  PlatformControllerGetPlatformListData,
197
263
  PlatformControllerGetPlatformListResponse,
198
- PlatformController1Data,
199
- PlatformController1Response,
200
- PlatformController2Data,
201
- PlatformController2Response,
202
- SymbolControllerLookupSymbolData,
203
- SymbolControllerLookupSymbolResponse,
204
- SymbolControllerGetSymbolDataData,
205
- SymbolControllerGetSymbolDataResponse,
206
- SymbolControllerGatherSymbolForDateData,
207
- SymbolControllerGatherSymbolForDateResponse,
208
- SymbolControllerData,
209
- SymbolControllerResponse,
210
- CacheControllerFlushCacheData,
211
- CacheControllerFlushCacheResponse,
264
+ PlatformControllerMatchPlatformsData,
265
+ PlatformControllerMatchPlatformsResponse,
266
+ PlatformControllerUpdateData,
267
+ PlatformControllerUpdateResponse,
268
+ PlatformControllerDeleteData,
269
+ PlatformControllerDeleteResponse,
212
270
  DashboardControllerGetNetWorthData,
213
271
  DashboardControllerGetNetWorthResponse,
214
272
  DashboardControllerGetAccountsData,
215
273
  DashboardControllerGetAccountsResponse,
216
274
  DashboardControllerGetCashFlowData,
217
275
  DashboardControllerGetCashFlowResponse,
218
- ReportingControllerGetPortfolioTrendsData,
219
- ReportingControllerGetPortfolioTrendsResponse,
220
- ReportingControllerGenerateSnapshotData,
221
- ReportingControllerGenerateSnapshotResponse,
222
- ReportingControllerBackfillSnapshotsData,
223
- ReportingControllerBackfillSnapshotsResponse,
224
- ApiKeysControllerData,
225
- ApiKeysControllerResponse,
276
+ DashboardControllerGetExpensesData,
277
+ DashboardControllerGetExpensesResponse,
278
+ HoldingPnlControllerGetHoldingPnlData,
279
+ HoldingPnlControllerGetHoldingPnlResponse,
280
+ ApiKeysControllerCreateApiKeyResponse,
226
281
  AuthControllerAccessTokenLoginData,
227
282
  AuthControllerAccessTokenLoginResponse,
283
+ CacheControllerFlushCacheResponse,
228
284
  ExchangeRateControllerGetExchangeRateData,
229
285
  ExchangeRateControllerGetExchangeRateResponse,
230
- HealthControllerGetHealthData,
231
286
  HealthControllerGetHealthResponse,
232
- HealthControllerCheckDatabaseData,
233
287
  HealthControllerCheckDatabaseResponse,
234
- HealthControllerCheckRedisData,
288
+ HealthControllerCheckOpenBbResponse,
235
289
  HealthControllerCheckRedisResponse,
236
- HealthControllerGetCircuitBreakersHealthData,
237
290
  HealthControllerGetCircuitBreakersHealthResponse,
238
291
  HealthControllerResetCircuitBreakerData,
239
292
  HealthControllerResetCircuitBreakerResponse,
240
- HealthControllerGetMetricsData,
241
293
  HealthControllerGetMetricsResponse,
242
- HealthControllerGetHealthOfDataEnhancerData,
243
- HealthControllerGetHealthOfDataEnhancerResponse,
244
- HealthControllerCheckDataProvidersData,
245
- HealthControllerCheckDataProvidersResponse,
246
- HealthControllerGetHealthOfDataProviderData,
247
- HealthControllerGetHealthOfDataProviderResponse,
248
- InfoControllerGetInfoData,
249
294
  InfoControllerGetInfoResponse,
250
- LogoControllerGetLogoByDataSourceAndSymbolData,
251
- LogoControllerGetLogoByDataSourceAndSymbolResponse,
252
- LogoControllerGetLogoByUrlData,
253
- LogoControllerGetLogoByUrlResponse,
254
- MarketDataControllerGetMarketDataBySymbolData,
255
- MarketDataControllerGetMarketDataBySymbolResponse,
256
- MarketDataControllerData,
257
- MarketDataControllerResponse
295
+ SymbolControllerSearchData,
296
+ SymbolControllerSearchResponse,
297
+ SymbolControllerGetQuoteData,
298
+ SymbolControllerGetQuoteResponse
258
299
  } from './types.gen';
259
300
 
260
301
  export class BeanAccountsService {
@@ -292,7 +333,7 @@ export class BeanAccountsService {
292
333
  * @param data.type Filter by account type
293
334
  * @param data.status Filter by status
294
335
  * @param data.isCustom Filter by custom (user-created) accounts only
295
- * @param data.search Search term for path or i18nKey
336
+ * @param data.search Search term for account path
296
337
  * @param data.limit Maximum number of results
297
338
  * @param data.offset Number of results to skip
298
339
  * @returns AccountListResponseDto Accounts retrieved successfully
@@ -373,7 +414,7 @@ export class BeanAccountsService {
373
414
 
374
415
  /**
375
416
  * Delete account
376
- * Deletes an account (only if no transactions)
417
+ * Deletes an account (only if no active transactions; voided/superseded residual postings are cleaned up)
377
418
  * @param data The data for the request.
378
419
  * @param data.id Account UUID
379
420
  * @param data.region Region code for tenant context
@@ -392,7 +433,7 @@ export class BeanAccountsService {
392
433
  },
393
434
  errors: {
394
435
  404: 'Account not found',
395
- 409: 'Account has transactions and cannot be deleted'
436
+ 409: 'Account has active transactions and cannot be deleted'
396
437
  }
397
438
  });
398
439
  }
@@ -454,12 +495,114 @@ export class BeanAccountsService {
454
495
  }
455
496
  });
456
497
  }
498
+
499
+ /**
500
+ * Post an opening-balance transaction
501
+ * 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.
502
+ * @param data The data for the request.
503
+ * @param data.id Account UUID
504
+ * @param data.region Region code for tenant context
505
+ * @param data.requestBody
506
+ * @returns OpeningBalanceResultDto Opening-balance transaction created
507
+ * @throws ApiError
508
+ */
509
+ public static accountControllerAddOpeningBalance(
510
+ data: AccountControllerAddOpeningBalanceData
511
+ ): CancelablePromise<AccountControllerAddOpeningBalanceResponse> {
512
+ return __request(OpenAPI, {
513
+ method: 'POST',
514
+ url: '/api/v1/{region}/bean/accounts/{id}/opening-balance',
515
+ path: {
516
+ id: data.id,
517
+ region: data.region
518
+ },
519
+ body: data.requestBody,
520
+ mediaType: 'application/json',
521
+ errors: {
522
+ 404: 'Account not found',
523
+ 409: 'An opening balance already exists for this account'
524
+ }
525
+ });
526
+ }
527
+ }
528
+
529
+ export class BeanAccountStandardsService {
530
+ /**
531
+ * Get account templates
532
+ * Returns predefined account templates for a region. Supports filtering by account type and search term.
533
+ * @param data The data for the request.
534
+ * @param data.region Region code (cn, us, de)
535
+ * @param data.type Filter by account type
536
+ * @param data.search Search term for path or description
537
+ * @returns AccountStandardListResponseDto Account templates retrieved successfully
538
+ * @throws ApiError
539
+ */
540
+ public static accountStandardsControllerGetTemplates(
541
+ data: AccountStandardsControllerGetTemplatesData
542
+ ): CancelablePromise<AccountStandardsControllerGetTemplatesResponse> {
543
+ return __request(OpenAPI, {
544
+ method: 'GET',
545
+ url: '/api/v1/{region}/bean/account-standards',
546
+ path: {
547
+ region: data.region
548
+ },
549
+ query: {
550
+ type: data.type,
551
+ search: data.search
552
+ }
553
+ });
554
+ }
555
+
556
+ /**
557
+ * Get template metadata for an account path
558
+ * Returns root type for a template path.
559
+ * @param data The data for the request.
560
+ * @param data.region Region code for tenant context
561
+ * @param data.path Account path to check
562
+ * @returns TemplateMetadataResponseDto Template metadata retrieved successfully
563
+ * @throws ApiError
564
+ */
565
+ public static accountStandardsControllerGetTemplateMetadata(
566
+ data: AccountStandardsControllerGetTemplateMetadataData
567
+ ): CancelablePromise<AccountStandardsControllerGetTemplateMetadataResponse> {
568
+ return __request(OpenAPI, {
569
+ method: 'GET',
570
+ url: '/api/v1/{region}/bean/account-standards/template-metadata',
571
+ path: {
572
+ region: data.region
573
+ },
574
+ query: {
575
+ path: data.path
576
+ }
577
+ });
578
+ }
579
+
580
+ /**
581
+ * Get available regions with hierarchy
582
+ * Returns supported regions with inheritance metadata
583
+ * @param data The data for the request.
584
+ * @param data.region Region code for tenant context
585
+ * @returns RegionsMetadataResponseDto Regions metadata retrieved successfully
586
+ * @throws ApiError
587
+ */
588
+ public static accountStandardsControllerGetRegions(
589
+ data: AccountStandardsControllerGetRegionsData
590
+ ): CancelablePromise<AccountStandardsControllerGetRegionsResponse> {
591
+ return __request(OpenAPI, {
592
+ method: 'GET',
593
+ url: '/api/v1/{region}/bean/account-standards/regions',
594
+ path: {
595
+ region: data.region
596
+ }
597
+ });
598
+ }
457
599
  }
458
600
 
459
601
  export class BeanTransactionsService {
460
602
  /**
461
- * Create transaction
462
- * Creates a new double-entry transaction. Missing accounts are auto-created by default.
603
+ * @deprecated
604
+ * Create transaction (DEPRECATED)
605
+ * DEPRECATED: Use POST /:region/bean/import/provider/:name/sync instead. This endpoint skips dedup, rule matching, and review branching.
463
606
  * @param data The data for the request.
464
607
  * @param data.region Region code for tenant context
465
608
  * @param data.requestBody Transaction data with postings
@@ -498,6 +641,7 @@ export class BeanTransactionsService {
498
641
  * @param data.status Filter by transaction status
499
642
  * @param data.search Search in narration and payee fields (max 200 chars)
500
643
  * @param data.accountId Filter by account ID (transactions with postings to this account)
644
+ * @param data.category Filter by ADR-0075 functional category (Group segment); matches any posting to an Expenses/Income account whose derived Group segment equals this value
501
645
  * @returns TransactionListResponseDto Transaction list
502
646
  * @throws ApiError
503
647
  */
@@ -517,28 +661,102 @@ export class BeanTransactionsService {
517
661
  dateTo: data.dateTo,
518
662
  status: data.status,
519
663
  search: data.search,
520
- accountId: data.accountId
664
+ accountId: data.accountId,
665
+ category: data.category
521
666
  },
522
667
  errors: {
668
+ 400: 'Validation failed',
523
669
  401: 'Authentication required'
524
670
  }
525
671
  });
526
672
  }
527
673
 
528
674
  /**
675
+ * @deprecated
676
+ * Batch create transactions (DEPRECATED)
677
+ * DEPRECATED: Use POST /:region/bean/import/provider/:name/sync instead. This endpoint skips dedup, rule matching, and review branching.
529
678
  * @param data The data for the request.
530
679
  * @param data.region Region code for tenant context
531
- * @returns unknown
680
+ * @param data.requestBody
681
+ * @returns BatchTransactionResponseDto Transactions processed
532
682
  * @throws ApiError
533
683
  */
534
- public static transactionController(
535
- data: TransactionControllerData
536
- ): CancelablePromise<TransactionControllerResponse> {
684
+ public static transactionControllerCreateBatch(
685
+ data: TransactionControllerCreateBatchData
686
+ ): CancelablePromise<TransactionControllerCreateBatchResponse> {
537
687
  return __request(OpenAPI, {
538
688
  method: 'POST',
539
689
  url: '/api/v1/{region}/bean/transactions/batch',
540
690
  path: {
541
691
  region: data.region
692
+ },
693
+ body: data.requestBody,
694
+ mediaType: 'application/json',
695
+ errors: {
696
+ 400: 'Invalid input',
697
+ 401: 'Authentication required'
698
+ }
699
+ });
700
+ }
701
+
702
+ /**
703
+ * Correct (supersede) a transaction
704
+ * Atomically voids the original (SUPERSEDED) and creates a replacement through the full validation pipeline.
705
+ * @param data The data for the request.
706
+ * @param data.id Original transaction ID to correct
707
+ * @param data.region Region code for tenant context
708
+ * @param data.requestBody
709
+ * @returns TransactionDetailDto Corrected transaction created
710
+ * @throws ApiError
711
+ */
712
+ public static transactionControllerCorrect(
713
+ data: TransactionControllerCorrectData
714
+ ): CancelablePromise<TransactionControllerCorrectResponse> {
715
+ return __request(OpenAPI, {
716
+ method: 'POST',
717
+ url: '/api/v1/{region}/bean/transactions/{id}/correct',
718
+ path: {
719
+ id: data.id,
720
+ region: data.region
721
+ },
722
+ body: data.requestBody,
723
+ mediaType: 'application/json',
724
+ errors: {
725
+ 404: 'Original transaction not found',
726
+ 409: 'Original no longer ACTIVE (concurrent modification)',
727
+ 422: 'Pipeline validation failed (does not balance, invalid accounts)'
728
+ }
729
+ });
730
+ }
731
+
732
+ /**
733
+ * Suggest transaction tags
734
+ * Returns distinct tags from the user ACTIVE transactions, sorted by usage, for autocomplete. Optional q performs a case-insensitive prefix match.
735
+ * @param data The data for the request.
736
+ * @param data.region Region code for tenant context
737
+ * @param data.q Prefix match, case-insensitive (max 50 chars)
738
+ * @param data.sort usage (default) or name
739
+ * @param data.limit Max suggestions (1-100, default 10)
740
+ * @returns TagSuggestionsResponseDto Tag suggestions
741
+ * @throws ApiError
742
+ */
743
+ public static transactionControllerSuggestTags(
744
+ data: TransactionControllerSuggestTagsData
745
+ ): CancelablePromise<TransactionControllerSuggestTagsResponse> {
746
+ return __request(OpenAPI, {
747
+ method: 'GET',
748
+ url: '/api/v1/{region}/bean/transactions/tags',
749
+ path: {
750
+ region: data.region
751
+ },
752
+ query: {
753
+ q: data.q,
754
+ sort: data.sort,
755
+ limit: data.limit
756
+ },
757
+ errors: {
758
+ 400: 'Validation failed',
759
+ 401: 'Authentication required'
542
760
  }
543
761
  });
544
762
  }
@@ -600,67 +818,28 @@ export class BeanTransactionsService {
600
818
  }
601
819
 
602
820
  /**
821
+ * Void transaction
822
+ * Soft-deletes a transaction by marking it as VOIDED
603
823
  * @param data The data for the request.
824
+ * @param data.id Transaction ID
604
825
  * @param data.region Region code for tenant context
605
- * @returns void
826
+ * @returns void Transaction voided successfully
606
827
  * @throws ApiError
607
828
  */
608
- public static transactionController1(
609
- data: TransactionController1Data
610
- ): CancelablePromise<TransactionController1Response> {
829
+ public static transactionControllerDelete(
830
+ data: TransactionControllerDeleteData
831
+ ): CancelablePromise<TransactionControllerDeleteResponse> {
611
832
  return __request(OpenAPI, {
612
833
  method: 'DELETE',
613
834
  url: '/api/v1/{region}/bean/transactions/{id}',
614
835
  path: {
615
- region: data.region
616
- }
617
- });
618
- }
619
- }
620
-
621
- export class BeanAccountStandardsService {
622
- /**
623
- * Get account templates
624
- * Returns predefined account templates for a region. Supports filtering by account type and search term.
625
- * @param data The data for the request.
626
- * @param data.region Region code (cn, us, de)
627
- * @param data.type Filter by account type
628
- * @param data.search Search term for path or description
629
- * @returns AccountStandardListResponseDto Account templates retrieved successfully
630
- * @throws ApiError
631
- */
632
- public static accountStandardsControllerGetTemplates(
633
- data: AccountStandardsControllerGetTemplatesData
634
- ): CancelablePromise<AccountStandardsControllerGetTemplatesResponse> {
635
- return __request(OpenAPI, {
636
- method: 'GET',
637
- url: '/api/v1/{region}/bean/account-standards',
638
- path: {
836
+ id: data.id,
639
837
  region: data.region
640
838
  },
641
- query: {
642
- type: data.type,
643
- search: data.search
644
- }
645
- });
646
- }
647
-
648
- /**
649
- * Get available regions with hierarchy
650
- * Returns supported regions with inheritance metadata
651
- * @param data The data for the request.
652
- * @param data.region Region code (cn, us, de)
653
- * @returns RegionsMetadataResponseDto Regions metadata retrieved successfully
654
- * @throws ApiError
655
- */
656
- public static accountStandardsControllerGetRegions(
657
- data: AccountStandardsControllerGetRegionsData
658
- ): CancelablePromise<AccountStandardsControllerGetRegionsResponse> {
659
- return __request(OpenAPI, {
660
- method: 'GET',
661
- url: '/api/v1/{region}/bean/account-standards/regions',
662
- path: {
663
- region: data.region
839
+ errors: {
840
+ 400: 'Transaction already voided',
841
+ 401: 'Authentication required',
842
+ 404: 'Transaction not found'
664
843
  }
665
844
  });
666
845
  }
@@ -671,8 +850,8 @@ export class BeanBalancesService {
671
850
  * Query account balance
672
851
  * Calculate account balance at a specific date for a single currency
673
852
  * @param data The data for the request.
674
- * @param data.account Account name (e.g., "Assets:Bank:Checking")
675
- * @param data.region Region code (cn, us, de)
853
+ * @param data.account Account name (e.g., "Assets:Checking")
854
+ * @param data.region Region code for tenant context
676
855
  * @param data.date Date to calculate balance at (ISO 8601 format)
677
856
  * @param data.currency Currency to query (e.g., "USD", "CNY")
678
857
  * @returns BalanceResponseDto Balance calculated successfully
@@ -703,7 +882,7 @@ export class BeanBalancesService {
703
882
  * Query multi-currency account balance
704
883
  * Calculate account balances for all currencies at a specific date
705
884
  * @param data The data for the request.
706
- * @param data.region Region code (cn, us, de)
885
+ * @param data.region Region code for tenant context
707
886
  * @returns MultiCurrencyBalanceResponseDto Balances calculated successfully
708
887
  * @throws ApiError
709
888
  */
@@ -728,7 +907,7 @@ export class BeanReviewsService {
728
907
  /**
729
908
  * List pending reviews
730
909
  * @param data The data for the request.
731
- * @param data.region Region code (cn, us, de)
910
+ * @param data.region Region code for tenant context
732
911
  * @param data.type Filter by review type
733
912
  * @param data.confidenceLevel Filter by confidence level
734
913
  * @param data.sortBy Sort order
@@ -759,7 +938,7 @@ export class BeanReviewsService {
759
938
  /**
760
939
  * Get review statistics
761
940
  * @param data The data for the request.
762
- * @param data.region Region code (cn, us, de)
941
+ * @param data.region Region code for tenant context
763
942
  * @returns ReviewStatsDto
764
943
  * @throws ApiError
765
944
  */
@@ -779,7 +958,7 @@ export class BeanReviewsService {
779
958
  * Get review by ID
780
959
  * @param data The data for the request.
781
960
  * @param data.id Review ID
782
- * @param data.region Region code (cn, us, de)
961
+ * @param data.region Region code for tenant context
783
962
  * @returns ReviewDetailDto
784
963
  * @throws ApiError
785
964
  */
@@ -797,75 +976,93 @@ export class BeanReviewsService {
797
976
  }
798
977
 
799
978
  /**
979
+ * Resolve a review item
800
980
  * @param data The data for the request.
801
- * @param data.region Region code (cn, us, de)
802
- * @returns unknown
981
+ * @param data.id Review ID
982
+ * @param data.region Region code for tenant context
983
+ * @param data.requestBody
984
+ * @returns ResolveResultDto
803
985
  * @throws ApiError
804
986
  */
805
- public static reviewController(
806
- data: ReviewControllerData
807
- ): CancelablePromise<ReviewControllerResponse> {
987
+ public static reviewControllerResolve(
988
+ data: ReviewControllerResolveData
989
+ ): CancelablePromise<ReviewControllerResolveResponse> {
808
990
  return __request(OpenAPI, {
809
991
  method: 'POST',
810
992
  url: '/api/v1/{region}/bean/reviews/{id}/resolve',
811
993
  path: {
994
+ id: data.id,
812
995
  region: data.region
813
- }
996
+ },
997
+ body: data.requestBody,
998
+ mediaType: 'application/json'
814
999
  });
815
1000
  }
816
1001
 
817
1002
  /**
1003
+ * Undo a resolution (within 24h)
818
1004
  * @param data The data for the request.
819
- * @param data.region Region code (cn, us, de)
820
- * @returns unknown
1005
+ * @param data.id Review ID
1006
+ * @param data.region Region code for tenant context
1007
+ * @returns UndoResultDto
821
1008
  * @throws ApiError
822
1009
  */
823
- public static reviewController1(
824
- data: ReviewController1Data
825
- ): CancelablePromise<ReviewController1Response> {
1010
+ public static reviewControllerUndo(
1011
+ data: ReviewControllerUndoData
1012
+ ): CancelablePromise<ReviewControllerUndoResponse> {
826
1013
  return __request(OpenAPI, {
827
1014
  method: 'POST',
828
1015
  url: '/api/v1/{region}/bean/reviews/{id}/undo',
829
1016
  path: {
1017
+ id: data.id,
830
1018
  region: data.region
831
1019
  }
832
1020
  });
833
1021
  }
834
1022
 
835
1023
  /**
1024
+ * Batch resolve multiple reviews
836
1025
  * @param data The data for the request.
837
- * @param data.region Region code (cn, us, de)
838
- * @returns unknown
1026
+ * @param data.region Region code for tenant context
1027
+ * @param data.requestBody Batch resolution request containing review IDs and action
1028
+ * @returns BatchResolveResultDto
839
1029
  * @throws ApiError
840
1030
  */
841
- public static reviewController2(
842
- data: ReviewController2Data
843
- ): CancelablePromise<ReviewController2Response> {
1031
+ public static reviewControllerBatchResolve(
1032
+ data: ReviewControllerBatchResolveData
1033
+ ): CancelablePromise<ReviewControllerBatchResolveResponse> {
844
1034
  return __request(OpenAPI, {
845
1035
  method: 'POST',
846
1036
  url: '/api/v1/{region}/bean/reviews/batch-resolve',
847
1037
  path: {
848
1038
  region: data.region
849
- }
1039
+ },
1040
+ body: data.requestBody,
1041
+ mediaType: 'application/json'
850
1042
  });
851
1043
  }
852
1044
  }
853
1045
 
854
1046
  export class BeanPayeesService {
855
1047
  /**
1048
+ * Create a new payee
1049
+ * Creates a new payee mapping for the authenticated user. The payee name must be unique within the user's account.
856
1050
  * @param data The data for the request.
857
- * @param data.region Region code (cn, us, de)
858
- * @returns unknown
1051
+ * @param data.requestBody
1052
+ * @returns PayeeResponseDto Payee created successfully
859
1053
  * @throws ApiError
860
1054
  */
861
- public static payeeController(
862
- data: PayeeControllerData
863
- ): CancelablePromise<PayeeControllerResponse> {
1055
+ public static payeeControllerCreate(
1056
+ data: PayeeControllerCreateData
1057
+ ): CancelablePromise<PayeeControllerCreateResponse> {
864
1058
  return __request(OpenAPI, {
865
1059
  method: 'POST',
866
1060
  url: '/api/v1/bean/payees',
867
- path: {
868
- region: data.region
1061
+ body: data.requestBody,
1062
+ mediaType: 'application/json',
1063
+ errors: {
1064
+ 400: 'Invalid input data',
1065
+ 409: 'Payee already exists'
869
1066
  }
870
1067
  });
871
1068
  }
@@ -874,7 +1071,6 @@ export class BeanPayeesService {
874
1071
  * List user payees
875
1072
  * Returns all payee mappings for the authenticated user with optional filtering
876
1073
  * @param data The data for the request.
877
- * @param data.region Region code (cn, us, de)
878
1074
  * @param data.search Search term for payee name (partial match, case-insensitive). Useful for autocomplete.
879
1075
  * @param data.payee Filter by exact payee name match
880
1076
  * @param data.category Filter by custom category
@@ -884,14 +1080,11 @@ export class BeanPayeesService {
884
1080
  * @throws ApiError
885
1081
  */
886
1082
  public static payeeControllerFindAll(
887
- data: PayeeControllerFindAllData
1083
+ data: PayeeControllerFindAllData = {}
888
1084
  ): CancelablePromise<PayeeControllerFindAllResponse> {
889
1085
  return __request(OpenAPI, {
890
1086
  method: 'GET',
891
1087
  url: '/api/v1/bean/payees',
892
- path: {
893
- region: data.region
894
- },
895
1088
  query: {
896
1089
  search: data.search,
897
1090
  payee: data.payee,
@@ -907,7 +1100,6 @@ export class BeanPayeesService {
907
1100
  * Returns active payee names matching the query, sorted by recent usage. Used for transaction input autocomplete.
908
1101
  * @param data The data for the request.
909
1102
  * @param data.q Search query for payee name (partial match, case-insensitive)
910
- * @param data.region Region code (cn, us, de)
911
1103
  * @param data.limit Maximum number of suggestions
912
1104
  * @returns PayeeAutocompleteResponseDto Autocomplete suggestions retrieved successfully
913
1105
  * @throws ApiError
@@ -918,9 +1110,6 @@ export class BeanPayeesService {
918
1110
  return __request(OpenAPI, {
919
1111
  method: 'GET',
920
1112
  url: '/api/v1/bean/payees/autocomplete',
921
- path: {
922
- region: data.region
923
- },
924
1113
  query: {
925
1114
  q: data.q,
926
1115
  limit: data.limit
@@ -932,20 +1121,16 @@ export class BeanPayeesService {
932
1121
  * Get top payees by usage
933
1122
  * Returns the most frequently used payees, sorted by use count. Used for statistics and analytics.
934
1123
  * @param data The data for the request.
935
- * @param data.region Region code (cn, us, de)
936
1124
  * @param data.limit Maximum number of results
937
1125
  * @returns PayeeStatsResponseDto Top payees retrieved successfully
938
1126
  * @throws ApiError
939
1127
  */
940
1128
  public static payeeControllerGetTopPayees(
941
- data: PayeeControllerGetTopPayeesData
1129
+ data: PayeeControllerGetTopPayeesData = {}
942
1130
  ): CancelablePromise<PayeeControllerGetTopPayeesResponse> {
943
1131
  return __request(OpenAPI, {
944
1132
  method: 'GET',
945
1133
  url: '/api/v1/bean/payees/top',
946
- path: {
947
- region: data.region
948
- },
949
1134
  query: {
950
1135
  limit: data.limit
951
1136
  }
@@ -957,7 +1142,6 @@ export class BeanPayeesService {
957
1142
  * Returns a specific payee mapping by its UUID
958
1143
  * @param data The data for the request.
959
1144
  * @param data.id Payee UUID
960
- * @param data.region Region code (cn, us, de)
961
1145
  * @returns PayeeResponseDto Payee retrieved successfully
962
1146
  * @throws ApiError
963
1147
  */
@@ -968,8 +1152,7 @@ export class BeanPayeesService {
968
1152
  method: 'GET',
969
1153
  url: '/api/v1/bean/payees/{id}',
970
1154
  path: {
971
- id: data.id,
972
- region: data.region
1155
+ id: data.id
973
1156
  },
974
1157
  errors: {
975
1158
  403: 'Payee belongs to another user',
@@ -979,37 +1162,51 @@ export class BeanPayeesService {
979
1162
  }
980
1163
 
981
1164
  /**
1165
+ * Update payee
1166
+ * Updates a payee mapping. The payee name cannot be changed after creation.
982
1167
  * @param data The data for the request.
983
- * @param data.region Region code (cn, us, de)
984
- * @returns unknown
1168
+ * @param data.id Payee UUID
1169
+ * @param data.requestBody
1170
+ * @returns PayeeResponseDto Payee updated successfully
985
1171
  * @throws ApiError
986
1172
  */
987
- public static payeeController1(
988
- data: PayeeController1Data
989
- ): CancelablePromise<PayeeController1Response> {
1173
+ public static payeeControllerUpdate(
1174
+ data: PayeeControllerUpdateData
1175
+ ): CancelablePromise<PayeeControllerUpdateResponse> {
990
1176
  return __request(OpenAPI, {
991
1177
  method: 'PUT',
992
1178
  url: '/api/v1/bean/payees/{id}',
993
1179
  path: {
994
- region: data.region
1180
+ id: data.id
1181
+ },
1182
+ body: data.requestBody,
1183
+ mediaType: 'application/json',
1184
+ errors: {
1185
+ 400: 'Invalid input data',
1186
+ 404: 'Payee not found'
995
1187
  }
996
1188
  });
997
1189
  }
998
1190
 
999
1191
  /**
1192
+ * Delete payee
1193
+ * Soft deletes a payee by marking it as inactive. Inactive payees will not appear in autocomplete suggestions.
1000
1194
  * @param data The data for the request.
1001
- * @param data.region Region code (cn, us, de)
1002
- * @returns void
1195
+ * @param data.id Payee UUID
1196
+ * @returns void Payee deleted successfully
1003
1197
  * @throws ApiError
1004
1198
  */
1005
- public static payeeController2(
1006
- data: PayeeController2Data
1007
- ): CancelablePromise<PayeeController2Response> {
1199
+ public static payeeControllerDelete(
1200
+ data: PayeeControllerDeleteData
1201
+ ): CancelablePromise<PayeeControllerDeleteResponse> {
1008
1202
  return __request(OpenAPI, {
1009
1203
  method: 'DELETE',
1010
1204
  url: '/api/v1/bean/payees/{id}',
1011
1205
  path: {
1012
- region: data.region
1206
+ id: data.id
1207
+ },
1208
+ errors: {
1209
+ 404: 'Payee not found'
1013
1210
  }
1014
1211
  });
1015
1212
  }
@@ -1017,19 +1214,25 @@ export class BeanPayeesService {
1017
1214
 
1018
1215
  export class AdminPayeeProfilesService {
1019
1216
  /**
1217
+ * Create payee profile (Admin only)
1218
+ * Creates a new global payee profile. The canonical name must be unique (case-insensitive).
1020
1219
  * @param data The data for the request.
1021
- * @param data.region Region code (cn, us, de)
1022
- * @returns unknown
1220
+ * @param data.requestBody
1221
+ * @returns PayeeProfileResponseDto Payee profile created successfully
1023
1222
  * @throws ApiError
1024
1223
  */
1025
- public static payeeProfileAdminController(
1026
- data: PayeeProfileAdminControllerData
1027
- ): CancelablePromise<PayeeProfileAdminControllerResponse> {
1224
+ public static payeeProfileAdminControllerCreate(
1225
+ data: PayeeProfileAdminControllerCreateData
1226
+ ): CancelablePromise<PayeeProfileAdminControllerCreateResponse> {
1028
1227
  return __request(OpenAPI, {
1029
1228
  method: 'POST',
1030
1229
  url: '/api/v1/admin/payee-profiles',
1031
- path: {
1032
- region: data.region
1230
+ body: data.requestBody,
1231
+ mediaType: 'application/json',
1232
+ errors: {
1233
+ 400: 'Validation failed',
1234
+ 403: 'Admin access required',
1235
+ 409: 'Payee profile already exists'
1033
1236
  }
1034
1237
  });
1035
1238
  }
@@ -1038,7 +1241,6 @@ export class AdminPayeeProfilesService {
1038
1241
  * List payee profiles (Admin only)
1039
1242
  * Returns all payee profiles with optional filtering by category, country, verification status, etc.
1040
1243
  * @param data The data for the request.
1041
- * @param data.region Region code (cn, us, de)
1042
1244
  * @param data.search Search term for canonical name and aliases (case-insensitive)
1043
1245
  * @param data.category Filter by category
1044
1246
  * @param data.country Filter by country (ISO 3166-1 alpha-2)
@@ -1049,14 +1251,11 @@ export class AdminPayeeProfilesService {
1049
1251
  * @throws ApiError
1050
1252
  */
1051
1253
  public static payeeProfileAdminControllerFindAll(
1052
- data: PayeeProfileAdminControllerFindAllData
1254
+ data: PayeeProfileAdminControllerFindAllData = {}
1053
1255
  ): CancelablePromise<PayeeProfileAdminControllerFindAllResponse> {
1054
1256
  return __request(OpenAPI, {
1055
1257
  method: 'GET',
1056
1258
  url: '/api/v1/admin/payee-profiles',
1057
- path: {
1058
- region: data.region
1059
- },
1060
1259
  query: {
1061
1260
  search: data.search,
1062
1261
  category: data.category,
@@ -1076,7 +1275,6 @@ export class AdminPayeeProfilesService {
1076
1275
  * Returns a single payee profile by its ID.
1077
1276
  * @param data The data for the request.
1078
1277
  * @param data.id Payee profile ID (UUID)
1079
- * @param data.region Region code (cn, us, de)
1080
1278
  * @returns PayeeProfileResponseDto Payee profile retrieved successfully
1081
1279
  * @throws ApiError
1082
1280
  */
@@ -1087,8 +1285,7 @@ export class AdminPayeeProfilesService {
1087
1285
  method: 'GET',
1088
1286
  url: '/api/v1/admin/payee-profiles/{id}',
1089
1287
  path: {
1090
- id: data.id,
1091
- region: data.region
1288
+ id: data.id
1092
1289
  },
1093
1290
  errors: {
1094
1291
  403: 'Admin access required',
@@ -1098,73 +1295,101 @@ export class AdminPayeeProfilesService {
1098
1295
  }
1099
1296
 
1100
1297
  /**
1298
+ * Update payee profile (Admin only)
1299
+ * Updates an existing payee profile. The canonical name cannot be changed.
1101
1300
  * @param data The data for the request.
1102
- * @param data.region Region code (cn, us, de)
1103
- * @returns unknown
1301
+ * @param data.id Payee profile ID (UUID)
1302
+ * @param data.requestBody
1303
+ * @returns PayeeProfileResponseDto Payee profile updated successfully
1104
1304
  * @throws ApiError
1105
1305
  */
1106
- public static payeeProfileAdminController1(
1107
- data: PayeeProfileAdminController1Data
1108
- ): CancelablePromise<PayeeProfileAdminController1Response> {
1306
+ public static payeeProfileAdminControllerUpdate(
1307
+ data: PayeeProfileAdminControllerUpdateData
1308
+ ): CancelablePromise<PayeeProfileAdminControllerUpdateResponse> {
1109
1309
  return __request(OpenAPI, {
1110
1310
  method: 'PUT',
1111
1311
  url: '/api/v1/admin/payee-profiles/{id}',
1112
1312
  path: {
1113
- region: data.region
1313
+ id: data.id
1314
+ },
1315
+ body: data.requestBody,
1316
+ mediaType: 'application/json',
1317
+ errors: {
1318
+ 403: 'Admin access required',
1319
+ 404: 'Payee profile not found'
1114
1320
  }
1115
1321
  });
1116
1322
  }
1117
1323
 
1118
1324
  /**
1325
+ * Soft delete payee profile (Admin only)
1326
+ * Marks a payee profile as inactive (soft delete). The profile cannot be deleted if it is referenced by user payees.
1119
1327
  * @param data The data for the request.
1120
- * @param data.region Region code (cn, us, de)
1121
- * @returns void
1328
+ * @param data.id Payee profile ID (UUID)
1329
+ * @returns void Payee profile deleted successfully
1122
1330
  * @throws ApiError
1123
1331
  */
1124
- public static payeeProfileAdminController2(
1125
- data: PayeeProfileAdminController2Data
1126
- ): CancelablePromise<PayeeProfileAdminController2Response> {
1332
+ public static payeeProfileAdminControllerDelete(
1333
+ data: PayeeProfileAdminControllerDeleteData
1334
+ ): CancelablePromise<PayeeProfileAdminControllerDeleteResponse> {
1127
1335
  return __request(OpenAPI, {
1128
1336
  method: 'DELETE',
1129
1337
  url: '/api/v1/admin/payee-profiles/{id}',
1130
1338
  path: {
1131
- region: data.region
1339
+ id: data.id
1340
+ },
1341
+ errors: {
1342
+ 403: 'Admin access required',
1343
+ 404: 'Payee profile not found',
1344
+ 409: 'Payee profile is in use and cannot be deleted'
1132
1345
  }
1133
1346
  });
1134
1347
  }
1135
1348
 
1136
1349
  /**
1350
+ * Verify payee profile (Admin only)
1351
+ * Marks a payee profile as verified by setting verifiedAt to current timestamp.
1137
1352
  * @param data The data for the request.
1138
- * @param data.region Region code (cn, us, de)
1139
- * @returns unknown
1353
+ * @param data.id Payee profile ID (UUID)
1354
+ * @returns PayeeProfileResponseDto Payee profile verified successfully
1140
1355
  * @throws ApiError
1141
1356
  */
1142
- public static payeeProfileAdminController3(
1143
- data: PayeeProfileAdminController3Data
1144
- ): CancelablePromise<PayeeProfileAdminController3Response> {
1357
+ public static payeeProfileAdminControllerVerify(
1358
+ data: PayeeProfileAdminControllerVerifyData
1359
+ ): CancelablePromise<PayeeProfileAdminControllerVerifyResponse> {
1145
1360
  return __request(OpenAPI, {
1146
1361
  method: 'POST',
1147
1362
  url: '/api/v1/admin/payee-profiles/{id}/verify',
1148
1363
  path: {
1149
- region: data.region
1364
+ id: data.id
1365
+ },
1366
+ errors: {
1367
+ 403: 'Admin access required',
1368
+ 404: 'Payee profile not found'
1150
1369
  }
1151
1370
  });
1152
1371
  }
1153
1372
 
1154
1373
  /**
1374
+ * Unverify payee profile (Admin only)
1375
+ * Removes verification status by setting verifiedAt to null.
1155
1376
  * @param data The data for the request.
1156
- * @param data.region Region code (cn, us, de)
1157
- * @returns unknown
1377
+ * @param data.id Payee profile ID (UUID)
1378
+ * @returns PayeeProfileResponseDto Payee profile unverified successfully
1158
1379
  * @throws ApiError
1159
1380
  */
1160
- public static payeeProfileAdminController4(
1161
- data: PayeeProfileAdminController4Data
1162
- ): CancelablePromise<PayeeProfileAdminController4Response> {
1381
+ public static payeeProfileAdminControllerUnverify(
1382
+ data: PayeeProfileAdminControllerUnverifyData
1383
+ ): CancelablePromise<PayeeProfileAdminControllerUnverifyResponse> {
1163
1384
  return __request(OpenAPI, {
1164
1385
  method: 'DELETE',
1165
1386
  url: '/api/v1/admin/payee-profiles/{id}/verify',
1166
1387
  path: {
1167
- region: data.region
1388
+ id: data.id
1389
+ },
1390
+ errors: {
1391
+ 403: 'Admin access required',
1392
+ 404: 'Payee profile not found'
1168
1393
  }
1169
1394
  });
1170
1395
  }
@@ -1172,19 +1397,28 @@ export class AdminPayeeProfilesService {
1172
1397
 
1173
1398
  export class BeanCommoditiesService {
1174
1399
  /**
1400
+ * Create a new commodity
1401
+ * Creates a new commodity definition for the authenticated user
1175
1402
  * @param data The data for the request.
1176
- * @param data.region Region code (cn, us, de)
1177
- * @returns unknown
1403
+ * @param data.region Region code for tenant context
1404
+ * @param data.requestBody
1405
+ * @returns CommodityResponseDto Commodity created successfully
1178
1406
  * @throws ApiError
1179
1407
  */
1180
- public static commodityController(
1181
- data: CommodityControllerData
1182
- ): CancelablePromise<CommodityControllerResponse> {
1408
+ public static commodityControllerCreate(
1409
+ data: CommodityControllerCreateData
1410
+ ): CancelablePromise<CommodityControllerCreateResponse> {
1183
1411
  return __request(OpenAPI, {
1184
1412
  method: 'POST',
1185
1413
  url: '/api/v1/{region}/bean/commodities',
1186
1414
  path: {
1187
1415
  region: data.region
1416
+ },
1417
+ body: data.requestBody,
1418
+ mediaType: 'application/json',
1419
+ errors: {
1420
+ 400: 'Invalid input data',
1421
+ 409: 'Commodity already exists'
1188
1422
  }
1189
1423
  });
1190
1424
  }
@@ -1193,7 +1427,7 @@ export class BeanCommoditiesService {
1193
1427
  * List user commodities
1194
1428
  * Returns all commodity definitions for the authenticated user with optional filtering
1195
1429
  * @param data The data for the request.
1196
- * @param data.region Region code (cn, us, de)
1430
+ * @param data.region Region code for tenant context
1197
1431
  * @param data.search Search term for symbol or metadata fields (partial match). Searches symbol and metadata.name.
1198
1432
  * @param data.symbol Filter by exact symbol match
1199
1433
  * @returns CommodityListResponseDto Commodities retrieved successfully
@@ -1220,7 +1454,7 @@ export class BeanCommoditiesService {
1220
1454
  * Returns a specific commodity definition by its symbol
1221
1455
  * @param data The data for the request.
1222
1456
  * @param data.symbol Commodity symbol
1223
- * @param data.region Region code (cn, us, de)
1457
+ * @param data.region Region code for tenant context
1224
1458
  * @returns CommodityResponseDto Commodity retrieved successfully
1225
1459
  * @throws ApiError
1226
1460
  */
@@ -1241,68 +1475,92 @@ export class BeanCommoditiesService {
1241
1475
  }
1242
1476
 
1243
1477
  /**
1478
+ * Update commodity
1479
+ * Updates an existing commodity definition. Symbol cannot be changed.
1244
1480
  * @param data The data for the request.
1245
- * @param data.region Region code (cn, us, de)
1246
- * @returns unknown
1481
+ * @param data.symbol Commodity symbol
1482
+ * @param data.region Region code for tenant context
1483
+ * @param data.requestBody
1484
+ * @returns CommodityResponseDto Commodity updated successfully
1247
1485
  * @throws ApiError
1248
1486
  */
1249
- public static commodityController1(
1250
- data: CommodityController1Data
1251
- ): CancelablePromise<CommodityController1Response> {
1487
+ public static commodityControllerUpdate(
1488
+ data: CommodityControllerUpdateData
1489
+ ): CancelablePromise<CommodityControllerUpdateResponse> {
1252
1490
  return __request(OpenAPI, {
1253
1491
  method: 'PUT',
1254
1492
  url: '/api/v1/{region}/bean/commodities/{symbol}',
1255
1493
  path: {
1494
+ symbol: data.symbol,
1256
1495
  region: data.region
1496
+ },
1497
+ body: data.requestBody,
1498
+ mediaType: 'application/json',
1499
+ errors: {
1500
+ 400: 'Invalid input data',
1501
+ 404: 'Commodity not found'
1257
1502
  }
1258
1503
  });
1259
1504
  }
1260
1505
 
1261
1506
  /**
1507
+ * Delete commodity
1508
+ * Deletes a commodity definition
1262
1509
  * @param data The data for the request.
1263
- * @param data.region Region code (cn, us, de)
1264
- * @returns void
1510
+ * @param data.symbol Commodity symbol
1511
+ * @param data.region Region code for tenant context
1512
+ * @returns void Commodity deleted successfully
1265
1513
  * @throws ApiError
1266
1514
  */
1267
- public static commodityController2(
1268
- data: CommodityController2Data
1269
- ): CancelablePromise<CommodityController2Response> {
1515
+ public static commodityControllerDelete(
1516
+ data: CommodityControllerDeleteData
1517
+ ): CancelablePromise<CommodityControllerDeleteResponse> {
1270
1518
  return __request(OpenAPI, {
1271
1519
  method: 'DELETE',
1272
1520
  url: '/api/v1/{region}/bean/commodities/{symbol}',
1273
1521
  path: {
1522
+ symbol: data.symbol,
1274
1523
  region: data.region
1524
+ },
1525
+ errors: {
1526
+ 404: 'Commodity not found'
1275
1527
  }
1276
1528
  });
1277
1529
  }
1278
1530
 
1279
1531
  /**
1532
+ * Ensure commodity exists
1533
+ * Gets existing commodity or creates it with automatic initialization from OpenBB
1280
1534
  * @param data The data for the request.
1281
- * @param data.region Region code (cn, us, de)
1282
- * @returns unknown
1535
+ * @param data.symbol Commodity symbol
1536
+ * @param data.region Region code for tenant context
1537
+ * @returns CommodityResponseDto Commodity retrieved or created
1283
1538
  * @throws ApiError
1284
1539
  */
1285
- public static commodityController3(
1286
- data: CommodityController3Data
1287
- ): CancelablePromise<CommodityController3Response> {
1540
+ public static commodityControllerGetOrCreate(
1541
+ data: CommodityControllerGetOrCreateData
1542
+ ): CancelablePromise<CommodityControllerGetOrCreateResponse> {
1288
1543
  return __request(OpenAPI, {
1289
1544
  method: 'POST',
1290
1545
  url: '/api/v1/{region}/bean/commodities/{symbol}/ensure',
1291
1546
  path: {
1547
+ symbol: data.symbol,
1292
1548
  region: data.region
1293
1549
  }
1294
1550
  });
1295
1551
  }
1296
1552
 
1297
1553
  /**
1554
+ * Bulk create commodities
1555
+ * Creates multiple commodities from a list of symbols, useful for initialization
1298
1556
  * @param data The data for the request.
1299
- * @param data.region Region code (cn, us, de)
1300
- * @returns unknown
1557
+ * @param data.region Region code for tenant context
1558
+ * @returns CommodityResponseDto Commodities created successfully
1301
1559
  * @throws ApiError
1302
1560
  */
1303
- public static commodityController4(
1304
- data: CommodityController4Data
1305
- ): CancelablePromise<CommodityController4Response> {
1561
+ public static commodityControllerBulkCreate(
1562
+ data: CommodityControllerBulkCreateData
1563
+ ): CancelablePromise<CommodityControllerBulkCreateResponse> {
1306
1564
  return __request(OpenAPI, {
1307
1565
  method: 'POST',
1308
1566
  url: '/api/v1/{region}/bean/commodities/bulk',
@@ -1313,583 +1571,755 @@ export class BeanCommoditiesService {
1313
1571
  }
1314
1572
  }
1315
1573
 
1316
- export class RecurringRulesService {
1574
+ export class BeanPricesService {
1317
1575
  /**
1576
+ * Create a new price
1577
+ * Creates a new price entry for the authenticated user
1318
1578
  * @param data The data for the request.
1319
- * @param data.region Region code (cn, us, de)
1320
- * @returns unknown
1579
+ * @param data.region Region code for tenant context
1580
+ * @param data.requestBody
1581
+ * @returns PriceResponseDto Price created successfully
1321
1582
  * @throws ApiError
1322
1583
  */
1323
- public static recurringRuleController(
1324
- data: RecurringRuleControllerData
1325
- ): CancelablePromise<RecurringRuleControllerResponse> {
1584
+ public static priceControllerCreate(
1585
+ data: PriceControllerCreateData
1586
+ ): CancelablePromise<PriceControllerCreateResponse> {
1326
1587
  return __request(OpenAPI, {
1327
1588
  method: 'POST',
1328
- url: '/api/v1/{region}/bean/recurring-rules',
1589
+ url: '/api/v1/{region}/bean/prices',
1329
1590
  path: {
1330
1591
  region: data.region
1592
+ },
1593
+ body: data.requestBody,
1594
+ mediaType: 'application/json',
1595
+ errors: {
1596
+ 404: 'Currency or quoteCurrency commodity not found',
1597
+ 409: 'Price already exists for this currency pair and date'
1331
1598
  }
1332
1599
  });
1333
1600
  }
1334
1601
 
1335
1602
  /**
1336
- * List recurring rules
1337
- * Returns all recurring rules for the authenticated user with optional filtering
1603
+ * List user prices
1604
+ * Returns all price entries for the authenticated user with optional filtering
1338
1605
  * @param data The data for the request.
1339
- * @param data.region Region code (cn, us, de)
1340
- * @param data.isActive Filter by active status
1341
- * @param data.frequency Filter by frequency (WEEKLY, MONTHLY, etc.)
1342
- * @param data.hasAutoCreate Filter by autoCreate enabled
1343
- * @returns RecurringRuleResponseDto Rules retrieved successfully
1606
+ * @param data.region Region code for tenant context
1607
+ * @param data.currency Filter by currency (e.g., BTC, AAPL, USD)
1608
+ * @param data.quoteCurrency Filter by quote currency (pricing currency, e.g., USD, CNY)
1609
+ * @param data.dateFrom Filter prices from this date (ISO 8601 format)
1610
+ * @param data.dateTo Filter prices to this date (ISO 8601 format)
1611
+ * @param data.search Search term for currency or quoteCurrency (case-insensitive partial match)
1612
+ * @param data.page Page number for pagination (default: 1)
1613
+ * @param data.limit Number of items per page (default: 20, max: 100)
1614
+ * @returns PriceListResponseDto Prices retrieved successfully
1344
1615
  * @throws ApiError
1345
1616
  */
1346
- public static recurringRuleControllerFindAll(
1347
- data: RecurringRuleControllerFindAllData
1348
- ): CancelablePromise<RecurringRuleControllerFindAllResponse> {
1617
+ public static priceControllerFindAll(
1618
+ data: PriceControllerFindAllData
1619
+ ): CancelablePromise<PriceControllerFindAllResponse> {
1349
1620
  return __request(OpenAPI, {
1350
1621
  method: 'GET',
1351
- url: '/api/v1/{region}/bean/recurring-rules',
1622
+ url: '/api/v1/{region}/bean/prices',
1352
1623
  path: {
1353
1624
  region: data.region
1354
1625
  },
1355
1626
  query: {
1356
- isActive: data.isActive,
1357
- frequency: data.frequency,
1358
- hasAutoCreate: data.hasAutoCreate
1627
+ currency: data.currency,
1628
+ quoteCurrency: data.quoteCurrency,
1629
+ dateFrom: data.dateFrom,
1630
+ dateTo: data.dateTo,
1631
+ search: data.search,
1632
+ page: data.page,
1633
+ limit: data.limit
1359
1634
  }
1360
1635
  });
1361
1636
  }
1362
1637
 
1363
1638
  /**
1639
+ * Get price by ID
1640
+ * Returns a single price entry by its ID
1364
1641
  * @param data The data for the request.
1365
- * @param data.region Region code (cn, us, de)
1366
- * @returns unknown
1642
+ * @param data.id Price ID
1643
+ * @param data.region Region code for tenant context
1644
+ * @returns PriceResponseDto Price retrieved successfully
1367
1645
  * @throws ApiError
1368
1646
  */
1369
- public static recurringRuleController1(
1370
- data: RecurringRuleController1Data
1371
- ): CancelablePromise<RecurringRuleController1Response> {
1647
+ public static priceControllerFindOne(
1648
+ data: PriceControllerFindOneData
1649
+ ): CancelablePromise<PriceControllerFindOneResponse> {
1372
1650
  return __request(OpenAPI, {
1373
- method: 'POST',
1374
- url: '/api/v1/{region}/bean/recurring-rules/from-transaction/{transactionId}',
1651
+ method: 'GET',
1652
+ url: '/api/v1/{region}/bean/prices/{id}',
1375
1653
  path: {
1654
+ id: data.id,
1376
1655
  region: data.region
1656
+ },
1657
+ errors: {
1658
+ 404: 'Price not found'
1377
1659
  }
1378
1660
  });
1379
1661
  }
1380
1662
 
1381
1663
  /**
1382
- * Get recurring rule by ID
1383
- * Returns a specific recurring rule with its details
1664
+ * Update a price
1665
+ * Updates an existing price entry
1384
1666
  * @param data The data for the request.
1385
- * @param data.id Rule ID
1386
- * @param data.region Region code (cn, us, de)
1387
- * @returns RecurringRuleResponseDto Rule retrieved successfully
1667
+ * @param data.id Price ID
1668
+ * @param data.region Region code for tenant context
1669
+ * @param data.requestBody
1670
+ * @returns PriceResponseDto Price updated successfully
1388
1671
  * @throws ApiError
1389
1672
  */
1390
- public static recurringRuleControllerFindOne(
1391
- data: RecurringRuleControllerFindOneData
1392
- ): CancelablePromise<RecurringRuleControllerFindOneResponse> {
1673
+ public static priceControllerUpdate(
1674
+ data: PriceControllerUpdateData
1675
+ ): CancelablePromise<PriceControllerUpdateResponse> {
1393
1676
  return __request(OpenAPI, {
1394
- method: 'GET',
1395
- url: '/api/v1/{region}/bean/recurring-rules/{id}',
1677
+ method: 'PUT',
1678
+ url: '/api/v1/{region}/bean/prices/{id}',
1396
1679
  path: {
1397
1680
  id: data.id,
1398
1681
  region: data.region
1399
1682
  },
1683
+ body: data.requestBody,
1684
+ mediaType: 'application/json',
1400
1685
  errors: {
1401
- 404: 'Rule not found'
1686
+ 404: 'Price not found',
1687
+ 409: 'Updated price conflicts with existing price'
1402
1688
  }
1403
1689
  });
1404
1690
  }
1405
1691
 
1406
1692
  /**
1693
+ * Delete a price
1694
+ * Deletes a price entry (hard delete)
1407
1695
  * @param data The data for the request.
1408
- * @param data.region Region code (cn, us, de)
1409
- * @returns unknown
1696
+ * @param data.id Price ID
1697
+ * @param data.region Region code for tenant context
1698
+ * @returns void Price deleted successfully
1410
1699
  * @throws ApiError
1411
1700
  */
1412
- public static recurringRuleController2(
1413
- data: RecurringRuleController2Data
1414
- ): CancelablePromise<RecurringRuleController2Response> {
1701
+ public static priceControllerDelete(
1702
+ data: PriceControllerDeleteData
1703
+ ): CancelablePromise<PriceControllerDeleteResponse> {
1415
1704
  return __request(OpenAPI, {
1416
- method: 'PATCH',
1417
- url: '/api/v1/{region}/bean/recurring-rules/{id}',
1705
+ method: 'DELETE',
1706
+ url: '/api/v1/{region}/bean/prices/{id}',
1418
1707
  path: {
1708
+ id: data.id,
1419
1709
  region: data.region
1710
+ },
1711
+ errors: {
1712
+ 404: 'Price not found'
1420
1713
  }
1421
1714
  });
1422
1715
  }
1423
1716
 
1424
1717
  /**
1718
+ * Bulk create prices
1719
+ * Creates multiple price entries at once (skips duplicates)
1425
1720
  * @param data The data for the request.
1426
- * @param data.region Region code (cn, us, de)
1427
- * @returns void
1721
+ * @param data.region Region code for tenant context
1722
+ * @param data.requestBody
1723
+ * @returns PriceResponseDto Prices created successfully
1428
1724
  * @throws ApiError
1429
1725
  */
1430
- public static recurringRuleController3(
1431
- data: RecurringRuleController3Data
1432
- ): CancelablePromise<RecurringRuleController3Response> {
1726
+ public static priceControllerBulkCreate(
1727
+ data: PriceControllerBulkCreateData
1728
+ ): CancelablePromise<PriceControllerBulkCreateResponse> {
1433
1729
  return __request(OpenAPI, {
1434
- method: 'DELETE',
1435
- url: '/api/v1/{region}/bean/recurring-rules/{id}',
1730
+ method: 'POST',
1731
+ url: '/api/v1/{region}/bean/prices/bulk',
1436
1732
  path: {
1437
1733
  region: data.region
1438
- }
1734
+ },
1735
+ body: data.requestBody,
1736
+ mediaType: 'application/json'
1439
1737
  });
1440
1738
  }
1739
+ }
1441
1740
 
1741
+ export class RecurringRulesService {
1442
1742
  /**
1443
- * Get rule with statistics
1444
- * Returns a rule with pending/overdue counts and next expected date
1743
+ * Create a new recurring rule
1744
+ * Creates a new recurring transaction rule for the authenticated user
1445
1745
  * @param data The data for the request.
1446
- * @param data.id Rule ID
1447
- * @param data.region Region code (cn, us, de)
1448
- * @returns RecurringRuleWithStatsResponseDto Rule with stats retrieved successfully
1746
+ * @param data.region Region code for tenant context
1747
+ * @param data.requestBody
1748
+ * @returns RecurringRuleResponseDto Rule created successfully
1449
1749
  * @throws ApiError
1450
1750
  */
1451
- public static recurringRuleControllerGetWithStats(
1452
- data: RecurringRuleControllerGetWithStatsData
1453
- ): CancelablePromise<RecurringRuleControllerGetWithStatsResponse> {
1751
+ public static recurringRuleControllerCreate(
1752
+ data: RecurringRuleControllerCreateData
1753
+ ): CancelablePromise<RecurringRuleControllerCreateResponse> {
1454
1754
  return __request(OpenAPI, {
1455
- method: 'GET',
1456
- url: '/api/v1/{region}/bean/recurring-rules/{id}/stats',
1755
+ method: 'POST',
1756
+ url: '/api/v1/{region}/bean/recurring-rules',
1457
1757
  path: {
1458
- id: data.id,
1459
1758
  region: data.region
1460
1759
  },
1760
+ body: data.requestBody,
1761
+ mediaType: 'application/json',
1461
1762
  errors: {
1462
- 404: 'Rule not found'
1763
+ 400: 'Invalid input data (e.g., autoCreate without accounts)',
1764
+ 409: 'Rule with same name already exists'
1463
1765
  }
1464
1766
  });
1465
1767
  }
1466
- }
1467
1768
 
1468
- export class ExpectedTransactionsService {
1469
1769
  /**
1470
- * List expected transactions
1471
- * Returns expected transactions for the authenticated user with optional filtering
1770
+ * List recurring rules
1771
+ * Returns all recurring rules for the authenticated user with optional filtering
1472
1772
  * @param data The data for the request.
1473
- * @param data.region Region code (cn, us, de)
1474
- * @param data.ruleId Filter by recurring rule ID
1475
- * @param data.status Filter by status (PENDING, COMPLETED, SKIPPED)
1476
- * @param data.fromDate Filter by date range start (YYYY-MM-DD)
1477
- * @param data.toDate Filter by date range end (YYYY-MM-DD)
1478
- * @returns ExpectedTransactionListResponseDto Expected transactions retrieved successfully
1773
+ * @param data.region Region code for tenant context
1774
+ * @param data.isActive Filter by active status
1775
+ * @param data.frequency Filter by frequency (WEEKLY, MONTHLY, etc.)
1776
+ * @param data.hasAutoCreate Filter by autoCreate enabled
1777
+ * @returns RecurringRuleResponseDto Rules retrieved successfully
1479
1778
  * @throws ApiError
1480
1779
  */
1481
- public static expectedTransactionControllerFindAll(
1482
- data: ExpectedTransactionControllerFindAllData
1483
- ): CancelablePromise<ExpectedTransactionControllerFindAllResponse> {
1780
+ public static recurringRuleControllerFindAll(
1781
+ data: RecurringRuleControllerFindAllData
1782
+ ): CancelablePromise<RecurringRuleControllerFindAllResponse> {
1484
1783
  return __request(OpenAPI, {
1485
1784
  method: 'GET',
1486
- url: '/api/v1/{region}/bean/expected-transactions',
1785
+ url: '/api/v1/{region}/bean/recurring-rules',
1487
1786
  path: {
1488
1787
  region: data.region
1489
1788
  },
1490
1789
  query: {
1491
- ruleId: data.ruleId,
1492
- status: data.status,
1493
- fromDate: data.fromDate,
1494
- toDate: data.toDate
1495
- }
1790
+ isActive: data.isActive,
1791
+ frequency: data.frequency,
1792
+ hasAutoCreate: data.hasAutoCreate
1793
+ }
1496
1794
  });
1497
1795
  }
1498
1796
 
1499
1797
  /**
1500
- * List overdue expected transactions
1501
- * Returns all overdue expected transactions (PENDING past tolerance)
1798
+ * Create recurring rule from transaction
1799
+ * Auto-creates a recurring rule using transaction data. User only confirms frequency.
1502
1800
  * @param data The data for the request.
1503
- * @param data.region Region code (cn, us, de)
1504
- * @returns ExpectedTransactionListResponseDto Overdue transactions retrieved successfully
1801
+ * @param data.transactionId Source transaction ID
1802
+ * @param data.region Region code for tenant context
1803
+ * @param data.requestBody
1804
+ * @returns RecurringRuleResponseDto Rule created successfully
1505
1805
  * @throws ApiError
1506
1806
  */
1507
- public static expectedTransactionControllerFindOverdue(
1508
- data: ExpectedTransactionControllerFindOverdueData
1509
- ): CancelablePromise<ExpectedTransactionControllerFindOverdueResponse> {
1807
+ public static recurringRuleControllerCreateFromTransaction(
1808
+ data: RecurringRuleControllerCreateFromTransactionData
1809
+ ): CancelablePromise<RecurringRuleControllerCreateFromTransactionResponse> {
1510
1810
  return __request(OpenAPI, {
1511
- method: 'GET',
1512
- url: '/api/v1/{region}/bean/expected-transactions/overdue',
1811
+ method: 'POST',
1812
+ url: '/api/v1/{region}/bean/recurring-rules/from-transaction/{transactionId}',
1513
1813
  path: {
1814
+ transactionId: data.transactionId,
1514
1815
  region: data.region
1816
+ },
1817
+ body: data.requestBody,
1818
+ mediaType: 'application/json',
1819
+ errors: {
1820
+ 404: 'Transaction not found',
1821
+ 409: 'Rule with same name already exists or transaction already linked'
1515
1822
  }
1516
1823
  });
1517
1824
  }
1518
1825
 
1519
1826
  /**
1520
- * Get expected transaction by ID
1521
- * Returns a specific expected transaction with rule details
1827
+ * Get recurring rule by ID
1828
+ * Returns a specific recurring rule with its details
1522
1829
  * @param data The data for the request.
1523
- * @param data.id Expected transaction ID
1524
- * @param data.region Region code (cn, us, de)
1525
- * @returns ExpectedTransactionResponseDto Expected transaction retrieved successfully
1830
+ * @param data.id Rule ID
1831
+ * @param data.region Region code for tenant context
1832
+ * @returns RecurringRuleResponseDto Rule retrieved successfully
1526
1833
  * @throws ApiError
1527
1834
  */
1528
- public static expectedTransactionControllerFindOne(
1529
- data: ExpectedTransactionControllerFindOneData
1530
- ): CancelablePromise<ExpectedTransactionControllerFindOneResponse> {
1835
+ public static recurringRuleControllerFindOne(
1836
+ data: RecurringRuleControllerFindOneData
1837
+ ): CancelablePromise<RecurringRuleControllerFindOneResponse> {
1531
1838
  return __request(OpenAPI, {
1532
1839
  method: 'GET',
1533
- url: '/api/v1/{region}/bean/expected-transactions/{id}',
1840
+ url: '/api/v1/{region}/bean/recurring-rules/{id}',
1534
1841
  path: {
1535
1842
  id: data.id,
1536
1843
  region: data.region
1537
1844
  },
1538
1845
  errors: {
1539
- 404: 'Expected transaction not found'
1846
+ 404: 'Rule not found'
1540
1847
  }
1541
1848
  });
1542
1849
  }
1543
1850
 
1544
1851
  /**
1852
+ * Update recurring rule
1853
+ * Updates an existing recurring rule
1545
1854
  * @param data The data for the request.
1546
- * @param data.region Region code (cn, us, de)
1547
- * @returns unknown
1855
+ * @param data.id Rule ID
1856
+ * @param data.region Region code for tenant context
1857
+ * @param data.requestBody
1858
+ * @returns RecurringRuleResponseDto Rule updated successfully
1548
1859
  * @throws ApiError
1549
1860
  */
1550
- public static expectedTransactionController(
1551
- data: ExpectedTransactionControllerData
1552
- ): CancelablePromise<ExpectedTransactionControllerResponse> {
1861
+ public static recurringRuleControllerUpdate(
1862
+ data: RecurringRuleControllerUpdateData
1863
+ ): CancelablePromise<RecurringRuleControllerUpdateResponse> {
1553
1864
  return __request(OpenAPI, {
1554
- method: 'POST',
1555
- url: '/api/v1/{region}/bean/expected-transactions/{id}/skip',
1865
+ method: 'PATCH',
1866
+ url: '/api/v1/{region}/bean/recurring-rules/{id}',
1556
1867
  path: {
1868
+ id: data.id,
1557
1869
  region: data.region
1870
+ },
1871
+ body: data.requestBody,
1872
+ mediaType: 'application/json',
1873
+ errors: {
1874
+ 400: 'Invalid input data',
1875
+ 404: 'Rule not found'
1558
1876
  }
1559
1877
  });
1560
1878
  }
1561
1879
 
1562
1880
  /**
1881
+ * Delete recurring rule
1882
+ * Soft deletes a recurring rule (sets isActive to false)
1563
1883
  * @param data The data for the request.
1564
- * @param data.region Region code (cn, us, de)
1565
- * @returns unknown
1884
+ * @param data.id Rule ID
1885
+ * @param data.region Region code for tenant context
1886
+ * @returns void Rule deleted successfully
1566
1887
  * @throws ApiError
1567
1888
  */
1568
- public static expectedTransactionController1(
1569
- data: ExpectedTransactionController1Data
1570
- ): CancelablePromise<ExpectedTransactionController1Response> {
1889
+ public static recurringRuleControllerDelete(
1890
+ data: RecurringRuleControllerDeleteData
1891
+ ): CancelablePromise<RecurringRuleControllerDeleteResponse> {
1571
1892
  return __request(OpenAPI, {
1572
1893
  method: 'DELETE',
1573
- url: '/api/v1/{region}/bean/expected-transactions/{id}/skip',
1894
+ url: '/api/v1/{region}/bean/recurring-rules/{id}',
1574
1895
  path: {
1896
+ id: data.id,
1575
1897
  region: data.region
1898
+ },
1899
+ errors: {
1900
+ 404: 'Rule not found'
1576
1901
  }
1577
1902
  });
1578
1903
  }
1579
1904
 
1580
1905
  /**
1906
+ * Get rule with statistics
1907
+ * Returns a rule with pending/overdue counts and next expected date
1581
1908
  * @param data The data for the request.
1582
- * @param data.region Region code (cn, us, de)
1583
- * @returns unknown
1909
+ * @param data.id Rule ID
1910
+ * @param data.region Region code for tenant context
1911
+ * @returns RecurringRuleWithStatsResponseDto Rule with stats retrieved successfully
1584
1912
  * @throws ApiError
1585
1913
  */
1586
- public static expectedTransactionController2(
1587
- data: ExpectedTransactionController2Data
1588
- ): CancelablePromise<ExpectedTransactionController2Response> {
1914
+ public static recurringRuleControllerGetWithStats(
1915
+ data: RecurringRuleControllerGetWithStatsData
1916
+ ): CancelablePromise<RecurringRuleControllerGetWithStatsResponse> {
1589
1917
  return __request(OpenAPI, {
1590
- method: 'POST',
1591
- url: '/api/v1/{region}/bean/expected-transactions/{id}/match',
1918
+ method: 'GET',
1919
+ url: '/api/v1/{region}/bean/recurring-rules/{id}/stats',
1592
1920
  path: {
1921
+ id: data.id,
1593
1922
  region: data.region
1923
+ },
1924
+ errors: {
1925
+ 404: 'Rule not found'
1594
1926
  }
1595
1927
  });
1596
1928
  }
1929
+ }
1597
1930
 
1931
+ export class ExpectedTransactionsService {
1598
1932
  /**
1933
+ * List expected transactions
1934
+ * Returns expected transactions for the authenticated user with optional filtering
1599
1935
  * @param data The data for the request.
1600
- * @param data.region Region code (cn, us, de)
1601
- * @returns unknown
1936
+ * @param data.region Region code for tenant context
1937
+ * @param data.ruleId Filter by recurring rule ID
1938
+ * @param data.status Filter by status (PENDING, COMPLETED, SKIPPED)
1939
+ * @param data.fromDate Filter by date range start (YYYY-MM-DD)
1940
+ * @param data.toDate Filter by date range end (YYYY-MM-DD)
1941
+ * @returns ExpectedTransactionListResponseDto Expected transactions retrieved successfully
1602
1942
  * @throws ApiError
1603
1943
  */
1604
- public static expectedTransactionController3(
1605
- data: ExpectedTransactionController3Data
1606
- ): CancelablePromise<ExpectedTransactionController3Response> {
1944
+ public static expectedTransactionControllerFindAll(
1945
+ data: ExpectedTransactionControllerFindAllData
1946
+ ): CancelablePromise<ExpectedTransactionControllerFindAllResponse> {
1607
1947
  return __request(OpenAPI, {
1608
- method: 'DELETE',
1609
- url: '/api/v1/{region}/bean/expected-transactions/{id}/match',
1948
+ method: 'GET',
1949
+ url: '/api/v1/{region}/bean/expected-transactions',
1610
1950
  path: {
1611
1951
  region: data.region
1952
+ },
1953
+ query: {
1954
+ ruleId: data.ruleId,
1955
+ status: data.status,
1956
+ fromDate: data.fromDate,
1957
+ toDate: data.toDate
1612
1958
  }
1613
1959
  });
1614
1960
  }
1615
1961
 
1616
1962
  /**
1963
+ * List overdue expected transactions
1964
+ * Returns all overdue expected transactions (PENDING past tolerance)
1617
1965
  * @param data The data for the request.
1618
- * @param data.region Region code (cn, us, de)
1619
- * @returns unknown
1966
+ * @param data.region Region code for tenant context
1967
+ * @returns ExpectedTransactionListResponseDto Overdue transactions retrieved successfully
1620
1968
  * @throws ApiError
1621
1969
  */
1622
- public static expectedTransactionController4(
1623
- data: ExpectedTransactionController4Data
1624
- ): CancelablePromise<ExpectedTransactionController4Response> {
1970
+ public static expectedTransactionControllerFindOverdue(
1971
+ data: ExpectedTransactionControllerFindOverdueData
1972
+ ): CancelablePromise<ExpectedTransactionControllerFindOverdueResponse> {
1625
1973
  return __request(OpenAPI, {
1626
- method: 'POST',
1627
- url: '/api/v1/{region}/bean/expected-transactions/{id}/enter',
1974
+ method: 'GET',
1975
+ url: '/api/v1/{region}/bean/expected-transactions/overdue',
1628
1976
  path: {
1629
1977
  region: data.region
1630
1978
  }
1631
1979
  });
1632
1980
  }
1633
- }
1634
1981
 
1635
- export class RecurringForecastService {
1636
1982
  /**
1637
- * Get cash flow forecast
1638
- * Returns predicted outflows for the next N months based on active recurring rules
1983
+ * Get expected transaction by ID
1984
+ * Returns a specific expected transaction with rule details
1639
1985
  * @param data The data for the request.
1640
- * @param data.region Region code (cn, us, de)
1641
- * @param data.months Number of months to forecast (1-12, default 3)
1642
- * @returns ForecastResponseDto Forecast retrieved successfully
1986
+ * @param data.id Expected transaction ID
1987
+ * @param data.region Region code for tenant context
1988
+ * @returns ExpectedTransactionResponseDto Expected transaction retrieved successfully
1643
1989
  * @throws ApiError
1644
1990
  */
1645
- public static forecastControllerGetForecast(
1646
- data: ForecastControllerGetForecastData
1647
- ): CancelablePromise<ForecastControllerGetForecastResponse> {
1991
+ public static expectedTransactionControllerFindOne(
1992
+ data: ExpectedTransactionControllerFindOneData
1993
+ ): CancelablePromise<ExpectedTransactionControllerFindOneResponse> {
1648
1994
  return __request(OpenAPI, {
1649
1995
  method: 'GET',
1650
- url: '/api/v1/{region}/bean/recurring/forecast',
1996
+ url: '/api/v1/{region}/bean/expected-transactions/{id}',
1651
1997
  path: {
1998
+ id: data.id,
1652
1999
  region: data.region
1653
2000
  },
1654
- query: {
1655
- months: data.months
2001
+ errors: {
2002
+ 404: 'Expected transaction not found'
1656
2003
  }
1657
2004
  });
1658
2005
  }
1659
- }
1660
2006
 
1661
- export class BeanTransactionRulesService {
1662
2007
  /**
2008
+ * Skip expected transaction
2009
+ * Marks an expected transaction as skipped (PENDING -> SKIPPED)
1663
2010
  * @param data The data for the request.
1664
- * @param data.region Region code (cn, us, de)
1665
- * @returns unknown
2011
+ * @param data.id Expected transaction ID
2012
+ * @param data.region Region code for tenant context
2013
+ * @returns ExpectedTransactionResponseDto Expected transaction skipped successfully
1666
2014
  * @throws ApiError
1667
2015
  */
1668
- public static transactionRuleController(
1669
- data: TransactionRuleControllerData
1670
- ): CancelablePromise<TransactionRuleControllerResponse> {
2016
+ public static expectedTransactionControllerSkip(
2017
+ data: ExpectedTransactionControllerSkipData
2018
+ ): CancelablePromise<ExpectedTransactionControllerSkipResponse> {
1671
2019
  return __request(OpenAPI, {
1672
2020
  method: 'POST',
1673
- url: '/api/v1/{region}/bean/transaction-rules',
2021
+ url: '/api/v1/{region}/bean/expected-transactions/{id}/skip',
1674
2022
  path: {
2023
+ id: data.id,
1675
2024
  region: data.region
2025
+ },
2026
+ errors: {
2027
+ 400: 'Cannot skip - not in PENDING status',
2028
+ 404: 'Expected transaction not found'
1676
2029
  }
1677
2030
  });
1678
2031
  }
1679
2032
 
1680
2033
  /**
1681
- * Get all transaction rules for user
2034
+ * Undo skip
2035
+ * Reverses a skip operation (SKIPPED -> PENDING)
1682
2036
  * @param data The data for the request.
1683
- * @param data.region Region code (cn, us, de)
1684
- * @param data.limit Max results per page (default: 20, max: 100)
1685
- * @param data.offset Pagination offset (default: 0)
1686
- * @param data.enabled Filter by enabled status
1687
- * @param data.learningSource Filter by learning source. Omit this parameter or pass empty string to get manually created rules (learningSource is null in database).
1688
- * @param data.autoApplyEnabled Filter by auto-apply status
1689
- * @returns TransactionRuleListResponseDto List of rules
2037
+ * @param data.id Expected transaction ID
2038
+ * @param data.region Region code for tenant context
2039
+ * @returns ExpectedTransactionResponseDto Skip undone successfully
1690
2040
  * @throws ApiError
1691
2041
  */
1692
- public static transactionRuleControllerList(
1693
- data: TransactionRuleControllerListData
1694
- ): CancelablePromise<TransactionRuleControllerListResponse> {
2042
+ public static expectedTransactionControllerUndoSkip(
2043
+ data: ExpectedTransactionControllerUndoSkipData
2044
+ ): CancelablePromise<ExpectedTransactionControllerUndoSkipResponse> {
1695
2045
  return __request(OpenAPI, {
1696
- method: 'GET',
1697
- url: '/api/v1/{region}/bean/transaction-rules',
2046
+ method: 'DELETE',
2047
+ url: '/api/v1/{region}/bean/expected-transactions/{id}/skip',
1698
2048
  path: {
2049
+ id: data.id,
1699
2050
  region: data.region
1700
2051
  },
1701
- query: {
1702
- limit: data.limit,
1703
- offset: data.offset,
1704
- enabled: data.enabled,
1705
- learningSource: data.learningSource,
1706
- autoApplyEnabled: data.autoApplyEnabled
1707
- },
1708
2052
  errors: {
1709
- 401: 'Unauthorized'
2053
+ 400: 'Cannot undo - not in SKIPPED status',
2054
+ 404: 'Expected transaction not found'
1710
2055
  }
1711
2056
  });
1712
2057
  }
1713
2058
 
1714
2059
  /**
1715
- * Validate transaction rule configuration
2060
+ * Confirm transaction match
2061
+ * Manually matches an expected transaction with an actual transaction
1716
2062
  * @param data The data for the request.
1717
- * @param data.region Region code (cn, us, de)
2063
+ * @param data.id Expected transaction ID
2064
+ * @param data.region Region code for tenant context
1718
2065
  * @param data.requestBody
1719
- * @returns ValidateRuleResponseDto Validation result
2066
+ * @returns unknown Match confirmed successfully
1720
2067
  * @throws ApiError
1721
2068
  */
1722
- public static transactionRuleControllerValidate(
1723
- data: TransactionRuleControllerValidateData
1724
- ): CancelablePromise<TransactionRuleControllerValidateResponse> {
2069
+ public static expectedTransactionControllerConfirmMatch(
2070
+ data: ExpectedTransactionControllerConfirmMatchData
2071
+ ): CancelablePromise<ExpectedTransactionControllerConfirmMatchResponse> {
1725
2072
  return __request(OpenAPI, {
1726
2073
  method: 'POST',
1727
- url: '/api/v1/{region}/bean/transaction-rules/validate',
2074
+ url: '/api/v1/{region}/bean/expected-transactions/{id}/match',
1728
2075
  path: {
2076
+ id: data.id,
1729
2077
  region: data.region
1730
2078
  },
1731
2079
  body: data.requestBody,
1732
2080
  mediaType: 'application/json',
1733
2081
  errors: {
1734
- 401: 'Unauthorized'
2082
+ 400: 'Cannot match - not in PENDING status',
2083
+ 404: 'Expected or actual transaction not found',
2084
+ 409: 'Actual transaction already matched to another rule'
1735
2085
  }
1736
2086
  });
1737
2087
  }
1738
2088
 
1739
2089
  /**
2090
+ * Unmatch transaction
2091
+ * Removes the match between expected and actual transaction (COMPLETED -> PENDING)
1740
2092
  * @param data The data for the request.
1741
- * @param data.region Region code (cn, us, de)
1742
- * @returns unknown
2093
+ * @param data.id Expected transaction ID
2094
+ * @param data.region Region code for tenant context
2095
+ * @returns unknown Match removed successfully
1743
2096
  * @throws ApiError
1744
2097
  */
1745
- public static transactionRuleController1(
1746
- data: TransactionRuleController1Data
1747
- ): CancelablePromise<TransactionRuleController1Response> {
2098
+ public static expectedTransactionControllerUnmatch(
2099
+ data: ExpectedTransactionControllerUnmatchData
2100
+ ): CancelablePromise<ExpectedTransactionControllerUnmatchResponse> {
1748
2101
  return __request(OpenAPI, {
1749
- method: 'POST',
1750
- url: '/api/v1/{region}/bean/transaction-rules/bulk',
2102
+ method: 'DELETE',
2103
+ url: '/api/v1/{region}/bean/expected-transactions/{id}/match',
1751
2104
  path: {
2105
+ id: data.id,
1752
2106
  region: data.region
2107
+ },
2108
+ errors: {
2109
+ 400: 'Cannot unmatch - not in COMPLETED status',
2110
+ 404: 'Expected transaction not found'
1753
2111
  }
1754
2112
  });
1755
2113
  }
1756
2114
 
1757
2115
  /**
1758
- * Export transaction rules
2116
+ * Enter Now
2117
+ * Creates an actual transaction for an expected transaction (YNAB-style Enter Now)
1759
2118
  * @param data The data for the request.
1760
- * @param data.format Export format (currently only JSON supported)
1761
- * @param data.region Region code (cn, us, de)
1762
- * @returns ExportRulesResponseDto Exported rules
2119
+ * @param data.id Expected transaction ID
2120
+ * @param data.region Region code for tenant context
2121
+ * @param data.requestBody
2122
+ * @returns unknown Transaction created successfully
1763
2123
  * @throws ApiError
1764
2124
  */
1765
- public static transactionRuleControllerExport(
1766
- data: TransactionRuleControllerExportData
1767
- ): CancelablePromise<TransactionRuleControllerExportResponse> {
2125
+ public static expectedTransactionControllerEnterNow(
2126
+ data: ExpectedTransactionControllerEnterNowData
2127
+ ): CancelablePromise<ExpectedTransactionControllerEnterNowResponse> {
1768
2128
  return __request(OpenAPI, {
1769
- method: 'GET',
1770
- url: '/api/v1/{region}/bean/transaction-rules/export/{format}',
2129
+ method: 'POST',
2130
+ url: '/api/v1/{region}/bean/expected-transactions/{id}/enter',
1771
2131
  path: {
1772
- format: data.format,
2132
+ id: data.id,
1773
2133
  region: data.region
1774
2134
  },
2135
+ body: data.requestBody,
2136
+ mediaType: 'application/json',
1775
2137
  errors: {
1776
- 400: 'Unsupported format',
1777
- 401: 'Unauthorized'
2138
+ 400: 'Cannot enter - not in PENDING status or missing accounts',
2139
+ 404: 'Expected transaction or accounts not found'
1778
2140
  }
1779
2141
  });
1780
2142
  }
2143
+ }
1781
2144
 
2145
+ export class RecurringForecastService {
1782
2146
  /**
1783
- * Get transaction rule statistics
2147
+ * Get cash flow forecast
2148
+ * Returns predicted outflows for the next N months based on active recurring rules
1784
2149
  * @param data The data for the request.
1785
- * @param data.period Statistics time period
1786
- * @param data.region Region code (cn, us, de)
1787
- * @returns RuleStatisticsResponseDto Rule statistics
2150
+ * @param data.region Region code for tenant context
2151
+ * @param data.months Number of months to forecast (1-12, default 3)
2152
+ * @returns ForecastResponseDto Forecast retrieved successfully
1788
2153
  * @throws ApiError
1789
2154
  */
1790
- public static transactionRuleControllerGetStatistics(
1791
- data: TransactionRuleControllerGetStatisticsData
1792
- ): CancelablePromise<TransactionRuleControllerGetStatisticsResponse> {
2155
+ public static forecastControllerGetForecast(
2156
+ data: ForecastControllerGetForecastData
2157
+ ): CancelablePromise<ForecastControllerGetForecastResponse> {
1793
2158
  return __request(OpenAPI, {
1794
2159
  method: 'GET',
1795
- url: '/api/v1/{region}/bean/transaction-rules/statistics/{period}',
2160
+ url: '/api/v1/{region}/bean/recurring/forecast',
1796
2161
  path: {
1797
- period: data.period,
1798
2162
  region: data.region
1799
2163
  },
1800
- errors: {
1801
- 401: 'Unauthorized'
2164
+ query: {
2165
+ months: data.months
1802
2166
  }
1803
2167
  });
1804
2168
  }
2169
+ }
1805
2170
 
2171
+ export class ReportingService {
1806
2172
  /**
1807
- * Get transaction rule detail
2173
+ * Get portfolio value trends
2174
+ *
2175
+ * Returns time series data of portfolio net worth.
2176
+ *
2177
+ * **Multi-currency Support:**
2178
+ * - `series[].byCurrency` - Currency breakdown for each data point
2179
+ * - `byCurrency` - Separate time series grouped by currency
2180
+ * - `warnings` - Exchange rate warnings if conversion failed
2181
+ *
2182
+ * **Parameters:**
2183
+ * - `period`: Time period (1m, 3m, 6m, 1y)
2184
+ * - `granularity`: Data granularity (day, week, month)
2185
+ *
1808
2186
  * @param data The data for the request.
1809
- * @param data.ruleId Rule ID
1810
- * @param data.region Region code (cn, us, de)
1811
- * @returns TransactionRuleResponseDto Rule details
2187
+ * @param data.region Region code for tenant context
2188
+ * @param data.period Time period
2189
+ * @param data.granularity Data granularity
2190
+ * @returns PortfolioTrendsResponseDto Trends retrieved successfully
1812
2191
  * @throws ApiError
1813
2192
  */
1814
- public static transactionRuleControllerGetDetail(
1815
- data: TransactionRuleControllerGetDetailData
1816
- ): CancelablePromise<TransactionRuleControllerGetDetailResponse> {
2193
+ public static reportingControllerGetPortfolioTrends(
2194
+ data: ReportingControllerGetPortfolioTrendsData
2195
+ ): CancelablePromise<ReportingControllerGetPortfolioTrendsResponse> {
1817
2196
  return __request(OpenAPI, {
1818
2197
  method: 'GET',
1819
- url: '/api/v1/{region}/bean/transaction-rules/{ruleId}',
2198
+ url: '/api/v1/{region}/reporting/portfolio/trends',
1820
2199
  path: {
1821
- ruleId: data.ruleId,
1822
2200
  region: data.region
1823
2201
  },
2202
+ query: {
2203
+ period: data.period,
2204
+ granularity: data.granularity
2205
+ },
1824
2206
  errors: {
1825
- 401: 'Unauthorized',
1826
- 403: 'Forbidden - not owner of rule',
1827
- 404: 'Rule not found'
2207
+ 401: 'User not authenticated'
1828
2208
  }
1829
2209
  });
1830
2210
  }
1831
2211
 
1832
2212
  /**
2213
+ * Get cash-flow trends
2214
+ *
2215
+ * Monthly income / expense / netSavings over a fixed N-month window
2216
+ * (current month + N−1 prior). Missing months are zero-filled (flow metric).
2217
+ *
2218
+ * **Parameters:**
2219
+ * - `period`: 1m | 3m | 6m | 1y (default 6m)
2220
+ * - `granularity`: accepted for API symmetry; v1 returns month buckets
2221
+ *
1833
2222
  * @param data The data for the request.
1834
- * @param data.region Region code (cn, us, de)
1835
- * @returns unknown
2223
+ * @param data.region Region code for tenant context
2224
+ * @param data.period Time period
2225
+ * @param data.granularity Data granularity (accepted for API symmetry; v1 returns month buckets)
2226
+ * @returns CashFlowTrendsResponseDto Cash-flow trends retrieved successfully
1836
2227
  * @throws ApiError
1837
2228
  */
1838
- public static transactionRuleController2(
1839
- data: TransactionRuleController2Data
1840
- ): CancelablePromise<TransactionRuleController2Response> {
2229
+ public static reportingControllerGetCashFlowTrends(
2230
+ data: ReportingControllerGetCashFlowTrendsData
2231
+ ): CancelablePromise<ReportingControllerGetCashFlowTrendsResponse> {
1841
2232
  return __request(OpenAPI, {
1842
- method: 'PUT',
1843
- url: '/api/v1/{region}/bean/transaction-rules/{ruleId}',
2233
+ method: 'GET',
2234
+ url: '/api/v1/{region}/reporting/cash-flow/trends',
1844
2235
  path: {
1845
2236
  region: data.region
2237
+ },
2238
+ query: {
2239
+ period: data.period,
2240
+ granularity: data.granularity
2241
+ },
2242
+ errors: {
2243
+ 401: 'User not authenticated'
1846
2244
  }
1847
2245
  });
1848
2246
  }
1849
2247
 
1850
2248
  /**
2249
+ * Generate portfolio snapshot
2250
+ *
2251
+ * Manually generate a portfolio snapshot for a specific date.
2252
+ *
2253
+ * **Multi-currency Support:**
2254
+ * - Fetches balances grouped by currency
2255
+ * - Uses user's baseCurrency setting for conversion
2256
+ * - Stores exchange rates and warnings
2257
+ *
2258
+ * **Use Cases:**
2259
+ * - Testing snapshot generation
2260
+ * - Force regeneration after data correction
2261
+ * - Initial setup for new users
2262
+ *
1851
2263
  * @param data The data for the request.
1852
- * @param data.region Region code (cn, us, de)
1853
- * @returns void
2264
+ * @param data.region Region code for tenant context
2265
+ * @param data.requestBody Optional date (defaults to today)
2266
+ * @returns GenerateSnapshotResponse Snapshot generated successfully
1854
2267
  * @throws ApiError
1855
2268
  */
1856
- public static transactionRuleController3(
1857
- data: TransactionRuleController3Data
1858
- ): CancelablePromise<TransactionRuleController3Response> {
2269
+ public static reportingControllerGenerateSnapshot(
2270
+ data: ReportingControllerGenerateSnapshotData
2271
+ ): CancelablePromise<ReportingControllerGenerateSnapshotResponse> {
1859
2272
  return __request(OpenAPI, {
1860
- method: 'DELETE',
1861
- url: '/api/v1/{region}/bean/transaction-rules/{ruleId}',
2273
+ method: 'POST',
2274
+ url: '/api/v1/{region}/reporting/snapshots/generate',
1862
2275
  path: {
1863
2276
  region: data.region
2277
+ },
2278
+ body: data.requestBody,
2279
+ mediaType: 'application/json',
2280
+ errors: {
2281
+ 400: 'Invalid date format',
2282
+ 401: 'User not authenticated'
1864
2283
  }
1865
2284
  });
1866
2285
  }
1867
2286
 
1868
2287
  /**
1869
- * Test rule matching
2288
+ * Backfill portfolio snapshots
2289
+ *
2290
+ * Generate snapshots for a date range (historical data backfill).
2291
+ *
2292
+ * **Multi-currency Support:**
2293
+ * - Each snapshot includes multi-currency data
2294
+ * - Uses exchange rates available at generation time
2295
+ * - Warnings stored for missing exchange rates
2296
+ *
2297
+ * **Best Practices:**
2298
+ * - Use for initial setup after account configuration
2299
+ * - Run during low-traffic periods for large date ranges
2300
+ * - Existing snapshots are skipped (not regenerated)
2301
+ *
1870
2302
  * @param data The data for the request.
1871
- * @param data.ruleId Rule ID to test
1872
- * @param data.region Region code (cn, us, de)
2303
+ * @param data.region Region code for tenant context
1873
2304
  * @param data.requestBody
1874
- * @returns TestRuleResponseDto Test result
2305
+ * @returns BackfillSnapshotsResponse Backfill completed successfully
1875
2306
  * @throws ApiError
1876
2307
  */
1877
- public static transactionRuleControllerTest(
1878
- data: TransactionRuleControllerTestData
1879
- ): CancelablePromise<TransactionRuleControllerTestResponse> {
2308
+ public static reportingControllerBackfillSnapshots(
2309
+ data: ReportingControllerBackfillSnapshotsData
2310
+ ): CancelablePromise<ReportingControllerBackfillSnapshotsResponse> {
1880
2311
  return __request(OpenAPI, {
1881
2312
  method: 'POST',
1882
- url: '/api/v1/{region}/bean/transaction-rules/{ruleId}/test',
2313
+ url: '/api/v1/{region}/reporting/snapshots/backfill',
1883
2314
  path: {
1884
- ruleId: data.ruleId,
1885
2315
  region: data.region
1886
2316
  },
1887
2317
  body: data.requestBody,
1888
2318
  mediaType: 'application/json',
1889
2319
  errors: {
1890
- 401: 'Unauthorized',
1891
- 403: 'Forbidden - not owner of rule',
1892
- 404: 'Rule not found'
2320
+ 400: 'Invalid date format or range',
2321
+ 401: 'User not authenticated',
2322
+ 409: 'Backfill already in progress for this user'
1893
2323
  }
1894
2324
  });
1895
2325
  }
@@ -1899,7 +2329,6 @@ export class UsersService {
1899
2329
  /**
1900
2330
  * Delete own user account
1901
2331
  * @param data The data for the request.
1902
- * @param data.region Region code (cn, us, de)
1903
2332
  * @param data.requestBody
1904
2333
  * @returns void User deleted successfully
1905
2334
  * @throws ApiError
@@ -1910,9 +2339,6 @@ export class UsersService {
1910
2339
  return __request(OpenAPI, {
1911
2340
  method: 'DELETE',
1912
2341
  url: '/api/v1/users',
1913
- path: {
1914
- region: data.region
1915
- },
1916
2342
  body: data.requestBody,
1917
2343
  mediaType: 'application/json',
1918
2344
  errors: {
@@ -1925,8 +2351,7 @@ export class UsersService {
1925
2351
  * Get current authenticated user
1926
2352
  * @param data The data for the request.
1927
2353
  * @param data.acceptLanguage
1928
- * @param data.region Region code (cn, us, de)
1929
- * @returns unknown User retrieved successfully
2354
+ * @returns UserResponseDto User retrieved successfully
1930
2355
  * @throws ApiError
1931
2356
  */
1932
2357
  public static userControllerGetUser(
@@ -1935,9 +2360,6 @@ export class UsersService {
1935
2360
  return __request(OpenAPI, {
1936
2361
  method: 'GET',
1937
2362
  url: '/api/v1/users',
1938
- path: {
1939
- region: data.region
1940
- },
1941
2363
  headers: {
1942
2364
  'accept-language': data.acceptLanguage
1943
2365
  }
@@ -1948,9 +2370,8 @@ export class UsersService {
1948
2370
  * Sign up new user
1949
2371
  * Create a new account with auto-generated access token. Protected by Cloudflare Turnstile to prevent automated signup (when enabled).
1950
2372
  * @param data The data for the request.
1951
- * @param data.region Region code (cn, us, de)
1952
2373
  * @param data.requestBody
1953
- * @returns unknown User created successfully
2374
+ * @returns SignupResponseDto User created successfully
1954
2375
  * @throws ApiError
1955
2376
  */
1956
2377
  public static userControllerSignupUser(
@@ -1959,9 +2380,6 @@ export class UsersService {
1959
2380
  return __request(OpenAPI, {
1960
2381
  method: 'POST',
1961
2382
  url: '/api/v1/users',
1962
- path: {
1963
- region: data.region
1964
- },
1965
2383
  body: data.requestBody,
1966
2384
  mediaType: 'application/json',
1967
2385
  errors: {
@@ -1975,7 +2393,6 @@ export class UsersService {
1975
2393
  * Delete user by ID (admin only)
1976
2394
  * @param data The data for the request.
1977
2395
  * @param data.id User ID to delete
1978
- * @param data.region Region code (cn, us, de)
1979
2396
  * @returns void User deleted successfully
1980
2397
  * @throws ApiError
1981
2398
  */
@@ -1986,8 +2403,7 @@ export class UsersService {
1986
2403
  method: 'DELETE',
1987
2404
  url: '/api/v1/users/{id}',
1988
2405
  path: {
1989
- id: data.id,
1990
- region: data.region
2406
+ id: data.id
1991
2407
  },
1992
2408
  errors: {
1993
2409
  403: 'Cannot delete own account or insufficient permissions'
@@ -1999,7 +2415,6 @@ export class UsersService {
1999
2415
  * Get user info by user ID
2000
2416
  * @param data The data for the request.
2001
2417
  * @param data.id User ID
2002
- * @param data.region Region code (cn, us, de)
2003
2418
  * @returns unknown User info retrieved successfully
2004
2419
  * @throws ApiError
2005
2420
  */
@@ -2010,8 +2425,7 @@ export class UsersService {
2010
2425
  method: 'GET',
2011
2426
  url: '/api/v1/users/{id}/info',
2012
2427
  path: {
2013
- id: data.id,
2014
- region: data.region
2428
+ id: data.id
2015
2429
  },
2016
2430
  errors: {
2017
2431
  403: 'Cannot access other user info without admin permission'
@@ -2022,7 +2436,6 @@ export class UsersService {
2022
2436
  /**
2023
2437
  * Update user settings
2024
2438
  * @param data The data for the request.
2025
- * @param data.region Region code (cn, us, de)
2026
2439
  * @param data.requestBody
2027
2440
  * @returns unknown Settings updated successfully
2028
2441
  * @throws ApiError
@@ -2033,9 +2446,6 @@ export class UsersService {
2033
2446
  return __request(OpenAPI, {
2034
2447
  method: 'PUT',
2035
2448
  url: '/api/v1/users/setting',
2036
- path: {
2037
- region: data.region
2038
- },
2039
2449
  body: data.requestBody,
2040
2450
  mediaType: 'application/json',
2041
2451
  errors: {
@@ -2049,7 +2459,6 @@ export class UsersService {
2049
2459
  * @param data The data for the request.
2050
2460
  * @param data.pageNo Page number
2051
2461
  * @param data.pageSize Page size
2052
- * @param data.region Region code (cn, us, de)
2053
2462
  * @returns unknown Settings list retrieved successfully
2054
2463
  * @throws ApiError
2055
2464
  */
@@ -2059,9 +2468,6 @@ export class UsersService {
2059
2468
  return __request(OpenAPI, {
2060
2469
  method: 'GET',
2061
2470
  url: '/api/v1/users/settings-by-page',
2062
- path: {
2063
- region: data.region
2064
- },
2065
2471
  query: {
2066
2472
  pageNo: data.pageNo,
2067
2473
  pageSize: data.pageSize
@@ -2071,20 +2477,13 @@ export class UsersService {
2071
2477
 
2072
2478
  /**
2073
2479
  * Get asset and liability summary for current user
2074
- * @param data The data for the request.
2075
- * @param data.region Region code (cn, us, de)
2076
2480
  * @returns unknown Summary retrieved successfully
2077
2481
  * @throws ApiError
2078
2482
  */
2079
- public static userControllerGetAssetLiabilitySummary(
2080
- data: UserControllerGetAssetLiabilitySummaryData
2081
- ): CancelablePromise<UserControllerGetAssetLiabilitySummaryResponse> {
2483
+ public static userControllerGetAssetLiabilitySummary(): CancelablePromise<UserControllerGetAssetLiabilitySummaryResponse> {
2082
2484
  return __request(OpenAPI, {
2083
2485
  method: 'GET',
2084
- url: '/api/v1/users/asset-liability-summary',
2085
- path: {
2086
- region: data.region
2087
- }
2486
+ url: '/api/v1/users/asset-liability-summary'
2088
2487
  });
2089
2488
  }
2090
2489
  }
@@ -2092,20 +2491,13 @@ export class UsersService {
2092
2491
  export class PropertiesService {
2093
2492
  /**
2094
2493
  * Get all system properties
2095
- * @param data The data for the request.
2096
- * @param data.region Region code (cn, us, de)
2097
2494
  * @returns unknown Properties retrieved successfully
2098
2495
  * @throws ApiError
2099
2496
  */
2100
- public static propertyControllerGetAll(
2101
- data: PropertyControllerGetAllData
2102
- ): CancelablePromise<PropertyControllerGetAllResponse> {
2497
+ public static propertyControllerGetAll(): CancelablePromise<PropertyControllerGetAllResponse> {
2103
2498
  return __request(OpenAPI, {
2104
2499
  method: 'GET',
2105
2500
  url: '/api/v1/admin/properties',
2106
- path: {
2107
- region: data.region
2108
- },
2109
2501
  errors: {
2110
2502
  401: 'Unauthorized',
2111
2503
  403: 'Forbidden - insufficient permissions'
@@ -2117,7 +2509,6 @@ export class PropertiesService {
2117
2509
  * Get property by key
2118
2510
  * @param data The data for the request.
2119
2511
  * @param data.key Property key
2120
- * @param data.region Region code (cn, us, de)
2121
2512
  * @returns unknown Property retrieved successfully
2122
2513
  * @throws ApiError
2123
2514
  */
@@ -2128,8 +2519,7 @@ export class PropertiesService {
2128
2519
  method: 'GET',
2129
2520
  url: '/api/v1/admin/properties/{key}',
2130
2521
  path: {
2131
- key: data.key,
2132
- region: data.region
2522
+ key: data.key
2133
2523
  },
2134
2524
  errors: {
2135
2525
  401: 'Unauthorized',
@@ -2140,255 +2530,1113 @@ export class PropertiesService {
2140
2530
  }
2141
2531
 
2142
2532
  /**
2533
+ * Update a system property
2143
2534
  * @param data The data for the request.
2144
- * @param data.region Region code (cn, us, de)
2145
- * @returns unknown
2535
+ * @param data.key Property key
2536
+ * @param data.requestBody
2537
+ * @returns unknown Property updated successfully
2146
2538
  * @throws ApiError
2147
2539
  */
2148
- public static propertyController(
2149
- data: PropertyControllerData
2150
- ): CancelablePromise<PropertyControllerResponse> {
2540
+ public static propertyControllerUpdate(
2541
+ data: PropertyControllerUpdateData
2542
+ ): CancelablePromise<PropertyControllerUpdateResponse> {
2151
2543
  return __request(OpenAPI, {
2152
2544
  method: 'PUT',
2153
2545
  url: '/api/v1/admin/properties/{key}',
2154
2546
  path: {
2155
- region: data.region
2547
+ key: data.key
2548
+ },
2549
+ body: data.requestBody,
2550
+ mediaType: 'application/json',
2551
+ errors: {
2552
+ 401: 'Unauthorized',
2553
+ 403: 'Forbidden - insufficient permissions'
2156
2554
  }
2157
2555
  });
2158
2556
  }
2159
2557
 
2160
2558
  /**
2559
+ * Delete a system property
2161
2560
  * @param data The data for the request.
2162
- * @param data.region Region code (cn, us, de)
2163
- * @returns void
2561
+ * @param data.key Property key
2562
+ * @returns void Property deleted successfully
2164
2563
  * @throws ApiError
2165
2564
  */
2166
- public static propertyController1(
2167
- data: PropertyController1Data
2168
- ): CancelablePromise<PropertyController1Response> {
2565
+ public static propertyControllerDelete(
2566
+ data: PropertyControllerDeleteData
2567
+ ): CancelablePromise<PropertyControllerDeleteResponse> {
2169
2568
  return __request(OpenAPI, {
2170
2569
  method: 'DELETE',
2171
2570
  url: '/api/v1/admin/properties/{key}',
2172
2571
  path: {
2173
- region: data.region
2572
+ key: data.key
2573
+ },
2574
+ errors: {
2575
+ 401: 'Unauthorized',
2576
+ 403: 'Forbidden - insufficient permissions',
2577
+ 404: 'Property not found'
2174
2578
  }
2175
2579
  });
2176
2580
  }
2177
2581
  }
2178
2582
 
2179
- export class BeanImportService {
2583
+ export class BeanTransactionRulesService {
2180
2584
  /**
2181
- * Import a bill file
2182
- * Upload and process a bill file (CSV, PDF, OFX, etc.). The system automatically identifies the file type, extracts transactions, validates them, and stores only validated transactions to the database. Maximum file size: 50MB. Only 1 import per user at a time (concurrent imports rejected with 429).
2585
+ * Create a new transaction rule (or upsert if upsertByPayee=true)
2586
+ * Creates a new rule. If upsertByPayee=true, updates existing rule matching payeeKeywords[0] instead of creating duplicate.
2183
2587
  * @param data The data for the request.
2184
- * @param data.region Region code (cn, us, de)
2185
- * @param data.formData Bill file to import
2186
- * @returns ImportResultDto File imported successfully
2588
+ * @param data.region Region code for tenant context
2589
+ * @param data.requestBody
2590
+ * @returns TransactionRuleResponseDto Rule updated successfully (upsert mode)
2187
2591
  * @throws ApiError
2188
2592
  */
2189
- public static fileImportControllerImportFile(
2190
- data: FileImportControllerImportFileData
2191
- ): CancelablePromise<FileImportControllerImportFileResponse> {
2593
+ public static transactionRuleControllerCreate(
2594
+ data: TransactionRuleControllerCreateData
2595
+ ): CancelablePromise<TransactionRuleControllerCreateResponse> {
2192
2596
  return __request(OpenAPI, {
2193
2597
  method: 'POST',
2194
- url: '/api/v1/{region}/bean/import/file',
2598
+ url: '/api/v1/{region}/bean/transaction-rules',
2195
2599
  path: {
2196
2600
  region: data.region
2197
2601
  },
2198
- formData: data.formData,
2199
- mediaType: 'multipart/form-data',
2602
+ body: data.requestBody,
2603
+ mediaType: 'application/json',
2200
2604
  errors: {
2201
- 400: 'Bad request - file-format-unsupported or file-import-failed',
2202
- 413: 'Payload too large - file exceeds 50MB limit',
2203
- 429: 'Too many requests - user already has import in progress',
2204
- 500: 'Internal server error - DATABASE_ERROR'
2605
+ 400: 'Validation failed',
2606
+ 401: 'Unauthorized',
2607
+ 409: 'Resource conflict - another process is updating this rule'
2205
2608
  }
2206
2609
  });
2207
2610
  }
2208
2611
 
2209
2612
  /**
2210
- * Identify file type
2211
- * 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.
2613
+ * Get all transaction rules for user
2212
2614
  * @param data The data for the request.
2213
- * @param data.region Region code (cn, us, de)
2214
- * @param data.formData File to identify
2215
- * @returns IdentifyResultDto File identification result
2615
+ * @param data.region Region code for tenant context
2616
+ * @param data.limit Max results per page (default: 20, max: 100)
2617
+ * @param data.offset Pagination offset (default: 0)
2618
+ * @param data.enabled Filter by enabled status
2619
+ * @param data.learningSource Filter by learning source. Omit this parameter or pass empty string to get manually created rules (learningSource is null in database).
2620
+ * @param data.autoApplyEnabled Filter by auto-apply status
2621
+ * @returns TransactionRuleListResponseDto List of rules
2216
2622
  * @throws ApiError
2217
2623
  */
2218
- public static fileImportControllerIdentifyFile(
2219
- data: FileImportControllerIdentifyFileData
2220
- ): CancelablePromise<FileImportControllerIdentifyFileResponse> {
2624
+ public static transactionRuleControllerList(
2625
+ data: TransactionRuleControllerListData
2626
+ ): CancelablePromise<TransactionRuleControllerListResponse> {
2221
2627
  return __request(OpenAPI, {
2222
- method: 'POST',
2223
- url: '/api/v1/{region}/bean/import/identify',
2628
+ method: 'GET',
2629
+ url: '/api/v1/{region}/bean/transaction-rules',
2224
2630
  path: {
2225
2631
  region: data.region
2226
2632
  },
2227
- formData: data.formData,
2228
- mediaType: 'multipart/form-data',
2633
+ query: {
2634
+ limit: data.limit,
2635
+ offset: data.offset,
2636
+ enabled: data.enabled,
2637
+ learningSource: data.learningSource,
2638
+ autoApplyEnabled: data.autoApplyEnabled
2639
+ },
2229
2640
  errors: {
2230
- 400: 'Bad request - No file uploaded'
2641
+ 401: 'Unauthorized'
2231
2642
  }
2232
2643
  });
2233
2644
  }
2234
2645
 
2235
2646
  /**
2236
- * Get importer configuration
2237
- * Returns the current configuration for the specified importer. Creates default configuration if none exists.
2647
+ * Validate transaction rule configuration
2238
2648
  * @param data The data for the request.
2239
- * @param data.importerId Importer identifier. Supported importers: alipay, alipay-web, wechat, boc, boc-credit, ccb, cmb, cmbc, cmbc-credit, icbc, icbc-credit, hsbc-hk
2240
- * @param data.region Region code (cn, us, de)
2241
- * @returns ImporterConfigDto Configuration retrieved successfully
2649
+ * @param data.region Region code for tenant context
2650
+ * @param data.requestBody
2651
+ * @returns ValidateRuleResponseDto Validation result
2652
+ * @throws ApiError
2653
+ */
2654
+ public static transactionRuleControllerValidate(
2655
+ data: TransactionRuleControllerValidateData
2656
+ ): CancelablePromise<TransactionRuleControllerValidateResponse> {
2657
+ return __request(OpenAPI, {
2658
+ method: 'POST',
2659
+ url: '/api/v1/{region}/bean/transaction-rules/validate',
2660
+ path: {
2661
+ region: data.region
2662
+ },
2663
+ body: data.requestBody,
2664
+ mediaType: 'application/json',
2665
+ errors: {
2666
+ 400: 'Validation failed',
2667
+ 401: 'Unauthorized'
2668
+ }
2669
+ });
2670
+ }
2671
+
2672
+ /**
2673
+ * Bulk create transaction rules
2674
+ * @param data The data for the request.
2675
+ * @param data.region Region code for tenant context
2676
+ * @param data.requestBody
2677
+ * @returns BulkCreateRulesResponseDto Bulk create completed
2678
+ * @throws ApiError
2679
+ */
2680
+ public static transactionRuleControllerBulkCreate(
2681
+ data: TransactionRuleControllerBulkCreateData
2682
+ ): CancelablePromise<TransactionRuleControllerBulkCreateResponse> {
2683
+ return __request(OpenAPI, {
2684
+ method: 'POST',
2685
+ url: '/api/v1/{region}/bean/transaction-rules/bulk',
2686
+ path: {
2687
+ region: data.region
2688
+ },
2689
+ body: data.requestBody,
2690
+ mediaType: 'application/json',
2691
+ errors: {
2692
+ 400: 'Invalid bulk create data',
2693
+ 401: 'Unauthorized'
2694
+ }
2695
+ });
2696
+ }
2697
+
2698
+ /**
2699
+ * Export transaction rules
2700
+ * @param data The data for the request.
2701
+ * @param data.format Export format (currently only JSON supported)
2702
+ * @param data.region Region code for tenant context
2703
+ * @returns ExportRulesResponseDto Exported rules
2704
+ * @throws ApiError
2705
+ */
2706
+ public static transactionRuleControllerExport(
2707
+ data: TransactionRuleControllerExportData
2708
+ ): CancelablePromise<TransactionRuleControllerExportResponse> {
2709
+ return __request(OpenAPI, {
2710
+ method: 'GET',
2711
+ url: '/api/v1/{region}/bean/transaction-rules/export/{format}',
2712
+ path: {
2713
+ format: data.format,
2714
+ region: data.region
2715
+ },
2716
+ errors: {
2717
+ 400: 'Unsupported format',
2718
+ 401: 'Unauthorized'
2719
+ }
2720
+ });
2721
+ }
2722
+
2723
+ /**
2724
+ * Get transaction rule statistics
2725
+ * @param data The data for the request.
2726
+ * @param data.period Statistics time period
2727
+ * @param data.region Region code for tenant context
2728
+ * @returns RuleStatisticsResponseDto Rule statistics
2729
+ * @throws ApiError
2730
+ */
2731
+ public static transactionRuleControllerGetStatistics(
2732
+ data: TransactionRuleControllerGetStatisticsData
2733
+ ): CancelablePromise<TransactionRuleControllerGetStatisticsResponse> {
2734
+ return __request(OpenAPI, {
2735
+ method: 'GET',
2736
+ url: '/api/v1/{region}/bean/transaction-rules/statistics/{period}',
2737
+ path: {
2738
+ period: data.period,
2739
+ region: data.region
2740
+ },
2741
+ errors: {
2742
+ 401: 'Unauthorized'
2743
+ }
2744
+ });
2745
+ }
2746
+
2747
+ /**
2748
+ * Get transaction rule detail
2749
+ * @param data The data for the request.
2750
+ * @param data.ruleId Rule ID
2751
+ * @param data.region Region code for tenant context
2752
+ * @returns TransactionRuleResponseDto Rule details
2753
+ * @throws ApiError
2754
+ */
2755
+ public static transactionRuleControllerGetDetail(
2756
+ data: TransactionRuleControllerGetDetailData
2757
+ ): CancelablePromise<TransactionRuleControllerGetDetailResponse> {
2758
+ return __request(OpenAPI, {
2759
+ method: 'GET',
2760
+ url: '/api/v1/{region}/bean/transaction-rules/{ruleId}',
2761
+ path: {
2762
+ ruleId: data.ruleId,
2763
+ region: data.region
2764
+ },
2765
+ errors: {
2766
+ 401: 'Unauthorized',
2767
+ 403: 'Forbidden - not owner of rule',
2768
+ 404: 'Rule not found'
2769
+ }
2770
+ });
2771
+ }
2772
+
2773
+ /**
2774
+ * Update a transaction rule
2775
+ * @param data The data for the request.
2776
+ * @param data.ruleId Rule ID to update
2777
+ * @param data.region Region code for tenant context
2778
+ * @param data.requestBody
2779
+ * @returns TransactionRuleResponseDto Rule updated successfully
2780
+ * @throws ApiError
2781
+ */
2782
+ public static transactionRuleControllerUpdate(
2783
+ data: TransactionRuleControllerUpdateData
2784
+ ): CancelablePromise<TransactionRuleControllerUpdateResponse> {
2785
+ return __request(OpenAPI, {
2786
+ method: 'PUT',
2787
+ url: '/api/v1/{region}/bean/transaction-rules/{ruleId}',
2788
+ path: {
2789
+ ruleId: data.ruleId,
2790
+ region: data.region
2791
+ },
2792
+ body: data.requestBody,
2793
+ mediaType: 'application/json',
2794
+ errors: {
2795
+ 400: 'Validation failed',
2796
+ 401: 'Unauthorized',
2797
+ 403: 'Forbidden - not owner of rule',
2798
+ 404: 'Rule not found',
2799
+ 409: 'Resource conflict - rule is being modified by another process'
2800
+ }
2801
+ });
2802
+ }
2803
+
2804
+ /**
2805
+ * Delete a transaction rule
2806
+ * @param data The data for the request.
2807
+ * @param data.ruleId Rule ID to delete
2808
+ * @param data.region Region code for tenant context
2809
+ * @returns void Rule deleted successfully
2810
+ * @throws ApiError
2811
+ */
2812
+ public static transactionRuleControllerDelete(
2813
+ data: TransactionRuleControllerDeleteData
2814
+ ): CancelablePromise<TransactionRuleControllerDeleteResponse> {
2815
+ return __request(OpenAPI, {
2816
+ method: 'DELETE',
2817
+ url: '/api/v1/{region}/bean/transaction-rules/{ruleId}',
2818
+ path: {
2819
+ ruleId: data.ruleId,
2820
+ region: data.region
2821
+ },
2822
+ errors: {
2823
+ 401: 'Unauthorized',
2824
+ 403: 'Forbidden - not owner of rule',
2825
+ 404: 'Rule not found',
2826
+ 409: 'Resource conflict - rule is being modified by another process'
2827
+ }
2828
+ });
2829
+ }
2830
+
2831
+ /**
2832
+ * Test rule matching
2833
+ * @param data The data for the request.
2834
+ * @param data.ruleId Rule ID to test
2835
+ * @param data.region Region code for tenant context
2836
+ * @param data.requestBody
2837
+ * @returns TestRuleResponseDto Test result
2838
+ * @throws ApiError
2839
+ */
2840
+ public static transactionRuleControllerTest(
2841
+ data: TransactionRuleControllerTestData
2842
+ ): CancelablePromise<TransactionRuleControllerTestResponse> {
2843
+ return __request(OpenAPI, {
2844
+ method: 'POST',
2845
+ url: '/api/v1/{region}/bean/transaction-rules/{ruleId}/test',
2846
+ path: {
2847
+ ruleId: data.ruleId,
2848
+ region: data.region
2849
+ },
2850
+ body: data.requestBody,
2851
+ mediaType: 'application/json',
2852
+ errors: {
2853
+ 401: 'Unauthorized',
2854
+ 403: 'Forbidden - not owner of rule',
2855
+ 404: 'Rule not found'
2856
+ }
2857
+ });
2858
+ }
2859
+ }
2860
+
2861
+ export class BeanCategoryCatalogService {
2862
+ /**
2863
+ * List category catalog for a region
2864
+ * Returns the region-scoped category slugs (expense/income/investment/banking/transfer/payment) for the NLP result picker. CN-exclusive payment instruments (huabei/baitiao) appear only under /cn.
2865
+ * @param data The data for the request.
2866
+ * @param data.region Region code for tenant context
2867
+ * @param data.scenario Filter by scenario
2868
+ * @param data.routeBearing Filter by routeBearing (entity-router route() consumes it)
2869
+ * @returns CategoryCatalogListResponseDto Category catalog retrieved successfully
2870
+ * @throws ApiError
2871
+ */
2872
+ public static categoryCatalogControllerList(
2873
+ data: CategoryCatalogControllerListData
2874
+ ): CancelablePromise<CategoryCatalogControllerListResponse> {
2875
+ return __request(OpenAPI, {
2876
+ method: 'GET',
2877
+ url: '/api/v1/{region}/bean/categories',
2878
+ path: {
2879
+ region: data.region
2880
+ },
2881
+ query: {
2882
+ scenario: data.scenario,
2883
+ routeBearing: data.routeBearing
2884
+ }
2885
+ });
2886
+ }
2887
+ }
2888
+
2889
+ export class LifeEventsService {
2890
+ /**
2891
+ * Create a new life event
2892
+ * Creates a new life event entry for the authenticated user. Returns ETag header carrying the row updatedAt.
2893
+ * @param data The data for the request.
2894
+ * @param data.region Region code for tenant context (decorative for life events)
2895
+ * @param data.requestBody
2896
+ * @returns EventResponseDto Life event created successfully
2897
+ * @throws ApiError
2898
+ */
2899
+ public static eventControllerCreate(
2900
+ data: EventControllerCreateData
2901
+ ): CancelablePromise<EventControllerCreateResponse> {
2902
+ return __request(OpenAPI, {
2903
+ method: 'POST',
2904
+ url: '/api/v1/{region}/bean/events',
2905
+ path: {
2906
+ region: data.region
2907
+ },
2908
+ body: data.requestBody,
2909
+ mediaType: 'application/json',
2910
+ errors: {
2911
+ 409: 'Life event already exists for this (userId, type, date) combination'
2912
+ }
2913
+ });
2914
+ }
2915
+
2916
+ /**
2917
+ * List user life events
2918
+ * Returns life events for the authenticated user with optional filtering by type, description search, and date range.
2919
+ * @param data The data for the request.
2920
+ * @param data.region Region code for tenant context (decorative for life events)
2921
+ * @param data.type Filter by life event type (exact match)
2922
+ * @param data.q Search term for description (case-insensitive partial match)
2923
+ * @param data.from Filter life events from this date (ISO 8601 format)
2924
+ * @param data.to Filter life events to this date (ISO 8601 format)
2925
+ * @param data.page Page number for pagination (default: 1)
2926
+ * @param data.limit Number of items per page (default: 20, max: 100)
2927
+ * @returns EventListResponseDto Life events retrieved successfully
2928
+ * @throws ApiError
2929
+ */
2930
+ public static eventControllerFindAll(
2931
+ data: EventControllerFindAllData
2932
+ ): CancelablePromise<EventControllerFindAllResponse> {
2933
+ return __request(OpenAPI, {
2934
+ method: 'GET',
2935
+ url: '/api/v1/{region}/bean/events',
2936
+ path: {
2937
+ region: data.region
2938
+ },
2939
+ query: {
2940
+ type: data.type,
2941
+ q: data.q,
2942
+ from: data.from,
2943
+ to: data.to,
2944
+ page: data.page,
2945
+ limit: data.limit
2946
+ }
2947
+ });
2948
+ }
2949
+
2950
+ /**
2951
+ * Get life event by ID
2952
+ * Returns a single life event by its ID. Returns ETag header.
2953
+ * @param data The data for the request.
2954
+ * @param data.id Life event ID
2955
+ * @param data.region Region code for tenant context (decorative for life events)
2956
+ * @returns EventResponseDto Life event retrieved successfully
2957
+ * @throws ApiError
2958
+ */
2959
+ public static eventControllerFindOne(
2960
+ data: EventControllerFindOneData
2961
+ ): CancelablePromise<EventControllerFindOneResponse> {
2962
+ return __request(OpenAPI, {
2963
+ method: 'GET',
2964
+ url: '/api/v1/{region}/bean/events/{id}',
2965
+ path: {
2966
+ id: data.id,
2967
+ region: data.region
2968
+ },
2969
+ errors: {
2970
+ 404: 'Life event not found'
2971
+ }
2972
+ });
2973
+ }
2974
+
2975
+ /**
2976
+ * Update a life event
2977
+ * Updates an existing life event. If If-Match header is provided, performs optimistic concurrency check; mismatched updatedAt returns 412.
2978
+ * @param data The data for the request.
2979
+ * @param data.id Life event ID
2980
+ * @param data.region Region code for tenant context (decorative for life events)
2981
+ * @param data.requestBody
2982
+ * @returns EventResponseDto Life event updated successfully
2983
+ * @throws ApiError
2984
+ */
2985
+ public static eventControllerUpdate(
2986
+ data: EventControllerUpdateData
2987
+ ): CancelablePromise<EventControllerUpdateResponse> {
2988
+ return __request(OpenAPI, {
2989
+ method: 'PUT',
2990
+ url: '/api/v1/{region}/bean/events/{id}',
2991
+ path: {
2992
+ id: data.id,
2993
+ region: data.region
2994
+ },
2995
+ body: data.requestBody,
2996
+ mediaType: 'application/json',
2997
+ errors: {
2998
+ 400: 'If-Match header is not a valid ISO 8601 date',
2999
+ 404: 'Life event not found',
3000
+ 409: 'Updated event conflicts with an existing (userId, type, date) combination',
3001
+ 412: 'If-Match precondition failed (updatedAt mismatch)'
3002
+ }
3003
+ });
3004
+ }
3005
+
3006
+ /**
3007
+ * Delete a life event
3008
+ * Deletes a life event entry (hard delete). Returns 204.
3009
+ * @param data The data for the request.
3010
+ * @param data.id Life event ID
3011
+ * @param data.region Region code for tenant context (decorative for life events)
3012
+ * @returns void Life event deleted successfully
3013
+ * @throws ApiError
3014
+ */
3015
+ public static eventControllerDelete(
3016
+ data: EventControllerDeleteData
3017
+ ): CancelablePromise<EventControllerDeleteResponse> {
3018
+ return __request(OpenAPI, {
3019
+ method: 'DELETE',
3020
+ url: '/api/v1/{region}/bean/events/{id}',
3021
+ path: {
3022
+ id: data.id,
3023
+ region: data.region
3024
+ },
3025
+ errors: {
3026
+ 404: 'Life event not found'
3027
+ }
3028
+ });
3029
+ }
3030
+
3031
+ /**
3032
+ * Slice time-series by a life event (Phase 79)
3033
+ * Returns aggregated time-series for postings matching accountPattern within the half-open date range of the given life event.
3034
+ * @param data The data for the request.
3035
+ * @param data.id Life event ID
3036
+ * @param data.accountPattern
3037
+ * @param data.granularity
3038
+ * @param data.region Region code for tenant context (decorative for life events)
3039
+ * @returns unknown Time-series sliced by the life event range
3040
+ * @throws ApiError
3041
+ */
3042
+ public static eventControllerGetSlice(
3043
+ data: EventControllerGetSliceData
3044
+ ): CancelablePromise<EventControllerGetSliceResponse> {
3045
+ return __request(OpenAPI, {
3046
+ method: 'GET',
3047
+ url: '/api/v1/{region}/bean/events/{id}/slice',
3048
+ path: {
3049
+ id: data.id,
3050
+ region: data.region
3051
+ },
3052
+ query: {
3053
+ accountPattern: data.accountPattern,
3054
+ granularity: data.granularity
3055
+ },
3056
+ errors: {
3057
+ 400: 'accountPattern query param is empty',
3058
+ 404: 'Life event not found'
3059
+ }
3060
+ });
3061
+ }
3062
+ }
3063
+
3064
+ export class OnboardingService {
3065
+ /**
3066
+ * Bootstrap core accounts + register asset accounts with opening balances (ADR-0113)
3067
+ * @param data The data for the request.
3068
+ * @param data.region Region code for tenant context
3069
+ * @param data.requestBody
3070
+ * @returns unknown Onboarding bootstrap result.
3071
+ * @throws ApiError
3072
+ */
3073
+ public static onboardingControllerBootstrap(
3074
+ data: OnboardingControllerBootstrapData
3075
+ ): CancelablePromise<OnboardingControllerBootstrapResponse> {
3076
+ return __request(OpenAPI, {
3077
+ method: 'POST',
3078
+ url: '/api/v1/{region}/bean/onboarding',
3079
+ path: {
3080
+ region: data.region
3081
+ },
3082
+ body: data.requestBody,
3083
+ mediaType: 'application/json',
3084
+ errors: {
3085
+ 422: 'Invalid region/account path/duplicate paths.'
3086
+ }
3087
+ });
3088
+ }
3089
+ }
3090
+
3091
+ export class BalanceReconciliationService {
3092
+ /**
3093
+ * Preview reconciliation (book vs actual)
3094
+ * Computes book balance, diff, Beancount-inferred tolerance, and suggested action without persisting.
3095
+ * @param data The data for the request.
3096
+ * @param data.region Region code for tenant context (decorative for reconciliation)
3097
+ * @param data.requestBody
3098
+ * @returns ReconciliationComputeResultDto Reconciliation preview
3099
+ * @throws ApiError
3100
+ */
3101
+ public static reconciliationControllerCompute(
3102
+ data: ReconciliationControllerComputeData
3103
+ ): CancelablePromise<ReconciliationControllerComputeResponse> {
3104
+ return __request(OpenAPI, {
3105
+ method: 'POST',
3106
+ url: '/api/v1/{region}/bean/reconciliations',
3107
+ path: {
3108
+ region: data.region
3109
+ },
3110
+ body: data.requestBody,
3111
+ mediaType: 'application/json',
3112
+ errors: {
3113
+ 404: 'Account not found'
3114
+ }
3115
+ });
3116
+ }
3117
+
3118
+ /**
3119
+ * Record a balance assertion
3120
+ * Persists the reconciliation as a BeanBalance assertion (amount = actual, diffAmount = book − actual). Re-reconciling the same day/currency upserts.
3121
+ * @param data The data for the request.
3122
+ * @param data.region Region code for tenant context (decorative for reconciliation)
3123
+ * @param data.requestBody
3124
+ * @returns ReconciliationRecordDto Balance assertion recorded
3125
+ * @throws ApiError
3126
+ */
3127
+ public static reconciliationControllerAssert(
3128
+ data: ReconciliationControllerAssertData
3129
+ ): CancelablePromise<ReconciliationControllerAssertResponse> {
3130
+ return __request(OpenAPI, {
3131
+ method: 'POST',
3132
+ url: '/api/v1/{region}/bean/reconciliations/assert',
3133
+ path: {
3134
+ region: data.region
3135
+ },
3136
+ body: data.requestBody,
3137
+ mediaType: 'application/json',
3138
+ errors: {
3139
+ 404: 'Account not found'
3140
+ }
3141
+ });
3142
+ }
3143
+
3144
+ /**
3145
+ * Generate a pad adjusting entry
3146
+ * 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.
3147
+ * @param data The data for the request.
3148
+ * @param data.region Region code for tenant context (decorative for reconciliation)
3149
+ * @param data.requestBody
3150
+ * @returns PadResultDto Pad adjusting entry generated
3151
+ * @throws ApiError
3152
+ */
3153
+ public static reconciliationControllerPad(
3154
+ data: ReconciliationControllerPadData
3155
+ ): CancelablePromise<ReconciliationControllerPadResponse> {
3156
+ return __request(OpenAPI, {
3157
+ method: 'POST',
3158
+ url: '/api/v1/{region}/bean/reconciliations/pad',
3159
+ path: {
3160
+ region: data.region
3161
+ },
3162
+ body: data.requestBody,
3163
+ mediaType: 'application/json',
3164
+ errors: {
3165
+ 400: 'Book already within tolerance — no pad needed',
3166
+ 404: 'Account not found'
3167
+ }
3168
+ });
3169
+ }
3170
+
3171
+ /**
3172
+ * List reconciliation history for an account
3173
+ * Returns recorded balance assertions (most recent first). The latest drives the account-detail "Last <date>" badge.
3174
+ * @param data The data for the request.
3175
+ * @param data.accountId BeanAccount id
3176
+ * @param data.region Region code for tenant context (decorative for reconciliation)
3177
+ * @returns ReconciliationRecordDto Reconciliation history
3178
+ * @throws ApiError
3179
+ */
3180
+ public static reconciliationControllerHistory(
3181
+ data: ReconciliationControllerHistoryData
3182
+ ): CancelablePromise<ReconciliationControllerHistoryResponse> {
3183
+ return __request(OpenAPI, {
3184
+ method: 'GET',
3185
+ url: '/api/v1/{region}/bean/accounts/{accountId}/reconciliations',
3186
+ path: {
3187
+ accountId: data.accountId,
3188
+ region: data.region
3189
+ },
3190
+ errors: {
3191
+ 404: 'Account not found'
3192
+ }
3193
+ });
3194
+ }
3195
+ }
3196
+
3197
+ export class BeanExportService {
3198
+ /**
3199
+ * Export Beancount ledger as ZIP
3200
+ * Export all user Beancount data as a ZIP file containing ledger.beancount and yearly files in community format.
3201
+ * @returns unknown
3202
+ * @throws ApiError
3203
+ */
3204
+ public static exportControllerExportBeancount(): CancelablePromise<ExportControllerExportBeancountResponse> {
3205
+ return __request(OpenAPI, {
3206
+ method: 'GET',
3207
+ url: '/api/v1/{region}/bean/export/beancount'
3208
+ });
3209
+ }
3210
+ }
3211
+
3212
+ export class BeanImportService {
3213
+ /**
3214
+ * Import a bill file
3215
+ * Upload and process a bill file (CSV, PDF, OFX, etc.). The system automatically identifies the file type, extracts transactions, validates them, and stores only validated transactions to the database. Maximum file size: 50MB. Only 1 import per user at a time (concurrent imports rejected with 429).
3216
+ * @param data The data for the request.
3217
+ * @param data.region Region code for tenant context
3218
+ * @param data.formData Bill file to import
3219
+ * @returns ImportResultDto File imported successfully
3220
+ * @throws ApiError
3221
+ */
3222
+ public static fileImportControllerImportFile(
3223
+ data: FileImportControllerImportFileData
3224
+ ): CancelablePromise<FileImportControllerImportFileResponse> {
3225
+ return __request(OpenAPI, {
3226
+ method: 'POST',
3227
+ url: '/api/v1/{region}/bean/import/file',
3228
+ path: {
3229
+ region: data.region
3230
+ },
3231
+ formData: data.formData,
3232
+ mediaType: 'multipart/form-data',
3233
+ errors: {
3234
+ 400: 'Bad request - file-format-unsupported or file-import-failed',
3235
+ 413: 'Payload too large - file exceeds 50MB limit',
3236
+ 429: 'Too many requests - user already has import in progress',
3237
+ 500: 'Internal server error - DATABASE_ERROR'
3238
+ }
3239
+ });
3240
+ }
3241
+
3242
+ /**
3243
+ * Identify file type
3244
+ * 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.
3245
+ * @param data The data for the request.
3246
+ * @param data.region Region code for tenant context
3247
+ * @param data.formData File to identify
3248
+ * @returns IdentifyResultDto File identification result
3249
+ * @throws ApiError
3250
+ */
3251
+ public static fileImportControllerIdentifyFile(
3252
+ data: FileImportControllerIdentifyFileData
3253
+ ): CancelablePromise<FileImportControllerIdentifyFileResponse> {
3254
+ return __request(OpenAPI, {
3255
+ method: 'POST',
3256
+ url: '/api/v1/{region}/bean/import/identify',
3257
+ path: {
3258
+ region: data.region
3259
+ },
3260
+ formData: data.formData,
3261
+ mediaType: 'multipart/form-data',
3262
+ errors: {
3263
+ 400: 'Bad request - No file uploaded'
3264
+ }
3265
+ });
3266
+ }
3267
+
3268
+ /**
3269
+ * Import a Beancount file in community format
3270
+ * Upload a .beancount file to import. The system parses community-format paths, converts to internal format using category metadata, auto-creates accounts, and imports transactions with deduplication. Maximum file size: 50MB. Only 1 import per user at a time.
3271
+ * @param data The data for the request.
3272
+ * @param data.region Region code for tenant context
3273
+ * @param data.formData Beancount file to import
3274
+ * @returns unknown Beancount file imported successfully
3275
+ * @throws ApiError
3276
+ */
3277
+ public static fileImportControllerImportBeancount(
3278
+ data: FileImportControllerImportBeancountData
3279
+ ): CancelablePromise<FileImportControllerImportBeancountResponse> {
3280
+ return __request(OpenAPI, {
3281
+ method: 'POST',
3282
+ url: '/api/v1/{region}/bean/import/beancount',
3283
+ path: {
3284
+ region: data.region
3285
+ },
3286
+ formData: data.formData,
3287
+ mediaType: 'multipart/form-data',
3288
+ errors: {
3289
+ 400: 'Bad request - invalid file or no file uploaded'
3290
+ }
3291
+ });
3292
+ }
3293
+
3294
+ /**
3295
+ * Get importer configuration
3296
+ * Returns the current configuration for the specified importer. Creates default configuration if none exists.
3297
+ * @param data The data for the request.
3298
+ * @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
3299
+ * @param data.region Region code for tenant context
3300
+ * @returns ImporterConfigDto Configuration retrieved successfully
3301
+ * @throws ApiError
3302
+ */
3303
+ public static importerConfigControllerGetConfig(
3304
+ data: ImporterConfigControllerGetConfigData
3305
+ ): CancelablePromise<ImporterConfigControllerGetConfigResponse> {
3306
+ return __request(OpenAPI, {
3307
+ method: 'GET',
3308
+ url: '/api/v1/{region}/bean/import/config/{importerId}',
3309
+ path: {
3310
+ importerId: data.importerId,
3311
+ region: data.region
3312
+ },
3313
+ errors: {
3314
+ 400: 'Invalid input - Unsupported importer',
3315
+ 401: 'Unauthorized - Authentication required'
3316
+ }
3317
+ });
3318
+ }
3319
+
3320
+ /**
3321
+ * Update importer configuration
3322
+ * Updates the configuration for the specified importer. Partial updates are supported.
3323
+ * @param data The data for the request.
3324
+ * @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
3325
+ * @param data.region Region code for tenant context
3326
+ * @param data.requestBody Partial configuration update. Only provided fields will be updated.
3327
+ * @returns ImporterConfigDto Configuration updated successfully
3328
+ * @throws ApiError
3329
+ */
3330
+ public static importerConfigControllerUpdateConfig(
3331
+ data: ImporterConfigControllerUpdateConfigData
3332
+ ): CancelablePromise<ImporterConfigControllerUpdateConfigResponse> {
3333
+ return __request(OpenAPI, {
3334
+ method: 'PUT',
3335
+ url: '/api/v1/{region}/bean/import/config/{importerId}',
3336
+ path: {
3337
+ importerId: data.importerId,
3338
+ region: data.region
3339
+ },
3340
+ body: data.requestBody,
3341
+ mediaType: 'application/json',
3342
+ errors: {
3343
+ 400: 'Invalid input - Validation failed',
3344
+ 404: 'Configuration not found'
3345
+ }
3346
+ });
3347
+ }
3348
+
3349
+ /**
3350
+ * Reset configuration to default
3351
+ * Resets the configuration for the specified importer to default values. This operation overwrites all existing configuration.
3352
+ * @param data The data for the request.
3353
+ * @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
3354
+ * @param data.region Region code for tenant context
3355
+ * @returns ImporterConfigDto Configuration reset successfully
3356
+ * @throws ApiError
3357
+ */
3358
+ public static importerConfigControllerResetConfig(
3359
+ data: ImporterConfigControllerResetConfigData
3360
+ ): CancelablePromise<ImporterConfigControllerResetConfigResponse> {
3361
+ return __request(OpenAPI, {
3362
+ method: 'POST',
3363
+ url: '/api/v1/{region}/bean/import/config/{importerId}/reset',
3364
+ path: {
3365
+ importerId: data.importerId,
3366
+ region: data.region
3367
+ },
3368
+ errors: {
3369
+ 400: 'Invalid input - Unsupported importer'
3370
+ }
3371
+ });
3372
+ }
3373
+ }
3374
+
3375
+ export class ProviderSyncService {
3376
+ /**
3377
+ * Sync transactions from financial data provider
3378
+ *
3379
+ * Accepts raw transactions from external financial data providers, transforms them to Beancount format, and processes them through the ingestion pipeline.
3380
+ *
3381
+ * **Supported Providers:**
3382
+ * - **plaid**: Plaid API (US, Canada, Europe)
3383
+ * - **teller**: Teller API (US)
3384
+ * - **truelayer**: TrueLayer Open Banking (UK, Europe)
3385
+ * - **gocardless**: GoCardless Bank Account Data (Europe)
3386
+ * - **simplefin**: SimpleFIN (Self-hosted)
3387
+ * - **yodlee**: Yodlee (Global)
3388
+ * - **beancount-direct**: Beancount format transactions
3389
+ * - **parsed-bill**: Client-side parsed bill transactions
3390
+ *
3391
+ * **Processing Flow:**
3392
+ * 1. Transform raw data via provider adapter
3393
+ * 2. Validate transaction format
3394
+ * 3. Deduplicate using originalId
3395
+ * 4. Classify using rule engine
3396
+ * 5. Route low-confidence to Review Center
3397
+ * 6. Persist validated transactions
3398
+ *
3399
+ * @param data The data for the request.
3400
+ * @param data.providerName Provider name
3401
+ * @param data.region Region code for tenant context
3402
+ * @param data.requestBody
3403
+ * @returns ProviderSyncResponseDto Sync completed successfully
3404
+ * @throws ApiError
3405
+ */
3406
+ public static providerSyncControllerSync(
3407
+ data: ProviderSyncControllerSyncData
3408
+ ): CancelablePromise<ProviderSyncControllerSyncResponse> {
3409
+ return __request(OpenAPI, {
3410
+ method: 'POST',
3411
+ url: '/api/v1/{region}/bean/import/provider/{providerName}/sync',
3412
+ path: {
3413
+ providerName: data.providerName,
3414
+ region: data.region
3415
+ },
3416
+ body: data.requestBody,
3417
+ mediaType: 'application/json',
3418
+ errors: {
3419
+ 400: 'Invalid request data',
3420
+ 401: 'Missing or invalid authentication',
3421
+ 404: 'Provider not supported'
3422
+ }
3423
+ });
3424
+ }
3425
+
3426
+ /**
3427
+ * Get supported providers
3428
+ * Returns a list of all providers supported by the sync endpoint.
3429
+ * @param data The data for the request.
3430
+ * @param data.region Region code for tenant context
3431
+ * @returns SupportedProvidersResponseDto List of supported providers
3432
+ * @throws ApiError
3433
+ */
3434
+ public static providerSyncControllerGetSupportedProviders(
3435
+ data: ProviderSyncControllerGetSupportedProvidersData
3436
+ ): CancelablePromise<ProviderSyncControllerGetSupportedProvidersResponse> {
3437
+ return __request(OpenAPI, {
3438
+ method: 'GET',
3439
+ url: '/api/v1/{region}/bean/import/provider/supported',
3440
+ path: {
3441
+ region: data.region
3442
+ },
3443
+ errors: {
3444
+ 401: 'Missing or invalid authentication'
3445
+ }
3446
+ });
3447
+ }
3448
+
3449
+ /**
3450
+ * Check if provider is supported
3451
+ * Returns whether a specific provider is supported.
3452
+ * @param data The data for the request.
3453
+ * @param data.providerName Provider name to check
3454
+ * @param data.region Region code for tenant context
3455
+ * @returns unknown Provider support status
3456
+ * @throws ApiError
3457
+ */
3458
+ public static providerSyncControllerIsProviderSupported(
3459
+ data: ProviderSyncControllerIsProviderSupportedData
3460
+ ): CancelablePromise<ProviderSyncControllerIsProviderSupportedResponse> {
3461
+ return __request(OpenAPI, {
3462
+ method: 'GET',
3463
+ url: '/api/v1/{region}/bean/import/provider/{providerName}/supported',
3464
+ path: {
3465
+ providerName: data.providerName,
3466
+ region: data.region
3467
+ },
3468
+ errors: {
3469
+ 401: 'Missing or invalid authentication'
3470
+ }
3471
+ });
3472
+ }
3473
+ }
3474
+
3475
+ export class ExternalAccountLinksService {
3476
+ /**
3477
+ * Create an external account → BeanAccount mapping (ADR-0113)
3478
+ * @param data The data for the request.
3479
+ * @param data.region Region code for tenant context
3480
+ * @param data.requestBody
3481
+ * @returns ExternalAccountLinkResponseDto Link created.
3482
+ * @throws ApiError
3483
+ */
3484
+ public static externalAccountLinkControllerCreate(
3485
+ data: ExternalAccountLinkControllerCreateData
3486
+ ): CancelablePromise<ExternalAccountLinkControllerCreateResponse> {
3487
+ return __request(OpenAPI, {
3488
+ method: 'POST',
3489
+ url: '/api/v1/{region}/bean/external-account-links',
3490
+ path: {
3491
+ region: data.region
3492
+ },
3493
+ body: data.requestBody,
3494
+ mediaType: 'application/json',
3495
+ errors: {
3496
+ 422: 'beanAccountId not owned, or an active link already exists.'
3497
+ }
3498
+ });
3499
+ }
3500
+
3501
+ /**
3502
+ * List the user's active external account links
3503
+ * @param data The data for the request.
3504
+ * @param data.provider
3505
+ * @param data.region Region code for tenant context
3506
+ * @returns ExternalAccountLinkListResponseDto Links retrieved.
2242
3507
  * @throws ApiError
2243
3508
  */
2244
- public static importerConfigControllerGetConfig(
2245
- data: ImporterConfigControllerGetConfigData
2246
- ): CancelablePromise<ImporterConfigControllerGetConfigResponse> {
3509
+ public static externalAccountLinkControllerFindAll(
3510
+ data: ExternalAccountLinkControllerFindAllData
3511
+ ): CancelablePromise<ExternalAccountLinkControllerFindAllResponse> {
2247
3512
  return __request(OpenAPI, {
2248
3513
  method: 'GET',
2249
- url: '/api/v1/{region}/bean/import/config/{importerId}',
3514
+ url: '/api/v1/{region}/bean/external-account-links',
2250
3515
  path: {
2251
- importerId: data.importerId,
2252
3516
  region: data.region
2253
3517
  },
2254
- errors: {
2255
- 400: 'Invalid input - Unsupported importer',
2256
- 401: 'Unauthorized - Authentication required'
3518
+ query: {
3519
+ provider: data.provider
2257
3520
  }
2258
3521
  });
2259
3522
  }
2260
3523
 
2261
3524
  /**
3525
+ * Get a single external account link
2262
3526
  * @param data The data for the request.
2263
- * @param data.region Region code (cn, us, de)
2264
- * @returns unknown
3527
+ * @param data.id
3528
+ * @param data.region Region code for tenant context
3529
+ * @returns ExternalAccountLinkResponseDto Link retrieved.
2265
3530
  * @throws ApiError
2266
3531
  */
2267
- public static importerConfigController(
2268
- data: ImporterConfigControllerData
2269
- ): CancelablePromise<ImporterConfigControllerResponse> {
3532
+ public static externalAccountLinkControllerFindOne(
3533
+ data: ExternalAccountLinkControllerFindOneData
3534
+ ): CancelablePromise<ExternalAccountLinkControllerFindOneResponse> {
2270
3535
  return __request(OpenAPI, {
2271
- method: 'PUT',
2272
- url: '/api/v1/{region}/bean/import/config/{importerId}',
3536
+ method: 'GET',
3537
+ url: '/api/v1/{region}/bean/external-account-links/{id}',
2273
3538
  path: {
3539
+ id: data.id,
2274
3540
  region: data.region
3541
+ },
3542
+ errors: {
3543
+ 422: 'Link not found or not owned by the user.'
2275
3544
  }
2276
3545
  });
2277
3546
  }
2278
3547
 
2279
3548
  /**
3549
+ * Soft-delete (disconnect) an external account link
2280
3550
  * @param data The data for the request.
2281
- * @param data.region Region code (cn, us, de)
2282
- * @returns unknown
3551
+ * @param data.id
3552
+ * @param data.region Region code for tenant context
3553
+ * @returns void Link soft-deleted; historical transactions are unaffected.
2283
3554
  * @throws ApiError
2284
3555
  */
2285
- public static importerConfigController1(
2286
- data: ImporterConfigController1Data
2287
- ): CancelablePromise<ImporterConfigController1Response> {
3556
+ public static externalAccountLinkControllerRemove(
3557
+ data: ExternalAccountLinkControllerRemoveData
3558
+ ): CancelablePromise<ExternalAccountLinkControllerRemoveResponse> {
2288
3559
  return __request(OpenAPI, {
2289
- method: 'POST',
2290
- url: '/api/v1/{region}/bean/import/config/{importerId}/reset',
3560
+ method: 'DELETE',
3561
+ url: '/api/v1/{region}/bean/external-account-links/{id}',
2291
3562
  path: {
3563
+ id: data.id,
2292
3564
  region: data.region
2293
3565
  }
2294
3566
  });
2295
3567
  }
2296
3568
  }
2297
3569
 
2298
- export class ProviderSyncService {
3570
+ export class ImportTelemetryService {
2299
3571
  /**
2300
- * Sync transactions from financial data provider
2301
- *
2302
- * Accepts raw transactions from external financial data providers, transforms them to Beancount format, and processes them through the ingestion pipeline.
2303
- *
2304
- * **Supported Providers:**
2305
- * - **plaid**: Plaid API (US, Canada, Europe)
2306
- * - **teller**: Teller API (US)
2307
- * - **truelayer**: TrueLayer Open Banking (UK, Europe)
2308
- * - **gocardless**: GoCardless Bank Account Data (Europe)
2309
- * - **simplefin**: SimpleFIN (Self-hosted)
2310
- * - **yodlee**: Yodlee (Global)
2311
- * - **beancount-direct**: Beancount format transactions
2312
- *
2313
- * **Processing Flow:**
2314
- * 1. Transform raw data via provider adapter
2315
- * 2. Validate transaction format
2316
- * 3. Deduplicate using originalId
2317
- * 4. Classify using rule engine
2318
- * 5. Route low-confidence to Review Center
2319
- * 6. Persist validated transactions
2320
- *
3572
+ * Receive anonymous parser failure telemetry
2321
3573
  * @param data The data for the request.
2322
- * @param data.providerName Provider name
2323
- * @param data.region Region code
3574
+ * @param data.region Region code for tenant context
2324
3575
  * @param data.requestBody
2325
- * @returns ProviderSyncResponseDto Sync completed successfully
3576
+ * @returns unknown Telemetry report received
2326
3577
  * @throws ApiError
2327
3578
  */
2328
- public static providerSyncControllerSync(
2329
- data: ProviderSyncControllerSyncData
2330
- ): CancelablePromise<ProviderSyncControllerSyncResponse> {
3579
+ public static telemetryControllerReportTelemetry(
3580
+ data: TelemetryControllerReportTelemetryData
3581
+ ): CancelablePromise<TelemetryControllerReportTelemetryResponse> {
2331
3582
  return __request(OpenAPI, {
2332
3583
  method: 'POST',
2333
- url: '/api/v1/{region}/bean/import/provider/{providerName}/sync',
3584
+ url: '/api/v1/{region}/bean/import/parser-telemetry',
2334
3585
  path: {
2335
- providerName: data.providerName,
2336
3586
  region: data.region
2337
3587
  },
2338
3588
  body: data.requestBody,
2339
3589
  mediaType: 'application/json',
2340
3590
  errors: {
2341
- 400: 'Invalid request data',
2342
- 401: 'Missing or invalid authentication',
2343
- 404: 'Provider not supported'
3591
+ 401: 'Unauthorized'
2344
3592
  }
2345
3593
  });
2346
3594
  }
2347
3595
 
2348
3596
  /**
2349
- * Get supported providers
2350
- * Returns a list of all providers supported by the sync endpoint.
3597
+ * Receive anonymous zero-hit coverage miss report
2351
3598
  * @param data The data for the request.
2352
- * @param data.region Region code (cn, us, de)
2353
- * @returns SupportedProvidersResponseDto List of supported providers
3599
+ * @param data.region Region code for tenant context
3600
+ * @param data.requestBody
3601
+ * @returns unknown Coverage miss report received
2354
3602
  * @throws ApiError
2355
3603
  */
2356
- public static providerSyncControllerGetSupportedProviders(
2357
- data: ProviderSyncControllerGetSupportedProvidersData
2358
- ): CancelablePromise<ProviderSyncControllerGetSupportedProvidersResponse> {
3604
+ public static telemetryControllerReportCoverageMiss(
3605
+ data: TelemetryControllerReportCoverageMissData
3606
+ ): CancelablePromise<TelemetryControllerReportCoverageMissResponse> {
2359
3607
  return __request(OpenAPI, {
2360
- method: 'GET',
2361
- url: '/api/v1/{region}/bean/import/provider/supported',
3608
+ method: 'POST',
3609
+ url: '/api/v1/{region}/bean/import/parser-coverage-miss',
2362
3610
  path: {
2363
3611
  region: data.region
2364
3612
  },
3613
+ body: data.requestBody,
3614
+ mediaType: 'application/json',
2365
3615
  errors: {
2366
- 401: 'Missing or invalid authentication'
3616
+ 401: 'Unauthorized'
2367
3617
  }
2368
3618
  });
2369
3619
  }
2370
3620
 
2371
3621
  /**
2372
- * Check if provider is supported
2373
- * Returns whether a specific provider is supported.
3622
+ * Coverage metrics (uncovered format aggregation)
2374
3623
  * @param data The data for the request.
2375
- * @param data.providerName Provider name to check
2376
- * @param data.region Region code (cn, us, de)
2377
- * @returns unknown Provider support status
3624
+ * @param data.region Region code for tenant context
3625
+ * @param data.topN Top-N uncovered formats (default 10)
3626
+ * @returns unknown Coverage metrics
2378
3627
  * @throws ApiError
2379
3628
  */
2380
- public static providerSyncControllerIsProviderSupported(
2381
- data: ProviderSyncControllerIsProviderSupportedData
2382
- ): CancelablePromise<ProviderSyncControllerIsProviderSupportedResponse> {
3629
+ public static telemetryControllerGetCoverageMetrics(
3630
+ data: TelemetryControllerGetCoverageMetricsData
3631
+ ): CancelablePromise<TelemetryControllerGetCoverageMetricsResponse> {
2383
3632
  return __request(OpenAPI, {
2384
3633
  method: 'GET',
2385
- url: '/api/v1/{region}/bean/import/provider/{providerName}/supported',
3634
+ url: '/api/v1/{region}/bean/import/parser-coverage-metrics',
2386
3635
  path: {
2387
- providerName: data.providerName,
2388
3636
  region: data.region
2389
3637
  },
2390
- errors: {
2391
- 401: 'Missing or invalid authentication'
3638
+ query: {
3639
+ topN: data.topN
2392
3640
  }
2393
3641
  });
2394
3642
  }
@@ -2399,7 +3647,7 @@ export class BeanNlpService {
2399
3647
  * Process natural language input
2400
3648
  * 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"
2401
3649
  * @param data The data for the request.
2402
- * @param data.region Region code (cn, us, de)
3650
+ * @param data.region Region code for tenant context
2403
3651
  * @param data.requestBody Natural language transaction input with optional session ID
2404
3652
  * @returns NlpResponseDto NLP processing result - either created transaction or asking for more info
2405
3653
  * @throws ApiError
@@ -2426,7 +3674,7 @@ export class BeanNlpService {
2426
3674
  * Clear dialogue session
2427
3675
  * Clear the current NLP dialogue session. Use this to cancel an ongoing multi-turn dialogue.
2428
3676
  * @param data The data for the request.
2429
- * @param data.region Region code (cn, us, de)
3677
+ * @param data.region Region code for tenant context
2430
3678
  * @param data.sessionId Specific session ID to clear (defaults to user session)
2431
3679
  * @returns void Session cleared successfully
2432
3680
  * @throws ApiError
@@ -2453,7 +3701,7 @@ export class BeanNlpService {
2453
3701
  * Get current session state
2454
3702
  * Get the current NLP dialogue session state. Useful for debugging and displaying session context in UI.
2455
3703
  * @param data The data for the request.
2456
- * @param data.region Region code (cn, us, de)
3704
+ * @param data.region Region code for tenant context
2457
3705
  * @param data.sessionId Specific session ID to get (defaults to user session)
2458
3706
  * @returns unknown Current session state (or null if no active session)
2459
3707
  * @throws ApiError
@@ -2480,37 +3728,33 @@ export class BeanNlpService {
2480
3728
  export class BeanPlatformsService {
2481
3729
  /**
2482
3730
  * Get all platforms with statistics
2483
- * @param data The data for the request.
2484
- * @param data.region Region code (cn, us, de)
2485
3731
  * @returns unknown List of platforms with binding and account counts
2486
3732
  * @throws ApiError
2487
3733
  */
2488
- public static platformControllerFindAll(
2489
- data: PlatformControllerFindAllData
2490
- ): CancelablePromise<PlatformControllerFindAllResponse> {
3734
+ public static platformControllerFindAll(): CancelablePromise<PlatformControllerFindAllResponse> {
2491
3735
  return __request(OpenAPI, {
2492
3736
  method: 'GET',
2493
- url: '/api/v1/bean/platforms',
2494
- path: {
2495
- region: data.region
2496
- }
3737
+ url: '/api/v1/bean/platforms'
2497
3738
  });
2498
3739
  }
2499
3740
 
2500
3741
  /**
3742
+ * Create a new platform
2501
3743
  * @param data The data for the request.
2502
- * @param data.region Region code (cn, us, de)
2503
- * @returns unknown
3744
+ * @param data.requestBody
3745
+ * @returns unknown Platform created successfully
2504
3746
  * @throws ApiError
2505
3747
  */
2506
- public static platformController(
2507
- data: PlatformControllerData
2508
- ): CancelablePromise<PlatformControllerResponse> {
3748
+ public static platformControllerCreate(
3749
+ data: PlatformControllerCreateData
3750
+ ): CancelablePromise<PlatformControllerCreateResponse> {
2509
3751
  return __request(OpenAPI, {
2510
3752
  method: 'POST',
2511
3753
  url: '/api/v1/bean/platforms',
2512
- path: {
2513
- region: data.region
3754
+ body: data.requestBody,
3755
+ mediaType: 'application/json',
3756
+ errors: {
3757
+ 409: 'Platform already exists'
2514
3758
  }
2515
3759
  });
2516
3760
  }
@@ -2518,191 +3762,86 @@ export class BeanPlatformsService {
2518
3762
  /**
2519
3763
  * Get platform list for current user
2520
3764
  * @param data The data for the request.
2521
- * @param data.region Region code (cn, us, de)
2522
- * @returns unknown List of platforms with user binding status
3765
+ * @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").
3766
+ * @returns PlatformListItemDto List of platforms with user binding status
2523
3767
  * @throws ApiError
2524
3768
  */
2525
3769
  public static platformControllerGetPlatformList(
2526
- data: PlatformControllerGetPlatformListData
3770
+ data: PlatformControllerGetPlatformListData = {}
2527
3771
  ): CancelablePromise<PlatformControllerGetPlatformListResponse> {
2528
3772
  return __request(OpenAPI, {
2529
3773
  method: 'GET',
2530
3774
  url: '/api/v1/bean/platforms/list',
2531
- path: {
2532
- region: data.region
2533
- }
2534
- });
2535
- }
2536
-
2537
- /**
2538
- * @param data The data for the request.
2539
- * @param data.region Region code (cn, us, de)
2540
- * @returns unknown
2541
- * @throws ApiError
2542
- */
2543
- public static platformController1(
2544
- data: PlatformController1Data
2545
- ): CancelablePromise<PlatformController1Response> {
2546
- return __request(OpenAPI, {
2547
- method: 'PUT',
2548
- url: '/api/v1/bean/platforms/{id}',
2549
- path: {
2550
- region: data.region
2551
- }
2552
- });
2553
- }
2554
-
2555
- /**
2556
- * @param data The data for the request.
2557
- * @param data.region Region code (cn, us, de)
2558
- * @returns void
2559
- * @throws ApiError
2560
- */
2561
- public static platformController2(
2562
- data: PlatformController2Data
2563
- ): CancelablePromise<PlatformController2Response> {
2564
- return __request(OpenAPI, {
2565
- method: 'DELETE',
2566
- url: '/api/v1/bean/platforms/{id}',
2567
- path: {
3775
+ query: {
2568
3776
  region: data.region
2569
3777
  }
2570
3778
  });
2571
3779
  }
2572
- }
2573
3780
 
2574
- export class SymbolsService {
2575
3781
  /**
2576
- * Search for symbols
2577
- * Search symbols by query with optional filters for asset class, area, and indices
3782
+ * Match platforms by name or alias
2578
3783
  * @param data The data for the request.
2579
- * @param data.region Region code (cn, us, de)
2580
- * @param data.includeIndices Include index symbols in results
2581
- * @param data.assetSubClass Asset sub-class filter
2582
- * @param data.assetClass Asset class filter
2583
- * @param data.area Geographic area filter (e.g., CN, US)
2584
- * @param data.query Search query string
2585
- * @returns unknown Symbols found successfully
3784
+ * @param data.q Search query — Chinese name, English name, or abbreviation
3785
+ * @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").
3786
+ * @returns PlatformMatchResponseDto Matching platforms with overall match type and truncation flag
2586
3787
  * @throws ApiError
2587
3788
  */
2588
- public static symbolControllerLookupSymbol(
2589
- data: SymbolControllerLookupSymbolData
2590
- ): CancelablePromise<SymbolControllerLookupSymbolResponse> {
3789
+ public static platformControllerMatchPlatforms(
3790
+ data: PlatformControllerMatchPlatformsData
3791
+ ): CancelablePromise<PlatformControllerMatchPlatformsResponse> {
2591
3792
  return __request(OpenAPI, {
2592
3793
  method: 'GET',
2593
- url: '/api/v1/market/symbols/lookup',
2594
- path: {
2595
- region: data.region
2596
- },
3794
+ url: '/api/v1/bean/platforms/match',
2597
3795
  query: {
2598
- includeIndices: data.includeIndices,
2599
- assetSubClass: data.assetSubClass,
2600
- assetClass: data.assetClass,
2601
- area: data.area,
2602
- query: data.query
2603
- },
2604
- errors: {
2605
- 400: 'Invalid query parameters'
3796
+ q: data.q,
3797
+ region: data.region
2606
3798
  }
2607
3799
  });
2608
3800
  }
2609
3801
 
2610
3802
  /**
2611
- * Get symbol data
2612
- * Retrieve detailed symbol information including optional historical data
3803
+ * Update a platform
2613
3804
  * @param data The data for the request.
2614
- * @param data.dataSource Data source provider
2615
- * @param data.symbol Symbol identifier (e.g., ticker code)
2616
- * @param data.region Region code (cn, us, de)
2617
- * @param data.includeHistoricalData Include historical price data (0 or 1)
2618
- * @returns unknown Symbol data retrieved successfully
3805
+ * @param data.id Platform ID
3806
+ * @param data.requestBody
3807
+ * @returns unknown Platform updated successfully
2619
3808
  * @throws ApiError
2620
3809
  */
2621
- public static symbolControllerGetSymbolData(
2622
- data: SymbolControllerGetSymbolDataData
2623
- ): CancelablePromise<SymbolControllerGetSymbolDataResponse> {
3810
+ public static platformControllerUpdate(
3811
+ data: PlatformControllerUpdateData
3812
+ ): CancelablePromise<PlatformControllerUpdateResponse> {
2624
3813
  return __request(OpenAPI, {
2625
- method: 'GET',
2626
- url: '/api/v1/market/symbols/{dataSource}/{symbol}',
3814
+ method: 'PUT',
3815
+ url: '/api/v1/bean/platforms/{id}',
2627
3816
  path: {
2628
- dataSource: data.dataSource,
2629
- symbol: data.symbol,
2630
- region: data.region
2631
- },
2632
- query: {
2633
- includeHistoricalData: data.includeHistoricalData
3817
+ id: data.id
2634
3818
  },
3819
+ body: data.requestBody,
3820
+ mediaType: 'application/json',
2635
3821
  errors: {
2636
- 400: 'Invalid data source',
2637
- 404: 'Symbol not found'
3822
+ 404: 'Platform not found'
2638
3823
  }
2639
3824
  });
2640
3825
  }
2641
3826
 
2642
3827
  /**
2643
- * Gather symbol data for specific date
2644
- * Retrieve historical symbol data for a specific date
3828
+ * Delete a platform
2645
3829
  * @param data The data for the request.
2646
- * @param data.dataSource Data source provider
2647
- * @param data.dateString Date in ISO 8601 format (YYYY-MM-DD)
2648
- * @param data.symbol Symbol identifier (e.g., ticker code)
2649
- * @param data.region Region code (cn, us, de)
2650
- * @returns unknown Historical data retrieved successfully
3830
+ * @param data.id Platform ID
3831
+ * @returns void Platform deleted successfully
2651
3832
  * @throws ApiError
2652
3833
  */
2653
- public static symbolControllerGatherSymbolForDate(
2654
- data: SymbolControllerGatherSymbolForDateData
2655
- ): CancelablePromise<SymbolControllerGatherSymbolForDateResponse> {
3834
+ public static platformControllerDelete(
3835
+ data: PlatformControllerDeleteData
3836
+ ): CancelablePromise<PlatformControllerDeleteResponse> {
2656
3837
  return __request(OpenAPI, {
2657
- method: 'GET',
2658
- url: '/api/v1/market/symbols/{dataSource}/{symbol}/{dateString}',
3838
+ method: 'DELETE',
3839
+ url: '/api/v1/bean/platforms/{id}',
2659
3840
  path: {
2660
- dataSource: data.dataSource,
2661
- dateString: data.dateString,
2662
- symbol: data.symbol,
2663
- region: data.region
3841
+ id: data.id
2664
3842
  },
2665
3843
  errors: {
2666
- 400: 'Invalid date format',
2667
- 404: 'Symbol data not found for specified date'
2668
- }
2669
- });
2670
- }
2671
-
2672
- /**
2673
- * @param data The data for the request.
2674
- * @param data.region Region code (cn, us, de)
2675
- * @returns unknown
2676
- * @throws ApiError
2677
- */
2678
- public static symbolController(
2679
- data: SymbolControllerData
2680
- ): CancelablePromise<SymbolControllerResponse> {
2681
- return __request(OpenAPI, {
2682
- method: 'PUT',
2683
- url: '/api/v1/market/symbols/yahoo/batch-update',
2684
- path: {
2685
- region: data.region
2686
- }
2687
- });
2688
- }
2689
- }
2690
-
2691
- export class DefaultService {
2692
- /**
2693
- * @param data The data for the request.
2694
- * @param data.region Region code (cn, us, de)
2695
- * @returns unknown
2696
- * @throws ApiError
2697
- */
2698
- public static cacheControllerFlushCache(
2699
- data: CacheControllerFlushCacheData
2700
- ): CancelablePromise<CacheControllerFlushCacheResponse> {
2701
- return __request(OpenAPI, {
2702
- method: 'POST',
2703
- url: '/api/v1/cache/flush',
2704
- path: {
2705
- region: data.region
3844
+ 404: 'Platform not found'
2706
3845
  }
2707
3846
  });
2708
3847
  }
@@ -2713,7 +3852,7 @@ export class DashboardService {
2713
3852
  * Get net worth overview
2714
3853
  * Returns total net worth with breakdown of assets and liabilities
2715
3854
  * @param data The data for the request.
2716
- * @param data.region Region code (cn, us, de)
3855
+ * @param data.region Region code for tenant context
2717
3856
  * @param data.date Date for balance calculation (ISO 8601 format)
2718
3857
  * @returns NetWorthResponseDto Net worth retrieved successfully
2719
3858
  * @throws ApiError
@@ -2740,9 +3879,10 @@ export class DashboardService {
2740
3879
  * Get accounts grouped by platform
2741
3880
  * Returns accounts with balances grouped by financial platform
2742
3881
  * @param data The data for the request.
2743
- * @param data.region Region code (cn, us, de)
3882
+ * @param data.region Region code for tenant context
2744
3883
  * @param data.groupBy Grouping strategy
2745
3884
  * @param data.date Date for balance calculation (ISO 8601 format)
3885
+ * @param data.accountId Scope to a single account (only valid with groupBy=holdingAssetClass, ADR-0105 §6)
2746
3886
  * @returns unknown Accounts retrieved successfully. Response type depends on groupBy parameter.
2747
3887
  * @throws ApiError
2748
3888
  */
@@ -2757,159 +3897,105 @@ export class DashboardService {
2757
3897
  },
2758
3898
  query: {
2759
3899
  groupBy: data.groupBy,
2760
- date: data.date
2761
- },
2762
- errors: {
2763
- 401: 'User not authenticated'
2764
- }
2765
- });
2766
- }
2767
-
2768
- /**
2769
- * Get cash flow summary
2770
- * Returns income, expenses, and savings for a monthly period
2771
- * @param data The data for the request.
2772
- * @param data.period Period in YYYY-MM format
2773
- * @param data.region Region code (cn, us, de)
2774
- * @returns CashFlowResponseDto Cash flow retrieved successfully
2775
- * @throws ApiError
2776
- */
2777
- public static dashboardControllerGetCashFlow(
2778
- data: DashboardControllerGetCashFlowData
2779
- ): CancelablePromise<DashboardControllerGetCashFlowResponse> {
2780
- return __request(OpenAPI, {
2781
- method: 'GET',
2782
- url: '/api/v1/{region}/dashboard/cash-flow',
2783
- path: {
2784
- region: data.region
2785
- },
2786
- query: {
2787
- period: data.period
2788
- },
2789
- errors: {
2790
- 400: 'Invalid period format',
2791
- 401: 'User not authenticated'
2792
- }
2793
- });
2794
- }
2795
- }
2796
-
2797
- export class ReportingService {
2798
- /**
2799
- * Get portfolio value trends
2800
- *
2801
- * Returns time series data of portfolio net worth.
2802
- *
2803
- * **Multi-currency Support:**
2804
- * - `series[].byCurrency` - Currency breakdown for each data point
2805
- * - `byCurrency` - Separate time series grouped by currency
2806
- * - `warnings` - Exchange rate warnings if conversion failed
2807
- *
2808
- * **Parameters:**
2809
- * - `period`: Time period (1m, 3m, 6m, 1y)
2810
- * - `granularity`: Data granularity (day, week, month)
2811
- *
3900
+ date: data.date,
3901
+ accountId: data.accountId
3902
+ },
3903
+ errors: {
3904
+ 401: 'User not authenticated'
3905
+ }
3906
+ });
3907
+ }
3908
+
3909
+ /**
3910
+ * Get cash flow summary
3911
+ * Returns income, expenses, and savings for a monthly period
2812
3912
  * @param data The data for the request.
2813
- * @param data.region Region code (cn, us, de)
2814
- * @param data.period Time period
2815
- * @param data.granularity Data granularity
2816
- * @returns PortfolioTrendsResponseDto Trends retrieved successfully
3913
+ * @param data.period Period in YYYY-MM format
3914
+ * @param data.region Region code for tenant context
3915
+ * @returns CashFlowResponseDto Cash flow retrieved successfully
2817
3916
  * @throws ApiError
2818
3917
  */
2819
- public static reportingControllerGetPortfolioTrends(
2820
- data: ReportingControllerGetPortfolioTrendsData
2821
- ): CancelablePromise<ReportingControllerGetPortfolioTrendsResponse> {
3918
+ public static dashboardControllerGetCashFlow(
3919
+ data: DashboardControllerGetCashFlowData
3920
+ ): CancelablePromise<DashboardControllerGetCashFlowResponse> {
2822
3921
  return __request(OpenAPI, {
2823
3922
  method: 'GET',
2824
- url: '/api/v1/{region}/reporting/portfolio/trends',
3923
+ url: '/api/v1/{region}/dashboard/cash-flow',
2825
3924
  path: {
2826
3925
  region: data.region
2827
3926
  },
2828
3927
  query: {
2829
- period: data.period,
2830
- granularity: data.granularity
3928
+ period: data.period
2831
3929
  },
2832
3930
  errors: {
3931
+ 400: 'Invalid period format',
2833
3932
  401: 'User not authenticated'
2834
3933
  }
2835
3934
  });
2836
3935
  }
2837
3936
 
2838
3937
  /**
2839
- * Generate portfolio snapshot
2840
- *
2841
- * Manually generate a portfolio snapshot for a specific date.
2842
- *
2843
- * **Multi-currency Support:**
2844
- * - Fetches balances grouped by currency
2845
- * - Uses user's baseCurrency setting for conversion
2846
- * - Stores exchange rates and warnings
2847
- *
2848
- * **Use Cases:**
2849
- * - Testing snapshot generation
2850
- * - Force regeneration after data correction
2851
- * - Initial setup for new users
2852
- *
3938
+ * Get expenses/income grouped by functional category
3939
+ * 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)
2853
3940
  * @param data The data for the request.
2854
- * @param data.region Region code (cn, us, de)
2855
- * @param data.requestBody Optional date (defaults to today)
2856
- * @returns GenerateSnapshotResponse Snapshot generated successfully
3941
+ * @param data.region Region code for tenant context
3942
+ * @param data.groupBy Grouping strategy
3943
+ * @param data.period Time window (1m = current calendar month)
3944
+ * @param data.flow Account root to aggregate (expense → ^Expenses:, income → ^Income:)
3945
+ * @returns ExpensesByCategoryResponseDto Expenses retrieved successfully
2857
3946
  * @throws ApiError
2858
3947
  */
2859
- public static reportingControllerGenerateSnapshot(
2860
- data: ReportingControllerGenerateSnapshotData
2861
- ): CancelablePromise<ReportingControllerGenerateSnapshotResponse> {
3948
+ public static dashboardControllerGetExpenses(
3949
+ data: DashboardControllerGetExpensesData
3950
+ ): CancelablePromise<DashboardControllerGetExpensesResponse> {
2862
3951
  return __request(OpenAPI, {
2863
- method: 'POST',
2864
- url: '/api/v1/{region}/reporting/snapshots/generate',
3952
+ method: 'GET',
3953
+ url: '/api/v1/{region}/dashboard/expenses',
2865
3954
  path: {
2866
3955
  region: data.region
2867
3956
  },
2868
- body: data.requestBody,
2869
- mediaType: 'application/json',
3957
+ query: {
3958
+ groupBy: data.groupBy,
3959
+ period: data.period,
3960
+ flow: data.flow
3961
+ },
2870
3962
  errors: {
2871
- 400: 'Invalid date format',
3963
+ 400: 'Invalid groupBy or period',
2872
3964
  401: 'User not authenticated'
2873
3965
  }
2874
3966
  });
2875
3967
  }
3968
+ }
2876
3969
 
3970
+ export class InvestmentService {
2877
3971
  /**
2878
- * Backfill portfolio snapshots
2879
- *
2880
- * Generate snapshots for a date range (historical data backfill).
2881
- *
2882
- * **Multi-currency Support:**
2883
- * - Each snapshot includes multi-currency data
2884
- * - Uses exchange rates available at generation time
2885
- * - Warnings stored for missing exchange rates
2886
- *
2887
- * **Best Practices:**
2888
- * - Use for initial setup after account configuration
2889
- * - Run during low-traffic periods for large date ranges
2890
- * - Existing snapshots are skipped (not regenerated)
2891
- *
3972
+ * Get per-holding unrealized + realized P&L
3973
+ * Average-cost unrealized P&L per account × commodity, plus cumulative realized P&L on sold lots (method = FIFO | average, default average).
2892
3974
  * @param data The data for the request.
2893
- * @param data.region Region code (cn, us, de)
2894
- * @param data.requestBody
2895
- * @returns BackfillSnapshotsResponse Backfill completed successfully
3975
+ * @param data.region Region code for tenant context
3976
+ * @param data.asOf As-of date (ISO 8601), defaults to today
3977
+ * @param data.accountId Scope to a single account
3978
+ * @param data.method Realized-P&L lot-matching method (default average). Does not affect the average-cost unrealized basis.
3979
+ * @returns HoldingPnlResponseDto Holding P&L retrieved successfully
2896
3980
  * @throws ApiError
2897
3981
  */
2898
- public static reportingControllerBackfillSnapshots(
2899
- data: ReportingControllerBackfillSnapshotsData
2900
- ): CancelablePromise<ReportingControllerBackfillSnapshotsResponse> {
3982
+ public static holdingPnlControllerGetHoldingPnl(
3983
+ data: HoldingPnlControllerGetHoldingPnlData
3984
+ ): CancelablePromise<HoldingPnlControllerGetHoldingPnlResponse> {
2901
3985
  return __request(OpenAPI, {
2902
- method: 'POST',
2903
- url: '/api/v1/{region}/reporting/snapshots/backfill',
3986
+ method: 'GET',
3987
+ url: '/api/v1/{region}/investment/holdings/pnl',
2904
3988
  path: {
2905
3989
  region: data.region
2906
3990
  },
2907
- body: data.requestBody,
2908
- mediaType: 'application/json',
3991
+ query: {
3992
+ asOf: data.asOf,
3993
+ accountId: data.accountId,
3994
+ method: data.method
3995
+ },
2909
3996
  errors: {
2910
- 400: 'Invalid date format or range',
2911
- 401: 'User not authenticated',
2912
- 409: 'Backfill already in progress for this user'
3997
+ 400: 'Invalid asOf format/value/future date, invalid accountId format, or unsupported method',
3998
+ 401: 'User not authenticated'
2913
3999
  }
2914
4000
  });
2915
4001
  }
@@ -2917,19 +4003,17 @@ export class ReportingService {
2917
4003
 
2918
4004
  export class ApiKeysService {
2919
4005
  /**
2920
- * @param data The data for the request.
2921
- * @param data.region Region code (cn, us, de)
2922
- * @returns unknown
4006
+ * Create API key
4007
+ * Generates a new API key for the authenticated user
4008
+ * @returns unknown API key created successfully
2923
4009
  * @throws ApiError
2924
4010
  */
2925
- public static apiKeysController(
2926
- data: ApiKeysControllerData
2927
- ): CancelablePromise<ApiKeysControllerResponse> {
4011
+ public static apiKeysControllerCreateApiKey(): CancelablePromise<ApiKeysControllerCreateApiKeyResponse> {
2928
4012
  return __request(OpenAPI, {
2929
4013
  method: 'POST',
2930
4014
  url: '/api/v1/auth/api-keys',
2931
- path: {
2932
- region: data.region
4015
+ errors: {
4016
+ 403: 'Insufficient permissions to create API key'
2933
4017
  }
2934
4018
  });
2935
4019
  }
@@ -2939,9 +4023,8 @@ export class AuthService {
2939
4023
  /**
2940
4024
  * Anonymous login with access token
2941
4025
  * @param data The data for the request.
2942
- * @param data.region Region code (cn, us, de)
2943
4026
  * @param data.requestBody
2944
- * @returns unknown Login successful
4027
+ * @returns AnonymousLoginResponseDto Login successful
2945
4028
  * @throws ApiError
2946
4029
  */
2947
4030
  public static authControllerAccessTokenLogin(
@@ -2950,9 +4033,6 @@ export class AuthService {
2950
4033
  return __request(OpenAPI, {
2951
4034
  method: 'POST',
2952
4035
  url: '/api/v1/auth/sessions/anonymous',
2953
- path: {
2954
- region: data.region
2955
- },
2956
4036
  body: data.requestBody,
2957
4037
  mediaType: 'application/json',
2958
4038
  errors: {
@@ -2962,6 +4042,19 @@ export class AuthService {
2962
4042
  }
2963
4043
  }
2964
4044
 
4045
+ export class DefaultService {
4046
+ /**
4047
+ * @returns unknown
4048
+ * @throws ApiError
4049
+ */
4050
+ public static cacheControllerFlushCache(): CancelablePromise<CacheControllerFlushCacheResponse> {
4051
+ return __request(OpenAPI, {
4052
+ method: 'POST',
4053
+ url: '/api/v1/cache/flush'
4054
+ });
4055
+ }
4056
+ }
4057
+
2965
4058
  export class ExchangeRateService {
2966
4059
  /**
2967
4060
  * Get exchange rate for currency pair
@@ -2969,7 +4062,6 @@ export class ExchangeRateService {
2969
4062
  * @param data The data for the request.
2970
4063
  * @param data.symbol Currency pair symbol (e.g., USDCNY, EURUSD)
2971
4064
  * @param data.dateString Date in ISO format (YYYY-MM-DD)
2972
- * @param data.region Region code (cn, us, de)
2973
4065
  * @returns unknown Exchange rate retrieved successfully
2974
4066
  * @throws ApiError
2975
4067
  */
@@ -2981,8 +4073,7 @@ export class ExchangeRateService {
2981
4073
  url: '/api/v1/market/exchange-rates/{symbol}/{dateString}',
2982
4074
  path: {
2983
4075
  symbol: data.symbol,
2984
- dateString: data.dateString,
2985
- region: data.region
4076
+ dateString: data.dateString
2986
4077
  },
2987
4078
  errors: {
2988
4079
  404: 'Exchange rate not found for the specified currency pair and date'
@@ -2994,20 +4085,13 @@ export class ExchangeRateService {
2994
4085
  export class HealthService {
2995
4086
  /**
2996
4087
  * Basic health check for K8s/load balancer probes
2997
- * @param data The data for the request.
2998
- * @param data.region Region code (cn, us, de)
2999
4088
  * @returns unknown Service is healthy
3000
4089
  * @throws ApiError
3001
4090
  */
3002
- public static healthControllerGetHealth(
3003
- data: HealthControllerGetHealthData
3004
- ): CancelablePromise<HealthControllerGetHealthResponse> {
4091
+ public static healthControllerGetHealth(): CancelablePromise<HealthControllerGetHealthResponse> {
3005
4092
  return __request(OpenAPI, {
3006
4093
  method: 'GET',
3007
4094
  url: '/api/v1/health',
3008
- path: {
3009
- region: data.region
3010
- },
3011
4095
  errors: {
3012
4096
  503: 'Service unavailable'
3013
4097
  }
@@ -3016,42 +4100,43 @@ export class HealthService {
3016
4100
 
3017
4101
  /**
3018
4102
  * Check database connection health
3019
- * @param data The data for the request.
3020
- * @param data.region Region code (cn, us, de)
3021
4103
  * @returns unknown Database is healthy
3022
4104
  * @throws ApiError
3023
4105
  */
3024
- public static healthControllerCheckDatabase(
3025
- data: HealthControllerCheckDatabaseData
3026
- ): CancelablePromise<HealthControllerCheckDatabaseResponse> {
4106
+ public static healthControllerCheckDatabase(): CancelablePromise<HealthControllerCheckDatabaseResponse> {
3027
4107
  return __request(OpenAPI, {
3028
4108
  method: 'GET',
3029
4109
  url: '/api/v1/health/database',
3030
- path: {
3031
- region: data.region
3032
- },
3033
4110
  errors: {
3034
4111
  503: 'Database unavailable'
3035
4112
  }
3036
4113
  });
3037
4114
  }
3038
4115
 
4116
+ /**
4117
+ * Check OpenBB schema status
4118
+ * @returns unknown OpenBB status
4119
+ * @throws ApiError
4120
+ */
4121
+ public static healthControllerCheckOpenBb(): CancelablePromise<HealthControllerCheckOpenBbResponse> {
4122
+ return __request(OpenAPI, {
4123
+ method: 'GET',
4124
+ url: '/api/v1/health/openbb',
4125
+ errors: {
4126
+ 503: 'OpenBB unavailable'
4127
+ }
4128
+ });
4129
+ }
4130
+
3039
4131
  /**
3040
4132
  * Check Redis connection health
3041
- * @param data The data for the request.
3042
- * @param data.region Region code (cn, us, de)
3043
4133
  * @returns unknown Redis is healthy
3044
4134
  * @throws ApiError
3045
4135
  */
3046
- public static healthControllerCheckRedis(
3047
- data: HealthControllerCheckRedisData
3048
- ): CancelablePromise<HealthControllerCheckRedisResponse> {
4136
+ public static healthControllerCheckRedis(): CancelablePromise<HealthControllerCheckRedisResponse> {
3049
4137
  return __request(OpenAPI, {
3050
4138
  method: 'GET',
3051
4139
  url: '/api/v1/health/redis',
3052
- path: {
3053
- region: data.region
3054
- },
3055
4140
  errors: {
3056
4141
  503: 'Redis unavailable'
3057
4142
  }
@@ -3060,20 +4145,13 @@ export class HealthService {
3060
4145
 
3061
4146
  /**
3062
4147
  * Get status of all circuit breakers
3063
- * @param data The data for the request.
3064
- * @param data.region Region code (cn, us, de)
3065
4148
  * @returns unknown Circuit breaker status
3066
4149
  * @throws ApiError
3067
4150
  */
3068
- public static healthControllerGetCircuitBreakersHealth(
3069
- data: HealthControllerGetCircuitBreakersHealthData
3070
- ): CancelablePromise<HealthControllerGetCircuitBreakersHealthResponse> {
4151
+ public static healthControllerGetCircuitBreakersHealth(): CancelablePromise<HealthControllerGetCircuitBreakersHealthResponse> {
3071
4152
  return __request(OpenAPI, {
3072
4153
  method: 'GET',
3073
4154
  url: '/api/v1/health/circuit-breakers',
3074
- path: {
3075
- region: data.region
3076
- },
3077
4155
  errors: {
3078
4156
  401: 'Unauthorized',
3079
4157
  500: 'Internal error'
@@ -3085,7 +4163,6 @@ export class HealthService {
3085
4163
  * Reset a circuit breaker to CLOSED state
3086
4164
  * @param data The data for the request.
3087
4165
  * @param data.name Circuit breaker name to reset
3088
- * @param data.region Region code (cn, us, de)
3089
4166
  * @returns unknown Circuit breaker reset successfully
3090
4167
  * @throws ApiError
3091
4168
  */
@@ -3096,8 +4173,7 @@ export class HealthService {
3096
4173
  method: 'POST',
3097
4174
  url: '/api/v1/health/circuit-breakers/{name}/reset',
3098
4175
  path: {
3099
- name: data.name,
3100
- region: data.region
4176
+ name: data.name
3101
4177
  },
3102
4178
  errors: {
3103
4179
  401: 'Unauthorized',
@@ -3108,222 +4184,79 @@ export class HealthService {
3108
4184
 
3109
4185
  /**
3110
4186
  * Get health check metrics and statistics
3111
- * @param data The data for the request.
3112
- * @param data.region Region code (cn, us, de)
3113
4187
  * @returns unknown Health metrics
3114
4188
  * @throws ApiError
3115
4189
  */
3116
- public static healthControllerGetMetrics(
3117
- data: HealthControllerGetMetricsData
3118
- ): CancelablePromise<HealthControllerGetMetricsResponse> {
4190
+ public static healthControllerGetMetrics(): CancelablePromise<HealthControllerGetMetricsResponse> {
3119
4191
  return __request(OpenAPI, {
3120
4192
  method: 'GET',
3121
4193
  url: '/api/v1/health/metrics',
3122
- path: {
3123
- region: data.region
3124
- },
3125
4194
  errors: {
3126
4195
  401: 'Unauthorized'
3127
4196
  }
3128
4197
  });
3129
4198
  }
3130
-
3131
- /**
3132
- * Check health of a specific data enhancer
3133
- * @param data The data for the request.
3134
- * @param data.name Data enhancer name
3135
- * @param data.region Region code (cn, us, de)
3136
- * @returns unknown Data enhancer is healthy
3137
- * @throws ApiError
3138
- */
3139
- public static healthControllerGetHealthOfDataEnhancer(
3140
- data: HealthControllerGetHealthOfDataEnhancerData
3141
- ): CancelablePromise<HealthControllerGetHealthOfDataEnhancerResponse> {
3142
- return __request(OpenAPI, {
3143
- method: 'GET',
3144
- url: '/api/v1/health/data-enhancer/{name}',
3145
- path: {
3146
- name: data.name,
3147
- region: data.region
3148
- },
3149
- errors: {
3150
- 401: 'Unauthorized',
3151
- 503: 'Data enhancer unavailable'
3152
- }
3153
- });
3154
- }
3155
-
3156
- /**
3157
- * Check health of all data providers
3158
- * @param data The data for the request.
3159
- * @param data.region Region code (cn, us, de)
3160
- * @returns unknown Data providers health status
3161
- * @throws ApiError
3162
- */
3163
- public static healthControllerCheckDataProviders(
3164
- data: HealthControllerCheckDataProvidersData
3165
- ): CancelablePromise<HealthControllerCheckDataProvidersResponse> {
3166
- return __request(OpenAPI, {
3167
- method: 'GET',
3168
- url: '/api/v1/health/data-providers',
3169
- path: {
3170
- region: data.region
3171
- },
3172
- errors: {
3173
- 401: 'Unauthorized',
3174
- 503: 'Data providers check failed'
3175
- }
3176
- });
3177
- }
3178
-
3179
- /**
3180
- * Check health of a specific data provider
3181
- * @param data The data for the request.
3182
- * @param data.dataSource Data source identifier
3183
- * @param data.region Region code (cn, us, de)
3184
- * @returns unknown Data provider is healthy
3185
- * @throws ApiError
3186
- */
3187
- public static healthControllerGetHealthOfDataProvider(
3188
- data: HealthControllerGetHealthOfDataProviderData
3189
- ): CancelablePromise<HealthControllerGetHealthOfDataProviderResponse> {
3190
- return __request(OpenAPI, {
3191
- method: 'GET',
3192
- url: '/api/v1/health/data-provider/{dataSource}',
3193
- path: {
3194
- dataSource: data.dataSource,
3195
- region: data.region
3196
- },
3197
- errors: {
3198
- 400: 'Invalid data source',
3199
- 401: 'Unauthorized',
3200
- 503: 'Data provider unavailable'
3201
- }
3202
- });
3203
- }
3204
4199
  }
3205
4200
 
3206
4201
  export class InfoService {
3207
4202
  /**
3208
4203
  * Get system information
3209
- * @param data The data for the request.
3210
- * @param data.region Region code (cn, us, de)
3211
4204
  * @returns unknown System information retrieved successfully
3212
4205
  * @throws ApiError
3213
4206
  */
3214
- public static infoControllerGetInfo(
3215
- data: InfoControllerGetInfoData
3216
- ): CancelablePromise<InfoControllerGetInfoResponse> {
4207
+ public static infoControllerGetInfo(): CancelablePromise<InfoControllerGetInfoResponse> {
3217
4208
  return __request(OpenAPI, {
3218
4209
  method: 'GET',
3219
- url: '/api/v1/system/info',
3220
- path: {
3221
- region: data.region
3222
- }
4210
+ url: '/api/v1/system/info'
3223
4211
  });
3224
4212
  }
3225
4213
  }
3226
4214
 
3227
- export class LogosService {
3228
- /**
3229
- * Get asset logo by data source and symbol
3230
- * @param data The data for the request.
3231
- * @param data.dataSource Data source identifier (e.g., YAHOO, COINGECKO)
3232
- * @param data.symbol Asset symbol (e.g., AAPL, BTC)
3233
- * @param data.region Region code (cn, us, de)
3234
- * @returns unknown Logo image stream (favicon)
3235
- * @throws ApiError
3236
- */
3237
- public static logoControllerGetLogoByDataSourceAndSymbol(
3238
- data: LogoControllerGetLogoByDataSourceAndSymbolData
3239
- ): CancelablePromise<LogoControllerGetLogoByDataSourceAndSymbolResponse> {
3240
- return __request(OpenAPI, {
3241
- method: 'GET',
3242
- url: '/api/v1/market/logos/{dataSource}/{symbol}',
3243
- path: {
3244
- dataSource: data.dataSource,
3245
- symbol: data.symbol,
3246
- region: data.region
3247
- },
3248
- errors: {
3249
- 401: 'Unauthorized',
3250
- 404: 'Logo not found for the specified asset',
3251
- 503: 'Service unavailable'
3252
- }
3253
- });
3254
- }
3255
-
4215
+ export class MarketDataService {
3256
4216
  /**
3257
- * Get website favicon by URL
4217
+ * Search market symbols by name or code
4218
+ * Ranked search over the openbb catalog. Empty `q` returns [].
3258
4219
  * @param data The data for the request.
3259
- * @param data.url Website URL to fetch favicon from
3260
- * @param data.region Region code (cn, us, de)
3261
- * @returns unknown Logo image stream (favicon)
4220
+ * @param data.q Search term — matched against symbol and instrument name. Empty string returns [].
4221
+ * @param data.limit Maximum number of results (clamped 1..50)
4222
+ * @param data.exchange Filter by exchange code (e.g. US, HK, SS, SZ)
4223
+ * @param data.assetType Filter by OpenBB asset_type (e.g. stock, etf)
4224
+ * @returns SymbolSearchResultDto Ranked search results
3262
4225
  * @throws ApiError
3263
4226
  */
3264
- public static logoControllerGetLogoByUrl(
3265
- data: LogoControllerGetLogoByUrlData
3266
- ): CancelablePromise<LogoControllerGetLogoByUrlResponse> {
4227
+ public static symbolControllerSearch(
4228
+ data: SymbolControllerSearchData
4229
+ ): CancelablePromise<SymbolControllerSearchResponse> {
3267
4230
  return __request(OpenAPI, {
3268
4231
  method: 'GET',
3269
- url: '/api/v1/market/logos',
3270
- path: {
3271
- region: data.region
3272
- },
4232
+ url: '/api/v1/market/symbols/search',
3273
4233
  query: {
3274
- url: data.url
3275
- },
3276
- errors: {
3277
- 401: 'Unauthorized',
3278
- 503: 'Service unavailable'
4234
+ q: data.q,
4235
+ limit: data.limit,
4236
+ exchange: data.exchange,
4237
+ assetType: data.assetType
3279
4238
  }
3280
4239
  });
3281
4240
  }
3282
- }
3283
4241
 
3284
- export class MarketDataService {
3285
4242
  /**
3286
- * Get market data by symbol
3287
- * Retrieves market data and asset profile for a given symbol and data source
4243
+ * Get a market symbol quote
3288
4244
  * @param data The data for the request.
3289
- * @param data.dataSource Data source provider
3290
- * @param data.symbol Symbol code
3291
- * @param data.region Region code (cn, us, de)
3292
- * @returns unknown Market data retrieved successfully
4245
+ * @param data.symbol
4246
+ * @returns SymbolQuoteDto Symbol quote
3293
4247
  * @throws ApiError
3294
4248
  */
3295
- public static marketDataControllerGetMarketDataBySymbol(
3296
- data: MarketDataControllerGetMarketDataBySymbolData
3297
- ): CancelablePromise<MarketDataControllerGetMarketDataBySymbolResponse> {
4249
+ public static symbolControllerGetQuote(
4250
+ data: SymbolControllerGetQuoteData
4251
+ ): CancelablePromise<SymbolControllerGetQuoteResponse> {
3298
4252
  return __request(OpenAPI, {
3299
4253
  method: 'GET',
3300
- url: '/api/v1/market-data/{dataSource}/{symbol}',
4254
+ url: '/api/v1/market/symbols/{symbol}/quote',
3301
4255
  path: {
3302
- dataSource: data.dataSource,
3303
- symbol: data.symbol,
3304
- region: data.region
4256
+ symbol: data.symbol
3305
4257
  },
3306
4258
  errors: {
3307
- 403: 'Insufficient permissions to read market data',
3308
- 404: 'Market data not found'
3309
- }
3310
- });
3311
- }
3312
-
3313
- /**
3314
- * @param data The data for the request.
3315
- * @param data.region Region code (cn, us, de)
3316
- * @returns unknown
3317
- * @throws ApiError
3318
- */
3319
- public static marketDataController(
3320
- data: MarketDataControllerData
3321
- ): CancelablePromise<MarketDataControllerResponse> {
3322
- return __request(OpenAPI, {
3323
- method: 'POST',
3324
- url: '/api/v1/market-data/{dataSource}/{symbol}',
3325
- path: {
3326
- region: data.region
4259
+ 404: 'Symbol not found in the openbb catalog'
3327
4260
  }
3328
4261
  });
3329
4262
  }