@firela/api-types 0.0.0-canary.32edff08 → 0.0.0-canary.52154bb3

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.
@@ -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,
@@ -605,6 +625,36 @@ export class BeanTransactionsService {
605
625
  });
606
626
  }
607
627
 
628
+ /**
629
+ * Correct (supersede) a transaction
630
+ * Atomically voids the original (SUPERSEDED) and creates a replacement through the full validation pipeline.
631
+ * @param data The data for the request.
632
+ * @param data.id Original transaction ID to correct
633
+ * @param data.region Region code for tenant context
634
+ * @param data.requestBody
635
+ * @returns TransactionDetailDto Corrected transaction created
636
+ * @throws ApiError
637
+ */
638
+ public static transactionControllerCorrect(
639
+ data: TransactionControllerCorrectData
640
+ ): CancelablePromise<TransactionControllerCorrectResponse> {
641
+ return __request(OpenAPI, {
642
+ method: 'POST',
643
+ url: '/api/v1/{region}/bean/transactions/{id}/correct',
644
+ path: {
645
+ id: data.id,
646
+ region: data.region
647
+ },
648
+ body: data.requestBody,
649
+ mediaType: 'application/json',
650
+ errors: {
651
+ 404: 'Original transaction not found',
652
+ 409: 'Original no longer ACTIVE (concurrent modification)',
653
+ 422: 'Pipeline validation failed (does not balance, invalid accounts)'
654
+ }
655
+ });
656
+ }
657
+
608
658
  /**
609
659
  * Suggest transaction tags
610
660
  * Returns distinct tags from the user ACTIVE transactions, sorted by usage, for autocomplete. Optional q performs a case-insensitive prefix match.
@@ -2729,7 +2779,7 @@ export class ProviderSyncService {
2729
2779
  *
2730
2780
  * @param data The data for the request.
2731
2781
  * @param data.providerName Provider name
2732
- * @param data.region Region code
2782
+ * @param data.region Region code for tenant context
2733
2783
  * @param data.requestBody
2734
2784
  * @returns ProviderSyncResponseDto Sync completed successfully
2735
2785
  * @throws ApiError
@@ -2828,6 +2878,54 @@ export class ImportTelemetryService {
2828
2878
  }
2829
2879
  });
2830
2880
  }
2881
+
2882
+ /**
2883
+ * Receive anonymous zero-hit coverage miss report
2884
+ * @param data The data for the request.
2885
+ * @param data.region Region code for tenant context
2886
+ * @param data.requestBody
2887
+ * @returns unknown Coverage miss report received
2888
+ * @throws ApiError
2889
+ */
2890
+ public static telemetryControllerReportCoverageMiss(
2891
+ data: TelemetryControllerReportCoverageMissData
2892
+ ): CancelablePromise<TelemetryControllerReportCoverageMissResponse> {
2893
+ return __request(OpenAPI, {
2894
+ method: 'POST',
2895
+ url: '/api/v1/{region}/bean/import/parser-coverage-miss',
2896
+ path: {
2897
+ region: data.region
2898
+ },
2899
+ body: data.requestBody,
2900
+ mediaType: 'application/json',
2901
+ errors: {
2902
+ 401: 'Unauthorized'
2903
+ }
2904
+ });
2905
+ }
2906
+
2907
+ /**
2908
+ * Coverage metrics (uncovered format aggregation)
2909
+ * @param data The data for the request.
2910
+ * @param data.region Region code for tenant context
2911
+ * @param data.topN Top-N uncovered formats (default 10)
2912
+ * @returns unknown Coverage metrics
2913
+ * @throws ApiError
2914
+ */
2915
+ public static telemetryControllerGetCoverageMetrics(
2916
+ data: TelemetryControllerGetCoverageMetricsData
2917
+ ): CancelablePromise<TelemetryControllerGetCoverageMetricsResponse> {
2918
+ return __request(OpenAPI, {
2919
+ method: 'GET',
2920
+ url: '/api/v1/{region}/bean/import/parser-coverage-metrics',
2921
+ path: {
2922
+ region: data.region
2923
+ },
2924
+ query: {
2925
+ topN: data.topN
2926
+ }
2927
+ });
2928
+ }
2831
2929
  }
2832
2930
 
