@boatdev/sdk 1.3.0 → 1.4.0

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.
Files changed (39) hide show
  1. package/dist/apis/BoatApi.d.ts +2 -2
  2. package/dist/apis/BoatApi.js +2 -2
  3. package/dist/esm/apis/BoatApi.d.ts +2 -2
  4. package/dist/esm/apis/BoatApi.js +2 -2
  5. package/dist/esm/models/CreateSandboxRequest.d.ts +1 -1
  6. package/dist/esm/models/ForkRequest.d.ts +6 -0
  7. package/dist/esm/models/ForkRequest.js +2 -0
  8. package/dist/esm/models/ResumeRequest.d.ts +6 -0
  9. package/dist/esm/models/ResumeRequest.js +2 -0
  10. package/dist/esm/models/Sandbox.d.ts +26 -0
  11. package/dist/esm/models/Sandbox.js +13 -0
  12. package/dist/esm/models/WebhookEventData.d.ts +10 -4
  13. package/dist/esm/models/WebhookEventData.js +4 -6
  14. package/dist/esm/models/WebhookEventType.d.ts +2 -0
  15. package/dist/esm/models/WebhookEventType.js +3 -1
  16. package/dist/models/CreateSandboxRequest.d.ts +1 -1
  17. package/dist/models/ForkRequest.d.ts +6 -0
  18. package/dist/models/ForkRequest.js +2 -0
  19. package/dist/models/ResumeRequest.d.ts +6 -0
  20. package/dist/models/ResumeRequest.js +2 -0
  21. package/dist/models/Sandbox.d.ts +26 -0
  22. package/dist/models/Sandbox.js +14 -1
  23. package/dist/models/WebhookEventData.d.ts +10 -4
  24. package/dist/models/WebhookEventData.js +4 -6
  25. package/dist/models/WebhookEventType.d.ts +2 -0
  26. package/dist/models/WebhookEventType.js +3 -1
  27. package/docs/BoatApi.md +4 -2
  28. package/docs/ForkRequest.md +2 -0
  29. package/docs/ResumeRequest.md +2 -0
  30. package/docs/Sandbox.md +6 -0
  31. package/docs/WebhookEventData.md +2 -0
  32. package/package.json +1 -1
  33. package/src/apis/BoatApi.ts +2 -2
  34. package/src/models/CreateSandboxRequest.ts +1 -1
  35. package/src/models/ForkRequest.ts +8 -0
  36. package/src/models/ResumeRequest.ts +8 -0
  37. package/src/models/Sandbox.ts +33 -0
  38. package/src/models/WebhookEventData.ts +14 -8
  39. package/src/models/WebhookEventType.ts +3 -1
