@firela/api-types 0.0.0-canary.2fbeefe9 → 0.0.0-canary.3d558482

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.
@@ -17,6 +17,8 @@ import type {
17
17
  AccountControllerCloseResponse,
18
18
  AccountControllerReopenData,
19
19
  AccountControllerReopenResponse,
20
+ AccountControllerAddOpeningBalanceData,
21
+ AccountControllerAddOpeningBalanceResponse,
20
22
  AccountStandardsControllerGetTemplatesData,
21
23
  AccountStandardsControllerGetTemplatesResponse,
22
24
  AccountStandardsControllerGetTemplateMetadataData,
@@ -183,6 +185,14 @@ import type {
183
185
  PropertyControllerUpdateResponse,
184
186
  PropertyControllerDeleteData,
185
187
  PropertyControllerDeleteResponse,
188
+ ReportingControllerGetPortfolioTrendsData,
189
+ ReportingControllerGetPortfolioTrendsResponse,
190
+ ReportingControllerGetCashFlowTrendsData,
191
+ ReportingControllerGetCashFlowTrendsResponse,
192
+ ReportingControllerGenerateSnapshotData,
193
+ ReportingControllerGenerateSnapshotResponse,
194
+ ReportingControllerBackfillSnapshotsData,
195
+ ReportingControllerBackfillSnapshotsResponse,
186
196
  EventControllerCreateData,
187
197
  EventControllerCreateResponse,
188
198
  EventControllerFindAllData,
@@ -264,14 +274,6 @@ import type {
264
274
  DashboardControllerGetExpensesResponse,
265
275
  HoldingPnlControllerGetHoldingPnlData,
266
276
  HoldingPnlControllerGetHoldingPnlResponse,
267
- ReportingControllerGetPortfolioTrendsData,
268
- ReportingControllerGetPortfolioTrendsResponse,
269
- ReportingControllerGetCashFlowTrendsData,
270
- ReportingControllerGetCashFlowTrendsResponse,
271
- ReportingControllerGenerateSnapshotData,
272
- ReportingControllerGenerateSnapshotResponse,
273
- ReportingControllerBackfillSnapshotsData,
274
- ReportingControllerBackfillSnapshotsResponse,
275
277
  ApiKeysControllerCreateApiKeyResponse,
276
278
  AuthControllerAccessTokenLoginData,
277
279
  AuthControllerAccessTokenLoginResponse,
@@ -486,6 +488,35 @@ export class BeanAccountsService {
486
488
  }
487
489
  });
488
490
  }
491
+
492
+ /**
493
+ * Post an opening-balance transaction
494
+ * Posts a double-entry opening-balance transaction against Equity:Opening-Balances for an existing Assets/Liabilities account. At most one active opening balance per account.
495
+ * @param data The data for the request.
496
+ * @param data.id Account UUID
497
+ * @param data.region Region code for tenant context
498
+ * @param data.requestBody
499
+ * @returns OpeningBalanceResultDto Opening-balance transaction created
500
+ * @throws ApiError
501
+ */
502
+ public static accountControllerAddOpeningBalance(
503
+ data: AccountControllerAddOpeningBalanceData
504
+ ): CancelablePromise<AccountControllerAddOpeningBalanceResponse> {
505
+ return __request(OpenAPI, {
506
+ method: 'POST',
507
+ url: '/api/v1/{region}/bean/accounts/{id}/opening-balance',
508
+ path: {
509
+ id: data.id,
510
+ region: data.region
511
+ },
512
+ body: data.requestBody,
513
+ mediaType: 'application/json',
514
+ errors: {
515
+ 404: 'Account not found',
516
+ 409: 'An opening balance already exists for this account'
517
+ }
518
+ });
519
+ }
489
520
  }
490
521
 