2833
2931
  export class BeanNlpService {
@@ -2948,6 +3046,7 @@ export class DashboardService {
2948
3046
  * @param data.region Region code for tenant context
2949
3047
  * @param data.groupBy Grouping strategy
2950
3048
  * @param data.date Date for balance calculation (ISO 8601 format)
3049
+ * @param data.accountId Scope to a single account (only valid with groupBy=holdingAssetClass, ADR-0105 §6)
2951
3050
  * @returns unknown Accounts retrieved successfully. Response type depends on groupBy parameter.
2952
3051
  * @throws ApiError
2953
3052
  */
@@ -2962,7 +3061,8 @@ export class DashboardService {
2962
3061
  },
2963
3062
  query: {
2964
3063
  groupBy: data.groupBy,
2965
- date: data.date
3064
+ date: data.date,
3065
+ accountId: data.accountId
2966
3066
  },
2967
3067
  errors: {
2968
3068
  401: 'User not authenticated'
@@ -2999,6 +3099,207 @@ export class DashboardService {
2999
3099
  }
3000
3100
  }
3001
3101
 
3102
+ export class InvestmentService {
3103
+ /**
3104
+ * Get per-holding unrealized + realized P&L
3105
+ * Average-cost unrealized P&L per account × commodity, plus cumulative realized P&L on sold lots (method = FIFO | average, default average).
3106
+ * @param data The data for the request.
3107
+ * @param data.region Region code for tenant context
3108
+ * @param data.asOf As-of date (ISO 8601), defaults to today
3109
+ * @param data.accountId Scope to a single account
3110
+ * @param data.method Realized-P&L lot-matching method (default average). Does not affect the average-cost unrealized basis.
3111
+ * @returns HoldingPnlResponseDto Holding P&L retrieved successfully
3112
+ * @throws ApiError
3113
+ */
3114
+ public static holdingPnlControllerGetHoldingPnl(
3115
+ data: HoldingPnlControllerGetHoldingPnlData
3116
+ ): CancelablePromise<HoldingPnlControllerGetHoldingPnlResponse> {
3117
+ return __request(OpenAPI, {
3118
+ method: 'GET',
3119
+ url: '/api/v1/{region}/investment/holdings/pnl',
3120
+ path: {
3121
+ region: data.region
3122
+ },
3123
+ query: {
3124
+ asOf: data.asOf,
3125
+ accountId: data.accountId,
3126
+ method: data.method
3127
+ },
3128
+ errors: {
3129
+ 400: 'Invalid asOf format/value/future date, invalid accountId format, or unsupported method',
3130
+ 401: 'User not authenticated'
3131
+ }
3132
+ });
3133
+ }
3134
+ }
3135
+
3136
+ export class BeanPricesService {
3137
+ /**
3138
+ * Create a new price
3139
+ * Creates a new price entry for the authenticated user
3140
+ * @param data The data for the request.
3141
+ * @param data.region Region code for tenant context
3142
+ * @param data.requestBody
3143
+ * @returns PriceResponseDto Price created successfully
3144
+ * @throws ApiError
3145
+ */
3146
+ public static priceControllerCreate(
3147
+ data: PriceControllerCreateData
3148
+ ): CancelablePromise<PriceControllerCreateResponse> {
3149
+ return __request(OpenAPI, {
3150
+ method: 'POST',
3151
+ url: '/api/v1/{region}/bean/prices',
3152
+ path: {
3153
+ region: data.region
3154
+ },
3155
+ body: data.requestBody,
3156
+ mediaType: 'application/json',
3157
+ errors: {
3158
+ 404: 'Currency or quoteCurrency commodity not found',
3159
+ 409: 'Price already exists for this currency pair and date'
3160
+ }
3161
+ });
3162
+ }
3163
+
3164
+ /**
3165
+ * List user prices
3166
+ * Returns all price entries for the authenticated user with optional filtering
3167
+ * @param data The data for the request.
3168
+ * @param data.region Region code for tenant context
3169
+ * @param data.currency Filter by currency (e.g., BTC, AAPL, USD)
3170
+ * @param data.quoteCurrency Filter by quote currency (pricing currency, e.g., USD, CNY)
3171
+ * @param data.dateFrom Filter prices from this date (ISO 8601 format)
3172
+ * @param data.dateTo Filter prices to this date (ISO 8601 format)
3173
+ * @param data.search Search term for currency or quoteCurrency (case-insensitive partial match)
3174
+ * @param data.page Page number for pagination (default: 1)
3175
+ * @param data.limit Number of items per page (default: 20, max: 100)
3176
+ * @returns PriceListResponseDto Prices retrieved successfully
3177
+ * @throws ApiError
3178
+ */
3179
+ public static priceControllerFindAll(
3180
+ data: PriceControllerFindAllData
3181
+ ): CancelablePromise<PriceControllerFindAllResponse> {
3182
+ return __request(OpenAPI, {
3183
+ method: 'GET',
3184
+ url: '/api/v1/{region}/bean/prices',
3185
+ path: {
3186
+ region: data.region
3187
+ },
3188
+ query: {
3189
+ currency: data.currency,
3190
+ quoteCurrency: data.quoteCurrency,
3191
+ dateFrom: data.dateFrom,
3192
+ dateTo: data.dateTo,
3193
+ search: data.search,
3194
+ page: data.page,
3195
+ limit: data.limit
3196
+ }
3197
+ });
3198
+ }
3199
+
3200
+ /**
3201
+ * Get price by ID
3202
+ * Returns a single price entry by its ID
3203
+ * @param data The data for the request.
3204
+ * @param data.id Price ID
3205
+ * @param data.region Region code for tenant context
3206
+ * @returns PriceResponseDto Price retrieved successfully
3207
+ * @throws ApiError
3208
+ */
3209
+ public static priceControllerFindOne(
3210
+ data: PriceControllerFindOneData
3211
+ ): CancelablePromise<PriceControllerFindOneResponse> {
3212
+ return __request(OpenAPI, {
3213
+ method: 'GET',
3214
+ url: '/api/v1/{region}/bean/prices/{id}',
3215
+ path: {
3216
+ id: data.id,
3217
+ region: data.region
3218
+ },
3219
+ errors: {
3220
+ 404: 'Price not found'
3221
+ }
3222
+ });
3223
+ }
3224
+
3225
+ /**
3226
+ * Update a price
3227
+ * Updates an existing price entry
3228
+ * @param data The data for the request.
3229
+ * @param data.id Price ID
3230
+ * @param data.region Region code for tenant context
3231
+ * @param data.requestBody
3232
+ * @returns PriceResponseDto Price updated successfully
3233
+ * @throws ApiError
3234
+ */
3235
+ public static priceControllerUpdate(
3236
+ data: PriceControllerUpdateData
3237
+ ): CancelablePromise<PriceControllerUpdateResponse> {
3238
+ return __request(OpenAPI, {
3239
+ method: 'PUT',
3240
+ url: '/api/v1/{region}/bean/prices/{id}',
3241
+ path: {
3242
+ id: data.id,
3243
+ region: data.region
3244
+ },
3245
+ body: data.requestBody,
3246
+ mediaType: 'application/json',
3247
+ errors: {
3248
+ 404: 'Price not found',
3249
+ 409: 'Updated price conflicts with existing price'
3250
+ }
3251
+ });
3252
+ }
3253
+
3254
+ /**
3255
+ * Delete a price
3256
+ * Deletes a price entry (hard delete)
3257
+ * @param data The data for the request.
3258
+ * @param data.id Price ID
3259
+ * @param data.region Region code for tenant context
3260
+ * @returns void Price deleted successfully
3261
+ * @throws ApiError
3262
+ */
3263
+ public static priceControllerDelete(
3264
+ data: PriceControllerDeleteData
3265
+ ): CancelablePromise<PriceControllerDeleteResponse> {
3266
+ return __request(OpenAPI, {
3267
+ method: 'DELETE',
3268
+ url: '/api/v1/{region}/bean/prices/{id}',
3269
+ path: {
3270
+ id: data.id,
3271
+ region: data.region
3272
+ },
3273
+ errors: {
3274
+ 404: 'Price not found'
3275
+ }
3276
+ });
3277
+ }
3278
+
3279
+ /**
3280
+ * Bulk create prices
3281
+ * Creates multiple price entries at once (skips duplicates)
3282
+ * @param data The data for the request.
3283
+ * @param data.region Region code for tenant context
3284
+ * @param data.requestBody
3285
+ * @returns PriceResponseDto Prices created successfully
3286
+ * @throws ApiError
3287
+ */
3288
+ public static priceControllerBulkCreate(
3289
+ data: PriceControllerBulkCreateData
3290
+ ): CancelablePromise<PriceControllerBulkCreateResponse> {
3291
+ return __request(OpenAPI, {
3292
+ method: 'POST',
3293
+ url: '/api/v1/{region}/bean/prices/bulk',
3294
+ path: {
3295
+ region: data.region
3296
+ },
3297
+ body: data.requestBody,
3298
+ mediaType: 'application/json'
3299
+ });
3300
+ }
3301
+ }
3302
+
3002
3303
  export class ReportingService {
3003
3304
  /**
3004
3305
  * Get portfolio value trends