@distilled.cloud/namespacelabs 0.0.0 → 1.0.0-rc.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +130 -4
- package/lib/.lazy.json +1 -0
- package/lib/_bundle/lazy.js +4 -0
- package/lib/_bundle/sdk.js +2 -0
- package/lib/_bundle/sdk.js.map +1 -0
- package/lib/credentials.d.ts +73 -0
- package/lib/credentials.d.ts.map +1 -0
- package/lib/credentials.js +1 -0
- package/lib/errors.d.ts +59 -0
- package/lib/errors.d.ts.map +1 -0
- package/lib/errors.js +1 -0
- package/lib/index.d.ts +44 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +6 -0
- package/lib/pagination.d.ts +2 -0
- package/lib/pagination.d.ts.map +1 -0
- package/lib/pagination.js +1 -0
- package/lib/protocol.d.ts +19 -0
- package/lib/protocol.d.ts.map +1 -0
- package/lib/protocol.js +1 -0
- package/lib/retry.d.ts +12 -0
- package/lib/retry.d.ts.map +1 -0
- package/lib/retry.js +1 -0
- package/lib/services/buildkite_jobs.d.ts +129 -0
- package/lib/services/buildkite_jobs.d.ts.map +1 -0
- package/lib/services/buildkite_jobs.js +2 -0
- package/lib/services/buildkite_jobs.js.map +1 -0
- package/lib/services/buildkite_queue.d.ts +186 -0
- package/lib/services/buildkite_queue.d.ts.map +1 -0
- package/lib/services/buildkite_queue.js +2 -0
- package/lib/services/buildkite_queue.js.map +1 -0
- package/lib/services/index.d.ts +3 -0
- package/lib/services/index.d.ts.map +1 -0
- package/lib/services/index.js +2 -0
- package/lib/services.lazy/buildkite_jobs.js +1 -0
- package/lib/services.lazy/buildkite_queue.js +1 -0
- package/lib/services.lazy/index.js +3 -0
- package/lib/traits.d.ts +3 -0
- package/lib/traits.d.ts.map +1 -0
- package/lib/traits.js +1 -0
- package/lib/unstable-services/artifacts.d.ts +268 -0
- package/lib/unstable-services/artifacts.d.ts.map +1 -0
- package/lib/unstable-services/artifacts.js +2 -0
- package/lib/unstable-services/artifacts.js.map +1 -0
- package/lib/unstable-services/audit.d.ts +157 -0
- package/lib/unstable-services/audit.d.ts.map +1 -0
- package/lib/unstable-services/audit.js +2 -0
- package/lib/unstable-services/audit.js.map +1 -0
- package/lib/unstable-services/bazel.d.ts +181 -0
- package/lib/unstable-services/bazel.d.ts.map +1 -0
- package/lib/unstable-services/bazel.js +2 -0
- package/lib/unstable-services/bazel.js.map +1 -0
- package/lib/unstable-services/bazel_cache.d.ts +126 -0
- package/lib/unstable-services/bazel_cache.d.ts.map +1 -0
- package/lib/unstable-services/bazel_cache.js +2 -0
- package/lib/unstable-services/bazel_cache.js.map +1 -0
- package/lib/unstable-services/builder.d.ts +242 -0
- package/lib/unstable-services/builder.d.ts.map +1 -0
- package/lib/unstable-services/builder.js +2 -0
- package/lib/unstable-services/builder.js.map +1 -0
- package/lib/unstable-services/compute.d.ts +1124 -0
- package/lib/unstable-services/compute.d.ts.map +1 -0
- package/lib/unstable-services/compute.js +47 -0
- package/lib/unstable-services/compute.js.map +1 -0
- package/lib/unstable-services/compute_command.d.ts +120 -0
- package/lib/unstable-services/compute_command.d.ts.map +1 -0
- package/lib/unstable-services/compute_command.js +2 -0
- package/lib/unstable-services/compute_command.js.map +1 -0
- package/lib/unstable-services/compute_observability.d.ts +165 -0
- package/lib/unstable-services/compute_observability.d.ts.map +1 -0
- package/lib/unstable-services/compute_observability.js +2 -0
- package/lib/unstable-services/compute_observability.js.map +1 -0
- package/lib/unstable-services/compute_storage.d.ts +379 -0
- package/lib/unstable-services/compute_storage.d.ts.map +1 -0
- package/lib/unstable-services/compute_storage.js +33 -0
- package/lib/unstable-services/compute_storage.js.map +1 -0
- package/lib/unstable-services/compute_usage.d.ts +283 -0
- package/lib/unstable-services/compute_usage.d.ts.map +1 -0
- package/lib/unstable-services/compute_usage.js +2 -0
- package/lib/unstable-services/compute_usage.js.map +1 -0
- package/lib/unstable-services/egress.d.ts +191 -0
- package/lib/unstable-services/egress.d.ts.map +1 -0
- package/lib/unstable-services/egress.js +2 -0
- package/lib/unstable-services/egress.js.map +1 -0
- package/lib/unstable-services/experimental_compute_reservation.d.ts +672 -0
- package/lib/unstable-services/experimental_compute_reservation.d.ts.map +1 -0
- package/lib/unstable-services/experimental_compute_reservation.js +23 -0
- package/lib/unstable-services/experimental_compute_reservation.js.map +1 -0
- package/lib/unstable-services/experimental_remote_results.d.ts +496 -0
- package/lib/unstable-services/experimental_remote_results.d.ts.map +1 -0
- package/lib/unstable-services/experimental_remote_results.js +2 -0
- package/lib/unstable-services/experimental_remote_results.js.map +1 -0
- package/lib/unstable-services/github_image.d.ts +162 -0
- package/lib/unstable-services/github_image.d.ts.map +1 -0
- package/lib/unstable-services/github_image.js +2 -0
- package/lib/unstable-services/github_image.js.map +1 -0
- package/lib/unstable-services/github_jobs.d.ts +183 -0
- package/lib/unstable-services/github_jobs.d.ts.map +1 -0
- package/lib/unstable-services/github_jobs.js +2 -0
- package/lib/unstable-services/github_jobs.js.map +1 -0
- package/lib/unstable-services/github_profile.d.ts +296 -0
- package/lib/unstable-services/github_profile.d.ts.map +1 -0
- package/lib/unstable-services/github_profile.js +2 -0
- package/lib/unstable-services/github_profile.js.map +1 -0
- package/lib/unstable-services/gradle_cache.d.ts +125 -0
- package/lib/unstable-services/gradle_cache.d.ts.map +1 -0
- package/lib/unstable-services/gradle_cache.js +2 -0
- package/lib/unstable-services/gradle_cache.js.map +1 -0
- package/lib/unstable-services/httpcache.d.ts +125 -0
- package/lib/unstable-services/httpcache.d.ts.map +1 -0
- package/lib/unstable-services/httpcache.js +2 -0
- package/lib/unstable-services/httpcache.js.map +1 -0
- package/lib/unstable-services/iam_tenant.d.ts +457 -0
- package/lib/unstable-services/iam_tenant.d.ts.map +1 -0
- package/lib/unstable-services/iam_tenant.js +45 -0
- package/lib/unstable-services/iam_tenant.js.map +1 -0
- package/lib/unstable-services/iam_tenant_membership.d.ts +114 -0
- package/lib/unstable-services/iam_tenant_membership.d.ts.map +1 -0
- package/lib/unstable-services/iam_tenant_membership.js +2 -0
- package/lib/unstable-services/iam_tenant_membership.js.map +1 -0
- package/lib/unstable-services/iam_token.d.ts +257 -0
- package/lib/unstable-services/iam_token.d.ts.map +1 -0
- package/lib/unstable-services/iam_token.js +2 -0
- package/lib/unstable-services/iam_token.js.map +1 -0
- package/lib/unstable-services/image.d.ts +222 -0
- package/lib/unstable-services/image.d.ts.map +1 -0
- package/lib/unstable-services/image.js +2 -0
- package/lib/unstable-services/image.js.map +1 -0
- package/lib/unstable-services/index.d.ts +28 -0
- package/lib/unstable-services/index.d.ts.map +1 -0
- package/lib/unstable-services/index.js +27 -0
- package/lib/unstable-services/private_devbox.d.ts +1180 -0
- package/lib/unstable-services/private_devbox.d.ts.map +1 -0
- package/lib/unstable-services/private_devbox.js +81 -0
- package/lib/unstable-services/private_devbox.js.map +1 -0
- package/lib/unstable-services/private_user_sessions.d.ts +145 -0
- package/lib/unstable-services/private_user_sessions.d.ts.map +1 -0
- package/lib/unstable-services/private_user_sessions.js +2 -0
- package/lib/unstable-services/private_user_sessions.js.map +1 -0
- package/lib/unstable-services/registry.d.ts +373 -0
- package/lib/unstable-services/registry.d.ts.map +1 -0
- package/lib/unstable-services/registry.js +34 -0
- package/lib/unstable-services/registry.js.map +1 -0
- package/lib/unstable-services/testing.d.ts +160 -0
- package/lib/unstable-services/testing.d.ts.map +1 -0
- package/lib/unstable-services/testing.js +2 -0
- package/lib/unstable-services/testing.js.map +1 -0
- package/lib/unstable-services/vault.d.ts +203 -0
- package/lib/unstable-services/vault.d.ts.map +1 -0
- package/lib/unstable-services/vault.js +2 -0
- package/lib/unstable-services/vault.js.map +1 -0
- package/lib/unstable-services.lazy/artifacts.js +1 -0
- package/lib/unstable-services.lazy/audit.js +1 -0
- package/lib/unstable-services.lazy/bazel.js +1 -0
- package/lib/unstable-services.lazy/bazel_cache.js +1 -0
- package/lib/unstable-services.lazy/builder.js +1 -0
- package/lib/unstable-services.lazy/compute.js +4 -0
- package/lib/unstable-services.lazy/compute_command.js +1 -0
- package/lib/unstable-services.lazy/compute_observability.js +1 -0
- package/lib/unstable-services.lazy/compute_storage.js +4 -0
- package/lib/unstable-services.lazy/compute_usage.js +1 -0
- package/lib/unstable-services.lazy/egress.js +1 -0
- package/lib/unstable-services.lazy/experimental_compute_reservation.js +4 -0
- package/lib/unstable-services.lazy/experimental_remote_results.js +1 -0
- package/lib/unstable-services.lazy/github_image.js +1 -0
- package/lib/unstable-services.lazy/github_jobs.js +1 -0
- package/lib/unstable-services.lazy/github_profile.js +1 -0
- package/lib/unstable-services.lazy/gradle_cache.js +1 -0
- package/lib/unstable-services.lazy/httpcache.js +1 -0
- package/lib/unstable-services.lazy/iam_tenant.js +4 -0
- package/lib/unstable-services.lazy/iam_tenant_membership.js +1 -0
- package/lib/unstable-services.lazy/iam_token.js +1 -0
- package/lib/unstable-services.lazy/image.js +1 -0
- package/lib/unstable-services.lazy/index.js +3 -0
- package/lib/unstable-services.lazy/private_devbox.js +4 -0
- package/lib/unstable-services.lazy/private_user_sessions.js +1 -0
- package/lib/unstable-services.lazy/registry.js +4 -0
- package/lib/unstable-services.lazy/testing.js +1 -0
- package/lib/unstable-services.lazy/vault.js +1 -0
- package/package.json +89 -2
- package/src/credentials.ts +208 -0
- package/src/errors.ts +71 -0
- package/src/index.ts +50 -0
- package/src/pagination.ts +1 -0
- package/src/protocol.ts +83 -0
- package/src/retry.ts +28 -0
- package/src/services/buildkite_jobs.ts +230 -0
- package/src/services/buildkite_queue.ts +453 -0
- package/src/services/index.ts +3 -0
- package/src/traits.ts +36 -0
- package/src/unstable-services/artifacts.ts +769 -0
- package/src/unstable-services/audit.ts +323 -0
- package/src/unstable-services/bazel.ts +423 -0
- package/src/unstable-services/bazel_cache.ts +219 -0
- package/src/unstable-services/builder.ts +576 -0
- package/src/unstable-services/compute.ts +2991 -0
- package/src/unstable-services/compute_command.ts +220 -0
- package/src/unstable-services/compute_observability.ts +436 -0
- package/src/unstable-services/compute_storage.ts +1167 -0
- package/src/unstable-services/compute_usage.ts +738 -0
- package/src/unstable-services/egress.ts +516 -0
- package/src/unstable-services/experimental_compute_reservation.ts +1499 -0
- package/src/unstable-services/experimental_remote_results.ts +1165 -0
- package/src/unstable-services/github_image.ts +301 -0
- package/src/unstable-services/github_jobs.ts +389 -0
- package/src/unstable-services/github_profile.ts +729 -0
- package/src/unstable-services/gradle_cache.ts +271 -0
- package/src/unstable-services/httpcache.ts +271 -0
- package/src/unstable-services/iam_tenant.ts +1720 -0
- package/src/unstable-services/iam_tenant_membership.ts +253 -0
- package/src/unstable-services/iam_token.ts +788 -0
- package/src/unstable-services/image.ts +602 -0
- package/src/unstable-services/index.ts +28 -0
- package/src/unstable-services/private_devbox.ts +4256 -0
- package/src/unstable-services/private_user_sessions.ts +410 -0
- package/src/unstable-services/registry.ts +1242 -0
- package/src/unstable-services/testing.ts +394 -0
- package/src/unstable-services/vault.ts +522 -0
|
@@ -0,0 +1,394 @@
|
|
|
1
|
+
import * as API from "@distilled.cloud/core/api";
|
|
2
|
+
import * as C from "@distilled.cloud/core/category";
|
|
3
|
+
// AUTO-GENERATED by scripts/generate.ts from .generated-specs (buf.build/namespace/cloud -> smithy). Do not edit.
|
|
4
|
+
import * as S from "@distilled.cloud/core/schema-lite";
|
|
5
|
+
import * as __L from "@distilled.cloud/core/schema-lite";
|
|
6
|
+
import { NamespaceLabsServiceErrors } from "../errors.ts";
|
|
7
|
+
import {
|
|
8
|
+
NamespaceLabsProtocol,
|
|
9
|
+
type NamespaceLabsOpError,
|
|
10
|
+
type NamespaceLabsOpContext,
|
|
11
|
+
} from "../protocol.ts";
|
|
12
|
+
import * as Retry from "../retry.ts";
|
|
13
|
+
import * as T from "../traits.ts";
|
|
14
|
+
// Schema table, filled on first reach (see __S at the end).
|
|
15
|
+
const __s: any[] = [];
|
|
16
|
+
|
|
17
|
+
export type { NamespaceLabsOpError, NamespaceLabsOpContext };
|
|
18
|
+
|
|
19
|
+
/** Span facts shared by every operation (com.distilled.telemetry#service). */
|
|
20
|
+
const TELEMETRY = {
|
|
21
|
+
system: "namespacelabs-api",
|
|
22
|
+
responseHeaders: [
|
|
23
|
+
{ header: "x-request-id", name: "http.response.header.x-request-id", transform: "list" },
|
|
24
|
+
{ header: "request-id", name: "http.response.header.request-id", transform: "list" },
|
|
25
|
+
],
|
|
26
|
+
prefix: "Namespacelabs",
|
|
27
|
+
service: "TestResultsService",
|
|
28
|
+
propagate: "w3c",
|
|
29
|
+
} as const;
|
|
30
|
+
|
|
31
|
+
export class AlreadyExists
|
|
32
|
+
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
33
|
+
/*@__PURE__*/ S.TaggedError<AlreadyExists>()("AlreadyExists", {
|
|
34
|
+
message: S.String,
|
|
35
|
+
body: S.Unknown,
|
|
36
|
+
headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
|
|
37
|
+
}).pipe(C.withConflictError),
|
|
38
|
+
[{ status: 409, body: { "/code": "already_exists" } }],
|
|
39
|
+
) {}
|
|
40
|
+
|
|
41
|
+
export class FailedPrecondition
|
|
42
|
+
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
43
|
+
/*@__PURE__*/ S.TaggedError<FailedPrecondition>()("FailedPrecondition", {
|
|
44
|
+
message: S.String,
|
|
45
|
+
body: S.Unknown,
|
|
46
|
+
headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
|
|
47
|
+
}).pipe(C.withBadRequestError),
|
|
48
|
+
[{ status: 400, body: { "/code": "failed_precondition" } }],
|
|
49
|
+
) {}
|
|
50
|
+
|
|
51
|
+
export class InvalidArgument
|
|
52
|
+
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
53
|
+
/*@__PURE__*/ S.TaggedError<InvalidArgument>()("InvalidArgument", {
|
|
54
|
+
message: S.String,
|
|
55
|
+
body: S.Unknown,
|
|
56
|
+
headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
|
|
57
|
+
}).pipe(C.withBadRequestError),
|
|
58
|
+
[{ status: 400, body: { "/code": "invalid_argument" } }],
|
|
59
|
+
) {}
|
|
60
|
+
|
|
61
|
+
export class NotFound
|
|
62
|
+
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
63
|
+
/*@__PURE__*/ S.TaggedError<NotFound>()("NotFound", {
|
|
64
|
+
message: S.String,
|
|
65
|
+
body: S.Unknown,
|
|
66
|
+
headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
|
|
67
|
+
}).pipe(C.withBadRequestError),
|
|
68
|
+
[{ status: 404 }],
|
|
69
|
+
) {}
|
|
70
|
+
|
|
71
|
+
export class PermissionDenied
|
|
72
|
+
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
73
|
+
/*@__PURE__*/ S.TaggedError<PermissionDenied>()("PermissionDenied", {
|
|
74
|
+
message: S.String,
|
|
75
|
+
body: S.Unknown,
|
|
76
|
+
headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
|
|
77
|
+
}).pipe(C.withAuthError),
|
|
78
|
+
[{ status: 403 }],
|
|
79
|
+
) {}
|
|
80
|
+
|
|
81
|
+
export class ResourceExhausted
|
|
82
|
+
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
83
|
+
/*@__PURE__*/ S.TaggedError<ResourceExhausted>()("ResourceExhausted", {
|
|
84
|
+
message: S.String,
|
|
85
|
+
body: S.Unknown,
|
|
86
|
+
headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
|
|
87
|
+
retryAfter: /*@__PURE__*/ S.optional(S.Duration),
|
|
88
|
+
}).pipe(C.withThrottlingError),
|
|
89
|
+
[{ status: 429 }],
|
|
90
|
+
) {}
|
|
91
|
+
|
|
92
|
+
export class Unauthenticated
|
|
93
|
+
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
94
|
+
/*@__PURE__*/ S.TaggedError<Unauthenticated>()("Unauthenticated", {
|
|
95
|
+
message: S.String,
|
|
96
|
+
body: S.Unknown,
|
|
97
|
+
headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
|
|
98
|
+
}).pipe(C.withAuthError),
|
|
99
|
+
[{ status: 401 }],
|
|
100
|
+
) {}
|
|
101
|
+
|
|
102
|
+
export type TestRunStatus =
|
|
103
|
+
| "TEST_RUN_STATUS_UNKNOWN"
|
|
104
|
+
| "TEST_RUN_STATUS_IN_PROGRESS"
|
|
105
|
+
| "TEST_RUN_STATUS_COMPLETED"
|
|
106
|
+
| "TEST_RUN_STATUS_FAILED"
|
|
107
|
+
| "TEST_RUN_STATUS_CANCELLED";
|
|
108
|
+
export interface TestRunSummary {
|
|
109
|
+
totalTargets?: number | undefined;
|
|
110
|
+
passedTargets?: number | undefined;
|
|
111
|
+
failedTargets?: number | undefined;
|
|
112
|
+
skippedTargets?: number | undefined;
|
|
113
|
+
errorTargets?: number | undefined;
|
|
114
|
+
totalTestCases?: number | undefined;
|
|
115
|
+
passedTestCases?: number | undefined;
|
|
116
|
+
failedTestCases?: number | undefined;
|
|
117
|
+
skippedTestCases?: number | undefined;
|
|
118
|
+
totalDuration?: string | undefined;
|
|
119
|
+
}
|
|
120
|
+
export interface CompleteTestRunRequest {
|
|
121
|
+
/** The run ID to mark as complete. */
|
|
122
|
+
runId?: string | undefined;
|
|
123
|
+
/** Overall status of the test run. */
|
|
124
|
+
status?: TestRunStatus | (string & {}) | undefined;
|
|
125
|
+
/** Optional summary information. */
|
|
126
|
+
summary?: TestRunSummary | undefined;
|
|
127
|
+
/** Optional completed timestamp. If not provided, defaults to now. */
|
|
128
|
+
completedAt?: string | undefined;
|
|
129
|
+
}
|
|
130
|
+
export interface CompleteTestRunResponse {}
|
|
131
|
+
/** Labels are key/value pairs attached to entities such as tenants. */
|
|
132
|
+
export interface Label {
|
|
133
|
+
/** A name is an string up to 63 bytes that matches the regular expression `^[a-z]([a-z0-9-.]*[a-z0-9])?$`. */
|
|
134
|
+
name?: string | undefined;
|
|
135
|
+
/** Label values are arbitrary values up to 255 bytes. */
|
|
136
|
+
value?: string | undefined;
|
|
137
|
+
}
|
|
138
|
+
export type LabelList = Array<Label>;
|
|
139
|
+
export type StringMap = { [key: string]: string | undefined };
|
|
140
|
+
export interface TestEnvironment {
|
|
141
|
+
/** E.g., "linux/amd64", "darwin/arm64" */
|
|
142
|
+
platform?: string | undefined;
|
|
143
|
+
/** E.g., "go1.21.0", "python3.11" */
|
|
144
|
+
runtimeVersion?: string | undefined;
|
|
145
|
+
/** Optional environment variables or configuration. */
|
|
146
|
+
properties?: StringMap | undefined;
|
|
147
|
+
}
|
|
148
|
+
export interface CreateTestRunRequest {
|
|
149
|
+
/** Optional identifier for the test run (e.g., commit SHA, build ID). */
|
|
150
|
+
runIdentifier?: string | undefined;
|
|
151
|
+
/** Optional user-provided labels for the test run. */
|
|
152
|
+
labels?: LabelList | undefined;
|
|
153
|
+
/** Optional environment information. */
|
|
154
|
+
environment?: TestEnvironment | undefined;
|
|
155
|
+
}
|
|
156
|
+
export interface CreateTestRunResponse {
|
|
157
|
+
runId: string;
|
|
158
|
+
}
|
|
159
|
+
export interface GetTestRunRequest {
|
|
160
|
+
runId?: string | undefined;
|
|
161
|
+
}
|
|
162
|
+
export interface GetTestRunResponse {
|
|
163
|
+
runId: string;
|
|
164
|
+
runIdentifier: string;
|
|
165
|
+
status: TestRunStatus;
|
|
166
|
+
createdAt?: string | undefined;
|
|
167
|
+
completedAt?: string | undefined;
|
|
168
|
+
environment?: TestEnvironment | undefined;
|
|
169
|
+
summary?: TestRunSummary | undefined;
|
|
170
|
+
metadata: StringMap;
|
|
171
|
+
}
|
|
172
|
+
export type CompleteTestRunError =
|
|
173
|
+
| InvalidArgument
|
|
174
|
+
| FailedPrecondition
|
|
175
|
+
| Unauthenticated
|
|
176
|
+
| PermissionDenied
|
|
177
|
+
| NotFound
|
|
178
|
+
| AlreadyExists
|
|
179
|
+
| ResourceExhausted
|
|
180
|
+
| NamespaceLabsOpError;
|
|
181
|
+
/** Marks a test run as complete. */
|
|
182
|
+
export const completeTestRun: API.OperationMethod<
|
|
183
|
+
CompleteTestRunRequest,
|
|
184
|
+
CompleteTestRunResponse,
|
|
185
|
+
CompleteTestRunError,
|
|
186
|
+
NamespaceLabsOpContext
|
|
187
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
188
|
+
input: __S(0, __c0, 0) as any as S.Schema<CompleteTestRunRequest>,
|
|
189
|
+
output: __S(1, __c0, 1) as any as S.Schema<CompleteTestRunResponse>,
|
|
190
|
+
errors: [
|
|
191
|
+
InvalidArgument,
|
|
192
|
+
FailedPrecondition,
|
|
193
|
+
Unauthenticated,
|
|
194
|
+
PermissionDenied,
|
|
195
|
+
NotFound,
|
|
196
|
+
AlreadyExists,
|
|
197
|
+
ResourceExhausted,
|
|
198
|
+
],
|
|
199
|
+
serviceErrors: NamespaceLabsServiceErrors,
|
|
200
|
+
protocol: NamespaceLabsProtocol,
|
|
201
|
+
retry: Retry.Retry,
|
|
202
|
+
telemetry: TELEMETRY,
|
|
203
|
+
span: "CompleteTestRun",
|
|
204
|
+
}));
|
|
205
|
+
|
|
206
|
+
export type CreateTestRunError =
|
|
207
|
+
| InvalidArgument
|
|
208
|
+
| FailedPrecondition
|
|
209
|
+
| Unauthenticated
|
|
210
|
+
| PermissionDenied
|
|
211
|
+
| NotFound
|
|
212
|
+
| AlreadyExists
|
|
213
|
+
| ResourceExhausted
|
|
214
|
+
| NamespaceLabsOpError;
|
|
215
|
+
/** Creates a new test run and returns a run ID for subsequent operations. */
|
|
216
|
+
export const createTestRun: API.OperationMethod<
|
|
217
|
+
CreateTestRunRequest,
|
|
218
|
+
CreateTestRunResponse,
|
|
219
|
+
CreateTestRunError,
|
|
220
|
+
NamespaceLabsOpContext
|
|
221
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
222
|
+
input: __S(10, __c2, 2) as any as S.Schema<CreateTestRunRequest>,
|
|
223
|
+
output: __S(11, __c2, 3) as any as S.Schema<CreateTestRunResponse>,
|
|
224
|
+
errors: [
|
|
225
|
+
InvalidArgument,
|
|
226
|
+
FailedPrecondition,
|
|
227
|
+
Unauthenticated,
|
|
228
|
+
PermissionDenied,
|
|
229
|
+
NotFound,
|
|
230
|
+
AlreadyExists,
|
|
231
|
+
ResourceExhausted,
|
|
232
|
+
],
|
|
233
|
+
serviceErrors: NamespaceLabsServiceErrors,
|
|
234
|
+
protocol: NamespaceLabsProtocol,
|
|
235
|
+
retry: Retry.Retry,
|
|
236
|
+
telemetry: TELEMETRY,
|
|
237
|
+
span: "CreateTestRun",
|
|
238
|
+
}));
|
|
239
|
+
|
|
240
|
+
export type GetTestRunError =
|
|
241
|
+
| InvalidArgument
|
|
242
|
+
| FailedPrecondition
|
|
243
|
+
| Unauthenticated
|
|
244
|
+
| PermissionDenied
|
|
245
|
+
| NotFound
|
|
246
|
+
| AlreadyExists
|
|
247
|
+
| ResourceExhausted
|
|
248
|
+
| NamespaceLabsOpError;
|
|
249
|
+
/** Retrieves information about a test run. */
|
|
250
|
+
export const getTestRun: API.OperationMethod<
|
|
251
|
+
GetTestRunRequest,
|
|
252
|
+
GetTestRunResponse,
|
|
253
|
+
GetTestRunError,
|
|
254
|
+
NamespaceLabsOpContext
|
|
255
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
256
|
+
input: __S(16, __c4, 0) as any as S.Schema<GetTestRunRequest>,
|
|
257
|
+
output: __S(17, __c4, 1) as any as S.Schema<GetTestRunResponse>,
|
|
258
|
+
errors: [
|
|
259
|
+
InvalidArgument,
|
|
260
|
+
FailedPrecondition,
|
|
261
|
+
Unauthenticated,
|
|
262
|
+
PermissionDenied,
|
|
263
|
+
NotFound,
|
|
264
|
+
AlreadyExists,
|
|
265
|
+
ResourceExhausted,
|
|
266
|
+
],
|
|
267
|
+
serviceErrors: NamespaceLabsServiceErrors,
|
|
268
|
+
protocol: NamespaceLabsProtocol,
|
|
269
|
+
retry: Retry.Retry,
|
|
270
|
+
telemetry: TELEMETRY,
|
|
271
|
+
span: "GetTestRun",
|
|
272
|
+
}));
|
|
273
|
+
|
|
274
|
+
// Schema builders: each runs one schema initializer, on that schema's first use.
|
|
275
|
+
function __c0(j: number): any {
|
|
276
|
+
switch (j) {
|
|
277
|
+
case 0:
|
|
278
|
+
return S.suspend(() =>
|
|
279
|
+
S.Struct({
|
|
280
|
+
runId: S.optional(S.String),
|
|
281
|
+
status: S.optional(S.String),
|
|
282
|
+
summary: S.optional(__S(4, __c1, 0)),
|
|
283
|
+
completedAt: S.optional(S.String),
|
|
284
|
+
}).pipe(
|
|
285
|
+
T.Http({
|
|
286
|
+
method: "POST",
|
|
287
|
+
uri: "/namespace.cloud.testing.v1beta.TestResultsService/CompleteTestRun",
|
|
288
|
+
code: 200,
|
|
289
|
+
}),
|
|
290
|
+
),
|
|
291
|
+
).annotate({ identifier: "CompleteTestRunRequest" });
|
|
292
|
+
case 1:
|
|
293
|
+
return S.suspend(() => S.Struct({})).annotate({ identifier: "CompleteTestRunResponse" });
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
function __c1(j: number): any {
|
|
297
|
+
switch (j) {
|
|
298
|
+
case 0:
|
|
299
|
+
return S.suspend(() =>
|
|
300
|
+
S.Struct({
|
|
301
|
+
totalTargets: S.optional(S.Number),
|
|
302
|
+
passedTargets: S.optional(S.Number),
|
|
303
|
+
failedTargets: S.optional(S.Number),
|
|
304
|
+
skippedTargets: S.optional(S.Number),
|
|
305
|
+
errorTargets: S.optional(S.Number),
|
|
306
|
+
totalTestCases: S.optional(S.Number),
|
|
307
|
+
passedTestCases: S.optional(S.Number),
|
|
308
|
+
failedTestCases: S.optional(S.Number),
|
|
309
|
+
skippedTestCases: S.optional(S.Number),
|
|
310
|
+
totalDuration: S.optional(S.String),
|
|
311
|
+
}),
|
|
312
|
+
).annotate({ identifier: "TestRunSummary" });
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
function __c2(j: number): any {
|
|
316
|
+
switch (j) {
|
|
317
|
+
case 0:
|
|
318
|
+
return S.suspend(() =>
|
|
319
|
+
S.Struct({
|
|
320
|
+
name: S.optional(S.String),
|
|
321
|
+
value: S.optional(S.String),
|
|
322
|
+
}),
|
|
323
|
+
).annotate({ identifier: "Label" });
|
|
324
|
+
case 1:
|
|
325
|
+
return S.Array(__S(8, __c2, 0));
|
|
326
|
+
case 2:
|
|
327
|
+
return S.suspend(() =>
|
|
328
|
+
S.Struct({
|
|
329
|
+
runIdentifier: S.optional(S.String),
|
|
330
|
+
labels: S.optional(__S(9, __c2, 1)),
|
|
331
|
+
environment: S.optional(__S(13, __c3, 1)),
|
|
332
|
+
}).pipe(
|
|
333
|
+
T.Http({
|
|
334
|
+
method: "POST",
|
|
335
|
+
uri: "/namespace.cloud.testing.v1beta.TestResultsService/CreateTestRun",
|
|
336
|
+
code: 200,
|
|
337
|
+
}),
|
|
338
|
+
),
|
|
339
|
+
).annotate({ identifier: "CreateTestRunRequest" });
|
|
340
|
+
case 3:
|
|
341
|
+
return S.suspend(() =>
|
|
342
|
+
S.Struct({
|
|
343
|
+
runId: S.String,
|
|
344
|
+
}),
|
|
345
|
+
).annotate({ identifier: "CreateTestRunResponse" });
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
function __c3(j: number): any {
|
|
349
|
+
switch (j) {
|
|
350
|
+
case 0:
|
|
351
|
+
return S.Record(S.String, S.String);
|
|
352
|
+
case 1:
|
|
353
|
+
return S.suspend(() =>
|
|
354
|
+
S.Struct({
|
|
355
|
+
platform: S.optional(S.String),
|
|
356
|
+
runtimeVersion: S.optional(S.String),
|
|
357
|
+
properties: S.optional(__S(12, __c3, 0)),
|
|
358
|
+
}),
|
|
359
|
+
).annotate({ identifier: "TestEnvironment" });
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
function __c4(j: number): any {
|
|
363
|
+
switch (j) {
|
|
364
|
+
case 0:
|
|
365
|
+
return S.suspend(() =>
|
|
366
|
+
S.Struct({
|
|
367
|
+
runId: S.optional(S.String),
|
|
368
|
+
}).pipe(
|
|
369
|
+
T.Http({
|
|
370
|
+
method: "POST",
|
|
371
|
+
uri: "/namespace.cloud.testing.v1beta.TestResultsService/GetTestRun",
|
|
372
|
+
code: 200,
|
|
373
|
+
}),
|
|
374
|
+
),
|
|
375
|
+
).annotate({ identifier: "GetTestRunRequest" });
|
|
376
|
+
case 1:
|
|
377
|
+
return S.suspend(() =>
|
|
378
|
+
S.Struct({
|
|
379
|
+
runId: S.String,
|
|
380
|
+
runIdentifier: S.String,
|
|
381
|
+
status: S.String,
|
|
382
|
+
createdAt: S.optional(S.String),
|
|
383
|
+
completedAt: S.optional(S.String),
|
|
384
|
+
environment: S.optional(__S(13, __c3, 1)),
|
|
385
|
+
summary: S.optional(__S(4, __c1, 0)),
|
|
386
|
+
metadata: __S(12, __c3, 0),
|
|
387
|
+
}),
|
|
388
|
+
).annotate({ identifier: "GetTestRunResponse" });
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
// Schema table: entry i is schema j of builder f, made on first reach.
|
|
392
|
+
function __S(i: number, f: (j: number) => unknown, j: number): any {
|
|
393
|
+
return (__s[i] ??= __L.at(f, j));
|
|
394
|
+
}
|