@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.
Files changed (160) hide show
  1. package/.openapi-generator/FILES +44 -0
  2. package/dist/apis/BoatApi.d.ts +339 -3
  3. package/dist/apis/BoatApi.js +865 -15
  4. package/dist/esm/apis/BoatApi.d.ts +339 -3
  5. package/dist/esm/apis/BoatApi.js +865 -15
  6. package/dist/esm/models/AccountAiUsageResponse.d.ts +83 -0
  7. package/dist/esm/models/AccountAiUsageResponse.js +78 -0
  8. package/dist/esm/models/AiProxySettings.d.ts +81 -0
  9. package/dist/esm/models/AiProxySettings.js +76 -0
  10. package/dist/esm/models/AiProxySettingsAllOfPricing.d.ts +38 -0
  11. package/dist/esm/models/AiProxySettingsAllOfPricing.js +47 -0
  12. package/dist/esm/models/AiUsageRow.d.ts +80 -0
  13. package/dist/esm/models/AiUsageRow.js +75 -0
  14. package/dist/esm/models/AiUsageTotals.d.ts +62 -0
  15. package/dist/esm/models/AiUsageTotals.js +63 -0
  16. package/dist/esm/models/CreateCredentialProfileRequest.d.ts +44 -0
  17. package/dist/esm/models/CreateCredentialProfileRequest.js +47 -0
  18. package/dist/esm/models/CredentialAccount.d.ts +50 -0
  19. package/dist/esm/models/CredentialAccount.js +53 -0
  20. package/dist/esm/models/CredentialAccountsResponse.d.ts +64 -0
  21. package/dist/esm/models/CredentialAccountsResponse.js +65 -0
  22. package/dist/esm/models/CredentialId.d.ts +36 -0
  23. package/dist/esm/models/CredentialId.js +54 -0
  24. package/dist/esm/models/CredentialProfile.d.ts +91 -0
  25. package/dist/esm/models/CredentialProfile.js +79 -0
  26. package/dist/esm/models/CredentialProfileDeletedResponse.d.ts +44 -0
  27. package/dist/esm/models/CredentialProfileDeletedResponse.js +51 -0
  28. package/dist/esm/models/CredentialProfileListResponse.d.ts +45 -0
  29. package/dist/esm/models/CredentialProfileListResponse.js +52 -0
  30. package/dist/esm/models/CredentialProfileOwner.d.ts +58 -0
  31. package/dist/esm/models/CredentialProfileOwner.js +62 -0
  32. package/dist/esm/models/CredentialProfileResponse.d.ts +51 -0
  33. package/dist/esm/models/CredentialProfileResponse.js +56 -0
  34. package/dist/esm/models/ProcessListResponse.d.ts +1 -1
  35. package/dist/esm/models/SandboxAiAccessResponse.d.ts +56 -0
  36. package/dist/esm/models/SandboxAiAccessResponse.js +59 -0
  37. package/dist/esm/models/SandboxAiUsage.d.ts +64 -0
  38. package/dist/esm/models/SandboxAiUsage.js +65 -0
  39. package/dist/esm/models/SandboxAiUsageResponse.d.ts +88 -0
  40. package/dist/esm/models/SandboxAiUsageResponse.js +81 -0
  41. package/dist/esm/models/SandboxEnvironment.d.ts +13 -1
  42. package/dist/esm/models/SandboxEnvironment.js +4 -0
  43. package/dist/esm/models/SetCredentialKeyRequest.d.ts +38 -0
  44. package/dist/esm/models/SetCredentialKeyRequest.js +45 -0
  45. package/dist/esm/models/SetCustomApiRequest.d.ts +38 -0
  46. package/dist/esm/models/SetCustomApiRequest.js +47 -0
  47. package/dist/esm/models/SetSandboxAiAccessRequest.d.ts +32 -0
  48. package/dist/esm/models/SetSandboxAiAccessRequest.js +43 -0
  49. package/dist/esm/models/UpdateAiProxyRequest.d.ts +32 -0
  50. package/dist/esm/models/UpdateAiProxyRequest.js +43 -0
  51. package/dist/esm/models/UpdateCredentialProfileRequest.d.ts +38 -0
  52. package/dist/esm/models/UpdateCredentialProfileRequest.js +43 -0
  53. package/dist/esm/models/UpdateSandboxEnvironmentRequest.d.ts +12 -0
  54. package/dist/esm/models/UpdateSandboxEnvironmentRequest.js +4 -0
  55. package/dist/esm/models/index.d.ts +22 -0
  56. package/dist/esm/models/index.js +22 -0
  57. package/dist/models/AccountAiUsageResponse.d.ts +83 -0
  58. package/dist/models/AccountAiUsageResponse.js +85 -0
  59. package/dist/models/AiProxySettings.d.ts +81 -0
  60. package/dist/models/AiProxySettings.js +83 -0
  61. package/dist/models/AiProxySettingsAllOfPricing.d.ts +38 -0
  62. package/dist/models/AiProxySettingsAllOfPricing.js +54 -0
  63. package/dist/models/AiUsageRow.d.ts +80 -0
  64. package/dist/models/AiUsageRow.js +82 -0
  65. package/dist/models/AiUsageTotals.d.ts +62 -0
  66. package/dist/models/AiUsageTotals.js +70 -0
  67. package/dist/models/CreateCredentialProfileRequest.d.ts +44 -0
  68. package/dist/models/CreateCredentialProfileRequest.js +54 -0
  69. package/dist/models/CredentialAccount.d.ts +50 -0
  70. package/dist/models/CredentialAccount.js +60 -0
  71. package/dist/models/CredentialAccountsResponse.d.ts +64 -0
  72. package/dist/models/CredentialAccountsResponse.js +72 -0
  73. package/dist/models/CredentialId.d.ts +36 -0
  74. package/dist/models/CredentialId.js +62 -0
  75. package/dist/models/CredentialProfile.d.ts +91 -0
  76. package/dist/models/CredentialProfile.js +86 -0
  77. package/dist/models/CredentialProfileDeletedResponse.d.ts +44 -0
  78. package/dist/models/CredentialProfileDeletedResponse.js +58 -0
  79. package/dist/models/CredentialProfileListResponse.d.ts +45 -0
  80. package/dist/models/CredentialProfileListResponse.js +59 -0
  81. package/dist/models/CredentialProfileOwner.d.ts +58 -0
  82. package/dist/models/CredentialProfileOwner.js +70 -0
  83. package/dist/models/CredentialProfileResponse.d.ts +51 -0
  84. package/dist/models/CredentialProfileResponse.js +63 -0
  85. package/dist/models/ProcessListResponse.d.ts +1 -1
  86. package/dist/models/SandboxAiAccessResponse.d.ts +56 -0
  87. package/dist/models/SandboxAiAccessResponse.js +66 -0
  88. package/dist/models/SandboxAiUsage.d.ts +64 -0
  89. package/dist/models/SandboxAiUsage.js +72 -0
  90. package/dist/models/SandboxAiUsageResponse.d.ts +88 -0
  91. package/dist/models/SandboxAiUsageResponse.js +88 -0
  92. package/dist/models/SandboxEnvironment.d.ts +13 -1
  93. package/dist/models/SandboxEnvironment.js +4 -0
  94. package/dist/models/SetCredentialKeyRequest.d.ts +38 -0
  95. package/dist/models/SetCredentialKeyRequest.js +52 -0
  96. package/dist/models/SetCustomApiRequest.d.ts +38 -0
  97. package/dist/models/SetCustomApiRequest.js +54 -0
  98. package/dist/models/SetSandboxAiAccessRequest.d.ts +32 -0
  99. package/dist/models/SetSandboxAiAccessRequest.js +50 -0
  100. package/dist/models/UpdateAiProxyRequest.d.ts +32 -0
  101. package/dist/models/UpdateAiProxyRequest.js +50 -0
  102. package/dist/models/UpdateCredentialProfileRequest.d.ts +38 -0
  103. package/dist/models/UpdateCredentialProfileRequest.js +50 -0
  104. package/dist/models/UpdateSandboxEnvironmentRequest.d.ts +12 -0
  105. package/dist/models/UpdateSandboxEnvironmentRequest.js +4 -0
  106. package/dist/models/index.d.ts +22 -0
  107. package/dist/models/index.js +22 -0
  108. package/docs/AccountAiUsageResponse.md +48 -0
  109. package/docs/AiProxySettings.md +48 -0
  110. package/docs/AiProxySettingsAllOfPricing.md +34 -0
  111. package/docs/AiUsageRow.md +48 -0
  112. package/docs/AiUsageTotals.md +43 -0
  113. package/docs/BoatApi.md +1588 -212
  114. package/docs/CreateCredentialProfileRequest.md +36 -0
  115. package/docs/CredentialAccount.md +39 -0
  116. package/docs/CredentialAccountsResponse.md +42 -0
  117. package/docs/CredentialId.md +31 -0
  118. package/docs/CredentialProfile.md +51 -0
  119. package/docs/CredentialProfileDeletedResponse.md +36 -0
  120. package/docs/CredentialProfileListResponse.md +36 -0
  121. package/docs/CredentialProfileOwner.md +38 -0
  122. package/docs/CredentialProfileResponse.md +38 -0
  123. package/docs/SandboxAiAccessResponse.md +40 -0
  124. package/docs/SandboxAiUsage.md +42 -0
  125. package/docs/SandboxAiUsageResponse.md +50 -0
  126. package/docs/SandboxEnvironment.md +4 -0
  127. package/docs/SetCredentialKeyRequest.md +34 -0
  128. package/docs/SetCustomApiRequest.md +34 -0
  129. package/docs/SetSandboxAiAccessRequest.md +32 -0
  130. package/docs/UpdateAiProxyRequest.md +32 -0
  131. package/docs/UpdateCredentialProfileRequest.md +34 -0
  132. package/docs/UpdateSandboxEnvironmentRequest.md +4 -0
  133. package/package.json +1 -1
  134. package/src/apis/BoatApi.ts +1440 -133
  135. package/src/models/AccountAiUsageResponse.ts +160 -0
  136. package/src/models/AiProxySettings.ts +146 -0
  137. package/src/models/AiProxySettingsAllOfPricing.ts +75 -0
  138. package/src/models/AiUsageRow.ts +138 -0
  139. package/src/models/AiUsageTotals.ts +111 -0
  140. package/src/models/CreateCredentialProfileRequest.ts +82 -0
  141. package/src/models/CredentialAccount.ts +92 -0
  142. package/src/models/CredentialAccountsResponse.ts +128 -0
  143. package/src/models/CredentialId.ts +64 -0
  144. package/src/models/CredentialProfile.ts +168 -0
  145. package/src/models/CredentialProfileDeletedResponse.ts +84 -0
  146. package/src/models/CredentialProfileListResponse.ts +92 -0
  147. package/src/models/CredentialProfileOwner.ts +104 -0
  148. package/src/models/CredentialProfileResponse.ts +101 -0
  149. package/src/models/ProcessListResponse.ts +1 -1
  150. package/src/models/SandboxAiAccessResponse.ts +102 -0
  151. package/src/models/SandboxAiUsage.ts +126 -0
  152. package/src/models/SandboxAiUsageResponse.ts +162 -0
  153. package/src/models/SandboxEnvironment.ts +17 -1
  154. package/src/models/SetCredentialKeyRequest.ts +74 -0
  155. package/src/models/SetCustomApiRequest.ts +75 -0
  156. package/src/models/SetSandboxAiAccessRequest.ts +66 -0
  157. package/src/models/UpdateAiProxyRequest.ts +66 -0
  158. package/src/models/UpdateCredentialProfileRequest.ts +73 -0
  159. package/src/models/UpdateSandboxEnvironmentRequest.ts +16 -0
  160. package/src/models/index.ts +22 -0
