@sealant/api-contracts-next 0.40.0-next.870 → 0.40.0-next.874

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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Boat accounts wire contracts — the Boat API keys an install keeps beside its default one.
2
+ * Boat accounts wire contracts — the Boat keys an install keeps beside its default one.
3
3
  *
4
4
  * An install's default Boat account is its env key (`SEALANT_BOAT_API_KEY`). A product that serves
5
5
  * several organizations (Mend) stores one more account per organization, so each organization's
@@ -12,6 +12,292 @@
12
12
  */
13
13
  import { Schema } from "effect";
14
14
  import { HttpApiEndpoint, HttpApiGroup } from "effect/http-api";
15
+ /**
16
+ * The install's own Boat key (its env key), as rotation and removal refuse it
17
+ * (`boat-account-environment`). It is read through `install-key`, never listed: `list` answers
18
+ * stored accounts only, with ids every released client decodes.
19
+ */
20
+ export declare const BOAT_DEFAULT_ACCOUNT_ID = "default";
21
+ /**
22
+ * A fact Boat did not let Core observe, and why. `refused`: Boat refused the read (`boat` says
23
+ * how; an organization key is refused Boat's key list). `no-answer`: Boat did not answer.
24
+ * `not-listed`: Boat's key list did not include this key (a key limited to some VMs gets an empty
25
+ * list), or included more than one that could be it. `unreadable`: Boat answered with something
26
+ * Core could not read. Core never guesses a fact it did not observe.
27
+ */
28
+ export declare const boatKeyNotObservedSchema: Schema.Struct<{
29
+ readonly observed: Schema.Literal<false>;
30
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
31
+ readonly boat: Schema.optional<Schema.Struct<{
32
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
33
+ readonly retryable: Schema.Boolean;
34
+ readonly operation: Schema.optional<Schema.String>;
35
+ readonly code: Schema.optional<Schema.String>;
36
+ readonly message: Schema.optional<Schema.String>;
37
+ readonly requestId: Schema.optional<Schema.String>;
38
+ readonly status: Schema.optional<Schema.Int>;
39
+ readonly permission: Schema.optional<Schema.String>;
40
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
41
+ readonly retryAt: Schema.optional<Schema.String>;
42
+ readonly billingUrl: Schema.optional<Schema.String>;
43
+ }>>;
44
+ }>;
45
+ export type BoatKeyNotObserved = typeof boatKeyNotObservedSchema.Type;
46
+ /**
47
+ * What Core observed of a Boat key, from Boat's own answers, at `observedAt`. Each fact is
48
+ * `observed: true` with its value, or `observed: false` with the reason Boat did not show it.
49
+ */
50
+ export declare const boatKeyReportSchema: Schema.Struct<{
51
+ readonly observedAt: Schema.String;
52
+ /** The Boat organization the account bills (`X-Boat-Org` on every request), or null. */
53
+ readonly organization: Schema.NullOr<Schema.String>;
54
+ /** Who the key is (`GET /me`). */
55
+ readonly identity: Schema.Union<readonly [Schema.Struct<{
56
+ readonly observed: Schema.Literal<true>;
57
+ } & {
58
+ /**
59
+ * Boat's id for the account the key belongs to (`GET /me` `user.id`). A Boat account, never a
60
+ * Sealant person: it is not a `PersonId` and names no one on this install.
61
+ */
62
+ accountId: Schema.optional<Schema.String>;
63
+ login: Schema.optional<Schema.String>;
64
+ displayName: Schema.optional<Schema.String>;
65
+ serviceAccount: Schema.optional<Schema.Boolean>;
66
+ accountStatus: Schema.Literals<readonly ["active", "suspended", "closed", "unknown"]>;
67
+ }>, Schema.Struct<{
68
+ readonly observed: Schema.Literal<false>;
69
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
70
+ readonly boat: Schema.optional<Schema.Struct<{
71
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
72
+ readonly retryable: Schema.Boolean;
73
+ readonly operation: Schema.optional<Schema.String>;
74
+ readonly code: Schema.optional<Schema.String>;
75
+ readonly message: Schema.optional<Schema.String>;
76
+ readonly requestId: Schema.optional<Schema.String>;
77
+ readonly status: Schema.optional<Schema.Int>;
78
+ readonly permission: Schema.optional<Schema.String>;
79
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
80
+ readonly retryAt: Schema.optional<Schema.String>;
81
+ readonly billingUrl: Schema.optional<Schema.String>;
82
+ }>>;
83
+ }>]>;
84
+ /** A personal (account) key, or an organization's key. */
85
+ readonly keyKind: Schema.Union<readonly [Schema.Struct<{
86
+ readonly observed: Schema.Literal<true>;
87
+ } & {
88
+ kind: Schema.Literals<readonly ["personal", "organization"]>;
89
+ }>, Schema.Struct<{
90
+ readonly observed: Schema.Literal<false>;
91
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
92
+ readonly boat: Schema.optional<Schema.Struct<{
93
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
94
+ readonly retryable: Schema.Boolean;
95
+ readonly operation: Schema.optional<Schema.String>;
96
+ readonly code: Schema.optional<Schema.String>;
97
+ readonly message: Schema.optional<Schema.String>;
98
+ readonly requestId: Schema.optional<Schema.String>;
99
+ readonly status: Schema.optional<Schema.Int>;
100
+ readonly permission: Schema.optional<Schema.String>;
101
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
102
+ readonly retryAt: Schema.optional<Schema.String>;
103
+ readonly billingUrl: Schema.optional<Schema.String>;
104
+ }>>;
105
+ }>]>;
106
+ /** Which wallet a VM started with the key bills (`GET /limits`). */
107
+ readonly wallet: Schema.Union<readonly [Schema.Struct<{
108
+ readonly observed: Schema.Literal<true>;
109
+ } & {
110
+ kind: Schema.Literals<readonly ["personal", "organization"]>;
111
+ organizationId: Schema.optional<Schema.String>;
112
+ organizationName: Schema.optional<Schema.String>;
113
+ role: Schema.optional<Schema.String>;
114
+ }>, Schema.Struct<{
115
+ readonly observed: Schema.Literal<false>;
116
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
117
+ readonly boat: Schema.optional<Schema.Struct<{
118
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
119
+ readonly retryable: Schema.Boolean;
120
+ readonly operation: Schema.optional<Schema.String>;
121
+ readonly code: Schema.optional<Schema.String>;
122
+ readonly message: Schema.optional<Schema.String>;
123
+ readonly requestId: Schema.optional<Schema.String>;
124
+ readonly status: Schema.optional<Schema.Int>;
125
+ readonly permission: Schema.optional<Schema.String>;
126
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
127
+ readonly retryAt: Schema.optional<Schema.String>;
128
+ readonly billingUrl: Schema.optional<Schema.String>;
129
+ }>>;
130
+ }>]>;
131
+ /** The permissions Core needs of every key, from the Boat calls it makes. */
132
+ readonly requiredPermissions: Schema.$Array<Schema.String>;
133
+ /** The key's permissions (`GET /api-keys`), and which of the required ones it lacks. */
134
+ readonly permissions: Schema.Union<readonly [Schema.Struct<{
135
+ readonly observed: Schema.Literal<true>;
136
+ } & {
137
+ held: Schema.$Array<Schema.String>;
138
+ missing: Schema.$Array<Schema.String>;
139
+ /** The key is limited to some VMs or environments: it cannot reach VMs Core creates. */
140
+ limitedToSandboxes: Schema.Boolean;
141
+ }>, Schema.Struct<{
142
+ readonly observed: Schema.Literal<false>;
143
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
144
+ readonly boat: Schema.optional<Schema.Struct<{
145
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
146
+ readonly retryable: Schema.Boolean;
147
+ readonly operation: Schema.optional<Schema.String>;
148
+ readonly code: Schema.optional<Schema.String>;
149
+ readonly message: Schema.optional<Schema.String>;
150
+ readonly requestId: Schema.optional<Schema.String>;
151
+ readonly status: Schema.optional<Schema.Int>;
152
+ readonly permission: Schema.optional<Schema.String>;
153
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
154
+ readonly retryAt: Schema.optional<Schema.String>;
155
+ readonly billingUrl: Schema.optional<Schema.String>;
156
+ }>>;
157
+ }>]>;
158
+ /** When the key expires; `expiresAt` null: it never does. */
159
+ readonly expiry: Schema.Union<readonly [Schema.Struct<{
160
+ readonly observed: Schema.Literal<true>;
161
+ } & {
162
+ expiresAt: Schema.NullOr<Schema.String>;
163
+ expired: Schema.Boolean;
164
+ expiringSoon: Schema.Boolean;
165
+ }>, Schema.Struct<{
166
+ readonly observed: Schema.Literal<false>;
167
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
168
+ readonly boat: Schema.optional<Schema.Struct<{
169
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
170
+ readonly retryable: Schema.Boolean;
171
+ readonly operation: Schema.optional<Schema.String>;
172
+ readonly code: Schema.optional<Schema.String>;
173
+ readonly message: Schema.optional<Schema.String>;
174
+ readonly requestId: Schema.optional<Schema.String>;
175
+ readonly status: Schema.optional<Schema.Int>;
176
+ readonly permission: Schema.optional<Schema.String>;
177
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
178
+ readonly retryAt: Schema.optional<Schema.String>;
179
+ readonly billingUrl: Schema.optional<Schema.String>;
180
+ }>>;
181
+ }>]>;
182
+ /** Whether the wallet can start a VM now, why not, and its running and allowed VMs. */
183
+ readonly start: Schema.Union<readonly [Schema.Struct<{
184
+ readonly observed: Schema.Literal<true>;
185
+ } & {
186
+ canStart: Schema.Boolean;
187
+ blockedReason: Schema.optional<Schema.String>;
188
+ billingStatus: Schema.optional<Schema.String>;
189
+ runningVms: Schema.Int;
190
+ allowedVms: Schema.Int;
191
+ }>, Schema.Struct<{
192
+ readonly observed: Schema.Literal<false>;
193
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
194
+ readonly boat: Schema.optional<Schema.Struct<{
195
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
196
+ readonly retryable: Schema.Boolean;
197
+ readonly operation: Schema.optional<Schema.String>;
198
+ readonly code: Schema.optional<Schema.String>;
199
+ readonly message: Schema.optional<Schema.String>;
200
+ readonly requestId: Schema.optional<Schema.String>;
201
+ readonly status: Schema.optional<Schema.Int>;
202
+ readonly permission: Schema.optional<Schema.String>;
203
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
204
+ readonly retryAt: Schema.optional<Schema.String>;
205
+ readonly billingUrl: Schema.optional<Schema.String>;
206
+ }>>;
207
+ }>]>;
208
+ /** Saved snapshot slots of the wallet (`GET /saved-snapshots`). */
209
+ readonly snapshots: Schema.Union<readonly [Schema.Struct<{
210
+ readonly observed: Schema.Literal<true>;
211
+ } & {
212
+ used: Schema.Int;
213
+ included: Schema.Int;
214
+ }>, Schema.Struct<{
215
+ readonly observed: Schema.Literal<false>;
216
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
217
+ readonly boat: Schema.optional<Schema.Struct<{
218
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
219
+ readonly retryable: Schema.Boolean;
220
+ readonly operation: Schema.optional<Schema.String>;
221
+ readonly code: Schema.optional<Schema.String>;
222
+ readonly message: Schema.optional<Schema.String>;
223
+ readonly requestId: Schema.optional<Schema.String>;
224
+ readonly status: Schema.optional<Schema.Int>;
225
+ readonly permission: Schema.optional<Schema.String>;
226
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
227
+ readonly retryAt: Schema.optional<Schema.String>;
228
+ readonly billingUrl: Schema.optional<Schema.String>;
229
+ }>>;
230
+ }>]>;
231
+ }>;
232
+ export type BoatKeyReport = typeof boatKeyReportSchema.Type;
233
+ /** The steps of a Boat key's full check, in order: the last two are also its cleanup. */
234
+ export declare const BOAT_KEY_PROOF_STEPS: readonly ["start-vm", "run-command", "publish-port", "save-snapshot", "delete-snapshot", "delete-vm"];
235
+ export type BoatKeyProofStepName = (typeof BOAT_KEY_PROOF_STEPS)[number];
236
+ /**
237
+ * One step of a full check. `passed`: Boat did it. `refused`: Boat refused it, `boat` says why.
238
+ * `no-answer`: Boat did not answer (the step may have happened; cleanup assumes it did).
239
+ * `not-reached`: an earlier step stopped the check, and this one was not tried.
240
+ */
241
+ export declare const boatKeyProofStepSchema: Schema.Struct<{
242
+ readonly step: Schema.Literals<readonly ["start-vm", "run-command", "publish-port", "save-snapshot", "delete-snapshot", "delete-vm"]>;
243
+ readonly outcome: Schema.Literals<readonly ["passed", "refused", "no-answer", "not-reached"]>;
244
+ readonly boat: Schema.optional<Schema.Struct<{
245
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
246
+ readonly retryable: Schema.Boolean;
247
+ readonly operation: Schema.optional<Schema.String>;
248
+ readonly code: Schema.optional<Schema.String>;
249
+ readonly message: Schema.optional<Schema.String>;
250
+ readonly requestId: Schema.optional<Schema.String>;
251
+ readonly status: Schema.optional<Schema.Int>;
252
+ readonly permission: Schema.optional<Schema.String>;
253
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
254
+ readonly retryAt: Schema.optional<Schema.String>;
255
+ readonly billingUrl: Schema.optional<Schema.String>;
256
+ }>>;
257
+ }>;
258
+ export type BoatKeyProofStep = typeof boatKeyProofStepSchema.Type;
259
+ /**
260
+ * A full check of a Boat key: Core started the smallest VM, ran a command in it, published a port,
261
+ * saved a snapshot, then deleted the snapshot and the VM, and says how far it got. `outcome`:
262
+ * `passed` (every step), `refused` (Boat refused a step; the first refused or unanswered step
263
+ * says why), or `interrupted` (the check stopped before it finished; what it made was removed by
264
+ * the sweep). `starts`: how many VM starts it asked Boat for (0 or 1). `leftBehind`: what Boat
265
+ * may still hold of it when the answer was given. `removalConfirmed` true: Core saw Boat delete
266
+ * everything it made. False: the worker's sweep owns what is left and keeps deleting it, with
267
+ * `vm` (an id) and `snapshot` (a name) naming what is known; `vm` is null when a VM may exist
268
+ * whose id Boat never answered (the sweep finds it by its label). Until the sweep has finished,
269
+ * the account's key is neither rotated nor removed.
270
+ */
271
+ export declare const boatKeyProofSchema: Schema.Struct<{
272
+ readonly proofId: Schema.String;
273
+ readonly startedAt: Schema.String;
274
+ readonly finishedAt: Schema.String;
275
+ readonly outcome: Schema.Literals<readonly ["passed", "refused", "interrupted"]>;
276
+ readonly steps: Schema.$Array<Schema.Struct<{
277
+ readonly step: Schema.Literals<readonly ["start-vm", "run-command", "publish-port", "save-snapshot", "delete-snapshot", "delete-vm"]>;
278
+ readonly outcome: Schema.Literals<readonly ["passed", "refused", "no-answer", "not-reached"]>;
279
+ readonly boat: Schema.optional<Schema.Struct<{
280
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
281
+ readonly retryable: Schema.Boolean;
282
+ readonly operation: Schema.optional<Schema.String>;
283
+ readonly code: Schema.optional<Schema.String>;
284
+ readonly message: Schema.optional<Schema.String>;
285
+ readonly requestId: Schema.optional<Schema.String>;
286
+ readonly status: Schema.optional<Schema.Int>;
287
+ readonly permission: Schema.optional<Schema.String>;
288
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
289
+ readonly retryAt: Schema.optional<Schema.String>;
290
+ readonly billingUrl: Schema.optional<Schema.String>;
291
+ }>>;
292
+ }>>;
293
+ readonly starts: Schema.Int;
294
+ readonly leftBehind: Schema.Struct<{
295
+ readonly vm: Schema.NullOr<Schema.String>;
296
+ readonly snapshot: Schema.NullOr<Schema.String>;
297
+ readonly removalConfirmed: Schema.Boolean;
298
+ }>;
299
+ }>;
300
+ export type BoatKeyProof = typeof boatKeyProofSchema.Type;
15
301
  export declare const boatAccountSchema: Schema.Struct<{
16
302
  readonly boatAccountId: Schema.String;
17
303
  readonly label: Schema.String;
@@ -20,17 +306,429 @@ export declare const boatAccountSchema: Schema.Struct<{
20
306
  readonly createdAt: Schema.String;
21
307
  /** When its key was last replaced; null when it still has the key it was created with. */
22
308
  readonly keyRotatedAt: Schema.NullOr<Schema.String>;
309
+ /** The Boat organization the account bills, sent on every request for it; null: none named. */
310
+ readonly organization: Schema.optional<Schema.NullOr<Schema.String>>;
311
+ /** The key's last report, with when it was observed; null until the key is checked. */
312
+ readonly report: Schema.optional<Schema.NullOr<Schema.Struct<{
313
+ readonly observedAt: Schema.String;
314
+ /** The Boat organization the account bills (`X-Boat-Org` on every request), or null. */
315
+ readonly organization: Schema.NullOr<Schema.String>;
316
+ /** Who the key is (`GET /me`). */
317
+ readonly identity: Schema.Union<readonly [Schema.Struct<{
318
+ readonly observed: Schema.Literal<true>;
319
+ } & {
320
+ /**
321
+ * Boat's id for the account the key belongs to (`GET /me` `user.id`). A Boat account, never a
322
+ * Sealant person: it is not a `PersonId` and names no one on this install.
323
+ */
324
+ accountId: Schema.optional<Schema.String>;
325
+ login: Schema.optional<Schema.String>;
326
+ displayName: Schema.optional<Schema.String>;
327
+ serviceAccount: Schema.optional<Schema.Boolean>;
328
+ accountStatus: Schema.Literals<readonly ["active", "suspended", "closed", "unknown"]>;
329
+ }>, Schema.Struct<{
330
+ readonly observed: Schema.Literal<false>;
331
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
332
+ readonly boat: Schema.optional<Schema.Struct<{
333
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
334
+ readonly retryable: Schema.Boolean;
335
+ readonly operation: Schema.optional<Schema.String>;
336
+ readonly code: Schema.optional<Schema.String>;
337
+ readonly message: Schema.optional<Schema.String>;
338
+ readonly requestId: Schema.optional<Schema.String>;
339
+ readonly status: Schema.optional<Schema.Int>;
340
+ readonly permission: Schema.optional<Schema.String>;
341
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
342
+ readonly retryAt: Schema.optional<Schema.String>;
343
+ readonly billingUrl: Schema.optional<Schema.String>;
344
+ }>>;
345
+ }>]>;
346
+ /** A personal (account) key, or an organization's key. */
347
+ readonly keyKind: Schema.Union<readonly [Schema.Struct<{
348
+ readonly observed: Schema.Literal<true>;
349
+ } & {
350
+ kind: Schema.Literals<readonly ["personal", "organization"]>;
351
+ }>, Schema.Struct<{
352
+ readonly observed: Schema.Literal<false>;
353
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
354
+ readonly boat: Schema.optional<Schema.Struct<{
355
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
356
+ readonly retryable: Schema.Boolean;
357
+ readonly operation: Schema.optional<Schema.String>;
358
+ readonly code: Schema.optional<Schema.String>;
359
+ readonly message: Schema.optional<Schema.String>;
360
+ readonly requestId: Schema.optional<Schema.String>;
361
+ readonly status: Schema.optional<Schema.Int>;
362
+ readonly permission: Schema.optional<Schema.String>;
363
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
364
+ readonly retryAt: Schema.optional<Schema.String>;
365
+ readonly billingUrl: Schema.optional<Schema.String>;
366
+ }>>;
367
+ }>]>;
368
+ /** Which wallet a VM started with the key bills (`GET /limits`). */
369
+ readonly wallet: Schema.Union<readonly [Schema.Struct<{
370
+ readonly observed: Schema.Literal<true>;
371
+ } & {
372
+ kind: Schema.Literals<readonly ["personal", "organization"]>;
373
+ organizationId: Schema.optional<Schema.String>;
374
+ organizationName: Schema.optional<Schema.String>;
375
+ role: Schema.optional<Schema.String>;
376
+ }>, Schema.Struct<{
377
+ readonly observed: Schema.Literal<false>;
378
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
379
+ readonly boat: Schema.optional<Schema.Struct<{
380
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
381
+ readonly retryable: Schema.Boolean;
382
+ readonly operation: Schema.optional<Schema.String>;
383
+ readonly code: Schema.optional<Schema.String>;
384
+ readonly message: Schema.optional<Schema.String>;
385
+ readonly requestId: Schema.optional<Schema.String>;
386
+ readonly status: Schema.optional<Schema.Int>;
387
+ readonly permission: Schema.optional<Schema.String>;
388
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
389
+ readonly retryAt: Schema.optional<Schema.String>;
390
+ readonly billingUrl: Schema.optional<Schema.String>;
391
+ }>>;
392
+ }>]>;
393
+ /** The permissions Core needs of every key, from the Boat calls it makes. */
394
+ readonly requiredPermissions: Schema.$Array<Schema.String>;
395
+ /** The key's permissions (`GET /api-keys`), and which of the required ones it lacks. */
396
+ readonly permissions: Schema.Union<readonly [Schema.Struct<{
397
+ readonly observed: Schema.Literal<true>;
398
+ } & {
399
+ held: Schema.$Array<Schema.String>;
400
+ missing: Schema.$Array<Schema.String>;
401
+ /** The key is limited to some VMs or environments: it cannot reach VMs Core creates. */
402
+ limitedToSandboxes: Schema.Boolean;
403
+ }>, Schema.Struct<{
404
+ readonly observed: Schema.Literal<false>;
405
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
406
+ readonly boat: Schema.optional<Schema.Struct<{
407
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
408
+ readonly retryable: Schema.Boolean;
409
+ readonly operation: Schema.optional<Schema.String>;
410
+ readonly code: Schema.optional<Schema.String>;
411
+ readonly message: Schema.optional<Schema.String>;
412
+ readonly requestId: Schema.optional<Schema.String>;
413
+ readonly status: Schema.optional<Schema.Int>;
414
+ readonly permission: Schema.optional<Schema.String>;
415
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
416
+ readonly retryAt: Schema.optional<Schema.String>;
417
+ readonly billingUrl: Schema.optional<Schema.String>;
418
+ }>>;
419
+ }>]>;
420
+ /** When the key expires; `expiresAt` null: it never does. */
421
+ readonly expiry: Schema.Union<readonly [Schema.Struct<{
422
+ readonly observed: Schema.Literal<true>;
423
+ } & {
424
+ expiresAt: Schema.NullOr<Schema.String>;
425
+ expired: Schema.Boolean;
426
+ expiringSoon: Schema.Boolean;
427
+ }>, Schema.Struct<{
428
+ readonly observed: Schema.Literal<false>;
429
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
430
+ readonly boat: Schema.optional<Schema.Struct<{
431
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
432
+ readonly retryable: Schema.Boolean;
433
+ readonly operation: Schema.optional<Schema.String>;
434
+ readonly code: Schema.optional<Schema.String>;
435
+ readonly message: Schema.optional<Schema.String>;
436
+ readonly requestId: Schema.optional<Schema.String>;
437
+ readonly status: Schema.optional<Schema.Int>;
438
+ readonly permission: Schema.optional<Schema.String>;
439
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
440
+ readonly retryAt: Schema.optional<Schema.String>;
441
+ readonly billingUrl: Schema.optional<Schema.String>;
442
+ }>>;
443
+ }>]>;
444
+ /** Whether the wallet can start a VM now, why not, and its running and allowed VMs. */
445
+ readonly start: Schema.Union<readonly [Schema.Struct<{
446
+ readonly observed: Schema.Literal<true>;
447
+ } & {
448
+ canStart: Schema.Boolean;
449
+ blockedReason: Schema.optional<Schema.String>;
450
+ billingStatus: Schema.optional<Schema.String>;
451
+ runningVms: Schema.Int;
452
+ allowedVms: Schema.Int;
453
+ }>, Schema.Struct<{
454
+ readonly observed: Schema.Literal<false>;
455
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
456
+ readonly boat: Schema.optional<Schema.Struct<{
457
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
458
+ readonly retryable: Schema.Boolean;
459
+ readonly operation: Schema.optional<Schema.String>;
460
+ readonly code: Schema.optional<Schema.String>;
461
+ readonly message: Schema.optional<Schema.String>;
462
+ readonly requestId: Schema.optional<Schema.String>;
463
+ readonly status: Schema.optional<Schema.Int>;
464
+ readonly permission: Schema.optional<Schema.String>;
465
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
466
+ readonly retryAt: Schema.optional<Schema.String>;
467
+ readonly billingUrl: Schema.optional<Schema.String>;
468
+ }>>;
469
+ }>]>;
470
+ /** Saved snapshot slots of the wallet (`GET /saved-snapshots`). */
471
+ readonly snapshots: Schema.Union<readonly [Schema.Struct<{
472
+ readonly observed: Schema.Literal<true>;
473
+ } & {
474
+ used: Schema.Int;
475
+ included: Schema.Int;
476
+ }>, Schema.Struct<{
477
+ readonly observed: Schema.Literal<false>;
478
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
479
+ readonly boat: Schema.optional<Schema.Struct<{
480
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
481
+ readonly retryable: Schema.Boolean;
482
+ readonly operation: Schema.optional<Schema.String>;
483
+ readonly code: Schema.optional<Schema.String>;
484
+ readonly message: Schema.optional<Schema.String>;
485
+ readonly requestId: Schema.optional<Schema.String>;
486
+ readonly status: Schema.optional<Schema.Int>;
487
+ readonly permission: Schema.optional<Schema.String>;
488
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
489
+ readonly retryAt: Schema.optional<Schema.String>;
490
+ readonly billingUrl: Schema.optional<Schema.String>;
491
+ }>>;
492
+ }>]>;
493
+ }>>>;
494
+ /** The account's last full check (`prove`), kept beside its report; null until it is proven. */
495
+ readonly lastProof: Schema.optional<Schema.NullOr<Schema.Struct<{
496
+ readonly proofId: Schema.String;
497
+ readonly startedAt: Schema.String;
498
+ readonly finishedAt: Schema.String;
499
+ readonly outcome: Schema.Literals<readonly ["passed", "refused", "interrupted"]>;
500
+ readonly steps: Schema.$Array<Schema.Struct<{
501
+ readonly step: Schema.Literals<readonly ["start-vm", "run-command", "publish-port", "save-snapshot", "delete-snapshot", "delete-vm"]>;
502
+ readonly outcome: Schema.Literals<readonly ["passed", "refused", "no-answer", "not-reached"]>;
503
+ readonly boat: Schema.optional<Schema.Struct<{
504
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
505
+ readonly retryable: Schema.Boolean;
506
+ readonly operation: Schema.optional<Schema.String>;
507
+ readonly code: Schema.optional<Schema.String>;
508
+ readonly message: Schema.optional<Schema.String>;
509
+ readonly requestId: Schema.optional<Schema.String>;
510
+ readonly status: Schema.optional<Schema.Int>;
511
+ readonly permission: Schema.optional<Schema.String>;
512
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
513
+ readonly retryAt: Schema.optional<Schema.String>;
514
+ readonly billingUrl: Schema.optional<Schema.String>;
515
+ }>>;
516
+ }>>;
517
+ readonly starts: Schema.Int;
518
+ readonly leftBehind: Schema.Struct<{
519
+ readonly vm: Schema.NullOr<Schema.String>;
520
+ readonly snapshot: Schema.NullOr<Schema.String>;
521
+ readonly removalConfirmed: Schema.Boolean;
522
+ }>;
523
+ }>>>;
23
524
  }>;
24
525
  export type BoatAccountWire = typeof boatAccountSchema.Type;
526
+ /**
527
+ * The install's own Boat key (`SEALANT_BOAT_API_KEY`), which workspaces run in when they name no
528
+ * account: never its value, only its last report. It is set in the install's environment, so it
529
+ * cannot be rotated or removed through this API.
530
+ */
531
+ export declare const boatInstallKeySchema: Schema.Struct<{
532
+ readonly label: Schema.String;
533
+ /** The key's last report, with when it was observed; null until it is checked. */
534
+ readonly report: Schema.NullOr<Schema.Struct<{
535
+ readonly observedAt: Schema.String;
536
+ /** The Boat organization the account bills (`X-Boat-Org` on every request), or null. */
537
+ readonly organization: Schema.NullOr<Schema.String>;
538
+ /** Who the key is (`GET /me`). */
539
+ readonly identity: Schema.Union<readonly [Schema.Struct<{
540
+ readonly observed: Schema.Literal<true>;
541
+ } & {
542
+ /**
543
+ * Boat's id for the account the key belongs to (`GET /me` `user.id`). A Boat account, never a
544
+ * Sealant person: it is not a `PersonId` and names no one on this install.
545
+ */
546
+ accountId: Schema.optional<Schema.String>;
547
+ login: Schema.optional<Schema.String>;
548
+ displayName: Schema.optional<Schema.String>;
549
+ serviceAccount: Schema.optional<Schema.Boolean>;
550
+ accountStatus: Schema.Literals<readonly ["active", "suspended", "closed", "unknown"]>;
551
+ }>, Schema.Struct<{
552
+ readonly observed: Schema.Literal<false>;
553
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
554
+ readonly boat: Schema.optional<Schema.Struct<{
555
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
556
+ readonly retryable: Schema.Boolean;
557
+ readonly operation: Schema.optional<Schema.String>;
558
+ readonly code: Schema.optional<Schema.String>;
559
+ readonly message: Schema.optional<Schema.String>;
560
+ readonly requestId: Schema.optional<Schema.String>;
561
+ readonly status: Schema.optional<Schema.Int>;
562
+ readonly permission: Schema.optional<Schema.String>;
563
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
564
+ readonly retryAt: Schema.optional<Schema.String>;
565
+ readonly billingUrl: Schema.optional<Schema.String>;
566
+ }>>;
567
+ }>]>;
568
+ /** A personal (account) key, or an organization's key. */
569
+ readonly keyKind: Schema.Union<readonly [Schema.Struct<{
570
+ readonly observed: Schema.Literal<true>;
571
+ } & {
572
+ kind: Schema.Literals<readonly ["personal", "organization"]>;
573
+ }>, Schema.Struct<{
574
+ readonly observed: Schema.Literal<false>;
575
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
576
+ readonly boat: Schema.optional<Schema.Struct<{
577
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
578
+ readonly retryable: Schema.Boolean;
579
+ readonly operation: Schema.optional<Schema.String>;
580
+ readonly code: Schema.optional<Schema.String>;
581
+ readonly message: Schema.optional<Schema.String>;
582
+ readonly requestId: Schema.optional<Schema.String>;
583
+ readonly status: Schema.optional<Schema.Int>;
584
+ readonly permission: Schema.optional<Schema.String>;
585
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
586
+ readonly retryAt: Schema.optional<Schema.String>;
587
+ readonly billingUrl: Schema.optional<Schema.String>;
588
+ }>>;
589
+ }>]>;
590
+ /** Which wallet a VM started with the key bills (`GET /limits`). */
591
+ readonly wallet: Schema.Union<readonly [Schema.Struct<{
592
+ readonly observed: Schema.Literal<true>;
593
+ } & {
594
+ kind: Schema.Literals<readonly ["personal", "organization"]>;
595
+ organizationId: Schema.optional<Schema.String>;
596
+ organizationName: Schema.optional<Schema.String>;
597
+ role: Schema.optional<Schema.String>;
598
+ }>, Schema.Struct<{
599
+ readonly observed: Schema.Literal<false>;
600
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
601
+ readonly boat: Schema.optional<Schema.Struct<{
602
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
603
+ readonly retryable: Schema.Boolean;
604
+ readonly operation: Schema.optional<Schema.String>;
605
+ readonly code: Schema.optional<Schema.String>;
606
+ readonly message: Schema.optional<Schema.String>;
607
+ readonly requestId: Schema.optional<Schema.String>;
608
+ readonly status: Schema.optional<Schema.Int>;
609
+ readonly permission: Schema.optional<Schema.String>;
610
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
611
+ readonly retryAt: Schema.optional<Schema.String>;
612
+ readonly billingUrl: Schema.optional<Schema.String>;
613
+ }>>;
614
+ }>]>;
615
+ /** The permissions Core needs of every key, from the Boat calls it makes. */
616
+ readonly requiredPermissions: Schema.$Array<Schema.String>;
617
+ /** The key's permissions (`GET /api-keys`), and which of the required ones it lacks. */
618
+ readonly permissions: Schema.Union<readonly [Schema.Struct<{
619
+ readonly observed: Schema.Literal<true>;
620
+ } & {
621
+ held: Schema.$Array<Schema.String>;
622
+ missing: Schema.$Array<Schema.String>;
623
+ /** The key is limited to some VMs or environments: it cannot reach VMs Core creates. */
624
+ limitedToSandboxes: Schema.Boolean;
625
+ }>, Schema.Struct<{
626
+ readonly observed: Schema.Literal<false>;
627
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
628
+ readonly boat: Schema.optional<Schema.Struct<{
629
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
630
+ readonly retryable: Schema.Boolean;
631
+ readonly operation: Schema.optional<Schema.String>;
632
+ readonly code: Schema.optional<Schema.String>;
633
+ readonly message: Schema.optional<Schema.String>;
634
+ readonly requestId: Schema.optional<Schema.String>;
635
+ readonly status: Schema.optional<Schema.Int>;
636
+ readonly permission: Schema.optional<Schema.String>;
637
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
638
+ readonly retryAt: Schema.optional<Schema.String>;
639
+ readonly billingUrl: Schema.optional<Schema.String>;
640
+ }>>;
641
+ }>]>;
642
+ /** When the key expires; `expiresAt` null: it never does. */
643
+ readonly expiry: Schema.Union<readonly [Schema.Struct<{
644
+ readonly observed: Schema.Literal<true>;
645
+ } & {
646
+ expiresAt: Schema.NullOr<Schema.String>;
647
+ expired: Schema.Boolean;
648
+ expiringSoon: Schema.Boolean;
649
+ }>, Schema.Struct<{
650
+ readonly observed: Schema.Literal<false>;
651
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
652
+ readonly boat: Schema.optional<Schema.Struct<{
653
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
654
+ readonly retryable: Schema.Boolean;
655
+ readonly operation: Schema.optional<Schema.String>;
656
+ readonly code: Schema.optional<Schema.String>;
657
+ readonly message: Schema.optional<Schema.String>;
658
+ readonly requestId: Schema.optional<Schema.String>;
659
+ readonly status: Schema.optional<Schema.Int>;
660
+ readonly permission: Schema.optional<Schema.String>;
661
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
662
+ readonly retryAt: Schema.optional<Schema.String>;
663
+ readonly billingUrl: Schema.optional<Schema.String>;
664
+ }>>;
665
+ }>]>;
666
+ /** Whether the wallet can start a VM now, why not, and its running and allowed VMs. */
667
+ readonly start: Schema.Union<readonly [Schema.Struct<{
668
+ readonly observed: Schema.Literal<true>;
669
+ } & {
670
+ canStart: Schema.Boolean;
671
+ blockedReason: Schema.optional<Schema.String>;
672
+ billingStatus: Schema.optional<Schema.String>;
673
+ runningVms: Schema.Int;
674
+ allowedVms: Schema.Int;
675
+ }>, Schema.Struct<{
676
+ readonly observed: Schema.Literal<false>;
677
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
678
+ readonly boat: Schema.optional<Schema.Struct<{
679
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
680
+ readonly retryable: Schema.Boolean;
681
+ readonly operation: Schema.optional<Schema.String>;
682
+ readonly code: Schema.optional<Schema.String>;
683
+ readonly message: Schema.optional<Schema.String>;
684
+ readonly requestId: Schema.optional<Schema.String>;
685
+ readonly status: Schema.optional<Schema.Int>;
686
+ readonly permission: Schema.optional<Schema.String>;
687
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
688
+ readonly retryAt: Schema.optional<Schema.String>;
689
+ readonly billingUrl: Schema.optional<Schema.String>;
690
+ }>>;
691
+ }>]>;
692
+ /** Saved snapshot slots of the wallet (`GET /saved-snapshots`). */
693
+ readonly snapshots: Schema.Union<readonly [Schema.Struct<{
694
+ readonly observed: Schema.Literal<true>;
695
+ } & {
696
+ used: Schema.Int;
697
+ included: Schema.Int;
698
+ }>, Schema.Struct<{
699
+ readonly observed: Schema.Literal<false>;
700
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
701
+ readonly boat: Schema.optional<Schema.Struct<{
702
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
703
+ readonly retryable: Schema.Boolean;
704
+ readonly operation: Schema.optional<Schema.String>;
705
+ readonly code: Schema.optional<Schema.String>;
706
+ readonly message: Schema.optional<Schema.String>;
707
+ readonly requestId: Schema.optional<Schema.String>;
708
+ readonly status: Schema.optional<Schema.Int>;
709
+ readonly permission: Schema.optional<Schema.String>;
710
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
711
+ readonly retryAt: Schema.optional<Schema.String>;
712
+ readonly billingUrl: Schema.optional<Schema.String>;
713
+ }>>;
714
+ }>]>;
715
+ }>>;
716
+ }>;
717
+ export type BoatInstallKeyWire = typeof boatInstallKeySchema.Type;
25
718
  export declare const createBoatAccountRequestSchema: Schema.Struct<{
26
719
  /** The caller's name for the account (an organization's name, say). At most 200 characters. */
27
720
  readonly label: Schema.String;
28
- /** The Boat API key. Checked with Boat by one read-only call before it is stored. */
721
+ /** The Boat key. Checked with Boat by read-only calls before it is stored; whitespace around it is trimmed. */
29
722
  readonly apiKey: Schema.String;
723
+ /**
724
+ * For a personal key: the Boat organization to bill (its id or name), sent as `X-Boat-Org` on
725
+ * every request for the account, so billing never follows the key's active wallet.
726
+ */
727
+ readonly organization: Schema.optional<Schema.String>;
30
728
  }>;
31
729
  export type CreateBoatAccountRequest = typeof createBoatAccountRequestSchema.Type;
32
730
  export declare const rotateBoatAccountKeyRequestSchema: Schema.Struct<{
33
- /** The new Boat API key, for the same Boat account: it must see every VM the account runs. */
731
+ /** The new Boat key, for the same Boat account: it must see every VM the account runs. */
34
732
  readonly apiKey: Schema.String;
35
733
  }>;
36
734
  export type RotateBoatAccountKeyRequest = typeof rotateBoatAccountKeyRequestSchema.Type;
@@ -43,6 +741,221 @@ export declare const listBoatAccountsResponseSchema: Schema.Struct<{
43
741
  readonly createdAt: Schema.String;
44
742
  /** When its key was last replaced; null when it still has the key it was created with. */
45
743
  readonly keyRotatedAt: Schema.NullOr<Schema.String>;
744
+ /** The Boat organization the account bills, sent on every request for it; null: none named. */
745
+ readonly organization: Schema.optional<Schema.NullOr<Schema.String>>;
746
+ /** The key's last report, with when it was observed; null until the key is checked. */
747
+ readonly report: Schema.optional<Schema.NullOr<Schema.Struct<{
748
+ readonly observedAt: Schema.String;
749
+ /** The Boat organization the account bills (`X-Boat-Org` on every request), or null. */
750
+ readonly organization: Schema.NullOr<Schema.String>;
751
+ /** Who the key is (`GET /me`). */
752
+ readonly identity: Schema.Union<readonly [Schema.Struct<{
753
+ readonly observed: Schema.Literal<true>;
754
+ } & {
755
+ /**
756
+ * Boat's id for the account the key belongs to (`GET /me` `user.id`). A Boat account, never a
757
+ * Sealant person: it is not a `PersonId` and names no one on this install.
758
+ */
759
+ accountId: Schema.optional<Schema.String>;
760
+ login: Schema.optional<Schema.String>;
761
+ displayName: Schema.optional<Schema.String>;
762
+ serviceAccount: Schema.optional<Schema.Boolean>;
763
+ accountStatus: Schema.Literals<readonly ["active", "suspended", "closed", "unknown"]>;
764
+ }>, Schema.Struct<{
765
+ readonly observed: Schema.Literal<false>;
766
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
767
+ readonly boat: Schema.optional<Schema.Struct<{
768
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
769
+ readonly retryable: Schema.Boolean;
770
+ readonly operation: Schema.optional<Schema.String>;
771
+ readonly code: Schema.optional<Schema.String>;
772
+ readonly message: Schema.optional<Schema.String>;
773
+ readonly requestId: Schema.optional<Schema.String>;
774
+ readonly status: Schema.optional<Schema.Int>;
775
+ readonly permission: Schema.optional<Schema.String>;
776
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
777
+ readonly retryAt: Schema.optional<Schema.String>;
778
+ readonly billingUrl: Schema.optional<Schema.String>;
779
+ }>>;
780
+ }>]>;
781
+ /** A personal (account) key, or an organization's key. */
782
+ readonly keyKind: Schema.Union<readonly [Schema.Struct<{
783
+ readonly observed: Schema.Literal<true>;
784
+ } & {
785
+ kind: Schema.Literals<readonly ["personal", "organization"]>;
786
+ }>, Schema.Struct<{
787
+ readonly observed: Schema.Literal<false>;
788
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
789
+ readonly boat: Schema.optional<Schema.Struct<{
790
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
791
+ readonly retryable: Schema.Boolean;
792
+ readonly operation: Schema.optional<Schema.String>;
793
+ readonly code: Schema.optional<Schema.String>;
794
+ readonly message: Schema.optional<Schema.String>;
795
+ readonly requestId: Schema.optional<Schema.String>;
796
+ readonly status: Schema.optional<Schema.Int>;
797
+ readonly permission: Schema.optional<Schema.String>;
798
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
799
+ readonly retryAt: Schema.optional<Schema.String>;
800
+ readonly billingUrl: Schema.optional<Schema.String>;
801
+ }>>;
802
+ }>]>;
803
+ /** Which wallet a VM started with the key bills (`GET /limits`). */
804
+ readonly wallet: Schema.Union<readonly [Schema.Struct<{
805
+ readonly observed: Schema.Literal<true>;
806
+ } & {
807
+ kind: Schema.Literals<readonly ["personal", "organization"]>;
808
+ organizationId: Schema.optional<Schema.String>;
809
+ organizationName: Schema.optional<Schema.String>;
810
+ role: Schema.optional<Schema.String>;
811
+ }>, Schema.Struct<{
812
+ readonly observed: Schema.Literal<false>;
813
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
814
+ readonly boat: Schema.optional<Schema.Struct<{
815
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
816
+ readonly retryable: Schema.Boolean;
817
+ readonly operation: Schema.optional<Schema.String>;
818
+ readonly code: Schema.optional<Schema.String>;
819
+ readonly message: Schema.optional<Schema.String>;
820
+ readonly requestId: Schema.optional<Schema.String>;
821
+ readonly status: Schema.optional<Schema.Int>;
822
+ readonly permission: Schema.optional<Schema.String>;
823
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
824
+ readonly retryAt: Schema.optional<Schema.String>;
825
+ readonly billingUrl: Schema.optional<Schema.String>;
826
+ }>>;
827
+ }>]>;
828
+ /** The permissions Core needs of every key, from the Boat calls it makes. */
829
+ readonly requiredPermissions: Schema.$Array<Schema.String>;
830
+ /** The key's permissions (`GET /api-keys`), and which of the required ones it lacks. */
831
+ readonly permissions: Schema.Union<readonly [Schema.Struct<{
832
+ readonly observed: Schema.Literal<true>;
833
+ } & {
834
+ held: Schema.$Array<Schema.String>;
835
+ missing: Schema.$Array<Schema.String>;
836
+ /** The key is limited to some VMs or environments: it cannot reach VMs Core creates. */
837
+ limitedToSandboxes: Schema.Boolean;
838
+ }>, Schema.Struct<{
839
+ readonly observed: Schema.Literal<false>;
840
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
841
+ readonly boat: Schema.optional<Schema.Struct<{
842
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
843
+ readonly retryable: Schema.Boolean;
844
+ readonly operation: Schema.optional<Schema.String>;
845
+ readonly code: Schema.optional<Schema.String>;
846
+ readonly message: Schema.optional<Schema.String>;
847
+ readonly requestId: Schema.optional<Schema.String>;
848
+ readonly status: Schema.optional<Schema.Int>;
849
+ readonly permission: Schema.optional<Schema.String>;
850
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
851
+ readonly retryAt: Schema.optional<Schema.String>;
852
+ readonly billingUrl: Schema.optional<Schema.String>;
853
+ }>>;
854
+ }>]>;
855
+ /** When the key expires; `expiresAt` null: it never does. */
856
+ readonly expiry: Schema.Union<readonly [Schema.Struct<{
857
+ readonly observed: Schema.Literal<true>;
858
+ } & {
859
+ expiresAt: Schema.NullOr<Schema.String>;
860
+ expired: Schema.Boolean;
861
+ expiringSoon: Schema.Boolean;
862
+ }>, Schema.Struct<{
863
+ readonly observed: Schema.Literal<false>;
864
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
865
+ readonly boat: Schema.optional<Schema.Struct<{
866
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
867
+ readonly retryable: Schema.Boolean;
868
+ readonly operation: Schema.optional<Schema.String>;
869
+ readonly code: Schema.optional<Schema.String>;
870
+ readonly message: Schema.optional<Schema.String>;
871
+ readonly requestId: Schema.optional<Schema.String>;
872
+ readonly status: Schema.optional<Schema.Int>;
873
+ readonly permission: Schema.optional<Schema.String>;
874
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
875
+ readonly retryAt: Schema.optional<Schema.String>;
876
+ readonly billingUrl: Schema.optional<Schema.String>;
877
+ }>>;
878
+ }>]>;
879
+ /** Whether the wallet can start a VM now, why not, and its running and allowed VMs. */
880
+ readonly start: Schema.Union<readonly [Schema.Struct<{
881
+ readonly observed: Schema.Literal<true>;
882
+ } & {
883
+ canStart: Schema.Boolean;
884
+ blockedReason: Schema.optional<Schema.String>;
885
+ billingStatus: Schema.optional<Schema.String>;
886
+ runningVms: Schema.Int;
887
+ allowedVms: Schema.Int;
888
+ }>, Schema.Struct<{
889
+ readonly observed: Schema.Literal<false>;
890
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
891
+ readonly boat: Schema.optional<Schema.Struct<{
892
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
893
+ readonly retryable: Schema.Boolean;
894
+ readonly operation: Schema.optional<Schema.String>;
895
+ readonly code: Schema.optional<Schema.String>;
896
+ readonly message: Schema.optional<Schema.String>;
897
+ readonly requestId: Schema.optional<Schema.String>;
898
+ readonly status: Schema.optional<Schema.Int>;
899
+ readonly permission: Schema.optional<Schema.String>;
900
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
901
+ readonly retryAt: Schema.optional<Schema.String>;
902
+ readonly billingUrl: Schema.optional<Schema.String>;
903
+ }>>;
904
+ }>]>;
905
+ /** Saved snapshot slots of the wallet (`GET /saved-snapshots`). */
906
+ readonly snapshots: Schema.Union<readonly [Schema.Struct<{
907
+ readonly observed: Schema.Literal<true>;
908
+ } & {
909
+ used: Schema.Int;
910
+ included: Schema.Int;
911
+ }>, Schema.Struct<{
912
+ readonly observed: Schema.Literal<false>;
913
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
914
+ readonly boat: Schema.optional<Schema.Struct<{
915
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
916
+ readonly retryable: Schema.Boolean;
917
+ readonly operation: Schema.optional<Schema.String>;
918
+ readonly code: Schema.optional<Schema.String>;
919
+ readonly message: Schema.optional<Schema.String>;
920
+ readonly requestId: Schema.optional<Schema.String>;
921
+ readonly status: Schema.optional<Schema.Int>;
922
+ readonly permission: Schema.optional<Schema.String>;
923
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
924
+ readonly retryAt: Schema.optional<Schema.String>;
925
+ readonly billingUrl: Schema.optional<Schema.String>;
926
+ }>>;
927
+ }>]>;
928
+ }>>>;
929
+ /** The account's last full check (`prove`), kept beside its report; null until it is proven. */
930
+ readonly lastProof: Schema.optional<Schema.NullOr<Schema.Struct<{
931
+ readonly proofId: Schema.String;
932
+ readonly startedAt: Schema.String;
933
+ readonly finishedAt: Schema.String;
934
+ readonly outcome: Schema.Literals<readonly ["passed", "refused", "interrupted"]>;
935
+ readonly steps: Schema.$Array<Schema.Struct<{
936
+ readonly step: Schema.Literals<readonly ["start-vm", "run-command", "publish-port", "save-snapshot", "delete-snapshot", "delete-vm"]>;
937
+ readonly outcome: Schema.Literals<readonly ["passed", "refused", "no-answer", "not-reached"]>;
938
+ readonly boat: Schema.optional<Schema.Struct<{
939
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
940
+ readonly retryable: Schema.Boolean;
941
+ readonly operation: Schema.optional<Schema.String>;
942
+ readonly code: Schema.optional<Schema.String>;
943
+ readonly message: Schema.optional<Schema.String>;
944
+ readonly requestId: Schema.optional<Schema.String>;
945
+ readonly status: Schema.optional<Schema.Int>;
946
+ readonly permission: Schema.optional<Schema.String>;
947
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
948
+ readonly retryAt: Schema.optional<Schema.String>;
949
+ readonly billingUrl: Schema.optional<Schema.String>;
950
+ }>>;
951
+ }>>;
952
+ readonly starts: Schema.Int;
953
+ readonly leftBehind: Schema.Struct<{
954
+ readonly vm: Schema.NullOr<Schema.String>;
955
+ readonly snapshot: Schema.NullOr<Schema.String>;
956
+ readonly removalConfirmed: Schema.Boolean;
957
+ }>;
958
+ }>>>;
46
959
  }>>;
47
960
  }>;
