@boatdev/sdk 1.9.2 → 1.9.3

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 (152) hide show
  1. package/.openapi-generator/FILES +28 -0
  2. package/dist/apis/BoatApi.d.ts +192 -4
  3. package/dist/apis/BoatApi.js +452 -5
  4. package/dist/esm/apis/BoatApi.d.ts +192 -4
  5. package/dist/esm/apis/BoatApi.js +451 -4
  6. package/dist/esm/models/CommandAttachFrame.d.ts +121 -0
  7. package/dist/esm/models/CommandAttachFrame.js +83 -0
  8. package/dist/esm/models/CommandInfoResponse.d.ts +52 -0
  9. package/dist/esm/models/CommandInfoResponse.js +58 -0
  10. package/dist/esm/models/CommandListResponse.d.ts +58 -0
  11. package/dist/esm/models/CommandListResponse.js +62 -0
  12. package/dist/esm/models/CommandLogsResponse.d.ts +109 -0
  13. package/dist/esm/models/CommandLogsResponse.js +99 -0
  14. package/dist/esm/models/CommandRecord.d.ts +132 -0
  15. package/dist/esm/models/CommandRecord.js +105 -0
  16. package/dist/esm/models/CommandResponse.d.ts +6 -0
  17. package/dist/esm/models/CommandResponse.js +2 -0
  18. package/dist/esm/models/CommandStartedResponse.d.ts +6 -0
  19. package/dist/esm/models/CommandStartedResponse.js +2 -0
  20. package/dist/esm/models/CommandStatusResponse.d.ts +32 -2
  21. package/dist/esm/models/CommandStatusResponse.js +10 -0
  22. package/dist/esm/models/CommandStopResponse.d.ts +70 -0
  23. package/dist/esm/models/CommandStopResponse.js +70 -0
  24. package/dist/esm/models/CommandStreamFrame.d.ts +6 -0
  25. package/dist/esm/models/CommandStreamFrame.js +2 -0
  26. package/dist/esm/models/CreateSandboxRequest.d.ts +6 -0
  27. package/dist/esm/models/CreateSandboxRequest.js +2 -0
  28. package/dist/esm/models/DataRetentionPolicyResponse.d.ts +12 -0
  29. package/dist/esm/models/DataRetentionPolicyResponse.js +4 -0
  30. package/dist/esm/models/DataRetentionUpdateRequest.d.ts +7 -1
  31. package/dist/esm/models/DataRetentionUpdateRequest.js +2 -0
  32. package/dist/esm/models/ForkRequest.d.ts +6 -0
  33. package/dist/esm/models/ForkRequest.js +2 -0
  34. package/dist/esm/models/ProcessListResponse.d.ts +70 -0
  35. package/dist/esm/models/ProcessListResponse.js +70 -0
  36. package/dist/esm/models/Sandbox.d.ts +6 -0
  37. package/dist/esm/models/Sandbox.js +2 -0
  38. package/dist/esm/models/SandboxProcess.d.ts +74 -0
  39. package/dist/esm/models/SandboxProcess.js +59 -0
  40. package/dist/esm/models/TelemetryConfig.d.ts +57 -0
  41. package/dist/esm/models/TelemetryConfig.js +60 -0
  42. package/dist/esm/models/TelemetryConfigLastError.d.ts +44 -0
  43. package/dist/esm/models/TelemetryConfigLastError.js +51 -0
  44. package/dist/esm/models/TelemetryResponse.d.ts +45 -0
  45. package/dist/esm/models/TelemetryResponse.js +52 -0
  46. package/dist/esm/models/TelemetrySetRequest.d.ts +40 -0
  47. package/dist/esm/models/TelemetrySetRequest.js +45 -0
  48. package/dist/esm/models/TelemetrySetResponse.d.ts +52 -0
  49. package/dist/esm/models/TelemetrySetResponse.js +57 -0
  50. package/dist/esm/models/TelemetryTestResult.d.ts +44 -0
  51. package/dist/esm/models/TelemetryTestResult.js +51 -0
  52. package/dist/esm/models/index.d.ts +14 -0
  53. package/dist/esm/models/index.js +14 -0
  54. package/dist/models/CommandAttachFrame.d.ts +121 -0
  55. package/dist/models/CommandAttachFrame.js +91 -0
  56. package/dist/models/CommandInfoResponse.d.ts +52 -0
  57. package/dist/models/CommandInfoResponse.js +66 -0
  58. package/dist/models/CommandListResponse.d.ts +58 -0
  59. package/dist/models/CommandListResponse.js +70 -0
  60. package/dist/models/CommandLogsResponse.d.ts +109 -0
  61. package/dist/models/CommandLogsResponse.js +107 -0
  62. package/dist/models/CommandRecord.d.ts +132 -0
  63. package/dist/models/CommandRecord.js +113 -0
  64. package/dist/models/CommandResponse.d.ts +6 -0
  65. package/dist/models/CommandResponse.js +2 -0
  66. package/dist/models/CommandStartedResponse.d.ts +6 -0
  67. package/dist/models/CommandStartedResponse.js +2 -0
  68. package/dist/models/CommandStatusResponse.d.ts +32 -2
  69. package/dist/models/CommandStatusResponse.js +10 -0
  70. package/dist/models/CommandStopResponse.d.ts +70 -0
  71. package/dist/models/CommandStopResponse.js +78 -0
  72. package/dist/models/CommandStreamFrame.d.ts +6 -0
  73. package/dist/models/CommandStreamFrame.js +2 -0
  74. package/dist/models/CreateSandboxRequest.d.ts +6 -0
  75. package/dist/models/CreateSandboxRequest.js +2 -0
  76. package/dist/models/DataRetentionPolicyResponse.d.ts +12 -0
  77. package/dist/models/DataRetentionPolicyResponse.js +4 -0
  78. package/dist/models/DataRetentionUpdateRequest.d.ts +7 -1
  79. package/dist/models/DataRetentionUpdateRequest.js +2 -0
  80. package/dist/models/ForkRequest.d.ts +6 -0
  81. package/dist/models/ForkRequest.js +2 -0
  82. package/dist/models/ProcessListResponse.d.ts +70 -0
  83. package/dist/models/ProcessListResponse.js +78 -0
  84. package/dist/models/Sandbox.d.ts +6 -0
  85. package/dist/models/Sandbox.js +2 -0
  86. package/dist/models/SandboxProcess.d.ts +74 -0
  87. package/dist/models/SandboxProcess.js +66 -0
  88. package/dist/models/TelemetryConfig.d.ts +57 -0
  89. package/dist/models/TelemetryConfig.js +67 -0
  90. package/dist/models/TelemetryConfigLastError.d.ts +44 -0
  91. package/dist/models/TelemetryConfigLastError.js +58 -0
  92. package/dist/models/TelemetryResponse.d.ts +45 -0
  93. package/dist/models/TelemetryResponse.js +59 -0
  94. package/dist/models/TelemetrySetRequest.d.ts +40 -0
  95. package/dist/models/TelemetrySetRequest.js +52 -0
  96. package/dist/models/TelemetrySetResponse.d.ts +52 -0
  97. package/dist/models/TelemetrySetResponse.js +64 -0
  98. package/dist/models/TelemetryTestResult.d.ts +44 -0
  99. package/dist/models/TelemetryTestResult.js +58 -0
  100. package/dist/models/index.d.ts +14 -0
  101. package/dist/models/index.js +14 -0
  102. package/docs/BoatApi.md +715 -11
  103. package/docs/Command200Response.md +2 -0
  104. package/docs/CommandAttachFrame.md +53 -0
  105. package/docs/CommandInfoResponse.md +36 -0
  106. package/docs/CommandListResponse.md +38 -0
  107. package/docs/CommandLogsResponse.md +50 -0
  108. package/docs/CommandRecord.md +59 -0
  109. package/docs/CommandResponse.md +2 -0
  110. package/docs/CommandStartedResponse.md +2 -0
  111. package/docs/CommandStatusResponse.md +10 -0
  112. package/docs/CommandStopResponse.md +42 -0
  113. package/docs/CommandStreamFrame.md +2 -0
  114. package/docs/CreateSandboxRequest.md +2 -0
  115. package/docs/DataRetentionPolicyResponse.md +4 -0
  116. package/docs/DataRetentionUpdateRequest.md +3 -1
  117. package/docs/ForkRequest.md +2 -0
  118. package/docs/ProcessListResponse.md +42 -0
  119. package/docs/Sandbox.md +2 -0
  120. package/docs/SandboxProcess.md +46 -0
  121. package/docs/TelemetryConfig.md +40 -0
  122. package/docs/TelemetryConfigLastError.md +37 -0
  123. package/docs/TelemetryResponse.md +36 -0
  124. package/docs/TelemetrySetRequest.md +34 -0
  125. package/docs/TelemetrySetResponse.md +38 -0
  126. package/docs/TelemetryTestResult.md +36 -0
  127. package/package.json +1 -1
  128. package/src/apis/BoatApi.ts +671 -4
  129. package/src/models/CommandAttachFrame.ts +179 -0
  130. package/src/models/CommandInfoResponse.ts +102 -0
  131. package/src/models/CommandListResponse.ts +111 -0
  132. package/src/models/CommandLogsResponse.ts +175 -0
  133. package/src/models/CommandRecord.ts +204 -0
  134. package/src/models/CommandResponse.ts +8 -0
  135. package/src/models/CommandStartedResponse.ts +8 -0
  136. package/src/models/CommandStatusResponse.ts +42 -2
  137. package/src/models/CommandStopResponse.ts +129 -0
  138. package/src/models/CommandStreamFrame.ts +8 -0
  139. package/src/models/CreateSandboxRequest.ts +8 -0
  140. package/src/models/DataRetentionPolicyResponse.ts +16 -0
  141. package/src/models/DataRetentionUpdateRequest.ts +9 -1
  142. package/src/models/ForkRequest.ts +8 -0
  143. package/src/models/ProcessListResponse.ts +129 -0
  144. package/src/models/Sandbox.ts +8 -0
  145. package/src/models/SandboxProcess.ts +123 -0
  146. package/src/models/TelemetryConfig.ts +110 -0
  147. package/src/models/TelemetryConfigLastError.ts +84 -0
  148. package/src/models/TelemetryResponse.ts +92 -0
  149. package/src/models/TelemetrySetRequest.ts +74 -0
  150. package/src/models/TelemetrySetResponse.ts +108 -0
  151. package/src/models/TelemetryTestResult.ts +84 -0
  152. package/src/models/index.ts +14 -0
