@distilled.cloud/namespacelabs 0.0.0 → 1.0.0-rc.21

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