@terrantula/sdk 0.11.1 → 0.12.0
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/{chunk-773V5YNO.mjs → chunk-665GEJRV.mjs} +458 -392
- package/dist/index.d.mts +2781 -234
- package/dist/index.d.ts +2781 -234
- package/dist/index.js +468 -402
- package/dist/index.mjs +1 -1
- package/dist/local.d.mts +2416 -203
- package/dist/local.d.ts +2416 -203
- package/dist/local.js +468 -402
- package/dist/local.mjs +1 -1
- package/dist/{projects-CT3fGCOp.d.mts → projects-D-LiD32g.d.mts} +1 -1
- package/dist/{projects-CT3fGCOp.d.ts → projects-D-LiD32g.d.ts} +1 -1
- package/package.json +3 -3
package/dist/local.js
CHANGED
|
@@ -689,40 +689,94 @@ function createDeploymentTargetsClient(proj) {
|
|
|
689
689
|
};
|
|
690
690
|
}
|
|
691
691
|
|
|
692
|
-
// src/
|
|
692
|
+
// src/deployment-target-sets.ts
|
|
693
693
|
var import_zod5 = require("zod");
|
|
694
694
|
var import_types3 = require("@terrantula/types");
|
|
695
|
-
function
|
|
695
|
+
function createDeploymentTargetSetsClient(proj) {
|
|
696
696
|
return {
|
|
697
697
|
list: withSchema(
|
|
698
698
|
import_zod5.z.object({
|
|
699
699
|
orgId: import_zod5.z.string().describe("Organization slug"),
|
|
700
700
|
projectId: import_zod5.z.string().describe("Project ID")
|
|
701
701
|
}),
|
|
702
|
-
(params) => call(proj(params.orgId, params.projectId)["
|
|
702
|
+
(params) => call(proj(params.orgId, params.projectId)["deployment-target-sets"].$get())
|
|
703
703
|
),
|
|
704
704
|
get: withSchema(
|
|
705
705
|
import_zod5.z.object({
|
|
706
706
|
orgId: import_zod5.z.string().describe("Organization slug"),
|
|
707
707
|
projectId: import_zod5.z.string().describe("Project ID"),
|
|
708
|
-
name: import_zod5.z.string().describe("
|
|
708
|
+
name: import_zod5.z.string().describe("Deployment target set name")
|
|
709
709
|
}),
|
|
710
|
-
(params) => call(
|
|
710
|
+
(params) => call(
|
|
711
|
+
proj(params.orgId, params.projectId)["deployment-target-sets"][":name"].$get({
|
|
712
|
+
param: { name: params.name }
|
|
713
|
+
})
|
|
714
|
+
)
|
|
711
715
|
),
|
|
712
|
-
|
|
713
|
-
import_types3.
|
|
716
|
+
put: withSchema(
|
|
717
|
+
import_types3.DeploymentTargetSetSchema.extend({
|
|
714
718
|
orgId: import_zod5.z.string().describe("Organization slug"),
|
|
715
719
|
projectId: import_zod5.z.string().describe("Project ID")
|
|
716
720
|
}),
|
|
721
|
+
(params) => {
|
|
722
|
+
const { orgId, projectId, ...body } = params;
|
|
723
|
+
return call(
|
|
724
|
+
proj(orgId, projectId)["deployment-target-sets"][":name"].$put({
|
|
725
|
+
param: { name: params.name },
|
|
726
|
+
json: body
|
|
727
|
+
})
|
|
728
|
+
);
|
|
729
|
+
}
|
|
730
|
+
),
|
|
731
|
+
delete: withSchema(
|
|
732
|
+
import_zod5.z.object({
|
|
733
|
+
orgId: import_zod5.z.string().describe("Organization slug"),
|
|
734
|
+
projectId: import_zod5.z.string().describe("Project ID"),
|
|
735
|
+
name: import_zod5.z.string().describe("Deployment target set name")
|
|
736
|
+
}),
|
|
737
|
+
(params) => call(
|
|
738
|
+
proj(params.orgId, params.projectId)["deployment-target-sets"][":name"].$delete({
|
|
739
|
+
param: { name: params.name }
|
|
740
|
+
})
|
|
741
|
+
)
|
|
742
|
+
)
|
|
743
|
+
};
|
|
744
|
+
}
|
|
745
|
+
|
|
746
|
+
// src/cells.ts
|
|
747
|
+
var import_zod6 = require("zod");
|
|
748
|
+
var import_types4 = require("@terrantula/types");
|
|
749
|
+
function createCellsClient(proj) {
|
|
750
|
+
return {
|
|
751
|
+
list: withSchema(
|
|
752
|
+
import_zod6.z.object({
|
|
753
|
+
orgId: import_zod6.z.string().describe("Organization slug"),
|
|
754
|
+
projectId: import_zod6.z.string().describe("Project ID")
|
|
755
|
+
}),
|
|
756
|
+
(params) => call(proj(params.orgId, params.projectId)["cells"].$get())
|
|
757
|
+
),
|
|
758
|
+
get: withSchema(
|
|
759
|
+
import_zod6.z.object({
|
|
760
|
+
orgId: import_zod6.z.string().describe("Organization slug"),
|
|
761
|
+
projectId: import_zod6.z.string().describe("Project ID"),
|
|
762
|
+
name: import_zod6.z.string().describe("Cell name")
|
|
763
|
+
}),
|
|
764
|
+
(params) => call(proj(params.orgId, params.projectId)["cells"][":name"].$get({ param: { name: params.name } }))
|
|
765
|
+
),
|
|
766
|
+
create: withSchema(
|
|
767
|
+
import_types4.CellSchema.extend({
|
|
768
|
+
orgId: import_zod6.z.string().describe("Organization slug"),
|
|
769
|
+
projectId: import_zod6.z.string().describe("Project ID")
|
|
770
|
+
}),
|
|
717
771
|
(params) => {
|
|
718
772
|
const { orgId, projectId, ...body } = params;
|
|
719
773
|
return call(proj(orgId, projectId)["cells"].$post({ json: body }));
|
|
720
774
|
}
|
|
721
775
|
),
|
|
722
776
|
update: withSchema(
|
|
723
|
-
|
|
724
|
-
orgId:
|
|
725
|
-
projectId:
|
|
777
|
+
import_types4.CellSchema.extend({
|
|
778
|
+
orgId: import_zod6.z.string().describe("Organization slug"),
|
|
779
|
+
projectId: import_zod6.z.string().describe("Project ID")
|
|
726
780
|
}),
|
|
727
781
|
(params) => {
|
|
728
782
|
const { orgId, projectId, ...body } = params;
|
|
@@ -732,19 +786,19 @@ function createCellsClient(proj) {
|
|
|
732
786
|
}
|
|
733
787
|
),
|
|
734
788
|
delete: withSchema(
|
|
735
|
-
|
|
736
|
-
orgId:
|
|
737
|
-
projectId:
|
|
738
|
-
name:
|
|
789
|
+
import_zod6.z.object({
|
|
790
|
+
orgId: import_zod6.z.string().describe("Organization slug"),
|
|
791
|
+
projectId: import_zod6.z.string().describe("Project ID"),
|
|
792
|
+
name: import_zod6.z.string().describe("Cell name")
|
|
739
793
|
}),
|
|
740
794
|
(params) => call(proj(params.orgId, params.projectId)["cells"][":name"].$delete({ param: { name: params.name } }))
|
|
741
795
|
),
|
|
742
796
|
listMembers: withSchema(
|
|
743
|
-
|
|
744
|
-
orgId:
|
|
745
|
-
projectId:
|
|
746
|
-
name:
|
|
747
|
-
envName:
|
|
797
|
+
import_zod6.z.object({
|
|
798
|
+
orgId: import_zod6.z.string().describe("Organization slug"),
|
|
799
|
+
projectId: import_zod6.z.string().describe("Project ID"),
|
|
800
|
+
name: import_zod6.z.string().describe("Cell name"),
|
|
801
|
+
envName: import_zod6.z.string().describe("Environment name").default("default")
|
|
748
802
|
}),
|
|
749
803
|
(params) => {
|
|
750
804
|
const envName = params.envName ?? "default";
|
|
@@ -757,13 +811,13 @@ function createCellsClient(proj) {
|
|
|
757
811
|
}
|
|
758
812
|
),
|
|
759
813
|
addMember: withSchema(
|
|
760
|
-
|
|
761
|
-
orgId:
|
|
762
|
-
projectId:
|
|
763
|
-
name:
|
|
764
|
-
entityName:
|
|
765
|
-
entityTypeName:
|
|
766
|
-
envName:
|
|
814
|
+
import_zod6.z.object({
|
|
815
|
+
orgId: import_zod6.z.string().describe("Organization slug"),
|
|
816
|
+
projectId: import_zod6.z.string().describe("Project ID"),
|
|
817
|
+
name: import_zod6.z.string().describe("Cell name"),
|
|
818
|
+
entityName: import_zod6.z.string().describe("Entity name (M5-rework natural key)"),
|
|
819
|
+
entityTypeName: import_zod6.z.string().describe("Entity type name (M5-rework natural key)"),
|
|
820
|
+
envName: import_zod6.z.string().describe("Environment name").default("default")
|
|
767
821
|
}),
|
|
768
822
|
(params) => {
|
|
769
823
|
const { orgId, projectId, name, entityName, entityTypeName } = params;
|
|
@@ -777,12 +831,12 @@ function createCellsClient(proj) {
|
|
|
777
831
|
}
|
|
778
832
|
),
|
|
779
833
|
removeMember: withSchema(
|
|
780
|
-
|
|
781
|
-
orgId:
|
|
782
|
-
projectId:
|
|
783
|
-
name:
|
|
784
|
-
entityName:
|
|
785
|
-
envName:
|
|
834
|
+
import_zod6.z.object({
|
|
835
|
+
orgId: import_zod6.z.string().describe("Organization slug"),
|
|
836
|
+
projectId: import_zod6.z.string().describe("Project ID"),
|
|
837
|
+
name: import_zod6.z.string().describe("Cell name"),
|
|
838
|
+
entityName: import_zod6.z.string().describe("Entity name (M5-rework natural key)"),
|
|
839
|
+
envName: import_zod6.z.string().describe("Environment name").default("default")
|
|
786
840
|
}),
|
|
787
841
|
(params) => {
|
|
788
842
|
const envName = params.envName ?? "default";
|
|
@@ -795,10 +849,10 @@ function createCellsClient(proj) {
|
|
|
795
849
|
}
|
|
796
850
|
),
|
|
797
851
|
recommendations: withSchema(
|
|
798
|
-
|
|
799
|
-
orgId:
|
|
800
|
-
projectId:
|
|
801
|
-
name:
|
|
852
|
+
import_zod6.z.object({
|
|
853
|
+
orgId: import_zod6.z.string().describe("Organization slug"),
|
|
854
|
+
projectId: import_zod6.z.string().describe("Project ID"),
|
|
855
|
+
name: import_zod6.z.string().describe("Cell name")
|
|
802
856
|
}),
|
|
803
857
|
(params) => call(
|
|
804
858
|
proj(params.orgId, params.projectId)["cells"][":name"]["recommendations"].$get({
|
|
@@ -810,22 +864,22 @@ function createCellsClient(proj) {
|
|
|
810
864
|
}
|
|
811
865
|
|
|
812
866
|
// src/relationships.ts
|
|
813
|
-
var
|
|
814
|
-
var
|
|
867
|
+
var import_zod7 = require("zod");
|
|
868
|
+
var import_types5 = require("@terrantula/types");
|
|
815
869
|
function createRelationshipTypesClient(proj) {
|
|
816
870
|
return {
|
|
817
871
|
list: withSchema(
|
|
818
|
-
|
|
819
|
-
orgId:
|
|
820
|
-
projectId:
|
|
872
|
+
import_zod7.z.object({
|
|
873
|
+
orgId: import_zod7.z.string().describe("Organization slug"),
|
|
874
|
+
projectId: import_zod7.z.string().describe("Project name")
|
|
821
875
|
}),
|
|
822
876
|
(params) => call(proj(params.orgId, params.projectId)["relationship-types"].$get())
|
|
823
877
|
),
|
|
824
878
|
get: withSchema(
|
|
825
|
-
|
|
826
|
-
orgId:
|
|
827
|
-
projectId:
|
|
828
|
-
name:
|
|
879
|
+
import_zod7.z.object({
|
|
880
|
+
orgId: import_zod7.z.string().describe("Organization slug"),
|
|
881
|
+
projectId: import_zod7.z.string().describe("Project name"),
|
|
882
|
+
name: import_zod7.z.string().describe("Relationship type name")
|
|
829
883
|
}),
|
|
830
884
|
(params) => call(
|
|
831
885
|
proj(params.orgId, params.projectId)["relationship-types"][":name"].$get({
|
|
@@ -834,9 +888,9 @@ function createRelationshipTypesClient(proj) {
|
|
|
834
888
|
)
|
|
835
889
|
),
|
|
836
890
|
create: withSchema(
|
|
837
|
-
|
|
838
|
-
orgId:
|
|
839
|
-
projectId:
|
|
891
|
+
import_types5.RelationshipTypeSchema.extend({
|
|
892
|
+
orgId: import_zod7.z.string().describe("Organization slug"),
|
|
893
|
+
projectId: import_zod7.z.string().describe("Project name")
|
|
840
894
|
}),
|
|
841
895
|
(params) => {
|
|
842
896
|
const { orgId, projectId, ...body } = params;
|
|
@@ -844,9 +898,9 @@ function createRelationshipTypesClient(proj) {
|
|
|
844
898
|
}
|
|
845
899
|
),
|
|
846
900
|
update: withSchema(
|
|
847
|
-
|
|
848
|
-
orgId:
|
|
849
|
-
projectId:
|
|
901
|
+
import_types5.RelationshipTypeSchema.extend({
|
|
902
|
+
orgId: import_zod7.z.string().describe("Organization slug"),
|
|
903
|
+
projectId: import_zod7.z.string().describe("Project name")
|
|
850
904
|
}),
|
|
851
905
|
(params) => {
|
|
852
906
|
const { orgId, projectId, ...body } = params;
|
|
@@ -859,10 +913,10 @@ function createRelationshipTypesClient(proj) {
|
|
|
859
913
|
}
|
|
860
914
|
),
|
|
861
915
|
delete: withSchema(
|
|
862
|
-
|
|
863
|
-
orgId:
|
|
864
|
-
projectId:
|
|
865
|
-
name:
|
|
916
|
+
import_zod7.z.object({
|
|
917
|
+
orgId: import_zod7.z.string().describe("Organization slug"),
|
|
918
|
+
projectId: import_zod7.z.string().describe("Project name"),
|
|
919
|
+
name: import_zod7.z.string().describe("Relationship type name")
|
|
866
920
|
}),
|
|
867
921
|
(params) => call(
|
|
868
922
|
proj(params.orgId, params.projectId)["relationship-types"][":name"].$delete({
|
|
@@ -875,18 +929,18 @@ function createRelationshipTypesClient(proj) {
|
|
|
875
929
|
function createRelationshipsClient(projEnv) {
|
|
876
930
|
return {
|
|
877
931
|
list: withSchema(
|
|
878
|
-
|
|
879
|
-
orgId:
|
|
880
|
-
projectId:
|
|
881
|
-
envName:
|
|
882
|
-
relationshipType:
|
|
883
|
-
state:
|
|
884
|
-
fromEntity:
|
|
885
|
-
toEntity:
|
|
886
|
-
fromEntityCell:
|
|
887
|
-
toEntityCell:
|
|
888
|
-
limit:
|
|
889
|
-
cursor:
|
|
932
|
+
import_zod7.z.object({
|
|
933
|
+
orgId: import_zod7.z.string().describe("Organization slug"),
|
|
934
|
+
projectId: import_zod7.z.string().describe("Project name"),
|
|
935
|
+
envName: import_zod7.z.string().describe("Environment name"),
|
|
936
|
+
relationshipType: import_zod7.z.string().optional().describe("Filter by relationship type"),
|
|
937
|
+
state: import_zod7.z.string().optional().describe("Filter by state"),
|
|
938
|
+
fromEntity: import_zod7.z.string().uuid().optional().describe("Filter by from-entity ID"),
|
|
939
|
+
toEntity: import_zod7.z.string().uuid().optional().describe("Filter by to-entity ID"),
|
|
940
|
+
fromEntityCell: import_zod7.z.string().optional().describe("Filter by from-entity cell membership"),
|
|
941
|
+
toEntityCell: import_zod7.z.string().optional().describe("Filter by to-entity cell membership"),
|
|
942
|
+
limit: import_zod7.z.coerce.number().int().min(1).max(100).optional().describe("Max results (1-100)"),
|
|
943
|
+
cursor: import_zod7.z.string().optional().describe("Pagination cursor")
|
|
890
944
|
}),
|
|
891
945
|
(params) => {
|
|
892
946
|
const { orgId, projectId, envName, ...query } = params;
|
|
@@ -896,21 +950,21 @@ function createRelationshipsClient(projEnv) {
|
|
|
896
950
|
}
|
|
897
951
|
),
|
|
898
952
|
get: withSchema(
|
|
899
|
-
|
|
900
|
-
orgId:
|
|
901
|
-
projectId:
|
|
902
|
-
envName:
|
|
903
|
-
id:
|
|
953
|
+
import_zod7.z.object({
|
|
954
|
+
orgId: import_zod7.z.string().describe("Organization slug"),
|
|
955
|
+
projectId: import_zod7.z.string().describe("Project name"),
|
|
956
|
+
envName: import_zod7.z.string().describe("Environment name"),
|
|
957
|
+
id: import_zod7.z.string().uuid().describe("Relationship ID")
|
|
904
958
|
}),
|
|
905
959
|
(params) => call(
|
|
906
960
|
projEnv(params.orgId, params.projectId, params.envName)["relationships"][":id"].$get({ param: { id: params.id } })
|
|
907
961
|
)
|
|
908
962
|
),
|
|
909
963
|
create: withSchema(
|
|
910
|
-
|
|
911
|
-
orgId:
|
|
912
|
-
projectId:
|
|
913
|
-
envName:
|
|
964
|
+
import_types5.RelationshipSchema.extend({
|
|
965
|
+
orgId: import_zod7.z.string().describe("Organization slug"),
|
|
966
|
+
projectId: import_zod7.z.string().describe("Project name"),
|
|
967
|
+
envName: import_zod7.z.string().describe("Environment name")
|
|
914
968
|
}),
|
|
915
969
|
(params) => {
|
|
916
970
|
const { orgId, projectId, envName, ...body } = params;
|
|
@@ -918,11 +972,11 @@ function createRelationshipsClient(projEnv) {
|
|
|
918
972
|
}
|
|
919
973
|
),
|
|
920
974
|
delete: withSchema(
|
|
921
|
-
|
|
922
|
-
orgId:
|
|
923
|
-
projectId:
|
|
924
|
-
envName:
|
|
925
|
-
id:
|
|
975
|
+
import_zod7.z.object({
|
|
976
|
+
orgId: import_zod7.z.string().describe("Organization slug"),
|
|
977
|
+
projectId: import_zod7.z.string().describe("Project name"),
|
|
978
|
+
envName: import_zod7.z.string().describe("Environment name"),
|
|
979
|
+
id: import_zod7.z.string().uuid().describe("Relationship ID")
|
|
926
980
|
}),
|
|
927
981
|
(params) => call(
|
|
928
982
|
projEnv(params.orgId, params.projectId, params.envName)["relationships"][":id"].$delete({ param: { id: params.id } })
|
|
@@ -932,29 +986,29 @@ function createRelationshipsClient(projEnv) {
|
|
|
932
986
|
}
|
|
933
987
|
|
|
934
988
|
// src/actions.ts
|
|
935
|
-
var
|
|
936
|
-
var
|
|
989
|
+
var import_zod8 = require("zod");
|
|
990
|
+
var import_types6 = require("@terrantula/types");
|
|
937
991
|
function createActionsClient(proj, projEnv) {
|
|
938
992
|
return {
|
|
939
993
|
list: withSchema(
|
|
940
|
-
|
|
941
|
-
orgId:
|
|
942
|
-
projectId:
|
|
994
|
+
import_zod8.z.object({
|
|
995
|
+
orgId: import_zod8.z.string().describe("Organization slug"),
|
|
996
|
+
projectId: import_zod8.z.string().describe("Project ID")
|
|
943
997
|
}),
|
|
944
998
|
(params) => call(proj(params.orgId, params.projectId)["actions"].$get())
|
|
945
999
|
),
|
|
946
1000
|
get: withSchema(
|
|
947
|
-
|
|
948
|
-
orgId:
|
|
949
|
-
projectId:
|
|
950
|
-
name:
|
|
1001
|
+
import_zod8.z.object({
|
|
1002
|
+
orgId: import_zod8.z.string().describe("Organization slug"),
|
|
1003
|
+
projectId: import_zod8.z.string().describe("Project ID"),
|
|
1004
|
+
name: import_zod8.z.string().describe("Action name")
|
|
951
1005
|
}),
|
|
952
1006
|
(params) => call(proj(params.orgId, params.projectId)["actions"][":name"].$get({ param: { name: params.name } }))
|
|
953
1007
|
),
|
|
954
1008
|
create: withSchema(
|
|
955
|
-
|
|
956
|
-
orgId:
|
|
957
|
-
projectId:
|
|
1009
|
+
import_types6.ActionSchema.extend({
|
|
1010
|
+
orgId: import_zod8.z.string().describe("Organization slug"),
|
|
1011
|
+
projectId: import_zod8.z.string().describe("Project ID")
|
|
958
1012
|
}),
|
|
959
1013
|
(params) => {
|
|
960
1014
|
const { orgId, projectId, ...body } = params;
|
|
@@ -962,9 +1016,9 @@ function createActionsClient(proj, projEnv) {
|
|
|
962
1016
|
}
|
|
963
1017
|
),
|
|
964
1018
|
update: withSchema(
|
|
965
|
-
|
|
966
|
-
orgId:
|
|
967
|
-
projectId:
|
|
1019
|
+
import_types6.ActionSchema.extend({
|
|
1020
|
+
orgId: import_zod8.z.string().describe("Organization slug"),
|
|
1021
|
+
projectId: import_zod8.z.string().describe("Project ID")
|
|
968
1022
|
}),
|
|
969
1023
|
(params) => {
|
|
970
1024
|
const { orgId, projectId, ...body } = params;
|
|
@@ -974,23 +1028,23 @@ function createActionsClient(proj, projEnv) {
|
|
|
974
1028
|
}
|
|
975
1029
|
),
|
|
976
1030
|
delete: withSchema(
|
|
977
|
-
|
|
978
|
-
orgId:
|
|
979
|
-
projectId:
|
|
980
|
-
name:
|
|
1031
|
+
import_zod8.z.object({
|
|
1032
|
+
orgId: import_zod8.z.string().describe("Organization slug"),
|
|
1033
|
+
projectId: import_zod8.z.string().describe("Project ID"),
|
|
1034
|
+
name: import_zod8.z.string().describe("Action name")
|
|
981
1035
|
}),
|
|
982
1036
|
(params) => call(
|
|
983
1037
|
proj(params.orgId, params.projectId)["actions"][":name"].$delete({ param: { name: params.name } })
|
|
984
1038
|
)
|
|
985
1039
|
),
|
|
986
1040
|
run: withSchema(
|
|
987
|
-
|
|
988
|
-
orgId:
|
|
989
|
-
projectId:
|
|
990
|
-
envName:
|
|
991
|
-
actionName:
|
|
992
|
-
parameters:
|
|
993
|
-
recommendations:
|
|
1041
|
+
import_zod8.z.object({
|
|
1042
|
+
orgId: import_zod8.z.string().describe("Organization slug"),
|
|
1043
|
+
projectId: import_zod8.z.string().describe("Project ID"),
|
|
1044
|
+
envName: import_zod8.z.string().describe("Environment name"),
|
|
1045
|
+
actionName: import_zod8.z.string().describe("Action name"),
|
|
1046
|
+
parameters: import_zod8.z.record(import_zod8.z.unknown()).optional().describe("Action parameters as JSON"),
|
|
1047
|
+
recommendations: import_zod8.z.record(import_zod8.z.string()).optional().describe("Recommendation selections as JSON")
|
|
994
1048
|
}),
|
|
995
1049
|
(params) => {
|
|
996
1050
|
const { orgId, projectId, envName, actionName, parameters, recommendations } = params;
|
|
@@ -1007,14 +1061,14 @@ function createActionsClient(proj, projEnv) {
|
|
|
1007
1061
|
function createActionRunsClient(projEnv) {
|
|
1008
1062
|
return {
|
|
1009
1063
|
list: withSchema(
|
|
1010
|
-
|
|
1011
|
-
orgId:
|
|
1012
|
-
projectId:
|
|
1013
|
-
envName:
|
|
1014
|
-
actionName:
|
|
1015
|
-
entityId:
|
|
1016
|
-
status:
|
|
1017
|
-
limit:
|
|
1064
|
+
import_zod8.z.object({
|
|
1065
|
+
orgId: import_zod8.z.string().describe("Organization slug"),
|
|
1066
|
+
projectId: import_zod8.z.string().describe("Project ID"),
|
|
1067
|
+
envName: import_zod8.z.string().describe("Environment name"),
|
|
1068
|
+
actionName: import_zod8.z.string().optional().describe("Filter by action name"),
|
|
1069
|
+
entityId: import_zod8.z.string().uuid().optional().describe("Filter by entity ID"),
|
|
1070
|
+
status: import_zod8.z.enum(["pending", "running", "succeeded", "failed", "cancelled"]).optional().describe("Filter by status"),
|
|
1071
|
+
limit: import_zod8.z.coerce.number().int().min(1).max(100).optional().describe("Max results (1-100)")
|
|
1018
1072
|
}),
|
|
1019
1073
|
(params) => {
|
|
1020
1074
|
const { orgId, projectId, envName, ...query } = params;
|
|
@@ -1024,22 +1078,22 @@ function createActionRunsClient(projEnv) {
|
|
|
1024
1078
|
}
|
|
1025
1079
|
),
|
|
1026
1080
|
get: withSchema(
|
|
1027
|
-
|
|
1028
|
-
orgId:
|
|
1029
|
-
projectId:
|
|
1030
|
-
envName:
|
|
1031
|
-
id:
|
|
1081
|
+
import_zod8.z.object({
|
|
1082
|
+
orgId: import_zod8.z.string().describe("Organization slug"),
|
|
1083
|
+
projectId: import_zod8.z.string().describe("Project ID"),
|
|
1084
|
+
envName: import_zod8.z.string().describe("Environment name"),
|
|
1085
|
+
id: import_zod8.z.string().uuid().describe("Action run ID")
|
|
1032
1086
|
}),
|
|
1033
1087
|
(params) => call(
|
|
1034
1088
|
projEnv(params.orgId, params.projectId, params.envName)["action-runs"][":id"].$get({ param: { id: params.id } })
|
|
1035
1089
|
)
|
|
1036
1090
|
),
|
|
1037
1091
|
cancel: withSchema(
|
|
1038
|
-
|
|
1039
|
-
orgId:
|
|
1040
|
-
projectId:
|
|
1041
|
-
envName:
|
|
1042
|
-
id:
|
|
1092
|
+
import_zod8.z.object({
|
|
1093
|
+
orgId: import_zod8.z.string().describe("Organization slug"),
|
|
1094
|
+
projectId: import_zod8.z.string().describe("Project ID"),
|
|
1095
|
+
envName: import_zod8.z.string().describe("Environment name"),
|
|
1096
|
+
id: import_zod8.z.string().uuid().describe("Action run ID")
|
|
1043
1097
|
}),
|
|
1044
1098
|
(params) => call(
|
|
1045
1099
|
projEnv(params.orgId, params.projectId, params.envName)["action-runs"][":id"].$delete({ param: { id: params.id } })
|
|
@@ -1049,36 +1103,36 @@ function createActionRunsClient(projEnv) {
|
|
|
1049
1103
|
}
|
|
1050
1104
|
|
|
1051
1105
|
// src/secrets.ts
|
|
1052
|
-
var
|
|
1053
|
-
var
|
|
1106
|
+
var import_zod9 = require("zod");
|
|
1107
|
+
var import_types7 = require("@terrantula/types");
|
|
1054
1108
|
function createSecretsClient(projEnv) {
|
|
1055
1109
|
return {
|
|
1056
1110
|
list: withSchema(
|
|
1057
|
-
|
|
1058
|
-
orgId:
|
|
1059
|
-
projectId:
|
|
1060
|
-
envName:
|
|
1111
|
+
import_zod9.z.object({
|
|
1112
|
+
orgId: import_zod9.z.string().describe("Organization slug"),
|
|
1113
|
+
projectId: import_zod9.z.string().describe("Project ID"),
|
|
1114
|
+
envName: import_zod9.z.string().describe("Environment name")
|
|
1061
1115
|
}),
|
|
1062
1116
|
(params) => call(projEnv(params.orgId, params.projectId, params.envName)["secrets"].$get())
|
|
1063
1117
|
),
|
|
1064
1118
|
get: withSchema(
|
|
1065
|
-
|
|
1066
|
-
orgId:
|
|
1067
|
-
projectId:
|
|
1068
|
-
envName:
|
|
1069
|
-
name:
|
|
1119
|
+
import_zod9.z.object({
|
|
1120
|
+
orgId: import_zod9.z.string().describe("Organization slug"),
|
|
1121
|
+
projectId: import_zod9.z.string().describe("Project ID"),
|
|
1122
|
+
envName: import_zod9.z.string().describe("Environment name"),
|
|
1123
|
+
name: import_zod9.z.string().describe("Secret name")
|
|
1070
1124
|
}),
|
|
1071
1125
|
(params) => call(
|
|
1072
1126
|
projEnv(params.orgId, params.projectId, params.envName)["secrets"][":name"].$get({ param: { name: params.name } })
|
|
1073
1127
|
)
|
|
1074
1128
|
),
|
|
1075
1129
|
create: withSchema(
|
|
1076
|
-
|
|
1077
|
-
orgId:
|
|
1078
|
-
projectId:
|
|
1079
|
-
envName:
|
|
1080
|
-
name:
|
|
1081
|
-
description:
|
|
1130
|
+
import_zod9.z.object({
|
|
1131
|
+
orgId: import_zod9.z.string().describe("Organization slug"),
|
|
1132
|
+
projectId: import_zod9.z.string().describe("Project ID"),
|
|
1133
|
+
envName: import_zod9.z.string().describe("Environment name"),
|
|
1134
|
+
name: import_zod9.z.string().describe("Secret name"),
|
|
1135
|
+
description: import_zod9.z.string().optional().describe("Description")
|
|
1082
1136
|
}),
|
|
1083
1137
|
(params) => {
|
|
1084
1138
|
const { orgId, projectId, envName, name, description } = params;
|
|
@@ -1088,23 +1142,23 @@ function createSecretsClient(projEnv) {
|
|
|
1088
1142
|
}
|
|
1089
1143
|
),
|
|
1090
1144
|
delete: withSchema(
|
|
1091
|
-
|
|
1092
|
-
orgId:
|
|
1093
|
-
projectId:
|
|
1094
|
-
envName:
|
|
1095
|
-
name:
|
|
1145
|
+
import_zod9.z.object({
|
|
1146
|
+
orgId: import_zod9.z.string().describe("Organization slug"),
|
|
1147
|
+
projectId: import_zod9.z.string().describe("Project ID"),
|
|
1148
|
+
envName: import_zod9.z.string().describe("Environment name"),
|
|
1149
|
+
name: import_zod9.z.string().describe("Secret name")
|
|
1096
1150
|
}),
|
|
1097
1151
|
(params) => call(
|
|
1098
1152
|
projEnv(params.orgId, params.projectId, params.envName)["secrets"][":name"].$delete({ param: { name: params.name } })
|
|
1099
1153
|
)
|
|
1100
1154
|
),
|
|
1101
1155
|
setValue: withSchema(
|
|
1102
|
-
|
|
1103
|
-
orgId:
|
|
1104
|
-
projectId:
|
|
1105
|
-
envName:
|
|
1106
|
-
name:
|
|
1107
|
-
value:
|
|
1156
|
+
import_zod9.z.object({
|
|
1157
|
+
orgId: import_zod9.z.string().describe("Organization slug"),
|
|
1158
|
+
projectId: import_zod9.z.string().describe("Project ID"),
|
|
1159
|
+
envName: import_zod9.z.string().describe("Environment name"),
|
|
1160
|
+
name: import_zod9.z.string().describe("Secret name"),
|
|
1161
|
+
value: import_zod9.z.string().min(1).describe("Secret value")
|
|
1108
1162
|
}),
|
|
1109
1163
|
(params) => {
|
|
1110
1164
|
const { orgId, projectId, envName, name, value } = params;
|
|
@@ -1120,10 +1174,10 @@ function createSecretsClient(projEnv) {
|
|
|
1120
1174
|
}
|
|
1121
1175
|
function createApplyClient(projEnv) {
|
|
1122
1176
|
return withSchema(
|
|
1123
|
-
|
|
1124
|
-
orgId:
|
|
1125
|
-
projectId:
|
|
1126
|
-
envName:
|
|
1177
|
+
import_types7.ApplyRequestSchema.extend({
|
|
1178
|
+
orgId: import_zod9.z.string().describe("Organization slug"),
|
|
1179
|
+
projectId: import_zod9.z.string().describe("Project ID"),
|
|
1180
|
+
envName: import_zod9.z.string().describe("Environment name")
|
|
1127
1181
|
}),
|
|
1128
1182
|
(params) => {
|
|
1129
1183
|
const { orgId, projectId, envName, ...body } = params;
|
|
@@ -1133,12 +1187,12 @@ function createApplyClient(projEnv) {
|
|
|
1133
1187
|
}
|
|
1134
1188
|
|
|
1135
1189
|
// src/github.ts
|
|
1136
|
-
var
|
|
1190
|
+
var import_zod10 = require("zod");
|
|
1137
1191
|
function createGithubClient(cloud, _baseUrl, _hcOpts) {
|
|
1138
1192
|
return {
|
|
1139
1193
|
connect: withSchema(
|
|
1140
|
-
|
|
1141
|
-
projectId:
|
|
1194
|
+
import_zod10.z.object({
|
|
1195
|
+
projectId: import_zod10.z.string().describe("Project name")
|
|
1142
1196
|
}),
|
|
1143
1197
|
// why: the install-url route has a "GitHub App not configured" branch
|
|
1144
1198
|
// that returns a bare `new Response(...)` (see notConfiguredResponse in
|
|
@@ -1148,14 +1202,14 @@ function createGithubClient(cloud, _baseUrl, _hcOpts) {
|
|
|
1148
1202
|
),
|
|
1149
1203
|
installations: {
|
|
1150
1204
|
list: withSchema(
|
|
1151
|
-
|
|
1152
|
-
orgId:
|
|
1205
|
+
import_zod10.z.object({
|
|
1206
|
+
orgId: import_zod10.z.string().describe("Organization slug")
|
|
1153
1207
|
}),
|
|
1154
1208
|
(params) => call(cloud.github.installations.$get({ query: params }))
|
|
1155
1209
|
),
|
|
1156
1210
|
repos: withSchema(
|
|
1157
|
-
|
|
1158
|
-
installationId:
|
|
1211
|
+
import_zod10.z.object({
|
|
1212
|
+
installationId: import_zod10.z.string().describe("Installation row ID")
|
|
1159
1213
|
}),
|
|
1160
1214
|
(params) => call(
|
|
1161
1215
|
cloud.github.installations[":installationId"].repos.$get({
|
|
@@ -1164,8 +1218,8 @@ function createGithubClient(cloud, _baseUrl, _hcOpts) {
|
|
|
1164
1218
|
)
|
|
1165
1219
|
),
|
|
1166
1220
|
disconnect: withSchema(
|
|
1167
|
-
|
|
1168
|
-
installationId:
|
|
1221
|
+
import_zod10.z.object({
|
|
1222
|
+
installationId: import_zod10.z.string().describe("Installation row ID")
|
|
1169
1223
|
}),
|
|
1170
1224
|
(params) => call(
|
|
1171
1225
|
cloud.github.installations[":installationId"].$delete({
|
|
@@ -1174,9 +1228,9 @@ function createGithubClient(cloud, _baseUrl, _hcOpts) {
|
|
|
1174
1228
|
)
|
|
1175
1229
|
),
|
|
1176
1230
|
recover: withSchema(
|
|
1177
|
-
|
|
1178
|
-
orgId:
|
|
1179
|
-
installationId:
|
|
1231
|
+
import_zod10.z.object({
|
|
1232
|
+
orgId: import_zod10.z.string().describe("Organization slug"),
|
|
1233
|
+
installationId: import_zod10.z.number().int().positive().describe("GitHub installation ID (from the GitHub install URL)")
|
|
1180
1234
|
}),
|
|
1181
1235
|
// why: same bare-Response inference break as `connect` (the route's
|
|
1182
1236
|
// not-configured branch returns `new Response(...)`), so the 200 body
|
|
@@ -1186,9 +1240,9 @@ function createGithubClient(cloud, _baseUrl, _hcOpts) {
|
|
|
1186
1240
|
},
|
|
1187
1241
|
projects: {
|
|
1188
1242
|
list: withSchema(
|
|
1189
|
-
|
|
1190
|
-
orgId:
|
|
1191
|
-
projectId:
|
|
1243
|
+
import_zod10.z.object({
|
|
1244
|
+
orgId: import_zod10.z.string().describe("Organization slug"),
|
|
1245
|
+
projectId: import_zod10.z.string().describe("Project name")
|
|
1192
1246
|
}),
|
|
1193
1247
|
(params) => call(
|
|
1194
1248
|
cloud.orgs[":orgId"].projects[":projectId"]["github-repos"].$get({
|
|
@@ -1197,11 +1251,11 @@ function createGithubClient(cloud, _baseUrl, _hcOpts) {
|
|
|
1197
1251
|
)
|
|
1198
1252
|
),
|
|
1199
1253
|
linkRepo: withSchema(
|
|
1200
|
-
|
|
1201
|
-
orgId:
|
|
1202
|
-
projectId:
|
|
1203
|
-
installationId:
|
|
1204
|
-
repoFullName:
|
|
1254
|
+
import_zod10.z.object({
|
|
1255
|
+
orgId: import_zod10.z.string().describe("Organization slug"),
|
|
1256
|
+
projectId: import_zod10.z.string().describe("Project name"),
|
|
1257
|
+
installationId: import_zod10.z.string().describe("github_installations.id (UUID)"),
|
|
1258
|
+
repoFullName: import_zod10.z.string().describe('GitHub repo "owner/name"')
|
|
1205
1259
|
}),
|
|
1206
1260
|
(params) => {
|
|
1207
1261
|
const { orgId, projectId, ...body } = params;
|
|
@@ -1214,10 +1268,10 @@ function createGithubClient(cloud, _baseUrl, _hcOpts) {
|
|
|
1214
1268
|
}
|
|
1215
1269
|
),
|
|
1216
1270
|
unlinkRepo: withSchema(
|
|
1217
|
-
|
|
1218
|
-
orgId:
|
|
1219
|
-
projectId:
|
|
1220
|
-
id:
|
|
1271
|
+
import_zod10.z.object({
|
|
1272
|
+
orgId: import_zod10.z.string().describe("Organization slug"),
|
|
1273
|
+
projectId: import_zod10.z.string().describe("Project name"),
|
|
1274
|
+
id: import_zod10.z.string().describe("project_github_repos.id (UUID) \u2014 returned by linkRepo")
|
|
1221
1275
|
}),
|
|
1222
1276
|
(params) => call(
|
|
1223
1277
|
cloud.orgs[":orgId"].projects[":projectId"]["github-repos"][":id"].$delete({
|
|
@@ -1230,23 +1284,23 @@ function createGithubClient(cloud, _baseUrl, _hcOpts) {
|
|
|
1230
1284
|
}
|
|
1231
1285
|
|
|
1232
1286
|
// src/blueprints.ts
|
|
1233
|
-
var
|
|
1234
|
-
var SpinInputSchema =
|
|
1235
|
-
orgId:
|
|
1236
|
-
blueprint:
|
|
1237
|
-
substrate:
|
|
1238
|
-
repo:
|
|
1239
|
-
prBase:
|
|
1240
|
-
githubToken:
|
|
1241
|
-
createRepo:
|
|
1242
|
-
createWorkspace:
|
|
1243
|
-
vars:
|
|
1287
|
+
var import_zod11 = require("zod");
|
|
1288
|
+
var SpinInputSchema = import_zod11.z.object({
|
|
1289
|
+
orgId: import_zod11.z.string().describe("Organization slug"),
|
|
1290
|
+
blueprint: import_zod11.z.string().describe("First-party blueprint name (e.g. k8s-fleet)"),
|
|
1291
|
+
substrate: import_zod11.z.enum(["bare-tf", "tfc", "atmos"]).optional(),
|
|
1292
|
+
repo: import_zod11.z.string().optional().describe("owner/repo to open the spin PR into (omit when createRepo is set)"),
|
|
1293
|
+
prBase: import_zod11.z.string().optional(),
|
|
1294
|
+
githubToken: import_zod11.z.string().optional(),
|
|
1295
|
+
createRepo: import_zod11.z.object({ name: import_zod11.z.string(), private: import_zod11.z.boolean().optional() }).optional().describe("Cloud opt-in: auto-create the target GitHub repo before spinning"),
|
|
1296
|
+
createWorkspace: import_zod11.z.object({ organization: import_zod11.z.string(), name: import_zod11.z.string(), apiToken: import_zod11.z.string(), apiBaseUrl: import_zod11.z.string().optional() }).optional().describe("Cloud opt-in: auto-create the TFC workspace shell before spinning"),
|
|
1297
|
+
vars: import_zod11.z.record(import_zod11.z.string()).default({})
|
|
1244
1298
|
});
|
|
1245
1299
|
function createBlueprintsClient(cloud) {
|
|
1246
1300
|
return {
|
|
1247
1301
|
list: () => call(cloud.blueprints.$get()),
|
|
1248
1302
|
get: withSchema(
|
|
1249
|
-
|
|
1303
|
+
import_zod11.z.object({ name: import_zod11.z.string().describe("Blueprint name") }),
|
|
1250
1304
|
(params) => call(cloud.blueprints[":name"].$get({ param: params }))
|
|
1251
1305
|
),
|
|
1252
1306
|
spin: withSchema(SpinInputSchema, (params) => {
|
|
@@ -1257,7 +1311,7 @@ function createBlueprintsClient(cloud) {
|
|
|
1257
1311
|
}
|
|
1258
1312
|
|
|
1259
1313
|
// src/export.ts
|
|
1260
|
-
var
|
|
1314
|
+
var import_zod12 = require("zod");
|
|
1261
1315
|
var SERVER_FIELDS = /* @__PURE__ */ new Set(["id", "projectId", "envId", "createdAt", "updatedAt"]);
|
|
1262
1316
|
function stripServerFields(row) {
|
|
1263
1317
|
const out = {};
|
|
@@ -1268,20 +1322,22 @@ function stripServerFields(row) {
|
|
|
1268
1322
|
}
|
|
1269
1323
|
function createExportCatalogFn(proj, projEnv) {
|
|
1270
1324
|
return withSchema(
|
|
1271
|
-
|
|
1272
|
-
orgId:
|
|
1273
|
-
projectId:
|
|
1274
|
-
envName:
|
|
1325
|
+
import_zod12.z.object({
|
|
1326
|
+
orgId: import_zod12.z.string().describe("Organization slug"),
|
|
1327
|
+
projectId: import_zod12.z.string().describe("Project ID"),
|
|
1328
|
+
envName: import_zod12.z.string().describe("Environment name to export secret declarations from")
|
|
1275
1329
|
}).describe("Export every catalog kind as a single apply-shaped payload"),
|
|
1276
1330
|
async (params) => {
|
|
1277
1331
|
const projClient = proj(params.orgId, params.projectId);
|
|
1278
1332
|
const envClient = projEnv(params.orgId, params.projectId, params.envName);
|
|
1279
|
-
const [entityTypes, cells, relationshipTypes, actions, secrets] = await Promise.all([
|
|
1333
|
+
const [entityTypes, cells, relationshipTypes, actions, secrets, deploymentTargetSets, deploymentTargets] = await Promise.all([
|
|
1280
1334
|
call(projClient["entity-types"].$get()),
|
|
1281
1335
|
call(projClient["cells"].$get()),
|
|
1282
1336
|
call(projClient["relationship-types"].$get()),
|
|
1283
1337
|
call(projClient["actions"].$get()),
|
|
1284
|
-
call(envClient["secrets"].$get())
|
|
1338
|
+
call(envClient["secrets"].$get()),
|
|
1339
|
+
call(projClient["deployment-target-sets"].$get()),
|
|
1340
|
+
call(projClient["deployment-targets"].$get())
|
|
1285
1341
|
]);
|
|
1286
1342
|
const items = [
|
|
1287
1343
|
...entityTypes.map(
|
|
@@ -1305,6 +1361,12 @@ function createExportCatalogFn(proj, projEnv) {
|
|
|
1305
1361
|
),
|
|
1306
1362
|
...secrets.map(
|
|
1307
1363
|
(r) => ({ kind: "Secret", ...stripServerFields(r) })
|
|
1364
|
+
),
|
|
1365
|
+
...deploymentTargetSets.map(
|
|
1366
|
+
(r) => ({ kind: "DeploymentTargetSet", ...stripServerFields(r) })
|
|
1367
|
+
),
|
|
1368
|
+
...deploymentTargets.map(
|
|
1369
|
+
(r) => ({ kind: "DeploymentTarget", ...stripServerFields(r) })
|
|
1308
1370
|
)
|
|
1309
1371
|
];
|
|
1310
1372
|
return { items };
|
|
@@ -1313,14 +1375,15 @@ function createExportCatalogFn(proj, projEnv) {
|
|
|
1313
1375
|
}
|
|
1314
1376
|
|
|
1315
1377
|
// src/catalog-revisions.ts
|
|
1316
|
-
var
|
|
1378
|
+
var import_zod13 = require("zod");
|
|
1317
1379
|
function createCatalogRevisionsClient(proj) {
|
|
1318
1380
|
return {
|
|
1319
1381
|
list: withSchema(
|
|
1320
|
-
|
|
1321
|
-
orgId:
|
|
1322
|
-
projectId:
|
|
1323
|
-
limit:
|
|
1382
|
+
import_zod13.z.object({
|
|
1383
|
+
orgId: import_zod13.z.string().describe("Organization slug"),
|
|
1384
|
+
projectId: import_zod13.z.string().describe("Project ID"),
|
|
1385
|
+
limit: import_zod13.z.coerce.number().int().min(1).max(200).optional().describe("Max revisions to return (1-200)"),
|
|
1386
|
+
before: import_zod13.z.string().datetime().optional().describe("ISO timestamp; only revisions with appliedAt strictly before this are returned (keyset upper-bound)")
|
|
1324
1387
|
}),
|
|
1325
1388
|
(params) => {
|
|
1326
1389
|
const { orgId, projectId, ...query } = params;
|
|
@@ -1330,20 +1393,20 @@ function createCatalogRevisionsClient(proj) {
|
|
|
1330
1393
|
}
|
|
1331
1394
|
),
|
|
1332
1395
|
get: withSchema(
|
|
1333
|
-
|
|
1334
|
-
orgId:
|
|
1335
|
-
projectId:
|
|
1336
|
-
id:
|
|
1396
|
+
import_zod13.z.object({
|
|
1397
|
+
orgId: import_zod13.z.string().describe("Organization slug"),
|
|
1398
|
+
projectId: import_zod13.z.string().describe("Project ID"),
|
|
1399
|
+
id: import_zod13.z.string().uuid().describe("Revision ID")
|
|
1337
1400
|
}),
|
|
1338
1401
|
(params) => call(
|
|
1339
1402
|
proj(params.orgId, params.projectId)["catalog-revisions"][":id"].$get({ param: { id: params.id } })
|
|
1340
1403
|
)
|
|
1341
1404
|
),
|
|
1342
1405
|
snapshots: withSchema(
|
|
1343
|
-
|
|
1344
|
-
orgId:
|
|
1345
|
-
projectId:
|
|
1346
|
-
id:
|
|
1406
|
+
import_zod13.z.object({
|
|
1407
|
+
orgId: import_zod13.z.string().describe("Organization slug"),
|
|
1408
|
+
projectId: import_zod13.z.string().describe("Project ID"),
|
|
1409
|
+
id: import_zod13.z.string().uuid().describe("Revision ID to read snapshots for")
|
|
1347
1410
|
}),
|
|
1348
1411
|
(params) => call(
|
|
1349
1412
|
proj(params.orgId, params.projectId)["catalog-revisions"][":id"]["snapshots"].$get({
|
|
@@ -1357,12 +1420,12 @@ function createCatalogRevisionsClient(proj) {
|
|
|
1357
1420
|
* `force: true`, mirroring POST /apply.
|
|
1358
1421
|
*/
|
|
1359
1422
|
rollback: withSchema(
|
|
1360
|
-
|
|
1361
|
-
orgId:
|
|
1362
|
-
projectId:
|
|
1363
|
-
id:
|
|
1364
|
-
hunkId:
|
|
1365
|
-
force:
|
|
1423
|
+
import_zod13.z.object({
|
|
1424
|
+
orgId: import_zod13.z.string().describe("Organization slug"),
|
|
1425
|
+
projectId: import_zod13.z.string().describe("Project ID"),
|
|
1426
|
+
id: import_zod13.z.string().uuid().describe("Revision ID to roll back to"),
|
|
1427
|
+
hunkId: import_zod13.z.string().uuid().optional().describe("Single-hunk filter"),
|
|
1428
|
+
force: import_zod13.z.boolean().optional().describe("Required if the inverse diff is destructive")
|
|
1366
1429
|
}),
|
|
1367
1430
|
(params) => {
|
|
1368
1431
|
const { orgId, projectId, id, hunkId, force } = params;
|
|
@@ -1379,20 +1442,21 @@ function createCatalogRevisionsClient(proj) {
|
|
|
1379
1442
|
}
|
|
1380
1443
|
|
|
1381
1444
|
// src/audit-events.ts
|
|
1382
|
-
var
|
|
1445
|
+
var import_zod14 = require("zod");
|
|
1383
1446
|
function createAuditEventsClient(proj) {
|
|
1384
1447
|
return {
|
|
1385
1448
|
list: withSchema(
|
|
1386
|
-
|
|
1387
|
-
orgId:
|
|
1388
|
-
projectId:
|
|
1389
|
-
envName:
|
|
1390
|
-
actorType:
|
|
1391
|
-
actorId:
|
|
1392
|
-
action:
|
|
1393
|
-
resourceKind:
|
|
1394
|
-
since:
|
|
1395
|
-
|
|
1449
|
+
import_zod14.z.object({
|
|
1450
|
+
orgId: import_zod14.z.string().describe("Organization slug"),
|
|
1451
|
+
projectId: import_zod14.z.string().describe("Project name"),
|
|
1452
|
+
envName: import_zod14.z.string().optional().describe("Filter to a single env"),
|
|
1453
|
+
actorType: import_zod14.z.enum(["user", "token"]).optional().describe("Filter by actor type"),
|
|
1454
|
+
actorId: import_zod14.z.string().optional().describe("Filter by actor (user.id or apikey.id)"),
|
|
1455
|
+
action: import_zod14.z.string().optional().describe('Comma-separated actions (e.g. "create,delete")'),
|
|
1456
|
+
resourceKind: import_zod14.z.string().optional().describe("Filter to one resource kind (Entity | Token | Member | \u2026)"),
|
|
1457
|
+
since: import_zod14.z.string().datetime().optional().describe("ISO timestamp; only events strictly after this are returned"),
|
|
1458
|
+
before: import_zod14.z.string().datetime().optional().describe("ISO timestamp; only events strictly before this are returned (keyset upper-bound)"),
|
|
1459
|
+
limit: import_zod14.z.coerce.number().int().min(1).max(500).optional().describe("Max rows (1-500)")
|
|
1396
1460
|
}).describe("List audit events for a project \u2014 auditor-friendly read-only feed"),
|
|
1397
1461
|
(params) => {
|
|
1398
1462
|
const { orgId, projectId, ...query } = params;
|
|
@@ -1403,21 +1467,21 @@ function createAuditEventsClient(proj) {
|
|
|
1403
1467
|
}
|
|
1404
1468
|
|
|
1405
1469
|
// src/environments.ts
|
|
1406
|
-
var
|
|
1470
|
+
var import_zod15 = require("zod");
|
|
1407
1471
|
function createEnvironmentsClient(proj) {
|
|
1408
1472
|
return {
|
|
1409
1473
|
list: withSchema(
|
|
1410
|
-
|
|
1411
|
-
orgId:
|
|
1412
|
-
projectId:
|
|
1474
|
+
import_zod15.z.object({
|
|
1475
|
+
orgId: import_zod15.z.string().describe("Organization slug"),
|
|
1476
|
+
projectId: import_zod15.z.string().describe("Project name")
|
|
1413
1477
|
}),
|
|
1414
1478
|
(params) => call(proj(params.orgId, params.projectId)["environments"].$get())
|
|
1415
1479
|
),
|
|
1416
1480
|
create: withSchema(
|
|
1417
|
-
|
|
1418
|
-
orgId:
|
|
1419
|
-
projectId:
|
|
1420
|
-
name:
|
|
1481
|
+
import_zod15.z.object({
|
|
1482
|
+
orgId: import_zod15.z.string().describe("Organization slug"),
|
|
1483
|
+
projectId: import_zod15.z.string().describe("Project name"),
|
|
1484
|
+
name: import_zod15.z.string().min(1).max(31).regex(/^[a-z0-9][a-z0-9-]{0,30}$/).describe("Environment name (lowercase letters, digits, hyphens; max 31 chars)")
|
|
1421
1485
|
}),
|
|
1422
1486
|
(params) => {
|
|
1423
1487
|
const { orgId, projectId, name } = params;
|
|
@@ -1425,10 +1489,10 @@ function createEnvironmentsClient(proj) {
|
|
|
1425
1489
|
}
|
|
1426
1490
|
),
|
|
1427
1491
|
delete: withSchema(
|
|
1428
|
-
|
|
1429
|
-
orgId:
|
|
1430
|
-
projectId:
|
|
1431
|
-
name:
|
|
1492
|
+
import_zod15.z.object({
|
|
1493
|
+
orgId: import_zod15.z.string().describe("Organization slug"),
|
|
1494
|
+
projectId: import_zod15.z.string().describe("Project name"),
|
|
1495
|
+
name: import_zod15.z.string().describe("Environment name")
|
|
1432
1496
|
}),
|
|
1433
1497
|
(params) => call(
|
|
1434
1498
|
proj(params.orgId, params.projectId)["environments"][":envName"].$delete({
|
|
@@ -1440,19 +1504,20 @@ function createEnvironmentsClient(proj) {
|
|
|
1440
1504
|
}
|
|
1441
1505
|
|
|
1442
1506
|
// src/drift-events.ts
|
|
1443
|
-
var
|
|
1507
|
+
var import_zod16 = require("zod");
|
|
1444
1508
|
function createDriftEventsClient(projEnv) {
|
|
1445
1509
|
return {
|
|
1446
1510
|
list: withSchema(
|
|
1447
|
-
|
|
1448
|
-
orgId:
|
|
1449
|
-
projectId:
|
|
1450
|
-
envName:
|
|
1451
|
-
status:
|
|
1452
|
-
kind:
|
|
1453
|
-
entityName:
|
|
1454
|
-
since:
|
|
1455
|
-
|
|
1511
|
+
import_zod16.z.object({
|
|
1512
|
+
orgId: import_zod16.z.string().describe("Organization slug"),
|
|
1513
|
+
projectId: import_zod16.z.string().describe("Project name"),
|
|
1514
|
+
envName: import_zod16.z.string().describe("Environment name"),
|
|
1515
|
+
status: import_zod16.z.enum(["open", "accepted", "reapplied", "snoozed"]).optional(),
|
|
1516
|
+
kind: import_zod16.z.string().optional().describe("Filter by entity type name"),
|
|
1517
|
+
entityName: import_zod16.z.string().optional().describe("Filter by entity name"),
|
|
1518
|
+
since: import_zod16.z.string().optional().describe("ISO timestamp lower bound on detectedAt"),
|
|
1519
|
+
before: import_zod16.z.string().datetime().optional().describe("ISO timestamp upper bound on detectedAt (keyset cursor)"),
|
|
1520
|
+
limit: import_zod16.z.coerce.number().int().min(1).max(500).optional()
|
|
1456
1521
|
}),
|
|
1457
1522
|
(params) => {
|
|
1458
1523
|
const { orgId, projectId, envName, ...query } = params;
|
|
@@ -1462,19 +1527,19 @@ function createDriftEventsClient(projEnv) {
|
|
|
1462
1527
|
}
|
|
1463
1528
|
),
|
|
1464
1529
|
count: withSchema(
|
|
1465
|
-
|
|
1466
|
-
orgId:
|
|
1467
|
-
projectId:
|
|
1468
|
-
envName:
|
|
1530
|
+
import_zod16.z.object({
|
|
1531
|
+
orgId: import_zod16.z.string().describe("Organization slug"),
|
|
1532
|
+
projectId: import_zod16.z.string().describe("Project name"),
|
|
1533
|
+
envName: import_zod16.z.string().describe("Environment name")
|
|
1469
1534
|
}),
|
|
1470
1535
|
(params) => call(projEnv(params.orgId, params.projectId, params.envName)["drift-events"].count.$get())
|
|
1471
1536
|
),
|
|
1472
1537
|
get: withSchema(
|
|
1473
|
-
|
|
1474
|
-
orgId:
|
|
1475
|
-
projectId:
|
|
1476
|
-
envName:
|
|
1477
|
-
id:
|
|
1538
|
+
import_zod16.z.object({
|
|
1539
|
+
orgId: import_zod16.z.string().describe("Organization slug"),
|
|
1540
|
+
projectId: import_zod16.z.string().describe("Project name"),
|
|
1541
|
+
envName: import_zod16.z.string().describe("Environment name"),
|
|
1542
|
+
id: import_zod16.z.string().uuid()
|
|
1478
1543
|
}),
|
|
1479
1544
|
(params) => call(
|
|
1480
1545
|
projEnv(params.orgId, params.projectId, params.envName)["drift-events"][":id"].$get({
|
|
@@ -1483,11 +1548,11 @@ function createDriftEventsClient(projEnv) {
|
|
|
1483
1548
|
)
|
|
1484
1549
|
),
|
|
1485
1550
|
accept: withSchema(
|
|
1486
|
-
|
|
1487
|
-
orgId:
|
|
1488
|
-
projectId:
|
|
1489
|
-
envName:
|
|
1490
|
-
id:
|
|
1551
|
+
import_zod16.z.object({
|
|
1552
|
+
orgId: import_zod16.z.string().describe("Organization slug"),
|
|
1553
|
+
projectId: import_zod16.z.string().describe("Project name"),
|
|
1554
|
+
envName: import_zod16.z.string().describe("Environment name"),
|
|
1555
|
+
id: import_zod16.z.string().uuid()
|
|
1491
1556
|
}),
|
|
1492
1557
|
(params) => call(
|
|
1493
1558
|
projEnv(params.orgId, params.projectId, params.envName)["drift-events"][":id"].accept.$post({
|
|
@@ -1496,11 +1561,11 @@ function createDriftEventsClient(projEnv) {
|
|
|
1496
1561
|
)
|
|
1497
1562
|
),
|
|
1498
1563
|
reapply: withSchema(
|
|
1499
|
-
|
|
1500
|
-
orgId:
|
|
1501
|
-
projectId:
|
|
1502
|
-
envName:
|
|
1503
|
-
id:
|
|
1564
|
+
import_zod16.z.object({
|
|
1565
|
+
orgId: import_zod16.z.string().describe("Organization slug"),
|
|
1566
|
+
projectId: import_zod16.z.string().describe("Project name"),
|
|
1567
|
+
envName: import_zod16.z.string().describe("Environment name"),
|
|
1568
|
+
id: import_zod16.z.string().uuid()
|
|
1504
1569
|
}),
|
|
1505
1570
|
(params) => call(
|
|
1506
1571
|
projEnv(params.orgId, params.projectId, params.envName)["drift-events"][":id"].reapply.$post({
|
|
@@ -1509,12 +1574,12 @@ function createDriftEventsClient(projEnv) {
|
|
|
1509
1574
|
)
|
|
1510
1575
|
),
|
|
1511
1576
|
snooze: withSchema(
|
|
1512
|
-
|
|
1513
|
-
orgId:
|
|
1514
|
-
projectId:
|
|
1515
|
-
envName:
|
|
1516
|
-
id:
|
|
1517
|
-
untilSeconds:
|
|
1577
|
+
import_zod16.z.object({
|
|
1578
|
+
orgId: import_zod16.z.string().describe("Organization slug"),
|
|
1579
|
+
projectId: import_zod16.z.string().describe("Project name"),
|
|
1580
|
+
envName: import_zod16.z.string().describe("Environment name"),
|
|
1581
|
+
id: import_zod16.z.string().uuid(),
|
|
1582
|
+
untilSeconds: import_zod16.z.number().int().positive().optional()
|
|
1518
1583
|
}),
|
|
1519
1584
|
(params) => call(
|
|
1520
1585
|
projEnv(params.orgId, params.projectId, params.envName)["drift-events"][":id"].snooze.$post({
|
|
@@ -1527,15 +1592,15 @@ function createDriftEventsClient(projEnv) {
|
|
|
1527
1592
|
}
|
|
1528
1593
|
|
|
1529
1594
|
// src/stats.ts
|
|
1530
|
-
var
|
|
1531
|
-
var WindowSchema =
|
|
1532
|
-
var BucketSchema =
|
|
1595
|
+
var import_zod17 = require("zod");
|
|
1596
|
+
var WindowSchema = import_zod17.z.enum(["1h", "24h", "7d"]).optional().describe("Time window \u2014 default 24h");
|
|
1597
|
+
var BucketSchema = import_zod17.z.enum(["1m", "5m", "1h", "1d"]).optional().describe("Bucket granularity \u2014 default 1h");
|
|
1533
1598
|
function createStatsClient(proj) {
|
|
1534
1599
|
return {
|
|
1535
1600
|
entitiesByState: withSchema(
|
|
1536
|
-
|
|
1537
|
-
orgId:
|
|
1538
|
-
projectId:
|
|
1601
|
+
import_zod17.z.object({
|
|
1602
|
+
orgId: import_zod17.z.string().describe("Organization slug"),
|
|
1603
|
+
projectId: import_zod17.z.string().describe("Project name"),
|
|
1539
1604
|
window: WindowSchema,
|
|
1540
1605
|
bucket: BucketSchema
|
|
1541
1606
|
}),
|
|
@@ -1545,9 +1610,9 @@ function createStatsClient(proj) {
|
|
|
1545
1610
|
}
|
|
1546
1611
|
),
|
|
1547
1612
|
runsByType: withSchema(
|
|
1548
|
-
|
|
1549
|
-
orgId:
|
|
1550
|
-
projectId:
|
|
1613
|
+
import_zod17.z.object({
|
|
1614
|
+
orgId: import_zod17.z.string().describe("Organization slug"),
|
|
1615
|
+
projectId: import_zod17.z.string().describe("Project name"),
|
|
1551
1616
|
window: WindowSchema
|
|
1552
1617
|
}),
|
|
1553
1618
|
(params) => {
|
|
@@ -1556,9 +1621,9 @@ function createStatsClient(proj) {
|
|
|
1556
1621
|
}
|
|
1557
1622
|
),
|
|
1558
1623
|
failingKinds: withSchema(
|
|
1559
|
-
|
|
1560
|
-
orgId:
|
|
1561
|
-
projectId:
|
|
1624
|
+
import_zod17.z.object({
|
|
1625
|
+
orgId: import_zod17.z.string().describe("Organization slug"),
|
|
1626
|
+
projectId: import_zod17.z.string().describe("Project name"),
|
|
1562
1627
|
window: WindowSchema
|
|
1563
1628
|
}),
|
|
1564
1629
|
(params) => {
|
|
@@ -1567,10 +1632,10 @@ function createStatsClient(proj) {
|
|
|
1567
1632
|
}
|
|
1568
1633
|
),
|
|
1569
1634
|
driftDensity: withSchema(
|
|
1570
|
-
|
|
1571
|
-
orgId:
|
|
1572
|
-
projectId:
|
|
1573
|
-
dim:
|
|
1635
|
+
import_zod17.z.object({
|
|
1636
|
+
orgId: import_zod17.z.string().describe("Organization slug"),
|
|
1637
|
+
projectId: import_zod17.z.string().describe("Project name"),
|
|
1638
|
+
dim: import_zod17.z.string().optional().describe('Dimensions to bucket \u2014 e.g. "kind,cell"')
|
|
1574
1639
|
}),
|
|
1575
1640
|
(params) => {
|
|
1576
1641
|
const { orgId, projectId, ...query } = params;
|
|
@@ -1581,32 +1646,32 @@ function createStatsClient(proj) {
|
|
|
1581
1646
|
}
|
|
1582
1647
|
|
|
1583
1648
|
// src/graph-views.ts
|
|
1584
|
-
var
|
|
1585
|
-
var ViewConfigSchema =
|
|
1586
|
-
var PinnedPositionsSchema =
|
|
1649
|
+
var import_zod18 = require("zod");
|
|
1650
|
+
var ViewConfigSchema = import_zod18.z.unknown();
|
|
1651
|
+
var PinnedPositionsSchema = import_zod18.z.record(import_zod18.z.string(), import_zod18.z.object({ x: import_zod18.z.number(), y: import_zod18.z.number() })).nullable();
|
|
1587
1652
|
function createGraphViewsClient(proj) {
|
|
1588
1653
|
return {
|
|
1589
1654
|
list: withSchema(
|
|
1590
|
-
|
|
1591
|
-
orgId:
|
|
1592
|
-
projectId:
|
|
1655
|
+
import_zod18.z.object({
|
|
1656
|
+
orgId: import_zod18.z.string().describe("Organization slug"),
|
|
1657
|
+
projectId: import_zod18.z.string().describe("Project ID")
|
|
1593
1658
|
}),
|
|
1594
1659
|
(params) => call(proj(params.orgId, params.projectId)["graph-views"].$get())
|
|
1595
1660
|
),
|
|
1596
1661
|
get: withSchema(
|
|
1597
|
-
|
|
1598
|
-
orgId:
|
|
1599
|
-
projectId:
|
|
1600
|
-
id:
|
|
1662
|
+
import_zod18.z.object({
|
|
1663
|
+
orgId: import_zod18.z.string().describe("Organization slug"),
|
|
1664
|
+
projectId: import_zod18.z.string().describe("Project ID"),
|
|
1665
|
+
id: import_zod18.z.string().describe("View id")
|
|
1601
1666
|
}),
|
|
1602
1667
|
(params) => call(proj(params.orgId, params.projectId)["graph-views"][":id"].$get({ param: { id: params.id } }))
|
|
1603
1668
|
),
|
|
1604
1669
|
create: withSchema(
|
|
1605
|
-
|
|
1606
|
-
orgId:
|
|
1607
|
-
projectId:
|
|
1608
|
-
name:
|
|
1609
|
-
scope:
|
|
1670
|
+
import_zod18.z.object({
|
|
1671
|
+
orgId: import_zod18.z.string().describe("Organization slug"),
|
|
1672
|
+
projectId: import_zod18.z.string().describe("Project ID"),
|
|
1673
|
+
name: import_zod18.z.string().describe("View name"),
|
|
1674
|
+
scope: import_zod18.z.enum(["user", "project"]).describe("Personal or project scope"),
|
|
1610
1675
|
config: ViewConfigSchema.describe("ViewConfig JSON"),
|
|
1611
1676
|
pinnedPositions: PinnedPositionsSchema.optional().describe("Pinned node positions")
|
|
1612
1677
|
}),
|
|
@@ -1616,11 +1681,11 @@ function createGraphViewsClient(proj) {
|
|
|
1616
1681
|
}
|
|
1617
1682
|
),
|
|
1618
1683
|
update: withSchema(
|
|
1619
|
-
|
|
1620
|
-
orgId:
|
|
1621
|
-
projectId:
|
|
1622
|
-
id:
|
|
1623
|
-
name:
|
|
1684
|
+
import_zod18.z.object({
|
|
1685
|
+
orgId: import_zod18.z.string().describe("Organization slug"),
|
|
1686
|
+
projectId: import_zod18.z.string().describe("Project ID"),
|
|
1687
|
+
id: import_zod18.z.string().describe("View id"),
|
|
1688
|
+
name: import_zod18.z.string().optional().describe("New name"),
|
|
1624
1689
|
config: ViewConfigSchema.optional().describe("Replacement ViewConfig JSON"),
|
|
1625
1690
|
pinnedPositions: PinnedPositionsSchema.optional().describe("Replacement pinned positions")
|
|
1626
1691
|
}),
|
|
@@ -1632,18 +1697,18 @@ function createGraphViewsClient(proj) {
|
|
|
1632
1697
|
}
|
|
1633
1698
|
),
|
|
1634
1699
|
delete: withSchema(
|
|
1635
|
-
|
|
1636
|
-
orgId:
|
|
1637
|
-
projectId:
|
|
1638
|
-
id:
|
|
1700
|
+
import_zod18.z.object({
|
|
1701
|
+
orgId: import_zod18.z.string().describe("Organization slug"),
|
|
1702
|
+
projectId: import_zod18.z.string().describe("Project ID"),
|
|
1703
|
+
id: import_zod18.z.string().describe("View id")
|
|
1639
1704
|
}),
|
|
1640
1705
|
(params) => call(proj(params.orgId, params.projectId)["graph-views"][":id"].$delete({ param: { id: params.id } }))
|
|
1641
1706
|
),
|
|
1642
1707
|
setDefault: withSchema(
|
|
1643
|
-
|
|
1644
|
-
orgId:
|
|
1645
|
-
projectId:
|
|
1646
|
-
id:
|
|
1708
|
+
import_zod18.z.object({
|
|
1709
|
+
orgId: import_zod18.z.string().describe("Organization slug"),
|
|
1710
|
+
projectId: import_zod18.z.string().describe("Project ID"),
|
|
1711
|
+
id: import_zod18.z.string().describe("View id")
|
|
1647
1712
|
}),
|
|
1648
1713
|
(params) => call(
|
|
1649
1714
|
proj(params.orgId, params.projectId)["graph-views"][":id"]["default"].$patch({
|
|
@@ -1655,15 +1720,15 @@ function createGraphViewsClient(proj) {
|
|
|
1655
1720
|
}
|
|
1656
1721
|
|
|
1657
1722
|
// src/notifications.ts
|
|
1658
|
-
var
|
|
1723
|
+
var import_zod19 = require("zod");
|
|
1659
1724
|
var import_client2 = require("hono/client");
|
|
1660
1725
|
function createNotificationsClient(baseUrl, hcOpts) {
|
|
1661
1726
|
const c = (0, import_client2.hc)(`${baseUrl}/notifications`, hcOpts);
|
|
1662
1727
|
return {
|
|
1663
1728
|
list: withSchema(
|
|
1664
|
-
|
|
1665
|
-
limit:
|
|
1666
|
-
unread:
|
|
1729
|
+
import_zod19.z.object({
|
|
1730
|
+
limit: import_zod19.z.coerce.number().int().min(1).max(100).optional(),
|
|
1731
|
+
unread: import_zod19.z.boolean().optional()
|
|
1667
1732
|
}),
|
|
1668
1733
|
(params) => {
|
|
1669
1734
|
const query = {};
|
|
@@ -1673,18 +1738,18 @@ function createNotificationsClient(baseUrl, hcOpts) {
|
|
|
1673
1738
|
}
|
|
1674
1739
|
),
|
|
1675
1740
|
read: withSchema(
|
|
1676
|
-
|
|
1741
|
+
import_zod19.z.object({ id: import_zod19.z.string().uuid() }),
|
|
1677
1742
|
(params) => call(c[":id"].read.$post({ param: { id: params.id } }))
|
|
1678
1743
|
),
|
|
1679
1744
|
readAll: withSchema(
|
|
1680
|
-
|
|
1745
|
+
import_zod19.z.object({}),
|
|
1681
1746
|
() => call(c["read-all"].$post())
|
|
1682
1747
|
)
|
|
1683
1748
|
};
|
|
1684
1749
|
}
|
|
1685
1750
|
|
|
1686
1751
|
// src/audit-export.ts
|
|
1687
|
-
var
|
|
1752
|
+
var import_zod20 = require("zod");
|
|
1688
1753
|
async function rawRequest(baseUrl, hcOpts, path, init = {}) {
|
|
1689
1754
|
const fetchImpl = hcOpts?.fetch ?? fetch;
|
|
1690
1755
|
const rawHeaders = hcOpts?.headers;
|
|
@@ -1713,19 +1778,19 @@ function createAuditExportClient(baseUrl, hcOpts) {
|
|
|
1713
1778
|
return {
|
|
1714
1779
|
/** GET /orgs/:orgId/audit-export/config — returns current config or throws 404. */
|
|
1715
1780
|
getConfig: withSchema(
|
|
1716
|
-
|
|
1781
|
+
import_zod20.z.object({ orgId: import_zod20.z.string().describe("Organization ID") }),
|
|
1717
1782
|
async (params) => callRaw(
|
|
1718
1783
|
await rawRequest(baseUrl, hcOpts, `/orgs/${params.orgId}/audit-export/config`)
|
|
1719
1784
|
)
|
|
1720
1785
|
),
|
|
1721
1786
|
/** POST /orgs/:orgId/audit-export/config — upsert the S3 export config. */
|
|
1722
1787
|
setConfig: withSchema(
|
|
1723
|
-
|
|
1724
|
-
orgId:
|
|
1725
|
-
bucket:
|
|
1726
|
-
region:
|
|
1727
|
-
roleArn:
|
|
1728
|
-
enabled:
|
|
1788
|
+
import_zod20.z.object({
|
|
1789
|
+
orgId: import_zod20.z.string().describe("Organization ID"),
|
|
1790
|
+
bucket: import_zod20.z.string().describe("S3 bucket name"),
|
|
1791
|
+
region: import_zod20.z.string().describe("AWS region"),
|
|
1792
|
+
roleArn: import_zod20.z.string().describe("IAM role ARN for assume-role"),
|
|
1793
|
+
enabled: import_zod20.z.boolean().optional().describe("Enable/disable export")
|
|
1729
1794
|
}),
|
|
1730
1795
|
async (params) => {
|
|
1731
1796
|
const { orgId, ...body } = params;
|
|
@@ -1740,11 +1805,11 @@ function createAuditExportClient(baseUrl, hcOpts) {
|
|
|
1740
1805
|
),
|
|
1741
1806
|
/** POST /orgs/:orgId/audit-export/test-connection — dry-run write+delete. */
|
|
1742
1807
|
testConnection: withSchema(
|
|
1743
|
-
|
|
1744
|
-
orgId:
|
|
1745
|
-
bucket:
|
|
1746
|
-
region:
|
|
1747
|
-
roleArn:
|
|
1808
|
+
import_zod20.z.object({
|
|
1809
|
+
orgId: import_zod20.z.string().describe("Organization ID"),
|
|
1810
|
+
bucket: import_zod20.z.string().describe("S3 bucket name"),
|
|
1811
|
+
region: import_zod20.z.string().describe("AWS region"),
|
|
1812
|
+
roleArn: import_zod20.z.string().describe("IAM role ARN for assume-role")
|
|
1748
1813
|
}),
|
|
1749
1814
|
async (params) => {
|
|
1750
1815
|
const { orgId, ...body } = params;
|
|
@@ -1759,9 +1824,9 @@ function createAuditExportClient(baseUrl, hcOpts) {
|
|
|
1759
1824
|
),
|
|
1760
1825
|
/** GET /orgs/:orgId/audit-export/runs — recent batch run history. */
|
|
1761
1826
|
listRuns: withSchema(
|
|
1762
|
-
|
|
1763
|
-
orgId:
|
|
1764
|
-
limit:
|
|
1827
|
+
import_zod20.z.object({
|
|
1828
|
+
orgId: import_zod20.z.string().describe("Organization ID"),
|
|
1829
|
+
limit: import_zod20.z.number().optional().describe("Max results (default 20, max 100)")
|
|
1765
1830
|
}),
|
|
1766
1831
|
async (params) => {
|
|
1767
1832
|
const qs = params.limit ? `?limit=${params.limit}` : "";
|
|
@@ -1805,33 +1870,33 @@ function createUserPreferencesClient(baseUrl, hcOpts) {
|
|
|
1805
1870
|
}
|
|
1806
1871
|
|
|
1807
1872
|
// src/import-sources.ts
|
|
1808
|
-
var
|
|
1809
|
-
var SourceKindEnum =
|
|
1810
|
-
var PolicyEnum =
|
|
1873
|
+
var import_zod21 = require("zod");
|
|
1874
|
+
var SourceKindEnum = import_zod21.z.enum(["tf-state", "atmos-manifests"]);
|
|
1875
|
+
var PolicyEnum = import_zod21.z.enum(["auto-update", "human-approval"]);
|
|
1811
1876
|
function createImportSourcesClient(proj) {
|
|
1812
1877
|
return {
|
|
1813
1878
|
list: withSchema(
|
|
1814
|
-
|
|
1815
|
-
orgId:
|
|
1816
|
-
projectId:
|
|
1879
|
+
import_zod21.z.object({
|
|
1880
|
+
orgId: import_zod21.z.string().describe("Organization slug"),
|
|
1881
|
+
projectId: import_zod21.z.string().describe("Project ID")
|
|
1817
1882
|
}),
|
|
1818
1883
|
(params) => call(proj(params.orgId, params.projectId)["import-sources"].$get())
|
|
1819
1884
|
),
|
|
1820
1885
|
get: withSchema(
|
|
1821
|
-
|
|
1822
|
-
orgId:
|
|
1823
|
-
projectId:
|
|
1824
|
-
id:
|
|
1886
|
+
import_zod21.z.object({
|
|
1887
|
+
orgId: import_zod21.z.string().describe("Organization slug"),
|
|
1888
|
+
projectId: import_zod21.z.string().describe("Project ID"),
|
|
1889
|
+
id: import_zod21.z.string().uuid().describe("ImportSource ID")
|
|
1825
1890
|
}),
|
|
1826
1891
|
(params) => call(proj(params.orgId, params.projectId)["import-sources"][":id"].$get({ param: { id: params.id } }))
|
|
1827
1892
|
),
|
|
1828
1893
|
registerOrUpdate: withSchema(
|
|
1829
|
-
|
|
1830
|
-
orgId:
|
|
1831
|
-
projectId:
|
|
1832
|
-
envName:
|
|
1894
|
+
import_zod21.z.object({
|
|
1895
|
+
orgId: import_zod21.z.string().describe("Organization slug"),
|
|
1896
|
+
projectId: import_zod21.z.string().describe("Project ID"),
|
|
1897
|
+
envName: import_zod21.z.string().describe("Env name the source belongs to"),
|
|
1833
1898
|
sourceKind: SourceKindEnum,
|
|
1834
|
-
sourceUri:
|
|
1899
|
+
sourceUri: import_zod21.z.string().describe("Stable URI identifying the source"),
|
|
1835
1900
|
reconciliationPolicy: PolicyEnum.optional()
|
|
1836
1901
|
}),
|
|
1837
1902
|
(params) => {
|
|
@@ -1840,13 +1905,13 @@ function createImportSourcesClient(proj) {
|
|
|
1840
1905
|
}
|
|
1841
1906
|
),
|
|
1842
1907
|
rescan: withSchema(
|
|
1843
|
-
|
|
1844
|
-
orgId:
|
|
1845
|
-
projectId:
|
|
1846
|
-
id:
|
|
1847
|
-
envName:
|
|
1848
|
-
items:
|
|
1849
|
-
deletions:
|
|
1908
|
+
import_zod21.z.object({
|
|
1909
|
+
orgId: import_zod21.z.string().describe("Organization slug"),
|
|
1910
|
+
projectId: import_zod21.z.string().describe("Project ID"),
|
|
1911
|
+
id: import_zod21.z.string().uuid(),
|
|
1912
|
+
envName: import_zod21.z.string(),
|
|
1913
|
+
items: import_zod21.z.array(import_zod21.z.unknown()),
|
|
1914
|
+
deletions: import_zod21.z.array(import_zod21.z.object({ kind: import_zod21.z.string(), name: import_zod21.z.string() })).optional()
|
|
1850
1915
|
}),
|
|
1851
1916
|
(params) => {
|
|
1852
1917
|
const { orgId, projectId, id, ...body } = params;
|
|
@@ -1862,19 +1927,19 @@ function createImportSourcesClient(proj) {
|
|
|
1862
1927
|
}
|
|
1863
1928
|
),
|
|
1864
1929
|
drift: withSchema(
|
|
1865
|
-
|
|
1866
|
-
orgId:
|
|
1867
|
-
projectId:
|
|
1868
|
-
id:
|
|
1930
|
+
import_zod21.z.object({
|
|
1931
|
+
orgId: import_zod21.z.string().describe("Organization slug"),
|
|
1932
|
+
projectId: import_zod21.z.string().describe("Project ID"),
|
|
1933
|
+
id: import_zod21.z.string().uuid()
|
|
1869
1934
|
}),
|
|
1870
1935
|
(params) => call(proj(params.orgId, params.projectId)["import-sources"][":id"].drift.$get({ param: { id: params.id } }))
|
|
1871
1936
|
),
|
|
1872
1937
|
approveProposal: withSchema(
|
|
1873
|
-
|
|
1874
|
-
orgId:
|
|
1875
|
-
projectId:
|
|
1876
|
-
id:
|
|
1877
|
-
proposalId:
|
|
1938
|
+
import_zod21.z.object({
|
|
1939
|
+
orgId: import_zod21.z.string().describe("Organization slug"),
|
|
1940
|
+
projectId: import_zod21.z.string().describe("Project ID"),
|
|
1941
|
+
id: import_zod21.z.string().uuid(),
|
|
1942
|
+
proposalId: import_zod21.z.string().uuid()
|
|
1878
1943
|
}),
|
|
1879
1944
|
(params) => call(
|
|
1880
1945
|
proj(params.orgId, params.projectId)["import-sources"][":id"]["drift-proposals"][":proposalId"].approve.$post({
|
|
@@ -1883,11 +1948,11 @@ function createImportSourcesClient(proj) {
|
|
|
1883
1948
|
)
|
|
1884
1949
|
),
|
|
1885
1950
|
rejectProposal: withSchema(
|
|
1886
|
-
|
|
1887
|
-
orgId:
|
|
1888
|
-
projectId:
|
|
1889
|
-
id:
|
|
1890
|
-
proposalId:
|
|
1951
|
+
import_zod21.z.object({
|
|
1952
|
+
orgId: import_zod21.z.string().describe("Organization slug"),
|
|
1953
|
+
projectId: import_zod21.z.string().describe("Project ID"),
|
|
1954
|
+
id: import_zod21.z.string().uuid(),
|
|
1955
|
+
proposalId: import_zod21.z.string().uuid()
|
|
1891
1956
|
}),
|
|
1892
1957
|
(params) => call(
|
|
1893
1958
|
proj(params.orgId, params.projectId)["import-sources"][":id"]["drift-proposals"][":proposalId"].reject.$post({
|
|
@@ -1899,7 +1964,7 @@ function createImportSourcesClient(proj) {
|
|
|
1899
1964
|
}
|
|
1900
1965
|
|
|
1901
1966
|
// src/admin.ts
|
|
1902
|
-
var
|
|
1967
|
+
var import_zod22 = require("zod");
|
|
1903
1968
|
async function rawRequest2(baseUrl, hcOpts, path, init = {}) {
|
|
1904
1969
|
const fetchImpl = hcOpts?.fetch ?? fetch;
|
|
1905
1970
|
const rawHeaders = hcOpts?.headers;
|
|
@@ -1932,14 +1997,14 @@ function createAdminClient(baseUrl, hcOpts) {
|
|
|
1932
1997
|
* List super-admin audit events with optional filters.
|
|
1933
1998
|
*/
|
|
1934
1999
|
list: withSchema(
|
|
1935
|
-
|
|
1936
|
-
actor:
|
|
1937
|
-
action:
|
|
1938
|
-
resourceKind:
|
|
1939
|
-
since:
|
|
1940
|
-
until:
|
|
1941
|
-
limit:
|
|
1942
|
-
offset:
|
|
2000
|
+
import_zod22.z.object({
|
|
2001
|
+
actor: import_zod22.z.string().optional().describe("Filter by actor user ID"),
|
|
2002
|
+
action: import_zod22.z.string().optional().describe("Filter by action name"),
|
|
2003
|
+
resourceKind: import_zod22.z.string().optional().describe("Filter by resource kind"),
|
|
2004
|
+
since: import_zod22.z.string().optional().describe("ISO 8601 datetime lower bound"),
|
|
2005
|
+
until: import_zod22.z.string().optional().describe("ISO 8601 datetime upper bound"),
|
|
2006
|
+
limit: import_zod22.z.coerce.number().int().min(1).max(200).optional().describe("Max results (1-200)"),
|
|
2007
|
+
offset: import_zod22.z.coerce.number().int().min(0).optional().describe("Pagination offset")
|
|
1943
2008
|
}),
|
|
1944
2009
|
async (params) => {
|
|
1945
2010
|
const qs = new URLSearchParams();
|
|
@@ -1963,7 +2028,7 @@ function createAdminClient(baseUrl, hcOpts) {
|
|
|
1963
2028
|
* List all organizations across tenants with member + project counts.
|
|
1964
2029
|
*/
|
|
1965
2030
|
list: withSchema(
|
|
1966
|
-
|
|
2031
|
+
import_zod22.z.object({}),
|
|
1967
2032
|
async () => callRaw2(
|
|
1968
2033
|
await rawRequest2(baseUrl, hcOpts, "/admin/orgs")
|
|
1969
2034
|
)
|
|
@@ -1973,7 +2038,7 @@ function createAdminClient(baseUrl, hcOpts) {
|
|
|
1973
2038
|
* Detail view: org fields + member list + project list.
|
|
1974
2039
|
*/
|
|
1975
2040
|
get: withSchema(
|
|
1976
|
-
|
|
2041
|
+
import_zod22.z.object({ id: import_zod22.z.string().describe("Organization ID") }),
|
|
1977
2042
|
async (params) => callRaw2(
|
|
1978
2043
|
await rawRequest2(baseUrl, hcOpts, `/admin/orgs/${params.id}`)
|
|
1979
2044
|
)
|
|
@@ -1983,7 +2048,7 @@ function createAdminClient(baseUrl, hcOpts) {
|
|
|
1983
2048
|
* Set suspended_at = now(). Idempotent.
|
|
1984
2049
|
*/
|
|
1985
2050
|
suspend: withSchema(
|
|
1986
|
-
|
|
2051
|
+
import_zod22.z.object({ id: import_zod22.z.string().describe("Organization ID") }),
|
|
1987
2052
|
async (params) => callRaw2(
|
|
1988
2053
|
await rawRequest2(baseUrl, hcOpts, `/admin/orgs/${params.id}/suspend`, {
|
|
1989
2054
|
method: "POST"
|
|
@@ -1995,7 +2060,7 @@ function createAdminClient(baseUrl, hcOpts) {
|
|
|
1995
2060
|
* Clear suspended_at.
|
|
1996
2061
|
*/
|
|
1997
2062
|
unsuspend: withSchema(
|
|
1998
|
-
|
|
2063
|
+
import_zod22.z.object({ id: import_zod22.z.string().describe("Organization ID") }),
|
|
1999
2064
|
async (params) => callRaw2(
|
|
2000
2065
|
await rawRequest2(baseUrl, hcOpts, `/admin/orgs/${params.id}/unsuspend`, {
|
|
2001
2066
|
method: "POST"
|
|
@@ -2011,7 +2076,7 @@ function createAdminClient(baseUrl, hcOpts) {
|
|
|
2011
2076
|
* api tokens, and environments. Idempotent. Super-admin only.
|
|
2012
2077
|
*/
|
|
2013
2078
|
nuke: withSchema(
|
|
2014
|
-
|
|
2079
|
+
import_zod22.z.object({ projectId: import_zod22.z.string().describe("Project ID to nuke") }),
|
|
2015
2080
|
async (params) => callRaw2(
|
|
2016
2081
|
await rawRequest2(
|
|
2017
2082
|
baseUrl,
|
|
@@ -2029,7 +2094,7 @@ function createAdminClient(baseUrl, hcOpts) {
|
|
|
2029
2094
|
* all derived from single-table COUNT queries.
|
|
2030
2095
|
*/
|
|
2031
2096
|
overview: withSchema(
|
|
2032
|
-
|
|
2097
|
+
import_zod22.z.object({}),
|
|
2033
2098
|
async () => callRaw2(
|
|
2034
2099
|
await rawRequest2(baseUrl, hcOpts, "/admin/metrics/overview")
|
|
2035
2100
|
)
|
|
@@ -2044,7 +2109,7 @@ function createAdminClient(baseUrl, hcOpts) {
|
|
|
2044
2109
|
* Requires super-admin.
|
|
2045
2110
|
*/
|
|
2046
2111
|
list: withSchema(
|
|
2047
|
-
|
|
2112
|
+
import_zod22.z.object({}),
|
|
2048
2113
|
async () => callRaw2(
|
|
2049
2114
|
await rawRequest2(
|
|
2050
2115
|
baseUrl,
|
|
@@ -2059,15 +2124,15 @@ function createAdminClient(baseUrl, hcOpts) {
|
|
|
2059
2124
|
}
|
|
2060
2125
|
|
|
2061
2126
|
// src/resolve-source.ts
|
|
2062
|
-
var
|
|
2127
|
+
var import_zod23 = require("zod");
|
|
2063
2128
|
function createResolveSourceFn(proj) {
|
|
2064
2129
|
return withSchema(
|
|
2065
|
-
|
|
2066
|
-
orgId:
|
|
2067
|
-
projectId:
|
|
2068
|
-
kind:
|
|
2069
|
-
ref:
|
|
2070
|
-
version:
|
|
2130
|
+
import_zod23.z.object({
|
|
2131
|
+
orgId: import_zod23.z.string().describe("Organization slug"),
|
|
2132
|
+
projectId: import_zod23.z.string().describe("Project ID"),
|
|
2133
|
+
kind: import_zod23.z.literal("registry").describe('Source kind \u2014 only "registry" is supported today'),
|
|
2134
|
+
ref: import_zod23.z.string().regex(/^[^/]+\/[^/]+\/[^/]+$/, { message: "ref must be <namespace>/<name>/<provider>" }).describe("Terraform Registry module ref (<namespace>/<name>/<provider>)"),
|
|
2135
|
+
version: import_zod23.z.string().optional().describe("Module version semver \u2014 resolves latest if omitted")
|
|
2071
2136
|
}),
|
|
2072
2137
|
(params) => {
|
|
2073
2138
|
const { orgId, projectId, kind, ref, version } = params;
|
|
@@ -2099,6 +2164,7 @@ var createClient = (baseUrl, options = {}) => {
|
|
|
2099
2164
|
environments: createEnvironmentsClient(proj),
|
|
2100
2165
|
entityTypes: createEntityTypesClient(proj),
|
|
2101
2166
|
deploymentTargets: createDeploymentTargetsClient(proj),
|
|
2167
|
+
deploymentTargetSets: createDeploymentTargetSetsClient(proj),
|
|
2102
2168
|
entities: createEntitiesClient(projEnv),
|
|
2103
2169
|
cells,
|
|
2104
2170
|
relationshipTypes: createRelationshipTypesClient(proj),
|