@distilled.cloud/namespacelabs 0.0.0 → 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 +121 -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 +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 +82 -2
- 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,249 @@
|
|
|
1
|
+
import * as API from "@distilled.cloud/core/api";
|
|
2
|
+
import * as S from "@distilled.cloud/core/schema-lite";
|
|
3
|
+
import type * as Redacted from "effect/Redacted";
|
|
4
|
+
import { type NamespaceLabsOpError, type NamespaceLabsOpContext } from "../protocol.ts";
|
|
5
|
+
export type { NamespaceLabsOpError, NamespaceLabsOpContext };
|
|
6
|
+
declare const AlreadyExists_base: S.TaggedErrorClass<"AlreadyExists", {
|
|
7
|
+
readonly message: any;
|
|
8
|
+
readonly body: any;
|
|
9
|
+
}> & (new (...args: any[]) => {
|
|
10
|
+
"@distilled.cloud/error/categories": {
|
|
11
|
+
ConflictError: true;
|
|
12
|
+
};
|
|
13
|
+
});
|
|
14
|
+
export declare class AlreadyExists extends /*@__PURE__*/ AlreadyExists_base {
|
|
15
|
+
}
|
|
16
|
+
declare const FailedPrecondition_base: S.TaggedErrorClass<"FailedPrecondition", {
|
|
17
|
+
readonly message: any;
|
|
18
|
+
readonly body: any;
|
|
19
|
+
}> & (new (...args: any[]) => {
|
|
20
|
+
"@distilled.cloud/error/categories": {
|
|
21
|
+
BadRequestError: true;
|
|
22
|
+
};
|
|
23
|
+
});
|
|
24
|
+
export declare class FailedPrecondition extends /*@__PURE__*/ FailedPrecondition_base {
|
|
25
|
+
}
|
|
26
|
+
declare const InvalidArgument_base: S.TaggedErrorClass<"InvalidArgument", {
|
|
27
|
+
readonly message: any;
|
|
28
|
+
readonly body: any;
|
|
29
|
+
}> & (new (...args: any[]) => {
|
|
30
|
+
"@distilled.cloud/error/categories": {
|
|
31
|
+
BadRequestError: true;
|
|
32
|
+
};
|
|
33
|
+
});
|
|
34
|
+
export declare class InvalidArgument extends /*@__PURE__*/ InvalidArgument_base {
|
|
35
|
+
}
|
|
36
|
+
declare const NotFound_base: S.TaggedErrorClass<"NotFound", {
|
|
37
|
+
readonly message: any;
|
|
38
|
+
readonly body: any;
|
|
39
|
+
}> & (new (...args: any[]) => {
|
|
40
|
+
"@distilled.cloud/error/categories": {
|
|
41
|
+
BadRequestError: true;
|
|
42
|
+
};
|
|
43
|
+
});
|
|
44
|
+
export declare class NotFound extends /*@__PURE__*/ NotFound_base {
|
|
45
|
+
}
|
|
46
|
+
declare const PermissionDenied_base: S.TaggedErrorClass<"PermissionDenied", {
|
|
47
|
+
readonly message: any;
|
|
48
|
+
readonly body: any;
|
|
49
|
+
}> & (new (...args: any[]) => {
|
|
50
|
+
"@distilled.cloud/error/categories": {
|
|
51
|
+
AuthError: true;
|
|
52
|
+
};
|
|
53
|
+
});
|
|
54
|
+
export declare class PermissionDenied extends /*@__PURE__*/ PermissionDenied_base {
|
|
55
|
+
}
|
|
56
|
+
declare const ResourceExhausted_base: S.TaggedErrorClass<"ResourceExhausted", {
|
|
57
|
+
readonly message: any;
|
|
58
|
+
readonly body: any;
|
|
59
|
+
}> & (new (...args: any[]) => {
|
|
60
|
+
"@distilled.cloud/error/categories": {
|
|
61
|
+
ThrottlingError: true;
|
|
62
|
+
};
|
|
63
|
+
});
|
|
64
|
+
export declare class ResourceExhausted extends /*@__PURE__*/ ResourceExhausted_base {
|
|
65
|
+
}
|
|
66
|
+
declare const Unauthenticated_base: S.TaggedErrorClass<"Unauthenticated", {
|
|
67
|
+
readonly message: any;
|
|
68
|
+
readonly body: any;
|
|
69
|
+
}> & (new (...args: any[]) => {
|
|
70
|
+
"@distilled.cloud/error/categories": {
|
|
71
|
+
AuthError: true;
|
|
72
|
+
};
|
|
73
|
+
});
|
|
74
|
+
export declare class Unauthenticated extends /*@__PURE__*/ Unauthenticated_base {
|
|
75
|
+
}
|
|
76
|
+
export type RevokableTokenScope = "SCOPE_UNKNOWN" | "TENANT_SCOPE" | "TENANT_MEMBERSHIP_SCOPE";
|
|
77
|
+
export interface BatchRevokeRevokableTokenRequest {
|
|
78
|
+
/** Revoke tokens created before this timestamp. If not set, no time-based filtering is applied. */
|
|
79
|
+
before?: string | undefined;
|
|
80
|
+
/** Revoke tokens created by this actor_id (only applies to user actors). If not set, no actor-based filtering is applied. */
|
|
81
|
+
createdByActorId?: string | undefined;
|
|
82
|
+
/** Revoke tokens with the selected scope only. If not set, no scope-based filtering is applied. */
|
|
83
|
+
scope?: RevokableTokenScope | (string & {}) | undefined;
|
|
84
|
+
}
|
|
85
|
+
export type StringList = Array<string>;
|
|
86
|
+
export interface BatchRevokeRevokableTokenResponse {
|
|
87
|
+
/** The IDs of the tokens that were revoked (prefixed with "tok_"). */
|
|
88
|
+
revokedTokenIds: StringList;
|
|
89
|
+
}
|
|
90
|
+
export interface TenantTokenPolicy {
|
|
91
|
+
/** The policy type being set. Consult with the Namespace team on which controls can be applied per tenant token. */
|
|
92
|
+
policyType?: string | undefined;
|
|
93
|
+
/** The policy-specific value. It may be a string, number, or serialized message (e.g. JSON). */
|
|
94
|
+
value?: string | undefined;
|
|
95
|
+
}
|
|
96
|
+
export type TenantTokenPolicyList = Array<TenantTokenPolicy>;
|
|
97
|
+
/** 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. */
|
|
98
|
+
export interface Permission {
|
|
99
|
+
/** The type of resource this permission applies to, e.g. "instance", "vault/object", "token/revokable". */
|
|
100
|
+
resourceType?: string | undefined;
|
|
101
|
+
/** The specific resource ID, or empty for all resources of this type. */
|
|
102
|
+
resourceId?: string | undefined;
|
|
103
|
+
/** The set of actions allowed on the resource, e.g. "create", "list", "describe". */
|
|
104
|
+
actions?: StringList | undefined;
|
|
105
|
+
}
|
|
106
|
+
export type PermissionList = Array<Permission>;
|
|
107
|
+
export interface AccessPolicy {
|
|
108
|
+
/** Grant a restricted set of permissions to this token. See https://namespace.so/docs/security/permissions for available permissions. */
|
|
109
|
+
grants?: PermissionList | undefined;
|
|
110
|
+
}
|
|
111
|
+
export interface CreateRevokableTokenRequest {
|
|
112
|
+
/** A unique name for the token within the tenant. Required. */
|
|
113
|
+
name?: string | undefined;
|
|
114
|
+
/** A human-readable description of the token's purpose. */
|
|
115
|
+
description?: string | undefined;
|
|
116
|
+
/** When the token should expire. Maximum expiration is 1 year from creation. May be omitted for membership-scoped tokens to create a token with unlimited duration. */
|
|
117
|
+
expiresAt?: string | undefined;
|
|
118
|
+
/** A set of policies that apply to this token. */
|
|
119
|
+
policies?: TenantTokenPolicyList | undefined;
|
|
120
|
+
/** Configure the access permissions available with this token. */
|
|
121
|
+
access?: AccessPolicy | undefined;
|
|
122
|
+
/** Allows restricting the scope of the issued token. */
|
|
123
|
+
scope?: RevokableTokenScope | (string & {}) | undefined;
|
|
124
|
+
}
|
|
125
|
+
export type RevokableTokenState = "STATE_UNKNOWN" | "ACTIVE" | "REVOKED" | "EXPIRED";
|
|
126
|
+
export interface RevokableToken {
|
|
127
|
+
/** The unique identifier for this token, prefixed with "tok_". This is used for revocation. */
|
|
128
|
+
tokenId: string;
|
|
129
|
+
/** The tenant this token belongs to. */
|
|
130
|
+
tenantId: string;
|
|
131
|
+
/** A unique name for the token within the tenant. */
|
|
132
|
+
name: string;
|
|
133
|
+
/** A human-readable description of the token's purpose. */
|
|
134
|
+
description: string;
|
|
135
|
+
/** When the token was created. */
|
|
136
|
+
createdAt?: string | undefined;
|
|
137
|
+
/** When the token expires. Tokens are implicitly invalid after this time. If omitted, the membership-scoped token has unlimited duration. */
|
|
138
|
+
expiresAt?: string | undefined;
|
|
139
|
+
/** If set, when the token was explicitly revoked. */
|
|
140
|
+
revokedAt?: string | undefined;
|
|
141
|
+
/** If set, the actor who revoked the token. */
|
|
142
|
+
revokedByActorId: string;
|
|
143
|
+
/** The actor who created this token. */
|
|
144
|
+
creatorActorId: string;
|
|
145
|
+
/** Indicates whether the token is bound to a particular membership, or tenant-wide. */
|
|
146
|
+
scope: RevokableTokenScope;
|
|
147
|
+
/** The permissions granted to this token. */
|
|
148
|
+
permissions: PermissionList;
|
|
149
|
+
/** The current state of the token. */
|
|
150
|
+
state: RevokableTokenState;
|
|
151
|
+
}
|
|
152
|
+
export interface CreateRevokableTokenResponse {
|
|
153
|
+
/** The bearer token that can be used for authentication. This value is only returned once at creation time and cannot be retrieved later. */
|
|
154
|
+
bearerToken: string | Redacted.Redacted<string>;
|
|
155
|
+
/** The token metadata, including the token_id (prefixed with "tok_") which can be used to revoke or list the token. */
|
|
156
|
+
token?: RevokableToken | undefined;
|
|
157
|
+
}
|
|
158
|
+
export interface IssueIdTokenRequest {
|
|
159
|
+
/** Target audience for the generated identity token. */
|
|
160
|
+
audience?: string | undefined;
|
|
161
|
+
}
|
|
162
|
+
export interface IssueIdTokenResponse {
|
|
163
|
+
/** The signed OIDC ID token. Use this token to authenticate with external services that trust the Namespace federation issuer (`https://federation.namespaceapis.com`). */
|
|
164
|
+
idToken: string | Redacted.Redacted<string>;
|
|
165
|
+
}
|
|
166
|
+
export interface IssueTenantTokenRequest {
|
|
167
|
+
/** Which tenant credentials should be produced for. */
|
|
168
|
+
tenantId?: string | undefined;
|
|
169
|
+
/** 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. */
|
|
170
|
+
actorId?: string | undefined;
|
|
171
|
+
/** For how long should the resulting credentials be valid for. If not specified, a short-lived default is used (e.g 15mins). */
|
|
172
|
+
durationSecs?: string | undefined;
|
|
173
|
+
/** A set of policies that apply to this tenant token. */
|
|
174
|
+
policies?: TenantTokenPolicyList | undefined;
|
|
175
|
+
/** Configure the access permissions available with this token. */
|
|
176
|
+
access?: AccessPolicy | undefined;
|
|
177
|
+
}
|
|
178
|
+
export interface IssueTenantTokenResponse {
|
|
179
|
+
/** The tenant Bearer token. Pass this in the `Authorization: Bearer {token}` header when calling Namespace APIs. */
|
|
180
|
+
bearerToken: string | Redacted.Redacted<string>;
|
|
181
|
+
}
|
|
182
|
+
export interface IssueTenantTokenWithOIDCRequest {
|
|
183
|
+
/** Which tenant credentials should be produced for. */
|
|
184
|
+
tenantId?: string | undefined;
|
|
185
|
+
/** The OIDC token from a trusted external issuer. */
|
|
186
|
+
oidcToken?: string | Redacted.Redacted<string> | undefined;
|
|
187
|
+
/** For how long the resulting credentials should be valid. */
|
|
188
|
+
duration?: string | undefined;
|
|
189
|
+
}
|
|
190
|
+
export interface IssueTenantTokenWithOIDCResponse {
|
|
191
|
+
/** The tenant Bearer token. Pass this in the `Authorization: Bearer {token}` header when calling Namespace APIs. */
|
|
192
|
+
bearerToken: string | Redacted.Redacted<string>;
|
|
193
|
+
}
|
|
194
|
+
export interface ListRevokableTokensRequest {
|
|
195
|
+
/** If a previous response returned a `pagination_cursor`, it can be specified to continue reading results with the same arguments as the original call. */
|
|
196
|
+
paginationCursor?: string | undefined;
|
|
197
|
+
/** The maximum number of entries to return as part of this ListRevokableTokens request. A maximum number of entries may also be specified when `pagination_cursor` is set. We won't return more than `max_entries`, but may return fewer. */
|
|
198
|
+
maxEntries?: string | undefined;
|
|
199
|
+
/** If true, include revoked tokens in the results. */
|
|
200
|
+
includeRevoked?: boolean | undefined;
|
|
201
|
+
}
|
|
202
|
+
export type RevokableTokenList = Array<RevokableToken>;
|
|
203
|
+
export interface ListRevokableTokensResponse {
|
|
204
|
+
/** The list of revokable tokens. */
|
|
205
|
+
tokens: RevokableTokenList;
|
|
206
|
+
/** If set, there are additional results. Pass the same cursor to a subsequent ListRevokableTokens call to continue fetching results. */
|
|
207
|
+
paginationCursor: string;
|
|
208
|
+
}
|
|
209
|
+
export interface RefreshRevokableTokenRequest {
|
|
210
|
+
/** The unique identifier of the token to refresh, prefixed with "tok_". */
|
|
211
|
+
tokenId?: string | undefined;
|
|
212
|
+
/** Ensure the token remains valid for at least this much longer. Maximum duration is 1 year. */
|
|
213
|
+
minimumDuration?: string | undefined;
|
|
214
|
+
}
|
|
215
|
+
export interface RefreshRevokableTokenResponse {
|
|
216
|
+
/** The refreshed token metadata. */
|
|
217
|
+
token?: RevokableToken | undefined;
|
|
218
|
+
}
|
|
219
|
+
export interface RevokeRevokableTokenRequest {
|
|
220
|
+
/** The unique identifier of the token to revoke, prefixed with "tok_". */
|
|
221
|
+
tokenId?: string | undefined;
|
|
222
|
+
}
|
|
223
|
+
export interface RevokeRevokableTokenResponse {
|
|
224
|
+
}
|
|
225
|
+
export type BatchRevokeRevokableTokenError = InvalidArgument | FailedPrecondition | Unauthenticated | PermissionDenied | NotFound | AlreadyExists | ResourceExhausted | NamespaceLabsOpError;
|
|
226
|
+
/** Batch revokes multiple revokable tokens based on filter criteria. At least one filter must be provided. ### Authentication Requires a tenant token with the {"token/revokable", "revoke"} action permission. ### Errors - If no filters are provided, an `InvalidArgument` status is returned. */
|
|
227
|
+
export declare const batchRevokeRevokableToken: API.OperationMethod<BatchRevokeRevokableTokenRequest, BatchRevokeRevokableTokenResponse, BatchRevokeRevokableTokenError, NamespaceLabsOpContext>;
|
|
228
|
+
export type CreateRevokableTokenError = InvalidArgument | FailedPrecondition | Unauthenticated | PermissionDenied | NotFound | AlreadyExists | ResourceExhausted | NamespaceLabsOpError;
|
|
229
|
+
/** Creates a revokable token that returns a bearer token (prefixed with "nsrt_") and metadata (with token_id prefixed with "tok_"). Revokable tokens can be explicitly revoked and have a maximum expiration of 1 year when an expiration is set. Membership-scoped tokens may have no expiration and remain valid until revoked or the user loses tenant membership. ### Authentication Requires a tenant token with the {"token/revokable", "create"} action permission. ### Errors - If expiry is not provided for a tenant-scoped token or exceeds 1 year, an `InvalidArgument` status is returned. - If no policies are defined, an `InvalidArgument` status is returned. */
|
|
230
|
+
export declare const createRevokableToken: API.OperationMethod<CreateRevokableTokenRequest, CreateRevokableTokenResponse, CreateRevokableTokenError, NamespaceLabsOpContext>;
|
|
231
|
+
export type IssueIdTokenError = InvalidArgument | FailedPrecondition | Unauthenticated | PermissionDenied | NotFound | AlreadyExists | ResourceExhausted | NamespaceLabsOpError;
|
|
232
|
+
/** Exchange a Namespace tenant token for an OIDC token for identity federation. The generated token identifies Namespace tenants with the provided target audience. ### Authentication Requires a tenant token with the {"federation", "issue_federation"} action permission. ### Errors - If no audience is provided, a `InvalidArgument` status is returned. */
|
|
233
|
+
export declare const issueIdToken: API.OperationMethod<IssueIdTokenRequest, IssueIdTokenResponse, IssueIdTokenError, NamespaceLabsOpContext>;
|
|
234
|
+
export type IssueTenantTokenError = InvalidArgument | FailedPrecondition | Unauthenticated | PermissionDenied | NotFound | AlreadyExists | ResourceExhausted | NamespaceLabsOpError;
|
|
235
|
+
/** 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. ### Authentication Requires a "partner token". */
|
|
236
|
+
export declare const issueTenantToken: API.OperationMethod<IssueTenantTokenRequest, IssueTenantTokenResponse, IssueTenantTokenError, NamespaceLabsOpContext>;
|
|
237
|
+
export type IssueTenantTokenWithOIDCError = InvalidArgument | FailedPrecondition | Unauthenticated | PermissionDenied | NotFound | AlreadyExists | ResourceExhausted | NamespaceLabsOpError;
|
|
238
|
+
/** Produces credentials in the form of a Bearer token that grant access to the specified Tenant using an OIDC token from a trusted issuer. ### Authentication This call authenticates using the `oidc_token` provided in the request. */
|
|
239
|
+
export declare const issueTenantTokenWithOIDC: API.OperationMethod<IssueTenantTokenWithOIDCRequest, IssueTenantTokenWithOIDCResponse, IssueTenantTokenWithOIDCError, NamespaceLabsOpContext>;
|
|
240
|
+
export type ListRevokableTokensError = InvalidArgument | FailedPrecondition | Unauthenticated | PermissionDenied | NotFound | AlreadyExists | ResourceExhausted | NamespaceLabsOpError;
|
|
241
|
+
/** Lists all revokable tokens for the authenticated tenant. ### Authentication Requires a tenant token with the {"token/revokable", "list"} action permission. */
|
|
242
|
+
export declare const listRevokableTokens: API.PaginatedOperationMethod<ListRevokableTokensRequest, ListRevokableTokensResponse, ListRevokableTokensError, NamespaceLabsOpContext, RevokableToken>;
|
|
243
|
+
export type RefreshRevokableTokenError = InvalidArgument | FailedPrecondition | Unauthenticated | PermissionDenied | NotFound | AlreadyExists | ResourceExhausted | NamespaceLabsOpError;
|
|
244
|
+
/** Ensures a revokable token has at least the requested remaining lifetime. Refreshing does not return a new bearer token; it updates the existing token's expiry in place. ### Authentication Requires a tenant token with the {"token/revokable", "refresh"} action permission. ### Errors - If `minimum_duration` is missing, non-positive, or exceeds 1 year, an `InvalidArgument` status is returned. - If the token_id is not found or already revoked, a `NotFound` status is returned. - If the token has already expired, a `FailedPrecondition` status is returned. */
|
|
245
|
+
export declare const refreshRevokableToken: API.OperationMethod<RefreshRevokableTokenRequest, RefreshRevokableTokenResponse, RefreshRevokableTokenError, NamespaceLabsOpContext>;
|
|
246
|
+
export type RevokeRevokableTokenError = InvalidArgument | FailedPrecondition | Unauthenticated | PermissionDenied | NotFound | AlreadyExists | ResourceExhausted | NamespaceLabsOpError;
|
|
247
|
+
/** Revokes a revokable token by its token_id (prefixed with "tok_"), preventing the associated bearer token from being used for authentication. Records who revoked the token and when. ### Authentication Requires a tenant token with the {"token/revokable", "revoke"} action permission. ### Errors - If the token_id is not found or already revoked, a `NotFound` status is returned. */
|
|
248
|
+
export declare const revokeRevokableToken: API.OperationMethod<RevokeRevokableTokenRequest, RevokeRevokableTokenResponse, RevokeRevokableTokenError, NamespaceLabsOpContext>;
|
|
249
|
+
//# sourceMappingURL=iam_token.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"iam_token.d.ts","sourceRoot":"","sources":["../../src/services/iam_token.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,2BAA2B,CAAC;AAGjD,OAAO,KAAK,CAAC,MAAM,mCAAmC,CAAC;AAEvD,OAAO,KAAK,KAAK,QAAQ,MAAM,iBAAiB,CAAC;AAGjD,OAAO,EAEL,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,EAC5B,MAAM,gBAAgB,CAAC;AAMxB,YAAY,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,CAAC;;;;;;;;;AAc7D,qBAAa,aACX,SAAQ,aAAa,CAAC,kBAMrB;CAAG;;;;;;;;;AAEN,qBAAa,kBACX,SAAQ,aAAa,CAAC,uBAMrB;CAAG;;;;;;;;;AAEN,qBAAa,eACX,SAAQ,aAAa,CAAC,oBAMrB;CAAG;;;;;;;;;AAEN,qBAAa,QACX,SAAQ,aAAa,CAAC,aAMrB;CAAG;;;;;;;;;AAEN,qBAAa,gBACX,SAAQ,aAAa,CAAC,qBAMrB;CAAG;;;;;;;;;AAEN,qBAAa,iBACX,SAAQ,aAAa,CAAC,sBAMrB;CAAG;;;;;;;;;AAEN,qBAAa,eACX,SAAQ,aAAa,CAAC,oBAMrB;CAAG;AAEN,MAAM,MA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EAAE,GAAG,CAAC,eAAe,CACrD,4BAA4B,EAC5B,6BAA6B,EAC7B,0BAA0B,EAC1B,sBAAsB,CAkBrB,CAAC;AAEJ,MAAM,MAAM,yBAAyB,GACjC,eAAe,GACf,kBAAkB,GAClB,eAAe,GACf,gBAAgB,GAChB,QAAQ,GACR,aAAa,GACb,iBAAiB,GACjB,oBAAoB,CAAC;AACzB,+XAA+X;AAC/X,eAAO,MAAM,oBAAoB,EAAE,GAAG,CAAC,eAAe,CACpD,2BAA2B,EAC3B,4BAA4B,EAC5B,yBAAyB,EACzB,sBAAsB,CAkBrB,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Ac as e,Ba as t,Dc as n,Fc as r,Kc as i,La as a,Lc as o,a as s,c,e as l,errors$UnknownNamespaceLabsError as u,k as d,l as f,lc as p,m,mc as h,n as g,pagination$paginateCursor as _,protocol$NamespaceLabsProtocol as v,retry$Retry as y,traits$Http as b,traits$SensitiveValue as x,traits$applyErrorMatchers as S,xa as C,xc as w,ya as T,yc as E}from"../_bundle/sdk.js";const D={system:`namespacelabs-api`,responseHeaders:[{header:`x-request-id`,name:`http.response.header.x-request-id`,transform:`list`},{header:`request-id`,name:`http.response.header.request-id`,transform:`list`}],prefix:`Namespacelabs`,service:`TokenService`,propagate:`w3c`};const O=/*@__PURE__*/ l(function AlreadyExists(i){return f(i,new.target,[`$5($4()("AlreadyExists",{message:$2,body:$3}).pipe($1),[{status:409,body:{"/code":"already_exists"}}])`,[r,t,w,n,e,S]])});const k=/*@__PURE__*/ l(function FailedPrecondition(t){return f(t,new.target,[`$5($4()("FailedPrecondition",{message:$2,body:$3}).pipe($1),[{status:400,body:{"/code":"failed_precondition"}}])`,[r,T,w,n,e,S]])});const A=/*@__PURE__*/ l(function InvalidArgument(t){return f(t,new.target,[`$5($4()("InvalidArgument",{message:$2,body:$3}).pipe($1),[{status:400,body:{"/code":"invalid_argument"}}])`,[r,T,w,n,e,S]])});const j=/*@__PURE__*/ l(function NotFound(t){return f(t,new.target,[`$5($4()("NotFound",{message:$2,body:$3}).pipe($1),[{status:404}])`,[r,T,w,n,e,S]])});const M=/*@__PURE__*/ l(function PermissionDenied(t){return f(t,new.target,[`$5($4()("PermissionDenied",{message:$2,body:$3}).pipe($1),[{status:403}])`,[r,C,w,n,e,S]])});const N=/*@__PURE__*/ l(function ResourceExhausted(t){return f(t,new.target,[`$5($4()("ResourceExhausted",{message:$2,body:$3}).pipe($1),[{status:429}])`,[r,a,w,n,e,S]])});const P=/*@__PURE__*/ l(function Unauthenticated(t){return f(t,new.target,[`$5($4()("Unauthenticated",{message:$2,body:$3}).pipe($1),[{status:401}])`,[r,C,w,n,e,S]])});const F=/*@__PURE__*/ m(e=>e===s?d(`BatchRevokeRevokableToken`,`{input:#1,output:#2,errors:[$7,$8,$9,$10,$11,$12,$13,$14],protocol:$15,retry:$16,telemetry:$17,span:"%"};$5(>3)@"%Request";$5(>4)@"%Response";$4({before:$3($2),createdByActorId:$3($2),scope:$3($2)}).pipe($1({method:"POST",uri:"/namespace.cloud.iam.v1beta.TokenService/%",code:200}));$4({revokedTokenIds:#6:0})`,[r,b,w,i,E,o,__d1,A,k,P,M,j,O,N,u,v,y,D]):c(F,e));const I=/*@__PURE__*/ m(e=>e===s?d(`CreateRevokableToken`,`{input:#1,output:#2,errors:[$9,$10,$11,$12,$13,$14,$15,$16],protocol:$17,retry:$18,telemetry:$19,span:"%"};$6(>3)@"%Request";$6(>4)@"%Response";$5({name:$3($2),description:$3($2),expiresAt:$3($2),policies:$3(#4:1),access:$3(#4:2),scope:$3($2)}).pipe($1({method:"POST",uri:"/namespace.cloud.iam.v1beta.TokenService/%",code:200}));$5({bearerToken:$2.pipe($7({})),token:$3(#8:0)})`,[r,b,w,i,__d2,E,o,x,__d4,A,k,P,M,j,O,N,u,v,y,D]):c(I,e));const L=/*@__PURE__*/ m(e=>e===s?d(`IssueIdToken`,`{input:#1,output:#2,errors:[$7,$8,$9,$10,$11,$12,$13,$14],protocol:$15,retry:$16,telemetry:$17,span:"%"};$5(>3)@"%Request";$5(>4)@"%Response";$4({audience:$3($2)}).pipe($1({method:"POST",uri:"/namespace.cloud.iam.v1beta.TokenService/%",code:200}));$4({idToken:$2.pipe($6({}))})`,[r,b,w,i,E,o,x,A,k,P,M,j,O,N,u,v,y,D]):c(L,e));const R=/*@__PURE__*/ m(e=>e===s?d(`IssueTenantToken`,`{input:#1,output:#7:0,errors:[$8,$9,$10,$11,$12,$13,$14,$15],protocol:$16,retry:$17,telemetry:$18,span:"%"};$6(>2)@"%Request";$5({tenantId:$3($2),actorId:$3($2),durationSecs:$3($2),policies:$3(#4:1),access:$3(#4:2)}).pipe($1({method:"POST",uri:"/namespace.cloud.iam.v1beta.TokenService/%",code:200}))`,[r,b,w,i,__d2,E,o,__d0,A,k,P,M,j,O,N,u,v,y,D]):c(R,e));const z=/*@__PURE__*/ m(e=>e===s?d(`IssueTenantTokenWithOIDC`,`{input:#1,output:#7:0,errors:[$8,$9,$10,$11,$12,$13,$14,$15],protocol:$16,retry:$17,telemetry:$18,span:"%"};$6(>2)@"%Request";$5({tenantId:$3($2),oidcToken:$3($2.pipe($4({}))),duration:$3($2)}).pipe($1({method:"POST",uri:"/namespace.cloud.iam.v1beta.TokenService/%",code:200}))`,[r,b,w,i,x,E,o,__d0,A,k,P,M,j,O,N,u,v,y,D]):c(z,e));const B=/*@__PURE__*/ g(e=>e===s?d(`ListRevokableTokens`,`{input:#1,output:#3,errors:[$9,$10,$11,$12,$13,$14,$15,$16],protocol:$17,retry:$18,telemetry:$19,span:"%",pagination:{mode:"cursor",inputToken:"paginationCursor",outputToken:"paginationCursor",items:"tokens"},strategy:$20};$6(>4)@"%Request";$8(#7:0);$6(>5)@"%Response";$5({paginationCursor:$3($2),maxEntries:$3($2),includeRevoked:$3($4)}).pipe($1({method:"POST",uri:"/namespace.cloud.iam.v1beta.TokenService/%",code:200}));$5({tokens:#2,paginationCursor:$2})`,[r,b,w,i,h,E,o,__d4,p,A,k,P,M,j,O,N,u,v,y,D,_]):c(B,e));const V=/*@__PURE__*/ m(e=>e===s?d(`RefreshRevokableToken`,`{input:#1,output:#2,errors:[$7,$8,$9,$10,$11,$12,$13,$14],protocol:$15,retry:$16,telemetry:$17,span:"%"};$5(>3)@"%Request";$5(>4)@"%Response";$4({tokenId:$3($2),minimumDuration:$3($2)}).pipe($1({method:"POST",uri:"/namespace.cloud.iam.v1beta.TokenService/%",code:200}));$4({token:$3(#6:0)})`,[r,b,w,i,E,o,__d4,A,k,P,M,j,O,N,u,v,y,D]):c(V,e));const H=/*@__PURE__*/ m(e=>e===s?d(`RevokeRevokableToken`,`{input:#1,output:#2,errors:[$6,$7,$8,$9,$10,$11,$12,$13],protocol:$14,retry:$15,telemetry:$16,span:"%"};$5(>3)@"%Request";$5(>4)@"%Response";$4({tokenId:$3($2)}).pipe($1({method:"POST",uri:"/namespace.cloud.iam.v1beta.TokenService/%",code:200}));$4({})`,[r,b,w,i,E,o,A,k,P,M,j,O,N,u,v,y,D]):c(H,e));function __d0(){return[`$4(>1)@"IssueTenantTokenResponse";$3({bearerToken:$2.pipe($1({}))})`,[r,x,w,E,o]]}function __d1(){return[`$2($1)`,[r,w,p]]}function __d2(){return[`$4(>3)@"TenantTokenPolicy";$5(#0);$4(>4)@"AccessPolicy";$3({policyType:$2($1),value:$2($1)});$3({grants:$2(#6:1)})`,[r,w,i,E,o,p,__d3]]}function __d3(){return[`$5(>2)@"Permission";$6(#0);$4({resourceType:$2($1),resourceId:$2($1),actions:$2(#3:0)})`,[r,w,i,__d1,E,o,p]]}function __d4(){return[`$5(>1)@"RevokableToken";$4({tokenId:$1,tenantId:$1,name:$1,description:$1,createdAt:$2($1),expiresAt:$2($1),revokedAt:$2($1),revokedByActorId:$1,creatorActorId:$1,scope:$1,permissions:#3:1,state:$1})`,[r,w,i,__d3,E,o]]}export{O as AlreadyExists,k as FailedPrecondition,A as InvalidArgument,j as NotFound,M as PermissionDenied,N as ResourceExhausted,P as Unauthenticated,F as batchRevokeRevokableToken,I as createRevokableToken,L as issueIdToken,R as issueTenantToken,z as issueTenantTokenWithOIDC,B as listRevokableTokens,V as refreshRevokableToken,H as revokeRevokableToken};
|
|
2
|
+
//# sourceMappingURL=iam_token.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"iam_token.js","names":["API.newError","__L.at","C.withConflictError","S.String","S.Unknown","S.TaggedError","T.applyErrorMatchers","C.withBadRequestError","C.withAuthError","C.withThrottlingError","API.D","API.named","T.Http","S.optional","S.Struct","S.suspend","Retry.Retry","API.call","T.SensitiveValue","S.Boolean","S.Array","TaggedError","withConflictError","Unknown","at","optional","withThrottlingError","suspend","D","error","UnknownNamespaceLabsError","named","newError","Array","Boolean","opPaginated","paginateCursor","NamespaceLabsProtocol","Retry","Http","SensitiveValue","applyErrorMatchers","withAuthError","String","withBadRequestError","Struct","TELEMETRY","AlreadyExists","FailedPrecondition","i","InvalidArgument","NotFound","PermissionDenied","ResourceExhausted","Unauthenticated","batchRevokeRevokableToken","call","createRevokableToken","issueIdToken","issueTenantToken","issueTenantTokenWithOIDC","listRevokableTokens","refreshRevokableToken","revokeRevokableToken"],"sources":["../../src/services/iam_token.ts"],"mappings":"mXAmBA,MAAM8C,EAAY,CAChB,OAAQ,oBACR,gBAAiB,CACf,CAAE,OAAQ,eAAgB,KAAM,oCAAqC,UAAW,MAAO,EACvF,CAAE,OAAQ,aAAc,KAAM,kCAAmC,UAAW,MAAO,CACrF,EACA,OAAQ,gBACR,QAAS,eACT,UAAW,KACb,EAEA,MAAaC,EAAmC,gBAAU,SAAS,cAAc,EAAa,CAC5F,OAAO/C,EAAa,EAAG,WAAY,CAAC,yGAA0G,CAACC,EAAQC,EAAqBC,EAAUC,EAAWC,EAAeC,CAAoB,CAAC,CAAC,CACxO,CAAC,EAED,MAAa0C,EAAwC,gBAAU,SAAS,mBAAmB,EAAa,CACtG,OAAOhD,EAAaiD,EAAG,WAAY,CAAC,mHAAoH,CAAChD,EAA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ud/core/api";
|
|
2
|
+
import * as S from "@distilled.cloud/core/schema-lite";
|
|
3
|
+
import { type NamespaceLabsOpError, type NamespaceLabsOpContext } from "../protocol.ts";
|
|
4
|
+
export type { NamespaceLabsOpError, NamespaceLabsOpContext };
|
|
5
|
+
declare const AlreadyExists_base: S.TaggedErrorClass<"AlreadyExists", {
|
|
6
|
+
readonly message: any;
|
|
7
|
+
readonly body: any;
|
|
8
|
+
}> & (new (...args: any[]) => {
|
|
9
|
+
"@distilled.cloud/error/categories": {
|
|
10
|
+
ConflictError: true;
|
|
11
|
+
};
|
|
12
|
+
});
|
|
13
|
+
export declare class AlreadyExists extends /*@__PURE__*/ AlreadyExists_base {
|
|
14
|
+
}
|
|
15
|
+
declare const FailedPrecondition_base: S.TaggedErrorClass<"FailedPrecondition", {
|
|
16
|
+
readonly message: any;
|
|
17
|
+
readonly body: any;
|
|
18
|
+
}> & (new (...args: any[]) => {
|
|
19
|
+
"@distilled.cloud/error/categories": {
|
|
20
|
+
BadRequestError: true;
|
|
21
|
+
};
|
|
22
|
+
});
|
|
23
|
+
export declare class FailedPrecondition extends /*@__PURE__*/ FailedPrecondition_base {
|
|
24
|
+
}
|
|
25
|
+
declare const InvalidArgument_base: S.TaggedErrorClass<"InvalidArgument", {
|
|
26
|
+
readonly message: any;
|
|
27
|
+
readonly body: any;
|
|
28
|
+
}> & (new (...args: any[]) => {
|
|
29
|
+
"@distilled.cloud/error/categories": {
|
|
30
|
+
BadRequestError: true;
|
|
31
|
+
};
|
|
32
|
+
});
|
|
33
|
+
export declare class InvalidArgument extends /*@__PURE__*/ InvalidArgument_base {
|
|
34
|
+
}
|
|
35
|
+
declare const NotFound_base: S.TaggedErrorClass<"NotFound", {
|
|
36
|
+
readonly message: any;
|
|
37
|
+
readonly body: any;
|
|
38
|
+
}> & (new (...args: any[]) => {
|
|
39
|
+
"@distilled.cloud/error/categories": {
|
|
40
|
+
BadRequestError: true;
|
|
41
|
+
};
|
|
42
|
+
});
|
|
43
|
+
export declare class NotFound extends /*@__PURE__*/ NotFound_base {
|
|
44
|
+
}
|
|
45
|
+
declare const PermissionDenied_base: S.TaggedErrorClass<"PermissionDenied", {
|
|
46
|
+
readonly message: any;
|
|
47
|
+
readonly body: any;
|
|
48
|
+
}> & (new (...args: any[]) => {
|
|
49
|
+
"@distilled.cloud/error/categories": {
|
|
50
|
+
AuthError: true;
|
|
51
|
+
};
|
|
52
|
+
});
|
|
53
|
+
export declare class PermissionDenied extends /*@__PURE__*/ PermissionDenied_base {
|
|
54
|
+
}
|
|
55
|
+
declare const ResourceExhausted_base: S.TaggedErrorClass<"ResourceExhausted", {
|
|
56
|
+
readonly message: any;
|
|
57
|
+
readonly body: any;
|
|
58
|
+
}> & (new (...args: any[]) => {
|
|
59
|
+
"@distilled.cloud/error/categories": {
|
|
60
|
+
ThrottlingError: true;
|
|
61
|
+
};
|
|
62
|
+
});
|
|
63
|
+
export declare class ResourceExhausted extends /*@__PURE__*/ ResourceExhausted_base {
|
|
64
|
+
}
|
|
65
|
+
declare const Unauthenticated_base: S.TaggedErrorClass<"Unauthenticated", {
|
|
66
|
+
readonly message: any;
|
|
67
|
+
readonly body: any;
|
|
68
|
+
}> & (new (...args: any[]) => {
|
|
69
|
+
"@distilled.cloud/error/categories": {
|
|
70
|
+
AuthError: true;
|
|
71
|
+
};
|
|
72
|
+
});
|
|
73
|
+
export declare class Unauthenticated extends /*@__PURE__*/ Unauthenticated_base {
|
|
74
|
+
}
|
|
75
|
+
export interface BuildRequest {
|
|
76
|
+
blueprintName?: string | undefined;
|
|
77
|
+
/** If not provided, the latest blueprint version is used. */
|
|
78
|
+
blueprintId?: string | undefined;
|
|
79
|
+
/** Optional: the deployment site to build the image at (e.g. "ord", "iad"). */
|
|
80
|
+
site?: string | undefined;
|
|
81
|
+
}
|
|
82
|
+
export interface BlueprintSpecDockerfile {
|
|
83
|
+
/** The Dockerfile content used to build the image. */
|
|
84
|
+
content?: string | undefined;
|
|
85
|
+
}
|
|
86
|
+
/** References another image blueprint by name and optional version. */
|
|
87
|
+
export interface BlueprintRef {
|
|
88
|
+
/** The name of the referenced blueprint. */
|
|
89
|
+
name?: string | undefined;
|
|
90
|
+
/** Optional blueprint version ID. If not provided, uses the latest version. */
|
|
91
|
+
id?: string | undefined;
|
|
92
|
+
}
|
|
93
|
+
/** Defines the base image to use for an APT-based build. */
|
|
94
|
+
export interface BlueprintSpecBaseImageSource {
|
|
95
|
+
/** A fully qualified container image reference. */
|
|
96
|
+
imageRef?: string | undefined;
|
|
97
|
+
/** A reference to another blueprint to use as the base. */
|
|
98
|
+
blueprintRef?: BlueprintRef | undefined;
|
|
99
|
+
}
|
|
100
|
+
export type StringList = Array<string>;
|
|
101
|
+
export interface BlueprintSpecAptBasedImage {
|
|
102
|
+
/** The base image to install packages on top of. */
|
|
103
|
+
baseImage?: BlueprintSpecBaseImageSource | undefined;
|
|
104
|
+
/** The list of Ubuntu APT packages to install. */
|
|
105
|
+
aptPackages?: StringList | undefined;
|
|
106
|
+
}
|
|
107
|
+
/** Defines how an image is built. Exactly one source must be specified. */
|
|
108
|
+
export interface BlueprintSpec {
|
|
109
|
+
/** Build the image from a Dockerfile. */
|
|
110
|
+
dockerfile?: BlueprintSpecDockerfile | undefined;
|
|
111
|
+
/** Build the image by installing APT packages on a base image. */
|
|
112
|
+
aptBasedImage?: BlueprintSpecAptBasedImage | undefined;
|
|
113
|
+
}
|
|
114
|
+
export type ImageBlueprintState = "STATE_UNKNOWN" | "STATE_READY" | "STATE_NEEDS_BUILDING" | "STATE_BUILDING" | "STATE_FAILED";
|
|
115
|
+
/** Build state for a specific deployment site. */
|
|
116
|
+
export interface ImageBlueprintStatePerSite {
|
|
117
|
+
/** The build state at this site. */
|
|
118
|
+
state: ImageBlueprintState;
|
|
119
|
+
/** The compute instance ID used for the build, if applicable. */
|
|
120
|
+
instanceId: string;
|
|
121
|
+
/** The built image reference at this site, if available. */
|
|
122
|
+
imageRef: string;
|
|
123
|
+
}
|
|
124
|
+
export type ImageBlueprintStatePerSiteMap = {
|
|
125
|
+
[key: string]: ImageBlueprintStatePerSite | undefined;
|
|
126
|
+
};
|
|
127
|
+
/** Aggregated build status across all sites. */
|
|
128
|
+
export interface ImageBlueprintStatus {
|
|
129
|
+
/** Timestamp of the last successful build (in UTC). */
|
|
130
|
+
builtAt?: string | undefined;
|
|
131
|
+
/** The image reference of the last successful build. */
|
|
132
|
+
imageRef: string;
|
|
133
|
+
/** Timestamp of the last build attempt (in UTC). */
|
|
134
|
+
lastAttemptAt?: string | undefined;
|
|
135
|
+
/** The builder reference used for the last build attempt. */
|
|
136
|
+
builderRef: string;
|
|
137
|
+
/** Error message from the last failed build attempt. */
|
|
138
|
+
error: string;
|
|
139
|
+
}
|
|
140
|
+
/** An image blueprint defines a reproducible recipe for building container images. */
|
|
141
|
+
export interface ImageBlueprint {
|
|
142
|
+
/** The unique identifier of this blueprint version. */
|
|
143
|
+
id: string;
|
|
144
|
+
/** The name of this blueprint. */
|
|
145
|
+
name: string;
|
|
146
|
+
/** Timestamp of when this blueprint was created (in UTC). */
|
|
147
|
+
createdAt?: string | undefined;
|
|
148
|
+
/** Timestamp of when this blueprint was replaced by a newer version (in UTC). Not set if this is the current version. */
|
|
149
|
+
replacedAt?: string | undefined;
|
|
150
|
+
/** The specification that defines how the image is built. */
|
|
151
|
+
spec?: BlueprintSpec | undefined;
|
|
152
|
+
/** The ID of the actor who created this blueprint. */
|
|
153
|
+
creatorId: string;
|
|
154
|
+
/** Build state per deployment site (e.g. "ord", "iad"). */
|
|
155
|
+
state: ImageBlueprintStatePerSiteMap;
|
|
156
|
+
/** Internal metadata version, incremented on each update. */
|
|
157
|
+
metadataVersion: string;
|
|
158
|
+
/** The most recent build status across all sites. */
|
|
159
|
+
status?: ImageBlueprintStatus | undefined;
|
|
160
|
+
/** Timestamp of when the status was last updated (in UTC). */
|
|
161
|
+
statusUpdatedAt?: string | undefined;
|
|
162
|
+
}
|
|
163
|
+
export interface BuildResponse {
|
|
164
|
+
/** The updated blueprint with the new build status. */
|
|
165
|
+
blueprint?: ImageBlueprint | undefined;
|
|
166
|
+
/** The image reference of the built image, if the build completed. */
|
|
167
|
+
imageRef: string;
|
|
168
|
+
}
|
|
169
|
+
export interface CreateBlueprintRequest {
|
|
170
|
+
/** A unique name for the blueprint within the workspace. */
|
|
171
|
+
blueprintName?: string | undefined;
|
|
172
|
+
/** The specification that defines how the image is built. */
|
|
173
|
+
spec?: BlueprintSpec | undefined;
|
|
174
|
+
}
|
|
175
|
+
export interface CreateBlueprintResponse {
|
|
176
|
+
blueprint?: ImageBlueprint | undefined;
|
|
177
|
+
}
|
|
178
|
+
export interface FetchBlueprintRequest {
|
|
179
|
+
blueprintName?: string | undefined;
|
|
180
|
+
/** If not provided, the latest blueprint version is used. */
|
|
181
|
+
blueprintId?: string | undefined;
|
|
182
|
+
}
|
|
183
|
+
export interface FetchBlueprintResponse {
|
|
184
|
+
blueprint?: ImageBlueprint | undefined;
|
|
185
|
+
}
|
|
186
|
+
export interface ListBlueprintsRequest {
|
|
187
|
+
paginationCursor?: string | undefined;
|
|
188
|
+
}
|
|
189
|
+
export type ImageBlueprintList = Array<ImageBlueprint>;
|
|
190
|
+
export interface ListBlueprintsResponse {
|
|
191
|
+
paginationCursor: string;
|
|
192
|
+
blueprints: ImageBlueprintList;
|
|
193
|
+
}
|
|
194
|
+
export interface RemoveBlueprintRequest {
|
|
195
|
+
blueprintName?: string | undefined;
|
|
196
|
+
}
|
|
197
|
+
export interface RemoveBlueprintResponse {
|
|
198
|
+
}
|
|
199
|
+
export type BuildError = InvalidArgument | FailedPrecondition | Unauthenticated | PermissionDenied | NotFound | AlreadyExists | ResourceExhausted | NamespaceLabsOpError;
|
|
200
|
+
/** Triggers a new build for the specified blueprint. The build is executed asynchronously; use FetchBlueprint to poll for the build status. ### Errors - If the blueprint does not exist, a `NotFound` status is returned. */
|
|
201
|
+
export declare const build: API.OperationMethod<BuildRequest, BuildResponse, BuildError, NamespaceLabsOpContext>;
|
|
202
|
+
export type CreateBlueprintError = InvalidArgument | FailedPrecondition | Unauthenticated | PermissionDenied | NotFound | AlreadyExists | ResourceExhausted | NamespaceLabsOpError;
|
|
203
|
+
/** Creates a new image blueprint with the specified name and specification. Blueprint names must be unique within the workspace. ### Errors - If a blueprint with the same name already exists, an `AlreadyExists` status is returned. - If the specification is invalid, an `InvalidArgument` status is returned. */
|
|
204
|
+
export declare const createBlueprint: API.OperationMethod<CreateBlueprintRequest, CreateBlueprintResponse, CreateBlueprintError, NamespaceLabsOpContext>;
|
|
205
|
+
export type FetchBlueprintError = InvalidArgument | FailedPrecondition | Unauthenticated | PermissionDenied | NotFound | AlreadyExists | ResourceExhausted | NamespaceLabsOpError;
|
|
206
|
+
/** Retrieves a specific blueprint by name or ID, including its current build status. ### Errors - If the blueprint does not exist, a `NotFound` status is returned. */
|
|
207
|
+
export declare const fetchBlueprint: API.OperationMethod<FetchBlueprintRequest, FetchBlueprintResponse, FetchBlueprintError, NamespaceLabsOpContext>;
|
|
208
|
+
export type ListBlueprintsError = InvalidArgument | FailedPrecondition | Unauthenticated | PermissionDenied | NotFound | AlreadyExists | ResourceExhausted | NamespaceLabsOpError;
|
|
209
|
+
/** Returns all active blueprints in the workspace. */
|
|
210
|
+
export declare const listBlueprints: API.PaginatedOperationMethod<ListBlueprintsRequest, ListBlueprintsResponse, ListBlueprintsError, NamespaceLabsOpContext, ImageBlueprint>;
|
|
211
|
+
export type RemoveBlueprintError = InvalidArgument | FailedPrecondition | Unauthenticated | PermissionDenied | NotFound | AlreadyExists | ResourceExhausted | NamespaceLabsOpError;
|
|
212
|
+
/** Removes a blueprint. Existing images built from this blueprint are not affected. ### Errors - If the blueprint does not exist, a `NotFound` status is returned. */
|
|
213
|
+
export declare const removeBlueprint: API.OperationMethod<RemoveBlueprintRequest, RemoveBlueprintResponse, RemoveBlueprintError, NamespaceLabsOpContext>;
|
|
214
|
+
//# sourceMappingURL=image.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":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jB,oBAAoB,CAAC;AACzB,sDAAsD;AACtD,eAAO,MAAM,cAAc,EAAE,GAAG,CAAC,wBAAwB,CACvD,qBAAqB,EACrB,sBAAsB,EACtB,mBAAmB,EACnB,sBAAsB,EACtB,cAAc,CA2BR,CAAC;AAET,MAAM,MAAM,oBAAoB,GAC5B,eAAe,GACf,kBAAkB,GAClB,eAAe,GACf,gBAAgB,GAChB,QAAQ,GACR,aAAa,GACb,iBAAiB,GACjB,oBAAoB,CAAC;AACzB,sKAAsK;AACtK,eAAO,MAAM,eAAe,EAAE,GAAG,CAAC,eAAe,CAC/C,sBAAsB,EACtB,uBAAuB,EACvB,oBAAoB,EACpB,sBAAsB,CAkBrB,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Ac as e,Ba as t,Dc as n,Fc as r,Kc as i,La as a,Lc as o,a as s,c,e as l,errors$UnknownNamespaceLabsError as u,k as d,l as f,lc as p,m,n as h,pagination$paginateCursor as g,protocol$NamespaceLabsProtocol as _,retry$Retry as v,traits$Http as y,traits$applyErrorMatchers as b,vc as x,xa as S,xc as C,ya as w,yc as T}from"../_bundle/sdk.js";const E={system:`namespacelabs-api`,responseHeaders:[{header:`x-request-id`,name:`http.response.header.x-request-id`,transform:`list`},{header:`request-id`,name:`http.response.header.request-id`,transform:`list`}],prefix:`Namespacelabs`,service:`ImageService`,propagate:`w3c`};const D=/*@__PURE__*/ l(function AlreadyExists(i){return f(i,new.target,[`$5($4()("AlreadyExists",{message:$2,body:$3}).pipe($1),[{status:409,body:{"/code":"already_exists"}}])`,[r,t,C,n,e,b]])});const O=/*@__PURE__*/ l(function FailedPrecondition(t){return f(t,new.target,[`$5($4()("FailedPrecondition",{message:$2,body:$3}).pipe($1),[{status:400,body:{"/code":"failed_precondition"}}])`,[r,w,C,n,e,b]])});const k=/*@__PURE__*/ l(function InvalidArgument(t){return f(t,new.target,[`$5($4()("InvalidArgument",{message:$2,body:$3}).pipe($1),[{status:400,body:{"/code":"invalid_argument"}}])`,[r,w,C,n,e,b]])});const A=/*@__PURE__*/ l(function NotFound(t){return f(t,new.target,[`$5($4()("NotFound",{message:$2,body:$3}).pipe($1),[{status:404}])`,[r,w,C,n,e,b]])});const j=/*@__PURE__*/ l(function PermissionDenied(t){return f(t,new.target,[`$5($4()("PermissionDenied",{message:$2,body:$3}).pipe($1),[{status:403}])`,[r,S,C,n,e,b]])});const M=/*@__PURE__*/ l(function ResourceExhausted(t){return f(t,new.target,[`$5($4()("ResourceExhausted",{message:$2,body:$3}).pipe($1),[{status:429}])`,[r,a,C,n,e,b]])});const N=/*@__PURE__*/ l(function Unauthenticated(t){return f(t,new.target,[`$5($4()("Unauthenticated",{message:$2,body:$3}).pipe($1),[{status:401}])`,[r,S,C,n,e,b]])});const P=/*@__PURE__*/ m(e=>e===s?d(`Build`,`{input:#1,output:#2,errors:[$7,$8,$9,$10,$11,$12,$13,$14],protocol:$15,retry:$16,telemetry:$17,span:"%"};$5(>3)@"%Request";$5(>4)@"%Response";$4({blueprintName:$3($2),blueprintId:$3($2),site:$3($2)}).pipe($1({method:"POST",uri:"/namespace.cloud.image.v1beta.ImageService/%",code:200}));$4({blueprint:$3(#6:9),imageRef:$2})`,[r,y,C,i,T,o,__d0,k,O,N,j,A,D,M,u,_,v,E]):c(P,e));const F=/*@__PURE__*/ m(e=>e===s?d(`CreateBlueprint`,`{input:#1,output:#7:0,errors:[$8,$9,$10,$11,$12,$13,$14,$15],protocol:$16,retry:$17,telemetry:$18,span:"%"};$6(>2)@"%Request";$5({blueprintName:$3($2),spec:$3(#4:5)}).pipe($1({method:"POST",uri:"/namespace.cloud.image.v1beta.ImageService/%",code:200}))`,[r,y,C,i,__d0,T,o,__d1,k,O,N,j,A,D,M,u,_,v,E]):c(F,e));const I=/*@__PURE__*/ m(e=>e===s?d(`FetchBlueprint`,`{input:#1,output:#6:0,errors:[$7,$8,$9,$10,$11,$12,$13,$14],protocol:$15,retry:$16,telemetry:$17,span:"%"};$5(>2)@"%Request";$4({blueprintName:$3($2),blueprintId:$3($2)}).pipe($1({method:"POST",uri:"/namespace.cloud.image.v1beta.ImageService/%",code:200}))`,[r,y,C,i,T,o,__d1,k,O,N,j,A,D,M,u,_,v,E]):c(I,e));const L=/*@__PURE__*/ h(e=>e===s?d(`ListBlueprints`,`{input:#1,output:#3,errors:[$8,$9,$10,$11,$12,$13,$14,$15],protocol:$16,retry:$17,telemetry:$18,span:"%",pagination:{mode:"cursor",inputToken:"paginationCursor",outputToken:"paginationCursor",items:"blueprints"},strategy:$19};$5(>4)@"%Request";$7(#6:9);$5(>5)@"%Response";$4({paginationCursor:$3($2)}).pipe($1({method:"POST",uri:"/namespace.cloud.image.v1beta.ImageService/%",code:200}));$4({paginationCursor:$2,blueprints:#2})`,[r,y,C,i,T,o,__d0,p,k,O,N,j,A,D,M,u,_,v,E,g]):c(L,e));const R=/*@__PURE__*/ m(e=>e===s?d(`RemoveBlueprint`,`{input:#1,output:#2,errors:[$6,$7,$8,$9,$10,$11,$12,$13],protocol:$14,retry:$15,telemetry:$16,span:"%"};$5(>3)@"%Request";$5(>4)@"%Response";$4({blueprintName:$3($2)}).pipe($1({method:"POST",uri:"/namespace.cloud.image.v1beta.ImageService/%",code:200}));$4({})`,[r,y,C,i,T,o,k,O,N,j,A,D,M,u,_,v,E]):c(R,e));function __d0(){return[`$4(>10)@"BlueprintSpecDockerfile";$4(>11)@"BlueprintRef";$4(>12)@"BlueprintSpecBaseImageSource";$5($1);$4(>13)@"BlueprintSpecAptBasedImage";$4(>14)@"BlueprintSpec";$4(>15)@"ImageBlueprintStatePerSite";$6($1,#6);$4(>16)@"ImageBlueprintStatus";$4(>17)@"ImageBlueprint";$3({content:$2($1)});$3({name:$2($1),id:$2($1)});$3({imageRef:$2($1),blueprintRef:$2(#1)});$3({baseImage:$2(#2),aptPackages:$2(#3)});$3({dockerfile:$2(#0),aptBasedImage:$2(#4)});$3({state:$1,instanceId:$1,imageRef:$1});$3({builtAt:$2($1),imageRef:$1,lastAttemptAt:$2($1),builderRef:$1,error:$1});$3({id:$1,name:$1,createdAt:$2($1),replacedAt:$2($1),spec:$2(#5),creatorId:$1,state:#7,metadataVersion:$1,status:$2(#8),statusUpdatedAt:$2($1)})`,[r,C,i,T,o,p,x]]}function __d1(){return[`$4(>1)@"CreateBlueprintResponse";$3({blueprint:$2(#1:9)})`,[r,__d0,i,T,o]]}export{D as AlreadyExists,O as FailedPrecondition,k as InvalidArgument,A as NotFound,j as PermissionDenied,M as ResourceExhausted,N as Unauthenticated,P as build,F as createBlueprint,I as fetchBlueprint,L as listBlueprints,R as removeBlueprint};
|
|
2
|
+
//# sourceMappingURL=image.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"image.js","names":["API.newError","__L.at","C.withConflictError","S.String","S.Unknown","S.TaggedError","T.applyErrorMatchers","C.withBadRequestError","C.withAuthError","C.withThrottlingError","API.D","API.named","T.Http","S.optional","S.Struct","S.suspend","Retry.Retry","API.call","S.Array","S.Record","TaggedError","withConflictError","Unknown","at","optional","withThrottlingError","suspend","D","error","UnknownNamespaceLabsError","named","newError","Array","opPaginated","paginateCursor","NamespaceLabsProtocol","Retry","Http","applyErrorMatchers","Record","withAuthError","String","withBadRequestError","Struct","TELEMETRY","AlreadyExists","FailedPrecondition","i","InvalidArgument","NotFound","PermissionDenied","ResourceExhausted","Unauthenticated","build","call","createBlueprint","fetchBlueprint","listBlueprints","removeBlueprint"],"sources":["../../src/services/image.ts"],"mappings":"wVAkBA,MAAM4C,EAAY,CAChB,OAAQ,oBACR,gBAAiB,CACf,CAAE,OAAQ,eAAgB,KAAM,oCAAqC,UAAW,MAAO,EACvF,CAAE,OAAQ,aAAc,KAAM,kCAAmC,UAAW,MAAO,CACrF,EACA,OAAQ,gBACR,QAAS,eACT,UAAW,KACb,EAEA,MAAaC,EAAmC,gBAAU,SAAS,cAAc,EAAa,CAC5F,OAAO7C,EAAa,EAAG,WAAY,CAAC,yGAA0G,CAACC,EAAQC,EAAqBC,EA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,MAAY,CACnB,MAAO,CAAC,ssBAAusB,CAAC9C,EAAQE,EAAUU,EAAYC,EAAUC,EAAWG,EAASC,CAAQ,CAAC,CACvxB,CACA,SAAS,MAAY,CACnB,MAAO,CAAC,4DAA6D,CAAClB,EAAQ,KAAMY,EAAYC,EAAUC,CAAS,CAAC,CACtH"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export * as artifacts from "./artifacts.ts";
|
|
2
|
+
export * as audit from "./audit.ts";
|
|
3
|
+
export * as bazelCache from "./bazel_cache.ts";
|
|
4
|
+
export * as bazel from "./bazel.ts";
|
|
5
|
+
export * as builder from "./builder.ts";
|
|
6
|
+
export * as buildkiteJobs from "./buildkite_jobs.ts";
|
|
7
|
+
export * as buildkiteQueue from "./buildkite_queue.ts";
|
|
8
|
+
export * as computeCommand from "./compute_command.ts";
|
|
9
|
+
export * as computeObservability from "./compute_observability.ts";
|
|
10
|
+
export * as computeStorage from "./compute_storage.ts";
|
|
11
|
+
export * as computeUsage from "./compute_usage.ts";
|
|
12
|
+
export * as compute from "./compute.ts";
|
|
13
|
+
export * as egress from "./egress.ts";
|
|
14
|
+
export * as experimentalComputeReservation from "./experimental_compute_reservation.ts";
|
|
15
|
+
export * as experimentalRemoteResults from "./experimental_remote_results.ts";
|
|
16
|
+
export * as githubImage from "./github_image.ts";
|
|
17
|
+
export * as githubJobs from "./github_jobs.ts";
|
|
18
|
+
export * as githubProfile from "./github_profile.ts";
|
|
19
|
+
export * as gradleCache from "./gradle_cache.ts";
|
|
20
|
+
export * as httpcache from "./httpcache.ts";
|
|
21
|
+
export * as iamTenantMembership from "./iam_tenant_membership.ts";
|
|
22
|
+
export * as iamTenant from "./iam_tenant.ts";
|
|
23
|
+
export * as iamToken from "./iam_token.ts";
|
|
24
|
+
export * as image from "./image.ts";
|
|
25
|
+
export * as privateDevbox from "./private_devbox.ts";
|
|
26
|
+
export * as privateUserSessions from "./private_user_sessions.ts";
|
|
27
|
+
export * as registry from "./registry.ts";
|
|
28
|
+
export * as testing from "./testing.ts";
|
|
29
|
+
export * as vault from "./vault.ts";
|
|
30
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/services/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAC;AAC5C,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,UAAU,MAAM,kBAAkB,CAAC;AAC/C,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,OAAO,MAAM,cAAc,CAAC;AACxC,OAAO,KAAK,aAAa,MAAM,qBAAqB,CAAC;AACrD,OAAO,KAAK,cAAc,MAAM,sBAAsB,CAAC;AACvD,OAAO,KAAK,cAAc,MAAM,sBAAsB,CAAC;AACvD,OAAO,KAAK,oBAAoB,MAAM,4BAA4B,CAAC;AACnE,OAAO,KAAK,cAAc,MAAM,sBAAsB,CAAC;AACvD,OAAO,KAAK,YAAY,MAAM,oBAAoB,CAAC;AACnD,OAAO,KAAK,OAAO,MAAM,cAAc,CAAC;AACxC,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AACtC,OAAO,KAAK,8BAA8B,MAAM,uCAAuC,CAAC;AACxF,OAAO,KAAK,yBAAyB,MAAM,kCAAkC,CAAC;AAC9E,OAAO,KAAK,WAAW,MAAM,mBAAmB,CAAC;AACjD,OAAO,KAAK,UAAU,MAAM,kBAAkB,CAAC;AAC/C,OAAO,KAAK,aAAa,MAAM,qBAAqB,CAAC;AACrD,OAAO,KAAK,WAAW,MAAM,mBAAmB,CAAC;AACjD,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAC;AAC5C,OAAO,KAAK,mBAAmB,MAAM,4BAA4B,CAAC;AAClE,OAAO,KAAK,SAAS,MAAM,iBAAiB,CAAC;AAC7C,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAC3C,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,aAAa,MAAM,qBAAqB,CAAC;AACrD,OAAO,KAAK,mBAAmB,MAAM,4BAA4B,CAAC;AAClE,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,OAAO,MAAM,cAAc,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export * as artifacts from "./artifacts.js";
|
|
2
|
+
export * as audit from "./audit.js";
|
|
3
|
+
export * as bazelCache from "./bazel_cache.js";
|
|
4
|
+
export * as bazel from "./bazel.js";
|
|
5
|
+
export * as builder from "./builder.js";
|
|
6
|
+
export * as buildkiteJobs from "./buildkite_jobs.js";
|
|
7
|
+
export * as buildkiteQueue from "./buildkite_queue.js";
|
|
8
|
+
export * as computeCommand from "./compute_command.js";
|
|
9
|
+
export * as computeObservability from "./compute_observability.js";
|
|
10
|
+
export * as computeStorage from "./compute_storage.js";
|
|
11
|
+
export * as computeUsage from "./compute_usage.js";
|
|
12
|
+
export * as compute from "./compute.js";
|
|
13
|
+
export * as egress from "./egress.js";
|
|
14
|
+
export * as experimentalComputeReservation from "./experimental_compute_reservation.js";
|
|
15
|
+
export * as experimentalRemoteResults from "./experimental_remote_results.js";
|
|
16
|
+
export * as githubImage from "./github_image.js";
|
|
17
|
+
export * as githubJobs from "./github_jobs.js";
|
|
18
|
+
export * as githubProfile from "./github_profile.js";
|
|
19
|
+
export * as gradleCache from "./gradle_cache.js";
|
|
20
|
+
export * as httpcache from "./httpcache.js";
|
|
21
|
+
export * as iamTenantMembership from "./iam_tenant_membership.js";
|
|
22
|
+
export * as iamTenant from "./iam_tenant.js";
|
|
23
|
+
export * as iamToken from "./iam_token.js";
|
|
24
|
+
export * as image from "./image.js";
|
|
25
|
+
export * as privateDevbox from "./private_devbox.js";
|
|
26
|
+
export * as privateUserSessions from "./private_user_sessions.js";
|
|
27
|
+
export * as registry from "./registry.js";
|
|
28
|
+
export * as testing from "./testing.js";
|
|
29
|
+
export * as vault from "./vault.js";
|