Comparing version 0.12.1 to 0.12.2-stateless-sdk.0
@@ -56,2 +56,19 @@ import * as openapi_typescript_fetch_dist_cjs_types from 'openapi-typescript-fetch/dist/cjs/types'; | ||
}; | ||
"/sandboxes/{sandboxID}": { | ||
/** Kill a sandbox */ | ||
delete: { | ||
parameters: { | ||
path: { | ||
sandboxID: components["parameters"]["sandboxID"]; | ||
}; | ||
}; | ||
responses: { | ||
/** The sandbox was killed successfully */ | ||
204: never; | ||
401: components["responses"]["401"]; | ||
404: components["responses"]["404"]; | ||
500: components["responses"]["500"]; | ||
}; | ||
}; | ||
}; | ||
"/sandboxes/{sandboxID}/refreshes": { | ||
@@ -928,2 +945,8 @@ /** Refresh the sandbox extending its time to live */ | ||
/** | ||
* List all running sandboxes | ||
* @param sandboxID ID of the sandbox to kill | ||
* @param apiKey API key to use for authentication. If not provided, the `E2B_API_KEY` environment variable will be used. | ||
*/ | ||
static kill(sandboxID: string, apiKey?: string): Promise<void>; | ||
/** | ||
* Keep the sandbox alive for the specified duration. | ||
@@ -1392,2 +1415,39 @@ * | ||
export { API_HOST, Action, Artifact, ClientType, DataAnalysis as CodeInterpreter, CodeRuntime, DataAnalysis, DownloadFileFormat, EnvVars, FileInfo, FilesystemEvent, FilesystemEventListener, FilesystemManager, FilesystemOperation, FilesystemWatcher, OpenPort, Process, ProcessManager, ProcessMessage, ProcessOutput, RunPythonOpts, RunningSandbox, SANDBOX_DOMAIN, Sandbox, SandboxMetadata, SandboxOpts, Terminal, TerminalManager, TerminalOutput, client as api, components, Sandbox as default, paths, runCode, withAPIKey, withAccessToken }; | ||
/** | ||
* Creates a new sandbox. | ||
* @param lifetime Lifetime of the sandbox in milliseconds | ||
* @param opts Sandbox options | ||
* @returns Sandbox ID | ||
*/ | ||
declare function create(lifetime: number, opts: SandboxOpts): Promise<string>; | ||
/** | ||
* Starts a new process. | ||
* @overload | ||
* @param sandboxId Sandbox ID | ||
* @returns Process output | ||
*/ | ||
/** | ||
* Starts a new process and wait until it finishes. | ||
* @param sandboxId Sandbox ID | ||
* @param opts Process options | ||
* @returns Process output | ||
*/ | ||
declare function exec(sandboxId: string, opts: ProcessOpts): Promise<ProcessOutput>; | ||
/** | ||
* Kills a sandbox. | ||
* @param sandboxId Sandbox ID | ||
*/ | ||
declare function kill(sandboxId: string): Promise<void>; | ||
declare const stateless_create: typeof create; | ||
declare const stateless_exec: typeof exec; | ||
declare const stateless_kill: typeof kill; | ||
declare namespace stateless { | ||
export { | ||
stateless_create as create, | ||
stateless_exec as exec, | ||
stateless_kill as kill, | ||
}; | ||
} | ||
export { API_HOST, Action, Artifact, ClientType, DataAnalysis as CodeInterpreter, CodeRuntime, DataAnalysis, DownloadFileFormat, EnvVars, FileInfo, FilesystemEvent, FilesystemEventListener, FilesystemManager, FilesystemOperation, FilesystemWatcher, OpenPort, Process, ProcessManager, ProcessMessage, ProcessOutput, RunPythonOpts, RunningSandbox, SANDBOX_DOMAIN, Sandbox, SandboxMetadata, SandboxOpts, Terminal, TerminalManager, TerminalOutput, client as api, components, Sandbox as default, paths, runCode, stateless, withAPIKey, withAccessToken }; |
{ | ||
"name": "e2b", | ||
"version": "0.12.1", | ||
"version": "0.12.2-stateless-sdk.0", | ||
"description": "E2B SDK that give agents cloud environments", | ||
@@ -25,2 +25,15 @@ "homepage": "https://e2b.dev", | ||
"types": "dist/index.d.ts", | ||
"scripts": { | ||
"prepublishOnly": "pnpm build", | ||
"build": "tsc --noEmit && tsup", | ||
"dev": "tsup --watch", | ||
"measure": "node test/performance.mjs", | ||
"run": "node test/run.mjs", | ||
"test": "vitest run", | ||
"test:coverage": "vitest run --coverage", | ||
"generate": "openapi-typescript ../../spec/openapi.yml -x api_key --support-array-length --alphabetize --output src/api/schema.gen.ts", | ||
"check-deps": "knip", | ||
"update-deps": "ncu -u && pnpm i", | ||
"postPublish": "./scripts/post-publish.sh || true" | ||
}, | ||
"peerDependencies": { | ||
@@ -81,15 +94,3 @@ "openai": "^4.17.4" | ||
"utf-8-validate": "^6.0.3" | ||
}, | ||
"scripts": { | ||
"build": "tsc --noEmit && tsup", | ||
"dev": "tsup --watch", | ||
"measure": "node test/performance.mjs", | ||
"run": "node test/run.mjs", | ||
"test": "vitest run", | ||
"test:coverage": "vitest run --coverage", | ||
"generate": "openapi-typescript ../../spec/openapi.yml -x api_key --support-array-length --alphabetize --output src/api/schema.gen.ts", | ||
"check-deps": "knip", | ||
"update-deps": "ncu -u && pnpm i", | ||
"postPublish": "./scripts/post-publish.sh || true" | ||
} | ||
} | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
430026
0
5486
7