@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
@@ -53,6 +53,26 @@ import {
53
53
  Command200ResponseFromJSON,
54
54
  Command200ResponseToJSON,
55
55
  } from '../models/Command200Response';
56
+ import {
57
+ type CommandAttachFrame,
58
+ CommandAttachFrameFromJSON,
59
+ CommandAttachFrameToJSON,
60
+ } from '../models/CommandAttachFrame';
61
+ import {
62
+ type CommandInfoResponse,
63
+ CommandInfoResponseFromJSON,
64
+ CommandInfoResponseToJSON,
65
+ } from '../models/CommandInfoResponse';
66
+ import {
67
+ type CommandListResponse,
68
+ CommandListResponseFromJSON,
69
+ CommandListResponseToJSON,
70
+ } from '../models/CommandListResponse';
71
+ import {
72
+ type CommandLogsResponse,
73
+ CommandLogsResponseFromJSON,
74
+ CommandLogsResponseToJSON,
75
+ } from '../models/CommandLogsResponse';
56
76
  import {
57
77
  type CommandRequest,
58
78
  CommandRequestFromJSON,
@@ -63,6 +83,11 @@ import {
63
83
  CommandStatusResponseFromJSON,
64
84
  CommandStatusResponseToJSON,
65
85
  } from '../models/CommandStatusResponse';
86
+ import {
87
+ type CommandStopResponse,
88
+ CommandStopResponseFromJSON,
89
+ CommandStopResponseToJSON,
90
+ } from '../models/CommandStopResponse';
66
91
  import {
67
92
  type CommandStreamFrame,
68
93
  CommandStreamFrameFromJSON,
@@ -228,6 +253,11 @@ import {
228
253
  OrgListResponseFromJSON,
229
254
  OrgListResponseToJSON,
230
255
  } from '../models/OrgListResponse';
256
+ import {
257
+ type ProcessListResponse,
258
+ ProcessListResponseFromJSON,
259
+ ProcessListResponseToJSON,
260
+ } from '../models/ProcessListResponse';
231
261
  import {
232
262
  type PromptRequest,
233
263
  PromptRequestFromJSON,
@@ -378,6 +408,21 @@ import {
378
408
  StopRequestFromJSON,
379
409
  StopRequestToJSON,
380
410
  } from '../models/StopRequest';
411
+ import {
412
+ type TelemetryResponse,
413
+ TelemetryResponseFromJSON,
414
+ TelemetryResponseToJSON,
415
+ } from '../models/TelemetryResponse';
416
+ import {
417
+ type TelemetrySetRequest,
418
+ TelemetrySetRequestFromJSON,
419
+ TelemetrySetRequestToJSON,
420
+ } from '../models/TelemetrySetRequest';
421
+ import {
422
+ type TelemetrySetResponse,
423
+ TelemetrySetResponseFromJSON,
424
+ TelemetrySetResponseToJSON,
425
+ } from '../models/TelemetrySetResponse';
381
426
  import {
382
427
  type UpdateSandboxEnvironmentRequest,
383
428
  UpdateSandboxEnvironmentRequestFromJSON,
@@ -443,15 +488,41 @@ export interface ArtifactRequest {
443
488
  path: string;
444
489
  }
445
490
 
491
+ export interface AttachCommandRequest {
492
+ sandboxId: string;
493
+ processId: number;
494
+ stdoutOffset?: number;
495
+ stderrOffset?: number;
496
+ }
497
+
446
498
  export interface CommandOperationRequest {
447
499
  sandboxId: string;
448
500
  commandRequest: CommandRequest;
449
501
  }
450
502
 
503
+ export interface CommandHistoryRequest {
504
+ sandboxId: string;
505
+ mode?: string;
506
+ q?: string;
507
+ limit?: number;
508
+ cursor?: string;
509
+ }
510
+
511
+ export interface CommandLogsRequest {
512
+ sandboxId: string;
513
+ commandId: string;
514
+ stream?: CommandLogsStreamEnum;
515
+ offset?: number;
516
+ limit?: number;
517
+ encoding?: CommandLogsEncodingEnum;
518
+ }
519
+
451
520
  export interface CommandStatusRequest {
452
521
  sandboxId: string;
453
522
  processId: number;
454
523
  tailBytes?: number;
524
+ stdoutOffset?: number;
525
+ stderrOffset?: number;
455
526
  }
456
527
 
457
528
  export interface ConversationsRequest {
@@ -549,6 +620,11 @@ export interface GetRequest {
549
620
  sandboxId: string;
550
621
  }
551
622
 
623
+ export interface GetCommandRequest {
624
+ sandboxId: string;
625
+ commandId: string;
626
+ }
627
+
552
628
  export interface GetDeletionOperationRequest {
553
629
  operationId: string;
554
630
  }
@@ -616,6 +692,10 @@ export interface ListSnapshotsRequest {
616
692
  sort?: ListSnapshotsSortEnum;
617
693
  }
618
694
 
695
+ export interface ProcessesRequest {
696
+ sandboxId: string;
697
+ }
698
+
619
699
  export interface PromptOperationRequest {
620
700
  sandboxId: string;
621
701
  promptRequest: PromptRequest;
@@ -699,6 +779,10 @@ export interface SetEnvironmentVarOperationRequest {
699
779
  setEnvironmentVarRequest: SetEnvironmentVarRequest;
700
780
  }
701
781
 
782
+ export interface SetTelemetryRequest {
783
+ telemetrySetRequest: TelemetrySetRequest;
784
+ }
785
+
702
786
  export interface ShareRequest {
703
787
  sandboxId: string;
704
788
  }
@@ -719,6 +803,11 @@ export interface StopOperationRequest {
719
803
  stopRequest?: StopRequest;
720
804
  }
721
805
 
806
+ export interface StopCommandRequest {
807
+ sandboxId: string;
808
+ processId: number;
809
+ }
810
+
722
811
  export interface UpdateRequest {
723
812
  sandboxId: string;
724
813
  updateSandboxRequest: UpdateSandboxRequest;
@@ -997,6 +1086,77 @@ export class BoatApi extends runtime.BaseAPI {
997
1086
  return await response.value();
998
1087
  }
999
1088
 
1089
+ /**
1090
+ * Creates request options for attachCommand without sending the request
1091
+ */
1092
+ async attachCommandRequestOpts(requestParameters: AttachCommandRequest): Promise<runtime.RequestOpts> {
1093
+ if (requestParameters['sandboxId'] == null) {
1094
+ throw new runtime.RequiredError(
1095
+ 'sandboxId',
1096
+ 'Required parameter "sandboxId" was null or undefined when calling attachCommand().'
1097
+ );
1098
+ }
1099
+
1100
+ if (requestParameters['processId'] == null) {
1101
+ throw new runtime.RequiredError(
1102
+ 'processId',
1103
+ 'Required parameter "processId" was null or undefined when calling attachCommand().'
1104
+ );
1105
+ }
1106
+
1107
+ const queryParameters: any = {};
1108
+
1109
+ if (requestParameters['stdoutOffset'] != null) {
1110
+ queryParameters['stdoutOffset'] = requestParameters['stdoutOffset'];
1111
+ }
1112
+
1113
+ if (requestParameters['stderrOffset'] != null) {
1114
+ queryParameters['stderrOffset'] = requestParameters['stderrOffset'];
1115
+ }
1116
+
1117
+ const headerParameters: runtime.HTTPHeaders = {};
1118
+
1119
+ if (this.configuration && this.configuration.accessToken) {
1120
+ const token = this.configuration.accessToken;
1121
+ const tokenString = await token("BoatBearerAuth", []);
1122
+
1123
+ if (tokenString) {
1124
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1125
+ }
1126
+ }
1127
+
1128
+ let urlPath = `/sandboxes/{sandboxId}/commands/{processId}/stream`;
1129
+ urlPath = urlPath.replace('{sandboxId}', encodeURIComponent(String(requestParameters['sandboxId'])));
1130
+ urlPath = urlPath.replace('{processId}', encodeURIComponent(String(requestParameters['processId'])));
1131
+
1132
+ return {
1133
+ path: urlPath,
1134
+ method: 'GET',
1135
+ headers: headerParameters,
1136
+ query: queryParameters,
1137
+ };
1138
+ }
1139
+
1140
+ /**
1141
+ * The output of a detached command as it is written, one JSON object per line, until the command ends. After 10 minutes the stream ends with a `reconnect` line: open it again with its offsets to continue with no gap. One open stream replaces polling. Needs the `exec` key scope.
1142
+ * Attach to a detached command
1143
+ */
1144
+ async attachCommandRaw(requestParameters: AttachCommandRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CommandAttachFrame>> {
1145
+ const requestOptions = await this.attachCommandRequestOpts(requestParameters);
1146
+ const response = await this.request(requestOptions, initOverrides);
1147
+
1148
+ return new runtime.JSONApiResponse(response, (jsonValue) => CommandAttachFrameFromJSON(jsonValue));
1149
+ }
1150
+
1151
+ /**
1152
+ * The output of a detached command as it is written, one JSON object per line, until the command ends. After 10 minutes the stream ends with a `reconnect` line: open it again with its offsets to continue with no gap. One open stream replaces polling. Needs the `exec` key scope.
1153
+ * Attach to a detached command
1154
+ */
1155
+ async attachCommand(requestParameters: AttachCommandRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CommandAttachFrame> {
1156
+ const response = await this.attachCommandRaw(requestParameters, initOverrides);
1157
+ return await response.value();
1158
+ }
1159
+
1000
1160
  /**
1001
1161
  * Creates request options for command without sending the request
1002
1162
  */
@@ -1044,7 +1204,7 @@ export class BoatApi extends runtime.BaseAPI {
1044
1204
  }
1045
1205
 
1046
1206
  /**
1047
- * 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.
1207
+ * 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. Every command and its output are kept 90 days in the command history (`/sandboxes/{sandboxId}/command-history`), readable while the sandbox is stopped.
1048
1208
  * Execute a command in a sandbox
1049
1209
  */
1050
1210
  async commandRaw(requestParameters: CommandOperationRequest | runtime.FlatBody<CommandOperationRequest, 'commandRequest'>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Command200Response>> {
@@ -1055,7 +1215,7 @@ export class BoatApi extends runtime.BaseAPI {
1055
1215
  }
1056
1216
 
1057
1217
  /**
1058
- * 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.
1218
+ * 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. Every command and its output are kept 90 days in the command history (`/sandboxes/{sandboxId}/command-history`), readable while the sandbox is stopped.
1059
1219
  * Execute a command in a sandbox
1060
1220
  */
1061
1221
  async command(requestParameters: CommandOperationRequest | runtime.FlatBody<CommandOperationRequest, 'commandRequest'>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Command200Response> {
@@ -1063,6 +1223,156 @@ export class BoatApi extends runtime.BaseAPI {
1063
1223
  return await response.value();
1064
1224
  }
1065
1225
 
1226
+ /**
1227
+ * Creates request options for commandHistory without sending the request
1228
+ */
1229
+ async commandHistoryRequestOpts(requestParameters: CommandHistoryRequest): Promise<runtime.RequestOpts> {
1230
+ if (requestParameters['sandboxId'] == null) {
1231
+ throw new runtime.RequiredError(
1232
+ 'sandboxId',
1233
+ 'Required parameter "sandboxId" was null or undefined when calling commandHistory().'
1234
+ );
1235
+ }
1236
+
1237
+ const queryParameters: any = {};
1238
+
1239
+ if (requestParameters['mode'] != null) {
1240
+ queryParameters['mode'] = requestParameters['mode'];
1241
+ }
1242
+
1243
+ if (requestParameters['q'] != null) {
1244
+ queryParameters['q'] = requestParameters['q'];
1245
+ }
1246
+
1247
+ if (requestParameters['limit'] != null) {
1248
+ queryParameters['limit'] = requestParameters['limit'];
1249
+ }
1250
+
1251
+ if (requestParameters['cursor'] != null) {
1252
+ queryParameters['cursor'] = requestParameters['cursor'];
1253
+ }
1254
+
1255
+ const headerParameters: runtime.HTTPHeaders = {};
1256
+
1257
+ if (this.configuration && this.configuration.accessToken) {
1258
+ const token = this.configuration.accessToken;
1259
+ const tokenString = await token("BoatBearerAuth", []);
1260
+
1261
+ if (tokenString) {
1262
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1263
+ }
1264
+ }
1265
+
1266
+ let urlPath = `/sandboxes/{sandboxId}/command-history`;
1267
+ urlPath = urlPath.replace('{sandboxId}', encodeURIComponent(String(requestParameters['sandboxId'])));
1268
+
1269
+ return {
1270
+ path: urlPath,
1271
+ method: 'GET',
1272
+ headers: headerParameters,
1273
+ query: queryParameters,
1274
+ };
1275
+ }
1276
+
1277
+ /**
1278
+ * Every command run through `POST /sandboxes/{sandboxId}/commands` in the last 90 days, and every other process that wrote to its stdout/stderr in the last 72 hours (mode `process`), newest first. Works while the sandbox is stopped.
1279
+ * List the command and process history
1280
+ */
1281
+ async commandHistoryRaw(requestParameters: CommandHistoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CommandListResponse>> {
1282
+ const requestOptions = await this.commandHistoryRequestOpts(requestParameters);
1283
+ const response = await this.request(requestOptions, initOverrides);
1284
+
1285
+ return new runtime.JSONApiResponse(response, (jsonValue) => CommandListResponseFromJSON(jsonValue));
1286
+ }
1287
+
1288
+ /**
1289
+ * Every command run through `POST /sandboxes/{sandboxId}/commands` in the last 90 days, and every other process that wrote to its stdout/stderr in the last 72 hours (mode `process`), newest first. Works while the sandbox is stopped.
1290
+ * List the command and process history
1291
+ */
1292
+ async commandHistory(requestParameters: CommandHistoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CommandListResponse> {
1293
+ const response = await this.commandHistoryRaw(requestParameters, initOverrides);
1294
+ return await response.value();
1295
+ }
1296
+
1297
+ /**
1298
+ * Creates request options for commandLogs without sending the request
1299
+ */
1300
+ async commandLogsRequestOpts(requestParameters: CommandLogsRequest): Promise<runtime.RequestOpts> {
1301
+ if (requestParameters['sandboxId'] == null) {
1302
+ throw new runtime.RequiredError(
1303
+ 'sandboxId',
1304
+ 'Required parameter "sandboxId" was null or undefined when calling commandLogs().'
1305
+ );
1306
+ }
1307
+
1308
+ if (requestParameters['commandId'] == null) {
1309
+ throw new runtime.RequiredError(
1310
+ 'commandId',
1311
+ 'Required parameter "commandId" was null or undefined when calling commandLogs().'
1312
+ );
1313
+ }
1314
+
1315
+ const queryParameters: any = {};
1316
+
1317
+ if (requestParameters['stream'] != null) {
1318
+ queryParameters['stream'] = requestParameters['stream'];
1319
+ }
1320
+
1321
+ if (requestParameters['offset'] != null) {
1322
+ queryParameters['offset'] = requestParameters['offset'];
1323
+ }
1324
+
1325
+ if (requestParameters['limit'] != null) {
1326
+ queryParameters['limit'] = requestParameters['limit'];
1327
+ }
1328
+
1329
+ if (requestParameters['encoding'] != null) {
1330
+ queryParameters['encoding'] = requestParameters['encoding'];
1331
+ }
1332
+
1333
+ const headerParameters: runtime.HTTPHeaders = {};
1334
+
1335
+ if (this.configuration && this.configuration.accessToken) {
1336
+ const token = this.configuration.accessToken;
1337
+ const tokenString = await token("BoatBearerAuth", []);
1338
+
1339
+ if (tokenString) {
1340
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1341
+ }
1342
+ }
1343
+
1344
+ let urlPath = `/sandboxes/{sandboxId}/command-history/{commandId}/logs`;
1345
+ urlPath = urlPath.replace('{sandboxId}', encodeURIComponent(String(requestParameters['sandboxId'])));
1346
+ urlPath = urlPath.replace('{commandId}', encodeURIComponent(String(requestParameters['commandId'])));
1347
+
1348
+ return {
1349
+ path: urlPath,
1350
+ method: 'GET',
1351
+ headers: headerParameters,
1352
+ query: queryParameters,
1353
+ };
1354
+ }
1355
+
1356
+ /**
1357
+ * Reads stdout or stderr from a byte offset, at most 1 MiB per call. Read on with `nextOffset` until `done`. A running detached command gains output every 30 s; a streamed one every 2 s. Works while the sandbox is stopped.
1358
+ * Read a command\'s stored output
1359
+ */
1360
+ async commandLogsRaw(requestParameters: CommandLogsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CommandLogsResponse>> {
1361
+ const requestOptions = await this.commandLogsRequestOpts(requestParameters);
1362
+ const response = await this.request(requestOptions, initOverrides);
1363
+
1364
+ return new runtime.JSONApiResponse(response, (jsonValue) => CommandLogsResponseFromJSON(jsonValue));
1365
+ }
1366
+
1367
+ /**
1368
+ * Reads stdout or stderr from a byte offset, at most 1 MiB per call. Read on with `nextOffset` until `done`. A running detached command gains output every 30 s; a streamed one every 2 s. Works while the sandbox is stopped.
1369
+ * Read a command\'s stored output
1370
+ */
1371
+ async commandLogs(requestParameters: CommandLogsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CommandLogsResponse> {
1372
+ const response = await this.commandLogsRaw(requestParameters, initOverrides);
1373
+ return await response.value();
1374
+ }
1375
+
1066
1376
  /**
1067
1377
  * Creates request options for commandStatus without sending the request
1068
1378
  */
@@ -1087,6 +1397,14 @@ export class BoatApi extends runtime.BaseAPI {
1087
1397
  queryParameters['tailBytes'] = requestParameters['tailBytes'];
1088
1398
  }
1089
1399
 
1400
+ if (requestParameters['stdoutOffset'] != null) {
1401
+ queryParameters['stdoutOffset'] = requestParameters['stdoutOffset'];
1402
+ }
1403
+
1404
+ if (requestParameters['stderrOffset'] != null) {
1405
+ queryParameters['stderrOffset'] = requestParameters['stderrOffset'];
1406
+ }
1407
+
1090
1408
  const headerParameters: runtime.HTTPHeaders = {};
1091
1409
 
1092
1410
  if (this.configuration && this.configuration.accessToken) {
@@ -1111,6 +1429,7 @@ export class BoatApi extends runtime.BaseAPI {
1111
1429
  }
1112
1430
 
1113
1431
  /**
1432
+ * Without offsets, the answer holds the end of each log. With `stdoutOffset` or `stderrOffset`, it holds only the output written since those byte offsets, so each poll returns only new output. A sandbox agent too old for offsets answers 409 `agent_outdated`.
1114
1433
  * Get detached command status and logs
1115
1434
  */
1116
1435
  async commandStatusRaw(requestParameters: CommandStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CommandStatusResponse>> {
@@ -1121,6 +1440,7 @@ export class BoatApi extends runtime.BaseAPI {
1121
1440
  }
1122
1441
 
1123
1442
  /**
1443
+ * Without offsets, the answer holds the end of each log. With `stdoutOffset` or `stderrOffset`, it holds only the output written since those byte offsets, so each poll returns only new output. A sandbox agent too old for offsets answers 409 `agent_outdated`.
1124
1444
  * Get detached command status and logs
1125
1445
  */
1126
1446
  async commandStatus(requestParameters: CommandStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CommandStatusResponse> {
@@ -1975,6 +2295,53 @@ export class BoatApi extends runtime.BaseAPI {
1975
2295
  return await response.value();
1976
2296
  }
1977
2297
 
2298
+ /**
2299
+ * Creates request options for deleteTelemetry without sending the request
2300
+ */
2301
+ async deleteTelemetryRequestOpts(): Promise<runtime.RequestOpts> {
2302
+ const queryParameters: any = {};
2303
+
2304
+ const headerParameters: runtime.HTTPHeaders = {};
2305
+
2306
+ if (this.configuration && this.configuration.accessToken) {
2307
+ const token = this.configuration.accessToken;
2308
+ const tokenString = await token("BoatBearerAuth", []);
2309
+
2310
+ if (tokenString) {
2311
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
2312
+ }
2313
+ }
2314
+
2315
+ let urlPath = `/telemetry`;
2316
+
2317
+ return {
2318
+ path: urlPath,
2319
+ method: 'DELETE',
2320
+ headers: headerParameters,
2321
+ query: queryParameters,
2322
+ };
2323
+ }
2324
+
2325
+ /**
2326
+ * Removes the export and its queued deliveries. Needs an API key with `account.admin`.
2327
+ * Remove OpenTelemetry export
2328
+ */
2329
+ async deleteTelemetryRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TelemetryResponse>> {
2330
+ const requestOptions = await this.deleteTelemetryRequestOpts();
2331
+ const response = await this.request(requestOptions, initOverrides);
2332
+
2333
+ return new runtime.JSONApiResponse(response, (jsonValue) => TelemetryResponseFromJSON(jsonValue));
2334
+ }
2335
+
2336
+ /**
2337
+ * Removes the export and its queued deliveries. Needs an API key with `account.admin`.
2338
+ * Remove OpenTelemetry export
2339
+ */
2340
+ async deleteTelemetry(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TelemetryResponse> {
2341
+ const response = await this.deleteTelemetryRaw(initOverrides);
2342
+ return await response.value();
2343
+ }
2344
+
1978
2345
  /**
1979
2346
  * Creates request options for deleteWebhook without sending the request
1980
2347
  */
@@ -2337,6 +2704,67 @@ export class BoatApi extends runtime.BaseAPI {
2337
2704
  return await response.value();
2338
2705
  }
2339
2706
 
2707
+ /**
2708
+ * Creates request options for getCommand without sending the request
2709
+ */
2710
+ async getCommandRequestOpts(requestParameters: GetCommandRequest): Promise<runtime.RequestOpts> {
2711
+ if (requestParameters['sandboxId'] == null) {
2712
+ throw new runtime.RequiredError(
2713
+ 'sandboxId',
2714
+ 'Required parameter "sandboxId" was null or undefined when calling getCommand().'
2715
+ );
2716
+ }
2717
+
2718
+ if (requestParameters['commandId'] == null) {
2719
+ throw new runtime.RequiredError(
2720
+ 'commandId',
2721
+ 'Required parameter "commandId" was null or undefined when calling getCommand().'
2722
+ );
2723
+ }
2724
+
2725
+ const queryParameters: any = {};
2726
+
2727
+ const headerParameters: runtime.HTTPHeaders = {};
2728
+
2729
+ if (this.configuration && this.configuration.accessToken) {
2730
+ const token = this.configuration.accessToken;
2731
+ const tokenString = await token("BoatBearerAuth", []);
2732
+
2733
+ if (tokenString) {
2734
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
2735
+ }
2736
+ }
2737
+
2738
+ let urlPath = `/sandboxes/{sandboxId}/command-history/{commandId}`;
2739
+ urlPath = urlPath.replace('{sandboxId}', encodeURIComponent(String(requestParameters['sandboxId'])));
2740
+ urlPath = urlPath.replace('{commandId}', encodeURIComponent(String(requestParameters['commandId'])));
2741
+
2742
+ return {
2743
+ path: urlPath,
2744
+ method: 'GET',
2745
+ headers: headerParameters,
2746
+ query: queryParameters,
2747
+ };
2748
+ }
2749
+
2750
+ /**
2751
+ * Get one command from the history
2752
+ */
2753
+ async getCommandRaw(requestParameters: GetCommandRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CommandInfoResponse>> {
2754
+ const requestOptions = await this.getCommandRequestOpts(requestParameters);
2755
+ const response = await this.request(requestOptions, initOverrides);
2756
+
2757
+ return new runtime.JSONApiResponse(response, (jsonValue) => CommandInfoResponseFromJSON(jsonValue));
2758
+ }
2759
+
2760
+ /**
2761
+ * Get one command from the history
2762
+ */
2763
+ async getCommand(requestParameters: GetCommandRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CommandInfoResponse> {
2764
+ const response = await this.getCommandRaw(requestParameters, initOverrides);
2765
+ return await response.value();
2766
+ }
2767
+
2340
2768
  /**
2341
2769
  * Creates request options for getDataRetention without sending the request
2342
2770
  */
@@ -2642,7 +3070,7 @@ export class BoatApi extends runtime.BaseAPI {
2642
3070
  }
2643
3071
 
2644
3072
  /**
2645
- * Stream a single file\'s bytes, or a folder subtree as a tar archive, directly out of a snapshot, the sandbox can be stopped or archived; the machine is never contacted. Use `GET /snapshots/{snapshotId}/tree` to list paths, then pass one here. Paths are relative to the snapshot root (same space as `tree` entries; docker volumes under `__dockervol__/`). An empty or `/` path downloads the whole snapshot as a tar. Folder responses set `X-Snapshot-File-Count`, `X-Snapshot-Total-Size-Bytes` and `X-Snapshot-Skipped-Base-Image-Files` headers; both response shapes set `X-Snapshot-Entry-Kind` (`file` or `dir`).
3073
+ * Stream a single file\'s bytes, or a folder subtree as a tar archive, directly out of a snapshot, the sandbox can be stopped or archived; the machine is never contacted. Use `GET /snapshots/{snapshotId}/tree` to list paths, then pass one here. Paths are relative to the snapshot root (same space as `tree` entries; docker volumes under `__dockervol__/`). An empty or `/` path downloads the whole snapshot as a tar. Folder responses set `X-Snapshot-File-Count`, `X-Snapshot-Total-Size-Bytes` and `X-Snapshot-Skipped-Base-Image-Files` headers; both response shapes set `X-Snapshot-Entry-Kind` (`file` or `dir`). File responses accept a single `Range: bytes=` header and answer 206 with `Content-Range`, so large files can be downloaded in parts and resumed.
2646
3074
  * Download a file or folder from a snapshot
2647
3075
  */
2648
3076
  async getSnapshotFileRaw(requestParameters: GetSnapshotFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Blob>> {
@@ -2653,7 +3081,7 @@ export class BoatApi extends runtime.BaseAPI {
2653
3081
  }
2654
3082
 
2655
3083
  /**
2656
- * Stream a single file\'s bytes, or a folder subtree as a tar archive, directly out of a snapshot, the sandbox can be stopped or archived; the machine is never contacted. Use `GET /snapshots/{snapshotId}/tree` to list paths, then pass one here. Paths are relative to the snapshot root (same space as `tree` entries; docker volumes under `__dockervol__/`). An empty or `/` path downloads the whole snapshot as a tar. Folder responses set `X-Snapshot-File-Count`, `X-Snapshot-Total-Size-Bytes` and `X-Snapshot-Skipped-Base-Image-Files` headers; both response shapes set `X-Snapshot-Entry-Kind` (`file` or `dir`).
3084
+ * Stream a single file\'s bytes, or a folder subtree as a tar archive, directly out of a snapshot, the sandbox can be stopped or archived; the machine is never contacted. Use `GET /snapshots/{snapshotId}/tree` to list paths, then pass one here. Paths are relative to the snapshot root (same space as `tree` entries; docker volumes under `__dockervol__/`). An empty or `/` path downloads the whole snapshot as a tar. Folder responses set `X-Snapshot-File-Count`, `X-Snapshot-Total-Size-Bytes` and `X-Snapshot-Skipped-Base-Image-Files` headers; both response shapes set `X-Snapshot-Entry-Kind` (`file` or `dir`). File responses accept a single `Range: bytes=` header and answer 206 with `Content-Range`, so large files can be downloaded in parts and resumed.
2657
3085
  * Download a file or folder from a snapshot
2658
3086
  */
2659
3087
  async getSnapshotFile(requestParameters: GetSnapshotFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Blob> {
@@ -2779,6 +3207,53 @@ export class BoatApi extends runtime.BaseAPI {
2779
3207
  return await response.value();
2780
3208
  }
2781
3209
 
3210
+ /**
3211
+ * Creates request options for getTelemetry without sending the request
3212
+ */
3213
+ async getTelemetryRequestOpts(): Promise<runtime.RequestOpts> {
3214
+ const queryParameters: any = {};
3215
+
3216
+ const headerParameters: runtime.HTTPHeaders = {};
3217
+
3218
+ if (this.configuration && this.configuration.accessToken) {
3219
+ const token = this.configuration.accessToken;
3220
+ const tokenString = await token("BoatBearerAuth", []);
3221
+
3222
+ if (tokenString) {
3223
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
3224
+ }
3225
+ }
3226
+
3227
+ let urlPath = `/telemetry`;
3228
+
3229
+ return {
3230
+ path: urlPath,
3231
+ method: 'GET',
3232
+ headers: headerParameters,
3233
+ query: queryParameters,
3234
+ };
3235
+ }
3236
+
3237
+ /**
3238
+ * Returns the account\'s OpenTelemetry export, or `telemetry` null when none is set. Header values are never included. Needs an API key with `account.admin`.
3239
+ * Get OpenTelemetry export
3240
+ */
3241
+ async getTelemetryRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TelemetryResponse>> {
3242
+ const requestOptions = await this.getTelemetryRequestOpts();
3243
+ const response = await this.request(requestOptions, initOverrides);
3244
+
3245
+ return new runtime.JSONApiResponse(response, (jsonValue) => TelemetryResponseFromJSON(jsonValue));
3246
+ }
3247
+
3248
+ /**
3249
+ * Returns the account\'s OpenTelemetry export, or `telemetry` null when none is set. Header values are never included. Needs an API key with `account.admin`.
3250
+ * Get OpenTelemetry export
3251
+ */
3252
+ async getTelemetry(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TelemetryResponse> {
3253
+ const response = await this.getTelemetryRaw(initOverrides);
3254
+ return await response.value();
3255
+ }
3256
+
2782
3257
  /**
2783
3258
  * Creates request options for getWebhook without sending the request
2784
3259
  */
@@ -3387,6 +3862,61 @@ export class BoatApi extends runtime.BaseAPI {
3387
3862
  return await response.value();
3388
3863
  }
3389
3864
 
3865
+ /**
3866
+ * Creates request options for processes without sending the request
3867
+ */
3868
+ async processesRequestOpts(requestParameters: ProcessesRequest): Promise<runtime.RequestOpts> {
3869
+ if (requestParameters['sandboxId'] == null) {
3870
+ throw new runtime.RequiredError(
3871
+ 'sandboxId',
3872
+ 'Required parameter "sandboxId" was null or undefined when calling processes().'
3873
+ );
3874
+ }
3875
+
3876
+ const queryParameters: any = {};
3877
+
3878
+ const headerParameters: runtime.HTTPHeaders = {};
3879
+
3880
+ if (this.configuration && this.configuration.accessToken) {
3881
+ const token = this.configuration.accessToken;
3882
+ const tokenString = await token("BoatBearerAuth", []);
3883
+
3884
+ if (tokenString) {
3885
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
3886
+ }
3887
+ }
3888
+
3889
+ let urlPath = `/sandboxes/{sandboxId}/processes`;
3890
+ urlPath = urlPath.replace('{sandboxId}', encodeURIComponent(String(requestParameters['sandboxId'])));
3891
+
3892
+ return {
3893
+ path: urlPath,
3894
+ method: 'GET',
3895
+ headers: headerParameters,
3896
+ query: queryParameters,
3897
+ };
3898
+ }
3899
+
3900
+ /**
3901
+ * A running sandbox: every user-space process, read now, busiest first. A stopped sandbox: the last sample kept (`live: false`).
3902
+ * List the processes in a sandbox
3903
+ */
3904
+ async processesRaw(requestParameters: ProcessesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ProcessListResponse>> {
3905
+ const requestOptions = await this.processesRequestOpts(requestParameters);
3906
+ const response = await this.request(requestOptions, initOverrides);
3907
+
3908
+ return new runtime.JSONApiResponse(response, (jsonValue) => ProcessListResponseFromJSON(jsonValue));
3909
+ }
3910
+
3911
+ /**
3912
+ * A running sandbox: every user-space process, read now, busiest first. A stopped sandbox: the last sample kept (`live: false`).
3913
+ * List the processes in a sandbox
3914
+ */
3915
+ async processes(requestParameters: ProcessesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ProcessListResponse> {
3916
+ const response = await this.processesRaw(requestParameters, initOverrides);
3917
+ return await response.value();
3918
+ }
3919
+
3390
3920
  /**
3391
3921
  * Creates request options for prompt without sending the request
3392
3922
  */
@@ -4429,6 +4959,64 @@ export class BoatApi extends runtime.BaseAPI {
4429
4959
  return await response.value();
4430
4960
  }
4431
4961
 
4962
+ /**
4963
+ * Creates request options for setTelemetry without sending the request
4964
+ */
4965
+ async setTelemetryRequestOpts(input: SetTelemetryRequest | runtime.FlatBody<SetTelemetryRequest, 'telemetrySetRequest'>): Promise<runtime.RequestOpts> {
4966
+ const requestParameters = runtime.unflattenBody<SetTelemetryRequest>(input, 'telemetrySetRequest', [], []);
4967
+ if (requestParameters['telemetrySetRequest'] == null) {
4968
+ throw new runtime.RequiredError(
4969
+ 'telemetrySetRequest',
4970
+ 'Required parameter "telemetrySetRequest" was null or undefined when calling setTelemetry().'
4971
+ );
4972
+ }
4973
+
4974
+ const queryParameters: any = {};
4975
+
4976
+ const headerParameters: runtime.HTTPHeaders = {};
4977
+
4978
+ headerParameters['Content-Type'] = 'application/json';
4979
+
4980
+ if (this.configuration && this.configuration.accessToken) {
4981
+ const token = this.configuration.accessToken;
4982
+ const tokenString = await token("BoatBearerAuth", []);
4983
+
4984
+ if (tokenString) {
4985
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
4986
+ }
4987
+ }
4988
+
4989
+ let urlPath = `/telemetry`;
4990
+
4991
+ return {
4992
+ path: urlPath,
4993
+ method: 'PUT',
4994
+ headers: headerParameters,
4995
+ query: queryParameters,
4996
+ body: TelemetrySetRequestToJSON(requestParameters['telemetrySetRequest']),
4997
+ };
4998
+ }
4999
+
5000
+ /**
5001
+ * Sets the account\'s one OTLP/HTTP destination, or replaces it. Boat then sends one metrics export at once and returns the collector\'s answer in `test`. Every 60 seconds Boat sends the sandbox and account gauges to `<endpoint>/v1/metrics`. Each sandbox lifecycle event goes to `<endpoint>/v1/logs`. The endpoint must use HTTPS on port 443 or 4318 and resolve only to public addresses. Needs an API key with `account.admin`.
5002
+ * Set OpenTelemetry export
5003
+ */
5004
+ async setTelemetryRaw(requestParameters: SetTelemetryRequest | runtime.FlatBody<SetTelemetryRequest, 'telemetrySetRequest'>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TelemetrySetResponse>> {
5005
+ const requestOptions = await this.setTelemetryRequestOpts(requestParameters);
5006
+ const response = await this.request(requestOptions, initOverrides);
5007
+
5008
+ return new runtime.JSONApiResponse(response, (jsonValue) => TelemetrySetResponseFromJSON(jsonValue));
5009
+ }
5010
+
5011
+ /**
5012
+ * Sets the account\'s one OTLP/HTTP destination, or replaces it. Boat then sends one metrics export at once and returns the collector\'s answer in `test`. Every 60 seconds Boat sends the sandbox and account gauges to `<endpoint>/v1/metrics`. Each sandbox lifecycle event goes to `<endpoint>/v1/logs`. The endpoint must use HTTPS on port 443 or 4318 and resolve only to public addresses. Needs an API key with `account.admin`.
5013
+ * Set OpenTelemetry export
5014
+ */
5015
+ async setTelemetry(requestParameters: SetTelemetryRequest | runtime.FlatBody<SetTelemetryRequest, 'telemetrySetRequest'>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TelemetrySetResponse> {
5016
+ const response = await this.setTelemetryRaw(requestParameters, initOverrides);
5017
+ return await response.value();
5018
+ }
5019
+
4432
5020
  /**
4433
5021
  * Creates request options for share without sending the request
4434
5022
  */
@@ -4679,6 +5267,69 @@ export class BoatApi extends runtime.BaseAPI {
4679
5267
  return await response.value();
4680
5268
  }
4681
5269
 
5270
+ /**
5271
+ * Creates request options for stopCommand without sending the request
5272
+ */
5273
+ async stopCommandRequestOpts(requestParameters: StopCommandRequest): Promise<runtime.RequestOpts> {
5274
+ if (requestParameters['sandboxId'] == null) {
5275
+ throw new runtime.RequiredError(
5276
+ 'sandboxId',
5277
+ 'Required parameter "sandboxId" was null or undefined when calling stopCommand().'
5278
+ );
5279
+ }
5280
+
5281
+ if (requestParameters['processId'] == null) {
5282
+ throw new runtime.RequiredError(
5283
+ 'processId',
5284
+ 'Required parameter "processId" was null or undefined when calling stopCommand().'
5285
+ );
5286
+ }
5287
+
5288
+ const queryParameters: any = {};
5289
+
5290
+ const headerParameters: runtime.HTTPHeaders = {};
5291
+
5292
+ if (this.configuration && this.configuration.accessToken) {
5293
+ const token = this.configuration.accessToken;
5294
+ const tokenString = await token("BoatBearerAuth", []);
5295
+
5296
+ if (tokenString) {
5297
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
5298
+ }
5299
+ }
5300
+
5301
+ let urlPath = `/sandboxes/{sandboxId}/commands/{processId}`;
5302
+ urlPath = urlPath.replace('{sandboxId}', encodeURIComponent(String(requestParameters['sandboxId'])));
5303
+ urlPath = urlPath.replace('{processId}', encodeURIComponent(String(requestParameters['processId'])));
5304
+
5305
+ return {
5306
+ path: urlPath,
5307
+ method: 'DELETE',
5308
+ headers: headerParameters,
5309
+ query: queryParameters,
5310
+ };
5311
+ }
5312
+
5313
+ /**
5314
+ * Sends SIGTERM to the command and every process it started, then SIGKILL to what is left after 5 s. Only a process started with `detached` can be stopped. The response carries the command\'s history record with its final state and output.
5315
+ * Stop a detached command
5316
+ */
5317
+ async stopCommandRaw(requestParameters: StopCommandRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CommandStopResponse>> {
5318
+ const requestOptions = await this.stopCommandRequestOpts(requestParameters);
5319
+ const response = await this.request(requestOptions, initOverrides);
5320
+
5321
+ return new runtime.JSONApiResponse(response, (jsonValue) => CommandStopResponseFromJSON(jsonValue));
5322
+ }
5323
+
5324
+ /**
5325
+ * Sends SIGTERM to the command and every process it started, then SIGKILL to what is left after 5 s. Only a process started with `detached` can be stopped. The response carries the command\'s history record with its final state and output.
5326
+ * Stop a detached command
5327
+ */
5328
+ async stopCommand(requestParameters: StopCommandRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CommandStopResponse> {
5329
+ const response = await this.stopCommandRaw(requestParameters, initOverrides);
5330
+ return await response.value();
5331
+ }
5332
+
4682
5333
  /**
4683
5334
  * Creates request options for update without sending the request
4684
5335
  */
@@ -5179,6 +5830,22 @@ export class BoatApi extends runtime.BaseAPI {
5179
5830
 
5180
5831
  }
5181
5832
 
5833
+ /**
5834
+ * @export
5835
+ */
5836
+ export const CommandLogsStreamEnum = {
5837
+ Stdout: 'stdout',
5838
+ Stderr: 'stderr'
5839
+ } as const;
5840
+ export type CommandLogsStreamEnum = typeof CommandLogsStreamEnum[keyof typeof CommandLogsStreamEnum];
5841
+ /**
5842
+ * @export
5843
+ */
5844
+ export const CommandLogsEncodingEnum = {
5845
+ Utf8: 'utf8',
5846
+ Base64: 'base64'
5847
+ } as const;
5848
+ export type CommandLogsEncodingEnum = typeof CommandLogsEncodingEnum[keyof typeof CommandLogsEncodingEnum];
5182
5849
  /**
5183
5850
  * @export
5184
5851
  */