@firela/api-types 0.0.0-canary.7cd70834 → 0.0.0-canary.7f2ecc16

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.js CHANGED
@@ -484,7 +484,7 @@ var BeanAccountsService = class {
484
484
  * @param data.type Filter by account type
485
485
  * @param data.status Filter by status
486
486
  * @param data.isCustom Filter by custom (user-created) accounts only
487
- * @param data.search Search term for path or i18nKey
487
+ * @param data.search Search term for account path
488
488
  * @param data.limit Maximum number of results
489
489
  * @param data.offset Number of results to skip
490
490
  * @returns AccountListResponseDto Accounts retrieved successfully
@@ -556,7 +556,7 @@ var BeanAccountsService = class {
556
556
  }
557
557
  /**
558
558
  * Delete account
559
- * Deletes an account (only if no transactions)
559
+ * Deletes an account (only if no active transactions; voided/superseded residual postings are cleaned up)
560
560
  * @param data The data for the request.
561
561
  * @param data.id Account UUID
562
562
  * @param data.region Region code for tenant context
@@ -573,7 +573,7 @@ var BeanAccountsService = class {
573
573
  },
574
574
  errors: {
575
575
  404: "Account not found",
576
- 409: "Account has transactions and cannot be deleted"
576
+ 409: "Account has active transactions and cannot be deleted"
577
577
  }
578
578
  });
579
579
  }
@@ -629,6 +629,32 @@ var BeanAccountsService = class {
629
629
  }
630
630
  });
631
631
  }
632
+ /**
633
+ * Post an opening-balance transaction
634
+ * 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.
635
+ * @param data The data for the request.
636
+ * @param data.id Account UUID
637
+ * @param data.region Region code for tenant context
638
+ * @param data.requestBody
639
+ * @returns OpeningBalanceResultDto Opening-balance transaction created
640
+ * @throws ApiError
641
+ */
642
+ static accountControllerAddOpeningBalance(data) {
643
+ return request(OpenAPI, {
644
+ method: "POST",
645
+ url: "/api/v1/{region}/bean/accounts/{id}/opening-balance",
646
+ path: {
647
+ id: data.id,
648
+ region: data.region
649
+ },
650
+ body: data.requestBody,
651
+ mediaType: "application/json",
652
+ errors: {
653
+ 404: "Account not found",
654
+ 409: "An opening balance already exists for this account"
655
+ }
656
+ });
657
+ }
632
658
  };
633
659
  var BeanTransactionsService = class {
634
660
  /**
@@ -670,6 +696,7 @@ var BeanTransactionsService = class {
670
696
  * @param data.status Filter by transaction status
671
697
  * @param data.search Search in narration and payee fields (max 200 chars)
672
698
  * @param data.accountId Filter by account ID (transactions with postings to this account)
699
+ * @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
673
700
  * @returns TransactionListResponseDto Transaction list
674
701
  * @throws ApiError
675
702
  */
@@ -687,25 +714,93 @@ var BeanTransactionsService = class {
687
714
  dateTo: data.dateTo,
688
715
  status: data.status,
689
716
  search: data.search,
690
- accountId: data.accountId
717
+ accountId: data.accountId,
718
+ category: data.category
691
719
  },
692
720
  errors: {
721
+ 400: "Validation failed",
693
722
  401: "Authentication required"
694
723
  }
695
724
  });
696
725
  }
697
726
  /**
727
+ * @deprecated
728
+ * Batch create transactions (DEPRECATED)
729
+ * DEPRECATED: Use POST /:region/bean/import/provider/:name/sync instead. This endpoint skips dedup, rule matching, and review branching.
698
730
  * @param data The data for the request.
699
731
  * @param data.region Region code for tenant context
700
- * @returns unknown
732
+ * @param data.requestBody
733
+ * @returns BatchTransactionResponseDto Transactions processed
701
734
  * @throws ApiError
702
735
  */
