Skip to content

armgit / E2B

Public Imported from GitHub
0

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

chore(spec): prune unused component schemas from the SDK client bundles (#1803)

Babis Chalios043d050c4b19
diff --git a/.changeset/prune-unused-schemas.md b/.changeset/prune-unused-schemas.md
new file mode 100644
index 000000000..7592bf5c3
--- /dev/null
+++ b/.changeset/prune-unused-schemas.md
@@ -0,0 +1,6 @@
+---
+"e2b": minor
+"@e2b/python-sdk": minor
+---
+
+Removed generated types for endpoints the SDKs never exposed. The JS `components['schemas']` namespace and the Python `e2b.api.client.models` package no longer include the admin, cluster/rig, node, team-API-key and access-token schemas (`Node`, `NodeDetail`, `NodeMetrics`, `NodeStatus`, `NodeStatusChange`, `MachineInfo`, `DiskMetrics`, `Rig*`, `Admin*`, `TeamAPIKey`, `NewTeamAPIKey`, `CreatedTeamAPIKey`, `UpdateTeamAPIKey`, `IdentifierMaskingDetails`, `VolumeToken`; Python additionally `Team`, `TeamMetric`, `MaxTeamMetric`, `CreatedAccessToken`, `NewAccessToken`). No SDK method ever accepted or returned them, so code that uses the SDK through its methods is unaffected; code that imported these type names directly must drop the import.
diff --git a/packages/js-sdk/src/api/schema.gen.ts b/packages/js-sdk/src/api/schema.gen.ts
index 3bb627794..a72a37aa1 100644
--- a/packages/js-sdk/src/api/schema.gen.ts
+++ b/packages/js-sdk/src/api/schema.gen.ts
@@ -2148,26 +2148,6 @@ export interface paths {
export type webhooks = Record<string, never>;
export interface components {
schemas: {
- AdminBuildCancelResult: {
- /** @description Number of builds successfully cancelled */
- cancelledCount: number;
- /** @description Number of builds that failed to cancel */
- failedCount: number;
- };
- AdminSandboxKillResult: {
- /** @description Number of sandboxes that failed to kill */
- failedCount: number;
- /** @description Number of sandboxes successfully killed */
- killedCount: number;
- };
- /**
- * @description Cached live sandbox index count keyed by team ID. Counts may briefly
- * include sandboxes transitioning out of running; teams without indexed
- * sandboxes are omitted.
- */
- AdminTeamRunningSandboxCounts: {
- [key: string]: number;
- };
AssignedTemplateTags: {
/**
* Format: uuid
@@ -2231,70 +2211,12 @@ export interface components {
* @description CPU cores for the sandbox
*/
CPUCount: number;
- CreatedAccessToken: {
- /**
- * Format: date-time
- * @description Timestamp of access token creation
- */
- createdAt: string;
- /**
- * Format: uuid
- * @description Identifier of the access token
- */
- id: string;
- mask: components["schemas"]["IdentifierMaskingDetails"];
- /** @description Name of the access token */
- name: string;
- /** @description The fully created access token */
- token: string;
- };
- CreatedTeamAPIKey: {
- /**
- * Format: date-time
- * @description Timestamp of API key creation
- */
- createdAt: string;
- createdBy?: components["schemas"]["TeamUser"] | null;
- /**
- * Format: uuid
- * @description Identifier of the API key
- */
- id: string;
- /** @description Raw value of the API key */
- key: string;
- /**
- * Format: date-time
- * @description Last time this API key was used
- */
- lastUsed?: string | null;
- mask: components["schemas"]["IdentifierMaskingDetails"];
- /** @description Name of the API key */
- name: string;
- };
DeleteTemplateTagsRequest: {
/** @description Name of the template */
name: string;
/** @description Tags to delete */
tags: string[];
};
- DiskMetrics: {
- /** @description Device name */
- device: string;
- /** @description Filesystem type (e.g., ext4, xfs) */
- filesystemType: string;
- /** @description Mount point of the disk */
- mountPoint: string;
- /**
- * Format: uint64
- * @description Total space in bytes
- */
- totalBytes: number;
- /**
- * Format: uint64
- * @description Used space in bytes
- */
- usedBytes: number;
- };
/**
* Format: int32
* @description Disk size for the sandbox in MiB
@@ -2337,16 +2259,6 @@ export interface components {
/** @description Username to use for the registry */
username: string;
};
- IdentifierMaskingDetails: {
- /** @description Prefix used in masked version of the token or key */
- maskedValuePrefix: string;
- /** @description Suffix used in masked version of the token or key */
- maskedValueSuffix: string;
- /** @description Prefix that identifies the token or key type */
- prefix: string;
- /** @description Length of the token or key */
- valueLength: number;
- };
ListedSandbox: {
/** @description Alias of the template */
alias?: string;
@@ -2392,16 +2304,6 @@ export interface components {
* @enum {string}
*/
LogsSource: "temporary" | "persistent";
- MachineInfo: {
- /** @description CPU architecture of the node */
- cpuArchitecture: string;
- /** @description CPU family of the node */
- cpuFamily: string;
- /** @description CPU model of the node */
- cpuModel: string;
- /** @description CPU model name of the node */
- cpuModelName: string;
- };
/** @description Team metric with timestamp */
MaxTeamMetric: {
/**
@@ -2427,10 +2329,6 @@ export interface components {
* @description Memory for the sandbox in MiB
*/
MemoryMB: number;
- NewAccessToken: {
- /** @description Name of the access token */
- name: string;
- };
NewSandbox: {
/** @description Allow sandbox to access the internet. When set to false, it behaves the same as specifying denyOut to 0.0.0.0/0 in the network config. */
allow_internet_access?: boolean;
@@ -2469,159 +2367,10 @@ export interface components {
/** @description Runtime marker stored as the secret's first version. The runtime resolves it to a value at sandbox egress. */
value: string;
};
- NewTeamAPIKey: {
- /** @description Name of the API key */
- name: string;
- };
NewVolume: {
/** @description Name of the volume */
name: string;
};
- Node: {
- /** @description Identifier of the cluster */
- clusterID: string;
- /** @description Commit of the orchestrator */
- commit: string;
- /**
- * Format: uint64
- * @description Number of sandbox create fails
- */
- createFails: number;
- /**
- * Format: uint64
- * @description Number of sandbox create successes
- */
- createSuccesses: number;
- /** @description Identifier of the node */
- id: string;
- machineInfo: components["schemas"]["MachineInfo"];
- metrics: components["schemas"]["NodeMetrics"];
- /**
- * Format: uint32
- * @description Number of sandboxes running on the node
- */
- sandboxCount: number;
- /**
- * Format: int
- * @description Number of starting Sandboxes
- */
- sandboxStartingCount: number;
- /** @description Service instance identifier of the node */
- serviceInstanceID: string;
- status: components["schemas"]["NodeStatus"];
- /**
- * Format: date-time
- * @description Time when the node status was last changed
- */
- statusChangedAt: string;
- /** @description Version of the orchestrator */
- version: string;
- };
- NodeDetail: {
- /** @description Identifier of the cluster */
- clusterID: string;
- /** @description Commit of the orchestrator */
- commit: string;
- /**
- * Format: uint64
- * @description Number of sandbox create fails
- */
- createFails: number;
- /**
- * Format: uint64
- * @description Number of sandbox create successes
- */
- createSuccesses: number;
- /** @description Identifier of the node */
- id: string;
- machineInfo: components["schemas"]["MachineInfo"];
- metrics: components["schemas"]["NodeMetrics"];
- /**
- * Format: uint32
- * @description Number of sandboxes running on the node
- */
- sandboxCount: number;
- /** @description Service instance identifier of the node */
- serviceInstanceID: string;
- status: components["schemas"]["NodeStatus"];
- /**
- * Format: date-time
- * @description Time when the node status was last changed
- */
- statusChangedAt: string;
- /** @description Version of the orchestrator */
- version: string;
- };
- /** @description Node metrics */
- NodeMetrics: {
- /**
- * Format: uint32
- * @description Number of allocated CPU cores
- */
- allocatedCPU: number;
- /**
- * Format: uint64
- * @description Amount of allocated memory in bytes
- */
- allocatedMemoryBytes: number;
- /**
- * Format: uint32
- * @description Total number of CPU cores on the node
- */
- cpuCount: number;
- /**
- * Format: uint32
- * @description Node CPU usage percentage
- */
- cpuPercent: number;
- /** @description Detailed metrics for each disk/mount point */
- disks: components["schemas"]["DiskMetrics"][];
- /**
- * Format: uint64
- * @description Size of a single hugepage in bytes
- */
- hugePageSizeBytes: number;
- /**
- * Format: uint64
- * @description Number of reserved hugepages (committed but not yet faulted)
- */
- hugePagesReserved: number;
- /**
- * Format: uint64
- * @description Total number of preallocated hugepages on the node
- */
- hugePagesTotal: number;
- /**
- * Format: uint64
- * @description Number of hugepages in use (total - free)
- */
- hugePagesUsed: number;
- /**
- * Format: uint64
- * @description Total node memory in bytes
- */
- memoryTotalBytes: number;
- /**
- * Format: uint64
- * @description Node memory used in bytes
- */
- memoryUsedBytes: number;
- };
- /**
- * @description Status of the node.
- * - draining: the node is bound to be shut down. It will not accept new sandboxes and will stop once all existing sandboxes are done.
- * - standby: the node is not actively used, but it can return to ready and continue serving traffic.
- * @enum {string}
- */
- NodeStatus: "ready" | "draining" | "connecting" | "unhealthy" | "standby";
- NodeStatusChange: {
- /**
- * Format: uuid
- * @description Identifier of the cluster
- */
- clusterID?: string;
- status: components["schemas"]["NodeStatus"];
- };
/**
* @description Sort direction
* @default desc
@@ -2978,27 +2727,6 @@ export interface components {
/** @description Identifier of the team */
teamID: string;
};
- TeamAPIKey: {
- /**
- * Format: date-time
- * @description Timestamp of API key creation
- */
- createdAt: string;
- createdBy?: components["schemas"]["TeamUser"] | null;
- /**
- * Format: uuid
- * @description Identifier of the API key
- */
- id: string;
- /**
- * Format: date-time
- * @description Last time this API key was used
- */
- lastUsed?: string | null;
- mask: components["schemas"]["IdentifierMaskingDetails"];
- /** @description Name of the API key */
- name: string;
- };
/** @description Team metric with timestamp */
TeamMetric: {
/**
@@ -3346,10 +3074,6 @@ export interface components {
*/
updatedAt: string;
};
- UpdateTeamAPIKey: {
- /** @description New name for the API key */
- name: string;
- };
Volume: {
/** @description Name of the volume */
name: string;
@@ -3371,9 +3095,6 @@ export interface components {
/** @description ID of the volume */
volumeID: string;
};
- VolumeToken: {
- token: string;
- };
};
responses: {
/** @description Bad request */
@@ -3421,15 +3142,6 @@ export interface components {
"application/json": components["schemas"]["Error"];
};
};
- /** @description Gone */
- 410: {
- headers: {
- [name: string]: unknown;
- };
- content: {
- "application/json": components["schemas"]["Error"];
- };
- };
/** @description Too many requests */
429: {
headers: {
@@ -3477,18 +3189,13 @@ export interface components {
};
};
parameters: {
- accessTokenID: string;
- apiKeyID: string;
buildID: string;
- nodeID: string;
/** @description Maximum number of items to return per page */
paginationLimit: number;
/** @description Cursor to start the list from */
paginationNextToken: string;
sandboxID: string;
secretID: string;
- snapshotID: string;
- tag: string;
teamID: string;
templateID: string;
volumeID: string;
diff --git a/packages/python-sdk/e2b/api/client/models/__init__.py b/packages/python-sdk/e2b/api/client/models/__init__.py
index 135420b69..d2acfa930 100644
--- a/packages/python-sdk/e2b/api/client/models/__init__.py
+++ b/packages/python-sdk/e2b/api/client/models/__init__.py
@@ -1,8 +1,5 @@
"""Contains all the data models used in inputs/outputs"""
-from .admin_build_cancel_result import AdminBuildCancelResult
-from .admin_sandbox_kill_result import AdminSandboxKillResult
-from .admin_team_running_sandbox_counts import AdminTeamRunningSandboxCounts
from .assign_template_tags_request import AssignTemplateTagsRequest
from .assigned_template_tags import AssignedTemplateTags
from .aws_registry import AWSRegistry
@@ -10,33 +7,20 @@ from .aws_registry_type import AWSRegistryType
from .build_log_entry import BuildLogEntry
from .build_status_reason import BuildStatusReason
from .connect_sandbox import ConnectSandbox
-from .created_access_token import CreatedAccessToken
-from .created_team_api_key import CreatedTeamAPIKey
from .delete_template_tags_request import DeleteTemplateTagsRequest
-from .disk_metrics import DiskMetrics
from .error import Error
from .gcp_registry import GCPRegistry
from .gcp_registry_type import GCPRegistryType
from .general_registry import GeneralRegistry
from .general_registry_type import GeneralRegistryType
-from .identifier_masking_details import IdentifierMaskingDetails
from .listed_sandbox import ListedSandbox
from .log_level import LogLevel
from .logs_direction import LogsDirection
from .logs_source import LogsSource
-from .machine_info import MachineInfo
-from .max_team_metric import MaxTeamMetric
from .mcp_type_0 import McpType0
-from .new_access_token import NewAccessToken
from .new_sandbox import NewSandbox
from .new_secret import NewSecret
-from .new_team_api_key import NewTeamAPIKey
from .new_volume import NewVolume
-from .node import Node
-from .node_detail import NodeDetail
-from .node_metrics import NodeMetrics
-from .node_status import NodeStatus
-from .node_status_change import NodeStatusChange
from .order_direction import OrderDirection
from .resumed_sandbox import ResumedSandbox
from .sandbox import Sandbox
@@ -74,9 +58,6 @@ from .secret import Secret
from .secret_metadata import SecretMetadata
from .secret_update import SecretUpdate
from .snapshot_info import SnapshotInfo
-from .team import Team
-from .team_api_key import TeamAPIKey
-from .team_metric import TeamMetric
from .team_user import TeamUser
from .template import Template
from .template_alias_response import TemplateAliasResponse
@@ -96,15 +77,10 @@ from .template_tag import TemplateTag
from .template_update_request import TemplateUpdateRequest
from .template_update_response import TemplateUpdateResponse
from .template_with_builds import TemplateWithBuilds
-from .update_team_api_key import UpdateTeamAPIKey
from .volume import Volume
from .volume_and_token import VolumeAndToken
-from .volume_token import VolumeToken
__all__ = (
- "AdminBuildCancelResult",
- "AdminSandboxKillResult",
- "AdminTeamRunningSandboxCounts",
"AssignedTemplateTags",
"AssignTemplateTagsRequest",
"AWSRegistry",
@@ -112,33 +88,20 @@ __all__ = (
"BuildLogEntry",
"BuildStatusReason",
"ConnectSandbox",
- "CreatedAccessToken",
- "CreatedTeamAPIKey",
"DeleteTemplateTagsRequest",
- "DiskMetrics",
"Error",
"GCPRegistry",
"GCPRegistryType",
"GeneralRegistry",
"GeneralRegistryType",
- "IdentifierMaskingDetails",
"ListedSandbox",
"LogLevel",
"LogsDirection",
"LogsSource",
- "MachineInfo",
- "MaxTeamMetric",
"McpType0",
- "NewAccessToken",
"NewSandbox",
"NewSecret",
- "NewTeamAPIKey",
"NewVolume",
- "Node",
- "NodeDetail",
- "NodeMetrics",
- "NodeStatus",
- "NodeStatusChange",
"OrderDirection",
"ResumedSandbox",
"Sandbox",
@@ -176,9 +139,6 @@ __all__ = (
"SecretMetadata",
"SecretUpdate",
"SnapshotInfo",
- "Team",
- "TeamAPIKey",
- "TeamMetric",
"TeamUser",
"Template",
"TemplateAliasResponse",
@@ -198,8 +158,6 @@ __all__ = (
"TemplateUpdateRequest",
"TemplateUpdateResponse",
"TemplateWithBuilds",
- "UpdateTeamAPIKey",
"Volume",
"VolumeAndToken",
- "VolumeToken",
)
diff --git a/packages/python-sdk/e2b/api/client/models/admin_build_cancel_result.py b/packages/python-sdk/e2b/api/client/models/admin_build_cancel_result.py
deleted file mode 100644
index ad7429415..000000000
--- a/packages/python-sdk/e2b/api/client/models/admin_build_cancel_result.py
+++ /dev/null
@@ -1,67 +0,0 @@
-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="AdminBuildCancelResult")
-
-
-@_attrs_define
-class AdminBuildCancelResult:
- """
- Attributes:
- cancelled_count (int): Number of builds successfully cancelled
- failed_count (int): Number of builds that failed to cancel
- """
-
- cancelled_count: int
- failed_count: int
- additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
-
- def to_dict(self) -> dict[str, Any]:
- cancelled_count = self.cancelled_count
-
- failed_count = self.failed_count
-
- field_dict: dict[str, Any] = {}
- field_dict.update(self.additional_properties)
- field_dict.update(
- {
- "cancelledCount": cancelled_count,
- "failedCount": failed_count,
- }
- )
-
- return field_dict
-
- @classmethod
- def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
- d = dict(src_dict)
- cancelled_count = d.pop("cancelledCount")
-
- failed_count = d.pop("failedCount")
-
- admin_build_cancel_result = cls(
- cancelled_count=cancelled_count,
- failed_count=failed_count,
- )
-
- admin_build_cancel_result.additional_properties = d
- return admin_build_cancel_result
-
- @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/admin_sandbox_kill_result.py b/packages/python-sdk/e2b/api/client/models/admin_sandbox_kill_result.py
deleted file mode 100644
index 10dcfe372..000000000
--- a/packages/python-sdk/e2b/api/client/models/admin_sandbox_kill_result.py
+++ /dev/null
@@ -1,67 +0,0 @@
-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="AdminSandboxKillResult")
-
-
-@_attrs_define
-class AdminSandboxKillResult:
- """
- Attributes:
- killed_count (int): Number of sandboxes successfully killed
- failed_count (int): Number of sandboxes that failed to kill
- """
-
- killed_count: int
- failed_count: int
- additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
-
- def to_dict(self) -> dict[str, Any]:
- killed_count = self.killed_count
-
- failed_count = self.failed_count
-
- field_dict: dict[str, Any] = {}
- field_dict.update(self.additional_properties)
- field_dict.update(
- {
- "killedCount": killed_count,
- "failedCount": failed_count,
- }
- )
-
- return field_dict
-
- @classmethod
- def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
- d = dict(src_dict)
- killed_count = d.pop("killedCount")
-
- failed_count = d.pop("failedCount")
-
- admin_sandbox_kill_result = cls(
- killed_count=killed_count,
- failed_count=failed_count,
- )
-
- admin_sandbox_kill_result.additional_properties = d
- return admin_sandbox_kill_result
-
- @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/admin_team_running_sandbox_counts.py b/packages/python-sdk/e2b/api/client/models/admin_team_running_sandbox_counts.py
deleted file mode 100644
index d40e33af2..000000000
--- a/packages/python-sdk/e2b/api/client/models/admin_team_running_sandbox_counts.py
+++ /dev/null
@@ -1,48 +0,0 @@
-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="AdminTeamRunningSandboxCounts")
-
-
-@_attrs_define
-class AdminTeamRunningSandboxCounts:
- """Cached live sandbox index count keyed by team ID. Counts may briefly
- include sandboxes transitioning out of running; teams without indexed
- sandboxes are omitted.
-
- """
-
- additional_properties: dict[str, int] = _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)
- admin_team_running_sandbox_counts = cls()
-
- admin_team_running_sandbox_counts.additional_properties = d
- return admin_team_running_sandbox_counts
-
- @property
- def additional_keys(self) -> list[str]:
- return list(self.additional_properties.keys())
-
- def __getitem__(self, key: str) -> int:
- return self.additional_properties[key]
-
- def __setitem__(self, key: str, value: int) -> 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/created_access_token.py b/packages/python-sdk/e2b/api/client/models/created_access_token.py
deleted file mode 100644
index 2b038a2d7..000000000
--- a/packages/python-sdk/e2b/api/client/models/created_access_token.py
+++ /dev/null
@@ -1,100 +0,0 @@
-import datetime
-from collections.abc import Mapping
-from typing import TYPE_CHECKING, Any, TypeVar
-from uuid import UUID
-
-from attrs import define as _attrs_define
-from attrs import field as _attrs_field
-from dateutil.parser import isoparse
-
-if TYPE_CHECKING:
- from ..models.identifier_masking_details import IdentifierMaskingDetails
-
-
-T = TypeVar("T", bound="CreatedAccessToken")
-
-
-@_attrs_define
-class CreatedAccessToken:
- """
- Attributes:
- id (UUID): Identifier of the access token
- name (str): Name of the access token
- token (str): The fully created access token
- mask (IdentifierMaskingDetails):
- created_at (datetime.datetime): Timestamp of access token creation
- """
-
- id: UUID
- name: str
- token: str
- mask: "IdentifierMaskingDetails"
- created_at: datetime.datetime
- additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
-
- def to_dict(self) -> dict[str, Any]:
- id = str(self.id)
-
- name = self.name
-
- token = self.token
-
- mask = self.mask.to_dict()
-
- created_at = self.created_at.isoformat()
-
- field_dict: dict[str, Any] = {}
- field_dict.update(self.additional_properties)
- field_dict.update(
- {
- "id": id,
- "name": name,
- "token": token,
- "mask": mask,
- "createdAt": created_at,
- }
- )
-
- return field_dict
-
- @classmethod
- def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
- from ..models.identifier_masking_details import IdentifierMaskingDetails
-
- d = dict(src_dict)
- id = UUID(d.pop("id"))
-
- name = d.pop("name")
-
- token = d.pop("token")
-
- mask = IdentifierMaskingDetails.from_dict(d.pop("mask"))
-
- created_at = isoparse(d.pop("createdAt"))
-
- created_access_token = cls(
- id=id,
- name=name,
- token=token,
- mask=mask,
- created_at=created_at,
- )
-
- created_access_token.additional_properties = d
- return created_access_token
-
- @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/created_team_api_key.py b/packages/python-sdk/e2b/api/client/models/created_team_api_key.py
deleted file mode 100644
index 2e9ee3ea0..000000000
--- a/packages/python-sdk/e2b/api/client/models/created_team_api_key.py
+++ /dev/null
@@ -1,166 +0,0 @@
-import datetime
-from collections.abc import Mapping
-from typing import TYPE_CHECKING, Any, TypeVar, Union, cast
-from uuid import UUID
-
-from attrs import define as _attrs_define
-from attrs import field as _attrs_field
-from dateutil.parser import isoparse
-
-from ..types import UNSET, Unset
-
-if TYPE_CHECKING:
- from ..models.identifier_masking_details import IdentifierMaskingDetails
- from ..models.team_user import TeamUser
-
-
-T = TypeVar("T", bound="CreatedTeamAPIKey")
-
-
-@_attrs_define
-class CreatedTeamAPIKey:
- """
- Attributes:
- id (UUID): Identifier of the API key
- key (str): Raw value of the API key
- mask (IdentifierMaskingDetails):
- name (str): Name of the API key
- created_at (datetime.datetime): Timestamp of API key creation
- created_by (Union['TeamUser', None, Unset]):
- last_used (Union[None, Unset, datetime.datetime]): Last time this API key was used
- """
-
- id: UUID
- key: str
- mask: "IdentifierMaskingDetails"
- name: str
- created_at: datetime.datetime
- created_by: Union["TeamUser", None, Unset] = UNSET
- last_used: Union[None, Unset, datetime.datetime] = UNSET
- additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
-
- def to_dict(self) -> dict[str, Any]:
- from ..models.team_user import TeamUser
-
- id = str(self.id)
-
- key = self.key
-
- mask = self.mask.to_dict()
-
- name = self.name
-
- created_at = self.created_at.isoformat()
-
- created_by: Union[None, Unset, dict[str, Any]]
- if isinstance(self.created_by, Unset):
- created_by = UNSET
- elif isinstance(self.created_by, TeamUser):
- created_by = self.created_by.to_dict()
- else:
- created_by = self.created_by
-
- last_used: Union[None, Unset, str]
- if isinstance(self.last_used, Unset):
- last_used = UNSET
- elif isinstance(self.last_used, datetime.datetime):
- last_used = self.last_used.isoformat()
- else:
- last_used = self.last_used
-
- field_dict: dict[str, Any] = {}
- field_dict.update(self.additional_properties)
- field_dict.update(
- {
- "id": id,
- "key": key,
- "mask": mask,
- "name": name,
- "createdAt": created_at,
- }
- )
- if created_by is not UNSET:
- field_dict["createdBy"] = created_by
- if last_used is not UNSET:
- field_dict["lastUsed"] = last_used
-
- return field_dict
-
- @classmethod
- def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
- from ..models.identifier_masking_details import IdentifierMaskingDetails
- from ..models.team_user import TeamUser
-
- d = dict(src_dict)
- id = UUID(d.pop("id"))
-
- key = d.pop("key")
-
- mask = IdentifierMaskingDetails.from_dict(d.pop("mask"))
-
- name = d.pop("name")
-
- created_at = isoparse(d.pop("createdAt"))
-
- def _parse_created_by(data: object) -> Union["TeamUser", None, Unset]:
- if data is None:
- return data
- if isinstance(data, Unset):
- 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, Unset], data)
-
- created_by = _parse_created_by(d.pop("createdBy", UNSET))
-
- def _parse_last_used(data: object) -> Union[None, Unset, datetime.datetime]:
- if data is None:
- return data
- if isinstance(data, Unset):
- return data
- try:
- if not isinstance(data, str):
- raise TypeError()
- last_used_type_0 = isoparse(data)
-
- return last_used_type_0
- except: # noqa: E722
- pass
- return cast(Union[None, Unset, datetime.datetime], data)
-
- last_used = _parse_last_used(d.pop("lastUsed", UNSET))
-
- created_team_api_key = cls(
- id=id,
- key=key,
- mask=mask,
- name=name,
- created_at=created_at,
- created_by=created_by,
- last_used=last_used,
- )
-
- created_team_api_key.additional_properties = d
- return created_team_api_key
-
- @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/disk_metrics.py b/packages/python-sdk/e2b/api/client/models/disk_metrics.py
deleted file mode 100644
index c4528fa96..000000000
--- a/packages/python-sdk/e2b/api/client/models/disk_metrics.py
+++ /dev/null
@@ -1,91 +0,0 @@
-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="DiskMetrics")
-
-
-@_attrs_define
-class DiskMetrics:
- """
- Attributes:
- mount_point (str): Mount point of the disk
- device (str): Device name
- filesystem_type (str): Filesystem type (e.g., ext4, xfs)
- used_bytes (int): Used space in bytes
- total_bytes (int): Total space in bytes
- """
-
- mount_point: str
- device: str
- filesystem_type: str
- used_bytes: int
- total_bytes: int
- additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
-
- def to_dict(self) -> dict[str, Any]:
- mount_point = self.mount_point
-
- device = self.device
-
- filesystem_type = self.filesystem_type
-
- used_bytes = self.used_bytes
-
- total_bytes = self.total_bytes
-
- field_dict: dict[str, Any] = {}
- field_dict.update(self.additional_properties)
- field_dict.update(
- {
- "mountPoint": mount_point,
- "device": device,
- "filesystemType": filesystem_type,
- "usedBytes": used_bytes,
- "totalBytes": total_bytes,
- }
- )
-
- return field_dict
-
- @classmethod
- def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
- d = dict(src_dict)
- mount_point = d.pop("mountPoint")
-
- device = d.pop("device")
-
- filesystem_type = d.pop("filesystemType")
-
- used_bytes = d.pop("usedBytes")
-
- total_bytes = d.pop("totalBytes")
-
- disk_metrics = cls(
- mount_point=mount_point,
- device=device,
- filesystem_type=filesystem_type,
- used_bytes=used_bytes,
- total_bytes=total_bytes,
- )
-
- disk_metrics.additional_properties = d
- return disk_metrics
-
- @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/identifier_masking_details.py b/packages/python-sdk/e2b/api/client/models/identifier_masking_details.py
deleted file mode 100644
index 021782526..000000000
--- a/packages/python-sdk/e2b/api/client/models/identifier_masking_details.py
+++ /dev/null
@@ -1,83 +0,0 @@
-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="IdentifierMaskingDetails")
-
-
-@_attrs_define
-class IdentifierMaskingDetails:
- """
- Attributes:
- prefix (str): Prefix that identifies the token or key type
- value_length (int): Length of the token or key
- masked_value_prefix (str): Prefix used in masked version of the token or key
- masked_value_suffix (str): Suffix used in masked version of the token or key
- """
-
- prefix: str
- value_length: int
- masked_value_prefix: str
- masked_value_suffix: str
- additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
-
- def to_dict(self) -> dict[str, Any]:
- prefix = self.prefix
-
- value_length = self.value_length
-
- masked_value_prefix = self.masked_value_prefix
-
- masked_value_suffix = self.masked_value_suffix
-
- field_dict: dict[str, Any] = {}
- field_dict.update(self.additional_properties)
- field_dict.update(
- {
- "prefix": prefix,
- "valueLength": value_length,
- "maskedValuePrefix": masked_value_prefix,
- "maskedValueSuffix": masked_value_suffix,
- }
- )
-
- return field_dict
-
- @classmethod
- def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
- d = dict(src_dict)
- prefix = d.pop("prefix")
-
- value_length = d.pop("valueLength")
-
- masked_value_prefix = d.pop("maskedValuePrefix")
-
- masked_value_suffix = d.pop("maskedValueSuffix")
-
- identifier_masking_details = cls(
- prefix=prefix,
- value_length=value_length,
- masked_value_prefix=masked_value_prefix,
- masked_value_suffix=masked_value_suffix,
- )
-
- identifier_masking_details.additional_properties = d
- return identifier_masking_details
-
- @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/machine_info.py b/packages/python-sdk/e2b/api/client/models/machine_info.py
deleted file mode 100644
index cd36351ba..000000000
--- a/packages/python-sdk/e2b/api/client/models/machine_info.py
+++ /dev/null
@@ -1,83 +0,0 @@
-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="MachineInfo")
-
-
-@_attrs_define
-class MachineInfo:
- """
- Attributes:
- cpu_family (str): CPU family of the node
- cpu_model (str): CPU model of the node
- cpu_model_name (str): CPU model name of the node
- cpu_architecture (str): CPU architecture of the node
- """
-
- cpu_family: str
- cpu_model: str
- cpu_model_name: str
- cpu_architecture: str
- additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
-
- def to_dict(self) -> dict[str, Any]:
- cpu_family = self.cpu_family
-
- cpu_model = self.cpu_model
-
- cpu_model_name = self.cpu_model_name
-
- cpu_architecture = self.cpu_architecture
-
- field_dict: dict[str, Any] = {}
- field_dict.update(self.additional_properties)
- field_dict.update(
- {
- "cpuFamily": cpu_family,
- "cpuModel": cpu_model,
- "cpuModelName": cpu_model_name,
- "cpuArchitecture": cpu_architecture,
- }
- )
-
- return field_dict
-
- @classmethod
- def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
- d = dict(src_dict)
- cpu_family = d.pop("cpuFamily")
-
- cpu_model = d.pop("cpuModel")
-
- cpu_model_name = d.pop("cpuModelName")
-
- cpu_architecture = d.pop("cpuArchitecture")
-
- machine_info = cls(
- cpu_family=cpu_family,
- cpu_model=cpu_model,
- cpu_model_name=cpu_model_name,
- cpu_architecture=cpu_architecture,
- )
-
- machine_info.additional_properties = d
- return machine_info
-
- @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/max_team_metric.py b/packages/python-sdk/e2b/api/client/models/max_team_metric.py
deleted file mode 100644
index 4a9c3e526..000000000
--- a/packages/python-sdk/e2b/api/client/models/max_team_metric.py
+++ /dev/null
@@ -1,78 +0,0 @@
-import datetime
-from collections.abc import Mapping
-from typing import Any, TypeVar
-
-from attrs import define as _attrs_define
-from attrs import field as _attrs_field
-from dateutil.parser import isoparse
-
-T = TypeVar("T", bound="MaxTeamMetric")
-
-
-@_attrs_define
-class MaxTeamMetric:
- """Team metric with timestamp
-
- Attributes:
- timestamp (datetime.datetime): Timestamp of the metric entry
- timestamp_unix (int): Timestamp of the metric entry in Unix time (seconds since epoch)
- value (float): The maximum value of the requested metric in the given interval
- """
-
- timestamp: datetime.datetime
- timestamp_unix: int
- value: float
- additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
-
- def to_dict(self) -> dict[str, Any]:
- timestamp = self.timestamp.isoformat()
-
- timestamp_unix = self.timestamp_unix
-
- value = self.value
-
- field_dict: dict[str, Any] = {}
- field_dict.update(self.additional_properties)
- field_dict.update(
- {
- "timestamp": timestamp,
- "timestampUnix": timestamp_unix,
- "value": value,
- }
- )
-
- return field_dict
-
- @classmethod
- def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
- d = dict(src_dict)
- timestamp = isoparse(d.pop("timestamp"))
-
- timestamp_unix = d.pop("timestampUnix")
-
- value = d.pop("value")
-
- max_team_metric = cls(
- timestamp=timestamp,
- timestamp_unix=timestamp_unix,
- value=value,
- )
-
- max_team_metric.additional_properties = d
- return max_team_metric
-
- @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/new_access_token.py b/packages/python-sdk/e2b/api/client/models/new_access_token.py
deleted file mode 100644
index 642dac80d..000000000
--- a/packages/python-sdk/e2b/api/client/models/new_access_token.py
+++ /dev/null
@@ -1,59 +0,0 @@
-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="NewAccessToken")
-
-
-@_attrs_define
-class NewAccessToken:
- """
- Attributes:
- name (str): Name of the access token
- """
-
- name: str
- additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
-
- def to_dict(self) -> dict[str, Any]:
- name = self.name
-
- field_dict: dict[str, Any] = {}
- field_dict.update(self.additional_properties)
- field_dict.update(
- {
- "name": name,
- }
- )
-
- return field_dict
-
- @classmethod
- def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
- d = dict(src_dict)
- name = d.pop("name")
-
- new_access_token = cls(
- name=name,
- )
-
- new_access_token.additional_properties = d
- return new_access_token
-
- @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/new_team_api_key.py b/packages/python-sdk/e2b/api/client/models/new_team_api_key.py
deleted file mode 100644
index 2fac8a6bf..000000000
--- a/packages/python-sdk/e2b/api/client/models/new_team_api_key.py
+++ /dev/null
@@ -1,59 +0,0 @@
-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="NewTeamAPIKey")
-
-
-@_attrs_define
-class NewTeamAPIKey:
- """
- Attributes:
- name (str): Name of the API key
- """
-
- name: str
- additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
-
- def to_dict(self) -> dict[str, Any]:
- name = self.name
-
- field_dict: dict[str, Any] = {}
- field_dict.update(self.additional_properties)
- field_dict.update(
- {
- "name": name,
- }
- )
-
- return field_dict
-
- @classmethod
- def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
- d = dict(src_dict)
- name = d.pop("name")
-
- new_team_api_key = cls(
- name=name,
- )
-
- new_team_api_key.additional_properties = d
- return new_team_api_key
-
- @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/node.py b/packages/python-sdk/e2b/api/client/models/node.py
deleted file mode 100644
index dfae913b9..000000000
--- a/packages/python-sdk/e2b/api/client/models/node.py
+++ /dev/null
@@ -1,170 +0,0 @@
-import datetime
-from collections.abc import Mapping
-from typing import TYPE_CHECKING, Any, TypeVar
-
-from attrs import define as _attrs_define
-from attrs import field as _attrs_field
-from dateutil.parser import isoparse
-
-from ..models.node_status import NodeStatus
-
-if TYPE_CHECKING:
- from ..models.machine_info import MachineInfo
- from ..models.node_metrics import NodeMetrics
-
-
-T = TypeVar("T", bound="Node")
-
-
-@_attrs_define
-class Node:
- """
- Attributes:
- version (str): Version of the orchestrator
- commit (str): Commit of the orchestrator
- id (str): Identifier of the node
- service_instance_id (str): Service instance identifier of the node
- cluster_id (str): Identifier of the cluster
- machine_info (MachineInfo):
- status (NodeStatus): Status of the node.
- - draining: the node is bound to be shut down. It will not accept new sandboxes and will stop once all existing
- sandboxes are done.
- - standby: the node is not actively used, but it can return to ready and continue serving traffic.
- status_changed_at (datetime.datetime): Time when the node status was last changed
- sandbox_count (int): Number of sandboxes running on the node
- metrics (NodeMetrics): Node metrics
- create_successes (int): Number of sandbox create successes
- create_fails (int): Number of sandbox create fails
- sandbox_starting_count (int): Number of starting Sandboxes
- """
-
- version: str
- commit: str
- id: str
- service_instance_id: str
- cluster_id: str
- machine_info: "MachineInfo"
- status: NodeStatus
- status_changed_at: datetime.datetime
- sandbox_count: int
- metrics: "NodeMetrics"
- create_successes: int
- create_fails: int
- sandbox_starting_count: int
- additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
-
- def to_dict(self) -> dict[str, Any]:
- version = self.version
-
- commit = self.commit
-
- id = self.id
-
- service_instance_id = self.service_instance_id
-
- cluster_id = self.cluster_id
-
- machine_info = self.machine_info.to_dict()
-
- status = self.status.value
-
- status_changed_at = self.status_changed_at.isoformat()
-
- sandbox_count = self.sandbox_count
-
- metrics = self.metrics.to_dict()
-
- create_successes = self.create_successes
-
- create_fails = self.create_fails
-
- sandbox_starting_count = self.sandbox_starting_count
-
- field_dict: dict[str, Any] = {}
- field_dict.update(self.additional_properties)
- field_dict.update(
- {
- "version": version,
- "commit": commit,
- "id": id,
- "serviceInstanceID": service_instance_id,
- "clusterID": cluster_id,
- "machineInfo": machine_info,
- "status": status,
- "statusChangedAt": status_changed_at,
- "sandboxCount": sandbox_count,
- "metrics": metrics,
- "createSuccesses": create_successes,
- "createFails": create_fails,
- "sandboxStartingCount": sandbox_starting_count,
- }
- )
-
- return field_dict
-
- @classmethod
- def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
- from ..models.machine_info import MachineInfo
- from ..models.node_metrics import NodeMetrics
-
- d = dict(src_dict)
- version = d.pop("version")
-
- commit = d.pop("commit")
-
- id = d.pop("id")
-
- service_instance_id = d.pop("serviceInstanceID")
-
- cluster_id = d.pop("clusterID")
-
- machine_info = MachineInfo.from_dict(d.pop("machineInfo"))
-
- status = NodeStatus(d.pop("status"))
-
- status_changed_at = isoparse(d.pop("statusChangedAt"))
-
- sandbox_count = d.pop("sandboxCount")
-
- metrics = NodeMetrics.from_dict(d.pop("metrics"))
-
- create_successes = d.pop("createSuccesses")
-
- create_fails = d.pop("createFails")
-
- sandbox_starting_count = d.pop("sandboxStartingCount")
-
- node = cls(
- version=version,
- commit=commit,
- id=id,
- service_instance_id=service_instance_id,
- cluster_id=cluster_id,
- machine_info=machine_info,
- status=status,
- status_changed_at=status_changed_at,
- sandbox_count=sandbox_count,
- metrics=metrics,
- create_successes=create_successes,
- create_fails=create_fails,
- sandbox_starting_count=sandbox_starting_count,
- )
-
- node.additional_properties = d
- return node
-
- @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/node_detail.py b/packages/python-sdk/e2b/api/client/models/node_detail.py
deleted file mode 100644
index b5b5c0145..000000000
--- a/packages/python-sdk/e2b/api/client/models/node_detail.py
+++ /dev/null
@@ -1,162 +0,0 @@
-import datetime
-from collections.abc import Mapping
-from typing import TYPE_CHECKING, Any, TypeVar
-
-from attrs import define as _attrs_define
-from attrs import field as _attrs_field
-from dateutil.parser import isoparse
-
-from ..models.node_status import NodeStatus
-
-if TYPE_CHECKING:
- from ..models.machine_info import MachineInfo
- from ..models.node_metrics import NodeMetrics
-
-
-T = TypeVar("T", bound="NodeDetail")
-
-
-@_attrs_define
-class NodeDetail:
- """
- Attributes:
- cluster_id (str): Identifier of the cluster
- version (str): Version of the orchestrator
- commit (str): Commit of the orchestrator
- id (str): Identifier of the node
- service_instance_id (str): Service instance identifier of the node
- machine_info (MachineInfo):
- status (NodeStatus): Status of the node.
- - draining: the node is bound to be shut down. It will not accept new sandboxes and will stop once all existing
- sandboxes are done.
- - standby: the node is not actively used, but it can return to ready and continue serving traffic.
- status_changed_at (datetime.datetime): Time when the node status was last changed
- sandbox_count (int): Number of sandboxes running on the node
- metrics (NodeMetrics): Node metrics
- create_successes (int): Number of sandbox create successes
- create_fails (int): Number of sandbox create fails
- """
-
- cluster_id: str
- version: str
- commit: str
- id: str
- service_instance_id: str
- machine_info: "MachineInfo"
- status: NodeStatus
- status_changed_at: datetime.datetime
- sandbox_count: int
- metrics: "NodeMetrics"
- create_successes: int
- create_fails: int
- additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
-
- def to_dict(self) -> dict[str, Any]:
- cluster_id = self.cluster_id
-
- version = self.version
-
- commit = self.commit
-
- id = self.id
-
- service_instance_id = self.service_instance_id
-
- machine_info = self.machine_info.to_dict()
-
- status = self.status.value
-
- status_changed_at = self.status_changed_at.isoformat()
-
- sandbox_count = self.sandbox_count
-
- metrics = self.metrics.to_dict()
-
- create_successes = self.create_successes
-
- create_fails = self.create_fails
-
- field_dict: dict[str, Any] = {}
- field_dict.update(self.additional_properties)
- field_dict.update(
- {
- "clusterID": cluster_id,
- "version": version,
- "commit": commit,
- "id": id,
- "serviceInstanceID": service_instance_id,
- "machineInfo": machine_info,
- "status": status,
- "statusChangedAt": status_changed_at,
- "sandboxCount": sandbox_count,
- "metrics": metrics,
- "createSuccesses": create_successes,
- "createFails": create_fails,
- }
- )
-
- return field_dict
-
- @classmethod
- def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
- from ..models.machine_info import MachineInfo
- from ..models.node_metrics import NodeMetrics
-
- d = dict(src_dict)
- cluster_id = d.pop("clusterID")
-
- version = d.pop("version")
-
- commit = d.pop("commit")
-
- id = d.pop("id")
-
- service_instance_id = d.pop("serviceInstanceID")
-
- machine_info = MachineInfo.from_dict(d.pop("machineInfo"))
-
- status = NodeStatus(d.pop("status"))
-
- status_changed_at = isoparse(d.pop("statusChangedAt"))
-
- sandbox_count = d.pop("sandboxCount")
-
- metrics = NodeMetrics.from_dict(d.pop("metrics"))
-
- create_successes = d.pop("createSuccesses")
-
- create_fails = d.pop("createFails")
-
- node_detail = cls(
- cluster_id=cluster_id,
- version=version,
- commit=commit,
- id=id,
- service_instance_id=service_instance_id,
- machine_info=machine_info,
- status=status,
- status_changed_at=status_changed_at,
- sandbox_count=sandbox_count,
- metrics=metrics,
- create_successes=create_successes,
- create_fails=create_fails,
- )
-
- node_detail.additional_properties = d
- return node_detail
-
- @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/node_metrics.py b/packages/python-sdk/e2b/api/client/models/node_metrics.py
deleted file mode 100644
index b53a5a1ef..000000000
--- a/packages/python-sdk/e2b/api/client/models/node_metrics.py
+++ /dev/null
@@ -1,154 +0,0 @@
-from collections.abc import Mapping
-from typing import TYPE_CHECKING, Any, TypeVar
-
-from attrs import define as _attrs_define
-from attrs import field as _attrs_field
-
-if TYPE_CHECKING:
- from ..models.disk_metrics import DiskMetrics
-
-
-T = TypeVar("T", bound="NodeMetrics")
-
-
-@_attrs_define
-class NodeMetrics:
- """Node metrics
-
- Attributes:
- allocated_cpu (int): Number of allocated CPU cores
- cpu_percent (int): Node CPU usage percentage
- cpu_count (int): Total number of CPU cores on the node
- allocated_memory_bytes (int): Amount of allocated memory in bytes
- memory_used_bytes (int): Node memory used in bytes
- memory_total_bytes (int): Total node memory in bytes
- huge_pages_total (int): Total number of preallocated hugepages on the node
- huge_pages_used (int): Number of hugepages in use (total - free)
- huge_pages_reserved (int): Number of reserved hugepages (committed but not yet faulted)
- huge_page_size_bytes (int): Size of a single hugepage in bytes
- disks (list['DiskMetrics']): Detailed metrics for each disk/mount point
- """
-
- allocated_cpu: int
- cpu_percent: int
- cpu_count: int
- allocated_memory_bytes: int
- memory_used_bytes: int
- memory_total_bytes: int
- huge_pages_total: int
- huge_pages_used: int
- huge_pages_reserved: int
- huge_page_size_bytes: int
- disks: list["DiskMetrics"]
- additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
-
- def to_dict(self) -> dict[str, Any]:
- allocated_cpu = self.allocated_cpu
-
- cpu_percent = self.cpu_percent
-
- cpu_count = self.cpu_count
-
- allocated_memory_bytes = self.allocated_memory_bytes
-
- memory_used_bytes = self.memory_used_bytes
-
- memory_total_bytes = self.memory_total_bytes
-
- huge_pages_total = self.huge_pages_total
-
- huge_pages_used = self.huge_pages_used
-
- huge_pages_reserved = self.huge_pages_reserved
-
- huge_page_size_bytes = self.huge_page_size_bytes
-
- disks = []
- for disks_item_data in self.disks:
- disks_item = disks_item_data.to_dict()
- disks.append(disks_item)
-
- field_dict: dict[str, Any] = {}
- field_dict.update(self.additional_properties)
- field_dict.update(
- {
- "allocatedCPU": allocated_cpu,
- "cpuPercent": cpu_percent,
- "cpuCount": cpu_count,
- "allocatedMemoryBytes": allocated_memory_bytes,
- "memoryUsedBytes": memory_used_bytes,
- "memoryTotalBytes": memory_total_bytes,
- "hugePagesTotal": huge_pages_total,
- "hugePagesUsed": huge_pages_used,
- "hugePagesReserved": huge_pages_reserved,
- "hugePageSizeBytes": huge_page_size_bytes,
- "disks": disks,
- }
- )
-
- return field_dict
-
- @classmethod
- def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
- from ..models.disk_metrics import DiskMetrics
-
- d = dict(src_dict)
- allocated_cpu = d.pop("allocatedCPU")
-
- cpu_percent = d.pop("cpuPercent")
-
- cpu_count = d.pop("cpuCount")
-
- allocated_memory_bytes = d.pop("allocatedMemoryBytes")
-
- memory_used_bytes = d.pop("memoryUsedBytes")
-
- memory_total_bytes = d.pop("memoryTotalBytes")
-
- huge_pages_total = d.pop("hugePagesTotal")
-
- huge_pages_used = d.pop("hugePagesUsed")
-
- huge_pages_reserved = d.pop("hugePagesReserved")
-
- huge_page_size_bytes = d.pop("hugePageSizeBytes")
-
- disks = []
- _disks = d.pop("disks")
- for disks_item_data in _disks:
- disks_item = DiskMetrics.from_dict(disks_item_data)
-
- disks.append(disks_item)
-
- node_metrics = cls(
- allocated_cpu=allocated_cpu,
- cpu_percent=cpu_percent,
- cpu_count=cpu_count,
- allocated_memory_bytes=allocated_memory_bytes,
- memory_used_bytes=memory_used_bytes,
- memory_total_bytes=memory_total_bytes,
- huge_pages_total=huge_pages_total,
- huge_pages_used=huge_pages_used,
- huge_pages_reserved=huge_pages_reserved,
- huge_page_size_bytes=huge_page_size_bytes,
- disks=disks,
- )
-
- node_metrics.additional_properties = d
- return node_metrics
-
- @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/node_status.py b/packages/python-sdk/e2b/api/client/models/node_status.py
deleted file mode 100644
index 9f7aa1f1b..000000000
--- a/packages/python-sdk/e2b/api/client/models/node_status.py
+++ /dev/null
@@ -1,12 +0,0 @@
-from enum import Enum
-
-
-class NodeStatus(str, Enum):
- CONNECTING = "connecting"
- DRAINING = "draining"
- READY = "ready"
- STANDBY = "standby"
- UNHEALTHY = "unhealthy"
-
- def __str__(self) -> str:
- return str(self.value)
diff --git a/packages/python-sdk/e2b/api/client/models/node_status_change.py b/packages/python-sdk/e2b/api/client/models/node_status_change.py
deleted file mode 100644
index 06d09a1bb..000000000
--- a/packages/python-sdk/e2b/api/client/models/node_status_change.py
+++ /dev/null
@@ -1,82 +0,0 @@
-from collections.abc import Mapping
-from typing import Any, TypeVar, Union
-from uuid import UUID
-
-from attrs import define as _attrs_define
-from attrs import field as _attrs_field
-
-from ..models.node_status import NodeStatus
-from ..types import UNSET, Unset
-
-T = TypeVar("T", bound="NodeStatusChange")
-
-
-@_attrs_define
-class NodeStatusChange:
- """
- Attributes:
- status (NodeStatus): Status of the node.
- - draining: the node is bound to be shut down. It will not accept new sandboxes and will stop once all existing
- sandboxes are done.
- - standby: the node is not actively used, but it can return to ready and continue serving traffic.
- cluster_id (Union[Unset, UUID]): Identifier of the cluster
- """
-
- status: NodeStatus
- cluster_id: Union[Unset, UUID] = UNSET
- additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
-
- def to_dict(self) -> dict[str, Any]:
- status = self.status.value
-
- cluster_id: Union[Unset, str] = UNSET
- if not isinstance(self.cluster_id, Unset):
- cluster_id = str(self.cluster_id)
-
- field_dict: dict[str, Any] = {}
- field_dict.update(self.additional_properties)
- field_dict.update(
- {
- "status": status,
- }
- )
- if cluster_id is not UNSET:
- field_dict["clusterID"] = cluster_id
-
- return field_dict
-
- @classmethod
- def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
- d = dict(src_dict)
- status = NodeStatus(d.pop("status"))
-
- _cluster_id = d.pop("clusterID", UNSET)
- cluster_id: Union[Unset, UUID]
- if isinstance(_cluster_id, Unset):
- cluster_id = UNSET
- else:
- cluster_id = UUID(_cluster_id)
-
- node_status_change = cls(
- status=status,
- cluster_id=cluster_id,
- )
-
- node_status_change.additional_properties = d
- return node_status_change
-
- @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/team.py b/packages/python-sdk/e2b/api/client/models/team.py
deleted file mode 100644
index 2568fdacc..000000000
--- a/packages/python-sdk/e2b/api/client/models/team.py
+++ /dev/null
@@ -1,83 +0,0 @@
-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="Team")
-
-
-@_attrs_define
-class Team:
- """
- Attributes:
- team_id (str): Identifier of the team
- name (str): Name of the team
- api_key (str): API key for the team
- is_default (bool): Whether the team is the default team
- """
-
- team_id: str
- name: str
- api_key: str
- is_default: bool
- additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
-
- def to_dict(self) -> dict[str, Any]:
- team_id = self.team_id
-
- name = self.name
-
- api_key = self.api_key
-
- is_default = self.is_default
-
- field_dict: dict[str, Any] = {}
- field_dict.update(self.additional_properties)
- field_dict.update(
- {
- "teamID": team_id,
- "name": name,
- "apiKey": api_key,
- "isDefault": is_default,
- }
- )
-
- return field_dict
-
- @classmethod
- def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
- d = dict(src_dict)
- team_id = d.pop("teamID")
-
- name = d.pop("name")
-
- api_key = d.pop("apiKey")
-
- is_default = d.pop("isDefault")
-
- team = cls(
- team_id=team_id,
- name=name,
- api_key=api_key,
- is_default=is_default,
- )
-
- team.additional_properties = d
- return team
-
- @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/team_api_key.py b/packages/python-sdk/e2b/api/client/models/team_api_key.py
deleted file mode 100644
index e115fdd4c..000000000
--- a/packages/python-sdk/e2b/api/client/models/team_api_key.py
+++ /dev/null
@@ -1,158 +0,0 @@
-import datetime
-from collections.abc import Mapping
-from typing import TYPE_CHECKING, Any, TypeVar, Union, cast
-from uuid import UUID
-
-from attrs import define as _attrs_define
-from attrs import field as _attrs_field
-from dateutil.parser import isoparse
-
-from ..types import UNSET, Unset
-
-if TYPE_CHECKING:
- from ..models.identifier_masking_details import IdentifierMaskingDetails
- from ..models.team_user import TeamUser
-
-
-T = TypeVar("T", bound="TeamAPIKey")
-
-
-@_attrs_define
-class TeamAPIKey:
- """
- Attributes:
- id (UUID): Identifier of the API key
- name (str): Name of the API key
- mask (IdentifierMaskingDetails):
- created_at (datetime.datetime): Timestamp of API key creation
- created_by (Union['TeamUser', None, Unset]):
- last_used (Union[None, Unset, datetime.datetime]): Last time this API key was used
- """
-
- id: UUID
- name: str
- mask: "IdentifierMaskingDetails"
- created_at: datetime.datetime
- created_by: Union["TeamUser", None, Unset] = UNSET
- last_used: Union[None, Unset, datetime.datetime] = UNSET
- additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
-
- def to_dict(self) -> dict[str, Any]:
- from ..models.team_user import TeamUser
-
- id = str(self.id)
-
- name = self.name
-
- mask = self.mask.to_dict()
-
- created_at = self.created_at.isoformat()
-
- created_by: Union[None, Unset, dict[str, Any]]
- if isinstance(self.created_by, Unset):
- created_by = UNSET
- elif isinstance(self.created_by, TeamUser):
- created_by = self.created_by.to_dict()
- else:
- created_by = self.created_by
-
- last_used: Union[None, Unset, str]
- if isinstance(self.last_used, Unset):
- last_used = UNSET
- elif isinstance(self.last_used, datetime.datetime):
- last_used = self.last_used.isoformat()
- else:
- last_used = self.last_used
-
- field_dict: dict[str, Any] = {}
- field_dict.update(self.additional_properties)
- field_dict.update(
- {
- "id": id,
- "name": name,
- "mask": mask,
- "createdAt": created_at,
- }
- )
- if created_by is not UNSET:
- field_dict["createdBy"] = created_by
- if last_used is not UNSET:
- field_dict["lastUsed"] = last_used
-
- return field_dict
-
- @classmethod
- def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
- from ..models.identifier_masking_details import IdentifierMaskingDetails
- from ..models.team_user import TeamUser
-
- d = dict(src_dict)
- id = UUID(d.pop("id"))
-
- name = d.pop("name")
-
- mask = IdentifierMaskingDetails.from_dict(d.pop("mask"))
-
- created_at = isoparse(d.pop("createdAt"))
-
- def _parse_created_by(data: object) -> Union["TeamUser", None, Unset]:
- if data is None:
- return data
- if isinstance(data, Unset):
- 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, Unset], data)
-
- created_by = _parse_created_by(d.pop("createdBy", UNSET))
-
- def _parse_last_used(data: object) -> Union[None, Unset, datetime.datetime]:
- if data is None:
- return data
- if isinstance(data, Unset):
- return data
- try:
- if not isinstance(data, str):
- raise TypeError()
- last_used_type_0 = isoparse(data)
-
- return last_used_type_0
- except: # noqa: E722
- pass
- return cast(Union[None, Unset, datetime.datetime], data)
-
- last_used = _parse_last_used(d.pop("lastUsed", UNSET))
-
- team_api_key = cls(
- id=id,
- name=name,
- mask=mask,
- created_at=created_at,
- created_by=created_by,
- last_used=last_used,
- )
-
- team_api_key.additional_properties = d
- return team_api_key
-
- @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/team_metric.py b/packages/python-sdk/e2b/api/client/models/team_metric.py
deleted file mode 100644
index ee462568f..000000000
--- a/packages/python-sdk/e2b/api/client/models/team_metric.py
+++ /dev/null
@@ -1,86 +0,0 @@
-import datetime
-from collections.abc import Mapping
-from typing import Any, TypeVar
-
-from attrs import define as _attrs_define
-from attrs import field as _attrs_field
-from dateutil.parser import isoparse
-
-T = TypeVar("T", bound="TeamMetric")
-
-
-@_attrs_define
-class TeamMetric:
- """Team metric with timestamp
-
- Attributes:
- timestamp (datetime.datetime): Timestamp of the metric entry
- timestamp_unix (int): Timestamp of the metric entry in Unix time (seconds since epoch)
- concurrent_sandboxes (int): The number of concurrent sandboxes for the team
- sandbox_start_rate (float): Number of sandboxes started per second
- """
-
- timestamp: datetime.datetime
- timestamp_unix: int
- concurrent_sandboxes: int
- sandbox_start_rate: float
- additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
-
- def to_dict(self) -> dict[str, Any]:
- timestamp = self.timestamp.isoformat()
-
- timestamp_unix = self.timestamp_unix
-
- concurrent_sandboxes = self.concurrent_sandboxes
-
- sandbox_start_rate = self.sandbox_start_rate
-
- field_dict: dict[str, Any] = {}
- field_dict.update(self.additional_properties)
- field_dict.update(
- {
- "timestamp": timestamp,
- "timestampUnix": timestamp_unix,
- "concurrentSandboxes": concurrent_sandboxes,
- "sandboxStartRate": sandbox_start_rate,
- }
- )
-
- return field_dict
-
- @classmethod
- def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
- d = dict(src_dict)
- timestamp = isoparse(d.pop("timestamp"))
-
- timestamp_unix = d.pop("timestampUnix")
-
- concurrent_sandboxes = d.pop("concurrentSandboxes")
-
- sandbox_start_rate = d.pop("sandboxStartRate")
-
- team_metric = cls(
- timestamp=timestamp,
- timestamp_unix=timestamp_unix,
- concurrent_sandboxes=concurrent_sandboxes,
- sandbox_start_rate=sandbox_start_rate,
- )
-
- team_metric.additional_properties = d
- return team_metric
-
- @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/update_team_api_key.py b/packages/python-sdk/e2b/api/client/models/update_team_api_key.py
deleted file mode 100644
index 34fb9679a..000000000
--- a/packages/python-sdk/e2b/api/client/models/update_team_api_key.py
+++ /dev/null
@@ -1,59 +0,0 @@
-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="UpdateTeamAPIKey")
-
-
-@_attrs_define
-class UpdateTeamAPIKey:
- """
- Attributes:
- name (str): New name for the API key
- """
-
- name: str
- additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
-
- def to_dict(self) -> dict[str, Any]:
- name = self.name
-
- field_dict: dict[str, Any] = {}
- field_dict.update(self.additional_properties)
- field_dict.update(
- {
- "name": name,
- }
- )
-
- return field_dict
-
- @classmethod
- def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
- d = dict(src_dict)
- name = d.pop("name")
-
- update_team_api_key = cls(
- name=name,
- )
-
- update_team_api_key.additional_properties = d
- return update_team_api_key
-
- @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/volume_token.py b/packages/python-sdk/e2b/api/client/models/volume_token.py
deleted file mode 100644
index f6f4cec81..000000000
--- a/packages/python-sdk/e2b/api/client/models/volume_token.py
+++ /dev/null
@@ -1,59 +0,0 @@
-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="VolumeToken")
-
-
-@_attrs_define
-class VolumeToken:
- """
- Attributes:
- token (str):
- """
-
- token: str
- additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
-
- def to_dict(self) -> dict[str, Any]:
- token = self.token
-
- field_dict: dict[str, Any] = {}
- field_dict.update(self.additional_properties)
- field_dict.update(
- {
- "token": token,
- }
- )
-
- return field_dict
-
- @classmethod
- def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
- d = dict(src_dict)
- token = d.pop("token")
-
- volume_token = cls(
- token=token,
- )
-
- volume_token.additional_properties = d
- return volume_token
-
- @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/redocly.yaml b/redocly.yaml
index 480d3ad5f..a41c41dc0 100644
--- a/redocly.yaml
+++ b/redocly.yaml
@@ -1,9 +1,11 @@
# Filters the synced REST API spec (spec/openapi.yml) down to the endpoint
# tags each SDK exposes; everything else (admin, access-tokens, api-keys,
-# untagged endpoints like /health) is dropped. The SDK generate pipelines run
-# `redocly bundle <api> -o spec/openapi_generated.<api>.yml` before invoking
-# their client generators. The js-sdk list additionally keeps `auth` because
-# the CLI reaches /teams through the js-sdk's generated schema.
+# untagged endpoints like /health) is dropped, and remove-unused-components
+# then drops the component schemas only those operations referenced, so admin
+# and cluster types never reach the generated clients. The SDK generate
+# pipelines run `redocly bundle <api> -o spec/openapi_generated.<api>.yml`
+# before invoking their client generators. The js-sdk list additionally keeps
+# `auth` because the CLI reaches /teams through the js-sdk's generated schema.
#
# filter-out drops any node (operation or component schema) the upstream
# specs mark `x-not-implemented: true`. It has no applyTo on purpose: the
@@ -26,6 +28,7 @@ apis:
value: [sandboxes, snapshots, templates, tags, auth, volumes, secrets]
matchStrategy: any
applyTo: Operation
+ remove-unused-components: on
filter-out:
property: x-not-implemented
value: [true]
@@ -37,6 +40,7 @@ apis:
value: [sandboxes, snapshots, templates, tags, volumes, secrets]
matchStrategy: any
applyTo: Operation
+ remove-unused-components: on
filter-out:
property: x-not-implemented
value: [true]