@boatdev/sdk 1.11.0 → 1.12.0

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 (175) hide show
  1. package/.openapi-generator/FILES +42 -0
  2. package/dist/apis/BoatApi.d.ts +191 -14
  3. package/dist/apis/BoatApi.js +466 -14
  4. package/dist/esm/apis/BoatApi.d.ts +191 -14
  5. package/dist/esm/apis/BoatApi.js +466 -14
  6. package/dist/esm/models/CreateSandboxRequest.d.ts +35 -1
  7. package/dist/esm/models/CreateSandboxRequest.js +17 -0
  8. package/dist/esm/models/CreateSandboxRequestFilesInner.d.ts +52 -0
  9. package/dist/esm/models/CreateSandboxRequestFilesInner.js +56 -0
  10. package/dist/esm/models/CreateSandboxResponse.d.ts +7 -0
  11. package/dist/esm/models/CreateSandboxResponse.js +3 -0
  12. package/dist/esm/models/CreateSandboxResponseAllOfHostedPortsInner.d.ts +77 -0
  13. package/dist/esm/models/CreateSandboxResponseAllOfHostedPortsInner.js +64 -0
  14. package/dist/esm/models/FileDeleteResponse.d.ts +57 -0
  15. package/dist/esm/models/FileDeleteResponse.js +59 -0
  16. package/dist/esm/models/FileEntry.d.ts +68 -0
  17. package/dist/esm/models/FileEntry.js +67 -0
  18. package/dist/esm/models/FileFindResponse.d.ts +70 -0
  19. package/dist/esm/models/FileFindResponse.js +66 -0
  20. package/dist/esm/models/FileFindResponseAllOfMatches.d.ts +44 -0
  21. package/dist/esm/models/FileFindResponseAllOfMatches.js +51 -0
  22. package/dist/esm/models/FileFolderRequest.d.ts +38 -0
  23. package/dist/esm/models/FileFolderRequest.js +45 -0
  24. package/dist/esm/models/FileInfoResponse.d.ts +95 -0
  25. package/dist/esm/models/FileInfoResponse.js +85 -0
  26. package/dist/esm/models/FileListResponse.d.ts +70 -0
  27. package/dist/esm/models/FileListResponse.js +68 -0
  28. package/dist/esm/models/FileMoveRequest.d.ts +44 -0
  29. package/dist/esm/models/FileMoveRequest.js +49 -0
  30. package/dist/esm/models/FileMoveResponse.d.ts +63 -0
  31. package/dist/esm/models/FileMoveResponse.js +63 -0
  32. package/dist/esm/models/FilePermissionsRequest.d.ts +38 -0
  33. package/dist/esm/models/FilePermissionsRequest.js +47 -0
  34. package/dist/esm/models/FileReplaceRequest.d.ts +44 -0
  35. package/dist/esm/models/FileReplaceRequest.js +51 -0
  36. package/dist/esm/models/FileReplaceResponse.d.ts +58 -0
  37. package/dist/esm/models/FileReplaceResponse.js +60 -0
  38. package/dist/esm/models/FileReplaceResponseAllOfResults.d.ts +50 -0
  39. package/dist/esm/models/FileReplaceResponseAllOfResults.js +51 -0
  40. package/dist/esm/models/FileSearchResponse.d.ts +69 -0
  41. package/dist/esm/models/FileSearchResponse.js +65 -0
  42. package/dist/esm/models/LimitsFields.d.ts +54 -16
  43. package/dist/esm/models/LimitsFields.js +16 -2
  44. package/dist/esm/models/LimitsFieldsOveragePrices.d.ts +51 -0
  45. package/dist/esm/models/LimitsFieldsOveragePrices.js +48 -0
  46. package/dist/esm/models/LimitsFieldsOveragePricesStartBracketsInner.d.ts +44 -0
  47. package/dist/esm/models/LimitsFieldsOveragePricesStartBracketsInner.js +45 -0
  48. package/dist/esm/models/LimitsFieldsPlanIncluded.d.ts +44 -0
  49. package/dist/esm/models/LimitsFieldsPlanIncluded.js +45 -0
  50. package/dist/esm/models/LimitsFieldsStartLimitsWithWallet.d.ts +44 -0
  51. package/dist/esm/models/LimitsFieldsStartLimitsWithWallet.js +45 -0
  52. package/dist/esm/models/LimitsFieldsWallet.d.ts +32 -0
  53. package/dist/esm/models/LimitsFieldsWallet.js +41 -0
  54. package/dist/esm/models/LimitsResponse.d.ts +54 -16
  55. package/dist/esm/models/LimitsResponse.js +16 -2
  56. package/dist/esm/models/NamedSnapshotAllowance.d.ts +9 -3
  57. package/dist/esm/models/NamedSnapshotAllowance.js +2 -0
  58. package/dist/esm/models/SavedSnapshotAllowance.d.ts +9 -3
  59. package/dist/esm/models/SavedSnapshotAllowance.js +2 -0
  60. package/dist/esm/models/index.d.ts +21 -0
  61. package/dist/esm/models/index.js +21 -0
  62. package/dist/models/CreateSandboxRequest.d.ts +35 -1
  63. package/dist/models/CreateSandboxRequest.js +18 -1
  64. package/dist/models/CreateSandboxRequestFilesInner.d.ts +52 -0
  65. package/dist/models/CreateSandboxRequestFilesInner.js +64 -0
  66. package/dist/models/CreateSandboxResponse.d.ts +7 -0
  67. package/dist/models/CreateSandboxResponse.js +3 -0
  68. package/dist/models/CreateSandboxResponseAllOfHostedPortsInner.d.ts +77 -0
  69. package/dist/models/CreateSandboxResponseAllOfHostedPortsInner.js +72 -0
  70. package/dist/models/FileDeleteResponse.d.ts +57 -0
  71. package/dist/models/FileDeleteResponse.js +67 -0
  72. package/dist/models/FileEntry.d.ts +68 -0
  73. package/dist/models/FileEntry.js +74 -0
  74. package/dist/models/FileFindResponse.d.ts +70 -0
  75. package/dist/models/FileFindResponse.js +74 -0
  76. package/dist/models/FileFindResponseAllOfMatches.d.ts +44 -0
  77. package/dist/models/FileFindResponseAllOfMatches.js +58 -0
  78. package/dist/models/FileFolderRequest.d.ts +38 -0
  79. package/dist/models/FileFolderRequest.js +52 -0
  80. package/dist/models/FileInfoResponse.d.ts +95 -0
  81. package/dist/models/FileInfoResponse.js +93 -0
  82. package/dist/models/FileListResponse.d.ts +70 -0
  83. package/dist/models/FileListResponse.js +76 -0
  84. package/dist/models/FileMoveRequest.d.ts +44 -0
  85. package/dist/models/FileMoveRequest.js +56 -0
  86. package/dist/models/FileMoveResponse.d.ts +63 -0
  87. package/dist/models/FileMoveResponse.js +71 -0
  88. package/dist/models/FilePermissionsRequest.d.ts +38 -0
  89. package/dist/models/FilePermissionsRequest.js +54 -0
  90. package/dist/models/FileReplaceRequest.d.ts +44 -0
  91. package/dist/models/FileReplaceRequest.js +58 -0
  92. package/dist/models/FileReplaceResponse.d.ts +58 -0
  93. package/dist/models/FileReplaceResponse.js +68 -0
  94. package/dist/models/FileReplaceResponseAllOfResults.d.ts +50 -0
  95. package/dist/models/FileReplaceResponseAllOfResults.js +58 -0
  96. package/dist/models/FileSearchResponse.d.ts +69 -0
  97. package/dist/models/FileSearchResponse.js +73 -0
  98. package/dist/models/LimitsFields.d.ts +54 -16
  99. package/dist/models/LimitsFields.js +16 -2
  100. package/dist/models/LimitsFieldsOveragePrices.d.ts +51 -0
  101. package/dist/models/LimitsFieldsOveragePrices.js +55 -0
  102. package/dist/models/LimitsFieldsOveragePricesStartBracketsInner.d.ts +44 -0
  103. package/dist/models/LimitsFieldsOveragePricesStartBracketsInner.js +52 -0
  104. package/dist/models/LimitsFieldsPlanIncluded.d.ts +44 -0
  105. package/dist/models/LimitsFieldsPlanIncluded.js +52 -0
  106. package/dist/models/LimitsFieldsStartLimitsWithWallet.d.ts +44 -0
  107. package/dist/models/LimitsFieldsStartLimitsWithWallet.js +52 -0
  108. package/dist/models/LimitsFieldsWallet.d.ts +32 -0
  109. package/dist/models/LimitsFieldsWallet.js +48 -0
  110. package/dist/models/LimitsResponse.d.ts +54 -16
  111. package/dist/models/LimitsResponse.js +16 -2
  112. package/dist/models/NamedSnapshotAllowance.d.ts +9 -3
  113. package/dist/models/NamedSnapshotAllowance.js +2 -0
  114. package/dist/models/SavedSnapshotAllowance.d.ts +9 -3
  115. package/dist/models/SavedSnapshotAllowance.js +2 -0
  116. package/dist/models/index.d.ts +21 -0
  117. package/dist/models/index.js +21 -0
  118. package/docs/BoatApi.md +744 -48
  119. package/docs/CreateSandboxRequest.md +8 -0
  120. package/docs/CreateSandboxRequestFilesInner.md +36 -0
  121. package/docs/CreateSandboxResponse.md +2 -0
  122. package/docs/CreateSandboxResponseAllOfHostedPortsInner.md +44 -0
  123. package/docs/FileDeleteResponse.md +38 -0
  124. package/docs/FileEntry.md +44 -0
  125. package/docs/FileFindResponse.md +42 -0
  126. package/docs/FileFindResponseAllOfMatches.md +36 -0
  127. package/docs/FileFolderRequest.md +34 -0
  128. package/docs/FileInfoResponse.md +50 -0
  129. package/docs/FileListResponse.md +42 -0
  130. package/docs/FileMoveRequest.md +36 -0
  131. package/docs/FileMoveResponse.md +40 -0
  132. package/docs/FilePermissionsRequest.md +34 -0
  133. package/docs/FileReplaceRequest.md +36 -0
  134. package/docs/FileReplaceResponse.md +38 -0
  135. package/docs/FileReplaceResponseAllOfResults.md +38 -0
  136. package/docs/FileSearchResponse.md +42 -0
  137. package/docs/LimitsFields.md +12 -2
  138. package/docs/LimitsFieldsOveragePrices.md +39 -0
  139. package/docs/LimitsFieldsOveragePricesStartBracketsInner.md +36 -0
  140. package/docs/LimitsFieldsPlanIncluded.md +37 -0
  141. package/docs/LimitsFieldsStartLimitsWithWallet.md +37 -0
  142. package/docs/LimitsFieldsWallet.md +33 -0
  143. package/docs/LimitsResponse.md +12 -2
  144. package/docs/NamedSnapshotAllowance.md +3 -1
  145. package/docs/SavedSnapshotAllowance.md +3 -1
  146. package/package.json +1 -1
  147. package/src/apis/BoatApi.ts +721 -14
  148. package/src/models/CreateSandboxRequest.ts +57 -1
  149. package/src/models/CreateSandboxRequestFilesInner.ts +94 -0
  150. package/src/models/CreateSandboxResponse.ts +15 -0
  151. package/src/models/CreateSandboxResponseAllOfHostedPortsInner.ts +128 -0
  152. package/src/models/FileDeleteResponse.ts +102 -0
  153. package/src/models/FileEntry.ts +120 -0
  154. package/src/models/FileFindResponse.ts +127 -0
  155. package/src/models/FileFindResponseAllOfMatches.ts +84 -0
  156. package/src/models/FileFolderRequest.ts +74 -0
  157. package/src/models/FileInfoResponse.ts +158 -0
  158. package/src/models/FileListResponse.ts +128 -0
  159. package/src/models/FileMoveRequest.ts +83 -0
  160. package/src/models/FileMoveResponse.ts +111 -0
  161. package/src/models/FilePermissionsRequest.ts +75 -0
  162. package/src/models/FileReplaceRequest.ts +84 -0
  163. package/src/models/FileReplaceResponse.ts +110 -0
  164. package/src/models/FileReplaceResponseAllOfResults.ts +91 -0
  165. package/src/models/FileSearchResponse.ts +119 -0
  166. package/src/models/LimitsFields.ts +90 -16
  167. package/src/models/LimitsFieldsOveragePrices.ts +97 -0
  168. package/src/models/LimitsFieldsOveragePricesStartBracketsInner.ts +81 -0
  169. package/src/models/LimitsFieldsPlanIncluded.ts +81 -0
  170. package/src/models/LimitsFieldsStartLimitsWithWallet.ts +81 -0
  171. package/src/models/LimitsFieldsWallet.ts +65 -0
  172. package/src/models/LimitsResponse.ts +90 -16
  173. package/src/models/NamedSnapshotAllowance.ts +11 -3
  174. package/src/models/SavedSnapshotAllowance.ts +11 -3
  175. package/src/models/index.ts +21 -0
