@boatdev/sdk 1.8.0 → 1.9.1

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 (50) hide show
  1. package/.openapi-generator/FILES +8 -0
  2. package/dist/apis/BoatApi.d.ts +55 -0
  3. package/dist/apis/BoatApi.js +133 -0
  4. package/dist/esm/apis/BoatApi.d.ts +55 -0
  5. package/dist/esm/apis/BoatApi.js +133 -0
  6. package/dist/esm/models/CreateSandboxRequest.d.ts +1 -1
  7. package/dist/esm/models/CreateScopedApiKey503Response.d.ts +2 -9
  8. package/dist/esm/models/CreateScopedApiKey503Response.js +0 -6
  9. package/dist/esm/models/NamedSnapshotShare.d.ts +76 -0
  10. package/dist/esm/models/NamedSnapshotShare.js +74 -0
  11. package/dist/esm/models/NamedSnapshotShareCreatedResponse.d.ts +64 -0
  12. package/dist/esm/models/NamedSnapshotShareCreatedResponse.js +66 -0
  13. package/dist/esm/models/NamedSnapshotShareListResponse.d.ts +58 -0
  14. package/dist/esm/models/NamedSnapshotShareListResponse.js +62 -0
  15. package/dist/esm/models/NamedSnapshotShareRevokedResponse.d.ts +58 -0
  16. package/dist/esm/models/NamedSnapshotShareRevokedResponse.js +62 -0
  17. package/dist/esm/models/SandboxEnvironmentListResponse.d.ts +2 -9
  18. package/dist/esm/models/SandboxEnvironmentListResponse.js +0 -6
  19. package/dist/esm/models/index.d.ts +4 -0
  20. package/dist/esm/models/index.js +4 -0
  21. package/dist/models/CreateSandboxRequest.d.ts +1 -1
  22. package/dist/models/CreateScopedApiKey503Response.d.ts +2 -9
  23. package/dist/models/CreateScopedApiKey503Response.js +1 -7
  24. package/dist/models/NamedSnapshotShare.d.ts +76 -0
  25. package/dist/models/NamedSnapshotShare.js +82 -0
  26. package/dist/models/NamedSnapshotShareCreatedResponse.d.ts +64 -0
  27. package/dist/models/NamedSnapshotShareCreatedResponse.js +74 -0
  28. package/dist/models/NamedSnapshotShareListResponse.d.ts +58 -0
  29. package/dist/models/NamedSnapshotShareListResponse.js +70 -0
  30. package/dist/models/NamedSnapshotShareRevokedResponse.d.ts +58 -0
  31. package/dist/models/NamedSnapshotShareRevokedResponse.js +70 -0
  32. package/dist/models/SandboxEnvironmentListResponse.d.ts +2 -9
  33. package/dist/models/SandboxEnvironmentListResponse.js +1 -7
  34. package/dist/models/index.d.ts +4 -0
  35. package/dist/models/index.js +4 -0
  36. package/docs/BoatApi.md +225 -0
  37. package/docs/NamedSnapshotShare.md +45 -0
  38. package/docs/NamedSnapshotShareCreatedResponse.md +40 -0
  39. package/docs/NamedSnapshotShareListResponse.md +38 -0
  40. package/docs/NamedSnapshotShareRevokedResponse.md +38 -0
  41. package/package.json +1 -1
  42. package/src/apis/BoatApi.ts +201 -0
  43. package/src/models/CreateSandboxRequest.ts +1 -1
  44. package/src/models/CreateScopedApiKey503Response.ts +2 -10
  45. package/src/models/NamedSnapshotShare.ts +131 -0
  46. package/src/models/NamedSnapshotShareCreatedResponse.ts +120 -0
  47. package/src/models/NamedSnapshotShareListResponse.ts +111 -0
  48. package/src/models/NamedSnapshotShareRevokedResponse.ts +111 -0
  49. package/src/models/SandboxEnvironmentListResponse.ts +2 -10
  50. package/src/models/index.ts +4 -0
@@ -68,6 +68,10 @@ docs/NamedSnapshotInfoResponse.md
68
68
  docs/NamedSnapshotListResponse.md
69
69
  docs/NamedSnapshotSaveRequest.md
70
70
  docs/NamedSnapshotSavingResponse.md
71
+ docs/NamedSnapshotShare.md
72
+ docs/NamedSnapshotShareCreatedResponse.md
73
+ docs/NamedSnapshotShareListResponse.md
74
+ docs/NamedSnapshotShareRevokedResponse.md
71
75
  docs/Org.md
72
76
  docs/OrgListResponse.md
73
77
  docs/PageInfo.md
@@ -212,6 +216,10 @@ src/models/NamedSnapshotInfoResponse.ts
212
216
  src/models/NamedSnapshotListResponse.ts
213
217
  src/models/NamedSnapshotSaveRequest.ts
214
218
  src/models/NamedSnapshotSavingResponse.ts
219
+ src/models/NamedSnapshotShare.ts
220
+ src/models/NamedSnapshotShareCreatedResponse.ts
221
+ src/models/NamedSnapshotShareListResponse.ts
222
+ src/models/NamedSnapshotShareRevokedResponse.ts
215
223
  src/models/Org.ts
