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