@firela/api-types 0.0.0-canary.a133ccd5 → 0.0.0-canary.a203bb6

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 matched against account path and user-set display name (case-insensitive)
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
  /**
@@ -667,9 +693,11 @@ var BeanTransactionsService = class {
667
693
  * @param data.offset Number of items to skip (default: 0)
668
694
  * @param data.dateFrom Filter by start date (inclusive), format: YYYY-MM-DD
669
695
  * @param data.dateTo Filter by end date (inclusive), format: YYYY-MM-DD
670
- * @param data.status Filter by transaction status
696
+ * @param data.status Filter by transaction status: single value, comma-separated multi-value (e.g. VOIDED,SUPERSEDED), or ALL to include audit rows. Defaults to ACTIVE-only (ADR-0128; previously unfiltered — breaking change).
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 account whose derived Group segment equals this value. Must be accompanied by flow (ADR-0126).
700
+ * @param data.flow Required when category is present (400 otherwise) and vice versa (ADR-0126). Restricts the category account set to the flow root (income → Income:, expense → Expenses:) and drives the per-leg sign normalization of row viewpointAmount and the summary. OpenAPI cannot express conditional requiredness — the pairing is enforced at runtime.
673
701
  * @returns TransactionListResponseDto Transaction list
674
702
  * @throws ApiError
675
703
  */
@@ -687,25 +715,119 @@ var BeanTransactionsService = class {
687
715
  dateTo: data.dateTo,
688
716
  status: data.status,
689
717
  search: data.search,
690
- accountId: data.accountId
718
+ accountId: data.accountId,
719
+ category: data.category,
720
+ flow: data.flow
691
721
  },
692
722
  errors: {
723
+ 400: "Validation failed",
693
724
  401: "Authentication required"
694
725
  }
695
726
  });
696
727
  }
697
728
  /**
729
+ * @deprecated
730
+ * Batch create transactions (DEPRECATED)
731
+ * DEPRECATED: Use POST /:region/bean/import/provider/:name/sync instead. This endpoint skips dedup, rule matching, and review branching.
698
732
  * @param data The data for the request.
699
733
  * @param data.region Region code for tenant context
700
- * @returns unknown
734
+ * @param data.requestBody
735
+ * @returns BatchTransactionResponseDto Transactions processed
701
736
  * @throws ApiError
702
737
  */
