@firela/api-types 0.0.0-canary.0327ab9e → 0.0.0-canary.0808a6e0

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,
@@ -169,6 +171,18 @@ import type {
169
171
  PropertyControllerUpdateResponse,
170
172
  PropertyControllerDeleteData,
171
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,
172
186
  ExportControllerExportBeancountResponse,
173
187
  FileImportControllerImportFileData,
174
188
  FileImportControllerImportFileResponse,
@@ -200,6 +214,10 @@ import type {
200
214
  ProviderSyncControllerIsProviderSupportedResponse,
201
215
  TelemetryControllerReportTelemetryData,
202
216
  TelemetryControllerReportTelemetryResponse,
217
+ TelemetryControllerReportCoverageMissData,
218
+ TelemetryControllerReportCoverageMissResponse,
219
+ TelemetryControllerGetCoverageMetricsData,
220
+ TelemetryControllerGetCoverageMetricsResponse,
203
221
  NlpControllerProcessNaturalLanguageData,
204
222
  NlpControllerProcessNaturalLanguageResponse,
205
223
  NlpControllerClearSessionData,
@@ -212,8 +230,26 @@ import type {
212
230
  DashboardControllerGetAccountsResponse,
213
231
  DashboardControllerGetCashFlowData,
214
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,
215
249
  ReportingControllerGetPortfolioTrendsData,
216
250
  ReportingControllerGetPortfolioTrendsResponse,
251
+ ReportingControllerGetCashFlowTrendsData,
252
+ ReportingControllerGetCashFlowTrendsResponse,
217
253
  ReportingControllerGenerateSnapshotData,
218
254
  ReportingControllerGenerateSnapshotResponse,
219
255
  ReportingControllerBackfillSnapshotsData,
@@ -605,6 +641,36 @@ export class BeanTransactionsService {
605
641
  });
606
642
  }
607
643
 
644
+ /**
645
+ * Correct (supersede) a transaction
646
+ * Atomically voids the original (SUPERSEDED) and creates a replacement through the full validation pipeline.
647
+ * @param data The data for the request.
648
+ * @param data.id Original transaction ID to correct
649
+ * @param data.region Region code for tenant context
650
+ * @param data.requestBody
651
+ * @returns TransactionDetailDto Corrected transaction created
652
+ * @throws ApiError
653
+ */
654
+ public static transactionControllerCorrect(
655
+ data: TransactionControllerCorrectData
656
+ ): CancelablePromise<TransactionControllerCorrectResponse> {
657
+ return __request(OpenAPI, {
658
+ method: 'POST',
659
+ url: '/api/v1/{region}/bean/transactions/{id}/correct',
660
+ path: {
661
+ id: data.id,
662
+ region: data.region
663
+ },
664
+ body: data.requestBody,
665
+ mediaType: 'application/json',
666
+ errors: {
667
+ 404: 'Original transaction not found',
668
+ 409: 'Original no longer ACTIVE (concurrent modification)',
669
+ 422: 'Pipeline validation failed (does not balance, invalid accounts)'
670
+ }
671
+ });
672
+ }
673
+
608
674
  /**
609
675
  * Suggest transaction tags
610
676
  * Returns distinct tags from the user ACTIVE transactions, sorted by usage, for autocomplete. Optional q performs a case-insensitive prefix match.
@@ -2410,6 +2476,181 @@ export class PropertiesService {
2410
2476
  }
2411
2477
  }
2412
2478
 
2479
+ export class LifeEventsService {
2480
+ /**
2481
+ * Create a new life event
2482
+ * Creates a new life event entry for the authenticated user. Returns ETag header carrying the row updatedAt.
2483
+ * @param data The data for the request.
2484
+ * @param data.region Region code for tenant context (decorative for life events)
2485
+ * @param data.requestBody
2486
+ * @returns EventResponseDto Life event created successfully
2487
+ * @throws ApiError
2488
+ */
2489
+ public static eventControllerCreate(
2490
+ data: EventControllerCreateData
2491
+ ): CancelablePromise<EventControllerCreateResponse> {
2492
+ return __request(OpenAPI, {
2493
+ method: 'POST',
2494
+ url: '/api/v1/{region}/bean/events',
2495
+ path: {
2496
+ region: data.region
2497
+ },
2498
+ body: data.requestBody,
2499
+ mediaType: 'application/json',
2500
+ errors: {
2501
+ 409: 'Life event already exists for this (userId, type, date) combination'
2502
+ }
2503
+ });
2504
+ }
2505
+
2506
+ /**
2507
+ * List user life events
2508
+ * Returns life events for the authenticated user with optional filtering by type, description search, and date range.
2509
+ * @param data The data for the request.
2510
+ * @param data.region Region code for tenant context (decorative for life events)
2511
+ * @param data.type Filter by life event type (exact match)
2512
+ * @param data.q Search term for description (case-insensitive partial match)
2513
+ * @param data.from Filter life events from this date (ISO 8601 format)
2514
+ * @param data.to Filter life events to this date (ISO 8601 format)
2515
+ * @param data.page Page number for pagination (default: 1)
2516
+ * @param data.limit Number of items per page (default: 20, max: 100)
2517
+ * @returns EventListResponseDto Life events retrieved successfully
2518
+ * @throws ApiError
2519
+ */
2520
+ public static eventControllerFindAll(
2521
+ data: EventControllerFindAllData
2522
+ ): CancelablePromise<EventControllerFindAllResponse> {
2523
+ return __request(OpenAPI, {
2524
+ method: 'GET',
2525
+ url: '/api/v1/{region}/bean/events',
2526
+ path: {
2527
+ region: data.region
2528
+ },
2529
+ query: {
2530
+ type: data.type,
2531
+ q: data.q,
2532
+ from: data.from,
2533
+ to: data.to,
2534
+ page: data.page,
2535
+ limit: data.limit
2536
+ }
2537
+ });
2538
+ }
2539
+
2540
+ /**
2541
+ * Get life event by ID
2542
+ * Returns a single life event by its ID. Returns ETag header.
2543
+ * @param data The data for the request.
2544
+ * @param data.id Life event ID
2545
+ * @param data.region Region code for tenant context (decorative for life events)
2546
+ * @returns EventResponseDto Life event retrieved successfully
2547
+ * @throws ApiError
2548
+ */
2549
+ public static eventControllerFindOne(
2550
+ data: EventControllerFindOneData
2551
+ ): CancelablePromise<EventControllerFindOneResponse> {
2552
+ return __request(OpenAPI, {
2553
+ method: 'GET',
2554
+ url: '/api/v1/{region}/bean/events/{id}',
2555
+ path: {
2556
+ id: data.id,
2557
+ region: data.region
2558
+ },
2559
+ errors: {
2560
+ 404: 'Life event not found'
2561
+ }
2562
+ });
2563
+ }
2564
+
2565
+ /**
2566
+ * Update a life event
2567
+ * Updates an existing life event. If If-Match header is provided, performs optimistic concurrency check; mismatched updatedAt returns 412.
2568
+ * @param data The data for the request.
2569
+ * @param data.id Life event ID
2570
+ * @param data.region Region code for tenant context (decorative for life events)
2571
+ * @param data.requestBody
2572
+ * @returns EventResponseDto Life event updated successfully
2573
+ * @throws ApiError
2574
+ */
2575
+ public static eventControllerUpdate(
2576
+ data: EventControllerUpdateData
2577
+ ): CancelablePromise<EventControllerUpdateResponse> {
2578
+ return __request(OpenAPI, {
2579
+ method: 'PUT',
2580
+ url: '/api/v1/{region}/bean/events/{id}',
2581
+ path: {
2582
+ id: data.id,
2583
+ region: data.region
2584
+ },
2585
+ body: data.requestBody,
2586
+ mediaType: 'application/json',
2587
+ errors: {
2588
+ 400: 'If-Match header is not a valid ISO 8601 date',
2589
+ 404: 'Life event not found',
2590
+ 409: 'Updated event conflicts with an existing (userId, type, date) combination',
2591
+ 412: 'If-Match precondition failed (updatedAt mismatch)'
2592
+ }
2593
+ });
2594
+ }
2595
+
2596
+ /**
2597
+ * Delete a life event
2598
+ * Deletes a life event entry (hard delete). Returns 204.
2599
+ * @param data The data for the request.
2600
+ * @param data.id Life event ID
2601
+ * @param data.region Region code for tenant context (decorative for life events)
2602
+ * @returns void Life event deleted successfully
2603
+ * @throws ApiError
2604
+ */
2605
+ public static eventControllerDelete(
2606
+ data: EventControllerDeleteData
2607
+ ): CancelablePromise<EventControllerDeleteResponse> {
2608
+ return __request(OpenAPI, {
2609
+ method: 'DELETE',
2610
+ url: '/api/v1/{region}/bean/events/{id}',
2611
+ path: {
2612
+ id: data.id,
2613
+ region: data.region
2614
+ },
2615
+ errors: {
2616
+ 404: 'Life event not found'
2617
+ }
2618
+ });
2619
+ }
2620
+
2621
+ /**
2622
+ * Slice time-series by a life event (Phase 79)
2623
+ * Returns aggregated time-series for postings matching accountPattern within the half-open date range of the given life event.
2624
+ * @param data The data for the request.
2625
+ * @param data.id Life event ID
2626
+ * @param data.accountPattern
2627
+ * @param data.granularity
2628
+ * @param data.region Region code for tenant context (decorative for life events)
2629
+ * @returns unknown Time-series sliced by the life event range
2630
+ * @throws ApiError
2631
+ */
2632
+ public static eventControllerGetSlice(
2633
+ data: EventControllerGetSliceData
2634
+ ): CancelablePromise<EventControllerGetSliceResponse> {
2635
+ return __request(OpenAPI, {
2636
+ method: 'GET',
2637
+ url: '/api/v1/{region}/bean/events/{id}/slice',
2638
+ path: {
2639
+ id: data.id,
2640
+ region: data.region
2641
+ },
2642
+ query: {
2643
+ accountPattern: data.accountPattern,
2644
+ granularity: data.granularity
2645
+ },
2646
+ errors: {
2647
+ 400: 'accountPattern query param is empty',
2648
+ 404: 'Life event not found'
2649
+ }
2650
+ });
2651
+ }
2652
+ }
2653
+
2413
2654
  export class BeanExportService {
2414
2655
  /**
2415
2656
  * Export Beancount ledger as ZIP
@@ -2729,7 +2970,7 @@ export class ProviderSyncService {
2729
2970
  *
2730
2971
  * @param data The data for the request.
2731
2972
  * @param data.providerName Provider name
2732
- * @param data.region Region code
2973
+ * @param data.region Region code for tenant context
2733
2974
  * @param data.requestBody
2734
2975
  * @returns ProviderSyncResponseDto Sync completed successfully
2735
2976
  * @throws ApiError
@@ -2828,6 +3069,54 @@ export class ImportTelemetryService {
2828
3069
  }
2829
3070
  });
2830
3071
  }
3072
+
3073
+ /**
3074
+ * Receive anonymous zero-hit coverage miss report
3075
+ * @param data The data for the request.
3076
+ * @param data.region Region code for tenant context
3077
+ * @param data.requestBody
3078
+ * @returns unknown Coverage miss report received
3079
+ * @throws ApiError
3080
+ */
3081
+ public static telemetryControllerReportCoverageMiss(
3082
+ data: TelemetryControllerReportCoverageMissData
3083
+ ): CancelablePromise<TelemetryControllerReportCoverageMissResponse> {
3084
+ return __request(OpenAPI, {
3085
+ method: 'POST',
3086
+ url: '/api/v1/{region}/bean/import/parser-coverage-miss',
3087
+ path: {
3088
+ region: data.region
3089
+ },
3090
+ body: data.requestBody,
3091
+ mediaType: 'application/json',
3092
+ errors: {
3093
+ 401: 'Unauthorized'
3094
+ }
3095
+ });
3096
+ }
3097
+
3098
+ /**
3099
+ * Coverage metrics (uncovered format aggregation)
3100
+ * @param data The data for the request.
3101
+ * @param data.region Region code for tenant context
3102
+ * @param data.topN Top-N uncovered formats (default 10)
3103
+ * @returns unknown Coverage metrics
3104
+ * @throws ApiError
3105
+ */
3106
+ public static telemetryControllerGetCoverageMetrics(
3107
+ data: TelemetryControllerGetCoverageMetricsData
3108
+ ): CancelablePromise<TelemetryControllerGetCoverageMetricsResponse> {
3109
+ return __request(OpenAPI, {
3110
+ method: 'GET',
3111
+ url: '/api/v1/{region}/bean/import/parser-coverage-metrics',
3112
+ path: {
3113
+ region: data.region
3114
+ },
3115
+ query: {
3116
+ topN: data.topN
3117
+ }
3118
+ });
3119
+ }
2831
3120
  }