48
961
  export type ListBoatAccountsResponse = typeof listBoatAccountsResponseSchema.Type;
@@ -53,12 +966,210 @@ export declare class BoatAccountBadRequestError extends BoatAccountBadRequestErr
53
966
  }
54
967
  declare const BoatAccountKeyRefusedError_base: Schema.Class<BoatAccountKeyRefusedError, Schema.TaggedStruct<"BoatAccountKeyRefusedError", {
55
968
  readonly message: Schema.String;
56
- readonly code: Schema.Literals<readonly ["boat-key-refused", "boat-key-unverified"]>;
969
+ readonly code: Schema.Literals<readonly ["boat-key-refused", "boat-key-unverified", "boat-key-missing-permissions"]>;
970
+ readonly missingPermissions: Schema.optional<Schema.$Array<Schema.String>>;
971
+ readonly boat: Schema.optional<Schema.Struct<{
972
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
973
+ readonly retryable: Schema.Boolean;
974
+ readonly operation: Schema.optional<Schema.String>;
975
+ readonly code: Schema.optional<Schema.String>;
976
+ readonly message: Schema.optional<Schema.String>;
977
+ readonly requestId: Schema.optional<Schema.String>;
978
+ readonly status: Schema.optional<Schema.Int>;
979
+ readonly permission: Schema.optional<Schema.String>;
980
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
981
+ readonly retryAt: Schema.optional<Schema.String>;
982
+ readonly billingUrl: Schema.optional<Schema.String>;
983
+ }>>;
984
+ readonly report: Schema.optional<Schema.Struct<{
985
+ readonly observedAt: Schema.String;
986
+ /** The Boat organization the account bills (`X-Boat-Org` on every request), or null. */
987
+ readonly organization: Schema.NullOr<Schema.String>;
988
+ /** Who the key is (`GET /me`). */
989
+ readonly identity: Schema.Union<readonly [Schema.Struct<{
990
+ readonly observed: Schema.Literal<true>;
991
+ } & {
992
+ /**
993
+ * Boat's id for the account the key belongs to (`GET /me` `user.id`). A Boat account, never a
994
+ * Sealant person: it is not a `PersonId` and names no one on this install.
995
+ */
996
+ accountId: Schema.optional<Schema.String>;
997
+ login: Schema.optional<Schema.String>;
998
+ displayName: Schema.optional<Schema.String>;
999
+ serviceAccount: Schema.optional<Schema.Boolean>;
1000
+ accountStatus: Schema.Literals<readonly ["active", "suspended", "closed", "unknown"]>;
1001
+ }>, Schema.Struct<{
1002
+ readonly observed: Schema.Literal<false>;
1003
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
1004
+ readonly boat: Schema.optional<Schema.Struct<{
1005
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
1006
+ readonly retryable: Schema.Boolean;
1007
+ readonly operation: Schema.optional<Schema.String>;
1008
+ readonly code: Schema.optional<Schema.String>;
1009
+ readonly message: Schema.optional<Schema.String>;
1010
+ readonly requestId: Schema.optional<Schema.String>;
1011
+ readonly status: Schema.optional<Schema.Int>;
1012
+ readonly permission: Schema.optional<Schema.String>;
1013
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
1014
+ readonly retryAt: Schema.optional<Schema.String>;
1015
+ readonly billingUrl: Schema.optional<Schema.String>;
1016
+ }>>;
1017
+ }>]>;
1018
+ /** A personal (account) key, or an organization's key. */
1019
+ readonly keyKind: Schema.Union<readonly [Schema.Struct<{
1020
+ readonly observed: Schema.Literal<true>;
1021
+ } & {
1022
+ kind: Schema.Literals<readonly ["personal", "organization"]>;
1023
+ }>, Schema.Struct<{
1024
+ readonly observed: Schema.Literal<false>;
1025
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
1026
+ readonly boat: Schema.optional<Schema.Struct<{
1027
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
1028
+ readonly retryable: Schema.Boolean;
1029
+ readonly operation: Schema.optional<Schema.String>;
1030
+ readonly code: Schema.optional<Schema.String>;
1031
+ readonly message: Schema.optional<Schema.String>;
1032
+ readonly requestId: Schema.optional<Schema.String>;
1033
+ readonly status: Schema.optional<Schema.Int>;
1034
+ readonly permission: Schema.optional<Schema.String>;
1035
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
1036
+ readonly retryAt: Schema.optional<Schema.String>;
1037
+ readonly billingUrl: Schema.optional<Schema.String>;
1038
+ }>>;
1039
+ }>]>;
1040
+ /** Which wallet a VM started with the key bills (`GET /limits`). */
1041
+ readonly wallet: Schema.Union<readonly [Schema.Struct<{
1042
+ readonly observed: Schema.Literal<true>;
1043
+ } & {
1044
+ kind: Schema.Literals<readonly ["personal", "organization"]>;
1045
+ organizationId: Schema.optional<Schema.String>;
1046
+ organizationName: Schema.optional<Schema.String>;
1047
+ role: Schema.optional<Schema.String>;
1048
+ }>, Schema.Struct<{
1049
+ readonly observed: Schema.Literal<false>;
1050
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
1051
+ readonly boat: Schema.optional<Schema.Struct<{
1052
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
1053
+ readonly retryable: Schema.Boolean;
1054
+ readonly operation: Schema.optional<Schema.String>;
1055
+ readonly code: Schema.optional<Schema.String>;
1056
+ readonly message: Schema.optional<Schema.String>;
1057
+ readonly requestId: Schema.optional<Schema.String>;
1058
+ readonly status: Schema.optional<Schema.Int>;
1059
+ readonly permission: Schema.optional<Schema.String>;
1060
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
1061
+ readonly retryAt: Schema.optional<Schema.String>;
1062
+ readonly billingUrl: Schema.optional<Schema.String>;
1063
+ }>>;
1064
+ }>]>;
1065
+ /** The permissions Core needs of every key, from the Boat calls it makes. */
1066
+ readonly requiredPermissions: Schema.$Array<Schema.String>;
1067
+ /** The key's permissions (`GET /api-keys`), and which of the required ones it lacks. */
1068
+ readonly permissions: Schema.Union<readonly [Schema.Struct<{
1069
+ readonly observed: Schema.Literal<true>;
1070
+ } & {
1071
+ held: Schema.$Array<Schema.String>;
1072
+ missing: Schema.$Array<Schema.String>;
1073
+ /** The key is limited to some VMs or environments: it cannot reach VMs Core creates. */
1074
+ limitedToSandboxes: Schema.Boolean;
1075
+ }>, Schema.Struct<{
1076
+ readonly observed: Schema.Literal<false>;
1077
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
1078
+ readonly boat: Schema.optional<Schema.Struct<{
1079
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
1080
+ readonly retryable: Schema.Boolean;
1081
+ readonly operation: Schema.optional<Schema.String>;
1082
+ readonly code: Schema.optional<Schema.String>;
1083
+ readonly message: Schema.optional<Schema.String>;
1084
+ readonly requestId: Schema.optional<Schema.String>;
1085
+ readonly status: Schema.optional<Schema.Int>;
1086
+ readonly permission: Schema.optional<Schema.String>;
1087
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
1088
+ readonly retryAt: Schema.optional<Schema.String>;
1089
+ readonly billingUrl: Schema.optional<Schema.String>;
1090
+ }>>;
1091
+ }>]>;
1092
+ /** When the key expires; `expiresAt` null: it never does. */
1093
+ readonly expiry: Schema.Union<readonly [Schema.Struct<{
1094
+ readonly observed: Schema.Literal<true>;
1095
+ } & {
1096
+ expiresAt: Schema.NullOr<Schema.String>;
1097
+ expired: Schema.Boolean;
1098
+ expiringSoon: Schema.Boolean;
1099
+ }>, Schema.Struct<{
1100
+ readonly observed: Schema.Literal<false>;
1101
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
1102
+ readonly boat: Schema.optional<Schema.Struct<{
1103
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
1104
+ readonly retryable: Schema.Boolean;
1105
+ readonly operation: Schema.optional<Schema.String>;
1106
+ readonly code: Schema.optional<Schema.String>;
1107
+ readonly message: Schema.optional<Schema.String>;
1108
+ readonly requestId: Schema.optional<Schema.String>;
1109
+ readonly status: Schema.optional<Schema.Int>;
1110
+ readonly permission: Schema.optional<Schema.String>;
1111
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
1112
+ readonly retryAt: Schema.optional<Schema.String>;
1113
+ readonly billingUrl: Schema.optional<Schema.String>;
1114
+ }>>;
1115
+ }>]>;
1116
+ /** Whether the wallet can start a VM now, why not, and its running and allowed VMs. */
1117
+ readonly start: Schema.Union<readonly [Schema.Struct<{
1118
+ readonly observed: Schema.Literal<true>;
1119
+ } & {
1120
+ canStart: Schema.Boolean;
1121
+ blockedReason: Schema.optional<Schema.String>;
1122
+ billingStatus: Schema.optional<Schema.String>;
1123
+ runningVms: Schema.Int;
1124
+ allowedVms: Schema.Int;
1125
+ }>, Schema.Struct<{
1126
+ readonly observed: Schema.Literal<false>;
1127
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
1128
+ readonly boat: Schema.optional<Schema.Struct<{
1129
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
1130
+ readonly retryable: Schema.Boolean;
1131
+ readonly operation: Schema.optional<Schema.String>;
1132
+ readonly code: Schema.optional<Schema.String>;
1133
+ readonly message: Schema.optional<Schema.String>;
1134
+ readonly requestId: Schema.optional<Schema.String>;
1135
+ readonly status: Schema.optional<Schema.Int>;
1136
+ readonly permission: Schema.optional<Schema.String>;
1137
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
1138
+ readonly retryAt: Schema.optional<Schema.String>;
1139
+ readonly billingUrl: Schema.optional<Schema.String>;
1140
+ }>>;
1141
+ }>]>;
1142
+ /** Saved snapshot slots of the wallet (`GET /saved-snapshots`). */
1143
+ readonly snapshots: Schema.Union<readonly [Schema.Struct<{
1144
+ readonly observed: Schema.Literal<true>;
1145
+ } & {
1146
+ used: Schema.Int;
1147
+ included: Schema.Int;
1148
+ }>, Schema.Struct<{
1149
+ readonly observed: Schema.Literal<false>;
1150
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
1151
+ readonly boat: Schema.optional<Schema.Struct<{
1152
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
1153
+ readonly retryable: Schema.Boolean;
1154
+ readonly operation: Schema.optional<Schema.String>;
1155
+ readonly code: Schema.optional<Schema.String>;
1156
+ readonly message: Schema.optional<Schema.String>;
1157
+ readonly requestId: Schema.optional<Schema.String>;
1158
+ readonly status: Schema.optional<Schema.Int>;
1159
+ readonly permission: Schema.optional<Schema.String>;
1160
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
1161
+ readonly retryAt: Schema.optional<Schema.String>;
1162
+ readonly billingUrl: Schema.optional<Schema.String>;
1163
+ }>>;
1164
+ }>]>;
1165
+ }>>;
57
1166
  }>, import("effect/Cause").YieldableError>;
