@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.
- package/.openapi-generator/FILES +12 -0
- package/dist/apis/BoatApi.d.ts +102 -4
- package/dist/apis/BoatApi.js +233 -4
- package/dist/esm/apis/BoatApi.d.ts +102 -4
- package/dist/esm/apis/BoatApi.js +233 -4
- package/dist/esm/http2-fetch.d.ts +1 -0
- package/dist/esm/http2-fetch.js +203 -0
- package/dist/esm/models/CreateSandboxRequest.d.ts +4 -3
- package/dist/esm/models/CreateSandboxRequest.js +2 -1
- package/dist/esm/models/ForkRequest.d.ts +2 -1
- package/dist/esm/models/ForkRequest.js +2 -1
- package/dist/esm/models/NamedSnapshotShare.d.ts +76 -0
- package/dist/esm/models/NamedSnapshotShare.js +74 -0
- package/dist/esm/models/NamedSnapshotShareCreatedResponse.d.ts +64 -0
- package/dist/esm/models/NamedSnapshotShareCreatedResponse.js +66 -0
- package/dist/esm/models/NamedSnapshotShareListResponse.d.ts +58 -0
- package/dist/esm/models/NamedSnapshotShareListResponse.js +62 -0
- package/dist/esm/models/NamedSnapshotShareRevokedResponse.d.ts +58 -0
- package/dist/esm/models/NamedSnapshotShareRevokedResponse.js +62 -0
- package/dist/esm/models/Recover200Response.d.ts +57 -0
- package/dist/esm/models/Recover200Response.js +53 -0
- package/dist/esm/models/ResumeRequest.d.ts +2 -1
- package/dist/esm/models/ResumeRequest.js +2 -1
- package/dist/esm/models/Sandbox.d.ts +2 -1
- package/dist/esm/models/Sandbox.js +2 -1
- package/dist/esm/models/SandboxUsageResponse.d.ts +2 -1
- package/dist/esm/models/SandboxUsageResponse.js +2 -1
- package/dist/esm/models/StopOperation.d.ts +1 -1
- package/dist/esm/models/StopOperationResponse.d.ts +58 -0
- package/dist/esm/models/StopOperationResponse.js +62 -0
- package/dist/esm/models/StopRequest.d.ts +1 -1
- package/dist/esm/models/UpdateSandboxRequest.d.ts +1 -1
- package/dist/esm/models/index.d.ts +6 -0
- package/dist/esm/models/index.js +6 -0
- package/dist/esm/runtime.js +2 -1
- package/dist/http2-fetch.d.ts +1 -0
- package/dist/http2-fetch.js +239 -0
- package/dist/models/CreateSandboxRequest.d.ts +4 -3
- package/dist/models/CreateSandboxRequest.js +2 -1
- package/dist/models/ForkRequest.d.ts +2 -1
- package/dist/models/ForkRequest.js +2 -1
- package/dist/models/NamedSnapshotShare.d.ts +76 -0
- package/dist/models/NamedSnapshotShare.js +82 -0
- package/dist/models/NamedSnapshotShareCreatedResponse.d.ts +64 -0
- package/dist/models/NamedSnapshotShareCreatedResponse.js +74 -0
- package/dist/models/NamedSnapshotShareListResponse.d.ts +58 -0
- package/dist/models/NamedSnapshotShareListResponse.js +70 -0
- package/dist/models/NamedSnapshotShareRevokedResponse.d.ts +58 -0
- package/dist/models/NamedSnapshotShareRevokedResponse.js +70 -0
- package/dist/models/Recover200Response.d.ts +57 -0
- package/dist/models/Recover200Response.js +61 -0
- package/dist/models/ResumeRequest.d.ts +2 -1
- package/dist/models/ResumeRequest.js +2 -1
- package/dist/models/Sandbox.d.ts +2 -1
- package/dist/models/Sandbox.js +2 -1
- package/dist/models/SandboxUsageResponse.d.ts +2 -1
- package/dist/models/SandboxUsageResponse.js +2 -1
- package/dist/models/StopOperation.d.ts +1 -1
- package/dist/models/StopOperationResponse.d.ts +58 -0
- package/dist/models/StopOperationResponse.js +70 -0
- package/dist/models/StopRequest.d.ts +1 -1
- package/dist/models/UpdateSandboxRequest.d.ts +1 -1
- package/dist/models/index.d.ts +6 -0
- package/dist/models/index.js +6 -0
- package/dist/runtime.js +9 -8
- package/docs/BoatApi.md +385 -2
- package/docs/NamedSnapshotShare.md +45 -0
- package/docs/NamedSnapshotShareCreatedResponse.md +40 -0
- package/docs/NamedSnapshotShareListResponse.md +38 -0
- package/docs/NamedSnapshotShareRevokedResponse.md +38 -0
- package/docs/Recover200Response.md +38 -0
- package/docs/StopOperationResponse.md +38 -0
- package/package.json +1 -1
- package/src/apis/BoatApi.ts +348 -4
- package/src/http2-fetch.ts +179 -0
- package/src/models/CreateSandboxRequest.ts +5 -4
- package/src/models/ForkRequest.ts +3 -2
- package/src/models/NamedSnapshotShare.ts +131 -0
- package/src/models/NamedSnapshotShareCreatedResponse.ts +120 -0
- package/src/models/NamedSnapshotShareListResponse.ts +111 -0
- package/src/models/NamedSnapshotShareRevokedResponse.ts +111 -0
- package/src/models/Recover200Response.ts +99 -0
- package/src/models/ResumeRequest.ts +3 -2
- package/src/models/Sandbox.ts +3 -2
- package/src/models/SandboxUsageResponse.ts +3 -2
- package/src/models/StopOperation.ts +1 -1
- package/src/models/StopOperationResponse.ts +111 -0
- package/src/models/StopRequest.ts +1 -1
- package/src/models/UpdateSandboxRequest.ts +1 -1
- package/src/models/index.ts +6 -0
- package/src/runtime.ts +2 -1
package/docs/BoatApi.md
CHANGED
|
@@ -14,6 +14,7 @@ All URIs are relative to *https://boat.dev/api/v1*
|
|
|
14
14
|
| [**create**](BoatApi.md#create) | **POST** /sandboxes | Create sandbox |
|
|
15
15
|
| [**createEnvironment**](BoatApi.md#createenvironment) | **POST** /environments | Create a sandbox environment |
|
|
16
16
|
| [**createScopedApiKey**](BoatApi.md#createscopedapikeyoperation) | **POST** /api-keys/scoped | Create a scoped API key |
|
|
17
|
+
| [**createSnapshotShare**](BoatApi.md#createsnapshotshare) | **POST** /named-snapshots/{name}/shares | Share a named snapshot |
|
|
17
18
|
| [**createWebhook**](BoatApi.md#createwebhook) | **POST** /webhooks | Create webhook |
|
|
18
19
|
| [**deleteEnvironment**](BoatApi.md#deleteenvironment) | **DELETE** /environments/{environmentId} | Delete a sandbox environment |
|
|
19
20
|
| [**deleteEnvironmentRepo**](BoatApi.md#deleteenvironmentrepo) | **DELETE** /environments/{environmentId}/repos/{repositoryId} | Remove a repository from an environment |
|
|
@@ -36,6 +37,7 @@ All URIs are relative to *https://boat.dev/api/v1*
|
|
|
36
37
|
| [**getSnapshotDownload**](BoatApi.md#getsnapshotdownload) | **GET** /snapshots/{snapshotId}/download | Get snapshot download |
|
|
37
38
|
| [**getSnapshotFile**](BoatApi.md#getsnapshotfile) | **GET** /snapshots/{snapshotId}/files | Download a file or folder from a snapshot |
|
|
38
39
|
| [**getSnapshotTree**](BoatApi.md#getsnapshottree) | **GET** /snapshots/{snapshotId}/tree | Get snapshot file tree |
|
|
40
|
+
| [**getStop**](BoatApi.md#getstop) | **GET** /sandboxes/{sandboxId}/stops/{stopId} | Get a stop by id |
|
|
39
41
|
| [**getWebhook**](BoatApi.md#getwebhook) | **GET** /webhooks/{webhookId} | Get webhook |
|
|
40
42
|
| [**hostPort**](BoatApi.md#hostportoperation) | **POST** /sandboxes/{sandboxId}/host | Expose a sandbox port on a public HTTPS URL |
|
|
41
43
|
| [**interrupt**](BoatApi.md#interrupt) | **POST** /sandboxes/{sandboxId}/interrupt | Interrupt running work |
|
|
@@ -43,15 +45,18 @@ All URIs are relative to *https://boat.dev/api/v1*
|
|
|
43
45
|
| [**listNamedSnapshots**](BoatApi.md#listnamedsnapshots) | **GET** /named-snapshots | List named snapshots |
|
|
44
46
|
| [**listOrganizations**](BoatApi.md#listorganizations) | **GET** /orgs | List organizations |
|
|
45
47
|
| [**listSandboxSnapshots**](BoatApi.md#listsandboxsnapshots) | **GET** /sandboxes/{sandboxId}/snapshots | List boat snapshots |
|
|
48
|
+
| [**listSnapshotShares**](BoatApi.md#listsnapshotshares) | **GET** /named-snapshots/{name}/shares | List share codes of a named snapshot |
|
|
46
49
|
| [**listSnapshots**](BoatApi.md#listsnapshots) | **GET** /snapshots | List snapshots |
|
|
47
50
|
| [**listWebhooks**](BoatApi.md#listwebhooks) | **GET** /webhooks | List webhooks |
|
|
48
51
|
| [**me**](BoatApi.md#me) | **GET** /me | Get current Boat user |
|
|
49
52
|
| [**prompt**](BoatApi.md#promptoperation) | **POST** /sandboxes/{sandboxId}/prompt | Prompt Sandbox |
|
|
50
53
|
| [**promptRunStatus**](BoatApi.md#promptrunstatus) | **GET** /sandboxes/{sandboxId}/prompts/{promptId} | Get prompt run status |
|
|
51
54
|
| [**readFile**](BoatApi.md#readfile) | **GET** /sandboxes/{sandboxId}/files | Read a file from a sandbox |
|
|
55
|
+
| [**recover**](BoatApi.md#recover) | **POST** /sandboxes/{sandboxId}/recover | Recover a sandbox that stopped responding |
|
|
52
56
|
| [**repos**](BoatApi.md#repos) | **GET** /repos | List GitHub repositories available to Boat |
|
|
53
57
|
| [**resume**](BoatApi.md#resumeoperation) | **POST** /sandboxes/{sandboxId}/resume | Resume sandbox |
|
|
54
58
|
| [**revokeApiKey**](BoatApi.md#revokeapikey) | **DELETE** /api-keys/{apiKeyId} | Revoke an API key |
|
|
59
|
+
| [**revokeSnapshotShare**](BoatApi.md#revokesnapshotshare) | **DELETE** /named-snapshots/{name}/shares/{shareId} | Revoke a share code |
|
|
55
60
|
| [**rotateApiKey**](BoatApi.md#rotateapikey) | **POST** /api-keys/{apiKeyId}/rotate | Rotate an API key |
|
|
56
61
|
| [**rotateWebhookSigningSecret**](BoatApi.md#rotatewebhooksigningsecret) | **POST** /webhooks/{webhookId}/rotate | Rotate webhook signing secret |
|
|
57
62
|
| [**sandboxes**](BoatApi.md#sandboxes) | **GET** /sandboxes | List sandboxes |
|
|
@@ -297,6 +302,8 @@ This endpoint does not need any parameter.
|
|
|
297
302
|
|
|
298
303
|
Download a sandbox artifact
|
|
299
304
|
|
|
305
|
+
Downloads one file of up to 50 MiB, under /home/user or /tmp, as raw bytes.
|
|
306
|
+
|
|
300
307
|
### Example
|
|
301
308
|
|
|
302
309
|
```ts
|
|
@@ -827,6 +834,79 @@ example().catch(console.error);
|
|
|
827
834
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
828
835
|
|
|
829
836
|
|
|
837
|
+
## createSnapshotShare
|
|
838
|
+
|
|
839
|
+
> NamedSnapshotShareCreatedResponse createSnapshotShare(name)
|
|
840
|
+
|
|
841
|
+
Share a named snapshot
|
|
842
|
+
|
|
843
|
+
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`.
|
|
844
|
+
|
|
845
|
+
### Example
|
|
846
|
+
|
|
847
|
+
```ts
|
|
848
|
+
import {
|
|
849
|
+
Configuration,
|
|
850
|
+
BoatApi,
|
|
851
|
+
} from '@boatdev/sdk';
|
|
852
|
+
import type { CreateSnapshotShareRequest } from '@boatdev/sdk';
|
|
853
|
+
|
|
854
|
+
async function example() {
|
|
855
|
+
console.log("🚀 Testing @boatdev/sdk SDK...");
|
|
856
|
+
const config = new Configuration({
|
|
857
|
+
// Configure HTTP bearer authorization: BoatBearerAuth
|
|
858
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
859
|
+
});
|
|
860
|
+
const api = new BoatApi(config);
|
|
861
|
+
|
|
862
|
+
const body = {
|
|
863
|
+
// string
|
|
864
|
+
name: name_example,
|
|
865
|
+
} satisfies CreateSnapshotShareRequest;
|
|
866
|
+
|
|
867
|
+
try {
|
|
868
|
+
const data = await api.createSnapshotShare(body);
|
|
869
|
+
console.log(data);
|
|
870
|
+
} catch (error) {
|
|
871
|
+
console.error(error);
|
|
872
|
+
}
|
|
873
|
+
}
|
|
874
|
+
|
|
875
|
+
// Run the test
|
|
876
|
+
example().catch(console.error);
|
|
877
|
+
```
|
|
878
|
+
|
|
879
|
+
### Parameters
|
|
880
|
+
|
|
881
|
+
|
|
882
|
+
| Name | Type | Description | Notes |
|
|
883
|
+
|------------- | ------------- | ------------- | -------------|
|
|
884
|
+
| **name** | `string` | | [Defaults to `undefined`] |
|
|
885
|
+
|
|
886
|
+
### Return type
|
|
887
|
+
|
|
888
|
+
[**NamedSnapshotShareCreatedResponse**](NamedSnapshotShareCreatedResponse.md)
|
|
889
|
+
|
|
890
|
+
### Authorization
|
|
891
|
+
|
|
892
|
+
[BoatBearerAuth](../README.md#BoatBearerAuth)
|
|
893
|
+
|
|
894
|
+
### HTTP request headers
|
|
895
|
+
|
|
896
|
+
- **Content-Type**: Not defined
|
|
897
|
+
- **Accept**: `application/json`
|
|
898
|
+
|
|
899
|
+
|
|
900
|
+
### HTTP response details
|
|
901
|
+
| Status code | Description | Response headers |
|
|
902
|
+
|-------------|-------------|------------------|
|
|
903
|
+
| **201** | Code created. Store `shareCode` now; Boat does not show it again. | - |
|
|
904
|
+
| **401** | Missing or invalid bearer token. | - |
|
|
905
|
+
| **404** | Resource not found. | - |
|
|
906
|
+
|
|
907
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
908
|
+
|
|
909
|
+
|
|
830
910
|
## createWebhook
|
|
831
911
|
|
|
832
912
|
> WebhookSecretResponse createWebhook(webhookCreateRequest)
|
|
@@ -2482,6 +2562,82 @@ example().catch(console.error);
|
|
|
2482
2562
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
2483
2563
|
|
|
2484
2564
|
|
|
2565
|
+
## getStop
|
|
2566
|
+
|
|
2567
|
+
> StopOperationResponse getStop(sandboxId, stopId)
|
|
2568
|
+
|
|
2569
|
+
Get a stop by id
|
|
2570
|
+
|
|
2571
|
+
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.
|
|
2572
|
+
|
|
2573
|
+
### Example
|
|
2574
|
+
|
|
2575
|
+
```ts
|
|
2576
|
+
import {
|
|
2577
|
+
Configuration,
|
|
2578
|
+
BoatApi,
|
|
2579
|
+
} from '@boatdev/sdk';
|
|
2580
|
+
import type { GetStopRequest } from '@boatdev/sdk';
|
|
2581
|
+
|
|
2582
|
+
async function example() {
|
|
2583
|
+
console.log("🚀 Testing @boatdev/sdk SDK...");
|
|
2584
|
+
const config = new Configuration({
|
|
2585
|
+
// Configure HTTP bearer authorization: BoatBearerAuth
|
|
2586
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
2587
|
+
});
|
|
2588
|
+
const api = new BoatApi(config);
|
|
2589
|
+
|
|
2590
|
+
const body = {
|
|
2591
|
+
// string | Public Sandbox id returned by create/list/get sandbox calls.
|
|
2592
|
+
sandboxId: sandboxId_example,
|
|
2593
|
+
// string
|
|
2594
|
+
stopId: stopId_example,
|
|
2595
|
+
} satisfies GetStopRequest;
|
|
2596
|
+
|
|
2597
|
+
try {
|
|
2598
|
+
const data = await api.getStop(body);
|
|
2599
|
+
console.log(data);
|
|
2600
|
+
} catch (error) {
|
|
2601
|
+
console.error(error);
|
|
2602
|
+
}
|
|
2603
|
+
}
|
|
2604
|
+
|
|
2605
|
+
// Run the test
|
|
2606
|
+
example().catch(console.error);
|
|
2607
|
+
```
|
|
2608
|
+
|
|
2609
|
+
### Parameters
|
|
2610
|
+
|
|
2611
|
+
|
|
2612
|
+
| Name | Type | Description | Notes |
|
|
2613
|
+
|------------- | ------------- | ------------- | -------------|
|
|
2614
|
+
| **sandboxId** | `string` | Public Sandbox id returned by create/list/get sandbox calls. | [Defaults to `undefined`] |
|
|
2615
|
+
| **stopId** | `string` | | [Defaults to `undefined`] |
|
|
2616
|
+
|
|
2617
|
+
### Return type
|
|
2618
|
+
|
|
2619
|
+
[**StopOperationResponse**](StopOperationResponse.md)
|
|
2620
|
+
|
|
2621
|
+
### Authorization
|
|
2622
|
+
|
|
2623
|
+
[BoatBearerAuth](../README.md#BoatBearerAuth)
|
|
2624
|
+
|
|
2625
|
+
### HTTP request headers
|
|
2626
|
+
|
|
2627
|
+
- **Content-Type**: Not defined
|
|
2628
|
+
- **Accept**: `application/json`
|
|
2629
|
+
|
|
2630
|
+
|
|
2631
|
+
### HTTP response details
|
|
2632
|
+
| Status code | Description | Response headers |
|
|
2633
|
+
|-------------|-------------|------------------|
|
|
2634
|
+
| **200** | The stop. | - |
|
|
2635
|
+
| **401** | Missing or invalid bearer token. | - |
|
|
2636
|
+
| **404** | Resource not found. | - |
|
|
2637
|
+
|
|
2638
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
2639
|
+
|
|
2640
|
+
|
|
2485
2641
|
## getWebhook
|
|
2486
2642
|
|
|
2487
2643
|
> WebhookResponse getWebhook(webhookId)
|
|
@@ -3000,6 +3156,79 @@ example().catch(console.error);
|
|
|
3000
3156
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
3001
3157
|
|
|
3002
3158
|
|
|
3159
|
+
## listSnapshotShares
|
|
3160
|
+
|
|
3161
|
+
> NamedSnapshotShareListResponse listSnapshotShares(name)
|
|
3162
|
+
|
|
3163
|
+
List share codes of a named snapshot
|
|
3164
|
+
|
|
3165
|
+
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`.
|
|
3166
|
+
|
|
3167
|
+
### Example
|
|
3168
|
+
|
|
3169
|
+
```ts
|
|
3170
|
+
import {
|
|
3171
|
+
Configuration,
|
|
3172
|
+
BoatApi,
|
|
3173
|
+
} from '@boatdev/sdk';
|
|
3174
|
+
import type { ListSnapshotSharesRequest } from '@boatdev/sdk';
|
|
3175
|
+
|
|
3176
|
+
async function example() {
|
|
3177
|
+
console.log("🚀 Testing @boatdev/sdk SDK...");
|
|
3178
|
+
const config = new Configuration({
|
|
3179
|
+
// Configure HTTP bearer authorization: BoatBearerAuth
|
|
3180
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
3181
|
+
});
|
|
3182
|
+
const api = new BoatApi(config);
|
|
3183
|
+
|
|
3184
|
+
const body = {
|
|
3185
|
+
// string
|
|
3186
|
+
name: name_example,
|
|
3187
|
+
} satisfies ListSnapshotSharesRequest;
|
|
3188
|
+
|
|
3189
|
+
try {
|
|
3190
|
+
const data = await api.listSnapshotShares(body);
|
|
3191
|
+
console.log(data);
|
|
3192
|
+
} catch (error) {
|
|
3193
|
+
console.error(error);
|
|
3194
|
+
}
|
|
3195
|
+
}
|
|
3196
|
+
|
|
3197
|
+
// Run the test
|
|
3198
|
+
example().catch(console.error);
|
|
3199
|
+
```
|
|
3200
|
+
|
|
3201
|
+
### Parameters
|
|
3202
|
+
|
|
3203
|
+
|
|
3204
|
+
| Name | Type | Description | Notes |
|
|
3205
|
+
|------------- | ------------- | ------------- | -------------|
|
|
3206
|
+
| **name** | `string` | | [Defaults to `undefined`] |
|
|
3207
|
+
|
|
3208
|
+
### Return type
|
|
3209
|
+
|
|
3210
|
+
[**NamedSnapshotShareListResponse**](NamedSnapshotShareListResponse.md)
|
|
3211
|
+
|
|
3212
|
+
### Authorization
|
|
3213
|
+
|
|
3214
|
+
[BoatBearerAuth](../README.md#BoatBearerAuth)
|
|
3215
|
+
|
|
3216
|
+
### HTTP request headers
|
|
3217
|
+
|
|
3218
|
+
- **Content-Type**: Not defined
|
|
3219
|
+
- **Accept**: `application/json`
|
|
3220
|
+
|
|
3221
|
+
|
|
3222
|
+
### HTTP response details
|
|
3223
|
+
| Status code | Description | Response headers |
|
|
3224
|
+
|-------------|-------------|------------------|
|
|
3225
|
+
| **200** | The snapshot\'s share codes. | - |
|
|
3226
|
+
| **401** | Missing or invalid bearer token. | - |
|
|
3227
|
+
| **404** | Resource not found. | - |
|
|
3228
|
+
|
|
3229
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
3230
|
+
|
|
3231
|
+
|
|
3003
3232
|
## listSnapshots
|
|
3004
3233
|
|
|
3005
3234
|
> SnapshotListResponse listSnapshots(limit, cursor, sort)
|
|
@@ -3368,6 +3597,8 @@ example().catch(console.error);
|
|
|
3368
3597
|
|
|
3369
3598
|
Read a file from a sandbox
|
|
3370
3599
|
|
|
3600
|
+
Files up to 5 MiB. Use `GET /sandboxes/{sandboxId}/artifacts` for files up to 50 MiB, and SCP over SSH for larger ones.
|
|
3601
|
+
|
|
3371
3602
|
### Example
|
|
3372
3603
|
|
|
3373
3604
|
```ts
|
|
@@ -3438,6 +3669,80 @@ example().catch(console.error);
|
|
|
3438
3669
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
3439
3670
|
|
|
3440
3671
|
|
|
3672
|
+
## recover
|
|
3673
|
+
|
|
3674
|
+
> Recover200Response recover(sandboxId)
|
|
3675
|
+
|
|
3676
|
+
Recover a sandbox that stopped responding
|
|
3677
|
+
|
|
3678
|
+
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.
|
|
3679
|
+
|
|
3680
|
+
### Example
|
|
3681
|
+
|
|
3682
|
+
```ts
|
|
3683
|
+
import {
|
|
3684
|
+
Configuration,
|
|
3685
|
+
BoatApi,
|
|
3686
|
+
} from '@boatdev/sdk';
|
|
3687
|
+
import type { RecoverRequest } from '@boatdev/sdk';
|
|
3688
|
+
|
|
3689
|
+
async function example() {
|
|
3690
|
+
console.log("🚀 Testing @boatdev/sdk SDK...");
|
|
3691
|
+
const config = new Configuration({
|
|
3692
|
+
// Configure HTTP bearer authorization: BoatBearerAuth
|
|
3693
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
3694
|
+
});
|
|
3695
|
+
const api = new BoatApi(config);
|
|
3696
|
+
|
|
3697
|
+
const body = {
|
|
3698
|
+
// string | Public Sandbox id returned by create/list/get sandbox calls.
|
|
3699
|
+
sandboxId: sandboxId_example,
|
|
3700
|
+
} satisfies RecoverRequest;
|
|
3701
|
+
|
|
3702
|
+
try {
|
|
3703
|
+
const data = await api.recover(body);
|
|
3704
|
+
console.log(data);
|
|
3705
|
+
} catch (error) {
|
|
3706
|
+
console.error(error);
|
|
3707
|
+
}
|
|
3708
|
+
}
|
|
3709
|
+
|
|
3710
|
+
// Run the test
|
|
3711
|
+
example().catch(console.error);
|
|
3712
|
+
```
|
|
3713
|
+
|
|
3714
|
+
### Parameters
|
|
3715
|
+
|
|
3716
|
+
|
|
3717
|
+
| Name | Type | Description | Notes |
|
|
3718
|
+
|------------- | ------------- | ------------- | -------------|
|
|
3719
|
+
| **sandboxId** | `string` | Public Sandbox id returned by create/list/get sandbox calls. | [Defaults to `undefined`] |
|
|
3720
|
+
|
|
3721
|
+
### Return type
|
|
3722
|
+
|
|
3723
|
+
[**Recover200Response**](Recover200Response.md)
|
|
3724
|
+
|
|
3725
|
+
### Authorization
|
|
3726
|
+
|
|
3727
|
+
[BoatBearerAuth](../README.md#BoatBearerAuth)
|
|
3728
|
+
|
|
3729
|
+
### HTTP request headers
|
|
3730
|
+
|
|
3731
|
+
- **Content-Type**: Not defined
|
|
3732
|
+
- **Accept**: `application/json`
|
|
3733
|
+
|
|
3734
|
+
|
|
3735
|
+
### HTTP response details
|
|
3736
|
+
| Status code | Description | Response headers |
|
|
3737
|
+
|-------------|-------------|------------------|
|
|
3738
|
+
| **200** | The power-cycle started. | - |
|
|
3739
|
+
| **401** | Missing or invalid bearer token. | - |
|
|
3740
|
+
| **404** | Resource not found. | - |
|
|
3741
|
+
| **409** | The sandbox cannot be recovered now. `code` says why (see above). | - |
|
|
3742
|
+
|
|
3743
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
3744
|
+
|
|
3745
|
+
|
|
3441
3746
|
## repos
|
|
3442
3747
|
|
|
3443
3748
|
> ReposResponse repos(sync, limit, cursor, sort, q, selected)
|
|
@@ -3678,6 +3983,82 @@ example().catch(console.error);
|
|
|
3678
3983
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
3679
3984
|
|
|
3680
3985
|
|
|
3986
|
+
## revokeSnapshotShare
|
|
3987
|
+
|
|
3988
|
+
> NamedSnapshotShareRevokedResponse revokeSnapshotShare(name, shareId)
|
|
3989
|
+
|
|
3990
|
+
Revoke a share code
|
|
3991
|
+
|
|
3992
|
+
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`.
|
|
3993
|
+
|
|
3994
|
+
### Example
|
|
3995
|
+
|
|
3996
|
+
```ts
|
|
3997
|
+
import {
|
|
3998
|
+
Configuration,
|
|
3999
|
+
BoatApi,
|
|
4000
|
+
} from '@boatdev/sdk';
|
|
4001
|
+
import type { RevokeSnapshotShareRequest } from '@boatdev/sdk';
|
|
4002
|
+
|
|
4003
|
+
async function example() {
|
|
4004
|
+
console.log("🚀 Testing @boatdev/sdk SDK...");
|
|
4005
|
+
const config = new Configuration({
|
|
4006
|
+
// Configure HTTP bearer authorization: BoatBearerAuth
|
|
4007
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
4008
|
+
});
|
|
4009
|
+
const api = new BoatApi(config);
|
|
4010
|
+
|
|
4011
|
+
const body = {
|
|
4012
|
+
// string
|
|
4013
|
+
name: name_example,
|
|
4014
|
+
// string | Share id, for example `shr_...`.
|
|
4015
|
+
shareId: shareId_example,
|
|
4016
|
+
} satisfies RevokeSnapshotShareRequest;
|
|
4017
|
+
|
|
4018
|
+
try {
|
|
4019
|
+
const data = await api.revokeSnapshotShare(body);
|
|
4020
|
+
console.log(data);
|
|
4021
|
+
} catch (error) {
|
|
4022
|
+
console.error(error);
|
|
4023
|
+
}
|
|
4024
|
+
}
|
|
4025
|
+
|
|
4026
|
+
// Run the test
|
|
4027
|
+
example().catch(console.error);
|
|
4028
|
+
```
|
|
4029
|
+
|
|
4030
|
+
### Parameters
|
|
4031
|
+
|
|
4032
|
+
|
|
4033
|
+
| Name | Type | Description | Notes |
|
|
4034
|
+
|------------- | ------------- | ------------- | -------------|
|
|
4035
|
+
| **name** | `string` | | [Defaults to `undefined`] |
|
|
4036
|
+
| **shareId** | `string` | Share id, for example `shr_...`. | [Defaults to `undefined`] |
|
|
4037
|
+
|
|
4038
|
+
### Return type
|
|
4039
|
+
|
|
4040
|
+
[**NamedSnapshotShareRevokedResponse**](NamedSnapshotShareRevokedResponse.md)
|
|
4041
|
+
|
|
4042
|
+
### Authorization
|
|
4043
|
+
|
|
4044
|
+
[BoatBearerAuth](../README.md#BoatBearerAuth)
|
|
4045
|
+
|
|
4046
|
+
### HTTP request headers
|
|
4047
|
+
|
|
4048
|
+
- **Content-Type**: Not defined
|
|
4049
|
+
- **Accept**: `application/json`
|
|
4050
|
+
|
|
4051
|
+
|
|
4052
|
+
### HTTP response details
|
|
4053
|
+
| Status code | Description | Response headers |
|
|
4054
|
+
|-------------|-------------|------------------|
|
|
4055
|
+
| **200** | Revoked. | - |
|
|
4056
|
+
| **401** | Missing or invalid bearer token. | - |
|
|
4057
|
+
| **404** | Resource not found. | - |
|
|
4058
|
+
|
|
4059
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
4060
|
+
|
|
4061
|
+
|
|
3681
4062
|
## rotateApiKey
|
|
3682
4063
|
|
|
3683
4064
|
> ApiKeySecretResponse rotateApiKey(apiKeyId)
|
|
@@ -4518,7 +4899,7 @@ example().catch(console.error);
|
|
|
4518
4899
|
|
|
4519
4900
|
Steer a running turn
|
|
4520
4901
|
|
|
4521
|
-
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).
|
|
4902
|
+
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).
|
|
4522
4903
|
|
|
4523
4904
|
### Example
|
|
4524
4905
|
|
|
@@ -4600,7 +4981,7 @@ example().catch(console.error);
|
|
|
4600
4981
|
|
|
4601
4982
|
Stop and archive sandbox
|
|
4602
4983
|
|
|
4603
|
-
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,
|
|
4984
|
+
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.
|
|
4604
4985
|
|
|
4605
4986
|
### Example
|
|
4606
4987
|
|
|
@@ -5208,6 +5589,8 @@ example().catch(console.error);
|
|
|
5208
5589
|
|
|
5209
5590
|
Write a file in a sandbox
|
|
5210
5591
|
|
|
5592
|
+
Files up to 5 MiB after decoding. Use SCP over SSH for larger files.
|
|
5593
|
+
|
|
5211
5594
|
### Example
|
|
5212
5595
|
|
|
5213
5596
|
```ts
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
|
|
2
|
+
# NamedSnapshotShare
|
|
3
|
+
|
|
4
|
+
A share code for a named snapshot. Any Boat account that holds the code can create a sandbox from the snapshot. Boat stores only a hash of the code. The full code is in the create response only.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`id` | string
|
|
11
|
+
`codePrefix` | string
|
|
12
|
+
`status` | string
|
|
13
|
+
`useCount` | number
|
|
14
|
+
`lastUsedAt` | Date
|
|
15
|
+
`revokedAt` | Date
|
|
16
|
+
`createdAt` | Date
|
|
17
|
+
|
|
18
|
+
## Example
|
|
19
|
+
|
|
20
|
+
```typescript
|
|
21
|
+
import type { NamedSnapshotShare } from '@boatdev/sdk'
|
|
22
|
+
|
|
23
|
+
// TODO: Update the object below with actual values
|
|
24
|
+
const example = {
|
|
25
|
+
"id": null,
|
|
26
|
+
"codePrefix": null,
|
|
27
|
+
"status": null,
|
|
28
|
+
"useCount": null,
|
|
29
|
+
"lastUsedAt": null,
|
|
30
|
+
"revokedAt": null,
|
|
31
|
+
"createdAt": null,
|
|
32
|
+
} satisfies NamedSnapshotShare
|
|
33
|
+
|
|
34
|
+
console.log(example)
|
|
35
|
+
|
|
36
|
+
// Convert the instance to a JSON string
|
|
37
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
38
|
+
console.log(exampleJSON)
|
|
39
|
+
|
|
40
|
+
// Parse the JSON string back to an object
|
|
41
|
+
const exampleParsed = JSON.parse(exampleJSON) as NamedSnapshotShare
|
|
42
|
+
console.log(exampleParsed)
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
|
|
2
|
+
# NamedSnapshotShareCreatedResponse
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`ok` | boolean
|
|
10
|
+
`type` | string
|
|
11
|
+
`name` | string
|
|
12
|
+
`shareCode` | string
|
|
13
|
+
`share` | [NamedSnapshotShare](NamedSnapshotShare.md)
|
|
14
|
+
|
|
15
|
+
## Example
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
import type { NamedSnapshotShareCreatedResponse } from '@boatdev/sdk'
|
|
19
|
+
|
|
20
|
+
// TODO: Update the object below with actual values
|
|
21
|
+
const example = {
|
|
22
|
+
"ok": null,
|
|
23
|
+
"type": null,
|
|
24
|
+
"name": null,
|
|
25
|
+
"shareCode": null,
|
|
26
|
+
"share": null,
|
|
27
|
+
} satisfies NamedSnapshotShareCreatedResponse
|
|
28
|
+
|
|
29
|
+
console.log(example)
|
|
30
|
+
|
|
31
|
+
// Convert the instance to a JSON string
|
|
32
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
33
|
+
console.log(exampleJSON)
|
|
34
|
+
|
|
35
|
+
// Parse the JSON string back to an object
|
|
36
|
+
const exampleParsed = JSON.parse(exampleJSON) as NamedSnapshotShareCreatedResponse
|
|
37
|
+
console.log(exampleParsed)
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
|
|
2
|
+
# NamedSnapshotShareListResponse
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`ok` | boolean
|
|
10
|
+
`type` | string
|
|
11
|
+
`name` | string
|
|
12
|
+
`shares` | [Array<NamedSnapshotShare>](NamedSnapshotShare.md)
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
import type { NamedSnapshotShareListResponse } from '@boatdev/sdk'
|
|
18
|
+
|
|
19
|
+
// TODO: Update the object below with actual values
|
|
20
|
+
const example = {
|
|
21
|
+
"ok": null,
|
|
22
|
+
"type": null,
|
|
23
|
+
"name": null,
|
|
24
|
+
"shares": null,
|
|
25
|
+
} satisfies NamedSnapshotShareListResponse
|
|
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 NamedSnapshotShareListResponse
|
|
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)
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
|
|
2
|
+
# NamedSnapshotShareRevokedResponse
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`ok` | boolean
|
|
10
|
+
`type` | string
|
|
11
|
+
`name` | string
|
|
12
|
+
`share` | [NamedSnapshotShare](NamedSnapshotShare.md)
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
import type { NamedSnapshotShareRevokedResponse } from '@boatdev/sdk'
|
|
18
|
+
|
|
19
|
+
// TODO: Update the object below with actual values
|
|
20
|
+
const example = {
|
|
21
|
+
"ok": null,
|
|
22
|
+
"type": null,
|
|
23
|
+
"name": null,
|
|
24
|
+
"share": null,
|
|
25
|
+
} satisfies NamedSnapshotShareRevokedResponse
|
|
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 NamedSnapshotShareRevokedResponse
|
|
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)
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
|
|
2
|
+
# Recover200Response
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`ok` | boolean
|
|
10
|
+
`type` | string
|
|
11
|
+
`status` | string
|
|
12
|
+
`message` | string
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
import type { Recover200Response } from '@boatdev/sdk'
|
|
18
|
+
|
|
19
|
+
// TODO: Update the object below with actual values
|
|
20
|
+
const example = {
|
|
21
|
+
"ok": null,
|
|
22
|
+
"type": null,
|
|
23
|
+
"status": null,
|
|
24
|
+
"message": null,
|
|
25
|
+
} satisfies Recover200Response
|
|
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 Recover200Response
|
|
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)
|