@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,516 @@
|
|
|
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: "EgressPolicyService",
|
|
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 type EgressPolicySpecMode = "MODE_UNKNOWN" | "DISABLED" | "ALLOW_ALL" | "ADVISORY" | "BLOCK";
|
|
103
|
+
export type EgressPolicySpecRuleRuleOp = "RULE_OP_UNKNOWN" | "ALLOW" | "PROXY" | "INJECT";
|
|
104
|
+
export type StringList = Array<string>;
|
|
105
|
+
export interface EgressPolicySpecMatcher {
|
|
106
|
+
matchDomains?: StringList | undefined;
|
|
107
|
+
}
|
|
108
|
+
export interface EgressPolicySpecAllowOpts {}
|
|
109
|
+
export interface EgressPolicySpecProxyOpts {
|
|
110
|
+
viaDomain?: string | undefined;
|
|
111
|
+
}
|
|
112
|
+
export interface ResolvableValue {
|
|
113
|
+
static?: string | undefined;
|
|
114
|
+
fromSecretId?: string | undefined;
|
|
115
|
+
}
|
|
116
|
+
export interface HttpHeader {
|
|
117
|
+
name?: string | undefined;
|
|
118
|
+
value?: string | undefined;
|
|
119
|
+
valueFrom?: ResolvableValue | undefined;
|
|
120
|
+
}
|
|
121
|
+
export type HttpHeaderList = Array<HttpHeader>;
|
|
122
|
+
export interface EgressPolicySpecInjectOptsFromEndpoint {
|
|
123
|
+
url?: string | undefined;
|
|
124
|
+
headers?: HttpHeaderList | undefined;
|
|
125
|
+
}
|
|
126
|
+
export type EgressPolicySpecInjectOptsResolutionPolicy =
|
|
127
|
+
| "RESOLUTION_POLICY_UNKNOWN"
|
|
128
|
+
| "RESOLUTION_POLICY_ONCE"
|
|
129
|
+
| "RESOLUTION_POLICY_WHEN_STALE";
|
|
130
|
+
export interface EgressPolicySpecInjectOpts {
|
|
131
|
+
headerName?: string | undefined;
|
|
132
|
+
/** Exactly one value source must be set. */
|
|
133
|
+
fromSecretId?: string | undefined;
|
|
134
|
+
/** Plaintext value. */
|
|
135
|
+
value?: string | undefined;
|
|
136
|
+
/** Fetches the value to inject from an HTTP endpoint using GET. */
|
|
137
|
+
fromEndpoint?: EgressPolicySpecInjectOptsFromEndpoint | undefined;
|
|
138
|
+
resolutionPolicy?: EgressPolicySpecInjectOptsResolutionPolicy | (string & {}) | undefined;
|
|
139
|
+
}
|
|
140
|
+
export interface EgressPolicySpecRule {
|
|
141
|
+
op?: EgressPolicySpecRuleRuleOp | (string & {}) | undefined;
|
|
142
|
+
matcher?: EgressPolicySpecMatcher | undefined;
|
|
143
|
+
allow?: EgressPolicySpecAllowOpts | undefined;
|
|
144
|
+
proxy?: EgressPolicySpecProxyOpts | undefined;
|
|
145
|
+
inject?: EgressPolicySpecInjectOpts | undefined;
|
|
146
|
+
}
|
|
147
|
+
export type EgressPolicySpecRuleList = Array<EgressPolicySpecRule>;
|
|
148
|
+
export interface EgressPolicySpec {
|
|
149
|
+
mode?: EgressPolicySpecMode | (string & {}) | undefined;
|
|
150
|
+
/** Enables HTTP and HTTPS interception for PROXY and INJECT rules. */
|
|
151
|
+
deepPacketInspection?: boolean | undefined;
|
|
152
|
+
/** Rules applied in order to outbound connections. */
|
|
153
|
+
rules?: EgressPolicySpecRuleList | undefined;
|
|
154
|
+
/** Tags of Namespace-managed egress rulesets appended to rules. */
|
|
155
|
+
additionalRulesets?: StringList | undefined;
|
|
156
|
+
/** Deprecated. Only supported in inline egress policies during instance creation. Use `ALLOW` rules instead. */
|
|
157
|
+
allowedEgressDomains?: StringList | undefined;
|
|
158
|
+
}
|
|
159
|
+
export interface EgressPolicy {
|
|
160
|
+
/** Workspace-unique tag used to reference this policy from workloads. */
|
|
161
|
+
tag?: string | undefined;
|
|
162
|
+
description?: string | undefined;
|
|
163
|
+
spec?: EgressPolicySpec | undefined;
|
|
164
|
+
}
|
|
165
|
+
export interface CreateEgressPolicyRequest {
|
|
166
|
+
policy?: EgressPolicy | undefined;
|
|
167
|
+
}
|
|
168
|
+
export interface CreateEgressPolicyResponse {
|
|
169
|
+
/** The revision of the created policy. */
|
|
170
|
+
revision: string;
|
|
171
|
+
}
|
|
172
|
+
export interface GetEgressPolicyRequest {
|
|
173
|
+
tag?: string | undefined;
|
|
174
|
+
}
|
|
175
|
+
export interface GetEgressPolicyResponse {
|
|
176
|
+
policy?: EgressPolicy | undefined;
|
|
177
|
+
/** The current revision of the policy. */
|
|
178
|
+
revision: string;
|
|
179
|
+
}
|
|
180
|
+
export interface ListEgressPoliciesRequest {}
|
|
181
|
+
export interface ListEgressPoliciesResponseEgressPolicyEntry {
|
|
182
|
+
policy?: EgressPolicy | undefined;
|
|
183
|
+
/** The current revision of the policy. */
|
|
184
|
+
revision: string;
|
|
185
|
+
}
|
|
186
|
+
export type ListEgressPoliciesResponseEgressPolicyEntryList =
|
|
187
|
+
Array<ListEgressPoliciesResponseEgressPolicyEntry>;
|
|
188
|
+
export interface ListEgressPoliciesResponse {
|
|
189
|
+
policies: ListEgressPoliciesResponseEgressPolicyEntryList;
|
|
190
|
+
}
|
|
191
|
+
export interface UpdateEgressPolicyRequest {
|
|
192
|
+
policy?: EgressPolicy | undefined;
|
|
193
|
+
/** Only update if the policy revision matches. Obtain the current value from GetEgressPolicy. */
|
|
194
|
+
matchRevision?: string | undefined;
|
|
195
|
+
}
|
|
196
|
+
export interface UpdateEgressPolicyResponse {
|
|
197
|
+
/** The revision of the updated policy. */
|
|
198
|
+
revision: string;
|
|
199
|
+
}
|
|
200
|
+
export type CreateEgressPolicyError =
|
|
201
|
+
| InvalidArgument
|
|
202
|
+
| FailedPrecondition
|
|
203
|
+
| Unauthenticated
|
|
204
|
+
| PermissionDenied
|
|
205
|
+
| NotFound
|
|
206
|
+
| AlreadyExists
|
|
207
|
+
| ResourceExhausted
|
|
208
|
+
| NamespaceLabsOpError;
|
|
209
|
+
/** Creates a new egress policy. The policy tag must be unique within the workspace. */
|
|
210
|
+
export const createEgressPolicy: API.OperationMethod<
|
|
211
|
+
CreateEgressPolicyRequest,
|
|
212
|
+
CreateEgressPolicyResponse,
|
|
213
|
+
CreateEgressPolicyError,
|
|
214
|
+
NamespaceLabsOpContext
|
|
215
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
216
|
+
input: __S(16, __c1, 0) as any as S.Schema<CreateEgressPolicyRequest>,
|
|
217
|
+
output: __S(32, __c2, 0) as any as S.Schema<CreateEgressPolicyResponse>,
|
|
218
|
+
errors: [
|
|
219
|
+
InvalidArgument,
|
|
220
|
+
FailedPrecondition,
|
|
221
|
+
Unauthenticated,
|
|
222
|
+
PermissionDenied,
|
|
223
|
+
NotFound,
|
|
224
|
+
AlreadyExists,
|
|
225
|
+
ResourceExhausted,
|
|
226
|
+
],
|
|
227
|
+
serviceErrors: NamespaceLabsServiceErrors,
|
|
228
|
+
protocol: NamespaceLabsProtocol,
|
|
229
|
+
retry: Retry.Retry,
|
|
230
|
+
telemetry: TELEMETRY,
|
|
231
|
+
span: "CreateEgressPolicy",
|
|
232
|
+
}));
|
|
233
|
+
|
|
234
|
+
export type GetEgressPolicyError =
|
|
235
|
+
| InvalidArgument
|
|
236
|
+
| FailedPrecondition
|
|
237
|
+
| Unauthenticated
|
|
238
|
+
| PermissionDenied
|
|
239
|
+
| NotFound
|
|
240
|
+
| AlreadyExists
|
|
241
|
+
| ResourceExhausted
|
|
242
|
+
| NamespaceLabsOpError;
|
|
243
|
+
/** Returns an egress policy by tag. */
|
|
244
|
+
export const getEgressPolicy: API.OperationMethod<
|
|
245
|
+
GetEgressPolicyRequest,
|
|
246
|
+
GetEgressPolicyResponse,
|
|
247
|
+
GetEgressPolicyError,
|
|
248
|
+
NamespaceLabsOpContext
|
|
249
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
250
|
+
input: __S(64, __c4, 0) as any as S.Schema<GetEgressPolicyRequest>,
|
|
251
|
+
output: __S(80, __c5, 0) as any as S.Schema<GetEgressPolicyResponse>,
|
|
252
|
+
errors: [
|
|
253
|
+
InvalidArgument,
|
|
254
|
+
FailedPrecondition,
|
|
255
|
+
Unauthenticated,
|
|
256
|
+
PermissionDenied,
|
|
257
|
+
NotFound,
|
|
258
|
+
AlreadyExists,
|
|
259
|
+
ResourceExhausted,
|
|
260
|
+
],
|
|
261
|
+
serviceErrors: NamespaceLabsServiceErrors,
|
|
262
|
+
protocol: NamespaceLabsProtocol,
|
|
263
|
+
retry: Retry.Retry,
|
|
264
|
+
telemetry: TELEMETRY,
|
|
265
|
+
span: "GetEgressPolicy",
|
|
266
|
+
}));
|
|
267
|
+
|
|
268
|
+
export type ListEgressPoliciesError =
|
|
269
|
+
| InvalidArgument
|
|
270
|
+
| FailedPrecondition
|
|
271
|
+
| Unauthenticated
|
|
272
|
+
| PermissionDenied
|
|
273
|
+
| NotFound
|
|
274
|
+
| AlreadyExists
|
|
275
|
+
| ResourceExhausted
|
|
276
|
+
| NamespaceLabsOpError;
|
|
277
|
+
/** Lists all egress policies in the workspace. */
|
|
278
|
+
export const listEgressPolicies: API.OperationMethod<
|
|
279
|
+
ListEgressPoliciesRequest,
|
|
280
|
+
ListEgressPoliciesResponse,
|
|
281
|
+
ListEgressPoliciesError,
|
|
282
|
+
NamespaceLabsOpContext
|
|
283
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
284
|
+
input: __S(96, __c6, 0) as any as S.Schema<ListEgressPoliciesRequest>,
|
|
285
|
+
output: __S(98, __c6, 2) as any as S.Schema<ListEgressPoliciesResponse>,
|
|
286
|
+
errors: [
|
|
287
|
+
InvalidArgument,
|
|
288
|
+
FailedPrecondition,
|
|
289
|
+
Unauthenticated,
|
|
290
|
+
PermissionDenied,
|
|
291
|
+
NotFound,
|
|
292
|
+
AlreadyExists,
|
|
293
|
+
ResourceExhausted,
|
|
294
|
+
],
|
|
295
|
+
serviceErrors: NamespaceLabsServiceErrors,
|
|
296
|
+
protocol: NamespaceLabsProtocol,
|
|
297
|
+
retry: Retry.Retry,
|
|
298
|
+
telemetry: TELEMETRY,
|
|
299
|
+
span: "ListEgressPolicies",
|
|
300
|
+
}));
|
|
301
|
+
|
|
302
|
+
export type UpdateEgressPolicyError =
|
|
303
|
+
| InvalidArgument
|
|
304
|
+
| FailedPrecondition
|
|
305
|
+
| Unauthenticated
|
|
306
|
+
| PermissionDenied
|
|
307
|
+
| NotFound
|
|
308
|
+
| AlreadyExists
|
|
309
|
+
| ResourceExhausted
|
|
310
|
+
| NamespaceLabsOpError;
|
|
311
|
+
/** Replaces an existing egress policy. */
|
|
312
|
+
export const updateEgressPolicy: API.OperationMethod<
|
|
313
|
+
UpdateEgressPolicyRequest,
|
|
314
|
+
UpdateEgressPolicyResponse,
|
|
315
|
+
UpdateEgressPolicyError,
|
|
316
|
+
NamespaceLabsOpContext
|
|
317
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
318
|
+
input: __S(0, __c0, 0) as any as S.Schema<UpdateEgressPolicyRequest>,
|
|
319
|
+
output: __S(32, __c2, 0) as any as S.Schema<UpdateEgressPolicyResponse>,
|
|
320
|
+
errors: [
|
|
321
|
+
InvalidArgument,
|
|
322
|
+
FailedPrecondition,
|
|
323
|
+
Unauthenticated,
|
|
324
|
+
PermissionDenied,
|
|
325
|
+
NotFound,
|
|
326
|
+
AlreadyExists,
|
|
327
|
+
ResourceExhausted,
|
|
328
|
+
],
|
|
329
|
+
serviceErrors: NamespaceLabsServiceErrors,
|
|
330
|
+
protocol: NamespaceLabsProtocol,
|
|
331
|
+
retry: Retry.Retry,
|
|
332
|
+
telemetry: TELEMETRY,
|
|
333
|
+
span: "UpdateEgressPolicy",
|
|
334
|
+
}));
|
|
335
|
+
|
|
336
|
+
// Schema builders: each runs one schema initializer, on that schema's first use.
|
|
337
|
+
function __c0(j: number): any {
|
|
338
|
+
switch (j) {
|
|
339
|
+
case 0:
|
|
340
|
+
return S.suspend(() =>
|
|
341
|
+
S.Struct({
|
|
342
|
+
policy: S.optional(__S(60, __c3, 12)),
|
|
343
|
+
matchRevision: S.optional(S.String),
|
|
344
|
+
}).pipe(
|
|
345
|
+
T.Http({
|
|
346
|
+
method: "POST",
|
|
347
|
+
uri: "/namespace.cloud.network.v1beta.EgressPolicyService/UpdateEgressPolicy",
|
|
348
|
+
code: 200,
|
|
349
|
+
}),
|
|
350
|
+
),
|
|
351
|
+
).annotate({ identifier: "UpdateEgressPolicyRequest" });
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
function __c1(j: number): any {
|
|
355
|
+
switch (j) {
|
|
356
|
+
case 0:
|
|
357
|
+
return S.suspend(() =>
|
|
358
|
+
S.Struct({
|
|
359
|
+
policy: S.optional(__S(60, __c3, 12)),
|
|
360
|
+
}).pipe(
|
|
361
|
+
T.Http({
|
|
362
|
+
method: "POST",
|
|
363
|
+
uri: "/namespace.cloud.network.v1beta.EgressPolicyService/CreateEgressPolicy",
|
|
364
|
+
code: 200,
|
|
365
|
+
}),
|
|
366
|
+
),
|
|
367
|
+
).annotate({ identifier: "CreateEgressPolicyRequest" });
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
function __c2(j: number): any {
|
|
371
|
+
switch (j) {
|
|
372
|
+
case 0:
|
|
373
|
+
return S.suspend(() =>
|
|
374
|
+
S.Struct({
|
|
375
|
+
revision: S.String,
|
|
376
|
+
}),
|
|
377
|
+
).annotate({ identifier: "CreateEgressPolicyResponse" });
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
function __c3(j: number): any {
|
|
381
|
+
switch (j) {
|
|
382
|
+
case 0:
|
|
383
|
+
return S.Array(S.String);
|
|
384
|
+
case 1:
|
|
385
|
+
return S.suspend(() =>
|
|
386
|
+
S.Struct({
|
|
387
|
+
matchDomains: S.optional(__S(48, __c3, 0)),
|
|
388
|
+
}),
|
|
389
|
+
).annotate({ identifier: "EgressPolicySpecMatcher" });
|
|
390
|
+
case 2:
|
|
391
|
+
return S.suspend(() => S.Struct({})).annotate({ identifier: "EgressPolicySpecAllowOpts" });
|
|
392
|
+
case 3:
|
|
393
|
+
return S.suspend(() =>
|
|
394
|
+
S.Struct({
|
|
395
|
+
viaDomain: S.optional(S.String),
|
|
396
|
+
}),
|
|
397
|
+
).annotate({ identifier: "EgressPolicySpecProxyOpts" });
|
|
398
|
+
case 4:
|
|
399
|
+
return S.suspend(() =>
|
|
400
|
+
S.Struct({
|
|
401
|
+
static: S.optional(S.String),
|
|
402
|
+
fromSecretId: S.optional(S.String),
|
|
403
|
+
}),
|
|
404
|
+
).annotate({ identifier: "ResolvableValue" });
|
|
405
|
+
case 5:
|
|
406
|
+
return S.suspend(() =>
|
|
407
|
+
S.Struct({
|
|
408
|
+
name: S.optional(S.String),
|
|
409
|
+
value: S.optional(S.String),
|
|
410
|
+
valueFrom: S.optional(__S(52, __c3, 4)),
|
|
411
|
+
}),
|
|
412
|
+
).annotate({ identifier: "HttpHeader" });
|
|
413
|
+
case 6:
|
|
414
|
+
return S.Array(__S(53, __c3, 5));
|
|
415
|
+
case 7:
|
|
416
|
+
return S.suspend(() =>
|
|
417
|
+
S.Struct({
|
|
418
|
+
url: S.optional(S.String),
|
|
419
|
+
headers: S.optional(__S(54, __c3, 6)),
|
|
420
|
+
}),
|
|
421
|
+
).annotate({ identifier: "EgressPolicySpecInjectOptsFromEndpoint" });
|
|
422
|
+
case 8:
|
|
423
|
+
return S.suspend(() =>
|
|
424
|
+
S.Struct({
|
|
425
|
+
headerName: S.optional(S.String),
|
|
426
|
+
fromSecretId: S.optional(S.String),
|
|
427
|
+
value: S.optional(S.String),
|
|
428
|
+
fromEndpoint: S.optional(__S(55, __c3, 7)),
|
|
429
|
+
resolutionPolicy: S.optional(S.String),
|
|
430
|
+
}),
|
|
431
|
+
).annotate({ identifier: "EgressPolicySpecInjectOpts" });
|
|
432
|
+
case 9:
|
|
433
|
+
return S.suspend(() =>
|
|
434
|
+
S.Struct({
|
|
435
|
+
op: S.optional(S.String),
|
|
436
|
+
matcher: S.optional(__S(49, __c3, 1)),
|
|
437
|
+
allow: S.optional(__S(50, __c3, 2)),
|
|
438
|
+
proxy: S.optional(__S(51, __c3, 3)),
|
|
439
|
+
inject: S.optional(__S(56, __c3, 8)),
|
|
440
|
+
}),
|
|
441
|
+
).annotate({ identifier: "EgressPolicySpecRule" });
|
|
442
|
+
case 10:
|
|
443
|
+
return S.Array(__S(57, __c3, 9));
|
|
444
|
+
case 11:
|
|
445
|
+
return S.suspend(() =>
|
|
446
|
+
S.Struct({
|
|
447
|
+
mode: S.optional(S.String),
|
|
448
|
+
deepPacketInspection: S.optional(S.Boolean),
|
|
449
|
+
rules: S.optional(__S(58, __c3, 10)),
|
|
450
|
+
additionalRulesets: S.optional(__S(48, __c3, 0)),
|
|
451
|
+
allowedEgressDomains: S.optional(__S(48, __c3, 0)),
|
|
452
|
+
}),
|
|
453
|
+
).annotate({ identifier: "EgressPolicySpec" });
|
|
454
|
+
case 12:
|
|
455
|
+
return S.suspend(() =>
|
|
456
|
+
S.Struct({
|
|
457
|
+
tag: S.optional(S.String),
|
|
458
|
+
description: S.optional(S.String),
|
|
459
|
+
spec: S.optional(__S(59, __c3, 11)),
|
|
460
|
+
}),
|
|
461
|
+
).annotate({ identifier: "EgressPolicy" });
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
function __c4(j: number): any {
|
|
465
|
+
switch (j) {
|
|
466
|
+
case 0:
|
|
467
|
+
return S.suspend(() =>
|
|
468
|
+
S.Struct({
|
|
469
|
+
tag: S.optional(S.String),
|
|
470
|
+
}).pipe(
|
|
471
|
+
T.Http({
|
|
472
|
+
method: "POST",
|
|
473
|
+
uri: "/namespace.cloud.network.v1beta.EgressPolicyService/GetEgressPolicy",
|
|
474
|
+
code: 200,
|
|
475
|
+
}),
|
|
476
|
+
),
|
|
477
|
+
).annotate({ identifier: "GetEgressPolicyRequest" });
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
function __c5(j: number): any {
|
|
481
|
+
switch (j) {
|
|
482
|
+
case 0:
|
|
483
|
+
return S.suspend(() =>
|
|
484
|
+
S.Struct({
|
|
485
|
+
policy: S.optional(__S(60, __c3, 12)),
|
|
486
|
+
revision: S.String,
|
|
487
|
+
}),
|
|
488
|
+
).annotate({ identifier: "GetEgressPolicyResponse" });
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
function __c6(j: number): any {
|
|
492
|
+
switch (j) {
|
|
493
|
+
case 0:
|
|
494
|
+
return S.suspend(() =>
|
|
495
|
+
S.Struct({}).pipe(
|
|
496
|
+
T.Http({
|
|
497
|
+
method: "POST",
|
|
498
|
+
uri: "/namespace.cloud.network.v1beta.EgressPolicyService/ListEgressPolicies",
|
|
499
|
+
code: 200,
|
|
500
|
+
}),
|
|
501
|
+
),
|
|
502
|
+
).annotate({ identifier: "ListEgressPoliciesRequest" });
|
|
503
|
+
case 1:
|
|
504
|
+
return S.Array(__S(80, __c5, 0));
|
|
505
|
+
case 2:
|
|
506
|
+
return S.suspend(() =>
|
|
507
|
+
S.Struct({
|
|
508
|
+
policies: __S(97, __c6, 1),
|
|
509
|
+
}),
|
|
510
|
+
).annotate({ identifier: "ListEgressPoliciesResponse" });
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
// Schema table: entry i is schema j of builder f, made on first reach.
|
|
514
|
+
function __S(i: number, f: (j: number) => unknown, j: number): any {
|
|
515
|
+
return (__s[i] ??= __L.at(f, j));
|
|
516
|
+
}
|