@firela/api-types 0.0.0-canary.cf050c09 → 0.0.0-canary.d190ee29
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 +4615 -2521
- package/dist/index.d.ts +4615 -2521
- package/dist/index.js +34 -6
- package/dist/index.mjs +34 -6
- package/package.json +1 -1
- package/src/generated/schemas.gen.ts +2846 -723
- package/src/generated/services.gen.ts +1309 -410
- package/src/generated/types.gen.ts +7882 -2834
|
@@ -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,50 @@ import type {
|
|
|
171
173
|
PropertyControllerUpdateResponse,
|
|
172
174
|
PropertyControllerDeleteData,
|
|
173
175
|
PropertyControllerDeleteResponse,
|
|
176
|
+
TransactionRuleControllerCreateData,
|
|
177
|
+
TransactionRuleControllerCreateResponse,
|
|
178
|
+
TransactionRuleControllerListData,
|
|
179
|
+
TransactionRuleControllerListResponse,
|
|
180
|
+
TransactionRuleControllerValidateData,
|
|
181
|
+
TransactionRuleControllerValidateResponse,
|
|
182
|
+
TransactionRuleControllerBulkCreateData,
|
|
183
|
+
TransactionRuleControllerBulkCreateResponse,
|
|
184
|
+
TransactionRuleControllerExportData,
|
|
185
|
+
TransactionRuleControllerExportResponse,
|
|
186
|
+
TransactionRuleControllerGetStatisticsData,
|
|
187
|
+
TransactionRuleControllerGetStatisticsResponse,
|
|
188
|
+
TransactionRuleControllerGetDetailData,
|
|
189
|
+
TransactionRuleControllerGetDetailResponse,
|
|
190
|
+
TransactionRuleControllerUpdateData,
|
|
191
|
+
TransactionRuleControllerUpdateResponse,
|
|
192
|
+
TransactionRuleControllerDeleteData,
|
|
193
|
+
TransactionRuleControllerDeleteResponse,
|
|
194
|
+
TransactionRuleControllerTestData,
|
|
195
|
+
TransactionRuleControllerTestResponse,
|
|
196
|
+
CategoryCatalogControllerListData,
|
|
197
|
+
CategoryCatalogControllerListResponse,
|
|
198
|
+
EventControllerCreateData,
|
|
199
|
+
EventControllerCreateResponse,
|
|
200
|
+
EventControllerFindAllData,
|
|
201
|
+
EventControllerFindAllResponse,
|
|
202
|
+
EventControllerFindOneData,
|
|
203
|
+
EventControllerFindOneResponse,
|
|
204
|
+
EventControllerUpdateData,
|
|
205
|
+
EventControllerUpdateResponse,
|
|
206
|
+
EventControllerDeleteData,
|
|
207
|
+
EventControllerDeleteResponse,
|
|
208
|
+
EventControllerGetSliceData,
|
|
209
|
+
EventControllerGetSliceResponse,
|
|
210
|
+
OnboardingControllerBootstrapData,
|
|
211
|
+
OnboardingControllerBootstrapResponse,
|
|
212
|
+
ReconciliationControllerComputeData,
|
|
213
|
+
ReconciliationControllerComputeResponse,
|
|
214
|
+
ReconciliationControllerAssertData,
|
|
215
|
+
ReconciliationControllerAssertResponse,
|
|
216
|
+
ReconciliationControllerPadData,
|
|
217
|
+
ReconciliationControllerPadResponse,
|
|
218
|
+
ReconciliationControllerHistoryData,
|
|
219
|
+
ReconciliationControllerHistoryResponse,
|
|
174
220
|
ExportControllerExportBeancountResponse,
|
|
175
221
|
FileImportControllerImportFileData,
|
|
176
222
|
FileImportControllerImportFileResponse,
|
|
@@ -184,42 +230,53 @@ import type {
|
|
|
184
230
|
ImporterConfigControllerUpdateConfigResponse,
|
|
185
231
|
ImporterConfigControllerResetConfigData,
|
|
186
232
|
ImporterConfigControllerResetConfigResponse,
|
|
187
|
-
PlatformControllerFindAllResponse,
|
|
188
|
-
PlatformControllerCreateData,
|
|
189
|
-
PlatformControllerCreateResponse,
|
|
190
|
-
PlatformControllerGetPlatformListResponse,
|
|
191
|
-
PlatformControllerMatchPlatformsData,
|
|
192
|
-
PlatformControllerMatchPlatformsResponse,
|
|
193
|
-
PlatformControllerUpdateData,
|
|
194
|
-
PlatformControllerUpdateResponse,
|
|
195
|
-
PlatformControllerDeleteData,
|
|
196
|
-
PlatformControllerDeleteResponse,
|
|
197
233
|
ProviderSyncControllerSyncData,
|
|
198
234
|
ProviderSyncControllerSyncResponse,
|
|
199
235
|
ProviderSyncControllerGetSupportedProvidersData,
|
|
200
236
|
ProviderSyncControllerGetSupportedProvidersResponse,
|
|
201
237
|
ProviderSyncControllerIsProviderSupportedData,
|
|
202
238
|
ProviderSyncControllerIsProviderSupportedResponse,
|
|
239
|
+
ExternalAccountLinkControllerCreateData,
|
|
240
|
+
ExternalAccountLinkControllerCreateResponse,
|
|
241
|
+
ExternalAccountLinkControllerFindAllData,
|
|
242
|
+
ExternalAccountLinkControllerFindAllResponse,
|
|
243
|
+
ExternalAccountLinkControllerFindOneData,
|
|
244
|
+
ExternalAccountLinkControllerFindOneResponse,
|
|
245
|
+
ExternalAccountLinkControllerRemoveData,
|
|
246
|
+
ExternalAccountLinkControllerRemoveResponse,
|
|
203
247
|
TelemetryControllerReportTelemetryData,
|
|
204
248
|
TelemetryControllerReportTelemetryResponse,
|
|
249
|
+
TelemetryControllerReportCoverageMissData,
|
|
250
|
+
TelemetryControllerReportCoverageMissResponse,
|
|
251
|
+
TelemetryControllerGetCoverageMetricsData,
|
|
252
|
+
TelemetryControllerGetCoverageMetricsResponse,
|
|
205
253
|
NlpControllerProcessNaturalLanguageData,
|
|
206
254
|
NlpControllerProcessNaturalLanguageResponse,
|
|
207
255
|
NlpControllerClearSessionData,
|
|
208
256
|
NlpControllerClearSessionResponse,
|
|
209
257
|
NlpControllerGetSessionData,
|
|
210
258
|
NlpControllerGetSessionResponse,
|
|
259
|
+
PlatformControllerFindAllResponse,
|
|
260
|
+
PlatformControllerCreateData,
|
|
261
|
+
PlatformControllerCreateResponse,
|
|
262
|
+
PlatformControllerGetPlatformListData,
|
|
263
|
+
PlatformControllerGetPlatformListResponse,
|
|
264
|
+
PlatformControllerMatchPlatformsData,
|
|
265
|
+
PlatformControllerMatchPlatformsResponse,
|
|
266
|
+
PlatformControllerUpdateData,
|
|
267
|
+
PlatformControllerUpdateResponse,
|
|
268
|
+
PlatformControllerDeleteData,
|
|
269
|
+
PlatformControllerDeleteResponse,
|
|
211
270
|
DashboardControllerGetNetWorthData,
|
|
212
271
|
DashboardControllerGetNetWorthResponse,
|
|
213
272
|
DashboardControllerGetAccountsData,
|
|
214
273
|
DashboardControllerGetAccountsResponse,
|
|
215
274
|
DashboardControllerGetCashFlowData,
|
|
216
275
|
DashboardControllerGetCashFlowResponse,
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
ReportingControllerBackfillSnapshotsData,
|
|
222
|
-
ReportingControllerBackfillSnapshotsResponse,
|
|
276
|
+
DashboardControllerGetExpensesData,
|
|
277
|
+
DashboardControllerGetExpensesResponse,
|
|
278
|
+
HoldingPnlControllerGetHoldingPnlData,
|
|
279
|
+
HoldingPnlControllerGetHoldingPnlResponse,
|
|
223
280
|
ApiKeysControllerCreateApiKeyResponse,
|
|
224
281
|
AuthControllerAccessTokenLoginData,
|
|
225
282
|
AuthControllerAccessTokenLoginResponse,
|
|
@@ -234,7 +291,11 @@ import type {
|
|
|
234
291
|
HealthControllerResetCircuitBreakerData,
|
|
235
292
|
HealthControllerResetCircuitBreakerResponse,
|
|
236
293
|
HealthControllerGetMetricsResponse,
|
|
237
|
-
InfoControllerGetInfoResponse
|
|
294
|
+
InfoControllerGetInfoResponse,
|
|
295
|
+
SymbolControllerSearchData,
|
|
296
|
+
SymbolControllerSearchResponse,
|
|
297
|
+
SymbolControllerGetQuoteData,
|
|
298
|
+
SymbolControllerGetQuoteResponse
|
|
238
299
|
} from './types.gen';
|
|
239
300
|
|
|
240
301
|
export class BeanAccountsService {
|
|
@@ -272,7 +333,7 @@ export class BeanAccountsService {
|
|
|
272
333
|
* @param data.type Filter by account type
|
|
273
334
|
* @param data.status Filter by status
|
|
274
335
|
* @param data.isCustom Filter by custom (user-created) accounts only
|
|
275
|
-
* @param data.search Search term for path
|
|
336
|
+
* @param data.search Search term for account path
|
|
276
337
|
* @param data.limit Maximum number of results
|
|
277
338
|
* @param data.offset Number of results to skip
|
|
278
339
|
* @returns AccountListResponseDto Accounts retrieved successfully
|
|
@@ -353,7 +414,7 @@ export class BeanAccountsService {
|
|
|
353
414
|
|
|
354
415
|
/**
|
|
355
416
|
* Delete account
|
|
356
|
-
* Deletes an account (only if no transactions)
|
|
417
|
+
* Deletes an account (only if no active transactions; voided/superseded residual postings are cleaned up)
|
|
357
418
|
* @param data The data for the request.
|
|
358
419
|
* @param data.id Account UUID
|
|
359
420
|
* @param data.region Region code for tenant context
|
|
@@ -372,7 +433,7 @@ export class BeanAccountsService {
|
|
|
372
433
|
},
|
|
373
434
|
errors: {
|
|
374
435
|
404: 'Account not found',
|
|
375
|
-
409: 'Account has transactions and cannot be deleted'
|
|
436
|
+
409: 'Account has active transactions and cannot be deleted'
|
|
376
437
|
}
|
|
377
438
|
});
|
|
378
439
|
}
|
|
@@ -434,6 +495,35 @@ export class BeanAccountsService {
|
|
|
434
495
|
}
|
|
435
496
|
});
|
|
436
497
|
}
|
|
498
|
+
|
|
499
|
+
/**
|
|
500
|
+
* Post an opening-balance transaction
|
|
501
|
+
* Posts a double-entry opening-balance transaction against Equity:Opening-Balances for an existing Assets/Liabilities account. At most one active opening balance per account.
|
|
502
|
+
* @param data The data for the request.
|
|
503
|
+
* @param data.id Account UUID
|
|
504
|
+
* @param data.region Region code for tenant context
|
|
505
|
+
* @param data.requestBody
|
|
506
|
+
* @returns OpeningBalanceResultDto Opening-balance transaction created
|
|
507
|
+
* @throws ApiError
|
|
508
|
+
*/
|
|
509
|
+
public static accountControllerAddOpeningBalance(
|
|
510
|
+
data: AccountControllerAddOpeningBalanceData
|
|
511
|
+
): CancelablePromise<AccountControllerAddOpeningBalanceResponse> {
|
|
512
|
+
return __request(OpenAPI, {
|
|
513
|
+
method: 'POST',
|
|
514
|
+
url: '/api/v1/{region}/bean/accounts/{id}/opening-balance',
|
|
515
|
+
path: {
|
|
516
|
+
id: data.id,
|
|
517
|
+
region: data.region
|
|
518
|
+
},
|
|
519
|
+
body: data.requestBody,
|
|
520
|
+
mediaType: 'application/json',
|
|
521
|
+
errors: {
|
|
522
|
+
404: 'Account not found',
|
|
523
|
+
409: 'An opening balance already exists for this account'
|
|
524
|
+
}
|
|
525
|
+
});
|
|
526
|
+
}
|
|
437
527
|
}
|
|
438
528
|
|
|
439
529
|
export class BeanAccountStandardsService {
|
|
@@ -465,7 +555,7 @@ export class BeanAccountStandardsService {
|
|
|
465
555
|
|
|
466
556
|
/**
|
|
467
557
|
* Get template metadata for an account path
|
|
468
|
-
* Returns
|
|
558
|
+
* Returns root type for a template path.
|
|
469
559
|
* @param data The data for the request.
|
|
470
560
|
* @param data.region Region code for tenant context
|
|
471
561
|
* @param data.path Account path to check
|
|
@@ -551,6 +641,7 @@ export class BeanTransactionsService {
|
|
|
551
641
|
* @param data.status Filter by transaction status
|
|
552
642
|
* @param data.search Search in narration and payee fields (max 200 chars)
|
|
553
643
|
* @param data.accountId Filter by account ID (transactions with postings to this account)
|
|
644
|
+
* @param data.category Filter by ADR-0075 functional category (Group segment); matches any posting to an Expenses/Income account whose derived Group segment equals this value
|
|
554
645
|
* @returns TransactionListResponseDto Transaction list
|
|
555
646
|
* @throws ApiError
|
|
556
647
|
*/
|
|
@@ -570,7 +661,8 @@ export class BeanTransactionsService {
|
|
|
570
661
|
dateTo: data.dateTo,
|
|
571
662
|
status: data.status,
|
|
572
663
|
search: data.search,
|
|
573
|
-
accountId: data.accountId
|
|
664
|
+
accountId: data.accountId,
|
|
665
|
+
category: data.category
|
|
574
666
|
},
|
|
575
667
|
errors: {
|
|
576
668
|
400: 'Validation failed',
|
|
@@ -758,7 +850,7 @@ export class BeanBalancesService {
|
|
|
758
850
|
* Query account balance
|
|
759
851
|
* Calculate account balance at a specific date for a single currency
|
|
760
852
|
* @param data The data for the request.
|
|
761
|
-
* @param data.account Account name (e.g., "Assets:
|
|
853
|
+
* @param data.account Account name (e.g., "Assets:Checking")
|
|
762
854
|
* @param data.region Region code for tenant context
|
|
763
855
|
* @param data.date Date to calculate balance at (ISO 8601 format)
|
|
764
856
|
* @param data.currency Currency to query (e.g., "USD", "CNY")
|
|
@@ -1479,6 +1571,173 @@ export class BeanCommoditiesService {
|
|
|
1479
1571
|
}
|
|
1480
1572
|
}
|
|
1481
1573
|
|
|
1574
|
+
export class BeanPricesService {
|
|
1575
|
+
/**
|
|
1576
|
+
* Create a new price
|
|
1577
|
+
* Creates a new price entry for the authenticated user
|
|
1578
|
+
* @param data The data for the request.
|
|
1579
|
+
* @param data.region Region code for tenant context
|
|
1580
|
+
* @param data.requestBody
|
|
1581
|
+
* @returns PriceResponseDto Price created successfully
|
|
1582
|
+
* @throws ApiError
|
|
1583
|
+
*/
|
|
1584
|
+
public static priceControllerCreate(
|
|
1585
|
+
data: PriceControllerCreateData
|
|
1586
|
+
): CancelablePromise<PriceControllerCreateResponse> {
|
|
1587
|
+
return __request(OpenAPI, {
|
|
1588
|
+
method: 'POST',
|
|
1589
|
+
url: '/api/v1/{region}/bean/prices',
|
|
1590
|
+
path: {
|
|
1591
|
+
region: data.region
|
|
1592
|
+
},
|
|
1593
|
+
body: data.requestBody,
|
|
1594
|
+
mediaType: 'application/json',
|
|
1595
|
+
errors: {
|
|
1596
|
+
404: 'Currency or quoteCurrency commodity not found',
|
|
1597
|
+
409: 'Price already exists for this currency pair and date'
|
|
1598
|
+
}
|
|
1599
|
+
});
|
|
1600
|
+
}
|
|
1601
|
+
|
|
1602
|
+
/**
|
|
1603
|
+
* List user prices
|
|
1604
|
+
* Returns all price entries for the authenticated user with optional filtering
|
|
1605
|
+
* @param data The data for the request.
|
|
1606
|
+
* @param data.region Region code for tenant context
|
|
1607
|
+
* @param data.currency Filter by currency (e.g., BTC, AAPL, USD)
|
|
1608
|
+
* @param data.quoteCurrency Filter by quote currency (pricing currency, e.g., USD, CNY)
|
|
1609
|
+
* @param data.dateFrom Filter prices from this date (ISO 8601 format)
|
|
1610
|
+
* @param data.dateTo Filter prices to this date (ISO 8601 format)
|
|
1611
|
+
* @param data.search Search term for currency or quoteCurrency (case-insensitive partial match)
|
|
1612
|
+
* @param data.page Page number for pagination (default: 1)
|
|
1613
|
+
* @param data.limit Number of items per page (default: 20, max: 100)
|
|
1614
|
+
* @returns PriceListResponseDto Prices retrieved successfully
|
|
1615
|
+
* @throws ApiError
|
|
1616
|
+
*/
|
|
1617
|
+
public static priceControllerFindAll(
|
|
1618
|
+
data: PriceControllerFindAllData
|
|
1619
|
+
): CancelablePromise<PriceControllerFindAllResponse> {
|
|
1620
|
+
return __request(OpenAPI, {
|
|
1621
|
+
method: 'GET',
|
|
1622
|
+
url: '/api/v1/{region}/bean/prices',
|
|
1623
|
+
path: {
|
|
1624
|
+
region: data.region
|
|
1625
|
+
},
|
|
1626
|
+
query: {
|
|
1627
|
+
currency: data.currency,
|
|
1628
|
+
quoteCurrency: data.quoteCurrency,
|
|
1629
|
+
dateFrom: data.dateFrom,
|
|
1630
|
+
dateTo: data.dateTo,
|
|
1631
|
+
search: data.search,
|
|
1632
|
+
page: data.page,
|
|
1633
|
+
limit: data.limit
|
|
1634
|
+
}
|
|
1635
|
+
});
|
|
1636
|
+
}
|
|
1637
|
+
|
|
1638
|
+
/**
|
|
1639
|
+
* Get price by ID
|
|
1640
|
+
* Returns a single price entry by its ID
|
|
1641
|
+
* @param data The data for the request.
|
|
1642
|
+
* @param data.id Price ID
|
|
1643
|
+
* @param data.region Region code for tenant context
|
|
1644
|
+
* @returns PriceResponseDto Price retrieved successfully
|
|
1645
|
+
* @throws ApiError
|
|
1646
|
+
*/
|
|
1647
|
+
public static priceControllerFindOne(
|
|
1648
|
+
data: PriceControllerFindOneData
|
|
1649
|
+
): CancelablePromise<PriceControllerFindOneResponse> {
|
|
1650
|
+
return __request(OpenAPI, {
|
|
1651
|
+
method: 'GET',
|
|
1652
|
+
url: '/api/v1/{region}/bean/prices/{id}',
|
|
1653
|
+
path: {
|
|
1654
|
+
id: data.id,
|
|
1655
|
+
region: data.region
|
|
1656
|
+
},
|
|
1657
|
+
errors: {
|
|
1658
|
+
404: 'Price not found'
|
|
1659
|
+
}
|
|
1660
|
+
});
|
|
1661
|
+
}
|
|
1662
|
+
|
|
1663
|
+
/**
|
|
1664
|
+
* Update a price
|
|
1665
|
+
* Updates an existing price entry
|
|
1666
|
+
* @param data The data for the request.
|
|
1667
|
+
* @param data.id Price ID
|
|
1668
|
+
* @param data.region Region code for tenant context
|
|
1669
|
+
* @param data.requestBody
|
|
1670
|
+
* @returns PriceResponseDto Price updated successfully
|
|
1671
|
+
* @throws ApiError
|
|
1672
|
+
*/
|
|
1673
|
+
public static priceControllerUpdate(
|
|
1674
|
+
data: PriceControllerUpdateData
|
|
1675
|
+
): CancelablePromise<PriceControllerUpdateResponse> {
|
|
1676
|
+
return __request(OpenAPI, {
|
|
1677
|
+
method: 'PUT',
|
|
1678
|
+
url: '/api/v1/{region}/bean/prices/{id}',
|
|
1679
|
+
path: {
|
|
1680
|
+
id: data.id,
|
|
1681
|
+
region: data.region
|
|
1682
|
+
},
|
|
1683
|
+
body: data.requestBody,
|
|
1684
|
+
mediaType: 'application/json',
|
|
1685
|
+
errors: {
|
|
1686
|
+
404: 'Price not found',
|
|
1687
|
+
409: 'Updated price conflicts with existing price'
|
|
1688
|
+
}
|
|
1689
|
+
});
|
|
1690
|
+
}
|
|
1691
|
+
|
|
1692
|
+
/**
|
|
1693
|
+
* Delete a price
|
|
1694
|
+
* Deletes a price entry (hard delete)
|
|
1695
|
+
* @param data The data for the request.
|
|
1696
|
+
* @param data.id Price ID
|
|
1697
|
+
* @param data.region Region code for tenant context
|
|
1698
|
+
* @returns void Price deleted successfully
|
|
1699
|
+
* @throws ApiError
|
|
1700
|
+
*/
|
|
1701
|
+
public static priceControllerDelete(
|
|
1702
|
+
data: PriceControllerDeleteData
|
|
1703
|
+
): CancelablePromise<PriceControllerDeleteResponse> {
|
|
1704
|
+
return __request(OpenAPI, {
|
|
1705
|
+
method: 'DELETE',
|
|
1706
|
+
url: '/api/v1/{region}/bean/prices/{id}',
|
|
1707
|
+
path: {
|
|
1708
|
+
id: data.id,
|
|
1709
|
+
region: data.region
|
|
1710
|
+
},
|
|
1711
|
+
errors: {
|
|
1712
|
+
404: 'Price not found'
|
|
1713
|
+
}
|
|
1714
|
+
});
|
|
1715
|
+
}
|
|
1716
|
+
|
|
1717
|
+
/**
|
|
1718
|
+
* Bulk create prices
|
|
1719
|
+
* Creates multiple price entries at once (skips duplicates)
|
|
1720
|
+
* @param data The data for the request.
|
|
1721
|
+
* @param data.region Region code for tenant context
|
|
1722
|
+
* @param data.requestBody
|
|
1723
|
+
* @returns PriceResponseDto Prices created successfully
|
|
1724
|
+
* @throws ApiError
|
|
1725
|
+
*/
|
|
1726
|
+
public static priceControllerBulkCreate(
|
|
1727
|
+
data: PriceControllerBulkCreateData
|
|
1728
|
+
): CancelablePromise<PriceControllerBulkCreateResponse> {
|
|
1729
|
+
return __request(OpenAPI, {
|
|
1730
|
+
method: 'POST',
|
|
1731
|
+
url: '/api/v1/{region}/bean/prices/bulk',
|
|
1732
|
+
path: {
|
|
1733
|
+
region: data.region
|
|
1734
|
+
},
|
|
1735
|
+
body: data.requestBody,
|
|
1736
|
+
mediaType: 'application/json'
|
|
1737
|
+
});
|
|
1738
|
+
}
|
|
1739
|
+
}
|
|
1740
|
+
|
|
1482
1741
|
export class RecurringRulesService {
|
|
1483
1742
|
/**
|
|
1484
1743
|
* Create a new recurring rule
|
|
@@ -1909,49 +2168,461 @@ export class RecurringForecastService {
|
|
|
1909
2168
|
}
|
|
1910
2169
|
}
|
|
1911
2170
|
|
|
1912
|
-
export class
|
|
2171
|
+
export class ReportingService {
|
|
1913
2172
|
/**
|
|
1914
|
-
*
|
|
1915
|
-
*
|
|
2173
|
+
* Get portfolio value trends
|
|
2174
|
+
*
|
|
2175
|
+
* Returns time series data of portfolio net worth.
|
|
2176
|
+
*
|
|
2177
|
+
* **Multi-currency Support:**
|
|
2178
|
+
* - `series[].byCurrency` - Currency breakdown for each data point
|
|
2179
|
+
* - `byCurrency` - Separate time series grouped by currency
|
|
2180
|
+
* - `warnings` - Exchange rate warnings if conversion failed
|
|
2181
|
+
*
|
|
2182
|
+
* **Parameters:**
|
|
2183
|
+
* - `period`: Time period (1m, 3m, 6m, 1y)
|
|
2184
|
+
* - `granularity`: Data granularity (day, week, month)
|
|
2185
|
+
*
|
|
1916
2186
|
* @param data The data for the request.
|
|
1917
2187
|
* @param data.region Region code for tenant context
|
|
1918
|
-
* @param data.
|
|
1919
|
-
* @
|
|
2188
|
+
* @param data.period Time period
|
|
2189
|
+
* @param data.granularity Data granularity
|
|
2190
|
+
* @returns PortfolioTrendsResponseDto Trends retrieved successfully
|
|
1920
2191
|
* @throws ApiError
|
|
1921
2192
|
*/
|
|
1922
|
-
public static
|
|
1923
|
-
data:
|
|
1924
|
-
): CancelablePromise<
|
|
2193
|
+
public static reportingControllerGetPortfolioTrends(
|
|
2194
|
+
data: ReportingControllerGetPortfolioTrendsData
|
|
2195
|
+
): CancelablePromise<ReportingControllerGetPortfolioTrendsResponse> {
|
|
1925
2196
|
return __request(OpenAPI, {
|
|
1926
|
-
method: '
|
|
1927
|
-
url: '/api/v1/{region}/
|
|
2197
|
+
method: 'GET',
|
|
2198
|
+
url: '/api/v1/{region}/reporting/portfolio/trends',
|
|
1928
2199
|
path: {
|
|
1929
2200
|
region: data.region
|
|
1930
2201
|
},
|
|
1931
|
-
|
|
1932
|
-
|
|
2202
|
+
query: {
|
|
2203
|
+
period: data.period,
|
|
2204
|
+
granularity: data.granularity
|
|
2205
|
+
},
|
|
1933
2206
|
errors: {
|
|
1934
|
-
|
|
1935
|
-
401: 'Unauthorized',
|
|
1936
|
-
409: 'Resource conflict - another process is updating this rule'
|
|
2207
|
+
401: 'User not authenticated'
|
|
1937
2208
|
}
|
|
1938
2209
|
});
|
|
1939
2210
|
}
|
|
1940
2211
|
|
|
1941
2212
|
/**
|
|
1942
|
-
* Get
|
|
2213
|
+
* Get cash-flow trends
|
|
2214
|
+
*
|
|
2215
|
+
* Monthly income / expense / netSavings over a fixed N-month window
|
|
2216
|
+
* (current month + N−1 prior). Missing months are zero-filled (flow metric).
|
|
2217
|
+
*
|
|
2218
|
+
* **Parameters:**
|
|
2219
|
+
* - `period`: 1m | 3m | 6m | 1y (default 6m)
|
|
2220
|
+
* - `granularity`: accepted for API symmetry; v1 returns month buckets
|
|
2221
|
+
*
|
|
1943
2222
|
* @param data The data for the request.
|
|
1944
2223
|
* @param data.region Region code for tenant context
|
|
1945
|
-
* @param data.
|
|
1946
|
-
* @param data.
|
|
1947
|
-
* @
|
|
1948
|
-
* @param data.learningSource Filter by learning source. Omit this parameter or pass empty string to get manually created rules (learningSource is null in database).
|
|
1949
|
-
* @param data.autoApplyEnabled Filter by auto-apply status
|
|
1950
|
-
* @returns TransactionRuleListResponseDto List of rules
|
|
2224
|
+
* @param data.period Time period
|
|
2225
|
+
* @param data.granularity Data granularity (accepted for API symmetry; v1 returns month buckets)
|
|
2226
|
+
* @returns CashFlowTrendsResponseDto Cash-flow trends retrieved successfully
|
|
1951
2227
|
* @throws ApiError
|
|
1952
2228
|
*/
|
|
1953
|
-
public static
|
|
1954
|
-
data:
|
|
2229
|
+
public static reportingControllerGetCashFlowTrends(
|
|
2230
|
+
data: ReportingControllerGetCashFlowTrendsData
|
|
2231
|
+
): CancelablePromise<ReportingControllerGetCashFlowTrendsResponse> {
|
|
2232
|
+
return __request(OpenAPI, {
|
|
2233
|
+
method: 'GET',
|
|
2234
|
+
url: '/api/v1/{region}/reporting/cash-flow/trends',
|
|
2235
|
+
path: {
|
|
2236
|
+
region: data.region
|
|
2237
|
+
},
|
|
2238
|
+
query: {
|
|
2239
|
+
period: data.period,
|
|
2240
|
+
granularity: data.granularity
|
|
2241
|
+
},
|
|
2242
|
+
errors: {
|
|
2243
|
+
401: 'User not authenticated'
|
|
2244
|
+
}
|
|
2245
|
+
});
|
|
2246
|
+
}
|
|
2247
|
+
|
|
2248
|
+
/**
|
|
2249
|
+
* Generate portfolio snapshot
|
|
2250
|
+
*
|
|
2251
|
+
* Manually generate a portfolio snapshot for a specific date.
|
|
2252
|
+
*
|
|
2253
|
+
* **Multi-currency Support:**
|
|
2254
|
+
* - Fetches balances grouped by currency
|
|
2255
|
+
* - Uses user's baseCurrency setting for conversion
|
|
2256
|
+
* - Stores exchange rates and warnings
|
|
2257
|
+
*
|
|
2258
|
+
* **Use Cases:**
|
|
2259
|
+
* - Testing snapshot generation
|
|
2260
|
+
* - Force regeneration after data correction
|
|
2261
|
+
* - Initial setup for new users
|
|
2262
|
+
*
|
|
2263
|
+
* @param data The data for the request.
|
|
2264
|
+
* @param data.region Region code for tenant context
|
|
2265
|
+
* @param data.requestBody Optional date (defaults to today)
|
|
2266
|
+
* @returns GenerateSnapshotResponse Snapshot generated successfully
|
|
2267
|
+
* @throws ApiError
|
|
2268
|
+
*/
|
|
2269
|
+
public static reportingControllerGenerateSnapshot(
|
|
2270
|
+
data: ReportingControllerGenerateSnapshotData
|
|
2271
|
+
): CancelablePromise<ReportingControllerGenerateSnapshotResponse> {
|
|
2272
|
+
return __request(OpenAPI, {
|
|
2273
|
+
method: 'POST',
|
|
2274
|
+
url: '/api/v1/{region}/reporting/snapshots/generate',
|
|
2275
|
+
path: {
|
|
2276
|
+
region: data.region
|
|
2277
|
+
},
|
|
2278
|
+
body: data.requestBody,
|
|
2279
|
+
mediaType: 'application/json',
|
|
2280
|
+
errors: {
|
|
2281
|
+
400: 'Invalid date format',
|
|
2282
|
+
401: 'User not authenticated'
|
|
2283
|
+
}
|
|
2284
|
+
});
|
|
2285
|
+
}
|
|
2286
|
+
|
|
2287
|
+
/**
|
|
2288
|
+
* Backfill portfolio snapshots
|
|
2289
|
+
*
|
|
2290
|
+
* Generate snapshots for a date range (historical data backfill).
|
|
2291
|
+
*
|
|
2292
|
+
* **Multi-currency Support:**
|
|
2293
|
+
* - Each snapshot includes multi-currency data
|
|
2294
|
+
* - Uses exchange rates available at generation time
|
|
2295
|
+
* - Warnings stored for missing exchange rates
|
|
2296
|
+
*
|
|
2297
|
+
* **Best Practices:**
|
|
2298
|
+
* - Use for initial setup after account configuration
|
|
2299
|
+
* - Run during low-traffic periods for large date ranges
|
|
2300
|
+
* - Existing snapshots are skipped (not regenerated)
|
|
2301
|
+
*
|
|
2302
|
+
* @param data The data for the request.
|
|
2303
|
+
* @param data.region Region code for tenant context
|
|
2304
|
+
* @param data.requestBody
|
|
2305
|
+
* @returns BackfillSnapshotsResponse Backfill completed successfully
|
|
2306
|
+
* @throws ApiError
|
|
2307
|
+
*/
|
|
2308
|
+
public static reportingControllerBackfillSnapshots(
|
|
2309
|
+
data: ReportingControllerBackfillSnapshotsData
|
|
2310
|
+
): CancelablePromise<ReportingControllerBackfillSnapshotsResponse> {
|
|
2311
|
+
return __request(OpenAPI, {
|
|
2312
|
+
method: 'POST',
|
|
2313
|
+
url: '/api/v1/{region}/reporting/snapshots/backfill',
|
|
2314
|
+
path: {
|
|
2315
|
+
region: data.region
|
|
2316
|
+
},
|
|
2317
|
+
body: data.requestBody,
|
|
2318
|
+
mediaType: 'application/json',
|
|
2319
|
+
errors: {
|
|
2320
|
+
400: 'Invalid date format or range',
|
|
2321
|
+
401: 'User not authenticated',
|
|
2322
|
+
409: 'Backfill already in progress for this user'
|
|
2323
|
+
}
|
|
2324
|
+
});
|
|
2325
|
+
}
|
|
2326
|
+
}
|
|
2327
|
+
|
|
2328
|
+
export class UsersService {
|
|
2329
|
+
/**
|
|
2330
|
+
* Delete own user account
|
|
2331
|
+
* @param data The data for the request.
|
|
2332
|
+
* @param data.requestBody
|
|
2333
|
+
* @returns void User deleted successfully
|
|
2334
|
+
* @throws ApiError
|
|
2335
|
+
*/
|
|
2336
|
+
public static userControllerDeleteOwnUser(
|
|
2337
|
+
data: UserControllerDeleteOwnUserData
|
|
2338
|
+
): CancelablePromise<UserControllerDeleteOwnUserResponse> {
|
|
2339
|
+
return __request(OpenAPI, {
|
|
2340
|
+
method: 'DELETE',
|
|
2341
|
+
url: '/api/v1/users',
|
|
2342
|
+
body: data.requestBody,
|
|
2343
|
+
mediaType: 'application/json',
|
|
2344
|
+
errors: {
|
|
2345
|
+
403: 'Invalid access token'
|
|
2346
|
+
}
|
|
2347
|
+
});
|
|
2348
|
+
}
|
|
2349
|
+
|
|
2350
|
+
/**
|
|
2351
|
+
* Get current authenticated user
|
|
2352
|
+
* @param data The data for the request.
|
|
2353
|
+
* @param data.acceptLanguage
|
|
2354
|
+
* @returns UserResponseDto User retrieved successfully
|
|
2355
|
+
* @throws ApiError
|
|
2356
|
+
*/
|
|
2357
|
+
public static userControllerGetUser(
|
|
2358
|
+
data: UserControllerGetUserData
|
|
2359
|
+
): CancelablePromise<UserControllerGetUserResponse> {
|
|
2360
|
+
return __request(OpenAPI, {
|
|
2361
|
+
method: 'GET',
|
|
2362
|
+
url: '/api/v1/users',
|
|
2363
|
+
headers: {
|
|
2364
|
+
'accept-language': data.acceptLanguage
|
|
2365
|
+
}
|
|
2366
|
+
});
|
|
2367
|
+
}
|
|
2368
|
+
|
|
2369
|
+
/**
|
|
2370
|
+
* Sign up new user
|
|
2371
|
+
* Create a new account with auto-generated access token. Protected by Cloudflare Turnstile to prevent automated signup (when enabled).
|
|
2372
|
+
* @param data The data for the request.
|
|
2373
|
+
* @param data.requestBody
|
|
2374
|
+
* @returns SignupResponseDto User created successfully
|
|
2375
|
+
* @throws ApiError
|
|
2376
|
+
*/
|
|
2377
|
+
public static userControllerSignupUser(
|
|
2378
|
+
data: UserControllerSignupUserData
|
|
2379
|
+
): CancelablePromise<UserControllerSignupUserResponse> {
|
|
2380
|
+
return __request(OpenAPI, {
|
|
2381
|
+
method: 'POST',
|
|
2382
|
+
url: '/api/v1/users',
|
|
2383
|
+
body: data.requestBody,
|
|
2384
|
+
mediaType: 'application/json',
|
|
2385
|
+
errors: {
|
|
2386
|
+
400: 'Invalid Turnstile token (when Turnstile is enabled)',
|
|
2387
|
+
403: 'User signup is disabled'
|
|
2388
|
+
}
|
|
2389
|
+
});
|
|
2390
|
+
}
|
|
2391
|
+
|
|
2392
|
+
/**
|
|
2393
|
+
* Delete user by ID (admin only)
|
|
2394
|
+
* @param data The data for the request.
|
|
2395
|
+
* @param data.id User ID to delete
|
|
2396
|
+
* @returns void User deleted successfully
|
|
2397
|
+
* @throws ApiError
|
|
2398
|
+
*/
|
|
2399
|
+
public static userControllerDeleteUser(
|
|
2400
|
+
data: UserControllerDeleteUserData
|
|
2401
|
+
): CancelablePromise<UserControllerDeleteUserResponse> {
|
|
2402
|
+
return __request(OpenAPI, {
|
|
2403
|
+
method: 'DELETE',
|
|
2404
|
+
url: '/api/v1/users/{id}',
|
|
2405
|
+
path: {
|
|
2406
|
+
id: data.id
|
|
2407
|
+
},
|
|
2408
|
+
errors: {
|
|
2409
|
+
403: 'Cannot delete own account or insufficient permissions'
|
|
2410
|
+
}
|
|
2411
|
+
});
|
|
2412
|
+
}
|
|
2413
|
+
|
|
2414
|
+
/**
|
|
2415
|
+
* Get user info by user ID
|
|
2416
|
+
* @param data The data for the request.
|
|
2417
|
+
* @param data.id User ID
|
|
2418
|
+
* @returns unknown User info retrieved successfully
|
|
2419
|
+
* @throws ApiError
|
|
2420
|
+
*/
|
|
2421
|
+
public static userControllerGetUserInfo(
|
|
2422
|
+
data: UserControllerGetUserInfoData
|
|
2423
|
+
): CancelablePromise<UserControllerGetUserInfoResponse> {
|
|
2424
|
+
return __request(OpenAPI, {
|
|
2425
|
+
method: 'GET',
|
|
2426
|
+
url: '/api/v1/users/{id}/info',
|
|
2427
|
+
path: {
|
|
2428
|
+
id: data.id
|
|
2429
|
+
},
|
|
2430
|
+
errors: {
|
|
2431
|
+
403: 'Cannot access other user info without admin permission'
|
|
2432
|
+
}
|
|
2433
|
+
});
|
|
2434
|
+
}
|
|
2435
|
+
|
|
2436
|
+
/**
|
|
2437
|
+
* Update user settings
|
|
2438
|
+
* @param data The data for the request.
|
|
2439
|
+
* @param data.requestBody
|
|
2440
|
+
* @returns unknown Settings updated successfully
|
|
2441
|
+
* @throws ApiError
|
|
2442
|
+
*/
|
|
2443
|
+
public static userControllerUpdateUserSetting(
|
|
2444
|
+
data: UserControllerUpdateUserSettingData
|
|
2445
|
+
): CancelablePromise<UserControllerUpdateUserSettingResponse> {
|
|
2446
|
+
return __request(OpenAPI, {
|
|
2447
|
+
method: 'PUT',
|
|
2448
|
+
url: '/api/v1/users/setting',
|
|
2449
|
+
body: data.requestBody,
|
|
2450
|
+
mediaType: 'application/json',
|
|
2451
|
+
errors: {
|
|
2452
|
+
403: 'Insufficient permissions'
|
|
2453
|
+
}
|
|
2454
|
+
});
|
|
2455
|
+
}
|
|
2456
|
+
|
|
2457
|
+
/**
|
|
2458
|
+
* Get all user settings paginated (admin only)
|
|
2459
|
+
* @param data The data for the request.
|
|
2460
|
+
* @param data.pageNo Page number
|
|
2461
|
+
* @param data.pageSize Page size
|
|
2462
|
+
* @returns unknown Settings list retrieved successfully
|
|
2463
|
+
* @throws ApiError
|
|
2464
|
+
*/
|
|
2465
|
+
public static userControllerGetAllUserSettingsByPage(
|
|
2466
|
+
data: UserControllerGetAllUserSettingsByPageData
|
|
2467
|
+
): CancelablePromise<UserControllerGetAllUserSettingsByPageResponse> {
|
|
2468
|
+
return __request(OpenAPI, {
|
|
2469
|
+
method: 'GET',
|
|
2470
|
+
url: '/api/v1/users/settings-by-page',
|
|
2471
|
+
query: {
|
|
2472
|
+
pageNo: data.pageNo,
|
|
2473
|
+
pageSize: data.pageSize
|
|
2474
|
+
}
|
|
2475
|
+
});
|
|
2476
|
+
}
|
|
2477
|
+
|
|
2478
|
+
/**
|
|
2479
|
+
* Get asset and liability summary for current user
|
|
2480
|
+
* @returns unknown Summary retrieved successfully
|
|
2481
|
+
* @throws ApiError
|
|
2482
|
+
*/
|
|
2483
|
+
public static userControllerGetAssetLiabilitySummary(): CancelablePromise<UserControllerGetAssetLiabilitySummaryResponse> {
|
|
2484
|
+
return __request(OpenAPI, {
|
|
2485
|
+
method: 'GET',
|
|
2486
|
+
url: '/api/v1/users/asset-liability-summary'
|
|
2487
|
+
});
|
|
2488
|
+
}
|
|
2489
|
+
}
|
|
2490
|
+
|
|
2491
|
+
export class PropertiesService {
|
|
2492
|
+
/**
|
|
2493
|
+
* Get all system properties
|
|
2494
|
+
* @returns unknown Properties retrieved successfully
|
|
2495
|
+
* @throws ApiError
|
|
2496
|
+
*/
|
|
2497
|
+
public static propertyControllerGetAll(): CancelablePromise<PropertyControllerGetAllResponse> {
|
|
2498
|
+
return __request(OpenAPI, {
|
|
2499
|
+
method: 'GET',
|
|
2500
|
+
url: '/api/v1/admin/properties',
|
|
2501
|
+
errors: {
|
|
2502
|
+
401: 'Unauthorized',
|
|
2503
|
+
403: 'Forbidden - insufficient permissions'
|
|
2504
|
+
}
|
|
2505
|
+
});
|
|
2506
|
+
}
|
|
2507
|
+
|
|
2508
|
+
/**
|
|
2509
|
+
* Get property by key
|
|
2510
|
+
* @param data The data for the request.
|
|
2511
|
+
* @param data.key Property key
|
|
2512
|
+
* @returns unknown Property retrieved successfully
|
|
2513
|
+
* @throws ApiError
|
|
2514
|
+
*/
|
|
2515
|
+
public static propertyControllerGetByKey(
|
|
2516
|
+
data: PropertyControllerGetByKeyData
|
|
2517
|
+
): CancelablePromise<PropertyControllerGetByKeyResponse> {
|
|
2518
|
+
return __request(OpenAPI, {
|
|
2519
|
+
method: 'GET',
|
|
2520
|
+
url: '/api/v1/admin/properties/{key}',
|
|
2521
|
+
path: {
|
|
2522
|
+
key: data.key
|
|
2523
|
+
},
|
|
2524
|
+
errors: {
|
|
2525
|
+
401: 'Unauthorized',
|
|
2526
|
+
403: 'Forbidden - insufficient permissions',
|
|
2527
|
+
404: 'Property not found'
|
|
2528
|
+
}
|
|
2529
|
+
});
|
|
2530
|
+
}
|
|
2531
|
+
|
|
2532
|
+
/**
|
|
2533
|
+
* Update a system property
|
|
2534
|
+
* @param data The data for the request.
|
|
2535
|
+
* @param data.key Property key
|
|
2536
|
+
* @param data.requestBody
|
|
2537
|
+
* @returns unknown Property updated successfully
|
|
2538
|
+
* @throws ApiError
|
|
2539
|
+
*/
|
|
2540
|
+
public static propertyControllerUpdate(
|
|
2541
|
+
data: PropertyControllerUpdateData
|
|
2542
|
+
): CancelablePromise<PropertyControllerUpdateResponse> {
|
|
2543
|
+
return __request(OpenAPI, {
|
|
2544
|
+
method: 'PUT',
|
|
2545
|
+
url: '/api/v1/admin/properties/{key}',
|
|
2546
|
+
path: {
|
|
2547
|
+
key: data.key
|
|
2548
|
+
},
|
|
2549
|
+
body: data.requestBody,
|
|
2550
|
+
mediaType: 'application/json',
|
|
2551
|
+
errors: {
|
|
2552
|
+
401: 'Unauthorized',
|
|
2553
|
+
403: 'Forbidden - insufficient permissions'
|
|
2554
|
+
}
|
|
2555
|
+
});
|
|
2556
|
+
}
|
|
2557
|
+
|
|
2558
|
+
/**
|
|
2559
|
+
* Delete a system property
|
|
2560
|
+
* @param data The data for the request.
|
|
2561
|
+
* @param data.key Property key
|
|
2562
|
+
* @returns void Property deleted successfully
|
|
2563
|
+
* @throws ApiError
|
|
2564
|
+
*/
|
|
2565
|
+
public static propertyControllerDelete(
|
|
2566
|
+
data: PropertyControllerDeleteData
|
|
2567
|
+
): CancelablePromise<PropertyControllerDeleteResponse> {
|
|
2568
|
+
return __request(OpenAPI, {
|
|
2569
|
+
method: 'DELETE',
|
|
2570
|
+
url: '/api/v1/admin/properties/{key}',
|
|
2571
|
+
path: {
|
|
2572
|
+
key: data.key
|
|
2573
|
+
},
|
|
2574
|
+
errors: {
|
|
2575
|
+
401: 'Unauthorized',
|
|
2576
|
+
403: 'Forbidden - insufficient permissions',
|
|
2577
|
+
404: 'Property not found'
|
|
2578
|
+
}
|
|
2579
|
+
});
|
|
2580
|
+
}
|
|
2581
|
+
}
|
|
2582
|
+
|
|
2583
|
+
export class BeanTransactionRulesService {
|
|
2584
|
+
/**
|
|
2585
|
+
* Create a new transaction rule (or upsert if upsertByPayee=true)
|
|
2586
|
+
* Creates a new rule. If upsertByPayee=true, updates existing rule matching payeeKeywords[0] instead of creating duplicate.
|
|
2587
|
+
* @param data The data for the request.
|
|
2588
|
+
* @param data.region Region code for tenant context
|
|
2589
|
+
* @param data.requestBody
|
|
2590
|
+
* @returns TransactionRuleResponseDto Rule updated successfully (upsert mode)
|
|
2591
|
+
* @throws ApiError
|
|
2592
|
+
*/
|
|
2593
|
+
public static transactionRuleControllerCreate(
|
|
2594
|
+
data: TransactionRuleControllerCreateData
|
|
2595
|
+
): CancelablePromise<TransactionRuleControllerCreateResponse> {
|
|
2596
|
+
return __request(OpenAPI, {
|
|
2597
|
+
method: 'POST',
|
|
2598
|
+
url: '/api/v1/{region}/bean/transaction-rules',
|
|
2599
|
+
path: {
|
|
2600
|
+
region: data.region
|
|
2601
|
+
},
|
|
2602
|
+
body: data.requestBody,
|
|
2603
|
+
mediaType: 'application/json',
|
|
2604
|
+
errors: {
|
|
2605
|
+
400: 'Validation failed',
|
|
2606
|
+
401: 'Unauthorized',
|
|
2607
|
+
409: 'Resource conflict - another process is updating this rule'
|
|
2608
|
+
}
|
|
2609
|
+
});
|
|
2610
|
+
}
|
|
2611
|
+
|
|
2612
|
+
/**
|
|
2613
|
+
* Get all transaction rules for user
|
|
2614
|
+
* @param data The data for the request.
|
|
2615
|
+
* @param data.region Region code for tenant context
|
|
2616
|
+
* @param data.limit Max results per page (default: 20, max: 100)
|
|
2617
|
+
* @param data.offset Pagination offset (default: 0)
|
|
2618
|
+
* @param data.enabled Filter by enabled status
|
|
2619
|
+
* @param data.learningSource Filter by learning source. Omit this parameter or pass empty string to get manually created rules (learningSource is null in database).
|
|
2620
|
+
* @param data.autoApplyEnabled Filter by auto-apply status
|
|
2621
|
+
* @returns TransactionRuleListResponseDto List of rules
|
|
2622
|
+
* @throws ApiError
|
|
2623
|
+
*/
|
|
2624
|
+
public static transactionRuleControllerList(
|
|
2625
|
+
data: TransactionRuleControllerListData
|
|
1955
2626
|
): CancelablePromise<TransactionRuleControllerListResponse> {
|
|
1956
2627
|
return __request(OpenAPI, {
|
|
1957
2628
|
method: 'GET',
|
|
@@ -2187,256 +2858,337 @@ export class BeanTransactionRulesService {
|
|
|
2187
2858
|
}
|
|
2188
2859
|
}
|
|
2189
2860
|
|
|
2190
|
-
export class
|
|
2191
|
-
/**
|
|
2192
|
-
* Delete own user account
|
|
2193
|
-
* @param data The data for the request.
|
|
2194
|
-
* @param data.requestBody
|
|
2195
|
-
* @returns void User deleted successfully
|
|
2196
|
-
* @throws ApiError
|
|
2197
|
-
*/
|
|
2198
|
-
public static userControllerDeleteOwnUser(
|
|
2199
|
-
data: UserControllerDeleteOwnUserData
|
|
2200
|
-
): CancelablePromise<UserControllerDeleteOwnUserResponse> {
|
|
2201
|
-
return __request(OpenAPI, {
|
|
2202
|
-
method: 'DELETE',
|
|
2203
|
-
url: '/api/v1/users',
|
|
2204
|
-
body: data.requestBody,
|
|
2205
|
-
mediaType: 'application/json',
|
|
2206
|
-
errors: {
|
|
2207
|
-
403: 'Invalid access token'
|
|
2208
|
-
}
|
|
2209
|
-
});
|
|
2210
|
-
}
|
|
2211
|
-
|
|
2861
|
+
export class BeanCategoryCatalogService {
|
|
2212
2862
|
/**
|
|
2213
|
-
*
|
|
2863
|
+
* List category catalog for a region
|
|
2864
|
+
* Returns the region-scoped category slugs (expense/income/investment/banking/transfer/payment) for the NLP result picker. CN-exclusive payment instruments (huabei/baitiao) appear only under /cn.
|
|
2214
2865
|
* @param data The data for the request.
|
|
2215
|
-
* @param data.
|
|
2216
|
-
* @
|
|
2866
|
+
* @param data.region Region code for tenant context
|
|
2867
|
+
* @param data.scenario Filter by scenario
|
|
2868
|
+
* @param data.routeBearing Filter by routeBearing (entity-router route() consumes it)
|
|
2869
|
+
* @returns CategoryCatalogListResponseDto Category catalog retrieved successfully
|
|
2217
2870
|
* @throws ApiError
|
|
2218
2871
|
*/
|
|
2219
|
-
public static
|
|
2220
|
-
data:
|
|
2221
|
-
): CancelablePromise<
|
|
2872
|
+
public static categoryCatalogControllerList(
|
|
2873
|
+
data: CategoryCatalogControllerListData
|
|
2874
|
+
): CancelablePromise<CategoryCatalogControllerListResponse> {
|
|
2222
2875
|
return __request(OpenAPI, {
|
|
2223
2876
|
method: 'GET',
|
|
2224
|
-
url: '/api/v1/
|
|
2225
|
-
|
|
2226
|
-
|
|
2877
|
+
url: '/api/v1/{region}/bean/categories',
|
|
2878
|
+
path: {
|
|
2879
|
+
region: data.region
|
|
2880
|
+
},
|
|
2881
|
+
query: {
|
|
2882
|
+
scenario: data.scenario,
|
|
2883
|
+
routeBearing: data.routeBearing
|
|
2227
2884
|
}
|
|
2228
2885
|
});
|
|
2229
2886
|
}
|
|
2887
|
+
}
|
|
2230
2888
|
|
|
2889
|
+
export class LifeEventsService {
|
|
2231
2890
|
/**
|
|
2232
|
-
*
|
|
2233
|
-
*
|
|
2891
|
+
* Create a new life event
|
|
2892
|
+
* Creates a new life event entry for the authenticated user. Returns ETag header carrying the row updatedAt.
|
|
2234
2893
|
* @param data The data for the request.
|
|
2894
|
+
* @param data.region Region code for tenant context (decorative for life events)
|
|
2235
2895
|
* @param data.requestBody
|
|
2236
|
-
* @returns
|
|
2896
|
+
* @returns EventResponseDto Life event created successfully
|
|
2237
2897
|
* @throws ApiError
|
|
2238
2898
|
*/
|
|
2239
|
-
public static
|
|
2240
|
-
data:
|
|
2241
|
-
): CancelablePromise<
|
|
2899
|
+
public static eventControllerCreate(
|
|
2900
|
+
data: EventControllerCreateData
|
|
2901
|
+
): CancelablePromise<EventControllerCreateResponse> {
|
|
2242
2902
|
return __request(OpenAPI, {
|
|
2243
2903
|
method: 'POST',
|
|
2244
|
-
url: '/api/v1/
|
|
2904
|
+
url: '/api/v1/{region}/bean/events',
|
|
2905
|
+
path: {
|
|
2906
|
+
region: data.region
|
|
2907
|
+
},
|
|
2245
2908
|
body: data.requestBody,
|
|
2246
2909
|
mediaType: 'application/json',
|
|
2247
2910
|
errors: {
|
|
2248
|
-
|
|
2249
|
-
403: 'User signup is disabled'
|
|
2911
|
+
409: 'Life event already exists for this (userId, type, date) combination'
|
|
2250
2912
|
}
|
|
2251
2913
|
});
|
|
2252
2914
|
}
|
|
2253
2915
|
|
|
2254
2916
|
/**
|
|
2255
|
-
*
|
|
2917
|
+
* List user life events
|
|
2918
|
+
* Returns life events for the authenticated user with optional filtering by type, description search, and date range.
|
|
2256
2919
|
* @param data The data for the request.
|
|
2257
|
-
* @param data.
|
|
2258
|
-
* @
|
|
2920
|
+
* @param data.region Region code for tenant context (decorative for life events)
|
|
2921
|
+
* @param data.type Filter by life event type (exact match)
|
|
2922
|
+
* @param data.q Search term for description (case-insensitive partial match)
|
|
2923
|
+
* @param data.from Filter life events from this date (ISO 8601 format)
|
|
2924
|
+
* @param data.to Filter life events to this date (ISO 8601 format)
|
|
2925
|
+
* @param data.page Page number for pagination (default: 1)
|
|
2926
|
+
* @param data.limit Number of items per page (default: 20, max: 100)
|
|
2927
|
+
* @returns EventListResponseDto Life events retrieved successfully
|
|
2259
2928
|
* @throws ApiError
|
|
2260
2929
|
*/
|
|
2261
|
-
public static
|
|
2262
|
-
data:
|
|
2263
|
-
): CancelablePromise<
|
|
2930
|
+
public static eventControllerFindAll(
|
|
2931
|
+
data: EventControllerFindAllData
|
|
2932
|
+
): CancelablePromise<EventControllerFindAllResponse> {
|
|
2264
2933
|
return __request(OpenAPI, {
|
|
2265
|
-
method: '
|
|
2266
|
-
url: '/api/v1/
|
|
2934
|
+
method: 'GET',
|
|
2935
|
+
url: '/api/v1/{region}/bean/events',
|
|
2267
2936
|
path: {
|
|
2268
|
-
|
|
2937
|
+
region: data.region
|
|
2269
2938
|
},
|
|
2270
|
-
|
|
2271
|
-
|
|
2939
|
+
query: {
|
|
2940
|
+
type: data.type,
|
|
2941
|
+
q: data.q,
|
|
2942
|
+
from: data.from,
|
|
2943
|
+
to: data.to,
|
|
2944
|
+
page: data.page,
|
|
2945
|
+
limit: data.limit
|
|
2272
2946
|
}
|
|
2273
2947
|
});
|
|
2274
2948
|
}
|
|
2275
2949
|
|
|
2276
2950
|
/**
|
|
2277
|
-
* Get
|
|
2951
|
+
* Get life event by ID
|
|
2952
|
+
* Returns a single life event by its ID. Returns ETag header.
|
|
2278
2953
|
* @param data The data for the request.
|
|
2279
|
-
* @param data.id
|
|
2280
|
-
* @
|
|
2954
|
+
* @param data.id Life event ID
|
|
2955
|
+
* @param data.region Region code for tenant context (decorative for life events)
|
|
2956
|
+
* @returns EventResponseDto Life event retrieved successfully
|
|
2281
2957
|
* @throws ApiError
|
|
2282
2958
|
*/
|
|
2283
|
-
public static
|
|
2284
|
-
data:
|
|
2285
|
-
): CancelablePromise<
|
|
2959
|
+
public static eventControllerFindOne(
|
|
2960
|
+
data: EventControllerFindOneData
|
|
2961
|
+
): CancelablePromise<EventControllerFindOneResponse> {
|
|
2286
2962
|
return __request(OpenAPI, {
|
|
2287
2963
|
method: 'GET',
|
|
2288
|
-
url: '/api/v1/
|
|
2964
|
+
url: '/api/v1/{region}/bean/events/{id}',
|
|
2289
2965
|
path: {
|
|
2290
|
-
id: data.id
|
|
2966
|
+
id: data.id,
|
|
2967
|
+
region: data.region
|
|
2291
2968
|
},
|
|
2292
2969
|
errors: {
|
|
2293
|
-
|
|
2970
|
+
404: 'Life event not found'
|
|
2294
2971
|
}
|
|
2295
2972
|
});
|
|
2296
2973
|
}
|
|
2297
2974
|
|
|
2298
2975
|
/**
|
|
2299
|
-
* Update
|
|
2976
|
+
* Update a life event
|
|
2977
|
+
* Updates an existing life event. If If-Match header is provided, performs optimistic concurrency check; mismatched updatedAt returns 412.
|
|
2300
2978
|
* @param data The data for the request.
|
|
2979
|
+
* @param data.id Life event ID
|
|
2980
|
+
* @param data.region Region code for tenant context (decorative for life events)
|
|
2301
2981
|
* @param data.requestBody
|
|
2302
|
-
* @returns
|
|
2982
|
+
* @returns EventResponseDto Life event updated successfully
|
|
2303
2983
|
* @throws ApiError
|
|
2304
2984
|
*/
|
|
2305
|
-
public static
|
|
2306
|
-
data:
|
|
2307
|
-
): CancelablePromise<
|
|
2985
|
+
public static eventControllerUpdate(
|
|
2986
|
+
data: EventControllerUpdateData
|
|
2987
|
+
): CancelablePromise<EventControllerUpdateResponse> {
|
|
2308
2988
|
return __request(OpenAPI, {
|
|
2309
2989
|
method: 'PUT',
|
|
2310
|
-
url: '/api/v1/
|
|
2990
|
+
url: '/api/v1/{region}/bean/events/{id}',
|
|
2991
|
+
path: {
|
|
2992
|
+
id: data.id,
|
|
2993
|
+
region: data.region
|
|
2994
|
+
},
|
|
2311
2995
|
body: data.requestBody,
|
|
2312
2996
|
mediaType: 'application/json',
|
|
2313
2997
|
errors: {
|
|
2314
|
-
|
|
2998
|
+
400: 'If-Match header is not a valid ISO 8601 date',
|
|
2999
|
+
404: 'Life event not found',
|
|
3000
|
+
409: 'Updated event conflicts with an existing (userId, type, date) combination',
|
|
3001
|
+
412: 'If-Match precondition failed (updatedAt mismatch)'
|
|
2315
3002
|
}
|
|
2316
3003
|
});
|
|
2317
3004
|
}
|
|
2318
3005
|
|
|
2319
3006
|
/**
|
|
2320
|
-
*
|
|
3007
|
+
* Delete a life event
|
|
3008
|
+
* Deletes a life event entry (hard delete). Returns 204.
|
|
2321
3009
|
* @param data The data for the request.
|
|
2322
|
-
* @param data.
|
|
2323
|
-
* @param data.
|
|
2324
|
-
* @returns
|
|
3010
|
+
* @param data.id Life event ID
|
|
3011
|
+
* @param data.region Region code for tenant context (decorative for life events)
|
|
3012
|
+
* @returns void Life event deleted successfully
|
|
2325
3013
|
* @throws ApiError
|
|
2326
3014
|
*/
|
|
2327
|
-
public static
|
|
2328
|
-
data:
|
|
2329
|
-
): CancelablePromise<
|
|
3015
|
+
public static eventControllerDelete(
|
|
3016
|
+
data: EventControllerDeleteData
|
|
3017
|
+
): CancelablePromise<EventControllerDeleteResponse> {
|
|
2330
3018
|
return __request(OpenAPI, {
|
|
2331
|
-
method: '
|
|
2332
|
-
url: '/api/v1/
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
3019
|
+
method: 'DELETE',
|
|
3020
|
+
url: '/api/v1/{region}/bean/events/{id}',
|
|
3021
|
+
path: {
|
|
3022
|
+
id: data.id,
|
|
3023
|
+
region: data.region
|
|
3024
|
+
},
|
|
3025
|
+
errors: {
|
|
3026
|
+
404: 'Life event not found'
|
|
2336
3027
|
}
|
|
2337
3028
|
});
|
|
2338
3029
|
}
|
|
2339
3030
|
|
|
2340
3031
|
/**
|
|
2341
|
-
*
|
|
2342
|
-
*
|
|
3032
|
+
* Slice time-series by a life event (Phase 79)
|
|
3033
|
+
* Returns aggregated time-series for postings matching accountPattern within the half-open date range of the given life event.
|
|
3034
|
+
* @param data The data for the request.
|
|
3035
|
+
* @param data.id Life event ID
|
|
3036
|
+
* @param data.accountPattern
|
|
3037
|
+
* @param data.granularity
|
|
3038
|
+
* @param data.region Region code for tenant context (decorative for life events)
|
|
3039
|
+
* @returns unknown Time-series sliced by the life event range
|
|
2343
3040
|
* @throws ApiError
|
|
2344
3041
|
*/
|
|
2345
|
-
public static
|
|
3042
|
+
public static eventControllerGetSlice(
|
|
3043
|
+
data: EventControllerGetSliceData
|
|
3044
|
+
): CancelablePromise<EventControllerGetSliceResponse> {
|
|
2346
3045
|
return __request(OpenAPI, {
|
|
2347
3046
|
method: 'GET',
|
|
2348
|
-
url: '/api/v1/
|
|
3047
|
+
url: '/api/v1/{region}/bean/events/{id}/slice',
|
|
3048
|
+
path: {
|
|
3049
|
+
id: data.id,
|
|
3050
|
+
region: data.region
|
|
3051
|
+
},
|
|
3052
|
+
query: {
|
|
3053
|
+
accountPattern: data.accountPattern,
|
|
3054
|
+
granularity: data.granularity
|
|
3055
|
+
},
|
|
3056
|
+
errors: {
|
|
3057
|
+
400: 'accountPattern query param is empty',
|
|
3058
|
+
404: 'Life event not found'
|
|
3059
|
+
}
|
|
2349
3060
|
});
|
|
2350
3061
|
}
|
|
2351
3062
|
}
|
|
2352
3063
|
|
|
2353
|
-
export class
|
|
3064
|
+
export class OnboardingService {
|
|
2354
3065
|
/**
|
|
2355
|
-
*
|
|
2356
|
-
* @
|
|
3066
|
+
* Bootstrap core accounts + register asset accounts with opening balances (ADR-0113)
|
|
3067
|
+
* @param data The data for the request.
|
|
3068
|
+
* @param data.region Region code for tenant context
|
|
3069
|
+
* @param data.requestBody
|
|
3070
|
+
* @returns unknown Onboarding bootstrap result.
|
|
2357
3071
|
* @throws ApiError
|
|
2358
3072
|
*/
|
|
2359
|
-
public static
|
|
3073
|
+
public static onboardingControllerBootstrap(
|
|
3074
|
+
data: OnboardingControllerBootstrapData
|
|
3075
|
+
): CancelablePromise<OnboardingControllerBootstrapResponse> {
|
|
2360
3076
|
return __request(OpenAPI, {
|
|
2361
|
-
method: '
|
|
2362
|
-
url: '/api/v1/
|
|
3077
|
+
method: 'POST',
|
|
3078
|
+
url: '/api/v1/{region}/bean/onboarding',
|
|
3079
|
+
path: {
|
|
3080
|
+
region: data.region
|
|
3081
|
+
},
|
|
3082
|
+
body: data.requestBody,
|
|
3083
|
+
mediaType: 'application/json',
|
|
2363
3084
|
errors: {
|
|
2364
|
-
|
|
2365
|
-
403: 'Forbidden - insufficient permissions'
|
|
3085
|
+
422: 'Invalid region/account path/duplicate paths.'
|
|
2366
3086
|
}
|
|
2367
3087
|
});
|
|
2368
3088
|
}
|
|
3089
|
+
}
|
|
2369
3090
|
|
|
3091
|
+
export class BalanceReconciliationService {
|
|
2370
3092
|
/**
|
|
2371
|
-
*
|
|
3093
|
+
* Preview reconciliation (book vs actual)
|
|
3094
|
+
* Computes book balance, diff, Beancount-inferred tolerance, and suggested action without persisting.
|
|
2372
3095
|
* @param data The data for the request.
|
|
2373
|
-
* @param data.
|
|
2374
|
-
* @
|
|
3096
|
+
* @param data.region Region code for tenant context (decorative for reconciliation)
|
|
3097
|
+
* @param data.requestBody
|
|
3098
|
+
* @returns ReconciliationComputeResultDto Reconciliation preview
|
|
2375
3099
|
* @throws ApiError
|
|
2376
3100
|
*/
|
|
2377
|
-
public static
|
|
2378
|
-
data:
|
|
2379
|
-
): CancelablePromise<
|
|
3101
|
+
public static reconciliationControllerCompute(
|
|
3102
|
+
data: ReconciliationControllerComputeData
|
|
3103
|
+
): CancelablePromise<ReconciliationControllerComputeResponse> {
|
|
3104
|
+
return __request(OpenAPI, {
|
|
3105
|
+
method: 'POST',
|
|
3106
|
+
url: '/api/v1/{region}/bean/reconciliations',
|
|
3107
|
+
path: {
|
|
3108
|
+
region: data.region
|
|
3109
|
+
},
|
|
3110
|
+
body: data.requestBody,
|
|
3111
|
+
mediaType: 'application/json',
|
|
3112
|
+
errors: {
|
|
3113
|
+
404: 'Account not found'
|
|
3114
|
+
}
|
|
3115
|
+
});
|
|
3116
|
+
}
|
|
3117
|
+
|
|
3118
|
+
/**
|
|
3119
|
+
* Record a balance assertion
|
|
3120
|
+
* Persists the reconciliation as a BeanBalance assertion (amount = actual, diffAmount = book − actual). Re-reconciling the same day/currency upserts.
|
|
3121
|
+
* @param data The data for the request.
|
|
3122
|
+
* @param data.region Region code for tenant context (decorative for reconciliation)
|
|
3123
|
+
* @param data.requestBody
|
|
3124
|
+
* @returns ReconciliationRecordDto Balance assertion recorded
|
|
3125
|
+
* @throws ApiError
|
|
3126
|
+
*/
|
|
3127
|
+
public static reconciliationControllerAssert(
|
|
3128
|
+
data: ReconciliationControllerAssertData
|
|
3129
|
+
): CancelablePromise<ReconciliationControllerAssertResponse> {
|
|
2380
3130
|
return __request(OpenAPI, {
|
|
2381
|
-
method: '
|
|
2382
|
-
url: '/api/v1/
|
|
3131
|
+
method: 'POST',
|
|
3132
|
+
url: '/api/v1/{region}/bean/reconciliations/assert',
|
|
2383
3133
|
path: {
|
|
2384
|
-
|
|
3134
|
+
region: data.region
|
|
2385
3135
|
},
|
|
3136
|
+
body: data.requestBody,
|
|
3137
|
+
mediaType: 'application/json',
|
|
2386
3138
|
errors: {
|
|
2387
|
-
|
|
2388
|
-
403: 'Forbidden - insufficient permissions',
|
|
2389
|
-
404: 'Property not found'
|
|
3139
|
+
404: 'Account not found'
|
|
2390
3140
|
}
|
|
2391
3141
|
});
|
|
2392
3142
|
}
|
|
2393
3143
|
|
|
2394
3144
|
/**
|
|
2395
|
-
*
|
|
3145
|
+
* Generate a pad adjusting entry
|
|
3146
|
+
* When book is outside tolerance, synthesizes a Beancount pad transaction (flag P) booking the diff from source_account and persists it. Source defaults to Equity:Opening-Balances.
|
|
2396
3147
|
* @param data The data for the request.
|
|
2397
|
-
* @param data.
|
|
3148
|
+
* @param data.region Region code for tenant context (decorative for reconciliation)
|
|
2398
3149
|
* @param data.requestBody
|
|
2399
|
-
* @returns
|
|
3150
|
+
* @returns PadResultDto Pad adjusting entry generated
|
|
2400
3151
|
* @throws ApiError
|
|
2401
3152
|
*/
|
|
2402
|
-
public static
|
|
2403
|
-
data:
|
|
2404
|
-
): CancelablePromise<
|
|
3153
|
+
public static reconciliationControllerPad(
|
|
3154
|
+
data: ReconciliationControllerPadData
|
|
3155
|
+
): CancelablePromise<ReconciliationControllerPadResponse> {
|
|
2405
3156
|
return __request(OpenAPI, {
|
|
2406
|
-
method: '
|
|
2407
|
-
url: '/api/v1/
|
|
3157
|
+
method: 'POST',
|
|
3158
|
+
url: '/api/v1/{region}/bean/reconciliations/pad',
|
|
2408
3159
|
path: {
|
|
2409
|
-
|
|
3160
|
+
region: data.region
|
|
2410
3161
|
},
|
|
2411
3162
|
body: data.requestBody,
|
|
2412
3163
|
mediaType: 'application/json',
|
|
2413
3164
|
errors: {
|
|
2414
|
-
|
|
2415
|
-
|
|
3165
|
+
400: 'Book already within tolerance — no pad needed',
|
|
3166
|
+
404: 'Account not found'
|
|
2416
3167
|
}
|
|
2417
3168
|
});
|
|
2418
3169
|
}
|
|
2419
3170
|
|
|
2420
3171
|
/**
|
|
2421
|
-
*
|
|
3172
|
+
* List reconciliation history for an account
|
|
3173
|
+
* Returns recorded balance assertions (most recent first). The latest drives the account-detail "Last <date>" badge.
|
|
2422
3174
|
* @param data The data for the request.
|
|
2423
|
-
* @param data.
|
|
2424
|
-
* @
|
|
3175
|
+
* @param data.accountId BeanAccount id
|
|
3176
|
+
* @param data.region Region code for tenant context (decorative for reconciliation)
|
|
3177
|
+
* @returns ReconciliationRecordDto Reconciliation history
|
|
2425
3178
|
* @throws ApiError
|
|
2426
3179
|
*/
|
|
2427
|
-
public static
|
|
2428
|
-
data:
|
|
2429
|
-
): CancelablePromise<
|
|
3180
|
+
public static reconciliationControllerHistory(
|
|
3181
|
+
data: ReconciliationControllerHistoryData
|
|
3182
|
+
): CancelablePromise<ReconciliationControllerHistoryResponse> {
|
|
2430
3183
|
return __request(OpenAPI, {
|
|
2431
|
-
method: '
|
|
2432
|
-
url: '/api/v1/
|
|
3184
|
+
method: 'GET',
|
|
3185
|
+
url: '/api/v1/{region}/bean/accounts/{accountId}/reconciliations',
|
|
2433
3186
|
path: {
|
|
2434
|
-
|
|
3187
|
+
accountId: data.accountId,
|
|
3188
|
+
region: data.region
|
|
2435
3189
|
},
|
|
2436
3190
|
errors: {
|
|
2437
|
-
|
|
2438
|
-
403: 'Forbidden - insufficient permissions',
|
|
2439
|
-
404: 'Property not found'
|
|
3191
|
+
404: 'Account not found'
|
|
2440
3192
|
}
|
|
2441
3193
|
});
|
|
2442
3194
|
}
|
|
@@ -2620,243 +3372,271 @@ export class BeanImportService {
|
|
|
2620
3372
|
}
|
|
2621
3373
|
}
|
|
2622
3374
|
|
|
2623
|
-
export class
|
|
2624
|
-
/**
|
|
2625
|
-
* Get all platforms with statistics
|
|
2626
|
-
* @returns unknown List of platforms with binding and account counts
|
|
2627
|
-
* @throws ApiError
|
|
2628
|
-
*/
|
|
2629
|
-
public static platformControllerFindAll(): CancelablePromise<PlatformControllerFindAllResponse> {
|
|
2630
|
-
return __request(OpenAPI, {
|
|
2631
|
-
method: 'GET',
|
|
2632
|
-
url: '/api/v1/bean/platforms'
|
|
2633
|
-
});
|
|
2634
|
-
}
|
|
2635
|
-
|
|
3375
|
+
export class ProviderSyncService {
|
|
2636
3376
|
/**
|
|
2637
|
-
*
|
|
3377
|
+
* Sync transactions from financial data provider
|
|
3378
|
+
*
|
|
3379
|
+
* Accepts raw transactions from external financial data providers, transforms them to Beancount format, and processes them through the ingestion pipeline.
|
|
3380
|
+
*
|
|
3381
|
+
* **Supported Providers:**
|
|
3382
|
+
* - **plaid**: Plaid API (US, Canada, Europe)
|
|
3383
|
+
* - **teller**: Teller API (US)
|
|
3384
|
+
* - **truelayer**: TrueLayer Open Banking (UK, Europe)
|
|
3385
|
+
* - **gocardless**: GoCardless Bank Account Data (Europe)
|
|
3386
|
+
* - **simplefin**: SimpleFIN (Self-hosted)
|
|
3387
|
+
* - **yodlee**: Yodlee (Global)
|
|
3388
|
+
* - **beancount-direct**: Beancount format transactions
|
|
3389
|
+
* - **parsed-bill**: Client-side parsed bill transactions
|
|
3390
|
+
*
|
|
3391
|
+
* **Processing Flow:**
|
|
3392
|
+
* 1. Transform raw data via provider adapter
|
|
3393
|
+
* 2. Validate transaction format
|
|
3394
|
+
* 3. Deduplicate using originalId
|
|
3395
|
+
* 4. Classify using rule engine
|
|
3396
|
+
* 5. Route low-confidence to Review Center
|
|
3397
|
+
* 6. Persist validated transactions
|
|
3398
|
+
*
|
|
2638
3399
|
* @param data The data for the request.
|
|
3400
|
+
* @param data.providerName Provider name
|
|
3401
|
+
* @param data.region Region code for tenant context
|
|
2639
3402
|
* @param data.requestBody
|
|
2640
|
-
* @returns
|
|
3403
|
+
* @returns ProviderSyncResponseDto Sync completed successfully
|
|
2641
3404
|
* @throws ApiError
|
|
2642
3405
|
*/
|
|
2643
|
-
public static
|
|
2644
|
-
data:
|
|
2645
|
-
): CancelablePromise<
|
|
3406
|
+
public static providerSyncControllerSync(
|
|
3407
|
+
data: ProviderSyncControllerSyncData
|
|
3408
|
+
): CancelablePromise<ProviderSyncControllerSyncResponse> {
|
|
2646
3409
|
return __request(OpenAPI, {
|
|
2647
3410
|
method: 'POST',
|
|
2648
|
-
url: '/api/v1/bean/
|
|
3411
|
+
url: '/api/v1/{region}/bean/import/provider/{providerName}/sync',
|
|
3412
|
+
path: {
|
|
3413
|
+
providerName: data.providerName,
|
|
3414
|
+
region: data.region
|
|
3415
|
+
},
|
|
2649
3416
|
body: data.requestBody,
|
|
2650
3417
|
mediaType: 'application/json',
|
|
2651
3418
|
errors: {
|
|
2652
|
-
|
|
3419
|
+
400: 'Invalid request data',
|
|
3420
|
+
401: 'Missing or invalid authentication',
|
|
3421
|
+
404: 'Provider not supported'
|
|
2653
3422
|
}
|
|
2654
3423
|
});
|
|
2655
3424
|
}
|
|
2656
3425
|
|
|
2657
3426
|
/**
|
|
2658
|
-
* Get
|
|
2659
|
-
*
|
|
3427
|
+
* Get supported providers
|
|
3428
|
+
* Returns a list of all providers supported by the sync endpoint.
|
|
3429
|
+
* @param data The data for the request.
|
|
3430
|
+
* @param data.region Region code for tenant context
|
|
3431
|
+
* @returns SupportedProvidersResponseDto List of supported providers
|
|
2660
3432
|
* @throws ApiError
|
|
2661
3433
|
*/
|
|
2662
|
-
public static
|
|
3434
|
+
public static providerSyncControllerGetSupportedProviders(
|
|
3435
|
+
data: ProviderSyncControllerGetSupportedProvidersData
|
|
3436
|
+
): CancelablePromise<ProviderSyncControllerGetSupportedProvidersResponse> {
|
|
2663
3437
|
return __request(OpenAPI, {
|
|
2664
3438
|
method: 'GET',
|
|
2665
|
-
url: '/api/v1/bean/
|
|
3439
|
+
url: '/api/v1/{region}/bean/import/provider/supported',
|
|
3440
|
+
path: {
|
|
3441
|
+
region: data.region
|
|
3442
|
+
},
|
|
3443
|
+
errors: {
|
|
3444
|
+
401: 'Missing or invalid authentication'
|
|
3445
|
+
}
|
|
2666
3446
|
});
|
|
2667
3447
|
}
|
|
2668
3448
|
|
|
2669
3449
|
/**
|
|
2670
|
-
*
|
|
3450
|
+
* Check if provider is supported
|
|
3451
|
+
* Returns whether a specific provider is supported.
|
|
2671
3452
|
* @param data The data for the request.
|
|
2672
|
-
* @param data.
|
|
2673
|
-
* @param data.region Region code for
|
|
2674
|
-
* @returns unknown
|
|
3453
|
+
* @param data.providerName Provider name to check
|
|
3454
|
+
* @param data.region Region code for tenant context
|
|
3455
|
+
* @returns unknown Provider support status
|
|
2675
3456
|
* @throws ApiError
|
|
2676
3457
|
*/
|
|
2677
|
-
public static
|
|
2678
|
-
data:
|
|
2679
|
-
): CancelablePromise<
|
|
3458
|
+
public static providerSyncControllerIsProviderSupported(
|
|
3459
|
+
data: ProviderSyncControllerIsProviderSupportedData
|
|
3460
|
+
): CancelablePromise<ProviderSyncControllerIsProviderSupportedResponse> {
|
|
2680
3461
|
return __request(OpenAPI, {
|
|
2681
3462
|
method: 'GET',
|
|
2682
|
-
url: '/api/v1/bean/
|
|
2683
|
-
|
|
2684
|
-
|
|
3463
|
+
url: '/api/v1/{region}/bean/import/provider/{providerName}/supported',
|
|
3464
|
+
path: {
|
|
3465
|
+
providerName: data.providerName,
|
|
2685
3466
|
region: data.region
|
|
3467
|
+
},
|
|
3468
|
+
errors: {
|
|
3469
|
+
401: 'Missing or invalid authentication'
|
|
2686
3470
|
}
|
|
2687
3471
|
});
|
|
2688
3472
|
}
|
|
3473
|
+
}
|
|
2689
3474
|
|
|
3475
|
+
export class ExternalAccountLinksService {
|
|
2690
3476
|
/**
|
|
2691
|
-
*
|
|
3477
|
+
* Create an external account → BeanAccount mapping (ADR-0113)
|
|
2692
3478
|
* @param data The data for the request.
|
|
2693
|
-
* @param data.
|
|
3479
|
+
* @param data.region Region code for tenant context
|
|
2694
3480
|
* @param data.requestBody
|
|
2695
|
-
* @returns
|
|
3481
|
+
* @returns ExternalAccountLinkResponseDto Link created.
|
|
2696
3482
|
* @throws ApiError
|
|
2697
3483
|
*/
|
|
2698
|
-
public static
|
|
2699
|
-
data:
|
|
2700
|
-
): CancelablePromise<
|
|
3484
|
+
public static externalAccountLinkControllerCreate(
|
|
3485
|
+
data: ExternalAccountLinkControllerCreateData
|
|
3486
|
+
): CancelablePromise<ExternalAccountLinkControllerCreateResponse> {
|
|
2701
3487
|
return __request(OpenAPI, {
|
|
2702
|
-
method: '
|
|
2703
|
-
url: '/api/v1/bean/
|
|
3488
|
+
method: 'POST',
|
|
3489
|
+
url: '/api/v1/{region}/bean/external-account-links',
|
|
2704
3490
|
path: {
|
|
2705
|
-
|
|
3491
|
+
region: data.region
|
|
2706
3492
|
},
|
|
2707
3493
|
body: data.requestBody,
|
|
2708
3494
|
mediaType: 'application/json',
|
|
2709
3495
|
errors: {
|
|
2710
|
-
|
|
3496
|
+
422: 'beanAccountId not owned, or an active link already exists.'
|
|
2711
3497
|
}
|
|
2712
3498
|
});
|
|
2713
3499
|
}
|
|
2714
3500
|
|
|
2715
3501
|
/**
|
|
2716
|
-
*
|
|
3502
|
+
* List the user's active external account links
|
|
2717
3503
|
* @param data The data for the request.
|
|
2718
|
-
* @param data.
|
|
2719
|
-
* @
|
|
3504
|
+
* @param data.provider
|
|
3505
|
+
* @param data.region Region code for tenant context
|
|
3506
|
+
* @returns ExternalAccountLinkListResponseDto Links retrieved.
|
|
2720
3507
|
* @throws ApiError
|
|
2721
3508
|
*/
|
|
2722
|
-
public static
|
|
2723
|
-
data:
|
|
2724
|
-
): CancelablePromise<
|
|
3509
|
+
public static externalAccountLinkControllerFindAll(
|
|
3510
|
+
data: ExternalAccountLinkControllerFindAllData
|
|
3511
|
+
): CancelablePromise<ExternalAccountLinkControllerFindAllResponse> {
|
|
2725
3512
|
return __request(OpenAPI, {
|
|
2726
|
-
method: '
|
|
2727
|
-
url: '/api/v1/bean/
|
|
3513
|
+
method: 'GET',
|
|
3514
|
+
url: '/api/v1/{region}/bean/external-account-links',
|
|
2728
3515
|
path: {
|
|
2729
|
-
|
|
3516
|
+
region: data.region
|
|
2730
3517
|
},
|
|
2731
|
-
|
|
2732
|
-
|
|
3518
|
+
query: {
|
|
3519
|
+
provider: data.provider
|
|
2733
3520
|
}
|
|
2734
3521
|
});
|
|
2735
3522
|
}
|
|
2736
|
-
}
|
|
2737
3523
|
|
|
2738
|
-
export class ProviderSyncService {
|
|
2739
3524
|
/**
|
|
2740
|
-
*
|
|
2741
|
-
*
|
|
2742
|
-
* Accepts raw transactions from external financial data providers, transforms them to Beancount format, and processes them through the ingestion pipeline.
|
|
2743
|
-
*
|
|
2744
|
-
* **Supported Providers:**
|
|
2745
|
-
* - **plaid**: Plaid API (US, Canada, Europe)
|
|
2746
|
-
* - **teller**: Teller API (US)
|
|
2747
|
-
* - **truelayer**: TrueLayer Open Banking (UK, Europe)
|
|
2748
|
-
* - **gocardless**: GoCardless Bank Account Data (Europe)
|
|
2749
|
-
* - **simplefin**: SimpleFIN (Self-hosted)
|
|
2750
|
-
* - **yodlee**: Yodlee (Global)
|
|
2751
|
-
* - **beancount-direct**: Beancount format transactions
|
|
2752
|
-
* - **parsed-bill**: Client-side parsed bill transactions
|
|
2753
|
-
*
|
|
2754
|
-
* **Processing Flow:**
|
|
2755
|
-
* 1. Transform raw data via provider adapter
|
|
2756
|
-
* 2. Validate transaction format
|
|
2757
|
-
* 3. Deduplicate using originalId
|
|
2758
|
-
* 4. Classify using rule engine
|
|
2759
|
-
* 5. Route low-confidence to Review Center
|
|
2760
|
-
* 6. Persist validated transactions
|
|
2761
|
-
*
|
|
3525
|
+
* Get a single external account link
|
|
2762
3526
|
* @param data The data for the request.
|
|
2763
|
-
* @param data.
|
|
2764
|
-
* @param data.region Region code
|
|
2765
|
-
* @
|
|
2766
|
-
* @returns ProviderSyncResponseDto Sync completed successfully
|
|
3527
|
+
* @param data.id
|
|
3528
|
+
* @param data.region Region code for tenant context
|
|
3529
|
+
* @returns ExternalAccountLinkResponseDto Link retrieved.
|
|
2767
3530
|
* @throws ApiError
|
|
2768
3531
|
*/
|
|
2769
|
-
public static
|
|
2770
|
-
data:
|
|
2771
|
-
): CancelablePromise<
|
|
3532
|
+
public static externalAccountLinkControllerFindOne(
|
|
3533
|
+
data: ExternalAccountLinkControllerFindOneData
|
|
3534
|
+
): CancelablePromise<ExternalAccountLinkControllerFindOneResponse> {
|
|
2772
3535
|
return __request(OpenAPI, {
|
|
2773
|
-
method: '
|
|
2774
|
-
url: '/api/v1/{region}/bean/
|
|
3536
|
+
method: 'GET',
|
|
3537
|
+
url: '/api/v1/{region}/bean/external-account-links/{id}',
|
|
2775
3538
|
path: {
|
|
2776
|
-
|
|
3539
|
+
id: data.id,
|
|
2777
3540
|
region: data.region
|
|
2778
3541
|
},
|
|
2779
|
-
body: data.requestBody,
|
|
2780
|
-
mediaType: 'application/json',
|
|
2781
3542
|
errors: {
|
|
2782
|
-
|
|
2783
|
-
401: 'Missing or invalid authentication',
|
|
2784
|
-
404: 'Provider not supported'
|
|
3543
|
+
422: 'Link not found or not owned by the user.'
|
|
2785
3544
|
}
|
|
2786
3545
|
});
|
|
2787
3546
|
}
|
|
2788
3547
|
|
|
2789
3548
|
/**
|
|
2790
|
-
*
|
|
2791
|
-
* Returns a list of all providers supported by the sync endpoint.
|
|
3549
|
+
* Soft-delete (disconnect) an external account link
|
|
2792
3550
|
* @param data The data for the request.
|
|
3551
|
+
* @param data.id
|
|
2793
3552
|
* @param data.region Region code for tenant context
|
|
2794
|
-
* @returns
|
|
3553
|
+
* @returns void Link soft-deleted; historical transactions are unaffected.
|
|
2795
3554
|
* @throws ApiError
|
|
2796
3555
|
*/
|
|
2797
|
-
public static
|
|
2798
|
-
data:
|
|
2799
|
-
): CancelablePromise<
|
|
3556
|
+
public static externalAccountLinkControllerRemove(
|
|
3557
|
+
data: ExternalAccountLinkControllerRemoveData
|
|
3558
|
+
): CancelablePromise<ExternalAccountLinkControllerRemoveResponse> {
|
|
2800
3559
|
return __request(OpenAPI, {
|
|
2801
|
-
method: '
|
|
2802
|
-
url: '/api/v1/{region}/bean/
|
|
3560
|
+
method: 'DELETE',
|
|
3561
|
+
url: '/api/v1/{region}/bean/external-account-links/{id}',
|
|
3562
|
+
path: {
|
|
3563
|
+
id: data.id,
|
|
3564
|
+
region: data.region
|
|
3565
|
+
}
|
|
3566
|
+
});
|
|
3567
|
+
}
|
|
3568
|
+
}
|
|
3569
|
+
|
|
3570
|
+
export class ImportTelemetryService {
|
|
3571
|
+
/**
|
|
3572
|
+
* Receive anonymous parser failure telemetry
|
|
3573
|
+
* @param data The data for the request.
|
|
3574
|
+
* @param data.region Region code for tenant context
|
|
3575
|
+
* @param data.requestBody
|
|
3576
|
+
* @returns unknown Telemetry report received
|
|
3577
|
+
* @throws ApiError
|
|
3578
|
+
*/
|
|
3579
|
+
public static telemetryControllerReportTelemetry(
|
|
3580
|
+
data: TelemetryControllerReportTelemetryData
|
|
3581
|
+
): CancelablePromise<TelemetryControllerReportTelemetryResponse> {
|
|
3582
|
+
return __request(OpenAPI, {
|
|
3583
|
+
method: 'POST',
|
|
3584
|
+
url: '/api/v1/{region}/bean/import/parser-telemetry',
|
|
2803
3585
|
path: {
|
|
2804
3586
|
region: data.region
|
|
2805
3587
|
},
|
|
3588
|
+
body: data.requestBody,
|
|
3589
|
+
mediaType: 'application/json',
|
|
2806
3590
|
errors: {
|
|
2807
|
-
401: '
|
|
3591
|
+
401: 'Unauthorized'
|
|
2808
3592
|
}
|
|
2809
3593
|
});
|
|
2810
3594
|
}
|
|
2811
3595
|
|
|
2812
3596
|
/**
|
|
2813
|
-
*
|
|
2814
|
-
* Returns whether a specific provider is supported.
|
|
3597
|
+
* Receive anonymous zero-hit coverage miss report
|
|
2815
3598
|
* @param data The data for the request.
|
|
2816
|
-
* @param data.providerName Provider name to check
|
|
2817
3599
|
* @param data.region Region code for tenant context
|
|
2818
|
-
* @
|
|
3600
|
+
* @param data.requestBody
|
|
3601
|
+
* @returns unknown Coverage miss report received
|
|
2819
3602
|
* @throws ApiError
|
|
2820
3603
|
*/
|
|
2821
|
-
public static
|
|
2822
|
-
data:
|
|
2823
|
-
): CancelablePromise<
|
|
3604
|
+
public static telemetryControllerReportCoverageMiss(
|
|
3605
|
+
data: TelemetryControllerReportCoverageMissData
|
|
3606
|
+
): CancelablePromise<TelemetryControllerReportCoverageMissResponse> {
|
|
2824
3607
|
return __request(OpenAPI, {
|
|
2825
|
-
method: '
|
|
2826
|
-
url: '/api/v1/{region}/bean/import/
|
|
3608
|
+
method: 'POST',
|
|
3609
|
+
url: '/api/v1/{region}/bean/import/parser-coverage-miss',
|
|
2827
3610
|
path: {
|
|
2828
|
-
providerName: data.providerName,
|
|
2829
3611
|
region: data.region
|
|
2830
3612
|
},
|
|
3613
|
+
body: data.requestBody,
|
|
3614
|
+
mediaType: 'application/json',
|
|
2831
3615
|
errors: {
|
|
2832
|
-
401: '
|
|
3616
|
+
401: 'Unauthorized'
|
|
2833
3617
|
}
|
|
2834
3618
|
});
|
|
2835
3619
|
}
|
|
2836
|
-
}
|
|
2837
3620
|
|
|
2838
|
-
export class ImportTelemetryService {
|
|
2839
3621
|
/**
|
|
2840
|
-
*
|
|
3622
|
+
* Coverage metrics (uncovered format aggregation)
|
|
2841
3623
|
* @param data The data for the request.
|
|
2842
3624
|
* @param data.region Region code for tenant context
|
|
2843
|
-
* @param data.
|
|
2844
|
-
* @returns unknown
|
|
3625
|
+
* @param data.topN Top-N uncovered formats (default 10)
|
|
3626
|
+
* @returns unknown Coverage metrics
|
|
2845
3627
|
* @throws ApiError
|
|
2846
3628
|
*/
|
|
2847
|
-
public static
|
|
2848
|
-
data:
|
|
2849
|
-
): CancelablePromise<
|
|
3629
|
+
public static telemetryControllerGetCoverageMetrics(
|
|
3630
|
+
data: TelemetryControllerGetCoverageMetricsData
|
|
3631
|
+
): CancelablePromise<TelemetryControllerGetCoverageMetricsResponse> {
|
|
2850
3632
|
return __request(OpenAPI, {
|
|
2851
|
-
method: '
|
|
2852
|
-
url: '/api/v1/{region}/bean/import/parser-
|
|
3633
|
+
method: 'GET',
|
|
3634
|
+
url: '/api/v1/{region}/bean/import/parser-coverage-metrics',
|
|
2853
3635
|
path: {
|
|
2854
3636
|
region: data.region
|
|
2855
3637
|
},
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
errors: {
|
|
2859
|
-
401: 'Unauthorized'
|
|
3638
|
+
query: {
|
|
3639
|
+
topN: data.topN
|
|
2860
3640
|
}
|
|
2861
3641
|
});
|
|
2862
3642
|
}
|
|
@@ -2945,6 +3725,128 @@ export class BeanNlpService {
|
|
|
2945
3725
|
}
|
|
2946
3726
|
}
|
|
2947
3727
|
|
|
3728
|
+
export class BeanPlatformsService {
|
|
3729
|
+
/**
|
|
3730
|
+
* Get all platforms with statistics
|
|
3731
|
+
* @returns unknown List of platforms with binding and account counts
|
|
3732
|
+
* @throws ApiError
|
|
3733
|
+
*/
|
|
3734
|
+
public static platformControllerFindAll(): CancelablePromise<PlatformControllerFindAllResponse> {
|
|
3735
|
+
return __request(OpenAPI, {
|
|
3736
|
+
method: 'GET',
|
|
3737
|
+
url: '/api/v1/bean/platforms'
|
|
3738
|
+
});
|
|
3739
|
+
}
|
|
3740
|
+
|
|
3741
|
+
/**
|
|
3742
|
+
* Create a new platform
|
|
3743
|
+
* @param data The data for the request.
|
|
3744
|
+
* @param data.requestBody
|
|
3745
|
+
* @returns unknown Platform created successfully
|
|
3746
|
+
* @throws ApiError
|
|
3747
|
+
*/
|
|
3748
|
+
public static platformControllerCreate(
|
|
3749
|
+
data: PlatformControllerCreateData
|
|
3750
|
+
): CancelablePromise<PlatformControllerCreateResponse> {
|
|
3751
|
+
return __request(OpenAPI, {
|
|
3752
|
+
method: 'POST',
|
|
3753
|
+
url: '/api/v1/bean/platforms',
|
|
3754
|
+
body: data.requestBody,
|
|
3755
|
+
mediaType: 'application/json',
|
|
3756
|
+
errors: {
|
|
3757
|
+
409: 'Platform already exists'
|
|
3758
|
+
}
|
|
3759
|
+
});
|
|
3760
|
+
}
|
|
3761
|
+
|
|
3762
|
+
/**
|
|
3763
|
+
* Get platform list for current user
|
|
3764
|
+
* @param data The data for the request.
|
|
3765
|
+
* @param data.region Region code (ISO 3166-1 alpha-2) that biases within-type-bucket ordering (local-region platforms first). Case-insensitive — stored/compared UPPERCASE ("cn" == "CN").
|
|
3766
|
+
* @returns PlatformListItemDto List of platforms with user binding status
|
|
3767
|
+
* @throws ApiError
|
|
3768
|
+
*/
|
|
3769
|
+
public static platformControllerGetPlatformList(
|
|
3770
|
+
data: PlatformControllerGetPlatformListData = {}
|
|
3771
|
+
): CancelablePromise<PlatformControllerGetPlatformListResponse> {
|
|
3772
|
+
return __request(OpenAPI, {
|
|
3773
|
+
method: 'GET',
|
|
3774
|
+
url: '/api/v1/bean/platforms/list',
|
|
3775
|
+
query: {
|
|
3776
|
+
region: data.region
|
|
3777
|
+
}
|
|
3778
|
+
});
|
|
3779
|
+
}
|
|
3780
|
+
|
|
3781
|
+
/**
|
|
3782
|
+
* Match platforms by name or alias
|
|
3783
|
+
* @param data The data for the request.
|
|
3784
|
+
* @param data.q Search query — Chinese name, English name, or abbreviation
|
|
3785
|
+
* @param data.region Region code (ISO 3166-1 alpha-2) that biases within-tier ordering (local-region platforms first); also the intended categoryOverrides key. Case-insensitive — stored/compared UPPERCASE ("cn" == "CN").
|
|
3786
|
+
* @returns PlatformMatchResponseDto Matching platforms with overall match type and truncation flag
|
|
3787
|
+
* @throws ApiError
|
|
3788
|
+
*/
|
|
3789
|
+
public static platformControllerMatchPlatforms(
|
|
3790
|
+
data: PlatformControllerMatchPlatformsData
|
|
3791
|
+
): CancelablePromise<PlatformControllerMatchPlatformsResponse> {
|
|
3792
|
+
return __request(OpenAPI, {
|
|
3793
|
+
method: 'GET',
|
|
3794
|
+
url: '/api/v1/bean/platforms/match',
|
|
3795
|
+
query: {
|
|
3796
|
+
q: data.q,
|
|
3797
|
+
region: data.region
|
|
3798
|
+
}
|
|
3799
|
+
});
|
|
3800
|
+
}
|
|
3801
|
+
|
|
3802
|
+
/**
|
|
3803
|
+
* Update a platform
|
|
3804
|
+
* @param data The data for the request.
|
|
3805
|
+
* @param data.id Platform ID
|
|
3806
|
+
* @param data.requestBody
|
|
3807
|
+
* @returns unknown Platform updated successfully
|
|
3808
|
+
* @throws ApiError
|
|
3809
|
+
*/
|
|
3810
|
+
public static platformControllerUpdate(
|
|
3811
|
+
data: PlatformControllerUpdateData
|
|
3812
|
+
): CancelablePromise<PlatformControllerUpdateResponse> {
|
|
3813
|
+
return __request(OpenAPI, {
|
|
3814
|
+
method: 'PUT',
|
|
3815
|
+
url: '/api/v1/bean/platforms/{id}',
|
|
3816
|
+
path: {
|
|
3817
|
+
id: data.id
|
|
3818
|
+
},
|
|
3819
|
+
body: data.requestBody,
|
|
3820
|
+
mediaType: 'application/json',
|
|
3821
|
+
errors: {
|
|
3822
|
+
404: 'Platform not found'
|
|
3823
|
+
}
|
|
3824
|
+
});
|
|
3825
|
+
}
|
|
3826
|
+
|
|
3827
|
+
/**
|
|
3828
|
+
* Delete a platform
|
|
3829
|
+
* @param data The data for the request.
|
|
3830
|
+
* @param data.id Platform ID
|
|
3831
|
+
* @returns void Platform deleted successfully
|
|
3832
|
+
* @throws ApiError
|
|
3833
|
+
*/
|
|
3834
|
+
public static platformControllerDelete(
|
|
3835
|
+
data: PlatformControllerDeleteData
|
|
3836
|
+
): CancelablePromise<PlatformControllerDeleteResponse> {
|
|
3837
|
+
return __request(OpenAPI, {
|
|
3838
|
+
method: 'DELETE',
|
|
3839
|
+
url: '/api/v1/bean/platforms/{id}',
|
|
3840
|
+
path: {
|
|
3841
|
+
id: data.id
|
|
3842
|
+
},
|
|
3843
|
+
errors: {
|
|
3844
|
+
404: 'Platform not found'
|
|
3845
|
+
}
|
|
3846
|
+
});
|
|
3847
|
+
}
|
|
3848
|
+
}
|
|
3849
|
+
|
|
2948
3850
|
export class DashboardService {
|
|
2949
3851
|
/**
|
|
2950
3852
|
* Get net worth overview
|
|
@@ -2980,6 +3882,7 @@ export class DashboardService {
|
|
|
2980
3882
|
* @param data.region Region code for tenant context
|
|
2981
3883
|
* @param data.groupBy Grouping strategy
|
|
2982
3884
|
* @param data.date Date for balance calculation (ISO 8601 format)
|
|
3885
|
+
* @param data.accountId Scope to a single account (only valid with groupBy=holdingAssetClass, ADR-0105 §6)
|
|
2983
3886
|
* @returns unknown Accounts retrieved successfully. Response type depends on groupBy parameter.
|
|
2984
3887
|
* @throws ApiError
|
|
2985
3888
|
*/
|
|
@@ -2994,7 +3897,8 @@ export class DashboardService {
|
|
|
2994
3897
|
},
|
|
2995
3898
|
query: {
|
|
2996
3899
|
groupBy: data.groupBy,
|
|
2997
|
-
date: data.date
|
|
3900
|
+
date: data.date,
|
|
3901
|
+
accountId: data.accountId
|
|
2998
3902
|
},
|
|
2999
3903
|
errors: {
|
|
3000
3904
|
401: 'User not authenticated'
|
|
@@ -3029,124 +3933,69 @@ export class DashboardService {
|
|
|
3029
3933
|
}
|
|
3030
3934
|
});
|
|
3031
3935
|
}
|
|
3032
|
-
}
|
|
3033
3936
|
|
|
3034
|
-
export class ReportingService {
|
|
3035
3937
|
/**
|
|
3036
|
-
* Get
|
|
3037
|
-
*
|
|
3038
|
-
* Returns time series data of portfolio net worth.
|
|
3039
|
-
*
|
|
3040
|
-
* **Multi-currency Support:**
|
|
3041
|
-
* - `series[].byCurrency` - Currency breakdown for each data point
|
|
3042
|
-
* - `byCurrency` - Separate time series grouped by currency
|
|
3043
|
-
* - `warnings` - Exchange rate warnings if conversion failed
|
|
3044
|
-
*
|
|
3045
|
-
* **Parameters:**
|
|
3046
|
-
* - `period`: Time period (1m, 3m, 6m, 1y)
|
|
3047
|
-
* - `granularity`: Data granularity (day, week, month)
|
|
3048
|
-
*
|
|
3938
|
+
* Get expenses/income grouped by functional category
|
|
3939
|
+
* Returns amounts pre-aggregated by functional category (account-path Group segment) with server-side multi-currency conversion. flow=expense (default) aggregates ^Expenses: accounts; flow=income aggregates ^Income: accounts (issue #518)
|
|
3049
3940
|
* @param data The data for the request.
|
|
3050
3941
|
* @param data.region Region code for tenant context
|
|
3051
|
-
* @param data.
|
|
3052
|
-
* @param data.
|
|
3053
|
-
* @
|
|
3942
|
+
* @param data.groupBy Grouping strategy
|
|
3943
|
+
* @param data.period Time window (1m = current calendar month)
|
|
3944
|
+
* @param data.flow Account root to aggregate (expense → ^Expenses:, income → ^Income:)
|
|
3945
|
+
* @returns ExpensesByCategoryResponseDto Expenses retrieved successfully
|
|
3054
3946
|
* @throws ApiError
|
|
3055
3947
|
*/
|
|
3056
|
-
public static
|
|
3057
|
-
data:
|
|
3058
|
-
): CancelablePromise<
|
|
3948
|
+
public static dashboardControllerGetExpenses(
|
|
3949
|
+
data: DashboardControllerGetExpensesData
|
|
3950
|
+
): CancelablePromise<DashboardControllerGetExpensesResponse> {
|
|
3059
3951
|
return __request(OpenAPI, {
|
|
3060
3952
|
method: 'GET',
|
|
3061
|
-
url: '/api/v1/{region}/
|
|
3953
|
+
url: '/api/v1/{region}/dashboard/expenses',
|
|
3062
3954
|
path: {
|
|
3063
3955
|
region: data.region
|
|
3064
3956
|
},
|
|
3065
3957
|
query: {
|
|
3958
|
+
groupBy: data.groupBy,
|
|
3066
3959
|
period: data.period,
|
|
3067
|
-
|
|
3960
|
+
flow: data.flow
|
|
3068
3961
|
},
|
|
3069
3962
|
errors: {
|
|
3963
|
+
400: 'Invalid groupBy or period',
|
|
3070
3964
|
401: 'User not authenticated'
|
|
3071
3965
|
}
|
|
3072
3966
|
});
|
|
3073
3967
|
}
|
|
3968
|
+
}
|
|
3074
3969
|
|
|
3970
|
+
export class InvestmentService {
|
|
3075
3971
|
/**
|
|
3076
|
-
*
|
|
3077
|
-
*
|
|
3078
|
-
* Manually generate a portfolio snapshot for a specific date.
|
|
3079
|
-
*
|
|
3080
|
-
* **Multi-currency Support:**
|
|
3081
|
-
* - Fetches balances grouped by currency
|
|
3082
|
-
* - Uses user's baseCurrency setting for conversion
|
|
3083
|
-
* - Stores exchange rates and warnings
|
|
3084
|
-
*
|
|
3085
|
-
* **Use Cases:**
|
|
3086
|
-
* - Testing snapshot generation
|
|
3087
|
-
* - Force regeneration after data correction
|
|
3088
|
-
* - Initial setup for new users
|
|
3089
|
-
*
|
|
3972
|
+
* Get per-holding unrealized + realized P&L
|
|
3973
|
+
* Average-cost unrealized P&L per account × commodity, plus cumulative realized P&L on sold lots (method = FIFO | average, default average).
|
|
3090
3974
|
* @param data The data for the request.
|
|
3091
3975
|
* @param data.region Region code for tenant context
|
|
3092
|
-
* @param data.
|
|
3093
|
-
* @
|
|
3976
|
+
* @param data.asOf As-of date (ISO 8601), defaults to today
|
|
3977
|
+
* @param data.accountId Scope to a single account
|
|
3978
|
+
* @param data.method Realized-P&L lot-matching method (default average). Does not affect the average-cost unrealized basis.
|
|
3979
|
+
* @returns HoldingPnlResponseDto Holding P&L retrieved successfully
|
|
3094
3980
|
* @throws ApiError
|
|
3095
3981
|
*/
|
|
3096
|
-
public static
|
|
3097
|
-
data:
|
|
3098
|
-
): CancelablePromise<
|
|
3982
|
+
public static holdingPnlControllerGetHoldingPnl(
|
|
3983
|
+
data: HoldingPnlControllerGetHoldingPnlData
|
|
3984
|
+
): CancelablePromise<HoldingPnlControllerGetHoldingPnlResponse> {
|
|
3099
3985
|
return __request(OpenAPI, {
|
|
3100
|
-
method: '
|
|
3101
|
-
url: '/api/v1/{region}/
|
|
3986
|
+
method: 'GET',
|
|
3987
|
+
url: '/api/v1/{region}/investment/holdings/pnl',
|
|
3102
3988
|
path: {
|
|
3103
3989
|
region: data.region
|
|
3104
3990
|
},
|
|
3105
|
-
|
|
3106
|
-
|
|
3107
|
-
|
|
3108
|
-
|
|
3109
|
-
401: 'User not authenticated'
|
|
3110
|
-
}
|
|
3111
|
-
});
|
|
3112
|
-
}
|
|
3113
|
-
|
|
3114
|
-
/**
|
|
3115
|
-
* Backfill portfolio snapshots
|
|
3116
|
-
*
|
|
3117
|
-
* Generate snapshots for a date range (historical data backfill).
|
|
3118
|
-
*
|
|
3119
|
-
* **Multi-currency Support:**
|
|
3120
|
-
* - Each snapshot includes multi-currency data
|
|
3121
|
-
* - Uses exchange rates available at generation time
|
|
3122
|
-
* - Warnings stored for missing exchange rates
|
|
3123
|
-
*
|
|
3124
|
-
* **Best Practices:**
|
|
3125
|
-
* - Use for initial setup after account configuration
|
|
3126
|
-
* - Run during low-traffic periods for large date ranges
|
|
3127
|
-
* - Existing snapshots are skipped (not regenerated)
|
|
3128
|
-
*
|
|
3129
|
-
* @param data The data for the request.
|
|
3130
|
-
* @param data.region Region code for tenant context
|
|
3131
|
-
* @param data.requestBody
|
|
3132
|
-
* @returns BackfillSnapshotsResponse Backfill completed successfully
|
|
3133
|
-
* @throws ApiError
|
|
3134
|
-
*/
|
|
3135
|
-
public static reportingControllerBackfillSnapshots(
|
|
3136
|
-
data: ReportingControllerBackfillSnapshotsData
|
|
3137
|
-
): CancelablePromise<ReportingControllerBackfillSnapshotsResponse> {
|
|
3138
|
-
return __request(OpenAPI, {
|
|
3139
|
-
method: 'POST',
|
|
3140
|
-
url: '/api/v1/{region}/reporting/snapshots/backfill',
|
|
3141
|
-
path: {
|
|
3142
|
-
region: data.region
|
|
3991
|
+
query: {
|
|
3992
|
+
asOf: data.asOf,
|
|
3993
|
+
accountId: data.accountId,
|
|
3994
|
+
method: data.method
|
|
3143
3995
|
},
|
|
3144
|
-
body: data.requestBody,
|
|
3145
|
-
mediaType: 'application/json',
|
|
3146
3996
|
errors: {
|
|
3147
|
-
400: 'Invalid date format or
|
|
3148
|
-
401: 'User not authenticated'
|
|
3149
|
-
409: 'Backfill already in progress for this user'
|
|
3997
|
+
400: 'Invalid asOf format/value/future date, invalid accountId format, or unsupported method',
|
|
3998
|
+
401: 'User not authenticated'
|
|
3150
3999
|
}
|
|
3151
4000
|
});
|
|
3152
4001
|
}
|
|
@@ -3175,7 +4024,7 @@ export class AuthService {
|
|
|
3175
4024
|
* Anonymous login with access token
|
|
3176
4025
|
* @param data The data for the request.
|
|
3177
4026
|
* @param data.requestBody
|
|
3178
|
-
* @returns
|
|
4027
|
+
* @returns AnonymousLoginResponseDto Login successful
|
|
3179
4028
|
* @throws ApiError
|
|
3180
4029
|
*/
|
|
3181
4030
|
public static authControllerAccessTokenLogin(
|
|
@@ -3362,3 +4211,53 @@ export class InfoService {
|
|
|
3362
4211
|
});
|
|
3363
4212
|
}
|
|
3364
4213
|
}
|
|
4214
|
+
|
|
4215
|
+
export class MarketDataService {
|
|
4216
|
+
/**
|
|
4217
|
+
* Search market symbols by name or code
|
|
4218
|
+
* Ranked search over the openbb catalog. Empty `q` returns [].
|
|
4219
|
+
* @param data The data for the request.
|
|
4220
|
+
* @param data.q Search term — matched against symbol and instrument name. Empty string returns [].
|
|
4221
|
+
* @param data.limit Maximum number of results (clamped 1..50)
|
|
4222
|
+
* @param data.exchange Filter by exchange code (e.g. US, HK, SS, SZ)
|
|
4223
|
+
* @param data.assetType Filter by OpenBB asset_type (e.g. stock, etf)
|
|
4224
|
+
* @returns SymbolSearchResultDto Ranked search results
|
|
4225
|
+
* @throws ApiError
|
|
4226
|
+
*/
|
|
4227
|
+
public static symbolControllerSearch(
|
|
4228
|
+
data: SymbolControllerSearchData
|
|
4229
|
+
): CancelablePromise<SymbolControllerSearchResponse> {
|
|
4230
|
+
return __request(OpenAPI, {
|
|
4231
|
+
method: 'GET',
|
|
4232
|
+
url: '/api/v1/market/symbols/search',
|
|
4233
|
+
query: {
|
|
4234
|
+
q: data.q,
|
|
4235
|
+
limit: data.limit,
|
|
4236
|
+
exchange: data.exchange,
|
|
4237
|
+
assetType: data.assetType
|
|
4238
|
+
}
|
|
4239
|
+
});
|
|
4240
|
+
}
|
|
4241
|
+
|
|
4242
|
+
/**
|
|
4243
|
+
* Get a market symbol quote
|
|
4244
|
+
* @param data The data for the request.
|
|
4245
|
+
* @param data.symbol
|
|
4246
|
+
* @returns SymbolQuoteDto Symbol quote
|
|
4247
|
+
* @throws ApiError
|
|
4248
|
+
*/
|
|
4249
|
+
public static symbolControllerGetQuote(
|
|
4250
|
+
data: SymbolControllerGetQuoteData
|
|
4251
|
+
): CancelablePromise<SymbolControllerGetQuoteResponse> {
|
|
4252
|
+
return __request(OpenAPI, {
|
|
4253
|
+
method: 'GET',
|
|
4254
|
+
url: '/api/v1/market/symbols/{symbol}/quote',
|
|
4255
|
+
path: {
|
|
4256
|
+
symbol: data.symbol
|
|
4257
|
+
},
|
|
4258
|
+
errors: {
|
|
4259
|
+
404: 'Symbol not found in the openbb catalog'
|
|
4260
|
+
}
|
|
4261
|
+
});
|
|
4262
|
+
}
|
|
4263
|
+
}
|