@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
@@ -13,6 +13,11 @@
13
13
  */
14
14
 
15
15
  import * as runtime from '../runtime';
16
+ import {
17
+ type AccountAiUsageResponse,
18
+ AccountAiUsageResponseFromJSON,
19
+ AccountAiUsageResponseToJSON,
20
+ } from '../models/AccountAiUsageResponse';
16
21
  import {
17
22
  type ActiveOrgResponse,
18
23
  ActiveOrgResponseFromJSON,
@@ -28,6 +33,11 @@ import {
28
33
  AddEnvironmentRepoRequestFromJSON,
29
34
  AddEnvironmentRepoRequestToJSON,
30
35
  } from '../models/AddEnvironmentRepoRequest';
36
+ import {
37
+ type AiProxySettings,
38
+ AiProxySettingsFromJSON,
39
+ AiProxySettingsToJSON,
40
+ } from '../models/AiProxySettings';
31
41
  import {
32
42
  type ApiKeyRevokeResponse,
33
43
  ApiKeyRevokeResponseFromJSON,
@@ -98,6 +108,11 @@ import {
98
108
  ConversationsResponseFromJSON,
99
109
  ConversationsResponseToJSON,
100
110
  } from '../models/ConversationsResponse';
111
+ import {
112
+ type CreateCredentialProfileRequest,
113
+ CreateCredentialProfileRequestFromJSON,
114
+ CreateCredentialProfileRequestToJSON,
115
+ } from '../models/CreateCredentialProfileRequest';
101
116
  import {
102
117
  type CreateSandboxEnvironmentRequest,
103
118
  CreateSandboxEnvironmentRequestFromJSON,
@@ -123,6 +138,26 @@ import {
123
138
  CreateScopedApiKeyRequestFromJSON,
124
139
  CreateScopedApiKeyRequestToJSON,
125
140
  } from '../models/CreateScopedApiKeyRequest';
141
+ import {
142
+ type CredentialId,
143
+ CredentialIdFromJSON,
144
+ CredentialIdToJSON,
145
+ } from '../models/CredentialId';
146
+ import {
147
+ type CredentialProfileDeletedResponse,
148
+ CredentialProfileDeletedResponseFromJSON,
149
+ CredentialProfileDeletedResponseToJSON,
150
+ } from '../models/CredentialProfileDeletedResponse';
151
+ import {
152
+ type CredentialProfileListResponse,
153
+ CredentialProfileListResponseFromJSON,
154
+ CredentialProfileListResponseToJSON,
155
+ } from '../models/CredentialProfileListResponse';
156
+ import {
157
+ type CredentialProfileResponse,
158
+ CredentialProfileResponseFromJSON,
159
+ CredentialProfileResponseToJSON,
160
+ } from '../models/CredentialProfileResponse';
126
161
  import {
127
162
  type DataRetentionPolicyResponse,
128
163
  DataRetentionPolicyResponseFromJSON,
@@ -318,6 +353,16 @@ import {
318
353
  SandboxActionResponseFromJSON,
319
354
  SandboxActionResponseToJSON,
320
355
  } from '../models/SandboxActionResponse';
356
+ import {
357
+ type SandboxAiAccessResponse,
358
+ SandboxAiAccessResponseFromJSON,
359
+ SandboxAiAccessResponseToJSON,
360
+ } from '../models/SandboxAiAccessResponse';
361
+ import {
362
+ type SandboxAiUsageResponse,
363
+ SandboxAiUsageResponseFromJSON,
364
+ SandboxAiUsageResponseToJSON,
365
+ } from '../models/SandboxAiUsageResponse';
321
366
  import {
322
367
  type SandboxEnvironmentListResponse,
323
368
  SandboxEnvironmentListResponseFromJSON,
@@ -353,6 +398,16 @@ import {
353
398
  SecretsUpdateRequestFromJSON,
354
399
  SecretsUpdateRequestToJSON,
355
400
  } from '../models/SecretsUpdateRequest';
401
+ import {
402
+ type SetCredentialKeyRequest,
403
+ SetCredentialKeyRequestFromJSON,
404
+ SetCredentialKeyRequestToJSON,
405
+ } from '../models/SetCredentialKeyRequest';
406
+ import {
407
+ type SetCustomApiRequest,
408
+ SetCustomApiRequestFromJSON,
409
+ SetCustomApiRequestToJSON,
410
+ } from '../models/SetCustomApiRequest';
356
411
  import {
357
412
  type SetEnvironmentSecretFileRequest,
358
413
  SetEnvironmentSecretFileRequestFromJSON,
@@ -363,6 +418,11 @@ import {
363
418
  SetEnvironmentVarRequestFromJSON,
364
419
  SetEnvironmentVarRequestToJSON,
365
420
  } from '../models/SetEnvironmentVarRequest';
421
+ import {
422
+ type SetSandboxAiAccessRequest,
423
+ SetSandboxAiAccessRequestFromJSON,
424
+ SetSandboxAiAccessRequestToJSON,
425
+ } from '../models/SetSandboxAiAccessRequest';
366
426
  import {
367
427
  type Share200Response,
368
428
  Share200ResponseFromJSON,
@@ -433,6 +493,16 @@ import {
433
493
  TelemetrySetResponseFromJSON,
434
494
  TelemetrySetResponseToJSON,
435
495
  } from '../models/TelemetrySetResponse';
496
+ import {
497
+ type UpdateAiProxyRequest,
498
+ UpdateAiProxyRequestFromJSON,
499
+ UpdateAiProxyRequestToJSON,
500
+ } from '../models/UpdateAiProxyRequest';
501
+ import {
502
+ type UpdateCredentialProfileRequest,
503
+ UpdateCredentialProfileRequestFromJSON,
504
+ UpdateCredentialProfileRequestToJSON,
505
+ } from '../models/UpdateCredentialProfileRequest';
436
506
  import {
437
507
  type UpdateSandboxEnvironmentRequest,
438
508
  UpdateSandboxEnvironmentRequestFromJSON,
@@ -487,6 +557,7 @@ import {
487
557
  export interface AddEnvironmentRepoOperationRequest {
488
558
  environmentId: string;
489
559
  addEnvironmentRepoRequest: AddEnvironmentRepoRequest;
560
+ org?: string;
490
561
  }
491
562
 
492
563
  export interface ApiKeyUsageRequest {
@@ -546,6 +617,10 @@ export interface CreateRequest {
546
617
  createSandboxRequest?: CreateSandboxRequest;
547
618
  }
548
619
 
620
+ export interface CreateCredentialProfileOperationRequest {
621
+ createCredentialProfileRequest: CreateCredentialProfileRequest;
622
+ }
623
+
549
624
  export interface CreateDownloadUrlRequest {
550
625
  sandboxId: string;
551
626
  fileUrlRequest: FileUrlRequest;
@@ -553,6 +628,7 @@ export interface CreateDownloadUrlRequest {
553
628
 
554
629
  export interface CreateEnvironmentRequest {
555
630
  createSandboxEnvironmentRequest: CreateSandboxEnvironmentRequest;
631
+ org?: string;
556
632
  }
557
633
 
558
634
  export interface CreateScopedApiKeyOperationRequest {
@@ -572,23 +648,41 @@ export interface CreateWebhookRequest {
572
648
  webhookCreateRequest: WebhookCreateRequest;
573
649
  }
574
650
 
651
+ export interface DeleteCredentialProfileRequest {
652
+ profile: string;
653
+ }
654
+
655
+ export interface DeleteCredentialProfileCustomApiRequest {
656
+ profile: string;
657
+ name: string;
658
+ }
659
+
660
+ export interface DeleteCredentialProfileKeyRequest {
661
+ profile: string;
662
+ credential: CredentialId;
663
+ }
664
+
575
665
  export interface DeleteEnvironmentRequest {
576
666
  environmentId: string;
667
+ org?: string;
577
668
  }
578
669
 
579
670
  export interface DeleteEnvironmentRepoRequest {
580
671
  environmentId: string;
581
672
  repositoryId: string;
673
+ org?: string;
582
674
  }
583
675
 
584
676
  export interface DeleteEnvironmentSecretFileRequest {
585
677
  path: string;
586
678
  environmentId: string;
679
+ org?: string;
587
680
  }
588
681
 
589
682
  export interface DeleteEnvironmentVarRequest {
590
683
  environmentId: string;
591
684
  key: string;
685
+ org?: string;
592
686
  }
593
687
 
594
688
  export interface DeleteNamedSnapshotRequest {
@@ -621,6 +715,10 @@ export interface DesktopOperationRequest {
621
715
  desktopRequest?: DesktopRequest;
622
716
  }
623
717
 
718
+ export interface EnvironmentsRequest {
719
+ org?: string;
720
+ }
721
+
624
722
  export interface EventsRequest {
625
723
  sandboxId: string;
626
724
  limit?: number;
@@ -640,6 +738,18 @@ export interface GetRequest {
640
738
  sandboxId: string;
641
739
  }
642
740
 
741
+ export interface GetAiProxyRequest {
742
+ org?: string;
743
+ xBoatOrg?: string;
744
+ }
745
+
746
+ export interface GetAiUsageRequest {
747
+ days?: number;
748
+ profile?: string;
749
+ org?: string;
750
+ xBoatOrg?: string;
751
+ }
752
+
643
753
  export interface GetCommandRequest {
644
754
  sandboxId: string;
645
755
  commandId: string;
@@ -657,6 +767,11 @@ export interface GetNamedSnapshotRequest {
657
767
  name: string;
658
768
  }
659
769
 
770
+ export interface GetSandboxAiUsageRequest {
771
+ sandboxId: string;
772
+ days?: number;
773
+ }
774
+
660
775
  export interface GetSnapshotDownloadRequest {
661
776
  snapshotId: string;
662
777
  }
@@ -788,15 +903,34 @@ export interface SetActiveOrganizationRequest {
788
903
  activeOrgUpdateRequest: ActiveOrgUpdateRequest;
789
904
  }
790
905
 
906
+ export interface SetCredentialProfileCustomApiRequest {
907
+ profile: string;
908
+ name: string;
909
+ setCustomApiRequest: SetCustomApiRequest;
910
+ }
911
+
912
+ export interface SetCredentialProfileKeyRequest {
913
+ profile: string;
914
+ credential: CredentialId;
915
+ setCredentialKeyRequest: SetCredentialKeyRequest;
916
+ }
917
+
791
918
  export interface SetEnvironmentSecretFileOperationRequest {
792
919
  environmentId: string;
793
920
  setEnvironmentSecretFileRequest: SetEnvironmentSecretFileRequest;
921
+ org?: string;
794
922
  }
795
923
 
796
924
  export interface SetEnvironmentVarOperationRequest {
797
925
  environmentId: string;
798
926
  key: string;
799
927
  setEnvironmentVarRequest: SetEnvironmentVarRequest;
928
+ org?: string;
929
+ }
930
+
931
+ export interface SetSandboxAiAccessOperationRequest {
932
+ sandboxId: string;
933
+ setSandboxAiAccessRequest: SetSandboxAiAccessRequest;
800
934
  }
801
935
 
802
936
  export interface SetTelemetryRequest {
@@ -833,6 +967,17 @@ export interface UpdateRequest {
833
967
  updateSandboxRequest: UpdateSandboxRequest;
834
968
  }
835
969
 
970
+ export interface UpdateAiProxyOperationRequest {
971
+ updateAiProxyRequest: UpdateAiProxyRequest;
972
+ org?: string;
973
+ xBoatOrg?: string;
974
+ }
975
+
976
+ export interface UpdateCredentialProfileOperationRequest {
977
+ profile: string;
978
+ updateCredentialProfileRequest: UpdateCredentialProfileRequest;
979
+ }
980
+
836
981
  export interface UpdateDataRetentionRequest {
837
982
  dataRetentionUpdateRequest: DataRetentionUpdateRequest;
838
983
  }
@@ -840,6 +985,7 @@ export interface UpdateDataRetentionRequest {
840
985
  export interface UpdateEnvironmentRequest {
841
986
  environmentId: string;
842
987
  updateSandboxEnvironmentRequest: UpdateSandboxEnvironmentRequest;
988
+ org?: string;
843
989
  }
844
990
 
845
991
  export interface UpdateSecretsRequest {
@@ -853,6 +999,7 @@ export interface UpdateWebhookRequest {
853
999
 
854
1000
  export interface UpgradeEnvironmentRequest {
855
1001
  environmentId: string;
1002
+ org?: string;
856
1003
  upgradeSandboxEnvironmentRequest?: UpgradeSandboxEnvironmentRequest;
857
1004
  }
858
1005
 
@@ -876,7 +1023,7 @@ export class BoatApi extends runtime.BaseAPI {
876
1023
  * Creates request options for addEnvironmentRepo without sending the request
877
1024
  */
878
1025
  async addEnvironmentRepoRequestOpts(input: AddEnvironmentRepoOperationRequest | runtime.FlatBody<AddEnvironmentRepoOperationRequest, 'addEnvironmentRepoRequest'>): Promise<runtime.RequestOpts> {
879
- const requestParameters = runtime.unflattenBody<AddEnvironmentRepoOperationRequest>(input, 'addEnvironmentRepoRequest', ['environmentId'], []);
1026
+ const requestParameters = runtime.unflattenBody<AddEnvironmentRepoOperationRequest>(input, 'addEnvironmentRepoRequest', ['environmentId', 'org'], []);
880
1027
  if (requestParameters['environmentId'] == null) {
881
1028
  throw new runtime.RequiredError(
882
1029
  'environmentId',
@@ -893,6 +1040,10 @@ export class BoatApi extends runtime.BaseAPI {
893
1040
 
894
1041
  const queryParameters: any = {};
895
1042
 
1043
+ if (requestParameters['org'] != null) {
1044
+ queryParameters['org'] = requestParameters['org'];
1045
+ }
1046
+
896
1047
  const headerParameters: runtime.HTTPHeaders = {};
897
1048
 
898
1049
  headerParameters['Content-Type'] = 'application/json';
@@ -1586,6 +1737,64 @@ export class BoatApi extends runtime.BaseAPI {
1586
1737
  return await response.value();
1587
1738
  }
1588
1739
 
1740
+ /**
1741
+ * Creates request options for createCredentialProfile without sending the request
1742
+ */
1743
+ async createCredentialProfileRequestOpts(input: CreateCredentialProfileOperationRequest | runtime.FlatBody<CreateCredentialProfileOperationRequest, 'createCredentialProfileRequest'>): Promise<runtime.RequestOpts> {
1744
+ const requestParameters = runtime.unflattenBody<CreateCredentialProfileOperationRequest>(input, 'createCredentialProfileRequest', [], []);
1745
+ if (requestParameters['createCredentialProfileRequest'] == null) {
1746
+ throw new runtime.RequiredError(
1747
+ 'createCredentialProfileRequest',
1748
+ 'Required parameter "createCredentialProfileRequest" was null or undefined when calling createCredentialProfile().'
1749
+ );
1750
+ }
1751
+
1752
+ const queryParameters: any = {};
1753
+
1754
+ const headerParameters: runtime.HTTPHeaders = {};
1755
+
1756
+ headerParameters['Content-Type'] = 'application/json';
1757
+
1758
+ if (this.configuration && this.configuration.accessToken) {
1759
+ const token = this.configuration.accessToken;
1760
+ const tokenString = await token("BoatBearerAuth", []);
1761
+
1762
+ if (tokenString) {
1763
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1764
+ }
1765
+ }
1766
+
1767
+ let urlPath = `/credential-profiles`;
1768
+
1769
+ return {
1770
+ path: urlPath,
1771
+ method: 'POST',
1772
+ headers: headerParameters,
1773
+ query: queryParameters,
1774
+ body: CreateCredentialProfileRequestToJSON(requestParameters['createCredentialProfileRequest']),
1775
+ };
1776
+ }
1777
+
1778
+ /**
1779
+ * 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`.
1780
+ * Create a credential profile
1781
+ */
1782
+ async createCredentialProfileRaw(requestParameters: CreateCredentialProfileOperationRequest | runtime.FlatBody<CreateCredentialProfileOperationRequest, 'createCredentialProfileRequest'>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CredentialProfileResponse>> {
1783
+ const requestOptions = await this.createCredentialProfileRequestOpts(requestParameters);
1784
+ const response = await this.request(requestOptions, initOverrides);
1785
+
1786
+ return new runtime.JSONApiResponse(response, (jsonValue) => CredentialProfileResponseFromJSON(jsonValue));
1787
+ }
1788
+
1789
+ /**
1790
+ * 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`.
1791
+ * Create a credential profile
1792
+ */
1793
+ async createCredentialProfile(requestParameters: CreateCredentialProfileOperationRequest | runtime.FlatBody<CreateCredentialProfileOperationRequest, 'createCredentialProfileRequest'>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CredentialProfileResponse> {
1794
+ const response = await this.createCredentialProfileRaw(requestParameters, initOverrides);
1795
+ return await response.value();
1796
+ }
1797
+
1589
1798
  /**
1590
1799
  * Creates request options for createDownloadUrl without sending the request
1591
1800
  */
@@ -1656,7 +1865,7 @@ export class BoatApi extends runtime.BaseAPI {
1656
1865
  * Creates request options for createEnvironment without sending the request
1657
1866
  */
1658
1867
  async createEnvironmentRequestOpts(input: CreateEnvironmentRequest | runtime.FlatBody<CreateEnvironmentRequest, 'createSandboxEnvironmentRequest'>): Promise<runtime.RequestOpts> {
1659
- const requestParameters = runtime.unflattenBody<CreateEnvironmentRequest>(input, 'createSandboxEnvironmentRequest', [], []);
1868
+ const requestParameters = runtime.unflattenBody<CreateEnvironmentRequest>(input, 'createSandboxEnvironmentRequest', ['org'], []);
1660
1869
  if (requestParameters['createSandboxEnvironmentRequest'] == null) {
1661
1870
  throw new runtime.RequiredError(
1662
1871
  'createSandboxEnvironmentRequest',
@@ -1666,6 +1875,10 @@ export class BoatApi extends runtime.BaseAPI {
1666
1875
 
1667
1876
  const queryParameters: any = {};
1668
1877
 
1878
+ if (requestParameters['org'] != null) {
1879
+ queryParameters['org'] = requestParameters['org'];
1880
+ }
1881
+
1669
1882
  const headerParameters: runtime.HTTPHeaders = {};
1670
1883
 
1671
1884
  headerParameters['Content-Type'] = 'application/json';
@@ -1947,6 +2160,187 @@ export class BoatApi extends runtime.BaseAPI {
1947
2160
  return await response.value();
1948
2161
  }
1949
2162
 
2163
+ /**
2164
+ * Creates request options for deleteCredentialProfile without sending the request
2165
+ */
2166
+ async deleteCredentialProfileRequestOpts(requestParameters: DeleteCredentialProfileRequest): Promise<runtime.RequestOpts> {
2167
+ if (requestParameters['profile'] == null) {
2168
+ throw new runtime.RequiredError(
2169
+ 'profile',
2170
+ 'Required parameter "profile" was null or undefined when calling deleteCredentialProfile().'
2171
+ );
2172
+ }
2173
+
2174
+ const queryParameters: any = {};
2175
+
2176
+ const headerParameters: runtime.HTTPHeaders = {};
2177
+
2178
+ if (this.configuration && this.configuration.accessToken) {
2179
+ const token = this.configuration.accessToken;
2180
+ const tokenString = await token("BoatBearerAuth", []);
2181
+
2182
+ if (tokenString) {
2183
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
2184
+ }
2185
+ }
2186
+
2187
+ let urlPath = `/credential-profiles/{profile}`;
2188
+ urlPath = urlPath.replace('{profile}', encodeURIComponent(String(requestParameters['profile'])));
2189
+
2190
+ return {
2191
+ path: urlPath,
2192
+ method: 'DELETE',
2193
+ headers: headerParameters,
2194
+ query: queryParameters,
2195
+ };
2196
+ }
2197
+
2198
+ /**
2199
+ * 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`.
2200
+ * Delete a credential profile
2201
+ */
2202
+ async deleteCredentialProfileRaw(requestParameters: DeleteCredentialProfileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CredentialProfileDeletedResponse>> {
2203
+ const requestOptions = await this.deleteCredentialProfileRequestOpts(requestParameters);
2204
+ const response = await this.request(requestOptions, initOverrides);
2205
+
2206
+ return new runtime.JSONApiResponse(response, (jsonValue) => CredentialProfileDeletedResponseFromJSON(jsonValue));
2207
+ }
2208
+
2209
+ /**
2210
+ * 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`.
2211
+ * Delete a credential profile
2212
+ */
2213
+ async deleteCredentialProfile(requestParameters: DeleteCredentialProfileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CredentialProfileDeletedResponse> {
2214
+ const response = await this.deleteCredentialProfileRaw(requestParameters, initOverrides);
2215
+ return await response.value();
2216
+ }
2217
+
2218
+ /**
2219
+ * Creates request options for deleteCredentialProfileCustomApi without sending the request
2220
+ */
2221
+ async deleteCredentialProfileCustomApiRequestOpts(requestParameters: DeleteCredentialProfileCustomApiRequest): Promise<runtime.RequestOpts> {
2222
+ if (requestParameters['profile'] == null) {
2223
+ throw new runtime.RequiredError(
2224
+ 'profile',
2225
+ 'Required parameter "profile" was null or undefined when calling deleteCredentialProfileCustomApi().'
2226
+ );
2227
+ }
2228
+
2229
+ if (requestParameters['name'] == null) {
2230
+ throw new runtime.RequiredError(
2231
+ 'name',
2232
+ 'Required parameter "name" was null or undefined when calling deleteCredentialProfileCustomApi().'
2233
+ );
2234
+ }
2235
+
2236
+ const queryParameters: any = {};
2237
+
2238
+ const headerParameters: runtime.HTTPHeaders = {};
2239
+
2240
+ if (this.configuration && this.configuration.accessToken) {
2241
+ const token = this.configuration.accessToken;
2242
+ const tokenString = await token("BoatBearerAuth", []);
2243
+
2244
+ if (tokenString) {
2245
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
2246
+ }
2247
+ }
2248
+
2249
+ let urlPath = `/credential-profiles/{profile}/custom-apis/{name}`;
2250
+ urlPath = urlPath.replace('{profile}', encodeURIComponent(String(requestParameters['profile'])));
2251
+ urlPath = urlPath.replace('{name}', encodeURIComponent(String(requestParameters['name'])));
2252
+
2253
+ return {
2254
+ path: urlPath,
2255
+ method: 'DELETE',
2256
+ headers: headerParameters,
2257
+ query: queryParameters,
2258
+ };
2259
+ }
2260
+
2261
+ /**
2262
+ * Removes one custom API from the profile. Needs an API key with `account.admin`.
2263
+ * Remove a custom API
2264
+ */
2265
+ async deleteCredentialProfileCustomApiRaw(requestParameters: DeleteCredentialProfileCustomApiRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CredentialProfileResponse>> {
2266
+ const requestOptions = await this.deleteCredentialProfileCustomApiRequestOpts(requestParameters);
2267
+ const response = await this.request(requestOptions, initOverrides);
2268
+
2269
+ return new runtime.JSONApiResponse(response, (jsonValue) => CredentialProfileResponseFromJSON(jsonValue));
2270
+ }
2271
+
2272
+ /**
2273
+ * Removes one custom API from the profile. Needs an API key with `account.admin`.
2274
+ * Remove a custom API
2275
+ */
2276
+ async deleteCredentialProfileCustomApi(requestParameters: DeleteCredentialProfileCustomApiRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CredentialProfileResponse> {
2277
+ const response = await this.deleteCredentialProfileCustomApiRaw(requestParameters, initOverrides);
2278
+ return await response.value();
2279
+ }
2280
+
2281
+ /**
2282
+ * Creates request options for deleteCredentialProfileKey without sending the request
2283
+ */
2284
+ async deleteCredentialProfileKeyRequestOpts(requestParameters: DeleteCredentialProfileKeyRequest): Promise<runtime.RequestOpts> {
2285
+ if (requestParameters['profile'] == null) {
2286
+ throw new runtime.RequiredError(
2287
+ 'profile',
2288
+ 'Required parameter "profile" was null or undefined when calling deleteCredentialProfileKey().'
2289
+ );
2290
+ }
2291
+
2292
+ if (requestParameters['credential'] == null) {
2293
+ throw new runtime.RequiredError(
2294
+ 'credential',
2295
+ 'Required parameter "credential" was null or undefined when calling deleteCredentialProfileKey().'
2296
+ );
2297
+ }
2298
+
2299
+ const queryParameters: any = {};
2300
+
2301
+ const headerParameters: runtime.HTTPHeaders = {};
2302
+
2303
+ if (this.configuration && this.configuration.accessToken) {
2304
+ const token = this.configuration.accessToken;
2305
+ const tokenString = await token("BoatBearerAuth", []);
2306
+
2307
+ if (tokenString) {
2308
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
2309
+ }
2310
+ }
2311
+
2312
+ let urlPath = `/credential-profiles/{profile}/keys/{credential}`;
2313
+ urlPath = urlPath.replace('{profile}', encodeURIComponent(String(requestParameters['profile'])));
2314
+ urlPath = urlPath.replace('{credential}', encodeURIComponent(String(requestParameters['credential'])));
2315
+
2316
+ return {
2317
+ path: urlPath,
2318
+ method: 'DELETE',
2319
+ headers: headerParameters,
2320
+ query: queryParameters,
2321
+ };
2322
+ }
2323
+
2324
+ /**
2325
+ * Removes one credential, an API key or a sign-in. Needs an API key with `account.admin`.
2326
+ * Remove a credential profile credential
2327
+ */
2328
+ async deleteCredentialProfileKeyRaw(requestParameters: DeleteCredentialProfileKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CredentialProfileResponse>> {
2329
+ const requestOptions = await this.deleteCredentialProfileKeyRequestOpts(requestParameters);
2330
+ const response = await this.request(requestOptions, initOverrides);
2331
+
2332
+ return new runtime.JSONApiResponse(response, (jsonValue) => CredentialProfileResponseFromJSON(jsonValue));
2333
+ }
2334
+
2335
+ /**
2336
+ * Removes one credential, an API key or a sign-in. Needs an API key with `account.admin`.
2337
+ * Remove a credential profile credential
2338
+ */
2339
+ async deleteCredentialProfileKey(requestParameters: DeleteCredentialProfileKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CredentialProfileResponse> {
2340
+ const response = await this.deleteCredentialProfileKeyRaw(requestParameters, initOverrides);
2341
+ return await response.value();
2342
+ }
2343
+
1950
2344
  /**
1951
2345
  * Creates request options for deleteEnvironment without sending the request
1952
2346
  */
@@ -1960,6 +2354,10 @@ export class BoatApi extends runtime.BaseAPI {
1960
2354
 
1961
2355
  const queryParameters: any = {};
1962
2356
 
2357
+ if (requestParameters['org'] != null) {
2358
+ queryParameters['org'] = requestParameters['org'];
2359
+ }
2360
+
1963
2361
  const headerParameters: runtime.HTTPHeaders = {};
1964
2362
 
1965
2363
  if (this.configuration && this.configuration.accessToken) {
@@ -2022,6 +2420,10 @@ export class BoatApi extends runtime.BaseAPI {
2022
2420
 
2023
2421
  const queryParameters: any = {};
2024
2422
 
2423
+ if (requestParameters['org'] != null) {
2424
+ queryParameters['org'] = requestParameters['org'];
2425
+ }
2426
+
2025
2427
  const headerParameters: runtime.HTTPHeaders = {};
2026
2428
 
2027
2429
  if (this.configuration && this.configuration.accessToken) {
@@ -2089,6 +2491,10 @@ export class BoatApi extends runtime.BaseAPI {
2089
2491
  queryParameters['path'] = requestParameters['path'];
2090
2492
  }
2091
2493
 
2494
+ if (requestParameters['org'] != null) {
2495
+ queryParameters['org'] = requestParameters['org'];
2496
+ }
2497
+
2092
2498
  const headerParameters: runtime.HTTPHeaders = {};
2093
2499
 
2094
2500
  if (this.configuration && this.configuration.accessToken) {
@@ -2151,6 +2557,10 @@ export class BoatApi extends runtime.BaseAPI {
2151
2557
 
2152
2558
  const queryParameters: any = {};
2153
2559
 
2560
+ if (requestParameters['org'] != null) {
2561
+ queryParameters['org'] = requestParameters['org'];
2562
+ }
2563
+
2154
2564
  const headerParameters: runtime.HTTPHeaders = {};
2155
2565
 
2156
2566
  if (this.configuration && this.configuration.accessToken) {
@@ -2619,11 +3029,15 @@ export class BoatApi extends runtime.BaseAPI {
2619
3029
  /**
2620
3030
  * Creates request options for environments without sending the request
2621
3031
  */
2622
- async environmentsRequestOpts(): Promise<runtime.RequestOpts> {
3032
+ async environmentsRequestOpts(requestParameters: EnvironmentsRequest): Promise<runtime.RequestOpts> {
2623
3033
  const queryParameters: any = {};
2624
3034
 
2625
- const headerParameters: runtime.HTTPHeaders = {};
2626
-
3035
+ if (requestParameters['org'] != null) {
3036
+ queryParameters['org'] = requestParameters['org'];
3037
+ }
3038
+
3039
+ const headerParameters: runtime.HTTPHeaders = {};
3040
+
2627
3041
  if (this.configuration && this.configuration.accessToken) {
2628
3042
  const token = this.configuration.accessToken;
2629
3043
  const tokenString = await token("BoatBearerAuth", []);
@@ -2647,8 +3061,8 @@ export class BoatApi extends runtime.BaseAPI {
2647
3061
  * 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.
2648
3062
  * List Sandbox environments
2649
3063
  */
2650
- async environmentsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SandboxEnvironmentListResponse>> {
2651
- const requestOptions = await this.environmentsRequestOpts();
3064
+ async environmentsRaw(requestParameters: EnvironmentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SandboxEnvironmentListResponse>> {
3065
+ const requestOptions = await this.environmentsRequestOpts(requestParameters);
2652
3066
  const response = await this.request(requestOptions, initOverrides);
2653
3067
 
2654
3068
  return new runtime.JSONApiResponse(response, (jsonValue) => SandboxEnvironmentListResponseFromJSON(jsonValue));
@@ -2658,8 +3072,8 @@ export class BoatApi extends runtime.BaseAPI {
2658
3072
  * 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.
2659
3073
  * List Sandbox environments
2660
3074
  */
2661
- async environments(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SandboxEnvironmentListResponse> {
2662
- const response = await this.environmentsRaw(initOverrides);
3075
+ async environments(requestParameters: EnvironmentsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SandboxEnvironmentListResponse> {
3076
+ const response = await this.environmentsRaw(requestParameters, initOverrides);
2663
3077
  return await response.value();
2664
3078
  }
2665
3079
 
@@ -2856,6 +3270,124 @@ export class BoatApi extends runtime.BaseAPI {
2856
3270
  return await response.value();
2857
3271
  }
2858
3272
 
3273
+ /**
3274
+ * Creates request options for getAiProxy without sending the request
3275
+ */
3276
+ async getAiProxyRequestOpts(requestParameters: GetAiProxyRequest): Promise<runtime.RequestOpts> {
3277
+ const queryParameters: any = {};
3278
+
3279
+ if (requestParameters['org'] != null) {
3280
+ queryParameters['org'] = requestParameters['org'];
3281
+ }
3282
+
3283
+ const headerParameters: runtime.HTTPHeaders = {};
3284
+
3285
+ if (requestParameters['xBoatOrg'] != null) {
3286
+ headerParameters['X-Boat-Org'] = String(requestParameters['xBoatOrg']);
3287
+ }
3288
+
3289
+ if (this.configuration && this.configuration.accessToken) {
3290
+ const token = this.configuration.accessToken;
3291
+ const tokenString = await token("BoatBearerAuth", []);
3292
+
3293
+ if (tokenString) {
3294
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
3295
+ }
3296
+ }
3297
+
3298
+ let urlPath = `/ai-proxy`;
3299
+
3300
+ return {
3301
+ path: urlPath,
3302
+ method: 'GET',
3303
+ headers: headerParameters,
3304
+ query: queryParameters,
3305
+ };
3306
+ }
3307
+
3308
+ /**
3309
+ * 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`.
3310
+ * Get AI credentials proxy
3311
+ */
3312
+ async getAiProxyRaw(requestParameters: GetAiProxyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AiProxySettings>> {
3313
+ const requestOptions = await this.getAiProxyRequestOpts(requestParameters);
3314
+ const response = await this.request(requestOptions, initOverrides);
3315
+
3316
+ return new runtime.JSONApiResponse(response, (jsonValue) => AiProxySettingsFromJSON(jsonValue));
3317
+ }
3318
+
3319
+ /**
3320
+ * 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`.
3321
+ * Get AI credentials proxy
3322
+ */
3323
+ async getAiProxy(requestParameters: GetAiProxyRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AiProxySettings> {
3324
+ const response = await this.getAiProxyRaw(requestParameters, initOverrides);
3325
+ return await response.value();
3326
+ }
3327
+
3328
+ /**
3329
+ * Creates request options for getAiUsage without sending the request
3330
+ */
3331
+ async getAiUsageRequestOpts(requestParameters: GetAiUsageRequest): Promise<runtime.RequestOpts> {
3332
+ const queryParameters: any = {};
3333
+
3334
+ if (requestParameters['days'] != null) {
3335
+ queryParameters['days'] = requestParameters['days'];
3336
+ }
3337
+
3338
+ if (requestParameters['profile'] != null) {
3339
+ queryParameters['profile'] = requestParameters['profile'];
3340
+ }
3341
+
3342
+ if (requestParameters['org'] != null) {
3343
+ queryParameters['org'] = requestParameters['org'];
3344
+ }
3345
+
3346
+ const headerParameters: runtime.HTTPHeaders = {};
3347
+
3348
+ if (requestParameters['xBoatOrg'] != null) {
3349
+ headerParameters['X-Boat-Org'] = String(requestParameters['xBoatOrg']);
3350
+ }
3351
+
3352
+ if (this.configuration && this.configuration.accessToken) {
3353
+ const token = this.configuration.accessToken;
3354
+ const tokenString = await token("BoatBearerAuth", []);
3355
+
3356
+ if (tokenString) {
3357
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
3358
+ }
3359
+ }
3360
+
3361
+ let urlPath = `/ai-usage`;
3362
+
3363
+ return {
3364
+ path: urlPath,
3365
+ method: 'GET',
3366
+ headers: headerParameters,
3367
+ query: queryParameters,
3368
+ };
3369
+ }
3370
+
3371
+ /**
3372
+ * 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`.
3373
+ * Get AI usage
3374
+ */
3375
+ async getAiUsageRaw(requestParameters: GetAiUsageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AccountAiUsageResponse>> {
3376
+ const requestOptions = await this.getAiUsageRequestOpts(requestParameters);
3377
+ const response = await this.request(requestOptions, initOverrides);
3378
+
3379
+ return new runtime.JSONApiResponse(response, (jsonValue) => AccountAiUsageResponseFromJSON(jsonValue));
3380
+ }
3381
+
3382
+ /**
3383
+ * 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`.
3384
+ * Get AI usage
3385
+ */
3386
+ async getAiUsage(requestParameters: GetAiUsageRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AccountAiUsageResponse> {
3387
+ const response = await this.getAiUsageRaw(requestParameters, initOverrides);
3388
+ return await response.value();
3389
+ }
3390
+
2859
3391
  /**
2860
3392
  * Creates request options for getCommand without sending the request
2861
3393
  */
@@ -3127,6 +3659,65 @@ export class BoatApi extends runtime.BaseAPI {
3127
3659
  return await response.value();
3128
3660
  }
3129
3661
 
3662
+ /**
3663
+ * Creates request options for getSandboxAiUsage without sending the request
3664
+ */
3665
+ async getSandboxAiUsageRequestOpts(requestParameters: GetSandboxAiUsageRequest): Promise<runtime.RequestOpts> {
3666
+ if (requestParameters['sandboxId'] == null) {
3667
+ throw new runtime.RequiredError(
3668
+ 'sandboxId',
3669
+ 'Required parameter "sandboxId" was null or undefined when calling getSandboxAiUsage().'
3670
+ );
3671
+ }
3672
+
3673
+ const queryParameters: any = {};
3674
+
3675
+ if (requestParameters['days'] != null) {
3676
+ queryParameters['days'] = requestParameters['days'];
3677
+ }
3678
+
3679
+ const headerParameters: runtime.HTTPHeaders = {};
3680
+
3681
+ if (this.configuration && this.configuration.accessToken) {
3682
+ const token = this.configuration.accessToken;
3683
+ const tokenString = await token("BoatBearerAuth", []);
3684
+
3685
+ if (tokenString) {
3686
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
3687
+ }
3688
+ }
3689
+
3690
+ let urlPath = `/sandboxes/{sandboxId}/ai-usage`;
3691
+ urlPath = urlPath.replace('{sandboxId}', encodeURIComponent(String(requestParameters['sandboxId'])));
3692
+
3693
+ return {
3694
+ path: urlPath,
3695
+ method: 'GET',
3696
+ headers: headerParameters,
3697
+ query: queryParameters,
3698
+ };
3699
+ }
3700
+
3701
+ /**
3702
+ * 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.
3703
+ * Get sandbox AI usage
3704
+ */
3705
+ async getSandboxAiUsageRaw(requestParameters: GetSandboxAiUsageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SandboxAiUsageResponse>> {
3706
+ const requestOptions = await this.getSandboxAiUsageRequestOpts(requestParameters);
3707
+ const response = await this.request(requestOptions, initOverrides);
3708
+
3709
+ return new runtime.JSONApiResponse(response, (jsonValue) => SandboxAiUsageResponseFromJSON(jsonValue));
3710
+ }
3711
+
3712
+ /**
3713
+ * 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.
3714
+ * Get sandbox AI usage
3715
+ */
3716
+ async getSandboxAiUsage(requestParameters: GetSandboxAiUsageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SandboxAiUsageResponse> {
3717
+ const response = await this.getSandboxAiUsageRaw(requestParameters, initOverrides);
3718
+ return await response.value();
3719
+ }
3720
+
3130
3721
  /**
3131
3722
  * Creates request options for getSnapshotDownload without sending the request
3132
3723
  */
@@ -3645,6 +4236,53 @@ export class BoatApi extends runtime.BaseAPI {
3645
4236
  return await response.value();
3646
4237
  }
3647
4238
 
4239
+ /**
4240
+ * Creates request options for listCredentialProfiles without sending the request
4241
+ */
4242
+ async listCredentialProfilesRequestOpts(): Promise<runtime.RequestOpts> {
4243
+ const queryParameters: any = {};
4244
+
4245
+ const headerParameters: runtime.HTTPHeaders = {};
4246
+
4247
+ if (this.configuration && this.configuration.accessToken) {
4248
+ const token = this.configuration.accessToken;
4249
+ const tokenString = await token("BoatBearerAuth", []);
4250
+
4251
+ if (tokenString) {
4252
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
4253
+ }
4254
+ }
4255
+
4256
+ let urlPath = `/credential-profiles`;
4257
+
4258
+ return {
4259
+ path: urlPath,
4260
+ method: 'GET',
4261
+ headers: headerParameters,
4262
+ query: queryParameters,
4263
+ };
4264
+ }
4265
+
4266
+ /**
4267
+ * Returns every AI credential profile you can use, yours and your organizations\'. Secret values are never returned. Needs an API key with `account.admin`.
4268
+ * List credential profiles
4269
+ */
4270
+ async listCredentialProfilesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CredentialProfileListResponse>> {
4271
+ const requestOptions = await this.listCredentialProfilesRequestOpts();
4272
+ const response = await this.request(requestOptions, initOverrides);
4273
+
4274
+ return new runtime.JSONApiResponse(response, (jsonValue) => CredentialProfileListResponseFromJSON(jsonValue));
4275
+ }
4276
+
4277
+ /**
4278
+ * Returns every AI credential profile you can use, yours and your organizations\'. Secret values are never returned. Needs an API key with `account.admin`.
4279
+ * List credential profiles
4280
+ */
4281
+ async listCredentialProfiles(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CredentialProfileListResponse> {
4282
+ const response = await this.listCredentialProfilesRaw(initOverrides);
4283
+ return await response.value();
4284
+ }
4285
+
3648
4286
  /**
3649
4287
  * Creates request options for listNamedSnapshots without sending the request
3650
4288
  */
@@ -4971,11 +5609,159 @@ export class BoatApi extends runtime.BaseAPI {
4971
5609
  return await response.value();
4972
5610
  }
4973
5611
 
5612
+ /**
5613
+ * Creates request options for setCredentialProfileCustomApi without sending the request
5614
+ */
5615
+ async setCredentialProfileCustomApiRequestOpts(input: SetCredentialProfileCustomApiRequest | runtime.FlatBody<SetCredentialProfileCustomApiRequest, 'setCustomApiRequest'>): Promise<runtime.RequestOpts> {
5616
+ const requestParameters = runtime.unflattenBody<SetCredentialProfileCustomApiRequest>(input, 'setCustomApiRequest', ['profile', 'name'], []);
5617
+ if (requestParameters['profile'] == null) {
5618
+ throw new runtime.RequiredError(
5619
+ 'profile',
5620
+ 'Required parameter "profile" was null or undefined when calling setCredentialProfileCustomApi().'
5621
+ );
5622
+ }
5623
+
5624
+ if (requestParameters['name'] == null) {
5625
+ throw new runtime.RequiredError(
5626
+ 'name',
5627
+ 'Required parameter "name" was null or undefined when calling setCredentialProfileCustomApi().'
5628
+ );
5629
+ }
5630
+
5631
+ if (requestParameters['setCustomApiRequest'] == null) {
5632
+ throw new runtime.RequiredError(
5633
+ 'setCustomApiRequest',
5634
+ 'Required parameter "setCustomApiRequest" was null or undefined when calling setCredentialProfileCustomApi().'
5635
+ );
5636
+ }
5637
+
5638
+ const queryParameters: any = {};
5639
+
5640
+ const headerParameters: runtime.HTTPHeaders = {};
5641
+
5642
+ headerParameters['Content-Type'] = 'application/json';
5643
+
5644
+ if (this.configuration && this.configuration.accessToken) {
5645
+ const token = this.configuration.accessToken;
5646
+ const tokenString = await token("BoatBearerAuth", []);
5647
+
5648
+ if (tokenString) {
5649
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
5650
+ }
5651
+ }
5652
+
5653
+ let urlPath = `/credential-profiles/{profile}/custom-apis/{name}`;
5654
+ urlPath = urlPath.replace('{profile}', encodeURIComponent(String(requestParameters['profile'])));
5655
+ urlPath = urlPath.replace('{name}', encodeURIComponent(String(requestParameters['name'])));
5656
+
5657
+ return {
5658
+ path: urlPath,
5659
+ method: 'PUT',
5660
+ headers: headerParameters,
5661
+ query: queryParameters,
5662
+ body: SetCustomApiRequestToJSON(requestParameters['setCustomApiRequest']),
5663
+ };
5664
+ }
5665
+
5666
+ /**
5667
+ * Adds or replaces one custom API. The sandbox gets `<NAME>` and `<NAME>_BASE_URL`. Needs an API key with `account.admin`.
5668
+ * Set a custom API
5669
+ */
5670
+ async setCredentialProfileCustomApiRaw(requestParameters: SetCredentialProfileCustomApiRequest | runtime.FlatBody<SetCredentialProfileCustomApiRequest, 'setCustomApiRequest'>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CredentialProfileResponse>> {
5671
+ const requestOptions = await this.setCredentialProfileCustomApiRequestOpts(requestParameters);
5672
+ const response = await this.request(requestOptions, initOverrides);
5673
+
5674
+ return new runtime.JSONApiResponse(response, (jsonValue) => CredentialProfileResponseFromJSON(jsonValue));
5675
+ }
5676
+
5677
+ /**
5678
+ * Adds or replaces one custom API. The sandbox gets `<NAME>` and `<NAME>_BASE_URL`. Needs an API key with `account.admin`.
5679
+ * Set a custom API
5680
+ */
5681
+ async setCredentialProfileCustomApi(requestParameters: SetCredentialProfileCustomApiRequest | runtime.FlatBody<SetCredentialProfileCustomApiRequest, 'setCustomApiRequest'>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CredentialProfileResponse> {
5682
+ const response = await this.setCredentialProfileCustomApiRaw(requestParameters, initOverrides);
5683
+ return await response.value();
5684
+ }
5685
+
5686
+ /**
5687
+ * Creates request options for setCredentialProfileKey without sending the request
5688
+ */
5689
+ async setCredentialProfileKeyRequestOpts(input: SetCredentialProfileKeyRequest | runtime.FlatBody<SetCredentialProfileKeyRequest, 'setCredentialKeyRequest'>): Promise<runtime.RequestOpts> {
5690
+ const requestParameters = runtime.unflattenBody<SetCredentialProfileKeyRequest>(input, 'setCredentialKeyRequest', ['profile', 'credential'], []);
5691
+ if (requestParameters['profile'] == null) {
5692
+ throw new runtime.RequiredError(
5693
+ 'profile',
5694
+ 'Required parameter "profile" was null or undefined when calling setCredentialProfileKey().'
5695
+ );
5696
+ }
5697
+
5698
+ if (requestParameters['credential'] == null) {
5699
+ throw new runtime.RequiredError(
5700
+ 'credential',
5701
+ 'Required parameter "credential" was null or undefined when calling setCredentialProfileKey().'
5702
+ );
5703
+ }
5704
+
5705
+ if (requestParameters['setCredentialKeyRequest'] == null) {
5706
+ throw new runtime.RequiredError(
5707
+ 'setCredentialKeyRequest',
5708
+ 'Required parameter "setCredentialKeyRequest" was null or undefined when calling setCredentialProfileKey().'
5709
+ );
5710
+ }
5711
+
5712
+ const queryParameters: any = {};
5713
+
5714
+ const headerParameters: runtime.HTTPHeaders = {};
5715
+
5716
+ headerParameters['Content-Type'] = 'application/json';
5717
+
5718
+ if (this.configuration && this.configuration.accessToken) {
5719
+ const token = this.configuration.accessToken;
5720
+ const tokenString = await token("BoatBearerAuth", []);
5721
+
5722
+ if (tokenString) {
5723
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
5724
+ }
5725
+ }
5726
+
5727
+ let urlPath = `/credential-profiles/{profile}/keys/{credential}`;
5728
+ urlPath = urlPath.replace('{profile}', encodeURIComponent(String(requestParameters['profile'])));
5729
+ urlPath = urlPath.replace('{credential}', encodeURIComponent(String(requestParameters['credential'])));
5730
+
5731
+ return {
5732
+ path: urlPath,
5733
+ method: 'PUT',
5734
+ headers: headerParameters,
5735
+ query: queryParameters,
5736
+ body: SetCredentialKeyRequestToJSON(requestParameters['setCredentialKeyRequest']),
5737
+ };
5738
+ }
5739
+
5740
+ /**
5741
+ * 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`.
5742
+ * Set a credential profile API key
5743
+ */
5744
+ async setCredentialProfileKeyRaw(requestParameters: SetCredentialProfileKeyRequest | runtime.FlatBody<SetCredentialProfileKeyRequest, 'setCredentialKeyRequest'>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CredentialProfileResponse>> {
5745
+ const requestOptions = await this.setCredentialProfileKeyRequestOpts(requestParameters);
5746
+ const response = await this.request(requestOptions, initOverrides);
5747
+
5748
+ return new runtime.JSONApiResponse(response, (jsonValue) => CredentialProfileResponseFromJSON(jsonValue));
5749
+ }
5750
+
5751
+ /**
5752
+ * 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`.
5753
+ * Set a credential profile API key
5754
+ */
5755
+ async setCredentialProfileKey(requestParameters: SetCredentialProfileKeyRequest | runtime.FlatBody<SetCredentialProfileKeyRequest, 'setCredentialKeyRequest'>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CredentialProfileResponse> {
5756
+ const response = await this.setCredentialProfileKeyRaw(requestParameters, initOverrides);
5757
+ return await response.value();
5758
+ }
5759
+
4974
5760
  /**
4975
5761
  * Creates request options for setEnvironmentSecretFile without sending the request
4976
5762
  */
4977
5763
  async setEnvironmentSecretFileRequestOpts(input: SetEnvironmentSecretFileOperationRequest | runtime.FlatBody<SetEnvironmentSecretFileOperationRequest, 'setEnvironmentSecretFileRequest'>): Promise<runtime.RequestOpts> {
4978
- const requestParameters = runtime.unflattenBody<SetEnvironmentSecretFileOperationRequest>(input, 'setEnvironmentSecretFileRequest', ['environmentId'], []);
5764
+ const requestParameters = runtime.unflattenBody<SetEnvironmentSecretFileOperationRequest>(input, 'setEnvironmentSecretFileRequest', ['environmentId', 'org'], []);
4979
5765
  if (requestParameters['environmentId'] == null) {
4980
5766
  throw new runtime.RequiredError(
4981
5767
  'environmentId',
@@ -4992,6 +5778,10 @@ export class BoatApi extends runtime.BaseAPI {
4992
5778
 
4993
5779
  const queryParameters: any = {};
4994
5780
 
5781
+ if (requestParameters['org'] != null) {
5782
+ queryParameters['org'] = requestParameters['org'];
5783
+ }
5784
+
4995
5785
  const headerParameters: runtime.HTTPHeaders = {};
4996
5786
 
4997
5787
  headerParameters['Content-Type'] = 'application/json';
@@ -5041,7 +5831,7 @@ export class BoatApi extends runtime.BaseAPI {
5041
5831
  * Creates request options for setEnvironmentVar without sending the request
5042
5832
  */
5043
5833
  async setEnvironmentVarRequestOpts(input: SetEnvironmentVarOperationRequest | runtime.FlatBody<SetEnvironmentVarOperationRequest, 'setEnvironmentVarRequest'>): Promise<runtime.RequestOpts> {
5044
- const requestParameters = runtime.unflattenBody<SetEnvironmentVarOperationRequest>(input, 'setEnvironmentVarRequest', ['environmentId', 'key'], []);
5834
+ const requestParameters = runtime.unflattenBody<SetEnvironmentVarOperationRequest>(input, 'setEnvironmentVarRequest', ['environmentId', 'key', 'org'], []);
5045
5835
  if (requestParameters['environmentId'] == null) {
5046
5836
  throw new runtime.RequiredError(
5047
5837
  'environmentId',
@@ -5065,6 +5855,10 @@ export class BoatApi extends runtime.BaseAPI {
5065
5855
 
5066
5856
  const queryParameters: any = {};
5067
5857
 
5858
+ if (requestParameters['org'] != null) {
5859
+ queryParameters['org'] = requestParameters['org'];
5860
+ }
5861
+
5068
5862
  const headerParameters: runtime.HTTPHeaders = {};
5069
5863
 
5070
5864
  headerParameters['Content-Type'] = 'application/json';
@@ -5111,6 +5905,72 @@ export class BoatApi extends runtime.BaseAPI {
5111
5905
  return await response.value();
5112
5906
  }
5113
5907
 
5908
+ /**
5909
+ * Creates request options for setSandboxAiAccess without sending the request
5910
+ */
5911
+ async setSandboxAiAccessRequestOpts(input: SetSandboxAiAccessOperationRequest | runtime.FlatBody<SetSandboxAiAccessOperationRequest, 'setSandboxAiAccessRequest'>): Promise<runtime.RequestOpts> {
5912
+ const requestParameters = runtime.unflattenBody<SetSandboxAiAccessOperationRequest>(input, 'setSandboxAiAccessRequest', ['sandboxId'], []);
5913
+ if (requestParameters['sandboxId'] == null) {
5914
+ throw new runtime.RequiredError(
5915
+ 'sandboxId',
5916
+ 'Required parameter "sandboxId" was null or undefined when calling setSandboxAiAccess().'
5917
+ );
5918
+ }
5919
+
5920
+ if (requestParameters['setSandboxAiAccessRequest'] == null) {
5921
+ throw new runtime.RequiredError(
5922
+ 'setSandboxAiAccessRequest',
5923
+ 'Required parameter "setSandboxAiAccessRequest" was null or undefined when calling setSandboxAiAccess().'
5924
+ );
5925
+ }
5926
+
5927
+ const queryParameters: any = {};
5928
+
5929
+ const headerParameters: runtime.HTTPHeaders = {};
5930
+
5931
+ headerParameters['Content-Type'] = 'application/json';
5932
+
5933
+ if (this.configuration && this.configuration.accessToken) {
5934
+ const token = this.configuration.accessToken;
5935
+ const tokenString = await token("BoatBearerAuth", []);
5936
+
5937
+ if (tokenString) {
5938
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
5939
+ }
5940
+ }
5941
+
5942
+ let urlPath = `/sandboxes/{sandboxId}/ai-access`;
5943
+ urlPath = urlPath.replace('{sandboxId}', encodeURIComponent(String(requestParameters['sandboxId'])));
5944
+
5945
+ return {
5946
+ path: urlPath,
5947
+ method: 'PUT',
5948
+ headers: headerParameters,
5949
+ query: queryParameters,
5950
+ body: SetSandboxAiAccessRequestToJSON(requestParameters['setSandboxAiAccessRequest']),
5951
+ };
5952
+ }
5953
+
5954
+ /**
5955
+ * 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`.
5956
+ * Block or unblock sandbox AI access
5957
+ */
5958
+ async setSandboxAiAccessRaw(requestParameters: SetSandboxAiAccessOperationRequest | runtime.FlatBody<SetSandboxAiAccessOperationRequest, 'setSandboxAiAccessRequest'>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SandboxAiAccessResponse>> {
5959
+ const requestOptions = await this.setSandboxAiAccessRequestOpts(requestParameters);
5960
+ const response = await this.request(requestOptions, initOverrides);
5961
+
5962
+ return new runtime.JSONApiResponse(response, (jsonValue) => SandboxAiAccessResponseFromJSON(jsonValue));
5963
+ }
5964
+
5965
+ /**
5966
+ * 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`.
5967
+ * Block or unblock sandbox AI access
5968
+ */
5969
+ async setSandboxAiAccess(requestParameters: SetSandboxAiAccessOperationRequest | runtime.FlatBody<SetSandboxAiAccessOperationRequest, 'setSandboxAiAccessRequest'>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SandboxAiAccessResponse> {
5970
+ const response = await this.setSandboxAiAccessRaw(requestParameters, initOverrides);
5971
+ return await response.value();
5972
+ }
5973
+
5114
5974
  /**
5115
5975
  * Creates request options for setTelemetry without sending the request
5116
5976
  */
@@ -5546,6 +6406,138 @@ export class BoatApi extends runtime.BaseAPI {
5546
6406
  return await response.value();
5547
6407
  }
5548
6408
 
6409
+ /**
6410
+ * Creates request options for updateAiProxy without sending the request
6411
+ */
6412
+ async updateAiProxyRequestOpts(input: UpdateAiProxyOperationRequest | runtime.FlatBody<UpdateAiProxyOperationRequest, 'updateAiProxyRequest'>): Promise<runtime.RequestOpts> {
6413
+ const requestParameters = runtime.unflattenBody<UpdateAiProxyOperationRequest>(input, 'updateAiProxyRequest', ['org', 'xBoatOrg'], []);
6414
+ if (requestParameters['updateAiProxyRequest'] == null) {
6415
+ throw new runtime.RequiredError(
6416
+ 'updateAiProxyRequest',
6417
+ 'Required parameter "updateAiProxyRequest" was null or undefined when calling updateAiProxy().'
6418
+ );
6419
+ }
6420
+
6421
+ const queryParameters: any = {};
6422
+
6423
+ if (requestParameters['org'] != null) {
6424
+ queryParameters['org'] = requestParameters['org'];
6425
+ }
6426
+
6427
+ const headerParameters: runtime.HTTPHeaders = {};
6428
+
6429
+ headerParameters['Content-Type'] = 'application/json';
6430
+
6431
+ if (requestParameters['xBoatOrg'] != null) {
6432
+ headerParameters['X-Boat-Org'] = String(requestParameters['xBoatOrg']);
6433
+ }
6434
+
6435
+ if (this.configuration && this.configuration.accessToken) {
6436
+ const token = this.configuration.accessToken;
6437
+ const tokenString = await token("BoatBearerAuth", []);
6438
+
6439
+ if (tokenString) {
6440
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
6441
+ }
6442
+ }
6443
+
6444
+ let urlPath = `/ai-proxy`;
6445
+
6446
+ return {
6447
+ path: urlPath,
6448
+ method: 'PUT',
6449
+ headers: headerParameters,
6450
+ query: queryParameters,
6451
+ body: UpdateAiProxyRequestToJSON(requestParameters['updateAiProxyRequest']),
6452
+ };
6453
+ }
6454
+
6455
+ /**
6456
+ * 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`.
6457
+ * Turn the AI credentials proxy on or off
6458
+ */
6459
+ async updateAiProxyRaw(requestParameters: UpdateAiProxyOperationRequest | runtime.FlatBody<UpdateAiProxyOperationRequest, 'updateAiProxyRequest'>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AiProxySettings>> {
6460
+ const requestOptions = await this.updateAiProxyRequestOpts(requestParameters);
6461
+ const response = await this.request(requestOptions, initOverrides);
6462
+
6463
+ return new runtime.JSONApiResponse(response, (jsonValue) => AiProxySettingsFromJSON(jsonValue));
6464
+ }
6465
+
6466
+ /**
6467
+ * 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`.
6468
+ * Turn the AI credentials proxy on or off
6469
+ */
6470
+ async updateAiProxy(requestParameters: UpdateAiProxyOperationRequest | runtime.FlatBody<UpdateAiProxyOperationRequest, 'updateAiProxyRequest'>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AiProxySettings> {
6471
+ const response = await this.updateAiProxyRaw(requestParameters, initOverrides);
6472
+ return await response.value();
6473
+ }
6474
+
6475
+ /**
6476
+ * Creates request options for updateCredentialProfile without sending the request
6477
+ */
6478
+ async updateCredentialProfileRequestOpts(input: UpdateCredentialProfileOperationRequest | runtime.FlatBody<UpdateCredentialProfileOperationRequest, 'updateCredentialProfileRequest'>): Promise<runtime.RequestOpts> {
6479
+ const requestParameters = runtime.unflattenBody<UpdateCredentialProfileOperationRequest>(input, 'updateCredentialProfileRequest', ['profile'], []);
6480
+ if (requestParameters['profile'] == null) {
6481
+ throw new runtime.RequiredError(
6482
+ 'profile',
6483
+ 'Required parameter "profile" was null or undefined when calling updateCredentialProfile().'
6484
+ );
6485
+ }
6486
+
6487
+ if (requestParameters['updateCredentialProfileRequest'] == null) {
6488
+ throw new runtime.RequiredError(
6489
+ 'updateCredentialProfileRequest',
6490
+ 'Required parameter "updateCredentialProfileRequest" was null or undefined when calling updateCredentialProfile().'
6491
+ );
6492
+ }
6493
+
6494
+ const queryParameters: any = {};
6495
+
6496
+ const headerParameters: runtime.HTTPHeaders = {};
6497
+
6498
+ headerParameters['Content-Type'] = 'application/json';
6499
+
6500
+ if (this.configuration && this.configuration.accessToken) {
6501
+ const token = this.configuration.accessToken;
6502
+ const tokenString = await token("BoatBearerAuth", []);
6503
+
6504
+ if (tokenString) {
6505
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
6506
+ }
6507
+ }
6508
+
6509
+ let urlPath = `/credential-profiles/{profile}`;
6510
+ urlPath = urlPath.replace('{profile}', encodeURIComponent(String(requestParameters['profile'])));
6511
+
6512
+ return {
6513
+ path: urlPath,
6514
+ method: 'PUT',
6515
+ headers: headerParameters,
6516
+ query: queryParameters,
6517
+ body: UpdateCredentialProfileRequestToJSON(requestParameters['updateCredentialProfileRequest']),
6518
+ };
6519
+ }
6520
+
6521
+ /**
6522
+ * 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`.
6523
+ * Update a credential profile
6524
+ */
6525
+ async updateCredentialProfileRaw(requestParameters: UpdateCredentialProfileOperationRequest | runtime.FlatBody<UpdateCredentialProfileOperationRequest, 'updateCredentialProfileRequest'>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CredentialProfileResponse>> {
6526
+ const requestOptions = await this.updateCredentialProfileRequestOpts(requestParameters);
6527
+ const response = await this.request(requestOptions, initOverrides);
6528
+
6529
+ return new runtime.JSONApiResponse(response, (jsonValue) => CredentialProfileResponseFromJSON(jsonValue));
6530
+ }
6531
+
6532
+ /**
6533
+ * 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`.
6534
+ * Update a credential profile
6535
+ */
6536
+ async updateCredentialProfile(requestParameters: UpdateCredentialProfileOperationRequest | runtime.FlatBody<UpdateCredentialProfileOperationRequest, 'updateCredentialProfileRequest'>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CredentialProfileResponse> {
6537
+ const response = await this.updateCredentialProfileRaw(requestParameters, initOverrides);
6538
+ return await response.value();
6539
+ }
6540
+
5549
6541
  /**
5550
6542
  * Creates request options for updateDataRetention without sending the request
5551
6543
  */
@@ -5608,7 +6600,7 @@ export class BoatApi extends runtime.BaseAPI {
5608
6600
  * Creates request options for updateEnvironment without sending the request
5609
6601
  */
5610
6602
  async updateEnvironmentRequestOpts(input: UpdateEnvironmentRequest | runtime.FlatBody<UpdateEnvironmentRequest, 'updateSandboxEnvironmentRequest'>): Promise<runtime.RequestOpts> {
5611
- const requestParameters = runtime.unflattenBody<UpdateEnvironmentRequest>(input, 'updateSandboxEnvironmentRequest', ['environmentId'], []);
6603
+ const requestParameters = runtime.unflattenBody<UpdateEnvironmentRequest>(input, 'updateSandboxEnvironmentRequest', ['environmentId', 'org'], []);
5612
6604
  if (requestParameters['environmentId'] == null) {
5613
6605
  throw new runtime.RequiredError(
5614
6606
  'environmentId',
@@ -5625,6 +6617,10 @@ export class BoatApi extends runtime.BaseAPI {
5625
6617
 
5626
6618
  const queryParameters: any = {};
5627
6619
 
6620
+ if (requestParameters['org'] != null) {
6621
+ queryParameters['org'] = requestParameters['org'];
6622
+ }
6623
+
5628
6624
  const headerParameters: runtime.HTTPHeaders = {};
5629
6625
 
5630
6626
  headerParameters['Content-Type'] = 'application/json';
@@ -5796,7 +6792,7 @@ export class BoatApi extends runtime.BaseAPI {
5796
6792
  * Creates request options for upgradeEnvironment without sending the request
5797
6793
  */
5798
6794
  async upgradeEnvironmentRequestOpts(input: UpgradeEnvironmentRequest | runtime.FlatBody<UpgradeEnvironmentRequest, 'upgradeSandboxEnvironmentRequest'>): Promise<runtime.RequestOpts> {
5799
- const requestParameters = runtime.unflattenBody<UpgradeEnvironmentRequest>(input, 'upgradeSandboxEnvironmentRequest', ['environmentId'], []);
6795
+ const requestParameters = runtime.unflattenBody<UpgradeEnvironmentRequest>(input, 'upgradeSandboxEnvironmentRequest', ['environmentId', 'org'], []);
5800
6796
  if (requestParameters['environmentId'] == null) {
5801
6797
  throw new runtime.RequiredError(
5802
6798
  'environmentId',
@@ -5806,6 +6802,10 @@ export class BoatApi extends runtime.BaseAPI {
5806
6802
 
5807
6803
  const queryParameters: any = {};
5808
6804
 
6805
+ if (requestParameters['org'] != null) {
6806
+ queryParameters['org'] = requestParameters['org'];
6807
+ }
6808
+
5809
6809
  const headerParameters: runtime.HTTPHeaders = {};
5810
6810
 
5811
6811
  headerParameters['Content-Type'] = 'application/json';