@boatdev/sdk 1.9.5 → 1.9.6

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 (148) hide show
  1. package/.openapi-generator/FILES +40 -0
  2. package/dist/apis/BoatApi.d.ts +263 -3
  3. package/dist/apis/BoatApi.js +662 -11
  4. package/dist/esm/apis/BoatApi.d.ts +263 -3
  5. package/dist/esm/apis/BoatApi.js +662 -11
  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/CredentialId.d.ts +36 -0
  19. package/dist/esm/models/CredentialId.js +54 -0
  20. package/dist/esm/models/CredentialProfile.d.ts +82 -0
  21. package/dist/esm/models/CredentialProfile.js +77 -0
  22. package/dist/esm/models/CredentialProfileDeletedResponse.d.ts +44 -0
  23. package/dist/esm/models/CredentialProfileDeletedResponse.js +51 -0
  24. package/dist/esm/models/CredentialProfileListResponse.d.ts +45 -0
  25. package/dist/esm/models/CredentialProfileListResponse.js +52 -0
  26. package/dist/esm/models/CredentialProfileOwner.d.ts +58 -0
  27. package/dist/esm/models/CredentialProfileOwner.js +62 -0
  28. package/dist/esm/models/CredentialProfileResponse.d.ts +51 -0
  29. package/dist/esm/models/CredentialProfileResponse.js +56 -0
  30. package/dist/esm/models/ProcessListResponse.d.ts +1 -1
  31. package/dist/esm/models/SandboxAiAccessResponse.d.ts +56 -0
  32. package/dist/esm/models/SandboxAiAccessResponse.js +59 -0
  33. package/dist/esm/models/SandboxAiUsage.d.ts +64 -0
  34. package/dist/esm/models/SandboxAiUsage.js +65 -0
  35. package/dist/esm/models/SandboxAiUsageResponse.d.ts +88 -0
  36. package/dist/esm/models/SandboxAiUsageResponse.js +81 -0
  37. package/dist/esm/models/SandboxEnvironment.d.ts +13 -1
  38. package/dist/esm/models/SandboxEnvironment.js +4 -0
  39. package/dist/esm/models/SetCredentialKeyRequest.d.ts +32 -0
  40. package/dist/esm/models/SetCredentialKeyRequest.js +43 -0
  41. package/dist/esm/models/SetCustomApiRequest.d.ts +38 -0
  42. package/dist/esm/models/SetCustomApiRequest.js +47 -0
  43. package/dist/esm/models/SetSandboxAiAccessRequest.d.ts +32 -0
  44. package/dist/esm/models/SetSandboxAiAccessRequest.js +43 -0
  45. package/dist/esm/models/UpdateAiProxyRequest.d.ts +32 -0
  46. package/dist/esm/models/UpdateAiProxyRequest.js +43 -0
  47. package/dist/esm/models/UpdateCredentialProfileRequest.d.ts +38 -0
  48. package/dist/esm/models/UpdateCredentialProfileRequest.js +43 -0
  49. package/dist/esm/models/UpdateSandboxEnvironmentRequest.d.ts +12 -0
  50. package/dist/esm/models/UpdateSandboxEnvironmentRequest.js +4 -0
  51. package/dist/esm/models/index.d.ts +20 -0
  52. package/dist/esm/models/index.js +20 -0
  53. package/dist/models/AccountAiUsageResponse.d.ts +83 -0
  54. package/dist/models/AccountAiUsageResponse.js +85 -0
  55. package/dist/models/AiProxySettings.d.ts +81 -0
  56. package/dist/models/AiProxySettings.js +83 -0
  57. package/dist/models/AiProxySettingsAllOfPricing.d.ts +38 -0
  58. package/dist/models/AiProxySettingsAllOfPricing.js +54 -0
  59. package/dist/models/AiUsageRow.d.ts +80 -0
  60. package/dist/models/AiUsageRow.js +82 -0
  61. package/dist/models/AiUsageTotals.d.ts +62 -0
  62. package/dist/models/AiUsageTotals.js +70 -0
  63. package/dist/models/CreateCredentialProfileRequest.d.ts +44 -0
  64. package/dist/models/CreateCredentialProfileRequest.js +54 -0
  65. package/dist/models/CredentialId.d.ts +36 -0
  66. package/dist/models/CredentialId.js +62 -0
  67. package/dist/models/CredentialProfile.d.ts +82 -0
  68. package/dist/models/CredentialProfile.js +84 -0
  69. package/dist/models/CredentialProfileDeletedResponse.d.ts +44 -0
  70. package/dist/models/CredentialProfileDeletedResponse.js +58 -0
  71. package/dist/models/CredentialProfileListResponse.d.ts +45 -0
  72. package/dist/models/CredentialProfileListResponse.js +59 -0
  73. package/dist/models/CredentialProfileOwner.d.ts +58 -0
  74. package/dist/models/CredentialProfileOwner.js +70 -0
  75. package/dist/models/CredentialProfileResponse.d.ts +51 -0
  76. package/dist/models/CredentialProfileResponse.js +63 -0
  77. package/dist/models/ProcessListResponse.d.ts +1 -1
  78. package/dist/models/SandboxAiAccessResponse.d.ts +56 -0
  79. package/dist/models/SandboxAiAccessResponse.js +66 -0
  80. package/dist/models/SandboxAiUsage.d.ts +64 -0
  81. package/dist/models/SandboxAiUsage.js +72 -0
  82. package/dist/models/SandboxAiUsageResponse.d.ts +88 -0
  83. package/dist/models/SandboxAiUsageResponse.js +88 -0
  84. package/dist/models/SandboxEnvironment.d.ts +13 -1
  85. package/dist/models/SandboxEnvironment.js +4 -0
  86. package/dist/models/SetCredentialKeyRequest.d.ts +32 -0
  87. package/dist/models/SetCredentialKeyRequest.js +50 -0
  88. package/dist/models/SetCustomApiRequest.d.ts +38 -0
  89. package/dist/models/SetCustomApiRequest.js +54 -0
  90. package/dist/models/SetSandboxAiAccessRequest.d.ts +32 -0
  91. package/dist/models/SetSandboxAiAccessRequest.js +50 -0
  92. package/dist/models/UpdateAiProxyRequest.d.ts +32 -0
  93. package/dist/models/UpdateAiProxyRequest.js +50 -0
  94. package/dist/models/UpdateCredentialProfileRequest.d.ts +38 -0
  95. package/dist/models/UpdateCredentialProfileRequest.js +50 -0
  96. package/dist/models/UpdateSandboxEnvironmentRequest.d.ts +12 -0
  97. package/dist/models/UpdateSandboxEnvironmentRequest.js +4 -0
  98. package/dist/models/index.d.ts +20 -0
  99. package/dist/models/index.js +20 -0
  100. package/docs/AccountAiUsageResponse.md +48 -0
  101. package/docs/AiProxySettings.md +48 -0
  102. package/docs/AiProxySettingsAllOfPricing.md +34 -0
  103. package/docs/AiUsageRow.md +48 -0
  104. package/docs/AiUsageTotals.md +43 -0
  105. package/docs/BoatApi.md +1285 -234
  106. package/docs/CreateCredentialProfileRequest.md +36 -0
  107. package/docs/CredentialId.md +31 -0
  108. package/docs/CredentialProfile.md +49 -0
  109. package/docs/CredentialProfileDeletedResponse.md +36 -0
  110. package/docs/CredentialProfileListResponse.md +36 -0
  111. package/docs/CredentialProfileOwner.md +38 -0
  112. package/docs/CredentialProfileResponse.md +38 -0
  113. package/docs/SandboxAiAccessResponse.md +40 -0
  114. package/docs/SandboxAiUsage.md +42 -0
  115. package/docs/SandboxAiUsageResponse.md +50 -0
  116. package/docs/SandboxEnvironment.md +4 -0
  117. package/docs/SetCredentialKeyRequest.md +32 -0
  118. package/docs/SetCustomApiRequest.md +34 -0
  119. package/docs/SetSandboxAiAccessRequest.md +32 -0
  120. package/docs/UpdateAiProxyRequest.md +32 -0
  121. package/docs/UpdateCredentialProfileRequest.md +34 -0
  122. package/docs/UpdateSandboxEnvironmentRequest.md +4 -0
  123. package/package.json +1 -1
  124. package/src/apis/BoatApi.ts +1013 -13
  125. package/src/models/AccountAiUsageResponse.ts +160 -0
  126. package/src/models/AiProxySettings.ts +146 -0
  127. package/src/models/AiProxySettingsAllOfPricing.ts +75 -0
  128. package/src/models/AiUsageRow.ts +138 -0
  129. package/src/models/AiUsageTotals.ts +111 -0
  130. package/src/models/CreateCredentialProfileRequest.ts +82 -0
  131. package/src/models/CredentialId.ts +64 -0
  132. package/src/models/CredentialProfile.ts +153 -0
  133. package/src/models/CredentialProfileDeletedResponse.ts +84 -0
  134. package/src/models/CredentialProfileListResponse.ts +92 -0
  135. package/src/models/CredentialProfileOwner.ts +104 -0
  136. package/src/models/CredentialProfileResponse.ts +101 -0
  137. package/src/models/ProcessListResponse.ts +1 -1
  138. package/src/models/SandboxAiAccessResponse.ts +102 -0
  139. package/src/models/SandboxAiUsage.ts +126 -0
  140. package/src/models/SandboxAiUsageResponse.ts +162 -0
  141. package/src/models/SandboxEnvironment.ts +17 -1
  142. package/src/models/SetCredentialKeyRequest.ts +66 -0
  143. package/src/models/SetCustomApiRequest.ts +75 -0
  144. package/src/models/SetSandboxAiAccessRequest.ts +66 -0
  145. package/src/models/UpdateAiProxyRequest.ts +66 -0
  146. package/src/models/UpdateCredentialProfileRequest.ts +73 -0
  147. package/src/models/UpdateSandboxEnvironmentRequest.ts +16 -0
  148. package/src/models/index.ts +20 -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,14 @@ 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 { CredentialProfileDeletedResponseFromJSON, } from '../models/CredentialProfileDeletedResponse';