491
522
  export class BeanAccountStandardsService {
@@ -2454,7 +2485,7 @@ export class UsersService {
2454
2485
  * Create a new account with auto-generated access token. Protected by Cloudflare Turnstile to prevent automated signup (when enabled).
2455
2486
  * @param data The data for the request.
2456
2487
  * @param data.requestBody
2457
- * @returns unknown User created successfully
2488
+ * @returns SignupResponseDto User created successfully
2458
2489
  * @throws ApiError
2459
2490
  */
2460
2491
  public static userControllerSignupUser(
@@ -2663,6 +2694,163 @@ export class PropertiesService {
2663
2694
  }
2664
2695
  }
2665
2696
 
2697
+ export class ReportingService {
2698
+ /**
2699
+ * Get portfolio value trends
2700
+ *
2701
+ * Returns time series data of portfolio net worth.
2702
+ *
2703
+ * **Multi-currency Support:**
2704
+ * - `series[].byCurrency` - Currency breakdown for each data point
2705
+ * - `byCurrency` - Separate time series grouped by currency
2706
+ * - `warnings` - Exchange rate warnings if conversion failed
2707
+ *
2708
+ * **Parameters:**
2709
+ * - `period`: Time period (1m, 3m, 6m, 1y)
2710
+ * - `granularity`: Data granularity (day, week, month)
2711
+ *
2712
+ * @param data The data for the request.
2713
+ * @param data.region Region code for tenant context
2714
+ * @param data.period Time period
2715
+ * @param data.granularity Data granularity
2716
+ * @returns PortfolioTrendsResponseDto Trends retrieved successfully
2717
+ * @throws ApiError
2718
+ */
2719
+ public static reportingControllerGetPortfolioTrends(
2720
+ data: ReportingControllerGetPortfolioTrendsData
2721
+ ): CancelablePromise<ReportingControllerGetPortfolioTrendsResponse> {
2722
+ return __request(OpenAPI, {
2723
+ method: 'GET',
2724
+ url: '/api/v1/{region}/reporting/portfolio/trends',
2725
+ path: {
2726
+ region: data.region
2727
+ },
2728
+ query: {
2729
+ period: data.period,
2730
+ granularity: data.granularity
2731
+ },
2732
+ errors: {
2733
+ 401: 'User not authenticated'
2734
+ }
2735
+ });
2736
+ }
2737
+
2738
+ /**
2739
+ * Get cash-flow trends
2740
+ *
2741
+ * Monthly income / expense / netSavings over a fixed N-month window
2742
+ * (current month + N−1 prior). Missing months are zero-filled (flow metric).
2743
+ *
2744
+ * **Parameters:**
2745
+ * - `period`: 1m | 3m | 6m | 1y (default 6m)
2746
+ * - `granularity`: accepted for API symmetry; v1 returns month buckets
2747
+ *
2748
+ * @param data The data for the request.
2749
+ * @param data.region Region code for tenant context
2750
+ * @param data.period Time period
2751
+ * @param data.granularity Data granularity (accepted for API symmetry; v1 returns month buckets)
2752
+ * @returns CashFlowTrendsResponseDto Cash-flow trends retrieved successfully
2753
+ * @throws ApiError
2754
+ */
2755
+ public static reportingControllerGetCashFlowTrends(
2756
+ data: ReportingControllerGetCashFlowTrendsData
2757
+ ): CancelablePromise<ReportingControllerGetCashFlowTrendsResponse> {
2758
+ return __request(OpenAPI, {
2759
+ method: 'GET',
2760
+ url: '/api/v1/{region}/reporting/cash-flow/trends',
2761
+ path: {
2762
+ region: data.region
2763
+ },
2764
+ query: {
2765
+ period: data.period,
2766
+ granularity: data.granularity
2767
+ },
2768
+ errors: {
2769
+ 401: 'User not authenticated'
2770
+ }
2771
+ });
2772
+ }
2773
+
2774
+ /**
2775
+ * Generate portfolio snapshot
2776
+ *
2777
+ * Manually generate a portfolio snapshot for a specific date.
2778
+ *
2779
+ * **Multi-currency Support:**
2780
+ * - Fetches balances grouped by currency
2781
+ * - Uses user's baseCurrency setting for conversion
2782
+ * - Stores exchange rates and warnings
2783
+ *
2784
+ * **Use Cases:**
2785
+ * - Testing snapshot generation
2786
+ * - Force regeneration after data correction
2787
+ * - Initial setup for new users
2788
+ *
2789
+ * @param data The data for the request.
2790
+ * @param data.region Region code for tenant context
2791
+ * @param data.requestBody Optional date (defaults to today)
2792
+ * @returns GenerateSnapshotResponse Snapshot generated successfully
2793
+ * @throws ApiError
2794
+ */
2795
+ public static reportingControllerGenerateSnapshot(
2796
+ data: ReportingControllerGenerateSnapshotData
2797
+ ): CancelablePromise<ReportingControllerGenerateSnapshotResponse> {
2798
+ return __request(OpenAPI, {
2799
+ method: 'POST',
2800
+ url: '/api/v1/{region}/reporting/snapshots/generate',
2801
+ path: {
2802
+ region: data.region
2803
+ },
2804
+ body: data.requestBody,
2805
+ mediaType: 'application/json',
2806
+ errors: {
2807
+ 400: 'Invalid date format',
2808
+ 401: 'User not authenticated'
2809
+ }
2810
+ });
2811
+ }
2812
+
2813
+ /**
2814
+ * Backfill portfolio snapshots
2815
+ *
2816
+ * Generate snapshots for a date range (historical data backfill).
2817
+ *
2818
+ * **Multi-currency Support:**
2819
+ * - Each snapshot includes multi-currency data
2820
+ * - Uses exchange rates available at generation time
2821
+ * - Warnings stored for missing exchange rates
2822
+ *
2823
+ * **Best Practices:**
2824
+ * - Use for initial setup after account configuration
2825
+ * - Run during low-traffic periods for large date ranges
2826
+ * - Existing snapshots are skipped (not regenerated)
2827
+ *
2828
+ * @param data The data for the request.
2829
+ * @param data.region Region code for tenant context
2830
+ * @param data.requestBody
2831
+ * @returns BackfillSnapshotsResponse Backfill completed successfully
2832
+ * @throws ApiError
2833
+ */
2834
+ public static reportingControllerBackfillSnapshots(
2835
+ data: ReportingControllerBackfillSnapshotsData
2836
+ ): CancelablePromise<ReportingControllerBackfillSnapshotsResponse> {
2837
+ return __request(OpenAPI, {
2838
+ method: 'POST',
2839
+ url: '/api/v1/{region}/reporting/snapshots/backfill',
2840
+ path: {
2841
+ region: data.region
2842
+ },
2843
+ body: data.requestBody,
2844
+ mediaType: 'application/json',
2845
+ errors: {
2846
+ 400: 'Invalid date format or range',
2847
+ 401: 'User not authenticated',
2848
+ 409: 'Backfill already in progress for this user'
2849
+ }
2850
+ });
2851
+ }
2852
+ }
2853
+
2666
2854
  export class LifeEventsService {
2667
2855
  /**
2668
2856
  * Create a new life event
@@ -3538,7 +3726,7 @@ export class BeanPlatformsService {
3538
3726
 
3539
3727
  /**
3540
3728
  * Get platform list for current user
3541
- * @returns unknown List of platforms with user binding status
3729
+ * @returns PlatformListItemDto List of platforms with user binding status
3542
3730
  * @throws ApiError
3543
3731
  */
3544
3732
  public static platformControllerGetPlatformList(): CancelablePromise<PlatformControllerGetPlatformListResponse> {
@@ -3553,7 +3741,7 @@ export class BeanPlatformsService {
3553
3741
  * @param data The data for the request.
3554
3742
  * @param data.q Search query — Chinese name, English name, or abbreviation
3555
3743
  * @param data.region Region code for category override lookup
3556
- * @returns unknown List of matching platforms with suggested segment names
3744
+ * @returns PlatformMatchResponseDto Matching platforms with overall match type and truncation flag
3557
3745
  * @throws ApiError
3558
3746
  */
3559
3747
  public static platformControllerMatchPlatforms(
@@ -3771,163 +3959,6 @@ export class InvestmentService {
3771
3959
  }
3772
3960
  }
3773
3961
 
3774
- export class ReportingService {
3775
- /**
3776
- * Get portfolio value trends
3777
- *
3778
- * Returns time series data of portfolio net worth.
3779
- *
3780
- * **Multi-currency Support:**
3781
- * - `series[].byCurrency` - Currency breakdown for each data point
3782
- * - `byCurrency` - Separate time series grouped by currency
3783
- * - `warnings` - Exchange rate warnings if conversion failed
3784
- *
3785
- * **Parameters:**
3786
- * - `period`: Time period (1m, 3m, 6m, 1y)
3787
- * - `granularity`: Data granularity (day, week, month)
3788
- *
3789
- * @param data The data for the request.
3790
- * @param data.region Region code for tenant context
3791
- * @param data.period Time period
3792
- * @param data.granularity Data granularity
3793
- * @returns PortfolioTrendsResponseDto Trends retrieved successfully
3794
- * @throws ApiError
3795
- */
3796
- public static reportingControllerGetPortfolioTrends(
3797
- data: ReportingControllerGetPortfolioTrendsData
3798
- ): CancelablePromise<ReportingControllerGetPortfolioTrendsResponse> {
3799
- return __request(OpenAPI, {
3800
- method: 'GET',
3801
- url: '/api/v1/{region}/reporting/portfolio/trends',
3802
- path: {
3803
- region: data.region
3804
- },
3805
- query: {
3806
- period: data.period,
3807
- granularity: data.granularity
3808
- },
3809
- errors: {
3810
- 401: 'User not authenticated'
3811
- }
3812
- });
3813
- }
3814
-
3815
- /**
3816
- * Get cash-flow trends
3817
- *
3818
- * Monthly income / expense / netSavings over a fixed N-month window
3819
- * (current month + N−1 prior). Missing months are zero-filled (flow metric).
3820
- *
3821
- * **Parameters:**
3822
- * - `period`: 1m | 3m | 6m | 1y (default 6m)
3823
- * - `granularity`: accepted for API symmetry; v1 returns month buckets
3824
- *
3825
- * @param data The data for the request.
3826
- * @param data.region Region code for tenant context
3827
- * @param data.period Time period
3828
- * @param data.granularity Data granularity (accepted for API symmetry; v1 returns month buckets)
3829
- * @returns CashFlowTrendsResponseDto Cash-flow trends retrieved successfully
3830
- * @throws ApiError
3831
- */
3832
- public static reportingControllerGetCashFlowTrends(
3833
- data: ReportingControllerGetCashFlowTrendsData
3834
- ): CancelablePromise<ReportingControllerGetCashFlowTrendsResponse> {
3835
- return __request(OpenAPI, {
3836
- method: 'GET',
3837
- url: '/api/v1/{region}/reporting/cash-flow/trends',
3838
- path: {
3839
- region: data.region
3840
- },
3841
- query: {
3842
- period: data.period,
3843
- granularity: data.granularity
3844
- },
3845
- errors: {
3846
- 401: 'User not authenticated'
3847
- }
3848
- });
3849
- }
3850
-
3851
- /**
3852
- * Generate portfolio snapshot
3853
- *
3854
- * Manually generate a portfolio snapshot for a specific date.
3855
- *
3856
- * **Multi-currency Support:**
3857
- * - Fetches balances grouped by currency
3858
- * - Uses user's baseCurrency setting for conversion
3859
- * - Stores exchange rates and warnings
3860
- *
3861
- * **Use Cases:**
3862
- * - Testing snapshot generation
3863
- * - Force regeneration after data correction
3864
- * - Initial setup for new users
3865
- *
3866
- * @param data The data for the request.
3867
- * @param data.region Region code for tenant context
3868
- * @param data.requestBody Optional date (defaults to today)
3869
- * @returns GenerateSnapshotResponse Snapshot generated successfully
3870
- * @throws ApiError
3871
- */
3872
- public static reportingControllerGenerateSnapshot(
3873
- data: ReportingControllerGenerateSnapshotData
3874
- ): CancelablePromise<ReportingControllerGenerateSnapshotResponse> {
3875
- return __request(OpenAPI, {
3876
- method: 'POST',
3877
- url: '/api/v1/{region}/reporting/snapshots/generate',
3878
- path: {
3879
- region: data.region
3880
- },
3881
- body: data.requestBody,
3882
- mediaType: 'application/json',
3883
- errors: {
3884
- 400: 'Invalid date format',
3885
- 401: 'User not authenticated'
3886
- }
3887
- });
3888
- }
3889
-
3890
- /**
3891
- * Backfill portfolio snapshots
3892
- *
3893
- * Generate snapshots for a date range (historical data backfill).
3894
- *
3895
- * **Multi-currency Support:**
3896
- * - Each snapshot includes multi-currency data
3897
- * - Uses exchange rates available at generation time
3898
- * - Warnings stored for missing exchange rates
3899
- *
3900
- * **Best Practices:**
3901
- * - Use for initial setup after account configuration
3902
- * - Run during low-traffic periods for large date ranges
3903
- * - Existing snapshots are skipped (not regenerated)
3904
- *
3905
- * @param data The data for the request.
3906
- * @param data.region Region code for tenant context
3907
- * @param data.requestBody
3908
- * @returns BackfillSnapshotsResponse Backfill completed successfully
3909
- * @throws ApiError
3910
- */
3911
- public static reportingControllerBackfillSnapshots(
3912
- data: ReportingControllerBackfillSnapshotsData
3913
- ): CancelablePromise<ReportingControllerBackfillSnapshotsResponse> {
3914
- return __request(OpenAPI, {
3915
- method: 'POST',
3916
- url: '/api/v1/{region}/reporting/snapshots/backfill',
3917
- path: {
3918
- region: data.region
3919
- },
3920
- body: data.requestBody,
3921
- mediaType: 'application/json',
3922
- errors: {
3923
- 400: 'Invalid date format or range',
3924
- 401: 'User not authenticated',
3925
- 409: 'Backfill already in progress for this user'
3926
- }
3927
- });
3928
- }
3929
- }
3930
-
3931
3962
  export class ApiKeysService {
3932
3963
  /**
3933
3964
  * Create API key
@@ -3951,7 +3982,7 @@ export class AuthService {
3951
3982
  * Anonymous login with access token
3952
3983
  * @param data The data for the request.
3953
3984
  * @param data.requestBody
3954
- * @returns unknown Login successful
3985
+ * @returns AnonymousLoginResponseDto Login successful
3955
3986
  * @throws ApiError
3956
3987
  */
3957
3988
  public static authControllerAccessTokenLogin(