@firela/api-types 0.0.0-canary.ae1b1ce4 → 0.0.0-canary.aea54c4
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 +5782 -3142
- package/dist/index.d.ts +5782 -3142
- package/dist/index.js +62 -7
- package/dist/index.mjs +62 -7
- package/package.json +1 -1
- package/src/generated/schemas.gen.ts +6330 -3282
- package/src/generated/services.gen.ts +1974 -897
- package/src/generated/types.gen.ts +27755 -3702
|
@@ -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,8 @@ import type {
|
|
|
29
31
|
TransactionControllerListResponse,
|
|
30
32
|
TransactionControllerCreateBatchData,
|
|
31
33
|
TransactionControllerCreateBatchResponse,
|
|
34
|
+
TransactionControllerBatchVoidData,
|
|
35
|
+
TransactionControllerBatchVoidResponse,
|
|
32
36
|
TransactionControllerCorrectData,
|
|
33
37
|
TransactionControllerCorrectResponse,
|
|
34
38
|
TransactionControllerSuggestTagsData,
|
|
@@ -55,6 +59,48 @@ import type {
|
|
|
55
59
|
ReviewControllerUndoResponse,
|
|
56
60
|
ReviewControllerBatchResolveData,
|
|
57
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,
|
|
58
104
|
PayeeControllerCreateData,
|
|
59
105
|
PayeeControllerCreateResponse,
|
|
60
106
|
PayeeControllerFindAllData,
|
|
@@ -83,6 +129,7 @@ import type {
|
|
|
83
129
|
PayeeProfileAdminControllerVerifyResponse,
|
|
84
130
|
PayeeProfileAdminControllerUnverifyData,
|
|
85
131
|
PayeeProfileAdminControllerUnverifyResponse,
|
|
132
|
+
PayeeProfileControllerListActiveResponse,
|
|
86
133
|
CommodityControllerCreateData,
|
|
87
134
|
CommodityControllerCreateResponse,
|
|
88
135
|
CommodityControllerFindAllData,
|
|
@@ -97,6 +144,26 @@ import type {
|
|
|
97
144
|
CommodityControllerGetOrCreateResponse,
|
|
98
145
|
CommodityControllerBulkCreateData,
|
|
99
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,
|
|
100
167
|
RecurringRuleControllerCreateData,
|
|
101
168
|
RecurringRuleControllerCreateResponse,
|
|
102
169
|
RecurringRuleControllerFindAllData,
|
|
@@ -129,48 +196,31 @@ import type {
|
|
|
129
196
|
ExpectedTransactionControllerEnterNowResponse,
|
|
130
197
|
ForecastControllerGetForecastData,
|
|
131
198
|
ForecastControllerGetForecastResponse,
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
UserControllerSignupUserResponse,
|
|
158
|
-
UserControllerDeleteUserData,
|
|
159
|
-
UserControllerDeleteUserResponse,
|
|
160
|
-
UserControllerGetUserInfoData,
|
|
161
|
-
UserControllerGetUserInfoResponse,
|
|
162
|
-
UserControllerUpdateUserSettingData,
|
|
163
|
-
UserControllerUpdateUserSettingResponse,
|
|
164
|
-
UserControllerGetAllUserSettingsByPageData,
|
|
165
|
-
UserControllerGetAllUserSettingsByPageResponse,
|
|
166
|
-
UserControllerGetAssetLiabilitySummaryResponse,
|
|
167
|
-
PropertyControllerGetAllResponse,
|
|
168
|
-
PropertyControllerGetByKeyData,
|
|
169
|
-
PropertyControllerGetByKeyResponse,
|
|
170
|
-
PropertyControllerUpdateData,
|
|
171
|
-
PropertyControllerUpdateResponse,
|
|
172
|
-
PropertyControllerDeleteData,
|
|
173
|
-
PropertyControllerDeleteResponse,
|
|
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,
|
|
174
224
|
ExportControllerExportBeancountResponse,
|
|
175
225
|
FileImportControllerImportFileData,
|
|
176
226
|
FileImportControllerImportFileResponse,
|
|
@@ -184,45 +234,64 @@ import type {
|
|
|
184
234
|
ImporterConfigControllerUpdateConfigResponse,
|
|
185
235
|
ImporterConfigControllerResetConfigData,
|
|
186
236
|
ImporterConfigControllerResetConfigResponse,
|
|
187
|
-
PlatformControllerFindAllResponse,
|
|
188
|
-
PlatformControllerCreateData,
|
|
189
|
-
PlatformControllerCreateResponse,
|
|
190
|
-
PlatformControllerGetPlatformListResponse,
|
|
191
|
-
PlatformControllerMatchPlatformsData,
|
|
192
|
-
PlatformControllerMatchPlatformsResponse,
|
|
193
|
-
PlatformControllerUpdateData,
|
|
194
|
-
PlatformControllerUpdateResponse,
|
|
195
|
-
PlatformControllerDeleteData,
|
|
196
|
-
PlatformControllerDeleteResponse,
|
|
197
237
|
ProviderSyncControllerSyncData,
|
|
198
238
|
ProviderSyncControllerSyncResponse,
|
|
199
239
|
ProviderSyncControllerGetSupportedProvidersData,
|
|
200
240
|
ProviderSyncControllerGetSupportedProvidersResponse,
|
|
201
241
|
ProviderSyncControllerIsProviderSupportedData,
|
|
202
242
|
ProviderSyncControllerIsProviderSupportedResponse,
|
|
243
|
+
ExternalAccountLinkControllerCreateData,
|
|
244
|
+
ExternalAccountLinkControllerCreateResponse,
|
|
245
|
+
ExternalAccountLinkControllerFindAllData,
|
|
246
|
+
ExternalAccountLinkControllerFindAllResponse,
|
|
247
|
+
ExternalAccountLinkControllerFindOneData,
|
|
248
|
+
ExternalAccountLinkControllerFindOneResponse,
|
|
249
|
+
ExternalAccountLinkControllerRemoveData,
|
|
250
|
+
ExternalAccountLinkControllerRemoveResponse,
|
|
203
251
|
TelemetryControllerReportTelemetryData,
|
|
204
252
|
TelemetryControllerReportTelemetryResponse,
|
|
253
|
+
TelemetryControllerReportCoverageMissData,
|
|
254
|
+
TelemetryControllerReportCoverageMissResponse,
|
|
255
|
+
TelemetryControllerGetCoverageMetricsData,
|
|
256
|
+
TelemetryControllerGetCoverageMetricsResponse,
|
|
205
257
|
NlpControllerProcessNaturalLanguageData,
|
|
206
258
|
NlpControllerProcessNaturalLanguageResponse,
|
|
207
259
|
NlpControllerClearSessionData,
|
|
208
260
|
NlpControllerClearSessionResponse,
|
|
209
261
|
NlpControllerGetSessionData,
|
|
210
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,
|
|
211
276
|
DashboardControllerGetNetWorthData,
|
|
212
277
|
DashboardControllerGetNetWorthResponse,
|
|
213
278
|
DashboardControllerGetAccountsData,
|
|
214
279
|
DashboardControllerGetAccountsResponse,
|
|
215
280
|
DashboardControllerGetCashFlowData,
|
|
216
281
|
DashboardControllerGetCashFlowResponse,
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
282
|
+
DashboardControllerGetExpensesData,
|
|
283
|
+
DashboardControllerGetExpensesResponse,
|
|
284
|
+
DashboardControllerGetAdvisorContextData,
|
|
285
|
+
DashboardControllerGetAdvisorContextResponse,
|
|
286
|
+
HoldingPnlControllerGetHoldingPnlData,
|
|
287
|
+
HoldingPnlControllerGetHoldingPnlResponse,
|
|
223
288
|
ApiKeysControllerCreateApiKeyResponse,
|
|
224
289
|
AuthControllerAccessTokenLoginData,
|
|
225
290
|
AuthControllerAccessTokenLoginResponse,
|
|
291
|
+
AuthControllerAdvisorTokenLoginData,
|
|
292
|
+
AuthControllerAdvisorTokenLoginResponse,
|
|
293
|
+
ParserContributionControllerCreateData,
|
|
294
|
+
ParserContributionControllerCreateResponse,
|
|
226
295
|
CacheControllerFlushCacheResponse,
|
|
227
296
|
ExchangeRateControllerGetExchangeRateData,
|
|
228
297
|
ExchangeRateControllerGetExchangeRateResponse,
|
|
@@ -234,7 +303,11 @@ import type {
|
|
|
234
303
|
HealthControllerResetCircuitBreakerData,
|
|
235
304
|
HealthControllerResetCircuitBreakerResponse,
|
|
236
305
|
HealthControllerGetMetricsResponse,
|
|
237
|
-
InfoControllerGetInfoResponse
|
|
306
|
+
InfoControllerGetInfoResponse,
|
|
307
|
+
SymbolControllerSearchData,
|
|
308
|
+
SymbolControllerSearchResponse,
|
|
309
|
+
SymbolControllerGetQuoteData,
|
|
310
|
+
SymbolControllerGetQuoteResponse
|
|
238
311
|
} from './types.gen';
|
|
239
312
|
|
|
240
313
|
export class BeanAccountsService {
|
|
@@ -272,7 +345,7 @@ export class BeanAccountsService {
|
|
|
272
345
|
* @param data.type Filter by account type
|
|
273
346
|
* @param data.status Filter by status
|
|
274
347
|
* @param data.isCustom Filter by custom (user-created) accounts only
|
|
275
|
-
* @param data.search Search term
|
|
348
|
+
* @param data.search Search term matched against account path and user-set display name (case-insensitive)
|
|
276
349
|
* @param data.limit Maximum number of results
|
|
277
350
|
* @param data.offset Number of results to skip
|
|
278
351
|
* @returns AccountListResponseDto Accounts retrieved successfully
|
|
@@ -353,7 +426,7 @@ export class BeanAccountsService {
|
|
|
353
426
|
|
|
354
427
|
/**
|
|
355
428
|
* Delete account
|
|
356
|
-
* Deletes an account (only if no transactions)
|
|
429
|
+
* Deletes an account (only if no active transactions; voided/superseded residual postings are cleaned up)
|
|
357
430
|
* @param data The data for the request.
|
|
358
431
|
* @param data.id Account UUID
|
|
359
432
|
* @param data.region Region code for tenant context
|
|
@@ -372,7 +445,7 @@ export class BeanAccountsService {
|
|
|
372
445
|
},
|
|
373
446
|
errors: {
|
|
374
447
|
404: 'Account not found',
|
|
375
|
-
409: 'Account has transactions and cannot be deleted'
|
|
448
|
+
409: 'Account has active transactions and cannot be deleted'
|
|
376
449
|
}
|
|
377
450
|
});
|
|
378
451
|
}
|
|
@@ -434,16 +507,45 @@ export class BeanAccountsService {
|
|
|
434
507
|
}
|
|
435
508
|
});
|
|
436
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
|
+
}
|
|
437
539
|
}
|
|
438
540
|
|
|
439
541
|
export class BeanAccountStandardsService {
|
|
440
542
|
/**
|
|
441
543
|
* Get account templates
|
|
442
|
-
* 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).
|
|
443
545
|
* @param data The data for the request.
|
|
444
|
-
* @param data.region Region code (
|
|
546
|
+
* @param data.region Region code (any ISO alpha-2; not-yet-open codes return the universal-only catalog)
|
|
445
547
|
* @param data.type Filter by account type
|
|
446
|
-
* @param data.search Search term for path or
|
|
548
|
+
* @param data.search Search term for path, description, aliases, or localized display name
|
|
447
549
|
* @returns AccountStandardListResponseDto Account templates retrieved successfully
|
|
448
550
|
* @throws ApiError
|
|
449
551
|
*/
|
|
@@ -465,9 +567,9 @@ export class BeanAccountStandardsService {
|
|
|
465
567
|
|
|
466
568
|
/**
|
|
467
569
|
* Get template metadata for an account path
|
|
468
|
-
* Returns
|
|
570
|
+
* Returns root type for a template path.
|
|
469
571
|
* @param data The data for the request.
|
|
470
|
-
* @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)
|
|
471
573
|
* @param data.path Account path to check
|
|
472
574
|
* @returns TemplateMetadataResponseDto Template metadata retrieved successfully
|
|
473
575
|
* @throws ApiError
|
|
@@ -489,9 +591,9 @@ export class BeanAccountStandardsService {
|
|
|
489
591
|
|
|
490
592
|
/**
|
|
491
593
|
* Get available regions with hierarchy
|
|
492
|
-
* Returns
|
|
594
|
+
* Returns the full region catalog (every ISO 3166-1 entry) with an 'open' flag and inheritance metadata (#759)
|
|
493
595
|
* @param data The data for the request.
|
|
494
|
-
* @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)
|
|
495
597
|
* @returns RegionsMetadataResponseDto Regions metadata retrieved successfully
|
|
496
598
|
* @throws ApiError
|
|
497
599
|
*/
|
|
@@ -548,9 +650,11 @@ export class BeanTransactionsService {
|
|
|
548
650
|
* @param data.offset Number of items to skip (default: 0)
|
|
549
651
|
* @param data.dateFrom Filter by start date (inclusive), format: YYYY-MM-DD
|
|
550
652
|
* @param data.dateTo Filter by end date (inclusive), format: YYYY-MM-DD
|
|
551
|
-
* @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).
|
|
552
654
|
* @param data.search Search in narration and payee fields (max 200 chars)
|
|
553
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.
|
|
554
658
|
* @returns TransactionListResponseDto Transaction list
|
|
555
659
|
* @throws ApiError
|
|
556
660
|
*/
|
|
@@ -570,7 +674,9 @@ export class BeanTransactionsService {
|
|
|
570
674
|
dateTo: data.dateTo,
|
|
571
675
|
status: data.status,
|
|
572
676
|
search: data.search,
|
|
573
|
-
accountId: data.accountId
|
|
677
|
+
accountId: data.accountId,
|
|
678
|
+
category: data.category,
|
|
679
|
+
flow: data.flow
|
|
574
680
|
},
|
|
575
681
|
errors: {
|
|
576
682
|
400: 'Validation failed',
|
|
@@ -607,6 +713,34 @@ export class BeanTransactionsService {
|
|
|
607
713
|
});
|
|
608
714
|
}
|
|
609
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
|
+
|
|
610
744
|
/**
|
|
611
745
|
* Correct (supersede) a transaction
|
|
612
746
|
* Atomically voids the original (SUPERSEDED) and creates a replacement through the full validation pipeline.
|
|
@@ -758,7 +892,7 @@ export class BeanBalancesService {
|
|
|
758
892
|
* Query account balance
|
|
759
893
|
* Calculate account balance at a specific date for a single currency
|
|
760
894
|
* @param data The data for the request.
|
|
761
|
-
* @param data.account Account name (e.g., "Assets:
|
|
895
|
+
* @param data.account Account name (e.g., "Assets:Checking")
|
|
762
896
|
* @param data.region Region code for tenant context
|
|
763
897
|
* @param data.date Date to calculate balance at (ISO 8601 format)
|
|
764
898
|
* @param data.currency Currency to query (e.g., "USD", "CNY")
|
|
@@ -951,83 +1085,616 @@ export class BeanReviewsService {
|
|
|
951
1085
|
}
|
|
952
1086
|
}
|
|
953
1087
|
|
|
954
|
-
export class
|
|
1088
|
+
export class BeanTransactionRulesService {
|
|
955
1089
|
/**
|
|
956
|
-
* Create a new
|
|
957
|
-
* 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.
|
|
958
1092
|
* @param data The data for the request.
|
|
1093
|
+
* @param data.region Region code for tenant context
|
|
959
1094
|
* @param data.requestBody
|
|
960
|
-
* @returns
|
|
1095
|
+
* @returns TransactionRuleResponseDto Rule updated successfully (upsert mode)
|
|
961
1096
|
* @throws ApiError
|
|
962
1097
|
*/
|
|
963
|
-
public static
|
|
964
|
-
data:
|
|
965
|
-
): CancelablePromise<
|
|
1098
|
+
public static transactionRuleControllerCreate(
|
|
1099
|
+
data: TransactionRuleControllerCreateData
|
|
1100
|
+
): CancelablePromise<TransactionRuleControllerCreateResponse> {
|
|
966
1101
|
return __request(OpenAPI, {
|
|
967
1102
|
method: 'POST',
|
|
968
|
-
url: '/api/v1/bean/
|
|
1103
|
+
url: '/api/v1/{region}/bean/transaction-rules',
|
|
1104
|
+
path: {
|
|
1105
|
+
region: data.region
|
|
1106
|
+
},
|
|
969
1107
|
body: data.requestBody,
|
|
970
1108
|
mediaType: 'application/json',
|
|
971
1109
|
errors: {
|
|
972
|
-
400: '
|
|
973
|
-
|
|
1110
|
+
400: 'Validation failed',
|
|
1111
|
+
401: 'Unauthorized',
|
|
1112
|
+
409: 'Resource conflict - another process is updating this rule'
|
|
974
1113
|
}
|
|
975
1114
|
});
|
|
976
1115
|
}
|
|
977
1116
|
|
|
978
1117
|
/**
|
|
979
|
-
*
|
|
980
|
-
* Returns all payee mappings for the authenticated user with optional filtering
|
|
1118
|
+
* Get all transaction rules for user
|
|
981
1119
|
* @param data The data for the request.
|
|
982
|
-
* @param data.
|
|
983
|
-
* @param data.
|
|
984
|
-
* @param data.
|
|
985
|
-
* @param data.
|
|
986
|
-
* @param data.
|
|
987
|
-
* @
|
|
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
|
|
988
1127
|
* @throws ApiError
|
|
989
1128
|
*/
|
|
990
|
-
public static
|
|
991
|
-
data:
|
|
992
|
-
): CancelablePromise<
|
|
1129
|
+
public static transactionRuleControllerList(
|
|
1130
|
+
data: TransactionRuleControllerListData
|
|
1131
|
+
): CancelablePromise<TransactionRuleControllerListResponse> {
|
|
993
1132
|
return __request(OpenAPI, {
|
|
994
1133
|
method: 'GET',
|
|
995
|
-
url: '/api/v1/bean/
|
|
1134
|
+
url: '/api/v1/{region}/bean/transaction-rules',
|
|
1135
|
+
path: {
|
|
1136
|
+
region: data.region
|
|
1137
|
+
},
|
|
996
1138
|
query: {
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
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'
|
|
1002
1147
|
}
|
|
1003
1148
|
});
|
|
1004
1149
|
}
|
|
1005
1150
|
|
|
1006
1151
|
/**
|
|
1007
|
-
*
|
|
1008
|
-
* Returns active payee names matching the query, sorted by recent usage. Used for transaction input autocomplete.
|
|
1152
|
+
* Validate transaction rule configuration
|
|
1009
1153
|
* @param data The data for the request.
|
|
1010
|
-
* @param data.
|
|
1011
|
-
* @param data.
|
|
1012
|
-
* @returns
|
|
1154
|
+
* @param data.region Region code for tenant context
|
|
1155
|
+
* @param data.requestBody
|
|
1156
|
+
* @returns ValidateRuleResponseDto Validation result
|
|
1013
1157
|
* @throws ApiError
|
|
1014
1158
|
*/
|
|
1015
|
-
public static
|
|
1016
|
-
data:
|
|
1017
|
-
): CancelablePromise<
|
|
1159
|
+
public static transactionRuleControllerValidate(
|
|
1160
|
+
data: TransactionRuleControllerValidateData
|
|
1161
|
+
): CancelablePromise<TransactionRuleControllerValidateResponse> {
|
|
1018
1162
|
return __request(OpenAPI, {
|
|
1019
|
-
method: '
|
|
1020
|
-
url: '/api/v1/bean/
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
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'
|
|
1024
1173
|
}
|
|
1025
1174
|
});
|
|
1026
1175
|
}
|
|
1027
1176
|
|
|
1028
1177
|
/**
|
|
1029
|
-
*
|
|
1030
|
-
*
|
|
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, {
|
|
1686
|
+
method: 'GET',
|
|
1687
|
+
url: '/api/v1/bean/payees/autocomplete',
|
|
1688
|
+
query: {
|
|
1689
|
+
q: data.q,
|
|
1690
|
+
limit: data.limit
|
|
1691
|
+
}
|
|
1692
|
+
});
|
|
1693
|
+
}
|
|
1694
|
+
|
|
1695
|
+
/**
|
|
1696
|
+
* Get top payees by usage
|
|
1697
|
+
* Returns the most frequently used payees, sorted by use count. Used for statistics and analytics.
|
|
1031
1698
|
* @param data The data for the request.
|
|
1032
1699
|
* @param data.limit Maximum number of results
|
|
1033
1700
|
* @returns PayeeStatsResponseDto Top payees retrieved successfully
|
|
@@ -1283,7 +1950,7 @@ export class AdminPayeeProfilesService {
|
|
|
1283
1950
|
* Removes verification status by setting verifiedAt to null.
|
|
1284
1951
|
* @param data The data for the request.
|
|
1285
1952
|
* @param data.id Payee profile ID (UUID)
|
|
1286
|
-
* @returns
|
|
1953
|
+
* @returns void Payee profile unverified successfully
|
|
1287
1954
|
* @throws ApiError
|
|
1288
1955
|
*/
|
|
1289
1956
|
public static payeeProfileAdminControllerUnverify(
|
|
@@ -1303,6 +1970,24 @@ export class AdminPayeeProfilesService {
|
|
|
1303
1970
|
}
|
|
1304
1971
|
}
|
|
1305
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
|
+
|
|
1306
1991
|
export class BeanCommoditiesService {
|
|
1307
1992
|
/**
|
|
1308
1993
|
* Create a new commodity
|
|
@@ -1438,1005 +2123,1132 @@ export class BeanCommoditiesService {
|
|
|
1438
2123
|
|
|
1439
2124
|
/**
|
|
1440
2125
|
* Ensure commodity exists
|
|
1441
|
-
* Gets existing commodity or creates it with automatic initialization from OpenBB
|
|
1442
|
-
* @param data The data for the request.
|
|
1443
|
-
* @param data.symbol Commodity symbol
|
|
1444
|
-
* @param data.region Region code for tenant context
|
|
1445
|
-
* @returns CommodityResponseDto Commodity retrieved or created
|
|
1446
|
-
* @throws ApiError
|
|
1447
|
-
*/
|
|
1448
|
-
public static commodityControllerGetOrCreate(
|
|
1449
|
-
data: CommodityControllerGetOrCreateData
|
|
1450
|
-
): CancelablePromise<CommodityControllerGetOrCreateResponse> {
|
|
1451
|
-
return __request(OpenAPI, {
|
|
1452
|
-
method: 'POST',
|
|
1453
|
-
url: '/api/v1/{region}/bean/commodities/{symbol}/ensure',
|
|
1454
|
-
path: {
|
|
1455
|
-
symbol: data.symbol,
|
|
1456
|
-
region: data.region
|
|
1457
|
-
}
|
|
1458
|
-
});
|
|
1459
|
-
}
|
|
1460
|
-
|
|
1461
|
-
/**
|
|
1462
|
-
* Bulk create commodities
|
|
1463
|
-
* Creates multiple commodities from a list of symbols, useful for initialization
|
|
1464
|
-
* @param data The data for the request.
|
|
1465
|
-
* @param data.region Region code for tenant context
|
|
1466
|
-
* @returns CommodityResponseDto Commodities created successfully
|
|
1467
|
-
* @throws ApiError
|
|
1468
|
-
*/
|
|
1469
|
-
public static commodityControllerBulkCreate(
|
|
1470
|
-
data: CommodityControllerBulkCreateData
|
|
1471
|
-
): CancelablePromise<CommodityControllerBulkCreateResponse> {
|
|
1472
|
-
return __request(OpenAPI, {
|
|
1473
|
-
method: 'POST',
|
|
1474
|
-
url: '/api/v1/{region}/bean/commodities/bulk',
|
|
1475
|
-
path: {
|
|
1476
|
-
region: data.region
|
|
1477
|
-
}
|
|
1478
|
-
});
|
|
1479
|
-
}
|
|
1480
|
-
}
|
|
1481
|
-
|
|
1482
|
-
export class RecurringRulesService {
|
|
1483
|
-
/**
|
|
1484
|
-
* Create a new recurring rule
|
|
1485
|
-
* Creates a new recurring transaction rule for the authenticated user
|
|
2126
|
+
* Gets existing commodity or creates it with automatic initialization from OpenBB
|
|
1486
2127
|
* @param data The data for the request.
|
|
2128
|
+
* @param data.symbol Commodity symbol
|
|
1487
2129
|
* @param data.region Region code for tenant context
|
|
1488
|
-
* @
|
|
1489
|
-
* @returns RecurringRuleResponseDto Rule created successfully
|
|
2130
|
+
* @returns CommodityResponseDto Commodity retrieved or created
|
|
1490
2131
|
* @throws ApiError
|
|
1491
2132
|
*/
|
|
1492
|
-
public static
|
|
1493
|
-
data:
|
|
1494
|
-
): CancelablePromise<
|
|
2133
|
+
public static commodityControllerGetOrCreate(
|
|
2134
|
+
data: CommodityControllerGetOrCreateData
|
|
2135
|
+
): CancelablePromise<CommodityControllerGetOrCreateResponse> {
|
|
1495
2136
|
return __request(OpenAPI, {
|
|
1496
2137
|
method: 'POST',
|
|
1497
|
-
url: '/api/v1/{region}/bean/
|
|
2138
|
+
url: '/api/v1/{region}/bean/commodities/{symbol}/ensure',
|
|
1498
2139
|
path: {
|
|
2140
|
+
symbol: data.symbol,
|
|
1499
2141
|
region: data.region
|
|
1500
|
-
},
|
|
1501
|
-
body: data.requestBody,
|
|
1502
|
-
mediaType: 'application/json',
|
|
1503
|
-
errors: {
|
|
1504
|
-
400: 'Invalid input data (e.g., autoCreate without accounts)',
|
|
1505
|
-
409: 'Rule with same name already exists'
|
|
1506
2142
|
}
|
|
1507
2143
|
});
|
|
1508
2144
|
}
|
|
1509
2145
|
|
|
1510
2146
|
/**
|
|
1511
|
-
*
|
|
1512
|
-
*
|
|
2147
|
+
* Bulk create commodities
|
|
2148
|
+
* Creates multiple commodities from a list of symbols, useful for initialization
|
|
1513
2149
|
* @param data The data for the request.
|
|
1514
2150
|
* @param data.region Region code for tenant context
|
|
1515
|
-
* @
|
|
1516
|
-
* @param data.frequency Filter by frequency (WEEKLY, MONTHLY, etc.)
|
|
1517
|
-
* @param data.hasAutoCreate Filter by autoCreate enabled
|
|
1518
|
-
* @returns RecurringRuleResponseDto Rules retrieved successfully
|
|
2151
|
+
* @returns CommodityResponseDto Commodities created successfully
|
|
1519
2152
|
* @throws ApiError
|
|
1520
2153
|
*/
|
|
1521
|
-
public static
|
|
1522
|
-
data:
|
|
1523
|
-
): CancelablePromise<
|
|
2154
|
+
public static commodityControllerBulkCreate(
|
|
2155
|
+
data: CommodityControllerBulkCreateData
|
|
2156
|
+
): CancelablePromise<CommodityControllerBulkCreateResponse> {
|
|
1524
2157
|
return __request(OpenAPI, {
|
|
1525
|
-
method: '
|
|
1526
|
-
url: '/api/v1/{region}/bean/
|
|
2158
|
+
method: 'POST',
|
|
2159
|
+
url: '/api/v1/{region}/bean/commodities/bulk',
|
|
1527
2160
|
path: {
|
|
1528
2161
|
region: data.region
|
|
1529
|
-
},
|
|
1530
|
-
query: {
|
|
1531
|
-
isActive: data.isActive,
|
|
1532
|
-
frequency: data.frequency,
|
|
1533
|
-
hasAutoCreate: data.hasAutoCreate
|
|
1534
2162
|
}
|
|
1535
2163
|
});
|
|
1536
2164
|
}
|
|
2165
|
+
}
|
|
1537
2166
|
|
|
2167
|
+
export class ReportingService {
|
|
1538
2168
|
/**
|
|
1539
|
-
*
|
|
1540
|
-
*
|
|
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
|
+
*
|
|
1541
2182
|
* @param data The data for the request.
|
|
1542
|
-
* @param data.transactionId Source transaction ID
|
|
1543
2183
|
* @param data.region Region code for tenant context
|
|
1544
|
-
* @param data.
|
|
1545
|
-
* @
|
|
2184
|
+
* @param data.period Time period
|
|
2185
|
+
* @param data.granularity Data granularity
|
|
2186
|
+
* @returns PortfolioTrendsResponseDto Trends retrieved successfully
|
|
1546
2187
|
* @throws ApiError
|
|
1547
2188
|
*/
|
|
1548
|
-
public static
|
|
1549
|
-
data:
|
|
1550
|
-
): CancelablePromise<
|
|
2189
|
+
public static reportingControllerGetPortfolioTrends(
|
|
2190
|
+
data: ReportingControllerGetPortfolioTrendsData
|
|
2191
|
+
): CancelablePromise<ReportingControllerGetPortfolioTrendsResponse> {
|
|
1551
2192
|
return __request(OpenAPI, {
|
|
1552
|
-
method: '
|
|
1553
|
-
url: '/api/v1/{region}/
|
|
2193
|
+
method: 'GET',
|
|
2194
|
+
url: '/api/v1/{region}/reporting/portfolio/trends',
|
|
1554
2195
|
path: {
|
|
1555
|
-
transactionId: data.transactionId,
|
|
1556
2196
|
region: data.region
|
|
1557
2197
|
},
|
|
1558
|
-
|
|
1559
|
-
|
|
2198
|
+
query: {
|
|
2199
|
+
period: data.period,
|
|
2200
|
+
granularity: data.granularity
|
|
2201
|
+
},
|
|
1560
2202
|
errors: {
|
|
1561
|
-
|
|
1562
|
-
409: 'Rule with same name already exists or transaction already linked'
|
|
2203
|
+
401: 'User not authenticated'
|
|
1563
2204
|
}
|
|
1564
2205
|
});
|
|
1565
2206
|
}
|
|
1566
2207
|
|
|
1567
2208
|
/**
|
|
1568
|
-
* Get
|
|
1569
|
-
*
|
|
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
|
+
*
|
|
1570
2218
|
* @param data The data for the request.
|
|
1571
|
-
* @param data.id Rule ID
|
|
1572
2219
|
* @param data.region Region code for tenant context
|
|
1573
|
-
* @
|
|
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
|
|
1574
2223
|
* @throws ApiError
|
|
1575
2224
|
*/
|
|
1576
|
-
public static
|
|
1577
|
-
data:
|
|
1578
|
-
): CancelablePromise<
|
|
2225
|
+
public static reportingControllerGetCashFlowTrends(
|
|
2226
|
+
data: ReportingControllerGetCashFlowTrendsData
|
|
2227
|
+
): CancelablePromise<ReportingControllerGetCashFlowTrendsResponse> {
|
|
1579
2228
|
return __request(OpenAPI, {
|
|
1580
2229
|
method: 'GET',
|
|
1581
|
-
url: '/api/v1/{region}/
|
|
2230
|
+
url: '/api/v1/{region}/reporting/cash-flow/trends',
|
|
1582
2231
|
path: {
|
|
1583
|
-
id: data.id,
|
|
1584
2232
|
region: data.region
|
|
1585
2233
|
},
|
|
2234
|
+
query: {
|
|
2235
|
+
period: data.period,
|
|
2236
|
+
granularity: data.granularity
|
|
2237
|
+
},
|
|
1586
2238
|
errors: {
|
|
1587
|
-
|
|
2239
|
+
401: 'User not authenticated'
|
|
1588
2240
|
}
|
|
1589
2241
|
});
|
|
1590
2242
|
}
|
|
1591
2243
|
|
|
1592
2244
|
/**
|
|
1593
|
-
*
|
|
1594
|
-
*
|
|
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
|
+
*
|
|
1595
2259
|
* @param data The data for the request.
|
|
1596
|
-
* @param data.id Rule ID
|
|
1597
2260
|
* @param data.region Region code for tenant context
|
|
1598
|
-
* @param data.requestBody
|
|
1599
|
-
* @returns
|
|
2261
|
+
* @param data.requestBody Optional date (defaults to today)
|
|
2262
|
+
* @returns GenerateSnapshotResponse Snapshot generated successfully
|
|
1600
2263
|
* @throws ApiError
|
|
1601
2264
|
*/
|
|
1602
|
-
public static
|
|
1603
|
-
data:
|
|
1604
|
-
): CancelablePromise<
|
|
2265
|
+
public static reportingControllerGenerateSnapshot(
|
|
2266
|
+
data: ReportingControllerGenerateSnapshotData
|
|
2267
|
+
): CancelablePromise<ReportingControllerGenerateSnapshotResponse> {
|
|
1605
2268
|
return __request(OpenAPI, {
|
|
1606
|
-
method: '
|
|
1607
|
-
url: '/api/v1/{region}/
|
|
2269
|
+
method: 'POST',
|
|
2270
|
+
url: '/api/v1/{region}/reporting/snapshots/generate',
|
|
1608
2271
|
path: {
|
|
1609
|
-
id: data.id,
|
|
1610
2272
|
region: data.region
|
|
1611
2273
|
},
|
|
1612
2274
|
body: data.requestBody,
|
|
1613
2275
|
mediaType: 'application/json',
|
|
1614
2276
|
errors: {
|
|
1615
|
-
400: 'Invalid
|
|
1616
|
-
|
|
2277
|
+
400: 'Invalid date format',
|
|
2278
|
+
401: 'User not authenticated'
|
|
1617
2279
|
}
|
|
1618
2280
|
});
|
|
1619
2281
|
}
|
|
1620
2282
|
|
|
1621
2283
|
/**
|
|
1622
|
-
*
|
|
1623
|
-
*
|
|
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
|
+
*
|
|
1624
2298
|
* @param data The data for the request.
|
|
1625
|
-
* @param data.id Rule ID
|
|
1626
2299
|
* @param data.region Region code for tenant context
|
|
1627
|
-
* @
|
|
2300
|
+
* @param data.requestBody
|
|
2301
|
+
* @returns BackfillSnapshotsResponse Backfill completed successfully
|
|
1628
2302
|
* @throws ApiError
|
|
1629
2303
|
*/
|
|
1630
|
-
public static
|
|
1631
|
-
data:
|
|
1632
|
-
): CancelablePromise<
|
|
2304
|
+
public static reportingControllerBackfillSnapshots(
|
|
2305
|
+
data: ReportingControllerBackfillSnapshotsData
|
|
2306
|
+
): CancelablePromise<ReportingControllerBackfillSnapshotsResponse> {
|
|
1633
2307
|
return __request(OpenAPI, {
|
|
1634
|
-
method: '
|
|
1635
|
-
url: '/api/v1/{region}/
|
|
2308
|
+
method: 'POST',
|
|
2309
|
+
url: '/api/v1/{region}/reporting/snapshots/backfill',
|
|
1636
2310
|
path: {
|
|
1637
|
-
id: data.id,
|
|
1638
2311
|
region: data.region
|
|
1639
2312
|
},
|
|
2313
|
+
body: data.requestBody,
|
|
2314
|
+
mediaType: 'application/json',
|
|
1640
2315
|
errors: {
|
|
1641
|
-
|
|
2316
|
+
400: 'Invalid date format or range',
|
|
2317
|
+
401: 'User not authenticated',
|
|
2318
|
+
409: 'Backfill already in progress for this user'
|
|
1642
2319
|
}
|
|
1643
2320
|
});
|
|
1644
2321
|
}
|
|
2322
|
+
}
|
|
1645
2323
|
|
|
2324
|
+
export class BeanPricesService {
|
|
1646
2325
|
/**
|
|
1647
|
-
*
|
|
1648
|
-
*
|
|
2326
|
+
* Create a new price
|
|
2327
|
+
* Creates a new price entry for the authenticated user
|
|
1649
2328
|
* @param data The data for the request.
|
|
1650
|
-
* @param data.id Rule ID
|
|
1651
2329
|
* @param data.region Region code for tenant context
|
|
1652
|
-
* @
|
|
2330
|
+
* @param data.requestBody
|
|
2331
|
+
* @returns PriceResponseDto Price created successfully
|
|
1653
2332
|
* @throws ApiError
|
|
1654
2333
|
*/
|
|
1655
|
-
public static
|
|
1656
|
-
data:
|
|
1657
|
-
): CancelablePromise<
|
|
2334
|
+
public static priceControllerCreate(
|
|
2335
|
+
data: PriceControllerCreateData
|
|
2336
|
+
): CancelablePromise<PriceControllerCreateResponse> {
|
|
1658
2337
|
return __request(OpenAPI, {
|
|
1659
|
-
method: '
|
|
1660
|
-
url: '/api/v1/{region}/bean/
|
|
2338
|
+
method: 'POST',
|
|
2339
|
+
url: '/api/v1/{region}/bean/prices',
|
|
1661
2340
|
path: {
|
|
1662
|
-
id: data.id,
|
|
1663
2341
|
region: data.region
|
|
1664
2342
|
},
|
|
2343
|
+
body: data.requestBody,
|
|
2344
|
+
mediaType: 'application/json',
|
|
1665
2345
|
errors: {
|
|
1666
|
-
404: '
|
|
2346
|
+
404: 'Currency or quoteCurrency commodity not found',
|
|
2347
|
+
409: 'Price already exists for this currency pair and date'
|
|
1667
2348
|
}
|
|
1668
2349
|
});
|
|
1669
2350
|
}
|
|
1670
|
-
}
|
|
1671
2351
|
|
|
1672
|
-
export class ExpectedTransactionsService {
|
|
1673
2352
|
/**
|
|
1674
|
-
* List
|
|
1675
|
-
* Returns
|
|
2353
|
+
* List user prices
|
|
2354
|
+
* Returns all price entries for the authenticated user with optional filtering
|
|
1676
2355
|
* @param data The data for the request.
|
|
1677
2356
|
* @param data.region Region code for tenant context
|
|
1678
|
-
* @param data.
|
|
1679
|
-
* @param data.
|
|
1680
|
-
* @param data.
|
|
1681
|
-
* @param data.
|
|
1682
|
-
* @
|
|
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
|
|
1683
2365
|
* @throws ApiError
|
|
1684
2366
|
*/
|
|
1685
|
-
public static
|
|
1686
|
-
data:
|
|
1687
|
-
): CancelablePromise<
|
|
2367
|
+
public static priceControllerFindAll(
|
|
2368
|
+
data: PriceControllerFindAllData
|
|
2369
|
+
): CancelablePromise<PriceControllerFindAllResponse> {
|
|
1688
2370
|
return __request(OpenAPI, {
|
|
1689
2371
|
method: 'GET',
|
|
1690
|
-
url: '/api/v1/{region}/bean/
|
|
2372
|
+
url: '/api/v1/{region}/bean/prices',
|
|
1691
2373
|
path: {
|
|
1692
2374
|
region: data.region
|
|
1693
2375
|
},
|
|
1694
2376
|
query: {
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
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
|
|
1699
2384
|
}
|
|
1700
2385
|
});
|
|
1701
2386
|
}
|
|
1702
2387
|
|
|
1703
2388
|
/**
|
|
1704
|
-
*
|
|
1705
|
-
* Returns
|
|
2389
|
+
* Get price by ID
|
|
2390
|
+
* Returns a single price entry by its ID
|
|
1706
2391
|
* @param data The data for the request.
|
|
2392
|
+
* @param data.id Price ID
|
|
1707
2393
|
* @param data.region Region code for tenant context
|
|
1708
|
-
* @returns
|
|
2394
|
+
* @returns PriceResponseDto Price retrieved successfully
|
|
1709
2395
|
* @throws ApiError
|
|
1710
2396
|
*/
|
|
1711
|
-
public static
|
|
1712
|
-
data:
|
|
1713
|
-
): CancelablePromise<
|
|
2397
|
+
public static priceControllerFindOne(
|
|
2398
|
+
data: PriceControllerFindOneData
|
|
2399
|
+
): CancelablePromise<PriceControllerFindOneResponse> {
|
|
1714
2400
|
return __request(OpenAPI, {
|
|
1715
2401
|
method: 'GET',
|
|
1716
|
-
url: '/api/v1/{region}/bean/
|
|
2402
|
+
url: '/api/v1/{region}/bean/prices/{id}',
|
|
1717
2403
|
path: {
|
|
2404
|
+
id: data.id,
|
|
1718
2405
|
region: data.region
|
|
2406
|
+
},
|
|
2407
|
+
errors: {
|
|
2408
|
+
404: 'Price not found'
|
|
1719
2409
|
}
|
|
1720
2410
|
});
|
|
1721
2411
|
}
|
|
1722
2412
|
|
|
1723
2413
|
/**
|
|
1724
|
-
*
|
|
1725
|
-
*
|
|
2414
|
+
* Update a price
|
|
2415
|
+
* Updates an existing price entry
|
|
1726
2416
|
* @param data The data for the request.
|
|
1727
|
-
* @param data.id
|
|
2417
|
+
* @param data.id Price ID
|
|
1728
2418
|
* @param data.region Region code for tenant context
|
|
1729
|
-
* @
|
|
2419
|
+
* @param data.requestBody
|
|
2420
|
+
* @returns PriceResponseDto Price updated successfully
|
|
1730
2421
|
* @throws ApiError
|
|
1731
2422
|
*/
|
|
1732
|
-
public static
|
|
1733
|
-
data:
|
|
1734
|
-
): CancelablePromise<
|
|
2423
|
+
public static priceControllerUpdate(
|
|
2424
|
+
data: PriceControllerUpdateData
|
|
2425
|
+
): CancelablePromise<PriceControllerUpdateResponse> {
|
|
1735
2426
|
return __request(OpenAPI, {
|
|
1736
|
-
method: '
|
|
1737
|
-
url: '/api/v1/{region}/bean/
|
|
2427
|
+
method: 'PUT',
|
|
2428
|
+
url: '/api/v1/{region}/bean/prices/{id}',
|
|
1738
2429
|
path: {
|
|
1739
2430
|
id: data.id,
|
|
1740
2431
|
region: data.region
|
|
1741
2432
|
},
|
|
2433
|
+
body: data.requestBody,
|
|
2434
|
+
mediaType: 'application/json',
|
|
1742
2435
|
errors: {
|
|
1743
|
-
404: '
|
|
2436
|
+
404: 'Price not found',
|
|
2437
|
+
409: 'Updated price conflicts with existing price'
|
|
1744
2438
|
}
|
|
1745
2439
|
});
|
|
1746
2440
|
}
|
|
1747
2441
|
|
|
1748
2442
|
/**
|
|
1749
|
-
*
|
|
1750
|
-
*
|
|
2443
|
+
* Delete a price
|
|
2444
|
+
* Deletes a price entry (hard delete)
|
|
1751
2445
|
* @param data The data for the request.
|
|
1752
|
-
* @param data.id
|
|
2446
|
+
* @param data.id Price ID
|
|
1753
2447
|
* @param data.region Region code for tenant context
|
|
1754
|
-
* @returns
|
|
2448
|
+
* @returns void Price deleted successfully
|
|
1755
2449
|
* @throws ApiError
|
|
1756
2450
|
*/
|
|
1757
|
-
public static
|
|
1758
|
-
data:
|
|
1759
|
-
): CancelablePromise<
|
|
2451
|
+
public static priceControllerDelete(
|
|
2452
|
+
data: PriceControllerDeleteData
|
|
2453
|
+
): CancelablePromise<PriceControllerDeleteResponse> {
|
|
1760
2454
|
return __request(OpenAPI, {
|
|
1761
|
-
method: '
|
|
1762
|
-
url: '/api/v1/{region}/bean/
|
|
2455
|
+
method: 'DELETE',
|
|
2456
|
+
url: '/api/v1/{region}/bean/prices/{id}',
|
|
1763
2457
|
path: {
|
|
1764
2458
|
id: data.id,
|
|
1765
2459
|
region: data.region
|
|
1766
2460
|
},
|
|
1767
2461
|
errors: {
|
|
1768
|
-
|
|
1769
|
-
404: 'Expected transaction not found'
|
|
2462
|
+
404: 'Price not found'
|
|
1770
2463
|
}
|
|
1771
2464
|
});
|
|
1772
2465
|
}
|
|
1773
2466
|
|
|
1774
2467
|
/**
|
|
1775
|
-
*
|
|
1776
|
-
*
|
|
2468
|
+
* Bulk create prices
|
|
2469
|
+
* Creates multiple price entries at once (skips duplicates)
|
|
1777
2470
|
* @param data The data for the request.
|
|
1778
|
-
* @param data.id Expected transaction ID
|
|
1779
2471
|
* @param data.region Region code for tenant context
|
|
1780
|
-
* @
|
|
2472
|
+
* @param data.requestBody
|
|
2473
|
+
* @returns PriceResponseDto Prices created successfully
|
|
1781
2474
|
* @throws ApiError
|
|
1782
2475
|
*/
|
|
1783
|
-
public static
|
|
1784
|
-
data:
|
|
1785
|
-
): CancelablePromise<
|
|
2476
|
+
public static priceControllerBulkCreate(
|
|
2477
|
+
data: PriceControllerBulkCreateData
|
|
2478
|
+
): CancelablePromise<PriceControllerBulkCreateResponse> {
|
|
1786
2479
|
return __request(OpenAPI, {
|
|
1787
|
-
method: '
|
|
1788
|
-
url: '/api/v1/{region}/bean/
|
|
2480
|
+
method: 'POST',
|
|
2481
|
+
url: '/api/v1/{region}/bean/prices/bulk',
|
|
1789
2482
|
path: {
|
|
1790
|
-
id: data.id,
|
|
1791
2483
|
region: data.region
|
|
1792
2484
|
},
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
404: 'Expected transaction not found'
|
|
1796
|
-
}
|
|
2485
|
+
body: data.requestBody,
|
|
2486
|
+
mediaType: 'application/json'
|
|
1797
2487
|
});
|
|
1798
2488
|
}
|
|
2489
|
+
}
|
|
1799
2490
|
|
|
2491
|
+
export class RecurringRulesService {
|
|
1800
2492
|
/**
|
|
1801
|
-
*
|
|
1802
|
-
*
|
|
2493
|
+
* Create a new recurring rule
|
|
2494
|
+
* Creates a new recurring transaction rule for the authenticated user
|
|
1803
2495
|
* @param data The data for the request.
|
|
1804
|
-
* @param data.id Expected transaction ID
|
|
1805
2496
|
* @param data.region Region code for tenant context
|
|
1806
2497
|
* @param data.requestBody
|
|
1807
|
-
* @returns
|
|
2498
|
+
* @returns RecurringRuleResponseDto Rule created successfully
|
|
1808
2499
|
* @throws ApiError
|
|
1809
2500
|
*/
|
|
1810
|
-
public static
|
|
1811
|
-
data:
|
|
1812
|
-
): CancelablePromise<
|
|
2501
|
+
public static recurringRuleControllerCreate(
|
|
2502
|
+
data: RecurringRuleControllerCreateData
|
|
2503
|
+
): CancelablePromise<RecurringRuleControllerCreateResponse> {
|
|
1813
2504
|
return __request(OpenAPI, {
|
|
1814
2505
|
method: 'POST',
|
|
1815
|
-
url: '/api/v1/{region}/bean/
|
|
2506
|
+
url: '/api/v1/{region}/bean/recurring-rules',
|
|
1816
2507
|
path: {
|
|
1817
|
-
id: data.id,
|
|
1818
2508
|
region: data.region
|
|
1819
2509
|
},
|
|
1820
2510
|
body: data.requestBody,
|
|
1821
2511
|
mediaType: 'application/json',
|
|
1822
2512
|
errors: {
|
|
1823
|
-
400: '
|
|
1824
|
-
|
|
1825
|
-
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'
|
|
1826
2515
|
}
|
|
1827
2516
|
});
|
|
1828
2517
|
}
|
|
1829
2518
|
|
|
1830
2519
|
/**
|
|
1831
|
-
*
|
|
1832
|
-
*
|
|
2520
|
+
* List recurring rules
|
|
2521
|
+
* Returns all recurring rules for the authenticated user with optional filtering
|
|
1833
2522
|
* @param data The data for the request.
|
|
1834
|
-
* @param data.id Expected transaction ID
|
|
1835
2523
|
* @param data.region Region code for tenant context
|
|
1836
|
-
* @
|
|
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
|
|
1837
2528
|
* @throws ApiError
|
|
1838
2529
|
*/
|
|
1839
|
-
public static
|
|
1840
|
-
data:
|
|
1841
|
-
): CancelablePromise<
|
|
2530
|
+
public static recurringRuleControllerFindAll(
|
|
2531
|
+
data: RecurringRuleControllerFindAllData
|
|
2532
|
+
): CancelablePromise<RecurringRuleControllerFindAllResponse> {
|
|
1842
2533
|
return __request(OpenAPI, {
|
|
1843
|
-
method: '
|
|
1844
|
-
url: '/api/v1/{region}/bean/
|
|
2534
|
+
method: 'GET',
|
|
2535
|
+
url: '/api/v1/{region}/bean/recurring-rules',
|
|
1845
2536
|
path: {
|
|
1846
|
-
id: data.id,
|
|
1847
2537
|
region: data.region
|
|
1848
2538
|
},
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
2539
|
+
query: {
|
|
2540
|
+
isActive: data.isActive,
|
|
2541
|
+
frequency: data.frequency,
|
|
2542
|
+
hasAutoCreate: data.hasAutoCreate
|
|
1852
2543
|
}
|
|
1853
2544
|
});
|
|
1854
2545
|
}
|
|
1855
2546
|
|
|
1856
2547
|
/**
|
|
1857
|
-
*
|
|
1858
|
-
*
|
|
2548
|
+
* Create recurring rule from transaction
|
|
2549
|
+
* Auto-creates a recurring rule using transaction data. User only confirms frequency.
|
|
1859
2550
|
* @param data The data for the request.
|
|
1860
|
-
* @param data.
|
|
2551
|
+
* @param data.transactionId Source transaction ID
|
|
1861
2552
|
* @param data.region Region code for tenant context
|
|
1862
2553
|
* @param data.requestBody
|
|
1863
|
-
* @returns
|
|
2554
|
+
* @returns RecurringRuleResponseDto Rule created successfully
|
|
1864
2555
|
* @throws ApiError
|
|
1865
2556
|
*/
|
|
1866
|
-
public static
|
|
1867
|
-
data:
|
|
1868
|
-
): CancelablePromise<
|
|
2557
|
+
public static recurringRuleControllerCreateFromTransaction(
|
|
2558
|
+
data: RecurringRuleControllerCreateFromTransactionData
|
|
2559
|
+
): CancelablePromise<RecurringRuleControllerCreateFromTransactionResponse> {
|
|
1869
2560
|
return __request(OpenAPI, {
|
|
1870
2561
|
method: 'POST',
|
|
1871
|
-
url: '/api/v1/{region}/bean/
|
|
2562
|
+
url: '/api/v1/{region}/bean/recurring-rules/from-transaction/{transactionId}',
|
|
1872
2563
|
path: {
|
|
1873
|
-
|
|
2564
|
+
transactionId: data.transactionId,
|
|
1874
2565
|
region: data.region
|
|
1875
2566
|
},
|
|
1876
2567
|
body: data.requestBody,
|
|
1877
2568
|
mediaType: 'application/json',
|
|
1878
2569
|
errors: {
|
|
1879
|
-
|
|
1880
|
-
|
|
2570
|
+
404: 'Transaction not found',
|
|
2571
|
+
409: 'Rule with same name already exists or transaction already linked'
|
|
1881
2572
|
}
|
|
1882
2573
|
});
|
|
1883
2574
|
}
|
|
1884
|
-
}
|
|
1885
2575
|
|
|
1886
|
-
export class RecurringForecastService {
|
|
1887
2576
|
/**
|
|
1888
|
-
* Get
|
|
1889
|
-
* Returns
|
|
2577
|
+
* Get recurring rule by ID
|
|
2578
|
+
* Returns a specific recurring rule with its details
|
|
1890
2579
|
* @param data The data for the request.
|
|
2580
|
+
* @param data.id Rule ID
|
|
1891
2581
|
* @param data.region Region code for tenant context
|
|
1892
|
-
* @
|
|
1893
|
-
* @returns ForecastResponseDto Forecast retrieved successfully
|
|
2582
|
+
* @returns RecurringRuleResponseDto Rule retrieved successfully
|
|
1894
2583
|
* @throws ApiError
|
|
1895
2584
|
*/
|
|
1896
|
-
public static
|
|
1897
|
-
data:
|
|
1898
|
-
): CancelablePromise<
|
|
2585
|
+
public static recurringRuleControllerFindOne(
|
|
2586
|
+
data: RecurringRuleControllerFindOneData
|
|
2587
|
+
): CancelablePromise<RecurringRuleControllerFindOneResponse> {
|
|
1899
2588
|
return __request(OpenAPI, {
|
|
1900
2589
|
method: 'GET',
|
|
1901
|
-
url: '/api/v1/{region}/bean/recurring/
|
|
2590
|
+
url: '/api/v1/{region}/bean/recurring-rules/{id}',
|
|
1902
2591
|
path: {
|
|
2592
|
+
id: data.id,
|
|
1903
2593
|
region: data.region
|
|
1904
2594
|
},
|
|
1905
|
-
|
|
1906
|
-
|
|
2595
|
+
errors: {
|
|
2596
|
+
404: 'Rule not found'
|
|
1907
2597
|
}
|
|
1908
2598
|
});
|
|
1909
2599
|
}
|
|
1910
|
-
}
|
|
1911
2600
|
|
|
1912
|
-
export class BeanTransactionRulesService {
|
|
1913
2601
|
/**
|
|
1914
|
-
*
|
|
1915
|
-
*
|
|
2602
|
+
* Update recurring rule
|
|
2603
|
+
* Updates an existing recurring rule
|
|
1916
2604
|
* @param data The data for the request.
|
|
2605
|
+
* @param data.id Rule ID
|
|
1917
2606
|
* @param data.region Region code for tenant context
|
|
1918
2607
|
* @param data.requestBody
|
|
1919
|
-
* @returns
|
|
2608
|
+
* @returns RecurringRuleResponseDto Rule updated successfully
|
|
1920
2609
|
* @throws ApiError
|
|
1921
2610
|
*/
|
|
1922
|
-
public static
|
|
1923
|
-
data:
|
|
1924
|
-
): CancelablePromise<
|
|
2611
|
+
public static recurringRuleControllerUpdate(
|
|
2612
|
+
data: RecurringRuleControllerUpdateData
|
|
2613
|
+
): CancelablePromise<RecurringRuleControllerUpdateResponse> {
|
|
1925
2614
|
return __request(OpenAPI, {
|
|
1926
|
-
method: '
|
|
1927
|
-
url: '/api/v1/{region}/bean/
|
|
2615
|
+
method: 'PATCH',
|
|
2616
|
+
url: '/api/v1/{region}/bean/recurring-rules/{id}',
|
|
1928
2617
|
path: {
|
|
2618
|
+
id: data.id,
|
|
1929
2619
|
region: data.region
|
|
1930
2620
|
},
|
|
1931
2621
|
body: data.requestBody,
|
|
1932
2622
|
mediaType: 'application/json',
|
|
1933
2623
|
errors: {
|
|
1934
|
-
400: '
|
|
1935
|
-
|
|
1936
|
-
409: 'Resource conflict - another process is updating this rule'
|
|
2624
|
+
400: 'Invalid input data',
|
|
2625
|
+
404: 'Rule not found'
|
|
1937
2626
|
}
|
|
1938
2627
|
});
|
|
1939
2628
|
}
|
|
1940
2629
|
|
|
1941
2630
|
/**
|
|
1942
|
-
*
|
|
2631
|
+
* Delete recurring rule
|
|
2632
|
+
* Soft deletes a recurring rule (sets isActive to false)
|
|
1943
2633
|
* @param data The data for the request.
|
|
2634
|
+
* @param data.id Rule ID
|
|
1944
2635
|
* @param data.region Region code for tenant context
|
|
1945
|
-
* @
|
|
1946
|
-
* @param data.offset Pagination offset (default: 0)
|
|
1947
|
-
* @param data.enabled Filter by enabled status
|
|
1948
|
-
* @param data.learningSource Filter by learning source. Omit this parameter or pass empty string to get manually created rules (learningSource is null in database).
|
|
1949
|
-
* @param data.autoApplyEnabled Filter by auto-apply status
|
|
1950
|
-
* @returns TransactionRuleListResponseDto List of rules
|
|
2636
|
+
* @returns void Rule deleted successfully
|
|
1951
2637
|
* @throws ApiError
|
|
1952
2638
|
*/
|
|
1953
|
-
public static
|
|
1954
|
-
data:
|
|
1955
|
-
): CancelablePromise<
|
|
2639
|
+
public static recurringRuleControllerDelete(
|
|
2640
|
+
data: RecurringRuleControllerDeleteData
|
|
2641
|
+
): CancelablePromise<RecurringRuleControllerDeleteResponse> {
|
|
1956
2642
|
return __request(OpenAPI, {
|
|
1957
|
-
method: '
|
|
1958
|
-
url: '/api/v1/{region}/bean/
|
|
2643
|
+
method: 'DELETE',
|
|
2644
|
+
url: '/api/v1/{region}/bean/recurring-rules/{id}',
|
|
1959
2645
|
path: {
|
|
2646
|
+
id: data.id,
|
|
1960
2647
|
region: data.region
|
|
1961
2648
|
},
|
|
1962
|
-
query: {
|
|
1963
|
-
limit: data.limit,
|
|
1964
|
-
offset: data.offset,
|
|
1965
|
-
enabled: data.enabled,
|
|
1966
|
-
learningSource: data.learningSource,
|
|
1967
|
-
autoApplyEnabled: data.autoApplyEnabled
|
|
1968
|
-
},
|
|
1969
2649
|
errors: {
|
|
1970
|
-
|
|
2650
|
+
404: 'Rule not found'
|
|
1971
2651
|
}
|
|
1972
2652
|
});
|
|
1973
2653
|
}
|
|
1974
2654
|
|
|
1975
2655
|
/**
|
|
1976
|
-
*
|
|
2656
|
+
* Get rule with statistics
|
|
2657
|
+
* Returns a rule with pending/overdue counts and next expected date
|
|
1977
2658
|
* @param data The data for the request.
|
|
2659
|
+
* @param data.id Rule ID
|
|
1978
2660
|
* @param data.region Region code for tenant context
|
|
1979
|
-
* @
|
|
1980
|
-
* @returns ValidateRuleResponseDto Validation result
|
|
2661
|
+
* @returns RecurringRuleWithStatsResponseDto Rule with stats retrieved successfully
|
|
1981
2662
|
* @throws ApiError
|
|
1982
2663
|
*/
|
|
1983
|
-
public static
|
|
1984
|
-
data:
|
|
1985
|
-
): CancelablePromise<
|
|
2664
|
+
public static recurringRuleControllerGetWithStats(
|
|
2665
|
+
data: RecurringRuleControllerGetWithStatsData
|
|
2666
|
+
): CancelablePromise<RecurringRuleControllerGetWithStatsResponse> {
|
|
1986
2667
|
return __request(OpenAPI, {
|
|
1987
|
-
method: '
|
|
1988
|
-
url: '/api/v1/{region}/bean/
|
|
2668
|
+
method: 'GET',
|
|
2669
|
+
url: '/api/v1/{region}/bean/recurring-rules/{id}/stats',
|
|
1989
2670
|
path: {
|
|
2671
|
+
id: data.id,
|
|
1990
2672
|
region: data.region
|
|
1991
2673
|
},
|
|
1992
|
-
body: data.requestBody,
|
|
1993
|
-
mediaType: 'application/json',
|
|
1994
2674
|
errors: {
|
|
1995
|
-
|
|
1996
|
-
401: 'Unauthorized'
|
|
2675
|
+
404: 'Rule not found'
|
|
1997
2676
|
}
|
|
1998
2677
|
});
|
|
1999
2678
|
}
|
|
2679
|
+
}
|
|
2000
2680
|
|
|
2681
|
+
export class ExpectedTransactionsService {
|
|
2001
2682
|
/**
|
|
2002
|
-
*
|
|
2683
|
+
* List expected transactions
|
|
2684
|
+
* Returns expected transactions for the authenticated user with optional filtering
|
|
2003
2685
|
* @param data The data for the request.
|
|
2004
2686
|
* @param data.region Region code for tenant context
|
|
2005
|
-
* @param data.
|
|
2006
|
-
* @
|
|
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
|
|
2007
2692
|
* @throws ApiError
|
|
2008
2693
|
*/
|
|
2009
|
-
public static
|
|
2010
|
-
data:
|
|
2011
|
-
): CancelablePromise<
|
|
2694
|
+
public static expectedTransactionControllerFindAll(
|
|
2695
|
+
data: ExpectedTransactionControllerFindAllData
|
|
2696
|
+
): CancelablePromise<ExpectedTransactionControllerFindAllResponse> {
|
|
2012
2697
|
return __request(OpenAPI, {
|
|
2013
|
-
method: '
|
|
2014
|
-
url: '/api/v1/{region}/bean/
|
|
2698
|
+
method: 'GET',
|
|
2699
|
+
url: '/api/v1/{region}/bean/expected-transactions',
|
|
2015
2700
|
path: {
|
|
2016
2701
|
region: data.region
|
|
2017
2702
|
},
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2703
|
+
query: {
|
|
2704
|
+
ruleId: data.ruleId,
|
|
2705
|
+
status: data.status,
|
|
2706
|
+
fromDate: data.fromDate,
|
|
2707
|
+
toDate: data.toDate
|
|
2023
2708
|
}
|
|
2024
2709
|
});
|
|
2025
2710
|
}
|
|
2026
2711
|
|
|
2027
2712
|
/**
|
|
2028
|
-
*
|
|
2713
|
+
* List overdue expected transactions
|
|
2714
|
+
* Returns all overdue expected transactions (PENDING past tolerance)
|
|
2029
2715
|
* @param data The data for the request.
|
|
2030
|
-
* @param data.format Export format (currently only JSON supported)
|
|
2031
2716
|
* @param data.region Region code for tenant context
|
|
2032
|
-
* @returns
|
|
2717
|
+
* @returns ExpectedTransactionListResponseDto Overdue transactions retrieved successfully
|
|
2033
2718
|
* @throws ApiError
|
|
2034
2719
|
*/
|
|
2035
|
-
public static
|
|
2036
|
-
data:
|
|
2037
|
-
): CancelablePromise<
|
|
2720
|
+
public static expectedTransactionControllerFindOverdue(
|
|
2721
|
+
data: ExpectedTransactionControllerFindOverdueData
|
|
2722
|
+
): CancelablePromise<ExpectedTransactionControllerFindOverdueResponse> {
|
|
2038
2723
|
return __request(OpenAPI, {
|
|
2039
2724
|
method: 'GET',
|
|
2040
|
-
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}',
|
|
2041
2747
|
path: {
|
|
2042
|
-
|
|
2748
|
+
id: data.id,
|
|
2043
2749
|
region: data.region
|
|
2044
2750
|
},
|
|
2045
2751
|
errors: {
|
|
2046
|
-
|
|
2047
|
-
401: 'Unauthorized'
|
|
2752
|
+
404: 'Expected transaction not found'
|
|
2048
2753
|
}
|
|
2049
2754
|
});
|
|
2050
2755
|
}
|
|
2051
2756
|
|
|
2052
2757
|
/**
|
|
2053
|
-
*
|
|
2758
|
+
* Skip expected transaction
|
|
2759
|
+
* Marks an expected transaction as skipped (PENDING -> SKIPPED)
|
|
2054
2760
|
* @param data The data for the request.
|
|
2055
|
-
* @param data.
|
|
2761
|
+
* @param data.id Expected transaction ID
|
|
2056
2762
|
* @param data.region Region code for tenant context
|
|
2057
|
-
* @returns
|
|
2763
|
+
* @returns ExpectedTransactionResponseDto Expected transaction skipped successfully
|
|
2058
2764
|
* @throws ApiError
|
|
2059
2765
|
*/
|
|
2060
|
-
public static
|
|
2061
|
-
data:
|
|
2062
|
-
): CancelablePromise<
|
|
2766
|
+
public static expectedTransactionControllerSkip(
|
|
2767
|
+
data: ExpectedTransactionControllerSkipData
|
|
2768
|
+
): CancelablePromise<ExpectedTransactionControllerSkipResponse> {
|
|
2063
2769
|
return __request(OpenAPI, {
|
|
2064
|
-
method: '
|
|
2065
|
-
url: '/api/v1/{region}/bean/
|
|
2770
|
+
method: 'POST',
|
|
2771
|
+
url: '/api/v1/{region}/bean/expected-transactions/{id}/skip',
|
|
2066
2772
|
path: {
|
|
2067
|
-
|
|
2773
|
+
id: data.id,
|
|
2068
2774
|
region: data.region
|
|
2069
2775
|
},
|
|
2070
2776
|
errors: {
|
|
2071
|
-
|
|
2777
|
+
400: 'Cannot skip - not in PENDING status',
|
|
2778
|
+
404: 'Expected transaction not found'
|
|
2072
2779
|
}
|
|
2073
2780
|
});
|
|
2074
2781
|
}
|
|
2075
2782
|
|
|
2076
2783
|
/**
|
|
2077
|
-
*
|
|
2784
|
+
* Undo skip
|
|
2785
|
+
* Reverses a skip operation (SKIPPED -> PENDING)
|
|
2078
2786
|
* @param data The data for the request.
|
|
2079
|
-
* @param data.
|
|
2787
|
+
* @param data.id Expected transaction ID
|
|
2080
2788
|
* @param data.region Region code for tenant context
|
|
2081
|
-
* @returns
|
|
2789
|
+
* @returns void Skip undone successfully
|
|
2082
2790
|
* @throws ApiError
|
|
2083
2791
|
*/
|
|
2084
|
-
public static
|
|
2085
|
-
data:
|
|
2086
|
-
): CancelablePromise<
|
|
2792
|
+
public static expectedTransactionControllerUndoSkip(
|
|
2793
|
+
data: ExpectedTransactionControllerUndoSkipData
|
|
2794
|
+
): CancelablePromise<ExpectedTransactionControllerUndoSkipResponse> {
|
|
2087
2795
|
return __request(OpenAPI, {
|
|
2088
|
-
method: '
|
|
2089
|
-
url: '/api/v1/{region}/bean/
|
|
2796
|
+
method: 'DELETE',
|
|
2797
|
+
url: '/api/v1/{region}/bean/expected-transactions/{id}/skip',
|
|
2090
2798
|
path: {
|
|
2091
|
-
|
|
2799
|
+
id: data.id,
|
|
2092
2800
|
region: data.region
|
|
2093
2801
|
},
|
|
2094
2802
|
errors: {
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
404: 'Rule not found'
|
|
2803
|
+
400: 'Cannot undo - not in SKIPPED status',
|
|
2804
|
+
404: 'Expected transaction not found'
|
|
2098
2805
|
}
|
|
2099
2806
|
});
|
|
2100
2807
|
}
|
|
2101
2808
|
|
|
2102
2809
|
/**
|
|
2103
|
-
*
|
|
2810
|
+
* Confirm transaction match
|
|
2811
|
+
* Manually matches an expected transaction with an actual transaction
|
|
2104
2812
|
* @param data The data for the request.
|
|
2105
|
-
* @param data.
|
|
2813
|
+
* @param data.id Expected transaction ID
|
|
2106
2814
|
* @param data.region Region code for tenant context
|
|
2107
2815
|
* @param data.requestBody
|
|
2108
|
-
* @returns
|
|
2816
|
+
* @returns unknown Match confirmed successfully
|
|
2109
2817
|
* @throws ApiError
|
|
2110
2818
|
*/
|
|
2111
|
-
public static
|
|
2112
|
-
data:
|
|
2113
|
-
): CancelablePromise<
|
|
2819
|
+
public static expectedTransactionControllerConfirmMatch(
|
|
2820
|
+
data: ExpectedTransactionControllerConfirmMatchData
|
|
2821
|
+
): CancelablePromise<ExpectedTransactionControllerConfirmMatchResponse> {
|
|
2114
2822
|
return __request(OpenAPI, {
|
|
2115
|
-
method: '
|
|
2116
|
-
url: '/api/v1/{region}/bean/
|
|
2823
|
+
method: 'POST',
|
|
2824
|
+
url: '/api/v1/{region}/bean/expected-transactions/{id}/match',
|
|
2117
2825
|
path: {
|
|
2118
|
-
|
|
2826
|
+
id: data.id,
|
|
2119
2827
|
region: data.region
|
|
2120
2828
|
},
|
|
2121
2829
|
body: data.requestBody,
|
|
2122
2830
|
mediaType: 'application/json',
|
|
2123
2831
|
errors: {
|
|
2124
|
-
400: '
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
404: 'Rule not found',
|
|
2128
|
-
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'
|
|
2129
2835
|
}
|
|
2130
2836
|
});
|
|
2131
2837
|
}
|
|
2132
2838
|
|
|
2133
2839
|
/**
|
|
2134
|
-
*
|
|
2840
|
+
* Unmatch transaction
|
|
2841
|
+
* Removes the match between expected and actual transaction (COMPLETED -> PENDING)
|
|
2135
2842
|
* @param data The data for the request.
|
|
2136
|
-
* @param data.
|
|
2843
|
+
* @param data.id Expected transaction ID
|
|
2137
2844
|
* @param data.region Region code for tenant context
|
|
2138
|
-
* @returns void
|
|
2845
|
+
* @returns void Match removed successfully
|
|
2139
2846
|
* @throws ApiError
|
|
2140
2847
|
*/
|
|
2141
|
-
public static
|
|
2142
|
-
data:
|
|
2143
|
-
): CancelablePromise<
|
|
2848
|
+
public static expectedTransactionControllerUnmatch(
|
|
2849
|
+
data: ExpectedTransactionControllerUnmatchData
|
|
2850
|
+
): CancelablePromise<ExpectedTransactionControllerUnmatchResponse> {
|
|
2144
2851
|
return __request(OpenAPI, {
|
|
2145
2852
|
method: 'DELETE',
|
|
2146
|
-
url: '/api/v1/{region}/bean/
|
|
2853
|
+
url: '/api/v1/{region}/bean/expected-transactions/{id}/match',
|
|
2147
2854
|
path: {
|
|
2148
|
-
|
|
2855
|
+
id: data.id,
|
|
2149
2856
|
region: data.region
|
|
2150
2857
|
},
|
|
2151
2858
|
errors: {
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
404: 'Rule not found',
|
|
2155
|
-
409: 'Resource conflict - rule is being modified by another process'
|
|
2859
|
+
400: 'Cannot unmatch - not in COMPLETED status',
|
|
2860
|
+
404: 'Expected transaction not found'
|
|
2156
2861
|
}
|
|
2157
2862
|
});
|
|
2158
2863
|
}
|
|
2159
2864
|
|
|
2160
2865
|
/**
|
|
2161
|
-
*
|
|
2866
|
+
* Enter Now
|
|
2867
|
+
* Creates an actual transaction for an expected transaction (YNAB-style Enter Now)
|
|
2162
2868
|
* @param data The data for the request.
|
|
2163
|
-
* @param data.
|
|
2869
|
+
* @param data.id Expected transaction ID
|
|
2164
2870
|
* @param data.region Region code for tenant context
|
|
2165
2871
|
* @param data.requestBody
|
|
2166
|
-
* @returns
|
|
2872
|
+
* @returns unknown Transaction created successfully
|
|
2167
2873
|
* @throws ApiError
|
|
2168
2874
|
*/
|
|
2169
|
-
public static
|
|
2170
|
-
data:
|
|
2171
|
-
): CancelablePromise<
|
|
2875
|
+
public static expectedTransactionControllerEnterNow(
|
|
2876
|
+
data: ExpectedTransactionControllerEnterNowData
|
|
2877
|
+
): CancelablePromise<ExpectedTransactionControllerEnterNowResponse> {
|
|
2172
2878
|
return __request(OpenAPI, {
|
|
2173
2879
|
method: 'POST',
|
|
2174
|
-
url: '/api/v1/{region}/bean/
|
|
2880
|
+
url: '/api/v1/{region}/bean/expected-transactions/{id}/enter',
|
|
2175
2881
|
path: {
|
|
2176
|
-
|
|
2882
|
+
id: data.id,
|
|
2177
2883
|
region: data.region
|
|
2178
2884
|
},
|
|
2179
2885
|
body: data.requestBody,
|
|
2180
2886
|
mediaType: 'application/json',
|
|
2181
2887
|
errors: {
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
404: 'Rule not found'
|
|
2888
|
+
400: 'Cannot enter - not in PENDING status or missing accounts',
|
|
2889
|
+
404: 'Expected transaction or accounts not found'
|
|
2185
2890
|
}
|
|
2186
2891
|
});
|
|
2187
2892
|
}
|
|
2188
2893
|
}
|
|
2189
2894
|
|
|
2190
|
-
export class
|
|
2895
|
+
export class RecurringForecastService {
|
|
2191
2896
|
/**
|
|
2192
|
-
*
|
|
2897
|
+
* Get cash flow forecast
|
|
2898
|
+
* Returns predicted outflows for the next N months based on active recurring rules
|
|
2193
2899
|
* @param data The data for the request.
|
|
2194
|
-
* @param data.
|
|
2195
|
-
* @
|
|
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
|
|
2196
2903
|
* @throws ApiError
|
|
2197
2904
|
*/
|
|
2198
|
-
public static
|
|
2199
|
-
data:
|
|
2200
|
-
): CancelablePromise<
|
|
2905
|
+
public static forecastControllerGetForecast(
|
|
2906
|
+
data: ForecastControllerGetForecastData
|
|
2907
|
+
): CancelablePromise<ForecastControllerGetForecastResponse> {
|
|
2201
2908
|
return __request(OpenAPI, {
|
|
2202
|
-
method: '
|
|
2203
|
-
url: '/api/v1/
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2909
|
+
method: 'GET',
|
|
2910
|
+
url: '/api/v1/{region}/bean/recurring/forecast',
|
|
2911
|
+
path: {
|
|
2912
|
+
region: data.region
|
|
2913
|
+
},
|
|
2914
|
+
query: {
|
|
2915
|
+
months: data.months
|
|
2208
2916
|
}
|
|
2209
2917
|
});
|
|
2210
2918
|
}
|
|
2919
|
+
}
|
|
2211
2920
|
|
|
2921
|
+
export class BeanCategoryCatalogService {
|
|
2212
2922
|
/**
|
|
2213
|
-
*
|
|
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.
|
|
2214
2925
|
* @param data The data for the request.
|
|
2215
|
-
* @param data.
|
|
2216
|
-
* @
|
|
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
|
|
2217
2930
|
* @throws ApiError
|
|
2218
2931
|
*/
|
|
2219
|
-
public static
|
|
2220
|
-
data:
|
|
2221
|
-
): CancelablePromise<
|
|
2932
|
+
public static categoryCatalogControllerList(
|
|
2933
|
+
data: CategoryCatalogControllerListData
|
|
2934
|
+
): CancelablePromise<CategoryCatalogControllerListResponse> {
|
|
2222
2935
|
return __request(OpenAPI, {
|
|
2223
2936
|
method: 'GET',
|
|
2224
|
-
url: '/api/v1/
|
|
2225
|
-
|
|
2226
|
-
|
|
2937
|
+
url: '/api/v1/{region}/bean/categories',
|
|
2938
|
+
path: {
|
|
2939
|
+
region: data.region
|
|
2940
|
+
},
|
|
2941
|
+
query: {
|
|
2942
|
+
scenario: data.scenario,
|
|
2943
|
+
routeBearing: data.routeBearing
|
|
2227
2944
|
}
|
|
2228
2945
|
});
|
|
2229
2946
|
}
|
|
2947
|
+
}
|
|
2230
2948
|
|
|
2949
|
+
export class LifeEventsService {
|
|
2231
2950
|
/**
|
|
2232
|
-
*
|
|
2233
|
-
*
|
|
2951
|
+
* Create a new life event
|
|
2952
|
+
* Creates a new life event entry for the authenticated user. Returns ETag header carrying the row updatedAt.
|
|
2234
2953
|
* @param data The data for the request.
|
|
2954
|
+
* @param data.region Region code for tenant context (decorative for life events)
|
|
2235
2955
|
* @param data.requestBody
|
|
2236
|
-
* @returns
|
|
2956
|
+
* @returns EventResponseDto Life event created successfully
|
|
2237
2957
|
* @throws ApiError
|
|
2238
2958
|
*/
|
|
2239
|
-
public static
|
|
2240
|
-
data:
|
|
2241
|
-
): CancelablePromise<
|
|
2959
|
+
public static eventControllerCreate(
|
|
2960
|
+
data: EventControllerCreateData
|
|
2961
|
+
): CancelablePromise<EventControllerCreateResponse> {
|
|
2242
2962
|
return __request(OpenAPI, {
|
|
2243
2963
|
method: 'POST',
|
|
2244
|
-
url: '/api/v1/
|
|
2964
|
+
url: '/api/v1/{region}/bean/events',
|
|
2965
|
+
path: {
|
|
2966
|
+
region: data.region
|
|
2967
|
+
},
|
|
2245
2968
|
body: data.requestBody,
|
|
2246
2969
|
mediaType: 'application/json',
|
|
2247
2970
|
errors: {
|
|
2248
|
-
|
|
2249
|
-
403: 'User signup is disabled'
|
|
2971
|
+
409: 'Life event already exists for this (userId, type, date) combination'
|
|
2250
2972
|
}
|
|
2251
2973
|
});
|
|
2252
2974
|
}
|
|
2253
2975
|
|
|
2254
2976
|
/**
|
|
2255
|
-
*
|
|
2977
|
+
* List user life events
|
|
2978
|
+
* Returns life events for the authenticated user with optional filtering by type, description search, and date range.
|
|
2256
2979
|
* @param data The data for the request.
|
|
2257
|
-
* @param data.
|
|
2258
|
-
* @
|
|
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
|
|
2259
2988
|
* @throws ApiError
|
|
2260
2989
|
*/
|
|
2261
|
-
public static
|
|
2262
|
-
data:
|
|
2263
|
-
): CancelablePromise<
|
|
2990
|
+
public static eventControllerFindAll(
|
|
2991
|
+
data: EventControllerFindAllData
|
|
2992
|
+
): CancelablePromise<EventControllerFindAllResponse> {
|
|
2264
2993
|
return __request(OpenAPI, {
|
|
2265
|
-
method: '
|
|
2266
|
-
url: '/api/v1/
|
|
2994
|
+
method: 'GET',
|
|
2995
|
+
url: '/api/v1/{region}/bean/events',
|
|
2267
2996
|
path: {
|
|
2268
|
-
|
|
2997
|
+
region: data.region
|
|
2269
2998
|
},
|
|
2270
|
-
|
|
2271
|
-
|
|
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
|
|
2272
3006
|
}
|
|
2273
3007
|
});
|
|
2274
3008
|
}
|
|
2275
3009
|
|
|
2276
3010
|
/**
|
|
2277
|
-
* Get
|
|
3011
|
+
* Get life event by ID
|
|
3012
|
+
* Returns a single life event by its ID. Returns ETag header.
|
|
2278
3013
|
* @param data The data for the request.
|
|
2279
|
-
* @param data.id
|
|
2280
|
-
* @
|
|
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
|
|
2281
3017
|
* @throws ApiError
|
|
2282
3018
|
*/
|
|
2283
|
-
public static
|
|
2284
|
-
data:
|
|
2285
|
-
): CancelablePromise<
|
|
3019
|
+
public static eventControllerFindOne(
|
|
3020
|
+
data: EventControllerFindOneData
|
|
3021
|
+
): CancelablePromise<EventControllerFindOneResponse> {
|
|
2286
3022
|
return __request(OpenAPI, {
|
|
2287
3023
|
method: 'GET',
|
|
2288
|
-
url: '/api/v1/
|
|
3024
|
+
url: '/api/v1/{region}/bean/events/{id}',
|
|
2289
3025
|
path: {
|
|
2290
|
-
id: data.id
|
|
3026
|
+
id: data.id,
|
|
3027
|
+
region: data.region
|
|
2291
3028
|
},
|
|
2292
3029
|
errors: {
|
|
2293
|
-
|
|
3030
|
+
404: 'Life event not found'
|
|
2294
3031
|
}
|
|
2295
3032
|
});
|
|
2296
3033
|
}
|
|
2297
3034
|
|
|
2298
3035
|
/**
|
|
2299
|
-
* 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.
|
|
2300
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)
|
|
2301
3041
|
* @param data.requestBody
|
|
2302
|
-
* @returns
|
|
3042
|
+
* @returns EventResponseDto Life event updated successfully
|
|
2303
3043
|
* @throws ApiError
|
|
2304
3044
|
*/
|
|
2305
|
-
public static
|
|
2306
|
-
data:
|
|
2307
|
-
): CancelablePromise<
|
|
3045
|
+
public static eventControllerUpdate(
|
|
3046
|
+
data: EventControllerUpdateData
|
|
3047
|
+
): CancelablePromise<EventControllerUpdateResponse> {
|
|
2308
3048
|
return __request(OpenAPI, {
|
|
2309
3049
|
method: 'PUT',
|
|
2310
|
-
url: '/api/v1/
|
|
3050
|
+
url: '/api/v1/{region}/bean/events/{id}',
|
|
3051
|
+
path: {
|
|
3052
|
+
id: data.id,
|
|
3053
|
+
region: data.region
|
|
3054
|
+
},
|
|
2311
3055
|
body: data.requestBody,
|
|
2312
3056
|
mediaType: 'application/json',
|
|
2313
3057
|
errors: {
|
|
2314
|
-
|
|
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)'
|
|
2315
3062
|
}
|
|
2316
3063
|
});
|
|
2317
3064
|
}
|
|
2318
3065
|
|
|
2319
3066
|
/**
|
|
2320
|
-
*
|
|
3067
|
+
* Delete a life event
|
|
3068
|
+
* Deletes a life event entry (hard delete). Returns 204.
|
|
2321
3069
|
* @param data The data for the request.
|
|
2322
|
-
* @param data.
|
|
2323
|
-
* @param data.
|
|
2324
|
-
* @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
|
|
2325
3073
|
* @throws ApiError
|
|
2326
3074
|
*/
|
|
2327
|
-
public static
|
|
2328
|
-
data:
|
|
2329
|
-
): 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> {
|
|
2330
3105
|
return __request(OpenAPI, {
|
|
2331
3106
|
method: 'GET',
|
|
2332
|
-
url: '/api/v1/
|
|
3107
|
+
url: '/api/v1/{region}/bean/events/{id}/slice',
|
|
3108
|
+
path: {
|
|
3109
|
+
id: data.id,
|
|
3110
|
+
region: data.region
|
|
3111
|
+
},
|
|
2333
3112
|
query: {
|
|
2334
|
-
|
|
2335
|
-
|
|
3113
|
+
accountPattern: data.accountPattern,
|
|
3114
|
+
granularity: data.granularity
|
|
3115
|
+
},
|
|
3116
|
+
errors: {
|
|
3117
|
+
400: 'accountPattern query param is empty',
|
|
3118
|
+
404: 'Life event not found'
|
|
2336
3119
|
}
|
|
2337
3120
|
});
|
|
2338
3121
|
}
|
|
3122
|
+
}
|
|
2339
3123
|
|
|
3124
|
+
export class OnboardingService {
|
|
2340
3125
|
/**
|
|
2341
|
-
*
|
|
2342
|
-
* @
|
|
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.
|
|
2343
3131
|
* @throws ApiError
|
|
2344
3132
|
*/
|
|
2345
|
-
public static
|
|
3133
|
+
public static onboardingControllerBootstrap(
|
|
3134
|
+
data: OnboardingControllerBootstrapData
|
|
3135
|
+
): CancelablePromise<OnboardingControllerBootstrapResponse> {
|
|
2346
3136
|
return __request(OpenAPI, {
|
|
2347
|
-
method: '
|
|
2348
|
-
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
|
+
}
|
|
2349
3147
|
});
|
|
2350
3148
|
}
|
|
2351
3149
|
}
|
|
2352
3150
|
|
|
2353
|
-
export class
|
|
3151
|
+
export class BalanceReconciliationService {
|
|
2354
3152
|
/**
|
|
2355
|
-
*
|
|
2356
|
-
*
|
|
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
|
|
2357
3159
|
* @throws ApiError
|
|
2358
3160
|
*/
|
|
2359
|
-
public static
|
|
3161
|
+
public static reconciliationControllerCompute(
|
|
3162
|
+
data: ReconciliationControllerComputeData
|
|
3163
|
+
): CancelablePromise<ReconciliationControllerComputeResponse> {
|
|
2360
3164
|
return __request(OpenAPI, {
|
|
2361
|
-
method: '
|
|
2362
|
-
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',
|
|
2363
3172
|
errors: {
|
|
2364
|
-
|
|
2365
|
-
403: 'Forbidden - insufficient permissions'
|
|
3173
|
+
404: 'Account not found'
|
|
2366
3174
|
}
|
|
2367
3175
|
});
|
|
2368
3176
|
}
|
|
2369
3177
|
|
|
2370
3178
|
/**
|
|
2371
|
-
*
|
|
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.
|
|
2372
3181
|
* @param data The data for the request.
|
|
2373
|
-
* @param data.
|
|
2374
|
-
* @
|
|
3182
|
+
* @param data.region Region code for tenant context (decorative for reconciliation)
|
|
3183
|
+
* @param data.requestBody
|
|
3184
|
+
* @returns ReconciliationRecordDto Balance assertion recorded
|
|
2375
3185
|
* @throws ApiError
|
|
2376
3186
|
*/
|
|
2377
|
-
public static
|
|
2378
|
-
data:
|
|
2379
|
-
): CancelablePromise<
|
|
3187
|
+
public static reconciliationControllerAssert(
|
|
3188
|
+
data: ReconciliationControllerAssertData
|
|
3189
|
+
): CancelablePromise<ReconciliationControllerAssertResponse> {
|
|
2380
3190
|
return __request(OpenAPI, {
|
|
2381
|
-
method: '
|
|
2382
|
-
url: '/api/v1/
|
|
3191
|
+
method: 'POST',
|
|
3192
|
+
url: '/api/v1/{region}/bean/reconciliations/assert',
|
|
2383
3193
|
path: {
|
|
2384
|
-
|
|
3194
|
+
region: data.region
|
|
2385
3195
|
},
|
|
3196
|
+
body: data.requestBody,
|
|
3197
|
+
mediaType: 'application/json',
|
|
2386
3198
|
errors: {
|
|
2387
|
-
|
|
2388
|
-
403: 'Forbidden - insufficient permissions',
|
|
2389
|
-
404: 'Property not found'
|
|
3199
|
+
404: 'Account not found'
|
|
2390
3200
|
}
|
|
2391
3201
|
});
|
|
2392
3202
|
}
|
|
2393
3203
|
|
|
2394
3204
|
/**
|
|
2395
|
-
*
|
|
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.
|
|
2396
3207
|
* @param data The data for the request.
|
|
2397
|
-
* @param data.
|
|
3208
|
+
* @param data.region Region code for tenant context (decorative for reconciliation)
|
|
2398
3209
|
* @param data.requestBody
|
|
2399
|
-
* @returns
|
|
3210
|
+
* @returns PadResultDto Pad adjusting entry generated
|
|
2400
3211
|
* @throws ApiError
|
|
2401
3212
|
*/
|
|
2402
|
-
public static
|
|
2403
|
-
data:
|
|
2404
|
-
): CancelablePromise<
|
|
3213
|
+
public static reconciliationControllerPad(
|
|
3214
|
+
data: ReconciliationControllerPadData
|
|
3215
|
+
): CancelablePromise<ReconciliationControllerPadResponse> {
|
|
2405
3216
|
return __request(OpenAPI, {
|
|
2406
|
-
method: '
|
|
2407
|
-
url: '/api/v1/
|
|
3217
|
+
method: 'POST',
|
|
3218
|
+
url: '/api/v1/{region}/bean/reconciliations/pad',
|
|
2408
3219
|
path: {
|
|
2409
|
-
|
|
3220
|
+
region: data.region
|
|
2410
3221
|
},
|
|
2411
3222
|
body: data.requestBody,
|
|
2412
3223
|
mediaType: 'application/json',
|
|
2413
3224
|
errors: {
|
|
2414
|
-
|
|
2415
|
-
|
|
3225
|
+
400: 'Book already within tolerance — no pad needed',
|
|
3226
|
+
404: 'Account not found'
|
|
2416
3227
|
}
|
|
2417
3228
|
});
|
|
2418
3229
|
}
|
|
2419
3230
|
|
|
2420
3231
|
/**
|
|
2421
|
-
*
|
|
3232
|
+
* List reconciliation history for an account
|
|
3233
|
+
* Returns recorded balance assertions (most recent first). The latest drives the account-detail "Last <date>" badge.
|
|
2422
3234
|
* @param data The data for the request.
|
|
2423
|
-
* @param data.
|
|
2424
|
-
* @
|
|
3235
|
+
* @param data.accountId BeanAccount id
|
|
3236
|
+
* @param data.region Region code for tenant context (decorative for reconciliation)
|
|
3237
|
+
* @returns ReconciliationRecordDto Reconciliation history
|
|
2425
3238
|
* @throws ApiError
|
|
2426
3239
|
*/
|
|
2427
|
-
public static
|
|
2428
|
-
data:
|
|
2429
|
-
): CancelablePromise<
|
|
3240
|
+
public static reconciliationControllerHistory(
|
|
3241
|
+
data: ReconciliationControllerHistoryData
|
|
3242
|
+
): CancelablePromise<ReconciliationControllerHistoryResponse> {
|
|
2430
3243
|
return __request(OpenAPI, {
|
|
2431
|
-
method: '
|
|
2432
|
-
url: '/api/v1/
|
|
3244
|
+
method: 'GET',
|
|
3245
|
+
url: '/api/v1/{region}/bean/accounts/{accountId}/reconciliations',
|
|
2433
3246
|
path: {
|
|
2434
|
-
|
|
3247
|
+
accountId: data.accountId,
|
|
3248
|
+
region: data.region
|
|
2435
3249
|
},
|
|
2436
3250
|
errors: {
|
|
2437
|
-
|
|
2438
|
-
403: 'Forbidden - insufficient permissions',
|
|
2439
|
-
404: 'Property not found'
|
|
3251
|
+
404: 'Account not found'
|
|
2440
3252
|
}
|
|
2441
3253
|
});
|
|
2442
3254
|
}
|
|
@@ -2446,13 +3258,20 @@ export class BeanExportService {
|
|
|
2446
3258
|
/**
|
|
2447
3259
|
* Export Beancount ledger as ZIP
|
|
2448
3260
|
* Export all user Beancount data as a ZIP file containing ledger.beancount and yearly files in community format.
|
|
2449
|
-
* @
|
|
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
|
|
2450
3264
|
* @throws ApiError
|
|
2451
3265
|
*/
|
|
2452
|
-
public static exportControllerExportBeancount(
|
|
3266
|
+
public static exportControllerExportBeancount(
|
|
3267
|
+
data: ExportControllerExportBeancountData
|
|
3268
|
+
): CancelablePromise<ExportControllerExportBeancountResponse> {
|
|
2453
3269
|
return __request(OpenAPI, {
|
|
2454
3270
|
method: 'GET',
|
|
2455
|
-
url: '/api/v1/{region}/bean/export/beancount'
|
|
3271
|
+
url: '/api/v1/{region}/bean/export/beancount',
|
|
3272
|
+
path: {
|
|
3273
|
+
region: data.region
|
|
3274
|
+
}
|
|
2456
3275
|
});
|
|
2457
3276
|
}
|
|
2458
3277
|
}
|
|
@@ -2489,7 +3308,7 @@ export class BeanImportService {
|
|
|
2489
3308
|
|
|
2490
3309
|
/**
|
|
2491
3310
|
* Identify file type
|
|
2492
|
-
*
|
|
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.
|
|
2493
3312
|
* @param data The data for the request.
|
|
2494
3313
|
* @param data.region Region code for tenant context
|
|
2495
3314
|
* @param data.formData File to identify
|
|
@@ -2543,403 +3362,578 @@ export class BeanImportService {
|
|
|
2543
3362
|
* Get importer configuration
|
|
2544
3363
|
* Returns the current configuration for the specified importer. Creates default configuration if none exists.
|
|
2545
3364
|
* @param data The data for the request.
|
|
2546
|
-
* @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.
|
|
2547
3546
|
* @param data.region Region code for tenant context
|
|
2548
|
-
* @
|
|
3547
|
+
* @param data.requestBody
|
|
3548
|
+
* @returns ExternalAccountLinkResponseDto Link created.
|
|
2549
3549
|
* @throws ApiError
|
|
2550
3550
|
*/
|
|
2551
|
-
public static
|
|
2552
|
-
data:
|
|
2553
|
-
): CancelablePromise<
|
|
3551
|
+
public static externalAccountLinkControllerCreate(
|
|
3552
|
+
data: ExternalAccountLinkControllerCreateData
|
|
3553
|
+
): CancelablePromise<ExternalAccountLinkControllerCreateResponse> {
|
|
2554
3554
|
return __request(OpenAPI, {
|
|
2555
|
-
method: '
|
|
2556
|
-
url: '/api/v1/{region}/bean/
|
|
3555
|
+
method: 'POST',
|
|
3556
|
+
url: '/api/v1/{region}/bean/external-account-links',
|
|
2557
3557
|
path: {
|
|
2558
|
-
importerId: data.importerId,
|
|
2559
3558
|
region: data.region
|
|
2560
3559
|
},
|
|
3560
|
+
body: data.requestBody,
|
|
3561
|
+
mediaType: 'application/json',
|
|
2561
3562
|
errors: {
|
|
2562
|
-
|
|
2563
|
-
401: 'Unauthorized - Authentication required'
|
|
3563
|
+
422: 'beanAccountId not owned, or an active link already exists.'
|
|
2564
3564
|
}
|
|
2565
3565
|
});
|
|
2566
3566
|
}
|
|
2567
3567
|
|
|
2568
3568
|
/**
|
|
2569
|
-
*
|
|
2570
|
-
* Updates the configuration for the specified importer. Partial updates are supported.
|
|
3569
|
+
* List the user's active external account links
|
|
2571
3570
|
* @param data The data for the request.
|
|
2572
|
-
* @param data.
|
|
3571
|
+
* @param data.provider
|
|
2573
3572
|
* @param data.region Region code for tenant context
|
|
2574
|
-
* @
|
|
2575
|
-
* @returns ImporterConfigDto Configuration updated successfully
|
|
3573
|
+
* @returns ExternalAccountLinkListResponseDto Links retrieved.
|
|
2576
3574
|
* @throws ApiError
|
|
2577
3575
|
*/
|
|
2578
|
-
public static
|
|
2579
|
-
data:
|
|
2580
|
-
): CancelablePromise<
|
|
3576
|
+
public static externalAccountLinkControllerFindAll(
|
|
3577
|
+
data: ExternalAccountLinkControllerFindAllData
|
|
3578
|
+
): CancelablePromise<ExternalAccountLinkControllerFindAllResponse> {
|
|
2581
3579
|
return __request(OpenAPI, {
|
|
2582
|
-
method: '
|
|
2583
|
-
url: '/api/v1/{region}/bean/
|
|
3580
|
+
method: 'GET',
|
|
3581
|
+
url: '/api/v1/{region}/bean/external-account-links',
|
|
2584
3582
|
path: {
|
|
2585
|
-
importerId: data.importerId,
|
|
2586
3583
|
region: data.region
|
|
2587
3584
|
},
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
errors: {
|
|
2591
|
-
400: 'Invalid input - Validation failed',
|
|
2592
|
-
404: 'Configuration not found'
|
|
3585
|
+
query: {
|
|
3586
|
+
provider: data.provider
|
|
2593
3587
|
}
|
|
2594
3588
|
});
|
|
2595
3589
|
}
|
|
2596
3590
|
|
|
2597
3591
|
/**
|
|
2598
|
-
*
|
|
2599
|
-
* Resets the configuration for the specified importer to default values. This operation overwrites all existing configuration.
|
|
3592
|
+
* Get a single external account link
|
|
2600
3593
|
* @param data The data for the request.
|
|
2601
|
-
* @param data.
|
|
3594
|
+
* @param data.id
|
|
2602
3595
|
* @param data.region Region code for tenant context
|
|
2603
|
-
* @returns
|
|
3596
|
+
* @returns ExternalAccountLinkResponseDto Link retrieved.
|
|
2604
3597
|
* @throws ApiError
|
|
2605
3598
|
*/
|
|
2606
|
-
public static
|
|
2607
|
-
data:
|
|
2608
|
-
): CancelablePromise<
|
|
3599
|
+
public static externalAccountLinkControllerFindOne(
|
|
3600
|
+
data: ExternalAccountLinkControllerFindOneData
|
|
3601
|
+
): CancelablePromise<ExternalAccountLinkControllerFindOneResponse> {
|
|
2609
3602
|
return __request(OpenAPI, {
|
|
2610
|
-
method: '
|
|
2611
|
-
url: '/api/v1/{region}/bean/
|
|
3603
|
+
method: 'GET',
|
|
3604
|
+
url: '/api/v1/{region}/bean/external-account-links/{id}',
|
|
2612
3605
|
path: {
|
|
2613
|
-
|
|
3606
|
+
id: data.id,
|
|
2614
3607
|
region: data.region
|
|
2615
3608
|
},
|
|
2616
3609
|
errors: {
|
|
2617
|
-
|
|
3610
|
+
422: 'Link not found or not owned by the user.'
|
|
2618
3611
|
}
|
|
2619
3612
|
});
|
|
2620
3613
|
}
|
|
2621
|
-
}
|
|
2622
3614
|
|
|
2623
|
-
export class BeanPlatformsService {
|
|
2624
3615
|
/**
|
|
2625
|
-
*
|
|
2626
|
-
* @
|
|
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.
|
|
2627
3621
|
* @throws ApiError
|
|
2628
3622
|
*/
|
|
2629
|
-
public static
|
|
3623
|
+
public static externalAccountLinkControllerRemove(
|
|
3624
|
+
data: ExternalAccountLinkControllerRemoveData
|
|
3625
|
+
): CancelablePromise<ExternalAccountLinkControllerRemoveResponse> {
|
|
2630
3626
|
return __request(OpenAPI, {
|
|
2631
|
-
method: '
|
|
2632
|
-
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
|
+
}
|
|
2633
3633
|
});
|
|
2634
3634
|
}
|
|
3635
|
+
}
|
|
2635
3636
|
|
|
3637
|
+
export class ImportTelemetryService {
|
|
2636
3638
|
/**
|
|
2637
|
-
*
|
|
3639
|
+
* Receive anonymous parser failure telemetry
|
|
2638
3640
|
* @param data The data for the request.
|
|
3641
|
+
* @param data.region Region code for tenant context
|
|
2639
3642
|
* @param data.requestBody
|
|
2640
|
-
* @returns unknown
|
|
3643
|
+
* @returns unknown Telemetry report received
|
|
2641
3644
|
* @throws ApiError
|
|
2642
3645
|
*/
|
|
2643
|
-
public static
|
|
2644
|
-
data:
|
|
2645
|
-
): CancelablePromise<
|
|
3646
|
+
public static telemetryControllerReportTelemetry(
|
|
3647
|
+
data: TelemetryControllerReportTelemetryData
|
|
3648
|
+
): CancelablePromise<TelemetryControllerReportTelemetryResponse> {
|
|
2646
3649
|
return __request(OpenAPI, {
|
|
2647
3650
|
method: 'POST',
|
|
2648
|
-
url: '/api/v1/bean/
|
|
3651
|
+
url: '/api/v1/{region}/bean/import/parser-telemetry',
|
|
3652
|
+
path: {
|
|
3653
|
+
region: data.region
|
|
3654
|
+
},
|
|
2649
3655
|
body: data.requestBody,
|
|
2650
3656
|
mediaType: 'application/json',
|
|
2651
3657
|
errors: {
|
|
2652
|
-
|
|
3658
|
+
401: 'Unauthorized'
|
|
2653
3659
|
}
|
|
2654
3660
|
});
|
|
2655
3661
|
}
|
|
2656
3662
|
|
|
2657
3663
|
/**
|
|
2658
|
-
*
|
|
2659
|
-
* @
|
|
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
|
|
2660
3669
|
* @throws ApiError
|
|
2661
3670
|
*/
|
|
2662
|
-
public static
|
|
3671
|
+
public static telemetryControllerReportCoverageMiss(
|
|
3672
|
+
data: TelemetryControllerReportCoverageMissData
|
|
3673
|
+
): CancelablePromise<TelemetryControllerReportCoverageMissResponse> {
|
|
2663
3674
|
return __request(OpenAPI, {
|
|
2664
|
-
method: '
|
|
2665
|
-
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
|
+
}
|
|
2666
3685
|
});
|
|
2667
3686
|
}
|
|
2668
3687
|
|
|
2669
3688
|
/**
|
|
2670
|
-
*
|
|
3689
|
+
* Coverage metrics (uncovered format aggregation)
|
|
2671
3690
|
* @param data The data for the request.
|
|
2672
|
-
* @param data.
|
|
2673
|
-
* @param data.
|
|
2674
|
-
* @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
|
|
2675
3694
|
* @throws ApiError
|
|
2676
3695
|
*/
|
|
2677
|
-
public static
|
|
2678
|
-
data:
|
|
2679
|
-
): CancelablePromise<
|
|
3696
|
+
public static telemetryControllerGetCoverageMetrics(
|
|
3697
|
+
data: TelemetryControllerGetCoverageMetricsData
|
|
3698
|
+
): CancelablePromise<TelemetryControllerGetCoverageMetricsResponse> {
|
|
2680
3699
|
return __request(OpenAPI, {
|
|
2681
3700
|
method: 'GET',
|
|
2682
|
-
url: '/api/v1/bean/
|
|
2683
|
-
|
|
2684
|
-
q: data.q,
|
|
3701
|
+
url: '/api/v1/{region}/bean/import/parser-coverage-metrics',
|
|
3702
|
+
path: {
|
|
2685
3703
|
region: data.region
|
|
3704
|
+
},
|
|
3705
|
+
query: {
|
|
3706
|
+
topN: data.topN
|
|
2686
3707
|
}
|
|
2687
3708
|
});
|
|
2688
3709
|
}
|
|
3710
|
+
}
|
|
2689
3711
|
|
|
3712
|
+
export class BeanNlpService {
|
|
2690
3713
|
/**
|
|
2691
|
-
*
|
|
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"
|
|
2692
3716
|
* @param data The data for the request.
|
|
2693
|
-
* @param data.
|
|
2694
|
-
* @param data.requestBody
|
|
2695
|
-
* @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
|
|
2696
3720
|
* @throws ApiError
|
|
2697
3721
|
*/
|
|
2698
|
-
public static
|
|
2699
|
-
data:
|
|
2700
|
-
): CancelablePromise<
|
|
3722
|
+
public static nlpControllerProcessNaturalLanguage(
|
|
3723
|
+
data: NlpControllerProcessNaturalLanguageData
|
|
3724
|
+
): CancelablePromise<NlpControllerProcessNaturalLanguageResponse> {
|
|
2701
3725
|
return __request(OpenAPI, {
|
|
2702
|
-
method: '
|
|
2703
|
-
url: '/api/v1/bean/
|
|
3726
|
+
method: 'POST',
|
|
3727
|
+
url: '/api/v1/{region}/bean/nlp/process',
|
|
2704
3728
|
path: {
|
|
2705
|
-
|
|
3729
|
+
region: data.region
|
|
2706
3730
|
},
|
|
2707
3731
|
body: data.requestBody,
|
|
2708
3732
|
mediaType: 'application/json',
|
|
2709
3733
|
errors: {
|
|
2710
|
-
|
|
3734
|
+
400: 'Invalid input',
|
|
3735
|
+
401: 'Unauthorized'
|
|
2711
3736
|
}
|
|
2712
3737
|
});
|
|
2713
3738
|
}
|
|
2714
3739
|
|
|
2715
3740
|
/**
|
|
2716
|
-
*
|
|
3741
|
+
* Clear dialogue session
|
|
3742
|
+
* Clear the current NLP dialogue session. Use this to cancel an ongoing multi-turn dialogue.
|
|
2717
3743
|
* @param data The data for the request.
|
|
2718
|
-
* @param data.
|
|
2719
|
-
* @
|
|
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
|
|
2720
3747
|
* @throws ApiError
|
|
2721
3748
|
*/
|
|
2722
|
-
public static
|
|
2723
|
-
data:
|
|
2724
|
-
): CancelablePromise<
|
|
3749
|
+
public static nlpControllerClearSession(
|
|
3750
|
+
data: NlpControllerClearSessionData
|
|
3751
|
+
): CancelablePromise<NlpControllerClearSessionResponse> {
|
|
2725
3752
|
return __request(OpenAPI, {
|
|
2726
3753
|
method: 'DELETE',
|
|
2727
|
-
url: '/api/v1/bean/
|
|
3754
|
+
url: '/api/v1/{region}/bean/nlp/session',
|
|
2728
3755
|
path: {
|
|
2729
|
-
|
|
3756
|
+
region: data.region
|
|
3757
|
+
},
|
|
3758
|
+
query: {
|
|
3759
|
+
sessionId: data.sessionId
|
|
2730
3760
|
},
|
|
2731
3761
|
errors: {
|
|
2732
|
-
|
|
3762
|
+
401: 'Unauthorized'
|
|
2733
3763
|
}
|
|
2734
3764
|
});
|
|
2735
3765
|
}
|
|
2736
|
-
}
|
|
2737
3766
|
|
|
2738
|
-
export class ProviderSyncService {
|
|
2739
3767
|
/**
|
|
2740
|
-
*
|
|
2741
|
-
*
|
|
2742
|
-
* Accepts raw transactions from external financial data providers, transforms them to Beancount format, and processes them through the ingestion pipeline.
|
|
2743
|
-
*
|
|
2744
|
-
* **Supported Providers:**
|
|
2745
|
-
* - **plaid**: Plaid API (US, Canada, Europe)
|
|
2746
|
-
* - **teller**: Teller API (US)
|
|
2747
|
-
* - **truelayer**: TrueLayer Open Banking (UK, Europe)
|
|
2748
|
-
* - **gocardless**: GoCardless Bank Account Data (Europe)
|
|
2749
|
-
* - **simplefin**: SimpleFIN (Self-hosted)
|
|
2750
|
-
* - **yodlee**: Yodlee (Global)
|
|
2751
|
-
* - **beancount-direct**: Beancount format transactions
|
|
2752
|
-
* - **parsed-bill**: Client-side parsed bill transactions
|
|
2753
|
-
*
|
|
2754
|
-
* **Processing Flow:**
|
|
2755
|
-
* 1. Transform raw data via provider adapter
|
|
2756
|
-
* 2. Validate transaction format
|
|
2757
|
-
* 3. Deduplicate using originalId
|
|
2758
|
-
* 4. Classify using rule engine
|
|
2759
|
-
* 5. Route low-confidence to Review Center
|
|
2760
|
-
* 6. Persist validated transactions
|
|
2761
|
-
*
|
|
3768
|
+
* Get current session state
|
|
3769
|
+
* Get the current NLP dialogue session state. Useful for debugging and displaying session context in UI.
|
|
2762
3770
|
* @param data The data for the request.
|
|
2763
|
-
* @param data.
|
|
2764
|
-
* @param data.
|
|
2765
|
-
* @
|
|
2766
|
-
* @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)
|
|
2767
3774
|
* @throws ApiError
|
|
2768
3775
|
*/
|
|
2769
|
-
public static
|
|
2770
|
-
data:
|
|
2771
|
-
): CancelablePromise<
|
|
3776
|
+
public static nlpControllerGetSession(
|
|
3777
|
+
data: NlpControllerGetSessionData
|
|
3778
|
+
): CancelablePromise<NlpControllerGetSessionResponse> {
|
|
2772
3779
|
return __request(OpenAPI, {
|
|
2773
|
-
method: '
|
|
2774
|
-
url: '/api/v1/{region}/bean/
|
|
3780
|
+
method: 'GET',
|
|
3781
|
+
url: '/api/v1/{region}/bean/nlp/session',
|
|
2775
3782
|
path: {
|
|
2776
|
-
providerName: data.providerName,
|
|
2777
3783
|
region: data.region
|
|
2778
3784
|
},
|
|
2779
|
-
|
|
2780
|
-
|
|
3785
|
+
query: {
|
|
3786
|
+
sessionId: data.sessionId
|
|
3787
|
+
},
|
|
2781
3788
|
errors: {
|
|
2782
|
-
|
|
2783
|
-
401: 'Missing or invalid authentication',
|
|
2784
|
-
404: 'Provider not supported'
|
|
3789
|
+
401: 'Unauthorized'
|
|
2785
3790
|
}
|
|
2786
3791
|
});
|
|
2787
3792
|
}
|
|
3793
|
+
}
|
|
2788
3794
|
|
|
3795
|
+
export class BeanPlatformsService {
|
|
2789
3796
|
/**
|
|
2790
|
-
* Get
|
|
2791
|
-
*
|
|
2792
|
-
* @param data The data for the request.
|
|
2793
|
-
* @param data.region Region code for tenant context
|
|
2794
|
-
* @returns SupportedProvidersResponseDto List of supported providers
|
|
3797
|
+
* Get all platforms with statistics
|
|
3798
|
+
* @returns unknown List of platforms with binding and account counts
|
|
2795
3799
|
* @throws ApiError
|
|
2796
3800
|
*/
|
|
2797
|
-
public static
|
|
2798
|
-
data: ProviderSyncControllerGetSupportedProvidersData
|
|
2799
|
-
): CancelablePromise<ProviderSyncControllerGetSupportedProvidersResponse> {
|
|
3801
|
+
public static platformControllerFindAll(): CancelablePromise<PlatformControllerFindAllResponse> {
|
|
2800
3802
|
return __request(OpenAPI, {
|
|
2801
3803
|
method: 'GET',
|
|
2802
|
-
url: '/api/v1/
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
|
|
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',
|
|
2806
3823
|
errors: {
|
|
2807
|
-
|
|
3824
|
+
409: 'Platform already exists'
|
|
2808
3825
|
}
|
|
2809
3826
|
});
|
|
2810
3827
|
}
|
|
2811
3828
|
|
|
2812
3829
|
/**
|
|
2813
|
-
*
|
|
2814
|
-
* Returns whether a specific provider is supported.
|
|
3830
|
+
* Get platform list for current user
|
|
2815
3831
|
* @param data The data for the request.
|
|
2816
|
-
* @param data.
|
|
2817
|
-
* @
|
|
2818
|
-
* @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
|
|
2819
3834
|
* @throws ApiError
|
|
2820
3835
|
*/
|
|
2821
|
-
public static
|
|
2822
|
-
data:
|
|
2823
|
-
): CancelablePromise<
|
|
3836
|
+
public static platformControllerGetPlatformList(
|
|
3837
|
+
data: PlatformControllerGetPlatformListData = {}
|
|
3838
|
+
): CancelablePromise<PlatformControllerGetPlatformListResponse> {
|
|
2824
3839
|
return __request(OpenAPI, {
|
|
2825
3840
|
method: 'GET',
|
|
2826
|
-
url: '/api/v1/
|
|
2827
|
-
|
|
2828
|
-
providerName: data.providerName,
|
|
3841
|
+
url: '/api/v1/bean/platforms/list',
|
|
3842
|
+
query: {
|
|
2829
3843
|
region: data.region
|
|
2830
|
-
},
|
|
2831
|
-
errors: {
|
|
2832
|
-
401: 'Missing or invalid authentication'
|
|
2833
3844
|
}
|
|
2834
3845
|
});
|
|
2835
3846
|
}
|
|
2836
|
-
}
|
|
2837
3847
|
|
|
2838
|
-
export class ImportTelemetryService {
|
|
2839
3848
|
/**
|
|
2840
|
-
*
|
|
3849
|
+
* Match platforms by name or alias
|
|
2841
3850
|
* @param data The data for the request.
|
|
2842
|
-
* @param data.
|
|
2843
|
-
* @param data.
|
|
2844
|
-
* @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
|
|
2845
3854
|
* @throws ApiError
|
|
2846
3855
|
*/
|
|
2847
|
-
public static
|
|
2848
|
-
data:
|
|
2849
|
-
): CancelablePromise<
|
|
3856
|
+
public static platformControllerMatchPlatforms(
|
|
3857
|
+
data: PlatformControllerMatchPlatformsData
|
|
3858
|
+
): CancelablePromise<PlatformControllerMatchPlatformsResponse> {
|
|
2850
3859
|
return __request(OpenAPI, {
|
|
2851
|
-
method: '
|
|
2852
|
-
url: '/api/v1/
|
|
2853
|
-
|
|
3860
|
+
method: 'GET',
|
|
3861
|
+
url: '/api/v1/bean/platforms/match',
|
|
3862
|
+
query: {
|
|
3863
|
+
q: data.q,
|
|
2854
3864
|
region: data.region
|
|
2855
|
-
},
|
|
2856
|
-
body: data.requestBody,
|
|
2857
|
-
mediaType: 'application/json',
|
|
2858
|
-
errors: {
|
|
2859
|
-
401: 'Unauthorized'
|
|
2860
3865
|
}
|
|
2861
3866
|
});
|
|
2862
3867
|
}
|
|
2863
|
-
}
|
|
2864
3868
|
|
|
2865
|
-
export class BeanNlpService {
|
|
2866
3869
|
/**
|
|
2867
|
-
*
|
|
2868
|
-
* 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
|
|
2869
3871
|
* @param data The data for the request.
|
|
2870
|
-
* @param data.
|
|
2871
|
-
* @param data.
|
|
2872
|
-
* @
|
|
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)
|
|
2873
3876
|
* @throws ApiError
|
|
2874
3877
|
*/
|
|
2875
|
-
public static
|
|
2876
|
-
data:
|
|
2877
|
-
): CancelablePromise<
|
|
3878
|
+
public static platformControllerGetPlatformStandards(
|
|
3879
|
+
data: PlatformControllerGetPlatformStandardsData
|
|
3880
|
+
): CancelablePromise<PlatformControllerGetPlatformStandardsResponse> {
|
|
2878
3881
|
return __request(OpenAPI, {
|
|
2879
|
-
method: '
|
|
2880
|
-
url: '/api/v1/{
|
|
3882
|
+
method: 'GET',
|
|
3883
|
+
url: '/api/v1/bean/platforms/{id}/standards',
|
|
2881
3884
|
path: {
|
|
2882
|
-
|
|
3885
|
+
id: data.id
|
|
2883
3886
|
},
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
400: 'Invalid input',
|
|
2888
|
-
401: 'Unauthorized'
|
|
3887
|
+
query: {
|
|
3888
|
+
region: data.region,
|
|
3889
|
+
type: data.type
|
|
2889
3890
|
}
|
|
2890
3891
|
});
|
|
2891
3892
|
}
|
|
2892
3893
|
|
|
2893
3894
|
/**
|
|
2894
|
-
*
|
|
2895
|
-
* Clear the current NLP dialogue session. Use this to cancel an ongoing multi-turn dialogue.
|
|
3895
|
+
* Update a platform
|
|
2896
3896
|
* @param data The data for the request.
|
|
2897
|
-
* @param data.
|
|
2898
|
-
* @param data.
|
|
2899
|
-
* @returns
|
|
3897
|
+
* @param data.id Platform ID
|
|
3898
|
+
* @param data.requestBody
|
|
3899
|
+
* @returns unknown Platform updated successfully
|
|
2900
3900
|
* @throws ApiError
|
|
2901
3901
|
*/
|
|
2902
|
-
public static
|
|
2903
|
-
data:
|
|
2904
|
-
): CancelablePromise<
|
|
3902
|
+
public static platformControllerUpdate(
|
|
3903
|
+
data: PlatformControllerUpdateData
|
|
3904
|
+
): CancelablePromise<PlatformControllerUpdateResponse> {
|
|
2905
3905
|
return __request(OpenAPI, {
|
|
2906
|
-
method: '
|
|
2907
|
-
url: '/api/v1/
|
|
3906
|
+
method: 'PUT',
|
|
3907
|
+
url: '/api/v1/bean/platforms/{id}',
|
|
2908
3908
|
path: {
|
|
2909
|
-
|
|
2910
|
-
},
|
|
2911
|
-
query: {
|
|
2912
|
-
sessionId: data.sessionId
|
|
3909
|
+
id: data.id
|
|
2913
3910
|
},
|
|
3911
|
+
body: data.requestBody,
|
|
3912
|
+
mediaType: 'application/json',
|
|
2914
3913
|
errors: {
|
|
2915
|
-
|
|
3914
|
+
404: 'Platform not found'
|
|
2916
3915
|
}
|
|
2917
3916
|
});
|
|
2918
3917
|
}
|
|
2919
3918
|
|
|
2920
3919
|
/**
|
|
2921
|
-
*
|
|
2922
|
-
* Get the current NLP dialogue session state. Useful for debugging and displaying session context in UI.
|
|
3920
|
+
* Delete a platform
|
|
2923
3921
|
* @param data The data for the request.
|
|
2924
|
-
* @param data.
|
|
2925
|
-
* @
|
|
2926
|
-
* @returns unknown Current session state (or null if no active session)
|
|
3922
|
+
* @param data.id Platform ID
|
|
3923
|
+
* @returns void Platform deleted successfully
|
|
2927
3924
|
* @throws ApiError
|
|
2928
3925
|
*/
|
|
2929
|
-
public static
|
|
2930
|
-
data:
|
|
2931
|
-
): CancelablePromise<
|
|
3926
|
+
public static platformControllerDelete(
|
|
3927
|
+
data: PlatformControllerDeleteData
|
|
3928
|
+
): CancelablePromise<PlatformControllerDeleteResponse> {
|
|
2932
3929
|
return __request(OpenAPI, {
|
|
2933
|
-
method: '
|
|
2934
|
-
url: '/api/v1/
|
|
3930
|
+
method: 'DELETE',
|
|
3931
|
+
url: '/api/v1/bean/platforms/{id}',
|
|
2935
3932
|
path: {
|
|
2936
|
-
|
|
2937
|
-
},
|
|
2938
|
-
query: {
|
|
2939
|
-
sessionId: data.sessionId
|
|
3933
|
+
id: data.id
|
|
2940
3934
|
},
|
|
2941
3935
|
errors: {
|
|
2942
|
-
|
|
3936
|
+
404: 'Platform not found'
|
|
2943
3937
|
}
|
|
2944
3938
|
});
|
|
2945
3939
|
}
|
|
@@ -2980,6 +3974,7 @@ export class DashboardService {
|
|
|
2980
3974
|
* @param data.region Region code for tenant context
|
|
2981
3975
|
* @param data.groupBy Grouping strategy
|
|
2982
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)
|
|
2983
3978
|
* @returns unknown Accounts retrieved successfully. Response type depends on groupBy parameter.
|
|
2984
3979
|
* @throws ApiError
|
|
2985
3980
|
*/
|
|
@@ -2994,7 +3989,8 @@ export class DashboardService {
|
|
|
2994
3989
|
},
|
|
2995
3990
|
query: {
|
|
2996
3991
|
groupBy: data.groupBy,
|
|
2997
|
-
date: data.date
|
|
3992
|
+
date: data.date,
|
|
3993
|
+
accountId: data.accountId
|
|
2998
3994
|
},
|
|
2999
3995
|
errors: {
|
|
3000
3996
|
401: 'User not authenticated'
|
|
@@ -3029,124 +4025,97 @@ export class DashboardService {
|
|
|
3029
4025
|
}
|
|
3030
4026
|
});
|
|
3031
4027
|
}
|
|
3032
|
-
}
|
|
3033
4028
|
|
|
3034
|
-
export class ReportingService {
|
|
3035
4029
|
/**
|
|
3036
|
-
* Get
|
|
3037
|
-
*
|
|
3038
|
-
* Returns time series data of portfolio net worth.
|
|
3039
|
-
*
|
|
3040
|
-
* **Multi-currency Support:**
|
|
3041
|
-
* - `series[].byCurrency` - Currency breakdown for each data point
|
|
3042
|
-
* - `byCurrency` - Separate time series grouped by currency
|
|
3043
|
-
* - `warnings` - Exchange rate warnings if conversion failed
|
|
3044
|
-
*
|
|
3045
|
-
* **Parameters:**
|
|
3046
|
-
* - `period`: Time period (1m, 3m, 6m, 1y)
|
|
3047
|
-
* - `granularity`: Data granularity (day, week, month)
|
|
3048
|
-
*
|
|
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)
|
|
3049
4032
|
* @param data The data for the request.
|
|
3050
4033
|
* @param data.region Region code for tenant context
|
|
3051
|
-
* @param data.
|
|
3052
|
-
* @param data.
|
|
3053
|
-
* @
|
|
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
|
|
3054
4038
|
* @throws ApiError
|
|
3055
4039
|
*/
|
|
3056
|
-
public static
|
|
3057
|
-
data:
|
|
3058
|
-
): CancelablePromise<
|
|
4040
|
+
public static dashboardControllerGetExpenses(
|
|
4041
|
+
data: DashboardControllerGetExpensesData
|
|
4042
|
+
): CancelablePromise<DashboardControllerGetExpensesResponse> {
|
|
3059
4043
|
return __request(OpenAPI, {
|
|
3060
4044
|
method: 'GET',
|
|
3061
|
-
url: '/api/v1/{region}/
|
|
4045
|
+
url: '/api/v1/{region}/dashboard/expenses',
|
|
3062
4046
|
path: {
|
|
3063
4047
|
region: data.region
|
|
3064
4048
|
},
|
|
3065
4049
|
query: {
|
|
4050
|
+
groupBy: data.groupBy,
|
|
3066
4051
|
period: data.period,
|
|
3067
|
-
|
|
4052
|
+
flow: data.flow
|
|
3068
4053
|
},
|
|
3069
4054
|
errors: {
|
|
4055
|
+
400: 'Invalid groupBy or period',
|
|
3070
4056
|
401: 'User not authenticated'
|
|
3071
4057
|
}
|
|
3072
4058
|
});
|
|
3073
4059
|
}
|
|
3074
4060
|
|
|
3075
4061
|
/**
|
|
3076
|
-
*
|
|
3077
|
-
*
|
|
3078
|
-
* Manually generate a portfolio snapshot for a specific date.
|
|
3079
|
-
*
|
|
3080
|
-
* **Multi-currency Support:**
|
|
3081
|
-
* - Fetches balances grouped by currency
|
|
3082
|
-
* - Uses user's baseCurrency setting for conversion
|
|
3083
|
-
* - Stores exchange rates and warnings
|
|
3084
|
-
*
|
|
3085
|
-
* **Use Cases:**
|
|
3086
|
-
* - Testing snapshot generation
|
|
3087
|
-
* - Force regeneration after data correction
|
|
3088
|
-
* - Initial setup for new users
|
|
3089
|
-
*
|
|
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
|
|
3090
4064
|
* @param data The data for the request.
|
|
3091
4065
|
* @param data.region Region code for tenant context
|
|
3092
|
-
* @param data.
|
|
3093
|
-
* @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
|
|
3094
4068
|
* @throws ApiError
|
|
3095
4069
|
*/
|
|
3096
|
-
public static
|
|
3097
|
-
data:
|
|
3098
|
-
): CancelablePromise<
|
|
4070
|
+
public static dashboardControllerGetAdvisorContext(
|
|
4071
|
+
data: DashboardControllerGetAdvisorContextData
|
|
4072
|
+
): CancelablePromise<DashboardControllerGetAdvisorContextResponse> {
|
|
3099
4073
|
return __request(OpenAPI, {
|
|
3100
|
-
method: '
|
|
3101
|
-
url: '/api/v1/{region}/
|
|
4074
|
+
method: 'GET',
|
|
4075
|
+
url: '/api/v1/{region}/dashboard/advisor-context',
|
|
3102
4076
|
path: {
|
|
3103
4077
|
region: data.region
|
|
3104
4078
|
},
|
|
3105
|
-
|
|
3106
|
-
|
|
4079
|
+
query: {
|
|
4080
|
+
date: data.date
|
|
4081
|
+
},
|
|
3107
4082
|
errors: {
|
|
3108
4083
|
400: 'Invalid date format',
|
|
3109
|
-
401: 'User not authenticated'
|
|
4084
|
+
401: 'User not authenticated, or the token is not advisor-scoped (exchange via POST /auth/sessions/advisor, #1512)'
|
|
3110
4085
|
}
|
|
3111
4086
|
});
|
|
3112
4087
|
}
|
|
4088
|
+
}
|
|
3113
4089
|
|
|
4090
|
+
export class InvestmentService {
|
|
3114
4091
|
/**
|
|
3115
|
-
*
|
|
3116
|
-
*
|
|
3117
|
-
* Generate snapshots for a date range (historical data backfill).
|
|
3118
|
-
*
|
|
3119
|
-
* **Multi-currency Support:**
|
|
3120
|
-
* - Each snapshot includes multi-currency data
|
|
3121
|
-
* - Uses exchange rates available at generation time
|
|
3122
|
-
* - Warnings stored for missing exchange rates
|
|
3123
|
-
*
|
|
3124
|
-
* **Best Practices:**
|
|
3125
|
-
* - Use for initial setup after account configuration
|
|
3126
|
-
* - Run during low-traffic periods for large date ranges
|
|
3127
|
-
* - Existing snapshots are skipped (not regenerated)
|
|
3128
|
-
*
|
|
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).
|
|
3129
4094
|
* @param data The data for the request.
|
|
3130
4095
|
* @param data.region Region code for tenant context
|
|
3131
|
-
* @param data.
|
|
3132
|
-
* @
|
|
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
|
|
3133
4100
|
* @throws ApiError
|
|
3134
4101
|
*/
|
|
3135
|
-
public static
|
|
3136
|
-
data:
|
|
3137
|
-
): CancelablePromise<
|
|
4102
|
+
public static holdingPnlControllerGetHoldingPnl(
|
|
4103
|
+
data: HoldingPnlControllerGetHoldingPnlData
|
|
4104
|
+
): CancelablePromise<HoldingPnlControllerGetHoldingPnlResponse> {
|
|
3138
4105
|
return __request(OpenAPI, {
|
|
3139
|
-
method: '
|
|
3140
|
-
url: '/api/v1/{region}/
|
|
4106
|
+
method: 'GET',
|
|
4107
|
+
url: '/api/v1/{region}/investment/holdings/pnl',
|
|
3141
4108
|
path: {
|
|
3142
4109
|
region: data.region
|
|
3143
4110
|
},
|
|
3144
|
-
|
|
3145
|
-
|
|
4111
|
+
query: {
|
|
4112
|
+
asOf: data.asOf,
|
|
4113
|
+
accountId: data.accountId,
|
|
4114
|
+
method: data.method
|
|
4115
|
+
},
|
|
3146
4116
|
errors: {
|
|
3147
|
-
400: 'Invalid date format or
|
|
3148
|
-
401: 'User not authenticated'
|
|
3149
|
-
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'
|
|
3150
4119
|
}
|
|
3151
4120
|
});
|
|
3152
4121
|
}
|
|
@@ -3175,7 +4144,7 @@ export class AuthService {
|
|
|
3175
4144
|
* Anonymous login with access token
|
|
3176
4145
|
* @param data The data for the request.
|
|
3177
4146
|
* @param data.requestBody
|
|
3178
|
-
* @returns
|
|
4147
|
+
* @returns AnonymousLoginResponseDto Login successful
|
|
3179
4148
|
* @throws ApiError
|
|
3180
4149
|
*/
|
|
3181
4150
|
public static authControllerAccessTokenLogin(
|
|
@@ -3191,17 +4160,75 @@ export class AuthService {
|
|
|
3191
4160
|
}
|
|
3192
4161
|
});
|
|
3193
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
|
+
}
|
|
3194
4216
|
}
|
|
3195
4217
|
|
|
3196
|
-
export class
|
|
4218
|
+
export class AdminCacheService {
|
|
3197
4219
|
/**
|
|
3198
|
-
*
|
|
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
|
|
3199
4223
|
* @throws ApiError
|
|
3200
4224
|
*/
|
|
3201
4225
|
public static cacheControllerFlushCache(): CancelablePromise<CacheControllerFlushCacheResponse> {
|
|
3202
4226
|
return __request(OpenAPI, {
|
|
3203
4227
|
method: 'POST',
|
|
3204
|
-
url: '/api/v1/cache/flush'
|
|
4228
|
+
url: '/api/v1/cache/flush',
|
|
4229
|
+
errors: {
|
|
4230
|
+
403: 'Admin access required'
|
|
4231
|
+
}
|
|
3205
4232
|
});
|
|
3206
4233
|
}
|
|
3207
4234
|
}
|
|
@@ -3362,3 +4389,53 @@ export class InfoService {
|
|
|
3362
4389
|
});
|
|
3363
4390
|
}
|
|
3364
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
|
+
}
|