@distilled.cloud/namespacelabs 0.0.0 → 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.
Files changed (216) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +121 -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 +55 -0
  8. package/lib/credentials.d.ts.map +1 -0
  9. package/lib/credentials.js +1 -0
  10. package/lib/errors.d.ts +33 -0
  11. package/lib/errors.d.ts.map +1 -0
  12. package/lib/errors.js +1 -0
  13. package/lib/index.d.ts +42 -0
  14. package/lib/index.d.ts.map +1 -0
  15. package/lib/index.js +7 -0
  16. package/lib/index.lazy.js +7 -0
  17. package/lib/index.lazy.js.map +1 -0
  18. package/lib/pagination.d.ts +2 -0
  19. package/lib/pagination.d.ts.map +1 -0
  20. package/lib/pagination.js +1 -0
  21. package/lib/protocol.d.ts +15 -0
  22. package/lib/protocol.d.ts.map +1 -0
  23. package/lib/protocol.js +1 -0
  24. package/lib/retry.d.ts +12 -0
  25. package/lib/retry.d.ts.map +1 -0
  26. package/lib/retry.js +1 -0
  27. package/lib/services/artifacts.d.ts +260 -0
  28. package/lib/services/artifacts.d.ts.map +1 -0
  29. package/lib/services/artifacts.js +2 -0
  30. package/lib/services/artifacts.js.map +1 -0
  31. package/lib/services/audit.d.ts +149 -0
  32. package/lib/services/audit.d.ts.map +1 -0
  33. package/lib/services/audit.js +2 -0
  34. package/lib/services/audit.js.map +1 -0
  35. package/lib/services/bazel.d.ts +173 -0
  36. package/lib/services/bazel.d.ts.map +1 -0
  37. package/lib/services/bazel.js +2 -0
  38. package/lib/services/bazel.js.map +1 -0
  39. package/lib/services/bazel_cache.d.ts +118 -0
  40. package/lib/services/bazel_cache.d.ts.map +1 -0
  41. package/lib/services/bazel_cache.js +2 -0
  42. package/lib/services/bazel_cache.js.map +1 -0
  43. package/lib/services/builder.d.ts +234 -0
  44. package/lib/services/builder.d.ts.map +1 -0
  45. package/lib/services/builder.js +2 -0
  46. package/lib/services/builder.js.map +1 -0
  47. package/lib/services/buildkite_jobs.d.ts +121 -0
  48. package/lib/services/buildkite_jobs.d.ts.map +1 -0
  49. package/lib/services/buildkite_jobs.js +2 -0
  50. package/lib/services/buildkite_jobs.js.map +1 -0
  51. package/lib/services/buildkite_queue.d.ts +178 -0
  52. package/lib/services/buildkite_queue.d.ts.map +1 -0
  53. package/lib/services/buildkite_queue.js +2 -0
  54. package/lib/services/buildkite_queue.js.map +1 -0
  55. package/lib/services/compute.d.ts +1057 -0
  56. package/lib/services/compute.d.ts.map +1 -0
  57. package/lib/services/compute.js +43 -0
  58. package/lib/services/compute.js.map +1 -0
  59. package/lib/services/compute_command.d.ts +112 -0
  60. package/lib/services/compute_command.d.ts.map +1 -0
  61. package/lib/services/compute_command.js +2 -0
  62. package/lib/services/compute_command.js.map +1 -0
  63. package/lib/services/compute_observability.d.ts +157 -0
  64. package/lib/services/compute_observability.d.ts.map +1 -0
  65. package/lib/services/compute_observability.js +2 -0
  66. package/lib/services/compute_observability.js.map +1 -0
  67. package/lib/services/compute_storage.d.ts +371 -0
  68. package/lib/services/compute_storage.d.ts.map +1 -0
  69. package/lib/services/compute_storage.js +33 -0
  70. package/lib/services/compute_storage.js.map +1 -0
  71. package/lib/services/compute_usage.d.ts +275 -0
  72. package/lib/services/compute_usage.d.ts.map +1 -0
  73. package/lib/services/compute_usage.js +2 -0
  74. package/lib/services/compute_usage.js.map +1 -0
  75. package/lib/services/egress.d.ts +183 -0
  76. package/lib/services/egress.d.ts.map +1 -0
  77. package/lib/services/egress.js +2 -0
  78. package/lib/services/egress.js.map +1 -0
  79. package/lib/services/experimental_compute_reservation.d.ts +662 -0
  80. package/lib/services/experimental_compute_reservation.d.ts.map +1 -0
  81. package/lib/services/experimental_compute_reservation.js +23 -0
  82. package/lib/services/experimental_compute_reservation.js.map +1 -0
  83. package/lib/services/experimental_remote_results.d.ts +488 -0
  84. package/lib/services/experimental_remote_results.d.ts.map +1 -0
  85. package/lib/services/experimental_remote_results.js +2 -0
  86. package/lib/services/experimental_remote_results.js.map +1 -0
  87. package/lib/services/github_image.d.ts +154 -0
  88. package/lib/services/github_image.d.ts.map +1 -0
  89. package/lib/services/github_image.js +2 -0
  90. package/lib/services/github_image.js.map +1 -0
  91. package/lib/services/github_jobs.d.ts +175 -0
  92. package/lib/services/github_jobs.d.ts.map +1 -0
  93. package/lib/services/github_jobs.js +2 -0
  94. package/lib/services/github_jobs.js.map +1 -0
  95. package/lib/services/github_profile.d.ts +288 -0
  96. package/lib/services/github_profile.d.ts.map +1 -0
  97. package/lib/services/github_profile.js +2 -0
  98. package/lib/services/github_profile.js.map +1 -0
  99. package/lib/services/gradle_cache.d.ts +117 -0
  100. package/lib/services/gradle_cache.d.ts.map +1 -0
  101. package/lib/services/gradle_cache.js +2 -0
  102. package/lib/services/gradle_cache.js.map +1 -0
  103. package/lib/services/httpcache.d.ts +117 -0
  104. package/lib/services/httpcache.d.ts.map +1 -0
  105. package/lib/services/httpcache.js +2 -0
  106. package/lib/services/httpcache.js.map +1 -0
  107. package/lib/services/iam_tenant.d.ts +373 -0
  108. package/lib/services/iam_tenant.d.ts.map +1 -0
  109. package/lib/services/iam_tenant.js +39 -0
  110. package/lib/services/iam_tenant.js.map +1 -0
  111. package/lib/services/iam_tenant_membership.d.ts +106 -0
  112. package/lib/services/iam_tenant_membership.d.ts.map +1 -0
  113. package/lib/services/iam_tenant_membership.js +2 -0
  114. package/lib/services/iam_tenant_membership.js.map +1 -0
  115. package/lib/services/iam_token.d.ts +249 -0
  116. package/lib/services/iam_token.d.ts.map +1 -0
  117. package/lib/services/iam_token.js +2 -0
  118. package/lib/services/iam_token.js.map +1 -0
  119. package/lib/services/image.d.ts +214 -0
  120. package/lib/services/image.d.ts.map +1 -0
  121. package/lib/services/image.js +2 -0
  122. package/lib/services/image.js.map +1 -0
  123. package/lib/services/index.d.ts +30 -0
  124. package/lib/services/index.d.ts.map +1 -0
  125. package/lib/services/index.js +29 -0
  126. package/lib/services/private_devbox.d.ts +1156 -0
  127. package/lib/services/private_devbox.d.ts.map +1 -0
  128. package/lib/services/private_devbox.js +81 -0
  129. package/lib/services/private_devbox.js.map +1 -0
  130. package/lib/services/private_user_sessions.d.ts +137 -0
  131. package/lib/services/private_user_sessions.d.ts.map +1 -0
  132. package/lib/services/private_user_sessions.js +2 -0
  133. package/lib/services/private_user_sessions.js.map +1 -0
  134. package/lib/services/registry.d.ts +365 -0
  135. package/lib/services/registry.d.ts.map +1 -0
  136. package/lib/services/registry.js +34 -0
  137. package/lib/services/registry.js.map +1 -0
  138. package/lib/services/testing.d.ts +152 -0
  139. package/lib/services/testing.d.ts.map +1 -0
  140. package/lib/services/testing.js +2 -0
  141. package/lib/services/testing.js.map +1 -0
  142. package/lib/services/vault.d.ts +195 -0
  143. package/lib/services/vault.d.ts.map +1 -0
  144. package/lib/services/vault.js +2 -0
  145. package/lib/services/vault.js.map +1 -0
  146. package/lib/services.lazy/artifacts.js +1 -0
  147. package/lib/services.lazy/audit.js +1 -0
  148. package/lib/services.lazy/bazel.js +1 -0
  149. package/lib/services.lazy/bazel_cache.js +1 -0
  150. package/lib/services.lazy/builder.js +1 -0
  151. package/lib/services.lazy/buildkite_jobs.js +1 -0
  152. package/lib/services.lazy/buildkite_queue.js +1 -0
  153. package/lib/services.lazy/compute.js +4 -0
  154. package/lib/services.lazy/compute_command.js +1 -0
  155. package/lib/services.lazy/compute_observability.js +1 -0
  156. package/lib/services.lazy/compute_storage.js +4 -0
  157. package/lib/services.lazy/compute_usage.js +1 -0
  158. package/lib/services.lazy/egress.js +1 -0
  159. package/lib/services.lazy/experimental_compute_reservation.js +4 -0
  160. package/lib/services.lazy/experimental_remote_results.js +1 -0
  161. package/lib/services.lazy/github_image.js +1 -0
  162. package/lib/services.lazy/github_jobs.js +1 -0
  163. package/lib/services.lazy/github_profile.js +1 -0
  164. package/lib/services.lazy/gradle_cache.js +1 -0
  165. package/lib/services.lazy/httpcache.js +1 -0
  166. package/lib/services.lazy/iam_tenant.js +4 -0
  167. package/lib/services.lazy/iam_tenant_membership.js +1 -0
  168. package/lib/services.lazy/iam_token.js +1 -0
  169. package/lib/services.lazy/image.js +1 -0
  170. package/lib/services.lazy/index.js +3 -0
  171. package/lib/services.lazy/private_devbox.js +4 -0
  172. package/lib/services.lazy/private_user_sessions.js +1 -0
  173. package/lib/services.lazy/registry.js +4 -0
  174. package/lib/services.lazy/testing.js +1 -0
  175. package/lib/services.lazy/vault.js +1 -0
  176. package/lib/traits.d.ts +3 -0
  177. package/lib/traits.d.ts.map +1 -0
  178. package/lib/traits.js +1 -0
  179. package/package.json +82 -2
  180. package/src/credentials.ts +164 -0
  181. package/src/errors.ts +47 -0
  182. package/src/index.ts +48 -0
  183. package/src/pagination.ts +1 -0
  184. package/src/protocol.ts +82 -0
  185. package/src/retry.ts +28 -0
  186. package/src/services/artifacts.ts +761 -0
  187. package/src/services/audit.ts +315 -0
  188. package/src/services/bazel.ts +415 -0
  189. package/src/services/bazel_cache.ts +211 -0
  190. package/src/services/builder.ts +568 -0
  191. package/src/services/buildkite_jobs.ts +222 -0
  192. package/src/services/buildkite_queue.ts +445 -0
  193. package/src/services/compute.ts +2794 -0
  194. package/src/services/compute_command.ts +212 -0
  195. package/src/services/compute_observability.ts +428 -0
  196. package/src/services/compute_storage.ts +1159 -0
  197. package/src/services/compute_usage.ts +730 -0
  198. package/src/services/egress.ts +508 -0
  199. package/src/services/experimental_compute_reservation.ts +1488 -0
  200. package/src/services/experimental_remote_results.ts +1157 -0
  201. package/src/services/github_image.ts +293 -0
  202. package/src/services/github_jobs.ts +381 -0
  203. package/src/services/github_profile.ts +721 -0
  204. package/src/services/gradle_cache.ts +263 -0
  205. package/src/services/httpcache.ts +263 -0
  206. package/src/services/iam_tenant.ts +1355 -0
  207. package/src/services/iam_tenant_membership.ts +245 -0
  208. package/src/services/iam_token.ts +780 -0
  209. package/src/services/image.ts +594 -0
  210. package/src/services/index.ts +30 -0
  211. package/src/services/private_devbox.ts +4217 -0
  212. package/src/services/private_user_sessions.ts +402 -0
  213. package/src/services/registry.ts +1234 -0
  214. package/src/services/testing.ts +386 -0
  215. package/src/services/vault.ts +514 -0
  216. package/src/traits.ts +36 -0