@@ -0,0 +1,204 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Boat Public API v1
5
+ * 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.
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ /**
17
+ * One command run through the commands endpoint (kept 90 days), or one process of the sandbox with mode `process` (kept 72 hours). Readable while the sandbox is stopped.
18
+ * @export
19
+ * @interface CommandRecord
20
+ */
21
+ export interface CommandRecord {
22
+ /**
23
+ * Id of the record in the command history.
24
+ * @type {string}
25
+ * @memberof CommandRecord
26
+ */
27
+ commandId: string;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof CommandRecord
32
+ */
33
+ sandboxId: string;
34
+ /**
35
+ * The command text as sent (first 64 KiB).
36
+ * @type {string}
37
+ * @memberof CommandRecord
38
+ */
39
+ command: string;
40
+ /**
41
+ *
42
+ * @type {string}
43
+ * @memberof CommandRecord
44
+ */
45
+ cwd?: string | null;
46
+ /**
47
+ * sync: the request waited for the result. stream: the output was streamed. detached: started in the background. process: any other process of the sandbox, recorded from what it wrote to its stdout/stderr.
48
+ * @type {CommandRecordModeEnum}
49
+ * @memberof CommandRecord
50
+ */
51
+ mode: CommandRecordModeEnum;
52
+ /**
53
+ * detached: the process id on the sandbox.
54
+ * @type {number}
55
+ * @memberof CommandRecord
56
+ */
57
+ processId?: number | null;
58
+ /**
59
+ * failed: the command could not start or its result never arrived. killed: ended by a signal or by DELETE /commands/{processId}. lost: the sandbox stopped or its agent restarted while the command ran.
60
+ * @type {CommandRecordStatusEnum}
61
+ * @memberof CommandRecord
62
+ */
63
+ status: CommandRecordStatusEnum;
64
+ /**
65
+ *
66
+ * @type {number}
67
+ * @memberof CommandRecord
68
+ */
69
+ exitCode?: number | null;
70
+ /**
71
+ *
72
+ * @type {string}
73
+ * @memberof CommandRecord
74
+ */
75
+ signal?: string | null;
76
+ /**
77
+ * Bytes of stdout written so far.
78
+ * @type {number}
79
+ * @memberof CommandRecord
80
+ */
81
+ stdoutBytes: number;
82
+ /**
83
+ * Bytes of stderr written so far.
84
+ * @type {number}
85
+ * @memberof CommandRecord
86
+ */
87
+ stderrBytes: number;
88
+ /**
89
+ * True when part of the output is not kept: the sandbox cut the output of a waiting command at 8 MiB, or the account wrote more than 10 MiB (compressed) of command output, or of process output, in one hour.
90
+ * @type {boolean}
91
+ * @memberof CommandRecord
92
+ */
93
+ outputTruncated: boolean;
94
+ /**
95
+ *
96
+ * @type {Date}
97
+ * @memberof CommandRecord
98
+ */
99
+ startedAt: Date;
100
+ /**
101
+ *
102
+ * @type {Date}
103
+ * @memberof CommandRecord
104
+ */
105
+ finishedAt?: Date | null;
106
+ }
107
+
108
+
109
+ /**
110
+ * @export
111
+ */
112
+ export const CommandRecordModeEnum = {
113
+ Sync: 'sync',
114
+ Stream: 'stream',
115
+ Detached: 'detached',
116
+ Process: 'process'
117
+ } as const;
118
+ export type CommandRecordModeEnum = typeof CommandRecordModeEnum[keyof typeof CommandRecordModeEnum];
119
+
120
+ /**
121
+ * @export
122
+ */
123
+ export const CommandRecordStatusEnum = {
124
+ Running: 'running',
125
+ Exited: 'exited',
126
+ TimedOut: 'timed_out',
127
+ Failed: 'failed',
128
+ Killed: 'killed',
129
+ Lost: 'lost'
130
+ } as const;
131
+ export type CommandRecordStatusEnum = typeof CommandRecordStatusEnum[keyof typeof CommandRecordStatusEnum];
132
+
133
+
134
+ /**
135
+ * Check if a given object implements the CommandRecord interface.
136
+ */
137
+ export function instanceOfCommandRecord(value: object): value is CommandRecord {
138
+ if (!('commandId' in value) || value['commandId'] === undefined) return false;
139
+ if (!('sandboxId' in value) || value['sandboxId'] === undefined) return false;
140
+ if (!('command' in value) || value['command'] === undefined) return false;
141
+ if (!('mode' in value) || value['mode'] === undefined) return false;
142
+ if (!('status' in value) || value['status'] === undefined) return false;
143
+ if (!('stdoutBytes' in value) || value['stdoutBytes'] === undefined) return false;
144
+ if (!('stderrBytes' in value) || value['stderrBytes'] === undefined) return false;
145
+ if (!('outputTruncated' in value) || value['outputTruncated'] === undefined) return false;
146
+ if (!('startedAt' in value) || value['startedAt'] === undefined) return false;
147
+ return true;
148
+ }
149
+
150
+ export function CommandRecordFromJSON(json: any): CommandRecord {
151
+ return CommandRecordFromJSONTyped(json, false);
152
+ }
153
+
154
+ export function CommandRecordFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommandRecord {
155
+ if (json == null) {
156
+ return json;
157
+ }
158
+ return {
159
+
160
+ 'commandId': json['commandId'],
161
+ 'sandboxId': json['sandboxId'],
162
+ 'command': json['command'],
163
+ 'cwd': json['cwd'] == null ? undefined : json['cwd'],
164
+ 'mode': json['mode'],
165
+ 'processId': json['processId'] == null ? undefined : json['processId'],
166
+ 'status': json['status'],
167
+ 'exitCode': json['exitCode'] == null ? undefined : json['exitCode'],
168
+ 'signal': json['signal'] == null ? undefined : json['signal'],
169
+ 'stdoutBytes': json['stdoutBytes'],
170
+ 'stderrBytes': json['stderrBytes'],
171
+ 'outputTruncated': json['outputTruncated'],
172
+ 'startedAt': (new Date(json['startedAt'])),
173
+ 'finishedAt': json['finishedAt'] == null ? undefined : (new Date(json['finishedAt'])),
174
+ };
175
+ }
176
+
177
+ export function CommandRecordToJSON(json: any): CommandRecord {
178
+ return CommandRecordToJSONTyped(json, false);
179
+ }
180
+
181
+ export function CommandRecordToJSONTyped(value?: CommandRecord | null, ignoreDiscriminator: boolean = false): any {
182
+ if (value == null) {
183
+ return value;
184
+ }
185
+
186
+ return {
187
+
188
+ 'commandId': value['commandId'],
189
+ 'sandboxId': value['sandboxId'],
190
+ 'command': value['command'],
191
+ 'cwd': value['cwd'],
192
+ 'mode': value['mode'],
193
+ 'processId': value['processId'],
194
+ 'status': value['status'],
195
+ 'exitCode': value['exitCode'],
196
+ 'signal': value['signal'],
197
+ 'stdoutBytes': value['stdoutBytes'],
198
+ 'stderrBytes': value['stderrBytes'],
199
+ 'outputTruncated': value['outputTruncated'],
200
+ 'startedAt': value['startedAt'].toISOString(),
201
+ 'finishedAt': value['finishedAt'] == null ? value['finishedAt'] : value['finishedAt'].toISOString(),
202
+ };
203
+ }
204
+
@@ -37,6 +37,12 @@ export interface CommandResponse {
37
37
  * @memberof CommandResponse
38
38
  */
39
39
  success: boolean;
40
+ /**
41
+ * The command's record in the command history.
42
+ * @type {string}
43
+ * @memberof CommandResponse
44
+ */
45
+ commandId?: string;
40
46
  /**
41
47
  *
42
48
  * @type {number}
@@ -142,6 +148,7 @@ export function CommandResponseFromJSONTyped(json: any, ignoreDiscriminator: boo
142
148
  'ok': json['ok'],
143
149
  'type': json['type'],
144
150
  'success': json['success'],
151
+ 'commandId': json['commandId'] == null ? undefined : json['commandId'],
145
152
  'exitCode': json['exitCode'],
146
153
  'signal': json['signal'] == null ? undefined : json['signal'],
147
154
  'oomKilled': json['oomKilled'] == null ? undefined : json['oomKilled'],
@@ -170,6 +177,7 @@ export function CommandResponseToJSONTyped(value?: CommandResponse | null, ignor
170
177
  'ok': value['ok'],
171
178
  'type': value['type'],
172
179
  'success': value['success'],
180
+ 'commandId': value['commandId'],
173
181
  'exitCode': value['exitCode'],
174
182
  'signal': value['signal'],
175
183
  'oomKilled': value['oomKilled'],
@@ -37,6 +37,12 @@ export interface CommandStartedResponse {
37
37
  * @memberof CommandStartedResponse
38
38
  */
39
39
  success: boolean;
40
+ /**
41
+ * The command's record in the command history. Its output is copied there every 30 s.
42
+ * @type {string}
43
+ * @memberof CommandStartedResponse
44
+ */
45
+ commandId?: string;
40
46
  /**
41
47
  * Process id to poll with the command status endpoint.
42
48
  * @type {number}
@@ -118,6 +124,7 @@ export function CommandStartedResponseFromJSONTyped(json: any, ignoreDiscriminat
118
124
  'ok': json['ok'],
119
125
  'type': json['type'],
120
126
  'success': json['success'],
127
+ 'commandId': json['commandId'] == null ? undefined : json['commandId'],
121
128
  'processId': json['processId'],
122
129
  'pid': json['pid'],
123
130
  'command': json['command'],
@@ -142,6 +149,7 @@ export function CommandStartedResponseToJSONTyped(value?: CommandStartedResponse
142
149
  'ok': value['ok'],
143
150
  'type': value['type'],
144
151
  'success': value['success'],
152
+ 'commandId': value['commandId'],
145
153
  'processId': value['processId'],
146
154
  'pid': value['pid'],
147
155
  'command': value['command'],
@@ -110,13 +110,13 @@ export interface CommandStatusResponse {
110
110
  */
111
111
  finishedAt?: Date | null;
112
112
  /**
113
- * Tail of the stdout log file.
113
+ * Tail of the stdout log file. With `stdoutOffset`: the stdout written since that offset.
114
114
  * @type {string}
115
115
  * @memberof CommandStatusResponse
116
116
  */
117
117
  stdout: string;
118
118
  /**
119
- * Tail of the stderr log file.
119
+ * Tail of the stderr log file. With `stderrOffset`: the stderr written since that offset.
120
120
  * @type {string}
121
121
  * @memberof CommandStatusResponse
122
122
  */
@@ -145,6 +145,36 @@ export interface CommandStatusResponse {
145
145
  * @memberof CommandStatusResponse
146
146
  */
147
147
  errLogPath?: string;
148
+ /**
149
+ * Byte offset where `stdout` starts: the offset you asked for, or 0 when the log was replaced.
150
+ * @type {number}
151
+ * @memberof CommandStatusResponse
152
+ */
153
+ stdoutOffset?: number;
154
+ /**
155
+ * Byte offset where `stderr` starts: the offset you asked for, or 0 when the log was replaced.
156
+ * @type {number}
157
+ * @memberof CommandStatusResponse
158
+ */
159
+ stderrOffset?: number;
160
+ /**
161
+ * The `stdoutOffset` for the next read.
162
+ * @type {number}
163
+ * @memberof CommandStatusResponse
164
+ */
165
+ stdoutNextOffset?: number;
166
+ /**
167
+ * The `stderrOffset` for the next read.
168
+ * @type {number}
169
+ * @memberof CommandStatusResponse
170
+ */
171
+ stderrNextOffset?: number;
172
+ /**
173
+ * True when more output is already written. Read again at once.
174
+ * @type {boolean}
175
+ * @memberof CommandStatusResponse
176
+ */
177
+ more?: boolean;
148
178
  }
149
179
 
150
180
 
@@ -214,6 +244,11 @@ export function CommandStatusResponseFromJSONTyped(json: any, ignoreDiscriminato
214
244
  'stderrTruncated': json['stderrTruncated'] == null ? undefined : json['stderrTruncated'],
215
245
  'logPath': json['logPath'] == null ? undefined : json['logPath'],
216
246
  'errLogPath': json['errLogPath'] == null ? undefined : json['errLogPath'],
247
+ 'stdoutOffset': json['stdoutOffset'] == null ? undefined : json['stdoutOffset'],
248
+ 'stderrOffset': json['stderrOffset'] == null ? undefined : json['stderrOffset'],
249
+ 'stdoutNextOffset': json['stdoutNextOffset'] == null ? undefined : json['stdoutNextOffset'],
250
+ 'stderrNextOffset': json['stderrNextOffset'] == null ? undefined : json['stderrNextOffset'],
251
+ 'more': json['more'] == null ? undefined : json['more'],
217
252
  };
218
253
  }
