@firela/api-types 0.0.0-canary.ba0a88d9 → 0.0.0-canary.c5520a90

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,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,239 @@ export class DashboardService {
2963
3290
  }
2964
3291
  });
2965
3292
  }
3293
+
3294
+ /**
3295
+ * Get expenses/income grouped by functional category
3296
+ * 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)
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
+ * @param data.flow Account root to aggregate (expense → ^Expenses:, income → ^Income:)
3302
+ * @returns ExpensesByCategoryResponseDto Expenses retrieved successfully
3303
+ * @throws ApiError
3304
+ */
3305
+ public static dashboardControllerGetExpenses(
3306
+ data: DashboardControllerGetExpensesData
3307
+ ): CancelablePromise<DashboardControllerGetExpensesResponse> {
3308
+ return __request(OpenAPI, {
3309
+ method: 'GET',
3310
+ url: '/api/v1/{region}/dashboard/expenses',
3311
+ path: {
3312
+ region: data.region
3313
+ },
3314
+ query: {
3315
+ groupBy: data.groupBy,
3316
+ period: data.period,
3317
+ flow: data.flow
3318
+ },
3319
+ errors: {
3320
+ 400: 'Invalid groupBy or period',
3321
+ 401: 'User not authenticated'
3322
+ }
3323
+ });
3324
+ }
3325
+ }
3326
+
3327
+ export class InvestmentService {
3328
+ /**
3329
+ * Get per-holding unrealized + realized P&L
3330
+ * Average-cost unrealized P&L per account × commodity, plus cumulative realized P&L on sold lots (method = FIFO | average, default average).
3331
+ * @param data The data for the request.
3332
+ * @param data.region Region code for tenant context
3333
+ * @param data.asOf As-of date (ISO 8601), defaults to today
3334
+ * @param data.accountId Scope to a single account
3335
+ * @param data.method Realized-P&L lot-matching method (default average). Does not affect the average-cost unrealized basis.
3336
+ * @returns HoldingPnlResponseDto Holding P&L retrieved successfully
3337
+ * @throws ApiError
3338
+ */
3339
+ public static holdingPnlControllerGetHoldingPnl(
3340
+ data: HoldingPnlControllerGetHoldingPnlData
3341
+ ): CancelablePromise<HoldingPnlControllerGetHoldingPnlResponse> {
3342
+ return __request(OpenAPI, {
3343
+ method: 'GET',
3344
+ url: '/api/v1/{region}/investment/holdings/pnl',
3345
+ path: {
3346
+ region: data.region
3347
+ },
3348
+ query: {
3349
+ asOf: data.asOf,
3350
+ accountId: data.accountId,
3351
+ method: data.method
3352
+ },
3353
+ errors: {
3354
+ 400: 'Invalid asOf format/value/future date, invalid accountId format, or unsupported method',
3355
+ 401: 'User not authenticated'
3356
+ }
3357
+ });
3358
+ }
3359
+ }
3360
+
3361
+ export class BeanPricesService {
3362
+ /**
3363
+ * Create a new price
3364
+ * Creates a new price entry for the authenticated user
3365
+ * @param data The data for the request.
3366
+ * @param data.region Region code for tenant context
3367
+ * @param data.requestBody
3368
+ * @returns PriceResponseDto Price created successfully
3369
+ * @throws ApiError
3370
+ */
3371
+ public static priceControllerCreate(
3372
+ data: PriceControllerCreateData
3373
+ ): CancelablePromise<PriceControllerCreateResponse> {
3374
+ return __request(OpenAPI, {
3375
+ method: 'POST',
3376
+ url: '/api/v1/{region}/bean/prices',
3377
+ path: {
3378
+ region: data.region
3379
+ },
3380
+ body: data.requestBody,
3381
+ mediaType: 'application/json',
3382
+ errors: {
3383
+ 404: 'Currency or quoteCurrency commodity not found',
3384
+ 409: 'Price already exists for this currency pair and date'
3385
+ }
3386
+ });
3387
+ }
3388
+
3389
+ /**
3390
+ * List user prices
3391
+ * Returns all price entries for the authenticated user with optional filtering
3392
+ * @param data The data for the request.
3393
+ * @param data.region Region code for tenant context
3394
+ * @param data.currency Filter by currency (e.g., BTC, AAPL, USD)
3395
+ * @param data.quoteCurrency Filter by quote currency (pricing currency, e.g., USD, CNY)
3396
+ * @param data.dateFrom Filter prices from this date (ISO 8601 format)
3397
+ * @param data.dateTo Filter prices to this date (ISO 8601 format)
3398
+ * @param data.search Search term for currency or quoteCurrency (case-insensitive partial match)
3399
+ * @param data.page Page number for pagination (default: 1)
3400
+ * @param data.limit Number of items per page (default: 20, max: 100)
3401
+ * @returns PriceListResponseDto Prices retrieved successfully
3402
+ * @throws ApiError
3403
+ */
3404
+ public static priceControllerFindAll(
3405
+ data: PriceControllerFindAllData
3406
+ ): CancelablePromise<PriceControllerFindAllResponse> {
3407
+ return __request(OpenAPI, {
3408
+ method: 'GET',
3409
+ url: '/api/v1/{region}/bean/prices',
3410
+ path: {
3411
+ region: data.region
3412
+ },
3413
+ query: {
3414
+ currency: data.currency,
3415
+ quoteCurrency: data.quoteCurrency,
3416
+ dateFrom: data.dateFrom,
3417
+ dateTo: data.dateTo,
3418
+ search: data.search,
3419
+ page: data.page,
3420
+ limit: data.limit
3421
+ }
3422
+ });
3423
+ }
3424
+
3425
+ /**
3426
+ * Get price by ID
3427
+ * Returns a single price entry by its ID
3428
+ * @param data The data for the request.
3429
+ * @param data.id Price ID
3430
+ * @param data.region Region code for tenant context
3431
+ * @returns PriceResponseDto Price retrieved successfully
3432
+ * @throws ApiError
3433
+ */
3434
+ public static priceControllerFindOne(
3435
+ data: PriceControllerFindOneData
3436
+ ): CancelablePromise<PriceControllerFindOneResponse> {
3437
+ return __request(OpenAPI, {
3438
+ method: 'GET',
3439
+ url: '/api/v1/{region}/bean/prices/{id}',
3440
+ path: {
3441
+ id: data.id,
3442
+ region: data.region
3443
+ },
3444
+ errors: {
3445
+ 404: 'Price not found'
3446
+ }
3447
+ });
3448
+ }
3449
+
3450
+ /**
3451
+ * Update a price
3452
+ * Updates an existing price entry
3453
+ * @param data The data for the request.
3454
+ * @param data.id Price ID
3455
+ * @param data.region Region code for tenant context
3456
+ * @param data.requestBody
3457
+ * @returns PriceResponseDto Price updated successfully
3458
+ * @throws ApiError
3459
+ */
3460
+ public static priceControllerUpdate(
3461
+ data: PriceControllerUpdateData
3462
+ ): CancelablePromise<PriceControllerUpdateResponse> {
3463
+ return __request(OpenAPI, {
3464
+ method: 'PUT',
3465
+ url: '/api/v1/{region}/bean/prices/{id}',
3466
+ path: {
3467
+ id: data.id,
3468
+ region: data.region
3469
+ },
3470
+ body: data.requestBody,
3471
+ mediaType: 'application/json',
3472
+ errors: {
3473
+ 404: 'Price not found',
3474
+ 409: 'Updated price conflicts with existing price'
3475
+ }
3476
+ });
3477
+ }
3478
+
3479
+ /**
3480
+ * Delete a price
3481
+ * Deletes a price entry (hard delete)
3482
+ * @param data The data for the request.
3483
+ * @param data.id Price ID
3484
+ * @param data.region Region code for tenant context
3485
+ * @returns void Price deleted successfully
3486
+ * @throws ApiError
3487
+ */
3488
+ public static priceControllerDelete(
3489
+ data: PriceControllerDeleteData
3490
+ ): CancelablePromise<PriceControllerDeleteResponse> {
3491
+ return __request(OpenAPI, {
3492
+ method: 'DELETE',
3493
+ url: '/api/v1/{region}/bean/prices/{id}',
3494
+ path: {
3495
+ id: data.id,
3496
+ region: data.region
3497
+ },
3498
+ errors: {
3499
+ 404: 'Price not found'
3500
+ }
3501
+ });
3502
+ }
3503
+
3504
+ /**
3505
+ * Bulk create prices
3506
+ * Creates multiple price entries at once (skips duplicates)
3507
+ * @param data The data for the request.
3508
+ * @param data.region Region code for tenant context
3509
+ * @param data.requestBody
3510
+ * @returns PriceResponseDto Prices created successfully
3511
+ * @throws ApiError
3512
+ */
3513
+ public static priceControllerBulkCreate(
3514
+ data: PriceControllerBulkCreateData
3515
+ ): CancelablePromise<PriceControllerBulkCreateResponse> {
3516
+ return __request(OpenAPI, {
3517
+ method: 'POST',
3518
+ url: '/api/v1/{region}/bean/prices/bulk',
3519
+ path: {
3520
+ region: data.region
3521
+ },
3522
+ body: data.requestBody,
3523
+ mediaType: 'application/json'
3524
+ });
3525
+ }
2966
3526
  }
