@boatdev/sdk 1.7.0 → 1.9.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 (91) hide show
  1. package/.openapi-generator/FILES +12 -0
  2. package/dist/apis/BoatApi.d.ts +102 -4
  3. package/dist/apis/BoatApi.js +233 -4
  4. package/dist/esm/apis/BoatApi.d.ts +102 -4
  5. package/dist/esm/apis/BoatApi.js +233 -4
  6. package/dist/esm/http2-fetch.d.ts +1 -0
  7. package/dist/esm/http2-fetch.js +203 -0
  8. package/dist/esm/models/CreateSandboxRequest.d.ts +4 -3
  9. package/dist/esm/models/CreateSandboxRequest.js +2 -1
  10. package/dist/esm/models/ForkRequest.d.ts +2 -1
  11. package/dist/esm/models/ForkRequest.js +2 -1
  12. package/dist/esm/models/NamedSnapshotShare.d.ts +76 -0
  13. package/dist/esm/models/NamedSnapshotShare.js +74 -0
  14. package/dist/esm/models/NamedSnapshotShareCreatedResponse.d.ts +64 -0
  15. package/dist/esm/models/NamedSnapshotShareCreatedResponse.js +66 -0
  16. package/dist/esm/models/NamedSnapshotShareListResponse.d.ts +58 -0
  17. package/dist/esm/models/NamedSnapshotShareListResponse.js +62 -0
  18. package/dist/esm/models/NamedSnapshotShareRevokedResponse.d.ts +58 -0
  19. package/dist/esm/models/NamedSnapshotShareRevokedResponse.js +62 -0
  20. package/dist/esm/models/Recover200Response.d.ts +57 -0
  21. package/dist/esm/models/Recover200Response.js +53 -0
  22. package/dist/esm/models/ResumeRequest.d.ts +2 -1
  23. package/dist/esm/models/ResumeRequest.js +2 -1
  24. package/dist/esm/models/Sandbox.d.ts +2 -1
  25. package/dist/esm/models/Sandbox.js +2 -1
  26. package/dist/esm/models/SandboxUsageResponse.d.ts +2 -1
  27. package/dist/esm/models/SandboxUsageResponse.js +2 -1
  28. package/dist/esm/models/StopOperation.d.ts +1 -1
  29. package/dist/esm/models/StopOperationResponse.d.ts +58 -0
  30. package/dist/esm/models/StopOperationResponse.js +62 -0
  31. package/dist/esm/models/StopRequest.d.ts +1 -1
  32. package/dist/esm/models/UpdateSandboxRequest.d.ts +1 -1
  33. package/dist/esm/models/index.d.ts +6 -0
  34. package/dist/esm/models/index.js +6 -0
  35. package/dist/esm/runtime.js +2 -1
  36. package/dist/http2-fetch.d.ts +1 -0
  37. package/dist/http2-fetch.js +239 -0
  38. package/dist/models/CreateSandboxRequest.d.ts +4 -3
  39. package/dist/models/CreateSandboxRequest.js +2 -1
  40. package/dist/models/ForkRequest.d.ts +2 -1
  41. package/dist/models/ForkRequest.js +2 -1
  42. package/dist/models/NamedSnapshotShare.d.ts +76 -0
  43. package/dist/models/NamedSnapshotShare.js +82 -0
  44. package/dist/models/NamedSnapshotShareCreatedResponse.d.ts +64 -0
  45. package/dist/models/NamedSnapshotShareCreatedResponse.js +74 -0
  46. package/dist/models/NamedSnapshotShareListResponse.d.ts +58 -0
  47. package/dist/models/NamedSnapshotShareListResponse.js +70 -0
  48. package/dist/models/NamedSnapshotShareRevokedResponse.d.ts +58 -0
  49. package/dist/models/NamedSnapshotShareRevokedResponse.js +70 -0
  50. package/dist/models/Recover200Response.d.ts +57 -0
  51. package/dist/models/Recover200Response.js +61 -0
  52. package/dist/models/ResumeRequest.d.ts +2 -1
  53. package/dist/models/ResumeRequest.js +2 -1
  54. package/dist/models/Sandbox.d.ts +2 -1
  55. package/dist/models/Sandbox.js +2 -1
  56. package/dist/models/SandboxUsageResponse.d.ts +2 -1
  57. package/dist/models/SandboxUsageResponse.js +2 -1
  58. package/dist/models/StopOperation.d.ts +1 -1
  59. package/dist/models/StopOperationResponse.d.ts +58 -0
  60. package/dist/models/StopOperationResponse.js +70 -0
  61. package/dist/models/StopRequest.d.ts +1 -1
  62. package/dist/models/UpdateSandboxRequest.d.ts +1 -1
  63. package/dist/models/index.d.ts +6 -0
  64. package/dist/models/index.js +6 -0
  65. package/dist/runtime.js +9 -8
  66. package/docs/BoatApi.md +385 -2
  67. package/docs/NamedSnapshotShare.md +45 -0
  68. package/docs/NamedSnapshotShareCreatedResponse.md +40 -0
  69. package/docs/NamedSnapshotShareListResponse.md +38 -0
  70. package/docs/NamedSnapshotShareRevokedResponse.md +38 -0
  71. package/docs/Recover200Response.md +38 -0
  72. package/docs/StopOperationResponse.md +38 -0
  73. package/package.json +1 -1
  74. package/src/apis/BoatApi.ts +348 -4
  75. package/src/http2-fetch.ts +179 -0
  76. package/src/models/CreateSandboxRequest.ts +5 -4
  77. package/src/models/ForkRequest.ts +3 -2
  78. package/src/models/NamedSnapshotShare.ts +131 -0
  79. package/src/models/NamedSnapshotShareCreatedResponse.ts +120 -0
  80. package/src/models/NamedSnapshotShareListResponse.ts +111 -0
  81. package/src/models/NamedSnapshotShareRevokedResponse.ts +111 -0
  82. package/src/models/Recover200Response.ts +99 -0
  83. package/src/models/ResumeRequest.ts +3 -2
  84. package/src/models/Sandbox.ts +3 -2
  85. package/src/models/SandboxUsageResponse.ts +3 -2
  86. package/src/models/StopOperation.ts +1 -1
  87. package/src/models/StopOperationResponse.ts +111 -0
  88. package/src/models/StopRequest.ts +1 -1
  89. package/src/models/UpdateSandboxRequest.ts +1 -1
  90. package/src/models/index.ts +6 -0
  91. package/src/runtime.ts +2 -1
