@firela/api-types 0.0.0-canary.1917579c → 0.0.0-canary.19fa1e7e
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 +1385 -86
- package/dist/index.d.ts +1385 -86
- package/dist/index.js +60 -2
- package/dist/index.mjs +60 -2
- package/package.json +2 -3
- package/src/generated/schemas.gen.ts +1310 -104
- package/src/generated/services.gen.ts +597 -3
- package/src/generated/types.gen.ts +1511 -78
|
@@ -29,6 +29,10 @@ import type {
|
|
|
29
29
|
TransactionControllerListResponse,
|
|
30
30
|
TransactionControllerCreateBatchData,
|
|
31
31
|
TransactionControllerCreateBatchResponse,
|
|
32
|
+
TransactionControllerCorrectData,
|
|
33
|
+
TransactionControllerCorrectResponse,
|
|
34
|
+
TransactionControllerSuggestTagsData,
|
|
35
|
+
TransactionControllerSuggestTagsResponse,
|
|
32
36
|
TransactionControllerGetDetailData,
|
|
33
37
|
TransactionControllerGetDetailResponse,
|
|
34
38
|
TransactionControllerUpdateData,
|
|
@@ -167,6 +171,18 @@ import type {
|
|
|
167
171
|
PropertyControllerUpdateResponse,
|
|
168
172
|
PropertyControllerDeleteData,
|
|
169
173
|
PropertyControllerDeleteResponse,
|
|
174
|
+
EventControllerCreateData,
|
|
175
|
+
EventControllerCreateResponse,
|
|
176
|
+
EventControllerFindAllData,
|
|
177
|
+
EventControllerFindAllResponse,
|
|
178
|
+
EventControllerFindOneData,
|
|
179
|
+
EventControllerFindOneResponse,
|
|
180
|
+
EventControllerUpdateData,
|
|
181
|
+
EventControllerUpdateResponse,
|
|
182
|
+
EventControllerDeleteData,
|
|
183
|
+
EventControllerDeleteResponse,
|
|
184
|
+
EventControllerGetSliceData,
|
|
185
|
+
EventControllerGetSliceResponse,
|
|
170
186
|
ExportControllerExportBeancountResponse,
|
|
171
187
|
FileImportControllerImportFileData,
|
|
172
188
|
FileImportControllerImportFileResponse,
|
|
@@ -198,6 +214,10 @@ import type {
|
|
|
198
214
|
ProviderSyncControllerIsProviderSupportedResponse,
|
|
199
215
|
TelemetryControllerReportTelemetryData,
|
|
200
216
|
TelemetryControllerReportTelemetryResponse,
|
|
217
|
+
TelemetryControllerReportCoverageMissData,
|
|
218
|
+
TelemetryControllerReportCoverageMissResponse,
|
|
219
|
+
TelemetryControllerGetCoverageMetricsData,
|
|
220
|
+
TelemetryControllerGetCoverageMetricsResponse,
|
|
201
221
|
NlpControllerProcessNaturalLanguageData,
|
|
202
222
|
NlpControllerProcessNaturalLanguageResponse,
|
|
203
223
|
NlpControllerClearSessionData,
|
|
@@ -210,8 +230,26 @@ import type {
|
|
|
210
230
|
DashboardControllerGetAccountsResponse,
|
|
211
231
|
DashboardControllerGetCashFlowData,
|
|
212
232
|
DashboardControllerGetCashFlowResponse,
|
|
233
|
+
DashboardControllerGetExpensesData,
|
|
234
|
+
DashboardControllerGetExpensesResponse,
|
|
235
|
+
HoldingPnlControllerGetHoldingPnlData,
|
|
236
|
+
HoldingPnlControllerGetHoldingPnlResponse,
|
|
237
|
+
PriceControllerCreateData,
|
|
238
|
+
PriceControllerCreateResponse,
|
|
239
|
+
PriceControllerFindAllData,
|
|
240
|
+
PriceControllerFindAllResponse,
|
|
241
|
+
PriceControllerFindOneData,
|
|
242
|
+
PriceControllerFindOneResponse,
|
|
243
|
+
PriceControllerUpdateData,
|
|
244
|
+
PriceControllerUpdateResponse,
|
|
245
|
+
PriceControllerDeleteData,
|
|
246
|
+
PriceControllerDeleteResponse,
|
|
247
|
+
PriceControllerBulkCreateData,
|
|
248
|
+
PriceControllerBulkCreateResponse,
|
|
213
249
|
ReportingControllerGetPortfolioTrendsData,
|
|
214
250
|
ReportingControllerGetPortfolioTrendsResponse,
|
|
251
|
+
ReportingControllerGetCashFlowTrendsData,
|
|
252
|
+
ReportingControllerGetCashFlowTrendsResponse,
|
|
215
253
|
ReportingControllerGenerateSnapshotData,
|
|
216
254
|
ReportingControllerGenerateSnapshotResponse,
|
|
217
255
|
ReportingControllerBackfillSnapshotsData,
|
|
@@ -547,6 +585,7 @@ export class BeanTransactionsService {
|
|
|
547
585
|
* @param data.status Filter by transaction status
|
|
548
586
|
* @param data.search Search in narration and payee fields (max 200 chars)
|
|
549
587
|
* @param data.accountId Filter by account ID (transactions with postings to this account)
|
|
588
|
+
* @param data.category Filter by ADR-0075 functional category (Group segment); matches any posting to an Expenses/Income account whose derived Group segment equals this value
|
|
550
589
|
* @returns TransactionListResponseDto Transaction list
|
|
551
590
|
* @throws ApiError
|
|
552
591
|
*/
|
|
@@ -566,7 +605,8 @@ export class BeanTransactionsService {
|
|
|
566
605
|
dateTo: data.dateTo,
|
|
567
606
|
status: data.status,
|
|
568
607
|
search: data.search,
|
|
569
|
-
accountId: data.accountId
|
|
608
|
+
accountId: data.accountId,
|
|
609
|
+
category: data.category
|
|
570
610
|
},
|
|
571
611
|
errors: {
|
|
572
612
|
400: 'Validation failed',
|
|
@@ -603,6 +643,68 @@ export class BeanTransactionsService {
|
|
|
603
643
|
});
|
|
604
644
|
}
|
|
605
645
|
|
|
646
|
+
/**
|
|
647
|
+
* Correct (supersede) a transaction
|
|
648
|
+
* Atomically voids the original (SUPERSEDED) and creates a replacement through the full validation pipeline.
|
|
649
|
+
* @param data The data for the request.
|
|
650
|
+
* @param data.id Original transaction ID to correct
|
|
651
|
+
* @param data.region Region code for tenant context
|
|
652
|
+
* @param data.requestBody
|
|
653
|
+
* @returns TransactionDetailDto Corrected transaction created
|
|
654
|
+
* @throws ApiError
|
|
655
|
+
*/
|
|
656
|
+
public static transactionControllerCorrect(
|
|
657
|
+
data: TransactionControllerCorrectData
|
|
658
|
+
): CancelablePromise<TransactionControllerCorrectResponse> {
|
|
659
|
+
return __request(OpenAPI, {
|
|
660
|
+
method: 'POST',
|
|
661
|
+
url: '/api/v1/{region}/bean/transactions/{id}/correct',
|
|
662
|
+
path: {
|
|
663
|
+
id: data.id,
|
|
664
|
+
region: data.region
|
|
665
|
+
},
|
|
666
|
+
body: data.requestBody,
|
|
667
|
+
mediaType: 'application/json',
|
|
668
|
+
errors: {
|
|
669
|
+
404: 'Original transaction not found',
|
|
670
|
+
409: 'Original no longer ACTIVE (concurrent modification)',
|
|
671
|
+
422: 'Pipeline validation failed (does not balance, invalid accounts)'
|
|
672
|
+
}
|
|
673
|
+
});
|
|
674
|
+
}
|
|
675
|
+
|
|
676
|
+
/**
|
|
677
|
+
* Suggest transaction tags
|
|
678
|
+
* Returns distinct tags from the user ACTIVE transactions, sorted by usage, for autocomplete. Optional q performs a case-insensitive prefix match.
|
|
679
|
+
* @param data The data for the request.
|
|
680
|
+
* @param data.region Region code for tenant context
|
|
681
|
+
* @param data.q Prefix match, case-insensitive (max 50 chars)
|
|
682
|
+
* @param data.sort usage (default) or name
|
|
683
|
+
* @param data.limit Max suggestions (1-100, default 10)
|
|
684
|
+
* @returns TagSuggestionsResponseDto Tag suggestions
|
|
685
|
+
* @throws ApiError
|
|
686
|
+
*/
|
|
687
|
+
public static transactionControllerSuggestTags(
|
|
688
|
+
data: TransactionControllerSuggestTagsData
|
|
689
|
+
): CancelablePromise<TransactionControllerSuggestTagsResponse> {
|
|
690
|
+
return __request(OpenAPI, {
|
|
691
|
+
method: 'GET',
|
|
692
|
+
url: '/api/v1/{region}/bean/transactions/tags',
|
|
693
|
+
path: {
|
|
694
|
+
region: data.region
|
|
695
|
+
},
|
|
696
|
+
query: {
|
|
697
|
+
q: data.q,
|
|
698
|
+
sort: data.sort,
|
|
699
|
+
limit: data.limit
|
|
700
|
+
},
|
|
701
|
+
errors: {
|
|
702
|
+
400: 'Validation failed',
|
|
703
|
+
401: 'Authentication required'
|
|
704
|
+
}
|
|
705
|
+
});
|
|
706
|
+
}
|
|
707
|
+
|
|
606
708
|
/**
|
|
607
709
|
* Get transaction detail
|
|
608
710
|
* Returns transaction details including all postings
|
|
@@ -2376,6 +2478,181 @@ export class PropertiesService {
|
|
|
2376
2478
|
}
|
|
2377
2479
|
}
|
|
2378
2480
|
|
|
2481
|
+
export class LifeEventsService {
|
|
2482
|
+
/**
|
|
2483
|
+
* Create a new life event
|
|
2484
|
+
* Creates a new life event entry for the authenticated user. Returns ETag header carrying the row updatedAt.
|
|
2485
|
+
* @param data The data for the request.
|
|
2486
|
+
* @param data.region Region code for tenant context (decorative for life events)
|
|
2487
|
+
* @param data.requestBody
|
|
2488
|
+
* @returns EventResponseDto Life event created successfully
|
|
2489
|
+
* @throws ApiError
|
|
2490
|
+
*/
|
|
2491
|
+
public static eventControllerCreate(
|
|
2492
|
+
data: EventControllerCreateData
|
|
2493
|
+
): CancelablePromise<EventControllerCreateResponse> {
|
|
2494
|
+
return __request(OpenAPI, {
|
|
2495
|
+
method: 'POST',
|
|
2496
|
+
url: '/api/v1/{region}/bean/events',
|
|
2497
|
+
path: {
|
|
2498
|
+
region: data.region
|
|
2499
|
+
},
|
|
2500
|
+
body: data.requestBody,
|
|
2501
|
+
mediaType: 'application/json',
|
|
2502
|
+
errors: {
|
|
2503
|
+
409: 'Life event already exists for this (userId, type, date) combination'
|
|
2504
|
+
}
|
|
2505
|
+
});
|
|
2506
|
+
}
|
|
2507
|
+
|
|
2508
|
+
/**
|
|
2509
|
+
* List user life events
|
|
2510
|
+
* Returns life events for the authenticated user with optional filtering by type, description search, and date range.
|
|
2511
|
+
* @param data The data for the request.
|
|
2512
|
+
* @param data.region Region code for tenant context (decorative for life events)
|
|
2513
|
+
* @param data.type Filter by life event type (exact match)
|
|
2514
|
+
* @param data.q Search term for description (case-insensitive partial match)
|
|
2515
|
+
* @param data.from Filter life events from this date (ISO 8601 format)
|
|
2516
|
+
* @param data.to Filter life events to this date (ISO 8601 format)
|
|
2517
|
+
* @param data.page Page number for pagination (default: 1)
|
|
2518
|
+
* @param data.limit Number of items per page (default: 20, max: 100)
|
|
2519
|
+
* @returns EventListResponseDto Life events retrieved successfully
|
|
2520
|
+
* @throws ApiError
|
|
2521
|
+
*/
|
|
2522
|
+
public static eventControllerFindAll(
|
|
2523
|
+
data: EventControllerFindAllData
|
|
2524
|
+
): CancelablePromise<EventControllerFindAllResponse> {
|
|
2525
|
+
return __request(OpenAPI, {
|
|
2526
|
+
method: 'GET',
|
|
2527
|
+
url: '/api/v1/{region}/bean/events',
|
|
2528
|
+
path: {
|
|
2529
|
+
region: data.region
|
|
2530
|
+
},
|
|
2531
|
+
query: {
|
|
2532
|
+
type: data.type,
|
|
2533
|
+
q: data.q,
|
|
2534
|
+
from: data.from,
|
|
2535
|
+
to: data.to,
|
|
2536
|
+
page: data.page,
|
|
2537
|
+
limit: data.limit
|
|
2538
|
+
}
|
|
2539
|
+
});
|
|
2540
|
+
}
|
|
2541
|
+
|
|
2542
|
+
/**
|
|
2543
|
+
* Get life event by ID
|
|
2544
|
+
* Returns a single life event by its ID. Returns ETag header.
|
|
2545
|
+
* @param data The data for the request.
|
|
2546
|
+
* @param data.id Life event ID
|
|
2547
|
+
* @param data.region Region code for tenant context (decorative for life events)
|
|
2548
|
+
* @returns EventResponseDto Life event retrieved successfully
|
|
2549
|
+
* @throws ApiError
|
|
2550
|
+
*/
|
|
2551
|
+
public static eventControllerFindOne(
|
|
2552
|
+
data: EventControllerFindOneData
|
|
2553
|
+
): CancelablePromise<EventControllerFindOneResponse> {
|
|
2554
|
+
return __request(OpenAPI, {
|
|
2555
|
+
method: 'GET',
|
|
2556
|
+
url: '/api/v1/{region}/bean/events/{id}',
|
|
2557
|
+
path: {
|
|
2558
|
+
id: data.id,
|
|
2559
|
+
region: data.region
|
|
2560
|
+
},
|
|
2561
|
+
errors: {
|
|
2562
|
+
404: 'Life event not found'
|
|
2563
|
+
}
|
|
2564
|
+
});
|
|
2565
|
+
}
|
|
2566
|
+
|
|
2567
|
+
/**
|
|
2568
|
+
* Update a life event
|
|
2569
|
+
* Updates an existing life event. If If-Match header is provided, performs optimistic concurrency check; mismatched updatedAt returns 412.
|
|
2570
|
+
* @param data The data for the request.
|
|
2571
|
+
* @param data.id Life event ID
|
|
2572
|
+
* @param data.region Region code for tenant context (decorative for life events)
|
|
2573
|
+
* @param data.requestBody
|
|
2574
|
+
* @returns EventResponseDto Life event updated successfully
|
|
2575
|
+
* @throws ApiError
|
|
2576
|
+
*/
|
|
2577
|
+
public static eventControllerUpdate(
|
|
2578
|
+
data: EventControllerUpdateData
|
|
2579
|
+
): CancelablePromise<EventControllerUpdateResponse> {
|
|
2580
|
+
return __request(OpenAPI, {
|
|
2581
|
+
method: 'PUT',
|
|
2582
|
+
url: '/api/v1/{region}/bean/events/{id}',
|
|
2583
|
+
path: {
|
|
2584
|
+
id: data.id,
|
|
2585
|
+
region: data.region
|
|
2586
|
+
},
|
|
2587
|
+
body: data.requestBody,
|
|
2588
|
+
mediaType: 'application/json',
|
|
2589
|
+
errors: {
|
|
2590
|
+
400: 'If-Match header is not a valid ISO 8601 date',
|
|
2591
|
+
404: 'Life event not found',
|
|
2592
|
+
409: 'Updated event conflicts with an existing (userId, type, date) combination',
|
|
2593
|
+
412: 'If-Match precondition failed (updatedAt mismatch)'
|
|
2594
|
+
}
|
|
2595
|
+
});
|
|
2596
|
+
}
|
|
2597
|
+
|
|
2598
|
+
/**
|
|
2599
|
+
* Delete a life event
|
|
2600
|
+
* Deletes a life event entry (hard delete). Returns 204.
|
|
2601
|
+
* @param data The data for the request.
|
|
2602
|
+
* @param data.id Life event ID
|
|
2603
|
+
* @param data.region Region code for tenant context (decorative for life events)
|
|
2604
|
+
* @returns void Life event deleted successfully
|
|
2605
|
+
* @throws ApiError
|
|
2606
|
+
*/
|
|
2607
|
+
public static eventControllerDelete(
|
|
2608
|
+
data: EventControllerDeleteData
|
|
2609
|
+
): CancelablePromise<EventControllerDeleteResponse> {
|
|
2610
|
+
return __request(OpenAPI, {
|
|
2611
|
+
method: 'DELETE',
|
|
2612
|
+
url: '/api/v1/{region}/bean/events/{id}',
|
|
2613
|
+
path: {
|
|
2614
|
+
id: data.id,
|
|
2615
|
+
region: data.region
|
|
2616
|
+
},
|
|
2617
|
+
errors: {
|
|
2618
|
+
404: 'Life event not found'
|
|
2619
|
+
}
|
|
2620
|
+
});
|
|
2621
|
+
}
|
|
2622
|
+
|
|
2623
|
+
/**
|
|
2624
|
+
* Slice time-series by a life event (Phase 79)
|
|
2625
|
+
* Returns aggregated time-series for postings matching accountPattern within the half-open date range of the given life event.
|
|
2626
|
+
* @param data The data for the request.
|
|
2627
|
+
* @param data.id Life event ID
|
|
2628
|
+
* @param data.accountPattern
|
|
2629
|
+
* @param data.granularity
|
|
2630
|
+
* @param data.region Region code for tenant context (decorative for life events)
|
|
2631
|
+
* @returns unknown Time-series sliced by the life event range
|
|
2632
|
+
* @throws ApiError
|
|
2633
|
+
*/
|
|
2634
|
+
public static eventControllerGetSlice(
|
|
2635
|
+
data: EventControllerGetSliceData
|
|
2636
|
+
): CancelablePromise<EventControllerGetSliceResponse> {
|
|
2637
|
+
return __request(OpenAPI, {
|
|
2638
|
+
method: 'GET',
|
|
2639
|
+
url: '/api/v1/{region}/bean/events/{id}/slice',
|
|
2640
|
+
path: {
|
|
2641
|
+
id: data.id,
|
|
2642
|
+
region: data.region
|
|
2643
|
+
},
|
|
2644
|
+
query: {
|
|
2645
|
+
accountPattern: data.accountPattern,
|
|
2646
|
+
granularity: data.granularity
|
|
2647
|
+
},
|
|
2648
|
+
errors: {
|
|
2649
|
+
400: 'accountPattern query param is empty',
|
|
2650
|
+
404: 'Life event not found'
|
|
2651
|
+
}
|
|
2652
|
+
});
|
|
2653
|
+
}
|
|
2654
|
+
}
|
|
2655
|
+
|
|
2379
2656
|
export class BeanExportService {
|
|
2380
2657
|
/**
|
|
2381
2658
|
* Export Beancount ledger as ZIP
|
|
@@ -2695,7 +2972,7 @@ export class ProviderSyncService {
|
|
|
2695
2972
|
*
|
|
2696
2973
|
* @param data The data for the request.
|
|
2697
2974
|
* @param data.providerName Provider name
|
|
2698
|
-
* @param data.region Region code
|
|
2975
|
+
* @param data.region Region code for tenant context
|
|
2699
2976
|
* @param data.requestBody
|
|
2700
2977
|
* @returns ProviderSyncResponseDto Sync completed successfully
|
|
2701
2978
|
* @throws ApiError
|
|
@@ -2794,6 +3071,54 @@ export class ImportTelemetryService {
|
|
|
2794
3071
|
}
|
|
2795
3072
|
});
|
|
2796
3073
|
}
|
|
3074
|
+
|
|
3075
|
+
/**
|
|
3076
|
+
* Receive anonymous zero-hit coverage miss report
|
|
3077
|
+
* @param data The data for the request.
|
|
3078
|
+
* @param data.region Region code for tenant context
|
|
3079
|
+
* @param data.requestBody
|
|
3080
|
+
* @returns unknown Coverage miss report received
|
|
3081
|
+
* @throws ApiError
|
|
3082
|
+
*/
|
|
3083
|
+
public static telemetryControllerReportCoverageMiss(
|
|
3084
|
+
data: TelemetryControllerReportCoverageMissData
|
|
3085
|
+
): CancelablePromise<TelemetryControllerReportCoverageMissResponse> {
|
|
3086
|
+
return __request(OpenAPI, {
|
|
3087
|
+
method: 'POST',
|
|
3088
|
+
url: '/api/v1/{region}/bean/import/parser-coverage-miss',
|
|
3089
|
+
path: {
|
|
3090
|
+
region: data.region
|
|
3091
|
+
},
|
|
3092
|
+
body: data.requestBody,
|
|
3093
|
+
mediaType: 'application/json',
|
|
3094
|
+
errors: {
|
|
3095
|
+
401: 'Unauthorized'
|
|
3096
|
+
}
|
|
3097
|
+
});
|
|
3098
|
+
}
|
|
3099
|
+
|
|
3100
|
+
/**
|
|
3101
|
+
* Coverage metrics (uncovered format aggregation)
|
|
3102
|
+
* @param data The data for the request.
|
|
3103
|
+
* @param data.region Region code for tenant context
|
|
3104
|
+
* @param data.topN Top-N uncovered formats (default 10)
|
|
3105
|
+
* @returns unknown Coverage metrics
|
|
3106
|
+
* @throws ApiError
|
|
3107
|
+
*/
|
|
3108
|
+
public static telemetryControllerGetCoverageMetrics(
|
|
3109
|
+
data: TelemetryControllerGetCoverageMetricsData
|
|
3110
|
+
): CancelablePromise<TelemetryControllerGetCoverageMetricsResponse> {
|
|
3111
|
+
return __request(OpenAPI, {
|
|
3112
|
+
method: 'GET',
|
|
3113
|
+
url: '/api/v1/{region}/bean/import/parser-coverage-metrics',
|
|
3114
|
+
path: {
|
|
3115
|
+
region: data.region
|
|
3116
|
+
},
|
|
3117
|
+
query: {
|
|
3118
|
+
topN: data.topN
|
|
3119
|
+
}
|
|
3120
|
+
});
|
|
3121
|
+
}
|
|
2797
3122
|
}
|
|
2798
3123
|
|
|
2799
3124
|
export class BeanNlpService {
|
|
@@ -2914,6 +3239,7 @@ export class DashboardService {
|
|
|
2914
3239
|
* @param data.region Region code for tenant context
|
|
2915
3240
|
* @param data.groupBy Grouping strategy
|
|
2916
3241
|
* @param data.date Date for balance calculation (ISO 8601 format)
|
|
3242
|
+
* @param data.accountId Scope to a single account (only valid with groupBy=holdingAssetClass, ADR-0105 §6)
|
|
2917
3243
|
* @returns unknown Accounts retrieved successfully. Response type depends on groupBy parameter.
|
|
2918
3244
|
* @throws ApiError
|
|
2919
3245
|
*/
|
|
@@ -2928,7 +3254,8 @@ export class DashboardService {
|
|
|
2928
3254
|
},
|
|
2929
3255
|
query: {
|
|
2930
3256
|
groupBy: data.groupBy,
|
|
2931
|
-
date: data.date
|
|
3257
|
+
date: data.date,
|
|
3258
|
+
accountId: data.accountId
|
|
2932
3259
|
},
|
|
2933
3260
|
errors: {
|
|
2934
3261
|
401: 'User not authenticated'
|
|
@@ -2963,6 +3290,237 @@ export class DashboardService {
|
|
|
2963
3290
|
}
|
|
2964
3291
|
});
|
|
2965
3292
|
}
|
|
3293
|
+
|
|
3294
|
+
/**
|
|
3295
|
+
* Get expenses grouped by functional category
|
|
3296
|
+
* Returns expenses pre-aggregated by functional category (account-path Group segment) with server-side multi-currency conversion
|
|
3297
|
+
* @param data The data for the request.
|
|
3298
|
+
* @param data.region Region code for tenant context
|
|
3299
|
+
* @param data.groupBy Grouping strategy
|
|
3300
|
+
* @param data.period Time window (1m = current calendar month)
|
|
3301
|
+
* @returns ExpensesByCategoryResponseDto Expenses retrieved successfully
|
|
3302
|
+
* @throws ApiError
|
|
3303
|
+
*/
|
|
3304
|
+
public static dashboardControllerGetExpenses(
|
|
3305
|
+
data: DashboardControllerGetExpensesData
|
|
3306
|
+
): CancelablePromise<DashboardControllerGetExpensesResponse> {
|
|
3307
|
+
return __request(OpenAPI, {
|
|
3308
|
+
method: 'GET',
|
|
3309
|
+
url: '/api/v1/{region}/dashboard/expenses',
|
|
3310
|
+
path: {
|
|
3311
|
+
region: data.region
|
|
3312
|
+
},
|
|
3313
|
+
query: {
|
|
3314
|
+
groupBy: data.groupBy,
|
|
3315
|
+
period: data.period
|
|
3316
|
+
},
|
|
3317
|
+
errors: {
|
|
3318
|
+
400: 'Invalid groupBy or period',
|
|
3319
|
+
401: 'User not authenticated'
|
|
3320
|
+
}
|
|
3321
|
+
});
|
|
3322
|
+
}
|
|
3323
|
+
}
|
|
3324
|
+
|
|
3325
|
+
export class InvestmentService {
|
|
3326
|
+
/**
|
|
3327
|
+
* Get per-holding unrealized + realized P&L
|
|
3328
|
+
* Average-cost unrealized P&L per account × commodity, plus cumulative realized P&L on sold lots (method = FIFO | average, default average).
|
|
3329
|
+
* @param data The data for the request.
|
|
3330
|
+
* @param data.region Region code for tenant context
|
|
3331
|
+
* @param data.asOf As-of date (ISO 8601), defaults to today
|
|
3332
|
+
* @param data.accountId Scope to a single account
|
|
3333
|
+
* @param data.method Realized-P&L lot-matching method (default average). Does not affect the average-cost unrealized basis.
|
|
3334
|
+
* @returns HoldingPnlResponseDto Holding P&L retrieved successfully
|
|
3335
|
+
* @throws ApiError
|
|
3336
|
+
*/
|
|
3337
|
+
public static holdingPnlControllerGetHoldingPnl(
|
|
3338
|
+
data: HoldingPnlControllerGetHoldingPnlData
|
|
3339
|
+
): CancelablePromise<HoldingPnlControllerGetHoldingPnlResponse> {
|
|
3340
|
+
return __request(OpenAPI, {
|
|
3341
|
+
method: 'GET',
|
|
3342
|
+
url: '/api/v1/{region}/investment/holdings/pnl',
|
|
3343
|
+
path: {
|
|
3344
|
+
region: data.region
|
|
3345
|
+
},
|
|
3346
|
+
query: {
|
|
3347
|
+
asOf: data.asOf,
|
|
3348
|
+
accountId: data.accountId,
|
|
3349
|
+
method: data.method
|
|
3350
|
+
},
|
|
3351
|
+
errors: {
|
|
3352
|
+
400: 'Invalid asOf format/value/future date, invalid accountId format, or unsupported method',
|
|
3353
|
+
401: 'User not authenticated'
|
|
3354
|
+
}
|
|
3355
|
+
});
|
|
3356
|
+
}
|
|
3357
|
+
}
|
|
3358
|
+
|
|
3359
|
+
export class BeanPricesService {
|
|
3360
|
+
/**
|
|
3361
|
+
* Create a new price
|
|
3362
|
+
* Creates a new price entry for the authenticated user
|
|
3363
|
+
* @param data The data for the request.
|
|
3364
|
+
* @param data.region Region code for tenant context
|
|
3365
|
+
* @param data.requestBody
|
|
3366
|
+
* @returns PriceResponseDto Price created successfully
|
|
3367
|
+
* @throws ApiError
|
|
3368
|
+
*/
|
|
3369
|
+
public static priceControllerCreate(
|
|
3370
|
+
data: PriceControllerCreateData
|
|
3371
|
+
): CancelablePromise<PriceControllerCreateResponse> {
|
|
3372
|
+
return __request(OpenAPI, {
|
|
3373
|
+
method: 'POST',
|
|
3374
|
+
url: '/api/v1/{region}/bean/prices',
|
|
3375
|
+
path: {
|
|
3376
|
+
region: data.region
|
|
3377
|
+
},
|
|
3378
|
+
body: data.requestBody,
|
|
3379
|
+
mediaType: 'application/json',
|
|
3380
|
+
errors: {
|
|
3381
|
+
404: 'Currency or quoteCurrency commodity not found',
|
|
3382
|
+
409: 'Price already exists for this currency pair and date'
|
|
3383
|
+
}
|
|
3384
|
+
});
|
|
3385
|
+
}
|
|
3386
|
+
|
|
3387
|
+
/**
|
|
3388
|
+
* List user prices
|
|
3389
|
+
* Returns all price entries for the authenticated user with optional filtering
|
|
3390
|
+
* @param data The data for the request.
|
|
3391
|
+
* @param data.region Region code for tenant context
|
|
3392
|
+
* @param data.currency Filter by currency (e.g., BTC, AAPL, USD)
|
|
3393
|
+
* @param data.quoteCurrency Filter by quote currency (pricing currency, e.g., USD, CNY)
|
|
3394
|
+
* @param data.dateFrom Filter prices from this date (ISO 8601 format)
|
|
3395
|
+
* @param data.dateTo Filter prices to this date (ISO 8601 format)
|
|
3396
|
+
* @param data.search Search term for currency or quoteCurrency (case-insensitive partial match)
|
|
3397
|
+
* @param data.page Page number for pagination (default: 1)
|
|
3398
|
+
* @param data.limit Number of items per page (default: 20, max: 100)
|
|
3399
|
+
* @returns PriceListResponseDto Prices retrieved successfully
|
|
3400
|
+
* @throws ApiError
|
|
3401
|
+
*/
|
|
3402
|
+
public static priceControllerFindAll(
|
|
3403
|
+
data: PriceControllerFindAllData
|
|
3404
|
+
): CancelablePromise<PriceControllerFindAllResponse> {
|
|
3405
|
+
return __request(OpenAPI, {
|
|
3406
|
+
method: 'GET',
|
|
3407
|
+
url: '/api/v1/{region}/bean/prices',
|
|
3408
|
+
path: {
|
|
3409
|
+
region: data.region
|
|
3410
|
+
},
|
|
3411
|
+
query: {
|
|
3412
|
+
currency: data.currency,
|
|
3413
|
+
quoteCurrency: data.quoteCurrency,
|
|
3414
|
+
dateFrom: data.dateFrom,
|
|
3415
|
+
dateTo: data.dateTo,
|
|
3416
|
+
search: data.search,
|
|
3417
|
+
page: data.page,
|
|
3418
|
+
limit: data.limit
|
|
3419
|
+
}
|
|
3420
|
+
});
|
|
3421
|
+
}
|
|
3422
|
+
|
|
3423
|
+
/**
|
|
3424
|
+
* Get price by ID
|
|
3425
|
+
* Returns a single price entry by its ID
|
|
3426
|
+
* @param data The data for the request.
|
|
3427
|
+
* @param data.id Price ID
|
|
3428
|
+
* @param data.region Region code for tenant context
|
|
3429
|
+
* @returns PriceResponseDto Price retrieved successfully
|
|
3430
|
+
* @throws ApiError
|
|
3431
|
+
*/
|
|
3432
|
+
public static priceControllerFindOne(
|
|
3433
|
+
data: PriceControllerFindOneData
|
|
3434
|
+
): CancelablePromise<PriceControllerFindOneResponse> {
|
|
3435
|
+
return __request(OpenAPI, {
|
|
3436
|
+
method: 'GET',
|
|
3437
|
+
url: '/api/v1/{region}/bean/prices/{id}',
|
|
3438
|
+
path: {
|
|
3439
|
+
id: data.id,
|
|
3440
|
+
region: data.region
|
|
3441
|
+
},
|
|
3442
|
+
errors: {
|
|
3443
|
+
404: 'Price not found'
|
|
3444
|
+
}
|
|
3445
|
+
});
|
|
3446
|
+
}
|
|
3447
|
+
|
|
3448
|
+
/**
|
|
3449
|
+
* Update a price
|
|
3450
|
+
* Updates an existing price entry
|
|
3451
|
+
* @param data The data for the request.
|
|
3452
|
+
* @param data.id Price ID
|
|
3453
|
+
* @param data.region Region code for tenant context
|
|
3454
|
+
* @param data.requestBody
|
|
3455
|
+
* @returns PriceResponseDto Price updated successfully
|
|
3456
|
+
* @throws ApiError
|
|
3457
|
+
*/
|
|
3458
|
+
public static priceControllerUpdate(
|
|
3459
|
+
data: PriceControllerUpdateData
|
|
3460
|
+
): CancelablePromise<PriceControllerUpdateResponse> {
|
|
3461
|
+
return __request(OpenAPI, {
|
|
3462
|
+
method: 'PUT',
|
|
3463
|
+
url: '/api/v1/{region}/bean/prices/{id}',
|
|
3464
|
+
path: {
|
|
3465
|
+
id: data.id,
|
|
3466
|
+
region: data.region
|
|
3467
|
+
},
|
|
3468
|
+
body: data.requestBody,
|
|
3469
|
+
mediaType: 'application/json',
|
|
3470
|
+
errors: {
|
|
3471
|
+
404: 'Price not found',
|
|
3472
|
+
409: 'Updated price conflicts with existing price'
|
|
3473
|
+
}
|
|
3474
|
+
});
|
|
3475
|
+
}
|
|
3476
|
+
|
|
3477
|
+
/**
|
|
3478
|
+
* Delete a price
|
|
3479
|
+
* Deletes a price entry (hard delete)
|
|
3480
|
+
* @param data The data for the request.
|
|
3481
|
+
* @param data.id Price ID
|
|
3482
|
+
* @param data.region Region code for tenant context
|
|
3483
|
+
* @returns void Price deleted successfully
|
|
3484
|
+
* @throws ApiError
|
|
3485
|
+
*/
|
|
3486
|
+
public static priceControllerDelete(
|
|
3487
|
+
data: PriceControllerDeleteData
|
|
3488
|
+
): CancelablePromise<PriceControllerDeleteResponse> {
|
|
3489
|
+
return __request(OpenAPI, {
|
|
3490
|
+
method: 'DELETE',
|
|
3491
|
+
url: '/api/v1/{region}/bean/prices/{id}',
|
|
3492
|
+
path: {
|
|
3493
|
+
id: data.id,
|
|
3494
|
+
region: data.region
|
|
3495
|
+
},
|
|
3496
|
+
errors: {
|
|
3497
|
+
404: 'Price not found'
|
|
3498
|
+
}
|
|
3499
|
+
});
|
|
3500
|
+
}
|
|
3501
|
+
|
|
3502
|
+
/**
|
|
3503
|
+
* Bulk create prices
|
|
3504
|
+
* Creates multiple price entries at once (skips duplicates)
|
|
3505
|
+
* @param data The data for the request.
|
|
3506
|
+
* @param data.region Region code for tenant context
|
|
3507
|
+
* @param data.requestBody
|
|
3508
|
+
* @returns PriceResponseDto Prices created successfully
|
|
3509
|
+
* @throws ApiError
|
|
3510
|
+
*/
|
|
3511
|
+
public static priceControllerBulkCreate(
|
|
3512
|
+
data: PriceControllerBulkCreateData
|
|
3513
|
+
): CancelablePromise<PriceControllerBulkCreateResponse> {
|
|
3514
|
+
return __request(OpenAPI, {
|
|
3515
|
+
method: 'POST',
|
|
3516
|
+
url: '/api/v1/{region}/bean/prices/bulk',
|
|
3517
|
+
path: {
|
|
3518
|
+
region: data.region
|
|
3519
|
+
},
|
|
3520
|
+
body: data.requestBody,
|
|
3521
|
+
mediaType: 'application/json'
|
|
3522
|
+
});
|
|
3523
|
+
}
|
|
2966
3524
|
}
|
|
2967
3525
|
|
|
2968
3526
|
export class ReportingService {
|
|
@@ -3006,6 +3564,42 @@ export class ReportingService {
|
|
|
3006
3564
|
});
|
|
3007
3565
|
}
|
|
3008
3566
|
|
|
3567
|
+
/**
|
|
3568
|
+
* Get cash-flow trends
|
|
3569
|
+
*
|
|
3570
|
+
* Monthly income / expense / netSavings over a fixed N-month window
|
|
3571
|
+
* (current month + N−1 prior). Missing months are zero-filled (flow metric).
|
|
3572
|
+
*
|
|
3573
|
+
* **Parameters:**
|
|
3574
|
+
* - `period`: 1m | 3m | 6m | 1y (default 6m)
|
|
3575
|
+
* - `granularity`: accepted for API symmetry; v1 returns month buckets
|
|
3576
|
+
*
|
|
3577
|
+
* @param data The data for the request.
|
|
3578
|
+
* @param data.region Region code for tenant context
|
|
3579
|
+
* @param data.period Time period
|
|
3580
|
+
* @param data.granularity Data granularity (accepted for API symmetry; v1 returns month buckets)
|
|
3581
|
+
* @returns CashFlowTrendsResponseDto Cash-flow trends retrieved successfully
|
|
3582
|
+
* @throws ApiError
|
|
3583
|
+
*/
|
|
3584
|
+
public static reportingControllerGetCashFlowTrends(
|
|
3585
|
+
data: ReportingControllerGetCashFlowTrendsData
|
|
3586
|
+
): CancelablePromise<ReportingControllerGetCashFlowTrendsResponse> {
|
|
3587
|
+
return __request(OpenAPI, {
|
|
3588
|
+
method: 'GET',
|
|
3589
|
+
url: '/api/v1/{region}/reporting/cash-flow/trends',
|
|
3590
|
+
path: {
|
|
3591
|
+
region: data.region
|
|
3592
|
+
},
|
|
3593
|
+
query: {
|
|
3594
|
+
period: data.period,
|
|
3595
|
+
granularity: data.granularity
|
|
3596
|
+
},
|
|
3597
|
+
errors: {
|
|
3598
|
+
401: 'User not authenticated'
|
|
3599
|
+
}
|
|
3600
|
+
});
|
|
3601
|
+
}
|
|
3602
|
+
|
|
3009
3603
|
/**
|
|
3010
3604
|
* Generate portfolio snapshot
|
|
3011
3605
|
*
|