@firela/api-types 0.0.0-canary.a3c2cb48 → 0.0.0-canary.a43ffd21

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