@@ -0,0 +1,1234 @@
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: "ContainerRegistryService",
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 GetDefaultPolicyRequest {}
96
+ /** Controls whether image expiration is enforced. */
97
+ export type ExpirationEnforcement =
98
+ | "EXPIRATION_ENFORCEMENT_UNKNOWN"
99
+ | "EXPIRATION_ENFORCEMENT_ENFORCE"
100
+ | "EXPIRATION_ENFORCEMENT_DO_NOT_ENFORCE";
101
+ export interface GetDefaultPolicyResponse {
102
+ /** The current revision. */
103
+ revision: string;
104
+ /** The default expiration duration that is applied to newly created images. After this duration the image becomes inaccessible and the underlying blobs are deleted. Not set means no default policy is configured. Note: In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix "s" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. */
105
+ defaultExpiration?: string | undefined;
106
+ /** Controls whether expiration is enforced. */
107
+ expirationEnforcement: ExpirationEnforcement;
108
+ }
109
+ export interface GetImageRequest {
110
+ /** The repository containing the image. */
111
+ repository?: string | undefined;
112
+ /** The reference to the image. Can be either a tag or a digest. Digests have the form sha256:<hash>. */
113
+ reference?: string | undefined;
114
+ }
115
+ export type StringMap = { [key: string]: string | undefined };
116
+ export interface ImageSizes {
117
+ /** Total size of the image in bytes. */
118
+ total: string;
119
+ /** Size per platform in bytes. Keys are platform identifiers (e.g., "linux/amd64"). */
120
+ perPlatform: StringMap;
121
+ }
122
+ /** Labels are key/value pairs attached to entities such as tenants. */
123
+ export interface Label {
124
+ /** A name is an string up to 63 bytes that matches the regular expression `^[a-z]([a-z0-9-.]*[a-z0-9])?$`. */
125
+ name: string;
126
+ /** Label values are arbitrary values up to 255 bytes. */
127
+ value: string;
128
+ }
129
+ export type LabelList = Array<Label>;
130
+ export type StringList = Array<string>;
131
+ export interface Image {
132
+ /** The repository containing the image. */
133
+ repository: string;
134
+ /** The digest of the image. */
135
+ digest: string;
136
+ /** When the image was created. */
137
+ createdAt?: string | undefined;
138
+ /** When the image expires. Not set if the image does not expire. */
139
+ expiresAt?: string | undefined;
140
+ /** Size information for the image. */
141
+ sizes?: ImageSizes | undefined;
142
+ /** If the image has been deleted, when it was deleted. */
143
+ deletedAt?: string | undefined;
144
+ /** Labels attached to this image. */
145
+ labels: LabelList;
146
+ /** Tags that reference this image. */
147
+ tags: StringList;
148
+ }
149
+ export interface GetImageResponse {
150
+ image?: Image | undefined;
151
+ }
152
+ export interface GetRepositoryPolicyRequest {
153
+ /** The repository to get the policy for. */
154
+ repository?: string | undefined;
155
+ }
156
+ export interface GetRepositoryPolicyResponse {
157
+ /** The current revision. */
158
+ revision: string;
159
+ /** The expiration duration that is applied to newly created images in this repository. Not set means the default policy is used. Note: In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix "s" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. */
160
+ expiration?: string | undefined;
161
+ /** Controls whether expiration is enforced for this repository. */
162
+ expirationEnforcement: ExpirationEnforcement;
163
+ }
164
+ export type StringMatcherOperator = "OPERATOR_UNKNOWN" | "IS_ANY_OF" | "IS_NOT";
165
+ export interface StringMatcher {
166
+ values?: StringList | undefined;
167
+ op?: StringMatcherOperator | (string & {}) | undefined;
168
+ }
169
+ export interface TimestampRange {
170
+ after?: string | undefined;
171
+ before?: string | undefined;
172
+ }
173
+ export type ListImagesRequestDeletionFilter =
174
+ | "DELETION_FILTER_UNSPECIFIED"
175
+ | "INCLUDE_DELETED"
176
+ | "EXCLUDE_DELETED";
177
+ export interface ListImagesRequest {
178
+ /** If a previous response returned a `pagination_cursor`, it can be specified to continue reading results with the same arguments as the original call. */
179
+ paginationCursor?: string | undefined;
180
+ /** The maximum number of entries to return as part of this ListImages request. A maximum number of entries may also be specified when `pagination_cursor` is set. We won't return more than `max_entries`, but may return fewer. */
181
+ maxEntries?: string | undefined;
182
+ /** Filter images by repository name. If not specified, images from all repositories are returned. */
183
+ matchRepository?: StringMatcher | undefined;
184
+ /** Filter images by creation timestamp range. */
185
+ createdAt?: TimestampRange | undefined;
186
+ /** Filter images by expiration timestamp range, with exclusive before/after bounds. When either bound is set, images that never expire are excluded. */
187
+ expiresAt?: TimestampRange | undefined;
188
+ /** Unspecified includes deleted images on the first request and inherits the original filter on cursor continuation. Explicit continuation values must match. */
189
+ deletionFilter?: ListImagesRequestDeletionFilter | (string & {}) | undefined;
190
+ }
191
+ export type ImageList = Array<Image>;
192
+ export interface ListImagesResponse {
193
+ images: ImageList;
194
+ /** If set, there are additional results. Pass the same cursor to a subsequent ListImages call to continue fetching results. */
195
+ paginationCursor: string;
196
+ }
197
+ export interface ListRepositoriesRequest {
198
+ /** If a previous response returned a `pagination_cursor`, it can be specified to continue reading results with the same arguments as the original call. */
199
+ paginationCursor?: string | undefined;
200
+ /** The maximum number of entries to return as part of this ListRepositories request. A maximum number of entries may also be specified when `pagination_cursor` is set. We won't return more than `max_entries`, but may return fewer. */
201
+ maxEntries?: string | undefined;
202
+ }
203
+ export interface Repository {
204
+ /** The name of the repository. */
205
+ name: string;
206
+ /** The timestamp of the last push to this repository. */
207
+ lastPush?: string | undefined;
208
+ }
209
+ export type RepositoryList = Array<Repository>;
210
+ export interface ListRepositoriesResponse {
211
+ repositories: RepositoryList;
212
+ /** If set, there are additional results. Pass the same cursor to a subsequent ListRepositories call to continue fetching results. */
213
+ paginationCursor: string;
214
+ }
215
+ export type Visibility = "UNKNOWN_VISIBILITY" | "PUBLIC" | "PARTNER";
216
+ export interface ListSharedImagesRequest {
217
+ matchRepositories?: StringMatcher | undefined;
218
+ /** If set to UNKNOWN_VISIBILITY any image is returned. */
219
+ matchVisibility?: Visibility | (string & {}) | undefined;
220
+ }
221
+ export interface SharedImage {
222
+ /** The unique identifier of this shared image. */
223
+ id: string;
224
+ /** The repository that contains the shared image. */
225
+ sharedRepository: string;
226
+ /** The digest of the shared image. */
227
+ sharedDigest: string;
228
+ /** When this shared image expires. */
229
+ expiresAt?: string | undefined;
230
+ /** The image reference used to access the shared image. */
231
+ imageRef: string;
232
+ visibility: Visibility;
233
+ /** The suffix that was provided when the shared image got created. */
234
+ suffix: string;
235
+ }
236
+ export type SharedImageList = Array<SharedImage>;
237
+ export interface ListSharedImagesResponse {
238
+ sharedImages: SharedImageList;
239
+ }
240
+ export interface ListTagsRequest {
241
+ /** If a previous response returned a `pagination_cursor`, it can be specified to continue reading results with the same arguments as the original call. */
242
+ paginationCursor?: string | undefined;
243
+ /** The maximum number of entries to return as part of this ListTags request. A maximum number of entries may also be specified when `pagination_cursor` is set. We won't return more than `max_entries`, but may return fewer. */
244
+ maxEntries?: string | undefined;
245
+ /** The repository to list tags from. */
246
+ repository?: string | undefined;
247
+ }
248
+ export interface Tag {
249
+ /** The tag name. */
250
+ tag: string;
251
+ /** The image this tag points to. */
252
+ image?: Image | undefined;
253
+ /** When the tag was created. */
254
+ createdAt?: string | undefined;
255
+ }
256
+ export type TagList = Array<Tag>;
257
+ export interface ListTagsResponse {
258
+ tags: TagList;
259
+ /** If set, there are additional results. Pass the same cursor to a subsequent ListTags call to continue fetching results. */
260
+ paginationCursor: string;
261
+ }
262
+ export interface ListTagVersionsRequest {
263
+ /** If a previous response returned a `pagination_cursor`, it can be specified to continue reading results with the same arguments as the original call. */
264
+ paginationCursor?: string | undefined;
265
+ /** The maximum number of entries to return as part of this ListTagVersions request. A maximum number of entries may also be specified when `pagination_cursor` is set. We won't return more than `max_entries`, but may return fewer. */
266
+ maxEntries?: string | undefined;
267
+ /** The repository containing the tag. */
268
+ repository?: string | undefined;
269
+ /** The tag to list versions for. */
270
+ tag?: string | undefined;
271
+ }
272
+ export interface ListTagVersionsResponse {
273
+ /** The versions of the tag, ordered from newest to oldest. */
274
+ versions: TagList;
275
+ /** If set, there are additional results. Pass the same cursor to a subsequent ListTagVersions call to continue fetching results. */
276
+ paginationCursor: string;
277
+ }
278
+ export interface ShareImageRequest {
279
+ /** The repository that contains the image to be shared. */
280
+ repository?: string | undefined;
281
+ /** The digest of the image to be shared. */
282
+ digest?: string | undefined;
283
+ /** When the shared image should expire. Not setting this results in indefinitely shared images. */
284
+ expiresAt?: string | undefined;
285
+ /** Defines who can access this shared image. */
286
+ visibility?: Visibility | (string & {}) | undefined;
287
+ /** The optional suffix does not have a practical purpose apart from making the image more operationally distinct. The resulting image reference will, for example, be: public.nscr.io/{meaningful_id}/{suffix} */
288
+ suffix?: string | undefined;
289
+ }
290
+ export interface ShareImageResponse {
291
+ /** The unique identifier of this shared image. */
292
+ id: string;
293
+ /** The repository that contains the shared image. */
294
+ sharedRepository: string;
295
+ /** The digest of the shared image. */
296
+ sharedDigest: string;
297
+ /** When this shared image expires. */
298
+ expiresAt?: string | undefined;
299
+ /** The image reference used to access the shared image. */
300
+ imageRef: string;
301
+ visibility: Visibility;
302
+ /** The suffix that was provided when the shared image got created. */
303
+ suffix: string;
304
+ }
305
+ export interface UnshareImageRequest {
306
+ /** The unique identifier of the shared image to unshare. */
307
+ id?: string | undefined;
308
+ }
309
+ export interface UnshareImageResponse {}
310
+ export interface UpdateDefaultPolicyRequest {
311
+ /** Only update if revision matches. */
312
+ revision?: string | undefined;
313
+ /** The new default expiration duration for newly created images. A duration of at least 4h (=14400s) is required. In order to apply the expiration retroactively to existing images reach out to `support@namespace.so`. Note: In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix "s" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. */
314
+ defaultExpiration?: string | undefined;
315
+ /** Controls whether expiration is enforced. */
316
+ expirationEnforcement?: ExpirationEnforcement | (string & {}) | undefined;
317
+ }
318
+ export interface UpdateDefaultPolicyResponse {}
319
+ export interface UpdateImageLifetimeRequest {
320
+ /** The repository containing the image. */
321
+ repository?: string | undefined;
322
+ /** The digest of the image of the form sha256:<hash>. */
323
+ digest?: string | undefined;
324
+ /** The duration the lifetime of this image should be extended by. If the image currently has no expiration then providing extend_by is not supported. Can not be used in combination with new_expiry. Note: In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix "s" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. */
325
+ extendBy?: string | undefined;
326
+ /** The minimum remaining duration this image should be alive for. Note: In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix "s" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. */
327
+ ensureMinimumRemaining?: string | undefined;
328
+ /** The new expiration timestamp (in UTC) at which the image expires. Can not be used in combination with extend_by. Note: In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. */
329
+ newExpiry?: string | undefined;
330
+ }
331
+ export interface UpdateImageLifetimeResponse {
332
+ /** A timestamp at which the image will expire. */
333
+ newExpiry?: string | undefined;
334
+ }
335
+ export interface UpdateRepositoryPolicyRequest {
336
+ /** The repository to configure. */
337
+ repository?: string | undefined;
338
+ /** Only update if revision matches. */
339
+ revision?: string | undefined;
340
+ /** The expiration duration for newly created images in this repository. A duration of at least 4h (=14400s) is required. If set, this overrides the default policy for images pushed to this repository. If not set, the default policy is used. Note: In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix "s" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. */
341
+ expiration?: string | undefined;
342
+ /** Controls whether expiration is enforced for this repository. */
343
+ expirationEnforcement?: ExpirationEnforcement | (string & {}) | undefined;
344
+ }
345
+ export interface UpdateRepositoryPolicyResponse {}
346
+ export type GetDefaultPolicyError =
347
+ | InvalidArgument
348
+ | FailedPrecondition
349
+ | Unauthenticated
350
+ | PermissionDenied
351
+ | NotFound
352
+ | AlreadyExists
353
+ | ResourceExhausted
354
+ | NamespaceLabsOpError;
355
+ /** Returns the current default image expiration policy. */
356
+ export const getDefaultPolicy: API.OperationMethod<
357
+ GetDefaultPolicyRequest,
358
+ GetDefaultPolicyResponse,
359
+ GetDefaultPolicyError,
360
+ NamespaceLabsOpContext
361
+ > = /*@__PURE__*/ API.make(() => ({
362
+ input: __S(112, __c14, 0) as any as S.Schema<GetDefaultPolicyRequest>,
363
+ output: __S(113, __c14, 1) as any as S.Schema<GetDefaultPolicyResponse>,
364
+ errors: [
365
+ InvalidArgument,
366
+ FailedPrecondition,
367
+ Unauthenticated,
368
+ PermissionDenied,
369
+ NotFound,
370
+ AlreadyExists,
371
+ ResourceExhausted,
372
+ UnknownNamespaceLabsError,
373
+ ],
374
+ protocol: NamespaceLabsProtocol,
375
+ retry: Retry.Retry,
376
+ telemetry: TELEMETRY,
377
+ span: "GetDefaultPolicy",
378
+ }));
379
+
380
+ export type GetImageError =
381
+ | InvalidArgument
382
+ | FailedPrecondition
383
+ | Unauthenticated
384
+ | PermissionDenied
385
+ | NotFound
386
+ | AlreadyExists
387
+ | ResourceExhausted
388
+ | NamespaceLabsOpError;
389
+ /** Retrieves a specific image by repository and reference (tag or digest). ### Errors - If the image does not exist, a `NotFound` status is returned. */
390
+ export const getImage: API.OperationMethod<
391
+ GetImageRequest,
392
+ GetImageResponse,
393
+ GetImageError,
394
+ NamespaceLabsOpContext
395
+ > = /*@__PURE__*/ API.make(() => ({
396
+ input: __S(120, __c15, 0) as any as S.Schema<GetImageRequest>,
397
+ output: __S(121, __c15, 1) as any as S.Schema<GetImageResponse>,
398
+ errors: [
399
+ InvalidArgument,
400
+ FailedPrecondition,
401
+ Unauthenticated,
402
+ PermissionDenied,
403
+ NotFound,
404
+ AlreadyExists,
405
+ ResourceExhausted,
406
+ UnknownNamespaceLabsError,
407
+ ],
408
+ protocol: NamespaceLabsProtocol,
409
+ retry: Retry.Retry,
410
+ telemetry: TELEMETRY,
411
+ span: "GetImage",
412
+ }));
413
+
414
+ export type GetRepositoryPolicyError =
415
+ | InvalidArgument
416
+ | FailedPrecondition
417
+ | Unauthenticated
418
+ | PermissionDenied
419
+ | NotFound
420
+ | AlreadyExists
421
+ | ResourceExhausted
422
+ | NamespaceLabsOpError;
423
+ /** Returns the current image expiration policy for a specific repository. */
424
+ export const getRepositoryPolicy: API.OperationMethod<
425
+ GetRepositoryPolicyRequest,
426
+ GetRepositoryPolicyResponse,
427
+ GetRepositoryPolicyError,
428
+ NamespaceLabsOpContext
429
+ > = /*@__PURE__*/ API.make(() => ({
430
+ input: __S(144, __c18, 0) as any as S.Schema<GetRepositoryPolicyRequest>,
431
+ output: __S(145, __c18, 1) as any as S.Schema<GetRepositoryPolicyResponse>,
432
+ errors: [
433
+ InvalidArgument,
434
+ FailedPrecondition,
435
+ Unauthenticated,
436
+ PermissionDenied,
437
+ NotFound,
438
+ AlreadyExists,
439
+ ResourceExhausted,
440
+ UnknownNamespaceLabsError,
441
+ ],
442
+ protocol: NamespaceLabsProtocol,
443
+ retry: Retry.Retry,
444
+ telemetry: TELEMETRY,
445
+ span: "GetRepositoryPolicy",
446
+ }));
447
+
448
+ export type ListImagesError =
449
+ | InvalidArgument
450
+ | FailedPrecondition
451
+ | Unauthenticated
452
+ | PermissionDenied
453
+ | NotFound
454
+ | AlreadyExists
455
+ | ResourceExhausted
456
+ | NamespaceLabsOpError;
457
+ /** Lists images in the registry that match the specified criteria. */
458
+ export const listImages: API.PaginatedOperationMethod<
459
+ ListImagesRequest,
460
+ ListImagesResponse,
461
+ ListImagesError,
462
+ NamespaceLabsOpContext,
463
+ Image
464
+ > = /*@__PURE__*/ API.makePaginated(
465
+ () => ({
466
+ input: __S(1, __c0, 1) as any as S.Schema<ListImagesRequest>,
467
+ output: __S(3, __c0, 3) as any as S.Schema<ListImagesResponse>,
468
+ errors: [
469
+ InvalidArgument,
470
+ FailedPrecondition,
471
+ Unauthenticated,
472
+ PermissionDenied,
473
+ NotFound,
474
+ AlreadyExists,
475
+ ResourceExhausted,
476
+ UnknownNamespaceLabsError,
477
+ ],
478
+ protocol: NamespaceLabsProtocol,
479
+ retry: Retry.Retry,
480
+ telemetry: TELEMETRY,
481
+ span: "ListImages",
482
+ pagination: {
483
+ mode: "cursor",
484
+ inputToken: "paginationCursor",
485
+ outputToken: "paginationCursor",
486
+ items: "images",
487
+ } as const,
488
+ }),
489
+ paginateCursor,
490
+ ) as any;
491
+
492
+ export type ListRepositoriesError =
493
+ | InvalidArgument
494
+ | FailedPrecondition
495
+ | Unauthenticated
496
+ | PermissionDenied
497
+ | NotFound
498
+ | AlreadyExists
499
+ | ResourceExhausted
500
+ | NamespaceLabsOpError;
501
+ /** Lists all repositories in the registry. */
502
+ export const listRepositories: API.PaginatedOperationMethod<
503
+ ListRepositoriesRequest,
504
+ ListRepositoriesResponse,
505
+ ListRepositoriesError,
506
+ NamespaceLabsOpContext,
507
+ Repository
508
+ > = /*@__PURE__*/ API.makePaginated(
509
+ () => ({
510
+ input: __S(16, __c2, 0) as any as S.Schema<ListRepositoriesRequest>,
511
+ output: __S(19, __c2, 3) as any as S.Schema<ListRepositoriesResponse>,
512
+ errors: [
513
+ InvalidArgument,
514
+ FailedPrecondition,
515
+ Unauthenticated,
516
+ PermissionDenied,
517
+ NotFound,
518
+ AlreadyExists,
519
+ ResourceExhausted,
520
+ UnknownNamespaceLabsError,
521
+ ],
522
+ protocol: NamespaceLabsProtocol,
523
+ retry: Retry.Retry,
524
+ telemetry: TELEMETRY,
525
+ span: "ListRepositories",
526
+ pagination: {
527
+ mode: "cursor",
528
+ inputToken: "paginationCursor",
529
+ outputToken: "paginationCursor",
530
+ items: "repositories",
531
+ } as const,
532
+ }),
533
+ paginateCursor,
534
+ ) as any;
535
+
536
+ export type ListSharedImagesError =
537
+ | InvalidArgument
538
+ | FailedPrecondition
539
+ | Unauthenticated
540
+ | PermissionDenied
541
+ | NotFound
542
+ | AlreadyExists
543
+ | ResourceExhausted
544
+ | NamespaceLabsOpError;
545
+ /** Lists shared images, optionally filtered by repository and visibility. */
546
+ export const listSharedImages: API.OperationMethod<
547
+ ListSharedImagesRequest,
548
+ ListSharedImagesResponse,
549
+ ListSharedImagesError,
550
+ NamespaceLabsOpContext
551
+ > = /*@__PURE__*/ API.make(() => ({
552
+ input: __S(24, __c3, 0) as any as S.Schema<ListSharedImagesRequest>,
553
+ output: __S(26, __c3, 2) as any as S.Schema<ListSharedImagesResponse>,
554
+ errors: [
555
+ InvalidArgument,
556
+ FailedPrecondition,
557
+ Unauthenticated,
558
+ PermissionDenied,
559
+ NotFound,
560
+ AlreadyExists,
561
+ ResourceExhausted,
562
+ UnknownNamespaceLabsError,
563
+ ],
564
+ protocol: NamespaceLabsProtocol,
565
+ retry: Retry.Retry,
566
+ telemetry: TELEMETRY,
567
+ span: "ListSharedImages",
568
+ }));
569
+
570
+ export type ListTagsError =
571
+ | InvalidArgument
572
+ | FailedPrecondition
573
+ | Unauthenticated
574
+ | PermissionDenied
575
+ | NotFound
576
+ | AlreadyExists
577
+ | ResourceExhausted
578
+ | NamespaceLabsOpError;
579
+ /** Lists all tags for a specific repository. */
580
+ export const listTags: API.PaginatedOperationMethod<
581
+ ListTagsRequest,
582
+ ListTagsResponse,
583
+ ListTagsError,
584
+ NamespaceLabsOpContext,
585
+ Tag
586
+ > = /*@__PURE__*/ API.makePaginated(
587
+ () => ({
588
+ input: __S(40, __c5, 0) as any as S.Schema<ListTagsRequest>,
589
+ output: __S(41, __c5, 1) as any as S.Schema<ListTagsResponse>,
590
+ errors: [
591
+ InvalidArgument,
592
+ FailedPrecondition,
593
+ Unauthenticated,
594
+ PermissionDenied,
595
+ NotFound,
596
+ AlreadyExists,
597
+ ResourceExhausted,
598
+ UnknownNamespaceLabsError,
599
+ ],
600
+ protocol: NamespaceLabsProtocol,
601
+ retry: Retry.Retry,
602
+ telemetry: TELEMETRY,
603
+ span: "ListTags",
604
+ pagination: {
605
+ mode: "cursor",
606
+ inputToken: "paginationCursor",
607
+ outputToken: "paginationCursor",
608
+ items: "tags",
609
+ } as const,
610
+ }),
611
+ paginateCursor,
612
+ ) as any;
613
+
614
+ export type ListTagVersionsError =
615
+ | InvalidArgument
616
+ | FailedPrecondition
617
+ | Unauthenticated
618
+ | PermissionDenied
619
+ | NotFound
620
+ | AlreadyExists
621
+ | ResourceExhausted
622
+ | NamespaceLabsOpError;
623
+ /** Lists all versions of a specific tag in a repository, ordered from newest to oldest. A tag can point to different images over time as it is overwritten by new pushes. */
624
+ export const listTagVersions: API.PaginatedOperationMethod<
625
+ ListTagVersionsRequest,
626
+ ListTagVersionsResponse,
627
+ ListTagVersionsError,
628
+ NamespaceLabsOpContext,
629
+ Tag
630
+ > = /*@__PURE__*/ API.makePaginated(
631
+ () => ({
632
+ input: __S(56, __c7, 0) as any as S.Schema<ListTagVersionsRequest>,
633
+ output: __S(57, __c7, 1) as any as S.Schema<ListTagVersionsResponse>,
634
+ errors: [
635
+ InvalidArgument,
636
+ FailedPrecondition,
637
+ Unauthenticated,
638
+ PermissionDenied,
639
+ NotFound,
640
+ AlreadyExists,
641
+ ResourceExhausted,
642
+ UnknownNamespaceLabsError,
643
+ ],
644
+ protocol: NamespaceLabsProtocol,
645
+ retry: Retry.Retry,
646
+ telemetry: TELEMETRY,
647
+ span: "ListTagVersions",
648
+ pagination: {
649
+ mode: "cursor",
650
+ inputToken: "paginationCursor",
651
+ outputToken: "paginationCursor",
652
+ items: "versions",
653
+ } as const,
654
+ }),
655
+ paginateCursor,
656
+ ) as any;
657
+
658
+ export type ShareImageError =
659
+ | InvalidArgument
660
+ | FailedPrecondition
661
+ | Unauthenticated
662
+ | PermissionDenied
663
+ | NotFound
664
+ | AlreadyExists
665
+ | ResourceExhausted
666
+ | NamespaceLabsOpError;
667
+ /** Shares an image either publicly or with tenants of partner accounts. Returns the shared image metadata, including the public image reference that can be used to pull the image. ### Errors - If the image does not exist, a `NotFound` status is returned. */
668
+ export const shareImage: API.OperationMethod<
669
+ ShareImageRequest,
670
+ ShareImageResponse,
671
+ ShareImageError,
672
+ NamespaceLabsOpContext
673
+ > = /*@__PURE__*/ API.make(() => ({
674
+ input: __S(64, __c8, 0) as any as S.Schema<ShareImageRequest>,
675
+ output: __S(32, __c4, 0) as any as S.Schema<ShareImageResponse>,
676
+ errors: [
677
+ InvalidArgument,
678
+ FailedPrecondition,
679
+ Unauthenticated,
680
+ PermissionDenied,
681
+ NotFound,
682
+ AlreadyExists,
683
+ ResourceExhausted,
684
+ UnknownNamespaceLabsError,
685
+ ],
686
+ protocol: NamespaceLabsProtocol,
687
+ retry: Retry.Retry,
688
+ telemetry: TELEMETRY,
689
+ span: "ShareImage",
690
+ }));
691
+
692
+ export type UnshareImageError =
693
+ | InvalidArgument
694
+ | FailedPrecondition
695
+ | Unauthenticated
696
+ | PermissionDenied
697
+ | NotFound
698
+ | AlreadyExists
699
+ | ResourceExhausted
700
+ | NamespaceLabsOpError;
701
+ /** Removes an existing share, making the shared image reference inaccessible. ### Errors - If the share does not exist, a `NotFound` status is returned. */
702
+ export const unshareImage: API.OperationMethod<
703
+ UnshareImageRequest,
704
+ UnshareImageResponse,
705
+ UnshareImageError,
706
+ NamespaceLabsOpContext
707
+ > = /*@__PURE__*/ API.make(() => ({
708
+ input: __S(72, __c9, 0) as any as S.Schema<UnshareImageRequest>,
709
+ output: __S(80, __c10, 0) as any as S.Schema<UnshareImageResponse>,
710
+ errors: [
711
+ InvalidArgument,
712
+ FailedPrecondition,
713
+ Unauthenticated,
714
+ PermissionDenied,
715
+ NotFound,
716
+ AlreadyExists,
717
+ ResourceExhausted,
718
+ UnknownNamespaceLabsError,
719
+ ],
720
+ protocol: NamespaceLabsProtocol,
721
+ retry: Retry.Retry,
722
+ telemetry: TELEMETRY,
723
+ span: "UnshareImage",
724
+ }));
725
+
726
+ export type UpdateDefaultPolicyError =
727
+ | InvalidArgument
728
+ | FailedPrecondition
729
+ | Unauthenticated
730
+ | PermissionDenied
731
+ | NotFound
732
+ | AlreadyExists
733
+ | ResourceExhausted
734
+ | NamespaceLabsOpError;
735
+ /** Updates the default image expiration policy for the workspace. The policy applies to newly created images only. */
736
+ export const updateDefaultPolicy: API.OperationMethod<
737
+ UpdateDefaultPolicyRequest,
738
+ UpdateDefaultPolicyResponse,
739
+ UpdateDefaultPolicyError,
740
+ NamespaceLabsOpContext
741
+ > = /*@__PURE__*/ API.make(() => ({
742
+ input: __S(88, __c11, 0) as any as S.Schema<UpdateDefaultPolicyRequest>,
743
+ output: __S(80, __c10, 0) as any as S.Schema<UpdateDefaultPolicyResponse>,
744
+ errors: [
745
+ InvalidArgument,
746
+ FailedPrecondition,
747
+ Unauthenticated,
748
+ PermissionDenied,
749
+ NotFound,
750
+ AlreadyExists,
751
+ ResourceExhausted,
752
+ UnknownNamespaceLabsError,
753
+ ],
754
+ protocol: NamespaceLabsProtocol,
755
+ retry: Retry.Retry,
756
+ telemetry: TELEMETRY,
757
+ span: "UpdateDefaultPolicy",
758
+ }));
759
+
760
+ export type UpdateImageLifetimeError =
761
+ | InvalidArgument
762
+ | FailedPrecondition
763
+ | Unauthenticated
764
+ | PermissionDenied
765
+ | NotFound
766
+ | AlreadyExists
767
+ | ResourceExhausted
768
+ | NamespaceLabsOpError;
769
+ /** Extends or updates the expiration of a single image. ### Errors - If the image does not exist, a `NotFound` status is returned. */
770
+ export const updateImageLifetime: API.OperationMethod<
771
+ UpdateImageLifetimeRequest,
772
+ UpdateImageLifetimeResponse,
773
+ UpdateImageLifetimeError,
774
+ NamespaceLabsOpContext
775
+ > = /*@__PURE__*/ API.make(() => ({
776
+ input: __S(96, __c12, 0) as any as S.Schema<UpdateImageLifetimeRequest>,
777
+ output: __S(97, __c12, 1) as any as S.Schema<UpdateImageLifetimeResponse>,
778
+ errors: [
779
+ InvalidArgument,
780
+ FailedPrecondition,
781
+ Unauthenticated,
782
+ PermissionDenied,
783
+ NotFound,
784
+ AlreadyExists,
785
+ ResourceExhausted,
786
+ UnknownNamespaceLabsError,
787
+ ],
788
+ protocol: NamespaceLabsProtocol,
789
+ retry: Retry.Retry,
790
+ telemetry: TELEMETRY,
791
+ span: "UpdateImageLifetime",
792
+ }));
793
+
794
+ export type UpdateRepositoryPolicyError =
795
+ | InvalidArgument
796
+ | FailedPrecondition
797
+ | Unauthenticated
798
+ | PermissionDenied
799
+ | NotFound
800
+ | AlreadyExists
801
+ | ResourceExhausted
802
+ | NamespaceLabsOpError;
803
+ /** Updates the image expiration policy for a specific repository. Repository-level policies override the default policy. */
804
+ export const updateRepositoryPolicy: API.OperationMethod<
805
+ UpdateRepositoryPolicyRequest,
806
+ UpdateRepositoryPolicyResponse,
807
+ UpdateRepositoryPolicyError,
808
+ NamespaceLabsOpContext
809
+ > = /*@__PURE__*/ API.make(() => ({
810
+ input: __S(104, __c13, 0) as any as S.Schema<UpdateRepositoryPolicyRequest>,
811
+ output: __S(80, __c10, 0) as any as S.Schema<UpdateRepositoryPolicyResponse>,
812
+ errors: [
813
+ InvalidArgument,
814
+ FailedPrecondition,
815
+ Unauthenticated,
816
+ PermissionDenied,
817
+ NotFound,
818
+ AlreadyExists,
819
+ ResourceExhausted,
820
+ UnknownNamespaceLabsError,
821
+ ],
822
+ protocol: NamespaceLabsProtocol,
823
+ retry: Retry.Retry,
824
+ telemetry: TELEMETRY,
825
+ span: "UpdateRepositoryPolicy",
826
+ }));
827
+
828
+ // Schema builders: each runs one schema initializer, on that schema's first use.
829
+ function __c0(j: number): any {
830
+ switch (j) {
831
+ case 0:
832
+ return S.suspend(() =>
833
+ S.Struct({
834
+ after: S.optional(S.String),
835
+ before: S.optional(S.String),
836
+ }),
837
+ ).annotate({ identifier: "TimestampRange" });
838
+ case 1:
839
+ return S.suspend(() =>
840
+ S.Struct({
841
+ paginationCursor: S.optional(S.String),
842
+ maxEntries: S.optional(S.String),
843
+ matchRepository: S.optional(__S(8, __c1, 0)),
844
+ createdAt: S.optional(__S(0, __c0, 0)),
845
+ expiresAt: S.optional(__S(0, __c0, 0)),
846
+ deletionFilter: S.optional(S.String),
847
+ }).pipe(
848
+ T.Http({
849
+ method: "POST",
850
+ uri: "/namespace.cloud.registry.v1beta.ContainerRegistryService/ListImages",
851
+ code: 200,
852
+ }),
853
+ ),
854
+ ).annotate({ identifier: "ListImagesRequest" });
855
+ case 2:
856
+ return S.Array(__S(140, __c17, 4));
857
+ case 3:
858
+ return S.suspend(() =>
859
+ S.Struct({
860
+ images: __S(2, __c0, 2),
861
+ paginationCursor: S.String,
862
+ }),
863
+ ).annotate({ identifier: "ListImagesResponse" });
864
+ }
865
+ }
866
+ function __c1(j: number): any {
867
+ switch (j) {
868
+ case 0:
869
+ return S.suspend(() =>
870
+ S.Struct({
871
+ values: S.optional(__S(128, __c16, 0)),
872
+ op: S.optional(S.String),
873
+ }),
874
+ ).annotate({ identifier: "StringMatcher" });
875
+ }
876
+ }
877
+ function __c2(j: number): any {
878
+ switch (j) {
879
+ case 0:
880
+ return S.suspend(() =>
881
+ S.Struct({
882
+ paginationCursor: S.optional(S.String),
883
+ maxEntries: S.optional(S.String),
884
+ }).pipe(
885
+ T.Http({
886
+ method: "POST",
887
+ uri: "/namespace.cloud.registry.v1beta.ContainerRegistryService/ListRepositories",
888
+ code: 200,
889
+ }),
890
+ ),
891
+ ).annotate({ identifier: "ListRepositoriesRequest" });
892
+ case 1:
893
+ return S.suspend(() =>
894
+ S.Struct({
895
+ name: S.String,
896
+ lastPush: S.optional(S.String),
897
+ }),
898
+ ).annotate({ identifier: "Repository" });
899
+ case 2:
900
+ return S.Array(__S(17, __c2, 1));
901
+ case 3:
902
+ return S.suspend(() =>
903
+ S.Struct({
904
+ repositories: __S(18, __c2, 2),
905
+ paginationCursor: S.String,
906
+ }),
907
+ ).annotate({ identifier: "ListRepositoriesResponse" });
908
+ }
909
+ }
910
+ function __c3(j: number): any {
911
+ switch (j) {
912
+ case 0:
913
+ return S.suspend(() =>
914
+ S.Struct({
915
+ matchRepositories: S.optional(__S(8, __c1, 0)),
916
+ matchVisibility: S.optional(S.String),
917
+ }).pipe(
918
+ T.Http({
919
+ method: "POST",
920
+ uri: "/namespace.cloud.registry.v1beta.ContainerRegistryService/ListSharedImages",
921
+ code: 200,
922
+ }),
923
+ ),
924
+ ).annotate({ identifier: "ListSharedImagesRequest" });
925
+ case 1:
926
+ return S.Array(__S(32, __c4, 0));
927
+ case 2:
928
+ return S.suspend(() =>
929
+ S.Struct({
930
+ sharedImages: __S(25, __c3, 1),
931
+ }),
932
+ ).annotate({ identifier: "ListSharedImagesResponse" });
933
+ }
934
+ }
935
+ function __c4(j: number): any {
936
+ switch (j) {
937
+ case 0:
938
+ return S.suspend(() =>
939
+ S.Struct({
940
+ id: S.String,
941
+ sharedRepository: S.String,
942
+ sharedDigest: S.String,
943
+ expiresAt: S.optional(S.String),
944
+ imageRef: S.String,
945
+ visibility: S.String,
946
+ suffix: S.String,
947
+ }),
948
+ ).annotate({ identifier: "SharedImage" });
949
+ }
950
+ }
951
+ function __c5(j: number): any {
952
+ switch (j) {
953
+ case 0:
954
+ return S.suspend(() =>
955
+ S.Struct({
956
+ paginationCursor: S.optional(S.String),
957
+ maxEntries: S.optional(S.String),
958
+ repository: S.optional(S.String),
959
+ }).pipe(
960
+ T.Http({
961
+ method: "POST",
962
+ uri: "/namespace.cloud.registry.v1beta.ContainerRegistryService/ListTags",
963
+ code: 200,
964
+ }),
965
+ ),
966
+ ).annotate({ identifier: "ListTagsRequest" });
967
+ case 1:
968
+ return S.suspend(() =>
969
+ S.Struct({
970
+ tags: __S(49, __c6, 1),
971
+ paginationCursor: S.String,
972
+ }),
973
+ ).annotate({ identifier: "ListTagsResponse" });
974
+ }
975
+ }
976
+ function __c6(j: number): any {
977
+ switch (j) {
978
+ case 0:
979
+ return S.suspend(() =>
980
+ S.Struct({
981
+ tag: S.String,
982
+ image: S.optional(__S(140, __c17, 4)),
983
+ createdAt: S.optional(S.String),
984
+ }),
985
+ ).annotate({ identifier: "Tag" });
986
+ case 1:
987
+ return S.Array(__S(48, __c6, 0));
988
+ }
989
+ }
990
+ function __c7(j: number): any {
991
+ switch (j) {
992
+ case 0:
993
+ return S.suspend(() =>
994
+ S.Struct({
995
+ paginationCursor: S.optional(S.String),
996
+ maxEntries: S.optional(S.String),
997
+ repository: S.optional(S.String),
998
+ tag: S.optional(S.String),
999
+ }).pipe(
1000
+ T.Http({
1001
+ method: "POST",
1002
+ uri: "/namespace.cloud.registry.v1beta.ContainerRegistryService/ListTagVersions",
1003
+ code: 200,
1004
+ }),
1005
+ ),
1006
+ ).annotate({ identifier: "ListTagVersionsRequest" });
1007
+ case 1:
1008
+ return S.suspend(() =>
1009
+ S.Struct({
1010
+ versions: __S(49, __c6, 1),
1011
+ paginationCursor: S.String,
1012
+ }),
1013
+ ).annotate({ identifier: "ListTagVersionsResponse" });
1014
+ }
1015
+ }
1016
+ function __c8(j: number): any {
1017
+ switch (j) {
1018
+ case 0:
1019
+ return S.suspend(() =>
1020
+ S.Struct({
1021
+ repository: S.optional(S.String),
1022
+ digest: S.optional(S.String),
1023
+ expiresAt: S.optional(S.String),
1024
+ visibility: S.optional(S.String),
1025
+ suffix: S.optional(S.String),
1026
+ }).pipe(
1027
+ T.Http({
1028
+ method: "POST",
1029
+ uri: "/namespace.cloud.registry.v1beta.ContainerRegistryService/ShareImage",
1030
+ code: 200,
1031
+ }),
1032
+ ),
1033
+ ).annotate({ identifier: "ShareImageRequest" });
1034
+ }
1035
+ }
1036
+ function __c9(j: number): any {
1037
+ switch (j) {
1038
+ case 0:
1039
+ return S.suspend(() =>
1040
+ S.Struct({
1041
+ id: S.optional(S.String),
1042
+ }).pipe(
1043
+ T.Http({
1044
+ method: "POST",
1045
+ uri: "/namespace.cloud.registry.v1beta.ContainerRegistryService/UnshareImage",
1046
+ code: 200,
1047
+ }),
1048
+ ),
1049
+ ).annotate({ identifier: "UnshareImageRequest" });
1050
+ }
1051
+ }
1052
+ function __c10(j: number): any {
1053
+ switch (j) {
1054
+ case 0:
1055
+ return S.suspend(() => S.Struct({})).annotate({ identifier: "UnshareImageResponse" });
1056
+ }
1057
+ }
1058
+ function __c11(j: number): any {
1059
+ switch (j) {
1060
+ case 0:
1061
+ return S.suspend(() =>
1062
+ S.Struct({
1063
+ revision: S.optional(S.String),
1064
+ defaultExpiration: S.optional(S.String),
1065
+ expirationEnforcement: S.optional(S.String),
1066
+ }).pipe(
1067
+ T.Http({
1068
+ method: "POST",
1069
+ uri: "/namespace.cloud.registry.v1beta.ContainerRegistryService/UpdateDefaultPolicy",
1070
+ code: 200,
1071
+ }),
1072
+ ),
1073
+ ).annotate({ identifier: "UpdateDefaultPolicyRequest" });
1074
+ }
1075
+ }
1076
+ function __c12(j: number): any {
1077
+ switch (j) {
1078
+ case 0:
1079
+ return S.suspend(() =>
1080
+ S.Struct({
1081
+ repository: S.optional(S.String),
1082
+ digest: S.optional(S.String),
1083
+ extendBy: S.optional(S.String),
1084
+ ensureMinimumRemaining: S.optional(S.String),
1085
+ newExpiry: S.optional(S.String),
1086
+ }).pipe(
1087
+ T.Http({
1088
+ method: "POST",
1089
+ uri: "/namespace.cloud.registry.v1beta.ContainerRegistryService/UpdateImageLifetime",
1090
+ code: 200,
1091
+ }),
1092
+ ),
1093
+ ).annotate({ identifier: "UpdateImageLifetimeRequest" });
1094
+ case 1:
1095
+ return S.suspend(() =>
1096
+ S.Struct({
1097
+ newExpiry: S.optional(S.String),
1098
+ }),
1099
+ ).annotate({ identifier: "UpdateImageLifetimeResponse" });
1100
+ }
1101
+ }
1102
+ function __c13(j: number): any {
1103
+ switch (j) {
1104
+ case 0:
1105
+ return S.suspend(() =>
1106
+ S.Struct({
1107
+ repository: S.optional(S.String),
1108
+ revision: S.optional(S.String),
1109
+ expiration: S.optional(S.String),
1110
+ expirationEnforcement: S.optional(S.String),
1111
+ }).pipe(
1112
+ T.Http({
1113
+ method: "POST",
1114
+ uri: "/namespace.cloud.registry.v1beta.ContainerRegistryService/UpdateRepositoryPolicy",
1115
+ code: 200,
1116
+ }),
1117
+ ),
1118
+ ).annotate({ identifier: "UpdateRepositoryPolicyRequest" });
1119
+ }
1120
+ }
1121
+ function __c14(j: number): any {
1122
+ switch (j) {
1123
+ case 0:
1124
+ return S.suspend(() =>
1125
+ S.Struct({}).pipe(
1126
+ T.Http({
1127
+ method: "POST",
1128
+ uri: "/namespace.cloud.registry.v1beta.ContainerRegistryService/GetDefaultPolicy",
1129
+ code: 200,
1130
+ }),
1131
+ ),
1132
+ ).annotate({ identifier: "GetDefaultPolicyRequest" });
1133
+ case 1:
1134
+ return S.suspend(() =>
1135
+ S.Struct({
1136
+ revision: S.String,
1137
+ defaultExpiration: S.optional(S.String),
1138
+ expirationEnforcement: S.String,
1139
+ }),
1140
+ ).annotate({ identifier: "GetDefaultPolicyResponse" });
1141
+ }
1142
+ }
1143
+ function __c15(j: number): any {
1144
+ switch (j) {
1145
+ case 0:
1146
+ return S.suspend(() =>
1147
+ S.Struct({
1148
+ repository: S.optional(S.String),
1149
+ reference: S.optional(S.String),
1150
+ }).pipe(
1151
+ T.Http({
1152
+ method: "POST",
1153
+ uri: "/namespace.cloud.registry.v1beta.ContainerRegistryService/GetImage",
1154
+ code: 200,
1155
+ }),
1156
+ ),
1157
+ ).annotate({ identifier: "GetImageRequest" });
1158
+ case 1:
1159
+ return S.suspend(() =>
1160
+ S.Struct({
1161
+ image: S.optional(__S(140, __c17, 4)),
1162
+ }),
1163
+ ).annotate({ identifier: "GetImageResponse" });
1164
+ }
1165
+ }
1166
+ function __c16(j: number): any {
1167
+ switch (j) {
1168
+ case 0:
1169
+ return S.Array(S.String);
1170
+ }
1171
+ }
1172
+ function __c17(j: number): any {
1173
+ switch (j) {
1174
+ case 0:
1175
+ return S.Record(S.String, S.String);
1176
+ case 1:
1177
+ return S.suspend(() =>
1178
+ S.Struct({
1179
+ total: S.String,
1180
+ perPlatform: __S(136, __c17, 0),
1181
+ }),
1182
+ ).annotate({ identifier: "ImageSizes" });
1183
+ case 2:
1184
+ return S.suspend(() =>
1185
+ S.Struct({
1186
+ name: S.String,
1187
+ value: S.String,
1188
+ }),
1189
+ ).annotate({ identifier: "Label" });
1190
+ case 3:
1191
+ return S.Array(__S(138, __c17, 2));
1192
+ case 4:
1193
+ return S.suspend(() =>
1194
+ S.Struct({
1195
+ repository: S.String,
1196
+ digest: S.String,
1197
+ createdAt: S.optional(S.String),
1198
+ expiresAt: S.optional(S.String),
1199
+ sizes: S.optional(__S(137, __c17, 1)),
1200
+ deletedAt: S.optional(S.String),
1201
+ labels: __S(139, __c17, 3),
1202
+ tags: __S(128, __c16, 0),
1203
+ }),
1204
+ ).annotate({ identifier: "Image" });
1205
+ }
1206
+ }
1207
+ function __c18(j: number): any {
1208
+ switch (j) {
1209
+ case 0:
1210
+ return S.suspend(() =>
1211
+ S.Struct({
1212
+ repository: S.optional(S.String),
1213
+ }).pipe(
1214
+ T.Http({
1215
+ method: "POST",
1216
+ uri: "/namespace.cloud.registry.v1beta.ContainerRegistryService/GetRepositoryPolicy",
1217
+ code: 200,
1218
+ }),
1219
+ ),
1220
+ ).annotate({ identifier: "GetRepositoryPolicyRequest" });
1221
+ case 1:
1222
+ return S.suspend(() =>
1223
+ S.Struct({
1224
+ revision: S.String,
1225
+ expiration: S.optional(S.String),
1226
+ expirationEnforcement: S.String,
1227
+ }),
1228
+ ).annotate({ identifier: "GetRepositoryPolicyResponse" });
1229
+ }
1230
+ }
1231
+ // Schema table: entry i is schema j of builder f, made on first reach.
1232
+ function __S(i: number, f: (j: number) => unknown, j: number): any {
1233
+ return (__s[i] ??= __L.at(f, j));
1234
+ }