39
+ import { CredentialProfileListResponseFromJSON, } from '../models/CredentialProfileListResponse';
40
+ import { CredentialProfileResponseFromJSON, } from '../models/CredentialProfileResponse';
35
41
  import { DataRetentionPolicyResponseFromJSON, } from '../models/DataRetentionPolicyResponse';
36
42
  import { DataRetentionUpdateRequestToJSON, } from '../models/DataRetentionUpdateRequest';
37
43
  import { DeletionOperationListResponseFromJSON, } from '../models/DeletionOperationListResponse';
@@ -69,6 +75,8 @@ import { RepoSelectionResponseFromJSON, } from '../models/RepoSelectionResponse'
69
75
  import { ReposResponseFromJSON, } from '../models/ReposResponse';
70
76
  import { ResumeRequestToJSON, } from '../models/ResumeRequest';
71
77
  import { SandboxActionResponseFromJSON, } from '../models/SandboxActionResponse';
78
+ import { SandboxAiAccessResponseFromJSON, } from '../models/SandboxAiAccessResponse';
79
+ import { SandboxAiUsageResponseFromJSON, } from '../models/SandboxAiUsageResponse';
72
80
  import { SandboxEnvironmentListResponseFromJSON, } from '../models/SandboxEnvironmentListResponse';
73
81
  import { SandboxEnvironmentResponseFromJSON, } from '../models/SandboxEnvironmentResponse';
74
82
  import { SandboxInfoResponseFromJSON, } from '../models/SandboxInfoResponse';
@@ -76,8 +84,11 @@ import { SandboxListResponseFromJSON, } from '../models/SandboxListResponse';
76
84
  import { SandboxUsageResponseFromJSON, } from '../models/SandboxUsageResponse';
77
85
  import { SecretsResponseFromJSON, } from '../models/SecretsResponse';
78
86
  import { SecretsUpdateRequestToJSON, } from '../models/SecretsUpdateRequest';
87
+ import { SetCredentialKeyRequestToJSON, } from '../models/SetCredentialKeyRequest';
88
+ import { SetCustomApiRequestToJSON, } from '../models/SetCustomApiRequest';
79
89
  import { SetEnvironmentSecretFileRequestToJSON, } from '../models/SetEnvironmentSecretFileRequest';
80
90
  import { SetEnvironmentVarRequestToJSON, } from '../models/SetEnvironmentVarRequest';
91
+ import { SetSandboxAiAccessRequestToJSON, } from '../models/SetSandboxAiAccessRequest';
81
92
  import { Share200ResponseFromJSON, } from '../models/Share200Response';
82
93
  import { SnapshotDownloadResponseFromJSON, } from '../models/SnapshotDownloadResponse';
83
94
  import { SnapshotLatestResponseFromJSON, } from '../models/SnapshotLatestResponse';
@@ -92,6 +103,8 @@ import { StopRequestToJSON, } from '../models/StopRequest';
92
103
  import { TelemetryResponseFromJSON, } from '../models/TelemetryResponse';
93
104
  import { TelemetrySetRequestToJSON, } from '../models/TelemetrySetRequest';
94
105
  import { TelemetrySetResponseFromJSON, } from '../models/TelemetrySetResponse';
106
+ import { UpdateAiProxyRequestToJSON, } from '../models/UpdateAiProxyRequest';
107
+ import { UpdateCredentialProfileRequestToJSON, } from '../models/UpdateCredentialProfileRequest';
95
108
  import { UpdateSandboxEnvironmentRequestToJSON, } from '../models/UpdateSandboxEnvironmentRequest';
96
109
  import { UpdateSandboxRequestToJSON, } from '../models/UpdateSandboxRequest';
97
110
  import { UpgradeSandboxEnvironmentRequestToJSON, } from '../models/UpgradeSandboxEnvironmentRequest';