703
- static transactionController(data) {
738
+ static transactionControllerCreateBatch(data) {
704
739
  return request(OpenAPI, {
705
740
  method: "POST",
706
741
  url: "/api/v1/{region}/bean/transactions/batch",
707
742
  path: {
708
743
  region: data.region
744
+ },
745
+ body: data.requestBody,
746
+ mediaType: "application/json",
747
+ errors: {
748
+ 400: "Invalid input",
749
+ 401: "Authentication required"
750
+ }
751
+ });
752
+ }
753
+ /**
754
+ * Batch void transactions
755
+ * Soft-deletes (VOIDED) a batch of the caller's ACTIVE transactions in one DB transaction. Voiding releases each row's importId dedup slot, so re-importing the same file after an undo batch-void imports every row again instead of skipping them as duplicates.
756
+ * @param data The data for the request.
757
+ * @param data.region Region code for tenant context
758
+ * @param data.requestBody Batch void request (1-500 unique transaction IDs)
759
+ * @returns BatchVoidResultDto Batch void result: count of rows voided plus ids not found / no longer ACTIVE
760
+ * @throws ApiError
761
+ */
762
+ static transactionControllerBatchVoid(data) {
763
+ return request(OpenAPI, {
764
+ method: "POST",
765
+ url: "/api/v1/{region}/bean/transactions/batch-void",
766
+ path: {
767
+ region: data.region
768
+ },
769
+ body: data.requestBody,
770
+ mediaType: "application/json",
771
+ errors: {
772
+ 400: "Validation failed (empty, over 500, duplicate or non-string ids)",
773
+ 401: "Authentication required",
774
+ 403: "Batch contains ids owned by another user \u2014 whole request rejected, nothing committed"
775
+ }
776
+ });
777
+ }
778
+ /**
779
+ * Correct (supersede) a transaction
780
+ * Atomically voids the original (SUPERSEDED) and creates a replacement through the full validation pipeline.
781
+ * @param data The data for the request.
782
+ * @param data.id Original transaction ID to correct
783
+ * @param data.region Region code for tenant context
784
+ * @param data.requestBody
785
+ * @returns TransactionDetailDto Corrected transaction created
786
+ * @throws ApiError
787
+ */
788
+ static transactionControllerCorrect(data) {
789
+ return request(OpenAPI, {
790
+ method: "POST",
791
+ url: "/api/v1/{region}/bean/transactions/{id}/correct",
792
+ path: {
793
+ id: data.id,
794
+ region: data.region
795
+ },
796
+ body: data.requestBody,
797
+ mediaType: "application/json",
798
+ errors: {
799
+ 404: "Original transaction not found",
800
+ 409: "Original no longer ACTIVE (concurrent modification)",
801
+ 422: "Pipeline validation failed (does not balance, invalid accounts)"
802
+ }
803
+ });
804
+ }
805
+ /**
806
+ * Suggest transaction tags
807
+ * Returns distinct tags from the user ACTIVE transactions, sorted by usage, for autocomplete. Optional q performs a case-insensitive prefix match.
808
+ * @param data The data for the request.
809
+ * @param data.region Region code for tenant context
810
+ * @param data.q Prefix match, case-insensitive (max 50 chars)
811
+ * @param data.sort usage (default) or name
812
+ * @param data.limit Max suggestions (1-100, default 10)
813
+ * @returns TagSuggestionsResponseDto Tag suggestions
814
+ * @throws ApiError
815
+ */
816
+ static transactionControllerSuggestTags(data) {
817
+ return request(OpenAPI, {
818
+ method: "GET",
819
+ url: "/api/v1/{region}/bean/transactions/tags",
820
+ path: {
821
+ region: data.region
822
+ },
823
+ query: {
824
+ q: data.q,
825
+ sort: data.sort,
826
+ limit: data.limit
827
+ },
828
+ errors: {
829
+ 400: "Validation failed",
830
+ 401: "Authentication required"
709
831
  }
710
832
  });
711
833
  }
@@ -760,17 +882,26 @@ var BeanTransactionsService = class {
760
882
  });
761
883
  }
762
884
  /**
885
+ * Void transaction
886
+ * Soft-deletes a transaction by marking it as VOIDED
763
887
  * @param data The data for the request.
888
+ * @param data.id Transaction ID
764
889
  * @param data.region Region code for tenant context
765
- * @returns void
890
+ * @returns void Transaction voided successfully
766
891
  * @throws ApiError
767
892
  */
