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

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