@firela/api-types 0.0.0-canary.614ff760 → 0.0.0-canary.6a42fd0e
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 +1543 -147
- package/dist/index.d.ts +1543 -147
- package/dist/index.js +4 -2
- package/dist/index.mjs +4 -2
- package/package.json +1 -1
- package/src/generated/schemas.gen.ts +1566 -235
- package/src/generated/services.gen.ts +647 -3
- package/src/generated/types.gen.ts +1655 -147
|
@@ -97,6 +97,18 @@ import type {
|
|
|
97
97
|
CommodityControllerGetOrCreateResponse,
|
|
98
98
|
CommodityControllerBulkCreateData,
|
|
99
99
|
CommodityControllerBulkCreateResponse,
|
|
100
|
+
PriceControllerCreateData,
|
|
101
|
+
PriceControllerCreateResponse,
|
|
102
|
+
PriceControllerFindAllData,
|
|
103
|
+
PriceControllerFindAllResponse,
|
|
104
|
+
PriceControllerFindOneData,
|
|
105
|
+
PriceControllerFindOneResponse,
|
|
106
|
+
PriceControllerUpdateData,
|
|
107
|
+
PriceControllerUpdateResponse,
|
|
108
|
+
PriceControllerDeleteData,
|
|
109
|
+
PriceControllerDeleteResponse,
|
|
110
|
+
PriceControllerBulkCreateData,
|
|
111
|
+
PriceControllerBulkCreateResponse,
|
|
100
112
|
RecurringRuleControllerCreateData,
|
|
101
113
|
RecurringRuleControllerCreateResponse,
|
|
102
114
|
RecurringRuleControllerFindAllData,
|
|
@@ -171,6 +183,26 @@ import type {
|
|
|
171
183
|
PropertyControllerUpdateResponse,
|
|
172
184
|
PropertyControllerDeleteData,
|
|
173
185
|
PropertyControllerDeleteResponse,
|
|
186
|
+
EventControllerCreateData,
|
|
187
|
+
EventControllerCreateResponse,
|
|
188
|
+
EventControllerFindAllData,
|
|
189
|
+
EventControllerFindAllResponse,
|
|
190
|
+
EventControllerFindOneData,
|
|
191
|
+
EventControllerFindOneResponse,
|
|
192
|
+
EventControllerUpdateData,
|
|
193
|
+
EventControllerUpdateResponse,
|
|
194
|
+
EventControllerDeleteData,
|
|
195
|
+
EventControllerDeleteResponse,
|
|
196
|
+
EventControllerGetSliceData,
|
|
197
|
+
EventControllerGetSliceResponse,
|
|
198
|
+
ReconciliationControllerComputeData,
|
|
199
|
+
ReconciliationControllerComputeResponse,
|
|
200
|
+
ReconciliationControllerAssertData,
|
|
201
|
+
ReconciliationControllerAssertResponse,
|
|
202
|
+
ReconciliationControllerPadData,
|
|
203
|
+
ReconciliationControllerPadResponse,
|
|
204
|
+
ReconciliationControllerHistoryData,
|
|
205
|
+
ReconciliationControllerHistoryResponse,
|
|
174
206
|
ExportControllerExportBeancountResponse,
|
|
175
207
|
FileImportControllerImportFileData,
|
|
176
208
|
FileImportControllerImportFileResponse,
|
|
@@ -202,6 +234,10 @@ import type {
|
|
|
202
234
|
ProviderSyncControllerIsProviderSupportedResponse,
|
|
203
235
|
TelemetryControllerReportTelemetryData,
|
|
204
236
|
TelemetryControllerReportTelemetryResponse,
|
|
237
|
+
TelemetryControllerReportCoverageMissData,
|
|
238
|
+
TelemetryControllerReportCoverageMissResponse,
|
|
239
|
+
TelemetryControllerGetCoverageMetricsData,
|
|
240
|
+
TelemetryControllerGetCoverageMetricsResponse,
|
|
205
241
|
NlpControllerProcessNaturalLanguageData,
|
|
206
242
|
NlpControllerProcessNaturalLanguageResponse,
|
|
207
243
|
NlpControllerClearSessionData,
|
|
@@ -214,8 +250,14 @@ import type {
|
|
|
214
250
|
DashboardControllerGetAccountsResponse,
|
|
215
251
|
DashboardControllerGetCashFlowData,
|
|
216
252
|
DashboardControllerGetCashFlowResponse,
|
|
253
|
+
DashboardControllerGetExpensesData,
|
|
254
|
+
DashboardControllerGetExpensesResponse,
|
|
255
|
+
HoldingPnlControllerGetHoldingPnlData,
|
|
256
|
+
HoldingPnlControllerGetHoldingPnlResponse,
|
|
217
257
|
ReportingControllerGetPortfolioTrendsData,
|
|
218
258
|
ReportingControllerGetPortfolioTrendsResponse,
|
|
259
|
+
ReportingControllerGetCashFlowTrendsData,
|
|
260
|
+
ReportingControllerGetCashFlowTrendsResponse,
|
|
219
261
|
ReportingControllerGenerateSnapshotData,
|
|
220
262
|
ReportingControllerGenerateSnapshotResponse,
|
|
221
263
|
ReportingControllerBackfillSnapshotsData,
|
|
@@ -551,6 +593,7 @@ export class BeanTransactionsService {
|
|
|
551
593
|
* @param data.status Filter by transaction status
|
|
552
594
|
* @param data.search Search in narration and payee fields (max 200 chars)
|
|
553
595
|
* @param data.accountId Filter by account ID (transactions with postings to this account)
|
|
596
|
+
* @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
597
|
* @returns TransactionListResponseDto Transaction list
|
|
555
598
|
* @throws ApiError
|
|
556
599
|
*/
|
|
@@ -570,7 +613,8 @@ export class BeanTransactionsService {
|
|
|
570
613
|
dateTo: data.dateTo,
|
|
571
614
|
status: data.status,
|
|
572
615
|
search: data.search,
|
|
573
|
-
accountId: data.accountId
|
|
616
|
+
accountId: data.accountId,
|
|
617
|
+
category: data.category
|
|
574
618
|
},
|
|
575
619
|
errors: {
|
|
576
620
|
400: 'Validation failed',
|
|
@@ -1479,6 +1523,173 @@ export class BeanCommoditiesService {
|
|
|
1479
1523
|
}
|
|
1480
1524
|
}
|
|
1481
1525
|
|
|
1526
|
+
export class BeanPricesService {
|
|
1527
|
+
/**
|
|
1528
|
+
* Create a new price
|
|
1529
|
+
* Creates a new price entry for the authenticated user
|
|
1530
|
+
* @param data The data for the request.
|
|
1531
|
+
* @param data.region Region code for tenant context
|
|
1532
|
+
* @param data.requestBody
|
|
1533
|
+
* @returns PriceResponseDto Price created successfully
|
|
1534
|
+
* @throws ApiError
|
|
1535
|
+
*/
|
|
1536
|
+
public static priceControllerCreate(
|
|
1537
|
+
data: PriceControllerCreateData
|
|
1538
|
+
): CancelablePromise<PriceControllerCreateResponse> {
|
|
1539
|
+
return __request(OpenAPI, {
|
|
1540
|
+
method: 'POST',
|
|
1541
|
+
url: '/api/v1/{region}/bean/prices',
|
|
1542
|
+
path: {
|
|
1543
|
+
region: data.region
|
|
1544
|
+
},
|
|
1545
|
+
body: data.requestBody,
|
|
1546
|
+
mediaType: 'application/json',
|
|
1547
|
+
errors: {
|
|
1548
|
+
404: 'Currency or quoteCurrency commodity not found',
|
|
1549
|
+
409: 'Price already exists for this currency pair and date'
|
|
1550
|
+
}
|
|
1551
|
+
});
|
|
1552
|
+
}
|
|
1553
|
+
|
|
1554
|
+
/**
|
|
1555
|
+
* List user prices
|
|
1556
|
+
* Returns all price entries for the authenticated user with optional filtering
|
|
1557
|
+
* @param data The data for the request.
|
|
1558
|
+
* @param data.region Region code for tenant context
|
|
1559
|
+
* @param data.currency Filter by currency (e.g., BTC, AAPL, USD)
|
|
1560
|
+
* @param data.quoteCurrency Filter by quote currency (pricing currency, e.g., USD, CNY)
|
|
1561
|
+
* @param data.dateFrom Filter prices from this date (ISO 8601 format)
|
|
1562
|
+
* @param data.dateTo Filter prices to this date (ISO 8601 format)
|
|
1563
|
+
* @param data.search Search term for currency or quoteCurrency (case-insensitive partial match)
|
|
1564
|
+
* @param data.page Page number for pagination (default: 1)
|
|
1565
|
+
* @param data.limit Number of items per page (default: 20, max: 100)
|
|
1566
|
+
* @returns PriceListResponseDto Prices retrieved successfully
|
|
1567
|
+
* @throws ApiError
|
|
1568
|
+
*/
|
|
1569
|
+
public static priceControllerFindAll(
|
|
1570
|
+
data: PriceControllerFindAllData
|
|
1571
|
+
): CancelablePromise<PriceControllerFindAllResponse> {
|
|
1572
|
+
return __request(OpenAPI, {
|
|
1573
|
+
method: 'GET',
|
|
1574
|
+
url: '/api/v1/{region}/bean/prices',
|
|
1575
|
+
path: {
|
|
1576
|
+
region: data.region
|
|
1577
|
+
},
|
|
1578
|
+
query: {
|
|
1579
|
+
currency: data.currency,
|
|
1580
|
+
quoteCurrency: data.quoteCurrency,
|
|
1581
|
+
dateFrom: data.dateFrom,
|
|
1582
|
+
dateTo: data.dateTo,
|
|
1583
|
+
search: data.search,
|
|
1584
|
+
page: data.page,
|
|
1585
|
+
limit: data.limit
|
|
1586
|
+
}
|
|
1587
|
+
});
|
|
1588
|
+
}
|
|
1589
|
+
|
|
1590
|
+
/**
|
|
1591
|
+
* Get price by ID
|
|
1592
|
+
* Returns a single price entry by its ID
|
|
1593
|
+
* @param data The data for the request.
|
|
1594
|
+
* @param data.id Price ID
|
|
1595
|
+
* @param data.region Region code for tenant context
|
|
1596
|
+
* @returns PriceResponseDto Price retrieved successfully
|
|
1597
|
+
* @throws ApiError
|
|
1598
|
+
*/
|
|
1599
|
+
public static priceControllerFindOne(
|
|
1600
|
+
data: PriceControllerFindOneData
|
|
1601
|
+
): CancelablePromise<PriceControllerFindOneResponse> {
|
|
1602
|
+
return __request(OpenAPI, {
|
|
1603
|
+
method: 'GET',
|
|
1604
|
+
url: '/api/v1/{region}/bean/prices/{id}',
|
|
1605
|
+
path: {
|
|
1606
|
+
id: data.id,
|
|
1607
|
+
region: data.region
|
|
1608
|
+
},
|
|
1609
|
+
errors: {
|
|
1610
|
+
404: 'Price not found'
|
|
1611
|
+
}
|
|
1612
|
+
});
|
|
1613
|
+
}
|
|
1614
|
+
|
|
1615
|
+
/**
|
|
1616
|
+
* Update a price
|
|
1617
|
+
* Updates an existing price entry
|
|
1618
|
+
* @param data The data for the request.
|
|
1619
|
+
* @param data.id Price ID
|
|
1620
|
+
* @param data.region Region code for tenant context
|
|
1621
|
+
* @param data.requestBody
|
|
1622
|
+
* @returns PriceResponseDto Price updated successfully
|
|
1623
|
+
* @throws ApiError
|
|
1624
|
+
*/
|
|
1625
|
+
public static priceControllerUpdate(
|
|
1626
|
+
data: PriceControllerUpdateData
|
|
1627
|
+
): CancelablePromise<PriceControllerUpdateResponse> {
|
|
1628
|
+
return __request(OpenAPI, {
|
|
1629
|
+
method: 'PUT',
|
|
1630
|
+
url: '/api/v1/{region}/bean/prices/{id}',
|
|
1631
|
+
path: {
|
|
1632
|
+
id: data.id,
|
|
1633
|
+
region: data.region
|
|
1634
|
+
},
|
|
1635
|
+
body: data.requestBody,
|
|
1636
|
+
mediaType: 'application/json',
|
|
1637
|
+
errors: {
|
|
1638
|
+
404: 'Price not found',
|
|
1639
|
+
409: 'Updated price conflicts with existing price'
|
|
1640
|
+
}
|
|
1641
|
+
});
|
|
1642
|
+
}
|
|
1643
|
+
|
|
1644
|
+
/**
|
|
1645
|
+
* Delete a price
|
|
1646
|
+
* Deletes a price entry (hard delete)
|
|
1647
|
+
* @param data The data for the request.
|
|
1648
|
+
* @param data.id Price ID
|
|
1649
|
+
* @param data.region Region code for tenant context
|
|
1650
|
+
* @returns void Price deleted successfully
|
|
1651
|
+
* @throws ApiError
|
|
1652
|
+
*/
|
|
1653
|
+
public static priceControllerDelete(
|
|
1654
|
+
data: PriceControllerDeleteData
|
|
1655
|
+
): CancelablePromise<PriceControllerDeleteResponse> {
|
|
1656
|
+
return __request(OpenAPI, {
|
|
1657
|
+
method: 'DELETE',
|
|
1658
|
+
url: '/api/v1/{region}/bean/prices/{id}',
|
|
1659
|
+
path: {
|
|
1660
|
+
id: data.id,
|
|
1661
|
+
region: data.region
|
|
1662
|
+
},
|
|
1663
|
+
errors: {
|
|
1664
|
+
404: 'Price not found'
|
|
1665
|
+
}
|
|
1666
|
+
});
|
|
1667
|
+
}
|
|
1668
|
+
|
|
1669
|
+
/**
|
|
1670
|
+
* Bulk create prices
|
|
1671
|
+
* Creates multiple price entries at once (skips duplicates)
|
|
1672
|
+
* @param data The data for the request.
|
|
1673
|
+
* @param data.region Region code for tenant context
|
|
1674
|
+
* @param data.requestBody
|
|
1675
|
+
* @returns PriceResponseDto Prices created successfully
|
|
1676
|
+
* @throws ApiError
|
|
1677
|
+
*/
|
|
1678
|
+
public static priceControllerBulkCreate(
|
|
1679
|
+
data: PriceControllerBulkCreateData
|
|
1680
|
+
): CancelablePromise<PriceControllerBulkCreateResponse> {
|
|
1681
|
+
return __request(OpenAPI, {
|
|
1682
|
+
method: 'POST',
|
|
1683
|
+
url: '/api/v1/{region}/bean/prices/bulk',
|
|
1684
|
+
path: {
|
|
1685
|
+
region: data.region
|
|
1686
|
+
},
|
|
1687
|
+
body: data.requestBody,
|
|
1688
|
+
mediaType: 'application/json'
|
|
1689
|
+
});
|
|
1690
|
+
}
|
|
1691
|
+
}
|
|
1692
|
+
|
|
1482
1693
|
export class RecurringRulesService {
|
|
1483
1694
|
/**
|
|
1484
1695
|
* Create a new recurring rule
|
|
@@ -2442,6 +2653,287 @@ export class PropertiesService {
|
|
|
2442
2653
|
}
|
|
2443
2654
|
}
|
|
2444
2655
|
|
|
2656
|
+
export class LifeEventsService {
|
|
2657
|
+
/**
|
|
2658
|
+
* Create a new life event
|
|
2659
|
+
* Creates a new life event entry for the authenticated user. Returns ETag header carrying the row updatedAt.
|
|
2660
|
+
* @param data The data for the request.
|
|
2661
|
+
* @param data.region Region code for tenant context (decorative for life events)
|
|
2662
|
+
* @param data.requestBody
|
|
2663
|
+
* @returns EventResponseDto Life event created successfully
|
|
2664
|
+
* @throws ApiError
|
|
2665
|
+
*/
|
|
2666
|
+
public static eventControllerCreate(
|
|
2667
|
+
data: EventControllerCreateData
|
|
2668
|
+
): CancelablePromise<EventControllerCreateResponse> {
|
|
2669
|
+
return __request(OpenAPI, {
|
|
2670
|
+
method: 'POST',
|
|
2671
|
+
url: '/api/v1/{region}/bean/events',
|
|
2672
|
+
path: {
|
|
2673
|
+
region: data.region
|
|
2674
|
+
},
|
|
2675
|
+
body: data.requestBody,
|
|
2676
|
+
mediaType: 'application/json',
|
|
2677
|
+
errors: {
|
|
2678
|
+
409: 'Life event already exists for this (userId, type, date) combination'
|
|
2679
|
+
}
|
|
2680
|
+
});
|
|
2681
|
+
}
|
|
2682
|
+
|
|
2683
|
+
/**
|
|
2684
|
+
* List user life events
|
|
2685
|
+
* Returns life events for the authenticated user with optional filtering by type, description search, and date range.
|
|
2686
|
+
* @param data The data for the request.
|
|
2687
|
+
* @param data.region Region code for tenant context (decorative for life events)
|
|
2688
|
+
* @param data.type Filter by life event type (exact match)
|
|
2689
|
+
* @param data.q Search term for description (case-insensitive partial match)
|
|
2690
|
+
* @param data.from Filter life events from this date (ISO 8601 format)
|
|
2691
|
+
* @param data.to Filter life events to this date (ISO 8601 format)
|
|
2692
|
+
* @param data.page Page number for pagination (default: 1)
|
|
2693
|
+
* @param data.limit Number of items per page (default: 20, max: 100)
|
|
2694
|
+
* @returns EventListResponseDto Life events retrieved successfully
|
|
2695
|
+
* @throws ApiError
|
|
2696
|
+
*/
|
|
2697
|
+
public static eventControllerFindAll(
|
|
2698
|
+
data: EventControllerFindAllData
|
|
2699
|
+
): CancelablePromise<EventControllerFindAllResponse> {
|
|
2700
|
+
return __request(OpenAPI, {
|
|
2701
|
+
method: 'GET',
|
|
2702
|
+
url: '/api/v1/{region}/bean/events',
|
|
2703
|
+
path: {
|
|
2704
|
+
region: data.region
|
|
2705
|
+
},
|
|
2706
|
+
query: {
|
|
2707
|
+
type: data.type,
|
|
2708
|
+
q: data.q,
|
|
2709
|
+
from: data.from,
|
|
2710
|
+
to: data.to,
|
|
2711
|
+
page: data.page,
|
|
2712
|
+
limit: data.limit
|
|
2713
|
+
}
|
|
2714
|
+
});
|
|
2715
|
+
}
|
|
2716
|
+
|
|
2717
|
+
/**
|
|
2718
|
+
* Get life event by ID
|
|
2719
|
+
* Returns a single life event by its ID. Returns ETag header.
|
|
2720
|
+
* @param data The data for the request.
|
|
2721
|
+
* @param data.id Life event ID
|
|
2722
|
+
* @param data.region Region code for tenant context (decorative for life events)
|
|
2723
|
+
* @returns EventResponseDto Life event retrieved successfully
|
|
2724
|
+
* @throws ApiError
|
|
2725
|
+
*/
|
|
2726
|
+
public static eventControllerFindOne(
|
|
2727
|
+
data: EventControllerFindOneData
|
|
2728
|
+
): CancelablePromise<EventControllerFindOneResponse> {
|
|
2729
|
+
return __request(OpenAPI, {
|
|
2730
|
+
method: 'GET',
|
|
2731
|
+
url: '/api/v1/{region}/bean/events/{id}',
|
|
2732
|
+
path: {
|
|
2733
|
+
id: data.id,
|
|
2734
|
+
region: data.region
|
|
2735
|
+
},
|
|
2736
|
+
errors: {
|
|
2737
|
+
404: 'Life event not found'
|
|
2738
|
+
}
|
|
2739
|
+
});
|
|
2740
|
+
}
|
|
2741
|
+
|
|
2742
|
+
/**
|
|
2743
|
+
* Update a life event
|
|
2744
|
+
* Updates an existing life event. If If-Match header is provided, performs optimistic concurrency check; mismatched updatedAt returns 412.
|
|
2745
|
+
* @param data The data for the request.
|
|
2746
|
+
* @param data.id Life event ID
|
|
2747
|
+
* @param data.region Region code for tenant context (decorative for life events)
|
|
2748
|
+
* @param data.requestBody
|
|
2749
|
+
* @returns EventResponseDto Life event updated successfully
|
|
2750
|
+
* @throws ApiError
|
|
2751
|
+
*/
|
|
2752
|
+
public static eventControllerUpdate(
|
|
2753
|
+
data: EventControllerUpdateData
|
|
2754
|
+
): CancelablePromise<EventControllerUpdateResponse> {
|
|
2755
|
+
return __request(OpenAPI, {
|
|
2756
|
+
method: 'PUT',
|
|
2757
|
+
url: '/api/v1/{region}/bean/events/{id}',
|
|
2758
|
+
path: {
|
|
2759
|
+
id: data.id,
|
|
2760
|
+
region: data.region
|
|
2761
|
+
},
|
|
2762
|
+
body: data.requestBody,
|
|
2763
|
+
mediaType: 'application/json',
|
|
2764
|
+
errors: {
|
|
2765
|
+
400: 'If-Match header is not a valid ISO 8601 date',
|
|
2766
|
+
404: 'Life event not found',
|
|
2767
|
+
409: 'Updated event conflicts with an existing (userId, type, date) combination',
|
|
2768
|
+
412: 'If-Match precondition failed (updatedAt mismatch)'
|
|
2769
|
+
}
|
|
2770
|
+
});
|
|
2771
|
+
}
|
|
2772
|
+
|
|
2773
|
+
/**
|
|
2774
|
+
* Delete a life event
|
|
2775
|
+
* Deletes a life event entry (hard delete). Returns 204.
|
|
2776
|
+
* @param data The data for the request.
|
|
2777
|
+
* @param data.id Life event ID
|
|
2778
|
+
* @param data.region Region code for tenant context (decorative for life events)
|
|
2779
|
+
* @returns void Life event deleted successfully
|
|
2780
|
+
* @throws ApiError
|
|
2781
|
+
*/
|
|
2782
|
+
public static eventControllerDelete(
|
|
2783
|
+
data: EventControllerDeleteData
|
|
2784
|
+
): CancelablePromise<EventControllerDeleteResponse> {
|
|
2785
|
+
return __request(OpenAPI, {
|
|
2786
|
+
method: 'DELETE',
|
|
2787
|
+
url: '/api/v1/{region}/bean/events/{id}',
|
|
2788
|
+
path: {
|
|
2789
|
+
id: data.id,
|
|
2790
|
+
region: data.region
|
|
2791
|
+
},
|
|
2792
|
+
errors: {
|
|
2793
|
+
404: 'Life event not found'
|
|
2794
|
+
}
|
|
2795
|
+
});
|
|
2796
|
+
}
|
|
2797
|
+
|
|
2798
|
+
/**
|
|
2799
|
+
* Slice time-series by a life event (Phase 79)
|
|
2800
|
+
* Returns aggregated time-series for postings matching accountPattern within the half-open date range of the given life event.
|
|
2801
|
+
* @param data The data for the request.
|
|
2802
|
+
* @param data.id Life event ID
|
|
2803
|
+
* @param data.accountPattern
|
|
2804
|
+
* @param data.granularity
|
|
2805
|
+
* @param data.region Region code for tenant context (decorative for life events)
|
|
2806
|
+
* @returns unknown Time-series sliced by the life event range
|
|
2807
|
+
* @throws ApiError
|
|
2808
|
+
*/
|
|
2809
|
+
public static eventControllerGetSlice(
|
|
2810
|
+
data: EventControllerGetSliceData
|
|
2811
|
+
): CancelablePromise<EventControllerGetSliceResponse> {
|
|
2812
|
+
return __request(OpenAPI, {
|
|
2813
|
+
method: 'GET',
|
|
2814
|
+
url: '/api/v1/{region}/bean/events/{id}/slice',
|
|
2815
|
+
path: {
|
|
2816
|
+
id: data.id,
|
|
2817
|
+
region: data.region
|
|
2818
|
+
},
|
|
2819
|
+
query: {
|
|
2820
|
+
accountPattern: data.accountPattern,
|
|
2821
|
+
granularity: data.granularity
|
|
2822
|
+
},
|
|
2823
|
+
errors: {
|
|
2824
|
+
400: 'accountPattern query param is empty',
|
|
2825
|
+
404: 'Life event not found'
|
|
2826
|
+
}
|
|
2827
|
+
});
|
|
2828
|
+
}
|
|
2829
|
+
}
|
|
2830
|
+
|
|
2831
|
+
export class BalanceReconciliationService {
|
|
2832
|
+
/**
|
|
2833
|
+
* Preview reconciliation (book vs actual)
|
|
2834
|
+
* Computes book balance, diff, Beancount-inferred tolerance, and suggested action without persisting.
|
|
2835
|
+
* @param data The data for the request.
|
|
2836
|
+
* @param data.region Region code for tenant context (decorative for reconciliation)
|
|
2837
|
+
* @param data.requestBody
|
|
2838
|
+
* @returns ReconciliationComputeResultDto Reconciliation preview
|
|
2839
|
+
* @throws ApiError
|
|
2840
|
+
*/
|
|
2841
|
+
public static reconciliationControllerCompute(
|
|
2842
|
+
data: ReconciliationControllerComputeData
|
|
2843
|
+
): CancelablePromise<ReconciliationControllerComputeResponse> {
|
|
2844
|
+
return __request(OpenAPI, {
|
|
2845
|
+
method: 'POST',
|
|
2846
|
+
url: '/api/v1/{region}/bean/reconciliations',
|
|
2847
|
+
path: {
|
|
2848
|
+
region: data.region
|
|
2849
|
+
},
|
|
2850
|
+
body: data.requestBody,
|
|
2851
|
+
mediaType: 'application/json',
|
|
2852
|
+
errors: {
|
|
2853
|
+
404: 'Account not found'
|
|
2854
|
+
}
|
|
2855
|
+
});
|
|
2856
|
+
}
|
|
2857
|
+
|
|
2858
|
+
/**
|
|
2859
|
+
* Record a balance assertion
|
|
2860
|
+
* Persists the reconciliation as a BeanBalance assertion (amount = actual, diffAmount = book − actual). Re-reconciling the same day/currency upserts.
|
|
2861
|
+
* @param data The data for the request.
|
|
2862
|
+
* @param data.region Region code for tenant context (decorative for reconciliation)
|
|
2863
|
+
* @param data.requestBody
|
|
2864
|
+
* @returns ReconciliationRecordDto Balance assertion recorded
|
|
2865
|
+
* @throws ApiError
|
|
2866
|
+
*/
|
|
2867
|
+
public static reconciliationControllerAssert(
|
|
2868
|
+
data: ReconciliationControllerAssertData
|
|
2869
|
+
): CancelablePromise<ReconciliationControllerAssertResponse> {
|
|
2870
|
+
return __request(OpenAPI, {
|
|
2871
|
+
method: 'POST',
|
|
2872
|
+
url: '/api/v1/{region}/bean/reconciliations/assert',
|
|
2873
|
+
path: {
|
|
2874
|
+
region: data.region
|
|
2875
|
+
},
|
|
2876
|
+
body: data.requestBody,
|
|
2877
|
+
mediaType: 'application/json',
|
|
2878
|
+
errors: {
|
|
2879
|
+
404: 'Account not found'
|
|
2880
|
+
}
|
|
2881
|
+
});
|
|
2882
|
+
}
|
|
2883
|
+
|
|
2884
|
+
/**
|
|
2885
|
+
* Generate a pad adjusting entry
|
|
2886
|
+
* 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.
|
|
2887
|
+
* @param data The data for the request.
|
|
2888
|
+
* @param data.region Region code for tenant context (decorative for reconciliation)
|
|
2889
|
+
* @param data.requestBody
|
|
2890
|
+
* @returns PadResultDto Pad adjusting entry generated
|
|
2891
|
+
* @throws ApiError
|
|
2892
|
+
*/
|
|
2893
|
+
public static reconciliationControllerPad(
|
|
2894
|
+
data: ReconciliationControllerPadData
|
|
2895
|
+
): CancelablePromise<ReconciliationControllerPadResponse> {
|
|
2896
|
+
return __request(OpenAPI, {
|
|
2897
|
+
method: 'POST',
|
|
2898
|
+
url: '/api/v1/{region}/bean/reconciliations/pad',
|
|
2899
|
+
path: {
|
|
2900
|
+
region: data.region
|
|
2901
|
+
},
|
|
2902
|
+
body: data.requestBody,
|
|
2903
|
+
mediaType: 'application/json',
|
|
2904
|
+
errors: {
|
|
2905
|
+
400: 'Book already within tolerance — no pad needed',
|
|
2906
|
+
404: 'Account not found'
|
|
2907
|
+
}
|
|
2908
|
+
});
|
|
2909
|
+
}
|
|
2910
|
+
|
|
2911
|
+
/**
|
|
2912
|
+
* List reconciliation history for an account
|
|
2913
|
+
* Returns recorded balance assertions (most recent first). The latest drives the account-detail "Last <date>" badge.
|
|
2914
|
+
* @param data The data for the request.
|
|
2915
|
+
* @param data.accountId BeanAccount id
|
|
2916
|
+
* @param data.region Region code for tenant context (decorative for reconciliation)
|
|
2917
|
+
* @returns ReconciliationRecordDto Reconciliation history
|
|
2918
|
+
* @throws ApiError
|
|
2919
|
+
*/
|
|
2920
|
+
public static reconciliationControllerHistory(
|
|
2921
|
+
data: ReconciliationControllerHistoryData
|
|
2922
|
+
): CancelablePromise<ReconciliationControllerHistoryResponse> {
|
|
2923
|
+
return __request(OpenAPI, {
|
|
2924
|
+
method: 'GET',
|
|
2925
|
+
url: '/api/v1/{region}/bean/accounts/{accountId}/reconciliations',
|
|
2926
|
+
path: {
|
|
2927
|
+
accountId: data.accountId,
|
|
2928
|
+
region: data.region
|
|
2929
|
+
},
|
|
2930
|
+
errors: {
|
|
2931
|
+
404: 'Account not found'
|
|
2932
|
+
}
|
|
2933
|
+
});
|
|
2934
|
+
}
|
|
2935
|
+
}
|
|
2936
|
+
|
|
2445
2937
|
export class BeanExportService {
|
|
2446
2938
|
/**
|
|
2447
2939
|
* Export Beancount ledger as ZIP
|
|
@@ -2761,7 +3253,7 @@ export class ProviderSyncService {
|
|
|
2761
3253
|
*
|
|
2762
3254
|
* @param data The data for the request.
|
|
2763
3255
|
* @param data.providerName Provider name
|
|
2764
|
-
* @param data.region Region code
|
|
3256
|
+
* @param data.region Region code for tenant context
|
|
2765
3257
|
* @param data.requestBody
|
|
2766
3258
|
* @returns ProviderSyncResponseDto Sync completed successfully
|
|
2767
3259
|
* @throws ApiError
|
|
@@ -2860,6 +3352,54 @@ export class ImportTelemetryService {
|
|
|
2860
3352
|
}
|
|
2861
3353
|
});
|
|
2862
3354
|
}
|
|
3355
|
+
|
|
3356
|
+
/**
|
|
3357
|
+
* Receive anonymous zero-hit coverage miss report
|
|
3358
|
+
* @param data The data for the request.
|
|
3359
|
+
* @param data.region Region code for tenant context
|
|
3360
|
+
* @param data.requestBody
|
|
3361
|
+
* @returns unknown Coverage miss report received
|
|
3362
|
+
* @throws ApiError
|
|
3363
|
+
*/
|
|
3364
|
+
public static telemetryControllerReportCoverageMiss(
|
|
3365
|
+
data: TelemetryControllerReportCoverageMissData
|
|
3366
|
+
): CancelablePromise<TelemetryControllerReportCoverageMissResponse> {
|
|
3367
|
+
return __request(OpenAPI, {
|
|
3368
|
+
method: 'POST',
|
|
3369
|
+
url: '/api/v1/{region}/bean/import/parser-coverage-miss',
|
|
3370
|
+
path: {
|
|
3371
|
+
region: data.region
|
|
3372
|
+
},
|
|
3373
|
+
body: data.requestBody,
|
|
3374
|
+
mediaType: 'application/json',
|
|
3375
|
+
errors: {
|
|
3376
|
+
401: 'Unauthorized'
|
|
3377
|
+
}
|
|
3378
|
+
});
|
|
3379
|
+
}
|
|
3380
|
+
|
|
3381
|
+
/**
|
|
3382
|
+
* Coverage metrics (uncovered format aggregation)
|
|
3383
|
+
* @param data The data for the request.
|
|
3384
|
+
* @param data.region Region code for tenant context
|
|
3385
|
+
* @param data.topN Top-N uncovered formats (default 10)
|
|
3386
|
+
* @returns unknown Coverage metrics
|
|
3387
|
+
* @throws ApiError
|
|
3388
|
+
*/
|
|
3389
|
+
public static telemetryControllerGetCoverageMetrics(
|
|
3390
|
+
data: TelemetryControllerGetCoverageMetricsData
|
|
3391
|
+
): CancelablePromise<TelemetryControllerGetCoverageMetricsResponse> {
|
|
3392
|
+
return __request(OpenAPI, {
|
|
3393
|
+
method: 'GET',
|
|
3394
|
+
url: '/api/v1/{region}/bean/import/parser-coverage-metrics',
|
|
3395
|
+
path: {
|
|
3396
|
+
region: data.region
|
|
3397
|
+
},
|
|
3398
|
+
query: {
|
|
3399
|
+
topN: data.topN
|
|
3400
|
+
}
|
|
3401
|
+
});
|
|
3402
|
+
}
|
|
2863
3403
|
}
|
|
2864
3404
|
|
|
2865
3405
|
export class BeanNlpService {
|
|
@@ -2980,6 +3520,7 @@ export class DashboardService {
|
|
|
2980
3520
|
* @param data.region Region code for tenant context
|
|
2981
3521
|
* @param data.groupBy Grouping strategy
|
|
2982
3522
|
* @param data.date Date for balance calculation (ISO 8601 format)
|
|
3523
|
+
* @param data.accountId Scope to a single account (only valid with groupBy=holdingAssetClass, ADR-0105 §6)
|
|
2983
3524
|
* @returns unknown Accounts retrieved successfully. Response type depends on groupBy parameter.
|
|
2984
3525
|
* @throws ApiError
|
|
2985
3526
|
*/
|
|
@@ -2994,7 +3535,8 @@ export class DashboardService {
|
|
|
2994
3535
|
},
|
|
2995
3536
|
query: {
|
|
2996
3537
|
groupBy: data.groupBy,
|
|
2997
|
-
date: data.date
|
|
3538
|
+
date: data.date,
|
|
3539
|
+
accountId: data.accountId
|
|
2998
3540
|
},
|
|
2999
3541
|
errors: {
|
|
3000
3542
|
401: 'User not authenticated'
|
|
@@ -3029,6 +3571,72 @@ export class DashboardService {
|
|
|
3029
3571
|
}
|
|
3030
3572
|
});
|
|
3031
3573
|
}
|
|
3574
|
+
|
|
3575
|
+
/**
|
|
3576
|
+
* Get expenses/income grouped by functional category
|
|
3577
|
+
* 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)
|
|
3578
|
+
* @param data The data for the request.
|
|
3579
|
+
* @param data.region Region code for tenant context
|
|
3580
|
+
* @param data.groupBy Grouping strategy
|
|
3581
|
+
* @param data.period Time window (1m = current calendar month)
|
|
3582
|
+
* @param data.flow Account root to aggregate (expense → ^Expenses:, income → ^Income:)
|
|
3583
|
+
* @returns ExpensesByCategoryResponseDto Expenses retrieved successfully
|
|
3584
|
+
* @throws ApiError
|
|
3585
|
+
*/
|
|
3586
|
+
public static dashboardControllerGetExpenses(
|
|
3587
|
+
data: DashboardControllerGetExpensesData
|
|
3588
|
+
): CancelablePromise<DashboardControllerGetExpensesResponse> {
|
|
3589
|
+
return __request(OpenAPI, {
|
|
3590
|
+
method: 'GET',
|
|
3591
|
+
url: '/api/v1/{region}/dashboard/expenses',
|
|
3592
|
+
path: {
|
|
3593
|
+
region: data.region
|
|
3594
|
+
},
|
|
3595
|
+
query: {
|
|
3596
|
+
groupBy: data.groupBy,
|
|
3597
|
+
period: data.period,
|
|
3598
|
+
flow: data.flow
|
|
3599
|
+
},
|
|
3600
|
+
errors: {
|
|
3601
|
+
400: 'Invalid groupBy or period',
|
|
3602
|
+
401: 'User not authenticated'
|
|
3603
|
+
}
|
|
3604
|
+
});
|
|
3605
|
+
}
|
|
3606
|
+
}
|
|
3607
|
+
|
|
3608
|
+
export class InvestmentService {
|
|
3609
|
+
/**
|
|
3610
|
+
* Get per-holding unrealized + realized P&L
|
|
3611
|
+
* Average-cost unrealized P&L per account × commodity, plus cumulative realized P&L on sold lots (method = FIFO | average, default average).
|
|
3612
|
+
* @param data The data for the request.
|
|
3613
|
+
* @param data.region Region code for tenant context
|
|
3614
|
+
* @param data.asOf As-of date (ISO 8601), defaults to today
|
|
3615
|
+
* @param data.accountId Scope to a single account
|
|
3616
|
+
* @param data.method Realized-P&L lot-matching method (default average). Does not affect the average-cost unrealized basis.
|
|
3617
|
+
* @returns HoldingPnlResponseDto Holding P&L retrieved successfully
|
|
3618
|
+
* @throws ApiError
|
|
3619
|
+
*/
|
|
3620
|
+
public static holdingPnlControllerGetHoldingPnl(
|
|
3621
|
+
data: HoldingPnlControllerGetHoldingPnlData
|
|
3622
|
+
): CancelablePromise<HoldingPnlControllerGetHoldingPnlResponse> {
|
|
3623
|
+
return __request(OpenAPI, {
|
|
3624
|
+
method: 'GET',
|
|
3625
|
+
url: '/api/v1/{region}/investment/holdings/pnl',
|
|
3626
|
+
path: {
|
|
3627
|
+
region: data.region
|
|
3628
|
+
},
|
|
3629
|
+
query: {
|
|
3630
|
+
asOf: data.asOf,
|
|
3631
|
+
accountId: data.accountId,
|
|
3632
|
+
method: data.method
|
|
3633
|
+
},
|
|
3634
|
+
errors: {
|
|
3635
|
+
400: 'Invalid asOf format/value/future date, invalid accountId format, or unsupported method',
|
|
3636
|
+
401: 'User not authenticated'
|
|
3637
|
+
}
|
|
3638
|
+
});
|
|
3639
|
+
}
|
|
3032
3640
|
}
|
|
3033
3641
|
|
|
3034
3642
|
export class ReportingService {
|
|
@@ -3072,6 +3680,42 @@ export class ReportingService {
|
|
|
3072
3680
|
});
|
|
3073
3681
|
}
|
|
3074
3682
|
|
|
3683
|
+
/**
|
|
3684
|
+
* Get cash-flow trends
|
|
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
|
+
*
|
|
3693
|
+
* @param data The data for the request.
|
|
3694
|
+
* @param data.region Region code for tenant context
|
|
3695
|
+
* @param data.period Time period
|
|
3696
|
+
* @param data.granularity Data granularity (accepted for API symmetry; v1 returns month buckets)
|
|
3697
|
+
* @returns CashFlowTrendsResponseDto Cash-flow trends retrieved successfully
|
|
3698
|
+
* @throws ApiError
|
|
3699
|
+
*/
|
|
3700
|
+
public static reportingControllerGetCashFlowTrends(
|
|
3701
|
+
data: ReportingControllerGetCashFlowTrendsData
|
|
3702
|
+
): CancelablePromise<ReportingControllerGetCashFlowTrendsResponse> {
|
|
3703
|
+
return __request(OpenAPI, {
|
|
3704
|
+
method: 'GET',
|
|
3705
|
+
url: '/api/v1/{region}/reporting/cash-flow/trends',
|
|
3706
|
+
path: {
|
|
3707
|
+
region: data.region
|
|
3708
|
+
},
|
|
3709
|
+
query: {
|
|
3710
|
+
period: data.period,
|
|
3711
|
+
granularity: data.granularity
|
|
3712
|
+
},
|
|
3713
|
+
errors: {
|
|
3714
|
+
401: 'User not authenticated'
|
|
3715
|
+
}
|
|
3716
|
+
});
|
|
3717
|
+
}
|
|
3718
|
+
|
|
3075
3719
|
/**
|
|
3076
3720
|
* Generate portfolio snapshot
|
|
3077
3721
|
*
|