Skip to content

armgit / E2B

Public Imported from GitHub
0

Open-source, secure environment with real-world tools for enterprise-grade agents.

chore: remove the V1 template build footprint (#1875)

Tomas Srnka5b015ad7827c
diff --git a/.changeset/remove-template-build-v1-clients.md b/.changeset/remove-template-build-v1-clients.md
new file mode 100644
index 000000000..f72a4ea02
--- /dev/null
+++ b/.changeset/remove-template-build-v1-clients.md
@@ -0,0 +1,10 @@
+---
+'e2b': minor
+'@e2b/python-sdk': minor
+---
+
+Removed the V1 template build operations and schemas from the generated API clients. The API no longer serves them (runtime `87968fc1e1fa`); control planes carrying that change answer `410 Gone`. Template builds go through the Template SDK.
+
+Visible removal, classified minor: the JS `paths` namespace loses `POST /templates`, `POST /templates/{templateID}`, `POST /templates/{templateID}/builds/{buildID}` and `POST /v2/templates`, and `components['schemas']` loses `TemplateLegacy`, `TemplateBuildRequest` and `TemplateBuildRequestV2`; the Python `e2b.api.client.models` package loses `TemplateLegacy`, `TemplateBuildRequest` and `TemplateBuildRequestV2`, and `e2b.api.client.api.templates` loses the `post_templates`, `post_templates_template_id`, `post_templates_template_id_builds_build_id` and `post_v2_templates` modules. No SDK method accepted or returned them; code that imported these names directly must drop the import.
+
+The regenerated clients also pick up a documented `429` on most operations, a `409` on template create (v3), the upload-request `headers` on the build file-upload link, `minLength: 1` on the v2 build source fields, and a deprecation marker on the always-empty `logs` field of the build status.
diff --git a/.changeset/remove-template-build-v1-command.md b/.changeset/remove-template-build-v1-command.md
new file mode 100644
index 000000000..fa5b4c763
--- /dev/null
+++ b/.changeset/remove-template-build-v1-command.md
@@ -0,0 +1,5 @@
+---
+'@e2b/cli': patch
+---
+
+Removed the hidden `e2b template build` command (alias `bd`). It printed a V1 deprecation notice and exited 1; the V1 build system it fronted is gone from the API. A script still calling it now gets commander's unknown-command error with the same exit code. Build templates with `e2b template create` or the Template SDK; `e2b template migrate` still converts a V1 project (see https://e2b.dev/docs/template/migration-v2).
diff --git a/packages/cli/src/commands/template/build.ts b/packages/cli/src/commands/template/build.ts
deleted file mode 100644
index 3ce2c0c4f..000000000
--- a/packages/cli/src/commands/template/build.ts
+++ /dev/null
@@ -1,37 +0,0 @@
-import * as boxen from 'boxen'
-import * as commander from 'commander'
-import { asBold, asPrimary } from '../../utils/format'
-
-export const buildCommand = new commander.Command('build')
- .description('Deprecated: use `e2b template create` instead.')
- .argument('[template]', 'unused')
- .allowUnknownOption(true)
- .alias('bd')
- .action(async () => {
- const deprecationMessage = `${asBold('DEPRECATION WARNING')}
-
-This is the v1 build system which is now deprecated.
-Please migrate to the new build system v2.
-
-Migration guide: ${asPrimary('https://e2b.dev/docs/template/migration-v2')}`
-
- const deprecationWarning = boxen.default(deprecationMessage, {
- padding: {
- bottom: 0,
- top: 0,
- left: 2,
- right: 2,
- },
- margin: {
- top: 1,
- bottom: 1,
- left: 0,
- right: 0,
- },
- borderColor: 'yellow',
- borderStyle: 'round',
- })
-
- console.log(deprecationWarning)
- process.exit(1)
- })
diff --git a/packages/cli/src/commands/template/index.ts b/packages/cli/src/commands/template/index.ts
index fc8d336f2..c91defe79 100644
--- a/packages/cli/src/commands/template/index.ts
+++ b/packages/cli/src/commands/template/index.ts
@@ -1,7 +1,6 @@
import * as commander from 'commander'
import { createCommand } from './create'
-import { buildCommand } from './build'
import { deleteCommand } from './delete'
import { initCommand } from './init'
import { listCommand } from './list'
@@ -12,7 +11,6 @@ export const templateCommand = new commander.Command('template')
.description('manage sandbox templates')
.alias('tpl')
.addCommand(createCommand)
- .addCommand(buildCommand, { hidden: true })
.addCommand(listCommand)
.addCommand(initCommand)
.addCommand(deleteCommand)
diff --git a/packages/js-sdk/src/api/schema.gen.ts b/packages/js-sdk/src/api/schema.gen.ts
index 8943b3385..15c75cc10 100644
--- a/packages/js-sdk/src/api/schema.gen.ts
+++ b/packages/js-sdk/src/api/schema.gen.ts
@@ -39,6 +39,7 @@ export interface paths {
};
400: components["responses"]["400"];
401: components["responses"]["401"];
+ 429: components["responses"]["429"];
500: components["responses"]["500"];
};
};
@@ -71,6 +72,7 @@ export interface paths {
};
400: components["responses"]["400"];
401: components["responses"]["401"];
+ 429: components["responses"]["429"];
500: components["responses"]["500"];
503: components["responses"]["503"];
504: components["responses"]["504"];
@@ -115,6 +117,7 @@ export interface paths {
};
401: components["responses"]["401"];
404: components["responses"]["404"];
+ 429: components["responses"]["429"];
500: components["responses"]["500"];
};
};
@@ -144,6 +147,7 @@ export interface paths {
};
401: components["responses"]["401"];
404: components["responses"]["404"];
+ 429: components["responses"]["429"];
500: components["responses"]["500"];
};
};
@@ -202,6 +206,7 @@ export interface paths {
401: components["responses"]["401"];
404: components["responses"]["404"];
409: components["responses"]["409"];
+ 429: components["responses"]["429"];
500: components["responses"]["500"];
503: components["responses"]["503"];
504: components["responses"]["504"];
@@ -253,6 +258,7 @@ export interface paths {
401: components["responses"]["401"];
404: components["responses"]["404"];
409: components["responses"]["409"];
+ 429: components["responses"]["429"];
500: components["responses"]["500"];
503: components["responses"]["503"];
};
@@ -302,6 +308,7 @@ export interface paths {
};
401: components["responses"]["401"];
404: components["responses"]["404"];
+ 429: components["responses"]["429"];
500: components["responses"]["500"];
};
};
@@ -351,6 +358,7 @@ export interface paths {
400: components["responses"]["400"];
401: components["responses"]["401"];
404: components["responses"]["404"];
+ 429: components["responses"]["429"];
500: components["responses"]["500"];
};
};
@@ -399,6 +407,7 @@ export interface paths {
401: components["responses"]["401"];
404: components["responses"]["404"];
409: components["responses"]["409"];
+ 429: components["responses"]["429"];
500: components["responses"]["500"];
};
};
@@ -447,6 +456,7 @@ export interface paths {
401: components["responses"]["401"];
404: components["responses"]["404"];
409: components["responses"]["409"];
+ 429: components["responses"]["429"];
500: components["responses"]["500"];
503: components["responses"]["503"];
};
@@ -494,6 +504,7 @@ export interface paths {
};
401: components["responses"]["401"];
404: components["responses"]["404"];
+ 429: components["responses"]["429"];
};
};
delete?: never;
@@ -544,6 +555,7 @@ export interface paths {
401: components["responses"]["401"];
404: components["responses"]["404"];
409: components["responses"]["409"];
+ 429: components["responses"]["429"];
500: components["responses"]["500"];
503: components["responses"]["503"];
504: components["responses"]["504"];
@@ -595,6 +607,7 @@ export interface paths {
400: components["responses"]["400"];
401: components["responses"]["401"];
404: components["responses"]["404"];
+ 429: components["responses"]["429"];
500: components["responses"]["500"];
};
};
@@ -641,6 +654,7 @@ export interface paths {
};
401: components["responses"]["401"];
404: components["responses"]["404"];
+ 429: components["responses"]["429"];
500: components["responses"]["500"];
};
};
@@ -684,6 +698,7 @@ export interface paths {
};
400: components["responses"]["400"];
401: components["responses"]["401"];
+ 429: components["responses"]["429"];
500: components["responses"]["500"];
};
};
@@ -944,6 +959,7 @@ export interface paths {
};
};
401: components["responses"]["401"];
+ 429: components["responses"]["429"];
500: components["responses"]["500"];
};
};
@@ -985,6 +1001,7 @@ export interface paths {
};
};
401: components["responses"]["401"];
+ 429: components["responses"]["429"];
500: components["responses"]["500"];
};
};
@@ -1034,6 +1051,7 @@ export interface paths {
400: components["responses"]["400"];
401: components["responses"]["401"];
403: components["responses"]["403"];
+ 429: components["responses"]["429"];
500: components["responses"]["500"];
};
};
@@ -1085,6 +1103,7 @@ export interface paths {
400: components["responses"]["400"];
401: components["responses"]["401"];
403: components["responses"]["403"];
+ 429: components["responses"]["429"];
500: components["responses"]["500"];
};
};
@@ -1129,42 +1148,12 @@ export interface paths {
};
};
401: components["responses"]["401"];
+ 429: components["responses"]["429"];
500: components["responses"]["500"];
};
};
put?: never;
- /**
- * Create template
- * @deprecated
- * @description Create a new template
- */
- post: {
- parameters: {
- query?: never;
- header?: never;
- path?: never;
- cookie?: never;
- };
- requestBody: {
- content: {
- "application/json": components["schemas"]["TemplateBuildRequest"];
- };
- };
- responses: {
- /** @description The build was accepted */
- 202: {
- headers: {
- [name: string]: unknown;
- };
- content: {
- "application/json": components["schemas"]["TemplateLegacy"];
- };
- };
- 400: components["responses"]["400"];
- 401: components["responses"]["401"];
- 500: components["responses"]["500"];
- };
- };
+ post?: never;
delete?: never;
options?: never;
head?: never;
@@ -1209,43 +1198,12 @@ export interface paths {
};
};
401: components["responses"]["401"];
+ 429: components["responses"]["429"];
500: components["responses"]["500"];
};
};
put?: never;
- /**
- * Rebuild template
- * @deprecated
- * @description Rebuild an template
- */
- post: {
- parameters: {
- query?: never;
- header?: never;
- path: {
- templateID: components["parameters"]["templateID"];
- };
- cookie?: never;
- };
- requestBody: {
- content: {
- "application/json": components["schemas"]["TemplateBuildRequest"];
- };
- };
- responses: {
- /** @description The build was accepted */
- 202: {
- headers: {
- [name: string]: unknown;
- };
- content: {
- "application/json": components["schemas"]["TemplateLegacy"];
- };
- };
- 401: components["responses"]["401"];
- 500: components["responses"]["500"];
- };
- };
+ post?: never;
/**
* Delete template
* @description Delete a template
@@ -1269,6 +1227,7 @@ export interface paths {
content?: never;
};
401: components["responses"]["401"];
+ 429: components["responses"]["429"];
500: components["responses"]["500"];
};
};
@@ -1303,54 +1262,12 @@ export interface paths {
};
400: components["responses"]["400"];
401: components["responses"]["401"];
+ 429: components["responses"]["429"];
500: components["responses"]["500"];
};
};
trace?: never;
};
- "/templates/{templateID}/builds/{buildID}": {
- parameters: {
- query?: never;
- header?: never;
- path?: never;
- cookie?: never;
- };
- get?: never;
- put?: never;
- /**
- * Start template build
- * @deprecated
- * @description Start the build
- */
- post: {
- parameters: {
- query?: never;
- header?: never;
- path: {
- buildID: components["parameters"]["buildID"];
- templateID: components["parameters"]["templateID"];
- };
- cookie?: never;
- };
- requestBody?: never;
- responses: {
- /** @description The build has started */
- 202: {
- headers: {
- [name: string]: unknown;
- };
- content?: never;
- };
- 401: components["responses"]["401"];
- 500: components["responses"]["500"];
- };
- };
- delete?: never;
- options?: never;
- head?: never;
- patch?: never;
- trace?: never;
- };
"/templates/{templateID}/builds/{buildID}/logs": {
parameters: {
query?: never;
@@ -1394,6 +1311,7 @@ export interface paths {
};
401: components["responses"]["401"];
404: components["responses"]["404"];
+ 429: components["responses"]["429"];
500: components["responses"]["500"];
};
};
@@ -1445,6 +1363,7 @@ export interface paths {
};
401: components["responses"]["401"];
404: components["responses"]["404"];
+ 429: components["responses"]["429"];
500: components["responses"]["500"];
};
};
@@ -1491,6 +1410,7 @@ export interface paths {
400: components["responses"]["400"];
401: components["responses"]["401"];
404: components["responses"]["404"];
+ 429: components["responses"]["429"];
500: components["responses"]["500"];
};
};
@@ -1536,6 +1456,7 @@ export interface paths {
401: components["responses"]["401"];
403: components["responses"]["403"];
404: components["responses"]["404"];
+ 429: components["responses"]["429"];
500: components["responses"]["500"];
};
};
@@ -1581,6 +1502,7 @@ export interface paths {
400: components["responses"]["400"];
403: components["responses"]["403"];
404: components["responses"]["404"];
+ 429: components["responses"]["429"];
500: components["responses"]["500"];
};
};
@@ -1630,6 +1552,7 @@ export interface paths {
400: components["responses"]["400"];
401: components["responses"]["401"];
404: components["responses"]["404"];
+ 429: components["responses"]["429"];
500: components["responses"]["500"];
};
};
@@ -1660,6 +1583,7 @@ export interface paths {
400: components["responses"]["400"];
401: components["responses"]["401"];
404: components["responses"]["404"];
+ 429: components["responses"]["429"];
500: components["responses"]["500"];
};
};
@@ -1716,6 +1640,7 @@ export interface paths {
};
400: components["responses"]["400"];
401: components["responses"]["401"];
+ 429: components["responses"]["429"];
500: components["responses"]["500"];
};
};
@@ -1771,6 +1696,7 @@ export interface paths {
};
401: components["responses"]["401"];
404: components["responses"]["404"];
+ 429: components["responses"]["429"];
500: components["responses"]["500"];
};
};
@@ -1821,42 +1747,12 @@ export interface paths {
400: components["responses"]["400"];
401: components["responses"]["401"];
403: components["responses"]["403"];
+ 429: components["responses"]["429"];
500: components["responses"]["500"];
};
};
put?: never;
- /**
- * Create template (v2)
- * @deprecated
- * @description Create a new template
- */
- post: {
- parameters: {
- query?: never;
- header?: never;
- path?: never;
- cookie?: never;
- };
- requestBody: {
- content: {
- "application/json": components["schemas"]["TemplateBuildRequestV2"];
- };
- };
- responses: {
- /** @description The build was requested successfully */
- 202: {
- headers: {
- [name: string]: unknown;
- };
- content: {
- "application/json": components["schemas"]["TemplateLegacy"];
- };
- };
- 400: components["responses"]["400"];
- 401: components["responses"]["401"];
- 500: components["responses"]["500"];
- };
- };
+ post?: never;
delete?: never;
options?: never;
head?: never;
@@ -1906,6 +1802,7 @@ export interface paths {
};
400: components["responses"]["400"];
401: components["responses"]["401"];
+ 429: components["responses"]["429"];
500: components["responses"]["500"];
};
};
@@ -1947,7 +1844,9 @@ export interface paths {
};
content?: never;
};
+ 400: components["responses"]["400"];
401: components["responses"]["401"];
+ 429: components["responses"]["429"];
500: components["responses"]["500"];
};
};
@@ -1995,6 +1894,8 @@ export interface paths {
400: components["responses"]["400"];
401: components["responses"]["401"];
403: components["responses"]["403"];
+ 409: components["responses"]["409"];
+ 429: components["responses"]["429"];
500: components["responses"]["500"];
};
};
@@ -2034,6 +1935,7 @@ export interface paths {
};
};
401: components["responses"]["401"];
+ 429: components["responses"]["429"];
500: components["responses"]["500"];
};
};
@@ -2066,6 +1968,7 @@ export interface paths {
};
400: components["responses"]["400"];
401: components["responses"]["401"];
+ 429: components["responses"]["429"];
500: components["responses"]["500"];
};
};
@@ -2108,6 +2011,7 @@ export interface paths {
};
401: components["responses"]["401"];
404: components["responses"]["404"];
+ 429: components["responses"]["429"];
500: components["responses"]["500"];
};
};
@@ -2137,6 +2041,7 @@ export interface paths {
};
401: components["responses"]["401"];
404: components["responses"]["404"];
+ 429: components["responses"]["429"];
500: components["responses"]["500"];
};
};
@@ -2856,6 +2761,10 @@ export interface components {
updatedAt: string;
};
TemplateBuildFileUpload: {
+ /** @description Request headers that must be sent with the upload request */
+ headers?: {
+ [key: string]: string;
+ };
/** @description Whether the file is already present in the cache */
present: boolean;
/** @description Url where the file should be uploaded to */
@@ -2870,7 +2779,8 @@ export interface components {
*/
logEntries: components["schemas"]["BuildLogEntry"][];
/**
- * @description Build logs
+ * @deprecated
+ * @description Build logs (always empty since the V1 build path was removed, use logEntries)
* @default []
*/
logs: string[];
@@ -2886,31 +2796,6 @@ export interface components {
*/
logs: components["schemas"]["BuildLogEntry"][];
};
- TemplateBuildRequest: {
- /** @description Alias of the template */
- alias?: string;
- cpuCount?: components["schemas"]["CPUCount"];
- /** @description Dockerfile for the template */
- dockerfile: string;
- memoryMB?: components["schemas"]["MemoryMB"];
- /** @description Ready check command to execute in the template after the build */
- readyCmd?: string;
- /** @description Start command to execute in the template after the build */
- startCmd?: string;
- /** @description Identifier of the team */
- teamID?: string;
- };
- TemplateBuildRequestV2: {
- /** @description Alias of the template */
- alias: string;
- cpuCount?: components["schemas"]["CPUCount"];
- memoryMB?: components["schemas"]["MemoryMB"];
- /**
- * @deprecated
- * @description Identifier of the team
- */
- teamID?: string;
- };
TemplateBuildRequestV3: {
/**
* @deprecated
@@ -2930,6 +2815,7 @@ export interface components {
*/
teamID?: string;
};
+ /** @description Exactly one of fromImage or fromTemplate must be given and non-empty. */
TemplateBuildStartV2: {
/**
* @description Whether the whole build should be forced to run regardless of the cache
@@ -2956,46 +2842,6 @@ export interface components {
* @enum {string}
*/
TemplateBuildStatus: "building" | "waiting" | "ready" | "error";
- TemplateLegacy: {
- /** @description Aliases of the template */
- aliases: string[];
- /**
- * Format: int32
- * @description Number of times the template was built
- */
- buildCount: number;
- /** @description Identifier of the last successful build for given template */
- buildID: string;
- cpuCount: components["schemas"]["CPUCount"];
- /**
- * Format: date-time
- * @description Time when the template was created
- */
- createdAt: string;
- createdBy: components["schemas"]["TeamUser"] | null;
- diskSizeMB: components["schemas"]["DiskSizeMB"];
- envdVersion: components["schemas"]["EnvdVersion"];
- /**
- * Format: date-time
- * @description Time when the template was last used
- */
- lastSpawnedAt: string | null;
- memoryMB: components["schemas"]["MemoryMB"];
- /** @description Whether the template is public or only accessible by the team */
- public: boolean;
- /**
- * Format: int64
- * @description Number of times the template was used
- */
- spawnCount: number;
- /** @description Identifier of the template */
- templateID: string;
- /**
- * Format: date-time
- * @description Time when the template was last updated
- */
- updatedAt: string;
- };
TemplateRequestResponseV3: {
/**
* @deprecated
@@ -3158,6 +3004,11 @@ export interface components {
/** @description Too many requests */
429: {
headers: {
+ /**
+ * @description When present, the number of seconds to wait before retrying the request.
+ * @example 30
+ */
+ "Retry-After"?: number;
[name: string]: unknown;
};
content: {
diff --git a/packages/js-sdk/src/template/types.ts b/packages/js-sdk/src/template/types.ts
index 37b12c017..b608670be 100644
--- a/packages/js-sdk/src/template/types.ts
+++ b/packages/js-sdk/src/template/types.ts
@@ -140,8 +140,8 @@ export type TemplateBuildStatusResponse = {
*/
logEntries: LogEntry[]
/**
- * Build logs (raw strings).
- * @deprecated Use `logEntries` instead.
+ * Build logs (raw strings). Always empty since the V1 build path was removed.
+ * @deprecated Use `logEntries` instead. Will be removed in the next major version.
*/
logs: string[]
/**
diff --git a/packages/python-sdk/e2b/api/client/api/sandboxes/delete_sandboxes_sandbox_id.py b/packages/python-sdk/e2b/api/client/api/sandboxes/delete_sandboxes_sandbox_id.py
index cc3f9d372..51a3271b5 100644
--- a/packages/python-sdk/e2b/api/client/api/sandboxes/delete_sandboxes_sandbox_id.py
+++ b/packages/python-sdk/e2b/api/client/api/sandboxes/delete_sandboxes_sandbox_id.py
@@ -34,6 +34,10 @@ def _parse_response(
response_404 = Error.from_dict(response.json())
return response_404
+ if response.status_code == 429:
+ response_429 = Error.from_dict(response.json())
+
+ return response_429
if response.status_code == 500:
response_500 = Error.from_dict(response.json())
diff --git a/packages/python-sdk/e2b/api/client/api/sandboxes/get_sandboxes.py b/packages/python-sdk/e2b/api/client/api/sandboxes/get_sandboxes.py
index 750ed96e0..0da7eab1e 100644
--- a/packages/python-sdk/e2b/api/client/api/sandboxes/get_sandboxes.py
+++ b/packages/python-sdk/e2b/api/client/api/sandboxes/get_sandboxes.py
@@ -49,6 +49,10 @@ def _parse_response(
response_401 = Error.from_dict(response.json())
return response_401
+ if response.status_code == 429:
+ response_429 = Error.from_dict(response.json())
+
+ return response_429
if response.status_code == 500:
response_500 = Error.from_dict(response.json())
diff --git a/packages/python-sdk/e2b/api/client/api/sandboxes/get_sandboxes_metrics.py b/packages/python-sdk/e2b/api/client/api/sandboxes/get_sandboxes_metrics.py
index 5554bc76c..623601079 100644
--- a/packages/python-sdk/e2b/api/client/api/sandboxes/get_sandboxes_metrics.py
+++ b/packages/python-sdk/e2b/api/client/api/sandboxes/get_sandboxes_metrics.py
@@ -46,6 +46,10 @@ def _parse_response(
response_401 = Error.from_dict(response.json())
return response_401
+ if response.status_code == 429:
+ response_429 = Error.from_dict(response.json())
+
+ return response_429
if response.status_code == 500:
response_500 = Error.from_dict(response.json())
diff --git a/packages/python-sdk/e2b/api/client/api/sandboxes/get_sandboxes_sandbox_id.py b/packages/python-sdk/e2b/api/client/api/sandboxes/get_sandboxes_sandbox_id.py
index 59781ab7b..503120bc4 100644
--- a/packages/python-sdk/e2b/api/client/api/sandboxes/get_sandboxes_sandbox_id.py
+++ b/packages/python-sdk/e2b/api/client/api/sandboxes/get_sandboxes_sandbox_id.py
@@ -36,6 +36,10 @@ def _parse_response(
response_404 = Error.from_dict(response.json())
return response_404
+ if response.status_code == 429:
+ response_429 = Error.from_dict(response.json())
+
+ return response_429
if response.status_code == 500:
response_500 = Error.from_dict(response.json())
diff --git a/packages/python-sdk/e2b/api/client/api/sandboxes/get_sandboxes_sandbox_id_logs.py b/packages/python-sdk/e2b/api/client/api/sandboxes/get_sandboxes_sandbox_id_logs.py
index 49d13223e..a9785561b 100644
--- a/packages/python-sdk/e2b/api/client/api/sandboxes/get_sandboxes_sandbox_id_logs.py
+++ b/packages/python-sdk/e2b/api/client/api/sandboxes/get_sandboxes_sandbox_id_logs.py
@@ -48,6 +48,10 @@ def _parse_response(
response_404 = Error.from_dict(response.json())
return response_404
+ if response.status_code == 429:
+ response_429 = Error.from_dict(response.json())
+
+ return response_429
if response.status_code == 500:
response_500 = Error.from_dict(response.json())
diff --git a/packages/python-sdk/e2b/api/client/api/sandboxes/get_sandboxes_sandbox_id_metrics.py b/packages/python-sdk/e2b/api/client/api/sandboxes/get_sandboxes_sandbox_id_metrics.py
index 48343566d..92c08c6a8 100644
--- a/packages/python-sdk/e2b/api/client/api/sandboxes/get_sandboxes_sandbox_id_metrics.py
+++ b/packages/python-sdk/e2b/api/client/api/sandboxes/get_sandboxes_sandbox_id_metrics.py
@@ -57,6 +57,10 @@ def _parse_response(
response_404 = Error.from_dict(response.json())
return response_404
+ if response.status_code == 429:
+ response_429 = Error.from_dict(response.json())
+
+ return response_429
if response.status_code == 500:
response_500 = Error.from_dict(response.json())
diff --git a/packages/python-sdk/e2b/api/client/api/sandboxes/get_v2_sandboxes.py b/packages/python-sdk/e2b/api/client/api/sandboxes/get_v2_sandboxes.py
index 90ce4ce2d..b4c6e19c1 100644
--- a/packages/python-sdk/e2b/api/client/api/sandboxes/get_v2_sandboxes.py
+++ b/packages/python-sdk/e2b/api/client/api/sandboxes/get_v2_sandboxes.py
@@ -85,6 +85,10 @@ def _parse_response(
response_401 = Error.from_dict(response.json())
return response_401
+ if response.status_code == 429:
+ response_429 = Error.from_dict(response.json())
+
+ return response_429
if response.status_code == 500:
response_500 = Error.from_dict(response.json())
diff --git a/packages/python-sdk/e2b/api/client/api/sandboxes/get_v_2_sandboxes_sandbox_id_logs.py b/packages/python-sdk/e2b/api/client/api/sandboxes/get_v_2_sandboxes_sandbox_id_logs.py
index b3cc1dad1..0bc7487cd 100644
--- a/packages/python-sdk/e2b/api/client/api/sandboxes/get_v_2_sandboxes_sandbox_id_logs.py
+++ b/packages/python-sdk/e2b/api/client/api/sandboxes/get_v_2_sandboxes_sandbox_id_logs.py
@@ -67,6 +67,10 @@ def _parse_response(
response_404 = Error.from_dict(response.json())
return response_404
+ if response.status_code == 429:
+ response_429 = Error.from_dict(response.json())
+
+ return response_429
if response.status_code == 500:
response_500 = Error.from_dict(response.json())
diff --git a/packages/python-sdk/e2b/api/client/api/sandboxes/post_sandboxes.py b/packages/python-sdk/e2b/api/client/api/sandboxes/post_sandboxes.py
index 56f5dc155..5bce9d8b3 100644
--- a/packages/python-sdk/e2b/api/client/api/sandboxes/post_sandboxes.py
+++ b/packages/python-sdk/e2b/api/client/api/sandboxes/post_sandboxes.py
@@ -45,6 +45,10 @@ def _parse_response(
response_401 = Error.from_dict(response.json())
return response_401
+ if response.status_code == 429:
+ response_429 = Error.from_dict(response.json())
+
+ return response_429
if response.status_code == 500:
response_500 = Error.from_dict(response.json())
diff --git a/packages/python-sdk/e2b/api/client/api/sandboxes/post_sandboxes_sandbox_id_connect.py b/packages/python-sdk/e2b/api/client/api/sandboxes/post_sandboxes_sandbox_id_connect.py
index b2562c449..7ecdccf34 100644
--- a/packages/python-sdk/e2b/api/client/api/sandboxes/post_sandboxes_sandbox_id_connect.py
+++ b/packages/python-sdk/e2b/api/client/api/sandboxes/post_sandboxes_sandbox_id_connect.py
@@ -58,6 +58,10 @@ def _parse_response(
response_409 = Error.from_dict(response.json())
return response_409
+ if response.status_code == 429:
+ response_429 = Error.from_dict(response.json())
+
+ return response_429
if response.status_code == 500:
response_500 = Error.from_dict(response.json())
diff --git a/packages/python-sdk/e2b/api/client/api/sandboxes/post_sandboxes_sandbox_id_fork.py b/packages/python-sdk/e2b/api/client/api/sandboxes/post_sandboxes_sandbox_id_fork.py
index 9d09e939e..fbb5cca4f 100644
--- a/packages/python-sdk/e2b/api/client/api/sandboxes/post_sandboxes_sandbox_id_fork.py
+++ b/packages/python-sdk/e2b/api/client/api/sandboxes/post_sandboxes_sandbox_id_fork.py
@@ -55,6 +55,10 @@ def _parse_response(
response_409 = Error.from_dict(response.json())
return response_409
+ if response.status_code == 429:
+ response_429 = Error.from_dict(response.json())
+
+ return response_429
if response.status_code == 500:
response_500 = Error.from_dict(response.json())
diff --git a/packages/python-sdk/e2b/api/client/api/sandboxes/post_sandboxes_sandbox_id_pause.py b/packages/python-sdk/e2b/api/client/api/sandboxes/post_sandboxes_sandbox_id_pause.py
index a145bc4d3..f0989b19e 100644
--- a/packages/python-sdk/e2b/api/client/api/sandboxes/post_sandboxes_sandbox_id_pause.py
+++ b/packages/python-sdk/e2b/api/client/api/sandboxes/post_sandboxes_sandbox_id_pause.py
@@ -48,6 +48,10 @@ def _parse_response(
response_409 = Error.from_dict(response.json())
return response_409
+ if response.status_code == 429:
+ response_429 = Error.from_dict(response.json())
+
+ return response_429
if response.status_code == 500:
response_500 = Error.from_dict(response.json())
diff --git a/packages/python-sdk/e2b/api/client/api/sandboxes/post_sandboxes_sandbox_id_refreshes.py b/packages/python-sdk/e2b/api/client/api/sandboxes/post_sandboxes_sandbox_id_refreshes.py
index b9ed87127..78ece1e90 100644
--- a/packages/python-sdk/e2b/api/client/api/sandboxes/post_sandboxes_sandbox_id_refreshes.py
+++ b/packages/python-sdk/e2b/api/client/api/sandboxes/post_sandboxes_sandbox_id_refreshes.py
@@ -44,6 +44,10 @@ def _parse_response(
response_404 = Error.from_dict(response.json())
return response_404
+ if response.status_code == 429:
+ response_429 = Error.from_dict(response.json())
+
+ return response_429
if client.raise_on_unexpected_status:
raise errors.UnexpectedStatus(response.status_code, response.content)
else:
diff --git a/packages/python-sdk/e2b/api/client/api/sandboxes/post_sandboxes_sandbox_id_resume.py b/packages/python-sdk/e2b/api/client/api/sandboxes/post_sandboxes_sandbox_id_resume.py
index 6e9116258..7232c98b8 100644
--- a/packages/python-sdk/e2b/api/client/api/sandboxes/post_sandboxes_sandbox_id_resume.py
+++ b/packages/python-sdk/e2b/api/client/api/sandboxes/post_sandboxes_sandbox_id_resume.py
@@ -54,6 +54,10 @@ def _parse_response(
response_409 = Error.from_dict(response.json())
return response_409
+ if response.status_code == 429:
+ response_429 = Error.from_dict(response.json())
+
+ return response_429
if response.status_code == 500:
response_500 = Error.from_dict(response.json())
diff --git a/packages/python-sdk/e2b/api/client/api/sandboxes/post_sandboxes_sandbox_id_snapshots.py b/packages/python-sdk/e2b/api/client/api/sandboxes/post_sandboxes_sandbox_id_snapshots.py
index 83e17e5e6..058b41c30 100644
--- a/packages/python-sdk/e2b/api/client/api/sandboxes/post_sandboxes_sandbox_id_snapshots.py
+++ b/packages/python-sdk/e2b/api/client/api/sandboxes/post_sandboxes_sandbox_id_snapshots.py
@@ -50,6 +50,10 @@ def _parse_response(
response_404 = Error.from_dict(response.json())
return response_404
+ if response.status_code == 429:
+ response_429 = Error.from_dict(response.json())
+
+ return response_429
if response.status_code == 500:
response_500 = Error.from_dict(response.json())
diff --git a/packages/python-sdk/e2b/api/client/api/sandboxes/post_sandboxes_sandbox_id_timeout.py b/packages/python-sdk/e2b/api/client/api/sandboxes/post_sandboxes_sandbox_id_timeout.py
index a472b05b3..4dbfc62de 100644
--- a/packages/python-sdk/e2b/api/client/api/sandboxes/post_sandboxes_sandbox_id_timeout.py
+++ b/packages/python-sdk/e2b/api/client/api/sandboxes/post_sandboxes_sandbox_id_timeout.py
@@ -44,6 +44,10 @@ def _parse_response(
response_404 = Error.from_dict(response.json())
return response_404
+ if response.status_code == 429:
+ response_429 = Error.from_dict(response.json())
+
+ return response_429
if response.status_code == 500:
response_500 = Error.from_dict(response.json())
diff --git a/packages/python-sdk/e2b/api/client/api/sandboxes/put_sandboxes_sandbox_id_network.py b/packages/python-sdk/e2b/api/client/api/sandboxes/put_sandboxes_sandbox_id_network.py
index aefbc9e48..c64ffc077 100644
--- a/packages/python-sdk/e2b/api/client/api/sandboxes/put_sandboxes_sandbox_id_network.py
+++ b/packages/python-sdk/e2b/api/client/api/sandboxes/put_sandboxes_sandbox_id_network.py
@@ -48,6 +48,10 @@ def _parse_response(
response_409 = Error.from_dict(response.json())
return response_409
+ if response.status_code == 429:
+ response_429 = Error.from_dict(response.json())
+
+ return response_429
if response.status_code == 500:
response_500 = Error.from_dict(response.json())
diff --git a/packages/python-sdk/e2b/api/client/api/snapshots/get_snapshots.py b/packages/python-sdk/e2b/api/client/api/snapshots/get_snapshots.py
index 3f200588f..2bc10c71f 100644
--- a/packages/python-sdk/e2b/api/client/api/snapshots/get_snapshots.py
+++ b/packages/python-sdk/e2b/api/client/api/snapshots/get_snapshots.py
@@ -54,6 +54,10 @@ def _parse_response(
response_401 = Error.from_dict(response.json())
return response_401
+ if response.status_code == 429:
+ response_429 = Error.from_dict(response.json())
+
+ return response_429
if response.status_code == 500:
response_500 = Error.from_dict(response.json())
diff --git a/packages/python-sdk/e2b/api/client/api/tags/delete_templates_tags.py b/packages/python-sdk/e2b/api/client/api/tags/delete_templates_tags.py
index 6ab1f6d25..82f920b0c 100644
--- a/packages/python-sdk/e2b/api/client/api/tags/delete_templates_tags.py
+++ b/packages/python-sdk/e2b/api/client/api/tags/delete_templates_tags.py
@@ -47,6 +47,10 @@ def _parse_response(
response_404 = Error.from_dict(response.json())
return response_404
+ if response.status_code == 429:
+ response_429 = Error.from_dict(response.json())
+
+ return response_429
if response.status_code == 500:
response_500 = Error.from_dict(response.json())
diff --git a/packages/python-sdk/e2b/api/client/api/tags/get_templates_template_id_tags.py b/packages/python-sdk/e2b/api/client/api/tags/get_templates_template_id_tags.py
index 636906bee..1d290f176 100644
--- a/packages/python-sdk/e2b/api/client/api/tags/get_templates_template_id_tags.py
+++ b/packages/python-sdk/e2b/api/client/api/tags/get_templates_template_id_tags.py
@@ -45,6 +45,10 @@ def _parse_response(
response_404 = Error.from_dict(response.json())
return response_404
+ if response.status_code == 429:
+ response_429 = Error.from_dict(response.json())
+
+ return response_429
if response.status_code == 500:
response_500 = Error.from_dict(response.json())
diff --git a/packages/python-sdk/e2b/api/client/api/tags/post_templates_tags.py b/packages/python-sdk/e2b/api/client/api/tags/post_templates_tags.py
index ad36cfdc0..db1c09f3b 100644
--- a/packages/python-sdk/e2b/api/client/api/tags/post_templates_tags.py
+++ b/packages/python-sdk/e2b/api/client/api/tags/post_templates_tags.py
@@ -49,6 +49,10 @@ def _parse_response(
response_404 = Error.from_dict(response.json())
return response_404
+ if response.status_code == 429:
+ response_429 = Error.from_dict(response.json())
+
+ return response_429
if response.status_code == 500:
response_500 = Error.from_dict(response.json())
diff --git a/packages/python-sdk/e2b/api/client/api/templates/delete_templates_template_id.py b/packages/python-sdk/e2b/api/client/api/templates/delete_templates_template_id.py
index 1cc2ea953..7b83d8420 100644
--- a/packages/python-sdk/e2b/api/client/api/templates/delete_templates_template_id.py
+++ b/packages/python-sdk/e2b/api/client/api/templates/delete_templates_template_id.py
@@ -30,6 +30,10 @@ def _parse_response(
response_401 = Error.from_dict(response.json())
return response_401
+ if response.status_code == 429:
+ response_429 = Error.from_dict(response.json())
+
+ return response_429
if response.status_code == 500:
response_500 = Error.from_dict(response.json())
diff --git a/packages/python-sdk/e2b/api/client/api/templates/get_templates.py b/packages/python-sdk/e2b/api/client/api/templates/get_templates.py
index 97d2e17a1..de3c19a9a 100644
--- a/packages/python-sdk/e2b/api/client/api/templates/get_templates.py
+++ b/packages/python-sdk/e2b/api/client/api/templates/get_templates.py
@@ -45,6 +45,10 @@ def _parse_response(
response_401 = Error.from_dict(response.json())
return response_401
+ if response.status_code == 429:
+ response_429 = Error.from_dict(response.json())
+
+ return response_429
if response.status_code == 500:
response_500 = Error.from_dict(response.json())
diff --git a/packages/python-sdk/e2b/api/client/api/templates/get_templates_aliases_alias.py b/packages/python-sdk/e2b/api/client/api/templates/get_templates_aliases_alias.py
index dcfe69405..956ddcce3 100644
--- a/packages/python-sdk/e2b/api/client/api/templates/get_templates_aliases_alias.py
+++ b/packages/python-sdk/e2b/api/client/api/templates/get_templates_aliases_alias.py
@@ -40,6 +40,10 @@ def _parse_response(
response_404 = Error.from_dict(response.json())
return response_404
+ if response.status_code == 429:
+ response_429 = Error.from_dict(response.json())
+
+ return response_429
if response.status_code == 500:
response_500 = Error.from_dict(response.json())
diff --git a/packages/python-sdk/e2b/api/client/api/templates/get_templates_template_id.py b/packages/python-sdk/e2b/api/client/api/templates/get_templates_template_id.py
index 444405217..d71c40693 100644
--- a/packages/python-sdk/e2b/api/client/api/templates/get_templates_template_id.py
+++ b/packages/python-sdk/e2b/api/client/api/templates/get_templates_template_id.py
@@ -44,6 +44,10 @@ def _parse_response(
response_401 = Error.from_dict(response.json())
return response_401
+ if response.status_code == 429:
+ response_429 = Error.from_dict(response.json())
+
+ return response_429
if response.status_code == 500:
response_500 = Error.from_dict(response.json())
diff --git a/packages/python-sdk/e2b/api/client/api/templates/get_templates_template_id_builds_build_id_logs.py b/packages/python-sdk/e2b/api/client/api/templates/get_templates_template_id_builds_build_id_logs.py
index f396c62ba..d1382bc1a 100644
--- a/packages/python-sdk/e2b/api/client/api/templates/get_templates_template_id_builds_build_id_logs.py
+++ b/packages/python-sdk/e2b/api/client/api/templates/get_templates_template_id_builds_build_id_logs.py
@@ -73,6 +73,10 @@ def _parse_response(
response_404 = Error.from_dict(response.json())
return response_404
+ if response.status_code == 429:
+ response_429 = Error.from_dict(response.json())
+
+ return response_429
if response.status_code == 500:
response_500 = Error.from_dict(response.json())
diff --git a/packages/python-sdk/e2b/api/client/api/templates/get_templates_template_id_builds_build_id_status.py b/packages/python-sdk/e2b/api/client/api/templates/get_templates_template_id_builds_build_id_status.py
index 07bb2d5ed..26e758ad6 100644
--- a/packages/python-sdk/e2b/api/client/api/templates/get_templates_template_id_builds_build_id_status.py
+++ b/packages/python-sdk/e2b/api/client/api/templates/get_templates_template_id_builds_build_id_status.py
@@ -57,6 +57,10 @@ def _parse_response(
response_404 = Error.from_dict(response.json())
return response_404
+ if response.status_code == 429:
+ response_429 = Error.from_dict(response.json())
+
+ return response_429
if response.status_code == 500:
response_500 = Error.from_dict(response.json())
diff --git a/packages/python-sdk/e2b/api/client/api/templates/get_templates_template_id_files_hash.py b/packages/python-sdk/e2b/api/client/api/templates/get_templates_template_id_files_hash.py
index 959dbf41a..834de12cf 100644
--- a/packages/python-sdk/e2b/api/client/api/templates/get_templates_template_id_files_hash.py
+++ b/packages/python-sdk/e2b/api/client/api/templates/get_templates_template_id_files_hash.py
@@ -41,6 +41,10 @@ def _parse_response(
response_404 = Error.from_dict(response.json())
return response_404
+ if response.status_code == 429:
+ response_429 = Error.from_dict(response.json())
+
+ return response_429
if response.status_code == 500:
response_500 = Error.from_dict(response.json())
diff --git a/packages/python-sdk/e2b/api/client/api/templates/get_v2_templates.py b/packages/python-sdk/e2b/api/client/api/templates/get_v2_templates.py
index 915156e95..d8a35069b 100644
--- a/packages/python-sdk/e2b/api/client/api/templates/get_v2_templates.py
+++ b/packages/python-sdk/e2b/api/client/api/templates/get_v2_templates.py
@@ -59,6 +59,10 @@ def _parse_response(
response_403 = Error.from_dict(response.json())
return response_403
+ if response.status_code == 429:
+ response_429 = Error.from_dict(response.json())
+
+ return response_429
if response.status_code == 500:
response_500 = Error.from_dict(response.json())
diff --git a/packages/python-sdk/e2b/api/client/api/templates/patch_templates_template_id.py b/packages/python-sdk/e2b/api/client/api/templates/patch_templates_template_id.py
index 7ea0a857c..d57bc133f 100644
--- a/packages/python-sdk/e2b/api/client/api/templates/patch_templates_template_id.py
+++ b/packages/python-sdk/e2b/api/client/api/templates/patch_templates_template_id.py
@@ -44,6 +44,10 @@ def _parse_response(
response_401 = Error.from_dict(response.json())
return response_401
+ if response.status_code == 429:
+ response_429 = Error.from_dict(response.json())
+
+ return response_429
if response.status_code == 500:
response_500 = Error.from_dict(response.json())
diff --git a/packages/python-sdk/e2b/api/client/api/templates/patch_v_2_templates_template_id.py b/packages/python-sdk/e2b/api/client/api/templates/patch_v_2_templates_template_id.py
index 699626d41..e73acca7a 100644
--- a/packages/python-sdk/e2b/api/client/api/templates/patch_v_2_templates_template_id.py
+++ b/packages/python-sdk/e2b/api/client/api/templates/patch_v_2_templates_template_id.py
@@ -46,6 +46,10 @@ def _parse_response(
response_401 = Error.from_dict(response.json())
return response_401
+ if response.status_code == 429:
+ response_429 = Error.from_dict(response.json())
+
+ return response_429
if response.status_code == 500:
response_500 = Error.from_dict(response.json())
diff --git a/packages/python-sdk/e2b/api/client/api/templates/post_templates.py b/packages/python-sdk/e2b/api/client/api/templates/post_templates.py
deleted file mode 100644
index e561b2adb..000000000
--- a/packages/python-sdk/e2b/api/client/api/templates/post_templates.py
+++ /dev/null
@@ -1,180 +0,0 @@
-from http import HTTPStatus
-from typing import Any, Optional, Union
-
-import httpx
-
-from ... import errors
-from ...client import AuthenticatedClient, Client
-from ...models.error import Error
-from ...models.template_build_request import TemplateBuildRequest
-from ...models.template_legacy import TemplateLegacy
-from ...types import Response
-
-
-def _get_kwargs(
- *,
- body: TemplateBuildRequest,
-) -> dict[str, Any]:
- headers: dict[str, Any] = {}
-
- _kwargs: dict[str, Any] = {
- "method": "post",
- "url": "/templates",
- }
-
- _kwargs["json"] = body.to_dict()
-
- headers["Content-Type"] = "application/json"
-
- _kwargs["headers"] = headers
- return _kwargs
-
-
-def _parse_response(
- *, client: Union[AuthenticatedClient, Client], response: httpx.Response
-) -> Optional[Union[Error, TemplateLegacy]]:
- if response.status_code == 202:
- response_202 = TemplateLegacy.from_dict(response.json())
-
- return response_202
- if response.status_code == 400:
- response_400 = Error.from_dict(response.json())
-
- return response_400
- if response.status_code == 401:
- response_401 = Error.from_dict(response.json())
-
- return response_401
- if response.status_code == 500:
- response_500 = Error.from_dict(response.json())
-
- return response_500
- if client.raise_on_unexpected_status:
- raise errors.UnexpectedStatus(response.status_code, response.content)
- else:
- return None
-
-
-def _build_response(
- *, client: Union[AuthenticatedClient, Client], response: httpx.Response
-) -> Response[Union[Error, TemplateLegacy]]:
- return Response(
- status_code=HTTPStatus(response.status_code),
- content=response.content,
- headers=response.headers,
- parsed=_parse_response(client=client, response=response),
- )
-
-
-def sync_detailed(
- *,
- client: AuthenticatedClient,
- body: TemplateBuildRequest,
-) -> Response[Union[Error, TemplateLegacy]]:
- """Create template
-
- Create a new template
-
- Args:
- body (TemplateBuildRequest):
-
- Raises:
- errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
- httpx.TimeoutException: If the request takes longer than Client.timeout.
-
- Returns:
- Response[Union[Error, TemplateLegacy]]
- """
-
- kwargs = _get_kwargs(
- body=body,
- )
-
- response = client.get_httpx_client().request(
- **kwargs,
- )
-
- return _build_response(client=client, response=response)
-
-
-def sync(
- *,
- client: AuthenticatedClient,
- body: TemplateBuildRequest,
-) -> Optional[Union[Error, TemplateLegacy]]:
- """Create template
-
- Create a new template
-
- Args:
- body (TemplateBuildRequest):
-
- Raises:
- errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
- httpx.TimeoutException: If the request takes longer than Client.timeout.
-
- Returns:
- Union[Error, TemplateLegacy]
- """
-
- return sync_detailed(
- client=client,
- body=body,
- ).parsed
-
-
-async def asyncio_detailed(
- *,
- client: AuthenticatedClient,
- body: TemplateBuildRequest,
-) -> Response[Union[Error, TemplateLegacy]]:
- """Create template
-
- Create a new template
-
- Args:
- body (TemplateBuildRequest):
-
- Raises:
- errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
- httpx.TimeoutException: If the request takes longer than Client.timeout.
-
- Returns:
- Response[Union[Error, TemplateLegacy]]
- """
-
- kwargs = _get_kwargs(
- body=body,
- )
-
- response = await client.get_async_httpx_client().request(**kwargs)
-
- return _build_response(client=client, response=response)
-
-
-async def asyncio(
- *,
- client: AuthenticatedClient,
- body: TemplateBuildRequest,
-) -> Optional[Union[Error, TemplateLegacy]]:
- """Create template
-
- Create a new template
-
- Args:
- body (TemplateBuildRequest):
-
- Raises:
- errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
- httpx.TimeoutException: If the request takes longer than Client.timeout.
-
- Returns:
- Union[Error, TemplateLegacy]
- """
-
- return (
- await asyncio_detailed(
- client=client,
- body=body,
- )
- ).parsed
diff --git a/packages/python-sdk/e2b/api/client/api/templates/post_templates_template_id.py b/packages/python-sdk/e2b/api/client/api/templates/post_templates_template_id.py
deleted file mode 100644
index 067d1ebc6..000000000
--- a/packages/python-sdk/e2b/api/client/api/templates/post_templates_template_id.py
+++ /dev/null
@@ -1,189 +0,0 @@
-from http import HTTPStatus
-from typing import Any, Optional, Union
-
-import httpx
-
-from ... import errors
-from ...client import AuthenticatedClient, Client
-from ...models.error import Error
-from ...models.template_build_request import TemplateBuildRequest
-from ...models.template_legacy import TemplateLegacy
-from ...types import Response
-
-
-def _get_kwargs(
- template_id: str,
- *,
- body: TemplateBuildRequest,
-) -> dict[str, Any]:
- headers: dict[str, Any] = {}
-
- _kwargs: dict[str, Any] = {
- "method": "post",
- "url": f"/templates/{template_id}",
- }
-
- _kwargs["json"] = body.to_dict()
-
- headers["Content-Type"] = "application/json"
-
- _kwargs["headers"] = headers
- return _kwargs
-
-
-def _parse_response(
- *, client: Union[AuthenticatedClient, Client], response: httpx.Response
-) -> Optional[Union[Error, TemplateLegacy]]:
- if response.status_code == 202:
- response_202 = TemplateLegacy.from_dict(response.json())
-
- return response_202
- if response.status_code == 401:
- response_401 = Error.from_dict(response.json())
-
- return response_401
- if response.status_code == 500:
- response_500 = Error.from_dict(response.json())
-
- return response_500
- if client.raise_on_unexpected_status:
- raise errors.UnexpectedStatus(response.status_code, response.content)
- else:
- return None
-
-
-def _build_response(
- *, client: Union[AuthenticatedClient, Client], response: httpx.Response
-) -> Response[Union[Error, TemplateLegacy]]:
- return Response(
- status_code=HTTPStatus(response.status_code),
- content=response.content,
- headers=response.headers,
- parsed=_parse_response(client=client, response=response),
- )
-
-
-def sync_detailed(
- template_id: str,
- *,
- client: AuthenticatedClient,
- body: TemplateBuildRequest,
-) -> Response[Union[Error, TemplateLegacy]]:
- """Rebuild template
-
- Rebuild an template
-
- Args:
- template_id (str):
- body (TemplateBuildRequest):
-
- Raises:
- errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
- httpx.TimeoutException: If the request takes longer than Client.timeout.
-
- Returns:
- Response[Union[Error, TemplateLegacy]]
- """
-
- kwargs = _get_kwargs(
- template_id=template_id,
- body=body,
- )
-
- response = client.get_httpx_client().request(
- **kwargs,
- )
-
- return _build_response(client=client, response=response)
-
-
-def sync(
- template_id: str,
- *,
- client: AuthenticatedClient,
- body: TemplateBuildRequest,
-) -> Optional[Union[Error, TemplateLegacy]]:
- """Rebuild template
-
- Rebuild an template
-
- Args:
- template_id (str):
- body (TemplateBuildRequest):
-
- Raises:
- errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
- httpx.TimeoutException: If the request takes longer than Client.timeout.
-
- Returns:
- Union[Error, TemplateLegacy]
- """
-
- return sync_detailed(
- template_id=template_id,
- client=client,
- body=body,
- ).parsed
-
-
-async def asyncio_detailed(
- template_id: str,
- *,
- client: AuthenticatedClient,
- body: TemplateBuildRequest,
-) -> Response[Union[Error, TemplateLegacy]]:
- """Rebuild template
-
- Rebuild an template
-
- Args:
- template_id (str):
- body (TemplateBuildRequest):
-
- Raises:
- errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
- httpx.TimeoutException: If the request takes longer than Client.timeout.
-
- Returns:
- Response[Union[Error, TemplateLegacy]]
- """
-
- kwargs = _get_kwargs(
- template_id=template_id,
- body=body,
- )
-
- response = await client.get_async_httpx_client().request(**kwargs)
-
- return _build_response(client=client, response=response)
-
-
-async def asyncio(
- template_id: str,
- *,
- client: AuthenticatedClient,
- body: TemplateBuildRequest,
-) -> Optional[Union[Error, TemplateLegacy]]:
- """Rebuild template
-
- Rebuild an template
-
- Args:
- template_id (str):
- body (TemplateBuildRequest):
-
- Raises:
- errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
- httpx.TimeoutException: If the request takes longer than Client.timeout.
-
- Returns:
- Union[Error, TemplateLegacy]
- """
-
- return (
- await asyncio_detailed(
- template_id=template_id,
- client=client,
- body=body,
- )
- ).parsed
diff --git a/packages/python-sdk/e2b/api/client/api/templates/post_templates_template_id_builds_build_id.py b/packages/python-sdk/e2b/api/client/api/templates/post_templates_template_id_builds_build_id.py
deleted file mode 100644
index bab91c658..000000000
--- a/packages/python-sdk/e2b/api/client/api/templates/post_templates_template_id_builds_build_id.py
+++ /dev/null
@@ -1,178 +0,0 @@
-from http import HTTPStatus
-from typing import Any, Optional, Union, cast
-
-import httpx
-
-from ... import errors
-from ...client import AuthenticatedClient, Client
-from ...models.error import Error
-from ...types import Response
-
-
-def _get_kwargs(
- template_id: str,
- build_id: str,
-) -> dict[str, Any]:
- _kwargs: dict[str, Any] = {
- "method": "post",
- "url": f"/templates/{template_id}/builds/{build_id}",
- }
-
- return _kwargs
-
-
-def _parse_response(
- *, client: Union[AuthenticatedClient, Client], response: httpx.Response
-) -> Optional[Union[Any, Error]]:
- if response.status_code == 202:
- response_202 = cast(Any, None)
- return response_202
- if response.status_code == 401:
- response_401 = Error.from_dict(response.json())
-
- return response_401
- if response.status_code == 500:
- response_500 = Error.from_dict(response.json())
-
- return response_500
- if client.raise_on_unexpected_status:
- raise errors.UnexpectedStatus(response.status_code, response.content)
- else:
- return None
-
-
-def _build_response(
- *, client: Union[AuthenticatedClient, Client], response: httpx.Response
-) -> Response[Union[Any, Error]]:
- return Response(
- status_code=HTTPStatus(response.status_code),
- content=response.content,
- headers=response.headers,
- parsed=_parse_response(client=client, response=response),
- )
-
-
-def sync_detailed(
- template_id: str,
- build_id: str,
- *,
- client: AuthenticatedClient,
-) -> Response[Union[Any, Error]]:
- """Start template build
-
- Start the build
-
- Args:
- template_id (str):
- build_id (str):
-
- Raises:
- errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
- httpx.TimeoutException: If the request takes longer than Client.timeout.
-
- Returns:
- Response[Union[Any, Error]]
- """
-
- kwargs = _get_kwargs(
- template_id=template_id,
- build_id=build_id,
- )
-
- response = client.get_httpx_client().request(
- **kwargs,
- )
-
- return _build_response(client=client, response=response)
-
-
-def sync(
- template_id: str,
- build_id: str,
- *,
- client: AuthenticatedClient,
-) -> Optional[Union[Any, Error]]:
- """Start template build
-
- Start the build
-
- Args:
- template_id (str):
- build_id (str):
-
- Raises:
- errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
- httpx.TimeoutException: If the request takes longer than Client.timeout.
-
- Returns:
- Union[Any, Error]
- """
-
- return sync_detailed(
- template_id=template_id,
- build_id=build_id,
- client=client,
- ).parsed
-
-
-async def asyncio_detailed(
- template_id: str,
- build_id: str,
- *,
- client: AuthenticatedClient,
-) -> Response[Union[Any, Error]]:
- """Start template build
-
- Start the build
-
- Args:
- template_id (str):
- build_id (str):
-
- Raises:
- errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
- httpx.TimeoutException: If the request takes longer than Client.timeout.
-
- Returns:
- Response[Union[Any, Error]]
- """
-
- kwargs = _get_kwargs(
- template_id=template_id,
- build_id=build_id,
- )
-
- response = await client.get_async_httpx_client().request(**kwargs)
-
- return _build_response(client=client, response=response)
-
-
-async def asyncio(
- template_id: str,
- build_id: str,
- *,
- client: AuthenticatedClient,
-) -> Optional[Union[Any, Error]]:
- """Start template build
-
- Start the build
-
- Args:
- template_id (str):
- build_id (str):
-
- Raises:
- errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
- httpx.TimeoutException: If the request takes longer than Client.timeout.
-
- Returns:
- Union[Any, Error]
- """
-
- return (
- await asyncio_detailed(
- template_id=template_id,
- build_id=build_id,
- client=client,
- )
- ).parsed
diff --git a/packages/python-sdk/e2b/api/client/api/templates/post_v2_templates.py b/packages/python-sdk/e2b/api/client/api/templates/post_v2_templates.py
deleted file mode 100644
index 0c3f568d1..000000000
--- a/packages/python-sdk/e2b/api/client/api/templates/post_v2_templates.py
+++ /dev/null
@@ -1,180 +0,0 @@
-from http import HTTPStatus
-from typing import Any, Optional, Union
-
-import httpx
-
-from ... import errors
-from ...client import AuthenticatedClient, Client
-from ...models.error import Error
-from ...models.template_build_request_v2 import TemplateBuildRequestV2
-from ...models.template_legacy import TemplateLegacy
-from ...types import Response
-
-
-def _get_kwargs(
- *,
- body: TemplateBuildRequestV2,
-) -> dict[str, Any]:
- headers: dict[str, Any] = {}
-
- _kwargs: dict[str, Any] = {
- "method": "post",
- "url": "/v2/templates",
- }
-
- _kwargs["json"] = body.to_dict()
-
- headers["Content-Type"] = "application/json"
-
- _kwargs["headers"] = headers
- return _kwargs
-
-
-def _parse_response(
- *, client: Union[AuthenticatedClient, Client], response: httpx.Response
-) -> Optional[Union[Error, TemplateLegacy]]:
- if response.status_code == 202:
- response_202 = TemplateLegacy.from_dict(response.json())
-
- return response_202
- if response.status_code == 400:
- response_400 = Error.from_dict(response.json())
-
- return response_400
- if response.status_code == 401:
- response_401 = Error.from_dict(response.json())
-
- return response_401
- if response.status_code == 500:
- response_500 = Error.from_dict(response.json())
-
- return response_500
- if client.raise_on_unexpected_status:
- raise errors.UnexpectedStatus(response.status_code, response.content)
- else:
- return None
-
-
-def _build_response(
- *, client: Union[AuthenticatedClient, Client], response: httpx.Response
-) -> Response[Union[Error, TemplateLegacy]]:
- return Response(
- status_code=HTTPStatus(response.status_code),
- content=response.content,
- headers=response.headers,
- parsed=_parse_response(client=client, response=response),
- )
-
-
-def sync_detailed(
- *,
- client: AuthenticatedClient,
- body: TemplateBuildRequestV2,
-) -> Response[Union[Error, TemplateLegacy]]:
- """Create template (v2)
-
- Create a new template
-
- Args:
- body (TemplateBuildRequestV2):
-
- Raises:
- errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
- httpx.TimeoutException: If the request takes longer than Client.timeout.
-
- Returns:
- Response[Union[Error, TemplateLegacy]]
- """
-
- kwargs = _get_kwargs(
- body=body,
- )
-
- response = client.get_httpx_client().request(
- **kwargs,
- )
-
- return _build_response(client=client, response=response)
-
-
-def sync(
- *,
- client: AuthenticatedClient,
- body: TemplateBuildRequestV2,
-) -> Optional[Union[Error, TemplateLegacy]]:
- """Create template (v2)
-
- Create a new template
-
- Args:
- body (TemplateBuildRequestV2):
-
- Raises:
- errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
- httpx.TimeoutException: If the request takes longer than Client.timeout.
-
- Returns:
- Union[Error, TemplateLegacy]
- """
-
- return sync_detailed(
- client=client,
- body=body,
- ).parsed
-
-
-async def asyncio_detailed(
- *,
- client: AuthenticatedClient,
- body: TemplateBuildRequestV2,
-) -> Response[Union[Error, TemplateLegacy]]:
- """Create template (v2)
-
- Create a new template
-
- Args:
- body (TemplateBuildRequestV2):
-
- Raises:
- errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
- httpx.TimeoutException: If the request takes longer than Client.timeout.
-
- Returns:
- Response[Union[Error, TemplateLegacy]]
- """
-
- kwargs = _get_kwargs(
- body=body,
- )
-
- response = await client.get_async_httpx_client().request(**kwargs)
-
- return _build_response(client=client, response=response)
-
-
-async def asyncio(
- *,
- client: AuthenticatedClient,
- body: TemplateBuildRequestV2,
-) -> Optional[Union[Error, TemplateLegacy]]:
- """Create template (v2)
-
- Create a new template
-
- Args:
- body (TemplateBuildRequestV2):
-
- Raises:
- errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
- httpx.TimeoutException: If the request takes longer than Client.timeout.
-
- Returns:
- Union[Error, TemplateLegacy]
- """
-
- return (
- await asyncio_detailed(
- client=client,
- body=body,
- )
- ).parsed
diff --git a/packages/python-sdk/e2b/api/client/api/templates/post_v3_templates.py b/packages/python-sdk/e2b/api/client/api/templates/post_v3_templates.py
index fd390477d..4d4979303 100644
--- a/packages/python-sdk/e2b/api/client/api/templates/post_v3_templates.py
+++ b/packages/python-sdk/e2b/api/client/api/templates/post_v3_templates.py
@@ -49,6 +49,14 @@ def _parse_response(
response_403 = Error.from_dict(response.json())
return response_403
+ if response.status_code == 409:
+ response_409 = Error.from_dict(response.json())
+
+ return response_409
+ if response.status_code == 429:
+ response_429 = Error.from_dict(response.json())
+
+ return response_429
if response.status_code == 500:
response_500 = Error.from_dict(response.json())
diff --git a/packages/python-sdk/e2b/api/client/api/templates/post_v_2_templates_template_id_builds_build_id.py b/packages/python-sdk/e2b/api/client/api/templates/post_v_2_templates_template_id_builds_build_id.py
index 5ec52d489..d989aafd3 100644
--- a/packages/python-sdk/e2b/api/client/api/templates/post_v_2_templates_template_id_builds_build_id.py
+++ b/packages/python-sdk/e2b/api/client/api/templates/post_v_2_templates_template_id_builds_build_id.py
@@ -37,10 +37,18 @@ def _parse_response(
if response.status_code == 202:
response_202 = cast(Any, None)
return response_202
+ if response.status_code == 400:
+ response_400 = Error.from_dict(response.json())
+
+ return response_400
if response.status_code == 401:
response_401 = Error.from_dict(response.json())
return response_401
+ if response.status_code == 429:
+ response_429 = Error.from_dict(response.json())
+
+ return response_429
if response.status_code == 500:
response_500 = Error.from_dict(response.json())
@@ -76,7 +84,8 @@ def sync_detailed(
Args:
template_id (str):
build_id (str):
- body (TemplateBuildStartV2):
+ body (TemplateBuildStartV2): Exactly one of fromImage or fromTemplate must be given and
+ non-empty.
Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -113,7 +122,8 @@ def sync(
Args:
template_id (str):
build_id (str):
- body (TemplateBuildStartV2):
+ body (TemplateBuildStartV2): Exactly one of fromImage or fromTemplate must be given and
+ non-empty.
Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -145,7 +155,8 @@ async def asyncio_detailed(
Args:
template_id (str):
build_id (str):
- body (TemplateBuildStartV2):
+ body (TemplateBuildStartV2): Exactly one of fromImage or fromTemplate must be given and
+ non-empty.
Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -180,7 +191,8 @@ async def asyncio(
Args:
template_id (str):
build_id (str):
- body (TemplateBuildStartV2):
+ body (TemplateBuildStartV2): Exactly one of fromImage or fromTemplate must be given and
+ non-empty.
Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
diff --git a/packages/python-sdk/e2b/api/client/api/volumes/delete_volumes_volume_id.py b/packages/python-sdk/e2b/api/client/api/volumes/delete_volumes_volume_id.py
index 250b859df..3f9f9191f 100644
--- a/packages/python-sdk/e2b/api/client/api/volumes/delete_volumes_volume_id.py
+++ b/packages/python-sdk/e2b/api/client/api/volumes/delete_volumes_volume_id.py
@@ -34,6 +34,10 @@ def _parse_response(
response_404 = Error.from_dict(response.json())
return response_404
+ if response.status_code == 429:
+ response_429 = Error.from_dict(response.json())
+
+ return response_429
if response.status_code == 500:
response_500 = Error.from_dict(response.json())
diff --git a/packages/python-sdk/e2b/api/client/api/volumes/get_volumes.py b/packages/python-sdk/e2b/api/client/api/volumes/get_volumes.py
index 375df68ee..60f25e3f8 100644
--- a/packages/python-sdk/e2b/api/client/api/volumes/get_volumes.py
+++ b/packages/python-sdk/e2b/api/client/api/volumes/get_volumes.py
@@ -35,6 +35,10 @@ def _parse_response(
response_401 = Error.from_dict(response.json())
return response_401
+ if response.status_code == 429:
+ response_429 = Error.from_dict(response.json())
+
+ return response_429
if response.status_code == 500:
response_500 = Error.from_dict(response.json())
diff --git a/packages/python-sdk/e2b/api/client/api/volumes/get_volumes_volume_id.py b/packages/python-sdk/e2b/api/client/api/volumes/get_volumes_volume_id.py
index 9511c0670..8838d0bf0 100644
--- a/packages/python-sdk/e2b/api/client/api/volumes/get_volumes_volume_id.py
+++ b/packages/python-sdk/e2b/api/client/api/volumes/get_volumes_volume_id.py
@@ -36,6 +36,10 @@ def _parse_response(
response_404 = Error.from_dict(response.json())
return response_404
+ if response.status_code == 429:
+ response_429 = Error.from_dict(response.json())
+
+ return response_429
if response.status_code == 500:
response_500 = Error.from_dict(response.json())
diff --git a/packages/python-sdk/e2b/api/client/api/volumes/post_volumes.py b/packages/python-sdk/e2b/api/client/api/volumes/post_volumes.py
index 8967e7366..51f75f62c 100644
--- a/packages/python-sdk/e2b/api/client/api/volumes/post_volumes.py
+++ b/packages/python-sdk/e2b/api/client/api/volumes/post_volumes.py
@@ -45,6 +45,10 @@ def _parse_response(
response_401 = Error.from_dict(response.json())
return response_401
+ if response.status_code == 429:
+ response_429 = Error.from_dict(response.json())
+
+ return response_429
if response.status_code == 500:
response_500 = Error.from_dict(response.json())
diff --git a/packages/python-sdk/e2b/api/client/models/__init__.py b/packages/python-sdk/e2b/api/client/models/__init__.py
index d2acfa930..3c1f982e4 100644
--- a/packages/python-sdk/e2b/api/client/models/__init__.py
+++ b/packages/python-sdk/e2b/api/client/models/__init__.py
@@ -63,14 +63,12 @@ from .template import Template
from .template_alias_response import TemplateAliasResponse
from .template_build import TemplateBuild
from .template_build_file_upload import TemplateBuildFileUpload
+from .template_build_file_upload_headers import TemplateBuildFileUploadHeaders
from .template_build_info import TemplateBuildInfo
from .template_build_logs_response import TemplateBuildLogsResponse
-from .template_build_request import TemplateBuildRequest
-from .template_build_request_v2 import TemplateBuildRequestV2
from .template_build_request_v3 import TemplateBuildRequestV3
from .template_build_start_v2 import TemplateBuildStartV2
from .template_build_status import TemplateBuildStatus
-from .template_legacy import TemplateLegacy
from .template_request_response_v3 import TemplateRequestResponseV3
from .template_step import TemplateStep
from .template_tag import TemplateTag
@@ -144,14 +142,12 @@ __all__ = (
"TemplateAliasResponse",
"TemplateBuild",
"TemplateBuildFileUpload",
+ "TemplateBuildFileUploadHeaders",
"TemplateBuildInfo",
"TemplateBuildLogsResponse",
- "TemplateBuildRequest",
- "TemplateBuildRequestV2",
"TemplateBuildRequestV3",
"TemplateBuildStartV2",
"TemplateBuildStatus",
- "TemplateLegacy",
"TemplateRequestResponseV3",
"TemplateStep",
"TemplateTag",
diff --git a/packages/python-sdk/e2b/api/client/models/template_build_file_upload.py b/packages/python-sdk/e2b/api/client/models/template_build_file_upload.py
index a7d4e44a0..aacdf46be 100644
--- a/packages/python-sdk/e2b/api/client/models/template_build_file_upload.py
+++ b/packages/python-sdk/e2b/api/client/models/template_build_file_upload.py
@@ -1,11 +1,17 @@
from collections.abc import Mapping
-from typing import Any, TypeVar, Union
+from typing import TYPE_CHECKING, Any, TypeVar, Union
from attrs import define as _attrs_define
from attrs import field as _attrs_field
from ..types import UNSET, Unset
+if TYPE_CHECKING:
+ from ..models.template_build_file_upload_headers import (
+ TemplateBuildFileUploadHeaders,
+ )
+
+
T = TypeVar("T", bound="TemplateBuildFileUpload")
@@ -15,10 +21,13 @@ class TemplateBuildFileUpload:
Attributes:
present (bool): Whether the file is already present in the cache
url (Union[Unset, str]): Url where the file should be uploaded to
+ headers (Union[Unset, TemplateBuildFileUploadHeaders]): Request headers that must be sent with the upload
+ request
"""
present: bool
url: Union[Unset, str] = UNSET
+ headers: Union[Unset, "TemplateBuildFileUploadHeaders"] = UNSET
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
def to_dict(self) -> dict[str, Any]:
@@ -26,6 +35,10 @@ class TemplateBuildFileUpload:
url = self.url
+ headers: Union[Unset, dict[str, Any]] = UNSET
+ if not isinstance(self.headers, Unset):
+ headers = self.headers.to_dict()
+
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
@@ -35,19 +48,33 @@ class TemplateBuildFileUpload:
)
if url is not UNSET:
field_dict["url"] = url
+ if headers is not UNSET:
+ field_dict["headers"] = headers
return field_dict
@classmethod
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
+ from ..models.template_build_file_upload_headers import (
+ TemplateBuildFileUploadHeaders,
+ )
+
d = dict(src_dict)
present = d.pop("present")
url = d.pop("url", UNSET)
+ _headers = d.pop("headers", UNSET)
+ headers: Union[Unset, TemplateBuildFileUploadHeaders]
+ if isinstance(_headers, Unset):
+ headers = UNSET
+ else:
+ headers = TemplateBuildFileUploadHeaders.from_dict(_headers)
+
template_build_file_upload = cls(
present=present,
url=url,
+ headers=headers,
)
template_build_file_upload.additional_properties = d
diff --git a/packages/python-sdk/e2b/api/client/models/template_build_file_upload_headers.py b/packages/python-sdk/e2b/api/client/models/template_build_file_upload_headers.py
new file mode 100644
index 000000000..93bcb3271
--- /dev/null
+++ b/packages/python-sdk/e2b/api/client/models/template_build_file_upload_headers.py
@@ -0,0 +1,44 @@
+from collections.abc import Mapping
+from typing import Any, TypeVar
+
+from attrs import define as _attrs_define
+from attrs import field as _attrs_field
+
+T = TypeVar("T", bound="TemplateBuildFileUploadHeaders")
+
+
+@_attrs_define
+class TemplateBuildFileUploadHeaders:
+ """Request headers that must be sent with the upload request"""
+
+ additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict)
+
+ def to_dict(self) -> dict[str, Any]:
+ field_dict: dict[str, Any] = {}
+ field_dict.update(self.additional_properties)
+
+ return field_dict
+
+ @classmethod
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
+ d = dict(src_dict)
+ template_build_file_upload_headers = cls()
+
+ template_build_file_upload_headers.additional_properties = d
+ return template_build_file_upload_headers
+
+ @property
+ def additional_keys(self) -> list[str]:
+ return list(self.additional_properties.keys())
+
+ def __getitem__(self, key: str) -> str:
+ return self.additional_properties[key]
+
+ def __setitem__(self, key: str, value: str) -> None:
+ self.additional_properties[key] = value
+
+ def __delitem__(self, key: str) -> None:
+ del self.additional_properties[key]
+
+ def __contains__(self, key: str) -> bool:
+ return key in self.additional_properties
diff --git a/packages/python-sdk/e2b/api/client/models/template_build_info.py b/packages/python-sdk/e2b/api/client/models/template_build_info.py
index 91e1d3fbd..3019ae860 100644
--- a/packages/python-sdk/e2b/api/client/models/template_build_info.py
+++ b/packages/python-sdk/e2b/api/client/models/template_build_info.py
@@ -19,7 +19,7 @@ T = TypeVar("T", bound="TemplateBuildInfo")
class TemplateBuildInfo:
"""
Attributes:
- logs (list[str]): Build logs
+ logs (list[str]): Build logs (always empty since the V1 build path was removed, use logEntries)
log_entries (list['BuildLogEntry']): Build logs structured
template_id (str): Identifier of the template
build_id (str): Identifier of the build
diff --git a/packages/python-sdk/e2b/api/client/models/template_build_request.py b/packages/python-sdk/e2b/api/client/models/template_build_request.py
deleted file mode 100644
index b24df8446..000000000
--- a/packages/python-sdk/e2b/api/client/models/template_build_request.py
+++ /dev/null
@@ -1,115 +0,0 @@
-from collections.abc import Mapping
-from typing import Any, TypeVar, Union
-
-from attrs import define as _attrs_define
-from attrs import field as _attrs_field
-
-from ..types import UNSET, Unset
-
-T = TypeVar("T", bound="TemplateBuildRequest")
-
-
-@_attrs_define
-class TemplateBuildRequest:
- """
- Attributes:
- dockerfile (str): Dockerfile for the template
- alias (Union[Unset, str]): Alias of the template
- team_id (Union[Unset, str]): Identifier of the team
- start_cmd (Union[Unset, str]): Start command to execute in the template after the build
- ready_cmd (Union[Unset, str]): Ready check command to execute in the template after the build
- cpu_count (Union[Unset, int]): CPU cores for the sandbox
- memory_mb (Union[Unset, int]): Memory for the sandbox in MiB
- """
-
- dockerfile: str
- alias: Union[Unset, str] = UNSET
- team_id: Union[Unset, str] = UNSET
- start_cmd: Union[Unset, str] = UNSET
- ready_cmd: Union[Unset, str] = UNSET
- cpu_count: Union[Unset, int] = UNSET
- memory_mb: Union[Unset, int] = UNSET
- additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
-
- def to_dict(self) -> dict[str, Any]:
- dockerfile = self.dockerfile
-
- alias = self.alias
-
- team_id = self.team_id
-
- start_cmd = self.start_cmd
-
- ready_cmd = self.ready_cmd
-
- cpu_count = self.cpu_count
-
- memory_mb = self.memory_mb
-
- field_dict: dict[str, Any] = {}
- field_dict.update(self.additional_properties)
- field_dict.update(
- {
- "dockerfile": dockerfile,
- }
- )
- if alias is not UNSET:
- field_dict["alias"] = alias
- if team_id is not UNSET:
- field_dict["teamID"] = team_id
- if start_cmd is not UNSET:
- field_dict["startCmd"] = start_cmd
- if ready_cmd is not UNSET:
- field_dict["readyCmd"] = ready_cmd
- if cpu_count is not UNSET:
- field_dict["cpuCount"] = cpu_count
- if memory_mb is not UNSET:
- field_dict["memoryMB"] = memory_mb
-
- return field_dict
-
- @classmethod
- def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
- d = dict(src_dict)
- dockerfile = d.pop("dockerfile")
-
- alias = d.pop("alias", UNSET)
-
- team_id = d.pop("teamID", UNSET)
-
- start_cmd = d.pop("startCmd", UNSET)
-
- ready_cmd = d.pop("readyCmd", UNSET)
-
- cpu_count = d.pop("cpuCount", UNSET)
-
- memory_mb = d.pop("memoryMB", UNSET)
-
- template_build_request = cls(
- dockerfile=dockerfile,
- alias=alias,
- team_id=team_id,
- start_cmd=start_cmd,
- ready_cmd=ready_cmd,
- cpu_count=cpu_count,
- memory_mb=memory_mb,
- )
-
- template_build_request.additional_properties = d
- return template_build_request
-
- @property
- def additional_keys(self) -> list[str]:
- return list(self.additional_properties.keys())
-
- def __getitem__(self, key: str) -> Any:
- return self.additional_properties[key]
-
- def __setitem__(self, key: str, value: Any) -> None:
- self.additional_properties[key] = value
-
- def __delitem__(self, key: str) -> None:
- del self.additional_properties[key]
-
- def __contains__(self, key: str) -> bool:
- return key in self.additional_properties
diff --git a/packages/python-sdk/e2b/api/client/models/template_build_request_v2.py b/packages/python-sdk/e2b/api/client/models/template_build_request_v2.py
deleted file mode 100644
index 1194f49c0..000000000
--- a/packages/python-sdk/e2b/api/client/models/template_build_request_v2.py
+++ /dev/null
@@ -1,88 +0,0 @@
-from collections.abc import Mapping
-from typing import Any, TypeVar, Union
-
-from attrs import define as _attrs_define
-from attrs import field as _attrs_field
-
-from ..types import UNSET, Unset
-
-T = TypeVar("T", bound="TemplateBuildRequestV2")
-
-
-@_attrs_define
-class TemplateBuildRequestV2:
- """
- Attributes:
- alias (str): Alias of the template
- team_id (Union[Unset, str]): Identifier of the team
- cpu_count (Union[Unset, int]): CPU cores for the sandbox
- memory_mb (Union[Unset, int]): Memory for the sandbox in MiB
- """
-
- alias: str
- team_id: Union[Unset, str] = UNSET
- cpu_count: Union[Unset, int] = UNSET
- memory_mb: Union[Unset, int] = UNSET
- additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
-
- def to_dict(self) -> dict[str, Any]:
- alias = self.alias
-
- team_id = self.team_id
-
- cpu_count = self.cpu_count
-
- memory_mb = self.memory_mb
-
- field_dict: dict[str, Any] = {}
- field_dict.update(self.additional_properties)
- field_dict.update(
- {
- "alias": alias,
- }
- )
- if team_id is not UNSET:
- field_dict["teamID"] = team_id
- if cpu_count is not UNSET:
- field_dict["cpuCount"] = cpu_count
- if memory_mb is not UNSET:
- field_dict["memoryMB"] = memory_mb
-
- return field_dict
-
- @classmethod
- def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
- d = dict(src_dict)
- alias = d.pop("alias")
-
- team_id = d.pop("teamID", UNSET)
-
- cpu_count = d.pop("cpuCount", UNSET)
-
- memory_mb = d.pop("memoryMB", UNSET)
-
- template_build_request_v2 = cls(
- alias=alias,
- team_id=team_id,
- cpu_count=cpu_count,
- memory_mb=memory_mb,
- )
-
- template_build_request_v2.additional_properties = d
- return template_build_request_v2
-
- @property
- def additional_keys(self) -> list[str]:
- return list(self.additional_properties.keys())
-
- def __getitem__(self, key: str) -> Any:
- return self.additional_properties[key]
-
- def __setitem__(self, key: str, value: Any) -> None:
- self.additional_properties[key] = value
-
- def __delitem__(self, key: str) -> None:
- del self.additional_properties[key]
-
- def __contains__(self, key: str) -> bool:
- return key in self.additional_properties
diff --git a/packages/python-sdk/e2b/api/client/models/template_build_start_v2.py b/packages/python-sdk/e2b/api/client/models/template_build_start_v2.py
index d2bbaac1c..538e9a017 100644
--- a/packages/python-sdk/e2b/api/client/models/template_build_start_v2.py
+++ b/packages/python-sdk/e2b/api/client/models/template_build_start_v2.py
@@ -18,7 +18,8 @@ T = TypeVar("T", bound="TemplateBuildStartV2")
@_attrs_define
class TemplateBuildStartV2:
- """
+ """Exactly one of fromImage or fromTemplate must be given and non-empty.
+
Attributes:
from_image (Union[Unset, str]): Image to use as a base for the template build
from_template (Union[Unset, str]): Template to use as a base for the template build
diff --git a/packages/python-sdk/e2b/api/client/models/template_legacy.py b/packages/python-sdk/e2b/api/client/models/template_legacy.py
deleted file mode 100644
index e78f50748..000000000
--- a/packages/python-sdk/e2b/api/client/models/template_legacy.py
+++ /dev/null
@@ -1,207 +0,0 @@
-import datetime
-from collections.abc import Mapping
-from typing import TYPE_CHECKING, Any, TypeVar, Union, cast
-
-from attrs import define as _attrs_define
-from attrs import field as _attrs_field
-from dateutil.parser import isoparse
-
-if TYPE_CHECKING:
- from ..models.team_user import TeamUser
-
-
-T = TypeVar("T", bound="TemplateLegacy")
-
-
-@_attrs_define
-class TemplateLegacy:
- """
- Attributes:
- template_id (str): Identifier of the template
- build_id (str): Identifier of the last successful build for given template
- cpu_count (int): CPU cores for the sandbox
- memory_mb (int): Memory for the sandbox in MiB
- disk_size_mb (int): Disk size for the sandbox in MiB
- public (bool): Whether the template is public or only accessible by the team
- aliases (list[str]): Aliases of the template
- created_at (datetime.datetime): Time when the template was created
- updated_at (datetime.datetime): Time when the template was last updated
- created_by (Union['TeamUser', None]):
- last_spawned_at (Union[None, datetime.datetime]): Time when the template was last used
- spawn_count (int): Number of times the template was used
- build_count (int): Number of times the template was built
- envd_version (str): Version of the envd running in the sandbox
- """
-
- template_id: str
- build_id: str
- cpu_count: int
- memory_mb: int
- disk_size_mb: int
- public: bool
- aliases: list[str]
- created_at: datetime.datetime
- updated_at: datetime.datetime
- created_by: Union["TeamUser", None]
- last_spawned_at: Union[None, datetime.datetime]
- spawn_count: int
- build_count: int
- envd_version: str
- additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
-
- def to_dict(self) -> dict[str, Any]:
- from ..models.team_user import TeamUser
-
- template_id = self.template_id
-
- build_id = self.build_id
-
- cpu_count = self.cpu_count
-
- memory_mb = self.memory_mb
-
- disk_size_mb = self.disk_size_mb
-
- public = self.public
-
- aliases = self.aliases
-
- created_at = self.created_at.isoformat()
-
- updated_at = self.updated_at.isoformat()
-
- created_by: Union[None, dict[str, Any]]
- if isinstance(self.created_by, TeamUser):
- created_by = self.created_by.to_dict()
- else:
- created_by = self.created_by
-
- last_spawned_at: Union[None, str]
- if isinstance(self.last_spawned_at, datetime.datetime):
- last_spawned_at = self.last_spawned_at.isoformat()
- else:
- last_spawned_at = self.last_spawned_at
-
- spawn_count = self.spawn_count
-
- build_count = self.build_count
-
- envd_version = self.envd_version
-
- field_dict: dict[str, Any] = {}
- field_dict.update(self.additional_properties)
- field_dict.update(
- {
- "templateID": template_id,
- "buildID": build_id,
- "cpuCount": cpu_count,
- "memoryMB": memory_mb,
- "diskSizeMB": disk_size_mb,
- "public": public,
- "aliases": aliases,
- "createdAt": created_at,
- "updatedAt": updated_at,
- "createdBy": created_by,
- "lastSpawnedAt": last_spawned_at,
- "spawnCount": spawn_count,
- "buildCount": build_count,
- "envdVersion": envd_version,
- }
- )
-
- return field_dict
-
- @classmethod
- def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
- from ..models.team_user import TeamUser
-
- d = dict(src_dict)
- template_id = d.pop("templateID")
-
- build_id = d.pop("buildID")
-
- cpu_count = d.pop("cpuCount")
-
- memory_mb = d.pop("memoryMB")
-
- disk_size_mb = d.pop("diskSizeMB")
-
- public = d.pop("public")
-
- aliases = cast(list[str], d.pop("aliases"))
-
- created_at = isoparse(d.pop("createdAt"))
-
- updated_at = isoparse(d.pop("updatedAt"))
-
- def _parse_created_by(data: object) -> Union["TeamUser", None]:
- if data is None:
- return data
- try:
- if not isinstance(data, dict):
- raise TypeError()
- created_by_type_1 = TeamUser.from_dict(data)
-
- return created_by_type_1
- except: # noqa: E722
- pass
- return cast(Union["TeamUser", None], data)
-
- created_by = _parse_created_by(d.pop("createdBy"))
-
- def _parse_last_spawned_at(data: object) -> Union[None, datetime.datetime]:
- if data is None:
- return data
- try:
- if not isinstance(data, str):
- raise TypeError()
- last_spawned_at_type_0 = isoparse(data)
-
- return last_spawned_at_type_0
- except: # noqa: E722
- pass
- return cast(Union[None, datetime.datetime], data)
-
- last_spawned_at = _parse_last_spawned_at(d.pop("lastSpawnedAt"))
-
- spawn_count = d.pop("spawnCount")
-
- build_count = d.pop("buildCount")
-
- envd_version = d.pop("envdVersion")
-
- template_legacy = cls(
- template_id=template_id,
- build_id=build_id,
- cpu_count=cpu_count,
- memory_mb=memory_mb,
- disk_size_mb=disk_size_mb,
- public=public,
- aliases=aliases,
- created_at=created_at,
- updated_at=updated_at,
- created_by=created_by,
- last_spawned_at=last_spawned_at,
- spawn_count=spawn_count,
- build_count=build_count,
- envd_version=envd_version,
- )
-
- template_legacy.additional_properties = d
- return template_legacy
-
- @property
- def additional_keys(self) -> list[str]:
- return list(self.additional_properties.keys())
-
- def __getitem__(self, key: str) -> Any:
- return self.additional_properties[key]
-
- def __setitem__(self, key: str, value: Any) -> None:
- self.additional_properties[key] = value
-
- def __delitem__(self, key: str) -> None:
- del self.additional_properties[key]
-
- def __contains__(self, key: str) -> bool:
- return key in self.additional_properties
diff --git a/packages/python-sdk/e2b/template/types.py b/packages/python-sdk/e2b/template/types.py
index 3f8c0d051..ca2c79c73 100644
--- a/packages/python-sdk/e2b/template/types.py
+++ b/packages/python-sdk/e2b/template/types.py
@@ -55,7 +55,9 @@ class TemplateBuildStatusResponse:
"""Build log entries."""
logs: List[str]
- """Build logs (raw strings). Deprecated: use log_entries instead."""
+ """Build logs (raw strings). Always empty since the V1 build path was removed.
+ :deprecated: Use `log_entries` instead. Will be removed in the next major version.
+ """
reason: Optional[BuildStatusReason] = None
"""Reason for the current status (typically for errors)."""
diff --git a/spec/openapi.yml b/spec/openapi.yml
index e7787b451..8c4399246 100644
--- a/spec/openapi.yml
+++ b/spec/openapi.yml
@@ -183,6 +183,14 @@ components:
$ref: "#/components/schemas/Error"
"429":
description: Too many requests
+ headers:
+ Retry-After:
+ description: When present, the number of seconds to wait before retrying the request.
+ required: false
+ schema:
+ type: integer
+ minimum: 0
+ example: 30
content:
application/json:
schema:
@@ -1293,71 +1301,6 @@ components:
items:
type: string
- TemplateLegacy:
- required:
- - templateID
- - buildID
- - cpuCount
- - memoryMB
- - diskSizeMB
- - public
- - createdAt
- - updatedAt
- - createdBy
- - lastSpawnedAt
- - spawnCount
- - buildCount
- - envdVersion
- - aliases
- properties:
- templateID:
- type: string
- description: Identifier of the template
- buildID:
- type: string
- description: Identifier of the last successful build for given template
- cpuCount:
- $ref: "#/components/schemas/CPUCount"
- memoryMB:
- $ref: "#/components/schemas/MemoryMB"
- diskSizeMB:
- $ref: "#/components/schemas/DiskSizeMB"
- public:
- type: boolean
- description: Whether the template is public or only accessible by the team
- aliases:
- type: array
- description: Aliases of the template
- items:
- type: string
- createdAt:
- type: string
- format: date-time
- description: Time when the template was created
- updatedAt:
- type: string
- format: date-time
- description: Time when the template was last updated
- createdBy:
- allOf:
- - $ref: "#/components/schemas/TeamUser"
- nullable: true
- lastSpawnedAt:
- type: string
- nullable: true
- format: date-time
- description: Time when the template was last used
- spawnCount:
- type: integer
- format: int64
- description: Number of times the template was used
- buildCount:
- type: integer
- format: int32
- description: Number of times the template was built
- envdVersion:
- $ref: "#/components/schemas/EnvdVersion"
-
TemplateBuild:
required:
- buildID
@@ -1458,30 +1401,6 @@ components:
type: boolean
description: Whether the template is public or only accessible by the team
- TemplateBuildRequest:
- required:
- - dockerfile
- properties:
- alias:
- description: Alias of the template
- type: string
- dockerfile:
- description: Dockerfile for the template
- type: string
- teamID:
- type: string
- description: Identifier of the team
- startCmd:
- description: Start command to execute in the template after the build
- type: string
- readyCmd:
- description: Ready check command to execute in the template after the build
- type: string
- cpuCount:
- $ref: "#/components/schemas/CPUCount"
- memoryMB:
- $ref: "#/components/schemas/MemoryMB"
-
TemplateStep:
description: Step in the template build process
required:
@@ -1531,22 +1450,6 @@ components:
minFreeDiskMb:
$ref: "#/components/schemas/MinFreeDiskMb"
- TemplateBuildRequestV2:
- required:
- - alias
- properties:
- alias:
- description: Alias of the template
- type: string
- teamID:
- deprecated: true
- type: string
- description: Identifier of the team
- cpuCount:
- $ref: "#/components/schemas/CPUCount"
- memoryMB:
- $ref: "#/components/schemas/MemoryMB"
-
FromImageRegistry:
oneOf:
- $ref: "#/components/schemas/AWSRegistry"
@@ -1615,12 +1518,15 @@ components:
TemplateBuildStartV2:
type: object
+ description: Exactly one of fromImage or fromTemplate must be given and non-empty.
properties:
fromImage:
type: string
+ minLength: 1
description: Image to use as a base for the template build
fromTemplate:
type: string
+ minLength: 1
description: Template to use as a base for the template build
fromImageRegistry:
$ref: "#/components/schemas/FromImageRegistry"
@@ -1651,6 +1557,11 @@ components:
url:
description: Url where the file should be uploaded to
type: string
+ headers:
+ description: Request headers that must be sent with the upload request
+ type: object
+ additionalProperties:
+ type: string
LogLevel:
type: string
@@ -1716,7 +1627,8 @@ components:
properties:
logs:
default: []
- description: Build logs
+ deprecated: true
+ description: Build logs (always empty since the V1 build path was removed, use logEntries)
type: array
items:
type: string
@@ -1948,6 +1860,15 @@ components:
type: integer
format: uint32
description: Number of sandboxes running on the node
+ maxSandboxes:
+ type: integer
+ format: int64
+ description: Node-scoped configured sandbox admission limit. Nonpositive values reject creation. Omitted when unknown or not an orchestrator.
+ outstandingWork:
+ type: integer
+ format: uint64
+ minimum: 0
+ description: Observed work holds on the node. Omitted when unknown; zero does not authorize deletion.
metrics:
$ref: "#/components/schemas/NodeMetrics"
createSuccesses:
@@ -2005,6 +1926,15 @@ components:
type: integer
format: uint32
description: Number of sandboxes running on the node
+ maxSandboxes:
+ type: integer
+ format: int64
+ description: Node-scoped configured sandbox admission limit. Nonpositive values reject creation. Omitted when unknown or not an orchestrator.
+ outstandingWork:
+ type: integer
+ format: uint64
+ minimum: 0
+ description: Observed work holds on the node. Omitted when unknown; zero does not authorize deletion.
metrics:
$ref: "#/components/schemas/NodeMetrics"
createSuccesses:
@@ -2337,6 +2267,8 @@ paths:
description: The service is healthy
"401":
$ref: "#/components/responses/401"
+ "429":
+ $ref: "#/components/responses/429"
/teams:
get:
@@ -2356,6 +2288,8 @@ paths:
$ref: "#/components/schemas/Team"
"401":
$ref: "#/components/responses/401"
+ "429":
+ $ref: "#/components/responses/429"
"500":
$ref: "#/components/responses/500"
@@ -2403,6 +2337,8 @@ paths:
$ref: "#/components/responses/401"
"403":
$ref: "#/components/responses/403"
+ "429":
+ $ref: "#/components/responses/429"
"500":
$ref: "#/components/responses/500"
@@ -2455,6 +2391,8 @@ paths:
$ref: "#/components/responses/401"
"403":
$ref: "#/components/responses/403"
+ "429":
+ $ref: "#/components/responses/429"
"500":
$ref: "#/components/responses/500"
@@ -2492,6 +2430,8 @@ paths:
$ref: "#/components/responses/401"
"400":
$ref: "#/components/responses/400"
+ "429":
+ $ref: "#/components/responses/429"
"500":
$ref: "#/components/responses/500"
post:
@@ -2523,6 +2463,8 @@ paths:
$ref: "#/components/responses/401"
"400":
$ref: "#/components/responses/400"
+ "429":
+ $ref: "#/components/responses/429"
"500":
$ref: "#/components/responses/500"
"503":
@@ -2599,6 +2541,8 @@ paths:
$ref: "#/components/responses/401"
"400":
$ref: "#/components/responses/400"
+ "429":
+ $ref: "#/components/responses/429"
"500":
$ref: "#/components/responses/500"
@@ -2638,6 +2582,8 @@ paths:
$ref: "#/components/responses/401"
"400":
$ref: "#/components/responses/400"
+ "429":
+ $ref: "#/components/responses/429"
"500":
$ref: "#/components/responses/500"
@@ -2683,6 +2629,8 @@ paths:
$ref: "#/components/responses/404"
"401":
$ref: "#/components/responses/401"
+ "429":
+ $ref: "#/components/responses/429"
"500":
$ref: "#/components/responses/500"
@@ -2744,6 +2692,8 @@ paths:
$ref: "#/components/responses/401"
"404":
$ref: "#/components/responses/404"
+ "429":
+ $ref: "#/components/responses/429"
"500":
$ref: "#/components/responses/500"
@@ -2773,6 +2723,8 @@ paths:
$ref: "#/components/responses/404"
"401":
$ref: "#/components/responses/401"
+ "429":
+ $ref: "#/components/responses/429"
"500":
$ref: "#/components/responses/500"
@@ -2797,6 +2749,8 @@ paths:
$ref: "#/components/responses/404"
"401":
$ref: "#/components/responses/401"
+ "429":
+ $ref: "#/components/responses/429"
"500":
$ref: "#/components/responses/500"
@@ -2845,6 +2799,8 @@ paths:
$ref: "#/components/responses/401"
"404":
$ref: "#/components/responses/404"
+ "429":
+ $ref: "#/components/responses/429"
"500":
$ref: "#/components/responses/500"
@@ -2879,6 +2835,8 @@ paths:
$ref: "#/components/responses/404"
"401":
$ref: "#/components/responses/401"
+ "429":
+ $ref: "#/components/responses/429"
"500":
$ref: "#/components/responses/500"
"503":
@@ -2921,6 +2879,8 @@ paths:
$ref: "#/components/responses/400"
"401":
$ref: "#/components/responses/401"
+ "429":
+ $ref: "#/components/responses/429"
"500":
$ref: "#/components/responses/500"
"503":
@@ -2973,6 +2933,8 @@ paths:
$ref: "#/components/responses/404"
"401":
$ref: "#/components/responses/401"
+ "429":
+ $ref: "#/components/responses/429"
"500":
$ref: "#/components/responses/500"
"503":
@@ -3020,6 +2982,8 @@ paths:
$ref: "#/components/responses/404"
"409":
$ref: "#/components/responses/409"
+ "429":
+ $ref: "#/components/responses/429"
"500":
$ref: "#/components/responses/500"
"503":
@@ -3054,6 +3018,8 @@ paths:
$ref: "#/components/responses/401"
"404":
$ref: "#/components/responses/404"
+ "429":
+ $ref: "#/components/responses/429"
"500":
$ref: "#/components/responses/500"
@@ -3087,6 +3053,8 @@ paths:
$ref: "#/components/responses/404"
"409":
$ref: "#/components/responses/409"
+ "429":
+ $ref: "#/components/responses/429"
"500":
$ref: "#/components/responses/500"
@@ -3117,6 +3085,8 @@ paths:
$ref: "#/components/responses/401"
"404":
$ref: "#/components/responses/404"
+ "429":
+ $ref: "#/components/responses/429"
/sandboxes/{sandboxID}/snapshots:
post:
@@ -3152,6 +3122,8 @@ paths:
$ref: "#/components/responses/401"
"404":
$ref: "#/components/responses/404"
+ "429":
+ $ref: "#/components/responses/429"
"500":
$ref: "#/components/responses/500"
@@ -3197,6 +3169,8 @@ paths:
$ref: "#/components/schemas/SnapshotInfo"
"401":
$ref: "#/components/responses/401"
+ "429":
+ $ref: "#/components/responses/429"
"500":
$ref: "#/components/responses/500"
@@ -3233,6 +3207,10 @@ paths:
$ref: "#/components/responses/401"
"403":
$ref: "#/components/responses/403"
+ "409":
+ $ref: "#/components/responses/409"
+ "429":
+ $ref: "#/components/responses/429"
"500":
$ref: "#/components/responses/500"
@@ -3276,39 +3254,8 @@ paths:
$ref: "#/components/responses/401"
"403":
$ref: "#/components/responses/403"
- "500":
- $ref: "#/components/responses/500"
- post:
- summary: Create template (v2)
- description: Create a new template
- deprecated: true
- tags: [templates]
- security:
- - ApiKeyAuth: []
- - AuthProviderBearerAuth: []
- AuthProviderTeamAuth: []
- - AdminApiKeyAuth: []
- AdminTeamAuth: []
- - AdminJWTAuth: []
- AdminTeamAuth: []
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/TemplateBuildRequestV2"
-
- responses:
- "202":
- description: The build was requested successfully
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/TemplateLegacy"
- "400":
- $ref: "#/components/responses/400"
- "401":
- $ref: "#/components/responses/401"
+ "429":
+ $ref: "#/components/responses/429"
"500":
$ref: "#/components/responses/500"
@@ -3347,6 +3294,8 @@ paths:
$ref: "#/components/responses/401"
"404":
$ref: "#/components/responses/404"
+ "429":
+ $ref: "#/components/responses/429"
"500":
$ref: "#/components/responses/500"
@@ -3382,34 +3331,8 @@ paths:
$ref: "#/components/schemas/Template"
"401":
$ref: "#/components/responses/401"
- "500":
- $ref: "#/components/responses/500"
- post:
- summary: Create template
- description: Create a new template
- deprecated: true
- tags: [templates]
- security:
- - AuthProviderBearerAuth: []
- AuthProviderTeamAuth: []
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/TemplateBuildRequest"
-
- responses:
- "202":
- description: The build was accepted
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/TemplateLegacy"
- "400":
- $ref: "#/components/responses/400"
- "401":
- $ref: "#/components/responses/401"
+ "429":
+ $ref: "#/components/responses/429"
"500":
$ref: "#/components/responses/500"
@@ -3442,34 +3365,8 @@ paths:
$ref: "#/components/schemas/TemplateWithBuilds"
"401":
$ref: "#/components/responses/401"
- "500":
- $ref: "#/components/responses/500"
- post:
- summary: Rebuild template
- description: Rebuild an template
- deprecated: true
- tags: [templates]
- security:
- - AuthProviderBearerAuth: []
- AuthProviderTeamAuth: []
- parameters:
- - $ref: "#/components/parameters/templateID"
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/TemplateBuildRequest"
-
- responses:
- "202":
- description: The build was accepted
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/TemplateLegacy"
- "401":
- $ref: "#/components/responses/401"
+ "429":
+ $ref: "#/components/responses/429"
"500":
$ref: "#/components/responses/500"
delete:
@@ -3491,6 +3388,8 @@ paths:
description: The template was deleted successfully
"401":
$ref: "#/components/responses/401"
+ "429":
+ $ref: "#/components/responses/429"
"500":
$ref: "#/components/responses/500"
patch:
@@ -3521,26 +3420,8 @@ paths:
$ref: "#/components/responses/400"
"401":
$ref: "#/components/responses/401"
- "500":
- $ref: "#/components/responses/500"
-
- /templates/{templateID}/builds/{buildID}:
- post:
- summary: Start template build
- description: Start the build
- deprecated: true
- tags: [templates]
- security:
- - AuthProviderBearerAuth: []
- AuthProviderTeamAuth: []
- parameters:
- - $ref: "#/components/parameters/templateID"
- - $ref: "#/components/parameters/buildID"
- responses:
- "202":
- description: The build has started
- "401":
- $ref: "#/components/responses/401"
+ "429":
+ $ref: "#/components/responses/429"
"500":
$ref: "#/components/responses/500"
@@ -3569,8 +3450,12 @@ paths:
responses:
"202":
description: The build has started
+ "400":
+ $ref: "#/components/responses/400"
"401":
$ref: "#/components/responses/401"
+ "429":
+ $ref: "#/components/responses/429"
"500":
$ref: "#/components/responses/500"
@@ -3606,6 +3491,8 @@ paths:
$ref: "#/components/responses/400"
"401":
$ref: "#/components/responses/401"
+ "429":
+ $ref: "#/components/responses/429"
"500":
$ref: "#/components/responses/500"
@@ -3657,6 +3544,8 @@ paths:
$ref: "#/components/responses/401"
"404":
$ref: "#/components/responses/404"
+ "429":
+ $ref: "#/components/responses/429"
"500":
$ref: "#/components/responses/500"
@@ -3716,6 +3605,8 @@ paths:
$ref: "#/components/responses/401"
"404":
$ref: "#/components/responses/404"
+ "429":
+ $ref: "#/components/responses/429"
"500":
$ref: "#/components/responses/500"
@@ -3751,6 +3642,8 @@ paths:
$ref: "#/components/responses/401"
"404":
$ref: "#/components/responses/404"
+ "429":
+ $ref: "#/components/responses/429"
"500":
$ref: "#/components/responses/500"
delete:
@@ -3780,6 +3673,8 @@ paths:
$ref: "#/components/responses/401"
"404":
$ref: "#/components/responses/404"
+ "429":
+ $ref: "#/components/responses/429"
"500":
$ref: "#/components/responses/500"
@@ -3813,6 +3708,8 @@ paths:
$ref: "#/components/responses/403"
"404":
$ref: "#/components/responses/404"
+ "429":
+ $ref: "#/components/responses/429"
"500":
$ref: "#/components/responses/500"
@@ -3849,6 +3746,8 @@ paths:
$ref: "#/components/responses/403"
"404":
$ref: "#/components/responses/404"
+ "429":
+ $ref: "#/components/responses/429"
"500":
$ref: "#/components/responses/500"
@@ -3879,6 +3778,8 @@ paths:
$ref: "#/components/schemas/Node"
"401":
$ref: "#/components/responses/401"
+ "429":
+ $ref: "#/components/responses/429"
"500":
$ref: "#/components/responses/500"
@@ -3910,6 +3811,8 @@ paths:
$ref: "#/components/responses/401"
"404":
$ref: "#/components/responses/404"
+ "429":
+ $ref: "#/components/responses/429"
"500":
$ref: "#/components/responses/500"
post:
@@ -3935,6 +3838,8 @@ paths:
$ref: "#/components/responses/401"
"404":
$ref: "#/components/responses/404"
+ "429":
+ $ref: "#/components/responses/429"
"500":
$ref: "#/components/responses/500"
@@ -3965,6 +3870,8 @@ paths:
$ref: "#/components/responses/401"
"404":
$ref: "#/components/responses/404"
+ "429":
+ $ref: "#/components/responses/429"
"500":
$ref: "#/components/responses/500"
@@ -3987,6 +3894,8 @@ paths:
$ref: "#/components/schemas/AdminTeamRunningSandboxCounts"
"401":
$ref: "#/components/responses/401"
+ "429":
+ $ref: "#/components/responses/429"
"500":
$ref: "#/components/responses/500"
@@ -4017,6 +3926,8 @@ paths:
$ref: "#/components/responses/401"
"404":
$ref: "#/components/responses/404"
+ "429":
+ $ref: "#/components/responses/429"
"500":
$ref: "#/components/responses/500"
@@ -4057,6 +3968,8 @@ paths:
$ref: "#/components/responses/403"
"404":
$ref: "#/components/responses/404"
+ "429":
+ $ref: "#/components/responses/429"
"500":
$ref: "#/components/responses/500"
@@ -4086,6 +3999,8 @@ paths:
$ref: "#/components/responses/401"
"404":
$ref: "#/components/responses/404"
+ "429":
+ $ref: "#/components/responses/429"
"500":
$ref: "#/components/responses/500"
@@ -4112,6 +4027,8 @@ paths:
$ref: "#/components/schemas/TeamAPIKey"
"401":
$ref: "#/components/responses/401"
+ "429":
+ $ref: "#/components/responses/429"
"500":
$ref: "#/components/responses/500"
post:
@@ -4136,6 +4053,8 @@ paths:
$ref: "#/components/schemas/CreatedTeamAPIKey"
"401":
$ref: "#/components/responses/401"
+ "429":
+ $ref: "#/components/responses/429"
"500":
$ref: "#/components/responses/500"
@@ -4166,6 +4085,8 @@ paths:
$ref: "#/components/responses/401"
"404":
$ref: "#/components/responses/404"
+ "429":
+ $ref: "#/components/responses/429"
"500":
$ref: "#/components/responses/500"
delete:
@@ -4188,6 +4109,8 @@ paths:
$ref: "#/components/responses/401"
"404":
$ref: "#/components/responses/404"
+ "429":
+ $ref: "#/components/responses/429"
"500":
$ref: "#/components/responses/500"
@@ -4215,6 +4138,8 @@ paths:
$ref: "#/components/schemas/Volume"
"401":
$ref: "#/components/responses/401"
+ "429":
+ $ref: "#/components/responses/429"
"500":
$ref: "#/components/responses/500"
@@ -4247,6 +4172,8 @@ paths:
$ref: "#/components/responses/400"
"401":
$ref: "#/components/responses/401"
+ "429":
+ $ref: "#/components/responses/429"
"500":
$ref: "#/components/responses/500"
@@ -4276,6 +4203,8 @@ paths:
$ref: "#/components/responses/401"
"404":
$ref: "#/components/responses/404"
+ "429":
+ $ref: "#/components/responses/429"
"500":
$ref: "#/components/responses/500"
@@ -4300,6 +4229,8 @@ paths:
$ref: "#/components/responses/401"
"404":
$ref: "#/components/responses/404"
+ "429":
+ $ref: "#/components/responses/429"
"500":
$ref: "#/components/responses/500"
@@ -4544,6 +4475,8 @@ paths:
$ref: "#/components/responses/401"
"404":
$ref: "#/components/responses/404"
+ "429":
+ $ref: "#/components/responses/429"
"500":
$ref: "#/components/responses/500"
"501":
@@ -4580,6 +4513,8 @@ paths:
$ref: "#/components/responses/404"
"409":
$ref: "#/components/responses/409"
+ "429":
+ $ref: "#/components/responses/429"
"500":
$ref: "#/components/responses/500"
"501":
@@ -4622,6 +4557,8 @@ paths:
$ref: "#/components/responses/404"
"409":
$ref: "#/components/responses/409"
+ "429":
+ $ref: "#/components/responses/429"
"500":
$ref: "#/components/responses/500"
"501":
@@ -4655,6 +4592,8 @@ paths:
$ref: "#/components/responses/401"
"404":
$ref: "#/components/responses/404"
+ "429":
+ $ref: "#/components/responses/429"
"500":
$ref: "#/components/responses/500"
"501":
@@ -4698,6 +4637,8 @@ paths:
$ref: "#/components/responses/401"
"404":
$ref: "#/components/responses/404"
+ "429":
+ $ref: "#/components/responses/429"
"500":
$ref: "#/components/responses/500"
"501":
diff --git a/spec/runtime-ref b/spec/runtime-ref
index ce24be88d..ab915d79e 100644
--- a/spec/runtime-ref
+++ b/spec/runtime-ref
@@ -1 +1 @@
-debf6bec7a59db73e3407d93ef94da5c82429089
+433d1d5fbbd20c5e2259ee0bf356b7b0a05d46e9