2832
3121
 
2833
3122
  export class BeanNlpService {
@@ -2948,6 +3237,7 @@ export class DashboardService {
2948
3237
  * @param data.region Region code for tenant context
2949
3238
  * @param data.groupBy Grouping strategy
2950
3239
  * @param data.date Date for balance calculation (ISO 8601 format)
3240
+ * @param data.accountId Scope to a single account (only valid with groupBy=holdingAssetClass, ADR-0105 §6)
2951
3241
  * @returns unknown Accounts retrieved successfully. Response type depends on groupBy parameter.
2952
3242
  * @throws ApiError
2953
3243
  */
@@ -2962,7 +3252,8 @@ export class DashboardService {
2962
3252
  },
2963
3253
  query: {
2964
3254
  groupBy: data.groupBy,
2965
- date: data.date
3255
+ date: data.date,
3256
+ accountId: data.accountId
2966
3257
  },
2967
3258
  errors: {
2968
3259
  401: 'User not authenticated'
@@ -2997,6 +3288,237 @@ export class DashboardService {
2997
3288
  }
2998
3289
  });
2999
3290
  }
3291
+
3292
+ /**
3293
+ * Get expenses grouped by functional category
3294
+ * Returns expenses pre-aggregated by functional category (account-path Group segment) with server-side multi-currency conversion
3295
+ * @param data The data for the request.
3296
+ * @param data.region Region code for tenant context
3297
+ * @param data.groupBy Grouping strategy
3298
+ * @param data.period Time window (1m = current calendar month)
3299
+ * @returns ExpensesByCategoryResponseDto Expenses retrieved successfully
3300
+ * @throws ApiError
3301
+ */
3302
+ public static dashboardControllerGetExpenses(
3303
+ data: DashboardControllerGetExpensesData
3304
+ ): CancelablePromise<DashboardControllerGetExpensesResponse> {
3305
+ return __request(OpenAPI, {
3306
+ method: 'GET',
3307
+ url: '/api/v1/{region}/dashboard/expenses',
3308
+ path: {
3309
+ region: data.region
3310
+ },
3311
+ query: {
3312
+ groupBy: data.groupBy,
3313
+ period: data.period
3314
+ },
3315
+ errors: {
3316
+ 400: 'Invalid groupBy or period',
3317
+ 401: 'User not authenticated'
3318
+ }
3319
+ });
3320
+ }
3321
+ }
3322
+
3323
+ export class InvestmentService {
3324
+ /**
3325
+ * Get per-holding unrealized + realized P&L
3326
+ * Average-cost unrealized P&L per account × commodity, plus cumulative realized P&L on sold lots (method = FIFO | average, default average).
3327
+ * @param data The data for the request.
3328
+ * @param data.region Region code for tenant context
3329
+ * @param data.asOf As-of date (ISO 8601), defaults to today
3330
+ * @param data.accountId Scope to a single account
3331
+ * @param data.method Realized-P&L lot-matching method (default average). Does not affect the average-cost unrealized basis.
3332
+ * @returns HoldingPnlResponseDto Holding P&L retrieved successfully
3333
+ * @throws ApiError
3334
+ */
3335
+ public static holdingPnlControllerGetHoldingPnl(
3336
+ data: HoldingPnlControllerGetHoldingPnlData
3337
+ ): CancelablePromise<HoldingPnlControllerGetHoldingPnlResponse> {
3338
+ return __request(OpenAPI, {
3339
+ method: 'GET',
3340
+ url: '/api/v1/{region}/investment/holdings/pnl',
3341
+ path: {
3342
+ region: data.region
3343
+ },
3344
+ query: {
3345
+ asOf: data.asOf,
3346
+ accountId: data.accountId,
3347
+ method: data.method
3348
+ },
3349
+ errors: {
3350
+ 400: 'Invalid asOf format/value/future date, invalid accountId format, or unsupported method',
3351
+ 401: 'User not authenticated'
3352
+ }
3353
+ });
3354
+ }
3355
+ }
3356
+
3357
+ export class BeanPricesService {
3358
+ /**
3359
+ * Create a new price
3360
+ * Creates a new price entry for the authenticated user
3361
+ * @param data The data for the request.
3362
+ * @param data.region Region code for tenant context
3363
+ * @param data.requestBody
3364
+ * @returns PriceResponseDto Price created successfully
3365
+ * @throws ApiError
3366
+ */
3367
+ public static priceControllerCreate(
3368
+ data: PriceControllerCreateData
3369
+ ): CancelablePromise<PriceControllerCreateResponse> {
3370
+ return __request(OpenAPI, {
3371
+ method: 'POST',
3372
+ url: '/api/v1/{region}/bean/prices',
3373
+ path: {
3374
+ region: data.region
3375
+ },
3376
+ body: data.requestBody,
3377
+ mediaType: 'application/json',
3378
+ errors: {
3379
+ 404: 'Currency or quoteCurrency commodity not found',
3380
+ 409: 'Price already exists for this currency pair and date'
3381
+ }
3382
+ });
3383
+ }
3384
+
3385
+ /**
3386
+ * List user prices
3387
+ * Returns all price entries for the authenticated user with optional filtering
3388
+ * @param data The data for the request.
3389
+ * @param data.region Region code for tenant context
3390
+ * @param data.currency Filter by currency (e.g., BTC, AAPL, USD)
3391
+ * @param data.quoteCurrency Filter by quote currency (pricing currency, e.g., USD, CNY)
3392
+ * @param data.dateFrom Filter prices from this date (ISO 8601 format)
3393
+ * @param data.dateTo Filter prices to this date (ISO 8601 format)
3394
+ * @param data.search Search term for currency or quoteCurrency (case-insensitive partial match)
3395
+ * @param data.page Page number for pagination (default: 1)
3396
+ * @param data.limit Number of items per page (default: 20, max: 100)
3397
+ * @returns PriceListResponseDto Prices retrieved successfully
3398
+ * @throws ApiError
3399
+ */
3400
+ public static priceControllerFindAll(
3401
+ data: PriceControllerFindAllData
3402
+ ): CancelablePromise<PriceControllerFindAllResponse> {
3403
+ return __request(OpenAPI, {
3404
+ method: 'GET',
3405
+ url: '/api/v1/{region}/bean/prices',
3406
+ path: {
3407
+ region: data.region
3408
+ },
3409
+ query: {
3410
+ currency: data.currency,
3411
+ quoteCurrency: data.quoteCurrency,
3412
+ dateFrom: data.dateFrom,
3413
+ dateTo: data.dateTo,
3414
+ search: data.search,
3415
+ page: data.page,
3416
+ limit: data.limit
3417
+ }
3418
+ });
3419
+ }
3420
+
3421
+ /**
3422
+ * Get price by ID
3423
+ * Returns a single price entry by its ID
3424
+ * @param data The data for the request.
3425
+ * @param data.id Price ID
3426
+ * @param data.region Region code for tenant context
3427
+ * @returns PriceResponseDto Price retrieved successfully
3428
+ * @throws ApiError
3429
+ */
3430
+ public static priceControllerFindOne(
3431
+ data: PriceControllerFindOneData
3432
+ ): CancelablePromise<PriceControllerFindOneResponse> {
3433
+ return __request(OpenAPI, {
3434
+ method: 'GET',
3435
+ url: '/api/v1/{region}/bean/prices/{id}',
3436
+ path: {
3437
+ id: data.id,
3438
+ region: data.region
3439
+ },
3440
+ errors: {
3441
+ 404: 'Price not found'
3442
+ }
3443
+ });
3444
+ }
3445
+
3446
+ /**
3447
+ * Update a price
3448
+ * Updates an existing price entry
3449
+ * @param data The data for the request.
3450
+ * @param data.id Price ID
3451
+ * @param data.region Region code for tenant context
3452
+ * @param data.requestBody
3453
+ * @returns PriceResponseDto Price updated successfully
3454
+ * @throws ApiError
3455
+ */
3456
+ public static priceControllerUpdate(
3457
+ data: PriceControllerUpdateData
3458
+ ): CancelablePromise<PriceControllerUpdateResponse> {
3459
+ return __request(OpenAPI, {
3460
+ method: 'PUT',
3461
+ url: '/api/v1/{region}/bean/prices/{id}',
3462
+ path: {
3463
+ id: data.id,
3464
+ region: data.region
3465
+ },
3466
+ body: data.requestBody,
3467
+ mediaType: 'application/json',
3468
+ errors: {
3469
+ 404: 'Price not found',
3470
+ 409: 'Updated price conflicts with existing price'
3471
+ }
3472
+ });
3473
+ }
3474
+
3475
+ /**
3476
+ * Delete a price
3477
+ * Deletes a price entry (hard delete)
3478
+ * @param data The data for the request.
3479
+ * @param data.id Price ID
3480
+ * @param data.region Region code for tenant context
3481
+ * @returns void Price deleted successfully
3482
+ * @throws ApiError
3483
+ */
3484
+ public static priceControllerDelete(
3485
+ data: PriceControllerDeleteData
3486
+ ): CancelablePromise<PriceControllerDeleteResponse> {
3487
+ return __request(OpenAPI, {
3488
+ method: 'DELETE',
3489
+ url: '/api/v1/{region}/bean/prices/{id}',
3490
+ path: {
3491
+ id: data.id,
3492
+ region: data.region
3493
+ },
3494
+ errors: {
3495
+ 404: 'Price not found'
3496
+ }
3497
+ });
3498
+ }
3499
+
3500
+ /**
3501
+ * Bulk create prices
3502
+ * Creates multiple price entries at once (skips duplicates)
3503
+ * @param data The data for the request.
3504
+ * @param data.region Region code for tenant context
3505
+ * @param data.requestBody
3506
+ * @returns PriceResponseDto Prices created successfully
3507
+ * @throws ApiError
3508
+ */
3509
+ public static priceControllerBulkCreate(
3510
+ data: PriceControllerBulkCreateData
3511
+ ): CancelablePromise<PriceControllerBulkCreateResponse> {
3512
+ return __request(OpenAPI, {
3513
+ method: 'POST',
3514
+ url: '/api/v1/{region}/bean/prices/bulk',
3515
+ path: {
3516
+ region: data.region
3517
+ },
3518
+ body: data.requestBody,
3519
+ mediaType: 'application/json'
3520
+ });
3521
+ }
3000
3522
  }