219
254
 
@@ -249,6 +284,11 @@ export function CommandStatusResponseToJSONTyped(value?: CommandStatusResponse |
249
284
  'stderrTruncated': value['stderrTruncated'],
250
285
  'logPath': value['logPath'],
251
286
  'errLogPath': value['errLogPath'],
287
+ 'stdoutOffset': value['stdoutOffset'],
288
+ 'stderrOffset': value['stderrOffset'],
289
+ 'stdoutNextOffset': value['stdoutNextOffset'],
290
+ 'stderrNextOffset': value['stderrNextOffset'],
291
+ 'more': value['more'],
252
292
  };
253
293
  }
254
294
 
@@ -0,0 +1,129 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Boat Public API v1
5
+ * 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.
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ import type { CommandRecord } from './CommandRecord';
17
+ import {
18
+ CommandRecordFromJSON,
19
+ CommandRecordFromJSONTyped,
20
+ CommandRecordToJSON,
21
+ CommandRecordToJSONTyped,
22
+ } from './CommandRecord';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface CommandStopResponse
28
+ */
29
+ export interface CommandStopResponse {
30
+ /**
31
+ *
32
+ * @type {boolean}
33
+ * @memberof CommandStopResponse
34
+ */
35
+ ok: boolean;
36
+ /**
37
+ *
38
+ * @type {CommandStopResponseTypeEnum}
39
+ * @memberof CommandStopResponse
40
+ */
41
+ type: CommandStopResponseTypeEnum;
42
+ /**
43
+ *
44
+ * @type {number}
45
+ * @memberof CommandStopResponse
46
+ */
47
+ processId: number;
48
+ /**
49
+ * Always false after a stop.
50
+ * @type {boolean}
51
+ * @memberof CommandStopResponse
52
+ */
53
+ running: boolean;
54
+ /**
55
+ * False when the process had already ended.
56
+ * @type {boolean}
57
+ * @memberof CommandStopResponse
58
+ */
59
+ signaled: boolean;
60
+ /**
61
+ * The history record of the command, with its final state.
62
+ * @type {CommandRecord}
63
+ * @memberof CommandStopResponse
64
+ */
65
+ command: CommandRecord | null;
66
+ }
67
+
68
+
69
+ /**
70
+ * @export
71
+ */
72
+ export const CommandStopResponseTypeEnum = {
73
+ CommandStopped: 'command.stopped'
74
+ } as const;
75
+ export type CommandStopResponseTypeEnum = typeof CommandStopResponseTypeEnum[keyof typeof CommandStopResponseTypeEnum];
76
+
77
+
78
+ /**
79
+ * Check if a given object implements the CommandStopResponse interface.
80
+ */
81
+ export function instanceOfCommandStopResponse(value: object): value is CommandStopResponse {
82
+ if (!('ok' in value) || value['ok'] === undefined) return false;
83
+ if (!('type' in value) || value['type'] === undefined) return false;
84
+ if (!('processId' in value) || value['processId'] === undefined) return false;
85
+ if (!('running' in value) || value['running'] === undefined) return false;
86
+ if (!('signaled' in value) || value['signaled'] === undefined) return false;
87
+ if (!('command' in value) || value['command'] === undefined) return false;
88
+ return true;
89
+ }
90
+
91
+ export function CommandStopResponseFromJSON(json: any): CommandStopResponse {
92
+ return CommandStopResponseFromJSONTyped(json, false);
93
+ }
94
+
95
+ export function CommandStopResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommandStopResponse {
96
+ if (json == null) {
97
+ return json;
98
+ }
99
+ return {
100
+
101
+ 'ok': json['ok'],
102
+ 'type': json['type'],
103
+ 'processId': json['processId'],
104
+ 'running': json['running'],
105
+ 'signaled': json['signaled'],
106
+ 'command': CommandRecordFromJSON(json['command']),
107
+ };
108
+ }
109
+
110
+ export function CommandStopResponseToJSON(json: any): CommandStopResponse {
111
+ return CommandStopResponseToJSONTyped(json, false);
112
+ }
113
+
114
+ export function CommandStopResponseToJSONTyped(value?: CommandStopResponse | null, ignoreDiscriminator: boolean = false): any {
115
+ if (value == null) {
116
+ return value;
117
+ }
118
+
119
+ return {
120
+
121
+ 'ok': value['ok'],
122
+ 'type': value['type'],
123
+ 'processId': value['processId'],
124
+ 'running': value['running'],
125
+ 'signaled': value['signaled'],
126
+ 'command': CommandRecordToJSON(value['command']),
127
+ };
128
+ }
129
+
@@ -25,6 +25,12 @@ export interface CommandStreamFrame {
25
25
  * @memberof CommandStreamFrame
26
26
  */
27
27
  type: CommandStreamFrameTypeEnum;
28
+ /**
29
+ * started: the command's record in the command history.
30
+ * @type {string}
31
+ * @memberof CommandStreamFrame
32
+ */
33
+ commandId?: string;
28
34
  /**
29
35
  * stdout/stderr: the chunk of output, UTF-8.
30
36
  * @type {string}
@@ -102,6 +108,7 @@ export function CommandStreamFrameFromJSONTyped(json: any, ignoreDiscriminator:
102
108
  return {
103
109
 
104
110
  'type': json['type'],
111
+ 'commandId': json['commandId'] == null ? undefined : json['commandId'],
105
112
  'data': json['data'] == null ? undefined : json['data'],
106
113
  'exitCode': json['exitCode'] == null ? undefined : json['exitCode'],
107
114
  'success': json['success'] == null ? undefined : json['success'],
@@ -124,6 +131,7 @@ export function CommandStreamFrameToJSONTyped(value?: CommandStreamFrame | null,
124
131
  return {
125
132
 
126
133
  'type': value['type'],
134
+ 'commandId': value['commandId'],
127
135
  'data': value['data'],
128
136
  'exitCode': value['exitCode'],
129
137
  'success': value['success'],
@@ -55,6 +55,12 @@ export interface CreateSandboxRequest {
55
55
  * @memberof CreateSandboxRequest
56
56
  */
57
57
  snapshots?: boolean;
58
+ /**
59
+ * Pass `false` for monitoring off. Boat keeps no command or process output, process list or CPU/RAM samples for this sandbox, and its history, processes and metrics calls answer 409 `monitoring_off`. Live output of a running command still works. While the account default is on, `true` is refused with 409 `monitoring_off_for_account`.
60
+ * @type {boolean}
61
+ * @memberof CreateSandboxRequest
62
+ */
63
+ monitoring?: boolean;
58
64
  /**
59
65
  * 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
66
  * @type {boolean}
@@ -123,6 +129,7 @@ export function CreateSandboxRequestFromJSONTyped(json: any, ignoreDiscriminator
123
129
  'environment': json['environment'] == null ? undefined : json['environment'],
124
130
  'noEnv': json['noEnv'] == null ? undefined : json['noEnv'],
125
131
  'snapshots': json['snapshots'] == null ? undefined : json['snapshots'],
132
+ 'monitoring': json['monitoring'] == null ? undefined : json['monitoring'],
126
133
  'failFast': json['failFast'] == null ? undefined : json['failFast'],
127
134
  'setupScript': json['setupScript'] == null ? undefined : json['setupScript'],
128
135
  'org': json['org'] == null ? undefined : json['org'],
@@ -148,6 +155,7 @@ export function CreateSandboxRequestToJSONTyped(value?: CreateSandboxRequest | n
148
155
  'environment': value['environment'],
149
156
  'noEnv': value['noEnv'],
150
157
  'snapshots': value['snapshots'],
158
+ 'monitoring': value['monitoring'],
151
159
  'failFast': value['failFast'],
152
160
  'setupScript': value['setupScript'],
153
161
  'org': value['org'],
@@ -67,6 +67,18 @@ export interface DataRetentionPolicyResponse {
67
67
  * @memberof DataRetentionPolicyResponse
68
68
  */
69
69
  snapshotsOffAt?: Date | null;
70
+ /**
71
+ * When true, every new sandbox of this account is created with monitoring off.
72
+ * @type {boolean}
73
+ * @memberof DataRetentionPolicyResponse
74
+ */
75
+ monitoringOff?: boolean;
76
+ /**
77
+ *
78
+ * @type {Date}
79
+ * @memberof DataRetentionPolicyResponse
80
+ */
81
+ monitoringOffAt?: Date | null;
70
82
  }
