Skip to content

Commit a55ca21

Browse files
authored
feat: snapshots (#1111)
1 parent f922884 commit a55ca21

41 files changed

Lines changed: 3401 additions & 59 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.changeset/snapshot-api-support.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'e2b': minor
3+
'@e2b/python-sdk': minor
4+
---
5+
6+
Add snapshot API for creating persistent sandbox snapshots

packages/js-sdk/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"example": "tsx example.mts",
3030
"test": "vitest run",
3131
"generate": "npm-run-all generate:* && pnpm run format",
32-
"generate:api": "python ./../../spec/remove_extra_tags.py sandboxes templates tags auth && openapi-typescript ../../spec/openapi_generated.yml -x api_key --array-length --alphabetize --default-non-nullable false --output src/api/schema.gen.ts",
32+
"generate:api": "python ./../../spec/remove_extra_tags.py sandboxes snapshots templates tags auth && openapi-typescript ../../spec/openapi_generated.yml -x api_key --array-length --alphabetize --default-non-nullable false --output src/api/schema.gen.ts",
3333
"generate:envd": "cd ../../spec/envd && buf generate --template buf-js.gen.yaml\n",
3434
"generate:envd-api": "openapi-typescript ../../spec/envd/envd.yaml -x api_key --array-length --alphabetize --output src/envd/schema.gen.ts",
3535
"generate:mcp": "json2ts -i ./../../spec/mcp-server.json -o src/sandbox/mcp.d.ts --unreachableDefinitions --style.singleQuote --no-style.semi",

packages/js-sdk/src/api/schema.gen.ts

Lines changed: 246 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/js-sdk/src/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ export type {
4949
SandboxListOpts,
5050
SandboxPaginator,
5151
SandboxNetworkOpts,
52+
SnapshotInfo,
53+
SnapshotListOpts,
54+
SnapshotPaginator,
5255
} from './sandbox/sandboxApi'
5356

5457
export type { McpServer } from './sandbox/mcp'

0 commit comments

Comments
 (0)