@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.
- package/LICENSE +201 -0
- package/README.md +130 -4
- package/lib/.lazy.json +1 -0
- package/lib/_bundle/lazy.js +4 -0
- package/lib/_bundle/sdk.js +2 -0
- package/lib/_bundle/sdk.js.map +1 -0
- package/lib/credentials.d.ts +73 -0
- package/lib/credentials.d.ts.map +1 -0
- package/lib/credentials.js +1 -0
- package/lib/errors.d.ts +59 -0
- package/lib/errors.d.ts.map +1 -0
- package/lib/errors.js +1 -0
- package/lib/index.d.ts +44 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +6 -0
- package/lib/pagination.d.ts +2 -0
- package/lib/pagination.d.ts.map +1 -0
- package/lib/pagination.js +1 -0
- package/lib/protocol.d.ts +19 -0
- package/lib/protocol.d.ts.map +1 -0
- package/lib/protocol.js +1 -0
- package/lib/retry.d.ts +12 -0
- package/lib/retry.d.ts.map +1 -0
- package/lib/retry.js +1 -0
- package/lib/services/buildkite_jobs.d.ts +129 -0
- package/lib/services/buildkite_jobs.d.ts.map +1 -0
- package/lib/services/buildkite_jobs.js +2 -0
- package/lib/services/buildkite_jobs.js.map +1 -0
- package/lib/services/buildkite_queue.d.ts +186 -0
- package/lib/services/buildkite_queue.d.ts.map +1 -0
- package/lib/services/buildkite_queue.js +2 -0
- package/lib/services/buildkite_queue.js.map +1 -0
- package/lib/services/index.d.ts +3 -0
- package/lib/services/index.d.ts.map +1 -0
- package/lib/services/index.js +2 -0
- package/lib/services.lazy/buildkite_jobs.js +1 -0
- package/lib/services.lazy/buildkite_queue.js +1 -0
- package/lib/services.lazy/index.js +3 -0
- package/lib/traits.d.ts +3 -0
- package/lib/traits.d.ts.map +1 -0
- package/lib/traits.js +1 -0
- package/lib/unstable-services/artifacts.d.ts +268 -0
- package/lib/unstable-services/artifacts.d.ts.map +1 -0
- package/lib/unstable-services/artifacts.js +2 -0
- package/lib/unstable-services/artifacts.js.map +1 -0
- package/lib/unstable-services/audit.d.ts +157 -0
- package/lib/unstable-services/audit.d.ts.map +1 -0
- package/lib/unstable-services/audit.js +2 -0
- package/lib/unstable-services/audit.js.map +1 -0
- package/lib/unstable-services/bazel.d.ts +181 -0
- package/lib/unstable-services/bazel.d.ts.map +1 -0
- package/lib/unstable-services/bazel.js +2 -0
- package/lib/unstable-services/bazel.js.map +1 -0
- package/lib/unstable-services/bazel_cache.d.ts +126 -0
- package/lib/unstable-services/bazel_cache.d.ts.map +1 -0
- package/lib/unstable-services/bazel_cache.js +2 -0
- package/lib/unstable-services/bazel_cache.js.map +1 -0
- package/lib/unstable-services/builder.d.ts +242 -0
- package/lib/unstable-services/builder.d.ts.map +1 -0
- package/lib/unstable-services/builder.js +2 -0
- package/lib/unstable-services/builder.js.map +1 -0
- package/lib/unstable-services/compute.d.ts +1124 -0
- package/lib/unstable-services/compute.d.ts.map +1 -0
- package/lib/unstable-services/compute.js +47 -0
- package/lib/unstable-services/compute.js.map +1 -0
- package/lib/unstable-services/compute_command.d.ts +120 -0
- package/lib/unstable-services/compute_command.d.ts.map +1 -0
- package/lib/unstable-services/compute_command.js +2 -0
- package/lib/unstable-services/compute_command.js.map +1 -0
- package/lib/unstable-services/compute_observability.d.ts +165 -0
- package/lib/unstable-services/compute_observability.d.ts.map +1 -0
- package/lib/unstable-services/compute_observability.js +2 -0
- package/lib/unstable-services/compute_observability.js.map +1 -0
- package/lib/unstable-services/compute_storage.d.ts +379 -0
- package/lib/unstable-services/compute_storage.d.ts.map +1 -0
- package/lib/unstable-services/compute_storage.js +33 -0
- package/lib/unstable-services/compute_storage.js.map +1 -0
- package/lib/unstable-services/compute_usage.d.ts +283 -0
- package/lib/unstable-services/compute_usage.d.ts.map +1 -0
- package/lib/unstable-services/compute_usage.js +2 -0
- package/lib/unstable-services/compute_usage.js.map +1 -0
- package/lib/unstable-services/egress.d.ts +191 -0
- package/lib/unstable-services/egress.d.ts.map +1 -0
- package/lib/unstable-services/egress.js +2 -0
- package/lib/unstable-services/egress.js.map +1 -0
- package/lib/unstable-services/experimental_compute_reservation.d.ts +672 -0
- package/lib/unstable-services/experimental_compute_reservation.d.ts.map +1 -0
- package/lib/unstable-services/experimental_compute_reservation.js +23 -0
- package/lib/unstable-services/experimental_compute_reservation.js.map +1 -0
- package/lib/unstable-services/experimental_remote_results.d.ts +496 -0
- package/lib/unstable-services/experimental_remote_results.d.ts.map +1 -0
- package/lib/unstable-services/experimental_remote_results.js +2 -0
- package/lib/unstable-services/experimental_remote_results.js.map +1 -0
- package/lib/unstable-services/github_image.d.ts +162 -0
- package/lib/unstable-services/github_image.d.ts.map +1 -0
- package/lib/unstable-services/github_image.js +2 -0
- package/lib/unstable-services/github_image.js.map +1 -0
- package/lib/unstable-services/github_jobs.d.ts +183 -0
- package/lib/unstable-services/github_jobs.d.ts.map +1 -0
- package/lib/unstable-services/github_jobs.js +2 -0
- package/lib/unstable-services/github_jobs.js.map +1 -0
- package/lib/unstable-services/github_profile.d.ts +296 -0
- package/lib/unstable-services/github_profile.d.ts.map +1 -0
- package/lib/unstable-services/github_profile.js +2 -0
- package/lib/unstable-services/github_profile.js.map +1 -0
- package/lib/unstable-services/gradle_cache.d.ts +125 -0
- package/lib/unstable-services/gradle_cache.d.ts.map +1 -0
- package/lib/unstable-services/gradle_cache.js +2 -0
- package/lib/unstable-services/gradle_cache.js.map +1 -0
- package/lib/unstable-services/httpcache.d.ts +125 -0
- package/lib/unstable-services/httpcache.d.ts.map +1 -0
- package/lib/unstable-services/httpcache.js +2 -0
- package/lib/unstable-services/httpcache.js.map +1 -0
- package/lib/unstable-services/iam_tenant.d.ts +457 -0
- package/lib/unstable-services/iam_tenant.d.ts.map +1 -0
- package/lib/unstable-services/iam_tenant.js +45 -0
- package/lib/unstable-services/iam_tenant.js.map +1 -0
- package/lib/unstable-services/iam_tenant_membership.d.ts +114 -0
- package/lib/unstable-services/iam_tenant_membership.d.ts.map +1 -0
- package/lib/unstable-services/iam_tenant_membership.js +2 -0
- package/lib/unstable-services/iam_tenant_membership.js.map +1 -0
- package/lib/unstable-services/iam_token.d.ts +257 -0
- package/lib/unstable-services/iam_token.d.ts.map +1 -0
- package/lib/unstable-services/iam_token.js +2 -0
- package/lib/unstable-services/iam_token.js.map +1 -0
- package/lib/unstable-services/image.d.ts +222 -0
- package/lib/unstable-services/image.d.ts.map +1 -0
- package/lib/unstable-services/image.js +2 -0
- package/lib/unstable-services/image.js.map +1 -0
- package/lib/unstable-services/index.d.ts +28 -0
- package/lib/unstable-services/index.d.ts.map +1 -0
- package/lib/unstable-services/index.js +27 -0
- package/lib/unstable-services/private_devbox.d.ts +1180 -0
- package/lib/unstable-services/private_devbox.d.ts.map +1 -0
- package/lib/unstable-services/private_devbox.js +81 -0
- package/lib/unstable-services/private_devbox.js.map +1 -0
- package/lib/unstable-services/private_user_sessions.d.ts +145 -0
- package/lib/unstable-services/private_user_sessions.d.ts.map +1 -0
- package/lib/unstable-services/private_user_sessions.js +2 -0
- package/lib/unstable-services/private_user_sessions.js.map +1 -0
- package/lib/unstable-services/registry.d.ts +373 -0
- package/lib/unstable-services/registry.d.ts.map +1 -0
- package/lib/unstable-services/registry.js +34 -0
- package/lib/unstable-services/registry.js.map +1 -0
- package/lib/unstable-services/testing.d.ts +160 -0
- package/lib/unstable-services/testing.d.ts.map +1 -0
- package/lib/unstable-services/testing.js +2 -0
- package/lib/unstable-services/testing.js.map +1 -0
- package/lib/unstable-services/vault.d.ts +203 -0
- package/lib/unstable-services/vault.d.ts.map +1 -0
- package/lib/unstable-services/vault.js +2 -0
- package/lib/unstable-services/vault.js.map +1 -0
- package/lib/unstable-services.lazy/artifacts.js +1 -0
- package/lib/unstable-services.lazy/audit.js +1 -0
- package/lib/unstable-services.lazy/bazel.js +1 -0
- package/lib/unstable-services.lazy/bazel_cache.js +1 -0
- package/lib/unstable-services.lazy/builder.js +1 -0
- package/lib/unstable-services.lazy/compute.js +4 -0
- package/lib/unstable-services.lazy/compute_command.js +1 -0
- package/lib/unstable-services.lazy/compute_observability.js +1 -0
- package/lib/unstable-services.lazy/compute_storage.js +4 -0
- package/lib/unstable-services.lazy/compute_usage.js +1 -0
- package/lib/unstable-services.lazy/egress.js +1 -0
- package/lib/unstable-services.lazy/experimental_compute_reservation.js +4 -0
- package/lib/unstable-services.lazy/experimental_remote_results.js +1 -0
- package/lib/unstable-services.lazy/github_image.js +1 -0
- package/lib/unstable-services.lazy/github_jobs.js +1 -0
- package/lib/unstable-services.lazy/github_profile.js +1 -0
- package/lib/unstable-services.lazy/gradle_cache.js +1 -0
- package/lib/unstable-services.lazy/httpcache.js +1 -0
- package/lib/unstable-services.lazy/iam_tenant.js +4 -0
- package/lib/unstable-services.lazy/iam_tenant_membership.js +1 -0
- package/lib/unstable-services.lazy/iam_token.js +1 -0
- package/lib/unstable-services.lazy/image.js +1 -0
- package/lib/unstable-services.lazy/index.js +3 -0
- package/lib/unstable-services.lazy/private_devbox.js +4 -0
- package/lib/unstable-services.lazy/private_user_sessions.js +1 -0
- package/lib/unstable-services.lazy/registry.js +4 -0
- package/lib/unstable-services.lazy/testing.js +1 -0
- package/lib/unstable-services.lazy/vault.js +1 -0
- package/package.json +89 -2
- package/src/credentials.ts +208 -0
- package/src/errors.ts +71 -0
- package/src/index.ts +50 -0
- package/src/pagination.ts +1 -0
- package/src/protocol.ts +83 -0
- package/src/retry.ts +28 -0
- package/src/services/buildkite_jobs.ts +230 -0
- package/src/services/buildkite_queue.ts +453 -0
- package/src/services/index.ts +3 -0
- package/src/traits.ts +36 -0
- package/src/unstable-services/artifacts.ts +769 -0
- package/src/unstable-services/audit.ts +323 -0
- package/src/unstable-services/bazel.ts +423 -0
- package/src/unstable-services/bazel_cache.ts +219 -0
- package/src/unstable-services/builder.ts +576 -0
- package/src/unstable-services/compute.ts +2991 -0
- package/src/unstable-services/compute_command.ts +220 -0
- package/src/unstable-services/compute_observability.ts +436 -0
- package/src/unstable-services/compute_storage.ts +1167 -0
- package/src/unstable-services/compute_usage.ts +738 -0
- package/src/unstable-services/egress.ts +516 -0
- package/src/unstable-services/experimental_compute_reservation.ts +1499 -0
- package/src/unstable-services/experimental_remote_results.ts +1165 -0
- package/src/unstable-services/github_image.ts +301 -0
- package/src/unstable-services/github_jobs.ts +389 -0
- package/src/unstable-services/github_profile.ts +729 -0
- package/src/unstable-services/gradle_cache.ts +271 -0
- package/src/unstable-services/httpcache.ts +271 -0
- package/src/unstable-services/iam_tenant.ts +1720 -0
- package/src/unstable-services/iam_tenant_membership.ts +253 -0
- package/src/unstable-services/iam_token.ts +788 -0
- package/src/unstable-services/image.ts +602 -0
- package/src/unstable-services/index.ts +28 -0
- package/src/unstable-services/private_devbox.ts +4256 -0
- package/src/unstable-services/private_user_sessions.ts +410 -0
- package/src/unstable-services/registry.ts +1242 -0
- package/src/unstable-services/testing.ts +394 -0
- package/src/unstable-services/vault.ts +522 -0
|
@@ -0,0 +1,453 @@
|
|
|
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 {
|
|
8
|
+
NamespaceLabsProtocol,
|
|
9
|
+
type NamespaceLabsOpError,
|
|
10
|
+
type NamespaceLabsOpContext,
|
|
11
|
+
} from "../protocol.ts";
|
|
12
|
+
import * as Retry from "../retry.ts";
|
|
13
|
+
import * as T from "../traits.ts";
|
|
14
|
+
// Schema table, filled on first reach (see __S at the end).
|
|
15
|
+
const __s: any[] = [];
|
|
16
|
+
|
|
17
|
+
export type { NamespaceLabsOpError, NamespaceLabsOpContext };
|
|
18
|
+
|
|
19
|
+
/** Span facts shared by every operation (com.distilled.telemetry#service). */
|
|
20
|
+
const TELEMETRY = {
|
|
21
|
+
system: "namespacelabs-api",
|
|
22
|
+
responseHeaders: [
|
|
23
|
+
{ header: "x-request-id", name: "http.response.header.x-request-id", transform: "list" },
|
|
24
|
+
{ header: "request-id", name: "http.response.header.request-id", transform: "list" },
|
|
25
|
+
],
|
|
26
|
+
prefix: "Namespacelabs",
|
|
27
|
+
service: "QueueService",
|
|
28
|
+
propagate: "w3c",
|
|
29
|
+
} as const;
|
|
30
|
+
|
|
31
|
+
export class AlreadyExists
|
|
32
|
+
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
33
|
+
/*@__PURE__*/ S.TaggedError<AlreadyExists>()("AlreadyExists", {
|
|
34
|
+
message: S.String,
|
|
35
|
+
body: S.Unknown,
|
|
36
|
+
headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
|
|
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
|
+
headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
|
|
47
|
+
}).pipe(C.withBadRequestError),
|
|
48
|
+
[{ status: 400, body: { "/code": "failed_precondition" } }],
|
|
49
|
+
) {}
|
|
50
|
+
|
|
51
|
+
export class InvalidArgument
|
|
52
|
+
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
53
|
+
/*@__PURE__*/ S.TaggedError<InvalidArgument>()("InvalidArgument", {
|
|
54
|
+
message: S.String,
|
|
55
|
+
body: S.Unknown,
|
|
56
|
+
headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
|
|
57
|
+
}).pipe(C.withBadRequestError),
|
|
58
|
+
[{ status: 400, body: { "/code": "invalid_argument" } }],
|
|
59
|
+
) {}
|
|
60
|
+
|
|
61
|
+
export class NotFound
|
|
62
|
+
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
63
|
+
/*@__PURE__*/ S.TaggedError<NotFound>()("NotFound", {
|
|
64
|
+
message: S.String,
|
|
65
|
+
body: S.Unknown,
|
|
66
|
+
headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
|
|
67
|
+
}).pipe(C.withBadRequestError),
|
|
68
|
+
[{ status: 404 }],
|
|
69
|
+
) {}
|
|
70
|
+
|
|
71
|
+
export class PermissionDenied
|
|
72
|
+
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
73
|
+
/*@__PURE__*/ S.TaggedError<PermissionDenied>()("PermissionDenied", {
|
|
74
|
+
message: S.String,
|
|
75
|
+
body: S.Unknown,
|
|
76
|
+
headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
|
|
77
|
+
}).pipe(C.withAuthError),
|
|
78
|
+
[{ status: 403 }],
|
|
79
|
+
) {}
|
|
80
|
+
|
|
81
|
+
export class ResourceExhausted
|
|
82
|
+
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
83
|
+
/*@__PURE__*/ S.TaggedError<ResourceExhausted>()("ResourceExhausted", {
|
|
84
|
+
message: S.String,
|
|
85
|
+
body: S.Unknown,
|
|
86
|
+
headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
|
|
87
|
+
retryAfter: /*@__PURE__*/ S.optional(S.Duration),
|
|
88
|
+
}).pipe(C.withThrottlingError),
|
|
89
|
+
[{ status: 429 }],
|
|
90
|
+
) {}
|
|
91
|
+
|
|
92
|
+
export class Unauthenticated
|
|
93
|
+
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
94
|
+
/*@__PURE__*/ S.TaggedError<Unauthenticated>()("Unauthenticated", {
|
|
95
|
+
message: S.String,
|
|
96
|
+
body: S.Unknown,
|
|
97
|
+
headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
|
|
98
|
+
}).pipe(C.withAuthError),
|
|
99
|
+
[{ status: 401 }],
|
|
100
|
+
) {}
|
|
101
|
+
|
|
102
|
+
export interface GetQueueRequest {
|
|
103
|
+
/** Queue ID generated by Namespace. */
|
|
104
|
+
queueId?: string | undefined;
|
|
105
|
+
}
|
|
106
|
+
export interface Organization {
|
|
107
|
+
/** The Buildkite organization slug. */
|
|
108
|
+
orgSlug: string;
|
|
109
|
+
/** The Buildkite organization UUID. */
|
|
110
|
+
orgUuid: string;
|
|
111
|
+
}
|
|
112
|
+
export type PermissionsType = "PERMISSIONS_TYPE_UNKNOWN" | "DEFAULT" | "CUSTOM";
|
|
113
|
+
export type StringList = Array<string>;
|
|
114
|
+
/** Defines a permission grant on a resource. Permissions are used to restrict what a token is allowed to do. See https://namespace.so/docs/security/permissions for a list of available resource types and actions. */
|
|
115
|
+
export interface Permission {
|
|
116
|
+
/** The type of resource this permission applies to, e.g. "instance", "vault/object", "token/revokable". */
|
|
117
|
+
resourceType?: string | undefined;
|
|
118
|
+
/** The specific resource ID, or empty for all resources of this type. */
|
|
119
|
+
resourceId?: string | undefined;
|
|
120
|
+
/** The set of actions allowed on the resource, e.g. "create", "list", "describe". */
|
|
121
|
+
actions?: StringList | undefined;
|
|
122
|
+
}
|
|
123
|
+
export type PermissionList = Array<Permission>;
|
|
124
|
+
export interface Permissions {
|
|
125
|
+
permissionsType?: PermissionsType | (string & {}) | undefined;
|
|
126
|
+
/** Ignored unless permissions_type is CUSTOM. */
|
|
127
|
+
workloadPermissions?: PermissionList | undefined;
|
|
128
|
+
}
|
|
129
|
+
export interface ResolvableValue {
|
|
130
|
+
static?: string | undefined;
|
|
131
|
+
fromSecretId?: string | undefined;
|
|
132
|
+
}
|
|
133
|
+
export interface HttpHeader {
|
|
134
|
+
name?: string | undefined;
|
|
135
|
+
value?: string | undefined;
|
|
136
|
+
valueFrom?: ResolvableValue | undefined;
|
|
137
|
+
}
|
|
138
|
+
export type HttpHeaderList = Array<HttpHeader>;
|
|
139
|
+
export type OpenTelemetrySettingsOTLPProtocol =
|
|
140
|
+
| "OTLP_PROTOCOL_UNSPECIFIED"
|
|
141
|
+
| "OTLP_PROTOCOL_GRPC"
|
|
142
|
+
| "OTLP_PROTOCOL_HTTP_PROTOBUF";
|
|
143
|
+
export type StringMap = { [key: string]: string | undefined };
|
|
144
|
+
export interface OpenTelemetrySettings {
|
|
145
|
+
otlpEndpoint?: string | undefined;
|
|
146
|
+
/** Headers to be passed to the OTel collector. Example: {name: "Authorization", value_from: {from_secret_id: "sec_abcdefg"}} with sec_abcdefg containing the value "Bearer <token>". Many providers also support additional or custom headers. */
|
|
147
|
+
headers?: HttpHeaderList | undefined;
|
|
148
|
+
/** Defaults to GRPC unless HTTP_PROTOBUF is specified. */
|
|
149
|
+
otlpProtocol?: OpenTelemetrySettingsOTLPProtocol | (string & {}) | undefined;
|
|
150
|
+
/** Additional key-value pairs to be used as resource attributes. */
|
|
151
|
+
resourceAttributes?: StringMap | undefined;
|
|
152
|
+
}
|
|
153
|
+
export type CacheVolumeSettingsCacheVolumeCommit =
|
|
154
|
+
| "CACHE_VOLUME_COMMIT_UNSPECIFIED"
|
|
155
|
+
| "CACHE_VOLUME_COMMIT_DEFAULT"
|
|
156
|
+
| "CACHE_VOLUME_COMMIT_NEVER";
|
|
157
|
+
export interface CacheVolumeSettings {
|
|
158
|
+
commit?: CacheVolumeSettingsCacheVolumeCommit | (string & {}) | undefined;
|
|
159
|
+
}
|
|
160
|
+
export interface QueueSettings {
|
|
161
|
+
/** Workload permissions for all instances running jobs for this queue. */
|
|
162
|
+
permissions?: Permissions | undefined;
|
|
163
|
+
/** Tag of the workspace egress policy to apply to jobs running for this queue. Jobs fail if they also set nsc-egress-policy in their agent tags. */
|
|
164
|
+
egressPolicyTag?: string | undefined;
|
|
165
|
+
openTelemetrySettings?: OpenTelemetrySettings | undefined;
|
|
166
|
+
cacheVolumeSettings?: CacheVolumeSettings | undefined;
|
|
167
|
+
}
|
|
168
|
+
export interface BuildkiteQueue {
|
|
169
|
+
/** The managed queue ID generated by Namespace. */
|
|
170
|
+
id: string;
|
|
171
|
+
/** The queue name in Buildkite. */
|
|
172
|
+
queueName: string;
|
|
173
|
+
/** The Buildkite cluster to which this queue belongs. */
|
|
174
|
+
cluster: string;
|
|
175
|
+
/** The Buildkite organization. */
|
|
176
|
+
organization?: Organization | undefined;
|
|
177
|
+
/** Additional queue settings. */
|
|
178
|
+
settings?: QueueSettings | undefined;
|
|
179
|
+
}
|
|
180
|
+
export interface GetQueueResponse {
|
|
181
|
+
/** Namespace-managed Buildkite queue. */
|
|
182
|
+
queue?: BuildkiteQueue | undefined;
|
|
183
|
+
}
|
|
184
|
+
export interface ListQueuesRequest {}
|
|
185
|
+
export type BuildkiteQueueList = Array<BuildkiteQueue>;
|
|
186
|
+
export interface ListQueuesResponse {
|
|
187
|
+
queues: BuildkiteQueueList;
|
|
188
|
+
}
|
|
189
|
+
export interface UpdateQueueRequest {
|
|
190
|
+
/** Required field. */
|
|
191
|
+
queueId?: string | undefined;
|
|
192
|
+
/** Fully replaces the queue settings. Call GetQueue first and include any existing settings that should be retained. If empty, this will reset the queue settings. */
|
|
193
|
+
settings?: QueueSettings | undefined;
|
|
194
|
+
}
|
|
195
|
+
export interface UpdateQueueResponse {
|
|
196
|
+
/** Namespace-managed Buildkite queue. */
|
|
197
|
+
queue?: BuildkiteQueue | undefined;
|
|
198
|
+
}
|
|
199
|
+
export type GetQueueError =
|
|
200
|
+
| InvalidArgument
|
|
201
|
+
| FailedPrecondition
|
|
202
|
+
| Unauthenticated
|
|
203
|
+
| PermissionDenied
|
|
204
|
+
| NotFound
|
|
205
|
+
| AlreadyExists
|
|
206
|
+
| ResourceExhausted
|
|
207
|
+
| NamespaceLabsOpError;
|
|
208
|
+
/** Get queue settings. Authentication: tenant token. */
|
|
209
|
+
export const getQueue: API.OperationMethod<
|
|
210
|
+
GetQueueRequest,
|
|
211
|
+
GetQueueResponse,
|
|
212
|
+
GetQueueError,
|
|
213
|
+
NamespaceLabsOpContext
|
|
214
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
215
|
+
input: __S(0, __c0, 0) as any as S.Schema<GetQueueRequest>,
|
|
216
|
+
output: __S(32, __c2, 0) as any as S.Schema<GetQueueResponse>,
|
|
217
|
+
errors: [
|
|
218
|
+
InvalidArgument,
|
|
219
|
+
FailedPrecondition,
|
|
220
|
+
Unauthenticated,
|
|
221
|
+
PermissionDenied,
|
|
222
|
+
NotFound,
|
|
223
|
+
AlreadyExists,
|
|
224
|
+
ResourceExhausted,
|
|
225
|
+
],
|
|
226
|
+
serviceErrors: NamespaceLabsServiceErrors,
|
|
227
|
+
protocol: NamespaceLabsProtocol,
|
|
228
|
+
retry: Retry.Retry,
|
|
229
|
+
telemetry: TELEMETRY,
|
|
230
|
+
span: "GetQueue",
|
|
231
|
+
}));
|
|
232
|
+
|
|
233
|
+
export type ListQueuesError =
|
|
234
|
+
| InvalidArgument
|
|
235
|
+
| FailedPrecondition
|
|
236
|
+
| Unauthenticated
|
|
237
|
+
| PermissionDenied
|
|
238
|
+
| NotFound
|
|
239
|
+
| AlreadyExists
|
|
240
|
+
| ResourceExhausted
|
|
241
|
+
| NamespaceLabsOpError;
|
|
242
|
+
/** List queues registered for this tenant in Namespace. Authentication: tenant token. */
|
|
243
|
+
export const listQueues: API.OperationMethod<
|
|
244
|
+
ListQueuesRequest,
|
|
245
|
+
ListQueuesResponse,
|
|
246
|
+
ListQueuesError,
|
|
247
|
+
NamespaceLabsOpContext
|
|
248
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
249
|
+
input: __S(48, __c3, 0) as any as S.Schema<ListQueuesRequest>,
|
|
250
|
+
output: __S(50, __c3, 2) as any as S.Schema<ListQueuesResponse>,
|
|
251
|
+
errors: [
|
|
252
|
+
InvalidArgument,
|
|
253
|
+
FailedPrecondition,
|
|
254
|
+
Unauthenticated,
|
|
255
|
+
PermissionDenied,
|
|
256
|
+
NotFound,
|
|
257
|
+
AlreadyExists,
|
|
258
|
+
ResourceExhausted,
|
|
259
|
+
],
|
|
260
|
+
serviceErrors: NamespaceLabsServiceErrors,
|
|
261
|
+
protocol: NamespaceLabsProtocol,
|
|
262
|
+
retry: Retry.Retry,
|
|
263
|
+
telemetry: TELEMETRY,
|
|
264
|
+
span: "ListQueues",
|
|
265
|
+
}));
|
|
266
|
+
|
|
267
|
+
export type UpdateQueueError =
|
|
268
|
+
| InvalidArgument
|
|
269
|
+
| FailedPrecondition
|
|
270
|
+
| Unauthenticated
|
|
271
|
+
| PermissionDenied
|
|
272
|
+
| NotFound
|
|
273
|
+
| AlreadyExists
|
|
274
|
+
| ResourceExhausted
|
|
275
|
+
| NamespaceLabsOpError;
|
|
276
|
+
/** Update queue-wide settings. Authentication: tenant token. */
|
|
277
|
+
export const updateQueue: API.OperationMethod<
|
|
278
|
+
UpdateQueueRequest,
|
|
279
|
+
UpdateQueueResponse,
|
|
280
|
+
UpdateQueueError,
|
|
281
|
+
NamespaceLabsOpContext
|
|
282
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
283
|
+
input: __S(64, __c4, 0) as any as S.Schema<UpdateQueueRequest>,
|
|
284
|
+
output: __S(32, __c2, 0) as any as S.Schema<UpdateQueueResponse>,
|
|
285
|
+
errors: [
|
|
286
|
+
InvalidArgument,
|
|
287
|
+
FailedPrecondition,
|
|
288
|
+
Unauthenticated,
|
|
289
|
+
PermissionDenied,
|
|
290
|
+
NotFound,
|
|
291
|
+
AlreadyExists,
|
|
292
|
+
ResourceExhausted,
|
|
293
|
+
],
|
|
294
|
+
serviceErrors: NamespaceLabsServiceErrors,
|
|
295
|
+
protocol: NamespaceLabsProtocol,
|
|
296
|
+
retry: Retry.Retry,
|
|
297
|
+
telemetry: TELEMETRY,
|
|
298
|
+
span: "UpdateQueue",
|
|
299
|
+
}));
|
|
300
|
+
|
|
301
|
+
// Schema builders: each runs one schema initializer, on that schema's first use.
|
|
302
|
+
function __c0(j: number): any {
|
|
303
|
+
switch (j) {
|
|
304
|
+
case 0:
|
|
305
|
+
return S.suspend(() =>
|
|
306
|
+
S.Struct({
|
|
307
|
+
queueId: S.optional(S.String),
|
|
308
|
+
}).pipe(
|
|
309
|
+
T.Http({
|
|
310
|
+
method: "POST",
|
|
311
|
+
uri: "/namespace.cloud.buildkite.QueueService/GetQueue",
|
|
312
|
+
code: 200,
|
|
313
|
+
}),
|
|
314
|
+
),
|
|
315
|
+
).annotate({ identifier: "GetQueueRequest" });
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
function __c1(j: number): any {
|
|
319
|
+
switch (j) {
|
|
320
|
+
case 0:
|
|
321
|
+
return S.suspend(() =>
|
|
322
|
+
S.Struct({
|
|
323
|
+
orgSlug: S.String,
|
|
324
|
+
orgUuid: S.String,
|
|
325
|
+
}),
|
|
326
|
+
).annotate({ identifier: "Organization" });
|
|
327
|
+
case 1:
|
|
328
|
+
return S.Array(S.String);
|
|
329
|
+
case 2:
|
|
330
|
+
return S.suspend(() =>
|
|
331
|
+
S.Struct({
|
|
332
|
+
resourceType: S.optional(S.String),
|
|
333
|
+
resourceId: S.optional(S.String),
|
|
334
|
+
actions: S.optional(__S(17, __c1, 1)),
|
|
335
|
+
}),
|
|
336
|
+
).annotate({ identifier: "Permission" });
|
|
337
|
+
case 3:
|
|
338
|
+
return S.Array(__S(18, __c1, 2));
|
|
339
|
+
case 4:
|
|
340
|
+
return S.suspend(() =>
|
|
341
|
+
S.Struct({
|
|
342
|
+
permissionsType: S.optional(S.String),
|
|
343
|
+
workloadPermissions: S.optional(__S(19, __c1, 3)),
|
|
344
|
+
}),
|
|
345
|
+
).annotate({ identifier: "Permissions" });
|
|
346
|
+
case 5:
|
|
347
|
+
return S.suspend(() =>
|
|
348
|
+
S.Struct({
|
|
349
|
+
static: S.optional(S.String),
|
|
350
|
+
fromSecretId: S.optional(S.String),
|
|
351
|
+
}),
|
|
352
|
+
).annotate({ identifier: "ResolvableValue" });
|
|
353
|
+
case 6:
|
|
354
|
+
return S.suspend(() =>
|
|
355
|
+
S.Struct({
|
|
356
|
+
name: S.optional(S.String),
|
|
357
|
+
value: S.optional(S.String),
|
|
358
|
+
valueFrom: S.optional(__S(21, __c1, 5)),
|
|
359
|
+
}),
|
|
360
|
+
).annotate({ identifier: "HttpHeader" });
|
|
361
|
+
case 7:
|
|
362
|
+
return S.Array(__S(22, __c1, 6));
|
|
363
|
+
case 8:
|
|
364
|
+
return S.Record(S.String, S.String);
|
|
365
|
+
case 9:
|
|
366
|
+
return S.suspend(() =>
|
|
367
|
+
S.Struct({
|
|
368
|
+
otlpEndpoint: S.optional(S.String),
|
|
369
|
+
headers: S.optional(__S(23, __c1, 7)),
|
|
370
|
+
otlpProtocol: S.optional(S.String),
|
|
371
|
+
resourceAttributes: S.optional(__S(24, __c1, 8)),
|
|
372
|
+
}),
|
|
373
|
+
).annotate({ identifier: "OpenTelemetrySettings" });
|
|
374
|
+
case 10:
|
|
375
|
+
return S.suspend(() =>
|
|
376
|
+
S.Struct({
|
|
377
|
+
commit: S.optional(S.String),
|
|
378
|
+
}),
|
|
379
|
+
).annotate({ identifier: "CacheVolumeSettings" });
|
|
380
|
+
case 11:
|
|
381
|
+
return S.suspend(() =>
|
|
382
|
+
S.Struct({
|
|
383
|
+
permissions: S.optional(__S(20, __c1, 4)),
|
|
384
|
+
egressPolicyTag: S.optional(S.String),
|
|
385
|
+
openTelemetrySettings: S.optional(__S(25, __c1, 9)),
|
|
386
|
+
cacheVolumeSettings: S.optional(__S(26, __c1, 10)),
|
|
387
|
+
}),
|
|
388
|
+
).annotate({ identifier: "QueueSettings" });
|
|
389
|
+
case 12:
|
|
390
|
+
return S.suspend(() =>
|
|
391
|
+
S.Struct({
|
|
392
|
+
id: S.String,
|
|
393
|
+
queueName: S.String,
|
|
394
|
+
cluster: S.String,
|
|
395
|
+
organization: S.optional(__S(16, __c1, 0)),
|
|
396
|
+
settings: S.optional(__S(27, __c1, 11)),
|
|
397
|
+
}),
|
|
398
|
+
).annotate({ identifier: "BuildkiteQueue" });
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
function __c2(j: number): any {
|
|
402
|
+
switch (j) {
|
|
403
|
+
case 0:
|
|
404
|
+
return S.suspend(() =>
|
|
405
|
+
S.Struct({
|
|
406
|
+
queue: S.optional(__S(28, __c1, 12)),
|
|
407
|
+
}),
|
|
408
|
+
).annotate({ identifier: "GetQueueResponse" });
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
function __c3(j: number): any {
|
|
412
|
+
switch (j) {
|
|
413
|
+
case 0:
|
|
414
|
+
return S.suspend(() =>
|
|
415
|
+
S.Struct({}).pipe(
|
|
416
|
+
T.Http({
|
|
417
|
+
method: "POST",
|
|
418
|
+
uri: "/namespace.cloud.buildkite.QueueService/ListQueues",
|
|
419
|
+
code: 200,
|
|
420
|
+
}),
|
|
421
|
+
),
|
|
422
|
+
).annotate({ identifier: "ListQueuesRequest" });
|
|
423
|
+
case 1:
|
|
424
|
+
return S.Array(__S(28, __c1, 12));
|
|
425
|
+
case 2:
|
|
426
|
+
return S.suspend(() =>
|
|
427
|
+
S.Struct({
|
|
428
|
+
queues: __S(49, __c3, 1),
|
|
429
|
+
}),
|
|
430
|
+
).annotate({ identifier: "ListQueuesResponse" });
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
function __c4(j: number): any {
|
|
434
|
+
switch (j) {
|
|
435
|
+
case 0:
|
|
436
|
+
return S.suspend(() =>
|
|
437
|
+
S.Struct({
|
|
438
|
+
queueId: S.optional(S.String),
|
|
439
|
+
settings: S.optional(__S(27, __c1, 11)),
|
|
440
|
+
}).pipe(
|
|
441
|
+
T.Http({
|
|
442
|
+
method: "POST",
|
|
443
|
+
uri: "/namespace.cloud.buildkite.QueueService/UpdateQueue",
|
|
444
|
+
code: 200,
|
|
445
|
+
}),
|
|
446
|
+
),
|
|
447
|
+
).annotate({ identifier: "UpdateQueueRequest" });
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
// Schema table: entry i is schema j of builder f, made on first reach.
|
|
451
|
+
function __S(i: number, f: (j: number) => unknown, j: number): any {
|
|
452
|
+
return (__s[i] ??= __L.at(f, j));
|
|
453
|
+
}
|
package/src/traits.ts
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export {
|
|
2
|
+
Body,
|
|
3
|
+
Header,
|
|
4
|
+
Query,
|
|
5
|
+
Label,
|
|
6
|
+
Http,
|
|
7
|
+
ResponseCode,
|
|
8
|
+
HttpBody,
|
|
9
|
+
FormDataFile,
|
|
10
|
+
KeyDictionary,
|
|
11
|
+
UnionCases,
|
|
12
|
+
applyErrorMatchers,
|
|
13
|
+
getErrorMatchers,
|
|
14
|
+
type HttpTrait,
|
|
15
|
+
type ErrorMatcher,
|
|
16
|
+
bodySymbol,
|
|
17
|
+
headerSymbol,
|
|
18
|
+
querySymbol,
|
|
19
|
+
labelSymbol,
|
|
20
|
+
httpSymbol,
|
|
21
|
+
responseCodeSymbol,
|
|
22
|
+
httpBodySymbol,
|
|
23
|
+
formDataFileSymbol,
|
|
24
|
+
keyDictionarySymbol,
|
|
25
|
+
unionCasesSymbol,
|
|
26
|
+
errorMatchersSymbol,
|
|
27
|
+
} from "@distilled.cloud/core/trait";
|
|
28
|
+
|
|
29
|
+
export {
|
|
30
|
+
SensitiveValue,
|
|
31
|
+
RawResponse,
|
|
32
|
+
RawResponseRoot,
|
|
33
|
+
sensitiveValueSymbol,
|
|
34
|
+
rawResponseSymbol,
|
|
35
|
+
rawResponseRootSymbol,
|
|
36
|
+
} from "@distilled.cloud/core/protocol-rest";
|