Skip to content

Commit

Permalink
Update generator to add missing wait_for_action_attempt to abstract m…
Browse files Browse the repository at this point in the history
…ethods
  • Loading branch information
andrii-balitskyi committed Apr 3, 2024
1 parent 5232d95 commit 8e6682f
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 9 deletions.
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"format": "poetry run black ."
},
"devDependencies": {
"@seamapi/nextlove-sdk-generator": "^1.7.6",
"@seamapi/nextlove-sdk-generator": "^1.7.7",
"@seamapi/types": "^1.149.0",
"prettier": "^3.2.5"
}
Expand Down
33 changes: 29 additions & 4 deletions seam/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,12 @@ def __init__(
class AbstractActionAttempts(abc.ABC):

@abc.abstractmethod
def get(self, *, action_attempt_id: str) -> ActionAttempt:
def get(
self,
*,
action_attempt_id: str,
wait_for_action_attempt: Union[bool, Dict[str, float]] = False,
) -> ActionAttempt:
raise NotImplementedError()

@abc.abstractmethod
Expand All @@ -661,6 +666,7 @@ def poll_until_ready(
action_attempt_id: str,
timeout: Optional[float] = 5.0,
polling_interval: Optional[float] = 0.5,
wait_for_action_attempt: Union[bool, Dict[str, float]] = False,
) -> ActionAttempt:
raise NotImplementedError()

Expand Down Expand Up @@ -857,13 +863,21 @@ def list(

@abc.abstractmethod
def lock_door(
self, *, device_id: str, sync: Optional[bool] = None
self,
*,
device_id: str,
sync: Optional[bool] = None,
wait_for_action_attempt: Union[bool, Dict[str, float]] = False,
) -> ActionAttempt:
raise NotImplementedError()

@abc.abstractmethod
def unlock_door(
self, *, device_id: str, sync: Optional[bool] = None
self,
*,
device_id: str,
sync: Optional[bool] = None,
wait_for_action_attempt: Union[bool, Dict[str, float]] = False,
) -> ActionAttempt:
raise NotImplementedError()

Expand Down Expand Up @@ -1462,6 +1476,7 @@ def cool(
cooling_set_point_celsius: Optional[float] = None,
cooling_set_point_fahrenheit: Optional[float] = None,
sync: Optional[bool] = None,
wait_for_action_attempt: Union[bool, Dict[str, float]] = False,
) -> ActionAttempt:
raise NotImplementedError()

Expand All @@ -1479,6 +1494,7 @@ def heat(
heating_set_point_celsius: Optional[float] = None,
heating_set_point_fahrenheit: Optional[float] = None,
sync: Optional[bool] = None,
wait_for_action_attempt: Union[bool, Dict[str, float]] = False,
) -> ActionAttempt:
raise NotImplementedError()

Expand All @@ -1492,6 +1508,7 @@ def heat_cool(
cooling_set_point_celsius: Optional[float] = None,
cooling_set_point_fahrenheit: Optional[float] = None,
sync: Optional[bool] = None,
wait_for_action_attempt: Union[bool, Dict[str, float]] = False,
) -> ActionAttempt:
raise NotImplementedError()

Expand All @@ -1516,7 +1533,13 @@ def list(
raise NotImplementedError()

@abc.abstractmethod
def off(self, *, device_id: str, sync: Optional[bool] = None) -> ActionAttempt:
def off(
self,
*,
device_id: str,
sync: Optional[bool] = None,
wait_for_action_attempt: Union[bool, Dict[str, float]] = False,
) -> ActionAttempt:
raise NotImplementedError()

@abc.abstractmethod
Expand All @@ -1527,6 +1550,7 @@ def set_fan_mode(
fan_mode: Optional[str] = None,
fan_mode_setting: Optional[str] = None,
sync: Optional[bool] = None,
wait_for_action_attempt: Union[bool, Dict[str, float]] = False,
) -> ActionAttempt:
raise NotImplementedError()

Expand Down Expand Up @@ -1887,6 +1911,7 @@ class AbstractSeam(AbstractRoutes):
def __init__(
self,
api_key: Optional[str] = None,
*,
workspace_id: Optional[str] = None,
api_url: Optional[str] = None,
):
Expand Down

0 comments on commit 8e6682f

Please sign in to comment.