@@ -12,9 +12,11 @@
12
12
  * Do not edit the class manually.
13
13
  */
14
14
  import * as runtime from '../runtime';
15
+ import { AccountAiUsageResponseFromJSON, } from '../models/AccountAiUsageResponse';
15
16
  import { ActiveOrgResponseFromJSON, } from '../models/ActiveOrgResponse';
16
17
  import { ActiveOrgUpdateRequestToJSON, } from '../models/ActiveOrgUpdateRequest';
17
18
  import { AddEnvironmentRepoRequestToJSON, } from '../models/AddEnvironmentRepoRequest';
19
+ import { AiProxySettingsFromJSON, } from '../models/AiProxySettings';
18
20
  import { ApiKeyRevokeResponseFromJSON, } from '../models/ApiKeyRevokeResponse';
19
21
  import { ApiKeySecretResponseFromJSON, } from '../models/ApiKeySecretResponse';
20
22
  import { ApiKeyUsageResponseFromJSON, } from '../models/ApiKeyUsageResponse';
@@ -28,10 +30,15 @@ import { CommandRequestToJSON, } from '../models/CommandRequest';
28
30
  import { CommandStatusResponseFromJSON, } from '../models/CommandStatusResponse';
29
31
  import { CommandStopResponseFromJSON, } from '../models/CommandStopResponse';
30
32
  import { ConversationsResponseFromJSON, } from '../models/ConversationsResponse';
33
+ import { CreateCredentialProfileRequestToJSON, } from '../models/CreateCredentialProfileRequest';
31
34
  import { CreateSandboxEnvironmentRequestToJSON, } from '../models/CreateSandboxEnvironmentRequest';
32
35
  import { CreateSandboxRequestToJSON, } from '../models/CreateSandboxRequest';
33
36
  import { CreateSandboxResponseFromJSON, } from '../models/CreateSandboxResponse';
34
37
  import { CreateScopedApiKeyRequestToJSON, } from '../models/CreateScopedApiKeyRequest';
38
+ import { CredentialAccountsResponseFromJSON, } from '../models/CredentialAccountsResponse';
39
+ import { CredentialProfileDeletedResponseFromJSON, } from '../models/CredentialProfileDeletedResponse';
40
+ import { CredentialProfileListResponseFromJSON, } from '../models/CredentialProfileListResponse';
41
+ import { CredentialProfileResponseFromJSON, } from '../models/CredentialProfileResponse';
35
42
  import { DataRetentionPolicyResponseFromJSON, } from '../models/DataRetentionPolicyResponse';
36
43
  import { DataRetentionUpdateRequestToJSON, } from '../models/DataRetentionUpdateRequest';
37
44
  import { DeletionOperationListResponseFromJSON, } from '../models/DeletionOperationListResponse';
@@ -69,6 +76,8 @@ import { RepoSelectionResponseFromJSON, } from '../models/RepoSelectionResponse'
69
76
  import { ReposResponseFromJSON, } from '../models/ReposResponse';
70
77
  import { ResumeRequestToJSON, } from '../models/ResumeRequest';
71
78
  import { SandboxActionResponseFromJSON, } from '../models/SandboxActionResponse';
79
+ import { SandboxAiAccessResponseFromJSON, } from '../models/SandboxAiAccessResponse';
80
+ import { SandboxAiUsageResponseFromJSON, } from '../models/SandboxAiUsageResponse';
72
81
  import { SandboxEnvironmentListResponseFromJSON, } from '../models/SandboxEnvironmentListResponse';
73
82
  import { SandboxEnvironmentResponseFromJSON, } from '../models/SandboxEnvironmentResponse';
74
83
  import { SandboxInfoResponseFromJSON, } from '../models/SandboxInfoResponse';
@@ -76,8 +85,11 @@ import { SandboxListResponseFromJSON, } from '../models/SandboxListResponse';
76
85
  import { SandboxUsageResponseFromJSON, } from '../models/SandboxUsageResponse';
77
86
  import { SecretsResponseFromJSON, } from '../models/SecretsResponse';
78
87
  import { SecretsUpdateRequestToJSON, } from '../models/SecretsUpdateRequest';
88
+ import { SetCredentialKeyRequestToJSON, } from '../models/SetCredentialKeyRequest';
89
+ import { SetCustomApiRequestToJSON, } from '../models/SetCustomApiRequest';
79
90
  import { SetEnvironmentSecretFileRequestToJSON, } from '../models/SetEnvironmentSecretFileRequest';
80
91
  import { SetEnvironmentVarRequestToJSON, } from '../models/SetEnvironmentVarRequest';
92
+ import { SetSandboxAiAccessRequestToJSON, } from '../models/SetSandboxAiAccessRequest';
81
93
  import { Share200ResponseFromJSON, } from '../models/Share200Response';
82
94
  import { SnapshotDownloadResponseFromJSON, } from '../models/SnapshotDownloadResponse';
83
95
  import { SnapshotLatestResponseFromJSON, } from '../models/SnapshotLatestResponse';
@@ -92,6 +104,8 @@ import { StopRequestToJSON, } from '../models/StopRequest';
92
104
  import { TelemetryResponseFromJSON, } from '../models/TelemetryResponse';
93
105
  import { TelemetrySetRequestToJSON, } from '../models/TelemetrySetRequest';
94
106
  import { TelemetrySetResponseFromJSON, } from '../models/TelemetrySetResponse';
107
+ import { UpdateAiProxyRequestToJSON, } from '../models/UpdateAiProxyRequest';
108
+ import { UpdateCredentialProfileRequestToJSON, } from '../models/UpdateCredentialProfileRequest';
95
109
  import { UpdateSandboxEnvironmentRequestToJSON, } from '../models/UpdateSandboxEnvironmentRequest';
96
110
  import { UpdateSandboxRequestToJSON, } from '../models/UpdateSandboxRequest';
97
111
  import { UpgradeSandboxEnvironmentRequestToJSON, } from '../models/UpgradeSandboxEnvironmentRequest';
@@ -106,11 +120,63 @@ import { WebhookUpdateRequestToJSON, } from '../models/WebhookUpdateRequest';
106
120
  *
107
121
  */