@@ -0,0 +1,38 @@
1
+
2
+ # StopOperationResponse
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+ `ok` | boolean
10
+ `type` | string
11
+ `id` | string
12
+ `stop` | [StopOperation](StopOperation.md)
13
+
14
+ ## Example
15
+
16
+ ```typescript
17
+ import type { StopOperationResponse } from '@boatdev/sdk'
18
+
19
+ // TODO: Update the object below with actual values
20
+ const example = {
21
+ "ok": null,
22
+ "type": null,
23
+ "id": null,
24
+ "stop": null,
25
+ } satisfies StopOperationResponse
26
+
27
+ console.log(example)
28
+
29
+ // Convert the instance to a JSON string
30
+ const exampleJSON: string = JSON.stringify(example)
31
+ console.log(exampleJSON)
32
+
33
+ // Parse the JSON string back to an object
34
+ const exampleParsed = JSON.parse(exampleJSON) as StopOperationResponse
35
+ console.log(exampleParsed)
36
+ ```
37
+
38
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@boatdev/sdk",
3
- "version": "1.7.0",
3
+ "version": "1.9.0",
4
4
  "description": "OpenAPI client for @boatdev/sdk",
5
5
  "author": "OpenAPI-Generator",
6
6
  "license": "MIT",
@@ -208,6 +208,21 @@ import {
208
208
  NamedSnapshotSavingResponseFromJSON,
209
209
  NamedSnapshotSavingResponseToJSON,
210
210
  } from '../models/NamedSnapshotSavingResponse';
