@boatdev/sdk 1.1.0 → 1.3.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 (54) hide show
  1. package/.openapi-generator/FILES +2 -0
  2. package/dist/apis/BoatApi.d.ts +2 -2
  3. package/dist/apis/BoatApi.js +2 -2
  4. package/dist/boat-helpers.d.ts +17 -1
  5. package/dist/boat-helpers.js +61 -0
  6. package/dist/esm/apis/BoatApi.d.ts +2 -2
  7. package/dist/esm/apis/BoatApi.js +2 -2
  8. package/dist/esm/boat-helpers.d.ts +17 -1
  9. package/dist/esm/boat-helpers.js +60 -0
  10. package/dist/esm/models/CommandRequest.d.ts +6 -0
  11. package/dist/esm/models/CommandRequest.js +2 -0
  12. package/dist/esm/models/CommandStreamFrame.d.ts +85 -0
  13. package/dist/esm/models/CommandStreamFrame.js +67 -0
  14. package/dist/esm/models/CreateSandboxRequest.d.ts +12 -0
  15. package/dist/esm/models/CreateSandboxRequest.js +4 -0
  16. package/dist/esm/models/DataRetentionPolicyResponse.d.ts +12 -0
  17. package/dist/esm/models/DataRetentionPolicyResponse.js +4 -0
  18. package/dist/esm/models/DataRetentionUpdateRequest.d.ts +8 -2
  19. package/dist/esm/models/DataRetentionUpdateRequest.js +3 -3
  20. package/dist/esm/models/Sandbox.d.ts +6 -0
  21. package/dist/esm/models/Sandbox.js +2 -0
  22. package/dist/esm/models/index.d.ts +1 -0
  23. package/dist/esm/models/index.js +1 -0
  24. package/dist/models/CommandRequest.d.ts +6 -0
  25. package/dist/models/CommandRequest.js +2 -0
  26. package/dist/models/CommandStreamFrame.d.ts +85 -0
  27. package/dist/models/CommandStreamFrame.js +75 -0
  28. package/dist/models/CreateSandboxRequest.d.ts +12 -0
  29. package/dist/models/CreateSandboxRequest.js +4 -0
  30. package/dist/models/DataRetentionPolicyResponse.d.ts +12 -0
  31. package/dist/models/DataRetentionPolicyResponse.js +4 -0
  32. package/dist/models/DataRetentionUpdateRequest.d.ts +8 -2
  33. package/dist/models/DataRetentionUpdateRequest.js +3 -3
  34. package/dist/models/Sandbox.d.ts +6 -0
  35. package/dist/models/Sandbox.js +2 -0
  36. package/dist/models/index.d.ts +1 -0
  37. package/dist/models/index.js +1 -0
  38. package/docs/BoatApi.md +4 -3
  39. package/docs/CommandRequest.md +2 -0
  40. package/docs/CommandStreamFrame.md +47 -0
  41. package/docs/CreateSandboxRequest.md +4 -0
  42. package/docs/DataRetentionPolicyResponse.md +4 -0
  43. package/docs/DataRetentionUpdateRequest.md +3 -0
  44. package/docs/Sandbox.md +2 -0
  45. package/package.json +1 -1
  46. package/src/apis/BoatApi.ts +7 -2
  47. package/src/boat-helpers.ts +75 -1
  48. package/src/models/CommandRequest.ts +8 -0
  49. package/src/models/CommandStreamFrame.ts +136 -0
  50. package/src/models/CreateSandboxRequest.ts +16 -0
  51. package/src/models/DataRetentionPolicyResponse.ts +16 -0
  52. package/src/models/DataRetentionUpdateRequest.ts +11 -4
  53. package/src/models/Sandbox.ts +8 -0
  54. package/src/models/index.ts +1 -0