2967
3527
 
2968
3528
  export class ReportingService {
@@ -3006,6 +3566,42 @@ export class ReportingService {
3006
3566
  });
3007
3567
  }
3008
3568
 
3569
+ /**
3570
+ * Get cash-flow trends
3571
+ *
3572
+ * Monthly income / expense / netSavings over a fixed N-month window
3573
+ * (current month + N−1 prior). Missing months are zero-filled (flow metric).
3574
+ *
3575
+ * **Parameters:**
3576
+ * - `period`: 1m | 3m | 6m | 1y (default 6m)
3577
+ * - `granularity`: accepted for API symmetry; v1 returns month buckets
3578
+ *
3579
+ * @param data The data for the request.
3580
+ * @param data.region Region code for tenant context
3581
+ * @param data.period Time period
3582
+ * @param data.granularity Data granularity (accepted for API symmetry; v1 returns month buckets)
3583
+ * @returns CashFlowTrendsResponseDto Cash-flow trends retrieved successfully
3584
+ * @throws ApiError
3585
+ */
3586
+ public static reportingControllerGetCashFlowTrends(
3587
+ data: ReportingControllerGetCashFlowTrendsData
3588
+ ): CancelablePromise<ReportingControllerGetCashFlowTrendsResponse> {
3589
+ return __request(OpenAPI, {
3590
+ method: 'GET',
3591
+ url: '/api/v1/{region}/reporting/cash-flow/trends',
3592
+ path: {
3593
+ region: data.region
3594
+ },
3595
+ query: {
3596
+ period: data.period,
3597
+ granularity: data.granularity
3598
+ },
3599
+ errors: {
3600
+ 401: 'User not authenticated'
3601
+ }
3602
+ });
3603
+ }
3604
+
3009
3605
  /**
3010
3606
  * Generate portfolio snapshot
3011
3607
  *