768
- static transactionController1(data) {
893
+ static transactionControllerDelete(data) {
769
894
  return request(OpenAPI, {
770
895
  method: "DELETE",
771
896
  url: "/api/v1/{region}/bean/transactions/{id}",
772
897
  path: {
898
+ id: data.id,
773
899
  region: data.region
900
+ },
901
+ errors: {
902
+ 400: "Transaction already voided",
903
+ 401: "Authentication required",
904
+ 404: "Transaction not found"
774
905
  }
775
906
  });
776
907
  }
@@ -780,7 +911,8 @@ var BeanBalancesService = class {
780
911
  * Query account balance
781
912
  * Calculate account balance at a specific date for a single currency
782
913
  * @param data The data for the request.
783
- * @param data.account Account name (e.g., "Assets:Bank:Checking")
914
+ * @param data.account Account name (e.g., "Assets:Checking")
915
+ * @param data.region Region code for tenant context
784
916
  * @param data.date Date to calculate balance at (ISO 8601 format)
785
917
  * @param data.currency Currency to query (e.g., "USD", "CNY")
786
918
  * @returns BalanceResponseDto Balance calculated successfully
@@ -790,6 +922,9 @@ var BeanBalancesService = class {
790
922
  return request(OpenAPI, {
791
923
  method: "GET",
792
924
  url: "/api/v1/{region}/bean/balances",
925
+ path: {
926
+ region: data.region
927
+ },
793
928
  query: {
794
929
  account: data.account,
795
930
  date: data.date,
@@ -804,13 +939,18 @@ var BeanBalancesService = class {
804
939
  /**
805
940
  * Query multi-currency account balance
806
941
  * Calculate account balances for all currencies at a specific date
942
+ * @param data The data for the request.
943
+ * @param data.region Region code for tenant context
807
944
  * @returns MultiCurrencyBalanceResponseDto Balances calculated successfully
808
945
  * @throws ApiError
809
946
  */
810
- static balanceControllerGetMultiCurrencyBalance() {
947
+ static balanceControllerGetMultiCurrencyBalance(data) {
811
948
  return request(OpenAPI, {
812
949
  method: "GET",
813
950
  url: "/api/v1/{region}/bean/balances/multi-currency",
951
+ path: {
952
+ region: data.region
953
+ },
814
954
  errors: {
815
955
  400: "Invalid query parameters",
816
956
  401: "User not authenticated"
@@ -820,17 +960,26 @@ var BeanBalancesService = class {
820
960
  };
821
961
  var BeanCommoditiesService = class {
822
962
  /**
963
+ * Create a new commodity
964
+ * Creates a new commodity definition for the authenticated user
823
965
  * @param data The data for the request.
824
966
  * @param data.region Region code for tenant context
825
- * @returns unknown
967
+ * @param data.requestBody
968
+ * @returns CommodityResponseDto Commodity created successfully
826
969
  * @throws ApiError
827
970
  */
828
- static commodityController(data) {
971
+ static commodityControllerCreate(data) {
829
972
  return request(OpenAPI, {
830
973
  method: "POST",
831
974
  url: "/api/v1/{region}/bean/commodities",
832
975
  path: {
833
976
  region: data.region
977
+ },
978
+ body: data.requestBody,
979
+ mediaType: "application/json",
980
+ errors: {
981
+ 400: "Invalid input data",
982
+ 409: "Commodity already exists"
834
983
  }
835
984
  });
836
985
  }
@@ -880,57 +1029,81 @@ var BeanCommoditiesService = class {
880
1029
  });
881
1030
  }
882
1031
  /**
1032
+ * Update commodity
1033
+ * Updates an existing commodity definition. Symbol cannot be changed.
883
1034
  * @param data The data for the request.
1035
+ * @param data.symbol Commodity symbol
884
1036
  * @param data.region Region code for tenant context
885
- * @returns unknown
1037
+ * @param data.requestBody
1038
+ * @returns CommodityResponseDto Commodity updated successfully
886
1039
  * @throws ApiError
887
1040
  */
888
- static commodityController1(data) {
1041
+ static commodityControllerUpdate(data) {
889
1042
  return request(OpenAPI, {
890
1043
  method: "PUT",
891
1044
  url: "/api/v1/{region}/bean/commodities/{symbol}",
892
1045
  path: {
1046
+ symbol: data.symbol,
893
1047
  region: data.region
1048
+ },
1049
+ body: data.requestBody,
1050
+ mediaType: "application/json",
1051
+ errors: {
1052
+ 400: "Invalid input data",
1053
+ 404: "Commodity not found"
894
1054
  }
895
1055
  });
896
1056
  }
897
1057
  /**
1058
+ * Delete commodity
1059
+ * Deletes a commodity definition
898
1060
  * @param data The data for the request.
1061
+ * @param data.symbol Commodity symbol
899
1062
  * @param data.region Region code for tenant context
900
- * @returns void
1063
+ * @returns void Commodity deleted successfully
901
1064
  * @throws ApiError
902
1065
  */
903
- static commodityController2(data) {
1066
+ static commodityControllerDelete(data) {
904
1067
  return request(OpenAPI, {
905
1068
  method: "DELETE",
906
1069
  url: "/api/v1/{region}/bean/commodities/{symbol}",
907
1070
  path: {
1071
+ symbol: data.symbol,
908
1072
  region: data.region
1073
+ },
1074
+ errors: {
1075
+ 404: "Commodity not found"
909
1076
  }
910
1077
  });
911
1078
  }
912
1079
  /**
1080
+ * Ensure commodity exists
1081
+ * Gets existing commodity or creates it with automatic initialization from OpenBB
913
1082
  * @param data The data for the request.
1083
+ * @param data.symbol Commodity symbol
914
1084
  * @param data.region Region code for tenant context
915
- * @returns unknown
1085
+ * @returns CommodityResponseDto Commodity retrieved or created
916
1086
  * @throws ApiError
917
1087
  */
918
- static commodityController3(data) {
1088
+ static commodityControllerGetOrCreate(data) {
919
1089
  return request(OpenAPI, {
920
1090
  method: "POST",
921
1091
  url: "/api/v1/{region}/bean/commodities/{symbol}/ensure",
922
1092
  path: {
1093
+ symbol: data.symbol,
923
1094
  region: data.region
924
1095
  }
925
1096
  });
926
1097
  }
927
1098
  /**
1099
+ * Bulk create commodities
1100
+ * Creates multiple commodities from a list of symbols, useful for initialization
928
1101
  * @param data The data for the request.
929
1102
  * @param data.region Region code for tenant context
930
- * @returns unknown
1103
+ * @returns CommodityResponseDto Commodities created successfully
931
1104
  * @throws ApiError
932
1105
  */
933
- static commodityController4(data) {
1106
+ static commodityControllerBulkCreate(data) {
934
1107
  return request(OpenAPI, {
935
1108
  method: "POST",
936
1109
  url: "/api/v1/{region}/bean/commodities/bulk",
@@ -966,7 +1139,7 @@ var ProviderSyncService = class {
966
1139
  *
967
1140
  * @param data The data for the request.
968
1141
  * @param data.providerName Provider name
969
- * @param data.region Region code
1142
+ * @param data.region Region code for tenant context
970
1143
  * @param data.requestBody
971
1144
  * @returns ProviderSyncResponseDto Sync completed successfully
972
1145
  * @throws ApiError
@@ -991,13 +1164,18 @@ var ProviderSyncService = class {
991
1164
  /**
992
1165
  * Get supported providers
993
1166
  * Returns a list of all providers supported by the sync endpoint.
1167
+ * @param data The data for the request.
1168
+ * @param data.region Region code for tenant context
994
1169
  * @returns SupportedProvidersResponseDto List of supported providers
995
1170
  * @throws ApiError
996
1171
  */
997
- static providerSyncControllerGetSupportedProviders() {
1172
+ static providerSyncControllerGetSupportedProviders(data) {
998
1173
  return request(OpenAPI, {
999
1174
  method: "GET",
1000
1175
  url: "/api/v1/{region}/bean/import/provider/supported",
1176
+ path: {
1177
+ region: data.region
1178
+ },
1001
1179
  errors: {
1002
1180
  401: "Missing or invalid authentication"
1003
1181
  }
@@ -1008,6 +1186,7 @@ var ProviderSyncService = class {
1008
1186
  * Returns whether a specific provider is supported.
1009
1187
  * @param data The data for the request.
1010
1188
  * @param data.providerName Provider name to check
1189
+ * @param data.region Region code for tenant context
1011
1190
  * @returns unknown Provider support status
1012
1191
  * @throws ApiError
1013
1192
  */
@@ -1016,7 +1195,8 @@ var ProviderSyncService = class {
1016
1195
  method: "GET",
1017
1196
  url: "/api/v1/{region}/bean/import/provider/{providerName}/supported",
1018
1197
  path: {
1019
- providerName: data.providerName
1198
+ providerName: data.providerName,
1199
+ region: data.region
1020
1200
  },
1021
1201
  errors: {
1022
1202
  401: "Missing or invalid authentication"
@@ -1053,6 +1233,20 @@ var HealthService = class {
1053
1233
  }
1054
1234
  });
1055
1235
  }
1236
+ /**
1237
+ * Check OpenBB schema status
1238
+ * @returns unknown OpenBB status
1239
+ * @throws ApiError
1240
+ */
1241
+ static healthControllerCheckOpenBb() {
1242
+ return request(OpenAPI, {
1243
+ method: "GET",
1244
+ url: "/api/v1/health/openbb",
1245
+ errors: {
1246
+ 503: "OpenBB unavailable"
1247
+ }
1248
+ });
1249
+ }
1056
1250
  /**
1057
1251
  * Check Redis connection health
1058
1252
  * @returns unknown Redis is healthy
@@ -1116,62 +1310,6 @@ var HealthService = class {
1116
1310
  }
1117
1311
  });
1118
1312
  }
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
1313
  };
1176
1314
  // Annotate the CommonJS export names for ESM import in node:
1177
1315
  0 && (module.exports = {