71
83
 
72
84
 
@@ -109,6 +121,8 @@ export function DataRetentionPolicyResponseFromJSONTyped(json: any, ignoreDiscri
109
121
  'acceptedDeletionOperationsIrreversible': json['acceptedDeletionOperationsIrreversible'] == null ? undefined : json['acceptedDeletionOperationsIrreversible'],
110
122
  'snapshotsOff': json['snapshotsOff'] == null ? undefined : json['snapshotsOff'],
111
123
  'snapshotsOffAt': json['snapshotsOffAt'] == null ? undefined : (new Date(json['snapshotsOffAt'])),
124
+ 'monitoringOff': json['monitoringOff'] == null ? undefined : json['monitoringOff'],
125
+ 'monitoringOffAt': json['monitoringOffAt'] == null ? undefined : (new Date(json['monitoringOffAt'])),
112
126
  };
113
127
  }
114
128
 
@@ -131,6 +145,8 @@ export function DataRetentionPolicyResponseToJSONTyped(value?: DataRetentionPoli
131
145
  'acceptedDeletionOperationsIrreversible': value['acceptedDeletionOperationsIrreversible'],
132
146
  'snapshotsOff': value['snapshotsOff'],
133
147
  'snapshotsOffAt': value['snapshotsOffAt'] == null ? value['snapshotsOffAt'] : value['snapshotsOffAt'].toISOString(),
148
+ 'monitoringOff': value['monitoringOff'],
149
+ 'monitoringOffAt': value['monitoringOffAt'] == null ? value['monitoringOffAt'] : value['monitoringOffAt'].toISOString(),
134
150
  };