211
+ import {
212
+ type NamedSnapshotShareCreatedResponse,
213
+ NamedSnapshotShareCreatedResponseFromJSON,
214
+ NamedSnapshotShareCreatedResponseToJSON,
215
+ } from '../models/NamedSnapshotShareCreatedResponse';
216
+ import {
217
+ type NamedSnapshotShareListResponse,
218
+ NamedSnapshotShareListResponseFromJSON,
219
+ NamedSnapshotShareListResponseToJSON,
220
+ } from '../models/NamedSnapshotShareListResponse';
221
+ import {
222
+ type NamedSnapshotShareRevokedResponse,
223
+ NamedSnapshotShareRevokedResponseFromJSON,
224
+ NamedSnapshotShareRevokedResponseToJSON,
225
+ } from '../models/NamedSnapshotShareRevokedResponse';
211
226
  import {
212
227
  type OrgListResponse,
213
228
  OrgListResponseFromJSON,
@@ -228,6 +243,11 @@ import {
228
243
  PromptRunResponseFromJSON,
229
244
  PromptRunResponseToJSON,
230
245
  } from '../models/PromptRunResponse';
246
+ import {
247
+ type Recover200Response,
248
+ Recover200ResponseFromJSON,
249
+ Recover200ResponseToJSON,
250
+ } from '../models/Recover200Response';
231
251
  import {
232
252
  type RepoSelectionRequest,
233
253
  RepoSelectionRequestFromJSON,
@@ -348,6 +368,11 @@ import {
348
368
  SteerResponseFromJSON,
349
369
  SteerResponseToJSON,
350
370
  } from '../models/SteerResponse';
371
+ import {
372
+ type StopOperationResponse,
373
+ StopOperationResponseFromJSON,
374
+ StopOperationResponseToJSON,
375
+ } from '../models/StopOperationResponse';
351
376
  import {
352
377
  type StopRequest,
353
378
  StopRequestFromJSON,
@@ -448,6 +473,10 @@ export interface CreateScopedApiKeyOperationRequest {
448
473
  createScopedApiKeyRequest: CreateScopedApiKeyRequest;
449
474
  }
450
475
 
476
+ export interface CreateSnapshotShareRequest {
477
+ name: string;
478
+ }
479
+
451
480
  export interface CreateWebhookRequest {
452
481
  webhookCreateRequest: WebhookCreateRequest;
453
482
  }
@@ -545,6 +574,11 @@ export interface GetSnapshotTreeRequest {
545
574
  snapshotId: string;
546
575
  }
547
576
 
577
+ export interface GetStopRequest {
578
+ sandboxId: string;
579
+ stopId: string;
580
+ }
581
+
548
582
  export interface GetWebhookRequest {
549
583
  webhookId: string;
550
584
  }
@@ -572,6 +606,10 @@ export interface ListSandboxSnapshotsRequest {
572
606
  sort?: ListSandboxSnapshotsSortEnum;
573
607
  }
574
608
 
609
+ export interface ListSnapshotSharesRequest {
610
+ name: string;
611
+ }
612
+
575
613
  export interface ListSnapshotsRequest {
576
614
  limit?: number;
577
615
  cursor?: string | null;
@@ -594,6 +632,10 @@ export interface ReadFileRequest {
594
632
  encoding?: ReadFileEncodingEnum;
595
633
  }
596
634
 
635
+ export interface RecoverRequest {
636
+ sandboxId: string;
637
+ }
638
+
597
639
  export interface ReposRequest {
598
640
  sync?: boolean;
599
641
  limit?: number;
@@ -612,6 +654,11 @@ export interface RevokeApiKeyRequest {
612
654
  apiKeyId: string;
613
655
  }
614
656
 
657
+ export interface RevokeSnapshotShareRequest {
658
+ name: string;
659
+ shareId: string;
660
+ }
661
+
615
662
  export interface RotateApiKeyRequest {
616
663
  apiKeyId: string;
617
664
  }
@@ -931,6 +978,7 @@ export class BoatApi extends runtime.BaseAPI {
931
978
  }
932
979
 
933
980
  /**
981
+ * Downloads one file of up to 50 MiB, under /home/user or /tmp, as raw bytes.
934
982
  * Download a sandbox artifact
935
983
  */
936
984
  async artifactRaw(requestParameters: ArtifactRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Blob>> {
@@ -941,6 +989,7 @@ export class BoatApi extends runtime.BaseAPI {
941
989
  }
942
990
 
943
991
  /**
992
+ * Downloads one file of up to 50 MiB, under /home/user or /tmp, as raw bytes.
944
993
  * Download a sandbox artifact
945
994
  */
946
995
  async artifact(requestParameters: ArtifactRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Blob> {
@@ -1313,6 +1362,61 @@ export class BoatApi extends runtime.BaseAPI {
1313
1362
  return await response.value();
1314
1363
  }
1315
1364
 
1365
+ /**
1366
+ * Creates request options for createSnapshotShare without sending the request
1367
+ */
1368
+ async createSnapshotShareRequestOpts(requestParameters: CreateSnapshotShareRequest): Promise<runtime.RequestOpts> {
1369
+ if (requestParameters['name'] == null) {
1370
+ throw new runtime.RequiredError(
1371
+ 'name',
1372
+ 'Required parameter "name" was null or undefined when calling createSnapshotShare().'
1373
+ );
1374
+ }
1375
+
1376
+ const queryParameters: any = {};
1377
+
1378
+ const headerParameters: runtime.HTTPHeaders = {};
1379
+
1380
+ if (this.configuration && this.configuration.accessToken) {
1381
+ const token = this.configuration.accessToken;
1382
+ const tokenString = await token("BoatBearerAuth", []);
1383
+
1384
+ if (tokenString) {
1385
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1386
+ }
1387
+ }
1388
+
1389
+ let urlPath = `/named-snapshots/{name}/shares`;
1390
+ urlPath = urlPath.replace('{name}', encodeURIComponent(String(requestParameters['name'])));
1391
+
1392
+ return {
1393
+ path: urlPath,
1394
+ method: 'POST',
1395
+ headers: headerParameters,
1396
+ query: queryParameters,
1397
+ };
1398
+ }
1399
+
1400
+ /**
1401
+ * Make a secret code that lets any Boat account create a sandbox from this named snapshot (`boat snapshot share <name>` in the CLI). The response shows the code once; Boat stores only a hash. Re-saving the name changes what the code deploys. Removing the name removes its codes. Everything on the disk is shared, so do not keep secrets in files on it. Needs `snapshot.write`.
1402
+ * Share a named snapshot
1403
+ */
1404
+ async createSnapshotShareRaw(requestParameters: CreateSnapshotShareRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<NamedSnapshotShareCreatedResponse>> {
1405
+ const requestOptions = await this.createSnapshotShareRequestOpts(requestParameters);
1406
+ const response = await this.request(requestOptions, initOverrides);
1407
+
1408
+ return new runtime.JSONApiResponse(response, (jsonValue) => NamedSnapshotShareCreatedResponseFromJSON(jsonValue));
1409
+ }
1410
+
1411
+ /**
1412
+ * Make a secret code that lets any Boat account create a sandbox from this named snapshot (`boat snapshot share <name>` in the CLI). The response shows the code once; Boat stores only a hash. Re-saving the name changes what the code deploys. Removing the name removes its codes. Everything on the disk is shared, so do not keep secrets in files on it. Needs `snapshot.write`.
1413
+ * Share a named snapshot
1414
+ */
1415
+ async createSnapshotShare(requestParameters: CreateSnapshotShareRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<NamedSnapshotShareCreatedResponse> {
1416
+ const response = await this.createSnapshotShareRaw(requestParameters, initOverrides);
1417
+ return await response.value();
1418
+ }
1419
+
1316
1420
  /**
1317
1421
  * Creates request options for createWebhook without sending the request
1318
1422
  */
@@ -2612,6 +2716,69 @@ export class BoatApi extends runtime.BaseAPI {
2612
2716
  return await response.value();
2613
2717
  }
2614
2718
 
2719
+ /**
2720
+ * Creates request options for getStop without sending the request
2721
+ */
2722
+ async getStopRequestOpts(requestParameters: GetStopRequest): Promise<runtime.RequestOpts> {
2723
+ if (requestParameters['sandboxId'] == null) {
2724
+ throw new runtime.RequiredError(
2725
+ 'sandboxId',
2726
+ 'Required parameter "sandboxId" was null or undefined when calling getStop().'
2727
+ );
2728
+ }
2729
+
2730
+ if (requestParameters['stopId'] == null) {
2731
+ throw new runtime.RequiredError(
2732
+ 'stopId',
2733
+ 'Required parameter "stopId" was null or undefined when calling getStop().'
2734
+ );
2735
+ }
2736
+
2737
+ const queryParameters: any = {};
2738
+
2739
+ const headerParameters: runtime.HTTPHeaders = {};
2740
+
2741
+ if (this.configuration && this.configuration.accessToken) {
2742
+ const token = this.configuration.accessToken;
2743
+ const tokenString = await token("BoatBearerAuth", []);
2744
+
2745
+ if (tokenString) {
2746
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
2747
+ }
2748
+ }
2749
+
2750
+ let urlPath = `/sandboxes/{sandboxId}/stops/{stopId}`;
2751
+ urlPath = urlPath.replace('{sandboxId}', encodeURIComponent(String(requestParameters['sandboxId'])));
2752
+ urlPath = urlPath.replace('{stopId}', encodeURIComponent(String(requestParameters['stopId'])));
2753
+
2754
+ return {
2755
+ path: urlPath,
2756
+ method: 'GET',
2757
+ headers: headerParameters,
2758
+ query: queryParameters,
2759
+ };
2760
+ }
2761
+
2762
+ /**
2763
+ * Returns one stop of this sandbox by the id that `POST /sandboxes/{sandboxId}/stop` returned. Old stops stay readable after a resume or a later stop. Returns 404 when the id is unknown or belongs to another sandbox.
2764
+ * Get a stop by id
2765
+ */
2766
+ async getStopRaw(requestParameters: GetStopRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<StopOperationResponse>> {
2767
+ const requestOptions = await this.getStopRequestOpts(requestParameters);
2768
+ const response = await this.request(requestOptions, initOverrides);
2769
+
2770
+ return new runtime.JSONApiResponse(response, (jsonValue) => StopOperationResponseFromJSON(jsonValue));
2771
+ }
2772
+
2773
+ /**
2774
+ * Returns one stop of this sandbox by the id that `POST /sandboxes/{sandboxId}/stop` returned. Old stops stay readable after a resume or a later stop. Returns 404 when the id is unknown or belongs to another sandbox.
2775
+ * Get a stop by id
2776
+ */
2777
+ async getStop(requestParameters: GetStopRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<StopOperationResponse> {
2778
+ const response = await this.getStopRaw(requestParameters, initOverrides);
2779
+ return await response.value();
2780
+ }
2781
+
2615
2782
  /**
2616
2783
  * Creates request options for getWebhook without sending the request
2617
2784
  */
@@ -3012,6 +3179,61 @@ export class BoatApi extends runtime.BaseAPI {
3012
3179
  return await response.value();
3013
3180
  }
3014
3181
 
3182
+ /**
3183
+ * Creates request options for listSnapshotShares without sending the request
3184
+ */
3185
+ async listSnapshotSharesRequestOpts(requestParameters: ListSnapshotSharesRequest): Promise<runtime.RequestOpts> {
3186
+ if (requestParameters['name'] == null) {
3187
+ throw new runtime.RequiredError(
3188
+ 'name',
3189
+ 'Required parameter "name" was null or undefined when calling listSnapshotShares().'
3190
+ );
3191
+ }
3192
+
3193
+ const queryParameters: any = {};
3194
+
3195
+ const headerParameters: runtime.HTTPHeaders = {};
3196
+
3197
+ if (this.configuration && this.configuration.accessToken) {
3198
+ const token = this.configuration.accessToken;
3199
+ const tokenString = await token("BoatBearerAuth", []);
3200
+
3201
+ if (tokenString) {
3202
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
3203
+ }
3204
+ }
3205
+
3206
+ let urlPath = `/named-snapshots/{name}/shares`;
3207
+ urlPath = urlPath.replace('{name}', encodeURIComponent(String(requestParameters['name'])));
3208
+
3209
+ return {
3210
+ path: urlPath,
3211
+ method: 'GET',
3212
+ headers: headerParameters,
3213
+ query: queryParameters,
3214
+ };
3215
+ }
3216
+
3217
+ /**
3218
+ * List the share codes of a named snapshot, active and revoked (`boat snapshot shares <name>` in the CLI). The full codes are not returned. Needs `snapshot.read`.
3219
+ * List share codes of a named snapshot
3220
+ */
3221
+ async listSnapshotSharesRaw(requestParameters: ListSnapshotSharesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<NamedSnapshotShareListResponse>> {
3222
+ const requestOptions = await this.listSnapshotSharesRequestOpts(requestParameters);
3223
+ const response = await this.request(requestOptions, initOverrides);
3224
+
3225
+ return new runtime.JSONApiResponse(response, (jsonValue) => NamedSnapshotShareListResponseFromJSON(jsonValue));
3226
+ }
3227
+
3228
+ /**
3229
+ * List the share codes of a named snapshot, active and revoked (`boat snapshot shares <name>` in the CLI). The full codes are not returned. Needs `snapshot.read`.
3230
+ * List share codes of a named snapshot
3231
+ */
3232
+ async listSnapshotShares(requestParameters: ListSnapshotSharesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<NamedSnapshotShareListResponse> {
3233
+ const response = await this.listSnapshotSharesRaw(requestParameters, initOverrides);
3234
+ return await response.value();
3235
+ }
3236
+
3015
3237
  /**
3016
3238
  * Creates request options for listSnapshots without sending the request
3017
3239
  */
@@ -3345,6 +3567,7 @@ export class BoatApi extends runtime.BaseAPI {
3345
3567
  }
3346
3568
 
3347
3569
  /**
3570
+ * Files up to 5 MiB. Use `GET /sandboxes/{sandboxId}/artifacts` for files up to 50 MiB, and SCP over SSH for larger ones.
3348
3571
  * Read a file from a sandbox
3349
3572
  */
3350
3573
  async readFileRaw(requestParameters: ReadFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FileReadResponse>> {
@@ -3355,6 +3578,7 @@ export class BoatApi extends runtime.BaseAPI {
3355
3578
  }
3356
3579
 
3357
3580
  /**
3581
+ * Files up to 5 MiB. Use `GET /sandboxes/{sandboxId}/artifacts` for files up to 50 MiB, and SCP over SSH for larger ones.
3358
3582
  * Read a file from a sandbox
3359
3583
  */
3360
3584
  async readFile(requestParameters: ReadFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FileReadResponse> {
@@ -3362,6 +3586,61 @@ export class BoatApi extends runtime.BaseAPI {
3362
3586
  return await response.value();
3363
3587
  }
3364
3588
 
3589
+ /**
3590
+ * Creates request options for recover without sending the request
3591
+ */
3592
+ async recoverRequestOpts(requestParameters: RecoverRequest): Promise<runtime.RequestOpts> {
3593
+ if (requestParameters['sandboxId'] == null) {
3594
+ throw new runtime.RequiredError(
3595
+ 'sandboxId',
3596
+ 'Required parameter "sandboxId" was null or undefined when calling recover().'
3597
+ );
3598
+ }
3599
+
3600
+ const queryParameters: any = {};
3601
+
3602
+ const headerParameters: runtime.HTTPHeaders = {};
3603
+
3604
+ if (this.configuration && this.configuration.accessToken) {
3605
+ const token = this.configuration.accessToken;
3606
+ const tokenString = await token("BoatBearerAuth", []);
3607
+
3608
+ if (tokenString) {
3609
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
3610
+ }
3611
+ }
3612
+
3613
+ let urlPath = `/sandboxes/{sandboxId}/recover`;
3614
+ urlPath = urlPath.replace('{sandboxId}', encodeURIComponent(String(requestParameters['sandboxId'])));
3615
+
3616
+ return {
3617
+ path: urlPath,
3618
+ method: 'POST',
3619
+ headers: headerParameters,
3620
+ query: queryParameters,
3621
+ };
3622
+ }
3623
+
3624
+ /**
3625
+ * Power-cycle the machine of a sandbox that stopped answering. The disk is not touched. The sandbox usually answers again within 1-2 minutes and then saves your work by itself; `sandbox.recovered` fires when it does. Refused with `409`: - `sandbox_is_reachable`: the sandbox answers normally. - `too_soon`: a recover started less than 10 minutes ago. - `no_machine`: the sandbox has no machine. Resume it instead. - `recover_unsupported`: its machine cannot be power-cycled. Wait for it to answer, or resume it from its last snapshot. - `reset_failed`: the power-cycle failed. Reply to the incident email.
3626
+ * Recover a sandbox that stopped responding
3627
+ */
3628
+ async recoverRaw(requestParameters: RecoverRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Recover200Response>> {
3629
+ const requestOptions = await this.recoverRequestOpts(requestParameters);
3630
+ const response = await this.request(requestOptions, initOverrides);
3631
+
3632
+ return new runtime.JSONApiResponse(response, (jsonValue) => Recover200ResponseFromJSON(jsonValue));
3633
+ }
3634
+
3635
+ /**
3636
+ * Power-cycle the machine of a sandbox that stopped answering. The disk is not touched. The sandbox usually answers again within 1-2 minutes and then saves your work by itself; `sandbox.recovered` fires when it does. Refused with `409`: - `sandbox_is_reachable`: the sandbox answers normally. - `too_soon`: a recover started less than 10 minutes ago. - `no_machine`: the sandbox has no machine. Resume it instead. - `recover_unsupported`: its machine cannot be power-cycled. Wait for it to answer, or resume it from its last snapshot. - `reset_failed`: the power-cycle failed. Reply to the incident email.
3637
+ * Recover a sandbox that stopped responding
3638
+ */
3639
+ async recover(requestParameters: RecoverRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Recover200Response> {
3640
+ const response = await this.recoverRaw(requestParameters, initOverrides);
3641
+ return await response.value();
3642
+ }
3643
+
3365
3644
  /**
3366
3645
  * Creates request options for repos without sending the request
3367
3646
  */
@@ -3545,6 +3824,69 @@ export class BoatApi extends runtime.BaseAPI {
3545
3824
  return await response.value();
3546
3825
  }
3547
3826
 
3827
+ /**
3828
+ * Creates request options for revokeSnapshotShare without sending the request
3829
+ */
3830
+ async revokeSnapshotShareRequestOpts(requestParameters: RevokeSnapshotShareRequest): Promise<runtime.RequestOpts> {
3831
+ if (requestParameters['name'] == null) {
3832
+ throw new runtime.RequiredError(
3833
+ 'name',
3834
+ 'Required parameter "name" was null or undefined when calling revokeSnapshotShare().'
3835
+ );
3836
+ }
3837
+
3838
+ if (requestParameters['shareId'] == null) {
3839
+ throw new runtime.RequiredError(
3840
+ 'shareId',
3841
+ 'Required parameter "shareId" was null or undefined when calling revokeSnapshotShare().'
3842
+ );
3843
+ }
3844
+
3845
+ const queryParameters: any = {};
3846
+
3847
+ const headerParameters: runtime.HTTPHeaders = {};
3848
+
3849
+ if (this.configuration && this.configuration.accessToken) {
3850
+ const token = this.configuration.accessToken;
3851
+ const tokenString = await token("BoatBearerAuth", []);
3852
+
3853
+ if (tokenString) {
3854
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
3855
+ }
3856
+ }
3857
+
3858
+ let urlPath = `/named-snapshots/{name}/shares/{shareId}`;
3859
+ urlPath = urlPath.replace('{name}', encodeURIComponent(String(requestParameters['name'])));
3860
+ urlPath = urlPath.replace('{shareId}', encodeURIComponent(String(requestParameters['shareId'])));
3861
+
3862
+ return {
3863
+ path: urlPath,
3864
+ method: 'DELETE',
3865
+ headers: headerParameters,
3866
+ query: queryParameters,
3867
+ };
3868
+ }
3869
+
3870
+ /**
3871
+ * Revoke a share code (`boat snapshot unshare <name> <share-id>` in the CLI). The code stops creating new sandboxes. Sandboxes already created from it keep their own copy. Needs `snapshot.write`.
3872
+ * Revoke a share code
3873
+ */
3874
+ async revokeSnapshotShareRaw(requestParameters: RevokeSnapshotShareRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<NamedSnapshotShareRevokedResponse>> {
3875
+ const requestOptions = await this.revokeSnapshotShareRequestOpts(requestParameters);
3876
+ const response = await this.request(requestOptions, initOverrides);
3877
+
3878
+ return new runtime.JSONApiResponse(response, (jsonValue) => NamedSnapshotShareRevokedResponseFromJSON(jsonValue));
3879
+ }
3880
+
3881
+ /**
3882
+ * Revoke a share code (`boat snapshot unshare <name> <share-id>` in the CLI). The code stops creating new sandboxes. Sandboxes already created from it keep their own copy. Needs `snapshot.write`.
3883
+ * Revoke a share code
3884
+ */
3885
+ async revokeSnapshotShare(requestParameters: RevokeSnapshotShareRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<NamedSnapshotShareRevokedResponse> {
3886
+ const response = await this.revokeSnapshotShareRaw(requestParameters, initOverrides);
3887
+ return await response.value();
3888
+ }
3889
+
3548
3890
  /**
3549
3891
  * Creates request options for rotateApiKey without sending the request
3550
3892
  */
@@ -4259,7 +4601,7 @@ export class BoatApi extends runtime.BaseAPI {
4259
4601
  }
4260
4602
 
4261
4603
  /**
4262
- * Send a new message to a turn that is already running, without losing what the agent is doing. This is what typing into a coding agent while it works does: the instruction is taken into account and the work continues. Where the harness has a native mid-turn primitive (Claude Code, Codex, pi, Prime Agent) nothing is interrupted and the response has `native: true`. Where it does not (OpenCode), Boat interrupts that turn and immediately continues the SAME conversation with the instruction, keeping the session and its memory, and the response has `native: false`. Refused with **409 `no_running_turn`** when the conversation has nothing in flight; queue work with `POST /prompt` instead. The steer shows up in `GET /events` as a `steer` event. See [Integrated agents](/integrated-agents).
4604
+ * Send a new message to a turn that is already running, without losing what the agent is doing. This is what typing into a coding agent while it works does: the instruction is taken into account and the work continues. Where the harness has a native mid-turn primitive (Claude Code, Codex, pi, Prime Agent) nothing is interrupted and the response has `native: true`. Where it does not (OpenCode), Boat interrupts that turn and immediately continues the SAME conversation with the instruction, keeping the session and its memory, and the response has `native: false`. Refused with **409 `no_running_turn`** when the conversation has nothing in flight; queue work with `POST /prompt` instead. `error.details.reason` says why: `turn_ended` (with `error.details.lastTurn.status` and `.error` of the newest turn), `turn_not_started` (the turn is starting; retry in a moment), `no_turn`, `not_running` (the sandbox is not running) or `delivery_failed` (the sandbox did not accept the steer; check the turn before sending more work). The steer shows up in `GET /events` as a `steer` event. See [Integrated agents](/integrated-agents).
4263
4605
  * Steer a running turn
4264
4606
  */
4265
4607
  async steerRaw(requestParameters: SteerOperationRequest | runtime.FlatBody<SteerOperationRequest, 'steerRequest'>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SteerResponse>> {
@@ -4270,7 +4612,7 @@ export class BoatApi extends runtime.BaseAPI {
4270
4612
  }
4271
4613
 
4272
4614
  /**
4273
- * Send a new message to a turn that is already running, without losing what the agent is doing. This is what typing into a coding agent while it works does: the instruction is taken into account and the work continues. Where the harness has a native mid-turn primitive (Claude Code, Codex, pi, Prime Agent) nothing is interrupted and the response has `native: true`. Where it does not (OpenCode), Boat interrupts that turn and immediately continues the SAME conversation with the instruction, keeping the session and its memory, and the response has `native: false`. Refused with **409 `no_running_turn`** when the conversation has nothing in flight; queue work with `POST /prompt` instead. The steer shows up in `GET /events` as a `steer` event. See [Integrated agents](/integrated-agents).
4615
+ * Send a new message to a turn that is already running, without losing what the agent is doing. This is what typing into a coding agent while it works does: the instruction is taken into account and the work continues. Where the harness has a native mid-turn primitive (Claude Code, Codex, pi, Prime Agent) nothing is interrupted and the response has `native: true`. Where it does not (OpenCode), Boat interrupts that turn and immediately continues the SAME conversation with the instruction, keeping the session and its memory, and the response has `native: false`. Refused with **409 `no_running_turn`** when the conversation has nothing in flight; queue work with `POST /prompt` instead. `error.details.reason` says why: `turn_ended` (with `error.details.lastTurn.status` and `.error` of the newest turn), `turn_not_started` (the turn is starting; retry in a moment), `no_turn`, `not_running` (the sandbox is not running) or `delivery_failed` (the sandbox did not accept the steer; check the turn before sending more work). The steer shows up in `GET /events` as a `steer` event. See [Integrated agents](/integrated-agents).
4274
4616
  * Steer a running turn
4275
4617
  */
4276
4618
  async steer(requestParameters: SteerOperationRequest | runtime.FlatBody<SteerOperationRequest, 'steerRequest'>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SteerResponse> {
@@ -4318,7 +4660,7 @@ export class BoatApi extends runtime.BaseAPI {
4318
4660
  }
4319
4661
 
4320
4662
  /**
4321
- * Stop active work and archive/snapshot the sandbox for later resume or fork. A stop always saves the sandbox\'s disk first. If that save is failing, the stop is refused and the sandbox keeps running so your work is not discarded, we retry automatically and email you. You are not billed for time spent in that state. The stop is an operation: the response and the sandbox carry it as `stop`, with an `id` and a `status`. Poll `GET /sandboxes/{sandboxId}` until `stop.status` is `completed`. A failed attempt shows `failing` with its `error` and is retried until the sandbox archives; commands and prompts you send meanwhile do not cancel it. Only a resume ends it early (`superseded`). Calling stop again while one is pending returns the same `id`. Set `force: true` to stop anyway, accepting the loss of everything written since the last successful snapshot. This is irreversible; only reach for it after a stop has already failed.
4663
+ * Stop active work and archive/snapshot the sandbox for later resume or fork. A stop always saves the sandbox\'s disk first. If that save is failing, the stop is refused and the sandbox keeps running so your work is not discarded, we retry automatically and email you. You are not billed for time spent in that state. The stop is an operation: the response and the sandbox carry it as `stop`, with an `id` and a `status`. Poll `GET /sandboxes/{sandboxId}` until `stop.status` is `completed`. A failed attempt shows `failing` with its `error` and is retried until the sandbox archives; commands and prompts you send meanwhile do not cancel it. Only a resume ends it early (`superseded`). Calling stop again while one is pending returns the same `id`. Set `force: true` to stop anyway, keeping the last successful snapshot and losing everything written since then. This is irreversible; only reach for it after a stop has already failed. A force on a stop that is already pending escalates that stop.
4322
4664
  * Stop and archive sandbox
4323
4665
  */
4324
4666
  async stopRaw(requestParameters: StopOperationRequest | runtime.FlatBody<StopOperationRequest, 'stopRequest'>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SandboxActionResponse>> {
@@ -4329,7 +4671,7 @@ export class BoatApi extends runtime.BaseAPI {
4329
4671
  }
4330
4672
 
4331
4673
  /**
4332
- * Stop active work and archive/snapshot the sandbox for later resume or fork. A stop always saves the sandbox\'s disk first. If that save is failing, the stop is refused and the sandbox keeps running so your work is not discarded, we retry automatically and email you. You are not billed for time spent in that state. The stop is an operation: the response and the sandbox carry it as `stop`, with an `id` and a `status`. Poll `GET /sandboxes/{sandboxId}` until `stop.status` is `completed`. A failed attempt shows `failing` with its `error` and is retried until the sandbox archives; commands and prompts you send meanwhile do not cancel it. Only a resume ends it early (`superseded`). Calling stop again while one is pending returns the same `id`. Set `force: true` to stop anyway, accepting the loss of everything written since the last successful snapshot. This is irreversible; only reach for it after a stop has already failed.
4674
+ * Stop active work and archive/snapshot the sandbox for later resume or fork. A stop always saves the sandbox\'s disk first. If that save is failing, the stop is refused and the sandbox keeps running so your work is not discarded, we retry automatically and email you. You are not billed for time spent in that state. The stop is an operation: the response and the sandbox carry it as `stop`, with an `id` and a `status`. Poll `GET /sandboxes/{sandboxId}` until `stop.status` is `completed`. A failed attempt shows `failing` with its `error` and is retried until the sandbox archives; commands and prompts you send meanwhile do not cancel it. Only a resume ends it early (`superseded`). Calling stop again while one is pending returns the same `id`. Set `force: true` to stop anyway, keeping the last successful snapshot and losing everything written since then. This is irreversible; only reach for it after a stop has already failed. A force on a stop that is already pending escalates that stop.
4333
4675
  * Stop and archive sandbox
4334
4676
  */
4335
4677
  async stop(requestParameters: StopOperationRequest | runtime.FlatBody<StopOperationRequest, 'stopRequest'>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SandboxActionResponse> {
@@ -4816,6 +5158,7 @@ export class BoatApi extends runtime.BaseAPI {
4816
5158
  }
4817
5159
 
4818
5160
  /**
5161
+ * Files up to 5 MiB after decoding. Use SCP over SSH for larger files.
4819
5162
  * Write a file in a sandbox
4820
5163
  */
4821
5164
  async writeFileRaw(requestParameters: WriteFileRequest | runtime.FlatBody<WriteFileRequest, 'fileWriteRequest'>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FileWriteResponse>> {
@@ -4826,6 +5169,7 @@ export class BoatApi extends runtime.BaseAPI {
4826
5169
  }
4827
5170
 
4828
5171
  /**
5172
+ * Files up to 5 MiB after decoding. Use SCP over SSH for larger files.
4829
5173
  * Write a file in a sandbox
4830
5174
  */
4831
5175
  async writeFile(requestParameters: WriteFileRequest | runtime.FlatBody<WriteFileRequest, 'fileWriteRequest'>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FileWriteResponse> {