@@ -110,7 +123,7 @@ export class BoatApi extends runtime.BaseAPI {
110
123
  * Creates request options for addEnvironmentRepo without sending the request
111
124
  */
112
125
  async addEnvironmentRepoRequestOpts(input) {
113
- const requestParameters = runtime.unflattenBody(input, 'addEnvironmentRepoRequest', ['environmentId'], []);
126
+ const requestParameters = runtime.unflattenBody(input, 'addEnvironmentRepoRequest', ['environmentId', 'org'], []);
114
127
  if (requestParameters['environmentId'] == null) {
115
128
  throw new runtime.RequiredError('environmentId', 'Required parameter "environmentId" was null or undefined when calling addEnvironmentRepo().');
116
129
  }
@@ -118,6 +131,9 @@ export class BoatApi extends runtime.BaseAPI {
118
131
  throw new runtime.RequiredError('addEnvironmentRepoRequest', 'Required parameter "addEnvironmentRepoRequest" was null or undefined when calling addEnvironmentRepo().');
119
132
  }
120
133
  const queryParameters = {};
134
+ if (requestParameters['org'] != null) {
135
+ queryParameters['org'] = requestParameters['org'];
136
+ }
121
137
  const headerParameters = {};
122
138
  headerParameters['Content-Type'] = 'application/json';
123
139
  if (this.configuration && this.configuration.accessToken) {
@@ -641,6 +657,50 @@ export class BoatApi extends runtime.BaseAPI {
641
657
  const response = await this.createRaw(requestParameters, initOverrides);
642
658
  return await response.value();
643
659
  }
660
+ /**
661
+ * Creates request options for createCredentialProfile without sending the request
662
+ */
663
+ async createCredentialProfileRequestOpts(input) {
664
+ const requestParameters = runtime.unflattenBody(input, 'createCredentialProfileRequest', [], []);
665
+ if (requestParameters['createCredentialProfileRequest'] == null) {
666
+ throw new runtime.RequiredError('createCredentialProfileRequest', 'Required parameter "createCredentialProfileRequest" was null or undefined when calling createCredentialProfile().');
667
+ }
668
+ const queryParameters = {};
669
+ const headerParameters = {};
670
+ headerParameters['Content-Type'] = 'application/json';
671
+ if (this.configuration && this.configuration.accessToken) {
672
+ const token = this.configuration.accessToken;
673
+ const tokenString = await token("BoatBearerAuth", []);
674
+ if (tokenString) {
675
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
676
+ }
677
+ }
678
+ let urlPath = `/credential-profiles`;
679
+ return {
680
+ path: urlPath,
681
+ method: 'POST',
682
+ headers: headerParameters,
683
+ query: queryParameters,
684
+ body: CreateCredentialProfileRequestToJSON(requestParameters['createCredentialProfileRequest']),
685
+ };
686
+ }
687
+ /**
688
+ * 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`.
689
+ * Create a credential profile
690
+ */
691
+ async createCredentialProfileRaw(requestParameters, initOverrides) {
692
+ const requestOptions = await this.createCredentialProfileRequestOpts(requestParameters);
693
+ const response = await this.request(requestOptions, initOverrides);
694
+ return new runtime.JSONApiResponse(response, (jsonValue) => CredentialProfileResponseFromJSON(jsonValue));
695
+ }
696
+ /**
697
+ * 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`.
698
+ * Create a credential profile
699
+ */
700
+ async createCredentialProfile(requestParameters, initOverrides) {
701
+ const response = await this.createCredentialProfileRaw(requestParameters, initOverrides);
702
+ return await response.value();
703
+ }
644
704
  /**
645
705
  * Creates request options for createDownloadUrl without sending the request
646
706
  */
@@ -693,11 +753,14 @@ export class BoatApi extends runtime.BaseAPI {
693
753
  * Creates request options for createEnvironment without sending the request
694
754
  */
695
755
  async createEnvironmentRequestOpts(input) {
696
- const requestParameters = runtime.unflattenBody(input, 'createSandboxEnvironmentRequest', [], []);
756
+ const requestParameters = runtime.unflattenBody(input, 'createSandboxEnvironmentRequest', ['org'], []);
697
757
  if (requestParameters['createSandboxEnvironmentRequest'] == null) {
698
758
  throw new runtime.RequiredError('createSandboxEnvironmentRequest', 'Required parameter "createSandboxEnvironmentRequest" was null or undefined when calling createEnvironment().');
699
759
  }
700
760
  const queryParameters = {};
761
+ if (requestParameters['org'] != null) {
762
+ queryParameters['org'] = requestParameters['org'];
763
+ }
701
764
  const headerParameters = {};
702
765
  headerParameters['Content-Type'] = 'application/json';
703
766
  if (this.configuration && this.configuration.accessToken) {
@@ -911,6 +974,140 @@ export class BoatApi extends runtime.BaseAPI {
911
974
  const response = await this.createWebhookRaw(requestParameters, initOverrides);
912
975
  return await response.value();
913
976
  }
977
+ /**
978
+ * Creates request options for deleteCredentialProfile without sending the request
979
+ */
980
+ async deleteCredentialProfileRequestOpts(requestParameters) {
981
+ if (requestParameters['profile'] == null) {
982
+ throw new runtime.RequiredError('profile', 'Required parameter "profile" was null or undefined when calling deleteCredentialProfile().');
983
+ }
984
+ const queryParameters = {};
985
+ const headerParameters = {};
986
+ if (this.configuration && this.configuration.accessToken) {
987
+ const token = this.configuration.accessToken;
988
+ const tokenString = await token("BoatBearerAuth", []);
989
+ if (tokenString) {
990
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
991
+ }
992
+ }
993
+ let urlPath = `/credential-profiles/{profile}`;
994
+ urlPath = urlPath.replace('{profile}', encodeURIComponent(String(requestParameters['profile'])));
995
+ return {
996
+ path: urlPath,
997
+ method: 'DELETE',
998
+ headers: headerParameters,
999
+ query: queryParameters,
1000
+ };
1001
+ }
1002
+ /**
1003
+ * 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`.
1004
+ * Delete a credential profile
1005
+ */
1006
+ async deleteCredentialProfileRaw(requestParameters, initOverrides) {
1007
+ const requestOptions = await this.deleteCredentialProfileRequestOpts(requestParameters);
1008
+ const response = await this.request(requestOptions, initOverrides);
1009
+ return new runtime.JSONApiResponse(response, (jsonValue) => CredentialProfileDeletedResponseFromJSON(jsonValue));
1010
+ }
1011
+ /**
1012
+ * 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`.
1013
+ * Delete a credential profile
1014
+ */
1015
+ async deleteCredentialProfile(requestParameters, initOverrides) {
1016
+ const response = await this.deleteCredentialProfileRaw(requestParameters, initOverrides);
1017
+ return await response.value();
1018
+ }
1019
+ /**
1020
+ * Creates request options for deleteCredentialProfileCustomApi without sending the request
1021
+ */
1022
+ async deleteCredentialProfileCustomApiRequestOpts(requestParameters) {
1023
+ if (requestParameters['profile'] == null) {
1024
+ throw new runtime.RequiredError('profile', 'Required parameter "profile" was null or undefined when calling deleteCredentialProfileCustomApi().');
1025
+ }
1026
+ if (requestParameters['name'] == null) {
1027
+ throw new runtime.RequiredError('name', 'Required parameter "name" was null or undefined when calling deleteCredentialProfileCustomApi().');
1028
+ }
1029
+ const queryParameters = {};
1030
+ const headerParameters = {};
1031
+ if (this.configuration && this.configuration.accessToken) {
1032
+ const token = this.configuration.accessToken;
1033
+ const tokenString = await token("BoatBearerAuth", []);
1034
+ if (tokenString) {
1035
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1036
+ }
1037
+ }
1038
+ let urlPath = `/credential-profiles/{profile}/custom-apis/{name}`;
1039
+ urlPath = urlPath.replace('{profile}', encodeURIComponent(String(requestParameters['profile'])));
1040
+ urlPath = urlPath.replace('{name}', encodeURIComponent(String(requestParameters['name'])));
1041
+ return {
1042
+ path: urlPath,
1043
+ method: 'DELETE',
1044
+ headers: headerParameters,
1045
+ query: queryParameters,
1046
+ };
1047
+ }
1048
+ /**
1049
+ * Removes one custom API from the profile. Needs an API key with `account.admin`.
1050
+ * Remove a custom API
1051
+ */
1052
+ async deleteCredentialProfileCustomApiRaw(requestParameters, initOverrides) {
1053
+ const requestOptions = await this.deleteCredentialProfileCustomApiRequestOpts(requestParameters);
1054
+ const response = await this.request(requestOptions, initOverrides);
1055
+ return new runtime.JSONApiResponse(response, (jsonValue) => CredentialProfileResponseFromJSON(jsonValue));
1056
+ }
1057
+ /**
1058
+ * Removes one custom API from the profile. Needs an API key with `account.admin`.
1059
+ * Remove a custom API
1060
+ */
1061
+ async deleteCredentialProfileCustomApi(requestParameters, initOverrides) {
1062
+ const response = await this.deleteCredentialProfileCustomApiRaw(requestParameters, initOverrides);
1063
+ return await response.value();
1064
+ }
1065
+ /**
1066
+ * Creates request options for deleteCredentialProfileKey without sending the request
1067
+ */
1068
+ async deleteCredentialProfileKeyRequestOpts(requestParameters) {
1069
+ if (requestParameters['profile'] == null) {
1070
+ throw new runtime.RequiredError('profile', 'Required parameter "profile" was null or undefined when calling deleteCredentialProfileKey().');
1071
+ }
1072
+ if (requestParameters['credential'] == null) {
1073
+ throw new runtime.RequiredError('credential', 'Required parameter "credential" was null or undefined when calling deleteCredentialProfileKey().');
1074
+ }
1075
+ const queryParameters = {};
1076
+ const headerParameters = {};
1077
+ if (this.configuration && this.configuration.accessToken) {
1078
+ const token = this.configuration.accessToken;
1079
+ const tokenString = await token("BoatBearerAuth", []);
1080
+ if (tokenString) {
1081
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1082
+ }
1083
+ }
1084
+ let urlPath = `/credential-profiles/{profile}/keys/{credential}`;
1085
+ urlPath = urlPath.replace('{profile}', encodeURIComponent(String(requestParameters['profile'])));
1086
+ urlPath = urlPath.replace('{credential}', encodeURIComponent(String(requestParameters['credential'])));
1087
+ return {
1088
+ path: urlPath,
1089
+ method: 'DELETE',
1090
+ headers: headerParameters,
1091
+ query: queryParameters,
1092
+ };
1093
+ }
1094
+ /**
1095
+ * Removes one credential, an API key or a sign-in. Needs an API key with `account.admin`.
1096
+ * Remove a credential profile credential
1097
+ */
1098
+ async deleteCredentialProfileKeyRaw(requestParameters, initOverrides) {
1099
+ const requestOptions = await this.deleteCredentialProfileKeyRequestOpts(requestParameters);
1100
+ const response = await this.request(requestOptions, initOverrides);
1101
+ return new runtime.JSONApiResponse(response, (jsonValue) => CredentialProfileResponseFromJSON(jsonValue));
1102
+ }
1103
+ /**
1104
+ * Removes one credential, an API key or a sign-in. Needs an API key with `account.admin`.
1105
+ * Remove a credential profile credential
1106
+ */
1107
+ async deleteCredentialProfileKey(requestParameters, initOverrides) {
1108
+ const response = await this.deleteCredentialProfileKeyRaw(requestParameters, initOverrides);
1109
+ return await response.value();
1110
+ }
914
1111
  /**
915
1112
  * Creates request options for deleteEnvironment without sending the request
916
1113
  */
@@ -919,6 +1116,9 @@ export class BoatApi extends runtime.BaseAPI {
919
1116
  throw new runtime.RequiredError('environmentId', 'Required parameter "environmentId" was null or undefined when calling deleteEnvironment().');
920
1117
  }
921
1118
  const queryParameters = {};
1119
+ if (requestParameters['org'] != null) {
1120
+ queryParameters['org'] = requestParameters['org'];
1121
+ }
922
1122
  const headerParameters = {};
923
1123
  if (this.configuration && this.configuration.accessToken) {
924
1124
  const token = this.configuration.accessToken;
@@ -964,6 +1164,9 @@ export class BoatApi extends runtime.BaseAPI {
964
1164
  throw new runtime.RequiredError('repositoryId', 'Required parameter "repositoryId" was null or undefined when calling deleteEnvironmentRepo().');
965
1165
  }
966
1166
  const queryParameters = {};
1167
+ if (requestParameters['org'] != null) {
1168
+ queryParameters['org'] = requestParameters['org'];
1169
+ }
967
1170
  const headerParameters = {};
968
1171
  if (this.configuration && this.configuration.accessToken) {
969
1172
  const token = this.configuration.accessToken;
@@ -1013,6 +1216,9 @@ export class BoatApi extends runtime.BaseAPI {
1013
1216
  if (requestParameters['path'] != null) {
1014
1217
  queryParameters['path'] = requestParameters['path'];
1015
1218
  }
1219
+ if (requestParameters['org'] != null) {
1220
+ queryParameters['org'] = requestParameters['org'];
1221
+ }
1016
1222
  const headerParameters = {};
1017
1223
  if (this.configuration && this.configuration.accessToken) {
1018
1224
  const token = this.configuration.accessToken;
@@ -1058,6 +1264,9 @@ export class BoatApi extends runtime.BaseAPI {
1058
1264
  throw new runtime.RequiredError('key', 'Required parameter "key" was null or undefined when calling deleteEnvironmentVar().');
1059
1265
  }
1060
1266
  const queryParameters = {};
1267
+ if (requestParameters['org'] != null) {
1268
+ queryParameters['org'] = requestParameters['org'];
1269
+ }
1061
1270
  const headerParameters = {};
1062
1271
  if (this.configuration && this.configuration.accessToken) {
1063
1272
  const token = this.configuration.accessToken;
@@ -1413,8 +1622,11 @@ export class BoatApi extends runtime.BaseAPI {
1413
1622
  /**
1414
1623
  * Creates request options for environments without sending the request
1415
1624
  */
1416
- async environmentsRequestOpts() {
1625
+ async environmentsRequestOpts(requestParameters) {
1417
1626
  const queryParameters = {};
1627
+ if (requestParameters['org'] != null) {
1628
+ queryParameters['org'] = requestParameters['org'];
1629
+ }
1418
1630
  const headerParameters = {};
1419
1631
  if (this.configuration && this.configuration.accessToken) {
1420
1632
  const token = this.configuration.accessToken;
@@ -1435,8 +1647,8 @@ export class BoatApi extends runtime.BaseAPI {
1435
1647
  * 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
1648
  * List Sandbox environments
1437
1649
  */
1438
- async environmentsRaw(initOverrides) {
1439
- const requestOptions = await this.environmentsRequestOpts();
1650
+ async environmentsRaw(requestParameters, initOverrides) {
1651
+ const requestOptions = await this.environmentsRequestOpts(requestParameters);
1440
1652
  const response = await this.request(requestOptions, initOverrides);
1441
1653
  return new runtime.JSONApiResponse(response, (jsonValue) => SandboxEnvironmentListResponseFromJSON(jsonValue));
1442
1654
  }
@@ -1444,8 +1656,8 @@ export class BoatApi extends runtime.BaseAPI {
1444
1656
  * 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
1657
  * List Sandbox environments
1446
1658
  */
1447
- async environments(initOverrides) {
1448
- const response = await this.environmentsRaw(initOverrides);
1659
+ async environments(requestParameters = {}, initOverrides) {
1660
+ const response = await this.environmentsRaw(requestParameters, initOverrides);
1449
1661
  return await response.value();
1450
1662
  }
1451
1663
  /**
@@ -1595,6 +1807,100 @@ export class BoatApi extends runtime.BaseAPI {
1595
1807
  const response = await this.getRaw(requestParameters, initOverrides);
1596
1808
  return await response.value();
1597
1809
  }
1810
+ /**
1811
+ * Creates request options for getAiProxy without sending the request
1812
+ */
1813
+ async getAiProxyRequestOpts(requestParameters) {
1814
+ const queryParameters = {};
1815
+ if (requestParameters['org'] != null) {
1816
+ queryParameters['org'] = requestParameters['org'];
1817
+ }
1818
+ const headerParameters = {};
1819
+ if (requestParameters['xBoatOrg'] != null) {
1820
+ headerParameters['X-Boat-Org'] = String(requestParameters['xBoatOrg']);
1821
+ }
1822
+ if (this.configuration && this.configuration.accessToken) {
1823
+ const token = this.configuration.accessToken;
1824
+ const tokenString = await token("BoatBearerAuth", []);
1825
+ if (tokenString) {
1826
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1827
+ }
1828
+ }
1829
+ let urlPath = `/ai-proxy`;
1830
+ return {
1831
+ path: urlPath,
1832
+ method: 'GET',
1833
+ headers: headerParameters,
1834
+ query: queryParameters,
1835
+ };
1836
+ }
1837
+ /**
1838
+ * 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`.
1839
+ * Get AI credentials proxy
1840
+ */
1841
+ async getAiProxyRaw(requestParameters, initOverrides) {
1842
+ const requestOptions = await this.getAiProxyRequestOpts(requestParameters);
1843
+ const response = await this.request(requestOptions, initOverrides);
1844
+ return new runtime.JSONApiResponse(response, (jsonValue) => AiProxySettingsFromJSON(jsonValue));
1845
+ }
1846
+ /**
1847
+ * 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`.
1848
+ * Get AI credentials proxy
1849
+ */
1850
+ async getAiProxy(requestParameters = {}, initOverrides) {
1851
+ const response = await this.getAiProxyRaw(requestParameters, initOverrides);
1852
+ return await response.value();
1853
+ }
1854
+ /**
1855
+ * Creates request options for getAiUsage without sending the request
1856
+ */
1857
+ async getAiUsageRequestOpts(requestParameters) {
1858
+ const queryParameters = {};
1859
+ if (requestParameters['days'] != null) {
1860
+ queryParameters['days'] = requestParameters['days'];
1861
+ }
1862
+ if (requestParameters['profile'] != null) {
1863
+ queryParameters['profile'] = requestParameters['profile'];
1864
+ }
1865
+ if (requestParameters['org'] != null) {
1866
+ queryParameters['org'] = requestParameters['org'];
1867
+ }
1868
+ const headerParameters = {};
1869
+ if (requestParameters['xBoatOrg'] != null) {
1870
+ headerParameters['X-Boat-Org'] = String(requestParameters['xBoatOrg']);
1871
+ }
1872
+ if (this.configuration && this.configuration.accessToken) {
1873
+ const token = this.configuration.accessToken;
1874
+ const tokenString = await token("BoatBearerAuth", []);
1875
+ if (tokenString) {
1876
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1877
+ }
1878
+ }
1879
+ let urlPath = `/ai-usage`;
1880
+ return {
1881
+ path: urlPath,
1882
+ method: 'GET',
1883
+ headers: headerParameters,
1884
+ query: queryParameters,
1885
+ };
1886
+ }
1887
+ /**
1888
+ * 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`.
1889
+ * Get AI usage
1890
+ */
1891
+ async getAiUsageRaw(requestParameters, initOverrides) {
1892
+ const requestOptions = await this.getAiUsageRequestOpts(requestParameters);
1893
+ const response = await this.request(requestOptions, initOverrides);
1894
+ return new runtime.JSONApiResponse(response, (jsonValue) => AccountAiUsageResponseFromJSON(jsonValue));
1895
+ }
1896
+ /**
1897
+ * 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`.
1898
+ * Get AI usage
1899
+ */
1900
+ async getAiUsage(requestParameters = {}, initOverrides) {
1901
+ const response = await this.getAiUsageRaw(requestParameters, initOverrides);
1902
+ return await response.value();
1903
+ }
1598
1904
  /**
1599
1905
  * Creates request options for getCommand without sending the request
1600
1906
  */
@@ -1801,6 +2107,51 @@ export class BoatApi extends runtime.BaseAPI {
1801
2107
  const response = await this.getNamedSnapshotRaw(requestParameters, initOverrides);
1802
2108
  return await response.value();
1803
2109
  }
2110
+ /**
2111
+ * Creates request options for getSandboxAiUsage without sending the request
2112
+ */
2113
+ async getSandboxAiUsageRequestOpts(requestParameters) {
2114
+ if (requestParameters['sandboxId'] == null) {
2115
+ throw new runtime.RequiredError('sandboxId', 'Required parameter "sandboxId" was null or undefined when calling getSandboxAiUsage().');
2116
+ }
2117
+ const queryParameters = {};
2118
+ if (requestParameters['days'] != null) {
2119
+ queryParameters['days'] = requestParameters['days'];
2120
+ }
2121
+ const headerParameters = {};
2122
+ if (this.configuration && this.configuration.accessToken) {
2123
+ const token = this.configuration.accessToken;
2124
+ const tokenString = await token("BoatBearerAuth", []);
2125
+ if (tokenString) {
2126
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
2127
+ }
2128
+ }
2129
+ let urlPath = `/sandboxes/{sandboxId}/ai-usage`;
2130
+ urlPath = urlPath.replace('{sandboxId}', encodeURIComponent(String(requestParameters['sandboxId'])));
2131
+ return {
2132
+ path: urlPath,
2133
+ method: 'GET',
2134
+ headers: headerParameters,
2135
+ query: queryParameters,
2136
+ };
2137
+ }
2138
+ /**
2139
+ * 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.
2140
+ * Get sandbox AI usage
2141
+ */
2142
+ async getSandboxAiUsageRaw(requestParameters, initOverrides) {
2143
+ const requestOptions = await this.getSandboxAiUsageRequestOpts(requestParameters);
2144
+ const response = await this.request(requestOptions, initOverrides);
2145
+ return new runtime.JSONApiResponse(response, (jsonValue) => SandboxAiUsageResponseFromJSON(jsonValue));
2146
+ }
2147
+ /**
2148
+ * 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.
2149
+ * Get sandbox AI usage
2150
+ */
2151
+ async getSandboxAiUsage(requestParameters, initOverrides) {
2152
+ const response = await this.getSandboxAiUsageRaw(requestParameters, initOverrides);
2153
+ return await response.value();
2154
+ }
1804
2155
  /**
1805
2156
  * Creates request options for getSnapshotDownload without sending the request
1806
2157
  */
@@ -2196,6 +2547,44 @@ export class BoatApi extends runtime.BaseAPI {
2196
2547
  const response = await this.limitsRaw(requestParameters, initOverrides);
2197
2548
  return await response.value();
2198
2549
  }
2550
+ /**
2551
+ * Creates request options for listCredentialProfiles without sending the request
2552
+ */
2553
+ async listCredentialProfilesRequestOpts() {
2554
+ const queryParameters = {};
2555
+ const headerParameters = {};
2556
+ if (this.configuration && this.configuration.accessToken) {
2557
+ const token = this.configuration.accessToken;
2558
+ const tokenString = await token("BoatBearerAuth", []);
2559
+ if (tokenString) {
2560
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
2561
+ }
2562
+ }
2563
+ let urlPath = `/credential-profiles`;
2564
+ return {
2565
+ path: urlPath,
2566
+ method: 'GET',
2567
+ headers: headerParameters,
2568
+ query: queryParameters,
2569
+ };
2570
+ }
2571
+ /**
2572
+ * Returns every AI credential profile you can use, yours and your organizations\'. Secret values are never returned. Needs an API key with `account.admin`.
2573
+ * List credential profiles
2574
+ */
2575
+ async listCredentialProfilesRaw(initOverrides) {
2576
+ const requestOptions = await this.listCredentialProfilesRequestOpts();
2577
+ const response = await this.request(requestOptions, initOverrides);
2578
+ return new runtime.JSONApiResponse(response, (jsonValue) => CredentialProfileListResponseFromJSON(jsonValue));
2579
+ }
2580
+ /**
2581
+ * Returns every AI credential profile you can use, yours and your organizations\'. Secret values are never returned. Needs an API key with `account.admin`.
2582
+ * List credential profiles
2583
+ */
2584
+ async listCredentialProfiles(initOverrides) {
2585
+ const response = await this.listCredentialProfilesRaw(initOverrides);
2586
+ return await response.value();
2587
+ }
2199
2588
  /**
2200
2589
  * Creates request options for listNamedSnapshots without sending the request
2201
2590
  */
@@ -3214,11 +3603,115 @@ export class BoatApi extends runtime.BaseAPI {
3214
3603
  const response = await this.setActiveOrganizationRaw(requestParameters, initOverrides);
3215
3604
  return await response.value();
3216
3605
  }
3606
+ /**
3607
+ * Creates request options for setCredentialProfileCustomApi without sending the request
3608
+ */
3609
+ async setCredentialProfileCustomApiRequestOpts(input) {
3610
+ const requestParameters = runtime.unflattenBody(input, 'setCustomApiRequest', ['profile', 'name'], []);
3611
+ if (requestParameters['profile'] == null) {
3612
+ throw new runtime.RequiredError('profile', 'Required parameter "profile" was null or undefined when calling setCredentialProfileCustomApi().');
3613
+ }
3614
+ if (requestParameters['name'] == null) {
3615
+ throw new runtime.RequiredError('name', 'Required parameter "name" was null or undefined when calling setCredentialProfileCustomApi().');
3616
+ }
3617
+ if (requestParameters['setCustomApiRequest'] == null) {
3618
+ throw new runtime.RequiredError('setCustomApiRequest', 'Required parameter "setCustomApiRequest" was null or undefined when calling setCredentialProfileCustomApi().');
3619
+ }
3620
+ const queryParameters = {};
3621
+ const headerParameters = {};
3622
+ headerParameters['Content-Type'] = 'application/json';
3623
+ if (this.configuration && this.configuration.accessToken) {
3624
+ const token = this.configuration.accessToken;
3625
+ const tokenString = await token("BoatBearerAuth", []);
3626
+ if (tokenString) {
3627
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
3628
+ }
3629
+ }
3630
+ let urlPath = `/credential-profiles/{profile}/custom-apis/{name}`;
3631
+ urlPath = urlPath.replace('{profile}', encodeURIComponent(String(requestParameters['profile'])));
3632
+ urlPath = urlPath.replace('{name}', encodeURIComponent(String(requestParameters['name'])));
3633
+ return {
3634
+ path: urlPath,
3635
+ method: 'PUT',
3636
+ headers: headerParameters,
3637
+ query: queryParameters,
3638
+ body: SetCustomApiRequestToJSON(requestParameters['setCustomApiRequest']),
3639
+ };
3640
+ }
3641
+ /**
3642
+ * Adds or replaces one custom API. The sandbox gets `<NAME>` and `<NAME>_BASE_URL`. Needs an API key with `account.admin`.
3643
+ * Set a custom API
3644
+ */
3645
+ async setCredentialProfileCustomApiRaw(requestParameters, initOverrides) {
3646
+ const requestOptions = await this.setCredentialProfileCustomApiRequestOpts(requestParameters);
3647
+ const response = await this.request(requestOptions, initOverrides);
3648
+ return new runtime.JSONApiResponse(response, (jsonValue) => CredentialProfileResponseFromJSON(jsonValue));
3649
+ }
3650
+ /**
3651
+ * Adds or replaces one custom API. The sandbox gets `<NAME>` and `<NAME>_BASE_URL`. Needs an API key with `account.admin`.
3652
+ * Set a custom API
3653
+ */
3654
+ async setCredentialProfileCustomApi(requestParameters, initOverrides) {
3655
+ const response = await this.setCredentialProfileCustomApiRaw(requestParameters, initOverrides);
3656
+ return await response.value();
3657
+ }
3658
+ /**
3659
+ * Creates request options for setCredentialProfileKey without sending the request
3660
+ */
3661
+ async setCredentialProfileKeyRequestOpts(input) {
3662
+ const requestParameters = runtime.unflattenBody(input, 'setCredentialKeyRequest', ['profile', 'credential'], []);
3663
+ if (requestParameters['profile'] == null) {
3664
+ throw new runtime.RequiredError('profile', 'Required parameter "profile" was null or undefined when calling setCredentialProfileKey().');
3665
+ }
3666
+ if (requestParameters['credential'] == null) {
3667
+ throw new runtime.RequiredError('credential', 'Required parameter "credential" was null or undefined when calling setCredentialProfileKey().');
3668
+ }
3669
+ if (requestParameters['setCredentialKeyRequest'] == null) {
3670
+ throw new runtime.RequiredError('setCredentialKeyRequest', 'Required parameter "setCredentialKeyRequest" was null or undefined when calling setCredentialProfileKey().');
3671
+ }
3672
+ const queryParameters = {};
3673
+ const headerParameters = {};
3674
+ headerParameters['Content-Type'] = 'application/json';
3675
+ if (this.configuration && this.configuration.accessToken) {
3676
+ const token = this.configuration.accessToken;
3677
+ const tokenString = await token("BoatBearerAuth", []);
3678
+ if (tokenString) {
3679
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
3680
+ }
3681
+ }
3682
+ let urlPath = `/credential-profiles/{profile}/keys/{credential}`;
3683
+ urlPath = urlPath.replace('{profile}', encodeURIComponent(String(requestParameters['profile'])));
3684
+ urlPath = urlPath.replace('{credential}', encodeURIComponent(String(requestParameters['credential'])));
3685
+ return {
3686
+ path: urlPath,
3687
+ method: 'PUT',
3688
+ headers: headerParameters,
3689
+ query: queryParameters,
3690
+ body: SetCredentialKeyRequestToJSON(requestParameters['setCredentialKeyRequest']),
3691
+ };
3692
+ }
3693
+ /**
3694
+ * 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`.
3695
+ * Set a credential profile API key
3696
+ */
3697
+ async setCredentialProfileKeyRaw(requestParameters, initOverrides) {
3698
+ const requestOptions = await this.setCredentialProfileKeyRequestOpts(requestParameters);
3699
+ const response = await this.request(requestOptions, initOverrides);
3700
+ return new runtime.JSONApiResponse(response, (jsonValue) => CredentialProfileResponseFromJSON(jsonValue));
3701
+ }
3702
+ /**
3703
+ * 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`.
3704
+ * Set a credential profile API key
3705
+ */
3706
+ async setCredentialProfileKey(requestParameters, initOverrides) {
3707
+ const response = await this.setCredentialProfileKeyRaw(requestParameters, initOverrides);
3708
+ return await response.value();
3709
+ }
3217
3710
  /**
3218
3711
  * Creates request options for setEnvironmentSecretFile without sending the request
3219
3712
  */
3220
3713
  async setEnvironmentSecretFileRequestOpts(input) {
3221
- const requestParameters = runtime.unflattenBody(input, 'setEnvironmentSecretFileRequest', ['environmentId'], []);
3714
+ const requestParameters = runtime.unflattenBody(input, 'setEnvironmentSecretFileRequest', ['environmentId', 'org'], []);
3222
3715
  if (requestParameters['environmentId'] == null) {
3223
3716
  throw new runtime.RequiredError('environmentId', 'Required parameter "environmentId" was null or undefined when calling setEnvironmentSecretFile().');
3224
3717
  }
@@ -3226,6 +3719,9 @@ export class BoatApi extends runtime.BaseAPI {
3226
3719
  throw new runtime.RequiredError('setEnvironmentSecretFileRequest', 'Required parameter "setEnvironmentSecretFileRequest" was null or undefined when calling setEnvironmentSecretFile().');
3227
3720
  }
3228
3721
  const queryParameters = {};
3722
+ if (requestParameters['org'] != null) {
3723
+ queryParameters['org'] = requestParameters['org'];
3724
+ }
3229
3725
  const headerParameters = {};
3230
3726
  headerParameters['Content-Type'] = 'application/json';
3231
3727
  if (this.configuration && this.configuration.accessToken) {
@@ -3266,7 +3762,7 @@ export class BoatApi extends runtime.BaseAPI {
3266
3762
  * Creates request options for setEnvironmentVar without sending the request
3267
3763
  */
3268
3764
  async setEnvironmentVarRequestOpts(input) {
3269
- const requestParameters = runtime.unflattenBody(input, 'setEnvironmentVarRequest', ['environmentId', 'key'], []);
3765
+ const requestParameters = runtime.unflattenBody(input, 'setEnvironmentVarRequest', ['environmentId', 'key', 'org'], []);
3270
3766
  if (requestParameters['environmentId'] == null) {
3271
3767
  throw new runtime.RequiredError('environmentId', 'Required parameter "environmentId" was null or undefined when calling setEnvironmentVar().');
3272
3768
  }
@@ -3277,6 +3773,9 @@ export class BoatApi extends runtime.BaseAPI {
3277
3773
  throw new runtime.RequiredError('setEnvironmentVarRequest', 'Required parameter "setEnvironmentVarRequest" was null or undefined when calling setEnvironmentVar().');
3278
3774
  }
3279
3775
  const queryParameters = {};
3776
+ if (requestParameters['org'] != null) {
3777
+ queryParameters['org'] = requestParameters['org'];
3778
+ }
3280
3779
  const headerParameters = {};
3281
3780
  headerParameters['Content-Type'] = 'application/json';
3282
3781
  if (this.configuration && this.configuration.accessToken) {
@@ -3314,6 +3813,54 @@ export class BoatApi extends runtime.BaseAPI {
3314
3813
  const response = await this.setEnvironmentVarRaw(requestParameters, initOverrides);
3315
3814
  return await response.value();
3316
3815
  }
3816
+ /**
3817
+ * Creates request options for setSandboxAiAccess without sending the request
3818
+ */
3819
+ async setSandboxAiAccessRequestOpts(input) {
3820
+ const requestParameters = runtime.unflattenBody(input, 'setSandboxAiAccessRequest', ['sandboxId'], []);
3821
+ if (requestParameters['sandboxId'] == null) {
3822
+ throw new runtime.RequiredError('sandboxId', 'Required parameter "sandboxId" was null or undefined when calling setSandboxAiAccess().');
3823
+ }
3824
+ if (requestParameters['setSandboxAiAccessRequest'] == null) {
3825
+ throw new runtime.RequiredError('setSandboxAiAccessRequest', 'Required parameter "setSandboxAiAccessRequest" was null or undefined when calling setSandboxAiAccess().');
3826
+ }
3827
+ const queryParameters = {};
3828
+ const headerParameters = {};
3829
+ headerParameters['Content-Type'] = 'application/json';
3830
+ if (this.configuration && this.configuration.accessToken) {
3831
+ const token = this.configuration.accessToken;
3832
+ const tokenString = await token("BoatBearerAuth", []);
3833
+ if (tokenString) {
3834
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
3835
+ }
3836
+ }
3837
+ let urlPath = `/sandboxes/{sandboxId}/ai-access`;
3838
+ urlPath = urlPath.replace('{sandboxId}', encodeURIComponent(String(requestParameters['sandboxId'])));
3839
+ return {
3840
+ path: urlPath,
3841
+ method: 'PUT',
3842
+ headers: headerParameters,
3843
+ query: queryParameters,
3844
+ body: SetSandboxAiAccessRequestToJSON(requestParameters['setSandboxAiAccessRequest']),
3845
+ };
3846
+ }
3847
+ /**
3848
+ * 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`.
3849
+ * Block or unblock sandbox AI access
3850
+ */
3851
+ async setSandboxAiAccessRaw(requestParameters, initOverrides) {
3852
+ const requestOptions = await this.setSandboxAiAccessRequestOpts(requestParameters);
3853
+ const response = await this.request(requestOptions, initOverrides);
3854
+ return new runtime.JSONApiResponse(response, (jsonValue) => SandboxAiAccessResponseFromJSON(jsonValue));
3855
+ }
3856
+ /**
3857
+ * 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`.
3858
+ * Block or unblock sandbox AI access
3859
+ */
3860
+ async setSandboxAiAccess(requestParameters, initOverrides) {
3861
+ const response = await this.setSandboxAiAccessRaw(requestParameters, initOverrides);
3862
+ return await response.value();
3863
+ }
3317
3864
  /**
3318
3865
  * Creates request options for setTelemetry without sending the request
3319
3866
  */
@@ -3636,6 +4183,104 @@ export class BoatApi extends runtime.BaseAPI {
3636
4183
  const response = await this.updateRaw(requestParameters, initOverrides);
3637
4184
  return await response.value();
3638
4185
  }
4186
+ /**
4187
+ * Creates request options for updateAiProxy without sending the request
4188
+ */
4189
+ async updateAiProxyRequestOpts(input) {
4190
+ const requestParameters = runtime.unflattenBody(input, 'updateAiProxyRequest', ['org', 'xBoatOrg'], []);
4191
+ if (requestParameters['updateAiProxyRequest'] == null) {
4192
+ throw new runtime.RequiredError('updateAiProxyRequest', 'Required parameter "updateAiProxyRequest" was null or undefined when calling updateAiProxy().');
4193
+ }
4194
+ const queryParameters = {};
4195
+ if (requestParameters['org'] != null) {
4196
+ queryParameters['org'] = requestParameters['org'];
4197
+ }
4198
+ const headerParameters = {};
4199
+ headerParameters['Content-Type'] = 'application/json';
4200
+ if (requestParameters['xBoatOrg'] != null) {
4201
+ headerParameters['X-Boat-Org'] = String(requestParameters['xBoatOrg']);
4202
+ }
4203
+ if (this.configuration && this.configuration.accessToken) {
4204
+ const token = this.configuration.accessToken;
4205
+ const tokenString = await token("BoatBearerAuth", []);
4206
+ if (tokenString) {
4207
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
4208
+ }
4209
+ }
4210
+ let urlPath = `/ai-proxy`;
4211
+ return {
4212
+ path: urlPath,
4213
+ method: 'PUT',
4214
+ headers: headerParameters,
4215
+ query: queryParameters,
4216
+ body: UpdateAiProxyRequestToJSON(requestParameters['updateAiProxyRequest']),
4217
+ };
4218
+ }
4219
+ /**
4220
+ * 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`.
4221
+ * Turn the AI credentials proxy on or off
4222
+ */
4223
+ async updateAiProxyRaw(requestParameters, initOverrides) {
4224
+ const requestOptions = await this.updateAiProxyRequestOpts(requestParameters);
4225
+ const response = await this.request(requestOptions, initOverrides);
4226
+ return new runtime.JSONApiResponse(response, (jsonValue) => AiProxySettingsFromJSON(jsonValue));
4227
+ }
4228
+ /**
4229
+ * 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`.
4230
+ * Turn the AI credentials proxy on or off
4231
+ */
4232
+ async updateAiProxy(requestParameters, initOverrides) {
4233
+ const response = await this.updateAiProxyRaw(requestParameters, initOverrides);
4234
+ return await response.value();
4235
+ }
4236
+ /**
4237
+ * Creates request options for updateCredentialProfile without sending the request
4238
+ */
4239
+ async updateCredentialProfileRequestOpts(input) {
4240
+ const requestParameters = runtime.unflattenBody(input, 'updateCredentialProfileRequest', ['profile'], []);
4241
+ if (requestParameters['profile'] == null) {
4242
+ throw new runtime.RequiredError('profile', 'Required parameter "profile" was null or undefined when calling updateCredentialProfile().');
4243
+ }
4244
+ if (requestParameters['updateCredentialProfileRequest'] == null) {
4245
+ throw new runtime.RequiredError('updateCredentialProfileRequest', 'Required parameter "updateCredentialProfileRequest" was null or undefined when calling updateCredentialProfile().');
4246
+ }
4247
+ const queryParameters = {};
4248
+ const headerParameters = {};
4249
+ headerParameters['Content-Type'] = 'application/json';
4250
+ if (this.configuration && this.configuration.accessToken) {
4251
+ const token = this.configuration.accessToken;
4252
+ const tokenString = await token("BoatBearerAuth", []);
4253
+ if (tokenString) {
4254
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
4255
+ }
4256
+ }
4257
+ let urlPath = `/credential-profiles/{profile}`;
4258
+ urlPath = urlPath.replace('{profile}', encodeURIComponent(String(requestParameters['profile'])));
4259
+ return {
4260
+ path: urlPath,
4261
+ method: 'PUT',
4262
+ headers: headerParameters,
4263
+ query: queryParameters,
4264
+ body: UpdateCredentialProfileRequestToJSON(requestParameters['updateCredentialProfileRequest']),
4265
+ };
4266
+ }
4267
+ /**
4268
+ * 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`.
4269
+ * Update a credential profile
4270
+ */
4271
+ async updateCredentialProfileRaw(requestParameters, initOverrides) {
4272
+ const requestOptions = await this.updateCredentialProfileRequestOpts(requestParameters);
4273
+ const response = await this.request(requestOptions, initOverrides);
4274
+ return new runtime.JSONApiResponse(response, (jsonValue) => CredentialProfileResponseFromJSON(jsonValue));
4275
+ }
4276
+ /**
4277
+ * 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`.
4278
+ * Update a credential profile
4279
+ */
4280
+ async updateCredentialProfile(requestParameters, initOverrides) {
4281
+ const response = await this.updateCredentialProfileRaw(requestParameters, initOverrides);
4282
+ return await response.value();
4283
+ }
3639
4284
  /**
3640
4285
  * Creates request options for updateDataRetention without sending the request
3641
4286
  */
@@ -3684,7 +4329,7 @@ export class BoatApi extends runtime.BaseAPI {
3684
4329
  * Creates request options for updateEnvironment without sending the request
3685
4330
  */
3686
4331
  async updateEnvironmentRequestOpts(input) {
3687
- const requestParameters = runtime.unflattenBody(input, 'updateSandboxEnvironmentRequest', ['environmentId'], []);
4332
+ const requestParameters = runtime.unflattenBody(input, 'updateSandboxEnvironmentRequest', ['environmentId', 'org'], []);
3688
4333
  if (requestParameters['environmentId'] == null) {
3689
4334
  throw new runtime.RequiredError('environmentId', 'Required parameter "environmentId" was null or undefined when calling updateEnvironment().');
3690
4335
  }
@@ -3692,6 +4337,9 @@ export class BoatApi extends runtime.BaseAPI {
3692
4337
  throw new runtime.RequiredError('updateSandboxEnvironmentRequest', 'Required parameter "updateSandboxEnvironmentRequest" was null or undefined when calling updateEnvironment().');
3693
4338
  }
3694
4339
  const queryParameters = {};
4340
+ if (requestParameters['org'] != null) {
4341
+ queryParameters['org'] = requestParameters['org'];
4342
+ }
3695
4343
  const headerParameters = {};
3696
4344
  headerParameters['Content-Type'] = 'application/json';
3697
4345
  if (this.configuration && this.configuration.accessToken) {
@@ -3822,11 +4470,14 @@ export class BoatApi extends runtime.BaseAPI {
3822
4470
  * Creates request options for upgradeEnvironment without sending the request
3823
4471
  */
3824
4472
  async upgradeEnvironmentRequestOpts(input) {
3825
- const requestParameters = runtime.unflattenBody(input, 'upgradeSandboxEnvironmentRequest', ['environmentId'], []);
4473
+ const requestParameters = runtime.unflattenBody(input, 'upgradeSandboxEnvironmentRequest', ['environmentId', 'org'], []);
3826
4474
  if (requestParameters['environmentId'] == null) {
3827
4475
  throw new runtime.RequiredError('environmentId', 'Required parameter "environmentId" was null or undefined when calling upgradeEnvironment().');
3828
4476
  }
3829
4477
  const queryParameters = {};
4478
+ if (requestParameters['org'] != null) {
4479
+ queryParameters['org'] = requestParameters['org'];
4480
+ }
3830
4481
  const headerParameters = {};
3831
4482
  headerParameters['Content-Type'] = 'application/json';
3832
4483
  if (this.configuration && this.configuration.accessToken) {