@boatdev/sdk 1.4.0 → 1.6.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 +4 -0
- package/dist/apis/BoatApi.d.ts +22 -0
- package/dist/apis/BoatApi.js +51 -0
- package/dist/boat-helpers.d.ts +6 -0
- package/dist/boat-helpers.js +28 -4
- package/dist/esm/apis/BoatApi.d.ts +22 -0
- package/dist/esm/apis/BoatApi.js +51 -0
- package/dist/esm/boat-helpers.d.ts +6 -0
- package/dist/esm/boat-helpers.js +28 -4
- package/dist/esm/models/NamedSnapshotAllowance.d.ts +74 -0
- package/dist/esm/models/NamedSnapshotAllowance.js +55 -0
- package/dist/esm/models/NamedSnapshotListResponse.d.ts +7 -0
- package/dist/esm/models/NamedSnapshotListResponse.js +3 -0
- package/dist/esm/models/PromptRequest.d.ts +6 -0
- package/dist/esm/models/PromptRequest.js +2 -0
- package/dist/esm/models/PromptResponse.d.ts +6 -0
- package/dist/esm/models/PromptResponse.js +2 -0
- package/dist/esm/models/PromptRun.d.ts +6 -0
- package/dist/esm/models/PromptRun.js +2 -0
- package/dist/esm/models/Sandbox.d.ts +39 -0
- package/dist/esm/models/Sandbox.js +18 -0
- package/dist/esm/models/Share200Response.d.ts +45 -0
- package/dist/esm/models/Share200Response.js +46 -0
- package/dist/esm/models/index.d.ts +2 -0
- package/dist/esm/models/index.js +2 -0
- package/dist/models/NamedSnapshotAllowance.d.ts +74 -0
- package/dist/models/NamedSnapshotAllowance.js +62 -0
- package/dist/models/NamedSnapshotListResponse.d.ts +7 -0
- package/dist/models/NamedSnapshotListResponse.js +3 -0
- package/dist/models/PromptRequest.d.ts +6 -0
- package/dist/models/PromptRequest.js +2 -0
- package/dist/models/PromptResponse.d.ts +6 -0
- package/dist/models/PromptResponse.js +2 -0
- package/dist/models/PromptRun.d.ts +6 -0
- package/dist/models/PromptRun.js +2 -0
- package/dist/models/Sandbox.d.ts +39 -0
- package/dist/models/Sandbox.js +19 -1
- package/dist/models/Share200Response.d.ts +45 -0
- package/dist/models/Share200Response.js +53 -0
- package/dist/models/index.d.ts +2 -0
- package/dist/models/index.js +2 -0
- package/docs/BoatApi.md +87 -2
- package/docs/NamedSnapshotAllowance.md +47 -0
- package/docs/NamedSnapshotListResponse.md +2 -0
- package/docs/PromptRequest.md +2 -0
- package/docs/PromptResponse.md +2 -0
- package/docs/PromptRun.md +2 -0
- package/docs/Sandbox.md +10 -0
- package/docs/Share200Response.md +36 -0
- package/package.json +1 -1
- package/src/apis/BoatApi.ts +76 -0
- package/src/boat-helpers.ts +27 -5
- package/src/models/NamedSnapshotAllowance.ts +121 -0
- package/src/models/NamedSnapshotListResponse.ts +15 -0
- package/src/models/PromptRequest.ts +8 -0
- package/src/models/PromptResponse.ts +8 -0
- package/src/models/PromptRun.ts +8 -0
- package/src/models/Sandbox.ts +50 -0
- package/src/models/Share200Response.ts +89 -0
- package/src/models/index.ts +2 -0
package/dist/models/Sandbox.js
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* Do not edit the class manually.
|
|
14
14
|
*/
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.SandboxSetupStatusEnum = exports.SandboxLastSnapshotStatusEnum = exports.SandboxMachineProviderEnum = exports.SandboxTypeEnum = exports.SandboxHealthEnum = exports.SandboxStateEnum = void 0;
|
|
16
|
+
exports.SandboxSetupStatusEnum = exports.SandboxLastSnapshotStatusEnum = exports.SandboxAccessEnum = exports.SandboxMachineProviderEnum = exports.SandboxTypeEnum = exports.SandboxHealthEnum = exports.SandboxStateEnum = void 0;
|
|
17
17
|
exports.instanceOfSandbox = instanceOfSandbox;
|
|
18
18
|
exports.SandboxFromJSON = SandboxFromJSON;
|
|
19
19
|
exports.SandboxFromJSONTyped = SandboxFromJSONTyped;
|
|
@@ -58,6 +58,14 @@ exports.SandboxMachineProviderEnum = {
|
|
|
58
58
|
Hetzner: 'hetzner',
|
|
59
59
|
Baremetal: 'baremetal'
|
|
60
60
|
};
|
|
61
|
+
/**
|
|
62
|
+
* @export
|
|
63
|
+
*/
|
|
64
|
+
exports.SandboxAccessEnum = {
|
|
65
|
+
Owner: 'owner',
|
|
66
|
+
Use: 'use',
|
|
67
|
+
View: 'view'
|
|
68
|
+
};
|
|
61
69
|
/**
|
|
62
70
|
* @export
|
|
63
71
|
*/
|
|
@@ -126,6 +134,11 @@ function SandboxFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
126
134
|
'snapshotCompletedAt': json['snapshotCompletedAt'] == null ? undefined : (new Date(json['snapshotCompletedAt'])),
|
|
127
135
|
'snapshotVerifiedAt': json['snapshotVerifiedAt'] == null ? undefined : (new Date(json['snapshotVerifiedAt'])),
|
|
128
136
|
'team': json['team'] == null ? undefined : (0, SandboxTeam_1.SandboxTeamFromJSON)(json['team']),
|
|
137
|
+
'createdBy': json['createdBy'] == null ? undefined : json['createdBy'],
|
|
138
|
+
'createdById': json['createdById'] == null ? undefined : json['createdById'],
|
|
139
|
+
'access': json['access'] == null ? undefined : json['access'],
|
|
140
|
+
'holdsCreatorLogins': json['holdsCreatorLogins'] == null ? undefined : json['holdsCreatorLogins'],
|
|
141
|
+
'wipePendingUntilRestart': json['wipePendingUntilRestart'] == null ? undefined : json['wipePendingUntilRestart'],
|
|
129
142
|
'subdomain': json['subdomain'] == null ? undefined : json['subdomain'],
|
|
130
143
|
'lastSnapshotAttemptAt': json['lastSnapshotAttemptAt'] == null ? undefined : (new Date(json['lastSnapshotAttemptAt'])),
|
|
131
144
|
'lastSnapshotStatus': json['lastSnapshotStatus'] == null ? undefined : json['lastSnapshotStatus'],
|
|
@@ -168,6 +181,11 @@ function SandboxToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
168
181
|
'snapshotCompletedAt': value['snapshotCompletedAt'] == null ? value['snapshotCompletedAt'] : value['snapshotCompletedAt'].toISOString(),
|
|
169
182
|
'snapshotVerifiedAt': value['snapshotVerifiedAt'] == null ? value['snapshotVerifiedAt'] : value['snapshotVerifiedAt'].toISOString(),
|
|
170
183
|
'team': (0, SandboxTeam_1.SandboxTeamToJSON)(value['team']),
|
|
184
|
+
'createdBy': value['createdBy'],
|
|
185
|
+
'createdById': value['createdById'],
|
|
186
|
+
'access': value['access'],
|
|
187
|
+
'holdsCreatorLogins': value['holdsCreatorLogins'],
|
|
188
|
+
'wipePendingUntilRestart': value['wipePendingUntilRestart'],
|
|
171
189
|
'subdomain': value['subdomain'],
|
|
172
190
|
'lastSnapshotAttemptAt': value['lastSnapshotAttemptAt'] == null ? value['lastSnapshotAttemptAt'] : value['lastSnapshotAttemptAt'].toISOString(),
|
|
173
191
|
'lastSnapshotStatus': value['lastSnapshotStatus'],
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Boat Public API v1
|
|
3
|
+
* Public JSON API for creating, operating, prompting, observing, and exposing sandboxes from backend services, CI jobs, hosted workers, and Boat automation products. The v1 reference intentionally documents the developer integration surface only. Dashboard billing actions are not part of v1.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { Sandbox } from './Sandbox';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface Share200Response
|
|
17
|
+
*/
|
|
18
|
+
export interface Share200Response {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {Sandbox}
|
|
22
|
+
* @memberof Share200Response
|
|
23
|
+
*/
|
|
24
|
+
sandbox?: Sandbox;
|
|
25
|
+
/**
|
|
26
|
+
* True when the sandbox was running: what runs on it still holds your logins in memory, so it stays `view` for the organization until you stop and resume it.
|
|
27
|
+
* @type {boolean}
|
|
28
|
+
* @memberof Share200Response
|
|
29
|
+
*/
|
|
30
|
+
restartRequired?: boolean;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @type {string}
|
|
34
|
+
* @memberof Share200Response
|
|
35
|
+
*/
|
|
36
|
+
message?: string;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Check if a given object implements the Share200Response interface.
|
|
40
|
+
*/
|
|
41
|
+
export declare function instanceOfShare200Response(value: object): value is Share200Response;
|
|
42
|
+
export declare function Share200ResponseFromJSON(json: any): Share200Response;
|
|
43
|
+
export declare function Share200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): Share200Response;
|
|
44
|
+
export declare function Share200ResponseToJSON(json: any): Share200Response;
|
|
45
|
+
export declare function Share200ResponseToJSONTyped(value?: Share200Response | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Boat Public API v1
|
|
6
|
+
* Public JSON API for creating, operating, prompting, observing, and exposing sandboxes from backend services, CI jobs, hosted workers, and Boat automation products. The v1 reference intentionally documents the developer integration surface only. Dashboard billing actions are not part of v1.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.instanceOfShare200Response = instanceOfShare200Response;
|
|
17
|
+
exports.Share200ResponseFromJSON = Share200ResponseFromJSON;
|
|
18
|
+
exports.Share200ResponseFromJSONTyped = Share200ResponseFromJSONTyped;
|
|
19
|
+
exports.Share200ResponseToJSON = Share200ResponseToJSON;
|
|
20
|
+
exports.Share200ResponseToJSONTyped = Share200ResponseToJSONTyped;
|
|
21
|
+
const Sandbox_1 = require("./Sandbox");
|
|
22
|
+
/**
|
|
23
|
+
* Check if a given object implements the Share200Response interface.
|
|
24
|
+
*/
|
|
25
|
+
function instanceOfShare200Response(value) {
|
|
26
|
+
return true;
|
|
27
|
+
}
|
|
28
|
+
function Share200ResponseFromJSON(json) {
|
|
29
|
+
return Share200ResponseFromJSONTyped(json, false);
|
|
30
|
+
}
|
|
31
|
+
function Share200ResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
32
|
+
if (json == null) {
|
|
33
|
+
return json;
|
|
34
|
+
}
|
|
35
|
+
return {
|
|
36
|
+
'sandbox': json['sandbox'] == null ? undefined : (0, Sandbox_1.SandboxFromJSON)(json['sandbox']),
|
|
37
|
+
'restartRequired': json['restartRequired'] == null ? undefined : json['restartRequired'],
|
|
38
|
+
'message': json['message'] == null ? undefined : json['message'],
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
function Share200ResponseToJSON(json) {
|
|
42
|
+
return Share200ResponseToJSONTyped(json, false);
|
|
43
|
+
}
|
|
44
|
+
function Share200ResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
45
|
+
if (value == null) {
|
|
46
|
+
return value;
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
'sandbox': (0, Sandbox_1.SandboxToJSON)(value['sandbox']),
|
|
50
|
+
'restartRequired': value['restartRequired'],
|
|
51
|
+
'message': value['message'],
|
|
52
|
+
};
|
|
53
|
+
}
|
package/dist/models/index.d.ts
CHANGED
|
@@ -57,6 +57,7 @@ export * from './LimitsResponse';
|
|
|
57
57
|
export * from './MeResponse';
|
|
58
58
|
export * from './MeResponseAllOfUser';
|
|
59
59
|
export * from './NamedSnapshot';
|
|
60
|
+
export * from './NamedSnapshotAllowance';
|
|
60
61
|
export * from './NamedSnapshotDeletedResponse';
|
|
61
62
|
export * from './NamedSnapshotInfoResponse';
|
|
62
63
|
export * from './NamedSnapshotListResponse';
|
|
@@ -99,6 +100,7 @@ export * from './SecretsUpdateRequest';
|
|
|
99
100
|
export * from './SelectedRepository';
|
|
100
101
|
export * from './SetEnvironmentSecretFileRequest';
|
|
101
102
|
export * from './SetEnvironmentVarRequest';
|
|
103
|
+
export * from './Share200Response';
|
|
102
104
|
export * from './SnapshotChunk';
|
|
103
105
|
export * from './SnapshotDownloadResponse';
|
|
104
106
|
export * from './SnapshotDownloadResponseAllOfInventory';
|
package/dist/models/index.js
CHANGED
|
@@ -75,6 +75,7 @@ __exportStar(require("./LimitsResponse"), exports);
|
|
|
75
75
|
__exportStar(require("./MeResponse"), exports);
|
|
76
76
|
__exportStar(require("./MeResponseAllOfUser"), exports);
|
|
77
77
|
__exportStar(require("./NamedSnapshot"), exports);
|
|
78
|
+
__exportStar(require("./NamedSnapshotAllowance"), exports);
|
|
78
79
|
__exportStar(require("./NamedSnapshotDeletedResponse"), exports);
|
|
79
80
|
__exportStar(require("./NamedSnapshotInfoResponse"), exports);
|
|
80
81
|
__exportStar(require("./NamedSnapshotListResponse"), exports);
|
|
@@ -117,6 +118,7 @@ __exportStar(require("./SecretsUpdateRequest"), exports);
|
|
|
117
118
|
__exportStar(require("./SelectedRepository"), exports);
|
|
118
119
|
__exportStar(require("./SetEnvironmentSecretFileRequest"), exports);
|
|
119
120
|
__exportStar(require("./SetEnvironmentVarRequest"), exports);
|
|
121
|
+
__exportStar(require("./Share200Response"), exports);
|
|
120
122
|
__exportStar(require("./SnapshotChunk"), exports);
|
|
121
123
|
__exportStar(require("./SnapshotDownloadResponse"), exports);
|
|
122
124
|
__exportStar(require("./SnapshotDownloadResponseAllOfInventory"), exports);
|
package/docs/BoatApi.md
CHANGED
|
@@ -61,6 +61,7 @@ All URIs are relative to *https://boat.dev/api/v1*
|
|
|
61
61
|
| [**setActiveOrganization**](BoatApi.md#setactiveorganization) | **PATCH** /orgs/active | Set the active organization |
|
|
62
62
|
| [**setEnvironmentSecretFile**](BoatApi.md#setenvironmentsecretfileoperation) | **PUT** /environments/{environmentId}/secret-files | Write one secret file |
|
|
63
63
|
| [**setEnvironmentVar**](BoatApi.md#setenvironmentvaroperation) | **PUT** /environments/{environmentId}/vars/{key} | Set one environment variable |
|
|
64
|
+
| [**share**](BoatApi.md#share) | **POST** /sandboxes/{sandboxId}/share | Share sandbox with the organization |
|
|
64
65
|
| [**sshKey**](BoatApi.md#sshkeyoperation) | **POST** /sandboxes/{sandboxId}/sshkey | Configure sandbox SSH key |
|
|
65
66
|
| [**steer**](BoatApi.md#steeroperation) | **POST** /sandboxes/{sandboxId}/steer | Steer a running turn |
|
|
66
67
|
| [**stop**](BoatApi.md#stopoperation) | **POST** /sandboxes/{sandboxId}/stop | Stop and archive sandbox |
|
|
@@ -3827,10 +3828,12 @@ example().catch(console.error);
|
|
|
3827
3828
|
|
|
3828
3829
|
## sandboxes
|
|
3829
3830
|
|
|
3830
|
-
> SandboxListResponse sandboxes(limit, cursor, sort, state)
|
|
3831
|
+
> SandboxListResponse sandboxes(org, xBoatOrg, limit, cursor, sort, state)
|
|
3831
3832
|
|
|
3832
3833
|
List sandboxes
|
|
3833
3834
|
|
|
3835
|
+
Your sandboxes. In an organization\'s scope (the active wallet, `org`, or `X-Boat-Org`) the list also holds every sandbox that organization pays for, whoever created it; `createdBy` and `access` say whose it is and what you may do with it.
|
|
3836
|
+
|
|
3834
3837
|
### Example
|
|
3835
3838
|
|
|
3836
3839
|
```ts
|
|
@@ -3849,6 +3852,10 @@ async function example() {
|
|
|
3849
3852
|
const api = new BoatApi(config);
|
|
3850
3853
|
|
|
3851
3854
|
const body = {
|
|
3855
|
+
// string | Billing wallet for this request: an organization you belong to, by id (`team_…`) or by name as `GET /orgs` lists it (case-insensitive), or `personal`. Omitted, the account\'s active wallet applies (`PATCH /orgs/active`; personal until set). Two organizations sharing the name answer `409 ambiguous_org` and need the id. Sandboxes, snapshots, and environments stay creator-private. (optional)
|
|
3856
|
+
org: org_example,
|
|
3857
|
+
// string | Same as the `org` query parameter. Query wins when both are set. (optional)
|
|
3858
|
+
xBoatOrg: xBoatOrg_example,
|
|
3852
3859
|
// number | Maximum items to return. (optional)
|
|
3853
3860
|
limit: 56,
|
|
3854
3861
|
// string | Opaque pagination cursor returned as `pageInfo.nextCursor`. (optional)
|
|
@@ -3876,6 +3883,8 @@ example().catch(console.error);
|
|
|
3876
3883
|
|
|
3877
3884
|
| Name | Type | Description | Notes |
|
|
3878
3885
|
|------------- | ------------- | ------------- | -------------|
|
|
3886
|
+
| **org** | `string` | Billing wallet for this request: an organization you belong to, by id (`team_…`) or by name as `GET /orgs` lists it (case-insensitive), or `personal`. Omitted, the account\'s active wallet applies (`PATCH /orgs/active`; personal until set). Two organizations sharing the name answer `409 ambiguous_org` and need the id. Sandboxes, snapshots, and environments stay creator-private. | [Optional] [Defaults to `undefined`] |
|
|
3887
|
+
| **xBoatOrg** | `string` | Same as the `org` query parameter. Query wins when both are set. | [Optional] [Defaults to `undefined`] |
|
|
3879
3888
|
| **limit** | `number` | Maximum items to return. | [Optional] [Defaults to `100`] |
|
|
3880
3889
|
| **cursor** | `string` | Opaque pagination cursor returned as `pageInfo.nextCursor`. | [Optional] [Defaults to `undefined`] |
|
|
3881
3890
|
| **sort** | `asc`, `desc` | Sort direction for cursor pagination. | [Optional] [Defaults to `'desc'`] [Enum: asc, desc] |
|
|
@@ -3974,7 +3983,8 @@ example().catch(console.error);
|
|
|
3974
3983
|
| **400** | Invalid request body or parameters. | - |
|
|
3975
3984
|
| **401** | Missing or invalid bearer token. | - |
|
|
3976
3985
|
| **404** | Resource not found. | - |
|
|
3977
|
-
| **
|
|
3986
|
+
| **402** | `credit_required`: the wallet already keeps 10 or more named snapshots and has no credit left. Each named snapshot above the free 10 costs $1.70 a month, charged daily. Add credit or remove one. | - |
|
|
3987
|
+
| **409** | `save_in_progress` when a save under this name is already running; wait for it to settle rather than retrying immediately. | - |
|
|
3978
3988
|
|
|
3979
3989
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
3980
3990
|
|
|
@@ -4349,6 +4359,81 @@ example().catch(console.error);
|
|
|
4349
4359
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
4350
4360
|
|
|
4351
4361
|
|
|
4362
|
+
## share
|
|
4363
|
+
|
|
4364
|
+
> Share200Response share(sandboxId)
|
|
4365
|
+
|
|
4366
|
+
Share sandbox with the organization
|
|
4367
|
+
|
|
4368
|
+
Let every member of the organization that pays for this sandbox use it. Your personal logins (GitHub token, Claude and Codex logins, environment secrets, the sandbox\'s own CLI key) are never pushed to it again and are wiped off its disk at its next start, so a teammate never acts as you. Files you wrote stay. One-way: the sandbox stays like a `noEnv` sandbox from then on. A running sandbox stays `view` for the organization until you stop and resume it (`restartRequired`). Only the person who created the sandbox can share it, and only a sandbox billed to an organization. Sharing an already shared sandbox is a no-op.
|
|
4369
|
+
|
|
4370
|
+
### Example
|
|
4371
|
+
|
|
4372
|
+
```ts
|
|
4373
|
+
import {
|
|
4374
|
+
Configuration,
|
|
4375
|
+
BoatApi,
|
|
4376
|
+
} from '@boatdev/sdk';
|
|
4377
|
+
import type { ShareRequest } from '@boatdev/sdk';
|
|
4378
|
+
|
|
4379
|
+
async function example() {
|
|
4380
|
+
console.log("🚀 Testing @boatdev/sdk SDK...");
|
|
4381
|
+
const config = new Configuration({
|
|
4382
|
+
// Configure HTTP bearer authorization: BoatBearerAuth
|
|
4383
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
4384
|
+
});
|
|
4385
|
+
const api = new BoatApi(config);
|
|
4386
|
+
|
|
4387
|
+
const body = {
|
|
4388
|
+
// string | Public Sandbox id returned by create/list/get sandbox calls.
|
|
4389
|
+
sandboxId: sandboxId_example,
|
|
4390
|
+
} satisfies ShareRequest;
|
|
4391
|
+
|
|
4392
|
+
try {
|
|
4393
|
+
const data = await api.share(body);
|
|
4394
|
+
console.log(data);
|
|
4395
|
+
} catch (error) {
|
|
4396
|
+
console.error(error);
|
|
4397
|
+
}
|
|
4398
|
+
}
|
|
4399
|
+
|
|
4400
|
+
// Run the test
|
|
4401
|
+
example().catch(console.error);
|
|
4402
|
+
```
|
|
4403
|
+
|
|
4404
|
+
### Parameters
|
|
4405
|
+
|
|
4406
|
+
|
|
4407
|
+
| Name | Type | Description | Notes |
|
|
4408
|
+
|------------- | ------------- | ------------- | -------------|
|
|
4409
|
+
| **sandboxId** | `string` | Public Sandbox id returned by create/list/get sandbox calls. | [Defaults to `undefined`] |
|
|
4410
|
+
|
|
4411
|
+
### Return type
|
|
4412
|
+
|
|
4413
|
+
[**Share200Response**](Share200Response.md)
|
|
4414
|
+
|
|
4415
|
+
### Authorization
|
|
4416
|
+
|
|
4417
|
+
[BoatBearerAuth](../README.md#BoatBearerAuth)
|
|
4418
|
+
|
|
4419
|
+
### HTTP request headers
|
|
4420
|
+
|
|
4421
|
+
- **Content-Type**: Not defined
|
|
4422
|
+
- **Accept**: `application/json`
|
|
4423
|
+
|
|
4424
|
+
|
|
4425
|
+
### HTTP response details
|
|
4426
|
+
| Status code | Description | Response headers |
|
|
4427
|
+
|-------------|-------------|------------------|
|
|
4428
|
+
| **200** | The sandbox is shared. | - |
|
|
4429
|
+
| **400** | Invalid request body or parameters. | - |
|
|
4430
|
+
| **401** | Missing or invalid bearer token. | - |
|
|
4431
|
+
| **403** | Authenticated token is not allowed to perform this action. | - |
|
|
4432
|
+
| **404** | Resource not found. | - |
|
|
4433
|
+
|
|
4434
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
4435
|
+
|
|
4436
|
+
|
|
4352
4437
|
## sshKey
|
|
4353
4438
|
|
|
4354
4439
|
> SshKeyResponse sshKey(sandboxId, sshKeyRequest)
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
|
|
2
|
+
# NamedSnapshotAllowance
|
|
3
|
+
|
|
4
|
+
What the request\'s wallet (your active organization, `?org=`, or personal) pays for named snapshots. 10 are free per wallet; each one above costs $1.70 a month, charged daily from usage. An organization\'s count includes every member\'s names billed to it.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`org` | string
|
|
11
|
+
`orgName` | string
|
|
12
|
+
`free` | number
|
|
13
|
+
`used` | number
|
|
14
|
+
`extra` | number
|
|
15
|
+
`extraMonthlyDollars` | number
|
|
16
|
+
`extraDailyDollars` | number
|
|
17
|
+
`pricePerExtraMonthlyDollars` | number
|
|
18
|
+
|
|
19
|
+
## Example
|
|
20
|
+
|
|
21
|
+
```typescript
|
|
22
|
+
import type { NamedSnapshotAllowance } from '@boatdev/sdk'
|
|
23
|
+
|
|
24
|
+
// TODO: Update the object below with actual values
|
|
25
|
+
const example = {
|
|
26
|
+
"org": null,
|
|
27
|
+
"orgName": null,
|
|
28
|
+
"free": null,
|
|
29
|
+
"used": null,
|
|
30
|
+
"extra": null,
|
|
31
|
+
"extraMonthlyDollars": null,
|
|
32
|
+
"extraDailyDollars": null,
|
|
33
|
+
"pricePerExtraMonthlyDollars": null,
|
|
34
|
+
} satisfies NamedSnapshotAllowance
|
|
35
|
+
|
|
36
|
+
console.log(example)
|
|
37
|
+
|
|
38
|
+
// Convert the instance to a JSON string
|
|
39
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
40
|
+
console.log(exampleJSON)
|
|
41
|
+
|
|
42
|
+
// Parse the JSON string back to an object
|
|
43
|
+
const exampleParsed = JSON.parse(exampleJSON) as NamedSnapshotAllowance
|
|
44
|
+
console.log(exampleParsed)
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
@@ -9,6 +9,7 @@ Name | Type
|
|
|
9
9
|
`ok` | boolean
|
|
10
10
|
`type` | string
|
|
11
11
|
`snapshots` | [Array<NamedSnapshot>](NamedSnapshot.md)
|
|
12
|
+
`allowance` | [NamedSnapshotAllowance](NamedSnapshotAllowance.md)
|
|
12
13
|
|
|
13
14
|
## Example
|
|
14
15
|
|
|
@@ -20,6 +21,7 @@ const example = {
|
|
|
20
21
|
"ok": null,
|
|
21
22
|
"type": null,
|
|
22
23
|
"snapshots": null,
|
|
24
|
+
"allowance": null,
|
|
23
25
|
} satisfies NamedSnapshotListResponse
|
|
24
26
|
|
|
25
27
|
console.log(example)
|
package/docs/PromptRequest.md
CHANGED
|
@@ -10,6 +10,7 @@ Name | Type
|
|
|
10
10
|
`provider` | string
|
|
11
11
|
`model` | string
|
|
12
12
|
`reasoningEffort` | string
|
|
13
|
+
`fast` | boolean
|
|
13
14
|
`_new` | boolean
|
|
14
15
|
`conversationId` | string
|
|
15
16
|
`prompt` | string
|
|
@@ -24,6 +25,7 @@ const example = {
|
|
|
24
25
|
"provider": null,
|
|
25
26
|
"model": null,
|
|
26
27
|
"reasoningEffort": null,
|
|
28
|
+
"fast": null,
|
|
27
29
|
"_new": null,
|
|
28
30
|
"conversationId": null,
|
|
29
31
|
"prompt": null,
|
package/docs/PromptResponse.md
CHANGED
|
@@ -16,6 +16,7 @@ Name | Type
|
|
|
16
16
|
`provider` | string
|
|
17
17
|
`model` | string
|
|
18
18
|
`reasoningEffort` | string
|
|
19
|
+
`fast` | boolean
|
|
19
20
|
|
|
20
21
|
## Example
|
|
21
22
|
|
|
@@ -34,6 +35,7 @@ const example = {
|
|
|
34
35
|
"provider": null,
|
|
35
36
|
"model": null,
|
|
36
37
|
"reasoningEffort": null,
|
|
38
|
+
"fast": null,
|
|
37
39
|
} satisfies PromptResponse
|
|
38
40
|
|
|
39
41
|
console.log(example)
|
package/docs/PromptRun.md
CHANGED
|
@@ -14,6 +14,7 @@ Name | Type
|
|
|
14
14
|
`createdAt` | Date
|
|
15
15
|
`model` | string
|
|
16
16
|
`reasoningEffort` | string
|
|
17
|
+
`fast` | boolean
|
|
17
18
|
`conversationId` | string
|
|
18
19
|
|
|
19
20
|
## Example
|
|
@@ -31,6 +32,7 @@ const example = {
|
|
|
31
32
|
"createdAt": null,
|
|
32
33
|
"model": null,
|
|
33
34
|
"reasoningEffort": null,
|
|
35
|
+
"fast": null,
|
|
34
36
|
"conversationId": null,
|
|
35
37
|
} satisfies PromptRun
|
|
36
38
|
|
package/docs/Sandbox.md
CHANGED
|
@@ -31,6 +31,11 @@ Name | Type
|
|
|
31
31
|
`snapshotCompletedAt` | Date
|
|
32
32
|
`snapshotVerifiedAt` | Date
|
|
33
33
|
`team` | [SandboxTeam](SandboxTeam.md)
|
|
34
|
+
`createdBy` | string
|
|
35
|
+
`createdById` | string
|
|
36
|
+
`access` | string
|
|
37
|
+
`holdsCreatorLogins` | boolean
|
|
38
|
+
`wipePendingUntilRestart` | boolean
|
|
34
39
|
`subdomain` | string
|
|
35
40
|
`lastSnapshotAttemptAt` | Date
|
|
36
41
|
`lastSnapshotStatus` | string
|
|
@@ -71,6 +76,11 @@ const example = {
|
|
|
71
76
|
"snapshotCompletedAt": null,
|
|
72
77
|
"snapshotVerifiedAt": null,
|
|
73
78
|
"team": null,
|
|
79
|
+
"createdBy": null,
|
|
80
|
+
"createdById": null,
|
|
81
|
+
"access": null,
|
|
82
|
+
"holdsCreatorLogins": null,
|
|
83
|
+
"wipePendingUntilRestart": null,
|
|
74
84
|
"subdomain": null,
|
|
75
85
|
"lastSnapshotAttemptAt": null,
|
|
76
86
|
"lastSnapshotStatus": null,
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
|
|
2
|
+
# Share200Response
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`sandbox` | [Sandbox](Sandbox.md)
|
|
10
|
+
`restartRequired` | boolean
|
|
11
|
+
`message` | string
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import type { Share200Response } from '@boatdev/sdk'
|
|
17
|
+
|
|
18
|
+
// TODO: Update the object below with actual values
|
|
19
|
+
const example = {
|
|
20
|
+
"sandbox": null,
|
|
21
|
+
"restartRequired": null,
|
|
22
|
+
"message": null,
|
|
23
|
+
} satisfies Share200Response
|
|
24
|
+
|
|
25
|
+
console.log(example)
|
|
26
|
+
|
|
27
|
+
// Convert the instance to a JSON string
|
|
28
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
29
|
+
console.log(exampleJSON)
|
|
30
|
+
|
|
31
|
+
// Parse the JSON string back to an object
|
|
32
|
+
const exampleParsed = JSON.parse(exampleJSON) as Share200Response
|
|
33
|
+
console.log(exampleParsed)
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
[[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
package/src/apis/BoatApi.ts
CHANGED
|
@@ -303,6 +303,11 @@ import {
|
|
|
303
303
|
SetEnvironmentVarRequestFromJSON,
|
|
304
304
|
SetEnvironmentVarRequestToJSON,
|
|
305
305
|
} from '../models/SetEnvironmentVarRequest';
|
|
306
|
+
import {
|
|
307
|
+
type Share200Response,
|
|
308
|
+
Share200ResponseFromJSON,
|
|
309
|
+
Share200ResponseToJSON,
|
|
310
|
+
} from '../models/Share200Response';
|
|
306
311
|
import {
|
|
307
312
|
type SnapshotDownloadResponse,
|
|
308
313
|
SnapshotDownloadResponseFromJSON,
|
|
@@ -616,6 +621,8 @@ export interface RotateWebhookSigningSecretRequest {
|
|
|
616
621
|
}
|
|
617
622
|
|
|
618
623
|
export interface SandboxesRequest {
|
|
624
|
+
org?: string;
|
|
625
|
+
xBoatOrg?: string;
|
|
619
626
|
limit?: number;
|
|
620
627
|
cursor?: string | null;
|
|
621
628
|
sort?: SandboxesSortEnum;
|
|
@@ -645,6 +652,10 @@ export interface SetEnvironmentVarOperationRequest {
|
|
|
645
652
|
setEnvironmentVarRequest: SetEnvironmentVarRequest;
|
|
646
653
|
}
|
|
647
654
|
|
|
655
|
+
export interface ShareRequest {
|
|
656
|
+
sandboxId: string;
|
|
657
|
+
}
|
|
658
|
+
|
|
648
659
|
export interface SshKeyOperationRequest {
|
|
649
660
|
sandboxId: string;
|
|
650
661
|
sshKeyRequest: SshKeyRequest;
|
|
@@ -3650,6 +3661,10 @@ export class BoatApi extends runtime.BaseAPI {
|
|
|
3650
3661
|
async sandboxesRequestOpts(requestParameters: SandboxesRequest): Promise<runtime.RequestOpts> {
|
|
3651
3662
|
const queryParameters: any = {};
|
|
3652
3663
|
|
|
3664
|
+
if (requestParameters['org'] != null) {
|
|
3665
|
+
queryParameters['org'] = requestParameters['org'];
|
|
3666
|
+
}
|
|
3667
|
+
|
|
3653
3668
|
if (requestParameters['limit'] != null) {
|
|
3654
3669
|
queryParameters['limit'] = requestParameters['limit'];
|
|
3655
3670
|
}
|
|
@@ -3668,6 +3683,10 @@ export class BoatApi extends runtime.BaseAPI {
|
|
|
3668
3683
|
|
|
3669
3684
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
3670
3685
|
|
|
3686
|
+
if (requestParameters['xBoatOrg'] != null) {
|
|
3687
|
+
headerParameters['X-Boat-Org'] = String(requestParameters['xBoatOrg']);
|
|
3688
|
+
}
|
|
3689
|
+
|
|
3671
3690
|
if (this.configuration && this.configuration.accessToken) {
|
|
3672
3691
|
const token = this.configuration.accessToken;
|
|
3673
3692
|
const tokenString = await token("BoatBearerAuth", []);
|
|
@@ -3688,6 +3707,7 @@ export class BoatApi extends runtime.BaseAPI {
|
|
|
3688
3707
|
}
|
|
3689
3708
|
|
|
3690
3709
|
/**
|
|
3710
|
+
* Your sandboxes. In an organization\'s scope (the active wallet, `org`, or `X-Boat-Org`) the list also holds every sandbox that organization pays for, whoever created it; `createdBy` and `access` say whose it is and what you may do with it.
|
|
3691
3711
|
* List sandboxes
|
|
3692
3712
|
*/
|
|
3693
3713
|
async sandboxesRaw(requestParameters: SandboxesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SandboxListResponse>> {
|
|
@@ -3698,6 +3718,7 @@ export class BoatApi extends runtime.BaseAPI {
|
|
|
3698
3718
|
}
|
|
3699
3719
|
|
|
3700
3720
|
/**
|
|
3721
|
+
* Your sandboxes. In an organization\'s scope (the active wallet, `org`, or `X-Boat-Org`) the list also holds every sandbox that organization pays for, whoever created it; `createdBy` and `access` say whose it is and what you may do with it.
|
|
3701
3722
|
* List sandboxes
|
|
3702
3723
|
*/
|
|
3703
3724
|
async sandboxes(requestParameters: SandboxesRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SandboxListResponse> {
|
|
@@ -4066,6 +4087,61 @@ export class BoatApi extends runtime.BaseAPI {
|
|
|
4066
4087
|
return await response.value();
|
|
4067
4088
|
}
|
|
4068
4089
|
|
|
4090
|
+
/**
|
|
4091
|
+
* Creates request options for share without sending the request
|
|
4092
|
+
*/
|
|
4093
|
+
async shareRequestOpts(requestParameters: ShareRequest): Promise<runtime.RequestOpts> {
|
|
4094
|
+
if (requestParameters['sandboxId'] == null) {
|
|
4095
|
+
throw new runtime.RequiredError(
|
|
4096
|
+
'sandboxId',
|
|
4097
|
+
'Required parameter "sandboxId" was null or undefined when calling share().'
|
|
4098
|
+
);
|
|
4099
|
+
}
|
|
4100
|
+
|
|
4101
|
+
const queryParameters: any = {};
|
|
4102
|
+
|
|
4103
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
4104
|
+
|
|
4105
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
4106
|
+
const token = this.configuration.accessToken;
|
|
4107
|
+
const tokenString = await token("BoatBearerAuth", []);
|
|
4108
|
+
|
|
4109
|
+
if (tokenString) {
|
|
4110
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
4111
|
+
}
|
|
4112
|
+
}
|
|
4113
|
+
|
|
4114
|
+
let urlPath = `/sandboxes/{sandboxId}/share`;
|
|
4115
|
+
urlPath = urlPath.replace('{sandboxId}', encodeURIComponent(String(requestParameters['sandboxId'])));
|
|
4116
|
+
|
|
4117
|
+
return {
|
|
4118
|
+
path: urlPath,
|
|
4119
|
+
method: 'POST',
|
|
4120
|
+
headers: headerParameters,
|
|
4121
|
+
query: queryParameters,
|
|
4122
|
+
};
|
|
4123
|
+
}
|
|
4124
|
+
|
|
4125
|
+
/**
|
|
4126
|
+
* Let every member of the organization that pays for this sandbox use it. Your personal logins (GitHub token, Claude and Codex logins, environment secrets, the sandbox\'s own CLI key) are never pushed to it again and are wiped off its disk at its next start, so a teammate never acts as you. Files you wrote stay. One-way: the sandbox stays like a `noEnv` sandbox from then on. A running sandbox stays `view` for the organization until you stop and resume it (`restartRequired`). Only the person who created the sandbox can share it, and only a sandbox billed to an organization. Sharing an already shared sandbox is a no-op.
|
|
4127
|
+
* Share sandbox with the organization
|
|
4128
|
+
*/
|
|
4129
|
+
async shareRaw(requestParameters: ShareRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Share200Response>> {
|
|
4130
|
+
const requestOptions = await this.shareRequestOpts(requestParameters);
|
|
4131
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
4132
|
+
|
|
4133
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => Share200ResponseFromJSON(jsonValue));
|
|
4134
|
+
}
|
|
4135
|
+
|
|
4136
|
+
/**
|
|
4137
|
+
* Let every member of the organization that pays for this sandbox use it. Your personal logins (GitHub token, Claude and Codex logins, environment secrets, the sandbox\'s own CLI key) are never pushed to it again and are wiped off its disk at its next start, so a teammate never acts as you. Files you wrote stay. One-way: the sandbox stays like a `noEnv` sandbox from then on. A running sandbox stays `view` for the organization until you stop and resume it (`restartRequired`). Only the person who created the sandbox can share it, and only a sandbox billed to an organization. Sharing an already shared sandbox is a no-op.
|
|
4138
|
+
* Share sandbox with the organization
|
|
4139
|
+
*/
|
|
4140
|
+
async share(requestParameters: ShareRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Share200Response> {
|
|
4141
|
+
const response = await this.shareRaw(requestParameters, initOverrides);
|
|
4142
|
+
return await response.value();
|
|
4143
|
+
}
|
|
4144
|
+
|
|
4069
4145
|
/**
|
|
4070
4146
|
* Creates request options for sshKey without sending the request
|
|
4071
4147
|
*/
|