@terrantula/sdk 0.11.1 → 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-773V5YNO.mjs → chunk-M7S27EER.mjs} +455 -392
- package/dist/index.d.mts +2514 -217
- package/dist/index.d.ts +2514 -217
- package/dist/index.js +465 -402
- package/dist/index.mjs +1 -1
- package/dist/local.d.mts +2167 -122
- package/dist/local.d.ts +2167 -122
- package/dist/local.js +465 -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/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,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,14 @@ 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)")
|
|
1324
1386
|
}),
|
|
1325
1387
|
(params) => {
|
|
1326
1388
|
const { orgId, projectId, ...query } = params;
|
|
@@ -1330,20 +1392,20 @@ function createCatalogRevisionsClient(proj) {
|
|
|
1330
1392
|
}
|
|
1331
1393
|
),
|
|
1332
1394
|
get: withSchema(
|
|
1333
|
-
|
|
1334
|
-
orgId:
|
|
1335
|
-
projectId:
|
|
1336
|
-
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")
|
|
1337
1399
|
}),
|
|
1338
1400
|
(params) => call(
|
|
1339
1401
|
proj(params.orgId, params.projectId)["catalog-revisions"][":id"].$get({ param: { id: params.id } })
|
|
1340
1402
|
)
|
|
1341
1403
|
),
|
|
1342
1404
|
snapshots: withSchema(
|
|
1343
|
-
|
|
1344
|
-
orgId:
|
|
1345
|
-
projectId:
|
|
1346
|
-
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")
|
|
1347
1409
|
}),
|
|
1348
1410
|
(params) => call(
|
|
1349
1411
|
proj(params.orgId, params.projectId)["catalog-revisions"][":id"]["snapshots"].$get({
|
|
@@ -1357,12 +1419,12 @@ function createCatalogRevisionsClient(proj) {
|
|
|
1357
1419
|
* `force: true`, mirroring POST /apply.
|
|
1358
1420
|
*/
|
|
1359
1421
|
rollback: withSchema(
|
|
1360
|
-
|
|
1361
|
-
orgId:
|
|
1362
|
-
projectId:
|
|
1363
|
-
id:
|
|
1364
|
-
hunkId:
|
|
1365
|
-
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")
|
|
1366
1428
|
}),
|
|
1367
1429
|
(params) => {
|
|
1368
1430
|
const { orgId, projectId, id, hunkId, force } = params;
|
|
@@ -1379,20 +1441,20 @@ function createCatalogRevisionsClient(proj) {
|
|
|
1379
1441
|
}
|
|
1380
1442
|
|
|
1381
1443
|
// src/audit-events.ts
|
|
1382
|
-
var
|
|
1444
|
+
var import_zod14 = require("zod");
|
|
1383
1445
|
function createAuditEventsClient(proj) {
|
|
1384
1446
|
return {
|
|
1385
1447
|
list: withSchema(
|
|
1386
|
-
|
|
1387
|
-
orgId:
|
|
1388
|
-
projectId:
|
|
1389
|
-
envName:
|
|
1390
|
-
actorType:
|
|
1391
|
-
actorId:
|
|
1392
|
-
action:
|
|
1393
|
-
resourceKind:
|
|
1394
|
-
since:
|
|
1395
|
-
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)")
|
|
1396
1458
|
}).describe("List audit events for a project \u2014 auditor-friendly read-only feed"),
|
|
1397
1459
|
(params) => {
|
|
1398
1460
|
const { orgId, projectId, ...query } = params;
|
|
@@ -1403,21 +1465,21 @@ function createAuditEventsClient(proj) {
|
|
|
1403
1465
|
}
|
|
1404
1466
|
|
|
1405
1467
|
// src/environments.ts
|
|
1406
|
-
var
|
|
1468
|
+
var import_zod15 = require("zod");
|
|
1407
1469
|
function createEnvironmentsClient(proj) {
|
|
1408
1470
|
return {
|
|
1409
1471
|
list: withSchema(
|
|
1410
|
-
|
|
1411
|
-
orgId:
|
|
1412
|
-
projectId:
|
|
1472
|
+
import_zod15.z.object({
|
|
1473
|
+
orgId: import_zod15.z.string().describe("Organization slug"),
|
|
1474
|
+
projectId: import_zod15.z.string().describe("Project name")
|
|
1413
1475
|
}),
|
|
1414
1476
|
(params) => call(proj(params.orgId, params.projectId)["environments"].$get())
|
|
1415
1477
|
),
|
|
1416
1478
|
create: withSchema(
|
|
1417
|
-
|
|
1418
|
-
orgId:
|
|
1419
|
-
projectId:
|
|
1420
|
-
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)")
|
|
1421
1483
|
}),
|
|
1422
1484
|
(params) => {
|
|
1423
1485
|
const { orgId, projectId, name } = params;
|
|
@@ -1425,10 +1487,10 @@ function createEnvironmentsClient(proj) {
|
|
|
1425
1487
|
}
|
|
1426
1488
|
),
|
|
1427
1489
|
delete: withSchema(
|
|
1428
|
-
|
|
1429
|
-
orgId:
|
|
1430
|
-
projectId:
|
|
1431
|
-
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")
|
|
1432
1494
|
}),
|
|
1433
1495
|
(params) => call(
|
|
1434
1496
|
proj(params.orgId, params.projectId)["environments"][":envName"].$delete({
|
|
@@ -1440,19 +1502,19 @@ function createEnvironmentsClient(proj) {
|
|
|
1440
1502
|
}
|
|
1441
1503
|
|
|
1442
1504
|
// src/drift-events.ts
|
|
1443
|
-
var
|
|
1505
|
+
var import_zod16 = require("zod");
|
|
1444
1506
|
function createDriftEventsClient(projEnv) {
|
|
1445
1507
|
return {
|
|
1446
1508
|
list: withSchema(
|
|
1447
|
-
|
|
1448
|
-
orgId:
|
|
1449
|
-
projectId:
|
|
1450
|
-
envName:
|
|
1451
|
-
status:
|
|
1452
|
-
kind:
|
|
1453
|
-
entityName:
|
|
1454
|
-
since:
|
|
1455
|
-
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()
|
|
1456
1518
|
}),
|
|
1457
1519
|
(params) => {
|
|
1458
1520
|
const { orgId, projectId, envName, ...query } = params;
|
|
@@ -1462,19 +1524,19 @@ function createDriftEventsClient(projEnv) {
|
|
|
1462
1524
|
}
|
|
1463
1525
|
),
|
|
1464
1526
|
count: withSchema(
|
|
1465
|
-
|
|
1466
|
-
orgId:
|
|
1467
|
-
projectId:
|
|
1468
|
-
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")
|
|
1469
1531
|
}),
|
|
1470
1532
|
(params) => call(projEnv(params.orgId, params.projectId, params.envName)["drift-events"].count.$get())
|
|
1471
1533
|
),
|
|
1472
1534
|
get: withSchema(
|
|
1473
|
-
|
|
1474
|
-
orgId:
|
|
1475
|
-
projectId:
|
|
1476
|
-
envName:
|
|
1477
|
-
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()
|
|
1478
1540
|
}),
|
|
1479
1541
|
(params) => call(
|
|
1480
1542
|
projEnv(params.orgId, params.projectId, params.envName)["drift-events"][":id"].$get({
|
|
@@ -1483,11 +1545,11 @@ function createDriftEventsClient(projEnv) {
|
|
|
1483
1545
|
)
|
|
1484
1546
|
),
|
|
1485
1547
|
accept: withSchema(
|
|
1486
|
-
|
|
1487
|
-
orgId:
|
|
1488
|
-
projectId:
|
|
1489
|
-
envName:
|
|
1490
|
-
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()
|
|
1491
1553
|
}),
|
|
1492
1554
|
(params) => call(
|
|
1493
1555
|
projEnv(params.orgId, params.projectId, params.envName)["drift-events"][":id"].accept.$post({
|
|
@@ -1496,11 +1558,11 @@ function createDriftEventsClient(projEnv) {
|
|
|
1496
1558
|
)
|
|
1497
1559
|
),
|
|
1498
1560
|
reapply: withSchema(
|
|
1499
|
-
|
|
1500
|
-
orgId:
|
|
1501
|
-
projectId:
|
|
1502
|
-
envName:
|
|
1503
|
-
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()
|
|
1504
1566
|
}),
|
|
1505
1567
|
(params) => call(
|
|
1506
1568
|
projEnv(params.orgId, params.projectId, params.envName)["drift-events"][":id"].reapply.$post({
|
|
@@ -1509,12 +1571,12 @@ function createDriftEventsClient(projEnv) {
|
|
|
1509
1571
|
)
|
|
1510
1572
|
),
|
|
1511
1573
|
snooze: withSchema(
|
|
1512
|
-
|
|
1513
|
-
orgId:
|
|
1514
|
-
projectId:
|
|
1515
|
-
envName:
|
|
1516
|
-
id:
|
|
1517
|
-
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()
|
|
1518
1580
|
}),
|
|
1519
1581
|
(params) => call(
|
|
1520
1582
|
projEnv(params.orgId, params.projectId, params.envName)["drift-events"][":id"].snooze.$post({
|
|
@@ -1527,15 +1589,15 @@ function createDriftEventsClient(projEnv) {
|
|
|
1527
1589
|
}
|
|
1528
1590
|
|
|
1529
1591
|
// src/stats.ts
|
|
1530
|
-
var
|
|
1531
|
-
var WindowSchema =
|
|
1532
|
-
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");
|
|
1533
1595
|
function createStatsClient(proj) {
|
|
1534
1596
|
return {
|
|
1535
1597
|
entitiesByState: withSchema(
|
|
1536
|
-
|
|
1537
|
-
orgId:
|
|
1538
|
-
projectId:
|
|
1598
|
+
import_zod17.z.object({
|
|
1599
|
+
orgId: import_zod17.z.string().describe("Organization slug"),
|
|
1600
|
+
projectId: import_zod17.z.string().describe("Project name"),
|
|
1539
1601
|
window: WindowSchema,
|
|
1540
1602
|
bucket: BucketSchema
|
|
1541
1603
|
}),
|
|
@@ -1545,9 +1607,9 @@ function createStatsClient(proj) {
|
|
|
1545
1607
|
}
|
|
1546
1608
|
),
|
|
1547
1609
|
runsByType: withSchema(
|
|
1548
|
-
|
|
1549
|
-
orgId:
|
|
1550
|
-
projectId:
|
|
1610
|
+
import_zod17.z.object({
|
|
1611
|
+
orgId: import_zod17.z.string().describe("Organization slug"),
|
|
1612
|
+
projectId: import_zod17.z.string().describe("Project name"),
|
|
1551
1613
|
window: WindowSchema
|
|
1552
1614
|
}),
|
|
1553
1615
|
(params) => {
|
|
@@ -1556,9 +1618,9 @@ function createStatsClient(proj) {
|
|
|
1556
1618
|
}
|
|
1557
1619
|
),
|
|
1558
1620
|
failingKinds: withSchema(
|
|
1559
|
-
|
|
1560
|
-
orgId:
|
|
1561
|
-
projectId:
|
|
1621
|
+
import_zod17.z.object({
|
|
1622
|
+
orgId: import_zod17.z.string().describe("Organization slug"),
|
|
1623
|
+
projectId: import_zod17.z.string().describe("Project name"),
|
|
1562
1624
|
window: WindowSchema
|
|
1563
1625
|
}),
|
|
1564
1626
|
(params) => {
|
|
@@ -1567,10 +1629,10 @@ function createStatsClient(proj) {
|
|
|
1567
1629
|
}
|
|
1568
1630
|
),
|
|
1569
1631
|
driftDensity: withSchema(
|
|
1570
|
-
|
|
1571
|
-
orgId:
|
|
1572
|
-
projectId:
|
|
1573
|
-
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"')
|
|
1574
1636
|
}),
|
|
1575
1637
|
(params) => {
|
|
1576
1638
|
const { orgId, projectId, ...query } = params;
|
|
@@ -1581,32 +1643,32 @@ function createStatsClient(proj) {
|
|
|
1581
1643
|
}
|
|
1582
1644
|
|
|
1583
1645
|
// src/graph-views.ts
|
|
1584
|
-
var
|
|
1585
|
-
var ViewConfigSchema =
|
|
1586
|
-
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();
|
|
1587
1649
|
function createGraphViewsClient(proj) {
|
|
1588
1650
|
return {
|
|
1589
1651
|
list: withSchema(
|
|
1590
|
-
|
|
1591
|
-
orgId:
|
|
1592
|
-
projectId:
|
|
1652
|
+
import_zod18.z.object({
|
|
1653
|
+
orgId: import_zod18.z.string().describe("Organization slug"),
|
|
1654
|
+
projectId: import_zod18.z.string().describe("Project ID")
|
|
1593
1655
|
}),
|
|
1594
1656
|
(params) => call(proj(params.orgId, params.projectId)["graph-views"].$get())
|
|
1595
1657
|
),
|
|
1596
1658
|
get: withSchema(
|
|
1597
|
-
|
|
1598
|
-
orgId:
|
|
1599
|
-
projectId:
|
|
1600
|
-
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")
|
|
1601
1663
|
}),
|
|
1602
1664
|
(params) => call(proj(params.orgId, params.projectId)["graph-views"][":id"].$get({ param: { id: params.id } }))
|
|
1603
1665
|
),
|
|
1604
1666
|
create: withSchema(
|
|
1605
|
-
|
|
1606
|
-
orgId:
|
|
1607
|
-
projectId:
|
|
1608
|
-
name:
|
|
1609
|
-
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"),
|
|
1610
1672
|
config: ViewConfigSchema.describe("ViewConfig JSON"),
|
|
1611
1673
|
pinnedPositions: PinnedPositionsSchema.optional().describe("Pinned node positions")
|
|
1612
1674
|
}),
|
|
@@ -1616,11 +1678,11 @@ function createGraphViewsClient(proj) {
|
|
|
1616
1678
|
}
|
|
1617
1679
|
),
|
|
1618
1680
|
update: withSchema(
|
|
1619
|
-
|
|
1620
|
-
orgId:
|
|
1621
|
-
projectId:
|
|
1622
|
-
id:
|
|
1623
|
-
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"),
|
|
1624
1686
|
config: ViewConfigSchema.optional().describe("Replacement ViewConfig JSON"),
|
|
1625
1687
|
pinnedPositions: PinnedPositionsSchema.optional().describe("Replacement pinned positions")
|
|
1626
1688
|
}),
|
|
@@ -1632,18 +1694,18 @@ function createGraphViewsClient(proj) {
|
|
|
1632
1694
|
}
|
|
1633
1695
|
),
|
|
1634
1696
|
delete: withSchema(
|
|
1635
|
-
|
|
1636
|
-
orgId:
|
|
1637
|
-
projectId:
|
|
1638
|
-
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")
|
|
1639
1701
|
}),
|
|
1640
1702
|
(params) => call(proj(params.orgId, params.projectId)["graph-views"][":id"].$delete({ param: { id: params.id } }))
|
|
1641
1703
|
),
|
|
1642
1704
|
setDefault: withSchema(
|
|
1643
|
-
|
|
1644
|
-
orgId:
|
|
1645
|
-
projectId:
|
|
1646
|
-
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")
|
|
1647
1709
|
}),
|
|
1648
1710
|
(params) => call(
|
|
1649
1711
|
proj(params.orgId, params.projectId)["graph-views"][":id"]["default"].$patch({
|
|
@@ -1655,15 +1717,15 @@ function createGraphViewsClient(proj) {
|
|
|
1655
1717
|
}
|
|
1656
1718
|
|
|
1657
1719
|
// src/notifications.ts
|
|
1658
|
-
var
|
|
1720
|
+
var import_zod19 = require("zod");
|
|
1659
1721
|
var import_client2 = require("hono/client");
|
|
1660
1722
|
function createNotificationsClient(baseUrl, hcOpts) {
|
|
1661
1723
|
const c = (0, import_client2.hc)(`${baseUrl}/notifications`, hcOpts);
|
|
1662
1724
|
return {
|
|
1663
1725
|
list: withSchema(
|
|
1664
|
-
|
|
1665
|
-
limit:
|
|
1666
|
-
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()
|
|
1667
1729
|
}),
|
|
1668
1730
|
(params) => {
|
|
1669
1731
|
const query = {};
|
|
@@ -1673,18 +1735,18 @@ function createNotificationsClient(baseUrl, hcOpts) {
|
|
|
1673
1735
|
}
|
|
1674
1736
|
),
|
|
1675
1737
|
read: withSchema(
|
|
1676
|
-
|
|
1738
|
+
import_zod19.z.object({ id: import_zod19.z.string().uuid() }),
|
|
1677
1739
|
(params) => call(c[":id"].read.$post({ param: { id: params.id } }))
|
|
1678
1740
|
),
|
|
1679
1741
|
readAll: withSchema(
|
|
1680
|
-
|
|
1742
|
+
import_zod19.z.object({}),
|
|
1681
1743
|
() => call(c["read-all"].$post())
|
|
1682
1744
|
)
|
|
1683
1745
|
};
|
|
1684
1746
|
}
|
|
1685
1747
|
|
|
1686
1748
|
// src/audit-export.ts
|
|
1687
|
-
var
|
|
1749
|
+
var import_zod20 = require("zod");
|
|
1688
1750
|
async function rawRequest(baseUrl, hcOpts, path, init = {}) {
|
|
1689
1751
|
const fetchImpl = hcOpts?.fetch ?? fetch;
|
|
1690
1752
|
const rawHeaders = hcOpts?.headers;
|
|
@@ -1713,19 +1775,19 @@ function createAuditExportClient(baseUrl, hcOpts) {
|
|
|
1713
1775
|
return {
|
|
1714
1776
|
/** GET /orgs/:orgId/audit-export/config — returns current config or throws 404. */
|
|
1715
1777
|
getConfig: withSchema(
|
|
1716
|
-
|
|
1778
|
+
import_zod20.z.object({ orgId: import_zod20.z.string().describe("Organization ID") }),
|
|
1717
1779
|
async (params) => callRaw(
|
|
1718
1780
|
await rawRequest(baseUrl, hcOpts, `/orgs/${params.orgId}/audit-export/config`)
|
|
1719
1781
|
)
|
|
1720
1782
|
),
|
|
1721
1783
|
/** POST /orgs/:orgId/audit-export/config — upsert the S3 export config. */
|
|
1722
1784
|
setConfig: withSchema(
|
|
1723
|
-
|
|
1724
|
-
orgId:
|
|
1725
|
-
bucket:
|
|
1726
|
-
region:
|
|
1727
|
-
roleArn:
|
|
1728
|
-
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")
|
|
1729
1791
|
}),
|
|
1730
1792
|
async (params) => {
|
|
1731
1793
|
const { orgId, ...body } = params;
|
|
@@ -1740,11 +1802,11 @@ function createAuditExportClient(baseUrl, hcOpts) {
|
|
|
1740
1802
|
),
|
|
1741
1803
|
/** POST /orgs/:orgId/audit-export/test-connection — dry-run write+delete. */
|
|
1742
1804
|
testConnection: withSchema(
|
|
1743
|
-
|
|
1744
|
-
orgId:
|
|
1745
|
-
bucket:
|
|
1746
|
-
region:
|
|
1747
|
-
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")
|
|
1748
1810
|
}),
|
|
1749
1811
|
async (params) => {
|
|
1750
1812
|
const { orgId, ...body } = params;
|
|
@@ -1759,9 +1821,9 @@ function createAuditExportClient(baseUrl, hcOpts) {
|
|
|
1759
1821
|
),
|
|
1760
1822
|
/** GET /orgs/:orgId/audit-export/runs — recent batch run history. */
|
|
1761
1823
|
listRuns: withSchema(
|
|
1762
|
-
|
|
1763
|
-
orgId:
|
|
1764
|
-
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)")
|
|
1765
1827
|
}),
|
|
1766
1828
|
async (params) => {
|
|
1767
1829
|
const qs = params.limit ? `?limit=${params.limit}` : "";
|
|
@@ -1805,33 +1867,33 @@ function createUserPreferencesClient(baseUrl, hcOpts) {
|
|
|
1805
1867
|
}
|
|
1806
1868
|
|
|
1807
1869
|
// src/import-sources.ts
|
|
1808
|
-
var
|
|
1809
|
-
var SourceKindEnum =
|
|
1810
|
-
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"]);
|
|
1811
1873
|
function createImportSourcesClient(proj) {
|
|
1812
1874
|
return {
|
|
1813
1875
|
list: withSchema(
|
|
1814
|
-
|
|
1815
|
-
orgId:
|
|
1816
|
-
projectId:
|
|
1876
|
+
import_zod21.z.object({
|
|
1877
|
+
orgId: import_zod21.z.string().describe("Organization slug"),
|
|
1878
|
+
projectId: import_zod21.z.string().describe("Project ID")
|
|
1817
1879
|
}),
|
|
1818
1880
|
(params) => call(proj(params.orgId, params.projectId)["import-sources"].$get())
|
|
1819
1881
|
),
|
|
1820
1882
|
get: withSchema(
|
|
1821
|
-
|
|
1822
|
-
orgId:
|
|
1823
|
-
projectId:
|
|
1824
|
-
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")
|
|
1825
1887
|
}),
|
|
1826
1888
|
(params) => call(proj(params.orgId, params.projectId)["import-sources"][":id"].$get({ param: { id: params.id } }))
|
|
1827
1889
|
),
|
|
1828
1890
|
registerOrUpdate: withSchema(
|
|
1829
|
-
|
|
1830
|
-
orgId:
|
|
1831
|
-
projectId:
|
|
1832
|
-
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"),
|
|
1833
1895
|
sourceKind: SourceKindEnum,
|
|
1834
|
-
sourceUri:
|
|
1896
|
+
sourceUri: import_zod21.z.string().describe("Stable URI identifying the source"),
|
|
1835
1897
|
reconciliationPolicy: PolicyEnum.optional()
|
|
1836
1898
|
}),
|
|
1837
1899
|
(params) => {
|
|
@@ -1840,13 +1902,13 @@ function createImportSourcesClient(proj) {
|
|
|
1840
1902
|
}
|
|
1841
1903
|
),
|
|
1842
1904
|
rescan: withSchema(
|
|
1843
|
-
|
|
1844
|
-
orgId:
|
|
1845
|
-
projectId:
|
|
1846
|
-
id:
|
|
1847
|
-
envName:
|
|
1848
|
-
items:
|
|
1849
|
-
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()
|
|
1850
1912
|
}),
|
|
1851
1913
|
(params) => {
|
|
1852
1914
|
const { orgId, projectId, id, ...body } = params;
|
|
@@ -1862,19 +1924,19 @@ function createImportSourcesClient(proj) {
|
|
|
1862
1924
|
}
|
|
1863
1925
|
),
|
|
1864
1926
|
drift: withSchema(
|
|
1865
|
-
|
|
1866
|
-
orgId:
|
|
1867
|
-
projectId:
|
|
1868
|
-
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()
|
|
1869
1931
|
}),
|
|
1870
1932
|
(params) => call(proj(params.orgId, params.projectId)["import-sources"][":id"].drift.$get({ param: { id: params.id } }))
|
|
1871
1933
|
),
|
|
1872
1934
|
approveProposal: withSchema(
|
|
1873
|
-
|
|
1874
|
-
orgId:
|
|
1875
|
-
projectId:
|
|
1876
|
-
id:
|
|
1877
|
-
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()
|
|
1878
1940
|
}),
|
|
1879
1941
|
(params) => call(
|
|
1880
1942
|
proj(params.orgId, params.projectId)["import-sources"][":id"]["drift-proposals"][":proposalId"].approve.$post({
|
|
@@ -1883,11 +1945,11 @@ function createImportSourcesClient(proj) {
|
|
|
1883
1945
|
)
|
|
1884
1946
|
),
|
|
1885
1947
|
rejectProposal: withSchema(
|
|
1886
|
-
|
|
1887
|
-
orgId:
|
|
1888
|
-
projectId:
|
|
1889
|
-
id:
|
|
1890
|
-
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()
|
|
1891
1953
|
}),
|
|
1892
1954
|
(params) => call(
|
|
1893
1955
|
proj(params.orgId, params.projectId)["import-sources"][":id"]["drift-proposals"][":proposalId"].reject.$post({
|
|
@@ -1899,7 +1961,7 @@ function createImportSourcesClient(proj) {
|
|
|
1899
1961
|
}
|
|
1900
1962
|
|
|
1901
1963
|
// src/admin.ts
|
|
1902
|
-
var
|
|
1964
|
+
var import_zod22 = require("zod");
|
|
1903
1965
|
async function rawRequest2(baseUrl, hcOpts, path, init = {}) {
|
|
1904
1966
|
const fetchImpl = hcOpts?.fetch ?? fetch;
|
|
1905
1967
|
const rawHeaders = hcOpts?.headers;
|
|
@@ -1932,14 +1994,14 @@ function createAdminClient(baseUrl, hcOpts) {
|
|
|
1932
1994
|
* List super-admin audit events with optional filters.
|
|
1933
1995
|
*/
|
|
1934
1996
|
list: withSchema(
|
|
1935
|
-
|
|
1936
|
-
actor:
|
|
1937
|
-
action:
|
|
1938
|
-
resourceKind:
|
|
1939
|
-
since:
|
|
1940
|
-
until:
|
|
1941
|
-
limit:
|
|
1942
|
-
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")
|
|
1943
2005
|
}),
|
|
1944
2006
|
async (params) => {
|
|
1945
2007
|
const qs = new URLSearchParams();
|
|
@@ -1963,7 +2025,7 @@ function createAdminClient(baseUrl, hcOpts) {
|
|
|
1963
2025
|
* List all organizations across tenants with member + project counts.
|
|
1964
2026
|
*/
|
|
1965
2027
|
list: withSchema(
|
|
1966
|
-
|
|
2028
|
+
import_zod22.z.object({}),
|
|
1967
2029
|
async () => callRaw2(
|
|
1968
2030
|
await rawRequest2(baseUrl, hcOpts, "/admin/orgs")
|
|
1969
2031
|
)
|
|
@@ -1973,7 +2035,7 @@ function createAdminClient(baseUrl, hcOpts) {
|
|
|
1973
2035
|
* Detail view: org fields + member list + project list.
|
|
1974
2036
|
*/
|
|
1975
2037
|
get: withSchema(
|
|
1976
|
-
|
|
2038
|
+
import_zod22.z.object({ id: import_zod22.z.string().describe("Organization ID") }),
|
|
1977
2039
|
async (params) => callRaw2(
|
|
1978
2040
|
await rawRequest2(baseUrl, hcOpts, `/admin/orgs/${params.id}`)
|
|
1979
2041
|
)
|
|
@@ -1983,7 +2045,7 @@ function createAdminClient(baseUrl, hcOpts) {
|
|
|
1983
2045
|
* Set suspended_at = now(). Idempotent.
|
|
1984
2046
|
*/
|
|
1985
2047
|
suspend: withSchema(
|
|
1986
|
-
|
|
2048
|
+
import_zod22.z.object({ id: import_zod22.z.string().describe("Organization ID") }),
|
|
1987
2049
|
async (params) => callRaw2(
|
|
1988
2050
|
await rawRequest2(baseUrl, hcOpts, `/admin/orgs/${params.id}/suspend`, {
|
|
1989
2051
|
method: "POST"
|
|
@@ -1995,7 +2057,7 @@ function createAdminClient(baseUrl, hcOpts) {
|
|
|
1995
2057
|
* Clear suspended_at.
|
|
1996
2058
|
*/
|
|
1997
2059
|
unsuspend: withSchema(
|
|
1998
|
-
|
|
2060
|
+
import_zod22.z.object({ id: import_zod22.z.string().describe("Organization ID") }),
|
|
1999
2061
|
async (params) => callRaw2(
|
|
2000
2062
|
await rawRequest2(baseUrl, hcOpts, `/admin/orgs/${params.id}/unsuspend`, {
|
|
2001
2063
|
method: "POST"
|
|
@@ -2011,7 +2073,7 @@ function createAdminClient(baseUrl, hcOpts) {
|
|
|
2011
2073
|
* api tokens, and environments. Idempotent. Super-admin only.
|
|
2012
2074
|
*/
|
|
2013
2075
|
nuke: withSchema(
|
|
2014
|
-
|
|
2076
|
+
import_zod22.z.object({ projectId: import_zod22.z.string().describe("Project ID to nuke") }),
|
|
2015
2077
|
async (params) => callRaw2(
|
|
2016
2078
|
await rawRequest2(
|
|
2017
2079
|
baseUrl,
|
|
@@ -2029,7 +2091,7 @@ function createAdminClient(baseUrl, hcOpts) {
|
|
|
2029
2091
|
* all derived from single-table COUNT queries.
|
|
2030
2092
|
*/
|
|
2031
2093
|
overview: withSchema(
|
|
2032
|
-
|
|
2094
|
+
import_zod22.z.object({}),
|
|
2033
2095
|
async () => callRaw2(
|
|
2034
2096
|
await rawRequest2(baseUrl, hcOpts, "/admin/metrics/overview")
|
|
2035
2097
|
)
|
|
@@ -2044,7 +2106,7 @@ function createAdminClient(baseUrl, hcOpts) {
|
|
|
2044
2106
|
* Requires super-admin.
|
|
2045
2107
|
*/
|
|
2046
2108
|
list: withSchema(
|
|
2047
|
-
|
|
2109
|
+
import_zod22.z.object({}),
|
|
2048
2110
|
async () => callRaw2(
|
|
2049
2111
|
await rawRequest2(
|
|
2050
2112
|
baseUrl,
|
|
@@ -2059,15 +2121,15 @@ function createAdminClient(baseUrl, hcOpts) {
|
|
|
2059
2121
|
}
|
|
2060
2122
|
|
|
2061
2123
|
// src/resolve-source.ts
|
|
2062
|
-
var
|
|
2124
|
+
var import_zod23 = require("zod");
|
|
2063
2125
|
function createResolveSourceFn(proj) {
|
|
2064
2126
|
return withSchema(
|
|
2065
|
-
|
|
2066
|
-
orgId:
|
|
2067
|
-
projectId:
|
|
2068
|
-
kind:
|
|
2069
|
-
ref:
|
|
2070
|
-
version:
|
|
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")
|
|
2071
2133
|
}),
|
|
2072
2134
|
(params) => {
|
|
2073
2135
|
const { orgId, projectId, kind, ref, version } = params;
|
|
@@ -2099,6 +2161,7 @@ var createClient = (baseUrl, options = {}) => {
|
|
|
2099
2161
|
environments: createEnvironmentsClient(proj),
|
|
2100
2162
|
entityTypes: createEntityTypesClient(proj),
|
|
2101
2163
|
deploymentTargets: createDeploymentTargetsClient(proj),
|
|
2164
|
+
deploymentTargetSets: createDeploymentTargetSetsClient(proj),
|
|
2102
2165
|
entities: createEntitiesClient(projEnv),
|
|
2103
2166
|
cells,
|
|
2104
2167
|
relationshipTypes: createRelationshipTypesClient(proj),
|