108
122
  export class BoatApi extends runtime.BaseAPI {
123
+ /**
124
+ * Creates request options for addCredentialAccount without sending the request
125
+ */
126
+ async addCredentialAccountRequestOpts(input) {
127
+ const requestParameters = runtime.unflattenBody(input, 'setCredentialKeyRequest', ['profile', 'credential'], []);
128
+ if (requestParameters['profile'] == null) {
129
+ throw new runtime.RequiredError('profile', 'Required parameter "profile" was null or undefined when calling addCredentialAccount().');
130
+ }
131
+ if (requestParameters['credential'] == null) {
132
+ throw new runtime.RequiredError('credential', 'Required parameter "credential" was null or undefined when calling addCredentialAccount().');
133
+ }
134
+ if (requestParameters['setCredentialKeyRequest'] == null) {
135
+ throw new runtime.RequiredError('setCredentialKeyRequest', 'Required parameter "setCredentialKeyRequest" was null or undefined when calling addCredentialAccount().');
136
+ }
137
+ const queryParameters = {};
138
+ const headerParameters = {};
139
+ headerParameters['Content-Type'] = 'application/json';
140
+ if (this.configuration && this.configuration.accessToken) {
141
+ const token = this.configuration.accessToken;
142
+ const tokenString = await token("BoatBearerAuth", []);
143
+ if (tokenString) {
144
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
145
+ }
146
+ }
147
+ let urlPath = `/credential-profiles/{profile}/accounts/{credential}`;
148
+ urlPath = urlPath.replace('{profile}', encodeURIComponent(String(requestParameters['profile'])));
149
+ urlPath = urlPath.replace('{credential}', encodeURIComponent(String(requestParameters['credential'])));
150
+ return {
151
+ path: urlPath,
152
+ method: 'POST',
153
+ headers: headerParameters,
154
+ query: queryParameters,
155
+ body: SetCredentialKeyRequestToJSON(requestParameters['setCredentialKeyRequest']),
156
+ };
157
+ }
158
+ /**
159
+ * 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`.
160
+ * Add another API key to a credential
161
+ */
162
+ async addCredentialAccountRaw(requestParameters, initOverrides) {
163
+ const requestOptions = await this.addCredentialAccountRequestOpts(requestParameters);
164
+ const response = await this.request(requestOptions, initOverrides);
165
+ return new runtime.JSONApiResponse(response, (jsonValue) => CredentialAccountsResponseFromJSON(jsonValue));
166
+ }
167
+ /**
168
+ * 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`.
169
+ * Add another API key to a credential
170
+ */
171
+ async addCredentialAccount(requestParameters, initOverrides) {
172
+ const response = await this.addCredentialAccountRaw(requestParameters, initOverrides);
173
+ return await response.value();
174
+ }
109
175
  /**
110
176
  * Creates request options for addEnvironmentRepo without sending the request
111
177
  */
112
178
  async addEnvironmentRepoRequestOpts(input) {
113
- const requestParameters = runtime.unflattenBody(input, 'addEnvironmentRepoRequest', ['environmentId'], []);
179
+ const requestParameters = runtime.unflattenBody(input, 'addEnvironmentRepoRequest', ['environmentId', 'org'], []);
114
180
  if (requestParameters['environmentId'] == null) {
115
181
  throw new runtime.RequiredError('environmentId', 'Required parameter "environmentId" was null or undefined when calling addEnvironmentRepo().');
116
182
  }
@@ -118,6 +184,9 @@ export class BoatApi extends runtime.BaseAPI {
118
184
  throw new runtime.RequiredError('addEnvironmentRepoRequest', 'Required parameter "addEnvironmentRepoRequest" was null or undefined when calling addEnvironmentRepo().');
119
185
  }
120
186
  const queryParameters = {};
187
+ if (requestParameters['org'] != null) {
188
+ queryParameters['org'] = requestParameters['org'];
189
+ }
121
190
  const headerParameters = {};
122
191
  headerParameters['Content-Type'] = 'application/json';
123
192
  if (this.configuration && this.configuration.accessToken) {
@@ -641,6 +710,50 @@ export class BoatApi extends runtime.BaseAPI {
641
710
  const response = await this.createRaw(requestParameters, initOverrides);
642
711
  return await response.value();
643
712
  }
713
+ /**
714
+ * Creates request options for createCredentialProfile without sending the request
715
+ */
716
+ async createCredentialProfileRequestOpts(input) {
717
+ const requestParameters = runtime.unflattenBody(input, 'createCredentialProfileRequest', [], []);
718
+ if (requestParameters['createCredentialProfileRequest'] == null) {
719
+ throw new runtime.RequiredError('createCredentialProfileRequest', 'Required parameter "createCredentialProfileRequest" was null or undefined when calling createCredentialProfile().');
720
+ }
721
+ const queryParameters = {};
722
+ const headerParameters = {};
723
+ headerParameters['Content-Type'] = 'application/json';
724
+ if (this.configuration && this.configuration.accessToken) {
725
+ const token = this.configuration.accessToken;
726
+ const tokenString = await token("BoatBearerAuth", []);
727
+ if (tokenString) {
728
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
729
+ }
730
+ }
731
+ let urlPath = `/credential-profiles`;
732
+ return {
733
+ path: urlPath,
734
+ method: 'POST',
735
+ headers: headerParameters,
736
+ query: queryParameters,
737
+ body: CreateCredentialProfileRequestToJSON(requestParameters['createCredentialProfileRequest']),
738
+ };
739
+ }
740
+ /**
741
+ * 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`.
742
+ * Create a credential profile
743
+ */
744
+ async createCredentialProfileRaw(requestParameters, initOverrides) {
745
+ const requestOptions = await this.createCredentialProfileRequestOpts(requestParameters);
746
+ const response = await this.request(requestOptions, initOverrides);
747
+ return new runtime.JSONApiResponse(response, (jsonValue) => CredentialProfileResponseFromJSON(jsonValue));
748
+ }
749
+ /**
750
+ * 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`.
751
+ * Create a credential profile
752
+ */
753
+ async createCredentialProfile(requestParameters, initOverrides) {
754
+ const response = await this.createCredentialProfileRaw(requestParameters, initOverrides);
755
+ return await response.value();
756
+ }
644
757
  /**
645
758
  * Creates request options for createDownloadUrl without sending the request
646
759
  */
@@ -693,11 +806,14 @@ export class BoatApi extends runtime.BaseAPI {
693
806
  * Creates request options for createEnvironment without sending the request
694
807
  */
695
808
  async createEnvironmentRequestOpts(input) {
696
- const requestParameters = runtime.unflattenBody(input, 'createSandboxEnvironmentRequest', [], []);
809
+ const requestParameters = runtime.unflattenBody(input, 'createSandboxEnvironmentRequest', ['org'], []);
697
810
  if (requestParameters['createSandboxEnvironmentRequest'] == null) {
698
811
  throw new runtime.RequiredError('createSandboxEnvironmentRequest', 'Required parameter "createSandboxEnvironmentRequest" was null or undefined when calling createEnvironment().');
699
812
  }
700
813
  const queryParameters = {};
814
+ if (requestParameters['org'] != null) {
815
+ queryParameters['org'] = requestParameters['org'];
816
+ }
701
817
  const headerParameters = {};
702
818
  headerParameters['Content-Type'] = 'application/json';
703
819
  if (this.configuration && this.configuration.accessToken) {
@@ -911,6 +1027,190 @@ export class BoatApi extends runtime.BaseAPI {
911
1027
  const response = await this.createWebhookRaw(requestParameters, initOverrides);
912
1028
  return await response.value();
913
1029
  }
1030
+ /**
1031
+ * Creates request options for deleteCredentialAccount without sending the request
1032
+ */
1033
+ async deleteCredentialAccountRequestOpts(requestParameters) {
1034
+ if (requestParameters['profile'] == null) {
1035
+ throw new runtime.RequiredError('profile', 'Required parameter "profile" was null or undefined when calling deleteCredentialAccount().');
1036
+ }
1037
+ if (requestParameters['credential'] == null) {
1038
+ throw new runtime.RequiredError('credential', 'Required parameter "credential" was null or undefined when calling deleteCredentialAccount().');
1039
+ }
1040
+ if (requestParameters['account'] == null) {
1041
+ throw new runtime.RequiredError('account', 'Required parameter "account" was null or undefined when calling deleteCredentialAccount().');
1042
+ }
1043
+ const queryParameters = {};
1044
+ const headerParameters = {};
1045
+ if (this.configuration && this.configuration.accessToken) {
1046
+ const token = this.configuration.accessToken;
1047
+ const tokenString = await token("BoatBearerAuth", []);
1048
+ if (tokenString) {
1049
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1050
+ }
1051
+ }
1052
+ let urlPath = `/credential-profiles/{profile}/accounts/{credential}/{account}`;
1053
+ urlPath = urlPath.replace('{profile}', encodeURIComponent(String(requestParameters['profile'])));
1054
+ urlPath = urlPath.replace('{credential}', encodeURIComponent(String(requestParameters['credential'])));
1055
+ urlPath = urlPath.replace('{account}', encodeURIComponent(String(requestParameters['account'])));
1056
+ return {
1057
+ path: urlPath,
1058
+ method: 'DELETE',
1059
+ headers: headerParameters,
1060
+ query: queryParameters,
1061
+ };
1062
+ }
1063
+ /**
1064
+ * 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`.
1065
+ * Forget an account of a credential
1066
+ */
1067
+ async deleteCredentialAccountRaw(requestParameters, initOverrides) {
1068
+ const requestOptions = await this.deleteCredentialAccountRequestOpts(requestParameters);
1069
+ const response = await this.request(requestOptions, initOverrides);
1070
+ return new runtime.JSONApiResponse(response, (jsonValue) => CredentialAccountsResponseFromJSON(jsonValue));
1071
+ }
1072
+ /**
1073
+ * 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`.
1074
+ * Forget an account of a credential
1075
+ */
1076
+ async deleteCredentialAccount(requestParameters, initOverrides) {
1077
+ const response = await this.deleteCredentialAccountRaw(requestParameters, initOverrides);
1078
+ return await response.value();
1079
+ }
1080
+ /**
1081
+ * Creates request options for deleteCredentialProfile without sending the request
1082
+ */
1083
+ async deleteCredentialProfileRequestOpts(requestParameters) {
1084
+ if (requestParameters['profile'] == null) {
1085
+ throw new runtime.RequiredError('profile', 'Required parameter "profile" was null or undefined when calling deleteCredentialProfile().');
1086
+ }
1087
+ const queryParameters = {};
1088
+ const headerParameters = {};
1089
+ if (this.configuration && this.configuration.accessToken) {
1090
+ const token = this.configuration.accessToken;
1091
+ const tokenString = await token("BoatBearerAuth", []);
1092
+ if (tokenString) {
1093
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1094
+ }
1095
+ }
1096
+ let urlPath = `/credential-profiles/{profile}`;
1097
+ urlPath = urlPath.replace('{profile}', encodeURIComponent(String(requestParameters['profile'])));
1098
+ return {
1099
+ path: urlPath,
1100
+ method: 'DELETE',
1101
+ headers: headerParameters,
1102
+ query: queryParameters,
1103
+ };
1104
+ }
1105
+ /**
1106
+ * 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`.
1107
+ * Delete a credential profile
1108
+ */
1109
+ async deleteCredentialProfileRaw(requestParameters, initOverrides) {
1110
+ const requestOptions = await this.deleteCredentialProfileRequestOpts(requestParameters);
1111
+ const response = await this.request(requestOptions, initOverrides);
1112
+ return new runtime.JSONApiResponse(response, (jsonValue) => CredentialProfileDeletedResponseFromJSON(jsonValue));
1113
+ }
1114
+ /**
1115
+ * 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`.
1116
+ * Delete a credential profile
1117
+ */
1118
+ async deleteCredentialProfile(requestParameters, initOverrides) {
1119
+ const response = await this.deleteCredentialProfileRaw(requestParameters, initOverrides);
1120
+ return await response.value();
1121
+ }
1122
+ /**
1123
+ * Creates request options for deleteCredentialProfileCustomApi without sending the request
1124
+ */
1125
+ async deleteCredentialProfileCustomApiRequestOpts(requestParameters) {
1126
+ if (requestParameters['profile'] == null) {
1127
+ throw new runtime.RequiredError('profile', 'Required parameter "profile" was null or undefined when calling deleteCredentialProfileCustomApi().');
1128
+ }
1129
+ if (requestParameters['name'] == null) {
1130
+ throw new runtime.RequiredError('name', 'Required parameter "name" was null or undefined when calling deleteCredentialProfileCustomApi().');
1131
+ }
1132
+ const queryParameters = {};
1133
+ const headerParameters = {};
1134
+ if (this.configuration && this.configuration.accessToken) {
1135
+ const token = this.configuration.accessToken;
1136
+ const tokenString = await token("BoatBearerAuth", []);
1137
+ if (tokenString) {
1138
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1139
+ }
1140
+ }
1141
+ let urlPath = `/credential-profiles/{profile}/custom-apis/{name}`;
1142
+ urlPath = urlPath.replace('{profile}', encodeURIComponent(String(requestParameters['profile'])));
1143
+ urlPath = urlPath.replace('{name}', encodeURIComponent(String(requestParameters['name'])));
1144
+ return {
1145
+ path: urlPath,
1146
+ method: 'DELETE',
1147
+ headers: headerParameters,
1148
+ query: queryParameters,
1149
+ };
1150
+ }
1151
+ /**
1152
+ * Removes one custom API from the profile. Needs an API key with `account.admin`.
1153
+ * Remove a custom API
1154
+ */
1155
+ async deleteCredentialProfileCustomApiRaw(requestParameters, initOverrides) {
1156
+ const requestOptions = await this.deleteCredentialProfileCustomApiRequestOpts(requestParameters);
1157
+ const response = await this.request(requestOptions, initOverrides);
1158
+ return new runtime.JSONApiResponse(response, (jsonValue) => CredentialProfileResponseFromJSON(jsonValue));
1159
+ }
1160
+ /**
1161
+ * Removes one custom API from the profile. Needs an API key with `account.admin`.
1162
+ * Remove a custom API
1163
+ */
1164
+ async deleteCredentialProfileCustomApi(requestParameters, initOverrides) {
1165
+ const response = await this.deleteCredentialProfileCustomApiRaw(requestParameters, initOverrides);
1166
+ return await response.value();
1167
+ }
1168
+ /**
1169
+ * Creates request options for deleteCredentialProfileKey without sending the request
1170
+ */
1171
+ async deleteCredentialProfileKeyRequestOpts(requestParameters) {
1172
+ if (requestParameters['profile'] == null) {
1173
+ throw new runtime.RequiredError('profile', 'Required parameter "profile" was null or undefined when calling deleteCredentialProfileKey().');
1174
+ }
1175
+ if (requestParameters['credential'] == null) {
1176
+ throw new runtime.RequiredError('credential', 'Required parameter "credential" was null or undefined when calling deleteCredentialProfileKey().');
1177
+ }
1178
+ const queryParameters = {};
1179
+ const headerParameters = {};
1180
+ if (this.configuration && this.configuration.accessToken) {
1181
+ const token = this.configuration.accessToken;
1182
+ const tokenString = await token("BoatBearerAuth", []);
1183
+ if (tokenString) {
1184
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1185
+ }
1186
+ }
1187
+ let urlPath = `/credential-profiles/{profile}/keys/{credential}`;
1188
+ urlPath = urlPath.replace('{profile}', encodeURIComponent(String(requestParameters['profile'])));
1189
+ urlPath = urlPath.replace('{credential}', encodeURIComponent(String(requestParameters['credential'])));
1190
+ return {
1191
+ path: urlPath,
1192
+ method: 'DELETE',
1193
+ headers: headerParameters,
1194
+ query: queryParameters,
1195
+ };
1196
+ }
1197
+ /**
1198
+ * Removes one credential, an API key or a sign-in. Needs an API key with `account.admin`.
1199
+ * Remove a credential profile credential
1200
+ */
1201
+ async deleteCredentialProfileKeyRaw(requestParameters, initOverrides) {
1202
+ const requestOptions = await this.deleteCredentialProfileKeyRequestOpts(requestParameters);
1203
+ const response = await this.request(requestOptions, initOverrides);
1204
+ return new runtime.JSONApiResponse(response, (jsonValue) => CredentialProfileResponseFromJSON(jsonValue));
1205
+ }
1206
+ /**
1207
+ * Removes one credential, an API key or a sign-in. Needs an API key with `account.admin`.
1208
+ * Remove a credential profile credential
1209
+ */
1210
+ async deleteCredentialProfileKey(requestParameters, initOverrides) {
1211
+ const response = await this.deleteCredentialProfileKeyRaw(requestParameters, initOverrides);
1212
+ return await response.value();
1213
+ }
914
1214
  /**
915
1215
  * Creates request options for deleteEnvironment without sending the request
916
1216
  */
@@ -919,6 +1219,9 @@ export class BoatApi extends runtime.BaseAPI {
919
1219
  throw new runtime.RequiredError('environmentId', 'Required parameter "environmentId" was null or undefined when calling deleteEnvironment().');
920
1220
  }
921
1221
  const queryParameters = {};
1222
+ if (requestParameters['org'] != null) {
1223
+ queryParameters['org'] = requestParameters['org'];
1224
+ }
922
1225
  const headerParameters = {};
923
1226
  if (this.configuration && this.configuration.accessToken) {
924
1227
  const token = this.configuration.accessToken;
@@ -964,6 +1267,9 @@ export class BoatApi extends runtime.BaseAPI {
964
1267
  throw new runtime.RequiredError('repositoryId', 'Required parameter "repositoryId" was null or undefined when calling deleteEnvironmentRepo().');
965
1268
  }
966
1269
  const queryParameters = {};
1270
+ if (requestParameters['org'] != null) {
1271
+ queryParameters['org'] = requestParameters['org'];
1272
+ }
967
1273
  const headerParameters = {};
968
1274
  if (this.configuration && this.configuration.accessToken) {
969
1275
  const token = this.configuration.accessToken;
@@ -1013,6 +1319,9 @@ export class BoatApi extends runtime.BaseAPI {
1013
1319
  if (requestParameters['path'] != null) {
1014
1320
  queryParameters['path'] = requestParameters['path'];
1015
1321
  }
1322
+ if (requestParameters['org'] != null) {
1323
+ queryParameters['org'] = requestParameters['org'];
1324
+ }
1016
1325
  const headerParameters = {};
1017
1326
  if (this.configuration && this.configuration.accessToken) {
1018
1327
  const token = this.configuration.accessToken;
@@ -1058,6 +1367,9 @@ export class BoatApi extends runtime.BaseAPI {
1058
1367
  throw new runtime.RequiredError('key', 'Required parameter "key" was null or undefined when calling deleteEnvironmentVar().');
1059
1368
  }
1060
1369
  const queryParameters = {};
1370
+ if (requestParameters['org'] != null) {
1371
+ queryParameters['org'] = requestParameters['org'];
1372
+ }
1061
1373
  const headerParameters = {};
1062
1374
  if (this.configuration && this.configuration.accessToken) {
1063
1375
  const token = this.configuration.accessToken;
@@ -1413,8 +1725,11 @@ export class BoatApi extends runtime.BaseAPI {
1413
1725
  /**
1414
1726
  * Creates request options for environments without sending the request
1415
1727
  */
1416
- async environmentsRequestOpts() {
1728
+ async environmentsRequestOpts(requestParameters) {
1417
1729
  const queryParameters = {};
1730
+ if (requestParameters['org'] != null) {
1731
+ queryParameters['org'] = requestParameters['org'];
1732
+ }
1418
1733
  const headerParameters = {};
1419
1734
  if (this.configuration && this.configuration.accessToken) {
1420
1735
  const token = this.configuration.accessToken;
@@ -1435,8 +1750,8 @@ export class BoatApi extends runtime.BaseAPI {
1435
1750
  * 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.
1436
1751
  * List Sandbox environments
1437
1752
  */
1438
- async environmentsRaw(initOverrides) {
1439
- const requestOptions = await this.environmentsRequestOpts();
1753
+ async environmentsRaw(requestParameters, initOverrides) {
1754
+ const requestOptions = await this.environmentsRequestOpts(requestParameters);
1440
1755
  const response = await this.request(requestOptions, initOverrides);
1441
1756
  return new runtime.JSONApiResponse(response, (jsonValue) => SandboxEnvironmentListResponseFromJSON(jsonValue));
1442
1757
  }
@@ -1444,8 +1759,8 @@ export class BoatApi extends runtime.BaseAPI {
1444
1759
  * 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.
1445
1760
  * List Sandbox environments
1446
1761
  */
1447
- async environments(initOverrides) {
1448
- const response = await this.environmentsRaw(initOverrides);
1762
+ async environments(requestParameters = {}, initOverrides) {
1763
+ const response = await this.environmentsRaw(requestParameters, initOverrides);
1449
1764
  return await response.value();
1450
1765
  }
1451
1766
  /**
@@ -1595,6 +1910,100 @@ export class BoatApi extends runtime.BaseAPI {
1595
1910
  const response = await this.getRaw(requestParameters, initOverrides);
1596
1911
  return await response.value();
1597
1912
  }
1913
+ /**
1914
+ * Creates request options for getAiProxy without sending the request
1915
+ */
1916
+ async getAiProxyRequestOpts(requestParameters) {
1917
+ const queryParameters = {};
1918
+ if (requestParameters['org'] != null) {
1919
+ queryParameters['org'] = requestParameters['org'];
1920
+ }
1921
+ const headerParameters = {};
1922
+ if (requestParameters['xBoatOrg'] != null) {
1923
+ headerParameters['X-Boat-Org'] = String(requestParameters['xBoatOrg']);
1924
+ }
1925
+ if (this.configuration && this.configuration.accessToken) {
1926
+ const token = this.configuration.accessToken;
1927
+ const tokenString = await token("BoatBearerAuth", []);
1928
+ if (tokenString) {
1929
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1930
+ }
1931
+ }
1932
+ let urlPath = `/ai-proxy`;
1933
+ return {
1934
+ path: urlPath,
1935
+ method: 'GET',
1936
+ headers: headerParameters,
1937
+ query: queryParameters,
1938
+ };
1939
+ }
1940
+ /**
1941
+ * 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`.
1942
+ * Get AI credentials proxy
1943
+ */
1944
+ async getAiProxyRaw(requestParameters, initOverrides) {
1945
+ const requestOptions = await this.getAiProxyRequestOpts(requestParameters);
1946
+ const response = await this.request(requestOptions, initOverrides);
1947
+ return new runtime.JSONApiResponse(response, (jsonValue) => AiProxySettingsFromJSON(jsonValue));
1948
+ }
1949
+ /**
1950
+ * 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`.
1951
+ * Get AI credentials proxy
1952
+ */
1953
+ async getAiProxy(requestParameters = {}, initOverrides) {
1954
+ const response = await this.getAiProxyRaw(requestParameters, initOverrides);
1955
+ return await response.value();
1956
+ }
1957
+ /**
1958
+ * Creates request options for getAiUsage without sending the request
1959
+ */
1960
+ async getAiUsageRequestOpts(requestParameters) {
1961
+ const queryParameters = {};
1962
+ if (requestParameters['days'] != null) {
1963
+ queryParameters['days'] = requestParameters['days'];
1964
+ }
1965
+ if (requestParameters['profile'] != null) {
1966
+ queryParameters['profile'] = requestParameters['profile'];
1967
+ }
1968
+ if (requestParameters['org'] != null) {
1969
+ queryParameters['org'] = requestParameters['org'];
1970
+ }
1971
+ const headerParameters = {};
1972
+ if (requestParameters['xBoatOrg'] != null) {
1973
+ headerParameters['X-Boat-Org'] = String(requestParameters['xBoatOrg']);
1974
+ }
1975
+ if (this.configuration && this.configuration.accessToken) {
1976
+ const token = this.configuration.accessToken;
1977
+ const tokenString = await token("BoatBearerAuth", []);
1978
+ if (tokenString) {
1979
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1980
+ }
1981
+ }
1982
+ let urlPath = `/ai-usage`;
1983
+ return {
1984
+ path: urlPath,
1985
+ method: 'GET',
1986
+ headers: headerParameters,
1987
+ query: queryParameters,
1988
+ };
1989
+ }
1990
+ /**
1991
+ * 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`.
1992
+ * Get AI usage
1993
+ */
1994
+ async getAiUsageRaw(requestParameters, initOverrides) {
1995
+ const requestOptions = await this.getAiUsageRequestOpts(requestParameters);
1996
+ const response = await this.request(requestOptions, initOverrides);
1997
+ return new runtime.JSONApiResponse(response, (jsonValue) => AccountAiUsageResponseFromJSON(jsonValue));
1998
+ }
1999
+ /**
2000
+ * 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`.
2001
+ * Get AI usage
2002
+ */
2003
+ async getAiUsage(requestParameters = {}, initOverrides) {
2004
+ const response = await this.getAiUsageRaw(requestParameters, initOverrides);
2005
+ return await response.value();
2006
+ }
1598
2007
  /**
1599
2008
  * Creates request options for getCommand without sending the request
1600
2009
  */
@@ -1792,13 +2201,58 @@ export class BoatApi extends runtime.BaseAPI {
1792
2201
  async getNamedSnapshotRaw(requestParameters, initOverrides) {
1793
2202
  const requestOptions = await this.getNamedSnapshotRequestOpts(requestParameters);
1794
2203
  const response = await this.request(requestOptions, initOverrides);
1795
- return new runtime.JSONApiResponse(response, (jsonValue) => NamedSnapshotInfoResponseFromJSON(jsonValue));
2204
+ return new runtime.JSONApiResponse(response, (jsonValue) => NamedSnapshotInfoResponseFromJSON(jsonValue));
2205
+ }
2206
+ /**
2207
+ * Get a named snapshot
2208
+ */
2209
+ async getNamedSnapshot(requestParameters, initOverrides) {
2210
+ const response = await this.getNamedSnapshotRaw(requestParameters, initOverrides);
2211
+ return await response.value();
2212
+ }
2213
+ /**
2214
+ * Creates request options for getSandboxAiUsage without sending the request
2215
+ */
2216
+ async getSandboxAiUsageRequestOpts(requestParameters) {
2217
+ if (requestParameters['sandboxId'] == null) {
2218
+ throw new runtime.RequiredError('sandboxId', 'Required parameter "sandboxId" was null or undefined when calling getSandboxAiUsage().');
2219
+ }
2220
+ const queryParameters = {};
2221
+ if (requestParameters['days'] != null) {
2222
+ queryParameters['days'] = requestParameters['days'];
2223
+ }
2224
+ const headerParameters = {};
2225
+ if (this.configuration && this.configuration.accessToken) {
2226
+ const token = this.configuration.accessToken;
2227
+ const tokenString = await token("BoatBearerAuth", []);
2228
+ if (tokenString) {
2229
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
2230
+ }
2231
+ }
2232
+ let urlPath = `/sandboxes/{sandboxId}/ai-usage`;
2233
+ urlPath = urlPath.replace('{sandboxId}', encodeURIComponent(String(requestParameters['sandboxId'])));
2234
+ return {
2235
+ path: urlPath,
2236
+ method: 'GET',
2237
+ headers: headerParameters,
2238
+ query: queryParameters,
2239
+ };
2240
+ }
2241
+ /**
2242
+ * 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.
2243
+ * Get sandbox AI usage
2244
+ */
2245
+ async getSandboxAiUsageRaw(requestParameters, initOverrides) {
2246
+ const requestOptions = await this.getSandboxAiUsageRequestOpts(requestParameters);
2247
+ const response = await this.request(requestOptions, initOverrides);
2248
+ return new runtime.JSONApiResponse(response, (jsonValue) => SandboxAiUsageResponseFromJSON(jsonValue));
1796
2249
  }
1797
2250
  /**
1798
- * Get a named snapshot
2251
+ * 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.
2252
+ * Get sandbox AI usage
1799
2253
  */
1800
- async getNamedSnapshot(requestParameters, initOverrides) {
1801
- const response = await this.getNamedSnapshotRaw(requestParameters, initOverrides);
2254
+ async getSandboxAiUsage(requestParameters, initOverrides) {
2255
+ const response = await this.getSandboxAiUsageRaw(requestParameters, initOverrides);
1802
2256
  return await response.value();
1803
2257
  }
1804
2258
  /**
@@ -2196,6 +2650,90 @@ export class BoatApi extends runtime.BaseAPI {
2196
2650
  const response = await this.limitsRaw(requestParameters, initOverrides);
2197
2651
  return await response.value();
2198
2652
  }
2653
+ /**
2654
+ * Creates request options for listCredentialAccounts without sending the request
2655
+ */
2656
+ async listCredentialAccountsRequestOpts(requestParameters) {
2657
+ if (requestParameters['profile'] == null) {
2658
+ throw new runtime.RequiredError('profile', 'Required parameter "profile" was null or undefined when calling listCredentialAccounts().');
2659
+ }
2660
+ if (requestParameters['credential'] == null) {
2661
+ throw new runtime.RequiredError('credential', 'Required parameter "credential" was null or undefined when calling listCredentialAccounts().');
2662
+ }
2663
+ const queryParameters = {};
2664
+ const headerParameters = {};
2665
+ if (this.configuration && this.configuration.accessToken) {
2666
+ const token = this.configuration.accessToken;
2667
+ const tokenString = await token("BoatBearerAuth", []);
2668
+ if (tokenString) {
2669
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
2670
+ }
2671
+ }
2672
+ let urlPath = `/credential-profiles/{profile}/accounts/{credential}`;
2673
+ urlPath = urlPath.replace('{profile}', encodeURIComponent(String(requestParameters['profile'])));
2674
+ urlPath = urlPath.replace('{credential}', encodeURIComponent(String(requestParameters['credential'])));
2675
+ return {
2676
+ path: urlPath,
2677
+ method: 'GET',
2678
+ headers: headerParameters,
2679
+ query: queryParameters,
2680
+ };
2681
+ }
2682
+ /**
2683
+ * 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`.
2684
+ * List the accounts of a credential
2685
+ */
2686
+ async listCredentialAccountsRaw(requestParameters, initOverrides) {
2687
+ const requestOptions = await this.listCredentialAccountsRequestOpts(requestParameters);
2688
+ const response = await this.request(requestOptions, initOverrides);
2689
+ return new runtime.JSONApiResponse(response, (jsonValue) => CredentialAccountsResponseFromJSON(jsonValue));
2690
+ }
2691
+ /**
2692
+ * 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`.
2693
+ * List the accounts of a credential
2694
+ */
2695
+ async listCredentialAccounts(requestParameters, initOverrides) {
2696
+ const response = await this.listCredentialAccountsRaw(requestParameters, initOverrides);
2697
+ return await response.value();
2698
+ }
2699
+ /**
2700
+ * Creates request options for listCredentialProfiles without sending the request
2701
+ */
2702
+ async listCredentialProfilesRequestOpts() {
2703
+ const queryParameters = {};
2704
+ const headerParameters = {};
2705
+ if (this.configuration && this.configuration.accessToken) {
2706
+ const token = this.configuration.accessToken;
2707
+ const tokenString = await token("BoatBearerAuth", []);
2708
+ if (tokenString) {
2709
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
2710
+ }
2711
+ }
2712
+ let urlPath = `/credential-profiles`;
2713
+ return {
2714
+ path: urlPath,
2715
+ method: 'GET',
2716
+ headers: headerParameters,
2717
+ query: queryParameters,
2718
+ };
2719
+ }
2720
+ /**
2721
+ * Returns every AI credential profile you can use, yours and your organizations\'. Secret values are never returned. Needs an API key with `account.admin`.
2722
+ * List credential profiles
2723
+ */
2724
+ async listCredentialProfilesRaw(initOverrides) {
2725
+ const requestOptions = await this.listCredentialProfilesRequestOpts();
2726
+ const response = await this.request(requestOptions, initOverrides);
2727
+ return new runtime.JSONApiResponse(response, (jsonValue) => CredentialProfileListResponseFromJSON(jsonValue));
2728
+ }
2729
+ /**
2730
+ * Returns every AI credential profile you can use, yours and your organizations\'. Secret values are never returned. Needs an API key with `account.admin`.
2731
+ * List credential profiles
2732
+ */
2733
+ async listCredentialProfiles(initOverrides) {
2734
+ const response = await this.listCredentialProfilesRaw(initOverrides);
2735
+ return await response.value();
2736
+ }
2199
2737
  /**
2200
2738
  * Creates request options for listNamedSnapshots without sending the request
2201
2739
  */
@@ -3214,11 +3752,115 @@ export class BoatApi extends runtime.BaseAPI {
3214
3752
  const response = await this.setActiveOrganizationRaw(requestParameters, initOverrides);
3215
3753
  return await response.value();
3216
3754
  }
3755
+ /**
3756
+ * Creates request options for setCredentialProfileCustomApi without sending the request
3757
+ */
3758
+ async setCredentialProfileCustomApiRequestOpts(input) {
3759
+ const requestParameters = runtime.unflattenBody(input, 'setCustomApiRequest', ['profile', 'name'], []);
3760
+ if (requestParameters['profile'] == null) {
3761
+ throw new runtime.RequiredError('profile', 'Required parameter "profile" was null or undefined when calling setCredentialProfileCustomApi().');
3762
+ }
3763
+ if (requestParameters['name'] == null) {
3764
+ throw new runtime.RequiredError('name', 'Required parameter "name" was null or undefined when calling setCredentialProfileCustomApi().');
3765
+ }
3766
+ if (requestParameters['setCustomApiRequest'] == null) {
3767
+ throw new runtime.RequiredError('setCustomApiRequest', 'Required parameter "setCustomApiRequest" was null or undefined when calling setCredentialProfileCustomApi().');
3768
+ }
3769
+ const queryParameters = {};
3770
+ const headerParameters = {};
3771
+ headerParameters['Content-Type'] = 'application/json';
3772
+ if (this.configuration && this.configuration.accessToken) {
3773
+ const token = this.configuration.accessToken;
3774
+ const tokenString = await token("BoatBearerAuth", []);
3775
+ if (tokenString) {
3776
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
3777
+ }
3778
+ }
3779
+ let urlPath = `/credential-profiles/{profile}/custom-apis/{name}`;
3780
+ urlPath = urlPath.replace('{profile}', encodeURIComponent(String(requestParameters['profile'])));
3781
+ urlPath = urlPath.replace('{name}', encodeURIComponent(String(requestParameters['name'])));
3782
+ return {
3783
+ path: urlPath,
3784
+ method: 'PUT',
3785
+ headers: headerParameters,
3786
+ query: queryParameters,
3787
+ body: SetCustomApiRequestToJSON(requestParameters['setCustomApiRequest']),
3788
+ };
3789
+ }
3790
+ /**
3791
+ * Adds or replaces one custom API. The sandbox gets `<NAME>` and `<NAME>_BASE_URL`. Needs an API key with `account.admin`.
3792
+ * Set a custom API
3793
+ */
3794
+ async setCredentialProfileCustomApiRaw(requestParameters, initOverrides) {
3795
+ const requestOptions = await this.setCredentialProfileCustomApiRequestOpts(requestParameters);
3796
+ const response = await this.request(requestOptions, initOverrides);
3797
+ return new runtime.JSONApiResponse(response, (jsonValue) => CredentialProfileResponseFromJSON(jsonValue));
3798
+ }
3799
+ /**
3800
+ * Adds or replaces one custom API. The sandbox gets `<NAME>` and `<NAME>_BASE_URL`. Needs an API key with `account.admin`.
3801
+ * Set a custom API
3802
+ */
3803
+ async setCredentialProfileCustomApi(requestParameters, initOverrides) {
3804
+ const response = await this.setCredentialProfileCustomApiRaw(requestParameters, initOverrides);
3805
+ return await response.value();
3806
+ }
3807
+ /**
3808
+ * Creates request options for setCredentialProfileKey without sending the request
3809
+ */
3810
+ async setCredentialProfileKeyRequestOpts(input) {
3811
+ const requestParameters = runtime.unflattenBody(input, 'setCredentialKeyRequest', ['profile', 'credential'], []);
3812
+ if (requestParameters['profile'] == null) {
3813
+ throw new runtime.RequiredError('profile', 'Required parameter "profile" was null or undefined when calling setCredentialProfileKey().');
3814
+ }
3815
+ if (requestParameters['credential'] == null) {
3816
+ throw new runtime.RequiredError('credential', 'Required parameter "credential" was null or undefined when calling setCredentialProfileKey().');
3817
+ }
3818
+ if (requestParameters['setCredentialKeyRequest'] == null) {
3819
+ throw new runtime.RequiredError('setCredentialKeyRequest', 'Required parameter "setCredentialKeyRequest" was null or undefined when calling setCredentialProfileKey().');
3820
+ }
3821
+ const queryParameters = {};
3822
+ const headerParameters = {};
3823
+ headerParameters['Content-Type'] = 'application/json';
3824
+ if (this.configuration && this.configuration.accessToken) {
3825
+ const token = this.configuration.accessToken;
3826
+ const tokenString = await token("BoatBearerAuth", []);
3827
+ if (tokenString) {
3828
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
3829
+ }
3830
+ }
3831
+ let urlPath = `/credential-profiles/{profile}/keys/{credential}`;
3832
+ urlPath = urlPath.replace('{profile}', encodeURIComponent(String(requestParameters['profile'])));
3833
+ urlPath = urlPath.replace('{credential}', encodeURIComponent(String(requestParameters['credential'])));
3834
+ return {
3835
+ path: urlPath,
3836
+ method: 'PUT',
3837
+ headers: headerParameters,
3838
+ query: queryParameters,
3839
+ body: SetCredentialKeyRequestToJSON(requestParameters['setCredentialKeyRequest']),
3840
+ };
3841
+ }
3842
+ /**
3843
+ * 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`.
3844
+ * Set a credential profile API key
3845
+ */
3846
+ async setCredentialProfileKeyRaw(requestParameters, initOverrides) {
3847
+ const requestOptions = await this.setCredentialProfileKeyRequestOpts(requestParameters);
3848
+ const response = await this.request(requestOptions, initOverrides);
3849
+ return new runtime.JSONApiResponse(response, (jsonValue) => CredentialProfileResponseFromJSON(jsonValue));
3850
+ }
3851
+ /**
3852
+ * 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`.
3853
+ * Set a credential profile API key
3854
+ */
3855
+ async setCredentialProfileKey(requestParameters, initOverrides) {
3856
+ const response = await this.setCredentialProfileKeyRaw(requestParameters, initOverrides);
3857
+ return await response.value();
3858
+ }
3217
3859
  /**
3218
3860
  * Creates request options for setEnvironmentSecretFile without sending the request
3219
3861
  */
3220
3862
  async setEnvironmentSecretFileRequestOpts(input) {
3221
- const requestParameters = runtime.unflattenBody(input, 'setEnvironmentSecretFileRequest', ['environmentId'], []);
3863
+ const requestParameters = runtime.unflattenBody(input, 'setEnvironmentSecretFileRequest', ['environmentId', 'org'], []);
3222
3864
  if (requestParameters['environmentId'] == null) {
3223
3865
  throw new runtime.RequiredError('environmentId', 'Required parameter "environmentId" was null or undefined when calling setEnvironmentSecretFile().');
3224
3866
  }
@@ -3226,6 +3868,9 @@ export class BoatApi extends runtime.BaseAPI {
3226
3868
  throw new runtime.RequiredError('setEnvironmentSecretFileRequest', 'Required parameter "setEnvironmentSecretFileRequest" was null or undefined when calling setEnvironmentSecretFile().');
3227
3869
  }
3228
3870
  const queryParameters = {};
3871
+ if (requestParameters['org'] != null) {
3872
+ queryParameters['org'] = requestParameters['org'];
3873
+ }
3229
3874
  const headerParameters = {};
3230
3875
  headerParameters['Content-Type'] = 'application/json';
3231
3876
  if (this.configuration && this.configuration.accessToken) {
@@ -3266,7 +3911,7 @@ export class BoatApi extends runtime.BaseAPI {
3266
3911
  * Creates request options for setEnvironmentVar without sending the request
3267
3912
  */
3268
3913
  async setEnvironmentVarRequestOpts(input) {
3269
- const requestParameters = runtime.unflattenBody(input, 'setEnvironmentVarRequest', ['environmentId', 'key'], []);
3914
+ const requestParameters = runtime.unflattenBody(input, 'setEnvironmentVarRequest', ['environmentId', 'key', 'org'], []);
3270
3915
  if (requestParameters['environmentId'] == null) {
3271
3916
  throw new runtime.RequiredError('environmentId', 'Required parameter "environmentId" was null or undefined when calling setEnvironmentVar().');
3272
3917
  }
@@ -3277,6 +3922,9 @@ export class BoatApi extends runtime.BaseAPI {
3277
3922
  throw new runtime.RequiredError('setEnvironmentVarRequest', 'Required parameter "setEnvironmentVarRequest" was null or undefined when calling setEnvironmentVar().');
3278
3923
  }
3279
3924
  const queryParameters = {};
3925
+ if (requestParameters['org'] != null) {
3926
+ queryParameters['org'] = requestParameters['org'];
3927
+ }
3280
3928
  const headerParameters = {};
3281
3929
  headerParameters['Content-Type'] = 'application/json';
3282
3930
  if (this.configuration && this.configuration.accessToken) {
@@ -3314,6 +3962,54 @@ export class BoatApi extends runtime.BaseAPI {
3314
3962
  const response = await this.setEnvironmentVarRaw(requestParameters, initOverrides);
3315
3963
  return await response.value();
3316
3964
  }
3965
+ /**
3966
+ * Creates request options for setSandboxAiAccess without sending the request
3967
+ */
3968
+ async setSandboxAiAccessRequestOpts(input) {
3969
+ const requestParameters = runtime.unflattenBody(input, 'setSandboxAiAccessRequest', ['sandboxId'], []);
3970
+ if (requestParameters['sandboxId'] == null) {
3971
+ throw new runtime.RequiredError('sandboxId', 'Required parameter "sandboxId" was null or undefined when calling setSandboxAiAccess().');
3972
+ }
3973
+ if (requestParameters['setSandboxAiAccessRequest'] == null) {
3974
+ throw new runtime.RequiredError('setSandboxAiAccessRequest', 'Required parameter "setSandboxAiAccessRequest" was null or undefined when calling setSandboxAiAccess().');
3975
+ }
3976
+ const queryParameters = {};
3977
+ const headerParameters = {};
3978
+ headerParameters['Content-Type'] = 'application/json';
3979
+ if (this.configuration && this.configuration.accessToken) {
3980
+ const token = this.configuration.accessToken;
3981
+ const tokenString = await token("BoatBearerAuth", []);
3982
+ if (tokenString) {
3983
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
3984
+ }
3985
+ }
3986
+ let urlPath = `/sandboxes/{sandboxId}/ai-access`;
3987
+ urlPath = urlPath.replace('{sandboxId}', encodeURIComponent(String(requestParameters['sandboxId'])));
3988
+ return {
3989
+ path: urlPath,
3990
+ method: 'PUT',
3991
+ headers: headerParameters,
3992
+ query: queryParameters,
3993
+ body: SetSandboxAiAccessRequestToJSON(requestParameters['setSandboxAiAccessRequest']),
3994
+ };
3995
+ }
3996
+ /**
3997
+ * 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`.
3998
+ * Block or unblock sandbox AI access
3999
+ */
4000
+ async setSandboxAiAccessRaw(requestParameters, initOverrides) {
4001
+ const requestOptions = await this.setSandboxAiAccessRequestOpts(requestParameters);
4002
+ const response = await this.request(requestOptions, initOverrides);
4003
+ return new runtime.JSONApiResponse(response, (jsonValue) => SandboxAiAccessResponseFromJSON(jsonValue));
4004
+ }
4005
+ /**
4006
+ * 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`.
4007
+ * Block or unblock sandbox AI access
4008
+ */
4009
+ async setSandboxAiAccess(requestParameters, initOverrides) {
4010
+ const response = await this.setSandboxAiAccessRaw(requestParameters, initOverrides);
4011
+ return await response.value();
4012
+ }
3317
4013
  /**
3318
4014
  * Creates request options for setTelemetry without sending the request
3319
4015
  */
@@ -3590,6 +4286,56 @@ export class BoatApi extends runtime.BaseAPI {
3590
4286
  const response = await this.stopCommandRaw(requestParameters, initOverrides);
3591
4287
  return await response.value();
3592
4288
  }
4289
+ /**
4290
+ * Creates request options for switchCredentialAccount without sending the request
4291
+ */
4292
+ async switchCredentialAccountRequestOpts(requestParameters) {
4293
+ if (requestParameters['profile'] == null) {
4294
+ throw new runtime.RequiredError('profile', 'Required parameter "profile" was null or undefined when calling switchCredentialAccount().');
4295
+ }
4296
+ if (requestParameters['credential'] == null) {
4297
+ throw new runtime.RequiredError('credential', 'Required parameter "credential" was null or undefined when calling switchCredentialAccount().');
4298
+ }
4299
+ if (requestParameters['account'] == null) {
4300
+ throw new runtime.RequiredError('account', 'Required parameter "account" was null or undefined when calling switchCredentialAccount().');
4301
+ }
4302
+ const queryParameters = {};
4303
+ const headerParameters = {};
4304
+ if (this.configuration && this.configuration.accessToken) {
4305
+ const token = this.configuration.accessToken;
4306
+ const tokenString = await token("BoatBearerAuth", []);
4307
+ if (tokenString) {
4308
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
4309
+ }
4310
+ }
4311
+ let urlPath = `/credential-profiles/{profile}/accounts/{credential}/{account}/active`;
4312
+ urlPath = urlPath.replace('{profile}', encodeURIComponent(String(requestParameters['profile'])));
4313
+ urlPath = urlPath.replace('{credential}', encodeURIComponent(String(requestParameters['credential'])));
4314
+ urlPath = urlPath.replace('{account}', encodeURIComponent(String(requestParameters['account'])));
4315
+ return {
4316
+ path: urlPath,
4317
+ method: 'PUT',
4318
+ headers: headerParameters,
4319
+ query: queryParameters,
4320
+ };
4321
+ }
4322
+ /**
4323
+ * 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`.
4324
+ * Switch a credential to another account
4325
+ */
4326
+ async switchCredentialAccountRaw(requestParameters, initOverrides) {
4327
+ const requestOptions = await this.switchCredentialAccountRequestOpts(requestParameters);
4328
+ const response = await this.request(requestOptions, initOverrides);
4329
+ return new runtime.JSONApiResponse(response, (jsonValue) => CredentialAccountsResponseFromJSON(jsonValue));
4330
+ }
4331
+ /**
4332
+ * 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`.
4333
+ * Switch a credential to another account
4334
+ */
4335
+ async switchCredentialAccount(requestParameters, initOverrides) {
4336
+ const response = await this.switchCredentialAccountRaw(requestParameters, initOverrides);
4337
+ return await response.value();
4338
+ }
3593
4339
  /**
3594
4340
  * Creates request options for update without sending the request
3595
4341
  */
@@ -3636,6 +4382,104 @@ export class BoatApi extends runtime.BaseAPI {
3636
4382
  const response = await this.updateRaw(requestParameters, initOverrides);
3637
4383
  return await response.value();
3638
4384
  }
4385
+ /**
4386
+ * Creates request options for updateAiProxy without sending the request
4387
+ */
4388
+ async updateAiProxyRequestOpts(input) {
4389
+ const requestParameters = runtime.unflattenBody(input, 'updateAiProxyRequest', ['org', 'xBoatOrg'], []);
4390
+ if (requestParameters['updateAiProxyRequest'] == null) {
4391
+ throw new runtime.RequiredError('updateAiProxyRequest', 'Required parameter "updateAiProxyRequest" was null or undefined when calling updateAiProxy().');
4392
+ }
4393
+ const queryParameters = {};
4394
+ if (requestParameters['org'] != null) {
4395
+ queryParameters['org'] = requestParameters['org'];
4396
+ }
4397
+ const headerParameters = {};
4398
+ headerParameters['Content-Type'] = 'application/json';
4399
+ if (requestParameters['xBoatOrg'] != null) {
4400
+ headerParameters['X-Boat-Org'] = String(requestParameters['xBoatOrg']);
4401
+ }
4402
+ if (this.configuration && this.configuration.accessToken) {
4403
+ const token = this.configuration.accessToken;
4404
+ const tokenString = await token("BoatBearerAuth", []);
4405
+ if (tokenString) {
4406
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
4407
+ }
4408
+ }
4409
+ let urlPath = `/ai-proxy`;
4410
+ return {
4411
+ path: urlPath,
4412
+ method: 'PUT',
4413
+ headers: headerParameters,
4414
+ query: queryParameters,
4415
+ body: UpdateAiProxyRequestToJSON(requestParameters['updateAiProxyRequest']),
4416
+ };
4417
+ }
4418
+ /**
4419
+ * 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`.
4420
+ * Turn the AI credentials proxy on or off
4421
+ */
4422
+ async updateAiProxyRaw(requestParameters, initOverrides) {
4423
+ const requestOptions = await this.updateAiProxyRequestOpts(requestParameters);
4424
+ const response = await this.request(requestOptions, initOverrides);
4425
+ return new runtime.JSONApiResponse(response, (jsonValue) => AiProxySettingsFromJSON(jsonValue));
4426
+ }
4427
+ /**
4428
+ * 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`.
4429
+ * Turn the AI credentials proxy on or off
4430
+ */
4431
+ async updateAiProxy(requestParameters, initOverrides) {
4432
+ const response = await this.updateAiProxyRaw(requestParameters, initOverrides);
4433
+ return await response.value();
4434
+ }
4435
+ /**
4436
+ * Creates request options for updateCredentialProfile without sending the request
4437
+ */
4438
+ async updateCredentialProfileRequestOpts(input) {
4439
+ const requestParameters = runtime.unflattenBody(input, 'updateCredentialProfileRequest', ['profile'], []);
4440
+ if (requestParameters['profile'] == null) {
4441
+ throw new runtime.RequiredError('profile', 'Required parameter "profile" was null or undefined when calling updateCredentialProfile().');
4442
+ }
4443
+ if (requestParameters['updateCredentialProfileRequest'] == null) {
4444
+ throw new runtime.RequiredError('updateCredentialProfileRequest', 'Required parameter "updateCredentialProfileRequest" was null or undefined when calling updateCredentialProfile().');
4445
+ }
4446
+ const queryParameters = {};
4447
+ const headerParameters = {};
4448
+ headerParameters['Content-Type'] = 'application/json';
4449
+ if (this.configuration && this.configuration.accessToken) {
4450
+ const token = this.configuration.accessToken;
4451
+ const tokenString = await token("BoatBearerAuth", []);
4452
+ if (tokenString) {
4453
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
4454
+ }
4455
+ }
4456
+ let urlPath = `/credential-profiles/{profile}`;
4457
+ urlPath = urlPath.replace('{profile}', encodeURIComponent(String(requestParameters['profile'])));
4458
+ return {
4459
+ path: urlPath,
4460
+ method: 'PUT',
4461
+ headers: headerParameters,
4462
+ query: queryParameters,
4463
+ body: UpdateCredentialProfileRequestToJSON(requestParameters['updateCredentialProfileRequest']),
4464
+ };
4465
+ }
4466
+ /**
4467
+ * 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`.
4468
+ * Update a credential profile
4469
+ */
4470
+ async updateCredentialProfileRaw(requestParameters, initOverrides) {
4471
+ const requestOptions = await this.updateCredentialProfileRequestOpts(requestParameters);
4472
+ const response = await this.request(requestOptions, initOverrides);
4473
+ return new runtime.JSONApiResponse(response, (jsonValue) => CredentialProfileResponseFromJSON(jsonValue));
4474
+ }
4475
+ /**
4476
+ * 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`.
4477
+ * Update a credential profile
4478
+ */
4479
+ async updateCredentialProfile(requestParameters, initOverrides) {
4480
+ const response = await this.updateCredentialProfileRaw(requestParameters, initOverrides);
4481
+ return await response.value();
4482
+ }
3639
4483
  /**
3640
4484
  * Creates request options for updateDataRetention without sending the request
3641
4485
  */
@@ -3684,7 +4528,7 @@ export class BoatApi extends runtime.BaseAPI {
3684
4528
  * Creates request options for updateEnvironment without sending the request
3685
4529
  */
3686
4530
  async updateEnvironmentRequestOpts(input) {
3687
- const requestParameters = runtime.unflattenBody(input, 'updateSandboxEnvironmentRequest', ['environmentId'], []);
4531
+ const requestParameters = runtime.unflattenBody(input, 'updateSandboxEnvironmentRequest', ['environmentId', 'org'], []);
3688
4532
  if (requestParameters['environmentId'] == null) {
3689
4533
  throw new runtime.RequiredError('environmentId', 'Required parameter "environmentId" was null or undefined when calling updateEnvironment().');
3690
4534
  }
@@ -3692,6 +4536,9 @@ export class BoatApi extends runtime.BaseAPI {
3692
4536
  throw new runtime.RequiredError('updateSandboxEnvironmentRequest', 'Required parameter "updateSandboxEnvironmentRequest" was null or undefined when calling updateEnvironment().');
3693
4537
  }
3694
4538
  const queryParameters = {};
4539
+ if (requestParameters['org'] != null) {
4540
+ queryParameters['org'] = requestParameters['org'];
4541
+ }
3695
4542
  const headerParameters = {};
3696
4543
  headerParameters['Content-Type'] = 'application/json';
3697
4544
  if (this.configuration && this.configuration.accessToken) {
@@ -3822,11 +4669,14 @@ export class BoatApi extends runtime.BaseAPI {
3822
4669
  * Creates request options for upgradeEnvironment without sending the request
3823
4670
  */
3824
4671
  async upgradeEnvironmentRequestOpts(input) {
3825
- const requestParameters = runtime.unflattenBody(input, 'upgradeSandboxEnvironmentRequest', ['environmentId'], []);
4672
+ const requestParameters = runtime.unflattenBody(input, 'upgradeSandboxEnvironmentRequest', ['environmentId', 'org'], []);
3826
4673
  if (requestParameters['environmentId'] == null) {
3827
4674
  throw new runtime.RequiredError('environmentId', 'Required parameter "environmentId" was null or undefined when calling upgradeEnvironment().');
3828
4675
  }
3829
4676
  const queryParameters = {};
4677
+ if (requestParameters['org'] != null) {
4678
+ queryParameters['org'] = requestParameters['org'];
4679
+ }
3830
4680
  const headerParameters = {};
3831
4681
  headerParameters['Content-Type'] = 'application/json';
3832
4682
  if (this.configuration && this.configuration.accessToken) {