@@ -208,11 +208,66 @@ import {
208
208
  EventsResponseFromJSON,
209
209
  EventsResponseToJSON,
210
210
  } from '../models/EventsResponse';
211
+ import {
212
+ type FileDeleteResponse,
213
+ FileDeleteResponseFromJSON,
214
+ FileDeleteResponseToJSON,
215
+ } from '../models/FileDeleteResponse';
216
+ import {
217
+ type FileFindResponse,
218
+ FileFindResponseFromJSON,
219
+ FileFindResponseToJSON,
220
+ } from '../models/FileFindResponse';
221
+ import {
222
+ type FileFolderRequest,
223
+ FileFolderRequestFromJSON,
224
+ FileFolderRequestToJSON,
225
+ } from '../models/FileFolderRequest';
226
+ import {
227
+ type FileInfoResponse,
228
+ FileInfoResponseFromJSON,
229
+ FileInfoResponseToJSON,
230
+ } from '../models/FileInfoResponse';
231
+ import {
232
+ type FileListResponse,
233
+ FileListResponseFromJSON,
234
+ FileListResponseToJSON,
235
+ } from '../models/FileListResponse';
236
+ import {
237
+ type FileMoveRequest,
238
+ FileMoveRequestFromJSON,
239
+ FileMoveRequestToJSON,
240
+ } from '../models/FileMoveRequest';
241
+ import {
242
+ type FileMoveResponse,
243
+ FileMoveResponseFromJSON,
244
+ FileMoveResponseToJSON,
245
+ } from '../models/FileMoveResponse';
246
+ import {
247
+ type FilePermissionsRequest,
248
+ FilePermissionsRequestFromJSON,
249
+ FilePermissionsRequestToJSON,
250
+ } from '../models/FilePermissionsRequest';
211
251
  import {
212
252
  type FileReadResponse,
213
253
  FileReadResponseFromJSON,
214
254
  FileReadResponseToJSON,
215
255
  } from '../models/FileReadResponse';
