@distilled.cloud/namespacelabs 0.0.0-stage → 1.0.0-rc.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +125 -2
- 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 +55 -0
- package/lib/credentials.d.ts.map +1 -0
- package/lib/credentials.js +1 -0
- package/lib/errors.d.ts +33 -0
- package/lib/errors.d.ts.map +1 -0
- package/lib/errors.js +1 -0
- package/lib/index.d.ts +42 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +7 -0
- package/lib/index.lazy.js +7 -0
- package/lib/index.lazy.js.map +1 -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 +15 -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/artifacts.d.ts +260 -0
- package/lib/services/artifacts.d.ts.map +1 -0
- package/lib/services/artifacts.js +2 -0
- package/lib/services/artifacts.js.map +1 -0
- package/lib/services/audit.d.ts +149 -0
- package/lib/services/audit.d.ts.map +1 -0
- package/lib/services/audit.js +2 -0
- package/lib/services/audit.js.map +1 -0
- package/lib/services/bazel.d.ts +173 -0
- package/lib/services/bazel.d.ts.map +1 -0
- package/lib/services/bazel.js +2 -0
- package/lib/services/bazel.js.map +1 -0
- package/lib/services/bazel_cache.d.ts +118 -0
- package/lib/services/bazel_cache.d.ts.map +1 -0
- package/lib/services/bazel_cache.js +2 -0
- package/lib/services/bazel_cache.js.map +1 -0
- package/lib/services/builder.d.ts +234 -0
- package/lib/services/builder.d.ts.map +1 -0
- package/lib/services/builder.js +2 -0
- package/lib/services/builder.js.map +1 -0
- package/lib/services/buildkite_jobs.d.ts +121 -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 +178 -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/compute.d.ts +1057 -0
- package/lib/services/compute.d.ts.map +1 -0
- package/lib/services/compute.js +43 -0
- package/lib/services/compute.js.map +1 -0
- package/lib/services/compute_command.d.ts +112 -0
- package/lib/services/compute_command.d.ts.map +1 -0
- package/lib/services/compute_command.js +2 -0
- package/lib/services/compute_command.js.map +1 -0
- package/lib/services/compute_observability.d.ts +157 -0
- package/lib/services/compute_observability.d.ts.map +1 -0
- package/lib/services/compute_observability.js +2 -0
- package/lib/services/compute_observability.js.map +1 -0
- package/lib/services/compute_storage.d.ts +371 -0
- package/lib/services/compute_storage.d.ts.map +1 -0
- package/lib/services/compute_storage.js +33 -0
- package/lib/services/compute_storage.js.map +1 -0
- package/lib/services/compute_usage.d.ts +275 -0
- package/lib/services/compute_usage.d.ts.map +1 -0
- package/lib/services/compute_usage.js +2 -0
- package/lib/services/compute_usage.js.map +1 -0
- package/lib/services/egress.d.ts +183 -0
- package/lib/services/egress.d.ts.map +1 -0
- package/lib/services/egress.js +2 -0
- package/lib/services/egress.js.map +1 -0
- package/lib/services/experimental_compute_reservation.d.ts +662 -0
- package/lib/services/experimental_compute_reservation.d.ts.map +1 -0
- package/lib/services/experimental_compute_reservation.js +23 -0
- package/lib/services/experimental_compute_reservation.js.map +1 -0
- package/lib/services/experimental_remote_results.d.ts +488 -0
- package/lib/services/experimental_remote_results.d.ts.map +1 -0
- package/lib/services/experimental_remote_results.js +2 -0
- package/lib/services/experimental_remote_results.js.map +1 -0
- package/lib/services/github_image.d.ts +154 -0
- package/lib/services/github_image.d.ts.map +1 -0
- package/lib/services/github_image.js +2 -0
- package/lib/services/github_image.js.map +1 -0
- package/lib/services/github_jobs.d.ts +175 -0
- package/lib/services/github_jobs.d.ts.map +1 -0
- package/lib/services/github_jobs.js +2 -0
- package/lib/services/github_jobs.js.map +1 -0
- package/lib/services/github_profile.d.ts +288 -0
- package/lib/services/github_profile.d.ts.map +1 -0
- package/lib/services/github_profile.js +2 -0
- package/lib/services/github_profile.js.map +1 -0
- package/lib/services/gradle_cache.d.ts +117 -0
- package/lib/services/gradle_cache.d.ts.map +1 -0
- package/lib/services/gradle_cache.js +2 -0
- package/lib/services/gradle_cache.js.map +1 -0
- package/lib/services/httpcache.d.ts +117 -0
- package/lib/services/httpcache.d.ts.map +1 -0
- package/lib/services/httpcache.js +2 -0
- package/lib/services/httpcache.js.map +1 -0
- package/lib/services/iam_tenant.d.ts +373 -0
- package/lib/services/iam_tenant.d.ts.map +1 -0
- package/lib/services/iam_tenant.js +39 -0
- package/lib/services/iam_tenant.js.map +1 -0
- package/lib/services/iam_tenant_membership.d.ts +106 -0
- package/lib/services/iam_tenant_membership.d.ts.map +1 -0
- package/lib/services/iam_tenant_membership.js +2 -0
- package/lib/services/iam_tenant_membership.js.map +1 -0
- package/lib/services/iam_token.d.ts +249 -0
- package/lib/services/iam_token.d.ts.map +1 -0
- package/lib/services/iam_token.js +2 -0
- package/lib/services/iam_token.js.map +1 -0
- package/lib/services/image.d.ts +214 -0
- package/lib/services/image.d.ts.map +1 -0
- package/lib/services/image.js +2 -0
- package/lib/services/image.js.map +1 -0
- package/lib/services/index.d.ts +30 -0
- package/lib/services/index.d.ts.map +1 -0
- package/lib/services/index.js +29 -0
- package/lib/services/private_devbox.d.ts +1156 -0
- package/lib/services/private_devbox.d.ts.map +1 -0
- package/lib/services/private_devbox.js +81 -0
- package/lib/services/private_devbox.js.map +1 -0
- package/lib/services/private_user_sessions.d.ts +137 -0
- package/lib/services/private_user_sessions.d.ts.map +1 -0
- package/lib/services/private_user_sessions.js +2 -0
- package/lib/services/private_user_sessions.js.map +1 -0
- package/lib/services/registry.d.ts +365 -0
- package/lib/services/registry.d.ts.map +1 -0
- package/lib/services/registry.js +34 -0
- package/lib/services/registry.js.map +1 -0
- package/lib/services/testing.d.ts +152 -0
- package/lib/services/testing.d.ts.map +1 -0
- package/lib/services/testing.js +2 -0
- package/lib/services/testing.js.map +1 -0
- package/lib/services/vault.d.ts +195 -0
- package/lib/services/vault.d.ts.map +1 -0
- package/lib/services/vault.js +2 -0
- package/lib/services/vault.js.map +1 -0
- package/lib/services.lazy/artifacts.js +1 -0
- package/lib/services.lazy/audit.js +1 -0
- package/lib/services.lazy/bazel.js +1 -0
- package/lib/services.lazy/bazel_cache.js +1 -0
- package/lib/services.lazy/builder.js +1 -0
- package/lib/services.lazy/buildkite_jobs.js +1 -0
- package/lib/services.lazy/buildkite_queue.js +1 -0
- package/lib/services.lazy/compute.js +4 -0
- package/lib/services.lazy/compute_command.js +1 -0
- package/lib/services.lazy/compute_observability.js +1 -0
- package/lib/services.lazy/compute_storage.js +4 -0
- package/lib/services.lazy/compute_usage.js +1 -0
- package/lib/services.lazy/egress.js +1 -0
- package/lib/services.lazy/experimental_compute_reservation.js +4 -0
- package/lib/services.lazy/experimental_remote_results.js +1 -0
- package/lib/services.lazy/github_image.js +1 -0
- package/lib/services.lazy/github_jobs.js +1 -0
- package/lib/services.lazy/github_profile.js +1 -0
- package/lib/services.lazy/gradle_cache.js +1 -0
- package/lib/services.lazy/httpcache.js +1 -0
- package/lib/services.lazy/iam_tenant.js +4 -0
- package/lib/services.lazy/iam_tenant_membership.js +1 -0
- package/lib/services.lazy/iam_token.js +1 -0
- package/lib/services.lazy/image.js +1 -0
- package/lib/services.lazy/index.js +3 -0
- package/lib/services.lazy/private_devbox.js +4 -0
- package/lib/services.lazy/private_user_sessions.js +1 -0
- package/lib/services.lazy/registry.js +4 -0
- package/lib/services.lazy/testing.js +1 -0
- package/lib/services.lazy/vault.js +1 -0
- package/lib/traits.d.ts +3 -0
- package/lib/traits.d.ts.map +1 -0
- package/lib/traits.js +1 -0
- package/package.json +87 -3
- package/src/credentials.ts +164 -0
- package/src/errors.ts +47 -0
- package/src/index.ts +48 -0
- package/src/pagination.ts +1 -0
- package/src/protocol.ts +82 -0
- package/src/retry.ts +28 -0
- package/src/services/artifacts.ts +761 -0
- package/src/services/audit.ts +315 -0
- package/src/services/bazel.ts +415 -0
- package/src/services/bazel_cache.ts +211 -0
- package/src/services/builder.ts +568 -0
- package/src/services/buildkite_jobs.ts +222 -0
- package/src/services/buildkite_queue.ts +445 -0
- package/src/services/compute.ts +2794 -0
- package/src/services/compute_command.ts +212 -0
- package/src/services/compute_observability.ts +428 -0
- package/src/services/compute_storage.ts +1159 -0
- package/src/services/compute_usage.ts +730 -0
- package/src/services/egress.ts +508 -0
- package/src/services/experimental_compute_reservation.ts +1488 -0
- package/src/services/experimental_remote_results.ts +1157 -0
- package/src/services/github_image.ts +293 -0
- package/src/services/github_jobs.ts +381 -0
- package/src/services/github_profile.ts +721 -0
- package/src/services/gradle_cache.ts +263 -0
- package/src/services/httpcache.ts +263 -0
- package/src/services/iam_tenant.ts +1355 -0
- package/src/services/iam_tenant_membership.ts +245 -0
- package/src/services/iam_token.ts +780 -0
- package/src/services/image.ts +594 -0
- package/src/services/index.ts +30 -0
- package/src/services/private_devbox.ts +4217 -0
- package/src/services/private_user_sessions.ts +402 -0
- package/src/services/registry.ts +1234 -0
- package/src/services/testing.ts +386 -0
- package/src/services/vault.ts +514 -0
- package/src/traits.ts +36 -0
|
@@ -0,0 +1,1355 @@
|
|
|
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 { UnknownNamespaceLabsError } from "../errors.ts";
|
|
8
|
+
import { paginateCursor } from "../pagination.ts";
|
|
9
|
+
import {
|
|
10
|
+
NamespaceLabsProtocol,
|
|
11
|
+
type NamespaceLabsOpError,
|
|
12
|
+
type NamespaceLabsOpContext,
|
|
13
|
+
} from "../protocol.ts";
|
|
14
|
+
import * as Retry from "../retry.ts";
|
|
15
|
+
import * as T from "../traits.ts";
|
|
16
|
+
// Schema table, filled on first reach (see __S at the end).
|
|
17
|
+
const __s: any[] = [];
|
|
18
|
+
|
|
19
|
+
export type { NamespaceLabsOpError, NamespaceLabsOpContext };
|
|
20
|
+
|
|
21
|
+
/** Span facts shared by every operation (com.distilled.telemetry#service). */
|
|
22
|
+
const TELEMETRY = {
|
|
23
|
+
system: "namespacelabs-api",
|
|
24
|
+
responseHeaders: [
|
|
25
|
+
{ header: "x-request-id", name: "http.response.header.x-request-id", transform: "list" },
|
|
26
|
+
{ header: "request-id", name: "http.response.header.request-id", transform: "list" },
|
|
27
|
+
],
|
|
28
|
+
prefix: "Namespacelabs",
|
|
29
|
+
service: "TenantService",
|
|
30
|
+
propagate: "w3c",
|
|
31
|
+
} as const;
|
|
32
|
+
|
|
33
|
+
export class AlreadyExists
|
|
34
|
+
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
35
|
+
/*@__PURE__*/ S.TaggedError<AlreadyExists>()("AlreadyExists", {
|
|
36
|
+
message: S.String,
|
|
37
|
+
body: S.Unknown,
|
|
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
|
+
}).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
|
+
}).pipe(C.withBadRequestError),
|
|
57
|
+
[{ status: 400, body: { "/code": "invalid_argument" } }],
|
|
58
|
+
) {}
|
|
59
|
+
|
|
60
|
+
export class NotFound
|
|
61
|
+
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
62
|
+
/*@__PURE__*/ S.TaggedError<NotFound>()("NotFound", {
|
|
63
|
+
message: S.String,
|
|
64
|
+
body: S.Unknown,
|
|
65
|
+
}).pipe(C.withBadRequestError),
|
|
66
|
+
[{ status: 404 }],
|
|
67
|
+
) {}
|
|
68
|
+
|
|
69
|
+
export class PermissionDenied
|
|
70
|
+
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
71
|
+
/*@__PURE__*/ S.TaggedError<PermissionDenied>()("PermissionDenied", {
|
|
72
|
+
message: S.String,
|
|
73
|
+
body: S.Unknown,
|
|
74
|
+
}).pipe(C.withAuthError),
|
|
75
|
+
[{ status: 403 }],
|
|
76
|
+
) {}
|
|
77
|
+
|
|
78
|
+
export class ResourceExhausted
|
|
79
|
+
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
80
|
+
/*@__PURE__*/ S.TaggedError<ResourceExhausted>()("ResourceExhausted", {
|
|
81
|
+
message: S.String,
|
|
82
|
+
body: S.Unknown,
|
|
83
|
+
}).pipe(C.withThrottlingError),
|
|
84
|
+
[{ status: 429 }],
|
|
85
|
+
) {}
|
|
86
|
+
|
|
87
|
+
export class Unauthenticated
|
|
88
|
+
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
89
|
+
/*@__PURE__*/ S.TaggedError<Unauthenticated>()("Unauthenticated", {
|
|
90
|
+
message: S.String,
|
|
91
|
+
body: S.Unknown,
|
|
92
|
+
}).pipe(C.withAuthError),
|
|
93
|
+
[{ status: 401 }],
|
|
94
|
+
) {}
|
|
95
|
+
|
|
96
|
+
/** Configures when a tenant should expire. An expired tenant can no longer be used and will be scheduled for deletion. */
|
|
97
|
+
export interface TenantPolicyExpirationPolicy {
|
|
98
|
+
/** The point in time at which the tenant expires. If not set (or explicitly cleared), the tenant does not expire. */
|
|
99
|
+
expiresAt?: string | undefined;
|
|
100
|
+
}
|
|
101
|
+
export interface TenantPolicy {
|
|
102
|
+
/** A unique identifier that represents this policy. If none is provided, one will be generated. */
|
|
103
|
+
id?: string | undefined;
|
|
104
|
+
/** The policy being set. One of: - "namespace.cloud.compute.v1beta.UsagePolicy": the serialized JSON of a namespace.cloud.compute.v1beta.UsagePolicy should be used as value. More policies are available. Consult with the Namespace team on additional controls that can be applied per tenant. */
|
|
105
|
+
policy?: string | undefined;
|
|
106
|
+
/** The policy-specific value. It may be a string, number, or serialized message (e.g. JSON). */
|
|
107
|
+
value?: string | undefined;
|
|
108
|
+
/** A typed expiration policy. When set, `policy` and `value` are not required. Setting an ExpirationPolicy with no `expires_at` timestamp removes a previously configured expiration. */
|
|
109
|
+
expirationPolicy?: TenantPolicyExpirationPolicy | undefined;
|
|
110
|
+
}
|
|
111
|
+
export type TenantPolicyList = Array<TenantPolicy>;
|
|
112
|
+
/** Labels are key/value pairs attached to entities such as tenants. */
|
|
113
|
+
export interface Label {
|
|
114
|
+
/** A name is an string up to 63 bytes that matches the regular expression `^[a-z]([a-z0-9-.]*[a-z0-9])?$`. */
|
|
115
|
+
name?: string | undefined;
|
|
116
|
+
/** Label values are arbitrary values up to 255 bytes. */
|
|
117
|
+
value?: string | undefined;
|
|
118
|
+
}
|
|
119
|
+
export type LabelList = Array<Label>;
|
|
120
|
+
export interface CreateTenantRequest {
|
|
121
|
+
/** An opaque value that represents the identity of the user that created this Tenant. The creator is stored for understandability purposes; it does not grant any additional permissions. This property is deprecated and will not be stored in the future. */
|
|
122
|
+
creatorId?: string | undefined;
|
|
123
|
+
/** Specify the Tenant's visible name, e.g. "Foobar (production)". The Tenant's name is visible in Namespace-based interfaces, such as the Dashboard or the CLI. A visible name is optional. */
|
|
124
|
+
visibleName?: string | undefined;
|
|
125
|
+
/** A set of policies that apply to this Tenant. Some policies are only settable at creation time, and can't be modified later. */
|
|
126
|
+
policies?: TenantPolicyList | undefined;
|
|
127
|
+
/** A string, opaque to Namespace, that identifies an external account associated with this tenant. Namespace ensures that there is at most one tenant associated with a given external account ID. If another tenant with the same external account ID is present in the system, an error is returned. */
|
|
128
|
+
externalAccountId?: string | undefined;
|
|
129
|
+
/** A set of labels that should be attached to the Tenant. */
|
|
130
|
+
labels?: LabelList | undefined;
|
|
131
|
+
}
|
|
132
|
+
export interface Tenant {
|
|
133
|
+
/** The ID of the tenant. Tenant IDs should be treated as opaque by clients. Although there's structure to them, that structure may change over time. */
|
|
134
|
+
id: string;
|
|
135
|
+
/** An opaque value supplied at creation time that represents the identity of the creator of this tenant. This property is deprecated and will not be stored in the future. */
|
|
136
|
+
creatorId: string;
|
|
137
|
+
/** An opaque value supplied at creation time that represents the identity of the creator of this tenant. There is at most one tenant with a given external ID (within a single partner account). */
|
|
138
|
+
externalAccountId: string;
|
|
139
|
+
/** Timestamp of when this tenant was created. */
|
|
140
|
+
createdAt?: string | undefined;
|
|
141
|
+
/** A human-visible label used as a tenant identifier. E.g. "Foobar (production)". */
|
|
142
|
+
visibleName: string;
|
|
143
|
+
/** Labels attached to the Tenant. */
|
|
144
|
+
labels: LabelList;
|
|
145
|
+
}
|
|
146
|
+
export interface CreateTenantResponse {
|
|
147
|
+
tenant?: Tenant | undefined;
|
|
148
|
+
}
|
|
149
|
+
export interface DeleteTenantGroupRequest {
|
|
150
|
+
/** A canonical name for the Tenant group. Tenant groups are identified by name and scoped per Namespace Partner. */
|
|
151
|
+
name?: string | undefined;
|
|
152
|
+
}
|
|
153
|
+
export interface DeleteTenantGroupResponse {}
|
|
154
|
+
export interface DescribePoliciesRequest {}
|
|
155
|
+
export interface DescribePoliciesResponse {
|
|
156
|
+
policies: TenantPolicyList;
|
|
157
|
+
revision: string;
|
|
158
|
+
}
|
|
159
|
+
export interface DescribeTenantGroupRequest {
|
|
160
|
+
/** A canonical name for the Tenant group. Tenant groups are identified by name and scoped per Namespace Partner. */
|
|
161
|
+
name?: string | undefined;
|
|
162
|
+
}
|
|
163
|
+
export interface TenantGroupPolicy {
|
|
164
|
+
/** The policy being set. One of: - "namespace.cloud.compute.v1beta.UsagePolicy": the serialized JSON of a namespace.cloud.compute.v1beta.UsagePolicy should be used as value. More policies are available. Consult with the Namespace team on additional controls that can be applied per tenant. */
|
|
165
|
+
policy?: string | undefined;
|
|
166
|
+
/** The policy-specific value. It may be a string, number, or serialized message (e.g. JSON). */
|
|
167
|
+
value?: string | undefined;
|
|
168
|
+
}
|
|
169
|
+
export type TenantGroupPolicyList = Array<TenantGroupPolicy>;
|
|
170
|
+
export type StringList = Array<string>;
|
|
171
|
+
export interface DescribeTenantGroupResponse {
|
|
172
|
+
/** A canonical name for the Tenant group. Tenant groups are identified by name and scoped per Namespace Partner. */
|
|
173
|
+
name: string;
|
|
174
|
+
/** A set of policies that apply to every Tenant in this group. */
|
|
175
|
+
policies: TenantGroupPolicyList;
|
|
176
|
+
/** A list of tenants that are enrolled in this group. */
|
|
177
|
+
enrolledTenantIds: StringList;
|
|
178
|
+
/** The full history of policy revisions, latest first. Each version entry corresponds to one stored revision of the policy. */
|
|
179
|
+
versions: TenantGroupPolicyList;
|
|
180
|
+
}
|
|
181
|
+
export interface EnsureTenantForExternalAccountRequest {
|
|
182
|
+
/** Specify the Tenant's visible name, e.g. "Foobar (production)". The Tenant's name is visible in Namespace-based interfaces, such as the Dashboard or the CLI. A visible name is optional. */
|
|
183
|
+
visibleName?: string | undefined;
|
|
184
|
+
/** A set of policies that apply to this Tenant. Some policies are only settable at creation time, and can't be modified later. */
|
|
185
|
+
policies?: TenantPolicyList | undefined;
|
|
186
|
+
/** A string, opaque to Namespace, that identifies an external account associated with this tenant. Namespace ensures that there is at most one tenant associated with a given external account ID. If another tenant with the same external account ID is present in the system, it is updated with the new properties. */
|
|
187
|
+
externalAccountId?: string | undefined;
|
|
188
|
+
/** A set of labels that should be attached to the Tenant. If the Tenant already exists, its label set will be overwritten with the new set. */
|
|
189
|
+
labels?: LabelList | undefined;
|
|
190
|
+
/** A set of tenant groups that this tenant is enrolled in. Tenant groups are identified by name and scoped per Namespace Partner Account. */
|
|
191
|
+
enrolledGroups?: StringList | undefined;
|
|
192
|
+
}
|
|
193
|
+
export interface EnsureTenantForExternalAccountResponse {
|
|
194
|
+
tenant?: Tenant | undefined;
|
|
195
|
+
}
|
|
196
|
+
export interface EnsureTenantGroupRequest {
|
|
197
|
+
/** A canonical name for the Tenant group. Tenant groups are identified by name and scoped per Namespace Partner. */
|
|
198
|
+
name?: string | undefined;
|
|
199
|
+
/** A set of policies that apply to every Tenant in this group. Some policies are only settable at creation time, and can't be modified later. */
|
|
200
|
+
policies?: TenantGroupPolicyList | undefined;
|
|
201
|
+
}
|
|
202
|
+
export interface EnsureTenantGroupResponse {
|
|
203
|
+
name: string;
|
|
204
|
+
}
|
|
205
|
+
/** 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. */
|
|
206
|
+
export interface Permission {
|
|
207
|
+
/** The type of resource this permission applies to, e.g. "instance", "vault/object", "token/revokable". */
|
|
208
|
+
resourceType?: string | undefined;
|
|
209
|
+
/** The specific resource ID, or empty for all resources of this type. */
|
|
210
|
+
resourceId?: string | undefined;
|
|
211
|
+
/** The set of actions allowed on the resource, e.g. "create", "list", "describe". */
|
|
212
|
+
actions?: StringList | undefined;
|
|
213
|
+
}
|
|
214
|
+
export type PermissionList = Array<Permission>;
|
|
215
|
+
export interface ExchangeTenantTokenForClientCertRequest {
|
|
216
|
+
/** The public key for which the certificate should be issued. This must contain exactly one PEM "PUBLIC KEY" block. */
|
|
217
|
+
publicKeyPem?: string | undefined;
|
|
218
|
+
/** Optionally restrict the certificate to a subset of the permissions in the tenant token. The request fails if any permission is not granted by the token. If empty, the certificate inherits the token's permissions. */
|
|
219
|
+
permissions?: PermissionList | undefined;
|
|
220
|
+
}
|
|
221
|
+
export interface ExchangeTenantTokenForClientCertResponse {
|
|
222
|
+
/** The PEM-encoded client certificate chain issued for the supplied key. */
|
|
223
|
+
clientCertificatePem: string;
|
|
224
|
+
}
|
|
225
|
+
export interface TenantTokenPolicy {
|
|
226
|
+
/** The policy type being set. Consult with the Namespace team on which controls can be applied per tenant token. */
|
|
227
|
+
policyType?: string | undefined;
|
|
228
|
+
/** The policy-specific value. It may be a string, number, or serialized message (e.g. JSON). */
|
|
229
|
+
value?: string | undefined;
|
|
230
|
+
}
|
|
231
|
+
export type TenantTokenPolicyList = Array<TenantTokenPolicy>;
|
|
232
|
+
export interface AccessPolicy {
|
|
233
|
+
/** Grant a restricted set of permissions to this token. See https://namespace.so/docs/security/permissions for available permissions. */
|
|
234
|
+
grants?: PermissionList | undefined;
|
|
235
|
+
}
|
|
236
|
+
export interface IssueTenantClientCertificateRequest {
|
|
237
|
+
/** Which tenant credentials should be produced for. */
|
|
238
|
+
tenantId?: string | undefined;
|
|
239
|
+
/** A integration-specified identifier that represents the user that is requesting these credentials. The actor identity is embedded into the resulting client certificate. */
|
|
240
|
+
actorId?: string | undefined;
|
|
241
|
+
/** For how long should the resulting credentials be valid for. If not specified, a short-lived default is used (e.g 15mins). */
|
|
242
|
+
durationSecs?: string | undefined;
|
|
243
|
+
/** A set of policies that apply to this tenant client certificate. */
|
|
244
|
+
policies?: TenantTokenPolicyList | undefined;
|
|
245
|
+
/** Configure the access permissions available with this token. */
|
|
246
|
+
access?: AccessPolicy | undefined;
|
|
247
|
+
/** Optional. If not given, a key pair will be generated and the private key will be returned in `IssueTenantClientCertificateResponse`. If set, this indicates that a key pair has been generated on the client and a certificate should be issued for this public key. In that case, this field must contain exactly one PEM "PUBLIC KEY" block. */
|
|
248
|
+
publicKeyPem?: string | undefined;
|
|
249
|
+
}
|
|
250
|
+
export interface IssueTenantClientCertificateResponse {
|
|
251
|
+
/** The PEM-encoded client certificate that has been issued. The PEM container will contain one or more PEM "CERTIFICATE" blocks. If multiple certificates are returned, they can be used to build a certificate chain to a server-requested Certification Authority. */
|
|
252
|
+
clientCertificatePem: string;
|
|
253
|
+
/** This field is only filled if the request did not contain `public_key_pem`. In that case the API will generate a private key. This field will be a PEM container with exactly one "PRIVATE KEY" block. */
|
|
254
|
+
privateKeyPem: string | Redacted.Redacted<string>;
|
|
255
|
+
}
|
|
256
|
+
export interface IssueTenantTokenRequest {
|
|
257
|
+
/** Which tenant credentials should be produced for. */
|
|
258
|
+
tenantId?: string | undefined;
|
|
259
|
+
/** A integration-specified identifier that represents the user that is requesting these credentials. The actor identity is embedded into the verifiable claims of the resulting JWT. */
|
|
260
|
+
actorId?: string | undefined;
|
|
261
|
+
/** For how long should the resulting credentials be valid for. If not specified, a short-lived default is used (e.g 15mins). */
|
|
262
|
+
durationSecs?: string | undefined;
|
|
263
|
+
/** A set of policies that apply to this tenant token. */
|
|
264
|
+
policies?: TenantTokenPolicyList | undefined;
|
|
265
|
+
/** Configure the access permissions available with this token. */
|
|
266
|
+
access?: AccessPolicy | undefined;
|
|
267
|
+
}
|
|
268
|
+
export interface IssueTenantTokenResponse {
|
|
269
|
+
/** The tenant Bearer token. Pass this in the `Authorization: Bearer {token}` header when calling Namespace APIs. */
|
|
270
|
+
bearerToken: string | Redacted.Redacted<string>;
|
|
271
|
+
}
|
|
272
|
+
export interface ListTenantGroupsRequest {}
|
|
273
|
+
export interface ListTenantGroupsResponseTenantGroup {
|
|
274
|
+
/** A canonical name for the Tenant group. Tenant groups are identified by name and scoped per Namespace Partner. */
|
|
275
|
+
name: string;
|
|
276
|
+
/** A set of policies that apply to every Tenant in this group. */
|
|
277
|
+
policies: TenantGroupPolicyList;
|
|
278
|
+
/** The full history of policy revisions, latest first. Each version entry corresponds to one stored revision of the policy. */
|
|
279
|
+
versions: TenantGroupPolicyList;
|
|
280
|
+
}
|
|
281
|
+
export type ListTenantGroupsResponseTenantGroupList = Array<ListTenantGroupsResponseTenantGroup>;
|
|
282
|
+
export interface ListTenantGroupsResponse {
|
|
283
|
+
tenantGroups: ListTenantGroupsResponseTenantGroupList;
|
|
284
|
+
}
|
|
285
|
+
export interface ListTenantsRequest {
|
|
286
|
+
/** If specified, limits the number of returned Tenants to be at most `limit`. The platform may always decide to return fewer Tenants, even if more exist, and the requested limit is higher. */
|
|
287
|
+
limit?: number | undefined;
|
|
288
|
+
/** If specified, continues a list operation with pagination, i.e. obtain the next list of tenants that match previous criteria. If a cursor is specified, no other parameters except `limit` may be provided. */
|
|
289
|
+
cursor?: string | undefined;
|
|
290
|
+
/** If specified, only return tenants that were created by the specified user id. This property is deprecated and will not be respected in the future. */
|
|
291
|
+
creatorId?: string | undefined;
|
|
292
|
+
/** If specified, returns at most one tenant associated with a given external ID. See `Tenant.external_account_id` for details. */
|
|
293
|
+
externalAccountId?: string | undefined;
|
|
294
|
+
}
|
|
295
|
+
export type TenantList = Array<Tenant>;
|
|
296
|
+
export interface ListTenantsResponse {
|
|
297
|
+
tenants: TenantList;
|
|
298
|
+
/** If present, then there are additional tenants that match the original query, but were not returned in this response. Issue a 2nd List call, passing in the cursor, to obtain the next set. */
|
|
299
|
+
cursor: string;
|
|
300
|
+
}
|
|
301
|
+
export interface RemoveTenantRequest {
|
|
302
|
+
/** The ID of the Tenant that is the target of a particular call. */
|
|
303
|
+
tenantId?: string | undefined;
|
|
304
|
+
}
|
|
305
|
+
export interface RemoveTenantResponse {}
|
|
306
|
+
export interface ResumeTenantRequest {
|
|
307
|
+
/** The ID of the Tenant that is the target of a particular call. */
|
|
308
|
+
tenantId?: string | undefined;
|
|
309
|
+
}
|
|
310
|
+
export interface ResumeTenantResponse {}
|
|
311
|
+
export interface SuspendTenantRequest {
|
|
312
|
+
/** The ID of the Tenant that is the target of a particular call. */
|
|
313
|
+
tenantId?: string | undefined;
|
|
314
|
+
}
|
|
315
|
+
export interface SuspendTenantResponse {}
|
|
316
|
+
export interface UpdatePoliciesRequest {
|
|
317
|
+
/** The ID of the Tenant that is the target of a particular call. */
|
|
318
|
+
tenantId?: string | undefined;
|
|
319
|
+
/** A set of policies that apply to this Tenant. Some policies are only settable at creation time, and can't be modified later. */
|
|
320
|
+
policies?: TenantPolicyList | undefined;
|
|
321
|
+
/** Only update if revision matches. */
|
|
322
|
+
revision?: string | undefined;
|
|
323
|
+
}
|
|
324
|
+
export interface UpdatePoliciesResponse {}
|
|
325
|
+
export interface UpdateTenantRequest {
|
|
326
|
+
/** The ID of the Tenant that is the target of a particular call. */
|
|
327
|
+
tenantId?: string | undefined;
|
|
328
|
+
/** Specify the Tenant's visible name, e.g. "Foobar (production)". The Tenant's name is visible in Namespace-based interfaces, such as the Dashboard or the CLI. A visible name is optional. */
|
|
329
|
+
visibleName?: string | undefined;
|
|
330
|
+
/** A set of policies that apply to this Tenant. Some policies are only settable at creation time, and can't be modified later. */
|
|
331
|
+
policies?: TenantPolicyList | undefined;
|
|
332
|
+
/** A set of labels that should be attached to the Tenant. The tenant's label set will be overwritten with the new set. */
|
|
333
|
+
labels?: LabelList | undefined;
|
|
334
|
+
}
|
|
335
|
+
export interface UpdateTenantResponse {
|
|
336
|
+
tenant?: Tenant | undefined;
|
|
337
|
+
}
|
|
338
|
+
export type CreateTenantError =
|
|
339
|
+
| InvalidArgument
|
|
340
|
+
| FailedPrecondition
|
|
341
|
+
| Unauthenticated
|
|
342
|
+
| PermissionDenied
|
|
343
|
+
| NotFound
|
|
344
|
+
| AlreadyExists
|
|
345
|
+
| ResourceExhausted
|
|
346
|
+
| NamespaceLabsOpError;
|
|
347
|
+
/** Creates a new Tenant. After a tenant creation call returns, the Tenant can be used immediately. Tenants can be cordoned temporarily (via `SuspendTenant`) or removed permanently (via `RemoveTenant`). ### Errors - If one of the properties that are passed in is invalid, an `InvalidArgument` error is returned. - If a tenant with the specified `external_account_id` already exists `FailedPrecondition` error is returned. */
|
|
348
|
+
export const createTenant: API.OperationMethod<
|
|
349
|
+
CreateTenantRequest,
|
|
350
|
+
CreateTenantResponse,
|
|
351
|
+
CreateTenantError,
|
|
352
|
+
NamespaceLabsOpContext
|
|
353
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
354
|
+
input: __S(68, __c17, 0) as any as S.Schema<CreateTenantRequest>,
|
|
355
|
+
output: __S(76, __c19, 0) as any as S.Schema<CreateTenantResponse>,
|
|
356
|
+
errors: [
|
|
357
|
+
InvalidArgument,
|
|
358
|
+
FailedPrecondition,
|
|
359
|
+
Unauthenticated,
|
|
360
|
+
PermissionDenied,
|
|
361
|
+
NotFound,
|
|
362
|
+
AlreadyExists,
|
|
363
|
+
ResourceExhausted,
|
|
364
|
+
UnknownNamespaceLabsError,
|
|
365
|
+
],
|
|
366
|
+
protocol: NamespaceLabsProtocol,
|
|
367
|
+
retry: Retry.Retry,
|
|
368
|
+
telemetry: TELEMETRY,
|
|
369
|
+
span: "CreateTenant",
|
|
370
|
+
}));
|
|
371
|
+
|
|
372
|
+
export type DeleteTenantGroupError =
|
|
373
|
+
| InvalidArgument
|
|
374
|
+
| FailedPrecondition
|
|
375
|
+
| Unauthenticated
|
|
376
|
+
| PermissionDenied
|
|
377
|
+
| NotFound
|
|
378
|
+
| AlreadyExists
|
|
379
|
+
| ResourceExhausted
|
|
380
|
+
| NamespaceLabsOpError;
|
|
381
|
+
/** Deletes a Tenant Group owned by the Namespace Partner Account. ### Errors - If the tenant group referenced does not exist, a `NotFound` status is returned. - If any active tenants are enrolled in the tenant group, a `FailedPrecondition` status is returned. */
|
|
382
|
+
export const deleteTenantGroup: API.OperationMethod<
|
|
383
|
+
DeleteTenantGroupRequest,
|
|
384
|
+
DeleteTenantGroupResponse,
|
|
385
|
+
DeleteTenantGroupError,
|
|
386
|
+
NamespaceLabsOpContext
|
|
387
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
388
|
+
input: __S(84, __c21, 0) as any as S.Schema<DeleteTenantGroupRequest>,
|
|
389
|
+
output: __S(88, __c22, 0) as any as S.Schema<DeleteTenantGroupResponse>,
|
|
390
|
+
errors: [
|
|
391
|
+
InvalidArgument,
|
|
392
|
+
FailedPrecondition,
|
|
393
|
+
Unauthenticated,
|
|
394
|
+
PermissionDenied,
|
|
395
|
+
NotFound,
|
|
396
|
+
AlreadyExists,
|
|
397
|
+
ResourceExhausted,
|
|
398
|
+
UnknownNamespaceLabsError,
|
|
399
|
+
],
|
|
400
|
+
protocol: NamespaceLabsProtocol,
|
|
401
|
+
retry: Retry.Retry,
|
|
402
|
+
telemetry: TELEMETRY,
|
|
403
|
+
span: "DeleteTenantGroup",
|
|
404
|
+
}));
|
|
405
|
+
|
|
406
|
+
export type DescribePoliciesError =
|
|
407
|
+
| InvalidArgument
|
|
408
|
+
| FailedPrecondition
|
|
409
|
+
| Unauthenticated
|
|
410
|
+
| PermissionDenied
|
|
411
|
+
| NotFound
|
|
412
|
+
| AlreadyExists
|
|
413
|
+
| ResourceExhausted
|
|
414
|
+
| NamespaceLabsOpError;
|
|
415
|
+
/** Retrieves the policies that apply to the tenant. Requires either a partner token, or an admin-scoped tenant token. ### Errors - If the tenant referenced does not exist, a `NotFound` status is returned. */
|
|
416
|
+
export const describePolicies: API.OperationMethod<
|
|
417
|
+
DescribePoliciesRequest,
|
|
418
|
+
DescribePoliciesResponse,
|
|
419
|
+
DescribePoliciesError,
|
|
420
|
+
NamespaceLabsOpContext
|
|
421
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
422
|
+
input: __S(92, __c23, 0) as any as S.Schema<DescribePoliciesRequest>,
|
|
423
|
+
output: __S(93, __c23, 1) as any as S.Schema<DescribePoliciesResponse>,
|
|
424
|
+
errors: [
|
|
425
|
+
InvalidArgument,
|
|
426
|
+
FailedPrecondition,
|
|
427
|
+
Unauthenticated,
|
|
428
|
+
PermissionDenied,
|
|
429
|
+
NotFound,
|
|
430
|
+
AlreadyExists,
|
|
431
|
+
ResourceExhausted,
|
|
432
|
+
UnknownNamespaceLabsError,
|
|
433
|
+
],
|
|
434
|
+
protocol: NamespaceLabsProtocol,
|
|
435
|
+
retry: Retry.Retry,
|
|
436
|
+
telemetry: TELEMETRY,
|
|
437
|
+
span: "DescribePolicies",
|
|
438
|
+
}));
|
|
439
|
+
|
|
440
|
+
export type DescribeTenantGroupError =
|
|
441
|
+
| InvalidArgument
|
|
442
|
+
| FailedPrecondition
|
|
443
|
+
| Unauthenticated
|
|
444
|
+
| PermissionDenied
|
|
445
|
+
| NotFound
|
|
446
|
+
| AlreadyExists
|
|
447
|
+
| ResourceExhausted
|
|
448
|
+
| NamespaceLabsOpError;
|
|
449
|
+
/** Lists all Tenant Groups owned by the Namespace Partner Account. */
|
|
450
|
+
export const describeTenantGroup: API.OperationMethod<
|
|
451
|
+
DescribeTenantGroupRequest,
|
|
452
|
+
DescribeTenantGroupResponse,
|
|
453
|
+
DescribeTenantGroupError,
|
|
454
|
+
NamespaceLabsOpContext
|
|
455
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
456
|
+
input: __S(0, __c0, 0) as any as S.Schema<DescribeTenantGroupRequest>,
|
|
457
|
+
output: __S(1, __c0, 1) as any as S.Schema<DescribeTenantGroupResponse>,
|
|
458
|
+
errors: [
|
|
459
|
+
InvalidArgument,
|
|
460
|
+
FailedPrecondition,
|
|
461
|
+
Unauthenticated,
|
|
462
|
+
PermissionDenied,
|
|
463
|
+
NotFound,
|
|
464
|
+
AlreadyExists,
|
|
465
|
+
ResourceExhausted,
|
|
466
|
+
UnknownNamespaceLabsError,
|
|
467
|
+
],
|
|
468
|
+
protocol: NamespaceLabsProtocol,
|
|
469
|
+
retry: Retry.Retry,
|
|
470
|
+
telemetry: TELEMETRY,
|
|
471
|
+
span: "DescribeTenantGroup",
|
|
472
|
+
}));
|
|
473
|
+
|
|
474
|
+
export type EnsureTenantForExternalAccountError =
|
|
475
|
+
| InvalidArgument
|
|
476
|
+
| FailedPrecondition
|
|
477
|
+
| Unauthenticated
|
|
478
|
+
| PermissionDenied
|
|
479
|
+
| NotFound
|
|
480
|
+
| AlreadyExists
|
|
481
|
+
| ResourceExhausted
|
|
482
|
+
| NamespaceLabsOpError;
|
|
483
|
+
/** Creates or updates a tenant associated with an external account. Namespace allows to associate a unique tenant to an opaque external account ID. If a tenant with the given external ID already exists its properties are updated and the existing tenant is returned. Otherwise a new tenant is created with the associated external ID. Tenants created by CreateTenant never have an associated external ID. External account ID cannot be modified after creation. ### Errors - If one of the properties that are passed in is invalid, an `InvalidArgument` error is returned. */
|
|
484
|
+
export const ensureTenantForExternalAccount: API.OperationMethod<
|
|
485
|
+
EnsureTenantForExternalAccountRequest,
|
|
486
|
+
EnsureTenantForExternalAccountResponse,
|
|
487
|
+
EnsureTenantForExternalAccountError,
|
|
488
|
+
NamespaceLabsOpContext
|
|
489
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
490
|
+
input: __S(12, __c3, 0) as any as S.Schema<EnsureTenantForExternalAccountRequest>,
|
|
491
|
+
output: __S(76, __c19, 0) as any as S.Schema<EnsureTenantForExternalAccountResponse>,
|
|
492
|
+
errors: [
|
|
493
|
+
InvalidArgument,
|
|
494
|
+
FailedPrecondition,
|
|
495
|
+
Unauthenticated,
|
|
496
|
+
PermissionDenied,
|
|
497
|
+
NotFound,
|
|
498
|
+
AlreadyExists,
|
|
499
|
+
ResourceExhausted,
|
|
500
|
+
UnknownNamespaceLabsError,
|
|
501
|
+
],
|
|
502
|
+
protocol: NamespaceLabsProtocol,
|
|
503
|
+
retry: Retry.Retry,
|
|
504
|
+
telemetry: TELEMETRY,
|
|
505
|
+
span: "EnsureTenantForExternalAccount",
|
|
506
|
+
}));
|
|
507
|
+
|
|
508
|
+
export type EnsureTenantGroupError =
|
|
509
|
+
| InvalidArgument
|
|
510
|
+
| FailedPrecondition
|
|
511
|
+
| Unauthenticated
|
|
512
|
+
| PermissionDenied
|
|
513
|
+
| NotFound
|
|
514
|
+
| AlreadyExists
|
|
515
|
+
| ResourceExhausted
|
|
516
|
+
| NamespaceLabsOpError;
|
|
517
|
+
/** Creates or updates a Tenant Group. Tenant Groups are identified by name and scoped by the Namespace Partner Account. ### Errors - If one of the properties that are passed in is invalid, an `InvalidArgument` error is returned. */
|
|
518
|
+
export const ensureTenantGroup: API.OperationMethod<
|
|
519
|
+
EnsureTenantGroupRequest,
|
|
520
|
+
EnsureTenantGroupResponse,
|
|
521
|
+
EnsureTenantGroupError,
|
|
522
|
+
NamespaceLabsOpContext
|
|
523
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
524
|
+
input: __S(16, __c4, 0) as any as S.Schema<EnsureTenantGroupRequest>,
|
|
525
|
+
output: __S(17, __c4, 1) as any as S.Schema<EnsureTenantGroupResponse>,
|
|
526
|
+
errors: [
|
|
527
|
+
InvalidArgument,
|
|
528
|
+
FailedPrecondition,
|
|
529
|
+
Unauthenticated,
|
|
530
|
+
PermissionDenied,
|
|
531
|
+
NotFound,
|
|
532
|
+
AlreadyExists,
|
|
533
|
+
ResourceExhausted,
|
|
534
|
+
UnknownNamespaceLabsError,
|
|
535
|
+
],
|
|
536
|
+
protocol: NamespaceLabsProtocol,
|
|
537
|
+
retry: Retry.Retry,
|
|
538
|
+
telemetry: TELEMETRY,
|
|
539
|
+
span: "EnsureTenantGroup",
|
|
540
|
+
}));
|
|
541
|
+
|
|
542
|
+
export type ExchangeTenantTokenForClientCertError =
|
|
543
|
+
| InvalidArgument
|
|
544
|
+
| FailedPrecondition
|
|
545
|
+
| Unauthenticated
|
|
546
|
+
| PermissionDenied
|
|
547
|
+
| NotFound
|
|
548
|
+
| AlreadyExists
|
|
549
|
+
| ResourceExhausted
|
|
550
|
+
| NamespaceLabsOpError;
|
|
551
|
+
/** Exchanges tenant Bearer credentials for an X.509 client certificate with the same tenant identity and no broader permissions. */
|
|
552
|
+
export const exchangeTenantTokenForClientCert: API.OperationMethod<
|
|
553
|
+
ExchangeTenantTokenForClientCertRequest,
|
|
554
|
+
ExchangeTenantTokenForClientCertResponse,
|
|
555
|
+
ExchangeTenantTokenForClientCertError,
|
|
556
|
+
NamespaceLabsOpContext
|
|
557
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
558
|
+
input: __S(20, __c5, 0) as any as S.Schema<ExchangeTenantTokenForClientCertRequest>,
|
|
559
|
+
output: __S(21, __c5, 1) as any as S.Schema<ExchangeTenantTokenForClientCertResponse>,
|
|
560
|
+
errors: [
|
|
561
|
+
InvalidArgument,
|
|
562
|
+
FailedPrecondition,
|
|
563
|
+
Unauthenticated,
|
|
564
|
+
PermissionDenied,
|
|
565
|
+
NotFound,
|
|
566
|
+
AlreadyExists,
|
|
567
|
+
ResourceExhausted,
|
|
568
|
+
UnknownNamespaceLabsError,
|
|
569
|
+
],
|
|
570
|
+
protocol: NamespaceLabsProtocol,
|
|
571
|
+
retry: Retry.Retry,
|
|
572
|
+
telemetry: TELEMETRY,
|
|
573
|
+
span: "ExchangeTenantTokenForClientCert",
|
|
574
|
+
}));
|
|
575
|
+
|
|
576
|
+
export type IssueTenantClientCertificateError =
|
|
577
|
+
| InvalidArgument
|
|
578
|
+
| FailedPrecondition
|
|
579
|
+
| Unauthenticated
|
|
580
|
+
| PermissionDenied
|
|
581
|
+
| NotFound
|
|
582
|
+
| AlreadyExists
|
|
583
|
+
| ResourceExhausted
|
|
584
|
+
| NamespaceLabsOpError;
|
|
585
|
+
/** Produces credentials in the form of a X.509 client certificate that grant access to the specified Tenant. The credentials provided to the `IssueTenantClientCertificate` call are validated to verify they are capable of requesting credentials. */
|
|
586
|
+
export const issueTenantClientCertificate: API.OperationMethod<
|
|
587
|
+
IssueTenantClientCertificateRequest,
|
|
588
|
+
IssueTenantClientCertificateResponse,
|
|
589
|
+
IssueTenantClientCertificateError,
|
|
590
|
+
NamespaceLabsOpContext
|
|
591
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
592
|
+
input: __S(28, __c7, 0) as any as S.Schema<IssueTenantClientCertificateRequest>,
|
|
593
|
+
output: __S(29, __c7, 1) as any as S.Schema<IssueTenantClientCertificateResponse>,
|
|
594
|
+
errors: [
|
|
595
|
+
InvalidArgument,
|
|
596
|
+
FailedPrecondition,
|
|
597
|
+
Unauthenticated,
|
|
598
|
+
PermissionDenied,
|
|
599
|
+
NotFound,
|
|
600
|
+
AlreadyExists,
|
|
601
|
+
ResourceExhausted,
|
|
602
|
+
UnknownNamespaceLabsError,
|
|
603
|
+
],
|
|
604
|
+
protocol: NamespaceLabsProtocol,
|
|
605
|
+
retry: Retry.Retry,
|
|
606
|
+
telemetry: TELEMETRY,
|
|
607
|
+
span: "IssueTenantClientCertificate",
|
|
608
|
+
}));
|
|
609
|
+
|
|
610
|
+
export type IssueTenantTokenError =
|
|
611
|
+
| InvalidArgument
|
|
612
|
+
| FailedPrecondition
|
|
613
|
+
| Unauthenticated
|
|
614
|
+
| PermissionDenied
|
|
615
|
+
| NotFound
|
|
616
|
+
| AlreadyExists
|
|
617
|
+
| ResourceExhausted
|
|
618
|
+
| NamespaceLabsOpError;
|
|
619
|
+
/** Produces credentials in the form of a Bearer token that grant access to the specified Tenant. The credentials provided to the `IssueTenantToken` call are validated to verify they are capable of requesting credentials. */
|
|
620
|
+
export const issueTenantToken: API.OperationMethod<
|
|
621
|
+
IssueTenantTokenRequest,
|
|
622
|
+
IssueTenantTokenResponse,
|
|
623
|
+
IssueTenantTokenError,
|
|
624
|
+
NamespaceLabsOpContext
|
|
625
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
626
|
+
input: __S(36, __c9, 0) as any as S.Schema<IssueTenantTokenRequest>,
|
|
627
|
+
output: __S(37, __c9, 1) as any as S.Schema<IssueTenantTokenResponse>,
|
|
628
|
+
errors: [
|
|
629
|
+
InvalidArgument,
|
|
630
|
+
FailedPrecondition,
|
|
631
|
+
Unauthenticated,
|
|
632
|
+
PermissionDenied,
|
|
633
|
+
NotFound,
|
|
634
|
+
AlreadyExists,
|
|
635
|
+
ResourceExhausted,
|
|
636
|
+
UnknownNamespaceLabsError,
|
|
637
|
+
],
|
|
638
|
+
protocol: NamespaceLabsProtocol,
|
|
639
|
+
retry: Retry.Retry,
|
|
640
|
+
telemetry: TELEMETRY,
|
|
641
|
+
span: "IssueTenantToken",
|
|
642
|
+
}));
|
|
643
|
+
|
|
644
|
+
export type ListTenantGroupsError =
|
|
645
|
+
| InvalidArgument
|
|
646
|
+
| FailedPrecondition
|
|
647
|
+
| Unauthenticated
|
|
648
|
+
| PermissionDenied
|
|
649
|
+
| NotFound
|
|
650
|
+
| AlreadyExists
|
|
651
|
+
| ResourceExhausted
|
|
652
|
+
| NamespaceLabsOpError;
|
|
653
|
+
/** Lists all Tenant Groups owned by the Namespace Partner Account. */
|
|
654
|
+
export const listTenantGroups: API.OperationMethod<
|
|
655
|
+
ListTenantGroupsRequest,
|
|
656
|
+
ListTenantGroupsResponse,
|
|
657
|
+
ListTenantGroupsError,
|
|
658
|
+
NamespaceLabsOpContext
|
|
659
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
660
|
+
input: __S(40, __c10, 0) as any as S.Schema<ListTenantGroupsRequest>,
|
|
661
|
+
output: __S(43, __c10, 3) as any as S.Schema<ListTenantGroupsResponse>,
|
|
662
|
+
errors: [
|
|
663
|
+
InvalidArgument,
|
|
664
|
+
FailedPrecondition,
|
|
665
|
+
Unauthenticated,
|
|
666
|
+
PermissionDenied,
|
|
667
|
+
NotFound,
|
|
668
|
+
AlreadyExists,
|
|
669
|
+
ResourceExhausted,
|
|
670
|
+
UnknownNamespaceLabsError,
|
|
671
|
+
],
|
|
672
|
+
protocol: NamespaceLabsProtocol,
|
|
673
|
+
retry: Retry.Retry,
|
|
674
|
+
telemetry: TELEMETRY,
|
|
675
|
+
span: "ListTenantGroups",
|
|
676
|
+
}));
|
|
677
|
+
|
|
678
|
+
export type ListTenantsError =
|
|
679
|
+
| InvalidArgument
|
|
680
|
+
| FailedPrecondition
|
|
681
|
+
| Unauthenticated
|
|
682
|
+
| PermissionDenied
|
|
683
|
+
| NotFound
|
|
684
|
+
| AlreadyExists
|
|
685
|
+
| ResourceExhausted
|
|
686
|
+
| NamespaceLabsOpError;
|
|
687
|
+
/** Lists all tenants that match the criteria specified. */
|
|
688
|
+
export const listTenants: API.PaginatedOperationMethod<
|
|
689
|
+
ListTenantsRequest,
|
|
690
|
+
ListTenantsResponse,
|
|
691
|
+
ListTenantsError,
|
|
692
|
+
NamespaceLabsOpContext,
|
|
693
|
+
Tenant
|
|
694
|
+
> = /*@__PURE__*/ API.makePaginated(
|
|
695
|
+
() => ({
|
|
696
|
+
input: __S(44, __c11, 0) as any as S.Schema<ListTenantsRequest>,
|
|
697
|
+
output: __S(46, __c11, 2) as any as S.Schema<ListTenantsResponse>,
|
|
698
|
+
errors: [
|
|
699
|
+
InvalidArgument,
|
|
700
|
+
FailedPrecondition,
|
|
701
|
+
Unauthenticated,
|
|
702
|
+
PermissionDenied,
|
|
703
|
+
NotFound,
|
|
704
|
+
AlreadyExists,
|
|
705
|
+
ResourceExhausted,
|
|
706
|
+
UnknownNamespaceLabsError,
|
|
707
|
+
],
|
|
708
|
+
protocol: NamespaceLabsProtocol,
|
|
709
|
+
retry: Retry.Retry,
|
|
710
|
+
telemetry: TELEMETRY,
|
|
711
|
+
span: "ListTenants",
|
|
712
|
+
pagination: {
|
|
713
|
+
mode: "cursor",
|
|
714
|
+
inputToken: "cursor",
|
|
715
|
+
outputToken: "cursor",
|
|
716
|
+
items: "tenants",
|
|
717
|
+
pageSize: "limit",
|
|
718
|
+
} as const,
|
|
719
|
+
}),
|
|
720
|
+
paginateCursor,
|
|
721
|
+
) as any;
|
|
722
|
+
|
|
723
|
+
export type RemoveTenantError =
|
|
724
|
+
| InvalidArgument
|
|
725
|
+
| FailedPrecondition
|
|
726
|
+
| Unauthenticated
|
|
727
|
+
| PermissionDenied
|
|
728
|
+
| NotFound
|
|
729
|
+
| AlreadyExists
|
|
730
|
+
| ResourceExhausted
|
|
731
|
+
| NamespaceLabsOpError;
|
|
732
|
+
/** Instructs the platform to remove a Tenant. Removing a Tenant is unreversible. It both prevents new tenant credentials to be generated, but will also propagate to Compute and other infrastructure to remove or cordon resources owned by the Tenant. It is not guaranteed that resources owned by a Tenant are removed immediately; they may be subject to garbage collection policies deployed within the platform. To request the immediate removal of Tenant resources, contact `support@namespace.so`. ### Errors - If the tenant referenced does not exist, a `NotFound` status is returned. */
|
|
733
|
+
export const removeTenant: API.OperationMethod<
|
|
734
|
+
RemoveTenantRequest,
|
|
735
|
+
RemoveTenantResponse,
|
|
736
|
+
RemoveTenantError,
|
|
737
|
+
NamespaceLabsOpContext
|
|
738
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
739
|
+
input: __S(48, __c12, 0) as any as S.Schema<RemoveTenantRequest>,
|
|
740
|
+
output: __S(88, __c22, 0) as any as S.Schema<RemoveTenantResponse>,
|
|
741
|
+
errors: [
|
|
742
|
+
InvalidArgument,
|
|
743
|
+
FailedPrecondition,
|
|
744
|
+
Unauthenticated,
|
|
745
|
+
PermissionDenied,
|
|
746
|
+
NotFound,
|
|
747
|
+
AlreadyExists,
|
|
748
|
+
ResourceExhausted,
|
|
749
|
+
UnknownNamespaceLabsError,
|
|
750
|
+
],
|
|
751
|
+
protocol: NamespaceLabsProtocol,
|
|
752
|
+
retry: Retry.Retry,
|
|
753
|
+
telemetry: TELEMETRY,
|
|
754
|
+
span: "RemoveTenant",
|
|
755
|
+
}));
|
|
756
|
+
|
|
757
|
+
export type ResumeTenantError =
|
|
758
|
+
| InvalidArgument
|
|
759
|
+
| FailedPrecondition
|
|
760
|
+
| Unauthenticated
|
|
761
|
+
| PermissionDenied
|
|
762
|
+
| NotFound
|
|
763
|
+
| AlreadyExists
|
|
764
|
+
| ResourceExhausted
|
|
765
|
+
| NamespaceLabsOpError;
|
|
766
|
+
/** Un-suspends a previously suspended Tenant. If the Tenant was not suspended, it is a no-op. ### Errors - If the tenant referenced does not exist, a `NotFound` status is returned. */
|
|
767
|
+
export const resumeTenant: API.OperationMethod<
|
|
768
|
+
ResumeTenantRequest,
|
|
769
|
+
ResumeTenantResponse,
|
|
770
|
+
ResumeTenantError,
|
|
771
|
+
NamespaceLabsOpContext
|
|
772
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
773
|
+
input: __S(52, __c13, 0) as any as S.Schema<ResumeTenantRequest>,
|
|
774
|
+
output: __S(88, __c22, 0) as any as S.Schema<ResumeTenantResponse>,
|
|
775
|
+
errors: [
|
|
776
|
+
InvalidArgument,
|
|
777
|
+
FailedPrecondition,
|
|
778
|
+
Unauthenticated,
|
|
779
|
+
PermissionDenied,
|
|
780
|
+
NotFound,
|
|
781
|
+
AlreadyExists,
|
|
782
|
+
ResourceExhausted,
|
|
783
|
+
UnknownNamespaceLabsError,
|
|
784
|
+
],
|
|
785
|
+
protocol: NamespaceLabsProtocol,
|
|
786
|
+
retry: Retry.Retry,
|
|
787
|
+
telemetry: TELEMETRY,
|
|
788
|
+
span: "ResumeTenant",
|
|
789
|
+
}));
|
|
790
|
+
|
|
791
|
+
export type SuspendTenantError =
|
|
792
|
+
| InvalidArgument
|
|
793
|
+
| FailedPrecondition
|
|
794
|
+
| Unauthenticated
|
|
795
|
+
| PermissionDenied
|
|
796
|
+
| NotFound
|
|
797
|
+
| AlreadyExists
|
|
798
|
+
| ResourceExhausted
|
|
799
|
+
| NamespaceLabsOpError;
|
|
800
|
+
/** Suspending a Tenant prevents it from creating new resources, but does not immediately terminate resources it owns that may be running. Suspending a tenant is a useful operational utility that can be used to cordon a particular user, without requiring removing resources that that user owns. ### Errors - If the tenant referenced does not exist, a `NotFound` status is returned. */
|
|
801
|
+
export const suspendTenant: API.OperationMethod<
|
|
802
|
+
SuspendTenantRequest,
|
|
803
|
+
SuspendTenantResponse,
|
|
804
|
+
SuspendTenantError,
|
|
805
|
+
NamespaceLabsOpContext
|
|
806
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
807
|
+
input: __S(56, __c14, 0) as any as S.Schema<SuspendTenantRequest>,
|
|
808
|
+
output: __S(88, __c22, 0) as any as S.Schema<SuspendTenantResponse>,
|
|
809
|
+
errors: [
|
|
810
|
+
InvalidArgument,
|
|
811
|
+
FailedPrecondition,
|
|
812
|
+
Unauthenticated,
|
|
813
|
+
PermissionDenied,
|
|
814
|
+
NotFound,
|
|
815
|
+
AlreadyExists,
|
|
816
|
+
ResourceExhausted,
|
|
817
|
+
UnknownNamespaceLabsError,
|
|
818
|
+
],
|
|
819
|
+
protocol: NamespaceLabsProtocol,
|
|
820
|
+
retry: Retry.Retry,
|
|
821
|
+
telemetry: TELEMETRY,
|
|
822
|
+
span: "SuspendTenant",
|
|
823
|
+
}));
|
|
824
|
+
|
|
825
|
+
export type UpdatePoliciesError =
|
|
826
|
+
| InvalidArgument
|
|
827
|
+
| FailedPrecondition
|
|
828
|
+
| Unauthenticated
|
|
829
|
+
| PermissionDenied
|
|
830
|
+
| NotFound
|
|
831
|
+
| AlreadyExists
|
|
832
|
+
| ResourceExhausted
|
|
833
|
+
| NamespaceLabsOpError;
|
|
834
|
+
/** Updates policies attached to a Tenant. Requires either a partner token, or an admin-scoped tenant token. ### Errors - If one of the properties that are passed in is invalid, an `InvalidArgument` error is returned. */
|
|
835
|
+
export const updatePolicies: API.OperationMethod<
|
|
836
|
+
UpdatePoliciesRequest,
|
|
837
|
+
UpdatePoliciesResponse,
|
|
838
|
+
UpdatePoliciesError,
|
|
839
|
+
NamespaceLabsOpContext
|
|
840
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
841
|
+
input: __S(60, __c15, 0) as any as S.Schema<UpdatePoliciesRequest>,
|
|
842
|
+
output: __S(88, __c22, 0) as any as S.Schema<UpdatePoliciesResponse>,
|
|
843
|
+
errors: [
|
|
844
|
+
InvalidArgument,
|
|
845
|
+
FailedPrecondition,
|
|
846
|
+
Unauthenticated,
|
|
847
|
+
PermissionDenied,
|
|
848
|
+
NotFound,
|
|
849
|
+
AlreadyExists,
|
|
850
|
+
ResourceExhausted,
|
|
851
|
+
UnknownNamespaceLabsError,
|
|
852
|
+
],
|
|
853
|
+
protocol: NamespaceLabsProtocol,
|
|
854
|
+
retry: Retry.Retry,
|
|
855
|
+
telemetry: TELEMETRY,
|
|
856
|
+
span: "UpdatePolicies",
|
|
857
|
+
}));
|
|
858
|
+
|
|
859
|
+
export type UpdateTenantError =
|
|
860
|
+
| InvalidArgument
|
|
861
|
+
| FailedPrecondition
|
|
862
|
+
| Unauthenticated
|
|
863
|
+
| PermissionDenied
|
|
864
|
+
| NotFound
|
|
865
|
+
| AlreadyExists
|
|
866
|
+
| ResourceExhausted
|
|
867
|
+
| NamespaceLabsOpError;
|
|
868
|
+
/** Updates policies attached to a Tenant. ### Errors - If one of the properties that are passed in is invalid, an `InvalidArgument` error is returned. */
|
|
869
|
+
export const updateTenant: API.OperationMethod<
|
|
870
|
+
UpdateTenantRequest,
|
|
871
|
+
UpdateTenantResponse,
|
|
872
|
+
UpdateTenantError,
|
|
873
|
+
NamespaceLabsOpContext
|
|
874
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
875
|
+
input: __S(64, __c16, 0) as any as S.Schema<UpdateTenantRequest>,
|
|
876
|
+
output: __S(76, __c19, 0) as any as S.Schema<UpdateTenantResponse>,
|
|
877
|
+
errors: [
|
|
878
|
+
InvalidArgument,
|
|
879
|
+
FailedPrecondition,
|
|
880
|
+
Unauthenticated,
|
|
881
|
+
PermissionDenied,
|
|
882
|
+
NotFound,
|
|
883
|
+
AlreadyExists,
|
|
884
|
+
ResourceExhausted,
|
|
885
|
+
UnknownNamespaceLabsError,
|
|
886
|
+
],
|
|
887
|
+
protocol: NamespaceLabsProtocol,
|
|
888
|
+
retry: Retry.Retry,
|
|
889
|
+
telemetry: TELEMETRY,
|
|
890
|
+
span: "UpdateTenant",
|
|
891
|
+
}));
|
|
892
|
+
|
|
893
|
+
// Schema builders: each runs one schema initializer, on that schema's first use.
|
|
894
|
+
function __c0(j: number): any {
|
|
895
|
+
switch (j) {
|
|
896
|
+
case 0:
|
|
897
|
+
return S.suspend(() =>
|
|
898
|
+
S.Struct({
|
|
899
|
+
name: S.optional(S.String),
|
|
900
|
+
}).pipe(
|
|
901
|
+
T.Http({
|
|
902
|
+
method: "POST",
|
|
903
|
+
uri: "/namespace.cloud.iam.v1beta.TenantService/DescribeTenantGroup",
|
|
904
|
+
code: 200,
|
|
905
|
+
}),
|
|
906
|
+
),
|
|
907
|
+
).annotate({ identifier: "DescribeTenantGroupRequest" });
|
|
908
|
+
case 1:
|
|
909
|
+
return S.suspend(() =>
|
|
910
|
+
S.Struct({
|
|
911
|
+
name: S.String,
|
|
912
|
+
policies: __S(9, __c2, 1),
|
|
913
|
+
enrolledTenantIds: __S(4, __c1, 0),
|
|
914
|
+
versions: __S(9, __c2, 1),
|
|
915
|
+
}),
|
|
916
|
+
).annotate({ identifier: "DescribeTenantGroupResponse" });
|
|
917
|
+
}
|
|
918
|
+
}
|
|
919
|
+
function __c1(j: number): any {
|
|
920
|
+
switch (j) {
|
|
921
|
+
case 0:
|
|
922
|
+
return S.Array(S.String);
|
|
923
|
+
}
|
|
924
|
+
}
|
|
925
|
+
function __c2(j: number): any {
|
|
926
|
+
switch (j) {
|
|
927
|
+
case 0:
|
|
928
|
+
return S.suspend(() =>
|
|
929
|
+
S.Struct({
|
|
930
|
+
policy: S.optional(S.String),
|
|
931
|
+
value: S.optional(S.String),
|
|
932
|
+
}),
|
|
933
|
+
).annotate({ identifier: "TenantGroupPolicy" });
|
|
934
|
+
case 1:
|
|
935
|
+
return S.Array(__S(8, __c2, 0));
|
|
936
|
+
}
|
|
937
|
+
}
|
|
938
|
+
function __c3(j: number): any {
|
|
939
|
+
switch (j) {
|
|
940
|
+
case 0:
|
|
941
|
+
return S.suspend(() =>
|
|
942
|
+
S.Struct({
|
|
943
|
+
visibleName: S.optional(S.String),
|
|
944
|
+
policies: S.optional(__S(82, __c20, 2)),
|
|
945
|
+
externalAccountId: S.optional(S.String),
|
|
946
|
+
labels: S.optional(__S(73, __c18, 1)),
|
|
947
|
+
enrolledGroups: S.optional(__S(4, __c1, 0)),
|
|
948
|
+
}).pipe(
|
|
949
|
+
T.Http({
|
|
950
|
+
method: "POST",
|
|
951
|
+
uri: "/namespace.cloud.iam.v1beta.TenantService/EnsureTenantForExternalAccount",
|
|
952
|
+
code: 200,
|
|
953
|
+
}),
|
|
954
|
+
),
|
|
955
|
+
).annotate({ identifier: "EnsureTenantForExternalAccountRequest" });
|
|
956
|
+
}
|
|
957
|
+
}
|
|
958
|
+
function __c4(j: number): any {
|
|
959
|
+
switch (j) {
|
|
960
|
+
case 0:
|
|
961
|
+
return S.suspend(() =>
|
|
962
|
+
S.Struct({
|
|
963
|
+
name: S.optional(S.String),
|
|
964
|
+
policies: S.optional(__S(9, __c2, 1)),
|
|
965
|
+
}).pipe(
|
|
966
|
+
T.Http({
|
|
967
|
+
method: "POST",
|
|
968
|
+
uri: "/namespace.cloud.iam.v1beta.TenantService/EnsureTenantGroup",
|
|
969
|
+
code: 200,
|
|
970
|
+
}),
|
|
971
|
+
),
|
|
972
|
+
).annotate({ identifier: "EnsureTenantGroupRequest" });
|
|
973
|
+
case 1:
|
|
974
|
+
return S.suspend(() =>
|
|
975
|
+
S.Struct({
|
|
976
|
+
name: S.String,
|
|
977
|
+
}),
|
|
978
|
+
).annotate({ identifier: "EnsureTenantGroupResponse" });
|
|
979
|
+
}
|
|
980
|
+
}
|
|
981
|
+
function __c5(j: number): any {
|
|
982
|
+
switch (j) {
|
|
983
|
+
case 0:
|
|
984
|
+
return S.suspend(() =>
|
|
985
|
+
S.Struct({
|
|
986
|
+
publicKeyPem: S.optional(S.String),
|
|
987
|
+
permissions: S.optional(__S(25, __c6, 1)),
|
|
988
|
+
}).pipe(
|
|
989
|
+
T.Http({
|
|
990
|
+
method: "POST",
|
|
991
|
+
uri: "/namespace.cloud.iam.v1beta.TenantService/ExchangeTenantTokenForClientCert",
|
|
992
|
+
code: 200,
|
|
993
|
+
}),
|
|
994
|
+
),
|
|
995
|
+
).annotate({ identifier: "ExchangeTenantTokenForClientCertRequest" });
|
|
996
|
+
case 1:
|
|
997
|
+
return S.suspend(() =>
|
|
998
|
+
S.Struct({
|
|
999
|
+
clientCertificatePem: S.String,
|
|
1000
|
+
}),
|
|
1001
|
+
).annotate({ identifier: "ExchangeTenantTokenForClientCertResponse" });
|
|
1002
|
+
}
|
|
1003
|
+
}
|
|
1004
|
+
function __c6(j: number): any {
|
|
1005
|
+
switch (j) {
|
|
1006
|
+
case 0:
|
|
1007
|
+
return S.suspend(() =>
|
|
1008
|
+
S.Struct({
|
|
1009
|
+
resourceType: S.optional(S.String),
|
|
1010
|
+
resourceId: S.optional(S.String),
|
|
1011
|
+
actions: S.optional(__S(4, __c1, 0)),
|
|
1012
|
+
}),
|
|
1013
|
+
).annotate({ identifier: "Permission" });
|
|
1014
|
+
case 1:
|
|
1015
|
+
return S.Array(__S(24, __c6, 0));
|
|
1016
|
+
}
|
|
1017
|
+
}
|
|
1018
|
+
function __c7(j: number): any {
|
|
1019
|
+
switch (j) {
|
|
1020
|
+
case 0:
|
|
1021
|
+
return S.suspend(() =>
|
|
1022
|
+
S.Struct({
|
|
1023
|
+
tenantId: S.optional(S.String),
|
|
1024
|
+
actorId: S.optional(S.String),
|
|
1025
|
+
durationSecs: S.optional(S.String),
|
|
1026
|
+
policies: S.optional(__S(33, __c8, 1)),
|
|
1027
|
+
access: S.optional(__S(34, __c8, 2)),
|
|
1028
|
+
publicKeyPem: S.optional(S.String),
|
|
1029
|
+
}).pipe(
|
|
1030
|
+
T.Http({
|
|
1031
|
+
method: "POST",
|
|
1032
|
+
uri: "/namespace.cloud.iam.v1beta.TenantService/IssueTenantClientCertificate",
|
|
1033
|
+
code: 200,
|
|
1034
|
+
}),
|
|
1035
|
+
),
|
|
1036
|
+
).annotate({ identifier: "IssueTenantClientCertificateRequest" });
|
|
1037
|
+
case 1:
|
|
1038
|
+
return S.suspend(() =>
|
|
1039
|
+
S.Struct({
|
|
1040
|
+
clientCertificatePem: S.String,
|
|
1041
|
+
privateKeyPem: S.String.pipe(T.SensitiveValue({})),
|
|
1042
|
+
}),
|
|
1043
|
+
).annotate({ identifier: "IssueTenantClientCertificateResponse" });
|
|
1044
|
+
}
|
|
1045
|
+
}
|
|
1046
|
+
function __c8(j: number): any {
|
|
1047
|
+
switch (j) {
|
|
1048
|
+
case 0:
|
|
1049
|
+
return S.suspend(() =>
|
|
1050
|
+
S.Struct({
|
|
1051
|
+
policyType: S.optional(S.String),
|
|
1052
|
+
value: S.optional(S.String),
|
|
1053
|
+
}),
|
|
1054
|
+
).annotate({ identifier: "TenantTokenPolicy" });
|
|
1055
|
+
case 1:
|
|
1056
|
+
return S.Array(__S(32, __c8, 0));
|
|
1057
|
+
case 2:
|
|
1058
|
+
return S.suspend(() =>
|
|
1059
|
+
S.Struct({
|
|
1060
|
+
grants: S.optional(__S(25, __c6, 1)),
|
|
1061
|
+
}),
|
|
1062
|
+
).annotate({ identifier: "AccessPolicy" });
|
|
1063
|
+
}
|
|
1064
|
+
}
|
|
1065
|
+
function __c9(j: number): any {
|
|
1066
|
+
switch (j) {
|
|
1067
|
+
case 0:
|
|
1068
|
+
return S.suspend(() =>
|
|
1069
|
+
S.Struct({
|
|
1070
|
+
tenantId: S.optional(S.String),
|
|
1071
|
+
actorId: S.optional(S.String),
|
|
1072
|
+
durationSecs: S.optional(S.String),
|
|
1073
|
+
policies: S.optional(__S(33, __c8, 1)),
|
|
1074
|
+
access: S.optional(__S(34, __c8, 2)),
|
|
1075
|
+
}).pipe(
|
|
1076
|
+
T.Http({
|
|
1077
|
+
method: "POST",
|
|
1078
|
+
uri: "/namespace.cloud.iam.v1beta.TenantService/IssueTenantToken",
|
|
1079
|
+
code: 200,
|
|
1080
|
+
}),
|
|
1081
|
+
),
|
|
1082
|
+
).annotate({ identifier: "IssueTenantTokenRequest" });
|
|
1083
|
+
case 1:
|
|
1084
|
+
return S.suspend(() =>
|
|
1085
|
+
S.Struct({
|
|
1086
|
+
bearerToken: S.String.pipe(T.SensitiveValue({})),
|
|
1087
|
+
}),
|
|
1088
|
+
).annotate({ identifier: "IssueTenantTokenResponse" });
|
|
1089
|
+
}
|
|
1090
|
+
}
|
|
1091
|
+
function __c10(j: number): any {
|
|
1092
|
+
switch (j) {
|
|
1093
|
+
case 0:
|
|
1094
|
+
return S.suspend(() =>
|
|
1095
|
+
S.Struct({}).pipe(
|
|
1096
|
+
T.Http({
|
|
1097
|
+
method: "POST",
|
|
1098
|
+
uri: "/namespace.cloud.iam.v1beta.TenantService/ListTenantGroups",
|
|
1099
|
+
code: 200,
|
|
1100
|
+
}),
|
|
1101
|
+
),
|
|
1102
|
+
).annotate({ identifier: "ListTenantGroupsRequest" });
|
|
1103
|
+
case 1:
|
|
1104
|
+
return S.suspend(() =>
|
|
1105
|
+
S.Struct({
|
|
1106
|
+
name: S.String,
|
|
1107
|
+
policies: __S(9, __c2, 1),
|
|
1108
|
+
versions: __S(9, __c2, 1),
|
|
1109
|
+
}),
|
|
1110
|
+
).annotate({ identifier: "ListTenantGroupsResponseTenantGroup" });
|
|
1111
|
+
case 2:
|
|
1112
|
+
return S.Array(__S(41, __c10, 1));
|
|
1113
|
+
case 3:
|
|
1114
|
+
return S.suspend(() =>
|
|
1115
|
+
S.Struct({
|
|
1116
|
+
tenantGroups: __S(42, __c10, 2),
|
|
1117
|
+
}),
|
|
1118
|
+
).annotate({ identifier: "ListTenantGroupsResponse" });
|
|
1119
|
+
}
|
|
1120
|
+
}
|
|
1121
|
+
function __c11(j: number): any {
|
|
1122
|
+
switch (j) {
|
|
1123
|
+
case 0:
|
|
1124
|
+
return S.suspend(() =>
|
|
1125
|
+
S.Struct({
|
|
1126
|
+
limit: S.optional(S.Number),
|
|
1127
|
+
cursor: S.optional(S.String),
|
|
1128
|
+
creatorId: S.optional(S.String),
|
|
1129
|
+
externalAccountId: S.optional(S.String),
|
|
1130
|
+
}).pipe(
|
|
1131
|
+
T.Http({
|
|
1132
|
+
method: "POST",
|
|
1133
|
+
uri: "/namespace.cloud.iam.v1beta.TenantService/ListTenants",
|
|
1134
|
+
code: 200,
|
|
1135
|
+
}),
|
|
1136
|
+
),
|
|
1137
|
+
).annotate({ identifier: "ListTenantsRequest" });
|
|
1138
|
+
case 1:
|
|
1139
|
+
return S.Array(__S(74, __c18, 2));
|
|
1140
|
+
case 2:
|
|
1141
|
+
return S.suspend(() =>
|
|
1142
|
+
S.Struct({
|
|
1143
|
+
tenants: __S(45, __c11, 1),
|
|
1144
|
+
cursor: S.String,
|
|
1145
|
+
}),
|
|
1146
|
+
).annotate({ identifier: "ListTenantsResponse" });
|
|
1147
|
+
}
|
|
1148
|
+
}
|
|
1149
|
+
function __c12(j: number): any {
|
|
1150
|
+
switch (j) {
|
|
1151
|
+
case 0:
|
|
1152
|
+
return S.suspend(() =>
|
|
1153
|
+
S.Struct({
|
|
1154
|
+
tenantId: S.optional(S.String),
|
|
1155
|
+
}).pipe(
|
|
1156
|
+
T.Http({
|
|
1157
|
+
method: "POST",
|
|
1158
|
+
uri: "/namespace.cloud.iam.v1beta.TenantService/RemoveTenant",
|
|
1159
|
+
code: 200,
|
|
1160
|
+
}),
|
|
1161
|
+
),
|
|
1162
|
+
).annotate({ identifier: "RemoveTenantRequest" });
|
|
1163
|
+
}
|
|
1164
|
+
}
|
|
1165
|
+
function __c13(j: number): any {
|
|
1166
|
+
switch (j) {
|
|
1167
|
+
case 0:
|
|
1168
|
+
return S.suspend(() =>
|
|
1169
|
+
S.Struct({
|
|
1170
|
+
tenantId: S.optional(S.String),
|
|
1171
|
+
}).pipe(
|
|
1172
|
+
T.Http({
|
|
1173
|
+
method: "POST",
|
|
1174
|
+
uri: "/namespace.cloud.iam.v1beta.TenantService/ResumeTenant",
|
|
1175
|
+
code: 200,
|
|
1176
|
+
}),
|
|
1177
|
+
),
|
|
1178
|
+
).annotate({ identifier: "ResumeTenantRequest" });
|
|
1179
|
+
}
|
|
1180
|
+
}
|
|
1181
|
+
function __c14(j: number): any {
|
|
1182
|
+
switch (j) {
|
|
1183
|
+
case 0:
|
|
1184
|
+
return S.suspend(() =>
|
|
1185
|
+
S.Struct({
|
|
1186
|
+
tenantId: S.optional(S.String),
|
|
1187
|
+
}).pipe(
|
|
1188
|
+
T.Http({
|
|
1189
|
+
method: "POST",
|
|
1190
|
+
uri: "/namespace.cloud.iam.v1beta.TenantService/SuspendTenant",
|
|
1191
|
+
code: 200,
|
|
1192
|
+
}),
|
|
1193
|
+
),
|
|
1194
|
+
).annotate({ identifier: "SuspendTenantRequest" });
|
|
1195
|
+
}
|
|
1196
|
+
}
|
|
1197
|
+
function __c15(j: number): any {
|
|
1198
|
+
switch (j) {
|
|
1199
|
+
case 0:
|
|
1200
|
+
return S.suspend(() =>
|
|
1201
|
+
S.Struct({
|
|
1202
|
+
tenantId: S.optional(S.String),
|
|
1203
|
+
policies: S.optional(__S(82, __c20, 2)),
|
|
1204
|
+
revision: S.optional(S.String),
|
|
1205
|
+
}).pipe(
|
|
1206
|
+
T.Http({
|
|
1207
|
+
method: "POST",
|
|
1208
|
+
uri: "/namespace.cloud.iam.v1beta.TenantService/UpdatePolicies",
|
|
1209
|
+
code: 200,
|
|
1210
|
+
}),
|
|
1211
|
+
),
|
|
1212
|
+
).annotate({ identifier: "UpdatePoliciesRequest" });
|
|
1213
|
+
}
|
|
1214
|
+
}
|
|
1215
|
+
function __c16(j: number): any {
|
|
1216
|
+
switch (j) {
|
|
1217
|
+
case 0:
|
|
1218
|
+
return S.suspend(() =>
|
|
1219
|
+
S.Struct({
|
|
1220
|
+
tenantId: S.optional(S.String),
|
|
1221
|
+
visibleName: S.optional(S.String),
|
|
1222
|
+
policies: S.optional(__S(82, __c20, 2)),
|
|
1223
|
+
labels: S.optional(__S(73, __c18, 1)),
|
|
1224
|
+
}).pipe(
|
|
1225
|
+
T.Http({
|
|
1226
|
+
method: "POST",
|
|
1227
|
+
uri: "/namespace.cloud.iam.v1beta.TenantService/UpdateTenant",
|
|
1228
|
+
code: 200,
|
|
1229
|
+
}),
|
|
1230
|
+
),
|
|
1231
|
+
).annotate({ identifier: "UpdateTenantRequest" });
|
|
1232
|
+
}
|
|
1233
|
+
}
|
|
1234
|
+
function __c17(j: number): any {
|
|
1235
|
+
switch (j) {
|
|
1236
|
+
case 0:
|
|
1237
|
+
return S.suspend(() =>
|
|
1238
|
+
S.Struct({
|
|
1239
|
+
creatorId: S.optional(S.String),
|
|
1240
|
+
visibleName: S.optional(S.String),
|
|
1241
|
+
policies: S.optional(__S(82, __c20, 2)),
|
|
1242
|
+
externalAccountId: S.optional(S.String),
|
|
1243
|
+
labels: S.optional(__S(73, __c18, 1)),
|
|
1244
|
+
}).pipe(
|
|
1245
|
+
T.Http({
|
|
1246
|
+
method: "POST",
|
|
1247
|
+
uri: "/namespace.cloud.iam.v1beta.TenantService/CreateTenant",
|
|
1248
|
+
code: 200,
|
|
1249
|
+
}),
|
|
1250
|
+
),
|
|
1251
|
+
).annotate({ identifier: "CreateTenantRequest" });
|
|
1252
|
+
}
|
|
1253
|
+
}
|
|
1254
|
+
function __c18(j: number): any {
|
|
1255
|
+
switch (j) {
|
|
1256
|
+
case 0:
|
|
1257
|
+
return S.suspend(() =>
|
|
1258
|
+
S.Struct({
|
|
1259
|
+
name: S.optional(S.String),
|
|
1260
|
+
value: S.optional(S.String),
|
|
1261
|
+
}),
|
|
1262
|
+
).annotate({ identifier: "Label" });
|
|
1263
|
+
case 1:
|
|
1264
|
+
return S.Array(__S(72, __c18, 0));
|
|
1265
|
+
case 2:
|
|
1266
|
+
return S.suspend(() =>
|
|
1267
|
+
S.Struct({
|
|
1268
|
+
id: S.String,
|
|
1269
|
+
creatorId: S.String,
|
|
1270
|
+
externalAccountId: S.String,
|
|
1271
|
+
createdAt: S.optional(S.String),
|
|
1272
|
+
visibleName: S.String,
|
|
1273
|
+
labels: __S(73, __c18, 1),
|
|
1274
|
+
}),
|
|
1275
|
+
).annotate({ identifier: "Tenant" });
|
|
1276
|
+
}
|
|
1277
|
+
}
|
|
1278
|
+
function __c19(j: number): any {
|
|
1279
|
+
switch (j) {
|
|
1280
|
+
case 0:
|
|
1281
|
+
return S.suspend(() =>
|
|
1282
|
+
S.Struct({
|
|
1283
|
+
tenant: S.optional(__S(74, __c18, 2)),
|
|
1284
|
+
}),
|
|
1285
|
+
).annotate({ identifier: "CreateTenantResponse" });
|
|
1286
|
+
}
|
|
1287
|
+
}
|
|
1288
|
+
function __c20(j: number): any {
|
|
1289
|
+
switch (j) {
|
|
1290
|
+
case 0:
|
|
1291
|
+
return S.suspend(() =>
|
|
1292
|
+
S.Struct({
|
|
1293
|
+
expiresAt: S.optional(S.String),
|
|
1294
|
+
}),
|
|
1295
|
+
).annotate({ identifier: "TenantPolicyExpirationPolicy" });
|
|
1296
|
+
case 1:
|
|
1297
|
+
return S.suspend(() =>
|
|
1298
|
+
S.Struct({
|
|
1299
|
+
id: S.optional(S.String),
|
|
1300
|
+
policy: S.optional(S.String),
|
|
1301
|
+
value: S.optional(S.String),
|
|
1302
|
+
expirationPolicy: S.optional(__S(80, __c20, 0)),
|
|
1303
|
+
}),
|
|
1304
|
+
).annotate({ identifier: "TenantPolicy" });
|
|
1305
|
+
case 2:
|
|
1306
|
+
return S.Array(__S(81, __c20, 1));
|
|
1307
|
+
}
|
|
1308
|
+
}
|
|
1309
|
+
function __c21(j: number): any {
|
|
1310
|
+
switch (j) {
|
|
1311
|
+
case 0:
|
|
1312
|
+
return S.suspend(() =>
|
|
1313
|
+
S.Struct({
|
|
1314
|
+
name: S.optional(S.String),
|
|
1315
|
+
}).pipe(
|
|
1316
|
+
T.Http({
|
|
1317
|
+
method: "POST",
|
|
1318
|
+
uri: "/namespace.cloud.iam.v1beta.TenantService/DeleteTenantGroup",
|
|
1319
|
+
code: 200,
|
|
1320
|
+
}),
|
|
1321
|
+
),
|
|
1322
|
+
).annotate({ identifier: "DeleteTenantGroupRequest" });
|
|
1323
|
+
}
|
|
1324
|
+
}
|
|
1325
|
+
function __c22(j: number): any {
|
|
1326
|
+
switch (j) {
|
|
1327
|
+
case 0:
|
|
1328
|
+
return S.suspend(() => S.Struct({})).annotate({ identifier: "DeleteTenantGroupResponse" });
|
|
1329
|
+
}
|
|
1330
|
+
}
|
|
1331
|
+
function __c23(j: number): any {
|
|
1332
|
+
switch (j) {
|
|
1333
|
+
case 0:
|
|
1334
|
+
return S.suspend(() =>
|
|
1335
|
+
S.Struct({}).pipe(
|
|
1336
|
+
T.Http({
|
|
1337
|
+
method: "POST",
|
|
1338
|
+
uri: "/namespace.cloud.iam.v1beta.TenantService/DescribePolicies",
|
|
1339
|
+
code: 200,
|
|
1340
|
+
}),
|
|
1341
|
+
),
|
|
1342
|
+
).annotate({ identifier: "DescribePoliciesRequest" });
|
|
1343
|
+
case 1:
|
|
1344
|
+
return S.suspend(() =>
|
|
1345
|
+
S.Struct({
|
|
1346
|
+
policies: __S(82, __c20, 2),
|
|
1347
|
+
revision: S.String,
|
|
1348
|
+
}),
|
|
1349
|
+
).annotate({ identifier: "DescribePoliciesResponse" });
|
|
1350
|
+
}
|
|
1351
|
+
}
|
|
1352
|
+
// Schema table: entry i is schema j of builder f, made on first reach.
|
|
1353
|
+
function __S(i: number, f: (j: number) => unknown, j: number): any {
|
|
1354
|
+
return (__s[i] ??= __L.at(f, j));
|
|
1355
|
+
}
|