@@ -387,12 +387,12 @@ export declare class BoatApi extends runtime.BaseAPI {
387
387
  */
388
388
  commandRequestOpts(input: CommandOperationRequest | runtime.FlatBody<CommandOperationRequest, 'commandRequest'>): Promise<runtime.RequestOpts>;
389
389
  /**
390
- * Runs the command synchronously by default (timeout configurable via `timeoutSeconds`, 600s cap). With `detached: true` the command starts in the background and a process id is returned immediately; poll `/sandboxes/{sandboxId}/commands/{processId}` for status and logs. With `stream: true` the output arrives as the command writes it, as newline-delimited JSON (`application/x-ndjson`): `{\"type\":\"started\"}`, then `{\"type\":\"stdout\"|\"stderr\",\"data\":\"...\"}` per chunk, and last `{\"type\":\"exit\",...}` (the synchronous result without stdout/stderr) or `{\"type\":\"error\",\"error\":\"...\",\"message\":\"...\"}`. Returns 400 invalid_timeout when `timeoutSeconds` is not an integer in 1-600. A command sent while the sandbox is still starting (right after a resume) waits up to 60s for it to be ready instead of failing; 409 boat_starting (retryable) is returned only if it is still not ready by then. Command execution is never retried automatically: a 502 boat_direct_failed means the command may already be running on the sandbox.
390
+ * Runs the command synchronously by default (timeout configurable via `timeoutSeconds`, 600s cap). With `detached: true` the command starts in the background and a process id is returned immediately; poll `/sandboxes/{sandboxId}/commands/{processId}` for status and logs. With `stream: true` the output arrives as the command writes it, as newline-delimited JSON (`application/x-ndjson`): `{\"type\":\"started\"}`, then `{\"type\":\"stdout\"|\"stderr\",\"data\":\"...\"}` per chunk, and last `{\"type\":\"exit\",...}` (the synchronous result without stdout/stderr) or `{\"type\":\"error\",\"error\":\"...\",\"message\":\"...\"}`. Returns 400 invalid_timeout when `timeoutSeconds` is not an integer in 1-600. A command sent while the sandbox is still starting (right after a resume) waits up to 60s for it to be ready instead of failing; 409 boat_starting (retryable) is returned only if it is still not ready by then. A sandbox that is not starting (`error`, `stopped`) returns 409 sandbox_not_ready with `retryable: false` and its `state` at once: resume or recover it first. Command execution is never retried automatically: a 502 boat_direct_failed means the command may already be running on the sandbox.
391
391
  * Execute a command in a sandbox
392
392
  */
393
393
  commandRaw(requestParameters: CommandOperationRequest | runtime.FlatBody<CommandOperationRequest, 'commandRequest'>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Command200Response>>;
394
394
  /**
395
- * Runs the command synchronously by default (timeout configurable via `timeoutSeconds`, 600s cap). With `detached: true` the command starts in the background and a process id is returned immediately; poll `/sandboxes/{sandboxId}/commands/{processId}` for status and logs. With `stream: true` the output arrives as the command writes it, as newline-delimited JSON (`application/x-ndjson`): `{\"type\":\"started\"}`, then `{\"type\":\"stdout\"|\"stderr\",\"data\":\"...\"}` per chunk, and last `{\"type\":\"exit\",...}` (the synchronous result without stdout/stderr) or `{\"type\":\"error\",\"error\":\"...\",\"message\":\"...\"}`. Returns 400 invalid_timeout when `timeoutSeconds` is not an integer in 1-600. A command sent while the sandbox is still starting (right after a resume) waits up to 60s for it to be ready instead of failing; 409 boat_starting (retryable) is returned only if it is still not ready by then. Command execution is never retried automatically: a 502 boat_direct_failed means the command may already be running on the sandbox.
395
+ * Runs the command synchronously by default (timeout configurable via `timeoutSeconds`, 600s cap). With `detached: true` the command starts in the background and a process id is returned immediately; poll `/sandboxes/{sandboxId}/commands/{processId}` for status and logs. With `stream: true` the output arrives as the command writes it, as newline-delimited JSON (`application/x-ndjson`): `{\"type\":\"started\"}`, then `{\"type\":\"stdout\"|\"stderr\",\"data\":\"...\"}` per chunk, and last `{\"type\":\"exit\",...}` (the synchronous result without stdout/stderr) or `{\"type\":\"error\",\"error\":\"...\",\"message\":\"...\"}`. Returns 400 invalid_timeout when `timeoutSeconds` is not an integer in 1-600. A command sent while the sandbox is still starting (right after a resume) waits up to 60s for it to be ready instead of failing; 409 boat_starting (retryable) is returned only if it is still not ready by then. A sandbox that is not starting (`error`, `stopped`) returns 409 sandbox_not_ready with `retryable: false` and its `state` at once: resume or recover it first. Command execution is never retried automatically: a 502 boat_direct_failed means the command may already be running on the sandbox.
396
396
  * Execute a command in a sandbox
397
397
  */
398
398
  command(requestParameters: CommandOperationRequest | runtime.FlatBody<CommandOperationRequest, 'commandRequest'>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Command200Response>;
@@ -331,7 +331,7 @@ class BoatApi extends runtime.BaseAPI {
331
331
  };
332
332
  }
333
333
  /**
334
- * Runs the command synchronously by default (timeout configurable via `timeoutSeconds`, 600s cap). With `detached: true` the command starts in the background and a process id is returned immediately; poll `/sandboxes/{sandboxId}/commands/{processId}` for status and logs. With `stream: true` the output arrives as the command writes it, as newline-delimited JSON (`application/x-ndjson`): `{\"type\":\"started\"}`, then `{\"type\":\"stdout\"|\"stderr\",\"data\":\"...\"}` per chunk, and last `{\"type\":\"exit\",...}` (the synchronous result without stdout/stderr) or `{\"type\":\"error\",\"error\":\"...\",\"message\":\"...\"}`. Returns 400 invalid_timeout when `timeoutSeconds` is not an integer in 1-600. A command sent while the sandbox is still starting (right after a resume) waits up to 60s for it to be ready instead of failing; 409 boat_starting (retryable) is returned only if it is still not ready by then. Command execution is never retried automatically: a 502 boat_direct_failed means the command may already be running on the sandbox.
334
+ * Runs the command synchronously by default (timeout configurable via `timeoutSeconds`, 600s cap). With `detached: true` the command starts in the background and a process id is returned immediately; poll `/sandboxes/{sandboxId}/commands/{processId}` for status and logs. With `stream: true` the output arrives as the command writes it, as newline-delimited JSON (`application/x-ndjson`): `{\"type\":\"started\"}`, then `{\"type\":\"stdout\"|\"stderr\",\"data\":\"...\"}` per chunk, and last `{\"type\":\"exit\",...}` (the synchronous result without stdout/stderr) or `{\"type\":\"error\",\"error\":\"...\",\"message\":\"...\"}`. Returns 400 invalid_timeout when `timeoutSeconds` is not an integer in 1-600. A command sent while the sandbox is still starting (right after a resume) waits up to 60s for it to be ready instead of failing; 409 boat_starting (retryable) is returned only if it is still not ready by then. A sandbox that is not starting (`error`, `stopped`) returns 409 sandbox_not_ready with `retryable: false` and its `state` at once: resume or recover it first. Command execution is never retried automatically: a 502 boat_direct_failed means the command may already be running on the sandbox.
335
335
  * Execute a command in a sandbox
336
336
  */
337
337
  async commandRaw(requestParameters, initOverrides) {
@@ -340,7 +340,7 @@ class BoatApi extends runtime.BaseAPI {
340
340
  return new runtime.JSONApiResponse(response, (jsonValue) => (0, Command200Response_1.Command200ResponseFromJSON)(jsonValue));
341
341
  }
342
342
  /**
343
- * Runs the command synchronously by default (timeout configurable via `timeoutSeconds`, 600s cap). With `detached: true` the command starts in the background and a process id is returned immediately; poll `/sandboxes/{sandboxId}/commands/{processId}` for status and logs. With `stream: true` the output arrives as the command writes it, as newline-delimited JSON (`application/x-ndjson`): `{\"type\":\"started\"}`, then `{\"type\":\"stdout\"|\"stderr\",\"data\":\"...\"}` per chunk, and last `{\"type\":\"exit\",...}` (the synchronous result without stdout/stderr) or `{\"type\":\"error\",\"error\":\"...\",\"message\":\"...\"}`. Returns 400 invalid_timeout when `timeoutSeconds` is not an integer in 1-600. A command sent while the sandbox is still starting (right after a resume) waits up to 60s for it to be ready instead of failing; 409 boat_starting (retryable) is returned only if it is still not ready by then. Command execution is never retried automatically: a 502 boat_direct_failed means the command may already be running on the sandbox.
343
+ * Runs the command synchronously by default (timeout configurable via `timeoutSeconds`, 600s cap). With `detached: true` the command starts in the background and a process id is returned immediately; poll `/sandboxes/{sandboxId}/commands/{processId}` for status and logs. With `stream: true` the output arrives as the command writes it, as newline-delimited JSON (`application/x-ndjson`): `{\"type\":\"started\"}`, then `{\"type\":\"stdout\"|\"stderr\",\"data\":\"...\"}` per chunk, and last `{\"type\":\"exit\",...}` (the synchronous result without stdout/stderr) or `{\"type\":\"error\",\"error\":\"...\",\"message\":\"...\"}`. Returns 400 invalid_timeout when `timeoutSeconds` is not an integer in 1-600. A command sent while the sandbox is still starting (right after a resume) waits up to 60s for it to be ready instead of failing; 409 boat_starting (retryable) is returned only if it is still not ready by then. A sandbox that is not starting (`error`, `stopped`) returns 409 sandbox_not_ready with `retryable: false` and its `state` at once: resume or recover it first. Command execution is never retried automatically: a 502 boat_direct_failed means the command may already be running on the sandbox.
344
344
  * Execute a command in a sandbox
345
345
  */
346
346
  async command(requestParameters, initOverrides) {
@@ -387,12 +387,12 @@ export declare class BoatApi extends runtime.BaseAPI {
387
387
  */
388
388
  commandRequestOpts(input: CommandOperationRequest | runtime.FlatBody<CommandOperationRequest, 'commandRequest'>): Promise<runtime.RequestOpts>;
389
389
  /**
390
- * Runs the command synchronously by default (timeout configurable via `timeoutSeconds`, 600s cap). With `detached: true` the command starts in the background and a process id is returned immediately; poll `/sandboxes/{sandboxId}/commands/{processId}` for status and logs. With `stream: true` the output arrives as the command writes it, as newline-delimited JSON (`application/x-ndjson`): `{\"type\":\"started\"}`, then `{\"type\":\"stdout\"|\"stderr\",\"data\":\"...\"}` per chunk, and last `{\"type\":\"exit\",...}` (the synchronous result without stdout/stderr) or `{\"type\":\"error\",\"error\":\"...\",\"message\":\"...\"}`. Returns 400 invalid_timeout when `timeoutSeconds` is not an integer in 1-600. A command sent while the sandbox is still starting (right after a resume) waits up to 60s for it to be ready instead of failing; 409 boat_starting (retryable) is returned only if it is still not ready by then. Command execution is never retried automatically: a 502 boat_direct_failed means the command may already be running on the sandbox.
390
+ * Runs the command synchronously by default (timeout configurable via `timeoutSeconds`, 600s cap). With `detached: true` the command starts in the background and a process id is returned immediately; poll `/sandboxes/{sandboxId}/commands/{processId}` for status and logs. With `stream: true` the output arrives as the command writes it, as newline-delimited JSON (`application/x-ndjson`): `{\"type\":\"started\"}`, then `{\"type\":\"stdout\"|\"stderr\",\"data\":\"...\"}` per chunk, and last `{\"type\":\"exit\",...}` (the synchronous result without stdout/stderr) or `{\"type\":\"error\",\"error\":\"...\",\"message\":\"...\"}`. Returns 400 invalid_timeout when `timeoutSeconds` is not an integer in 1-600. A command sent while the sandbox is still starting (right after a resume) waits up to 60s for it to be ready instead of failing; 409 boat_starting (retryable) is returned only if it is still not ready by then. A sandbox that is not starting (`error`, `stopped`) returns 409 sandbox_not_ready with `retryable: false` and its `state` at once: resume or recover it first. Command execution is never retried automatically: a 502 boat_direct_failed means the command may already be running on the sandbox.
391
391
  * Execute a command in a sandbox
392
392
  */
393
393
  commandRaw(requestParameters: CommandOperationRequest | runtime.FlatBody<CommandOperationRequest, 'commandRequest'>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Command200Response>>;
394
394
  /**
395
- * Runs the command synchronously by default (timeout configurable via `timeoutSeconds`, 600s cap). With `detached: true` the command starts in the background and a process id is returned immediately; poll `/sandboxes/{sandboxId}/commands/{processId}` for status and logs. With `stream: true` the output arrives as the command writes it, as newline-delimited JSON (`application/x-ndjson`): `{\"type\":\"started\"}`, then `{\"type\":\"stdout\"|\"stderr\",\"data\":\"...\"}` per chunk, and last `{\"type\":\"exit\",...}` (the synchronous result without stdout/stderr) or `{\"type\":\"error\",\"error\":\"...\",\"message\":\"...\"}`. Returns 400 invalid_timeout when `timeoutSeconds` is not an integer in 1-600. A command sent while the sandbox is still starting (right after a resume) waits up to 60s for it to be ready instead of failing; 409 boat_starting (retryable) is returned only if it is still not ready by then. Command execution is never retried automatically: a 502 boat_direct_failed means the command may already be running on the sandbox.
395
+ * Runs the command synchronously by default (timeout configurable via `timeoutSeconds`, 600s cap). With `detached: true` the command starts in the background and a process id is returned immediately; poll `/sandboxes/{sandboxId}/commands/{processId}` for status and logs. With `stream: true` the output arrives as the command writes it, as newline-delimited JSON (`application/x-ndjson`): `{\"type\":\"started\"}`, then `{\"type\":\"stdout\"|\"stderr\",\"data\":\"...\"}` per chunk, and last `{\"type\":\"exit\",...}` (the synchronous result without stdout/stderr) or `{\"type\":\"error\",\"error\":\"...\",\"message\":\"...\"}`. Returns 400 invalid_timeout when `timeoutSeconds` is not an integer in 1-600. A command sent while the sandbox is still starting (right after a resume) waits up to 60s for it to be ready instead of failing; 409 boat_starting (retryable) is returned only if it is still not ready by then. A sandbox that is not starting (`error`, `stopped`) returns 409 sandbox_not_ready with `retryable: false` and its `state` at once: resume or recover it first. Command execution is never retried automatically: a 502 boat_direct_failed means the command may already be running on the sandbox.
396
396
  * Execute a command in a sandbox
397
397
  */
398
398
  command(requestParameters: CommandOperationRequest | runtime.FlatBody<CommandOperationRequest, 'commandRequest'>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Command200Response>;
@@ -295,7 +295,7 @@ export class BoatApi extends runtime.BaseAPI {
295
295
  };
296
296
  }
297
297
  /**
298
- * Runs the command synchronously by default (timeout configurable via `timeoutSeconds`, 600s cap). With `detached: true` the command starts in the background and a process id is returned immediately; poll `/sandboxes/{sandboxId}/commands/{processId}` for status and logs. With `stream: true` the output arrives as the command writes it, as newline-delimited JSON (`application/x-ndjson`): `{\"type\":\"started\"}`, then `{\"type\":\"stdout\"|\"stderr\",\"data\":\"...\"}` per chunk, and last `{\"type\":\"exit\",...}` (the synchronous result without stdout/stderr) or `{\"type\":\"error\",\"error\":\"...\",\"message\":\"...\"}`. Returns 400 invalid_timeout when `timeoutSeconds` is not an integer in 1-600. A command sent while the sandbox is still starting (right after a resume) waits up to 60s for it to be ready instead of failing; 409 boat_starting (retryable) is returned only if it is still not ready by then. Command execution is never retried automatically: a 502 boat_direct_failed means the command may already be running on the sandbox.
298
+ * Runs the command synchronously by default (timeout configurable via `timeoutSeconds`, 600s cap). With `detached: true` the command starts in the background and a process id is returned immediately; poll `/sandboxes/{sandboxId}/commands/{processId}` for status and logs. With `stream: true` the output arrives as the command writes it, as newline-delimited JSON (`application/x-ndjson`): `{\"type\":\"started\"}`, then `{\"type\":\"stdout\"|\"stderr\",\"data\":\"...\"}` per chunk, and last `{\"type\":\"exit\",...}` (the synchronous result without stdout/stderr) or `{\"type\":\"error\",\"error\":\"...\",\"message\":\"...\"}`. Returns 400 invalid_timeout when `timeoutSeconds` is not an integer in 1-600. A command sent while the sandbox is still starting (right after a resume) waits up to 60s for it to be ready instead of failing; 409 boat_starting (retryable) is returned only if it is still not ready by then. A sandbox that is not starting (`error`, `stopped`) returns 409 sandbox_not_ready with `retryable: false` and its `state` at once: resume or recover it first. Command execution is never retried automatically: a 502 boat_direct_failed means the command may already be running on the sandbox.
299
299
  * Execute a command in a sandbox
300
300
  */
301
301
  async commandRaw(requestParameters, initOverrides) {
@@ -304,7 +304,7 @@ export class BoatApi extends runtime.BaseAPI {
304
304
  return new runtime.JSONApiResponse(response, (jsonValue) => Command200ResponseFromJSON(jsonValue));
305
305
  }
306
306
  /**
307
- * Runs the command synchronously by default (timeout configurable via `timeoutSeconds`, 600s cap). With `detached: true` the command starts in the background and a process id is returned immediately; poll `/sandboxes/{sandboxId}/commands/{processId}` for status and logs. With `stream: true` the output arrives as the command writes it, as newline-delimited JSON (`application/x-ndjson`): `{\"type\":\"started\"}`, then `{\"type\":\"stdout\"|\"stderr\",\"data\":\"...\"}` per chunk, and last `{\"type\":\"exit\",...}` (the synchronous result without stdout/stderr) or `{\"type\":\"error\",\"error\":\"...\",\"message\":\"...\"}`. Returns 400 invalid_timeout when `timeoutSeconds` is not an integer in 1-600. A command sent while the sandbox is still starting (right after a resume) waits up to 60s for it to be ready instead of failing; 409 boat_starting (retryable) is returned only if it is still not ready by then. Command execution is never retried automatically: a 502 boat_direct_failed means the command may already be running on the sandbox.
307
+ * Runs the command synchronously by default (timeout configurable via `timeoutSeconds`, 600s cap). With `detached: true` the command starts in the background and a process id is returned immediately; poll `/sandboxes/{sandboxId}/commands/{processId}` for status and logs. With `stream: true` the output arrives as the command writes it, as newline-delimited JSON (`application/x-ndjson`): `{\"type\":\"started\"}`, then `{\"type\":\"stdout\"|\"stderr\",\"data\":\"...\"}` per chunk, and last `{\"type\":\"exit\",...}` (the synchronous result without stdout/stderr) or `{\"type\":\"error\",\"error\":\"...\",\"message\":\"...\"}`. Returns 400 invalid_timeout when `timeoutSeconds` is not an integer in 1-600. A command sent while the sandbox is still starting (right after a resume) waits up to 60s for it to be ready instead of failing; 409 boat_starting (retryable) is returned only if it is still not ready by then. A sandbox that is not starting (`error`, `stopped`) returns 409 sandbox_not_ready with `retryable: false` and its `state` at once: resume or recover it first. Command execution is never retried automatically: a 502 boat_direct_failed means the command may already be running on the sandbox.
308
308
  * Execute a command in a sandbox
309
309
  */
310
310
  async command(requestParameters, initOverrides) {
@@ -54,7 +54,7 @@ export interface CreateSandboxRequest {
54
54
  */
55
55
  snapshots?: boolean;
56
56
  /**
57
- * Pass `true` to get a sandbox only if a machine of this type is ready right now. The call answers within about 1.5 s: either the usual `202` with the sandbox, or `503` `no_ready_machine` with nothing created, billed, or counted against your start limits, so you can retry or fall back at once. Without it, a create waits for a machine to be built when none is ready. Not combinable with `from`.
57
+ * Pass `true` to get a sandbox only if a machine of this type is ready right now. The call answers within about 1.5 s: either the usual `202` with the sandbox, or `503` `no_ready_machine` with nothing created, billed, or counted against your start limits, so you can retry or fall back at once. Without it, a create waits for a machine to be built when none is ready. Works with `from`; fork and resume take it too.
58
58
  * @type {boolean}
59
59
  * @memberof CreateSandboxRequest
60
60
  */
@@ -15,6 +15,12 @@
15
15
  * @interface ForkRequest
16
16
  */
17
17
  export interface ForkRequest {
18
+ /**
19
+ * Pass `true` to fork only if a machine is ready right now. Within about 1.5 s you get the usual `202`, or `503` `no_ready_machine` with no fork created and nothing counted against your start limits.
20
+ * @type {boolean}
21
+ * @memberof ForkRequest
22
+ */
23
+ failFast?: boolean;
18
24
  /**
19
25
  * Replaces the env the fork would otherwise inherit from the source sandbox. Same validation rules as `CreateSandboxRequest.env`.
20
26
  * @type {{ [key: string]: string; }}
@@ -33,6 +33,7 @@ export function ForkRequestFromJSONTyped(json, ignoreDiscriminator) {
33
33
  return json;
34
34
  }
35
35
  return {
36
+ 'failFast': json['failFast'] == null ? undefined : json['failFast'],
36
37
  'env': json['env'] == null ? undefined : json['env'],
37
38
  'environment': json['environment'] == null ? undefined : json['environment'],
38
39
  'noEnv': json['noEnv'] == null ? undefined : json['noEnv'],
@@ -48,6 +49,7 @@ export function ForkRequestToJSONTyped(value, ignoreDiscriminator = false) {
48
49
  return value;
49
50
  }
50
51
  return {
52
+ 'failFast': value['failFast'],
51
53
  'env': value['env'],
52
54
  'environment': value['environment'],
53
55
  'noEnv': value['noEnv'],
@@ -15,6 +15,12 @@
15
15
  * @interface ResumeRequest
16
16
  */
17
17
  export interface ResumeRequest {
18
+ /**
19
+ * Pass `true` to resume only if a machine is ready right now. Within about 1.5 s you get the usual `202`, or `503` `no_ready_machine` with the sandbox left stopped and nothing counted against your start limits.
20
+ * @type {boolean}
21
+ * @memberof ResumeRequest
22
+ */
23
+ failFast?: boolean;
18
24
  /**
19
25
  * Resume onto a different machine size. Omit to keep the sandbox's current type. A resume already restores onto a fresh machine, so changing size costs nothing extra. Shrinking is rejected with `type_too_small` when the sandbox's data would not fit the smaller disk.
20
26
  * @type {ResumeRequestTypeEnum}
@@ -33,6 +33,7 @@ export function ResumeRequestFromJSONTyped(json, ignoreDiscriminator) {
33
33
  return json;
34
34
  }
35
35
  return {
36
+ 'failFast': json['failFast'] == null ? undefined : json['failFast'],
36
37
  'type': json['type'] == null ? undefined : json['type'],
37
38
  'env': json['env'] == null ? undefined : json['env'],
38
39
  'environment': json['environment'] == null ? undefined : json['environment'],
@@ -48,6 +49,7 @@ export function ResumeRequestToJSONTyped(value, ignoreDiscriminator = false) {
48
49
  return value;
49
50
  }
50
51
  return {
52
+ 'failFast': value['failFast'],
51
53
  'type': value['type'],
52
54
  'env': value['env'],
53
55
  'environment': value['environment'],
@@ -40,6 +40,24 @@ export interface Sandbox {
40
40
  * @memberof Sandbox
41
41
  */
42
42
  error?: string | null;
43
+ /**
44
+ * `degraded` when the machine is alive but Boat cannot fully reach it (for example a firewall rule inside the sandbox blocks the tunnel). The sandbox keeps running.
45
+ * @type {SandboxHealthEnum}
46
+ * @memberof Sandbox
47
+ */
48
+ health?: SandboxHealthEnum;
49
+ /**
50
+ * Why the sandbox is degraded, or null.
51
+ * @type {string}
52
+ * @memberof Sandbox
53
+ */
54
+ healthReason?: string | null;
55
+ /**
56
+ * When the sandbox became degraded, or null.
57
+ * @type {Date}
58
+ * @memberof Sandbox
59
+ */
60
+ degradedSince?: Date | null;
43
61
  /**
44
62
  * Current machine size: what the sandbox was created with, or the size it was last resumed or forked onto.
45
63
  * @type {SandboxTypeEnum}
@@ -208,6 +226,14 @@ export declare const SandboxStateEnum: {
208
226
  readonly Cancelled: 'cancelled';
209
227
  };
210
228
  export type SandboxStateEnum = typeof SandboxStateEnum[keyof typeof SandboxStateEnum];
229
+ /**
230
+ * @export
231
+ */
232
+ export declare const SandboxHealthEnum: {
233
+ readonly Ok: 'ok';
234
+ readonly Degraded: 'degraded';
235
+ };
236
+ export type SandboxHealthEnum = typeof SandboxHealthEnum[keyof typeof SandboxHealthEnum];
211
237
  /**
212
238
  * @export
213
239
  */
@@ -28,6 +28,13 @@ export const SandboxStateEnum = {
28
28
  Error: 'error',
29
29
  Cancelled: 'cancelled'
30
30
  };
31
+ /**
32
+ * @export
33
+ */
34
+ export const SandboxHealthEnum = {
35
+ Ok: 'ok',
36
+ Degraded: 'degraded'
37
+ };
31
38
  /**
32
39
  * @export
33
40
  */
@@ -90,6 +97,9 @@ export function SandboxFromJSONTyped(json, ignoreDiscriminator) {
90
97
  'name': json['name'],
91
98
  'state': json['state'],
92
99
  'error': json['error'] == null ? undefined : json['error'],
100
+ 'health': json['health'] == null ? undefined : json['health'],
101
+ 'healthReason': json['healthReason'] == null ? undefined : json['healthReason'],
102
+ 'degradedSince': json['degradedSince'] == null ? undefined : (new Date(json['degradedSince'])),
93
103
  'type': json['type'] == null ? undefined : json['type'],
94
104
  'vcpu': json['vcpu'] == null ? undefined : json['vcpu'],
95
105
  'memoryGB': json['memoryGB'] == null ? undefined : json['memoryGB'],
@@ -129,6 +139,9 @@ export function SandboxToJSONTyped(value, ignoreDiscriminator = false) {
129
139
  'name': value['name'],
130
140
  'state': value['state'],
131
141
  'error': value['error'],
142
+ 'health': value['health'],
143
+ 'healthReason': value['healthReason'],
144
+ 'degradedSince': value['degradedSince'] == null ? value['degradedSince'] : value['degradedSince'].toISOString(),
132
145
  'type': value['type'],
133
146
  'vcpu': value['vcpu'],
134
147
  'memoryGB': value['memoryGB'],
@@ -23,17 +23,23 @@ export interface WebhookEventData {
23
23
  */
24
24
  sandbox: WebhookEventDataSandbox;
25
25
  /**
26
- *
26
+ * On sandbox.ready, sandbox.error and sandbox.archived only.
27
27
  * @type {string}
28
28
  * @memberof WebhookEventData
29
29
  */
30
- previousState: string;
30
+ previousState?: string;
31
31
  /**
32
- *
32
+ * Absent on sandbox.hydrated.
33
+ * @type {string}
34
+ * @memberof WebhookEventData
35
+ */
36
+ state?: string;
37
+ /**
38
+ * On sandbox.degraded and sandbox.recovered. Why the sandbox is degraded (null on recovered).
33
39
  * @type {string}
34
40
  * @memberof WebhookEventData
35
41
  */
36
- state: string;
42
+ reason?: string | null;
37
43
  }
38
44
  /**
39
45
  * Check if a given object implements the WebhookEventData interface.
@@ -18,10 +18,6 @@ import { WebhookEventDataSandboxFromJSON, WebhookEventDataSandboxToJSON, } from
18
18
  export function instanceOfWebhookEventData(value) {
19
19
  if (!('sandbox' in value) || value['sandbox'] === undefined)
20
20
  return false;
21
- if (!('previousState' in value) || value['previousState'] === undefined)
22
- return false;
23
- if (!('state' in value) || value['state'] === undefined)
24
- return false;
25
21
  return true;
26
22
  }
27
23
  export function WebhookEventDataFromJSON(json) {
@@ -33,8 +29,9 @@ export function WebhookEventDataFromJSONTyped(json, ignoreDiscriminator) {
33
29
  }
34
30
  return {
35
31
  'sandbox': WebhookEventDataSandboxFromJSON(json['sandbox']),
36
- 'previousState': json['previousState'],
37
- 'state': json['state'],
32
+ 'previousState': json['previousState'] == null ? undefined : json['previousState'],
33
+ 'state': json['state'] == null ? undefined : json['state'],
34
+ 'reason': json['reason'] == null ? undefined : json['reason'],
38
35
  };
39
36
  }
40
37
  export function WebhookEventDataToJSON(json) {
@@ -48,5 +45,6 @@ export function WebhookEventDataToJSONTyped(value, ignoreDiscriminator = false)
48
45
  'sandbox': WebhookEventDataSandboxToJSON(value['sandbox']),
49
46
  'previousState': value['previousState'],
50
47
  'state': value['state'],
48
+ 'reason': value['reason'],
51
49
  };
52
50
  }
@@ -18,6 +18,8 @@ export declare const WebhookEventType: {
18
18
  readonly SandboxError: 'sandbox.error';
19
19
  readonly SandboxArchived: 'sandbox.archived';
20
20
  readonly SandboxHydrated: 'sandbox.hydrated';
21
+ readonly SandboxDegraded: 'sandbox.degraded';
22
+ readonly SandboxRecovered: 'sandbox.recovered';
21
23
  };
22
24
  export type WebhookEventType = typeof WebhookEventType[keyof typeof WebhookEventType];
23
25
  export declare function instanceOfWebhookEventType(value: any): boolean;
@@ -19,7 +19,9 @@ export const WebhookEventType = {
19
19
  SandboxReady: 'sandbox.ready',
20
20
  SandboxError: 'sandbox.error',
21
21
  SandboxArchived: 'sandbox.archived',
22
- SandboxHydrated: 'sandbox.hydrated'
22
+ SandboxHydrated: 'sandbox.hydrated',
23
+ SandboxDegraded: 'sandbox.degraded',
24
+ SandboxRecovered: 'sandbox.recovered'
23
25
  };
24
26
  export function instanceOfWebhookEventType(value) {
25
27
  for (const key in WebhookEventType) {
@@ -54,7 +54,7 @@ export interface CreateSandboxRequest {
54
54
  */
55
55
  snapshots?: boolean;
56
56
  /**
57
- * Pass `true` to get a sandbox only if a machine of this type is ready right now. The call answers within about 1.5 s: either the usual `202` with the sandbox, or `503` `no_ready_machine` with nothing created, billed, or counted against your start limits, so you can retry or fall back at once. Without it, a create waits for a machine to be built when none is ready. Not combinable with `from`.
57
+ * Pass `true` to get a sandbox only if a machine of this type is ready right now. The call answers within about 1.5 s: either the usual `202` with the sandbox, or `503` `no_ready_machine` with nothing created, billed, or counted against your start limits, so you can retry or fall back at once. Without it, a create waits for a machine to be built when none is ready. Works with `from`; fork and resume take it too.
58
58
  * @type {boolean}
59
59
  * @memberof CreateSandboxRequest
60
60
  */
@@ -15,6 +15,12 @@
15
15
  * @interface ForkRequest
16
16
  */
17
17
  export interface ForkRequest {
18
+ /**
19
+ * Pass `true` to fork only if a machine is ready right now. Within about 1.5 s you get the usual `202`, or `503` `no_ready_machine` with no fork created and nothing counted against your start limits.
20
+ * @type {boolean}
21
+ * @memberof ForkRequest
22
+ */
23
+ failFast?: boolean;
18
24
  /**
19
25
  * Replaces the env the fork would otherwise inherit from the source sandbox. Same validation rules as `CreateSandboxRequest.env`.
20
26
  * @type {{ [key: string]: string; }}
@@ -41,6 +41,7 @@ function ForkRequestFromJSONTyped(json, ignoreDiscriminator) {
41
41
  return json;
42
42
  }
43
43
  return {
44
+ 'failFast': json['failFast'] == null ? undefined : json['failFast'],
44
45
  'env': json['env'] == null ? undefined : json['env'],
45
46
  'environment': json['environment'] == null ? undefined : json['environment'],
46
47
  'noEnv': json['noEnv'] == null ? undefined : json['noEnv'],
@@ -56,6 +57,7 @@ function ForkRequestToJSONTyped(value, ignoreDiscriminator = false) {
56
57
  return value;
57
58
  }
58
59
  return {
60
+ 'failFast': value['failFast'],
59
61
  'env': value['env'],
60
62
  'environment': value['environment'],
61
63
  'noEnv': value['noEnv'],
@@ -15,6 +15,12 @@
15
15
  * @interface ResumeRequest
16
16
  */
17
17
  export interface ResumeRequest {
18
+ /**
19
+ * Pass `true` to resume only if a machine is ready right now. Within about 1.5 s you get the usual `202`, or `503` `no_ready_machine` with the sandbox left stopped and nothing counted against your start limits.
20
+ * @type {boolean}
21
+ * @memberof ResumeRequest
22
+ */
23
+ failFast?: boolean;
18
24
  /**
19
25
  * Resume onto a different machine size. Omit to keep the sandbox's current type. A resume already restores onto a fresh machine, so changing size costs nothing extra. Shrinking is rejected with `type_too_small` when the sandbox's data would not fit the smaller disk.
20
26
  * @type {ResumeRequestTypeEnum}
@@ -41,6 +41,7 @@ function ResumeRequestFromJSONTyped(json, ignoreDiscriminator) {
41
41
  return json;
42
42
  }
43
43
  return {
44
+ 'failFast': json['failFast'] == null ? undefined : json['failFast'],
44
45
  'type': json['type'] == null ? undefined : json['type'],
45
46
  'env': json['env'] == null ? undefined : json['env'],
46
47
  'environment': json['environment'] == null ? undefined : json['environment'],
@@ -56,6 +57,7 @@ function ResumeRequestToJSONTyped(value, ignoreDiscriminator = false) {
56
57
  return value;
57
58
  }
58
59
  return {
60
+ 'failFast': value['failFast'],
59
61
  'type': value['type'],
60
62
  'env': value['env'],
61
63
  'environment': value['environment'],
@@ -40,6 +40,24 @@ export interface Sandbox {
40
40
  * @memberof Sandbox
41
41
  */
42
42
  error?: string | null;
43
+ /**
44
+ * `degraded` when the machine is alive but Boat cannot fully reach it (for example a firewall rule inside the sandbox blocks the tunnel). The sandbox keeps running.
45
+ * @type {SandboxHealthEnum}
46
+ * @memberof Sandbox
47
+ */
48
+ health?: SandboxHealthEnum;
49
+ /**
50
+ * Why the sandbox is degraded, or null.
51
+ * @type {string}
52
+ * @memberof Sandbox
53
+ */
54
+ healthReason?: string | null;
55
+ /**
56
+ * When the sandbox became degraded, or null.
57
+ * @type {Date}
58
+ * @memberof Sandbox
59
+ */
60
+ degradedSince?: Date | null;
43
61
  /**
44
62
  * Current machine size: what the sandbox was created with, or the size it was last resumed or forked onto.
45
63
  * @type {SandboxTypeEnum}
@@ -208,6 +226,14 @@ export declare const SandboxStateEnum: {
208
226
  readonly Cancelled: 'cancelled';
209
227
  };
210
228
  export type SandboxStateEnum = typeof SandboxStateEnum[keyof typeof SandboxStateEnum];
229
+ /**
230
+ * @export
231
+ */
232
+ export declare const SandboxHealthEnum: {
233
+ readonly Ok: 'ok';
234
+ readonly Degraded: 'degraded';
235
+ };
236
+ export type SandboxHealthEnum = typeof SandboxHealthEnum[keyof typeof SandboxHealthEnum];
211
237
  /**
212
238
  * @export
213
239
  */
@@ -13,7 +13,7 @@
13
13
  * Do not edit the class manually.
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.SandboxSetupStatusEnum = exports.SandboxLastSnapshotStatusEnum = exports.SandboxMachineProviderEnum = exports.SandboxTypeEnum = exports.SandboxStateEnum = void 0;
16
+ exports.SandboxSetupStatusEnum = exports.SandboxLastSnapshotStatusEnum = exports.SandboxMachineProviderEnum = exports.SandboxTypeEnum = exports.SandboxHealthEnum = exports.SandboxStateEnum = void 0;
17
17
  exports.instanceOfSandbox = instanceOfSandbox;
18
18
  exports.SandboxFromJSON = SandboxFromJSON;
19
19
  exports.SandboxFromJSONTyped = SandboxFromJSONTyped;
@@ -36,6 +36,13 @@ exports.SandboxStateEnum = {
36
36
  Error: 'error',
37
37
  Cancelled: 'cancelled'
38
38
  };
39
+ /**
40
+ * @export
41
+ */
42
+ exports.SandboxHealthEnum = {
43
+ Ok: 'ok',
44
+ Degraded: 'degraded'
45
+ };
39
46
  /**
40
47
  * @export
41
48
  */
@@ -98,6 +105,9 @@ function SandboxFromJSONTyped(json, ignoreDiscriminator) {
98
105
  'name': json['name'],
99
106
  'state': json['state'],
100
107
  'error': json['error'] == null ? undefined : json['error'],
108
+ 'health': json['health'] == null ? undefined : json['health'],
109
+ 'healthReason': json['healthReason'] == null ? undefined : json['healthReason'],
110
+ 'degradedSince': json['degradedSince'] == null ? undefined : (new Date(json['degradedSince'])),
101
111
  'type': json['type'] == null ? undefined : json['type'],
102
112
  'vcpu': json['vcpu'] == null ? undefined : json['vcpu'],
103
113
  'memoryGB': json['memoryGB'] == null ? undefined : json['memoryGB'],
@@ -137,6 +147,9 @@ function SandboxToJSONTyped(value, ignoreDiscriminator = false) {
137
147
  'name': value['name'],
138
148
  'state': value['state'],
139
149
  'error': value['error'],
150
+ 'health': value['health'],
151
+ 'healthReason': value['healthReason'],
152
+ 'degradedSince': value['degradedSince'] == null ? value['degradedSince'] : value['degradedSince'].toISOString(),
140
153
  'type': value['type'],
141
154
  'vcpu': value['vcpu'],
142
155
  'memoryGB': value['memoryGB'],
@@ -23,17 +23,23 @@ export interface WebhookEventData {
23
23
  */
24
24
  sandbox: WebhookEventDataSandbox;
25
25
  /**
26
- *
26
+ * On sandbox.ready, sandbox.error and sandbox.archived only.
27
27
  * @type {string}
28
28
  * @memberof WebhookEventData
29
29
  */
30
- previousState: string;
30
+ previousState?: string;
31
31
  /**
32
- *
32
+ * Absent on sandbox.hydrated.
33
+ * @type {string}
34
+ * @memberof WebhookEventData
35
+ */
36
+ state?: string;
37
+ /**
38
+ * On sandbox.degraded and sandbox.recovered. Why the sandbox is degraded (null on recovered).
33
39
  * @type {string}
34
40
  * @memberof WebhookEventData
35
41
  */
36
- state: string;
42
+ reason?: string | null;
37
43
  }
38
44
  /**
39
45
  * Check if a given object implements the WebhookEventData interface.
@@ -25,10 +25,6 @@ const WebhookEventDataSandbox_1 = require("./WebhookEventDataSandbox");
25
25
  function instanceOfWebhookEventData(value) {
26
26
  if (!('sandbox' in value) || value['sandbox'] === undefined)
27
27
  return false;
28
- if (!('previousState' in value) || value['previousState'] === undefined)
29
- return false;
30
- if (!('state' in value) || value['state'] === undefined)
31
- return false;
32
28
  return true;
33
29
  }
34
30
  function WebhookEventDataFromJSON(json) {
@@ -40,8 +36,9 @@ function WebhookEventDataFromJSONTyped(json, ignoreDiscriminator) {
40
36
  }
41
37
  return {
42
38
  'sandbox': (0, WebhookEventDataSandbox_1.WebhookEventDataSandboxFromJSON)(json['sandbox']),
43
- 'previousState': json['previousState'],
44
- 'state': json['state'],
39
+ 'previousState': json['previousState'] == null ? undefined : json['previousState'],
40
+ 'state': json['state'] == null ? undefined : json['state'],
41
+ 'reason': json['reason'] == null ? undefined : json['reason'],
45
42
  };
46
43
  }
47
44
  function WebhookEventDataToJSON(json) {
@@ -55,5 +52,6 @@ function WebhookEventDataToJSONTyped(value, ignoreDiscriminator = false) {
55
52
  'sandbox': (0, WebhookEventDataSandbox_1.WebhookEventDataSandboxToJSON)(value['sandbox']),
56
53
  'previousState': value['previousState'],
57
54
  'state': value['state'],
55
+ 'reason': value['reason'],
58
56
  };
59
57
  }
@@ -18,6 +18,8 @@ export declare const WebhookEventType: {
18
18
  readonly SandboxError: 'sandbox.error';
19
19
  readonly SandboxArchived: 'sandbox.archived';
20
20
  readonly SandboxHydrated: 'sandbox.hydrated';
21
+ readonly SandboxDegraded: 'sandbox.degraded';
22
+ readonly SandboxRecovered: 'sandbox.recovered';
21
23
  };
22
24
  export type WebhookEventType = typeof WebhookEventType[keyof typeof WebhookEventType];
23
25
  export declare function instanceOfWebhookEventType(value: any): boolean;
@@ -27,7 +27,9 @@ exports.WebhookEventType = {
27
27
  SandboxReady: 'sandbox.ready',
28
28
  SandboxError: 'sandbox.error',
29
29
  SandboxArchived: 'sandbox.archived',
30
- SandboxHydrated: 'sandbox.hydrated'
30
+ SandboxHydrated: 'sandbox.hydrated',
31
+ SandboxDegraded: 'sandbox.degraded',
32
+ SandboxRecovered: 'sandbox.recovered'
31
33
  };
32
34
  function instanceOfWebhookEventType(value) {
33
35
  for (const key in exports.WebhookEventType) {
package/docs/BoatApi.md CHANGED
@@ -368,7 +368,7 @@ example().catch(console.error);
368
368
 
369
369
  Execute a command in a sandbox
370
370
 
371
- Runs the command synchronously by default (timeout configurable via &#x60;timeoutSeconds&#x60;, 600s cap). With &#x60;detached: true&#x60; the command starts in the background and a process id is returned immediately; poll &#x60;/sandboxes/{sandboxId}/commands/{processId}&#x60; for status and logs. With &#x60;stream: true&#x60; the output arrives as the command writes it, as newline-delimited JSON (&#x60;application/x-ndjson&#x60;): &#x60;{\&quot;type\&quot;:\&quot;started\&quot;}&#x60;, then &#x60;{\&quot;type\&quot;:\&quot;stdout\&quot;|\&quot;stderr\&quot;,\&quot;data\&quot;:\&quot;...\&quot;}&#x60; per chunk, and last &#x60;{\&quot;type\&quot;:\&quot;exit\&quot;,...}&#x60; (the synchronous result without stdout/stderr) or &#x60;{\&quot;type\&quot;:\&quot;error\&quot;,\&quot;error\&quot;:\&quot;...\&quot;,\&quot;message\&quot;:\&quot;...\&quot;}&#x60;. Returns 400 invalid_timeout when &#x60;timeoutSeconds&#x60; is not an integer in 1-600. A command sent while the sandbox is still starting (right after a resume) waits up to 60s for it to be ready instead of failing; 409 boat_starting (retryable) is returned only if it is still not ready by then. Command execution is never retried automatically: a 502 boat_direct_failed means the command may already be running on the sandbox.
371
+ Runs the command synchronously by default (timeout configurable via &#x60;timeoutSeconds&#x60;, 600s cap). With &#x60;detached: true&#x60; the command starts in the background and a process id is returned immediately; poll &#x60;/sandboxes/{sandboxId}/commands/{processId}&#x60; for status and logs. With &#x60;stream: true&#x60; the output arrives as the command writes it, as newline-delimited JSON (&#x60;application/x-ndjson&#x60;): &#x60;{\&quot;type\&quot;:\&quot;started\&quot;}&#x60;, then &#x60;{\&quot;type\&quot;:\&quot;stdout\&quot;|\&quot;stderr\&quot;,\&quot;data\&quot;:\&quot;...\&quot;}&#x60; per chunk, and last &#x60;{\&quot;type\&quot;:\&quot;exit\&quot;,...}&#x60; (the synchronous result without stdout/stderr) or &#x60;{\&quot;type\&quot;:\&quot;error\&quot;,\&quot;error\&quot;:\&quot;...\&quot;,\&quot;message\&quot;:\&quot;...\&quot;}&#x60;. Returns 400 invalid_timeout when &#x60;timeoutSeconds&#x60; is not an integer in 1-600. A command sent while the sandbox is still starting (right after a resume) waits up to 60s for it to be ready instead of failing; 409 boat_starting (retryable) is returned only if it is still not ready by then. A sandbox that is not starting (&#x60;error&#x60;, &#x60;stopped&#x60;) returns 409 sandbox_not_ready with &#x60;retryable: false&#x60; and its &#x60;state&#x60; at once: resume or recover it first. Command execution is never retried automatically: a 502 boat_direct_failed means the command may already be running on the sandbox.
372
372
 
373
373
  ### Example
374
374
 
@@ -672,7 +672,7 @@ example().catch(console.error);
672
672
  | **402** | Account cannot currently create or operate sandboxes. The error body may include a dashboard billing URL, but billing actions are not part of the v1 API. | - |
673
673
  | **409** | Request conflicts with current account or sandbox state. | - |
674
674
  | **429** | Machine start or concurrent-sandbox limit reached. Create, fork and resume each count as one machine start against your plan\&#39;s start limits (see the Billing guide; &#x60;rate_limited&#x60;, naming the window you hit). A sandbox that would exceed your plan\&#39;s concurrent-sandbox cap is refused with &#x60;limit_reached&#x60;, or &#x60;member_limit_reached&#x60; when an organization owner has capped you below the plan. | - |
675
- | **503** | No capacity. &#x60;no_ready_machine&#x60;: a &#x60;failFast&#x60; create found no ready machine of that type; nothing was created, billed, or counted. &#x60;out_of_capacity&#x60;: creates are paused until the provisioning queue drains. | - |
675
+ | **503** | No capacity. &#x60;no_ready_machine&#x60;: a &#x60;failFast&#x60; create, fork or resume found no ready machine of that type; nothing was started, billed, or counted, and a resumed sandbox stays stopped. &#x60;out_of_capacity&#x60;: creates and forks are paused until the provisioning queue drains. | - |
676
676
 
677
677
  [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
678
678
 
@@ -1898,6 +1898,7 @@ example().catch(console.error);
1898
1898
  | **404** | Resource not found. | - |
1899
1899
  | **409** | Request conflicts with current account or sandbox state. | - |
1900
1900
  | **429** | Machine start or concurrent-sandbox limit reached. Create, fork and resume each count as one machine start against your plan\&#39;s start limits (see the Billing guide; &#x60;rate_limited&#x60;, naming the window you hit). A sandbox that would exceed your plan\&#39;s concurrent-sandbox cap is refused with &#x60;limit_reached&#x60;, or &#x60;member_limit_reached&#x60; when an organization owner has capped you below the plan. | - |
1901
+ | **503** | No capacity. &#x60;no_ready_machine&#x60;: a &#x60;failFast&#x60; create, fork or resume found no ready machine of that type; nothing was started, billed, or counted, and a resumed sandbox stays stopped. &#x60;out_of_capacity&#x60;: creates and forks are paused until the provisioning queue drains. | - |
1901
1902
 
1902
1903
  [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
1903
1904
 
@@ -3597,6 +3598,7 @@ example().catch(console.error);
3597
3598
  | **404** | Resource not found. | - |
3598
3599
  | **409** | Request conflicts with current account or sandbox state. | - |
3599
3600
  | **429** | Machine start or concurrent-sandbox limit reached. Create, fork and resume each count as one machine start against your plan\&#39;s start limits (see the Billing guide; &#x60;rate_limited&#x60;, naming the window you hit). A sandbox that would exceed your plan\&#39;s concurrent-sandbox cap is refused with &#x60;limit_reached&#x60;, or &#x60;member_limit_reached&#x60; when an organization owner has capped you below the plan. | - |
3601
+ | **503** | No capacity. &#x60;no_ready_machine&#x60;: a &#x60;failFast&#x60; create, fork or resume found no ready machine of that type; nothing was started, billed, or counted, and a resumed sandbox stays stopped. &#x60;out_of_capacity&#x60;: creates and forks are paused until the provisioning queue drains. | - |
3600
3602
 
3601
3603
  [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
3602
3604
 
@@ -6,6 +6,7 @@
6
6
 
7
7
  Name | Type
8
8
  ------------ | -------------
9
+ `failFast` | boolean
9
10
  `env` | { [key: string]: string; }
10
11
  `environment` | string
11
12
  `noEnv` | boolean
@@ -19,6 +20,7 @@ import type { ForkRequest } from '@boatdev/sdk'
19
20
 
20
21
  // TODO: Update the object below with actual values
21
22
  const example = {
23
+ "failFast": null,
22
24
  "env": null,
23
25
  "environment": null,
24
26
  "noEnv": null,
@@ -7,6 +7,7 @@ Options for resuming a stopped sandbox.
7
7
 
8
8
  Name | Type
9
9
  ------------ | -------------
10
+ `failFast` | boolean
10
11
  `type` | string
11
12
  `env` | { [key: string]: string; }
12
13
  `environment` | string
@@ -20,6 +21,7 @@ import type { ResumeRequest } from '@boatdev/sdk'
20
21
 
21
22
  // TODO: Update the object below with actual values
22
23
  const example = {
24
+ "failFast": null,
23
25
  "type": null,
24
26
  "env": null,
25
27
  "environment": null,
package/docs/Sandbox.md CHANGED
@@ -10,6 +10,9 @@ Name | Type
10
10
  `name` | string
11
11
  `state` | string
12
12
  `error` | string
13
+ `health` | string
14
+ `healthReason` | string
15
+ `degradedSince` | Date
13
16
  `type` | string
14
17
  `vcpu` | number
15
18
  `memoryGB` | number
@@ -47,6 +50,9 @@ const example = {
47
50
  "name": null,
48
51
  "state": null,
49
52
  "error": null,
53
+ "health": null,
54
+ "healthReason": null,
55
+ "degradedSince": null,
50
56
  "type": null,
51
57
  "vcpu": null,
52
58
  "memoryGB": null,
@@ -9,6 +9,7 @@ Name | Type
9
9
  `sandbox` | [WebhookEventDataSandbox](WebhookEventDataSandbox.md)
10
10
  `previousState` | string
11
11
  `state` | string
12
+ `reason` | string
12
13
 
13
14
  ## Example
14
15
 
@@ -20,6 +21,7 @@ const example = {
20
21
  "sandbox": null,
21
22
  "previousState": null,
22
23
  "state": null,
24
+ "reason": null,
23
25
  } satisfies WebhookEventData
24
26
 
25
27
  console.log(example)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@boatdev/sdk",
3
- "version": "1.3.0",
3
+ "version": "1.4.0",
4
4
  "description": "OpenAPI client for @boatdev/sdk",
5
5
  "author": "OpenAPI-Generator",
6
6
  "license": "MIT",
@@ -984,7 +984,7 @@ export class BoatApi extends runtime.BaseAPI {
984
984
  }
985
985
 
986
986
  /**
987
- * Runs the command synchronously by default (timeout configurable via `timeoutSeconds`, 600s cap). With `detached: true` the command starts in the background and a process id is returned immediately; poll `/sandboxes/{sandboxId}/commands/{processId}` for status and logs. With `stream: true` the output arrives as the command writes it, as newline-delimited JSON (`application/x-ndjson`): `{\"type\":\"started\"}`, then `{\"type\":\"stdout\"|\"stderr\",\"data\":\"...\"}` per chunk, and last `{\"type\":\"exit\",...}` (the synchronous result without stdout/stderr) or `{\"type\":\"error\",\"error\":\"...\",\"message\":\"...\"}`. Returns 400 invalid_timeout when `timeoutSeconds` is not an integer in 1-600. A command sent while the sandbox is still starting (right after a resume) waits up to 60s for it to be ready instead of failing; 409 boat_starting (retryable) is returned only if it is still not ready by then. Command execution is never retried automatically: a 502 boat_direct_failed means the command may already be running on the sandbox.
987
+ * Runs the command synchronously by default (timeout configurable via `timeoutSeconds`, 600s cap). With `detached: true` the command starts in the background and a process id is returned immediately; poll `/sandboxes/{sandboxId}/commands/{processId}` for status and logs. With `stream: true` the output arrives as the command writes it, as newline-delimited JSON (`application/x-ndjson`): `{\"type\":\"started\"}`, then `{\"type\":\"stdout\"|\"stderr\",\"data\":\"...\"}` per chunk, and last `{\"type\":\"exit\",...}` (the synchronous result without stdout/stderr) or `{\"type\":\"error\",\"error\":\"...\",\"message\":\"...\"}`. Returns 400 invalid_timeout when `timeoutSeconds` is not an integer in 1-600. A command sent while the sandbox is still starting (right after a resume) waits up to 60s for it to be ready instead of failing; 409 boat_starting (retryable) is returned only if it is still not ready by then. A sandbox that is not starting (`error`, `stopped`) returns 409 sandbox_not_ready with `retryable: false` and its `state` at once: resume or recover it first. Command execution is never retried automatically: a 502 boat_direct_failed means the command may already be running on the sandbox.
988
988
  * Execute a command in a sandbox
989
989
  */
990
990
  async commandRaw(requestParameters: CommandOperationRequest | runtime.FlatBody<CommandOperationRequest, 'commandRequest'>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Command200Response>> {
@@ -995,7 +995,7 @@ export class BoatApi extends runtime.BaseAPI {
995
995
  }
996
996
 
997
997
  /**
998
- * Runs the command synchronously by default (timeout configurable via `timeoutSeconds`, 600s cap). With `detached: true` the command starts in the background and a process id is returned immediately; poll `/sandboxes/{sandboxId}/commands/{processId}` for status and logs. With `stream: true` the output arrives as the command writes it, as newline-delimited JSON (`application/x-ndjson`): `{\"type\":\"started\"}`, then `{\"type\":\"stdout\"|\"stderr\",\"data\":\"...\"}` per chunk, and last `{\"type\":\"exit\",...}` (the synchronous result without stdout/stderr) or `{\"type\":\"error\",\"error\":\"...\",\"message\":\"...\"}`. Returns 400 invalid_timeout when `timeoutSeconds` is not an integer in 1-600. A command sent while the sandbox is still starting (right after a resume) waits up to 60s for it to be ready instead of failing; 409 boat_starting (retryable) is returned only if it is still not ready by then. Command execution is never retried automatically: a 502 boat_direct_failed means the command may already be running on the sandbox.
998
+ * Runs the command synchronously by default (timeout configurable via `timeoutSeconds`, 600s cap). With `detached: true` the command starts in the background and a process id is returned immediately; poll `/sandboxes/{sandboxId}/commands/{processId}` for status and logs. With `stream: true` the output arrives as the command writes it, as newline-delimited JSON (`application/x-ndjson`): `{\"type\":\"started\"}`, then `{\"type\":\"stdout\"|\"stderr\",\"data\":\"...\"}` per chunk, and last `{\"type\":\"exit\",...}` (the synchronous result without stdout/stderr) or `{\"type\":\"error\",\"error\":\"...\",\"message\":\"...\"}`. Returns 400 invalid_timeout when `timeoutSeconds` is not an integer in 1-600. A command sent while the sandbox is still starting (right after a resume) waits up to 60s for it to be ready instead of failing; 409 boat_starting (retryable) is returned only if it is still not ready by then. A sandbox that is not starting (`error`, `stopped`) returns 409 sandbox_not_ready with `retryable: false` and its `state` at once: resume or recover it first. Command execution is never retried automatically: a 502 boat_direct_failed means the command may already be running on the sandbox.
999
999
  * Execute a command in a sandbox
1000
1000
  */
1001
1001
  async command(requestParameters: CommandOperationRequest | runtime.FlatBody<CommandOperationRequest, 'commandRequest'>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Command200Response> {
@@ -56,7 +56,7 @@ export interface CreateSandboxRequest {
56
56
  */
57
57
  snapshots?: boolean;
58
58
  /**
59
- * Pass `true` to get a sandbox only if a machine of this type is ready right now. The call answers within about 1.5 s: either the usual `202` with the sandbox, or `503` `no_ready_machine` with nothing created, billed, or counted against your start limits, so you can retry or fall back at once. Without it, a create waits for a machine to be built when none is ready. Not combinable with `from`.
59
+ * Pass `true` to get a sandbox only if a machine of this type is ready right now. The call answers within about 1.5 s: either the usual `202` with the sandbox, or `503` `no_ready_machine` with nothing created, billed, or counted against your start limits, so you can retry or fall back at once. Without it, a create waits for a machine to be built when none is ready. Works with `from`; fork and resume take it too.
60
60
  * @type {boolean}
61
61
  * @memberof CreateSandboxRequest
62
62
  */
@@ -19,6 +19,12 @@ import { mapValues } from '../runtime';
19
19
  * @interface ForkRequest
20
20
  */
21
21
  export interface ForkRequest {
22
+ /**
23
+ * Pass `true` to fork only if a machine is ready right now. Within about 1.5 s you get the usual `202`, or `503` `no_ready_machine` with no fork created and nothing counted against your start limits.
24
+ * @type {boolean}
25
+ * @memberof ForkRequest
26
+ */
27
+ failFast?: boolean;
22
28
  /**
23
29
  * Replaces the env the fork would otherwise inherit from the source sandbox. Same validation rules as `CreateSandboxRequest.env`.
24
30
  * @type {{ [key: string]: string; }}
@@ -80,6 +86,7 @@ export function ForkRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean
80
86
  }
81
87
  return {
82
88
 
89
+ 'failFast': json['failFast'] == null ? undefined : json['failFast'],
83
90
  'env': json['env'] == null ? undefined : json['env'],
84
91
  'environment': json['environment'] == null ? undefined : json['environment'],
85
92
  'noEnv': json['noEnv'] == null ? undefined : json['noEnv'],
@@ -99,6 +106,7 @@ export function ForkRequestToJSONTyped(value?: ForkRequest | null, ignoreDiscrim
99
106
 
100
107
  return {
101
108
 
109
+ 'failFast': value['failFast'],
102
110
  'env': value['env'],
103
111
  'environment': value['environment'],
104
112
  'noEnv': value['noEnv'],
@@ -19,6 +19,12 @@ import { mapValues } from '../runtime';
19
19
  * @interface ResumeRequest
20
20
  */
21
21
  export interface ResumeRequest {
22
+ /**
23
+ * Pass `true` to resume only if a machine is ready right now. Within about 1.5 s you get the usual `202`, or `503` `no_ready_machine` with the sandbox left stopped and nothing counted against your start limits.
24
+ * @type {boolean}
25
+ * @memberof ResumeRequest
26
+ */
27
+ failFast?: boolean;
22
28
  /**
23
29
  * Resume onto a different machine size. Omit to keep the sandbox's current type. A resume already restores onto a fresh machine, so changing size costs nothing extra. Shrinking is rejected with `type_too_small` when the sandbox's data would not fit the smaller disk.
24
30
  * @type {ResumeRequestTypeEnum}
@@ -80,6 +86,7 @@ export function ResumeRequestFromJSONTyped(json: any, ignoreDiscriminator: boole
80
86
  }
81
87
  return {
82
88
 
89
+ 'failFast': json['failFast'] == null ? undefined : json['failFast'],
83
90
  'type': json['type'] == null ? undefined : json['type'],
84
91
  'env': json['env'] == null ? undefined : json['env'],
85
92
  'environment': json['environment'] == null ? undefined : json['environment'],
@@ -99,6 +106,7 @@ export function ResumeRequestToJSONTyped(value?: ResumeRequest | null, ignoreDis
99
106
 
100
107
  return {
101
108
 
109
+ 'failFast': value['failFast'],
102
110
  'type': value['type'],
103
111
  'env': value['env'],
104
112
  'environment': value['environment'],
@@ -51,6 +51,24 @@ export interface Sandbox {
51
51
  * @memberof Sandbox
52
52
  */
53
53
  error?: string | null;
54
+ /**
55
+ * `degraded` when the machine is alive but Boat cannot fully reach it (for example a firewall rule inside the sandbox blocks the tunnel). The sandbox keeps running.
56
+ * @type {SandboxHealthEnum}
57
+ * @memberof Sandbox
58
+ */
59
+ health?: SandboxHealthEnum;
60
+ /**
61
+ * Why the sandbox is degraded, or null.
62
+ * @type {string}
63
+ * @memberof Sandbox
64
+ */
65
+ healthReason?: string | null;
66
+ /**
67
+ * When the sandbox became degraded, or null.
68
+ * @type {Date}
69
+ * @memberof Sandbox
70
+ */
71
+ degradedSince?: Date | null;
54
72
  /**
55
73
  * Current machine size: what the sandbox was created with, or the size it was last resumed or forked onto.
56
74
  * @type {SandboxTypeEnum}
@@ -222,6 +240,15 @@ export const SandboxStateEnum = {
222
240
  } as const;
223
241
  export type SandboxStateEnum = typeof SandboxStateEnum[keyof typeof SandboxStateEnum];
224
242
 
243
+ /**
244
+ * @export
245
+ */
246
+ export const SandboxHealthEnum = {
247
+ Ok: 'ok',
248
+ Degraded: 'degraded'
249
+ } as const;
250
+ export type SandboxHealthEnum = typeof SandboxHealthEnum[keyof typeof SandboxHealthEnum];
251
+
225
252
  /**
226
253
  * @export
227
254
  */
@@ -291,6 +318,9 @@ export function SandboxFromJSONTyped(json: any, ignoreDiscriminator: boolean): S
291
318
  'name': json['name'],
292
319
  'state': json['state'],
293
320
  'error': json['error'] == null ? undefined : json['error'],
321
+ 'health': json['health'] == null ? undefined : json['health'],
322
+ 'healthReason': json['healthReason'] == null ? undefined : json['healthReason'],
323
+ 'degradedSince': json['degradedSince'] == null ? undefined : (new Date(json['degradedSince'])),
294
324
  'type': json['type'] == null ? undefined : json['type'],
295
325
  'vcpu': json['vcpu'] == null ? undefined : json['vcpu'],
296
326
  'memoryGB': json['memoryGB'] == null ? undefined : json['memoryGB'],
@@ -334,6 +364,9 @@ export function SandboxToJSONTyped(value?: Sandbox | null, ignoreDiscriminator:
334
364
  'name': value['name'],
335
365
  'state': value['state'],
336
366
  'error': value['error'],
367
+ 'health': value['health'],
368
+ 'healthReason': value['healthReason'],
369
+ 'degradedSince': value['degradedSince'] == null ? value['degradedSince'] : value['degradedSince'].toISOString(),
337
370
  'type': value['type'],
338
371
  'vcpu': value['vcpu'],
339
372
  'memoryGB': value['memoryGB'],
@@ -34,17 +34,23 @@ export interface WebhookEventData {
34
34
  */
35
35
  sandbox: WebhookEventDataSandbox;
36
36
  /**
37
- *
37
+ * On sandbox.ready, sandbox.error and sandbox.archived only.
38
38
  * @type {string}
39
39
  * @memberof WebhookEventData
40
40
  */
41
- previousState: string;
41
+ previousState?: string;
42
42
  /**
43
- *
43
+ * Absent on sandbox.hydrated.
44
+ * @type {string}
45
+ * @memberof WebhookEventData
46
+ */
47
+ state?: string;
48
+ /**
49
+ * On sandbox.degraded and sandbox.recovered. Why the sandbox is degraded (null on recovered).
44
50
  * @type {string}
45
51
  * @memberof WebhookEventData
46
52
  */
47
- state: string;
53
+ reason?: string | null;
48
54
  }
49
55
 
50
56
  /**
@@ -52,8 +58,6 @@ export interface WebhookEventData {
52
58
  */
53
59
  export function instanceOfWebhookEventData(value: object): value is WebhookEventData {
54
60
  if (!('sandbox' in value) || value['sandbox'] === undefined) return false;
55
- if (!('previousState' in value) || value['previousState'] === undefined) return false;
56
- if (!('state' in value) || value['state'] === undefined) return false;
57
61
  return true;
58
62
  }
59
63
 
@@ -68,8 +72,9 @@ export function WebhookEventDataFromJSONTyped(json: any, ignoreDiscriminator: bo
68
72
  return {
69
73
 
70
74
  'sandbox': WebhookEventDataSandboxFromJSON(json['sandbox']),
71
- 'previousState': json['previousState'],
72
- 'state': json['state'],
75
+ 'previousState': json['previousState'] == null ? undefined : json['previousState'],
76
+ 'state': json['state'] == null ? undefined : json['state'],
77
+ 'reason': json['reason'] == null ? undefined : json['reason'],
73
78
  };
74
79
  }
75
80
 
@@ -87,6 +92,7 @@ export function WebhookEventDataToJSONTyped(value?: WebhookEventData | null, ign
87
92
  'sandbox': WebhookEventDataSandboxToJSON(value['sandbox']),
88
93
  'previousState': value['previousState'],
89
94
  'state': value['state'],
95
+ 'reason': value['reason'],
90
96
  };
91
97
  }
92
98
 
@@ -21,7 +21,9 @@ export const WebhookEventType = {
21
21
  SandboxReady: 'sandbox.ready',
22
22
  SandboxError: 'sandbox.error',
23
23
  SandboxArchived: 'sandbox.archived',
24
- SandboxHydrated: 'sandbox.hydrated'
24
+ SandboxHydrated: 'sandbox.hydrated',
25
+ SandboxDegraded: 'sandbox.degraded',
26
+ SandboxRecovered: 'sandbox.recovered'
25
27
  } as const;
26
28
  export type WebhookEventType = typeof WebhookEventType[keyof typeof WebhookEventType];
27
29