@firela/api-types 0.0.0-canary.ed674c1 → 0.0.0-canary.efbd2b9a

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