@boatdev/sdk 1.9.6 → 1.9.8
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 +8 -0
- package/README.md +2 -2
- package/dist/apis/BoatApi.d.ts +76 -0
- package/dist/apis/BoatApi.js +199 -0
- package/dist/boat-helpers.d.ts +23 -0
- package/dist/boat-helpers.js +97 -0
- package/dist/esm/apis/BoatApi.d.ts +76 -0
- package/dist/esm/apis/BoatApi.js +199 -0
- package/dist/esm/boat-helpers.d.ts +23 -0
- package/dist/esm/boat-helpers.js +95 -0
- package/dist/esm/models/CredentialAccount.d.ts +50 -0
- package/dist/esm/models/CredentialAccount.js +53 -0
- package/dist/esm/models/CredentialAccountsResponse.d.ts +64 -0
- package/dist/esm/models/CredentialAccountsResponse.js +65 -0
- package/dist/esm/models/CredentialProfile.d.ts +9 -0
- package/dist/esm/models/CredentialProfile.js +2 -0
- package/dist/esm/models/DeletionOperation.d.ts +1 -3
- package/dist/esm/models/DeletionOperation.js +0 -2
- package/dist/esm/models/LimitsFields.d.ts +7 -0
- package/dist/esm/models/LimitsFields.js +3 -0
- package/dist/esm/models/LimitsFieldsMachineTypesInner.d.ts +54 -0
- package/dist/esm/models/LimitsFieldsMachineTypesInner.js +60 -0
- package/dist/esm/models/LimitsResponse.d.ts +7 -0
- package/dist/esm/models/LimitsResponse.js +3 -0
- package/dist/esm/models/Sandbox.d.ts +15 -2
- package/dist/esm/models/Sandbox.js +5 -0
- package/dist/esm/models/SandboxHydration.d.ts +50 -0
- package/dist/esm/models/SandboxHydration.js +55 -0
- package/dist/esm/models/SetCredentialKeyRequest.d.ts +6 -0
- package/dist/esm/models/SetCredentialKeyRequest.js +2 -0
- package/dist/esm/models/index.d.ts +4 -0
- package/dist/esm/models/index.js +4 -0
- package/dist/models/CredentialAccount.d.ts +50 -0
- package/dist/models/CredentialAccount.js +60 -0
- package/dist/models/CredentialAccountsResponse.d.ts +64 -0
- package/dist/models/CredentialAccountsResponse.js +72 -0
- package/dist/models/CredentialProfile.d.ts +9 -0
- package/dist/models/CredentialProfile.js +2 -0
- package/dist/models/DeletionOperation.d.ts +1 -3
- package/dist/models/DeletionOperation.js +0 -2
- package/dist/models/LimitsFields.d.ts +7 -0
- package/dist/models/LimitsFields.js +3 -0
- package/dist/models/LimitsFieldsMachineTypesInner.d.ts +54 -0
- package/dist/models/LimitsFieldsMachineTypesInner.js +68 -0
- package/dist/models/LimitsResponse.d.ts +7 -0
- package/dist/models/LimitsResponse.js +3 -0
- package/dist/models/Sandbox.d.ts +15 -2
- package/dist/models/Sandbox.js +5 -0
- package/dist/models/SandboxHydration.d.ts +50 -0
- package/dist/models/SandboxHydration.js +62 -0
- package/dist/models/SetCredentialKeyRequest.d.ts +6 -0
- package/dist/models/SetCredentialKeyRequest.js +2 -0
- package/dist/models/index.d.ts +4 -0
- package/dist/models/index.js +4 -0
- package/docs/BoatApi.md +325 -0
- package/docs/CredentialAccount.md +39 -0
- package/docs/CredentialAccountsResponse.md +42 -0
- package/docs/CredentialProfile.md +2 -0
- package/docs/LimitsFields.md +2 -0
- package/docs/LimitsFieldsMachineTypesInner.md +36 -0
- package/docs/LimitsResponse.md +2 -0
- package/docs/Sandbox.md +4 -0
- package/docs/SandboxHydration.md +39 -0
- package/docs/SetCredentialKeyRequest.md +2 -0
- package/package.json +2 -2
- package/src/apis/BoatApi.ts +307 -0
- package/src/boat-helpers.ts +109 -0
- package/src/models/CredentialAccount.ts +92 -0
- package/src/models/CredentialAccountsResponse.ts +128 -0
- package/src/models/CredentialProfile.ts +15 -0
- package/src/models/DeletionOperation.ts +1 -3
- package/src/models/LimitsFields.ts +15 -0
- package/src/models/LimitsFieldsMachineTypesInner.ts +97 -0
- package/src/models/LimitsResponse.ts +15 -0
- package/src/models/Sandbox.ts +25 -2
- package/src/models/SandboxHydration.ts +93 -0
- package/src/models/SetCredentialKeyRequest.ts +8 -0
- package/src/models/index.ts +4 -0
|
@@ -0,0 +1,50 @@
|
|
|
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
|
+
/**
|
|
13
|
+
* Restore progress while `hydrated` is false, on GET /sandboxes/{id} only. Null in lists, after hydration, or when the sandbox does not answer within 1.5 s.
|
|
14
|
+
* @export
|
|
15
|
+
* @interface SandboxHydration
|
|
16
|
+
*/
|
|
17
|
+
export interface SandboxHydration {
|
|
18
|
+
/**
|
|
19
|
+
* Restore step: `dvol` (docker volumes), `sysdelta` (system files), `images` (saved docker images), `hydrating` (the home directory), `reconciling` (the last check). `degraded` and `stuck` mean a step failed and is retried.
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof SandboxHydration
|
|
22
|
+
*/
|
|
23
|
+
phase: string;
|
|
24
|
+
/**
|
|
25
|
+
* Files, directories and links copied in so far.
|
|
26
|
+
* @type {number}
|
|
27
|
+
* @memberof SandboxHydration
|
|
28
|
+
*/
|
|
29
|
+
entriesDone: number;
|
|
30
|
+
/**
|
|
31
|
+
* Files, directories and links this restore copies in. Null for the first seconds, until the system files are counted.
|
|
32
|
+
* @type {number}
|
|
33
|
+
* @memberof SandboxHydration
|
|
34
|
+
*/
|
|
35
|
+
entriesTotal: number | null;
|
|
36
|
+
/**
|
|
37
|
+
* entriesDone of entriesTotal, 0-99. Files you change during the restore are yours, not copied, so it can stop short of 99; `hydrated` is the end signal.
|
|
38
|
+
* @type {number}
|
|
39
|
+
* @memberof SandboxHydration
|
|
40
|
+
*/
|
|
41
|
+
percent: number | null;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Check if a given object implements the SandboxHydration interface.
|
|
45
|
+
*/
|
|
46
|
+
export declare function instanceOfSandboxHydration(value: object): value is SandboxHydration;
|
|
47
|
+
export declare function SandboxHydrationFromJSON(json: any): SandboxHydration;
|
|
48
|
+
export declare function SandboxHydrationFromJSONTyped(json: any, ignoreDiscriminator: boolean): SandboxHydration;
|
|
49
|
+
export declare function SandboxHydrationToJSON(json: any): SandboxHydration;
|
|
50
|
+
export declare function SandboxHydrationToJSONTyped(value?: SandboxHydration | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,62 @@
|
|
|
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.instanceOfSandboxHydration = instanceOfSandboxHydration;
|
|
17
|
+
exports.SandboxHydrationFromJSON = SandboxHydrationFromJSON;
|
|
18
|
+
exports.SandboxHydrationFromJSONTyped = SandboxHydrationFromJSONTyped;
|
|
19
|
+
exports.SandboxHydrationToJSON = SandboxHydrationToJSON;
|
|
20
|
+
exports.SandboxHydrationToJSONTyped = SandboxHydrationToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the SandboxHydration interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfSandboxHydration(value) {
|
|
25
|
+
if (!('phase' in value) || value['phase'] === undefined)
|
|
26
|
+
return false;
|
|
27
|
+
if (!('entriesDone' in value) || value['entriesDone'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
if (!('entriesTotal' in value) || value['entriesTotal'] === undefined)
|
|
30
|
+
return false;
|
|
31
|
+
if (!('percent' in value) || value['percent'] === undefined)
|
|
32
|
+
return false;
|
|
33
|
+
return true;
|
|
34
|
+
}
|
|
35
|
+
function SandboxHydrationFromJSON(json) {
|
|
36
|
+
return SandboxHydrationFromJSONTyped(json, false);
|
|
37
|
+
}
|
|
38
|
+
function SandboxHydrationFromJSONTyped(json, ignoreDiscriminator) {
|
|
39
|
+
if (json == null) {
|
|
40
|
+
return json;
|
|
41
|
+
}
|
|
42
|
+
return {
|
|
43
|
+
'phase': json['phase'],
|
|
44
|
+
'entriesDone': json['entriesDone'],
|
|
45
|
+
'entriesTotal': json['entriesTotal'],
|
|
46
|
+
'percent': json['percent'],
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
function SandboxHydrationToJSON(json) {
|
|
50
|
+
return SandboxHydrationToJSONTyped(json, false);
|
|
51
|
+
}
|
|
52
|
+
function SandboxHydrationToJSONTyped(value, ignoreDiscriminator = false) {
|
|
53
|
+
if (value == null) {
|
|
54
|
+
return value;
|
|
55
|
+
}
|
|
56
|
+
return {
|
|
57
|
+
'phase': value['phase'],
|
|
58
|
+
'entriesDone': value['entriesDone'],
|
|
59
|
+
'entriesTotal': value['entriesTotal'],
|
|
60
|
+
'percent': value['percent'],
|
|
61
|
+
};
|
|
62
|
+
}
|
|
@@ -21,6 +21,12 @@ export interface SetCredentialKeyRequest {
|
|
|
21
21
|
* @memberof SetCredentialKeyRequest
|
|
22
22
|
*/
|
|
23
23
|
value: string;
|
|
24
|
+
/**
|
|
25
|
+
* Keep the key this one replaces as another account of the credential, ready to switch back to.
|
|
26
|
+
* @type {boolean}
|
|
27
|
+
* @memberof SetCredentialKeyRequest
|
|
28
|
+
*/
|
|
29
|
+
keepCurrent?: boolean;
|
|
24
30
|
}
|
|
25
31
|
/**
|
|
26
32
|
* Check if a given object implements the SetCredentialKeyRequest interface.
|
|
@@ -35,6 +35,7 @@ function SetCredentialKeyRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
35
35
|
}
|
|
36
36
|
return {
|
|
37
37
|
'value': json['value'],
|
|
38
|
+
'keepCurrent': json['keepCurrent'] == null ? undefined : json['keepCurrent'],
|
|
38
39
|
};
|
|
39
40
|
}
|
|
40
41
|
function SetCredentialKeyRequestToJSON(json) {
|
|
@@ -46,5 +47,6 @@ function SetCredentialKeyRequestToJSONTyped(value, ignoreDiscriminator = false)
|
|
|
46
47
|
}
|
|
47
48
|
return {
|
|
48
49
|
'value': value['value'],
|
|
50
|
+
'keepCurrent': value['keepCurrent'],
|
|
49
51
|
};
|
|
50
52
|
}
|
package/dist/models/index.d.ts
CHANGED
|
@@ -41,6 +41,8 @@ export * from './CreateSandboxRequest';
|
|
|
41
41
|
export * from './CreateSandboxResponse';
|
|
42
42
|
export * from './CreateScopedApiKey503Response';
|
|
43
43
|
export * from './CreateScopedApiKeyRequest';
|
|
44
|
+
export * from './CredentialAccount';
|
|
45
|
+
export * from './CredentialAccountsResponse';
|
|
44
46
|
export * from './CredentialId';
|
|
45
47
|
export * from './CredentialProfile';
|
|
46
48
|
export * from './CredentialProfileDeletedResponse';
|
|
@@ -70,6 +72,7 @@ export * from './HostPortResponse';
|
|
|
70
72
|
export * from './LimitsFields';
|
|
71
73
|
export * from './LimitsFieldsCurrentLimits';
|
|
72
74
|
export * from './LimitsFieldsGiftLimit';
|
|
75
|
+
export * from './LimitsFieldsMachineTypesInner';
|
|
73
76
|
export * from './LimitsFieldsSandboxPlanTiersInner';
|
|
74
77
|
export * from './LimitsFieldsStartLimits';
|
|
75
78
|
export * from './LimitsFieldsStarts';
|
|
@@ -119,6 +122,7 @@ export * from './SandboxEnvironmentListResponse';
|
|
|
119
122
|
export * from './SandboxEnvironmentResponse';
|
|
120
123
|
export * from './SandboxEnvironmentVersionSummary';
|
|
121
124
|
export * from './SandboxEvent';
|
|
125
|
+
export * from './SandboxHydration';
|
|
122
126
|
export * from './SandboxInfoResponse';
|
|
123
127
|
export * from './SandboxListResponse';
|
|
124
128
|
export * from './SandboxProcess';
|
package/dist/models/index.js
CHANGED
|
@@ -59,6 +59,8 @@ __exportStar(require("./CreateSandboxRequest"), exports);
|
|
|
59
59
|
__exportStar(require("./CreateSandboxResponse"), exports);
|
|
60
60
|
__exportStar(require("./CreateScopedApiKey503Response"), exports);
|
|
61
61
|
__exportStar(require("./CreateScopedApiKeyRequest"), exports);
|
|
62
|
+
__exportStar(require("./CredentialAccount"), exports);
|
|
63
|
+
__exportStar(require("./CredentialAccountsResponse"), exports);
|
|
62
64
|
__exportStar(require("./CredentialId"), exports);
|
|
63
65
|
__exportStar(require("./CredentialProfile"), exports);
|
|
64
66
|
__exportStar(require("./CredentialProfileDeletedResponse"), exports);
|
|
@@ -88,6 +90,7 @@ __exportStar(require("./HostPortResponse"), exports);
|
|
|
88
90
|
__exportStar(require("./LimitsFields"), exports);
|
|
89
91
|
__exportStar(require("./LimitsFieldsCurrentLimits"), exports);
|
|
90
92
|
__exportStar(require("./LimitsFieldsGiftLimit"), exports);
|
|
93
|
+
__exportStar(require("./LimitsFieldsMachineTypesInner"), exports);
|
|
91
94
|
__exportStar(require("./LimitsFieldsSandboxPlanTiersInner"), exports);
|
|
92
95
|
__exportStar(require("./LimitsFieldsStartLimits"), exports);
|
|
93
96
|
__exportStar(require("./LimitsFieldsStarts"), exports);
|
|
@@ -137,6 +140,7 @@ __exportStar(require("./SandboxEnvironmentListResponse"), exports);
|
|
|
137
140
|
__exportStar(require("./SandboxEnvironmentResponse"), exports);
|
|
138
141
|
__exportStar(require("./SandboxEnvironmentVersionSummary"), exports);
|
|
139
142
|
__exportStar(require("./SandboxEvent"), exports);
|
|
143
|
+
__exportStar(require("./SandboxHydration"), exports);
|
|
140
144
|
__exportStar(require("./SandboxInfoResponse"), exports);
|
|
141
145
|
__exportStar(require("./SandboxListResponse"), exports);
|
|
142
146
|
__exportStar(require("./SandboxProcess"), exports);
|
package/docs/BoatApi.md
CHANGED
|
@@ -4,6 +4,7 @@ All URIs are relative to *https://boat.dev/api/v1*
|
|
|
4
4
|
|
|
5
5
|
| Method | HTTP request | Description |
|
|
6
6
|
|------------- | ------------- | -------------|
|
|
7
|
+
| [**addCredentialAccount**](BoatApi.md#addcredentialaccount) | **POST** /credential-profiles/{profile}/accounts/{credential} | Add another API key to a credential |
|
|
7
8
|
| [**addEnvironmentRepo**](BoatApi.md#addenvironmentrepooperation) | **POST** /environments/{environmentId}/repos | Add a repository to an environment |
|
|
8
9
|
| [**apiKeyUsage**](BoatApi.md#apikeyusage) | **GET** /api-keys/{apiKeyId}/usage | Get API key usage |
|
|
9
10
|
| [**apiKeys**](BoatApi.md#apikeys) | **GET** /api-keys | List API keys |
|
|
@@ -22,6 +23,7 @@ All URIs are relative to *https://boat.dev/api/v1*
|
|
|
22
23
|
| [**createSnapshotShare**](BoatApi.md#createsnapshotshare) | **POST** /named-snapshots/{name}/shares | Share a named snapshot |
|
|
23
24
|
| [**createUploadUrl**](BoatApi.md#createuploadurl) | **POST** /sandboxes/{sandboxId}/files/upload-url | Get an upload URL for a sandbox file |
|
|
24
25
|
| [**createWebhook**](BoatApi.md#createwebhook) | **POST** /webhooks | Create webhook |
|
|
26
|
+
| [**deleteCredentialAccount**](BoatApi.md#deletecredentialaccount) | **DELETE** /credential-profiles/{profile}/accounts/{credential}/{account} | Forget an account of a credential |
|
|
25
27
|
| [**deleteCredentialProfile**](BoatApi.md#deletecredentialprofile) | **DELETE** /credential-profiles/{profile} | Delete a credential profile |
|
|
26
28
|
| [**deleteCredentialProfileCustomApi**](BoatApi.md#deletecredentialprofilecustomapi) | **DELETE** /credential-profiles/{profile}/custom-apis/{name} | Remove a custom API |
|
|
27
29
|
| [**deleteCredentialProfileKey**](BoatApi.md#deletecredentialprofilekey) | **DELETE** /credential-profiles/{profile}/keys/{credential} | Remove a credential profile credential |
|
|
@@ -57,6 +59,7 @@ All URIs are relative to *https://boat.dev/api/v1*
|
|
|
57
59
|
| [**hostPort**](BoatApi.md#hostportoperation) | **POST** /sandboxes/{sandboxId}/host | Expose a sandbox port on a public HTTPS URL |
|
|
58
60
|
| [**interrupt**](BoatApi.md#interrupt) | **POST** /sandboxes/{sandboxId}/interrupt | Interrupt running work |
|
|
59
61
|
| [**limits**](BoatApi.md#limits) | **GET** /limits | Get Boat limits |
|
|
62
|
+
| [**listCredentialAccounts**](BoatApi.md#listcredentialaccounts) | **GET** /credential-profiles/{profile}/accounts/{credential} | List the accounts of a credential |
|
|
60
63
|
| [**listCredentialProfiles**](BoatApi.md#listcredentialprofiles) | **GET** /credential-profiles | List credential profiles |
|
|
61
64
|
| [**listNamedSnapshots**](BoatApi.md#listnamedsnapshots) | **GET** /named-snapshots | List named snapshots |
|
|
62
65
|
| [**listOrganizations**](BoatApi.md#listorganizations) | **GET** /orgs | List organizations |
|
|
@@ -92,6 +95,7 @@ All URIs are relative to *https://boat.dev/api/v1*
|
|
|
92
95
|
| [**steer**](BoatApi.md#steeroperation) | **POST** /sandboxes/{sandboxId}/steer | Steer a running turn |
|
|
93
96
|
| [**stop**](BoatApi.md#stopoperation) | **POST** /sandboxes/{sandboxId}/stop | Stop and archive sandbox |
|
|
94
97
|
| [**stopCommand**](BoatApi.md#stopcommand) | **DELETE** /sandboxes/{sandboxId}/commands/{processId} | Stop a detached command |
|
|
98
|
+
| [**switchCredentialAccount**](BoatApi.md#switchcredentialaccount) | **PUT** /credential-profiles/{profile}/accounts/{credential}/{account}/active | Switch a credential to another account |
|
|
95
99
|
| [**update**](BoatApi.md#update) | **PATCH** /sandboxes/{sandboxId} | Update sandbox |
|
|
96
100
|
| [**updateAiProxy**](BoatApi.md#updateaiproxyoperation) | **PUT** /ai-proxy | Turn the AI credentials proxy on or off |
|
|
97
101
|
| [**updateCredentialProfile**](BoatApi.md#updatecredentialprofileoperation) | **PUT** /credential-profiles/{profile} | Update a credential profile |
|
|
@@ -105,6 +109,87 @@ All URIs are relative to *https://boat.dev/api/v1*
|
|
|
105
109
|
|
|
106
110
|
|
|
107
111
|
|
|
112
|
+
## addCredentialAccount
|
|
113
|
+
|
|
114
|
+
> CredentialAccountsResponse addCredentialAccount(profile, credential, setCredentialKeyRequest)
|
|
115
|
+
|
|
116
|
+
Add another API key to a credential
|
|
117
|
+
|
|
118
|
+
Adds an API key as another account of the credential, ready to switch to. The first key of a credential becomes the one in use. A sign-in returns `400 not_an_api_key`; add another sign-in with \"Add another account\" on the dashboard. Needs an API key with `account.admin`.
|
|
119
|
+
|
|
120
|
+
### Example
|
|
121
|
+
|
|
122
|
+
```ts
|
|
123
|
+
import {
|
|
124
|
+
Configuration,
|
|
125
|
+
BoatApi,
|
|
126
|
+
} from '@boatdev/sdk';
|
|
127
|
+
import type { AddCredentialAccountRequest } from '@boatdev/sdk';
|
|
128
|
+
|
|
129
|
+
async function example() {
|
|
130
|
+
console.log("🚀 Testing @boatdev/sdk SDK...");
|
|
131
|
+
const config = new Configuration({
|
|
132
|
+
// Configure HTTP bearer authorization: BoatBearerAuth
|
|
133
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
134
|
+
});
|
|
135
|
+
const api = new BoatApi(config);
|
|
136
|
+
|
|
137
|
+
const body = {
|
|
138
|
+
// string | Profile id or name.
|
|
139
|
+
profile: profile_example,
|
|
140
|
+
// CredentialId
|
|
141
|
+
credential: ...,
|
|
142
|
+
// SetCredentialKeyRequest
|
|
143
|
+
setCredentialKeyRequest: ...,
|
|
144
|
+
} satisfies AddCredentialAccountRequest;
|
|
145
|
+
|
|
146
|
+
try {
|
|
147
|
+
const data = await api.addCredentialAccount(body);
|
|
148
|
+
console.log(data);
|
|
149
|
+
} catch (error) {
|
|
150
|
+
console.error(error);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
// Run the test
|
|
155
|
+
example().catch(console.error);
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
### Parameters
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
| Name | Type | Description | Notes |
|
|
162
|
+
|------------- | ------------- | ------------- | -------------|
|
|
163
|
+
| **profile** | `string` | Profile id or name. | [Defaults to `undefined`] |
|
|
164
|
+
| **credential** | `CredentialId` | | [Defaults to `undefined`] [Enum: anthropic-api-key, openai-api-key, openrouter-api-key, llmgateway-api-key, deepseek-api-key, moonshot-api-key, mistral-api-key, claude-subscription, chatgpt-subscription, kimi-subscription, mistral-vibe-subscription, claude-bedrock, codex-bedrock] |
|
|
165
|
+
| **setCredentialKeyRequest** | [SetCredentialKeyRequest](SetCredentialKeyRequest.md) | | |
|
|
166
|
+
|
|
167
|
+
### Return type
|
|
168
|
+
|
|
169
|
+
[**CredentialAccountsResponse**](CredentialAccountsResponse.md)
|
|
170
|
+
|
|
171
|
+
### Authorization
|
|
172
|
+
|
|
173
|
+
[BoatBearerAuth](../README.md#BoatBearerAuth)
|
|
174
|
+
|
|
175
|
+
### HTTP request headers
|
|
176
|
+
|
|
177
|
+
- **Content-Type**: `application/json`
|
|
178
|
+
- **Accept**: `application/json`
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
### HTTP response details
|
|
182
|
+
| Status code | Description | Response headers |
|
|
183
|
+
|-------------|-------------|------------------|
|
|
184
|
+
| **201** | The accounts, the new one included. | - |
|
|
185
|
+
| **400** | Invalid request body or parameters. | - |
|
|
186
|
+
| **401** | Missing or invalid bearer token. | - |
|
|
187
|
+
| **403** | Authenticated token is not allowed to perform this action. | - |
|
|
188
|
+
| **404** | Resource not found. | - |
|
|
189
|
+
|
|
190
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
191
|
+
|
|
192
|
+
|
|
108
193
|
## addEnvironmentRepo
|
|
109
194
|
|
|
110
195
|
> EnvironmentItemChangeResponse addEnvironmentRepo(environmentId, addEnvironmentRepoRequest, org)
|
|
@@ -1510,6 +1595,87 @@ example().catch(console.error);
|
|
|
1510
1595
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1511
1596
|
|
|
1512
1597
|
|
|
1598
|
+
## deleteCredentialAccount
|
|
1599
|
+
|
|
1600
|
+
> CredentialAccountsResponse deleteCredentialAccount(profile, credential, account)
|
|
1601
|
+
|
|
1602
|
+
Forget an account of a credential
|
|
1603
|
+
|
|
1604
|
+
Deletes an account. For the account in use, the credential switches to another account first, or is removed when it was the last one. Needs an API key with `account.admin`.
|
|
1605
|
+
|
|
1606
|
+
### Example
|
|
1607
|
+
|
|
1608
|
+
```ts
|
|
1609
|
+
import {
|
|
1610
|
+
Configuration,
|
|
1611
|
+
BoatApi,
|
|
1612
|
+
} from '@boatdev/sdk';
|
|
1613
|
+
import type { DeleteCredentialAccountRequest } from '@boatdev/sdk';
|
|
1614
|
+
|
|
1615
|
+
async function example() {
|
|
1616
|
+
console.log("🚀 Testing @boatdev/sdk SDK...");
|
|
1617
|
+
const config = new Configuration({
|
|
1618
|
+
// Configure HTTP bearer authorization: BoatBearerAuth
|
|
1619
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
1620
|
+
});
|
|
1621
|
+
const api = new BoatApi(config);
|
|
1622
|
+
|
|
1623
|
+
const body = {
|
|
1624
|
+
// string | Profile id or name.
|
|
1625
|
+
profile: profile_example,
|
|
1626
|
+
// CredentialId
|
|
1627
|
+
credential: ...,
|
|
1628
|
+
// string | The account id from the list.
|
|
1629
|
+
account: account_example,
|
|
1630
|
+
} satisfies DeleteCredentialAccountRequest;
|
|
1631
|
+
|
|
1632
|
+
try {
|
|
1633
|
+
const data = await api.deleteCredentialAccount(body);
|
|
1634
|
+
console.log(data);
|
|
1635
|
+
} catch (error) {
|
|
1636
|
+
console.error(error);
|
|
1637
|
+
}
|
|
1638
|
+
}
|
|
1639
|
+
|
|
1640
|
+
// Run the test
|
|
1641
|
+
example().catch(console.error);
|
|
1642
|
+
```
|
|
1643
|
+
|
|
1644
|
+
### Parameters
|
|
1645
|
+
|
|
1646
|
+
|
|
1647
|
+
| Name | Type | Description | Notes |
|
|
1648
|
+
|------------- | ------------- | ------------- | -------------|
|
|
1649
|
+
| **profile** | `string` | Profile id or name. | [Defaults to `undefined`] |
|
|
1650
|
+
| **credential** | `CredentialId` | | [Defaults to `undefined`] [Enum: anthropic-api-key, openai-api-key, openrouter-api-key, llmgateway-api-key, deepseek-api-key, moonshot-api-key, mistral-api-key, claude-subscription, chatgpt-subscription, kimi-subscription, mistral-vibe-subscription, claude-bedrock, codex-bedrock] |
|
|
1651
|
+
| **account** | `string` | The account id from the list. | [Defaults to `undefined`] |
|
|
1652
|
+
|
|
1653
|
+
### Return type
|
|
1654
|
+
|
|
1655
|
+
[**CredentialAccountsResponse**](CredentialAccountsResponse.md)
|
|
1656
|
+
|
|
1657
|
+
### Authorization
|
|
1658
|
+
|
|
1659
|
+
[BoatBearerAuth](../README.md#BoatBearerAuth)
|
|
1660
|
+
|
|
1661
|
+
### HTTP request headers
|
|
1662
|
+
|
|
1663
|
+
- **Content-Type**: Not defined
|
|
1664
|
+
- **Accept**: `application/json`
|
|
1665
|
+
|
|
1666
|
+
|
|
1667
|
+
### HTTP response details
|
|
1668
|
+
| Status code | Description | Response headers |
|
|
1669
|
+
|-------------|-------------|------------------|
|
|
1670
|
+
| **200** | The accounts left. | - |
|
|
1671
|
+
| **400** | Invalid request body or parameters. | - |
|
|
1672
|
+
| **401** | Missing or invalid bearer token. | - |
|
|
1673
|
+
| **403** | Authenticated token is not allowed to perform this action. | - |
|
|
1674
|
+
| **404** | Resource not found. | - |
|
|
1675
|
+
|
|
1676
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1677
|
+
|
|
1678
|
+
|
|
1513
1679
|
## deleteCredentialProfile
|
|
1514
1680
|
|
|
1515
1681
|
> CredentialProfileDeletedResponse deleteCredentialProfile(profile)
|
|
@@ -4159,6 +4325,84 @@ example().catch(console.error);
|
|
|
4159
4325
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
4160
4326
|
|
|
4161
4327
|
|
|
4328
|
+
## listCredentialAccounts
|
|
4329
|
+
|
|
4330
|
+
> CredentialAccountsResponse listCredentialAccounts(profile, credential)
|
|
4331
|
+
|
|
4332
|
+
List the accounts of a credential
|
|
4333
|
+
|
|
4334
|
+
Every account of one credential (several ChatGPT sign-ins, several OpenAI keys), in the order they were added, the one in use marked. Labels only, never a secret. Needs an API key with `account.admin`, on a profile you manage: an org member who only uses an org profile gets `403`.
|
|
4335
|
+
|
|
4336
|
+
### Example
|
|
4337
|
+
|
|
4338
|
+
```ts
|
|
4339
|
+
import {
|
|
4340
|
+
Configuration,
|
|
4341
|
+
BoatApi,
|
|
4342
|
+
} from '@boatdev/sdk';
|
|
4343
|
+
import type { ListCredentialAccountsRequest } from '@boatdev/sdk';
|
|
4344
|
+
|
|
4345
|
+
async function example() {
|
|
4346
|
+
console.log("🚀 Testing @boatdev/sdk SDK...");
|
|
4347
|
+
const config = new Configuration({
|
|
4348
|
+
// Configure HTTP bearer authorization: BoatBearerAuth
|
|
4349
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
4350
|
+
});
|
|
4351
|
+
const api = new BoatApi(config);
|
|
4352
|
+
|
|
4353
|
+
const body = {
|
|
4354
|
+
// string | Profile id or name.
|
|
4355
|
+
profile: profile_example,
|
|
4356
|
+
// CredentialId
|
|
4357
|
+
credential: ...,
|
|
4358
|
+
} satisfies ListCredentialAccountsRequest;
|
|
4359
|
+
|
|
4360
|
+
try {
|
|
4361
|
+
const data = await api.listCredentialAccounts(body);
|
|
4362
|
+
console.log(data);
|
|
4363
|
+
} catch (error) {
|
|
4364
|
+
console.error(error);
|
|
4365
|
+
}
|
|
4366
|
+
}
|
|
4367
|
+
|
|
4368
|
+
// Run the test
|
|
4369
|
+
example().catch(console.error);
|
|
4370
|
+
```
|
|
4371
|
+
|
|
4372
|
+
### Parameters
|
|
4373
|
+
|
|
4374
|
+
|
|
4375
|
+
| Name | Type | Description | Notes |
|
|
4376
|
+
|------------- | ------------- | ------------- | -------------|
|
|
4377
|
+
| **profile** | `string` | Profile id or name. | [Defaults to `undefined`] |
|
|
4378
|
+
| **credential** | `CredentialId` | | [Defaults to `undefined`] [Enum: anthropic-api-key, openai-api-key, openrouter-api-key, llmgateway-api-key, deepseek-api-key, moonshot-api-key, mistral-api-key, claude-subscription, chatgpt-subscription, kimi-subscription, mistral-vibe-subscription, claude-bedrock, codex-bedrock] |
|
|
4379
|
+
|
|
4380
|
+
### Return type
|
|
4381
|
+
|
|
4382
|
+
[**CredentialAccountsResponse**](CredentialAccountsResponse.md)
|
|
4383
|
+
|
|
4384
|
+
### Authorization
|
|
4385
|
+
|
|
4386
|
+
[BoatBearerAuth](../README.md#BoatBearerAuth)
|
|
4387
|
+
|
|
4388
|
+
### HTTP request headers
|
|
4389
|
+
|
|
4390
|
+
- **Content-Type**: Not defined
|
|
4391
|
+
- **Accept**: `application/json`
|
|
4392
|
+
|
|
4393
|
+
|
|
4394
|
+
### HTTP response details
|
|
4395
|
+
| Status code | Description | Response headers |
|
|
4396
|
+
|-------------|-------------|------------------|
|
|
4397
|
+
| **200** | The accounts. | - |
|
|
4398
|
+
| **400** | Invalid request body or parameters. | - |
|
|
4399
|
+
| **401** | Missing or invalid bearer token. | - |
|
|
4400
|
+
| **403** | Authenticated token is not allowed to perform this action. | - |
|
|
4401
|
+
| **404** | Resource not found. | - |
|
|
4402
|
+
|
|
4403
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
4404
|
+
|
|
4405
|
+
|
|
4162
4406
|
## listCredentialProfiles
|
|
4163
4407
|
|
|
4164
4408
|
> CredentialProfileListResponse listCredentialProfiles()
|
|
@@ -6800,6 +7044,87 @@ example().catch(console.error);
|
|
|
6800
7044
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
6801
7045
|
|
|
6802
7046
|
|
|
7047
|
+
## switchCredentialAccount
|
|
7048
|
+
|
|
7049
|
+
> CredentialAccountsResponse switchCredentialAccount(profile, credential, account)
|
|
7050
|
+
|
|
7051
|
+
Switch a credential to another account
|
|
7052
|
+
|
|
7053
|
+
Makes this account the one in use; the previous one stays as another account. Switching to the account already in use changes nothing. Every sandbox that uses the profile gets it at once, running ones included, with no restart. Use it when one account runs out of credits. Needs an API key with `account.admin`.
|
|
7054
|
+
|
|
7055
|
+
### Example
|
|
7056
|
+
|
|
7057
|
+
```ts
|
|
7058
|
+
import {
|
|
7059
|
+
Configuration,
|
|
7060
|
+
BoatApi,
|
|
7061
|
+
} from '@boatdev/sdk';
|
|
7062
|
+
import type { SwitchCredentialAccountRequest } from '@boatdev/sdk';
|
|
7063
|
+
|
|
7064
|
+
async function example() {
|
|
7065
|
+
console.log("🚀 Testing @boatdev/sdk SDK...");
|
|
7066
|
+
const config = new Configuration({
|
|
7067
|
+
// Configure HTTP bearer authorization: BoatBearerAuth
|
|
7068
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
7069
|
+
});
|
|
7070
|
+
const api = new BoatApi(config);
|
|
7071
|
+
|
|
7072
|
+
const body = {
|
|
7073
|
+
// string | Profile id or name.
|
|
7074
|
+
profile: profile_example,
|
|
7075
|
+
// CredentialId
|
|
7076
|
+
credential: ...,
|
|
7077
|
+
// string | The account id from the list.
|
|
7078
|
+
account: account_example,
|
|
7079
|
+
} satisfies SwitchCredentialAccountRequest;
|
|
7080
|
+
|
|
7081
|
+
try {
|
|
7082
|
+
const data = await api.switchCredentialAccount(body);
|
|
7083
|
+
console.log(data);
|
|
7084
|
+
} catch (error) {
|
|
7085
|
+
console.error(error);
|
|
7086
|
+
}
|
|
7087
|
+
}
|
|
7088
|
+
|
|
7089
|
+
// Run the test
|
|
7090
|
+
example().catch(console.error);
|
|
7091
|
+
```
|
|
7092
|
+
|
|
7093
|
+
### Parameters
|
|
7094
|
+
|
|
7095
|
+
|
|
7096
|
+
| Name | Type | Description | Notes |
|
|
7097
|
+
|------------- | ------------- | ------------- | -------------|
|
|
7098
|
+
| **profile** | `string` | Profile id or name. | [Defaults to `undefined`] |
|
|
7099
|
+
| **credential** | `CredentialId` | | [Defaults to `undefined`] [Enum: anthropic-api-key, openai-api-key, openrouter-api-key, llmgateway-api-key, deepseek-api-key, moonshot-api-key, mistral-api-key, claude-subscription, chatgpt-subscription, kimi-subscription, mistral-vibe-subscription, claude-bedrock, codex-bedrock] |
|
|
7100
|
+
| **account** | `string` | The account id from the list. | [Defaults to `undefined`] |
|
|
7101
|
+
|
|
7102
|
+
### Return type
|
|
7103
|
+
|
|
7104
|
+
[**CredentialAccountsResponse**](CredentialAccountsResponse.md)
|
|
7105
|
+
|
|
7106
|
+
### Authorization
|
|
7107
|
+
|
|
7108
|
+
[BoatBearerAuth](../README.md#BoatBearerAuth)
|
|
7109
|
+
|
|
7110
|
+
### HTTP request headers
|
|
7111
|
+
|
|
7112
|
+
- **Content-Type**: Not defined
|
|
7113
|
+
- **Accept**: `application/json`
|
|
7114
|
+
|
|
7115
|
+
|
|
7116
|
+
### HTTP response details
|
|
7117
|
+
| Status code | Description | Response headers |
|
|
7118
|
+
|-------------|-------------|------------------|
|
|
7119
|
+
| **200** | The accounts after the switch. | - |
|
|
7120
|
+
| **400** | Invalid request body or parameters. | - |
|
|
7121
|
+
| **401** | Missing or invalid bearer token. | - |
|
|
7122
|
+
| **403** | Authenticated token is not allowed to perform this action. | - |
|
|
7123
|
+
| **404** | Resource not found. | - |
|
|
7124
|
+
|
|
7125
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
7126
|
+
|
|
7127
|
+
|
|
6803
7128
|
## update
|
|
6804
7129
|
|
|
6805
7130
|
> SandboxInfoResponse update(sandboxId, updateSandboxRequest)
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
|
|
2
|
+
# CredentialAccount
|
|
3
|
+
|
|
4
|
+
One account of a credential. Never a secret.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`id` | string
|
|
11
|
+
`label` | string
|
|
12
|
+
`active` | boolean
|
|
13
|
+
`addedAt` | Date
|
|
14
|
+
|
|
15
|
+
## Example
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
import type { CredentialAccount } from '@boatdev/sdk'
|
|
19
|
+
|
|
20
|
+
// TODO: Update the object below with actual values
|
|
21
|
+
const example = {
|
|
22
|
+
"id": null,
|
|
23
|
+
"label": null,
|
|
24
|
+
"active": null,
|
|
25
|
+
"addedAt": null,
|
|
26
|
+
} satisfies CredentialAccount
|
|
27
|
+
|
|
28
|
+
console.log(example)
|
|
29
|
+
|
|
30
|
+
// Convert the instance to a JSON string
|
|
31
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
32
|
+
console.log(exampleJSON)
|
|
33
|
+
|
|
34
|
+
// Parse the JSON string back to an object
|
|
35
|
+
const exampleParsed = JSON.parse(exampleJSON) as CredentialAccount
|
|
36
|
+
console.log(exampleParsed)
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
[[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,42 @@
|
|
|
1
|
+
|
|
2
|
+
# CredentialAccountsResponse
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`ok` | boolean
|
|
10
|
+
`type` | string
|
|
11
|
+
`success` | boolean
|
|
12
|
+
`profileId` | string
|
|
13
|
+
`credential` | [CredentialId](CredentialId.md)
|
|
14
|
+
`accounts` | [Array<CredentialAccount>](CredentialAccount.md)
|
|
15
|
+
|
|
16
|
+
## Example
|
|
17
|
+
|
|
18
|
+
```typescript
|
|
19
|
+
import type { CredentialAccountsResponse } from '@boatdev/sdk'
|
|
20
|
+
|
|
21
|
+
// TODO: Update the object below with actual values
|
|
22
|
+
const example = {
|
|
23
|
+
"ok": null,
|
|
24
|
+
"type": null,
|
|
25
|
+
"success": null,
|
|
26
|
+
"profileId": null,
|
|
27
|
+
"credential": null,
|
|
28
|
+
"accounts": null,
|
|
29
|
+
} satisfies CredentialAccountsResponse
|
|
30
|
+
|
|
31
|
+
console.log(example)
|
|
32
|
+
|
|
33
|
+
// Convert the instance to a JSON string
|
|
34
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
35
|
+
console.log(exampleJSON)
|
|
36
|
+
|
|
37
|
+
// Parse the JSON string back to an object
|
|
38
|
+
const exampleParsed = JSON.parse(exampleJSON) as CredentialAccountsResponse
|
|
39
|
+
console.log(exampleParsed)
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
@@ -13,6 +13,7 @@ Name | Type
|
|
|
13
13
|
`owner` | [CredentialProfileOwner](CredentialProfileOwner.md)
|
|
14
14
|
`canManage` | boolean
|
|
15
15
|
`connected` | [Array<CredentialId>](CredentialId.md)
|
|
16
|
+
`accounts` | { [key: string]: Array<CredentialAccount>; }
|
|
16
17
|
`customApis` | Array<string>
|
|
17
18
|
`createdAt` | Date
|
|
18
19
|
`updatedAt` | Date
|
|
@@ -30,6 +31,7 @@ const example = {
|
|
|
30
31
|
"owner": null,
|
|
31
32
|
"canManage": null,
|
|
32
33
|
"connected": null,
|
|
34
|
+
"accounts": null,
|
|
33
35
|
"customApis": null,
|
|
34
36
|
"createdAt": null,
|
|
35
37
|
"updatedAt": null,
|
package/docs/LimitsFields.md
CHANGED
|
@@ -47,6 +47,7 @@ Name | Type
|
|
|
47
47
|
`last24hUsageSeconds` | number
|
|
48
48
|
`trialComputeCapSeconds` | number
|
|
49
49
|
`trialLine` | string
|
|
50
|
+
`machineTypes` | [Array<LimitsFieldsMachineTypesInner>](LimitsFieldsMachineTypesInner.md)
|
|
50
51
|
`giftLimit` | [LimitsFieldsGiftLimit](LimitsFieldsGiftLimit.md)
|
|
51
52
|
`billingStatus` | string
|
|
52
53
|
`subscriptionStatus` | string
|
|
@@ -106,6 +107,7 @@ const example = {
|
|
|
106
107
|
"last24hUsageSeconds": null,
|
|
107
108
|
"trialComputeCapSeconds": null,
|
|
108
109
|
"trialLine": null,
|
|
110
|
+
"machineTypes": null,
|
|
109
111
|
"giftLimit": null,
|
|
110
112
|
"billingStatus": null,
|
|
111
113
|
"subscriptionStatus": null,
|