@sealant/api-contracts-next 0.40.0-next.869 → 0.40.0-next.872

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,224 @@
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;
15
233
  export declare const boatAccountSchema: Schema.Struct<{
16
234
  readonly boatAccountId: Schema.String;
17
235
  readonly label: Schema.String;
@@ -20,17 +238,399 @@ export declare const boatAccountSchema: Schema.Struct<{
20
238
  readonly createdAt: Schema.String;
21
239
  /** When its key was last replaced; null when it still has the key it was created with. */
22
240
  readonly keyRotatedAt: Schema.NullOr<Schema.String>;
241
+ /** The Boat organization the account bills, sent on every request for it; null: none named. */
242
+ readonly organization: Schema.optional<Schema.NullOr<Schema.String>>;
243
+ /** The key's last report, with when it was observed; null until the key is checked. */
244
+ readonly report: Schema.optional<Schema.NullOr<Schema.Struct<{
245
+ readonly observedAt: Schema.String;
246
+ /** The Boat organization the account bills (`X-Boat-Org` on every request), or null. */
247
+ readonly organization: Schema.NullOr<Schema.String>;
248
+ /** Who the key is (`GET /me`). */
249
+ readonly identity: Schema.Union<readonly [Schema.Struct<{
250
+ readonly observed: Schema.Literal<true>;
251
+ } & {
252
+ /**
253
+ * Boat's id for the account the key belongs to (`GET /me` `user.id`). A Boat account, never a
254
+ * Sealant person: it is not a `PersonId` and names no one on this install.
255
+ */
256
+ accountId: Schema.optional<Schema.String>;
257
+ login: Schema.optional<Schema.String>;
258
+ displayName: Schema.optional<Schema.String>;
259
+ serviceAccount: Schema.optional<Schema.Boolean>;
260
+ accountStatus: Schema.Literals<readonly ["active", "suspended", "closed", "unknown"]>;
261
+ }>, Schema.Struct<{
262
+ readonly observed: Schema.Literal<false>;
263
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
264
+ readonly boat: Schema.optional<Schema.Struct<{
265
+ 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"]>;
266
+ readonly retryable: Schema.Boolean;
267
+ readonly operation: Schema.optional<Schema.String>;
268
+ readonly code: Schema.optional<Schema.String>;
269
+ readonly message: Schema.optional<Schema.String>;
270
+ readonly requestId: Schema.optional<Schema.String>;
271
+ readonly status: Schema.optional<Schema.Int>;
272
+ readonly permission: Schema.optional<Schema.String>;
273
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
274
+ readonly retryAt: Schema.optional<Schema.String>;
275
+ readonly billingUrl: Schema.optional<Schema.String>;
276
+ }>>;
277
+ }>]>;
278
+ /** A personal (account) key, or an organization's key. */
279
+ readonly keyKind: Schema.Union<readonly [Schema.Struct<{
280
+ readonly observed: Schema.Literal<true>;
281
+ } & {
282
+ kind: Schema.Literals<readonly ["personal", "organization"]>;
283
+ }>, Schema.Struct<{
284
+ readonly observed: Schema.Literal<false>;
285
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
286
+ readonly boat: Schema.optional<Schema.Struct<{
287
+ 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"]>;
288
+ readonly retryable: Schema.Boolean;
289
+ readonly operation: Schema.optional<Schema.String>;
290
+ readonly code: Schema.optional<Schema.String>;
291
+ readonly message: Schema.optional<Schema.String>;
292
+ readonly requestId: Schema.optional<Schema.String>;
293
+ readonly status: Schema.optional<Schema.Int>;
294
+ readonly permission: Schema.optional<Schema.String>;
295
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
296
+ readonly retryAt: Schema.optional<Schema.String>;
297
+ readonly billingUrl: Schema.optional<Schema.String>;
298
+ }>>;
299
+ }>]>;
300
+ /** Which wallet a VM started with the key bills (`GET /limits`). */
301
+ readonly wallet: Schema.Union<readonly [Schema.Struct<{
302
+ readonly observed: Schema.Literal<true>;
303
+ } & {
304
+ kind: Schema.Literals<readonly ["personal", "organization"]>;
305
+ organizationId: Schema.optional<Schema.String>;
306
+ organizationName: Schema.optional<Schema.String>;
307
+ role: Schema.optional<Schema.String>;
308
+ }>, Schema.Struct<{
309
+ readonly observed: Schema.Literal<false>;
310
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
311
+ readonly boat: Schema.optional<Schema.Struct<{
312
+ 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"]>;
313
+ readonly retryable: Schema.Boolean;
314
+ readonly operation: Schema.optional<Schema.String>;
315
+ readonly code: Schema.optional<Schema.String>;
316
+ readonly message: Schema.optional<Schema.String>;
317
+ readonly requestId: Schema.optional<Schema.String>;
318
+ readonly status: Schema.optional<Schema.Int>;
319
+ readonly permission: Schema.optional<Schema.String>;
320
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
321
+ readonly retryAt: Schema.optional<Schema.String>;
322
+ readonly billingUrl: Schema.optional<Schema.String>;
323
+ }>>;
324
+ }>]>;
325
+ /** The permissions Core needs of every key, from the Boat calls it makes. */
326
+ readonly requiredPermissions: Schema.$Array<Schema.String>;
327
+ /** The key's permissions (`GET /api-keys`), and which of the required ones it lacks. */
328
+ readonly permissions: Schema.Union<readonly [Schema.Struct<{
329
+ readonly observed: Schema.Literal<true>;
330
+ } & {
331
+ held: Schema.$Array<Schema.String>;
332
+ missing: Schema.$Array<Schema.String>;
333
+ /** The key is limited to some VMs or environments: it cannot reach VMs Core creates. */
334
+ limitedToSandboxes: Schema.Boolean;
335
+ }>, Schema.Struct<{
336
+ readonly observed: Schema.Literal<false>;
337
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
338
+ readonly boat: Schema.optional<Schema.Struct<{
339
+ 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"]>;
340
+ readonly retryable: Schema.Boolean;
341
+ readonly operation: Schema.optional<Schema.String>;
342
+ readonly code: Schema.optional<Schema.String>;
343
+ readonly message: Schema.optional<Schema.String>;
344
+ readonly requestId: Schema.optional<Schema.String>;
345
+ readonly status: Schema.optional<Schema.Int>;
346
+ readonly permission: Schema.optional<Schema.String>;
347
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
348
+ readonly retryAt: Schema.optional<Schema.String>;
349
+ readonly billingUrl: Schema.optional<Schema.String>;
350
+ }>>;
351
+ }>]>;
352
+ /** When the key expires; `expiresAt` null: it never does. */
353
+ readonly expiry: Schema.Union<readonly [Schema.Struct<{
354
+ readonly observed: Schema.Literal<true>;
355
+ } & {
356
+ expiresAt: Schema.NullOr<Schema.String>;
357
+ expired: Schema.Boolean;
358
+ expiringSoon: Schema.Boolean;
359
+ }>, Schema.Struct<{
360
+ readonly observed: Schema.Literal<false>;
361
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
362
+ readonly boat: Schema.optional<Schema.Struct<{
363
+ 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"]>;
364
+ readonly retryable: Schema.Boolean;
365
+ readonly operation: Schema.optional<Schema.String>;
366
+ readonly code: Schema.optional<Schema.String>;
367
+ readonly message: Schema.optional<Schema.String>;
368
+ readonly requestId: Schema.optional<Schema.String>;
369
+ readonly status: Schema.optional<Schema.Int>;
370
+ readonly permission: Schema.optional<Schema.String>;
371
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
372
+ readonly retryAt: Schema.optional<Schema.String>;
373
+ readonly billingUrl: Schema.optional<Schema.String>;
374
+ }>>;
375
+ }>]>;
376
+ /** Whether the wallet can start a VM now, why not, and its running and allowed VMs. */
377
+ readonly start: Schema.Union<readonly [Schema.Struct<{
378
+ readonly observed: Schema.Literal<true>;
379
+ } & {
380
+ canStart: Schema.Boolean;
381
+ blockedReason: Schema.optional<Schema.String>;
382
+ billingStatus: Schema.optional<Schema.String>;
383
+ runningVms: Schema.Int;
384
+ allowedVms: Schema.Int;
385
+ }>, Schema.Struct<{
386
+ readonly observed: Schema.Literal<false>;
387
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
388
+ readonly boat: Schema.optional<Schema.Struct<{
389
+ 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"]>;
390
+ readonly retryable: Schema.Boolean;
391
+ readonly operation: Schema.optional<Schema.String>;
392
+ readonly code: Schema.optional<Schema.String>;
393
+ readonly message: Schema.optional<Schema.String>;
394
+ readonly requestId: Schema.optional<Schema.String>;
395
+ readonly status: Schema.optional<Schema.Int>;
396
+ readonly permission: Schema.optional<Schema.String>;
397
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
398
+ readonly retryAt: Schema.optional<Schema.String>;
399
+ readonly billingUrl: Schema.optional<Schema.String>;
400
+ }>>;
401
+ }>]>;
402
+ /** Saved snapshot slots of the wallet (`GET /saved-snapshots`). */
403
+ readonly snapshots: Schema.Union<readonly [Schema.Struct<{
404
+ readonly observed: Schema.Literal<true>;
405
+ } & {
406
+ used: Schema.Int;
407
+ included: Schema.Int;
408
+ }>, Schema.Struct<{
409
+ readonly observed: Schema.Literal<false>;
410
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
411
+ readonly boat: Schema.optional<Schema.Struct<{
412
+ 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"]>;
413
+ readonly retryable: Schema.Boolean;
414
+ readonly operation: Schema.optional<Schema.String>;
415
+ readonly code: Schema.optional<Schema.String>;
416
+ readonly message: Schema.optional<Schema.String>;
417
+ readonly requestId: Schema.optional<Schema.String>;
418
+ readonly status: Schema.optional<Schema.Int>;
419
+ readonly permission: Schema.optional<Schema.String>;
420
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
421
+ readonly retryAt: Schema.optional<Schema.String>;
422
+ readonly billingUrl: Schema.optional<Schema.String>;
423
+ }>>;
424
+ }>]>;
425
+ }>>>;
23
426
  }>;
24
427
  export type BoatAccountWire = typeof boatAccountSchema.Type;
428
+ /**
429
+ * The install's own Boat key (`SEALANT_BOAT_API_KEY`), which workspaces run in when they name no
430
+ * account: never its value, only its last report. It is set in the install's environment, so it
431
+ * cannot be rotated or removed through this API.
432
+ */
433
+ export declare const boatInstallKeySchema: Schema.Struct<{
434
+ readonly label: Schema.String;
435
+ /** The key's last report, with when it was observed; null until it is checked. */
436
+ readonly report: Schema.NullOr<Schema.Struct<{
437
+ readonly observedAt: Schema.String;
438
+ /** The Boat organization the account bills (`X-Boat-Org` on every request), or null. */
439
+ readonly organization: Schema.NullOr<Schema.String>;
440
+ /** Who the key is (`GET /me`). */
441
+ readonly identity: Schema.Union<readonly [Schema.Struct<{
442
+ readonly observed: Schema.Literal<true>;
443
+ } & {
444
+ /**
445
+ * Boat's id for the account the key belongs to (`GET /me` `user.id`). A Boat account, never a
446
+ * Sealant person: it is not a `PersonId` and names no one on this install.
447
+ */
448
+ accountId: Schema.optional<Schema.String>;
449
+ login: Schema.optional<Schema.String>;
450
+ displayName: Schema.optional<Schema.String>;
451
+ serviceAccount: Schema.optional<Schema.Boolean>;
452
+ accountStatus: Schema.Literals<readonly ["active", "suspended", "closed", "unknown"]>;
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
+ /** A personal (account) key, or an organization's key. */
471
+ readonly keyKind: Schema.Union<readonly [Schema.Struct<{
472
+ readonly observed: Schema.Literal<true>;
473
+ } & {
474
+ kind: Schema.Literals<readonly ["personal", "organization"]>;
475
+ }>, Schema.Struct<{
476
+ readonly observed: Schema.Literal<false>;
477
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
478
+ readonly boat: Schema.optional<Schema.Struct<{
479
+ 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"]>;
480
+ readonly retryable: Schema.Boolean;
481
+ readonly operation: Schema.optional<Schema.String>;
482
+ readonly code: Schema.optional<Schema.String>;
483
+ readonly message: Schema.optional<Schema.String>;
484
+ readonly requestId: Schema.optional<Schema.String>;
485
+ readonly status: Schema.optional<Schema.Int>;
486
+ readonly permission: Schema.optional<Schema.String>;
487
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
488
+ readonly retryAt: Schema.optional<Schema.String>;
489
+ readonly billingUrl: Schema.optional<Schema.String>;
490
+ }>>;
491
+ }>]>;
492
+ /** Which wallet a VM started with the key bills (`GET /limits`). */
493
+ readonly wallet: Schema.Union<readonly [Schema.Struct<{
494
+ readonly observed: Schema.Literal<true>;
495
+ } & {
496
+ kind: Schema.Literals<readonly ["personal", "organization"]>;
497
+ organizationId: Schema.optional<Schema.String>;
498
+ organizationName: Schema.optional<Schema.String>;
499
+ role: Schema.optional<Schema.String>;
500
+ }>, Schema.Struct<{
501
+ readonly observed: Schema.Literal<false>;
502
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
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
+ /** The permissions Core needs of every key, from the Boat calls it makes. */
518
+ readonly requiredPermissions: Schema.$Array<Schema.String>;
519
+ /** The key's permissions (`GET /api-keys`), and which of the required ones it lacks. */
520
+ readonly permissions: Schema.Union<readonly [Schema.Struct<{
521
+ readonly observed: Schema.Literal<true>;
522
+ } & {
523
+ held: Schema.$Array<Schema.String>;
524
+ missing: Schema.$Array<Schema.String>;
525
+ /** The key is limited to some VMs or environments: it cannot reach VMs Core creates. */
526
+ limitedToSandboxes: Schema.Boolean;
527
+ }>, Schema.Struct<{
528
+ readonly observed: Schema.Literal<false>;
529
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
530
+ readonly boat: Schema.optional<Schema.Struct<{
531
+ 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"]>;
532
+ readonly retryable: Schema.Boolean;
533
+ readonly operation: Schema.optional<Schema.String>;
534
+ readonly code: Schema.optional<Schema.String>;
535
+ readonly message: Schema.optional<Schema.String>;
536
+ readonly requestId: Schema.optional<Schema.String>;
537
+ readonly status: Schema.optional<Schema.Int>;
538
+ readonly permission: Schema.optional<Schema.String>;
539
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
540
+ readonly retryAt: Schema.optional<Schema.String>;
541
+ readonly billingUrl: Schema.optional<Schema.String>;
542
+ }>>;
543
+ }>]>;
544
+ /** When the key expires; `expiresAt` null: it never does. */
545
+ readonly expiry: Schema.Union<readonly [Schema.Struct<{
546
+ readonly observed: Schema.Literal<true>;
547
+ } & {
548
+ expiresAt: Schema.NullOr<Schema.String>;
549
+ expired: Schema.Boolean;
550
+ expiringSoon: Schema.Boolean;
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
+ /** Whether the wallet can start a VM now, why not, and its running and allowed VMs. */
569
+ readonly start: Schema.Union<readonly [Schema.Struct<{
570
+ readonly observed: Schema.Literal<true>;
571
+ } & {
572
+ canStart: Schema.Boolean;
573
+ blockedReason: Schema.optional<Schema.String>;
574
+ billingStatus: Schema.optional<Schema.String>;
575
+ runningVms: Schema.Int;
576
+ allowedVms: Schema.Int;
577
+ }>, Schema.Struct<{
578
+ readonly observed: Schema.Literal<false>;
579
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
580
+ readonly boat: Schema.optional<Schema.Struct<{
581
+ 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"]>;
582
+ readonly retryable: Schema.Boolean;
583
+ readonly operation: Schema.optional<Schema.String>;
584
+ readonly code: Schema.optional<Schema.String>;
585
+ readonly message: Schema.optional<Schema.String>;
586
+ readonly requestId: Schema.optional<Schema.String>;
587
+ readonly status: Schema.optional<Schema.Int>;
588
+ readonly permission: Schema.optional<Schema.String>;
589
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
590
+ readonly retryAt: Schema.optional<Schema.String>;
591
+ readonly billingUrl: Schema.optional<Schema.String>;
592
+ }>>;
593
+ }>]>;
594
+ /** Saved snapshot slots of the wallet (`GET /saved-snapshots`). */
595
+ readonly snapshots: Schema.Union<readonly [Schema.Struct<{
596
+ readonly observed: Schema.Literal<true>;
597
+ } & {
598
+ used: Schema.Int;
599
+ included: Schema.Int;
600
+ }>, Schema.Struct<{
601
+ readonly observed: Schema.Literal<false>;
602
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
603
+ readonly boat: Schema.optional<Schema.Struct<{
604
+ 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"]>;
605
+ readonly retryable: Schema.Boolean;
606
+ readonly operation: Schema.optional<Schema.String>;
607
+ readonly code: Schema.optional<Schema.String>;
608
+ readonly message: Schema.optional<Schema.String>;
609
+ readonly requestId: Schema.optional<Schema.String>;
610
+ readonly status: Schema.optional<Schema.Int>;
611
+ readonly permission: Schema.optional<Schema.String>;
612
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
613
+ readonly retryAt: Schema.optional<Schema.String>;
614
+ readonly billingUrl: Schema.optional<Schema.String>;
615
+ }>>;
616
+ }>]>;
617
+ }>>;
618
+ }>;
619
+ export type BoatInstallKeyWire = typeof boatInstallKeySchema.Type;
25
620
  export declare const createBoatAccountRequestSchema: Schema.Struct<{
26
621
  /** The caller's name for the account (an organization's name, say). At most 200 characters. */
27
622
  readonly label: Schema.String;
28
- /** The Boat API key. Checked with Boat by one read-only call before it is stored. */
623
+ /** The Boat key. Checked with Boat by read-only calls before it is stored; whitespace around it is trimmed. */
29
624
  readonly apiKey: Schema.String;
625
+ /**
626
+ * For a personal key: the Boat organization to bill (its id or name), sent as `X-Boat-Org` on
627
+ * every request for the account, so billing never follows the key's active wallet.
628
+ */
629
+ readonly organization: Schema.optional<Schema.String>;
30
630
  }>;
31
631
  export type CreateBoatAccountRequest = typeof createBoatAccountRequestSchema.Type;
32
632
  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. */
633
+ /** The new Boat key, for the same Boat account: it must see every VM the account runs. */
34
634
  readonly apiKey: Schema.String;
35
635
  }>;
36
636
  export type RotateBoatAccountKeyRequest = typeof rotateBoatAccountKeyRequestSchema.Type;
@@ -43,6 +643,191 @@ export declare const listBoatAccountsResponseSchema: Schema.Struct<{
43
643
  readonly createdAt: Schema.String;
44
644
  /** When its key was last replaced; null when it still has the key it was created with. */
45
645
  readonly keyRotatedAt: Schema.NullOr<Schema.String>;
646
+ /** The Boat organization the account bills, sent on every request for it; null: none named. */
647
+ readonly organization: Schema.optional<Schema.NullOr<Schema.String>>;
648
+ /** The key's last report, with when it was observed; null until the key is checked. */
649
+ readonly report: Schema.optional<Schema.NullOr<Schema.Struct<{
650
+ readonly observedAt: Schema.String;
651
+ /** The Boat organization the account bills (`X-Boat-Org` on every request), or null. */
652
+ readonly organization: Schema.NullOr<Schema.String>;
653
+ /** Who the key is (`GET /me`). */
654
+ readonly identity: Schema.Union<readonly [Schema.Struct<{
655
+ readonly observed: Schema.Literal<true>;
656
+ } & {
657
+ /**
658
+ * Boat's id for the account the key belongs to (`GET /me` `user.id`). A Boat account, never a
659
+ * Sealant person: it is not a `PersonId` and names no one on this install.
660
+ */
661
+ accountId: Schema.optional<Schema.String>;
662
+ login: Schema.optional<Schema.String>;
663
+ displayName: Schema.optional<Schema.String>;
664
+ serviceAccount: Schema.optional<Schema.Boolean>;
665
+ accountStatus: Schema.Literals<readonly ["active", "suspended", "closed", "unknown"]>;
666
+ }>, Schema.Struct<{
667
+ readonly observed: Schema.Literal<false>;
668
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
669
+ readonly boat: Schema.optional<Schema.Struct<{
670
+ 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"]>;
671
+ readonly retryable: Schema.Boolean;
672
+ readonly operation: Schema.optional<Schema.String>;
673
+ readonly code: Schema.optional<Schema.String>;
674
+ readonly message: Schema.optional<Schema.String>;
675
+ readonly requestId: Schema.optional<Schema.String>;
676
+ readonly status: Schema.optional<Schema.Int>;
677
+ readonly permission: Schema.optional<Schema.String>;
678
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
679
+ readonly retryAt: Schema.optional<Schema.String>;
680
+ readonly billingUrl: Schema.optional<Schema.String>;
681
+ }>>;
682
+ }>]>;
683
+ /** A personal (account) key, or an organization's key. */
684
+ readonly keyKind: Schema.Union<readonly [Schema.Struct<{
685
+ readonly observed: Schema.Literal<true>;
686
+ } & {
687
+ kind: Schema.Literals<readonly ["personal", "organization"]>;
688
+ }>, Schema.Struct<{
689
+ readonly observed: Schema.Literal<false>;
690
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
691
+ readonly boat: Schema.optional<Schema.Struct<{
692
+ 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"]>;
693
+ readonly retryable: Schema.Boolean;
694
+ readonly operation: Schema.optional<Schema.String>;
695
+ readonly code: Schema.optional<Schema.String>;
696
+ readonly message: Schema.optional<Schema.String>;
697
+ readonly requestId: Schema.optional<Schema.String>;
698
+ readonly status: Schema.optional<Schema.Int>;
699
+ readonly permission: Schema.optional<Schema.String>;
700
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
701
+ readonly retryAt: Schema.optional<Schema.String>;
702
+ readonly billingUrl: Schema.optional<Schema.String>;
703
+ }>>;
704
+ }>]>;
705
+ /** Which wallet a VM started with the key bills (`GET /limits`). */
706
+ readonly wallet: Schema.Union<readonly [Schema.Struct<{
707
+ readonly observed: Schema.Literal<true>;
708
+ } & {
709
+ kind: Schema.Literals<readonly ["personal", "organization"]>;
710
+ organizationId: Schema.optional<Schema.String>;
711
+ organizationName: Schema.optional<Schema.String>;
712
+ role: Schema.optional<Schema.String>;
713
+ }>, Schema.Struct<{
714
+ readonly observed: Schema.Literal<false>;
715
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
716
+ readonly boat: Schema.optional<Schema.Struct<{
717
+ 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"]>;
718
+ readonly retryable: Schema.Boolean;
719
+ readonly operation: Schema.optional<Schema.String>;
720
+ readonly code: Schema.optional<Schema.String>;
721
+ readonly message: Schema.optional<Schema.String>;
722
+ readonly requestId: Schema.optional<Schema.String>;
723
+ readonly status: Schema.optional<Schema.Int>;
724
+ readonly permission: Schema.optional<Schema.String>;
725
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
726
+ readonly retryAt: Schema.optional<Schema.String>;
727
+ readonly billingUrl: Schema.optional<Schema.String>;
728
+ }>>;
729
+ }>]>;
730
+ /** The permissions Core needs of every key, from the Boat calls it makes. */
731
+ readonly requiredPermissions: Schema.$Array<Schema.String>;
732
+ /** The key's permissions (`GET /api-keys`), and which of the required ones it lacks. */
733
+ readonly permissions: Schema.Union<readonly [Schema.Struct<{
734
+ readonly observed: Schema.Literal<true>;
735
+ } & {
736
+ held: Schema.$Array<Schema.String>;
737
+ missing: Schema.$Array<Schema.String>;
738
+ /** The key is limited to some VMs or environments: it cannot reach VMs Core creates. */
739
+ limitedToSandboxes: Schema.Boolean;
740
+ }>, Schema.Struct<{
741
+ readonly observed: Schema.Literal<false>;
742
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
743
+ readonly boat: Schema.optional<Schema.Struct<{
744
+ 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"]>;
745
+ readonly retryable: Schema.Boolean;
746
+ readonly operation: Schema.optional<Schema.String>;
747
+ readonly code: Schema.optional<Schema.String>;
748
+ readonly message: Schema.optional<Schema.String>;
749
+ readonly requestId: Schema.optional<Schema.String>;
750
+ readonly status: Schema.optional<Schema.Int>;
751
+ readonly permission: Schema.optional<Schema.String>;
752
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
753
+ readonly retryAt: Schema.optional<Schema.String>;
754
+ readonly billingUrl: Schema.optional<Schema.String>;
755
+ }>>;
756
+ }>]>;
757
+ /** When the key expires; `expiresAt` null: it never does. */
758
+ readonly expiry: Schema.Union<readonly [Schema.Struct<{
759
+ readonly observed: Schema.Literal<true>;
760
+ } & {
761
+ expiresAt: Schema.NullOr<Schema.String>;
762
+ expired: Schema.Boolean;
763
+ expiringSoon: Schema.Boolean;
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
+ /** Whether the wallet can start a VM now, why not, and its running and allowed VMs. */
782
+ readonly start: Schema.Union<readonly [Schema.Struct<{
783
+ readonly observed: Schema.Literal<true>;
784
+ } & {
785
+ canStart: Schema.Boolean;
786
+ blockedReason: Schema.optional<Schema.String>;
787
+ billingStatus: Schema.optional<Schema.String>;
788
+ runningVms: Schema.Int;
789
+ allowedVms: Schema.Int;
790
+ }>, Schema.Struct<{
791
+ readonly observed: Schema.Literal<false>;
792
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
793
+ readonly boat: Schema.optional<Schema.Struct<{
794
+ 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"]>;
795
+ readonly retryable: Schema.Boolean;
796
+ readonly operation: Schema.optional<Schema.String>;
797
+ readonly code: Schema.optional<Schema.String>;
798
+ readonly message: Schema.optional<Schema.String>;
799
+ readonly requestId: Schema.optional<Schema.String>;
800
+ readonly status: Schema.optional<Schema.Int>;
801
+ readonly permission: Schema.optional<Schema.String>;
802
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
803
+ readonly retryAt: Schema.optional<Schema.String>;
804
+ readonly billingUrl: Schema.optional<Schema.String>;
805
+ }>>;
806
+ }>]>;
807
+ /** Saved snapshot slots of the wallet (`GET /saved-snapshots`). */
808
+ readonly snapshots: Schema.Union<readonly [Schema.Struct<{
809
+ readonly observed: Schema.Literal<true>;
810
+ } & {
811
+ used: Schema.Int;
812
+ included: Schema.Int;
813
+ }>, Schema.Struct<{
814
+ readonly observed: Schema.Literal<false>;
815
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
816
+ readonly boat: Schema.optional<Schema.Struct<{
817
+ 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"]>;
818
+ readonly retryable: Schema.Boolean;
819
+ readonly operation: Schema.optional<Schema.String>;
820
+ readonly code: Schema.optional<Schema.String>;
821
+ readonly message: Schema.optional<Schema.String>;
822
+ readonly requestId: Schema.optional<Schema.String>;
823
+ readonly status: Schema.optional<Schema.Int>;
824
+ readonly permission: Schema.optional<Schema.String>;
825
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
826
+ readonly retryAt: Schema.optional<Schema.String>;
827
+ readonly billingUrl: Schema.optional<Schema.String>;
828
+ }>>;
829
+ }>]>;
830
+ }>>>;
46
831
  }>>;
47
832
  }>;
48
833
  export type ListBoatAccountsResponse = typeof listBoatAccountsResponseSchema.Type;
@@ -53,12 +838,210 @@ export declare class BoatAccountBadRequestError extends BoatAccountBadRequestErr
53
838
  }
54
839
  declare const BoatAccountKeyRefusedError_base: Schema.Class<BoatAccountKeyRefusedError, Schema.TaggedStruct<"BoatAccountKeyRefusedError", {
55
840
  readonly message: Schema.String;
56
- readonly code: Schema.Literals<readonly ["boat-key-refused", "boat-key-unverified"]>;
841
+ readonly code: Schema.Literals<readonly ["boat-key-refused", "boat-key-unverified", "boat-key-missing-permissions"]>;
842
+ readonly missingPermissions: Schema.optional<Schema.$Array<Schema.String>>;
843
+ readonly boat: Schema.optional<Schema.Struct<{
844
+ 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"]>;
845
+ readonly retryable: Schema.Boolean;
846
+ readonly operation: Schema.optional<Schema.String>;
847
+ readonly code: Schema.optional<Schema.String>;
848
+ readonly message: Schema.optional<Schema.String>;
849
+ readonly requestId: Schema.optional<Schema.String>;
850
+ readonly status: Schema.optional<Schema.Int>;
851
+ readonly permission: Schema.optional<Schema.String>;
852
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
853
+ readonly retryAt: Schema.optional<Schema.String>;
854
+ readonly billingUrl: Schema.optional<Schema.String>;
855
+ }>>;
856
+ readonly report: Schema.optional<Schema.Struct<{
857
+ readonly observedAt: Schema.String;
858
+ /** The Boat organization the account bills (`X-Boat-Org` on every request), or null. */
859
+ readonly organization: Schema.NullOr<Schema.String>;
860
+ /** Who the key is (`GET /me`). */
861
+ readonly identity: Schema.Union<readonly [Schema.Struct<{
862
+ readonly observed: Schema.Literal<true>;
863
+ } & {
864
+ /**
865
+ * Boat's id for the account the key belongs to (`GET /me` `user.id`). A Boat account, never a
866
+ * Sealant person: it is not a `PersonId` and names no one on this install.
867
+ */
868
+ accountId: Schema.optional<Schema.String>;
869
+ login: Schema.optional<Schema.String>;
870
+ displayName: Schema.optional<Schema.String>;
871
+ serviceAccount: Schema.optional<Schema.Boolean>;
872
+ accountStatus: Schema.Literals<readonly ["active", "suspended", "closed", "unknown"]>;
873
+ }>, Schema.Struct<{
874
+ readonly observed: Schema.Literal<false>;
875
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
876
+ readonly boat: Schema.optional<Schema.Struct<{
877
+ 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"]>;
878
+ readonly retryable: Schema.Boolean;
879
+ readonly operation: Schema.optional<Schema.String>;
880
+ readonly code: Schema.optional<Schema.String>;
881
+ readonly message: Schema.optional<Schema.String>;
882
+ readonly requestId: Schema.optional<Schema.String>;
883
+ readonly status: Schema.optional<Schema.Int>;
884
+ readonly permission: Schema.optional<Schema.String>;
885
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
886
+ readonly retryAt: Schema.optional<Schema.String>;
887
+ readonly billingUrl: Schema.optional<Schema.String>;
888
+ }>>;
889
+ }>]>;
890
+ /** A personal (account) key, or an organization's key. */
891
+ readonly keyKind: Schema.Union<readonly [Schema.Struct<{
892
+ readonly observed: Schema.Literal<true>;
893
+ } & {
894
+ kind: Schema.Literals<readonly ["personal", "organization"]>;
895
+ }>, Schema.Struct<{
896
+ readonly observed: Schema.Literal<false>;
897
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
898
+ readonly boat: Schema.optional<Schema.Struct<{
899
+ 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"]>;
900
+ readonly retryable: Schema.Boolean;
901
+ readonly operation: Schema.optional<Schema.String>;
902
+ readonly code: Schema.optional<Schema.String>;
903
+ readonly message: Schema.optional<Schema.String>;
904
+ readonly requestId: Schema.optional<Schema.String>;
905
+ readonly status: Schema.optional<Schema.Int>;
906
+ readonly permission: Schema.optional<Schema.String>;
907
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
908
+ readonly retryAt: Schema.optional<Schema.String>;
909
+ readonly billingUrl: Schema.optional<Schema.String>;
910
+ }>>;
911
+ }>]>;
912
+ /** Which wallet a VM started with the key bills (`GET /limits`). */
913
+ readonly wallet: Schema.Union<readonly [Schema.Struct<{
914
+ readonly observed: Schema.Literal<true>;
915
+ } & {
916
+ kind: Schema.Literals<readonly ["personal", "organization"]>;
917
+ organizationId: Schema.optional<Schema.String>;
918
+ organizationName: Schema.optional<Schema.String>;
919
+ role: Schema.optional<Schema.String>;
920
+ }>, Schema.Struct<{
921
+ readonly observed: Schema.Literal<false>;
922
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
923
+ readonly boat: Schema.optional<Schema.Struct<{
924
+ 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"]>;
925
+ readonly retryable: Schema.Boolean;
926
+ readonly operation: Schema.optional<Schema.String>;
927
+ readonly code: Schema.optional<Schema.String>;
928
+ readonly message: Schema.optional<Schema.String>;
929
+ readonly requestId: Schema.optional<Schema.String>;
930
+ readonly status: Schema.optional<Schema.Int>;
931
+ readonly permission: Schema.optional<Schema.String>;
932
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
933
+ readonly retryAt: Schema.optional<Schema.String>;
934
+ readonly billingUrl: Schema.optional<Schema.String>;
935
+ }>>;
936
+ }>]>;
937
+ /** The permissions Core needs of every key, from the Boat calls it makes. */
938
+ readonly requiredPermissions: Schema.$Array<Schema.String>;
939
+ /** The key's permissions (`GET /api-keys`), and which of the required ones it lacks. */
940
+ readonly permissions: Schema.Union<readonly [Schema.Struct<{
941
+ readonly observed: Schema.Literal<true>;
942
+ } & {
943
+ held: Schema.$Array<Schema.String>;
944
+ missing: Schema.$Array<Schema.String>;
945
+ /** The key is limited to some VMs or environments: it cannot reach VMs Core creates. */
946
+ limitedToSandboxes: Schema.Boolean;
947
+ }>, Schema.Struct<{
948
+ readonly observed: Schema.Literal<false>;
949
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
950
+ readonly boat: Schema.optional<Schema.Struct<{
951
+ 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"]>;
952
+ readonly retryable: Schema.Boolean;
953
+ readonly operation: Schema.optional<Schema.String>;
954
+ readonly code: Schema.optional<Schema.String>;
955
+ readonly message: Schema.optional<Schema.String>;
956
+ readonly requestId: Schema.optional<Schema.String>;
957
+ readonly status: Schema.optional<Schema.Int>;
958
+ readonly permission: Schema.optional<Schema.String>;
959
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
960
+ readonly retryAt: Schema.optional<Schema.String>;
961
+ readonly billingUrl: Schema.optional<Schema.String>;
962
+ }>>;
963
+ }>]>;
964
+ /** When the key expires; `expiresAt` null: it never does. */
965
+ readonly expiry: Schema.Union<readonly [Schema.Struct<{
966
+ readonly observed: Schema.Literal<true>;
967
+ } & {
968
+ expiresAt: Schema.NullOr<Schema.String>;
969
+ expired: Schema.Boolean;
970
+ expiringSoon: Schema.Boolean;
971
+ }>, Schema.Struct<{
972
+ readonly observed: Schema.Literal<false>;
973
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
974
+ readonly boat: Schema.optional<Schema.Struct<{
975
+ 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"]>;
976
+ readonly retryable: Schema.Boolean;
977
+ readonly operation: Schema.optional<Schema.String>;
978
+ readonly code: Schema.optional<Schema.String>;
979
+ readonly message: Schema.optional<Schema.String>;
980
+ readonly requestId: Schema.optional<Schema.String>;
981
+ readonly status: Schema.optional<Schema.Int>;
982
+ readonly permission: Schema.optional<Schema.String>;
983
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
984
+ readonly retryAt: Schema.optional<Schema.String>;
985
+ readonly billingUrl: Schema.optional<Schema.String>;
986
+ }>>;
987
+ }>]>;
988
+ /** Whether the wallet can start a VM now, why not, and its running and allowed VMs. */
989
+ readonly start: Schema.Union<readonly [Schema.Struct<{
990
+ readonly observed: Schema.Literal<true>;
991
+ } & {
992
+ canStart: Schema.Boolean;
993
+ blockedReason: Schema.optional<Schema.String>;
994
+ billingStatus: Schema.optional<Schema.String>;
995
+ runningVms: Schema.Int;
996
+ allowedVms: Schema.Int;
997
+ }>, Schema.Struct<{
998
+ readonly observed: Schema.Literal<false>;
999
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
1000
+ readonly boat: Schema.optional<Schema.Struct<{
1001
+ 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"]>;
1002
+ readonly retryable: Schema.Boolean;
1003
+ readonly operation: Schema.optional<Schema.String>;
1004
+ readonly code: Schema.optional<Schema.String>;
1005
+ readonly message: Schema.optional<Schema.String>;
1006
+ readonly requestId: Schema.optional<Schema.String>;
1007
+ readonly status: Schema.optional<Schema.Int>;
1008
+ readonly permission: Schema.optional<Schema.String>;
1009
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
1010
+ readonly retryAt: Schema.optional<Schema.String>;
1011
+ readonly billingUrl: Schema.optional<Schema.String>;
1012
+ }>>;
1013
+ }>]>;
1014
+ /** Saved snapshot slots of the wallet (`GET /saved-snapshots`). */
1015
+ readonly snapshots: Schema.Union<readonly [Schema.Struct<{
1016
+ readonly observed: Schema.Literal<true>;
1017
+ } & {
1018
+ used: Schema.Int;
1019
+ included: Schema.Int;
1020
+ }>, Schema.Struct<{
1021
+ readonly observed: Schema.Literal<false>;
1022
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
1023
+ readonly boat: Schema.optional<Schema.Struct<{
1024
+ 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"]>;
1025
+ readonly retryable: Schema.Boolean;
1026
+ readonly operation: Schema.optional<Schema.String>;
1027
+ readonly code: Schema.optional<Schema.String>;
1028
+ readonly message: Schema.optional<Schema.String>;
1029
+ readonly requestId: Schema.optional<Schema.String>;
1030
+ readonly status: Schema.optional<Schema.Int>;
1031
+ readonly permission: Schema.optional<Schema.String>;
1032
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
1033
+ readonly retryAt: Schema.optional<Schema.String>;
1034
+ readonly billingUrl: Schema.optional<Schema.String>;
1035
+ }>>;
1036
+ }>]>;
1037
+ }>>;
57
1038
  }>, import("effect/Cause").YieldableError>;
58
1039
  /**
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.
1040
+ * Boat refused the key (`boat-key-refused`: it answered that the key is not valid, has expired or
1041
+ * belongs to another organization; `boat` says which), the key provably lacks permissions Core
1042
+ * needs (`boat-key-missing-permissions`, named in `missingPermissions`), or Boat did not answer
1043
+ * whether it is valid (`boat-key-unverified`: try again). Nothing was stored or changed. The
1044
+ * message never names the key or any part of it.
62
1045
  */
63
1046
  export declare class BoatAccountKeyRefusedError extends BoatAccountKeyRefusedError_base {
64
1047
  }
@@ -69,7 +1052,7 @@ export declare class BoatAccountNotFoundError extends BoatAccountNotFoundError_b
69
1052
  }
70
1053
  declare const BoatAccountConflictError_base: Schema.Class<BoatAccountConflictError, Schema.TaggedStruct<"BoatAccountConflictError", {
71
1054
  readonly message: Schema.String;
72
- readonly code: Schema.Literals<readonly ["boat-account-in-use", "boat-key-cannot-see", "boat-account-removing", "boat-account-changed"]>;
1055
+ readonly code: Schema.Literals<readonly ["boat-account-in-use", "boat-key-cannot-see", "boat-account-removing", "boat-account-changed", "boat-account-environment"]>;
73
1056
  readonly liveRuns: Schema.optional<Schema.Int>;
74
1057
  readonly buildsInFlight: Schema.optional<Schema.Int>;
75
1058
  readonly unseen: Schema.optional<Schema.Int>;
@@ -82,6 +1065,8 @@ declare const BoatAccountConflictError_base: Schema.Class<BoatAccountConflictErr
82
1065
  * `boat-key-cannot-see`: a rotation to a key that cannot see VMs or saved images the account has
83
1066
  * now (`unseen`), so it is most likely another Boat account's key. `boat-account-removing`: the
84
1067
  * account's removal was asked. `boat-account-changed`: another rotation won; read and try again.
1068
+ * `boat-account-environment`: the install's own key (`default`) is set in its environment, not
1069
+ * through this API.
85
1070
  */
86
1071
  export declare class BoatAccountConflictError extends BoatAccountConflictError_base {
87
1072
  }
@@ -96,11 +1081,396 @@ declare const BoatAccountInternalServerError_base: Schema.Class<BoatAccountInter
96
1081
  }>, import("effect/Cause").YieldableError>;
97
1082
  export declare class BoatAccountInternalServerError extends BoatAccountInternalServerError_base {
98
1083
  }
99
- export declare const BoatAccountsGroup: HttpApiGroup.HttpApiGroup<"boatAccounts", HttpApiEndpoint.HttpApiEndpoint<"createBoatAccount", "POST", "/", never, never, Schema.toCodecJson<Schema.Struct<{
1084
+ export declare const BoatAccountsGroup: HttpApiGroup.HttpApiGroup<"boatAccounts", HttpApiEndpoint.HttpApiEndpoint<"checkBoatAccount", "POST", "/:boatAccountId/check", Schema.toCodecStringTree<Schema.Struct<{
1085
+ readonly boatAccountId: Schema.String;
1086
+ }>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
1087
+ readonly boatAccountId: Schema.String;
1088
+ readonly label: Schema.String;
1089
+ /** `active`: workspaces may run in it. `removing`: its removal was asked; none may. */
1090
+ readonly state: Schema.Literals<readonly ["active", "removing"]>;
1091
+ readonly createdAt: Schema.String;
1092
+ /** When its key was last replaced; null when it still has the key it was created with. */
1093
+ readonly keyRotatedAt: Schema.NullOr<Schema.String>;
1094
+ /** The Boat organization the account bills, sent on every request for it; null: none named. */
1095
+ readonly organization: Schema.optional<Schema.NullOr<Schema.String>>;
1096
+ /** The key's last report, with when it was observed; null until the key is checked. */
1097
+ readonly report: Schema.optional<Schema.NullOr<Schema.Struct<{
1098
+ readonly observedAt: Schema.String;
1099
+ /** The Boat organization the account bills (`X-Boat-Org` on every request), or null. */
1100
+ readonly organization: Schema.NullOr<Schema.String>;
1101
+ /** Who the key is (`GET /me`). */
1102
+ readonly identity: Schema.Union<readonly [Schema.Struct<{
1103
+ readonly observed: Schema.Literal<true>;
1104
+ } & {
1105
+ /**
1106
+ * Boat's id for the account the key belongs to (`GET /me` `user.id`). A Boat account, never a
1107
+ * Sealant person: it is not a `PersonId` and names no one on this install.
1108
+ */
1109
+ accountId: Schema.optional<Schema.String>;
1110
+ login: Schema.optional<Schema.String>;
1111
+ displayName: Schema.optional<Schema.String>;
1112
+ serviceAccount: Schema.optional<Schema.Boolean>;
1113
+ accountStatus: Schema.Literals<readonly ["active", "suspended", "closed", "unknown"]>;
1114
+ }>, Schema.Struct<{
1115
+ readonly observed: Schema.Literal<false>;
1116
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
1117
+ readonly boat: Schema.optional<Schema.Struct<{
1118
+ 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"]>;
1119
+ readonly retryable: Schema.Boolean;
1120
+ readonly operation: Schema.optional<Schema.String>;
1121
+ readonly code: Schema.optional<Schema.String>;
1122
+ readonly message: Schema.optional<Schema.String>;
1123
+ readonly requestId: Schema.optional<Schema.String>;
1124
+ readonly status: Schema.optional<Schema.Int>;
1125
+ readonly permission: Schema.optional<Schema.String>;
1126
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
1127
+ readonly retryAt: Schema.optional<Schema.String>;
1128
+ readonly billingUrl: Schema.optional<Schema.String>;
1129
+ }>>;
1130
+ }>]>;
1131
+ /** A personal (account) key, or an organization's key. */
1132
+ readonly keyKind: Schema.Union<readonly [Schema.Struct<{
1133
+ readonly observed: Schema.Literal<true>;
1134
+ } & {
1135
+ kind: Schema.Literals<readonly ["personal", "organization"]>;
1136
+ }>, Schema.Struct<{
1137
+ readonly observed: Schema.Literal<false>;
1138
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
1139
+ readonly boat: Schema.optional<Schema.Struct<{
1140
+ 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"]>;
1141
+ readonly retryable: Schema.Boolean;
1142
+ readonly operation: Schema.optional<Schema.String>;
1143
+ readonly code: Schema.optional<Schema.String>;
1144
+ readonly message: Schema.optional<Schema.String>;
1145
+ readonly requestId: Schema.optional<Schema.String>;
1146
+ readonly status: Schema.optional<Schema.Int>;
1147
+ readonly permission: Schema.optional<Schema.String>;
1148
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
1149
+ readonly retryAt: Schema.optional<Schema.String>;
1150
+ readonly billingUrl: Schema.optional<Schema.String>;
1151
+ }>>;
1152
+ }>]>;
1153
+ /** Which wallet a VM started with the key bills (`GET /limits`). */
1154
+ readonly wallet: Schema.Union<readonly [Schema.Struct<{
1155
+ readonly observed: Schema.Literal<true>;
1156
+ } & {
1157
+ kind: Schema.Literals<readonly ["personal", "organization"]>;
1158
+ organizationId: Schema.optional<Schema.String>;
1159
+ organizationName: Schema.optional<Schema.String>;
1160
+ role: Schema.optional<Schema.String>;
1161
+ }>, Schema.Struct<{
1162
+ readonly observed: Schema.Literal<false>;
1163
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
1164
+ readonly boat: Schema.optional<Schema.Struct<{
1165
+ 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"]>;
1166
+ readonly retryable: Schema.Boolean;
1167
+ readonly operation: Schema.optional<Schema.String>;
1168
+ readonly code: Schema.optional<Schema.String>;
1169
+ readonly message: Schema.optional<Schema.String>;
1170
+ readonly requestId: Schema.optional<Schema.String>;
1171
+ readonly status: Schema.optional<Schema.Int>;
1172
+ readonly permission: Schema.optional<Schema.String>;
1173
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
1174
+ readonly retryAt: Schema.optional<Schema.String>;
1175
+ readonly billingUrl: Schema.optional<Schema.String>;
1176
+ }>>;
1177
+ }>]>;
1178
+ /** The permissions Core needs of every key, from the Boat calls it makes. */
1179
+ readonly requiredPermissions: Schema.$Array<Schema.String>;
1180
+ /** The key's permissions (`GET /api-keys`), and which of the required ones it lacks. */
1181
+ readonly permissions: Schema.Union<readonly [Schema.Struct<{
1182
+ readonly observed: Schema.Literal<true>;
1183
+ } & {
1184
+ held: Schema.$Array<Schema.String>;
1185
+ missing: Schema.$Array<Schema.String>;
1186
+ /** The key is limited to some VMs or environments: it cannot reach VMs Core creates. */
1187
+ limitedToSandboxes: Schema.Boolean;
1188
+ }>, Schema.Struct<{
1189
+ readonly observed: Schema.Literal<false>;
1190
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
1191
+ readonly boat: Schema.optional<Schema.Struct<{
1192
+ 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"]>;
1193
+ readonly retryable: Schema.Boolean;
1194
+ readonly operation: Schema.optional<Schema.String>;
1195
+ readonly code: Schema.optional<Schema.String>;
1196
+ readonly message: Schema.optional<Schema.String>;
1197
+ readonly requestId: Schema.optional<Schema.String>;
1198
+ readonly status: Schema.optional<Schema.Int>;
1199
+ readonly permission: Schema.optional<Schema.String>;
1200
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
1201
+ readonly retryAt: Schema.optional<Schema.String>;
1202
+ readonly billingUrl: Schema.optional<Schema.String>;
1203
+ }>>;
1204
+ }>]>;
1205
+ /** When the key expires; `expiresAt` null: it never does. */
1206
+ readonly expiry: Schema.Union<readonly [Schema.Struct<{
1207
+ readonly observed: Schema.Literal<true>;
1208
+ } & {
1209
+ expiresAt: Schema.NullOr<Schema.String>;
1210
+ expired: Schema.Boolean;
1211
+ expiringSoon: Schema.Boolean;
1212
+ }>, Schema.Struct<{
1213
+ readonly observed: Schema.Literal<false>;
1214
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
1215
+ readonly boat: Schema.optional<Schema.Struct<{
1216
+ 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"]>;
1217
+ readonly retryable: Schema.Boolean;
1218
+ readonly operation: Schema.optional<Schema.String>;
1219
+ readonly code: Schema.optional<Schema.String>;
1220
+ readonly message: Schema.optional<Schema.String>;
1221
+ readonly requestId: Schema.optional<Schema.String>;
1222
+ readonly status: Schema.optional<Schema.Int>;
1223
+ readonly permission: Schema.optional<Schema.String>;
1224
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
1225
+ readonly retryAt: Schema.optional<Schema.String>;
1226
+ readonly billingUrl: Schema.optional<Schema.String>;
1227
+ }>>;
1228
+ }>]>;
1229
+ /** Whether the wallet can start a VM now, why not, and its running and allowed VMs. */
1230
+ readonly start: Schema.Union<readonly [Schema.Struct<{
1231
+ readonly observed: Schema.Literal<true>;
1232
+ } & {
1233
+ canStart: Schema.Boolean;
1234
+ blockedReason: Schema.optional<Schema.String>;
1235
+ billingStatus: Schema.optional<Schema.String>;
1236
+ runningVms: Schema.Int;
1237
+ allowedVms: Schema.Int;
1238
+ }>, Schema.Struct<{
1239
+ readonly observed: Schema.Literal<false>;
1240
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
1241
+ readonly boat: Schema.optional<Schema.Struct<{
1242
+ 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"]>;
1243
+ readonly retryable: Schema.Boolean;
1244
+ readonly operation: Schema.optional<Schema.String>;
1245
+ readonly code: Schema.optional<Schema.String>;
1246
+ readonly message: Schema.optional<Schema.String>;
1247
+ readonly requestId: Schema.optional<Schema.String>;
1248
+ readonly status: Schema.optional<Schema.Int>;
1249
+ readonly permission: Schema.optional<Schema.String>;
1250
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
1251
+ readonly retryAt: Schema.optional<Schema.String>;
1252
+ readonly billingUrl: Schema.optional<Schema.String>;
1253
+ }>>;
1254
+ }>]>;
1255
+ /** Saved snapshot slots of the wallet (`GET /saved-snapshots`). */
1256
+ readonly snapshots: Schema.Union<readonly [Schema.Struct<{
1257
+ readonly observed: Schema.Literal<true>;
1258
+ } & {
1259
+ used: Schema.Int;
1260
+ included: Schema.Int;
1261
+ }>, Schema.Struct<{
1262
+ readonly observed: Schema.Literal<false>;
1263
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
1264
+ readonly boat: Schema.optional<Schema.Struct<{
1265
+ 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"]>;
1266
+ readonly retryable: Schema.Boolean;
1267
+ readonly operation: Schema.optional<Schema.String>;
1268
+ readonly code: Schema.optional<Schema.String>;
1269
+ readonly message: Schema.optional<Schema.String>;
1270
+ readonly requestId: Schema.optional<Schema.String>;
1271
+ readonly status: Schema.optional<Schema.Int>;
1272
+ readonly permission: Schema.optional<Schema.String>;
1273
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
1274
+ readonly retryAt: Schema.optional<Schema.String>;
1275
+ readonly billingUrl: Schema.optional<Schema.String>;
1276
+ }>>;
1277
+ }>]>;
1278
+ }>>>;
1279
+ }>>, 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<{
1280
+ readonly label: Schema.String;
1281
+ /** The key's last report, with when it was observed; null until it is checked. */
1282
+ readonly report: Schema.NullOr<Schema.Struct<{
1283
+ readonly observedAt: Schema.String;
1284
+ /** The Boat organization the account bills (`X-Boat-Org` on every request), or null. */
1285
+ readonly organization: Schema.NullOr<Schema.String>;
1286
+ /** Who the key is (`GET /me`). */
1287
+ readonly identity: Schema.Union<readonly [Schema.Struct<{
1288
+ readonly observed: Schema.Literal<true>;
1289
+ } & {
1290
+ /**
1291
+ * Boat's id for the account the key belongs to (`GET /me` `user.id`). A Boat account, never a
1292
+ * Sealant person: it is not a `PersonId` and names no one on this install.
1293
+ */
1294
+ accountId: Schema.optional<Schema.String>;
1295
+ login: Schema.optional<Schema.String>;
1296
+ displayName: Schema.optional<Schema.String>;
1297
+ serviceAccount: Schema.optional<Schema.Boolean>;
1298
+ accountStatus: Schema.Literals<readonly ["active", "suspended", "closed", "unknown"]>;
1299
+ }>, Schema.Struct<{
1300
+ readonly observed: Schema.Literal<false>;
1301
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
1302
+ readonly boat: Schema.optional<Schema.Struct<{
1303
+ 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"]>;
1304
+ readonly retryable: Schema.Boolean;
1305
+ readonly operation: Schema.optional<Schema.String>;
1306
+ readonly code: Schema.optional<Schema.String>;
1307
+ readonly message: Schema.optional<Schema.String>;
1308
+ readonly requestId: Schema.optional<Schema.String>;
1309
+ readonly status: Schema.optional<Schema.Int>;
1310
+ readonly permission: Schema.optional<Schema.String>;
1311
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
1312
+ readonly retryAt: Schema.optional<Schema.String>;
1313
+ readonly billingUrl: Schema.optional<Schema.String>;
1314
+ }>>;
1315
+ }>]>;
1316
+ /** A personal (account) key, or an organization's key. */
1317
+ readonly keyKind: Schema.Union<readonly [Schema.Struct<{
1318
+ readonly observed: Schema.Literal<true>;
1319
+ } & {
1320
+ kind: Schema.Literals<readonly ["personal", "organization"]>;
1321
+ }>, Schema.Struct<{
1322
+ readonly observed: Schema.Literal<false>;
1323
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
1324
+ readonly boat: Schema.optional<Schema.Struct<{
1325
+ 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"]>;
1326
+ readonly retryable: Schema.Boolean;
1327
+ readonly operation: Schema.optional<Schema.String>;
1328
+ readonly code: Schema.optional<Schema.String>;
1329
+ readonly message: Schema.optional<Schema.String>;
1330
+ readonly requestId: Schema.optional<Schema.String>;
1331
+ readonly status: Schema.optional<Schema.Int>;
1332
+ readonly permission: Schema.optional<Schema.String>;
1333
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
1334
+ readonly retryAt: Schema.optional<Schema.String>;
1335
+ readonly billingUrl: Schema.optional<Schema.String>;
1336
+ }>>;
1337
+ }>]>;
1338
+ /** Which wallet a VM started with the key bills (`GET /limits`). */
1339
+ readonly wallet: Schema.Union<readonly [Schema.Struct<{
1340
+ readonly observed: Schema.Literal<true>;
1341
+ } & {
1342
+ kind: Schema.Literals<readonly ["personal", "organization"]>;
1343
+ organizationId: Schema.optional<Schema.String>;
1344
+ organizationName: Schema.optional<Schema.String>;
1345
+ role: Schema.optional<Schema.String>;
1346
+ }>, Schema.Struct<{
1347
+ readonly observed: Schema.Literal<false>;
1348
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
1349
+ readonly boat: Schema.optional<Schema.Struct<{
1350
+ 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"]>;
1351
+ readonly retryable: Schema.Boolean;
1352
+ readonly operation: Schema.optional<Schema.String>;
1353
+ readonly code: Schema.optional<Schema.String>;
1354
+ readonly message: Schema.optional<Schema.String>;
1355
+ readonly requestId: Schema.optional<Schema.String>;
1356
+ readonly status: Schema.optional<Schema.Int>;
1357
+ readonly permission: Schema.optional<Schema.String>;
1358
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
1359
+ readonly retryAt: Schema.optional<Schema.String>;
1360
+ readonly billingUrl: Schema.optional<Schema.String>;
1361
+ }>>;
1362
+ }>]>;
1363
+ /** The permissions Core needs of every key, from the Boat calls it makes. */
1364
+ readonly requiredPermissions: Schema.$Array<Schema.String>;
1365
+ /** The key's permissions (`GET /api-keys`), and which of the required ones it lacks. */
1366
+ readonly permissions: Schema.Union<readonly [Schema.Struct<{
1367
+ readonly observed: Schema.Literal<true>;
1368
+ } & {
1369
+ held: Schema.$Array<Schema.String>;
1370
+ missing: Schema.$Array<Schema.String>;
1371
+ /** The key is limited to some VMs or environments: it cannot reach VMs Core creates. */
1372
+ limitedToSandboxes: Schema.Boolean;
1373
+ }>, Schema.Struct<{
1374
+ readonly observed: Schema.Literal<false>;
1375
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
1376
+ readonly boat: Schema.optional<Schema.Struct<{
1377
+ 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"]>;
1378
+ readonly retryable: Schema.Boolean;
1379
+ readonly operation: Schema.optional<Schema.String>;
1380
+ readonly code: Schema.optional<Schema.String>;
1381
+ readonly message: Schema.optional<Schema.String>;
1382
+ readonly requestId: Schema.optional<Schema.String>;
1383
+ readonly status: Schema.optional<Schema.Int>;
1384
+ readonly permission: Schema.optional<Schema.String>;
1385
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
1386
+ readonly retryAt: Schema.optional<Schema.String>;
1387
+ readonly billingUrl: Schema.optional<Schema.String>;
1388
+ }>>;
1389
+ }>]>;
1390
+ /** When the key expires; `expiresAt` null: it never does. */
1391
+ readonly expiry: Schema.Union<readonly [Schema.Struct<{
1392
+ readonly observed: Schema.Literal<true>;
1393
+ } & {
1394
+ expiresAt: Schema.NullOr<Schema.String>;
1395
+ expired: Schema.Boolean;
1396
+ expiringSoon: Schema.Boolean;
1397
+ }>, Schema.Struct<{
1398
+ readonly observed: Schema.Literal<false>;
1399
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
1400
+ readonly boat: Schema.optional<Schema.Struct<{
1401
+ 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"]>;
1402
+ readonly retryable: Schema.Boolean;
1403
+ readonly operation: Schema.optional<Schema.String>;
1404
+ readonly code: Schema.optional<Schema.String>;
1405
+ readonly message: Schema.optional<Schema.String>;
1406
+ readonly requestId: Schema.optional<Schema.String>;
1407
+ readonly status: Schema.optional<Schema.Int>;
1408
+ readonly permission: Schema.optional<Schema.String>;
1409
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
1410
+ readonly retryAt: Schema.optional<Schema.String>;
1411
+ readonly billingUrl: Schema.optional<Schema.String>;
1412
+ }>>;
1413
+ }>]>;
1414
+ /** Whether the wallet can start a VM now, why not, and its running and allowed VMs. */
1415
+ readonly start: Schema.Union<readonly [Schema.Struct<{
1416
+ readonly observed: Schema.Literal<true>;
1417
+ } & {
1418
+ canStart: Schema.Boolean;
1419
+ blockedReason: Schema.optional<Schema.String>;
1420
+ billingStatus: Schema.optional<Schema.String>;
1421
+ runningVms: Schema.Int;
1422
+ allowedVms: Schema.Int;
1423
+ }>, Schema.Struct<{
1424
+ readonly observed: Schema.Literal<false>;
1425
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
1426
+ readonly boat: Schema.optional<Schema.Struct<{
1427
+ 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"]>;
1428
+ readonly retryable: Schema.Boolean;
1429
+ readonly operation: Schema.optional<Schema.String>;
1430
+ readonly code: Schema.optional<Schema.String>;
1431
+ readonly message: Schema.optional<Schema.String>;
1432
+ readonly requestId: Schema.optional<Schema.String>;
1433
+ readonly status: Schema.optional<Schema.Int>;
1434
+ readonly permission: Schema.optional<Schema.String>;
1435
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
1436
+ readonly retryAt: Schema.optional<Schema.String>;
1437
+ readonly billingUrl: Schema.optional<Schema.String>;
1438
+ }>>;
1439
+ }>]>;
1440
+ /** Saved snapshot slots of the wallet (`GET /saved-snapshots`). */
1441
+ readonly snapshots: Schema.Union<readonly [Schema.Struct<{
1442
+ readonly observed: Schema.Literal<true>;
1443
+ } & {
1444
+ used: Schema.Int;
1445
+ included: Schema.Int;
1446
+ }>, Schema.Struct<{
1447
+ readonly observed: Schema.Literal<false>;
1448
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
1449
+ readonly boat: Schema.optional<Schema.Struct<{
1450
+ 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"]>;
1451
+ readonly retryable: Schema.Boolean;
1452
+ readonly operation: Schema.optional<Schema.String>;
1453
+ readonly code: Schema.optional<Schema.String>;
1454
+ readonly message: Schema.optional<Schema.String>;
1455
+ readonly requestId: Schema.optional<Schema.String>;
1456
+ readonly status: Schema.optional<Schema.Int>;
1457
+ readonly permission: Schema.optional<Schema.String>;
1458
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
1459
+ readonly retryAt: Schema.optional<Schema.String>;
1460
+ readonly billingUrl: Schema.optional<Schema.String>;
1461
+ }>>;
1462
+ }>]>;
1463
+ }>>;
1464
+ }>>, Schema.toCodecJson<typeof BoatAccountKeyRefusedError | typeof BoatAccountServiceUnavailableError | typeof BoatAccountInternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"createBoatAccount", "POST", "/", never, never, Schema.toCodecJson<Schema.Struct<{
100
1465
  /** The caller's name for the account (an organization's name, say). At most 200 characters. */
101
1466
  readonly label: Schema.String;
102
- /** The Boat API key. Checked with Boat by one read-only call before it is stored. */
1467
+ /** The Boat key. Checked with Boat by read-only calls before it is stored; whitespace around it is trimmed. */
103
1468
  readonly apiKey: Schema.String;
1469
+ /**
1470
+ * For a personal key: the Boat organization to bill (its id or name), sent as `X-Boat-Org` on
1471
+ * every request for the account, so billing never follows the key's active wallet.
1472
+ */
1473
+ readonly organization: Schema.optional<Schema.String>;
104
1474
  }>>, never, Schema.toCodecJson<Schema.Struct<{
105
1475
  readonly boatAccountId: Schema.String;
106
1476
  readonly label: Schema.String;
@@ -109,7 +1479,377 @@ export declare const BoatAccountsGroup: HttpApiGroup.HttpApiGroup<"boatAccounts"
109
1479
  readonly createdAt: Schema.String;
110
1480
  /** When its key was last replaced; null when it still has the key it was created with. */
111
1481
  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<{
1482
+ /** The Boat organization the account bills, sent on every request for it; null: none named. */
1483
+ readonly organization: Schema.optional<Schema.NullOr<Schema.String>>;
1484
+ /** The key's last report, with when it was observed; null until the key is checked. */
1485
+ readonly report: Schema.optional<Schema.NullOr<Schema.Struct<{
1486
+ readonly observedAt: Schema.String;
1487
+ /** The Boat organization the account bills (`X-Boat-Org` on every request), or null. */
1488
+ readonly organization: Schema.NullOr<Schema.String>;
1489
+ /** Who the key is (`GET /me`). */
1490
+ readonly identity: Schema.Union<readonly [Schema.Struct<{
1491
+ readonly observed: Schema.Literal<true>;
1492
+ } & {
1493
+ /**
1494
+ * Boat's id for the account the key belongs to (`GET /me` `user.id`). A Boat account, never a
1495
+ * Sealant person: it is not a `PersonId` and names no one on this install.
1496
+ */
1497
+ accountId: Schema.optional<Schema.String>;
1498
+ login: Schema.optional<Schema.String>;
1499
+ displayName: Schema.optional<Schema.String>;
1500
+ serviceAccount: Schema.optional<Schema.Boolean>;
1501
+ accountStatus: Schema.Literals<readonly ["active", "suspended", "closed", "unknown"]>;
1502
+ }>, Schema.Struct<{
1503
+ readonly observed: Schema.Literal<false>;
1504
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
1505
+ readonly boat: Schema.optional<Schema.Struct<{
1506
+ 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"]>;
1507
+ readonly retryable: Schema.Boolean;
1508
+ readonly operation: Schema.optional<Schema.String>;
1509
+ readonly code: Schema.optional<Schema.String>;
1510
+ readonly message: Schema.optional<Schema.String>;
1511
+ readonly requestId: Schema.optional<Schema.String>;
1512
+ readonly status: Schema.optional<Schema.Int>;
1513
+ readonly permission: Schema.optional<Schema.String>;
1514
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
1515
+ readonly retryAt: Schema.optional<Schema.String>;
1516
+ readonly billingUrl: Schema.optional<Schema.String>;
1517
+ }>>;
1518
+ }>]>;
1519
+ /** A personal (account) key, or an organization's key. */
1520
+ readonly keyKind: Schema.Union<readonly [Schema.Struct<{
1521
+ readonly observed: Schema.Literal<true>;
1522
+ } & {
1523
+ kind: Schema.Literals<readonly ["personal", "organization"]>;
1524
+ }>, Schema.Struct<{
1525
+ readonly observed: Schema.Literal<false>;
1526
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
1527
+ readonly boat: Schema.optional<Schema.Struct<{
1528
+ 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"]>;
1529
+ readonly retryable: Schema.Boolean;
1530
+ readonly operation: Schema.optional<Schema.String>;
1531
+ readonly code: Schema.optional<Schema.String>;
1532
+ readonly message: Schema.optional<Schema.String>;
1533
+ readonly requestId: Schema.optional<Schema.String>;
1534
+ readonly status: Schema.optional<Schema.Int>;
1535
+ readonly permission: Schema.optional<Schema.String>;
1536
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
1537
+ readonly retryAt: Schema.optional<Schema.String>;
1538
+ readonly billingUrl: Schema.optional<Schema.String>;
1539
+ }>>;
1540
+ }>]>;
1541
+ /** Which wallet a VM started with the key bills (`GET /limits`). */
1542
+ readonly wallet: Schema.Union<readonly [Schema.Struct<{
1543
+ readonly observed: Schema.Literal<true>;
1544
+ } & {
1545
+ kind: Schema.Literals<readonly ["personal", "organization"]>;
1546
+ organizationId: Schema.optional<Schema.String>;
1547
+ organizationName: Schema.optional<Schema.String>;
1548
+ role: Schema.optional<Schema.String>;
1549
+ }>, Schema.Struct<{
1550
+ readonly observed: Schema.Literal<false>;
1551
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
1552
+ readonly boat: Schema.optional<Schema.Struct<{
1553
+ 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"]>;
1554
+ readonly retryable: Schema.Boolean;
1555
+ readonly operation: Schema.optional<Schema.String>;
1556
+ readonly code: Schema.optional<Schema.String>;
1557
+ readonly message: Schema.optional<Schema.String>;
1558
+ readonly requestId: Schema.optional<Schema.String>;
1559
+ readonly status: Schema.optional<Schema.Int>;
1560
+ readonly permission: Schema.optional<Schema.String>;
1561
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
1562
+ readonly retryAt: Schema.optional<Schema.String>;
1563
+ readonly billingUrl: Schema.optional<Schema.String>;
1564
+ }>>;
1565
+ }>]>;
1566
+ /** The permissions Core needs of every key, from the Boat calls it makes. */
1567
+ readonly requiredPermissions: Schema.$Array<Schema.String>;
1568
+ /** The key's permissions (`GET /api-keys`), and which of the required ones it lacks. */
1569
+ readonly permissions: Schema.Union<readonly [Schema.Struct<{
1570
+ readonly observed: Schema.Literal<true>;
1571
+ } & {
1572
+ held: Schema.$Array<Schema.String>;
1573
+ missing: Schema.$Array<Schema.String>;
1574
+ /** The key is limited to some VMs or environments: it cannot reach VMs Core creates. */
1575
+ limitedToSandboxes: Schema.Boolean;
1576
+ }>, Schema.Struct<{
1577
+ readonly observed: Schema.Literal<false>;
1578
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
1579
+ readonly boat: Schema.optional<Schema.Struct<{
1580
+ 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"]>;
1581
+ readonly retryable: Schema.Boolean;
1582
+ readonly operation: Schema.optional<Schema.String>;
1583
+ readonly code: Schema.optional<Schema.String>;
1584
+ readonly message: Schema.optional<Schema.String>;
1585
+ readonly requestId: Schema.optional<Schema.String>;
1586
+ readonly status: Schema.optional<Schema.Int>;
1587
+ readonly permission: Schema.optional<Schema.String>;
1588
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
1589
+ readonly retryAt: Schema.optional<Schema.String>;
1590
+ readonly billingUrl: Schema.optional<Schema.String>;
1591
+ }>>;
1592
+ }>]>;
1593
+ /** When the key expires; `expiresAt` null: it never does. */
1594
+ readonly expiry: Schema.Union<readonly [Schema.Struct<{
1595
+ readonly observed: Schema.Literal<true>;
1596
+ } & {
1597
+ expiresAt: Schema.NullOr<Schema.String>;
1598
+ expired: Schema.Boolean;
1599
+ expiringSoon: Schema.Boolean;
1600
+ }>, Schema.Struct<{
1601
+ readonly observed: Schema.Literal<false>;
1602
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
1603
+ readonly boat: Schema.optional<Schema.Struct<{
1604
+ 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"]>;
1605
+ readonly retryable: Schema.Boolean;
1606
+ readonly operation: Schema.optional<Schema.String>;
1607
+ readonly code: Schema.optional<Schema.String>;
1608
+ readonly message: Schema.optional<Schema.String>;
1609
+ readonly requestId: Schema.optional<Schema.String>;
1610
+ readonly status: Schema.optional<Schema.Int>;
1611
+ readonly permission: Schema.optional<Schema.String>;
1612
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
1613
+ readonly retryAt: Schema.optional<Schema.String>;
1614
+ readonly billingUrl: Schema.optional<Schema.String>;
1615
+ }>>;
1616
+ }>]>;
1617
+ /** Whether the wallet can start a VM now, why not, and its running and allowed VMs. */
1618
+ readonly start: Schema.Union<readonly [Schema.Struct<{
1619
+ readonly observed: Schema.Literal<true>;
1620
+ } & {
1621
+ canStart: Schema.Boolean;
1622
+ blockedReason: Schema.optional<Schema.String>;
1623
+ billingStatus: Schema.optional<Schema.String>;
1624
+ runningVms: Schema.Int;
1625
+ allowedVms: Schema.Int;
1626
+ }>, Schema.Struct<{
1627
+ readonly observed: Schema.Literal<false>;
1628
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
1629
+ readonly boat: Schema.optional<Schema.Struct<{
1630
+ 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"]>;
1631
+ readonly retryable: Schema.Boolean;
1632
+ readonly operation: Schema.optional<Schema.String>;
1633
+ readonly code: Schema.optional<Schema.String>;
1634
+ readonly message: Schema.optional<Schema.String>;
1635
+ readonly requestId: Schema.optional<Schema.String>;
1636
+ readonly status: Schema.optional<Schema.Int>;
1637
+ readonly permission: Schema.optional<Schema.String>;
1638
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
1639
+ readonly retryAt: Schema.optional<Schema.String>;
1640
+ readonly billingUrl: Schema.optional<Schema.String>;
1641
+ }>>;
1642
+ }>]>;
1643
+ /** Saved snapshot slots of the wallet (`GET /saved-snapshots`). */
1644
+ readonly snapshots: Schema.Union<readonly [Schema.Struct<{
1645
+ readonly observed: Schema.Literal<true>;
1646
+ } & {
1647
+ used: Schema.Int;
1648
+ included: Schema.Int;
1649
+ }>, Schema.Struct<{
1650
+ readonly observed: Schema.Literal<false>;
1651
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
1652
+ readonly boat: Schema.optional<Schema.Struct<{
1653
+ 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"]>;
1654
+ readonly retryable: Schema.Boolean;
1655
+ readonly operation: Schema.optional<Schema.String>;
1656
+ readonly code: Schema.optional<Schema.String>;
1657
+ readonly message: Schema.optional<Schema.String>;
1658
+ readonly requestId: Schema.optional<Schema.String>;
1659
+ readonly status: Schema.optional<Schema.Int>;
1660
+ readonly permission: Schema.optional<Schema.String>;
1661
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
1662
+ readonly retryAt: Schema.optional<Schema.String>;
1663
+ readonly billingUrl: Schema.optional<Schema.String>;
1664
+ }>>;
1665
+ }>]>;
1666
+ }>>>;
1667
+ }>>, 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<{
1668
+ readonly label: Schema.String;
1669
+ /** The key's last report, with when it was observed; null until it is checked. */
1670
+ readonly report: Schema.NullOr<Schema.Struct<{
1671
+ readonly observedAt: Schema.String;
1672
+ /** The Boat organization the account bills (`X-Boat-Org` on every request), or null. */
1673
+ readonly organization: Schema.NullOr<Schema.String>;
1674
+ /** Who the key is (`GET /me`). */
1675
+ readonly identity: Schema.Union<readonly [Schema.Struct<{
1676
+ readonly observed: Schema.Literal<true>;
1677
+ } & {
1678
+ /**
1679
+ * Boat's id for the account the key belongs to (`GET /me` `user.id`). A Boat account, never a
1680
+ * Sealant person: it is not a `PersonId` and names no one on this install.
1681
+ */
1682
+ accountId: Schema.optional<Schema.String>;
1683
+ login: Schema.optional<Schema.String>;
1684
+ displayName: Schema.optional<Schema.String>;
1685
+ serviceAccount: Schema.optional<Schema.Boolean>;
1686
+ accountStatus: Schema.Literals<readonly ["active", "suspended", "closed", "unknown"]>;
1687
+ }>, Schema.Struct<{
1688
+ readonly observed: Schema.Literal<false>;
1689
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
1690
+ readonly boat: Schema.optional<Schema.Struct<{
1691
+ 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"]>;
1692
+ readonly retryable: Schema.Boolean;
1693
+ readonly operation: Schema.optional<Schema.String>;
1694
+ readonly code: Schema.optional<Schema.String>;
1695
+ readonly message: Schema.optional<Schema.String>;
1696
+ readonly requestId: Schema.optional<Schema.String>;
1697
+ readonly status: Schema.optional<Schema.Int>;
1698
+ readonly permission: Schema.optional<Schema.String>;
1699
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
1700
+ readonly retryAt: Schema.optional<Schema.String>;
1701
+ readonly billingUrl: Schema.optional<Schema.String>;
1702
+ }>>;
1703
+ }>]>;
1704
+ /** A personal (account) key, or an organization's key. */
1705
+ readonly keyKind: Schema.Union<readonly [Schema.Struct<{
1706
+ readonly observed: Schema.Literal<true>;
1707
+ } & {
1708
+ kind: Schema.Literals<readonly ["personal", "organization"]>;
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
+ /** Which wallet a VM started with the key bills (`GET /limits`). */
1727
+ readonly wallet: Schema.Union<readonly [Schema.Struct<{
1728
+ readonly observed: Schema.Literal<true>;
1729
+ } & {
1730
+ kind: Schema.Literals<readonly ["personal", "organization"]>;
1731
+ organizationId: Schema.optional<Schema.String>;
1732
+ organizationName: Schema.optional<Schema.String>;
1733
+ role: Schema.optional<Schema.String>;
1734
+ }>, Schema.Struct<{
1735
+ readonly observed: Schema.Literal<false>;
1736
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
1737
+ readonly boat: Schema.optional<Schema.Struct<{
1738
+ 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"]>;
1739
+ readonly retryable: Schema.Boolean;
1740
+ readonly operation: Schema.optional<Schema.String>;
1741
+ readonly code: Schema.optional<Schema.String>;
1742
+ readonly message: Schema.optional<Schema.String>;
1743
+ readonly requestId: Schema.optional<Schema.String>;
1744
+ readonly status: Schema.optional<Schema.Int>;
1745
+ readonly permission: Schema.optional<Schema.String>;
1746
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
1747
+ readonly retryAt: Schema.optional<Schema.String>;
1748
+ readonly billingUrl: Schema.optional<Schema.String>;
1749
+ }>>;
1750
+ }>]>;
1751
+ /** The permissions Core needs of every key, from the Boat calls it makes. */
1752
+ readonly requiredPermissions: Schema.$Array<Schema.String>;
1753
+ /** The key's permissions (`GET /api-keys`), and which of the required ones it lacks. */
1754
+ readonly permissions: Schema.Union<readonly [Schema.Struct<{
1755
+ readonly observed: Schema.Literal<true>;
1756
+ } & {
1757
+ held: Schema.$Array<Schema.String>;
1758
+ missing: Schema.$Array<Schema.String>;
1759
+ /** The key is limited to some VMs or environments: it cannot reach VMs Core creates. */
1760
+ limitedToSandboxes: Schema.Boolean;
1761
+ }>, Schema.Struct<{
1762
+ readonly observed: Schema.Literal<false>;
1763
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
1764
+ readonly boat: Schema.optional<Schema.Struct<{
1765
+ 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"]>;
1766
+ readonly retryable: Schema.Boolean;
1767
+ readonly operation: Schema.optional<Schema.String>;
1768
+ readonly code: Schema.optional<Schema.String>;
1769
+ readonly message: Schema.optional<Schema.String>;
1770
+ readonly requestId: Schema.optional<Schema.String>;
1771
+ readonly status: Schema.optional<Schema.Int>;
1772
+ readonly permission: Schema.optional<Schema.String>;
1773
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
1774
+ readonly retryAt: Schema.optional<Schema.String>;
1775
+ readonly billingUrl: Schema.optional<Schema.String>;
1776
+ }>>;
1777
+ }>]>;
1778
+ /** When the key expires; `expiresAt` null: it never does. */
1779
+ readonly expiry: Schema.Union<readonly [Schema.Struct<{
1780
+ readonly observed: Schema.Literal<true>;
1781
+ } & {
1782
+ expiresAt: Schema.NullOr<Schema.String>;
1783
+ expired: Schema.Boolean;
1784
+ expiringSoon: Schema.Boolean;
1785
+ }>, Schema.Struct<{
1786
+ readonly observed: Schema.Literal<false>;
1787
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
1788
+ readonly boat: Schema.optional<Schema.Struct<{
1789
+ 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"]>;
1790
+ readonly retryable: Schema.Boolean;
1791
+ readonly operation: Schema.optional<Schema.String>;
1792
+ readonly code: Schema.optional<Schema.String>;
1793
+ readonly message: Schema.optional<Schema.String>;
1794
+ readonly requestId: Schema.optional<Schema.String>;
1795
+ readonly status: Schema.optional<Schema.Int>;
1796
+ readonly permission: Schema.optional<Schema.String>;
1797
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
1798
+ readonly retryAt: Schema.optional<Schema.String>;
1799
+ readonly billingUrl: Schema.optional<Schema.String>;
1800
+ }>>;
1801
+ }>]>;
1802
+ /** Whether the wallet can start a VM now, why not, and its running and allowed VMs. */
1803
+ readonly start: Schema.Union<readonly [Schema.Struct<{
1804
+ readonly observed: Schema.Literal<true>;
1805
+ } & {
1806
+ canStart: Schema.Boolean;
1807
+ blockedReason: Schema.optional<Schema.String>;
1808
+ billingStatus: Schema.optional<Schema.String>;
1809
+ runningVms: Schema.Int;
1810
+ allowedVms: Schema.Int;
1811
+ }>, Schema.Struct<{
1812
+ readonly observed: Schema.Literal<false>;
1813
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
1814
+ readonly boat: Schema.optional<Schema.Struct<{
1815
+ 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"]>;
1816
+ readonly retryable: Schema.Boolean;
1817
+ readonly operation: Schema.optional<Schema.String>;
1818
+ readonly code: Schema.optional<Schema.String>;
1819
+ readonly message: Schema.optional<Schema.String>;
1820
+ readonly requestId: Schema.optional<Schema.String>;
1821
+ readonly status: Schema.optional<Schema.Int>;
1822
+ readonly permission: Schema.optional<Schema.String>;
1823
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
1824
+ readonly retryAt: Schema.optional<Schema.String>;
1825
+ readonly billingUrl: Schema.optional<Schema.String>;
1826
+ }>>;
1827
+ }>]>;
1828
+ /** Saved snapshot slots of the wallet (`GET /saved-snapshots`). */
1829
+ readonly snapshots: Schema.Union<readonly [Schema.Struct<{
1830
+ readonly observed: Schema.Literal<true>;
1831
+ } & {
1832
+ used: Schema.Int;
1833
+ included: Schema.Int;
1834
+ }>, Schema.Struct<{
1835
+ readonly observed: Schema.Literal<false>;
1836
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
1837
+ readonly boat: Schema.optional<Schema.Struct<{
1838
+ 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"]>;
1839
+ readonly retryable: Schema.Boolean;
1840
+ readonly operation: Schema.optional<Schema.String>;
1841
+ readonly code: Schema.optional<Schema.String>;
1842
+ readonly message: Schema.optional<Schema.String>;
1843
+ readonly requestId: Schema.optional<Schema.String>;
1844
+ readonly status: Schema.optional<Schema.Int>;
1845
+ readonly permission: Schema.optional<Schema.String>;
1846
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
1847
+ readonly retryAt: Schema.optional<Schema.String>;
1848
+ readonly billingUrl: Schema.optional<Schema.String>;
1849
+ }>>;
1850
+ }>]>;
1851
+ }>>;
1852
+ }>>, Schema.toCodecJson<typeof BoatAccountServiceUnavailableError | typeof BoatAccountInternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"listBoatAccounts", "GET", "/", never, never, never, never, Schema.toCodecJson<Schema.Struct<{
113
1853
  readonly items: Schema.$Array<Schema.Struct<{
114
1854
  readonly boatAccountId: Schema.String;
115
1855
  readonly label: Schema.String;
@@ -118,9 +1858,194 @@ export declare const BoatAccountsGroup: HttpApiGroup.HttpApiGroup<"boatAccounts"
118
1858
  readonly createdAt: Schema.String;
119
1859
  /** When its key was last replaced; null when it still has the key it was created with. */
120
1860
  readonly keyRotatedAt: Schema.NullOr<Schema.String>;
1861
+ /** The Boat organization the account bills, sent on every request for it; null: none named. */
1862
+ readonly organization: Schema.optional<Schema.NullOr<Schema.String>>;
1863
+ /** The key's last report, with when it was observed; null until the key is checked. */
1864
+ readonly report: Schema.optional<Schema.NullOr<Schema.Struct<{
1865
+ readonly observedAt: Schema.String;
1866
+ /** The Boat organization the account bills (`X-Boat-Org` on every request), or null. */
1867
+ readonly organization: Schema.NullOr<Schema.String>;
1868
+ /** Who the key is (`GET /me`). */
1869
+ readonly identity: Schema.Union<readonly [Schema.Struct<{
1870
+ readonly observed: Schema.Literal<true>;
1871
+ } & {
1872
+ /**
1873
+ * Boat's id for the account the key belongs to (`GET /me` `user.id`). A Boat account, never a
1874
+ * Sealant person: it is not a `PersonId` and names no one on this install.
1875
+ */
1876
+ accountId: Schema.optional<Schema.String>;
1877
+ login: Schema.optional<Schema.String>;
1878
+ displayName: Schema.optional<Schema.String>;
1879
+ serviceAccount: Schema.optional<Schema.Boolean>;
1880
+ accountStatus: Schema.Literals<readonly ["active", "suspended", "closed", "unknown"]>;
1881
+ }>, Schema.Struct<{
1882
+ readonly observed: Schema.Literal<false>;
1883
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
1884
+ readonly boat: Schema.optional<Schema.Struct<{
1885
+ 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"]>;
1886
+ readonly retryable: Schema.Boolean;
1887
+ readonly operation: Schema.optional<Schema.String>;
1888
+ readonly code: Schema.optional<Schema.String>;
1889
+ readonly message: Schema.optional<Schema.String>;
1890
+ readonly requestId: Schema.optional<Schema.String>;
1891
+ readonly status: Schema.optional<Schema.Int>;
1892
+ readonly permission: Schema.optional<Schema.String>;
1893
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
1894
+ readonly retryAt: Schema.optional<Schema.String>;
1895
+ readonly billingUrl: Schema.optional<Schema.String>;
1896
+ }>>;
1897
+ }>]>;
1898
+ /** A personal (account) key, or an organization's key. */
1899
+ readonly keyKind: Schema.Union<readonly [Schema.Struct<{
1900
+ readonly observed: Schema.Literal<true>;
1901
+ } & {
1902
+ kind: Schema.Literals<readonly ["personal", "organization"]>;
1903
+ }>, Schema.Struct<{
1904
+ readonly observed: Schema.Literal<false>;
1905
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
1906
+ readonly boat: Schema.optional<Schema.Struct<{
1907
+ 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"]>;
1908
+ readonly retryable: Schema.Boolean;
1909
+ readonly operation: Schema.optional<Schema.String>;
1910
+ readonly code: Schema.optional<Schema.String>;
1911
+ readonly message: Schema.optional<Schema.String>;
1912
+ readonly requestId: Schema.optional<Schema.String>;
1913
+ readonly status: Schema.optional<Schema.Int>;
1914
+ readonly permission: Schema.optional<Schema.String>;
1915
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
1916
+ readonly retryAt: Schema.optional<Schema.String>;
1917
+ readonly billingUrl: Schema.optional<Schema.String>;
1918
+ }>>;
1919
+ }>]>;
1920
+ /** Which wallet a VM started with the key bills (`GET /limits`). */
1921
+ readonly wallet: Schema.Union<readonly [Schema.Struct<{
1922
+ readonly observed: Schema.Literal<true>;
1923
+ } & {
1924
+ kind: Schema.Literals<readonly ["personal", "organization"]>;
1925
+ organizationId: Schema.optional<Schema.String>;
1926
+ organizationName: Schema.optional<Schema.String>;
1927
+ role: Schema.optional<Schema.String>;
1928
+ }>, Schema.Struct<{
1929
+ readonly observed: Schema.Literal<false>;
1930
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
1931
+ readonly boat: Schema.optional<Schema.Struct<{
1932
+ 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"]>;
1933
+ readonly retryable: Schema.Boolean;
1934
+ readonly operation: Schema.optional<Schema.String>;
1935
+ readonly code: Schema.optional<Schema.String>;
1936
+ readonly message: Schema.optional<Schema.String>;
1937
+ readonly requestId: Schema.optional<Schema.String>;
1938
+ readonly status: Schema.optional<Schema.Int>;
1939
+ readonly permission: Schema.optional<Schema.String>;
1940
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
1941
+ readonly retryAt: Schema.optional<Schema.String>;
1942
+ readonly billingUrl: Schema.optional<Schema.String>;
1943
+ }>>;
1944
+ }>]>;
1945
+ /** The permissions Core needs of every key, from the Boat calls it makes. */
1946
+ readonly requiredPermissions: Schema.$Array<Schema.String>;
1947
+ /** The key's permissions (`GET /api-keys`), and which of the required ones it lacks. */
1948
+ readonly permissions: Schema.Union<readonly [Schema.Struct<{
1949
+ readonly observed: Schema.Literal<true>;
1950
+ } & {
1951
+ held: Schema.$Array<Schema.String>;
1952
+ missing: Schema.$Array<Schema.String>;
1953
+ /** The key is limited to some VMs or environments: it cannot reach VMs Core creates. */
1954
+ limitedToSandboxes: Schema.Boolean;
1955
+ }>, Schema.Struct<{
1956
+ readonly observed: Schema.Literal<false>;
1957
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
1958
+ readonly boat: Schema.optional<Schema.Struct<{
1959
+ 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"]>;
1960
+ readonly retryable: Schema.Boolean;
1961
+ readonly operation: Schema.optional<Schema.String>;
1962
+ readonly code: Schema.optional<Schema.String>;
1963
+ readonly message: Schema.optional<Schema.String>;
1964
+ readonly requestId: Schema.optional<Schema.String>;
1965
+ readonly status: Schema.optional<Schema.Int>;
1966
+ readonly permission: Schema.optional<Schema.String>;
1967
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
1968
+ readonly retryAt: Schema.optional<Schema.String>;
1969
+ readonly billingUrl: Schema.optional<Schema.String>;
1970
+ }>>;
1971
+ }>]>;
1972
+ /** When the key expires; `expiresAt` null: it never does. */
1973
+ readonly expiry: Schema.Union<readonly [Schema.Struct<{
1974
+ readonly observed: Schema.Literal<true>;
1975
+ } & {
1976
+ expiresAt: Schema.NullOr<Schema.String>;
1977
+ expired: Schema.Boolean;
1978
+ expiringSoon: Schema.Boolean;
1979
+ }>, Schema.Struct<{
1980
+ readonly observed: Schema.Literal<false>;
1981
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
1982
+ readonly boat: Schema.optional<Schema.Struct<{
1983
+ 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"]>;
1984
+ readonly retryable: Schema.Boolean;
1985
+ readonly operation: Schema.optional<Schema.String>;
1986
+ readonly code: Schema.optional<Schema.String>;
1987
+ readonly message: Schema.optional<Schema.String>;
1988
+ readonly requestId: Schema.optional<Schema.String>;
1989
+ readonly status: Schema.optional<Schema.Int>;
1990
+ readonly permission: Schema.optional<Schema.String>;
1991
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
1992
+ readonly retryAt: Schema.optional<Schema.String>;
1993
+ readonly billingUrl: Schema.optional<Schema.String>;
1994
+ }>>;
1995
+ }>]>;
1996
+ /** Whether the wallet can start a VM now, why not, and its running and allowed VMs. */
1997
+ readonly start: Schema.Union<readonly [Schema.Struct<{
1998
+ readonly observed: Schema.Literal<true>;
1999
+ } & {
2000
+ canStart: Schema.Boolean;
2001
+ blockedReason: Schema.optional<Schema.String>;
2002
+ billingStatus: Schema.optional<Schema.String>;
2003
+ runningVms: Schema.Int;
2004
+ allowedVms: Schema.Int;
2005
+ }>, Schema.Struct<{
2006
+ readonly observed: Schema.Literal<false>;
2007
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
2008
+ readonly boat: Schema.optional<Schema.Struct<{
2009
+ 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"]>;
2010
+ readonly retryable: Schema.Boolean;
2011
+ readonly operation: Schema.optional<Schema.String>;
2012
+ readonly code: Schema.optional<Schema.String>;
2013
+ readonly message: Schema.optional<Schema.String>;
2014
+ readonly requestId: Schema.optional<Schema.String>;
2015
+ readonly status: Schema.optional<Schema.Int>;
2016
+ readonly permission: Schema.optional<Schema.String>;
2017
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
2018
+ readonly retryAt: Schema.optional<Schema.String>;
2019
+ readonly billingUrl: Schema.optional<Schema.String>;
2020
+ }>>;
2021
+ }>]>;
2022
+ /** Saved snapshot slots of the wallet (`GET /saved-snapshots`). */
2023
+ readonly snapshots: Schema.Union<readonly [Schema.Struct<{
2024
+ readonly observed: Schema.Literal<true>;
2025
+ } & {
2026
+ used: Schema.Int;
2027
+ included: Schema.Int;
2028
+ }>, Schema.Struct<{
2029
+ readonly observed: Schema.Literal<false>;
2030
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
2031
+ readonly boat: Schema.optional<Schema.Struct<{
2032
+ 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"]>;
2033
+ readonly retryable: Schema.Boolean;
2034
+ readonly operation: Schema.optional<Schema.String>;
2035
+ readonly code: Schema.optional<Schema.String>;
2036
+ readonly message: Schema.optional<Schema.String>;
2037
+ readonly requestId: Schema.optional<Schema.String>;
2038
+ readonly status: Schema.optional<Schema.Int>;
2039
+ readonly permission: Schema.optional<Schema.String>;
2040
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
2041
+ readonly retryAt: Schema.optional<Schema.String>;
2042
+ readonly billingUrl: Schema.optional<Schema.String>;
2043
+ }>>;
2044
+ }>]>;
2045
+ }>>>;
121
2046
  }>>;
122
2047
  }>>, Schema.toCodecJson<typeof BoatAccountServiceUnavailableError | typeof BoatAccountInternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"removeBoatAccount", "DELETE", "/:boatAccountId", Schema.toCodecStringTree<Schema.Struct<{
123
- readonly boatAccountId: Schema.String;
2048
+ readonly boatAccountId: Schema.Union<readonly [Schema.String, Schema.Literal<"default">]>;
124
2049
  }>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
125
2050
  readonly boatAccountId: Schema.String;
126
2051
  readonly label: Schema.String;
@@ -129,10 +2054,195 @@ export declare const BoatAccountsGroup: HttpApiGroup.HttpApiGroup<"boatAccounts"
129
2054
  readonly createdAt: Schema.String;
130
2055
  /** When its key was last replaced; null when it still has the key it was created with. */
131
2056
  readonly keyRotatedAt: Schema.NullOr<Schema.String>;
2057
+ /** The Boat organization the account bills, sent on every request for it; null: none named. */
2058
+ readonly organization: Schema.optional<Schema.NullOr<Schema.String>>;
2059
+ /** The key's last report, with when it was observed; null until the key is checked. */
2060
+ readonly report: Schema.optional<Schema.NullOr<Schema.Struct<{
2061
+ readonly observedAt: Schema.String;
2062
+ /** The Boat organization the account bills (`X-Boat-Org` on every request), or null. */
2063
+ readonly organization: Schema.NullOr<Schema.String>;
2064
+ /** Who the key is (`GET /me`). */
2065
+ readonly identity: Schema.Union<readonly [Schema.Struct<{
2066
+ readonly observed: Schema.Literal<true>;
2067
+ } & {
2068
+ /**
2069
+ * Boat's id for the account the key belongs to (`GET /me` `user.id`). A Boat account, never a
2070
+ * Sealant person: it is not a `PersonId` and names no one on this install.
2071
+ */
2072
+ accountId: Schema.optional<Schema.String>;
2073
+ login: Schema.optional<Schema.String>;
2074
+ displayName: Schema.optional<Schema.String>;
2075
+ serviceAccount: Schema.optional<Schema.Boolean>;
2076
+ accountStatus: Schema.Literals<readonly ["active", "suspended", "closed", "unknown"]>;
2077
+ }>, Schema.Struct<{
2078
+ readonly observed: Schema.Literal<false>;
2079
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
2080
+ readonly boat: Schema.optional<Schema.Struct<{
2081
+ 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"]>;
2082
+ readonly retryable: Schema.Boolean;
2083
+ readonly operation: Schema.optional<Schema.String>;
2084
+ readonly code: Schema.optional<Schema.String>;
2085
+ readonly message: Schema.optional<Schema.String>;
2086
+ readonly requestId: Schema.optional<Schema.String>;
2087
+ readonly status: Schema.optional<Schema.Int>;
2088
+ readonly permission: Schema.optional<Schema.String>;
2089
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
2090
+ readonly retryAt: Schema.optional<Schema.String>;
2091
+ readonly billingUrl: Schema.optional<Schema.String>;
2092
+ }>>;
2093
+ }>]>;
2094
+ /** A personal (account) key, or an organization's key. */
2095
+ readonly keyKind: Schema.Union<readonly [Schema.Struct<{
2096
+ readonly observed: Schema.Literal<true>;
2097
+ } & {
2098
+ kind: Schema.Literals<readonly ["personal", "organization"]>;
2099
+ }>, Schema.Struct<{
2100
+ readonly observed: Schema.Literal<false>;
2101
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
2102
+ readonly boat: Schema.optional<Schema.Struct<{
2103
+ 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"]>;
2104
+ readonly retryable: Schema.Boolean;
2105
+ readonly operation: Schema.optional<Schema.String>;
2106
+ readonly code: Schema.optional<Schema.String>;
2107
+ readonly message: Schema.optional<Schema.String>;
2108
+ readonly requestId: Schema.optional<Schema.String>;
2109
+ readonly status: Schema.optional<Schema.Int>;
2110
+ readonly permission: Schema.optional<Schema.String>;
2111
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
2112
+ readonly retryAt: Schema.optional<Schema.String>;
2113
+ readonly billingUrl: Schema.optional<Schema.String>;
2114
+ }>>;
2115
+ }>]>;
2116
+ /** Which wallet a VM started with the key bills (`GET /limits`). */
2117
+ readonly wallet: Schema.Union<readonly [Schema.Struct<{
2118
+ readonly observed: Schema.Literal<true>;
2119
+ } & {
2120
+ kind: Schema.Literals<readonly ["personal", "organization"]>;
2121
+ organizationId: Schema.optional<Schema.String>;
2122
+ organizationName: Schema.optional<Schema.String>;
2123
+ role: Schema.optional<Schema.String>;
2124
+ }>, Schema.Struct<{
2125
+ readonly observed: Schema.Literal<false>;
2126
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
2127
+ readonly boat: Schema.optional<Schema.Struct<{
2128
+ 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"]>;
2129
+ readonly retryable: Schema.Boolean;
2130
+ readonly operation: Schema.optional<Schema.String>;
2131
+ readonly code: Schema.optional<Schema.String>;
2132
+ readonly message: Schema.optional<Schema.String>;
2133
+ readonly requestId: Schema.optional<Schema.String>;
2134
+ readonly status: Schema.optional<Schema.Int>;
2135
+ readonly permission: Schema.optional<Schema.String>;
2136
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
2137
+ readonly retryAt: Schema.optional<Schema.String>;
2138
+ readonly billingUrl: Schema.optional<Schema.String>;
2139
+ }>>;
2140
+ }>]>;
2141
+ /** The permissions Core needs of every key, from the Boat calls it makes. */
2142
+ readonly requiredPermissions: Schema.$Array<Schema.String>;
2143
+ /** The key's permissions (`GET /api-keys`), and which of the required ones it lacks. */
2144
+ readonly permissions: Schema.Union<readonly [Schema.Struct<{
2145
+ readonly observed: Schema.Literal<true>;
2146
+ } & {
2147
+ held: Schema.$Array<Schema.String>;
2148
+ missing: Schema.$Array<Schema.String>;
2149
+ /** The key is limited to some VMs or environments: it cannot reach VMs Core creates. */
2150
+ limitedToSandboxes: Schema.Boolean;
2151
+ }>, Schema.Struct<{
2152
+ readonly observed: Schema.Literal<false>;
2153
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
2154
+ readonly boat: Schema.optional<Schema.Struct<{
2155
+ 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"]>;
2156
+ readonly retryable: Schema.Boolean;
2157
+ readonly operation: Schema.optional<Schema.String>;
2158
+ readonly code: Schema.optional<Schema.String>;
2159
+ readonly message: Schema.optional<Schema.String>;
2160
+ readonly requestId: Schema.optional<Schema.String>;
2161
+ readonly status: Schema.optional<Schema.Int>;
2162
+ readonly permission: Schema.optional<Schema.String>;
2163
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
2164
+ readonly retryAt: Schema.optional<Schema.String>;
2165
+ readonly billingUrl: Schema.optional<Schema.String>;
2166
+ }>>;
2167
+ }>]>;
2168
+ /** When the key expires; `expiresAt` null: it never does. */
2169
+ readonly expiry: Schema.Union<readonly [Schema.Struct<{
2170
+ readonly observed: Schema.Literal<true>;
2171
+ } & {
2172
+ expiresAt: Schema.NullOr<Schema.String>;
2173
+ expired: Schema.Boolean;
2174
+ expiringSoon: Schema.Boolean;
2175
+ }>, Schema.Struct<{
2176
+ readonly observed: Schema.Literal<false>;
2177
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
2178
+ readonly boat: Schema.optional<Schema.Struct<{
2179
+ 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"]>;
2180
+ readonly retryable: Schema.Boolean;
2181
+ readonly operation: Schema.optional<Schema.String>;
2182
+ readonly code: Schema.optional<Schema.String>;
2183
+ readonly message: Schema.optional<Schema.String>;
2184
+ readonly requestId: Schema.optional<Schema.String>;
2185
+ readonly status: Schema.optional<Schema.Int>;
2186
+ readonly permission: Schema.optional<Schema.String>;
2187
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
2188
+ readonly retryAt: Schema.optional<Schema.String>;
2189
+ readonly billingUrl: Schema.optional<Schema.String>;
2190
+ }>>;
2191
+ }>]>;
2192
+ /** Whether the wallet can start a VM now, why not, and its running and allowed VMs. */
2193
+ readonly start: Schema.Union<readonly [Schema.Struct<{
2194
+ readonly observed: Schema.Literal<true>;
2195
+ } & {
2196
+ canStart: Schema.Boolean;
2197
+ blockedReason: Schema.optional<Schema.String>;
2198
+ billingStatus: Schema.optional<Schema.String>;
2199
+ runningVms: Schema.Int;
2200
+ allowedVms: Schema.Int;
2201
+ }>, Schema.Struct<{
2202
+ readonly observed: Schema.Literal<false>;
2203
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
2204
+ readonly boat: Schema.optional<Schema.Struct<{
2205
+ 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"]>;
2206
+ readonly retryable: Schema.Boolean;
2207
+ readonly operation: Schema.optional<Schema.String>;
2208
+ readonly code: Schema.optional<Schema.String>;
2209
+ readonly message: Schema.optional<Schema.String>;
2210
+ readonly requestId: Schema.optional<Schema.String>;
2211
+ readonly status: Schema.optional<Schema.Int>;
2212
+ readonly permission: Schema.optional<Schema.String>;
2213
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
2214
+ readonly retryAt: Schema.optional<Schema.String>;
2215
+ readonly billingUrl: Schema.optional<Schema.String>;
2216
+ }>>;
2217
+ }>]>;
2218
+ /** Saved snapshot slots of the wallet (`GET /saved-snapshots`). */
2219
+ readonly snapshots: Schema.Union<readonly [Schema.Struct<{
2220
+ readonly observed: Schema.Literal<true>;
2221
+ } & {
2222
+ used: Schema.Int;
2223
+ included: Schema.Int;
2224
+ }>, Schema.Struct<{
2225
+ readonly observed: Schema.Literal<false>;
2226
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
2227
+ readonly boat: Schema.optional<Schema.Struct<{
2228
+ 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"]>;
2229
+ readonly retryable: Schema.Boolean;
2230
+ readonly operation: Schema.optional<Schema.String>;
2231
+ readonly code: Schema.optional<Schema.String>;
2232
+ readonly message: Schema.optional<Schema.String>;
2233
+ readonly requestId: Schema.optional<Schema.String>;
2234
+ readonly status: Schema.optional<Schema.Int>;
2235
+ readonly permission: Schema.optional<Schema.String>;
2236
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
2237
+ readonly retryAt: Schema.optional<Schema.String>;
2238
+ readonly billingUrl: Schema.optional<Schema.String>;
2239
+ }>>;
2240
+ }>]>;
2241
+ }>>>;
132
2242
  }>>, 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;
2243
+ readonly boatAccountId: Schema.Union<readonly [Schema.String, Schema.Literal<"default">]>;
134
2244
  }>>, never, Schema.toCodecJson<Schema.Struct<{
135
- /** The new Boat API key, for the same Boat account: it must see every VM the account runs. */
2245
+ /** The new Boat key, for the same Boat account: it must see every VM the account runs. */
136
2246
  readonly apiKey: Schema.String;
137
2247
  }>>, never, Schema.toCodecJson<Schema.Struct<{
138
2248
  readonly boatAccountId: Schema.String;
@@ -142,5 +2252,190 @@ export declare const BoatAccountsGroup: HttpApiGroup.HttpApiGroup<"boatAccounts"
142
2252
  readonly createdAt: Schema.String;
143
2253
  /** When its key was last replaced; null when it still has the key it was created with. */
144
2254
  readonly keyRotatedAt: Schema.NullOr<Schema.String>;
2255
+ /** The Boat organization the account bills, sent on every request for it; null: none named. */
2256
+ readonly organization: Schema.optional<Schema.NullOr<Schema.String>>;
2257
+ /** The key's last report, with when it was observed; null until the key is checked. */
2258
+ readonly report: Schema.optional<Schema.NullOr<Schema.Struct<{
2259
+ readonly observedAt: Schema.String;
2260
+ /** The Boat organization the account bills (`X-Boat-Org` on every request), or null. */
2261
+ readonly organization: Schema.NullOr<Schema.String>;
2262
+ /** Who the key is (`GET /me`). */
2263
+ readonly identity: Schema.Union<readonly [Schema.Struct<{
2264
+ readonly observed: Schema.Literal<true>;
2265
+ } & {
2266
+ /**
2267
+ * Boat's id for the account the key belongs to (`GET /me` `user.id`). A Boat account, never a
2268
+ * Sealant person: it is not a `PersonId` and names no one on this install.
2269
+ */
2270
+ accountId: Schema.optional<Schema.String>;
2271
+ login: Schema.optional<Schema.String>;
2272
+ displayName: Schema.optional<Schema.String>;
2273
+ serviceAccount: Schema.optional<Schema.Boolean>;
2274
+ accountStatus: Schema.Literals<readonly ["active", "suspended", "closed", "unknown"]>;
2275
+ }>, Schema.Struct<{
2276
+ readonly observed: Schema.Literal<false>;
2277
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
2278
+ readonly boat: Schema.optional<Schema.Struct<{
2279
+ 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"]>;
2280
+ readonly retryable: Schema.Boolean;
2281
+ readonly operation: Schema.optional<Schema.String>;
2282
+ readonly code: Schema.optional<Schema.String>;
2283
+ readonly message: Schema.optional<Schema.String>;
2284
+ readonly requestId: Schema.optional<Schema.String>;
2285
+ readonly status: Schema.optional<Schema.Int>;
2286
+ readonly permission: Schema.optional<Schema.String>;
2287
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
2288
+ readonly retryAt: Schema.optional<Schema.String>;
2289
+ readonly billingUrl: Schema.optional<Schema.String>;
2290
+ }>>;
2291
+ }>]>;
2292
+ /** A personal (account) key, or an organization's key. */
2293
+ readonly keyKind: Schema.Union<readonly [Schema.Struct<{
2294
+ readonly observed: Schema.Literal<true>;
2295
+ } & {
2296
+ kind: Schema.Literals<readonly ["personal", "organization"]>;
2297
+ }>, Schema.Struct<{
2298
+ readonly observed: Schema.Literal<false>;
2299
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
2300
+ readonly boat: Schema.optional<Schema.Struct<{
2301
+ 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"]>;
2302
+ readonly retryable: Schema.Boolean;
2303
+ readonly operation: Schema.optional<Schema.String>;
2304
+ readonly code: Schema.optional<Schema.String>;
2305
+ readonly message: Schema.optional<Schema.String>;
2306
+ readonly requestId: Schema.optional<Schema.String>;
2307
+ readonly status: Schema.optional<Schema.Int>;
2308
+ readonly permission: Schema.optional<Schema.String>;
2309
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
2310
+ readonly retryAt: Schema.optional<Schema.String>;
2311
+ readonly billingUrl: Schema.optional<Schema.String>;
2312
+ }>>;
2313
+ }>]>;
2314
+ /** Which wallet a VM started with the key bills (`GET /limits`). */
2315
+ readonly wallet: Schema.Union<readonly [Schema.Struct<{
2316
+ readonly observed: Schema.Literal<true>;
2317
+ } & {
2318
+ kind: Schema.Literals<readonly ["personal", "organization"]>;
2319
+ organizationId: Schema.optional<Schema.String>;
2320
+ organizationName: Schema.optional<Schema.String>;
2321
+ role: Schema.optional<Schema.String>;
2322
+ }>, Schema.Struct<{
2323
+ readonly observed: Schema.Literal<false>;
2324
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
2325
+ readonly boat: Schema.optional<Schema.Struct<{
2326
+ 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"]>;
2327
+ readonly retryable: Schema.Boolean;
2328
+ readonly operation: Schema.optional<Schema.String>;
2329
+ readonly code: Schema.optional<Schema.String>;
2330
+ readonly message: Schema.optional<Schema.String>;
2331
+ readonly requestId: Schema.optional<Schema.String>;
2332
+ readonly status: Schema.optional<Schema.Int>;
2333
+ readonly permission: Schema.optional<Schema.String>;
2334
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
2335
+ readonly retryAt: Schema.optional<Schema.String>;
2336
+ readonly billingUrl: Schema.optional<Schema.String>;
2337
+ }>>;
2338
+ }>]>;
2339
+ /** The permissions Core needs of every key, from the Boat calls it makes. */
2340
+ readonly requiredPermissions: Schema.$Array<Schema.String>;
2341
+ /** The key's permissions (`GET /api-keys`), and which of the required ones it lacks. */
2342
+ readonly permissions: Schema.Union<readonly [Schema.Struct<{
2343
+ readonly observed: Schema.Literal<true>;
2344
+ } & {
2345
+ held: Schema.$Array<Schema.String>;
2346
+ missing: Schema.$Array<Schema.String>;
2347
+ /** The key is limited to some VMs or environments: it cannot reach VMs Core creates. */
2348
+ limitedToSandboxes: Schema.Boolean;
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
+ /** When the key expires; `expiresAt` null: it never does. */
2367
+ readonly expiry: Schema.Union<readonly [Schema.Struct<{
2368
+ readonly observed: Schema.Literal<true>;
2369
+ } & {
2370
+ expiresAt: Schema.NullOr<Schema.String>;
2371
+ expired: Schema.Boolean;
2372
+ expiringSoon: Schema.Boolean;
2373
+ }>, Schema.Struct<{
2374
+ readonly observed: Schema.Literal<false>;
2375
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
2376
+ readonly boat: Schema.optional<Schema.Struct<{
2377
+ 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"]>;
2378
+ readonly retryable: Schema.Boolean;
2379
+ readonly operation: Schema.optional<Schema.String>;
2380
+ readonly code: Schema.optional<Schema.String>;
2381
+ readonly message: Schema.optional<Schema.String>;
2382
+ readonly requestId: Schema.optional<Schema.String>;
2383
+ readonly status: Schema.optional<Schema.Int>;
2384
+ readonly permission: Schema.optional<Schema.String>;
2385
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
2386
+ readonly retryAt: Schema.optional<Schema.String>;
2387
+ readonly billingUrl: Schema.optional<Schema.String>;
2388
+ }>>;
2389
+ }>]>;
2390
+ /** Whether the wallet can start a VM now, why not, and its running and allowed VMs. */
2391
+ readonly start: Schema.Union<readonly [Schema.Struct<{
2392
+ readonly observed: Schema.Literal<true>;
2393
+ } & {
2394
+ canStart: Schema.Boolean;
2395
+ blockedReason: Schema.optional<Schema.String>;
2396
+ billingStatus: Schema.optional<Schema.String>;
2397
+ runningVms: Schema.Int;
2398
+ allowedVms: Schema.Int;
2399
+ }>, Schema.Struct<{
2400
+ readonly observed: Schema.Literal<false>;
2401
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
2402
+ readonly boat: Schema.optional<Schema.Struct<{
2403
+ 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"]>;
2404
+ readonly retryable: Schema.Boolean;
2405
+ readonly operation: Schema.optional<Schema.String>;
2406
+ readonly code: Schema.optional<Schema.String>;
2407
+ readonly message: Schema.optional<Schema.String>;
2408
+ readonly requestId: Schema.optional<Schema.String>;
2409
+ readonly status: Schema.optional<Schema.Int>;
2410
+ readonly permission: Schema.optional<Schema.String>;
2411
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
2412
+ readonly retryAt: Schema.optional<Schema.String>;
2413
+ readonly billingUrl: Schema.optional<Schema.String>;
2414
+ }>>;
2415
+ }>]>;
2416
+ /** Saved snapshot slots of the wallet (`GET /saved-snapshots`). */
2417
+ readonly snapshots: Schema.Union<readonly [Schema.Struct<{
2418
+ readonly observed: Schema.Literal<true>;
2419
+ } & {
2420
+ used: Schema.Int;
2421
+ included: Schema.Int;
2422
+ }>, Schema.Struct<{
2423
+ readonly observed: Schema.Literal<false>;
2424
+ readonly reason: Schema.Literals<readonly ["refused", "no-answer", "not-listed", "unreadable"]>;
2425
+ readonly boat: Schema.optional<Schema.Struct<{
2426
+ 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"]>;
2427
+ readonly retryable: Schema.Boolean;
2428
+ readonly operation: Schema.optional<Schema.String>;
2429
+ readonly code: Schema.optional<Schema.String>;
2430
+ readonly message: Schema.optional<Schema.String>;
2431
+ readonly requestId: Schema.optional<Schema.String>;
2432
+ readonly status: Schema.optional<Schema.Int>;
2433
+ readonly permission: Schema.optional<Schema.String>;
2434
+ readonly retryAfterSeconds: Schema.optional<Schema.Int>;
2435
+ readonly retryAt: Schema.optional<Schema.String>;
2436
+ readonly billingUrl: Schema.optional<Schema.String>;
2437
+ }>>;
2438
+ }>]>;
2439
+ }>>>;
145
2440
  }>>, Schema.toCodecJson<typeof BoatAccountBadRequestError | typeof BoatAccountKeyRefusedError | typeof BoatAccountNotFoundError | typeof BoatAccountConflictError | typeof BoatAccountServiceUnavailableError | typeof BoatAccountInternalServerError>, never, never>, false>;
146
2441
  export {};