216
224
  src/models/OrgListResponse.ts
217
225
  src/models/PageInfo.ts
@@ -46,6 +46,9 @@ import { type NamedSnapshotInfoResponse } from '../models/NamedSnapshotInfoRespo
46
46
  import { type NamedSnapshotListResponse } from '../models/NamedSnapshotListResponse';
47
47
  import { type NamedSnapshotSaveRequest } from '../models/NamedSnapshotSaveRequest';
48
48
  import { type NamedSnapshotSavingResponse } from '../models/NamedSnapshotSavingResponse';
49
+ import { type NamedSnapshotShareCreatedResponse } from '../models/NamedSnapshotShareCreatedResponse';
50
+ import { type NamedSnapshotShareListResponse } from '../models/NamedSnapshotShareListResponse';
51
+ import { type NamedSnapshotShareRevokedResponse } from '../models/NamedSnapshotShareRevokedResponse';
49
52
  import { type OrgListResponse } from '../models/OrgListResponse';
50
53
  import { type PromptRequest } from '../models/PromptRequest';
51
54
  import { type PromptResponse } from '../models/PromptResponse';
@@ -121,6 +124,9 @@ export interface CreateEnvironmentRequest {
121
124
  export interface CreateScopedApiKeyOperationRequest {
122
125
  createScopedApiKeyRequest: CreateScopedApiKeyRequest;
123
126
  }
127
+ export interface CreateSnapshotShareRequest {
128
+ name: string;
129
+ }
124
130
  export interface CreateWebhookRequest {
125
131
  webhookCreateRequest: WebhookCreateRequest;
126
132
  }
@@ -224,6 +230,9 @@ export interface ListSandboxSnapshotsRequest {
224
230
  cursor?: string | null;
225
231
  sort?: ListSandboxSnapshotsSortEnum;
226
232
  }
233
+ export interface ListSnapshotSharesRequest {
234
+ name: string;
235
+ }
227
236
  export interface ListSnapshotsRequest {
228
237
  limit?: number;
229
238
  cursor?: string | null;
@@ -260,6 +269,10 @@ export interface ResumeOperationRequest {
260
269
  export interface RevokeApiKeyRequest {
261
270
  apiKeyId: string;
262
271
  }
272
+ export interface RevokeSnapshotShareRequest {
273
+ name: string;
274
+ shareId: string;
275
+ }
263
276
  export interface RotateApiKeyRequest {
264
277
  apiKeyId: string;
265
278
  }
@@ -481,6 +494,20 @@ export declare class BoatApi extends runtime.BaseAPI {
481
494
  * Create a scoped API key
482
495
  */
483
496
  createScopedApiKey(requestParameters: CreateScopedApiKeyOperationRequest | runtime.FlatBody<CreateScopedApiKeyOperationRequest, 'createScopedApiKeyRequest'>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ApiKeySecretResponse>;
497
+ /**
498
+ * Creates request options for createSnapshotShare without sending the request
499
+ */
500
+ createSnapshotShareRequestOpts(requestParameters: CreateSnapshotShareRequest): Promise<runtime.RequestOpts>;
501
+ /**
502
+ * Make a secret code that lets any Boat account create a sandbox from this named snapshot (`boat snapshot share <name>` in the CLI). The response shows the code once; Boat stores only a hash. Re-saving the name changes what the code deploys. Removing the name removes its codes. Everything on the disk is shared, so do not keep secrets in files on it. Needs `snapshot.write`.
503
+ * Share a named snapshot
504
+ */
505
+ createSnapshotShareRaw(requestParameters: CreateSnapshotShareRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<NamedSnapshotShareCreatedResponse>>;
506
+ /**
507
+ * Make a secret code that lets any Boat account create a sandbox from this named snapshot (`boat snapshot share <name>` in the CLI). The response shows the code once; Boat stores only a hash. Re-saving the name changes what the code deploys. Removing the name removes its codes. Everything on the disk is shared, so do not keep secrets in files on it. Needs `snapshot.write`.
508
+ * Share a named snapshot
509
+ */
510
+ createSnapshotShare(requestParameters: CreateSnapshotShareRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<NamedSnapshotShareCreatedResponse>;
484
511
  /**
485
512
  * Creates request options for createWebhook without sending the request
486
513
  */
@@ -899,6 +926,20 @@ export declare class BoatApi extends runtime.BaseAPI {
899
926
  * List boat snapshots
900
927
  */
901
928
  listSandboxSnapshots(requestParameters: ListSandboxSnapshotsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SnapshotListResponse>;
929
+ /**
930
+ * Creates request options for listSnapshotShares without sending the request
931
+ */
932
+ listSnapshotSharesRequestOpts(requestParameters: ListSnapshotSharesRequest): Promise<runtime.RequestOpts>;
933
+ /**
934
+ * List the share codes of a named snapshot, active and revoked (`boat snapshot shares <name>` in the CLI). The full codes are not returned. Needs `snapshot.read`.
935
+ * List share codes of a named snapshot
936
+ */
937
+ listSnapshotSharesRaw(requestParameters: ListSnapshotSharesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<NamedSnapshotShareListResponse>>;
938
+ /**
939
+ * List the share codes of a named snapshot, active and revoked (`boat snapshot shares <name>` in the CLI). The full codes are not returned. Needs `snapshot.read`.
940
+ * List share codes of a named snapshot
941
+ */
942
+ listSnapshotShares(requestParameters: ListSnapshotSharesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<NamedSnapshotShareListResponse>;
902
943
  /**
903
944
  * Creates request options for listSnapshots without sending the request
904
945
  */
@@ -1037,6 +1078,20 @@ export declare class BoatApi extends runtime.BaseAPI {
1037
1078
  * Revoke an API key
1038
1079
  */
1039
1080
  revokeApiKey(requestParameters: RevokeApiKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ApiKeyRevokeResponse>;
1081
+ /**
1082
+ * Creates request options for revokeSnapshotShare without sending the request
1083
+ */
1084
+ revokeSnapshotShareRequestOpts(requestParameters: RevokeSnapshotShareRequest): Promise<runtime.RequestOpts>;
1085
+ /**
1086
+ * Revoke a share code (`boat snapshot unshare <name> <share-id>` in the CLI). The code stops creating new sandboxes. Sandboxes already created from it keep their own copy. Needs `snapshot.write`.
1087
+ * Revoke a share code
1088
+ */
1089
+ revokeSnapshotShareRaw(requestParameters: RevokeSnapshotShareRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<NamedSnapshotShareRevokedResponse>>;
1090
+ /**
1091
+ * Revoke a share code (`boat snapshot unshare <name> <share-id>` in the CLI). The code stops creating new sandboxes. Sandboxes already created from it keep their own copy. Needs `snapshot.write`.
1092
+ * Revoke a share code
1093
+ */
1094
+ revokeSnapshotShare(requestParameters: RevokeSnapshotShareRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<NamedSnapshotShareRevokedResponse>;
1040
1095
  /**
1041
1096
  * Creates request options for rotateApiKey without sending the request
1042
1097
  */
@@ -84,6 +84,9 @@ const NamedSnapshotInfoResponse_1 = require("../models/NamedSnapshotInfoResponse
84
84
  const NamedSnapshotListResponse_1 = require("../models/NamedSnapshotListResponse");
85
85
  const NamedSnapshotSaveRequest_1 = require("../models/NamedSnapshotSaveRequest");
86
86
  const NamedSnapshotSavingResponse_1 = require("../models/NamedSnapshotSavingResponse");
87
+ const NamedSnapshotShareCreatedResponse_1 = require("../models/NamedSnapshotShareCreatedResponse");
88
+ const NamedSnapshotShareListResponse_1 = require("../models/NamedSnapshotShareListResponse");
89
+ const NamedSnapshotShareRevokedResponse_1 = require("../models/NamedSnapshotShareRevokedResponse");
87
90
  const OrgListResponse_1 = require("../models/OrgListResponse");
88
91
  const PromptRequest_1 = require("../models/PromptRequest");
89
92
  const PromptResponse_1 = require("../models/PromptResponse");
@@ -579,6 +582,48 @@ class BoatApi extends runtime.BaseAPI {
579
582
  const response = await this.createScopedApiKeyRaw(requestParameters, initOverrides);
580
583
  return await response.value();
581
584
  }
585
+ /**
586
+ * Creates request options for createSnapshotShare without sending the request
587
+ */
588
+ async createSnapshotShareRequestOpts(requestParameters) {
589
+ if (requestParameters['name'] == null) {
590
+ throw new runtime.RequiredError('name', 'Required parameter "name" was null or undefined when calling createSnapshotShare().');
591
+ }
592
+ const queryParameters = {};
593
+ const headerParameters = {};
594
+ if (this.configuration && this.configuration.accessToken) {
595
+ const token = this.configuration.accessToken;
596
+ const tokenString = await token("BoatBearerAuth", []);
597
+ if (tokenString) {
598
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
599
+ }
600
+ }
601
+ let urlPath = `/named-snapshots/{name}/shares`;
602
+ urlPath = urlPath.replace('{name}', encodeURIComponent(String(requestParameters['name'])));
603
+ return {
604
+ path: urlPath,
605
+ method: 'POST',
606
+ headers: headerParameters,
607
+ query: queryParameters,
608
+ };
609
+ }
610
+ /**
611
+ * Make a secret code that lets any Boat account create a sandbox from this named snapshot (`boat snapshot share <name>` in the CLI). The response shows the code once; Boat stores only a hash. Re-saving the name changes what the code deploys. Removing the name removes its codes. Everything on the disk is shared, so do not keep secrets in files on it. Needs `snapshot.write`.
612
+ * Share a named snapshot
613
+ */
614
+ async createSnapshotShareRaw(requestParameters, initOverrides) {
615
+ const requestOptions = await this.createSnapshotShareRequestOpts(requestParameters);
616
+ const response = await this.request(requestOptions, initOverrides);
617
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, NamedSnapshotShareCreatedResponse_1.NamedSnapshotShareCreatedResponseFromJSON)(jsonValue));
618
+ }
619
+ /**
620
+ * Make a secret code that lets any Boat account create a sandbox from this named snapshot (`boat snapshot share <name>` in the CLI). The response shows the code once; Boat stores only a hash. Re-saving the name changes what the code deploys. Removing the name removes its codes. Everything on the disk is shared, so do not keep secrets in files on it. Needs `snapshot.write`.
621
+ * Share a named snapshot
622
+ */
623
+ async createSnapshotShare(requestParameters, initOverrides) {
624
+ const response = await this.createSnapshotShareRaw(requestParameters, initOverrides);
625
+ return await response.value();
626
+ }
582
627
  /**
583
628
  * Creates request options for createWebhook without sending the request
584
629
  */
@@ -1915,6 +1960,48 @@ class BoatApi extends runtime.BaseAPI {
1915
1960
  const response = await this.listSandboxSnapshotsRaw(requestParameters, initOverrides);
1916
1961
  return await response.value();
1917
1962
  }
1963
+ /**
1964
+ * Creates request options for listSnapshotShares without sending the request
1965
+ */
1966
+ async listSnapshotSharesRequestOpts(requestParameters) {
1967
+ if (requestParameters['name'] == null) {
1968
+ throw new runtime.RequiredError('name', 'Required parameter "name" was null or undefined when calling listSnapshotShares().');
1969
+ }
1970
+ const queryParameters = {};
1971
+ const headerParameters = {};
1972
+ if (this.configuration && this.configuration.accessToken) {
1973
+ const token = this.configuration.accessToken;
1974
+ const tokenString = await token("BoatBearerAuth", []);
1975
+ if (tokenString) {
1976
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1977
+ }
1978
+ }
1979
+ let urlPath = `/named-snapshots/{name}/shares`;
1980
+ urlPath = urlPath.replace('{name}', encodeURIComponent(String(requestParameters['name'])));
1981
+ return {
1982
+ path: urlPath,
1983
+ method: 'GET',
1984
+ headers: headerParameters,
1985
+ query: queryParameters,
1986
+ };
1987
+ }
1988
+ /**
1989
+ * List the share codes of a named snapshot, active and revoked (`boat snapshot shares <name>` in the CLI). The full codes are not returned. Needs `snapshot.read`.
1990
+ * List share codes of a named snapshot
1991
+ */
1992
+ async listSnapshotSharesRaw(requestParameters, initOverrides) {
1993
+ const requestOptions = await this.listSnapshotSharesRequestOpts(requestParameters);
1994
+ const response = await this.request(requestOptions, initOverrides);
1995
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, NamedSnapshotShareListResponse_1.NamedSnapshotShareListResponseFromJSON)(jsonValue));
1996
+ }
1997
+ /**
1998
+ * List the share codes of a named snapshot, active and revoked (`boat snapshot shares <name>` in the CLI). The full codes are not returned. Needs `snapshot.read`.
1999
+ * List share codes of a named snapshot
2000
+ */
2001
+ async listSnapshotShares(requestParameters, initOverrides) {
2002
+ const response = await this.listSnapshotSharesRaw(requestParameters, initOverrides);
2003
+ return await response.value();
2004
+ }
1918
2005
  /**
1919
2006
  * Creates request options for listSnapshots without sending the request
1920
2007
  */
@@ -2366,6 +2453,52 @@ class BoatApi extends runtime.BaseAPI {
2366
2453
  const response = await this.revokeApiKeyRaw(requestParameters, initOverrides);
2367
2454
  return await response.value();
2368
2455
  }
2456
+ /**
2457
+ * Creates request options for revokeSnapshotShare without sending the request
2458
+ */
2459
+ async revokeSnapshotShareRequestOpts(requestParameters) {
2460
+ if (requestParameters['name'] == null) {
2461
+ throw new runtime.RequiredError('name', 'Required parameter "name" was null or undefined when calling revokeSnapshotShare().');
2462
+ }
2463
+ if (requestParameters['shareId'] == null) {
2464
+ throw new runtime.RequiredError('shareId', 'Required parameter "shareId" was null or undefined when calling revokeSnapshotShare().');
2465
+ }
2466
+ const queryParameters = {};
2467
+ const headerParameters = {};
2468
+ if (this.configuration && this.configuration.accessToken) {
2469
+ const token = this.configuration.accessToken;
2470
+ const tokenString = await token("BoatBearerAuth", []);
2471
+ if (tokenString) {
2472
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
2473
+ }
2474
+ }
2475
+ let urlPath = `/named-snapshots/{name}/shares/{shareId}`;
2476
+ urlPath = urlPath.replace('{name}', encodeURIComponent(String(requestParameters['name'])));
2477
+ urlPath = urlPath.replace('{shareId}', encodeURIComponent(String(requestParameters['shareId'])));
2478
+ return {
2479
+ path: urlPath,
2480
+ method: 'DELETE',
2481
+ headers: headerParameters,
2482
+ query: queryParameters,
2483
+ };
2484
+ }
2485
+ /**
2486
+ * Revoke a share code (`boat snapshot unshare <name> <share-id>` in the CLI). The code stops creating new sandboxes. Sandboxes already created from it keep their own copy. Needs `snapshot.write`.
2487
+ * Revoke a share code
2488
+ */
2489
+ async revokeSnapshotShareRaw(requestParameters, initOverrides) {
2490
+ const requestOptions = await this.revokeSnapshotShareRequestOpts(requestParameters);
2491
+ const response = await this.request(requestOptions, initOverrides);
2492
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, NamedSnapshotShareRevokedResponse_1.NamedSnapshotShareRevokedResponseFromJSON)(jsonValue));
2493
+ }
2494
+ /**
2495
+ * Revoke a share code (`boat snapshot unshare <name> <share-id>` in the CLI). The code stops creating new sandboxes. Sandboxes already created from it keep their own copy. Needs `snapshot.write`.
2496
+ * Revoke a share code
2497
+ */
2498
+ async revokeSnapshotShare(requestParameters, initOverrides) {
2499
+ const response = await this.revokeSnapshotShareRaw(requestParameters, initOverrides);
2500
+ return await response.value();
2501
+ }
2369
2502
  /**
2370
2503
  * Creates request options for rotateApiKey without sending the request
2371
2504
  */
@@ -46,6 +46,9 @@ import { type NamedSnapshotInfoResponse } from '../models/NamedSnapshotInfoRespo
46
46
  import { type NamedSnapshotListResponse } from '../models/NamedSnapshotListResponse';
47
47
  import { type NamedSnapshotSaveRequest } from '../models/NamedSnapshotSaveRequest';
48
48
  import { type NamedSnapshotSavingResponse } from '../models/NamedSnapshotSavingResponse';
49
+ import { type NamedSnapshotShareCreatedResponse } from '../models/NamedSnapshotShareCreatedResponse';
50
+ import { type NamedSnapshotShareListResponse } from '../models/NamedSnapshotShareListResponse';
51
+ import { type NamedSnapshotShareRevokedResponse } from '../models/NamedSnapshotShareRevokedResponse';
49
52
  import { type OrgListResponse } from '../models/OrgListResponse';
50
53
  import { type PromptRequest } from '../models/PromptRequest';
51
54
  import { type PromptResponse } from '../models/PromptResponse';
@@ -121,6 +124,9 @@ export interface CreateEnvironmentRequest {
121
124
  export interface CreateScopedApiKeyOperationRequest {
122
125
  createScopedApiKeyRequest: CreateScopedApiKeyRequest;
123
126
  }
127
+ export interface CreateSnapshotShareRequest {
128
+ name: string;
129
+ }
124
130
  export interface CreateWebhookRequest {
125
131
  webhookCreateRequest: WebhookCreateRequest;
126
132
  }
@@ -224,6 +230,9 @@ export interface ListSandboxSnapshotsRequest {
224
230
  cursor?: string | null;
225
231
  sort?: ListSandboxSnapshotsSortEnum;
226
232
  }
233
+ export interface ListSnapshotSharesRequest {
234
+ name: string;
235
+ }
227
236
  export interface ListSnapshotsRequest {
228
237
  limit?: number;
229
238
  cursor?: string | null;
@@ -260,6 +269,10 @@ export interface ResumeOperationRequest {
260
269
  export interface RevokeApiKeyRequest {
261
270
  apiKeyId: string;
262
271
  }
272
+ export interface RevokeSnapshotShareRequest {
273
+ name: string;
274
+ shareId: string;
275
+ }
263
276
  export interface RotateApiKeyRequest {
264
277
  apiKeyId: string;
265
278
  }
@@ -481,6 +494,20 @@ export declare class BoatApi extends runtime.BaseAPI {
481
494
  * Create a scoped API key
482
495
  */
483
496
  createScopedApiKey(requestParameters: CreateScopedApiKeyOperationRequest | runtime.FlatBody<CreateScopedApiKeyOperationRequest, 'createScopedApiKeyRequest'>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ApiKeySecretResponse>;
497
+ /**
498
+ * Creates request options for createSnapshotShare without sending the request
499
+ */
500
+ createSnapshotShareRequestOpts(requestParameters: CreateSnapshotShareRequest): Promise<runtime.RequestOpts>;
501
+ /**
502
+ * Make a secret code that lets any Boat account create a sandbox from this named snapshot (`boat snapshot share <name>` in the CLI). The response shows the code once; Boat stores only a hash. Re-saving the name changes what the code deploys. Removing the name removes its codes. Everything on the disk is shared, so do not keep secrets in files on it. Needs `snapshot.write`.
503
+ * Share a named snapshot
504
+ */
505
+ createSnapshotShareRaw(requestParameters: CreateSnapshotShareRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<NamedSnapshotShareCreatedResponse>>;
506
+ /**
507
+ * Make a secret code that lets any Boat account create a sandbox from this named snapshot (`boat snapshot share <name>` in the CLI). The response shows the code once; Boat stores only a hash. Re-saving the name changes what the code deploys. Removing the name removes its codes. Everything on the disk is shared, so do not keep secrets in files on it. Needs `snapshot.write`.
508
+ * Share a named snapshot
509
+ */
510
+ createSnapshotShare(requestParameters: CreateSnapshotShareRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<NamedSnapshotShareCreatedResponse>;
484
511
  /**
485
512
  * Creates request options for createWebhook without sending the request
486
513
  */
@@ -899,6 +926,20 @@ export declare class BoatApi extends runtime.BaseAPI {
899
926
  * List boat snapshots
900
927
  */
901
928
  listSandboxSnapshots(requestParameters: ListSandboxSnapshotsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SnapshotListResponse>;
929
+ /**
930
+ * Creates request options for listSnapshotShares without sending the request
931
+ */
932
+ listSnapshotSharesRequestOpts(requestParameters: ListSnapshotSharesRequest): Promise<runtime.RequestOpts>;
933
+ /**
934
+ * List the share codes of a named snapshot, active and revoked (`boat snapshot shares <name>` in the CLI). The full codes are not returned. Needs `snapshot.read`.
935
+ * List share codes of a named snapshot
936
+ */
937
+ listSnapshotSharesRaw(requestParameters: ListSnapshotSharesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<NamedSnapshotShareListResponse>>;
938
+ /**
939
+ * List the share codes of a named snapshot, active and revoked (`boat snapshot shares <name>` in the CLI). The full codes are not returned. Needs `snapshot.read`.
940
+ * List share codes of a named snapshot
941
+ */
942
+ listSnapshotShares(requestParameters: ListSnapshotSharesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<NamedSnapshotShareListResponse>;
902
943
  /**
903
944
  * Creates request options for listSnapshots without sending the request
904
945
  */
@@ -1037,6 +1078,20 @@ export declare class BoatApi extends runtime.BaseAPI {
1037
1078
  * Revoke an API key
1038
1079
  */
1039
1080
  revokeApiKey(requestParameters: RevokeApiKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ApiKeyRevokeResponse>;
1081
+ /**
1082
+ * Creates request options for revokeSnapshotShare without sending the request
1083
+ */
1084
+ revokeSnapshotShareRequestOpts(requestParameters: RevokeSnapshotShareRequest): Promise<runtime.RequestOpts>;
1085
+ /**
1086
+ * Revoke a share code (`boat snapshot unshare <name> <share-id>` in the CLI). The code stops creating new sandboxes. Sandboxes already created from it keep their own copy. Needs `snapshot.write`.
1087
+ * Revoke a share code
1088
+ */
1089
+ revokeSnapshotShareRaw(requestParameters: RevokeSnapshotShareRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<NamedSnapshotShareRevokedResponse>>;
1090
+ /**
1091
+ * Revoke a share code (`boat snapshot unshare <name> <share-id>` in the CLI). The code stops creating new sandboxes. Sandboxes already created from it keep their own copy. Needs `snapshot.write`.
1092
+ * Revoke a share code
1093
+ */
1094
+ revokeSnapshotShare(requestParameters: RevokeSnapshotShareRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<NamedSnapshotShareRevokedResponse>;
1040
1095
  /**
1041
1096
  * Creates request options for rotateApiKey without sending the request
1042
1097
  */
@@ -48,6 +48,9 @@ import { NamedSnapshotInfoResponseFromJSON, } from '../models/NamedSnapshotInfoR
48
48
  import { NamedSnapshotListResponseFromJSON, } from '../models/NamedSnapshotListResponse';
49
49
  import { NamedSnapshotSaveRequestToJSON, } from '../models/NamedSnapshotSaveRequest';
50
50
  import { NamedSnapshotSavingResponseFromJSON, } from '../models/NamedSnapshotSavingResponse';
51
+ import { NamedSnapshotShareCreatedResponseFromJSON, } from '../models/NamedSnapshotShareCreatedResponse';
52
+ import { NamedSnapshotShareListResponseFromJSON, } from '../models/NamedSnapshotShareListResponse';
53
+ import { NamedSnapshotShareRevokedResponseFromJSON, } from '../models/NamedSnapshotShareRevokedResponse';
51
54
  import { OrgListResponseFromJSON, } from '../models/OrgListResponse';
52
55
  import { PromptRequestToJSON, } from '../models/PromptRequest';
53
56
  import { PromptResponseFromJSON, } from '../models/PromptResponse';
@@ -543,6 +546,48 @@ export class BoatApi extends runtime.BaseAPI {
543
546
  const response = await this.createScopedApiKeyRaw(requestParameters, initOverrides);
544
547
  return await response.value();
545
548
  }
549
+ /**
550
+ * Creates request options for createSnapshotShare without sending the request
551
+ */
552
+ async createSnapshotShareRequestOpts(requestParameters) {
553
+ if (requestParameters['name'] == null) {
554
+ throw new runtime.RequiredError('name', 'Required parameter "name" was null or undefined when calling createSnapshotShare().');
555
+ }
556
+ const queryParameters = {};
557
+ const headerParameters = {};
558
+ if (this.configuration && this.configuration.accessToken) {
559
+ const token = this.configuration.accessToken;
560
+ const tokenString = await token("BoatBearerAuth", []);
561
+ if (tokenString) {
562
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
563
+ }
564
+ }
565
+ let urlPath = `/named-snapshots/{name}/shares`;
566
+ urlPath = urlPath.replace('{name}', encodeURIComponent(String(requestParameters['name'])));
567
+ return {
568
+ path: urlPath,
569
+ method: 'POST',
570
+ headers: headerParameters,
571
+ query: queryParameters,
572
+ };
573
+ }
574
+ /**
575
+ * Make a secret code that lets any Boat account create a sandbox from this named snapshot (`boat snapshot share <name>` in the CLI). The response shows the code once; Boat stores only a hash. Re-saving the name changes what the code deploys. Removing the name removes its codes. Everything on the disk is shared, so do not keep secrets in files on it. Needs `snapshot.write`.
576
+ * Share a named snapshot
577
+ */
578
+ async createSnapshotShareRaw(requestParameters, initOverrides) {
579
+ const requestOptions = await this.createSnapshotShareRequestOpts(requestParameters);
580
+ const response = await this.request(requestOptions, initOverrides);
581
+ return new runtime.JSONApiResponse(response, (jsonValue) => NamedSnapshotShareCreatedResponseFromJSON(jsonValue));
582
+ }
583
+ /**
584
+ * Make a secret code that lets any Boat account create a sandbox from this named snapshot (`boat snapshot share <name>` in the CLI). The response shows the code once; Boat stores only a hash. Re-saving the name changes what the code deploys. Removing the name removes its codes. Everything on the disk is shared, so do not keep secrets in files on it. Needs `snapshot.write`.
585
+ * Share a named snapshot
586
+ */
587
+ async createSnapshotShare(requestParameters, initOverrides) {
588
+ const response = await this.createSnapshotShareRaw(requestParameters, initOverrides);
589
+ return await response.value();
590
+ }
546
591
  /**
547
592
  * Creates request options for createWebhook without sending the request
548
593
  */
@@ -1879,6 +1924,48 @@ export class BoatApi extends runtime.BaseAPI {
1879
1924
  const response = await this.listSandboxSnapshotsRaw(requestParameters, initOverrides);
1880
1925
  return await response.value();
1881
1926
  }
1927
+ /**
1928
+ * Creates request options for listSnapshotShares without sending the request
1929
+ */
1930
+ async listSnapshotSharesRequestOpts(requestParameters) {
1931
+ if (requestParameters['name'] == null) {
1932
+ throw new runtime.RequiredError('name', 'Required parameter "name" was null or undefined when calling listSnapshotShares().');
1933
+ }
1934
+ const queryParameters = {};
1935
+ const headerParameters = {};
1936
+ if (this.configuration && this.configuration.accessToken) {
1937
+ const token = this.configuration.accessToken;
1938
+ const tokenString = await token("BoatBearerAuth", []);
1939
+ if (tokenString) {
1940
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1941
+ }
1942
+ }
1943
+ let urlPath = `/named-snapshots/{name}/shares`;
1944
+ urlPath = urlPath.replace('{name}', encodeURIComponent(String(requestParameters['name'])));
1945
+ return {
1946
+ path: urlPath,
1947
+ method: 'GET',
1948
+ headers: headerParameters,
1949
+ query: queryParameters,
1950
+ };
1951
+ }
1952
+ /**
1953
+ * List the share codes of a named snapshot, active and revoked (`boat snapshot shares <name>` in the CLI). The full codes are not returned. Needs `snapshot.read`.
1954
+ * List share codes of a named snapshot
1955
+ */
1956
+ async listSnapshotSharesRaw(requestParameters, initOverrides) {
1957
+ const requestOptions = await this.listSnapshotSharesRequestOpts(requestParameters);
1958
+ const response = await this.request(requestOptions, initOverrides);
1959
+ return new runtime.JSONApiResponse(response, (jsonValue) => NamedSnapshotShareListResponseFromJSON(jsonValue));
1960
+ }
1961
+ /**
1962
+ * List the share codes of a named snapshot, active and revoked (`boat snapshot shares <name>` in the CLI). The full codes are not returned. Needs `snapshot.read`.
1963
+ * List share codes of a named snapshot
1964
+ */
1965
+ async listSnapshotShares(requestParameters, initOverrides) {
1966
+ const response = await this.listSnapshotSharesRaw(requestParameters, initOverrides);
1967
+ return await response.value();
1968
+ }
1882
1969
  /**
1883
1970
  * Creates request options for listSnapshots without sending the request
1884
1971
  */
@@ -2330,6 +2417,52 @@ export class BoatApi extends runtime.BaseAPI {
2330
2417
  const response = await this.revokeApiKeyRaw(requestParameters, initOverrides);
2331
2418
  return await response.value();
2332
2419
  }
2420
+ /**
2421
+ * Creates request options for revokeSnapshotShare without sending the request
2422
+ */
2423
+ async revokeSnapshotShareRequestOpts(requestParameters) {
2424
+ if (requestParameters['name'] == null) {
2425
+ throw new runtime.RequiredError('name', 'Required parameter "name" was null or undefined when calling revokeSnapshotShare().');
2426
+ }
2427
+ if (requestParameters['shareId'] == null) {
2428
+ throw new runtime.RequiredError('shareId', 'Required parameter "shareId" was null or undefined when calling revokeSnapshotShare().');
2429
+ }
2430
+ const queryParameters = {};
2431
+ const headerParameters = {};
2432
+ if (this.configuration && this.configuration.accessToken) {
2433
+ const token = this.configuration.accessToken;
2434
+ const tokenString = await token("BoatBearerAuth", []);
2435
+ if (tokenString) {
2436
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
2437
+ }
2438
+ }
2439
+ let urlPath = `/named-snapshots/{name}/shares/{shareId}`;
2440
+ urlPath = urlPath.replace('{name}', encodeURIComponent(String(requestParameters['name'])));
2441
+ urlPath = urlPath.replace('{shareId}', encodeURIComponent(String(requestParameters['shareId'])));
2442
+ return {
2443
+ path: urlPath,
2444
+ method: 'DELETE',
2445
+ headers: headerParameters,
2446
+ query: queryParameters,
2447
+ };
2448
+ }
2449
+ /**
2450
+ * Revoke a share code (`boat snapshot unshare <name> <share-id>` in the CLI). The code stops creating new sandboxes. Sandboxes already created from it keep their own copy. Needs `snapshot.write`.
2451
+ * Revoke a share code
2452
+ */
2453
+ async revokeSnapshotShareRaw(requestParameters, initOverrides) {
2454
+ const requestOptions = await this.revokeSnapshotShareRequestOpts(requestParameters);
2455
+ const response = await this.request(requestOptions, initOverrides);
2456
+ return new runtime.JSONApiResponse(response, (jsonValue) => NamedSnapshotShareRevokedResponseFromJSON(jsonValue));
2457
+ }
2458
+ /**
2459
+ * Revoke a share code (`boat snapshot unshare <name> <share-id>` in the CLI). The code stops creating new sandboxes. Sandboxes already created from it keep their own copy. Needs `snapshot.write`.
2460
+ * Revoke a share code
2461
+ */
2462
+ async revokeSnapshotShare(requestParameters, initOverrides) {
2463
+ const response = await this.revokeSnapshotShareRaw(requestParameters, initOverrides);
2464
+ return await response.value();
2465
+ }
2333
2466
  /**
2334
2467
  * Creates request options for rotateApiKey without sending the request
2335
2468
  */
@@ -78,7 +78,7 @@ export interface CreateSandboxRequest {
78
78
  */
79
79
  teamId?: string;
80
80
  /**
81
- * Create the sandbox from a named snapshot (saved with `POST /named-snapshots`, or `boat snapshot <id> <name>` in the CLI). The sandbox starts from that exact frozen state. Omitting `type` inherits the type the snapshot was saved from; env and no-env inherit from the snapshot's source sandbox unless the request passes its own, with the same rules as forking.
81
+ * Create the sandbox from a named snapshot (saved with `POST /named-snapshots`, or `boat snapshot <id> <name>` in the CLI). The sandbox starts from that exact frozen state. Omitting `type` inherits the type the snapshot was saved from; env and no-env inherit from the snapshot's source sandbox unless the request passes its own, with the same rules as forking. Also accepts a share code (`bsh_...`) that another account made with `POST /named-snapshots/{name}/shares`. The new sandbox lives in and is billed to your account. It does not get the owner's per-sandbox env; your own environment applies normally. A wrong or revoked code returns `404 snapshot_not_found`.
82
82
  * @type {string}
83
83
  * @memberof CreateSandboxRequest
84
84
  */
@@ -29,10 +29,10 @@ export interface CreateScopedApiKey503Response {
29
29
  message: string;
30
30
  /**
31
31
  *
32
- * @type {CreateScopedApiKey503ResponseScopedCreationEnabledEnum}
32
+ * @type {boolean}
33
33
  * @memberof CreateScopedApiKey503Response
34
34
  */
35
- scopedCreationEnabled: CreateScopedApiKey503ResponseScopedCreationEnabledEnum;
35
+ scopedCreationEnabled: boolean;
36
36
  }
37
37
  /**
38
38
  * @export
@@ -41,13 +41,6 @@ export declare const CreateScopedApiKey503ResponseErrorEnum: {
41
41
  readonly ScopedApiKeyCreationDisabled: 'scoped_api_key_creation_disabled';
42
42
  };
43
43
  export type CreateScopedApiKey503ResponseErrorEnum = typeof CreateScopedApiKey503ResponseErrorEnum[keyof typeof CreateScopedApiKey503ResponseErrorEnum];
44
- /**
45
- * @export
46
- */
47
- export declare const CreateScopedApiKey503ResponseScopedCreationEnabledEnum: {
48
- readonly False: false;
49
- };
50
- export type CreateScopedApiKey503ResponseScopedCreationEnabledEnum = typeof CreateScopedApiKey503ResponseScopedCreationEnabledEnum[keyof typeof CreateScopedApiKey503ResponseScopedCreationEnabledEnum];
51
44
  /**
52
45
  * Check if a given object implements the CreateScopedApiKey503Response interface.
53
46
  */
@@ -17,12 +17,6 @@
17
17
  export const CreateScopedApiKey503ResponseErrorEnum = {
18
18
  ScopedApiKeyCreationDisabled: 'scoped_api_key_creation_disabled'
19
19
  };
20
- /**
21
- * @export
22
- */
23
- export const CreateScopedApiKey503ResponseScopedCreationEnabledEnum = {
24
- False: false
25
- };
26
20
  /**
27
21
  * Check if a given object implements the CreateScopedApiKey503Response interface.
28
22
  */