703
- static transactionController(data) {
736
+ static transactionControllerCreateBatch(data) {
704
737
  return request(OpenAPI, {
705
738
  method: "POST",
706
739
  url: "/api/v1/{region}/bean/transactions/batch",
707
740
  path: {
708
741
  region: data.region
742
+ },
743
+ body: data.requestBody,
744
+ mediaType: "application/json",
745
+ errors: {
746
+ 400: "Invalid input",
747
+ 401: "Authentication required"
748
+ }
749
+ });
750
+ }
751
+ /**
752
+ * Correct (supersede) a transaction
753
+ * Atomically voids the original (SUPERSEDED) and creates a replacement through the full validation pipeline.
754
+ * @param data The data for the request.
755
+ * @param data.id Original transaction ID to correct
756
+ * @param data.region Region code for tenant context
757
+ * @param data.requestBody
758
+ * @returns TransactionDetailDto Corrected transaction created
759
+ * @throws ApiError
760
+ */
761
+ static transactionControllerCorrect(data) {
762
+ return request(OpenAPI, {
763
+ method: "POST",
764
+ url: "/api/v1/{region}/bean/transactions/{id}/correct",
765
+ path: {
766
+ id: data.id,
767
+ region: data.region
768
+ },
769
+ body: data.requestBody,
770
+ mediaType: "application/json",
771
+ errors: {
772
+ 404: "Original transaction not found",
773
+ 409: "Original no longer ACTIVE (concurrent modification)",
774
+ 422: "Pipeline validation failed (does not balance, invalid accounts)"
775
+ }
776
+ });
777
+ }
778
+ /**
779
+ * Suggest transaction tags
780
+ * Returns distinct tags from the user ACTIVE transactions, sorted by usage, for autocomplete. Optional q performs a case-insensitive prefix match.
781
+ * @param data The data for the request.
782
+ * @param data.region Region code for tenant context
783
+ * @param data.q Prefix match, case-insensitive (max 50 chars)
784
+ * @param data.sort usage (default) or name
785
+ * @param data.limit Max suggestions (1-100, default 10)
786
+ * @returns TagSuggestionsResponseDto Tag suggestions
787
+ * @throws ApiError
788
+ */
789
+ static transactionControllerSuggestTags(data) {
790
+ return request(OpenAPI, {
791
+ method: "GET",
792
+ url: "/api/v1/{region}/bean/transactions/tags",
793
+ path: {
794
+ region: data.region
795
+ },
796
+ query: {
797
+ q: data.q,
798
+ sort: data.sort,
799
+ limit: data.limit
800
+ },
801
+ errors: {
802
+ 400: "Validation failed",
803
+ 401: "Authentication required"
709
804
  }
710
805
  });
711
806
  }
@@ -760,17 +855,26 @@ var BeanTransactionsService = class {
760
855
  });
761
856
  }
762
857
  /**
858
+ * Void transaction
859
+ * Soft-deletes a transaction by marking it as VOIDED
763
860
  * @param data The data for the request.
861
+ * @param data.id Transaction ID
764
862
  * @param data.region Region code for tenant context
765
- * @returns void
863
+ * @returns void Transaction voided successfully
766
864
  * @throws ApiError
767
865
  */
