diff --git a/package-lock.json b/package-lock.json index be77ba17..42c80a92 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,7 +8,7 @@ "devDependencies": { "@seamapi/fake-seam-connect": "1.79.3", "@seamapi/nextlove-sdk-generator": "1.17.4", - "@seamapi/types": "1.367.0", + "@seamapi/types": "1.368.0", "del": "^7.1.0", "prettier": "^3.2.5" } @@ -475,9 +475,9 @@ } }, "node_modules/@seamapi/types": { - "version": "1.367.0", - "resolved": "https://registry.npmjs.org/@seamapi/types/-/types-1.367.0.tgz", - "integrity": "sha512-ku9jo74qucNaWpaEBYZgucpITGIcB6qypShsgxKtqo3BJt7QvR24dr+jdzMPz/dV+dqgD2iIM1JdItbxi+TjUw==", + "version": "1.368.0", + "resolved": "https://registry.npmjs.org/@seamapi/types/-/types-1.368.0.tgz", + "integrity": "sha512-8xIy0Oxh5O1sGoHOVMRZCwk0oXm1WMLoUOdhin9a7eu4dZ3bZlD1ABFKAE3HK4rXvTylW0vqLzTcSXYtLGzD5A==", "dev": true, "license": "MIT", "engines": { @@ -485,7 +485,7 @@ "npm": ">= 9.0.0" }, "peerDependencies": { - "zod": "^3.21.4" + "zod": "^3.24.0" } }, "node_modules/aggregate-error": { @@ -1613,10 +1613,11 @@ } }, "node_modules/zod": { - "version": "3.22.4", - "resolved": "https://registry.npmjs.org/zod/-/zod-3.22.4.tgz", - "integrity": "sha512-iC+8Io04lddc+mVqQ9AZ7OQ2MrUKGN+oIQyq1vemgt46jwCwLfhq7/pwnBnNXXXZb8VTVLKwp9EDkx+ryxIWmg==", + "version": "3.24.2", + "resolved": "https://registry.npmjs.org/zod/-/zod-3.24.2.tgz", + "integrity": "sha512-lY7CDW43ECgW9u1TcT3IoXHflywfVqDYze4waEz812jR/bZ8FHDsl7pFQoSZTz5N+2NqRXs8GBwnAwo3ZNxqhQ==", "dev": true, + "license": "MIT", "funding": { "url": "https://github.com/sponsors/colinhacks" } diff --git a/package.json b/package.json index 869e01bb..3c6e2df0 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "devDependencies": { "@seamapi/fake-seam-connect": "1.79.3", "@seamapi/nextlove-sdk-generator": "1.17.4", - "@seamapi/types": "1.367.0", + "@seamapi/types": "1.368.0", "del": "^7.1.0", "prettier": "^3.2.5" } diff --git a/seam/routes/devices_simulate.py b/seam/routes/devices_simulate.py index 52ddc26a..99d4cff0 100644 --- a/seam/routes/devices_simulate.py +++ b/seam/routes/devices_simulate.py @@ -8,6 +8,30 @@ def __init__(self, client: SeamHttpClient, defaults: Dict[str, Any]): self.client = client self.defaults = defaults + def access_code_lock(self, *, access_code_id: str, device_id: str) -> None: + json_payload = {} + + if access_code_id is not None: + json_payload["access_code_id"] = access_code_id + if device_id is not None: + json_payload["device_id"] = device_id + + self.client.post("/devices/simulate/access_code_lock", json=json_payload) + + return None + + def access_code_unlock(self, *, access_code_id: str, device_id: str) -> None: + json_payload = {} + + if access_code_id is not None: + json_payload["access_code_id"] = access_code_id + if device_id is not None: + json_payload["device_id"] = device_id + + self.client.post("/devices/simulate/access_code_unlock", json=json_payload) + + return None + def connect(self, *, device_id: str) -> None: json_payload = {} diff --git a/seam/routes/models.py b/seam/routes/models.py index 796d8757..6c3a53a6 100644 --- a/seam/routes/models.py +++ b/seam/routes/models.py @@ -1699,6 +1699,14 @@ def update( class AbstractDevicesSimulate(abc.ABC): + @abc.abstractmethod + def access_code_lock(self, *, access_code_id: str, device_id: str) -> None: + raise NotImplementedError() + + @abc.abstractmethod + def access_code_unlock(self, *, access_code_id: str, device_id: str) -> None: + raise NotImplementedError() + @abc.abstractmethod def connect(self, *, device_id: str) -> None: raise NotImplementedError()