@firela/api-types 0.0.0-canary.09a8ff4c → 0.0.0-canary.0a58435e
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 +2344 -1276
- package/dist/index.d.ts +2344 -1276
- package/dist/index.js +33 -5
- package/dist/index.mjs +33 -5
- package/package.json +1 -1
- package/src/generated/schemas.gen.ts +3212 -2022
- package/src/generated/services.gen.ts +1187 -782
- package/src/generated/types.gen.ts +5340 -1406
|
@@ -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,
|
|
@@ -97,6 +99,18 @@ import type {
|
|
|
97
99
|
CommodityControllerGetOrCreateResponse,
|
|
98
100
|
CommodityControllerBulkCreateData,
|
|
99
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,
|
|
100
114
|
RecurringRuleControllerCreateData,
|
|
101
115
|
RecurringRuleControllerCreateResponse,
|
|
102
116
|
RecurringRuleControllerFindAllData,
|
|
@@ -129,26 +143,14 @@ import type {
|
|
|
129
143
|
ExpectedTransactionControllerEnterNowResponse,
|
|
130
144
|
ForecastControllerGetForecastData,
|
|
131
145
|
ForecastControllerGetForecastResponse,
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
TransactionRuleControllerExportData,
|
|
141
|
-
TransactionRuleControllerExportResponse,
|
|
142
|
-
TransactionRuleControllerGetStatisticsData,
|
|
143
|
-
TransactionRuleControllerGetStatisticsResponse,
|
|
144
|
-
TransactionRuleControllerGetDetailData,
|
|
145
|
-
TransactionRuleControllerGetDetailResponse,
|
|
146
|
-
TransactionRuleControllerUpdateData,
|
|
147
|
-
TransactionRuleControllerUpdateResponse,
|
|
148
|
-
TransactionRuleControllerDeleteData,
|
|
149
|
-
TransactionRuleControllerDeleteResponse,
|
|
150
|
-
TransactionRuleControllerTestData,
|
|
151
|
-
TransactionRuleControllerTestResponse,
|
|
146
|
+
ReportingControllerGetPortfolioTrendsData,
|
|
147
|
+
ReportingControllerGetPortfolioTrendsResponse,
|
|
148
|
+
ReportingControllerGetCashFlowTrendsData,
|
|
149
|
+
ReportingControllerGetCashFlowTrendsResponse,
|
|
150
|
+
ReportingControllerGenerateSnapshotData,
|
|
151
|
+
ReportingControllerGenerateSnapshotResponse,
|
|
152
|
+
ReportingControllerBackfillSnapshotsData,
|
|
153
|
+
ReportingControllerBackfillSnapshotsResponse,
|
|
152
154
|
UserControllerDeleteOwnUserData,
|
|
153
155
|
UserControllerDeleteOwnUserResponse,
|
|
154
156
|
UserControllerGetUserData,
|
|
@@ -171,6 +173,28 @@ import type {
|
|
|
171
173
|
PropertyControllerUpdateResponse,
|
|
172
174
|
PropertyControllerDeleteData,
|
|
173
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
|
+
CategoryCatalogControllerListData,
|
|
197
|
+
CategoryCatalogControllerListResponse,
|
|
174
198
|
EventControllerCreateData,
|
|
175
199
|
EventControllerCreateResponse,
|
|
176
200
|
EventControllerFindAllData,
|
|
@@ -183,6 +207,16 @@ import type {
|
|
|
183
207
|
EventControllerDeleteResponse,
|
|
184
208
|
EventControllerGetSliceData,
|
|
185
209
|
EventControllerGetSliceResponse,
|
|
210
|
+
OnboardingControllerBootstrapData,
|
|
211
|
+
OnboardingControllerBootstrapResponse,
|
|
212
|
+
ReconciliationControllerComputeData,
|
|
213
|
+
ReconciliationControllerComputeResponse,
|
|
214
|
+
ReconciliationControllerAssertData,
|
|
215
|
+
ReconciliationControllerAssertResponse,
|
|
216
|
+
ReconciliationControllerPadData,
|
|
217
|
+
ReconciliationControllerPadResponse,
|
|
218
|
+
ReconciliationControllerHistoryData,
|
|
219
|
+
ReconciliationControllerHistoryResponse,
|
|
186
220
|
ExportControllerExportBeancountResponse,
|
|
187
221
|
FileImportControllerImportFileData,
|
|
188
222
|
FileImportControllerImportFileResponse,
|
|
@@ -196,22 +230,20 @@ import type {
|
|
|
196
230
|
ImporterConfigControllerUpdateConfigResponse,
|
|
197
231
|
ImporterConfigControllerResetConfigData,
|
|
198
232
|
ImporterConfigControllerResetConfigResponse,
|
|
199
|
-
PlatformControllerFindAllResponse,
|
|
200
|
-
PlatformControllerCreateData,
|
|
201
|
-
PlatformControllerCreateResponse,
|
|
202
|
-
PlatformControllerGetPlatformListResponse,
|
|
203
|
-
PlatformControllerMatchPlatformsData,
|
|
204
|
-
PlatformControllerMatchPlatformsResponse,
|
|
205
|
-
PlatformControllerUpdateData,
|
|
206
|
-
PlatformControllerUpdateResponse,
|
|
207
|
-
PlatformControllerDeleteData,
|
|
208
|
-
PlatformControllerDeleteResponse,
|
|
209
233
|
ProviderSyncControllerSyncData,
|
|
210
234
|
ProviderSyncControllerSyncResponse,
|
|
211
235
|
ProviderSyncControllerGetSupportedProvidersData,
|
|
212
236
|
ProviderSyncControllerGetSupportedProvidersResponse,
|
|
213
237
|
ProviderSyncControllerIsProviderSupportedData,
|
|
214
238
|
ProviderSyncControllerIsProviderSupportedResponse,
|
|
239
|
+
ExternalAccountLinkControllerCreateData,
|
|
240
|
+
ExternalAccountLinkControllerCreateResponse,
|
|
241
|
+
ExternalAccountLinkControllerFindAllData,
|
|
242
|
+
ExternalAccountLinkControllerFindAllResponse,
|
|
243
|
+
ExternalAccountLinkControllerFindOneData,
|
|
244
|
+
ExternalAccountLinkControllerFindOneResponse,
|
|
245
|
+
ExternalAccountLinkControllerRemoveData,
|
|
246
|
+
ExternalAccountLinkControllerRemoveResponse,
|
|
215
247
|
TelemetryControllerReportTelemetryData,
|
|
216
248
|
TelemetryControllerReportTelemetryResponse,
|
|
217
249
|
TelemetryControllerReportCoverageMissData,
|
|
@@ -224,34 +256,27 @@ import type {
|
|
|
224
256
|
NlpControllerClearSessionResponse,
|
|
225
257
|
NlpControllerGetSessionData,
|
|
226
258
|
NlpControllerGetSessionResponse,
|
|
259
|
+
PlatformControllerFindAllResponse,
|
|
260
|
+
PlatformControllerCreateData,
|
|
261
|
+
PlatformControllerCreateResponse,
|
|
262
|
+
PlatformControllerGetPlatformListData,
|
|
263
|
+
PlatformControllerGetPlatformListResponse,
|
|
264
|
+
PlatformControllerMatchPlatformsData,
|
|
265
|
+
PlatformControllerMatchPlatformsResponse,
|
|
266
|
+
PlatformControllerUpdateData,
|
|
267
|
+
PlatformControllerUpdateResponse,
|
|
268
|
+
PlatformControllerDeleteData,
|
|
269
|
+
PlatformControllerDeleteResponse,
|
|
227
270
|
DashboardControllerGetNetWorthData,
|
|
228
271
|
DashboardControllerGetNetWorthResponse,
|
|
229
272
|
DashboardControllerGetAccountsData,
|
|
230
273
|
DashboardControllerGetAccountsResponse,
|
|
231
274
|
DashboardControllerGetCashFlowData,
|
|
232
275
|
DashboardControllerGetCashFlowResponse,
|
|
276
|
+
DashboardControllerGetExpensesData,
|
|
277
|
+
DashboardControllerGetExpensesResponse,
|
|
233
278
|
HoldingPnlControllerGetHoldingPnlData,
|
|
234
279
|
HoldingPnlControllerGetHoldingPnlResponse,
|
|
235
|
-
PriceControllerCreateData,
|
|
236
|
-
PriceControllerCreateResponse,
|
|
237
|
-
PriceControllerFindAllData,
|
|
238
|
-
PriceControllerFindAllResponse,
|
|
239
|
-
PriceControllerFindOneData,
|
|
240
|
-
PriceControllerFindOneResponse,
|
|
241
|
-
PriceControllerUpdateData,
|
|
242
|
-
PriceControllerUpdateResponse,
|
|
243
|
-
PriceControllerDeleteData,
|
|
244
|
-
PriceControllerDeleteResponse,
|
|
245
|
-
PriceControllerBulkCreateData,
|
|
246
|
-
PriceControllerBulkCreateResponse,
|
|
247
|
-
ReportingControllerGetPortfolioTrendsData,
|
|
248
|
-
ReportingControllerGetPortfolioTrendsResponse,
|
|
249
|
-
ReportingControllerGetCashFlowTrendsData,
|
|
250
|
-
ReportingControllerGetCashFlowTrendsResponse,
|
|
251
|
-
ReportingControllerGenerateSnapshotData,
|
|
252
|
-
ReportingControllerGenerateSnapshotResponse,
|
|
253
|
-
ReportingControllerBackfillSnapshotsData,
|
|
254
|
-
ReportingControllerBackfillSnapshotsResponse,
|
|
255
280
|
ApiKeysControllerCreateApiKeyResponse,
|
|
256
281
|
AuthControllerAccessTokenLoginData,
|
|
257
282
|
AuthControllerAccessTokenLoginResponse,
|
|
@@ -266,7 +291,11 @@ import type {
|
|
|
266
291
|
HealthControllerResetCircuitBreakerData,
|
|
267
292
|
HealthControllerResetCircuitBreakerResponse,
|
|
268
293
|
HealthControllerGetMetricsResponse,
|
|
269
|
-
InfoControllerGetInfoResponse
|
|
294
|
+
InfoControllerGetInfoResponse,
|
|
295
|
+
SymbolControllerSearchData,
|
|
296
|
+
SymbolControllerSearchResponse,
|
|
297
|
+
SymbolControllerGetQuoteData,
|
|
298
|
+
SymbolControllerGetQuoteResponse
|
|
270
299
|
} from './types.gen';
|
|
271
300
|
|
|
272
301
|
export class BeanAccountsService {
|
|
@@ -304,7 +333,7 @@ export class BeanAccountsService {
|
|
|
304
333
|
* @param data.type Filter by account type
|
|
305
334
|
* @param data.status Filter by status
|
|
306
335
|
* @param data.isCustom Filter by custom (user-created) accounts only
|
|
307
|
-
* @param data.search Search term for path
|
|
336
|
+
* @param data.search Search term for account path
|
|
308
337
|
* @param data.limit Maximum number of results
|
|
309
338
|
* @param data.offset Number of results to skip
|
|
310
339
|
* @returns AccountListResponseDto Accounts retrieved successfully
|
|
@@ -385,7 +414,7 @@ export class BeanAccountsService {
|
|
|
385
414
|
|
|
386
415
|
/**
|
|
387
416
|
* Delete account
|
|
388
|
-
* Deletes an account (only if no transactions)
|
|
417
|
+
* Deletes an account (only if no active transactions; voided/superseded residual postings are cleaned up)
|
|
389
418
|
* @param data The data for the request.
|
|
390
419
|
* @param data.id Account UUID
|
|
391
420
|
* @param data.region Region code for tenant context
|
|
@@ -404,7 +433,7 @@ export class BeanAccountsService {
|
|
|
404
433
|
},
|
|
405
434
|
errors: {
|
|
406
435
|
404: 'Account not found',
|
|
407
|
-
409: 'Account has transactions and cannot be deleted'
|
|
436
|
+
409: 'Account has active transactions and cannot be deleted'
|
|
408
437
|
}
|
|
409
438
|
});
|
|
410
439
|
}
|
|
@@ -466,6 +495,35 @@ export class BeanAccountsService {
|
|
|
466
495
|
}
|
|
467
496
|
});
|
|
468
497
|
}
|
|
498
|
+
|
|
499
|
+
/**
|
|
500
|
+
* Post an opening-balance transaction
|
|
501
|
+
* 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.
|
|
502
|
+
* @param data The data for the request.
|
|
503
|
+
* @param data.id Account UUID
|
|
504
|
+
* @param data.region Region code for tenant context
|
|
505
|
+
* @param data.requestBody
|
|
506
|
+
* @returns OpeningBalanceResultDto Opening-balance transaction created
|
|
507
|
+
* @throws ApiError
|
|
508
|
+
*/
|
|
509
|
+
public static accountControllerAddOpeningBalance(
|
|
510
|
+
data: AccountControllerAddOpeningBalanceData
|
|
511
|
+
): CancelablePromise<AccountControllerAddOpeningBalanceResponse> {
|
|
512
|
+
return __request(OpenAPI, {
|
|
513
|
+
method: 'POST',
|
|
514
|
+
url: '/api/v1/{region}/bean/accounts/{id}/opening-balance',
|
|
515
|
+
path: {
|
|
516
|
+
id: data.id,
|
|
517
|
+
region: data.region
|
|
518
|
+
},
|
|
519
|
+
body: data.requestBody,
|
|
520
|
+
mediaType: 'application/json',
|
|
521
|
+
errors: {
|
|
522
|
+
404: 'Account not found',
|
|
523
|
+
409: 'An opening balance already exists for this account'
|
|
524
|
+
}
|
|
525
|
+
});
|
|
526
|
+
}
|
|
469
527
|
}
|
|
470
528
|
|
|
471
529
|
export class BeanAccountStandardsService {
|
|
@@ -497,7 +555,7 @@ export class BeanAccountStandardsService {
|
|
|
497
555
|
|
|
498
556
|
/**
|
|
499
557
|
* Get template metadata for an account path
|
|
500
|
-
* Returns
|
|
558
|
+
* Returns root type for a template path.
|
|
501
559
|
* @param data The data for the request.
|
|
502
560
|
* @param data.region Region code for tenant context
|
|
503
561
|
* @param data.path Account path to check
|
|
@@ -583,6 +641,7 @@ export class BeanTransactionsService {
|
|
|
583
641
|
* @param data.status Filter by transaction status
|
|
584
642
|
* @param data.search Search in narration and payee fields (max 200 chars)
|
|
585
643
|
* @param data.accountId Filter by account ID (transactions with postings to this account)
|
|
644
|
+
* @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
|
|
586
645
|
* @returns TransactionListResponseDto Transaction list
|
|
587
646
|
* @throws ApiError
|
|
588
647
|
*/
|
|
@@ -602,7 +661,8 @@ export class BeanTransactionsService {
|
|
|
602
661
|
dateTo: data.dateTo,
|
|
603
662
|
status: data.status,
|
|
604
663
|
search: data.search,
|
|
605
|
-
accountId: data.accountId
|
|
664
|
+
accountId: data.accountId,
|
|
665
|
+
category: data.category
|
|
606
666
|
},
|
|
607
667
|
errors: {
|
|
608
668
|
400: 'Validation failed',
|
|
@@ -790,7 +850,7 @@ export class BeanBalancesService {
|
|
|
790
850
|
* Query account balance
|
|
791
851
|
* Calculate account balance at a specific date for a single currency
|
|
792
852
|
* @param data The data for the request.
|
|
793
|
-
* @param data.account Account name (e.g., "Assets:
|
|
853
|
+
* @param data.account Account name (e.g., "Assets:Checking")
|
|
794
854
|
* @param data.region Region code for tenant context
|
|
795
855
|
* @param data.date Date to calculate balance at (ISO 8601 format)
|
|
796
856
|
* @param data.currency Currency to query (e.g., "USD", "CNY")
|
|
@@ -1511,150 +1571,317 @@ export class BeanCommoditiesService {
|
|
|
1511
1571
|
}
|
|
1512
1572
|
}
|
|
1513
1573
|
|
|
1514
|
-
export class
|
|
1574
|
+
export class BeanPricesService {
|
|
1515
1575
|
/**
|
|
1516
|
-
* Create a new
|
|
1517
|
-
* Creates a new
|
|
1576
|
+
* Create a new price
|
|
1577
|
+
* Creates a new price entry for the authenticated user
|
|
1518
1578
|
* @param data The data for the request.
|
|
1519
1579
|
* @param data.region Region code for tenant context
|
|
1520
1580
|
* @param data.requestBody
|
|
1521
|
-
* @returns
|
|
1581
|
+
* @returns PriceResponseDto Price created successfully
|
|
1522
1582
|
* @throws ApiError
|
|
1523
1583
|
*/
|
|
1524
|
-
public static
|
|
1525
|
-
data:
|
|
1526
|
-
): CancelablePromise<
|
|
1584
|
+
public static priceControllerCreate(
|
|
1585
|
+
data: PriceControllerCreateData
|
|
1586
|
+
): CancelablePromise<PriceControllerCreateResponse> {
|
|
1527
1587
|
return __request(OpenAPI, {
|
|
1528
1588
|
method: 'POST',
|
|
1529
|
-
url: '/api/v1/{region}/bean/
|
|
1589
|
+
url: '/api/v1/{region}/bean/prices',
|
|
1530
1590
|
path: {
|
|
1531
1591
|
region: data.region
|
|
1532
1592
|
},
|
|
1533
1593
|
body: data.requestBody,
|
|
1534
1594
|
mediaType: 'application/json',
|
|
1535
1595
|
errors: {
|
|
1536
|
-
|
|
1537
|
-
409: '
|
|
1596
|
+
404: 'Currency or quoteCurrency commodity not found',
|
|
1597
|
+
409: 'Price already exists for this currency pair and date'
|
|
1538
1598
|
}
|
|
1539
1599
|
});
|
|
1540
1600
|
}
|
|
1541
1601
|
|
|
1542
1602
|
/**
|
|
1543
|
-
* List
|
|
1544
|
-
* Returns all
|
|
1603
|
+
* List user prices
|
|
1604
|
+
* Returns all price entries for the authenticated user with optional filtering
|
|
1545
1605
|
* @param data The data for the request.
|
|
1546
1606
|
* @param data.region Region code for tenant context
|
|
1547
|
-
* @param data.
|
|
1548
|
-
* @param data.
|
|
1549
|
-
* @param data.
|
|
1550
|
-
* @
|
|
1607
|
+
* @param data.currency Filter by currency (e.g., BTC, AAPL, USD)
|
|
1608
|
+
* @param data.quoteCurrency Filter by quote currency (pricing currency, e.g., USD, CNY)
|
|
1609
|
+
* @param data.dateFrom Filter prices from this date (ISO 8601 format)
|
|
1610
|
+
* @param data.dateTo Filter prices to this date (ISO 8601 format)
|
|
1611
|
+
* @param data.search Search term for currency or quoteCurrency (case-insensitive partial match)
|
|
1612
|
+
* @param data.page Page number for pagination (default: 1)
|
|
1613
|
+
* @param data.limit Number of items per page (default: 20, max: 100)
|
|
1614
|
+
* @returns PriceListResponseDto Prices retrieved successfully
|
|
1551
1615
|
* @throws ApiError
|
|
1552
1616
|
*/
|
|
1553
|
-
public static
|
|
1554
|
-
data:
|
|
1555
|
-
): CancelablePromise<
|
|
1617
|
+
public static priceControllerFindAll(
|
|
1618
|
+
data: PriceControllerFindAllData
|
|
1619
|
+
): CancelablePromise<PriceControllerFindAllResponse> {
|
|
1556
1620
|
return __request(OpenAPI, {
|
|
1557
1621
|
method: 'GET',
|
|
1558
|
-
url: '/api/v1/{region}/bean/
|
|
1622
|
+
url: '/api/v1/{region}/bean/prices',
|
|
1559
1623
|
path: {
|
|
1560
1624
|
region: data.region
|
|
1561
1625
|
},
|
|
1562
1626
|
query: {
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1627
|
+
currency: data.currency,
|
|
1628
|
+
quoteCurrency: data.quoteCurrency,
|
|
1629
|
+
dateFrom: data.dateFrom,
|
|
1630
|
+
dateTo: data.dateTo,
|
|
1631
|
+
search: data.search,
|
|
1632
|
+
page: data.page,
|
|
1633
|
+
limit: data.limit
|
|
1566
1634
|
}
|
|
1567
1635
|
});
|
|
1568
1636
|
}
|
|
1569
1637
|
|
|
1570
1638
|
/**
|
|
1571
|
-
*
|
|
1572
|
-
*
|
|
1639
|
+
* Get price by ID
|
|
1640
|
+
* Returns a single price entry by its ID
|
|
1573
1641
|
* @param data The data for the request.
|
|
1574
|
-
* @param data.
|
|
1642
|
+
* @param data.id Price ID
|
|
1575
1643
|
* @param data.region Region code for tenant context
|
|
1576
|
-
* @
|
|
1577
|
-
* @returns RecurringRuleResponseDto Rule created successfully
|
|
1644
|
+
* @returns PriceResponseDto Price retrieved successfully
|
|
1578
1645
|
* @throws ApiError
|
|
1579
1646
|
*/
|
|
1580
|
-
public static
|
|
1581
|
-
data:
|
|
1582
|
-
): CancelablePromise<
|
|
1647
|
+
public static priceControllerFindOne(
|
|
1648
|
+
data: PriceControllerFindOneData
|
|
1649
|
+
): CancelablePromise<PriceControllerFindOneResponse> {
|
|
1583
1650
|
return __request(OpenAPI, {
|
|
1584
|
-
method: '
|
|
1585
|
-
url: '/api/v1/{region}/bean/
|
|
1651
|
+
method: 'GET',
|
|
1652
|
+
url: '/api/v1/{region}/bean/prices/{id}',
|
|
1586
1653
|
path: {
|
|
1587
|
-
|
|
1654
|
+
id: data.id,
|
|
1588
1655
|
region: data.region
|
|
1589
1656
|
},
|
|
1590
|
-
body: data.requestBody,
|
|
1591
|
-
mediaType: 'application/json',
|
|
1592
1657
|
errors: {
|
|
1593
|
-
404: '
|
|
1594
|
-
409: 'Rule with same name already exists or transaction already linked'
|
|
1658
|
+
404: 'Price not found'
|
|
1595
1659
|
}
|
|
1596
1660
|
});
|
|
1597
1661
|
}
|
|
1598
1662
|
|
|
1599
1663
|
/**
|
|
1600
|
-
*
|
|
1601
|
-
*
|
|
1664
|
+
* Update a price
|
|
1665
|
+
* Updates an existing price entry
|
|
1602
1666
|
* @param data The data for the request.
|
|
1603
|
-
* @param data.id
|
|
1667
|
+
* @param data.id Price ID
|
|
1604
1668
|
* @param data.region Region code for tenant context
|
|
1605
|
-
* @
|
|
1669
|
+
* @param data.requestBody
|
|
1670
|
+
* @returns PriceResponseDto Price updated successfully
|
|
1606
1671
|
* @throws ApiError
|
|
1607
1672
|
*/
|
|
1608
|
-
public static
|
|
1609
|
-
data:
|
|
1610
|
-
): CancelablePromise<
|
|
1673
|
+
public static priceControllerUpdate(
|
|
1674
|
+
data: PriceControllerUpdateData
|
|
1675
|
+
): CancelablePromise<PriceControllerUpdateResponse> {
|
|
1611
1676
|
return __request(OpenAPI, {
|
|
1612
|
-
method: '
|
|
1613
|
-
url: '/api/v1/{region}/bean/
|
|
1677
|
+
method: 'PUT',
|
|
1678
|
+
url: '/api/v1/{region}/bean/prices/{id}',
|
|
1614
1679
|
path: {
|
|
1615
1680
|
id: data.id,
|
|
1616
1681
|
region: data.region
|
|
1617
1682
|
},
|
|
1683
|
+
body: data.requestBody,
|
|
1684
|
+
mediaType: 'application/json',
|
|
1618
1685
|
errors: {
|
|
1619
|
-
404: '
|
|
1686
|
+
404: 'Price not found',
|
|
1687
|
+
409: 'Updated price conflicts with existing price'
|
|
1620
1688
|
}
|
|
1621
1689
|
});
|
|
1622
1690
|
}
|
|
1623
1691
|
|
|
1624
1692
|
/**
|
|
1625
|
-
*
|
|
1626
|
-
*
|
|
1693
|
+
* Delete a price
|
|
1694
|
+
* Deletes a price entry (hard delete)
|
|
1627
1695
|
* @param data The data for the request.
|
|
1628
|
-
* @param data.id
|
|
1696
|
+
* @param data.id Price ID
|
|
1629
1697
|
* @param data.region Region code for tenant context
|
|
1630
|
-
* @
|
|
1631
|
-
* @returns RecurringRuleResponseDto Rule updated successfully
|
|
1698
|
+
* @returns void Price deleted successfully
|
|
1632
1699
|
* @throws ApiError
|
|
1633
1700
|
*/
|
|
1634
|
-
public static
|
|
1635
|
-
data:
|
|
1636
|
-
): CancelablePromise<
|
|
1701
|
+
public static priceControllerDelete(
|
|
1702
|
+
data: PriceControllerDeleteData
|
|
1703
|
+
): CancelablePromise<PriceControllerDeleteResponse> {
|
|
1637
1704
|
return __request(OpenAPI, {
|
|
1638
|
-
method: '
|
|
1639
|
-
url: '/api/v1/{region}/bean/
|
|
1705
|
+
method: 'DELETE',
|
|
1706
|
+
url: '/api/v1/{region}/bean/prices/{id}',
|
|
1640
1707
|
path: {
|
|
1641
1708
|
id: data.id,
|
|
1642
1709
|
region: data.region
|
|
1643
1710
|
},
|
|
1644
|
-
body: data.requestBody,
|
|
1645
|
-
mediaType: 'application/json',
|
|
1646
1711
|
errors: {
|
|
1647
|
-
|
|
1648
|
-
404: 'Rule not found'
|
|
1712
|
+
404: 'Price not found'
|
|
1649
1713
|
}
|
|
1650
1714
|
});
|
|
1651
1715
|
}
|
|
1652
1716
|
|
|
1653
1717
|
/**
|
|
1654
|
-
*
|
|
1655
|
-
*
|
|
1718
|
+
* Bulk create prices
|
|
1719
|
+
* Creates multiple price entries at once (skips duplicates)
|
|
1656
1720
|
* @param data The data for the request.
|
|
1657
|
-
* @param data.
|
|
1721
|
+
* @param data.region Region code for tenant context
|
|
1722
|
+
* @param data.requestBody
|
|
1723
|
+
* @returns PriceResponseDto Prices created successfully
|
|
1724
|
+
* @throws ApiError
|
|
1725
|
+
*/
|
|
1726
|
+
public static priceControllerBulkCreate(
|
|
1727
|
+
data: PriceControllerBulkCreateData
|
|
1728
|
+
): CancelablePromise<PriceControllerBulkCreateResponse> {
|
|
1729
|
+
return __request(OpenAPI, {
|
|
1730
|
+
method: 'POST',
|
|
1731
|
+
url: '/api/v1/{region}/bean/prices/bulk',
|
|
1732
|
+
path: {
|
|
1733
|
+
region: data.region
|
|
1734
|
+
},
|
|
1735
|
+
body: data.requestBody,
|
|
1736
|
+
mediaType: 'application/json'
|
|
1737
|
+
});
|
|
1738
|
+
}
|
|
1739
|
+
}
|
|
1740
|
+
|
|
1741
|
+
export class RecurringRulesService {
|
|
1742
|
+
/**
|
|
1743
|
+
* Create a new recurring rule
|
|
1744
|
+
* Creates a new recurring transaction rule for the authenticated user
|
|
1745
|
+
* @param data The data for the request.
|
|
1746
|
+
* @param data.region Region code for tenant context
|
|
1747
|
+
* @param data.requestBody
|
|
1748
|
+
* @returns RecurringRuleResponseDto Rule created successfully
|
|
1749
|
+
* @throws ApiError
|
|
1750
|
+
*/
|
|
1751
|
+
public static recurringRuleControllerCreate(
|
|
1752
|
+
data: RecurringRuleControllerCreateData
|
|
1753
|
+
): CancelablePromise<RecurringRuleControllerCreateResponse> {
|
|
1754
|
+
return __request(OpenAPI, {
|
|
1755
|
+
method: 'POST',
|
|
1756
|
+
url: '/api/v1/{region}/bean/recurring-rules',
|
|
1757
|
+
path: {
|
|
1758
|
+
region: data.region
|
|
1759
|
+
},
|
|
1760
|
+
body: data.requestBody,
|
|
1761
|
+
mediaType: 'application/json',
|
|
1762
|
+
errors: {
|
|
1763
|
+
400: 'Invalid input data (e.g., autoCreate without accounts)',
|
|
1764
|
+
409: 'Rule with same name already exists'
|
|
1765
|
+
}
|
|
1766
|
+
});
|
|
1767
|
+
}
|
|
1768
|
+
|
|
1769
|
+
/**
|
|
1770
|
+
* List recurring rules
|
|
1771
|
+
* Returns all recurring rules for the authenticated user with optional filtering
|
|
1772
|
+
* @param data The data for the request.
|
|
1773
|
+
* @param data.region Region code for tenant context
|
|
1774
|
+
* @param data.isActive Filter by active status
|
|
1775
|
+
* @param data.frequency Filter by frequency (WEEKLY, MONTHLY, etc.)
|
|
1776
|
+
* @param data.hasAutoCreate Filter by autoCreate enabled
|
|
1777
|
+
* @returns RecurringRuleResponseDto Rules retrieved successfully
|
|
1778
|
+
* @throws ApiError
|
|
1779
|
+
*/
|
|
1780
|
+
public static recurringRuleControllerFindAll(
|
|
1781
|
+
data: RecurringRuleControllerFindAllData
|
|
1782
|
+
): CancelablePromise<RecurringRuleControllerFindAllResponse> {
|
|
1783
|
+
return __request(OpenAPI, {
|
|
1784
|
+
method: 'GET',
|
|
1785
|
+
url: '/api/v1/{region}/bean/recurring-rules',
|
|
1786
|
+
path: {
|
|
1787
|
+
region: data.region
|
|
1788
|
+
},
|
|
1789
|
+
query: {
|
|
1790
|
+
isActive: data.isActive,
|
|
1791
|
+
frequency: data.frequency,
|
|
1792
|
+
hasAutoCreate: data.hasAutoCreate
|
|
1793
|
+
}
|
|
1794
|
+
});
|
|
1795
|
+
}
|
|
1796
|
+
|
|
1797
|
+
/**
|
|
1798
|
+
* Create recurring rule from transaction
|
|
1799
|
+
* Auto-creates a recurring rule using transaction data. User only confirms frequency.
|
|
1800
|
+
* @param data The data for the request.
|
|
1801
|
+
* @param data.transactionId Source transaction ID
|
|
1802
|
+
* @param data.region Region code for tenant context
|
|
1803
|
+
* @param data.requestBody
|
|
1804
|
+
* @returns RecurringRuleResponseDto Rule created successfully
|
|
1805
|
+
* @throws ApiError
|
|
1806
|
+
*/
|
|
1807
|
+
public static recurringRuleControllerCreateFromTransaction(
|
|
1808
|
+
data: RecurringRuleControllerCreateFromTransactionData
|
|
1809
|
+
): CancelablePromise<RecurringRuleControllerCreateFromTransactionResponse> {
|
|
1810
|
+
return __request(OpenAPI, {
|
|
1811
|
+
method: 'POST',
|
|
1812
|
+
url: '/api/v1/{region}/bean/recurring-rules/from-transaction/{transactionId}',
|
|
1813
|
+
path: {
|
|
1814
|
+
transactionId: data.transactionId,
|
|
1815
|
+
region: data.region
|
|
1816
|
+
},
|
|
1817
|
+
body: data.requestBody,
|
|
1818
|
+
mediaType: 'application/json',
|
|
1819
|
+
errors: {
|
|
1820
|
+
404: 'Transaction not found',
|
|
1821
|
+
409: 'Rule with same name already exists or transaction already linked'
|
|
1822
|
+
}
|
|
1823
|
+
});
|
|
1824
|
+
}
|
|
1825
|
+
|
|
1826
|
+
/**
|
|
1827
|
+
* Get recurring rule by ID
|
|
1828
|
+
* Returns a specific recurring rule with its details
|
|
1829
|
+
* @param data The data for the request.
|
|
1830
|
+
* @param data.id Rule ID
|
|
1831
|
+
* @param data.region Region code for tenant context
|
|
1832
|
+
* @returns RecurringRuleResponseDto Rule retrieved successfully
|
|
1833
|
+
* @throws ApiError
|
|
1834
|
+
*/
|
|
1835
|
+
public static recurringRuleControllerFindOne(
|
|
1836
|
+
data: RecurringRuleControllerFindOneData
|
|
1837
|
+
): CancelablePromise<RecurringRuleControllerFindOneResponse> {
|
|
1838
|
+
return __request(OpenAPI, {
|
|
1839
|
+
method: 'GET',
|
|
1840
|
+
url: '/api/v1/{region}/bean/recurring-rules/{id}',
|
|
1841
|
+
path: {
|
|
1842
|
+
id: data.id,
|
|
1843
|
+
region: data.region
|
|
1844
|
+
},
|
|
1845
|
+
errors: {
|
|
1846
|
+
404: 'Rule not found'
|
|
1847
|
+
}
|
|
1848
|
+
});
|
|
1849
|
+
}
|
|
1850
|
+
|
|
1851
|
+
/**
|
|
1852
|
+
* Update recurring rule
|
|
1853
|
+
* Updates an existing recurring rule
|
|
1854
|
+
* @param data The data for the request.
|
|
1855
|
+
* @param data.id Rule ID
|
|
1856
|
+
* @param data.region Region code for tenant context
|
|
1857
|
+
* @param data.requestBody
|
|
1858
|
+
* @returns RecurringRuleResponseDto Rule updated successfully
|
|
1859
|
+
* @throws ApiError
|
|
1860
|
+
*/
|
|
1861
|
+
public static recurringRuleControllerUpdate(
|
|
1862
|
+
data: RecurringRuleControllerUpdateData
|
|
1863
|
+
): CancelablePromise<RecurringRuleControllerUpdateResponse> {
|
|
1864
|
+
return __request(OpenAPI, {
|
|
1865
|
+
method: 'PATCH',
|
|
1866
|
+
url: '/api/v1/{region}/bean/recurring-rules/{id}',
|
|
1867
|
+
path: {
|
|
1868
|
+
id: data.id,
|
|
1869
|
+
region: data.region
|
|
1870
|
+
},
|
|
1871
|
+
body: data.requestBody,
|
|
1872
|
+
mediaType: 'application/json',
|
|
1873
|
+
errors: {
|
|
1874
|
+
400: 'Invalid input data',
|
|
1875
|
+
404: 'Rule not found'
|
|
1876
|
+
}
|
|
1877
|
+
});
|
|
1878
|
+
}
|
|
1879
|
+
|
|
1880
|
+
/**
|
|
1881
|
+
* Delete recurring rule
|
|
1882
|
+
* Soft deletes a recurring rule (sets isActive to false)
|
|
1883
|
+
* @param data The data for the request.
|
|
1884
|
+
* @param data.id Rule ID
|
|
1658
1885
|
* @param data.region Region code for tenant context
|
|
1659
1886
|
* @returns void Rule deleted successfully
|
|
1660
1887
|
* @throws ApiError
|
|
@@ -1941,279 +2168,158 @@ export class RecurringForecastService {
|
|
|
1941
2168
|
}
|
|
1942
2169
|
}
|
|
1943
2170
|
|
|
1944
|
-
export class
|
|
2171
|
+
export class ReportingService {
|
|
1945
2172
|
/**
|
|
1946
|
-
*
|
|
1947
|
-
*
|
|
2173
|
+
* Get portfolio value trends
|
|
2174
|
+
*
|
|
2175
|
+
* Returns time series data of portfolio net worth.
|
|
2176
|
+
*
|
|
2177
|
+
* **Multi-currency Support:**
|
|
2178
|
+
* - `series[].byCurrency` - Currency breakdown for each data point
|
|
2179
|
+
* - `byCurrency` - Separate time series grouped by currency
|
|
2180
|
+
* - `warnings` - Exchange rate warnings if conversion failed
|
|
2181
|
+
*
|
|
2182
|
+
* **Parameters:**
|
|
2183
|
+
* - `period`: Time period (1m, 3m, 6m, 1y)
|
|
2184
|
+
* - `granularity`: Data granularity (day, week, month)
|
|
2185
|
+
*
|
|
1948
2186
|
* @param data The data for the request.
|
|
1949
2187
|
* @param data.region Region code for tenant context
|
|
1950
|
-
* @param data.
|
|
1951
|
-
* @
|
|
2188
|
+
* @param data.period Time period
|
|
2189
|
+
* @param data.granularity Data granularity
|
|
2190
|
+
* @returns PortfolioTrendsResponseDto Trends retrieved successfully
|
|
1952
2191
|
* @throws ApiError
|
|
1953
2192
|
*/
|
|
1954
|
-
public static
|
|
1955
|
-
data:
|
|
1956
|
-
): CancelablePromise<
|
|
2193
|
+
public static reportingControllerGetPortfolioTrends(
|
|
2194
|
+
data: ReportingControllerGetPortfolioTrendsData
|
|
2195
|
+
): CancelablePromise<ReportingControllerGetPortfolioTrendsResponse> {
|
|
1957
2196
|
return __request(OpenAPI, {
|
|
1958
|
-
method: '
|
|
1959
|
-
url: '/api/v1/{region}/
|
|
2197
|
+
method: 'GET',
|
|
2198
|
+
url: '/api/v1/{region}/reporting/portfolio/trends',
|
|
1960
2199
|
path: {
|
|
1961
2200
|
region: data.region
|
|
1962
2201
|
},
|
|
1963
|
-
|
|
1964
|
-
|
|
2202
|
+
query: {
|
|
2203
|
+
period: data.period,
|
|
2204
|
+
granularity: data.granularity
|
|
2205
|
+
},
|
|
1965
2206
|
errors: {
|
|
1966
|
-
|
|
1967
|
-
401: 'Unauthorized',
|
|
1968
|
-
409: 'Resource conflict - another process is updating this rule'
|
|
2207
|
+
401: 'User not authenticated'
|
|
1969
2208
|
}
|
|
1970
2209
|
});
|
|
1971
2210
|
}
|
|
1972
2211
|
|
|
1973
2212
|
/**
|
|
1974
|
-
* Get
|
|
2213
|
+
* Get cash-flow trends
|
|
2214
|
+
*
|
|
2215
|
+
* Monthly income / expense / netSavings over a fixed N-month window
|
|
2216
|
+
* (current month + N−1 prior). Missing months are zero-filled (flow metric).
|
|
2217
|
+
*
|
|
2218
|
+
* **Parameters:**
|
|
2219
|
+
* - `period`: 1m | 3m | 6m | 1y (default 6m)
|
|
2220
|
+
* - `granularity`: accepted for API symmetry; v1 returns month buckets
|
|
2221
|
+
*
|
|
1975
2222
|
* @param data The data for the request.
|
|
1976
2223
|
* @param data.region Region code for tenant context
|
|
1977
|
-
* @param data.
|
|
1978
|
-
* @param data.
|
|
1979
|
-
* @
|
|
1980
|
-
* @param data.learningSource Filter by learning source. Omit this parameter or pass empty string to get manually created rules (learningSource is null in database).
|
|
1981
|
-
* @param data.autoApplyEnabled Filter by auto-apply status
|
|
1982
|
-
* @returns TransactionRuleListResponseDto List of rules
|
|
2224
|
+
* @param data.period Time period
|
|
2225
|
+
* @param data.granularity Data granularity (accepted for API symmetry; v1 returns month buckets)
|
|
2226
|
+
* @returns CashFlowTrendsResponseDto Cash-flow trends retrieved successfully
|
|
1983
2227
|
* @throws ApiError
|
|
1984
2228
|
*/
|
|
1985
|
-
public static
|
|
1986
|
-
data:
|
|
1987
|
-
): CancelablePromise<
|
|
2229
|
+
public static reportingControllerGetCashFlowTrends(
|
|
2230
|
+
data: ReportingControllerGetCashFlowTrendsData
|
|
2231
|
+
): CancelablePromise<ReportingControllerGetCashFlowTrendsResponse> {
|
|
1988
2232
|
return __request(OpenAPI, {
|
|
1989
2233
|
method: 'GET',
|
|
1990
|
-
url: '/api/v1/{region}/
|
|
2234
|
+
url: '/api/v1/{region}/reporting/cash-flow/trends',
|
|
1991
2235
|
path: {
|
|
1992
2236
|
region: data.region
|
|
1993
2237
|
},
|
|
1994
2238
|
query: {
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
enabled: data.enabled,
|
|
1998
|
-
learningSource: data.learningSource,
|
|
1999
|
-
autoApplyEnabled: data.autoApplyEnabled
|
|
2239
|
+
period: data.period,
|
|
2240
|
+
granularity: data.granularity
|
|
2000
2241
|
},
|
|
2001
2242
|
errors: {
|
|
2002
|
-
401: '
|
|
2243
|
+
401: 'User not authenticated'
|
|
2003
2244
|
}
|
|
2004
2245
|
});
|
|
2005
2246
|
}
|
|
2006
2247
|
|
|
2007
2248
|
/**
|
|
2008
|
-
*
|
|
2009
|
-
*
|
|
2010
|
-
*
|
|
2011
|
-
*
|
|
2012
|
-
*
|
|
2013
|
-
*
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
region: data.region
|
|
2023
|
-
},
|
|
2024
|
-
body: data.requestBody,
|
|
2025
|
-
mediaType: 'application/json',
|
|
2026
|
-
errors: {
|
|
2027
|
-
400: 'Validation failed',
|
|
2028
|
-
401: 'Unauthorized'
|
|
2029
|
-
}
|
|
2030
|
-
});
|
|
2031
|
-
}
|
|
2032
|
-
|
|
2033
|
-
/**
|
|
2034
|
-
* Bulk create transaction rules
|
|
2249
|
+
* Generate portfolio snapshot
|
|
2250
|
+
*
|
|
2251
|
+
* Manually generate a portfolio snapshot for a specific date.
|
|
2252
|
+
*
|
|
2253
|
+
* **Multi-currency Support:**
|
|
2254
|
+
* - Fetches balances grouped by currency
|
|
2255
|
+
* - Uses user's baseCurrency setting for conversion
|
|
2256
|
+
* - Stores exchange rates and warnings
|
|
2257
|
+
*
|
|
2258
|
+
* **Use Cases:**
|
|
2259
|
+
* - Testing snapshot generation
|
|
2260
|
+
* - Force regeneration after data correction
|
|
2261
|
+
* - Initial setup for new users
|
|
2262
|
+
*
|
|
2035
2263
|
* @param data The data for the request.
|
|
2036
2264
|
* @param data.region Region code for tenant context
|
|
2037
|
-
* @param data.requestBody
|
|
2038
|
-
* @returns
|
|
2265
|
+
* @param data.requestBody Optional date (defaults to today)
|
|
2266
|
+
* @returns GenerateSnapshotResponse Snapshot generated successfully
|
|
2039
2267
|
* @throws ApiError
|
|
2040
2268
|
*/
|
|
2041
|
-
public static
|
|
2042
|
-
data:
|
|
2043
|
-
): CancelablePromise<
|
|
2269
|
+
public static reportingControllerGenerateSnapshot(
|
|
2270
|
+
data: ReportingControllerGenerateSnapshotData
|
|
2271
|
+
): CancelablePromise<ReportingControllerGenerateSnapshotResponse> {
|
|
2044
2272
|
return __request(OpenAPI, {
|
|
2045
2273
|
method: 'POST',
|
|
2046
|
-
url: '/api/v1/{region}/
|
|
2047
|
-
path: {
|
|
2048
|
-
region: data.region
|
|
2049
|
-
},
|
|
2050
|
-
body: data.requestBody,
|
|
2051
|
-
mediaType: 'application/json',
|
|
2052
|
-
errors: {
|
|
2053
|
-
400: 'Invalid bulk create data',
|
|
2054
|
-
401: 'Unauthorized'
|
|
2055
|
-
}
|
|
2056
|
-
});
|
|
2057
|
-
}
|
|
2058
|
-
|
|
2059
|
-
/**
|
|
2060
|
-
* Export transaction rules
|
|
2061
|
-
* @param data The data for the request.
|
|
2062
|
-
* @param data.format Export format (currently only JSON supported)
|
|
2063
|
-
* @param data.region Region code for tenant context
|
|
2064
|
-
* @returns ExportRulesResponseDto Exported rules
|
|
2065
|
-
* @throws ApiError
|
|
2066
|
-
*/
|
|
2067
|
-
public static transactionRuleControllerExport(
|
|
2068
|
-
data: TransactionRuleControllerExportData
|
|
2069
|
-
): CancelablePromise<TransactionRuleControllerExportResponse> {
|
|
2070
|
-
return __request(OpenAPI, {
|
|
2071
|
-
method: 'GET',
|
|
2072
|
-
url: '/api/v1/{region}/bean/transaction-rules/export/{format}',
|
|
2073
|
-
path: {
|
|
2074
|
-
format: data.format,
|
|
2075
|
-
region: data.region
|
|
2076
|
-
},
|
|
2077
|
-
errors: {
|
|
2078
|
-
400: 'Unsupported format',
|
|
2079
|
-
401: 'Unauthorized'
|
|
2080
|
-
}
|
|
2081
|
-
});
|
|
2082
|
-
}
|
|
2083
|
-
|
|
2084
|
-
/**
|
|
2085
|
-
* Get transaction rule statistics
|
|
2086
|
-
* @param data The data for the request.
|
|
2087
|
-
* @param data.period Statistics time period
|
|
2088
|
-
* @param data.region Region code for tenant context
|
|
2089
|
-
* @returns RuleStatisticsResponseDto Rule statistics
|
|
2090
|
-
* @throws ApiError
|
|
2091
|
-
*/
|
|
2092
|
-
public static transactionRuleControllerGetStatistics(
|
|
2093
|
-
data: TransactionRuleControllerGetStatisticsData
|
|
2094
|
-
): CancelablePromise<TransactionRuleControllerGetStatisticsResponse> {
|
|
2095
|
-
return __request(OpenAPI, {
|
|
2096
|
-
method: 'GET',
|
|
2097
|
-
url: '/api/v1/{region}/bean/transaction-rules/statistics/{period}',
|
|
2098
|
-
path: {
|
|
2099
|
-
period: data.period,
|
|
2100
|
-
region: data.region
|
|
2101
|
-
},
|
|
2102
|
-
errors: {
|
|
2103
|
-
401: 'Unauthorized'
|
|
2104
|
-
}
|
|
2105
|
-
});
|
|
2106
|
-
}
|
|
2107
|
-
|
|
2108
|
-
/**
|
|
2109
|
-
* Get transaction rule detail
|
|
2110
|
-
* @param data The data for the request.
|
|
2111
|
-
* @param data.ruleId Rule ID
|
|
2112
|
-
* @param data.region Region code for tenant context
|
|
2113
|
-
* @returns TransactionRuleResponseDto Rule details
|
|
2114
|
-
* @throws ApiError
|
|
2115
|
-
*/
|
|
2116
|
-
public static transactionRuleControllerGetDetail(
|
|
2117
|
-
data: TransactionRuleControllerGetDetailData
|
|
2118
|
-
): CancelablePromise<TransactionRuleControllerGetDetailResponse> {
|
|
2119
|
-
return __request(OpenAPI, {
|
|
2120
|
-
method: 'GET',
|
|
2121
|
-
url: '/api/v1/{region}/bean/transaction-rules/{ruleId}',
|
|
2122
|
-
path: {
|
|
2123
|
-
ruleId: data.ruleId,
|
|
2124
|
-
region: data.region
|
|
2125
|
-
},
|
|
2126
|
-
errors: {
|
|
2127
|
-
401: 'Unauthorized',
|
|
2128
|
-
403: 'Forbidden - not owner of rule',
|
|
2129
|
-
404: 'Rule not found'
|
|
2130
|
-
}
|
|
2131
|
-
});
|
|
2132
|
-
}
|
|
2133
|
-
|
|
2134
|
-
/**
|
|
2135
|
-
* Update a transaction rule
|
|
2136
|
-
* @param data The data for the request.
|
|
2137
|
-
* @param data.ruleId Rule ID to update
|
|
2138
|
-
* @param data.region Region code for tenant context
|
|
2139
|
-
* @param data.requestBody
|
|
2140
|
-
* @returns TransactionRuleResponseDto Rule updated successfully
|
|
2141
|
-
* @throws ApiError
|
|
2142
|
-
*/
|
|
2143
|
-
public static transactionRuleControllerUpdate(
|
|
2144
|
-
data: TransactionRuleControllerUpdateData
|
|
2145
|
-
): CancelablePromise<TransactionRuleControllerUpdateResponse> {
|
|
2146
|
-
return __request(OpenAPI, {
|
|
2147
|
-
method: 'PUT',
|
|
2148
|
-
url: '/api/v1/{region}/bean/transaction-rules/{ruleId}',
|
|
2274
|
+
url: '/api/v1/{region}/reporting/snapshots/generate',
|
|
2149
2275
|
path: {
|
|
2150
|
-
ruleId: data.ruleId,
|
|
2151
2276
|
region: data.region
|
|
2152
2277
|
},
|
|
2153
2278
|
body: data.requestBody,
|
|
2154
2279
|
mediaType: 'application/json',
|
|
2155
2280
|
errors: {
|
|
2156
|
-
400: '
|
|
2157
|
-
401: '
|
|
2158
|
-
403: 'Forbidden - not owner of rule',
|
|
2159
|
-
404: 'Rule not found',
|
|
2160
|
-
409: 'Resource conflict - rule is being modified by another process'
|
|
2161
|
-
}
|
|
2162
|
-
});
|
|
2163
|
-
}
|
|
2164
|
-
|
|
2165
|
-
/**
|
|
2166
|
-
* Delete a transaction rule
|
|
2167
|
-
* @param data The data for the request.
|
|
2168
|
-
* @param data.ruleId Rule ID to delete
|
|
2169
|
-
* @param data.region Region code for tenant context
|
|
2170
|
-
* @returns void Rule deleted successfully
|
|
2171
|
-
* @throws ApiError
|
|
2172
|
-
*/
|
|
2173
|
-
public static transactionRuleControllerDelete(
|
|
2174
|
-
data: TransactionRuleControllerDeleteData
|
|
2175
|
-
): CancelablePromise<TransactionRuleControllerDeleteResponse> {
|
|
2176
|
-
return __request(OpenAPI, {
|
|
2177
|
-
method: 'DELETE',
|
|
2178
|
-
url: '/api/v1/{region}/bean/transaction-rules/{ruleId}',
|
|
2179
|
-
path: {
|
|
2180
|
-
ruleId: data.ruleId,
|
|
2181
|
-
region: data.region
|
|
2182
|
-
},
|
|
2183
|
-
errors: {
|
|
2184
|
-
401: 'Unauthorized',
|
|
2185
|
-
403: 'Forbidden - not owner of rule',
|
|
2186
|
-
404: 'Rule not found',
|
|
2187
|
-
409: 'Resource conflict - rule is being modified by another process'
|
|
2281
|
+
400: 'Invalid date format',
|
|
2282
|
+
401: 'User not authenticated'
|
|
2188
2283
|
}
|
|
2189
2284
|
});
|
|
2190
2285
|
}
|
|
2191
2286
|
|
|
2192
2287
|
/**
|
|
2193
|
-
*
|
|
2288
|
+
* Backfill portfolio snapshots
|
|
2289
|
+
*
|
|
2290
|
+
* Generate snapshots for a date range (historical data backfill).
|
|
2291
|
+
*
|
|
2292
|
+
* **Multi-currency Support:**
|
|
2293
|
+
* - Each snapshot includes multi-currency data
|
|
2294
|
+
* - Uses exchange rates available at generation time
|
|
2295
|
+
* - Warnings stored for missing exchange rates
|
|
2296
|
+
*
|
|
2297
|
+
* **Best Practices:**
|
|
2298
|
+
* - Use for initial setup after account configuration
|
|
2299
|
+
* - Run during low-traffic periods for large date ranges
|
|
2300
|
+
* - Existing snapshots are skipped (not regenerated)
|
|
2301
|
+
*
|
|
2194
2302
|
* @param data The data for the request.
|
|
2195
|
-
* @param data.ruleId Rule ID to test
|
|
2196
2303
|
* @param data.region Region code for tenant context
|
|
2197
2304
|
* @param data.requestBody
|
|
2198
|
-
* @returns
|
|
2305
|
+
* @returns BackfillSnapshotsResponse Backfill completed successfully
|
|
2199
2306
|
* @throws ApiError
|
|
2200
2307
|
*/
|
|
2201
|
-
public static
|
|
2202
|
-
data:
|
|
2203
|
-
): CancelablePromise<
|
|
2308
|
+
public static reportingControllerBackfillSnapshots(
|
|
2309
|
+
data: ReportingControllerBackfillSnapshotsData
|
|
2310
|
+
): CancelablePromise<ReportingControllerBackfillSnapshotsResponse> {
|
|
2204
2311
|
return __request(OpenAPI, {
|
|
2205
2312
|
method: 'POST',
|
|
2206
|
-
url: '/api/v1/{region}/
|
|
2313
|
+
url: '/api/v1/{region}/reporting/snapshots/backfill',
|
|
2207
2314
|
path: {
|
|
2208
|
-
ruleId: data.ruleId,
|
|
2209
2315
|
region: data.region
|
|
2210
2316
|
},
|
|
2211
2317
|
body: data.requestBody,
|
|
2212
2318
|
mediaType: 'application/json',
|
|
2213
2319
|
errors: {
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2320
|
+
400: 'Invalid date format or range',
|
|
2321
|
+
401: 'User not authenticated',
|
|
2322
|
+
409: 'Backfill already in progress for this user'
|
|
2217
2323
|
}
|
|
2218
2324
|
});
|
|
2219
2325
|
}
|
|
@@ -2245,7 +2351,7 @@ export class UsersService {
|
|
|
2245
2351
|
* Get current authenticated user
|
|
2246
2352
|
* @param data The data for the request.
|
|
2247
2353
|
* @param data.acceptLanguage
|
|
2248
|
-
* @returns
|
|
2354
|
+
* @returns UserResponseDto User retrieved successfully
|
|
2249
2355
|
* @throws ApiError
|
|
2250
2356
|
*/
|
|
2251
2357
|
public static userControllerGetUser(
|
|
@@ -2265,7 +2371,7 @@ export class UsersService {
|
|
|
2265
2371
|
* Create a new account with auto-generated access token. Protected by Cloudflare Turnstile to prevent automated signup (when enabled).
|
|
2266
2372
|
* @param data The data for the request.
|
|
2267
2373
|
* @param data.requestBody
|
|
2268
|
-
* @returns
|
|
2374
|
+
* @returns SignupResponseDto User created successfully
|
|
2269
2375
|
* @throws ApiError
|
|
2270
2376
|
*/
|
|
2271
2377
|
public static userControllerSignupUser(
|
|
@@ -2474,53 +2580,359 @@ export class PropertiesService {
|
|
|
2474
2580
|
}
|
|
2475
2581
|
}
|
|
2476
2582
|
|
|
2477
|
-
export class
|
|
2583
|
+
export class BeanTransactionRulesService {
|
|
2478
2584
|
/**
|
|
2479
|
-
* Create a new
|
|
2480
|
-
* Creates a new
|
|
2585
|
+
* Create a new transaction rule (or upsert if upsertByPayee=true)
|
|
2586
|
+
* Creates a new rule. If upsertByPayee=true, updates existing rule matching payeeKeywords[0] instead of creating duplicate.
|
|
2481
2587
|
* @param data The data for the request.
|
|
2482
|
-
* @param data.region Region code for tenant context
|
|
2588
|
+
* @param data.region Region code for tenant context
|
|
2483
2589
|
* @param data.requestBody
|
|
2484
|
-
* @returns
|
|
2590
|
+
* @returns TransactionRuleResponseDto Rule updated successfully (upsert mode)
|
|
2485
2591
|
* @throws ApiError
|
|
2486
2592
|
*/
|
|
2487
|
-
public static
|
|
2488
|
-
data:
|
|
2489
|
-
): CancelablePromise<
|
|
2593
|
+
public static transactionRuleControllerCreate(
|
|
2594
|
+
data: TransactionRuleControllerCreateData
|
|
2595
|
+
): CancelablePromise<TransactionRuleControllerCreateResponse> {
|
|
2490
2596
|
return __request(OpenAPI, {
|
|
2491
2597
|
method: 'POST',
|
|
2492
|
-
url: '/api/v1/{region}/bean/
|
|
2598
|
+
url: '/api/v1/{region}/bean/transaction-rules',
|
|
2493
2599
|
path: {
|
|
2494
2600
|
region: data.region
|
|
2495
2601
|
},
|
|
2496
2602
|
body: data.requestBody,
|
|
2497
2603
|
mediaType: 'application/json',
|
|
2498
2604
|
errors: {
|
|
2499
|
-
|
|
2605
|
+
400: 'Validation failed',
|
|
2606
|
+
401: 'Unauthorized',
|
|
2607
|
+
409: 'Resource conflict - another process is updating this rule'
|
|
2500
2608
|
}
|
|
2501
2609
|
});
|
|
2502
2610
|
}
|
|
2503
2611
|
|
|
2504
2612
|
/**
|
|
2505
|
-
*
|
|
2506
|
-
* Returns life events for the authenticated user with optional filtering by type, description search, and date range.
|
|
2613
|
+
* Get all transaction rules for user
|
|
2507
2614
|
* @param data The data for the request.
|
|
2508
|
-
* @param data.region Region code for tenant context
|
|
2509
|
-
* @param data.
|
|
2510
|
-
* @param data.
|
|
2511
|
-
* @param data.
|
|
2512
|
-
* @param data.
|
|
2513
|
-
* @param data.
|
|
2514
|
-
* @
|
|
2515
|
-
* @returns EventListResponseDto Life events retrieved successfully
|
|
2615
|
+
* @param data.region Region code for tenant context
|
|
2616
|
+
* @param data.limit Max results per page (default: 20, max: 100)
|
|
2617
|
+
* @param data.offset Pagination offset (default: 0)
|
|
2618
|
+
* @param data.enabled Filter by enabled status
|
|
2619
|
+
* @param data.learningSource Filter by learning source. Omit this parameter or pass empty string to get manually created rules (learningSource is null in database).
|
|
2620
|
+
* @param data.autoApplyEnabled Filter by auto-apply status
|
|
2621
|
+
* @returns TransactionRuleListResponseDto List of rules
|
|
2516
2622
|
* @throws ApiError
|
|
2517
2623
|
*/
|
|
2518
|
-
public static
|
|
2519
|
-
data:
|
|
2520
|
-
): CancelablePromise<
|
|
2624
|
+
public static transactionRuleControllerList(
|
|
2625
|
+
data: TransactionRuleControllerListData
|
|
2626
|
+
): CancelablePromise<TransactionRuleControllerListResponse> {
|
|
2521
2627
|
return __request(OpenAPI, {
|
|
2522
2628
|
method: 'GET',
|
|
2523
|
-
url: '/api/v1/{region}/bean/
|
|
2629
|
+
url: '/api/v1/{region}/bean/transaction-rules',
|
|
2630
|
+
path: {
|
|
2631
|
+
region: data.region
|
|
2632
|
+
},
|
|
2633
|
+
query: {
|
|
2634
|
+
limit: data.limit,
|
|
2635
|
+
offset: data.offset,
|
|
2636
|
+
enabled: data.enabled,
|
|
2637
|
+
learningSource: data.learningSource,
|
|
2638
|
+
autoApplyEnabled: data.autoApplyEnabled
|
|
2639
|
+
},
|
|
2640
|
+
errors: {
|
|
2641
|
+
401: 'Unauthorized'
|
|
2642
|
+
}
|
|
2643
|
+
});
|
|
2644
|
+
}
|
|
2645
|
+
|
|
2646
|
+
/**
|
|
2647
|
+
* Validate transaction rule configuration
|
|
2648
|
+
* @param data The data for the request.
|
|
2649
|
+
* @param data.region Region code for tenant context
|
|
2650
|
+
* @param data.requestBody
|
|
2651
|
+
* @returns ValidateRuleResponseDto Validation result
|
|
2652
|
+
* @throws ApiError
|
|
2653
|
+
*/
|
|
2654
|
+
public static transactionRuleControllerValidate(
|
|
2655
|
+
data: TransactionRuleControllerValidateData
|
|
2656
|
+
): CancelablePromise<TransactionRuleControllerValidateResponse> {
|
|
2657
|
+
return __request(OpenAPI, {
|
|
2658
|
+
method: 'POST',
|
|
2659
|
+
url: '/api/v1/{region}/bean/transaction-rules/validate',
|
|
2660
|
+
path: {
|
|
2661
|
+
region: data.region
|
|
2662
|
+
},
|
|
2663
|
+
body: data.requestBody,
|
|
2664
|
+
mediaType: 'application/json',
|
|
2665
|
+
errors: {
|
|
2666
|
+
400: 'Validation failed',
|
|
2667
|
+
401: 'Unauthorized'
|
|
2668
|
+
}
|
|
2669
|
+
});
|
|
2670
|
+
}
|
|
2671
|
+
|
|
2672
|
+
/**
|
|
2673
|
+
* Bulk create transaction rules
|
|
2674
|
+
* @param data The data for the request.
|
|
2675
|
+
* @param data.region Region code for tenant context
|
|
2676
|
+
* @param data.requestBody
|
|
2677
|
+
* @returns BulkCreateRulesResponseDto Bulk create completed
|
|
2678
|
+
* @throws ApiError
|
|
2679
|
+
*/
|
|
2680
|
+
public static transactionRuleControllerBulkCreate(
|
|
2681
|
+
data: TransactionRuleControllerBulkCreateData
|
|
2682
|
+
): CancelablePromise<TransactionRuleControllerBulkCreateResponse> {
|
|
2683
|
+
return __request(OpenAPI, {
|
|
2684
|
+
method: 'POST',
|
|
2685
|
+
url: '/api/v1/{region}/bean/transaction-rules/bulk',
|
|
2686
|
+
path: {
|
|
2687
|
+
region: data.region
|
|
2688
|
+
},
|
|
2689
|
+
body: data.requestBody,
|
|
2690
|
+
mediaType: 'application/json',
|
|
2691
|
+
errors: {
|
|
2692
|
+
400: 'Invalid bulk create data',
|
|
2693
|
+
401: 'Unauthorized'
|
|
2694
|
+
}
|
|
2695
|
+
});
|
|
2696
|
+
}
|
|
2697
|
+
|
|
2698
|
+
/**
|
|
2699
|
+
* Export transaction rules
|
|
2700
|
+
* @param data The data for the request.
|
|
2701
|
+
* @param data.format Export format (currently only JSON supported)
|
|
2702
|
+
* @param data.region Region code for tenant context
|
|
2703
|
+
* @returns ExportRulesResponseDto Exported rules
|
|
2704
|
+
* @throws ApiError
|
|
2705
|
+
*/
|
|
2706
|
+
public static transactionRuleControllerExport(
|
|
2707
|
+
data: TransactionRuleControllerExportData
|
|
2708
|
+
): CancelablePromise<TransactionRuleControllerExportResponse> {
|
|
2709
|
+
return __request(OpenAPI, {
|
|
2710
|
+
method: 'GET',
|
|
2711
|
+
url: '/api/v1/{region}/bean/transaction-rules/export/{format}',
|
|
2712
|
+
path: {
|
|
2713
|
+
format: data.format,
|
|
2714
|
+
region: data.region
|
|
2715
|
+
},
|
|
2716
|
+
errors: {
|
|
2717
|
+
400: 'Unsupported format',
|
|
2718
|
+
401: 'Unauthorized'
|
|
2719
|
+
}
|
|
2720
|
+
});
|
|
2721
|
+
}
|
|
2722
|
+
|
|
2723
|
+
/**
|
|
2724
|
+
* Get transaction rule statistics
|
|
2725
|
+
* @param data The data for the request.
|
|
2726
|
+
* @param data.period Statistics time period
|
|
2727
|
+
* @param data.region Region code for tenant context
|
|
2728
|
+
* @returns RuleStatisticsResponseDto Rule statistics
|
|
2729
|
+
* @throws ApiError
|
|
2730
|
+
*/
|
|
2731
|
+
public static transactionRuleControllerGetStatistics(
|
|
2732
|
+
data: TransactionRuleControllerGetStatisticsData
|
|
2733
|
+
): CancelablePromise<TransactionRuleControllerGetStatisticsResponse> {
|
|
2734
|
+
return __request(OpenAPI, {
|
|
2735
|
+
method: 'GET',
|
|
2736
|
+
url: '/api/v1/{region}/bean/transaction-rules/statistics/{period}',
|
|
2737
|
+
path: {
|
|
2738
|
+
period: data.period,
|
|
2739
|
+
region: data.region
|
|
2740
|
+
},
|
|
2741
|
+
errors: {
|
|
2742
|
+
401: 'Unauthorized'
|
|
2743
|
+
}
|
|
2744
|
+
});
|
|
2745
|
+
}
|
|
2746
|
+
|
|
2747
|
+
/**
|
|
2748
|
+
* Get transaction rule detail
|
|
2749
|
+
* @param data The data for the request.
|
|
2750
|
+
* @param data.ruleId Rule ID
|
|
2751
|
+
* @param data.region Region code for tenant context
|
|
2752
|
+
* @returns TransactionRuleResponseDto Rule details
|
|
2753
|
+
* @throws ApiError
|
|
2754
|
+
*/
|
|
2755
|
+
public static transactionRuleControllerGetDetail(
|
|
2756
|
+
data: TransactionRuleControllerGetDetailData
|
|
2757
|
+
): CancelablePromise<TransactionRuleControllerGetDetailResponse> {
|
|
2758
|
+
return __request(OpenAPI, {
|
|
2759
|
+
method: 'GET',
|
|
2760
|
+
url: '/api/v1/{region}/bean/transaction-rules/{ruleId}',
|
|
2761
|
+
path: {
|
|
2762
|
+
ruleId: data.ruleId,
|
|
2763
|
+
region: data.region
|
|
2764
|
+
},
|
|
2765
|
+
errors: {
|
|
2766
|
+
401: 'Unauthorized',
|
|
2767
|
+
403: 'Forbidden - not owner of rule',
|
|
2768
|
+
404: 'Rule not found'
|
|
2769
|
+
}
|
|
2770
|
+
});
|
|
2771
|
+
}
|
|
2772
|
+
|
|
2773
|
+
/**
|
|
2774
|
+
* Update a transaction rule
|
|
2775
|
+
* @param data The data for the request.
|
|
2776
|
+
* @param data.ruleId Rule ID to update
|
|
2777
|
+
* @param data.region Region code for tenant context
|
|
2778
|
+
* @param data.requestBody
|
|
2779
|
+
* @returns TransactionRuleResponseDto Rule updated successfully
|
|
2780
|
+
* @throws ApiError
|
|
2781
|
+
*/
|
|
2782
|
+
public static transactionRuleControllerUpdate(
|
|
2783
|
+
data: TransactionRuleControllerUpdateData
|
|
2784
|
+
): CancelablePromise<TransactionRuleControllerUpdateResponse> {
|
|
2785
|
+
return __request(OpenAPI, {
|
|
2786
|
+
method: 'PUT',
|
|
2787
|
+
url: '/api/v1/{region}/bean/transaction-rules/{ruleId}',
|
|
2788
|
+
path: {
|
|
2789
|
+
ruleId: data.ruleId,
|
|
2790
|
+
region: data.region
|
|
2791
|
+
},
|
|
2792
|
+
body: data.requestBody,
|
|
2793
|
+
mediaType: 'application/json',
|
|
2794
|
+
errors: {
|
|
2795
|
+
400: 'Validation failed',
|
|
2796
|
+
401: 'Unauthorized',
|
|
2797
|
+
403: 'Forbidden - not owner of rule',
|
|
2798
|
+
404: 'Rule not found',
|
|
2799
|
+
409: 'Resource conflict - rule is being modified by another process'
|
|
2800
|
+
}
|
|
2801
|
+
});
|
|
2802
|
+
}
|
|
2803
|
+
|
|
2804
|
+
/**
|
|
2805
|
+
* Delete a transaction rule
|
|
2806
|
+
* @param data The data for the request.
|
|
2807
|
+
* @param data.ruleId Rule ID to delete
|
|
2808
|
+
* @param data.region Region code for tenant context
|
|
2809
|
+
* @returns void Rule deleted successfully
|
|
2810
|
+
* @throws ApiError
|
|
2811
|
+
*/
|
|
2812
|
+
public static transactionRuleControllerDelete(
|
|
2813
|
+
data: TransactionRuleControllerDeleteData
|
|
2814
|
+
): CancelablePromise<TransactionRuleControllerDeleteResponse> {
|
|
2815
|
+
return __request(OpenAPI, {
|
|
2816
|
+
method: 'DELETE',
|
|
2817
|
+
url: '/api/v1/{region}/bean/transaction-rules/{ruleId}',
|
|
2818
|
+
path: {
|
|
2819
|
+
ruleId: data.ruleId,
|
|
2820
|
+
region: data.region
|
|
2821
|
+
},
|
|
2822
|
+
errors: {
|
|
2823
|
+
401: 'Unauthorized',
|
|
2824
|
+
403: 'Forbidden - not owner of rule',
|
|
2825
|
+
404: 'Rule not found',
|
|
2826
|
+
409: 'Resource conflict - rule is being modified by another process'
|
|
2827
|
+
}
|
|
2828
|
+
});
|
|
2829
|
+
}
|
|
2830
|
+
|
|
2831
|
+
/**
|
|
2832
|
+
* Test rule matching
|
|
2833
|
+
* @param data The data for the request.
|
|
2834
|
+
* @param data.ruleId Rule ID to test
|
|
2835
|
+
* @param data.region Region code for tenant context
|
|
2836
|
+
* @param data.requestBody
|
|
2837
|
+
* @returns TestRuleResponseDto Test result
|
|
2838
|
+
* @throws ApiError
|
|
2839
|
+
*/
|
|
2840
|
+
public static transactionRuleControllerTest(
|
|
2841
|
+
data: TransactionRuleControllerTestData
|
|
2842
|
+
): CancelablePromise<TransactionRuleControllerTestResponse> {
|
|
2843
|
+
return __request(OpenAPI, {
|
|
2844
|
+
method: 'POST',
|
|
2845
|
+
url: '/api/v1/{region}/bean/transaction-rules/{ruleId}/test',
|
|
2846
|
+
path: {
|
|
2847
|
+
ruleId: data.ruleId,
|
|
2848
|
+
region: data.region
|
|
2849
|
+
},
|
|
2850
|
+
body: data.requestBody,
|
|
2851
|
+
mediaType: 'application/json',
|
|
2852
|
+
errors: {
|
|
2853
|
+
401: 'Unauthorized',
|
|
2854
|
+
403: 'Forbidden - not owner of rule',
|
|
2855
|
+
404: 'Rule not found'
|
|
2856
|
+
}
|
|
2857
|
+
});
|
|
2858
|
+
}
|
|
2859
|
+
}
|
|
2860
|
+
|
|
2861
|
+
export class BeanCategoryCatalogService {
|
|
2862
|
+
/**
|
|
2863
|
+
* List category catalog for a region
|
|
2864
|
+
* Returns the region-scoped category slugs (expense/income/investment/banking/transfer/payment) for the NLP result picker. CN-exclusive payment instruments (huabei/baitiao) appear only under /cn.
|
|
2865
|
+
* @param data The data for the request.
|
|
2866
|
+
* @param data.region Region code for tenant context
|
|
2867
|
+
* @param data.scenario Filter by scenario
|
|
2868
|
+
* @param data.routeBearing Filter by routeBearing (entity-router route() consumes it)
|
|
2869
|
+
* @returns CategoryCatalogListResponseDto Category catalog retrieved successfully
|
|
2870
|
+
* @throws ApiError
|
|
2871
|
+
*/
|
|
2872
|
+
public static categoryCatalogControllerList(
|
|
2873
|
+
data: CategoryCatalogControllerListData
|
|
2874
|
+
): CancelablePromise<CategoryCatalogControllerListResponse> {
|
|
2875
|
+
return __request(OpenAPI, {
|
|
2876
|
+
method: 'GET',
|
|
2877
|
+
url: '/api/v1/{region}/bean/categories',
|
|
2878
|
+
path: {
|
|
2879
|
+
region: data.region
|
|
2880
|
+
},
|
|
2881
|
+
query: {
|
|
2882
|
+
scenario: data.scenario,
|
|
2883
|
+
routeBearing: data.routeBearing
|
|
2884
|
+
}
|
|
2885
|
+
});
|
|
2886
|
+
}
|
|
2887
|
+
}
|
|
2888
|
+
|
|
2889
|
+
export class LifeEventsService {
|
|
2890
|
+
/**
|
|
2891
|
+
* Create a new life event
|
|
2892
|
+
* Creates a new life event entry for the authenticated user. Returns ETag header carrying the row updatedAt.
|
|
2893
|
+
* @param data The data for the request.
|
|
2894
|
+
* @param data.region Region code for tenant context (decorative for life events)
|
|
2895
|
+
* @param data.requestBody
|
|
2896
|
+
* @returns EventResponseDto Life event created successfully
|
|
2897
|
+
* @throws ApiError
|
|
2898
|
+
*/
|
|
2899
|
+
public static eventControllerCreate(
|
|
2900
|
+
data: EventControllerCreateData
|
|
2901
|
+
): CancelablePromise<EventControllerCreateResponse> {
|
|
2902
|
+
return __request(OpenAPI, {
|
|
2903
|
+
method: 'POST',
|
|
2904
|
+
url: '/api/v1/{region}/bean/events',
|
|
2905
|
+
path: {
|
|
2906
|
+
region: data.region
|
|
2907
|
+
},
|
|
2908
|
+
body: data.requestBody,
|
|
2909
|
+
mediaType: 'application/json',
|
|
2910
|
+
errors: {
|
|
2911
|
+
409: 'Life event already exists for this (userId, type, date) combination'
|
|
2912
|
+
}
|
|
2913
|
+
});
|
|
2914
|
+
}
|
|
2915
|
+
|
|
2916
|
+
/**
|
|
2917
|
+
* List user life events
|
|
2918
|
+
* Returns life events for the authenticated user with optional filtering by type, description search, and date range.
|
|
2919
|
+
* @param data The data for the request.
|
|
2920
|
+
* @param data.region Region code for tenant context (decorative for life events)
|
|
2921
|
+
* @param data.type Filter by life event type (exact match)
|
|
2922
|
+
* @param data.q Search term for description (case-insensitive partial match)
|
|
2923
|
+
* @param data.from Filter life events from this date (ISO 8601 format)
|
|
2924
|
+
* @param data.to Filter life events to this date (ISO 8601 format)
|
|
2925
|
+
* @param data.page Page number for pagination (default: 1)
|
|
2926
|
+
* @param data.limit Number of items per page (default: 20, max: 100)
|
|
2927
|
+
* @returns EventListResponseDto Life events retrieved successfully
|
|
2928
|
+
* @throws ApiError
|
|
2929
|
+
*/
|
|
2930
|
+
public static eventControllerFindAll(
|
|
2931
|
+
data: EventControllerFindAllData
|
|
2932
|
+
): CancelablePromise<EventControllerFindAllResponse> {
|
|
2933
|
+
return __request(OpenAPI, {
|
|
2934
|
+
method: 'GET',
|
|
2935
|
+
url: '/api/v1/{region}/bean/events',
|
|
2524
2936
|
path: {
|
|
2525
2937
|
region: data.region
|
|
2526
2938
|
},
|
|
@@ -2649,6 +3061,139 @@ export class LifeEventsService {
|
|
|
2649
3061
|
}
|
|
2650
3062
|
}
|
|
2651
3063
|
|
|
3064
|
+
export class OnboardingService {
|
|
3065
|
+
/**
|
|
3066
|
+
* Bootstrap core accounts + register asset accounts with opening balances (ADR-0113)
|
|
3067
|
+
* @param data The data for the request.
|
|
3068
|
+
* @param data.region Region code for tenant context
|
|
3069
|
+
* @param data.requestBody
|
|
3070
|
+
* @returns unknown Onboarding bootstrap result.
|
|
3071
|
+
* @throws ApiError
|
|
3072
|
+
*/
|
|
3073
|
+
public static onboardingControllerBootstrap(
|
|
3074
|
+
data: OnboardingControllerBootstrapData
|
|
3075
|
+
): CancelablePromise<OnboardingControllerBootstrapResponse> {
|
|
3076
|
+
return __request(OpenAPI, {
|
|
3077
|
+
method: 'POST',
|
|
3078
|
+
url: '/api/v1/{region}/bean/onboarding',
|
|
3079
|
+
path: {
|
|
3080
|
+
region: data.region
|
|
3081
|
+
},
|
|
3082
|
+
body: data.requestBody,
|
|
3083
|
+
mediaType: 'application/json',
|
|
3084
|
+
errors: {
|
|
3085
|
+
422: 'Invalid region/account path/duplicate paths.'
|
|
3086
|
+
}
|
|
3087
|
+
});
|
|
3088
|
+
}
|
|
3089
|
+
}
|
|
3090
|
+
|
|
3091
|
+
export class BalanceReconciliationService {
|
|
3092
|
+
/**
|
|
3093
|
+
* Preview reconciliation (book vs actual)
|
|
3094
|
+
* Computes book balance, diff, Beancount-inferred tolerance, and suggested action without persisting.
|
|
3095
|
+
* @param data The data for the request.
|
|
3096
|
+
* @param data.region Region code for tenant context (decorative for reconciliation)
|
|
3097
|
+
* @param data.requestBody
|
|
3098
|
+
* @returns ReconciliationComputeResultDto Reconciliation preview
|
|
3099
|
+
* @throws ApiError
|
|
3100
|
+
*/
|
|
3101
|
+
public static reconciliationControllerCompute(
|
|
3102
|
+
data: ReconciliationControllerComputeData
|
|
3103
|
+
): CancelablePromise<ReconciliationControllerComputeResponse> {
|
|
3104
|
+
return __request(OpenAPI, {
|
|
3105
|
+
method: 'POST',
|
|
3106
|
+
url: '/api/v1/{region}/bean/reconciliations',
|
|
3107
|
+
path: {
|
|
3108
|
+
region: data.region
|
|
3109
|
+
},
|
|
3110
|
+
body: data.requestBody,
|
|
3111
|
+
mediaType: 'application/json',
|
|
3112
|
+
errors: {
|
|
3113
|
+
404: 'Account not found'
|
|
3114
|
+
}
|
|
3115
|
+
});
|
|
3116
|
+
}
|
|
3117
|
+
|
|
3118
|
+
/**
|
|
3119
|
+
* Record a balance assertion
|
|
3120
|
+
* Persists the reconciliation as a BeanBalance assertion (amount = actual, diffAmount = book − actual). Re-reconciling the same day/currency upserts.
|
|
3121
|
+
* @param data The data for the request.
|
|
3122
|
+
* @param data.region Region code for tenant context (decorative for reconciliation)
|
|
3123
|
+
* @param data.requestBody
|
|
3124
|
+
* @returns ReconciliationRecordDto Balance assertion recorded
|
|
3125
|
+
* @throws ApiError
|
|
3126
|
+
*/
|
|
3127
|
+
public static reconciliationControllerAssert(
|
|
3128
|
+
data: ReconciliationControllerAssertData
|
|
3129
|
+
): CancelablePromise<ReconciliationControllerAssertResponse> {
|
|
3130
|
+
return __request(OpenAPI, {
|
|
3131
|
+
method: 'POST',
|
|
3132
|
+
url: '/api/v1/{region}/bean/reconciliations/assert',
|
|
3133
|
+
path: {
|
|
3134
|
+
region: data.region
|
|
3135
|
+
},
|
|
3136
|
+
body: data.requestBody,
|
|
3137
|
+
mediaType: 'application/json',
|
|
3138
|
+
errors: {
|
|
3139
|
+
404: 'Account not found'
|
|
3140
|
+
}
|
|
3141
|
+
});
|
|
3142
|
+
}
|
|
3143
|
+
|
|
3144
|
+
/**
|
|
3145
|
+
* Generate a pad adjusting entry
|
|
3146
|
+
* 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.
|
|
3147
|
+
* @param data The data for the request.
|
|
3148
|
+
* @param data.region Region code for tenant context (decorative for reconciliation)
|
|
3149
|
+
* @param data.requestBody
|
|
3150
|
+
* @returns PadResultDto Pad adjusting entry generated
|
|
3151
|
+
* @throws ApiError
|
|
3152
|
+
*/
|
|
3153
|
+
public static reconciliationControllerPad(
|
|
3154
|
+
data: ReconciliationControllerPadData
|
|
3155
|
+
): CancelablePromise<ReconciliationControllerPadResponse> {
|
|
3156
|
+
return __request(OpenAPI, {
|
|
3157
|
+
method: 'POST',
|
|
3158
|
+
url: '/api/v1/{region}/bean/reconciliations/pad',
|
|
3159
|
+
path: {
|
|
3160
|
+
region: data.region
|
|
3161
|
+
},
|
|
3162
|
+
body: data.requestBody,
|
|
3163
|
+
mediaType: 'application/json',
|
|
3164
|
+
errors: {
|
|
3165
|
+
400: 'Book already within tolerance — no pad needed',
|
|
3166
|
+
404: 'Account not found'
|
|
3167
|
+
}
|
|
3168
|
+
});
|
|
3169
|
+
}
|
|
3170
|
+
|
|
3171
|
+
/**
|
|
3172
|
+
* List reconciliation history for an account
|
|
3173
|
+
* Returns recorded balance assertions (most recent first). The latest drives the account-detail "Last <date>" badge.
|
|
3174
|
+
* @param data The data for the request.
|
|
3175
|
+
* @param data.accountId BeanAccount id
|
|
3176
|
+
* @param data.region Region code for tenant context (decorative for reconciliation)
|
|
3177
|
+
* @returns ReconciliationRecordDto Reconciliation history
|
|
3178
|
+
* @throws ApiError
|
|
3179
|
+
*/
|
|
3180
|
+
public static reconciliationControllerHistory(
|
|
3181
|
+
data: ReconciliationControllerHistoryData
|
|
3182
|
+
): CancelablePromise<ReconciliationControllerHistoryResponse> {
|
|
3183
|
+
return __request(OpenAPI, {
|
|
3184
|
+
method: 'GET',
|
|
3185
|
+
url: '/api/v1/{region}/bean/accounts/{accountId}/reconciliations',
|
|
3186
|
+
path: {
|
|
3187
|
+
accountId: data.accountId,
|
|
3188
|
+
region: data.region
|
|
3189
|
+
},
|
|
3190
|
+
errors: {
|
|
3191
|
+
404: 'Account not found'
|
|
3192
|
+
}
|
|
3193
|
+
});
|
|
3194
|
+
}
|
|
3195
|
+
}
|
|
3196
|
+
|
|
2652
3197
|
export class BeanExportService {
|
|
2653
3198
|
/**
|
|
2654
3199
|
* Export Beancount ledger as ZIP
|
|
@@ -2804,139 +3349,24 @@ export class BeanImportService {
|
|
|
2804
3349
|
/**
|
|
2805
3350
|
* Reset configuration to default
|
|
2806
3351
|
* Resets the configuration for the specified importer to default values. This operation overwrites all existing configuration.
|
|
2807
|
-
* @param data The data for the request.
|
|
2808
|
-
* @param data.importerId Importer identifier. Supported importers: alipay, alipay-web, wechat, boc, boc-credit, ccb, cmb, cmbc, cmbc-credit, icbc, icbc-credit, hsbc-hk-credit, hsbc-hk-debit
|
|
2809
|
-
* @param data.region Region code for tenant context
|
|
2810
|
-
* @returns ImporterConfigDto Configuration reset successfully
|
|
2811
|
-
* @throws ApiError
|
|
2812
|
-
*/
|
|
2813
|
-
public static importerConfigControllerResetConfig(
|
|
2814
|
-
data: ImporterConfigControllerResetConfigData
|
|
2815
|
-
): CancelablePromise<ImporterConfigControllerResetConfigResponse> {
|
|
2816
|
-
return __request(OpenAPI, {
|
|
2817
|
-
method: 'POST',
|
|
2818
|
-
url: '/api/v1/{region}/bean/import/config/{importerId}/reset',
|
|
2819
|
-
path: {
|
|
2820
|
-
importerId: data.importerId,
|
|
2821
|
-
region: data.region
|
|
2822
|
-
},
|
|
2823
|
-
errors: {
|
|
2824
|
-
400: 'Invalid input - Unsupported importer'
|
|
2825
|
-
}
|
|
2826
|
-
});
|
|
2827
|
-
}
|
|
2828
|
-
}
|
|
2829
|
-
|
|
2830
|
-
export class BeanPlatformsService {
|
|
2831
|
-
/**
|
|
2832
|
-
* Get all platforms with statistics
|
|
2833
|
-
* @returns unknown List of platforms with binding and account counts
|
|
2834
|
-
* @throws ApiError
|
|
2835
|
-
*/
|
|
2836
|
-
public static platformControllerFindAll(): CancelablePromise<PlatformControllerFindAllResponse> {
|
|
2837
|
-
return __request(OpenAPI, {
|
|
2838
|
-
method: 'GET',
|
|
2839
|
-
url: '/api/v1/bean/platforms'
|
|
2840
|
-
});
|
|
2841
|
-
}
|
|
2842
|
-
|
|
2843
|
-
/**
|
|
2844
|
-
* Create a new platform
|
|
2845
|
-
* @param data The data for the request.
|
|
2846
|
-
* @param data.requestBody
|
|
2847
|
-
* @returns unknown Platform created successfully
|
|
2848
|
-
* @throws ApiError
|
|
2849
|
-
*/
|
|
2850
|
-
public static platformControllerCreate(
|
|
2851
|
-
data: PlatformControllerCreateData
|
|
2852
|
-
): CancelablePromise<PlatformControllerCreateResponse> {
|
|
2853
|
-
return __request(OpenAPI, {
|
|
2854
|
-
method: 'POST',
|
|
2855
|
-
url: '/api/v1/bean/platforms',
|
|
2856
|
-
body: data.requestBody,
|
|
2857
|
-
mediaType: 'application/json',
|
|
2858
|
-
errors: {
|
|
2859
|
-
409: 'Platform already exists'
|
|
2860
|
-
}
|
|
2861
|
-
});
|
|
2862
|
-
}
|
|
2863
|
-
|
|
2864
|
-
/**
|
|
2865
|
-
* Get platform list for current user
|
|
2866
|
-
* @returns unknown List of platforms with user binding status
|
|
2867
|
-
* @throws ApiError
|
|
2868
|
-
*/
|
|
2869
|
-
public static platformControllerGetPlatformList(): CancelablePromise<PlatformControllerGetPlatformListResponse> {
|
|
2870
|
-
return __request(OpenAPI, {
|
|
2871
|
-
method: 'GET',
|
|
2872
|
-
url: '/api/v1/bean/platforms/list'
|
|
2873
|
-
});
|
|
2874
|
-
}
|
|
2875
|
-
|
|
2876
|
-
/**
|
|
2877
|
-
* Match platforms by name or alias
|
|
2878
|
-
* @param data The data for the request.
|
|
2879
|
-
* @param data.q Search query — Chinese name, English name, or abbreviation
|
|
2880
|
-
* @param data.region Region code for category override lookup
|
|
2881
|
-
* @returns unknown List of matching platforms with suggested segment names
|
|
2882
|
-
* @throws ApiError
|
|
2883
|
-
*/
|
|
2884
|
-
public static platformControllerMatchPlatforms(
|
|
2885
|
-
data: PlatformControllerMatchPlatformsData
|
|
2886
|
-
): CancelablePromise<PlatformControllerMatchPlatformsResponse> {
|
|
2887
|
-
return __request(OpenAPI, {
|
|
2888
|
-
method: 'GET',
|
|
2889
|
-
url: '/api/v1/bean/platforms/match',
|
|
2890
|
-
query: {
|
|
2891
|
-
q: data.q,
|
|
2892
|
-
region: data.region
|
|
2893
|
-
}
|
|
2894
|
-
});
|
|
2895
|
-
}
|
|
2896
|
-
|
|
2897
|
-
/**
|
|
2898
|
-
* Update a platform
|
|
2899
|
-
* @param data The data for the request.
|
|
2900
|
-
* @param data.id Platform ID
|
|
2901
|
-
* @param data.requestBody
|
|
2902
|
-
* @returns unknown Platform updated successfully
|
|
2903
|
-
* @throws ApiError
|
|
2904
|
-
*/
|
|
2905
|
-
public static platformControllerUpdate(
|
|
2906
|
-
data: PlatformControllerUpdateData
|
|
2907
|
-
): CancelablePromise<PlatformControllerUpdateResponse> {
|
|
2908
|
-
return __request(OpenAPI, {
|
|
2909
|
-
method: 'PUT',
|
|
2910
|
-
url: '/api/v1/bean/platforms/{id}',
|
|
2911
|
-
path: {
|
|
2912
|
-
id: data.id
|
|
2913
|
-
},
|
|
2914
|
-
body: data.requestBody,
|
|
2915
|
-
mediaType: 'application/json',
|
|
2916
|
-
errors: {
|
|
2917
|
-
404: 'Platform not found'
|
|
2918
|
-
}
|
|
2919
|
-
});
|
|
2920
|
-
}
|
|
2921
|
-
|
|
2922
|
-
/**
|
|
2923
|
-
* Delete a platform
|
|
2924
|
-
* @param data The data for the request.
|
|
2925
|
-
* @param data.id Platform ID
|
|
2926
|
-
* @returns void Platform deleted successfully
|
|
3352
|
+
* @param data The data for the request.
|
|
3353
|
+
* @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
|
|
3354
|
+
* @param data.region Region code for tenant context
|
|
3355
|
+
* @returns ImporterConfigDto Configuration reset successfully
|
|
2927
3356
|
* @throws ApiError
|
|
2928
3357
|
*/
|
|
2929
|
-
public static
|
|
2930
|
-
data:
|
|
2931
|
-
): CancelablePromise<
|
|
3358
|
+
public static importerConfigControllerResetConfig(
|
|
3359
|
+
data: ImporterConfigControllerResetConfigData
|
|
3360
|
+
): CancelablePromise<ImporterConfigControllerResetConfigResponse> {
|
|
2932
3361
|
return __request(OpenAPI, {
|
|
2933
|
-
method: '
|
|
2934
|
-
url: '/api/v1/bean/
|
|
3362
|
+
method: 'POST',
|
|
3363
|
+
url: '/api/v1/{region}/bean/import/config/{importerId}/reset',
|
|
2935
3364
|
path: {
|
|
2936
|
-
|
|
3365
|
+
importerId: data.importerId,
|
|
3366
|
+
region: data.region
|
|
2937
3367
|
},
|
|
2938
3368
|
errors: {
|
|
2939
|
-
|
|
3369
|
+
400: 'Invalid input - Unsupported importer'
|
|
2940
3370
|
}
|
|
2941
3371
|
});
|
|
2942
3372
|
}
|
|
@@ -3042,6 +3472,101 @@ export class ProviderSyncService {
|
|
|
3042
3472
|
}
|
|
3043
3473
|
}
|
|
3044
3474
|
|
|
3475
|
+
export class ExternalAccountLinksService {
|
|
3476
|
+
/**
|
|
3477
|
+
* Create an external account → BeanAccount mapping (ADR-0113)
|
|
3478
|
+
* @param data The data for the request.
|
|
3479
|
+
* @param data.region Region code for tenant context
|
|
3480
|
+
* @param data.requestBody
|
|
3481
|
+
* @returns ExternalAccountLinkResponseDto Link created.
|
|
3482
|
+
* @throws ApiError
|
|
3483
|
+
*/
|
|
3484
|
+
public static externalAccountLinkControllerCreate(
|
|
3485
|
+
data: ExternalAccountLinkControllerCreateData
|
|
3486
|
+
): CancelablePromise<ExternalAccountLinkControllerCreateResponse> {
|
|
3487
|
+
return __request(OpenAPI, {
|
|
3488
|
+
method: 'POST',
|
|
3489
|
+
url: '/api/v1/{region}/bean/external-account-links',
|
|
3490
|
+
path: {
|
|
3491
|
+
region: data.region
|
|
3492
|
+
},
|
|
3493
|
+
body: data.requestBody,
|
|
3494
|
+
mediaType: 'application/json',
|
|
3495
|
+
errors: {
|
|
3496
|
+
422: 'beanAccountId not owned, or an active link already exists.'
|
|
3497
|
+
}
|
|
3498
|
+
});
|
|
3499
|
+
}
|
|
3500
|
+
|
|
3501
|
+
/**
|
|
3502
|
+
* List the user's active external account links
|
|
3503
|
+
* @param data The data for the request.
|
|
3504
|
+
* @param data.provider
|
|
3505
|
+
* @param data.region Region code for tenant context
|
|
3506
|
+
* @returns ExternalAccountLinkListResponseDto Links retrieved.
|
|
3507
|
+
* @throws ApiError
|
|
3508
|
+
*/
|
|
3509
|
+
public static externalAccountLinkControllerFindAll(
|
|
3510
|
+
data: ExternalAccountLinkControllerFindAllData
|
|
3511
|
+
): CancelablePromise<ExternalAccountLinkControllerFindAllResponse> {
|
|
3512
|
+
return __request(OpenAPI, {
|
|
3513
|
+
method: 'GET',
|
|
3514
|
+
url: '/api/v1/{region}/bean/external-account-links',
|
|
3515
|
+
path: {
|
|
3516
|
+
region: data.region
|
|
3517
|
+
},
|
|
3518
|
+
query: {
|
|
3519
|
+
provider: data.provider
|
|
3520
|
+
}
|
|
3521
|
+
});
|
|
3522
|
+
}
|
|
3523
|
+
|
|
3524
|
+
/**
|
|
3525
|
+
* Get a single external account link
|
|
3526
|
+
* @param data The data for the request.
|
|
3527
|
+
* @param data.id
|
|
3528
|
+
* @param data.region Region code for tenant context
|
|
3529
|
+
* @returns ExternalAccountLinkResponseDto Link retrieved.
|
|
3530
|
+
* @throws ApiError
|
|
3531
|
+
*/
|
|
3532
|
+
public static externalAccountLinkControllerFindOne(
|
|
3533
|
+
data: ExternalAccountLinkControllerFindOneData
|
|
3534
|
+
): CancelablePromise<ExternalAccountLinkControllerFindOneResponse> {
|
|
3535
|
+
return __request(OpenAPI, {
|
|
3536
|
+
method: 'GET',
|
|
3537
|
+
url: '/api/v1/{region}/bean/external-account-links/{id}',
|
|
3538
|
+
path: {
|
|
3539
|
+
id: data.id,
|
|
3540
|
+
region: data.region
|
|
3541
|
+
},
|
|
3542
|
+
errors: {
|
|
3543
|
+
422: 'Link not found or not owned by the user.'
|
|
3544
|
+
}
|
|
3545
|
+
});
|
|
3546
|
+
}
|
|
3547
|
+
|
|
3548
|
+
/**
|
|
3549
|
+
* Soft-delete (disconnect) an external account link
|
|
3550
|
+
* @param data The data for the request.
|
|
3551
|
+
* @param data.id
|
|
3552
|
+
* @param data.region Region code for tenant context
|
|
3553
|
+
* @returns void Link soft-deleted; historical transactions are unaffected.
|
|
3554
|
+
* @throws ApiError
|
|
3555
|
+
*/
|
|
3556
|
+
public static externalAccountLinkControllerRemove(
|
|
3557
|
+
data: ExternalAccountLinkControllerRemoveData
|
|
3558
|
+
): CancelablePromise<ExternalAccountLinkControllerRemoveResponse> {
|
|
3559
|
+
return __request(OpenAPI, {
|
|
3560
|
+
method: 'DELETE',
|
|
3561
|
+
url: '/api/v1/{region}/bean/external-account-links/{id}',
|
|
3562
|
+
path: {
|
|
3563
|
+
id: data.id,
|
|
3564
|
+
region: data.region
|
|
3565
|
+
}
|
|
3566
|
+
});
|
|
3567
|
+
}
|
|
3568
|
+
}
|
|
3569
|
+
|
|
3045
3570
|
export class ImportTelemetryService {
|
|
3046
3571
|
/**
|
|
3047
3572
|
* Receive anonymous parser failure telemetry
|
|
@@ -3200,329 +3725,180 @@ export class BeanNlpService {
|
|
|
3200
3725
|
}
|
|
3201
3726
|
}
|
|
3202
3727
|
|
|
3203
|
-
export class
|
|
3204
|
-
/**
|
|
3205
|
-
* Get net worth overview
|
|
3206
|
-
* Returns total net worth with breakdown of assets and liabilities
|
|
3207
|
-
* @param data The data for the request.
|
|
3208
|
-
* @param data.region Region code for tenant context
|
|
3209
|
-
* @param data.date Date for balance calculation (ISO 8601 format)
|
|
3210
|
-
* @returns NetWorthResponseDto Net worth retrieved successfully
|
|
3211
|
-
* @throws ApiError
|
|
3212
|
-
*/
|
|
3213
|
-
public static dashboardControllerGetNetWorth(
|
|
3214
|
-
data: DashboardControllerGetNetWorthData
|
|
3215
|
-
): CancelablePromise<DashboardControllerGetNetWorthResponse> {
|
|
3216
|
-
return __request(OpenAPI, {
|
|
3217
|
-
method: 'GET',
|
|
3218
|
-
url: '/api/v1/{region}/dashboard/net-worth',
|
|
3219
|
-
path: {
|
|
3220
|
-
region: data.region
|
|
3221
|
-
},
|
|
3222
|
-
query: {
|
|
3223
|
-
date: data.date
|
|
3224
|
-
},
|
|
3225
|
-
errors: {
|
|
3226
|
-
401: 'User not authenticated'
|
|
3227
|
-
}
|
|
3228
|
-
});
|
|
3229
|
-
}
|
|
3230
|
-
|
|
3231
|
-
/**
|
|
3232
|
-
* Get accounts grouped by platform
|
|
3233
|
-
* Returns accounts with balances grouped by financial platform
|
|
3234
|
-
* @param data The data for the request.
|
|
3235
|
-
* @param data.region Region code for tenant context
|
|
3236
|
-
* @param data.groupBy Grouping strategy
|
|
3237
|
-
* @param data.date Date for balance calculation (ISO 8601 format)
|
|
3238
|
-
* @param data.accountId Scope to a single account (only valid with groupBy=holdingAssetClass, ADR-0105 §6)
|
|
3239
|
-
* @returns unknown Accounts retrieved successfully. Response type depends on groupBy parameter.
|
|
3240
|
-
* @throws ApiError
|
|
3241
|
-
*/
|
|
3242
|
-
public static dashboardControllerGetAccounts(
|
|
3243
|
-
data: DashboardControllerGetAccountsData
|
|
3244
|
-
): CancelablePromise<DashboardControllerGetAccountsResponse> {
|
|
3245
|
-
return __request(OpenAPI, {
|
|
3246
|
-
method: 'GET',
|
|
3247
|
-
url: '/api/v1/{region}/dashboard/accounts',
|
|
3248
|
-
path: {
|
|
3249
|
-
region: data.region
|
|
3250
|
-
},
|
|
3251
|
-
query: {
|
|
3252
|
-
groupBy: data.groupBy,
|
|
3253
|
-
date: data.date,
|
|
3254
|
-
accountId: data.accountId
|
|
3255
|
-
},
|
|
3256
|
-
errors: {
|
|
3257
|
-
401: 'User not authenticated'
|
|
3258
|
-
}
|
|
3259
|
-
});
|
|
3260
|
-
}
|
|
3261
|
-
|
|
3262
|
-
/**
|
|
3263
|
-
* Get cash flow summary
|
|
3264
|
-
* Returns income, expenses, and savings for a monthly period
|
|
3265
|
-
* @param data The data for the request.
|
|
3266
|
-
* @param data.period Period in YYYY-MM format
|
|
3267
|
-
* @param data.region Region code for tenant context
|
|
3268
|
-
* @returns CashFlowResponseDto Cash flow retrieved successfully
|
|
3269
|
-
* @throws ApiError
|
|
3270
|
-
*/
|
|
3271
|
-
public static dashboardControllerGetCashFlow(
|
|
3272
|
-
data: DashboardControllerGetCashFlowData
|
|
3273
|
-
): CancelablePromise<DashboardControllerGetCashFlowResponse> {
|
|
3274
|
-
return __request(OpenAPI, {
|
|
3275
|
-
method: 'GET',
|
|
3276
|
-
url: '/api/v1/{region}/dashboard/cash-flow',
|
|
3277
|
-
path: {
|
|
3278
|
-
region: data.region
|
|
3279
|
-
},
|
|
3280
|
-
query: {
|
|
3281
|
-
period: data.period
|
|
3282
|
-
},
|
|
3283
|
-
errors: {
|
|
3284
|
-
400: 'Invalid period format',
|
|
3285
|
-
401: 'User not authenticated'
|
|
3286
|
-
}
|
|
3287
|
-
});
|
|
3288
|
-
}
|
|
3289
|
-
}
|
|
3290
|
-
|
|
3291
|
-
export class InvestmentService {
|
|
3728
|
+
export class BeanPlatformsService {
|
|
3292
3729
|
/**
|
|
3293
|
-
* Get
|
|
3294
|
-
*
|
|
3295
|
-
* @param data The data for the request.
|
|
3296
|
-
* @param data.region Region code for tenant context
|
|
3297
|
-
* @param data.asOf As-of date (ISO 8601), defaults to today
|
|
3298
|
-
* @param data.accountId Scope to a single account
|
|
3299
|
-
* @param data.method Realized-P&L lot-matching method (default average). Does not affect the average-cost unrealized basis.
|
|
3300
|
-
* @returns HoldingPnlResponseDto Holding P&L retrieved successfully
|
|
3730
|
+
* Get all platforms with statistics
|
|
3731
|
+
* @returns unknown List of platforms with binding and account counts
|
|
3301
3732
|
* @throws ApiError
|
|
3302
3733
|
*/
|
|
3303
|
-
public static
|
|
3304
|
-
data: HoldingPnlControllerGetHoldingPnlData
|
|
3305
|
-
): CancelablePromise<HoldingPnlControllerGetHoldingPnlResponse> {
|
|
3734
|
+
public static platformControllerFindAll(): CancelablePromise<PlatformControllerFindAllResponse> {
|
|
3306
3735
|
return __request(OpenAPI, {
|
|
3307
3736
|
method: 'GET',
|
|
3308
|
-
url: '/api/v1/
|
|
3309
|
-
path: {
|
|
3310
|
-
region: data.region
|
|
3311
|
-
},
|
|
3312
|
-
query: {
|
|
3313
|
-
asOf: data.asOf,
|
|
3314
|
-
accountId: data.accountId,
|
|
3315
|
-
method: data.method
|
|
3316
|
-
},
|
|
3317
|
-
errors: {
|
|
3318
|
-
400: 'Invalid asOf format/value/future date, invalid accountId format, or unsupported method',
|
|
3319
|
-
401: 'User not authenticated'
|
|
3320
|
-
}
|
|
3737
|
+
url: '/api/v1/bean/platforms'
|
|
3321
3738
|
});
|
|
3322
3739
|
}
|
|
3323
|
-
}
|
|
3324
3740
|
|
|
3325
|
-
export class BeanPricesService {
|
|
3326
3741
|
/**
|
|
3327
|
-
* Create a new
|
|
3328
|
-
* Creates a new price entry for the authenticated user
|
|
3742
|
+
* Create a new platform
|
|
3329
3743
|
* @param data The data for the request.
|
|
3330
|
-
* @param data.region Region code for tenant context
|
|
3331
3744
|
* @param data.requestBody
|
|
3332
|
-
* @returns
|
|
3745
|
+
* @returns unknown Platform created successfully
|
|
3333
3746
|
* @throws ApiError
|
|
3334
3747
|
*/
|
|
3335
|
-
public static
|
|
3336
|
-
data:
|
|
3337
|
-
): CancelablePromise<
|
|
3748
|
+
public static platformControllerCreate(
|
|
3749
|
+
data: PlatformControllerCreateData
|
|
3750
|
+
): CancelablePromise<PlatformControllerCreateResponse> {
|
|
3338
3751
|
return __request(OpenAPI, {
|
|
3339
3752
|
method: 'POST',
|
|
3340
|
-
url: '/api/v1/
|
|
3341
|
-
path: {
|
|
3342
|
-
region: data.region
|
|
3343
|
-
},
|
|
3753
|
+
url: '/api/v1/bean/platforms',
|
|
3344
3754
|
body: data.requestBody,
|
|
3345
3755
|
mediaType: 'application/json',
|
|
3346
3756
|
errors: {
|
|
3347
|
-
|
|
3348
|
-
409: 'Price already exists for this currency pair and date'
|
|
3757
|
+
409: 'Platform already exists'
|
|
3349
3758
|
}
|
|
3350
3759
|
});
|
|
3351
3760
|
}
|
|
3352
3761
|
|
|
3353
3762
|
/**
|
|
3354
|
-
*
|
|
3355
|
-
* Returns all price entries for the authenticated user with optional filtering
|
|
3763
|
+
* Get platform list for current user
|
|
3356
3764
|
* @param data The data for the request.
|
|
3357
|
-
* @param data.region Region code
|
|
3358
|
-
* @
|
|
3359
|
-
* @param data.quoteCurrency Filter by quote currency (pricing currency, e.g., USD, CNY)
|
|
3360
|
-
* @param data.dateFrom Filter prices from this date (ISO 8601 format)
|
|
3361
|
-
* @param data.dateTo Filter prices to this date (ISO 8601 format)
|
|
3362
|
-
* @param data.search Search term for currency or quoteCurrency (case-insensitive partial match)
|
|
3363
|
-
* @param data.page Page number for pagination (default: 1)
|
|
3364
|
-
* @param data.limit Number of items per page (default: 20, max: 100)
|
|
3365
|
-
* @returns PriceListResponseDto Prices retrieved successfully
|
|
3765
|
+
* @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").
|
|
3766
|
+
* @returns PlatformListItemDto List of platforms with user binding status
|
|
3366
3767
|
* @throws ApiError
|
|
3367
3768
|
*/
|
|
3368
|
-
public static
|
|
3369
|
-
data:
|
|
3370
|
-
): CancelablePromise<
|
|
3769
|
+
public static platformControllerGetPlatformList(
|
|
3770
|
+
data: PlatformControllerGetPlatformListData = {}
|
|
3771
|
+
): CancelablePromise<PlatformControllerGetPlatformListResponse> {
|
|
3371
3772
|
return __request(OpenAPI, {
|
|
3372
3773
|
method: 'GET',
|
|
3373
|
-
url: '/api/v1/
|
|
3374
|
-
path: {
|
|
3375
|
-
region: data.region
|
|
3376
|
-
},
|
|
3774
|
+
url: '/api/v1/bean/platforms/list',
|
|
3377
3775
|
query: {
|
|
3378
|
-
|
|
3379
|
-
quoteCurrency: data.quoteCurrency,
|
|
3380
|
-
dateFrom: data.dateFrom,
|
|
3381
|
-
dateTo: data.dateTo,
|
|
3382
|
-
search: data.search,
|
|
3383
|
-
page: data.page,
|
|
3384
|
-
limit: data.limit
|
|
3776
|
+
region: data.region
|
|
3385
3777
|
}
|
|
3386
3778
|
});
|
|
3387
3779
|
}
|
|
3388
3780
|
|
|
3389
3781
|
/**
|
|
3390
|
-
*
|
|
3391
|
-
* Returns a single price entry by its ID
|
|
3782
|
+
* Match platforms by name or alias
|
|
3392
3783
|
* @param data The data for the request.
|
|
3393
|
-
* @param data.
|
|
3394
|
-
* @param data.region Region code
|
|
3395
|
-
* @returns
|
|
3784
|
+
* @param data.q Search query — Chinese name, English name, or abbreviation
|
|
3785
|
+
* @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").
|
|
3786
|
+
* @returns PlatformMatchResponseDto Matching platforms with overall match type and truncation flag
|
|
3396
3787
|
* @throws ApiError
|
|
3397
3788
|
*/
|
|
3398
|
-
public static
|
|
3399
|
-
data:
|
|
3400
|
-
): CancelablePromise<
|
|
3789
|
+
public static platformControllerMatchPlatforms(
|
|
3790
|
+
data: PlatformControllerMatchPlatformsData
|
|
3791
|
+
): CancelablePromise<PlatformControllerMatchPlatformsResponse> {
|
|
3401
3792
|
return __request(OpenAPI, {
|
|
3402
3793
|
method: 'GET',
|
|
3403
|
-
url: '/api/v1/
|
|
3404
|
-
|
|
3405
|
-
|
|
3794
|
+
url: '/api/v1/bean/platforms/match',
|
|
3795
|
+
query: {
|
|
3796
|
+
q: data.q,
|
|
3406
3797
|
region: data.region
|
|
3407
|
-
},
|
|
3408
|
-
errors: {
|
|
3409
|
-
404: 'Price not found'
|
|
3410
3798
|
}
|
|
3411
3799
|
});
|
|
3412
3800
|
}
|
|
3413
3801
|
|
|
3414
3802
|
/**
|
|
3415
|
-
* Update a
|
|
3416
|
-
* Updates an existing price entry
|
|
3803
|
+
* Update a platform
|
|
3417
3804
|
* @param data The data for the request.
|
|
3418
|
-
* @param data.id
|
|
3419
|
-
* @param data.region Region code for tenant context
|
|
3805
|
+
* @param data.id Platform ID
|
|
3420
3806
|
* @param data.requestBody
|
|
3421
|
-
* @returns
|
|
3807
|
+
* @returns unknown Platform updated successfully
|
|
3422
3808
|
* @throws ApiError
|
|
3423
3809
|
*/
|
|
3424
|
-
public static
|
|
3425
|
-
data:
|
|
3426
|
-
): CancelablePromise<
|
|
3810
|
+
public static platformControllerUpdate(
|
|
3811
|
+
data: PlatformControllerUpdateData
|
|
3812
|
+
): CancelablePromise<PlatformControllerUpdateResponse> {
|
|
3427
3813
|
return __request(OpenAPI, {
|
|
3428
3814
|
method: 'PUT',
|
|
3429
|
-
url: '/api/v1/
|
|
3815
|
+
url: '/api/v1/bean/platforms/{id}',
|
|
3430
3816
|
path: {
|
|
3431
|
-
id: data.id
|
|
3432
|
-
region: data.region
|
|
3817
|
+
id: data.id
|
|
3433
3818
|
},
|
|
3434
3819
|
body: data.requestBody,
|
|
3435
3820
|
mediaType: 'application/json',
|
|
3436
3821
|
errors: {
|
|
3437
|
-
404: '
|
|
3438
|
-
409: 'Updated price conflicts with existing price'
|
|
3822
|
+
404: 'Platform not found'
|
|
3439
3823
|
}
|
|
3440
3824
|
});
|
|
3441
3825
|
}
|
|
3442
3826
|
|
|
3443
3827
|
/**
|
|
3444
|
-
* Delete a
|
|
3445
|
-
* Deletes a price entry (hard delete)
|
|
3828
|
+
* Delete a platform
|
|
3446
3829
|
* @param data The data for the request.
|
|
3447
|
-
* @param data.id
|
|
3448
|
-
* @
|
|
3449
|
-
* @returns void Price deleted successfully
|
|
3830
|
+
* @param data.id Platform ID
|
|
3831
|
+
* @returns void Platform deleted successfully
|
|
3450
3832
|
* @throws ApiError
|
|
3451
3833
|
*/
|
|
3452
|
-
public static
|
|
3453
|
-
data:
|
|
3454
|
-
): CancelablePromise<
|
|
3834
|
+
public static platformControllerDelete(
|
|
3835
|
+
data: PlatformControllerDeleteData
|
|
3836
|
+
): CancelablePromise<PlatformControllerDeleteResponse> {
|
|
3455
3837
|
return __request(OpenAPI, {
|
|
3456
3838
|
method: 'DELETE',
|
|
3457
|
-
url: '/api/v1/
|
|
3839
|
+
url: '/api/v1/bean/platforms/{id}',
|
|
3458
3840
|
path: {
|
|
3459
|
-
id: data.id
|
|
3460
|
-
region: data.region
|
|
3841
|
+
id: data.id
|
|
3461
3842
|
},
|
|
3462
3843
|
errors: {
|
|
3463
|
-
404: '
|
|
3844
|
+
404: 'Platform not found'
|
|
3464
3845
|
}
|
|
3465
3846
|
});
|
|
3466
3847
|
}
|
|
3848
|
+
}
|
|
3467
3849
|
|
|
3850
|
+
export class DashboardService {
|
|
3468
3851
|
/**
|
|
3469
|
-
*
|
|
3470
|
-
*
|
|
3852
|
+
* Get net worth overview
|
|
3853
|
+
* Returns total net worth with breakdown of assets and liabilities
|
|
3471
3854
|
* @param data The data for the request.
|
|
3472
3855
|
* @param data.region Region code for tenant context
|
|
3473
|
-
* @param data.
|
|
3474
|
-
* @returns
|
|
3856
|
+
* @param data.date Date for balance calculation (ISO 8601 format)
|
|
3857
|
+
* @returns NetWorthResponseDto Net worth retrieved successfully
|
|
3475
3858
|
* @throws ApiError
|
|
3476
3859
|
*/
|
|
3477
|
-
public static
|
|
3478
|
-
data:
|
|
3479
|
-
): CancelablePromise<
|
|
3860
|
+
public static dashboardControllerGetNetWorth(
|
|
3861
|
+
data: DashboardControllerGetNetWorthData
|
|
3862
|
+
): CancelablePromise<DashboardControllerGetNetWorthResponse> {
|
|
3480
3863
|
return __request(OpenAPI, {
|
|
3481
|
-
method: '
|
|
3482
|
-
url: '/api/v1/{region}/
|
|
3864
|
+
method: 'GET',
|
|
3865
|
+
url: '/api/v1/{region}/dashboard/net-worth',
|
|
3483
3866
|
path: {
|
|
3484
3867
|
region: data.region
|
|
3485
3868
|
},
|
|
3486
|
-
|
|
3487
|
-
|
|
3869
|
+
query: {
|
|
3870
|
+
date: data.date
|
|
3871
|
+
},
|
|
3872
|
+
errors: {
|
|
3873
|
+
401: 'User not authenticated'
|
|
3874
|
+
}
|
|
3488
3875
|
});
|
|
3489
3876
|
}
|
|
3490
|
-
}
|
|
3491
3877
|
|
|
3492
|
-
export class ReportingService {
|
|
3493
3878
|
/**
|
|
3494
|
-
* Get
|
|
3495
|
-
*
|
|
3496
|
-
* Returns time series data of portfolio net worth.
|
|
3497
|
-
*
|
|
3498
|
-
* **Multi-currency Support:**
|
|
3499
|
-
* - `series[].byCurrency` - Currency breakdown for each data point
|
|
3500
|
-
* - `byCurrency` - Separate time series grouped by currency
|
|
3501
|
-
* - `warnings` - Exchange rate warnings if conversion failed
|
|
3502
|
-
*
|
|
3503
|
-
* **Parameters:**
|
|
3504
|
-
* - `period`: Time period (1m, 3m, 6m, 1y)
|
|
3505
|
-
* - `granularity`: Data granularity (day, week, month)
|
|
3506
|
-
*
|
|
3879
|
+
* Get accounts grouped by platform
|
|
3880
|
+
* Returns accounts with balances grouped by financial platform
|
|
3507
3881
|
* @param data The data for the request.
|
|
3508
3882
|
* @param data.region Region code for tenant context
|
|
3509
|
-
* @param data.
|
|
3510
|
-
* @param data.
|
|
3511
|
-
* @
|
|
3883
|
+
* @param data.groupBy Grouping strategy
|
|
3884
|
+
* @param data.date Date for balance calculation (ISO 8601 format)
|
|
3885
|
+
* @param data.accountId Scope to a single account (only valid with groupBy=holdingAssetClass, ADR-0105 §6)
|
|
3886
|
+
* @returns unknown Accounts retrieved successfully. Response type depends on groupBy parameter.
|
|
3512
3887
|
* @throws ApiError
|
|
3513
3888
|
*/
|
|
3514
|
-
public static
|
|
3515
|
-
data:
|
|
3516
|
-
): CancelablePromise<
|
|
3889
|
+
public static dashboardControllerGetAccounts(
|
|
3890
|
+
data: DashboardControllerGetAccountsData
|
|
3891
|
+
): CancelablePromise<DashboardControllerGetAccountsResponse> {
|
|
3517
3892
|
return __request(OpenAPI, {
|
|
3518
3893
|
method: 'GET',
|
|
3519
|
-
url: '/api/v1/{region}/
|
|
3894
|
+
url: '/api/v1/{region}/dashboard/accounts',
|
|
3520
3895
|
path: {
|
|
3521
3896
|
region: data.region
|
|
3522
3897
|
},
|
|
3523
3898
|
query: {
|
|
3524
|
-
|
|
3525
|
-
|
|
3899
|
+
groupBy: data.groupBy,
|
|
3900
|
+
date: data.date,
|
|
3901
|
+
accountId: data.accountId
|
|
3526
3902
|
},
|
|
3527
3903
|
errors: {
|
|
3528
3904
|
401: 'User not authenticated'
|
|
@@ -3531,116 +3907,95 @@ export class ReportingService {
|
|
|
3531
3907
|
}
|
|
3532
3908
|
|
|
3533
3909
|
/**
|
|
3534
|
-
* Get cash
|
|
3535
|
-
*
|
|
3536
|
-
* Monthly income / expense / netSavings over a fixed N-month window
|
|
3537
|
-
* (current month + N−1 prior). Missing months are zero-filled (flow metric).
|
|
3538
|
-
*
|
|
3539
|
-
* **Parameters:**
|
|
3540
|
-
* - `period`: 1m | 3m | 6m | 1y (default 6m)
|
|
3541
|
-
* - `granularity`: accepted for API symmetry; v1 returns month buckets
|
|
3542
|
-
*
|
|
3910
|
+
* Get cash flow summary
|
|
3911
|
+
* Returns income, expenses, and savings for a monthly period
|
|
3543
3912
|
* @param data The data for the request.
|
|
3913
|
+
* @param data.period Period in YYYY-MM format
|
|
3544
3914
|
* @param data.region Region code for tenant context
|
|
3545
|
-
* @
|
|
3546
|
-
* @param data.granularity Data granularity (accepted for API symmetry; v1 returns month buckets)
|
|
3547
|
-
* @returns CashFlowTrendsResponseDto Cash-flow trends retrieved successfully
|
|
3915
|
+
* @returns CashFlowResponseDto Cash flow retrieved successfully
|
|
3548
3916
|
* @throws ApiError
|
|
3549
3917
|
*/
|
|
3550
|
-
public static
|
|
3551
|
-
data:
|
|
3552
|
-
): CancelablePromise<
|
|
3918
|
+
public static dashboardControllerGetCashFlow(
|
|
3919
|
+
data: DashboardControllerGetCashFlowData
|
|
3920
|
+
): CancelablePromise<DashboardControllerGetCashFlowResponse> {
|
|
3553
3921
|
return __request(OpenAPI, {
|
|
3554
3922
|
method: 'GET',
|
|
3555
|
-
url: '/api/v1/{region}/
|
|
3923
|
+
url: '/api/v1/{region}/dashboard/cash-flow',
|
|
3556
3924
|
path: {
|
|
3557
3925
|
region: data.region
|
|
3558
3926
|
},
|
|
3559
3927
|
query: {
|
|
3560
|
-
period: data.period
|
|
3561
|
-
granularity: data.granularity
|
|
3928
|
+
period: data.period
|
|
3562
3929
|
},
|
|
3563
3930
|
errors: {
|
|
3931
|
+
400: 'Invalid period format',
|
|
3564
3932
|
401: 'User not authenticated'
|
|
3565
3933
|
}
|
|
3566
3934
|
});
|
|
3567
3935
|
}
|
|
3568
3936
|
|
|
3569
3937
|
/**
|
|
3570
|
-
*
|
|
3571
|
-
*
|
|
3572
|
-
* Manually generate a portfolio snapshot for a specific date.
|
|
3573
|
-
*
|
|
3574
|
-
* **Multi-currency Support:**
|
|
3575
|
-
* - Fetches balances grouped by currency
|
|
3576
|
-
* - Uses user's baseCurrency setting for conversion
|
|
3577
|
-
* - Stores exchange rates and warnings
|
|
3578
|
-
*
|
|
3579
|
-
* **Use Cases:**
|
|
3580
|
-
* - Testing snapshot generation
|
|
3581
|
-
* - Force regeneration after data correction
|
|
3582
|
-
* - Initial setup for new users
|
|
3583
|
-
*
|
|
3938
|
+
* Get expenses/income grouped by functional category
|
|
3939
|
+
* 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)
|
|
3584
3940
|
* @param data The data for the request.
|
|
3585
3941
|
* @param data.region Region code for tenant context
|
|
3586
|
-
* @param data.
|
|
3587
|
-
* @
|
|
3942
|
+
* @param data.groupBy Grouping strategy
|
|
3943
|
+
* @param data.period Time window (1m = current calendar month)
|
|
3944
|
+
* @param data.flow Account root to aggregate (expense → ^Expenses:, income → ^Income:)
|
|
3945
|
+
* @returns ExpensesByCategoryResponseDto Expenses retrieved successfully
|
|
3588
3946
|
* @throws ApiError
|
|
3589
3947
|
*/
|
|
3590
|
-
public static
|
|
3591
|
-
data:
|
|
3592
|
-
): CancelablePromise<
|
|
3948
|
+
public static dashboardControllerGetExpenses(
|
|
3949
|
+
data: DashboardControllerGetExpensesData
|
|
3950
|
+
): CancelablePromise<DashboardControllerGetExpensesResponse> {
|
|
3593
3951
|
return __request(OpenAPI, {
|
|
3594
|
-
method: '
|
|
3595
|
-
url: '/api/v1/{region}/
|
|
3952
|
+
method: 'GET',
|
|
3953
|
+
url: '/api/v1/{region}/dashboard/expenses',
|
|
3596
3954
|
path: {
|
|
3597
3955
|
region: data.region
|
|
3598
3956
|
},
|
|
3599
|
-
|
|
3600
|
-
|
|
3957
|
+
query: {
|
|
3958
|
+
groupBy: data.groupBy,
|
|
3959
|
+
period: data.period,
|
|
3960
|
+
flow: data.flow
|
|
3961
|
+
},
|
|
3601
3962
|
errors: {
|
|
3602
|
-
400: 'Invalid
|
|
3963
|
+
400: 'Invalid groupBy or period',
|
|
3603
3964
|
401: 'User not authenticated'
|
|
3604
3965
|
}
|
|
3605
3966
|
});
|
|
3606
3967
|
}
|
|
3968
|
+
}
|
|
3607
3969
|
|
|
3970
|
+
export class InvestmentService {
|
|
3608
3971
|
/**
|
|
3609
|
-
*
|
|
3610
|
-
*
|
|
3611
|
-
* Generate snapshots for a date range (historical data backfill).
|
|
3612
|
-
*
|
|
3613
|
-
* **Multi-currency Support:**
|
|
3614
|
-
* - Each snapshot includes multi-currency data
|
|
3615
|
-
* - Uses exchange rates available at generation time
|
|
3616
|
-
* - Warnings stored for missing exchange rates
|
|
3617
|
-
*
|
|
3618
|
-
* **Best Practices:**
|
|
3619
|
-
* - Use for initial setup after account configuration
|
|
3620
|
-
* - Run during low-traffic periods for large date ranges
|
|
3621
|
-
* - Existing snapshots are skipped (not regenerated)
|
|
3622
|
-
*
|
|
3972
|
+
* Get per-holding unrealized + realized P&L
|
|
3973
|
+
* Average-cost unrealized P&L per account × commodity, plus cumulative realized P&L on sold lots (method = FIFO | average, default average).
|
|
3623
3974
|
* @param data The data for the request.
|
|
3624
3975
|
* @param data.region Region code for tenant context
|
|
3625
|
-
* @param data.
|
|
3626
|
-
* @
|
|
3976
|
+
* @param data.asOf As-of date (ISO 8601), defaults to today
|
|
3977
|
+
* @param data.accountId Scope to a single account
|
|
3978
|
+
* @param data.method Realized-P&L lot-matching method (default average). Does not affect the average-cost unrealized basis.
|
|
3979
|
+
* @returns HoldingPnlResponseDto Holding P&L retrieved successfully
|
|
3627
3980
|
* @throws ApiError
|
|
3628
3981
|
*/
|
|
3629
|
-
public static
|
|
3630
|
-
data:
|
|
3631
|
-
): CancelablePromise<
|
|
3982
|
+
public static holdingPnlControllerGetHoldingPnl(
|
|
3983
|
+
data: HoldingPnlControllerGetHoldingPnlData
|
|
3984
|
+
): CancelablePromise<HoldingPnlControllerGetHoldingPnlResponse> {
|
|
3632
3985
|
return __request(OpenAPI, {
|
|
3633
|
-
method: '
|
|
3634
|
-
url: '/api/v1/{region}/
|
|
3986
|
+
method: 'GET',
|
|
3987
|
+
url: '/api/v1/{region}/investment/holdings/pnl',
|
|
3635
3988
|
path: {
|
|
3636
3989
|
region: data.region
|
|
3637
3990
|
},
|
|
3638
|
-
|
|
3639
|
-
|
|
3991
|
+
query: {
|
|
3992
|
+
asOf: data.asOf,
|
|
3993
|
+
accountId: data.accountId,
|
|
3994
|
+
method: data.method
|
|
3995
|
+
},
|
|
3640
3996
|
errors: {
|
|
3641
|
-
400: 'Invalid date format or
|
|
3642
|
-
401: 'User not authenticated'
|
|
3643
|
-
409: 'Backfill already in progress for this user'
|
|
3997
|
+
400: 'Invalid asOf format/value/future date, invalid accountId format, or unsupported method',
|
|
3998
|
+
401: 'User not authenticated'
|
|
3644
3999
|
}
|
|
3645
4000
|
});
|
|
3646
4001
|
}
|
|
@@ -3669,7 +4024,7 @@ export class AuthService {
|
|
|
3669
4024
|
* Anonymous login with access token
|
|
3670
4025
|
* @param data The data for the request.
|
|
3671
4026
|
* @param data.requestBody
|
|
3672
|
-
* @returns
|
|
4027
|
+
* @returns AnonymousLoginResponseDto Login successful
|
|
3673
4028
|
* @throws ApiError
|
|
3674
4029
|
*/
|
|
3675
4030
|
public static authControllerAccessTokenLogin(
|
|
@@ -3856,3 +4211,53 @@ export class InfoService {
|
|
|
3856
4211
|
});
|
|
3857
4212
|
}
|
|
3858
4213
|
}
|
|
4214
|
+
|
|
4215
|
+
export class MarketDataService {
|
|
4216
|
+
/**
|
|
4217
|
+
* Search market symbols by name or code
|
|
4218
|
+
* Ranked search over the openbb catalog. Empty `q` returns [].
|
|
4219
|
+
* @param data The data for the request.
|
|
4220
|
+
* @param data.q Search term — matched against symbol and instrument name. Empty string returns [].
|
|
4221
|
+
* @param data.limit Maximum number of results (clamped 1..50)
|
|
4222
|
+
* @param data.exchange Filter by exchange code (e.g. US, HK, SS, SZ)
|
|
4223
|
+
* @param data.assetType Filter by OpenBB asset_type (e.g. stock, etf)
|
|
4224
|
+
* @returns SymbolSearchResultDto Ranked search results
|
|
4225
|
+
* @throws ApiError
|
|
4226
|
+
*/
|
|
4227
|
+
public static symbolControllerSearch(
|
|
4228
|
+
data: SymbolControllerSearchData
|
|
4229
|
+
): CancelablePromise<SymbolControllerSearchResponse> {
|
|
4230
|
+
return __request(OpenAPI, {
|
|
4231
|
+
method: 'GET',
|
|
4232
|
+
url: '/api/v1/market/symbols/search',
|
|
4233
|
+
query: {
|
|
4234
|
+
q: data.q,
|
|
4235
|
+
limit: data.limit,
|
|
4236
|
+
exchange: data.exchange,
|
|
4237
|
+
assetType: data.assetType
|
|
4238
|
+
}
|
|
4239
|
+
});
|
|
4240
|
+
}
|
|
4241
|
+
|
|
4242
|
+
/**
|
|
4243
|
+
* Get a market symbol quote
|
|
4244
|
+
* @param data The data for the request.
|
|
4245
|
+
* @param data.symbol
|
|
4246
|
+
* @returns SymbolQuoteDto Symbol quote
|
|
4247
|
+
* @throws ApiError
|
|
4248
|
+
*/
|
|
4249
|
+
public static symbolControllerGetQuote(
|
|
4250
|
+
data: SymbolControllerGetQuoteData
|
|
4251
|
+
): CancelablePromise<SymbolControllerGetQuoteResponse> {
|
|
4252
|
+
return __request(OpenAPI, {
|
|
4253
|
+
method: 'GET',
|
|
4254
|
+
url: '/api/v1/market/symbols/{symbol}/quote',
|
|
4255
|
+
path: {
|
|
4256
|
+
symbol: data.symbol
|
|
4257
|
+
},
|
|
4258
|
+
errors: {
|
|
4259
|
+
404: 'Symbol not found in the openbb catalog'
|
|
4260
|
+
}
|
|
4261
|
+
});
|
|
4262
|
+
}
|
|
4263
|
+
}
|