@firela/api-types 0.0.0-canary.a3c2cb48 → 0.0.0-canary.a4e21680
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.d.mts +3732 -972
- package/dist/index.d.ts +3732 -972
- package/dist/index.js +160 -75
- package/dist/index.mjs +160 -75
- package/package.json +2 -3
- package/src/generated/schemas.gen.ts +3333 -505
- package/src/generated/services.gen.ts +1644 -617
- package/src/generated/types.gen.ts +5368 -2359
package/dist/index.mjs
CHANGED
|
@@ -638,6 +638,7 @@ var BeanTransactionsService = class {
|
|
|
638
638
|
* @param data.status Filter by transaction status
|
|
639
639
|
* @param data.search Search in narration and payee fields (max 200 chars)
|
|
640
640
|
* @param data.accountId Filter by account ID (transactions with postings to this account)
|
|
641
|
+
* @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
|
|
641
642
|
* @returns TransactionListResponseDto Transaction list
|
|
642
643
|
* @throws ApiError
|
|
643
644
|
*/
|
|
@@ -655,25 +656,93 @@ var BeanTransactionsService = class {
|
|
|
655
656
|
dateTo: data.dateTo,
|
|
656
657
|
status: data.status,
|
|
657
658
|
search: data.search,
|
|
658
|
-
accountId: data.accountId
|
|
659
|
+
accountId: data.accountId,
|
|
660
|
+
category: data.category
|
|
659
661
|
},
|
|
660
662
|
errors: {
|
|
663
|
+
400: "Validation failed",
|
|
661
664
|
401: "Authentication required"
|
|
662
665
|
}
|
|
663
666
|
});
|
|
664
667
|
}
|
|
665
668
|
/**
|
|
669
|
+
* @deprecated
|
|
670
|
+
* Batch create transactions (DEPRECATED)
|
|
671
|
+
* DEPRECATED: Use POST /:region/bean/import/provider/:name/sync instead. This endpoint skips dedup, rule matching, and review branching.
|
|
666
672
|
* @param data The data for the request.
|
|
667
673
|
* @param data.region Region code for tenant context
|
|
668
|
-
* @
|
|
674
|
+
* @param data.requestBody
|
|
675
|
+
* @returns BatchTransactionResponseDto Transactions processed
|
|
669
676
|
* @throws ApiError
|
|
670
677
|
*/
|
|
671
|
-
static
|
|
678
|
+
static transactionControllerCreateBatch(data) {
|
|
672
679
|
return request(OpenAPI, {
|
|
673
680
|
method: "POST",
|
|
674
681
|
url: "/api/v1/{region}/bean/transactions/batch",
|
|
675
682
|
path: {
|
|
676
683
|
region: data.region
|
|
684
|
+
},
|
|
685
|
+
body: data.requestBody,
|
|
686
|
+
mediaType: "application/json",
|
|
687
|
+
errors: {
|
|
688
|
+
400: "Invalid input",
|
|
689
|
+
401: "Authentication required"
|
|
690
|
+
}
|
|
691
|
+
});
|
|
692
|
+
}
|
|
693
|
+
/**
|
|
694
|
+
* Correct (supersede) a transaction
|
|
695
|
+
* Atomically voids the original (SUPERSEDED) and creates a replacement through the full validation pipeline.
|
|
696
|
+
* @param data The data for the request.
|
|
697
|
+
* @param data.id Original transaction ID to correct
|
|
698
|
+
* @param data.region Region code for tenant context
|
|
699
|
+
* @param data.requestBody
|
|
700
|
+
* @returns TransactionDetailDto Corrected transaction created
|
|
701
|
+
* @throws ApiError
|
|
702
|
+
*/
|
|
703
|
+
static transactionControllerCorrect(data) {
|
|
704
|
+
return request(OpenAPI, {
|
|
705
|
+
method: "POST",
|
|
706
|
+
url: "/api/v1/{region}/bean/transactions/{id}/correct",
|
|
707
|
+
path: {
|
|
708
|
+
id: data.id,
|
|
709
|
+
region: data.region
|
|
710
|
+
},
|
|
711
|
+
body: data.requestBody,
|
|
712
|
+
mediaType: "application/json",
|
|
713
|
+
errors: {
|
|
714
|
+
404: "Original transaction not found",
|
|
715
|
+
409: "Original no longer ACTIVE (concurrent modification)",
|
|
716
|
+
422: "Pipeline validation failed (does not balance, invalid accounts)"
|
|
717
|
+
}
|
|
718
|
+
});
|
|
719
|
+
}
|
|
720
|
+
/**
|
|
721
|
+
* Suggest transaction tags
|
|
722
|
+
* Returns distinct tags from the user ACTIVE transactions, sorted by usage, for autocomplete. Optional q performs a case-insensitive prefix match.
|
|
723
|
+
* @param data The data for the request.
|
|
724
|
+
* @param data.region Region code for tenant context
|
|
725
|
+
* @param data.q Prefix match, case-insensitive (max 50 chars)
|
|
726
|
+
* @param data.sort usage (default) or name
|
|
727
|
+
* @param data.limit Max suggestions (1-100, default 10)
|
|
728
|
+
* @returns TagSuggestionsResponseDto Tag suggestions
|
|
729
|
+
* @throws ApiError
|
|
730
|
+
*/
|
|
731
|
+
static transactionControllerSuggestTags(data) {
|
|
732
|
+
return request(OpenAPI, {
|
|
733
|
+
method: "GET",
|
|
734
|
+
url: "/api/v1/{region}/bean/transactions/tags",
|
|
735
|
+
path: {
|
|
736
|
+
region: data.region
|
|
737
|
+
},
|
|
738
|
+
query: {
|
|
739
|
+
q: data.q,
|
|
740
|
+
sort: data.sort,
|
|
741
|
+
limit: data.limit
|
|
742
|
+
},
|
|
743
|
+
errors: {
|
|
744
|
+
400: "Validation failed",
|
|
745
|
+
401: "Authentication required"
|
|
677
746
|
}
|
|
678
747
|
});
|
|
679
748
|
}
|
|
@@ -728,17 +797,26 @@ var BeanTransactionsService = class {
|
|
|
728
797
|
});
|
|
729
798
|
}
|
|
730
799
|
/**
|
|
800
|
+
* Void transaction
|
|
801
|
+
* Soft-deletes a transaction by marking it as VOIDED
|
|
731
802
|
* @param data The data for the request.
|
|
803
|
+
* @param data.id Transaction ID
|
|
732
804
|
* @param data.region Region code for tenant context
|
|
733
|
-
* @returns void
|
|
805
|
+
* @returns void Transaction voided successfully
|
|
734
806
|
* @throws ApiError
|
|
735
807
|
*/
|
|
736
|
-
static
|
|
808
|
+
static transactionControllerDelete(data) {
|
|
737
809
|
return request(OpenAPI, {
|
|
738
810
|
method: "DELETE",
|
|
739
811
|
url: "/api/v1/{region}/bean/transactions/{id}",
|
|
740
812
|
path: {
|
|
813
|
+
id: data.id,
|
|
741
814
|
region: data.region
|
|
815
|
+
},
|
|
816
|
+
errors: {
|
|
817
|
+
400: "Transaction already voided",
|
|
818
|
+
401: "Authentication required",
|
|
819
|
+
404: "Transaction not found"
|
|
742
820
|
}
|
|
743
821
|
});
|
|
744
822
|
}
|
|
@@ -749,6 +827,7 @@ var BeanBalancesService = class {
|
|
|
749
827
|
* Calculate account balance at a specific date for a single currency
|
|
750
828
|
* @param data The data for the request.
|
|
751
829
|
* @param data.account Account name (e.g., "Assets:Bank:Checking")
|
|
830
|
+
* @param data.region Region code for tenant context
|
|
752
831
|
* @param data.date Date to calculate balance at (ISO 8601 format)
|
|
753
832
|
* @param data.currency Currency to query (e.g., "USD", "CNY")
|
|
754
833
|
* @returns BalanceResponseDto Balance calculated successfully
|
|
@@ -758,6 +837,9 @@ var BeanBalancesService = class {
|
|
|
758
837
|
return request(OpenAPI, {
|
|
759
838
|
method: "GET",
|
|
760
839
|
url: "/api/v1/{region}/bean/balances",
|
|
840
|
+
path: {
|
|
841
|
+
region: data.region
|
|
842
|
+
},
|
|
761
843
|
query: {
|
|
762
844
|
account: data.account,
|
|
763
845
|
date: data.date,
|
|
@@ -772,13 +854,18 @@ var BeanBalancesService = class {
|
|
|
772
854
|
/**
|
|
773
855
|
* Query multi-currency account balance
|
|
774
856
|
* Calculate account balances for all currencies at a specific date
|
|
857
|
+
* @param data The data for the request.
|
|
858
|
+
* @param data.region Region code for tenant context
|
|
775
859
|
* @returns MultiCurrencyBalanceResponseDto Balances calculated successfully
|
|
776
860
|
* @throws ApiError
|
|
777
861
|
*/
|
|
778
|
-
static balanceControllerGetMultiCurrencyBalance() {
|
|
862
|
+
static balanceControllerGetMultiCurrencyBalance(data) {
|
|
779
863
|
return request(OpenAPI, {
|
|
780
864
|
method: "GET",
|
|
781
865
|
url: "/api/v1/{region}/bean/balances/multi-currency",
|
|
866
|
+
path: {
|
|
867
|
+
region: data.region
|
|
868
|
+
},
|
|
782
869
|
errors: {
|
|
783
870
|
400: "Invalid query parameters",
|
|
784
871
|
401: "User not authenticated"
|
|
@@ -788,17 +875,26 @@ var BeanBalancesService = class {
|
|
|
788
875
|
};
|
|
789
876
|
var BeanCommoditiesService = class {
|
|
790
877
|
/**
|
|
878
|
+
* Create a new commodity
|
|
879
|
+
* Creates a new commodity definition for the authenticated user
|
|
791
880
|
* @param data The data for the request.
|
|
792
881
|
* @param data.region Region code for tenant context
|
|
793
|
-
* @
|
|
882
|
+
* @param data.requestBody
|
|
883
|
+
* @returns CommodityResponseDto Commodity created successfully
|
|
794
884
|
* @throws ApiError
|
|
795
885
|
*/
|
|
796
|
-
static
|
|
886
|
+
static commodityControllerCreate(data) {
|
|
797
887
|
return request(OpenAPI, {
|
|
798
888
|
method: "POST",
|
|
799
889
|
url: "/api/v1/{region}/bean/commodities",
|
|
800
890
|
path: {
|
|
801
891
|
region: data.region
|
|
892
|
+
},
|
|
893
|
+
body: data.requestBody,
|
|
894
|
+
mediaType: "application/json",
|
|
895
|
+
errors: {
|
|
896
|
+
400: "Invalid input data",
|
|
897
|
+
409: "Commodity already exists"
|
|
802
898
|
}
|
|
803
899
|
});
|
|
804
900
|
}
|
|
@@ -848,57 +944,81 @@ var BeanCommoditiesService = class {
|
|
|
848
944
|
});
|
|
849
945
|
}
|
|
850
946
|
/**
|
|
947
|
+
* Update commodity
|
|
948
|
+
* Updates an existing commodity definition. Symbol cannot be changed.
|
|
851
949
|
* @param data The data for the request.
|
|
950
|
+
* @param data.symbol Commodity symbol
|
|
852
951
|
* @param data.region Region code for tenant context
|
|
853
|
-
* @
|
|
952
|
+
* @param data.requestBody
|
|
953
|
+
* @returns CommodityResponseDto Commodity updated successfully
|
|
854
954
|
* @throws ApiError
|
|
855
955
|
*/
|
|
856
|
-
static
|
|
956
|
+
static commodityControllerUpdate(data) {
|
|
857
957
|
return request(OpenAPI, {
|
|
858
958
|
method: "PUT",
|
|
859
959
|
url: "/api/v1/{region}/bean/commodities/{symbol}",
|
|
860
960
|
path: {
|
|
961
|
+
symbol: data.symbol,
|
|
861
962
|
region: data.region
|
|
963
|
+
},
|
|
964
|
+
body: data.requestBody,
|
|
965
|
+
mediaType: "application/json",
|
|
966
|
+
errors: {
|
|
967
|
+
400: "Invalid input data",
|
|
968
|
+
404: "Commodity not found"
|
|
862
969
|
}
|
|
863
970
|
});
|
|
864
971
|
}
|
|
865
972
|
/**
|
|
973
|
+
* Delete commodity
|
|
974
|
+
* Deletes a commodity definition
|
|
866
975
|
* @param data The data for the request.
|
|
976
|
+
* @param data.symbol Commodity symbol
|
|
867
977
|
* @param data.region Region code for tenant context
|
|
868
|
-
* @returns void
|
|
978
|
+
* @returns void Commodity deleted successfully
|
|
869
979
|
* @throws ApiError
|
|
870
980
|
*/
|
|
871
|
-
static
|
|
981
|
+
static commodityControllerDelete(data) {
|
|
872
982
|
return request(OpenAPI, {
|
|
873
983
|
method: "DELETE",
|
|
874
984
|
url: "/api/v1/{region}/bean/commodities/{symbol}",
|
|
875
985
|
path: {
|
|
986
|
+
symbol: data.symbol,
|
|
876
987
|
region: data.region
|
|
988
|
+
},
|
|
989
|
+
errors: {
|
|
990
|
+
404: "Commodity not found"
|
|
877
991
|
}
|
|
878
992
|
});
|
|
879
993
|
}
|
|
880
994
|
/**
|
|
995
|
+
* Ensure commodity exists
|
|
996
|
+
* Gets existing commodity or creates it with automatic initialization from OpenBB
|
|
881
997
|
* @param data The data for the request.
|
|
998
|
+
* @param data.symbol Commodity symbol
|
|
882
999
|
* @param data.region Region code for tenant context
|
|
883
|
-
* @returns
|
|
1000
|
+
* @returns CommodityResponseDto Commodity retrieved or created
|
|
884
1001
|
* @throws ApiError
|
|
885
1002
|
*/
|
|
886
|
-
static
|
|
1003
|
+
static commodityControllerGetOrCreate(data) {
|
|
887
1004
|
return request(OpenAPI, {
|
|
888
1005
|
method: "POST",
|
|
889
1006
|
url: "/api/v1/{region}/bean/commodities/{symbol}/ensure",
|
|
890
1007
|
path: {
|
|
1008
|
+
symbol: data.symbol,
|
|
891
1009
|
region: data.region
|
|
892
1010
|
}
|
|
893
1011
|
});
|
|
894
1012
|
}
|
|
895
1013
|
/**
|
|
1014
|
+
* Bulk create commodities
|
|
1015
|
+
* Creates multiple commodities from a list of symbols, useful for initialization
|
|
896
1016
|
* @param data The data for the request.
|
|
897
1017
|
* @param data.region Region code for tenant context
|
|
898
|
-
* @returns
|
|
1018
|
+
* @returns CommodityResponseDto Commodities created successfully
|
|
899
1019
|
* @throws ApiError
|
|
900
1020
|
*/
|
|
901
|
-
static
|
|
1021
|
+
static commodityControllerBulkCreate(data) {
|
|
902
1022
|
return request(OpenAPI, {
|
|
903
1023
|
method: "POST",
|
|
904
1024
|
url: "/api/v1/{region}/bean/commodities/bulk",
|
|
@@ -934,7 +1054,7 @@ var ProviderSyncService = class {
|
|
|
934
1054
|
*
|
|
935
1055
|
* @param data The data for the request.
|
|
936
1056
|
* @param data.providerName Provider name
|
|
937
|
-
* @param data.region Region code
|
|
1057
|
+
* @param data.region Region code for tenant context
|
|
938
1058
|
* @param data.requestBody
|
|
939
1059
|
* @returns ProviderSyncResponseDto Sync completed successfully
|
|
940
1060
|
* @throws ApiError
|
|
@@ -959,13 +1079,18 @@ var ProviderSyncService = class {
|
|
|
959
1079
|
/**
|
|
960
1080
|
* Get supported providers
|
|
961
1081
|
* Returns a list of all providers supported by the sync endpoint.
|
|
1082
|
+
* @param data The data for the request.
|
|
1083
|
+
* @param data.region Region code for tenant context
|
|
962
1084
|
* @returns SupportedProvidersResponseDto List of supported providers
|
|
963
1085
|
* @throws ApiError
|
|
964
1086
|
*/
|
|
965
|
-
static providerSyncControllerGetSupportedProviders() {
|
|
1087
|
+
static providerSyncControllerGetSupportedProviders(data) {
|
|
966
1088
|
return request(OpenAPI, {
|
|
967
1089
|
method: "GET",
|
|
968
1090
|
url: "/api/v1/{region}/bean/import/provider/supported",
|
|
1091
|
+
path: {
|
|
1092
|
+
region: data.region
|
|
1093
|
+
},
|
|
969
1094
|
errors: {
|
|
970
1095
|
401: "Missing or invalid authentication"
|
|
971
1096
|
}
|
|
@@ -976,6 +1101,7 @@ var ProviderSyncService = class {
|
|
|
976
1101
|
* Returns whether a specific provider is supported.
|
|
977
1102
|
* @param data The data for the request.
|
|
978
1103
|
* @param data.providerName Provider name to check
|
|
1104
|
+
* @param data.region Region code for tenant context
|
|
979
1105
|
* @returns unknown Provider support status
|
|
980
1106
|
* @throws ApiError
|
|
981
1107
|
*/
|
|
@@ -984,7 +1110,8 @@ var ProviderSyncService = class {
|
|
|
984
1110
|
method: "GET",
|
|
985
1111
|
url: "/api/v1/{region}/bean/import/provider/{providerName}/supported",
|
|
986
1112
|
path: {
|
|
987
|
-
providerName: data.providerName
|
|
1113
|
+
providerName: data.providerName,
|
|
1114
|
+
region: data.region
|
|
988
1115
|
},
|
|
989
1116
|
errors: {
|
|
990
1117
|
401: "Missing or invalid authentication"
|
|
@@ -1021,6 +1148,20 @@ var HealthService = class {
|
|
|
1021
1148
|
}
|
|
1022
1149
|
});
|
|
1023
1150
|
}
|
|
1151
|
+
/**
|
|
1152
|
+
* Check OpenBB schema status
|
|
1153
|
+
* @returns unknown OpenBB status
|
|
1154
|
+
* @throws ApiError
|
|
1155
|
+
*/
|
|
1156
|
+
static healthControllerCheckOpenBb() {
|
|
1157
|
+
return request(OpenAPI, {
|
|
1158
|
+
method: "GET",
|
|
1159
|
+
url: "/api/v1/health/openbb",
|
|
1160
|
+
errors: {
|
|
1161
|
+
503: "OpenBB unavailable"
|
|
1162
|
+
}
|
|
1163
|
+
});
|
|
1164
|
+
}
|
|
1024
1165
|
/**
|
|
1025
1166
|
* Check Redis connection health
|
|
1026
1167
|
* @returns unknown Redis is healthy
|
|
@@ -1084,62 +1225,6 @@ var HealthService = class {
|
|
|
1084
1225
|
}
|
|
1085
1226
|
});
|
|
1086
1227
|
}
|
|
1087
|
-
/**
|
|
1088
|
-
* Check health of a specific data enhancer
|
|
1089
|
-
* @param data The data for the request.
|
|
1090
|
-
* @param data.name Data enhancer name
|
|
1091
|
-
* @returns unknown Data enhancer is healthy
|
|
1092
|
-
* @throws ApiError
|
|
1093
|
-
*/
|
|
1094
|
-
static healthControllerGetHealthOfDataEnhancer(data) {
|
|
1095
|
-
return request(OpenAPI, {
|
|
1096
|
-
method: "GET",
|
|
1097
|
-
url: "/api/v1/health/data-enhancer/{name}",
|
|
1098
|
-
path: {
|
|
1099
|
-
name: data.name
|
|
1100
|
-
},
|
|
1101
|
-
errors: {
|
|
1102
|
-
401: "Unauthorized",
|
|
1103
|
-
503: "Data enhancer unavailable"
|
|
1104
|
-
}
|
|
1105
|
-
});
|
|
1106
|
-
}
|
|
1107
|
-
/**
|
|
1108
|
-
* Check health of all data providers
|
|
1109
|
-
* @returns unknown Data providers health status
|
|
1110
|
-
* @throws ApiError
|
|
1111
|
-
*/
|
|
1112
|
-
static healthControllerCheckDataProviders() {
|
|
1113
|
-
return request(OpenAPI, {
|
|
1114
|
-
method: "GET",
|
|
1115
|
-
url: "/api/v1/health/data-providers",
|
|
1116
|
-
errors: {
|
|
1117
|
-
401: "Unauthorized",
|
|
1118
|
-
503: "Data providers check failed"
|
|
1119
|
-
}
|
|
1120
|
-
});
|
|
1121
|
-
}
|
|
1122
|
-
/**
|
|
1123
|
-
* Check health of a specific data provider
|
|
1124
|
-
* @param data The data for the request.
|
|
1125
|
-
* @param data.dataSource Data source identifier
|
|
1126
|
-
* @returns unknown Data provider is healthy
|
|
1127
|
-
* @throws ApiError
|
|
1128
|
-
*/
|
|
1129
|
-
static healthControllerGetHealthOfDataProvider(data) {
|
|
1130
|
-
return request(OpenAPI, {
|
|
1131
|
-
method: "GET",
|
|
1132
|
-
url: "/api/v1/health/data-provider/{dataSource}",
|
|
1133
|
-
path: {
|
|
1134
|
-
dataSource: data.dataSource
|
|
1135
|
-
},
|
|
1136
|
-
errors: {
|
|
1137
|
-
400: "Invalid data source",
|
|
1138
|
-
401: "Unauthorized",
|
|
1139
|
-
503: "Data provider unavailable"
|
|
1140
|
-
}
|
|
1141
|
-
});
|
|
1142
|
-
}
|
|
1143
1228
|
};
|
|
1144
1229
|
export {
|
|
1145
1230
|
BeanAccountsService,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@firela/api-types",
|
|
3
|
-
"version": "0.0.0-canary.
|
|
3
|
+
"version": "0.0.0-canary.a4e21680",
|
|
4
4
|
"description": "TypeScript types generated from IGN OpenAPI specification",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "FireLa Team",
|
|
@@ -24,8 +24,7 @@
|
|
|
24
24
|
"src"
|
|
25
25
|
],
|
|
26
26
|
"scripts": {
|
|
27
|
-
"
|
|
28
|
-
"generate": "npm run sync && openapi-ts",
|
|
27
|
+
"generate": "openapi-ts",
|
|
29
28
|
"build": "tsup src/index.ts --format cjs,esm --dts --clean",
|
|
30
29
|
"lint": "spectral lint openapi.yaml",
|
|
31
30
|
"prepublishOnly": "npm run generate && npm run build"
|