@firela/api-types 0.0.0-canary.da5984a1 → 0.0.0-canary.ebb51de2
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 +899 -820
- package/dist/index.d.ts +899 -820
- package/dist/index.js +44 -72
- package/dist/index.mjs +44 -72
- package/package.json +2 -3
- package/src/generated/schemas.gen.ts +1013 -1008
- package/src/generated/services.gen.ts +323 -91
- package/src/generated/types.gen.ts +1018 -843
|
@@ -29,6 +29,8 @@ import type {
|
|
|
29
29
|
TransactionControllerListResponse,
|
|
30
30
|
TransactionControllerCreateBatchData,
|
|
31
31
|
TransactionControllerCreateBatchResponse,
|
|
32
|
+
TransactionControllerCorrectData,
|
|
33
|
+
TransactionControllerCorrectResponse,
|
|
32
34
|
TransactionControllerSuggestTagsData,
|
|
33
35
|
TransactionControllerSuggestTagsResponse,
|
|
34
36
|
TransactionControllerGetDetailData,
|
|
@@ -200,6 +202,10 @@ import type {
|
|
|
200
202
|
ProviderSyncControllerIsProviderSupportedResponse,
|
|
201
203
|
TelemetryControllerReportTelemetryData,
|
|
202
204
|
TelemetryControllerReportTelemetryResponse,
|
|
205
|
+
TelemetryControllerReportCoverageMissData,
|
|
206
|
+
TelemetryControllerReportCoverageMissResponse,
|
|
207
|
+
TelemetryControllerGetCoverageMetricsData,
|
|
208
|
+
TelemetryControllerGetCoverageMetricsResponse,
|
|
203
209
|
NlpControllerProcessNaturalLanguageData,
|
|
204
210
|
NlpControllerProcessNaturalLanguageResponse,
|
|
205
211
|
NlpControllerClearSessionData,
|
|
@@ -212,6 +218,20 @@ import type {
|
|
|
212
218
|
DashboardControllerGetAccountsResponse,
|
|
213
219
|
DashboardControllerGetCashFlowData,
|
|
214
220
|
DashboardControllerGetCashFlowResponse,
|
|
221
|
+
HoldingPnlControllerGetHoldingPnlData,
|
|
222
|
+
HoldingPnlControllerGetHoldingPnlResponse,
|
|
223
|
+
PriceControllerCreateData,
|
|
224
|
+
PriceControllerCreateResponse,
|
|
225
|
+
PriceControllerFindAllData,
|
|
226
|
+
PriceControllerFindAllResponse,
|
|
227
|
+
PriceControllerFindOneData,
|
|
228
|
+
PriceControllerFindOneResponse,
|
|
229
|
+
PriceControllerUpdateData,
|
|
230
|
+
PriceControllerUpdateResponse,
|
|
231
|
+
PriceControllerDeleteData,
|
|
232
|
+
PriceControllerDeleteResponse,
|
|
233
|
+
PriceControllerBulkCreateData,
|
|
234
|
+
PriceControllerBulkCreateResponse,
|
|
215
235
|
ReportingControllerGetPortfolioTrendsData,
|
|
216
236
|
ReportingControllerGetPortfolioTrendsResponse,
|
|
217
237
|
ReportingControllerGenerateSnapshotData,
|
|
@@ -237,12 +257,10 @@ import type {
|
|
|
237
257
|
|
|
238
258
|
export class BeanAccountsService {
|
|
239
259
|
/**
|
|
240
|
-
* Create a new account
|
|
241
|
-
* Creates a new account (Beancount Open directive)
|
|
242
260
|
* @param data The data for the request.
|
|
243
261
|
* @param data.region Region code for tenant context
|
|
244
262
|
* @param data.requestBody
|
|
245
|
-
* @returns
|
|
263
|
+
* @returns unknown
|
|
246
264
|
* @throws ApiError
|
|
247
265
|
*/
|
|
248
266
|
public static accountControllerCreate(
|
|
@@ -255,10 +273,7 @@ export class BeanAccountsService {
|
|
|
255
273
|
region: data.region
|
|
256
274
|
},
|
|
257
275
|
body: data.requestBody,
|
|
258
|
-
mediaType: 'application/json'
|
|
259
|
-
errors: {
|
|
260
|
-
409: 'Account already exists'
|
|
261
|
-
}
|
|
276
|
+
mediaType: 'application/json'
|
|
262
277
|
});
|
|
263
278
|
}
|
|
264
279
|
|
|
@@ -322,13 +337,11 @@ export class BeanAccountsService {
|
|
|
322
337
|
}
|
|
323
338
|
|
|
324
339
|
/**
|
|
325
|
-
* Update account
|
|
326
|
-
* Updates account metadata (path cannot be changed)
|
|
327
340
|
* @param data The data for the request.
|
|
328
|
-
* @param data.id
|
|
341
|
+
* @param data.id
|
|
329
342
|
* @param data.region Region code for tenant context
|
|
330
343
|
* @param data.requestBody
|
|
331
|
-
* @returns
|
|
344
|
+
* @returns unknown
|
|
332
345
|
* @throws ApiError
|
|
333
346
|
*/
|
|
334
347
|
public static accountControllerUpdate(
|
|
@@ -342,20 +355,15 @@ export class BeanAccountsService {
|
|
|
342
355
|
region: data.region
|
|
343
356
|
},
|
|
344
357
|
body: data.requestBody,
|
|
345
|
-
mediaType: 'application/json'
|
|
346
|
-
errors: {
|
|
347
|
-
404: 'Account not found'
|
|
348
|
-
}
|
|
358
|
+
mediaType: 'application/json'
|
|
349
359
|
});
|
|
350
360
|
}
|
|
351
361
|
|
|
352
362
|
/**
|
|
353
|
-
* Delete account
|
|
354
|
-
* Deletes an account (only if no transactions)
|
|
355
363
|
* @param data The data for the request.
|
|
356
|
-
* @param data.id
|
|
364
|
+
* @param data.id
|
|
357
365
|
* @param data.region Region code for tenant context
|
|
358
|
-
* @returns
|
|
366
|
+
* @returns unknown
|
|
359
367
|
* @throws ApiError
|
|
360
368
|
*/
|
|
361
369
|
public static accountControllerDelete(
|
|
@@ -367,22 +375,16 @@ export class BeanAccountsService {
|
|
|
367
375
|
path: {
|
|
368
376
|
id: data.id,
|
|
369
377
|
region: data.region
|
|
370
|
-
},
|
|
371
|
-
errors: {
|
|
372
|
-
404: 'Account not found',
|
|
373
|
-
409: 'Account has transactions and cannot be deleted'
|
|
374
378
|
}
|
|
375
379
|
});
|
|
376
380
|
}
|
|
377
381
|
|
|
378
382
|
/**
|
|
379
|
-
* Close account
|
|
380
|
-
* Closes an account (Beancount Close directive)
|
|
381
383
|
* @param data The data for the request.
|
|
382
|
-
* @param data.id
|
|
384
|
+
* @param data.id
|
|
383
385
|
* @param data.region Region code for tenant context
|
|
384
386
|
* @param data.requestBody
|
|
385
|
-
* @returns
|
|
387
|
+
* @returns unknown
|
|
386
388
|
* @throws ApiError
|
|
387
389
|
*/
|
|
388
390
|
public static accountControllerClose(
|
|
@@ -396,22 +398,16 @@ export class BeanAccountsService {
|
|
|
396
398
|
region: data.region
|
|
397
399
|
},
|
|
398
400
|
body: data.requestBody,
|
|
399
|
-
mediaType: 'application/json'
|
|
400
|
-
errors: {
|
|
401
|
-
400: 'Account is already closed',
|
|
402
|
-
404: 'Account not found'
|
|
403
|
-
}
|
|
401
|
+
mediaType: 'application/json'
|
|
404
402
|
});
|
|
405
403
|
}
|
|
406
404
|
|
|
407
405
|
/**
|
|
408
|
-
* Reopen account
|
|
409
|
-
* Reopens a previously closed account
|
|
410
406
|
* @param data The data for the request.
|
|
411
|
-
* @param data.id
|
|
407
|
+
* @param data.id
|
|
412
408
|
* @param data.region Region code for tenant context
|
|
413
409
|
* @param data.requestBody
|
|
414
|
-
* @returns
|
|
410
|
+
* @returns unknown
|
|
415
411
|
* @throws ApiError
|
|
416
412
|
*/
|
|
417
413
|
public static accountControllerReopen(
|
|
@@ -425,11 +421,7 @@ export class BeanAccountsService {
|
|
|
425
421
|
region: data.region
|
|
426
422
|
},
|
|
427
423
|
body: data.requestBody,
|
|
428
|
-
mediaType: 'application/json'
|
|
429
|
-
errors: {
|
|
430
|
-
400: 'Account is not closed',
|
|
431
|
-
404: 'Account not found'
|
|
432
|
-
}
|
|
424
|
+
mediaType: 'application/json'
|
|
433
425
|
});
|
|
434
426
|
}
|
|
435
427
|
}
|
|
@@ -605,6 +597,36 @@ export class BeanTransactionsService {
|
|
|
605
597
|
});
|
|
606
598
|
}
|
|
607
599
|
|
|
600
|
+
/**
|
|
601
|
+
* Correct (supersede) a transaction
|
|
602
|
+
* Atomically voids the original (SUPERSEDED) and creates a replacement through the full validation pipeline.
|
|
603
|
+
* @param data The data for the request.
|
|
604
|
+
* @param data.id Original transaction ID to correct
|
|
605
|
+
* @param data.region Region code for tenant context
|
|
606
|
+
* @param data.requestBody
|
|
607
|
+
* @returns TransactionDetailDto Corrected transaction created
|
|
608
|
+
* @throws ApiError
|
|
609
|
+
*/
|
|
610
|
+
public static transactionControllerCorrect(
|
|
611
|
+
data: TransactionControllerCorrectData
|
|
612
|
+
): CancelablePromise<TransactionControllerCorrectResponse> {
|
|
613
|
+
return __request(OpenAPI, {
|
|
614
|
+
method: 'POST',
|
|
615
|
+
url: '/api/v1/{region}/bean/transactions/{id}/correct',
|
|
616
|
+
path: {
|
|
617
|
+
id: data.id,
|
|
618
|
+
region: data.region
|
|
619
|
+
},
|
|
620
|
+
body: data.requestBody,
|
|
621
|
+
mediaType: 'application/json',
|
|
622
|
+
errors: {
|
|
623
|
+
404: 'Original transaction not found',
|
|
624
|
+
409: 'Original no longer ACTIVE (concurrent modification)',
|
|
625
|
+
422: 'Pipeline validation failed (does not balance, invalid accounts)'
|
|
626
|
+
}
|
|
627
|
+
});
|
|
628
|
+
}
|
|
629
|
+
|
|
608
630
|
/**
|
|
609
631
|
* Suggest transaction tags
|
|
610
632
|
* Returns distinct tags from the user ACTIVE transactions, sorted by usage, for autocomplete. Optional q performs a case-insensitive prefix match.
|
|
@@ -2482,12 +2504,9 @@ export class BeanImportService {
|
|
|
2482
2504
|
}
|
|
2483
2505
|
|
|
2484
2506
|
/**
|
|
2485
|
-
* Import a Beancount file in community format
|
|
2486
|
-
* Upload a .beancount file to import. The system parses community-format paths, converts to internal format using category metadata, auto-creates accounts, and imports transactions with deduplication. Maximum file size: 50MB. Only 1 import per user at a time.
|
|
2487
2507
|
* @param data The data for the request.
|
|
2488
2508
|
* @param data.region Region code for tenant context
|
|
2489
|
-
* @
|
|
2490
|
-
* @returns unknown Beancount file imported successfully
|
|
2509
|
+
* @returns unknown
|
|
2491
2510
|
* @throws ApiError
|
|
2492
2511
|
*/
|
|
2493
2512
|
public static fileImportControllerImportBeancount(
|
|
@@ -2498,11 +2517,6 @@ export class BeanImportService {
|
|
|
2498
2517
|
url: '/api/v1/{region}/bean/import/beancount',
|
|
2499
2518
|
path: {
|
|
2500
2519
|
region: data.region
|
|
2501
|
-
},
|
|
2502
|
-
formData: data.formData,
|
|
2503
|
-
mediaType: 'multipart/form-data',
|
|
2504
|
-
errors: {
|
|
2505
|
-
400: 'Bad request - invalid file or no file uploaded'
|
|
2506
2520
|
}
|
|
2507
2521
|
});
|
|
2508
2522
|
}
|
|
@@ -2705,33 +2719,11 @@ export class BeanPlatformsService {
|
|
|
2705
2719
|
|
|
2706
2720
|
export class ProviderSyncService {
|
|
2707
2721
|
/**
|
|
2708
|
-
* Sync transactions from financial data provider
|
|
2709
|
-
*
|
|
2710
|
-
* Accepts raw transactions from external financial data providers, transforms them to Beancount format, and processes them through the ingestion pipeline.
|
|
2711
|
-
*
|
|
2712
|
-
* **Supported Providers:**
|
|
2713
|
-
* - **plaid**: Plaid API (US, Canada, Europe)
|
|
2714
|
-
* - **teller**: Teller API (US)
|
|
2715
|
-
* - **truelayer**: TrueLayer Open Banking (UK, Europe)
|
|
2716
|
-
* - **gocardless**: GoCardless Bank Account Data (Europe)
|
|
2717
|
-
* - **simplefin**: SimpleFIN (Self-hosted)
|
|
2718
|
-
* - **yodlee**: Yodlee (Global)
|
|
2719
|
-
* - **beancount-direct**: Beancount format transactions
|
|
2720
|
-
* - **parsed-bill**: Client-side parsed bill transactions
|
|
2721
|
-
*
|
|
2722
|
-
* **Processing Flow:**
|
|
2723
|
-
* 1. Transform raw data via provider adapter
|
|
2724
|
-
* 2. Validate transaction format
|
|
2725
|
-
* 3. Deduplicate using originalId
|
|
2726
|
-
* 4. Classify using rule engine
|
|
2727
|
-
* 5. Route low-confidence to Review Center
|
|
2728
|
-
* 6. Persist validated transactions
|
|
2729
|
-
*
|
|
2730
2722
|
* @param data The data for the request.
|
|
2731
|
-
* @param data.providerName
|
|
2732
|
-
* @param data.region Region code
|
|
2723
|
+
* @param data.providerName
|
|
2724
|
+
* @param data.region Region code for tenant context
|
|
2733
2725
|
* @param data.requestBody
|
|
2734
|
-
* @returns
|
|
2726
|
+
* @returns unknown
|
|
2735
2727
|
* @throws ApiError
|
|
2736
2728
|
*/
|
|
2737
2729
|
public static providerSyncControllerSync(
|
|
@@ -2745,12 +2737,7 @@ export class ProviderSyncService {
|
|
|
2745
2737
|
region: data.region
|
|
2746
2738
|
},
|
|
2747
2739
|
body: data.requestBody,
|
|
2748
|
-
mediaType: 'application/json'
|
|
2749
|
-
errors: {
|
|
2750
|
-
400: 'Invalid request data',
|
|
2751
|
-
401: 'Missing or invalid authentication',
|
|
2752
|
-
404: 'Provider not supported'
|
|
2753
|
-
}
|
|
2740
|
+
mediaType: 'application/json'
|
|
2754
2741
|
});
|
|
2755
2742
|
}
|
|
2756
2743
|
|
|
@@ -2828,16 +2815,62 @@ export class ImportTelemetryService {
|
|
|
2828
2815
|
}
|
|
2829
2816
|
});
|
|
2830
2817
|
}
|
|
2818
|
+
|
|
2819
|
+
/**
|
|
2820
|
+
* Receive anonymous zero-hit coverage miss report
|
|
2821
|
+
* @param data The data for the request.
|
|
2822
|
+
* @param data.region Region code for tenant context
|
|
2823
|
+
* @param data.requestBody
|
|
2824
|
+
* @returns unknown Coverage miss report received
|
|
2825
|
+
* @throws ApiError
|
|
2826
|
+
*/
|
|
2827
|
+
public static telemetryControllerReportCoverageMiss(
|
|
2828
|
+
data: TelemetryControllerReportCoverageMissData
|
|
2829
|
+
): CancelablePromise<TelemetryControllerReportCoverageMissResponse> {
|
|
2830
|
+
return __request(OpenAPI, {
|
|
2831
|
+
method: 'POST',
|
|
2832
|
+
url: '/api/v1/{region}/bean/import/parser-coverage-miss',
|
|
2833
|
+
path: {
|
|
2834
|
+
region: data.region
|
|
2835
|
+
},
|
|
2836
|
+
body: data.requestBody,
|
|
2837
|
+
mediaType: 'application/json',
|
|
2838
|
+
errors: {
|
|
2839
|
+
401: 'Unauthorized'
|
|
2840
|
+
}
|
|
2841
|
+
});
|
|
2842
|
+
}
|
|
2843
|
+
|
|
2844
|
+
/**
|
|
2845
|
+
* Coverage metrics (uncovered format aggregation)
|
|
2846
|
+
* @param data The data for the request.
|
|
2847
|
+
* @param data.region Region code for tenant context
|
|
2848
|
+
* @param data.topN Top-N uncovered formats (default 10)
|
|
2849
|
+
* @returns unknown Coverage metrics
|
|
2850
|
+
* @throws ApiError
|
|
2851
|
+
*/
|
|
2852
|
+
public static telemetryControllerGetCoverageMetrics(
|
|
2853
|
+
data: TelemetryControllerGetCoverageMetricsData
|
|
2854
|
+
): CancelablePromise<TelemetryControllerGetCoverageMetricsResponse> {
|
|
2855
|
+
return __request(OpenAPI, {
|
|
2856
|
+
method: 'GET',
|
|
2857
|
+
url: '/api/v1/{region}/bean/import/parser-coverage-metrics',
|
|
2858
|
+
path: {
|
|
2859
|
+
region: data.region
|
|
2860
|
+
},
|
|
2861
|
+
query: {
|
|
2862
|
+
topN: data.topN
|
|
2863
|
+
}
|
|
2864
|
+
});
|
|
2865
|
+
}
|
|
2831
2866
|
}
|
|
2832
2867
|
|
|
2833
2868
|
export class BeanNlpService {
|
|
2834
2869
|
/**
|
|
2835
|
-
* Process natural language input
|
|
2836
|
-
* Parse natural language text (Chinese/English) describing a transaction. Supports multi-turn dialogue for collecting missing information. When confidence < 0.75, returns "confirm" action requiring user verification. User can reply with confirmation words (确认/yes/ok) or provide corrections. Examples: "yesterday Starbucks spent 35 yuan", "today lunch 28 yuan", "spent $50 at Walmart"
|
|
2837
2870
|
* @param data The data for the request.
|
|
2838
2871
|
* @param data.region Region code for tenant context
|
|
2839
|
-
* @param data.requestBody
|
|
2840
|
-
* @returns
|
|
2872
|
+
* @param data.requestBody
|
|
2873
|
+
* @returns unknown
|
|
2841
2874
|
* @throws ApiError
|
|
2842
2875
|
*/
|
|
2843
2876
|
public static nlpControllerProcessNaturalLanguage(
|
|
@@ -2850,11 +2883,7 @@ export class BeanNlpService {
|
|
|
2850
2883
|
region: data.region
|
|
2851
2884
|
},
|
|
2852
2885
|
body: data.requestBody,
|
|
2853
|
-
mediaType: 'application/json'
|
|
2854
|
-
errors: {
|
|
2855
|
-
400: 'Invalid input',
|
|
2856
|
-
401: 'Unauthorized'
|
|
2857
|
-
}
|
|
2886
|
+
mediaType: 'application/json'
|
|
2858
2887
|
});
|
|
2859
2888
|
}
|
|
2860
2889
|
|
|
@@ -2948,6 +2977,7 @@ export class DashboardService {
|
|
|
2948
2977
|
* @param data.region Region code for tenant context
|
|
2949
2978
|
* @param data.groupBy Grouping strategy
|
|
2950
2979
|
* @param data.date Date for balance calculation (ISO 8601 format)
|
|
2980
|
+
* @param data.accountId Scope to a single account (only valid with groupBy=holdingAssetClass, ADR-0105 §6)
|
|
2951
2981
|
* @returns unknown Accounts retrieved successfully. Response type depends on groupBy parameter.
|
|
2952
2982
|
* @throws ApiError
|
|
2953
2983
|
*/
|
|
@@ -2962,7 +2992,8 @@ export class DashboardService {
|
|
|
2962
2992
|
},
|
|
2963
2993
|
query: {
|
|
2964
2994
|
groupBy: data.groupBy,
|
|
2965
|
-
date: data.date
|
|
2995
|
+
date: data.date,
|
|
2996
|
+
accountId: data.accountId
|
|
2966
2997
|
},
|
|
2967
2998
|
errors: {
|
|
2968
2999
|
401: 'User not authenticated'
|
|
@@ -2999,6 +3030,207 @@ export class DashboardService {
|
|
|
2999
3030
|
}
|
|
3000
3031
|
}
|
|
3001
3032
|
|
|
3033
|
+
export class InvestmentService {
|
|
3034
|
+
/**
|
|
3035
|
+
* Get per-holding unrealized + realized P&L
|
|
3036
|
+
* Average-cost unrealized P&L per account × commodity, plus cumulative realized P&L on sold lots (method = FIFO | average, default average).
|
|
3037
|
+
* @param data The data for the request.
|
|
3038
|
+
* @param data.region Region code for tenant context
|
|
3039
|
+
* @param data.asOf As-of date (ISO 8601), defaults to today
|
|
3040
|
+
* @param data.accountId Scope to a single account
|
|
3041
|
+
* @param data.method Realized-P&L lot-matching method (default average). Does not affect the average-cost unrealized basis.
|
|
3042
|
+
* @returns HoldingPnlResponseDto Holding P&L retrieved successfully
|
|
3043
|
+
* @throws ApiError
|
|
3044
|
+
*/
|
|
3045
|
+
public static holdingPnlControllerGetHoldingPnl(
|
|
3046
|
+
data: HoldingPnlControllerGetHoldingPnlData
|
|
3047
|
+
): CancelablePromise<HoldingPnlControllerGetHoldingPnlResponse> {
|
|
3048
|
+
return __request(OpenAPI, {
|
|
3049
|
+
method: 'GET',
|
|
3050
|
+
url: '/api/v1/{region}/investment/holdings/pnl',
|
|
3051
|
+
path: {
|
|
3052
|
+
region: data.region
|
|
3053
|
+
},
|
|
3054
|
+
query: {
|
|
3055
|
+
asOf: data.asOf,
|
|
3056
|
+
accountId: data.accountId,
|
|
3057
|
+
method: data.method
|
|
3058
|
+
},
|
|
3059
|
+
errors: {
|
|
3060
|
+
400: 'Invalid asOf format/value/future date, invalid accountId format, or unsupported method',
|
|
3061
|
+
401: 'User not authenticated'
|
|
3062
|
+
}
|
|
3063
|
+
});
|
|
3064
|
+
}
|
|
3065
|
+
}
|
|
3066
|
+
|
|
3067
|
+
export class BeanPricesService {
|
|
3068
|
+
/**
|
|
3069
|
+
* Create a new price
|
|
3070
|
+
* Creates a new price entry for the authenticated user
|
|
3071
|
+
* @param data The data for the request.
|
|
3072
|
+
* @param data.region Region code for tenant context
|
|
3073
|
+
* @param data.requestBody
|
|
3074
|
+
* @returns PriceResponseDto Price created successfully
|
|
3075
|
+
* @throws ApiError
|
|
3076
|
+
*/
|
|
3077
|
+
public static priceControllerCreate(
|
|
3078
|
+
data: PriceControllerCreateData
|
|
3079
|
+
): CancelablePromise<PriceControllerCreateResponse> {
|
|
3080
|
+
return __request(OpenAPI, {
|
|
3081
|
+
method: 'POST',
|
|
3082
|
+
url: '/api/v1/{region}/bean/prices',
|
|
3083
|
+
path: {
|
|
3084
|
+
region: data.region
|
|
3085
|
+
},
|
|
3086
|
+
body: data.requestBody,
|
|
3087
|
+
mediaType: 'application/json',
|
|
3088
|
+
errors: {
|
|
3089
|
+
404: 'Currency or quoteCurrency commodity not found',
|
|
3090
|
+
409: 'Price already exists for this currency pair and date'
|
|
3091
|
+
}
|
|
3092
|
+
});
|
|
3093
|
+
}
|
|
3094
|
+
|
|
3095
|
+
/**
|
|
3096
|
+
* List user prices
|
|
3097
|
+
* Returns all price entries for the authenticated user with optional filtering
|
|
3098
|
+
* @param data The data for the request.
|
|
3099
|
+
* @param data.region Region code for tenant context
|
|
3100
|
+
* @param data.currency Filter by currency (e.g., BTC, AAPL, USD)
|
|
3101
|
+
* @param data.quoteCurrency Filter by quote currency (pricing currency, e.g., USD, CNY)
|
|
3102
|
+
* @param data.dateFrom Filter prices from this date (ISO 8601 format)
|
|
3103
|
+
* @param data.dateTo Filter prices to this date (ISO 8601 format)
|
|
3104
|
+
* @param data.search Search term for currency or quoteCurrency (case-insensitive partial match)
|
|
3105
|
+
* @param data.page Page number for pagination (default: 1)
|
|
3106
|
+
* @param data.limit Number of items per page (default: 20, max: 100)
|
|
3107
|
+
* @returns PriceListResponseDto Prices retrieved successfully
|
|
3108
|
+
* @throws ApiError
|
|
3109
|
+
*/
|
|
3110
|
+
public static priceControllerFindAll(
|
|
3111
|
+
data: PriceControllerFindAllData
|
|
3112
|
+
): CancelablePromise<PriceControllerFindAllResponse> {
|
|
3113
|
+
return __request(OpenAPI, {
|
|
3114
|
+
method: 'GET',
|
|
3115
|
+
url: '/api/v1/{region}/bean/prices',
|
|
3116
|
+
path: {
|
|
3117
|
+
region: data.region
|
|
3118
|
+
},
|
|
3119
|
+
query: {
|
|
3120
|
+
currency: data.currency,
|
|
3121
|
+
quoteCurrency: data.quoteCurrency,
|
|
3122
|
+
dateFrom: data.dateFrom,
|
|
3123
|
+
dateTo: data.dateTo,
|
|
3124
|
+
search: data.search,
|
|
3125
|
+
page: data.page,
|
|
3126
|
+
limit: data.limit
|
|
3127
|
+
}
|
|
3128
|
+
});
|
|
3129
|
+
}
|
|
3130
|
+
|
|
3131
|
+
/**
|
|
3132
|
+
* Get price by ID
|
|
3133
|
+
* Returns a single price entry by its ID
|
|
3134
|
+
* @param data The data for the request.
|
|
3135
|
+
* @param data.id Price ID
|
|
3136
|
+
* @param data.region Region code for tenant context
|
|
3137
|
+
* @returns PriceResponseDto Price retrieved successfully
|
|
3138
|
+
* @throws ApiError
|
|
3139
|
+
*/
|
|
3140
|
+
public static priceControllerFindOne(
|
|
3141
|
+
data: PriceControllerFindOneData
|
|
3142
|
+
): CancelablePromise<PriceControllerFindOneResponse> {
|
|
3143
|
+
return __request(OpenAPI, {
|
|
3144
|
+
method: 'GET',
|
|
3145
|
+
url: '/api/v1/{region}/bean/prices/{id}',
|
|
3146
|
+
path: {
|
|
3147
|
+
id: data.id,
|
|
3148
|
+
region: data.region
|
|
3149
|
+
},
|
|
3150
|
+
errors: {
|
|
3151
|
+
404: 'Price not found'
|
|
3152
|
+
}
|
|
3153
|
+
});
|
|
3154
|
+
}
|
|
3155
|
+
|
|
3156
|
+
/**
|
|
3157
|
+
* Update a price
|
|
3158
|
+
* Updates an existing price entry
|
|
3159
|
+
* @param data The data for the request.
|
|
3160
|
+
* @param data.id Price ID
|
|
3161
|
+
* @param data.region Region code for tenant context
|
|
3162
|
+
* @param data.requestBody
|
|
3163
|
+
* @returns PriceResponseDto Price updated successfully
|
|
3164
|
+
* @throws ApiError
|
|
3165
|
+
*/
|
|
3166
|
+
public static priceControllerUpdate(
|
|
3167
|
+
data: PriceControllerUpdateData
|
|
3168
|
+
): CancelablePromise<PriceControllerUpdateResponse> {
|
|
3169
|
+
return __request(OpenAPI, {
|
|
3170
|
+
method: 'PUT',
|
|
3171
|
+
url: '/api/v1/{region}/bean/prices/{id}',
|
|
3172
|
+
path: {
|
|
3173
|
+
id: data.id,
|
|
3174
|
+
region: data.region
|
|
3175
|
+
},
|
|
3176
|
+
body: data.requestBody,
|
|
3177
|
+
mediaType: 'application/json',
|
|
3178
|
+
errors: {
|
|
3179
|
+
404: 'Price not found',
|
|
3180
|
+
409: 'Updated price conflicts with existing price'
|
|
3181
|
+
}
|
|
3182
|
+
});
|
|
3183
|
+
}
|
|
3184
|
+
|
|
3185
|
+
/**
|
|
3186
|
+
* Delete a price
|
|
3187
|
+
* Deletes a price entry (hard delete)
|
|
3188
|
+
* @param data The data for the request.
|
|
3189
|
+
* @param data.id Price ID
|
|
3190
|
+
* @param data.region Region code for tenant context
|
|
3191
|
+
* @returns void Price deleted successfully
|
|
3192
|
+
* @throws ApiError
|
|
3193
|
+
*/
|
|
3194
|
+
public static priceControllerDelete(
|
|
3195
|
+
data: PriceControllerDeleteData
|
|
3196
|
+
): CancelablePromise<PriceControllerDeleteResponse> {
|
|
3197
|
+
return __request(OpenAPI, {
|
|
3198
|
+
method: 'DELETE',
|
|
3199
|
+
url: '/api/v1/{region}/bean/prices/{id}',
|
|
3200
|
+
path: {
|
|
3201
|
+
id: data.id,
|
|
3202
|
+
region: data.region
|
|
3203
|
+
},
|
|
3204
|
+
errors: {
|
|
3205
|
+
404: 'Price not found'
|
|
3206
|
+
}
|
|
3207
|
+
});
|
|
3208
|
+
}
|
|
3209
|
+
|
|
3210
|
+
/**
|
|
3211
|
+
* Bulk create prices
|
|
3212
|
+
* Creates multiple price entries at once (skips duplicates)
|
|
3213
|
+
* @param data The data for the request.
|
|
3214
|
+
* @param data.region Region code for tenant context
|
|
3215
|
+
* @param data.requestBody
|
|
3216
|
+
* @returns PriceResponseDto Prices created successfully
|
|
3217
|
+
* @throws ApiError
|
|
3218
|
+
*/
|
|
3219
|
+
public static priceControllerBulkCreate(
|
|
3220
|
+
data: PriceControllerBulkCreateData
|
|
3221
|
+
): CancelablePromise<PriceControllerBulkCreateResponse> {
|
|
3222
|
+
return __request(OpenAPI, {
|
|
3223
|
+
method: 'POST',
|
|
3224
|
+
url: '/api/v1/{region}/bean/prices/bulk',
|
|
3225
|
+
path: {
|
|
3226
|
+
region: data.region
|
|
3227
|
+
},
|
|
3228
|
+
body: data.requestBody,
|
|
3229
|
+
mediaType: 'application/json'
|
|
3230
|
+
});
|
|
3231
|
+
}
|
|
3232
|
+
}
|
|
3233
|
+
|
|
3002
3234
|
export class ReportingService {
|
|
3003
3235
|
/**
|
|
3004
3236
|
* Get portfolio value trends
|