diff --git a/package-lock.json b/package-lock.json index fee21d6..a52be50 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,7 +8,7 @@ "devDependencies": { "@seamapi/fake-seam-connect": "1.86.0", "@seamapi/nextlove-sdk-generator": "^1.19.10", - "@seamapi/types": "1.812.0", + "@seamapi/types": "1.818.0", "del": "^7.1.0", "prettier": "^3.2.5" } @@ -535,9 +535,9 @@ } }, "node_modules/@seamapi/types": { - "version": "1.812.0", - "resolved": "https://registry.npmjs.org/@seamapi/types/-/types-1.812.0.tgz", - "integrity": "sha512-6SRdCN784l9I4E90533WbJ0zpFOjbEFpWFTdaPvx1AdLhac/okdiK9W9o0i3Sjah9xhwvzICgbznINP2up3UVw==", + "version": "1.818.0", + "resolved": "https://registry.npmjs.org/@seamapi/types/-/types-1.818.0.tgz", + "integrity": "sha512-IML1OBYMJnlK3xLGR/YgLC5HoGDzXbS9Fgj2VZbO7S0GlG6AUoKqAqiIAfDx6SaflzqaaYSDRooadIoJfQM52A==", "dev": true, "license": "MIT", "engines": { diff --git a/package.json b/package.json index 38d59ff..1b67b64 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "devDependencies": { "@seamapi/fake-seam-connect": "1.86.0", "@seamapi/nextlove-sdk-generator": "^1.19.10", - "@seamapi/types": "1.812.0", + "@seamapi/types": "1.818.0", "del": "^7.1.0", "prettier": "^3.2.5" } diff --git a/seam/routes/connected_accounts.py b/seam/routes/connected_accounts.py index 0dae5c3..9326650 100644 --- a/seam/routes/connected_accounts.py +++ b/seam/routes/connected_accounts.py @@ -46,6 +46,7 @@ def list( limit: Optional[int] = None, page_cursor: Optional[str] = None, search: Optional[str] = None, + space_id: Optional[str] = None, user_identifier_key: Optional[str] = None ) -> List[ConnectedAccount]: json_payload = {} @@ -60,6 +61,8 @@ def list( json_payload["page_cursor"] = page_cursor if search is not None: json_payload["search"] = search + if space_id is not None: + json_payload["space_id"] = space_id if user_identifier_key is not None: json_payload["user_identifier_key"] = user_identifier_key diff --git a/seam/routes/models.py b/seam/routes/models.py index 2849e47..2d8166f 100644 --- a/seam/routes/models.py +++ b/seam/routes/models.py @@ -1083,6 +1083,7 @@ class SeamEvent: noise_threshold_name: str noiseaware_metadata: Dict[str, Any] access_code_is_managed: bool + is_bluetooth_action: bool method: str user_identity_id: str climate_preset_key: str @@ -1170,6 +1171,7 @@ def from_dict(d: Dict[str, Any]): noise_threshold_name=d.get("noise_threshold_name", None), noiseaware_metadata=DeepAttrDict(d.get("noiseaware_metadata", None)), access_code_is_managed=d.get("access_code_is_managed", None), + is_bluetooth_action=d.get("is_bluetooth_action", None), method=d.get("method", None), user_identity_id=d.get("user_identity_id", None), climate_preset_key=d.get("climate_preset_key", None), @@ -2824,6 +2826,12 @@ class AbstractSpaces(abc.ABC): def add_acs_entrances(self, *, acs_entrance_ids: List[str], space_id: str) -> None: raise NotImplementedError() + @abc.abstractmethod + def add_connected_account( + self, *, connected_account_id: str, space_id: str + ) -> None: + raise NotImplementedError() + @abc.abstractmethod def add_devices(self, *, device_ids: List[str], space_id: str) -> None: raise NotImplementedError() @@ -2880,6 +2888,12 @@ def remove_acs_entrances( ) -> None: raise NotImplementedError() + @abc.abstractmethod + def remove_connected_account( + self, *, connected_account_id: str, space_id: str + ) -> None: + raise NotImplementedError() + @abc.abstractmethod def remove_devices(self, *, device_ids: List[str], space_id: str) -> None: raise NotImplementedError() @@ -3256,6 +3270,7 @@ def list( limit: Optional[int] = None, page_cursor: Optional[str] = None, search: Optional[str] = None, + space_id: Optional[str] = None, user_identifier_key: Optional[str] = None ) -> List[ConnectedAccount]: raise NotImplementedError() diff --git a/seam/routes/spaces.py b/seam/routes/spaces.py index b4bb69f..e4260fc 100644 --- a/seam/routes/spaces.py +++ b/seam/routes/spaces.py @@ -20,6 +20,20 @@ def add_acs_entrances(self, *, acs_entrance_ids: List[str], space_id: str) -> No return None + def add_connected_account( + self, *, connected_account_id: str, space_id: str + ) -> None: + json_payload = {} + + if connected_account_id is not None: + json_payload["connected_account_id"] = connected_account_id + if space_id is not None: + json_payload["space_id"] = space_id + + self.client.post("/spaces/add_connected_account", json=json_payload) + + return None + def add_devices(self, *, device_ids: List[str], space_id: str) -> None: json_payload = {} @@ -148,6 +162,20 @@ def remove_acs_entrances( return None + def remove_connected_account( + self, *, connected_account_id: str, space_id: str + ) -> None: + json_payload = {} + + if connected_account_id is not None: + json_payload["connected_account_id"] = connected_account_id + if space_id is not None: + json_payload["space_id"] = space_id + + self.client.post("/spaces/remove_connected_account", json=json_payload) + + return None + def remove_devices(self, *, device_ids: List[str], space_id: str) -> None: json_payload = {}