@terrantula/sdk 0.11.0 → 0.11.2
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-5JCSB6F5.mjs → chunk-M7S27EER.mjs} +476 -388
- package/dist/index.d.mts +2728 -136
- package/dist/index.d.ts +2728 -136
- package/dist/index.js +486 -398
- package/dist/index.mjs +1 -1
- package/dist/local.d.mts +2461 -212
- package/dist/local.d.ts +2461 -212
- package/dist/local.js +486 -398
- 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/index.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,28 +1322,33 @@ 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(
|
|
1288
1344
|
(r) => ({ kind: "EntityType", ...stripServerFields(r) })
|
|
1289
1345
|
),
|
|
1290
|
-
...cells.map(
|
|
1291
|
-
|
|
1292
|
-
|
|
1346
|
+
...cells.map((r) => {
|
|
1347
|
+
const { entityTypeName, ...rest } = r;
|
|
1348
|
+
const stripped = stripServerFields(rest);
|
|
1349
|
+
if (entityTypeName != null) stripped.entityType = entityTypeName;
|
|
1350
|
+
return { kind: "Cell", ...stripped };
|
|
1351
|
+
}),
|
|
1293
1352
|
...relationshipTypes.map((r) => {
|
|
1294
1353
|
const { fromEntityTypeName, toEntityTypeName, ...rest } = r;
|
|
1295
1354
|
const stripped = stripServerFields(rest);
|
|
@@ -1302,6 +1361,12 @@ function createExportCatalogFn(proj, projEnv) {
|
|
|
1302
1361
|
),
|
|
1303
1362
|
...secrets.map(
|
|
1304
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) })
|
|
1305
1370
|
)
|
|
1306
1371
|
];
|
|
1307
1372
|
return { items };
|
|
@@ -1310,14 +1375,14 @@ function createExportCatalogFn(proj, projEnv) {
|
|
|
1310
1375
|
}
|
|
1311
1376
|
|
|
1312
1377
|
// src/catalog-revisions.ts
|
|
1313
|
-
var
|
|
1378
|
+
var import_zod13 = require("zod");
|
|
1314
1379
|
function createCatalogRevisionsClient(proj) {
|
|
1315
1380
|
return {
|
|
1316
1381
|
list: withSchema(
|
|
1317
|
-
|
|
1318
|
-
orgId:
|
|
1319
|
-
projectId:
|
|
1320
|
-
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)")
|
|
1321
1386
|
}),
|
|
1322
1387
|
(params) => {
|
|
1323
1388
|
const { orgId, projectId, ...query } = params;
|
|
@@ -1327,20 +1392,20 @@ function createCatalogRevisionsClient(proj) {
|
|
|
1327
1392
|
}
|
|
1328
1393
|
),
|
|
1329
1394
|
get: withSchema(
|
|
1330
|
-
|
|
1331
|
-
orgId:
|
|
1332
|
-
projectId:
|
|
1333
|
-
id:
|
|
1395
|
+
import_zod13.z.object({
|
|
1396
|
+
orgId: import_zod13.z.string().describe("Organization slug"),
|
|
1397
|
+
projectId: import_zod13.z.string().describe("Project ID"),
|
|
1398
|
+
id: import_zod13.z.string().uuid().describe("Revision ID")
|
|
1334
1399
|
}),
|
|
1335
1400
|
(params) => call(
|
|
1336
1401
|
proj(params.orgId, params.projectId)["catalog-revisions"][":id"].$get({ param: { id: params.id } })
|
|
1337
1402
|
)
|
|
1338
1403
|
),
|
|
1339
1404
|
snapshots: withSchema(
|
|
1340
|
-
|
|
1341
|
-
orgId:
|
|
1342
|
-
projectId:
|
|
1343
|
-
id:
|
|
1405
|
+
import_zod13.z.object({
|
|
1406
|
+
orgId: import_zod13.z.string().describe("Organization slug"),
|
|
1407
|
+
projectId: import_zod13.z.string().describe("Project ID"),
|
|
1408
|
+
id: import_zod13.z.string().uuid().describe("Revision ID to read snapshots for")
|
|
1344
1409
|
}),
|
|
1345
1410
|
(params) => call(
|
|
1346
1411
|
proj(params.orgId, params.projectId)["catalog-revisions"][":id"]["snapshots"].$get({
|
|
@@ -1354,12 +1419,12 @@ function createCatalogRevisionsClient(proj) {
|
|
|
1354
1419
|
* `force: true`, mirroring POST /apply.
|
|
1355
1420
|
*/
|
|
1356
1421
|
rollback: withSchema(
|
|
1357
|
-
|
|
1358
|
-
orgId:
|
|
1359
|
-
projectId:
|
|
1360
|
-
id:
|
|
1361
|
-
hunkId:
|
|
1362
|
-
force:
|
|
1422
|
+
import_zod13.z.object({
|
|
1423
|
+
orgId: import_zod13.z.string().describe("Organization slug"),
|
|
1424
|
+
projectId: import_zod13.z.string().describe("Project ID"),
|
|
1425
|
+
id: import_zod13.z.string().uuid().describe("Revision ID to roll back to"),
|
|
1426
|
+
hunkId: import_zod13.z.string().uuid().optional().describe("Single-hunk filter"),
|
|
1427
|
+
force: import_zod13.z.boolean().optional().describe("Required if the inverse diff is destructive")
|
|
1363
1428
|
}),
|
|
1364
1429
|
(params) => {
|
|
1365
1430
|
const { orgId, projectId, id, hunkId, force } = params;
|
|
@@ -1376,20 +1441,20 @@ function createCatalogRevisionsClient(proj) {
|
|
|
1376
1441
|
}
|
|
1377
1442
|
|
|
1378
1443
|
// src/audit-events.ts
|
|
1379
|
-
var
|
|
1444
|
+
var import_zod14 = require("zod");
|
|
1380
1445
|
function createAuditEventsClient(proj) {
|
|
1381
1446
|
return {
|
|
1382
1447
|
list: withSchema(
|
|
1383
|
-
|
|
1384
|
-
orgId:
|
|
1385
|
-
projectId:
|
|
1386
|
-
envName:
|
|
1387
|
-
actorType:
|
|
1388
|
-
actorId:
|
|
1389
|
-
action:
|
|
1390
|
-
resourceKind:
|
|
1391
|
-
since:
|
|
1392
|
-
limit:
|
|
1448
|
+
import_zod14.z.object({
|
|
1449
|
+
orgId: import_zod14.z.string().describe("Organization slug"),
|
|
1450
|
+
projectId: import_zod14.z.string().describe("Project name"),
|
|
1451
|
+
envName: import_zod14.z.string().optional().describe("Filter to a single env"),
|
|
1452
|
+
actorType: import_zod14.z.enum(["user", "token"]).optional().describe("Filter by actor type"),
|
|
1453
|
+
actorId: import_zod14.z.string().optional().describe("Filter by actor (user.id or apikey.id)"),
|
|
1454
|
+
action: import_zod14.z.string().optional().describe('Comma-separated actions (e.g. "create,delete")'),
|
|
1455
|
+
resourceKind: import_zod14.z.string().optional().describe("Filter to one resource kind (Entity | Token | Member | \u2026)"),
|
|
1456
|
+
since: import_zod14.z.string().datetime().optional().describe("ISO timestamp; only events strictly after this are returned"),
|
|
1457
|
+
limit: import_zod14.z.coerce.number().int().min(1).max(500).optional().describe("Max rows (1-500)")
|
|
1393
1458
|
}).describe("List audit events for a project \u2014 auditor-friendly read-only feed"),
|
|
1394
1459
|
(params) => {
|
|
1395
1460
|
const { orgId, projectId, ...query } = params;
|
|
@@ -1400,21 +1465,21 @@ function createAuditEventsClient(proj) {
|
|
|
1400
1465
|
}
|
|
1401
1466
|
|
|
1402
1467
|
// src/environments.ts
|
|
1403
|
-
var
|
|
1468
|
+
var import_zod15 = require("zod");
|
|
1404
1469
|
function createEnvironmentsClient(proj) {
|
|
1405
1470
|
return {
|
|
1406
1471
|
list: withSchema(
|
|
1407
|
-
|
|
1408
|
-
orgId:
|
|
1409
|
-
projectId:
|
|
1472
|
+
import_zod15.z.object({
|
|
1473
|
+
orgId: import_zod15.z.string().describe("Organization slug"),
|
|
1474
|
+
projectId: import_zod15.z.string().describe("Project name")
|
|
1410
1475
|
}),
|
|
1411
1476
|
(params) => call(proj(params.orgId, params.projectId)["environments"].$get())
|
|
1412
1477
|
),
|
|
1413
1478
|
create: withSchema(
|
|
1414
|
-
|
|
1415
|
-
orgId:
|
|
1416
|
-
projectId:
|
|
1417
|
-
name:
|
|
1479
|
+
import_zod15.z.object({
|
|
1480
|
+
orgId: import_zod15.z.string().describe("Organization slug"),
|
|
1481
|
+
projectId: import_zod15.z.string().describe("Project name"),
|
|
1482
|
+
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)")
|
|
1418
1483
|
}),
|
|
1419
1484
|
(params) => {
|
|
1420
1485
|
const { orgId, projectId, name } = params;
|
|
@@ -1422,10 +1487,10 @@ function createEnvironmentsClient(proj) {
|
|
|
1422
1487
|
}
|
|
1423
1488
|
),
|
|
1424
1489
|
delete: withSchema(
|
|
1425
|
-
|
|
1426
|
-
orgId:
|
|
1427
|
-
projectId:
|
|
1428
|
-
name:
|
|
1490
|
+
import_zod15.z.object({
|
|
1491
|
+
orgId: import_zod15.z.string().describe("Organization slug"),
|
|
1492
|
+
projectId: import_zod15.z.string().describe("Project name"),
|
|
1493
|
+
name: import_zod15.z.string().describe("Environment name")
|
|
1429
1494
|
}),
|
|
1430
1495
|
(params) => call(
|
|
1431
1496
|
proj(params.orgId, params.projectId)["environments"][":envName"].$delete({
|
|
@@ -1437,19 +1502,19 @@ function createEnvironmentsClient(proj) {
|
|
|
1437
1502
|
}
|
|
1438
1503
|
|
|
1439
1504
|
// src/drift-events.ts
|
|
1440
|
-
var
|
|
1505
|
+
var import_zod16 = require("zod");
|
|
1441
1506
|
function createDriftEventsClient(projEnv) {
|
|
1442
1507
|
return {
|
|
1443
1508
|
list: withSchema(
|
|
1444
|
-
|
|
1445
|
-
orgId:
|
|
1446
|
-
projectId:
|
|
1447
|
-
envName:
|
|
1448
|
-
status:
|
|
1449
|
-
kind:
|
|
1450
|
-
entityName:
|
|
1451
|
-
since:
|
|
1452
|
-
limit:
|
|
1509
|
+
import_zod16.z.object({
|
|
1510
|
+
orgId: import_zod16.z.string().describe("Organization slug"),
|
|
1511
|
+
projectId: import_zod16.z.string().describe("Project name"),
|
|
1512
|
+
envName: import_zod16.z.string().describe("Environment name"),
|
|
1513
|
+
status: import_zod16.z.enum(["open", "accepted", "reapplied", "snoozed"]).optional(),
|
|
1514
|
+
kind: import_zod16.z.string().optional().describe("Filter by entity type name"),
|
|
1515
|
+
entityName: import_zod16.z.string().optional().describe("Filter by entity name"),
|
|
1516
|
+
since: import_zod16.z.string().optional().describe("ISO timestamp lower bound on detectedAt"),
|
|
1517
|
+
limit: import_zod16.z.coerce.number().int().min(1).max(500).optional()
|
|
1453
1518
|
}),
|
|
1454
1519
|
(params) => {
|
|
1455
1520
|
const { orgId, projectId, envName, ...query } = params;
|
|
@@ -1459,19 +1524,19 @@ function createDriftEventsClient(projEnv) {
|
|
|
1459
1524
|
}
|
|
1460
1525
|
),
|
|
1461
1526
|
count: withSchema(
|
|
1462
|
-
|
|
1463
|
-
orgId:
|
|
1464
|
-
projectId:
|
|
1465
|
-
envName:
|
|
1527
|
+
import_zod16.z.object({
|
|
1528
|
+
orgId: import_zod16.z.string().describe("Organization slug"),
|
|
1529
|
+
projectId: import_zod16.z.string().describe("Project name"),
|
|
1530
|
+
envName: import_zod16.z.string().describe("Environment name")
|
|
1466
1531
|
}),
|
|
1467
1532
|
(params) => call(projEnv(params.orgId, params.projectId, params.envName)["drift-events"].count.$get())
|
|
1468
1533
|
),
|
|
1469
1534
|
get: withSchema(
|
|
1470
|
-
|
|
1471
|
-
orgId:
|
|
1472
|
-
projectId:
|
|
1473
|
-
envName:
|
|
1474
|
-
id:
|
|
1535
|
+
import_zod16.z.object({
|
|
1536
|
+
orgId: import_zod16.z.string().describe("Organization slug"),
|
|
1537
|
+
projectId: import_zod16.z.string().describe("Project name"),
|
|
1538
|
+
envName: import_zod16.z.string().describe("Environment name"),
|
|
1539
|
+
id: import_zod16.z.string().uuid()
|
|
1475
1540
|
}),
|
|
1476
1541
|
(params) => call(
|
|
1477
1542
|
projEnv(params.orgId, params.projectId, params.envName)["drift-events"][":id"].$get({
|
|
@@ -1480,11 +1545,11 @@ function createDriftEventsClient(projEnv) {
|
|
|
1480
1545
|
)
|
|
1481
1546
|
),
|
|
1482
1547
|
accept: withSchema(
|
|
1483
|
-
|
|
1484
|
-
orgId:
|
|
1485
|
-
projectId:
|
|
1486
|
-
envName:
|
|
1487
|
-
id:
|
|
1548
|
+
import_zod16.z.object({
|
|
1549
|
+
orgId: import_zod16.z.string().describe("Organization slug"),
|
|
1550
|
+
projectId: import_zod16.z.string().describe("Project name"),
|
|
1551
|
+
envName: import_zod16.z.string().describe("Environment name"),
|
|
1552
|
+
id: import_zod16.z.string().uuid()
|
|
1488
1553
|
}),
|
|
1489
1554
|
(params) => call(
|
|
1490
1555
|
projEnv(params.orgId, params.projectId, params.envName)["drift-events"][":id"].accept.$post({
|
|
@@ -1493,11 +1558,11 @@ function createDriftEventsClient(projEnv) {
|
|
|
1493
1558
|
)
|
|
1494
1559
|
),
|
|
1495
1560
|
reapply: withSchema(
|
|
1496
|
-
|
|
1497
|
-
orgId:
|
|
1498
|
-
projectId:
|
|
1499
|
-
envName:
|
|
1500
|
-
id:
|
|
1561
|
+
import_zod16.z.object({
|
|
1562
|
+
orgId: import_zod16.z.string().describe("Organization slug"),
|
|
1563
|
+
projectId: import_zod16.z.string().describe("Project name"),
|
|
1564
|
+
envName: import_zod16.z.string().describe("Environment name"),
|
|
1565
|
+
id: import_zod16.z.string().uuid()
|
|
1501
1566
|
}),
|
|
1502
1567
|
(params) => call(
|
|
1503
1568
|
projEnv(params.orgId, params.projectId, params.envName)["drift-events"][":id"].reapply.$post({
|
|
@@ -1506,12 +1571,12 @@ function createDriftEventsClient(projEnv) {
|
|
|
1506
1571
|
)
|
|
1507
1572
|
),
|
|
1508
1573
|
snooze: withSchema(
|
|
1509
|
-
|
|
1510
|
-
orgId:
|
|
1511
|
-
projectId:
|
|
1512
|
-
envName:
|
|
1513
|
-
id:
|
|
1514
|
-
untilSeconds:
|
|
1574
|
+
import_zod16.z.object({
|
|
1575
|
+
orgId: import_zod16.z.string().describe("Organization slug"),
|
|
1576
|
+
projectId: import_zod16.z.string().describe("Project name"),
|
|
1577
|
+
envName: import_zod16.z.string().describe("Environment name"),
|
|
1578
|
+
id: import_zod16.z.string().uuid(),
|
|
1579
|
+
untilSeconds: import_zod16.z.number().int().positive().optional()
|
|
1515
1580
|
}),
|
|
1516
1581
|
(params) => call(
|
|
1517
1582
|
projEnv(params.orgId, params.projectId, params.envName)["drift-events"][":id"].snooze.$post({
|
|
@@ -1524,15 +1589,15 @@ function createDriftEventsClient(projEnv) {
|
|
|
1524
1589
|
}
|
|
1525
1590
|
|
|
1526
1591
|
// src/stats.ts
|
|
1527
|
-
var
|
|
1528
|
-
var WindowSchema =
|
|
1529
|
-
var BucketSchema =
|
|
1592
|
+
var import_zod17 = require("zod");
|
|
1593
|
+
var WindowSchema = import_zod17.z.enum(["1h", "24h", "7d"]).optional().describe("Time window \u2014 default 24h");
|
|
1594
|
+
var BucketSchema = import_zod17.z.enum(["1m", "5m", "1h", "1d"]).optional().describe("Bucket granularity \u2014 default 1h");
|
|
1530
1595
|
function createStatsClient(proj) {
|
|
1531
1596
|
return {
|
|
1532
1597
|
entitiesByState: withSchema(
|
|
1533
|
-
|
|
1534
|
-
orgId:
|
|
1535
|
-
projectId:
|
|
1598
|
+
import_zod17.z.object({
|
|
1599
|
+
orgId: import_zod17.z.string().describe("Organization slug"),
|
|
1600
|
+
projectId: import_zod17.z.string().describe("Project name"),
|
|
1536
1601
|
window: WindowSchema,
|
|
1537
1602
|
bucket: BucketSchema
|
|
1538
1603
|
}),
|
|
@@ -1542,9 +1607,9 @@ function createStatsClient(proj) {
|
|
|
1542
1607
|
}
|
|
1543
1608
|
),
|
|
1544
1609
|
runsByType: withSchema(
|
|
1545
|
-
|
|
1546
|
-
orgId:
|
|
1547
|
-
projectId:
|
|
1610
|
+
import_zod17.z.object({
|
|
1611
|
+
orgId: import_zod17.z.string().describe("Organization slug"),
|
|
1612
|
+
projectId: import_zod17.z.string().describe("Project name"),
|
|
1548
1613
|
window: WindowSchema
|
|
1549
1614
|
}),
|
|
1550
1615
|
(params) => {
|
|
@@ -1553,9 +1618,9 @@ function createStatsClient(proj) {
|
|
|
1553
1618
|
}
|
|
1554
1619
|
),
|
|
1555
1620
|
failingKinds: withSchema(
|
|
1556
|
-
|
|
1557
|
-
orgId:
|
|
1558
|
-
projectId:
|
|
1621
|
+
import_zod17.z.object({
|
|
1622
|
+
orgId: import_zod17.z.string().describe("Organization slug"),
|
|
1623
|
+
projectId: import_zod17.z.string().describe("Project name"),
|
|
1559
1624
|
window: WindowSchema
|
|
1560
1625
|
}),
|
|
1561
1626
|
(params) => {
|
|
@@ -1564,10 +1629,10 @@ function createStatsClient(proj) {
|
|
|
1564
1629
|
}
|
|
1565
1630
|
),
|
|
1566
1631
|
driftDensity: withSchema(
|
|
1567
|
-
|
|
1568
|
-
orgId:
|
|
1569
|
-
projectId:
|
|
1570
|
-
dim:
|
|
1632
|
+
import_zod17.z.object({
|
|
1633
|
+
orgId: import_zod17.z.string().describe("Organization slug"),
|
|
1634
|
+
projectId: import_zod17.z.string().describe("Project name"),
|
|
1635
|
+
dim: import_zod17.z.string().optional().describe('Dimensions to bucket \u2014 e.g. "kind,cell"')
|
|
1571
1636
|
}),
|
|
1572
1637
|
(params) => {
|
|
1573
1638
|
const { orgId, projectId, ...query } = params;
|
|
@@ -1578,32 +1643,32 @@ function createStatsClient(proj) {
|
|
|
1578
1643
|
}
|
|
1579
1644
|
|
|
1580
1645
|
// src/graph-views.ts
|
|
1581
|
-
var
|
|
1582
|
-
var ViewConfigSchema =
|
|
1583
|
-
var PinnedPositionsSchema =
|
|
1646
|
+
var import_zod18 = require("zod");
|
|
1647
|
+
var ViewConfigSchema = import_zod18.z.unknown();
|
|
1648
|
+
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();
|
|
1584
1649
|
function createGraphViewsClient(proj) {
|
|
1585
1650
|
return {
|
|
1586
1651
|
list: withSchema(
|
|
1587
|
-
|
|
1588
|
-
orgId:
|
|
1589
|
-
projectId:
|
|
1652
|
+
import_zod18.z.object({
|
|
1653
|
+
orgId: import_zod18.z.string().describe("Organization slug"),
|
|
1654
|
+
projectId: import_zod18.z.string().describe("Project ID")
|
|
1590
1655
|
}),
|
|
1591
1656
|
(params) => call(proj(params.orgId, params.projectId)["graph-views"].$get())
|
|
1592
1657
|
),
|
|
1593
1658
|
get: withSchema(
|
|
1594
|
-
|
|
1595
|
-
orgId:
|
|
1596
|
-
projectId:
|
|
1597
|
-
id:
|
|
1659
|
+
import_zod18.z.object({
|
|
1660
|
+
orgId: import_zod18.z.string().describe("Organization slug"),
|
|
1661
|
+
projectId: import_zod18.z.string().describe("Project ID"),
|
|
1662
|
+
id: import_zod18.z.string().describe("View id")
|
|
1598
1663
|
}),
|
|
1599
1664
|
(params) => call(proj(params.orgId, params.projectId)["graph-views"][":id"].$get({ param: { id: params.id } }))
|
|
1600
1665
|
),
|
|
1601
1666
|
create: withSchema(
|
|
1602
|
-
|
|
1603
|
-
orgId:
|
|
1604
|
-
projectId:
|
|
1605
|
-
name:
|
|
1606
|
-
scope:
|
|
1667
|
+
import_zod18.z.object({
|
|
1668
|
+
orgId: import_zod18.z.string().describe("Organization slug"),
|
|
1669
|
+
projectId: import_zod18.z.string().describe("Project ID"),
|
|
1670
|
+
name: import_zod18.z.string().describe("View name"),
|
|
1671
|
+
scope: import_zod18.z.enum(["user", "project"]).describe("Personal or project scope"),
|
|
1607
1672
|
config: ViewConfigSchema.describe("ViewConfig JSON"),
|
|
1608
1673
|
pinnedPositions: PinnedPositionsSchema.optional().describe("Pinned node positions")
|
|
1609
1674
|
}),
|
|
@@ -1613,11 +1678,11 @@ function createGraphViewsClient(proj) {
|
|
|
1613
1678
|
}
|
|
1614
1679
|
),
|
|
1615
1680
|
update: withSchema(
|
|
1616
|
-
|
|
1617
|
-
orgId:
|
|
1618
|
-
projectId:
|
|
1619
|
-
id:
|
|
1620
|
-
name:
|
|
1681
|
+
import_zod18.z.object({
|
|
1682
|
+
orgId: import_zod18.z.string().describe("Organization slug"),
|
|
1683
|
+
projectId: import_zod18.z.string().describe("Project ID"),
|
|
1684
|
+
id: import_zod18.z.string().describe("View id"),
|
|
1685
|
+
name: import_zod18.z.string().optional().describe("New name"),
|
|
1621
1686
|
config: ViewConfigSchema.optional().describe("Replacement ViewConfig JSON"),
|
|
1622
1687
|
pinnedPositions: PinnedPositionsSchema.optional().describe("Replacement pinned positions")
|
|
1623
1688
|
}),
|
|
@@ -1629,18 +1694,18 @@ function createGraphViewsClient(proj) {
|
|
|
1629
1694
|
}
|
|
1630
1695
|
),
|
|
1631
1696
|
delete: withSchema(
|
|
1632
|
-
|
|
1633
|
-
orgId:
|
|
1634
|
-
projectId:
|
|
1635
|
-
id:
|
|
1697
|
+
import_zod18.z.object({
|
|
1698
|
+
orgId: import_zod18.z.string().describe("Organization slug"),
|
|
1699
|
+
projectId: import_zod18.z.string().describe("Project ID"),
|
|
1700
|
+
id: import_zod18.z.string().describe("View id")
|
|
1636
1701
|
}),
|
|
1637
1702
|
(params) => call(proj(params.orgId, params.projectId)["graph-views"][":id"].$delete({ param: { id: params.id } }))
|
|
1638
1703
|
),
|
|
1639
1704
|
setDefault: withSchema(
|
|
1640
|
-
|
|
1641
|
-
orgId:
|
|
1642
|
-
projectId:
|
|
1643
|
-
id:
|
|
1705
|
+
import_zod18.z.object({
|
|
1706
|
+
orgId: import_zod18.z.string().describe("Organization slug"),
|
|
1707
|
+
projectId: import_zod18.z.string().describe("Project ID"),
|
|
1708
|
+
id: import_zod18.z.string().describe("View id")
|
|
1644
1709
|
}),
|
|
1645
1710
|
(params) => call(
|
|
1646
1711
|
proj(params.orgId, params.projectId)["graph-views"][":id"]["default"].$patch({
|
|
@@ -1652,15 +1717,15 @@ function createGraphViewsClient(proj) {
|
|
|
1652
1717
|
}
|
|
1653
1718
|
|
|
1654
1719
|
// src/notifications.ts
|
|
1655
|
-
var
|
|
1720
|
+
var import_zod19 = require("zod");
|
|
1656
1721
|
var import_client2 = require("hono/client");
|
|
1657
1722
|
function createNotificationsClient(baseUrl, hcOpts) {
|
|
1658
1723
|
const c = (0, import_client2.hc)(`${baseUrl}/notifications`, hcOpts);
|
|
1659
1724
|
return {
|
|
1660
1725
|
list: withSchema(
|
|
1661
|
-
|
|
1662
|
-
limit:
|
|
1663
|
-
unread:
|
|
1726
|
+
import_zod19.z.object({
|
|
1727
|
+
limit: import_zod19.z.coerce.number().int().min(1).max(100).optional(),
|
|
1728
|
+
unread: import_zod19.z.boolean().optional()
|
|
1664
1729
|
}),
|
|
1665
1730
|
(params) => {
|
|
1666
1731
|
const query = {};
|
|
@@ -1670,18 +1735,18 @@ function createNotificationsClient(baseUrl, hcOpts) {
|
|
|
1670
1735
|
}
|
|
1671
1736
|
),
|
|
1672
1737
|
read: withSchema(
|
|
1673
|
-
|
|
1738
|
+
import_zod19.z.object({ id: import_zod19.z.string().uuid() }),
|
|
1674
1739
|
(params) => call(c[":id"].read.$post({ param: { id: params.id } }))
|
|
1675
1740
|
),
|
|
1676
1741
|
readAll: withSchema(
|
|
1677
|
-
|
|
1742
|
+
import_zod19.z.object({}),
|
|
1678
1743
|
() => call(c["read-all"].$post())
|
|
1679
1744
|
)
|
|
1680
1745
|
};
|
|
1681
1746
|
}
|
|
1682
1747
|
|
|
1683
1748
|
// src/audit-export.ts
|
|
1684
|
-
var
|
|
1749
|
+
var import_zod20 = require("zod");
|
|
1685
1750
|
async function rawRequest(baseUrl, hcOpts, path, init = {}) {
|
|
1686
1751
|
const fetchImpl = hcOpts?.fetch ?? fetch;
|
|
1687
1752
|
const rawHeaders = hcOpts?.headers;
|
|
@@ -1710,19 +1775,19 @@ function createAuditExportClient(baseUrl, hcOpts) {
|
|
|
1710
1775
|
return {
|
|
1711
1776
|
/** GET /orgs/:orgId/audit-export/config — returns current config or throws 404. */
|
|
1712
1777
|
getConfig: withSchema(
|
|
1713
|
-
|
|
1778
|
+
import_zod20.z.object({ orgId: import_zod20.z.string().describe("Organization ID") }),
|
|
1714
1779
|
async (params) => callRaw(
|
|
1715
1780
|
await rawRequest(baseUrl, hcOpts, `/orgs/${params.orgId}/audit-export/config`)
|
|
1716
1781
|
)
|
|
1717
1782
|
),
|
|
1718
1783
|
/** POST /orgs/:orgId/audit-export/config — upsert the S3 export config. */
|
|
1719
1784
|
setConfig: withSchema(
|
|
1720
|
-
|
|
1721
|
-
orgId:
|
|
1722
|
-
bucket:
|
|
1723
|
-
region:
|
|
1724
|
-
roleArn:
|
|
1725
|
-
enabled:
|
|
1785
|
+
import_zod20.z.object({
|
|
1786
|
+
orgId: import_zod20.z.string().describe("Organization ID"),
|
|
1787
|
+
bucket: import_zod20.z.string().describe("S3 bucket name"),
|
|
1788
|
+
region: import_zod20.z.string().describe("AWS region"),
|
|
1789
|
+
roleArn: import_zod20.z.string().describe("IAM role ARN for assume-role"),
|
|
1790
|
+
enabled: import_zod20.z.boolean().optional().describe("Enable/disable export")
|
|
1726
1791
|
}),
|
|
1727
1792
|
async (params) => {
|
|
1728
1793
|
const { orgId, ...body } = params;
|
|
@@ -1737,11 +1802,11 @@ function createAuditExportClient(baseUrl, hcOpts) {
|
|
|
1737
1802
|
),
|
|
1738
1803
|
/** POST /orgs/:orgId/audit-export/test-connection — dry-run write+delete. */
|
|
1739
1804
|
testConnection: withSchema(
|
|
1740
|
-
|
|
1741
|
-
orgId:
|
|
1742
|
-
bucket:
|
|
1743
|
-
region:
|
|
1744
|
-
roleArn:
|
|
1805
|
+
import_zod20.z.object({
|
|
1806
|
+
orgId: import_zod20.z.string().describe("Organization ID"),
|
|
1807
|
+
bucket: import_zod20.z.string().describe("S3 bucket name"),
|
|
1808
|
+
region: import_zod20.z.string().describe("AWS region"),
|
|
1809
|
+
roleArn: import_zod20.z.string().describe("IAM role ARN for assume-role")
|
|
1745
1810
|
}),
|
|
1746
1811
|
async (params) => {
|
|
1747
1812
|
const { orgId, ...body } = params;
|
|
@@ -1756,9 +1821,9 @@ function createAuditExportClient(baseUrl, hcOpts) {
|
|
|
1756
1821
|
),
|
|
1757
1822
|
/** GET /orgs/:orgId/audit-export/runs — recent batch run history. */
|
|
1758
1823
|
listRuns: withSchema(
|
|
1759
|
-
|
|
1760
|
-
orgId:
|
|
1761
|
-
limit:
|
|
1824
|
+
import_zod20.z.object({
|
|
1825
|
+
orgId: import_zod20.z.string().describe("Organization ID"),
|
|
1826
|
+
limit: import_zod20.z.number().optional().describe("Max results (default 20, max 100)")
|
|
1762
1827
|
}),
|
|
1763
1828
|
async (params) => {
|
|
1764
1829
|
const qs = params.limit ? `?limit=${params.limit}` : "";
|
|
@@ -1802,33 +1867,33 @@ function createUserPreferencesClient(baseUrl, hcOpts) {
|
|
|
1802
1867
|
}
|
|
1803
1868
|
|
|
1804
1869
|
// src/import-sources.ts
|
|
1805
|
-
var
|
|
1806
|
-
var SourceKindEnum =
|
|
1807
|
-
var PolicyEnum =
|
|
1870
|
+
var import_zod21 = require("zod");
|
|
1871
|
+
var SourceKindEnum = import_zod21.z.enum(["tf-state", "atmos-manifests"]);
|
|
1872
|
+
var PolicyEnum = import_zod21.z.enum(["auto-update", "human-approval"]);
|
|
1808
1873
|
function createImportSourcesClient(proj) {
|
|
1809
1874
|
return {
|
|
1810
1875
|
list: withSchema(
|
|
1811
|
-
|
|
1812
|
-
orgId:
|
|
1813
|
-
projectId:
|
|
1876
|
+
import_zod21.z.object({
|
|
1877
|
+
orgId: import_zod21.z.string().describe("Organization slug"),
|
|
1878
|
+
projectId: import_zod21.z.string().describe("Project ID")
|
|
1814
1879
|
}),
|
|
1815
1880
|
(params) => call(proj(params.orgId, params.projectId)["import-sources"].$get())
|
|
1816
1881
|
),
|
|
1817
1882
|
get: withSchema(
|
|
1818
|
-
|
|
1819
|
-
orgId:
|
|
1820
|
-
projectId:
|
|
1821
|
-
id:
|
|
1883
|
+
import_zod21.z.object({
|
|
1884
|
+
orgId: import_zod21.z.string().describe("Organization slug"),
|
|
1885
|
+
projectId: import_zod21.z.string().describe("Project ID"),
|
|
1886
|
+
id: import_zod21.z.string().uuid().describe("ImportSource ID")
|
|
1822
1887
|
}),
|
|
1823
1888
|
(params) => call(proj(params.orgId, params.projectId)["import-sources"][":id"].$get({ param: { id: params.id } }))
|
|
1824
1889
|
),
|
|
1825
1890
|
registerOrUpdate: withSchema(
|
|
1826
|
-
|
|
1827
|
-
orgId:
|
|
1828
|
-
projectId:
|
|
1829
|
-
envName:
|
|
1891
|
+
import_zod21.z.object({
|
|
1892
|
+
orgId: import_zod21.z.string().describe("Organization slug"),
|
|
1893
|
+
projectId: import_zod21.z.string().describe("Project ID"),
|
|
1894
|
+
envName: import_zod21.z.string().describe("Env name the source belongs to"),
|
|
1830
1895
|
sourceKind: SourceKindEnum,
|
|
1831
|
-
sourceUri:
|
|
1896
|
+
sourceUri: import_zod21.z.string().describe("Stable URI identifying the source"),
|
|
1832
1897
|
reconciliationPolicy: PolicyEnum.optional()
|
|
1833
1898
|
}),
|
|
1834
1899
|
(params) => {
|
|
@@ -1837,13 +1902,13 @@ function createImportSourcesClient(proj) {
|
|
|
1837
1902
|
}
|
|
1838
1903
|
),
|
|
1839
1904
|
rescan: withSchema(
|
|
1840
|
-
|
|
1841
|
-
orgId:
|
|
1842
|
-
projectId:
|
|
1843
|
-
id:
|
|
1844
|
-
envName:
|
|
1845
|
-
items:
|
|
1846
|
-
deletions:
|
|
1905
|
+
import_zod21.z.object({
|
|
1906
|
+
orgId: import_zod21.z.string().describe("Organization slug"),
|
|
1907
|
+
projectId: import_zod21.z.string().describe("Project ID"),
|
|
1908
|
+
id: import_zod21.z.string().uuid(),
|
|
1909
|
+
envName: import_zod21.z.string(),
|
|
1910
|
+
items: import_zod21.z.array(import_zod21.z.unknown()),
|
|
1911
|
+
deletions: import_zod21.z.array(import_zod21.z.object({ kind: import_zod21.z.string(), name: import_zod21.z.string() })).optional()
|
|
1847
1912
|
}),
|
|
1848
1913
|
(params) => {
|
|
1849
1914
|
const { orgId, projectId, id, ...body } = params;
|
|
@@ -1859,19 +1924,19 @@ function createImportSourcesClient(proj) {
|
|
|
1859
1924
|
}
|
|
1860
1925
|
),
|
|
1861
1926
|
drift: withSchema(
|
|
1862
|
-
|
|
1863
|
-
orgId:
|
|
1864
|
-
projectId:
|
|
1865
|
-
id:
|
|
1927
|
+
import_zod21.z.object({
|
|
1928
|
+
orgId: import_zod21.z.string().describe("Organization slug"),
|
|
1929
|
+
projectId: import_zod21.z.string().describe("Project ID"),
|
|
1930
|
+
id: import_zod21.z.string().uuid()
|
|
1866
1931
|
}),
|
|
1867
1932
|
(params) => call(proj(params.orgId, params.projectId)["import-sources"][":id"].drift.$get({ param: { id: params.id } }))
|
|
1868
1933
|
),
|
|
1869
1934
|
approveProposal: withSchema(
|
|
1870
|
-
|
|
1871
|
-
orgId:
|
|
1872
|
-
projectId:
|
|
1873
|
-
id:
|
|
1874
|
-
proposalId:
|
|
1935
|
+
import_zod21.z.object({
|
|
1936
|
+
orgId: import_zod21.z.string().describe("Organization slug"),
|
|
1937
|
+
projectId: import_zod21.z.string().describe("Project ID"),
|
|
1938
|
+
id: import_zod21.z.string().uuid(),
|
|
1939
|
+
proposalId: import_zod21.z.string().uuid()
|
|
1875
1940
|
}),
|
|
1876
1941
|
(params) => call(
|
|
1877
1942
|
proj(params.orgId, params.projectId)["import-sources"][":id"]["drift-proposals"][":proposalId"].approve.$post({
|
|
@@ -1880,11 +1945,11 @@ function createImportSourcesClient(proj) {
|
|
|
1880
1945
|
)
|
|
1881
1946
|
),
|
|
1882
1947
|
rejectProposal: withSchema(
|
|
1883
|
-
|
|
1884
|
-
orgId:
|
|
1885
|
-
projectId:
|
|
1886
|
-
id:
|
|
1887
|
-
proposalId:
|
|
1948
|
+
import_zod21.z.object({
|
|
1949
|
+
orgId: import_zod21.z.string().describe("Organization slug"),
|
|
1950
|
+
projectId: import_zod21.z.string().describe("Project ID"),
|
|
1951
|
+
id: import_zod21.z.string().uuid(),
|
|
1952
|
+
proposalId: import_zod21.z.string().uuid()
|
|
1888
1953
|
}),
|
|
1889
1954
|
(params) => call(
|
|
1890
1955
|
proj(params.orgId, params.projectId)["import-sources"][":id"]["drift-proposals"][":proposalId"].reject.$post({
|
|
@@ -1896,7 +1961,7 @@ function createImportSourcesClient(proj) {
|
|
|
1896
1961
|
}
|
|
1897
1962
|
|
|
1898
1963
|
// src/admin.ts
|
|
1899
|
-
var
|
|
1964
|
+
var import_zod22 = require("zod");
|
|
1900
1965
|
async function rawRequest2(baseUrl, hcOpts, path, init = {}) {
|
|
1901
1966
|
const fetchImpl = hcOpts?.fetch ?? fetch;
|
|
1902
1967
|
const rawHeaders = hcOpts?.headers;
|
|
@@ -1929,14 +1994,14 @@ function createAdminClient(baseUrl, hcOpts) {
|
|
|
1929
1994
|
* List super-admin audit events with optional filters.
|
|
1930
1995
|
*/
|
|
1931
1996
|
list: withSchema(
|
|
1932
|
-
|
|
1933
|
-
actor:
|
|
1934
|
-
action:
|
|
1935
|
-
resourceKind:
|
|
1936
|
-
since:
|
|
1937
|
-
until:
|
|
1938
|
-
limit:
|
|
1939
|
-
offset:
|
|
1997
|
+
import_zod22.z.object({
|
|
1998
|
+
actor: import_zod22.z.string().optional().describe("Filter by actor user ID"),
|
|
1999
|
+
action: import_zod22.z.string().optional().describe("Filter by action name"),
|
|
2000
|
+
resourceKind: import_zod22.z.string().optional().describe("Filter by resource kind"),
|
|
2001
|
+
since: import_zod22.z.string().optional().describe("ISO 8601 datetime lower bound"),
|
|
2002
|
+
until: import_zod22.z.string().optional().describe("ISO 8601 datetime upper bound"),
|
|
2003
|
+
limit: import_zod22.z.coerce.number().int().min(1).max(200).optional().describe("Max results (1-200)"),
|
|
2004
|
+
offset: import_zod22.z.coerce.number().int().min(0).optional().describe("Pagination offset")
|
|
1940
2005
|
}),
|
|
1941
2006
|
async (params) => {
|
|
1942
2007
|
const qs = new URLSearchParams();
|
|
@@ -1960,7 +2025,7 @@ function createAdminClient(baseUrl, hcOpts) {
|
|
|
1960
2025
|
* List all organizations across tenants with member + project counts.
|
|
1961
2026
|
*/
|
|
1962
2027
|
list: withSchema(
|
|
1963
|
-
|
|
2028
|
+
import_zod22.z.object({}),
|
|
1964
2029
|
async () => callRaw2(
|
|
1965
2030
|
await rawRequest2(baseUrl, hcOpts, "/admin/orgs")
|
|
1966
2031
|
)
|
|
@@ -1970,7 +2035,7 @@ function createAdminClient(baseUrl, hcOpts) {
|
|
|
1970
2035
|
* Detail view: org fields + member list + project list.
|
|
1971
2036
|
*/
|
|
1972
2037
|
get: withSchema(
|
|
1973
|
-
|
|
2038
|
+
import_zod22.z.object({ id: import_zod22.z.string().describe("Organization ID") }),
|
|
1974
2039
|
async (params) => callRaw2(
|
|
1975
2040
|
await rawRequest2(baseUrl, hcOpts, `/admin/orgs/${params.id}`)
|
|
1976
2041
|
)
|
|
@@ -1980,7 +2045,7 @@ function createAdminClient(baseUrl, hcOpts) {
|
|
|
1980
2045
|
* Set suspended_at = now(). Idempotent.
|
|
1981
2046
|
*/
|
|
1982
2047
|
suspend: withSchema(
|
|
1983
|
-
|
|
2048
|
+
import_zod22.z.object({ id: import_zod22.z.string().describe("Organization ID") }),
|
|
1984
2049
|
async (params) => callRaw2(
|
|
1985
2050
|
await rawRequest2(baseUrl, hcOpts, `/admin/orgs/${params.id}/suspend`, {
|
|
1986
2051
|
method: "POST"
|
|
@@ -1992,7 +2057,7 @@ function createAdminClient(baseUrl, hcOpts) {
|
|
|
1992
2057
|
* Clear suspended_at.
|
|
1993
2058
|
*/
|
|
1994
2059
|
unsuspend: withSchema(
|
|
1995
|
-
|
|
2060
|
+
import_zod22.z.object({ id: import_zod22.z.string().describe("Organization ID") }),
|
|
1996
2061
|
async (params) => callRaw2(
|
|
1997
2062
|
await rawRequest2(baseUrl, hcOpts, `/admin/orgs/${params.id}/unsuspend`, {
|
|
1998
2063
|
method: "POST"
|
|
@@ -2008,7 +2073,7 @@ function createAdminClient(baseUrl, hcOpts) {
|
|
|
2008
2073
|
* api tokens, and environments. Idempotent. Super-admin only.
|
|
2009
2074
|
*/
|
|
2010
2075
|
nuke: withSchema(
|
|
2011
|
-
|
|
2076
|
+
import_zod22.z.object({ projectId: import_zod22.z.string().describe("Project ID to nuke") }),
|
|
2012
2077
|
async (params) => callRaw2(
|
|
2013
2078
|
await rawRequest2(
|
|
2014
2079
|
baseUrl,
|
|
@@ -2026,7 +2091,7 @@ function createAdminClient(baseUrl, hcOpts) {
|
|
|
2026
2091
|
* all derived from single-table COUNT queries.
|
|
2027
2092
|
*/
|
|
2028
2093
|
overview: withSchema(
|
|
2029
|
-
|
|
2094
|
+
import_zod22.z.object({}),
|
|
2030
2095
|
async () => callRaw2(
|
|
2031
2096
|
await rawRequest2(baseUrl, hcOpts, "/admin/metrics/overview")
|
|
2032
2097
|
)
|
|
@@ -2041,7 +2106,7 @@ function createAdminClient(baseUrl, hcOpts) {
|
|
|
2041
2106
|
* Requires super-admin.
|
|
2042
2107
|
*/
|
|
2043
2108
|
list: withSchema(
|
|
2044
|
-
|
|
2109
|
+
import_zod22.z.object({}),
|
|
2045
2110
|
async () => callRaw2(
|
|
2046
2111
|
await rawRequest2(
|
|
2047
2112
|
baseUrl,
|
|
@@ -2055,6 +2120,27 @@ function createAdminClient(baseUrl, hcOpts) {
|
|
|
2055
2120
|
};
|
|
2056
2121
|
}
|
|
2057
2122
|
|
|
2123
|
+
// src/resolve-source.ts
|
|
2124
|
+
var import_zod23 = require("zod");
|
|
2125
|
+
function createResolveSourceFn(proj) {
|
|
2126
|
+
return withSchema(
|
|
2127
|
+
import_zod23.z.object({
|
|
2128
|
+
orgId: import_zod23.z.string().describe("Organization slug"),
|
|
2129
|
+
projectId: import_zod23.z.string().describe("Project ID"),
|
|
2130
|
+
kind: import_zod23.z.literal("registry").describe('Source kind \u2014 only "registry" is supported today'),
|
|
2131
|
+
ref: import_zod23.z.string().regex(/^[^/]+\/[^/]+\/[^/]+$/, { message: "ref must be <namespace>/<name>/<provider>" }).describe("Terraform Registry module ref (<namespace>/<name>/<provider>)"),
|
|
2132
|
+
version: import_zod23.z.string().optional().describe("Module version semver \u2014 resolves latest if omitted")
|
|
2133
|
+
}),
|
|
2134
|
+
(params) => {
|
|
2135
|
+
const { orgId, projectId, kind, ref, version } = params;
|
|
2136
|
+
const json = version !== void 0 ? { kind, ref, version } : { kind, ref };
|
|
2137
|
+
return call(
|
|
2138
|
+
proj(orgId, projectId)["resolve-source"].$post({ json })
|
|
2139
|
+
);
|
|
2140
|
+
}
|
|
2141
|
+
);
|
|
2142
|
+
}
|
|
2143
|
+
|
|
2058
2144
|
// src/index.ts
|
|
2059
2145
|
var createClient = (baseUrl, options = {}) => {
|
|
2060
2146
|
const opts = typeof options === "string" || typeof options === "function" ? { token: options } : options;
|
|
@@ -2075,6 +2161,7 @@ var createClient = (baseUrl, options = {}) => {
|
|
|
2075
2161
|
environments: createEnvironmentsClient(proj),
|
|
2076
2162
|
entityTypes: createEntityTypesClient(proj),
|
|
2077
2163
|
deploymentTargets: createDeploymentTargetsClient(proj),
|
|
2164
|
+
deploymentTargetSets: createDeploymentTargetSetsClient(proj),
|
|
2078
2165
|
entities: createEntitiesClient(projEnv),
|
|
2079
2166
|
cells,
|
|
2080
2167
|
relationshipTypes: createRelationshipTypesClient(proj),
|
|
@@ -2092,6 +2179,7 @@ var createClient = (baseUrl, options = {}) => {
|
|
|
2092
2179
|
auditExport: createAuditExportClient(baseUrl, hcOpts),
|
|
2093
2180
|
userPreferences: createUserPreferencesClient(baseUrl, hcOpts),
|
|
2094
2181
|
importSources: createImportSourcesClient(proj),
|
|
2182
|
+
resolveSource: createResolveSourceFn(proj),
|
|
2095
2183
|
exportCatalog,
|
|
2096
2184
|
admin: createAdminClient(baseUrl, hcOpts)
|
|
2097
2185
|
};
|