58
1167
  /**
59
- * Boat refused the key (`boat-key-refused`: it answered that the key is not valid), or did not
60
- * answer whether it is (`boat-key-unverified`: Boat was unreachable; try again). Nothing was
61
- * stored or changed. The message never names the key or any part of it.
1168
+ * Boat refused the key (`boat-key-refused`: it answered that the key is not valid, has expired or
1169
+ * belongs to another organization; `boat` says which), the key provably lacks permissions Core
1170
+ * needs (`boat-key-missing-permissions`, named in `missingPermissions`), or Boat did not answer
1171
+ * whether it is valid (`boat-key-unverified`: try again). Nothing was stored or changed. The
1172
+ * message never names the key or any part of it.
62
1173
  */
63
1174
  export declare class BoatAccountKeyRefusedError extends BoatAccountKeyRefusedError_base {
64
1175
  }
@@ -69,7 +1180,7 @@ export declare class BoatAccountNotFoundError extends BoatAccountNotFoundError_b
69
1180
  }
70
1181
  declare const BoatAccountConflictError_base: Schema.Class<BoatAccountConflictError, Schema.TaggedStruct<"BoatAccountConflictError", {
71
1182
  readonly message: Schema.String;
72
- readonly code: Schema.Literals<readonly ["boat-account-in-use", "boat-key-cannot-see", "boat-account-removing", "boat-account-changed"]>;
1183
+ readonly code: Schema.Literals<readonly ["boat-account-in-use", "boat-key-cannot-see", "boat-account-removing", "boat-account-changed", "boat-account-environment", "boat-proof-running"]>;
73
1184
  readonly liveRuns: Schema.optional<Schema.Int>;
74
1185
  readonly buildsInFlight: Schema.optional<Schema.Int>;
75
1186
  readonly unseen: Schema.optional<Schema.Int>;
@@ -82,6 +1193,10 @@ declare const BoatAccountConflictError_base: Schema.Class<BoatAccountConflictErr
82
1193
  * `boat-key-cannot-see`: a rotation to a key that cannot see VMs or saved images the account has
83
1194
  * now (`unseen`), so it is most likely another Boat account's key. `boat-account-removing`: the
84
1195
  * account's removal was asked. `boat-account-changed`: another rotation won; read and try again.
1196
+ * `boat-account-environment`: the install's own key (`default`) is set in its environment, not
1197
+ * through this API. `boat-proof-running`: a full check of the account is running, or Boat may
1198
+ * still hold what one made (the message names the VM and the snapshot): a second check, a key
1199
+ * rotation and a removal wait until Core has deleted it.
85
1200
  */
86
1201
  export declare class BoatAccountConflictError extends BoatAccountConflictError_base {
87
1202
  }
@@ -96,11 +1211,426 @@ declare const BoatAccountInternalServerError_base: Schema.Class<BoatAccountInter
96
1211
  }>, import("effect/Cause").YieldableError>;