@@ -103,6 +103,7 @@ export function SandboxFromJSONTyped(json, ignoreDiscriminator) {
103
103
  'archiveAfter': json['archiveAfter'] == null ? undefined : (new Date(json['archiveAfter'])),
104
104
  'desktopAvailable': json['desktopAvailable'],
105
105
  'desktopUrl': json['desktopUrl'] == null ? undefined : json['desktopUrl'],
106
+ 'snapshots': json['snapshots'] == null ? undefined : json['snapshots'],
106
107
  'snapshotAvailable': json['snapshotAvailable'],
107
108
  'snapshotCompletedAt': json['snapshotCompletedAt'] == null ? undefined : (new Date(json['snapshotCompletedAt'])),
108
109
  'snapshotVerifiedAt': json['snapshotVerifiedAt'] == null ? undefined : (new Date(json['snapshotVerifiedAt'])),
@@ -141,6 +142,7 @@ export function SandboxToJSONTyped(value, ignoreDiscriminator = false) {
141
142
  'archiveAfter': value['archiveAfter'] == null ? value['archiveAfter'] : value['archiveAfter'].toISOString(),
142
143
  'desktopAvailable': value['desktopAvailable'],
143
144
  'desktopUrl': value['desktopUrl'],
145
+ 'snapshots': value['snapshots'],
144
146
  'snapshotAvailable': value['snapshotAvailable'],
145
147
  'snapshotCompletedAt': value['snapshotCompletedAt'] == null ? value['snapshotCompletedAt'] : value['snapshotCompletedAt'].toISOString(),
146
148
  'snapshotVerifiedAt': value['snapshotVerifiedAt'] == null ? value['snapshotVerifiedAt'] : value['snapshotVerifiedAt'].toISOString(),
@@ -20,6 +20,7 @@ export * from './CommandRequest';
20
20
  export * from './CommandResponse';
21
21
  export * from './CommandStartedResponse';
22
22
  export * from './CommandStatusResponse';
23
+ export * from './CommandStreamFrame';
23
24
  export * from './CompletionEvent';
24
25
  export * from './Conversation';
25
26
  export * from './ConversationsResponse';
@@ -22,6 +22,7 @@ export * from './CommandRequest';
22
22
  export * from './CommandResponse';
23
23
  export * from './CommandStartedResponse';
24
24
  export * from './CommandStatusResponse';
25
+ export * from './CommandStreamFrame';
25
26
  export * from './CompletionEvent';
26
27
  export * from './Conversation';
27
28
  export * from './ConversationsResponse';
@@ -39,6 +39,12 @@ export interface CommandRequest {
39
39
  * @memberof CommandRequest
40
40
  */
41
41
  detached?: boolean;
42
+ /**
43
+ * Stream the output as the command writes it: the response is newline-delimited JSON (application/x-ndjson), one CommandStreamFrame per line. Ignored with detached.
44
+ * @type {boolean}
45
+ * @memberof CommandRequest
46
+ */
47
+ stream?: boolean;
42
48
  }
43
49
  /**
44
50
  * Check if a given object implements the CommandRequest interface.
@@ -38,6 +38,7 @@ function CommandRequestFromJSONTyped(json, ignoreDiscriminator) {
38
38
  'cwd': json['cwd'] == null ? undefined : json['cwd'],
39
39
  'timeoutSeconds': json['timeoutSeconds'] == null ? undefined : json['timeoutSeconds'],
40
40
  'detached': json['detached'] == null ? undefined : json['detached'],
41
+ 'stream': json['stream'] == null ? undefined : json['stream'],
41
42
  };
42
43
  }
43
44
  function CommandRequestToJSON(json) {
@@ -52,5 +53,6 @@ function CommandRequestToJSONTyped(value, ignoreDiscriminator = false) {
52
53
  'cwd': value['cwd'],
53
54
  'timeoutSeconds': value['timeoutSeconds'],
54
55
  'detached': value['detached'],
56
+ 'stream': value['stream'],
55
57
  };
56
58
  }
@@ -0,0 +1,85 @@
1
+ /**
2
+ * Boat Public API v1
3
+ * Public JSON API for creating, operating, prompting, observing, and exposing sandboxes from backend services, CI jobs, hosted workers, and Boat automation products. The v1 reference intentionally documents the developer integration surface only. Dashboard billing actions are not part of v1.
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ * One line of a streamed command. `started` first, then `stdout`/`stderr` chunks, then exactly one `exit` (the synchronous result, without stdout/stderr) or `error`.
14
+ * @export
15
+ * @interface CommandStreamFrame
16
+ */
17
+ export interface CommandStreamFrame {
18
+ /**
19
+ *
20
+ * @type {CommandStreamFrameTypeEnum}
21
+ * @memberof CommandStreamFrame
22
+ */
23
+ type: CommandStreamFrameTypeEnum;
24
+ /**
25
+ * stdout/stderr: the chunk of output, UTF-8.
26
+ * @type {string}
27
+ * @memberof CommandStreamFrame
28
+ */
29
+ data?: string;
30
+ /**
31
+ *
32
+ * @type {number}
33
+ * @memberof CommandStreamFrame
34
+ */
35
+ exitCode?: number | null;
36
+ /**
37
+ *
38
+ * @type {boolean}
39
+ * @memberof CommandStreamFrame
40
+ */
41
+ success?: boolean;
42
+ /**
43
+ *
44
+ * @type {boolean}
45
+ * @memberof CommandStreamFrame
46
+ */
47
+ timedOut?: boolean;
48
+ /**
49
+ *
50
+ * @type {string}
51
+ * @memberof CommandStreamFrame
52
+ */
53
+ error?: string;
54
+ /**
55
+ *
56
+ * @type {string}
57
+ * @memberof CommandStreamFrame
58
+ */
59
+ message?: string;
60
+ /**
61
+ * error: true when the command provably never ran (the sandbox is still restoring its disk), so sending it again is safe.
62
+ * @type {boolean}
63
+ * @memberof CommandStreamFrame
64
+ */
65
+ retryable?: boolean;
66
+ }
67
+ /**
68
+ * @export
69
+ */
70
+ export declare const CommandStreamFrameTypeEnum: {
71
+ readonly Started: 'started';
72
+ readonly Stdout: 'stdout';
73
+ readonly Stderr: 'stderr';
74
+ readonly Exit: 'exit';
75
+ readonly Error: 'error';
76
+ };
77
+ export type CommandStreamFrameTypeEnum = typeof CommandStreamFrameTypeEnum[keyof typeof CommandStreamFrameTypeEnum];
78
+ /**
79
+ * Check if a given object implements the CommandStreamFrame interface.
80
+ */
81
+ export declare function instanceOfCommandStreamFrame(value: object): value is CommandStreamFrame;
82
+ export declare function CommandStreamFrameFromJSON(json: any): CommandStreamFrame;
83
+ export declare function CommandStreamFrameFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommandStreamFrame;
84
+ export declare function CommandStreamFrameToJSON(json: any): CommandStreamFrame;
85
+ export declare function CommandStreamFrameToJSONTyped(value?: CommandStreamFrame | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,75 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Boat Public API v1
6
+ * Public JSON API for creating, operating, prompting, observing, and exposing sandboxes from backend services, CI jobs, hosted workers, and Boat automation products. The v1 reference intentionally documents the developer integration surface only. Dashboard billing actions are not part of v1.
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.CommandStreamFrameTypeEnum = void 0;
17
+ exports.instanceOfCommandStreamFrame = instanceOfCommandStreamFrame;
18
+ exports.CommandStreamFrameFromJSON = CommandStreamFrameFromJSON;
19
+ exports.CommandStreamFrameFromJSONTyped = CommandStreamFrameFromJSONTyped;
20
+ exports.CommandStreamFrameToJSON = CommandStreamFrameToJSON;
21
+ exports.CommandStreamFrameToJSONTyped = CommandStreamFrameToJSONTyped;
22
+ /**
23
+ * @export
24
+ */
25
+ exports.CommandStreamFrameTypeEnum = {
26
+ Started: 'started',
27
+ Stdout: 'stdout',
28
+ Stderr: 'stderr',
29
+ Exit: 'exit',
30
+ Error: 'error'
31
+ };
32
+ /**
33
+ * Check if a given object implements the CommandStreamFrame interface.
34
+ */
35
+ function instanceOfCommandStreamFrame(value) {
36
+ if (!('type' in value) || value['type'] === undefined)
37
+ return false;
38
+ return true;
39
+ }
40
+ function CommandStreamFrameFromJSON(json) {
41
+ return CommandStreamFrameFromJSONTyped(json, false);
42
+ }
43
+ function CommandStreamFrameFromJSONTyped(json, ignoreDiscriminator) {
44
+ if (json == null) {
45
+ return json;
46
+ }
47
+ return {
48
+ 'type': json['type'],
49
+ 'data': json['data'] == null ? undefined : json['data'],
50
+ 'exitCode': json['exitCode'] == null ? undefined : json['exitCode'],
51
+ 'success': json['success'] == null ? undefined : json['success'],
52
+ 'timedOut': json['timedOut'] == null ? undefined : json['timedOut'],
53
+ 'error': json['error'] == null ? undefined : json['error'],
54
+ 'message': json['message'] == null ? undefined : json['message'],
55
+ 'retryable': json['retryable'] == null ? undefined : json['retryable'],
56
+ };
57
+ }
58
+ function CommandStreamFrameToJSON(json) {
59
+ return CommandStreamFrameToJSONTyped(json, false);
60
+ }
61
+ function CommandStreamFrameToJSONTyped(value, ignoreDiscriminator = false) {
62
+ if (value == null) {
63
+ return value;
64
+ }
65
+ return {
66
+ 'type': value['type'],
67
+ 'data': value['data'],
68
+ 'exitCode': value['exitCode'],
69
+ 'success': value['success'],
70
+ 'timedOut': value['timedOut'],
71
+ 'error': value['error'],
72
+ 'message': value['message'],
73
+ 'retryable': value['retryable'],
74
+ };
75
+ }
@@ -47,6 +47,18 @@ export interface CreateSandboxRequest {
47
47
  * @memberof CreateSandboxRequest
48
48
  */
49
49
  noEnv?: boolean;
50
+ /**
51
+ * Pass `false` to never snapshot this sandbox. Nothing is captured in the background, so it pays no CPU or memory for it, and stopping it erases its disk the way zero data retention does. It cannot be resumed, forked, or saved as a named snapshot, and if its machine fails there is no backup to rebuild it from.
52
+ * @type {boolean}
53
+ * @memberof CreateSandboxRequest
54
+ */
55
+ snapshots?: boolean;
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`.
58
+ * @type {boolean}
59
+ * @memberof CreateSandboxRequest
60
+ */
61
+ failFast?: boolean;
50
62
  /**
51
63
  * Shell script that runs on the sandbox after it is ready. Ready means "ready to accept the user", not "setup done": the script starts in the background once provisioning completes and never blocks the sandbox becoming usable. It runs as the sandbox user via `bash`, with the sandbox's environment applied, and its output goes to a log file on the sandbox. Observe the outcome as `setupStatus` (pending/running/done/failed) and `setupError` on the sandbox. Rejected with a 400 `invalid_setup_script` error when it is not a string or exceeds 64KB.
52
64
  * @type {string}
@@ -46,6 +46,8 @@ function CreateSandboxRequestFromJSONTyped(json, ignoreDiscriminator) {
46
46
  'env': json['env'] == null ? undefined : json['env'],
47
47
  'environment': json['environment'] == null ? undefined : json['environment'],
48
48
  'noEnv': json['noEnv'] == null ? undefined : json['noEnv'],
49
+ 'snapshots': json['snapshots'] == null ? undefined : json['snapshots'],
50
+ 'failFast': json['failFast'] == null ? undefined : json['failFast'],
49
51
  'setupScript': json['setupScript'] == null ? undefined : json['setupScript'],
50
52
  'org': json['org'] == null ? undefined : json['org'],
51
53
  'teamId': json['teamId'] == null ? undefined : json['teamId'],
@@ -65,6 +67,8 @@ function CreateSandboxRequestToJSONTyped(value, ignoreDiscriminator = false) {
65
67
  'env': value['env'],
66
68
  'environment': value['environment'],
67
69
  'noEnv': value['noEnv'],
70
+ 'snapshots': value['snapshots'],
71
+ 'failFast': value['failFast'],
68
72
  'setupScript': value['setupScript'],
69
73
  'org': value['org'],
70
74
  'teamId': value['teamId'],
@@ -51,6 +51,18 @@ export interface DataRetentionPolicyResponse {
51
51
  * @memberof DataRetentionPolicyResponse
52
52
  */
53
53
  acceptedDeletionOperationsIrreversible?: boolean;
54
+ /**
55
+ * When true, every new sandbox of this account is created with snapshots off.
56
+ * @type {boolean}
57
+ * @memberof DataRetentionPolicyResponse
58
+ */
59
+ snapshotsOff?: boolean;
60
+ /**
61
+ *
62
+ * @type {Date}
63
+ * @memberof DataRetentionPolicyResponse
64
+ */
65
+ snapshotsOffAt?: Date | null;
54
66
  }
55
67
  /**
56
68
  * @export
@@ -54,6 +54,8 @@ function DataRetentionPolicyResponseFromJSONTyped(json, ignoreDiscriminator) {
54
54
  'enabledAt': (json['enabledAt'] == null ? null : new Date(json['enabledAt'])),
55
55
  'queuedSandboxes': json['queuedSandboxes'] == null ? undefined : json['queuedSandboxes'],
56
56
  'acceptedDeletionOperationsIrreversible': json['acceptedDeletionOperationsIrreversible'] == null ? undefined : json['acceptedDeletionOperationsIrreversible'],
57
+ 'snapshotsOff': json['snapshotsOff'] == null ? undefined : json['snapshotsOff'],
58
+ 'snapshotsOffAt': json['snapshotsOffAt'] == null ? undefined : (new Date(json['snapshotsOffAt'])),
57
59
  };
58
60
  }
59
61
  function DataRetentionPolicyResponseToJSON(json) {
@@ -70,5 +72,7 @@ function DataRetentionPolicyResponseToJSONTyped(value, ignoreDiscriminator = fal
70
72
  'enabledAt': value['enabledAt'] == null ? value['enabledAt'] : value['enabledAt'].toISOString(),
71
73
  'queuedSandboxes': value['queuedSandboxes'],
72
74
  'acceptedDeletionOperationsIrreversible': value['acceptedDeletionOperationsIrreversible'],
75
+ 'snapshotsOff': value['snapshotsOff'],
76
+ 'snapshotsOffAt': value['snapshotsOffAt'] == null ? value['snapshotsOffAt'] : value['snapshotsOffAt'].toISOString(),
73
77
  };
74
78
  }
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  /**
13
- *
13
+ * Pass `enabled` to change zero data retention, or `snapshotsOff` alone to change the account's snapshots-off setting.
14
14
  * @export
15
15
  * @interface DataRetentionUpdateRequest
16
16
  */
@@ -20,7 +20,13 @@ export interface DataRetentionUpdateRequest {
20
20
  * @type {boolean}
21
21
  * @memberof DataRetentionUpdateRequest
22
22
  */
23
- enabled: boolean;
23
+ enabled?: boolean;
24
+ /**
25
+ * Turn snapshots off for every sandbox created from now on. Existing sandboxes keep their setting. While on, a create or fork that passes `snapshots: true` is refused with 409 `snapshots_off_for_account`.
26
+ * @type {boolean}
27
+ * @memberof DataRetentionUpdateRequest
28
+ */
29
+ snapshotsOff?: boolean;
24
30
  /**
25
31
  * Required when enabling and must exactly equal `delete archived sandbox data`.
26
32
  * @type {DataRetentionUpdateRequestConfirmationEnum}
@@ -29,8 +29,6 @@ exports.DataRetentionUpdateRequestConfirmationEnum = {
29
29
  * Check if a given object implements the DataRetentionUpdateRequest interface.
30
30
  */
31
31
  function instanceOfDataRetentionUpdateRequest(value) {
32
- if (!('enabled' in value) || value['enabled'] === undefined)
33
- return false;
34
32
  return true;
35
33
  }
36
34
  function DataRetentionUpdateRequestFromJSON(json) {
@@ -41,7 +39,8 @@ function DataRetentionUpdateRequestFromJSONTyped(json, ignoreDiscriminator) {
41
39
  return json;
42
40
  }
43
41
  return {
44
- 'enabled': json['enabled'],
42
+ 'enabled': json['enabled'] == null ? undefined : json['enabled'],
43
+ 'snapshotsOff': json['snapshotsOff'] == null ? undefined : json['snapshotsOff'],
45
44
  'confirmation': json['confirmation'] == null ? undefined : json['confirmation'],
46
45
  };
47
46
  }
@@ -54,6 +53,7 @@ function DataRetentionUpdateRequestToJSONTyped(value, ignoreDiscriminator = fals
54
53
  }
55
54
  return {
56
55
  'enabled': value['enabled'],
56
+ 'snapshotsOff': value['snapshotsOff'],
57
57
  'confirmation': value['confirmation'],
58
58
  };
59
59
  }
@@ -118,6 +118,12 @@ export interface Sandbox {
118
118
  * @memberof Sandbox
119
119
  */
120
120
  desktopUrl?: string | null;
121
+ /**
122
+ * False when the sandbox was created with snapshots off.
123
+ * @type {boolean}
124
+ * @memberof Sandbox
125
+ */
126
+ snapshots?: boolean;
121
127
  /**
122
128
  *
123
129
  * @type {boolean}
@@ -111,6 +111,7 @@ function SandboxFromJSONTyped(json, ignoreDiscriminator) {
111
111
  'archiveAfter': json['archiveAfter'] == null ? undefined : (new Date(json['archiveAfter'])),
112
112
  'desktopAvailable': json['desktopAvailable'],
113
113
  'desktopUrl': json['desktopUrl'] == null ? undefined : json['desktopUrl'],
114
+ 'snapshots': json['snapshots'] == null ? undefined : json['snapshots'],
114
115
  'snapshotAvailable': json['snapshotAvailable'],
115
116
  'snapshotCompletedAt': json['snapshotCompletedAt'] == null ? undefined : (new Date(json['snapshotCompletedAt'])),
116
117
  'snapshotVerifiedAt': json['snapshotVerifiedAt'] == null ? undefined : (new Date(json['snapshotVerifiedAt'])),
@@ -149,6 +150,7 @@ function SandboxToJSONTyped(value, ignoreDiscriminator = false) {
149
150
  'archiveAfter': value['archiveAfter'] == null ? value['archiveAfter'] : value['archiveAfter'].toISOString(),
150
151
  'desktopAvailable': value['desktopAvailable'],
151
152
  'desktopUrl': value['desktopUrl'],
153
+ 'snapshots': value['snapshots'],
152
154
  'snapshotAvailable': value['snapshotAvailable'],
153
155
  'snapshotCompletedAt': value['snapshotCompletedAt'] == null ? value['snapshotCompletedAt'] : value['snapshotCompletedAt'].toISOString(),
154
156
  'snapshotVerifiedAt': value['snapshotVerifiedAt'] == null ? value['snapshotVerifiedAt'] : value['snapshotVerifiedAt'].toISOString(),
@@ -20,6 +20,7 @@ export * from './CommandRequest';
20
20
  export * from './CommandResponse';
21
21
  export * from './CommandStartedResponse';
22
22
  export * from './CommandStatusResponse';
23
+ export * from './CommandStreamFrame';
23
24
  export * from './CompletionEvent';
24
25
  export * from './Conversation';
25
26
  export * from './ConversationsResponse';
@@ -38,6 +38,7 @@ __exportStar(require("./CommandRequest"), exports);
38
38
  __exportStar(require("./CommandResponse"), exports);
39
39
  __exportStar(require("./CommandStartedResponse"), exports);
40
40
  __exportStar(require("./CommandStatusResponse"), exports);
41
+ __exportStar(require("./CommandStreamFrame"), exports);
41
42
  __exportStar(require("./CompletionEvent"), exports);
42
43
  __exportStar(require("./Conversation"), exports);
43
44
  __exportStar(require("./ConversationsResponse"), exports);
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 `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. Returns 400 invalid_timeout when `timeoutSeconds` is not an integer in 1-600. Returns 409 boat_starting (retryable) while the sandbox is still provisioning -- wait until the sandbox state is ready before running commands. 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 `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.
372
372
 
373
373
  ### Example
374
374
 
@@ -425,13 +425,13 @@ example().catch(console.error);
425
425
  ### HTTP request headers
426
426
 
427
427
  - **Content-Type**: `application/json`
428
- - **Accept**: `application/json`
428
+ - **Accept**: `application/json`, `application/x-ndjson`
429
429
 
430
430
 
431
431
  ### HTTP response details
432
432
  | Status code | Description | Response headers |
433
433
  |-------------|-------------|------------------|
434
- | **200** | Command result (synchronous) or process start confirmation (detached). | - |
434
+ | **200** | Command result (synchronous), process start confirmation (detached), or the output stream (`stream: true`). | - |
435
435
  | **400** | Invalid request body or parameters. | - |
436
436
  | **401** | Missing or invalid bearer token. | - |
437
437
  | **404** | Resource not found. | - |
@@ -672,6 +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\'s start limits (see the Billing guide; `rate_limited`, naming the window you hit). A sandbox that would exceed your plan\'s concurrent-sandbox cap is refused with `limit_reached`, or `member_limit_reached` when an organization owner has capped you below the plan. | - |
675
+ | **503** | No capacity. `no_ready_machine`: a `failFast` create found no ready machine of that type; nothing was created, billed, or counted. `out_of_capacity`: creates are paused until the provisioning queue drains. | - |
675
676
 
676
677
  [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
677
678
 
@@ -10,6 +10,7 @@ Name | Type
10
10
  `cwd` | string
11
11
  `timeoutSeconds` | number
12
12
  `detached` | boolean
13
+ `stream` | boolean
13
14
 
14
15
  ## Example
15
16
 
@@ -22,6 +23,7 @@ const example = {
22
23
  "cwd": null,
23
24
  "timeoutSeconds": null,
24
25
  "detached": null,
26
+ "stream": null,
25
27
  } satisfies CommandRequest
26
28
 
27
29
  console.log(example)
@@ -0,0 +1,47 @@
1
+
2
+ # CommandStreamFrame
3
+
4
+ One line of a streamed command. `started` first, then `stdout`/`stderr` chunks, then exactly one `exit` (the synchronous result, without stdout/stderr) or `error`.
5
+
6
+ ## Properties
7
+
8
+ Name | Type
9
+ ------------ | -------------
10
+ `type` | string
11
+ `data` | string
12
+ `exitCode` | number
13
+ `success` | boolean
14
+ `timedOut` | boolean
15
+ `error` | string
16
+ `message` | string
17
+ `retryable` | boolean
18
+
19
+ ## Example
20
+
21
+ ```typescript
22
+ import type { CommandStreamFrame } from '@boatdev/sdk'
23
+
24
+ // TODO: Update the object below with actual values
25
+ const example = {
26
+ "type": null,
27
+ "data": null,
28
+ "exitCode": null,
29
+ "success": null,
30
+ "timedOut": null,
31
+ "error": null,
32
+ "message": null,
33
+ "retryable": null,
34
+ } satisfies CommandStreamFrame
35
+
36
+ console.log(example)
37
+
38
+ // Convert the instance to a JSON string
39
+ const exampleJSON: string = JSON.stringify(example)
40
+ console.log(exampleJSON)
41
+
42
+ // Parse the JSON string back to an object
43
+ const exampleParsed = JSON.parse(exampleJSON) as CommandStreamFrame
44
+ console.log(exampleParsed)
45
+ ```
46
+
47
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
@@ -12,6 +12,8 @@ Name | Type
12
12
  `env` | { [key: string]: string; }
13
13
  `environment` | string
14
14
  `noEnv` | boolean
15
+ `snapshots` | boolean
16
+ `failFast` | boolean
15
17
  `setupScript` | string
16
18
  `org` | string
17
19
  `teamId` | string
@@ -29,6 +31,8 @@ const example = {
29
31
  "env": null,
30
32
  "environment": null,
31
33
  "noEnv": null,
34
+ "snapshots": null,
35
+ "failFast": null,
32
36
  "setupScript": null,
33
37
  "org": null,
34
38
  "teamId": null,
@@ -12,6 +12,8 @@ Name | Type
12
12
  `enabledAt` | Date
13
13
  `queuedSandboxes` | number
14
14
  `acceptedDeletionOperationsIrreversible` | boolean
15
+ `snapshotsOff` | boolean
16
+ `snapshotsOffAt` | Date
15
17
 
16
18
  ## Example
17
19
 
@@ -26,6 +28,8 @@ const example = {
26
28
  "enabledAt": null,
27
29
  "queuedSandboxes": null,
28
30
  "acceptedDeletionOperationsIrreversible": null,
31
+ "snapshotsOff": null,
32
+ "snapshotsOffAt": null,
29
33
  } satisfies DataRetentionPolicyResponse
30
34
 
31
35
  console.log(example)
@@ -1,12 +1,14 @@
1
1
 
2
2
  # DataRetentionUpdateRequest
3
3
 
4
+ Pass `enabled` to change zero data retention, or `snapshotsOff` alone to change the account\'s snapshots-off setting.
4
5
 
5
6
  ## Properties
6
7
 
7
8
  Name | Type
8
9
  ------------ | -------------
9
10
  `enabled` | boolean
11
+ `snapshotsOff` | boolean
10
12
  `confirmation` | string
11
13
 
12
14
  ## Example
@@ -17,6 +19,7 @@ import type { DataRetentionUpdateRequest } from '@boatdev/sdk'
17
19
  // TODO: Update the object below with actual values
18
20
  const example = {
19
21
  "enabled": null,
22
+ "snapshotsOff": null,
20
23
  "confirmation": null,
21
24
  } satisfies DataRetentionUpdateRequest
22
25
 
package/docs/Sandbox.md CHANGED
@@ -23,6 +23,7 @@ Name | Type
23
23
  `archiveAfter` | Date
24
24
  `desktopAvailable` | boolean
25
25
  `desktopUrl` | string
26
+ `snapshots` | boolean
26
27
  `snapshotAvailable` | boolean
27
28
  `snapshotCompletedAt` | Date
28
29
  `snapshotVerifiedAt` | Date
@@ -59,6 +60,7 @@ const example = {
59
60
  "archiveAfter": null,
60
61
  "desktopAvailable": null,
61
62
  "desktopUrl": null,
63
+ "snapshots": null,
62
64
  "snapshotAvailable": null,
63
65
  "snapshotCompletedAt": null,
64
66
  "snapshotVerifiedAt": null,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@boatdev/sdk",
3
- "version": "1.1.0",
3
+ "version": "1.3.0",
4
4
  "description": "OpenAPI client for @boatdev/sdk",
5
5
  "author": "OpenAPI-Generator",
6
6
  "license": "MIT",
@@ -63,6 +63,11 @@ import {
63
63
  CommandStatusResponseFromJSON,
64
64
  CommandStatusResponseToJSON,
65
65
  } from '../models/CommandStatusResponse';
66
+ import {
67
+ type CommandStreamFrame,
68
+ CommandStreamFrameFromJSON,
69
+ CommandStreamFrameToJSON,
70
+ } from '../models/CommandStreamFrame';
66
71
  import {
67
72
  type ConversationsResponse,
68
73
  ConversationsResponseFromJSON,
@@ -979,7 +984,7 @@ export class BoatApi extends runtime.BaseAPI {
979
984
  }
980
985
 
981
986
  /**
982
- * 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. Returns 400 invalid_timeout when `timeoutSeconds` is not an integer in 1-600. Returns 409 boat_starting (retryable) while the sandbox is still provisioning -- wait until the sandbox state is ready before running commands. 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. Command execution is never retried automatically: a 502 boat_direct_failed means the command may already be running on the sandbox.
983
988
  * Execute a command in a sandbox
984
989
  */
985
990
  async commandRaw(requestParameters: CommandOperationRequest | runtime.FlatBody<CommandOperationRequest, 'commandRequest'>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Command200Response>> {
@@ -990,7 +995,7 @@ export class BoatApi extends runtime.BaseAPI {
990
995
  }
991
996
 
992
997
  /**
993
- * 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. Returns 400 invalid_timeout when `timeoutSeconds` is not an integer in 1-600. Returns 409 boat_starting (retryable) while the sandbox is still provisioning -- wait until the sandbox state is ready before running commands. 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. Command execution is never retried automatically: a 502 boat_direct_failed means the command may already be running on the sandbox.
994
999
  * Execute a command in a sandbox
995
1000
  */
996
1001
  async command(requestParameters: CommandOperationRequest | runtime.FlatBody<CommandOperationRequest, 'commandRequest'>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Command200Response> {