@terrantula/sdk 0.7.0 → 0.8.1
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-SDDTVMHH.mjs → chunk-NVHWMOWP.mjs} +446 -364
- package/dist/index.d.mts +1285 -650
- package/dist/index.d.ts +1285 -650
- package/dist/index.js +454 -372
- package/dist/index.mjs +1 -1
- package/dist/local.d.mts +866 -498
- package/dist/local.d.ts +866 -498
- package/dist/local.js +454 -372
- package/dist/local.mjs +1 -1
- package/package.json +2 -2
package/dist/local.js
CHANGED
|
@@ -611,45 +611,45 @@ function createEntitiesClient(projEnv) {
|
|
|
611
611
|
};
|
|
612
612
|
}
|
|
613
613
|
|
|
614
|
-
// src/
|
|
614
|
+
// src/deployment-targets.ts
|
|
615
615
|
var import_zod4 = require("zod");
|
|
616
616
|
var import_types2 = require("@terrantula/types");
|
|
617
|
-
function
|
|
617
|
+
function createDeploymentTargetsClient(proj) {
|
|
618
618
|
return {
|
|
619
619
|
list: withSchema(
|
|
620
620
|
import_zod4.z.object({
|
|
621
621
|
orgId: import_zod4.z.string().describe("Organization slug"),
|
|
622
622
|
projectId: import_zod4.z.string().describe("Project ID")
|
|
623
623
|
}),
|
|
624
|
-
(params) => call(proj(params.orgId, params.projectId)["
|
|
624
|
+
(params) => call(proj(params.orgId, params.projectId)["deployment-targets"].$get())
|
|
625
625
|
),
|
|
626
626
|
get: withSchema(
|
|
627
627
|
import_zod4.z.object({
|
|
628
628
|
orgId: import_zod4.z.string().describe("Organization slug"),
|
|
629
629
|
projectId: import_zod4.z.string().describe("Project ID"),
|
|
630
|
-
name: import_zod4.z.string().describe("
|
|
630
|
+
name: import_zod4.z.string().describe("Deployment target name")
|
|
631
631
|
}),
|
|
632
|
-
(params) => call(proj(params.orgId, params.projectId)["
|
|
632
|
+
(params) => call(proj(params.orgId, params.projectId)["deployment-targets"][":name"].$get({ param: { name: params.name } }))
|
|
633
633
|
),
|
|
634
634
|
create: withSchema(
|
|
635
|
-
import_types2.
|
|
635
|
+
import_types2.DeploymentTargetSchema.extend({
|
|
636
636
|
orgId: import_zod4.z.string().describe("Organization slug"),
|
|
637
637
|
projectId: import_zod4.z.string().describe("Project ID")
|
|
638
638
|
}),
|
|
639
639
|
(params) => {
|
|
640
640
|
const { orgId, projectId, ...body } = params;
|
|
641
|
-
return call(proj(orgId, projectId)["
|
|
641
|
+
return call(proj(orgId, projectId)["deployment-targets"].$post({ json: body }));
|
|
642
642
|
}
|
|
643
643
|
),
|
|
644
644
|
update: withSchema(
|
|
645
|
-
import_types2.
|
|
645
|
+
import_types2.DeploymentTargetSchema.extend({
|
|
646
646
|
orgId: import_zod4.z.string().describe("Organization slug"),
|
|
647
647
|
projectId: import_zod4.z.string().describe("Project ID")
|
|
648
648
|
}),
|
|
649
649
|
(params) => {
|
|
650
650
|
const { orgId, projectId, ...body } = params;
|
|
651
651
|
return call(
|
|
652
|
-
proj(orgId, projectId)["
|
|
652
|
+
proj(orgId, projectId)["deployment-targets"][":name"].$put({ param: { name: params.name }, json: body })
|
|
653
653
|
);
|
|
654
654
|
}
|
|
655
655
|
),
|
|
@@ -657,16 +657,69 @@ function createCellsClient(proj) {
|
|
|
657
657
|
import_zod4.z.object({
|
|
658
658
|
orgId: import_zod4.z.string().describe("Organization slug"),
|
|
659
659
|
projectId: import_zod4.z.string().describe("Project ID"),
|
|
660
|
-
name: import_zod4.z.string().describe("
|
|
660
|
+
name: import_zod4.z.string().describe("Deployment target name")
|
|
661
|
+
}),
|
|
662
|
+
(params) => call(proj(params.orgId, params.projectId)["deployment-targets"][":name"].$delete({ param: { name: params.name } }))
|
|
663
|
+
)
|
|
664
|
+
};
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
// src/cells.ts
|
|
668
|
+
var import_zod5 = require("zod");
|
|
669
|
+
var import_types3 = require("@terrantula/types");
|
|
670
|
+
function createCellsClient(proj) {
|
|
671
|
+
return {
|
|
672
|
+
list: withSchema(
|
|
673
|
+
import_zod5.z.object({
|
|
674
|
+
orgId: import_zod5.z.string().describe("Organization slug"),
|
|
675
|
+
projectId: import_zod5.z.string().describe("Project ID")
|
|
676
|
+
}),
|
|
677
|
+
(params) => call(proj(params.orgId, params.projectId)["cells"].$get())
|
|
678
|
+
),
|
|
679
|
+
get: withSchema(
|
|
680
|
+
import_zod5.z.object({
|
|
681
|
+
orgId: import_zod5.z.string().describe("Organization slug"),
|
|
682
|
+
projectId: import_zod5.z.string().describe("Project ID"),
|
|
683
|
+
name: import_zod5.z.string().describe("Cell name")
|
|
684
|
+
}),
|
|
685
|
+
(params) => call(proj(params.orgId, params.projectId)["cells"][":name"].$get({ param: { name: params.name } }))
|
|
686
|
+
),
|
|
687
|
+
create: withSchema(
|
|
688
|
+
import_types3.CellSchema.extend({
|
|
689
|
+
orgId: import_zod5.z.string().describe("Organization slug"),
|
|
690
|
+
projectId: import_zod5.z.string().describe("Project ID")
|
|
691
|
+
}),
|
|
692
|
+
(params) => {
|
|
693
|
+
const { orgId, projectId, ...body } = params;
|
|
694
|
+
return call(proj(orgId, projectId)["cells"].$post({ json: body }));
|
|
695
|
+
}
|
|
696
|
+
),
|
|
697
|
+
update: withSchema(
|
|
698
|
+
import_types3.CellSchema.extend({
|
|
699
|
+
orgId: import_zod5.z.string().describe("Organization slug"),
|
|
700
|
+
projectId: import_zod5.z.string().describe("Project ID")
|
|
701
|
+
}),
|
|
702
|
+
(params) => {
|
|
703
|
+
const { orgId, projectId, ...body } = params;
|
|
704
|
+
return call(
|
|
705
|
+
proj(orgId, projectId)["cells"][":name"].$put({ param: { name: params.name }, json: body })
|
|
706
|
+
);
|
|
707
|
+
}
|
|
708
|
+
),
|
|
709
|
+
delete: withSchema(
|
|
710
|
+
import_zod5.z.object({
|
|
711
|
+
orgId: import_zod5.z.string().describe("Organization slug"),
|
|
712
|
+
projectId: import_zod5.z.string().describe("Project ID"),
|
|
713
|
+
name: import_zod5.z.string().describe("Cell name")
|
|
661
714
|
}),
|
|
662
715
|
(params) => call(proj(params.orgId, params.projectId)["cells"][":name"].$delete({ param: { name: params.name } }))
|
|
663
716
|
),
|
|
664
717
|
listMembers: withSchema(
|
|
665
|
-
|
|
666
|
-
orgId:
|
|
667
|
-
projectId:
|
|
668
|
-
name:
|
|
669
|
-
envName:
|
|
718
|
+
import_zod5.z.object({
|
|
719
|
+
orgId: import_zod5.z.string().describe("Organization slug"),
|
|
720
|
+
projectId: import_zod5.z.string().describe("Project ID"),
|
|
721
|
+
name: import_zod5.z.string().describe("Cell name"),
|
|
722
|
+
envName: import_zod5.z.string().describe("Environment name").default("default")
|
|
670
723
|
}),
|
|
671
724
|
(params) => {
|
|
672
725
|
const envName = params.envName ?? "default";
|
|
@@ -679,13 +732,13 @@ function createCellsClient(proj) {
|
|
|
679
732
|
}
|
|
680
733
|
),
|
|
681
734
|
addMember: withSchema(
|
|
682
|
-
|
|
683
|
-
orgId:
|
|
684
|
-
projectId:
|
|
685
|
-
name:
|
|
686
|
-
entityName:
|
|
687
|
-
entityTypeName:
|
|
688
|
-
envName:
|
|
735
|
+
import_zod5.z.object({
|
|
736
|
+
orgId: import_zod5.z.string().describe("Organization slug"),
|
|
737
|
+
projectId: import_zod5.z.string().describe("Project ID"),
|
|
738
|
+
name: import_zod5.z.string().describe("Cell name"),
|
|
739
|
+
entityName: import_zod5.z.string().describe("Entity name (M5-rework natural key)"),
|
|
740
|
+
entityTypeName: import_zod5.z.string().describe("Entity type name (M5-rework natural key)"),
|
|
741
|
+
envName: import_zod5.z.string().describe("Environment name").default("default")
|
|
689
742
|
}),
|
|
690
743
|
(params) => {
|
|
691
744
|
const { orgId, projectId, name, entityName, entityTypeName } = params;
|
|
@@ -699,12 +752,12 @@ function createCellsClient(proj) {
|
|
|
699
752
|
}
|
|
700
753
|
),
|
|
701
754
|
removeMember: withSchema(
|
|
702
|
-
|
|
703
|
-
orgId:
|
|
704
|
-
projectId:
|
|
705
|
-
name:
|
|
706
|
-
entityName:
|
|
707
|
-
envName:
|
|
755
|
+
import_zod5.z.object({
|
|
756
|
+
orgId: import_zod5.z.string().describe("Organization slug"),
|
|
757
|
+
projectId: import_zod5.z.string().describe("Project ID"),
|
|
758
|
+
name: import_zod5.z.string().describe("Cell name"),
|
|
759
|
+
entityName: import_zod5.z.string().describe("Entity name (M5-rework natural key)"),
|
|
760
|
+
envName: import_zod5.z.string().describe("Environment name").default("default")
|
|
708
761
|
}),
|
|
709
762
|
(params) => {
|
|
710
763
|
const envName = params.envName ?? "default";
|
|
@@ -720,22 +773,22 @@ function createCellsClient(proj) {
|
|
|
720
773
|
}
|
|
721
774
|
|
|
722
775
|
// src/relationships.ts
|
|
723
|
-
var
|
|
724
|
-
var
|
|
776
|
+
var import_zod6 = require("zod");
|
|
777
|
+
var import_types4 = require("@terrantula/types");
|
|
725
778
|
function createRelationshipTypesClient(proj) {
|
|
726
779
|
return {
|
|
727
780
|
list: withSchema(
|
|
728
|
-
|
|
729
|
-
orgId:
|
|
730
|
-
projectId:
|
|
781
|
+
import_zod6.z.object({
|
|
782
|
+
orgId: import_zod6.z.string().describe("Organization slug"),
|
|
783
|
+
projectId: import_zod6.z.string().describe("Project ID")
|
|
731
784
|
}),
|
|
732
785
|
(params) => call(proj(params.orgId, params.projectId)["relationship-types"].$get())
|
|
733
786
|
),
|
|
734
787
|
get: withSchema(
|
|
735
|
-
|
|
736
|
-
orgId:
|
|
737
|
-
projectId:
|
|
738
|
-
name:
|
|
788
|
+
import_zod6.z.object({
|
|
789
|
+
orgId: import_zod6.z.string().describe("Organization slug"),
|
|
790
|
+
projectId: import_zod6.z.string().describe("Project ID"),
|
|
791
|
+
name: import_zod6.z.string().describe("Relationship type name")
|
|
739
792
|
}),
|
|
740
793
|
(params) => call(
|
|
741
794
|
proj(params.orgId, params.projectId)["relationship-types"][":name"].$get({
|
|
@@ -744,9 +797,9 @@ function createRelationshipTypesClient(proj) {
|
|
|
744
797
|
)
|
|
745
798
|
),
|
|
746
799
|
create: withSchema(
|
|
747
|
-
|
|
748
|
-
orgId:
|
|
749
|
-
projectId:
|
|
800
|
+
import_types4.RelationshipTypeSchema.extend({
|
|
801
|
+
orgId: import_zod6.z.string().describe("Organization slug"),
|
|
802
|
+
projectId: import_zod6.z.string().describe("Project ID")
|
|
750
803
|
}),
|
|
751
804
|
(params) => {
|
|
752
805
|
const { orgId, projectId, ...body } = params;
|
|
@@ -754,9 +807,9 @@ function createRelationshipTypesClient(proj) {
|
|
|
754
807
|
}
|
|
755
808
|
),
|
|
756
809
|
update: withSchema(
|
|
757
|
-
|
|
758
|
-
orgId:
|
|
759
|
-
projectId:
|
|
810
|
+
import_types4.RelationshipTypeSchema.extend({
|
|
811
|
+
orgId: import_zod6.z.string().describe("Organization slug"),
|
|
812
|
+
projectId: import_zod6.z.string().describe("Project ID")
|
|
760
813
|
}),
|
|
761
814
|
(params) => {
|
|
762
815
|
const { orgId, projectId, ...body } = params;
|
|
@@ -769,10 +822,10 @@ function createRelationshipTypesClient(proj) {
|
|
|
769
822
|
}
|
|
770
823
|
),
|
|
771
824
|
delete: withSchema(
|
|
772
|
-
|
|
773
|
-
orgId:
|
|
774
|
-
projectId:
|
|
775
|
-
name:
|
|
825
|
+
import_zod6.z.object({
|
|
826
|
+
orgId: import_zod6.z.string().describe("Organization slug"),
|
|
827
|
+
projectId: import_zod6.z.string().describe("Project ID"),
|
|
828
|
+
name: import_zod6.z.string().describe("Relationship type name")
|
|
776
829
|
}),
|
|
777
830
|
(params) => call(
|
|
778
831
|
proj(params.orgId, params.projectId)["relationship-types"][":name"].$delete({
|
|
@@ -785,17 +838,17 @@ function createRelationshipTypesClient(proj) {
|
|
|
785
838
|
function createRelationshipsClient(projEnv) {
|
|
786
839
|
return {
|
|
787
840
|
list: withSchema(
|
|
788
|
-
|
|
789
|
-
orgId:
|
|
790
|
-
projectId:
|
|
791
|
-
envName:
|
|
792
|
-
relationshipType:
|
|
793
|
-
state:
|
|
794
|
-
fromEntity:
|
|
795
|
-
toEntity:
|
|
796
|
-
fromEntityPool:
|
|
797
|
-
toEntityPool:
|
|
798
|
-
limit:
|
|
841
|
+
import_zod6.z.object({
|
|
842
|
+
orgId: import_zod6.z.string().describe("Organization slug"),
|
|
843
|
+
projectId: import_zod6.z.string().describe("Project ID"),
|
|
844
|
+
envName: import_zod6.z.string().describe("Environment name"),
|
|
845
|
+
relationshipType: import_zod6.z.string().optional().describe("Filter by relationship type"),
|
|
846
|
+
state: import_zod6.z.string().optional().describe("Filter by state"),
|
|
847
|
+
fromEntity: import_zod6.z.string().uuid().optional().describe("Filter by from-entity ID"),
|
|
848
|
+
toEntity: import_zod6.z.string().uuid().optional().describe("Filter by to-entity ID"),
|
|
849
|
+
fromEntityPool: import_zod6.z.string().optional().describe("Filter by from-entity pool"),
|
|
850
|
+
toEntityPool: import_zod6.z.string().optional().describe("Filter by to-entity pool"),
|
|
851
|
+
limit: import_zod6.z.coerce.number().int().min(1).max(100).optional().describe("Max results (1-100)")
|
|
799
852
|
}),
|
|
800
853
|
(params) => {
|
|
801
854
|
const { orgId, projectId, envName, ...query } = params;
|
|
@@ -805,21 +858,21 @@ function createRelationshipsClient(projEnv) {
|
|
|
805
858
|
}
|
|
806
859
|
),
|
|
807
860
|
get: withSchema(
|
|
808
|
-
|
|
809
|
-
orgId:
|
|
810
|
-
projectId:
|
|
811
|
-
envName:
|
|
812
|
-
id:
|
|
861
|
+
import_zod6.z.object({
|
|
862
|
+
orgId: import_zod6.z.string().describe("Organization slug"),
|
|
863
|
+
projectId: import_zod6.z.string().describe("Project ID"),
|
|
864
|
+
envName: import_zod6.z.string().describe("Environment name"),
|
|
865
|
+
id: import_zod6.z.string().uuid().describe("Relationship ID")
|
|
813
866
|
}),
|
|
814
867
|
(params) => call(
|
|
815
868
|
projEnv(params.orgId, params.projectId, params.envName)["relationships"][":id"].$get({ param: { id: params.id } })
|
|
816
869
|
)
|
|
817
870
|
),
|
|
818
871
|
create: withSchema(
|
|
819
|
-
|
|
820
|
-
orgId:
|
|
821
|
-
projectId:
|
|
822
|
-
envName:
|
|
872
|
+
import_types4.RelationshipSchema.extend({
|
|
873
|
+
orgId: import_zod6.z.string().describe("Organization slug"),
|
|
874
|
+
projectId: import_zod6.z.string().describe("Project ID"),
|
|
875
|
+
envName: import_zod6.z.string().describe("Environment name")
|
|
823
876
|
}),
|
|
824
877
|
(params) => {
|
|
825
878
|
const { orgId, projectId, envName, ...body } = params;
|
|
@@ -827,11 +880,11 @@ function createRelationshipsClient(projEnv) {
|
|
|
827
880
|
}
|
|
828
881
|
),
|
|
829
882
|
delete: withSchema(
|
|
830
|
-
|
|
831
|
-
orgId:
|
|
832
|
-
projectId:
|
|
833
|
-
envName:
|
|
834
|
-
id:
|
|
883
|
+
import_zod6.z.object({
|
|
884
|
+
orgId: import_zod6.z.string().describe("Organization slug"),
|
|
885
|
+
projectId: import_zod6.z.string().describe("Project ID"),
|
|
886
|
+
envName: import_zod6.z.string().describe("Environment name"),
|
|
887
|
+
id: import_zod6.z.string().uuid().describe("Relationship ID")
|
|
835
888
|
}),
|
|
836
889
|
(params) => call(
|
|
837
890
|
projEnv(params.orgId, params.projectId, params.envName)["relationships"][":id"].$delete({ param: { id: params.id } })
|
|
@@ -841,29 +894,29 @@ function createRelationshipsClient(projEnv) {
|
|
|
841
894
|
}
|
|
842
895
|
|
|
843
896
|
// src/actions.ts
|
|
844
|
-
var
|
|
845
|
-
var
|
|
897
|
+
var import_zod7 = require("zod");
|
|
898
|
+
var import_types5 = require("@terrantula/types");
|
|
846
899
|
function createActionsClient(proj, projEnv) {
|
|
847
900
|
return {
|
|
848
901
|
list: withSchema(
|
|
849
|
-
|
|
850
|
-
orgId:
|
|
851
|
-
projectId:
|
|
902
|
+
import_zod7.z.object({
|
|
903
|
+
orgId: import_zod7.z.string().describe("Organization slug"),
|
|
904
|
+
projectId: import_zod7.z.string().describe("Project ID")
|
|
852
905
|
}),
|
|
853
906
|
(params) => call(proj(params.orgId, params.projectId)["actions"].$get())
|
|
854
907
|
),
|
|
855
908
|
get: withSchema(
|
|
856
|
-
|
|
857
|
-
orgId:
|
|
858
|
-
projectId:
|
|
859
|
-
name:
|
|
909
|
+
import_zod7.z.object({
|
|
910
|
+
orgId: import_zod7.z.string().describe("Organization slug"),
|
|
911
|
+
projectId: import_zod7.z.string().describe("Project ID"),
|
|
912
|
+
name: import_zod7.z.string().describe("Action name")
|
|
860
913
|
}),
|
|
861
914
|
(params) => call(proj(params.orgId, params.projectId)["actions"][":name"].$get({ param: { name: params.name } }))
|
|
862
915
|
),
|
|
863
916
|
create: withSchema(
|
|
864
|
-
|
|
865
|
-
orgId:
|
|
866
|
-
projectId:
|
|
917
|
+
import_types5.ActionSchema.extend({
|
|
918
|
+
orgId: import_zod7.z.string().describe("Organization slug"),
|
|
919
|
+
projectId: import_zod7.z.string().describe("Project ID")
|
|
867
920
|
}),
|
|
868
921
|
(params) => {
|
|
869
922
|
const { orgId, projectId, ...body } = params;
|
|
@@ -871,9 +924,9 @@ function createActionsClient(proj, projEnv) {
|
|
|
871
924
|
}
|
|
872
925
|
),
|
|
873
926
|
update: withSchema(
|
|
874
|
-
|
|
875
|
-
orgId:
|
|
876
|
-
projectId:
|
|
927
|
+
import_types5.ActionSchema.extend({
|
|
928
|
+
orgId: import_zod7.z.string().describe("Organization slug"),
|
|
929
|
+
projectId: import_zod7.z.string().describe("Project ID")
|
|
877
930
|
}),
|
|
878
931
|
(params) => {
|
|
879
932
|
const { orgId, projectId, ...body } = params;
|
|
@@ -883,23 +936,23 @@ function createActionsClient(proj, projEnv) {
|
|
|
883
936
|
}
|
|
884
937
|
),
|
|
885
938
|
delete: withSchema(
|
|
886
|
-
|
|
887
|
-
orgId:
|
|
888
|
-
projectId:
|
|
889
|
-
name:
|
|
939
|
+
import_zod7.z.object({
|
|
940
|
+
orgId: import_zod7.z.string().describe("Organization slug"),
|
|
941
|
+
projectId: import_zod7.z.string().describe("Project ID"),
|
|
942
|
+
name: import_zod7.z.string().describe("Action name")
|
|
890
943
|
}),
|
|
891
944
|
(params) => call(
|
|
892
945
|
proj(params.orgId, params.projectId)["actions"][":name"].$delete({ param: { name: params.name } })
|
|
893
946
|
)
|
|
894
947
|
),
|
|
895
948
|
run: withSchema(
|
|
896
|
-
|
|
897
|
-
orgId:
|
|
898
|
-
projectId:
|
|
899
|
-
envName:
|
|
900
|
-
actionName:
|
|
901
|
-
parameters:
|
|
902
|
-
recommendations:
|
|
949
|
+
import_zod7.z.object({
|
|
950
|
+
orgId: import_zod7.z.string().describe("Organization slug"),
|
|
951
|
+
projectId: import_zod7.z.string().describe("Project ID"),
|
|
952
|
+
envName: import_zod7.z.string().describe("Environment name"),
|
|
953
|
+
actionName: import_zod7.z.string().describe("Action name"),
|
|
954
|
+
parameters: import_zod7.z.record(import_zod7.z.unknown()).optional().describe("Action parameters as JSON"),
|
|
955
|
+
recommendations: import_zod7.z.record(import_zod7.z.string()).optional().describe("Recommendation selections as JSON")
|
|
903
956
|
}),
|
|
904
957
|
(params) => {
|
|
905
958
|
const { orgId, projectId, envName, actionName, parameters, recommendations } = params;
|
|
@@ -916,14 +969,14 @@ function createActionsClient(proj, projEnv) {
|
|
|
916
969
|
function createActionRunsClient(projEnv) {
|
|
917
970
|
return {
|
|
918
971
|
list: withSchema(
|
|
919
|
-
|
|
920
|
-
orgId:
|
|
921
|
-
projectId:
|
|
922
|
-
envName:
|
|
923
|
-
actionName:
|
|
924
|
-
entityId:
|
|
925
|
-
status:
|
|
926
|
-
limit:
|
|
972
|
+
import_zod7.z.object({
|
|
973
|
+
orgId: import_zod7.z.string().describe("Organization slug"),
|
|
974
|
+
projectId: import_zod7.z.string().describe("Project ID"),
|
|
975
|
+
envName: import_zod7.z.string().describe("Environment name"),
|
|
976
|
+
actionName: import_zod7.z.string().optional().describe("Filter by action name"),
|
|
977
|
+
entityId: import_zod7.z.string().uuid().optional().describe("Filter by entity ID"),
|
|
978
|
+
status: import_zod7.z.enum(["pending", "running", "succeeded", "failed", "cancelled"]).optional().describe("Filter by status"),
|
|
979
|
+
limit: import_zod7.z.coerce.number().int().min(1).max(100).optional().describe("Max results (1-100)")
|
|
927
980
|
}),
|
|
928
981
|
(params) => {
|
|
929
982
|
const { orgId, projectId, envName, ...query } = params;
|
|
@@ -933,22 +986,22 @@ function createActionRunsClient(projEnv) {
|
|
|
933
986
|
}
|
|
934
987
|
),
|
|
935
988
|
get: withSchema(
|
|
936
|
-
|
|
937
|
-
orgId:
|
|
938
|
-
projectId:
|
|
939
|
-
envName:
|
|
940
|
-
id:
|
|
989
|
+
import_zod7.z.object({
|
|
990
|
+
orgId: import_zod7.z.string().describe("Organization slug"),
|
|
991
|
+
projectId: import_zod7.z.string().describe("Project ID"),
|
|
992
|
+
envName: import_zod7.z.string().describe("Environment name"),
|
|
993
|
+
id: import_zod7.z.string().uuid().describe("Action run ID")
|
|
941
994
|
}),
|
|
942
995
|
(params) => call(
|
|
943
996
|
projEnv(params.orgId, params.projectId, params.envName)["action-runs"][":id"].$get({ param: { id: params.id } })
|
|
944
997
|
)
|
|
945
998
|
),
|
|
946
999
|
cancel: withSchema(
|
|
947
|
-
|
|
948
|
-
orgId:
|
|
949
|
-
projectId:
|
|
950
|
-
envName:
|
|
951
|
-
id:
|
|
1000
|
+
import_zod7.z.object({
|
|
1001
|
+
orgId: import_zod7.z.string().describe("Organization slug"),
|
|
1002
|
+
projectId: import_zod7.z.string().describe("Project ID"),
|
|
1003
|
+
envName: import_zod7.z.string().describe("Environment name"),
|
|
1004
|
+
id: import_zod7.z.string().uuid().describe("Action run ID")
|
|
952
1005
|
}),
|
|
953
1006
|
(params) => call(
|
|
954
1007
|
projEnv(params.orgId, params.projectId, params.envName)["action-runs"][":id"].$delete({ param: { id: params.id } })
|
|
@@ -958,36 +1011,36 @@ function createActionRunsClient(projEnv) {
|
|
|
958
1011
|
}
|
|
959
1012
|
|
|
960
1013
|
// src/secrets.ts
|
|
961
|
-
var
|
|
962
|
-
var
|
|
1014
|
+
var import_zod8 = require("zod");
|
|
1015
|
+
var import_types6 = require("@terrantula/types");
|
|
963
1016
|
function createSecretsClient(projEnv) {
|
|
964
1017
|
return {
|
|
965
1018
|
list: withSchema(
|
|
966
|
-
|
|
967
|
-
orgId:
|
|
968
|
-
projectId:
|
|
969
|
-
envName:
|
|
1019
|
+
import_zod8.z.object({
|
|
1020
|
+
orgId: import_zod8.z.string().describe("Organization slug"),
|
|
1021
|
+
projectId: import_zod8.z.string().describe("Project ID"),
|
|
1022
|
+
envName: import_zod8.z.string().describe("Environment name")
|
|
970
1023
|
}),
|
|
971
1024
|
(params) => call(projEnv(params.orgId, params.projectId, params.envName)["secrets"].$get())
|
|
972
1025
|
),
|
|
973
1026
|
get: withSchema(
|
|
974
|
-
|
|
975
|
-
orgId:
|
|
976
|
-
projectId:
|
|
977
|
-
envName:
|
|
978
|
-
name:
|
|
1027
|
+
import_zod8.z.object({
|
|
1028
|
+
orgId: import_zod8.z.string().describe("Organization slug"),
|
|
1029
|
+
projectId: import_zod8.z.string().describe("Project ID"),
|
|
1030
|
+
envName: import_zod8.z.string().describe("Environment name"),
|
|
1031
|
+
name: import_zod8.z.string().describe("Secret name")
|
|
979
1032
|
}),
|
|
980
1033
|
(params) => call(
|
|
981
1034
|
projEnv(params.orgId, params.projectId, params.envName)["secrets"][":name"].$get({ param: { name: params.name } })
|
|
982
1035
|
)
|
|
983
1036
|
),
|
|
984
1037
|
create: withSchema(
|
|
985
|
-
|
|
986
|
-
orgId:
|
|
987
|
-
projectId:
|
|
988
|
-
envName:
|
|
989
|
-
name:
|
|
990
|
-
description:
|
|
1038
|
+
import_zod8.z.object({
|
|
1039
|
+
orgId: import_zod8.z.string().describe("Organization slug"),
|
|
1040
|
+
projectId: import_zod8.z.string().describe("Project ID"),
|
|
1041
|
+
envName: import_zod8.z.string().describe("Environment name"),
|
|
1042
|
+
name: import_zod8.z.string().describe("Secret name"),
|
|
1043
|
+
description: import_zod8.z.string().optional().describe("Description")
|
|
991
1044
|
}),
|
|
992
1045
|
(params) => {
|
|
993
1046
|
const { orgId, projectId, envName, name, description } = params;
|
|
@@ -997,23 +1050,23 @@ function createSecretsClient(projEnv) {
|
|
|
997
1050
|
}
|
|
998
1051
|
),
|
|
999
1052
|
delete: withSchema(
|
|
1000
|
-
|
|
1001
|
-
orgId:
|
|
1002
|
-
projectId:
|
|
1003
|
-
envName:
|
|
1004
|
-
name:
|
|
1053
|
+
import_zod8.z.object({
|
|
1054
|
+
orgId: import_zod8.z.string().describe("Organization slug"),
|
|
1055
|
+
projectId: import_zod8.z.string().describe("Project ID"),
|
|
1056
|
+
envName: import_zod8.z.string().describe("Environment name"),
|
|
1057
|
+
name: import_zod8.z.string().describe("Secret name")
|
|
1005
1058
|
}),
|
|
1006
1059
|
(params) => call(
|
|
1007
1060
|
projEnv(params.orgId, params.projectId, params.envName)["secrets"][":name"].$delete({ param: { name: params.name } })
|
|
1008
1061
|
)
|
|
1009
1062
|
),
|
|
1010
1063
|
setValue: withSchema(
|
|
1011
|
-
|
|
1012
|
-
orgId:
|
|
1013
|
-
projectId:
|
|
1014
|
-
envName:
|
|
1015
|
-
name:
|
|
1016
|
-
value:
|
|
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
|
+
name: import_zod8.z.string().describe("Secret name"),
|
|
1069
|
+
value: import_zod8.z.string().min(1).describe("Secret value")
|
|
1017
1070
|
}),
|
|
1018
1071
|
(params) => {
|
|
1019
1072
|
const { orgId, projectId, envName, name, value } = params;
|
|
@@ -1029,10 +1082,10 @@ function createSecretsClient(projEnv) {
|
|
|
1029
1082
|
}
|
|
1030
1083
|
function createApplyClient(projEnv) {
|
|
1031
1084
|
return withSchema(
|
|
1032
|
-
|
|
1033
|
-
orgId:
|
|
1034
|
-
projectId:
|
|
1035
|
-
envName:
|
|
1085
|
+
import_types6.ApplyRequestSchema.extend({
|
|
1086
|
+
orgId: import_zod8.z.string().describe("Organization slug"),
|
|
1087
|
+
projectId: import_zod8.z.string().describe("Project ID"),
|
|
1088
|
+
envName: import_zod8.z.string().describe("Environment name")
|
|
1036
1089
|
}),
|
|
1037
1090
|
(params) => {
|
|
1038
1091
|
const { orgId, projectId, envName, ...body } = params;
|
|
@@ -1042,25 +1095,25 @@ function createApplyClient(projEnv) {
|
|
|
1042
1095
|
}
|
|
1043
1096
|
|
|
1044
1097
|
// src/github.ts
|
|
1045
|
-
var
|
|
1098
|
+
var import_zod9 = require("zod");
|
|
1046
1099
|
function createGithubClient(cloud, _baseUrl, _hcOpts) {
|
|
1047
1100
|
return {
|
|
1048
1101
|
connect: withSchema(
|
|
1049
|
-
|
|
1050
|
-
projectId:
|
|
1102
|
+
import_zod9.z.object({
|
|
1103
|
+
projectId: import_zod9.z.string().describe("Project ID")
|
|
1051
1104
|
}),
|
|
1052
1105
|
(params) => call(cloud.github["install-url"].$post({ json: params }))
|
|
1053
1106
|
),
|
|
1054
1107
|
installations: {
|
|
1055
1108
|
list: withSchema(
|
|
1056
|
-
|
|
1057
|
-
orgId:
|
|
1109
|
+
import_zod9.z.object({
|
|
1110
|
+
orgId: import_zod9.z.string().describe("Organization ID")
|
|
1058
1111
|
}),
|
|
1059
1112
|
(params) => call(cloud.github.installations.$get({ query: params }))
|
|
1060
1113
|
),
|
|
1061
1114
|
repos: withSchema(
|
|
1062
|
-
|
|
1063
|
-
installationId:
|
|
1115
|
+
import_zod9.z.object({
|
|
1116
|
+
installationId: import_zod9.z.string().describe("Installation row ID")
|
|
1064
1117
|
}),
|
|
1065
1118
|
(params) => call(
|
|
1066
1119
|
cloud.github.installations[":installationId"].repos.$get({
|
|
@@ -1069,8 +1122,8 @@ function createGithubClient(cloud, _baseUrl, _hcOpts) {
|
|
|
1069
1122
|
)
|
|
1070
1123
|
),
|
|
1071
1124
|
disconnect: withSchema(
|
|
1072
|
-
|
|
1073
|
-
installationId:
|
|
1125
|
+
import_zod9.z.object({
|
|
1126
|
+
installationId: import_zod9.z.string().describe("Installation row ID")
|
|
1074
1127
|
}),
|
|
1075
1128
|
(params) => call(
|
|
1076
1129
|
cloud.github.installations[":installationId"].$delete({
|
|
@@ -1079,18 +1132,18 @@ function createGithubClient(cloud, _baseUrl, _hcOpts) {
|
|
|
1079
1132
|
)
|
|
1080
1133
|
),
|
|
1081
1134
|
recover: withSchema(
|
|
1082
|
-
|
|
1083
|
-
orgId:
|
|
1084
|
-
installationId:
|
|
1135
|
+
import_zod9.z.object({
|
|
1136
|
+
orgId: import_zod9.z.string().describe("Organization ID"),
|
|
1137
|
+
installationId: import_zod9.z.number().int().positive().describe("GitHub installation ID (from the GitHub install URL)")
|
|
1085
1138
|
}),
|
|
1086
1139
|
(params) => call(cloud.github.installations.recover.$post({ json: params }))
|
|
1087
1140
|
)
|
|
1088
1141
|
},
|
|
1089
1142
|
projects: {
|
|
1090
1143
|
list: withSchema(
|
|
1091
|
-
|
|
1092
|
-
orgId:
|
|
1093
|
-
projectId:
|
|
1144
|
+
import_zod9.z.object({
|
|
1145
|
+
orgId: import_zod9.z.string().describe("Organization ID"),
|
|
1146
|
+
projectId: import_zod9.z.string().describe("Project ID")
|
|
1094
1147
|
}),
|
|
1095
1148
|
(params) => call(
|
|
1096
1149
|
cloud.orgs[":orgId"].projects[":projectId"]["github-repos"].$get({
|
|
@@ -1099,11 +1152,11 @@ function createGithubClient(cloud, _baseUrl, _hcOpts) {
|
|
|
1099
1152
|
)
|
|
1100
1153
|
),
|
|
1101
1154
|
linkRepo: withSchema(
|
|
1102
|
-
|
|
1103
|
-
orgId:
|
|
1104
|
-
projectId:
|
|
1105
|
-
installationId:
|
|
1106
|
-
repoFullName:
|
|
1155
|
+
import_zod9.z.object({
|
|
1156
|
+
orgId: import_zod9.z.string().describe("Organization ID"),
|
|
1157
|
+
projectId: import_zod9.z.string().describe("Project ID"),
|
|
1158
|
+
installationId: import_zod9.z.string().describe("github_installations.id (UUID)"),
|
|
1159
|
+
repoFullName: import_zod9.z.string().describe('GitHub repo "owner/name"')
|
|
1107
1160
|
}),
|
|
1108
1161
|
(params) => {
|
|
1109
1162
|
const { orgId, projectId, ...body } = params;
|
|
@@ -1116,10 +1169,10 @@ function createGithubClient(cloud, _baseUrl, _hcOpts) {
|
|
|
1116
1169
|
}
|
|
1117
1170
|
),
|
|
1118
1171
|
unlinkRepo: withSchema(
|
|
1119
|
-
|
|
1120
|
-
orgId:
|
|
1121
|
-
projectId:
|
|
1122
|
-
id:
|
|
1172
|
+
import_zod9.z.object({
|
|
1173
|
+
orgId: import_zod9.z.string().describe("Organization ID"),
|
|
1174
|
+
projectId: import_zod9.z.string().describe("Project ID"),
|
|
1175
|
+
id: import_zod9.z.string().describe("project_github_repos.id (UUID) \u2014 returned by linkRepo")
|
|
1123
1176
|
}),
|
|
1124
1177
|
(params) => call(
|
|
1125
1178
|
cloud.orgs[":orgId"].projects[":projectId"]["github-repos"][":id"].$delete({
|
|
@@ -1131,8 +1184,35 @@ function createGithubClient(cloud, _baseUrl, _hcOpts) {
|
|
|
1131
1184
|
};
|
|
1132
1185
|
}
|
|
1133
1186
|
|
|
1187
|
+
// src/blueprints.ts
|
|
1188
|
+
var import_zod10 = require("zod");
|
|
1189
|
+
var SpinInputSchema = import_zod10.z.object({
|
|
1190
|
+
orgId: import_zod10.z.string().describe("Organization slug"),
|
|
1191
|
+
blueprint: import_zod10.z.string().describe("First-party blueprint name (e.g. k8s-fleet)"),
|
|
1192
|
+
substrate: import_zod10.z.enum(["bare-tf", "tfc", "atmos"]).optional(),
|
|
1193
|
+
repo: import_zod10.z.string().optional().describe("owner/repo to open the spin PR into (omit when createRepo is set)"),
|
|
1194
|
+
prBase: import_zod10.z.string().optional(),
|
|
1195
|
+
githubToken: import_zod10.z.string().optional(),
|
|
1196
|
+
createRepo: import_zod10.z.object({ name: import_zod10.z.string(), private: import_zod10.z.boolean().optional() }).optional().describe("Cloud opt-in: auto-create the target GitHub repo before spinning"),
|
|
1197
|
+
createWorkspace: import_zod10.z.object({ organization: import_zod10.z.string(), name: import_zod10.z.string(), apiToken: import_zod10.z.string(), apiBaseUrl: import_zod10.z.string().optional() }).optional().describe("Cloud opt-in: auto-create the TFC workspace shell before spinning"),
|
|
1198
|
+
vars: import_zod10.z.record(import_zod10.z.string()).default({})
|
|
1199
|
+
});
|
|
1200
|
+
function createBlueprintsClient(cloud) {
|
|
1201
|
+
return {
|
|
1202
|
+
list: () => call(cloud.blueprints.$get()),
|
|
1203
|
+
get: withSchema(
|
|
1204
|
+
import_zod10.z.object({ name: import_zod10.z.string().describe("Blueprint name") }),
|
|
1205
|
+
(params) => call(cloud.blueprints[":name"].$get({ param: params }))
|
|
1206
|
+
),
|
|
1207
|
+
spin: withSchema(SpinInputSchema, (params) => {
|
|
1208
|
+
const { orgId, ...body } = params;
|
|
1209
|
+
return call(cloud.orgs[":orgId"].spin.$post({ param: { orgId }, json: body }));
|
|
1210
|
+
})
|
|
1211
|
+
};
|
|
1212
|
+
}
|
|
1213
|
+
|
|
1134
1214
|
// src/export.ts
|
|
1135
|
-
var
|
|
1215
|
+
var import_zod11 = require("zod");
|
|
1136
1216
|
var SERVER_FIELDS = /* @__PURE__ */ new Set(["id", "projectId", "envId", "createdAt", "updatedAt"]);
|
|
1137
1217
|
function stripServerFields(row) {
|
|
1138
1218
|
const out = {};
|
|
@@ -1143,10 +1223,10 @@ function stripServerFields(row) {
|
|
|
1143
1223
|
}
|
|
1144
1224
|
function createExportCatalogFn(proj, projEnv) {
|
|
1145
1225
|
return withSchema(
|
|
1146
|
-
|
|
1147
|
-
orgId:
|
|
1148
|
-
projectId:
|
|
1149
|
-
envName:
|
|
1226
|
+
import_zod11.z.object({
|
|
1227
|
+
orgId: import_zod11.z.string().describe("Organization slug"),
|
|
1228
|
+
projectId: import_zod11.z.string().describe("Project ID"),
|
|
1229
|
+
envName: import_zod11.z.string().describe("Environment name to export secret declarations from")
|
|
1150
1230
|
}).describe("Export every catalog kind as a single apply-shaped payload"),
|
|
1151
1231
|
async (params) => {
|
|
1152
1232
|
const projClient = proj(params.orgId, params.projectId);
|
|
@@ -1185,14 +1265,14 @@ function createExportCatalogFn(proj, projEnv) {
|
|
|
1185
1265
|
}
|
|
1186
1266
|
|
|
1187
1267
|
// src/catalog-revisions.ts
|
|
1188
|
-
var
|
|
1268
|
+
var import_zod12 = require("zod");
|
|
1189
1269
|
function createCatalogRevisionsClient(proj) {
|
|
1190
1270
|
return {
|
|
1191
1271
|
list: withSchema(
|
|
1192
|
-
|
|
1193
|
-
orgId:
|
|
1194
|
-
projectId:
|
|
1195
|
-
limit:
|
|
1272
|
+
import_zod12.z.object({
|
|
1273
|
+
orgId: import_zod12.z.string().describe("Organization slug"),
|
|
1274
|
+
projectId: import_zod12.z.string().describe("Project ID"),
|
|
1275
|
+
limit: import_zod12.z.coerce.number().int().min(1).max(200).optional().describe("Max revisions to return (1-200)")
|
|
1196
1276
|
}),
|
|
1197
1277
|
(params) => {
|
|
1198
1278
|
const { orgId, projectId, ...query } = params;
|
|
@@ -1202,20 +1282,20 @@ function createCatalogRevisionsClient(proj) {
|
|
|
1202
1282
|
}
|
|
1203
1283
|
),
|
|
1204
1284
|
get: withSchema(
|
|
1205
|
-
|
|
1206
|
-
orgId:
|
|
1207
|
-
projectId:
|
|
1208
|
-
id:
|
|
1285
|
+
import_zod12.z.object({
|
|
1286
|
+
orgId: import_zod12.z.string().describe("Organization slug"),
|
|
1287
|
+
projectId: import_zod12.z.string().describe("Project ID"),
|
|
1288
|
+
id: import_zod12.z.string().uuid().describe("Revision ID")
|
|
1209
1289
|
}),
|
|
1210
1290
|
(params) => call(
|
|
1211
1291
|
proj(params.orgId, params.projectId)["catalog-revisions"][":id"].$get({ param: { id: params.id } })
|
|
1212
1292
|
)
|
|
1213
1293
|
),
|
|
1214
1294
|
snapshots: withSchema(
|
|
1215
|
-
|
|
1216
|
-
orgId:
|
|
1217
|
-
projectId:
|
|
1218
|
-
id:
|
|
1295
|
+
import_zod12.z.object({
|
|
1296
|
+
orgId: import_zod12.z.string().describe("Organization slug"),
|
|
1297
|
+
projectId: import_zod12.z.string().describe("Project ID"),
|
|
1298
|
+
id: import_zod12.z.string().uuid().describe("Revision ID to read snapshots for")
|
|
1219
1299
|
}),
|
|
1220
1300
|
(params) => call(
|
|
1221
1301
|
proj(params.orgId, params.projectId)["catalog-revisions"][":id"]["snapshots"].$get({
|
|
@@ -1229,12 +1309,12 @@ function createCatalogRevisionsClient(proj) {
|
|
|
1229
1309
|
* `force: true`, mirroring POST /apply.
|
|
1230
1310
|
*/
|
|
1231
1311
|
rollback: withSchema(
|
|
1232
|
-
|
|
1233
|
-
orgId:
|
|
1234
|
-
projectId:
|
|
1235
|
-
id:
|
|
1236
|
-
hunkId:
|
|
1237
|
-
force:
|
|
1312
|
+
import_zod12.z.object({
|
|
1313
|
+
orgId: import_zod12.z.string().describe("Organization slug"),
|
|
1314
|
+
projectId: import_zod12.z.string().describe("Project ID"),
|
|
1315
|
+
id: import_zod12.z.string().uuid().describe("Revision ID to roll back to"),
|
|
1316
|
+
hunkId: import_zod12.z.string().uuid().optional().describe("Single-hunk filter"),
|
|
1317
|
+
force: import_zod12.z.boolean().optional().describe("Required if the inverse diff is destructive")
|
|
1238
1318
|
}),
|
|
1239
1319
|
(params) => {
|
|
1240
1320
|
const { orgId, projectId, id, hunkId, force } = params;
|
|
@@ -1251,20 +1331,20 @@ function createCatalogRevisionsClient(proj) {
|
|
|
1251
1331
|
}
|
|
1252
1332
|
|
|
1253
1333
|
// src/audit-events.ts
|
|
1254
|
-
var
|
|
1334
|
+
var import_zod13 = require("zod");
|
|
1255
1335
|
function createAuditEventsClient(proj) {
|
|
1256
1336
|
return {
|
|
1257
1337
|
list: withSchema(
|
|
1258
|
-
|
|
1259
|
-
orgId:
|
|
1260
|
-
projectId:
|
|
1261
|
-
envName:
|
|
1262
|
-
actorType:
|
|
1263
|
-
actorId:
|
|
1264
|
-
action:
|
|
1265
|
-
resourceKind:
|
|
1266
|
-
since:
|
|
1267
|
-
limit:
|
|
1338
|
+
import_zod13.z.object({
|
|
1339
|
+
orgId: import_zod13.z.string().describe("Organization slug"),
|
|
1340
|
+
projectId: import_zod13.z.string().describe("Project ID"),
|
|
1341
|
+
envName: import_zod13.z.string().optional().describe("Filter to a single env"),
|
|
1342
|
+
actorType: import_zod13.z.enum(["user", "token"]).optional().describe("Filter by actor type"),
|
|
1343
|
+
actorId: import_zod13.z.string().optional().describe("Filter by actor (user.id or apikey.id)"),
|
|
1344
|
+
action: import_zod13.z.string().optional().describe('Comma-separated actions (e.g. "create,delete")'),
|
|
1345
|
+
resourceKind: import_zod13.z.string().optional().describe("Filter to one resource kind (Entity | Token | Member | \u2026)"),
|
|
1346
|
+
since: import_zod13.z.string().datetime().optional().describe("ISO timestamp; only events strictly after this are returned"),
|
|
1347
|
+
limit: import_zod13.z.coerce.number().int().min(1).max(500).optional().describe("Max rows (1-500)")
|
|
1268
1348
|
}).describe("List audit events for a project \u2014 auditor-friendly read-only feed"),
|
|
1269
1349
|
(params) => {
|
|
1270
1350
|
const { orgId, projectId, ...query } = params;
|
|
@@ -1275,21 +1355,21 @@ function createAuditEventsClient(proj) {
|
|
|
1275
1355
|
}
|
|
1276
1356
|
|
|
1277
1357
|
// src/environments.ts
|
|
1278
|
-
var
|
|
1358
|
+
var import_zod14 = require("zod");
|
|
1279
1359
|
function createEnvironmentsClient(proj) {
|
|
1280
1360
|
return {
|
|
1281
1361
|
list: withSchema(
|
|
1282
|
-
|
|
1283
|
-
orgId:
|
|
1284
|
-
projectId:
|
|
1362
|
+
import_zod14.z.object({
|
|
1363
|
+
orgId: import_zod14.z.string().describe("Organization slug"),
|
|
1364
|
+
projectId: import_zod14.z.string().describe("Project ID")
|
|
1285
1365
|
}),
|
|
1286
1366
|
(params) => call(proj(params.orgId, params.projectId)["environments"].$get())
|
|
1287
1367
|
),
|
|
1288
1368
|
create: withSchema(
|
|
1289
|
-
|
|
1290
|
-
orgId:
|
|
1291
|
-
projectId:
|
|
1292
|
-
name:
|
|
1369
|
+
import_zod14.z.object({
|
|
1370
|
+
orgId: import_zod14.z.string().describe("Organization slug"),
|
|
1371
|
+
projectId: import_zod14.z.string().describe("Project ID"),
|
|
1372
|
+
name: import_zod14.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)")
|
|
1293
1373
|
}),
|
|
1294
1374
|
(params) => {
|
|
1295
1375
|
const { orgId, projectId, name } = params;
|
|
@@ -1297,10 +1377,10 @@ function createEnvironmentsClient(proj) {
|
|
|
1297
1377
|
}
|
|
1298
1378
|
),
|
|
1299
1379
|
delete: withSchema(
|
|
1300
|
-
|
|
1301
|
-
orgId:
|
|
1302
|
-
projectId:
|
|
1303
|
-
name:
|
|
1380
|
+
import_zod14.z.object({
|
|
1381
|
+
orgId: import_zod14.z.string().describe("Organization slug"),
|
|
1382
|
+
projectId: import_zod14.z.string().describe("Project ID"),
|
|
1383
|
+
name: import_zod14.z.string().describe("Environment name")
|
|
1304
1384
|
}),
|
|
1305
1385
|
(params) => call(
|
|
1306
1386
|
proj(params.orgId, params.projectId)["environments"][":envName"].$delete({
|
|
@@ -1312,19 +1392,19 @@ function createEnvironmentsClient(proj) {
|
|
|
1312
1392
|
}
|
|
1313
1393
|
|
|
1314
1394
|
// src/drift-events.ts
|
|
1315
|
-
var
|
|
1395
|
+
var import_zod15 = require("zod");
|
|
1316
1396
|
function createDriftEventsClient(projEnv) {
|
|
1317
1397
|
return {
|
|
1318
1398
|
list: withSchema(
|
|
1319
|
-
|
|
1320
|
-
orgId:
|
|
1321
|
-
projectId:
|
|
1322
|
-
envName:
|
|
1323
|
-
status:
|
|
1324
|
-
kind:
|
|
1325
|
-
entityId:
|
|
1326
|
-
since:
|
|
1327
|
-
limit:
|
|
1399
|
+
import_zod15.z.object({
|
|
1400
|
+
orgId: import_zod15.z.string().describe("Organization slug"),
|
|
1401
|
+
projectId: import_zod15.z.string().describe("Project ID"),
|
|
1402
|
+
envName: import_zod15.z.string().describe("Environment name"),
|
|
1403
|
+
status: import_zod15.z.enum(["open", "accepted", "reapplied", "snoozed"]).optional(),
|
|
1404
|
+
kind: import_zod15.z.string().optional().describe("Filter by entity type name"),
|
|
1405
|
+
entityId: import_zod15.z.string().uuid().optional(),
|
|
1406
|
+
since: import_zod15.z.string().optional().describe("ISO timestamp lower bound on detectedAt"),
|
|
1407
|
+
limit: import_zod15.z.coerce.number().int().min(1).max(500).optional()
|
|
1328
1408
|
}),
|
|
1329
1409
|
(params) => {
|
|
1330
1410
|
const { orgId, projectId, envName, ...query } = params;
|
|
@@ -1334,19 +1414,19 @@ function createDriftEventsClient(projEnv) {
|
|
|
1334
1414
|
}
|
|
1335
1415
|
),
|
|
1336
1416
|
count: withSchema(
|
|
1337
|
-
|
|
1338
|
-
orgId:
|
|
1339
|
-
projectId:
|
|
1340
|
-
envName:
|
|
1417
|
+
import_zod15.z.object({
|
|
1418
|
+
orgId: import_zod15.z.string().describe("Organization slug"),
|
|
1419
|
+
projectId: import_zod15.z.string().describe("Project ID"),
|
|
1420
|
+
envName: import_zod15.z.string().describe("Environment name")
|
|
1341
1421
|
}),
|
|
1342
1422
|
(params) => call(projEnv(params.orgId, params.projectId, params.envName)["drift-events"].count.$get())
|
|
1343
1423
|
),
|
|
1344
1424
|
get: withSchema(
|
|
1345
|
-
|
|
1346
|
-
orgId:
|
|
1347
|
-
projectId:
|
|
1348
|
-
envName:
|
|
1349
|
-
id:
|
|
1425
|
+
import_zod15.z.object({
|
|
1426
|
+
orgId: import_zod15.z.string().describe("Organization slug"),
|
|
1427
|
+
projectId: import_zod15.z.string().describe("Project ID"),
|
|
1428
|
+
envName: import_zod15.z.string().describe("Environment name"),
|
|
1429
|
+
id: import_zod15.z.string().uuid()
|
|
1350
1430
|
}),
|
|
1351
1431
|
(params) => call(
|
|
1352
1432
|
projEnv(params.orgId, params.projectId, params.envName)["drift-events"][":id"].$get({
|
|
@@ -1355,11 +1435,11 @@ function createDriftEventsClient(projEnv) {
|
|
|
1355
1435
|
)
|
|
1356
1436
|
),
|
|
1357
1437
|
accept: withSchema(
|
|
1358
|
-
|
|
1359
|
-
orgId:
|
|
1360
|
-
projectId:
|
|
1361
|
-
envName:
|
|
1362
|
-
id:
|
|
1438
|
+
import_zod15.z.object({
|
|
1439
|
+
orgId: import_zod15.z.string().describe("Organization slug"),
|
|
1440
|
+
projectId: import_zod15.z.string().describe("Project ID"),
|
|
1441
|
+
envName: import_zod15.z.string().describe("Environment name"),
|
|
1442
|
+
id: import_zod15.z.string().uuid()
|
|
1363
1443
|
}),
|
|
1364
1444
|
(params) => call(
|
|
1365
1445
|
projEnv(params.orgId, params.projectId, params.envName)["drift-events"][":id"].accept.$post({
|
|
@@ -1368,11 +1448,11 @@ function createDriftEventsClient(projEnv) {
|
|
|
1368
1448
|
)
|
|
1369
1449
|
),
|
|
1370
1450
|
reapply: withSchema(
|
|
1371
|
-
|
|
1372
|
-
orgId:
|
|
1373
|
-
projectId:
|
|
1374
|
-
envName:
|
|
1375
|
-
id:
|
|
1451
|
+
import_zod15.z.object({
|
|
1452
|
+
orgId: import_zod15.z.string().describe("Organization slug"),
|
|
1453
|
+
projectId: import_zod15.z.string().describe("Project ID"),
|
|
1454
|
+
envName: import_zod15.z.string().describe("Environment name"),
|
|
1455
|
+
id: import_zod15.z.string().uuid()
|
|
1376
1456
|
}),
|
|
1377
1457
|
(params) => call(
|
|
1378
1458
|
projEnv(params.orgId, params.projectId, params.envName)["drift-events"][":id"].reapply.$post({
|
|
@@ -1381,12 +1461,12 @@ function createDriftEventsClient(projEnv) {
|
|
|
1381
1461
|
)
|
|
1382
1462
|
),
|
|
1383
1463
|
snooze: withSchema(
|
|
1384
|
-
|
|
1385
|
-
orgId:
|
|
1386
|
-
projectId:
|
|
1387
|
-
envName:
|
|
1388
|
-
id:
|
|
1389
|
-
untilSeconds:
|
|
1464
|
+
import_zod15.z.object({
|
|
1465
|
+
orgId: import_zod15.z.string().describe("Organization slug"),
|
|
1466
|
+
projectId: import_zod15.z.string().describe("Project ID"),
|
|
1467
|
+
envName: import_zod15.z.string().describe("Environment name"),
|
|
1468
|
+
id: import_zod15.z.string().uuid(),
|
|
1469
|
+
untilSeconds: import_zod15.z.number().int().positive().optional()
|
|
1390
1470
|
}),
|
|
1391
1471
|
(params) => call(
|
|
1392
1472
|
projEnv(params.orgId, params.projectId, params.envName)["drift-events"][":id"].snooze.$post({
|
|
@@ -1399,15 +1479,15 @@ function createDriftEventsClient(projEnv) {
|
|
|
1399
1479
|
}
|
|
1400
1480
|
|
|
1401
1481
|
// src/stats.ts
|
|
1402
|
-
var
|
|
1403
|
-
var WindowSchema =
|
|
1404
|
-
var BucketSchema =
|
|
1482
|
+
var import_zod16 = require("zod");
|
|
1483
|
+
var WindowSchema = import_zod16.z.enum(["1h", "24h", "7d"]).optional().describe("Time window \u2014 default 24h");
|
|
1484
|
+
var BucketSchema = import_zod16.z.enum(["1m", "5m", "1h", "1d"]).optional().describe("Bucket granularity \u2014 default 1h");
|
|
1405
1485
|
function createStatsClient(proj) {
|
|
1406
1486
|
return {
|
|
1407
1487
|
entitiesByState: withSchema(
|
|
1408
|
-
|
|
1409
|
-
orgId:
|
|
1410
|
-
projectId:
|
|
1488
|
+
import_zod16.z.object({
|
|
1489
|
+
orgId: import_zod16.z.string().describe("Organization slug"),
|
|
1490
|
+
projectId: import_zod16.z.string().describe("Project ID"),
|
|
1411
1491
|
window: WindowSchema,
|
|
1412
1492
|
bucket: BucketSchema
|
|
1413
1493
|
}),
|
|
@@ -1417,9 +1497,9 @@ function createStatsClient(proj) {
|
|
|
1417
1497
|
}
|
|
1418
1498
|
),
|
|
1419
1499
|
runsByType: withSchema(
|
|
1420
|
-
|
|
1421
|
-
orgId:
|
|
1422
|
-
projectId:
|
|
1500
|
+
import_zod16.z.object({
|
|
1501
|
+
orgId: import_zod16.z.string().describe("Organization slug"),
|
|
1502
|
+
projectId: import_zod16.z.string().describe("Project ID"),
|
|
1423
1503
|
window: WindowSchema
|
|
1424
1504
|
}),
|
|
1425
1505
|
(params) => {
|
|
@@ -1428,9 +1508,9 @@ function createStatsClient(proj) {
|
|
|
1428
1508
|
}
|
|
1429
1509
|
),
|
|
1430
1510
|
failingKinds: withSchema(
|
|
1431
|
-
|
|
1432
|
-
orgId:
|
|
1433
|
-
projectId:
|
|
1511
|
+
import_zod16.z.object({
|
|
1512
|
+
orgId: import_zod16.z.string().describe("Organization slug"),
|
|
1513
|
+
projectId: import_zod16.z.string().describe("Project ID"),
|
|
1434
1514
|
window: WindowSchema
|
|
1435
1515
|
}),
|
|
1436
1516
|
(params) => {
|
|
@@ -1439,10 +1519,10 @@ function createStatsClient(proj) {
|
|
|
1439
1519
|
}
|
|
1440
1520
|
),
|
|
1441
1521
|
driftDensity: withSchema(
|
|
1442
|
-
|
|
1443
|
-
orgId:
|
|
1444
|
-
projectId:
|
|
1445
|
-
dim:
|
|
1522
|
+
import_zod16.z.object({
|
|
1523
|
+
orgId: import_zod16.z.string().describe("Organization slug"),
|
|
1524
|
+
projectId: import_zod16.z.string().describe("Project ID"),
|
|
1525
|
+
dim: import_zod16.z.string().optional().describe('Dimensions to bucket \u2014 e.g. "kind,cell"')
|
|
1446
1526
|
}),
|
|
1447
1527
|
(params) => {
|
|
1448
1528
|
const { orgId, projectId, ...query } = params;
|
|
@@ -1453,32 +1533,32 @@ function createStatsClient(proj) {
|
|
|
1453
1533
|
}
|
|
1454
1534
|
|
|
1455
1535
|
// src/graph-views.ts
|
|
1456
|
-
var
|
|
1457
|
-
var ViewConfigSchema =
|
|
1458
|
-
var PinnedPositionsSchema =
|
|
1536
|
+
var import_zod17 = require("zod");
|
|
1537
|
+
var ViewConfigSchema = import_zod17.z.unknown();
|
|
1538
|
+
var PinnedPositionsSchema = import_zod17.z.record(import_zod17.z.string(), import_zod17.z.object({ x: import_zod17.z.number(), y: import_zod17.z.number() })).nullable();
|
|
1459
1539
|
function createGraphViewsClient(proj) {
|
|
1460
1540
|
return {
|
|
1461
1541
|
list: withSchema(
|
|
1462
|
-
|
|
1463
|
-
orgId:
|
|
1464
|
-
projectId:
|
|
1542
|
+
import_zod17.z.object({
|
|
1543
|
+
orgId: import_zod17.z.string().describe("Organization slug"),
|
|
1544
|
+
projectId: import_zod17.z.string().describe("Project ID")
|
|
1465
1545
|
}),
|
|
1466
1546
|
(params) => call(proj(params.orgId, params.projectId)["graph-views"].$get())
|
|
1467
1547
|
),
|
|
1468
1548
|
get: withSchema(
|
|
1469
|
-
|
|
1470
|
-
orgId:
|
|
1471
|
-
projectId:
|
|
1472
|
-
id:
|
|
1549
|
+
import_zod17.z.object({
|
|
1550
|
+
orgId: import_zod17.z.string().describe("Organization slug"),
|
|
1551
|
+
projectId: import_zod17.z.string().describe("Project ID"),
|
|
1552
|
+
id: import_zod17.z.string().describe("View id")
|
|
1473
1553
|
}),
|
|
1474
1554
|
(params) => call(proj(params.orgId, params.projectId)["graph-views"][":id"].$get({ param: { id: params.id } }))
|
|
1475
1555
|
),
|
|
1476
1556
|
create: withSchema(
|
|
1477
|
-
|
|
1478
|
-
orgId:
|
|
1479
|
-
projectId:
|
|
1480
|
-
name:
|
|
1481
|
-
scope:
|
|
1557
|
+
import_zod17.z.object({
|
|
1558
|
+
orgId: import_zod17.z.string().describe("Organization slug"),
|
|
1559
|
+
projectId: import_zod17.z.string().describe("Project ID"),
|
|
1560
|
+
name: import_zod17.z.string().describe("View name"),
|
|
1561
|
+
scope: import_zod17.z.enum(["user", "project"]).describe("Personal or project scope"),
|
|
1482
1562
|
config: ViewConfigSchema.describe("ViewConfig JSON"),
|
|
1483
1563
|
pinnedPositions: PinnedPositionsSchema.optional().describe("Pinned node positions")
|
|
1484
1564
|
}),
|
|
@@ -1488,11 +1568,11 @@ function createGraphViewsClient(proj) {
|
|
|
1488
1568
|
}
|
|
1489
1569
|
),
|
|
1490
1570
|
update: withSchema(
|
|
1491
|
-
|
|
1492
|
-
orgId:
|
|
1493
|
-
projectId:
|
|
1494
|
-
id:
|
|
1495
|
-
name:
|
|
1571
|
+
import_zod17.z.object({
|
|
1572
|
+
orgId: import_zod17.z.string().describe("Organization slug"),
|
|
1573
|
+
projectId: import_zod17.z.string().describe("Project ID"),
|
|
1574
|
+
id: import_zod17.z.string().describe("View id"),
|
|
1575
|
+
name: import_zod17.z.string().optional().describe("New name"),
|
|
1496
1576
|
config: ViewConfigSchema.optional().describe("Replacement ViewConfig JSON"),
|
|
1497
1577
|
pinnedPositions: PinnedPositionsSchema.optional().describe("Replacement pinned positions")
|
|
1498
1578
|
}),
|
|
@@ -1504,18 +1584,18 @@ function createGraphViewsClient(proj) {
|
|
|
1504
1584
|
}
|
|
1505
1585
|
),
|
|
1506
1586
|
delete: withSchema(
|
|
1507
|
-
|
|
1508
|
-
orgId:
|
|
1509
|
-
projectId:
|
|
1510
|
-
id:
|
|
1587
|
+
import_zod17.z.object({
|
|
1588
|
+
orgId: import_zod17.z.string().describe("Organization slug"),
|
|
1589
|
+
projectId: import_zod17.z.string().describe("Project ID"),
|
|
1590
|
+
id: import_zod17.z.string().describe("View id")
|
|
1511
1591
|
}),
|
|
1512
1592
|
(params) => call(proj(params.orgId, params.projectId)["graph-views"][":id"].$delete({ param: { id: params.id } }))
|
|
1513
1593
|
),
|
|
1514
1594
|
setDefault: withSchema(
|
|
1515
|
-
|
|
1516
|
-
orgId:
|
|
1517
|
-
projectId:
|
|
1518
|
-
id:
|
|
1595
|
+
import_zod17.z.object({
|
|
1596
|
+
orgId: import_zod17.z.string().describe("Organization slug"),
|
|
1597
|
+
projectId: import_zod17.z.string().describe("Project ID"),
|
|
1598
|
+
id: import_zod17.z.string().describe("View id")
|
|
1519
1599
|
}),
|
|
1520
1600
|
(params) => call(
|
|
1521
1601
|
proj(params.orgId, params.projectId)["graph-views"][":id"]["default"].$patch({
|
|
@@ -1527,15 +1607,15 @@ function createGraphViewsClient(proj) {
|
|
|
1527
1607
|
}
|
|
1528
1608
|
|
|
1529
1609
|
// src/notifications.ts
|
|
1530
|
-
var
|
|
1610
|
+
var import_zod18 = require("zod");
|
|
1531
1611
|
var import_client2 = require("hono/client");
|
|
1532
1612
|
function createNotificationsClient(baseUrl, hcOpts) {
|
|
1533
1613
|
const c = (0, import_client2.hc)(`${baseUrl}/notifications`, hcOpts);
|
|
1534
1614
|
return {
|
|
1535
1615
|
list: withSchema(
|
|
1536
|
-
|
|
1537
|
-
limit:
|
|
1538
|
-
unread:
|
|
1616
|
+
import_zod18.z.object({
|
|
1617
|
+
limit: import_zod18.z.coerce.number().int().min(1).max(100).optional(),
|
|
1618
|
+
unread: import_zod18.z.boolean().optional()
|
|
1539
1619
|
}),
|
|
1540
1620
|
(params) => {
|
|
1541
1621
|
const query = {};
|
|
@@ -1545,18 +1625,18 @@ function createNotificationsClient(baseUrl, hcOpts) {
|
|
|
1545
1625
|
}
|
|
1546
1626
|
),
|
|
1547
1627
|
read: withSchema(
|
|
1548
|
-
|
|
1628
|
+
import_zod18.z.object({ id: import_zod18.z.string().uuid() }),
|
|
1549
1629
|
(params) => call(c[":id"].read.$post({ param: { id: params.id } }))
|
|
1550
1630
|
),
|
|
1551
1631
|
readAll: withSchema(
|
|
1552
|
-
|
|
1632
|
+
import_zod18.z.object({}),
|
|
1553
1633
|
() => call(c["read-all"].$post())
|
|
1554
1634
|
)
|
|
1555
1635
|
};
|
|
1556
1636
|
}
|
|
1557
1637
|
|
|
1558
1638
|
// src/audit-export.ts
|
|
1559
|
-
var
|
|
1639
|
+
var import_zod19 = require("zod");
|
|
1560
1640
|
async function rawRequest(baseUrl, hcOpts, path, init = {}) {
|
|
1561
1641
|
const fetchImpl = hcOpts?.fetch ?? fetch;
|
|
1562
1642
|
const rawHeaders = hcOpts?.headers;
|
|
@@ -1585,19 +1665,19 @@ function createAuditExportClient(baseUrl, hcOpts) {
|
|
|
1585
1665
|
return {
|
|
1586
1666
|
/** GET /orgs/:orgId/audit-export/config — returns current config or throws 404. */
|
|
1587
1667
|
getConfig: withSchema(
|
|
1588
|
-
|
|
1668
|
+
import_zod19.z.object({ orgId: import_zod19.z.string().describe("Organization ID") }),
|
|
1589
1669
|
async (params) => callRaw(
|
|
1590
1670
|
await rawRequest(baseUrl, hcOpts, `/orgs/${params.orgId}/audit-export/config`)
|
|
1591
1671
|
)
|
|
1592
1672
|
),
|
|
1593
1673
|
/** POST /orgs/:orgId/audit-export/config — upsert the S3 export config. */
|
|
1594
1674
|
setConfig: withSchema(
|
|
1595
|
-
|
|
1596
|
-
orgId:
|
|
1597
|
-
bucket:
|
|
1598
|
-
region:
|
|
1599
|
-
roleArn:
|
|
1600
|
-
enabled:
|
|
1675
|
+
import_zod19.z.object({
|
|
1676
|
+
orgId: import_zod19.z.string().describe("Organization ID"),
|
|
1677
|
+
bucket: import_zod19.z.string().describe("S3 bucket name"),
|
|
1678
|
+
region: import_zod19.z.string().describe("AWS region"),
|
|
1679
|
+
roleArn: import_zod19.z.string().describe("IAM role ARN for assume-role"),
|
|
1680
|
+
enabled: import_zod19.z.boolean().optional().describe("Enable/disable export")
|
|
1601
1681
|
}),
|
|
1602
1682
|
async (params) => {
|
|
1603
1683
|
const { orgId, ...body } = params;
|
|
@@ -1612,11 +1692,11 @@ function createAuditExportClient(baseUrl, hcOpts) {
|
|
|
1612
1692
|
),
|
|
1613
1693
|
/** POST /orgs/:orgId/audit-export/test-connection — dry-run write+delete. */
|
|
1614
1694
|
testConnection: withSchema(
|
|
1615
|
-
|
|
1616
|
-
orgId:
|
|
1617
|
-
bucket:
|
|
1618
|
-
region:
|
|
1619
|
-
roleArn:
|
|
1695
|
+
import_zod19.z.object({
|
|
1696
|
+
orgId: import_zod19.z.string().describe("Organization ID"),
|
|
1697
|
+
bucket: import_zod19.z.string().describe("S3 bucket name"),
|
|
1698
|
+
region: import_zod19.z.string().describe("AWS region"),
|
|
1699
|
+
roleArn: import_zod19.z.string().describe("IAM role ARN for assume-role")
|
|
1620
1700
|
}),
|
|
1621
1701
|
async (params) => {
|
|
1622
1702
|
const { orgId, ...body } = params;
|
|
@@ -1631,9 +1711,9 @@ function createAuditExportClient(baseUrl, hcOpts) {
|
|
|
1631
1711
|
),
|
|
1632
1712
|
/** GET /orgs/:orgId/audit-export/runs — recent batch run history. */
|
|
1633
1713
|
listRuns: withSchema(
|
|
1634
|
-
|
|
1635
|
-
orgId:
|
|
1636
|
-
limit:
|
|
1714
|
+
import_zod19.z.object({
|
|
1715
|
+
orgId: import_zod19.z.string().describe("Organization ID"),
|
|
1716
|
+
limit: import_zod19.z.number().optional().describe("Max results (default 20, max 100)")
|
|
1637
1717
|
}),
|
|
1638
1718
|
async (params) => {
|
|
1639
1719
|
const qs = params.limit ? `?limit=${params.limit}` : "";
|
|
@@ -1669,33 +1749,33 @@ function createUserPreferencesClient(baseUrl, hcOpts) {
|
|
|
1669
1749
|
}
|
|
1670
1750
|
|
|
1671
1751
|
// src/import-sources.ts
|
|
1672
|
-
var
|
|
1673
|
-
var SourceKindEnum =
|
|
1674
|
-
var PolicyEnum =
|
|
1752
|
+
var import_zod20 = require("zod");
|
|
1753
|
+
var SourceKindEnum = import_zod20.z.enum(["tf-state", "atmos-manifests"]);
|
|
1754
|
+
var PolicyEnum = import_zod20.z.enum(["auto-update", "human-approval"]);
|
|
1675
1755
|
function createImportSourcesClient(proj) {
|
|
1676
1756
|
return {
|
|
1677
1757
|
list: withSchema(
|
|
1678
|
-
|
|
1679
|
-
orgId:
|
|
1680
|
-
projectId:
|
|
1758
|
+
import_zod20.z.object({
|
|
1759
|
+
orgId: import_zod20.z.string().describe("Organization slug"),
|
|
1760
|
+
projectId: import_zod20.z.string().describe("Project ID")
|
|
1681
1761
|
}),
|
|
1682
1762
|
(params) => call(proj(params.orgId, params.projectId)["import-sources"].$get())
|
|
1683
1763
|
),
|
|
1684
1764
|
get: withSchema(
|
|
1685
|
-
|
|
1686
|
-
orgId:
|
|
1687
|
-
projectId:
|
|
1688
|
-
id:
|
|
1765
|
+
import_zod20.z.object({
|
|
1766
|
+
orgId: import_zod20.z.string().describe("Organization slug"),
|
|
1767
|
+
projectId: import_zod20.z.string().describe("Project ID"),
|
|
1768
|
+
id: import_zod20.z.string().uuid().describe("ImportSource ID")
|
|
1689
1769
|
}),
|
|
1690
1770
|
(params) => call(proj(params.orgId, params.projectId)["import-sources"][":id"].$get({ param: { id: params.id } }))
|
|
1691
1771
|
),
|
|
1692
1772
|
registerOrUpdate: withSchema(
|
|
1693
|
-
|
|
1694
|
-
orgId:
|
|
1695
|
-
projectId:
|
|
1696
|
-
envName:
|
|
1773
|
+
import_zod20.z.object({
|
|
1774
|
+
orgId: import_zod20.z.string().describe("Organization slug"),
|
|
1775
|
+
projectId: import_zod20.z.string().describe("Project ID"),
|
|
1776
|
+
envName: import_zod20.z.string().describe("Env name the source belongs to"),
|
|
1697
1777
|
sourceKind: SourceKindEnum,
|
|
1698
|
-
sourceUri:
|
|
1778
|
+
sourceUri: import_zod20.z.string().describe("Stable URI identifying the source"),
|
|
1699
1779
|
reconciliationPolicy: PolicyEnum.optional()
|
|
1700
1780
|
}),
|
|
1701
1781
|
(params) => {
|
|
@@ -1704,13 +1784,13 @@ function createImportSourcesClient(proj) {
|
|
|
1704
1784
|
}
|
|
1705
1785
|
),
|
|
1706
1786
|
rescan: withSchema(
|
|
1707
|
-
|
|
1708
|
-
orgId:
|
|
1709
|
-
projectId:
|
|
1710
|
-
id:
|
|
1711
|
-
envName:
|
|
1712
|
-
items:
|
|
1713
|
-
deletions:
|
|
1787
|
+
import_zod20.z.object({
|
|
1788
|
+
orgId: import_zod20.z.string().describe("Organization slug"),
|
|
1789
|
+
projectId: import_zod20.z.string().describe("Project ID"),
|
|
1790
|
+
id: import_zod20.z.string().uuid(),
|
|
1791
|
+
envName: import_zod20.z.string(),
|
|
1792
|
+
items: import_zod20.z.array(import_zod20.z.unknown()),
|
|
1793
|
+
deletions: import_zod20.z.array(import_zod20.z.object({ kind: import_zod20.z.string(), name: import_zod20.z.string() })).optional()
|
|
1714
1794
|
}),
|
|
1715
1795
|
(params) => {
|
|
1716
1796
|
const { orgId, projectId, id, ...body } = params;
|
|
@@ -1726,19 +1806,19 @@ function createImportSourcesClient(proj) {
|
|
|
1726
1806
|
}
|
|
1727
1807
|
),
|
|
1728
1808
|
drift: withSchema(
|
|
1729
|
-
|
|
1730
|
-
orgId:
|
|
1731
|
-
projectId:
|
|
1732
|
-
id:
|
|
1809
|
+
import_zod20.z.object({
|
|
1810
|
+
orgId: import_zod20.z.string().describe("Organization slug"),
|
|
1811
|
+
projectId: import_zod20.z.string().describe("Project ID"),
|
|
1812
|
+
id: import_zod20.z.string().uuid()
|
|
1733
1813
|
}),
|
|
1734
1814
|
(params) => call(proj(params.orgId, params.projectId)["import-sources"][":id"].drift.$get({ param: { id: params.id } }))
|
|
1735
1815
|
),
|
|
1736
1816
|
approveProposal: withSchema(
|
|
1737
|
-
|
|
1738
|
-
orgId:
|
|
1739
|
-
projectId:
|
|
1740
|
-
id:
|
|
1741
|
-
proposalId:
|
|
1817
|
+
import_zod20.z.object({
|
|
1818
|
+
orgId: import_zod20.z.string().describe("Organization slug"),
|
|
1819
|
+
projectId: import_zod20.z.string().describe("Project ID"),
|
|
1820
|
+
id: import_zod20.z.string().uuid(),
|
|
1821
|
+
proposalId: import_zod20.z.string().uuid()
|
|
1742
1822
|
}),
|
|
1743
1823
|
(params) => call(
|
|
1744
1824
|
proj(params.orgId, params.projectId)["import-sources"][":id"]["drift-proposals"][":proposalId"].approve.$post({
|
|
@@ -1747,11 +1827,11 @@ function createImportSourcesClient(proj) {
|
|
|
1747
1827
|
)
|
|
1748
1828
|
),
|
|
1749
1829
|
rejectProposal: withSchema(
|
|
1750
|
-
|
|
1751
|
-
orgId:
|
|
1752
|
-
projectId:
|
|
1753
|
-
id:
|
|
1754
|
-
proposalId:
|
|
1830
|
+
import_zod20.z.object({
|
|
1831
|
+
orgId: import_zod20.z.string().describe("Organization slug"),
|
|
1832
|
+
projectId: import_zod20.z.string().describe("Project ID"),
|
|
1833
|
+
id: import_zod20.z.string().uuid(),
|
|
1834
|
+
proposalId: import_zod20.z.string().uuid()
|
|
1755
1835
|
}),
|
|
1756
1836
|
(params) => call(
|
|
1757
1837
|
proj(params.orgId, params.projectId)["import-sources"][":id"]["drift-proposals"][":proposalId"].reject.$post({
|
|
@@ -1763,7 +1843,7 @@ function createImportSourcesClient(proj) {
|
|
|
1763
1843
|
}
|
|
1764
1844
|
|
|
1765
1845
|
// src/admin.ts
|
|
1766
|
-
var
|
|
1846
|
+
var import_zod21 = require("zod");
|
|
1767
1847
|
async function rawRequest2(baseUrl, hcOpts, path, init = {}) {
|
|
1768
1848
|
const fetchImpl = hcOpts?.fetch ?? fetch;
|
|
1769
1849
|
const rawHeaders = hcOpts?.headers;
|
|
@@ -1796,14 +1876,14 @@ function createAdminClient(baseUrl, hcOpts) {
|
|
|
1796
1876
|
* List super-admin audit events with optional filters.
|
|
1797
1877
|
*/
|
|
1798
1878
|
list: withSchema(
|
|
1799
|
-
|
|
1800
|
-
actor:
|
|
1801
|
-
action:
|
|
1802
|
-
resourceKind:
|
|
1803
|
-
since:
|
|
1804
|
-
until:
|
|
1805
|
-
limit:
|
|
1806
|
-
offset:
|
|
1879
|
+
import_zod21.z.object({
|
|
1880
|
+
actor: import_zod21.z.string().optional().describe("Filter by actor user ID"),
|
|
1881
|
+
action: import_zod21.z.string().optional().describe("Filter by action name"),
|
|
1882
|
+
resourceKind: import_zod21.z.string().optional().describe("Filter by resource kind"),
|
|
1883
|
+
since: import_zod21.z.string().optional().describe("ISO 8601 datetime lower bound"),
|
|
1884
|
+
until: import_zod21.z.string().optional().describe("ISO 8601 datetime upper bound"),
|
|
1885
|
+
limit: import_zod21.z.coerce.number().int().min(1).max(200).optional().describe("Max results (1-200)"),
|
|
1886
|
+
offset: import_zod21.z.coerce.number().int().min(0).optional().describe("Pagination offset")
|
|
1807
1887
|
}),
|
|
1808
1888
|
async (params) => {
|
|
1809
1889
|
const qs = new URLSearchParams();
|
|
@@ -1827,7 +1907,7 @@ function createAdminClient(baseUrl, hcOpts) {
|
|
|
1827
1907
|
* List all organizations across tenants with member + project counts.
|
|
1828
1908
|
*/
|
|
1829
1909
|
list: withSchema(
|
|
1830
|
-
|
|
1910
|
+
import_zod21.z.object({}),
|
|
1831
1911
|
async () => callRaw2(
|
|
1832
1912
|
await rawRequest2(baseUrl, hcOpts, "/admin/orgs")
|
|
1833
1913
|
)
|
|
@@ -1837,7 +1917,7 @@ function createAdminClient(baseUrl, hcOpts) {
|
|
|
1837
1917
|
* Detail view: org fields + member list + project list.
|
|
1838
1918
|
*/
|
|
1839
1919
|
get: withSchema(
|
|
1840
|
-
|
|
1920
|
+
import_zod21.z.object({ id: import_zod21.z.string().describe("Organization ID") }),
|
|
1841
1921
|
async (params) => callRaw2(
|
|
1842
1922
|
await rawRequest2(baseUrl, hcOpts, `/admin/orgs/${params.id}`)
|
|
1843
1923
|
)
|
|
@@ -1847,7 +1927,7 @@ function createAdminClient(baseUrl, hcOpts) {
|
|
|
1847
1927
|
* Set suspended_at = now(). Idempotent.
|
|
1848
1928
|
*/
|
|
1849
1929
|
suspend: withSchema(
|
|
1850
|
-
|
|
1930
|
+
import_zod21.z.object({ id: import_zod21.z.string().describe("Organization ID") }),
|
|
1851
1931
|
async (params) => callRaw2(
|
|
1852
1932
|
await rawRequest2(baseUrl, hcOpts, `/admin/orgs/${params.id}/suspend`, {
|
|
1853
1933
|
method: "POST"
|
|
@@ -1859,7 +1939,7 @@ function createAdminClient(baseUrl, hcOpts) {
|
|
|
1859
1939
|
* Clear suspended_at.
|
|
1860
1940
|
*/
|
|
1861
1941
|
unsuspend: withSchema(
|
|
1862
|
-
|
|
1942
|
+
import_zod21.z.object({ id: import_zod21.z.string().describe("Organization ID") }),
|
|
1863
1943
|
async (params) => callRaw2(
|
|
1864
1944
|
await rawRequest2(baseUrl, hcOpts, `/admin/orgs/${params.id}/unsuspend`, {
|
|
1865
1945
|
method: "POST"
|
|
@@ -1875,7 +1955,7 @@ function createAdminClient(baseUrl, hcOpts) {
|
|
|
1875
1955
|
* api tokens, and environments. Idempotent. Super-admin only.
|
|
1876
1956
|
*/
|
|
1877
1957
|
nuke: withSchema(
|
|
1878
|
-
|
|
1958
|
+
import_zod21.z.object({ projectId: import_zod21.z.string().describe("Project ID to nuke") }),
|
|
1879
1959
|
async (params) => callRaw2(
|
|
1880
1960
|
await rawRequest2(
|
|
1881
1961
|
baseUrl,
|
|
@@ -1893,7 +1973,7 @@ function createAdminClient(baseUrl, hcOpts) {
|
|
|
1893
1973
|
* all derived from single-table COUNT queries.
|
|
1894
1974
|
*/
|
|
1895
1975
|
overview: withSchema(
|
|
1896
|
-
|
|
1976
|
+
import_zod21.z.object({}),
|
|
1897
1977
|
async () => callRaw2(
|
|
1898
1978
|
await rawRequest2(baseUrl, hcOpts, "/admin/metrics/overview")
|
|
1899
1979
|
)
|
|
@@ -1908,7 +1988,7 @@ function createAdminClient(baseUrl, hcOpts) {
|
|
|
1908
1988
|
* Requires super-admin.
|
|
1909
1989
|
*/
|
|
1910
1990
|
list: withSchema(
|
|
1911
|
-
|
|
1991
|
+
import_zod21.z.object({}),
|
|
1912
1992
|
async () => callRaw2(
|
|
1913
1993
|
await rawRequest2(
|
|
1914
1994
|
baseUrl,
|
|
@@ -1938,8 +2018,10 @@ var createClient = (baseUrl, options = {}) => {
|
|
|
1938
2018
|
orgs: createOrgsClient(cloud, baseUrl, hcOpts),
|
|
1939
2019
|
projects: createProjectsClient(cloud, baseUrl, hcOpts),
|
|
1940
2020
|
github: createGithubClient(cloud, baseUrl, hcOpts),
|
|
2021
|
+
blueprints: createBlueprintsClient(cloud),
|
|
1941
2022
|
environments: createEnvironmentsClient(proj),
|
|
1942
2023
|
entityTypes: createEntityTypesClient(proj),
|
|
2024
|
+
deploymentTargets: createDeploymentTargetsClient(proj),
|
|
1943
2025
|
entities: createEntitiesClient(projEnv),
|
|
1944
2026
|
cells,
|
|
1945
2027
|
relationshipTypes: createRelationshipTypesClient(proj),
|