@distilled.cloud/namespacelabs 0.0.0-stage → 1.0.0-rc.20
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/LICENSE +201 -0
- package/README.md +125 -2
- package/lib/.lazy.json +1 -0
- package/lib/_bundle/lazy.js +4 -0
- package/lib/_bundle/sdk.js +2 -0
- package/lib/_bundle/sdk.js.map +1 -0
- package/lib/credentials.d.ts +55 -0
- package/lib/credentials.d.ts.map +1 -0
- package/lib/credentials.js +1 -0
- package/lib/errors.d.ts +33 -0
- package/lib/errors.d.ts.map +1 -0
- package/lib/errors.js +1 -0
- package/lib/index.d.ts +42 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +7 -0
- package/lib/index.lazy.js +7 -0
- package/lib/index.lazy.js.map +1 -0
- package/lib/pagination.d.ts +2 -0
- package/lib/pagination.d.ts.map +1 -0
- package/lib/pagination.js +1 -0
- package/lib/protocol.d.ts +15 -0
- package/lib/protocol.d.ts.map +1 -0
- package/lib/protocol.js +1 -0
- package/lib/retry.d.ts +12 -0
- package/lib/retry.d.ts.map +1 -0
- package/lib/retry.js +1 -0
- package/lib/services/artifacts.d.ts +260 -0
- package/lib/services/artifacts.d.ts.map +1 -0
- package/lib/services/artifacts.js +2 -0
- package/lib/services/artifacts.js.map +1 -0
- package/lib/services/audit.d.ts +149 -0
- package/lib/services/audit.d.ts.map +1 -0
- package/lib/services/audit.js +2 -0
- package/lib/services/audit.js.map +1 -0
- package/lib/services/bazel.d.ts +173 -0
- package/lib/services/bazel.d.ts.map +1 -0
- package/lib/services/bazel.js +2 -0
- package/lib/services/bazel.js.map +1 -0
- package/lib/services/bazel_cache.d.ts +118 -0
- package/lib/services/bazel_cache.d.ts.map +1 -0
- package/lib/services/bazel_cache.js +2 -0
- package/lib/services/bazel_cache.js.map +1 -0
- package/lib/services/builder.d.ts +234 -0
- package/lib/services/builder.d.ts.map +1 -0
- package/lib/services/builder.js +2 -0
- package/lib/services/builder.js.map +1 -0
- package/lib/services/buildkite_jobs.d.ts +121 -0
- package/lib/services/buildkite_jobs.d.ts.map +1 -0
- package/lib/services/buildkite_jobs.js +2 -0
- package/lib/services/buildkite_jobs.js.map +1 -0
- package/lib/services/buildkite_queue.d.ts +178 -0
- package/lib/services/buildkite_queue.d.ts.map +1 -0
- package/lib/services/buildkite_queue.js +2 -0
- package/lib/services/buildkite_queue.js.map +1 -0
- package/lib/services/compute.d.ts +1057 -0
- package/lib/services/compute.d.ts.map +1 -0
- package/lib/services/compute.js +43 -0
- package/lib/services/compute.js.map +1 -0
- package/lib/services/compute_command.d.ts +112 -0
- package/lib/services/compute_command.d.ts.map +1 -0
- package/lib/services/compute_command.js +2 -0
- package/lib/services/compute_command.js.map +1 -0
- package/lib/services/compute_observability.d.ts +157 -0
- package/lib/services/compute_observability.d.ts.map +1 -0
- package/lib/services/compute_observability.js +2 -0
- package/lib/services/compute_observability.js.map +1 -0
- package/lib/services/compute_storage.d.ts +371 -0
- package/lib/services/compute_storage.d.ts.map +1 -0
- package/lib/services/compute_storage.js +33 -0
- package/lib/services/compute_storage.js.map +1 -0
- package/lib/services/compute_usage.d.ts +275 -0
- package/lib/services/compute_usage.d.ts.map +1 -0
- package/lib/services/compute_usage.js +2 -0
- package/lib/services/compute_usage.js.map +1 -0
- package/lib/services/egress.d.ts +183 -0
- package/lib/services/egress.d.ts.map +1 -0
- package/lib/services/egress.js +2 -0
- package/lib/services/egress.js.map +1 -0
- package/lib/services/experimental_compute_reservation.d.ts +662 -0
- package/lib/services/experimental_compute_reservation.d.ts.map +1 -0
- package/lib/services/experimental_compute_reservation.js +23 -0
- package/lib/services/experimental_compute_reservation.js.map +1 -0
- package/lib/services/experimental_remote_results.d.ts +488 -0
- package/lib/services/experimental_remote_results.d.ts.map +1 -0
- package/lib/services/experimental_remote_results.js +2 -0
- package/lib/services/experimental_remote_results.js.map +1 -0
- package/lib/services/github_image.d.ts +154 -0
- package/lib/services/github_image.d.ts.map +1 -0
- package/lib/services/github_image.js +2 -0
- package/lib/services/github_image.js.map +1 -0
- package/lib/services/github_jobs.d.ts +175 -0
- package/lib/services/github_jobs.d.ts.map +1 -0
- package/lib/services/github_jobs.js +2 -0
- package/lib/services/github_jobs.js.map +1 -0
- package/lib/services/github_profile.d.ts +288 -0
- package/lib/services/github_profile.d.ts.map +1 -0
- package/lib/services/github_profile.js +2 -0
- package/lib/services/github_profile.js.map +1 -0
- package/lib/services/gradle_cache.d.ts +117 -0
- package/lib/services/gradle_cache.d.ts.map +1 -0
- package/lib/services/gradle_cache.js +2 -0
- package/lib/services/gradle_cache.js.map +1 -0
- package/lib/services/httpcache.d.ts +117 -0
- package/lib/services/httpcache.d.ts.map +1 -0
- package/lib/services/httpcache.js +2 -0
- package/lib/services/httpcache.js.map +1 -0
- package/lib/services/iam_tenant.d.ts +373 -0
- package/lib/services/iam_tenant.d.ts.map +1 -0
- package/lib/services/iam_tenant.js +39 -0
- package/lib/services/iam_tenant.js.map +1 -0
- package/lib/services/iam_tenant_membership.d.ts +106 -0
- package/lib/services/iam_tenant_membership.d.ts.map +1 -0
- package/lib/services/iam_tenant_membership.js +2 -0
- package/lib/services/iam_tenant_membership.js.map +1 -0
- package/lib/services/iam_token.d.ts +249 -0
- package/lib/services/iam_token.d.ts.map +1 -0
- package/lib/services/iam_token.js +2 -0
- package/lib/services/iam_token.js.map +1 -0
- package/lib/services/image.d.ts +214 -0
- package/lib/services/image.d.ts.map +1 -0
- package/lib/services/image.js +2 -0
- package/lib/services/image.js.map +1 -0
- package/lib/services/index.d.ts +30 -0
- package/lib/services/index.d.ts.map +1 -0
- package/lib/services/index.js +29 -0
- package/lib/services/private_devbox.d.ts +1156 -0
- package/lib/services/private_devbox.d.ts.map +1 -0
- package/lib/services/private_devbox.js +81 -0
- package/lib/services/private_devbox.js.map +1 -0
- package/lib/services/private_user_sessions.d.ts +137 -0
- package/lib/services/private_user_sessions.d.ts.map +1 -0
- package/lib/services/private_user_sessions.js +2 -0
- package/lib/services/private_user_sessions.js.map +1 -0
- package/lib/services/registry.d.ts +365 -0
- package/lib/services/registry.d.ts.map +1 -0
- package/lib/services/registry.js +34 -0
- package/lib/services/registry.js.map +1 -0
- package/lib/services/testing.d.ts +152 -0
- package/lib/services/testing.d.ts.map +1 -0
- package/lib/services/testing.js +2 -0
- package/lib/services/testing.js.map +1 -0
- package/lib/services/vault.d.ts +195 -0
- package/lib/services/vault.d.ts.map +1 -0
- package/lib/services/vault.js +2 -0
- package/lib/services/vault.js.map +1 -0
- package/lib/services.lazy/artifacts.js +1 -0
- package/lib/services.lazy/audit.js +1 -0
- package/lib/services.lazy/bazel.js +1 -0
- package/lib/services.lazy/bazel_cache.js +1 -0
- package/lib/services.lazy/builder.js +1 -0
- package/lib/services.lazy/buildkite_jobs.js +1 -0
- package/lib/services.lazy/buildkite_queue.js +1 -0
- package/lib/services.lazy/compute.js +4 -0
- package/lib/services.lazy/compute_command.js +1 -0
- package/lib/services.lazy/compute_observability.js +1 -0
- package/lib/services.lazy/compute_storage.js +4 -0
- package/lib/services.lazy/compute_usage.js +1 -0
- package/lib/services.lazy/egress.js +1 -0
- package/lib/services.lazy/experimental_compute_reservation.js +4 -0
- package/lib/services.lazy/experimental_remote_results.js +1 -0
- package/lib/services.lazy/github_image.js +1 -0
- package/lib/services.lazy/github_jobs.js +1 -0
- package/lib/services.lazy/github_profile.js +1 -0
- package/lib/services.lazy/gradle_cache.js +1 -0
- package/lib/services.lazy/httpcache.js +1 -0
- package/lib/services.lazy/iam_tenant.js +4 -0
- package/lib/services.lazy/iam_tenant_membership.js +1 -0
- package/lib/services.lazy/iam_token.js +1 -0
- package/lib/services.lazy/image.js +1 -0
- package/lib/services.lazy/index.js +3 -0
- package/lib/services.lazy/private_devbox.js +4 -0
- package/lib/services.lazy/private_user_sessions.js +1 -0
- package/lib/services.lazy/registry.js +4 -0
- package/lib/services.lazy/testing.js +1 -0
- package/lib/services.lazy/vault.js +1 -0
- package/lib/traits.d.ts +3 -0
- package/lib/traits.d.ts.map +1 -0
- package/lib/traits.js +1 -0
- package/package.json +87 -3
- package/src/credentials.ts +164 -0
- package/src/errors.ts +47 -0
- package/src/index.ts +48 -0
- package/src/pagination.ts +1 -0
- package/src/protocol.ts +82 -0
- package/src/retry.ts +28 -0
- package/src/services/artifacts.ts +761 -0
- package/src/services/audit.ts +315 -0
- package/src/services/bazel.ts +415 -0
- package/src/services/bazel_cache.ts +211 -0
- package/src/services/builder.ts +568 -0
- package/src/services/buildkite_jobs.ts +222 -0
- package/src/services/buildkite_queue.ts +445 -0
- package/src/services/compute.ts +2794 -0
- package/src/services/compute_command.ts +212 -0
- package/src/services/compute_observability.ts +428 -0
- package/src/services/compute_storage.ts +1159 -0
- package/src/services/compute_usage.ts +730 -0
- package/src/services/egress.ts +508 -0
- package/src/services/experimental_compute_reservation.ts +1488 -0
- package/src/services/experimental_remote_results.ts +1157 -0
- package/src/services/github_image.ts +293 -0
- package/src/services/github_jobs.ts +381 -0
- package/src/services/github_profile.ts +721 -0
- package/src/services/gradle_cache.ts +263 -0
- package/src/services/httpcache.ts +263 -0
- package/src/services/iam_tenant.ts +1355 -0
- package/src/services/iam_tenant_membership.ts +245 -0
- package/src/services/iam_token.ts +780 -0
- package/src/services/image.ts +594 -0
- package/src/services/index.ts +30 -0
- package/src/services/private_devbox.ts +4217 -0
- package/src/services/private_user_sessions.ts +402 -0
- package/src/services/registry.ts +1234 -0
- package/src/services/testing.ts +386 -0
- package/src/services/vault.ts +514 -0
- package/src/traits.ts +36 -0
|
@@ -0,0 +1,594 @@
|
|
|
1
|
+
import * as API from "@distilled.cloud/core/api";
|
|
2
|
+
import * as C from "@distilled.cloud/core/category";
|
|
3
|
+
// AUTO-GENERATED by scripts/generate.ts from .generated-specs (buf.build/namespace/cloud -> smithy). Do not edit.
|
|
4
|
+
import * as S from "@distilled.cloud/core/schema-lite";
|
|
5
|
+
import * as __L from "@distilled.cloud/core/schema-lite";
|
|
6
|
+
import { UnknownNamespaceLabsError } from "../errors.ts";
|
|
7
|
+
import { paginateCursor } from "../pagination.ts";
|
|
8
|
+
import {
|
|
9
|
+
NamespaceLabsProtocol,
|
|
10
|
+
type NamespaceLabsOpError,
|
|
11
|
+
type NamespaceLabsOpContext,
|
|
12
|
+
} from "../protocol.ts";
|
|
13
|
+
import * as Retry from "../retry.ts";
|
|
14
|
+
import * as T from "../traits.ts";
|
|
15
|
+
// Schema table, filled on first reach (see __S at the end).
|
|
16
|
+
const __s: any[] = [];
|
|
17
|
+
|
|
18
|
+
export type { NamespaceLabsOpError, NamespaceLabsOpContext };
|
|
19
|
+
|
|
20
|
+
/** Span facts shared by every operation (com.distilled.telemetry#service). */
|
|
21
|
+
const TELEMETRY = {
|
|
22
|
+
system: "namespacelabs-api",
|
|
23
|
+
responseHeaders: [
|
|
24
|
+
{ header: "x-request-id", name: "http.response.header.x-request-id", transform: "list" },
|
|
25
|
+
{ header: "request-id", name: "http.response.header.request-id", transform: "list" },
|
|
26
|
+
],
|
|
27
|
+
prefix: "Namespacelabs",
|
|
28
|
+
service: "ImageService",
|
|
29
|
+
propagate: "w3c",
|
|
30
|
+
} as const;
|
|
31
|
+
|
|
32
|
+
export class AlreadyExists
|
|
33
|
+
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
34
|
+
/*@__PURE__*/ S.TaggedError<AlreadyExists>()("AlreadyExists", {
|
|
35
|
+
message: S.String,
|
|
36
|
+
body: S.Unknown,
|
|
37
|
+
}).pipe(C.withConflictError),
|
|
38
|
+
[{ status: 409, body: { "/code": "already_exists" } }],
|
|
39
|
+
) {}
|
|
40
|
+
|
|
41
|
+
export class FailedPrecondition
|
|
42
|
+
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
43
|
+
/*@__PURE__*/ S.TaggedError<FailedPrecondition>()("FailedPrecondition", {
|
|
44
|
+
message: S.String,
|
|
45
|
+
body: S.Unknown,
|
|
46
|
+
}).pipe(C.withBadRequestError),
|
|
47
|
+
[{ status: 400, body: { "/code": "failed_precondition" } }],
|
|
48
|
+
) {}
|
|
49
|
+
|
|
50
|
+
export class InvalidArgument
|
|
51
|
+
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
52
|
+
/*@__PURE__*/ S.TaggedError<InvalidArgument>()("InvalidArgument", {
|
|
53
|
+
message: S.String,
|
|
54
|
+
body: S.Unknown,
|
|
55
|
+
}).pipe(C.withBadRequestError),
|
|
56
|
+
[{ status: 400, body: { "/code": "invalid_argument" } }],
|
|
57
|
+
) {}
|
|
58
|
+
|
|
59
|
+
export class NotFound
|
|
60
|
+
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
61
|
+
/*@__PURE__*/ S.TaggedError<NotFound>()("NotFound", {
|
|
62
|
+
message: S.String,
|
|
63
|
+
body: S.Unknown,
|
|
64
|
+
}).pipe(C.withBadRequestError),
|
|
65
|
+
[{ status: 404 }],
|
|
66
|
+
) {}
|
|
67
|
+
|
|
68
|
+
export class PermissionDenied
|
|
69
|
+
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
70
|
+
/*@__PURE__*/ S.TaggedError<PermissionDenied>()("PermissionDenied", {
|
|
71
|
+
message: S.String,
|
|
72
|
+
body: S.Unknown,
|
|
73
|
+
}).pipe(C.withAuthError),
|
|
74
|
+
[{ status: 403 }],
|
|
75
|
+
) {}
|
|
76
|
+
|
|
77
|
+
export class ResourceExhausted
|
|
78
|
+
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
79
|
+
/*@__PURE__*/ S.TaggedError<ResourceExhausted>()("ResourceExhausted", {
|
|
80
|
+
message: S.String,
|
|
81
|
+
body: S.Unknown,
|
|
82
|
+
}).pipe(C.withThrottlingError),
|
|
83
|
+
[{ status: 429 }],
|
|
84
|
+
) {}
|
|
85
|
+
|
|
86
|
+
export class Unauthenticated
|
|
87
|
+
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
88
|
+
/*@__PURE__*/ S.TaggedError<Unauthenticated>()("Unauthenticated", {
|
|
89
|
+
message: S.String,
|
|
90
|
+
body: S.Unknown,
|
|
91
|
+
}).pipe(C.withAuthError),
|
|
92
|
+
[{ status: 401 }],
|
|
93
|
+
) {}
|
|
94
|
+
|
|
95
|
+
export interface BuildRequest {
|
|
96
|
+
blueprintName?: string | undefined;
|
|
97
|
+
/** If not provided, the latest blueprint version is used. */
|
|
98
|
+
blueprintId?: string | undefined;
|
|
99
|
+
/** Optional: the deployment site to build the image at (e.g. "ord", "iad"). */
|
|
100
|
+
site?: string | undefined;
|
|
101
|
+
}
|
|
102
|
+
export interface BlueprintSpecDockerfile {
|
|
103
|
+
/** The Dockerfile content used to build the image. */
|
|
104
|
+
content?: string | undefined;
|
|
105
|
+
}
|
|
106
|
+
/** References another image blueprint by name and optional version. */
|
|
107
|
+
export interface BlueprintRef {
|
|
108
|
+
/** The name of the referenced blueprint. */
|
|
109
|
+
name?: string | undefined;
|
|
110
|
+
/** Optional blueprint version ID. If not provided, uses the latest version. */
|
|
111
|
+
id?: string | undefined;
|
|
112
|
+
}
|
|
113
|
+
/** Defines the base image to use for an APT-based build. */
|
|
114
|
+
export interface BlueprintSpecBaseImageSource {
|
|
115
|
+
/** A fully qualified container image reference. */
|
|
116
|
+
imageRef?: string | undefined;
|
|
117
|
+
/** A reference to another blueprint to use as the base. */
|
|
118
|
+
blueprintRef?: BlueprintRef | undefined;
|
|
119
|
+
}
|
|
120
|
+
export type StringList = Array<string>;
|
|
121
|
+
export interface BlueprintSpecAptBasedImage {
|
|
122
|
+
/** The base image to install packages on top of. */
|
|
123
|
+
baseImage?: BlueprintSpecBaseImageSource | undefined;
|
|
124
|
+
/** The list of Ubuntu APT packages to install. */
|
|
125
|
+
aptPackages?: StringList | undefined;
|
|
126
|
+
}
|
|
127
|
+
/** Defines how an image is built. Exactly one source must be specified. */
|
|
128
|
+
export interface BlueprintSpec {
|
|
129
|
+
/** Build the image from a Dockerfile. */
|
|
130
|
+
dockerfile?: BlueprintSpecDockerfile | undefined;
|
|
131
|
+
/** Build the image by installing APT packages on a base image. */
|
|
132
|
+
aptBasedImage?: BlueprintSpecAptBasedImage | undefined;
|
|
133
|
+
}
|
|
134
|
+
export type ImageBlueprintState =
|
|
135
|
+
| "STATE_UNKNOWN"
|
|
136
|
+
| "STATE_READY"
|
|
137
|
+
| "STATE_NEEDS_BUILDING"
|
|
138
|
+
| "STATE_BUILDING"
|
|
139
|
+
| "STATE_FAILED";
|
|
140
|
+
/** Build state for a specific deployment site. */
|
|
141
|
+
export interface ImageBlueprintStatePerSite {
|
|
142
|
+
/** The build state at this site. */
|
|
143
|
+
state: ImageBlueprintState;
|
|
144
|
+
/** The compute instance ID used for the build, if applicable. */
|
|
145
|
+
instanceId: string;
|
|
146
|
+
/** The built image reference at this site, if available. */
|
|
147
|
+
imageRef: string;
|
|
148
|
+
}
|
|
149
|
+
export type ImageBlueprintStatePerSiteMap = {
|
|
150
|
+
[key: string]: ImageBlueprintStatePerSite | undefined;
|
|
151
|
+
};
|
|
152
|
+
/** Aggregated build status across all sites. */
|
|
153
|
+
export interface ImageBlueprintStatus {
|
|
154
|
+
/** Timestamp of the last successful build (in UTC). */
|
|
155
|
+
builtAt?: string | undefined;
|
|
156
|
+
/** The image reference of the last successful build. */
|
|
157
|
+
imageRef: string;
|
|
158
|
+
/** Timestamp of the last build attempt (in UTC). */
|
|
159
|
+
lastAttemptAt?: string | undefined;
|
|
160
|
+
/** The builder reference used for the last build attempt. */
|
|
161
|
+
builderRef: string;
|
|
162
|
+
/** Error message from the last failed build attempt. */
|
|
163
|
+
error: string;
|
|
164
|
+
}
|
|
165
|
+
/** An image blueprint defines a reproducible recipe for building container images. */
|
|
166
|
+
export interface ImageBlueprint {
|
|
167
|
+
/** The unique identifier of this blueprint version. */
|
|
168
|
+
id: string;
|
|
169
|
+
/** The name of this blueprint. */
|
|
170
|
+
name: string;
|
|
171
|
+
/** Timestamp of when this blueprint was created (in UTC). */
|
|
172
|
+
createdAt?: string | undefined;
|
|
173
|
+
/** Timestamp of when this blueprint was replaced by a newer version (in UTC). Not set if this is the current version. */
|
|
174
|
+
replacedAt?: string | undefined;
|
|
175
|
+
/** The specification that defines how the image is built. */
|
|
176
|
+
spec?: BlueprintSpec | undefined;
|
|
177
|
+
/** The ID of the actor who created this blueprint. */
|
|
178
|
+
creatorId: string;
|
|
179
|
+
/** Build state per deployment site (e.g. "ord", "iad"). */
|
|
180
|
+
state: ImageBlueprintStatePerSiteMap;
|
|
181
|
+
/** Internal metadata version, incremented on each update. */
|
|
182
|
+
metadataVersion: string;
|
|
183
|
+
/** The most recent build status across all sites. */
|
|
184
|
+
status?: ImageBlueprintStatus | undefined;
|
|
185
|
+
/** Timestamp of when the status was last updated (in UTC). */
|
|
186
|
+
statusUpdatedAt?: string | undefined;
|
|
187
|
+
}
|
|
188
|
+
export interface BuildResponse {
|
|
189
|
+
/** The updated blueprint with the new build status. */
|
|
190
|
+
blueprint?: ImageBlueprint | undefined;
|
|
191
|
+
/** The image reference of the built image, if the build completed. */
|
|
192
|
+
imageRef: string;
|
|
193
|
+
}
|
|
194
|
+
export interface CreateBlueprintRequest {
|
|
195
|
+
/** A unique name for the blueprint within the workspace. */
|
|
196
|
+
blueprintName?: string | undefined;
|
|
197
|
+
/** The specification that defines how the image is built. */
|
|
198
|
+
spec?: BlueprintSpec | undefined;
|
|
199
|
+
}
|
|
200
|
+
export interface CreateBlueprintResponse {
|
|
201
|
+
blueprint?: ImageBlueprint | undefined;
|
|
202
|
+
}
|
|
203
|
+
export interface FetchBlueprintRequest {
|
|
204
|
+
blueprintName?: string | undefined;
|
|
205
|
+
/** If not provided, the latest blueprint version is used. */
|
|
206
|
+
blueprintId?: string | undefined;
|
|
207
|
+
}
|
|
208
|
+
export interface FetchBlueprintResponse {
|
|
209
|
+
blueprint?: ImageBlueprint | undefined;
|
|
210
|
+
}
|
|
211
|
+
export interface ListBlueprintsRequest {
|
|
212
|
+
paginationCursor?: string | undefined;
|
|
213
|
+
}
|
|
214
|
+
export type ImageBlueprintList = Array<ImageBlueprint>;
|
|
215
|
+
export interface ListBlueprintsResponse {
|
|
216
|
+
paginationCursor: string;
|
|
217
|
+
blueprints: ImageBlueprintList;
|
|
218
|
+
}
|
|
219
|
+
export interface RemoveBlueprintRequest {
|
|
220
|
+
blueprintName?: string | undefined;
|
|
221
|
+
}
|
|
222
|
+
export interface RemoveBlueprintResponse {}
|
|
223
|
+
export type BuildError =
|
|
224
|
+
| InvalidArgument
|
|
225
|
+
| FailedPrecondition
|
|
226
|
+
| Unauthenticated
|
|
227
|
+
| PermissionDenied
|
|
228
|
+
| NotFound
|
|
229
|
+
| AlreadyExists
|
|
230
|
+
| ResourceExhausted
|
|
231
|
+
| NamespaceLabsOpError;
|
|
232
|
+
/** Triggers a new build for the specified blueprint. The build is executed asynchronously; use FetchBlueprint to poll for the build status. ### Errors - If the blueprint does not exist, a `NotFound` status is returned. */
|
|
233
|
+
export const build: API.OperationMethod<
|
|
234
|
+
BuildRequest,
|
|
235
|
+
BuildResponse,
|
|
236
|
+
BuildError,
|
|
237
|
+
NamespaceLabsOpContext
|
|
238
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
239
|
+
input: __S(32, __c2, 0) as any as S.Schema<BuildRequest>,
|
|
240
|
+
output: __S(33, __c2, 1) as any as S.Schema<BuildResponse>,
|
|
241
|
+
errors: [
|
|
242
|
+
InvalidArgument,
|
|
243
|
+
FailedPrecondition,
|
|
244
|
+
Unauthenticated,
|
|
245
|
+
PermissionDenied,
|
|
246
|
+
NotFound,
|
|
247
|
+
AlreadyExists,
|
|
248
|
+
ResourceExhausted,
|
|
249
|
+
UnknownNamespaceLabsError,
|
|
250
|
+
],
|
|
251
|
+
protocol: NamespaceLabsProtocol,
|
|
252
|
+
retry: Retry.Retry,
|
|
253
|
+
telemetry: TELEMETRY,
|
|
254
|
+
span: "Build",
|
|
255
|
+
}));
|
|
256
|
+
|
|
257
|
+
export type CreateBlueprintError =
|
|
258
|
+
| InvalidArgument
|
|
259
|
+
| FailedPrecondition
|
|
260
|
+
| Unauthenticated
|
|
261
|
+
| PermissionDenied
|
|
262
|
+
| NotFound
|
|
263
|
+
| AlreadyExists
|
|
264
|
+
| ResourceExhausted
|
|
265
|
+
| NamespaceLabsOpError;
|
|
266
|
+
/** Creates a new image blueprint with the specified name and specification. Blueprint names must be unique within the workspace. ### Errors - If a blueprint with the same name already exists, an `AlreadyExists` status is returned. - If the specification is invalid, an `InvalidArgument` status is returned. */
|
|
267
|
+
export const createBlueprint: API.OperationMethod<
|
|
268
|
+
CreateBlueprintRequest,
|
|
269
|
+
CreateBlueprintResponse,
|
|
270
|
+
CreateBlueprintError,
|
|
271
|
+
NamespaceLabsOpContext
|
|
272
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
273
|
+
input: __S(64, __c4, 0) as any as S.Schema<CreateBlueprintRequest>,
|
|
274
|
+
output: __S(80, __c5, 0) as any as S.Schema<CreateBlueprintResponse>,
|
|
275
|
+
errors: [
|
|
276
|
+
InvalidArgument,
|
|
277
|
+
FailedPrecondition,
|
|
278
|
+
Unauthenticated,
|
|
279
|
+
PermissionDenied,
|
|
280
|
+
NotFound,
|
|
281
|
+
AlreadyExists,
|
|
282
|
+
ResourceExhausted,
|
|
283
|
+
UnknownNamespaceLabsError,
|
|
284
|
+
],
|
|
285
|
+
protocol: NamespaceLabsProtocol,
|
|
286
|
+
retry: Retry.Retry,
|
|
287
|
+
telemetry: TELEMETRY,
|
|
288
|
+
span: "CreateBlueprint",
|
|
289
|
+
}));
|
|
290
|
+
|
|
291
|
+
export type FetchBlueprintError =
|
|
292
|
+
| InvalidArgument
|
|
293
|
+
| FailedPrecondition
|
|
294
|
+
| Unauthenticated
|
|
295
|
+
| PermissionDenied
|
|
296
|
+
| NotFound
|
|
297
|
+
| AlreadyExists
|
|
298
|
+
| ResourceExhausted
|
|
299
|
+
| NamespaceLabsOpError;
|
|
300
|
+
/** Retrieves a specific blueprint by name or ID, including its current build status. ### Errors - If the blueprint does not exist, a `NotFound` status is returned. */
|
|
301
|
+
export const fetchBlueprint: API.OperationMethod<
|
|
302
|
+
FetchBlueprintRequest,
|
|
303
|
+
FetchBlueprintResponse,
|
|
304
|
+
FetchBlueprintError,
|
|
305
|
+
NamespaceLabsOpContext
|
|
306
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
307
|
+
input: __S(96, __c6, 0) as any as S.Schema<FetchBlueprintRequest>,
|
|
308
|
+
output: __S(80, __c5, 0) as any as S.Schema<FetchBlueprintResponse>,
|
|
309
|
+
errors: [
|
|
310
|
+
InvalidArgument,
|
|
311
|
+
FailedPrecondition,
|
|
312
|
+
Unauthenticated,
|
|
313
|
+
PermissionDenied,
|
|
314
|
+
NotFound,
|
|
315
|
+
AlreadyExists,
|
|
316
|
+
ResourceExhausted,
|
|
317
|
+
UnknownNamespaceLabsError,
|
|
318
|
+
],
|
|
319
|
+
protocol: NamespaceLabsProtocol,
|
|
320
|
+
retry: Retry.Retry,
|
|
321
|
+
telemetry: TELEMETRY,
|
|
322
|
+
span: "FetchBlueprint",
|
|
323
|
+
}));
|
|
324
|
+
|
|
325
|
+
export type ListBlueprintsError =
|
|
326
|
+
| InvalidArgument
|
|
327
|
+
| FailedPrecondition
|
|
328
|
+
| Unauthenticated
|
|
329
|
+
| PermissionDenied
|
|
330
|
+
| NotFound
|
|
331
|
+
| AlreadyExists
|
|
332
|
+
| ResourceExhausted
|
|
333
|
+
| NamespaceLabsOpError;
|
|
334
|
+
/** Returns all active blueprints in the workspace. */
|
|
335
|
+
export const listBlueprints: API.PaginatedOperationMethod<
|
|
336
|
+
ListBlueprintsRequest,
|
|
337
|
+
ListBlueprintsResponse,
|
|
338
|
+
ListBlueprintsError,
|
|
339
|
+
NamespaceLabsOpContext,
|
|
340
|
+
ImageBlueprint
|
|
341
|
+
> = /*@__PURE__*/ API.makePaginated(
|
|
342
|
+
() => ({
|
|
343
|
+
input: __S(0, __c0, 0) as any as S.Schema<ListBlueprintsRequest>,
|
|
344
|
+
output: __S(2, __c0, 2) as any as S.Schema<ListBlueprintsResponse>,
|
|
345
|
+
errors: [
|
|
346
|
+
InvalidArgument,
|
|
347
|
+
FailedPrecondition,
|
|
348
|
+
Unauthenticated,
|
|
349
|
+
PermissionDenied,
|
|
350
|
+
NotFound,
|
|
351
|
+
AlreadyExists,
|
|
352
|
+
ResourceExhausted,
|
|
353
|
+
UnknownNamespaceLabsError,
|
|
354
|
+
],
|
|
355
|
+
protocol: NamespaceLabsProtocol,
|
|
356
|
+
retry: Retry.Retry,
|
|
357
|
+
telemetry: TELEMETRY,
|
|
358
|
+
span: "ListBlueprints",
|
|
359
|
+
pagination: {
|
|
360
|
+
mode: "cursor",
|
|
361
|
+
inputToken: "paginationCursor",
|
|
362
|
+
outputToken: "paginationCursor",
|
|
363
|
+
items: "blueprints",
|
|
364
|
+
} as const,
|
|
365
|
+
}),
|
|
366
|
+
paginateCursor,
|
|
367
|
+
) as any;
|
|
368
|
+
|
|
369
|
+
export type RemoveBlueprintError =
|
|
370
|
+
| InvalidArgument
|
|
371
|
+
| FailedPrecondition
|
|
372
|
+
| Unauthenticated
|
|
373
|
+
| PermissionDenied
|
|
374
|
+
| NotFound
|
|
375
|
+
| AlreadyExists
|
|
376
|
+
| ResourceExhausted
|
|
377
|
+
| NamespaceLabsOpError;
|
|
378
|
+
/** Removes a blueprint. Existing images built from this blueprint are not affected. ### Errors - If the blueprint does not exist, a `NotFound` status is returned. */
|
|
379
|
+
export const removeBlueprint: API.OperationMethod<
|
|
380
|
+
RemoveBlueprintRequest,
|
|
381
|
+
RemoveBlueprintResponse,
|
|
382
|
+
RemoveBlueprintError,
|
|
383
|
+
NamespaceLabsOpContext
|
|
384
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
385
|
+
input: __S(16, __c1, 0) as any as S.Schema<RemoveBlueprintRequest>,
|
|
386
|
+
output: __S(17, __c1, 1) as any as S.Schema<RemoveBlueprintResponse>,
|
|
387
|
+
errors: [
|
|
388
|
+
InvalidArgument,
|
|
389
|
+
FailedPrecondition,
|
|
390
|
+
Unauthenticated,
|
|
391
|
+
PermissionDenied,
|
|
392
|
+
NotFound,
|
|
393
|
+
AlreadyExists,
|
|
394
|
+
ResourceExhausted,
|
|
395
|
+
UnknownNamespaceLabsError,
|
|
396
|
+
],
|
|
397
|
+
protocol: NamespaceLabsProtocol,
|
|
398
|
+
retry: Retry.Retry,
|
|
399
|
+
telemetry: TELEMETRY,
|
|
400
|
+
span: "RemoveBlueprint",
|
|
401
|
+
}));
|
|
402
|
+
|
|
403
|
+
// Schema builders: each runs one schema initializer, on that schema's first use.
|
|
404
|
+
function __c0(j: number): any {
|
|
405
|
+
switch (j) {
|
|
406
|
+
case 0:
|
|
407
|
+
return S.suspend(() =>
|
|
408
|
+
S.Struct({
|
|
409
|
+
paginationCursor: S.optional(S.String),
|
|
410
|
+
}).pipe(
|
|
411
|
+
T.Http({
|
|
412
|
+
method: "POST",
|
|
413
|
+
uri: "/namespace.cloud.image.v1beta.ImageService/ListBlueprints",
|
|
414
|
+
code: 200,
|
|
415
|
+
}),
|
|
416
|
+
),
|
|
417
|
+
).annotate({ identifier: "ListBlueprintsRequest" });
|
|
418
|
+
case 1:
|
|
419
|
+
return S.Array(__S(57, __c3, 9));
|
|
420
|
+
case 2:
|
|
421
|
+
return S.suspend(() =>
|
|
422
|
+
S.Struct({
|
|
423
|
+
paginationCursor: S.String,
|
|
424
|
+
blueprints: __S(1, __c0, 1),
|
|
425
|
+
}),
|
|
426
|
+
).annotate({ identifier: "ListBlueprintsResponse" });
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
function __c1(j: number): any {
|
|
430
|
+
switch (j) {
|
|
431
|
+
case 0:
|
|
432
|
+
return S.suspend(() =>
|
|
433
|
+
S.Struct({
|
|
434
|
+
blueprintName: S.optional(S.String),
|
|
435
|
+
}).pipe(
|
|
436
|
+
T.Http({
|
|
437
|
+
method: "POST",
|
|
438
|
+
uri: "/namespace.cloud.image.v1beta.ImageService/RemoveBlueprint",
|
|
439
|
+
code: 200,
|
|
440
|
+
}),
|
|
441
|
+
),
|
|
442
|
+
).annotate({ identifier: "RemoveBlueprintRequest" });
|
|
443
|
+
case 1:
|
|
444
|
+
return S.suspend(() => S.Struct({})).annotate({ identifier: "RemoveBlueprintResponse" });
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
function __c2(j: number): any {
|
|
448
|
+
switch (j) {
|
|
449
|
+
case 0:
|
|
450
|
+
return S.suspend(() =>
|
|
451
|
+
S.Struct({
|
|
452
|
+
blueprintName: S.optional(S.String),
|
|
453
|
+
blueprintId: S.optional(S.String),
|
|
454
|
+
site: S.optional(S.String),
|
|
455
|
+
}).pipe(
|
|
456
|
+
T.Http({
|
|
457
|
+
method: "POST",
|
|
458
|
+
uri: "/namespace.cloud.image.v1beta.ImageService/Build",
|
|
459
|
+
code: 200,
|
|
460
|
+
}),
|
|
461
|
+
),
|
|
462
|
+
).annotate({ identifier: "BuildRequest" });
|
|
463
|
+
case 1:
|
|
464
|
+
return S.suspend(() =>
|
|
465
|
+
S.Struct({
|
|
466
|
+
blueprint: S.optional(__S(57, __c3, 9)),
|
|
467
|
+
imageRef: S.String,
|
|
468
|
+
}),
|
|
469
|
+
).annotate({ identifier: "BuildResponse" });
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
function __c3(j: number): any {
|
|
473
|
+
switch (j) {
|
|
474
|
+
case 0:
|
|
475
|
+
return S.suspend(() =>
|
|
476
|
+
S.Struct({
|
|
477
|
+
content: S.optional(S.String),
|
|
478
|
+
}),
|
|
479
|
+
).annotate({ identifier: "BlueprintSpecDockerfile" });
|
|
480
|
+
case 1:
|
|
481
|
+
return S.suspend(() =>
|
|
482
|
+
S.Struct({
|
|
483
|
+
name: S.optional(S.String),
|
|
484
|
+
id: S.optional(S.String),
|
|
485
|
+
}),
|
|
486
|
+
).annotate({ identifier: "BlueprintRef" });
|
|
487
|
+
case 2:
|
|
488
|
+
return S.suspend(() =>
|
|
489
|
+
S.Struct({
|
|
490
|
+
imageRef: S.optional(S.String),
|
|
491
|
+
blueprintRef: S.optional(__S(49, __c3, 1)),
|
|
492
|
+
}),
|
|
493
|
+
).annotate({ identifier: "BlueprintSpecBaseImageSource" });
|
|
494
|
+
case 3:
|
|
495
|
+
return S.Array(S.String);
|
|
496
|
+
case 4:
|
|
497
|
+
return S.suspend(() =>
|
|
498
|
+
S.Struct({
|
|
499
|
+
baseImage: S.optional(__S(50, __c3, 2)),
|
|
500
|
+
aptPackages: S.optional(__S(51, __c3, 3)),
|
|
501
|
+
}),
|
|
502
|
+
).annotate({ identifier: "BlueprintSpecAptBasedImage" });
|
|
503
|
+
case 5:
|
|
504
|
+
return S.suspend(() =>
|
|
505
|
+
S.Struct({
|
|
506
|
+
dockerfile: S.optional(__S(48, __c3, 0)),
|
|
507
|
+
aptBasedImage: S.optional(__S(52, __c3, 4)),
|
|
508
|
+
}),
|
|
509
|
+
).annotate({ identifier: "BlueprintSpec" });
|
|
510
|
+
case 6:
|
|
511
|
+
return S.suspend(() =>
|
|
512
|
+
S.Struct({
|
|
513
|
+
state: S.String,
|
|
514
|
+
instanceId: S.String,
|
|
515
|
+
imageRef: S.String,
|
|
516
|
+
}),
|
|
517
|
+
).annotate({ identifier: "ImageBlueprintStatePerSite" });
|
|
518
|
+
case 7:
|
|
519
|
+
return S.Record(S.String, __S(54, __c3, 6));
|
|
520
|
+
case 8:
|
|
521
|
+
return S.suspend(() =>
|
|
522
|
+
S.Struct({
|
|
523
|
+
builtAt: S.optional(S.String),
|
|
524
|
+
imageRef: S.String,
|
|
525
|
+
lastAttemptAt: S.optional(S.String),
|
|
526
|
+
builderRef: S.String,
|
|
527
|
+
error: S.String,
|
|
528
|
+
}),
|
|
529
|
+
).annotate({ identifier: "ImageBlueprintStatus" });
|
|
530
|
+
case 9:
|
|
531
|
+
return S.suspend(() =>
|
|
532
|
+
S.Struct({
|
|
533
|
+
id: S.String,
|
|
534
|
+
name: S.String,
|
|
535
|
+
createdAt: S.optional(S.String),
|
|
536
|
+
replacedAt: S.optional(S.String),
|
|
537
|
+
spec: S.optional(__S(53, __c3, 5)),
|
|
538
|
+
creatorId: S.String,
|
|
539
|
+
state: __S(55, __c3, 7),
|
|
540
|
+
metadataVersion: S.String,
|
|
541
|
+
status: S.optional(__S(56, __c3, 8)),
|
|
542
|
+
statusUpdatedAt: S.optional(S.String),
|
|
543
|
+
}),
|
|
544
|
+
).annotate({ identifier: "ImageBlueprint" });
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
function __c4(j: number): any {
|
|
548
|
+
switch (j) {
|
|
549
|
+
case 0:
|
|
550
|
+
return S.suspend(() =>
|
|
551
|
+
S.Struct({
|
|
552
|
+
blueprintName: S.optional(S.String),
|
|
553
|
+
spec: S.optional(__S(53, __c3, 5)),
|
|
554
|
+
}).pipe(
|
|
555
|
+
T.Http({
|
|
556
|
+
method: "POST",
|
|
557
|
+
uri: "/namespace.cloud.image.v1beta.ImageService/CreateBlueprint",
|
|
558
|
+
code: 200,
|
|
559
|
+
}),
|
|
560
|
+
),
|
|
561
|
+
).annotate({ identifier: "CreateBlueprintRequest" });
|
|
562
|
+
}
|
|
563
|
+
}
|
|
564
|
+
function __c5(j: number): any {
|
|
565
|
+
switch (j) {
|
|
566
|
+
case 0:
|
|
567
|
+
return S.suspend(() =>
|
|
568
|
+
S.Struct({
|
|
569
|
+
blueprint: S.optional(__S(57, __c3, 9)),
|
|
570
|
+
}),
|
|
571
|
+
).annotate({ identifier: "CreateBlueprintResponse" });
|
|
572
|
+
}
|
|
573
|
+
}
|
|
574
|
+
function __c6(j: number): any {
|
|
575
|
+
switch (j) {
|
|
576
|
+
case 0:
|
|
577
|
+
return S.suspend(() =>
|
|
578
|
+
S.Struct({
|
|
579
|
+
blueprintName: S.optional(S.String),
|
|
580
|
+
blueprintId: S.optional(S.String),
|
|
581
|
+
}).pipe(
|
|
582
|
+
T.Http({
|
|
583
|
+
method: "POST",
|
|
584
|
+
uri: "/namespace.cloud.image.v1beta.ImageService/FetchBlueprint",
|
|
585
|
+
code: 200,
|
|
586
|
+
}),
|
|
587
|
+
),
|
|
588
|
+
).annotate({ identifier: "FetchBlueprintRequest" });
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
// Schema table: entry i is schema j of builder f, made on first reach.
|
|
592
|
+
function __S(i: number, f: (j: number) => unknown, j: number): any {
|
|
593
|
+
return (__s[i] ??= __L.at(f, j));
|
|
594
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// AUTO-GENERATED by scripts/generate.ts. Do not edit.
|
|
2
|
+
export * as artifacts from "./artifacts.ts";
|
|
3
|
+
export * as audit from "./audit.ts";
|
|
4
|
+
export * as bazelCache from "./bazel_cache.ts";
|
|
5
|
+
export * as bazel from "./bazel.ts";
|
|
6
|
+
export * as builder from "./builder.ts";
|
|
7
|
+
export * as buildkiteJobs from "./buildkite_jobs.ts";
|
|
8
|
+
export * as buildkiteQueue from "./buildkite_queue.ts";
|
|
9
|
+
export * as computeCommand from "./compute_command.ts";
|
|
10
|
+
export * as computeObservability from "./compute_observability.ts";
|
|
11
|
+
export * as computeStorage from "./compute_storage.ts";
|
|
12
|
+
export * as computeUsage from "./compute_usage.ts";
|
|
13
|
+
export * as compute from "./compute.ts";
|
|
14
|
+
export * as egress from "./egress.ts";
|
|
15
|
+
export * as experimentalComputeReservation from "./experimental_compute_reservation.ts";
|
|
16
|
+
export * as experimentalRemoteResults from "./experimental_remote_results.ts";
|
|
17
|
+
export * as githubImage from "./github_image.ts";
|
|
18
|
+
export * as githubJobs from "./github_jobs.ts";
|
|
19
|
+
export * as githubProfile from "./github_profile.ts";
|
|
20
|
+
export * as gradleCache from "./gradle_cache.ts";
|
|
21
|
+
export * as httpcache from "./httpcache.ts";
|
|
22
|
+
export * as iamTenantMembership from "./iam_tenant_membership.ts";
|
|
23
|
+
export * as iamTenant from "./iam_tenant.ts";
|
|
24
|
+
export * as iamToken from "./iam_token.ts";
|
|
25
|
+
export * as image from "./image.ts";
|
|
26
|
+
export * as privateDevbox from "./private_devbox.ts";
|
|
27
|
+
export * as privateUserSessions from "./private_user_sessions.ts";
|
|
28
|
+
export * as registry from "./registry.ts";
|
|
29
|
+
export * as testing from "./testing.ts";
|
|
30
|
+
export * as vault from "./vault.ts";
|