@firela/api-types 0.0.0-canary.14a6ef5a → 0.0.0-canary.166c6f3
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.
- package/dist/index.d.mts +5836 -3094
- package/dist/index.d.ts +5836 -3094
- package/dist/index.js +89 -7
- package/dist/index.mjs +89 -7
- package/package.json +1 -1
- package/src/generated/schemas.gen.ts +6711 -3572
- package/src/generated/services.gen.ts +2000 -891
- package/src/generated/types.gen.ts +27798 -3651
|
@@ -17,6 +17,8 @@ import type {
|
|
|
17
17
|
AccountControllerCloseResponse,
|
|
18
18
|
AccountControllerReopenData,
|
|
19
19
|
AccountControllerReopenResponse,
|
|
20
|
+
AccountControllerAddOpeningBalanceData,
|
|
21
|
+
AccountControllerAddOpeningBalanceResponse,
|
|
20
22
|
AccountStandardsControllerGetTemplatesData,
|
|
21
23
|
AccountStandardsControllerGetTemplatesResponse,
|
|
22
24
|
AccountStandardsControllerGetTemplateMetadataData,
|
|
@@ -29,6 +31,10 @@ import type {
|
|
|
29
31
|
TransactionControllerListResponse,
|
|
30
32
|
TransactionControllerCreateBatchData,
|
|
31
33
|
TransactionControllerCreateBatchResponse,
|
|
34
|
+
TransactionControllerBatchVoidData,
|
|
35
|
+
TransactionControllerBatchVoidResponse,
|
|
36
|
+
TransactionControllerCorrectData,
|
|
37
|
+
TransactionControllerCorrectResponse,
|
|
32
38
|
TransactionControllerSuggestTagsData,
|
|
33
39
|
TransactionControllerSuggestTagsResponse,
|
|
34
40
|
TransactionControllerGetDetailData,
|
|
@@ -53,6 +59,48 @@ import type {
|
|
|
53
59
|
ReviewControllerUndoResponse,
|
|
54
60
|
ReviewControllerBatchResolveData,
|
|
55
61
|
ReviewControllerBatchResolveResponse,
|
|
62
|
+
TransactionRuleControllerCreateData,
|
|
63
|
+
TransactionRuleControllerCreateResponse,
|
|
64
|
+
TransactionRuleControllerListData,
|
|
65
|
+
TransactionRuleControllerListResponse,
|
|
66
|
+
TransactionRuleControllerValidateData,
|
|
67
|
+
TransactionRuleControllerValidateResponse,
|
|
68
|
+
TransactionRuleControllerBulkCreateData,
|
|
69
|
+
TransactionRuleControllerBulkCreateResponse,
|
|
70
|
+
TransactionRuleControllerExportData,
|
|
71
|
+
TransactionRuleControllerExportResponse,
|
|
72
|
+
TransactionRuleControllerGetStatisticsData,
|
|
73
|
+
TransactionRuleControllerGetStatisticsResponse,
|
|
74
|
+
TransactionRuleControllerGetDetailData,
|
|
75
|
+
TransactionRuleControllerGetDetailResponse,
|
|
76
|
+
TransactionRuleControllerUpdateData,
|
|
77
|
+
TransactionRuleControllerUpdateResponse,
|
|
78
|
+
TransactionRuleControllerDeleteData,
|
|
79
|
+
TransactionRuleControllerDeleteResponse,
|
|
80
|
+
TransactionRuleControllerTestData,
|
|
81
|
+
TransactionRuleControllerTestResponse,
|
|
82
|
+
UserControllerDeleteOwnUserData,
|
|
83
|
+
UserControllerDeleteOwnUserResponse,
|
|
84
|
+
UserControllerGetUserData,
|
|
85
|
+
UserControllerGetUserResponse,
|
|
86
|
+
UserControllerSignupUserData,
|
|
87
|
+
UserControllerSignupUserResponse,
|
|
88
|
+
UserControllerDeleteUserData,
|
|
89
|
+
UserControllerDeleteUserResponse,
|
|
90
|
+
UserControllerGetUserInfoData,
|
|
91
|
+
UserControllerGetUserInfoResponse,
|
|
92
|
+
UserControllerUpdateUserSettingData,
|
|
93
|
+
UserControllerUpdateUserSettingResponse,
|
|
94
|
+
UserControllerGetAllUserSettingsByPageData,
|
|
95
|
+
UserControllerGetAllUserSettingsByPageResponse,
|
|
96
|
+
UserControllerGetAssetLiabilitySummaryResponse,
|
|
97
|
+
PropertyControllerGetAllResponse,
|
|
98
|
+
PropertyControllerGetByKeyData,
|
|
99
|
+
PropertyControllerGetByKeyResponse,
|
|
100
|
+
PropertyControllerUpdateData,
|
|
101
|
+
PropertyControllerUpdateResponse,
|
|
102
|
+
PropertyControllerDeleteData,
|
|
103
|
+
PropertyControllerDeleteResponse,
|
|
56
104
|
PayeeControllerCreateData,
|
|
57
105
|
PayeeControllerCreateResponse,
|
|
58
106
|
PayeeControllerFindAllData,
|
|
@@ -81,6 +129,7 @@ import type {
|
|
|
81
129
|
PayeeProfileAdminControllerVerifyResponse,
|
|
82
130
|
PayeeProfileAdminControllerUnverifyData,
|
|
83
131
|
PayeeProfileAdminControllerUnverifyResponse,
|
|
132
|
+
PayeeProfileControllerListActiveResponse,
|
|
84
133
|
CommodityControllerCreateData,
|
|
85
134
|
CommodityControllerCreateResponse,
|
|
86
135
|
CommodityControllerFindAllData,
|
|
@@ -95,6 +144,26 @@ import type {
|
|
|
95
144
|
CommodityControllerGetOrCreateResponse,
|
|
96
145
|
CommodityControllerBulkCreateData,
|
|
97
146
|
CommodityControllerBulkCreateResponse,
|
|
147
|
+
ReportingControllerGetPortfolioTrendsData,
|
|
148
|
+
ReportingControllerGetPortfolioTrendsResponse,
|
|
149
|
+
ReportingControllerGetCashFlowTrendsData,
|
|
150
|
+
ReportingControllerGetCashFlowTrendsResponse,
|
|
151
|
+
ReportingControllerGenerateSnapshotData,
|
|
152
|
+
ReportingControllerGenerateSnapshotResponse,
|
|
153
|
+
ReportingControllerBackfillSnapshotsData,
|
|
154
|
+
ReportingControllerBackfillSnapshotsResponse,
|
|
155
|
+
PriceControllerCreateData,
|
|
156
|
+
PriceControllerCreateResponse,
|
|
157
|
+
PriceControllerFindAllData,
|
|
158
|
+
PriceControllerFindAllResponse,
|
|
159
|
+
PriceControllerFindOneData,
|
|
160
|
+
PriceControllerFindOneResponse,
|
|
161
|
+
PriceControllerUpdateData,
|
|
162
|
+
PriceControllerUpdateResponse,
|
|
163
|
+
PriceControllerDeleteData,
|
|
164
|
+
PriceControllerDeleteResponse,
|
|
165
|
+
PriceControllerBulkCreateData,
|
|
166
|
+
PriceControllerBulkCreateResponse,
|
|
98
167
|
RecurringRuleControllerCreateData,
|
|
99
168
|
RecurringRuleControllerCreateResponse,
|
|
100
169
|
RecurringRuleControllerFindAllData,
|
|
@@ -127,48 +196,31 @@ import type {
|
|
|
127
196
|
ExpectedTransactionControllerEnterNowResponse,
|
|
128
197
|
ForecastControllerGetForecastData,
|
|
129
198
|
ForecastControllerGetForecastResponse,
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
UserControllerSignupUserResponse,
|
|
156
|
-
UserControllerDeleteUserData,
|
|
157
|
-
UserControllerDeleteUserResponse,
|
|
158
|
-
UserControllerGetUserInfoData,
|
|
159
|
-
UserControllerGetUserInfoResponse,
|
|
160
|
-
UserControllerUpdateUserSettingData,
|
|
161
|
-
UserControllerUpdateUserSettingResponse,
|
|
162
|
-
UserControllerGetAllUserSettingsByPageData,
|
|
163
|
-
UserControllerGetAllUserSettingsByPageResponse,
|
|
164
|
-
UserControllerGetAssetLiabilitySummaryResponse,
|
|
165
|
-
PropertyControllerGetAllResponse,
|
|
166
|
-
PropertyControllerGetByKeyData,
|
|
167
|
-
PropertyControllerGetByKeyResponse,
|
|
168
|
-
PropertyControllerUpdateData,
|
|
169
|
-
PropertyControllerUpdateResponse,
|
|
170
|
-
PropertyControllerDeleteData,
|
|
171
|
-
PropertyControllerDeleteResponse,
|
|
199
|
+
CategoryCatalogControllerListData,
|
|
200
|
+
CategoryCatalogControllerListResponse,
|
|
201
|
+
EventControllerCreateData,
|
|
202
|
+
EventControllerCreateResponse,
|
|
203
|
+
EventControllerFindAllData,
|
|
204
|
+
EventControllerFindAllResponse,
|
|
205
|
+
EventControllerFindOneData,
|
|
206
|
+
EventControllerFindOneResponse,
|
|
207
|
+
EventControllerUpdateData,
|
|
208
|
+
EventControllerUpdateResponse,
|
|
209
|
+
EventControllerDeleteData,
|
|
210
|
+
EventControllerDeleteResponse,
|
|
211
|
+
EventControllerGetSliceData,
|
|
212
|
+
EventControllerGetSliceResponse,
|
|
213
|
+
OnboardingControllerBootstrapData,
|
|
214
|
+
OnboardingControllerBootstrapResponse,
|
|
215
|
+
ReconciliationControllerComputeData,
|
|
216
|
+
ReconciliationControllerComputeResponse,
|
|
217
|
+
ReconciliationControllerAssertData,
|
|
218
|
+
ReconciliationControllerAssertResponse,
|
|
219
|
+
ReconciliationControllerPadData,
|
|
220
|
+
ReconciliationControllerPadResponse,
|
|
221
|
+
ReconciliationControllerHistoryData,
|
|
222
|
+
ReconciliationControllerHistoryResponse,
|
|
223
|
+
ExportControllerExportBeancountData,
|
|
172
224
|
ExportControllerExportBeancountResponse,
|
|
173
225
|
FileImportControllerImportFileData,
|
|
174
226
|
FileImportControllerImportFileResponse,
|
|
@@ -182,45 +234,64 @@ import type {
|
|
|
182
234
|
ImporterConfigControllerUpdateConfigResponse,
|
|
183
235
|
ImporterConfigControllerResetConfigData,
|
|
184
236
|
ImporterConfigControllerResetConfigResponse,
|
|
185
|
-
PlatformControllerFindAllResponse,
|
|
186
|
-
PlatformControllerCreateData,
|
|
187
|
-
PlatformControllerCreateResponse,
|
|
188
|
-
PlatformControllerGetPlatformListResponse,
|
|
189
|
-
PlatformControllerMatchPlatformsData,
|
|
190
|
-
PlatformControllerMatchPlatformsResponse,
|
|
191
|
-
PlatformControllerUpdateData,
|
|
192
|
-
PlatformControllerUpdateResponse,
|
|
193
|
-
PlatformControllerDeleteData,
|
|
194
|
-
PlatformControllerDeleteResponse,
|
|
195
237
|
ProviderSyncControllerSyncData,
|
|
196
238
|
ProviderSyncControllerSyncResponse,
|
|
197
239
|
ProviderSyncControllerGetSupportedProvidersData,
|
|
198
240
|
ProviderSyncControllerGetSupportedProvidersResponse,
|
|
199
241
|
ProviderSyncControllerIsProviderSupportedData,
|
|
200
242
|
ProviderSyncControllerIsProviderSupportedResponse,
|
|
243
|
+
ExternalAccountLinkControllerCreateData,
|
|
244
|
+
ExternalAccountLinkControllerCreateResponse,
|
|
245
|
+
ExternalAccountLinkControllerFindAllData,
|
|
246
|
+
ExternalAccountLinkControllerFindAllResponse,
|
|
247
|
+
ExternalAccountLinkControllerFindOneData,
|
|
248
|
+
ExternalAccountLinkControllerFindOneResponse,
|
|
249
|
+
ExternalAccountLinkControllerRemoveData,
|
|
250
|
+
ExternalAccountLinkControllerRemoveResponse,
|
|
201
251
|
TelemetryControllerReportTelemetryData,
|
|
202
252
|
TelemetryControllerReportTelemetryResponse,
|
|
253
|
+
TelemetryControllerReportCoverageMissData,
|
|
254
|
+
TelemetryControllerReportCoverageMissResponse,
|
|
255
|
+
TelemetryControllerGetCoverageMetricsData,
|
|
256
|
+
TelemetryControllerGetCoverageMetricsResponse,
|
|
203
257
|
NlpControllerProcessNaturalLanguageData,
|
|
204
258
|
NlpControllerProcessNaturalLanguageResponse,
|
|
205
259
|
NlpControllerClearSessionData,
|
|
206
260
|
NlpControllerClearSessionResponse,
|
|
207
261
|
NlpControllerGetSessionData,
|
|
208
262
|
NlpControllerGetSessionResponse,
|
|
263
|
+
PlatformControllerFindAllResponse,
|
|
264
|
+
PlatformControllerCreateData,
|
|
265
|
+
PlatformControllerCreateResponse,
|
|
266
|
+
PlatformControllerGetPlatformListData,
|
|
267
|
+
PlatformControllerGetPlatformListResponse,
|
|
268
|
+
PlatformControllerMatchPlatformsData,
|
|
269
|
+
PlatformControllerMatchPlatformsResponse,
|
|
270
|
+
PlatformControllerGetPlatformStandardsData,
|
|
271
|
+
PlatformControllerGetPlatformStandardsResponse,
|
|
272
|
+
PlatformControllerUpdateData,
|
|
273
|
+
PlatformControllerUpdateResponse,
|
|
274
|
+
PlatformControllerDeleteData,
|
|
275
|
+
PlatformControllerDeleteResponse,
|
|
209
276
|
DashboardControllerGetNetWorthData,
|
|
210
277
|
DashboardControllerGetNetWorthResponse,
|
|
211
278
|
DashboardControllerGetAccountsData,
|
|
212
279
|
DashboardControllerGetAccountsResponse,
|
|
213
280
|
DashboardControllerGetCashFlowData,
|
|
214
281
|
DashboardControllerGetCashFlowResponse,
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
282
|
+
DashboardControllerGetExpensesData,
|
|
283
|
+
DashboardControllerGetExpensesResponse,
|
|
284
|
+
DashboardControllerGetAdvisorContextData,
|
|
285
|
+
DashboardControllerGetAdvisorContextResponse,
|
|
286
|
+
HoldingPnlControllerGetHoldingPnlData,
|
|
287
|
+
HoldingPnlControllerGetHoldingPnlResponse,
|
|
221
288
|
ApiKeysControllerCreateApiKeyResponse,
|
|
222
289
|
AuthControllerAccessTokenLoginData,
|
|
223
290
|
AuthControllerAccessTokenLoginResponse,
|
|
291
|
+
AuthControllerAdvisorTokenLoginData,
|
|
292
|
+
AuthControllerAdvisorTokenLoginResponse,
|
|
293
|
+
ParserContributionControllerCreateData,
|
|
294
|
+
ParserContributionControllerCreateResponse,
|
|
224
295
|
CacheControllerFlushCacheResponse,
|
|
225
296
|
ExchangeRateControllerGetExchangeRateData,
|
|
226
297
|
ExchangeRateControllerGetExchangeRateResponse,
|
|
@@ -232,7 +303,11 @@ import type {
|
|
|
232
303
|
HealthControllerResetCircuitBreakerData,
|
|
233
304
|
HealthControllerResetCircuitBreakerResponse,
|
|
234
305
|
HealthControllerGetMetricsResponse,
|
|
235
|
-
InfoControllerGetInfoResponse
|
|
306
|
+
InfoControllerGetInfoResponse,
|
|
307
|
+
SymbolControllerSearchData,
|
|
308
|
+
SymbolControllerSearchResponse,
|
|
309
|
+
SymbolControllerGetQuoteData,
|
|
310
|
+
SymbolControllerGetQuoteResponse
|
|
236
311
|
} from './types.gen';
|
|
237
312
|
|
|
238
313
|
export class BeanAccountsService {
|
|
@@ -270,7 +345,7 @@ export class BeanAccountsService {
|
|
|
270
345
|
* @param data.type Filter by account type
|
|
271
346
|
* @param data.status Filter by status
|
|
272
347
|
* @param data.isCustom Filter by custom (user-created) accounts only
|
|
273
|
-
* @param data.search Search term
|
|
348
|
+
* @param data.search Search term matched against account path and user-set display name (case-insensitive)
|
|
274
349
|
* @param data.limit Maximum number of results
|
|
275
350
|
* @param data.offset Number of results to skip
|
|
276
351
|
* @returns AccountListResponseDto Accounts retrieved successfully
|
|
@@ -351,7 +426,7 @@ export class BeanAccountsService {
|
|
|
351
426
|
|
|
352
427
|
/**
|
|
353
428
|
* Delete account
|
|
354
|
-
* Deletes an account (only if no transactions)
|
|
429
|
+
* Deletes an account (only if no active transactions; voided/superseded residual postings are cleaned up)
|
|
355
430
|
* @param data The data for the request.
|
|
356
431
|
* @param data.id Account UUID
|
|
357
432
|
* @param data.region Region code for tenant context
|
|
@@ -370,7 +445,7 @@ export class BeanAccountsService {
|
|
|
370
445
|
},
|
|
371
446
|
errors: {
|
|
372
447
|
404: 'Account not found',
|
|
373
|
-
409: 'Account has transactions and cannot be deleted'
|
|
448
|
+
409: 'Account has active transactions and cannot be deleted'
|
|
374
449
|
}
|
|
375
450
|
});
|
|
376
451
|
}
|
|
@@ -432,16 +507,45 @@ export class BeanAccountsService {
|
|
|
432
507
|
}
|
|
433
508
|
});
|
|
434
509
|
}
|
|
510
|
+
|
|
511
|
+
/**
|
|
512
|
+
* Post an opening-balance transaction
|
|
513
|
+
* Posts a double-entry opening-balance transaction against Equity:Opening-Balances for an existing Assets/Liabilities account. At most one active opening balance per account.
|
|
514
|
+
* @param data The data for the request.
|
|
515
|
+
* @param data.id Account UUID
|
|
516
|
+
* @param data.region Region code for tenant context
|
|
517
|
+
* @param data.requestBody
|
|
518
|
+
* @returns OpeningBalanceResultDto Opening-balance transaction created
|
|
519
|
+
* @throws ApiError
|
|
520
|
+
*/
|
|
521
|
+
public static accountControllerAddOpeningBalance(
|
|
522
|
+
data: AccountControllerAddOpeningBalanceData
|
|
523
|
+
): CancelablePromise<AccountControllerAddOpeningBalanceResponse> {
|
|
524
|
+
return __request(OpenAPI, {
|
|
525
|
+
method: 'POST',
|
|
526
|
+
url: '/api/v1/{region}/bean/accounts/{id}/opening-balance',
|
|
527
|
+
path: {
|
|
528
|
+
id: data.id,
|
|
529
|
+
region: data.region
|
|
530
|
+
},
|
|
531
|
+
body: data.requestBody,
|
|
532
|
+
mediaType: 'application/json',
|
|
533
|
+
errors: {
|
|
534
|
+
404: 'Account not found',
|
|
535
|
+
409: 'An opening balance already exists for this account'
|
|
536
|
+
}
|
|
537
|
+
});
|
|
538
|
+
}
|
|
435
539
|
}
|
|
436
540
|
|
|
437
541
|
export class BeanAccountStandardsService {
|
|
438
542
|
/**
|
|
439
543
|
* Get account templates
|
|
440
|
-
* Returns predefined account templates for a region. Supports filtering by account type and search term.
|
|
544
|
+
* Returns predefined account templates for a region. Supports filtering by account type and search term. Not-yet-open region codes return the universal-only catalog (#759).
|
|
441
545
|
* @param data The data for the request.
|
|
442
|
-
* @param data.region Region code (
|
|
546
|
+
* @param data.region Region code (any ISO alpha-2; not-yet-open codes return the universal-only catalog)
|
|
443
547
|
* @param data.type Filter by account type
|
|
444
|
-
* @param data.search Search term for path or
|
|
548
|
+
* @param data.search Search term for path, description, aliases, or localized display name
|
|
445
549
|
* @returns AccountStandardListResponseDto Account templates retrieved successfully
|
|
446
550
|
* @throws ApiError
|
|
447
551
|
*/
|
|
@@ -463,9 +567,9 @@ export class BeanAccountStandardsService {
|
|
|
463
567
|
|
|
464
568
|
/**
|
|
465
569
|
* Get template metadata for an account path
|
|
466
|
-
* Returns
|
|
570
|
+
* Returns root type for a template path.
|
|
467
571
|
* @param data The data for the request.
|
|
468
|
-
* @param data.region Region code for tenant context
|
|
572
|
+
* @param data.region Region code for tenant context. Not-yet-open codes degrade to the universal-only catalog (#759)
|
|
469
573
|
* @param data.path Account path to check
|
|
470
574
|
* @returns TemplateMetadataResponseDto Template metadata retrieved successfully
|
|
471
575
|
* @throws ApiError
|
|
@@ -487,9 +591,9 @@ export class BeanAccountStandardsService {
|
|
|
487
591
|
|
|
488
592
|
/**
|
|
489
593
|
* Get available regions with hierarchy
|
|
490
|
-
* Returns
|
|
594
|
+
* Returns the full region catalog (every ISO 3166-1 entry) with an 'open' flag and inheritance metadata (#759)
|
|
491
595
|
* @param data The data for the request.
|
|
492
|
-
* @param data.region Region code for tenant context
|
|
596
|
+
* @param data.region Region code for tenant context. Not-yet-open codes degrade to the universal-only catalog (#759)
|
|
493
597
|
* @returns RegionsMetadataResponseDto Regions metadata retrieved successfully
|
|
494
598
|
* @throws ApiError
|
|
495
599
|
*/
|
|
@@ -546,9 +650,11 @@ export class BeanTransactionsService {
|
|
|
546
650
|
* @param data.offset Number of items to skip (default: 0)
|
|
547
651
|
* @param data.dateFrom Filter by start date (inclusive), format: YYYY-MM-DD
|
|
548
652
|
* @param data.dateTo Filter by end date (inclusive), format: YYYY-MM-DD
|
|
549
|
-
* @param data.status Filter by transaction status
|
|
653
|
+
* @param data.status Filter by transaction status: single value, comma-separated multi-value (e.g. VOIDED,SUPERSEDED), or ALL to include audit rows. Defaults to ACTIVE-only (ADR-0128; previously unfiltered — breaking change).
|
|
550
654
|
* @param data.search Search in narration and payee fields (max 200 chars)
|
|
551
655
|
* @param data.accountId Filter by account ID (transactions with postings to this account)
|
|
656
|
+
* @param data.category Filter by ADR-0075 functional category (Group segment); matches any posting to an account whose derived Group segment equals this value. Must be accompanied by flow (ADR-0126).
|
|
657
|
+
* @param data.flow Required when category is present (400 otherwise) and vice versa (ADR-0126). Restricts the category account set to the flow root (income → Income:, expense → Expenses:) and drives the per-leg sign normalization of row viewpointAmount and the summary. OpenAPI cannot express conditional requiredness — the pairing is enforced at runtime.
|
|
552
658
|
* @returns TransactionListResponseDto Transaction list
|
|
553
659
|
* @throws ApiError
|
|
554
660
|
*/
|
|
@@ -568,7 +674,9 @@ export class BeanTransactionsService {
|
|
|
568
674
|
dateTo: data.dateTo,
|
|
569
675
|
status: data.status,
|
|
570
676
|
search: data.search,
|
|
571
|
-
accountId: data.accountId
|
|
677
|
+
accountId: data.accountId,
|
|
678
|
+
category: data.category,
|
|
679
|
+
flow: data.flow
|
|
572
680
|
},
|
|
573
681
|
errors: {
|
|
574
682
|
400: 'Validation failed',
|
|
@@ -605,6 +713,64 @@ export class BeanTransactionsService {
|
|
|
605
713
|
});
|
|
606
714
|
}
|
|
607
715
|
|
|
716
|
+
/**
|
|
717
|
+
* Batch void transactions
|
|
718
|
+
* Soft-deletes (VOIDED) a batch of the caller's ACTIVE transactions in one DB transaction. Voiding releases each row's importId dedup slot, so re-importing the same file after an undo batch-void imports every row again instead of skipping them as duplicates.
|
|
719
|
+
* @param data The data for the request.
|
|
720
|
+
* @param data.region Region code for tenant context
|
|
721
|
+
* @param data.requestBody Batch void request (1-500 unique transaction IDs)
|
|
722
|
+
* @returns BatchVoidResultDto Batch void result: count of rows voided plus ids not found / no longer ACTIVE
|
|
723
|
+
* @throws ApiError
|
|
724
|
+
*/
|
|
725
|
+
public static transactionControllerBatchVoid(
|
|
726
|
+
data: TransactionControllerBatchVoidData
|
|
727
|
+
): CancelablePromise<TransactionControllerBatchVoidResponse> {
|
|
728
|
+
return __request(OpenAPI, {
|
|
729
|
+
method: 'POST',
|
|
730
|
+
url: '/api/v1/{region}/bean/transactions/batch-void',
|
|
731
|
+
path: {
|
|
732
|
+
region: data.region
|
|
733
|
+
},
|
|
734
|
+
body: data.requestBody,
|
|
735
|
+
mediaType: 'application/json',
|
|
736
|
+
errors: {
|
|
737
|
+
400: 'Validation failed (empty, over 500, duplicate or non-string ids)',
|
|
738
|
+
401: 'Authentication required',
|
|
739
|
+
403: 'Batch contains ids owned by another user — whole request rejected, nothing committed'
|
|
740
|
+
}
|
|
741
|
+
});
|
|
742
|
+
}
|
|
743
|
+
|
|
744
|
+
/**
|
|
745
|
+
* Correct (supersede) a transaction
|
|
746
|
+
* Atomically voids the original (SUPERSEDED) and creates a replacement through the full validation pipeline.
|
|
747
|
+
* @param data The data for the request.
|
|
748
|
+
* @param data.id Original transaction ID to correct
|
|
749
|
+
* @param data.region Region code for tenant context
|
|
750
|
+
* @param data.requestBody
|
|
751
|
+
* @returns TransactionDetailDto Corrected transaction created
|
|
752
|
+
* @throws ApiError
|
|
753
|
+
*/
|
|
754
|
+
public static transactionControllerCorrect(
|
|
755
|
+
data: TransactionControllerCorrectData
|
|
756
|
+
): CancelablePromise<TransactionControllerCorrectResponse> {
|
|
757
|
+
return __request(OpenAPI, {
|
|
758
|
+
method: 'POST',
|
|
759
|
+
url: '/api/v1/{region}/bean/transactions/{id}/correct',
|
|
760
|
+
path: {
|
|
761
|
+
id: data.id,
|
|
762
|
+
region: data.region
|
|
763
|
+
},
|
|
764
|
+
body: data.requestBody,
|
|
765
|
+
mediaType: 'application/json',
|
|
766
|
+
errors: {
|
|
767
|
+
404: 'Original transaction not found',
|
|
768
|
+
409: 'Original no longer ACTIVE (concurrent modification)',
|
|
769
|
+
422: 'Pipeline validation failed (does not balance, invalid accounts)'
|
|
770
|
+
}
|
|
771
|
+
});
|
|
772
|
+
}
|
|
773
|
+
|
|
608
774
|
/**
|
|
609
775
|
* Suggest transaction tags
|
|
610
776
|
* Returns distinct tags from the user ACTIVE transactions, sorted by usage, for autocomplete. Optional q performs a case-insensitive prefix match.
|
|
@@ -726,7 +892,7 @@ export class BeanBalancesService {
|
|
|
726
892
|
* Query account balance
|
|
727
893
|
* Calculate account balance at a specific date for a single currency
|
|
728
894
|
* @param data The data for the request.
|
|
729
|
-
* @param data.account Account name (e.g., "Assets:
|
|
895
|
+
* @param data.account Account name (e.g., "Assets:Checking")
|
|
730
896
|
* @param data.region Region code for tenant context
|
|
731
897
|
* @param data.date Date to calculate balance at (ISO 8601 format)
|
|
732
898
|
* @param data.currency Currency to query (e.g., "USD", "CNY")
|
|
@@ -919,71 +1085,604 @@ export class BeanReviewsService {
|
|
|
919
1085
|
}
|
|
920
1086
|
}
|
|
921
1087
|
|
|
922
|
-
export class
|
|
1088
|
+
export class BeanTransactionRulesService {
|
|
923
1089
|
/**
|
|
924
|
-
* Create a new
|
|
925
|
-
* Creates a new
|
|
1090
|
+
* Create a new transaction rule (or upsert if upsertByPayee=true)
|
|
1091
|
+
* Creates a new rule. If upsertByPayee=true, updates existing rule matching payeeKeywords[0] instead of creating duplicate.
|
|
926
1092
|
* @param data The data for the request.
|
|
1093
|
+
* @param data.region Region code for tenant context
|
|
927
1094
|
* @param data.requestBody
|
|
928
|
-
* @returns
|
|
1095
|
+
* @returns TransactionRuleResponseDto Rule updated successfully (upsert mode)
|
|
929
1096
|
* @throws ApiError
|
|
930
1097
|
*/
|
|
931
|
-
public static
|
|
932
|
-
data:
|
|
933
|
-
): CancelablePromise<
|
|
1098
|
+
public static transactionRuleControllerCreate(
|
|
1099
|
+
data: TransactionRuleControllerCreateData
|
|
1100
|
+
): CancelablePromise<TransactionRuleControllerCreateResponse> {
|
|
934
1101
|
return __request(OpenAPI, {
|
|
935
1102
|
method: 'POST',
|
|
936
|
-
url: '/api/v1/bean/
|
|
1103
|
+
url: '/api/v1/{region}/bean/transaction-rules',
|
|
1104
|
+
path: {
|
|
1105
|
+
region: data.region
|
|
1106
|
+
},
|
|
937
1107
|
body: data.requestBody,
|
|
938
1108
|
mediaType: 'application/json',
|
|
939
1109
|
errors: {
|
|
940
|
-
400: '
|
|
941
|
-
|
|
1110
|
+
400: 'Validation failed',
|
|
1111
|
+
401: 'Unauthorized',
|
|
1112
|
+
409: 'Resource conflict - another process is updating this rule'
|
|
942
1113
|
}
|
|
943
1114
|
});
|
|
944
1115
|
}
|
|
945
1116
|
|
|
946
1117
|
/**
|
|
947
|
-
*
|
|
948
|
-
* Returns all payee mappings for the authenticated user with optional filtering
|
|
1118
|
+
* Get all transaction rules for user
|
|
949
1119
|
* @param data The data for the request.
|
|
950
|
-
* @param data.
|
|
951
|
-
* @param data.
|
|
952
|
-
* @param data.
|
|
953
|
-
* @param data.
|
|
954
|
-
* @param data.
|
|
955
|
-
* @
|
|
1120
|
+
* @param data.region Region code for tenant context
|
|
1121
|
+
* @param data.limit Max results per page (default: 20, max: 100)
|
|
1122
|
+
* @param data.offset Pagination offset (default: 0)
|
|
1123
|
+
* @param data.enabled Filter by enabled status
|
|
1124
|
+
* @param data.learningSource Filter by learning source. Omit this parameter or pass empty string to get manually created rules (learningSource is null in database).
|
|
1125
|
+
* @param data.autoApplyEnabled Filter by auto-apply status
|
|
1126
|
+
* @returns TransactionRuleListResponseDto List of rules
|
|
956
1127
|
* @throws ApiError
|
|
957
1128
|
*/
|
|
958
|
-
public static
|
|
959
|
-
data:
|
|
960
|
-
): CancelablePromise<
|
|
1129
|
+
public static transactionRuleControllerList(
|
|
1130
|
+
data: TransactionRuleControllerListData
|
|
1131
|
+
): CancelablePromise<TransactionRuleControllerListResponse> {
|
|
961
1132
|
return __request(OpenAPI, {
|
|
962
1133
|
method: 'GET',
|
|
963
|
-
url: '/api/v1/bean/
|
|
1134
|
+
url: '/api/v1/{region}/bean/transaction-rules',
|
|
1135
|
+
path: {
|
|
1136
|
+
region: data.region
|
|
1137
|
+
},
|
|
964
1138
|
query: {
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
1139
|
+
limit: data.limit,
|
|
1140
|
+
offset: data.offset,
|
|
1141
|
+
enabled: data.enabled,
|
|
1142
|
+
learningSource: data.learningSource,
|
|
1143
|
+
autoApplyEnabled: data.autoApplyEnabled
|
|
1144
|
+
},
|
|
1145
|
+
errors: {
|
|
1146
|
+
401: 'Unauthorized'
|
|
970
1147
|
}
|
|
971
1148
|
});
|
|
972
1149
|
}
|
|
973
1150
|
|
|
974
1151
|
/**
|
|
975
|
-
*
|
|
976
|
-
* Returns active payee names matching the query, sorted by recent usage. Used for transaction input autocomplete.
|
|
1152
|
+
* Validate transaction rule configuration
|
|
977
1153
|
* @param data The data for the request.
|
|
978
|
-
* @param data.
|
|
979
|
-
* @param data.
|
|
980
|
-
* @returns
|
|
1154
|
+
* @param data.region Region code for tenant context
|
|
1155
|
+
* @param data.requestBody
|
|
1156
|
+
* @returns ValidateRuleResponseDto Validation result
|
|
981
1157
|
* @throws ApiError
|
|
982
1158
|
*/
|
|
983
|
-
public static
|
|
984
|
-
data:
|
|
985
|
-
): CancelablePromise<
|
|
986
|
-
return __request(OpenAPI, {
|
|
1159
|
+
public static transactionRuleControllerValidate(
|
|
1160
|
+
data: TransactionRuleControllerValidateData
|
|
1161
|
+
): CancelablePromise<TransactionRuleControllerValidateResponse> {
|
|
1162
|
+
return __request(OpenAPI, {
|
|
1163
|
+
method: 'POST',
|
|
1164
|
+
url: '/api/v1/{region}/bean/transaction-rules/validate',
|
|
1165
|
+
path: {
|
|
1166
|
+
region: data.region
|
|
1167
|
+
},
|
|
1168
|
+
body: data.requestBody,
|
|
1169
|
+
mediaType: 'application/json',
|
|
1170
|
+
errors: {
|
|
1171
|
+
400: 'Validation failed',
|
|
1172
|
+
401: 'Unauthorized'
|
|
1173
|
+
}
|
|
1174
|
+
});
|
|
1175
|
+
}
|
|
1176
|
+
|
|
1177
|
+
/**
|
|
1178
|
+
* Bulk create transaction rules
|
|
1179
|
+
* @param data The data for the request.
|
|
1180
|
+
* @param data.region Region code for tenant context
|
|
1181
|
+
* @param data.requestBody
|
|
1182
|
+
* @returns BulkCreateRulesResponseDto Bulk create completed
|
|
1183
|
+
* @throws ApiError
|
|
1184
|
+
*/
|
|
1185
|
+
public static transactionRuleControllerBulkCreate(
|
|
1186
|
+
data: TransactionRuleControllerBulkCreateData
|
|
1187
|
+
): CancelablePromise<TransactionRuleControllerBulkCreateResponse> {
|
|
1188
|
+
return __request(OpenAPI, {
|
|
1189
|
+
method: 'POST',
|
|
1190
|
+
url: '/api/v1/{region}/bean/transaction-rules/bulk',
|
|
1191
|
+
path: {
|
|
1192
|
+
region: data.region
|
|
1193
|
+
},
|
|
1194
|
+
body: data.requestBody,
|
|
1195
|
+
mediaType: 'application/json',
|
|
1196
|
+
errors: {
|
|
1197
|
+
400: 'Invalid bulk create data',
|
|
1198
|
+
401: 'Unauthorized'
|
|
1199
|
+
}
|
|
1200
|
+
});
|
|
1201
|
+
}
|
|
1202
|
+
|
|
1203
|
+
/**
|
|
1204
|
+
* Export transaction rules
|
|
1205
|
+
* @param data The data for the request.
|
|
1206
|
+
* @param data.format Export format (currently only JSON supported)
|
|
1207
|
+
* @param data.region Region code for tenant context
|
|
1208
|
+
* @returns ExportRulesResponseDto Exported rules
|
|
1209
|
+
* @throws ApiError
|
|
1210
|
+
*/
|
|
1211
|
+
public static transactionRuleControllerExport(
|
|
1212
|
+
data: TransactionRuleControllerExportData
|
|
1213
|
+
): CancelablePromise<TransactionRuleControllerExportResponse> {
|
|
1214
|
+
return __request(OpenAPI, {
|
|
1215
|
+
method: 'GET',
|
|
1216
|
+
url: '/api/v1/{region}/bean/transaction-rules/export/{format}',
|
|
1217
|
+
path: {
|
|
1218
|
+
format: data.format,
|
|
1219
|
+
region: data.region
|
|
1220
|
+
},
|
|
1221
|
+
errors: {
|
|
1222
|
+
400: 'Unsupported format',
|
|
1223
|
+
401: 'Unauthorized'
|
|
1224
|
+
}
|
|
1225
|
+
});
|
|
1226
|
+
}
|
|
1227
|
+
|
|
1228
|
+
/**
|
|
1229
|
+
* Get transaction rule statistics
|
|
1230
|
+
* @param data The data for the request.
|
|
1231
|
+
* @param data.period Statistics time period
|
|
1232
|
+
* @param data.region Region code for tenant context
|
|
1233
|
+
* @returns RuleStatisticsResponseDto Rule statistics
|
|
1234
|
+
* @throws ApiError
|
|
1235
|
+
*/
|
|
1236
|
+
public static transactionRuleControllerGetStatistics(
|
|
1237
|
+
data: TransactionRuleControllerGetStatisticsData
|
|
1238
|
+
): CancelablePromise<TransactionRuleControllerGetStatisticsResponse> {
|
|
1239
|
+
return __request(OpenAPI, {
|
|
1240
|
+
method: 'GET',
|
|
1241
|
+
url: '/api/v1/{region}/bean/transaction-rules/statistics/{period}',
|
|
1242
|
+
path: {
|
|
1243
|
+
period: data.period,
|
|
1244
|
+
region: data.region
|
|
1245
|
+
},
|
|
1246
|
+
errors: {
|
|
1247
|
+
401: 'Unauthorized'
|
|
1248
|
+
}
|
|
1249
|
+
});
|
|
1250
|
+
}
|
|
1251
|
+
|
|
1252
|
+
/**
|
|
1253
|
+
* Get transaction rule detail
|
|
1254
|
+
* @param data The data for the request.
|
|
1255
|
+
* @param data.ruleId Rule ID
|
|
1256
|
+
* @param data.region Region code for tenant context
|
|
1257
|
+
* @returns TransactionRuleResponseDto Rule details
|
|
1258
|
+
* @throws ApiError
|
|
1259
|
+
*/
|
|
1260
|
+
public static transactionRuleControllerGetDetail(
|
|
1261
|
+
data: TransactionRuleControllerGetDetailData
|
|
1262
|
+
): CancelablePromise<TransactionRuleControllerGetDetailResponse> {
|
|
1263
|
+
return __request(OpenAPI, {
|
|
1264
|
+
method: 'GET',
|
|
1265
|
+
url: '/api/v1/{region}/bean/transaction-rules/{ruleId}',
|
|
1266
|
+
path: {
|
|
1267
|
+
ruleId: data.ruleId,
|
|
1268
|
+
region: data.region
|
|
1269
|
+
},
|
|
1270
|
+
errors: {
|
|
1271
|
+
401: 'Unauthorized',
|
|
1272
|
+
403: 'Forbidden - not owner of rule',
|
|
1273
|
+
404: 'Rule not found'
|
|
1274
|
+
}
|
|
1275
|
+
});
|
|
1276
|
+
}
|
|
1277
|
+
|
|
1278
|
+
/**
|
|
1279
|
+
* Update a transaction rule
|
|
1280
|
+
* @param data The data for the request.
|
|
1281
|
+
* @param data.ruleId Rule ID to update
|
|
1282
|
+
* @param data.region Region code for tenant context
|
|
1283
|
+
* @param data.requestBody
|
|
1284
|
+
* @returns TransactionRuleResponseDto Rule updated successfully
|
|
1285
|
+
* @throws ApiError
|
|
1286
|
+
*/
|
|
1287
|
+
public static transactionRuleControllerUpdate(
|
|
1288
|
+
data: TransactionRuleControllerUpdateData
|
|
1289
|
+
): CancelablePromise<TransactionRuleControllerUpdateResponse> {
|
|
1290
|
+
return __request(OpenAPI, {
|
|
1291
|
+
method: 'PUT',
|
|
1292
|
+
url: '/api/v1/{region}/bean/transaction-rules/{ruleId}',
|
|
1293
|
+
path: {
|
|
1294
|
+
ruleId: data.ruleId,
|
|
1295
|
+
region: data.region
|
|
1296
|
+
},
|
|
1297
|
+
body: data.requestBody,
|
|
1298
|
+
mediaType: 'application/json',
|
|
1299
|
+
errors: {
|
|
1300
|
+
400: 'Validation failed',
|
|
1301
|
+
401: 'Unauthorized',
|
|
1302
|
+
403: 'Forbidden - not owner of rule',
|
|
1303
|
+
404: 'Rule not found',
|
|
1304
|
+
409: 'Resource conflict - rule is being modified by another process'
|
|
1305
|
+
}
|
|
1306
|
+
});
|
|
1307
|
+
}
|
|
1308
|
+
|
|
1309
|
+
/**
|
|
1310
|
+
* Delete a transaction rule
|
|
1311
|
+
* @param data The data for the request.
|
|
1312
|
+
* @param data.ruleId Rule ID to delete
|
|
1313
|
+
* @param data.region Region code for tenant context
|
|
1314
|
+
* @returns void Rule deleted successfully
|
|
1315
|
+
* @throws ApiError
|
|
1316
|
+
*/
|
|
1317
|
+
public static transactionRuleControllerDelete(
|
|
1318
|
+
data: TransactionRuleControllerDeleteData
|
|
1319
|
+
): CancelablePromise<TransactionRuleControllerDeleteResponse> {
|
|
1320
|
+
return __request(OpenAPI, {
|
|
1321
|
+
method: 'DELETE',
|
|
1322
|
+
url: '/api/v1/{region}/bean/transaction-rules/{ruleId}',
|
|
1323
|
+
path: {
|
|
1324
|
+
ruleId: data.ruleId,
|
|
1325
|
+
region: data.region
|
|
1326
|
+
},
|
|
1327
|
+
errors: {
|
|
1328
|
+
401: 'Unauthorized',
|
|
1329
|
+
403: 'Forbidden - not owner of rule',
|
|
1330
|
+
404: 'Rule not found',
|
|
1331
|
+
409: 'Resource conflict - rule is being modified by another process'
|
|
1332
|
+
}
|
|
1333
|
+
});
|
|
1334
|
+
}
|
|
1335
|
+
|
|
1336
|
+
/**
|
|
1337
|
+
* Test rule matching
|
|
1338
|
+
* @param data The data for the request.
|
|
1339
|
+
* @param data.ruleId Rule ID to test
|
|
1340
|
+
* @param data.region Region code for tenant context
|
|
1341
|
+
* @param data.requestBody
|
|
1342
|
+
* @returns TestRuleResponseDto Test result
|
|
1343
|
+
* @throws ApiError
|
|
1344
|
+
*/
|
|
1345
|
+
public static transactionRuleControllerTest(
|
|
1346
|
+
data: TransactionRuleControllerTestData
|
|
1347
|
+
): CancelablePromise<TransactionRuleControllerTestResponse> {
|
|
1348
|
+
return __request(OpenAPI, {
|
|
1349
|
+
method: 'POST',
|
|
1350
|
+
url: '/api/v1/{region}/bean/transaction-rules/{ruleId}/test',
|
|
1351
|
+
path: {
|
|
1352
|
+
ruleId: data.ruleId,
|
|
1353
|
+
region: data.region
|
|
1354
|
+
},
|
|
1355
|
+
body: data.requestBody,
|
|
1356
|
+
mediaType: 'application/json',
|
|
1357
|
+
errors: {
|
|
1358
|
+
401: 'Unauthorized',
|
|
1359
|
+
403: 'Forbidden - not owner of rule',
|
|
1360
|
+
404: 'Rule not found'
|
|
1361
|
+
}
|
|
1362
|
+
});
|
|
1363
|
+
}
|
|
1364
|
+
}
|
|
1365
|
+
|
|
1366
|
+
export class UsersService {
|
|
1367
|
+
/**
|
|
1368
|
+
* Delete own user account
|
|
1369
|
+
* @param data The data for the request.
|
|
1370
|
+
* @param data.requestBody
|
|
1371
|
+
* @returns void User deleted successfully
|
|
1372
|
+
* @throws ApiError
|
|
1373
|
+
*/
|
|
1374
|
+
public static userControllerDeleteOwnUser(
|
|
1375
|
+
data: UserControllerDeleteOwnUserData
|
|
1376
|
+
): CancelablePromise<UserControllerDeleteOwnUserResponse> {
|
|
1377
|
+
return __request(OpenAPI, {
|
|
1378
|
+
method: 'DELETE',
|
|
1379
|
+
url: '/api/v1/users',
|
|
1380
|
+
body: data.requestBody,
|
|
1381
|
+
mediaType: 'application/json',
|
|
1382
|
+
errors: {
|
|
1383
|
+
403: 'Invalid access token'
|
|
1384
|
+
}
|
|
1385
|
+
});
|
|
1386
|
+
}
|
|
1387
|
+
|
|
1388
|
+
/**
|
|
1389
|
+
* Get current authenticated user
|
|
1390
|
+
* @param data The data for the request.
|
|
1391
|
+
* @param data.acceptLanguage
|
|
1392
|
+
* @returns UserResponseDto User retrieved successfully
|
|
1393
|
+
* @throws ApiError
|
|
1394
|
+
*/
|
|
1395
|
+
public static userControllerGetUser(
|
|
1396
|
+
data: UserControllerGetUserData
|
|
1397
|
+
): CancelablePromise<UserControllerGetUserResponse> {
|
|
1398
|
+
return __request(OpenAPI, {
|
|
1399
|
+
method: 'GET',
|
|
1400
|
+
url: '/api/v1/users',
|
|
1401
|
+
headers: {
|
|
1402
|
+
'accept-language': data.acceptLanguage
|
|
1403
|
+
}
|
|
1404
|
+
});
|
|
1405
|
+
}
|
|
1406
|
+
|
|
1407
|
+
/**
|
|
1408
|
+
* Sign up new user
|
|
1409
|
+
* Create a new account with auto-generated access token. Protected by Cloudflare Turnstile to prevent automated signup (when enabled).
|
|
1410
|
+
* @param data The data for the request.
|
|
1411
|
+
* @param data.requestBody
|
|
1412
|
+
* @returns SignupResponseDto User created successfully
|
|
1413
|
+
* @throws ApiError
|
|
1414
|
+
*/
|
|
1415
|
+
public static userControllerSignupUser(
|
|
1416
|
+
data: UserControllerSignupUserData
|
|
1417
|
+
): CancelablePromise<UserControllerSignupUserResponse> {
|
|
1418
|
+
return __request(OpenAPI, {
|
|
1419
|
+
method: 'POST',
|
|
1420
|
+
url: '/api/v1/users',
|
|
1421
|
+
body: data.requestBody,
|
|
1422
|
+
mediaType: 'application/json',
|
|
1423
|
+
errors: {
|
|
1424
|
+
400: 'Invalid Turnstile token (when Turnstile is enabled)',
|
|
1425
|
+
403: 'User signup is disabled'
|
|
1426
|
+
}
|
|
1427
|
+
});
|
|
1428
|
+
}
|
|
1429
|
+
|
|
1430
|
+
/**
|
|
1431
|
+
* Delete user by ID (admin only)
|
|
1432
|
+
* @param data The data for the request.
|
|
1433
|
+
* @param data.id User ID to delete
|
|
1434
|
+
* @returns void User deleted successfully
|
|
1435
|
+
* @throws ApiError
|
|
1436
|
+
*/
|
|
1437
|
+
public static userControllerDeleteUser(
|
|
1438
|
+
data: UserControllerDeleteUserData
|
|
1439
|
+
): CancelablePromise<UserControllerDeleteUserResponse> {
|
|
1440
|
+
return __request(OpenAPI, {
|
|
1441
|
+
method: 'DELETE',
|
|
1442
|
+
url: '/api/v1/users/{id}',
|
|
1443
|
+
path: {
|
|
1444
|
+
id: data.id
|
|
1445
|
+
},
|
|
1446
|
+
errors: {
|
|
1447
|
+
403: 'Cannot delete own account or insufficient permissions'
|
|
1448
|
+
}
|
|
1449
|
+
});
|
|
1450
|
+
}
|
|
1451
|
+
|
|
1452
|
+
/**
|
|
1453
|
+
* Get user info by user ID
|
|
1454
|
+
* @param data The data for the request.
|
|
1455
|
+
* @param data.id User ID
|
|
1456
|
+
* @returns unknown User info retrieved successfully
|
|
1457
|
+
* @throws ApiError
|
|
1458
|
+
*/
|
|
1459
|
+
public static userControllerGetUserInfo(
|
|
1460
|
+
data: UserControllerGetUserInfoData
|
|
1461
|
+
): CancelablePromise<UserControllerGetUserInfoResponse> {
|
|
1462
|
+
return __request(OpenAPI, {
|
|
1463
|
+
method: 'GET',
|
|
1464
|
+
url: '/api/v1/users/{id}/info',
|
|
1465
|
+
path: {
|
|
1466
|
+
id: data.id
|
|
1467
|
+
},
|
|
1468
|
+
errors: {
|
|
1469
|
+
403: 'Cannot access other user info without admin permission'
|
|
1470
|
+
}
|
|
1471
|
+
});
|
|
1472
|
+
}
|
|
1473
|
+
|
|
1474
|
+
/**
|
|
1475
|
+
* Update user settings
|
|
1476
|
+
* @param data The data for the request.
|
|
1477
|
+
* @param data.requestBody
|
|
1478
|
+
* @returns unknown Settings updated successfully
|
|
1479
|
+
* @throws ApiError
|
|
1480
|
+
*/
|
|
1481
|
+
public static userControllerUpdateUserSetting(
|
|
1482
|
+
data: UserControllerUpdateUserSettingData
|
|
1483
|
+
): CancelablePromise<UserControllerUpdateUserSettingResponse> {
|
|
1484
|
+
return __request(OpenAPI, {
|
|
1485
|
+
method: 'PUT',
|
|
1486
|
+
url: '/api/v1/users/setting',
|
|
1487
|
+
body: data.requestBody,
|
|
1488
|
+
mediaType: 'application/json',
|
|
1489
|
+
errors: {
|
|
1490
|
+
403: 'Insufficient permissions'
|
|
1491
|
+
}
|
|
1492
|
+
});
|
|
1493
|
+
}
|
|
1494
|
+
|
|
1495
|
+
/**
|
|
1496
|
+
* Get all user settings paginated (admin only)
|
|
1497
|
+
* @param data The data for the request.
|
|
1498
|
+
* @param data.pageNo Page number
|
|
1499
|
+
* @param data.pageSize Page size
|
|
1500
|
+
* @returns unknown Settings list retrieved successfully
|
|
1501
|
+
* @throws ApiError
|
|
1502
|
+
*/
|
|
1503
|
+
public static userControllerGetAllUserSettingsByPage(
|
|
1504
|
+
data: UserControllerGetAllUserSettingsByPageData
|
|
1505
|
+
): CancelablePromise<UserControllerGetAllUserSettingsByPageResponse> {
|
|
1506
|
+
return __request(OpenAPI, {
|
|
1507
|
+
method: 'GET',
|
|
1508
|
+
url: '/api/v1/users/settings-by-page',
|
|
1509
|
+
query: {
|
|
1510
|
+
pageNo: data.pageNo,
|
|
1511
|
+
pageSize: data.pageSize
|
|
1512
|
+
}
|
|
1513
|
+
});
|
|
1514
|
+
}
|
|
1515
|
+
|
|
1516
|
+
/**
|
|
1517
|
+
* Get asset and liability summary for current user
|
|
1518
|
+
* @returns unknown Summary retrieved successfully
|
|
1519
|
+
* @throws ApiError
|
|
1520
|
+
*/
|
|
1521
|
+
public static userControllerGetAssetLiabilitySummary(): CancelablePromise<UserControllerGetAssetLiabilitySummaryResponse> {
|
|
1522
|
+
return __request(OpenAPI, {
|
|
1523
|
+
method: 'GET',
|
|
1524
|
+
url: '/api/v1/users/asset-liability-summary'
|
|
1525
|
+
});
|
|
1526
|
+
}
|
|
1527
|
+
}
|
|
1528
|
+
|
|
1529
|
+
export class PropertiesService {
|
|
1530
|
+
/**
|
|
1531
|
+
* Get all system properties
|
|
1532
|
+
* @returns unknown Properties retrieved successfully
|
|
1533
|
+
* @throws ApiError
|
|
1534
|
+
*/
|
|
1535
|
+
public static propertyControllerGetAll(): CancelablePromise<PropertyControllerGetAllResponse> {
|
|
1536
|
+
return __request(OpenAPI, {
|
|
1537
|
+
method: 'GET',
|
|
1538
|
+
url: '/api/v1/admin/properties',
|
|
1539
|
+
errors: {
|
|
1540
|
+
401: 'Unauthorized',
|
|
1541
|
+
403: 'Forbidden - insufficient permissions'
|
|
1542
|
+
}
|
|
1543
|
+
});
|
|
1544
|
+
}
|
|
1545
|
+
|
|
1546
|
+
/**
|
|
1547
|
+
* Get property by key
|
|
1548
|
+
* @param data The data for the request.
|
|
1549
|
+
* @param data.key Property key
|
|
1550
|
+
* @returns unknown Property retrieved successfully
|
|
1551
|
+
* @throws ApiError
|
|
1552
|
+
*/
|
|
1553
|
+
public static propertyControllerGetByKey(
|
|
1554
|
+
data: PropertyControllerGetByKeyData
|
|
1555
|
+
): CancelablePromise<PropertyControllerGetByKeyResponse> {
|
|
1556
|
+
return __request(OpenAPI, {
|
|
1557
|
+
method: 'GET',
|
|
1558
|
+
url: '/api/v1/admin/properties/{key}',
|
|
1559
|
+
path: {
|
|
1560
|
+
key: data.key
|
|
1561
|
+
},
|
|
1562
|
+
errors: {
|
|
1563
|
+
401: 'Unauthorized',
|
|
1564
|
+
403: 'Forbidden - insufficient permissions',
|
|
1565
|
+
404: 'Property not found'
|
|
1566
|
+
}
|
|
1567
|
+
});
|
|
1568
|
+
}
|
|
1569
|
+
|
|
1570
|
+
/**
|
|
1571
|
+
* Update a system property
|
|
1572
|
+
* @param data The data for the request.
|
|
1573
|
+
* @param data.key Property key
|
|
1574
|
+
* @param data.requestBody
|
|
1575
|
+
* @returns unknown Property updated successfully
|
|
1576
|
+
* @throws ApiError
|
|
1577
|
+
*/
|
|
1578
|
+
public static propertyControllerUpdate(
|
|
1579
|
+
data: PropertyControllerUpdateData
|
|
1580
|
+
): CancelablePromise<PropertyControllerUpdateResponse> {
|
|
1581
|
+
return __request(OpenAPI, {
|
|
1582
|
+
method: 'PUT',
|
|
1583
|
+
url: '/api/v1/admin/properties/{key}',
|
|
1584
|
+
path: {
|
|
1585
|
+
key: data.key
|
|
1586
|
+
},
|
|
1587
|
+
body: data.requestBody,
|
|
1588
|
+
mediaType: 'application/json',
|
|
1589
|
+
errors: {
|
|
1590
|
+
401: 'Unauthorized',
|
|
1591
|
+
403: 'Forbidden - insufficient permissions'
|
|
1592
|
+
}
|
|
1593
|
+
});
|
|
1594
|
+
}
|
|
1595
|
+
|
|
1596
|
+
/**
|
|
1597
|
+
* Delete a system property
|
|
1598
|
+
* @param data The data for the request.
|
|
1599
|
+
* @param data.key Property key
|
|
1600
|
+
* @returns void Property deleted successfully
|
|
1601
|
+
* @throws ApiError
|
|
1602
|
+
*/
|
|
1603
|
+
public static propertyControllerDelete(
|
|
1604
|
+
data: PropertyControllerDeleteData
|
|
1605
|
+
): CancelablePromise<PropertyControllerDeleteResponse> {
|
|
1606
|
+
return __request(OpenAPI, {
|
|
1607
|
+
method: 'DELETE',
|
|
1608
|
+
url: '/api/v1/admin/properties/{key}',
|
|
1609
|
+
path: {
|
|
1610
|
+
key: data.key
|
|
1611
|
+
},
|
|
1612
|
+
errors: {
|
|
1613
|
+
401: 'Unauthorized',
|
|
1614
|
+
403: 'Forbidden - insufficient permissions',
|
|
1615
|
+
404: 'Property not found'
|
|
1616
|
+
}
|
|
1617
|
+
});
|
|
1618
|
+
}
|
|
1619
|
+
}
|
|
1620
|
+
|
|
1621
|
+
export class BeanPayeesService {
|
|
1622
|
+
/**
|
|
1623
|
+
* Create a new payee
|
|
1624
|
+
* Creates a new payee mapping for the authenticated user. The payee name must be unique within the user's account.
|
|
1625
|
+
* @param data The data for the request.
|
|
1626
|
+
* @param data.requestBody
|
|
1627
|
+
* @returns PayeeResponseDto Payee created successfully
|
|
1628
|
+
* @throws ApiError
|
|
1629
|
+
*/
|
|
1630
|
+
public static payeeControllerCreate(
|
|
1631
|
+
data: PayeeControllerCreateData
|
|
1632
|
+
): CancelablePromise<PayeeControllerCreateResponse> {
|
|
1633
|
+
return __request(OpenAPI, {
|
|
1634
|
+
method: 'POST',
|
|
1635
|
+
url: '/api/v1/bean/payees',
|
|
1636
|
+
body: data.requestBody,
|
|
1637
|
+
mediaType: 'application/json',
|
|
1638
|
+
errors: {
|
|
1639
|
+
400: 'Invalid input data',
|
|
1640
|
+
409: 'Payee already exists'
|
|
1641
|
+
}
|
|
1642
|
+
});
|
|
1643
|
+
}
|
|
1644
|
+
|
|
1645
|
+
/**
|
|
1646
|
+
* List user payees
|
|
1647
|
+
* Returns all payee mappings for the authenticated user with optional filtering
|
|
1648
|
+
* @param data The data for the request.
|
|
1649
|
+
* @param data.search Search term for payee name (partial match, case-insensitive). Useful for autocomplete.
|
|
1650
|
+
* @param data.payee Filter by exact payee name match
|
|
1651
|
+
* @param data.category Filter by custom category
|
|
1652
|
+
* @param data.tag Filter by custom tag (returns payees that have this tag)
|
|
1653
|
+
* @param data.isActive Filter by active status. Defaults to true (show only active payees).
|
|
1654
|
+
* @returns PayeeListResponseDto Payees retrieved successfully
|
|
1655
|
+
* @throws ApiError
|
|
1656
|
+
*/
|
|
1657
|
+
public static payeeControllerFindAll(
|
|
1658
|
+
data: PayeeControllerFindAllData = {}
|
|
1659
|
+
): CancelablePromise<PayeeControllerFindAllResponse> {
|
|
1660
|
+
return __request(OpenAPI, {
|
|
1661
|
+
method: 'GET',
|
|
1662
|
+
url: '/api/v1/bean/payees',
|
|
1663
|
+
query: {
|
|
1664
|
+
search: data.search,
|
|
1665
|
+
payee: data.payee,
|
|
1666
|
+
category: data.category,
|
|
1667
|
+
tag: data.tag,
|
|
1668
|
+
isActive: data.isActive
|
|
1669
|
+
}
|
|
1670
|
+
});
|
|
1671
|
+
}
|
|
1672
|
+
|
|
1673
|
+
/**
|
|
1674
|
+
* Get payee autocomplete suggestions
|
|
1675
|
+
* Returns active payee names matching the query, sorted by recent usage. Used for transaction input autocomplete.
|
|
1676
|
+
* @param data The data for the request.
|
|
1677
|
+
* @param data.q Search query for payee name (partial match, case-insensitive)
|
|
1678
|
+
* @param data.limit Maximum number of suggestions
|
|
1679
|
+
* @returns PayeeAutocompleteResponseDto Autocomplete suggestions retrieved successfully
|
|
1680
|
+
* @throws ApiError
|
|
1681
|
+
*/
|
|
1682
|
+
public static payeeControllerAutocomplete(
|
|
1683
|
+
data: PayeeControllerAutocompleteData
|
|
1684
|
+
): CancelablePromise<PayeeControllerAutocompleteResponse> {
|
|
1685
|
+
return __request(OpenAPI, {
|
|
987
1686
|
method: 'GET',
|
|
988
1687
|
url: '/api/v1/bean/payees/autocomplete',
|
|
989
1688
|
query: {
|
|
@@ -1251,7 +1950,7 @@ export class AdminPayeeProfilesService {
|
|
|
1251
1950
|
* Removes verification status by setting verifiedAt to null.
|
|
1252
1951
|
* @param data The data for the request.
|
|
1253
1952
|
* @param data.id Payee profile ID (UUID)
|
|
1254
|
-
* @returns
|
|
1953
|
+
* @returns void Payee profile unverified successfully
|
|
1255
1954
|
* @throws ApiError
|
|
1256
1955
|
*/
|
|
1257
1956
|
public static payeeProfileAdminControllerUnverify(
|
|
@@ -1271,6 +1970,24 @@ export class AdminPayeeProfilesService {
|
|
|
1271
1970
|
}
|
|
1272
1971
|
}
|
|
1273
1972
|
|
|
1973
|
+
export class PayeeProfilesService {
|
|
1974
|
+
/**
|
|
1975
|
+
* List active payee profiles (directory dump)
|
|
1976
|
+
* Returns the full active PayeeProfile set as a trimmed projection for client-side dictionary caching. Aliases are verbatim as stored; clients normalize on their side.
|
|
1977
|
+
* @returns PayeeProfileDirectoryResponseDto Active payee profiles
|
|
1978
|
+
* @throws ApiError
|
|
1979
|
+
*/
|
|
1980
|
+
public static payeeProfileControllerListActive(): CancelablePromise<PayeeProfileControllerListActiveResponse> {
|
|
1981
|
+
return __request(OpenAPI, {
|
|
1982
|
+
method: 'GET',
|
|
1983
|
+
url: '/api/v1/bean/payee-profiles',
|
|
1984
|
+
errors: {
|
|
1985
|
+
401: 'Missing or invalid token'
|
|
1986
|
+
}
|
|
1987
|
+
});
|
|
1988
|
+
}
|
|
1989
|
+
}
|
|
1990
|
+
|
|
1274
1991
|
export class BeanCommoditiesService {
|
|
1275
1992
|
/**
|
|
1276
1993
|
* Create a new commodity
|
|
@@ -1406,1005 +2123,1132 @@ export class BeanCommoditiesService {
|
|
|
1406
2123
|
|
|
1407
2124
|
/**
|
|
1408
2125
|
* Ensure commodity exists
|
|
1409
|
-
* Gets existing commodity or creates it with automatic initialization from OpenBB
|
|
1410
|
-
* @param data The data for the request.
|
|
1411
|
-
* @param data.symbol Commodity symbol
|
|
1412
|
-
* @param data.region Region code for tenant context
|
|
1413
|
-
* @returns CommodityResponseDto Commodity retrieved or created
|
|
1414
|
-
* @throws ApiError
|
|
1415
|
-
*/
|
|
1416
|
-
public static commodityControllerGetOrCreate(
|
|
1417
|
-
data: CommodityControllerGetOrCreateData
|
|
1418
|
-
): CancelablePromise<CommodityControllerGetOrCreateResponse> {
|
|
1419
|
-
return __request(OpenAPI, {
|
|
1420
|
-
method: 'POST',
|
|
1421
|
-
url: '/api/v1/{region}/bean/commodities/{symbol}/ensure',
|
|
1422
|
-
path: {
|
|
1423
|
-
symbol: data.symbol,
|
|
1424
|
-
region: data.region
|
|
1425
|
-
}
|
|
1426
|
-
});
|
|
1427
|
-
}
|
|
1428
|
-
|
|
1429
|
-
/**
|
|
1430
|
-
* Bulk create commodities
|
|
1431
|
-
* Creates multiple commodities from a list of symbols, useful for initialization
|
|
1432
|
-
* @param data The data for the request.
|
|
1433
|
-
* @param data.region Region code for tenant context
|
|
1434
|
-
* @returns CommodityResponseDto Commodities created successfully
|
|
1435
|
-
* @throws ApiError
|
|
1436
|
-
*/
|
|
1437
|
-
public static commodityControllerBulkCreate(
|
|
1438
|
-
data: CommodityControllerBulkCreateData
|
|
1439
|
-
): CancelablePromise<CommodityControllerBulkCreateResponse> {
|
|
1440
|
-
return __request(OpenAPI, {
|
|
1441
|
-
method: 'POST',
|
|
1442
|
-
url: '/api/v1/{region}/bean/commodities/bulk',
|
|
1443
|
-
path: {
|
|
1444
|
-
region: data.region
|
|
1445
|
-
}
|
|
1446
|
-
});
|
|
1447
|
-
}
|
|
1448
|
-
}
|
|
1449
|
-
|
|
1450
|
-
export class RecurringRulesService {
|
|
1451
|
-
/**
|
|
1452
|
-
* Create a new recurring rule
|
|
1453
|
-
* Creates a new recurring transaction rule for the authenticated user
|
|
2126
|
+
* Gets existing commodity or creates it with automatic initialization from OpenBB
|
|
1454
2127
|
* @param data The data for the request.
|
|
2128
|
+
* @param data.symbol Commodity symbol
|
|
1455
2129
|
* @param data.region Region code for tenant context
|
|
1456
|
-
* @
|
|
1457
|
-
* @returns RecurringRuleResponseDto Rule created successfully
|
|
2130
|
+
* @returns CommodityResponseDto Commodity retrieved or created
|
|
1458
2131
|
* @throws ApiError
|
|
1459
2132
|
*/
|
|
1460
|
-
public static
|
|
1461
|
-
data:
|
|
1462
|
-
): CancelablePromise<
|
|
2133
|
+
public static commodityControllerGetOrCreate(
|
|
2134
|
+
data: CommodityControllerGetOrCreateData
|
|
2135
|
+
): CancelablePromise<CommodityControllerGetOrCreateResponse> {
|
|
1463
2136
|
return __request(OpenAPI, {
|
|
1464
2137
|
method: 'POST',
|
|
1465
|
-
url: '/api/v1/{region}/bean/
|
|
2138
|
+
url: '/api/v1/{region}/bean/commodities/{symbol}/ensure',
|
|
1466
2139
|
path: {
|
|
2140
|
+
symbol: data.symbol,
|
|
1467
2141
|
region: data.region
|
|
1468
|
-
},
|
|
1469
|
-
body: data.requestBody,
|
|
1470
|
-
mediaType: 'application/json',
|
|
1471
|
-
errors: {
|
|
1472
|
-
400: 'Invalid input data (e.g., autoCreate without accounts)',
|
|
1473
|
-
409: 'Rule with same name already exists'
|
|
1474
2142
|
}
|
|
1475
2143
|
});
|
|
1476
2144
|
}
|
|
1477
2145
|
|
|
1478
2146
|
/**
|
|
1479
|
-
*
|
|
1480
|
-
*
|
|
2147
|
+
* Bulk create commodities
|
|
2148
|
+
* Creates multiple commodities from a list of symbols, useful for initialization
|
|
1481
2149
|
* @param data The data for the request.
|
|
1482
2150
|
* @param data.region Region code for tenant context
|
|
1483
|
-
* @
|
|
1484
|
-
* @param data.frequency Filter by frequency (WEEKLY, MONTHLY, etc.)
|
|
1485
|
-
* @param data.hasAutoCreate Filter by autoCreate enabled
|
|
1486
|
-
* @returns RecurringRuleResponseDto Rules retrieved successfully
|
|
2151
|
+
* @returns CommodityResponseDto Commodities created successfully
|
|
1487
2152
|
* @throws ApiError
|
|
1488
2153
|
*/
|
|
1489
|
-
public static
|
|
1490
|
-
data:
|
|
1491
|
-
): CancelablePromise<
|
|
2154
|
+
public static commodityControllerBulkCreate(
|
|
2155
|
+
data: CommodityControllerBulkCreateData
|
|
2156
|
+
): CancelablePromise<CommodityControllerBulkCreateResponse> {
|
|
1492
2157
|
return __request(OpenAPI, {
|
|
1493
|
-
method: '
|
|
1494
|
-
url: '/api/v1/{region}/bean/
|
|
2158
|
+
method: 'POST',
|
|
2159
|
+
url: '/api/v1/{region}/bean/commodities/bulk',
|
|
1495
2160
|
path: {
|
|
1496
2161
|
region: data.region
|
|
1497
|
-
},
|
|
1498
|
-
query: {
|
|
1499
|
-
isActive: data.isActive,
|
|
1500
|
-
frequency: data.frequency,
|
|
1501
|
-
hasAutoCreate: data.hasAutoCreate
|
|
1502
2162
|
}
|
|
1503
2163
|
});
|
|
1504
2164
|
}
|
|
2165
|
+
}
|
|
1505
2166
|
|
|
2167
|
+
export class ReportingService {
|
|
1506
2168
|
/**
|
|
1507
|
-
*
|
|
1508
|
-
*
|
|
2169
|
+
* Get portfolio value trends
|
|
2170
|
+
*
|
|
2171
|
+
* Returns time series data of portfolio net worth.
|
|
2172
|
+
*
|
|
2173
|
+
* **Multi-currency Support:**
|
|
2174
|
+
* - `series[].byCurrency` - Currency breakdown for each data point
|
|
2175
|
+
* - `byCurrency` - Separate time series grouped by currency
|
|
2176
|
+
* - `warnings` - Exchange rate warnings if conversion failed
|
|
2177
|
+
*
|
|
2178
|
+
* **Parameters:**
|
|
2179
|
+
* - `period`: Time period (1m, 3m, 6m, 1y)
|
|
2180
|
+
* - `granularity`: Data granularity (day, week, month)
|
|
2181
|
+
*
|
|
1509
2182
|
* @param data The data for the request.
|
|
1510
|
-
* @param data.transactionId Source transaction ID
|
|
1511
2183
|
* @param data.region Region code for tenant context
|
|
1512
|
-
* @param data.
|
|
1513
|
-
* @
|
|
2184
|
+
* @param data.period Time period
|
|
2185
|
+
* @param data.granularity Data granularity
|
|
2186
|
+
* @returns PortfolioTrendsResponseDto Trends retrieved successfully
|
|
1514
2187
|
* @throws ApiError
|
|
1515
2188
|
*/
|
|
1516
|
-
public static
|
|
1517
|
-
data:
|
|
1518
|
-
): CancelablePromise<
|
|
2189
|
+
public static reportingControllerGetPortfolioTrends(
|
|
2190
|
+
data: ReportingControllerGetPortfolioTrendsData
|
|
2191
|
+
): CancelablePromise<ReportingControllerGetPortfolioTrendsResponse> {
|
|
1519
2192
|
return __request(OpenAPI, {
|
|
1520
|
-
method: '
|
|
1521
|
-
url: '/api/v1/{region}/
|
|
2193
|
+
method: 'GET',
|
|
2194
|
+
url: '/api/v1/{region}/reporting/portfolio/trends',
|
|
1522
2195
|
path: {
|
|
1523
|
-
transactionId: data.transactionId,
|
|
1524
2196
|
region: data.region
|
|
1525
2197
|
},
|
|
1526
|
-
|
|
1527
|
-
|
|
2198
|
+
query: {
|
|
2199
|
+
period: data.period,
|
|
2200
|
+
granularity: data.granularity
|
|
2201
|
+
},
|
|
1528
2202
|
errors: {
|
|
1529
|
-
|
|
1530
|
-
409: 'Rule with same name already exists or transaction already linked'
|
|
2203
|
+
401: 'User not authenticated'
|
|
1531
2204
|
}
|
|
1532
2205
|
});
|
|
1533
2206
|
}
|
|
1534
2207
|
|
|
1535
2208
|
/**
|
|
1536
|
-
* Get
|
|
1537
|
-
*
|
|
2209
|
+
* Get cash-flow trends
|
|
2210
|
+
*
|
|
2211
|
+
* Monthly income / expense / netSavings over a fixed N-month window
|
|
2212
|
+
* (current month + N−1 prior). Missing months are zero-filled (flow metric).
|
|
2213
|
+
*
|
|
2214
|
+
* **Parameters:**
|
|
2215
|
+
* - `period`: 1m | 3m | 6m | 1y (default 6m)
|
|
2216
|
+
* - `granularity`: accepted for API symmetry; v1 returns month buckets
|
|
2217
|
+
*
|
|
1538
2218
|
* @param data The data for the request.
|
|
1539
|
-
* @param data.id Rule ID
|
|
1540
2219
|
* @param data.region Region code for tenant context
|
|
1541
|
-
* @
|
|
2220
|
+
* @param data.period Time period
|
|
2221
|
+
* @param data.granularity Data granularity (accepted for API symmetry; v1 returns month buckets)
|
|
2222
|
+
* @returns CashFlowTrendsResponseDto Cash-flow trends retrieved successfully
|
|
1542
2223
|
* @throws ApiError
|
|
1543
2224
|
*/
|
|
1544
|
-
public static
|
|
1545
|
-
data:
|
|
1546
|
-
): CancelablePromise<
|
|
2225
|
+
public static reportingControllerGetCashFlowTrends(
|
|
2226
|
+
data: ReportingControllerGetCashFlowTrendsData
|
|
2227
|
+
): CancelablePromise<ReportingControllerGetCashFlowTrendsResponse> {
|
|
1547
2228
|
return __request(OpenAPI, {
|
|
1548
2229
|
method: 'GET',
|
|
1549
|
-
url: '/api/v1/{region}/
|
|
2230
|
+
url: '/api/v1/{region}/reporting/cash-flow/trends',
|
|
1550
2231
|
path: {
|
|
1551
|
-
id: data.id,
|
|
1552
2232
|
region: data.region
|
|
1553
2233
|
},
|
|
2234
|
+
query: {
|
|
2235
|
+
period: data.period,
|
|
2236
|
+
granularity: data.granularity
|
|
2237
|
+
},
|
|
1554
2238
|
errors: {
|
|
1555
|
-
|
|
2239
|
+
401: 'User not authenticated'
|
|
1556
2240
|
}
|
|
1557
2241
|
});
|
|
1558
2242
|
}
|
|
1559
2243
|
|
|
1560
2244
|
/**
|
|
1561
|
-
*
|
|
1562
|
-
*
|
|
2245
|
+
* Generate portfolio snapshot
|
|
2246
|
+
*
|
|
2247
|
+
* Manually generate a portfolio snapshot for a specific date.
|
|
2248
|
+
*
|
|
2249
|
+
* **Multi-currency Support:**
|
|
2250
|
+
* - Fetches balances grouped by currency
|
|
2251
|
+
* - Uses user's baseCurrency setting for conversion
|
|
2252
|
+
* - Stores exchange rates and warnings
|
|
2253
|
+
*
|
|
2254
|
+
* **Use Cases:**
|
|
2255
|
+
* - Testing snapshot generation
|
|
2256
|
+
* - Force regeneration after data correction
|
|
2257
|
+
* - Initial setup for new users
|
|
2258
|
+
*
|
|
1563
2259
|
* @param data The data for the request.
|
|
1564
|
-
* @param data.id Rule ID
|
|
1565
2260
|
* @param data.region Region code for tenant context
|
|
1566
|
-
* @param data.requestBody
|
|
1567
|
-
* @returns
|
|
2261
|
+
* @param data.requestBody Optional date (defaults to today)
|
|
2262
|
+
* @returns GenerateSnapshotResponse Snapshot generated successfully
|
|
1568
2263
|
* @throws ApiError
|
|
1569
2264
|
*/
|
|
1570
|
-
public static
|
|
1571
|
-
data:
|
|
1572
|
-
): CancelablePromise<
|
|
2265
|
+
public static reportingControllerGenerateSnapshot(
|
|
2266
|
+
data: ReportingControllerGenerateSnapshotData
|
|
2267
|
+
): CancelablePromise<ReportingControllerGenerateSnapshotResponse> {
|
|
1573
2268
|
return __request(OpenAPI, {
|
|
1574
|
-
method: '
|
|
1575
|
-
url: '/api/v1/{region}/
|
|
2269
|
+
method: 'POST',
|
|
2270
|
+
url: '/api/v1/{region}/reporting/snapshots/generate',
|
|
1576
2271
|
path: {
|
|
1577
|
-
id: data.id,
|
|
1578
2272
|
region: data.region
|
|
1579
2273
|
},
|
|
1580
2274
|
body: data.requestBody,
|
|
1581
2275
|
mediaType: 'application/json',
|
|
1582
2276
|
errors: {
|
|
1583
|
-
400: 'Invalid
|
|
1584
|
-
|
|
2277
|
+
400: 'Invalid date format',
|
|
2278
|
+
401: 'User not authenticated'
|
|
1585
2279
|
}
|
|
1586
2280
|
});
|
|
1587
2281
|
}
|
|
1588
2282
|
|
|
1589
2283
|
/**
|
|
1590
|
-
*
|
|
1591
|
-
*
|
|
2284
|
+
* Backfill portfolio snapshots
|
|
2285
|
+
*
|
|
2286
|
+
* Generate snapshots for a date range (historical data backfill).
|
|
2287
|
+
*
|
|
2288
|
+
* **Multi-currency Support:**
|
|
2289
|
+
* - Each snapshot includes multi-currency data
|
|
2290
|
+
* - Uses exchange rates available at generation time
|
|
2291
|
+
* - Warnings stored for missing exchange rates
|
|
2292
|
+
*
|
|
2293
|
+
* **Best Practices:**
|
|
2294
|
+
* - Use for initial setup after account configuration
|
|
2295
|
+
* - Run during low-traffic periods for large date ranges
|
|
2296
|
+
* - Existing snapshots are skipped (not regenerated)
|
|
2297
|
+
*
|
|
1592
2298
|
* @param data The data for the request.
|
|
1593
|
-
* @param data.id Rule ID
|
|
1594
2299
|
* @param data.region Region code for tenant context
|
|
1595
|
-
* @
|
|
2300
|
+
* @param data.requestBody
|
|
2301
|
+
* @returns BackfillSnapshotsResponse Backfill completed successfully
|
|
1596
2302
|
* @throws ApiError
|
|
1597
2303
|
*/
|
|
1598
|
-
public static
|
|
1599
|
-
data:
|
|
1600
|
-
): CancelablePromise<
|
|
2304
|
+
public static reportingControllerBackfillSnapshots(
|
|
2305
|
+
data: ReportingControllerBackfillSnapshotsData
|
|
2306
|
+
): CancelablePromise<ReportingControllerBackfillSnapshotsResponse> {
|
|
1601
2307
|
return __request(OpenAPI, {
|
|
1602
|
-
method: '
|
|
1603
|
-
url: '/api/v1/{region}/
|
|
2308
|
+
method: 'POST',
|
|
2309
|
+
url: '/api/v1/{region}/reporting/snapshots/backfill',
|
|
1604
2310
|
path: {
|
|
1605
|
-
id: data.id,
|
|
1606
2311
|
region: data.region
|
|
1607
2312
|
},
|
|
2313
|
+
body: data.requestBody,
|
|
2314
|
+
mediaType: 'application/json',
|
|
1608
2315
|
errors: {
|
|
1609
|
-
|
|
2316
|
+
400: 'Invalid date format or range',
|
|
2317
|
+
401: 'User not authenticated',
|
|
2318
|
+
409: 'Backfill already in progress for this user'
|
|
1610
2319
|
}
|
|
1611
2320
|
});
|
|
1612
2321
|
}
|
|
2322
|
+
}
|
|
1613
2323
|
|
|
2324
|
+
export class BeanPricesService {
|
|
1614
2325
|
/**
|
|
1615
|
-
*
|
|
1616
|
-
*
|
|
2326
|
+
* Create a new price
|
|
2327
|
+
* Creates a new price entry for the authenticated user
|
|
1617
2328
|
* @param data The data for the request.
|
|
1618
|
-
* @param data.id Rule ID
|
|
1619
2329
|
* @param data.region Region code for tenant context
|
|
1620
|
-
* @
|
|
2330
|
+
* @param data.requestBody
|
|
2331
|
+
* @returns PriceResponseDto Price created successfully
|
|
1621
2332
|
* @throws ApiError
|
|
1622
2333
|
*/
|
|
1623
|
-
public static
|
|
1624
|
-
data:
|
|
1625
|
-
): CancelablePromise<
|
|
2334
|
+
public static priceControllerCreate(
|
|
2335
|
+
data: PriceControllerCreateData
|
|
2336
|
+
): CancelablePromise<PriceControllerCreateResponse> {
|
|
1626
2337
|
return __request(OpenAPI, {
|
|
1627
|
-
method: '
|
|
1628
|
-
url: '/api/v1/{region}/bean/
|
|
2338
|
+
method: 'POST',
|
|
2339
|
+
url: '/api/v1/{region}/bean/prices',
|
|
1629
2340
|
path: {
|
|
1630
|
-
id: data.id,
|
|
1631
2341
|
region: data.region
|
|
1632
2342
|
},
|
|
2343
|
+
body: data.requestBody,
|
|
2344
|
+
mediaType: 'application/json',
|
|
1633
2345
|
errors: {
|
|
1634
|
-
404: '
|
|
2346
|
+
404: 'Currency or quoteCurrency commodity not found',
|
|
2347
|
+
409: 'Price already exists for this currency pair and date'
|
|
1635
2348
|
}
|
|
1636
2349
|
});
|
|
1637
2350
|
}
|
|
1638
|
-
}
|
|
1639
2351
|
|
|
1640
|
-
export class ExpectedTransactionsService {
|
|
1641
2352
|
/**
|
|
1642
|
-
* List
|
|
1643
|
-
* Returns
|
|
2353
|
+
* List user prices
|
|
2354
|
+
* Returns all price entries for the authenticated user with optional filtering
|
|
1644
2355
|
* @param data The data for the request.
|
|
1645
2356
|
* @param data.region Region code for tenant context
|
|
1646
|
-
* @param data.
|
|
1647
|
-
* @param data.
|
|
1648
|
-
* @param data.
|
|
1649
|
-
* @param data.
|
|
1650
|
-
* @
|
|
2357
|
+
* @param data.currency Filter by currency (e.g., BTC, AAPL, USD)
|
|
2358
|
+
* @param data.quoteCurrency Filter by quote currency (pricing currency, e.g., USD, CNY)
|
|
2359
|
+
* @param data.dateFrom Filter prices from this date (ISO 8601 format)
|
|
2360
|
+
* @param data.dateTo Filter prices to this date (ISO 8601 format)
|
|
2361
|
+
* @param data.search Search term for currency or quoteCurrency (case-insensitive partial match)
|
|
2362
|
+
* @param data.page Page number for pagination (default: 1)
|
|
2363
|
+
* @param data.limit Number of items per page (default: 20, max: 100)
|
|
2364
|
+
* @returns PriceListResponseDto Prices retrieved successfully
|
|
1651
2365
|
* @throws ApiError
|
|
1652
2366
|
*/
|
|
1653
|
-
public static
|
|
1654
|
-
data:
|
|
1655
|
-
): CancelablePromise<
|
|
2367
|
+
public static priceControllerFindAll(
|
|
2368
|
+
data: PriceControllerFindAllData
|
|
2369
|
+
): CancelablePromise<PriceControllerFindAllResponse> {
|
|
1656
2370
|
return __request(OpenAPI, {
|
|
1657
2371
|
method: 'GET',
|
|
1658
|
-
url: '/api/v1/{region}/bean/
|
|
2372
|
+
url: '/api/v1/{region}/bean/prices',
|
|
1659
2373
|
path: {
|
|
1660
2374
|
region: data.region
|
|
1661
2375
|
},
|
|
1662
2376
|
query: {
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
2377
|
+
currency: data.currency,
|
|
2378
|
+
quoteCurrency: data.quoteCurrency,
|
|
2379
|
+
dateFrom: data.dateFrom,
|
|
2380
|
+
dateTo: data.dateTo,
|
|
2381
|
+
search: data.search,
|
|
2382
|
+
page: data.page,
|
|
2383
|
+
limit: data.limit
|
|
1667
2384
|
}
|
|
1668
2385
|
});
|
|
1669
2386
|
}
|
|
1670
2387
|
|
|
1671
2388
|
/**
|
|
1672
|
-
*
|
|
1673
|
-
* Returns
|
|
2389
|
+
* Get price by ID
|
|
2390
|
+
* Returns a single price entry by its ID
|
|
1674
2391
|
* @param data The data for the request.
|
|
2392
|
+
* @param data.id Price ID
|
|
1675
2393
|
* @param data.region Region code for tenant context
|
|
1676
|
-
* @returns
|
|
2394
|
+
* @returns PriceResponseDto Price retrieved successfully
|
|
1677
2395
|
* @throws ApiError
|
|
1678
2396
|
*/
|
|
1679
|
-
public static
|
|
1680
|
-
data:
|
|
1681
|
-
): CancelablePromise<
|
|
2397
|
+
public static priceControllerFindOne(
|
|
2398
|
+
data: PriceControllerFindOneData
|
|
2399
|
+
): CancelablePromise<PriceControllerFindOneResponse> {
|
|
1682
2400
|
return __request(OpenAPI, {
|
|
1683
2401
|
method: 'GET',
|
|
1684
|
-
url: '/api/v1/{region}/bean/
|
|
2402
|
+
url: '/api/v1/{region}/bean/prices/{id}',
|
|
1685
2403
|
path: {
|
|
2404
|
+
id: data.id,
|
|
1686
2405
|
region: data.region
|
|
2406
|
+
},
|
|
2407
|
+
errors: {
|
|
2408
|
+
404: 'Price not found'
|
|
1687
2409
|
}
|
|
1688
2410
|
});
|
|
1689
2411
|
}
|
|
1690
2412
|
|
|
1691
2413
|
/**
|
|
1692
|
-
*
|
|
1693
|
-
*
|
|
2414
|
+
* Update a price
|
|
2415
|
+
* Updates an existing price entry
|
|
1694
2416
|
* @param data The data for the request.
|
|
1695
|
-
* @param data.id
|
|
2417
|
+
* @param data.id Price ID
|
|
1696
2418
|
* @param data.region Region code for tenant context
|
|
1697
|
-
* @
|
|
2419
|
+
* @param data.requestBody
|
|
2420
|
+
* @returns PriceResponseDto Price updated successfully
|
|
1698
2421
|
* @throws ApiError
|
|
1699
2422
|
*/
|
|
1700
|
-
public static
|
|
1701
|
-
data:
|
|
1702
|
-
): CancelablePromise<
|
|
2423
|
+
public static priceControllerUpdate(
|
|
2424
|
+
data: PriceControllerUpdateData
|
|
2425
|
+
): CancelablePromise<PriceControllerUpdateResponse> {
|
|
1703
2426
|
return __request(OpenAPI, {
|
|
1704
|
-
method: '
|
|
1705
|
-
url: '/api/v1/{region}/bean/
|
|
2427
|
+
method: 'PUT',
|
|
2428
|
+
url: '/api/v1/{region}/bean/prices/{id}',
|
|
1706
2429
|
path: {
|
|
1707
2430
|
id: data.id,
|
|
1708
2431
|
region: data.region
|
|
1709
2432
|
},
|
|
2433
|
+
body: data.requestBody,
|
|
2434
|
+
mediaType: 'application/json',
|
|
1710
2435
|
errors: {
|
|
1711
|
-
404: '
|
|
2436
|
+
404: 'Price not found',
|
|
2437
|
+
409: 'Updated price conflicts with existing price'
|
|
1712
2438
|
}
|
|
1713
2439
|
});
|
|
1714
2440
|
}
|
|
1715
2441
|
|
|
1716
2442
|
/**
|
|
1717
|
-
*
|
|
1718
|
-
*
|
|
2443
|
+
* Delete a price
|
|
2444
|
+
* Deletes a price entry (hard delete)
|
|
1719
2445
|
* @param data The data for the request.
|
|
1720
|
-
* @param data.id
|
|
2446
|
+
* @param data.id Price ID
|
|
1721
2447
|
* @param data.region Region code for tenant context
|
|
1722
|
-
* @returns
|
|
2448
|
+
* @returns void Price deleted successfully
|
|
1723
2449
|
* @throws ApiError
|
|
1724
2450
|
*/
|
|
1725
|
-
public static
|
|
1726
|
-
data:
|
|
1727
|
-
): CancelablePromise<
|
|
2451
|
+
public static priceControllerDelete(
|
|
2452
|
+
data: PriceControllerDeleteData
|
|
2453
|
+
): CancelablePromise<PriceControllerDeleteResponse> {
|
|
1728
2454
|
return __request(OpenAPI, {
|
|
1729
|
-
method: '
|
|
1730
|
-
url: '/api/v1/{region}/bean/
|
|
2455
|
+
method: 'DELETE',
|
|
2456
|
+
url: '/api/v1/{region}/bean/prices/{id}',
|
|
1731
2457
|
path: {
|
|
1732
2458
|
id: data.id,
|
|
1733
2459
|
region: data.region
|
|
1734
2460
|
},
|
|
1735
2461
|
errors: {
|
|
1736
|
-
|
|
1737
|
-
404: 'Expected transaction not found'
|
|
2462
|
+
404: 'Price not found'
|
|
1738
2463
|
}
|
|
1739
2464
|
});
|
|
1740
2465
|
}
|
|
1741
2466
|
|
|
1742
2467
|
/**
|
|
1743
|
-
*
|
|
1744
|
-
*
|
|
2468
|
+
* Bulk create prices
|
|
2469
|
+
* Creates multiple price entries at once (skips duplicates)
|
|
1745
2470
|
* @param data The data for the request.
|
|
1746
|
-
* @param data.id Expected transaction ID
|
|
1747
2471
|
* @param data.region Region code for tenant context
|
|
1748
|
-
* @
|
|
2472
|
+
* @param data.requestBody
|
|
2473
|
+
* @returns PriceResponseDto Prices created successfully
|
|
1749
2474
|
* @throws ApiError
|
|
1750
2475
|
*/
|
|
1751
|
-
public static
|
|
1752
|
-
data:
|
|
1753
|
-
): CancelablePromise<
|
|
2476
|
+
public static priceControllerBulkCreate(
|
|
2477
|
+
data: PriceControllerBulkCreateData
|
|
2478
|
+
): CancelablePromise<PriceControllerBulkCreateResponse> {
|
|
1754
2479
|
return __request(OpenAPI, {
|
|
1755
|
-
method: '
|
|
1756
|
-
url: '/api/v1/{region}/bean/
|
|
2480
|
+
method: 'POST',
|
|
2481
|
+
url: '/api/v1/{region}/bean/prices/bulk',
|
|
1757
2482
|
path: {
|
|
1758
|
-
id: data.id,
|
|
1759
2483
|
region: data.region
|
|
1760
2484
|
},
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
404: 'Expected transaction not found'
|
|
1764
|
-
}
|
|
2485
|
+
body: data.requestBody,
|
|
2486
|
+
mediaType: 'application/json'
|
|
1765
2487
|
});
|
|
1766
2488
|
}
|
|
2489
|
+
}
|
|
1767
2490
|
|
|
2491
|
+
export class RecurringRulesService {
|
|
1768
2492
|
/**
|
|
1769
|
-
*
|
|
1770
|
-
*
|
|
2493
|
+
* Create a new recurring rule
|
|
2494
|
+
* Creates a new recurring transaction rule for the authenticated user
|
|
1771
2495
|
* @param data The data for the request.
|
|
1772
|
-
* @param data.id Expected transaction ID
|
|
1773
2496
|
* @param data.region Region code for tenant context
|
|
1774
2497
|
* @param data.requestBody
|
|
1775
|
-
* @returns
|
|
2498
|
+
* @returns RecurringRuleResponseDto Rule created successfully
|
|
1776
2499
|
* @throws ApiError
|
|
1777
2500
|
*/
|
|
1778
|
-
public static
|
|
1779
|
-
data:
|
|
1780
|
-
): CancelablePromise<
|
|
2501
|
+
public static recurringRuleControllerCreate(
|
|
2502
|
+
data: RecurringRuleControllerCreateData
|
|
2503
|
+
): CancelablePromise<RecurringRuleControllerCreateResponse> {
|
|
1781
2504
|
return __request(OpenAPI, {
|
|
1782
2505
|
method: 'POST',
|
|
1783
|
-
url: '/api/v1/{region}/bean/
|
|
2506
|
+
url: '/api/v1/{region}/bean/recurring-rules',
|
|
1784
2507
|
path: {
|
|
1785
|
-
id: data.id,
|
|
1786
2508
|
region: data.region
|
|
1787
2509
|
},
|
|
1788
2510
|
body: data.requestBody,
|
|
1789
2511
|
mediaType: 'application/json',
|
|
1790
2512
|
errors: {
|
|
1791
|
-
400: '
|
|
1792
|
-
|
|
1793
|
-
409: 'Actual transaction already matched to another rule'
|
|
2513
|
+
400: 'Invalid input data (e.g., autoCreate without accounts)',
|
|
2514
|
+
409: 'Rule with same name already exists'
|
|
1794
2515
|
}
|
|
1795
2516
|
});
|
|
1796
2517
|
}
|
|
1797
2518
|
|
|
1798
2519
|
/**
|
|
1799
|
-
*
|
|
1800
|
-
*
|
|
2520
|
+
* List recurring rules
|
|
2521
|
+
* Returns all recurring rules for the authenticated user with optional filtering
|
|
1801
2522
|
* @param data The data for the request.
|
|
1802
|
-
* @param data.id Expected transaction ID
|
|
1803
2523
|
* @param data.region Region code for tenant context
|
|
1804
|
-
* @
|
|
2524
|
+
* @param data.isActive Filter by active status
|
|
2525
|
+
* @param data.frequency Filter by frequency (WEEKLY, MONTHLY, etc.)
|
|
2526
|
+
* @param data.hasAutoCreate Filter by autoCreate enabled
|
|
2527
|
+
* @returns RecurringRuleResponseDto Rules retrieved successfully
|
|
1805
2528
|
* @throws ApiError
|
|
1806
2529
|
*/
|
|
1807
|
-
public static
|
|
1808
|
-
data:
|
|
1809
|
-
): CancelablePromise<
|
|
2530
|
+
public static recurringRuleControllerFindAll(
|
|
2531
|
+
data: RecurringRuleControllerFindAllData
|
|
2532
|
+
): CancelablePromise<RecurringRuleControllerFindAllResponse> {
|
|
1810
2533
|
return __request(OpenAPI, {
|
|
1811
|
-
method: '
|
|
1812
|
-
url: '/api/v1/{region}/bean/
|
|
2534
|
+
method: 'GET',
|
|
2535
|
+
url: '/api/v1/{region}/bean/recurring-rules',
|
|
1813
2536
|
path: {
|
|
1814
|
-
id: data.id,
|
|
1815
2537
|
region: data.region
|
|
1816
2538
|
},
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
2539
|
+
query: {
|
|
2540
|
+
isActive: data.isActive,
|
|
2541
|
+
frequency: data.frequency,
|
|
2542
|
+
hasAutoCreate: data.hasAutoCreate
|
|
1820
2543
|
}
|
|
1821
2544
|
});
|
|
1822
2545
|
}
|
|
1823
2546
|
|
|
1824
2547
|
/**
|
|
1825
|
-
*
|
|
1826
|
-
*
|
|
2548
|
+
* Create recurring rule from transaction
|
|
2549
|
+
* Auto-creates a recurring rule using transaction data. User only confirms frequency.
|
|
1827
2550
|
* @param data The data for the request.
|
|
1828
|
-
* @param data.
|
|
2551
|
+
* @param data.transactionId Source transaction ID
|
|
1829
2552
|
* @param data.region Region code for tenant context
|
|
1830
2553
|
* @param data.requestBody
|
|
1831
|
-
* @returns
|
|
2554
|
+
* @returns RecurringRuleResponseDto Rule created successfully
|
|
1832
2555
|
* @throws ApiError
|
|
1833
2556
|
*/
|
|
1834
|
-
public static
|
|
1835
|
-
data:
|
|
1836
|
-
): CancelablePromise<
|
|
2557
|
+
public static recurringRuleControllerCreateFromTransaction(
|
|
2558
|
+
data: RecurringRuleControllerCreateFromTransactionData
|
|
2559
|
+
): CancelablePromise<RecurringRuleControllerCreateFromTransactionResponse> {
|
|
1837
2560
|
return __request(OpenAPI, {
|
|
1838
2561
|
method: 'POST',
|
|
1839
|
-
url: '/api/v1/{region}/bean/
|
|
2562
|
+
url: '/api/v1/{region}/bean/recurring-rules/from-transaction/{transactionId}',
|
|
1840
2563
|
path: {
|
|
1841
|
-
|
|
2564
|
+
transactionId: data.transactionId,
|
|
1842
2565
|
region: data.region
|
|
1843
2566
|
},
|
|
1844
2567
|
body: data.requestBody,
|
|
1845
2568
|
mediaType: 'application/json',
|
|
1846
2569
|
errors: {
|
|
1847
|
-
|
|
1848
|
-
|
|
2570
|
+
404: 'Transaction not found',
|
|
2571
|
+
409: 'Rule with same name already exists or transaction already linked'
|
|
1849
2572
|
}
|
|
1850
2573
|
});
|
|
1851
2574
|
}
|
|
1852
|
-
}
|
|
1853
2575
|
|
|
1854
|
-
export class RecurringForecastService {
|
|
1855
2576
|
/**
|
|
1856
|
-
* Get
|
|
1857
|
-
* Returns
|
|
2577
|
+
* Get recurring rule by ID
|
|
2578
|
+
* Returns a specific recurring rule with its details
|
|
1858
2579
|
* @param data The data for the request.
|
|
2580
|
+
* @param data.id Rule ID
|
|
1859
2581
|
* @param data.region Region code for tenant context
|
|
1860
|
-
* @
|
|
1861
|
-
* @returns ForecastResponseDto Forecast retrieved successfully
|
|
2582
|
+
* @returns RecurringRuleResponseDto Rule retrieved successfully
|
|
1862
2583
|
* @throws ApiError
|
|
1863
2584
|
*/
|
|
1864
|
-
public static
|
|
1865
|
-
data:
|
|
1866
|
-
): CancelablePromise<
|
|
2585
|
+
public static recurringRuleControllerFindOne(
|
|
2586
|
+
data: RecurringRuleControllerFindOneData
|
|
2587
|
+
): CancelablePromise<RecurringRuleControllerFindOneResponse> {
|
|
1867
2588
|
return __request(OpenAPI, {
|
|
1868
2589
|
method: 'GET',
|
|
1869
|
-
url: '/api/v1/{region}/bean/recurring/
|
|
2590
|
+
url: '/api/v1/{region}/bean/recurring-rules/{id}',
|
|
1870
2591
|
path: {
|
|
2592
|
+
id: data.id,
|
|
1871
2593
|
region: data.region
|
|
1872
2594
|
},
|
|
1873
|
-
|
|
1874
|
-
|
|
2595
|
+
errors: {
|
|
2596
|
+
404: 'Rule not found'
|
|
1875
2597
|
}
|
|
1876
2598
|
});
|
|
1877
2599
|
}
|
|
1878
|
-
}
|
|
1879
2600
|
|
|
1880
|
-
export class BeanTransactionRulesService {
|
|
1881
2601
|
/**
|
|
1882
|
-
*
|
|
1883
|
-
*
|
|
2602
|
+
* Update recurring rule
|
|
2603
|
+
* Updates an existing recurring rule
|
|
1884
2604
|
* @param data The data for the request.
|
|
2605
|
+
* @param data.id Rule ID
|
|
1885
2606
|
* @param data.region Region code for tenant context
|
|
1886
2607
|
* @param data.requestBody
|
|
1887
|
-
* @returns
|
|
2608
|
+
* @returns RecurringRuleResponseDto Rule updated successfully
|
|
1888
2609
|
* @throws ApiError
|
|
1889
2610
|
*/
|
|
1890
|
-
public static
|
|
1891
|
-
data:
|
|
1892
|
-
): CancelablePromise<
|
|
2611
|
+
public static recurringRuleControllerUpdate(
|
|
2612
|
+
data: RecurringRuleControllerUpdateData
|
|
2613
|
+
): CancelablePromise<RecurringRuleControllerUpdateResponse> {
|
|
1893
2614
|
return __request(OpenAPI, {
|
|
1894
|
-
method: '
|
|
1895
|
-
url: '/api/v1/{region}/bean/
|
|
2615
|
+
method: 'PATCH',
|
|
2616
|
+
url: '/api/v1/{region}/bean/recurring-rules/{id}',
|
|
1896
2617
|
path: {
|
|
2618
|
+
id: data.id,
|
|
1897
2619
|
region: data.region
|
|
1898
2620
|
},
|
|
1899
2621
|
body: data.requestBody,
|
|
1900
2622
|
mediaType: 'application/json',
|
|
1901
2623
|
errors: {
|
|
1902
|
-
400: '
|
|
1903
|
-
|
|
1904
|
-
409: 'Resource conflict - another process is updating this rule'
|
|
2624
|
+
400: 'Invalid input data',
|
|
2625
|
+
404: 'Rule not found'
|
|
1905
2626
|
}
|
|
1906
2627
|
});
|
|
1907
2628
|
}
|
|
1908
2629
|
|
|
1909
2630
|
/**
|
|
1910
|
-
*
|
|
2631
|
+
* Delete recurring rule
|
|
2632
|
+
* Soft deletes a recurring rule (sets isActive to false)
|
|
1911
2633
|
* @param data The data for the request.
|
|
2634
|
+
* @param data.id Rule ID
|
|
1912
2635
|
* @param data.region Region code for tenant context
|
|
1913
|
-
* @
|
|
1914
|
-
* @param data.offset Pagination offset (default: 0)
|
|
1915
|
-
* @param data.enabled Filter by enabled status
|
|
1916
|
-
* @param data.learningSource Filter by learning source. Omit this parameter or pass empty string to get manually created rules (learningSource is null in database).
|
|
1917
|
-
* @param data.autoApplyEnabled Filter by auto-apply status
|
|
1918
|
-
* @returns TransactionRuleListResponseDto List of rules
|
|
2636
|
+
* @returns void Rule deleted successfully
|
|
1919
2637
|
* @throws ApiError
|
|
1920
2638
|
*/
|
|
1921
|
-
public static
|
|
1922
|
-
data:
|
|
1923
|
-
): CancelablePromise<
|
|
2639
|
+
public static recurringRuleControllerDelete(
|
|
2640
|
+
data: RecurringRuleControllerDeleteData
|
|
2641
|
+
): CancelablePromise<RecurringRuleControllerDeleteResponse> {
|
|
1924
2642
|
return __request(OpenAPI, {
|
|
1925
|
-
method: '
|
|
1926
|
-
url: '/api/v1/{region}/bean/
|
|
2643
|
+
method: 'DELETE',
|
|
2644
|
+
url: '/api/v1/{region}/bean/recurring-rules/{id}',
|
|
1927
2645
|
path: {
|
|
2646
|
+
id: data.id,
|
|
1928
2647
|
region: data.region
|
|
1929
2648
|
},
|
|
1930
|
-
query: {
|
|
1931
|
-
limit: data.limit,
|
|
1932
|
-
offset: data.offset,
|
|
1933
|
-
enabled: data.enabled,
|
|
1934
|
-
learningSource: data.learningSource,
|
|
1935
|
-
autoApplyEnabled: data.autoApplyEnabled
|
|
1936
|
-
},
|
|
1937
2649
|
errors: {
|
|
1938
|
-
|
|
2650
|
+
404: 'Rule not found'
|
|
1939
2651
|
}
|
|
1940
2652
|
});
|
|
1941
2653
|
}
|
|
1942
2654
|
|
|
1943
2655
|
/**
|
|
1944
|
-
*
|
|
2656
|
+
* Get rule with statistics
|
|
2657
|
+
* Returns a rule with pending/overdue counts and next expected date
|
|
1945
2658
|
* @param data The data for the request.
|
|
2659
|
+
* @param data.id Rule ID
|
|
1946
2660
|
* @param data.region Region code for tenant context
|
|
1947
|
-
* @
|
|
1948
|
-
* @returns ValidateRuleResponseDto Validation result
|
|
2661
|
+
* @returns RecurringRuleWithStatsResponseDto Rule with stats retrieved successfully
|
|
1949
2662
|
* @throws ApiError
|
|
1950
2663
|
*/
|
|
1951
|
-
public static
|
|
1952
|
-
data:
|
|
1953
|
-
): CancelablePromise<
|
|
2664
|
+
public static recurringRuleControllerGetWithStats(
|
|
2665
|
+
data: RecurringRuleControllerGetWithStatsData
|
|
2666
|
+
): CancelablePromise<RecurringRuleControllerGetWithStatsResponse> {
|
|
1954
2667
|
return __request(OpenAPI, {
|
|
1955
|
-
method: '
|
|
1956
|
-
url: '/api/v1/{region}/bean/
|
|
2668
|
+
method: 'GET',
|
|
2669
|
+
url: '/api/v1/{region}/bean/recurring-rules/{id}/stats',
|
|
1957
2670
|
path: {
|
|
2671
|
+
id: data.id,
|
|
1958
2672
|
region: data.region
|
|
1959
2673
|
},
|
|
1960
|
-
body: data.requestBody,
|
|
1961
|
-
mediaType: 'application/json',
|
|
1962
2674
|
errors: {
|
|
1963
|
-
|
|
1964
|
-
401: 'Unauthorized'
|
|
2675
|
+
404: 'Rule not found'
|
|
1965
2676
|
}
|
|
1966
2677
|
});
|
|
1967
2678
|
}
|
|
2679
|
+
}
|
|
1968
2680
|
|
|
2681
|
+
export class ExpectedTransactionsService {
|
|
1969
2682
|
/**
|
|
1970
|
-
*
|
|
2683
|
+
* List expected transactions
|
|
2684
|
+
* Returns expected transactions for the authenticated user with optional filtering
|
|
1971
2685
|
* @param data The data for the request.
|
|
1972
2686
|
* @param data.region Region code for tenant context
|
|
1973
|
-
* @param data.
|
|
1974
|
-
* @
|
|
2687
|
+
* @param data.ruleId Filter by recurring rule ID
|
|
2688
|
+
* @param data.status Filter by status (PENDING, COMPLETED, SKIPPED)
|
|
2689
|
+
* @param data.fromDate Filter by date range start (YYYY-MM-DD)
|
|
2690
|
+
* @param data.toDate Filter by date range end (YYYY-MM-DD)
|
|
2691
|
+
* @returns ExpectedTransactionListResponseDto Expected transactions retrieved successfully
|
|
1975
2692
|
* @throws ApiError
|
|
1976
2693
|
*/
|
|
1977
|
-
public static
|
|
1978
|
-
data:
|
|
1979
|
-
): CancelablePromise<
|
|
2694
|
+
public static expectedTransactionControllerFindAll(
|
|
2695
|
+
data: ExpectedTransactionControllerFindAllData
|
|
2696
|
+
): CancelablePromise<ExpectedTransactionControllerFindAllResponse> {
|
|
1980
2697
|
return __request(OpenAPI, {
|
|
1981
|
-
method: '
|
|
1982
|
-
url: '/api/v1/{region}/bean/
|
|
2698
|
+
method: 'GET',
|
|
2699
|
+
url: '/api/v1/{region}/bean/expected-transactions',
|
|
1983
2700
|
path: {
|
|
1984
2701
|
region: data.region
|
|
1985
2702
|
},
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
2703
|
+
query: {
|
|
2704
|
+
ruleId: data.ruleId,
|
|
2705
|
+
status: data.status,
|
|
2706
|
+
fromDate: data.fromDate,
|
|
2707
|
+
toDate: data.toDate
|
|
1991
2708
|
}
|
|
1992
2709
|
});
|
|
1993
2710
|
}
|
|
1994
2711
|
|
|
1995
2712
|
/**
|
|
1996
|
-
*
|
|
2713
|
+
* List overdue expected transactions
|
|
2714
|
+
* Returns all overdue expected transactions (PENDING past tolerance)
|
|
1997
2715
|
* @param data The data for the request.
|
|
1998
|
-
* @param data.format Export format (currently only JSON supported)
|
|
1999
2716
|
* @param data.region Region code for tenant context
|
|
2000
|
-
* @returns
|
|
2717
|
+
* @returns ExpectedTransactionListResponseDto Overdue transactions retrieved successfully
|
|
2001
2718
|
* @throws ApiError
|
|
2002
2719
|
*/
|
|
2003
|
-
public static
|
|
2004
|
-
data:
|
|
2005
|
-
): CancelablePromise<
|
|
2720
|
+
public static expectedTransactionControllerFindOverdue(
|
|
2721
|
+
data: ExpectedTransactionControllerFindOverdueData
|
|
2722
|
+
): CancelablePromise<ExpectedTransactionControllerFindOverdueResponse> {
|
|
2006
2723
|
return __request(OpenAPI, {
|
|
2007
2724
|
method: 'GET',
|
|
2008
|
-
url: '/api/v1/{region}/bean/
|
|
2725
|
+
url: '/api/v1/{region}/bean/expected-transactions/overdue',
|
|
2726
|
+
path: {
|
|
2727
|
+
region: data.region
|
|
2728
|
+
}
|
|
2729
|
+
});
|
|
2730
|
+
}
|
|
2731
|
+
|
|
2732
|
+
/**
|
|
2733
|
+
* Get expected transaction by ID
|
|
2734
|
+
* Returns a specific expected transaction with rule details
|
|
2735
|
+
* @param data The data for the request.
|
|
2736
|
+
* @param data.id Expected transaction ID
|
|
2737
|
+
* @param data.region Region code for tenant context
|
|
2738
|
+
* @returns ExpectedTransactionResponseDto Expected transaction retrieved successfully
|
|
2739
|
+
* @throws ApiError
|
|
2740
|
+
*/
|
|
2741
|
+
public static expectedTransactionControllerFindOne(
|
|
2742
|
+
data: ExpectedTransactionControllerFindOneData
|
|
2743
|
+
): CancelablePromise<ExpectedTransactionControllerFindOneResponse> {
|
|
2744
|
+
return __request(OpenAPI, {
|
|
2745
|
+
method: 'GET',
|
|
2746
|
+
url: '/api/v1/{region}/bean/expected-transactions/{id}',
|
|
2009
2747
|
path: {
|
|
2010
|
-
|
|
2748
|
+
id: data.id,
|
|
2011
2749
|
region: data.region
|
|
2012
2750
|
},
|
|
2013
2751
|
errors: {
|
|
2014
|
-
|
|
2015
|
-
401: 'Unauthorized'
|
|
2752
|
+
404: 'Expected transaction not found'
|
|
2016
2753
|
}
|
|
2017
2754
|
});
|
|
2018
2755
|
}
|
|
2019
2756
|
|
|
2020
2757
|
/**
|
|
2021
|
-
*
|
|
2758
|
+
* Skip expected transaction
|
|
2759
|
+
* Marks an expected transaction as skipped (PENDING -> SKIPPED)
|
|
2022
2760
|
* @param data The data for the request.
|
|
2023
|
-
* @param data.
|
|
2761
|
+
* @param data.id Expected transaction ID
|
|
2024
2762
|
* @param data.region Region code for tenant context
|
|
2025
|
-
* @returns
|
|
2763
|
+
* @returns ExpectedTransactionResponseDto Expected transaction skipped successfully
|
|
2026
2764
|
* @throws ApiError
|
|
2027
2765
|
*/
|
|
2028
|
-
public static
|
|
2029
|
-
data:
|
|
2030
|
-
): CancelablePromise<
|
|
2766
|
+
public static expectedTransactionControllerSkip(
|
|
2767
|
+
data: ExpectedTransactionControllerSkipData
|
|
2768
|
+
): CancelablePromise<ExpectedTransactionControllerSkipResponse> {
|
|
2031
2769
|
return __request(OpenAPI, {
|
|
2032
|
-
method: '
|
|
2033
|
-
url: '/api/v1/{region}/bean/
|
|
2770
|
+
method: 'POST',
|
|
2771
|
+
url: '/api/v1/{region}/bean/expected-transactions/{id}/skip',
|
|
2034
2772
|
path: {
|
|
2035
|
-
|
|
2773
|
+
id: data.id,
|
|
2036
2774
|
region: data.region
|
|
2037
2775
|
},
|
|
2038
2776
|
errors: {
|
|
2039
|
-
|
|
2777
|
+
400: 'Cannot skip - not in PENDING status',
|
|
2778
|
+
404: 'Expected transaction not found'
|
|
2040
2779
|
}
|
|
2041
2780
|
});
|
|
2042
2781
|
}
|
|
2043
2782
|
|
|
2044
2783
|
/**
|
|
2045
|
-
*
|
|
2784
|
+
* Undo skip
|
|
2785
|
+
* Reverses a skip operation (SKIPPED -> PENDING)
|
|
2046
2786
|
* @param data The data for the request.
|
|
2047
|
-
* @param data.
|
|
2787
|
+
* @param data.id Expected transaction ID
|
|
2048
2788
|
* @param data.region Region code for tenant context
|
|
2049
|
-
* @returns
|
|
2789
|
+
* @returns void Skip undone successfully
|
|
2050
2790
|
* @throws ApiError
|
|
2051
2791
|
*/
|
|
2052
|
-
public static
|
|
2053
|
-
data:
|
|
2054
|
-
): CancelablePromise<
|
|
2792
|
+
public static expectedTransactionControllerUndoSkip(
|
|
2793
|
+
data: ExpectedTransactionControllerUndoSkipData
|
|
2794
|
+
): CancelablePromise<ExpectedTransactionControllerUndoSkipResponse> {
|
|
2055
2795
|
return __request(OpenAPI, {
|
|
2056
|
-
method: '
|
|
2057
|
-
url: '/api/v1/{region}/bean/
|
|
2796
|
+
method: 'DELETE',
|
|
2797
|
+
url: '/api/v1/{region}/bean/expected-transactions/{id}/skip',
|
|
2058
2798
|
path: {
|
|
2059
|
-
|
|
2799
|
+
id: data.id,
|
|
2060
2800
|
region: data.region
|
|
2061
2801
|
},
|
|
2062
2802
|
errors: {
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
404: 'Rule not found'
|
|
2803
|
+
400: 'Cannot undo - not in SKIPPED status',
|
|
2804
|
+
404: 'Expected transaction not found'
|
|
2066
2805
|
}
|
|
2067
2806
|
});
|
|
2068
2807
|
}
|
|
2069
2808
|
|
|
2070
2809
|
/**
|
|
2071
|
-
*
|
|
2810
|
+
* Confirm transaction match
|
|
2811
|
+
* Manually matches an expected transaction with an actual transaction
|
|
2072
2812
|
* @param data The data for the request.
|
|
2073
|
-
* @param data.
|
|
2813
|
+
* @param data.id Expected transaction ID
|
|
2074
2814
|
* @param data.region Region code for tenant context
|
|
2075
2815
|
* @param data.requestBody
|
|
2076
|
-
* @returns
|
|
2816
|
+
* @returns unknown Match confirmed successfully
|
|
2077
2817
|
* @throws ApiError
|
|
2078
2818
|
*/
|
|
2079
|
-
public static
|
|
2080
|
-
data:
|
|
2081
|
-
): CancelablePromise<
|
|
2819
|
+
public static expectedTransactionControllerConfirmMatch(
|
|
2820
|
+
data: ExpectedTransactionControllerConfirmMatchData
|
|
2821
|
+
): CancelablePromise<ExpectedTransactionControllerConfirmMatchResponse> {
|
|
2082
2822
|
return __request(OpenAPI, {
|
|
2083
|
-
method: '
|
|
2084
|
-
url: '/api/v1/{region}/bean/
|
|
2823
|
+
method: 'POST',
|
|
2824
|
+
url: '/api/v1/{region}/bean/expected-transactions/{id}/match',
|
|
2085
2825
|
path: {
|
|
2086
|
-
|
|
2826
|
+
id: data.id,
|
|
2087
2827
|
region: data.region
|
|
2088
2828
|
},
|
|
2089
2829
|
body: data.requestBody,
|
|
2090
2830
|
mediaType: 'application/json',
|
|
2091
2831
|
errors: {
|
|
2092
|
-
400: '
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
404: 'Rule not found',
|
|
2096
|
-
409: 'Resource conflict - rule is being modified by another process'
|
|
2832
|
+
400: 'Cannot match - not in PENDING status',
|
|
2833
|
+
404: 'Expected or actual transaction not found',
|
|
2834
|
+
409: 'Actual transaction already matched to another rule'
|
|
2097
2835
|
}
|
|
2098
2836
|
});
|
|
2099
2837
|
}
|
|
2100
2838
|
|
|
2101
2839
|
/**
|
|
2102
|
-
*
|
|
2840
|
+
* Unmatch transaction
|
|
2841
|
+
* Removes the match between expected and actual transaction (COMPLETED -> PENDING)
|
|
2103
2842
|
* @param data The data for the request.
|
|
2104
|
-
* @param data.
|
|
2843
|
+
* @param data.id Expected transaction ID
|
|
2105
2844
|
* @param data.region Region code for tenant context
|
|
2106
|
-
* @returns void
|
|
2845
|
+
* @returns void Match removed successfully
|
|
2107
2846
|
* @throws ApiError
|
|
2108
2847
|
*/
|
|
2109
|
-
public static
|
|
2110
|
-
data:
|
|
2111
|
-
): CancelablePromise<
|
|
2848
|
+
public static expectedTransactionControllerUnmatch(
|
|
2849
|
+
data: ExpectedTransactionControllerUnmatchData
|
|
2850
|
+
): CancelablePromise<ExpectedTransactionControllerUnmatchResponse> {
|
|
2112
2851
|
return __request(OpenAPI, {
|
|
2113
2852
|
method: 'DELETE',
|
|
2114
|
-
url: '/api/v1/{region}/bean/
|
|
2853
|
+
url: '/api/v1/{region}/bean/expected-transactions/{id}/match',
|
|
2115
2854
|
path: {
|
|
2116
|
-
|
|
2855
|
+
id: data.id,
|
|
2117
2856
|
region: data.region
|
|
2118
2857
|
},
|
|
2119
2858
|
errors: {
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
404: 'Rule not found',
|
|
2123
|
-
409: 'Resource conflict - rule is being modified by another process'
|
|
2859
|
+
400: 'Cannot unmatch - not in COMPLETED status',
|
|
2860
|
+
404: 'Expected transaction not found'
|
|
2124
2861
|
}
|
|
2125
2862
|
});
|
|
2126
2863
|
}
|
|
2127
2864
|
|
|
2128
2865
|
/**
|
|
2129
|
-
*
|
|
2866
|
+
* Enter Now
|
|
2867
|
+
* Creates an actual transaction for an expected transaction (YNAB-style Enter Now)
|
|
2130
2868
|
* @param data The data for the request.
|
|
2131
|
-
* @param data.
|
|
2869
|
+
* @param data.id Expected transaction ID
|
|
2132
2870
|
* @param data.region Region code for tenant context
|
|
2133
2871
|
* @param data.requestBody
|
|
2134
|
-
* @returns
|
|
2872
|
+
* @returns unknown Transaction created successfully
|
|
2135
2873
|
* @throws ApiError
|
|
2136
2874
|
*/
|
|
2137
|
-
public static
|
|
2138
|
-
data:
|
|
2139
|
-
): CancelablePromise<
|
|
2875
|
+
public static expectedTransactionControllerEnterNow(
|
|
2876
|
+
data: ExpectedTransactionControllerEnterNowData
|
|
2877
|
+
): CancelablePromise<ExpectedTransactionControllerEnterNowResponse> {
|
|
2140
2878
|
return __request(OpenAPI, {
|
|
2141
2879
|
method: 'POST',
|
|
2142
|
-
url: '/api/v1/{region}/bean/
|
|
2880
|
+
url: '/api/v1/{region}/bean/expected-transactions/{id}/enter',
|
|
2143
2881
|
path: {
|
|
2144
|
-
|
|
2882
|
+
id: data.id,
|
|
2145
2883
|
region: data.region
|
|
2146
2884
|
},
|
|
2147
2885
|
body: data.requestBody,
|
|
2148
2886
|
mediaType: 'application/json',
|
|
2149
2887
|
errors: {
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
404: 'Rule not found'
|
|
2888
|
+
400: 'Cannot enter - not in PENDING status or missing accounts',
|
|
2889
|
+
404: 'Expected transaction or accounts not found'
|
|
2153
2890
|
}
|
|
2154
2891
|
});
|
|
2155
2892
|
}
|
|
2156
2893
|
}
|
|
2157
2894
|
|
|
2158
|
-
export class
|
|
2895
|
+
export class RecurringForecastService {
|
|
2159
2896
|
/**
|
|
2160
|
-
*
|
|
2897
|
+
* Get cash flow forecast
|
|
2898
|
+
* Returns predicted outflows for the next N months based on active recurring rules
|
|
2161
2899
|
* @param data The data for the request.
|
|
2162
|
-
* @param data.
|
|
2163
|
-
* @
|
|
2900
|
+
* @param data.region Region code for tenant context
|
|
2901
|
+
* @param data.months Number of months to forecast (1-12, default 3)
|
|
2902
|
+
* @returns ForecastResponseDto Forecast retrieved successfully
|
|
2164
2903
|
* @throws ApiError
|
|
2165
2904
|
*/
|
|
2166
|
-
public static
|
|
2167
|
-
data:
|
|
2168
|
-
): CancelablePromise<
|
|
2905
|
+
public static forecastControllerGetForecast(
|
|
2906
|
+
data: ForecastControllerGetForecastData
|
|
2907
|
+
): CancelablePromise<ForecastControllerGetForecastResponse> {
|
|
2169
2908
|
return __request(OpenAPI, {
|
|
2170
|
-
method: '
|
|
2171
|
-
url: '/api/v1/
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2909
|
+
method: 'GET',
|
|
2910
|
+
url: '/api/v1/{region}/bean/recurring/forecast',
|
|
2911
|
+
path: {
|
|
2912
|
+
region: data.region
|
|
2913
|
+
},
|
|
2914
|
+
query: {
|
|
2915
|
+
months: data.months
|
|
2176
2916
|
}
|
|
2177
2917
|
});
|
|
2178
2918
|
}
|
|
2919
|
+
}
|
|
2179
2920
|
|
|
2921
|
+
export class BeanCategoryCatalogService {
|
|
2180
2922
|
/**
|
|
2181
|
-
*
|
|
2923
|
+
* List category catalog for a region
|
|
2924
|
+
* Returns the region-scoped category slugs (expense/income/investment/banking/transfer/payment) for the NLP result picker, each with the categoryAccount paths the region-enabled system rules map it to (#816). CN-exclusive payment instruments (huabei/baitiao) appear only under /cn.
|
|
2182
2925
|
* @param data The data for the request.
|
|
2183
|
-
* @param data.
|
|
2184
|
-
* @
|
|
2926
|
+
* @param data.region Region code for tenant context
|
|
2927
|
+
* @param data.scenario Filter by scenario
|
|
2928
|
+
* @param data.routeBearing Filter by routeBearing (entity-router route() consumes it)
|
|
2929
|
+
* @returns CategoryCatalogListResponseDto Category catalog retrieved successfully
|
|
2185
2930
|
* @throws ApiError
|
|
2186
2931
|
*/
|
|
2187
|
-
public static
|
|
2188
|
-
data:
|
|
2189
|
-
): CancelablePromise<
|
|
2932
|
+
public static categoryCatalogControllerList(
|
|
2933
|
+
data: CategoryCatalogControllerListData
|
|
2934
|
+
): CancelablePromise<CategoryCatalogControllerListResponse> {
|
|
2190
2935
|
return __request(OpenAPI, {
|
|
2191
2936
|
method: 'GET',
|
|
2192
|
-
url: '/api/v1/
|
|
2193
|
-
|
|
2194
|
-
|
|
2937
|
+
url: '/api/v1/{region}/bean/categories',
|
|
2938
|
+
path: {
|
|
2939
|
+
region: data.region
|
|
2940
|
+
},
|
|
2941
|
+
query: {
|
|
2942
|
+
scenario: data.scenario,
|
|
2943
|
+
routeBearing: data.routeBearing
|
|
2195
2944
|
}
|
|
2196
2945
|
});
|
|
2197
2946
|
}
|
|
2947
|
+
}
|
|
2198
2948
|
|
|
2949
|
+
export class LifeEventsService {
|
|
2199
2950
|
/**
|
|
2200
|
-
*
|
|
2201
|
-
*
|
|
2951
|
+
* Create a new life event
|
|
2952
|
+
* Creates a new life event entry for the authenticated user. Returns ETag header carrying the row updatedAt.
|
|
2202
2953
|
* @param data The data for the request.
|
|
2954
|
+
* @param data.region Region code for tenant context (decorative for life events)
|
|
2203
2955
|
* @param data.requestBody
|
|
2204
|
-
* @returns
|
|
2956
|
+
* @returns EventResponseDto Life event created successfully
|
|
2205
2957
|
* @throws ApiError
|
|
2206
2958
|
*/
|
|
2207
|
-
public static
|
|
2208
|
-
data:
|
|
2209
|
-
): CancelablePromise<
|
|
2959
|
+
public static eventControllerCreate(
|
|
2960
|
+
data: EventControllerCreateData
|
|
2961
|
+
): CancelablePromise<EventControllerCreateResponse> {
|
|
2210
2962
|
return __request(OpenAPI, {
|
|
2211
2963
|
method: 'POST',
|
|
2212
|
-
url: '/api/v1/
|
|
2964
|
+
url: '/api/v1/{region}/bean/events',
|
|
2965
|
+
path: {
|
|
2966
|
+
region: data.region
|
|
2967
|
+
},
|
|
2213
2968
|
body: data.requestBody,
|
|
2214
2969
|
mediaType: 'application/json',
|
|
2215
2970
|
errors: {
|
|
2216
|
-
|
|
2217
|
-
403: 'User signup is disabled'
|
|
2971
|
+
409: 'Life event already exists for this (userId, type, date) combination'
|
|
2218
2972
|
}
|
|
2219
2973
|
});
|
|
2220
2974
|
}
|
|
2221
2975
|
|
|
2222
2976
|
/**
|
|
2223
|
-
*
|
|
2977
|
+
* List user life events
|
|
2978
|
+
* Returns life events for the authenticated user with optional filtering by type, description search, and date range.
|
|
2224
2979
|
* @param data The data for the request.
|
|
2225
|
-
* @param data.
|
|
2226
|
-
* @
|
|
2980
|
+
* @param data.region Region code for tenant context (decorative for life events)
|
|
2981
|
+
* @param data.type Filter by life event type (exact match)
|
|
2982
|
+
* @param data.q Search term for description (case-insensitive partial match)
|
|
2983
|
+
* @param data.from Filter life events from this date (ISO 8601 format)
|
|
2984
|
+
* @param data.to Filter life events to this date (ISO 8601 format)
|
|
2985
|
+
* @param data.page Page number for pagination (default: 1)
|
|
2986
|
+
* @param data.limit Number of items per page (default: 20, max: 100)
|
|
2987
|
+
* @returns EventListResponseDto Life events retrieved successfully
|
|
2227
2988
|
* @throws ApiError
|
|
2228
2989
|
*/
|
|
2229
|
-
public static
|
|
2230
|
-
data:
|
|
2231
|
-
): CancelablePromise<
|
|
2990
|
+
public static eventControllerFindAll(
|
|
2991
|
+
data: EventControllerFindAllData
|
|
2992
|
+
): CancelablePromise<EventControllerFindAllResponse> {
|
|
2232
2993
|
return __request(OpenAPI, {
|
|
2233
|
-
method: '
|
|
2234
|
-
url: '/api/v1/
|
|
2994
|
+
method: 'GET',
|
|
2995
|
+
url: '/api/v1/{region}/bean/events',
|
|
2235
2996
|
path: {
|
|
2236
|
-
|
|
2997
|
+
region: data.region
|
|
2237
2998
|
},
|
|
2238
|
-
|
|
2239
|
-
|
|
2999
|
+
query: {
|
|
3000
|
+
type: data.type,
|
|
3001
|
+
q: data.q,
|
|
3002
|
+
from: data.from,
|
|
3003
|
+
to: data.to,
|
|
3004
|
+
page: data.page,
|
|
3005
|
+
limit: data.limit
|
|
2240
3006
|
}
|
|
2241
3007
|
});
|
|
2242
3008
|
}
|
|
2243
3009
|
|
|
2244
3010
|
/**
|
|
2245
|
-
* Get
|
|
3011
|
+
* Get life event by ID
|
|
3012
|
+
* Returns a single life event by its ID. Returns ETag header.
|
|
2246
3013
|
* @param data The data for the request.
|
|
2247
|
-
* @param data.id
|
|
2248
|
-
* @
|
|
3014
|
+
* @param data.id Life event ID
|
|
3015
|
+
* @param data.region Region code for tenant context (decorative for life events)
|
|
3016
|
+
* @returns EventResponseDto Life event retrieved successfully
|
|
2249
3017
|
* @throws ApiError
|
|
2250
3018
|
*/
|
|
2251
|
-
public static
|
|
2252
|
-
data:
|
|
2253
|
-
): CancelablePromise<
|
|
3019
|
+
public static eventControllerFindOne(
|
|
3020
|
+
data: EventControllerFindOneData
|
|
3021
|
+
): CancelablePromise<EventControllerFindOneResponse> {
|
|
2254
3022
|
return __request(OpenAPI, {
|
|
2255
3023
|
method: 'GET',
|
|
2256
|
-
url: '/api/v1/
|
|
3024
|
+
url: '/api/v1/{region}/bean/events/{id}',
|
|
2257
3025
|
path: {
|
|
2258
|
-
id: data.id
|
|
3026
|
+
id: data.id,
|
|
3027
|
+
region: data.region
|
|
2259
3028
|
},
|
|
2260
3029
|
errors: {
|
|
2261
|
-
|
|
3030
|
+
404: 'Life event not found'
|
|
2262
3031
|
}
|
|
2263
3032
|
});
|
|
2264
3033
|
}
|
|
2265
3034
|
|
|
2266
3035
|
/**
|
|
2267
|
-
* Update
|
|
3036
|
+
* Update a life event
|
|
3037
|
+
* Updates an existing life event. If If-Match header is provided, performs optimistic concurrency check; mismatched updatedAt returns 412.
|
|
2268
3038
|
* @param data The data for the request.
|
|
3039
|
+
* @param data.id Life event ID
|
|
3040
|
+
* @param data.region Region code for tenant context (decorative for life events)
|
|
2269
3041
|
* @param data.requestBody
|
|
2270
|
-
* @returns
|
|
3042
|
+
* @returns EventResponseDto Life event updated successfully
|
|
2271
3043
|
* @throws ApiError
|
|
2272
3044
|
*/
|
|
2273
|
-
public static
|
|
2274
|
-
data:
|
|
2275
|
-
): CancelablePromise<
|
|
3045
|
+
public static eventControllerUpdate(
|
|
3046
|
+
data: EventControllerUpdateData
|
|
3047
|
+
): CancelablePromise<EventControllerUpdateResponse> {
|
|
2276
3048
|
return __request(OpenAPI, {
|
|
2277
3049
|
method: 'PUT',
|
|
2278
|
-
url: '/api/v1/
|
|
3050
|
+
url: '/api/v1/{region}/bean/events/{id}',
|
|
3051
|
+
path: {
|
|
3052
|
+
id: data.id,
|
|
3053
|
+
region: data.region
|
|
3054
|
+
},
|
|
2279
3055
|
body: data.requestBody,
|
|
2280
3056
|
mediaType: 'application/json',
|
|
2281
3057
|
errors: {
|
|
2282
|
-
|
|
3058
|
+
400: 'If-Match header is not a valid ISO 8601 date',
|
|
3059
|
+
404: 'Life event not found',
|
|
3060
|
+
409: 'Updated event conflicts with an existing (userId, type, date) combination',
|
|
3061
|
+
412: 'If-Match precondition failed (updatedAt mismatch)'
|
|
2283
3062
|
}
|
|
2284
3063
|
});
|
|
2285
3064
|
}
|
|
2286
3065
|
|
|
2287
3066
|
/**
|
|
2288
|
-
*
|
|
3067
|
+
* Delete a life event
|
|
3068
|
+
* Deletes a life event entry (hard delete). Returns 204.
|
|
2289
3069
|
* @param data The data for the request.
|
|
2290
|
-
* @param data.
|
|
2291
|
-
* @param data.
|
|
2292
|
-
* @returns
|
|
3070
|
+
* @param data.id Life event ID
|
|
3071
|
+
* @param data.region Region code for tenant context (decorative for life events)
|
|
3072
|
+
* @returns void Life event deleted successfully
|
|
2293
3073
|
* @throws ApiError
|
|
2294
3074
|
*/
|
|
2295
|
-
public static
|
|
2296
|
-
data:
|
|
2297
|
-
): CancelablePromise<
|
|
3075
|
+
public static eventControllerDelete(
|
|
3076
|
+
data: EventControllerDeleteData
|
|
3077
|
+
): CancelablePromise<EventControllerDeleteResponse> {
|
|
3078
|
+
return __request(OpenAPI, {
|
|
3079
|
+
method: 'DELETE',
|
|
3080
|
+
url: '/api/v1/{region}/bean/events/{id}',
|
|
3081
|
+
path: {
|
|
3082
|
+
id: data.id,
|
|
3083
|
+
region: data.region
|
|
3084
|
+
},
|
|
3085
|
+
errors: {
|
|
3086
|
+
404: 'Life event not found'
|
|
3087
|
+
}
|
|
3088
|
+
});
|
|
3089
|
+
}
|
|
3090
|
+
|
|
3091
|
+
/**
|
|
3092
|
+
* Slice time-series by a life event (Phase 79)
|
|
3093
|
+
* Returns aggregated time-series for postings matching accountPattern within the half-open date range of the given life event.
|
|
3094
|
+
* @param data The data for the request.
|
|
3095
|
+
* @param data.id Life event ID
|
|
3096
|
+
* @param data.accountPattern
|
|
3097
|
+
* @param data.granularity
|
|
3098
|
+
* @param data.region Region code for tenant context (decorative for life events)
|
|
3099
|
+
* @returns unknown Time-series sliced by the life event range
|
|
3100
|
+
* @throws ApiError
|
|
3101
|
+
*/
|
|
3102
|
+
public static eventControllerGetSlice(
|
|
3103
|
+
data: EventControllerGetSliceData
|
|
3104
|
+
): CancelablePromise<EventControllerGetSliceResponse> {
|
|
2298
3105
|
return __request(OpenAPI, {
|
|
2299
3106
|
method: 'GET',
|
|
2300
|
-
url: '/api/v1/
|
|
3107
|
+
url: '/api/v1/{region}/bean/events/{id}/slice',
|
|
3108
|
+
path: {
|
|
3109
|
+
id: data.id,
|
|
3110
|
+
region: data.region
|
|
3111
|
+
},
|
|
2301
3112
|
query: {
|
|
2302
|
-
|
|
2303
|
-
|
|
3113
|
+
accountPattern: data.accountPattern,
|
|
3114
|
+
granularity: data.granularity
|
|
3115
|
+
},
|
|
3116
|
+
errors: {
|
|
3117
|
+
400: 'accountPattern query param is empty',
|
|
3118
|
+
404: 'Life event not found'
|
|
2304
3119
|
}
|
|
2305
3120
|
});
|
|
2306
3121
|
}
|
|
3122
|
+
}
|
|
2307
3123
|
|
|
3124
|
+
export class OnboardingService {
|
|
2308
3125
|
/**
|
|
2309
|
-
*
|
|
2310
|
-
* @
|
|
3126
|
+
* Bootstrap core accounts + register asset accounts with opening balances (ADR-0113)
|
|
3127
|
+
* @param data The data for the request.
|
|
3128
|
+
* @param data.region Region code for tenant context. Not-yet-open codes are accepted: the universal catalog backs onboarding regardless of region (#759)
|
|
3129
|
+
* @param data.requestBody
|
|
3130
|
+
* @returns unknown Onboarding bootstrap result.
|
|
2311
3131
|
* @throws ApiError
|
|
2312
3132
|
*/
|
|
2313
|
-
public static
|
|
3133
|
+
public static onboardingControllerBootstrap(
|
|
3134
|
+
data: OnboardingControllerBootstrapData
|
|
3135
|
+
): CancelablePromise<OnboardingControllerBootstrapResponse> {
|
|
2314
3136
|
return __request(OpenAPI, {
|
|
2315
|
-
method: '
|
|
2316
|
-
url: '/api/v1/
|
|
3137
|
+
method: 'POST',
|
|
3138
|
+
url: '/api/v1/{region}/bean/onboarding',
|
|
3139
|
+
path: {
|
|
3140
|
+
region: data.region
|
|
3141
|
+
},
|
|
3142
|
+
body: data.requestBody,
|
|
3143
|
+
mediaType: 'application/json',
|
|
3144
|
+
errors: {
|
|
3145
|
+
422: 'Invalid region/account path/duplicate paths.'
|
|
3146
|
+
}
|
|
2317
3147
|
});
|
|
2318
3148
|
}
|
|
2319
3149
|
}
|
|
2320
3150
|
|
|
2321
|
-
export class
|
|
3151
|
+
export class BalanceReconciliationService {
|
|
2322
3152
|
/**
|
|
2323
|
-
*
|
|
2324
|
-
*
|
|
3153
|
+
* Preview reconciliation (book vs actual)
|
|
3154
|
+
* Computes book balance, diff, Beancount-inferred tolerance, and suggested action without persisting.
|
|
3155
|
+
* @param data The data for the request.
|
|
3156
|
+
* @param data.region Region code for tenant context (decorative for reconciliation)
|
|
3157
|
+
* @param data.requestBody
|
|
3158
|
+
* @returns ReconciliationComputeResultDto Reconciliation preview
|
|
2325
3159
|
* @throws ApiError
|
|
2326
3160
|
*/
|
|
2327
|
-
public static
|
|
3161
|
+
public static reconciliationControllerCompute(
|
|
3162
|
+
data: ReconciliationControllerComputeData
|
|
3163
|
+
): CancelablePromise<ReconciliationControllerComputeResponse> {
|
|
2328
3164
|
return __request(OpenAPI, {
|
|
2329
|
-
method: '
|
|
2330
|
-
url: '/api/v1/
|
|
3165
|
+
method: 'POST',
|
|
3166
|
+
url: '/api/v1/{region}/bean/reconciliations',
|
|
3167
|
+
path: {
|
|
3168
|
+
region: data.region
|
|
3169
|
+
},
|
|
3170
|
+
body: data.requestBody,
|
|
3171
|
+
mediaType: 'application/json',
|
|
2331
3172
|
errors: {
|
|
2332
|
-
|
|
2333
|
-
403: 'Forbidden - insufficient permissions'
|
|
3173
|
+
404: 'Account not found'
|
|
2334
3174
|
}
|
|
2335
3175
|
});
|
|
2336
3176
|
}
|
|
2337
3177
|
|
|
2338
3178
|
/**
|
|
2339
|
-
*
|
|
3179
|
+
* Record a balance assertion
|
|
3180
|
+
* Persists the reconciliation as a BeanBalance assertion (amount = actual, diffAmount = book − actual). Re-reconciling the same day/currency upserts.
|
|
2340
3181
|
* @param data The data for the request.
|
|
2341
|
-
* @param data.
|
|
2342
|
-
* @
|
|
3182
|
+
* @param data.region Region code for tenant context (decorative for reconciliation)
|
|
3183
|
+
* @param data.requestBody
|
|
3184
|
+
* @returns ReconciliationRecordDto Balance assertion recorded
|
|
2343
3185
|
* @throws ApiError
|
|
2344
3186
|
*/
|
|
2345
|
-
public static
|
|
2346
|
-
data:
|
|
2347
|
-
): CancelablePromise<
|
|
3187
|
+
public static reconciliationControllerAssert(
|
|
3188
|
+
data: ReconciliationControllerAssertData
|
|
3189
|
+
): CancelablePromise<ReconciliationControllerAssertResponse> {
|
|
2348
3190
|
return __request(OpenAPI, {
|
|
2349
|
-
method: '
|
|
2350
|
-
url: '/api/v1/
|
|
3191
|
+
method: 'POST',
|
|
3192
|
+
url: '/api/v1/{region}/bean/reconciliations/assert',
|
|
2351
3193
|
path: {
|
|
2352
|
-
|
|
3194
|
+
region: data.region
|
|
2353
3195
|
},
|
|
3196
|
+
body: data.requestBody,
|
|
3197
|
+
mediaType: 'application/json',
|
|
2354
3198
|
errors: {
|
|
2355
|
-
|
|
2356
|
-
403: 'Forbidden - insufficient permissions',
|
|
2357
|
-
404: 'Property not found'
|
|
3199
|
+
404: 'Account not found'
|
|
2358
3200
|
}
|
|
2359
3201
|
});
|
|
2360
3202
|
}
|
|
2361
3203
|
|
|
2362
3204
|
/**
|
|
2363
|
-
*
|
|
3205
|
+
* Generate a pad adjusting entry
|
|
3206
|
+
* When book is outside tolerance, synthesizes a Beancount pad transaction (flag P) booking the diff from source_account and persists it. Source defaults to Equity:Opening-Balances.
|
|
2364
3207
|
* @param data The data for the request.
|
|
2365
|
-
* @param data.
|
|
3208
|
+
* @param data.region Region code for tenant context (decorative for reconciliation)
|
|
2366
3209
|
* @param data.requestBody
|
|
2367
|
-
* @returns
|
|
3210
|
+
* @returns PadResultDto Pad adjusting entry generated
|
|
2368
3211
|
* @throws ApiError
|
|
2369
3212
|
*/
|
|
2370
|
-
public static
|
|
2371
|
-
data:
|
|
2372
|
-
): CancelablePromise<
|
|
3213
|
+
public static reconciliationControllerPad(
|
|
3214
|
+
data: ReconciliationControllerPadData
|
|
3215
|
+
): CancelablePromise<ReconciliationControllerPadResponse> {
|
|
2373
3216
|
return __request(OpenAPI, {
|
|
2374
|
-
method: '
|
|
2375
|
-
url: '/api/v1/
|
|
3217
|
+
method: 'POST',
|
|
3218
|
+
url: '/api/v1/{region}/bean/reconciliations/pad',
|
|
2376
3219
|
path: {
|
|
2377
|
-
|
|
3220
|
+
region: data.region
|
|
2378
3221
|
},
|
|
2379
3222
|
body: data.requestBody,
|
|
2380
3223
|
mediaType: 'application/json',
|
|
2381
3224
|
errors: {
|
|
2382
|
-
|
|
2383
|
-
|
|
3225
|
+
400: 'Book already within tolerance — no pad needed',
|
|
3226
|
+
404: 'Account not found'
|
|
2384
3227
|
}
|
|
2385
3228
|
});
|
|
2386
3229
|
}
|
|
2387
3230
|
|
|
2388
3231
|
/**
|
|
2389
|
-
*
|
|
3232
|
+
* List reconciliation history for an account
|
|
3233
|
+
* Returns recorded balance assertions (most recent first). The latest drives the account-detail "Last <date>" badge.
|
|
2390
3234
|
* @param data The data for the request.
|
|
2391
|
-
* @param data.
|
|
2392
|
-
* @
|
|
3235
|
+
* @param data.accountId BeanAccount id
|
|
3236
|
+
* @param data.region Region code for tenant context (decorative for reconciliation)
|
|
3237
|
+
* @returns ReconciliationRecordDto Reconciliation history
|
|
2393
3238
|
* @throws ApiError
|
|
2394
3239
|
*/
|
|
2395
|
-
public static
|
|
2396
|
-
data:
|
|
2397
|
-
): CancelablePromise<
|
|
3240
|
+
public static reconciliationControllerHistory(
|
|
3241
|
+
data: ReconciliationControllerHistoryData
|
|
3242
|
+
): CancelablePromise<ReconciliationControllerHistoryResponse> {
|
|
2398
3243
|
return __request(OpenAPI, {
|
|
2399
|
-
method: '
|
|
2400
|
-
url: '/api/v1/
|
|
3244
|
+
method: 'GET',
|
|
3245
|
+
url: '/api/v1/{region}/bean/accounts/{accountId}/reconciliations',
|
|
2401
3246
|
path: {
|
|
2402
|
-
|
|
3247
|
+
accountId: data.accountId,
|
|
3248
|
+
region: data.region
|
|
2403
3249
|
},
|
|
2404
3250
|
errors: {
|
|
2405
|
-
|
|
2406
|
-
403: 'Forbidden - insufficient permissions',
|
|
2407
|
-
404: 'Property not found'
|
|
3251
|
+
404: 'Account not found'
|
|
2408
3252
|
}
|
|
2409
3253
|
});
|
|
2410
3254
|
}
|
|
@@ -2414,13 +3258,20 @@ export class BeanExportService {
|
|
|
2414
3258
|
/**
|
|
2415
3259
|
* Export Beancount ledger as ZIP
|
|
2416
3260
|
* Export all user Beancount data as a ZIP file containing ledger.beancount and yearly files in community format.
|
|
2417
|
-
* @
|
|
3261
|
+
* @param data The data for the request.
|
|
3262
|
+
* @param data.region Region code for tenant context
|
|
3263
|
+
* @returns binary ZIP archive (application/zip) streamed as an attachment
|
|
2418
3264
|
* @throws ApiError
|
|
2419
3265
|
*/
|
|
2420
|
-
public static exportControllerExportBeancount(
|
|
3266
|
+
public static exportControllerExportBeancount(
|
|
3267
|
+
data: ExportControllerExportBeancountData
|
|
3268
|
+
): CancelablePromise<ExportControllerExportBeancountResponse> {
|
|
2421
3269
|
return __request(OpenAPI, {
|
|
2422
3270
|
method: 'GET',
|
|
2423
|
-
url: '/api/v1/{region}/bean/export/beancount'
|
|
3271
|
+
url: '/api/v1/{region}/bean/export/beancount',
|
|
3272
|
+
path: {
|
|
3273
|
+
region: data.region
|
|
3274
|
+
}
|
|
2424
3275
|
});
|
|
2425
3276
|
}
|
|
2426
3277
|
}
|
|
@@ -2457,7 +3308,7 @@ export class BeanImportService {
|
|
|
2457
3308
|
|
|
2458
3309
|
/**
|
|
2459
3310
|
* Identify file type
|
|
2460
|
-
*
|
|
3311
|
+
* Server-side importer identification has been removed (ADR-0101); file matching is handled client-side via the community parser pipeline. Always returns identified=false with an explanatory message; kept for backward compatibility. Does not perform actual import.
|
|
2461
3312
|
* @param data The data for the request.
|
|
2462
3313
|
* @param data.region Region code for tenant context
|
|
2463
3314
|
* @param data.formData File to identify
|
|
@@ -2511,403 +3362,578 @@ export class BeanImportService {
|
|
|
2511
3362
|
* Get importer configuration
|
|
2512
3363
|
* Returns the current configuration for the specified importer. Creates default configuration if none exists.
|
|
2513
3364
|
* @param data The data for the request.
|
|
2514
|
-
* @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
|
|
3365
|
+
* @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
|
|
3366
|
+
* @param data.region Region code for tenant context
|
|
3367
|
+
* @returns ImporterConfigDto Configuration retrieved successfully
|
|
3368
|
+
* @throws ApiError
|
|
3369
|
+
*/
|
|
3370
|
+
public static importerConfigControllerGetConfig(
|
|
3371
|
+
data: ImporterConfigControllerGetConfigData
|
|
3372
|
+
): CancelablePromise<ImporterConfigControllerGetConfigResponse> {
|
|
3373
|
+
return __request(OpenAPI, {
|
|
3374
|
+
method: 'GET',
|
|
3375
|
+
url: '/api/v1/{region}/bean/import/config/{importerId}',
|
|
3376
|
+
path: {
|
|
3377
|
+
importerId: data.importerId,
|
|
3378
|
+
region: data.region
|
|
3379
|
+
},
|
|
3380
|
+
errors: {
|
|
3381
|
+
400: 'Invalid input - Unsupported importer',
|
|
3382
|
+
401: 'Unauthorized - Authentication required'
|
|
3383
|
+
}
|
|
3384
|
+
});
|
|
3385
|
+
}
|
|
3386
|
+
|
|
3387
|
+
/**
|
|
3388
|
+
* Update importer configuration
|
|
3389
|
+
* Updates the configuration for the specified importer. Partial updates are supported.
|
|
3390
|
+
* @param data The data for the request.
|
|
3391
|
+
* @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
|
|
3392
|
+
* @param data.region Region code for tenant context
|
|
3393
|
+
* @param data.requestBody Partial configuration update. Only provided fields will be updated.
|
|
3394
|
+
* @returns ImporterConfigDto Configuration updated successfully
|
|
3395
|
+
* @throws ApiError
|
|
3396
|
+
*/
|
|
3397
|
+
public static importerConfigControllerUpdateConfig(
|
|
3398
|
+
data: ImporterConfigControllerUpdateConfigData
|
|
3399
|
+
): CancelablePromise<ImporterConfigControllerUpdateConfigResponse> {
|
|
3400
|
+
return __request(OpenAPI, {
|
|
3401
|
+
method: 'PUT',
|
|
3402
|
+
url: '/api/v1/{region}/bean/import/config/{importerId}',
|
|
3403
|
+
path: {
|
|
3404
|
+
importerId: data.importerId,
|
|
3405
|
+
region: data.region
|
|
3406
|
+
},
|
|
3407
|
+
body: data.requestBody,
|
|
3408
|
+
mediaType: 'application/json',
|
|
3409
|
+
errors: {
|
|
3410
|
+
400: 'Invalid input - Validation failed',
|
|
3411
|
+
404: 'Configuration not found'
|
|
3412
|
+
}
|
|
3413
|
+
});
|
|
3414
|
+
}
|
|
3415
|
+
|
|
3416
|
+
/**
|
|
3417
|
+
* Reset configuration to default
|
|
3418
|
+
* Resets the configuration for the specified importer to default values. This operation overwrites all existing configuration.
|
|
3419
|
+
* @param data The data for the request.
|
|
3420
|
+
* @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
|
|
3421
|
+
* @param data.region Region code for tenant context
|
|
3422
|
+
* @returns ImporterConfigDto Configuration reset successfully
|
|
3423
|
+
* @throws ApiError
|
|
3424
|
+
*/
|
|
3425
|
+
public static importerConfigControllerResetConfig(
|
|
3426
|
+
data: ImporterConfigControllerResetConfigData
|
|
3427
|
+
): CancelablePromise<ImporterConfigControllerResetConfigResponse> {
|
|
3428
|
+
return __request(OpenAPI, {
|
|
3429
|
+
method: 'POST',
|
|
3430
|
+
url: '/api/v1/{region}/bean/import/config/{importerId}/reset',
|
|
3431
|
+
path: {
|
|
3432
|
+
importerId: data.importerId,
|
|
3433
|
+
region: data.region
|
|
3434
|
+
},
|
|
3435
|
+
errors: {
|
|
3436
|
+
400: 'Invalid input - Unsupported importer'
|
|
3437
|
+
}
|
|
3438
|
+
});
|
|
3439
|
+
}
|
|
3440
|
+
}
|
|
3441
|
+
|
|
3442
|
+
export class ProviderSyncService {
|
|
3443
|
+
/**
|
|
3444
|
+
* Sync transactions from financial data provider
|
|
3445
|
+
*
|
|
3446
|
+
* Accepts raw transactions from external financial data providers, transforms them to Beancount format, and processes them through the ingestion pipeline.
|
|
3447
|
+
*
|
|
3448
|
+
* **Supported Providers:**
|
|
3449
|
+
* - **plaid**: Plaid API (US, Canada, Europe)
|
|
3450
|
+
* - **teller**: Teller API (US)
|
|
3451
|
+
* - **truelayer**: TrueLayer Open Banking (UK, Europe)
|
|
3452
|
+
* - **gocardless**: GoCardless Bank Account Data (Europe)
|
|
3453
|
+
* - **simplefin**: SimpleFIN (Self-hosted)
|
|
3454
|
+
* - **yodlee**: Yodlee (Global)
|
|
3455
|
+
* - **beancount-direct**: Beancount format transactions
|
|
3456
|
+
* - **parsed-bill**: Client-side parsed bill transactions
|
|
3457
|
+
*
|
|
3458
|
+
* **Processing Flow:**
|
|
3459
|
+
* 1. Transform raw data via provider adapter
|
|
3460
|
+
* 2. Validate transaction format
|
|
3461
|
+
* 3. Deduplicate using originalId
|
|
3462
|
+
* 4. Classify using rule engine
|
|
3463
|
+
* 5. Route low-confidence to Review Center
|
|
3464
|
+
* 6. Persist validated transactions
|
|
3465
|
+
*
|
|
3466
|
+
* @param data The data for the request.
|
|
3467
|
+
* @param data.providerName Provider name
|
|
3468
|
+
* @param data.region Region code for tenant context
|
|
3469
|
+
* @param data.requestBody
|
|
3470
|
+
* @returns ProviderSyncResponseDto Sync completed successfully
|
|
3471
|
+
* @throws ApiError
|
|
3472
|
+
*/
|
|
3473
|
+
public static providerSyncControllerSync(
|
|
3474
|
+
data: ProviderSyncControllerSyncData
|
|
3475
|
+
): CancelablePromise<ProviderSyncControllerSyncResponse> {
|
|
3476
|
+
return __request(OpenAPI, {
|
|
3477
|
+
method: 'POST',
|
|
3478
|
+
url: '/api/v1/{region}/bean/import/provider/{providerName}/sync',
|
|
3479
|
+
path: {
|
|
3480
|
+
providerName: data.providerName,
|
|
3481
|
+
region: data.region
|
|
3482
|
+
},
|
|
3483
|
+
body: data.requestBody,
|
|
3484
|
+
mediaType: 'application/json',
|
|
3485
|
+
errors: {
|
|
3486
|
+
400: 'Invalid request data',
|
|
3487
|
+
401: 'Missing or invalid authentication',
|
|
3488
|
+
404: 'Provider not supported'
|
|
3489
|
+
}
|
|
3490
|
+
});
|
|
3491
|
+
}
|
|
3492
|
+
|
|
3493
|
+
/**
|
|
3494
|
+
* Get supported providers
|
|
3495
|
+
* Returns a list of all providers supported by the sync endpoint.
|
|
3496
|
+
* @param data The data for the request.
|
|
3497
|
+
* @param data.region Region code for tenant context
|
|
3498
|
+
* @returns SupportedProvidersResponseDto List of supported providers
|
|
3499
|
+
* @throws ApiError
|
|
3500
|
+
*/
|
|
3501
|
+
public static providerSyncControllerGetSupportedProviders(
|
|
3502
|
+
data: ProviderSyncControllerGetSupportedProvidersData
|
|
3503
|
+
): CancelablePromise<ProviderSyncControllerGetSupportedProvidersResponse> {
|
|
3504
|
+
return __request(OpenAPI, {
|
|
3505
|
+
method: 'GET',
|
|
3506
|
+
url: '/api/v1/{region}/bean/import/provider/supported',
|
|
3507
|
+
path: {
|
|
3508
|
+
region: data.region
|
|
3509
|
+
},
|
|
3510
|
+
errors: {
|
|
3511
|
+
401: 'Missing or invalid authentication'
|
|
3512
|
+
}
|
|
3513
|
+
});
|
|
3514
|
+
}
|
|
3515
|
+
|
|
3516
|
+
/**
|
|
3517
|
+
* Check if provider is supported
|
|
3518
|
+
* Returns whether a specific provider is supported.
|
|
3519
|
+
* @param data The data for the request.
|
|
3520
|
+
* @param data.providerName Provider name to check
|
|
3521
|
+
* @param data.region Region code for tenant context
|
|
3522
|
+
* @returns unknown Provider support status
|
|
3523
|
+
* @throws ApiError
|
|
3524
|
+
*/
|
|
3525
|
+
public static providerSyncControllerIsProviderSupported(
|
|
3526
|
+
data: ProviderSyncControllerIsProviderSupportedData
|
|
3527
|
+
): CancelablePromise<ProviderSyncControllerIsProviderSupportedResponse> {
|
|
3528
|
+
return __request(OpenAPI, {
|
|
3529
|
+
method: 'GET',
|
|
3530
|
+
url: '/api/v1/{region}/bean/import/provider/{providerName}/supported',
|
|
3531
|
+
path: {
|
|
3532
|
+
providerName: data.providerName,
|
|
3533
|
+
region: data.region
|
|
3534
|
+
},
|
|
3535
|
+
errors: {
|
|
3536
|
+
401: 'Missing or invalid authentication'
|
|
3537
|
+
}
|
|
3538
|
+
});
|
|
3539
|
+
}
|
|
3540
|
+
}
|
|
3541
|
+
|
|
3542
|
+
export class ExternalAccountLinksService {
|
|
3543
|
+
/**
|
|
3544
|
+
* Create an external account → BeanAccount mapping (ADR-0113)
|
|
3545
|
+
* @param data The data for the request.
|
|
2515
3546
|
* @param data.region Region code for tenant context
|
|
2516
|
-
* @
|
|
3547
|
+
* @param data.requestBody
|
|
3548
|
+
* @returns ExternalAccountLinkResponseDto Link created.
|
|
2517
3549
|
* @throws ApiError
|
|
2518
3550
|
*/
|
|
2519
|
-
public static
|
|
2520
|
-
data:
|
|
2521
|
-
): CancelablePromise<
|
|
3551
|
+
public static externalAccountLinkControllerCreate(
|
|
3552
|
+
data: ExternalAccountLinkControllerCreateData
|
|
3553
|
+
): CancelablePromise<ExternalAccountLinkControllerCreateResponse> {
|
|
2522
3554
|
return __request(OpenAPI, {
|
|
2523
|
-
method: '
|
|
2524
|
-
url: '/api/v1/{region}/bean/
|
|
3555
|
+
method: 'POST',
|
|
3556
|
+
url: '/api/v1/{region}/bean/external-account-links',
|
|
2525
3557
|
path: {
|
|
2526
|
-
importerId: data.importerId,
|
|
2527
3558
|
region: data.region
|
|
2528
3559
|
},
|
|
3560
|
+
body: data.requestBody,
|
|
3561
|
+
mediaType: 'application/json',
|
|
2529
3562
|
errors: {
|
|
2530
|
-
|
|
2531
|
-
401: 'Unauthorized - Authentication required'
|
|
3563
|
+
422: 'beanAccountId not owned, or an active link already exists.'
|
|
2532
3564
|
}
|
|
2533
3565
|
});
|
|
2534
3566
|
}
|
|
2535
3567
|
|
|
2536
3568
|
/**
|
|
2537
|
-
*
|
|
2538
|
-
* Updates the configuration for the specified importer. Partial updates are supported.
|
|
3569
|
+
* List the user's active external account links
|
|
2539
3570
|
* @param data The data for the request.
|
|
2540
|
-
* @param data.
|
|
3571
|
+
* @param data.provider
|
|
2541
3572
|
* @param data.region Region code for tenant context
|
|
2542
|
-
* @
|
|
2543
|
-
* @returns ImporterConfigDto Configuration updated successfully
|
|
3573
|
+
* @returns ExternalAccountLinkListResponseDto Links retrieved.
|
|
2544
3574
|
* @throws ApiError
|
|
2545
3575
|
*/
|
|
2546
|
-
public static
|
|
2547
|
-
data:
|
|
2548
|
-
): CancelablePromise<
|
|
3576
|
+
public static externalAccountLinkControllerFindAll(
|
|
3577
|
+
data: ExternalAccountLinkControllerFindAllData
|
|
3578
|
+
): CancelablePromise<ExternalAccountLinkControllerFindAllResponse> {
|
|
2549
3579
|
return __request(OpenAPI, {
|
|
2550
|
-
method: '
|
|
2551
|
-
url: '/api/v1/{region}/bean/
|
|
3580
|
+
method: 'GET',
|
|
3581
|
+
url: '/api/v1/{region}/bean/external-account-links',
|
|
2552
3582
|
path: {
|
|
2553
|
-
importerId: data.importerId,
|
|
2554
3583
|
region: data.region
|
|
2555
3584
|
},
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
errors: {
|
|
2559
|
-
400: 'Invalid input - Validation failed',
|
|
2560
|
-
404: 'Configuration not found'
|
|
3585
|
+
query: {
|
|
3586
|
+
provider: data.provider
|
|
2561
3587
|
}
|
|
2562
3588
|
});
|
|
2563
3589
|
}
|
|
2564
3590
|
|
|
2565
3591
|
/**
|
|
2566
|
-
*
|
|
2567
|
-
* Resets the configuration for the specified importer to default values. This operation overwrites all existing configuration.
|
|
3592
|
+
* Get a single external account link
|
|
2568
3593
|
* @param data The data for the request.
|
|
2569
|
-
* @param data.
|
|
3594
|
+
* @param data.id
|
|
2570
3595
|
* @param data.region Region code for tenant context
|
|
2571
|
-
* @returns
|
|
3596
|
+
* @returns ExternalAccountLinkResponseDto Link retrieved.
|
|
2572
3597
|
* @throws ApiError
|
|
2573
3598
|
*/
|
|
2574
|
-
public static
|
|
2575
|
-
data:
|
|
2576
|
-
): CancelablePromise<
|
|
3599
|
+
public static externalAccountLinkControllerFindOne(
|
|
3600
|
+
data: ExternalAccountLinkControllerFindOneData
|
|
3601
|
+
): CancelablePromise<ExternalAccountLinkControllerFindOneResponse> {
|
|
2577
3602
|
return __request(OpenAPI, {
|
|
2578
|
-
method: '
|
|
2579
|
-
url: '/api/v1/{region}/bean/
|
|
3603
|
+
method: 'GET',
|
|
3604
|
+
url: '/api/v1/{region}/bean/external-account-links/{id}',
|
|
2580
3605
|
path: {
|
|
2581
|
-
|
|
3606
|
+
id: data.id,
|
|
2582
3607
|
region: data.region
|
|
2583
3608
|
},
|
|
2584
3609
|
errors: {
|
|
2585
|
-
|
|
3610
|
+
422: 'Link not found or not owned by the user.'
|
|
2586
3611
|
}
|
|
2587
3612
|
});
|
|
2588
3613
|
}
|
|
2589
|
-
}
|
|
2590
3614
|
|
|
2591
|
-
export class BeanPlatformsService {
|
|
2592
3615
|
/**
|
|
2593
|
-
*
|
|
2594
|
-
* @
|
|
3616
|
+
* Soft-delete (disconnect) an external account link
|
|
3617
|
+
* @param data The data for the request.
|
|
3618
|
+
* @param data.id
|
|
3619
|
+
* @param data.region Region code for tenant context
|
|
3620
|
+
* @returns void Link soft-deleted; historical transactions are unaffected.
|
|
2595
3621
|
* @throws ApiError
|
|
2596
3622
|
*/
|
|
2597
|
-
public static
|
|
3623
|
+
public static externalAccountLinkControllerRemove(
|
|
3624
|
+
data: ExternalAccountLinkControllerRemoveData
|
|
3625
|
+
): CancelablePromise<ExternalAccountLinkControllerRemoveResponse> {
|
|
2598
3626
|
return __request(OpenAPI, {
|
|
2599
|
-
method: '
|
|
2600
|
-
url: '/api/v1/bean/
|
|
3627
|
+
method: 'DELETE',
|
|
3628
|
+
url: '/api/v1/{region}/bean/external-account-links/{id}',
|
|
3629
|
+
path: {
|
|
3630
|
+
id: data.id,
|
|
3631
|
+
region: data.region
|
|
3632
|
+
}
|
|
2601
3633
|
});
|
|
2602
3634
|
}
|
|
3635
|
+
}
|
|
2603
3636
|
|
|
3637
|
+
export class ImportTelemetryService {
|
|
2604
3638
|
/**
|
|
2605
|
-
*
|
|
3639
|
+
* Receive anonymous parser failure telemetry
|
|
2606
3640
|
* @param data The data for the request.
|
|
3641
|
+
* @param data.region Region code for tenant context
|
|
2607
3642
|
* @param data.requestBody
|
|
2608
|
-
* @returns unknown
|
|
3643
|
+
* @returns unknown Telemetry report received
|
|
2609
3644
|
* @throws ApiError
|
|
2610
3645
|
*/
|
|
2611
|
-
public static
|
|
2612
|
-
data:
|
|
2613
|
-
): CancelablePromise<
|
|
3646
|
+
public static telemetryControllerReportTelemetry(
|
|
3647
|
+
data: TelemetryControllerReportTelemetryData
|
|
3648
|
+
): CancelablePromise<TelemetryControllerReportTelemetryResponse> {
|
|
2614
3649
|
return __request(OpenAPI, {
|
|
2615
3650
|
method: 'POST',
|
|
2616
|
-
url: '/api/v1/bean/
|
|
3651
|
+
url: '/api/v1/{region}/bean/import/parser-telemetry',
|
|
3652
|
+
path: {
|
|
3653
|
+
region: data.region
|
|
3654
|
+
},
|
|
2617
3655
|
body: data.requestBody,
|
|
2618
3656
|
mediaType: 'application/json',
|
|
2619
3657
|
errors: {
|
|
2620
|
-
|
|
3658
|
+
401: 'Unauthorized'
|
|
2621
3659
|
}
|
|
2622
3660
|
});
|
|
2623
3661
|
}
|
|
2624
3662
|
|
|
2625
3663
|
/**
|
|
2626
|
-
*
|
|
2627
|
-
* @
|
|
3664
|
+
* Receive anonymous zero-hit coverage miss report
|
|
3665
|
+
* @param data The data for the request.
|
|
3666
|
+
* @param data.region Region code for tenant context
|
|
3667
|
+
* @param data.requestBody
|
|
3668
|
+
* @returns unknown Coverage miss report received
|
|
2628
3669
|
* @throws ApiError
|
|
2629
3670
|
*/
|
|
2630
|
-
public static
|
|
3671
|
+
public static telemetryControllerReportCoverageMiss(
|
|
3672
|
+
data: TelemetryControllerReportCoverageMissData
|
|
3673
|
+
): CancelablePromise<TelemetryControllerReportCoverageMissResponse> {
|
|
2631
3674
|
return __request(OpenAPI, {
|
|
2632
|
-
method: '
|
|
2633
|
-
url: '/api/v1/bean/
|
|
3675
|
+
method: 'POST',
|
|
3676
|
+
url: '/api/v1/{region}/bean/import/parser-coverage-miss',
|
|
3677
|
+
path: {
|
|
3678
|
+
region: data.region
|
|
3679
|
+
},
|
|
3680
|
+
body: data.requestBody,
|
|
3681
|
+
mediaType: 'application/json',
|
|
3682
|
+
errors: {
|
|
3683
|
+
401: 'Unauthorized'
|
|
3684
|
+
}
|
|
2634
3685
|
});
|
|
2635
3686
|
}
|
|
2636
3687
|
|
|
2637
3688
|
/**
|
|
2638
|
-
*
|
|
3689
|
+
* Coverage metrics (uncovered format aggregation)
|
|
2639
3690
|
* @param data The data for the request.
|
|
2640
|
-
* @param data.
|
|
2641
|
-
* @param data.
|
|
2642
|
-
* @returns unknown
|
|
3691
|
+
* @param data.region Region code for tenant context
|
|
3692
|
+
* @param data.topN Top-N uncovered formats (default 10)
|
|
3693
|
+
* @returns unknown Coverage metrics
|
|
2643
3694
|
* @throws ApiError
|
|
2644
3695
|
*/
|
|
2645
|
-
public static
|
|
2646
|
-
data:
|
|
2647
|
-
): CancelablePromise<
|
|
3696
|
+
public static telemetryControllerGetCoverageMetrics(
|
|
3697
|
+
data: TelemetryControllerGetCoverageMetricsData
|
|
3698
|
+
): CancelablePromise<TelemetryControllerGetCoverageMetricsResponse> {
|
|
2648
3699
|
return __request(OpenAPI, {
|
|
2649
3700
|
method: 'GET',
|
|
2650
|
-
url: '/api/v1/bean/
|
|
2651
|
-
|
|
2652
|
-
q: data.q,
|
|
3701
|
+
url: '/api/v1/{region}/bean/import/parser-coverage-metrics',
|
|
3702
|
+
path: {
|
|
2653
3703
|
region: data.region
|
|
3704
|
+
},
|
|
3705
|
+
query: {
|
|
3706
|
+
topN: data.topN
|
|
2654
3707
|
}
|
|
2655
3708
|
});
|
|
2656
3709
|
}
|
|
3710
|
+
}
|
|
2657
3711
|
|
|
3712
|
+
export class BeanNlpService {
|
|
2658
3713
|
/**
|
|
2659
|
-
*
|
|
3714
|
+
* Process natural language input
|
|
3715
|
+
* 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"
|
|
2660
3716
|
* @param data The data for the request.
|
|
2661
|
-
* @param data.
|
|
2662
|
-
* @param data.requestBody
|
|
2663
|
-
* @returns
|
|
3717
|
+
* @param data.region Region code for tenant context
|
|
3718
|
+
* @param data.requestBody Natural language transaction input with optional session ID
|
|
3719
|
+
* @returns NlpResponseDto NLP processing result - either created transaction or asking for more info
|
|
2664
3720
|
* @throws ApiError
|
|
2665
3721
|
*/
|
|
2666
|
-
public static
|
|
2667
|
-
data:
|
|
2668
|
-
): CancelablePromise<
|
|
3722
|
+
public static nlpControllerProcessNaturalLanguage(
|
|
3723
|
+
data: NlpControllerProcessNaturalLanguageData
|
|
3724
|
+
): CancelablePromise<NlpControllerProcessNaturalLanguageResponse> {
|
|
2669
3725
|
return __request(OpenAPI, {
|
|
2670
|
-
method: '
|
|
2671
|
-
url: '/api/v1/bean/
|
|
3726
|
+
method: 'POST',
|
|
3727
|
+
url: '/api/v1/{region}/bean/nlp/process',
|
|
2672
3728
|
path: {
|
|
2673
|
-
|
|
3729
|
+
region: data.region
|
|
2674
3730
|
},
|
|
2675
3731
|
body: data.requestBody,
|
|
2676
3732
|
mediaType: 'application/json',
|
|
2677
3733
|
errors: {
|
|
2678
|
-
|
|
3734
|
+
400: 'Invalid input',
|
|
3735
|
+
401: 'Unauthorized'
|
|
2679
3736
|
}
|
|
2680
3737
|
});
|
|
2681
3738
|
}
|
|
2682
3739
|
|
|
2683
3740
|
/**
|
|
2684
|
-
*
|
|
3741
|
+
* Clear dialogue session
|
|
3742
|
+
* Clear the current NLP dialogue session. Use this to cancel an ongoing multi-turn dialogue.
|
|
2685
3743
|
* @param data The data for the request.
|
|
2686
|
-
* @param data.
|
|
2687
|
-
* @
|
|
3744
|
+
* @param data.region Region code for tenant context
|
|
3745
|
+
* @param data.sessionId Specific session ID to clear (defaults to user session)
|
|
3746
|
+
* @returns void Session cleared successfully
|
|
2688
3747
|
* @throws ApiError
|
|
2689
3748
|
*/
|
|
2690
|
-
public static
|
|
2691
|
-
data:
|
|
2692
|
-
): CancelablePromise<
|
|
3749
|
+
public static nlpControllerClearSession(
|
|
3750
|
+
data: NlpControllerClearSessionData
|
|
3751
|
+
): CancelablePromise<NlpControllerClearSessionResponse> {
|
|
2693
3752
|
return __request(OpenAPI, {
|
|
2694
3753
|
method: 'DELETE',
|
|
2695
|
-
url: '/api/v1/bean/
|
|
3754
|
+
url: '/api/v1/{region}/bean/nlp/session',
|
|
2696
3755
|
path: {
|
|
2697
|
-
|
|
3756
|
+
region: data.region
|
|
3757
|
+
},
|
|
3758
|
+
query: {
|
|
3759
|
+
sessionId: data.sessionId
|
|
2698
3760
|
},
|
|
2699
3761
|
errors: {
|
|
2700
|
-
|
|
3762
|
+
401: 'Unauthorized'
|
|
2701
3763
|
}
|
|
2702
3764
|
});
|
|
2703
3765
|
}
|
|
2704
|
-
}
|
|
2705
3766
|
|
|
2706
|
-
export class ProviderSyncService {
|
|
2707
3767
|
/**
|
|
2708
|
-
*
|
|
2709
|
-
*
|
|
2710
|
-
* Accepts raw transactions from external financial data providers, transforms them to Beancount format, and processes them through the ingestion pipeline.
|
|
2711
|
-
*
|
|
2712
|
-
* **Supported Providers:**
|
|
2713
|
-
* - **plaid**: Plaid API (US, Canada, Europe)
|
|
2714
|
-
* - **teller**: Teller API (US)
|
|
2715
|
-
* - **truelayer**: TrueLayer Open Banking (UK, Europe)
|
|
2716
|
-
* - **gocardless**: GoCardless Bank Account Data (Europe)
|
|
2717
|
-
* - **simplefin**: SimpleFIN (Self-hosted)
|
|
2718
|
-
* - **yodlee**: Yodlee (Global)
|
|
2719
|
-
* - **beancount-direct**: Beancount format transactions
|
|
2720
|
-
* - **parsed-bill**: Client-side parsed bill transactions
|
|
2721
|
-
*
|
|
2722
|
-
* **Processing Flow:**
|
|
2723
|
-
* 1. Transform raw data via provider adapter
|
|
2724
|
-
* 2. Validate transaction format
|
|
2725
|
-
* 3. Deduplicate using originalId
|
|
2726
|
-
* 4. Classify using rule engine
|
|
2727
|
-
* 5. Route low-confidence to Review Center
|
|
2728
|
-
* 6. Persist validated transactions
|
|
2729
|
-
*
|
|
3768
|
+
* Get current session state
|
|
3769
|
+
* Get the current NLP dialogue session state. Useful for debugging and displaying session context in UI.
|
|
2730
3770
|
* @param data The data for the request.
|
|
2731
|
-
* @param data.
|
|
2732
|
-
* @param data.
|
|
2733
|
-
* @
|
|
2734
|
-
* @returns ProviderSyncResponseDto Sync completed successfully
|
|
3771
|
+
* @param data.region Region code for tenant context
|
|
3772
|
+
* @param data.sessionId Specific session ID to get (defaults to user session)
|
|
3773
|
+
* @returns unknown Current session state (or null if no active session)
|
|
2735
3774
|
* @throws ApiError
|
|
2736
3775
|
*/
|
|
2737
|
-
public static
|
|
2738
|
-
data:
|
|
2739
|
-
): CancelablePromise<
|
|
3776
|
+
public static nlpControllerGetSession(
|
|
3777
|
+
data: NlpControllerGetSessionData
|
|
3778
|
+
): CancelablePromise<NlpControllerGetSessionResponse> {
|
|
2740
3779
|
return __request(OpenAPI, {
|
|
2741
|
-
method: '
|
|
2742
|
-
url: '/api/v1/{region}/bean/
|
|
3780
|
+
method: 'GET',
|
|
3781
|
+
url: '/api/v1/{region}/bean/nlp/session',
|
|
2743
3782
|
path: {
|
|
2744
|
-
providerName: data.providerName,
|
|
2745
3783
|
region: data.region
|
|
2746
3784
|
},
|
|
2747
|
-
|
|
2748
|
-
|
|
3785
|
+
query: {
|
|
3786
|
+
sessionId: data.sessionId
|
|
3787
|
+
},
|
|
2749
3788
|
errors: {
|
|
2750
|
-
|
|
2751
|
-
401: 'Missing or invalid authentication',
|
|
2752
|
-
404: 'Provider not supported'
|
|
3789
|
+
401: 'Unauthorized'
|
|
2753
3790
|
}
|
|
2754
3791
|
});
|
|
2755
3792
|
}
|
|
3793
|
+
}
|
|
2756
3794
|
|
|
3795
|
+
export class BeanPlatformsService {
|
|
2757
3796
|
/**
|
|
2758
|
-
* Get
|
|
2759
|
-
*
|
|
2760
|
-
* @param data The data for the request.
|
|
2761
|
-
* @param data.region Region code for tenant context
|
|
2762
|
-
* @returns SupportedProvidersResponseDto List of supported providers
|
|
3797
|
+
* Get all platforms with statistics
|
|
3798
|
+
* @returns unknown List of platforms with binding and account counts
|
|
2763
3799
|
* @throws ApiError
|
|
2764
3800
|
*/
|
|
2765
|
-
public static
|
|
2766
|
-
data: ProviderSyncControllerGetSupportedProvidersData
|
|
2767
|
-
): CancelablePromise<ProviderSyncControllerGetSupportedProvidersResponse> {
|
|
3801
|
+
public static platformControllerFindAll(): CancelablePromise<PlatformControllerFindAllResponse> {
|
|
2768
3802
|
return __request(OpenAPI, {
|
|
2769
3803
|
method: 'GET',
|
|
2770
|
-
url: '/api/v1/
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
3804
|
+
url: '/api/v1/bean/platforms'
|
|
3805
|
+
});
|
|
3806
|
+
}
|
|
3807
|
+
|
|
3808
|
+
/**
|
|
3809
|
+
* Create a new platform
|
|
3810
|
+
* @param data The data for the request.
|
|
3811
|
+
* @param data.requestBody
|
|
3812
|
+
* @returns unknown Platform created successfully
|
|
3813
|
+
* @throws ApiError
|
|
3814
|
+
*/
|
|
3815
|
+
public static platformControllerCreate(
|
|
3816
|
+
data: PlatformControllerCreateData
|
|
3817
|
+
): CancelablePromise<PlatformControllerCreateResponse> {
|
|
3818
|
+
return __request(OpenAPI, {
|
|
3819
|
+
method: 'POST',
|
|
3820
|
+
url: '/api/v1/bean/platforms',
|
|
3821
|
+
body: data.requestBody,
|
|
3822
|
+
mediaType: 'application/json',
|
|
2774
3823
|
errors: {
|
|
2775
|
-
|
|
3824
|
+
409: 'Platform already exists'
|
|
2776
3825
|
}
|
|
2777
3826
|
});
|
|
2778
3827
|
}
|
|
2779
3828
|
|
|
2780
3829
|
/**
|
|
2781
|
-
*
|
|
2782
|
-
* Returns whether a specific provider is supported.
|
|
3830
|
+
* Get platform list for current user
|
|
2783
3831
|
* @param data The data for the request.
|
|
2784
|
-
* @param data.
|
|
2785
|
-
* @
|
|
2786
|
-
* @returns unknown Provider support status
|
|
3832
|
+
* @param data.region Region code (ISO 3166-1 alpha-2) that biases within-type-bucket ordering (local-region platforms first). Case-insensitive — stored/compared UPPERCASE ("cn" == "CN").
|
|
3833
|
+
* @returns PlatformListItemDto List of platforms with user binding status
|
|
2787
3834
|
* @throws ApiError
|
|
2788
3835
|
*/
|
|
2789
|
-
public static
|
|
2790
|
-
data:
|
|
2791
|
-
): CancelablePromise<
|
|
3836
|
+
public static platformControllerGetPlatformList(
|
|
3837
|
+
data: PlatformControllerGetPlatformListData = {}
|
|
3838
|
+
): CancelablePromise<PlatformControllerGetPlatformListResponse> {
|
|
2792
3839
|
return __request(OpenAPI, {
|
|
2793
3840
|
method: 'GET',
|
|
2794
|
-
url: '/api/v1/
|
|
2795
|
-
|
|
2796
|
-
providerName: data.providerName,
|
|
3841
|
+
url: '/api/v1/bean/platforms/list',
|
|
3842
|
+
query: {
|
|
2797
3843
|
region: data.region
|
|
2798
|
-
},
|
|
2799
|
-
errors: {
|
|
2800
|
-
401: 'Missing or invalid authentication'
|
|
2801
3844
|
}
|
|
2802
3845
|
});
|
|
2803
3846
|
}
|
|
2804
|
-
}
|
|
2805
3847
|
|
|
2806
|
-
export class ImportTelemetryService {
|
|
2807
3848
|
/**
|
|
2808
|
-
*
|
|
3849
|
+
* Match platforms by name or alias
|
|
2809
3850
|
* @param data The data for the request.
|
|
2810
|
-
* @param data.
|
|
2811
|
-
* @param data.
|
|
2812
|
-
* @returns
|
|
3851
|
+
* @param data.q Search query — Chinese name, English name, or abbreviation
|
|
3852
|
+
* @param data.region Region code (ISO 3166-1 alpha-2) that biases within-tier ordering (local-region platforms first); also the intended categoryOverrides key. Case-insensitive — stored/compared UPPERCASE ("cn" == "CN").
|
|
3853
|
+
* @returns PlatformMatchResponseDto Matching platforms with overall match type and truncation flag
|
|
2813
3854
|
* @throws ApiError
|
|
2814
3855
|
*/
|
|
2815
|
-
public static
|
|
2816
|
-
data:
|
|
2817
|
-
): CancelablePromise<
|
|
3856
|
+
public static platformControllerMatchPlatforms(
|
|
3857
|
+
data: PlatformControllerMatchPlatformsData
|
|
3858
|
+
): CancelablePromise<PlatformControllerMatchPlatformsResponse> {
|
|
2818
3859
|
return __request(OpenAPI, {
|
|
2819
|
-
method: '
|
|
2820
|
-
url: '/api/v1/
|
|
2821
|
-
|
|
3860
|
+
method: 'GET',
|
|
3861
|
+
url: '/api/v1/bean/platforms/match',
|
|
3862
|
+
query: {
|
|
3863
|
+
q: data.q,
|
|
2822
3864
|
region: data.region
|
|
2823
|
-
},
|
|
2824
|
-
body: data.requestBody,
|
|
2825
|
-
mediaType: 'application/json',
|
|
2826
|
-
errors: {
|
|
2827
|
-
401: 'Unauthorized'
|
|
2828
3865
|
}
|
|
2829
3866
|
});
|
|
2830
3867
|
}
|
|
2831
|
-
}
|
|
2832
3868
|
|
|
2833
|
-
export class BeanNlpService {
|
|
2834
3869
|
/**
|
|
2835
|
-
*
|
|
2836
|
-
* 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"
|
|
3870
|
+
* Get the region and candidate account standards for a platform
|
|
2837
3871
|
* @param data The data for the request.
|
|
2838
|
-
* @param data.
|
|
2839
|
-
* @param data.
|
|
2840
|
-
* @
|
|
3872
|
+
* @param data.id Platform ID (from a match result)
|
|
3873
|
+
* @param data.region Region code (ISO 3166-1 alpha-2, case-insensitive). Required for global platforms (countryCode null) — resolved as their template region; ignored when the platform has its own countryCode.
|
|
3874
|
+
* @param data.type Filter templates by account type (path first segment)
|
|
3875
|
+
* @returns PlatformStandardsResponseDto Resolved region plus the merged account-standard catalog of that region (groupable by productCategory client-side)
|
|
2841
3876
|
* @throws ApiError
|
|
2842
3877
|
*/
|
|
2843
|
-
public static
|
|
2844
|
-
data:
|
|
2845
|
-
): CancelablePromise<
|
|
3878
|
+
public static platformControllerGetPlatformStandards(
|
|
3879
|
+
data: PlatformControllerGetPlatformStandardsData
|
|
3880
|
+
): CancelablePromise<PlatformControllerGetPlatformStandardsResponse> {
|
|
2846
3881
|
return __request(OpenAPI, {
|
|
2847
|
-
method: '
|
|
2848
|
-
url: '/api/v1/{
|
|
3882
|
+
method: 'GET',
|
|
3883
|
+
url: '/api/v1/bean/platforms/{id}/standards',
|
|
2849
3884
|
path: {
|
|
2850
|
-
|
|
3885
|
+
id: data.id
|
|
2851
3886
|
},
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
400: 'Invalid input',
|
|
2856
|
-
401: 'Unauthorized'
|
|
3887
|
+
query: {
|
|
3888
|
+
region: data.region,
|
|
3889
|
+
type: data.type
|
|
2857
3890
|
}
|
|
2858
3891
|
});
|
|
2859
3892
|
}
|
|
2860
3893
|
|
|
2861
3894
|
/**
|
|
2862
|
-
*
|
|
2863
|
-
* Clear the current NLP dialogue session. Use this to cancel an ongoing multi-turn dialogue.
|
|
3895
|
+
* Update a platform
|
|
2864
3896
|
* @param data The data for the request.
|
|
2865
|
-
* @param data.
|
|
2866
|
-
* @param data.
|
|
2867
|
-
* @returns
|
|
3897
|
+
* @param data.id Platform ID
|
|
3898
|
+
* @param data.requestBody
|
|
3899
|
+
* @returns unknown Platform updated successfully
|
|
2868
3900
|
* @throws ApiError
|
|
2869
3901
|
*/
|
|
2870
|
-
public static
|
|
2871
|
-
data:
|
|
2872
|
-
): CancelablePromise<
|
|
3902
|
+
public static platformControllerUpdate(
|
|
3903
|
+
data: PlatformControllerUpdateData
|
|
3904
|
+
): CancelablePromise<PlatformControllerUpdateResponse> {
|
|
2873
3905
|
return __request(OpenAPI, {
|
|
2874
|
-
method: '
|
|
2875
|
-
url: '/api/v1/
|
|
3906
|
+
method: 'PUT',
|
|
3907
|
+
url: '/api/v1/bean/platforms/{id}',
|
|
2876
3908
|
path: {
|
|
2877
|
-
|
|
2878
|
-
},
|
|
2879
|
-
query: {
|
|
2880
|
-
sessionId: data.sessionId
|
|
3909
|
+
id: data.id
|
|
2881
3910
|
},
|
|
3911
|
+
body: data.requestBody,
|
|
3912
|
+
mediaType: 'application/json',
|
|
2882
3913
|
errors: {
|
|
2883
|
-
|
|
3914
|
+
404: 'Platform not found'
|
|
2884
3915
|
}
|
|
2885
3916
|
});
|
|
2886
3917
|
}
|
|
2887
3918
|
|
|
2888
3919
|
/**
|
|
2889
|
-
*
|
|
2890
|
-
* Get the current NLP dialogue session state. Useful for debugging and displaying session context in UI.
|
|
3920
|
+
* Delete a platform
|
|
2891
3921
|
* @param data The data for the request.
|
|
2892
|
-
* @param data.
|
|
2893
|
-
* @
|
|
2894
|
-
* @returns unknown Current session state (or null if no active session)
|
|
3922
|
+
* @param data.id Platform ID
|
|
3923
|
+
* @returns void Platform deleted successfully
|
|
2895
3924
|
* @throws ApiError
|
|
2896
3925
|
*/
|
|
2897
|
-
public static
|
|
2898
|
-
data:
|
|
2899
|
-
): CancelablePromise<
|
|
3926
|
+
public static platformControllerDelete(
|
|
3927
|
+
data: PlatformControllerDeleteData
|
|
3928
|
+
): CancelablePromise<PlatformControllerDeleteResponse> {
|
|
2900
3929
|
return __request(OpenAPI, {
|
|
2901
|
-
method: '
|
|
2902
|
-
url: '/api/v1/
|
|
3930
|
+
method: 'DELETE',
|
|
3931
|
+
url: '/api/v1/bean/platforms/{id}',
|
|
2903
3932
|
path: {
|
|
2904
|
-
|
|
2905
|
-
},
|
|
2906
|
-
query: {
|
|
2907
|
-
sessionId: data.sessionId
|
|
3933
|
+
id: data.id
|
|
2908
3934
|
},
|
|
2909
3935
|
errors: {
|
|
2910
|
-
|
|
3936
|
+
404: 'Platform not found'
|
|
2911
3937
|
}
|
|
2912
3938
|
});
|
|
2913
3939
|
}
|
|
@@ -2948,6 +3974,7 @@ export class DashboardService {
|
|
|
2948
3974
|
* @param data.region Region code for tenant context
|
|
2949
3975
|
* @param data.groupBy Grouping strategy
|
|
2950
3976
|
* @param data.date Date for balance calculation (ISO 8601 format)
|
|
3977
|
+
* @param data.accountId Scope to a single account (only valid with groupBy=holdingAssetClass, ADR-0105 §6)
|
|
2951
3978
|
* @returns unknown Accounts retrieved successfully. Response type depends on groupBy parameter.
|
|
2952
3979
|
* @throws ApiError
|
|
2953
3980
|
*/
|
|
@@ -2962,7 +3989,8 @@ export class DashboardService {
|
|
|
2962
3989
|
},
|
|
2963
3990
|
query: {
|
|
2964
3991
|
groupBy: data.groupBy,
|
|
2965
|
-
date: data.date
|
|
3992
|
+
date: data.date,
|
|
3993
|
+
accountId: data.accountId
|
|
2966
3994
|
},
|
|
2967
3995
|
errors: {
|
|
2968
3996
|
401: 'User not authenticated'
|
|
@@ -2997,124 +4025,97 @@ export class DashboardService {
|
|
|
2997
4025
|
}
|
|
2998
4026
|
});
|
|
2999
4027
|
}
|
|
3000
|
-
}
|
|
3001
4028
|
|
|
3002
|
-
export class ReportingService {
|
|
3003
4029
|
/**
|
|
3004
|
-
* Get
|
|
3005
|
-
*
|
|
3006
|
-
* Returns time series data of portfolio net worth.
|
|
3007
|
-
*
|
|
3008
|
-
* **Multi-currency Support:**
|
|
3009
|
-
* - `series[].byCurrency` - Currency breakdown for each data point
|
|
3010
|
-
* - `byCurrency` - Separate time series grouped by currency
|
|
3011
|
-
* - `warnings` - Exchange rate warnings if conversion failed
|
|
3012
|
-
*
|
|
3013
|
-
* **Parameters:**
|
|
3014
|
-
* - `period`: Time period (1m, 3m, 6m, 1y)
|
|
3015
|
-
* - `granularity`: Data granularity (day, week, month)
|
|
3016
|
-
*
|
|
4030
|
+
* Get expenses/income grouped by functional category
|
|
4031
|
+
* Returns amounts pre-aggregated by functional category (account-path Group segment) with server-side multi-currency conversion. flow=expense (default) aggregates ^Expenses: accounts; flow=income aggregates ^Income: accounts (issue #518)
|
|
3017
4032
|
* @param data The data for the request.
|
|
3018
4033
|
* @param data.region Region code for tenant context
|
|
3019
|
-
* @param data.
|
|
3020
|
-
* @param data.
|
|
3021
|
-
* @
|
|
4034
|
+
* @param data.groupBy Grouping strategy
|
|
4035
|
+
* @param data.period Time window (1m = current calendar month)
|
|
4036
|
+
* @param data.flow Account root to aggregate (expense → ^Expenses:, income → ^Income:)
|
|
4037
|
+
* @returns ExpensesByCategoryResponseDto Expenses retrieved successfully
|
|
3022
4038
|
* @throws ApiError
|
|
3023
4039
|
*/
|
|
3024
|
-
public static
|
|
3025
|
-
data:
|
|
3026
|
-
): CancelablePromise<
|
|
4040
|
+
public static dashboardControllerGetExpenses(
|
|
4041
|
+
data: DashboardControllerGetExpensesData
|
|
4042
|
+
): CancelablePromise<DashboardControllerGetExpensesResponse> {
|
|
3027
4043
|
return __request(OpenAPI, {
|
|
3028
4044
|
method: 'GET',
|
|
3029
|
-
url: '/api/v1/{region}/
|
|
4045
|
+
url: '/api/v1/{region}/dashboard/expenses',
|
|
3030
4046
|
path: {
|
|
3031
4047
|
region: data.region
|
|
3032
4048
|
},
|
|
3033
4049
|
query: {
|
|
4050
|
+
groupBy: data.groupBy,
|
|
3034
4051
|
period: data.period,
|
|
3035
|
-
|
|
4052
|
+
flow: data.flow
|
|
3036
4053
|
},
|
|
3037
4054
|
errors: {
|
|
4055
|
+
400: 'Invalid groupBy or period',
|
|
3038
4056
|
401: 'User not authenticated'
|
|
3039
4057
|
}
|
|
3040
4058
|
});
|
|
3041
4059
|
}
|
|
3042
4060
|
|
|
3043
4061
|
/**
|
|
3044
|
-
*
|
|
3045
|
-
*
|
|
3046
|
-
* Manually generate a portfolio snapshot for a specific date.
|
|
3047
|
-
*
|
|
3048
|
-
* **Multi-currency Support:**
|
|
3049
|
-
* - Fetches balances grouped by currency
|
|
3050
|
-
* - Uses user's baseCurrency setting for conversion
|
|
3051
|
-
* - Stores exchange rates and warnings
|
|
3052
|
-
*
|
|
3053
|
-
* **Use Cases:**
|
|
3054
|
-
* - Testing snapshot generation
|
|
3055
|
-
* - Force regeneration after data correction
|
|
3056
|
-
* - Initial setup for new users
|
|
3057
|
-
*
|
|
4062
|
+
* Get the composite P8 advisor context
|
|
4063
|
+
* Assembles the P8 data context in one call: net worth (verbatim GET /dashboard/net-worth shape, user base currency semantics per ADR-0070), trailing-12m flow totals over the 12 calendar months including the as-of month, and top-3 expense categories by account-path leaf key — both flow blocks priced in CNY per the P8 contract. The P8 snake_case field spellings (as_of, net_worth, trailing_12m) are mapped by the consumer; the wire keeps the family camelCase
|
|
3058
4064
|
* @param data The data for the request.
|
|
3059
4065
|
* @param data.region Region code for tenant context
|
|
3060
|
-
* @param data.
|
|
3061
|
-
* @returns
|
|
4066
|
+
* @param data.date As-of date for the snapshot and the trailing-12m window anchor (ISO 8601 format)
|
|
4067
|
+
* @returns AdvisorContextResponseDto Advisor context retrieved successfully
|
|
3062
4068
|
* @throws ApiError
|
|
3063
4069
|
*/
|
|
3064
|
-
public static
|
|
3065
|
-
data:
|
|
3066
|
-
): CancelablePromise<
|
|
4070
|
+
public static dashboardControllerGetAdvisorContext(
|
|
4071
|
+
data: DashboardControllerGetAdvisorContextData
|
|
4072
|
+
): CancelablePromise<DashboardControllerGetAdvisorContextResponse> {
|
|
3067
4073
|
return __request(OpenAPI, {
|
|
3068
|
-
method: '
|
|
3069
|
-
url: '/api/v1/{region}/
|
|
4074
|
+
method: 'GET',
|
|
4075
|
+
url: '/api/v1/{region}/dashboard/advisor-context',
|
|
3070
4076
|
path: {
|
|
3071
4077
|
region: data.region
|
|
3072
4078
|
},
|
|
3073
|
-
|
|
3074
|
-
|
|
4079
|
+
query: {
|
|
4080
|
+
date: data.date
|
|
4081
|
+
},
|
|
3075
4082
|
errors: {
|
|
3076
4083
|
400: 'Invalid date format',
|
|
3077
|
-
401: 'User not authenticated'
|
|
4084
|
+
401: 'User not authenticated, or the token is not advisor-scoped (exchange via POST /auth/sessions/advisor, #1512)'
|
|
3078
4085
|
}
|
|
3079
4086
|
});
|
|
3080
4087
|
}
|
|
4088
|
+
}
|
|
3081
4089
|
|
|
4090
|
+
export class InvestmentService {
|
|
3082
4091
|
/**
|
|
3083
|
-
*
|
|
3084
|
-
*
|
|
3085
|
-
* Generate snapshots for a date range (historical data backfill).
|
|
3086
|
-
*
|
|
3087
|
-
* **Multi-currency Support:**
|
|
3088
|
-
* - Each snapshot includes multi-currency data
|
|
3089
|
-
* - Uses exchange rates available at generation time
|
|
3090
|
-
* - Warnings stored for missing exchange rates
|
|
3091
|
-
*
|
|
3092
|
-
* **Best Practices:**
|
|
3093
|
-
* - Use for initial setup after account configuration
|
|
3094
|
-
* - Run during low-traffic periods for large date ranges
|
|
3095
|
-
* - Existing snapshots are skipped (not regenerated)
|
|
3096
|
-
*
|
|
4092
|
+
* Get per-holding unrealized + realized P&L
|
|
4093
|
+
* Average-cost unrealized P&L per account × commodity, plus cumulative realized P&L on sold lots (method = FIFO | average, default average).
|
|
3097
4094
|
* @param data The data for the request.
|
|
3098
4095
|
* @param data.region Region code for tenant context
|
|
3099
|
-
* @param data.
|
|
3100
|
-
* @
|
|
4096
|
+
* @param data.asOf As-of date (ISO 8601), defaults to today
|
|
4097
|
+
* @param data.accountId Scope to a single account
|
|
4098
|
+
* @param data.method Realized-P&L lot-matching method (default average). Does not affect the average-cost unrealized basis.
|
|
4099
|
+
* @returns HoldingPnlResponseDto Holding P&L retrieved successfully
|
|
3101
4100
|
* @throws ApiError
|
|
3102
4101
|
*/
|
|
3103
|
-
public static
|
|
3104
|
-
data:
|
|
3105
|
-
): CancelablePromise<
|
|
4102
|
+
public static holdingPnlControllerGetHoldingPnl(
|
|
4103
|
+
data: HoldingPnlControllerGetHoldingPnlData
|
|
4104
|
+
): CancelablePromise<HoldingPnlControllerGetHoldingPnlResponse> {
|
|
3106
4105
|
return __request(OpenAPI, {
|
|
3107
|
-
method: '
|
|
3108
|
-
url: '/api/v1/{region}/
|
|
4106
|
+
method: 'GET',
|
|
4107
|
+
url: '/api/v1/{region}/investment/holdings/pnl',
|
|
3109
4108
|
path: {
|
|
3110
4109
|
region: data.region
|
|
3111
4110
|
},
|
|
3112
|
-
|
|
3113
|
-
|
|
4111
|
+
query: {
|
|
4112
|
+
asOf: data.asOf,
|
|
4113
|
+
accountId: data.accountId,
|
|
4114
|
+
method: data.method
|
|
4115
|
+
},
|
|
3114
4116
|
errors: {
|
|
3115
|
-
400: 'Invalid date format or
|
|
3116
|
-
401: 'User not authenticated'
|
|
3117
|
-
409: 'Backfill already in progress for this user'
|
|
4117
|
+
400: 'Invalid asOf format/value/future date, invalid accountId format, or unsupported method',
|
|
4118
|
+
401: 'User not authenticated'
|
|
3118
4119
|
}
|
|
3119
4120
|
});
|
|
3120
4121
|
}
|
|
@@ -3143,7 +4144,7 @@ export class AuthService {
|
|
|
3143
4144
|
* Anonymous login with access token
|
|
3144
4145
|
* @param data The data for the request.
|
|
3145
4146
|
* @param data.requestBody
|
|
3146
|
-
* @returns
|
|
4147
|
+
* @returns AnonymousLoginResponseDto Login successful
|
|
3147
4148
|
* @throws ApiError
|
|
3148
4149
|
*/
|
|
3149
4150
|
public static authControllerAccessTokenLogin(
|
|
@@ -3159,17 +4160,75 @@ export class AuthService {
|
|
|
3159
4160
|
}
|
|
3160
4161
|
});
|
|
3161
4162
|
}
|
|
4163
|
+
|
|
4164
|
+
/**
|
|
4165
|
+
* Exchange an access token for an advisor-scoped, short-TTL JWT (#1512)
|
|
4166
|
+
* @param data The data for the request.
|
|
4167
|
+
* @param data.requestBody
|
|
4168
|
+
* @returns AdvisorLoginResponseDto Advisor-scope login successful — the token is valid only on advisor tool-face endpoints (e.g. GET /:region/dashboard/advisor-context)
|
|
4169
|
+
* @throws ApiError
|
|
4170
|
+
*/
|
|
4171
|
+
public static authControllerAdvisorTokenLogin(
|
|
4172
|
+
data: AuthControllerAdvisorTokenLoginData
|
|
4173
|
+
): CancelablePromise<AuthControllerAdvisorTokenLoginResponse> {
|
|
4174
|
+
return __request(OpenAPI, {
|
|
4175
|
+
method: 'POST',
|
|
4176
|
+
url: '/api/v1/auth/sessions/advisor',
|
|
4177
|
+
body: data.requestBody,
|
|
4178
|
+
mediaType: 'application/json',
|
|
4179
|
+
errors: {
|
|
4180
|
+
401: 'Invalid access token'
|
|
4181
|
+
}
|
|
4182
|
+
});
|
|
4183
|
+
}
|
|
4184
|
+
}
|
|
4185
|
+
|
|
4186
|
+
export class CommunityService {
|
|
4187
|
+
/**
|
|
4188
|
+
* Relay a sanitized parser-contribution payload
|
|
4189
|
+
* A server-side bot re-sanitizes the payload and opens an issue on the target repository; the issue URL is returned. The payload is never persisted or logged (forward-and-drop).
|
|
4190
|
+
* @param data The data for the request.
|
|
4191
|
+
* @param data.region Region code for tenant context (routing only; the institution region rides in the payload meta)
|
|
4192
|
+
* @param data.requestBody
|
|
4193
|
+
* @returns ParserContributionRelayResponseDto Issue created by the bot
|
|
4194
|
+
* @throws ApiError
|
|
4195
|
+
*/
|
|
4196
|
+
public static parserContributionControllerCreate(
|
|
4197
|
+
data: ParserContributionControllerCreateData
|
|
4198
|
+
): CancelablePromise<ParserContributionControllerCreateResponse> {
|
|
4199
|
+
return __request(OpenAPI, {
|
|
4200
|
+
method: 'POST',
|
|
4201
|
+
url: '/api/v1/{region}/community/parser-contributions',
|
|
4202
|
+
path: {
|
|
4203
|
+
region: data.region
|
|
4204
|
+
},
|
|
4205
|
+
body: data.requestBody,
|
|
4206
|
+
mediaType: 'application/json',
|
|
4207
|
+
errors: {
|
|
4208
|
+
401: 'Unauthorized',
|
|
4209
|
+
422: 'Validation failed (institution slug, empty samples, row/cell size limits)',
|
|
4210
|
+
429: 'Rate limited (5 submissions per user per hour)',
|
|
4211
|
+
501: 'Relay not configured on this deployment — clients fall back to the clipboard flow',
|
|
4212
|
+
502: 'GitHub bot failure (upstream), safe to retry'
|
|
4213
|
+
}
|
|
4214
|
+
});
|
|
4215
|
+
}
|
|
3162
4216
|
}
|
|
3163
4217
|
|
|
3164
|
-
export class
|
|
4218
|
+
export class AdminCacheService {
|
|
3165
4219
|
/**
|
|
3166
|
-
*
|
|
4220
|
+
* Flush entire cache (L1 + L2)
|
|
4221
|
+
* Clears ALL cache entries across ALL namespaces and users. Use only for emergency cache corruption recovery, maintenance-window refresh, or development resets.
|
|
4222
|
+
* @returns unknown Cache flushed successfully
|
|
3167
4223
|
* @throws ApiError
|
|
3168
4224
|
*/
|
|
3169
4225
|
public static cacheControllerFlushCache(): CancelablePromise<CacheControllerFlushCacheResponse> {
|
|
3170
4226
|
return __request(OpenAPI, {
|
|
3171
4227
|
method: 'POST',
|
|
3172
|
-
url: '/api/v1/cache/flush'
|
|
4228
|
+
url: '/api/v1/cache/flush',
|
|
4229
|
+
errors: {
|
|
4230
|
+
403: 'Admin access required'
|
|
4231
|
+
}
|
|
3173
4232
|
});
|
|
3174
4233
|
}
|
|
3175
4234
|
}
|
|
@@ -3330,3 +4389,53 @@ export class InfoService {
|
|
|
3330
4389
|
});
|
|
3331
4390
|
}
|
|
3332
4391
|
}
|
|
4392
|
+
|
|
4393
|
+
export class MarketDataService {
|
|
4394
|
+
/**
|
|
4395
|
+
* Search market symbols by name or code
|
|
4396
|
+
* Ranked search over the openbb catalog. Empty `q` returns [].
|
|
4397
|
+
* @param data The data for the request.
|
|
4398
|
+
* @param data.q Search term — matched against symbol and instrument name. Empty string returns [].
|
|
4399
|
+
* @param data.limit Maximum number of results (clamped 1..50)
|
|
4400
|
+
* @param data.exchange Filter by exchange code (e.g. US, HK, SS, SZ). A-share codes also match symbol notations and venue-code aliases (exchange=SS matches SH/SHH column values and bare 6-digit Shanghai symbols; SZ likewise)
|
|
4401
|
+
* @param data.assetType Filter by OpenBB asset_type (e.g. stock, etf)
|
|
4402
|
+
* @returns SymbolSearchResultDto Ranked search results
|
|
4403
|
+
* @throws ApiError
|
|
4404
|
+
*/
|
|
4405
|
+
public static symbolControllerSearch(
|
|
4406
|
+
data: SymbolControllerSearchData
|
|
4407
|
+
): CancelablePromise<SymbolControllerSearchResponse> {
|
|
4408
|
+
return __request(OpenAPI, {
|
|
4409
|
+
method: 'GET',
|
|
4410
|
+
url: '/api/v1/market/symbols/search',
|
|
4411
|
+
query: {
|
|
4412
|
+
q: data.q,
|
|
4413
|
+
limit: data.limit,
|
|
4414
|
+
exchange: data.exchange,
|
|
4415
|
+
assetType: data.assetType
|
|
4416
|
+
}
|
|
4417
|
+
});
|
|
4418
|
+
}
|
|
4419
|
+
|
|
4420
|
+
/**
|
|
4421
|
+
* Get a market symbol quote
|
|
4422
|
+
* @param data The data for the request.
|
|
4423
|
+
* @param data.symbol
|
|
4424
|
+
* @returns SymbolQuoteDto Symbol quote
|
|
4425
|
+
* @throws ApiError
|
|
4426
|
+
*/
|
|
4427
|
+
public static symbolControllerGetQuote(
|
|
4428
|
+
data: SymbolControllerGetQuoteData
|
|
4429
|
+
): CancelablePromise<SymbolControllerGetQuoteResponse> {
|
|
4430
|
+
return __request(OpenAPI, {
|
|
4431
|
+
method: 'GET',
|
|
4432
|
+
url: '/api/v1/market/symbols/{symbol}/quote',
|
|
4433
|
+
path: {
|
|
4434
|
+
symbol: data.symbol
|
|
4435
|
+
},
|
|
4436
|
+
errors: {
|
|
4437
|
+
404: 'Symbol not found in the openbb catalog'
|
|
4438
|
+
}
|
|
4439
|
+
});
|
|
4440
|
+
}
|
|
4441
|
+
}
|