Comparing version 0.11.20 to 0.12.0
@@ -21,10 +21,10 @@ import * as openapi_typescript_fetch_dist_cjs_types from 'openapi-typescript-fetch/dist/cjs/types'; | ||
}; | ||
"/instances": { | ||
/** List all running instances */ | ||
"/sandboxes": { | ||
/** List all running sandboxes */ | ||
get: { | ||
responses: { | ||
/** Successfully returned all running instances */ | ||
/** Successfully returned all running sandboxes */ | ||
200: { | ||
content: { | ||
"application/json": components["schemas"]["RunningInstance"][]; | ||
"application/json": components["schemas"]["RunningSandboxes"][]; | ||
}; | ||
@@ -37,9 +37,9 @@ }; | ||
}; | ||
/** Create an instance from the environment */ | ||
/** Create a sandbox from the template */ | ||
post: { | ||
responses: { | ||
/** The instance was created successfully */ | ||
/** The sandbox was created successfully */ | ||
201: { | ||
content: { | ||
"application/json": components["schemas"]["Instance"]; | ||
"application/json": components["schemas"]["Sandbox"]; | ||
}; | ||
@@ -53,3 +53,3 @@ }; | ||
content: { | ||
"application/json": components["schemas"]["NewInstance"]; | ||
"application/json": components["schemas"]["NewSandbox"]; | ||
}; | ||
@@ -59,12 +59,12 @@ }; | ||
}; | ||
"/instances/{instanceID}/refreshes": { | ||
/** Refresh the instance extending its time to live */ | ||
"/sandboxes/{sandboxID}/refreshes": { | ||
/** Refresh the sandbox extending its time to live */ | ||
post: { | ||
parameters: { | ||
path: { | ||
instanceID: components["parameters"]["instanceID"]; | ||
sandboxID: components["parameters"]["sandboxID"]; | ||
}; | ||
}; | ||
responses: { | ||
/** Successfully refreshed the instance */ | ||
/** Successfully refreshed the sandbox */ | ||
204: never; | ||
@@ -77,3 +77,3 @@ 401: components["responses"]["401"]; | ||
"application/json": { | ||
/** @description Duration for which the instance should be kept alive in seconds */ | ||
/** @description Duration for which the sandbox should be kept alive in seconds */ | ||
duration?: number; | ||
@@ -85,2 +85,150 @@ }; | ||
}; | ||
"/templates": { | ||
/** List all templates */ | ||
get: { | ||
responses: { | ||
/** Successfully returned all templates */ | ||
200: { | ||
content: { | ||
"application/json": components["schemas"]["Template"][]; | ||
}; | ||
}; | ||
401: components["responses"]["401"]; | ||
500: components["responses"]["500"]; | ||
}; | ||
}; | ||
/** Create a new template */ | ||
post: { | ||
responses: { | ||
/** The build has started */ | ||
202: { | ||
content: { | ||
"application/json": components["schemas"]["Template"]; | ||
}; | ||
}; | ||
401: components["responses"]["401"]; | ||
500: components["responses"]["500"]; | ||
}; | ||
requestBody: { | ||
content: { | ||
"multipart/form-data": { | ||
/** @description Alias of the template */ | ||
alias?: string; | ||
/** | ||
* Format: binary | ||
* @description Docker build context | ||
*/ | ||
buildContext: string; | ||
/** @description Dockerfile content */ | ||
dockerfile: string; | ||
/** @description Start command to execute in the template after the build */ | ||
startCmd?: string; | ||
}; | ||
}; | ||
}; | ||
}; | ||
}; | ||
"/templates/{templateID}": { | ||
/** Rebuild an template */ | ||
post: { | ||
parameters: { | ||
path: { | ||
templateID: components["parameters"]["templateID"]; | ||
}; | ||
}; | ||
responses: { | ||
/** The build has started */ | ||
202: { | ||
content: { | ||
"application/json": components["schemas"]["Template"]; | ||
}; | ||
}; | ||
401: components["responses"]["401"]; | ||
500: components["responses"]["500"]; | ||
}; | ||
requestBody: { | ||
content: { | ||
"multipart/form-data": { | ||
/** @description Alias of the template */ | ||
alias?: string; | ||
/** | ||
* Format: binary | ||
* @description Docker build context | ||
*/ | ||
buildContext: string; | ||
/** @description Dockerfile content */ | ||
dockerfile: string; | ||
/** @description Start command to execute in the template after the build */ | ||
startCmd?: string; | ||
}; | ||
}; | ||
}; | ||
}; | ||
/** Delete a template */ | ||
delete: { | ||
parameters: { | ||
path: { | ||
templateID: components["parameters"]["templateID"]; | ||
}; | ||
}; | ||
responses: { | ||
/** The template was deleted successfully */ | ||
204: never; | ||
401: components["responses"]["401"]; | ||
500: components["responses"]["500"]; | ||
}; | ||
}; | ||
}; | ||
"/templates/{templateID}/builds/{buildID}": { | ||
/** Get template build info */ | ||
get: { | ||
parameters: { | ||
path: { | ||
templateID: components["parameters"]["templateID"]; | ||
buildID: components["parameters"]["buildID"]; | ||
}; | ||
query: { | ||
/** Index of the starting build log that should be returned with the template */ | ||
logsOffset?: number; | ||
}; | ||
}; | ||
responses: { | ||
/** Successfully returned the template */ | ||
200: { | ||
content: { | ||
"application/json": components["schemas"]["TemplateBuild"]; | ||
}; | ||
}; | ||
401: components["responses"]["401"]; | ||
404: components["responses"]["404"]; | ||
500: components["responses"]["500"]; | ||
}; | ||
}; | ||
}; | ||
"/templates/{templateID}/builds/{buildID}/logs": { | ||
/** Add a build log */ | ||
post: { | ||
parameters: { | ||
path: { | ||
templateID: components["parameters"]["templateID"]; | ||
buildID: components["parameters"]["buildID"]; | ||
}; | ||
}; | ||
responses: { | ||
/** Successfully added log */ | ||
201: unknown; | ||
401: components["responses"]["401"]; | ||
404: components["responses"]["404"]; | ||
}; | ||
requestBody: { | ||
content: { | ||
"application/json": { | ||
/** @description API secret */ | ||
apiSecret: string; | ||
logs: string[]; | ||
}; | ||
}; | ||
}; | ||
}; | ||
}; | ||
"/envs": { | ||
@@ -234,13 +382,135 @@ /** List all environments */ | ||
}; | ||
"/instances": { | ||
/** List all running instances */ | ||
get: { | ||
responses: { | ||
/** Successfully returned all running instances */ | ||
200: { | ||
content: { | ||
"application/json": components["schemas"]["RunningInstance"][]; | ||
}; | ||
}; | ||
400: components["responses"]["400"]; | ||
401: components["responses"]["401"]; | ||
500: components["responses"]["500"]; | ||
}; | ||
}; | ||
/** Create an instance from the environment */ | ||
post: { | ||
responses: { | ||
/** The instance was created successfully */ | ||
201: { | ||
content: { | ||
"application/json": components["schemas"]["Instance"]; | ||
}; | ||
}; | ||
400: components["responses"]["400"]; | ||
401: components["responses"]["401"]; | ||
500: components["responses"]["500"]; | ||
}; | ||
requestBody: { | ||
content: { | ||
"application/json": components["schemas"]["NewInstance"]; | ||
}; | ||
}; | ||
}; | ||
}; | ||
"/instances/{instanceID}/refreshes": { | ||
/** Refresh the instance extending its time to live */ | ||
post: { | ||
parameters: { | ||
path: { | ||
instanceID: components["parameters"]["instanceID"]; | ||
}; | ||
}; | ||
responses: { | ||
/** Successfully refreshed the instance */ | ||
204: never; | ||
401: components["responses"]["401"]; | ||
404: components["responses"]["404"]; | ||
}; | ||
requestBody: { | ||
content: { | ||
"application/json": { | ||
/** @description Duration for which the instance should be kept alive in seconds */ | ||
duration?: number; | ||
}; | ||
}; | ||
}; | ||
}; | ||
}; | ||
} | ||
interface components { | ||
schemas: { | ||
InstanceMetadata: { | ||
SandboxMetadata: { | ||
[key: string]: string; | ||
}; | ||
NewInstance: { | ||
/** @description Identifier of the required environment */ | ||
envID: string; | ||
metadata?: components["schemas"]["InstanceMetadata"]; | ||
Sandbox: { | ||
/** @description Identifier of the template from which is the sandbox created */ | ||
templateID: string; | ||
/** @description Identifier of the sandbox */ | ||
sandboxID: string; | ||
/** @description Alias of the template */ | ||
alias?: string; | ||
/** @description Identifier of the client */ | ||
clientID: string; | ||
}; | ||
RunningSandboxes: { | ||
/** @description Identifier of the template from which is the sandbox created */ | ||
templateID: string; | ||
/** @description Alias of the template */ | ||
alias?: string; | ||
/** @description Identifier of the sandbox */ | ||
sandboxID: string; | ||
/** @description Identifier of the client */ | ||
clientID: string; | ||
/** | ||
* Format: date-time | ||
* @description Time when the sandbox was started | ||
*/ | ||
startedAt: string; | ||
metadata?: components["schemas"]["SandboxMetadata"]; | ||
}; | ||
NewSandbox: { | ||
/** @description Identifier of the required template */ | ||
templateID: string; | ||
metadata?: components["schemas"]["SandboxMetadata"]; | ||
}; | ||
Template: { | ||
/** @description Identifier of the template */ | ||
templateID: string; | ||
/** @description Identifier of the last successful build for given template */ | ||
buildID: string; | ||
/** @description Whether the template is public or only accessible by the team */ | ||
public: boolean; | ||
/** @description Aliases of the template */ | ||
aliases?: string[]; | ||
}; | ||
TemplateBuild: { | ||
/** | ||
* @description Build logs | ||
* @default [] | ||
*/ | ||
logs: string[]; | ||
/** @description Identifier of the template */ | ||
templateID: string; | ||
/** @description Identifier of the build */ | ||
buildID: string; | ||
/** | ||
* @description Status of the template | ||
* @enum {string} | ||
*/ | ||
status?: "building" | "ready" | "error"; | ||
} & { | ||
finished: unknown; | ||
}; | ||
Error: { | ||
/** | ||
* Format: int32 | ||
* @description Error code | ||
*/ | ||
code: number; | ||
/** @description Error */ | ||
message: string; | ||
}; | ||
Environment: { | ||
@@ -274,2 +544,10 @@ /** @description Identifier of the environment */ | ||
}; | ||
InstanceMetadata: { | ||
[key: string]: string; | ||
}; | ||
NewInstance: { | ||
/** @description Identifier of the required environment */ | ||
envID: string; | ||
metadata?: components["schemas"]["InstanceMetadata"]; | ||
}; | ||
Instance: { | ||
@@ -280,21 +558,8 @@ /** @description Identifier of the environment from which is the instance created */ | ||
instanceID: string; | ||
/** @description Alias of the environment */ | ||
alias?: string; | ||
/** @description Identifier of the client */ | ||
clientID: string; | ||
}; | ||
Error: { | ||
/** | ||
* Format: int32 | ||
* @description Error code | ||
*/ | ||
code: number; | ||
/** @description Error */ | ||
message: string; | ||
}; | ||
RunningInstance: { | ||
/** @description Identifier of the environment from which is the instance created */ | ||
envID: string; | ||
/** @description Alias of the environment */ | ||
alias?: string; | ||
/** @description Identifier of the instance */ | ||
@@ -339,4 +604,6 @@ instanceID: string; | ||
parameters: { | ||
templateID: string; | ||
buildID: string; | ||
sandboxID: string; | ||
envID: string; | ||
buildID: string; | ||
instanceID: string; | ||
@@ -621,3 +888,3 @@ }; | ||
logger?: Logger; | ||
__sandbox?: components['schemas']['Instance']; | ||
__sandbox?: components['schemas']['Sandbox']; | ||
__debug_hostname?: string; | ||
@@ -646,3 +913,3 @@ __debug_port?: number; | ||
protected readonly logger: Logger; | ||
protected sandbox?: components['schemas']['Instance']; | ||
protected sandbox?: components['schemas']['Sandbox']; | ||
protected isOpen: boolean; | ||
@@ -659,2 +926,3 @@ private readonly apiKey; | ||
get id(): string; | ||
private get templateID(); | ||
/** | ||
@@ -665,3 +933,2 @@ * List all running sandboxes | ||
static list(apiKey?: string): Promise<RunningSandbox[]>; | ||
private get templateID(); | ||
/** | ||
@@ -668,0 +935,0 @@ * Keep the sandbox alive for the specified duration. |
{ | ||
"name": "e2b", | ||
"version": "0.11.20", | ||
"version": "0.12.0", | ||
"description": "E2B SDK that give agents cloud environments", | ||
@@ -90,4 +90,5 @@ "homepage": "https://e2b.dev", | ||
"check-deps": "knip", | ||
"update-deps": "ncu -u && pnpm i" | ||
"update-deps": "ncu -u && pnpm i", | ||
"postPublish": "npm pkg set 'name'='@e2b/sdk' && pnpm publish --no-git-checks && npm pkg set 'name'='e2b'" | ||
} | ||
} |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
426658
5281