3001
3523
 
3002
3524
  export class ReportingService {
@@ -3040,6 +3562,42 @@ export class ReportingService {
3040
3562
  });
3041
3563
  }
3042
3564
 
3565
+ /**
3566
+ * Get cash-flow trends
3567
+ *
3568
+ * Monthly income / expense / netSavings over a fixed N-month window
3569
+ * (current month + N−1 prior). Missing months are zero-filled (flow metric).
3570
+ *
3571
+ * **Parameters:**
3572
+ * - `period`: 1m | 3m | 6m | 1y (default 6m)
3573
+ * - `granularity`: accepted for API symmetry; v1 returns month buckets
3574
+ *
3575
+ * @param data The data for the request.
3576
+ * @param data.region Region code for tenant context
3577
+ * @param data.period Time period
3578
+ * @param data.granularity Data granularity (accepted for API symmetry; v1 returns month buckets)
3579
+ * @returns CashFlowTrendsResponseDto Cash-flow trends retrieved successfully
3580
+ * @throws ApiError
3581
+ */
3582
+ public static reportingControllerGetCashFlowTrends(
3583
+ data: ReportingControllerGetCashFlowTrendsData
3584
+ ): CancelablePromise<ReportingControllerGetCashFlowTrendsResponse> {
3585
+ return __request(OpenAPI, {
3586
+ method: 'GET',
3587
+ url: '/api/v1/{region}/reporting/cash-flow/trends',
3588
+ path: {
3589
+ region: data.region
3590
+ },
3591
+ query: {
3592
+ period: data.period,
3593
+ granularity: data.granularity
3594
+ },
3595
+ errors: {
3596
+ 401: 'User not authenticated'
3597
+ }
3598
+ });
3599
+ }
3600
+
3043
3601
  /**
3044
3602
  * Generate portfolio snapshot
3045
3603
  *