@boatdev/sdk 1.9.5 → 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 +44 -0
- package/dist/apis/BoatApi.d.ts +339 -3
- package/dist/apis/BoatApi.js +865 -15
- package/dist/esm/apis/BoatApi.d.ts +339 -3
- package/dist/esm/apis/BoatApi.js +865 -15
- package/dist/esm/models/AccountAiUsageResponse.d.ts +83 -0
- package/dist/esm/models/AccountAiUsageResponse.js +78 -0
- package/dist/esm/models/AiProxySettings.d.ts +81 -0
- package/dist/esm/models/AiProxySettings.js +76 -0
- package/dist/esm/models/AiProxySettingsAllOfPricing.d.ts +38 -0
- package/dist/esm/models/AiProxySettingsAllOfPricing.js +47 -0
- package/dist/esm/models/AiUsageRow.d.ts +80 -0
- package/dist/esm/models/AiUsageRow.js +75 -0
- package/dist/esm/models/AiUsageTotals.d.ts +62 -0
- package/dist/esm/models/AiUsageTotals.js +63 -0
- package/dist/esm/models/CreateCredentialProfileRequest.d.ts +44 -0
- package/dist/esm/models/CreateCredentialProfileRequest.js +47 -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/CredentialId.d.ts +36 -0
- package/dist/esm/models/CredentialId.js +54 -0
- package/dist/esm/models/CredentialProfile.d.ts +91 -0
- package/dist/esm/models/CredentialProfile.js +79 -0
- package/dist/esm/models/CredentialProfileDeletedResponse.d.ts +44 -0
- package/dist/esm/models/CredentialProfileDeletedResponse.js +51 -0
- package/dist/esm/models/CredentialProfileListResponse.d.ts +45 -0
- package/dist/esm/models/CredentialProfileListResponse.js +52 -0
- package/dist/esm/models/CredentialProfileOwner.d.ts +58 -0
- package/dist/esm/models/CredentialProfileOwner.js +62 -0
- package/dist/esm/models/CredentialProfileResponse.d.ts +51 -0
- package/dist/esm/models/CredentialProfileResponse.js +56 -0
- package/dist/esm/models/ProcessListResponse.d.ts +1 -1
- package/dist/esm/models/SandboxAiAccessResponse.d.ts +56 -0
- package/dist/esm/models/SandboxAiAccessResponse.js +59 -0
- package/dist/esm/models/SandboxAiUsage.d.ts +64 -0
- package/dist/esm/models/SandboxAiUsage.js +65 -0
- package/dist/esm/models/SandboxAiUsageResponse.d.ts +88 -0
- package/dist/esm/models/SandboxAiUsageResponse.js +81 -0
- package/dist/esm/models/SandboxEnvironment.d.ts +13 -1
- package/dist/esm/models/SandboxEnvironment.js +4 -0
- package/dist/esm/models/SetCredentialKeyRequest.d.ts +38 -0
- package/dist/esm/models/SetCredentialKeyRequest.js +45 -0
- package/dist/esm/models/SetCustomApiRequest.d.ts +38 -0
- package/dist/esm/models/SetCustomApiRequest.js +47 -0
- package/dist/esm/models/SetSandboxAiAccessRequest.d.ts +32 -0
- package/dist/esm/models/SetSandboxAiAccessRequest.js +43 -0
- package/dist/esm/models/UpdateAiProxyRequest.d.ts +32 -0
- package/dist/esm/models/UpdateAiProxyRequest.js +43 -0
- package/dist/esm/models/UpdateCredentialProfileRequest.d.ts +38 -0
- package/dist/esm/models/UpdateCredentialProfileRequest.js +43 -0
- package/dist/esm/models/UpdateSandboxEnvironmentRequest.d.ts +12 -0
- package/dist/esm/models/UpdateSandboxEnvironmentRequest.js +4 -0
- package/dist/esm/models/index.d.ts +22 -0
- package/dist/esm/models/index.js +22 -0
- package/dist/models/AccountAiUsageResponse.d.ts +83 -0
- package/dist/models/AccountAiUsageResponse.js +85 -0
- package/dist/models/AiProxySettings.d.ts +81 -0
- package/dist/models/AiProxySettings.js +83 -0
- package/dist/models/AiProxySettingsAllOfPricing.d.ts +38 -0
- package/dist/models/AiProxySettingsAllOfPricing.js +54 -0
- package/dist/models/AiUsageRow.d.ts +80 -0
- package/dist/models/AiUsageRow.js +82 -0
- package/dist/models/AiUsageTotals.d.ts +62 -0
- package/dist/models/AiUsageTotals.js +70 -0
- package/dist/models/CreateCredentialProfileRequest.d.ts +44 -0
- package/dist/models/CreateCredentialProfileRequest.js +54 -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/CredentialId.d.ts +36 -0
- package/dist/models/CredentialId.js +62 -0
- package/dist/models/CredentialProfile.d.ts +91 -0
- package/dist/models/CredentialProfile.js +86 -0
- package/dist/models/CredentialProfileDeletedResponse.d.ts +44 -0
- package/dist/models/CredentialProfileDeletedResponse.js +58 -0
- package/dist/models/CredentialProfileListResponse.d.ts +45 -0
- package/dist/models/CredentialProfileListResponse.js +59 -0
- package/dist/models/CredentialProfileOwner.d.ts +58 -0
- package/dist/models/CredentialProfileOwner.js +70 -0
- package/dist/models/CredentialProfileResponse.d.ts +51 -0
- package/dist/models/CredentialProfileResponse.js +63 -0
- package/dist/models/ProcessListResponse.d.ts +1 -1
- package/dist/models/SandboxAiAccessResponse.d.ts +56 -0
- package/dist/models/SandboxAiAccessResponse.js +66 -0
- package/dist/models/SandboxAiUsage.d.ts +64 -0
- package/dist/models/SandboxAiUsage.js +72 -0
- package/dist/models/SandboxAiUsageResponse.d.ts +88 -0
- package/dist/models/SandboxAiUsageResponse.js +88 -0
- package/dist/models/SandboxEnvironment.d.ts +13 -1
- package/dist/models/SandboxEnvironment.js +4 -0
- package/dist/models/SetCredentialKeyRequest.d.ts +38 -0
- package/dist/models/SetCredentialKeyRequest.js +52 -0
- package/dist/models/SetCustomApiRequest.d.ts +38 -0
- package/dist/models/SetCustomApiRequest.js +54 -0
- package/dist/models/SetSandboxAiAccessRequest.d.ts +32 -0
- package/dist/models/SetSandboxAiAccessRequest.js +50 -0
- package/dist/models/UpdateAiProxyRequest.d.ts +32 -0
- package/dist/models/UpdateAiProxyRequest.js +50 -0
- package/dist/models/UpdateCredentialProfileRequest.d.ts +38 -0
- package/dist/models/UpdateCredentialProfileRequest.js +50 -0
- package/dist/models/UpdateSandboxEnvironmentRequest.d.ts +12 -0
- package/dist/models/UpdateSandboxEnvironmentRequest.js +4 -0
- package/dist/models/index.d.ts +22 -0
- package/dist/models/index.js +22 -0
- package/docs/AccountAiUsageResponse.md +48 -0
- package/docs/AiProxySettings.md +48 -0
- package/docs/AiProxySettingsAllOfPricing.md +34 -0
- package/docs/AiUsageRow.md +48 -0
- package/docs/AiUsageTotals.md +43 -0
- package/docs/BoatApi.md +1588 -212
- package/docs/CreateCredentialProfileRequest.md +36 -0
- package/docs/CredentialAccount.md +39 -0
- package/docs/CredentialAccountsResponse.md +42 -0
- package/docs/CredentialId.md +31 -0
- package/docs/CredentialProfile.md +51 -0
- package/docs/CredentialProfileDeletedResponse.md +36 -0
- package/docs/CredentialProfileListResponse.md +36 -0
- package/docs/CredentialProfileOwner.md +38 -0
- package/docs/CredentialProfileResponse.md +38 -0
- package/docs/SandboxAiAccessResponse.md +40 -0
- package/docs/SandboxAiUsage.md +42 -0
- package/docs/SandboxAiUsageResponse.md +50 -0
- package/docs/SandboxEnvironment.md +4 -0
- package/docs/SetCredentialKeyRequest.md +34 -0
- package/docs/SetCustomApiRequest.md +34 -0
- package/docs/SetSandboxAiAccessRequest.md +32 -0
- package/docs/UpdateAiProxyRequest.md +32 -0
- package/docs/UpdateCredentialProfileRequest.md +34 -0
- package/docs/UpdateSandboxEnvironmentRequest.md +4 -0
- package/package.json +1 -1
- package/src/apis/BoatApi.ts +1440 -133
- package/src/models/AccountAiUsageResponse.ts +160 -0
- package/src/models/AiProxySettings.ts +146 -0
- package/src/models/AiProxySettingsAllOfPricing.ts +75 -0
- package/src/models/AiUsageRow.ts +138 -0
- package/src/models/AiUsageTotals.ts +111 -0
- package/src/models/CreateCredentialProfileRequest.ts +82 -0
- package/src/models/CredentialAccount.ts +92 -0
- package/src/models/CredentialAccountsResponse.ts +128 -0
- package/src/models/CredentialId.ts +64 -0
- package/src/models/CredentialProfile.ts +168 -0
- package/src/models/CredentialProfileDeletedResponse.ts +84 -0
- package/src/models/CredentialProfileListResponse.ts +92 -0
- package/src/models/CredentialProfileOwner.ts +104 -0
- package/src/models/CredentialProfileResponse.ts +101 -0
- package/src/models/ProcessListResponse.ts +1 -1
- package/src/models/SandboxAiAccessResponse.ts +102 -0
- package/src/models/SandboxAiUsage.ts +126 -0
- package/src/models/SandboxAiUsageResponse.ts +162 -0
- package/src/models/SandboxEnvironment.ts +17 -1
- package/src/models/SetCredentialKeyRequest.ts +74 -0
- package/src/models/SetCustomApiRequest.ts +75 -0
- package/src/models/SetSandboxAiAccessRequest.ts +66 -0
- package/src/models/UpdateAiProxyRequest.ts +66 -0
- package/src/models/UpdateCredentialProfileRequest.ts +73 -0
- package/src/models/UpdateSandboxEnvironmentRequest.ts +16 -0
- package/src/models/index.ts +22 -0
package/dist/apis/BoatApi.js
CHANGED
|
@@ -48,9 +48,11 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
48
48
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
49
49
|
exports.SandboxesSortEnum = exports.ReposSortEnum = exports.ReadFileEncodingEnum = exports.ListSnapshotsSortEnum = exports.ListSandboxSnapshotsSortEnum = exports.EventsSortEnum = exports.DesktopOperationThemeEnum = exports.DesktopOperationVncEnum = exports.CommandLogsEncodingEnum = exports.CommandLogsStreamEnum = exports.BoatApi = void 0;
|
|
50
50
|
const runtime = __importStar(require("../runtime"));
|
|
51
|
+
const AccountAiUsageResponse_1 = require("../models/AccountAiUsageResponse");
|
|
51
52
|
const ActiveOrgResponse_1 = require("../models/ActiveOrgResponse");
|
|
52
53
|
const ActiveOrgUpdateRequest_1 = require("../models/ActiveOrgUpdateRequest");
|
|
53
54
|
const AddEnvironmentRepoRequest_1 = require("../models/AddEnvironmentRepoRequest");
|
|
55
|
+
const AiProxySettings_1 = require("../models/AiProxySettings");
|
|
54
56
|
const ApiKeyRevokeResponse_1 = require("../models/ApiKeyRevokeResponse");
|
|
55
57
|
const ApiKeySecretResponse_1 = require("../models/ApiKeySecretResponse");
|
|
56
58
|
const ApiKeyUsageResponse_1 = require("../models/ApiKeyUsageResponse");
|
|
@@ -64,10 +66,15 @@ const CommandRequest_1 = require("../models/CommandRequest");
|
|
|
64
66
|
const CommandStatusResponse_1 = require("../models/CommandStatusResponse");
|
|
65
67
|
const CommandStopResponse_1 = require("../models/CommandStopResponse");
|
|
66
68
|
const ConversationsResponse_1 = require("../models/ConversationsResponse");
|
|
69
|
+
const CreateCredentialProfileRequest_1 = require("../models/CreateCredentialProfileRequest");
|
|
67
70
|
const CreateSandboxEnvironmentRequest_1 = require("../models/CreateSandboxEnvironmentRequest");
|
|
68
71
|
const CreateSandboxRequest_1 = require("../models/CreateSandboxRequest");
|
|
69
72
|
const CreateSandboxResponse_1 = require("../models/CreateSandboxResponse");
|
|
70
73
|
const CreateScopedApiKeyRequest_1 = require("../models/CreateScopedApiKeyRequest");
|
|
74
|
+
const CredentialAccountsResponse_1 = require("../models/CredentialAccountsResponse");
|
|
75
|
+
const CredentialProfileDeletedResponse_1 = require("../models/CredentialProfileDeletedResponse");
|
|
76
|
+
const CredentialProfileListResponse_1 = require("../models/CredentialProfileListResponse");
|
|
77
|
+
const CredentialProfileResponse_1 = require("../models/CredentialProfileResponse");
|
|
71
78
|
const DataRetentionPolicyResponse_1 = require("../models/DataRetentionPolicyResponse");
|
|
72
79
|
const DataRetentionUpdateRequest_1 = require("../models/DataRetentionUpdateRequest");
|
|
73
80
|
const DeletionOperationListResponse_1 = require("../models/DeletionOperationListResponse");
|
|
@@ -105,6 +112,8 @@ const RepoSelectionResponse_1 = require("../models/RepoSelectionResponse");
|
|
|
105
112
|
const ReposResponse_1 = require("../models/ReposResponse");
|
|
106
113
|
const ResumeRequest_1 = require("../models/ResumeRequest");
|
|
107
114
|
const SandboxActionResponse_1 = require("../models/SandboxActionResponse");
|
|
115
|
+
const SandboxAiAccessResponse_1 = require("../models/SandboxAiAccessResponse");
|
|
116
|
+
const SandboxAiUsageResponse_1 = require("../models/SandboxAiUsageResponse");
|
|
108
117
|
const SandboxEnvironmentListResponse_1 = require("../models/SandboxEnvironmentListResponse");
|
|
109
118
|
const SandboxEnvironmentResponse_1 = require("../models/SandboxEnvironmentResponse");
|
|
110
119
|
const SandboxInfoResponse_1 = require("../models/SandboxInfoResponse");
|
|
@@ -112,8 +121,11 @@ const SandboxListResponse_1 = require("../models/SandboxListResponse");
|
|
|
112
121
|
const SandboxUsageResponse_1 = require("../models/SandboxUsageResponse");
|
|
113
122
|
const SecretsResponse_1 = require("../models/SecretsResponse");
|
|
114
123
|
const SecretsUpdateRequest_1 = require("../models/SecretsUpdateRequest");
|
|
124
|
+
const SetCredentialKeyRequest_1 = require("../models/SetCredentialKeyRequest");
|
|
125
|
+
const SetCustomApiRequest_1 = require("../models/SetCustomApiRequest");
|
|
115
126
|
const SetEnvironmentSecretFileRequest_1 = require("../models/SetEnvironmentSecretFileRequest");
|
|
116
127
|
const SetEnvironmentVarRequest_1 = require("../models/SetEnvironmentVarRequest");
|
|
128
|
+
const SetSandboxAiAccessRequest_1 = require("../models/SetSandboxAiAccessRequest");
|
|
117
129
|
const Share200Response_1 = require("../models/Share200Response");
|
|
118
130
|
const SnapshotDownloadResponse_1 = require("../models/SnapshotDownloadResponse");
|
|
119
131
|
const SnapshotLatestResponse_1 = require("../models/SnapshotLatestResponse");
|
|
@@ -128,6 +140,8 @@ const StopRequest_1 = require("../models/StopRequest");
|
|
|
128
140
|
const TelemetryResponse_1 = require("../models/TelemetryResponse");
|
|
129
141
|
const TelemetrySetRequest_1 = require("../models/TelemetrySetRequest");
|
|
130
142
|
const TelemetrySetResponse_1 = require("../models/TelemetrySetResponse");
|
|
143
|
+
const UpdateAiProxyRequest_1 = require("../models/UpdateAiProxyRequest");
|
|
144
|
+
const UpdateCredentialProfileRequest_1 = require("../models/UpdateCredentialProfileRequest");
|
|
131
145
|
const UpdateSandboxEnvironmentRequest_1 = require("../models/UpdateSandboxEnvironmentRequest");
|
|
132
146
|
const UpdateSandboxRequest_1 = require("../models/UpdateSandboxRequest");
|
|
133
147
|
const UpgradeSandboxEnvironmentRequest_1 = require("../models/UpgradeSandboxEnvironmentRequest");
|
|
@@ -142,11 +156,63 @@ const WebhookUpdateRequest_1 = require("../models/WebhookUpdateRequest");
|
|
|
142
156
|
*
|
|
143
157
|
*/
|
|
144
158
|
class BoatApi extends runtime.BaseAPI {
|
|
159
|
+
/**
|
|
160
|
+
* Creates request options for addCredentialAccount without sending the request
|
|
161
|
+
*/
|
|
162
|
+
async addCredentialAccountRequestOpts(input) {
|
|
163
|
+
const requestParameters = runtime.unflattenBody(input, 'setCredentialKeyRequest', ['profile', 'credential'], []);
|
|
164
|
+
if (requestParameters['profile'] == null) {
|
|
165
|
+
throw new runtime.RequiredError('profile', 'Required parameter "profile" was null or undefined when calling addCredentialAccount().');
|
|
166
|
+
}
|
|
167
|
+
if (requestParameters['credential'] == null) {
|
|
168
|
+
throw new runtime.RequiredError('credential', 'Required parameter "credential" was null or undefined when calling addCredentialAccount().');
|
|
169
|
+
}
|
|
170
|
+
if (requestParameters['setCredentialKeyRequest'] == null) {
|
|
171
|
+
throw new runtime.RequiredError('setCredentialKeyRequest', 'Required parameter "setCredentialKeyRequest" was null or undefined when calling addCredentialAccount().');
|
|
172
|
+
}
|
|
173
|
+
const queryParameters = {};
|
|
174
|
+
const headerParameters = {};
|
|
175
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
176
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
177
|
+
const token = this.configuration.accessToken;
|
|
178
|
+
const tokenString = await token("BoatBearerAuth", []);
|
|
179
|
+
if (tokenString) {
|
|
180
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
let urlPath = `/credential-profiles/{profile}/accounts/{credential}`;
|
|
184
|
+
urlPath = urlPath.replace('{profile}', encodeURIComponent(String(requestParameters['profile'])));
|
|
185
|
+
urlPath = urlPath.replace('{credential}', encodeURIComponent(String(requestParameters['credential'])));
|
|
186
|
+
return {
|
|
187
|
+
path: urlPath,
|
|
188
|
+
method: 'POST',
|
|
189
|
+
headers: headerParameters,
|
|
190
|
+
query: queryParameters,
|
|
191
|
+
body: (0, SetCredentialKeyRequest_1.SetCredentialKeyRequestToJSON)(requestParameters['setCredentialKeyRequest']),
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* 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`.
|
|
196
|
+
* Add another API key to a credential
|
|
197
|
+
*/
|
|
198
|
+
async addCredentialAccountRaw(requestParameters, initOverrides) {
|
|
199
|
+
const requestOptions = await this.addCredentialAccountRequestOpts(requestParameters);
|
|
200
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
201
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, CredentialAccountsResponse_1.CredentialAccountsResponseFromJSON)(jsonValue));
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* 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`.
|
|
205
|
+
* Add another API key to a credential
|
|
206
|
+
*/
|
|
207
|
+
async addCredentialAccount(requestParameters, initOverrides) {
|
|
208
|
+
const response = await this.addCredentialAccountRaw(requestParameters, initOverrides);
|
|
209
|
+
return await response.value();
|
|
210
|
+
}
|
|
145
211
|
/**
|
|
146
212
|
* Creates request options for addEnvironmentRepo without sending the request
|
|
147
213
|
*/
|
|
148
214
|
async addEnvironmentRepoRequestOpts(input) {
|
|
149
|
-
const requestParameters = runtime.unflattenBody(input, 'addEnvironmentRepoRequest', ['environmentId'], []);
|
|
215
|
+
const requestParameters = runtime.unflattenBody(input, 'addEnvironmentRepoRequest', ['environmentId', 'org'], []);
|
|
150
216
|
if (requestParameters['environmentId'] == null) {
|
|
151
217
|
throw new runtime.RequiredError('environmentId', 'Required parameter "environmentId" was null or undefined when calling addEnvironmentRepo().');
|
|
152
218
|
}
|
|
@@ -154,6 +220,9 @@ class BoatApi extends runtime.BaseAPI {
|
|
|
154
220
|
throw new runtime.RequiredError('addEnvironmentRepoRequest', 'Required parameter "addEnvironmentRepoRequest" was null or undefined when calling addEnvironmentRepo().');
|
|
155
221
|
}
|
|
156
222
|
const queryParameters = {};
|
|
223
|
+
if (requestParameters['org'] != null) {
|
|
224
|
+
queryParameters['org'] = requestParameters['org'];
|
|
225
|
+
}
|
|
157
226
|
const headerParameters = {};
|
|
158
227
|
headerParameters['Content-Type'] = 'application/json';
|
|
159
228
|
if (this.configuration && this.configuration.accessToken) {
|
|
@@ -677,6 +746,50 @@ class BoatApi extends runtime.BaseAPI {
|
|
|
677
746
|
const response = await this.createRaw(requestParameters, initOverrides);
|
|
678
747
|
return await response.value();
|
|
679
748
|
}
|
|
749
|
+
/**
|
|
750
|
+
* Creates request options for createCredentialProfile without sending the request
|
|
751
|
+
*/
|
|
752
|
+
async createCredentialProfileRequestOpts(input) {
|
|
753
|
+
const requestParameters = runtime.unflattenBody(input, 'createCredentialProfileRequest', [], []);
|
|
754
|
+
if (requestParameters['createCredentialProfileRequest'] == null) {
|
|
755
|
+
throw new runtime.RequiredError('createCredentialProfileRequest', 'Required parameter "createCredentialProfileRequest" was null or undefined when calling createCredentialProfile().');
|
|
756
|
+
}
|
|
757
|
+
const queryParameters = {};
|
|
758
|
+
const headerParameters = {};
|
|
759
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
760
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
761
|
+
const token = this.configuration.accessToken;
|
|
762
|
+
const tokenString = await token("BoatBearerAuth", []);
|
|
763
|
+
if (tokenString) {
|
|
764
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
765
|
+
}
|
|
766
|
+
}
|
|
767
|
+
let urlPath = `/credential-profiles`;
|
|
768
|
+
return {
|
|
769
|
+
path: urlPath,
|
|
770
|
+
method: 'POST',
|
|
771
|
+
headers: headerParameters,
|
|
772
|
+
query: queryParameters,
|
|
773
|
+
body: (0, CreateCredentialProfileRequest_1.CreateCredentialProfileRequestToJSON)(requestParameters['createCredentialProfileRequest']),
|
|
774
|
+
};
|
|
775
|
+
}
|
|
776
|
+
/**
|
|
777
|
+
* Creates an empty profile, or a copy of `copyFrom`. With `org`, the profile belongs to that organization and only its owners can create it. Needs an API key with `account.admin`.
|
|
778
|
+
* Create a credential profile
|
|
779
|
+
*/
|
|
780
|
+
async createCredentialProfileRaw(requestParameters, initOverrides) {
|
|
781
|
+
const requestOptions = await this.createCredentialProfileRequestOpts(requestParameters);
|
|
782
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
783
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, CredentialProfileResponse_1.CredentialProfileResponseFromJSON)(jsonValue));
|
|
784
|
+
}
|
|
785
|
+
/**
|
|
786
|
+
* Creates an empty profile, or a copy of `copyFrom`. With `org`, the profile belongs to that organization and only its owners can create it. Needs an API key with `account.admin`.
|
|
787
|
+
* Create a credential profile
|
|
788
|
+
*/
|
|
789
|
+
async createCredentialProfile(requestParameters, initOverrides) {
|
|
790
|
+
const response = await this.createCredentialProfileRaw(requestParameters, initOverrides);
|
|
791
|
+
return await response.value();
|
|
792
|
+
}
|
|
680
793
|
/**
|
|
681
794
|
* Creates request options for createDownloadUrl without sending the request
|
|
682
795
|
*/
|
|
@@ -729,11 +842,14 @@ class BoatApi extends runtime.BaseAPI {
|
|
|
729
842
|
* Creates request options for createEnvironment without sending the request
|
|
730
843
|
*/
|
|
731
844
|
async createEnvironmentRequestOpts(input) {
|
|
732
|
-
const requestParameters = runtime.unflattenBody(input, 'createSandboxEnvironmentRequest', [], []);
|
|
845
|
+
const requestParameters = runtime.unflattenBody(input, 'createSandboxEnvironmentRequest', ['org'], []);
|
|
733
846
|
if (requestParameters['createSandboxEnvironmentRequest'] == null) {
|
|
734
847
|
throw new runtime.RequiredError('createSandboxEnvironmentRequest', 'Required parameter "createSandboxEnvironmentRequest" was null or undefined when calling createEnvironment().');
|
|
735
848
|
}
|
|
736
849
|
const queryParameters = {};
|
|
850
|
+
if (requestParameters['org'] != null) {
|
|
851
|
+
queryParameters['org'] = requestParameters['org'];
|
|
852
|
+
}
|
|
737
853
|
const headerParameters = {};
|
|
738
854
|
headerParameters['Content-Type'] = 'application/json';
|
|
739
855
|
if (this.configuration && this.configuration.accessToken) {
|
|
@@ -947,6 +1063,190 @@ class BoatApi extends runtime.BaseAPI {
|
|
|
947
1063
|
const response = await this.createWebhookRaw(requestParameters, initOverrides);
|
|
948
1064
|
return await response.value();
|
|
949
1065
|
}
|
|
1066
|
+
/**
|
|
1067
|
+
* Creates request options for deleteCredentialAccount without sending the request
|
|
1068
|
+
*/
|
|
1069
|
+
async deleteCredentialAccountRequestOpts(requestParameters) {
|
|
1070
|
+
if (requestParameters['profile'] == null) {
|
|
1071
|
+
throw new runtime.RequiredError('profile', 'Required parameter "profile" was null or undefined when calling deleteCredentialAccount().');
|
|
1072
|
+
}
|
|
1073
|
+
if (requestParameters['credential'] == null) {
|
|
1074
|
+
throw new runtime.RequiredError('credential', 'Required parameter "credential" was null or undefined when calling deleteCredentialAccount().');
|
|
1075
|
+
}
|
|
1076
|
+
if (requestParameters['account'] == null) {
|
|
1077
|
+
throw new runtime.RequiredError('account', 'Required parameter "account" was null or undefined when calling deleteCredentialAccount().');
|
|
1078
|
+
}
|
|
1079
|
+
const queryParameters = {};
|
|
1080
|
+
const headerParameters = {};
|
|
1081
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
1082
|
+
const token = this.configuration.accessToken;
|
|
1083
|
+
const tokenString = await token("BoatBearerAuth", []);
|
|
1084
|
+
if (tokenString) {
|
|
1085
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
1086
|
+
}
|
|
1087
|
+
}
|
|
1088
|
+
let urlPath = `/credential-profiles/{profile}/accounts/{credential}/{account}`;
|
|
1089
|
+
urlPath = urlPath.replace('{profile}', encodeURIComponent(String(requestParameters['profile'])));
|
|
1090
|
+
urlPath = urlPath.replace('{credential}', encodeURIComponent(String(requestParameters['credential'])));
|
|
1091
|
+
urlPath = urlPath.replace('{account}', encodeURIComponent(String(requestParameters['account'])));
|
|
1092
|
+
return {
|
|
1093
|
+
path: urlPath,
|
|
1094
|
+
method: 'DELETE',
|
|
1095
|
+
headers: headerParameters,
|
|
1096
|
+
query: queryParameters,
|
|
1097
|
+
};
|
|
1098
|
+
}
|
|
1099
|
+
/**
|
|
1100
|
+
* 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`.
|
|
1101
|
+
* Forget an account of a credential
|
|
1102
|
+
*/
|
|
1103
|
+
async deleteCredentialAccountRaw(requestParameters, initOverrides) {
|
|
1104
|
+
const requestOptions = await this.deleteCredentialAccountRequestOpts(requestParameters);
|
|
1105
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
1106
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, CredentialAccountsResponse_1.CredentialAccountsResponseFromJSON)(jsonValue));
|
|
1107
|
+
}
|
|
1108
|
+
/**
|
|
1109
|
+
* 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`.
|
|
1110
|
+
* Forget an account of a credential
|
|
1111
|
+
*/
|
|
1112
|
+
async deleteCredentialAccount(requestParameters, initOverrides) {
|
|
1113
|
+
const response = await this.deleteCredentialAccountRaw(requestParameters, initOverrides);
|
|
1114
|
+
return await response.value();
|
|
1115
|
+
}
|
|
1116
|
+
/**
|
|
1117
|
+
* Creates request options for deleteCredentialProfile without sending the request
|
|
1118
|
+
*/
|
|
1119
|
+
async deleteCredentialProfileRequestOpts(requestParameters) {
|
|
1120
|
+
if (requestParameters['profile'] == null) {
|
|
1121
|
+
throw new runtime.RequiredError('profile', 'Required parameter "profile" was null or undefined when calling deleteCredentialProfile().');
|
|
1122
|
+
}
|
|
1123
|
+
const queryParameters = {};
|
|
1124
|
+
const headerParameters = {};
|
|
1125
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
1126
|
+
const token = this.configuration.accessToken;
|
|
1127
|
+
const tokenString = await token("BoatBearerAuth", []);
|
|
1128
|
+
if (tokenString) {
|
|
1129
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
1130
|
+
}
|
|
1131
|
+
}
|
|
1132
|
+
let urlPath = `/credential-profiles/{profile}`;
|
|
1133
|
+
urlPath = urlPath.replace('{profile}', encodeURIComponent(String(requestParameters['profile'])));
|
|
1134
|
+
return {
|
|
1135
|
+
path: urlPath,
|
|
1136
|
+
method: 'DELETE',
|
|
1137
|
+
headers: headerParameters,
|
|
1138
|
+
query: queryParameters,
|
|
1139
|
+
};
|
|
1140
|
+
}
|
|
1141
|
+
/**
|
|
1142
|
+
* Deletes the profile. A default profile returns `409 is_default`. A profile that an environment names returns `409 in_use`. Needs an API key with `account.admin`.
|
|
1143
|
+
* Delete a credential profile
|
|
1144
|
+
*/
|
|
1145
|
+
async deleteCredentialProfileRaw(requestParameters, initOverrides) {
|
|
1146
|
+
const requestOptions = await this.deleteCredentialProfileRequestOpts(requestParameters);
|
|
1147
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
1148
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, CredentialProfileDeletedResponse_1.CredentialProfileDeletedResponseFromJSON)(jsonValue));
|
|
1149
|
+
}
|
|
1150
|
+
/**
|
|
1151
|
+
* Deletes the profile. A default profile returns `409 is_default`. A profile that an environment names returns `409 in_use`. Needs an API key with `account.admin`.
|
|
1152
|
+
* Delete a credential profile
|
|
1153
|
+
*/
|
|
1154
|
+
async deleteCredentialProfile(requestParameters, initOverrides) {
|
|
1155
|
+
const response = await this.deleteCredentialProfileRaw(requestParameters, initOverrides);
|
|
1156
|
+
return await response.value();
|
|
1157
|
+
}
|
|
1158
|
+
/**
|
|
1159
|
+
* Creates request options for deleteCredentialProfileCustomApi without sending the request
|
|
1160
|
+
*/
|
|
1161
|
+
async deleteCredentialProfileCustomApiRequestOpts(requestParameters) {
|
|
1162
|
+
if (requestParameters['profile'] == null) {
|
|
1163
|
+
throw new runtime.RequiredError('profile', 'Required parameter "profile" was null or undefined when calling deleteCredentialProfileCustomApi().');
|
|
1164
|
+
}
|
|
1165
|
+
if (requestParameters['name'] == null) {
|
|
1166
|
+
throw new runtime.RequiredError('name', 'Required parameter "name" was null or undefined when calling deleteCredentialProfileCustomApi().');
|
|
1167
|
+
}
|
|
1168
|
+
const queryParameters = {};
|
|
1169
|
+
const headerParameters = {};
|
|
1170
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
1171
|
+
const token = this.configuration.accessToken;
|
|
1172
|
+
const tokenString = await token("BoatBearerAuth", []);
|
|
1173
|
+
if (tokenString) {
|
|
1174
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
1175
|
+
}
|
|
1176
|
+
}
|
|
1177
|
+
let urlPath = `/credential-profiles/{profile}/custom-apis/{name}`;
|
|
1178
|
+
urlPath = urlPath.replace('{profile}', encodeURIComponent(String(requestParameters['profile'])));
|
|
1179
|
+
urlPath = urlPath.replace('{name}', encodeURIComponent(String(requestParameters['name'])));
|
|
1180
|
+
return {
|
|
1181
|
+
path: urlPath,
|
|
1182
|
+
method: 'DELETE',
|
|
1183
|
+
headers: headerParameters,
|
|
1184
|
+
query: queryParameters,
|
|
1185
|
+
};
|
|
1186
|
+
}
|
|
1187
|
+
/**
|
|
1188
|
+
* Removes one custom API from the profile. Needs an API key with `account.admin`.
|
|
1189
|
+
* Remove a custom API
|
|
1190
|
+
*/
|
|
1191
|
+
async deleteCredentialProfileCustomApiRaw(requestParameters, initOverrides) {
|
|
1192
|
+
const requestOptions = await this.deleteCredentialProfileCustomApiRequestOpts(requestParameters);
|
|
1193
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
1194
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, CredentialProfileResponse_1.CredentialProfileResponseFromJSON)(jsonValue));
|
|
1195
|
+
}
|
|
1196
|
+
/**
|
|
1197
|
+
* Removes one custom API from the profile. Needs an API key with `account.admin`.
|
|
1198
|
+
* Remove a custom API
|
|
1199
|
+
*/
|
|
1200
|
+
async deleteCredentialProfileCustomApi(requestParameters, initOverrides) {
|
|
1201
|
+
const response = await this.deleteCredentialProfileCustomApiRaw(requestParameters, initOverrides);
|
|
1202
|
+
return await response.value();
|
|
1203
|
+
}
|
|
1204
|
+
/**
|
|
1205
|
+
* Creates request options for deleteCredentialProfileKey without sending the request
|
|
1206
|
+
*/
|
|
1207
|
+
async deleteCredentialProfileKeyRequestOpts(requestParameters) {
|
|
1208
|
+
if (requestParameters['profile'] == null) {
|
|
1209
|
+
throw new runtime.RequiredError('profile', 'Required parameter "profile" was null or undefined when calling deleteCredentialProfileKey().');
|
|
1210
|
+
}
|
|
1211
|
+
if (requestParameters['credential'] == null) {
|
|
1212
|
+
throw new runtime.RequiredError('credential', 'Required parameter "credential" was null or undefined when calling deleteCredentialProfileKey().');
|
|
1213
|
+
}
|
|
1214
|
+
const queryParameters = {};
|
|
1215
|
+
const headerParameters = {};
|
|
1216
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
1217
|
+
const token = this.configuration.accessToken;
|
|
1218
|
+
const tokenString = await token("BoatBearerAuth", []);
|
|
1219
|
+
if (tokenString) {
|
|
1220
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
1221
|
+
}
|
|
1222
|
+
}
|
|
1223
|
+
let urlPath = `/credential-profiles/{profile}/keys/{credential}`;
|
|
1224
|
+
urlPath = urlPath.replace('{profile}', encodeURIComponent(String(requestParameters['profile'])));
|
|
1225
|
+
urlPath = urlPath.replace('{credential}', encodeURIComponent(String(requestParameters['credential'])));
|
|
1226
|
+
return {
|
|
1227
|
+
path: urlPath,
|
|
1228
|
+
method: 'DELETE',
|
|
1229
|
+
headers: headerParameters,
|
|
1230
|
+
query: queryParameters,
|
|
1231
|
+
};
|
|
1232
|
+
}
|
|
1233
|
+
/**
|
|
1234
|
+
* Removes one credential, an API key or a sign-in. Needs an API key with `account.admin`.
|
|
1235
|
+
* Remove a credential profile credential
|
|
1236
|
+
*/
|
|
1237
|
+
async deleteCredentialProfileKeyRaw(requestParameters, initOverrides) {
|
|
1238
|
+
const requestOptions = await this.deleteCredentialProfileKeyRequestOpts(requestParameters);
|
|
1239
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
1240
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, CredentialProfileResponse_1.CredentialProfileResponseFromJSON)(jsonValue));
|
|
1241
|
+
}
|
|
1242
|
+
/**
|
|
1243
|
+
* Removes one credential, an API key or a sign-in. Needs an API key with `account.admin`.
|
|
1244
|
+
* Remove a credential profile credential
|
|
1245
|
+
*/
|
|
1246
|
+
async deleteCredentialProfileKey(requestParameters, initOverrides) {
|
|
1247
|
+
const response = await this.deleteCredentialProfileKeyRaw(requestParameters, initOverrides);
|
|
1248
|
+
return await response.value();
|
|
1249
|
+
}
|
|
950
1250
|
/**
|
|
951
1251
|
* Creates request options for deleteEnvironment without sending the request
|
|
952
1252
|
*/
|
|
@@ -955,6 +1255,9 @@ class BoatApi extends runtime.BaseAPI {
|
|
|
955
1255
|
throw new runtime.RequiredError('environmentId', 'Required parameter "environmentId" was null or undefined when calling deleteEnvironment().');
|
|
956
1256
|
}
|
|
957
1257
|
const queryParameters = {};
|
|
1258
|
+
if (requestParameters['org'] != null) {
|
|
1259
|
+
queryParameters['org'] = requestParameters['org'];
|
|
1260
|
+
}
|
|
958
1261
|
const headerParameters = {};
|
|
959
1262
|
if (this.configuration && this.configuration.accessToken) {
|
|
960
1263
|
const token = this.configuration.accessToken;
|
|
@@ -1000,6 +1303,9 @@ class BoatApi extends runtime.BaseAPI {
|
|
|
1000
1303
|
throw new runtime.RequiredError('repositoryId', 'Required parameter "repositoryId" was null or undefined when calling deleteEnvironmentRepo().');
|
|
1001
1304
|
}
|
|
1002
1305
|
const queryParameters = {};
|
|
1306
|
+
if (requestParameters['org'] != null) {
|
|
1307
|
+
queryParameters['org'] = requestParameters['org'];
|
|
1308
|
+
}
|
|
1003
1309
|
const headerParameters = {};
|
|
1004
1310
|
if (this.configuration && this.configuration.accessToken) {
|
|
1005
1311
|
const token = this.configuration.accessToken;
|
|
@@ -1049,6 +1355,9 @@ class BoatApi extends runtime.BaseAPI {
|
|
|
1049
1355
|
if (requestParameters['path'] != null) {
|
|
1050
1356
|
queryParameters['path'] = requestParameters['path'];
|
|
1051
1357
|
}
|
|
1358
|
+
if (requestParameters['org'] != null) {
|
|
1359
|
+
queryParameters['org'] = requestParameters['org'];
|
|
1360
|
+
}
|
|
1052
1361
|
const headerParameters = {};
|
|
1053
1362
|
if (this.configuration && this.configuration.accessToken) {
|
|
1054
1363
|
const token = this.configuration.accessToken;
|
|
@@ -1094,6 +1403,9 @@ class BoatApi extends runtime.BaseAPI {
|
|
|
1094
1403
|
throw new runtime.RequiredError('key', 'Required parameter "key" was null or undefined when calling deleteEnvironmentVar().');
|
|
1095
1404
|
}
|
|
1096
1405
|
const queryParameters = {};
|
|
1406
|
+
if (requestParameters['org'] != null) {
|
|
1407
|
+
queryParameters['org'] = requestParameters['org'];
|
|
1408
|
+
}
|
|
1097
1409
|
const headerParameters = {};
|
|
1098
1410
|
if (this.configuration && this.configuration.accessToken) {
|
|
1099
1411
|
const token = this.configuration.accessToken;
|
|
@@ -1449,8 +1761,11 @@ class BoatApi extends runtime.BaseAPI {
|
|
|
1449
1761
|
/**
|
|
1450
1762
|
* Creates request options for environments without sending the request
|
|
1451
1763
|
*/
|
|
1452
|
-
async environmentsRequestOpts() {
|
|
1764
|
+
async environmentsRequestOpts(requestParameters) {
|
|
1453
1765
|
const queryParameters = {};
|
|
1766
|
+
if (requestParameters['org'] != null) {
|
|
1767
|
+
queryParameters['org'] = requestParameters['org'];
|
|
1768
|
+
}
|
|
1454
1769
|
const headerParameters = {};
|
|
1455
1770
|
if (this.configuration && this.configuration.accessToken) {
|
|
1456
1771
|
const token = this.configuration.accessToken;
|
|
@@ -1471,8 +1786,8 @@ class BoatApi extends runtime.BaseAPI {
|
|
|
1471
1786
|
* Returns every non-deleted sandbox environment with its latest-version flags, contents, and per-version sandbox usage. A default environment named `base` is created on first access if none exists.
|
|
1472
1787
|
* List Sandbox environments
|
|
1473
1788
|
*/
|
|
1474
|
-
async environmentsRaw(initOverrides) {
|
|
1475
|
-
const requestOptions = await this.environmentsRequestOpts();
|
|
1789
|
+
async environmentsRaw(requestParameters, initOverrides) {
|
|
1790
|
+
const requestOptions = await this.environmentsRequestOpts(requestParameters);
|
|
1476
1791
|
const response = await this.request(requestOptions, initOverrides);
|
|
1477
1792
|
return new runtime.JSONApiResponse(response, (jsonValue) => (0, SandboxEnvironmentListResponse_1.SandboxEnvironmentListResponseFromJSON)(jsonValue));
|
|
1478
1793
|
}
|
|
@@ -1480,8 +1795,8 @@ class BoatApi extends runtime.BaseAPI {
|
|
|
1480
1795
|
* Returns every non-deleted sandbox environment with its latest-version flags, contents, and per-version sandbox usage. A default environment named `base` is created on first access if none exists.
|
|
1481
1796
|
* List Sandbox environments
|
|
1482
1797
|
*/
|
|
1483
|
-
async environments(initOverrides) {
|
|
1484
|
-
const response = await this.environmentsRaw(initOverrides);
|
|
1798
|
+
async environments(requestParameters = {}, initOverrides) {
|
|
1799
|
+
const response = await this.environmentsRaw(requestParameters, initOverrides);
|
|
1485
1800
|
return await response.value();
|
|
1486
1801
|
}
|
|
1487
1802
|
/**
|
|
@@ -1631,6 +1946,100 @@ class BoatApi extends runtime.BaseAPI {
|
|
|
1631
1946
|
const response = await this.getRaw(requestParameters, initOverrides);
|
|
1632
1947
|
return await response.value();
|
|
1633
1948
|
}
|
|
1949
|
+
/**
|
|
1950
|
+
* Creates request options for getAiProxy without sending the request
|
|
1951
|
+
*/
|
|
1952
|
+
async getAiProxyRequestOpts(requestParameters) {
|
|
1953
|
+
const queryParameters = {};
|
|
1954
|
+
if (requestParameters['org'] != null) {
|
|
1955
|
+
queryParameters['org'] = requestParameters['org'];
|
|
1956
|
+
}
|
|
1957
|
+
const headerParameters = {};
|
|
1958
|
+
if (requestParameters['xBoatOrg'] != null) {
|
|
1959
|
+
headerParameters['X-Boat-Org'] = String(requestParameters['xBoatOrg']);
|
|
1960
|
+
}
|
|
1961
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
1962
|
+
const token = this.configuration.accessToken;
|
|
1963
|
+
const tokenString = await token("BoatBearerAuth", []);
|
|
1964
|
+
if (tokenString) {
|
|
1965
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
1966
|
+
}
|
|
1967
|
+
}
|
|
1968
|
+
let urlPath = `/ai-proxy`;
|
|
1969
|
+
return {
|
|
1970
|
+
path: urlPath,
|
|
1971
|
+
method: 'GET',
|
|
1972
|
+
headers: headerParameters,
|
|
1973
|
+
query: queryParameters,
|
|
1974
|
+
};
|
|
1975
|
+
}
|
|
1976
|
+
/**
|
|
1977
|
+
* Returns the AI credentials proxy switch of the account in scope, a person or an organization, with its price. Needs an API key with `account.admin`.
|
|
1978
|
+
* Get AI credentials proxy
|
|
1979
|
+
*/
|
|
1980
|
+
async getAiProxyRaw(requestParameters, initOverrides) {
|
|
1981
|
+
const requestOptions = await this.getAiProxyRequestOpts(requestParameters);
|
|
1982
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
1983
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, AiProxySettings_1.AiProxySettingsFromJSON)(jsonValue));
|
|
1984
|
+
}
|
|
1985
|
+
/**
|
|
1986
|
+
* Returns the AI credentials proxy switch of the account in scope, a person or an organization, with its price. Needs an API key with `account.admin`.
|
|
1987
|
+
* Get AI credentials proxy
|
|
1988
|
+
*/
|
|
1989
|
+
async getAiProxy(requestParameters = {}, initOverrides) {
|
|
1990
|
+
const response = await this.getAiProxyRaw(requestParameters, initOverrides);
|
|
1991
|
+
return await response.value();
|
|
1992
|
+
}
|
|
1993
|
+
/**
|
|
1994
|
+
* Creates request options for getAiUsage without sending the request
|
|
1995
|
+
*/
|
|
1996
|
+
async getAiUsageRequestOpts(requestParameters) {
|
|
1997
|
+
const queryParameters = {};
|
|
1998
|
+
if (requestParameters['days'] != null) {
|
|
1999
|
+
queryParameters['days'] = requestParameters['days'];
|
|
2000
|
+
}
|
|
2001
|
+
if (requestParameters['profile'] != null) {
|
|
2002
|
+
queryParameters['profile'] = requestParameters['profile'];
|
|
2003
|
+
}
|
|
2004
|
+
if (requestParameters['org'] != null) {
|
|
2005
|
+
queryParameters['org'] = requestParameters['org'];
|
|
2006
|
+
}
|
|
2007
|
+
const headerParameters = {};
|
|
2008
|
+
if (requestParameters['xBoatOrg'] != null) {
|
|
2009
|
+
headerParameters['X-Boat-Org'] = String(requestParameters['xBoatOrg']);
|
|
2010
|
+
}
|
|
2011
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
2012
|
+
const token = this.configuration.accessToken;
|
|
2013
|
+
const tokenString = await token("BoatBearerAuth", []);
|
|
2014
|
+
if (tokenString) {
|
|
2015
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
2016
|
+
}
|
|
2017
|
+
}
|
|
2018
|
+
let urlPath = `/ai-usage`;
|
|
2019
|
+
return {
|
|
2020
|
+
path: urlPath,
|
|
2021
|
+
method: 'GET',
|
|
2022
|
+
headers: headerParameters,
|
|
2023
|
+
query: queryParameters,
|
|
2024
|
+
};
|
|
2025
|
+
}
|
|
2026
|
+
/**
|
|
2027
|
+
* Proxied AI usage, per sandbox and in total, per UTC day, credential and model. Without `profile`, the usage charged to the wallet in scope. With `profile`, the requests made with that profile\'s credentials, whoever pays; only its managers can read it. Needs an API key with `account.read`.
|
|
2028
|
+
* Get AI usage
|
|
2029
|
+
*/
|
|
2030
|
+
async getAiUsageRaw(requestParameters, initOverrides) {
|
|
2031
|
+
const requestOptions = await this.getAiUsageRequestOpts(requestParameters);
|
|
2032
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
2033
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, AccountAiUsageResponse_1.AccountAiUsageResponseFromJSON)(jsonValue));
|
|
2034
|
+
}
|
|
2035
|
+
/**
|
|
2036
|
+
* Proxied AI usage, per sandbox and in total, per UTC day, credential and model. Without `profile`, the usage charged to the wallet in scope. With `profile`, the requests made with that profile\'s credentials, whoever pays; only its managers can read it. Needs an API key with `account.read`.
|
|
2037
|
+
* Get AI usage
|
|
2038
|
+
*/
|
|
2039
|
+
async getAiUsage(requestParameters = {}, initOverrides) {
|
|
2040
|
+
const response = await this.getAiUsageRaw(requestParameters, initOverrides);
|
|
2041
|
+
return await response.value();
|
|
2042
|
+
}
|
|
1634
2043
|
/**
|
|
1635
2044
|
* Creates request options for getCommand without sending the request
|
|
1636
2045
|
*/
|
|
@@ -1828,13 +2237,58 @@ class BoatApi extends runtime.BaseAPI {
|
|
|
1828
2237
|
async getNamedSnapshotRaw(requestParameters, initOverrides) {
|
|
1829
2238
|
const requestOptions = await this.getNamedSnapshotRequestOpts(requestParameters);
|
|
1830
2239
|
const response = await this.request(requestOptions, initOverrides);
|
|
1831
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, NamedSnapshotInfoResponse_1.NamedSnapshotInfoResponseFromJSON)(jsonValue));
|
|
2240
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, NamedSnapshotInfoResponse_1.NamedSnapshotInfoResponseFromJSON)(jsonValue));
|
|
2241
|
+
}
|
|
2242
|
+
/**
|
|
2243
|
+
* Get a named snapshot
|
|
2244
|
+
*/
|
|
2245
|
+
async getNamedSnapshot(requestParameters, initOverrides) {
|
|
2246
|
+
const response = await this.getNamedSnapshotRaw(requestParameters, initOverrides);
|
|
2247
|
+
return await response.value();
|
|
2248
|
+
}
|
|
2249
|
+
/**
|
|
2250
|
+
* Creates request options for getSandboxAiUsage without sending the request
|
|
2251
|
+
*/
|
|
2252
|
+
async getSandboxAiUsageRequestOpts(requestParameters) {
|
|
2253
|
+
if (requestParameters['sandboxId'] == null) {
|
|
2254
|
+
throw new runtime.RequiredError('sandboxId', 'Required parameter "sandboxId" was null or undefined when calling getSandboxAiUsage().');
|
|
2255
|
+
}
|
|
2256
|
+
const queryParameters = {};
|
|
2257
|
+
if (requestParameters['days'] != null) {
|
|
2258
|
+
queryParameters['days'] = requestParameters['days'];
|
|
2259
|
+
}
|
|
2260
|
+
const headerParameters = {};
|
|
2261
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
2262
|
+
const token = this.configuration.accessToken;
|
|
2263
|
+
const tokenString = await token("BoatBearerAuth", []);
|
|
2264
|
+
if (tokenString) {
|
|
2265
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
2266
|
+
}
|
|
2267
|
+
}
|
|
2268
|
+
let urlPath = `/sandboxes/{sandboxId}/ai-usage`;
|
|
2269
|
+
urlPath = urlPath.replace('{sandboxId}', encodeURIComponent(String(requestParameters['sandboxId'])));
|
|
2270
|
+
return {
|
|
2271
|
+
path: urlPath,
|
|
2272
|
+
method: 'GET',
|
|
2273
|
+
headers: headerParameters,
|
|
2274
|
+
query: queryParameters,
|
|
2275
|
+
};
|
|
2276
|
+
}
|
|
2277
|
+
/**
|
|
2278
|
+
* One sandbox\'s proxied AI usage per UTC day, credential and model, and whether it is blocked. Needs an API key with `box.read` on the sandbox.
|
|
2279
|
+
* Get sandbox AI usage
|
|
2280
|
+
*/
|
|
2281
|
+
async getSandboxAiUsageRaw(requestParameters, initOverrides) {
|
|
2282
|
+
const requestOptions = await this.getSandboxAiUsageRequestOpts(requestParameters);
|
|
2283
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
2284
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, SandboxAiUsageResponse_1.SandboxAiUsageResponseFromJSON)(jsonValue));
|
|
1832
2285
|
}
|
|
1833
2286
|
/**
|
|
1834
|
-
*
|
|
2287
|
+
* One sandbox\'s proxied AI usage per UTC day, credential and model, and whether it is blocked. Needs an API key with `box.read` on the sandbox.
|
|
2288
|
+
* Get sandbox AI usage
|
|
1835
2289
|
*/
|
|
1836
|
-
async
|
|
1837
|
-
const response = await this.
|
|
2290
|
+
async getSandboxAiUsage(requestParameters, initOverrides) {
|
|
2291
|
+
const response = await this.getSandboxAiUsageRaw(requestParameters, initOverrides);
|
|
1838
2292
|
return await response.value();
|
|
1839
2293
|
}
|
|
1840
2294
|
/**
|
|
@@ -2232,6 +2686,90 @@ class BoatApi extends runtime.BaseAPI {
|
|
|
2232
2686
|
const response = await this.limitsRaw(requestParameters, initOverrides);
|
|
2233
2687
|
return await response.value();
|
|
2234
2688
|
}
|
|
2689
|
+
/**
|
|
2690
|
+
* Creates request options for listCredentialAccounts without sending the request
|
|
2691
|
+
*/
|
|
2692
|
+
async listCredentialAccountsRequestOpts(requestParameters) {
|
|
2693
|
+
if (requestParameters['profile'] == null) {
|
|
2694
|
+
throw new runtime.RequiredError('profile', 'Required parameter "profile" was null or undefined when calling listCredentialAccounts().');
|
|
2695
|
+
}
|
|
2696
|
+
if (requestParameters['credential'] == null) {
|
|
2697
|
+
throw new runtime.RequiredError('credential', 'Required parameter "credential" was null or undefined when calling listCredentialAccounts().');
|
|
2698
|
+
}
|
|
2699
|
+
const queryParameters = {};
|
|
2700
|
+
const headerParameters = {};
|
|
2701
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
2702
|
+
const token = this.configuration.accessToken;
|
|
2703
|
+
const tokenString = await token("BoatBearerAuth", []);
|
|
2704
|
+
if (tokenString) {
|
|
2705
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
2706
|
+
}
|
|
2707
|
+
}
|
|
2708
|
+
let urlPath = `/credential-profiles/{profile}/accounts/{credential}`;
|
|
2709
|
+
urlPath = urlPath.replace('{profile}', encodeURIComponent(String(requestParameters['profile'])));
|
|
2710
|
+
urlPath = urlPath.replace('{credential}', encodeURIComponent(String(requestParameters['credential'])));
|
|
2711
|
+
return {
|
|
2712
|
+
path: urlPath,
|
|
2713
|
+
method: 'GET',
|
|
2714
|
+
headers: headerParameters,
|
|
2715
|
+
query: queryParameters,
|
|
2716
|
+
};
|
|
2717
|
+
}
|
|
2718
|
+
/**
|
|
2719
|
+
* 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`.
|
|
2720
|
+
* List the accounts of a credential
|
|
2721
|
+
*/
|
|
2722
|
+
async listCredentialAccountsRaw(requestParameters, initOverrides) {
|
|
2723
|
+
const requestOptions = await this.listCredentialAccountsRequestOpts(requestParameters);
|
|
2724
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
2725
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, CredentialAccountsResponse_1.CredentialAccountsResponseFromJSON)(jsonValue));
|
|
2726
|
+
}
|
|
2727
|
+
/**
|
|
2728
|
+
* 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`.
|
|
2729
|
+
* List the accounts of a credential
|
|
2730
|
+
*/
|
|
2731
|
+
async listCredentialAccounts(requestParameters, initOverrides) {
|
|
2732
|
+
const response = await this.listCredentialAccountsRaw(requestParameters, initOverrides);
|
|
2733
|
+
return await response.value();
|
|
2734
|
+
}
|
|
2735
|
+
/**
|
|
2736
|
+
* Creates request options for listCredentialProfiles without sending the request
|
|
2737
|
+
*/
|
|
2738
|
+
async listCredentialProfilesRequestOpts() {
|
|
2739
|
+
const queryParameters = {};
|
|
2740
|
+
const headerParameters = {};
|
|
2741
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
2742
|
+
const token = this.configuration.accessToken;
|
|
2743
|
+
const tokenString = await token("BoatBearerAuth", []);
|
|
2744
|
+
if (tokenString) {
|
|
2745
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
2746
|
+
}
|
|
2747
|
+
}
|
|
2748
|
+
let urlPath = `/credential-profiles`;
|
|
2749
|
+
return {
|
|
2750
|
+
path: urlPath,
|
|
2751
|
+
method: 'GET',
|
|
2752
|
+
headers: headerParameters,
|
|
2753
|
+
query: queryParameters,
|
|
2754
|
+
};
|
|
2755
|
+
}
|
|
2756
|
+
/**
|
|
2757
|
+
* Returns every AI credential profile you can use, yours and your organizations\'. Secret values are never returned. Needs an API key with `account.admin`.
|
|
2758
|
+
* List credential profiles
|
|
2759
|
+
*/
|
|
2760
|
+
async listCredentialProfilesRaw(initOverrides) {
|
|
2761
|
+
const requestOptions = await this.listCredentialProfilesRequestOpts();
|
|
2762
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
2763
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, CredentialProfileListResponse_1.CredentialProfileListResponseFromJSON)(jsonValue));
|
|
2764
|
+
}
|
|
2765
|
+
/**
|
|
2766
|
+
* Returns every AI credential profile you can use, yours and your organizations\'. Secret values are never returned. Needs an API key with `account.admin`.
|
|
2767
|
+
* List credential profiles
|
|
2768
|
+
*/
|
|
2769
|
+
async listCredentialProfiles(initOverrides) {
|
|
2770
|
+
const response = await this.listCredentialProfilesRaw(initOverrides);
|
|
2771
|
+
return await response.value();
|
|
2772
|
+
}
|
|
2235
2773
|
/**
|
|
2236
2774
|
* Creates request options for listNamedSnapshots without sending the request
|
|
2237
2775
|
*/
|
|
@@ -3250,11 +3788,115 @@ class BoatApi extends runtime.BaseAPI {
|
|
|
3250
3788
|
const response = await this.setActiveOrganizationRaw(requestParameters, initOverrides);
|
|
3251
3789
|
return await response.value();
|
|
3252
3790
|
}
|
|
3791
|
+
/**
|
|
3792
|
+
* Creates request options for setCredentialProfileCustomApi without sending the request
|
|
3793
|
+
*/
|
|
3794
|
+
async setCredentialProfileCustomApiRequestOpts(input) {
|
|
3795
|
+
const requestParameters = runtime.unflattenBody(input, 'setCustomApiRequest', ['profile', 'name'], []);
|
|
3796
|
+
if (requestParameters['profile'] == null) {
|
|
3797
|
+
throw new runtime.RequiredError('profile', 'Required parameter "profile" was null or undefined when calling setCredentialProfileCustomApi().');
|
|
3798
|
+
}
|
|
3799
|
+
if (requestParameters['name'] == null) {
|
|
3800
|
+
throw new runtime.RequiredError('name', 'Required parameter "name" was null or undefined when calling setCredentialProfileCustomApi().');
|
|
3801
|
+
}
|
|
3802
|
+
if (requestParameters['setCustomApiRequest'] == null) {
|
|
3803
|
+
throw new runtime.RequiredError('setCustomApiRequest', 'Required parameter "setCustomApiRequest" was null or undefined when calling setCredentialProfileCustomApi().');
|
|
3804
|
+
}
|
|
3805
|
+
const queryParameters = {};
|
|
3806
|
+
const headerParameters = {};
|
|
3807
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
3808
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
3809
|
+
const token = this.configuration.accessToken;
|
|
3810
|
+
const tokenString = await token("BoatBearerAuth", []);
|
|
3811
|
+
if (tokenString) {
|
|
3812
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
3813
|
+
}
|
|
3814
|
+
}
|
|
3815
|
+
let urlPath = `/credential-profiles/{profile}/custom-apis/{name}`;
|
|
3816
|
+
urlPath = urlPath.replace('{profile}', encodeURIComponent(String(requestParameters['profile'])));
|
|
3817
|
+
urlPath = urlPath.replace('{name}', encodeURIComponent(String(requestParameters['name'])));
|
|
3818
|
+
return {
|
|
3819
|
+
path: urlPath,
|
|
3820
|
+
method: 'PUT',
|
|
3821
|
+
headers: headerParameters,
|
|
3822
|
+
query: queryParameters,
|
|
3823
|
+
body: (0, SetCustomApiRequest_1.SetCustomApiRequestToJSON)(requestParameters['setCustomApiRequest']),
|
|
3824
|
+
};
|
|
3825
|
+
}
|
|
3826
|
+
/**
|
|
3827
|
+
* Adds or replaces one custom API. The sandbox gets `<NAME>` and `<NAME>_BASE_URL`. Needs an API key with `account.admin`.
|
|
3828
|
+
* Set a custom API
|
|
3829
|
+
*/
|
|
3830
|
+
async setCredentialProfileCustomApiRaw(requestParameters, initOverrides) {
|
|
3831
|
+
const requestOptions = await this.setCredentialProfileCustomApiRequestOpts(requestParameters);
|
|
3832
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
3833
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, CredentialProfileResponse_1.CredentialProfileResponseFromJSON)(jsonValue));
|
|
3834
|
+
}
|
|
3835
|
+
/**
|
|
3836
|
+
* Adds or replaces one custom API. The sandbox gets `<NAME>` and `<NAME>_BASE_URL`. Needs an API key with `account.admin`.
|
|
3837
|
+
* Set a custom API
|
|
3838
|
+
*/
|
|
3839
|
+
async setCredentialProfileCustomApi(requestParameters, initOverrides) {
|
|
3840
|
+
const response = await this.setCredentialProfileCustomApiRaw(requestParameters, initOverrides);
|
|
3841
|
+
return await response.value();
|
|
3842
|
+
}
|
|
3843
|
+
/**
|
|
3844
|
+
* Creates request options for setCredentialProfileKey without sending the request
|
|
3845
|
+
*/
|
|
3846
|
+
async setCredentialProfileKeyRequestOpts(input) {
|
|
3847
|
+
const requestParameters = runtime.unflattenBody(input, 'setCredentialKeyRequest', ['profile', 'credential'], []);
|
|
3848
|
+
if (requestParameters['profile'] == null) {
|
|
3849
|
+
throw new runtime.RequiredError('profile', 'Required parameter "profile" was null or undefined when calling setCredentialProfileKey().');
|
|
3850
|
+
}
|
|
3851
|
+
if (requestParameters['credential'] == null) {
|
|
3852
|
+
throw new runtime.RequiredError('credential', 'Required parameter "credential" was null or undefined when calling setCredentialProfileKey().');
|
|
3853
|
+
}
|
|
3854
|
+
if (requestParameters['setCredentialKeyRequest'] == null) {
|
|
3855
|
+
throw new runtime.RequiredError('setCredentialKeyRequest', 'Required parameter "setCredentialKeyRequest" was null or undefined when calling setCredentialProfileKey().');
|
|
3856
|
+
}
|
|
3857
|
+
const queryParameters = {};
|
|
3858
|
+
const headerParameters = {};
|
|
3859
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
3860
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
3861
|
+
const token = this.configuration.accessToken;
|
|
3862
|
+
const tokenString = await token("BoatBearerAuth", []);
|
|
3863
|
+
if (tokenString) {
|
|
3864
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
3865
|
+
}
|
|
3866
|
+
}
|
|
3867
|
+
let urlPath = `/credential-profiles/{profile}/keys/{credential}`;
|
|
3868
|
+
urlPath = urlPath.replace('{profile}', encodeURIComponent(String(requestParameters['profile'])));
|
|
3869
|
+
urlPath = urlPath.replace('{credential}', encodeURIComponent(String(requestParameters['credential'])));
|
|
3870
|
+
return {
|
|
3871
|
+
path: urlPath,
|
|
3872
|
+
method: 'PUT',
|
|
3873
|
+
headers: headerParameters,
|
|
3874
|
+
query: queryParameters,
|
|
3875
|
+
body: (0, SetCredentialKeyRequest_1.SetCredentialKeyRequestToJSON)(requestParameters['setCredentialKeyRequest']),
|
|
3876
|
+
};
|
|
3877
|
+
}
|
|
3878
|
+
/**
|
|
3879
|
+
* Sets one API key. A sign-in id returns `400 not_an_api_key`; connect sign-ins on the dashboard Agents page. Running sandboxes that use the profile get the new key. Needs an API key with `account.admin`.
|
|
3880
|
+
* Set a credential profile API key
|
|
3881
|
+
*/
|
|
3882
|
+
async setCredentialProfileKeyRaw(requestParameters, initOverrides) {
|
|
3883
|
+
const requestOptions = await this.setCredentialProfileKeyRequestOpts(requestParameters);
|
|
3884
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
3885
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, CredentialProfileResponse_1.CredentialProfileResponseFromJSON)(jsonValue));
|
|
3886
|
+
}
|
|
3887
|
+
/**
|
|
3888
|
+
* Sets one API key. A sign-in id returns `400 not_an_api_key`; connect sign-ins on the dashboard Agents page. Running sandboxes that use the profile get the new key. Needs an API key with `account.admin`.
|
|
3889
|
+
* Set a credential profile API key
|
|
3890
|
+
*/
|
|
3891
|
+
async setCredentialProfileKey(requestParameters, initOverrides) {
|
|
3892
|
+
const response = await this.setCredentialProfileKeyRaw(requestParameters, initOverrides);
|
|
3893
|
+
return await response.value();
|
|
3894
|
+
}
|
|
3253
3895
|
/**
|
|
3254
3896
|
* Creates request options for setEnvironmentSecretFile without sending the request
|
|
3255
3897
|
*/
|
|
3256
3898
|
async setEnvironmentSecretFileRequestOpts(input) {
|
|
3257
|
-
const requestParameters = runtime.unflattenBody(input, 'setEnvironmentSecretFileRequest', ['environmentId'], []);
|
|
3899
|
+
const requestParameters = runtime.unflattenBody(input, 'setEnvironmentSecretFileRequest', ['environmentId', 'org'], []);
|
|
3258
3900
|
if (requestParameters['environmentId'] == null) {
|
|
3259
3901
|
throw new runtime.RequiredError('environmentId', 'Required parameter "environmentId" was null or undefined when calling setEnvironmentSecretFile().');
|
|
3260
3902
|
}
|
|
@@ -3262,6 +3904,9 @@ class BoatApi extends runtime.BaseAPI {
|
|
|
3262
3904
|
throw new runtime.RequiredError('setEnvironmentSecretFileRequest', 'Required parameter "setEnvironmentSecretFileRequest" was null or undefined when calling setEnvironmentSecretFile().');
|
|
3263
3905
|
}
|
|
3264
3906
|
const queryParameters = {};
|
|
3907
|
+
if (requestParameters['org'] != null) {
|
|
3908
|
+
queryParameters['org'] = requestParameters['org'];
|
|
3909
|
+
}
|
|
3265
3910
|
const headerParameters = {};
|
|
3266
3911
|
headerParameters['Content-Type'] = 'application/json';
|
|
3267
3912
|
if (this.configuration && this.configuration.accessToken) {
|
|
@@ -3302,7 +3947,7 @@ class BoatApi extends runtime.BaseAPI {
|
|
|
3302
3947
|
* Creates request options for setEnvironmentVar without sending the request
|
|
3303
3948
|
*/
|
|
3304
3949
|
async setEnvironmentVarRequestOpts(input) {
|
|
3305
|
-
const requestParameters = runtime.unflattenBody(input, 'setEnvironmentVarRequest', ['environmentId', 'key'], []);
|
|
3950
|
+
const requestParameters = runtime.unflattenBody(input, 'setEnvironmentVarRequest', ['environmentId', 'key', 'org'], []);
|
|
3306
3951
|
if (requestParameters['environmentId'] == null) {
|
|
3307
3952
|
throw new runtime.RequiredError('environmentId', 'Required parameter "environmentId" was null or undefined when calling setEnvironmentVar().');
|
|
3308
3953
|
}
|
|
@@ -3313,6 +3958,9 @@ class BoatApi extends runtime.BaseAPI {
|
|
|
3313
3958
|
throw new runtime.RequiredError('setEnvironmentVarRequest', 'Required parameter "setEnvironmentVarRequest" was null or undefined when calling setEnvironmentVar().');
|
|
3314
3959
|
}
|
|
3315
3960
|
const queryParameters = {};
|
|
3961
|
+
if (requestParameters['org'] != null) {
|
|
3962
|
+
queryParameters['org'] = requestParameters['org'];
|
|
3963
|
+
}
|
|
3316
3964
|
const headerParameters = {};
|
|
3317
3965
|
headerParameters['Content-Type'] = 'application/json';
|
|
3318
3966
|
if (this.configuration && this.configuration.accessToken) {
|
|
@@ -3350,6 +3998,54 @@ class BoatApi extends runtime.BaseAPI {
|
|
|
3350
3998
|
const response = await this.setEnvironmentVarRaw(requestParameters, initOverrides);
|
|
3351
3999
|
return await response.value();
|
|
3352
4000
|
}
|
|
4001
|
+
/**
|
|
4002
|
+
* Creates request options for setSandboxAiAccess without sending the request
|
|
4003
|
+
*/
|
|
4004
|
+
async setSandboxAiAccessRequestOpts(input) {
|
|
4005
|
+
const requestParameters = runtime.unflattenBody(input, 'setSandboxAiAccessRequest', ['sandboxId'], []);
|
|
4006
|
+
if (requestParameters['sandboxId'] == null) {
|
|
4007
|
+
throw new runtime.RequiredError('sandboxId', 'Required parameter "sandboxId" was null or undefined when calling setSandboxAiAccess().');
|
|
4008
|
+
}
|
|
4009
|
+
if (requestParameters['setSandboxAiAccessRequest'] == null) {
|
|
4010
|
+
throw new runtime.RequiredError('setSandboxAiAccessRequest', 'Required parameter "setSandboxAiAccessRequest" was null or undefined when calling setSandboxAiAccess().');
|
|
4011
|
+
}
|
|
4012
|
+
const queryParameters = {};
|
|
4013
|
+
const headerParameters = {};
|
|
4014
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
4015
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
4016
|
+
const token = this.configuration.accessToken;
|
|
4017
|
+
const tokenString = await token("BoatBearerAuth", []);
|
|
4018
|
+
if (tokenString) {
|
|
4019
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
4020
|
+
}
|
|
4021
|
+
}
|
|
4022
|
+
let urlPath = `/sandboxes/{sandboxId}/ai-access`;
|
|
4023
|
+
urlPath = urlPath.replace('{sandboxId}', encodeURIComponent(String(requestParameters['sandboxId'])));
|
|
4024
|
+
return {
|
|
4025
|
+
path: urlPath,
|
|
4026
|
+
method: 'PUT',
|
|
4027
|
+
headers: headerParameters,
|
|
4028
|
+
query: queryParameters,
|
|
4029
|
+
body: (0, SetSandboxAiAccessRequest_1.SetSandboxAiAccessRequestToJSON)(requestParameters['setSandboxAiAccessRequest']),
|
|
4030
|
+
};
|
|
4031
|
+
}
|
|
4032
|
+
/**
|
|
4033
|
+
* Blocks or unblocks the sandbox\'s AI placeholders, running or stopped. The proxy refuses a blocked sandbox\'s requests with `403`. It has no effect on a sandbox that holds real keys. The sandbox creator, or a manager of its credential profile, can call it. Needs an API key with `account.admin`.
|
|
4034
|
+
* Block or unblock sandbox AI access
|
|
4035
|
+
*/
|
|
4036
|
+
async setSandboxAiAccessRaw(requestParameters, initOverrides) {
|
|
4037
|
+
const requestOptions = await this.setSandboxAiAccessRequestOpts(requestParameters);
|
|
4038
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
4039
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, SandboxAiAccessResponse_1.SandboxAiAccessResponseFromJSON)(jsonValue));
|
|
4040
|
+
}
|
|
4041
|
+
/**
|
|
4042
|
+
* Blocks or unblocks the sandbox\'s AI placeholders, running or stopped. The proxy refuses a blocked sandbox\'s requests with `403`. It has no effect on a sandbox that holds real keys. The sandbox creator, or a manager of its credential profile, can call it. Needs an API key with `account.admin`.
|
|
4043
|
+
* Block or unblock sandbox AI access
|
|
4044
|
+
*/
|
|
4045
|
+
async setSandboxAiAccess(requestParameters, initOverrides) {
|
|
4046
|
+
const response = await this.setSandboxAiAccessRaw(requestParameters, initOverrides);
|
|
4047
|
+
return await response.value();
|
|
4048
|
+
}
|
|
3353
4049
|
/**
|
|
3354
4050
|
* Creates request options for setTelemetry without sending the request
|
|
3355
4051
|
*/
|
|
@@ -3626,6 +4322,56 @@ class BoatApi extends runtime.BaseAPI {
|
|
|
3626
4322
|
const response = await this.stopCommandRaw(requestParameters, initOverrides);
|
|
3627
4323
|
return await response.value();
|
|
3628
4324
|
}
|
|
4325
|
+
/**
|
|
4326
|
+
* Creates request options for switchCredentialAccount without sending the request
|
|
4327
|
+
*/
|
|
4328
|
+
async switchCredentialAccountRequestOpts(requestParameters) {
|
|
4329
|
+
if (requestParameters['profile'] == null) {
|
|
4330
|
+
throw new runtime.RequiredError('profile', 'Required parameter "profile" was null or undefined when calling switchCredentialAccount().');
|
|
4331
|
+
}
|
|
4332
|
+
if (requestParameters['credential'] == null) {
|
|
4333
|
+
throw new runtime.RequiredError('credential', 'Required parameter "credential" was null or undefined when calling switchCredentialAccount().');
|
|
4334
|
+
}
|
|
4335
|
+
if (requestParameters['account'] == null) {
|
|
4336
|
+
throw new runtime.RequiredError('account', 'Required parameter "account" was null or undefined when calling switchCredentialAccount().');
|
|
4337
|
+
}
|
|
4338
|
+
const queryParameters = {};
|
|
4339
|
+
const headerParameters = {};
|
|
4340
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
4341
|
+
const token = this.configuration.accessToken;
|
|
4342
|
+
const tokenString = await token("BoatBearerAuth", []);
|
|
4343
|
+
if (tokenString) {
|
|
4344
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
4345
|
+
}
|
|
4346
|
+
}
|
|
4347
|
+
let urlPath = `/credential-profiles/{profile}/accounts/{credential}/{account}/active`;
|
|
4348
|
+
urlPath = urlPath.replace('{profile}', encodeURIComponent(String(requestParameters['profile'])));
|
|
4349
|
+
urlPath = urlPath.replace('{credential}', encodeURIComponent(String(requestParameters['credential'])));
|
|
4350
|
+
urlPath = urlPath.replace('{account}', encodeURIComponent(String(requestParameters['account'])));
|
|
4351
|
+
return {
|
|
4352
|
+
path: urlPath,
|
|
4353
|
+
method: 'PUT',
|
|
4354
|
+
headers: headerParameters,
|
|
4355
|
+
query: queryParameters,
|
|
4356
|
+
};
|
|
4357
|
+
}
|
|
4358
|
+
/**
|
|
4359
|
+
* 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`.
|
|
4360
|
+
* Switch a credential to another account
|
|
4361
|
+
*/
|
|
4362
|
+
async switchCredentialAccountRaw(requestParameters, initOverrides) {
|
|
4363
|
+
const requestOptions = await this.switchCredentialAccountRequestOpts(requestParameters);
|
|
4364
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
4365
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, CredentialAccountsResponse_1.CredentialAccountsResponseFromJSON)(jsonValue));
|
|
4366
|
+
}
|
|
4367
|
+
/**
|
|
4368
|
+
* 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`.
|
|
4369
|
+
* Switch a credential to another account
|
|
4370
|
+
*/
|
|
4371
|
+
async switchCredentialAccount(requestParameters, initOverrides) {
|
|
4372
|
+
const response = await this.switchCredentialAccountRaw(requestParameters, initOverrides);
|
|
4373
|
+
return await response.value();
|
|
4374
|
+
}
|
|
3629
4375
|
/**
|
|
3630
4376
|
* Creates request options for update without sending the request
|
|
3631
4377
|
*/
|
|
@@ -3672,6 +4418,104 @@ class BoatApi extends runtime.BaseAPI {
|
|
|
3672
4418
|
const response = await this.updateRaw(requestParameters, initOverrides);
|
|
3673
4419
|
return await response.value();
|
|
3674
4420
|
}
|
|
4421
|
+
/**
|
|
4422
|
+
* Creates request options for updateAiProxy without sending the request
|
|
4423
|
+
*/
|
|
4424
|
+
async updateAiProxyRequestOpts(input) {
|
|
4425
|
+
const requestParameters = runtime.unflattenBody(input, 'updateAiProxyRequest', ['org', 'xBoatOrg'], []);
|
|
4426
|
+
if (requestParameters['updateAiProxyRequest'] == null) {
|
|
4427
|
+
throw new runtime.RequiredError('updateAiProxyRequest', 'Required parameter "updateAiProxyRequest" was null or undefined when calling updateAiProxy().');
|
|
4428
|
+
}
|
|
4429
|
+
const queryParameters = {};
|
|
4430
|
+
if (requestParameters['org'] != null) {
|
|
4431
|
+
queryParameters['org'] = requestParameters['org'];
|
|
4432
|
+
}
|
|
4433
|
+
const headerParameters = {};
|
|
4434
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
4435
|
+
if (requestParameters['xBoatOrg'] != null) {
|
|
4436
|
+
headerParameters['X-Boat-Org'] = String(requestParameters['xBoatOrg']);
|
|
4437
|
+
}
|
|
4438
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
4439
|
+
const token = this.configuration.accessToken;
|
|
4440
|
+
const tokenString = await token("BoatBearerAuth", []);
|
|
4441
|
+
if (tokenString) {
|
|
4442
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
4443
|
+
}
|
|
4444
|
+
}
|
|
4445
|
+
let urlPath = `/ai-proxy`;
|
|
4446
|
+
return {
|
|
4447
|
+
path: urlPath,
|
|
4448
|
+
method: 'PUT',
|
|
4449
|
+
headers: headerParameters,
|
|
4450
|
+
query: queryParameters,
|
|
4451
|
+
body: (0, UpdateAiProxyRequest_1.UpdateAiProxyRequestToJSON)(requestParameters['updateAiProxyRequest']),
|
|
4452
|
+
};
|
|
4453
|
+
}
|
|
4454
|
+
/**
|
|
4455
|
+
* With the proxy on, sandboxes get placeholder keys and base URLs that point at Boat. Boat swaps in the real key on each request. Real keys never enter the sandbox. Running sandboxes switch at their next start. While on, the account pays $1 of Boat time for each UTC day, plus $1 per 1,000 proxied requests, charged to the wallet each sandbox bills. For an organization, only its owner can change the switch. Needs an API key with `account.admin`.
|
|
4456
|
+
* Turn the AI credentials proxy on or off
|
|
4457
|
+
*/
|
|
4458
|
+
async updateAiProxyRaw(requestParameters, initOverrides) {
|
|
4459
|
+
const requestOptions = await this.updateAiProxyRequestOpts(requestParameters);
|
|
4460
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
4461
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, AiProxySettings_1.AiProxySettingsFromJSON)(jsonValue));
|
|
4462
|
+
}
|
|
4463
|
+
/**
|
|
4464
|
+
* With the proxy on, sandboxes get placeholder keys and base URLs that point at Boat. Boat swaps in the real key on each request. Real keys never enter the sandbox. Running sandboxes switch at their next start. While on, the account pays $1 of Boat time for each UTC day, plus $1 per 1,000 proxied requests, charged to the wallet each sandbox bills. For an organization, only its owner can change the switch. Needs an API key with `account.admin`.
|
|
4465
|
+
* Turn the AI credentials proxy on or off
|
|
4466
|
+
*/
|
|
4467
|
+
async updateAiProxy(requestParameters, initOverrides) {
|
|
4468
|
+
const response = await this.updateAiProxyRaw(requestParameters, initOverrides);
|
|
4469
|
+
return await response.value();
|
|
4470
|
+
}
|
|
4471
|
+
/**
|
|
4472
|
+
* Creates request options for updateCredentialProfile without sending the request
|
|
4473
|
+
*/
|
|
4474
|
+
async updateCredentialProfileRequestOpts(input) {
|
|
4475
|
+
const requestParameters = runtime.unflattenBody(input, 'updateCredentialProfileRequest', ['profile'], []);
|
|
4476
|
+
if (requestParameters['profile'] == null) {
|
|
4477
|
+
throw new runtime.RequiredError('profile', 'Required parameter "profile" was null or undefined when calling updateCredentialProfile().');
|
|
4478
|
+
}
|
|
4479
|
+
if (requestParameters['updateCredentialProfileRequest'] == null) {
|
|
4480
|
+
throw new runtime.RequiredError('updateCredentialProfileRequest', 'Required parameter "updateCredentialProfileRequest" was null or undefined when calling updateCredentialProfile().');
|
|
4481
|
+
}
|
|
4482
|
+
const queryParameters = {};
|
|
4483
|
+
const headerParameters = {};
|
|
4484
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
4485
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
4486
|
+
const token = this.configuration.accessToken;
|
|
4487
|
+
const tokenString = await token("BoatBearerAuth", []);
|
|
4488
|
+
if (tokenString) {
|
|
4489
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
4490
|
+
}
|
|
4491
|
+
}
|
|
4492
|
+
let urlPath = `/credential-profiles/{profile}`;
|
|
4493
|
+
urlPath = urlPath.replace('{profile}', encodeURIComponent(String(requestParameters['profile'])));
|
|
4494
|
+
return {
|
|
4495
|
+
path: urlPath,
|
|
4496
|
+
method: 'PUT',
|
|
4497
|
+
headers: headerParameters,
|
|
4498
|
+
query: queryParameters,
|
|
4499
|
+
body: (0, UpdateCredentialProfileRequest_1.UpdateCredentialProfileRequestToJSON)(requestParameters['updateCredentialProfileRequest']),
|
|
4500
|
+
};
|
|
4501
|
+
}
|
|
4502
|
+
/**
|
|
4503
|
+
* Renames the profile, or makes it its owner\'s default. Sandboxes that use the owner\'s default switch to the new default at their next start. Needs an API key with `account.admin`.
|
|
4504
|
+
* Update a credential profile
|
|
4505
|
+
*/
|
|
4506
|
+
async updateCredentialProfileRaw(requestParameters, initOverrides) {
|
|
4507
|
+
const requestOptions = await this.updateCredentialProfileRequestOpts(requestParameters);
|
|
4508
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
4509
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, CredentialProfileResponse_1.CredentialProfileResponseFromJSON)(jsonValue));
|
|
4510
|
+
}
|
|
4511
|
+
/**
|
|
4512
|
+
* Renames the profile, or makes it its owner\'s default. Sandboxes that use the owner\'s default switch to the new default at their next start. Needs an API key with `account.admin`.
|
|
4513
|
+
* Update a credential profile
|
|
4514
|
+
*/
|
|
4515
|
+
async updateCredentialProfile(requestParameters, initOverrides) {
|
|
4516
|
+
const response = await this.updateCredentialProfileRaw(requestParameters, initOverrides);
|
|
4517
|
+
return await response.value();
|
|
4518
|
+
}
|
|
3675
4519
|
/**
|
|
3676
4520
|
* Creates request options for updateDataRetention without sending the request
|
|
3677
4521
|
*/
|
|
@@ -3720,7 +4564,7 @@ class BoatApi extends runtime.BaseAPI {
|
|
|
3720
4564
|
* Creates request options for updateEnvironment without sending the request
|
|
3721
4565
|
*/
|
|
3722
4566
|
async updateEnvironmentRequestOpts(input) {
|
|
3723
|
-
const requestParameters = runtime.unflattenBody(input, 'updateSandboxEnvironmentRequest', ['environmentId'], []);
|
|
4567
|
+
const requestParameters = runtime.unflattenBody(input, 'updateSandboxEnvironmentRequest', ['environmentId', 'org'], []);
|
|
3724
4568
|
if (requestParameters['environmentId'] == null) {
|
|
3725
4569
|
throw new runtime.RequiredError('environmentId', 'Required parameter "environmentId" was null or undefined when calling updateEnvironment().');
|
|
3726
4570
|
}
|
|
@@ -3728,6 +4572,9 @@ class BoatApi extends runtime.BaseAPI {
|
|
|
3728
4572
|
throw new runtime.RequiredError('updateSandboxEnvironmentRequest', 'Required parameter "updateSandboxEnvironmentRequest" was null or undefined when calling updateEnvironment().');
|
|
3729
4573
|
}
|
|
3730
4574
|
const queryParameters = {};
|
|
4575
|
+
if (requestParameters['org'] != null) {
|
|
4576
|
+
queryParameters['org'] = requestParameters['org'];
|
|
4577
|
+
}
|
|
3731
4578
|
const headerParameters = {};
|
|
3732
4579
|
headerParameters['Content-Type'] = 'application/json';
|
|
3733
4580
|
if (this.configuration && this.configuration.accessToken) {
|
|
@@ -3858,11 +4705,14 @@ class BoatApi extends runtime.BaseAPI {
|
|
|
3858
4705
|
* Creates request options for upgradeEnvironment without sending the request
|
|
3859
4706
|
*/
|
|
3860
4707
|
async upgradeEnvironmentRequestOpts(input) {
|
|
3861
|
-
const requestParameters = runtime.unflattenBody(input, 'upgradeSandboxEnvironmentRequest', ['environmentId'], []);
|
|
4708
|
+
const requestParameters = runtime.unflattenBody(input, 'upgradeSandboxEnvironmentRequest', ['environmentId', 'org'], []);
|
|
3862
4709
|
if (requestParameters['environmentId'] == null) {
|
|
3863
4710
|
throw new runtime.RequiredError('environmentId', 'Required parameter "environmentId" was null or undefined when calling upgradeEnvironment().');
|
|
3864
4711
|
}
|
|
3865
4712
|
const queryParameters = {};
|
|
4713
|
+
if (requestParameters['org'] != null) {
|
|
4714
|
+
queryParameters['org'] = requestParameters['org'];
|
|
4715
|
+
}
|
|
3866
4716
|
const headerParameters = {};
|
|
3867
4717
|
headerParameters['Content-Type'] = 'application/json';
|
|
3868
4718
|
if (this.configuration && this.configuration.accessToken) {
|