@firela/api-types 0.0.0-canary.a4e21680 → 0.0.0-canary.a6014079
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 +1983 -1435
- package/dist/index.d.ts +1983 -1435
- package/dist/index.js +30 -4
- package/dist/index.mjs +30 -4
- package/package.json +1 -1
- package/src/generated/schemas.gen.ts +3496 -2907
- package/src/generated/services.gen.ts +1040 -815
- package/src/generated/types.gen.ts +4828 -1500
|
@@ -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,26 @@ 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,
|
|
174
196
|
EventControllerCreateData,
|
|
175
197
|
EventControllerCreateResponse,
|
|
176
198
|
EventControllerFindAllData,
|
|
@@ -183,6 +205,8 @@ import type {
|
|
|
183
205
|
EventControllerDeleteResponse,
|
|
184
206
|
EventControllerGetSliceData,
|
|
185
207
|
EventControllerGetSliceResponse,
|
|
208
|
+
OnboardingControllerBootstrapData,
|
|
209
|
+
OnboardingControllerBootstrapResponse,
|
|
186
210
|
ReconciliationControllerComputeData,
|
|
187
211
|
ReconciliationControllerComputeResponse,
|
|
188
212
|
ReconciliationControllerAssertData,
|
|
@@ -204,22 +228,20 @@ import type {
|
|
|
204
228
|
ImporterConfigControllerUpdateConfigResponse,
|
|
205
229
|
ImporterConfigControllerResetConfigData,
|
|
206
230
|
ImporterConfigControllerResetConfigResponse,
|
|
207
|
-
PlatformControllerFindAllResponse,
|
|
208
|
-
PlatformControllerCreateData,
|
|
209
|
-
PlatformControllerCreateResponse,
|
|
210
|
-
PlatformControllerGetPlatformListResponse,
|
|
211
|
-
PlatformControllerMatchPlatformsData,
|
|
212
|
-
PlatformControllerMatchPlatformsResponse,
|
|
213
|
-
PlatformControllerUpdateData,
|
|
214
|
-
PlatformControllerUpdateResponse,
|
|
215
|
-
PlatformControllerDeleteData,
|
|
216
|
-
PlatformControllerDeleteResponse,
|
|
217
231
|
ProviderSyncControllerSyncData,
|
|
218
232
|
ProviderSyncControllerSyncResponse,
|
|
219
233
|
ProviderSyncControllerGetSupportedProvidersData,
|
|
220
234
|
ProviderSyncControllerGetSupportedProvidersResponse,
|
|
221
235
|
ProviderSyncControllerIsProviderSupportedData,
|
|
222
236
|
ProviderSyncControllerIsProviderSupportedResponse,
|
|
237
|
+
ExternalAccountLinkControllerCreateData,
|
|
238
|
+
ExternalAccountLinkControllerCreateResponse,
|
|
239
|
+
ExternalAccountLinkControllerFindAllData,
|
|
240
|
+
ExternalAccountLinkControllerFindAllResponse,
|
|
241
|
+
ExternalAccountLinkControllerFindOneData,
|
|
242
|
+
ExternalAccountLinkControllerFindOneResponse,
|
|
243
|
+
ExternalAccountLinkControllerRemoveData,
|
|
244
|
+
ExternalAccountLinkControllerRemoveResponse,
|
|
223
245
|
TelemetryControllerReportTelemetryData,
|
|
224
246
|
TelemetryControllerReportTelemetryResponse,
|
|
225
247
|
TelemetryControllerReportCoverageMissData,
|
|
@@ -232,6 +254,17 @@ import type {
|
|
|
232
254
|
NlpControllerClearSessionResponse,
|
|
233
255
|
NlpControllerGetSessionData,
|
|
234
256
|
NlpControllerGetSessionResponse,
|
|
257
|
+
PlatformControllerFindAllResponse,
|
|
258
|
+
PlatformControllerCreateData,
|
|
259
|
+
PlatformControllerCreateResponse,
|
|
260
|
+
PlatformControllerGetPlatformListData,
|
|
261
|
+
PlatformControllerGetPlatformListResponse,
|
|
262
|
+
PlatformControllerMatchPlatformsData,
|
|
263
|
+
PlatformControllerMatchPlatformsResponse,
|
|
264
|
+
PlatformControllerUpdateData,
|
|
265
|
+
PlatformControllerUpdateResponse,
|
|
266
|
+
PlatformControllerDeleteData,
|
|
267
|
+
PlatformControllerDeleteResponse,
|
|
235
268
|
DashboardControllerGetNetWorthData,
|
|
236
269
|
DashboardControllerGetNetWorthResponse,
|
|
237
270
|
DashboardControllerGetAccountsData,
|
|
@@ -242,26 +275,6 @@ import type {
|
|
|
242
275
|
DashboardControllerGetExpensesResponse,
|
|
243
276
|
HoldingPnlControllerGetHoldingPnlData,
|
|
244
277
|
HoldingPnlControllerGetHoldingPnlResponse,
|
|
245
|
-
PriceControllerCreateData,
|
|
246
|
-
PriceControllerCreateResponse,
|
|
247
|
-
PriceControllerFindAllData,
|
|
248
|
-
PriceControllerFindAllResponse,
|
|
249
|
-
PriceControllerFindOneData,
|
|
250
|
-
PriceControllerFindOneResponse,
|
|
251
|
-
PriceControllerUpdateData,
|
|
252
|
-
PriceControllerUpdateResponse,
|
|
253
|
-
PriceControllerDeleteData,
|
|
254
|
-
PriceControllerDeleteResponse,
|
|
255
|
-
PriceControllerBulkCreateData,
|
|
256
|
-
PriceControllerBulkCreateResponse,
|
|
257
|
-
ReportingControllerGetPortfolioTrendsData,
|
|
258
|
-
ReportingControllerGetPortfolioTrendsResponse,
|
|
259
|
-
ReportingControllerGetCashFlowTrendsData,
|
|
260
|
-
ReportingControllerGetCashFlowTrendsResponse,
|
|
261
|
-
ReportingControllerGenerateSnapshotData,
|
|
262
|
-
ReportingControllerGenerateSnapshotResponse,
|
|
263
|
-
ReportingControllerBackfillSnapshotsData,
|
|
264
|
-
ReportingControllerBackfillSnapshotsResponse,
|
|
265
278
|
ApiKeysControllerCreateApiKeyResponse,
|
|
266
279
|
AuthControllerAccessTokenLoginData,
|
|
267
280
|
AuthControllerAccessTokenLoginResponse,
|
|
@@ -276,7 +289,11 @@ import type {
|
|
|
276
289
|
HealthControllerResetCircuitBreakerData,
|
|
277
290
|
HealthControllerResetCircuitBreakerResponse,
|
|
278
291
|
HealthControllerGetMetricsResponse,
|
|
279
|
-
InfoControllerGetInfoResponse
|
|
292
|
+
InfoControllerGetInfoResponse,
|
|
293
|
+
SymbolControllerSearchData,
|
|
294
|
+
SymbolControllerSearchResponse,
|
|
295
|
+
SymbolControllerGetQuoteData,
|
|
296
|
+
SymbolControllerGetQuoteResponse
|
|
280
297
|
} from './types.gen';
|
|
281
298
|
|
|
282
299
|
export class BeanAccountsService {
|
|
@@ -314,7 +331,7 @@ export class BeanAccountsService {
|
|
|
314
331
|
* @param data.type Filter by account type
|
|
315
332
|
* @param data.status Filter by status
|
|
316
333
|
* @param data.isCustom Filter by custom (user-created) accounts only
|
|
317
|
-
* @param data.search Search term for path
|
|
334
|
+
* @param data.search Search term for account path
|
|
318
335
|
* @param data.limit Maximum number of results
|
|
319
336
|
* @param data.offset Number of results to skip
|
|
320
337
|
* @returns AccountListResponseDto Accounts retrieved successfully
|
|
@@ -395,7 +412,7 @@ export class BeanAccountsService {
|
|
|
395
412
|
|
|
396
413
|
/**
|
|
397
414
|
* Delete account
|
|
398
|
-
* Deletes an account (only if no transactions)
|
|
415
|
+
* Deletes an account (only if no active transactions; voided/superseded residual postings are cleaned up)
|
|
399
416
|
* @param data The data for the request.
|
|
400
417
|
* @param data.id Account UUID
|
|
401
418
|
* @param data.region Region code for tenant context
|
|
@@ -414,7 +431,7 @@ export class BeanAccountsService {
|
|
|
414
431
|
},
|
|
415
432
|
errors: {
|
|
416
433
|
404: 'Account not found',
|
|
417
|
-
409: 'Account has transactions and cannot be deleted'
|
|
434
|
+
409: 'Account has active transactions and cannot be deleted'
|
|
418
435
|
}
|
|
419
436
|
});
|
|
420
437
|
}
|
|
@@ -476,6 +493,35 @@ export class BeanAccountsService {
|
|
|
476
493
|
}
|
|
477
494
|
});
|
|
478
495
|
}
|
|
496
|
+
|
|
497
|
+
/**
|
|
498
|
+
* Post an opening-balance transaction
|
|
499
|
+
* 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.
|
|
500
|
+
* @param data The data for the request.
|
|
501
|
+
* @param data.id Account UUID
|
|
502
|
+
* @param data.region Region code for tenant context
|
|
503
|
+
* @param data.requestBody
|
|
504
|
+
* @returns OpeningBalanceResultDto Opening-balance transaction created
|
|
505
|
+
* @throws ApiError
|
|
506
|
+
*/
|
|
507
|
+
public static accountControllerAddOpeningBalance(
|
|
508
|
+
data: AccountControllerAddOpeningBalanceData
|
|
509
|
+
): CancelablePromise<AccountControllerAddOpeningBalanceResponse> {
|
|
510
|
+
return __request(OpenAPI, {
|
|
511
|
+
method: 'POST',
|
|
512
|
+
url: '/api/v1/{region}/bean/accounts/{id}/opening-balance',
|
|
513
|
+
path: {
|
|
514
|
+
id: data.id,
|
|
515
|
+
region: data.region
|
|
516
|
+
},
|
|
517
|
+
body: data.requestBody,
|
|
518
|
+
mediaType: 'application/json',
|
|
519
|
+
errors: {
|
|
520
|
+
404: 'Account not found',
|
|
521
|
+
409: 'An opening balance already exists for this account'
|
|
522
|
+
}
|
|
523
|
+
});
|
|
524
|
+
}
|
|
479
525
|
}
|
|
480
526
|
|
|
481
527
|
export class BeanAccountStandardsService {
|
|
@@ -507,7 +553,7 @@ export class BeanAccountStandardsService {
|
|
|
507
553
|
|
|
508
554
|
/**
|
|
509
555
|
* Get template metadata for an account path
|
|
510
|
-
* Returns
|
|
556
|
+
* Returns root type for a template path.
|
|
511
557
|
* @param data The data for the request.
|
|
512
558
|
* @param data.region Region code for tenant context
|
|
513
559
|
* @param data.path Account path to check
|
|
@@ -802,7 +848,7 @@ export class BeanBalancesService {
|
|
|
802
848
|
* Query account balance
|
|
803
849
|
* Calculate account balance at a specific date for a single currency
|
|
804
850
|
* @param data The data for the request.
|
|
805
|
-
* @param data.account Account name (e.g., "Assets:
|
|
851
|
+
* @param data.account Account name (e.g., "Assets:Checking")
|
|
806
852
|
* @param data.region Region code for tenant context
|
|
807
853
|
* @param data.date Date to calculate balance at (ISO 8601 format)
|
|
808
854
|
* @param data.currency Currency to query (e.g., "USD", "CNY")
|
|
@@ -1523,153 +1569,320 @@ export class BeanCommoditiesService {
|
|
|
1523
1569
|
}
|
|
1524
1570
|
}
|
|
1525
1571
|
|
|
1526
|
-
export class
|
|
1572
|
+
export class BeanPricesService {
|
|
1527
1573
|
/**
|
|
1528
|
-
* Create a new
|
|
1529
|
-
* Creates a new
|
|
1574
|
+
* Create a new price
|
|
1575
|
+
* Creates a new price entry for the authenticated user
|
|
1530
1576
|
* @param data The data for the request.
|
|
1531
1577
|
* @param data.region Region code for tenant context
|
|
1532
1578
|
* @param data.requestBody
|
|
1533
|
-
* @returns
|
|
1579
|
+
* @returns PriceResponseDto Price created successfully
|
|
1534
1580
|
* @throws ApiError
|
|
1535
1581
|
*/
|
|
1536
|
-
public static
|
|
1537
|
-
data:
|
|
1538
|
-
): CancelablePromise<
|
|
1582
|
+
public static priceControllerCreate(
|
|
1583
|
+
data: PriceControllerCreateData
|
|
1584
|
+
): CancelablePromise<PriceControllerCreateResponse> {
|
|
1539
1585
|
return __request(OpenAPI, {
|
|
1540
1586
|
method: 'POST',
|
|
1541
|
-
url: '/api/v1/{region}/bean/
|
|
1587
|
+
url: '/api/v1/{region}/bean/prices',
|
|
1542
1588
|
path: {
|
|
1543
1589
|
region: data.region
|
|
1544
1590
|
},
|
|
1545
1591
|
body: data.requestBody,
|
|
1546
1592
|
mediaType: 'application/json',
|
|
1547
1593
|
errors: {
|
|
1548
|
-
|
|
1549
|
-
409: '
|
|
1594
|
+
404: 'Currency or quoteCurrency commodity not found',
|
|
1595
|
+
409: 'Price already exists for this currency pair and date'
|
|
1550
1596
|
}
|
|
1551
1597
|
});
|
|
1552
1598
|
}
|
|
1553
1599
|
|
|
1554
1600
|
/**
|
|
1555
|
-
* List
|
|
1556
|
-
* Returns all
|
|
1601
|
+
* List user prices
|
|
1602
|
+
* Returns all price entries for the authenticated user with optional filtering
|
|
1557
1603
|
* @param data The data for the request.
|
|
1558
1604
|
* @param data.region Region code for tenant context
|
|
1559
|
-
* @param data.
|
|
1560
|
-
* @param data.
|
|
1561
|
-
* @param data.
|
|
1562
|
-
* @
|
|
1605
|
+
* @param data.currency Filter by currency (e.g., BTC, AAPL, USD)
|
|
1606
|
+
* @param data.quoteCurrency Filter by quote currency (pricing currency, e.g., USD, CNY)
|
|
1607
|
+
* @param data.dateFrom Filter prices from this date (ISO 8601 format)
|
|
1608
|
+
* @param data.dateTo Filter prices to this date (ISO 8601 format)
|
|
1609
|
+
* @param data.search Search term for currency or quoteCurrency (case-insensitive partial match)
|
|
1610
|
+
* @param data.page Page number for pagination (default: 1)
|
|
1611
|
+
* @param data.limit Number of items per page (default: 20, max: 100)
|
|
1612
|
+
* @returns PriceListResponseDto Prices retrieved successfully
|
|
1563
1613
|
* @throws ApiError
|
|
1564
1614
|
*/
|
|
1565
|
-
public static
|
|
1566
|
-
data:
|
|
1567
|
-
): CancelablePromise<
|
|
1615
|
+
public static priceControllerFindAll(
|
|
1616
|
+
data: PriceControllerFindAllData
|
|
1617
|
+
): CancelablePromise<PriceControllerFindAllResponse> {
|
|
1568
1618
|
return __request(OpenAPI, {
|
|
1569
1619
|
method: 'GET',
|
|
1570
|
-
url: '/api/v1/{region}/bean/
|
|
1620
|
+
url: '/api/v1/{region}/bean/prices',
|
|
1571
1621
|
path: {
|
|
1572
1622
|
region: data.region
|
|
1573
1623
|
},
|
|
1574
1624
|
query: {
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1625
|
+
currency: data.currency,
|
|
1626
|
+
quoteCurrency: data.quoteCurrency,
|
|
1627
|
+
dateFrom: data.dateFrom,
|
|
1628
|
+
dateTo: data.dateTo,
|
|
1629
|
+
search: data.search,
|
|
1630
|
+
page: data.page,
|
|
1631
|
+
limit: data.limit
|
|
1578
1632
|
}
|
|
1579
1633
|
});
|
|
1580
1634
|
}
|
|
1581
1635
|
|
|
1582
1636
|
/**
|
|
1583
|
-
*
|
|
1584
|
-
*
|
|
1637
|
+
* Get price by ID
|
|
1638
|
+
* Returns a single price entry by its ID
|
|
1585
1639
|
* @param data The data for the request.
|
|
1586
|
-
* @param data.
|
|
1640
|
+
* @param data.id Price ID
|
|
1587
1641
|
* @param data.region Region code for tenant context
|
|
1588
|
-
* @
|
|
1589
|
-
* @returns RecurringRuleResponseDto Rule created successfully
|
|
1642
|
+
* @returns PriceResponseDto Price retrieved successfully
|
|
1590
1643
|
* @throws ApiError
|
|
1591
1644
|
*/
|
|
1592
|
-
public static
|
|
1593
|
-
data:
|
|
1594
|
-
): CancelablePromise<
|
|
1645
|
+
public static priceControllerFindOne(
|
|
1646
|
+
data: PriceControllerFindOneData
|
|
1647
|
+
): CancelablePromise<PriceControllerFindOneResponse> {
|
|
1595
1648
|
return __request(OpenAPI, {
|
|
1596
|
-
method: '
|
|
1597
|
-
url: '/api/v1/{region}/bean/
|
|
1649
|
+
method: 'GET',
|
|
1650
|
+
url: '/api/v1/{region}/bean/prices/{id}',
|
|
1598
1651
|
path: {
|
|
1599
|
-
|
|
1652
|
+
id: data.id,
|
|
1600
1653
|
region: data.region
|
|
1601
1654
|
},
|
|
1602
|
-
body: data.requestBody,
|
|
1603
|
-
mediaType: 'application/json',
|
|
1604
1655
|
errors: {
|
|
1605
|
-
404: '
|
|
1606
|
-
409: 'Rule with same name already exists or transaction already linked'
|
|
1656
|
+
404: 'Price not found'
|
|
1607
1657
|
}
|
|
1608
1658
|
});
|
|
1609
1659
|
}
|
|
1610
1660
|
|
|
1611
1661
|
/**
|
|
1612
|
-
*
|
|
1613
|
-
*
|
|
1662
|
+
* Update a price
|
|
1663
|
+
* Updates an existing price entry
|
|
1614
1664
|
* @param data The data for the request.
|
|
1615
|
-
* @param data.id
|
|
1665
|
+
* @param data.id Price ID
|
|
1616
1666
|
* @param data.region Region code for tenant context
|
|
1617
|
-
* @
|
|
1667
|
+
* @param data.requestBody
|
|
1668
|
+
* @returns PriceResponseDto Price updated successfully
|
|
1618
1669
|
* @throws ApiError
|
|
1619
1670
|
*/
|
|
1620
|
-
public static
|
|
1621
|
-
data:
|
|
1622
|
-
): CancelablePromise<
|
|
1671
|
+
public static priceControllerUpdate(
|
|
1672
|
+
data: PriceControllerUpdateData
|
|
1673
|
+
): CancelablePromise<PriceControllerUpdateResponse> {
|
|
1623
1674
|
return __request(OpenAPI, {
|
|
1624
|
-
method: '
|
|
1625
|
-
url: '/api/v1/{region}/bean/
|
|
1675
|
+
method: 'PUT',
|
|
1676
|
+
url: '/api/v1/{region}/bean/prices/{id}',
|
|
1626
1677
|
path: {
|
|
1627
1678
|
id: data.id,
|
|
1628
1679
|
region: data.region
|
|
1629
1680
|
},
|
|
1681
|
+
body: data.requestBody,
|
|
1682
|
+
mediaType: 'application/json',
|
|
1630
1683
|
errors: {
|
|
1631
|
-
404: '
|
|
1684
|
+
404: 'Price not found',
|
|
1685
|
+
409: 'Updated price conflicts with existing price'
|
|
1632
1686
|
}
|
|
1633
1687
|
});
|
|
1634
1688
|
}
|
|
1635
1689
|
|
|
1636
1690
|
/**
|
|
1637
|
-
*
|
|
1638
|
-
*
|
|
1691
|
+
* Delete a price
|
|
1692
|
+
* Deletes a price entry (hard delete)
|
|
1639
1693
|
* @param data The data for the request.
|
|
1640
|
-
* @param data.id
|
|
1694
|
+
* @param data.id Price ID
|
|
1641
1695
|
* @param data.region Region code for tenant context
|
|
1642
|
-
* @
|
|
1643
|
-
* @returns RecurringRuleResponseDto Rule updated successfully
|
|
1696
|
+
* @returns void Price deleted successfully
|
|
1644
1697
|
* @throws ApiError
|
|
1645
1698
|
*/
|
|
1646
|
-
public static
|
|
1647
|
-
data:
|
|
1648
|
-
): CancelablePromise<
|
|
1699
|
+
public static priceControllerDelete(
|
|
1700
|
+
data: PriceControllerDeleteData
|
|
1701
|
+
): CancelablePromise<PriceControllerDeleteResponse> {
|
|
1649
1702
|
return __request(OpenAPI, {
|
|
1650
|
-
method: '
|
|
1651
|
-
url: '/api/v1/{region}/bean/
|
|
1703
|
+
method: 'DELETE',
|
|
1704
|
+
url: '/api/v1/{region}/bean/prices/{id}',
|
|
1652
1705
|
path: {
|
|
1653
1706
|
id: data.id,
|
|
1654
1707
|
region: data.region
|
|
1655
1708
|
},
|
|
1656
|
-
body: data.requestBody,
|
|
1657
|
-
mediaType: 'application/json',
|
|
1658
1709
|
errors: {
|
|
1659
|
-
|
|
1660
|
-
404: 'Rule not found'
|
|
1710
|
+
404: 'Price not found'
|
|
1661
1711
|
}
|
|
1662
1712
|
});
|
|
1663
1713
|
}
|
|
1664
1714
|
|
|
1665
1715
|
/**
|
|
1666
|
-
*
|
|
1667
|
-
*
|
|
1716
|
+
* Bulk create prices
|
|
1717
|
+
* Creates multiple price entries at once (skips duplicates)
|
|
1668
1718
|
* @param data The data for the request.
|
|
1669
|
-
* @param data.id Rule ID
|
|
1670
1719
|
* @param data.region Region code for tenant context
|
|
1671
|
-
* @
|
|
1672
|
-
* @
|
|
1720
|
+
* @param data.requestBody
|
|
1721
|
+
* @returns PriceResponseDto Prices created successfully
|
|
1722
|
+
* @throws ApiError
|
|
1723
|
+
*/
|
|
1724
|
+
public static priceControllerBulkCreate(
|
|
1725
|
+
data: PriceControllerBulkCreateData
|
|
1726
|
+
): CancelablePromise<PriceControllerBulkCreateResponse> {
|
|
1727
|
+
return __request(OpenAPI, {
|
|
1728
|
+
method: 'POST',
|
|
1729
|
+
url: '/api/v1/{region}/bean/prices/bulk',
|
|
1730
|
+
path: {
|
|
1731
|
+
region: data.region
|
|
1732
|
+
},
|
|
1733
|
+
body: data.requestBody,
|
|
1734
|
+
mediaType: 'application/json'
|
|
1735
|
+
});
|
|
1736
|
+
}
|
|
1737
|
+
}
|
|
1738
|
+
|
|
1739
|
+
export class RecurringRulesService {
|
|
1740
|
+
/**
|
|
1741
|
+
* Create a new recurring rule
|
|
1742
|
+
* Creates a new recurring transaction rule for the authenticated user
|
|
1743
|
+
* @param data The data for the request.
|
|
1744
|
+
* @param data.region Region code for tenant context
|
|
1745
|
+
* @param data.requestBody
|
|
1746
|
+
* @returns RecurringRuleResponseDto Rule created successfully
|
|
1747
|
+
* @throws ApiError
|
|
1748
|
+
*/
|
|
1749
|
+
public static recurringRuleControllerCreate(
|
|
1750
|
+
data: RecurringRuleControllerCreateData
|
|
1751
|
+
): CancelablePromise<RecurringRuleControllerCreateResponse> {
|
|
1752
|
+
return __request(OpenAPI, {
|
|
1753
|
+
method: 'POST',
|
|
1754
|
+
url: '/api/v1/{region}/bean/recurring-rules',
|
|
1755
|
+
path: {
|
|
1756
|
+
region: data.region
|
|
1757
|
+
},
|
|
1758
|
+
body: data.requestBody,
|
|
1759
|
+
mediaType: 'application/json',
|
|
1760
|
+
errors: {
|
|
1761
|
+
400: 'Invalid input data (e.g., autoCreate without accounts)',
|
|
1762
|
+
409: 'Rule with same name already exists'
|
|
1763
|
+
}
|
|
1764
|
+
});
|
|
1765
|
+
}
|
|
1766
|
+
|
|
1767
|
+
/**
|
|
1768
|
+
* List recurring rules
|
|
1769
|
+
* Returns all recurring rules for the authenticated user with optional filtering
|
|
1770
|
+
* @param data The data for the request.
|
|
1771
|
+
* @param data.region Region code for tenant context
|
|
1772
|
+
* @param data.isActive Filter by active status
|
|
1773
|
+
* @param data.frequency Filter by frequency (WEEKLY, MONTHLY, etc.)
|
|
1774
|
+
* @param data.hasAutoCreate Filter by autoCreate enabled
|
|
1775
|
+
* @returns RecurringRuleResponseDto Rules retrieved successfully
|
|
1776
|
+
* @throws ApiError
|
|
1777
|
+
*/
|
|
1778
|
+
public static recurringRuleControllerFindAll(
|
|
1779
|
+
data: RecurringRuleControllerFindAllData
|
|
1780
|
+
): CancelablePromise<RecurringRuleControllerFindAllResponse> {
|
|
1781
|
+
return __request(OpenAPI, {
|
|
1782
|
+
method: 'GET',
|
|
1783
|
+
url: '/api/v1/{region}/bean/recurring-rules',
|
|
1784
|
+
path: {
|
|
1785
|
+
region: data.region
|
|
1786
|
+
},
|
|
1787
|
+
query: {
|
|
1788
|
+
isActive: data.isActive,
|
|
1789
|
+
frequency: data.frequency,
|
|
1790
|
+
hasAutoCreate: data.hasAutoCreate
|
|
1791
|
+
}
|
|
1792
|
+
});
|
|
1793
|
+
}
|
|
1794
|
+
|
|
1795
|
+
/**
|
|
1796
|
+
* Create recurring rule from transaction
|
|
1797
|
+
* Auto-creates a recurring rule using transaction data. User only confirms frequency.
|
|
1798
|
+
* @param data The data for the request.
|
|
1799
|
+
* @param data.transactionId Source transaction ID
|
|
1800
|
+
* @param data.region Region code for tenant context
|
|
1801
|
+
* @param data.requestBody
|
|
1802
|
+
* @returns RecurringRuleResponseDto Rule created successfully
|
|
1803
|
+
* @throws ApiError
|
|
1804
|
+
*/
|
|
1805
|
+
public static recurringRuleControllerCreateFromTransaction(
|
|
1806
|
+
data: RecurringRuleControllerCreateFromTransactionData
|
|
1807
|
+
): CancelablePromise<RecurringRuleControllerCreateFromTransactionResponse> {
|
|
1808
|
+
return __request(OpenAPI, {
|
|
1809
|
+
method: 'POST',
|
|
1810
|
+
url: '/api/v1/{region}/bean/recurring-rules/from-transaction/{transactionId}',
|
|
1811
|
+
path: {
|
|
1812
|
+
transactionId: data.transactionId,
|
|
1813
|
+
region: data.region
|
|
1814
|
+
},
|
|
1815
|
+
body: data.requestBody,
|
|
1816
|
+
mediaType: 'application/json',
|
|
1817
|
+
errors: {
|
|
1818
|
+
404: 'Transaction not found',
|
|
1819
|
+
409: 'Rule with same name already exists or transaction already linked'
|
|
1820
|
+
}
|
|
1821
|
+
});
|
|
1822
|
+
}
|
|
1823
|
+
|
|
1824
|
+
/**
|
|
1825
|
+
* Get recurring rule by ID
|
|
1826
|
+
* Returns a specific recurring rule with its details
|
|
1827
|
+
* @param data The data for the request.
|
|
1828
|
+
* @param data.id Rule ID
|
|
1829
|
+
* @param data.region Region code for tenant context
|
|
1830
|
+
* @returns RecurringRuleResponseDto Rule retrieved successfully
|
|
1831
|
+
* @throws ApiError
|
|
1832
|
+
*/
|
|
1833
|
+
public static recurringRuleControllerFindOne(
|
|
1834
|
+
data: RecurringRuleControllerFindOneData
|
|
1835
|
+
): CancelablePromise<RecurringRuleControllerFindOneResponse> {
|
|
1836
|
+
return __request(OpenAPI, {
|
|
1837
|
+
method: 'GET',
|
|
1838
|
+
url: '/api/v1/{region}/bean/recurring-rules/{id}',
|
|
1839
|
+
path: {
|
|
1840
|
+
id: data.id,
|
|
1841
|
+
region: data.region
|
|
1842
|
+
},
|
|
1843
|
+
errors: {
|
|
1844
|
+
404: 'Rule not found'
|
|
1845
|
+
}
|
|
1846
|
+
});
|
|
1847
|
+
}
|
|
1848
|
+
|
|
1849
|
+
/**
|
|
1850
|
+
* Update recurring rule
|
|
1851
|
+
* Updates an existing recurring rule
|
|
1852
|
+
* @param data The data for the request.
|
|
1853
|
+
* @param data.id Rule ID
|
|
1854
|
+
* @param data.region Region code for tenant context
|
|
1855
|
+
* @param data.requestBody
|
|
1856
|
+
* @returns RecurringRuleResponseDto Rule updated successfully
|
|
1857
|
+
* @throws ApiError
|
|
1858
|
+
*/
|
|
1859
|
+
public static recurringRuleControllerUpdate(
|
|
1860
|
+
data: RecurringRuleControllerUpdateData
|
|
1861
|
+
): CancelablePromise<RecurringRuleControllerUpdateResponse> {
|
|
1862
|
+
return __request(OpenAPI, {
|
|
1863
|
+
method: 'PATCH',
|
|
1864
|
+
url: '/api/v1/{region}/bean/recurring-rules/{id}',
|
|
1865
|
+
path: {
|
|
1866
|
+
id: data.id,
|
|
1867
|
+
region: data.region
|
|
1868
|
+
},
|
|
1869
|
+
body: data.requestBody,
|
|
1870
|
+
mediaType: 'application/json',
|
|
1871
|
+
errors: {
|
|
1872
|
+
400: 'Invalid input data',
|
|
1873
|
+
404: 'Rule not found'
|
|
1874
|
+
}
|
|
1875
|
+
});
|
|
1876
|
+
}
|
|
1877
|
+
|
|
1878
|
+
/**
|
|
1879
|
+
* Delete recurring rule
|
|
1880
|
+
* Soft deletes a recurring rule (sets isActive to false)
|
|
1881
|
+
* @param data The data for the request.
|
|
1882
|
+
* @param data.id Rule ID
|
|
1883
|
+
* @param data.region Region code for tenant context
|
|
1884
|
+
* @returns void Rule deleted successfully
|
|
1885
|
+
* @throws ApiError
|
|
1673
1886
|
*/
|
|
1674
1887
|
public static recurringRuleControllerDelete(
|
|
1675
1888
|
data: RecurringRuleControllerDeleteData
|
|
@@ -1953,279 +2166,158 @@ export class RecurringForecastService {
|
|
|
1953
2166
|
}
|
|
1954
2167
|
}
|
|
1955
2168
|
|
|
1956
|
-
export class
|
|
2169
|
+
export class ReportingService {
|
|
1957
2170
|
/**
|
|
1958
|
-
*
|
|
1959
|
-
*
|
|
2171
|
+
* Get portfolio value trends
|
|
2172
|
+
*
|
|
2173
|
+
* Returns time series data of portfolio net worth.
|
|
2174
|
+
*
|
|
2175
|
+
* **Multi-currency Support:**
|
|
2176
|
+
* - `series[].byCurrency` - Currency breakdown for each data point
|
|
2177
|
+
* - `byCurrency` - Separate time series grouped by currency
|
|
2178
|
+
* - `warnings` - Exchange rate warnings if conversion failed
|
|
2179
|
+
*
|
|
2180
|
+
* **Parameters:**
|
|
2181
|
+
* - `period`: Time period (1m, 3m, 6m, 1y)
|
|
2182
|
+
* - `granularity`: Data granularity (day, week, month)
|
|
2183
|
+
*
|
|
1960
2184
|
* @param data The data for the request.
|
|
1961
2185
|
* @param data.region Region code for tenant context
|
|
1962
|
-
* @param data.
|
|
1963
|
-
* @
|
|
2186
|
+
* @param data.period Time period
|
|
2187
|
+
* @param data.granularity Data granularity
|
|
2188
|
+
* @returns PortfolioTrendsResponseDto Trends retrieved successfully
|
|
1964
2189
|
* @throws ApiError
|
|
1965
2190
|
*/
|
|
1966
|
-
public static
|
|
1967
|
-
data:
|
|
1968
|
-
): CancelablePromise<
|
|
2191
|
+
public static reportingControllerGetPortfolioTrends(
|
|
2192
|
+
data: ReportingControllerGetPortfolioTrendsData
|
|
2193
|
+
): CancelablePromise<ReportingControllerGetPortfolioTrendsResponse> {
|
|
1969
2194
|
return __request(OpenAPI, {
|
|
1970
|
-
method: '
|
|
1971
|
-
url: '/api/v1/{region}/
|
|
2195
|
+
method: 'GET',
|
|
2196
|
+
url: '/api/v1/{region}/reporting/portfolio/trends',
|
|
1972
2197
|
path: {
|
|
1973
2198
|
region: data.region
|
|
1974
2199
|
},
|
|
1975
|
-
|
|
1976
|
-
|
|
2200
|
+
query: {
|
|
2201
|
+
period: data.period,
|
|
2202
|
+
granularity: data.granularity
|
|
2203
|
+
},
|
|
1977
2204
|
errors: {
|
|
1978
|
-
|
|
1979
|
-
401: 'Unauthorized',
|
|
1980
|
-
409: 'Resource conflict - another process is updating this rule'
|
|
2205
|
+
401: 'User not authenticated'
|
|
1981
2206
|
}
|
|
1982
2207
|
});
|
|
1983
2208
|
}
|
|
1984
2209
|
|
|
1985
2210
|
/**
|
|
1986
|
-
* Get
|
|
2211
|
+
* Get cash-flow trends
|
|
2212
|
+
*
|
|
2213
|
+
* Monthly income / expense / netSavings over a fixed N-month window
|
|
2214
|
+
* (current month + N−1 prior). Missing months are zero-filled (flow metric).
|
|
2215
|
+
*
|
|
2216
|
+
* **Parameters:**
|
|
2217
|
+
* - `period`: 1m | 3m | 6m | 1y (default 6m)
|
|
2218
|
+
* - `granularity`: accepted for API symmetry; v1 returns month buckets
|
|
2219
|
+
*
|
|
1987
2220
|
* @param data The data for the request.
|
|
1988
2221
|
* @param data.region Region code for tenant context
|
|
1989
|
-
* @param data.
|
|
1990
|
-
* @param data.
|
|
1991
|
-
* @
|
|
1992
|
-
* @param data.learningSource Filter by learning source. Omit this parameter or pass empty string to get manually created rules (learningSource is null in database).
|
|
1993
|
-
* @param data.autoApplyEnabled Filter by auto-apply status
|
|
1994
|
-
* @returns TransactionRuleListResponseDto List of rules
|
|
2222
|
+
* @param data.period Time period
|
|
2223
|
+
* @param data.granularity Data granularity (accepted for API symmetry; v1 returns month buckets)
|
|
2224
|
+
* @returns CashFlowTrendsResponseDto Cash-flow trends retrieved successfully
|
|
1995
2225
|
* @throws ApiError
|
|
1996
2226
|
*/
|
|
1997
|
-
public static
|
|
1998
|
-
data:
|
|
1999
|
-
): CancelablePromise<
|
|
2227
|
+
public static reportingControllerGetCashFlowTrends(
|
|
2228
|
+
data: ReportingControllerGetCashFlowTrendsData
|
|
2229
|
+
): CancelablePromise<ReportingControllerGetCashFlowTrendsResponse> {
|
|
2000
2230
|
return __request(OpenAPI, {
|
|
2001
2231
|
method: 'GET',
|
|
2002
|
-
url: '/api/v1/{region}/
|
|
2232
|
+
url: '/api/v1/{region}/reporting/cash-flow/trends',
|
|
2003
2233
|
path: {
|
|
2004
2234
|
region: data.region
|
|
2005
2235
|
},
|
|
2006
2236
|
query: {
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
enabled: data.enabled,
|
|
2010
|
-
learningSource: data.learningSource,
|
|
2011
|
-
autoApplyEnabled: data.autoApplyEnabled
|
|
2237
|
+
period: data.period,
|
|
2238
|
+
granularity: data.granularity
|
|
2012
2239
|
},
|
|
2013
2240
|
errors: {
|
|
2014
|
-
401: '
|
|
2241
|
+
401: 'User not authenticated'
|
|
2015
2242
|
}
|
|
2016
2243
|
});
|
|
2017
2244
|
}
|
|
2018
2245
|
|
|
2019
2246
|
/**
|
|
2020
|
-
*
|
|
2021
|
-
*
|
|
2022
|
-
*
|
|
2023
|
-
*
|
|
2024
|
-
*
|
|
2025
|
-
*
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
region: data.region
|
|
2035
|
-
},
|
|
2036
|
-
body: data.requestBody,
|
|
2037
|
-
mediaType: 'application/json',
|
|
2038
|
-
errors: {
|
|
2039
|
-
400: 'Validation failed',
|
|
2040
|
-
401: 'Unauthorized'
|
|
2041
|
-
}
|
|
2042
|
-
});
|
|
2043
|
-
}
|
|
2044
|
-
|
|
2045
|
-
/**
|
|
2046
|
-
* Bulk create transaction rules
|
|
2247
|
+
* Generate portfolio snapshot
|
|
2248
|
+
*
|
|
2249
|
+
* Manually generate a portfolio snapshot for a specific date.
|
|
2250
|
+
*
|
|
2251
|
+
* **Multi-currency Support:**
|
|
2252
|
+
* - Fetches balances grouped by currency
|
|
2253
|
+
* - Uses user's baseCurrency setting for conversion
|
|
2254
|
+
* - Stores exchange rates and warnings
|
|
2255
|
+
*
|
|
2256
|
+
* **Use Cases:**
|
|
2257
|
+
* - Testing snapshot generation
|
|
2258
|
+
* - Force regeneration after data correction
|
|
2259
|
+
* - Initial setup for new users
|
|
2260
|
+
*
|
|
2047
2261
|
* @param data The data for the request.
|
|
2048
2262
|
* @param data.region Region code for tenant context
|
|
2049
|
-
* @param data.requestBody
|
|
2050
|
-
* @returns
|
|
2263
|
+
* @param data.requestBody Optional date (defaults to today)
|
|
2264
|
+
* @returns GenerateSnapshotResponse Snapshot generated successfully
|
|
2051
2265
|
* @throws ApiError
|
|
2052
2266
|
*/
|
|
2053
|
-
public static
|
|
2054
|
-
data:
|
|
2055
|
-
): CancelablePromise<
|
|
2267
|
+
public static reportingControllerGenerateSnapshot(
|
|
2268
|
+
data: ReportingControllerGenerateSnapshotData
|
|
2269
|
+
): CancelablePromise<ReportingControllerGenerateSnapshotResponse> {
|
|
2056
2270
|
return __request(OpenAPI, {
|
|
2057
2271
|
method: 'POST',
|
|
2058
|
-
url: '/api/v1/{region}/
|
|
2059
|
-
path: {
|
|
2060
|
-
region: data.region
|
|
2061
|
-
},
|
|
2062
|
-
body: data.requestBody,
|
|
2063
|
-
mediaType: 'application/json',
|
|
2064
|
-
errors: {
|
|
2065
|
-
400: 'Invalid bulk create data',
|
|
2066
|
-
401: 'Unauthorized'
|
|
2067
|
-
}
|
|
2068
|
-
});
|
|
2069
|
-
}
|
|
2070
|
-
|
|
2071
|
-
/**
|
|
2072
|
-
* Export transaction rules
|
|
2073
|
-
* @param data The data for the request.
|
|
2074
|
-
* @param data.format Export format (currently only JSON supported)
|
|
2075
|
-
* @param data.region Region code for tenant context
|
|
2076
|
-
* @returns ExportRulesResponseDto Exported rules
|
|
2077
|
-
* @throws ApiError
|
|
2078
|
-
*/
|
|
2079
|
-
public static transactionRuleControllerExport(
|
|
2080
|
-
data: TransactionRuleControllerExportData
|
|
2081
|
-
): CancelablePromise<TransactionRuleControllerExportResponse> {
|
|
2082
|
-
return __request(OpenAPI, {
|
|
2083
|
-
method: 'GET',
|
|
2084
|
-
url: '/api/v1/{region}/bean/transaction-rules/export/{format}',
|
|
2085
|
-
path: {
|
|
2086
|
-
format: data.format,
|
|
2087
|
-
region: data.region
|
|
2088
|
-
},
|
|
2089
|
-
errors: {
|
|
2090
|
-
400: 'Unsupported format',
|
|
2091
|
-
401: 'Unauthorized'
|
|
2092
|
-
}
|
|
2093
|
-
});
|
|
2094
|
-
}
|
|
2095
|
-
|
|
2096
|
-
/**
|
|
2097
|
-
* Get transaction rule statistics
|
|
2098
|
-
* @param data The data for the request.
|
|
2099
|
-
* @param data.period Statistics time period
|
|
2100
|
-
* @param data.region Region code for tenant context
|
|
2101
|
-
* @returns RuleStatisticsResponseDto Rule statistics
|
|
2102
|
-
* @throws ApiError
|
|
2103
|
-
*/
|
|
2104
|
-
public static transactionRuleControllerGetStatistics(
|
|
2105
|
-
data: TransactionRuleControllerGetStatisticsData
|
|
2106
|
-
): CancelablePromise<TransactionRuleControllerGetStatisticsResponse> {
|
|
2107
|
-
return __request(OpenAPI, {
|
|
2108
|
-
method: 'GET',
|
|
2109
|
-
url: '/api/v1/{region}/bean/transaction-rules/statistics/{period}',
|
|
2110
|
-
path: {
|
|
2111
|
-
period: data.period,
|
|
2112
|
-
region: data.region
|
|
2113
|
-
},
|
|
2114
|
-
errors: {
|
|
2115
|
-
401: 'Unauthorized'
|
|
2116
|
-
}
|
|
2117
|
-
});
|
|
2118
|
-
}
|
|
2119
|
-
|
|
2120
|
-
/**
|
|
2121
|
-
* Get transaction rule detail
|
|
2122
|
-
* @param data The data for the request.
|
|
2123
|
-
* @param data.ruleId Rule ID
|
|
2124
|
-
* @param data.region Region code for tenant context
|
|
2125
|
-
* @returns TransactionRuleResponseDto Rule details
|
|
2126
|
-
* @throws ApiError
|
|
2127
|
-
*/
|
|
2128
|
-
public static transactionRuleControllerGetDetail(
|
|
2129
|
-
data: TransactionRuleControllerGetDetailData
|
|
2130
|
-
): CancelablePromise<TransactionRuleControllerGetDetailResponse> {
|
|
2131
|
-
return __request(OpenAPI, {
|
|
2132
|
-
method: 'GET',
|
|
2133
|
-
url: '/api/v1/{region}/bean/transaction-rules/{ruleId}',
|
|
2134
|
-
path: {
|
|
2135
|
-
ruleId: data.ruleId,
|
|
2136
|
-
region: data.region
|
|
2137
|
-
},
|
|
2138
|
-
errors: {
|
|
2139
|
-
401: 'Unauthorized',
|
|
2140
|
-
403: 'Forbidden - not owner of rule',
|
|
2141
|
-
404: 'Rule not found'
|
|
2142
|
-
}
|
|
2143
|
-
});
|
|
2144
|
-
}
|
|
2145
|
-
|
|
2146
|
-
/**
|
|
2147
|
-
* Update a transaction rule
|
|
2148
|
-
* @param data The data for the request.
|
|
2149
|
-
* @param data.ruleId Rule ID to update
|
|
2150
|
-
* @param data.region Region code for tenant context
|
|
2151
|
-
* @param data.requestBody
|
|
2152
|
-
* @returns TransactionRuleResponseDto Rule updated successfully
|
|
2153
|
-
* @throws ApiError
|
|
2154
|
-
*/
|
|
2155
|
-
public static transactionRuleControllerUpdate(
|
|
2156
|
-
data: TransactionRuleControllerUpdateData
|
|
2157
|
-
): CancelablePromise<TransactionRuleControllerUpdateResponse> {
|
|
2158
|
-
return __request(OpenAPI, {
|
|
2159
|
-
method: 'PUT',
|
|
2160
|
-
url: '/api/v1/{region}/bean/transaction-rules/{ruleId}',
|
|
2272
|
+
url: '/api/v1/{region}/reporting/snapshots/generate',
|
|
2161
2273
|
path: {
|
|
2162
|
-
ruleId: data.ruleId,
|
|
2163
2274
|
region: data.region
|
|
2164
2275
|
},
|
|
2165
2276
|
body: data.requestBody,
|
|
2166
2277
|
mediaType: 'application/json',
|
|
2167
2278
|
errors: {
|
|
2168
|
-
400: '
|
|
2169
|
-
401: '
|
|
2170
|
-
403: 'Forbidden - not owner of rule',
|
|
2171
|
-
404: 'Rule not found',
|
|
2172
|
-
409: 'Resource conflict - rule is being modified by another process'
|
|
2173
|
-
}
|
|
2174
|
-
});
|
|
2175
|
-
}
|
|
2176
|
-
|
|
2177
|
-
/**
|
|
2178
|
-
* Delete a transaction rule
|
|
2179
|
-
* @param data The data for the request.
|
|
2180
|
-
* @param data.ruleId Rule ID to delete
|
|
2181
|
-
* @param data.region Region code for tenant context
|
|
2182
|
-
* @returns void Rule deleted successfully
|
|
2183
|
-
* @throws ApiError
|
|
2184
|
-
*/
|
|
2185
|
-
public static transactionRuleControllerDelete(
|
|
2186
|
-
data: TransactionRuleControllerDeleteData
|
|
2187
|
-
): CancelablePromise<TransactionRuleControllerDeleteResponse> {
|
|
2188
|
-
return __request(OpenAPI, {
|
|
2189
|
-
method: 'DELETE',
|
|
2190
|
-
url: '/api/v1/{region}/bean/transaction-rules/{ruleId}',
|
|
2191
|
-
path: {
|
|
2192
|
-
ruleId: data.ruleId,
|
|
2193
|
-
region: data.region
|
|
2194
|
-
},
|
|
2195
|
-
errors: {
|
|
2196
|
-
401: 'Unauthorized',
|
|
2197
|
-
403: 'Forbidden - not owner of rule',
|
|
2198
|
-
404: 'Rule not found',
|
|
2199
|
-
409: 'Resource conflict - rule is being modified by another process'
|
|
2279
|
+
400: 'Invalid date format',
|
|
2280
|
+
401: 'User not authenticated'
|
|
2200
2281
|
}
|
|
2201
2282
|
});
|
|
2202
2283
|
}
|
|
2203
2284
|
|
|
2204
2285
|
/**
|
|
2205
|
-
*
|
|
2286
|
+
* Backfill portfolio snapshots
|
|
2287
|
+
*
|
|
2288
|
+
* Generate snapshots for a date range (historical data backfill).
|
|
2289
|
+
*
|
|
2290
|
+
* **Multi-currency Support:**
|
|
2291
|
+
* - Each snapshot includes multi-currency data
|
|
2292
|
+
* - Uses exchange rates available at generation time
|
|
2293
|
+
* - Warnings stored for missing exchange rates
|
|
2294
|
+
*
|
|
2295
|
+
* **Best Practices:**
|
|
2296
|
+
* - Use for initial setup after account configuration
|
|
2297
|
+
* - Run during low-traffic periods for large date ranges
|
|
2298
|
+
* - Existing snapshots are skipped (not regenerated)
|
|
2299
|
+
*
|
|
2206
2300
|
* @param data The data for the request.
|
|
2207
|
-
* @param data.ruleId Rule ID to test
|
|
2208
2301
|
* @param data.region Region code for tenant context
|
|
2209
2302
|
* @param data.requestBody
|
|
2210
|
-
* @returns
|
|
2303
|
+
* @returns BackfillSnapshotsResponse Backfill completed successfully
|
|
2211
2304
|
* @throws ApiError
|
|
2212
2305
|
*/
|
|
2213
|
-
public static
|
|
2214
|
-
data:
|
|
2215
|
-
): CancelablePromise<
|
|
2306
|
+
public static reportingControllerBackfillSnapshots(
|
|
2307
|
+
data: ReportingControllerBackfillSnapshotsData
|
|
2308
|
+
): CancelablePromise<ReportingControllerBackfillSnapshotsResponse> {
|
|
2216
2309
|
return __request(OpenAPI, {
|
|
2217
2310
|
method: 'POST',
|
|
2218
|
-
url: '/api/v1/{region}/
|
|
2311
|
+
url: '/api/v1/{region}/reporting/snapshots/backfill',
|
|
2219
2312
|
path: {
|
|
2220
|
-
ruleId: data.ruleId,
|
|
2221
2313
|
region: data.region
|
|
2222
2314
|
},
|
|
2223
2315
|
body: data.requestBody,
|
|
2224
2316
|
mediaType: 'application/json',
|
|
2225
2317
|
errors: {
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2318
|
+
400: 'Invalid date format or range',
|
|
2319
|
+
401: 'User not authenticated',
|
|
2320
|
+
409: 'Backfill already in progress for this user'
|
|
2229
2321
|
}
|
|
2230
2322
|
});
|
|
2231
2323
|
}
|
|
@@ -2277,7 +2369,7 @@ export class UsersService {
|
|
|
2277
2369
|
* Create a new account with auto-generated access token. Protected by Cloudflare Turnstile to prevent automated signup (when enabled).
|
|
2278
2370
|
* @param data The data for the request.
|
|
2279
2371
|
* @param data.requestBody
|
|
2280
|
-
* @returns
|
|
2372
|
+
* @returns SignupResponseDto User created successfully
|
|
2281
2373
|
* @throws ApiError
|
|
2282
2374
|
*/
|
|
2283
2375
|
public static userControllerSignupUser(
|
|
@@ -2486,52 +2578,330 @@ export class PropertiesService {
|
|
|
2486
2578
|
}
|
|
2487
2579
|
}
|
|
2488
2580
|
|
|
2489
|
-
export class
|
|
2581
|
+
export class BeanTransactionRulesService {
|
|
2490
2582
|
/**
|
|
2491
|
-
* Create a new
|
|
2492
|
-
* Creates a new
|
|
2583
|
+
* Create a new transaction rule (or upsert if upsertByPayee=true)
|
|
2584
|
+
* Creates a new rule. If upsertByPayee=true, updates existing rule matching payeeKeywords[0] instead of creating duplicate.
|
|
2493
2585
|
* @param data The data for the request.
|
|
2494
|
-
* @param data.region Region code for tenant context
|
|
2586
|
+
* @param data.region Region code for tenant context
|
|
2495
2587
|
* @param data.requestBody
|
|
2496
|
-
* @returns
|
|
2588
|
+
* @returns TransactionRuleResponseDto Rule updated successfully (upsert mode)
|
|
2497
2589
|
* @throws ApiError
|
|
2498
2590
|
*/
|
|
2499
|
-
public static
|
|
2500
|
-
data:
|
|
2501
|
-
): CancelablePromise<
|
|
2591
|
+
public static transactionRuleControllerCreate(
|
|
2592
|
+
data: TransactionRuleControllerCreateData
|
|
2593
|
+
): CancelablePromise<TransactionRuleControllerCreateResponse> {
|
|
2502
2594
|
return __request(OpenAPI, {
|
|
2503
2595
|
method: 'POST',
|
|
2504
|
-
url: '/api/v1/{region}/bean/
|
|
2596
|
+
url: '/api/v1/{region}/bean/transaction-rules',
|
|
2505
2597
|
path: {
|
|
2506
2598
|
region: data.region
|
|
2507
2599
|
},
|
|
2508
2600
|
body: data.requestBody,
|
|
2509
2601
|
mediaType: 'application/json',
|
|
2510
2602
|
errors: {
|
|
2511
|
-
|
|
2603
|
+
400: 'Validation failed',
|
|
2604
|
+
401: 'Unauthorized',
|
|
2605
|
+
409: 'Resource conflict - another process is updating this rule'
|
|
2512
2606
|
}
|
|
2513
2607
|
});
|
|
2514
2608
|
}
|
|
2515
2609
|
|
|
2516
2610
|
/**
|
|
2517
|
-
*
|
|
2518
|
-
* Returns life events for the authenticated user with optional filtering by type, description search, and date range.
|
|
2611
|
+
* Get all transaction rules for user
|
|
2519
2612
|
* @param data The data for the request.
|
|
2520
|
-
* @param data.region Region code for tenant context
|
|
2521
|
-
* @param data.
|
|
2522
|
-
* @param data.
|
|
2523
|
-
* @param data.
|
|
2524
|
-
* @param data.
|
|
2525
|
-
* @param data.
|
|
2526
|
-
* @
|
|
2527
|
-
* @returns EventListResponseDto Life events retrieved successfully
|
|
2613
|
+
* @param data.region Region code for tenant context
|
|
2614
|
+
* @param data.limit Max results per page (default: 20, max: 100)
|
|
2615
|
+
* @param data.offset Pagination offset (default: 0)
|
|
2616
|
+
* @param data.enabled Filter by enabled status
|
|
2617
|
+
* @param data.learningSource Filter by learning source. Omit this parameter or pass empty string to get manually created rules (learningSource is null in database).
|
|
2618
|
+
* @param data.autoApplyEnabled Filter by auto-apply status
|
|
2619
|
+
* @returns TransactionRuleListResponseDto List of rules
|
|
2528
2620
|
* @throws ApiError
|
|
2529
2621
|
*/
|
|
2530
|
-
public static
|
|
2531
|
-
data:
|
|
2532
|
-
): CancelablePromise<
|
|
2533
|
-
return __request(OpenAPI, {
|
|
2534
|
-
method: 'GET',
|
|
2622
|
+
public static transactionRuleControllerList(
|
|
2623
|
+
data: TransactionRuleControllerListData
|
|
2624
|
+
): CancelablePromise<TransactionRuleControllerListResponse> {
|
|
2625
|
+
return __request(OpenAPI, {
|
|
2626
|
+
method: 'GET',
|
|
2627
|
+
url: '/api/v1/{region}/bean/transaction-rules',
|
|
2628
|
+
path: {
|
|
2629
|
+
region: data.region
|
|
2630
|
+
},
|
|
2631
|
+
query: {
|
|
2632
|
+
limit: data.limit,
|
|
2633
|
+
offset: data.offset,
|
|
2634
|
+
enabled: data.enabled,
|
|
2635
|
+
learningSource: data.learningSource,
|
|
2636
|
+
autoApplyEnabled: data.autoApplyEnabled
|
|
2637
|
+
},
|
|
2638
|
+
errors: {
|
|
2639
|
+
401: 'Unauthorized'
|
|
2640
|
+
}
|
|
2641
|
+
});
|
|
2642
|
+
}
|
|
2643
|
+
|
|
2644
|
+
/**
|
|
2645
|
+
* Validate transaction rule configuration
|
|
2646
|
+
* @param data The data for the request.
|
|
2647
|
+
* @param data.region Region code for tenant context
|
|
2648
|
+
* @param data.requestBody
|
|
2649
|
+
* @returns ValidateRuleResponseDto Validation result
|
|
2650
|
+
* @throws ApiError
|
|
2651
|
+
*/
|
|
2652
|
+
public static transactionRuleControllerValidate(
|
|
2653
|
+
data: TransactionRuleControllerValidateData
|
|
2654
|
+
): CancelablePromise<TransactionRuleControllerValidateResponse> {
|
|
2655
|
+
return __request(OpenAPI, {
|
|
2656
|
+
method: 'POST',
|
|
2657
|
+
url: '/api/v1/{region}/bean/transaction-rules/validate',
|
|
2658
|
+
path: {
|
|
2659
|
+
region: data.region
|
|
2660
|
+
},
|
|
2661
|
+
body: data.requestBody,
|
|
2662
|
+
mediaType: 'application/json',
|
|
2663
|
+
errors: {
|
|
2664
|
+
400: 'Validation failed',
|
|
2665
|
+
401: 'Unauthorized'
|
|
2666
|
+
}
|
|
2667
|
+
});
|
|
2668
|
+
}
|
|
2669
|
+
|
|
2670
|
+
/**
|
|
2671
|
+
* Bulk create transaction rules
|
|
2672
|
+
* @param data The data for the request.
|
|
2673
|
+
* @param data.region Region code for tenant context
|
|
2674
|
+
* @param data.requestBody
|
|
2675
|
+
* @returns BulkCreateRulesResponseDto Bulk create completed
|
|
2676
|
+
* @throws ApiError
|
|
2677
|
+
*/
|
|
2678
|
+
public static transactionRuleControllerBulkCreate(
|
|
2679
|
+
data: TransactionRuleControllerBulkCreateData
|
|
2680
|
+
): CancelablePromise<TransactionRuleControllerBulkCreateResponse> {
|
|
2681
|
+
return __request(OpenAPI, {
|
|
2682
|
+
method: 'POST',
|
|
2683
|
+
url: '/api/v1/{region}/bean/transaction-rules/bulk',
|
|
2684
|
+
path: {
|
|
2685
|
+
region: data.region
|
|
2686
|
+
},
|
|
2687
|
+
body: data.requestBody,
|
|
2688
|
+
mediaType: 'application/json',
|
|
2689
|
+
errors: {
|
|
2690
|
+
400: 'Invalid bulk create data',
|
|
2691
|
+
401: 'Unauthorized'
|
|
2692
|
+
}
|
|
2693
|
+
});
|
|
2694
|
+
}
|
|
2695
|
+
|
|
2696
|
+
/**
|
|
2697
|
+
* Export transaction rules
|
|
2698
|
+
* @param data The data for the request.
|
|
2699
|
+
* @param data.format Export format (currently only JSON supported)
|
|
2700
|
+
* @param data.region Region code for tenant context
|
|
2701
|
+
* @returns ExportRulesResponseDto Exported rules
|
|
2702
|
+
* @throws ApiError
|
|
2703
|
+
*/
|
|
2704
|
+
public static transactionRuleControllerExport(
|
|
2705
|
+
data: TransactionRuleControllerExportData
|
|
2706
|
+
): CancelablePromise<TransactionRuleControllerExportResponse> {
|
|
2707
|
+
return __request(OpenAPI, {
|
|
2708
|
+
method: 'GET',
|
|
2709
|
+
url: '/api/v1/{region}/bean/transaction-rules/export/{format}',
|
|
2710
|
+
path: {
|
|
2711
|
+
format: data.format,
|
|
2712
|
+
region: data.region
|
|
2713
|
+
},
|
|
2714
|
+
errors: {
|
|
2715
|
+
400: 'Unsupported format',
|
|
2716
|
+
401: 'Unauthorized'
|
|
2717
|
+
}
|
|
2718
|
+
});
|
|
2719
|
+
}
|
|
2720
|
+
|
|
2721
|
+
/**
|
|
2722
|
+
* Get transaction rule statistics
|
|
2723
|
+
* @param data The data for the request.
|
|
2724
|
+
* @param data.period Statistics time period
|
|
2725
|
+
* @param data.region Region code for tenant context
|
|
2726
|
+
* @returns RuleStatisticsResponseDto Rule statistics
|
|
2727
|
+
* @throws ApiError
|
|
2728
|
+
*/
|
|
2729
|
+
public static transactionRuleControllerGetStatistics(
|
|
2730
|
+
data: TransactionRuleControllerGetStatisticsData
|
|
2731
|
+
): CancelablePromise<TransactionRuleControllerGetStatisticsResponse> {
|
|
2732
|
+
return __request(OpenAPI, {
|
|
2733
|
+
method: 'GET',
|
|
2734
|
+
url: '/api/v1/{region}/bean/transaction-rules/statistics/{period}',
|
|
2735
|
+
path: {
|
|
2736
|
+
period: data.period,
|
|
2737
|
+
region: data.region
|
|
2738
|
+
},
|
|
2739
|
+
errors: {
|
|
2740
|
+
401: 'Unauthorized'
|
|
2741
|
+
}
|
|
2742
|
+
});
|
|
2743
|
+
}
|
|
2744
|
+
|
|
2745
|
+
/**
|
|
2746
|
+
* Get transaction rule detail
|
|
2747
|
+
* @param data The data for the request.
|
|
2748
|
+
* @param data.ruleId Rule ID
|
|
2749
|
+
* @param data.region Region code for tenant context
|
|
2750
|
+
* @returns TransactionRuleResponseDto Rule details
|
|
2751
|
+
* @throws ApiError
|
|
2752
|
+
*/
|
|
2753
|
+
public static transactionRuleControllerGetDetail(
|
|
2754
|
+
data: TransactionRuleControllerGetDetailData
|
|
2755
|
+
): CancelablePromise<TransactionRuleControllerGetDetailResponse> {
|
|
2756
|
+
return __request(OpenAPI, {
|
|
2757
|
+
method: 'GET',
|
|
2758
|
+
url: '/api/v1/{region}/bean/transaction-rules/{ruleId}',
|
|
2759
|
+
path: {
|
|
2760
|
+
ruleId: data.ruleId,
|
|
2761
|
+
region: data.region
|
|
2762
|
+
},
|
|
2763
|
+
errors: {
|
|
2764
|
+
401: 'Unauthorized',
|
|
2765
|
+
403: 'Forbidden - not owner of rule',
|
|
2766
|
+
404: 'Rule not found'
|
|
2767
|
+
}
|
|
2768
|
+
});
|
|
2769
|
+
}
|
|
2770
|
+
|
|
2771
|
+
/**
|
|
2772
|
+
* Update a transaction rule
|
|
2773
|
+
* @param data The data for the request.
|
|
2774
|
+
* @param data.ruleId Rule ID to update
|
|
2775
|
+
* @param data.region Region code for tenant context
|
|
2776
|
+
* @param data.requestBody
|
|
2777
|
+
* @returns TransactionRuleResponseDto Rule updated successfully
|
|
2778
|
+
* @throws ApiError
|
|
2779
|
+
*/
|
|
2780
|
+
public static transactionRuleControllerUpdate(
|
|
2781
|
+
data: TransactionRuleControllerUpdateData
|
|
2782
|
+
): CancelablePromise<TransactionRuleControllerUpdateResponse> {
|
|
2783
|
+
return __request(OpenAPI, {
|
|
2784
|
+
method: 'PUT',
|
|
2785
|
+
url: '/api/v1/{region}/bean/transaction-rules/{ruleId}',
|
|
2786
|
+
path: {
|
|
2787
|
+
ruleId: data.ruleId,
|
|
2788
|
+
region: data.region
|
|
2789
|
+
},
|
|
2790
|
+
body: data.requestBody,
|
|
2791
|
+
mediaType: 'application/json',
|
|
2792
|
+
errors: {
|
|
2793
|
+
400: 'Validation failed',
|
|
2794
|
+
401: 'Unauthorized',
|
|
2795
|
+
403: 'Forbidden - not owner of rule',
|
|
2796
|
+
404: 'Rule not found',
|
|
2797
|
+
409: 'Resource conflict - rule is being modified by another process'
|
|
2798
|
+
}
|
|
2799
|
+
});
|
|
2800
|
+
}
|
|
2801
|
+
|
|
2802
|
+
/**
|
|
2803
|
+
* Delete a transaction rule
|
|
2804
|
+
* @param data The data for the request.
|
|
2805
|
+
* @param data.ruleId Rule ID to delete
|
|
2806
|
+
* @param data.region Region code for tenant context
|
|
2807
|
+
* @returns void Rule deleted successfully
|
|
2808
|
+
* @throws ApiError
|
|
2809
|
+
*/
|
|
2810
|
+
public static transactionRuleControllerDelete(
|
|
2811
|
+
data: TransactionRuleControllerDeleteData
|
|
2812
|
+
): CancelablePromise<TransactionRuleControllerDeleteResponse> {
|
|
2813
|
+
return __request(OpenAPI, {
|
|
2814
|
+
method: 'DELETE',
|
|
2815
|
+
url: '/api/v1/{region}/bean/transaction-rules/{ruleId}',
|
|
2816
|
+
path: {
|
|
2817
|
+
ruleId: data.ruleId,
|
|
2818
|
+
region: data.region
|
|
2819
|
+
},
|
|
2820
|
+
errors: {
|
|
2821
|
+
401: 'Unauthorized',
|
|
2822
|
+
403: 'Forbidden - not owner of rule',
|
|
2823
|
+
404: 'Rule not found',
|
|
2824
|
+
409: 'Resource conflict - rule is being modified by another process'
|
|
2825
|
+
}
|
|
2826
|
+
});
|
|
2827
|
+
}
|
|
2828
|
+
|
|
2829
|
+
/**
|
|
2830
|
+
* Test rule matching
|
|
2831
|
+
* @param data The data for the request.
|
|
2832
|
+
* @param data.ruleId Rule ID to test
|
|
2833
|
+
* @param data.region Region code for tenant context
|
|
2834
|
+
* @param data.requestBody
|
|
2835
|
+
* @returns TestRuleResponseDto Test result
|
|
2836
|
+
* @throws ApiError
|
|
2837
|
+
*/
|
|
2838
|
+
public static transactionRuleControllerTest(
|
|
2839
|
+
data: TransactionRuleControllerTestData
|
|
2840
|
+
): CancelablePromise<TransactionRuleControllerTestResponse> {
|
|
2841
|
+
return __request(OpenAPI, {
|
|
2842
|
+
method: 'POST',
|
|
2843
|
+
url: '/api/v1/{region}/bean/transaction-rules/{ruleId}/test',
|
|
2844
|
+
path: {
|
|
2845
|
+
ruleId: data.ruleId,
|
|
2846
|
+
region: data.region
|
|
2847
|
+
},
|
|
2848
|
+
body: data.requestBody,
|
|
2849
|
+
mediaType: 'application/json',
|
|
2850
|
+
errors: {
|
|
2851
|
+
401: 'Unauthorized',
|
|
2852
|
+
403: 'Forbidden - not owner of rule',
|
|
2853
|
+
404: 'Rule not found'
|
|
2854
|
+
}
|
|
2855
|
+
});
|
|
2856
|
+
}
|
|
2857
|
+
}
|
|
2858
|
+
|
|
2859
|
+
export class LifeEventsService {
|
|
2860
|
+
/**
|
|
2861
|
+
* Create a new life event
|
|
2862
|
+
* Creates a new life event entry for the authenticated user. Returns ETag header carrying the row updatedAt.
|
|
2863
|
+
* @param data The data for the request.
|
|
2864
|
+
* @param data.region Region code for tenant context (decorative for life events)
|
|
2865
|
+
* @param data.requestBody
|
|
2866
|
+
* @returns EventResponseDto Life event created successfully
|
|
2867
|
+
* @throws ApiError
|
|
2868
|
+
*/
|
|
2869
|
+
public static eventControllerCreate(
|
|
2870
|
+
data: EventControllerCreateData
|
|
2871
|
+
): CancelablePromise<EventControllerCreateResponse> {
|
|
2872
|
+
return __request(OpenAPI, {
|
|
2873
|
+
method: 'POST',
|
|
2874
|
+
url: '/api/v1/{region}/bean/events',
|
|
2875
|
+
path: {
|
|
2876
|
+
region: data.region
|
|
2877
|
+
},
|
|
2878
|
+
body: data.requestBody,
|
|
2879
|
+
mediaType: 'application/json',
|
|
2880
|
+
errors: {
|
|
2881
|
+
409: 'Life event already exists for this (userId, type, date) combination'
|
|
2882
|
+
}
|
|
2883
|
+
});
|
|
2884
|
+
}
|
|
2885
|
+
|
|
2886
|
+
/**
|
|
2887
|
+
* List user life events
|
|
2888
|
+
* Returns life events for the authenticated user with optional filtering by type, description search, and date range.
|
|
2889
|
+
* @param data The data for the request.
|
|
2890
|
+
* @param data.region Region code for tenant context (decorative for life events)
|
|
2891
|
+
* @param data.type Filter by life event type (exact match)
|
|
2892
|
+
* @param data.q Search term for description (case-insensitive partial match)
|
|
2893
|
+
* @param data.from Filter life events from this date (ISO 8601 format)
|
|
2894
|
+
* @param data.to Filter life events to this date (ISO 8601 format)
|
|
2895
|
+
* @param data.page Page number for pagination (default: 1)
|
|
2896
|
+
* @param data.limit Number of items per page (default: 20, max: 100)
|
|
2897
|
+
* @returns EventListResponseDto Life events retrieved successfully
|
|
2898
|
+
* @throws ApiError
|
|
2899
|
+
*/
|
|
2900
|
+
public static eventControllerFindAll(
|
|
2901
|
+
data: EventControllerFindAllData
|
|
2902
|
+
): CancelablePromise<EventControllerFindAllResponse> {
|
|
2903
|
+
return __request(OpenAPI, {
|
|
2904
|
+
method: 'GET',
|
|
2535
2905
|
url: '/api/v1/{region}/bean/events',
|
|
2536
2906
|
path: {
|
|
2537
2907
|
region: data.region
|
|
@@ -2661,6 +3031,33 @@ export class LifeEventsService {
|
|
|
2661
3031
|
}
|
|
2662
3032
|
}
|
|
2663
3033
|
|
|
3034
|
+
export class OnboardingService {
|
|
3035
|
+
/**
|
|
3036
|
+
* Bootstrap core accounts + register asset accounts with opening balances (ADR-0113)
|
|
3037
|
+
* @param data The data for the request.
|
|
3038
|
+
* @param data.region Region code for tenant context
|
|
3039
|
+
* @param data.requestBody
|
|
3040
|
+
* @returns unknown Onboarding bootstrap result.
|
|
3041
|
+
* @throws ApiError
|
|
3042
|
+
*/
|
|
3043
|
+
public static onboardingControllerBootstrap(
|
|
3044
|
+
data: OnboardingControllerBootstrapData
|
|
3045
|
+
): CancelablePromise<OnboardingControllerBootstrapResponse> {
|
|
3046
|
+
return __request(OpenAPI, {
|
|
3047
|
+
method: 'POST',
|
|
3048
|
+
url: '/api/v1/{region}/bean/onboarding',
|
|
3049
|
+
path: {
|
|
3050
|
+
region: data.region
|
|
3051
|
+
},
|
|
3052
|
+
body: data.requestBody,
|
|
3053
|
+
mediaType: 'application/json',
|
|
3054
|
+
errors: {
|
|
3055
|
+
422: 'Invalid region/account path/duplicate paths.'
|
|
3056
|
+
}
|
|
3057
|
+
});
|
|
3058
|
+
}
|
|
3059
|
+
}
|
|
3060
|
+
|
|
2664
3061
|
export class BalanceReconciliationService {
|
|
2665
3062
|
/**
|
|
2666
3063
|
* Preview reconciliation (book vs actual)
|
|
@@ -2945,216 +3342,196 @@ export class BeanImportService {
|
|
|
2945
3342
|
}
|
|
2946
3343
|
}
|
|
2947
3344
|
|
|
2948
|
-
export class
|
|
2949
|
-
/**
|
|
2950
|
-
* Get all platforms with statistics
|
|
2951
|
-
* @returns unknown List of platforms with binding and account counts
|
|
2952
|
-
* @throws ApiError
|
|
2953
|
-
*/
|
|
2954
|
-
public static platformControllerFindAll(): CancelablePromise<PlatformControllerFindAllResponse> {
|
|
2955
|
-
return __request(OpenAPI, {
|
|
2956
|
-
method: 'GET',
|
|
2957
|
-
url: '/api/v1/bean/platforms'
|
|
2958
|
-
});
|
|
2959
|
-
}
|
|
2960
|
-
|
|
3345
|
+
export class ProviderSyncService {
|
|
2961
3346
|
/**
|
|
2962
|
-
*
|
|
3347
|
+
* Sync transactions from financial data provider
|
|
3348
|
+
*
|
|
3349
|
+
* Accepts raw transactions from external financial data providers, transforms them to Beancount format, and processes them through the ingestion pipeline.
|
|
3350
|
+
*
|
|
3351
|
+
* **Supported Providers:**
|
|
3352
|
+
* - **plaid**: Plaid API (US, Canada, Europe)
|
|
3353
|
+
* - **teller**: Teller API (US)
|
|
3354
|
+
* - **truelayer**: TrueLayer Open Banking (UK, Europe)
|
|
3355
|
+
* - **gocardless**: GoCardless Bank Account Data (Europe)
|
|
3356
|
+
* - **simplefin**: SimpleFIN (Self-hosted)
|
|
3357
|
+
* - **yodlee**: Yodlee (Global)
|
|
3358
|
+
* - **beancount-direct**: Beancount format transactions
|
|
3359
|
+
* - **parsed-bill**: Client-side parsed bill transactions
|
|
3360
|
+
*
|
|
3361
|
+
* **Processing Flow:**
|
|
3362
|
+
* 1. Transform raw data via provider adapter
|
|
3363
|
+
* 2. Validate transaction format
|
|
3364
|
+
* 3. Deduplicate using originalId
|
|
3365
|
+
* 4. Classify using rule engine
|
|
3366
|
+
* 5. Route low-confidence to Review Center
|
|
3367
|
+
* 6. Persist validated transactions
|
|
3368
|
+
*
|
|
2963
3369
|
* @param data The data for the request.
|
|
3370
|
+
* @param data.providerName Provider name
|
|
3371
|
+
* @param data.region Region code for tenant context
|
|
2964
3372
|
* @param data.requestBody
|
|
2965
|
-
* @returns
|
|
3373
|
+
* @returns ProviderSyncResponseDto Sync completed successfully
|
|
2966
3374
|
* @throws ApiError
|
|
2967
3375
|
*/
|
|
2968
|
-
public static
|
|
2969
|
-
data:
|
|
2970
|
-
): CancelablePromise<
|
|
3376
|
+
public static providerSyncControllerSync(
|
|
3377
|
+
data: ProviderSyncControllerSyncData
|
|
3378
|
+
): CancelablePromise<ProviderSyncControllerSyncResponse> {
|
|
2971
3379
|
return __request(OpenAPI, {
|
|
2972
3380
|
method: 'POST',
|
|
2973
|
-
url: '/api/v1/bean/
|
|
3381
|
+
url: '/api/v1/{region}/bean/import/provider/{providerName}/sync',
|
|
3382
|
+
path: {
|
|
3383
|
+
providerName: data.providerName,
|
|
3384
|
+
region: data.region
|
|
3385
|
+
},
|
|
2974
3386
|
body: data.requestBody,
|
|
2975
3387
|
mediaType: 'application/json',
|
|
2976
3388
|
errors: {
|
|
2977
|
-
|
|
3389
|
+
400: 'Invalid request data',
|
|
3390
|
+
401: 'Missing or invalid authentication',
|
|
3391
|
+
404: 'Provider not supported'
|
|
2978
3392
|
}
|
|
2979
3393
|
});
|
|
2980
3394
|
}
|
|
2981
3395
|
|
|
2982
3396
|
/**
|
|
2983
|
-
* Get
|
|
2984
|
-
*
|
|
2985
|
-
* @throws ApiError
|
|
2986
|
-
*/
|
|
2987
|
-
public static platformControllerGetPlatformList(): CancelablePromise<PlatformControllerGetPlatformListResponse> {
|
|
2988
|
-
return __request(OpenAPI, {
|
|
2989
|
-
method: 'GET',
|
|
2990
|
-
url: '/api/v1/bean/platforms/list'
|
|
2991
|
-
});
|
|
2992
|
-
}
|
|
2993
|
-
|
|
2994
|
-
/**
|
|
2995
|
-
* Match platforms by name or alias
|
|
3397
|
+
* Get supported providers
|
|
3398
|
+
* Returns a list of all providers supported by the sync endpoint.
|
|
2996
3399
|
* @param data The data for the request.
|
|
2997
|
-
* @param data.
|
|
2998
|
-
* @
|
|
2999
|
-
* @returns unknown List of matching platforms with suggested segment names
|
|
3400
|
+
* @param data.region Region code for tenant context
|
|
3401
|
+
* @returns SupportedProvidersResponseDto List of supported providers
|
|
3000
3402
|
* @throws ApiError
|
|
3001
3403
|
*/
|
|
3002
|
-
public static
|
|
3003
|
-
data:
|
|
3004
|
-
): CancelablePromise<
|
|
3404
|
+
public static providerSyncControllerGetSupportedProviders(
|
|
3405
|
+
data: ProviderSyncControllerGetSupportedProvidersData
|
|
3406
|
+
): CancelablePromise<ProviderSyncControllerGetSupportedProvidersResponse> {
|
|
3005
3407
|
return __request(OpenAPI, {
|
|
3006
3408
|
method: 'GET',
|
|
3007
|
-
url: '/api/v1/bean/
|
|
3008
|
-
query: {
|
|
3009
|
-
q: data.q,
|
|
3010
|
-
region: data.region
|
|
3011
|
-
}
|
|
3012
|
-
});
|
|
3013
|
-
}
|
|
3014
|
-
|
|
3015
|
-
/**
|
|
3016
|
-
* Update a platform
|
|
3017
|
-
* @param data The data for the request.
|
|
3018
|
-
* @param data.id Platform ID
|
|
3019
|
-
* @param data.requestBody
|
|
3020
|
-
* @returns unknown Platform updated successfully
|
|
3021
|
-
* @throws ApiError
|
|
3022
|
-
*/
|
|
3023
|
-
public static platformControllerUpdate(
|
|
3024
|
-
data: PlatformControllerUpdateData
|
|
3025
|
-
): CancelablePromise<PlatformControllerUpdateResponse> {
|
|
3026
|
-
return __request(OpenAPI, {
|
|
3027
|
-
method: 'PUT',
|
|
3028
|
-
url: '/api/v1/bean/platforms/{id}',
|
|
3409
|
+
url: '/api/v1/{region}/bean/import/provider/supported',
|
|
3029
3410
|
path: {
|
|
3030
|
-
|
|
3411
|
+
region: data.region
|
|
3031
3412
|
},
|
|
3032
|
-
body: data.requestBody,
|
|
3033
|
-
mediaType: 'application/json',
|
|
3034
3413
|
errors: {
|
|
3035
|
-
|
|
3414
|
+
401: 'Missing or invalid authentication'
|
|
3036
3415
|
}
|
|
3037
3416
|
});
|
|
3038
3417
|
}
|
|
3039
3418
|
|
|
3040
3419
|
/**
|
|
3041
|
-
*
|
|
3420
|
+
* Check if provider is supported
|
|
3421
|
+
* Returns whether a specific provider is supported.
|
|
3042
3422
|
* @param data The data for the request.
|
|
3043
|
-
* @param data.
|
|
3044
|
-
* @
|
|
3423
|
+
* @param data.providerName Provider name to check
|
|
3424
|
+
* @param data.region Region code for tenant context
|
|
3425
|
+
* @returns unknown Provider support status
|
|
3045
3426
|
* @throws ApiError
|
|
3046
3427
|
*/
|
|
3047
|
-
public static
|
|
3048
|
-
data:
|
|
3049
|
-
): CancelablePromise<
|
|
3428
|
+
public static providerSyncControllerIsProviderSupported(
|
|
3429
|
+
data: ProviderSyncControllerIsProviderSupportedData
|
|
3430
|
+
): CancelablePromise<ProviderSyncControllerIsProviderSupportedResponse> {
|
|
3050
3431
|
return __request(OpenAPI, {
|
|
3051
|
-
method: '
|
|
3052
|
-
url: '/api/v1/bean/
|
|
3432
|
+
method: 'GET',
|
|
3433
|
+
url: '/api/v1/{region}/bean/import/provider/{providerName}/supported',
|
|
3053
3434
|
path: {
|
|
3054
|
-
|
|
3435
|
+
providerName: data.providerName,
|
|
3436
|
+
region: data.region
|
|
3055
3437
|
},
|
|
3056
3438
|
errors: {
|
|
3057
|
-
|
|
3439
|
+
401: 'Missing or invalid authentication'
|
|
3058
3440
|
}
|
|
3059
3441
|
});
|
|
3060
3442
|
}
|
|
3061
3443
|
}
|
|
3062
3444
|
|
|
3063
|
-
export class
|
|
3445
|
+
export class ExternalAccountLinksService {
|
|
3064
3446
|
/**
|
|
3065
|
-
*
|
|
3066
|
-
*
|
|
3067
|
-
* Accepts raw transactions from external financial data providers, transforms them to Beancount format, and processes them through the ingestion pipeline.
|
|
3068
|
-
*
|
|
3069
|
-
* **Supported Providers:**
|
|
3070
|
-
* - **plaid**: Plaid API (US, Canada, Europe)
|
|
3071
|
-
* - **teller**: Teller API (US)
|
|
3072
|
-
* - **truelayer**: TrueLayer Open Banking (UK, Europe)
|
|
3073
|
-
* - **gocardless**: GoCardless Bank Account Data (Europe)
|
|
3074
|
-
* - **simplefin**: SimpleFIN (Self-hosted)
|
|
3075
|
-
* - **yodlee**: Yodlee (Global)
|
|
3076
|
-
* - **beancount-direct**: Beancount format transactions
|
|
3077
|
-
* - **parsed-bill**: Client-side parsed bill transactions
|
|
3078
|
-
*
|
|
3079
|
-
* **Processing Flow:**
|
|
3080
|
-
* 1. Transform raw data via provider adapter
|
|
3081
|
-
* 2. Validate transaction format
|
|
3082
|
-
* 3. Deduplicate using originalId
|
|
3083
|
-
* 4. Classify using rule engine
|
|
3084
|
-
* 5. Route low-confidence to Review Center
|
|
3085
|
-
* 6. Persist validated transactions
|
|
3086
|
-
*
|
|
3447
|
+
* Create an external account → BeanAccount mapping (ADR-0113)
|
|
3087
3448
|
* @param data The data for the request.
|
|
3088
|
-
* @param data.providerName Provider name
|
|
3089
3449
|
* @param data.region Region code for tenant context
|
|
3090
3450
|
* @param data.requestBody
|
|
3091
|
-
* @returns
|
|
3451
|
+
* @returns ExternalAccountLinkResponseDto Link created.
|
|
3092
3452
|
* @throws ApiError
|
|
3093
3453
|
*/
|
|
3094
|
-
public static
|
|
3095
|
-
data:
|
|
3096
|
-
): CancelablePromise<
|
|
3454
|
+
public static externalAccountLinkControllerCreate(
|
|
3455
|
+
data: ExternalAccountLinkControllerCreateData
|
|
3456
|
+
): CancelablePromise<ExternalAccountLinkControllerCreateResponse> {
|
|
3097
3457
|
return __request(OpenAPI, {
|
|
3098
3458
|
method: 'POST',
|
|
3099
|
-
url: '/api/v1/{region}/bean/
|
|
3459
|
+
url: '/api/v1/{region}/bean/external-account-links',
|
|
3100
3460
|
path: {
|
|
3101
|
-
providerName: data.providerName,
|
|
3102
3461
|
region: data.region
|
|
3103
3462
|
},
|
|
3104
3463
|
body: data.requestBody,
|
|
3105
3464
|
mediaType: 'application/json',
|
|
3106
3465
|
errors: {
|
|
3107
|
-
|
|
3108
|
-
401: 'Missing or invalid authentication',
|
|
3109
|
-
404: 'Provider not supported'
|
|
3466
|
+
422: 'beanAccountId not owned, or an active link already exists.'
|
|
3110
3467
|
}
|
|
3111
3468
|
});
|
|
3112
3469
|
}
|
|
3113
3470
|
|
|
3114
3471
|
/**
|
|
3115
|
-
*
|
|
3116
|
-
* Returns a list of all providers supported by the sync endpoint.
|
|
3472
|
+
* List the user's active external account links
|
|
3117
3473
|
* @param data The data for the request.
|
|
3474
|
+
* @param data.provider
|
|
3118
3475
|
* @param data.region Region code for tenant context
|
|
3119
|
-
* @returns
|
|
3476
|
+
* @returns ExternalAccountLinkListResponseDto Links retrieved.
|
|
3120
3477
|
* @throws ApiError
|
|
3121
3478
|
*/
|
|
3122
|
-
public static
|
|
3123
|
-
data:
|
|
3124
|
-
): CancelablePromise<
|
|
3479
|
+
public static externalAccountLinkControllerFindAll(
|
|
3480
|
+
data: ExternalAccountLinkControllerFindAllData
|
|
3481
|
+
): CancelablePromise<ExternalAccountLinkControllerFindAllResponse> {
|
|
3125
3482
|
return __request(OpenAPI, {
|
|
3126
3483
|
method: 'GET',
|
|
3127
|
-
url: '/api/v1/{region}/bean/
|
|
3484
|
+
url: '/api/v1/{region}/bean/external-account-links',
|
|
3128
3485
|
path: {
|
|
3129
3486
|
region: data.region
|
|
3130
3487
|
},
|
|
3131
|
-
|
|
3132
|
-
|
|
3488
|
+
query: {
|
|
3489
|
+
provider: data.provider
|
|
3133
3490
|
}
|
|
3134
3491
|
});
|
|
3135
3492
|
}
|
|
3136
3493
|
|
|
3137
3494
|
/**
|
|
3138
|
-
*
|
|
3139
|
-
* Returns whether a specific provider is supported.
|
|
3495
|
+
* Get a single external account link
|
|
3140
3496
|
* @param data The data for the request.
|
|
3141
|
-
* @param data.
|
|
3497
|
+
* @param data.id
|
|
3142
3498
|
* @param data.region Region code for tenant context
|
|
3143
|
-
* @returns
|
|
3499
|
+
* @returns ExternalAccountLinkResponseDto Link retrieved.
|
|
3144
3500
|
* @throws ApiError
|
|
3145
3501
|
*/
|
|
3146
|
-
public static
|
|
3147
|
-
data:
|
|
3148
|
-
): CancelablePromise<
|
|
3502
|
+
public static externalAccountLinkControllerFindOne(
|
|
3503
|
+
data: ExternalAccountLinkControllerFindOneData
|
|
3504
|
+
): CancelablePromise<ExternalAccountLinkControllerFindOneResponse> {
|
|
3149
3505
|
return __request(OpenAPI, {
|
|
3150
3506
|
method: 'GET',
|
|
3151
|
-
url: '/api/v1/{region}/bean/
|
|
3507
|
+
url: '/api/v1/{region}/bean/external-account-links/{id}',
|
|
3152
3508
|
path: {
|
|
3153
|
-
|
|
3509
|
+
id: data.id,
|
|
3154
3510
|
region: data.region
|
|
3155
3511
|
},
|
|
3156
3512
|
errors: {
|
|
3157
|
-
|
|
3513
|
+
422: 'Link not found or not owned by the user.'
|
|
3514
|
+
}
|
|
3515
|
+
});
|
|
3516
|
+
}
|
|
3517
|
+
|
|
3518
|
+
/**
|
|
3519
|
+
* Soft-delete (disconnect) an external account link
|
|
3520
|
+
* @param data The data for the request.
|
|
3521
|
+
* @param data.id
|
|
3522
|
+
* @param data.region Region code for tenant context
|
|
3523
|
+
* @returns void Link soft-deleted; historical transactions are unaffected.
|
|
3524
|
+
* @throws ApiError
|
|
3525
|
+
*/
|
|
3526
|
+
public static externalAccountLinkControllerRemove(
|
|
3527
|
+
data: ExternalAccountLinkControllerRemoveData
|
|
3528
|
+
): CancelablePromise<ExternalAccountLinkControllerRemoveResponse> {
|
|
3529
|
+
return __request(OpenAPI, {
|
|
3530
|
+
method: 'DELETE',
|
|
3531
|
+
url: '/api/v1/{region}/bean/external-account-links/{id}',
|
|
3532
|
+
path: {
|
|
3533
|
+
id: data.id,
|
|
3534
|
+
region: data.region
|
|
3158
3535
|
}
|
|
3159
3536
|
});
|
|
3160
3537
|
}
|
|
@@ -3318,361 +3695,180 @@ export class BeanNlpService {
|
|
|
3318
3695
|
}
|
|
3319
3696
|
}
|
|
3320
3697
|
|
|
3321
|
-
export class
|
|
3322
|
-
/**
|
|
3323
|
-
* Get net worth overview
|
|
3324
|
-
* Returns total net worth with breakdown of assets and liabilities
|
|
3325
|
-
* @param data The data for the request.
|
|
3326
|
-
* @param data.region Region code for tenant context
|
|
3327
|
-
* @param data.date Date for balance calculation (ISO 8601 format)
|
|
3328
|
-
* @returns NetWorthResponseDto Net worth retrieved successfully
|
|
3329
|
-
* @throws ApiError
|
|
3330
|
-
*/
|
|
3331
|
-
public static dashboardControllerGetNetWorth(
|
|
3332
|
-
data: DashboardControllerGetNetWorthData
|
|
3333
|
-
): CancelablePromise<DashboardControllerGetNetWorthResponse> {
|
|
3334
|
-
return __request(OpenAPI, {
|
|
3335
|
-
method: 'GET',
|
|
3336
|
-
url: '/api/v1/{region}/dashboard/net-worth',
|
|
3337
|
-
path: {
|
|
3338
|
-
region: data.region
|
|
3339
|
-
},
|
|
3340
|
-
query: {
|
|
3341
|
-
date: data.date
|
|
3342
|
-
},
|
|
3343
|
-
errors: {
|
|
3344
|
-
401: 'User not authenticated'
|
|
3345
|
-
}
|
|
3346
|
-
});
|
|
3347
|
-
}
|
|
3348
|
-
|
|
3349
|
-
/**
|
|
3350
|
-
* Get accounts grouped by platform
|
|
3351
|
-
* Returns accounts with balances grouped by financial platform
|
|
3352
|
-
* @param data The data for the request.
|
|
3353
|
-
* @param data.region Region code for tenant context
|
|
3354
|
-
* @param data.groupBy Grouping strategy
|
|
3355
|
-
* @param data.date Date for balance calculation (ISO 8601 format)
|
|
3356
|
-
* @param data.accountId Scope to a single account (only valid with groupBy=holdingAssetClass, ADR-0105 §6)
|
|
3357
|
-
* @returns unknown Accounts retrieved successfully. Response type depends on groupBy parameter.
|
|
3358
|
-
* @throws ApiError
|
|
3359
|
-
*/
|
|
3360
|
-
public static dashboardControllerGetAccounts(
|
|
3361
|
-
data: DashboardControllerGetAccountsData
|
|
3362
|
-
): CancelablePromise<DashboardControllerGetAccountsResponse> {
|
|
3363
|
-
return __request(OpenAPI, {
|
|
3364
|
-
method: 'GET',
|
|
3365
|
-
url: '/api/v1/{region}/dashboard/accounts',
|
|
3366
|
-
path: {
|
|
3367
|
-
region: data.region
|
|
3368
|
-
},
|
|
3369
|
-
query: {
|
|
3370
|
-
groupBy: data.groupBy,
|
|
3371
|
-
date: data.date,
|
|
3372
|
-
accountId: data.accountId
|
|
3373
|
-
},
|
|
3374
|
-
errors: {
|
|
3375
|
-
401: 'User not authenticated'
|
|
3376
|
-
}
|
|
3377
|
-
});
|
|
3378
|
-
}
|
|
3379
|
-
|
|
3380
|
-
/**
|
|
3381
|
-
* Get cash flow summary
|
|
3382
|
-
* Returns income, expenses, and savings for a monthly period
|
|
3383
|
-
* @param data The data for the request.
|
|
3384
|
-
* @param data.period Period in YYYY-MM format
|
|
3385
|
-
* @param data.region Region code for tenant context
|
|
3386
|
-
* @returns CashFlowResponseDto Cash flow retrieved successfully
|
|
3387
|
-
* @throws ApiError
|
|
3388
|
-
*/
|
|
3389
|
-
public static dashboardControllerGetCashFlow(
|
|
3390
|
-
data: DashboardControllerGetCashFlowData
|
|
3391
|
-
): CancelablePromise<DashboardControllerGetCashFlowResponse> {
|
|
3392
|
-
return __request(OpenAPI, {
|
|
3393
|
-
method: 'GET',
|
|
3394
|
-
url: '/api/v1/{region}/dashboard/cash-flow',
|
|
3395
|
-
path: {
|
|
3396
|
-
region: data.region
|
|
3397
|
-
},
|
|
3398
|
-
query: {
|
|
3399
|
-
period: data.period
|
|
3400
|
-
},
|
|
3401
|
-
errors: {
|
|
3402
|
-
400: 'Invalid period format',
|
|
3403
|
-
401: 'User not authenticated'
|
|
3404
|
-
}
|
|
3405
|
-
});
|
|
3406
|
-
}
|
|
3407
|
-
|
|
3408
|
-
/**
|
|
3409
|
-
* Get expenses/income grouped by functional category
|
|
3410
|
-
* 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)
|
|
3411
|
-
* @param data The data for the request.
|
|
3412
|
-
* @param data.region Region code for tenant context
|
|
3413
|
-
* @param data.groupBy Grouping strategy
|
|
3414
|
-
* @param data.period Time window (1m = current calendar month)
|
|
3415
|
-
* @param data.flow Account root to aggregate (expense → ^Expenses:, income → ^Income:)
|
|
3416
|
-
* @returns ExpensesByCategoryResponseDto Expenses retrieved successfully
|
|
3417
|
-
* @throws ApiError
|
|
3418
|
-
*/
|
|
3419
|
-
public static dashboardControllerGetExpenses(
|
|
3420
|
-
data: DashboardControllerGetExpensesData
|
|
3421
|
-
): CancelablePromise<DashboardControllerGetExpensesResponse> {
|
|
3422
|
-
return __request(OpenAPI, {
|
|
3423
|
-
method: 'GET',
|
|
3424
|
-
url: '/api/v1/{region}/dashboard/expenses',
|
|
3425
|
-
path: {
|
|
3426
|
-
region: data.region
|
|
3427
|
-
},
|
|
3428
|
-
query: {
|
|
3429
|
-
groupBy: data.groupBy,
|
|
3430
|
-
period: data.period,
|
|
3431
|
-
flow: data.flow
|
|
3432
|
-
},
|
|
3433
|
-
errors: {
|
|
3434
|
-
400: 'Invalid groupBy or period',
|
|
3435
|
-
401: 'User not authenticated'
|
|
3436
|
-
}
|
|
3437
|
-
});
|
|
3438
|
-
}
|
|
3439
|
-
}
|
|
3440
|
-
|
|
3441
|
-
export class InvestmentService {
|
|
3698
|
+
export class BeanPlatformsService {
|
|
3442
3699
|
/**
|
|
3443
|
-
* Get
|
|
3444
|
-
*
|
|
3445
|
-
* @param data The data for the request.
|
|
3446
|
-
* @param data.region Region code for tenant context
|
|
3447
|
-
* @param data.asOf As-of date (ISO 8601), defaults to today
|
|
3448
|
-
* @param data.accountId Scope to a single account
|
|
3449
|
-
* @param data.method Realized-P&L lot-matching method (default average). Does not affect the average-cost unrealized basis.
|
|
3450
|
-
* @returns HoldingPnlResponseDto Holding P&L retrieved successfully
|
|
3700
|
+
* Get all platforms with statistics
|
|
3701
|
+
* @returns unknown List of platforms with binding and account counts
|
|
3451
3702
|
* @throws ApiError
|
|
3452
3703
|
*/
|
|
3453
|
-
public static
|
|
3454
|
-
data: HoldingPnlControllerGetHoldingPnlData
|
|
3455
|
-
): CancelablePromise<HoldingPnlControllerGetHoldingPnlResponse> {
|
|
3704
|
+
public static platformControllerFindAll(): CancelablePromise<PlatformControllerFindAllResponse> {
|
|
3456
3705
|
return __request(OpenAPI, {
|
|
3457
3706
|
method: 'GET',
|
|
3458
|
-
url: '/api/v1/
|
|
3459
|
-
path: {
|
|
3460
|
-
region: data.region
|
|
3461
|
-
},
|
|
3462
|
-
query: {
|
|
3463
|
-
asOf: data.asOf,
|
|
3464
|
-
accountId: data.accountId,
|
|
3465
|
-
method: data.method
|
|
3466
|
-
},
|
|
3467
|
-
errors: {
|
|
3468
|
-
400: 'Invalid asOf format/value/future date, invalid accountId format, or unsupported method',
|
|
3469
|
-
401: 'User not authenticated'
|
|
3470
|
-
}
|
|
3707
|
+
url: '/api/v1/bean/platforms'
|
|
3471
3708
|
});
|
|
3472
3709
|
}
|
|
3473
|
-
}
|
|
3474
3710
|
|
|
3475
|
-
export class BeanPricesService {
|
|
3476
3711
|
/**
|
|
3477
|
-
* Create a new
|
|
3478
|
-
* Creates a new price entry for the authenticated user
|
|
3712
|
+
* Create a new platform
|
|
3479
3713
|
* @param data The data for the request.
|
|
3480
|
-
* @param data.region Region code for tenant context
|
|
3481
3714
|
* @param data.requestBody
|
|
3482
|
-
* @returns
|
|
3715
|
+
* @returns unknown Platform created successfully
|
|
3483
3716
|
* @throws ApiError
|
|
3484
3717
|
*/
|
|
3485
|
-
public static
|
|
3486
|
-
data:
|
|
3487
|
-
): CancelablePromise<
|
|
3718
|
+
public static platformControllerCreate(
|
|
3719
|
+
data: PlatformControllerCreateData
|
|
3720
|
+
): CancelablePromise<PlatformControllerCreateResponse> {
|
|
3488
3721
|
return __request(OpenAPI, {
|
|
3489
3722
|
method: 'POST',
|
|
3490
|
-
url: '/api/v1/
|
|
3491
|
-
path: {
|
|
3492
|
-
region: data.region
|
|
3493
|
-
},
|
|
3723
|
+
url: '/api/v1/bean/platforms',
|
|
3494
3724
|
body: data.requestBody,
|
|
3495
3725
|
mediaType: 'application/json',
|
|
3496
3726
|
errors: {
|
|
3497
|
-
|
|
3498
|
-
409: 'Price already exists for this currency pair and date'
|
|
3727
|
+
409: 'Platform already exists'
|
|
3499
3728
|
}
|
|
3500
3729
|
});
|
|
3501
3730
|
}
|
|
3502
3731
|
|
|
3503
3732
|
/**
|
|
3504
|
-
*
|
|
3505
|
-
* Returns all price entries for the authenticated user with optional filtering
|
|
3733
|
+
* Get platform list for current user
|
|
3506
3734
|
* @param data The data for the request.
|
|
3507
|
-
* @param data.region Region code
|
|
3508
|
-
* @
|
|
3509
|
-
* @param data.quoteCurrency Filter by quote currency (pricing currency, e.g., USD, CNY)
|
|
3510
|
-
* @param data.dateFrom Filter prices from this date (ISO 8601 format)
|
|
3511
|
-
* @param data.dateTo Filter prices to this date (ISO 8601 format)
|
|
3512
|
-
* @param data.search Search term for currency or quoteCurrency (case-insensitive partial match)
|
|
3513
|
-
* @param data.page Page number for pagination (default: 1)
|
|
3514
|
-
* @param data.limit Number of items per page (default: 20, max: 100)
|
|
3515
|
-
* @returns PriceListResponseDto Prices retrieved successfully
|
|
3735
|
+
* @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").
|
|
3736
|
+
* @returns PlatformListItemDto List of platforms with user binding status
|
|
3516
3737
|
* @throws ApiError
|
|
3517
3738
|
*/
|
|
3518
|
-
public static
|
|
3519
|
-
data:
|
|
3520
|
-
): CancelablePromise<
|
|
3739
|
+
public static platformControllerGetPlatformList(
|
|
3740
|
+
data: PlatformControllerGetPlatformListData = {}
|
|
3741
|
+
): CancelablePromise<PlatformControllerGetPlatformListResponse> {
|
|
3521
3742
|
return __request(OpenAPI, {
|
|
3522
3743
|
method: 'GET',
|
|
3523
|
-
url: '/api/v1/
|
|
3524
|
-
path: {
|
|
3525
|
-
region: data.region
|
|
3526
|
-
},
|
|
3744
|
+
url: '/api/v1/bean/platforms/list',
|
|
3527
3745
|
query: {
|
|
3528
|
-
|
|
3529
|
-
quoteCurrency: data.quoteCurrency,
|
|
3530
|
-
dateFrom: data.dateFrom,
|
|
3531
|
-
dateTo: data.dateTo,
|
|
3532
|
-
search: data.search,
|
|
3533
|
-
page: data.page,
|
|
3534
|
-
limit: data.limit
|
|
3746
|
+
region: data.region
|
|
3535
3747
|
}
|
|
3536
3748
|
});
|
|
3537
3749
|
}
|
|
3538
3750
|
|
|
3539
3751
|
/**
|
|
3540
|
-
*
|
|
3541
|
-
* Returns a single price entry by its ID
|
|
3752
|
+
* Match platforms by name or alias
|
|
3542
3753
|
* @param data The data for the request.
|
|
3543
|
-
* @param data.
|
|
3544
|
-
* @param data.region Region code
|
|
3545
|
-
* @returns
|
|
3754
|
+
* @param data.q Search query — Chinese name, English name, or abbreviation
|
|
3755
|
+
* @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").
|
|
3756
|
+
* @returns PlatformMatchResponseDto Matching platforms with overall match type and truncation flag
|
|
3546
3757
|
* @throws ApiError
|
|
3547
3758
|
*/
|
|
3548
|
-
public static
|
|
3549
|
-
data:
|
|
3550
|
-
): CancelablePromise<
|
|
3759
|
+
public static platformControllerMatchPlatforms(
|
|
3760
|
+
data: PlatformControllerMatchPlatformsData
|
|
3761
|
+
): CancelablePromise<PlatformControllerMatchPlatformsResponse> {
|
|
3551
3762
|
return __request(OpenAPI, {
|
|
3552
3763
|
method: 'GET',
|
|
3553
|
-
url: '/api/v1/
|
|
3554
|
-
|
|
3555
|
-
|
|
3764
|
+
url: '/api/v1/bean/platforms/match',
|
|
3765
|
+
query: {
|
|
3766
|
+
q: data.q,
|
|
3556
3767
|
region: data.region
|
|
3557
|
-
},
|
|
3558
|
-
errors: {
|
|
3559
|
-
404: 'Price not found'
|
|
3560
3768
|
}
|
|
3561
3769
|
});
|
|
3562
3770
|
}
|
|
3563
3771
|
|
|
3564
3772
|
/**
|
|
3565
|
-
* Update a
|
|
3566
|
-
* Updates an existing price entry
|
|
3773
|
+
* Update a platform
|
|
3567
3774
|
* @param data The data for the request.
|
|
3568
|
-
* @param data.id
|
|
3569
|
-
* @param data.region Region code for tenant context
|
|
3775
|
+
* @param data.id Platform ID
|
|
3570
3776
|
* @param data.requestBody
|
|
3571
|
-
* @returns
|
|
3777
|
+
* @returns unknown Platform updated successfully
|
|
3572
3778
|
* @throws ApiError
|
|
3573
3779
|
*/
|
|
3574
|
-
public static
|
|
3575
|
-
data:
|
|
3576
|
-
): CancelablePromise<
|
|
3780
|
+
public static platformControllerUpdate(
|
|
3781
|
+
data: PlatformControllerUpdateData
|
|
3782
|
+
): CancelablePromise<PlatformControllerUpdateResponse> {
|
|
3577
3783
|
return __request(OpenAPI, {
|
|
3578
3784
|
method: 'PUT',
|
|
3579
|
-
url: '/api/v1/
|
|
3785
|
+
url: '/api/v1/bean/platforms/{id}',
|
|
3580
3786
|
path: {
|
|
3581
|
-
id: data.id
|
|
3582
|
-
region: data.region
|
|
3787
|
+
id: data.id
|
|
3583
3788
|
},
|
|
3584
3789
|
body: data.requestBody,
|
|
3585
3790
|
mediaType: 'application/json',
|
|
3586
3791
|
errors: {
|
|
3587
|
-
404: '
|
|
3588
|
-
409: 'Updated price conflicts with existing price'
|
|
3792
|
+
404: 'Platform not found'
|
|
3589
3793
|
}
|
|
3590
3794
|
});
|
|
3591
3795
|
}
|
|
3592
3796
|
|
|
3593
3797
|
/**
|
|
3594
|
-
* Delete a
|
|
3595
|
-
* Deletes a price entry (hard delete)
|
|
3798
|
+
* Delete a platform
|
|
3596
3799
|
* @param data The data for the request.
|
|
3597
|
-
* @param data.id
|
|
3598
|
-
* @
|
|
3599
|
-
* @returns void Price deleted successfully
|
|
3800
|
+
* @param data.id Platform ID
|
|
3801
|
+
* @returns void Platform deleted successfully
|
|
3600
3802
|
* @throws ApiError
|
|
3601
3803
|
*/
|
|
3602
|
-
public static
|
|
3603
|
-
data:
|
|
3604
|
-
): CancelablePromise<
|
|
3804
|
+
public static platformControllerDelete(
|
|
3805
|
+
data: PlatformControllerDeleteData
|
|
3806
|
+
): CancelablePromise<PlatformControllerDeleteResponse> {
|
|
3605
3807
|
return __request(OpenAPI, {
|
|
3606
3808
|
method: 'DELETE',
|
|
3607
|
-
url: '/api/v1/
|
|
3809
|
+
url: '/api/v1/bean/platforms/{id}',
|
|
3608
3810
|
path: {
|
|
3609
|
-
id: data.id
|
|
3610
|
-
region: data.region
|
|
3811
|
+
id: data.id
|
|
3611
3812
|
},
|
|
3612
3813
|
errors: {
|
|
3613
|
-
404: '
|
|
3814
|
+
404: 'Platform not found'
|
|
3614
3815
|
}
|
|
3615
3816
|
});
|
|
3616
3817
|
}
|
|
3818
|
+
}
|
|
3617
3819
|
|
|
3820
|
+
export class DashboardService {
|
|
3618
3821
|
/**
|
|
3619
|
-
*
|
|
3620
|
-
*
|
|
3822
|
+
* Get net worth overview
|
|
3823
|
+
* Returns total net worth with breakdown of assets and liabilities
|
|
3621
3824
|
* @param data The data for the request.
|
|
3622
3825
|
* @param data.region Region code for tenant context
|
|
3623
|
-
* @param data.
|
|
3624
|
-
* @returns
|
|
3826
|
+
* @param data.date Date for balance calculation (ISO 8601 format)
|
|
3827
|
+
* @returns NetWorthResponseDto Net worth retrieved successfully
|
|
3625
3828
|
* @throws ApiError
|
|
3626
3829
|
*/
|
|
3627
|
-
public static
|
|
3628
|
-
data:
|
|
3629
|
-
): CancelablePromise<
|
|
3830
|
+
public static dashboardControllerGetNetWorth(
|
|
3831
|
+
data: DashboardControllerGetNetWorthData
|
|
3832
|
+
): CancelablePromise<DashboardControllerGetNetWorthResponse> {
|
|
3630
3833
|
return __request(OpenAPI, {
|
|
3631
|
-
method: '
|
|
3632
|
-
url: '/api/v1/{region}/
|
|
3834
|
+
method: 'GET',
|
|
3835
|
+
url: '/api/v1/{region}/dashboard/net-worth',
|
|
3633
3836
|
path: {
|
|
3634
3837
|
region: data.region
|
|
3635
3838
|
},
|
|
3636
|
-
|
|
3637
|
-
|
|
3839
|
+
query: {
|
|
3840
|
+
date: data.date
|
|
3841
|
+
},
|
|
3842
|
+
errors: {
|
|
3843
|
+
401: 'User not authenticated'
|
|
3844
|
+
}
|
|
3638
3845
|
});
|
|
3639
3846
|
}
|
|
3640
|
-
}
|
|
3641
3847
|
|
|
3642
|
-
export class ReportingService {
|
|
3643
3848
|
/**
|
|
3644
|
-
* Get
|
|
3645
|
-
*
|
|
3646
|
-
* Returns time series data of portfolio net worth.
|
|
3647
|
-
*
|
|
3648
|
-
* **Multi-currency Support:**
|
|
3649
|
-
* - `series[].byCurrency` - Currency breakdown for each data point
|
|
3650
|
-
* - `byCurrency` - Separate time series grouped by currency
|
|
3651
|
-
* - `warnings` - Exchange rate warnings if conversion failed
|
|
3652
|
-
*
|
|
3653
|
-
* **Parameters:**
|
|
3654
|
-
* - `period`: Time period (1m, 3m, 6m, 1y)
|
|
3655
|
-
* - `granularity`: Data granularity (day, week, month)
|
|
3656
|
-
*
|
|
3849
|
+
* Get accounts grouped by platform
|
|
3850
|
+
* Returns accounts with balances grouped by financial platform
|
|
3657
3851
|
* @param data The data for the request.
|
|
3658
3852
|
* @param data.region Region code for tenant context
|
|
3659
|
-
* @param data.
|
|
3660
|
-
* @param data.
|
|
3661
|
-
* @
|
|
3853
|
+
* @param data.groupBy Grouping strategy
|
|
3854
|
+
* @param data.date Date for balance calculation (ISO 8601 format)
|
|
3855
|
+
* @param data.accountId Scope to a single account (only valid with groupBy=holdingAssetClass, ADR-0105 §6)
|
|
3856
|
+
* @returns unknown Accounts retrieved successfully. Response type depends on groupBy parameter.
|
|
3662
3857
|
* @throws ApiError
|
|
3663
3858
|
*/
|
|
3664
|
-
public static
|
|
3665
|
-
data:
|
|
3666
|
-
): CancelablePromise<
|
|
3859
|
+
public static dashboardControllerGetAccounts(
|
|
3860
|
+
data: DashboardControllerGetAccountsData
|
|
3861
|
+
): CancelablePromise<DashboardControllerGetAccountsResponse> {
|
|
3667
3862
|
return __request(OpenAPI, {
|
|
3668
3863
|
method: 'GET',
|
|
3669
|
-
url: '/api/v1/{region}/
|
|
3864
|
+
url: '/api/v1/{region}/dashboard/accounts',
|
|
3670
3865
|
path: {
|
|
3671
3866
|
region: data.region
|
|
3672
3867
|
},
|
|
3673
3868
|
query: {
|
|
3674
|
-
|
|
3675
|
-
|
|
3869
|
+
groupBy: data.groupBy,
|
|
3870
|
+
date: data.date,
|
|
3871
|
+
accountId: data.accountId
|
|
3676
3872
|
},
|
|
3677
3873
|
errors: {
|
|
3678
3874
|
401: 'User not authenticated'
|
|
@@ -3681,116 +3877,95 @@ export class ReportingService {
|
|
|
3681
3877
|
}
|
|
3682
3878
|
|
|
3683
3879
|
/**
|
|
3684
|
-
* Get cash
|
|
3685
|
-
*
|
|
3686
|
-
* Monthly income / expense / netSavings over a fixed N-month window
|
|
3687
|
-
* (current month + N−1 prior). Missing months are zero-filled (flow metric).
|
|
3688
|
-
*
|
|
3689
|
-
* **Parameters:**
|
|
3690
|
-
* - `period`: 1m | 3m | 6m | 1y (default 6m)
|
|
3691
|
-
* - `granularity`: accepted for API symmetry; v1 returns month buckets
|
|
3692
|
-
*
|
|
3880
|
+
* Get cash flow summary
|
|
3881
|
+
* Returns income, expenses, and savings for a monthly period
|
|
3693
3882
|
* @param data The data for the request.
|
|
3883
|
+
* @param data.period Period in YYYY-MM format
|
|
3694
3884
|
* @param data.region Region code for tenant context
|
|
3695
|
-
* @
|
|
3696
|
-
* @param data.granularity Data granularity (accepted for API symmetry; v1 returns month buckets)
|
|
3697
|
-
* @returns CashFlowTrendsResponseDto Cash-flow trends retrieved successfully
|
|
3885
|
+
* @returns CashFlowResponseDto Cash flow retrieved successfully
|
|
3698
3886
|
* @throws ApiError
|
|
3699
3887
|
*/
|
|
3700
|
-
public static
|
|
3701
|
-
data:
|
|
3702
|
-
): CancelablePromise<
|
|
3888
|
+
public static dashboardControllerGetCashFlow(
|
|
3889
|
+
data: DashboardControllerGetCashFlowData
|
|
3890
|
+
): CancelablePromise<DashboardControllerGetCashFlowResponse> {
|
|
3703
3891
|
return __request(OpenAPI, {
|
|
3704
3892
|
method: 'GET',
|
|
3705
|
-
url: '/api/v1/{region}/
|
|
3893
|
+
url: '/api/v1/{region}/dashboard/cash-flow',
|
|
3706
3894
|
path: {
|
|
3707
3895
|
region: data.region
|
|
3708
3896
|
},
|
|
3709
3897
|
query: {
|
|
3710
|
-
period: data.period
|
|
3711
|
-
granularity: data.granularity
|
|
3898
|
+
period: data.period
|
|
3712
3899
|
},
|
|
3713
3900
|
errors: {
|
|
3901
|
+
400: 'Invalid period format',
|
|
3714
3902
|
401: 'User not authenticated'
|
|
3715
3903
|
}
|
|
3716
3904
|
});
|
|
3717
3905
|
}
|
|
3718
3906
|
|
|
3719
3907
|
/**
|
|
3720
|
-
*
|
|
3721
|
-
*
|
|
3722
|
-
* Manually generate a portfolio snapshot for a specific date.
|
|
3723
|
-
*
|
|
3724
|
-
* **Multi-currency Support:**
|
|
3725
|
-
* - Fetches balances grouped by currency
|
|
3726
|
-
* - Uses user's baseCurrency setting for conversion
|
|
3727
|
-
* - Stores exchange rates and warnings
|
|
3728
|
-
*
|
|
3729
|
-
* **Use Cases:**
|
|
3730
|
-
* - Testing snapshot generation
|
|
3731
|
-
* - Force regeneration after data correction
|
|
3732
|
-
* - Initial setup for new users
|
|
3733
|
-
*
|
|
3908
|
+
* Get expenses/income grouped by functional category
|
|
3909
|
+
* 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)
|
|
3734
3910
|
* @param data The data for the request.
|
|
3735
3911
|
* @param data.region Region code for tenant context
|
|
3736
|
-
* @param data.
|
|
3737
|
-
* @
|
|
3912
|
+
* @param data.groupBy Grouping strategy
|
|
3913
|
+
* @param data.period Time window (1m = current calendar month)
|
|
3914
|
+
* @param data.flow Account root to aggregate (expense → ^Expenses:, income → ^Income:)
|
|
3915
|
+
* @returns ExpensesByCategoryResponseDto Expenses retrieved successfully
|
|
3738
3916
|
* @throws ApiError
|
|
3739
3917
|
*/
|
|
3740
|
-
public static
|
|
3741
|
-
data:
|
|
3742
|
-
): CancelablePromise<
|
|
3918
|
+
public static dashboardControllerGetExpenses(
|
|
3919
|
+
data: DashboardControllerGetExpensesData
|
|
3920
|
+
): CancelablePromise<DashboardControllerGetExpensesResponse> {
|
|
3743
3921
|
return __request(OpenAPI, {
|
|
3744
|
-
method: '
|
|
3745
|
-
url: '/api/v1/{region}/
|
|
3922
|
+
method: 'GET',
|
|
3923
|
+
url: '/api/v1/{region}/dashboard/expenses',
|
|
3746
3924
|
path: {
|
|
3747
3925
|
region: data.region
|
|
3748
3926
|
},
|
|
3749
|
-
|
|
3750
|
-
|
|
3927
|
+
query: {
|
|
3928
|
+
groupBy: data.groupBy,
|
|
3929
|
+
period: data.period,
|
|
3930
|
+
flow: data.flow
|
|
3931
|
+
},
|
|
3751
3932
|
errors: {
|
|
3752
|
-
400: 'Invalid
|
|
3933
|
+
400: 'Invalid groupBy or period',
|
|
3753
3934
|
401: 'User not authenticated'
|
|
3754
3935
|
}
|
|
3755
3936
|
});
|
|
3756
3937
|
}
|
|
3938
|
+
}
|
|
3757
3939
|
|
|
3940
|
+
export class InvestmentService {
|
|
3758
3941
|
/**
|
|
3759
|
-
*
|
|
3760
|
-
*
|
|
3761
|
-
* Generate snapshots for a date range (historical data backfill).
|
|
3762
|
-
*
|
|
3763
|
-
* **Multi-currency Support:**
|
|
3764
|
-
* - Each snapshot includes multi-currency data
|
|
3765
|
-
* - Uses exchange rates available at generation time
|
|
3766
|
-
* - Warnings stored for missing exchange rates
|
|
3767
|
-
*
|
|
3768
|
-
* **Best Practices:**
|
|
3769
|
-
* - Use for initial setup after account configuration
|
|
3770
|
-
* - Run during low-traffic periods for large date ranges
|
|
3771
|
-
* - Existing snapshots are skipped (not regenerated)
|
|
3772
|
-
*
|
|
3942
|
+
* Get per-holding unrealized + realized P&L
|
|
3943
|
+
* Average-cost unrealized P&L per account × commodity, plus cumulative realized P&L on sold lots (method = FIFO | average, default average).
|
|
3773
3944
|
* @param data The data for the request.
|
|
3774
3945
|
* @param data.region Region code for tenant context
|
|
3775
|
-
* @param data.
|
|
3776
|
-
* @
|
|
3946
|
+
* @param data.asOf As-of date (ISO 8601), defaults to today
|
|
3947
|
+
* @param data.accountId Scope to a single account
|
|
3948
|
+
* @param data.method Realized-P&L lot-matching method (default average). Does not affect the average-cost unrealized basis.
|
|
3949
|
+
* @returns HoldingPnlResponseDto Holding P&L retrieved successfully
|
|
3777
3950
|
* @throws ApiError
|
|
3778
3951
|
*/
|
|
3779
|
-
public static
|
|
3780
|
-
data:
|
|
3781
|
-
): CancelablePromise<
|
|
3952
|
+
public static holdingPnlControllerGetHoldingPnl(
|
|
3953
|
+
data: HoldingPnlControllerGetHoldingPnlData
|
|
3954
|
+
): CancelablePromise<HoldingPnlControllerGetHoldingPnlResponse> {
|
|
3782
3955
|
return __request(OpenAPI, {
|
|
3783
|
-
method: '
|
|
3784
|
-
url: '/api/v1/{region}/
|
|
3956
|
+
method: 'GET',
|
|
3957
|
+
url: '/api/v1/{region}/investment/holdings/pnl',
|
|
3785
3958
|
path: {
|
|
3786
3959
|
region: data.region
|
|
3787
3960
|
},
|
|
3788
|
-
|
|
3789
|
-
|
|
3961
|
+
query: {
|
|
3962
|
+
asOf: data.asOf,
|
|
3963
|
+
accountId: data.accountId,
|
|
3964
|
+
method: data.method
|
|
3965
|
+
},
|
|
3790
3966
|
errors: {
|
|
3791
|
-
400: 'Invalid date format or
|
|
3792
|
-
401: 'User not authenticated'
|
|
3793
|
-
409: 'Backfill already in progress for this user'
|
|
3967
|
+
400: 'Invalid asOf format/value/future date, invalid accountId format, or unsupported method',
|
|
3968
|
+
401: 'User not authenticated'
|
|
3794
3969
|
}
|
|
3795
3970
|
});
|
|
3796
3971
|
}
|
|
@@ -3819,7 +3994,7 @@ export class AuthService {
|
|
|
3819
3994
|
* Anonymous login with access token
|
|
3820
3995
|
* @param data The data for the request.
|
|
3821
3996
|
* @param data.requestBody
|
|
3822
|
-
* @returns
|
|
3997
|
+
* @returns AnonymousLoginResponseDto Login successful
|
|
3823
3998
|
* @throws ApiError
|
|
3824
3999
|
*/
|
|
3825
4000
|
public static authControllerAccessTokenLogin(
|
|
@@ -4006,3 +4181,53 @@ export class InfoService {
|
|
|
4006
4181
|
});
|
|
4007
4182
|
}
|
|
4008
4183
|
}
|
|
4184
|
+
|
|
4185
|
+
export class MarketDataService {
|
|
4186
|
+
/**
|
|
4187
|
+
* Search market symbols by name or code
|
|
4188
|
+
* Ranked search over the openbb catalog. Empty `q` returns [].
|
|
4189
|
+
* @param data The data for the request.
|
|
4190
|
+
* @param data.q Search term — matched against symbol and instrument name. Empty string returns [].
|
|
4191
|
+
* @param data.limit Maximum number of results (clamped 1..50)
|
|
4192
|
+
* @param data.exchange Filter by exchange code (e.g. US, HK, SS, SZ)
|
|
4193
|
+
* @param data.assetType Filter by OpenBB asset_type (e.g. stock, etf)
|
|
4194
|
+
* @returns SymbolSearchResultDto Ranked search results
|
|
4195
|
+
* @throws ApiError
|
|
4196
|
+
*/
|
|
4197
|
+
public static symbolControllerSearch(
|
|
4198
|
+
data: SymbolControllerSearchData
|
|
4199
|
+
): CancelablePromise<SymbolControllerSearchResponse> {
|
|
4200
|
+
return __request(OpenAPI, {
|
|
4201
|
+
method: 'GET',
|
|
4202
|
+
url: '/api/v1/market/symbols/search',
|
|
4203
|
+
query: {
|
|
4204
|
+
q: data.q,
|
|
4205
|
+
limit: data.limit,
|
|
4206
|
+
exchange: data.exchange,
|
|
4207
|
+
assetType: data.assetType
|
|
4208
|
+
}
|
|
4209
|
+
});
|
|
4210
|
+
}
|
|
4211
|
+
|
|
4212
|
+
/**
|
|
4213
|
+
* Get a market symbol quote
|
|
4214
|
+
* @param data The data for the request.
|
|
4215
|
+
* @param data.symbol
|
|
4216
|
+
* @returns SymbolQuoteDto Symbol quote
|
|
4217
|
+
* @throws ApiError
|
|
4218
|
+
*/
|
|
4219
|
+
public static symbolControllerGetQuote(
|
|
4220
|
+
data: SymbolControllerGetQuoteData
|
|
4221
|
+
): CancelablePromise<SymbolControllerGetQuoteResponse> {
|
|
4222
|
+
return __request(OpenAPI, {
|
|
4223
|
+
method: 'GET',
|
|
4224
|
+
url: '/api/v1/market/symbols/{symbol}/quote',
|
|
4225
|
+
path: {
|
|
4226
|
+
symbol: data.symbol
|
|
4227
|
+
},
|
|
4228
|
+
errors: {
|
|
4229
|
+
404: 'Symbol not found in the openbb catalog'
|
|
4230
|
+
}
|
|
4231
|
+
});
|
|
4232
|
+
}
|
|
4233
|
+
}
|