@sealant/api-contracts-next 0.40.0-next.868 → 0.40.0-next.870
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/core-api/control-plane.d.ts +804 -712
- package/dist/core-api/workspaces.d.ts +354 -2
- package/dist/core-api/workspaces.js +84 -0
- package/package.json +2 -2
|
@@ -918,6 +918,251 @@ export declare const inspectWorkspaceImageResponseSchema: Schema.Struct<{
|
|
|
918
918
|
}>;
|
|
919
919
|
}>;
|
|
920
920
|
export type InspectWorkspaceImageResponse = typeof inspectWorkspaceImageResponseSchema.Type;
|
|
921
|
+
/** What a runtime does not do, with the sentence a person choosing an environment reads. */
|
|
922
|
+
export declare const runtimeUnsupportedSchema: Schema.Struct<{
|
|
923
|
+
readonly supported: Schema.Literal<false>;
|
|
924
|
+
readonly message: Schema.String;
|
|
925
|
+
}>;
|
|
926
|
+
export type RuntimeUnsupported = typeof runtimeUnsupportedSchema.Type;
|
|
927
|
+
/** Whether a runtime does one thing. A create that asks for an unsupported one is refused. */
|
|
928
|
+
export declare const runtimeCapabilitySchema: Schema.Union<readonly [Schema.Struct<{
|
|
929
|
+
readonly supported: Schema.Literal<true>;
|
|
930
|
+
}>, Schema.Struct<{
|
|
931
|
+
readonly supported: Schema.Literal<false>;
|
|
932
|
+
readonly message: Schema.String;
|
|
933
|
+
}>]>;
|
|
934
|
+
export type RuntimeCapability = typeof runtimeCapabilitySchema.Type;
|
|
935
|
+
/** The CPU architectures a runtime's workspaces run on. */
|
|
936
|
+
export declare const runtimeArchitectures: readonly ["x86_64", "aarch64"];
|
|
937
|
+
export declare const runtimeArchitectureSchema: Schema.Literals<readonly ["x86_64", "aarch64"]>;
|
|
938
|
+
export type RuntimeArchitecture = typeof runtimeArchitectureSchema.Type;
|
|
939
|
+
/** The managed OS families a workspace image is built from. */
|
|
940
|
+
export declare const runtimeOsFamilies: readonly ["ubuntu", "nix", "arch", "fedora"];
|
|
941
|
+
export type RuntimeOsFamily = (typeof runtimeOsFamilies)[number];
|
|
942
|
+
/**
|
|
943
|
+
* What one runtime supports, from the same rules a create is refused by: a create that asks a
|
|
944
|
+
* runtime for an item it marks unsupported is refused with that item's `message`.
|
|
945
|
+
*/
|
|
946
|
+
export declare const runtimeSupportSchema: Schema.Struct<{
|
|
947
|
+
readonly runtime: Schema.Literals<readonly ["docker", "k8s", "k3s", "cloudflare", "microvm", "boat"]>;
|
|
948
|
+
/** The managed OS families that run on this runtime (`target.os.family`). */
|
|
949
|
+
readonly os: Schema.Struct<{
|
|
950
|
+
readonly ubuntu: Schema.Union<readonly [Schema.Struct<{
|
|
951
|
+
readonly supported: Schema.Literal<true>;
|
|
952
|
+
}>, Schema.Struct<{
|
|
953
|
+
readonly supported: Schema.Literal<false>;
|
|
954
|
+
readonly message: Schema.String;
|
|
955
|
+
}>]>;
|
|
956
|
+
readonly nix: Schema.Union<readonly [Schema.Struct<{
|
|
957
|
+
readonly supported: Schema.Literal<true>;
|
|
958
|
+
}>, Schema.Struct<{
|
|
959
|
+
readonly supported: Schema.Literal<false>;
|
|
960
|
+
readonly message: Schema.String;
|
|
961
|
+
}>]>;
|
|
962
|
+
readonly arch: Schema.Union<readonly [Schema.Struct<{
|
|
963
|
+
readonly supported: Schema.Literal<true>;
|
|
964
|
+
}>, Schema.Struct<{
|
|
965
|
+
readonly supported: Schema.Literal<false>;
|
|
966
|
+
readonly message: Schema.String;
|
|
967
|
+
}>]>;
|
|
968
|
+
readonly fedora: Schema.Union<readonly [Schema.Struct<{
|
|
969
|
+
readonly supported: Schema.Literal<true>;
|
|
970
|
+
}>, Schema.Struct<{
|
|
971
|
+
readonly supported: Schema.Literal<false>;
|
|
972
|
+
readonly message: Schema.String;
|
|
973
|
+
}>]>;
|
|
974
|
+
}>;
|
|
975
|
+
/** A workspace built from a base image of its own (`target.os.family: "custom"`). */
|
|
976
|
+
readonly customImage: Schema.Union<readonly [Schema.Struct<{
|
|
977
|
+
readonly supported: Schema.Literal<true>;
|
|
978
|
+
}>, Schema.Struct<{
|
|
979
|
+
readonly supported: Schema.Literal<false>;
|
|
980
|
+
readonly message: Schema.String;
|
|
981
|
+
}>]>;
|
|
982
|
+
/** Directories of the deployment's own servers bound into the workspace (mount sources). */
|
|
983
|
+
readonly hostDirectories: Schema.Union<readonly [Schema.Struct<{
|
|
984
|
+
readonly supported: Schema.Literal<true>;
|
|
985
|
+
}>, Schema.Struct<{
|
|
986
|
+
readonly supported: Schema.Literal<false>;
|
|
987
|
+
readonly message: Schema.String;
|
|
988
|
+
}>]>;
|
|
989
|
+
/** Docker inside the workspace (`tooling.services.docker`). */
|
|
990
|
+
readonly docker: Schema.Union<readonly [Schema.Struct<{
|
|
991
|
+
readonly supported: Schema.Literal<true>;
|
|
992
|
+
}>, Schema.Struct<{
|
|
993
|
+
readonly supported: Schema.Literal<false>;
|
|
994
|
+
readonly message: Schema.String;
|
|
995
|
+
}>]>;
|
|
996
|
+
/** The workspace run under gVisor (`runtime.ociRuntime: "runsc"`). */
|
|
997
|
+
readonly gvisor: Schema.Union<readonly [Schema.Struct<{
|
|
998
|
+
readonly supported: Schema.Literal<true>;
|
|
999
|
+
}>, Schema.Struct<{
|
|
1000
|
+
readonly supported: Schema.Literal<false>;
|
|
1001
|
+
readonly message: Schema.String;
|
|
1002
|
+
}>]>;
|
|
1003
|
+
/** Kubernetes Secrets, ConfigMaps and a service account (`runtime.envFrom`, `kubernetes`). */
|
|
1004
|
+
readonly clusterEnv: Schema.Union<readonly [Schema.Struct<{
|
|
1005
|
+
readonly supported: Schema.Literal<true>;
|
|
1006
|
+
}>, Schema.Struct<{
|
|
1007
|
+
readonly supported: Schema.Literal<false>;
|
|
1008
|
+
readonly message: Schema.String;
|
|
1009
|
+
}>]>;
|
|
1010
|
+
/** A workspace started by cloning a repository (a `git` source), not from a capture. */
|
|
1011
|
+
readonly gitSource: Schema.Union<readonly [Schema.Struct<{
|
|
1012
|
+
readonly supported: Schema.Literal<true>;
|
|
1013
|
+
}>, Schema.Struct<{
|
|
1014
|
+
readonly supported: Schema.Literal<false>;
|
|
1015
|
+
readonly message: Schema.String;
|
|
1016
|
+
}>]>;
|
|
1017
|
+
/** Dotfiles sent with the create as archives (`runtime.dotfilesArchives`). */
|
|
1018
|
+
readonly dotfilesArchives: Schema.Union<readonly [Schema.Struct<{
|
|
1019
|
+
readonly supported: Schema.Literal<true>;
|
|
1020
|
+
}>, Schema.Struct<{
|
|
1021
|
+
readonly supported: Schema.Literal<false>;
|
|
1022
|
+
readonly message: Schema.String;
|
|
1023
|
+
}>]>;
|
|
1024
|
+
/** A screen (an X display) inside the workspace, and the CPU architectures it runs on. */
|
|
1025
|
+
readonly screen: Schema.Union<readonly [Schema.Struct<{
|
|
1026
|
+
readonly supported: Schema.Literal<true>;
|
|
1027
|
+
readonly architectures: Schema.$Array<Schema.Literals<readonly ["x86_64", "aarch64"]>>;
|
|
1028
|
+
}>, Schema.Struct<{
|
|
1029
|
+
readonly supported: Schema.Literal<false>;
|
|
1030
|
+
readonly message: Schema.String;
|
|
1031
|
+
}>]>;
|
|
1032
|
+
/** Ports inside the workspace the runtime holds for itself: nothing else can listen on them. */
|
|
1033
|
+
readonly reservedPorts: Schema.$Array<Schema.Number>;
|
|
1034
|
+
/**
|
|
1035
|
+
* A project's resources linked to the workspace: `live` reaches a running workspace when it is
|
|
1036
|
+
* linked, `next-start` only once the workspace starts again.
|
|
1037
|
+
*/
|
|
1038
|
+
readonly resources: Schema.Union<readonly [Schema.Struct<{
|
|
1039
|
+
readonly supported: Schema.Literal<true>;
|
|
1040
|
+
readonly attach: Schema.Literals<readonly ["live", "next-start"]>;
|
|
1041
|
+
}>, Schema.Struct<{
|
|
1042
|
+
readonly supported: Schema.Literal<false>;
|
|
1043
|
+
readonly message: Schema.String;
|
|
1044
|
+
}>]>;
|
|
1045
|
+
/** Whether a workspace that sits idle costs money, and the sentence that says so. */
|
|
1046
|
+
readonly idleCost: Schema.Struct<{
|
|
1047
|
+
readonly charged: Schema.Boolean;
|
|
1048
|
+
readonly message: Schema.String;
|
|
1049
|
+
}>;
|
|
1050
|
+
}>;
|
|
1051
|
+
export type RuntimeSupport = typeof runtimeSupportSchema.Type;
|
|
1052
|
+
/**
|
|
1053
|
+
* The runtimes this install launches workspaces on, and what each supports. `default` is the one
|
|
1054
|
+
* a create that names no runtime (`target.runtime.family: "auto"`) runs on; it is listed first.
|
|
1055
|
+
* A runtime that is not listed is one this install cannot launch.
|
|
1056
|
+
*/
|
|
1057
|
+
export declare const workspaceRuntimesResponseSchema: Schema.Struct<{
|
|
1058
|
+
readonly default: Schema.Literals<readonly ["docker", "k8s", "k3s", "cloudflare", "microvm", "boat"]>;
|
|
1059
|
+
readonly runtimes: Schema.$Array<Schema.Struct<{
|
|
1060
|
+
readonly runtime: Schema.Literals<readonly ["docker", "k8s", "k3s", "cloudflare", "microvm", "boat"]>;
|
|
1061
|
+
/** The managed OS families that run on this runtime (`target.os.family`). */
|
|
1062
|
+
readonly os: Schema.Struct<{
|
|
1063
|
+
readonly ubuntu: Schema.Union<readonly [Schema.Struct<{
|
|
1064
|
+
readonly supported: Schema.Literal<true>;
|
|
1065
|
+
}>, Schema.Struct<{
|
|
1066
|
+
readonly supported: Schema.Literal<false>;
|
|
1067
|
+
readonly message: Schema.String;
|
|
1068
|
+
}>]>;
|
|
1069
|
+
readonly nix: Schema.Union<readonly [Schema.Struct<{
|
|
1070
|
+
readonly supported: Schema.Literal<true>;
|
|
1071
|
+
}>, Schema.Struct<{
|
|
1072
|
+
readonly supported: Schema.Literal<false>;
|
|
1073
|
+
readonly message: Schema.String;
|
|
1074
|
+
}>]>;
|
|
1075
|
+
readonly arch: Schema.Union<readonly [Schema.Struct<{
|
|
1076
|
+
readonly supported: Schema.Literal<true>;
|
|
1077
|
+
}>, Schema.Struct<{
|
|
1078
|
+
readonly supported: Schema.Literal<false>;
|
|
1079
|
+
readonly message: Schema.String;
|
|
1080
|
+
}>]>;
|
|
1081
|
+
readonly fedora: Schema.Union<readonly [Schema.Struct<{
|
|
1082
|
+
readonly supported: Schema.Literal<true>;
|
|
1083
|
+
}>, Schema.Struct<{
|
|
1084
|
+
readonly supported: Schema.Literal<false>;
|
|
1085
|
+
readonly message: Schema.String;
|
|
1086
|
+
}>]>;
|
|
1087
|
+
}>;
|
|
1088
|
+
/** A workspace built from a base image of its own (`target.os.family: "custom"`). */
|
|
1089
|
+
readonly customImage: Schema.Union<readonly [Schema.Struct<{
|
|
1090
|
+
readonly supported: Schema.Literal<true>;
|
|
1091
|
+
}>, Schema.Struct<{
|
|
1092
|
+
readonly supported: Schema.Literal<false>;
|
|
1093
|
+
readonly message: Schema.String;
|
|
1094
|
+
}>]>;
|
|
1095
|
+
/** Directories of the deployment's own servers bound into the workspace (mount sources). */
|
|
1096
|
+
readonly hostDirectories: Schema.Union<readonly [Schema.Struct<{
|
|
1097
|
+
readonly supported: Schema.Literal<true>;
|
|
1098
|
+
}>, Schema.Struct<{
|
|
1099
|
+
readonly supported: Schema.Literal<false>;
|
|
1100
|
+
readonly message: Schema.String;
|
|
1101
|
+
}>]>;
|
|
1102
|
+
/** Docker inside the workspace (`tooling.services.docker`). */
|
|
1103
|
+
readonly docker: Schema.Union<readonly [Schema.Struct<{
|
|
1104
|
+
readonly supported: Schema.Literal<true>;
|
|
1105
|
+
}>, Schema.Struct<{
|
|
1106
|
+
readonly supported: Schema.Literal<false>;
|
|
1107
|
+
readonly message: Schema.String;
|
|
1108
|
+
}>]>;
|
|
1109
|
+
/** The workspace run under gVisor (`runtime.ociRuntime: "runsc"`). */
|
|
1110
|
+
readonly gvisor: Schema.Union<readonly [Schema.Struct<{
|
|
1111
|
+
readonly supported: Schema.Literal<true>;
|
|
1112
|
+
}>, Schema.Struct<{
|
|
1113
|
+
readonly supported: Schema.Literal<false>;
|
|
1114
|
+
readonly message: Schema.String;
|
|
1115
|
+
}>]>;
|
|
1116
|
+
/** Kubernetes Secrets, ConfigMaps and a service account (`runtime.envFrom`, `kubernetes`). */
|
|
1117
|
+
readonly clusterEnv: Schema.Union<readonly [Schema.Struct<{
|
|
1118
|
+
readonly supported: Schema.Literal<true>;
|
|
1119
|
+
}>, Schema.Struct<{
|
|
1120
|
+
readonly supported: Schema.Literal<false>;
|
|
1121
|
+
readonly message: Schema.String;
|
|
1122
|
+
}>]>;
|
|
1123
|
+
/** A workspace started by cloning a repository (a `git` source), not from a capture. */
|
|
1124
|
+
readonly gitSource: Schema.Union<readonly [Schema.Struct<{
|
|
1125
|
+
readonly supported: Schema.Literal<true>;
|
|
1126
|
+
}>, Schema.Struct<{
|
|
1127
|
+
readonly supported: Schema.Literal<false>;
|
|
1128
|
+
readonly message: Schema.String;
|
|
1129
|
+
}>]>;
|
|
1130
|
+
/** Dotfiles sent with the create as archives (`runtime.dotfilesArchives`). */
|
|
1131
|
+
readonly dotfilesArchives: Schema.Union<readonly [Schema.Struct<{
|
|
1132
|
+
readonly supported: Schema.Literal<true>;
|
|
1133
|
+
}>, Schema.Struct<{
|
|
1134
|
+
readonly supported: Schema.Literal<false>;
|
|
1135
|
+
readonly message: Schema.String;
|
|
1136
|
+
}>]>;
|
|
1137
|
+
/** A screen (an X display) inside the workspace, and the CPU architectures it runs on. */
|
|
1138
|
+
readonly screen: Schema.Union<readonly [Schema.Struct<{
|
|
1139
|
+
readonly supported: Schema.Literal<true>;
|
|
1140
|
+
readonly architectures: Schema.$Array<Schema.Literals<readonly ["x86_64", "aarch64"]>>;
|
|
1141
|
+
}>, Schema.Struct<{
|
|
1142
|
+
readonly supported: Schema.Literal<false>;
|
|
1143
|
+
readonly message: Schema.String;
|
|
1144
|
+
}>]>;
|
|
1145
|
+
/** Ports inside the workspace the runtime holds for itself: nothing else can listen on them. */
|
|
1146
|
+
readonly reservedPorts: Schema.$Array<Schema.Number>;
|
|
1147
|
+
/**
|
|
1148
|
+
* A project's resources linked to the workspace: `live` reaches a running workspace when it is
|
|
1149
|
+
* linked, `next-start` only once the workspace starts again.
|
|
1150
|
+
*/
|
|
1151
|
+
readonly resources: Schema.Union<readonly [Schema.Struct<{
|
|
1152
|
+
readonly supported: Schema.Literal<true>;
|
|
1153
|
+
readonly attach: Schema.Literals<readonly ["live", "next-start"]>;
|
|
1154
|
+
}>, Schema.Struct<{
|
|
1155
|
+
readonly supported: Schema.Literal<false>;
|
|
1156
|
+
readonly message: Schema.String;
|
|
1157
|
+
}>]>;
|
|
1158
|
+
/** Whether a workspace that sits idle costs money, and the sentence that says so. */
|
|
1159
|
+
readonly idleCost: Schema.Struct<{
|
|
1160
|
+
readonly charged: Schema.Boolean;
|
|
1161
|
+
readonly message: Schema.String;
|
|
1162
|
+
}>;
|
|
1163
|
+
}>>;
|
|
1164
|
+
}>;
|
|
1165
|
+
export type WorkspaceRuntimesResponse = typeof workspaceRuntimesResponseSchema.Type;
|
|
921
1166
|
/**
|
|
922
1167
|
* Stable codes of a refused connected account, carried with the account's `provider` by the error
|
|
923
1168
|
* that refuses it (a create's or a credentials put's): `connected-account-missing`
|
|
@@ -3504,7 +3749,114 @@ export declare const WorkspacesGroup: HttpApiGroup.HttpApiGroup<"workspaces", Ht
|
|
|
3504
3749
|
readonly message: Schema.optional<Schema.String>;
|
|
3505
3750
|
readonly data: Schema.optional<Schema.Unknown>;
|
|
3506
3751
|
}>>;
|
|
3507
|
-
}>>, Schema.toCodecJson<typeof WorkspaceBadRequestError | typeof WorkspaceNotFoundError | typeof WorkspaceInternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"
|
|
3752
|
+
}>>, Schema.toCodecJson<typeof WorkspaceBadRequestError | typeof WorkspaceNotFoundError | typeof WorkspaceInternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"listWorkspaceRuntimes", "GET", "/runtimes", never, never, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
3753
|
+
readonly default: Schema.Literals<readonly ["docker", "k8s", "k3s", "cloudflare", "microvm", "boat"]>;
|
|
3754
|
+
readonly runtimes: Schema.$Array<Schema.Struct<{
|
|
3755
|
+
readonly runtime: Schema.Literals<readonly ["docker", "k8s", "k3s", "cloudflare", "microvm", "boat"]>;
|
|
3756
|
+
/** The managed OS families that run on this runtime (`target.os.family`). */
|
|
3757
|
+
readonly os: Schema.Struct<{
|
|
3758
|
+
readonly ubuntu: Schema.Union<readonly [Schema.Struct<{
|
|
3759
|
+
readonly supported: Schema.Literal<true>;
|
|
3760
|
+
}>, Schema.Struct<{
|
|
3761
|
+
readonly supported: Schema.Literal<false>;
|
|
3762
|
+
readonly message: Schema.String;
|
|
3763
|
+
}>]>;
|
|
3764
|
+
readonly nix: Schema.Union<readonly [Schema.Struct<{
|
|
3765
|
+
readonly supported: Schema.Literal<true>;
|
|
3766
|
+
}>, Schema.Struct<{
|
|
3767
|
+
readonly supported: Schema.Literal<false>;
|
|
3768
|
+
readonly message: Schema.String;
|
|
3769
|
+
}>]>;
|
|
3770
|
+
readonly arch: Schema.Union<readonly [Schema.Struct<{
|
|
3771
|
+
readonly supported: Schema.Literal<true>;
|
|
3772
|
+
}>, Schema.Struct<{
|
|
3773
|
+
readonly supported: Schema.Literal<false>;
|
|
3774
|
+
readonly message: Schema.String;
|
|
3775
|
+
}>]>;
|
|
3776
|
+
readonly fedora: Schema.Union<readonly [Schema.Struct<{
|
|
3777
|
+
readonly supported: Schema.Literal<true>;
|
|
3778
|
+
}>, Schema.Struct<{
|
|
3779
|
+
readonly supported: Schema.Literal<false>;
|
|
3780
|
+
readonly message: Schema.String;
|
|
3781
|
+
}>]>;
|
|
3782
|
+
}>;
|
|
3783
|
+
/** A workspace built from a base image of its own (`target.os.family: "custom"`). */
|
|
3784
|
+
readonly customImage: Schema.Union<readonly [Schema.Struct<{
|
|
3785
|
+
readonly supported: Schema.Literal<true>;
|
|
3786
|
+
}>, Schema.Struct<{
|
|
3787
|
+
readonly supported: Schema.Literal<false>;
|
|
3788
|
+
readonly message: Schema.String;
|
|
3789
|
+
}>]>;
|
|
3790
|
+
/** Directories of the deployment's own servers bound into the workspace (mount sources). */
|
|
3791
|
+
readonly hostDirectories: Schema.Union<readonly [Schema.Struct<{
|
|
3792
|
+
readonly supported: Schema.Literal<true>;
|
|
3793
|
+
}>, Schema.Struct<{
|
|
3794
|
+
readonly supported: Schema.Literal<false>;
|
|
3795
|
+
readonly message: Schema.String;
|
|
3796
|
+
}>]>;
|
|
3797
|
+
/** Docker inside the workspace (`tooling.services.docker`). */
|
|
3798
|
+
readonly docker: Schema.Union<readonly [Schema.Struct<{
|
|
3799
|
+
readonly supported: Schema.Literal<true>;
|
|
3800
|
+
}>, Schema.Struct<{
|
|
3801
|
+
readonly supported: Schema.Literal<false>;
|
|
3802
|
+
readonly message: Schema.String;
|
|
3803
|
+
}>]>;
|
|
3804
|
+
/** The workspace run under gVisor (`runtime.ociRuntime: "runsc"`). */
|
|
3805
|
+
readonly gvisor: Schema.Union<readonly [Schema.Struct<{
|
|
3806
|
+
readonly supported: Schema.Literal<true>;
|
|
3807
|
+
}>, Schema.Struct<{
|
|
3808
|
+
readonly supported: Schema.Literal<false>;
|
|
3809
|
+
readonly message: Schema.String;
|
|
3810
|
+
}>]>;
|
|
3811
|
+
/** Kubernetes Secrets, ConfigMaps and a service account (`runtime.envFrom`, `kubernetes`). */
|
|
3812
|
+
readonly clusterEnv: Schema.Union<readonly [Schema.Struct<{
|
|
3813
|
+
readonly supported: Schema.Literal<true>;
|
|
3814
|
+
}>, Schema.Struct<{
|
|
3815
|
+
readonly supported: Schema.Literal<false>;
|
|
3816
|
+
readonly message: Schema.String;
|
|
3817
|
+
}>]>;
|
|
3818
|
+
/** A workspace started by cloning a repository (a `git` source), not from a capture. */
|
|
3819
|
+
readonly gitSource: Schema.Union<readonly [Schema.Struct<{
|
|
3820
|
+
readonly supported: Schema.Literal<true>;
|
|
3821
|
+
}>, Schema.Struct<{
|
|
3822
|
+
readonly supported: Schema.Literal<false>;
|
|
3823
|
+
readonly message: Schema.String;
|
|
3824
|
+
}>]>;
|
|
3825
|
+
/** Dotfiles sent with the create as archives (`runtime.dotfilesArchives`). */
|
|
3826
|
+
readonly dotfilesArchives: Schema.Union<readonly [Schema.Struct<{
|
|
3827
|
+
readonly supported: Schema.Literal<true>;
|
|
3828
|
+
}>, Schema.Struct<{
|
|
3829
|
+
readonly supported: Schema.Literal<false>;
|
|
3830
|
+
readonly message: Schema.String;
|
|
3831
|
+
}>]>;
|
|
3832
|
+
/** A screen (an X display) inside the workspace, and the CPU architectures it runs on. */
|
|
3833
|
+
readonly screen: Schema.Union<readonly [Schema.Struct<{
|
|
3834
|
+
readonly supported: Schema.Literal<true>;
|
|
3835
|
+
readonly architectures: Schema.$Array<Schema.Literals<readonly ["x86_64", "aarch64"]>>;
|
|
3836
|
+
}>, Schema.Struct<{
|
|
3837
|
+
readonly supported: Schema.Literal<false>;
|
|
3838
|
+
readonly message: Schema.String;
|
|
3839
|
+
}>]>;
|
|
3840
|
+
/** Ports inside the workspace the runtime holds for itself: nothing else can listen on them. */
|
|
3841
|
+
readonly reservedPorts: Schema.$Array<Schema.Number>;
|
|
3842
|
+
/**
|
|
3843
|
+
* A project's resources linked to the workspace: `live` reaches a running workspace when it is
|
|
3844
|
+
* linked, `next-start` only once the workspace starts again.
|
|
3845
|
+
*/
|
|
3846
|
+
readonly resources: Schema.Union<readonly [Schema.Struct<{
|
|
3847
|
+
readonly supported: Schema.Literal<true>;
|
|
3848
|
+
readonly attach: Schema.Literals<readonly ["live", "next-start"]>;
|
|
3849
|
+
}>, Schema.Struct<{
|
|
3850
|
+
readonly supported: Schema.Literal<false>;
|
|
3851
|
+
readonly message: Schema.String;
|
|
3852
|
+
}>]>;
|
|
3853
|
+
/** Whether a workspace that sits idle costs money, and the sentence that says so. */
|
|
3854
|
+
readonly idleCost: Schema.Struct<{
|
|
3855
|
+
readonly charged: Schema.Boolean;
|
|
3856
|
+
readonly message: Schema.String;
|
|
3857
|
+
}>;
|
|
3858
|
+
}>>;
|
|
3859
|
+
}>>, Schema.toCodecJson<typeof WorkspaceInternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"listWorkspaces", "GET", "/", never, Schema.toCodecStringTree<Schema.Struct<{
|
|
3508
3860
|
readonly ownerUserId: Schema.String;
|
|
3509
3861
|
readonly status: Schema.optional<Schema.Literals<readonly ["queued", "running", "ready", "failed", "cancelled", "stopped", "retained"]>>;
|
|
3510
3862
|
readonly limit: Schema.optional<Schema.String>;
|
|
@@ -3897,7 +4249,7 @@ export declare const WorkspacesGroup: HttpApiGroup.HttpApiGroup<"workspaces", Ht
|
|
|
3897
4249
|
/** The new attempt driving the fresh launch. */
|
|
3898
4250
|
readonly runId: Schema.String;
|
|
3899
4251
|
readonly status: Schema.Literals<readonly ["queued", "running", "ready", "failed", "cancelled", "stopped", "retained"]>;
|
|
3900
|
-
}>>, Schema.toCodecJson<typeof BudgetExceededError | typeof WorkspaceBadRequestError | typeof WorkspaceRuntimeRequirementUnsupportedError | typeof WorkspaceNotFoundError | typeof WorkspaceConflictError | typeof WorkspaceBadGatewayError | typeof WorkspaceServiceUnavailableError | typeof WorkspaceInternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"stopWorkspace", "POST", "/:workspaceId/stop", Schema.toCodecStringTree<Schema.Struct<{
|
|
4252
|
+
}>>, Schema.toCodecJson<typeof BudgetExceededError | typeof WorkspaceBadRequestError | typeof WorkspaceRuntimeEnvReferencesUnsupportedError | typeof WorkspaceRuntimeRequirementUnsupportedError | typeof WorkspaceDockerServiceUnsupportedError | typeof WorkspaceNotFoundError | typeof WorkspaceConflictError | typeof WorkspaceBadGatewayError | typeof WorkspaceServiceUnavailableError | typeof WorkspaceInternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"stopWorkspace", "POST", "/:workspaceId/stop", Schema.toCodecStringTree<Schema.Struct<{
|
|
3901
4253
|
readonly workspaceId: Schema.String;
|
|
3902
4254
|
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
3903
4255
|
readonly ownerUserId: Schema.String;
|
|
@@ -745,6 +745,81 @@ export const inspectWorkspaceImageResponseSchema = Schema.Struct({
|
|
|
745
745
|
/** The image's per-person capability (`unknown` when none has been built yet). */
|
|
746
746
|
personLayout: workspaceImagePersonLayoutSchema,
|
|
747
747
|
});
|
|
748
|
+
/** What a runtime does not do, with the sentence a person choosing an environment reads. */
|
|
749
|
+
export const runtimeUnsupportedSchema = Schema.Struct({
|
|
750
|
+
supported: Schema.Literal(false),
|
|
751
|
+
message: NonEmptyString,
|
|
752
|
+
});
|
|
753
|
+
/** Whether a runtime does one thing. A create that asks for an unsupported one is refused. */
|
|
754
|
+
export const runtimeCapabilitySchema = Schema.Union([
|
|
755
|
+
Schema.Struct({ supported: Schema.Literal(true) }),
|
|
756
|
+
runtimeUnsupportedSchema,
|
|
757
|
+
]);
|
|
758
|
+
/** The CPU architectures a runtime's workspaces run on. */
|
|
759
|
+
export const runtimeArchitectures = ["x86_64", "aarch64"];
|
|
760
|
+
export const runtimeArchitectureSchema = Schema.Literals(runtimeArchitectures);
|
|
761
|
+
/** The managed OS families a workspace image is built from. */
|
|
762
|
+
export const runtimeOsFamilies = ["ubuntu", "nix", "arch", "fedora"];
|
|
763
|
+
/**
|
|
764
|
+
* What one runtime supports, from the same rules a create is refused by: a create that asks a
|
|
765
|
+
* runtime for an item it marks unsupported is refused with that item's `message`.
|
|
766
|
+
*/
|
|
767
|
+
export const runtimeSupportSchema = Schema.Struct({
|
|
768
|
+
runtime: Schema.Literals(runtimeAdapterIds),
|
|
769
|
+
/** The managed OS families that run on this runtime (`target.os.family`). */
|
|
770
|
+
os: Schema.Struct({
|
|
771
|
+
ubuntu: runtimeCapabilitySchema,
|
|
772
|
+
nix: runtimeCapabilitySchema,
|
|
773
|
+
arch: runtimeCapabilitySchema,
|
|
774
|
+
fedora: runtimeCapabilitySchema,
|
|
775
|
+
}),
|
|
776
|
+
/** A workspace built from a base image of its own (`target.os.family: "custom"`). */
|
|
777
|
+
customImage: runtimeCapabilitySchema,
|
|
778
|
+
/** Directories of the deployment's own servers bound into the workspace (mount sources). */
|
|
779
|
+
hostDirectories: runtimeCapabilitySchema,
|
|
780
|
+
/** Docker inside the workspace (`tooling.services.docker`). */
|
|
781
|
+
docker: runtimeCapabilitySchema,
|
|
782
|
+
/** The workspace run under gVisor (`runtime.ociRuntime: "runsc"`). */
|
|
783
|
+
gvisor: runtimeCapabilitySchema,
|
|
784
|
+
/** Kubernetes Secrets, ConfigMaps and a service account (`runtime.envFrom`, `kubernetes`). */
|
|
785
|
+
clusterEnv: runtimeCapabilitySchema,
|
|
786
|
+
/** A workspace started by cloning a repository (a `git` source), not from a capture. */
|
|
787
|
+
gitSource: runtimeCapabilitySchema,
|
|
788
|
+
/** Dotfiles sent with the create as archives (`runtime.dotfilesArchives`). */
|
|
789
|
+
dotfilesArchives: runtimeCapabilitySchema,
|
|
790
|
+
/** A screen (an X display) inside the workspace, and the CPU architectures it runs on. */
|
|
791
|
+
screen: Schema.Union([
|
|
792
|
+
Schema.Struct({
|
|
793
|
+
supported: Schema.Literal(true),
|
|
794
|
+
architectures: Schema.Array(runtimeArchitectureSchema),
|
|
795
|
+
}),
|
|
796
|
+
runtimeUnsupportedSchema,
|
|
797
|
+
]),
|
|
798
|
+
/** Ports inside the workspace the runtime holds for itself: nothing else can listen on them. */
|
|
799
|
+
reservedPorts: Schema.Array(Schema.Number),
|
|
800
|
+
/**
|
|
801
|
+
* A project's resources linked to the workspace: `live` reaches a running workspace when it is
|
|
802
|
+
* linked, `next-start` only once the workspace starts again.
|
|
803
|
+
*/
|
|
804
|
+
resources: Schema.Union([
|
|
805
|
+
Schema.Struct({
|
|
806
|
+
supported: Schema.Literal(true),
|
|
807
|
+
attach: Schema.Literals(["live", "next-start"]),
|
|
808
|
+
}),
|
|
809
|
+
runtimeUnsupportedSchema,
|
|
810
|
+
]),
|
|
811
|
+
/** Whether a workspace that sits idle costs money, and the sentence that says so. */
|
|
812
|
+
idleCost: Schema.Struct({ charged: Schema.Boolean, message: NonEmptyString }),
|
|
813
|
+
});
|
|
814
|
+
/**
|
|
815
|
+
* The runtimes this install launches workspaces on, and what each supports. `default` is the one
|
|
816
|
+
* a create that names no runtime (`target.runtime.family: "auto"`) runs on; it is listed first.
|
|
817
|
+
* A runtime that is not listed is one this install cannot launch.
|
|
818
|
+
*/
|
|
819
|
+
export const workspaceRuntimesResponseSchema = Schema.Struct({
|
|
820
|
+
default: Schema.Literals(runtimeAdapterIds),
|
|
821
|
+
runtimes: Schema.Array(runtimeSupportSchema),
|
|
822
|
+
});
|
|
748
823
|
/**
|
|
749
824
|
* Stable codes of a refused connected account, carried with the account's `provider` by the error
|
|
750
825
|
* that refuses it (a create's or a credentials put's): `connected-account-missing`
|
|
@@ -1562,11 +1637,20 @@ HttpApiEndpoint.post("restartWorkspace", "/:workspaceId/restart", {
|
|
|
1562
1637
|
WorkspaceConflictError,
|
|
1563
1638
|
WorkspaceBadGatewayError,
|
|
1564
1639
|
WorkspaceServiceUnavailableError,
|
|
1640
|
+
// The recorded spec asks for what its runtime does not support (now), as a create would.
|
|
1565
1641
|
WorkspaceRuntimeRequirementUnsupportedError,
|
|
1642
|
+
WorkspaceRuntimeEnvReferencesUnsupportedError,
|
|
1643
|
+
WorkspaceDockerServiceUnsupportedError,
|
|
1566
1644
|
WorkspaceInternalServerError,
|
|
1567
1645
|
],
|
|
1568
1646
|
}))
|
|
1569
1647
|
.add(
|
|
1648
|
+
// A read, before any create: the runtimes this install launches and what each supports.
|
|
1649
|
+
HttpApiEndpoint.get("listWorkspaceRuntimes", "/runtimes", {
|
|
1650
|
+
success: workspaceRuntimesResponseSchema,
|
|
1651
|
+
error: [WorkspaceInternalServerError],
|
|
1652
|
+
}))
|
|
1653
|
+
.add(
|
|
1570
1654
|
// A read: plans the spec as a build would and looks up what was published for it.
|
|
1571
1655
|
HttpApiEndpoint.post("inspectWorkspaceImage", "/image", {
|
|
1572
1656
|
payload: inspectWorkspaceImageRequestSchema,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sealant/api-contracts-next",
|
|
3
|
-
"version": "0.40.0-next.
|
|
3
|
+
"version": "0.40.0-next.870",
|
|
4
4
|
"description": "Contract-first HTTP API definitions for Sealant services",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"peerDependencies": {
|
|
37
37
|
"effect": "^4.0.5"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "1bfed31921585308cf9ba946b72c47192955945c",
|
|
40
40
|
"publishConfig": {
|
|
41
41
|
"access": "public"
|
|
42
42
|
}
|