@aperture-browser/control-api 0.0.0-init.0 → 0.0.0-nightly.149.08402157055a

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.
@@ -0,0 +1,2227 @@
1
+ import { AccountInUse, AccountInvalid, AccountNotFound, ApiTokenNotFound, EmailTaken, FileLinkInvalid, Forbidden, GrantNotFound, NoNode, NodeNotFound, NodeRefused, NodeUnreachable, OAuthClientNotFound, PersonNotFound, ProviderConfigured, ProviderInvalid, ProviderNotFound, ProviderTaken, RedirectRefused, RegistrationTokenNotFound, SessionHasNoNode, SessionNotFound, ShareNotFound, SnapshotNotFound, Unauthorized, WorkspaceInUse, WorkspaceNotFound } from "./errors.js";
2
+ import * as Context from "effect/Context";
3
+ import * as HttpApi from "effect/http-api/HttpApi";
4
+ import * as HttpApiEndpoint from "effect/http-api/HttpApiEndpoint";
5
+ import * as HttpApiGroup from "effect/http-api/HttpApiGroup";
6
+ import * as HttpApiMiddleware from "effect/http-api/HttpApiMiddleware";
7
+ import * as HttpApiSchema from "effect/http-api/HttpApiSchema";
8
+ import * as HttpApiSecurity from "effect/http-api/HttpApiSecurity";
9
+ import * as Schema from "effect/Schema";
10
+ import * as DateTime from "effect/DateTime";
11
+ import * as Option from "effect/Option";
12
+
13
+ //#region src/schemas.d.ts
14
+ /** What a node's executor says its sessions may have, in the words of the glossary. */
15
+ declare const Offers: Schema.Struct<{
16
+ readonly version: Schema.String;
17
+ readonly features: Schema.$Array<Schema.String>;
18
+ readonly network: Schema.Struct<{
19
+ readonly tcp: Schema.String;
20
+ readonly udp: Schema.String;
21
+ }>; /** The limits of a session that has none of its own; one that is left out is not held. */
22
+ readonly limits: Schema.Struct<{
23
+ readonly memoryBytes: Schema.optional<Schema.Number>;
24
+ readonly swapBytes: Schema.optional<Schema.Number>;
25
+ readonly cpus: Schema.optional<Schema.Number>;
26
+ readonly tasks: Schema.optional<Schema.Number>;
27
+ readonly suspendIdleAfterSeconds: Schema.optional<Schema.Number>;
28
+ }>;
29
+ readonly holdsResources: Schema.Boolean; /** Whether its snapshots are kept where other nodes find them. */
30
+ readonly sharesSnapshots: Schema.Boolean;
31
+ }>;
32
+ type Offers = typeof Offers.Type;
33
+ /** What whoever owns the session asked it to be. */
34
+ declare const DesiredState: Schema.Literals<readonly ["running", "suspended"]>;
35
+ type DesiredState = typeof DesiredState.Type;
36
+ /**
37
+ * What the session's node last said it is. `gone` is a session its node has no more
38
+ * though nobody asked the control plane to delete it.
39
+ */
40
+ declare const ObservedState: Schema.Literals<readonly ["suspended", "starting", "running", "suspending", "failed", "gone"]>;
41
+ type ObservedState = typeof ObservedState.Type;
42
+ /** The areas of a session a ticket gives access to, each read, written or both. */
43
+ declare const Access: Schema.$Record<Schema.Literals<readonly ["input", "tabs", "lease", "sound", "clipboard", "uploads", "downloads", "recordings", "proxy", "mcp", "cdp", "tunnel"]>, Schema.optional<Schema.Literals<readonly ["r", "w", "rw"]>>>;
44
+ type Access = typeof Access.Type;
45
+ /**
46
+ * What a share link lets a guest do in its session: watch it, or control it as well, which
47
+ * is giving input, opening and closing tabs, taking a tab, the clipboard and the sound.
48
+ */
49
+ declare const ShareRole: Schema.Literals<readonly ["watch", "control"]>;
50
+ type ShareRole = typeof ShareRole.Type;
51
+ /**
52
+ * How a session's browser connections are routed. The first rule that matches a
53
+ * connection decides; one no rule matches is made from the session's node.
54
+ */
55
+ declare const ProxyConfig: Schema.Struct<{
56
+ /** The upstreams rules can route through, by name. */readonly upstreams: Schema.optional<Schema.$Record<Schema.NonEmptyString, Schema.Struct<{
57
+ /** A proxy, with its credentials in the URL: `socks5://`, `http://`, `https://`. */readonly url: Schema.NonEmptyString; /** The secret a tunnel is dialed with. */
58
+ readonly auth: Schema.optional<Schema.String>;
59
+ }>>>;
60
+ readonly rules: Schema.$Array<Schema.Struct<{
61
+ /**
62
+ * `host` or `host:port`; the host is a name, `*.suffix`, `*` for any, an address or
63
+ * a network (`10.0.0.0/8`). What is IPv6 takes a port in brackets: `[::1]:443`.
64
+ */
65
+ readonly match: Schema.NonEmptyString; /** `direct`, `refuse`, `local`, an upstream's name, or a proxy's URL. */
66
+ readonly via: Schema.NonEmptyString;
67
+ readonly to: Schema.optional<Schema.String>;
68
+ readonly tls: Schema.optional<Schema.Boolean>;
69
+ }>>;
70
+ }>;
71
+ type ProxyConfig = typeof ProxyConfig.Type;
72
+ /**
73
+ * What an API token is held to: it does what its scopes name and nothing else. Writing
74
+ * something includes reading it. `sessions:read` sees sessions and watches them, and
75
+ * `sessions:write` does everything else in one; `workspaces:read` tells which workspaces
76
+ * its account is in and who else is; `events:read` reads the events of its account and of
77
+ * the workspaces that is in, and `admin` is what an admin's token keeps an admin's with.
78
+ */
79
+ declare const Scope: Schema.Literals<readonly ["sessions:read", "sessions:write", "snapshots:read", "snapshots:write", "workspaces:read", "workspaces:write", "tokens:write", "events:read", "admin"]>;
80
+ type Scope = typeof Scope.Type;
81
+ /** Whether scopes cover one that is asked for; no scopes at all cover everything. */
82
+ declare const covers: (held: ReadonlyArray<Scope> | null, asked: Scope) => boolean;
83
+ /**
84
+ * What an API token is held to besides its scopes: with resources it reaches only the
85
+ * sessions and snapshots that are named, and those of the workspaces that are named.
86
+ */
87
+ declare const TokenResources: Schema.Struct<{
88
+ readonly workspaces: Schema.$Array<Schema.String>;
89
+ readonly sessions: Schema.$Array<Schema.String>;
90
+ readonly snapshots: Schema.$Array<Schema.String>;
91
+ }>;
92
+ type TokenResources = typeof TokenResources.Type;
93
+ /**
94
+ * What an event says was done. The set is closed: what reads events knows every kind
95
+ * there is, and a new one is added here.
96
+ */
97
+ declare const EventKind: Schema.Literals<readonly ["sign_in.succeeded", "sign_in.failed", "account.created", "account.changed", "account.disabled", "account.enabled", "account.removed", "account.setup_link_made", "account.second_factor_reset", "account.passkeys_removed", "token.created", "token.revoked", "grant.given", "grant.revoked", "registration_token.created", "registration_token.revoked", "workspace.created", "workspace.renamed", "workspace.deleted", "workspace.member_admitted", "workspace.member_dismissed", "session.created", "session.suspended", "session.resumed", "session.deleted", "snapshot.taken", "snapshot.replaced", "snapshot.deleted", "share.created", "share.revoked", "share.joined", "node.registered", "node.refused", "node.released", "node.silent", "provider.added", "provider.changed", "provider.enabled", "provider.disabled", "provider.removed"]>;
98
+ type EventKind = typeof EventKind.Type;
99
+ /**
100
+ * Who did what an event says: an account, the guest of a share link, the holder of the
101
+ * bootstrap token, someone who is not known, as whoever failed to sign in, or the control
102
+ * plane by itself.
103
+ */
104
+ declare const EventActor: Schema.Struct<{
105
+ readonly kind: Schema.Literals<readonly ["account", "guest", "bootstrap", "anonymous", "system"]>; /** An account's id, or `share:<id>` for a guest; none for the others. */
106
+ readonly id: Schema.NullOr<Schema.String>; /** What they were called then. */
107
+ readonly name: Schema.NullOr<Schema.String>;
108
+ }>;
109
+ type EventActor = typeof EventActor.Type;
110
+ /** What an event is about, as it was called then: it may be gone, or called otherwise, since. */
111
+ declare const EventResource: Schema.Struct<{
112
+ readonly kind: Schema.Literals<readonly ["account", "token", "grant", "registration_token", "workspace", "session", "snapshot", "share", "node", "provider"]>;
113
+ readonly id: Schema.String;
114
+ readonly label: Schema.NullOr<Schema.String>;
115
+ }>;
116
+ type EventResource = typeof EventResource.Type;
117
+ /** What else an event of its kind says, in a few plain values. Never a secret. */
118
+ declare const EventDetail: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean, Schema.Null, Schema.$Array<Schema.String>]>>;
119
+ type EventDetail = typeof EventDetail.Type;
120
+ //#endregion
121
+ //#region src/caller.d.ts
122
+ /**
123
+ * Who a request to the control plane comes from: an account, or the holder of the
124
+ * bootstrap token, who is an admin and no account.
125
+ */
126
+ interface Caller {
127
+ readonly account: Option.Option<{
128
+ readonly id: string;
129
+ readonly name: string;
130
+ readonly admin: boolean;
131
+ readonly kind: "person" | "service";
132
+ readonly email: string | null;
133
+ readonly createdAt: DateTime.Utc;
134
+ readonly disabledAt: DateTime.Utc | null;
135
+ }>;
136
+ readonly admin: boolean;
137
+ /** What the token it came with is held to; nothing, for one that is held to nothing. */
138
+ readonly scopes: ReadonlyArray<Scope> | null;
139
+ /** The resources the token it came with is held to; nothing, for one held to none. */
140
+ readonly resources: TokenResources | null;
141
+ /**
142
+ * Until when the token it came with is good; never, for one that does not run out and
143
+ * for whoever came without a token. What a caller makes outlasts it no further.
144
+ */
145
+ readonly expiresAt: DateTime.Utc | null;
146
+ /** The workspaces the account is in, and what it does in each. */
147
+ readonly workspaces: ReadonlyArray<{
148
+ readonly id: string;
149
+ readonly role: "member" | "admin";
150
+ }>;
151
+ }
152
+ //#endregion
153
+ //#region src/api.d.ts
154
+ /** Where the control plane's API is, apart from the routes of sessions and of nodes. */
155
+ declare const PREFIX = "/api/control";
156
+ declare const Account: Schema.Struct<{
157
+ readonly id: Schema.String;
158
+ readonly name: Schema.String;
159
+ readonly admin: Schema.Boolean; /** A person, who signs in, or a service, which comes with API tokens alone. */
160
+ readonly kind: Schema.Literals<readonly ["person", "service"]>; /** The address a person signs in with; none for a service. */
161
+ readonly email: Schema.NullOr<Schema.String>;
162
+ readonly createdAt: Schema.DateTimeUtcFromString; /** Since when it is disabled: nothing of it signs in or is taken as a caller. */
163
+ readonly disabledAt: Schema.NullOr<Schema.DateTimeUtcFromString>;
164
+ }>;
165
+ /**
166
+ * The account a caller is, with what the caller itself may do as it: what the token it came
167
+ * with is held to. Whoever signed in with cookies is held to nothing.
168
+ */
169
+ declare const CurrentAccount: Schema.Struct<{
170
+ /** What the caller is held to; none for one that does whatever its account does. */readonly scopes: Schema.NullOr<Schema.$Array<Schema.Literals<readonly ["sessions:read", "sessions:write", "snapshots:read", "snapshots:write", "workspaces:read", "workspaces:write", "tokens:write", "events:read", "admin"]>>>; /** The resources the caller is held to; none for one that reaches all its account does. */
171
+ readonly resources: Schema.NullOr<Schema.Struct<{
172
+ readonly workspaces: Schema.$Array<Schema.String>;
173
+ readonly sessions: Schema.$Array<Schema.String>;
174
+ readonly snapshots: Schema.$Array<Schema.String>;
175
+ }>>;
176
+ readonly id: Schema.String;
177
+ readonly name: Schema.String;
178
+ readonly admin: Schema.Boolean; /** A person, who signs in, or a service, which comes with API tokens alone. */
179
+ readonly kind: Schema.Literals<readonly ["person", "service"]>; /** The address a person signs in with; none for a service. */
180
+ readonly email: Schema.NullOr<Schema.String>;
181
+ readonly createdAt: Schema.DateTimeUtcFromString; /** Since when it is disabled: nothing of it signs in or is taken as a caller. */
182
+ readonly disabledAt: Schema.NullOr<Schema.DateTimeUtcFromString>;
183
+ }>;
184
+ /** What a person signs in with. */
185
+ declare const SignInMethods: Schema.Struct<{
186
+ /** Whether they have a password: one they set, since nobody is given one. */readonly password: Schema.Boolean;
187
+ readonly secondFactor: Schema.Boolean; /** How many passkeys they added. */
188
+ readonly passkeys: Schema.Number; /** The providers they came through, by what each is called. */
189
+ readonly providers: Schema.$Array<Schema.String>;
190
+ }>;
191
+ /** An account as an admin is told of it: with what its person signs in with, for a person's. */
192
+ declare const ListedAccount: Schema.Struct<{
193
+ readonly signIn: Schema.NullOr<Schema.Struct<{
194
+ /** Whether they have a password: one they set, since nobody is given one. */readonly password: Schema.Boolean;
195
+ readonly secondFactor: Schema.Boolean; /** How many passkeys they added. */
196
+ readonly passkeys: Schema.Number; /** The providers they came through, by what each is called. */
197
+ readonly providers: Schema.$Array<Schema.String>;
198
+ }>>;
199
+ readonly id: Schema.String;
200
+ readonly name: Schema.String;
201
+ readonly admin: Schema.Boolean; /** A person, who signs in, or a service, which comes with API tokens alone. */
202
+ readonly kind: Schema.Literals<readonly ["person", "service"]>; /** The address a person signs in with; none for a service. */
203
+ readonly email: Schema.NullOr<Schema.String>;
204
+ readonly createdAt: Schema.DateTimeUtcFromString; /** Since when it is disabled: nothing of it signs in or is taken as a caller. */
205
+ readonly disabledAt: Schema.NullOr<Schema.DateTimeUtcFromString>;
206
+ }>;
207
+ /** A workspace as its caller has it: `role` is none for an admin who is no member. */
208
+ declare const Workspace: Schema.Struct<{
209
+ readonly id: Schema.String;
210
+ readonly name: Schema.String;
211
+ readonly createdAt: Schema.DateTimeUtcFromString;
212
+ readonly role: Schema.NullOr<Schema.Literals<readonly ["member", "admin"]>>;
213
+ }>;
214
+ /** A workspace an account is in, with what the account does there. */
215
+ declare const AccountWorkspace: Schema.Struct<{
216
+ readonly role: Schema.Literals<readonly ["member", "admin"]>;
217
+ readonly id: Schema.String;
218
+ readonly name: Schema.String;
219
+ readonly createdAt: Schema.DateTimeUtcFromString;
220
+ }>;
221
+ declare const WorkspaceMember: Schema.Struct<{
222
+ readonly accountId: Schema.String;
223
+ readonly name: Schema.String;
224
+ readonly kind: Schema.Literals<readonly ["person", "service"]>; /** The address a person signs in with; none for a service. */
225
+ readonly email: Schema.NullOr<Schema.String>;
226
+ readonly role: Schema.Literals<readonly ["member", "admin"]>;
227
+ }>;
228
+ /** A person's account as whoever asked for it by its address is told of it. */
229
+ declare const AccountLookup: Schema.Struct<{
230
+ readonly id: Schema.String;
231
+ readonly name: Schema.String;
232
+ readonly email: Schema.String;
233
+ }>;
234
+ /** An API token as its account sees it: never the token. */
235
+ declare const ApiToken: Schema.Struct<{
236
+ readonly id: Schema.String;
237
+ readonly accountId: Schema.String;
238
+ readonly name: Schema.String;
239
+ readonly createdAt: Schema.DateTimeUtcFromString;
240
+ readonly expiresAt: Schema.NullOr<Schema.DateTimeUtcFromString>;
241
+ readonly revokedAt: Schema.NullOr<Schema.DateTimeUtcFromString>; /** What it is held to. */
242
+ readonly scopes: Schema.$Array<Schema.Literals<readonly ["sessions:read", "sessions:write", "snapshots:read", "snapshots:write", "workspaces:read", "workspaces:write", "tokens:write", "events:read", "admin"]>>; /** The resources it is held to; none for a token that reaches all its account does. */
243
+ readonly resources: Schema.NullOr<Schema.Struct<{
244
+ readonly workspaces: Schema.$Array<Schema.String>;
245
+ readonly sessions: Schema.$Array<Schema.String>;
246
+ readonly snapshots: Schema.$Array<Schema.String>;
247
+ }>>;
248
+ }>;
249
+ /** A token as it is told once, when it is made. */
250
+ declare const ApiTokenCreated: Schema.Struct<{
251
+ readonly token: Schema.String;
252
+ readonly id: Schema.String;
253
+ readonly accountId: Schema.String;
254
+ readonly name: Schema.String;
255
+ readonly createdAt: Schema.DateTimeUtcFromString;
256
+ readonly expiresAt: Schema.NullOr<Schema.DateTimeUtcFromString>;
257
+ readonly revokedAt: Schema.NullOr<Schema.DateTimeUtcFromString>; /** What it is held to. */
258
+ readonly scopes: Schema.$Array<Schema.Literals<readonly ["sessions:read", "sessions:write", "snapshots:read", "snapshots:write", "workspaces:read", "workspaces:write", "tokens:write", "events:read", "admin"]>>; /** The resources it is held to; none for a token that reaches all its account does. */
259
+ readonly resources: Schema.NullOr<Schema.Struct<{
260
+ readonly workspaces: Schema.$Array<Schema.String>;
261
+ readonly sessions: Schema.$Array<Schema.String>;
262
+ readonly snapshots: Schema.$Array<Schema.String>;
263
+ }>>;
264
+ }>;
265
+ declare const RegistrationToken: Schema.Struct<{
266
+ readonly id: Schema.String;
267
+ readonly name: Schema.String;
268
+ readonly createdAt: Schema.DateTimeUtcFromString; /** Since when it registers no new node; the nodes that registered with it stay. */
269
+ readonly revokedAt: Schema.NullOr<Schema.DateTimeUtcFromString>;
270
+ }>;
271
+ declare const RegistrationTokenCreated: Schema.Struct<{
272
+ readonly token: Schema.String;
273
+ readonly id: Schema.String;
274
+ readonly name: Schema.String;
275
+ readonly createdAt: Schema.DateTimeUtcFromString; /** Since when it registers no new node; the nodes that registered with it stay. */
276
+ readonly revokedAt: Schema.NullOr<Schema.DateTimeUtcFromString>;
277
+ }>;
278
+ /** A node as its admin sees it: without the operator token. */
279
+ declare const Node: Schema.Struct<{
280
+ readonly id: Schema.String;
281
+ readonly name: Schema.String;
282
+ readonly internalUrl: Schema.String;
283
+ readonly balancerUrl: Schema.NullOr<Schema.String>;
284
+ readonly publicUrl: Schema.NullOr<Schema.String>;
285
+ readonly offers: Schema.NullOr<Schema.Struct<{
286
+ readonly version: Schema.String;
287
+ readonly features: Schema.$Array<Schema.String>;
288
+ readonly network: Schema.Struct<{
289
+ readonly tcp: Schema.String;
290
+ readonly udp: Schema.String;
291
+ }>;
292
+ readonly limits: Schema.Struct<{
293
+ readonly memoryBytes: Schema.optional<Schema.Number>;
294
+ readonly swapBytes: Schema.optional<Schema.Number>;
295
+ readonly cpus: Schema.optional<Schema.Number>;
296
+ readonly tasks: Schema.optional<Schema.Number>;
297
+ readonly suspendIdleAfterSeconds: Schema.optional<Schema.Number>;
298
+ }>;
299
+ readonly holdsResources: Schema.Boolean;
300
+ readonly sharesSnapshots: Schema.Boolean;
301
+ }>>;
302
+ readonly registeredAt: Schema.DateTimeUtcFromString;
303
+ readonly lastSeenAt: Schema.DateTimeUtcFromString; /** Whether its last keepalive is recent enough for it to be used. */
304
+ readonly alive: Schema.Boolean;
305
+ }>;
306
+ declare const Session: Schema.Struct<{
307
+ readonly id: Schema.String;
308
+ /**
309
+ * The account that made it. A session of no workspace is that account's own; one of a
310
+ * workspace is the workspace's, and names none where nobody is known to have made it
311
+ * or the account was removed since.
312
+ */
313
+ readonly accountId: Schema.NullOr<Schema.String>;
314
+ readonly workspaceId: Schema.NullOr<Schema.String>;
315
+ readonly nodeId: Schema.NullOr<Schema.String>; /** What the node it is on is called; none for a session on no node. */
316
+ readonly nodeName: Schema.NullOr<Schema.String>;
317
+ readonly desiredState: Schema.Literals<readonly ["running", "suspended"]>;
318
+ readonly observedState: Schema.Literals<readonly ["suspended", "starting", "running", "suspending", "failed", "gone"]>;
319
+ readonly failure: Schema.NullOr<Schema.String>;
320
+ readonly unreachableSince: Schema.NullOr<Schema.DateTimeUtcFromString>;
321
+ readonly snapshotId: Schema.NullOr<Schema.String>;
322
+ readonly label: Schema.NullOr<Schema.String>;
323
+ readonly tags: Schema.$Record<Schema.String, Schema.String>;
324
+ readonly createdAt: Schema.DateTimeUtcFromString;
325
+ readonly observedAt: Schema.DateTimeUtcFromString;
326
+ /**
327
+ * Where the session is reached through a proxy before the nodes, below the proxy's own
328
+ * address; none for a session on no node. It changes when the session moves.
329
+ */
330
+ readonly path: Schema.NullOr<Schema.String>;
331
+ }>;
332
+ declare const Snapshot: Schema.Struct<{
333
+ readonly id: Schema.String; /** The account that made it, as a session's is. */
334
+ readonly accountId: Schema.NullOr<Schema.String>;
335
+ readonly workspaceId: Schema.NullOr<Schema.String>;
336
+ readonly name: Schema.NullOr<Schema.String>;
337
+ readonly description: Schema.NullOr<Schema.String>;
338
+ readonly tags: Schema.$Record<Schema.String, Schema.String>;
339
+ readonly sessionId: Schema.NullOr<Schema.String>;
340
+ readonly nodeId: Schema.NullOr<Schema.String>;
341
+ readonly shared: Schema.Boolean;
342
+ readonly createdAt: Schema.DateTimeUtcFromString;
343
+ }>;
344
+ /** What a person gave an app that asked to act as their account. */
345
+ declare const Grant: Schema.Struct<{
346
+ readonly id: Schema.String;
347
+ readonly accountId: Schema.String;
348
+ readonly clientId: Schema.String;
349
+ readonly clientName: Schema.String;
350
+ readonly scopes: Schema.$Array<Schema.Literals<readonly ["sessions:read", "sessions:write", "snapshots:read", "snapshots:write", "workspaces:read", "workspaces:write", "tokens:write", "events:read", "admin"]>>; /** The resources it is held to; none for a grant that reaches all its account does. */
351
+ readonly resources: Schema.NullOr<Schema.Struct<{
352
+ readonly workspaces: Schema.$Array<Schema.String>;
353
+ readonly sessions: Schema.$Array<Schema.String>;
354
+ readonly snapshots: Schema.$Array<Schema.String>;
355
+ }>>;
356
+ readonly createdAt: Schema.DateTimeUtcFromString;
357
+ }>;
358
+ /** A provider people sign in through, as the page that signs them in names it. */
359
+ declare const Provider: Schema.Struct<{
360
+ /** What it is known by in addresses. */readonly id: Schema.String;
361
+ readonly name: Schema.String; /** Which provider's mark it is shown with, as whoever added it said; none said, without. */
362
+ readonly icon: Schema.NullOr<Schema.String>;
363
+ }>;
364
+ /** What a provider is known by: a part of the address it sends people back to. */
365
+ declare const ProviderId: Schema.String;
366
+ /**
367
+ * What a provider speaks: OpenID Connect, whose signed token says who someone is, or OAuth
368
+ * 2.0 alone, where that is asked of the provider with the token it gave.
369
+ */
370
+ declare const ProviderKind: Schema.Literals<readonly ["oidc", "oauth2"]>;
371
+ /**
372
+ * A provider as an admin is told of it: all that was said of it but its client secret,
373
+ * of which only whether there is one is told.
374
+ */
375
+ declare const SignInProvider: Schema.Struct<{
376
+ readonly id: Schema.String;
377
+ readonly name: Schema.String; /** Which provider's mark it is shown with; none said, for one the settings name. */
378
+ readonly icon: Schema.NullOr<Schema.String>;
379
+ readonly kind: Schema.Literals<readonly ["oidc", "oauth2"]>;
380
+ /**
381
+ * Its issuer, or its discovery document where that was given in place of it; nothing
382
+ * for one that speaks OAuth 2.0 alone, which has `endpoints` in its place.
383
+ */
384
+ readonly issuer: Schema.String;
385
+ readonly endpoints: Schema.NullOr<Schema.Struct<{
386
+ readonly authorization: Schema.String;
387
+ readonly token: Schema.String;
388
+ readonly userInfo: Schema.String;
389
+ readonly emails: Schema.NullOr<Schema.String>;
390
+ }>>;
391
+ readonly clientId: Schema.String;
392
+ readonly secretSet: Schema.Boolean;
393
+ readonly scopes: Schema.$Array<Schema.String>; /** Whether someone it vouches for, whom no admin made a person, is made one. */
394
+ readonly provision: Schema.Boolean; /** The domains of the addresses people are made for so; any address where none is named. */
395
+ readonly domains: Schema.$Array<Schema.String>; /** Whether people sign in through it now. */
396
+ readonly enabled: Schema.Boolean; /** Kept here, where an admin changes it, or named by the settings, which alone change it. */
397
+ readonly source: Schema.Literals<readonly ["stored", "configuration"]>; /** When it was added and last changed here; never, for one the settings name. */
398
+ readonly createdAt: Schema.NullOr<Schema.DateTimeUtcFromString>;
399
+ readonly updatedAt: Schema.NullOr<Schema.DateTimeUtcFromString>;
400
+ }>;
401
+ declare const SignInProviders: Schema.Struct<{
402
+ /** What a provider is told to send people back to, once its id is put after it. */readonly callbackBase: Schema.String;
403
+ readonly providers: Schema.$Array<Schema.Struct<{
404
+ readonly id: Schema.String;
405
+ readonly name: Schema.String; /** Which provider's mark it is shown with; none said, for one the settings name. */
406
+ readonly icon: Schema.NullOr<Schema.String>;
407
+ readonly kind: Schema.Literals<readonly ["oidc", "oauth2"]>;
408
+ /**
409
+ * Its issuer, or its discovery document where that was given in place of it; nothing
410
+ * for one that speaks OAuth 2.0 alone, which has `endpoints` in its place.
411
+ */
412
+ readonly issuer: Schema.String;
413
+ readonly endpoints: Schema.NullOr<Schema.Struct<{
414
+ readonly authorization: Schema.String;
415
+ readonly token: Schema.String;
416
+ readonly userInfo: Schema.String;
417
+ readonly emails: Schema.NullOr<Schema.String>;
418
+ }>>;
419
+ readonly clientId: Schema.String;
420
+ readonly secretSet: Schema.Boolean;
421
+ readonly scopes: Schema.$Array<Schema.String>; /** Whether someone it vouches for, whom no admin made a person, is made one. */
422
+ readonly provision: Schema.Boolean; /** The domains of the addresses people are made for so; any address where none is named. */
423
+ readonly domains: Schema.$Array<Schema.String>; /** Whether people sign in through it now. */
424
+ readonly enabled: Schema.Boolean; /** Kept here, where an admin changes it, or named by the settings, which alone change it. */
425
+ readonly source: Schema.Literals<readonly ["stored", "configuration"]>; /** When it was added and last changed here; never, for one the settings name. */
426
+ readonly createdAt: Schema.NullOr<Schema.DateTimeUtcFromString>;
427
+ readonly updatedAt: Schema.NullOr<Schema.DateTimeUtcFromString>;
428
+ }>>;
429
+ }>;
430
+ /** What came of asking a provider how it is reached: nothing wrong, or why not. */
431
+ declare const ProviderChecked: Schema.Struct<{
432
+ readonly ok: Schema.Boolean; /** What is wrong, each a sentence; nothing where it is reached as it should be. */
433
+ readonly problems: Schema.$Array<Schema.String>; /** The scopes it says it gives, where it is reached and says any. */
434
+ readonly scopes: Schema.$Array<Schema.String>;
435
+ }>;
436
+ /** A ticket into a session, as it is told to whoever asked for it. */
437
+ declare const Admission: Schema.Struct<{
438
+ /** What a request to the session carries: as a bearer token, or as `token` in its query. */readonly ticket: Schema.String;
439
+ readonly expiresAt: Schema.DateTimeUtcFromString;
440
+ /**
441
+ * The session's workbench, for a person to open in a browser: on its node where that
442
+ * has an address of its own, and through the proxy before the nodes otherwise. What
443
+ * comes before its `?` is where the session's other routes are.
444
+ */
445
+ readonly url: Schema.String;
446
+ }>;
447
+ /** What a file of a session is found by, below its files: `recordings/1a2b.mkv`. */
448
+ declare const SessionFilePath: Schema.String;
449
+ /** An address one file of a session is read at, or put to, by whoever is given it. */
450
+ declare const FileLink: Schema.Struct<{
451
+ readonly url: Schema.String; /** What a request to it is made with: `GET` reads the file, `PUT` puts its bytes there. */
452
+ readonly method: Schema.Literals<readonly ["GET", "PUT"]>;
453
+ readonly expiresAt: Schema.DateTimeUtcFromString;
454
+ }>;
455
+ /** The longest a file link is good for, in seconds. */
456
+ declare const FILE_LINK_MOST = 3600;
457
+ /** A share link as whoever has its session sees it: never its secret. */
458
+ declare const Share: Schema.Struct<{
459
+ readonly id: Schema.String;
460
+ readonly sessionId: Schema.String; /** The account that made it. */
461
+ readonly accountId: Schema.String;
462
+ readonly name: Schema.String;
463
+ readonly role: Schema.Literals<readonly ["watch", "control"]>;
464
+ readonly createdAt: Schema.DateTimeUtcFromString;
465
+ readonly expiresAt: Schema.NullOr<Schema.DateTimeUtcFromString>;
466
+ readonly lastUsedAt: Schema.NullOr<Schema.DateTimeUtcFromString>;
467
+ }>;
468
+ /** A link as it is told once, when it is made: `url` is what a guest opens. */
469
+ declare const ShareCreated: Schema.Struct<{
470
+ readonly url: Schema.String;
471
+ readonly id: Schema.String;
472
+ readonly sessionId: Schema.String; /** The account that made it. */
473
+ readonly accountId: Schema.String;
474
+ readonly name: Schema.String;
475
+ readonly role: Schema.Literals<readonly ["watch", "control"]>;
476
+ readonly createdAt: Schema.DateTimeUtcFromString;
477
+ readonly expiresAt: Schema.NullOr<Schema.DateTimeUtcFromString>;
478
+ readonly lastUsedAt: Schema.NullOr<Schema.DateTimeUtcFromString>;
479
+ }>;
480
+ /** Something that was done, by whom and to what: written once, and never changed. */
481
+ declare const Event: Schema.Struct<{
482
+ readonly id: Schema.String;
483
+ readonly at: Schema.DateTimeUtcFromString;
484
+ readonly kind: Schema.Literals<readonly ["sign_in.succeeded", "sign_in.failed", "account.created", "account.changed", "account.disabled", "account.enabled", "account.removed", "account.setup_link_made", "account.second_factor_reset", "account.passkeys_removed", "token.created", "token.revoked", "grant.given", "grant.revoked", "registration_token.created", "registration_token.revoked", "workspace.created", "workspace.renamed", "workspace.deleted", "workspace.member_admitted", "workspace.member_dismissed", "session.created", "session.suspended", "session.resumed", "session.deleted", "snapshot.taken", "snapshot.replaced", "snapshot.deleted", "share.created", "share.revoked", "share.joined", "node.registered", "node.refused", "node.released", "node.silent", "provider.added", "provider.changed", "provider.enabled", "provider.disabled", "provider.removed"]>;
485
+ readonly actor: Schema.Struct<{
486
+ readonly kind: Schema.Literals<readonly ["account", "guest", "bootstrap", "anonymous", "system"]>;
487
+ readonly id: Schema.NullOr<Schema.String>;
488
+ readonly name: Schema.NullOr<Schema.String>;
489
+ }>; /** What it was about; nothing where that is not known, as with whoever nobody knows. */
490
+ readonly resource: Schema.NullOr<Schema.Struct<{
491
+ readonly kind: Schema.Literals<readonly ["account", "token", "grant", "registration_token", "workspace", "session", "snapshot", "share", "node", "provider"]>;
492
+ readonly id: Schema.String;
493
+ readonly label: Schema.NullOr<Schema.String>;
494
+ }>>; /** The workspace what it was about is of, where it is of one. */
495
+ readonly workspaceId: Schema.NullOr<Schema.String>; /** Where the request that did it came from, where one did and that is known. */
496
+ readonly address: Schema.NullOr<Schema.String>;
497
+ readonly detail: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean, Schema.Null, Schema.$Array<Schema.String>]>>;
498
+ }>;
499
+ /** Events, the newest first, and what the ones after them are asked for with. */
500
+ declare const EventPage: Schema.Struct<{
501
+ readonly events: Schema.$Array<Schema.Struct<{
502
+ readonly id: Schema.String;
503
+ readonly at: Schema.DateTimeUtcFromString;
504
+ readonly kind: Schema.Literals<readonly ["sign_in.succeeded", "sign_in.failed", "account.created", "account.changed", "account.disabled", "account.enabled", "account.removed", "account.setup_link_made", "account.second_factor_reset", "account.passkeys_removed", "token.created", "token.revoked", "grant.given", "grant.revoked", "registration_token.created", "registration_token.revoked", "workspace.created", "workspace.renamed", "workspace.deleted", "workspace.member_admitted", "workspace.member_dismissed", "session.created", "session.suspended", "session.resumed", "session.deleted", "snapshot.taken", "snapshot.replaced", "snapshot.deleted", "share.created", "share.revoked", "share.joined", "node.registered", "node.refused", "node.released", "node.silent", "provider.added", "provider.changed", "provider.enabled", "provider.disabled", "provider.removed"]>;
505
+ readonly actor: Schema.Struct<{
506
+ readonly kind: Schema.Literals<readonly ["account", "guest", "bootstrap", "anonymous", "system"]>;
507
+ readonly id: Schema.NullOr<Schema.String>;
508
+ readonly name: Schema.NullOr<Schema.String>;
509
+ }>; /** What it was about; nothing where that is not known, as with whoever nobody knows. */
510
+ readonly resource: Schema.NullOr<Schema.Struct<{
511
+ readonly kind: Schema.Literals<readonly ["account", "token", "grant", "registration_token", "workspace", "session", "snapshot", "share", "node", "provider"]>;
512
+ readonly id: Schema.String;
513
+ readonly label: Schema.NullOr<Schema.String>;
514
+ }>>; /** The workspace what it was about is of, where it is of one. */
515
+ readonly workspaceId: Schema.NullOr<Schema.String>; /** Where the request that did it came from, where one did and that is known. */
516
+ readonly address: Schema.NullOr<Schema.String>;
517
+ readonly detail: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean, Schema.Null, Schema.$Array<Schema.String>]>>;
518
+ }>>; /** The cursor of the events before these; none where these are the oldest. */
519
+ readonly next: Schema.NullOr<Schema.String>;
520
+ }>;
521
+ declare const CurrentCaller_base: Context.ServiceClass<CurrentCaller, "@aperture-browser/control/CurrentCaller", Caller>;
522
+ /** Who the request comes from, for what handles it. */
523
+ declare class CurrentCaller extends CurrentCaller_base {}
524
+ declare const Authorization_base: HttpApiMiddleware.ServiceClass<Authorization, "@aperture-browser/control/Authorization", {
525
+ requires: never;
526
+ provides: CurrentCaller;
527
+ error: typeof Unauthorized;
528
+ clientError: never;
529
+ requiredForClient: false;
530
+ security: {
531
+ readonly bearer: HttpApiSecurity.Http;
532
+ };
533
+ }, HttpApiMiddleware.HttpApiMiddlewareSecurity<{
534
+ readonly bearer: HttpApiSecurity.Http;
535
+ }, CurrentCaller, typeof Unauthorized, never>>;
536
+ /** Lets in whoever comes with an account's API token, or with the bootstrap token. */
537
+ declare class Authorization extends Authorization_base {}
538
+ declare const AccountsGroup_base: HttpApiGroup.HttpApiGroup<"accounts", HttpApiEndpoint.HttpApiEndpoint<"current", "GET", "/account", never, never, never, never, Schema.toCodecJson<Schema.Struct<{
539
+ /** What the caller is held to; none for one that does whatever its account does. */readonly scopes: Schema.NullOr<Schema.$Array<Schema.Literals<readonly ["sessions:read", "sessions:write", "snapshots:read", "snapshots:write", "workspaces:read", "workspaces:write", "tokens:write", "events:read", "admin"]>>>; /** The resources the caller is held to; none for one that reaches all its account does. */
540
+ readonly resources: Schema.NullOr<Schema.Struct<{
541
+ readonly workspaces: Schema.$Array<Schema.String>;
542
+ readonly sessions: Schema.$Array<Schema.String>;
543
+ readonly snapshots: Schema.$Array<Schema.String>;
544
+ }>>;
545
+ readonly id: Schema.String;
546
+ readonly name: Schema.String;
547
+ readonly admin: Schema.Boolean; /** A person, who signs in, or a service, which comes with API tokens alone. */
548
+ readonly kind: Schema.Literals<readonly ["person", "service"]>; /** The address a person signs in with; none for a service. */
549
+ readonly email: Schema.NullOr<Schema.String>;
550
+ readonly createdAt: Schema.DateTimeUtcFromString; /** Since when it is disabled: nothing of it signs in or is taken as a caller. */
551
+ readonly disabledAt: Schema.NullOr<Schema.DateTimeUtcFromString>;
552
+ }>>, Schema.toCodecJson<typeof Forbidden>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"tokens", "GET", "/account/tokens", never, never, never, never, Schema.toCodecJson<Schema.$Array<Schema.Struct<{
553
+ readonly id: Schema.String;
554
+ readonly accountId: Schema.String;
555
+ readonly name: Schema.String;
556
+ readonly createdAt: Schema.DateTimeUtcFromString;
557
+ readonly expiresAt: Schema.NullOr<Schema.DateTimeUtcFromString>;
558
+ readonly revokedAt: Schema.NullOr<Schema.DateTimeUtcFromString>; /** What it is held to. */
559
+ readonly scopes: Schema.$Array<Schema.Literals<readonly ["sessions:read", "sessions:write", "snapshots:read", "snapshots:write", "workspaces:read", "workspaces:write", "tokens:write", "events:read", "admin"]>>; /** The resources it is held to; none for a token that reaches all its account does. */
560
+ readonly resources: Schema.NullOr<Schema.Struct<{
561
+ readonly workspaces: Schema.$Array<Schema.String>;
562
+ readonly sessions: Schema.$Array<Schema.String>;
563
+ readonly snapshots: Schema.$Array<Schema.String>;
564
+ }>>;
565
+ }>>>, Schema.toCodecJson<typeof Forbidden>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"createOwnToken", "POST", "/account/tokens", never, never, Schema.toCodecJson<Schema.Struct<{
566
+ readonly name: Schema.NonEmptyString;
567
+ /** How many days it is good for; for as long as it is not taken back, without. */
568
+ /** What it does: a token is made for something, and does nothing else. */
569
+ readonly scopes: Schema.NonEmptyArray<Schema.Literals<readonly ["sessions:read", "sessions:write", "snapshots:read", "snapshots:write", "workspaces:read", "workspaces:write", "tokens:write", "events:read", "admin"]>>; /** The resources it is held to; all that its account reaches, without. */
570
+ readonly resources: Schema.optional<Schema.Struct<{
571
+ readonly workspaces: Schema.$Array<Schema.String>;
572
+ readonly sessions: Schema.$Array<Schema.String>;
573
+ readonly snapshots: Schema.$Array<Schema.String>;
574
+ }>>;
575
+ readonly expiresInDays: Schema.optional<Schema.Int>;
576
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
577
+ readonly token: Schema.String;
578
+ readonly id: Schema.String;
579
+ readonly accountId: Schema.String;
580
+ readonly name: Schema.String;
581
+ readonly createdAt: Schema.DateTimeUtcFromString;
582
+ readonly expiresAt: Schema.NullOr<Schema.DateTimeUtcFromString>;
583
+ readonly revokedAt: Schema.NullOr<Schema.DateTimeUtcFromString>; /** What it is held to. */
584
+ readonly scopes: Schema.$Array<Schema.Literals<readonly ["sessions:read", "sessions:write", "snapshots:read", "snapshots:write", "workspaces:read", "workspaces:write", "tokens:write", "events:read", "admin"]>>; /** The resources it is held to; none for a token that reaches all its account does. */
585
+ readonly resources: Schema.NullOr<Schema.Struct<{
586
+ readonly workspaces: Schema.$Array<Schema.String>;
587
+ readonly sessions: Schema.$Array<Schema.String>;
588
+ readonly snapshots: Schema.$Array<Schema.String>;
589
+ }>>;
590
+ }>>, Schema.toCodecJson<typeof Forbidden>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"revokeToken", "DELETE", "/account/tokens/:id", Schema.toCodecStringTree<Schema.Struct<{
591
+ id: Schema.String;
592
+ }>>, never, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof Forbidden | typeof ApiTokenNotFound>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"list", "GET", "/accounts", never, never, never, never, Schema.toCodecJson<Schema.$Array<Schema.Struct<{
593
+ readonly signIn: Schema.NullOr<Schema.Struct<{
594
+ /** Whether they have a password: one they set, since nobody is given one. */readonly password: Schema.Boolean;
595
+ readonly secondFactor: Schema.Boolean; /** How many passkeys they added. */
596
+ readonly passkeys: Schema.Number; /** The providers they came through, by what each is called. */
597
+ readonly providers: Schema.$Array<Schema.String>;
598
+ }>>;
599
+ readonly id: Schema.String;
600
+ readonly name: Schema.String;
601
+ readonly admin: Schema.Boolean; /** A person, who signs in, or a service, which comes with API tokens alone. */
602
+ readonly kind: Schema.Literals<readonly ["person", "service"]>; /** The address a person signs in with; none for a service. */
603
+ readonly email: Schema.NullOr<Schema.String>;
604
+ readonly createdAt: Schema.DateTimeUtcFromString; /** Since when it is disabled: nothing of it signs in or is taken as a caller. */
605
+ readonly disabledAt: Schema.NullOr<Schema.DateTimeUtcFromString>;
606
+ }>>>, Schema.toCodecJson<typeof Forbidden>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"lookup", "GET", "/accounts/lookup", never, Schema.toCodecStringTree<Schema.Struct<{
607
+ email: Schema.NonEmptyString;
608
+ }>>, never, never, Schema.toCodecJson<Schema.Struct<{
609
+ readonly id: Schema.String;
610
+ readonly name: Schema.String;
611
+ readonly email: Schema.String;
612
+ }>>, Schema.toCodecJson<typeof Forbidden | typeof PersonNotFound>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"create", "POST", "/accounts", never, never, Schema.toCodecJson<Schema.Struct<{
613
+ readonly name: Schema.NonEmptyString;
614
+ readonly admin: Schema.optional<Schema.Boolean>;
615
+ readonly kind: Schema.optional<Schema.Literals<readonly ["person", "service"]>>; /** For a person: the address they sign in with, once they set a password. */
616
+ readonly email: Schema.optional<Schema.NonEmptyString>;
617
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
618
+ readonly id: Schema.String;
619
+ readonly name: Schema.String;
620
+ readonly admin: Schema.Boolean; /** A person, who signs in, or a service, which comes with API tokens alone. */
621
+ readonly kind: Schema.Literals<readonly ["person", "service"]>; /** The address a person signs in with; none for a service. */
622
+ readonly email: Schema.NullOr<Schema.String>;
623
+ readonly createdAt: Schema.DateTimeUtcFromString; /** Since when it is disabled: nothing of it signs in or is taken as a caller. */
624
+ readonly disabledAt: Schema.NullOr<Schema.DateTimeUtcFromString>;
625
+ }>>, Schema.toCodecJson<typeof Forbidden | typeof EmailTaken | typeof AccountInvalid>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"get", "GET", "/accounts/:id", Schema.toCodecStringTree<Schema.Struct<{
626
+ id: Schema.String;
627
+ }>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
628
+ readonly signIn: Schema.NullOr<Schema.Struct<{
629
+ /** Whether they have a password: one they set, since nobody is given one. */readonly password: Schema.Boolean;
630
+ readonly secondFactor: Schema.Boolean; /** How many passkeys they added. */
631
+ readonly passkeys: Schema.Number; /** The providers they came through, by what each is called. */
632
+ readonly providers: Schema.$Array<Schema.String>;
633
+ }>>;
634
+ readonly id: Schema.String;
635
+ readonly name: Schema.String;
636
+ readonly admin: Schema.Boolean; /** A person, who signs in, or a service, which comes with API tokens alone. */
637
+ readonly kind: Schema.Literals<readonly ["person", "service"]>; /** The address a person signs in with; none for a service. */
638
+ readonly email: Schema.NullOr<Schema.String>;
639
+ readonly createdAt: Schema.DateTimeUtcFromString; /** Since when it is disabled: nothing of it signs in or is taken as a caller. */
640
+ readonly disabledAt: Schema.NullOr<Schema.DateTimeUtcFromString>;
641
+ }>>, Schema.toCodecJson<typeof Forbidden | typeof AccountNotFound>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"change", "PATCH", "/accounts/:id", Schema.toCodecStringTree<Schema.Struct<{
642
+ id: Schema.String;
643
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
644
+ readonly name: Schema.optional<Schema.NonEmptyString>;
645
+ readonly admin: Schema.optional<Schema.Boolean>;
646
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
647
+ readonly id: Schema.String;
648
+ readonly name: Schema.String;
649
+ readonly admin: Schema.Boolean; /** A person, who signs in, or a service, which comes with API tokens alone. */
650
+ readonly kind: Schema.Literals<readonly ["person", "service"]>; /** The address a person signs in with; none for a service. */
651
+ readonly email: Schema.NullOr<Schema.String>;
652
+ readonly createdAt: Schema.DateTimeUtcFromString; /** Since when it is disabled: nothing of it signs in or is taken as a caller. */
653
+ readonly disabledAt: Schema.NullOr<Schema.DateTimeUtcFromString>;
654
+ }>>, Schema.toCodecJson<typeof Forbidden | typeof AccountNotFound | typeof AccountInUse>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"resetSecondFactor", "POST", "/accounts/:id/second-factor/reset", Schema.toCodecStringTree<Schema.Struct<{
655
+ id: Schema.String;
656
+ }>>, never, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof Forbidden | typeof AccountNotFound | typeof PersonNotFound>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"disable", "POST", "/accounts/:id/disable", Schema.toCodecStringTree<Schema.Struct<{
657
+ id: Schema.String;
658
+ }>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
659
+ readonly id: Schema.String;
660
+ readonly name: Schema.String;
661
+ readonly admin: Schema.Boolean; /** A person, who signs in, or a service, which comes with API tokens alone. */
662
+ readonly kind: Schema.Literals<readonly ["person", "service"]>; /** The address a person signs in with; none for a service. */
663
+ readonly email: Schema.NullOr<Schema.String>;
664
+ readonly createdAt: Schema.DateTimeUtcFromString; /** Since when it is disabled: nothing of it signs in or is taken as a caller. */
665
+ readonly disabledAt: Schema.NullOr<Schema.DateTimeUtcFromString>;
666
+ }>>, Schema.toCodecJson<typeof Forbidden | typeof AccountNotFound | typeof AccountInUse>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"enable", "POST", "/accounts/:id/enable", Schema.toCodecStringTree<Schema.Struct<{
667
+ id: Schema.String;
668
+ }>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
669
+ readonly id: Schema.String;
670
+ readonly name: Schema.String;
671
+ readonly admin: Schema.Boolean; /** A person, who signs in, or a service, which comes with API tokens alone. */
672
+ readonly kind: Schema.Literals<readonly ["person", "service"]>; /** The address a person signs in with; none for a service. */
673
+ readonly email: Schema.NullOr<Schema.String>;
674
+ readonly createdAt: Schema.DateTimeUtcFromString; /** Since when it is disabled: nothing of it signs in or is taken as a caller. */
675
+ readonly disabledAt: Schema.NullOr<Schema.DateTimeUtcFromString>;
676
+ }>>, Schema.toCodecJson<typeof Forbidden | typeof AccountNotFound>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"remove", "DELETE", "/accounts/:id", Schema.toCodecStringTree<Schema.Struct<{
677
+ id: Schema.String;
678
+ }>>, never, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof Forbidden | typeof AccountNotFound | typeof AccountInUse>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"removePasskeys", "POST", "/accounts/:id/passkeys/remove", Schema.toCodecStringTree<Schema.Struct<{
679
+ id: Schema.String;
680
+ }>>, never, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof Forbidden | typeof AccountNotFound | typeof PersonNotFound>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"createSetupToken", "POST", "/accounts/:id/setup-token", Schema.toCodecStringTree<Schema.Struct<{
681
+ id: Schema.String;
682
+ }>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
683
+ readonly token: Schema.String;
684
+ }>>, Schema.toCodecJson<typeof Forbidden | typeof AccountNotFound | typeof PersonNotFound>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"createToken", "POST", "/accounts/:id/tokens", Schema.toCodecStringTree<Schema.Struct<{
685
+ id: Schema.String;
686
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
687
+ readonly name: Schema.NonEmptyString;
688
+ /** How many days it is good for; for as long as it is not taken back, without. */
689
+ /** What it does: a token is made for something, and does nothing else. */
690
+ readonly scopes: Schema.NonEmptyArray<Schema.Literals<readonly ["sessions:read", "sessions:write", "snapshots:read", "snapshots:write", "workspaces:read", "workspaces:write", "tokens:write", "events:read", "admin"]>>; /** The resources it is held to; all that its account reaches, without. */
691
+ readonly resources: Schema.optional<Schema.Struct<{
692
+ readonly workspaces: Schema.$Array<Schema.String>;
693
+ readonly sessions: Schema.$Array<Schema.String>;
694
+ readonly snapshots: Schema.$Array<Schema.String>;
695
+ }>>;
696
+ readonly expiresInDays: Schema.optional<Schema.Int>;
697
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
698
+ readonly token: Schema.String;
699
+ readonly id: Schema.String;
700
+ readonly accountId: Schema.String;
701
+ readonly name: Schema.String;
702
+ readonly createdAt: Schema.DateTimeUtcFromString;
703
+ readonly expiresAt: Schema.NullOr<Schema.DateTimeUtcFromString>;
704
+ readonly revokedAt: Schema.NullOr<Schema.DateTimeUtcFromString>; /** What it is held to. */
705
+ readonly scopes: Schema.$Array<Schema.Literals<readonly ["sessions:read", "sessions:write", "snapshots:read", "snapshots:write", "workspaces:read", "workspaces:write", "tokens:write", "events:read", "admin"]>>; /** The resources it is held to; none for a token that reaches all its account does. */
706
+ readonly resources: Schema.NullOr<Schema.Struct<{
707
+ readonly workspaces: Schema.$Array<Schema.String>;
708
+ readonly sessions: Schema.$Array<Schema.String>;
709
+ readonly snapshots: Schema.$Array<Schema.String>;
710
+ }>>;
711
+ }>>, Schema.toCodecJson<typeof Forbidden | typeof AccountNotFound>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"tokensOf", "GET", "/accounts/:id/tokens", Schema.toCodecStringTree<Schema.Struct<{
712
+ id: Schema.String;
713
+ }>>, never, never, never, Schema.toCodecJson<Schema.$Array<Schema.Struct<{
714
+ readonly id: Schema.String;
715
+ readonly accountId: Schema.String;
716
+ readonly name: Schema.String;
717
+ readonly createdAt: Schema.DateTimeUtcFromString;
718
+ readonly expiresAt: Schema.NullOr<Schema.DateTimeUtcFromString>;
719
+ readonly revokedAt: Schema.NullOr<Schema.DateTimeUtcFromString>; /** What it is held to. */
720
+ readonly scopes: Schema.$Array<Schema.Literals<readonly ["sessions:read", "sessions:write", "snapshots:read", "snapshots:write", "workspaces:read", "workspaces:write", "tokens:write", "events:read", "admin"]>>; /** The resources it is held to; none for a token that reaches all its account does. */
721
+ readonly resources: Schema.NullOr<Schema.Struct<{
722
+ readonly workspaces: Schema.$Array<Schema.String>;
723
+ readonly sessions: Schema.$Array<Schema.String>;
724
+ readonly snapshots: Schema.$Array<Schema.String>;
725
+ }>>;
726
+ }>>>, Schema.toCodecJson<typeof Forbidden | typeof AccountNotFound>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"revokeTokenOf", "DELETE", "/accounts/:id/tokens/:tokenId", Schema.toCodecStringTree<Schema.Struct<{
727
+ id: Schema.String;
728
+ tokenId: Schema.String;
729
+ }>>, never, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof Forbidden | typeof AccountNotFound | typeof ApiTokenNotFound>, never, never>, false>;
730
+ declare class AccountsGroup extends AccountsGroup_base {}
731
+ declare const NodesGroup_base: HttpApiGroup.HttpApiGroup<"nodes", HttpApiEndpoint.HttpApiEndpoint<"list", "GET", "/nodes", never, never, never, never, Schema.toCodecJson<Schema.$Array<Schema.Struct<{
732
+ readonly id: Schema.String;
733
+ readonly name: Schema.String;
734
+ readonly internalUrl: Schema.String;
735
+ readonly balancerUrl: Schema.NullOr<Schema.String>;
736
+ readonly publicUrl: Schema.NullOr<Schema.String>;
737
+ readonly offers: Schema.NullOr<Schema.Struct<{
738
+ readonly version: Schema.String;
739
+ readonly features: Schema.$Array<Schema.String>;
740
+ readonly network: Schema.Struct<{
741
+ readonly tcp: Schema.String;
742
+ readonly udp: Schema.String;
743
+ }>;
744
+ readonly limits: Schema.Struct<{
745
+ readonly memoryBytes: Schema.optional<Schema.Number>;
746
+ readonly swapBytes: Schema.optional<Schema.Number>;
747
+ readonly cpus: Schema.optional<Schema.Number>;
748
+ readonly tasks: Schema.optional<Schema.Number>;
749
+ readonly suspendIdleAfterSeconds: Schema.optional<Schema.Number>;
750
+ }>;
751
+ readonly holdsResources: Schema.Boolean;
752
+ readonly sharesSnapshots: Schema.Boolean;
753
+ }>>;
754
+ readonly registeredAt: Schema.DateTimeUtcFromString;
755
+ readonly lastSeenAt: Schema.DateTimeUtcFromString; /** Whether its last keepalive is recent enough for it to be used. */
756
+ readonly alive: Schema.Boolean;
757
+ }>>>, Schema.toCodecJson<typeof Forbidden>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"release", "POST", "/nodes/:id/release", Schema.toCodecStringTree<Schema.Struct<{
758
+ id: Schema.String;
759
+ }>>, never, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof Forbidden | typeof NodeNotFound>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"registrationTokens", "GET", "/registration-tokens", never, never, never, never, Schema.toCodecJson<Schema.$Array<Schema.Struct<{
760
+ readonly id: Schema.String;
761
+ readonly name: Schema.String;
762
+ readonly createdAt: Schema.DateTimeUtcFromString; /** Since when it registers no new node; the nodes that registered with it stay. */
763
+ readonly revokedAt: Schema.NullOr<Schema.DateTimeUtcFromString>;
764
+ }>>>, Schema.toCodecJson<typeof Forbidden>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"createRegistrationToken", "POST", "/registration-tokens", never, never, Schema.toCodecJson<Schema.Struct<{
765
+ readonly name: Schema.NonEmptyString;
766
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
767
+ readonly token: Schema.String;
768
+ readonly id: Schema.String;
769
+ readonly name: Schema.String;
770
+ readonly createdAt: Schema.DateTimeUtcFromString; /** Since when it registers no new node; the nodes that registered with it stay. */
771
+ readonly revokedAt: Schema.NullOr<Schema.DateTimeUtcFromString>;
772
+ }>>, Schema.toCodecJson<typeof Forbidden>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"revokeRegistrationToken", "DELETE", "/registration-tokens/:id", Schema.toCodecStringTree<Schema.Struct<{
773
+ id: Schema.String;
774
+ }>>, never, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof Forbidden | typeof RegistrationTokenNotFound>, never, never>, false>;
775
+ declare class NodesGroup extends NodesGroup_base {}
776
+ declare const SessionsGroup_base: HttpApiGroup.HttpApiGroup<"sessions", HttpApiEndpoint.HttpApiEndpoint<"list", "GET", "/sessions", never, Schema.toCodecStringTree<Schema.Struct<{
777
+ workspaceId: Schema.optional<Schema.NonEmptyString>;
778
+ state: Schema.optional<Schema.Literals<readonly ["suspended", "starting", "running", "suspending", "failed", "gone"]>>;
779
+ label: Schema.optional<Schema.NonEmptyString>;
780
+ tag: Schema.optional<Schema.NonEmptyString>;
781
+ }>>, never, never, Schema.toCodecJson<Schema.$Array<Schema.Struct<{
782
+ readonly id: Schema.String;
783
+ /**
784
+ * The account that made it. A session of no workspace is that account's own; one of a
785
+ * workspace is the workspace's, and names none where nobody is known to have made it
786
+ * or the account was removed since.
787
+ */
788
+ readonly accountId: Schema.NullOr<Schema.String>;
789
+ readonly workspaceId: Schema.NullOr<Schema.String>;
790
+ readonly nodeId: Schema.NullOr<Schema.String>; /** What the node it is on is called; none for a session on no node. */
791
+ readonly nodeName: Schema.NullOr<Schema.String>;
792
+ readonly desiredState: Schema.Literals<readonly ["running", "suspended"]>;
793
+ readonly observedState: Schema.Literals<readonly ["suspended", "starting", "running", "suspending", "failed", "gone"]>;
794
+ readonly failure: Schema.NullOr<Schema.String>;
795
+ readonly unreachableSince: Schema.NullOr<Schema.DateTimeUtcFromString>;
796
+ readonly snapshotId: Schema.NullOr<Schema.String>;
797
+ readonly label: Schema.NullOr<Schema.String>;
798
+ readonly tags: Schema.$Record<Schema.String, Schema.String>;
799
+ readonly createdAt: Schema.DateTimeUtcFromString;
800
+ readonly observedAt: Schema.DateTimeUtcFromString;
801
+ /**
802
+ * Where the session is reached through a proxy before the nodes, below the proxy's own
803
+ * address; none for a session on no node. It changes when the session moves.
804
+ */
805
+ readonly path: Schema.NullOr<Schema.String>;
806
+ }>>>, Schema.toCodecJson<typeof Forbidden>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"create", "POST", "/sessions", never, never, Schema.toCodecJson<Schema.Struct<{
807
+ readonly suspended: Schema.optional<Schema.Boolean>;
808
+ readonly snapshotId: Schema.optional<Schema.NonEmptyString>;
809
+ readonly label: Schema.optional<Schema.NonEmptyString>; /** The workspace the session is of; the caller's own account's without. */
810
+ readonly workspaceId: Schema.optional<Schema.NonEmptyString>;
811
+ readonly tags: Schema.optional<Schema.$Record<Schema.NonEmptyString, Schema.String>>;
812
+ readonly proxy: Schema.optional<Schema.Struct<{
813
+ readonly upstreams: Schema.optional<Schema.$Record<Schema.NonEmptyString, Schema.Struct<{
814
+ readonly url: Schema.NonEmptyString;
815
+ readonly auth: Schema.optional<Schema.String>;
816
+ }>>>;
817
+ readonly rules: Schema.$Array<Schema.Struct<{
818
+ readonly match: Schema.NonEmptyString;
819
+ readonly via: Schema.NonEmptyString;
820
+ readonly to: Schema.optional<Schema.String>;
821
+ readonly tls: Schema.optional<Schema.Boolean>;
822
+ }>>;
823
+ }>>;
824
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
825
+ readonly id: Schema.String;
826
+ /**
827
+ * The account that made it. A session of no workspace is that account's own; one of a
828
+ * workspace is the workspace's, and names none where nobody is known to have made it
829
+ * or the account was removed since.
830
+ */
831
+ readonly accountId: Schema.NullOr<Schema.String>;
832
+ readonly workspaceId: Schema.NullOr<Schema.String>;
833
+ readonly nodeId: Schema.NullOr<Schema.String>; /** What the node it is on is called; none for a session on no node. */
834
+ readonly nodeName: Schema.NullOr<Schema.String>;
835
+ readonly desiredState: Schema.Literals<readonly ["running", "suspended"]>;
836
+ readonly observedState: Schema.Literals<readonly ["suspended", "starting", "running", "suspending", "failed", "gone"]>;
837
+ readonly failure: Schema.NullOr<Schema.String>;
838
+ readonly unreachableSince: Schema.NullOr<Schema.DateTimeUtcFromString>;
839
+ readonly snapshotId: Schema.NullOr<Schema.String>;
840
+ readonly label: Schema.NullOr<Schema.String>;
841
+ readonly tags: Schema.$Record<Schema.String, Schema.String>;
842
+ readonly createdAt: Schema.DateTimeUtcFromString;
843
+ readonly observedAt: Schema.DateTimeUtcFromString;
844
+ /**
845
+ * Where the session is reached through a proxy before the nodes, below the proxy's own
846
+ * address; none for a session on no node. It changes when the session moves.
847
+ */
848
+ readonly path: Schema.NullOr<Schema.String>;
849
+ }>>, Schema.toCodecJson<typeof Forbidden | typeof NoNode | typeof NodeRefused | typeof SnapshotNotFound | typeof WorkspaceNotFound>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"get", "GET", "/sessions/:id", Schema.toCodecStringTree<Schema.Struct<{
850
+ id: Schema.String;
851
+ }>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
852
+ readonly id: Schema.String;
853
+ /**
854
+ * The account that made it. A session of no workspace is that account's own; one of a
855
+ * workspace is the workspace's, and names none where nobody is known to have made it
856
+ * or the account was removed since.
857
+ */
858
+ readonly accountId: Schema.NullOr<Schema.String>;
859
+ readonly workspaceId: Schema.NullOr<Schema.String>;
860
+ readonly nodeId: Schema.NullOr<Schema.String>; /** What the node it is on is called; none for a session on no node. */
861
+ readonly nodeName: Schema.NullOr<Schema.String>;
862
+ readonly desiredState: Schema.Literals<readonly ["running", "suspended"]>;
863
+ readonly observedState: Schema.Literals<readonly ["suspended", "starting", "running", "suspending", "failed", "gone"]>;
864
+ readonly failure: Schema.NullOr<Schema.String>;
865
+ readonly unreachableSince: Schema.NullOr<Schema.DateTimeUtcFromString>;
866
+ readonly snapshotId: Schema.NullOr<Schema.String>;
867
+ readonly label: Schema.NullOr<Schema.String>;
868
+ readonly tags: Schema.$Record<Schema.String, Schema.String>;
869
+ readonly createdAt: Schema.DateTimeUtcFromString;
870
+ readonly observedAt: Schema.DateTimeUtcFromString;
871
+ /**
872
+ * Where the session is reached through a proxy before the nodes, below the proxy's own
873
+ * address; none for a session on no node. It changes when the session moves.
874
+ */
875
+ readonly path: Schema.NullOr<Schema.String>;
876
+ }>>, Schema.toCodecJson<typeof Forbidden | typeof SessionNotFound>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"describe", "PATCH", "/sessions/:id", Schema.toCodecStringTree<Schema.Struct<{
877
+ id: Schema.String;
878
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
879
+ readonly label: Schema.optional<Schema.NullOr<Schema.NonEmptyString>>;
880
+ readonly tags: Schema.optional<Schema.$Record<Schema.NonEmptyString, Schema.String>>;
881
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
882
+ readonly id: Schema.String;
883
+ /**
884
+ * The account that made it. A session of no workspace is that account's own; one of a
885
+ * workspace is the workspace's, and names none where nobody is known to have made it
886
+ * or the account was removed since.
887
+ */
888
+ readonly accountId: Schema.NullOr<Schema.String>;
889
+ readonly workspaceId: Schema.NullOr<Schema.String>;
890
+ readonly nodeId: Schema.NullOr<Schema.String>; /** What the node it is on is called; none for a session on no node. */
891
+ readonly nodeName: Schema.NullOr<Schema.String>;
892
+ readonly desiredState: Schema.Literals<readonly ["running", "suspended"]>;
893
+ readonly observedState: Schema.Literals<readonly ["suspended", "starting", "running", "suspending", "failed", "gone"]>;
894
+ readonly failure: Schema.NullOr<Schema.String>;
895
+ readonly unreachableSince: Schema.NullOr<Schema.DateTimeUtcFromString>;
896
+ readonly snapshotId: Schema.NullOr<Schema.String>;
897
+ readonly label: Schema.NullOr<Schema.String>;
898
+ readonly tags: Schema.$Record<Schema.String, Schema.String>;
899
+ readonly createdAt: Schema.DateTimeUtcFromString;
900
+ readonly observedAt: Schema.DateTimeUtcFromString;
901
+ /**
902
+ * Where the session is reached through a proxy before the nodes, below the proxy's own
903
+ * address; none for a session on no node. It changes when the session moves.
904
+ */
905
+ readonly path: Schema.NullOr<Schema.String>;
906
+ }>>, Schema.toCodecJson<typeof Forbidden | typeof SessionNotFound>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"proxy", "GET", "/sessions/:id/proxy", Schema.toCodecStringTree<Schema.Struct<{
907
+ id: Schema.String;
908
+ }>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
909
+ readonly proxy: Schema.NullOr<Schema.Struct<{
910
+ readonly upstreams: Schema.optional<Schema.$Record<Schema.NonEmptyString, Schema.Struct<{
911
+ readonly url: Schema.NonEmptyString;
912
+ readonly auth: Schema.optional<Schema.String>;
913
+ }>>>;
914
+ readonly rules: Schema.$Array<Schema.Struct<{
915
+ readonly match: Schema.NonEmptyString;
916
+ readonly via: Schema.NonEmptyString;
917
+ readonly to: Schema.optional<Schema.String>;
918
+ readonly tls: Schema.optional<Schema.Boolean>;
919
+ }>>;
920
+ }>>;
921
+ }>>, Schema.toCodecJson<typeof Forbidden | typeof SessionNotFound>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"setProxy", "PUT", "/sessions/:id/proxy", Schema.toCodecStringTree<Schema.Struct<{
922
+ id: Schema.String;
923
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
924
+ readonly proxy: Schema.NullOr<Schema.Struct<{
925
+ readonly upstreams: Schema.optional<Schema.$Record<Schema.NonEmptyString, Schema.Struct<{
926
+ readonly url: Schema.NonEmptyString;
927
+ readonly auth: Schema.optional<Schema.String>;
928
+ }>>>;
929
+ readonly rules: Schema.$Array<Schema.Struct<{
930
+ readonly match: Schema.NonEmptyString;
931
+ readonly via: Schema.NonEmptyString;
932
+ readonly to: Schema.optional<Schema.String>;
933
+ readonly tls: Schema.optional<Schema.Boolean>;
934
+ }>>;
935
+ }>>;
936
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
937
+ readonly proxy: Schema.NullOr<Schema.Struct<{
938
+ readonly upstreams: Schema.optional<Schema.$Record<Schema.NonEmptyString, Schema.Struct<{
939
+ readonly url: Schema.NonEmptyString;
940
+ readonly auth: Schema.optional<Schema.String>;
941
+ }>>>;
942
+ readonly rules: Schema.$Array<Schema.Struct<{
943
+ readonly match: Schema.NonEmptyString;
944
+ readonly via: Schema.NonEmptyString;
945
+ readonly to: Schema.optional<Schema.String>;
946
+ readonly tls: Schema.optional<Schema.Boolean>;
947
+ }>>;
948
+ }>>;
949
+ }>>, Schema.toCodecJson<typeof Forbidden | typeof SessionNotFound | typeof SessionHasNoNode | typeof NodeUnreachable | typeof NodeRefused | typeof NodeNotFound>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"suspend", "POST", "/sessions/:id/suspend", Schema.toCodecStringTree<Schema.Struct<{
950
+ id: Schema.String;
951
+ }>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
952
+ readonly id: Schema.String;
953
+ /**
954
+ * The account that made it. A session of no workspace is that account's own; one of a
955
+ * workspace is the workspace's, and names none where nobody is known to have made it
956
+ * or the account was removed since.
957
+ */
958
+ readonly accountId: Schema.NullOr<Schema.String>;
959
+ readonly workspaceId: Schema.NullOr<Schema.String>;
960
+ readonly nodeId: Schema.NullOr<Schema.String>; /** What the node it is on is called; none for a session on no node. */
961
+ readonly nodeName: Schema.NullOr<Schema.String>;
962
+ readonly desiredState: Schema.Literals<readonly ["running", "suspended"]>;
963
+ readonly observedState: Schema.Literals<readonly ["suspended", "starting", "running", "suspending", "failed", "gone"]>;
964
+ readonly failure: Schema.NullOr<Schema.String>;
965
+ readonly unreachableSince: Schema.NullOr<Schema.DateTimeUtcFromString>;
966
+ readonly snapshotId: Schema.NullOr<Schema.String>;
967
+ readonly label: Schema.NullOr<Schema.String>;
968
+ readonly tags: Schema.$Record<Schema.String, Schema.String>;
969
+ readonly createdAt: Schema.DateTimeUtcFromString;
970
+ readonly observedAt: Schema.DateTimeUtcFromString;
971
+ /**
972
+ * Where the session is reached through a proxy before the nodes, below the proxy's own
973
+ * address; none for a session on no node. It changes when the session moves.
974
+ */
975
+ readonly path: Schema.NullOr<Schema.String>;
976
+ }>>, Schema.toCodecJson<typeof Forbidden | typeof SessionNotFound | typeof SessionHasNoNode | typeof NodeUnreachable | typeof NodeRefused | typeof NodeNotFound>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"resume", "POST", "/sessions/:id/resume", Schema.toCodecStringTree<Schema.Struct<{
977
+ id: Schema.String;
978
+ }>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
979
+ readonly id: Schema.String;
980
+ /**
981
+ * The account that made it. A session of no workspace is that account's own; one of a
982
+ * workspace is the workspace's, and names none where nobody is known to have made it
983
+ * or the account was removed since.
984
+ */
985
+ readonly accountId: Schema.NullOr<Schema.String>;
986
+ readonly workspaceId: Schema.NullOr<Schema.String>;
987
+ readonly nodeId: Schema.NullOr<Schema.String>; /** What the node it is on is called; none for a session on no node. */
988
+ readonly nodeName: Schema.NullOr<Schema.String>;
989
+ readonly desiredState: Schema.Literals<readonly ["running", "suspended"]>;
990
+ readonly observedState: Schema.Literals<readonly ["suspended", "starting", "running", "suspending", "failed", "gone"]>;
991
+ readonly failure: Schema.NullOr<Schema.String>;
992
+ readonly unreachableSince: Schema.NullOr<Schema.DateTimeUtcFromString>;
993
+ readonly snapshotId: Schema.NullOr<Schema.String>;
994
+ readonly label: Schema.NullOr<Schema.String>;
995
+ readonly tags: Schema.$Record<Schema.String, Schema.String>;
996
+ readonly createdAt: Schema.DateTimeUtcFromString;
997
+ readonly observedAt: Schema.DateTimeUtcFromString;
998
+ /**
999
+ * Where the session is reached through a proxy before the nodes, below the proxy's own
1000
+ * address; none for a session on no node. It changes when the session moves.
1001
+ */
1002
+ readonly path: Schema.NullOr<Schema.String>;
1003
+ }>>, Schema.toCodecJson<typeof Forbidden | typeof SessionNotFound | typeof SessionHasNoNode | typeof NodeUnreachable | typeof NodeRefused | typeof NodeNotFound>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"delete", "DELETE", "/sessions/:id", Schema.toCodecStringTree<Schema.Struct<{
1004
+ id: Schema.String;
1005
+ }>>, never, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof Forbidden | typeof SessionNotFound | typeof SessionHasNoNode | typeof NodeUnreachable | typeof NodeRefused | typeof NodeNotFound>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"createTicket", "POST", "/sessions/:id/tickets", Schema.toCodecStringTree<Schema.Struct<{
1006
+ id: Schema.String;
1007
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
1008
+ readonly name: Schema.optional<Schema.NonEmptyString>;
1009
+ readonly access: Schema.optional<Schema.$Record<Schema.Literals<readonly ["input", "tabs", "lease", "sound", "clipboard", "uploads", "downloads", "recordings", "proxy", "mcp", "cdp", "tunnel"]>, Schema.optional<Schema.Literals<readonly ["r", "w", "rw"]>>>>;
1010
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
1011
+ /** What a request to the session carries: as a bearer token, or as `token` in its query. */readonly ticket: Schema.String;
1012
+ readonly expiresAt: Schema.DateTimeUtcFromString;
1013
+ /**
1014
+ * The session's workbench, for a person to open in a browser: on its node where that
1015
+ * has an address of its own, and through the proxy before the nodes otherwise. What
1016
+ * comes before its `?` is where the session's other routes are.
1017
+ */
1018
+ readonly url: Schema.String;
1019
+ }>>, Schema.toCodecJson<typeof Forbidden | typeof SessionNotFound | typeof SessionHasNoNode>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"createFileLink", "POST", "/sessions/:id/file-links", Schema.toCodecStringTree<Schema.Struct<{
1020
+ id: Schema.String;
1021
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
1022
+ readonly path: Schema.String; /** A link a file is put at, in `uploads` alone; one it is read at, without. */
1023
+ readonly write: Schema.optional<Schema.Boolean>; /** Five minutes, without. */
1024
+ readonly expiresInSeconds: Schema.optional<Schema.Int>;
1025
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
1026
+ readonly url: Schema.String; /** What a request to it is made with: `GET` reads the file, `PUT` puts its bytes there. */
1027
+ readonly method: Schema.Literals<readonly ["GET", "PUT"]>;
1028
+ readonly expiresAt: Schema.DateTimeUtcFromString;
1029
+ }>>, Schema.toCodecJson<typeof Forbidden | typeof SessionNotFound | typeof SessionHasNoNode | typeof FileLinkInvalid>, never, never>, false>;
1030
+ declare class SessionsGroup extends SessionsGroup_base {}
1031
+ declare const SharesGroup_base: HttpApiGroup.HttpApiGroup<"shares", HttpApiEndpoint.HttpApiEndpoint<"list", "GET", "/sessions/:id/shares", Schema.toCodecStringTree<Schema.Struct<{
1032
+ id: Schema.String;
1033
+ }>>, never, never, never, Schema.toCodecJson<Schema.$Array<Schema.Struct<{
1034
+ readonly id: Schema.String;
1035
+ readonly sessionId: Schema.String; /** The account that made it. */
1036
+ readonly accountId: Schema.String;
1037
+ readonly name: Schema.String;
1038
+ readonly role: Schema.Literals<readonly ["watch", "control"]>;
1039
+ readonly createdAt: Schema.DateTimeUtcFromString;
1040
+ readonly expiresAt: Schema.NullOr<Schema.DateTimeUtcFromString>;
1041
+ readonly lastUsedAt: Schema.NullOr<Schema.DateTimeUtcFromString>;
1042
+ }>>>, Schema.toCodecJson<typeof Forbidden | typeof SessionNotFound>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"create", "POST", "/sessions/:id/shares", Schema.toCodecStringTree<Schema.Struct<{
1043
+ id: Schema.String;
1044
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
1045
+ /** What whoever makes it knows it by; guests are not told. */readonly name: Schema.NonEmptyString;
1046
+ readonly role: Schema.Literals<readonly ["watch", "control"]>; /** How many hours it is good for; for as long as it is not taken back, without. */
1047
+ readonly expiresInHours: Schema.optional<Schema.Int>;
1048
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
1049
+ readonly url: Schema.String;
1050
+ readonly id: Schema.String;
1051
+ readonly sessionId: Schema.String; /** The account that made it. */
1052
+ readonly accountId: Schema.String;
1053
+ readonly name: Schema.String;
1054
+ readonly role: Schema.Literals<readonly ["watch", "control"]>;
1055
+ readonly createdAt: Schema.DateTimeUtcFromString;
1056
+ readonly expiresAt: Schema.NullOr<Schema.DateTimeUtcFromString>;
1057
+ readonly lastUsedAt: Schema.NullOr<Schema.DateTimeUtcFromString>;
1058
+ }>>, Schema.toCodecJson<typeof Forbidden | typeof SessionNotFound>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"revoke", "DELETE", "/sessions/:id/shares/:shareId", Schema.toCodecStringTree<Schema.Struct<{
1059
+ shareId: Schema.String;
1060
+ id: Schema.String;
1061
+ }>>, never, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof Forbidden | typeof SessionNotFound | typeof ShareNotFound>, never, never>, false>;
1062
+ declare class SharesGroup extends SharesGroup_base {}
1063
+ declare const SnapshotsGroup_base: HttpApiGroup.HttpApiGroup<"snapshots", HttpApiEndpoint.HttpApiEndpoint<"list", "GET", "/snapshots", never, Schema.toCodecStringTree<Schema.Struct<{
1064
+ workspaceId: Schema.optional<Schema.NonEmptyString>;
1065
+ name: Schema.optional<Schema.NonEmptyString>;
1066
+ tag: Schema.optional<Schema.NonEmptyString>;
1067
+ }>>, never, never, Schema.toCodecJson<Schema.$Array<Schema.Struct<{
1068
+ readonly id: Schema.String; /** The account that made it, as a session's is. */
1069
+ readonly accountId: Schema.NullOr<Schema.String>;
1070
+ readonly workspaceId: Schema.NullOr<Schema.String>;
1071
+ readonly name: Schema.NullOr<Schema.String>;
1072
+ readonly description: Schema.NullOr<Schema.String>;
1073
+ readonly tags: Schema.$Record<Schema.String, Schema.String>;
1074
+ readonly sessionId: Schema.NullOr<Schema.String>;
1075
+ readonly nodeId: Schema.NullOr<Schema.String>;
1076
+ readonly shared: Schema.Boolean;
1077
+ readonly createdAt: Schema.DateTimeUtcFromString;
1078
+ }>>>, Schema.toCodecJson<typeof Forbidden>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"take", "POST", "/sessions/:id/snapshots", Schema.toCodecStringTree<Schema.Struct<{
1079
+ id: Schema.String;
1080
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
1081
+ readonly name: Schema.optional<Schema.NonEmptyString>;
1082
+ readonly description: Schema.optional<Schema.NonEmptyString>;
1083
+ readonly tags: Schema.optional<Schema.$Record<Schema.NonEmptyString, Schema.String>>;
1084
+ /**
1085
+ * A snapshot this one takes the place of: it is deleted once this is taken, and
1086
+ * what it was called, said to be and tagged with stays where nothing else is given.
1087
+ */
1088
+ readonly replaces: Schema.optional<Schema.NonEmptyString>;
1089
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
1090
+ readonly id: Schema.String; /** The account that made it, as a session's is. */
1091
+ readonly accountId: Schema.NullOr<Schema.String>;
1092
+ readonly workspaceId: Schema.NullOr<Schema.String>;
1093
+ readonly name: Schema.NullOr<Schema.String>;
1094
+ readonly description: Schema.NullOr<Schema.String>;
1095
+ readonly tags: Schema.$Record<Schema.String, Schema.String>;
1096
+ readonly sessionId: Schema.NullOr<Schema.String>;
1097
+ readonly nodeId: Schema.NullOr<Schema.String>;
1098
+ readonly shared: Schema.Boolean;
1099
+ readonly createdAt: Schema.DateTimeUtcFromString;
1100
+ }>>, Schema.toCodecJson<typeof Forbidden | typeof SessionNotFound | typeof SessionHasNoNode | typeof NodeUnreachable | typeof NodeRefused | typeof SnapshotNotFound | typeof NodeNotFound>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"get", "GET", "/snapshots/:id", Schema.toCodecStringTree<Schema.Struct<{
1101
+ id: Schema.String;
1102
+ }>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
1103
+ readonly id: Schema.String; /** The account that made it, as a session's is. */
1104
+ readonly accountId: Schema.NullOr<Schema.String>;
1105
+ readonly workspaceId: Schema.NullOr<Schema.String>;
1106
+ readonly name: Schema.NullOr<Schema.String>;
1107
+ readonly description: Schema.NullOr<Schema.String>;
1108
+ readonly tags: Schema.$Record<Schema.String, Schema.String>;
1109
+ readonly sessionId: Schema.NullOr<Schema.String>;
1110
+ readonly nodeId: Schema.NullOr<Schema.String>;
1111
+ readonly shared: Schema.Boolean;
1112
+ readonly createdAt: Schema.DateTimeUtcFromString;
1113
+ }>>, Schema.toCodecJson<typeof Forbidden | typeof SnapshotNotFound>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"describe", "PATCH", "/snapshots/:id", Schema.toCodecStringTree<Schema.Struct<{
1114
+ id: Schema.String;
1115
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
1116
+ readonly name: Schema.optional<Schema.NullOr<Schema.NonEmptyString>>;
1117
+ readonly description: Schema.optional<Schema.NullOr<Schema.NonEmptyString>>;
1118
+ readonly tags: Schema.optional<Schema.$Record<Schema.NonEmptyString, Schema.String>>;
1119
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
1120
+ readonly id: Schema.String; /** The account that made it, as a session's is. */
1121
+ readonly accountId: Schema.NullOr<Schema.String>;
1122
+ readonly workspaceId: Schema.NullOr<Schema.String>;
1123
+ readonly name: Schema.NullOr<Schema.String>;
1124
+ readonly description: Schema.NullOr<Schema.String>;
1125
+ readonly tags: Schema.$Record<Schema.String, Schema.String>;
1126
+ readonly sessionId: Schema.NullOr<Schema.String>;
1127
+ readonly nodeId: Schema.NullOr<Schema.String>;
1128
+ readonly shared: Schema.Boolean;
1129
+ readonly createdAt: Schema.DateTimeUtcFromString;
1130
+ }>>, Schema.toCodecJson<typeof Forbidden | typeof SnapshotNotFound>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"delete", "DELETE", "/snapshots/:id", Schema.toCodecStringTree<Schema.Struct<{
1131
+ id: Schema.String;
1132
+ }>>, never, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof Forbidden | typeof NodeUnreachable | typeof NodeRefused | typeof SnapshotNotFound>, never, never>, false>;
1133
+ declare class SnapshotsGroup extends SnapshotsGroup_base {}
1134
+ declare const WorkspacesGroup_base: HttpApiGroup.HttpApiGroup<"workspaces", HttpApiEndpoint.HttpApiEndpoint<"list", "GET", "/workspaces", never, never, never, never, Schema.toCodecJson<Schema.$Array<Schema.Struct<{
1135
+ readonly id: Schema.String;
1136
+ readonly name: Schema.String;
1137
+ readonly createdAt: Schema.DateTimeUtcFromString;
1138
+ readonly role: Schema.NullOr<Schema.Literals<readonly ["member", "admin"]>>;
1139
+ }>>>, never, never, never> | HttpApiEndpoint.HttpApiEndpoint<"create", "POST", "/workspaces", never, never, Schema.toCodecJson<Schema.Struct<{
1140
+ readonly name: Schema.NonEmptyString;
1141
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
1142
+ readonly id: Schema.String;
1143
+ readonly name: Schema.String;
1144
+ readonly createdAt: Schema.DateTimeUtcFromString;
1145
+ readonly role: Schema.NullOr<Schema.Literals<readonly ["member", "admin"]>>;
1146
+ }>>, Schema.toCodecJson<typeof Forbidden>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"rename", "PATCH", "/workspaces/:id", Schema.toCodecStringTree<Schema.Struct<{
1147
+ id: Schema.String;
1148
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
1149
+ readonly name: Schema.NonEmptyString;
1150
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
1151
+ readonly id: Schema.String;
1152
+ readonly name: Schema.String;
1153
+ readonly createdAt: Schema.DateTimeUtcFromString;
1154
+ readonly role: Schema.NullOr<Schema.Literals<readonly ["member", "admin"]>>;
1155
+ }>>, Schema.toCodecJson<typeof Forbidden | typeof WorkspaceNotFound>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"delete", "DELETE", "/workspaces/:id", Schema.toCodecStringTree<Schema.Struct<{
1156
+ id: Schema.String;
1157
+ }>>, never, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof Forbidden | typeof WorkspaceNotFound | typeof WorkspaceInUse>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"members", "GET", "/workspaces/:id/members", Schema.toCodecStringTree<Schema.Struct<{
1158
+ id: Schema.String;
1159
+ }>>, never, never, never, Schema.toCodecJson<Schema.$Array<Schema.Struct<{
1160
+ readonly accountId: Schema.String;
1161
+ readonly name: Schema.String;
1162
+ readonly kind: Schema.Literals<readonly ["person", "service"]>; /** The address a person signs in with; none for a service. */
1163
+ readonly email: Schema.NullOr<Schema.String>;
1164
+ readonly role: Schema.Literals<readonly ["member", "admin"]>;
1165
+ }>>>, Schema.toCodecJson<typeof Forbidden | typeof WorkspaceNotFound>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"admit", "PUT", "/workspaces/:id/members/:accountId", Schema.toCodecStringTree<Schema.Struct<{
1166
+ accountId: Schema.String;
1167
+ id: Schema.String;
1168
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
1169
+ readonly role: Schema.Literals<readonly ["member", "admin"]>;
1170
+ }>>, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof Forbidden | typeof AccountNotFound | typeof WorkspaceNotFound>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"dismiss", "DELETE", "/workspaces/:id/members/:accountId", Schema.toCodecStringTree<Schema.Struct<{
1171
+ accountId: Schema.String;
1172
+ id: Schema.String;
1173
+ }>>, never, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof Forbidden | typeof WorkspaceNotFound>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"ofAccount", "GET", "/accounts/:accountId/workspaces", Schema.toCodecStringTree<Schema.Struct<{
1174
+ accountId: Schema.String;
1175
+ }>>, never, never, never, Schema.toCodecJson<Schema.$Array<Schema.Struct<{
1176
+ readonly role: Schema.Literals<readonly ["member", "admin"]>;
1177
+ readonly id: Schema.String;
1178
+ readonly name: Schema.String;
1179
+ readonly createdAt: Schema.DateTimeUtcFromString;
1180
+ }>>>, Schema.toCodecJson<typeof Forbidden | typeof AccountNotFound>, never, never>, false>;
1181
+ declare class WorkspacesGroup extends WorkspacesGroup_base {}
1182
+ declare const EVENTS_MOST = 200;
1183
+ declare const EventsGroup_base: HttpApiGroup.HttpApiGroup<"events", HttpApiEndpoint.HttpApiEndpoint<"list", "GET", "/events", never, Schema.toCodecStringTree<Schema.Struct<{
1184
+ kind: Schema.optional<Schema.Literals<readonly ["sign_in.succeeded", "sign_in.failed", "account.created", "account.changed", "account.disabled", "account.enabled", "account.removed", "account.setup_link_made", "account.second_factor_reset", "account.passkeys_removed", "token.created", "token.revoked", "grant.given", "grant.revoked", "registration_token.created", "registration_token.revoked", "workspace.created", "workspace.renamed", "workspace.deleted", "workspace.member_admitted", "workspace.member_dismissed", "session.created", "session.suspended", "session.resumed", "session.deleted", "snapshot.taken", "snapshot.replaced", "snapshot.deleted", "share.created", "share.revoked", "share.joined", "node.registered", "node.refused", "node.released", "node.silent", "provider.added", "provider.changed", "provider.enabled", "provider.disabled", "provider.removed"]>>; /** An account's id, or a part of what the actor was called. */
1185
+ actor: Schema.optional<Schema.NonEmptyString>;
1186
+ resourceKind: Schema.optional<Schema.Literals<readonly ["account", "token", "grant", "registration_token", "workspace", "session", "snapshot", "share", "node", "provider"]>>;
1187
+ resourceId: Schema.optional<Schema.NonEmptyString>;
1188
+ workspaceId: Schema.optional<Schema.NonEmptyString>; /** Events from this moment on. */
1189
+ since: Schema.optional<Schema.DateTimeUtcFromString>; /** Events before this moment. */
1190
+ until: Schema.optional<Schema.DateTimeUtcFromString>; /** What a page before said the next is asked for with. */
1191
+ cursor: Schema.optional<Schema.String>;
1192
+ limit: Schema.optional<Schema.FiniteFromString>;
1193
+ }>>, never, never, Schema.toCodecJson<Schema.Struct<{
1194
+ readonly events: Schema.$Array<Schema.Struct<{
1195
+ readonly id: Schema.String;
1196
+ readonly at: Schema.DateTimeUtcFromString;
1197
+ readonly kind: Schema.Literals<readonly ["sign_in.succeeded", "sign_in.failed", "account.created", "account.changed", "account.disabled", "account.enabled", "account.removed", "account.setup_link_made", "account.second_factor_reset", "account.passkeys_removed", "token.created", "token.revoked", "grant.given", "grant.revoked", "registration_token.created", "registration_token.revoked", "workspace.created", "workspace.renamed", "workspace.deleted", "workspace.member_admitted", "workspace.member_dismissed", "session.created", "session.suspended", "session.resumed", "session.deleted", "snapshot.taken", "snapshot.replaced", "snapshot.deleted", "share.created", "share.revoked", "share.joined", "node.registered", "node.refused", "node.released", "node.silent", "provider.added", "provider.changed", "provider.enabled", "provider.disabled", "provider.removed"]>;
1198
+ readonly actor: Schema.Struct<{
1199
+ readonly kind: Schema.Literals<readonly ["account", "guest", "bootstrap", "anonymous", "system"]>;
1200
+ readonly id: Schema.NullOr<Schema.String>;
1201
+ readonly name: Schema.NullOr<Schema.String>;
1202
+ }>; /** What it was about; nothing where that is not known, as with whoever nobody knows. */
1203
+ readonly resource: Schema.NullOr<Schema.Struct<{
1204
+ readonly kind: Schema.Literals<readonly ["account", "token", "grant", "registration_token", "workspace", "session", "snapshot", "share", "node", "provider"]>;
1205
+ readonly id: Schema.String;
1206
+ readonly label: Schema.NullOr<Schema.String>;
1207
+ }>>; /** The workspace what it was about is of, where it is of one. */
1208
+ readonly workspaceId: Schema.NullOr<Schema.String>; /** Where the request that did it came from, where one did and that is known. */
1209
+ readonly address: Schema.NullOr<Schema.String>;
1210
+ readonly detail: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean, Schema.Null, Schema.$Array<Schema.String>]>>;
1211
+ }>>; /** The cursor of the events before these; none where these are the oldest. */
1212
+ readonly next: Schema.NullOr<Schema.String>;
1213
+ }>>, Schema.toCodecJson<typeof Forbidden>, never, never>, false>;
1214
+ declare class EventsGroup extends EventsGroup_base {}
1215
+ declare const GrantsGroup_base: HttpApiGroup.HttpApiGroup<"grants", HttpApiEndpoint.HttpApiEndpoint<"asking", "GET", "/oauth/request", never, Schema.toCodecStringTree<Schema.Struct<{
1216
+ clientId: Schema.NonEmptyString;
1217
+ redirectUri: Schema.NonEmptyString;
1218
+ }>>, never, never, Schema.toCodecJson<Schema.Struct<{
1219
+ readonly clientId: Schema.String;
1220
+ readonly clientName: Schema.String;
1221
+ }>>, Schema.toCodecJson<typeof OAuthClientNotFound | typeof RedirectRefused>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"list", "GET", "/oauth/grants", never, never, never, never, Schema.toCodecJson<Schema.$Array<Schema.Struct<{
1222
+ readonly id: Schema.String;
1223
+ readonly accountId: Schema.String;
1224
+ readonly clientId: Schema.String;
1225
+ readonly clientName: Schema.String;
1226
+ readonly scopes: Schema.$Array<Schema.Literals<readonly ["sessions:read", "sessions:write", "snapshots:read", "snapshots:write", "workspaces:read", "workspaces:write", "tokens:write", "events:read", "admin"]>>; /** The resources it is held to; none for a grant that reaches all its account does. */
1227
+ readonly resources: Schema.NullOr<Schema.Struct<{
1228
+ readonly workspaces: Schema.$Array<Schema.String>;
1229
+ readonly sessions: Schema.$Array<Schema.String>;
1230
+ readonly snapshots: Schema.$Array<Schema.String>;
1231
+ }>>;
1232
+ readonly createdAt: Schema.DateTimeUtcFromString;
1233
+ }>>>, Schema.toCodecJson<typeof Forbidden>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"approve", "POST", "/oauth/grants", never, never, Schema.toCodecJson<Schema.Struct<{
1234
+ /** What the app sent to know its own request by; it is sent back as it came. */readonly state: Schema.optional<Schema.String>;
1235
+ readonly codeChallenge: Schema.NonEmptyString; /** What the app does: a grant is given for something, and does nothing else. */
1236
+ readonly scopes: Schema.NonEmptyArray<Schema.Literals<readonly ["sessions:read", "sessions:write", "snapshots:read", "snapshots:write", "workspaces:read", "workspaces:write", "tokens:write", "events:read", "admin"]>>; /** The resources it is held to; all that the account reaches, without. */
1237
+ readonly resources: Schema.optional<Schema.Struct<{
1238
+ readonly workspaces: Schema.$Array<Schema.String>;
1239
+ readonly sessions: Schema.$Array<Schema.String>;
1240
+ readonly snapshots: Schema.$Array<Schema.String>;
1241
+ }>>;
1242
+ readonly clientId: Schema.NonEmptyString;
1243
+ readonly redirectUri: Schema.NonEmptyString;
1244
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
1245
+ readonly redirectTo: Schema.String;
1246
+ }>>, Schema.toCodecJson<typeof Forbidden | typeof OAuthClientNotFound | typeof RedirectRefused>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"revoke", "DELETE", "/oauth/grants/:id", Schema.toCodecStringTree<Schema.Struct<{
1247
+ id: Schema.String;
1248
+ }>>, never, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof Forbidden | typeof GrantNotFound>, never, never>, false>;
1249
+ declare class GrantsGroup extends GrantsGroup_base {}
1250
+ declare const ProvidersGroup_base: HttpApiGroup.HttpApiGroup<"providers", HttpApiEndpoint.HttpApiEndpoint<"list", "GET", "/sign-in-providers", never, never, never, never, Schema.toCodecJson<Schema.Struct<{
1251
+ /** What a provider is told to send people back to, once its id is put after it. */readonly callbackBase: Schema.String;
1252
+ readonly providers: Schema.$Array<Schema.Struct<{
1253
+ readonly id: Schema.String;
1254
+ readonly name: Schema.String; /** Which provider's mark it is shown with; none said, for one the settings name. */
1255
+ readonly icon: Schema.NullOr<Schema.String>;
1256
+ readonly kind: Schema.Literals<readonly ["oidc", "oauth2"]>;
1257
+ /**
1258
+ * Its issuer, or its discovery document where that was given in place of it; nothing
1259
+ * for one that speaks OAuth 2.0 alone, which has `endpoints` in its place.
1260
+ */
1261
+ readonly issuer: Schema.String;
1262
+ readonly endpoints: Schema.NullOr<Schema.Struct<{
1263
+ readonly authorization: Schema.String;
1264
+ readonly token: Schema.String;
1265
+ readonly userInfo: Schema.String;
1266
+ readonly emails: Schema.NullOr<Schema.String>;
1267
+ }>>;
1268
+ readonly clientId: Schema.String;
1269
+ readonly secretSet: Schema.Boolean;
1270
+ readonly scopes: Schema.$Array<Schema.String>; /** Whether someone it vouches for, whom no admin made a person, is made one. */
1271
+ readonly provision: Schema.Boolean; /** The domains of the addresses people are made for so; any address where none is named. */
1272
+ readonly domains: Schema.$Array<Schema.String>; /** Whether people sign in through it now. */
1273
+ readonly enabled: Schema.Boolean; /** Kept here, where an admin changes it, or named by the settings, which alone change it. */
1274
+ readonly source: Schema.Literals<readonly ["stored", "configuration"]>; /** When it was added and last changed here; never, for one the settings name. */
1275
+ readonly createdAt: Schema.NullOr<Schema.DateTimeUtcFromString>;
1276
+ readonly updatedAt: Schema.NullOr<Schema.DateTimeUtcFromString>;
1277
+ }>>;
1278
+ }>>, Schema.toCodecJson<typeof Forbidden>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"create", "POST", "/sign-in-providers", never, never, Schema.toCodecJson<Schema.Struct<{
1279
+ readonly id: Schema.String;
1280
+ readonly name: Schema.NonEmptyString;
1281
+ readonly icon: Schema.optional<Schema.NullOr<Schema.String>>; /** OpenID Connect, without. It stays what it is said to be here. */
1282
+ readonly kind: Schema.optional<Schema.Literals<readonly ["oidc", "oauth2"]>>; /** Of one that speaks OpenID Connect, which has to have one. */
1283
+ readonly issuer: Schema.optional<Schema.NonEmptyString>; /** Of one that speaks OAuth 2.0 alone, which has to have them. */
1284
+ readonly endpoints: Schema.optional<Schema.Struct<{
1285
+ readonly authorization: Schema.NonEmptyString;
1286
+ readonly token: Schema.NonEmptyString;
1287
+ readonly userInfo: Schema.NonEmptyString; /** None, where it is left out or empty. */
1288
+ readonly emails: Schema.optional<Schema.NullOr<Schema.String>>;
1289
+ }>>;
1290
+ readonly clientId: Schema.NonEmptyString; /** Told here and never again. */
1291
+ readonly clientSecret: Schema.NonEmptyString; /** `openid email profile` without, and none for one that speaks OAuth 2.0 alone. */
1292
+ readonly scopes: Schema.optional<Schema.$Array<Schema.String>>;
1293
+ readonly provision: Schema.optional<Schema.Boolean>;
1294
+ readonly domains: Schema.optional<Schema.$Array<Schema.String>>; /** One that is not enabled is kept whether or not it is reached. */
1295
+ readonly enabled: Schema.optional<Schema.Boolean>;
1296
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
1297
+ readonly id: Schema.String;
1298
+ readonly name: Schema.String; /** Which provider's mark it is shown with; none said, for one the settings name. */
1299
+ readonly icon: Schema.NullOr<Schema.String>;
1300
+ readonly kind: Schema.Literals<readonly ["oidc", "oauth2"]>;
1301
+ /**
1302
+ * Its issuer, or its discovery document where that was given in place of it; nothing
1303
+ * for one that speaks OAuth 2.0 alone, which has `endpoints` in its place.
1304
+ */
1305
+ readonly issuer: Schema.String;
1306
+ readonly endpoints: Schema.NullOr<Schema.Struct<{
1307
+ readonly authorization: Schema.String;
1308
+ readonly token: Schema.String;
1309
+ readonly userInfo: Schema.String;
1310
+ readonly emails: Schema.NullOr<Schema.String>;
1311
+ }>>;
1312
+ readonly clientId: Schema.String;
1313
+ readonly secretSet: Schema.Boolean;
1314
+ readonly scopes: Schema.$Array<Schema.String>; /** Whether someone it vouches for, whom no admin made a person, is made one. */
1315
+ readonly provision: Schema.Boolean; /** The domains of the addresses people are made for so; any address where none is named. */
1316
+ readonly domains: Schema.$Array<Schema.String>; /** Whether people sign in through it now. */
1317
+ readonly enabled: Schema.Boolean; /** Kept here, where an admin changes it, or named by the settings, which alone change it. */
1318
+ readonly source: Schema.Literals<readonly ["stored", "configuration"]>; /** When it was added and last changed here; never, for one the settings name. */
1319
+ readonly createdAt: Schema.NullOr<Schema.DateTimeUtcFromString>;
1320
+ readonly updatedAt: Schema.NullOr<Schema.DateTimeUtcFromString>;
1321
+ }>>, Schema.toCodecJson<typeof Forbidden | typeof ProviderTaken | typeof ProviderInvalid>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"check", "POST", "/sign-in-providers/check", never, never, Schema.toCodecJson<Schema.Struct<{
1322
+ readonly issuer: Schema.optional<Schema.String>;
1323
+ readonly endpoints: Schema.optional<Schema.Struct<{
1324
+ readonly authorization: Schema.NonEmptyString;
1325
+ readonly token: Schema.NonEmptyString;
1326
+ readonly userInfo: Schema.NonEmptyString; /** None, where it is left out or empty. */
1327
+ readonly emails: Schema.optional<Schema.NullOr<Schema.String>>;
1328
+ }>>;
1329
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
1330
+ readonly ok: Schema.Boolean; /** What is wrong, each a sentence; nothing where it is reached as it should be. */
1331
+ readonly problems: Schema.$Array<Schema.String>; /** The scopes it says it gives, where it is reached and says any. */
1332
+ readonly scopes: Schema.$Array<Schema.String>;
1333
+ }>>, Schema.toCodecJson<typeof Forbidden>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"change", "PATCH", "/sign-in-providers/:id", Schema.toCodecStringTree<Schema.Struct<{
1334
+ id: Schema.String;
1335
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
1336
+ readonly name: Schema.optional<Schema.NonEmptyString>; /** Given as none, it is shown with no provider's mark from then on. */
1337
+ readonly icon: Schema.optional<Schema.NullOr<Schema.String>>;
1338
+ readonly issuer: Schema.optional<Schema.NonEmptyString>;
1339
+ readonly endpoints: Schema.optional<Schema.Struct<{
1340
+ readonly authorization: Schema.NonEmptyString;
1341
+ readonly token: Schema.NonEmptyString;
1342
+ readonly userInfo: Schema.NonEmptyString; /** None, where it is left out or empty. */
1343
+ readonly emails: Schema.optional<Schema.NullOr<Schema.String>>;
1344
+ }>>;
1345
+ readonly clientId: Schema.optional<Schema.NonEmptyString>; /** The secret it has stays where none is given, or an empty one. */
1346
+ readonly clientSecret: Schema.optional<Schema.String>;
1347
+ readonly scopes: Schema.optional<Schema.$Array<Schema.String>>;
1348
+ readonly provision: Schema.optional<Schema.Boolean>;
1349
+ readonly domains: Schema.optional<Schema.$Array<Schema.String>>;
1350
+ readonly enabled: Schema.optional<Schema.Boolean>;
1351
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
1352
+ readonly id: Schema.String;
1353
+ readonly name: Schema.String; /** Which provider's mark it is shown with; none said, for one the settings name. */
1354
+ readonly icon: Schema.NullOr<Schema.String>;
1355
+ readonly kind: Schema.Literals<readonly ["oidc", "oauth2"]>;
1356
+ /**
1357
+ * Its issuer, or its discovery document where that was given in place of it; nothing
1358
+ * for one that speaks OAuth 2.0 alone, which has `endpoints` in its place.
1359
+ */
1360
+ readonly issuer: Schema.String;
1361
+ readonly endpoints: Schema.NullOr<Schema.Struct<{
1362
+ readonly authorization: Schema.String;
1363
+ readonly token: Schema.String;
1364
+ readonly userInfo: Schema.String;
1365
+ readonly emails: Schema.NullOr<Schema.String>;
1366
+ }>>;
1367
+ readonly clientId: Schema.String;
1368
+ readonly secretSet: Schema.Boolean;
1369
+ readonly scopes: Schema.$Array<Schema.String>; /** Whether someone it vouches for, whom no admin made a person, is made one. */
1370
+ readonly provision: Schema.Boolean; /** The domains of the addresses people are made for so; any address where none is named. */
1371
+ readonly domains: Schema.$Array<Schema.String>; /** Whether people sign in through it now. */
1372
+ readonly enabled: Schema.Boolean; /** Kept here, where an admin changes it, or named by the settings, which alone change it. */
1373
+ readonly source: Schema.Literals<readonly ["stored", "configuration"]>; /** When it was added and last changed here; never, for one the settings name. */
1374
+ readonly createdAt: Schema.NullOr<Schema.DateTimeUtcFromString>;
1375
+ readonly updatedAt: Schema.NullOr<Schema.DateTimeUtcFromString>;
1376
+ }>>, Schema.toCodecJson<typeof Forbidden | typeof ProviderNotFound | typeof ProviderConfigured | typeof ProviderInvalid>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"remove", "DELETE", "/sign-in-providers/:id", Schema.toCodecStringTree<Schema.Struct<{
1377
+ id: Schema.String;
1378
+ }>>, never, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof Forbidden | typeof ProviderNotFound | typeof ProviderConfigured>, never, never>, false>;
1379
+ declare class ProvidersGroup extends ProvidersGroup_base {}
1380
+ declare const SignInGroup_base: HttpApiGroup.HttpApiGroup<"signIn", HttpApiEndpoint.HttpApiEndpoint<"providers", "GET", "/sign-in/providers", never, never, never, never, Schema.toCodecJson<Schema.$Array<Schema.Struct<{
1381
+ /** What it is known by in addresses. */readonly id: Schema.String;
1382
+ readonly name: Schema.String; /** Which provider's mark it is shown with, as whoever added it said; none said, without. */
1383
+ readonly icon: Schema.NullOr<Schema.String>;
1384
+ }>>>, never, never, never>, false>;
1385
+ declare class SignInGroup extends SignInGroup_base {}
1386
+ /** Whether this program serves: nothing of what it knows, and for anyone who asks. */
1387
+ declare const Health: Schema.Struct<{
1388
+ readonly status: Schema.Literal<"ok">;
1389
+ }>;
1390
+ declare const HealthGroup_base: HttpApiGroup.HttpApiGroup<"health", HttpApiEndpoint.HttpApiEndpoint<"check", "GET", "/health", never, never, never, never, Schema.toCodecJson<Schema.Struct<{
1391
+ readonly status: Schema.Literal<"ok">;
1392
+ }>>, never, never, never>, false>;
1393
+ declare class HealthGroup extends HealthGroup_base {}
1394
+ declare const Api_base: HttpApi.HttpApi<"control", HttpApiGroup.HttpApiGroup<"accounts", HttpApiEndpoint.HttpApiEndpoint<"current", "GET", "/api/control/account", never, never, never, never, Schema.toCodecJson<Schema.Struct<{
1395
+ /** What the caller is held to; none for one that does whatever its account does. */readonly scopes: Schema.NullOr<Schema.$Array<Schema.Literals<readonly ["sessions:read", "sessions:write", "snapshots:read", "snapshots:write", "workspaces:read", "workspaces:write", "tokens:write", "events:read", "admin"]>>>; /** The resources the caller is held to; none for one that reaches all its account does. */
1396
+ readonly resources: Schema.NullOr<Schema.Struct<{
1397
+ readonly workspaces: Schema.$Array<Schema.String>;
1398
+ readonly sessions: Schema.$Array<Schema.String>;
1399
+ readonly snapshots: Schema.$Array<Schema.String>;
1400
+ }>>;
1401
+ readonly id: Schema.String;
1402
+ readonly name: Schema.String;
1403
+ readonly admin: Schema.Boolean; /** A person, who signs in, or a service, which comes with API tokens alone. */
1404
+ readonly kind: Schema.Literals<readonly ["person", "service"]>; /** The address a person signs in with; none for a service. */
1405
+ readonly email: Schema.NullOr<Schema.String>;
1406
+ readonly createdAt: Schema.DateTimeUtcFromString; /** Since when it is disabled: nothing of it signs in or is taken as a caller. */
1407
+ readonly disabledAt: Schema.NullOr<Schema.DateTimeUtcFromString>;
1408
+ }>>, Schema.toCodecJson<typeof Forbidden>, Authorization, never> | HttpApiEndpoint.HttpApiEndpoint<"tokens", "GET", "/api/control/account/tokens", never, never, never, never, Schema.toCodecJson<Schema.$Array<Schema.Struct<{
1409
+ readonly id: Schema.String;
1410
+ readonly accountId: Schema.String;
1411
+ readonly name: Schema.String;
1412
+ readonly createdAt: Schema.DateTimeUtcFromString;
1413
+ readonly expiresAt: Schema.NullOr<Schema.DateTimeUtcFromString>;
1414
+ readonly revokedAt: Schema.NullOr<Schema.DateTimeUtcFromString>; /** What it is held to. */
1415
+ readonly scopes: Schema.$Array<Schema.Literals<readonly ["sessions:read", "sessions:write", "snapshots:read", "snapshots:write", "workspaces:read", "workspaces:write", "tokens:write", "events:read", "admin"]>>; /** The resources it is held to; none for a token that reaches all its account does. */
1416
+ readonly resources: Schema.NullOr<Schema.Struct<{
1417
+ readonly workspaces: Schema.$Array<Schema.String>;
1418
+ readonly sessions: Schema.$Array<Schema.String>;
1419
+ readonly snapshots: Schema.$Array<Schema.String>;
1420
+ }>>;
1421
+ }>>>, Schema.toCodecJson<typeof Forbidden>, Authorization, never> | HttpApiEndpoint.HttpApiEndpoint<"createOwnToken", "POST", "/api/control/account/tokens", never, never, Schema.toCodecJson<Schema.Struct<{
1422
+ readonly name: Schema.NonEmptyString;
1423
+ /** How many days it is good for; for as long as it is not taken back, without. */
1424
+ /** What it does: a token is made for something, and does nothing else. */
1425
+ readonly scopes: Schema.NonEmptyArray<Schema.Literals<readonly ["sessions:read", "sessions:write", "snapshots:read", "snapshots:write", "workspaces:read", "workspaces:write", "tokens:write", "events:read", "admin"]>>; /** The resources it is held to; all that its account reaches, without. */
1426
+ readonly resources: Schema.optional<Schema.Struct<{
1427
+ readonly workspaces: Schema.$Array<Schema.String>;
1428
+ readonly sessions: Schema.$Array<Schema.String>;
1429
+ readonly snapshots: Schema.$Array<Schema.String>;
1430
+ }>>;
1431
+ readonly expiresInDays: Schema.optional<Schema.Int>;
1432
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
1433
+ readonly token: Schema.String;
1434
+ readonly id: Schema.String;
1435
+ readonly accountId: Schema.String;
1436
+ readonly name: Schema.String;
1437
+ readonly createdAt: Schema.DateTimeUtcFromString;
1438
+ readonly expiresAt: Schema.NullOr<Schema.DateTimeUtcFromString>;
1439
+ readonly revokedAt: Schema.NullOr<Schema.DateTimeUtcFromString>; /** What it is held to. */
1440
+ readonly scopes: Schema.$Array<Schema.Literals<readonly ["sessions:read", "sessions:write", "snapshots:read", "snapshots:write", "workspaces:read", "workspaces:write", "tokens:write", "events:read", "admin"]>>; /** The resources it is held to; none for a token that reaches all its account does. */
1441
+ readonly resources: Schema.NullOr<Schema.Struct<{
1442
+ readonly workspaces: Schema.$Array<Schema.String>;
1443
+ readonly sessions: Schema.$Array<Schema.String>;
1444
+ readonly snapshots: Schema.$Array<Schema.String>;
1445
+ }>>;
1446
+ }>>, Schema.toCodecJson<typeof Forbidden>, Authorization, never> | HttpApiEndpoint.HttpApiEndpoint<"revokeToken", "DELETE", "/api/control/account/tokens/:id", Schema.toCodecStringTree<Schema.Struct<{
1447
+ id: Schema.String;
1448
+ }>>, never, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof Forbidden | typeof ApiTokenNotFound>, Authorization, never> | HttpApiEndpoint.HttpApiEndpoint<"list", "GET", "/api/control/accounts", never, never, never, never, Schema.toCodecJson<Schema.$Array<Schema.Struct<{
1449
+ readonly signIn: Schema.NullOr<Schema.Struct<{
1450
+ /** Whether they have a password: one they set, since nobody is given one. */readonly password: Schema.Boolean;
1451
+ readonly secondFactor: Schema.Boolean; /** How many passkeys they added. */
1452
+ readonly passkeys: Schema.Number; /** The providers they came through, by what each is called. */
1453
+ readonly providers: Schema.$Array<Schema.String>;
1454
+ }>>;
1455
+ readonly id: Schema.String;
1456
+ readonly name: Schema.String;
1457
+ readonly admin: Schema.Boolean; /** A person, who signs in, or a service, which comes with API tokens alone. */
1458
+ readonly kind: Schema.Literals<readonly ["person", "service"]>; /** The address a person signs in with; none for a service. */
1459
+ readonly email: Schema.NullOr<Schema.String>;
1460
+ readonly createdAt: Schema.DateTimeUtcFromString; /** Since when it is disabled: nothing of it signs in or is taken as a caller. */
1461
+ readonly disabledAt: Schema.NullOr<Schema.DateTimeUtcFromString>;
1462
+ }>>>, Schema.toCodecJson<typeof Forbidden>, Authorization, never> | HttpApiEndpoint.HttpApiEndpoint<"lookup", "GET", "/api/control/accounts/lookup", never, Schema.toCodecStringTree<Schema.Struct<{
1463
+ email: Schema.NonEmptyString;
1464
+ }>>, never, never, Schema.toCodecJson<Schema.Struct<{
1465
+ readonly id: Schema.String;
1466
+ readonly name: Schema.String;
1467
+ readonly email: Schema.String;
1468
+ }>>, Schema.toCodecJson<typeof Forbidden | typeof PersonNotFound>, Authorization, never> | HttpApiEndpoint.HttpApiEndpoint<"create", "POST", "/api/control/accounts", never, never, Schema.toCodecJson<Schema.Struct<{
1469
+ readonly name: Schema.NonEmptyString;
1470
+ readonly admin: Schema.optional<Schema.Boolean>;
1471
+ readonly kind: Schema.optional<Schema.Literals<readonly ["person", "service"]>>; /** For a person: the address they sign in with, once they set a password. */
1472
+ readonly email: Schema.optional<Schema.NonEmptyString>;
1473
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
1474
+ readonly id: Schema.String;
1475
+ readonly name: Schema.String;
1476
+ readonly admin: Schema.Boolean; /** A person, who signs in, or a service, which comes with API tokens alone. */
1477
+ readonly kind: Schema.Literals<readonly ["person", "service"]>; /** The address a person signs in with; none for a service. */
1478
+ readonly email: Schema.NullOr<Schema.String>;
1479
+ readonly createdAt: Schema.DateTimeUtcFromString; /** Since when it is disabled: nothing of it signs in or is taken as a caller. */
1480
+ readonly disabledAt: Schema.NullOr<Schema.DateTimeUtcFromString>;
1481
+ }>>, Schema.toCodecJson<typeof Forbidden | typeof EmailTaken | typeof AccountInvalid>, Authorization, never> | HttpApiEndpoint.HttpApiEndpoint<"get", "GET", "/api/control/accounts/:id", Schema.toCodecStringTree<Schema.Struct<{
1482
+ id: Schema.String;
1483
+ }>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
1484
+ readonly signIn: Schema.NullOr<Schema.Struct<{
1485
+ /** Whether they have a password: one they set, since nobody is given one. */readonly password: Schema.Boolean;
1486
+ readonly secondFactor: Schema.Boolean; /** How many passkeys they added. */
1487
+ readonly passkeys: Schema.Number; /** The providers they came through, by what each is called. */
1488
+ readonly providers: Schema.$Array<Schema.String>;
1489
+ }>>;
1490
+ readonly id: Schema.String;
1491
+ readonly name: Schema.String;
1492
+ readonly admin: Schema.Boolean; /** A person, who signs in, or a service, which comes with API tokens alone. */
1493
+ readonly kind: Schema.Literals<readonly ["person", "service"]>; /** The address a person signs in with; none for a service. */
1494
+ readonly email: Schema.NullOr<Schema.String>;
1495
+ readonly createdAt: Schema.DateTimeUtcFromString; /** Since when it is disabled: nothing of it signs in or is taken as a caller. */
1496
+ readonly disabledAt: Schema.NullOr<Schema.DateTimeUtcFromString>;
1497
+ }>>, Schema.toCodecJson<typeof Forbidden | typeof AccountNotFound>, Authorization, never> | HttpApiEndpoint.HttpApiEndpoint<"change", "PATCH", "/api/control/accounts/:id", Schema.toCodecStringTree<Schema.Struct<{
1498
+ id: Schema.String;
1499
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
1500
+ readonly name: Schema.optional<Schema.NonEmptyString>;
1501
+ readonly admin: Schema.optional<Schema.Boolean>;
1502
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
1503
+ readonly id: Schema.String;
1504
+ readonly name: Schema.String;
1505
+ readonly admin: Schema.Boolean; /** A person, who signs in, or a service, which comes with API tokens alone. */
1506
+ readonly kind: Schema.Literals<readonly ["person", "service"]>; /** The address a person signs in with; none for a service. */
1507
+ readonly email: Schema.NullOr<Schema.String>;
1508
+ readonly createdAt: Schema.DateTimeUtcFromString; /** Since when it is disabled: nothing of it signs in or is taken as a caller. */
1509
+ readonly disabledAt: Schema.NullOr<Schema.DateTimeUtcFromString>;
1510
+ }>>, Schema.toCodecJson<typeof Forbidden | typeof AccountNotFound | typeof AccountInUse>, Authorization, never> | HttpApiEndpoint.HttpApiEndpoint<"resetSecondFactor", "POST", "/api/control/accounts/:id/second-factor/reset", Schema.toCodecStringTree<Schema.Struct<{
1511
+ id: Schema.String;
1512
+ }>>, never, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof Forbidden | typeof AccountNotFound | typeof PersonNotFound>, Authorization, never> | HttpApiEndpoint.HttpApiEndpoint<"disable", "POST", "/api/control/accounts/:id/disable", Schema.toCodecStringTree<Schema.Struct<{
1513
+ id: Schema.String;
1514
+ }>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
1515
+ readonly id: Schema.String;
1516
+ readonly name: Schema.String;
1517
+ readonly admin: Schema.Boolean; /** A person, who signs in, or a service, which comes with API tokens alone. */
1518
+ readonly kind: Schema.Literals<readonly ["person", "service"]>; /** The address a person signs in with; none for a service. */
1519
+ readonly email: Schema.NullOr<Schema.String>;
1520
+ readonly createdAt: Schema.DateTimeUtcFromString; /** Since when it is disabled: nothing of it signs in or is taken as a caller. */
1521
+ readonly disabledAt: Schema.NullOr<Schema.DateTimeUtcFromString>;
1522
+ }>>, Schema.toCodecJson<typeof Forbidden | typeof AccountNotFound | typeof AccountInUse>, Authorization, never> | HttpApiEndpoint.HttpApiEndpoint<"enable", "POST", "/api/control/accounts/:id/enable", Schema.toCodecStringTree<Schema.Struct<{
1523
+ id: Schema.String;
1524
+ }>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
1525
+ readonly id: Schema.String;
1526
+ readonly name: Schema.String;
1527
+ readonly admin: Schema.Boolean; /** A person, who signs in, or a service, which comes with API tokens alone. */
1528
+ readonly kind: Schema.Literals<readonly ["person", "service"]>; /** The address a person signs in with; none for a service. */
1529
+ readonly email: Schema.NullOr<Schema.String>;
1530
+ readonly createdAt: Schema.DateTimeUtcFromString; /** Since when it is disabled: nothing of it signs in or is taken as a caller. */
1531
+ readonly disabledAt: Schema.NullOr<Schema.DateTimeUtcFromString>;
1532
+ }>>, Schema.toCodecJson<typeof Forbidden | typeof AccountNotFound>, Authorization, never> | HttpApiEndpoint.HttpApiEndpoint<"remove", "DELETE", "/api/control/accounts/:id", Schema.toCodecStringTree<Schema.Struct<{
1533
+ id: Schema.String;
1534
+ }>>, never, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof Forbidden | typeof AccountNotFound | typeof AccountInUse>, Authorization, never> | HttpApiEndpoint.HttpApiEndpoint<"removePasskeys", "POST", "/api/control/accounts/:id/passkeys/remove", Schema.toCodecStringTree<Schema.Struct<{
1535
+ id: Schema.String;
1536
+ }>>, never, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof Forbidden | typeof AccountNotFound | typeof PersonNotFound>, Authorization, never> | HttpApiEndpoint.HttpApiEndpoint<"createSetupToken", "POST", "/api/control/accounts/:id/setup-token", Schema.toCodecStringTree<Schema.Struct<{
1537
+ id: Schema.String;
1538
+ }>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
1539
+ readonly token: Schema.String;
1540
+ }>>, Schema.toCodecJson<typeof Forbidden | typeof AccountNotFound | typeof PersonNotFound>, Authorization, never> | HttpApiEndpoint.HttpApiEndpoint<"createToken", "POST", "/api/control/accounts/:id/tokens", Schema.toCodecStringTree<Schema.Struct<{
1541
+ id: Schema.String;
1542
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
1543
+ readonly name: Schema.NonEmptyString;
1544
+ /** How many days it is good for; for as long as it is not taken back, without. */
1545
+ /** What it does: a token is made for something, and does nothing else. */
1546
+ readonly scopes: Schema.NonEmptyArray<Schema.Literals<readonly ["sessions:read", "sessions:write", "snapshots:read", "snapshots:write", "workspaces:read", "workspaces:write", "tokens:write", "events:read", "admin"]>>; /** The resources it is held to; all that its account reaches, without. */
1547
+ readonly resources: Schema.optional<Schema.Struct<{
1548
+ readonly workspaces: Schema.$Array<Schema.String>;
1549
+ readonly sessions: Schema.$Array<Schema.String>;
1550
+ readonly snapshots: Schema.$Array<Schema.String>;
1551
+ }>>;
1552
+ readonly expiresInDays: Schema.optional<Schema.Int>;
1553
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
1554
+ readonly token: Schema.String;
1555
+ readonly id: Schema.String;
1556
+ readonly accountId: Schema.String;
1557
+ readonly name: Schema.String;
1558
+ readonly createdAt: Schema.DateTimeUtcFromString;
1559
+ readonly expiresAt: Schema.NullOr<Schema.DateTimeUtcFromString>;
1560
+ readonly revokedAt: Schema.NullOr<Schema.DateTimeUtcFromString>; /** What it is held to. */
1561
+ readonly scopes: Schema.$Array<Schema.Literals<readonly ["sessions:read", "sessions:write", "snapshots:read", "snapshots:write", "workspaces:read", "workspaces:write", "tokens:write", "events:read", "admin"]>>; /** The resources it is held to; none for a token that reaches all its account does. */
1562
+ readonly resources: Schema.NullOr<Schema.Struct<{
1563
+ readonly workspaces: Schema.$Array<Schema.String>;
1564
+ readonly sessions: Schema.$Array<Schema.String>;
1565
+ readonly snapshots: Schema.$Array<Schema.String>;
1566
+ }>>;
1567
+ }>>, Schema.toCodecJson<typeof Forbidden | typeof AccountNotFound>, Authorization, never> | HttpApiEndpoint.HttpApiEndpoint<"tokensOf", "GET", "/api/control/accounts/:id/tokens", Schema.toCodecStringTree<Schema.Struct<{
1568
+ id: Schema.String;
1569
+ }>>, never, never, never, Schema.toCodecJson<Schema.$Array<Schema.Struct<{
1570
+ readonly id: Schema.String;
1571
+ readonly accountId: Schema.String;
1572
+ readonly name: Schema.String;
1573
+ readonly createdAt: Schema.DateTimeUtcFromString;
1574
+ readonly expiresAt: Schema.NullOr<Schema.DateTimeUtcFromString>;
1575
+ readonly revokedAt: Schema.NullOr<Schema.DateTimeUtcFromString>; /** What it is held to. */
1576
+ readonly scopes: Schema.$Array<Schema.Literals<readonly ["sessions:read", "sessions:write", "snapshots:read", "snapshots:write", "workspaces:read", "workspaces:write", "tokens:write", "events:read", "admin"]>>; /** The resources it is held to; none for a token that reaches all its account does. */
1577
+ readonly resources: Schema.NullOr<Schema.Struct<{
1578
+ readonly workspaces: Schema.$Array<Schema.String>;
1579
+ readonly sessions: Schema.$Array<Schema.String>;
1580
+ readonly snapshots: Schema.$Array<Schema.String>;
1581
+ }>>;
1582
+ }>>>, Schema.toCodecJson<typeof Forbidden | typeof AccountNotFound>, Authorization, never> | HttpApiEndpoint.HttpApiEndpoint<"revokeTokenOf", "DELETE", "/api/control/accounts/:id/tokens/:tokenId", Schema.toCodecStringTree<Schema.Struct<{
1583
+ id: Schema.String;
1584
+ tokenId: Schema.String;
1585
+ }>>, never, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof Forbidden | typeof AccountNotFound | typeof ApiTokenNotFound>, Authorization, never>, false> | HttpApiGroup.HttpApiGroup<"events", HttpApiEndpoint.HttpApiEndpoint<"list", "GET", "/api/control/events", never, Schema.toCodecStringTree<Schema.Struct<{
1586
+ kind: Schema.optional<Schema.Literals<readonly ["sign_in.succeeded", "sign_in.failed", "account.created", "account.changed", "account.disabled", "account.enabled", "account.removed", "account.setup_link_made", "account.second_factor_reset", "account.passkeys_removed", "token.created", "token.revoked", "grant.given", "grant.revoked", "registration_token.created", "registration_token.revoked", "workspace.created", "workspace.renamed", "workspace.deleted", "workspace.member_admitted", "workspace.member_dismissed", "session.created", "session.suspended", "session.resumed", "session.deleted", "snapshot.taken", "snapshot.replaced", "snapshot.deleted", "share.created", "share.revoked", "share.joined", "node.registered", "node.refused", "node.released", "node.silent", "provider.added", "provider.changed", "provider.enabled", "provider.disabled", "provider.removed"]>>; /** An account's id, or a part of what the actor was called. */
1587
+ actor: Schema.optional<Schema.NonEmptyString>;
1588
+ resourceKind: Schema.optional<Schema.Literals<readonly ["account", "token", "grant", "registration_token", "workspace", "session", "snapshot", "share", "node", "provider"]>>;
1589
+ resourceId: Schema.optional<Schema.NonEmptyString>;
1590
+ workspaceId: Schema.optional<Schema.NonEmptyString>; /** Events from this moment on. */
1591
+ since: Schema.optional<Schema.DateTimeUtcFromString>; /** Events before this moment. */
1592
+ until: Schema.optional<Schema.DateTimeUtcFromString>; /** What a page before said the next is asked for with. */
1593
+ cursor: Schema.optional<Schema.String>;
1594
+ limit: Schema.optional<Schema.FiniteFromString>;
1595
+ }>>, never, never, Schema.toCodecJson<Schema.Struct<{
1596
+ readonly events: Schema.$Array<Schema.Struct<{
1597
+ readonly id: Schema.String;
1598
+ readonly at: Schema.DateTimeUtcFromString;
1599
+ readonly kind: Schema.Literals<readonly ["sign_in.succeeded", "sign_in.failed", "account.created", "account.changed", "account.disabled", "account.enabled", "account.removed", "account.setup_link_made", "account.second_factor_reset", "account.passkeys_removed", "token.created", "token.revoked", "grant.given", "grant.revoked", "registration_token.created", "registration_token.revoked", "workspace.created", "workspace.renamed", "workspace.deleted", "workspace.member_admitted", "workspace.member_dismissed", "session.created", "session.suspended", "session.resumed", "session.deleted", "snapshot.taken", "snapshot.replaced", "snapshot.deleted", "share.created", "share.revoked", "share.joined", "node.registered", "node.refused", "node.released", "node.silent", "provider.added", "provider.changed", "provider.enabled", "provider.disabled", "provider.removed"]>;
1600
+ readonly actor: Schema.Struct<{
1601
+ readonly kind: Schema.Literals<readonly ["account", "guest", "bootstrap", "anonymous", "system"]>;
1602
+ readonly id: Schema.NullOr<Schema.String>;
1603
+ readonly name: Schema.NullOr<Schema.String>;
1604
+ }>; /** What it was about; nothing where that is not known, as with whoever nobody knows. */
1605
+ readonly resource: Schema.NullOr<Schema.Struct<{
1606
+ readonly kind: Schema.Literals<readonly ["account", "token", "grant", "registration_token", "workspace", "session", "snapshot", "share", "node", "provider"]>;
1607
+ readonly id: Schema.String;
1608
+ readonly label: Schema.NullOr<Schema.String>;
1609
+ }>>; /** The workspace what it was about is of, where it is of one. */
1610
+ readonly workspaceId: Schema.NullOr<Schema.String>; /** Where the request that did it came from, where one did and that is known. */
1611
+ readonly address: Schema.NullOr<Schema.String>;
1612
+ readonly detail: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean, Schema.Null, Schema.$Array<Schema.String>]>>;
1613
+ }>>; /** The cursor of the events before these; none where these are the oldest. */
1614
+ readonly next: Schema.NullOr<Schema.String>;
1615
+ }>>, Schema.toCodecJson<typeof Forbidden>, Authorization, never>, false> | HttpApiGroup.HttpApiGroup<"grants", HttpApiEndpoint.HttpApiEndpoint<"asking", "GET", "/api/control/oauth/request", never, Schema.toCodecStringTree<Schema.Struct<{
1616
+ clientId: Schema.NonEmptyString;
1617
+ redirectUri: Schema.NonEmptyString;
1618
+ }>>, never, never, Schema.toCodecJson<Schema.Struct<{
1619
+ readonly clientId: Schema.String;
1620
+ readonly clientName: Schema.String;
1621
+ }>>, Schema.toCodecJson<typeof OAuthClientNotFound | typeof RedirectRefused>, Authorization, never> | HttpApiEndpoint.HttpApiEndpoint<"list", "GET", "/api/control/oauth/grants", never, never, never, never, Schema.toCodecJson<Schema.$Array<Schema.Struct<{
1622
+ readonly id: Schema.String;
1623
+ readonly accountId: Schema.String;
1624
+ readonly clientId: Schema.String;
1625
+ readonly clientName: Schema.String;
1626
+ readonly scopes: Schema.$Array<Schema.Literals<readonly ["sessions:read", "sessions:write", "snapshots:read", "snapshots:write", "workspaces:read", "workspaces:write", "tokens:write", "events:read", "admin"]>>; /** The resources it is held to; none for a grant that reaches all its account does. */
1627
+ readonly resources: Schema.NullOr<Schema.Struct<{
1628
+ readonly workspaces: Schema.$Array<Schema.String>;
1629
+ readonly sessions: Schema.$Array<Schema.String>;
1630
+ readonly snapshots: Schema.$Array<Schema.String>;
1631
+ }>>;
1632
+ readonly createdAt: Schema.DateTimeUtcFromString;
1633
+ }>>>, Schema.toCodecJson<typeof Forbidden>, Authorization, never> | HttpApiEndpoint.HttpApiEndpoint<"approve", "POST", "/api/control/oauth/grants", never, never, Schema.toCodecJson<Schema.Struct<{
1634
+ /** What the app sent to know its own request by; it is sent back as it came. */readonly state: Schema.optional<Schema.String>;
1635
+ readonly codeChallenge: Schema.NonEmptyString; /** What the app does: a grant is given for something, and does nothing else. */
1636
+ readonly scopes: Schema.NonEmptyArray<Schema.Literals<readonly ["sessions:read", "sessions:write", "snapshots:read", "snapshots:write", "workspaces:read", "workspaces:write", "tokens:write", "events:read", "admin"]>>; /** The resources it is held to; all that the account reaches, without. */
1637
+ readonly resources: Schema.optional<Schema.Struct<{
1638
+ readonly workspaces: Schema.$Array<Schema.String>;
1639
+ readonly sessions: Schema.$Array<Schema.String>;
1640
+ readonly snapshots: Schema.$Array<Schema.String>;
1641
+ }>>;
1642
+ readonly clientId: Schema.NonEmptyString;
1643
+ readonly redirectUri: Schema.NonEmptyString;
1644
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
1645
+ readonly redirectTo: Schema.String;
1646
+ }>>, Schema.toCodecJson<typeof Forbidden | typeof OAuthClientNotFound | typeof RedirectRefused>, Authorization, never> | HttpApiEndpoint.HttpApiEndpoint<"revoke", "DELETE", "/api/control/oauth/grants/:id", Schema.toCodecStringTree<Schema.Struct<{
1647
+ id: Schema.String;
1648
+ }>>, never, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof Forbidden | typeof GrantNotFound>, Authorization, never>, false> | HttpApiGroup.HttpApiGroup<"nodes", HttpApiEndpoint.HttpApiEndpoint<"list", "GET", "/api/control/nodes", never, never, never, never, Schema.toCodecJson<Schema.$Array<Schema.Struct<{
1649
+ readonly id: Schema.String;
1650
+ readonly name: Schema.String;
1651
+ readonly internalUrl: Schema.String;
1652
+ readonly balancerUrl: Schema.NullOr<Schema.String>;
1653
+ readonly publicUrl: Schema.NullOr<Schema.String>;
1654
+ readonly offers: Schema.NullOr<Schema.Struct<{
1655
+ readonly version: Schema.String;
1656
+ readonly features: Schema.$Array<Schema.String>;
1657
+ readonly network: Schema.Struct<{
1658
+ readonly tcp: Schema.String;
1659
+ readonly udp: Schema.String;
1660
+ }>;
1661
+ readonly limits: Schema.Struct<{
1662
+ readonly memoryBytes: Schema.optional<Schema.Number>;
1663
+ readonly swapBytes: Schema.optional<Schema.Number>;
1664
+ readonly cpus: Schema.optional<Schema.Number>;
1665
+ readonly tasks: Schema.optional<Schema.Number>;
1666
+ readonly suspendIdleAfterSeconds: Schema.optional<Schema.Number>;
1667
+ }>;
1668
+ readonly holdsResources: Schema.Boolean;
1669
+ readonly sharesSnapshots: Schema.Boolean;
1670
+ }>>;
1671
+ readonly registeredAt: Schema.DateTimeUtcFromString;
1672
+ readonly lastSeenAt: Schema.DateTimeUtcFromString; /** Whether its last keepalive is recent enough for it to be used. */
1673
+ readonly alive: Schema.Boolean;
1674
+ }>>>, Schema.toCodecJson<typeof Forbidden>, Authorization, never> | HttpApiEndpoint.HttpApiEndpoint<"release", "POST", "/api/control/nodes/:id/release", Schema.toCodecStringTree<Schema.Struct<{
1675
+ id: Schema.String;
1676
+ }>>, never, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof Forbidden | typeof NodeNotFound>, Authorization, never> | HttpApiEndpoint.HttpApiEndpoint<"registrationTokens", "GET", "/api/control/registration-tokens", never, never, never, never, Schema.toCodecJson<Schema.$Array<Schema.Struct<{
1677
+ readonly id: Schema.String;
1678
+ readonly name: Schema.String;
1679
+ readonly createdAt: Schema.DateTimeUtcFromString; /** Since when it registers no new node; the nodes that registered with it stay. */
1680
+ readonly revokedAt: Schema.NullOr<Schema.DateTimeUtcFromString>;
1681
+ }>>>, Schema.toCodecJson<typeof Forbidden>, Authorization, never> | HttpApiEndpoint.HttpApiEndpoint<"createRegistrationToken", "POST", "/api/control/registration-tokens", never, never, Schema.toCodecJson<Schema.Struct<{
1682
+ readonly name: Schema.NonEmptyString;
1683
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
1684
+ readonly token: Schema.String;
1685
+ readonly id: Schema.String;
1686
+ readonly name: Schema.String;
1687
+ readonly createdAt: Schema.DateTimeUtcFromString; /** Since when it registers no new node; the nodes that registered with it stay. */
1688
+ readonly revokedAt: Schema.NullOr<Schema.DateTimeUtcFromString>;
1689
+ }>>, Schema.toCodecJson<typeof Forbidden>, Authorization, never> | HttpApiEndpoint.HttpApiEndpoint<"revokeRegistrationToken", "DELETE", "/api/control/registration-tokens/:id", Schema.toCodecStringTree<Schema.Struct<{
1690
+ id: Schema.String;
1691
+ }>>, never, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof Forbidden | typeof RegistrationTokenNotFound>, Authorization, never>, false> | HttpApiGroup.HttpApiGroup<"providers", HttpApiEndpoint.HttpApiEndpoint<"list", "GET", "/api/control/sign-in-providers", never, never, never, never, Schema.toCodecJson<Schema.Struct<{
1692
+ /** What a provider is told to send people back to, once its id is put after it. */readonly callbackBase: Schema.String;
1693
+ readonly providers: Schema.$Array<Schema.Struct<{
1694
+ readonly id: Schema.String;
1695
+ readonly name: Schema.String; /** Which provider's mark it is shown with; none said, for one the settings name. */
1696
+ readonly icon: Schema.NullOr<Schema.String>;
1697
+ readonly kind: Schema.Literals<readonly ["oidc", "oauth2"]>;
1698
+ /**
1699
+ * Its issuer, or its discovery document where that was given in place of it; nothing
1700
+ * for one that speaks OAuth 2.0 alone, which has `endpoints` in its place.
1701
+ */
1702
+ readonly issuer: Schema.String;
1703
+ readonly endpoints: Schema.NullOr<Schema.Struct<{
1704
+ readonly authorization: Schema.String;
1705
+ readonly token: Schema.String;
1706
+ readonly userInfo: Schema.String;
1707
+ readonly emails: Schema.NullOr<Schema.String>;
1708
+ }>>;
1709
+ readonly clientId: Schema.String;
1710
+ readonly secretSet: Schema.Boolean;
1711
+ readonly scopes: Schema.$Array<Schema.String>; /** Whether someone it vouches for, whom no admin made a person, is made one. */
1712
+ readonly provision: Schema.Boolean; /** The domains of the addresses people are made for so; any address where none is named. */
1713
+ readonly domains: Schema.$Array<Schema.String>; /** Whether people sign in through it now. */
1714
+ readonly enabled: Schema.Boolean; /** Kept here, where an admin changes it, or named by the settings, which alone change it. */
1715
+ readonly source: Schema.Literals<readonly ["stored", "configuration"]>; /** When it was added and last changed here; never, for one the settings name. */
1716
+ readonly createdAt: Schema.NullOr<Schema.DateTimeUtcFromString>;
1717
+ readonly updatedAt: Schema.NullOr<Schema.DateTimeUtcFromString>;
1718
+ }>>;
1719
+ }>>, Schema.toCodecJson<typeof Forbidden>, Authorization, never> | HttpApiEndpoint.HttpApiEndpoint<"create", "POST", "/api/control/sign-in-providers", never, never, Schema.toCodecJson<Schema.Struct<{
1720
+ readonly id: Schema.String;
1721
+ readonly name: Schema.NonEmptyString;
1722
+ readonly icon: Schema.optional<Schema.NullOr<Schema.String>>; /** OpenID Connect, without. It stays what it is said to be here. */
1723
+ readonly kind: Schema.optional<Schema.Literals<readonly ["oidc", "oauth2"]>>; /** Of one that speaks OpenID Connect, which has to have one. */
1724
+ readonly issuer: Schema.optional<Schema.NonEmptyString>; /** Of one that speaks OAuth 2.0 alone, which has to have them. */
1725
+ readonly endpoints: Schema.optional<Schema.Struct<{
1726
+ readonly authorization: Schema.NonEmptyString;
1727
+ readonly token: Schema.NonEmptyString;
1728
+ readonly userInfo: Schema.NonEmptyString; /** None, where it is left out or empty. */
1729
+ readonly emails: Schema.optional<Schema.NullOr<Schema.String>>;
1730
+ }>>;
1731
+ readonly clientId: Schema.NonEmptyString; /** Told here and never again. */
1732
+ readonly clientSecret: Schema.NonEmptyString; /** `openid email profile` without, and none for one that speaks OAuth 2.0 alone. */
1733
+ readonly scopes: Schema.optional<Schema.$Array<Schema.String>>;
1734
+ readonly provision: Schema.optional<Schema.Boolean>;
1735
+ readonly domains: Schema.optional<Schema.$Array<Schema.String>>; /** One that is not enabled is kept whether or not it is reached. */
1736
+ readonly enabled: Schema.optional<Schema.Boolean>;
1737
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
1738
+ readonly id: Schema.String;
1739
+ readonly name: Schema.String; /** Which provider's mark it is shown with; none said, for one the settings name. */
1740
+ readonly icon: Schema.NullOr<Schema.String>;
1741
+ readonly kind: Schema.Literals<readonly ["oidc", "oauth2"]>;
1742
+ /**
1743
+ * Its issuer, or its discovery document where that was given in place of it; nothing
1744
+ * for one that speaks OAuth 2.0 alone, which has `endpoints` in its place.
1745
+ */
1746
+ readonly issuer: Schema.String;
1747
+ readonly endpoints: Schema.NullOr<Schema.Struct<{
1748
+ readonly authorization: Schema.String;
1749
+ readonly token: Schema.String;
1750
+ readonly userInfo: Schema.String;
1751
+ readonly emails: Schema.NullOr<Schema.String>;
1752
+ }>>;
1753
+ readonly clientId: Schema.String;
1754
+ readonly secretSet: Schema.Boolean;
1755
+ readonly scopes: Schema.$Array<Schema.String>; /** Whether someone it vouches for, whom no admin made a person, is made one. */
1756
+ readonly provision: Schema.Boolean; /** The domains of the addresses people are made for so; any address where none is named. */
1757
+ readonly domains: Schema.$Array<Schema.String>; /** Whether people sign in through it now. */
1758
+ readonly enabled: Schema.Boolean; /** Kept here, where an admin changes it, or named by the settings, which alone change it. */
1759
+ readonly source: Schema.Literals<readonly ["stored", "configuration"]>; /** When it was added and last changed here; never, for one the settings name. */
1760
+ readonly createdAt: Schema.NullOr<Schema.DateTimeUtcFromString>;
1761
+ readonly updatedAt: Schema.NullOr<Schema.DateTimeUtcFromString>;
1762
+ }>>, Schema.toCodecJson<typeof Forbidden | typeof ProviderTaken | typeof ProviderInvalid>, Authorization, never> | HttpApiEndpoint.HttpApiEndpoint<"check", "POST", "/api/control/sign-in-providers/check", never, never, Schema.toCodecJson<Schema.Struct<{
1763
+ readonly issuer: Schema.optional<Schema.String>;
1764
+ readonly endpoints: Schema.optional<Schema.Struct<{
1765
+ readonly authorization: Schema.NonEmptyString;
1766
+ readonly token: Schema.NonEmptyString;
1767
+ readonly userInfo: Schema.NonEmptyString; /** None, where it is left out or empty. */
1768
+ readonly emails: Schema.optional<Schema.NullOr<Schema.String>>;
1769
+ }>>;
1770
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
1771
+ readonly ok: Schema.Boolean; /** What is wrong, each a sentence; nothing where it is reached as it should be. */
1772
+ readonly problems: Schema.$Array<Schema.String>; /** The scopes it says it gives, where it is reached and says any. */
1773
+ readonly scopes: Schema.$Array<Schema.String>;
1774
+ }>>, Schema.toCodecJson<typeof Forbidden>, Authorization, never> | HttpApiEndpoint.HttpApiEndpoint<"change", "PATCH", "/api/control/sign-in-providers/:id", Schema.toCodecStringTree<Schema.Struct<{
1775
+ id: Schema.String;
1776
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
1777
+ readonly name: Schema.optional<Schema.NonEmptyString>; /** Given as none, it is shown with no provider's mark from then on. */
1778
+ readonly icon: Schema.optional<Schema.NullOr<Schema.String>>;
1779
+ readonly issuer: Schema.optional<Schema.NonEmptyString>;
1780
+ readonly endpoints: Schema.optional<Schema.Struct<{
1781
+ readonly authorization: Schema.NonEmptyString;
1782
+ readonly token: Schema.NonEmptyString;
1783
+ readonly userInfo: Schema.NonEmptyString; /** None, where it is left out or empty. */
1784
+ readonly emails: Schema.optional<Schema.NullOr<Schema.String>>;
1785
+ }>>;
1786
+ readonly clientId: Schema.optional<Schema.NonEmptyString>; /** The secret it has stays where none is given, or an empty one. */
1787
+ readonly clientSecret: Schema.optional<Schema.String>;
1788
+ readonly scopes: Schema.optional<Schema.$Array<Schema.String>>;
1789
+ readonly provision: Schema.optional<Schema.Boolean>;
1790
+ readonly domains: Schema.optional<Schema.$Array<Schema.String>>;
1791
+ readonly enabled: Schema.optional<Schema.Boolean>;
1792
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
1793
+ readonly id: Schema.String;
1794
+ readonly name: Schema.String; /** Which provider's mark it is shown with; none said, for one the settings name. */
1795
+ readonly icon: Schema.NullOr<Schema.String>;
1796
+ readonly kind: Schema.Literals<readonly ["oidc", "oauth2"]>;
1797
+ /**
1798
+ * Its issuer, or its discovery document where that was given in place of it; nothing
1799
+ * for one that speaks OAuth 2.0 alone, which has `endpoints` in its place.
1800
+ */
1801
+ readonly issuer: Schema.String;
1802
+ readonly endpoints: Schema.NullOr<Schema.Struct<{
1803
+ readonly authorization: Schema.String;
1804
+ readonly token: Schema.String;
1805
+ readonly userInfo: Schema.String;
1806
+ readonly emails: Schema.NullOr<Schema.String>;
1807
+ }>>;
1808
+ readonly clientId: Schema.String;
1809
+ readonly secretSet: Schema.Boolean;
1810
+ readonly scopes: Schema.$Array<Schema.String>; /** Whether someone it vouches for, whom no admin made a person, is made one. */
1811
+ readonly provision: Schema.Boolean; /** The domains of the addresses people are made for so; any address where none is named. */
1812
+ readonly domains: Schema.$Array<Schema.String>; /** Whether people sign in through it now. */
1813
+ readonly enabled: Schema.Boolean; /** Kept here, where an admin changes it, or named by the settings, which alone change it. */
1814
+ readonly source: Schema.Literals<readonly ["stored", "configuration"]>; /** When it was added and last changed here; never, for one the settings name. */
1815
+ readonly createdAt: Schema.NullOr<Schema.DateTimeUtcFromString>;
1816
+ readonly updatedAt: Schema.NullOr<Schema.DateTimeUtcFromString>;
1817
+ }>>, Schema.toCodecJson<typeof Forbidden | typeof ProviderNotFound | typeof ProviderConfigured | typeof ProviderInvalid>, Authorization, never> | HttpApiEndpoint.HttpApiEndpoint<"remove", "DELETE", "/api/control/sign-in-providers/:id", Schema.toCodecStringTree<Schema.Struct<{
1818
+ id: Schema.String;
1819
+ }>>, never, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof Forbidden | typeof ProviderNotFound | typeof ProviderConfigured>, Authorization, never>, false> | HttpApiGroup.HttpApiGroup<"sessions", HttpApiEndpoint.HttpApiEndpoint<"list", "GET", "/api/control/sessions", never, Schema.toCodecStringTree<Schema.Struct<{
1820
+ workspaceId: Schema.optional<Schema.NonEmptyString>;
1821
+ state: Schema.optional<Schema.Literals<readonly ["suspended", "starting", "running", "suspending", "failed", "gone"]>>;
1822
+ label: Schema.optional<Schema.NonEmptyString>;
1823
+ tag: Schema.optional<Schema.NonEmptyString>;
1824
+ }>>, never, never, Schema.toCodecJson<Schema.$Array<Schema.Struct<{
1825
+ readonly id: Schema.String;
1826
+ /**
1827
+ * The account that made it. A session of no workspace is that account's own; one of a
1828
+ * workspace is the workspace's, and names none where nobody is known to have made it
1829
+ * or the account was removed since.
1830
+ */
1831
+ readonly accountId: Schema.NullOr<Schema.String>;
1832
+ readonly workspaceId: Schema.NullOr<Schema.String>;
1833
+ readonly nodeId: Schema.NullOr<Schema.String>; /** What the node it is on is called; none for a session on no node. */
1834
+ readonly nodeName: Schema.NullOr<Schema.String>;
1835
+ readonly desiredState: Schema.Literals<readonly ["running", "suspended"]>;
1836
+ readonly observedState: Schema.Literals<readonly ["suspended", "starting", "running", "suspending", "failed", "gone"]>;
1837
+ readonly failure: Schema.NullOr<Schema.String>;
1838
+ readonly unreachableSince: Schema.NullOr<Schema.DateTimeUtcFromString>;
1839
+ readonly snapshotId: Schema.NullOr<Schema.String>;
1840
+ readonly label: Schema.NullOr<Schema.String>;
1841
+ readonly tags: Schema.$Record<Schema.String, Schema.String>;
1842
+ readonly createdAt: Schema.DateTimeUtcFromString;
1843
+ readonly observedAt: Schema.DateTimeUtcFromString;
1844
+ /**
1845
+ * Where the session is reached through a proxy before the nodes, below the proxy's own
1846
+ * address; none for a session on no node. It changes when the session moves.
1847
+ */
1848
+ readonly path: Schema.NullOr<Schema.String>;
1849
+ }>>>, Schema.toCodecJson<typeof Forbidden>, Authorization, never> | HttpApiEndpoint.HttpApiEndpoint<"create", "POST", "/api/control/sessions", never, never, Schema.toCodecJson<Schema.Struct<{
1850
+ readonly suspended: Schema.optional<Schema.Boolean>;
1851
+ readonly snapshotId: Schema.optional<Schema.NonEmptyString>;
1852
+ readonly label: Schema.optional<Schema.NonEmptyString>; /** The workspace the session is of; the caller's own account's without. */
1853
+ readonly workspaceId: Schema.optional<Schema.NonEmptyString>;
1854
+ readonly tags: Schema.optional<Schema.$Record<Schema.NonEmptyString, Schema.String>>;
1855
+ readonly proxy: Schema.optional<Schema.Struct<{
1856
+ readonly upstreams: Schema.optional<Schema.$Record<Schema.NonEmptyString, Schema.Struct<{
1857
+ readonly url: Schema.NonEmptyString;
1858
+ readonly auth: Schema.optional<Schema.String>;
1859
+ }>>>;
1860
+ readonly rules: Schema.$Array<Schema.Struct<{
1861
+ readonly match: Schema.NonEmptyString;
1862
+ readonly via: Schema.NonEmptyString;
1863
+ readonly to: Schema.optional<Schema.String>;
1864
+ readonly tls: Schema.optional<Schema.Boolean>;
1865
+ }>>;
1866
+ }>>;
1867
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
1868
+ readonly id: Schema.String;
1869
+ /**
1870
+ * The account that made it. A session of no workspace is that account's own; one of a
1871
+ * workspace is the workspace's, and names none where nobody is known to have made it
1872
+ * or the account was removed since.
1873
+ */
1874
+ readonly accountId: Schema.NullOr<Schema.String>;
1875
+ readonly workspaceId: Schema.NullOr<Schema.String>;
1876
+ readonly nodeId: Schema.NullOr<Schema.String>; /** What the node it is on is called; none for a session on no node. */
1877
+ readonly nodeName: Schema.NullOr<Schema.String>;
1878
+ readonly desiredState: Schema.Literals<readonly ["running", "suspended"]>;
1879
+ readonly observedState: Schema.Literals<readonly ["suspended", "starting", "running", "suspending", "failed", "gone"]>;
1880
+ readonly failure: Schema.NullOr<Schema.String>;
1881
+ readonly unreachableSince: Schema.NullOr<Schema.DateTimeUtcFromString>;
1882
+ readonly snapshotId: Schema.NullOr<Schema.String>;
1883
+ readonly label: Schema.NullOr<Schema.String>;
1884
+ readonly tags: Schema.$Record<Schema.String, Schema.String>;
1885
+ readonly createdAt: Schema.DateTimeUtcFromString;
1886
+ readonly observedAt: Schema.DateTimeUtcFromString;
1887
+ /**
1888
+ * Where the session is reached through a proxy before the nodes, below the proxy's own
1889
+ * address; none for a session on no node. It changes when the session moves.
1890
+ */
1891
+ readonly path: Schema.NullOr<Schema.String>;
1892
+ }>>, Schema.toCodecJson<typeof Forbidden | typeof NoNode | typeof NodeRefused | typeof SnapshotNotFound | typeof WorkspaceNotFound>, Authorization, never> | HttpApiEndpoint.HttpApiEndpoint<"get", "GET", "/api/control/sessions/:id", Schema.toCodecStringTree<Schema.Struct<{
1893
+ id: Schema.String;
1894
+ }>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
1895
+ readonly id: Schema.String;
1896
+ /**
1897
+ * The account that made it. A session of no workspace is that account's own; one of a
1898
+ * workspace is the workspace's, and names none where nobody is known to have made it
1899
+ * or the account was removed since.
1900
+ */
1901
+ readonly accountId: Schema.NullOr<Schema.String>;
1902
+ readonly workspaceId: Schema.NullOr<Schema.String>;
1903
+ readonly nodeId: Schema.NullOr<Schema.String>; /** What the node it is on is called; none for a session on no node. */
1904
+ readonly nodeName: Schema.NullOr<Schema.String>;
1905
+ readonly desiredState: Schema.Literals<readonly ["running", "suspended"]>;
1906
+ readonly observedState: Schema.Literals<readonly ["suspended", "starting", "running", "suspending", "failed", "gone"]>;
1907
+ readonly failure: Schema.NullOr<Schema.String>;
1908
+ readonly unreachableSince: Schema.NullOr<Schema.DateTimeUtcFromString>;
1909
+ readonly snapshotId: Schema.NullOr<Schema.String>;
1910
+ readonly label: Schema.NullOr<Schema.String>;
1911
+ readonly tags: Schema.$Record<Schema.String, Schema.String>;
1912
+ readonly createdAt: Schema.DateTimeUtcFromString;
1913
+ readonly observedAt: Schema.DateTimeUtcFromString;
1914
+ /**
1915
+ * Where the session is reached through a proxy before the nodes, below the proxy's own
1916
+ * address; none for a session on no node. It changes when the session moves.
1917
+ */
1918
+ readonly path: Schema.NullOr<Schema.String>;
1919
+ }>>, Schema.toCodecJson<typeof Forbidden | typeof SessionNotFound>, Authorization, never> | HttpApiEndpoint.HttpApiEndpoint<"describe", "PATCH", "/api/control/sessions/:id", Schema.toCodecStringTree<Schema.Struct<{
1920
+ id: Schema.String;
1921
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
1922
+ readonly label: Schema.optional<Schema.NullOr<Schema.NonEmptyString>>;
1923
+ readonly tags: Schema.optional<Schema.$Record<Schema.NonEmptyString, Schema.String>>;
1924
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
1925
+ readonly id: Schema.String;
1926
+ /**
1927
+ * The account that made it. A session of no workspace is that account's own; one of a
1928
+ * workspace is the workspace's, and names none where nobody is known to have made it
1929
+ * or the account was removed since.
1930
+ */
1931
+ readonly accountId: Schema.NullOr<Schema.String>;
1932
+ readonly workspaceId: Schema.NullOr<Schema.String>;
1933
+ readonly nodeId: Schema.NullOr<Schema.String>; /** What the node it is on is called; none for a session on no node. */
1934
+ readonly nodeName: Schema.NullOr<Schema.String>;
1935
+ readonly desiredState: Schema.Literals<readonly ["running", "suspended"]>;
1936
+ readonly observedState: Schema.Literals<readonly ["suspended", "starting", "running", "suspending", "failed", "gone"]>;
1937
+ readonly failure: Schema.NullOr<Schema.String>;
1938
+ readonly unreachableSince: Schema.NullOr<Schema.DateTimeUtcFromString>;
1939
+ readonly snapshotId: Schema.NullOr<Schema.String>;
1940
+ readonly label: Schema.NullOr<Schema.String>;
1941
+ readonly tags: Schema.$Record<Schema.String, Schema.String>;
1942
+ readonly createdAt: Schema.DateTimeUtcFromString;
1943
+ readonly observedAt: Schema.DateTimeUtcFromString;
1944
+ /**
1945
+ * Where the session is reached through a proxy before the nodes, below the proxy's own
1946
+ * address; none for a session on no node. It changes when the session moves.
1947
+ */
1948
+ readonly path: Schema.NullOr<Schema.String>;
1949
+ }>>, Schema.toCodecJson<typeof Forbidden | typeof SessionNotFound>, Authorization, never> | HttpApiEndpoint.HttpApiEndpoint<"proxy", "GET", "/api/control/sessions/:id/proxy", Schema.toCodecStringTree<Schema.Struct<{
1950
+ id: Schema.String;
1951
+ }>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
1952
+ readonly proxy: Schema.NullOr<Schema.Struct<{
1953
+ readonly upstreams: Schema.optional<Schema.$Record<Schema.NonEmptyString, Schema.Struct<{
1954
+ readonly url: Schema.NonEmptyString;
1955
+ readonly auth: Schema.optional<Schema.String>;
1956
+ }>>>;
1957
+ readonly rules: Schema.$Array<Schema.Struct<{
1958
+ readonly match: Schema.NonEmptyString;
1959
+ readonly via: Schema.NonEmptyString;
1960
+ readonly to: Schema.optional<Schema.String>;
1961
+ readonly tls: Schema.optional<Schema.Boolean>;
1962
+ }>>;
1963
+ }>>;
1964
+ }>>, Schema.toCodecJson<typeof Forbidden | typeof SessionNotFound>, Authorization, never> | HttpApiEndpoint.HttpApiEndpoint<"setProxy", "PUT", "/api/control/sessions/:id/proxy", Schema.toCodecStringTree<Schema.Struct<{
1965
+ id: Schema.String;
1966
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
1967
+ readonly proxy: Schema.NullOr<Schema.Struct<{
1968
+ readonly upstreams: Schema.optional<Schema.$Record<Schema.NonEmptyString, Schema.Struct<{
1969
+ readonly url: Schema.NonEmptyString;
1970
+ readonly auth: Schema.optional<Schema.String>;
1971
+ }>>>;
1972
+ readonly rules: Schema.$Array<Schema.Struct<{
1973
+ readonly match: Schema.NonEmptyString;
1974
+ readonly via: Schema.NonEmptyString;
1975
+ readonly to: Schema.optional<Schema.String>;
1976
+ readonly tls: Schema.optional<Schema.Boolean>;
1977
+ }>>;
1978
+ }>>;
1979
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
1980
+ readonly proxy: Schema.NullOr<Schema.Struct<{
1981
+ readonly upstreams: Schema.optional<Schema.$Record<Schema.NonEmptyString, Schema.Struct<{
1982
+ readonly url: Schema.NonEmptyString;
1983
+ readonly auth: Schema.optional<Schema.String>;
1984
+ }>>>;
1985
+ readonly rules: Schema.$Array<Schema.Struct<{
1986
+ readonly match: Schema.NonEmptyString;
1987
+ readonly via: Schema.NonEmptyString;
1988
+ readonly to: Schema.optional<Schema.String>;
1989
+ readonly tls: Schema.optional<Schema.Boolean>;
1990
+ }>>;
1991
+ }>>;
1992
+ }>>, Schema.toCodecJson<typeof Forbidden | typeof SessionNotFound | typeof SessionHasNoNode | typeof NodeUnreachable | typeof NodeRefused | typeof NodeNotFound>, Authorization, never> | HttpApiEndpoint.HttpApiEndpoint<"suspend", "POST", "/api/control/sessions/:id/suspend", Schema.toCodecStringTree<Schema.Struct<{
1993
+ id: Schema.String;
1994
+ }>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
1995
+ readonly id: Schema.String;
1996
+ /**
1997
+ * The account that made it. A session of no workspace is that account's own; one of a
1998
+ * workspace is the workspace's, and names none where nobody is known to have made it
1999
+ * or the account was removed since.
2000
+ */
2001
+ readonly accountId: Schema.NullOr<Schema.String>;
2002
+ readonly workspaceId: Schema.NullOr<Schema.String>;
2003
+ readonly nodeId: Schema.NullOr<Schema.String>; /** What the node it is on is called; none for a session on no node. */
2004
+ readonly nodeName: Schema.NullOr<Schema.String>;
2005
+ readonly desiredState: Schema.Literals<readonly ["running", "suspended"]>;
2006
+ readonly observedState: Schema.Literals<readonly ["suspended", "starting", "running", "suspending", "failed", "gone"]>;
2007
+ readonly failure: Schema.NullOr<Schema.String>;
2008
+ readonly unreachableSince: Schema.NullOr<Schema.DateTimeUtcFromString>;
2009
+ readonly snapshotId: Schema.NullOr<Schema.String>;
2010
+ readonly label: Schema.NullOr<Schema.String>;
2011
+ readonly tags: Schema.$Record<Schema.String, Schema.String>;
2012
+ readonly createdAt: Schema.DateTimeUtcFromString;
2013
+ readonly observedAt: Schema.DateTimeUtcFromString;
2014
+ /**
2015
+ * Where the session is reached through a proxy before the nodes, below the proxy's own
2016
+ * address; none for a session on no node. It changes when the session moves.
2017
+ */
2018
+ readonly path: Schema.NullOr<Schema.String>;
2019
+ }>>, Schema.toCodecJson<typeof Forbidden | typeof SessionNotFound | typeof SessionHasNoNode | typeof NodeUnreachable | typeof NodeRefused | typeof NodeNotFound>, Authorization, never> | HttpApiEndpoint.HttpApiEndpoint<"resume", "POST", "/api/control/sessions/:id/resume", Schema.toCodecStringTree<Schema.Struct<{
2020
+ id: Schema.String;
2021
+ }>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
2022
+ readonly id: Schema.String;
2023
+ /**
2024
+ * The account that made it. A session of no workspace is that account's own; one of a
2025
+ * workspace is the workspace's, and names none where nobody is known to have made it
2026
+ * or the account was removed since.
2027
+ */
2028
+ readonly accountId: Schema.NullOr<Schema.String>;
2029
+ readonly workspaceId: Schema.NullOr<Schema.String>;
2030
+ readonly nodeId: Schema.NullOr<Schema.String>; /** What the node it is on is called; none for a session on no node. */
2031
+ readonly nodeName: Schema.NullOr<Schema.String>;
2032
+ readonly desiredState: Schema.Literals<readonly ["running", "suspended"]>;
2033
+ readonly observedState: Schema.Literals<readonly ["suspended", "starting", "running", "suspending", "failed", "gone"]>;
2034
+ readonly failure: Schema.NullOr<Schema.String>;
2035
+ readonly unreachableSince: Schema.NullOr<Schema.DateTimeUtcFromString>;
2036
+ readonly snapshotId: Schema.NullOr<Schema.String>;
2037
+ readonly label: Schema.NullOr<Schema.String>;
2038
+ readonly tags: Schema.$Record<Schema.String, Schema.String>;
2039
+ readonly createdAt: Schema.DateTimeUtcFromString;
2040
+ readonly observedAt: Schema.DateTimeUtcFromString;
2041
+ /**
2042
+ * Where the session is reached through a proxy before the nodes, below the proxy's own
2043
+ * address; none for a session on no node. It changes when the session moves.
2044
+ */
2045
+ readonly path: Schema.NullOr<Schema.String>;
2046
+ }>>, Schema.toCodecJson<typeof Forbidden | typeof SessionNotFound | typeof SessionHasNoNode | typeof NodeUnreachable | typeof NodeRefused | typeof NodeNotFound>, Authorization, never> | HttpApiEndpoint.HttpApiEndpoint<"delete", "DELETE", "/api/control/sessions/:id", Schema.toCodecStringTree<Schema.Struct<{
2047
+ id: Schema.String;
2048
+ }>>, never, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof Forbidden | typeof SessionNotFound | typeof SessionHasNoNode | typeof NodeUnreachable | typeof NodeRefused | typeof NodeNotFound>, Authorization, never> | HttpApiEndpoint.HttpApiEndpoint<"createTicket", "POST", "/api/control/sessions/:id/tickets", Schema.toCodecStringTree<Schema.Struct<{
2049
+ id: Schema.String;
2050
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
2051
+ readonly name: Schema.optional<Schema.NonEmptyString>;
2052
+ readonly access: Schema.optional<Schema.$Record<Schema.Literals<readonly ["input", "tabs", "lease", "sound", "clipboard", "uploads", "downloads", "recordings", "proxy", "mcp", "cdp", "tunnel"]>, Schema.optional<Schema.Literals<readonly ["r", "w", "rw"]>>>>;
2053
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
2054
+ /** What a request to the session carries: as a bearer token, or as `token` in its query. */readonly ticket: Schema.String;
2055
+ readonly expiresAt: Schema.DateTimeUtcFromString;
2056
+ /**
2057
+ * The session's workbench, for a person to open in a browser: on its node where that
2058
+ * has an address of its own, and through the proxy before the nodes otherwise. What
2059
+ * comes before its `?` is where the session's other routes are.
2060
+ */
2061
+ readonly url: Schema.String;
2062
+ }>>, Schema.toCodecJson<typeof Forbidden | typeof SessionNotFound | typeof SessionHasNoNode>, Authorization, never> | HttpApiEndpoint.HttpApiEndpoint<"createFileLink", "POST", "/api/control/sessions/:id/file-links", Schema.toCodecStringTree<Schema.Struct<{
2063
+ id: Schema.String;
2064
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
2065
+ readonly path: Schema.String; /** A link a file is put at, in `uploads` alone; one it is read at, without. */
2066
+ readonly write: Schema.optional<Schema.Boolean>; /** Five minutes, without. */
2067
+ readonly expiresInSeconds: Schema.optional<Schema.Int>;
2068
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
2069
+ readonly url: Schema.String; /** What a request to it is made with: `GET` reads the file, `PUT` puts its bytes there. */
2070
+ readonly method: Schema.Literals<readonly ["GET", "PUT"]>;
2071
+ readonly expiresAt: Schema.DateTimeUtcFromString;
2072
+ }>>, Schema.toCodecJson<typeof Forbidden | typeof SessionNotFound | typeof SessionHasNoNode | typeof FileLinkInvalid>, Authorization, never>, false> | HttpApiGroup.HttpApiGroup<"shares", HttpApiEndpoint.HttpApiEndpoint<"list", "GET", "/api/control/sessions/:id/shares", Schema.toCodecStringTree<Schema.Struct<{
2073
+ id: Schema.String;
2074
+ }>>, never, never, never, Schema.toCodecJson<Schema.$Array<Schema.Struct<{
2075
+ readonly id: Schema.String;
2076
+ readonly sessionId: Schema.String; /** The account that made it. */
2077
+ readonly accountId: Schema.String;
2078
+ readonly name: Schema.String;
2079
+ readonly role: Schema.Literals<readonly ["watch", "control"]>;
2080
+ readonly createdAt: Schema.DateTimeUtcFromString;
2081
+ readonly expiresAt: Schema.NullOr<Schema.DateTimeUtcFromString>;
2082
+ readonly lastUsedAt: Schema.NullOr<Schema.DateTimeUtcFromString>;
2083
+ }>>>, Schema.toCodecJson<typeof Forbidden | typeof SessionNotFound>, Authorization, never> | HttpApiEndpoint.HttpApiEndpoint<"create", "POST", "/api/control/sessions/:id/shares", Schema.toCodecStringTree<Schema.Struct<{
2084
+ id: Schema.String;
2085
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
2086
+ /** What whoever makes it knows it by; guests are not told. */readonly name: Schema.NonEmptyString;
2087
+ readonly role: Schema.Literals<readonly ["watch", "control"]>; /** How many hours it is good for; for as long as it is not taken back, without. */
2088
+ readonly expiresInHours: Schema.optional<Schema.Int>;
2089
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
2090
+ readonly url: Schema.String;
2091
+ readonly id: Schema.String;
2092
+ readonly sessionId: Schema.String; /** The account that made it. */
2093
+ readonly accountId: Schema.String;
2094
+ readonly name: Schema.String;
2095
+ readonly role: Schema.Literals<readonly ["watch", "control"]>;
2096
+ readonly createdAt: Schema.DateTimeUtcFromString;
2097
+ readonly expiresAt: Schema.NullOr<Schema.DateTimeUtcFromString>;
2098
+ readonly lastUsedAt: Schema.NullOr<Schema.DateTimeUtcFromString>;
2099
+ }>>, Schema.toCodecJson<typeof Forbidden | typeof SessionNotFound>, Authorization, never> | HttpApiEndpoint.HttpApiEndpoint<"revoke", "DELETE", "/api/control/sessions/:id/shares/:shareId", Schema.toCodecStringTree<Schema.Struct<{
2100
+ shareId: Schema.String;
2101
+ id: Schema.String;
2102
+ }>>, never, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof Forbidden | typeof SessionNotFound | typeof ShareNotFound>, Authorization, never>, false> | HttpApiGroup.HttpApiGroup<"snapshots", HttpApiEndpoint.HttpApiEndpoint<"list", "GET", "/api/control/snapshots", never, Schema.toCodecStringTree<Schema.Struct<{
2103
+ workspaceId: Schema.optional<Schema.NonEmptyString>;
2104
+ name: Schema.optional<Schema.NonEmptyString>;
2105
+ tag: Schema.optional<Schema.NonEmptyString>;
2106
+ }>>, never, never, Schema.toCodecJson<Schema.$Array<Schema.Struct<{
2107
+ readonly id: Schema.String; /** The account that made it, as a session's is. */
2108
+ readonly accountId: Schema.NullOr<Schema.String>;
2109
+ readonly workspaceId: Schema.NullOr<Schema.String>;
2110
+ readonly name: Schema.NullOr<Schema.String>;
2111
+ readonly description: Schema.NullOr<Schema.String>;
2112
+ readonly tags: Schema.$Record<Schema.String, Schema.String>;
2113
+ readonly sessionId: Schema.NullOr<Schema.String>;
2114
+ readonly nodeId: Schema.NullOr<Schema.String>;
2115
+ readonly shared: Schema.Boolean;
2116
+ readonly createdAt: Schema.DateTimeUtcFromString;
2117
+ }>>>, Schema.toCodecJson<typeof Forbidden>, Authorization, never> | HttpApiEndpoint.HttpApiEndpoint<"take", "POST", "/api/control/sessions/:id/snapshots", Schema.toCodecStringTree<Schema.Struct<{
2118
+ id: Schema.String;
2119
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
2120
+ readonly name: Schema.optional<Schema.NonEmptyString>;
2121
+ readonly description: Schema.optional<Schema.NonEmptyString>;
2122
+ readonly tags: Schema.optional<Schema.$Record<Schema.NonEmptyString, Schema.String>>;
2123
+ /**
2124
+ * A snapshot this one takes the place of: it is deleted once this is taken, and
2125
+ * what it was called, said to be and tagged with stays where nothing else is given.
2126
+ */
2127
+ readonly replaces: Schema.optional<Schema.NonEmptyString>;
2128
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
2129
+ readonly id: Schema.String; /** The account that made it, as a session's is. */
2130
+ readonly accountId: Schema.NullOr<Schema.String>;
2131
+ readonly workspaceId: Schema.NullOr<Schema.String>;
2132
+ readonly name: Schema.NullOr<Schema.String>;
2133
+ readonly description: Schema.NullOr<Schema.String>;
2134
+ readonly tags: Schema.$Record<Schema.String, Schema.String>;
2135
+ readonly sessionId: Schema.NullOr<Schema.String>;
2136
+ readonly nodeId: Schema.NullOr<Schema.String>;
2137
+ readonly shared: Schema.Boolean;
2138
+ readonly createdAt: Schema.DateTimeUtcFromString;
2139
+ }>>, Schema.toCodecJson<typeof Forbidden | typeof SessionNotFound | typeof SessionHasNoNode | typeof NodeUnreachable | typeof NodeRefused | typeof SnapshotNotFound | typeof NodeNotFound>, Authorization, never> | HttpApiEndpoint.HttpApiEndpoint<"get", "GET", "/api/control/snapshots/:id", Schema.toCodecStringTree<Schema.Struct<{
2140
+ id: Schema.String;
2141
+ }>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
2142
+ readonly id: Schema.String; /** The account that made it, as a session's is. */
2143
+ readonly accountId: Schema.NullOr<Schema.String>;
2144
+ readonly workspaceId: Schema.NullOr<Schema.String>;
2145
+ readonly name: Schema.NullOr<Schema.String>;
2146
+ readonly description: Schema.NullOr<Schema.String>;
2147
+ readonly tags: Schema.$Record<Schema.String, Schema.String>;
2148
+ readonly sessionId: Schema.NullOr<Schema.String>;
2149
+ readonly nodeId: Schema.NullOr<Schema.String>;
2150
+ readonly shared: Schema.Boolean;
2151
+ readonly createdAt: Schema.DateTimeUtcFromString;
2152
+ }>>, Schema.toCodecJson<typeof Forbidden | typeof SnapshotNotFound>, Authorization, never> | HttpApiEndpoint.HttpApiEndpoint<"describe", "PATCH", "/api/control/snapshots/:id", Schema.toCodecStringTree<Schema.Struct<{
2153
+ id: Schema.String;
2154
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
2155
+ readonly name: Schema.optional<Schema.NullOr<Schema.NonEmptyString>>;
2156
+ readonly description: Schema.optional<Schema.NullOr<Schema.NonEmptyString>>;
2157
+ readonly tags: Schema.optional<Schema.$Record<Schema.NonEmptyString, Schema.String>>;
2158
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
2159
+ readonly id: Schema.String; /** The account that made it, as a session's is. */
2160
+ readonly accountId: Schema.NullOr<Schema.String>;
2161
+ readonly workspaceId: Schema.NullOr<Schema.String>;
2162
+ readonly name: Schema.NullOr<Schema.String>;
2163
+ readonly description: Schema.NullOr<Schema.String>;
2164
+ readonly tags: Schema.$Record<Schema.String, Schema.String>;
2165
+ readonly sessionId: Schema.NullOr<Schema.String>;
2166
+ readonly nodeId: Schema.NullOr<Schema.String>;
2167
+ readonly shared: Schema.Boolean;
2168
+ readonly createdAt: Schema.DateTimeUtcFromString;
2169
+ }>>, Schema.toCodecJson<typeof Forbidden | typeof SnapshotNotFound>, Authorization, never> | HttpApiEndpoint.HttpApiEndpoint<"delete", "DELETE", "/api/control/snapshots/:id", Schema.toCodecStringTree<Schema.Struct<{
2170
+ id: Schema.String;
2171
+ }>>, never, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof Forbidden | typeof NodeUnreachable | typeof NodeRefused | typeof SnapshotNotFound>, Authorization, never>, false> | HttpApiGroup.HttpApiGroup<"workspaces", HttpApiEndpoint.HttpApiEndpoint<"list", "GET", "/api/control/workspaces", never, never, never, never, Schema.toCodecJson<Schema.$Array<Schema.Struct<{
2172
+ readonly id: Schema.String;
2173
+ readonly name: Schema.String;
2174
+ readonly createdAt: Schema.DateTimeUtcFromString;
2175
+ readonly role: Schema.NullOr<Schema.Literals<readonly ["member", "admin"]>>;
2176
+ }>>>, never, Authorization, never> | HttpApiEndpoint.HttpApiEndpoint<"create", "POST", "/api/control/workspaces", never, never, Schema.toCodecJson<Schema.Struct<{
2177
+ readonly name: Schema.NonEmptyString;
2178
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
2179
+ readonly id: Schema.String;
2180
+ readonly name: Schema.String;
2181
+ readonly createdAt: Schema.DateTimeUtcFromString;
2182
+ readonly role: Schema.NullOr<Schema.Literals<readonly ["member", "admin"]>>;
2183
+ }>>, Schema.toCodecJson<typeof Forbidden>, Authorization, never> | HttpApiEndpoint.HttpApiEndpoint<"rename", "PATCH", "/api/control/workspaces/:id", Schema.toCodecStringTree<Schema.Struct<{
2184
+ id: Schema.String;
2185
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
2186
+ readonly name: Schema.NonEmptyString;
2187
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
2188
+ readonly id: Schema.String;
2189
+ readonly name: Schema.String;
2190
+ readonly createdAt: Schema.DateTimeUtcFromString;
2191
+ readonly role: Schema.NullOr<Schema.Literals<readonly ["member", "admin"]>>;
2192
+ }>>, Schema.toCodecJson<typeof Forbidden | typeof WorkspaceNotFound>, Authorization, never> | HttpApiEndpoint.HttpApiEndpoint<"delete", "DELETE", "/api/control/workspaces/:id", Schema.toCodecStringTree<Schema.Struct<{
2193
+ id: Schema.String;
2194
+ }>>, never, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof Forbidden | typeof WorkspaceNotFound | typeof WorkspaceInUse>, Authorization, never> | HttpApiEndpoint.HttpApiEndpoint<"members", "GET", "/api/control/workspaces/:id/members", Schema.toCodecStringTree<Schema.Struct<{
2195
+ id: Schema.String;
2196
+ }>>, never, never, never, Schema.toCodecJson<Schema.$Array<Schema.Struct<{
2197
+ readonly accountId: Schema.String;
2198
+ readonly name: Schema.String;
2199
+ readonly kind: Schema.Literals<readonly ["person", "service"]>; /** The address a person signs in with; none for a service. */
2200
+ readonly email: Schema.NullOr<Schema.String>;
2201
+ readonly role: Schema.Literals<readonly ["member", "admin"]>;
2202
+ }>>>, Schema.toCodecJson<typeof Forbidden | typeof WorkspaceNotFound>, Authorization, never> | HttpApiEndpoint.HttpApiEndpoint<"admit", "PUT", "/api/control/workspaces/:id/members/:accountId", Schema.toCodecStringTree<Schema.Struct<{
2203
+ accountId: Schema.String;
2204
+ id: Schema.String;
2205
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
2206
+ readonly role: Schema.Literals<readonly ["member", "admin"]>;
2207
+ }>>, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof Forbidden | typeof AccountNotFound | typeof WorkspaceNotFound>, Authorization, never> | HttpApiEndpoint.HttpApiEndpoint<"dismiss", "DELETE", "/api/control/workspaces/:id/members/:accountId", Schema.toCodecStringTree<Schema.Struct<{
2208
+ accountId: Schema.String;
2209
+ id: Schema.String;
2210
+ }>>, never, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof Forbidden | typeof WorkspaceNotFound>, Authorization, never> | HttpApiEndpoint.HttpApiEndpoint<"ofAccount", "GET", "/api/control/accounts/:accountId/workspaces", Schema.toCodecStringTree<Schema.Struct<{
2211
+ accountId: Schema.String;
2212
+ }>>, never, never, never, Schema.toCodecJson<Schema.$Array<Schema.Struct<{
2213
+ readonly role: Schema.Literals<readonly ["member", "admin"]>;
2214
+ readonly id: Schema.String;
2215
+ readonly name: Schema.String;
2216
+ readonly createdAt: Schema.DateTimeUtcFromString;
2217
+ }>>>, Schema.toCodecJson<typeof Forbidden | typeof AccountNotFound>, Authorization, never>, false> | HttpApiGroup.HttpApiGroup<"signIn", HttpApiEndpoint.HttpApiEndpoint<"providers", "GET", "/api/control/sign-in/providers", never, never, never, never, Schema.toCodecJson<Schema.$Array<Schema.Struct<{
2218
+ /** What it is known by in addresses. */readonly id: Schema.String;
2219
+ readonly name: Schema.String; /** Which provider's mark it is shown with, as whoever added it said; none said, without. */
2220
+ readonly icon: Schema.NullOr<Schema.String>;
2221
+ }>>>, never, never, never>, false> | HttpApiGroup.HttpApiGroup<"health", HttpApiEndpoint.HttpApiEndpoint<"check", "GET", "/api/control/health", never, never, never, never, Schema.toCodecJson<Schema.Struct<{
2222
+ readonly status: Schema.Literal<"ok">;
2223
+ }>>, never, never, never>, false>>;
2224
+ declare class Api extends Api_base {}
2225
+ //#endregion
2226
+ export { EventKind as $, ProvidersGroup as A, SignInMethods as B, Node as C, ProviderChecked as D, Provider as E, SessionsGroup as F, Workspace as G, SignInProviders as H, Share as I, Caller as J, WorkspaceMember as K, ShareCreated as L, RegistrationTokenCreated as M, Session as N, ProviderId as O, SessionFilePath as P, EventDetail as Q, SharesGroup as R, ListedAccount as S, PREFIX as T, Snapshot as U, SignInProvider as V, SnapshotsGroup as W, DesiredState as X, Access as Y, EventActor as Z, FileLink as _, Admission as a, ShareRole as at, Health as b, ApiTokenCreated as c, CurrentCaller as d, EventResource as et, EVENTS_MOST as f, FILE_LINK_MOST as g, EventsGroup as h, AccountsGroup as i, Scope as it, RegistrationToken as j, ProviderKind as k, Authorization as l, EventPage as m, AccountLookup as n, Offers as nt, Api as o, TokenResources as ot, Event as p, WorkspacesGroup as q, AccountWorkspace as r, ProxyConfig as rt, ApiToken as s, covers as st, Account as t, ObservedState as tt, CurrentAccount as u, Grant as v, NodesGroup as w, HealthGroup as x, GrantsGroup as y, SignInGroup as z };
2227
+ //# sourceMappingURL=api-mf9iSwea.d.ts.map