@firela/api-types 0.0.0-canary.ba0a88d9 → 0.0.0-canary.ce345b8f
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 +4445 -2545
- package/dist/index.d.ts +4445 -2545
- package/dist/index.js +88 -4
- package/dist/index.mjs +88 -4
- package/package.json +2 -3
- package/src/generated/schemas.gen.ts +2348 -513
- package/src/generated/services.gen.ts +1273 -400
- package/src/generated/types.gen.ts +4955 -2850
|
@@ -17,6 +17,8 @@ import type {
|
|
|
17
17
|
AccountControllerCloseResponse,
|
|
18
18
|
AccountControllerReopenData,
|
|
19
19
|
AccountControllerReopenResponse,
|
|
20
|
+
AccountControllerAddOpeningBalanceData,
|
|
21
|
+
AccountControllerAddOpeningBalanceResponse,
|
|
20
22
|
AccountStandardsControllerGetTemplatesData,
|
|
21
23
|
AccountStandardsControllerGetTemplatesResponse,
|
|
22
24
|
AccountStandardsControllerGetTemplateMetadataData,
|
|
@@ -29,6 +31,10 @@ import type {
|
|
|
29
31
|
TransactionControllerListResponse,
|
|
30
32
|
TransactionControllerCreateBatchData,
|
|
31
33
|
TransactionControllerCreateBatchResponse,
|
|
34
|
+
TransactionControllerCorrectData,
|
|
35
|
+
TransactionControllerCorrectResponse,
|
|
36
|
+
TransactionControllerSuggestTagsData,
|
|
37
|
+
TransactionControllerSuggestTagsResponse,
|
|
32
38
|
TransactionControllerGetDetailData,
|
|
33
39
|
TransactionControllerGetDetailResponse,
|
|
34
40
|
TransactionControllerUpdateData,
|
|
@@ -93,6 +99,18 @@ import type {
|
|
|
93
99
|
CommodityControllerGetOrCreateResponse,
|
|
94
100
|
CommodityControllerBulkCreateData,
|
|
95
101
|
CommodityControllerBulkCreateResponse,
|
|
102
|
+
PriceControllerCreateData,
|
|
103
|
+
PriceControllerCreateResponse,
|
|
104
|
+
PriceControllerFindAllData,
|
|
105
|
+
PriceControllerFindAllResponse,
|
|
106
|
+
PriceControllerFindOneData,
|
|
107
|
+
PriceControllerFindOneResponse,
|
|
108
|
+
PriceControllerUpdateData,
|
|
109
|
+
PriceControllerUpdateResponse,
|
|
110
|
+
PriceControllerDeleteData,
|
|
111
|
+
PriceControllerDeleteResponse,
|
|
112
|
+
PriceControllerBulkCreateData,
|
|
113
|
+
PriceControllerBulkCreateResponse,
|
|
96
114
|
RecurringRuleControllerCreateData,
|
|
97
115
|
RecurringRuleControllerCreateResponse,
|
|
98
116
|
RecurringRuleControllerFindAllData,
|
|
@@ -125,26 +143,14 @@ import type {
|
|
|
125
143
|
ExpectedTransactionControllerEnterNowResponse,
|
|
126
144
|
ForecastControllerGetForecastData,
|
|
127
145
|
ForecastControllerGetForecastResponse,
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
TransactionRuleControllerExportData,
|
|
137
|
-
TransactionRuleControllerExportResponse,
|
|
138
|
-
TransactionRuleControllerGetStatisticsData,
|
|
139
|
-
TransactionRuleControllerGetStatisticsResponse,
|
|
140
|
-
TransactionRuleControllerGetDetailData,
|
|
141
|
-
TransactionRuleControllerGetDetailResponse,
|
|
142
|
-
TransactionRuleControllerUpdateData,
|
|
143
|
-
TransactionRuleControllerUpdateResponse,
|
|
144
|
-
TransactionRuleControllerDeleteData,
|
|
145
|
-
TransactionRuleControllerDeleteResponse,
|
|
146
|
-
TransactionRuleControllerTestData,
|
|
147
|
-
TransactionRuleControllerTestResponse,
|
|
146
|
+
ReportingControllerGetPortfolioTrendsData,
|
|
147
|
+
ReportingControllerGetPortfolioTrendsResponse,
|
|
148
|
+
ReportingControllerGetCashFlowTrendsData,
|
|
149
|
+
ReportingControllerGetCashFlowTrendsResponse,
|
|
150
|
+
ReportingControllerGenerateSnapshotData,
|
|
151
|
+
ReportingControllerGenerateSnapshotResponse,
|
|
152
|
+
ReportingControllerBackfillSnapshotsData,
|
|
153
|
+
ReportingControllerBackfillSnapshotsResponse,
|
|
148
154
|
UserControllerDeleteOwnUserData,
|
|
149
155
|
UserControllerDeleteOwnUserResponse,
|
|
150
156
|
UserControllerGetUserData,
|
|
@@ -167,6 +173,48 @@ import type {
|
|
|
167
173
|
PropertyControllerUpdateResponse,
|
|
168
174
|
PropertyControllerDeleteData,
|
|
169
175
|
PropertyControllerDeleteResponse,
|
|
176
|
+
TransactionRuleControllerCreateData,
|
|
177
|
+
TransactionRuleControllerCreateResponse,
|
|
178
|
+
TransactionRuleControllerListData,
|
|
179
|
+
TransactionRuleControllerListResponse,
|
|
180
|
+
TransactionRuleControllerValidateData,
|
|
181
|
+
TransactionRuleControllerValidateResponse,
|
|
182
|
+
TransactionRuleControllerBulkCreateData,
|
|
183
|
+
TransactionRuleControllerBulkCreateResponse,
|
|
184
|
+
TransactionRuleControllerExportData,
|
|
185
|
+
TransactionRuleControllerExportResponse,
|
|
186
|
+
TransactionRuleControllerGetStatisticsData,
|
|
187
|
+
TransactionRuleControllerGetStatisticsResponse,
|
|
188
|
+
TransactionRuleControllerGetDetailData,
|
|
189
|
+
TransactionRuleControllerGetDetailResponse,
|
|
190
|
+
TransactionRuleControllerUpdateData,
|
|
191
|
+
TransactionRuleControllerUpdateResponse,
|
|
192
|
+
TransactionRuleControllerDeleteData,
|
|
193
|
+
TransactionRuleControllerDeleteResponse,
|
|
194
|
+
TransactionRuleControllerTestData,
|
|
195
|
+
TransactionRuleControllerTestResponse,
|
|
196
|
+
EventControllerCreateData,
|
|
197
|
+
EventControllerCreateResponse,
|
|
198
|
+
EventControllerFindAllData,
|
|
199
|
+
EventControllerFindAllResponse,
|
|
200
|
+
EventControllerFindOneData,
|
|
201
|
+
EventControllerFindOneResponse,
|
|
202
|
+
EventControllerUpdateData,
|
|
203
|
+
EventControllerUpdateResponse,
|
|
204
|
+
EventControllerDeleteData,
|
|
205
|
+
EventControllerDeleteResponse,
|
|
206
|
+
EventControllerGetSliceData,
|
|
207
|
+
EventControllerGetSliceResponse,
|
|
208
|
+
OnboardingControllerBootstrapData,
|
|
209
|
+
OnboardingControllerBootstrapResponse,
|
|
210
|
+
ReconciliationControllerComputeData,
|
|
211
|
+
ReconciliationControllerComputeResponse,
|
|
212
|
+
ReconciliationControllerAssertData,
|
|
213
|
+
ReconciliationControllerAssertResponse,
|
|
214
|
+
ReconciliationControllerPadData,
|
|
215
|
+
ReconciliationControllerPadResponse,
|
|
216
|
+
ReconciliationControllerHistoryData,
|
|
217
|
+
ReconciliationControllerHistoryResponse,
|
|
170
218
|
ExportControllerExportBeancountResponse,
|
|
171
219
|
FileImportControllerImportFileData,
|
|
172
220
|
FileImportControllerImportFileResponse,
|
|
@@ -180,42 +228,52 @@ import type {
|
|
|
180
228
|
ImporterConfigControllerUpdateConfigResponse,
|
|
181
229
|
ImporterConfigControllerResetConfigData,
|
|
182
230
|
ImporterConfigControllerResetConfigResponse,
|
|
183
|
-
PlatformControllerFindAllResponse,
|
|
184
|
-
PlatformControllerCreateData,
|
|
185
|
-
PlatformControllerCreateResponse,
|
|
186
|
-
PlatformControllerGetPlatformListResponse,
|
|
187
|
-
PlatformControllerMatchPlatformsData,
|
|
188
|
-
PlatformControllerMatchPlatformsResponse,
|
|
189
|
-
PlatformControllerUpdateData,
|
|
190
|
-
PlatformControllerUpdateResponse,
|
|
191
|
-
PlatformControllerDeleteData,
|
|
192
|
-
PlatformControllerDeleteResponse,
|
|
193
231
|
ProviderSyncControllerSyncData,
|
|
194
232
|
ProviderSyncControllerSyncResponse,
|
|
195
233
|
ProviderSyncControllerGetSupportedProvidersData,
|
|
196
234
|
ProviderSyncControllerGetSupportedProvidersResponse,
|
|
197
235
|
ProviderSyncControllerIsProviderSupportedData,
|
|
198
236
|
ProviderSyncControllerIsProviderSupportedResponse,
|
|
237
|
+
ExternalAccountLinkControllerCreateData,
|
|
238
|
+
ExternalAccountLinkControllerCreateResponse,
|
|
239
|
+
ExternalAccountLinkControllerFindAllData,
|
|
240
|
+
ExternalAccountLinkControllerFindAllResponse,
|
|
241
|
+
ExternalAccountLinkControllerFindOneData,
|
|
242
|
+
ExternalAccountLinkControllerFindOneResponse,
|
|
243
|
+
ExternalAccountLinkControllerRemoveData,
|
|
244
|
+
ExternalAccountLinkControllerRemoveResponse,
|
|
199
245
|
TelemetryControllerReportTelemetryData,
|
|
200
246
|
TelemetryControllerReportTelemetryResponse,
|
|
247
|
+
TelemetryControllerReportCoverageMissData,
|
|
248
|
+
TelemetryControllerReportCoverageMissResponse,
|
|
249
|
+
TelemetryControllerGetCoverageMetricsData,
|
|
250
|
+
TelemetryControllerGetCoverageMetricsResponse,
|
|
201
251
|
NlpControllerProcessNaturalLanguageData,
|
|
202
252
|
NlpControllerProcessNaturalLanguageResponse,
|
|
203
253
|
NlpControllerClearSessionData,
|
|
204
254
|
NlpControllerClearSessionResponse,
|
|
205
255
|
NlpControllerGetSessionData,
|
|
206
256
|
NlpControllerGetSessionResponse,
|
|
257
|
+
PlatformControllerFindAllResponse,
|
|
258
|
+
PlatformControllerCreateData,
|
|
259
|
+
PlatformControllerCreateResponse,
|
|
260
|
+
PlatformControllerGetPlatformListResponse,
|
|
261
|
+
PlatformControllerMatchPlatformsData,
|
|
262
|
+
PlatformControllerMatchPlatformsResponse,
|
|
263
|
+
PlatformControllerUpdateData,
|
|
264
|
+
PlatformControllerUpdateResponse,
|
|
265
|
+
PlatformControllerDeleteData,
|
|
266
|
+
PlatformControllerDeleteResponse,
|
|
207
267
|
DashboardControllerGetNetWorthData,
|
|
208
268
|
DashboardControllerGetNetWorthResponse,
|
|
209
269
|
DashboardControllerGetAccountsData,
|
|
210
270
|
DashboardControllerGetAccountsResponse,
|
|
211
271
|
DashboardControllerGetCashFlowData,
|
|
212
272
|
DashboardControllerGetCashFlowResponse,
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
ReportingControllerBackfillSnapshotsData,
|
|
218
|
-
ReportingControllerBackfillSnapshotsResponse,
|
|
273
|
+
DashboardControllerGetExpensesData,
|
|
274
|
+
DashboardControllerGetExpensesResponse,
|
|
275
|
+
HoldingPnlControllerGetHoldingPnlData,
|
|
276
|
+
HoldingPnlControllerGetHoldingPnlResponse,
|
|
219
277
|
ApiKeysControllerCreateApiKeyResponse,
|
|
220
278
|
AuthControllerAccessTokenLoginData,
|
|
221
279
|
AuthControllerAccessTokenLoginResponse,
|
|
@@ -268,7 +326,7 @@ export class BeanAccountsService {
|
|
|
268
326
|
* @param data.type Filter by account type
|
|
269
327
|
* @param data.status Filter by status
|
|
270
328
|
* @param data.isCustom Filter by custom (user-created) accounts only
|
|
271
|
-
* @param data.search Search term for path
|
|
329
|
+
* @param data.search Search term for account path
|
|
272
330
|
* @param data.limit Maximum number of results
|
|
273
331
|
* @param data.offset Number of results to skip
|
|
274
332
|
* @returns AccountListResponseDto Accounts retrieved successfully
|
|
@@ -430,6 +488,35 @@ export class BeanAccountsService {
|
|
|
430
488
|
}
|
|
431
489
|
});
|
|
432
490
|
}
|
|
491
|
+
|
|
492
|
+
/**
|
|
493
|
+
* Post an opening-balance transaction
|
|
494
|
+
* 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.
|
|
495
|
+
* @param data The data for the request.
|
|
496
|
+
* @param data.id Account UUID
|
|
497
|
+
* @param data.region Region code for tenant context
|
|
498
|
+
* @param data.requestBody
|
|
499
|
+
* @returns OpeningBalanceResultDto Opening-balance transaction created
|
|
500
|
+
* @throws ApiError
|
|
501
|
+
*/
|
|
502
|
+
public static accountControllerAddOpeningBalance(
|
|
503
|
+
data: AccountControllerAddOpeningBalanceData
|
|
504
|
+
): CancelablePromise<AccountControllerAddOpeningBalanceResponse> {
|
|
505
|
+
return __request(OpenAPI, {
|
|
506
|
+
method: 'POST',
|
|
507
|
+
url: '/api/v1/{region}/bean/accounts/{id}/opening-balance',
|
|
508
|
+
path: {
|
|
509
|
+
id: data.id,
|
|
510
|
+
region: data.region
|
|
511
|
+
},
|
|
512
|
+
body: data.requestBody,
|
|
513
|
+
mediaType: 'application/json',
|
|
514
|
+
errors: {
|
|
515
|
+
404: 'Account not found',
|
|
516
|
+
409: 'An opening balance already exists for this account'
|
|
517
|
+
}
|
|
518
|
+
});
|
|
519
|
+
}
|
|
433
520
|
}
|
|
434
521
|
|
|
435
522
|
export class BeanAccountStandardsService {
|
|
@@ -461,7 +548,7 @@ export class BeanAccountStandardsService {
|
|
|
461
548
|
|
|
462
549
|
/**
|
|
463
550
|
* Get template metadata for an account path
|
|
464
|
-
* Returns
|
|
551
|
+
* Returns root type for a template path.
|
|
465
552
|
* @param data The data for the request.
|
|
466
553
|
* @param data.region Region code for tenant context
|
|
467
554
|
* @param data.path Account path to check
|
|
@@ -547,6 +634,7 @@ export class BeanTransactionsService {
|
|
|
547
634
|
* @param data.status Filter by transaction status
|
|
548
635
|
* @param data.search Search in narration and payee fields (max 200 chars)
|
|
549
636
|
* @param data.accountId Filter by account ID (transactions with postings to this account)
|
|
637
|
+
* @param data.category Filter by ADR-0075 functional category (Group segment); matches any posting to an Expenses/Income account whose derived Group segment equals this value
|
|
550
638
|
* @returns TransactionListResponseDto Transaction list
|
|
551
639
|
* @throws ApiError
|
|
552
640
|
*/
|
|
@@ -566,7 +654,8 @@ export class BeanTransactionsService {
|
|
|
566
654
|
dateTo: data.dateTo,
|
|
567
655
|
status: data.status,
|
|
568
656
|
search: data.search,
|
|
569
|
-
accountId: data.accountId
|
|
657
|
+
accountId: data.accountId,
|
|
658
|
+
category: data.category
|
|
570
659
|
},
|
|
571
660
|
errors: {
|
|
572
661
|
400: 'Validation failed',
|
|
@@ -603,6 +692,68 @@ export class BeanTransactionsService {
|
|
|
603
692
|
});
|
|
604
693
|
}
|
|
605
694
|
|
|
695
|
+
/**
|
|
696
|
+
* Correct (supersede) a transaction
|
|
697
|
+
* Atomically voids the original (SUPERSEDED) and creates a replacement through the full validation pipeline.
|
|
698
|
+
* @param data The data for the request.
|
|
699
|
+
* @param data.id Original transaction ID to correct
|
|
700
|
+
* @param data.region Region code for tenant context
|
|
701
|
+
* @param data.requestBody
|
|
702
|
+
* @returns TransactionDetailDto Corrected transaction created
|
|
703
|
+
* @throws ApiError
|
|
704
|
+
*/
|
|
705
|
+
public static transactionControllerCorrect(
|
|
706
|
+
data: TransactionControllerCorrectData
|
|
707
|
+
): CancelablePromise<TransactionControllerCorrectResponse> {
|
|
708
|
+
return __request(OpenAPI, {
|
|
709
|
+
method: 'POST',
|
|
710
|
+
url: '/api/v1/{region}/bean/transactions/{id}/correct',
|
|
711
|
+
path: {
|
|
712
|
+
id: data.id,
|
|
713
|
+
region: data.region
|
|
714
|
+
},
|
|
715
|
+
body: data.requestBody,
|
|
716
|
+
mediaType: 'application/json',
|
|
717
|
+
errors: {
|
|
718
|
+
404: 'Original transaction not found',
|
|
719
|
+
409: 'Original no longer ACTIVE (concurrent modification)',
|
|
720
|
+
422: 'Pipeline validation failed (does not balance, invalid accounts)'
|
|
721
|
+
}
|
|
722
|
+
});
|
|
723
|
+
}
|
|
724
|
+
|
|
725
|
+
/**
|
|
726
|
+
* Suggest transaction tags
|
|
727
|
+
* Returns distinct tags from the user ACTIVE transactions, sorted by usage, for autocomplete. Optional q performs a case-insensitive prefix match.
|
|
728
|
+
* @param data The data for the request.
|
|
729
|
+
* @param data.region Region code for tenant context
|
|
730
|
+
* @param data.q Prefix match, case-insensitive (max 50 chars)
|
|
731
|
+
* @param data.sort usage (default) or name
|
|
732
|
+
* @param data.limit Max suggestions (1-100, default 10)
|
|
733
|
+
* @returns TagSuggestionsResponseDto Tag suggestions
|
|
734
|
+
* @throws ApiError
|
|
735
|
+
*/
|
|
736
|
+
public static transactionControllerSuggestTags(
|
|
737
|
+
data: TransactionControllerSuggestTagsData
|
|
738
|
+
): CancelablePromise<TransactionControllerSuggestTagsResponse> {
|
|
739
|
+
return __request(OpenAPI, {
|
|
740
|
+
method: 'GET',
|
|
741
|
+
url: '/api/v1/{region}/bean/transactions/tags',
|
|
742
|
+
path: {
|
|
743
|
+
region: data.region
|
|
744
|
+
},
|
|
745
|
+
query: {
|
|
746
|
+
q: data.q,
|
|
747
|
+
sort: data.sort,
|
|
748
|
+
limit: data.limit
|
|
749
|
+
},
|
|
750
|
+
errors: {
|
|
751
|
+
400: 'Validation failed',
|
|
752
|
+
401: 'Authentication required'
|
|
753
|
+
}
|
|
754
|
+
});
|
|
755
|
+
}
|
|
756
|
+
|
|
606
757
|
/**
|
|
607
758
|
* Get transaction detail
|
|
608
759
|
* Returns transaction details including all postings
|
|
@@ -692,7 +843,7 @@ export class BeanBalancesService {
|
|
|
692
843
|
* Query account balance
|
|
693
844
|
* Calculate account balance at a specific date for a single currency
|
|
694
845
|
* @param data The data for the request.
|
|
695
|
-
* @param data.account Account name (e.g., "Assets:
|
|
846
|
+
* @param data.account Account name (e.g., "Assets:Checking")
|
|
696
847
|
* @param data.region Region code for tenant context
|
|
697
848
|
* @param data.date Date to calculate balance at (ISO 8601 format)
|
|
698
849
|
* @param data.currency Currency to query (e.g., "USD", "CNY")
|
|
@@ -1413,6 +1564,173 @@ export class BeanCommoditiesService {
|
|
|
1413
1564
|
}
|
|
1414
1565
|
}
|
|
1415
1566
|
|
|
1567
|
+
export class BeanPricesService {
|
|
1568
|
+
/**
|
|
1569
|
+
* Create a new price
|
|
1570
|
+
* Creates a new price entry for the authenticated user
|
|
1571
|
+
* @param data The data for the request.
|
|
1572
|
+
* @param data.region Region code for tenant context
|
|
1573
|
+
* @param data.requestBody
|
|
1574
|
+
* @returns PriceResponseDto Price created successfully
|
|
1575
|
+
* @throws ApiError
|
|
1576
|
+
*/
|
|
1577
|
+
public static priceControllerCreate(
|
|
1578
|
+
data: PriceControllerCreateData
|
|
1579
|
+
): CancelablePromise<PriceControllerCreateResponse> {
|
|
1580
|
+
return __request(OpenAPI, {
|
|
1581
|
+
method: 'POST',
|
|
1582
|
+
url: '/api/v1/{region}/bean/prices',
|
|
1583
|
+
path: {
|
|
1584
|
+
region: data.region
|
|
1585
|
+
},
|
|
1586
|
+
body: data.requestBody,
|
|
1587
|
+
mediaType: 'application/json',
|
|
1588
|
+
errors: {
|
|
1589
|
+
404: 'Currency or quoteCurrency commodity not found',
|
|
1590
|
+
409: 'Price already exists for this currency pair and date'
|
|
1591
|
+
}
|
|
1592
|
+
});
|
|
1593
|
+
}
|
|
1594
|
+
|
|
1595
|
+
/**
|
|
1596
|
+
* List user prices
|
|
1597
|
+
* Returns all price entries for the authenticated user with optional filtering
|
|
1598
|
+
* @param data The data for the request.
|
|
1599
|
+
* @param data.region Region code for tenant context
|
|
1600
|
+
* @param data.currency Filter by currency (e.g., BTC, AAPL, USD)
|
|
1601
|
+
* @param data.quoteCurrency Filter by quote currency (pricing currency, e.g., USD, CNY)
|
|
1602
|
+
* @param data.dateFrom Filter prices from this date (ISO 8601 format)
|
|
1603
|
+
* @param data.dateTo Filter prices to this date (ISO 8601 format)
|
|
1604
|
+
* @param data.search Search term for currency or quoteCurrency (case-insensitive partial match)
|
|
1605
|
+
* @param data.page Page number for pagination (default: 1)
|
|
1606
|
+
* @param data.limit Number of items per page (default: 20, max: 100)
|
|
1607
|
+
* @returns PriceListResponseDto Prices retrieved successfully
|
|
1608
|
+
* @throws ApiError
|
|
1609
|
+
*/
|
|
1610
|
+
public static priceControllerFindAll(
|
|
1611
|
+
data: PriceControllerFindAllData
|
|
1612
|
+
): CancelablePromise<PriceControllerFindAllResponse> {
|
|
1613
|
+
return __request(OpenAPI, {
|
|
1614
|
+
method: 'GET',
|
|
1615
|
+
url: '/api/v1/{region}/bean/prices',
|
|
1616
|
+
path: {
|
|
1617
|
+
region: data.region
|
|
1618
|
+
},
|
|
1619
|
+
query: {
|
|
1620
|
+
currency: data.currency,
|
|
1621
|
+
quoteCurrency: data.quoteCurrency,
|
|
1622
|
+
dateFrom: data.dateFrom,
|
|
1623
|
+
dateTo: data.dateTo,
|
|
1624
|
+
search: data.search,
|
|
1625
|
+
page: data.page,
|
|
1626
|
+
limit: data.limit
|
|
1627
|
+
}
|
|
1628
|
+
});
|
|
1629
|
+
}
|
|
1630
|
+
|
|
1631
|
+
/**
|
|
1632
|
+
* Get price by ID
|
|
1633
|
+
* Returns a single price entry by its ID
|
|
1634
|
+
* @param data The data for the request.
|
|
1635
|
+
* @param data.id Price ID
|
|
1636
|
+
* @param data.region Region code for tenant context
|
|
1637
|
+
* @returns PriceResponseDto Price retrieved successfully
|
|
1638
|
+
* @throws ApiError
|
|
1639
|
+
*/
|
|
1640
|
+
public static priceControllerFindOne(
|
|
1641
|
+
data: PriceControllerFindOneData
|
|
1642
|
+
): CancelablePromise<PriceControllerFindOneResponse> {
|
|
1643
|
+
return __request(OpenAPI, {
|
|
1644
|
+
method: 'GET',
|
|
1645
|
+
url: '/api/v1/{region}/bean/prices/{id}',
|
|
1646
|
+
path: {
|
|
1647
|
+
id: data.id,
|
|
1648
|
+
region: data.region
|
|
1649
|
+
},
|
|
1650
|
+
errors: {
|
|
1651
|
+
404: 'Price not found'
|
|
1652
|
+
}
|
|
1653
|
+
});
|
|
1654
|
+
}
|
|
1655
|
+
|
|
1656
|
+
/**
|
|
1657
|
+
* Update a price
|
|
1658
|
+
* Updates an existing price entry
|
|
1659
|
+
* @param data The data for the request.
|
|
1660
|
+
* @param data.id Price ID
|
|
1661
|
+
* @param data.region Region code for tenant context
|
|
1662
|
+
* @param data.requestBody
|
|
1663
|
+
* @returns PriceResponseDto Price updated successfully
|
|
1664
|
+
* @throws ApiError
|
|
1665
|
+
*/
|
|
1666
|
+
public static priceControllerUpdate(
|
|
1667
|
+
data: PriceControllerUpdateData
|
|
1668
|
+
): CancelablePromise<PriceControllerUpdateResponse> {
|
|
1669
|
+
return __request(OpenAPI, {
|
|
1670
|
+
method: 'PUT',
|
|
1671
|
+
url: '/api/v1/{region}/bean/prices/{id}',
|
|
1672
|
+
path: {
|
|
1673
|
+
id: data.id,
|
|
1674
|
+
region: data.region
|
|
1675
|
+
},
|
|
1676
|
+
body: data.requestBody,
|
|
1677
|
+
mediaType: 'application/json',
|
|
1678
|
+
errors: {
|
|
1679
|
+
404: 'Price not found',
|
|
1680
|
+
409: 'Updated price conflicts with existing price'
|
|
1681
|
+
}
|
|
1682
|
+
});
|
|
1683
|
+
}
|
|
1684
|
+
|
|
1685
|
+
/**
|
|
1686
|
+
* Delete a price
|
|
1687
|
+
* Deletes a price entry (hard delete)
|
|
1688
|
+
* @param data The data for the request.
|
|
1689
|
+
* @param data.id Price ID
|
|
1690
|
+
* @param data.region Region code for tenant context
|
|
1691
|
+
* @returns void Price deleted successfully
|
|
1692
|
+
* @throws ApiError
|
|
1693
|
+
*/
|
|
1694
|
+
public static priceControllerDelete(
|
|
1695
|
+
data: PriceControllerDeleteData
|
|
1696
|
+
): CancelablePromise<PriceControllerDeleteResponse> {
|
|
1697
|
+
return __request(OpenAPI, {
|
|
1698
|
+
method: 'DELETE',
|
|
1699
|
+
url: '/api/v1/{region}/bean/prices/{id}',
|
|
1700
|
+
path: {
|
|
1701
|
+
id: data.id,
|
|
1702
|
+
region: data.region
|
|
1703
|
+
},
|
|
1704
|
+
errors: {
|
|
1705
|
+
404: 'Price not found'
|
|
1706
|
+
}
|
|
1707
|
+
});
|
|
1708
|
+
}
|
|
1709
|
+
|
|
1710
|
+
/**
|
|
1711
|
+
* Bulk create prices
|
|
1712
|
+
* Creates multiple price entries at once (skips duplicates)
|
|
1713
|
+
* @param data The data for the request.
|
|
1714
|
+
* @param data.region Region code for tenant context
|
|
1715
|
+
* @param data.requestBody
|
|
1716
|
+
* @returns PriceResponseDto Prices created successfully
|
|
1717
|
+
* @throws ApiError
|
|
1718
|
+
*/
|
|
1719
|
+
public static priceControllerBulkCreate(
|
|
1720
|
+
data: PriceControllerBulkCreateData
|
|
1721
|
+
): CancelablePromise<PriceControllerBulkCreateResponse> {
|
|
1722
|
+
return __request(OpenAPI, {
|
|
1723
|
+
method: 'POST',
|
|
1724
|
+
url: '/api/v1/{region}/bean/prices/bulk',
|
|
1725
|
+
path: {
|
|
1726
|
+
region: data.region
|
|
1727
|
+
},
|
|
1728
|
+
body: data.requestBody,
|
|
1729
|
+
mediaType: 'application/json'
|
|
1730
|
+
});
|
|
1731
|
+
}
|
|
1732
|
+
}
|
|
1733
|
+
|
|
1416
1734
|
export class RecurringRulesService {
|
|
1417
1735
|
/**
|
|
1418
1736
|
* Create a new recurring rule
|
|
@@ -1843,22 +2161,434 @@ export class RecurringForecastService {
|
|
|
1843
2161
|
}
|
|
1844
2162
|
}
|
|
1845
2163
|
|
|
1846
|
-
export class
|
|
2164
|
+
export class ReportingService {
|
|
1847
2165
|
/**
|
|
1848
|
-
*
|
|
1849
|
-
*
|
|
1850
|
-
*
|
|
1851
|
-
*
|
|
1852
|
-
*
|
|
1853
|
-
*
|
|
1854
|
-
*
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
2166
|
+
* Get portfolio value trends
|
|
2167
|
+
*
|
|
2168
|
+
* Returns time series data of portfolio net worth.
|
|
2169
|
+
*
|
|
2170
|
+
* **Multi-currency Support:**
|
|
2171
|
+
* - `series[].byCurrency` - Currency breakdown for each data point
|
|
2172
|
+
* - `byCurrency` - Separate time series grouped by currency
|
|
2173
|
+
* - `warnings` - Exchange rate warnings if conversion failed
|
|
2174
|
+
*
|
|
2175
|
+
* **Parameters:**
|
|
2176
|
+
* - `period`: Time period (1m, 3m, 6m, 1y)
|
|
2177
|
+
* - `granularity`: Data granularity (day, week, month)
|
|
2178
|
+
*
|
|
2179
|
+
* @param data The data for the request.
|
|
2180
|
+
* @param data.region Region code for tenant context
|
|
2181
|
+
* @param data.period Time period
|
|
2182
|
+
* @param data.granularity Data granularity
|
|
2183
|
+
* @returns PortfolioTrendsResponseDto Trends retrieved successfully
|
|
2184
|
+
* @throws ApiError
|
|
2185
|
+
*/
|
|
2186
|
+
public static reportingControllerGetPortfolioTrends(
|
|
2187
|
+
data: ReportingControllerGetPortfolioTrendsData
|
|
2188
|
+
): CancelablePromise<ReportingControllerGetPortfolioTrendsResponse> {
|
|
2189
|
+
return __request(OpenAPI, {
|
|
2190
|
+
method: 'GET',
|
|
2191
|
+
url: '/api/v1/{region}/reporting/portfolio/trends',
|
|
2192
|
+
path: {
|
|
2193
|
+
region: data.region
|
|
2194
|
+
},
|
|
2195
|
+
query: {
|
|
2196
|
+
period: data.period,
|
|
2197
|
+
granularity: data.granularity
|
|
2198
|
+
},
|
|
2199
|
+
errors: {
|
|
2200
|
+
401: 'User not authenticated'
|
|
2201
|
+
}
|
|
2202
|
+
});
|
|
2203
|
+
}
|
|
2204
|
+
|
|
2205
|
+
/**
|
|
2206
|
+
* Get cash-flow trends
|
|
2207
|
+
*
|
|
2208
|
+
* Monthly income / expense / netSavings over a fixed N-month window
|
|
2209
|
+
* (current month + N−1 prior). Missing months are zero-filled (flow metric).
|
|
2210
|
+
*
|
|
2211
|
+
* **Parameters:**
|
|
2212
|
+
* - `period`: 1m | 3m | 6m | 1y (default 6m)
|
|
2213
|
+
* - `granularity`: accepted for API symmetry; v1 returns month buckets
|
|
2214
|
+
*
|
|
2215
|
+
* @param data The data for the request.
|
|
2216
|
+
* @param data.region Region code for tenant context
|
|
2217
|
+
* @param data.period Time period
|
|
2218
|
+
* @param data.granularity Data granularity (accepted for API symmetry; v1 returns month buckets)
|
|
2219
|
+
* @returns CashFlowTrendsResponseDto Cash-flow trends retrieved successfully
|
|
2220
|
+
* @throws ApiError
|
|
2221
|
+
*/
|
|
2222
|
+
public static reportingControllerGetCashFlowTrends(
|
|
2223
|
+
data: ReportingControllerGetCashFlowTrendsData
|
|
2224
|
+
): CancelablePromise<ReportingControllerGetCashFlowTrendsResponse> {
|
|
2225
|
+
return __request(OpenAPI, {
|
|
2226
|
+
method: 'GET',
|
|
2227
|
+
url: '/api/v1/{region}/reporting/cash-flow/trends',
|
|
2228
|
+
path: {
|
|
2229
|
+
region: data.region
|
|
2230
|
+
},
|
|
2231
|
+
query: {
|
|
2232
|
+
period: data.period,
|
|
2233
|
+
granularity: data.granularity
|
|
2234
|
+
},
|
|
2235
|
+
errors: {
|
|
2236
|
+
401: 'User not authenticated'
|
|
2237
|
+
}
|
|
2238
|
+
});
|
|
2239
|
+
}
|
|
2240
|
+
|
|
2241
|
+
/**
|
|
2242
|
+
* Generate portfolio snapshot
|
|
2243
|
+
*
|
|
2244
|
+
* Manually generate a portfolio snapshot for a specific date.
|
|
2245
|
+
*
|
|
2246
|
+
* **Multi-currency Support:**
|
|
2247
|
+
* - Fetches balances grouped by currency
|
|
2248
|
+
* - Uses user's baseCurrency setting for conversion
|
|
2249
|
+
* - Stores exchange rates and warnings
|
|
2250
|
+
*
|
|
2251
|
+
* **Use Cases:**
|
|
2252
|
+
* - Testing snapshot generation
|
|
2253
|
+
* - Force regeneration after data correction
|
|
2254
|
+
* - Initial setup for new users
|
|
2255
|
+
*
|
|
2256
|
+
* @param data The data for the request.
|
|
2257
|
+
* @param data.region Region code for tenant context
|
|
2258
|
+
* @param data.requestBody Optional date (defaults to today)
|
|
2259
|
+
* @returns GenerateSnapshotResponse Snapshot generated successfully
|
|
2260
|
+
* @throws ApiError
|
|
2261
|
+
*/
|
|
2262
|
+
public static reportingControllerGenerateSnapshot(
|
|
2263
|
+
data: ReportingControllerGenerateSnapshotData
|
|
2264
|
+
): CancelablePromise<ReportingControllerGenerateSnapshotResponse> {
|
|
2265
|
+
return __request(OpenAPI, {
|
|
2266
|
+
method: 'POST',
|
|
2267
|
+
url: '/api/v1/{region}/reporting/snapshots/generate',
|
|
2268
|
+
path: {
|
|
2269
|
+
region: data.region
|
|
2270
|
+
},
|
|
2271
|
+
body: data.requestBody,
|
|
2272
|
+
mediaType: 'application/json',
|
|
2273
|
+
errors: {
|
|
2274
|
+
400: 'Invalid date format',
|
|
2275
|
+
401: 'User not authenticated'
|
|
2276
|
+
}
|
|
2277
|
+
});
|
|
2278
|
+
}
|
|
2279
|
+
|
|
2280
|
+
/**
|
|
2281
|
+
* Backfill portfolio snapshots
|
|
2282
|
+
*
|
|
2283
|
+
* Generate snapshots for a date range (historical data backfill).
|
|
2284
|
+
*
|
|
2285
|
+
* **Multi-currency Support:**
|
|
2286
|
+
* - Each snapshot includes multi-currency data
|
|
2287
|
+
* - Uses exchange rates available at generation time
|
|
2288
|
+
* - Warnings stored for missing exchange rates
|
|
2289
|
+
*
|
|
2290
|
+
* **Best Practices:**
|
|
2291
|
+
* - Use for initial setup after account configuration
|
|
2292
|
+
* - Run during low-traffic periods for large date ranges
|
|
2293
|
+
* - Existing snapshots are skipped (not regenerated)
|
|
2294
|
+
*
|
|
2295
|
+
* @param data The data for the request.
|
|
2296
|
+
* @param data.region Region code for tenant context
|
|
2297
|
+
* @param data.requestBody
|
|
2298
|
+
* @returns BackfillSnapshotsResponse Backfill completed successfully
|
|
2299
|
+
* @throws ApiError
|
|
2300
|
+
*/
|
|
2301
|
+
public static reportingControllerBackfillSnapshots(
|
|
2302
|
+
data: ReportingControllerBackfillSnapshotsData
|
|
2303
|
+
): CancelablePromise<ReportingControllerBackfillSnapshotsResponse> {
|
|
2304
|
+
return __request(OpenAPI, {
|
|
2305
|
+
method: 'POST',
|
|
2306
|
+
url: '/api/v1/{region}/reporting/snapshots/backfill',
|
|
2307
|
+
path: {
|
|
2308
|
+
region: data.region
|
|
2309
|
+
},
|
|
2310
|
+
body: data.requestBody,
|
|
2311
|
+
mediaType: 'application/json',
|
|
2312
|
+
errors: {
|
|
2313
|
+
400: 'Invalid date format or range',
|
|
2314
|
+
401: 'User not authenticated',
|
|
2315
|
+
409: 'Backfill already in progress for this user'
|
|
2316
|
+
}
|
|
2317
|
+
});
|
|
2318
|
+
}
|
|
2319
|
+
}
|
|
2320
|
+
|
|
2321
|
+
export class UsersService {
|
|
2322
|
+
/**
|
|
2323
|
+
* Delete own user account
|
|
2324
|
+
* @param data The data for the request.
|
|
2325
|
+
* @param data.requestBody
|
|
2326
|
+
* @returns void User deleted successfully
|
|
2327
|
+
* @throws ApiError
|
|
2328
|
+
*/
|
|
2329
|
+
public static userControllerDeleteOwnUser(
|
|
2330
|
+
data: UserControllerDeleteOwnUserData
|
|
2331
|
+
): CancelablePromise<UserControllerDeleteOwnUserResponse> {
|
|
2332
|
+
return __request(OpenAPI, {
|
|
2333
|
+
method: 'DELETE',
|
|
2334
|
+
url: '/api/v1/users',
|
|
2335
|
+
body: data.requestBody,
|
|
2336
|
+
mediaType: 'application/json',
|
|
2337
|
+
errors: {
|
|
2338
|
+
403: 'Invalid access token'
|
|
2339
|
+
}
|
|
2340
|
+
});
|
|
2341
|
+
}
|
|
2342
|
+
|
|
2343
|
+
/**
|
|
2344
|
+
* Get current authenticated user
|
|
2345
|
+
* @param data The data for the request.
|
|
2346
|
+
* @param data.acceptLanguage
|
|
2347
|
+
* @returns unknown User retrieved successfully
|
|
2348
|
+
* @throws ApiError
|
|
2349
|
+
*/
|
|
2350
|
+
public static userControllerGetUser(
|
|
2351
|
+
data: UserControllerGetUserData
|
|
2352
|
+
): CancelablePromise<UserControllerGetUserResponse> {
|
|
2353
|
+
return __request(OpenAPI, {
|
|
2354
|
+
method: 'GET',
|
|
2355
|
+
url: '/api/v1/users',
|
|
2356
|
+
headers: {
|
|
2357
|
+
'accept-language': data.acceptLanguage
|
|
2358
|
+
}
|
|
2359
|
+
});
|
|
2360
|
+
}
|
|
2361
|
+
|
|
2362
|
+
/**
|
|
2363
|
+
* Sign up new user
|
|
2364
|
+
* Create a new account with auto-generated access token. Protected by Cloudflare Turnstile to prevent automated signup (when enabled).
|
|
2365
|
+
* @param data The data for the request.
|
|
2366
|
+
* @param data.requestBody
|
|
2367
|
+
* @returns SignupResponseDto User created successfully
|
|
2368
|
+
* @throws ApiError
|
|
2369
|
+
*/
|
|
2370
|
+
public static userControllerSignupUser(
|
|
2371
|
+
data: UserControllerSignupUserData
|
|
2372
|
+
): CancelablePromise<UserControllerSignupUserResponse> {
|
|
2373
|
+
return __request(OpenAPI, {
|
|
2374
|
+
method: 'POST',
|
|
2375
|
+
url: '/api/v1/users',
|
|
2376
|
+
body: data.requestBody,
|
|
2377
|
+
mediaType: 'application/json',
|
|
2378
|
+
errors: {
|
|
2379
|
+
400: 'Invalid Turnstile token (when Turnstile is enabled)',
|
|
2380
|
+
403: 'User signup is disabled'
|
|
2381
|
+
}
|
|
2382
|
+
});
|
|
2383
|
+
}
|
|
2384
|
+
|
|
2385
|
+
/**
|
|
2386
|
+
* Delete user by ID (admin only)
|
|
2387
|
+
* @param data The data for the request.
|
|
2388
|
+
* @param data.id User ID to delete
|
|
2389
|
+
* @returns void User deleted successfully
|
|
2390
|
+
* @throws ApiError
|
|
2391
|
+
*/
|
|
2392
|
+
public static userControllerDeleteUser(
|
|
2393
|
+
data: UserControllerDeleteUserData
|
|
2394
|
+
): CancelablePromise<UserControllerDeleteUserResponse> {
|
|
2395
|
+
return __request(OpenAPI, {
|
|
2396
|
+
method: 'DELETE',
|
|
2397
|
+
url: '/api/v1/users/{id}',
|
|
2398
|
+
path: {
|
|
2399
|
+
id: data.id
|
|
2400
|
+
},
|
|
2401
|
+
errors: {
|
|
2402
|
+
403: 'Cannot delete own account or insufficient permissions'
|
|
2403
|
+
}
|
|
2404
|
+
});
|
|
2405
|
+
}
|
|
2406
|
+
|
|
2407
|
+
/**
|
|
2408
|
+
* Get user info by user ID
|
|
2409
|
+
* @param data The data for the request.
|
|
2410
|
+
* @param data.id User ID
|
|
2411
|
+
* @returns unknown User info retrieved successfully
|
|
2412
|
+
* @throws ApiError
|
|
2413
|
+
*/
|
|
2414
|
+
public static userControllerGetUserInfo(
|
|
2415
|
+
data: UserControllerGetUserInfoData
|
|
2416
|
+
): CancelablePromise<UserControllerGetUserInfoResponse> {
|
|
2417
|
+
return __request(OpenAPI, {
|
|
2418
|
+
method: 'GET',
|
|
2419
|
+
url: '/api/v1/users/{id}/info',
|
|
2420
|
+
path: {
|
|
2421
|
+
id: data.id
|
|
2422
|
+
},
|
|
2423
|
+
errors: {
|
|
2424
|
+
403: 'Cannot access other user info without admin permission'
|
|
2425
|
+
}
|
|
2426
|
+
});
|
|
2427
|
+
}
|
|
2428
|
+
|
|
2429
|
+
/**
|
|
2430
|
+
* Update user settings
|
|
2431
|
+
* @param data The data for the request.
|
|
2432
|
+
* @param data.requestBody
|
|
2433
|
+
* @returns unknown Settings updated successfully
|
|
2434
|
+
* @throws ApiError
|
|
2435
|
+
*/
|
|
2436
|
+
public static userControllerUpdateUserSetting(
|
|
2437
|
+
data: UserControllerUpdateUserSettingData
|
|
2438
|
+
): CancelablePromise<UserControllerUpdateUserSettingResponse> {
|
|
2439
|
+
return __request(OpenAPI, {
|
|
2440
|
+
method: 'PUT',
|
|
2441
|
+
url: '/api/v1/users/setting',
|
|
2442
|
+
body: data.requestBody,
|
|
2443
|
+
mediaType: 'application/json',
|
|
2444
|
+
errors: {
|
|
2445
|
+
403: 'Insufficient permissions'
|
|
2446
|
+
}
|
|
2447
|
+
});
|
|
2448
|
+
}
|
|
2449
|
+
|
|
2450
|
+
/**
|
|
2451
|
+
* Get all user settings paginated (admin only)
|
|
2452
|
+
* @param data The data for the request.
|
|
2453
|
+
* @param data.pageNo Page number
|
|
2454
|
+
* @param data.pageSize Page size
|
|
2455
|
+
* @returns unknown Settings list retrieved successfully
|
|
2456
|
+
* @throws ApiError
|
|
2457
|
+
*/
|
|
2458
|
+
public static userControllerGetAllUserSettingsByPage(
|
|
2459
|
+
data: UserControllerGetAllUserSettingsByPageData
|
|
2460
|
+
): CancelablePromise<UserControllerGetAllUserSettingsByPageResponse> {
|
|
2461
|
+
return __request(OpenAPI, {
|
|
2462
|
+
method: 'GET',
|
|
2463
|
+
url: '/api/v1/users/settings-by-page',
|
|
2464
|
+
query: {
|
|
2465
|
+
pageNo: data.pageNo,
|
|
2466
|
+
pageSize: data.pageSize
|
|
2467
|
+
}
|
|
2468
|
+
});
|
|
2469
|
+
}
|
|
2470
|
+
|
|
2471
|
+
/**
|
|
2472
|
+
* Get asset and liability summary for current user
|
|
2473
|
+
* @returns unknown Summary retrieved successfully
|
|
2474
|
+
* @throws ApiError
|
|
2475
|
+
*/
|
|
2476
|
+
public static userControllerGetAssetLiabilitySummary(): CancelablePromise<UserControllerGetAssetLiabilitySummaryResponse> {
|
|
2477
|
+
return __request(OpenAPI, {
|
|
2478
|
+
method: 'GET',
|
|
2479
|
+
url: '/api/v1/users/asset-liability-summary'
|
|
2480
|
+
});
|
|
2481
|
+
}
|
|
2482
|
+
}
|
|
2483
|
+
|
|
2484
|
+
export class PropertiesService {
|
|
2485
|
+
/**
|
|
2486
|
+
* Get all system properties
|
|
2487
|
+
* @returns unknown Properties retrieved successfully
|
|
2488
|
+
* @throws ApiError
|
|
2489
|
+
*/
|
|
2490
|
+
public static propertyControllerGetAll(): CancelablePromise<PropertyControllerGetAllResponse> {
|
|
2491
|
+
return __request(OpenAPI, {
|
|
2492
|
+
method: 'GET',
|
|
2493
|
+
url: '/api/v1/admin/properties',
|
|
2494
|
+
errors: {
|
|
2495
|
+
401: 'Unauthorized',
|
|
2496
|
+
403: 'Forbidden - insufficient permissions'
|
|
2497
|
+
}
|
|
2498
|
+
});
|
|
2499
|
+
}
|
|
2500
|
+
|
|
2501
|
+
/**
|
|
2502
|
+
* Get property by key
|
|
2503
|
+
* @param data The data for the request.
|
|
2504
|
+
* @param data.key Property key
|
|
2505
|
+
* @returns unknown Property retrieved successfully
|
|
2506
|
+
* @throws ApiError
|
|
2507
|
+
*/
|
|
2508
|
+
public static propertyControllerGetByKey(
|
|
2509
|
+
data: PropertyControllerGetByKeyData
|
|
2510
|
+
): CancelablePromise<PropertyControllerGetByKeyResponse> {
|
|
2511
|
+
return __request(OpenAPI, {
|
|
2512
|
+
method: 'GET',
|
|
2513
|
+
url: '/api/v1/admin/properties/{key}',
|
|
2514
|
+
path: {
|
|
2515
|
+
key: data.key
|
|
2516
|
+
},
|
|
2517
|
+
errors: {
|
|
2518
|
+
401: 'Unauthorized',
|
|
2519
|
+
403: 'Forbidden - insufficient permissions',
|
|
2520
|
+
404: 'Property not found'
|
|
2521
|
+
}
|
|
2522
|
+
});
|
|
2523
|
+
}
|
|
2524
|
+
|
|
2525
|
+
/**
|
|
2526
|
+
* Update a system property
|
|
2527
|
+
* @param data The data for the request.
|
|
2528
|
+
* @param data.key Property key
|
|
2529
|
+
* @param data.requestBody
|
|
2530
|
+
* @returns unknown Property updated successfully
|
|
2531
|
+
* @throws ApiError
|
|
2532
|
+
*/
|
|
2533
|
+
public static propertyControllerUpdate(
|
|
2534
|
+
data: PropertyControllerUpdateData
|
|
2535
|
+
): CancelablePromise<PropertyControllerUpdateResponse> {
|
|
2536
|
+
return __request(OpenAPI, {
|
|
2537
|
+
method: 'PUT',
|
|
2538
|
+
url: '/api/v1/admin/properties/{key}',
|
|
2539
|
+
path: {
|
|
2540
|
+
key: data.key
|
|
2541
|
+
},
|
|
2542
|
+
body: data.requestBody,
|
|
2543
|
+
mediaType: 'application/json',
|
|
2544
|
+
errors: {
|
|
2545
|
+
401: 'Unauthorized',
|
|
2546
|
+
403: 'Forbidden - insufficient permissions'
|
|
2547
|
+
}
|
|
2548
|
+
});
|
|
2549
|
+
}
|
|
2550
|
+
|
|
2551
|
+
/**
|
|
2552
|
+
* Delete a system property
|
|
2553
|
+
* @param data The data for the request.
|
|
2554
|
+
* @param data.key Property key
|
|
2555
|
+
* @returns void Property deleted successfully
|
|
2556
|
+
* @throws ApiError
|
|
2557
|
+
*/
|
|
2558
|
+
public static propertyControllerDelete(
|
|
2559
|
+
data: PropertyControllerDeleteData
|
|
2560
|
+
): CancelablePromise<PropertyControllerDeleteResponse> {
|
|
2561
|
+
return __request(OpenAPI, {
|
|
2562
|
+
method: 'DELETE',
|
|
2563
|
+
url: '/api/v1/admin/properties/{key}',
|
|
2564
|
+
path: {
|
|
2565
|
+
key: data.key
|
|
2566
|
+
},
|
|
2567
|
+
errors: {
|
|
2568
|
+
401: 'Unauthorized',
|
|
2569
|
+
403: 'Forbidden - insufficient permissions',
|
|
2570
|
+
404: 'Property not found'
|
|
2571
|
+
}
|
|
2572
|
+
});
|
|
2573
|
+
}
|
|
2574
|
+
}
|
|
2575
|
+
|
|
2576
|
+
export class BeanTransactionRulesService {
|
|
2577
|
+
/**
|
|
2578
|
+
* Create a new transaction rule (or upsert if upsertByPayee=true)
|
|
2579
|
+
* Creates a new rule. If upsertByPayee=true, updates existing rule matching payeeKeywords[0] instead of creating duplicate.
|
|
2580
|
+
* @param data The data for the request.
|
|
2581
|
+
* @param data.region Region code for tenant context
|
|
2582
|
+
* @param data.requestBody
|
|
2583
|
+
* @returns TransactionRuleResponseDto Rule updated successfully (upsert mode)
|
|
2584
|
+
* @throws ApiError
|
|
2585
|
+
*/
|
|
2586
|
+
public static transactionRuleControllerCreate(
|
|
2587
|
+
data: TransactionRuleControllerCreateData
|
|
2588
|
+
): CancelablePromise<TransactionRuleControllerCreateResponse> {
|
|
2589
|
+
return __request(OpenAPI, {
|
|
2590
|
+
method: 'POST',
|
|
2591
|
+
url: '/api/v1/{region}/bean/transaction-rules',
|
|
1862
2592
|
path: {
|
|
1863
2593
|
region: data.region
|
|
1864
2594
|
},
|
|
@@ -2121,256 +2851,309 @@ export class BeanTransactionRulesService {
|
|
|
2121
2851
|
}
|
|
2122
2852
|
}
|
|
2123
2853
|
|
|
2124
|
-
export class
|
|
2854
|
+
export class LifeEventsService {
|
|
2125
2855
|
/**
|
|
2126
|
-
*
|
|
2856
|
+
* Create a new life event
|
|
2857
|
+
* Creates a new life event entry for the authenticated user. Returns ETag header carrying the row updatedAt.
|
|
2127
2858
|
* @param data The data for the request.
|
|
2859
|
+
* @param data.region Region code for tenant context (decorative for life events)
|
|
2128
2860
|
* @param data.requestBody
|
|
2129
|
-
* @returns
|
|
2861
|
+
* @returns EventResponseDto Life event created successfully
|
|
2130
2862
|
* @throws ApiError
|
|
2131
2863
|
*/
|
|
2132
|
-
public static
|
|
2133
|
-
data:
|
|
2134
|
-
): CancelablePromise<
|
|
2864
|
+
public static eventControllerCreate(
|
|
2865
|
+
data: EventControllerCreateData
|
|
2866
|
+
): CancelablePromise<EventControllerCreateResponse> {
|
|
2135
2867
|
return __request(OpenAPI, {
|
|
2136
|
-
method: '
|
|
2137
|
-
url: '/api/v1/
|
|
2868
|
+
method: 'POST',
|
|
2869
|
+
url: '/api/v1/{region}/bean/events',
|
|
2870
|
+
path: {
|
|
2871
|
+
region: data.region
|
|
2872
|
+
},
|
|
2138
2873
|
body: data.requestBody,
|
|
2139
2874
|
mediaType: 'application/json',
|
|
2140
2875
|
errors: {
|
|
2141
|
-
|
|
2876
|
+
409: 'Life event already exists for this (userId, type, date) combination'
|
|
2142
2877
|
}
|
|
2143
2878
|
});
|
|
2144
2879
|
}
|
|
2145
2880
|
|
|
2146
2881
|
/**
|
|
2147
|
-
*
|
|
2882
|
+
* List user life events
|
|
2883
|
+
* Returns life events for the authenticated user with optional filtering by type, description search, and date range.
|
|
2148
2884
|
* @param data The data for the request.
|
|
2149
|
-
* @param data.
|
|
2150
|
-
* @
|
|
2885
|
+
* @param data.region Region code for tenant context (decorative for life events)
|
|
2886
|
+
* @param data.type Filter by life event type (exact match)
|
|
2887
|
+
* @param data.q Search term for description (case-insensitive partial match)
|
|
2888
|
+
* @param data.from Filter life events from this date (ISO 8601 format)
|
|
2889
|
+
* @param data.to Filter life events to this date (ISO 8601 format)
|
|
2890
|
+
* @param data.page Page number for pagination (default: 1)
|
|
2891
|
+
* @param data.limit Number of items per page (default: 20, max: 100)
|
|
2892
|
+
* @returns EventListResponseDto Life events retrieved successfully
|
|
2151
2893
|
* @throws ApiError
|
|
2152
2894
|
*/
|
|
2153
|
-
public static
|
|
2154
|
-
data:
|
|
2155
|
-
): CancelablePromise<
|
|
2895
|
+
public static eventControllerFindAll(
|
|
2896
|
+
data: EventControllerFindAllData
|
|
2897
|
+
): CancelablePromise<EventControllerFindAllResponse> {
|
|
2156
2898
|
return __request(OpenAPI, {
|
|
2157
2899
|
method: 'GET',
|
|
2158
|
-
url: '/api/v1/
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
}
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
* @param data.requestBody
|
|
2170
|
-
* @returns unknown User created successfully
|
|
2171
|
-
* @throws ApiError
|
|
2172
|
-
*/
|
|
2173
|
-
public static userControllerSignupUser(
|
|
2174
|
-
data: UserControllerSignupUserData
|
|
2175
|
-
): CancelablePromise<UserControllerSignupUserResponse> {
|
|
2176
|
-
return __request(OpenAPI, {
|
|
2177
|
-
method: 'POST',
|
|
2178
|
-
url: '/api/v1/users',
|
|
2179
|
-
body: data.requestBody,
|
|
2180
|
-
mediaType: 'application/json',
|
|
2181
|
-
errors: {
|
|
2182
|
-
400: 'Invalid Turnstile token (when Turnstile is enabled)',
|
|
2183
|
-
403: 'User signup is disabled'
|
|
2900
|
+
url: '/api/v1/{region}/bean/events',
|
|
2901
|
+
path: {
|
|
2902
|
+
region: data.region
|
|
2903
|
+
},
|
|
2904
|
+
query: {
|
|
2905
|
+
type: data.type,
|
|
2906
|
+
q: data.q,
|
|
2907
|
+
from: data.from,
|
|
2908
|
+
to: data.to,
|
|
2909
|
+
page: data.page,
|
|
2910
|
+
limit: data.limit
|
|
2184
2911
|
}
|
|
2185
2912
|
});
|
|
2186
2913
|
}
|
|
2187
2914
|
|
|
2188
2915
|
/**
|
|
2189
|
-
*
|
|
2916
|
+
* Get life event by ID
|
|
2917
|
+
* Returns a single life event by its ID. Returns ETag header.
|
|
2190
2918
|
* @param data The data for the request.
|
|
2191
|
-
* @param data.id
|
|
2192
|
-
* @
|
|
2919
|
+
* @param data.id Life event ID
|
|
2920
|
+
* @param data.region Region code for tenant context (decorative for life events)
|
|
2921
|
+
* @returns EventResponseDto Life event retrieved successfully
|
|
2193
2922
|
* @throws ApiError
|
|
2194
2923
|
*/
|
|
2195
|
-
public static
|
|
2196
|
-
data:
|
|
2197
|
-
): CancelablePromise<
|
|
2924
|
+
public static eventControllerFindOne(
|
|
2925
|
+
data: EventControllerFindOneData
|
|
2926
|
+
): CancelablePromise<EventControllerFindOneResponse> {
|
|
2198
2927
|
return __request(OpenAPI, {
|
|
2199
|
-
method: '
|
|
2200
|
-
url: '/api/v1/
|
|
2928
|
+
method: 'GET',
|
|
2929
|
+
url: '/api/v1/{region}/bean/events/{id}',
|
|
2201
2930
|
path: {
|
|
2202
|
-
id: data.id
|
|
2931
|
+
id: data.id,
|
|
2932
|
+
region: data.region
|
|
2203
2933
|
},
|
|
2204
2934
|
errors: {
|
|
2205
|
-
|
|
2935
|
+
404: 'Life event not found'
|
|
2206
2936
|
}
|
|
2207
2937
|
});
|
|
2208
2938
|
}
|
|
2209
2939
|
|
|
2210
2940
|
/**
|
|
2211
|
-
*
|
|
2941
|
+
* Update a life event
|
|
2942
|
+
* Updates an existing life event. If If-Match header is provided, performs optimistic concurrency check; mismatched updatedAt returns 412.
|
|
2212
2943
|
* @param data The data for the request.
|
|
2213
|
-
* @param data.id
|
|
2214
|
-
* @
|
|
2944
|
+
* @param data.id Life event ID
|
|
2945
|
+
* @param data.region Region code for tenant context (decorative for life events)
|
|
2946
|
+
* @param data.requestBody
|
|
2947
|
+
* @returns EventResponseDto Life event updated successfully
|
|
2215
2948
|
* @throws ApiError
|
|
2216
2949
|
*/
|
|
2217
|
-
public static
|
|
2218
|
-
data:
|
|
2219
|
-
): CancelablePromise<
|
|
2950
|
+
public static eventControllerUpdate(
|
|
2951
|
+
data: EventControllerUpdateData
|
|
2952
|
+
): CancelablePromise<EventControllerUpdateResponse> {
|
|
2220
2953
|
return __request(OpenAPI, {
|
|
2221
|
-
method: '
|
|
2222
|
-
url: '/api/v1/
|
|
2954
|
+
method: 'PUT',
|
|
2955
|
+
url: '/api/v1/{region}/bean/events/{id}',
|
|
2223
2956
|
path: {
|
|
2224
|
-
id: data.id
|
|
2957
|
+
id: data.id,
|
|
2958
|
+
region: data.region
|
|
2225
2959
|
},
|
|
2960
|
+
body: data.requestBody,
|
|
2961
|
+
mediaType: 'application/json',
|
|
2226
2962
|
errors: {
|
|
2227
|
-
|
|
2963
|
+
400: 'If-Match header is not a valid ISO 8601 date',
|
|
2964
|
+
404: 'Life event not found',
|
|
2965
|
+
409: 'Updated event conflicts with an existing (userId, type, date) combination',
|
|
2966
|
+
412: 'If-Match precondition failed (updatedAt mismatch)'
|
|
2228
2967
|
}
|
|
2229
2968
|
});
|
|
2230
2969
|
}
|
|
2231
2970
|
|
|
2232
2971
|
/**
|
|
2233
|
-
*
|
|
2972
|
+
* Delete a life event
|
|
2973
|
+
* Deletes a life event entry (hard delete). Returns 204.
|
|
2234
2974
|
* @param data The data for the request.
|
|
2235
|
-
* @param data.
|
|
2236
|
-
* @
|
|
2975
|
+
* @param data.id Life event ID
|
|
2976
|
+
* @param data.region Region code for tenant context (decorative for life events)
|
|
2977
|
+
* @returns void Life event deleted successfully
|
|
2237
2978
|
* @throws ApiError
|
|
2238
2979
|
*/
|
|
2239
|
-
public static
|
|
2240
|
-
data:
|
|
2241
|
-
): CancelablePromise<
|
|
2980
|
+
public static eventControllerDelete(
|
|
2981
|
+
data: EventControllerDeleteData
|
|
2982
|
+
): CancelablePromise<EventControllerDeleteResponse> {
|
|
2242
2983
|
return __request(OpenAPI, {
|
|
2243
|
-
method: '
|
|
2244
|
-
url: '/api/v1/
|
|
2245
|
-
|
|
2246
|
-
|
|
2984
|
+
method: 'DELETE',
|
|
2985
|
+
url: '/api/v1/{region}/bean/events/{id}',
|
|
2986
|
+
path: {
|
|
2987
|
+
id: data.id,
|
|
2988
|
+
region: data.region
|
|
2989
|
+
},
|
|
2247
2990
|
errors: {
|
|
2248
|
-
|
|
2991
|
+
404: 'Life event not found'
|
|
2249
2992
|
}
|
|
2250
2993
|
});
|
|
2251
2994
|
}
|
|
2252
2995
|
|
|
2253
2996
|
/**
|
|
2254
|
-
*
|
|
2997
|
+
* Slice time-series by a life event (Phase 79)
|
|
2998
|
+
* Returns aggregated time-series for postings matching accountPattern within the half-open date range of the given life event.
|
|
2255
2999
|
* @param data The data for the request.
|
|
2256
|
-
* @param data.
|
|
2257
|
-
* @param data.
|
|
2258
|
-
* @
|
|
3000
|
+
* @param data.id Life event ID
|
|
3001
|
+
* @param data.accountPattern
|
|
3002
|
+
* @param data.granularity
|
|
3003
|
+
* @param data.region Region code for tenant context (decorative for life events)
|
|
3004
|
+
* @returns unknown Time-series sliced by the life event range
|
|
2259
3005
|
* @throws ApiError
|
|
2260
3006
|
*/
|
|
2261
|
-
public static
|
|
2262
|
-
data:
|
|
2263
|
-
): CancelablePromise<
|
|
3007
|
+
public static eventControllerGetSlice(
|
|
3008
|
+
data: EventControllerGetSliceData
|
|
3009
|
+
): CancelablePromise<EventControllerGetSliceResponse> {
|
|
2264
3010
|
return __request(OpenAPI, {
|
|
2265
3011
|
method: 'GET',
|
|
2266
|
-
url: '/api/v1/
|
|
3012
|
+
url: '/api/v1/{region}/bean/events/{id}/slice',
|
|
3013
|
+
path: {
|
|
3014
|
+
id: data.id,
|
|
3015
|
+
region: data.region
|
|
3016
|
+
},
|
|
2267
3017
|
query: {
|
|
2268
|
-
|
|
2269
|
-
|
|
3018
|
+
accountPattern: data.accountPattern,
|
|
3019
|
+
granularity: data.granularity
|
|
3020
|
+
},
|
|
3021
|
+
errors: {
|
|
3022
|
+
400: 'accountPattern query param is empty',
|
|
3023
|
+
404: 'Life event not found'
|
|
2270
3024
|
}
|
|
2271
3025
|
});
|
|
2272
3026
|
}
|
|
3027
|
+
}
|
|
2273
3028
|
|
|
3029
|
+
export class OnboardingService {
|
|
2274
3030
|
/**
|
|
2275
|
-
*
|
|
2276
|
-
* @
|
|
3031
|
+
* Bootstrap core accounts + register asset accounts with opening balances (ADR-0113)
|
|
3032
|
+
* @param data The data for the request.
|
|
3033
|
+
* @param data.region Region code for tenant context
|
|
3034
|
+
* @param data.requestBody
|
|
3035
|
+
* @returns unknown Onboarding bootstrap result.
|
|
2277
3036
|
* @throws ApiError
|
|
2278
3037
|
*/
|
|
2279
|
-
public static
|
|
3038
|
+
public static onboardingControllerBootstrap(
|
|
3039
|
+
data: OnboardingControllerBootstrapData
|
|
3040
|
+
): CancelablePromise<OnboardingControllerBootstrapResponse> {
|
|
2280
3041
|
return __request(OpenAPI, {
|
|
2281
|
-
method: '
|
|
2282
|
-
url: '/api/v1/
|
|
3042
|
+
method: 'POST',
|
|
3043
|
+
url: '/api/v1/{region}/bean/onboarding',
|
|
3044
|
+
path: {
|
|
3045
|
+
region: data.region
|
|
3046
|
+
},
|
|
3047
|
+
body: data.requestBody,
|
|
3048
|
+
mediaType: 'application/json',
|
|
3049
|
+
errors: {
|
|
3050
|
+
422: 'Invalid region/account path/duplicate paths.'
|
|
3051
|
+
}
|
|
2283
3052
|
});
|
|
2284
3053
|
}
|
|
2285
3054
|
}
|
|
2286
3055
|
|
|
2287
|
-
export class
|
|
3056
|
+
export class BalanceReconciliationService {
|
|
2288
3057
|
/**
|
|
2289
|
-
*
|
|
2290
|
-
*
|
|
3058
|
+
* Preview reconciliation (book vs actual)
|
|
3059
|
+
* Computes book balance, diff, Beancount-inferred tolerance, and suggested action without persisting.
|
|
3060
|
+
* @param data The data for the request.
|
|
3061
|
+
* @param data.region Region code for tenant context (decorative for reconciliation)
|
|
3062
|
+
* @param data.requestBody
|
|
3063
|
+
* @returns ReconciliationComputeResultDto Reconciliation preview
|
|
2291
3064
|
* @throws ApiError
|
|
2292
3065
|
*/
|
|
2293
|
-
public static
|
|
3066
|
+
public static reconciliationControllerCompute(
|
|
3067
|
+
data: ReconciliationControllerComputeData
|
|
3068
|
+
): CancelablePromise<ReconciliationControllerComputeResponse> {
|
|
2294
3069
|
return __request(OpenAPI, {
|
|
2295
|
-
method: '
|
|
2296
|
-
url: '/api/v1/
|
|
3070
|
+
method: 'POST',
|
|
3071
|
+
url: '/api/v1/{region}/bean/reconciliations',
|
|
3072
|
+
path: {
|
|
3073
|
+
region: data.region
|
|
3074
|
+
},
|
|
3075
|
+
body: data.requestBody,
|
|
3076
|
+
mediaType: 'application/json',
|
|
2297
3077
|
errors: {
|
|
2298
|
-
|
|
2299
|
-
403: 'Forbidden - insufficient permissions'
|
|
3078
|
+
404: 'Account not found'
|
|
2300
3079
|
}
|
|
2301
3080
|
});
|
|
2302
3081
|
}
|
|
2303
3082
|
|
|
2304
3083
|
/**
|
|
2305
|
-
*
|
|
3084
|
+
* Record a balance assertion
|
|
3085
|
+
* Persists the reconciliation as a BeanBalance assertion (amount = actual, diffAmount = book − actual). Re-reconciling the same day/currency upserts.
|
|
2306
3086
|
* @param data The data for the request.
|
|
2307
|
-
* @param data.
|
|
2308
|
-
* @
|
|
3087
|
+
* @param data.region Region code for tenant context (decorative for reconciliation)
|
|
3088
|
+
* @param data.requestBody
|
|
3089
|
+
* @returns ReconciliationRecordDto Balance assertion recorded
|
|
2309
3090
|
* @throws ApiError
|
|
2310
3091
|
*/
|
|
2311
|
-
public static
|
|
2312
|
-
data:
|
|
2313
|
-
): CancelablePromise<
|
|
3092
|
+
public static reconciliationControllerAssert(
|
|
3093
|
+
data: ReconciliationControllerAssertData
|
|
3094
|
+
): CancelablePromise<ReconciliationControllerAssertResponse> {
|
|
2314
3095
|
return __request(OpenAPI, {
|
|
2315
|
-
method: '
|
|
2316
|
-
url: '/api/v1/
|
|
3096
|
+
method: 'POST',
|
|
3097
|
+
url: '/api/v1/{region}/bean/reconciliations/assert',
|
|
2317
3098
|
path: {
|
|
2318
|
-
|
|
3099
|
+
region: data.region
|
|
2319
3100
|
},
|
|
3101
|
+
body: data.requestBody,
|
|
3102
|
+
mediaType: 'application/json',
|
|
2320
3103
|
errors: {
|
|
2321
|
-
|
|
2322
|
-
403: 'Forbidden - insufficient permissions',
|
|
2323
|
-
404: 'Property not found'
|
|
3104
|
+
404: 'Account not found'
|
|
2324
3105
|
}
|
|
2325
3106
|
});
|
|
2326
3107
|
}
|
|
2327
3108
|
|
|
2328
3109
|
/**
|
|
2329
|
-
*
|
|
3110
|
+
* Generate a pad adjusting entry
|
|
3111
|
+
* 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.
|
|
2330
3112
|
* @param data The data for the request.
|
|
2331
|
-
* @param data.
|
|
3113
|
+
* @param data.region Region code for tenant context (decorative for reconciliation)
|
|
2332
3114
|
* @param data.requestBody
|
|
2333
|
-
* @returns
|
|
3115
|
+
* @returns PadResultDto Pad adjusting entry generated
|
|
2334
3116
|
* @throws ApiError
|
|
2335
3117
|
*/
|
|
2336
|
-
public static
|
|
2337
|
-
data:
|
|
2338
|
-
): CancelablePromise<
|
|
3118
|
+
public static reconciliationControllerPad(
|
|
3119
|
+
data: ReconciliationControllerPadData
|
|
3120
|
+
): CancelablePromise<ReconciliationControllerPadResponse> {
|
|
2339
3121
|
return __request(OpenAPI, {
|
|
2340
|
-
method: '
|
|
2341
|
-
url: '/api/v1/
|
|
3122
|
+
method: 'POST',
|
|
3123
|
+
url: '/api/v1/{region}/bean/reconciliations/pad',
|
|
2342
3124
|
path: {
|
|
2343
|
-
|
|
3125
|
+
region: data.region
|
|
2344
3126
|
},
|
|
2345
3127
|
body: data.requestBody,
|
|
2346
3128
|
mediaType: 'application/json',
|
|
2347
3129
|
errors: {
|
|
2348
|
-
|
|
2349
|
-
|
|
3130
|
+
400: 'Book already within tolerance — no pad needed',
|
|
3131
|
+
404: 'Account not found'
|
|
2350
3132
|
}
|
|
2351
3133
|
});
|
|
2352
3134
|
}
|
|
2353
3135
|
|
|
2354
3136
|
/**
|
|
2355
|
-
*
|
|
3137
|
+
* List reconciliation history for an account
|
|
3138
|
+
* Returns recorded balance assertions (most recent first). The latest drives the account-detail "Last <date>" badge.
|
|
2356
3139
|
* @param data The data for the request.
|
|
2357
|
-
* @param data.
|
|
2358
|
-
* @
|
|
3140
|
+
* @param data.accountId BeanAccount id
|
|
3141
|
+
* @param data.region Region code for tenant context (decorative for reconciliation)
|
|
3142
|
+
* @returns ReconciliationRecordDto Reconciliation history
|
|
2359
3143
|
* @throws ApiError
|
|
2360
3144
|
*/
|
|
2361
|
-
public static
|
|
2362
|
-
data:
|
|
2363
|
-
): CancelablePromise<
|
|
3145
|
+
public static reconciliationControllerHistory(
|
|
3146
|
+
data: ReconciliationControllerHistoryData
|
|
3147
|
+
): CancelablePromise<ReconciliationControllerHistoryResponse> {
|
|
2364
3148
|
return __request(OpenAPI, {
|
|
2365
|
-
method: '
|
|
2366
|
-
url: '/api/v1/
|
|
3149
|
+
method: 'GET',
|
|
3150
|
+
url: '/api/v1/{region}/bean/accounts/{accountId}/reconciliations',
|
|
2367
3151
|
path: {
|
|
2368
|
-
|
|
3152
|
+
accountId: data.accountId,
|
|
3153
|
+
region: data.region
|
|
2369
3154
|
},
|
|
2370
3155
|
errors: {
|
|
2371
|
-
|
|
2372
|
-
403: 'Forbidden - insufficient permissions',
|
|
2373
|
-
404: 'Property not found'
|
|
3156
|
+
404: 'Account not found'
|
|
2374
3157
|
}
|
|
2375
3158
|
});
|
|
2376
3159
|
}
|
|
@@ -2554,216 +3337,196 @@ export class BeanImportService {
|
|
|
2554
3337
|
}
|
|
2555
3338
|
}
|
|
2556
3339
|
|
|
2557
|
-
export class
|
|
2558
|
-
/**
|
|
2559
|
-
* Get all platforms with statistics
|
|
2560
|
-
* @returns unknown List of platforms with binding and account counts
|
|
2561
|
-
* @throws ApiError
|
|
2562
|
-
*/
|
|
2563
|
-
public static platformControllerFindAll(): CancelablePromise<PlatformControllerFindAllResponse> {
|
|
2564
|
-
return __request(OpenAPI, {
|
|
2565
|
-
method: 'GET',
|
|
2566
|
-
url: '/api/v1/bean/platforms'
|
|
2567
|
-
});
|
|
2568
|
-
}
|
|
2569
|
-
|
|
3340
|
+
export class ProviderSyncService {
|
|
2570
3341
|
/**
|
|
2571
|
-
*
|
|
3342
|
+
* Sync transactions from financial data provider
|
|
3343
|
+
*
|
|
3344
|
+
* Accepts raw transactions from external financial data providers, transforms them to Beancount format, and processes them through the ingestion pipeline.
|
|
3345
|
+
*
|
|
3346
|
+
* **Supported Providers:**
|
|
3347
|
+
* - **plaid**: Plaid API (US, Canada, Europe)
|
|
3348
|
+
* - **teller**: Teller API (US)
|
|
3349
|
+
* - **truelayer**: TrueLayer Open Banking (UK, Europe)
|
|
3350
|
+
* - **gocardless**: GoCardless Bank Account Data (Europe)
|
|
3351
|
+
* - **simplefin**: SimpleFIN (Self-hosted)
|
|
3352
|
+
* - **yodlee**: Yodlee (Global)
|
|
3353
|
+
* - **beancount-direct**: Beancount format transactions
|
|
3354
|
+
* - **parsed-bill**: Client-side parsed bill transactions
|
|
3355
|
+
*
|
|
3356
|
+
* **Processing Flow:**
|
|
3357
|
+
* 1. Transform raw data via provider adapter
|
|
3358
|
+
* 2. Validate transaction format
|
|
3359
|
+
* 3. Deduplicate using originalId
|
|
3360
|
+
* 4. Classify using rule engine
|
|
3361
|
+
* 5. Route low-confidence to Review Center
|
|
3362
|
+
* 6. Persist validated transactions
|
|
3363
|
+
*
|
|
2572
3364
|
* @param data The data for the request.
|
|
3365
|
+
* @param data.providerName Provider name
|
|
3366
|
+
* @param data.region Region code for tenant context
|
|
2573
3367
|
* @param data.requestBody
|
|
2574
|
-
* @returns
|
|
3368
|
+
* @returns ProviderSyncResponseDto Sync completed successfully
|
|
2575
3369
|
* @throws ApiError
|
|
2576
3370
|
*/
|
|
2577
|
-
public static
|
|
2578
|
-
data:
|
|
2579
|
-
): CancelablePromise<
|
|
3371
|
+
public static providerSyncControllerSync(
|
|
3372
|
+
data: ProviderSyncControllerSyncData
|
|
3373
|
+
): CancelablePromise<ProviderSyncControllerSyncResponse> {
|
|
2580
3374
|
return __request(OpenAPI, {
|
|
2581
3375
|
method: 'POST',
|
|
2582
|
-
url: '/api/v1/bean/
|
|
3376
|
+
url: '/api/v1/{region}/bean/import/provider/{providerName}/sync',
|
|
3377
|
+
path: {
|
|
3378
|
+
providerName: data.providerName,
|
|
3379
|
+
region: data.region
|
|
3380
|
+
},
|
|
2583
3381
|
body: data.requestBody,
|
|
2584
3382
|
mediaType: 'application/json',
|
|
2585
3383
|
errors: {
|
|
2586
|
-
|
|
3384
|
+
400: 'Invalid request data',
|
|
3385
|
+
401: 'Missing or invalid authentication',
|
|
3386
|
+
404: 'Provider not supported'
|
|
2587
3387
|
}
|
|
2588
3388
|
});
|
|
2589
3389
|
}
|
|
2590
3390
|
|
|
2591
3391
|
/**
|
|
2592
|
-
* Get
|
|
2593
|
-
*
|
|
2594
|
-
* @throws ApiError
|
|
2595
|
-
*/
|
|
2596
|
-
public static platformControllerGetPlatformList(): CancelablePromise<PlatformControllerGetPlatformListResponse> {
|
|
2597
|
-
return __request(OpenAPI, {
|
|
2598
|
-
method: 'GET',
|
|
2599
|
-
url: '/api/v1/bean/platforms/list'
|
|
2600
|
-
});
|
|
2601
|
-
}
|
|
2602
|
-
|
|
2603
|
-
/**
|
|
2604
|
-
* Match platforms by name or alias
|
|
3392
|
+
* Get supported providers
|
|
3393
|
+
* Returns a list of all providers supported by the sync endpoint.
|
|
2605
3394
|
* @param data The data for the request.
|
|
2606
|
-
* @param data.
|
|
2607
|
-
* @
|
|
2608
|
-
* @returns unknown List of matching platforms with suggested segment names
|
|
3395
|
+
* @param data.region Region code for tenant context
|
|
3396
|
+
* @returns SupportedProvidersResponseDto List of supported providers
|
|
2609
3397
|
* @throws ApiError
|
|
2610
3398
|
*/
|
|
2611
|
-
public static
|
|
2612
|
-
data:
|
|
2613
|
-
): CancelablePromise<
|
|
3399
|
+
public static providerSyncControllerGetSupportedProviders(
|
|
3400
|
+
data: ProviderSyncControllerGetSupportedProvidersData
|
|
3401
|
+
): CancelablePromise<ProviderSyncControllerGetSupportedProvidersResponse> {
|
|
2614
3402
|
return __request(OpenAPI, {
|
|
2615
3403
|
method: 'GET',
|
|
2616
|
-
url: '/api/v1/bean/
|
|
2617
|
-
|
|
2618
|
-
q: data.q,
|
|
3404
|
+
url: '/api/v1/{region}/bean/import/provider/supported',
|
|
3405
|
+
path: {
|
|
2619
3406
|
region: data.region
|
|
3407
|
+
},
|
|
3408
|
+
errors: {
|
|
3409
|
+
401: 'Missing or invalid authentication'
|
|
2620
3410
|
}
|
|
2621
3411
|
});
|
|
2622
3412
|
}
|
|
2623
3413
|
|
|
2624
3414
|
/**
|
|
2625
|
-
*
|
|
3415
|
+
* Check if provider is supported
|
|
3416
|
+
* Returns whether a specific provider is supported.
|
|
2626
3417
|
* @param data The data for the request.
|
|
2627
|
-
* @param data.
|
|
2628
|
-
* @param data.
|
|
2629
|
-
* @returns unknown
|
|
3418
|
+
* @param data.providerName Provider name to check
|
|
3419
|
+
* @param data.region Region code for tenant context
|
|
3420
|
+
* @returns unknown Provider support status
|
|
2630
3421
|
* @throws ApiError
|
|
2631
3422
|
*/
|
|
2632
|
-
public static
|
|
2633
|
-
data:
|
|
2634
|
-
): CancelablePromise<
|
|
3423
|
+
public static providerSyncControllerIsProviderSupported(
|
|
3424
|
+
data: ProviderSyncControllerIsProviderSupportedData
|
|
3425
|
+
): CancelablePromise<ProviderSyncControllerIsProviderSupportedResponse> {
|
|
2635
3426
|
return __request(OpenAPI, {
|
|
2636
|
-
method: '
|
|
2637
|
-
url: '/api/v1/bean/
|
|
3427
|
+
method: 'GET',
|
|
3428
|
+
url: '/api/v1/{region}/bean/import/provider/{providerName}/supported',
|
|
2638
3429
|
path: {
|
|
2639
|
-
|
|
3430
|
+
providerName: data.providerName,
|
|
3431
|
+
region: data.region
|
|
2640
3432
|
},
|
|
2641
|
-
body: data.requestBody,
|
|
2642
|
-
mediaType: 'application/json',
|
|
2643
3433
|
errors: {
|
|
2644
|
-
|
|
3434
|
+
401: 'Missing or invalid authentication'
|
|
2645
3435
|
}
|
|
2646
3436
|
});
|
|
2647
3437
|
}
|
|
3438
|
+
}
|
|
2648
3439
|
|
|
3440
|
+
export class ExternalAccountLinksService {
|
|
2649
3441
|
/**
|
|
2650
|
-
*
|
|
3442
|
+
* Create an external account → BeanAccount mapping (ADR-0113)
|
|
2651
3443
|
* @param data The data for the request.
|
|
2652
|
-
* @param data.
|
|
2653
|
-
* @
|
|
3444
|
+
* @param data.region Region code for tenant context
|
|
3445
|
+
* @param data.requestBody
|
|
3446
|
+
* @returns ExternalAccountLinkResponseDto Link created.
|
|
2654
3447
|
* @throws ApiError
|
|
2655
3448
|
*/
|
|
2656
|
-
public static
|
|
2657
|
-
data:
|
|
2658
|
-
): CancelablePromise<
|
|
3449
|
+
public static externalAccountLinkControllerCreate(
|
|
3450
|
+
data: ExternalAccountLinkControllerCreateData
|
|
3451
|
+
): CancelablePromise<ExternalAccountLinkControllerCreateResponse> {
|
|
2659
3452
|
return __request(OpenAPI, {
|
|
2660
|
-
method: '
|
|
2661
|
-
url: '/api/v1/bean/
|
|
3453
|
+
method: 'POST',
|
|
3454
|
+
url: '/api/v1/{region}/bean/external-account-links',
|
|
2662
3455
|
path: {
|
|
2663
|
-
|
|
3456
|
+
region: data.region
|
|
2664
3457
|
},
|
|
3458
|
+
body: data.requestBody,
|
|
3459
|
+
mediaType: 'application/json',
|
|
2665
3460
|
errors: {
|
|
2666
|
-
|
|
3461
|
+
422: 'beanAccountId not owned, or an active link already exists.'
|
|
2667
3462
|
}
|
|
2668
3463
|
});
|
|
2669
3464
|
}
|
|
2670
|
-
}
|
|
2671
3465
|
|
|
2672
|
-
export class ProviderSyncService {
|
|
2673
3466
|
/**
|
|
2674
|
-
*
|
|
2675
|
-
*
|
|
2676
|
-
* Accepts raw transactions from external financial data providers, transforms them to Beancount format, and processes them through the ingestion pipeline.
|
|
2677
|
-
*
|
|
2678
|
-
* **Supported Providers:**
|
|
2679
|
-
* - **plaid**: Plaid API (US, Canada, Europe)
|
|
2680
|
-
* - **teller**: Teller API (US)
|
|
2681
|
-
* - **truelayer**: TrueLayer Open Banking (UK, Europe)
|
|
2682
|
-
* - **gocardless**: GoCardless Bank Account Data (Europe)
|
|
2683
|
-
* - **simplefin**: SimpleFIN (Self-hosted)
|
|
2684
|
-
* - **yodlee**: Yodlee (Global)
|
|
2685
|
-
* - **beancount-direct**: Beancount format transactions
|
|
2686
|
-
* - **parsed-bill**: Client-side parsed bill transactions
|
|
2687
|
-
*
|
|
2688
|
-
* **Processing Flow:**
|
|
2689
|
-
* 1. Transform raw data via provider adapter
|
|
2690
|
-
* 2. Validate transaction format
|
|
2691
|
-
* 3. Deduplicate using originalId
|
|
2692
|
-
* 4. Classify using rule engine
|
|
2693
|
-
* 5. Route low-confidence to Review Center
|
|
2694
|
-
* 6. Persist validated transactions
|
|
2695
|
-
*
|
|
3467
|
+
* List the user's active external account links
|
|
2696
3468
|
* @param data The data for the request.
|
|
2697
|
-
* @param data.
|
|
2698
|
-
* @param data.region Region code
|
|
2699
|
-
* @
|
|
2700
|
-
* @returns ProviderSyncResponseDto Sync completed successfully
|
|
3469
|
+
* @param data.provider
|
|
3470
|
+
* @param data.region Region code for tenant context
|
|
3471
|
+
* @returns ExternalAccountLinkListResponseDto Links retrieved.
|
|
2701
3472
|
* @throws ApiError
|
|
2702
3473
|
*/
|
|
2703
|
-
public static
|
|
2704
|
-
data:
|
|
2705
|
-
): CancelablePromise<
|
|
3474
|
+
public static externalAccountLinkControllerFindAll(
|
|
3475
|
+
data: ExternalAccountLinkControllerFindAllData
|
|
3476
|
+
): CancelablePromise<ExternalAccountLinkControllerFindAllResponse> {
|
|
2706
3477
|
return __request(OpenAPI, {
|
|
2707
|
-
method: '
|
|
2708
|
-
url: '/api/v1/{region}/bean/
|
|
3478
|
+
method: 'GET',
|
|
3479
|
+
url: '/api/v1/{region}/bean/external-account-links',
|
|
2709
3480
|
path: {
|
|
2710
|
-
providerName: data.providerName,
|
|
2711
3481
|
region: data.region
|
|
2712
3482
|
},
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
errors: {
|
|
2716
|
-
400: 'Invalid request data',
|
|
2717
|
-
401: 'Missing or invalid authentication',
|
|
2718
|
-
404: 'Provider not supported'
|
|
3483
|
+
query: {
|
|
3484
|
+
provider: data.provider
|
|
2719
3485
|
}
|
|
2720
3486
|
});
|
|
2721
3487
|
}
|
|
2722
3488
|
|
|
2723
3489
|
/**
|
|
2724
|
-
* Get
|
|
2725
|
-
* Returns a list of all providers supported by the sync endpoint.
|
|
3490
|
+
* Get a single external account link
|
|
2726
3491
|
* @param data The data for the request.
|
|
3492
|
+
* @param data.id
|
|
2727
3493
|
* @param data.region Region code for tenant context
|
|
2728
|
-
* @returns
|
|
3494
|
+
* @returns ExternalAccountLinkResponseDto Link retrieved.
|
|
2729
3495
|
* @throws ApiError
|
|
2730
3496
|
*/
|
|
2731
|
-
public static
|
|
2732
|
-
data:
|
|
2733
|
-
): CancelablePromise<
|
|
3497
|
+
public static externalAccountLinkControllerFindOne(
|
|
3498
|
+
data: ExternalAccountLinkControllerFindOneData
|
|
3499
|
+
): CancelablePromise<ExternalAccountLinkControllerFindOneResponse> {
|
|
2734
3500
|
return __request(OpenAPI, {
|
|
2735
3501
|
method: 'GET',
|
|
2736
|
-
url: '/api/v1/{region}/bean/
|
|
3502
|
+
url: '/api/v1/{region}/bean/external-account-links/{id}',
|
|
2737
3503
|
path: {
|
|
3504
|
+
id: data.id,
|
|
2738
3505
|
region: data.region
|
|
2739
3506
|
},
|
|
2740
3507
|
errors: {
|
|
2741
|
-
|
|
3508
|
+
422: 'Link not found or not owned by the user.'
|
|
2742
3509
|
}
|
|
2743
3510
|
});
|
|
2744
3511
|
}
|
|
2745
3512
|
|
|
2746
3513
|
/**
|
|
2747
|
-
*
|
|
2748
|
-
* Returns whether a specific provider is supported.
|
|
3514
|
+
* Soft-delete (disconnect) an external account link
|
|
2749
3515
|
* @param data The data for the request.
|
|
2750
|
-
* @param data.
|
|
3516
|
+
* @param data.id
|
|
2751
3517
|
* @param data.region Region code for tenant context
|
|
2752
|
-
* @returns
|
|
3518
|
+
* @returns void Link soft-deleted; historical transactions are unaffected.
|
|
2753
3519
|
* @throws ApiError
|
|
2754
3520
|
*/
|
|
2755
|
-
public static
|
|
2756
|
-
data:
|
|
2757
|
-
): CancelablePromise<
|
|
3521
|
+
public static externalAccountLinkControllerRemove(
|
|
3522
|
+
data: ExternalAccountLinkControllerRemoveData
|
|
3523
|
+
): CancelablePromise<ExternalAccountLinkControllerRemoveResponse> {
|
|
2758
3524
|
return __request(OpenAPI, {
|
|
2759
|
-
method: '
|
|
2760
|
-
url: '/api/v1/{region}/bean/
|
|
3525
|
+
method: 'DELETE',
|
|
3526
|
+
url: '/api/v1/{region}/bean/external-account-links/{id}',
|
|
2761
3527
|
path: {
|
|
2762
|
-
|
|
3528
|
+
id: data.id,
|
|
2763
3529
|
region: data.region
|
|
2764
|
-
},
|
|
2765
|
-
errors: {
|
|
2766
|
-
401: 'Missing or invalid authentication'
|
|
2767
3530
|
}
|
|
2768
3531
|
});
|
|
2769
3532
|
}
|
|
@@ -2794,6 +3557,54 @@ export class ImportTelemetryService {
|
|
|
2794
3557
|
}
|
|
2795
3558
|
});
|
|
2796
3559
|
}
|
|
3560
|
+
|
|
3561
|
+
/**
|
|
3562
|
+
* Receive anonymous zero-hit coverage miss report
|
|
3563
|
+
* @param data The data for the request.
|
|
3564
|
+
* @param data.region Region code for tenant context
|
|
3565
|
+
* @param data.requestBody
|
|
3566
|
+
* @returns unknown Coverage miss report received
|
|
3567
|
+
* @throws ApiError
|
|
3568
|
+
*/
|
|
3569
|
+
public static telemetryControllerReportCoverageMiss(
|
|
3570
|
+
data: TelemetryControllerReportCoverageMissData
|
|
3571
|
+
): CancelablePromise<TelemetryControllerReportCoverageMissResponse> {
|
|
3572
|
+
return __request(OpenAPI, {
|
|
3573
|
+
method: 'POST',
|
|
3574
|
+
url: '/api/v1/{region}/bean/import/parser-coverage-miss',
|
|
3575
|
+
path: {
|
|
3576
|
+
region: data.region
|
|
3577
|
+
},
|
|
3578
|
+
body: data.requestBody,
|
|
3579
|
+
mediaType: 'application/json',
|
|
3580
|
+
errors: {
|
|
3581
|
+
401: 'Unauthorized'
|
|
3582
|
+
}
|
|
3583
|
+
});
|
|
3584
|
+
}
|
|
3585
|
+
|
|
3586
|
+
/**
|
|
3587
|
+
* Coverage metrics (uncovered format aggregation)
|
|
3588
|
+
* @param data The data for the request.
|
|
3589
|
+
* @param data.region Region code for tenant context
|
|
3590
|
+
* @param data.topN Top-N uncovered formats (default 10)
|
|
3591
|
+
* @returns unknown Coverage metrics
|
|
3592
|
+
* @throws ApiError
|
|
3593
|
+
*/
|
|
3594
|
+
public static telemetryControllerGetCoverageMetrics(
|
|
3595
|
+
data: TelemetryControllerGetCoverageMetricsData
|
|
3596
|
+
): CancelablePromise<TelemetryControllerGetCoverageMetricsResponse> {
|
|
3597
|
+
return __request(OpenAPI, {
|
|
3598
|
+
method: 'GET',
|
|
3599
|
+
url: '/api/v1/{region}/bean/import/parser-coverage-metrics',
|
|
3600
|
+
path: {
|
|
3601
|
+
region: data.region
|
|
3602
|
+
},
|
|
3603
|
+
query: {
|
|
3604
|
+
topN: data.topN
|
|
3605
|
+
}
|
|
3606
|
+
});
|
|
3607
|
+
}
|
|
2797
3608
|
}
|
|
2798
3609
|
|
|
2799
3610
|
export class BeanNlpService {
|
|
@@ -2879,6 +3690,121 @@ export class BeanNlpService {
|
|
|
2879
3690
|
}
|
|
2880
3691
|
}
|
|
2881
3692
|
|
|
3693
|
+
export class BeanPlatformsService {
|
|
3694
|
+
/**
|
|
3695
|
+
* Get all platforms with statistics
|
|
3696
|
+
* @returns unknown List of platforms with binding and account counts
|
|
3697
|
+
* @throws ApiError
|
|
3698
|
+
*/
|
|
3699
|
+
public static platformControllerFindAll(): CancelablePromise<PlatformControllerFindAllResponse> {
|
|
3700
|
+
return __request(OpenAPI, {
|
|
3701
|
+
method: 'GET',
|
|
3702
|
+
url: '/api/v1/bean/platforms'
|
|
3703
|
+
});
|
|
3704
|
+
}
|
|
3705
|
+
|
|
3706
|
+
/**
|
|
3707
|
+
* Create a new platform
|
|
3708
|
+
* @param data The data for the request.
|
|
3709
|
+
* @param data.requestBody
|
|
3710
|
+
* @returns unknown Platform created successfully
|
|
3711
|
+
* @throws ApiError
|
|
3712
|
+
*/
|
|
3713
|
+
public static platformControllerCreate(
|
|
3714
|
+
data: PlatformControllerCreateData
|
|
3715
|
+
): CancelablePromise<PlatformControllerCreateResponse> {
|
|
3716
|
+
return __request(OpenAPI, {
|
|
3717
|
+
method: 'POST',
|
|
3718
|
+
url: '/api/v1/bean/platforms',
|
|
3719
|
+
body: data.requestBody,
|
|
3720
|
+
mediaType: 'application/json',
|
|
3721
|
+
errors: {
|
|
3722
|
+
409: 'Platform already exists'
|
|
3723
|
+
}
|
|
3724
|
+
});
|
|
3725
|
+
}
|
|
3726
|
+
|
|
3727
|
+
/**
|
|
3728
|
+
* Get platform list for current user
|
|
3729
|
+
* @returns PlatformListItemDto List of platforms with user binding status
|
|
3730
|
+
* @throws ApiError
|
|
3731
|
+
*/
|
|
3732
|
+
public static platformControllerGetPlatformList(): CancelablePromise<PlatformControllerGetPlatformListResponse> {
|
|
3733
|
+
return __request(OpenAPI, {
|
|
3734
|
+
method: 'GET',
|
|
3735
|
+
url: '/api/v1/bean/platforms/list'
|
|
3736
|
+
});
|
|
3737
|
+
}
|
|
3738
|
+
|
|
3739
|
+
/**
|
|
3740
|
+
* Match platforms by name or alias
|
|
3741
|
+
* @param data The data for the request.
|
|
3742
|
+
* @param data.q Search query — Chinese name, English name, or abbreviation
|
|
3743
|
+
* @param data.region Region code for category override lookup
|
|
3744
|
+
* @returns PlatformMatchResponseDto Matching platforms with overall match type and truncation flag
|
|
3745
|
+
* @throws ApiError
|
|
3746
|
+
*/
|
|
3747
|
+
public static platformControllerMatchPlatforms(
|
|
3748
|
+
data: PlatformControllerMatchPlatformsData
|
|
3749
|
+
): CancelablePromise<PlatformControllerMatchPlatformsResponse> {
|
|
3750
|
+
return __request(OpenAPI, {
|
|
3751
|
+
method: 'GET',
|
|
3752
|
+
url: '/api/v1/bean/platforms/match',
|
|
3753
|
+
query: {
|
|
3754
|
+
q: data.q,
|
|
3755
|
+
region: data.region
|
|
3756
|
+
}
|
|
3757
|
+
});
|
|
3758
|
+
}
|
|
3759
|
+
|
|
3760
|
+
/**
|
|
3761
|
+
* Update a platform
|
|
3762
|
+
* @param data The data for the request.
|
|
3763
|
+
* @param data.id Platform ID
|
|
3764
|
+
* @param data.requestBody
|
|
3765
|
+
* @returns unknown Platform updated successfully
|
|
3766
|
+
* @throws ApiError
|
|
3767
|
+
*/
|
|
3768
|
+
public static platformControllerUpdate(
|
|
3769
|
+
data: PlatformControllerUpdateData
|
|
3770
|
+
): CancelablePromise<PlatformControllerUpdateResponse> {
|
|
3771
|
+
return __request(OpenAPI, {
|
|
3772
|
+
method: 'PUT',
|
|
3773
|
+
url: '/api/v1/bean/platforms/{id}',
|
|
3774
|
+
path: {
|
|
3775
|
+
id: data.id
|
|
3776
|
+
},
|
|
3777
|
+
body: data.requestBody,
|
|
3778
|
+
mediaType: 'application/json',
|
|
3779
|
+
errors: {
|
|
3780
|
+
404: 'Platform not found'
|
|
3781
|
+
}
|
|
3782
|
+
});
|
|
3783
|
+
}
|
|
3784
|
+
|
|
3785
|
+
/**
|
|
3786
|
+
* Delete a platform
|
|
3787
|
+
* @param data The data for the request.
|
|
3788
|
+
* @param data.id Platform ID
|
|
3789
|
+
* @returns void Platform deleted successfully
|
|
3790
|
+
* @throws ApiError
|
|
3791
|
+
*/
|
|
3792
|
+
public static platformControllerDelete(
|
|
3793
|
+
data: PlatformControllerDeleteData
|
|
3794
|
+
): CancelablePromise<PlatformControllerDeleteResponse> {
|
|
3795
|
+
return __request(OpenAPI, {
|
|
3796
|
+
method: 'DELETE',
|
|
3797
|
+
url: '/api/v1/bean/platforms/{id}',
|
|
3798
|
+
path: {
|
|
3799
|
+
id: data.id
|
|
3800
|
+
},
|
|
3801
|
+
errors: {
|
|
3802
|
+
404: 'Platform not found'
|
|
3803
|
+
}
|
|
3804
|
+
});
|
|
3805
|
+
}
|
|
3806
|
+
}
|
|
3807
|
+
|
|
2882
3808
|
export class DashboardService {
|
|
2883
3809
|
/**
|
|
2884
3810
|
* Get net worth overview
|
|
@@ -2914,6 +3840,7 @@ export class DashboardService {
|
|
|
2914
3840
|
* @param data.region Region code for tenant context
|
|
2915
3841
|
* @param data.groupBy Grouping strategy
|
|
2916
3842
|
* @param data.date Date for balance calculation (ISO 8601 format)
|
|
3843
|
+
* @param data.accountId Scope to a single account (only valid with groupBy=holdingAssetClass, ADR-0105 §6)
|
|
2917
3844
|
* @returns unknown Accounts retrieved successfully. Response type depends on groupBy parameter.
|
|
2918
3845
|
* @throws ApiError
|
|
2919
3846
|
*/
|
|
@@ -2928,7 +3855,8 @@ export class DashboardService {
|
|
|
2928
3855
|
},
|
|
2929
3856
|
query: {
|
|
2930
3857
|
groupBy: data.groupBy,
|
|
2931
|
-
date: data.date
|
|
3858
|
+
date: data.date,
|
|
3859
|
+
accountId: data.accountId
|
|
2932
3860
|
},
|
|
2933
3861
|
errors: {
|
|
2934
3862
|
401: 'User not authenticated'
|
|
@@ -2963,124 +3891,69 @@ export class DashboardService {
|
|
|
2963
3891
|
}
|
|
2964
3892
|
});
|
|
2965
3893
|
}
|
|
2966
|
-
}
|
|
2967
3894
|
|
|
2968
|
-
export class ReportingService {
|
|
2969
3895
|
/**
|
|
2970
|
-
* Get
|
|
2971
|
-
*
|
|
2972
|
-
* Returns time series data of portfolio net worth.
|
|
2973
|
-
*
|
|
2974
|
-
* **Multi-currency Support:**
|
|
2975
|
-
* - `series[].byCurrency` - Currency breakdown for each data point
|
|
2976
|
-
* - `byCurrency` - Separate time series grouped by currency
|
|
2977
|
-
* - `warnings` - Exchange rate warnings if conversion failed
|
|
2978
|
-
*
|
|
2979
|
-
* **Parameters:**
|
|
2980
|
-
* - `period`: Time period (1m, 3m, 6m, 1y)
|
|
2981
|
-
* - `granularity`: Data granularity (day, week, month)
|
|
2982
|
-
*
|
|
3896
|
+
* Get expenses/income grouped by functional category
|
|
3897
|
+
* 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)
|
|
2983
3898
|
* @param data The data for the request.
|
|
2984
3899
|
* @param data.region Region code for tenant context
|
|
2985
|
-
* @param data.
|
|
2986
|
-
* @param data.
|
|
2987
|
-
* @
|
|
3900
|
+
* @param data.groupBy Grouping strategy
|
|
3901
|
+
* @param data.period Time window (1m = current calendar month)
|
|
3902
|
+
* @param data.flow Account root to aggregate (expense → ^Expenses:, income → ^Income:)
|
|
3903
|
+
* @returns ExpensesByCategoryResponseDto Expenses retrieved successfully
|
|
2988
3904
|
* @throws ApiError
|
|
2989
3905
|
*/
|
|
2990
|
-
public static
|
|
2991
|
-
data:
|
|
2992
|
-
): CancelablePromise<
|
|
3906
|
+
public static dashboardControllerGetExpenses(
|
|
3907
|
+
data: DashboardControllerGetExpensesData
|
|
3908
|
+
): CancelablePromise<DashboardControllerGetExpensesResponse> {
|
|
2993
3909
|
return __request(OpenAPI, {
|
|
2994
3910
|
method: 'GET',
|
|
2995
|
-
url: '/api/v1/{region}/
|
|
3911
|
+
url: '/api/v1/{region}/dashboard/expenses',
|
|
2996
3912
|
path: {
|
|
2997
3913
|
region: data.region
|
|
2998
3914
|
},
|
|
2999
3915
|
query: {
|
|
3916
|
+
groupBy: data.groupBy,
|
|
3000
3917
|
period: data.period,
|
|
3001
|
-
|
|
3918
|
+
flow: data.flow
|
|
3002
3919
|
},
|
|
3003
3920
|
errors: {
|
|
3921
|
+
400: 'Invalid groupBy or period',
|
|
3004
3922
|
401: 'User not authenticated'
|
|
3005
3923
|
}
|
|
3006
3924
|
});
|
|
3007
3925
|
}
|
|
3926
|
+
}
|
|
3008
3927
|
|
|
3928
|
+
export class InvestmentService {
|
|
3009
3929
|
/**
|
|
3010
|
-
*
|
|
3011
|
-
*
|
|
3012
|
-
* Manually generate a portfolio snapshot for a specific date.
|
|
3013
|
-
*
|
|
3014
|
-
* **Multi-currency Support:**
|
|
3015
|
-
* - Fetches balances grouped by currency
|
|
3016
|
-
* - Uses user's baseCurrency setting for conversion
|
|
3017
|
-
* - Stores exchange rates and warnings
|
|
3018
|
-
*
|
|
3019
|
-
* **Use Cases:**
|
|
3020
|
-
* - Testing snapshot generation
|
|
3021
|
-
* - Force regeneration after data correction
|
|
3022
|
-
* - Initial setup for new users
|
|
3023
|
-
*
|
|
3930
|
+
* Get per-holding unrealized + realized P&L
|
|
3931
|
+
* Average-cost unrealized P&L per account × commodity, plus cumulative realized P&L on sold lots (method = FIFO | average, default average).
|
|
3024
3932
|
* @param data The data for the request.
|
|
3025
3933
|
* @param data.region Region code for tenant context
|
|
3026
|
-
* @param data.
|
|
3027
|
-
* @
|
|
3934
|
+
* @param data.asOf As-of date (ISO 8601), defaults to today
|
|
3935
|
+
* @param data.accountId Scope to a single account
|
|
3936
|
+
* @param data.method Realized-P&L lot-matching method (default average). Does not affect the average-cost unrealized basis.
|
|
3937
|
+
* @returns HoldingPnlResponseDto Holding P&L retrieved successfully
|
|
3028
3938
|
* @throws ApiError
|
|
3029
3939
|
*/
|
|
3030
|
-
public static
|
|
3031
|
-
data:
|
|
3032
|
-
): CancelablePromise<
|
|
3940
|
+
public static holdingPnlControllerGetHoldingPnl(
|
|
3941
|
+
data: HoldingPnlControllerGetHoldingPnlData
|
|
3942
|
+
): CancelablePromise<HoldingPnlControllerGetHoldingPnlResponse> {
|
|
3033
3943
|
return __request(OpenAPI, {
|
|
3034
|
-
method: '
|
|
3035
|
-
url: '/api/v1/{region}/
|
|
3944
|
+
method: 'GET',
|
|
3945
|
+
url: '/api/v1/{region}/investment/holdings/pnl',
|
|
3036
3946
|
path: {
|
|
3037
3947
|
region: data.region
|
|
3038
3948
|
},
|
|
3039
|
-
|
|
3040
|
-
|
|
3041
|
-
|
|
3042
|
-
|
|
3043
|
-
401: 'User not authenticated'
|
|
3044
|
-
}
|
|
3045
|
-
});
|
|
3046
|
-
}
|
|
3047
|
-
|
|
3048
|
-
/**
|
|
3049
|
-
* Backfill portfolio snapshots
|
|
3050
|
-
*
|
|
3051
|
-
* Generate snapshots for a date range (historical data backfill).
|
|
3052
|
-
*
|
|
3053
|
-
* **Multi-currency Support:**
|
|
3054
|
-
* - Each snapshot includes multi-currency data
|
|
3055
|
-
* - Uses exchange rates available at generation time
|
|
3056
|
-
* - Warnings stored for missing exchange rates
|
|
3057
|
-
*
|
|
3058
|
-
* **Best Practices:**
|
|
3059
|
-
* - Use for initial setup after account configuration
|
|
3060
|
-
* - Run during low-traffic periods for large date ranges
|
|
3061
|
-
* - Existing snapshots are skipped (not regenerated)
|
|
3062
|
-
*
|
|
3063
|
-
* @param data The data for the request.
|
|
3064
|
-
* @param data.region Region code for tenant context
|
|
3065
|
-
* @param data.requestBody
|
|
3066
|
-
* @returns BackfillSnapshotsResponse Backfill completed successfully
|
|
3067
|
-
* @throws ApiError
|
|
3068
|
-
*/
|
|
3069
|
-
public static reportingControllerBackfillSnapshots(
|
|
3070
|
-
data: ReportingControllerBackfillSnapshotsData
|
|
3071
|
-
): CancelablePromise<ReportingControllerBackfillSnapshotsResponse> {
|
|
3072
|
-
return __request(OpenAPI, {
|
|
3073
|
-
method: 'POST',
|
|
3074
|
-
url: '/api/v1/{region}/reporting/snapshots/backfill',
|
|
3075
|
-
path: {
|
|
3076
|
-
region: data.region
|
|
3949
|
+
query: {
|
|
3950
|
+
asOf: data.asOf,
|
|
3951
|
+
accountId: data.accountId,
|
|
3952
|
+
method: data.method
|
|
3077
3953
|
},
|
|
3078
|
-
body: data.requestBody,
|
|
3079
|
-
mediaType: 'application/json',
|
|
3080
3954
|
errors: {
|
|
3081
|
-
400: 'Invalid date format or
|
|
3082
|
-
401: 'User not authenticated'
|
|
3083
|
-
409: 'Backfill already in progress for this user'
|
|
3955
|
+
400: 'Invalid asOf format/value/future date, invalid accountId format, or unsupported method',
|
|
3956
|
+
401: 'User not authenticated'
|
|
3084
3957
|
}
|
|
3085
3958
|
});
|
|
3086
3959
|
}
|
|
@@ -3109,7 +3982,7 @@ export class AuthService {
|
|
|
3109
3982
|
* Anonymous login with access token
|
|
3110
3983
|
* @param data The data for the request.
|
|
3111
3984
|
* @param data.requestBody
|
|
3112
|
-
* @returns
|
|
3985
|
+
* @returns AnonymousLoginResponseDto Login successful
|
|
3113
3986
|
* @throws ApiError
|
|
3114
3987
|
*/
|
|
3115
3988
|
public static authControllerAccessTokenLogin(
|