768
- static transactionController1(data) {
866
+ static transactionControllerDelete(data) {
769
867
  return request(OpenAPI, {
770
868
  method: "DELETE",
771
869
  url: "/api/v1/{region}/bean/transactions/{id}",
772
870
  path: {
871
+ id: data.id,
773
872
  region: data.region
873
+ },
874
+ errors: {
875
+ 400: "Transaction already voided",
876
+ 401: "Authentication required",
877
+ 404: "Transaction not found"
774
878
  }
775
879
  });
776
880
  }
@@ -780,7 +884,8 @@ var BeanBalancesService = class {
780
884
  * Query account balance
781
885
  * Calculate account balance at a specific date for a single currency
782
886
  * @param data The data for the request.
783
- * @param data.account Account name (e.g., "Assets:Bank:Checking")
887
+ * @param data.account Account name (e.g., "Assets:Checking")
888
+ * @param data.region Region code for tenant context
784
889
  * @param data.date Date to calculate balance at (ISO 8601 format)
785
890
  * @param data.currency Currency to query (e.g., "USD", "CNY")
786
891
  * @returns BalanceResponseDto Balance calculated successfully
@@ -790,6 +895,9 @@ var BeanBalancesService = class {
790
895
  return request(OpenAPI, {
791
896
  method: "GET",
792
897
  url: "/api/v1/{region}/bean/balances",
898
+ path: {
899
+ region: data.region
900
+ },
793
901
  query: {
794
902
  account: data.account,
795
903
  date: data.date,
@@ -804,13 +912,18 @@ var BeanBalancesService = class {
804
912
  /**
805
913
  * Query multi-currency account balance
806
914
  * Calculate account balances for all currencies at a specific date
915
+ * @param data The data for the request.
916
+ * @param data.region Region code for tenant context
807
917
  * @returns MultiCurrencyBalanceResponseDto Balances calculated successfully
808
918
  * @throws ApiError
809
919
  */
810
- static balanceControllerGetMultiCurrencyBalance() {
920
+ static balanceControllerGetMultiCurrencyBalance(data) {
811
921
  return request(OpenAPI, {
812
922
  method: "GET",
813
923
  url: "/api/v1/{region}/bean/balances/multi-currency",
924
+ path: {
925
+ region: data.region
926
+ },
814
927
  errors: {
815
928
  400: "Invalid query parameters",
816
929
  401: "User not authenticated"
@@ -820,17 +933,26 @@ var BeanBalancesService = class {
820
933
  };
821
934
  var BeanCommoditiesService = class {
822
935
  /**
936
+ * Create a new commodity
937
+ * Creates a new commodity definition for the authenticated user
823
938
  * @param data The data for the request.
824
939
  * @param data.region Region code for tenant context
825
- * @returns unknown
940
+ * @param data.requestBody
941
+ * @returns CommodityResponseDto Commodity created successfully
826
942
  * @throws ApiError
827
943
  */
828
- static commodityController(data) {
944
+ static commodityControllerCreate(data) {
829
945
  return request(OpenAPI, {
830
946
  method: "POST",
831
947
  url: "/api/v1/{region}/bean/commodities",
832
948
  path: {
833
949
  region: data.region
950
+ },
951
+ body: data.requestBody,
952
+ mediaType: "application/json",
953
+ errors: {
954
+ 400: "Invalid input data",
955
+ 409: "Commodity already exists"
834
956
  }
835
957
  });
836
958
  }
@@ -880,57 +1002,81 @@ var BeanCommoditiesService = class {
880
1002
  });
881
1003
  }
882
1004
  /**
1005
+ * Update commodity
1006
+ * Updates an existing commodity definition. Symbol cannot be changed.
883
1007
  * @param data The data for the request.
1008
+ * @param data.symbol Commodity symbol
884
1009
  * @param data.region Region code for tenant context
885
- * @returns unknown
1010
+ * @param data.requestBody
1011
+ * @returns CommodityResponseDto Commodity updated successfully
886
1012
  * @throws ApiError
887
1013
  */
888
- static commodityController1(data) {
1014
+ static commodityControllerUpdate(data) {
889
1015
  return request(OpenAPI, {
890
1016
  method: "PUT",
891
1017
  url: "/api/v1/{region}/bean/commodities/{symbol}",
892
1018
  path: {
1019
+ symbol: data.symbol,
893
1020
  region: data.region
1021
+ },
1022
+ body: data.requestBody,
1023
+ mediaType: "application/json",
1024
+ errors: {
1025
+ 400: "Invalid input data",
1026
+ 404: "Commodity not found"
894
1027
  }
895
1028
  });
896
1029
  }
897
1030
  /**
1031
+ * Delete commodity
1032
+ * Deletes a commodity definition
898
1033
  * @param data The data for the request.
1034
+ * @param data.symbol Commodity symbol
899
1035
  * @param data.region Region code for tenant context
900
- * @returns void
1036
+ * @returns void Commodity deleted successfully
901
1037
  * @throws ApiError
902
1038
  */
903
- static commodityController2(data) {
1039
+ static commodityControllerDelete(data) {
904
1040
  return request(OpenAPI, {
905
1041
  method: "DELETE",
906
1042
  url: "/api/v1/{region}/bean/commodities/{symbol}",
907
1043
  path: {
1044
+ symbol: data.symbol,
908
1045
  region: data.region
1046
+ },
1047
+ errors: {
1048
+ 404: "Commodity not found"
909
1049
  }
910
1050
  });
911
1051
  }
912
1052
  /**
1053
+ * Ensure commodity exists
1054
+ * Gets existing commodity or creates it with automatic initialization from OpenBB
913
1055
  * @param data The data for the request.
1056
+ * @param data.symbol Commodity symbol
914
1057
  * @param data.region Region code for tenant context
915
- * @returns unknown
1058
+ * @returns CommodityResponseDto Commodity retrieved or created
916
1059
  * @throws ApiError
917
1060
  */
918
- static commodityController3(data) {
1061
+ static commodityControllerGetOrCreate(data) {
919
1062
  return request(OpenAPI, {
920
1063
  method: "POST",
921
1064
  url: "/api/v1/{region}/bean/commodities/{symbol}/ensure",
922
1065
  path: {
1066
+ symbol: data.symbol,
923
1067
  region: data.region
924
1068
  }
925
1069
  });
926
1070
  }
927
1071
  /**
1072
+ * Bulk create commodities
1073
+ * Creates multiple commodities from a list of symbols, useful for initialization
928
1074
  * @param data The data for the request.
929
1075
  * @param data.region Region code for tenant context
930
- * @returns unknown
1076
+ * @returns CommodityResponseDto Commodities created successfully
931
1077
  * @throws ApiError
932
1078
  */
933
- static commodityController4(data) {
1079
+ static commodityControllerBulkCreate(data) {
934
1080
  return request(OpenAPI, {
935
1081
  method: "POST",
936
1082
  url: "/api/v1/{region}/bean/commodities/bulk",
@@ -966,7 +1112,7 @@ var ProviderSyncService = class {
966
1112
  *
967
1113
  * @param data The data for the request.
968
1114
  * @param data.providerName Provider name
969
- * @param data.region Region code
1115
+ * @param data.region Region code for tenant context
970
1116
  * @param data.requestBody
971
1117
  * @returns ProviderSyncResponseDto Sync completed successfully
972
1118
  * @throws ApiError
@@ -991,13 +1137,18 @@ var ProviderSyncService = class {
991
1137
  /**
992
1138
  * Get supported providers
993
1139
  * Returns a list of all providers supported by the sync endpoint.
1140
+ * @param data The data for the request.
1141
+ * @param data.region Region code for tenant context
994
1142
  * @returns SupportedProvidersResponseDto List of supported providers
995
1143
  * @throws ApiError
996
1144
  */
997
- static providerSyncControllerGetSupportedProviders() {
1145
+ static providerSyncControllerGetSupportedProviders(data) {
998
1146
  return request(OpenAPI, {
999
1147
  method: "GET",
1000
1148
  url: "/api/v1/{region}/bean/import/provider/supported",
1149
+ path: {
1150
+ region: data.region
1151
+ },
1001
1152
  errors: {
1002
1153
  401: "Missing or invalid authentication"
1003
1154
  }
@@ -1008,6 +1159,7 @@ var ProviderSyncService = class {
1008
1159
  * Returns whether a specific provider is supported.
1009
1160
  * @param data The data for the request.
1010
1161
  * @param data.providerName Provider name to check
1162
+ * @param data.region Region code for tenant context
1011
1163
  * @returns unknown Provider support status
1012
1164
  * @throws ApiError
1013
1165
  */
@@ -1016,7 +1168,8 @@ var ProviderSyncService = class {
1016
1168
  method: "GET",
1017
1169
  url: "/api/v1/{region}/bean/import/provider/{providerName}/supported",
1018
1170
  path: {
1019
- providerName: data.providerName
1171
+ providerName: data.providerName,
1172
+ region: data.region
1020
1173
  },
1021
1174
  errors: {
1022
1175
  401: "Missing or invalid authentication"
@@ -1053,6 +1206,20 @@ var HealthService = class {
1053
1206
  }
1054
1207
  });
1055
1208
  }
1209
+ /**
1210
+ * Check OpenBB schema status
1211
+ * @returns unknown OpenBB status
1212
+ * @throws ApiError
1213
+ */
1214
+ static healthControllerCheckOpenBb() {
1215
+ return request(OpenAPI, {
1216
+ method: "GET",
1217
+ url: "/api/v1/health/openbb",
1218
+ errors: {
1219
+ 503: "OpenBB unavailable"
1220
+ }
1221
+ });
1222
+ }
1056
1223
  /**
1057
1224
  * Check Redis connection health
1058
1225
  * @returns unknown Redis is healthy
@@ -1116,62 +1283,6 @@ var HealthService = class {
1116
1283
  }
1117
1284
  });
1118
1285
  }
1119
- /**
1120
- * Check health of a specific data enhancer
1121
- * @param data The data for the request.
1122
- * @param data.name Data enhancer name
1123
- * @returns unknown Data enhancer is healthy
1124
- * @throws ApiError
1125
- */
1126
- static healthControllerGetHealthOfDataEnhancer(data) {
1127
- return request(OpenAPI, {
1128
- method: "GET",
1129
- url: "/api/v1/health/data-enhancer/{name}",
1130
- path: {
1131
- name: data.name
1132
- },
1133
- errors: {
1134
- 401: "Unauthorized",
1135
- 503: "Data enhancer unavailable"
1136
- }
1137
- });
1138
- }
1139
- /**
1140
- * Check health of all data providers
1141
- * @returns unknown Data providers health status
1142
- * @throws ApiError
1143
- */
1144
- static healthControllerCheckDataProviders() {
1145
- return request(OpenAPI, {
1146
- method: "GET",
1147
- url: "/api/v1/health/data-providers",
1148
- errors: {
1149
- 401: "Unauthorized",
1150
- 503: "Data providers check failed"
1151
- }
1152
- });
1153
- }
1154
- /**
1155
- * Check health of a specific data provider
1156
- * @param data The data for the request.
1157
- * @param data.dataSource Data source identifier
1158
- * @returns unknown Data provider is healthy
1159
- * @throws ApiError
1160
- */
1161
- static healthControllerGetHealthOfDataProvider(data) {
1162
- return request(OpenAPI, {
1163
- method: "GET",
1164
- url: "/api/v1/health/data-provider/{dataSource}",
1165
- path: {
1166
- dataSource: data.dataSource
1167
- },
1168
- errors: {
1169
- 400: "Invalid data source",
1170
- 401: "Unauthorized",
1171
- 503: "Data provider unavailable"
1172
- }
1173
- });
1174
- }
1175
1286
  };
1176
1287
  // Annotate the CommonJS export names for ESM import in node:
1177
1288
  0 && (module.exports = {