@boatdev/sdk 1.9.6 → 1.9.7
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 +76 -0
- package/dist/apis/BoatApi.js +199 -0
- package/dist/esm/apis/BoatApi.d.ts +76 -0
- package/dist/esm/apis/BoatApi.js +199 -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/SetCredentialKeyRequest.d.ts +6 -0
- package/dist/esm/models/SetCredentialKeyRequest.js +2 -0
- package/dist/esm/models/index.d.ts +2 -0
- package/dist/esm/models/index.js +2 -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/SetCredentialKeyRequest.d.ts +6 -0
- package/dist/models/SetCredentialKeyRequest.js +2 -0
- package/dist/models/index.d.ts +2 -0
- package/dist/models/index.js +2 -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/SetCredentialKeyRequest.md +2 -0
- package/package.json +1 -1
- package/src/apis/BoatApi.ts +307 -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/SetCredentialKeyRequest.ts +8 -0
- package/src/models/index.ts +2 -0
|
@@ -0,0 +1,64 @@
|
|
|
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 { CredentialId } from './CredentialId';
|
|
13
|
+
import type { CredentialAccount } from './CredentialAccount';
|
|
14
|
+
/**
|
|
15
|
+
*
|
|
16
|
+
* @export
|
|
17
|
+
* @interface CredentialAccountsResponse
|
|
18
|
+
*/
|
|
19
|
+
export interface CredentialAccountsResponse {
|
|
20
|
+
/**
|
|
21
|
+
*
|
|
22
|
+
* @type {boolean}
|
|
23
|
+
* @memberof CredentialAccountsResponse
|
|
24
|
+
*/
|
|
25
|
+
ok: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Stable success envelope discriminator added by v1.
|
|
28
|
+
* @type {string}
|
|
29
|
+
* @memberof CredentialAccountsResponse
|
|
30
|
+
*/
|
|
31
|
+
type: string;
|
|
32
|
+
/**
|
|
33
|
+
*
|
|
34
|
+
* @type {boolean}
|
|
35
|
+
* @memberof CredentialAccountsResponse
|
|
36
|
+
*/
|
|
37
|
+
success: boolean;
|
|
38
|
+
/**
|
|
39
|
+
*
|
|
40
|
+
* @type {string}
|
|
41
|
+
* @memberof CredentialAccountsResponse
|
|
42
|
+
*/
|
|
43
|
+
profileId: string;
|
|
44
|
+
/**
|
|
45
|
+
*
|
|
46
|
+
* @type {CredentialId}
|
|
47
|
+
* @memberof CredentialAccountsResponse
|
|
48
|
+
*/
|
|
49
|
+
credential: CredentialId;
|
|
50
|
+
/**
|
|
51
|
+
* In the order the accounts were added, so their numbers stay the same across switches. The one in use is marked `active`.
|
|
52
|
+
* @type {Array<CredentialAccount>}
|
|
53
|
+
* @memberof CredentialAccountsResponse
|
|
54
|
+
*/
|
|
55
|
+
accounts: Array<CredentialAccount>;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Check if a given object implements the CredentialAccountsResponse interface.
|
|
59
|
+
*/
|
|
60
|
+
export declare function instanceOfCredentialAccountsResponse(value: object): value is CredentialAccountsResponse;
|
|
61
|
+
export declare function CredentialAccountsResponseFromJSON(json: any): CredentialAccountsResponse;
|
|
62
|
+
export declare function CredentialAccountsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): CredentialAccountsResponse;
|
|
63
|
+
export declare function CredentialAccountsResponseToJSON(json: any): CredentialAccountsResponse;
|
|
64
|
+
export declare function CredentialAccountsResponseToJSONTyped(value?: CredentialAccountsResponse | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,72 @@
|
|
|
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.instanceOfCredentialAccountsResponse = instanceOfCredentialAccountsResponse;
|
|
17
|
+
exports.CredentialAccountsResponseFromJSON = CredentialAccountsResponseFromJSON;
|
|
18
|
+
exports.CredentialAccountsResponseFromJSONTyped = CredentialAccountsResponseFromJSONTyped;
|
|
19
|
+
exports.CredentialAccountsResponseToJSON = CredentialAccountsResponseToJSON;
|
|
20
|
+
exports.CredentialAccountsResponseToJSONTyped = CredentialAccountsResponseToJSONTyped;
|
|
21
|
+
const CredentialId_1 = require("./CredentialId");
|
|
22
|
+
const CredentialAccount_1 = require("./CredentialAccount");
|
|
23
|
+
/**
|
|
24
|
+
* Check if a given object implements the CredentialAccountsResponse interface.
|
|
25
|
+
*/
|
|
26
|
+
function instanceOfCredentialAccountsResponse(value) {
|
|
27
|
+
if (!('ok' in value) || value['ok'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
if (!('type' in value) || value['type'] === undefined)
|
|
30
|
+
return false;
|
|
31
|
+
if (!('success' in value) || value['success'] === undefined)
|
|
32
|
+
return false;
|
|
33
|
+
if (!('profileId' in value) || value['profileId'] === undefined)
|
|
34
|
+
return false;
|
|
35
|
+
if (!('credential' in value) || value['credential'] === undefined)
|
|
36
|
+
return false;
|
|
37
|
+
if (!('accounts' in value) || value['accounts'] === undefined)
|
|
38
|
+
return false;
|
|
39
|
+
return true;
|
|
40
|
+
}
|
|
41
|
+
function CredentialAccountsResponseFromJSON(json) {
|
|
42
|
+
return CredentialAccountsResponseFromJSONTyped(json, false);
|
|
43
|
+
}
|
|
44
|
+
function CredentialAccountsResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
45
|
+
if (json == null) {
|
|
46
|
+
return json;
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
'ok': json['ok'],
|
|
50
|
+
'type': json['type'],
|
|
51
|
+
'success': json['success'],
|
|
52
|
+
'profileId': json['profileId'],
|
|
53
|
+
'credential': (0, CredentialId_1.CredentialIdFromJSON)(json['credential']),
|
|
54
|
+
'accounts': (json['accounts'].map(CredentialAccount_1.CredentialAccountFromJSON)),
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
function CredentialAccountsResponseToJSON(json) {
|
|
58
|
+
return CredentialAccountsResponseToJSONTyped(json, false);
|
|
59
|
+
}
|
|
60
|
+
function CredentialAccountsResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
61
|
+
if (value == null) {
|
|
62
|
+
return value;
|
|
63
|
+
}
|
|
64
|
+
return {
|
|
65
|
+
'ok': value['ok'],
|
|
66
|
+
'type': value['type'],
|
|
67
|
+
'success': value['success'],
|
|
68
|
+
'profileId': value['profileId'],
|
|
69
|
+
'credential': (0, CredentialId_1.CredentialIdToJSON)(value['credential']),
|
|
70
|
+
'accounts': (value['accounts'].map(CredentialAccount_1.CredentialAccountToJSON)),
|
|
71
|
+
};
|
|
72
|
+
}
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
*/
|
|
12
12
|
import type { CredentialId } from './CredentialId';
|
|
13
13
|
import type { CredentialProfileOwner } from './CredentialProfileOwner';
|
|
14
|
+
import type { CredentialAccount } from './CredentialAccount';
|
|
14
15
|
/**
|
|
15
16
|
* A named set of AI credentials. Secret values are never returned.
|
|
16
17
|
* @export
|
|
@@ -53,6 +54,14 @@ export interface CredentialProfile {
|
|
|
53
54
|
* @memberof CredentialProfile
|
|
54
55
|
*/
|
|
55
56
|
connected: Array<CredentialId>;
|
|
57
|
+
/**
|
|
58
|
+
* Credentials with several accounts, keyed by credential id. Each lists every account (labels only), the one in use marked `active`.
|
|
59
|
+
* @type {{ [key: string]: Array<CredentialAccount>; }}
|
|
60
|
+
* @memberof CredentialProfile
|
|
61
|
+
*/
|
|
62
|
+
accounts?: {
|
|
63
|
+
[key: string]: Array<CredentialAccount>;
|
|
64
|
+
};
|
|
56
65
|
/**
|
|
57
66
|
* The names of the profile's custom APIs. Values are never returned.
|
|
58
67
|
* @type {Array<string>}
|
|
@@ -58,6 +58,7 @@ function CredentialProfileFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
58
58
|
'owner': (0, CredentialProfileOwner_1.CredentialProfileOwnerFromJSON)(json['owner']),
|
|
59
59
|
'canManage': json['canManage'],
|
|
60
60
|
'connected': (json['connected'].map(CredentialId_1.CredentialIdFromJSON)),
|
|
61
|
+
'accounts': json['accounts'] == null ? undefined : json['accounts'],
|
|
61
62
|
'customApis': json['customApis'],
|
|
62
63
|
'createdAt': (new Date(json['createdAt'])),
|
|
63
64
|
'updatedAt': (new Date(json['updatedAt'])),
|
|
@@ -77,6 +78,7 @@ function CredentialProfileToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
77
78
|
'owner': (0, CredentialProfileOwner_1.CredentialProfileOwnerToJSON)(value['owner']),
|
|
78
79
|
'canManage': value['canManage'],
|
|
79
80
|
'connected': (value['connected'].map(CredentialId_1.CredentialIdToJSON)),
|
|
81
|
+
'accounts': value['accounts'],
|
|
80
82
|
'customApis': value['customApis'],
|
|
81
83
|
'createdAt': value['createdAt'].toISOString(),
|
|
82
84
|
'updatedAt': value['updatedAt'].toISOString(),
|
|
@@ -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';
|
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);
|
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`.
|
|
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)
|