@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,522 @@
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 type * as Redacted from "effect/Redacted";
7
+ import { NamespaceLabsServiceErrors } from "../errors.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: "VaultService",
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
+ /** Labels are key/value pairs attached to entities such as tenants. */
104
+ export interface Label {
105
+ /** A name is an string up to 63 bytes that matches the regular expression `^[a-z]([a-z0-9-.]*[a-z0-9])?$`. */
106
+ name?: string | undefined;
107
+ /** Label values are arbitrary values up to 255 bytes. */
108
+ value?: string | undefined;
109
+ }
110
+ export type LabelList = Array<Label>;
111
+ export interface CreateObjectRequest {
112
+ /** A description of the object. */
113
+ description?: string | undefined;
114
+ /** The initial value to be stored, required. */
115
+ value?: string | Redacted.Redacted<string> | undefined;
116
+ /** If set to true, the secret value will be returned in future DescribeObject calls. This cannot be changed after creation. */
117
+ revealable?: boolean | undefined;
118
+ /** You can specify additional context to attach to an object. Labels are immutable and are shared across all versions. Objects can be listed based on label constraints. Label names are limited to 63 bytes and values to 255 bytes. The combined size of all label names and values cannot exceed 4 KiB. */
119
+ labels?: LabelList | undefined;
120
+ }
121
+ export interface CreateObjectResponse {
122
+ /** The unique identifier of this secret object. */
123
+ objectId: string;
124
+ /** A human-readable description of the object. */
125
+ description: string;
126
+ /** An opaque version identifier for this object. Changes with each update. Can be used with `if_version_matches` for optimistic concurrency control. */
127
+ version: string;
128
+ /** Timestamp of when this object was created (in UTC). */
129
+ createdAt?: string | undefined;
130
+ /** Timestamp of when this object was deleted (in UTC). Not set if the object is still active. */
131
+ deletedAt?: string | undefined;
132
+ /** Labels attached to this object. Labels are immutable and shared across all versions. */
133
+ labels: LabelList;
134
+ }
135
+ export interface DeleteObjectRequest {
136
+ /** The ID of the object to delete. */
137
+ objectId?: string | undefined;
138
+ /** If set, fail the request if the object does not currently match the specified version (as included in VaultObjectMetadata). */
139
+ ifVersionMatches?: string | undefined;
140
+ }
141
+ export interface DeleteObjectResponse {}
142
+ export interface DescribeObjectRequest {
143
+ /** Fetch the object version that matches the specified id. */
144
+ objectId?: string | undefined;
145
+ }
146
+ export interface VaultObjectMetadata {
147
+ /** The unique identifier of this secret object. */
148
+ objectId: string;
149
+ /** A human-readable description of the object. */
150
+ description: string;
151
+ /** An opaque version identifier for this object. Changes with each update. Can be used with `if_version_matches` for optimistic concurrency control. */
152
+ version: string;
153
+ /** Timestamp of when this object was created (in UTC). */
154
+ createdAt?: string | undefined;
155
+ /** Timestamp of when this object was deleted (in UTC). Not set if the object is still active. */
156
+ deletedAt?: string | undefined;
157
+ /** Labels attached to this object. Labels are immutable and shared across all versions. */
158
+ labels: LabelList;
159
+ }
160
+ export type VaultObjectMetadataList = Array<VaultObjectMetadata>;
161
+ export interface DescribeObjectResponse {
162
+ /** The metadata of the requested object. */
163
+ metadata?: VaultObjectMetadata | undefined;
164
+ /** The decrypted value of the secret. Only set if the object was created with `revealable` set to true. */
165
+ value: string | Redacted.Redacted<string>;
166
+ /** A few most recent previous versions of the object, for audit purposes. */
167
+ previous: VaultObjectMetadataList;
168
+ }
169
+ export type LabelFilterEntryLabelFilterOp = "UNKNOWN" | "EQUAL" | "NOT_EQUAL" | "EXIST";
170
+ export interface LabelFilterEntry {
171
+ name?: string | undefined;
172
+ value?: string | undefined;
173
+ op?: LabelFilterEntryLabelFilterOp | (string & {}) | undefined;
174
+ }
175
+ export type LabelFilterEntryList = Array<LabelFilterEntry>;
176
+ export interface ListObjectsRequest {
177
+ /** If not specified, returns all objects. */
178
+ labelFilter?: LabelFilterEntryList | undefined;
179
+ }
180
+ export interface ListObjectsResponse {
181
+ /** Returns the most recent version of each object that has not been deleted. */
182
+ objects: VaultObjectMetadataList;
183
+ }
184
+ export interface UpdateObjectRequest {
185
+ /** The ID of the object being updated. */
186
+ objectId?: string | undefined;
187
+ /** The value to be added to a new version. */
188
+ newValue?: string | Redacted.Redacted<string> | undefined;
189
+ /** If set, fail the request if the object does not currently match the specified version (as included in VaultObjectMetadata). */
190
+ ifVersionMatches?: string | undefined;
191
+ }
192
+ export interface UpdateObjectResponse {
193
+ /** The unique identifier of this secret object. */
194
+ objectId: string;
195
+ /** A human-readable description of the object. */
196
+ description: string;
197
+ /** An opaque version identifier for this object. Changes with each update. Can be used with `if_version_matches` for optimistic concurrency control. */
198
+ version: string;
199
+ /** Timestamp of when this object was created (in UTC). */
200
+ createdAt?: string | undefined;
201
+ /** Timestamp of when this object was deleted (in UTC). Not set if the object is still active. */
202
+ deletedAt?: string | undefined;
203
+ /** Labels attached to this object. Labels are immutable and shared across all versions. */
204
+ labels: LabelList;
205
+ }
206
+ export type CreateObjectError =
207
+ | InvalidArgument
208
+ | FailedPrecondition
209
+ | Unauthenticated
210
+ | PermissionDenied
211
+ | NotFound
212
+ | AlreadyExists
213
+ | ResourceExhausted
214
+ | NamespaceLabsOpError;
215
+ /** Creates a new secret object in the workspace vault. ### Errors - If one of the properties that are passed in is invalid, an `InvalidArgument` status is returned. */
216
+ export const createObject: API.OperationMethod<
217
+ CreateObjectRequest,
218
+ CreateObjectResponse,
219
+ CreateObjectError,
220
+ NamespaceLabsOpContext
221
+ > = /*@__PURE__*/ API.make(() => ({
222
+ input: __S(8, __c2, 0) as any as S.Schema<CreateObjectRequest>,
223
+ output: __S(14, __c3, 2) as any as S.Schema<CreateObjectResponse>,
224
+ errors: [
225
+ InvalidArgument,
226
+ FailedPrecondition,
227
+ Unauthenticated,
228
+ PermissionDenied,
229
+ NotFound,
230
+ AlreadyExists,
231
+ ResourceExhausted,
232
+ ],
233
+ serviceErrors: NamespaceLabsServiceErrors,
234
+ protocol: NamespaceLabsProtocol,
235
+ retry: Retry.Retry,
236
+ telemetry: TELEMETRY,
237
+ span: "CreateObject",
238
+ }));
239
+
240
+ export type DeleteObjectError =
241
+ | InvalidArgument
242
+ | FailedPrecondition
243
+ | Unauthenticated
244
+ | PermissionDenied
245
+ | NotFound
246
+ | AlreadyExists
247
+ | ResourceExhausted
248
+ | NamespaceLabsOpError;
249
+ /** Permanently deletes a secret object. ### Errors - If the object does not exist, a `NotFound` status is returned. - If `if_version_matches` is set and the current version does not match, a `FailedPrecondition` status is returned. */
250
+ export const deleteObject: API.OperationMethod<
251
+ DeleteObjectRequest,
252
+ DeleteObjectResponse,
253
+ DeleteObjectError,
254
+ NamespaceLabsOpContext
255
+ > = /*@__PURE__*/ API.make(() => ({
256
+ input: __S(16, __c4, 0) as any as S.Schema<DeleteObjectRequest>,
257
+ output: __S(17, __c4, 1) as any as S.Schema<DeleteObjectResponse>,
258
+ errors: [
259
+ InvalidArgument,
260
+ FailedPrecondition,
261
+ Unauthenticated,
262
+ PermissionDenied,
263
+ NotFound,
264
+ AlreadyExists,
265
+ ResourceExhausted,
266
+ ],
267
+ serviceErrors: NamespaceLabsServiceErrors,
268
+ protocol: NamespaceLabsProtocol,
269
+ retry: Retry.Retry,
270
+ telemetry: TELEMETRY,
271
+ span: "DeleteObject",
272
+ }));
273
+
274
+ export type DescribeObjectError =
275
+ | InvalidArgument
276
+ | FailedPrecondition
277
+ | Unauthenticated
278
+ | PermissionDenied
279
+ | NotFound
280
+ | AlreadyExists
281
+ | ResourceExhausted
282
+ | NamespaceLabsOpError;
283
+ /** Retrieves the metadata (and optionally the value) of a secret object. The value is only returned if the object was created with `revealable` set to true. ### Errors - If the object does not exist, a `NotFound` status is returned. */
284
+ export const describeObject: API.OperationMethod<
285
+ DescribeObjectRequest,
286
+ DescribeObjectResponse,
287
+ DescribeObjectError,
288
+ NamespaceLabsOpContext
289
+ > = /*@__PURE__*/ API.make(() => ({
290
+ input: __S(20, __c5, 0) as any as S.Schema<DescribeObjectRequest>,
291
+ output: __S(21, __c5, 1) as any as S.Schema<DescribeObjectResponse>,
292
+ errors: [
293
+ InvalidArgument,
294
+ FailedPrecondition,
295
+ Unauthenticated,
296
+ PermissionDenied,
297
+ NotFound,
298
+ AlreadyExists,
299
+ ResourceExhausted,
300
+ ],
301
+ serviceErrors: NamespaceLabsServiceErrors,
302
+ protocol: NamespaceLabsProtocol,
303
+ retry: Retry.Retry,
304
+ telemetry: TELEMETRY,
305
+ span: "DescribeObject",
306
+ }));
307
+
308
+ export type ListObjectsError =
309
+ | InvalidArgument
310
+ | FailedPrecondition
311
+ | Unauthenticated
312
+ | PermissionDenied
313
+ | NotFound
314
+ | AlreadyExists
315
+ | ResourceExhausted
316
+ | NamespaceLabsOpError;
317
+ /** Returns the most recent version of each non-deleted secret object in the workspace vault. */
318
+ export const listObjects: API.OperationMethod<
319
+ ListObjectsRequest,
320
+ ListObjectsResponse,
321
+ ListObjectsError,
322
+ NamespaceLabsOpContext
323
+ > = /*@__PURE__*/ API.make(() => ({
324
+ input: __S(2, __c0, 2) as any as S.Schema<ListObjectsRequest>,
325
+ output: __S(3, __c0, 3) as any as S.Schema<ListObjectsResponse>,
326
+ errors: [
327
+ InvalidArgument,
328
+ FailedPrecondition,
329
+ Unauthenticated,
330
+ PermissionDenied,
331
+ NotFound,
332
+ AlreadyExists,
333
+ ResourceExhausted,
334
+ ],
335
+ serviceErrors: NamespaceLabsServiceErrors,
336
+ protocol: NamespaceLabsProtocol,
337
+ retry: Retry.Retry,
338
+ telemetry: TELEMETRY,
339
+ span: "ListObjects",
340
+ }));
341
+
342
+ export type UpdateObjectError =
343
+ | InvalidArgument
344
+ | FailedPrecondition
345
+ | Unauthenticated
346
+ | PermissionDenied
347
+ | NotFound
348
+ | AlreadyExists
349
+ | ResourceExhausted
350
+ | NamespaceLabsOpError;
351
+ /** Adds a new version to an existing secret object. ### Errors - If the object does not exist, a `NotFound` status is returned. - If `if_version_matches` is set and the current version does not match, a `FailedPrecondition` status is returned. */
352
+ export const updateObject: API.OperationMethod<
353
+ UpdateObjectRequest,
354
+ UpdateObjectResponse,
355
+ UpdateObjectError,
356
+ NamespaceLabsOpContext
357
+ > = /*@__PURE__*/ API.make(() => ({
358
+ input: __S(4, __c1, 0) as any as S.Schema<UpdateObjectRequest>,
359
+ output: __S(14, __c3, 2) as any as S.Schema<UpdateObjectResponse>,
360
+ errors: [
361
+ InvalidArgument,
362
+ FailedPrecondition,
363
+ Unauthenticated,
364
+ PermissionDenied,
365
+ NotFound,
366
+ AlreadyExists,
367
+ ResourceExhausted,
368
+ ],
369
+ serviceErrors: NamespaceLabsServiceErrors,
370
+ protocol: NamespaceLabsProtocol,
371
+ retry: Retry.Retry,
372
+ telemetry: TELEMETRY,
373
+ span: "UpdateObject",
374
+ }));
375
+
376
+ // Schema builders: each runs one schema initializer, on that schema's first use.
377
+ function __c0(j: number): any {
378
+ switch (j) {
379
+ case 0:
380
+ return S.suspend(() =>
381
+ S.Struct({
382
+ name: S.optional(S.String),
383
+ value: S.optional(S.String),
384
+ op: S.optional(S.String),
385
+ }),
386
+ ).annotate({ identifier: "LabelFilterEntry" });
387
+ case 1:
388
+ return S.Array(__S(0, __c0, 0));
389
+ case 2:
390
+ return S.suspend(() =>
391
+ S.Struct({
392
+ labelFilter: S.optional(__S(1, __c0, 1)),
393
+ }).pipe(
394
+ T.Http({
395
+ method: "POST",
396
+ uri: "/namespace.cloud.vault.v1beta.VaultService/ListObjects",
397
+ code: 200,
398
+ }),
399
+ ),
400
+ ).annotate({ identifier: "ListObjectsRequest" });
401
+ case 3:
402
+ return S.suspend(() =>
403
+ S.Struct({
404
+ objects: __S(24, __c6, 0),
405
+ }),
406
+ ).annotate({ identifier: "ListObjectsResponse" });
407
+ }
408
+ }
409
+ function __c1(j: number): any {
410
+ switch (j) {
411
+ case 0:
412
+ return S.suspend(() =>
413
+ S.Struct({
414
+ objectId: S.optional(S.String),
415
+ newValue: S.optional(S.String.pipe(T.SensitiveValue({}))),
416
+ ifVersionMatches: S.optional(S.String),
417
+ }).pipe(
418
+ T.Http({
419
+ method: "POST",
420
+ uri: "/namespace.cloud.vault.v1beta.VaultService/UpdateObject",
421
+ code: 200,
422
+ }),
423
+ ),
424
+ ).annotate({ identifier: "UpdateObjectRequest" });
425
+ }
426
+ }
427
+ function __c2(j: number): any {
428
+ switch (j) {
429
+ case 0:
430
+ return S.suspend(() =>
431
+ S.Struct({
432
+ description: S.optional(S.String),
433
+ value: S.optional(S.String.pipe(T.SensitiveValue({}))),
434
+ revealable: S.optional(S.Boolean),
435
+ labels: S.optional(__S(13, __c3, 1)),
436
+ }).pipe(
437
+ T.Http({
438
+ method: "POST",
439
+ uri: "/namespace.cloud.vault.v1beta.VaultService/CreateObject",
440
+ code: 200,
441
+ }),
442
+ ),
443
+ ).annotate({ identifier: "CreateObjectRequest" });
444
+ }
445
+ }
446
+ function __c3(j: number): any {
447
+ switch (j) {
448
+ case 0:
449
+ return S.suspend(() =>
450
+ S.Struct({
451
+ name: S.optional(S.String),
452
+ value: S.optional(S.String),
453
+ }),
454
+ ).annotate({ identifier: "Label" });
455
+ case 1:
456
+ return S.Array(__S(12, __c3, 0));
457
+ case 2:
458
+ return S.suspend(() =>
459
+ S.Struct({
460
+ objectId: S.String,
461
+ description: S.String,
462
+ version: S.String,
463
+ createdAt: S.optional(S.String),
464
+ deletedAt: S.optional(S.String),
465
+ labels: __S(13, __c3, 1),
466
+ }),
467
+ ).annotate({ identifier: "CreateObjectResponse" });
468
+ }
469
+ }
470
+ function __c4(j: number): any {
471
+ switch (j) {
472
+ case 0:
473
+ return S.suspend(() =>
474
+ S.Struct({
475
+ objectId: S.optional(S.String),
476
+ ifVersionMatches: S.optional(S.String),
477
+ }).pipe(
478
+ T.Http({
479
+ method: "POST",
480
+ uri: "/namespace.cloud.vault.v1beta.VaultService/DeleteObject",
481
+ code: 200,
482
+ }),
483
+ ),
484
+ ).annotate({ identifier: "DeleteObjectRequest" });
485
+ case 1:
486
+ return S.suspend(() => S.Struct({})).annotate({ identifier: "DeleteObjectResponse" });
487
+ }
488
+ }
489
+ function __c5(j: number): any {
490
+ switch (j) {
491
+ case 0:
492
+ return S.suspend(() =>
493
+ S.Struct({
494
+ objectId: S.optional(S.String),
495
+ }).pipe(
496
+ T.Http({
497
+ method: "POST",
498
+ uri: "/namespace.cloud.vault.v1beta.VaultService/DescribeObject",
499
+ code: 200,
500
+ }),
501
+ ),
502
+ ).annotate({ identifier: "DescribeObjectRequest" });
503
+ case 1:
504
+ return S.suspend(() =>
505
+ S.Struct({
506
+ metadata: S.optional(__S(14, __c3, 2)),
507
+ value: S.String.pipe(T.SensitiveValue({})),
508
+ previous: __S(24, __c6, 0),
509
+ }),
510
+ ).annotate({ identifier: "DescribeObjectResponse" });
511
+ }
512
+ }
513
+ function __c6(j: number): any {
514
+ switch (j) {
515
+ case 0:
516
+ return S.Array(__S(14, __c3, 2));
517
+ }
518
+ }
519
+ // Schema table: entry i is schema j of builder f, made on first reach.
520
+ function __S(i: number, f: (j: number) => unknown, j: number): any {
521
+ return (__s[i] ??= __L.at(f, j));
522
+ }