135
151
  }
136
152
 
@@ -14,7 +14,7 @@
14
14
 
15
15
  import { mapValues } from '../runtime';
16
16
  /**
17
- * Pass `enabled` to change zero data retention, or `snapshotsOff` alone to change the account's snapshots-off setting.
17
+ * Pass `enabled` to change zero data retention, or `snapshotsOff` or `monitoringOff` alone to change that account setting.
18
18
  * @export
19
19
  * @interface DataRetentionUpdateRequest
20
20
  */
@@ -31,6 +31,12 @@ export interface DataRetentionUpdateRequest {
31
31
  * @memberof DataRetentionUpdateRequest
32
32
  */
33
33
  snapshotsOff?: boolean;
34
+ /**
35
+ * Turn monitoring off for every sandbox created from now on. Existing sandboxes keep their setting. While on, a create or fork that passes `monitoring: true` is refused with 409 `monitoring_off_for_account`.
36
+ * @type {boolean}
37
+ * @memberof DataRetentionUpdateRequest
38
+ */
39
+ monitoringOff?: boolean;
34
40
  /**
35
41
  * Required when enabling and must exactly equal `delete archived sandbox data`.
36
42
  * @type {DataRetentionUpdateRequestConfirmationEnum}
@@ -68,6 +74,7 @@ export function DataRetentionUpdateRequestFromJSONTyped(json: any, ignoreDiscrim
68
74
 
69
75
  'enabled': json['enabled'] == null ? undefined : json['enabled'],
70
76
  'snapshotsOff': json['snapshotsOff'] == null ? undefined : json['snapshotsOff'],
77
+ 'monitoringOff': json['monitoringOff'] == null ? undefined : json['monitoringOff'],
71
78
  'confirmation': json['confirmation'] == null ? undefined : json['confirmation'],
72
79
  };
73
80
  }
@@ -85,6 +92,7 @@ export function DataRetentionUpdateRequestToJSONTyped(value?: DataRetentionUpdat
85
92
 
86
93
  'enabled': value['enabled'],
87
94
  'snapshotsOff': value['snapshotsOff'],
95
+ 'monitoringOff': value['monitoringOff'],
88
96
  'confirmation': value['confirmation'],
89
97
  };
90
98
  }
@@ -25,6 +25,12 @@ export interface ForkRequest {
25
25
  * @memberof ForkRequest
26
26
  */
27
27
  failFast?: boolean;
28
+ /**
29
+ * `false` creates the fork with monitoring off: Boat keeps no command or process output, process list or CPU/RAM samples for it. Omitted, the fork keeps the source sandbox's setting. `true` turns it on for the fork, unless the account has monitoring off by default (`409` `monitoring_off_for_account`).
30
+ * @type {boolean}
31
+ * @memberof ForkRequest
32
+ */
33
+ monitoring?: boolean;
28
34
  /**
29
35
  * Replaces the env the fork would otherwise inherit from the source sandbox. Same validation rules as `CreateSandboxRequest.env`.
30
36
  * @type {{ [key: string]: string; }}
@@ -88,6 +94,7 @@ export function ForkRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean
88
94
  return {
89
95
 
90
96
  'failFast': json['failFast'] == null ? undefined : json['failFast'],
97
+ 'monitoring': json['monitoring'] == null ? undefined : json['monitoring'],
91
98
  'env': json['env'] == null ? undefined : json['env'],
92
99
  'environment': json['environment'] == null ? undefined : json['environment'],
93
100
  'noEnv': json['noEnv'] == null ? undefined : json['noEnv'],
@@ -108,6 +115,7 @@ export function ForkRequestToJSONTyped(value?: ForkRequest | null, ignoreDiscrim
108
115
  return {
109
116
 
110
117
  'failFast': value['failFast'],
118
+ 'monitoring': value['monitoring'],
111
119
  'env': value['env'],
112
120
  'environment': value['environment'],
113
121
  'noEnv': value['noEnv'],