256
+ import {
257
+ type FileReplaceRequest,
258
+ FileReplaceRequestFromJSON,
259
+ FileReplaceRequestToJSON,
260
+ } from '../models/FileReplaceRequest';
261
+ import {
262
+ type FileReplaceResponse,
263
+ FileReplaceResponseFromJSON,
264
+ FileReplaceResponseToJSON,
265
+ } from '../models/FileReplaceResponse';
266
+ import {
267
+ type FileSearchResponse,
268
+ FileSearchResponseFromJSON,
269
+ FileSearchResponseToJSON,
270
+ } from '../models/FileSearchResponse';
216
271
  import {
217
272
  type FileUrlRequest,
218
273
  FileUrlRequestFromJSON,
@@ -682,6 +737,11 @@ export interface CreateEnvironmentRequest {
682
737
  org?: string;
683
738
  }
684
739
 
740
+ export interface CreateFolderRequest {
741
+ sandboxId: string;
742
+ fileFolderRequest: FileFolderRequest;
743
+ }
744
+
685
745
  export interface CreateScopedApiKeyOperationRequest {
686
746
  createScopedApiKeyRequest: CreateScopedApiKeyRequest;
687
747
  }
@@ -742,6 +802,12 @@ export interface DeleteEnvironmentVarRequest {
742
802
  org?: string;
743
803
  }
744
804
 
805
+ export interface DeleteFileRequest {
806
+ sandboxId: string;
807
+ path: string;
808
+ recursive?: boolean;
809
+ }
810
+
745
811
  export interface DeleteNamedSnapshotRequest {
746
812
  name: string;
747
813
  }
@@ -789,6 +855,13 @@ export interface EventsRequest {
789
855
  conversation?: string;
790
856
  }
791
857
 
858
+ export interface FindInFilesRequest {
859
+ sandboxId: string;
860
+ pattern: string;
861
+ path?: string;
862
+ regex?: boolean;
863
+ }
864
+
792
865
  export interface ForkOperationRequest {
793
866
  sandboxId: string;
794
867
  idempotencyKey?: string;
@@ -820,6 +893,11 @@ export interface GetDeletionOperationRequest {
820
893
  operationId: string;
821
894
  }
822
895
 
896
+ export interface GetFileInfoRequest {
897
+ sandboxId: string;
898
+ path: string;
899
+ }
900
+
823
901
  export interface GetLatestSandboxSnapshotRequest {
824
902
  sandboxId: string;
825
903
  }
@@ -880,6 +958,11 @@ export interface ListCredentialAccountsRequest {
880
958
  credential: CredentialId;
881
959
  }
882
960
 
961
+ export interface ListFilesRequest {
962
+ sandboxId: string;
963
+ path?: string;
964
+ }
965
+
883
966
  export interface ListSandboxSnapshotsRequest {
884
967
  sandboxId: string;
885
968
  limit?: number;
@@ -897,6 +980,11 @@ export interface ListSnapshotsRequest {
897
980
  sort?: ListSnapshotsSortEnum;
898
981
  }
899
982
 
983
+ export interface MoveFileRequest {
984
+ sandboxId: string;
985
+ fileMoveRequest: FileMoveRequest;
986
+ }
987
+
900
988
  export interface ProcessesRequest {
901
989
  sandboxId: string;
902
990
  }
@@ -921,6 +1009,11 @@ export interface RecoverRequest {
921
1009
  sandboxId: string;
922
1010
  }
923
1011
 
1012
+ export interface ReplaceInFilesRequest {
1013
+ sandboxId: string;
1014
+ fileReplaceRequest: FileReplaceRequest;
1015
+ }
1016
+
924
1017
  export interface ReposRequest {
925
1018
  sync?: boolean;
926
1019
  limit?: number;
@@ -970,6 +1063,12 @@ export interface SaveSavedSnapshotRequest {
970
1063
  savedSnapshotSaveRequest: SavedSnapshotSaveRequest;
971
1064
  }
972
1065
 
1066
+ export interface SearchFilesRequest {
1067
+ sandboxId: string;
1068
+ pattern: string;
1069
+ path?: string;
1070
+ }
1071
+
973
1072
  export interface SelectRepoRequest {
974
1073
  repoSelectionRequest: RepoSelectionRequest;
975
1074
  }
@@ -1003,6 +1102,11 @@ export interface SetEnvironmentVarOperationRequest {
1003
1102
  org?: string;
1004
1103
  }
1005
1104
 
1105
+ export interface SetFilePermissionsRequest {
1106
+ sandboxId: string;
1107
+ filePermissionsRequest: FilePermissionsRequest;
1108
+ }
1109
+
1006
1110
  export interface SetSandboxAiAccessOperationRequest {
1007
1111
  sandboxId: string;
1008
1112
  setSandboxAiAccessRequest: SetSandboxAiAccessRequest;
@@ -2087,6 +2191,72 @@ export class BoatApi extends runtime.BaseAPI {
2087
2191
  return await response.value();
2088
2192
  }
2089
2193
 
2194
+ /**
2195
+ * Creates request options for createFolder without sending the request
2196
+ */
2197
+ async createFolderRequestOpts(input: CreateFolderRequest | runtime.FlatBody<CreateFolderRequest, 'fileFolderRequest'>): Promise<runtime.RequestOpts> {
2198
+ const requestParameters = runtime.unflattenBody<CreateFolderRequest>(input, 'fileFolderRequest', ['sandboxId'], []);
2199
+ if (requestParameters['sandboxId'] == null) {
2200
+ throw new runtime.RequiredError(
2201
+ 'sandboxId',
2202
+ 'Required parameter "sandboxId" was null or undefined when calling createFolder().'
2203
+ );
2204
+ }
2205
+
2206
+ if (requestParameters['fileFolderRequest'] == null) {
2207
+ throw new runtime.RequiredError(
2208
+ 'fileFolderRequest',
2209
+ 'Required parameter "fileFolderRequest" was null or undefined when calling createFolder().'
2210
+ );
2211
+ }
2212
+
2213
+ const queryParameters: any = {};
2214
+
2215
+ const headerParameters: runtime.HTTPHeaders = {};
2216
+
2217
+ headerParameters['Content-Type'] = 'application/json';
2218
+
2219
+ if (this.configuration && this.configuration.accessToken) {
2220
+ const token = this.configuration.accessToken;
2221
+ const tokenString = await token("BoatBearerAuth", []);
2222
+
2223
+ if (tokenString) {
2224
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
2225
+ }
2226
+ }
2227
+
2228
+ let urlPath = `/sandboxes/{sandboxId}/files/folder`;
2229
+ urlPath = urlPath.replace('{sandboxId}', encodeURIComponent(String(requestParameters['sandboxId'])));
2230
+
2231
+ return {
2232
+ path: urlPath,
2233
+ method: 'POST',
2234
+ headers: headerParameters,
2235
+ query: queryParameters,
2236
+ body: FileFolderRequestToJSON(requestParameters['fileFolderRequest']),
2237
+ };
2238
+ }
2239
+
2240
+ /**
2241
+ * Missing parent directories are created. An existing directory is not an error. Needs `file.write`.
2242
+ * Create a directory in a sandbox
2243
+ */
2244
+ async createFolderRaw(requestParameters: CreateFolderRequest | runtime.FlatBody<CreateFolderRequest, 'fileFolderRequest'>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FileInfoResponse>> {
2245
+ const requestOptions = await this.createFolderRequestOpts(requestParameters);
2246
+ const response = await this.request(requestOptions, initOverrides);
2247
+
2248
+ return new runtime.JSONApiResponse(response, (jsonValue) => FileInfoResponseFromJSON(jsonValue));
2249
+ }
2250
+
2251
+ /**
2252
+ * Missing parent directories are created. An existing directory is not an error. Needs `file.write`.
2253
+ * Create a directory in a sandbox
2254
+ */
2255
+ async createFolder(requestParameters: CreateFolderRequest | runtime.FlatBody<CreateFolderRequest, 'fileFolderRequest'>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FileInfoResponse> {
2256
+ const response = await this.createFolderRaw(requestParameters, initOverrides);
2257
+ return await response.value();
2258
+ }
2259
+
2090
2260
  /**
2091
2261
  * Creates request options for createScopedApiKey without sending the request
2092
2262
  */
@@ -2126,7 +2296,7 @@ export class BoatApi extends runtime.BaseAPI {
2126
2296
  }
2127
2297
 
2128
2298
  /**
2129
- * Creates a scoped, expiring API key. Requires a dashboard/CLI session or an admin-scoped token. The secret is returned once. This dedicated path returns a typed 503 until scoped credential creation is activated.
2299
+ * Creates a scoped, expiring API key. Requires a dashboard/CLI session or an admin-scoped token. The secret is returned once. An unknown field is a 400, so a misspelled scope never creates a full-access key. environmentIds takes your own environments and the org environments you can use. This dedicated path returns a typed 503 until scoped credential creation is activated.
2130
2300
  * Create a scoped API key
2131
2301
  */
2132
2302
  async createScopedApiKeyRaw(requestParameters: CreateScopedApiKeyOperationRequest | runtime.FlatBody<CreateScopedApiKeyOperationRequest, 'createScopedApiKeyRequest'>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ApiKeySecretResponse>> {
@@ -2137,7 +2307,7 @@ export class BoatApi extends runtime.BaseAPI {
2137
2307
  }
2138
2308
 
2139
2309
  /**
2140
- * Creates a scoped, expiring API key. Requires a dashboard/CLI session or an admin-scoped token. The secret is returned once. This dedicated path returns a typed 503 until scoped credential creation is activated.
2310
+ * Creates a scoped, expiring API key. Requires a dashboard/CLI session or an admin-scoped token. The secret is returned once. An unknown field is a 400, so a misspelled scope never creates a full-access key. environmentIds takes your own environments and the org environments you can use. This dedicated path returns a typed 503 until scoped credential creation is activated.
2141
2311
  * Create a scoped API key
2142
2312
  */
2143
2313
  async createScopedApiKey(requestParameters: CreateScopedApiKeyOperationRequest | runtime.FlatBody<CreateScopedApiKeyOperationRequest, 'createScopedApiKeyRequest'>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ApiKeySecretResponse> {
@@ -2839,6 +3009,76 @@ export class BoatApi extends runtime.BaseAPI {
2839
3009
  return await response.value();
2840
3010
  }
2841
3011
 
3012
+ /**
3013
+ * Creates request options for deleteFile without sending the request
3014
+ */
3015
+ async deleteFileRequestOpts(requestParameters: DeleteFileRequest): Promise<runtime.RequestOpts> {
3016
+ if (requestParameters['sandboxId'] == null) {
3017
+ throw new runtime.RequiredError(
3018
+ 'sandboxId',
3019
+ 'Required parameter "sandboxId" was null or undefined when calling deleteFile().'
3020
+ );
3021
+ }
3022
+
3023
+ if (requestParameters['path'] == null) {
3024
+ throw new runtime.RequiredError(
3025
+ 'path',
3026
+ 'Required parameter "path" was null or undefined when calling deleteFile().'
3027
+ );
3028
+ }
3029
+
3030
+ const queryParameters: any = {};
3031
+
3032
+ if (requestParameters['path'] != null) {
3033
+ queryParameters['path'] = requestParameters['path'];
3034
+ }
3035
+
3036
+ if (requestParameters['recursive'] != null) {
3037
+ queryParameters['recursive'] = requestParameters['recursive'];
3038
+ }
3039
+
3040
+ const headerParameters: runtime.HTTPHeaders = {};
3041
+
3042
+ if (this.configuration && this.configuration.accessToken) {
3043
+ const token = this.configuration.accessToken;
3044
+ const tokenString = await token("BoatBearerAuth", []);
3045
+
3046
+ if (tokenString) {
3047
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
3048
+ }
3049
+ }
3050
+
3051
+ let urlPath = `/sandboxes/{sandboxId}/files`;
3052
+ urlPath = urlPath.replace('{sandboxId}', encodeURIComponent(String(requestParameters['sandboxId'])));
3053
+
3054
+ return {
3055
+ path: urlPath,
3056
+ method: 'DELETE',
3057
+ headers: headerParameters,
3058
+ query: queryParameters,
3059
+ };
3060
+ }
3061
+
3062
+ /**
3063
+ * A directory needs `recursive=true`. A symlink is deleted itself, never its target. /home/user and /tmp themselves cannot be deleted. Needs `file.write`.
3064
+ * Delete a file or directory in a sandbox
3065
+ */
3066
+ async deleteFileRaw(requestParameters: DeleteFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FileDeleteResponse>> {
3067
+ const requestOptions = await this.deleteFileRequestOpts(requestParameters);
3068
+ const response = await this.request(requestOptions, initOverrides);
3069
+
3070
+ return new runtime.JSONApiResponse(response, (jsonValue) => FileDeleteResponseFromJSON(jsonValue));
3071
+ }
3072
+
3073
+ /**
3074
+ * A directory needs `recursive=true`. A symlink is deleted itself, never its target. /home/user and /tmp themselves cannot be deleted. Needs `file.write`.
3075
+ * Delete a file or directory in a sandbox
3076
+ */
3077
+ async deleteFile(requestParameters: DeleteFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FileDeleteResponse> {
3078
+ const response = await this.deleteFileRaw(requestParameters, initOverrides);
3079
+ return await response.value();
3080
+ }
3081
+
2842
3082
  /**
2843
3083
  * Creates request options for deleteNamedSnapshot without sending the request
2844
3084
  * @deprecated
@@ -3445,6 +3685,80 @@ export class BoatApi extends runtime.BaseAPI {
3445
3685
  return await response.value();
3446
3686
  }
3447
3687
 
3688
+ /**
3689
+ * Creates request options for findInFiles without sending the request
3690
+ */
3691
+ async findInFilesRequestOpts(requestParameters: FindInFilesRequest): Promise<runtime.RequestOpts> {
3692
+ if (requestParameters['sandboxId'] == null) {
3693
+ throw new runtime.RequiredError(
3694
+ 'sandboxId',
3695
+ 'Required parameter "sandboxId" was null or undefined when calling findInFiles().'
3696
+ );
3697
+ }
3698
+
3699
+ if (requestParameters['pattern'] == null) {
3700
+ throw new runtime.RequiredError(
3701
+ 'pattern',
3702
+ 'Required parameter "pattern" was null or undefined when calling findInFiles().'
3703
+ );
3704
+ }
3705
+
3706
+ const queryParameters: any = {};
3707
+
3708
+ if (requestParameters['path'] != null) {
3709
+ queryParameters['path'] = requestParameters['path'];
3710
+ }
3711
+
3712
+ if (requestParameters['pattern'] != null) {
3713
+ queryParameters['pattern'] = requestParameters['pattern'];
3714
+ }
3715
+
3716
+ if (requestParameters['regex'] != null) {
3717
+ queryParameters['regex'] = requestParameters['regex'];
3718
+ }
3719
+
3720
+ const headerParameters: runtime.HTTPHeaders = {};
3721
+
3722
+ if (this.configuration && this.configuration.accessToken) {
3723
+ const token = this.configuration.accessToken;
3724
+ const tokenString = await token("BoatBearerAuth", []);
3725
+
3726
+ if (tokenString) {
3727
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
3728
+ }
3729
+ }
3730
+
3731
+ let urlPath = `/sandboxes/{sandboxId}/files/find`;
3732
+ urlPath = urlPath.replace('{sandboxId}', encodeURIComponent(String(requestParameters['sandboxId'])));
3733
+
3734
+ return {
3735
+ path: urlPath,
3736
+ method: 'GET',
3737
+ headers: headerParameters,
3738
+ query: queryParameters,
3739
+ };
3740
+ }
3741
+
3742
+ /**
3743
+ * Every line under `path` that contains `pattern`. `pattern` is plain text; with `regex=true` it is an extended regular expression. Binary files are skipped and symlinks are not followed. Needs `file.read`.
3744
+ * Find text in sandbox files
3745
+ */
3746
+ async findInFilesRaw(requestParameters: FindInFilesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FileFindResponse>> {
3747
+ const requestOptions = await this.findInFilesRequestOpts(requestParameters);
3748
+ const response = await this.request(requestOptions, initOverrides);
3749
+
3750
+ return new runtime.JSONApiResponse(response, (jsonValue) => FileFindResponseFromJSON(jsonValue));
3751
+ }
3752
+
3753
+ /**
3754
+ * Every line under `path` that contains `pattern`. `pattern` is plain text; with `regex=true` it is an extended regular expression. Binary files are skipped and symlinks are not followed. Needs `file.read`.
3755
+ * Find text in sandbox files
3756
+ */
3757
+ async findInFiles(requestParameters: FindInFilesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FileFindResponse> {
3758
+ const response = await this.findInFilesRaw(requestParameters, initOverrides);
3759
+ return await response.value();
3760
+ }
3761
+
3448
3762
  /**
3449
3763
  * Creates request options for fork without sending the request
3450
3764
  */
@@ -3844,6 +4158,72 @@ export class BoatApi extends runtime.BaseAPI {
3844
4158
  return await response.value();
3845
4159
  }
3846
4160
 
4161
+ /**
4162
+ * Creates request options for getFileInfo without sending the request
4163
+ */
4164
+ async getFileInfoRequestOpts(requestParameters: GetFileInfoRequest): Promise<runtime.RequestOpts> {
4165
+ if (requestParameters['sandboxId'] == null) {
4166
+ throw new runtime.RequiredError(
4167
+ 'sandboxId',
4168
+ 'Required parameter "sandboxId" was null or undefined when calling getFileInfo().'
4169
+ );
4170
+ }
4171
+
4172
+ if (requestParameters['path'] == null) {
4173
+ throw new runtime.RequiredError(
4174
+ 'path',
4175
+ 'Required parameter "path" was null or undefined when calling getFileInfo().'
4176
+ );
4177
+ }
4178
+
4179
+ const queryParameters: any = {};
4180
+
4181
+ if (requestParameters['path'] != null) {
4182
+ queryParameters['path'] = requestParameters['path'];
4183
+ }
4184
+
4185
+ const headerParameters: runtime.HTTPHeaders = {};
4186
+
4187
+ if (this.configuration && this.configuration.accessToken) {
4188
+ const token = this.configuration.accessToken;
4189
+ const tokenString = await token("BoatBearerAuth", []);
4190
+
4191
+ if (tokenString) {
4192
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
4193
+ }
4194
+ }
4195
+
4196
+ let urlPath = `/sandboxes/{sandboxId}/files/info`;
4197
+ urlPath = urlPath.replace('{sandboxId}', encodeURIComponent(String(requestParameters['sandboxId'])));
4198
+
4199
+ return {
4200
+ path: urlPath,
4201
+ method: 'GET',
4202
+ headers: headerParameters,
4203
+ query: queryParameters,
4204
+ };
4205
+ }
4206
+
4207
+ /**
4208
+ * Size, permission bits, type and modification time. Needs `file.read`.
4209
+ * Get file or directory details in a sandbox
4210
+ */
4211
+ async getFileInfoRaw(requestParameters: GetFileInfoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FileInfoResponse>> {
4212
+ const requestOptions = await this.getFileInfoRequestOpts(requestParameters);
4213
+ const response = await this.request(requestOptions, initOverrides);
4214
+
4215
+ return new runtime.JSONApiResponse(response, (jsonValue) => FileInfoResponseFromJSON(jsonValue));
4216
+ }
4217
+
4218
+ /**
4219
+ * Size, permission bits, type and modification time. Needs `file.read`.
4220
+ * Get file or directory details in a sandbox
4221
+ */
4222
+ async getFileInfo(requestParameters: GetFileInfoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FileInfoResponse> {
4223
+ const response = await this.getFileInfoRaw(requestParameters, initOverrides);
4224
+ return await response.value();
4225
+ }
4226
+
3847
4227
  /**
3848
4228
  * Creates request options for getLatestSandboxSnapshot without sending the request
3849
4229
  */
@@ -4566,7 +4946,7 @@ export class BoatApi extends runtime.BaseAPI {
4566
4946
  }
4567
4947
 
4568
4948
  /**
4569
- * Check remaining machine starts, compute time, credits, access readiness, and concurrent-sandbox capacity for the wallet a create would bill: the `org` / `X-Boat-Org` you pass (id or name), else the account\'s active wallet, else personal. The response carries `teamId` when an organization wallet was read.
4949
+ * Check remaining machine starts, included VM time, the wallet, overage prices, access readiness, and concurrent-sandbox capacity for the wallet a create would bill: the `org` / `X-Boat-Org` you pass (id or name), else the account\'s active wallet, else personal. The response carries `teamId` when an organization wallet was read.
4570
4950
  * Get Boat limits
4571
4951
  */
4572
4952
  async limitsRaw(requestParameters: LimitsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<LimitsResponse>> {
@@ -4577,7 +4957,7 @@ export class BoatApi extends runtime.BaseAPI {
4577
4957
  }
4578
4958
 
4579
4959
  /**
4580
- * Check remaining machine starts, compute time, credits, access readiness, and concurrent-sandbox capacity for the wallet a create would bill: the `org` / `X-Boat-Org` you pass (id or name), else the account\'s active wallet, else personal. The response carries `teamId` when an organization wallet was read.
4960
+ * Check remaining machine starts, included VM time, the wallet, overage prices, access readiness, and concurrent-sandbox capacity for the wallet a create would bill: the `org` / `X-Boat-Org` you pass (id or name), else the account\'s active wallet, else personal. The response carries `teamId` when an organization wallet was read.
4581
4961
  * Get Boat limits
4582
4962
  */
4583
4963
  async limits(requestParameters: LimitsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LimitsResponse> {
@@ -4695,6 +5075,65 @@ export class BoatApi extends runtime.BaseAPI {
4695
5075
  return await response.value();
4696
5076
  }
4697
5077
 
5078
+ /**
5079
+ * Creates request options for listFiles without sending the request
5080
+ */
5081
+ async listFilesRequestOpts(requestParameters: ListFilesRequest): Promise<runtime.RequestOpts> {
5082
+ if (requestParameters['sandboxId'] == null) {
5083
+ throw new runtime.RequiredError(
5084
+ 'sandboxId',
5085
+ 'Required parameter "sandboxId" was null or undefined when calling listFiles().'
5086
+ );
5087
+ }
5088
+
5089
+ const queryParameters: any = {};
5090
+
5091
+ if (requestParameters['path'] != null) {
5092
+ queryParameters['path'] = requestParameters['path'];
5093
+ }
5094
+
5095
+ const headerParameters: runtime.HTTPHeaders = {};
5096
+
5097
+ if (this.configuration && this.configuration.accessToken) {
5098
+ const token = this.configuration.accessToken;
5099
+ const tokenString = await token("BoatBearerAuth", []);
5100
+
5101
+ if (tokenString) {
5102
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
5103
+ }
5104
+ }
5105
+
5106
+ let urlPath = `/sandboxes/{sandboxId}/files/list`;
5107
+ urlPath = urlPath.replace('{sandboxId}', encodeURIComponent(String(requestParameters['sandboxId'])));
5108
+
5109
+ return {
5110
+ path: urlPath,
5111
+ method: 'GET',
5112
+ headers: headerParameters,
5113
+ query: queryParameters,
5114
+ };
5115
+ }
5116
+
5117
+ /**
5118
+ * One level, sorted by name. A symlink is listed as a symlink, not followed. Defaults to /home/user. Needs `file.read`.
5119
+ * List a directory in a sandbox
5120
+ */
5121
+ async listFilesRaw(requestParameters: ListFilesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FileListResponse>> {
5122
+ const requestOptions = await this.listFilesRequestOpts(requestParameters);
5123
+ const response = await this.request(requestOptions, initOverrides);
5124
+
5125
+ return new runtime.JSONApiResponse(response, (jsonValue) => FileListResponseFromJSON(jsonValue));
5126
+ }
5127
+
5128
+ /**
5129
+ * One level, sorted by name. A symlink is listed as a symlink, not followed. Defaults to /home/user. Needs `file.read`.
5130
+ * List a directory in a sandbox
5131
+ */
5132
+ async listFiles(requestParameters: ListFilesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FileListResponse> {
5133
+ const response = await this.listFilesRaw(requestParameters, initOverrides);
5134
+ return await response.value();
5135
+ }
5136
+
4698
5137
  /**
4699
5138
  * Creates request options for listNamedSnapshots without sending the request
4700
5139
  * @deprecated
@@ -5114,6 +5553,72 @@ export class BoatApi extends runtime.BaseAPI {
5114
5553
  return await response.value();
5115
5554
  }
5116
5555
 
5556
+ /**
5557
+ * Creates request options for moveFile without sending the request
5558
+ */
5559
+ async moveFileRequestOpts(input: MoveFileRequest | runtime.FlatBody<MoveFileRequest, 'fileMoveRequest'>): Promise<runtime.RequestOpts> {
5560
+ const requestParameters = runtime.unflattenBody<MoveFileRequest>(input, 'fileMoveRequest', ['sandboxId'], []);
5561
+ if (requestParameters['sandboxId'] == null) {
5562
+ throw new runtime.RequiredError(
5563
+ 'sandboxId',
5564
+ 'Required parameter "sandboxId" was null or undefined when calling moveFile().'
5565
+ );
5566
+ }
5567
+
5568
+ if (requestParameters['fileMoveRequest'] == null) {
5569
+ throw new runtime.RequiredError(
5570
+ 'fileMoveRequest',
5571
+ 'Required parameter "fileMoveRequest" was null or undefined when calling moveFile().'
5572
+ );
5573
+ }
5574
+
5575
+ const queryParameters: any = {};
5576
+
5577
+ const headerParameters: runtime.HTTPHeaders = {};
5578
+
5579
+ headerParameters['Content-Type'] = 'application/json';
5580
+
5581
+ if (this.configuration && this.configuration.accessToken) {
5582
+ const token = this.configuration.accessToken;
5583
+ const tokenString = await token("BoatBearerAuth", []);
5584
+
5585
+ if (tokenString) {
5586
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
5587
+ }
5588
+ }
5589
+
5590
+ let urlPath = `/sandboxes/{sandboxId}/files/move`;
5591
+ urlPath = urlPath.replace('{sandboxId}', encodeURIComponent(String(requestParameters['sandboxId'])));
5592
+
5593
+ return {
5594
+ path: urlPath,
5595
+ method: 'POST',
5596
+ headers: headerParameters,
5597
+ query: queryParameters,
5598
+ body: FileMoveRequestToJSON(requestParameters['fileMoveRequest']),
5599
+ };
5600
+ }
5601
+
5602
+ /**
5603
+ * Works across /home/user and /tmp. A symlink is moved itself, never its target. Needs `file.write`.
5604
+ * Move or rename a file or directory in a sandbox
5605
+ */
5606
+ async moveFileRaw(requestParameters: MoveFileRequest | runtime.FlatBody<MoveFileRequest, 'fileMoveRequest'>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FileMoveResponse>> {
5607
+ const requestOptions = await this.moveFileRequestOpts(requestParameters);
5608
+ const response = await this.request(requestOptions, initOverrides);
5609
+
5610
+ return new runtime.JSONApiResponse(response, (jsonValue) => FileMoveResponseFromJSON(jsonValue));
5611
+ }
5612
+
5613
+ /**
5614
+ * Works across /home/user and /tmp. A symlink is moved itself, never its target. Needs `file.write`.
5615
+ * Move or rename a file or directory in a sandbox
5616
+ */
5617
+ async moveFile(requestParameters: MoveFileRequest | runtime.FlatBody<MoveFileRequest, 'fileMoveRequest'>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FileMoveResponse> {
5618
+ const response = await this.moveFileRaw(requestParameters, initOverrides);
5619
+ return await response.value();
5620
+ }
5621
+
5117
5622
  /**
5118
5623
  * Creates request options for processes without sending the request
5119
5624
  */
@@ -5349,7 +5854,7 @@ export class BoatApi extends runtime.BaseAPI {
5349
5854
  }
5350
5855
 
5351
5856
  /**
5352
- * Files up to 5 MiB. For a larger file, use `POST /sandboxes/{sandboxId}/files/download-url`.
5857
+ * Files up to 5 MiB. For a larger file, use `POST /sandboxes/{sandboxId}/files/download-url`. On a sandbox that is still starting, the call waits until it is ready (up to 60 s, like a command), so it reads the sandbox\'s own disk and never the machine\'s stock one.
5353
5858
  * Read a file from a sandbox
5354
5859
  */
5355
5860
  async readFileRaw(requestParameters: ReadFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FileReadResponse>> {
@@ -5360,7 +5865,7 @@ export class BoatApi extends runtime.BaseAPI {
5360
5865
  }
5361
5866
 
5362
5867
  /**
5363
- * Files up to 5 MiB. For a larger file, use `POST /sandboxes/{sandboxId}/files/download-url`.
5868
+ * Files up to 5 MiB. For a larger file, use `POST /sandboxes/{sandboxId}/files/download-url`. On a sandbox that is still starting, the call waits until it is ready (up to 60 s, like a command), so it reads the sandbox\'s own disk and never the machine\'s stock one.
5364
5869
  * Read a file from a sandbox
5365
5870
  */
5366
5871
  async readFile(requestParameters: ReadFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FileReadResponse> {
@@ -5423,6 +5928,72 @@ export class BoatApi extends runtime.BaseAPI {
5423
5928
  return await response.value();
5424
5929
  }
5425
5930
 
5931
+ /**
5932
+ * Creates request options for replaceInFiles without sending the request
5933
+ */
5934
+ async replaceInFilesRequestOpts(input: ReplaceInFilesRequest | runtime.FlatBody<ReplaceInFilesRequest, 'fileReplaceRequest'>): Promise<runtime.RequestOpts> {
5935
+ const requestParameters = runtime.unflattenBody<ReplaceInFilesRequest>(input, 'fileReplaceRequest', ['sandboxId'], []);
5936
+ if (requestParameters['sandboxId'] == null) {
5937
+ throw new runtime.RequiredError(
5938
+ 'sandboxId',
5939
+ 'Required parameter "sandboxId" was null or undefined when calling replaceInFiles().'
5940
+ );
5941
+ }
5942
+
5943
+ if (requestParameters['fileReplaceRequest'] == null) {
5944
+ throw new runtime.RequiredError(
5945
+ 'fileReplaceRequest',
5946
+ 'Required parameter "fileReplaceRequest" was null or undefined when calling replaceInFiles().'
5947
+ );
5948
+ }
5949
+
5950
+ const queryParameters: any = {};
5951
+
5952
+ const headerParameters: runtime.HTTPHeaders = {};
5953
+
5954
+ headerParameters['Content-Type'] = 'application/json';
5955
+
5956
+ if (this.configuration && this.configuration.accessToken) {
5957
+ const token = this.configuration.accessToken;
5958
+ const tokenString = await token("BoatBearerAuth", []);
5959
+
5960
+ if (tokenString) {
5961
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
5962
+ }
5963
+ }
5964
+
5965
+ let urlPath = `/sandboxes/{sandboxId}/files/replace`;
5966
+ urlPath = urlPath.replace('{sandboxId}', encodeURIComponent(String(requestParameters['sandboxId'])));
5967
+
5968
+ return {
5969
+ path: urlPath,
5970
+ method: 'POST',
5971
+ headers: headerParameters,
5972
+ query: queryParameters,
5973
+ body: FileReplaceRequestToJSON(requestParameters['fileReplaceRequest']),
5974
+ };
5975
+ }
5976
+
5977
+ /**
5978
+ * Replaces every occurrence of `pattern` with `newValue` in each file. Needs `file.write`.
5979
+ * Replace text in sandbox files
5980
+ */
5981
+ async replaceInFilesRaw(requestParameters: ReplaceInFilesRequest | runtime.FlatBody<ReplaceInFilesRequest, 'fileReplaceRequest'>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FileReplaceResponse>> {
5982
+ const requestOptions = await this.replaceInFilesRequestOpts(requestParameters);
5983
+ const response = await this.request(requestOptions, initOverrides);
5984
+
5985
+ return new runtime.JSONApiResponse(response, (jsonValue) => FileReplaceResponseFromJSON(jsonValue));
5986
+ }
5987
+
5988
+ /**
5989
+ * Replaces every occurrence of `pattern` with `newValue` in each file. Needs `file.write`.
5990
+ * Replace text in sandbox files
5991
+ */
5992
+ async replaceInFiles(requestParameters: ReplaceInFilesRequest | runtime.FlatBody<ReplaceInFilesRequest, 'fileReplaceRequest'>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FileReplaceResponse> {
5993
+ const response = await this.replaceInFilesRaw(requestParameters, initOverrides);
5994
+ return await response.value();
5995
+ }
5996
+
5426
5997
  /**
5427
5998
  * Creates request options for repos without sending the request
5428
5999
  */
@@ -5587,7 +6158,7 @@ export class BoatApi extends runtime.BaseAPI {
5587
6158
  }
5588
6159
 
5589
6160
  /**
5590
- * Revokes the key immediately. Requires a dashboard or CLI session.
6161
+ * Revokes the key immediately. Requires a dashboard or CLI session, or an admin-scoped key. A key revokes itself or a key it could create (same or fewer actions, sandboxes and environments, no later expiry).
5591
6162
  * Revoke an API key
5592
6163
  */
5593
6164
  async revokeApiKeyRaw(requestParameters: RevokeApiKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ApiKeyRevokeResponse>> {
@@ -5598,7 +6169,7 @@ export class BoatApi extends runtime.BaseAPI {
5598
6169
  }
5599
6170
 
5600
6171
  /**
5601
- * Revokes the key immediately. Requires a dashboard or CLI session.
6172
+ * Revokes the key immediately. Requires a dashboard or CLI session, or an admin-scoped key. A key revokes itself or a key it could create (same or fewer actions, sandboxes and environments, no later expiry).
5602
6173
  * Revoke an API key
5603
6174
  */
5604
6175
  async revokeApiKey(requestParameters: RevokeApiKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ApiKeyRevokeResponse> {
@@ -5705,7 +6276,7 @@ export class BoatApi extends runtime.BaseAPI {
5705
6276
  }
5706
6277
 
5707
6278
  /**
5708
- * Replaces the raw secret without changing expiry or scope. Requires a dashboard or CLI session.
6279
+ * Replaces the raw secret without changing expiry or scope. Requires a dashboard or CLI session, or an admin-scoped key. A key rotates itself or a key it could create.
5709
6280
  * Rotate an API key
5710
6281
  */
5711
6282
  async rotateApiKeyRaw(requestParameters: RotateApiKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ApiKeySecretResponse>> {
@@ -5716,7 +6287,7 @@ export class BoatApi extends runtime.BaseAPI {
5716
6287
  }
5717
6288
 
5718
6289
  /**
5719
- * Replaces the raw secret without changing expiry or scope. Requires a dashboard or CLI session.
6290
+ * Replaces the raw secret without changing expiry or scope. Requires a dashboard or CLI session, or an admin-scoped key. A key rotates itself or a key it could create.
5720
6291
  * Rotate an API key
5721
6292
  */
5722
6293
  async rotateApiKey(requestParameters: RotateApiKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ApiKeySecretResponse> {
@@ -5973,6 +6544,76 @@ export class BoatApi extends runtime.BaseAPI {
5973
6544
  return await response.value();
5974
6545
  }
5975
6546
 
6547
+ /**
6548
+ * Creates request options for searchFiles without sending the request
6549
+ */
6550
+ async searchFilesRequestOpts(requestParameters: SearchFilesRequest): Promise<runtime.RequestOpts> {
6551
+ if (requestParameters['sandboxId'] == null) {
6552
+ throw new runtime.RequiredError(
6553
+ 'sandboxId',
6554
+ 'Required parameter "sandboxId" was null or undefined when calling searchFiles().'
6555
+ );
6556
+ }
6557
+
6558
+ if (requestParameters['pattern'] == null) {
6559
+ throw new runtime.RequiredError(
6560
+ 'pattern',
6561
+ 'Required parameter "pattern" was null or undefined when calling searchFiles().'
6562
+ );
6563
+ }
6564
+
6565
+ const queryParameters: any = {};
6566
+
6567
+ if (requestParameters['path'] != null) {
6568
+ queryParameters['path'] = requestParameters['path'];
6569
+ }
6570
+
6571
+ if (requestParameters['pattern'] != null) {
6572
+ queryParameters['pattern'] = requestParameters['pattern'];
6573
+ }
6574
+
6575
+ const headerParameters: runtime.HTTPHeaders = {};
6576
+
6577
+ if (this.configuration && this.configuration.accessToken) {
6578
+ const token = this.configuration.accessToken;
6579
+ const tokenString = await token("BoatBearerAuth", []);
6580
+
6581
+ if (tokenString) {
6582
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
6583
+ }
6584
+ }
6585
+
6586
+ let urlPath = `/sandboxes/{sandboxId}/files/search`;
6587
+ urlPath = urlPath.replace('{sandboxId}', encodeURIComponent(String(requestParameters['sandboxId'])));
6588
+
6589
+ return {
6590
+ path: urlPath,
6591
+ method: 'GET',
6592
+ headers: headerParameters,
6593
+ query: queryParameters,
6594
+ };
6595
+ }
6596
+
6597
+ /**
6598
+ * Every file and directory under `path` whose name matches the glob `pattern` (for example `*.py`). Symlinks are not followed. Needs `file.read`.
6599
+ * Search files by name in a sandbox
6600
+ */
6601
+ async searchFilesRaw(requestParameters: SearchFilesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FileSearchResponse>> {
6602
+ const requestOptions = await this.searchFilesRequestOpts(requestParameters);
6603
+ const response = await this.request(requestOptions, initOverrides);
6604
+
6605
+ return new runtime.JSONApiResponse(response, (jsonValue) => FileSearchResponseFromJSON(jsonValue));
6606
+ }
6607
+
6608
+ /**
6609
+ * Every file and directory under `path` whose name matches the glob `pattern` (for example `*.py`). Symlinks are not followed. Needs `file.read`.
6610
+ * Search files by name in a sandbox
6611
+ */
6612
+ async searchFiles(requestParameters: SearchFilesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FileSearchResponse> {
6613
+ const response = await this.searchFilesRaw(requestParameters, initOverrides);
6614
+ return await response.value();
6615
+ }
6616
+
5976
6617
  /**
5977
6618
  * Creates request options for secrets without sending the request
5978
6619
  */
@@ -6432,6 +7073,72 @@ export class BoatApi extends runtime.BaseAPI {
6432
7073
  return await response.value();
6433
7074
  }
6434
7075
 
7076
+ /**
7077
+ * Creates request options for setFilePermissions without sending the request
7078
+ */
7079
+ async setFilePermissionsRequestOpts(input: SetFilePermissionsRequest | runtime.FlatBody<SetFilePermissionsRequest, 'filePermissionsRequest'>): Promise<runtime.RequestOpts> {
7080
+ const requestParameters = runtime.unflattenBody<SetFilePermissionsRequest>(input, 'filePermissionsRequest', ['sandboxId'], []);
7081
+ if (requestParameters['sandboxId'] == null) {
7082
+ throw new runtime.RequiredError(
7083
+ 'sandboxId',
7084
+ 'Required parameter "sandboxId" was null or undefined when calling setFilePermissions().'
7085
+ );
7086
+ }
7087
+
7088
+ if (requestParameters['filePermissionsRequest'] == null) {
7089
+ throw new runtime.RequiredError(
7090
+ 'filePermissionsRequest',
7091
+ 'Required parameter "filePermissionsRequest" was null or undefined when calling setFilePermissions().'
7092
+ );
7093
+ }
7094
+
7095
+ const queryParameters: any = {};
7096
+
7097
+ const headerParameters: runtime.HTTPHeaders = {};
7098
+
7099
+ headerParameters['Content-Type'] = 'application/json';
7100
+
7101
+ if (this.configuration && this.configuration.accessToken) {
7102
+ const token = this.configuration.accessToken;
7103
+ const tokenString = await token("BoatBearerAuth", []);
7104
+
7105
+ if (tokenString) {
7106
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
7107
+ }
7108
+ }
7109
+
7110
+ let urlPath = `/sandboxes/{sandboxId}/files/permissions`;
7111
+ urlPath = urlPath.replace('{sandboxId}', encodeURIComponent(String(requestParameters['sandboxId'])));
7112
+
7113
+ return {
7114
+ path: urlPath,
7115
+ method: 'POST',
7116
+ headers: headerParameters,
7117
+ query: queryParameters,
7118
+ body: FilePermissionsRequestToJSON(requestParameters['filePermissionsRequest']),
7119
+ };
7120
+ }
7121
+
7122
+ /**
7123
+ * Sets the permission bits. Files belong to the sandbox user; the owner and group do not change. Needs `file.write`.
7124
+ * Set file permissions in a sandbox
7125
+ */
7126
+ async setFilePermissionsRaw(requestParameters: SetFilePermissionsRequest | runtime.FlatBody<SetFilePermissionsRequest, 'filePermissionsRequest'>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FileInfoResponse>> {
7127
+ const requestOptions = await this.setFilePermissionsRequestOpts(requestParameters);
7128
+ const response = await this.request(requestOptions, initOverrides);
7129
+
7130
+ return new runtime.JSONApiResponse(response, (jsonValue) => FileInfoResponseFromJSON(jsonValue));
7131
+ }
7132
+
7133
+ /**
7134
+ * Sets the permission bits. Files belong to the sandbox user; the owner and group do not change. Needs `file.write`.
7135
+ * Set file permissions in a sandbox
7136
+ */
7137
+ async setFilePermissions(requestParameters: SetFilePermissionsRequest | runtime.FlatBody<SetFilePermissionsRequest, 'filePermissionsRequest'>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FileInfoResponse> {
7138
+ const response = await this.setFilePermissionsRaw(requestParameters, initOverrides);
7139
+ return await response.value();
7140
+ }
7141
+
6435
7142
  /**
6436
7143
  * Creates request options for setSandboxAiAccess without sending the request
6437
7144
  */
@@ -7106,7 +7813,7 @@ export class BoatApi extends runtime.BaseAPI {
7106
7813
  }
7107
7814
 
7108
7815
  /**
7109
- * 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`.
7816
+ * 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 wallet of the account pays $1 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`.
7110
7817
  * Turn the AI credentials proxy on or off
7111
7818
  */
7112
7819
  async updateAiProxyRaw(requestParameters: UpdateAiProxyOperationRequest | runtime.FlatBody<UpdateAiProxyOperationRequest, 'updateAiProxyRequest'>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AiProxySettings>> {
@@ -7117,7 +7824,7 @@ export class BoatApi extends runtime.BaseAPI {
7117
7824
  }
7118
7825
 
7119
7826
  /**
7120
- * 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`.
7827
+ * 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 wallet of the account pays $1 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`.
7121
7828
  * Turn the AI credentials proxy on or off
7122
7829
  */
7123
7830
  async updateAiProxy(requestParameters: UpdateAiProxyOperationRequest | runtime.FlatBody<UpdateAiProxyOperationRequest, 'updateAiProxyRequest'>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AiProxySettings> {
@@ -7680,7 +8387,7 @@ export class BoatApi extends runtime.BaseAPI {
7680
8387
  }
7681
8388
 
7682
8389
  /**
7683
- * Files up to 5 MiB after decoding. For a larger file, use `POST /sandboxes/{sandboxId}/files/upload-url`.
8390
+ * Files up to 5 MiB after decoding. For a larger file, use `POST /sandboxes/{sandboxId}/files/upload-url`. On a sandbox that is still starting, the call waits until it is ready (up to 60 s, like a command): a sandbox\'s files are in place only once it is ready, so a write any earlier would not stay. A `200` always means the file is on the sandbox\'s disk.
7684
8391
  * Write a file in a sandbox
7685
8392
  */
7686
8393
  async writeFileRaw(requestParameters: WriteFileRequest | runtime.FlatBody<WriteFileRequest, 'fileWriteRequest'>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FileWriteResponse>> {
@@ -7691,7 +8398,7 @@ export class BoatApi extends runtime.BaseAPI {
7691
8398
  }
7692
8399
 
7693
8400
  /**
7694
- * Files up to 5 MiB after decoding. For a larger file, use `POST /sandboxes/{sandboxId}/files/upload-url`.
8401
+ * Files up to 5 MiB after decoding. For a larger file, use `POST /sandboxes/{sandboxId}/files/upload-url`. On a sandbox that is still starting, the call waits until it is ready (up to 60 s, like a command): a sandbox\'s files are in place only once it is ready, so a write any earlier would not stay. A `200` always means the file is on the sandbox\'s disk.
7695
8402
  * Write a file in a sandbox
7696
8403
  */
7697
8404
  async writeFile(requestParameters: WriteFileRequest | runtime.FlatBody<WriteFileRequest, 'fileWriteRequest'>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FileWriteResponse> {