@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,410 @@
|
|
|
1
|
+
import * as API from "@distilled.cloud/core/api";
|
|
2
|
+
import * as C from "@distilled.cloud/core/category";
|
|
3
|
+
// AUTO-GENERATED by scripts/generate.ts from .generated-specs (buf.build/namespace/cloud -> smithy). Do not edit.
|
|
4
|
+
import * as S from "@distilled.cloud/core/schema-lite";
|
|
5
|
+
import * as __L from "@distilled.cloud/core/schema-lite";
|
|
6
|
+
import type * as Redacted from "effect/Redacted";
|
|
7
|
+
import { NamespaceLabsServiceErrors } from "../errors.ts";
|
|
8
|
+
import {
|
|
9
|
+
NamespaceLabsProtocol,
|
|
10
|
+
type NamespaceLabsOpError,
|
|
11
|
+
type NamespaceLabsOpContext,
|
|
12
|
+
} from "../protocol.ts";
|
|
13
|
+
import * as Retry from "../retry.ts";
|
|
14
|
+
import * as T from "../traits.ts";
|
|
15
|
+
// Schema table, filled on first reach (see __S at the end).
|
|
16
|
+
const __s: any[] = [];
|
|
17
|
+
|
|
18
|
+
export type { NamespaceLabsOpError, NamespaceLabsOpContext };
|
|
19
|
+
|
|
20
|
+
/** Span facts shared by every operation (com.distilled.telemetry#service). */
|
|
21
|
+
const TELEMETRY = {
|
|
22
|
+
system: "namespacelabs-api",
|
|
23
|
+
responseHeaders: [
|
|
24
|
+
{ header: "x-request-id", name: "http.response.header.x-request-id", transform: "list" },
|
|
25
|
+
{ header: "request-id", name: "http.response.header.request-id", transform: "list" },
|
|
26
|
+
],
|
|
27
|
+
prefix: "Namespacelabs",
|
|
28
|
+
service: "UserSessionsService",
|
|
29
|
+
propagate: "w3c",
|
|
30
|
+
} as const;
|
|
31
|
+
|
|
32
|
+
export class AlreadyExists
|
|
33
|
+
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
34
|
+
/*@__PURE__*/ S.TaggedError<AlreadyExists>()("AlreadyExists", {
|
|
35
|
+
message: S.String,
|
|
36
|
+
body: S.Unknown,
|
|
37
|
+
headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
|
|
38
|
+
}).pipe(C.withConflictError),
|
|
39
|
+
[{ status: 409, body: { "/code": "already_exists" } }],
|
|
40
|
+
) {}
|
|
41
|
+
|
|
42
|
+
export class FailedPrecondition
|
|
43
|
+
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
44
|
+
/*@__PURE__*/ S.TaggedError<FailedPrecondition>()("FailedPrecondition", {
|
|
45
|
+
message: S.String,
|
|
46
|
+
body: S.Unknown,
|
|
47
|
+
headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
|
|
48
|
+
}).pipe(C.withBadRequestError),
|
|
49
|
+
[{ status: 400, body: { "/code": "failed_precondition" } }],
|
|
50
|
+
) {}
|
|
51
|
+
|
|
52
|
+
export class InvalidArgument
|
|
53
|
+
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
54
|
+
/*@__PURE__*/ S.TaggedError<InvalidArgument>()("InvalidArgument", {
|
|
55
|
+
message: S.String,
|
|
56
|
+
body: S.Unknown,
|
|
57
|
+
headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
|
|
58
|
+
}).pipe(C.withBadRequestError),
|
|
59
|
+
[{ status: 400, body: { "/code": "invalid_argument" } }],
|
|
60
|
+
) {}
|
|
61
|
+
|
|
62
|
+
export class NotFound
|
|
63
|
+
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
64
|
+
/*@__PURE__*/ S.TaggedError<NotFound>()("NotFound", {
|
|
65
|
+
message: S.String,
|
|
66
|
+
body: S.Unknown,
|
|
67
|
+
headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
|
|
68
|
+
}).pipe(C.withBadRequestError),
|
|
69
|
+
[{ status: 404 }],
|
|
70
|
+
) {}
|
|
71
|
+
|
|
72
|
+
export class PermissionDenied
|
|
73
|
+
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
74
|
+
/*@__PURE__*/ S.TaggedError<PermissionDenied>()("PermissionDenied", {
|
|
75
|
+
message: S.String,
|
|
76
|
+
body: S.Unknown,
|
|
77
|
+
headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
|
|
78
|
+
}).pipe(C.withAuthError),
|
|
79
|
+
[{ status: 403 }],
|
|
80
|
+
) {}
|
|
81
|
+
|
|
82
|
+
export class ResourceExhausted
|
|
83
|
+
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
84
|
+
/*@__PURE__*/ S.TaggedError<ResourceExhausted>()("ResourceExhausted", {
|
|
85
|
+
message: S.String,
|
|
86
|
+
body: S.Unknown,
|
|
87
|
+
headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
|
|
88
|
+
retryAfter: /*@__PURE__*/ S.optional(S.Duration),
|
|
89
|
+
}).pipe(C.withThrottlingError),
|
|
90
|
+
[{ status: 429 }],
|
|
91
|
+
) {}
|
|
92
|
+
|
|
93
|
+
export class Unauthenticated
|
|
94
|
+
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
95
|
+
/*@__PURE__*/ S.TaggedError<Unauthenticated>()("Unauthenticated", {
|
|
96
|
+
message: S.String,
|
|
97
|
+
body: S.Unknown,
|
|
98
|
+
headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
|
|
99
|
+
}).pipe(C.withAuthError),
|
|
100
|
+
[{ status: 401 }],
|
|
101
|
+
) {}
|
|
102
|
+
|
|
103
|
+
export interface InvalidateAllSessionsRequest {}
|
|
104
|
+
export type StringList = Array<string>;
|
|
105
|
+
export interface InvalidateAllSessionsResponse {
|
|
106
|
+
sessionId: StringList;
|
|
107
|
+
}
|
|
108
|
+
export interface InvalidateSessionRequest {
|
|
109
|
+
sessionId?: string | undefined;
|
|
110
|
+
}
|
|
111
|
+
export interface InvalidateSessionResponse {}
|
|
112
|
+
export interface IssueTenantTokenFromSessionRequest {
|
|
113
|
+
tokenDuration?: string | undefined;
|
|
114
|
+
}
|
|
115
|
+
export interface IssueTenantTokenFromSessionResponse {
|
|
116
|
+
tenantToken: string | Redacted.Redacted<string>;
|
|
117
|
+
}
|
|
118
|
+
export interface ListSessionsRequest {}
|
|
119
|
+
export type RequestMetadataUaDeviceKind =
|
|
120
|
+
| "UA_DEVICE_KIND_UNKNOWN"
|
|
121
|
+
| "UA_DEVICE_MOBILE"
|
|
122
|
+
| "UA_DEVICE_TABLET"
|
|
123
|
+
| "UA_DEVICE_DESKTOP"
|
|
124
|
+
| "UA_DEVICE_BOT";
|
|
125
|
+
export interface RequestMetadata {
|
|
126
|
+
requestId: string;
|
|
127
|
+
userAgent: string;
|
|
128
|
+
uaName: string;
|
|
129
|
+
uaVersion: string;
|
|
130
|
+
uaOs: string;
|
|
131
|
+
uaOsVersion: string;
|
|
132
|
+
uaDevice: string;
|
|
133
|
+
uaDeviceKind: RequestMetadataUaDeviceKind;
|
|
134
|
+
ipAddress: string;
|
|
135
|
+
ipCityId: string;
|
|
136
|
+
ipCityEn: string;
|
|
137
|
+
ipCountryIso: string;
|
|
138
|
+
ipCountryEn: string;
|
|
139
|
+
}
|
|
140
|
+
export interface Session {
|
|
141
|
+
/** sid_... */
|
|
142
|
+
id: string;
|
|
143
|
+
/** user_... */
|
|
144
|
+
ownerId: string;
|
|
145
|
+
/** tenant_... */
|
|
146
|
+
tenantId: string;
|
|
147
|
+
createdAt?: string | undefined;
|
|
148
|
+
expiresAt?: string | undefined;
|
|
149
|
+
invalidatedAt?: string | undefined;
|
|
150
|
+
lastUsedAt?: string | undefined;
|
|
151
|
+
creationMetadata?: RequestMetadata | undefined;
|
|
152
|
+
invalidationMetadata?: RequestMetadata | undefined;
|
|
153
|
+
}
|
|
154
|
+
export type SessionList = Array<Session>;
|
|
155
|
+
export interface ListSessionsResponse {
|
|
156
|
+
session: SessionList;
|
|
157
|
+
}
|
|
158
|
+
export type InvalidateAllSessionsError =
|
|
159
|
+
| InvalidArgument
|
|
160
|
+
| FailedPrecondition
|
|
161
|
+
| Unauthenticated
|
|
162
|
+
| PermissionDenied
|
|
163
|
+
| NotFound
|
|
164
|
+
| AlreadyExists
|
|
165
|
+
| ResourceExhausted
|
|
166
|
+
| NamespaceLabsOpError;
|
|
167
|
+
export const invalidateAllSessions: API.OperationMethod<
|
|
168
|
+
InvalidateAllSessionsRequest,
|
|
169
|
+
InvalidateAllSessionsResponse,
|
|
170
|
+
InvalidateAllSessionsError,
|
|
171
|
+
NamespaceLabsOpContext
|
|
172
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
173
|
+
input: __S(8, __c1, 0) as any as S.Schema<InvalidateAllSessionsRequest>,
|
|
174
|
+
output: __S(10, __c1, 2) as any as S.Schema<InvalidateAllSessionsResponse>,
|
|
175
|
+
errors: [
|
|
176
|
+
InvalidArgument,
|
|
177
|
+
FailedPrecondition,
|
|
178
|
+
Unauthenticated,
|
|
179
|
+
PermissionDenied,
|
|
180
|
+
NotFound,
|
|
181
|
+
AlreadyExists,
|
|
182
|
+
ResourceExhausted,
|
|
183
|
+
],
|
|
184
|
+
serviceErrors: NamespaceLabsServiceErrors,
|
|
185
|
+
protocol: NamespaceLabsProtocol,
|
|
186
|
+
retry: Retry.Retry,
|
|
187
|
+
telemetry: TELEMETRY,
|
|
188
|
+
span: "InvalidateAllSessions",
|
|
189
|
+
}));
|
|
190
|
+
|
|
191
|
+
export type InvalidateSessionError =
|
|
192
|
+
| InvalidArgument
|
|
193
|
+
| FailedPrecondition
|
|
194
|
+
| Unauthenticated
|
|
195
|
+
| PermissionDenied
|
|
196
|
+
| NotFound
|
|
197
|
+
| AlreadyExists
|
|
198
|
+
| ResourceExhausted
|
|
199
|
+
| NamespaceLabsOpError;
|
|
200
|
+
export const invalidateSession: API.OperationMethod<
|
|
201
|
+
InvalidateSessionRequest,
|
|
202
|
+
InvalidateSessionResponse,
|
|
203
|
+
InvalidateSessionError,
|
|
204
|
+
NamespaceLabsOpContext
|
|
205
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
206
|
+
input: __S(16, __c2, 0) as any as S.Schema<InvalidateSessionRequest>,
|
|
207
|
+
output: __S(17, __c2, 1) as any as S.Schema<InvalidateSessionResponse>,
|
|
208
|
+
errors: [
|
|
209
|
+
InvalidArgument,
|
|
210
|
+
FailedPrecondition,
|
|
211
|
+
Unauthenticated,
|
|
212
|
+
PermissionDenied,
|
|
213
|
+
NotFound,
|
|
214
|
+
AlreadyExists,
|
|
215
|
+
ResourceExhausted,
|
|
216
|
+
],
|
|
217
|
+
serviceErrors: NamespaceLabsServiceErrors,
|
|
218
|
+
protocol: NamespaceLabsProtocol,
|
|
219
|
+
retry: Retry.Retry,
|
|
220
|
+
telemetry: TELEMETRY,
|
|
221
|
+
span: "InvalidateSession",
|
|
222
|
+
}));
|
|
223
|
+
|
|
224
|
+
export type IssueTenantTokenFromSessionError =
|
|
225
|
+
| InvalidArgument
|
|
226
|
+
| FailedPrecondition
|
|
227
|
+
| Unauthenticated
|
|
228
|
+
| PermissionDenied
|
|
229
|
+
| NotFound
|
|
230
|
+
| AlreadyExists
|
|
231
|
+
| ResourceExhausted
|
|
232
|
+
| NamespaceLabsOpError;
|
|
233
|
+
export const issueTenantTokenFromSession: API.OperationMethod<
|
|
234
|
+
IssueTenantTokenFromSessionRequest,
|
|
235
|
+
IssueTenantTokenFromSessionResponse,
|
|
236
|
+
IssueTenantTokenFromSessionError,
|
|
237
|
+
NamespaceLabsOpContext
|
|
238
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
239
|
+
input: __S(24, __c3, 0) as any as S.Schema<IssueTenantTokenFromSessionRequest>,
|
|
240
|
+
output: __S(25, __c3, 1) as any as S.Schema<IssueTenantTokenFromSessionResponse>,
|
|
241
|
+
errors: [
|
|
242
|
+
InvalidArgument,
|
|
243
|
+
FailedPrecondition,
|
|
244
|
+
Unauthenticated,
|
|
245
|
+
PermissionDenied,
|
|
246
|
+
NotFound,
|
|
247
|
+
AlreadyExists,
|
|
248
|
+
ResourceExhausted,
|
|
249
|
+
],
|
|
250
|
+
serviceErrors: NamespaceLabsServiceErrors,
|
|
251
|
+
protocol: NamespaceLabsProtocol,
|
|
252
|
+
retry: Retry.Retry,
|
|
253
|
+
telemetry: TELEMETRY,
|
|
254
|
+
span: "IssueTenantTokenFromSession",
|
|
255
|
+
}));
|
|
256
|
+
|
|
257
|
+
export type ListSessionsError =
|
|
258
|
+
| InvalidArgument
|
|
259
|
+
| FailedPrecondition
|
|
260
|
+
| Unauthenticated
|
|
261
|
+
| PermissionDenied
|
|
262
|
+
| NotFound
|
|
263
|
+
| AlreadyExists
|
|
264
|
+
| ResourceExhausted
|
|
265
|
+
| NamespaceLabsOpError;
|
|
266
|
+
export const listSessions: API.OperationMethod<
|
|
267
|
+
ListSessionsRequest,
|
|
268
|
+
ListSessionsResponse,
|
|
269
|
+
ListSessionsError,
|
|
270
|
+
NamespaceLabsOpContext
|
|
271
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
272
|
+
input: __S(0, __c0, 0) as any as S.Schema<ListSessionsRequest>,
|
|
273
|
+
output: __S(4, __c0, 4) as any as S.Schema<ListSessionsResponse>,
|
|
274
|
+
errors: [
|
|
275
|
+
InvalidArgument,
|
|
276
|
+
FailedPrecondition,
|
|
277
|
+
Unauthenticated,
|
|
278
|
+
PermissionDenied,
|
|
279
|
+
NotFound,
|
|
280
|
+
AlreadyExists,
|
|
281
|
+
ResourceExhausted,
|
|
282
|
+
],
|
|
283
|
+
serviceErrors: NamespaceLabsServiceErrors,
|
|
284
|
+
protocol: NamespaceLabsProtocol,
|
|
285
|
+
retry: Retry.Retry,
|
|
286
|
+
telemetry: TELEMETRY,
|
|
287
|
+
span: "ListSessions",
|
|
288
|
+
}));
|
|
289
|
+
|
|
290
|
+
// Schema builders: each runs one schema initializer, on that schema's first use.
|
|
291
|
+
function __c0(j: number): any {
|
|
292
|
+
switch (j) {
|
|
293
|
+
case 0:
|
|
294
|
+
return S.suspend(() =>
|
|
295
|
+
S.Struct({}).pipe(
|
|
296
|
+
T.Http({
|
|
297
|
+
method: "POST",
|
|
298
|
+
uri: "/namespace.private.sessions.v1beta.UserSessionsService/ListSessions",
|
|
299
|
+
code: 200,
|
|
300
|
+
}),
|
|
301
|
+
),
|
|
302
|
+
).annotate({ identifier: "ListSessionsRequest" });
|
|
303
|
+
case 1:
|
|
304
|
+
return S.suspend(() =>
|
|
305
|
+
S.Struct({
|
|
306
|
+
requestId: S.String,
|
|
307
|
+
userAgent: S.String,
|
|
308
|
+
uaName: S.String,
|
|
309
|
+
uaVersion: S.String,
|
|
310
|
+
uaOs: S.String,
|
|
311
|
+
uaOsVersion: S.String,
|
|
312
|
+
uaDevice: S.String,
|
|
313
|
+
uaDeviceKind: S.String,
|
|
314
|
+
ipAddress: S.String,
|
|
315
|
+
ipCityId: S.String,
|
|
316
|
+
ipCityEn: S.String,
|
|
317
|
+
ipCountryIso: S.String,
|
|
318
|
+
ipCountryEn: S.String,
|
|
319
|
+
}),
|
|
320
|
+
).annotate({ identifier: "RequestMetadata" });
|
|
321
|
+
case 2:
|
|
322
|
+
return S.suspend(() =>
|
|
323
|
+
S.Struct({
|
|
324
|
+
id: S.String,
|
|
325
|
+
ownerId: S.String,
|
|
326
|
+
tenantId: S.String,
|
|
327
|
+
createdAt: S.optional(S.String),
|
|
328
|
+
expiresAt: S.optional(S.String),
|
|
329
|
+
invalidatedAt: S.optional(S.String),
|
|
330
|
+
lastUsedAt: S.optional(S.String),
|
|
331
|
+
creationMetadata: S.optional(__S(1, __c0, 1)),
|
|
332
|
+
invalidationMetadata: S.optional(__S(1, __c0, 1)),
|
|
333
|
+
}),
|
|
334
|
+
).annotate({ identifier: "Session" });
|
|
335
|
+
case 3:
|
|
336
|
+
return S.Array(__S(2, __c0, 2));
|
|
337
|
+
case 4:
|
|
338
|
+
return S.suspend(() =>
|
|
339
|
+
S.Struct({
|
|
340
|
+
session: __S(3, __c0, 3),
|
|
341
|
+
}),
|
|
342
|
+
).annotate({ identifier: "ListSessionsResponse" });
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
function __c1(j: number): any {
|
|
346
|
+
switch (j) {
|
|
347
|
+
case 0:
|
|
348
|
+
return S.suspend(() =>
|
|
349
|
+
S.Struct({}).pipe(
|
|
350
|
+
T.Http({
|
|
351
|
+
method: "POST",
|
|
352
|
+
uri: "/namespace.private.sessions.v1beta.UserSessionsService/InvalidateAllSessions",
|
|
353
|
+
code: 200,
|
|
354
|
+
}),
|
|
355
|
+
),
|
|
356
|
+
).annotate({ identifier: "InvalidateAllSessionsRequest" });
|
|
357
|
+
case 1:
|
|
358
|
+
return S.Array(S.String);
|
|
359
|
+
case 2:
|
|
360
|
+
return S.suspend(() =>
|
|
361
|
+
S.Struct({
|
|
362
|
+
sessionId: __S(9, __c1, 1),
|
|
363
|
+
}),
|
|
364
|
+
).annotate({ identifier: "InvalidateAllSessionsResponse" });
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
function __c2(j: number): any {
|
|
368
|
+
switch (j) {
|
|
369
|
+
case 0:
|
|
370
|
+
return S.suspend(() =>
|
|
371
|
+
S.Struct({
|
|
372
|
+
sessionId: S.optional(S.String),
|
|
373
|
+
}).pipe(
|
|
374
|
+
T.Http({
|
|
375
|
+
method: "POST",
|
|
376
|
+
uri: "/namespace.private.sessions.v1beta.UserSessionsService/InvalidateSession",
|
|
377
|
+
code: 200,
|
|
378
|
+
}),
|
|
379
|
+
),
|
|
380
|
+
).annotate({ identifier: "InvalidateSessionRequest" });
|
|
381
|
+
case 1:
|
|
382
|
+
return S.suspend(() => S.Struct({})).annotate({ identifier: "InvalidateSessionResponse" });
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
function __c3(j: number): any {
|
|
386
|
+
switch (j) {
|
|
387
|
+
case 0:
|
|
388
|
+
return S.suspend(() =>
|
|
389
|
+
S.Struct({
|
|
390
|
+
tokenDuration: S.optional(S.String),
|
|
391
|
+
}).pipe(
|
|
392
|
+
T.Http({
|
|
393
|
+
method: "POST",
|
|
394
|
+
uri: "/namespace.private.sessions.v1beta.UserSessionsService/IssueTenantTokenFromSession",
|
|
395
|
+
code: 200,
|
|
396
|
+
}),
|
|
397
|
+
),
|
|
398
|
+
).annotate({ identifier: "IssueTenantTokenFromSessionRequest" });
|
|
399
|
+
case 1:
|
|
400
|
+
return S.suspend(() =>
|
|
401
|
+
S.Struct({
|
|
402
|
+
tenantToken: S.String.pipe(T.SensitiveValue({})),
|
|
403
|
+
}),
|
|
404
|
+
).annotate({ identifier: "IssueTenantTokenFromSessionResponse" });
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
// Schema table: entry i is schema j of builder f, made on first reach.
|
|
408
|
+
function __S(i: number, f: (j: number) => unknown, j: number): any {
|
|
409
|
+
return (__s[i] ??= __L.at(f, j));
|
|
410
|
+
}
|