97
1212
  export declare class BoatAccountInternalServerError extends BoatAccountInternalServerError_base {
98
1213
  }
99
- export declare const BoatAccountsGroup: HttpApiGroup.HttpApiGroup<"boatAccounts", HttpApiEndpoint.HttpApiEndpoint<"createBoatAccount", "POST", "/", never, never, Schema.toCodecJson<Schema.Struct<{
1214
+ export declare const BoatAccountsGroup: HttpApiGroup.HttpApiGroup<"boatAccounts", HttpApiEndpoint.HttpApiEndpoint<"checkBoatAccount", "POST", "/:boatAccountId/check", Schema.toCodecStringTree<Schema.Struct<{
1215
+ readonly boatAccountId: Schema.String;
1216
+ }>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
1217
+ readonly boatAccountId: Schema.String;
1218
+ readonly label: Schema.String;
1219
+ /** `active`: workspaces may run in it. `removing`: its removal was asked; none may. */
1220
+ readonly state: Schema.Literals<readonly ["active", "removing"]>;
1221
+ readonly createdAt: Schema.String;
1222
+ /** When its key was last replaced; null when it still has the key it was created with. */
1223
+ readonly keyRotatedAt: Schema.NullOr<Schema.String>;
1224
+ /** The Boat organization the account bills, sent on every request for it; null: none named. */
1225
+ readonly organization: Schema.optional<Schema.NullOr<Schema.String>>;
1226
+ /** The key's last report, with when it was observed; null until the key is checked. */
1227
+ readonly report: Schema.optional<Schema.NullOr<Schema.Struct<{
1228
+ readonly observedAt: Schema.String;
1229
+ /** The Boat organization the account bills (`X-Boat-Org` on every request), or null. */
1230
+ readonly organization: Schema.NullOr<Schema.String>;
1231
+ /** Who the key is (`GET /me`). */
1232
+ readonly identity: Schema.Union<readonly [Schema.Struct<{
1233
+ readonly observed: Schema.Literal<true>;
1234
+ } & {
1235
+ /**
1236
+ * Boat's id for the account the key belongs to (`GET /me` `user.id`). A Boat account, never a
1237
+ * Sealant person: it is not a `PersonId` and names no one on this install.
1238
+ */
1239
+ accountId: Schema.optional<Schema.String>;
1240
+ login: Schema.optional<Schema.String>;
1241
+ displayName: Schema.optional<Schema.String>;
1242
+ serviceAccount: Schema.optional<Schema.Boolean>;
1243
+ accountStatus: Schema.Literals<readonly ["active", "suspended", "closed", "unknown"]>;
1244
+ }>, Schema.Struct<{
1245
+ readonly observed: Schema.Literal<false>;
1246
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
1247
+ readonly boat: Schema.optional<Schema.Struct<{
1248
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
1249
+ readonly retryable: Schema.Boolean;
1250
+ readonly operation: Schema.optional<Schema.String>;
1251
+ readonly code: Schema.optional<Schema.String>;
1252
+ readonly message: Schema.optional<Schema.String>;
1253
+ readonly requestId: Schema.optional<Schema.String>;
1254
+ readonly status: Schema.optional<Schema.Int>;
1255
+ readonly permission: Schema.optional<Schema.String>;
1256
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
1257
+ readonly retryAt: Schema.optional<Schema.String>;
1258
+ readonly billingUrl: Schema.optional<Schema.String>;
1259
+ }>>;
1260
+ }>]>;
1261
+ /** A personal (account) key, or an organization's key. */
1262
+ readonly keyKind: Schema.Union<readonly [Schema.Struct<{
1263
+ readonly observed: Schema.Literal<true>;
1264
+ } & {
1265
+ kind: Schema.Literals<readonly ["personal", "organization"]>;
1266
+ }>, Schema.Struct<{
1267
+ readonly observed: Schema.Literal<false>;
1268
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
1269
+ readonly boat: Schema.optional<Schema.Struct<{
1270
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
1271
+ readonly retryable: Schema.Boolean;
1272
+ readonly operation: Schema.optional<Schema.String>;
1273
+ readonly code: Schema.optional<Schema.String>;
1274
+ readonly message: Schema.optional<Schema.String>;
1275
+ readonly requestId: Schema.optional<Schema.String>;
1276
+ readonly status: Schema.optional<Schema.Int>;
1277
+ readonly permission: Schema.optional<Schema.String>;
1278
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
1279
+ readonly retryAt: Schema.optional<Schema.String>;
1280
+ readonly billingUrl: Schema.optional<Schema.String>;
1281
+ }>>;
1282
+ }>]>;
1283
+ /** Which wallet a VM started with the key bills (`GET /limits`). */
1284
+ readonly wallet: Schema.Union<readonly [Schema.Struct<{
1285
+ readonly observed: Schema.Literal<true>;
1286
+ } & {
1287
+ kind: Schema.Literals<readonly ["personal", "organization"]>;
1288
+ organizationId: Schema.optional<Schema.String>;
1289
+ organizationName: Schema.optional<Schema.String>;
1290
+ role: Schema.optional<Schema.String>;
1291
+ }>, Schema.Struct<{
1292
+ readonly observed: Schema.Literal<false>;
1293
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
1294
+ readonly boat: Schema.optional<Schema.Struct<{
1295
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
1296
+ readonly retryable: Schema.Boolean;
1297
+ readonly operation: Schema.optional<Schema.String>;
1298
+ readonly code: Schema.optional<Schema.String>;
1299
+ readonly message: Schema.optional<Schema.String>;
1300
+ readonly requestId: Schema.optional<Schema.String>;
1301
+ readonly status: Schema.optional<Schema.Int>;
1302
+ readonly permission: Schema.optional<Schema.String>;
1303
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
1304
+ readonly retryAt: Schema.optional<Schema.String>;
1305
+ readonly billingUrl: Schema.optional<Schema.String>;
1306
+ }>>;
1307
+ }>]>;
1308
+ /** The permissions Core needs of every key, from the Boat calls it makes. */
1309
+ readonly requiredPermissions: Schema.$Array<Schema.String>;
1310
+ /** The key's permissions (`GET /api-keys`), and which of the required ones it lacks. */
1311
+ readonly permissions: Schema.Union<readonly [Schema.Struct<{
1312
+ readonly observed: Schema.Literal<true>;
1313
+ } & {
1314
+ held: Schema.$Array<Schema.String>;
1315
+ missing: Schema.$Array<Schema.String>;
1316
+ /** The key is limited to some VMs or environments: it cannot reach VMs Core creates. */
1317
+ limitedToSandboxes: Schema.Boolean;
1318
+ }>, Schema.Struct<{
1319
+ readonly observed: Schema.Literal<false>;
1320
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
1321
+ readonly boat: Schema.optional<Schema.Struct<{
1322
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
1323
+ readonly retryable: Schema.Boolean;
1324
+ readonly operation: Schema.optional<Schema.String>;
1325
+ readonly code: Schema.optional<Schema.String>;
1326
+ readonly message: Schema.optional<Schema.String>;
1327
+ readonly requestId: Schema.optional<Schema.String>;
1328
+ readonly status: Schema.optional<Schema.Int>;
1329
+ readonly permission: Schema.optional<Schema.String>;
1330
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
1331
+ readonly retryAt: Schema.optional<Schema.String>;
1332
+ readonly billingUrl: Schema.optional<Schema.String>;
1333
+ }>>;
1334
+ }>]>;
1335
+ /** When the key expires; `expiresAt` null: it never does. */
1336
+ readonly expiry: Schema.Union<readonly [Schema.Struct<{
1337
+ readonly observed: Schema.Literal<true>;
1338
+ } & {
1339
+ expiresAt: Schema.NullOr<Schema.String>;
1340
+ expired: Schema.Boolean;
1341
+ expiringSoon: Schema.Boolean;
1342
+ }>, Schema.Struct<{
1343
+ readonly observed: Schema.Literal<false>;
1344
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
1345
+ readonly boat: Schema.optional<Schema.Struct<{
1346
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
1347
+ readonly retryable: Schema.Boolean;
1348
+ readonly operation: Schema.optional<Schema.String>;
1349
+ readonly code: Schema.optional<Schema.String>;
1350
+ readonly message: Schema.optional<Schema.String>;
1351
+ readonly requestId: Schema.optional<Schema.String>;
1352
+ readonly status: Schema.optional<Schema.Int>;
1353
+ readonly permission: Schema.optional<Schema.String>;
1354
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
1355
+ readonly retryAt: Schema.optional<Schema.String>;
1356
+ readonly billingUrl: Schema.optional<Schema.String>;
1357
+ }>>;
1358
+ }>]>;
1359
+ /** Whether the wallet can start a VM now, why not, and its running and allowed VMs. */
1360
+ readonly start: Schema.Union<readonly [Schema.Struct<{
1361
+ readonly observed: Schema.Literal<true>;
1362
+ } & {
1363
+ canStart: Schema.Boolean;
1364
+ blockedReason: Schema.optional<Schema.String>;
1365
+ billingStatus: Schema.optional<Schema.String>;
1366
+ runningVms: Schema.Int;
1367
+ allowedVms: Schema.Int;
1368
+ }>, Schema.Struct<{
1369
+ readonly observed: Schema.Literal<false>;
1370
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
1371
+ readonly boat: Schema.optional<Schema.Struct<{
1372
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
1373
+ readonly retryable: Schema.Boolean;
1374
+ readonly operation: Schema.optional<Schema.String>;
1375
+ readonly code: Schema.optional<Schema.String>;
1376
+ readonly message: Schema.optional<Schema.String>;
1377
+ readonly requestId: Schema.optional<Schema.String>;
1378
+ readonly status: Schema.optional<Schema.Int>;
1379
+ readonly permission: Schema.optional<Schema.String>;
1380
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
1381
+ readonly retryAt: Schema.optional<Schema.String>;
1382
+ readonly billingUrl: Schema.optional<Schema.String>;
1383
+ }>>;
1384
+ }>]>;
1385
+ /** Saved snapshot slots of the wallet (`GET /saved-snapshots`). */
1386
+ readonly snapshots: Schema.Union<readonly [Schema.Struct<{
1387
+ readonly observed: Schema.Literal<true>;
1388
+ } & {
1389
+ used: Schema.Int;
1390
+ included: Schema.Int;
1391
+ }>, Schema.Struct<{
1392
+ readonly observed: Schema.Literal<false>;
1393
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
1394
+ readonly boat: Schema.optional<Schema.Struct<{
1395
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
1396
+ readonly retryable: Schema.Boolean;
1397
+ readonly operation: Schema.optional<Schema.String>;
1398
+ readonly code: Schema.optional<Schema.String>;
1399
+ readonly message: Schema.optional<Schema.String>;
1400
+ readonly requestId: Schema.optional<Schema.String>;
1401
+ readonly status: Schema.optional<Schema.Int>;
1402
+ readonly permission: Schema.optional<Schema.String>;
1403
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
1404
+ readonly retryAt: Schema.optional<Schema.String>;
1405
+ readonly billingUrl: Schema.optional<Schema.String>;
1406
+ }>>;
1407
+ }>]>;
1408
+ }>>>;
1409
+ /** The account's last full check (`prove`), kept beside its report; null until it is proven. */
1410
+ readonly lastProof: Schema.optional<Schema.NullOr<Schema.Struct<{
1411
+ readonly proofId: Schema.String;
1412
+ readonly startedAt: Schema.String;
1413
+ readonly finishedAt: Schema.String;
1414
+ readonly outcome: Schema.Literals<readonly ["passed", "refused", "interrupted"]>;
1415
+ readonly steps: Schema.$Array<Schema.Struct<{
1416
+ readonly step: Schema.Literals<readonly ["start-vm", "run-command", "publish-port", "save-snapshot", "delete-snapshot", "delete-vm"]>;
1417
+ readonly outcome: Schema.Literals<readonly ["passed", "refused", "no-answer", "not-reached"]>;
1418
+ readonly boat: Schema.optional<Schema.Struct<{
1419
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
1420
+ readonly retryable: Schema.Boolean;
1421
+ readonly operation: Schema.optional<Schema.String>;
1422
+ readonly code: Schema.optional<Schema.String>;
1423
+ readonly message: Schema.optional<Schema.String>;
1424
+ readonly requestId: Schema.optional<Schema.String>;
1425
+ readonly status: Schema.optional<Schema.Int>;
1426
+ readonly permission: Schema.optional<Schema.String>;
1427
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
1428
+ readonly retryAt: Schema.optional<Schema.String>;
1429
+ readonly billingUrl: Schema.optional<Schema.String>;
1430
+ }>>;
1431
+ }>>;
1432
+ readonly starts: Schema.Int;
1433
+ readonly leftBehind: Schema.Struct<{
1434
+ readonly vm: Schema.NullOr<Schema.String>;
1435
+ readonly snapshot: Schema.NullOr<Schema.String>;
1436
+ readonly removalConfirmed: Schema.Boolean;
1437
+ }>;
1438
+ }>>>;
1439
+ }>>, Schema.toCodecJson<typeof BoatAccountKeyRefusedError | typeof BoatAccountNotFoundError | typeof BoatAccountServiceUnavailableError | typeof BoatAccountInternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"checkBoatInstallKey", "POST", "/install-key", never, never, never, never, Schema.toCodecJson<Schema.Struct<{
1440
+ readonly label: Schema.String;
1441
+ /** The key's last report, with when it was observed; null until it is checked. */
1442
+ readonly report: Schema.NullOr<Schema.Struct<{
1443
+ readonly observedAt: Schema.String;
1444
+ /** The Boat organization the account bills (`X-Boat-Org` on every request), or null. */
1445
+ readonly organization: Schema.NullOr<Schema.String>;
1446
+ /** Who the key is (`GET /me`). */
1447
+ readonly identity: Schema.Union<readonly [Schema.Struct<{
1448
+ readonly observed: Schema.Literal<true>;
1449
+ } & {
1450
+ /**
1451
+ * Boat's id for the account the key belongs to (`GET /me` `user.id`). A Boat account, never a
1452
+ * Sealant person: it is not a `PersonId` and names no one on this install.
1453
+ */
1454
+ accountId: Schema.optional<Schema.String>;
1455
+ login: Schema.optional<Schema.String>;
1456
+ displayName: Schema.optional<Schema.String>;
1457
+ serviceAccount: Schema.optional<Schema.Boolean>;
1458
+ accountStatus: Schema.Literals<readonly ["active", "suspended", "closed", "unknown"]>;
1459
+ }>, Schema.Struct<{
1460
+ readonly observed: Schema.Literal<false>;
1461
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
1462
+ readonly boat: Schema.optional<Schema.Struct<{
1463
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
1464
+ readonly retryable: Schema.Boolean;
1465
+ readonly operation: Schema.optional<Schema.String>;
1466
+ readonly code: Schema.optional<Schema.String>;
1467
+ readonly message: Schema.optional<Schema.String>;
1468
+ readonly requestId: Schema.optional<Schema.String>;
1469
+ readonly status: Schema.optional<Schema.Int>;
1470
+ readonly permission: Schema.optional<Schema.String>;
1471
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
1472
+ readonly retryAt: Schema.optional<Schema.String>;
1473
+ readonly billingUrl: Schema.optional<Schema.String>;
1474
+ }>>;
1475
+ }>]>;
1476
+ /** A personal (account) key, or an organization's key. */
1477
+ readonly keyKind: Schema.Union<readonly [Schema.Struct<{
1478
+ readonly observed: Schema.Literal<true>;
1479
+ } & {
1480
+ kind: Schema.Literals<readonly ["personal", "organization"]>;
1481
+ }>, Schema.Struct<{
1482
+ readonly observed: Schema.Literal<false>;
1483
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
1484
+ readonly boat: Schema.optional<Schema.Struct<{
1485
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
1486
+ readonly retryable: Schema.Boolean;
1487
+ readonly operation: Schema.optional<Schema.String>;
1488
+ readonly code: Schema.optional<Schema.String>;
1489
+ readonly message: Schema.optional<Schema.String>;
1490
+ readonly requestId: Schema.optional<Schema.String>;
1491
+ readonly status: Schema.optional<Schema.Int>;
1492
+ readonly permission: Schema.optional<Schema.String>;
1493
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
1494
+ readonly retryAt: Schema.optional<Schema.String>;
1495
+ readonly billingUrl: Schema.optional<Schema.String>;
1496
+ }>>;
1497
+ }>]>;
1498
+ /** Which wallet a VM started with the key bills (`GET /limits`). */
1499
+ readonly wallet: Schema.Union<readonly [Schema.Struct<{
1500
+ readonly observed: Schema.Literal<true>;
1501
+ } & {
1502
+ kind: Schema.Literals<readonly ["personal", "organization"]>;
1503
+ organizationId: Schema.optional<Schema.String>;
1504
+ organizationName: Schema.optional<Schema.String>;
1505
+ role: Schema.optional<Schema.String>;
1506
+ }>, Schema.Struct<{
1507
+ readonly observed: Schema.Literal<false>;
1508
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
1509
+ readonly boat: Schema.optional<Schema.Struct<{
1510
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
1511
+ readonly retryable: Schema.Boolean;
1512
+ readonly operation: Schema.optional<Schema.String>;
1513
+ readonly code: Schema.optional<Schema.String>;
1514
+ readonly message: Schema.optional<Schema.String>;
1515
+ readonly requestId: Schema.optional<Schema.String>;
1516
+ readonly status: Schema.optional<Schema.Int>;
1517
+ readonly permission: Schema.optional<Schema.String>;
1518
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
1519
+ readonly retryAt: Schema.optional<Schema.String>;
1520
+ readonly billingUrl: Schema.optional<Schema.String>;
1521
+ }>>;
1522
+ }>]>;
1523
+ /** The permissions Core needs of every key, from the Boat calls it makes. */
1524
+ readonly requiredPermissions: Schema.$Array<Schema.String>;
1525
+ /** The key's permissions (`GET /api-keys`), and which of the required ones it lacks. */
1526
+ readonly permissions: Schema.Union<readonly [Schema.Struct<{
1527
+ readonly observed: Schema.Literal<true>;
1528
+ } & {
1529
+ held: Schema.$Array<Schema.String>;
1530
+ missing: Schema.$Array<Schema.String>;
1531
+ /** The key is limited to some VMs or environments: it cannot reach VMs Core creates. */
1532
+ limitedToSandboxes: Schema.Boolean;
1533
+ }>, Schema.Struct<{
1534
+ readonly observed: Schema.Literal<false>;
1535
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
1536
+ readonly boat: Schema.optional<Schema.Struct<{
1537
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
1538
+ readonly retryable: Schema.Boolean;
1539
+ readonly operation: Schema.optional<Schema.String>;
1540
+ readonly code: Schema.optional<Schema.String>;
1541
+ readonly message: Schema.optional<Schema.String>;
1542
+ readonly requestId: Schema.optional<Schema.String>;
1543
+ readonly status: Schema.optional<Schema.Int>;
1544
+ readonly permission: Schema.optional<Schema.String>;
1545
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
1546
+ readonly retryAt: Schema.optional<Schema.String>;
1547
+ readonly billingUrl: Schema.optional<Schema.String>;
1548
+ }>>;
1549
+ }>]>;
1550
+ /** When the key expires; `expiresAt` null: it never does. */
1551
+ readonly expiry: Schema.Union<readonly [Schema.Struct<{
1552
+ readonly observed: Schema.Literal<true>;
1553
+ } & {
1554
+ expiresAt: Schema.NullOr<Schema.String>;
1555
+ expired: Schema.Boolean;
1556
+ expiringSoon: Schema.Boolean;
1557
+ }>, Schema.Struct<{
1558
+ readonly observed: Schema.Literal<false>;
1559
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
1560
+ readonly boat: Schema.optional<Schema.Struct<{
1561
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
1562
+ readonly retryable: Schema.Boolean;
1563
+ readonly operation: Schema.optional<Schema.String>;
1564
+ readonly code: Schema.optional<Schema.String>;
1565
+ readonly message: Schema.optional<Schema.String>;
1566
+ readonly requestId: Schema.optional<Schema.String>;
1567
+ readonly status: Schema.optional<Schema.Int>;
1568
+ readonly permission: Schema.optional<Schema.String>;
1569
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
1570
+ readonly retryAt: Schema.optional<Schema.String>;
1571
+ readonly billingUrl: Schema.optional<Schema.String>;
1572
+ }>>;
1573
+ }>]>;
1574
+ /** Whether the wallet can start a VM now, why not, and its running and allowed VMs. */
1575
+ readonly start: Schema.Union<readonly [Schema.Struct<{
1576
+ readonly observed: Schema.Literal<true>;
1577
+ } & {
1578
+ canStart: Schema.Boolean;
1579
+ blockedReason: Schema.optional<Schema.String>;
1580
+ billingStatus: Schema.optional<Schema.String>;
1581
+ runningVms: Schema.Int;
1582
+ allowedVms: Schema.Int;
1583
+ }>, Schema.Struct<{
1584
+ readonly observed: Schema.Literal<false>;
1585
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
1586
+ readonly boat: Schema.optional<Schema.Struct<{
1587
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
1588
+ readonly retryable: Schema.Boolean;
1589
+ readonly operation: Schema.optional<Schema.String>;
1590
+ readonly code: Schema.optional<Schema.String>;
1591
+ readonly message: Schema.optional<Schema.String>;
1592
+ readonly requestId: Schema.optional<Schema.String>;
1593
+ readonly status: Schema.optional<Schema.Int>;
1594
+ readonly permission: Schema.optional<Schema.String>;
1595
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
1596
+ readonly retryAt: Schema.optional<Schema.String>;
1597
+ readonly billingUrl: Schema.optional<Schema.String>;
1598
+ }>>;
1599
+ }>]>;
1600
+ /** Saved snapshot slots of the wallet (`GET /saved-snapshots`). */
1601
+ readonly snapshots: Schema.Union<readonly [Schema.Struct<{
1602
+ readonly observed: Schema.Literal<true>;
1603
+ } & {
1604
+ used: Schema.Int;
1605
+ included: Schema.Int;
1606
+ }>, Schema.Struct<{
1607
+ readonly observed: Schema.Literal<false>;
1608
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
1609
+ readonly boat: Schema.optional<Schema.Struct<{
1610
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
1611
+ readonly retryable: Schema.Boolean;
1612
+ readonly operation: Schema.optional<Schema.String>;
1613
+ readonly code: Schema.optional<Schema.String>;
1614
+ readonly message: Schema.optional<Schema.String>;
1615
+ readonly requestId: Schema.optional<Schema.String>;
1616
+ readonly status: Schema.optional<Schema.Int>;
1617
+ readonly permission: Schema.optional<Schema.String>;
1618
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
1619
+ readonly retryAt: Schema.optional<Schema.String>;
1620
+ readonly billingUrl: Schema.optional<Schema.String>;
1621
+ }>>;
1622
+ }>]>;
1623
+ }>>;
1624
+ }>>, Schema.toCodecJson<typeof BoatAccountKeyRefusedError | typeof BoatAccountServiceUnavailableError | typeof BoatAccountInternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"createBoatAccount", "POST", "/", never, never, Schema.toCodecJson<Schema.Struct<{
100
1625
  /** The caller's name for the account (an organization's name, say). At most 200 characters. */
101
1626
  readonly label: Schema.String;
102
- /** The Boat API key. Checked with Boat by one read-only call before it is stored. */
1627
+ /** The Boat key. Checked with Boat by read-only calls before it is stored; whitespace around it is trimmed. */
103
1628
  readonly apiKey: Schema.String;
1629
+ /**
1630
+ * For a personal key: the Boat organization to bill (its id or name), sent as `X-Boat-Org` on
1631
+ * every request for the account, so billing never follows the key's active wallet.
1632
+ */
1633
+ readonly organization: Schema.optional<Schema.String>;
104
1634
  }>>, never, Schema.toCodecJson<Schema.Struct<{
105
1635
  readonly boatAccountId: Schema.String;
106
1636
  readonly label: Schema.String;
@@ -109,7 +1639,407 @@ export declare const BoatAccountsGroup: HttpApiGroup.HttpApiGroup<"boatAccounts"
109
1639
  readonly createdAt: Schema.String;
110
1640
  /** When its key was last replaced; null when it still has the key it was created with. */
111
1641
  readonly keyRotatedAt: Schema.NullOr<Schema.String>;
112
- }>>, Schema.toCodecJson<typeof BoatAccountBadRequestError | typeof BoatAccountKeyRefusedError | typeof BoatAccountServiceUnavailableError | typeof BoatAccountInternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"listBoatAccounts", "GET", "/", never, never, never, never, Schema.toCodecJson<Schema.Struct<{
1642
+ /** The Boat organization the account bills, sent on every request for it; null: none named. */
1643
+ readonly organization: Schema.optional<Schema.NullOr<Schema.String>>;
1644
+ /** The key's last report, with when it was observed; null until the key is checked. */
1645
+ readonly report: Schema.optional<Schema.NullOr<Schema.Struct<{
1646
+ readonly observedAt: Schema.String;
1647
+ /** The Boat organization the account bills (`X-Boat-Org` on every request), or null. */
1648
+ readonly organization: Schema.NullOr<Schema.String>;
1649
+ /** Who the key is (`GET /me`). */
1650
+ readonly identity: Schema.Union<readonly [Schema.Struct<{
1651
+ readonly observed: Schema.Literal<true>;
1652
+ } & {
1653
+ /**
1654
+ * Boat's id for the account the key belongs to (`GET /me` `user.id`). A Boat account, never a
1655
+ * Sealant person: it is not a `PersonId` and names no one on this install.
1656
+ */
1657
+ accountId: Schema.optional<Schema.String>;
1658
+ login: Schema.optional<Schema.String>;
1659
+ displayName: Schema.optional<Schema.String>;
1660
+ serviceAccount: Schema.optional<Schema.Boolean>;
1661
+ accountStatus: Schema.Literals<readonly ["active", "suspended", "closed", "unknown"]>;
1662
+ }>, Schema.Struct<{
1663
+ readonly observed: Schema.Literal<false>;
1664
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
1665
+ readonly boat: Schema.optional<Schema.Struct<{
1666
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
1667
+ readonly retryable: Schema.Boolean;
1668
+ readonly operation: Schema.optional<Schema.String>;
1669
+ readonly code: Schema.optional<Schema.String>;
1670
+ readonly message: Schema.optional<Schema.String>;
1671
+ readonly requestId: Schema.optional<Schema.String>;
1672
+ readonly status: Schema.optional<Schema.Int>;
1673
+ readonly permission: Schema.optional<Schema.String>;
1674
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
1675
+ readonly retryAt: Schema.optional<Schema.String>;
1676
+ readonly billingUrl: Schema.optional<Schema.String>;
1677
+ }>>;
1678
+ }>]>;
1679
+ /** A personal (account) key, or an organization's key. */
1680
+ readonly keyKind: Schema.Union<readonly [Schema.Struct<{
1681
+ readonly observed: Schema.Literal<true>;
1682
+ } & {
1683
+ kind: Schema.Literals<readonly ["personal", "organization"]>;
1684
+ }>, Schema.Struct<{
1685
+ readonly observed: Schema.Literal<false>;
1686
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
1687
+ readonly boat: Schema.optional<Schema.Struct<{
1688
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
1689
+ readonly retryable: Schema.Boolean;
1690
+ readonly operation: Schema.optional<Schema.String>;
1691
+ readonly code: Schema.optional<Schema.String>;
1692
+ readonly message: Schema.optional<Schema.String>;
1693
+ readonly requestId: Schema.optional<Schema.String>;
1694
+ readonly status: Schema.optional<Schema.Int>;
1695
+ readonly permission: Schema.optional<Schema.String>;
1696
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
1697
+ readonly retryAt: Schema.optional<Schema.String>;
1698
+ readonly billingUrl: Schema.optional<Schema.String>;
1699
+ }>>;
1700
+ }>]>;
1701
+ /** Which wallet a VM started with the key bills (`GET /limits`). */
1702
+ readonly wallet: Schema.Union<readonly [Schema.Struct<{
1703
+ readonly observed: Schema.Literal<true>;
1704
+ } & {
1705
+ kind: Schema.Literals<readonly ["personal", "organization"]>;
1706
+ organizationId: Schema.optional<Schema.String>;
1707
+ organizationName: Schema.optional<Schema.String>;
1708
+ role: Schema.optional<Schema.String>;
1709
+ }>, Schema.Struct<{
1710
+ readonly observed: Schema.Literal<false>;
1711
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
1712
+ readonly boat: Schema.optional<Schema.Struct<{
1713
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
1714
+ readonly retryable: Schema.Boolean;
1715
+ readonly operation: Schema.optional<Schema.String>;
1716
+ readonly code: Schema.optional<Schema.String>;
1717
+ readonly message: Schema.optional<Schema.String>;
1718
+ readonly requestId: Schema.optional<Schema.String>;
1719
+ readonly status: Schema.optional<Schema.Int>;
1720
+ readonly permission: Schema.optional<Schema.String>;
1721
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
1722
+ readonly retryAt: Schema.optional<Schema.String>;
1723
+ readonly billingUrl: Schema.optional<Schema.String>;
1724
+ }>>;
1725
+ }>]>;
1726
+ /** The permissions Core needs of every key, from the Boat calls it makes. */
1727
+ readonly requiredPermissions: Schema.$Array<Schema.String>;
1728
+ /** The key's permissions (`GET /api-keys`), and which of the required ones it lacks. */
1729
+ readonly permissions: Schema.Union<readonly [Schema.Struct<{
1730
+ readonly observed: Schema.Literal<true>;
1731
+ } & {
1732
+ held: Schema.$Array<Schema.String>;
1733
+ missing: Schema.$Array<Schema.String>;
1734
+ /** The key is limited to some VMs or environments: it cannot reach VMs Core creates. */
1735
+ limitedToSandboxes: Schema.Boolean;
1736
+ }>, Schema.Struct<{
1737
+ readonly observed: Schema.Literal<false>;
1738
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
1739
+ readonly boat: Schema.optional<Schema.Struct<{
1740
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
1741
+ readonly retryable: Schema.Boolean;
1742
+ readonly operation: Schema.optional<Schema.String>;
1743
+ readonly code: Schema.optional<Schema.String>;
1744
+ readonly message: Schema.optional<Schema.String>;
1745
+ readonly requestId: Schema.optional<Schema.String>;
1746
+ readonly status: Schema.optional<Schema.Int>;
1747
+ readonly permission: Schema.optional<Schema.String>;
1748
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
1749
+ readonly retryAt: Schema.optional<Schema.String>;
1750
+ readonly billingUrl: Schema.optional<Schema.String>;
1751
+ }>>;
1752
+ }>]>;
1753
+ /** When the key expires; `expiresAt` null: it never does. */
1754
+ readonly expiry: Schema.Union<readonly [Schema.Struct<{
1755
+ readonly observed: Schema.Literal<true>;
1756
+ } & {
1757
+ expiresAt: Schema.NullOr<Schema.String>;
1758
+ expired: Schema.Boolean;
1759
+ expiringSoon: Schema.Boolean;
1760
+ }>, Schema.Struct<{
1761
+ readonly observed: Schema.Literal<false>;
1762
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
1763
+ readonly boat: Schema.optional<Schema.Struct<{
1764
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
1765
+ readonly retryable: Schema.Boolean;
1766
+ readonly operation: Schema.optional<Schema.String>;
1767
+ readonly code: Schema.optional<Schema.String>;
1768
+ readonly message: Schema.optional<Schema.String>;
1769
+ readonly requestId: Schema.optional<Schema.String>;
1770
+ readonly status: Schema.optional<Schema.Int>;
1771
+ readonly permission: Schema.optional<Schema.String>;
1772
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
1773
+ readonly retryAt: Schema.optional<Schema.String>;
1774
+ readonly billingUrl: Schema.optional<Schema.String>;
1775
+ }>>;
1776
+ }>]>;
1777
+ /** Whether the wallet can start a VM now, why not, and its running and allowed VMs. */
1778
+ readonly start: Schema.Union<readonly [Schema.Struct<{
1779
+ readonly observed: Schema.Literal<true>;
1780
+ } & {
1781
+ canStart: Schema.Boolean;
1782
+ blockedReason: Schema.optional<Schema.String>;
1783
+ billingStatus: Schema.optional<Schema.String>;
1784
+ runningVms: Schema.Int;
1785
+ allowedVms: Schema.Int;
1786
+ }>, Schema.Struct<{
1787
+ readonly observed: Schema.Literal<false>;
1788
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
1789
+ readonly boat: Schema.optional<Schema.Struct<{
1790
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
1791
+ readonly retryable: Schema.Boolean;
1792
+ readonly operation: Schema.optional<Schema.String>;
1793
+ readonly code: Schema.optional<Schema.String>;
1794
+ readonly message: Schema.optional<Schema.String>;
1795
+ readonly requestId: Schema.optional<Schema.String>;
1796
+ readonly status: Schema.optional<Schema.Int>;
1797
+ readonly permission: Schema.optional<Schema.String>;
1798
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
1799
+ readonly retryAt: Schema.optional<Schema.String>;
1800
+ readonly billingUrl: Schema.optional<Schema.String>;
1801
+ }>>;
1802
+ }>]>;
1803
+ /** Saved snapshot slots of the wallet (`GET /saved-snapshots`). */
1804
+ readonly snapshots: Schema.Union<readonly [Schema.Struct<{
1805
+ readonly observed: Schema.Literal<true>;
1806
+ } & {
1807
+ used: Schema.Int;
1808
+ included: Schema.Int;
1809
+ }>, Schema.Struct<{
1810
+ readonly observed: Schema.Literal<false>;
1811
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
1812
+ readonly boat: Schema.optional<Schema.Struct<{
1813
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
1814
+ readonly retryable: Schema.Boolean;
1815
+ readonly operation: Schema.optional<Schema.String>;
1816
+ readonly code: Schema.optional<Schema.String>;
1817
+ readonly message: Schema.optional<Schema.String>;
1818
+ readonly requestId: Schema.optional<Schema.String>;
1819
+ readonly status: Schema.optional<Schema.Int>;
1820
+ readonly permission: Schema.optional<Schema.String>;
1821
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
1822
+ readonly retryAt: Schema.optional<Schema.String>;
1823
+ readonly billingUrl: Schema.optional<Schema.String>;
1824
+ }>>;
1825
+ }>]>;
1826
+ }>>>;
1827
+ /** The account's last full check (`prove`), kept beside its report; null until it is proven. */
1828
+ readonly lastProof: Schema.optional<Schema.NullOr<Schema.Struct<{
1829
+ readonly proofId: Schema.String;
1830
+ readonly startedAt: Schema.String;
1831
+ readonly finishedAt: Schema.String;
1832
+ readonly outcome: Schema.Literals<readonly ["passed", "refused", "interrupted"]>;
1833
+ readonly steps: Schema.$Array<Schema.Struct<{
1834
+ readonly step: Schema.Literals<readonly ["start-vm", "run-command", "publish-port", "save-snapshot", "delete-snapshot", "delete-vm"]>;
1835
+ readonly outcome: Schema.Literals<readonly ["passed", "refused", "no-answer", "not-reached"]>;
1836
+ readonly boat: Schema.optional<Schema.Struct<{
1837
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
1838
+ readonly retryable: Schema.Boolean;
1839
+ readonly operation: Schema.optional<Schema.String>;
1840
+ readonly code: Schema.optional<Schema.String>;
1841
+ readonly message: Schema.optional<Schema.String>;
1842
+ readonly requestId: Schema.optional<Schema.String>;
1843
+ readonly status: Schema.optional<Schema.Int>;
1844
+ readonly permission: Schema.optional<Schema.String>;
1845
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
1846
+ readonly retryAt: Schema.optional<Schema.String>;
1847
+ readonly billingUrl: Schema.optional<Schema.String>;
1848
+ }>>;
1849
+ }>>;
1850
+ readonly starts: Schema.Int;
1851
+ readonly leftBehind: Schema.Struct<{
1852
+ readonly vm: Schema.NullOr<Schema.String>;
1853
+ readonly snapshot: Schema.NullOr<Schema.String>;
1854
+ readonly removalConfirmed: Schema.Boolean;
1855
+ }>;
1856
+ }>>>;
1857
+ }>>, Schema.toCodecJson<typeof BoatAccountBadRequestError | typeof BoatAccountKeyRefusedError | typeof BoatAccountServiceUnavailableError | typeof BoatAccountInternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"getBoatInstallKey", "GET", "/install-key", never, never, never, never, Schema.toCodecJson<Schema.Struct<{
1858
+ readonly label: Schema.String;
1859
+ /** The key's last report, with when it was observed; null until it is checked. */
1860
+ readonly report: Schema.NullOr<Schema.Struct<{
1861
+ readonly observedAt: Schema.String;
1862
+ /** The Boat organization the account bills (`X-Boat-Org` on every request), or null. */
1863
+ readonly organization: Schema.NullOr<Schema.String>;
1864
+ /** Who the key is (`GET /me`). */
1865
+ readonly identity: Schema.Union<readonly [Schema.Struct<{
1866
+ readonly observed: Schema.Literal<true>;
1867
+ } & {
1868
+ /**
1869
+ * Boat's id for the account the key belongs to (`GET /me` `user.id`). A Boat account, never a
1870
+ * Sealant person: it is not a `PersonId` and names no one on this install.
1871
+ */
1872
+ accountId: Schema.optional<Schema.String>;
1873
+ login: Schema.optional<Schema.String>;
1874
+ displayName: Schema.optional<Schema.String>;
1875
+ serviceAccount: Schema.optional<Schema.Boolean>;
1876
+ accountStatus: Schema.Literals<readonly ["active", "suspended", "closed", "unknown"]>;
1877
+ }>, Schema.Struct<{
1878
+ readonly observed: Schema.Literal<false>;
1879
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
1880
+ readonly boat: Schema.optional<Schema.Struct<{
1881
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
1882
+ readonly retryable: Schema.Boolean;
1883
+ readonly operation: Schema.optional<Schema.String>;
1884
+ readonly code: Schema.optional<Schema.String>;
1885
+ readonly message: Schema.optional<Schema.String>;
1886
+ readonly requestId: Schema.optional<Schema.String>;
1887
+ readonly status: Schema.optional<Schema.Int>;
1888
+ readonly permission: Schema.optional<Schema.String>;
1889
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
1890
+ readonly retryAt: Schema.optional<Schema.String>;
1891
+ readonly billingUrl: Schema.optional<Schema.String>;
1892
+ }>>;
1893
+ }>]>;
1894
+ /** A personal (account) key, or an organization's key. */
1895
+ readonly keyKind: Schema.Union<readonly [Schema.Struct<{
1896
+ readonly observed: Schema.Literal<true>;
1897
+ } & {
1898
+ kind: Schema.Literals<readonly ["personal", "organization"]>;
1899
+ }>, Schema.Struct<{
1900
+ readonly observed: Schema.Literal<false>;
1901
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
1902
+ readonly boat: Schema.optional<Schema.Struct<{
1903
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
1904
+ readonly retryable: Schema.Boolean;
1905
+ readonly operation: Schema.optional<Schema.String>;
1906
+ readonly code: Schema.optional<Schema.String>;
1907
+ readonly message: Schema.optional<Schema.String>;
1908
+ readonly requestId: Schema.optional<Schema.String>;
1909
+ readonly status: Schema.optional<Schema.Int>;
1910
+ readonly permission: Schema.optional<Schema.String>;
1911
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
1912
+ readonly retryAt: Schema.optional<Schema.String>;
1913
+ readonly billingUrl: Schema.optional<Schema.String>;
1914
+ }>>;
1915
+ }>]>;
1916
+ /** Which wallet a VM started with the key bills (`GET /limits`). */
1917
+ readonly wallet: Schema.Union<readonly [Schema.Struct<{
1918
+ readonly observed: Schema.Literal<true>;
1919
+ } & {
1920
+ kind: Schema.Literals<readonly ["personal", "organization"]>;
1921
+ organizationId: Schema.optional<Schema.String>;
1922
+ organizationName: Schema.optional<Schema.String>;
1923
+ role: Schema.optional<Schema.String>;
1924
+ }>, Schema.Struct<{
1925
+ readonly observed: Schema.Literal<false>;
1926
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
1927
+ readonly boat: Schema.optional<Schema.Struct<{
1928
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
1929
+ readonly retryable: Schema.Boolean;
1930
+ readonly operation: Schema.optional<Schema.String>;
1931
+ readonly code: Schema.optional<Schema.String>;
1932
+ readonly message: Schema.optional<Schema.String>;
1933
+ readonly requestId: Schema.optional<Schema.String>;
1934
+ readonly status: Schema.optional<Schema.Int>;
1935
+ readonly permission: Schema.optional<Schema.String>;
1936
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
1937
+ readonly retryAt: Schema.optional<Schema.String>;
1938
+ readonly billingUrl: Schema.optional<Schema.String>;
1939
+ }>>;
1940
+ }>]>;
1941
+ /** The permissions Core needs of every key, from the Boat calls it makes. */
1942
+ readonly requiredPermissions: Schema.$Array<Schema.String>;
1943
+ /** The key's permissions (`GET /api-keys`), and which of the required ones it lacks. */
1944
+ readonly permissions: Schema.Union<readonly [Schema.Struct<{
1945
+ readonly observed: Schema.Literal<true>;
1946
+ } & {
1947
+ held: Schema.$Array<Schema.String>;
1948
+ missing: Schema.$Array<Schema.String>;
1949
+ /** The key is limited to some VMs or environments: it cannot reach VMs Core creates. */
1950
+ limitedToSandboxes: Schema.Boolean;
1951
+ }>, Schema.Struct<{
1952
+ readonly observed: Schema.Literal<false>;
1953
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
1954
+ readonly boat: Schema.optional<Schema.Struct<{
1955
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
1956
+ readonly retryable: Schema.Boolean;
1957
+ readonly operation: Schema.optional<Schema.String>;
1958
+ readonly code: Schema.optional<Schema.String>;
1959
+ readonly message: Schema.optional<Schema.String>;
1960
+ readonly requestId: Schema.optional<Schema.String>;
1961
+ readonly status: Schema.optional<Schema.Int>;
1962
+ readonly permission: Schema.optional<Schema.String>;
1963
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
1964
+ readonly retryAt: Schema.optional<Schema.String>;
1965
+ readonly billingUrl: Schema.optional<Schema.String>;
1966
+ }>>;
1967
+ }>]>;
1968
+ /** When the key expires; `expiresAt` null: it never does. */
1969
+ readonly expiry: Schema.Union<readonly [Schema.Struct<{
1970
+ readonly observed: Schema.Literal<true>;
1971
+ } & {
1972
+ expiresAt: Schema.NullOr<Schema.String>;
1973
+ expired: Schema.Boolean;
1974
+ expiringSoon: Schema.Boolean;
1975
+ }>, Schema.Struct<{
1976
+ readonly observed: Schema.Literal<false>;
1977
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
1978
+ readonly boat: Schema.optional<Schema.Struct<{
1979
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
1980
+ readonly retryable: Schema.Boolean;
1981
+ readonly operation: Schema.optional<Schema.String>;
1982
+ readonly code: Schema.optional<Schema.String>;
1983
+ readonly message: Schema.optional<Schema.String>;
1984
+ readonly requestId: Schema.optional<Schema.String>;
1985
+ readonly status: Schema.optional<Schema.Int>;
1986
+ readonly permission: Schema.optional<Schema.String>;
1987
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
1988
+ readonly retryAt: Schema.optional<Schema.String>;
1989
+ readonly billingUrl: Schema.optional<Schema.String>;
1990
+ }>>;
1991
+ }>]>;
1992
+ /** Whether the wallet can start a VM now, why not, and its running and allowed VMs. */
1993
+ readonly start: Schema.Union<readonly [Schema.Struct<{
1994
+ readonly observed: Schema.Literal<true>;
1995
+ } & {
1996
+ canStart: Schema.Boolean;
1997
+ blockedReason: Schema.optional<Schema.String>;
1998
+ billingStatus: Schema.optional<Schema.String>;
1999
+ runningVms: Schema.Int;
2000
+ allowedVms: Schema.Int;
2001
+ }>, Schema.Struct<{
2002
+ readonly observed: Schema.Literal<false>;
2003
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
2004
+ readonly boat: Schema.optional<Schema.Struct<{
2005
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
2006
+ readonly retryable: Schema.Boolean;
2007
+ readonly operation: Schema.optional<Schema.String>;
2008
+ readonly code: Schema.optional<Schema.String>;
2009
+ readonly message: Schema.optional<Schema.String>;
2010
+ readonly requestId: Schema.optional<Schema.String>;
2011
+ readonly status: Schema.optional<Schema.Int>;
2012
+ readonly permission: Schema.optional<Schema.String>;
2013
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
2014
+ readonly retryAt: Schema.optional<Schema.String>;
2015
+ readonly billingUrl: Schema.optional<Schema.String>;
2016
+ }>>;
2017
+ }>]>;
2018
+ /** Saved snapshot slots of the wallet (`GET /saved-snapshots`). */
2019
+ readonly snapshots: Schema.Union<readonly [Schema.Struct<{
2020
+ readonly observed: Schema.Literal<true>;
2021
+ } & {
2022
+ used: Schema.Int;
2023
+ included: Schema.Int;
2024
+ }>, Schema.Struct<{
2025
+ readonly observed: Schema.Literal<false>;
2026
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
2027
+ readonly boat: Schema.optional<Schema.Struct<{
2028
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
2029
+ readonly retryable: Schema.Boolean;
2030
+ readonly operation: Schema.optional<Schema.String>;
2031
+ readonly code: Schema.optional<Schema.String>;
2032
+ readonly message: Schema.optional<Schema.String>;
2033
+ readonly requestId: Schema.optional<Schema.String>;
2034
+ readonly status: Schema.optional<Schema.Int>;
2035
+ readonly permission: Schema.optional<Schema.String>;
2036
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
2037
+ readonly retryAt: Schema.optional<Schema.String>;
2038
+ readonly billingUrl: Schema.optional<Schema.String>;
2039
+ }>>;
2040
+ }>]>;
2041
+ }>>;
2042
+ }>>, Schema.toCodecJson<typeof BoatAccountServiceUnavailableError | typeof BoatAccountInternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"listBoatAccounts", "GET", "/", never, never, never, never, Schema.toCodecJson<Schema.Struct<{
113
2043
  readonly items: Schema.$Array<Schema.Struct<{
114
2044
  readonly boatAccountId: Schema.String;
115
2045
  readonly label: Schema.String;
@@ -118,9 +2048,254 @@ export declare const BoatAccountsGroup: HttpApiGroup.HttpApiGroup<"boatAccounts"
118
2048
  readonly createdAt: Schema.String;
119
2049
  /** When its key was last replaced; null when it still has the key it was created with. */
120
2050
  readonly keyRotatedAt: Schema.NullOr<Schema.String>;
2051
+ /** The Boat organization the account bills, sent on every request for it; null: none named. */
2052
+ readonly organization: Schema.optional<Schema.NullOr<Schema.String>>;
2053
+ /** The key's last report, with when it was observed; null until the key is checked. */
2054
+ readonly report: Schema.optional<Schema.NullOr<Schema.Struct<{
2055
+ readonly observedAt: Schema.String;
2056
+ /** The Boat organization the account bills (`X-Boat-Org` on every request), or null. */
2057
+ readonly organization: Schema.NullOr<Schema.String>;
2058
+ /** Who the key is (`GET /me`). */
2059
+ readonly identity: Schema.Union<readonly [Schema.Struct<{
2060
+ readonly observed: Schema.Literal<true>;
2061
+ } & {
2062
+ /**
2063
+ * Boat's id for the account the key belongs to (`GET /me` `user.id`). A Boat account, never a
2064
+ * Sealant person: it is not a `PersonId` and names no one on this install.
2065
+ */
2066
+ accountId: Schema.optional<Schema.String>;
2067
+ login: Schema.optional<Schema.String>;
2068
+ displayName: Schema.optional<Schema.String>;
2069
+ serviceAccount: Schema.optional<Schema.Boolean>;
2070
+ accountStatus: Schema.Literals<readonly ["active", "suspended", "closed", "unknown"]>;
2071
+ }>, Schema.Struct<{
2072
+ readonly observed: Schema.Literal<false>;
2073
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
2074
+ readonly boat: Schema.optional<Schema.Struct<{
2075
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
2076
+ readonly retryable: Schema.Boolean;
2077
+ readonly operation: Schema.optional<Schema.String>;
2078
+ readonly code: Schema.optional<Schema.String>;
2079
+ readonly message: Schema.optional<Schema.String>;
2080
+ readonly requestId: Schema.optional<Schema.String>;
2081
+ readonly status: Schema.optional<Schema.Int>;
2082
+ readonly permission: Schema.optional<Schema.String>;
2083
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
2084
+ readonly retryAt: Schema.optional<Schema.String>;
2085
+ readonly billingUrl: Schema.optional<Schema.String>;
2086
+ }>>;
2087
+ }>]>;
2088
+ /** A personal (account) key, or an organization's key. */
2089
+ readonly keyKind: Schema.Union<readonly [Schema.Struct<{
2090
+ readonly observed: Schema.Literal<true>;
2091
+ } & {
2092
+ kind: Schema.Literals<readonly ["personal", "organization"]>;
2093
+ }>, Schema.Struct<{
2094
+ readonly observed: Schema.Literal<false>;
2095
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
2096
+ readonly boat: Schema.optional<Schema.Struct<{
2097
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
2098
+ readonly retryable: Schema.Boolean;
2099
+ readonly operation: Schema.optional<Schema.String>;
2100
+ readonly code: Schema.optional<Schema.String>;
2101
+ readonly message: Schema.optional<Schema.String>;
2102
+ readonly requestId: Schema.optional<Schema.String>;
2103
+ readonly status: Schema.optional<Schema.Int>;
2104
+ readonly permission: Schema.optional<Schema.String>;
2105
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
2106
+ readonly retryAt: Schema.optional<Schema.String>;
2107
+ readonly billingUrl: Schema.optional<Schema.String>;
2108
+ }>>;
2109
+ }>]>;
2110
+ /** Which wallet a VM started with the key bills (`GET /limits`). */
2111
+ readonly wallet: Schema.Union<readonly [Schema.Struct<{
2112
+ readonly observed: Schema.Literal<true>;
2113
+ } & {
2114
+ kind: Schema.Literals<readonly ["personal", "organization"]>;
2115
+ organizationId: Schema.optional<Schema.String>;
2116
+ organizationName: Schema.optional<Schema.String>;
2117
+ role: Schema.optional<Schema.String>;
2118
+ }>, Schema.Struct<{
2119
+ readonly observed: Schema.Literal<false>;
2120
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
2121
+ readonly boat: Schema.optional<Schema.Struct<{
2122
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
2123
+ readonly retryable: Schema.Boolean;
2124
+ readonly operation: Schema.optional<Schema.String>;
2125
+ readonly code: Schema.optional<Schema.String>;
2126
+ readonly message: Schema.optional<Schema.String>;
2127
+ readonly requestId: Schema.optional<Schema.String>;
2128
+ readonly status: Schema.optional<Schema.Int>;
2129
+ readonly permission: Schema.optional<Schema.String>;
2130
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
2131
+ readonly retryAt: Schema.optional<Schema.String>;
2132
+ readonly billingUrl: Schema.optional<Schema.String>;
2133
+ }>>;
2134
+ }>]>;
2135
+ /** The permissions Core needs of every key, from the Boat calls it makes. */
2136
+ readonly requiredPermissions: Schema.$Array<Schema.String>;
2137
+ /** The key's permissions (`GET /api-keys`), and which of the required ones it lacks. */
2138
+ readonly permissions: Schema.Union<readonly [Schema.Struct<{
2139
+ readonly observed: Schema.Literal<true>;
2140
+ } & {
2141
+ held: Schema.$Array<Schema.String>;
2142
+ missing: Schema.$Array<Schema.String>;
2143
+ /** The key is limited to some VMs or environments: it cannot reach VMs Core creates. */
2144
+ limitedToSandboxes: Schema.Boolean;
2145
+ }>, Schema.Struct<{
2146
+ readonly observed: Schema.Literal<false>;
2147
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
2148
+ readonly boat: Schema.optional<Schema.Struct<{
2149
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
2150
+ readonly retryable: Schema.Boolean;
2151
+ readonly operation: Schema.optional<Schema.String>;
2152
+ readonly code: Schema.optional<Schema.String>;
2153
+ readonly message: Schema.optional<Schema.String>;
2154
+ readonly requestId: Schema.optional<Schema.String>;
2155
+ readonly status: Schema.optional<Schema.Int>;
2156
+ readonly permission: Schema.optional<Schema.String>;
2157
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
2158
+ readonly retryAt: Schema.optional<Schema.String>;
2159
+ readonly billingUrl: Schema.optional<Schema.String>;
2160
+ }>>;
2161
+ }>]>;
2162
+ /** When the key expires; `expiresAt` null: it never does. */
2163
+ readonly expiry: Schema.Union<readonly [Schema.Struct<{
2164
+ readonly observed: Schema.Literal<true>;
2165
+ } & {
2166
+ expiresAt: Schema.NullOr<Schema.String>;
2167
+ expired: Schema.Boolean;
2168
+ expiringSoon: Schema.Boolean;
2169
+ }>, Schema.Struct<{
2170
+ readonly observed: Schema.Literal<false>;
2171
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
2172
+ readonly boat: Schema.optional<Schema.Struct<{
2173
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
2174
+ readonly retryable: Schema.Boolean;
2175
+ readonly operation: Schema.optional<Schema.String>;
2176
+ readonly code: Schema.optional<Schema.String>;
2177
+ readonly message: Schema.optional<Schema.String>;
2178
+ readonly requestId: Schema.optional<Schema.String>;
2179
+ readonly status: Schema.optional<Schema.Int>;
2180
+ readonly permission: Schema.optional<Schema.String>;
2181
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
2182
+ readonly retryAt: Schema.optional<Schema.String>;
2183
+ readonly billingUrl: Schema.optional<Schema.String>;
2184
+ }>>;
2185
+ }>]>;
2186
+ /** Whether the wallet can start a VM now, why not, and its running and allowed VMs. */
2187
+ readonly start: Schema.Union<readonly [Schema.Struct<{
2188
+ readonly observed: Schema.Literal<true>;
2189
+ } & {
2190
+ canStart: Schema.Boolean;
2191
+ blockedReason: Schema.optional<Schema.String>;
2192
+ billingStatus: Schema.optional<Schema.String>;
2193
+ runningVms: Schema.Int;
2194
+ allowedVms: Schema.Int;
2195
+ }>, Schema.Struct<{
2196
+ readonly observed: Schema.Literal<false>;
2197
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
2198
+ readonly boat: Schema.optional<Schema.Struct<{
2199
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
2200
+ readonly retryable: Schema.Boolean;
2201
+ readonly operation: Schema.optional<Schema.String>;
2202
+ readonly code: Schema.optional<Schema.String>;
2203
+ readonly message: Schema.optional<Schema.String>;
2204
+ readonly requestId: Schema.optional<Schema.String>;
2205
+ readonly status: Schema.optional<Schema.Int>;
2206
+ readonly permission: Schema.optional<Schema.String>;
2207
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
2208
+ readonly retryAt: Schema.optional<Schema.String>;
2209
+ readonly billingUrl: Schema.optional<Schema.String>;
2210
+ }>>;
2211
+ }>]>;
2212
+ /** Saved snapshot slots of the wallet (`GET /saved-snapshots`). */
2213
+ readonly snapshots: Schema.Union<readonly [Schema.Struct<{
2214
+ readonly observed: Schema.Literal<true>;
2215
+ } & {
2216
+ used: Schema.Int;
2217
+ included: Schema.Int;
2218
+ }>, Schema.Struct<{
2219
+ readonly observed: Schema.Literal<false>;
2220
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
2221
+ readonly boat: Schema.optional<Schema.Struct<{
2222
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
2223
+ readonly retryable: Schema.Boolean;
2224
+ readonly operation: Schema.optional<Schema.String>;
2225
+ readonly code: Schema.optional<Schema.String>;
2226
+ readonly message: Schema.optional<Schema.String>;
2227
+ readonly requestId: Schema.optional<Schema.String>;
2228
+ readonly status: Schema.optional<Schema.Int>;
2229
+ readonly permission: Schema.optional<Schema.String>;
2230
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
2231
+ readonly retryAt: Schema.optional<Schema.String>;
2232
+ readonly billingUrl: Schema.optional<Schema.String>;
2233
+ }>>;
2234
+ }>]>;
2235
+ }>>>;
2236
+ /** The account's last full check (`prove`), kept beside its report; null until it is proven. */
2237
+ readonly lastProof: Schema.optional<Schema.NullOr<Schema.Struct<{
2238
+ readonly proofId: Schema.String;
2239
+ readonly startedAt: Schema.String;
2240
+ readonly finishedAt: Schema.String;
2241
+ readonly outcome: Schema.Literals<readonly ["passed", "refused", "interrupted"]>;
2242
+ readonly steps: Schema.$Array<Schema.Struct<{
2243
+ readonly step: Schema.Literals<readonly ["start-vm", "run-command", "publish-port", "save-snapshot", "delete-snapshot", "delete-vm"]>;
2244
+ readonly outcome: Schema.Literals<readonly ["passed", "refused", "no-answer", "not-reached"]>;
2245
+ readonly boat: Schema.optional<Schema.Struct<{
2246
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
2247
+ readonly retryable: Schema.Boolean;
2248
+ readonly operation: Schema.optional<Schema.String>;
2249
+ readonly code: Schema.optional<Schema.String>;
2250
+ readonly message: Schema.optional<Schema.String>;
2251
+ readonly requestId: Schema.optional<Schema.String>;
2252
+ readonly status: Schema.optional<Schema.Int>;
2253
+ readonly permission: Schema.optional<Schema.String>;
2254
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
2255
+ readonly retryAt: Schema.optional<Schema.String>;
2256
+ readonly billingUrl: Schema.optional<Schema.String>;
2257
+ }>>;
2258
+ }>>;
2259
+ readonly starts: Schema.Int;
2260
+ readonly leftBehind: Schema.Struct<{
2261
+ readonly vm: Schema.NullOr<Schema.String>;
2262
+ readonly snapshot: Schema.NullOr<Schema.String>;
2263
+ readonly removalConfirmed: Schema.Boolean;
2264
+ }>;
2265
+ }>>>;
121
2266
  }>>;
122
- }>>, Schema.toCodecJson<typeof BoatAccountServiceUnavailableError | typeof BoatAccountInternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"removeBoatAccount", "DELETE", "/:boatAccountId", Schema.toCodecStringTree<Schema.Struct<{
2267
+ }>>, Schema.toCodecJson<typeof BoatAccountServiceUnavailableError | typeof BoatAccountInternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"proveBoatAccount", "POST", "/:boatAccountId/prove", Schema.toCodecStringTree<Schema.Struct<{
123
2268
  readonly boatAccountId: Schema.String;
2269
+ }>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
2270
+ readonly proofId: Schema.String;
2271
+ readonly startedAt: Schema.String;
2272
+ readonly finishedAt: Schema.String;
2273
+ readonly outcome: Schema.Literals<readonly ["passed", "refused", "interrupted"]>;
2274
+ readonly steps: Schema.$Array<Schema.Struct<{
2275
+ readonly step: Schema.Literals<readonly ["start-vm", "run-command", "publish-port", "save-snapshot", "delete-snapshot", "delete-vm"]>;
2276
+ readonly outcome: Schema.Literals<readonly ["passed", "refused", "no-answer", "not-reached"]>;
2277
+ readonly boat: Schema.optional<Schema.Struct<{
2278
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
2279
+ readonly retryable: Schema.Boolean;
2280
+ readonly operation: Schema.optional<Schema.String>;
2281
+ readonly code: Schema.optional<Schema.String>;
2282
+ readonly message: Schema.optional<Schema.String>;
2283
+ readonly requestId: Schema.optional<Schema.String>;
2284
+ readonly status: Schema.optional<Schema.Int>;
2285
+ readonly permission: Schema.optional<Schema.String>;
2286
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
2287
+ readonly retryAt: Schema.optional<Schema.String>;
2288
+ readonly billingUrl: Schema.optional<Schema.String>;
2289
+ }>>;
2290
+ }>>;
2291
+ readonly starts: Schema.Int;
2292
+ readonly leftBehind: Schema.Struct<{
2293
+ readonly vm: Schema.NullOr<Schema.String>;
2294
+ readonly snapshot: Schema.NullOr<Schema.String>;
2295
+ readonly removalConfirmed: Schema.Boolean;
2296
+ }>;
2297
+ }>>, Schema.toCodecJson<typeof BoatAccountNotFoundError | typeof BoatAccountConflictError | typeof BoatAccountServiceUnavailableError | typeof BoatAccountInternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"removeBoatAccount", "DELETE", "/:boatAccountId", Schema.toCodecStringTree<Schema.Struct<{
2298
+ readonly boatAccountId: Schema.Union<readonly [Schema.String, Schema.Literal<"default">]>;
124
2299
  }>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
