@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,260 @@
|
|
|
1
|
+
import * as API from "@distilled.cloud/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
|
+
/** Labels are key/value pairs attached to entities such as tenants. */
|
|
76
|
+
export interface Label {
|
|
77
|
+
/** A name is an string up to 63 bytes that matches the regular expression `^[a-z]([a-z0-9-.]*[a-z0-9])?$`. */
|
|
78
|
+
name?: string | undefined;
|
|
79
|
+
/** Label values are arbitrary values up to 255 bytes. */
|
|
80
|
+
value?: string | undefined;
|
|
81
|
+
}
|
|
82
|
+
export type LabelList = Array<Label>;
|
|
83
|
+
export interface CreateArtifactRequestIfExists {
|
|
84
|
+
/** Create a new version instead of returning AlreadyExists. */
|
|
85
|
+
createNewVersion?: boolean | undefined;
|
|
86
|
+
/** After successful finalization, retain at most this many live versions, including the new version. The new version is retained first; remaining slots are filled by creation time, newest first, with artifact ID as a deterministic tie-breaker. Older versions are expired; their metadata remains and their data is garbage-collected asynchronously. Existing expiration dates still apply. Zero means no count limit. Negative values are invalid. A positive value requires create_new_version and artifact:expire access. Applies only to this upload, not to subsequent uploads that omit it. */
|
|
87
|
+
keepMaxVersions?: number | undefined;
|
|
88
|
+
}
|
|
89
|
+
export interface CreateArtifactRequest {
|
|
90
|
+
/** The file path for the artifact to be stored. */
|
|
91
|
+
path?: string | undefined;
|
|
92
|
+
/** The namespace that the artifact belongs to. Currently, artifact creation outside of the `main` namespace is not permitted. */
|
|
93
|
+
namespace?: string | undefined;
|
|
94
|
+
/** Set a custom expiration date for the artifact. If not provided the artifact never expires. */
|
|
95
|
+
expiresAt?: string | undefined;
|
|
96
|
+
/** A set of labels that are attached to the new artifact. */
|
|
97
|
+
labels?: LabelList | undefined;
|
|
98
|
+
/** Deprecated: please enable versioning using `if_exists.create_new_version`. Whether overwriting an existing artifact with the same path within the same namespace is allowed or not. */
|
|
99
|
+
overwrite?: boolean | undefined;
|
|
100
|
+
/** Deprecated: use `if_exists.create_new_version` instead. If a version of the artifact already exists, create a new version rather than failing creation. */
|
|
101
|
+
createNewVersionIfExists?: boolean | undefined;
|
|
102
|
+
/** Controls creation when the same tenant, namespace, and path already exist. Cannot be combined with overwrite or create_new_version_if_exists set to true. */
|
|
103
|
+
ifExists?: CreateArtifactRequestIfExists | undefined;
|
|
104
|
+
}
|
|
105
|
+
export interface CreateArtifactResponse {
|
|
106
|
+
/** A pre-signed URL to upload the artifact data to. Use HTTP PUT to upload. The URL is valid for a limited time. */
|
|
107
|
+
signedUploadUrl: string;
|
|
108
|
+
/** The identifier for this upload. Pass this to FinalizeArtifact after the upload is complete. */
|
|
109
|
+
uploadId: string;
|
|
110
|
+
/** The date at which the artifact expires. */
|
|
111
|
+
expiresAt?: string | undefined;
|
|
112
|
+
}
|
|
113
|
+
export interface ExpireArtifactRequest {
|
|
114
|
+
/** The file path for the stored artifact. */
|
|
115
|
+
path?: string | undefined;
|
|
116
|
+
/** The namespace that the artifact belongs to. */
|
|
117
|
+
namespace?: string | undefined;
|
|
118
|
+
}
|
|
119
|
+
export interface ExpireArtifactResponse {
|
|
120
|
+
}
|
|
121
|
+
export interface ExtendArtifactRequest {
|
|
122
|
+
/** The file path for the stored artifact. */
|
|
123
|
+
path?: string | undefined;
|
|
124
|
+
/** The namespace that the artifact belongs to. */
|
|
125
|
+
namespace?: string | undefined;
|
|
126
|
+
/** At least one of `extend_by` or `ensure_minimum` must be set. When both are set, `extend_by` is applied first and `ensure_minimum` then acts as a lower bound on the result. Extend the current expiration by this duration, relative to the artifact's current expiration. Note: In JSON format, the Duration type is encoded as a string ending in the suffix "s" (seconds), e.g. "3600s". */
|
|
127
|
+
extendBy?: string | undefined;
|
|
128
|
+
/** Ensure the artifact expires no sooner than this duration from now. This is a lower bound, relative to the current time, and can be combined with `extend_by`. Note: In JSON format, the Duration type is encoded as a string ending in the suffix "s" (seconds), e.g. "3600s". */
|
|
129
|
+
ensureMinimum?: string | undefined;
|
|
130
|
+
}
|
|
131
|
+
export interface ExtendArtifactResponse {
|
|
132
|
+
/** The effective expiration of the artifact after this call. Unset if the artifact never expires. */
|
|
133
|
+
expiresAt?: string | undefined;
|
|
134
|
+
}
|
|
135
|
+
export interface FinalizeArtifactRequest {
|
|
136
|
+
/** The upload ID returned by CreateArtifact. Required. */
|
|
137
|
+
uploadId?: string | undefined;
|
|
138
|
+
/** Labels to append to the artifact record. */
|
|
139
|
+
addLabels?: LabelList | undefined;
|
|
140
|
+
/** Unused, upload_id is sufficient. */
|
|
141
|
+
path?: string | undefined;
|
|
142
|
+
/** Unused, upload_id is sufficient. */
|
|
143
|
+
namespace?: string | undefined;
|
|
144
|
+
}
|
|
145
|
+
export type ArtifactStatus = "STATE_UNKNOWN" | "LIVE" | "EXPIRED";
|
|
146
|
+
export interface Artifact {
|
|
147
|
+
/** The unique identifier of this artifact. */
|
|
148
|
+
id: string;
|
|
149
|
+
/** The file path for the stored artifact. */
|
|
150
|
+
path: string;
|
|
151
|
+
/** The namespace that the artifact belongs to. */
|
|
152
|
+
namespace: string;
|
|
153
|
+
/** The date at which the artifact was created. */
|
|
154
|
+
createdAt?: string | undefined;
|
|
155
|
+
/** The date at which the artifact expires. */
|
|
156
|
+
expiresAt?: string | undefined;
|
|
157
|
+
labels: LabelList;
|
|
158
|
+
/** The size of the uploaded data in bytes. */
|
|
159
|
+
size: string;
|
|
160
|
+
/** URL to the dashboard for this artifact. */
|
|
161
|
+
webUrl: string;
|
|
162
|
+
/** In which state this artifact is. */
|
|
163
|
+
status: ArtifactStatus;
|
|
164
|
+
}
|
|
165
|
+
export interface FinalizeArtifactResponse {
|
|
166
|
+
description?: Artifact | undefined;
|
|
167
|
+
}
|
|
168
|
+
export type StringList = Array<string>;
|
|
169
|
+
export type LabelFilterEntryLabelFilterOp = "UNKNOWN" | "EQUAL" | "NOT_EQUAL" | "EXIST";
|
|
170
|
+
export interface LabelFilterEntry {
|
|
171
|
+
name?: string | undefined;
|
|
172
|
+
value?: string | undefined;
|
|
173
|
+
op?: LabelFilterEntryLabelFilterOp | (string & {}) | undefined;
|
|
174
|
+
}
|
|
175
|
+
export type LabelFilterEntryList = Array<LabelFilterEntry>;
|
|
176
|
+
export type ListArtifactsRequestOrderBy = "ORDER_BY_UNKNOWN" | "CreatedAt_Desc";
|
|
177
|
+
export interface Int64Range {
|
|
178
|
+
/** Inclusive. */
|
|
179
|
+
low?: string | undefined;
|
|
180
|
+
/** Inclusive. */
|
|
181
|
+
high?: string | undefined;
|
|
182
|
+
}
|
|
183
|
+
export type StringMatcherOperator = "OPERATOR_UNKNOWN" | "IS_ANY_OF" | "IS_NOT";
|
|
184
|
+
export interface StringMatcher {
|
|
185
|
+
values?: StringList | undefined;
|
|
186
|
+
op?: StringMatcherOperator | (string & {}) | undefined;
|
|
187
|
+
}
|
|
188
|
+
export interface ListArtifactsRequest {
|
|
189
|
+
/** If set, only return artifacts that belong to any of these namespaces. */
|
|
190
|
+
namespaces?: StringList | undefined;
|
|
191
|
+
/** Only return artifacts that match the specified filter. */
|
|
192
|
+
labelFilter?: LabelFilterEntryList | undefined;
|
|
193
|
+
/** Request a maximum N entries. */
|
|
194
|
+
maxEntries?: number | undefined;
|
|
195
|
+
/** Don't return expired entries. */
|
|
196
|
+
skipExpired?: boolean | undefined;
|
|
197
|
+
/** If provided, produces additional entries based on a previous list. In this case, `namespaces` and `label_filter` are ignored. */
|
|
198
|
+
paginationCursor?: string | undefined;
|
|
199
|
+
orderBy?: ListArtifactsRequestOrderBy | (string & {}) | undefined;
|
|
200
|
+
/** Filter artifacts by size in bytes. */
|
|
201
|
+
sizeRange?: Int64Range | undefined;
|
|
202
|
+
/** Filter artifacts by path regular expressions. IS_ANY_OF matches any regex; IS_NOT excludes paths matching any regex. */
|
|
203
|
+
matchPathRegex?: StringMatcher | undefined;
|
|
204
|
+
}
|
|
205
|
+
export type ArtifactList = Array<Artifact>;
|
|
206
|
+
export interface ListArtifactsResponse {
|
|
207
|
+
artifacts: ArtifactList;
|
|
208
|
+
/** Pass this to a subsequent ListRequest to obtain additional pages of data. */
|
|
209
|
+
paginationCursor: string;
|
|
210
|
+
}
|
|
211
|
+
export interface ListNamespacesRequest {
|
|
212
|
+
}
|
|
213
|
+
export interface Namespace {
|
|
214
|
+
name: string;
|
|
215
|
+
kind: string;
|
|
216
|
+
}
|
|
217
|
+
export type NamespaceList = Array<Namespace>;
|
|
218
|
+
export interface ListNamespacesResponse {
|
|
219
|
+
namespaces: NamespaceList;
|
|
220
|
+
}
|
|
221
|
+
export interface ResolveArtifactRequest {
|
|
222
|
+
/** The file path for the stored artifact. */
|
|
223
|
+
path?: string | undefined;
|
|
224
|
+
/** The namespace that the artifact belongs to. */
|
|
225
|
+
namespace?: string | undefined;
|
|
226
|
+
/** Don't produce a download URL; merely query the metadata. */
|
|
227
|
+
metadataOnly?: boolean | undefined;
|
|
228
|
+
/** If an expired artifact should be returned or not. If set to false an error is returned. */
|
|
229
|
+
includeExpired?: boolean | undefined;
|
|
230
|
+
}
|
|
231
|
+
export interface ResolveArtifactResponse {
|
|
232
|
+
/** Metadata about the requested artifact. */
|
|
233
|
+
description?: Artifact | undefined;
|
|
234
|
+
/** Direct URL to download the artifact without authentication. Valid within 30 minutes from the time of the request. */
|
|
235
|
+
signedDownloadUrl: string;
|
|
236
|
+
/** The date at which the artifact expires. */
|
|
237
|
+
expiresAt?: string | undefined;
|
|
238
|
+
}
|
|
239
|
+
export type CreateArtifactError = InvalidArgument | FailedPrecondition | Unauthenticated | PermissionDenied | NotFound | AlreadyExists | ResourceExhausted | NamespaceLabsOpError;
|
|
240
|
+
/** Creates a new artifact and returns a signed upload URL. Artifact creation follows a two-phase commit model: 1. Call CreateArtifact to obtain a `signed_upload_url` and `upload_id`. 2. Upload the artifact data to the signed URL using an HTTP PUT request. 3. Call FinalizeArtifact with the `upload_id` to commit the artifact. The artifact is not accessible for download until finalized. */
|
|
241
|
+
export declare const createArtifact: API.OperationMethod<CreateArtifactRequest, CreateArtifactResponse, CreateArtifactError, NamespaceLabsOpContext>;
|
|
242
|
+
export type ExpireArtifactError = InvalidArgument | FailedPrecondition | Unauthenticated | PermissionDenied | NotFound | AlreadyExists | ResourceExhausted | NamespaceLabsOpError;
|
|
243
|
+
/** Mark an artifact as eligible for garbage-collection. */
|
|
244
|
+
export declare const expireArtifact: API.OperationMethod<ExpireArtifactRequest, ExpireArtifactResponse, ExpireArtifactError, NamespaceLabsOpContext>;
|
|
245
|
+
export type ExtendArtifactError = InvalidArgument | FailedPrecondition | Unauthenticated | PermissionDenied | NotFound | AlreadyExists | ResourceExhausted | NamespaceLabsOpError;
|
|
246
|
+
/** Extend the expiration of a finalized artifact. This enables dynamic, access-based retention: create artifacts with a short expiration and push it out whenever they are accessed. ### Errors - If the artifact does not exist or has already expired, a `NotFound` status is returned. */
|
|
247
|
+
export declare const extendArtifact: API.OperationMethod<ExtendArtifactRequest, ExtendArtifactResponse, ExtendArtifactError, NamespaceLabsOpContext>;
|
|
248
|
+
export type FinalizeArtifactError = InvalidArgument | FailedPrecondition | Unauthenticated | PermissionDenied | NotFound | AlreadyExists | ResourceExhausted | NamespaceLabsOpError;
|
|
249
|
+
/** Finalize a fully uploaded artifact (making it available for download). */
|
|
250
|
+
export declare const finalizeArtifact: API.OperationMethod<FinalizeArtifactRequest, FinalizeArtifactResponse, FinalizeArtifactError, NamespaceLabsOpContext>;
|
|
251
|
+
export type ListArtifactsError = InvalidArgument | FailedPrecondition | Unauthenticated | PermissionDenied | NotFound | AlreadyExists | ResourceExhausted | NamespaceLabsOpError;
|
|
252
|
+
/** List finalized artifacts. */
|
|
253
|
+
export declare const listArtifacts: API.PaginatedOperationMethod<ListArtifactsRequest, ListArtifactsResponse, ListArtifactsError, NamespaceLabsOpContext, Artifact>;
|
|
254
|
+
export type ListNamespacesError = InvalidArgument | FailedPrecondition | Unauthenticated | PermissionDenied | NotFound | AlreadyExists | ResourceExhausted | NamespaceLabsOpError;
|
|
255
|
+
/** List namespaces with finalized artifacts. */
|
|
256
|
+
export declare const listNamespaces: API.OperationMethod<ListNamespacesRequest, ListNamespacesResponse, ListNamespacesError, NamespaceLabsOpContext>;
|
|
257
|
+
export type ResolveArtifactError = InvalidArgument | FailedPrecondition | Unauthenticated | PermissionDenied | NotFound | AlreadyExists | ResourceExhausted | NamespaceLabsOpError;
|
|
258
|
+
/** Resolves a finalized artifact and generates a download URL. */
|
|
259
|
+
export declare const resolveArtifact: API.OperationMethod<ResolveArtifactRequest, ResolveArtifactResponse, ResolveArtifactError, NamespaceLabsOpContext>;
|
|
260
|
+
//# sourceMappingURL=artifacts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"artifacts.d.ts","sourceRoot":"","sources":["../../src/services/artifacts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,2BAA2B,CAAC;AAGjD,OAAO,KAAK,CAAC,MAAM,mCAAmC,CAAC;AAIvD,OAAO,EAEL,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,EAC5B,MAAM,gBAAgB,CAAC;AAMxB,YAAY,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,CAAC;;;;;;;;;AAc7D,qB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Ae,GACf,kBAAkB,GAClB,eAAe,GACf,gBAAgB,GAChB,QAAQ,GACR,aAAa,GACb,iBAAiB,GACjB,oBAAoB,CAAC;AACzB,6EAA6E;AAC7E,eAAO,MAAM,gBAAgB,EAAE,GAAG,CAAC,eAAe,CAChD,uBAAuB,EACvB,wBAAwB,EACxB,qBAAqB,EACrB,sBAAsB,CAkBrB,CAAC;AAEJ,MAAM,MAAM,kBAAkB,GAC1B,eAAe,GACf,kBAAkB,GAClB,eAAe,GACf,gBAAgB,GAChB,QAAQ,GACR,aAAa,GACb,iBAAiB,GACjB,oBAAoB,CAAC;AACzB,gCAAgC;AAChC,eAAO,MAAM,aAAa,EAAE,GAAG,CAAC,wBAAwB,CACtD,oBAAoB,EACpB,qBAAqB,EACrB,kBAAkB,EAClB,sBAAsB,EACtB,QAAQ,CA4BF,CAAC;AAET,MAAM,MAAM,mBAAmB,GAC3B,eAAe,GACf,kBAAkB,GAClB,eAAe,GACf,gBAAgB,GAChB,QAAQ,GACR,aAAa,GACb,iBAAiB,GACjB,oBAAoB,CAAC;AACzB,gDAAgD;AAChD,eAAO,MAAM,cAAc,EAAE,GAAG,CAAC,eAAe,CAC9C,qBAAqB,EACrB,sBAAsB,EACtB,mBAAmB,EACnB,sBAAsB,CAkBrB,CAAC;AAEJ,MAAM,MAAM,oBAAoB,GAC5B,eAAe,GACf,kBAAkB,GAClB,eAAe,GACf,gBAAgB,GAChB,QAAQ,GACR,aAAa,GACb,iBAAiB,GACjB,oBAAoB,CAAC;AACzB,kEAAkE;AAClE,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,mc as h,n as g,pagination$paginateCursor as _,protocol$NamespaceLabsProtocol as v,retry$Retry as y,traits$Http as b,traits$applyErrorMatchers as x,uc 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:`ArtifactsService`,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,x]])});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,x]])});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,x]])});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,x]])});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,x]])});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,x]])});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,x]])});const F=/*@__PURE__*/ m(e=>e===s?d(`CreateArtifact`,`{input:#2,output:#3,errors:[$9,$10,$11,$12,$13,$14,$15,$16],protocol:$17,retry:$18,telemetry:$19,span:"%"};$5(>4)@"%RequestIfExists";$5(>5)@"%Request";$5(>6)@"%Response";$4({createNewVersion:$2($1),keepMaxVersions:$2($3)});$4({path:$2($7),namespace:$2($7),expiresAt:$2($7),labels:$2(#8:1),overwrite:$2($1),createNewVersionIfExists:$2($1),ifExists:$2(#1)}).pipe($6({method:"POST",uri:"/namespace.cloud.storage.v1beta.ArtifactsService/%",code:200}));$4({signedUploadUrl:$7,uploadId:$7,expiresAt:$2($7)})`,[r,h,i,S,E,o,b,w,__d1,A,k,P,M,j,O,N,u,v,y,D]):c(F,e));const I=/*@__PURE__*/ m(e=>e===s?d(`ExpireArtifact`,`{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({path:$3($2),namespace:$3($2)}).pipe($1({method:"POST",uri:"/namespace.cloud.storage.v1beta.ArtifactsService/%",code:200}));$4({})`,[r,b,w,i,E,o,A,k,P,M,j,O,N,u,v,y,D]):c(I,e));const L=/*@__PURE__*/ m(e=>e===s?d(`ExtendArtifact`,`{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({path:$3($2),namespace:$3($2),extendBy:$3($2),ensureMinimum:$3($2)}).pipe($1({method:"POST",uri:"/namespace.cloud.storage.v1beta.ArtifactsService/%",code:200}));$4({expiresAt:$3($2)})`,[r,b,w,i,E,o,A,k,P,M,j,O,N,u,v,y,D]):c(L,e));const R=/*@__PURE__*/ m(e=>e===s?d(`FinalizeArtifact`,`{input:#1,output:#2,errors:[$8,$9,$10,$11,$12,$13,$14,$15],protocol:$16,retry:$17,telemetry:$18,span:"%"};$6(>3)@"%Request";$6(>4)@"%Response";$5({uploadId:$3($2),addLabels:$3(#4:1),path:$3($2),namespace:$3($2)}).pipe($1({method:"POST",uri:"/namespace.cloud.storage.v1beta.ArtifactsService/%",code:200}));$5({description:$3(#7:0)})`,[r,b,w,i,__d1,E,o,__d0,A,k,P,M,j,O,N,u,v,y,D]):c(R,e));const z=/*@__PURE__*/ g(e=>e===s?d(`ListArtifacts`,`{input:#6,output:#8,errors:[$10,$11,$12,$13,$14,$15,$16,$17],protocol:$18,retry:$19,telemetry:$20,span:"%",pagination:{mode:"cursor",inputToken:"paginationCursor",outputToken:"paginationCursor",items:"artifacts",pageSize:"maxEntries"},strategy:$21};$2($1);$5(>9)@"LabelFilterEntry";$2(#2);$5(>10)@"Int64Range";$5(>11)@"StringMatcher";$5(>12)@"%Request";$2(#9:0);$5(>13)@"%Response";$4({name:$3($1),value:$3($1),op:$3($1)});$4({low:$3($1),high:$3($1)});$4({values:$3(#1),op:$3($1)});$4({namespaces:$3(#1),labelFilter:$3(#3),maxEntries:$3($7),skipExpired:$3($8),paginationCursor:$3($1),orderBy:$3($1),sizeRange:$3(#4),matchPathRegex:$3(#5)}).pipe($6({method:"POST",uri:"/namespace.cloud.storage.v1beta.ArtifactsService/%",code:200}));$4({artifacts:#7,paginationCursor:$1})`,[r,w,p,i,E,o,b,S,h,__d0,A,k,P,M,j,O,N,u,v,y,D,_]):c(z,e));const B=/*@__PURE__*/ m(e=>e===s?d(`ListNamespaces`,`{input:#1,output:#4,errors:[$6,$7,$8,$9,$10,$11,$12,$13],protocol:$14,retry:$15,telemetry:$16,span:"%"};$3(>5)@"%Request";$3(>6)@"Namespace";$5(#2);$3(>7)@"%Response";$2({}).pipe($1({method:"POST",uri:"/namespace.cloud.storage.v1beta.ArtifactsService/%",code:200}));$2({name:$4,kind:$4});$2({namespaces:#3})`,[r,b,E,o,w,p,A,k,P,M,j,O,N,u,v,y,D]):c(B,e));const V=/*@__PURE__*/ m(e=>e===s?d(`ResolveArtifact`,`{input:#1,output:#2,errors:[$8,$9,$10,$11,$12,$13,$14,$15],protocol:$16,retry:$17,telemetry:$18,span:"%"};$6(>3)@"%Request";$6(>4)@"%Response";$5({path:$3($2),namespace:$3($2),metadataOnly:$3($4),includeExpired:$3($4)}).pipe($1({method:"POST",uri:"/namespace.cloud.storage.v1beta.ArtifactsService/%",code:200}));$5({description:$3(#7:0),signedDownloadUrl:$2,expiresAt:$3($2)})`,[r,b,w,i,h,E,o,__d0,A,k,P,M,j,O,N,u,v,y,D]):c(V,e));function __d0(){return[`$5(>1)@"Artifact";$4({id:$1,path:$1,namespace:$1,createdAt:$2($1),expiresAt:$2($1),labels:#3:1,size:$1,webUrl:$1,status:$1})`,[r,w,i,__d1,E,o]]}function __d1(){return[`$4(>2)@"Label";$5(#0);$3({name:$2($1),value:$2($1)})`,[r,w,i,E,o,p]]}export{O as AlreadyExists,k as FailedPrecondition,A as InvalidArgument,j as NotFound,M as PermissionDenied,N as ResourceExhausted,P as Unauthenticated,F as createArtifact,I as expireArtifact,L as extendArtifact,R as finalizeArtifact,z as listArtifacts,B as listNamespaces,V as resolveArtifact};
|
|
2
|
+
//# sourceMappingURL=artifacts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"artifacts.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","S.Boolean","S.optional","S.Number","S.Struct","S.suspend","T.Http","Retry.Retry","API.call","S.Array","TaggedError","withConflictError","Unknown","at","optional","withThrottlingError","suspend","D","error","UnknownNamespaceLabsError","named","newError","Array","Boolean","opPaginated","paginateCursor","NamespaceLabsProtocol","Retry","Http","applyErrorMatchers","Number","withAuthError","String","withBadRequestError","Struct","TELEMETRY","AlreadyExists","FailedPrecondition","i","InvalidArgument","NotFound","PermissionDenied","ResourceExhausted","Unauthenticated","createArtifact","call","expireArtifact","extendArtifact","finalizeArtifact","listArtifacts","listNamespaces","resolveArtifact"],"sources":["../../src/services/artifacts.ts"],"mappings":"gWAkBA,MAAM8C,EAAY,CAChB,OAAQ,oBACR,gBAAiB,CACf,CAAE,OAAQ,eA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vC,EAAQC,EAAU,gBAAiB,qwBAAswB,CAACV,EAAQE,EAAUiB,EAASP,EAAYE,EAAUC,EAAWC,EAAQH,EAAUF,EAAW,KAAMsC,EAAiBF,EAAoBM,EAAiBF,EAAkBD,EAAUJ,EAAeM,EAAmBvB,EAA2BO,EAAuBnB,EAAa4B,EAAWV,CAAc,CAAC,EAAIjB,EAASyC,EAAeX,CAAC,CAAC,EAY7qC,MAAaY,EAKK,gBAAQ,GAAgBZ,IAAMvC,EAAQC,EAAU,iBAAkB,sTAAuT,CAACV,EAAQgB,EAAQF,EAAUC,EAAWb,EAAUiB,EAAS8B,EAAiBF,EAAoBM,EAAiBF,EAAkBD,EAAUJ,EAAeM,EAAmBvB,EAA2BO,EAAuBnB,EAAa4B,CAAS,CAAC,EAAI3B,EAAS0C,EAAgBZ,CAAC,CAAC,EAYhqB,MAAaa,EAKK,gBAAQ,GAAgBb,IAAMvC,EAAQC,EAAU,kBAAmB,2XAA4X,CAACV,EAAQgB,EAAQd,EAAUU,EAAYD,EAAWG,EAAUC,EAAW,KAAMkC,EAAiBF,EAAoBM,EAAiBF,EAAkBD,EAAUJ,EAAeM,EAAmBvB,EAA2BO,EAAuBnB,EAAa4B,CAAS,CAAC,EAAI3B,EAAS2C,EAAiBb,CAAC,CAAC,EAM3vB,SAAS,MAAY,CACnB,MAAO,CAAC,+HAAgI,CAAChD,EAAQE,EAAUU,EAAY,KAAME,EAAUC,CAAS,CAAC,CACnM,CACA,SAAS,MAAY,CACnB,MAAO,CAAC,uDAAwD,CAACf,EAAQE,EAAUU,EAAYE,EAAUC,EAAWI,CAAO,CAAC,CAC9H"}
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import * as API from "@distilled.cloud/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 TimestampRange {
|
|
76
|
+
after?: string | undefined;
|
|
77
|
+
before?: string | undefined;
|
|
78
|
+
}
|
|
79
|
+
export type StringList = Array<string>;
|
|
80
|
+
export type StringMatcherOperator = "OPERATOR_UNKNOWN" | "IS_ANY_OF" | "IS_NOT";
|
|
81
|
+
export interface StringMatcher {
|
|
82
|
+
values?: StringList | undefined;
|
|
83
|
+
op?: StringMatcherOperator | (string & {}) | undefined;
|
|
84
|
+
}
|
|
85
|
+
export interface EntryFilter {
|
|
86
|
+
/** Filters entries by occurrence time. `after` is inclusive and `before` is exclusive. */
|
|
87
|
+
timeRange?: TimestampRange | undefined;
|
|
88
|
+
/** Filters by public action name. */
|
|
89
|
+
action?: StringMatcher | undefined;
|
|
90
|
+
/** Filters user actors by their Namespace user ID. */
|
|
91
|
+
actorUserId?: StringMatcher | undefined;
|
|
92
|
+
}
|
|
93
|
+
export interface ListEntriesRequest {
|
|
94
|
+
/** Continues a previous request. When set, filter must be unset. */
|
|
95
|
+
paginationCursor?: string | undefined;
|
|
96
|
+
/** Maximum number of entries to return. Defaults to 100 and may not exceed 1000. */
|
|
97
|
+
maxEntries?: number | undefined;
|
|
98
|
+
filter?: EntryFilter | undefined;
|
|
99
|
+
}
|
|
100
|
+
export interface AuditActor {
|
|
101
|
+
/** Always "user". Retained to identify the actor kind as the API evolves. */
|
|
102
|
+
type: string;
|
|
103
|
+
userId: string;
|
|
104
|
+
email: string;
|
|
105
|
+
githubUsername: string;
|
|
106
|
+
provider: string;
|
|
107
|
+
}
|
|
108
|
+
export interface AuditTarget {
|
|
109
|
+
type: string;
|
|
110
|
+
instanceId: string;
|
|
111
|
+
userId: string;
|
|
112
|
+
email: string;
|
|
113
|
+
githubUsername: string;
|
|
114
|
+
githubProfileId: string;
|
|
115
|
+
githubInstallationId: string;
|
|
116
|
+
networkSegmentTag: string;
|
|
117
|
+
secretId: string;
|
|
118
|
+
imageRef: string;
|
|
119
|
+
devboxId: string;
|
|
120
|
+
egressPolicyTag: string;
|
|
121
|
+
}
|
|
122
|
+
export type AuditTargetList = Array<AuditTarget>;
|
|
123
|
+
export interface AuditEntry {
|
|
124
|
+
eventId: string;
|
|
125
|
+
tenantId: string;
|
|
126
|
+
occurredAt?: string | undefined;
|
|
127
|
+
/** A stable public action name such as "instance.destroy". */
|
|
128
|
+
action: string;
|
|
129
|
+
actor?: AuditActor | undefined;
|
|
130
|
+
targets: AuditTargetList;
|
|
131
|
+
/** Action-specific, allowlisted attributes. */
|
|
132
|
+
attributes?: unknown | undefined;
|
|
133
|
+
}
|
|
134
|
+
export type AuditEntryList = Array<AuditEntry>;
|
|
135
|
+
export interface AuditAccess {
|
|
136
|
+
retentionDays: number;
|
|
137
|
+
/** The effective inclusive lower bound applied to the request. */
|
|
138
|
+
effectiveAfter?: string | undefined;
|
|
139
|
+
}
|
|
140
|
+
export interface ListEntriesResponse {
|
|
141
|
+
entries: AuditEntryList;
|
|
142
|
+
/** If set, there are additional entries. Pass this cursor to the next request. */
|
|
143
|
+
paginationCursor: string;
|
|
144
|
+
access?: AuditAccess | undefined;
|
|
145
|
+
}
|
|
146
|
+
export type ListEntriesError = InvalidArgument | FailedPrecondition | Unauthenticated | PermissionDenied | NotFound | AlreadyExists | ResourceExhausted | NamespaceLabsOpError;
|
|
147
|
+
/** Lists audit entries matching the specified filters, newest first. */
|
|
148
|
+
export declare const listEntries: API.PaginatedOperationMethod<ListEntriesRequest, ListEntriesResponse, ListEntriesError, NamespaceLabsOpContext, AuditEntry>;
|
|
149
|
+
//# sourceMappingURL=audit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audit.d.ts","sourceRoot":"","sources":["../../src/services/audit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,2BAA2B,CAAC;AAGjD,OAAO,KAAK,CAAC,MAAM,mCAAmC,CAAC;AAIvD,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;CAA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@ -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,n as m,pagination$paginateCursor as h,protocol$NamespaceLabsProtocol as g,retry$Retry as _,traits$Http as v,traits$applyErrorMatchers as y,uc as b,xa as x,xc as S,ya as C,yc as w}from"../_bundle/sdk.js";const T={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:`AuditService`,propagate:`w3c`};const E=/*@__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,S,n,e,y]])});const D=/*@__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,C,S,n,e,y]])});const O=/*@__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,C,S,n,e,y]])});const k=/*@__PURE__*/ l(function NotFound(t){return f(t,new.target,[`$5($4()("NotFound",{message:$2,body:$3}).pipe($1),[{status:404}])`,[r,C,S,n,e,y]])});const A=/*@__PURE__*/ l(function PermissionDenied(t){return f(t,new.target,[`$5($4()("PermissionDenied",{message:$2,body:$3}).pipe($1),[{status:403}])`,[r,x,S,n,e,y]])});const j=/*@__PURE__*/ l(function ResourceExhausted(t){return f(t,new.target,[`$5($4()("ResourceExhausted",{message:$2,body:$3}).pipe($1),[{status:429}])`,[r,a,S,n,e,y]])});const M=/*@__PURE__*/ l(function Unauthenticated(t){return f(t,new.target,[`$5($4()("Unauthenticated",{message:$2,body:$3}).pipe($1),[{status:401}])`,[r,x,S,n,e,y]])});const N=/*@__PURE__*/ m(e=>e===s?d(`ListEntries`,`{input:#5,output:#12,errors:[$9,$10,$11,$12,$13,$14,$15,$16],protocol:$17,retry:$18,telemetry:$19,span:"%",pagination:{mode:"cursor",inputToken:"paginationCursor",outputToken:"paginationCursor",items:"entries",pageSize:"maxEntries"},strategy:$20};$4(>13)@"TimestampRange";$5($1);$4(>14)@"StringMatcher";$4(>15)@"EntryFilter";$4(>16)@"%Request";$4(>17)@"AuditActor";$4(>18)@"AuditTarget";$5(#7);$4(>19)@"AuditEntry";$5(#9);$4(>20)@"AuditAccess";$4(>21)@"%Response";$3({after:$2($1),before:$2($1)});$3({values:$2(#2),op:$2($1)});$3({timeRange:$2(#1),action:$2(#3),actorUserId:$2(#3)});$3({paginationCursor:$2($1),maxEntries:$2($7),filter:$2(#4)}).pipe($6({method:"POST",uri:"/namespace.cloud.audit.v1beta.AuditService/%",code:200}));$3({type:$1,userId:$1,email:$1,githubUsername:$1,provider:$1});$3({type:$1,instanceId:$1,userId:$1,email:$1,githubUsername:$1,githubProfileId:$1,githubInstallationId:$1,networkSegmentTag:$1,secretId:$1,imageRef:$1,devboxId:$1,egressPolicyTag:$1});$3({eventId:$1,tenantId:$1,occurredAt:$2($1),action:$1,actor:$2(#6),targets:#8,attributes:$2($8)});$3({retentionDays:$7,effectiveAfter:$2($1)});$3({entries:#10,paginationCursor:$1,access:$2(#11)})`,[r,S,i,w,o,p,v,b,n,O,D,M,A,k,E,j,u,g,_,T,h]):c(N,e));export{E as AlreadyExists,D as FailedPrecondition,O as InvalidArgument,k as NotFound,A as PermissionDenied,j as ResourceExhausted,M as Unauthenticated,N as listEntries};
|
|
2
|
+
//# sourceMappingURL=audit.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audit.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","S.optional","S.Struct","S.suspend","S.Array","T.Http","S.Number","Retry.Retry","API.call","TaggedError","withConflictError","Unknown","at","optional","withThrottlingError","suspend","D","error","UnknownNamespaceLabsError","named","newError","Array","opPaginated","paginateCursor","NamespaceLabsProtocol","Retry","Http","applyErrorMatchers","Number","withAuthError","String","withBadRequestError","Struct","TELEMETRY","AlreadyExists","FailedPrecondition","i","InvalidArgument","NotFound","PermissionDenied","ResourceExhausted","Unauthenticated","listEntries","call"],"sources":["../../src/services/audit.ts"],"mappings":"sVAkBA,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,EAAUC,EAAWC,EAAeC,CAAoB,CAAC,CAAC,CACxO,CAAC,EAED,MAAawC,EAAwC,gBAAU,SAAS,mBAAmB,EAAa,CACtG,OAAO9C,EAAa+C,EAAG,WAAY,CAAC,mHAAoH,CAAC9C,EAAQM,EAAuBJ,EAAUC,EAAWC,EAAeC,CAAoB,CAAC,CAAC,CACpP,CAAC,EAED,MAAa0C,EAAqC,gBAAU,SAAS,gBAAgB,EAAa,CAChG,OAAOhD,EAAa+C,EAAG,WAAY,CAAC,6GAA8G,CAAC9C,EAAQM,EAAuBJ,EAAUC,EAAWC,EAAeC,CAAoB,CAAC,CAAC,CAC9O,CAAC,EAED,MAAa2C,EAA8B,gBAAU,SAAS,SAAS,EAAa,CAClF,OAAOjD,EAAa+C,EAAG,WAAY,CAAC,oEAAqE,CAAC9C,EAAQM,EAAuBJ,EAAUC,EAAWC,EAAeC,CAAoB,CAAC,CAAC,CACrM,CAAC,EAED,MAAa4C,E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