125
2300
  readonly boatAccountId: Schema.String;
126
2301
  readonly label: Schema.String;
@@ -129,10 +2304,225 @@ export declare const BoatAccountsGroup: HttpApiGroup.HttpApiGroup<"boatAccounts"
129
2304
  readonly createdAt: Schema.String;
130
2305
  /** When its key was last replaced; null when it still has the key it was created with. */
131
2306
  readonly keyRotatedAt: Schema.NullOr<Schema.String>;
2307
+ /** The Boat organization the account bills, sent on every request for it; null: none named. */
2308
+ readonly organization: Schema.optional<Schema.NullOr<Schema.String>>;
2309
+ /** The key's last report, with when it was observed; null until the key is checked. */
2310
+ readonly report: Schema.optional<Schema.NullOr<Schema.Struct<{
2311
+ readonly observedAt: Schema.String;
2312
+ /** The Boat organization the account bills (`X-Boat-Org` on every request), or null. */
2313
+ readonly organization: Schema.NullOr<Schema.String>;
2314
+ /** Who the key is (`GET /me`). */
2315
+ readonly identity: Schema.Union<readonly [Schema.Struct<{
2316
+ readonly observed: Schema.Literal<true>;
2317
+ } & {
2318
+ /**
2319
+ * Boat's id for the account the key belongs to (`GET /me` `user.id`). A Boat account, never a
2320
+ * Sealant person: it is not a `PersonId` and names no one on this install.
2321
+ */
2322
+ accountId: Schema.optional<Schema.String>;
2323
+ login: Schema.optional<Schema.String>;
2324
+ displayName: Schema.optional<Schema.String>;
2325
+ serviceAccount: Schema.optional<Schema.Boolean>;
2326
+ accountStatus: Schema.Literals<readonly ["active", "suspended", "closed", "unknown"]>;
2327
+ }>, Schema.Struct<{
2328
+ readonly observed: Schema.Literal<false>;
2329
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
2330
+ readonly boat: Schema.optional<Schema.Struct<{
2331
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
2332
+ readonly retryable: Schema.Boolean;
2333
+ readonly operation: Schema.optional<Schema.String>;
2334
+ readonly code: Schema.optional<Schema.String>;
2335
+ readonly message: Schema.optional<Schema.String>;
2336
+ readonly requestId: Schema.optional<Schema.String>;
2337
+ readonly status: Schema.optional<Schema.Int>;
2338
+ readonly permission: Schema.optional<Schema.String>;
2339
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
2340
+ readonly retryAt: Schema.optional<Schema.String>;
2341
+ readonly billingUrl: Schema.optional<Schema.String>;
2342
+ }>>;
2343
+ }>]>;
2344
+ /** A personal (account) key, or an organization's key. */
2345
+ readonly keyKind: Schema.Union<readonly [Schema.Struct<{
2346
+ readonly observed: Schema.Literal<true>;
2347
+ } & {
2348
+ kind: Schema.Literals<readonly ["personal", "organization"]>;
2349
+ }>, Schema.Struct<{
2350
+ readonly observed: Schema.Literal<false>;
2351
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
2352
+ readonly boat: Schema.optional<Schema.Struct<{
2353
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
2354
+ readonly retryable: Schema.Boolean;
2355
+ readonly operation: Schema.optional<Schema.String>;
2356
+ readonly code: Schema.optional<Schema.String>;
2357
+ readonly message: Schema.optional<Schema.String>;
2358
+ readonly requestId: Schema.optional<Schema.String>;
2359
+ readonly status: Schema.optional<Schema.Int>;
2360
+ readonly permission: Schema.optional<Schema.String>;
2361
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
2362
+ readonly retryAt: Schema.optional<Schema.String>;
2363
+ readonly billingUrl: Schema.optional<Schema.String>;
2364
+ }>>;
2365
+ }>]>;
2366
+ /** Which wallet a VM started with the key bills (`GET /limits`). */
2367
+ readonly wallet: Schema.Union<readonly [Schema.Struct<{
2368
+ readonly observed: Schema.Literal<true>;
2369
+ } & {
2370
+ kind: Schema.Literals<readonly ["personal", "organization"]>;
2371
+ organizationId: Schema.optional<Schema.String>;
2372
+ organizationName: Schema.optional<Schema.String>;
2373
+ role: Schema.optional<Schema.String>;
2374
+ }>, Schema.Struct<{
2375
+ readonly observed: Schema.Literal<false>;
2376
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
2377
+ readonly boat: Schema.optional<Schema.Struct<{
2378
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
2379
+ readonly retryable: Schema.Boolean;
2380
+ readonly operation: Schema.optional<Schema.String>;
2381
+ readonly code: Schema.optional<Schema.String>;
2382
+ readonly message: Schema.optional<Schema.String>;
2383
+ readonly requestId: Schema.optional<Schema.String>;
2384
+ readonly status: Schema.optional<Schema.Int>;
2385
+ readonly permission: Schema.optional<Schema.String>;
2386
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
2387
+ readonly retryAt: Schema.optional<Schema.String>;
2388
+ readonly billingUrl: Schema.optional<Schema.String>;
2389
+ }>>;
2390
+ }>]>;
2391
+ /** The permissions Core needs of every key, from the Boat calls it makes. */
2392
+ readonly requiredPermissions: Schema.$Array<Schema.String>;
2393
+ /** The key's permissions (`GET /api-keys`), and which of the required ones it lacks. */
2394
+ readonly permissions: Schema.Union<readonly [Schema.Struct<{
2395
+ readonly observed: Schema.Literal<true>;
2396
+ } & {
2397
+ held: Schema.$Array<Schema.String>;
2398
+ missing: Schema.$Array<Schema.String>;
2399
+ /** The key is limited to some VMs or environments: it cannot reach VMs Core creates. */
2400
+ limitedToSandboxes: Schema.Boolean;
2401
+ }>, Schema.Struct<{
2402
+ readonly observed: Schema.Literal<false>;
2403
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
2404
+ readonly boat: Schema.optional<Schema.Struct<{
2405
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
2406
+ readonly retryable: Schema.Boolean;
2407
+ readonly operation: Schema.optional<Schema.String>;
2408
+ readonly code: Schema.optional<Schema.String>;
2409
+ readonly message: Schema.optional<Schema.String>;
2410
+ readonly requestId: Schema.optional<Schema.String>;
2411
+ readonly status: Schema.optional<Schema.Int>;
2412
+ readonly permission: Schema.optional<Schema.String>;
2413
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
2414
+ readonly retryAt: Schema.optional<Schema.String>;
2415
+ readonly billingUrl: Schema.optional<Schema.String>;
2416
+ }>>;
2417
+ }>]>;
2418
+ /** When the key expires; `expiresAt` null: it never does. */
2419
+ readonly expiry: Schema.Union<readonly [Schema.Struct<{
2420
+ readonly observed: Schema.Literal<true>;
2421
+ } & {
2422
+ expiresAt: Schema.NullOr<Schema.String>;
2423
+ expired: Schema.Boolean;
2424
+ expiringSoon: Schema.Boolean;
2425
+ }>, Schema.Struct<{
2426
+ readonly observed: Schema.Literal<false>;
2427
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
2428
+ readonly boat: Schema.optional<Schema.Struct<{
2429
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
2430
+ readonly retryable: Schema.Boolean;
2431
+ readonly operation: Schema.optional<Schema.String>;
2432
+ readonly code: Schema.optional<Schema.String>;
2433
+ readonly message: Schema.optional<Schema.String>;
2434
+ readonly requestId: Schema.optional<Schema.String>;
2435
+ readonly status: Schema.optional<Schema.Int>;
2436
+ readonly permission: Schema.optional<Schema.String>;
2437
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
2438
+ readonly retryAt: Schema.optional<Schema.String>;
2439
+ readonly billingUrl: Schema.optional<Schema.String>;
2440
+ }>>;
2441
+ }>]>;
2442
+ /** Whether the wallet can start a VM now, why not, and its running and allowed VMs. */
2443
+ readonly start: Schema.Union<readonly [Schema.Struct<{
2444
+ readonly observed: Schema.Literal<true>;
2445
+ } & {
2446
+ canStart: Schema.Boolean;
2447
+ blockedReason: Schema.optional<Schema.String>;
2448
+ billingStatus: Schema.optional<Schema.String>;
2449
+ runningVms: Schema.Int;
2450
+ allowedVms: Schema.Int;
2451
+ }>, Schema.Struct<{
2452
+ readonly observed: Schema.Literal<false>;
2453
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
2454
+ readonly boat: Schema.optional<Schema.Struct<{
2455
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
2456
+ readonly retryable: Schema.Boolean;
2457
+ readonly operation: Schema.optional<Schema.String>;
2458
+ readonly code: Schema.optional<Schema.String>;
2459
+ readonly message: Schema.optional<Schema.String>;
2460
+ readonly requestId: Schema.optional<Schema.String>;
2461
+ readonly status: Schema.optional<Schema.Int>;
2462
+ readonly permission: Schema.optional<Schema.String>;
2463
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
2464
+ readonly retryAt: Schema.optional<Schema.String>;
2465
+ readonly billingUrl: Schema.optional<Schema.String>;
2466
+ }>>;
2467
+ }>]>;
2468
+ /** Saved snapshot slots of the wallet (`GET /saved-snapshots`). */
2469
+ readonly snapshots: Schema.Union<readonly [Schema.Struct<{
2470
+ readonly observed: Schema.Literal<true>;
2471
+ } & {
2472
+ used: Schema.Int;
2473
+ included: Schema.Int;
2474
+ }>, Schema.Struct<{
2475
+ readonly observed: Schema.Literal<false>;
2476
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
2477
+ readonly boat: Schema.optional<Schema.Struct<{
2478
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
2479
+ readonly retryable: Schema.Boolean;
2480
+ readonly operation: Schema.optional<Schema.String>;
2481
+ readonly code: Schema.optional<Schema.String>;
2482
+ readonly message: Schema.optional<Schema.String>;
2483
+ readonly requestId: Schema.optional<Schema.String>;
2484
+ readonly status: Schema.optional<Schema.Int>;
2485
+ readonly permission: Schema.optional<Schema.String>;
2486
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
2487
+ readonly retryAt: Schema.optional<Schema.String>;
2488
+ readonly billingUrl: Schema.optional<Schema.String>;
2489
+ }>>;
2490
+ }>]>;
2491
+ }>>>;
2492
+ /** The account's last full check (`prove`), kept beside its report; null until it is proven. */
2493
+ readonly lastProof: Schema.optional<Schema.NullOr<Schema.Struct<{
2494
+ readonly proofId: Schema.String;
2495
+ readonly startedAt: Schema.String;
2496
+ readonly finishedAt: Schema.String;
2497
+ readonly outcome: Schema.Literals<readonly ["passed", "refused", "interrupted"]>;
2498
+ readonly steps: Schema.$Array<Schema.Struct<{
2499
+ readonly step: Schema.Literals<readonly ["start-vm", "run-command", "publish-port", "save-snapshot", "delete-snapshot", "delete-vm"]>;
2500
+ readonly outcome: Schema.Literals<readonly ["passed", "refused", "no-answer", "not-reached"]>;
2501
+ readonly boat: Schema.optional<Schema.Struct<{
2502
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
2503
+ readonly retryable: Schema.Boolean;
2504
+ readonly operation: Schema.optional<Schema.String>;
2505
+ readonly code: Schema.optional<Schema.String>;
2506
+ readonly message: Schema.optional<Schema.String>;
2507
+ readonly requestId: Schema.optional<Schema.String>;
2508
+ readonly status: Schema.optional<Schema.Int>;
2509
+ readonly permission: Schema.optional<Schema.String>;
2510
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
2511
+ readonly retryAt: Schema.optional<Schema.String>;
2512
+ readonly billingUrl: Schema.optional<Schema.String>;
2513
+ }>>;
2514
+ }>>;
2515
+ readonly starts: Schema.Int;
2516
+ readonly leftBehind: Schema.Struct<{
2517
+ readonly vm: Schema.NullOr<Schema.String>;
2518
+ readonly snapshot: Schema.NullOr<Schema.String>;
2519
+ readonly removalConfirmed: Schema.Boolean;
2520
+ }>;
2521
+ }>>>;
132
2522
  }>>, Schema.toCodecJson<typeof BoatAccountNotFoundError | typeof BoatAccountConflictError | typeof BoatAccountServiceUnavailableError | typeof BoatAccountInternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"rotateBoatAccountKey", "PUT", "/:boatAccountId/key", Schema.toCodecStringTree<Schema.Struct<{
133
- readonly boatAccountId: Schema.String;
2523
+ readonly boatAccountId: Schema.Union<readonly [Schema.String, Schema.Literal<"default">]>;
134
2524
  }>>, never, Schema.toCodecJson<Schema.Struct<{
135
- /** The new Boat API key, for the same Boat account: it must see every VM the account runs. */
2525
+ /** The new Boat key, for the same Boat account: it must see every VM the account runs. */
136
2526
  readonly apiKey: Schema.String;
137
2527
  }>>, never, Schema.toCodecJson<Schema.Struct<{
138
2528
  readonly boatAccountId: Schema.String;
@@ -142,5 +2532,220 @@ export declare const BoatAccountsGroup: HttpApiGroup.HttpApiGroup<"boatAccounts"
142
2532
  readonly createdAt: Schema.String;
143
2533
  /** When its key was last replaced; null when it still has the key it was created with. */
144
2534
  readonly keyRotatedAt: Schema.NullOr<Schema.String>;
2535
+ /** The Boat organization the account bills, sent on every request for it; null: none named. */
2536
+ readonly organization: Schema.optional<Schema.NullOr<Schema.String>>;
2537
+ /** The key's last report, with when it was observed; null until the key is checked. */
2538
+ readonly report: Schema.optional<Schema.NullOr<Schema.Struct<{
2539
+ readonly observedAt: Schema.String;
2540
+ /** The Boat organization the account bills (`X-Boat-Org` on every request), or null. */
2541
+ readonly organization: Schema.NullOr<Schema.String>;
2542
+ /** Who the key is (`GET /me`). */
2543
+ readonly identity: Schema.Union<readonly [Schema.Struct<{
2544
+ readonly observed: Schema.Literal<true>;
2545
+ } & {
2546
+ /**
2547
+ * Boat's id for the account the key belongs to (`GET /me` `user.id`). A Boat account, never a
2548
+ * Sealant person: it is not a `PersonId` and names no one on this install.
2549
+ */
2550
+ accountId: Schema.optional<Schema.String>;
2551
+ login: Schema.optional<Schema.String>;
2552
+ displayName: Schema.optional<Schema.String>;
2553
+ serviceAccount: Schema.optional<Schema.Boolean>;
2554
+ accountStatus: Schema.Literals<readonly ["active", "suspended", "closed", "unknown"]>;
2555
+ }>, Schema.Struct<{
2556
+ readonly observed: Schema.Literal<false>;
2557
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
2558
+ readonly boat: Schema.optional<Schema.Struct<{
2559
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
2560
+ readonly retryable: Schema.Boolean;
2561
+ readonly operation: Schema.optional<Schema.String>;
2562
+ readonly code: Schema.optional<Schema.String>;
2563
+ readonly message: Schema.optional<Schema.String>;
2564
+ readonly requestId: Schema.optional<Schema.String>;
2565
+ readonly status: Schema.optional<Schema.Int>;
2566
+ readonly permission: Schema.optional<Schema.String>;
2567
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
2568
+ readonly retryAt: Schema.optional<Schema.String>;
2569
+ readonly billingUrl: Schema.optional<Schema.String>;
2570
+ }>>;
2571
+ }>]>;
2572
+ /** A personal (account) key, or an organization's key. */
2573
+ readonly keyKind: Schema.Union<readonly [Schema.Struct<{
2574
+ readonly observed: Schema.Literal<true>;
2575
+ } & {
2576
+ kind: Schema.Literals<readonly ["personal", "organization"]>;
2577
+ }>, Schema.Struct<{
2578
+ readonly observed: Schema.Literal<false>;
2579
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
2580
+ readonly boat: Schema.optional<Schema.Struct<{
2581
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
2582
+ readonly retryable: Schema.Boolean;
2583
+ readonly operation: Schema.optional<Schema.String>;
2584
+ readonly code: Schema.optional<Schema.String>;
2585
+ readonly message: Schema.optional<Schema.String>;
2586
+ readonly requestId: Schema.optional<Schema.String>;
2587
+ readonly status: Schema.optional<Schema.Int>;
2588
+ readonly permission: Schema.optional<Schema.String>;
2589
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
2590
+ readonly retryAt: Schema.optional<Schema.String>;
2591
+ readonly billingUrl: Schema.optional<Schema.String>;
2592
+ }>>;
2593
+ }>]>;
2594
+ /** Which wallet a VM started with the key bills (`GET /limits`). */
2595
+ readonly wallet: Schema.Union<readonly [Schema.Struct<{
2596
+ readonly observed: Schema.Literal<true>;
2597
+ } & {
2598
+ kind: Schema.Literals<readonly ["personal", "organization"]>;
2599
+ organizationId: Schema.optional<Schema.String>;
2600
+ organizationName: Schema.optional<Schema.String>;
2601
+ role: Schema.optional<Schema.String>;
2602
+ }>, Schema.Struct<{
2603
+ readonly observed: Schema.Literal<false>;
2604
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
2605
+ readonly boat: Schema.optional<Schema.Struct<{
2606
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
2607
+ readonly retryable: Schema.Boolean;
2608
+ readonly operation: Schema.optional<Schema.String>;
2609
+ readonly code: Schema.optional<Schema.String>;
2610
+ readonly message: Schema.optional<Schema.String>;
2611
+ readonly requestId: Schema.optional<Schema.String>;
2612
+ readonly status: Schema.optional<Schema.Int>;
2613
+ readonly permission: Schema.optional<Schema.String>;
2614
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
2615
+ readonly retryAt: Schema.optional<Schema.String>;
2616
+ readonly billingUrl: Schema.optional<Schema.String>;
2617
+ }>>;
2618
+ }>]>;
2619
+ /** The permissions Core needs of every key, from the Boat calls it makes. */
2620
+ readonly requiredPermissions: Schema.$Array<Schema.String>;
2621
+ /** The key's permissions (`GET /api-keys`), and which of the required ones it lacks. */
2622
+ readonly permissions: Schema.Union<readonly [Schema.Struct<{
2623
+ readonly observed: Schema.Literal<true>;
2624
+ } & {
2625
+ held: Schema.$Array<Schema.String>;
2626
+ missing: Schema.$Array<Schema.String>;
2627
+ /** The key is limited to some VMs or environments: it cannot reach VMs Core creates. */
2628
+ limitedToSandboxes: Schema.Boolean;
2629
+ }>, Schema.Struct<{
2630
+ readonly observed: Schema.Literal<false>;
2631
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
2632
+ readonly boat: Schema.optional<Schema.Struct<{
2633
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
2634
+ readonly retryable: Schema.Boolean;
2635
+ readonly operation: Schema.optional<Schema.String>;
2636
+ readonly code: Schema.optional<Schema.String>;
2637
+ readonly message: Schema.optional<Schema.String>;
2638
+ readonly requestId: Schema.optional<Schema.String>;
2639
+ readonly status: Schema.optional<Schema.Int>;
2640
+ readonly permission: Schema.optional<Schema.String>;
2641
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
2642
+ readonly retryAt: Schema.optional<Schema.String>;
2643
+ readonly billingUrl: Schema.optional<Schema.String>;
2644
+ }>>;
2645
+ }>]>;
2646
+ /** When the key expires; `expiresAt` null: it never does. */
2647
+ readonly expiry: Schema.Union<readonly [Schema.Struct<{
2648
+ readonly observed: Schema.Literal<true>;
2649
+ } & {
2650
+ expiresAt: Schema.NullOr<Schema.String>;
2651
+ expired: Schema.Boolean;
2652
+ expiringSoon: Schema.Boolean;
2653
+ }>, Schema.Struct<{
2654
+ readonly observed: Schema.Literal<false>;
2655
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
2656
+ readonly boat: Schema.optional<Schema.Struct<{
2657
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
2658
+ readonly retryable: Schema.Boolean;
2659
+ readonly operation: Schema.optional<Schema.String>;
2660
+ readonly code: Schema.optional<Schema.String>;
2661
+ readonly message: Schema.optional<Schema.String>;
2662
+ readonly requestId: Schema.optional<Schema.String>;
2663
+ readonly status: Schema.optional<Schema.Int>;
2664
+ readonly permission: Schema.optional<Schema.String>;
2665
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
2666
+ readonly retryAt: Schema.optional<Schema.String>;
2667
+ readonly billingUrl: Schema.optional<Schema.String>;
2668
+ }>>;
2669
+ }>]>;
2670
+ /** Whether the wallet can start a VM now, why not, and its running and allowed VMs. */
2671
+ readonly start: Schema.Union<readonly [Schema.Struct<{
2672
+ readonly observed: Schema.Literal<true>;
2673
+ } & {
2674
+ canStart: Schema.Boolean;
2675
+ blockedReason: Schema.optional<Schema.String>;
2676
+ billingStatus: Schema.optional<Schema.String>;
2677
+ runningVms: Schema.Int;
2678
+ allowedVms: Schema.Int;
2679
+ }>, Schema.Struct<{
2680
+ readonly observed: Schema.Literal<false>;
2681
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
2682
+ readonly boat: Schema.optional<Schema.Struct<{
2683
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
2684
+ readonly retryable: Schema.Boolean;
2685
+ readonly operation: Schema.optional<Schema.String>;
2686
+ readonly code: Schema.optional<Schema.String>;
2687
+ readonly message: Schema.optional<Schema.String>;
2688
+ readonly requestId: Schema.optional<Schema.String>;
2689
+ readonly status: Schema.optional<Schema.Int>;
2690
+ readonly permission: Schema.optional<Schema.String>;
2691
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
2692
+ readonly retryAt: Schema.optional<Schema.String>;
2693
+ readonly billingUrl: Schema.optional<Schema.String>;
2694
+ }>>;
2695
+ }>]>;
2696
+ /** Saved snapshot slots of the wallet (`GET /saved-snapshots`). */
2697
+ readonly snapshots: Schema.Union<readonly [Schema.Struct<{
2698
+ readonly observed: Schema.Literal<true>;
2699
+ } & {
2700
+ used: Schema.Int;
2701
+ included: Schema.Int;
2702
+ }>, Schema.Struct<{
2703
+ readonly observed: Schema.Literal<false>;
2704
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
2705
+ readonly boat: Schema.optional<Schema.Struct<{
2706
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
2707
+ readonly retryable: Schema.Boolean;
2708
+ readonly operation: Schema.optional<Schema.String>;
2709
+ readonly code: Schema.optional<Schema.String>;
2710
+ readonly message: Schema.optional<Schema.String>;
2711
+ readonly requestId: Schema.optional<Schema.String>;
2712
+ readonly status: Schema.optional<Schema.Int>;
2713
+ readonly permission: Schema.optional<Schema.String>;
2714
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
2715
+ readonly retryAt: Schema.optional<Schema.String>;
2716
+ readonly billingUrl: Schema.optional<Schema.String>;
2717
+ }>>;
2718
+ }>]>;
2719
+ }>>>;
2720
+ /** The account's last full check (`prove`), kept beside its report; null until it is proven. */
2721
+ readonly lastProof: Schema.optional<Schema.NullOr<Schema.Struct<{
2722
+ readonly proofId: Schema.String;
2723
+ readonly startedAt: Schema.String;
2724
+ readonly finishedAt: Schema.String;
2725
+ readonly outcome: Schema.Literals<readonly ["passed", "refused", "interrupted"]>;
2726
+ readonly steps: Schema.$Array<Schema.Struct<{
2727
+ readonly step: Schema.Literals<readonly ["start-vm", "run-command", "publish-port", "save-snapshot", "delete-snapshot", "delete-vm"]>;
2728
+ readonly outcome: Schema.Literals<readonly ["passed", "refused", "no-answer", "not-reached"]>;
2729
+ readonly boat: Schema.optional<Schema.Struct<{
2730
+ readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
2731
+ readonly retryable: Schema.Boolean;
2732
+ readonly operation: Schema.optional<Schema.String>;
2733
+ readonly code: Schema.optional<Schema.String>;
2734
+ readonly message: Schema.optional<Schema.String>;
2735
+ readonly requestId: Schema.optional<Schema.String>;
2736
+ readonly status: Schema.optional<Schema.Int>;
2737
+ readonly permission: Schema.optional<Schema.String>;
2738
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
2739
+ readonly retryAt: Schema.optional<Schema.String>;
2740
+ readonly billingUrl: Schema.optional<Schema.String>;
2741
+ }>>;
2742
+ }>>;
2743
+ readonly starts: Schema.Int;
2744
+ readonly leftBehind: Schema.Struct<{
2745
+ readonly vm: Schema.NullOr<Schema.String>;
2746
+ readonly snapshot: Schema.NullOr<Schema.String>;
2747
+ readonly removalConfirmed: Schema.Boolean;
2748
+ }>;
2749
+ }>>>;
145
2750
  }>>, Schema.toCodecJson<typeof BoatAccountBadRequestError | typeof BoatAccountKeyRefusedError | typeof BoatAccountNotFoundError | typeof BoatAccountConflictError | typeof BoatAccountServiceUnavailableError | typeof BoatAccountInternalServerError>, never, never>, false>;
146
2751
  export {};