From 56d76998748aa34287de65bc84dc2fa6f32d1616 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 20 Oct 2026 09:52:52 +0000 Subject: [PATCH 1/2] feat(deps-dev): bump @seamapi/types Bumps the seam group with 1 update: [@seamapi/types](https://github.com/seamapi/types). Updates `@seamapi/types` from 1.1113.0 to 1.1129.0 - [Release notes](https://github.com/seamapi/types/releases) - [Commits](https://github.com/seamapi/types/compare/v1.1113.0...v1.1129.0) --- updated-dependencies: - dependency-name: "@seamapi/types" dependency-version: 1.1129.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: seam ... Signed-off-by: dependabot[bot] --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index ea6c8aa3..21b41e0b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "@seamapi/blueprint": "^1.12.0", "@seamapi/fake-seam-connect": "2.0.6", "@seamapi/smith": "^1.1.0", - "@seamapi/types": "1.1113.0", + "@seamapi/types": "1.1129.0", "change-case": "^5.4.4", "prettier": "^3.2.5" }, @@ -853,9 +853,9 @@ } }, "node_modules/@seamapi/types": { - "version": "1.1113.0", - "resolved": "https://registry.npmjs.org/@seamapi/types/-/types-1.1113.0.tgz", - "integrity": "sha512-lkOl4x/2kPppPp5p2PoT2ohAI3pnKziv1przlDZscNnkVed0sDu7DZa+B4kyJ6YFmrPrbLNsf8i1c0D+Aw8byQ==", + "version": "1.1129.0", + "resolved": "https://registry.npmjs.org/@seamapi/types/-/types-1.1129.0.tgz", + "integrity": "sha512-TlWoYyag1WXGB3CRjI3utqoDcmEvP4bPqCeUc1SXUW1o7bX3k3y+EGr9ZDPKfmMiQkOd6YaC4QgbP7h4hOSn6A==", "dev": true, "license": "MIT", "engines": { diff --git a/package.json b/package.json index d5af60ce..5e388685 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "@seamapi/blueprint": "^1.12.0", "@seamapi/fake-seam-connect": "2.0.6", "@seamapi/smith": "^1.1.0", - "@seamapi/types": "1.1113.0", + "@seamapi/types": "1.1129.0", "change-case": "^5.4.4", "prettier": "^3.2.5" } From 8251bb1cf1da93cbbf518145ac5738bd0c0afa27 Mon Sep 17 00:00:00 2001 From: Seam Bot Date: Tue, 20 Oct 2026 09:53:26 +0000 Subject: [PATCH 2/2] ci: Generate code --- seam/resources/__init__.py | 20 - seam/resources/access_grant.py | 10 +- seam/resources/access_method.py | 33 + seam/resources/action_attempt.py | 1012 ++++----------------- seam/resources/device.py | 153 +--- seam/resources/device_provider.py | 16 - seam/resources/seam_event.py | 1 + seam/resources/unmanaged_access_grant.py | 10 +- seam/resources/unmanaged_access_method.py | 33 + seam/resources/unmanaged_device.py | 16 - seam/routes/customers.py | 8 +- seam/routes/user_identities.py | 16 + 12 files changed, 269 insertions(+), 1059 deletions(-) diff --git a/seam/resources/__init__.py b/seam/resources/__init__.py index dee899c4..be829418 100644 --- a/seam/resources/__init__.py +++ b/seam/resources/__init__.py @@ -56,21 +56,6 @@ ConvertAccessCodeToManagedSuccessActionAttempt, ConvertAccessCodeToManagedPendingActionAttempt, ConvertAccessCodeToManagedErrorActionAttempt, - SetSpeakerVolumeSuccessActionAttempt, - SetSpeakerVolumePendingActionAttempt, - SetSpeakerVolumeErrorActionAttempt, - SetSpeakerMuteSuccessActionAttempt, - SetSpeakerMutePendingActionAttempt, - SetSpeakerMuteErrorActionAttempt, - PauseSpeakerPlaybackSuccessActionAttempt, - PauseSpeakerPlaybackPendingActionAttempt, - PauseSpeakerPlaybackErrorActionAttempt, - ResumeSpeakerPlaybackSuccessActionAttempt, - ResumeSpeakerPlaybackPendingActionAttempt, - ResumeSpeakerPlaybackErrorActionAttempt, - PlaySpeakerChimeSuccessActionAttempt, - PlaySpeakerChimePendingActionAttempt, - PlaySpeakerChimeErrorActionAttempt, SyncAccessCodesSuccessActionAttempt, SyncAccessCodesPendingActionAttempt, SyncAccessCodesErrorActionAttempt, @@ -108,11 +93,6 @@ PushThermostatProgramsActionAttempt, ConfigureAutoLockActionAttempt, ConvertAccessCodeToManagedActionAttempt, - SetSpeakerVolumeActionAttempt, - SetSpeakerMuteActionAttempt, - PauseSpeakerPlaybackActionAttempt, - ResumeSpeakerPlaybackActionAttempt, - PlaySpeakerChimeActionAttempt, SyncAccessCodesActionAttempt, CreateAccessCodeActionAttempt, DeleteAccessCodeActionAttempt, diff --git a/seam/resources/access_grant.py b/seam/resources/access_grant.py index 968c69c5..d0363906 100644 --- a/seam/resources/access_grant.py +++ b/seam/resources/access_grant.py @@ -409,11 +409,13 @@ def from_dict(cls, d: Any): @dataclass class RequestedCodeUnavailableWarning(ResourceMapping): - """Indicates that the requested PIN code was already in use on a device, so a different code was assigned. + """Indicates that the requested PIN code could not be used, so a different code was assigned. For example, the code was already in use on a device, or the access system rejected it because it did not meet its PIN rules. + + :ivar access_method_id: ID of the access method whose requested code was unavailable. Present when an access system, such as Salto KS, assigned a different code. :ivar created_at: Date and time at which Seam created the warning. - :ivar device_id: ID of the device where the requested code was unavailable. + :ivar device_id: ID of the device where the requested code was unavailable. Present when the code was set directly on a device. :ivar message: Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. @@ -424,8 +426,9 @@ class RequestedCodeUnavailableWarning(ResourceMapping): :ivar warning_code: Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. """ + access_method_id: Optional[str] created_at: str - device_id: str + device_id: Optional[str] message: str new_code: str original_code: str @@ -434,6 +437,7 @@ class RequestedCodeUnavailableWarning(ResourceMapping): @classmethod def from_dict(cls, d: Any): return cls( + access_method_id=d.get("access_method_id", None), created_at=d.get("created_at", None), device_id=d.get("device_id", None), message=d.get("message", None), diff --git a/seam/resources/access_method.py b/seam/resources/access_method.py index 47cf56cd..c6feed45 100644 --- a/seam/resources/access_method.py +++ b/seam/resources/access_method.py @@ -458,6 +458,37 @@ def from_dict(cls, d: Any): warning_code=d.get("warning_code", None), ) + @dataclass + class RequestedCodeUnavailableWarning(ResourceMapping): + """Indicates that the access system could not use the PIN code requested for this `access method `_, for example because it did not meet the access system's PIN rules, so the access system assigned a different code. Give the recipient the assigned code. + + :ivar created_at: Date and time at which Seam created the warning. + + :ivar message: Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + + :ivar new_code: The PIN code that was assigned instead. + + :ivar original_code: The originally requested PIN code that could not be used. + + :ivar warning_code: Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + """ + + created_at: str + message: str + new_code: str + original_code: str + warning_code: Literal["requested_code_unavailable"] + + @classmethod + def from_dict(cls, d: Any): + return cls( + created_at=d.get("created_at", None), + message=d.get("message", None), + new_code=d.get("new_code", None), + original_code=d.get("original_code", None), + warning_code=d.get("warning_code", None), + ) + Errors = Union[FailedToIssueError, AccessNotProvisionedError] _ErrorsVariants = { "failed_to_issue": FailedToIssueError, @@ -484,6 +515,7 @@ def from_dict(cls, d: Any): DelayInIssuingWarning, UserIdentityMissingEmailAddressWarning, UserIdentityMissingPhoneNumberWarning, + RequestedCodeUnavailableWarning, ] _WarningsVariants = { "being_deleted": BeingDeletedWarning, @@ -492,6 +524,7 @@ def from_dict(cls, d: Any): "delay_in_issuing": DelayInIssuingWarning, "user_identity_missing_email_address": UserIdentityMissingEmailAddressWarning, "user_identity_missing_phone_number": UserIdentityMissingPhoneNumberWarning, + "requested_code_unavailable": RequestedCodeUnavailableWarning, } access_method_id: str diff --git a/seam/resources/action_attempt.py b/seam/resources/action_attempt.py index 87bd09f1..ae613f97 100644 --- a/seam/resources/action_attempt.py +++ b/seam/resources/action_attempt.py @@ -1898,6 +1898,10 @@ class Warnings(ResourceMapping): :ivar warning_code: Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. :ivar original_access_method_id: ID of the original access method from which this backup access method was split, if applicable. + + :ivar new_code: The PIN code that was assigned instead. + + :ivar original_code: The originally requested PIN code that could not be used. """ created_at: str @@ -1909,8 +1913,11 @@ class Warnings(ResourceMapping): "delay_in_issuing", "user_identity_missing_email_address", "user_identity_missing_phone_number", + "requested_code_unavailable", ] original_access_method_id: Optional[str] + new_code: Optional[str] + original_code: Optional[str] @classmethod def from_dict(cls, d: Any): @@ -1919,6 +1926,8 @@ def from_dict(cls, d: Any): message=d.get("message", None), warning_code=d.get("warning_code", None), original_access_method_id=d.get("original_access_method_id", None), + new_code=d.get("new_code", None), + original_code=d.get("original_code", None), ) access_method_id: str @@ -1953,625 +1962,23 @@ def from_dict(cls, d: Any): display_status=d.get("display_status", None), errors=[cls.Errors.from_dict(i) for i in d.get("errors") or []], instant_key_url=d.get("instant_key_url", None), - is_assignment_required=d.get("is_assignment_required", None), - is_encoding_required=d.get("is_encoding_required", None), - is_issued=d.get("is_issued", None), - is_ready_for_assignment=d.get("is_ready_for_assignment", None), - is_ready_for_encoding=d.get("is_ready_for_encoding", None), - issued_at=d.get("issued_at", None), - mode=d.get("mode", None), - pending_mutations=[ - cls.PendingMutations.from_dict(i) - for i in d.get("pending_mutations") or [] - ], - warnings=[cls.Warnings.from_dict(i) for i in d.get("warnings") or []], - workspace_id=d.get("workspace_id", None), - ) - - action_attempt_id: str - action_type: Literal["ASSIGN_CREDENTIAL"] - error: None - result: Result - status: Literal["success"] - - @classmethod - def from_dict(cls, d: Any): - return cls( - action_attempt_id=d.get("action_attempt_id", None), - action_type=d.get("action_type", None), - error=d.get("error", None), - result=cls.Result.from_dict(d.get("result") or {}), - status=d.get("status", None), - ) - - -@dataclass -class AssignCredentialPendingActionAttempt: - """Assigning a credential to an access method is pending. - - :ivar action_attempt_id: ID of the action attempt. - - :ivar action_type: Action attempt to track the status of assigning a pre-registered card credential to an access method. - - :ivar error: - - :ivar result: Result of assigning a credential. If successful, includes the updated access method with the assigned credential. - - :ivar status:""" - - action_attempt_id: str - action_type: Literal["ASSIGN_CREDENTIAL"] - error: None - result: None - status: Literal["pending"] - - @classmethod - def from_dict(cls, d: Any): - return cls( - action_attempt_id=d.get("action_attempt_id", None), - action_type=d.get("action_type", None), - error=d.get("error", None), - result=d.get("result", None), - status=d.get("status", None), - ) - - -@dataclass -class AssignCredentialErrorActionAttempt: - """Assigning a credential to an access method is pending. - - :ivar action_attempt_id: ID of the action attempt. - - :ivar action_type: Action attempt to track the status of assigning a pre-registered card credential to an access method. - - :ivar error: - - :ivar result: Result of assigning a credential. If successful, includes the updated access method with the assigned credential. - - :ivar status:""" - - @dataclass - class Error(ResourceMapping): - """ - - :ivar message: Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - - :ivar type: Error type to indicate that no matching credential was found.""" - - message: str - type: Literal[ - "uncategorized_error", "action_attempt_expired", "credential_not_found" - ] - - @classmethod - def from_dict(cls, d: Any): - return cls( - message=d.get("message", None), - type=d.get("type", None), - ) - - action_attempt_id: str - action_type: Literal["ASSIGN_CREDENTIAL"] - error: Error - result: None - status: Literal["error"] - - @classmethod - def from_dict(cls, d: Any): - return cls( - action_attempt_id=d.get("action_attempt_id", None), - action_type=d.get("action_type", None), - error=cls.Error.from_dict(d.get("error") or {}), - result=d.get("result", None), - status=d.get("status", None), - ) - - -@dataclass -class ResetSandboxWorkspaceSuccessActionAttempt: - """Resetting a sandbox workspace is pending. - - :ivar action_attempt_id: ID of the action attempt. - - :ivar action_type: Action attempt to track the status of resetting a sandbox workspace. - - :ivar error: Error associated with the action. - - :ivar result: Result of the action. - - :ivar status:""" - - @dataclass - class Result(ResourceMapping): - """Result of the action.""" - - @classmethod - def from_dict(cls, d: Any): - # pylint: disable=unused-argument - return cls() - - action_attempt_id: str - action_type: Literal["RESET_SANDBOX_WORKSPACE"] - error: None - result: Result - status: Literal["success"] - - @classmethod - def from_dict(cls, d: Any): - return cls( - action_attempt_id=d.get("action_attempt_id", None), - action_type=d.get("action_type", None), - error=d.get("error", None), - result=cls.Result.from_dict(d.get("result") or {}), - status=d.get("status", None), - ) - - -@dataclass -class ResetSandboxWorkspacePendingActionAttempt: - """Resetting a sandbox workspace is pending. - - :ivar action_attempt_id: ID of the action attempt. - - :ivar action_type: Action attempt to track the status of resetting a sandbox workspace. - - :ivar error: Error associated with the action. - - :ivar result: Result of the action. - - :ivar status:""" - - action_attempt_id: str - action_type: Literal["RESET_SANDBOX_WORKSPACE"] - error: None - result: None - status: Literal["pending"] - - @classmethod - def from_dict(cls, d: Any): - return cls( - action_attempt_id=d.get("action_attempt_id", None), - action_type=d.get("action_type", None), - error=d.get("error", None), - result=d.get("result", None), - status=d.get("status", None), - ) - - -@dataclass -class ResetSandboxWorkspaceErrorActionAttempt: - """Resetting a sandbox workspace is pending. - - :ivar action_attempt_id: ID of the action attempt. - - :ivar action_type: Action attempt to track the status of resetting a sandbox workspace. - - :ivar error: Error associated with the action. - - :ivar result: Result of the action. - - :ivar status:""" - - @dataclass - class Error(ResourceMapping): - """Error associated with the action. - - :ivar message: Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - - :ivar type: Type of the error.""" - - message: str - type: str - - @classmethod - def from_dict(cls, d: Any): - return cls( - message=d.get("message", None), - type=d.get("type", None), - ) - - action_attempt_id: str - action_type: Literal["RESET_SANDBOX_WORKSPACE"] - error: Error - result: None - status: Literal["error"] - - @classmethod - def from_dict(cls, d: Any): - return cls( - action_attempt_id=d.get("action_attempt_id", None), - action_type=d.get("action_type", None), - error=cls.Error.from_dict(d.get("error") or {}), - result=d.get("result", None), - status=d.get("status", None), - ) - - -@dataclass -class SetFanModeSuccessActionAttempt: - """Setting the fan mode is pending. - - :ivar action_attempt_id: ID of the action attempt. - - :ivar action_type: Action attempt to track the status of setting the fan mode on a thermostat. - - :ivar error: Error associated with the action. - - :ivar result: Result of the action. - - :ivar status:""" - - @dataclass - class Result(ResourceMapping): - """Result of the action.""" - - @classmethod - def from_dict(cls, d: Any): - # pylint: disable=unused-argument - return cls() - - action_attempt_id: str - action_type: Literal["SET_FAN_MODE"] - error: None - result: Result - status: Literal["success"] - - @classmethod - def from_dict(cls, d: Any): - return cls( - action_attempt_id=d.get("action_attempt_id", None), - action_type=d.get("action_type", None), - error=d.get("error", None), - result=cls.Result.from_dict(d.get("result") or {}), - status=d.get("status", None), - ) - - -@dataclass -class SetFanModePendingActionAttempt: - """Setting the fan mode is pending. - - :ivar action_attempt_id: ID of the action attempt. - - :ivar action_type: Action attempt to track the status of setting the fan mode on a thermostat. - - :ivar error: Error associated with the action. - - :ivar result: Result of the action. - - :ivar status:""" - - action_attempt_id: str - action_type: Literal["SET_FAN_MODE"] - error: None - result: None - status: Literal["pending"] - - @classmethod - def from_dict(cls, d: Any): - return cls( - action_attempt_id=d.get("action_attempt_id", None), - action_type=d.get("action_type", None), - error=d.get("error", None), - result=d.get("result", None), - status=d.get("status", None), - ) - - -@dataclass -class SetFanModeErrorActionAttempt: - """Setting the fan mode is pending. - - :ivar action_attempt_id: ID of the action attempt. - - :ivar action_type: Action attempt to track the status of setting the fan mode on a thermostat. - - :ivar error: Error associated with the action. - - :ivar result: Result of the action. - - :ivar status:""" - - @dataclass - class Error(ResourceMapping): - """Error associated with the action. - - :ivar message: Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - - :ivar type: Type of the error.""" - - message: str - type: str - - @classmethod - def from_dict(cls, d: Any): - return cls( - message=d.get("message", None), - type=d.get("type", None), - ) - - action_attempt_id: str - action_type: Literal["SET_FAN_MODE"] - error: Error - result: None - status: Literal["error"] - - @classmethod - def from_dict(cls, d: Any): - return cls( - action_attempt_id=d.get("action_attempt_id", None), - action_type=d.get("action_type", None), - error=cls.Error.from_dict(d.get("error") or {}), - result=d.get("result", None), - status=d.get("status", None), - ) - - -@dataclass -class SetHvacModeSuccessActionAttempt: - """Setting the HVAC mode is pending. - - :ivar action_attempt_id: ID of the action attempt. - - :ivar action_type: Action attempt to track the status of setting the HVAC mode on a thermostat. - - :ivar error: Error associated with the action. - - :ivar result: Result of the action. - - :ivar status:""" - - @dataclass - class Result(ResourceMapping): - """Result of the action.""" - - @classmethod - def from_dict(cls, d: Any): - # pylint: disable=unused-argument - return cls() - - action_attempt_id: str - action_type: Literal["SET_HVAC_MODE"] - error: None - result: Result - status: Literal["success"] - - @classmethod - def from_dict(cls, d: Any): - return cls( - action_attempt_id=d.get("action_attempt_id", None), - action_type=d.get("action_type", None), - error=d.get("error", None), - result=cls.Result.from_dict(d.get("result") or {}), - status=d.get("status", None), - ) - - -@dataclass -class SetHvacModePendingActionAttempt: - """Setting the HVAC mode is pending. - - :ivar action_attempt_id: ID of the action attempt. - - :ivar action_type: Action attempt to track the status of setting the HVAC mode on a thermostat. - - :ivar error: Error associated with the action. - - :ivar result: Result of the action. - - :ivar status:""" - - action_attempt_id: str - action_type: Literal["SET_HVAC_MODE"] - error: None - result: None - status: Literal["pending"] - - @classmethod - def from_dict(cls, d: Any): - return cls( - action_attempt_id=d.get("action_attempt_id", None), - action_type=d.get("action_type", None), - error=d.get("error", None), - result=d.get("result", None), - status=d.get("status", None), - ) - - -@dataclass -class SetHvacModeErrorActionAttempt: - """Setting the HVAC mode is pending. - - :ivar action_attempt_id: ID of the action attempt. - - :ivar action_type: Action attempt to track the status of setting the HVAC mode on a thermostat. - - :ivar error: Error associated with the action. - - :ivar result: Result of the action. - - :ivar status:""" - - @dataclass - class Error(ResourceMapping): - """Error associated with the action. - - :ivar message: Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - - :ivar type: Type of the error.""" - - message: str - type: str - - @classmethod - def from_dict(cls, d: Any): - return cls( - message=d.get("message", None), - type=d.get("type", None), - ) - - action_attempt_id: str - action_type: Literal["SET_HVAC_MODE"] - error: Error - result: None - status: Literal["error"] - - @classmethod - def from_dict(cls, d: Any): - return cls( - action_attempt_id=d.get("action_attempt_id", None), - action_type=d.get("action_type", None), - error=cls.Error.from_dict(d.get("error") or {}), - result=d.get("result", None), - status=d.get("status", None), - ) - - -@dataclass -class ActivateClimatePresetSuccessActionAttempt: - """Activating a climate preset is pending. - - :ivar action_attempt_id: ID of the action attempt. - - :ivar action_type: Action attempt to track the status of a climate preset activation. - - :ivar error: Error associated with the action. - - :ivar result: Result of the action. - - :ivar status:""" - - @dataclass - class Result(ResourceMapping): - """Result of the action.""" - - @classmethod - def from_dict(cls, d: Any): - # pylint: disable=unused-argument - return cls() - - action_attempt_id: str - action_type: Literal["ACTIVATE_CLIMATE_PRESET"] - error: None - result: Result - status: Literal["success"] - - @classmethod - def from_dict(cls, d: Any): - return cls( - action_attempt_id=d.get("action_attempt_id", None), - action_type=d.get("action_type", None), - error=d.get("error", None), - result=cls.Result.from_dict(d.get("result") or {}), - status=d.get("status", None), - ) - - -@dataclass -class ActivateClimatePresetPendingActionAttempt: - """Activating a climate preset is pending. - - :ivar action_attempt_id: ID of the action attempt. - - :ivar action_type: Action attempt to track the status of a climate preset activation. - - :ivar error: Error associated with the action. - - :ivar result: Result of the action. - - :ivar status:""" - - action_attempt_id: str - action_type: Literal["ACTIVATE_CLIMATE_PRESET"] - error: None - result: None - status: Literal["pending"] - - @classmethod - def from_dict(cls, d: Any): - return cls( - action_attempt_id=d.get("action_attempt_id", None), - action_type=d.get("action_type", None), - error=d.get("error", None), - result=d.get("result", None), - status=d.get("status", None), - ) - - -@dataclass -class ActivateClimatePresetErrorActionAttempt: - """Activating a climate preset is pending. - - :ivar action_attempt_id: ID of the action attempt. - - :ivar action_type: Action attempt to track the status of a climate preset activation. - - :ivar error: Error associated with the action. - - :ivar result: Result of the action. - - :ivar status:""" - - @dataclass - class Error(ResourceMapping): - """Error associated with the action. - - :ivar message: Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - - :ivar type: Type of the error.""" - - message: str - type: str - - @classmethod - def from_dict(cls, d: Any): - return cls( - message=d.get("message", None), - type=d.get("type", None), - ) - - action_attempt_id: str - action_type: Literal["ACTIVATE_CLIMATE_PRESET"] - error: Error - result: None - status: Literal["error"] - - @classmethod - def from_dict(cls, d: Any): - return cls( - action_attempt_id=d.get("action_attempt_id", None), - action_type=d.get("action_type", None), - error=cls.Error.from_dict(d.get("error") or {}), - result=d.get("result", None), - status=d.get("status", None), - ) - - -@dataclass -class ActivateWeeklyProgramSuccessActionAttempt: - """Activating the weekly program is pending. - - :ivar action_attempt_id: ID of the action attempt. - - :ivar action_type: Action attempt to track the status of returning a thermostat to its weekly program. - - :ivar error: Error associated with the action. - - :ivar result: Result of the action. - - :ivar status:""" - - @dataclass - class Result(ResourceMapping): - """Result of the action.""" - - @classmethod - def from_dict(cls, d: Any): - # pylint: disable=unused-argument - return cls() + is_assignment_required=d.get("is_assignment_required", None), + is_encoding_required=d.get("is_encoding_required", None), + is_issued=d.get("is_issued", None), + is_ready_for_assignment=d.get("is_ready_for_assignment", None), + is_ready_for_encoding=d.get("is_ready_for_encoding", None), + issued_at=d.get("issued_at", None), + mode=d.get("mode", None), + pending_mutations=[ + cls.PendingMutations.from_dict(i) + for i in d.get("pending_mutations") or [] + ], + warnings=[cls.Warnings.from_dict(i) for i in d.get("warnings") or []], + workspace_id=d.get("workspace_id", None), + ) action_attempt_id: str - action_type: Literal["ACTIVATE_WEEKLY_PROGRAM"] + action_type: Literal["ASSIGN_CREDENTIAL"] error: None result: Result status: Literal["success"] @@ -2588,21 +1995,21 @@ def from_dict(cls, d: Any): @dataclass -class ActivateWeeklyProgramPendingActionAttempt: - """Activating the weekly program is pending. +class AssignCredentialPendingActionAttempt: + """Assigning a credential to an access method is pending. :ivar action_attempt_id: ID of the action attempt. - :ivar action_type: Action attempt to track the status of returning a thermostat to its weekly program. + :ivar action_type: Action attempt to track the status of assigning a pre-registered card credential to an access method. - :ivar error: Error associated with the action. + :ivar error: - :ivar result: Result of the action. + :ivar result: Result of assigning a credential. If successful, includes the updated access method with the assigned credential. :ivar status:""" action_attempt_id: str - action_type: Literal["ACTIVATE_WEEKLY_PROGRAM"] + action_type: Literal["ASSIGN_CREDENTIAL"] error: None result: None status: Literal["pending"] @@ -2619,29 +2026,31 @@ def from_dict(cls, d: Any): @dataclass -class ActivateWeeklyProgramErrorActionAttempt: - """Activating the weekly program is pending. +class AssignCredentialErrorActionAttempt: + """Assigning a credential to an access method is pending. :ivar action_attempt_id: ID of the action attempt. - :ivar action_type: Action attempt to track the status of returning a thermostat to its weekly program. + :ivar action_type: Action attempt to track the status of assigning a pre-registered card credential to an access method. - :ivar error: Error associated with the action. + :ivar error: - :ivar result: Result of the action. + :ivar result: Result of assigning a credential. If successful, includes the updated access method with the assigned credential. :ivar status:""" @dataclass class Error(ResourceMapping): - """Error associated with the action. + """ :ivar message: Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - :ivar type: Type of the error.""" + :ivar type: Error type to indicate that no matching credential was found.""" message: str - type: str + type: Literal[ + "uncategorized_error", "action_attempt_expired", "credential_not_found" + ] @classmethod def from_dict(cls, d: Any): @@ -2651,7 +2060,7 @@ def from_dict(cls, d: Any): ) action_attempt_id: str - action_type: Literal["ACTIVATE_WEEKLY_PROGRAM"] + action_type: Literal["ASSIGN_CREDENTIAL"] error: Error result: None status: Literal["error"] @@ -2668,12 +2077,12 @@ def from_dict(cls, d: Any): @dataclass -class SimulateKeypadCodeEntrySuccessActionAttempt: - """Simulating a keypad code entry is pending. +class ResetSandboxWorkspaceSuccessActionAttempt: + """Resetting a sandbox workspace is pending. :ivar action_attempt_id: ID of the action attempt. - :ivar action_type: Action attempt to track the status of simulating a keypad code entry. + :ivar action_type: Action attempt to track the status of resetting a sandbox workspace. :ivar error: Error associated with the action. @@ -2691,7 +2100,7 @@ def from_dict(cls, d: Any): return cls() action_attempt_id: str - action_type: Literal["SIMULATE_KEYPAD_CODE_ENTRY"] + action_type: Literal["RESET_SANDBOX_WORKSPACE"] error: None result: Result status: Literal["success"] @@ -2708,12 +2117,12 @@ def from_dict(cls, d: Any): @dataclass -class SimulateKeypadCodeEntryPendingActionAttempt: - """Simulating a keypad code entry is pending. +class ResetSandboxWorkspacePendingActionAttempt: + """Resetting a sandbox workspace is pending. :ivar action_attempt_id: ID of the action attempt. - :ivar action_type: Action attempt to track the status of simulating a keypad code entry. + :ivar action_type: Action attempt to track the status of resetting a sandbox workspace. :ivar error: Error associated with the action. @@ -2722,7 +2131,7 @@ class SimulateKeypadCodeEntryPendingActionAttempt: :ivar status:""" action_attempt_id: str - action_type: Literal["SIMULATE_KEYPAD_CODE_ENTRY"] + action_type: Literal["RESET_SANDBOX_WORKSPACE"] error: None result: None status: Literal["pending"] @@ -2739,12 +2148,12 @@ def from_dict(cls, d: Any): @dataclass -class SimulateKeypadCodeEntryErrorActionAttempt: - """Simulating a keypad code entry is pending. +class ResetSandboxWorkspaceErrorActionAttempt: + """Resetting a sandbox workspace is pending. :ivar action_attempt_id: ID of the action attempt. - :ivar action_type: Action attempt to track the status of simulating a keypad code entry. + :ivar action_type: Action attempt to track the status of resetting a sandbox workspace. :ivar error: Error associated with the action. @@ -2771,7 +2180,7 @@ def from_dict(cls, d: Any): ) action_attempt_id: str - action_type: Literal["SIMULATE_KEYPAD_CODE_ENTRY"] + action_type: Literal["RESET_SANDBOX_WORKSPACE"] error: Error result: None status: Literal["error"] @@ -2788,12 +2197,12 @@ def from_dict(cls, d: Any): @dataclass -class SimulateManualLockViaKeypadSuccessActionAttempt: - """Simulating a manual lock action using a keypad is pending. +class SetFanModeSuccessActionAttempt: + """Setting the fan mode is pending. :ivar action_attempt_id: ID of the action attempt. - :ivar action_type: Action attempt to track the status of simulating a manual lock action using a keypad. + :ivar action_type: Action attempt to track the status of setting the fan mode on a thermostat. :ivar error: Error associated with the action. @@ -2811,7 +2220,7 @@ def from_dict(cls, d: Any): return cls() action_attempt_id: str - action_type: Literal["SIMULATE_MANUAL_LOCK_VIA_KEYPAD"] + action_type: Literal["SET_FAN_MODE"] error: None result: Result status: Literal["success"] @@ -2828,12 +2237,12 @@ def from_dict(cls, d: Any): @dataclass -class SimulateManualLockViaKeypadPendingActionAttempt: - """Simulating a manual lock action using a keypad is pending. +class SetFanModePendingActionAttempt: + """Setting the fan mode is pending. :ivar action_attempt_id: ID of the action attempt. - :ivar action_type: Action attempt to track the status of simulating a manual lock action using a keypad. + :ivar action_type: Action attempt to track the status of setting the fan mode on a thermostat. :ivar error: Error associated with the action. @@ -2842,7 +2251,7 @@ class SimulateManualLockViaKeypadPendingActionAttempt: :ivar status:""" action_attempt_id: str - action_type: Literal["SIMULATE_MANUAL_LOCK_VIA_KEYPAD"] + action_type: Literal["SET_FAN_MODE"] error: None result: None status: Literal["pending"] @@ -2859,12 +2268,12 @@ def from_dict(cls, d: Any): @dataclass -class SimulateManualLockViaKeypadErrorActionAttempt: - """Simulating a manual lock action using a keypad is pending. +class SetFanModeErrorActionAttempt: + """Setting the fan mode is pending. :ivar action_attempt_id: ID of the action attempt. - :ivar action_type: Action attempt to track the status of simulating a manual lock action using a keypad. + :ivar action_type: Action attempt to track the status of setting the fan mode on a thermostat. :ivar error: Error associated with the action. @@ -2891,7 +2300,7 @@ def from_dict(cls, d: Any): ) action_attempt_id: str - action_type: Literal["SIMULATE_MANUAL_LOCK_VIA_KEYPAD"] + action_type: Literal["SET_FAN_MODE"] error: Error result: None status: Literal["error"] @@ -2908,12 +2317,12 @@ def from_dict(cls, d: Any): @dataclass -class PushThermostatProgramsSuccessActionAttempt: - """Pushing thermostat weekly programs is pending. +class SetHvacModeSuccessActionAttempt: + """Setting the HVAC mode is pending. :ivar action_attempt_id: ID of the action attempt. - :ivar action_type: Action attempt to track the status of pushing thermostat programs. + :ivar action_type: Action attempt to track the status of setting the HVAC mode on a thermostat. :ivar error: Error associated with the action. @@ -2931,7 +2340,7 @@ def from_dict(cls, d: Any): return cls() action_attempt_id: str - action_type: Literal["PUSH_THERMOSTAT_PROGRAMS"] + action_type: Literal["SET_HVAC_MODE"] error: None result: Result status: Literal["success"] @@ -2948,12 +2357,12 @@ def from_dict(cls, d: Any): @dataclass -class PushThermostatProgramsPendingActionAttempt: - """Pushing thermostat weekly programs is pending. +class SetHvacModePendingActionAttempt: + """Setting the HVAC mode is pending. :ivar action_attempt_id: ID of the action attempt. - :ivar action_type: Action attempt to track the status of pushing thermostat programs. + :ivar action_type: Action attempt to track the status of setting the HVAC mode on a thermostat. :ivar error: Error associated with the action. @@ -2962,7 +2371,7 @@ class PushThermostatProgramsPendingActionAttempt: :ivar status:""" action_attempt_id: str - action_type: Literal["PUSH_THERMOSTAT_PROGRAMS"] + action_type: Literal["SET_HVAC_MODE"] error: None result: None status: Literal["pending"] @@ -2979,12 +2388,12 @@ def from_dict(cls, d: Any): @dataclass -class PushThermostatProgramsErrorActionAttempt: - """Pushing thermostat weekly programs is pending. +class SetHvacModeErrorActionAttempt: + """Setting the HVAC mode is pending. :ivar action_attempt_id: ID of the action attempt. - :ivar action_type: Action attempt to track the status of pushing thermostat programs. + :ivar action_type: Action attempt to track the status of setting the HVAC mode on a thermostat. :ivar error: Error associated with the action. @@ -3011,7 +2420,7 @@ def from_dict(cls, d: Any): ) action_attempt_id: str - action_type: Literal["PUSH_THERMOSTAT_PROGRAMS"] + action_type: Literal["SET_HVAC_MODE"] error: Error result: None status: Literal["error"] @@ -3028,12 +2437,12 @@ def from_dict(cls, d: Any): @dataclass -class ConfigureAutoLockSuccessActionAttempt: - """Configuring the auto-lock is pending. +class ActivateClimatePresetSuccessActionAttempt: + """Activating a climate preset is pending. :ivar action_attempt_id: ID of the action attempt. - :ivar action_type: Action attempt to track the status of configuring the auto-lock on a lock. + :ivar action_type: Action attempt to track the status of a climate preset activation. :ivar error: Error associated with the action. @@ -3051,7 +2460,7 @@ def from_dict(cls, d: Any): return cls() action_attempt_id: str - action_type: Literal["CONFIGURE_AUTO_LOCK"] + action_type: Literal["ACTIVATE_CLIMATE_PRESET"] error: None result: Result status: Literal["success"] @@ -3068,12 +2477,12 @@ def from_dict(cls, d: Any): @dataclass -class ConfigureAutoLockPendingActionAttempt: - """Configuring the auto-lock is pending. +class ActivateClimatePresetPendingActionAttempt: + """Activating a climate preset is pending. :ivar action_attempt_id: ID of the action attempt. - :ivar action_type: Action attempt to track the status of configuring the auto-lock on a lock. + :ivar action_type: Action attempt to track the status of a climate preset activation. :ivar error: Error associated with the action. @@ -3082,7 +2491,7 @@ class ConfigureAutoLockPendingActionAttempt: :ivar status:""" action_attempt_id: str - action_type: Literal["CONFIGURE_AUTO_LOCK"] + action_type: Literal["ACTIVATE_CLIMATE_PRESET"] error: None result: None status: Literal["pending"] @@ -3099,12 +2508,12 @@ def from_dict(cls, d: Any): @dataclass -class ConfigureAutoLockErrorActionAttempt: - """Configuring the auto-lock is pending. +class ActivateClimatePresetErrorActionAttempt: + """Activating a climate preset is pending. :ivar action_attempt_id: ID of the action attempt. - :ivar action_type: Action attempt to track the status of configuring the auto-lock on a lock. + :ivar action_type: Action attempt to track the status of a climate preset activation. :ivar error: Error associated with the action. @@ -3131,7 +2540,7 @@ def from_dict(cls, d: Any): ) action_attempt_id: str - action_type: Literal["CONFIGURE_AUTO_LOCK"] + action_type: Literal["ACTIVATE_CLIMATE_PRESET"] error: Error result: None status: Literal["error"] @@ -3148,12 +2557,12 @@ def from_dict(cls, d: Any): @dataclass -class ConvertAccessCodeToManagedSuccessActionAttempt: - """Converting an unmanaged access code to managed is pending. +class ActivateWeeklyProgramSuccessActionAttempt: + """Activating the weekly program is pending. :ivar action_attempt_id: ID of the action attempt. - :ivar action_type: Action attempt to track the status of converting an unmanaged access code to a managed access code. + :ivar action_type: Action attempt to track the status of returning a thermostat to its weekly program. :ivar error: Error associated with the action. @@ -3171,7 +2580,7 @@ def from_dict(cls, d: Any): return cls() action_attempt_id: str - action_type: Literal["CONVERT_ACCESS_CODE_TO_MANAGED"] + action_type: Literal["ACTIVATE_WEEKLY_PROGRAM"] error: None result: Result status: Literal["success"] @@ -3188,12 +2597,12 @@ def from_dict(cls, d: Any): @dataclass -class ConvertAccessCodeToManagedPendingActionAttempt: - """Converting an unmanaged access code to managed is pending. +class ActivateWeeklyProgramPendingActionAttempt: + """Activating the weekly program is pending. :ivar action_attempt_id: ID of the action attempt. - :ivar action_type: Action attempt to track the status of converting an unmanaged access code to a managed access code. + :ivar action_type: Action attempt to track the status of returning a thermostat to its weekly program. :ivar error: Error associated with the action. @@ -3202,7 +2611,7 @@ class ConvertAccessCodeToManagedPendingActionAttempt: :ivar status:""" action_attempt_id: str - action_type: Literal["CONVERT_ACCESS_CODE_TO_MANAGED"] + action_type: Literal["ACTIVATE_WEEKLY_PROGRAM"] error: None result: None status: Literal["pending"] @@ -3219,12 +2628,12 @@ def from_dict(cls, d: Any): @dataclass -class ConvertAccessCodeToManagedErrorActionAttempt: - """Converting an unmanaged access code to managed is pending. +class ActivateWeeklyProgramErrorActionAttempt: + """Activating the weekly program is pending. :ivar action_attempt_id: ID of the action attempt. - :ivar action_type: Action attempt to track the status of converting an unmanaged access code to a managed access code. + :ivar action_type: Action attempt to track the status of returning a thermostat to its weekly program. :ivar error: Error associated with the action. @@ -3251,7 +2660,7 @@ def from_dict(cls, d: Any): ) action_attempt_id: str - action_type: Literal["CONVERT_ACCESS_CODE_TO_MANAGED"] + action_type: Literal["ACTIVATE_WEEKLY_PROGRAM"] error: Error result: None status: Literal["error"] @@ -3268,12 +2677,12 @@ def from_dict(cls, d: Any): @dataclass -class SetSpeakerVolumeSuccessActionAttempt: - """Setting the speaker volume is pending. +class SimulateKeypadCodeEntrySuccessActionAttempt: + """Simulating a keypad code entry is pending. :ivar action_attempt_id: ID of the action attempt. - :ivar action_type: Action attempt to track the status of setting the volume on a speaker. + :ivar action_type: Action attempt to track the status of simulating a keypad code entry. :ivar error: Error associated with the action. @@ -3291,7 +2700,7 @@ def from_dict(cls, d: Any): return cls() action_attempt_id: str - action_type: Literal["SET_SPEAKER_VOLUME"] + action_type: Literal["SIMULATE_KEYPAD_CODE_ENTRY"] error: None result: Result status: Literal["success"] @@ -3308,12 +2717,12 @@ def from_dict(cls, d: Any): @dataclass -class SetSpeakerVolumePendingActionAttempt: - """Setting the speaker volume is pending. +class SimulateKeypadCodeEntryPendingActionAttempt: + """Simulating a keypad code entry is pending. :ivar action_attempt_id: ID of the action attempt. - :ivar action_type: Action attempt to track the status of setting the volume on a speaker. + :ivar action_type: Action attempt to track the status of simulating a keypad code entry. :ivar error: Error associated with the action. @@ -3322,7 +2731,7 @@ class SetSpeakerVolumePendingActionAttempt: :ivar status:""" action_attempt_id: str - action_type: Literal["SET_SPEAKER_VOLUME"] + action_type: Literal["SIMULATE_KEYPAD_CODE_ENTRY"] error: None result: None status: Literal["pending"] @@ -3339,12 +2748,12 @@ def from_dict(cls, d: Any): @dataclass -class SetSpeakerVolumeErrorActionAttempt: - """Setting the speaker volume is pending. +class SimulateKeypadCodeEntryErrorActionAttempt: + """Simulating a keypad code entry is pending. :ivar action_attempt_id: ID of the action attempt. - :ivar action_type: Action attempt to track the status of setting the volume on a speaker. + :ivar action_type: Action attempt to track the status of simulating a keypad code entry. :ivar error: Error associated with the action. @@ -3371,7 +2780,7 @@ def from_dict(cls, d: Any): ) action_attempt_id: str - action_type: Literal["SET_SPEAKER_VOLUME"] + action_type: Literal["SIMULATE_KEYPAD_CODE_ENTRY"] error: Error result: None status: Literal["error"] @@ -3388,12 +2797,12 @@ def from_dict(cls, d: Any): @dataclass -class SetSpeakerMuteSuccessActionAttempt: - """Muting or unmuting the speaker is pending. +class SimulateManualLockViaKeypadSuccessActionAttempt: + """Simulating a manual lock action using a keypad is pending. :ivar action_attempt_id: ID of the action attempt. - :ivar action_type: Action attempt to track the status of muting or unmuting a speaker. + :ivar action_type: Action attempt to track the status of simulating a manual lock action using a keypad. :ivar error: Error associated with the action. @@ -3411,7 +2820,7 @@ def from_dict(cls, d: Any): return cls() action_attempt_id: str - action_type: Literal["SET_SPEAKER_MUTE"] + action_type: Literal["SIMULATE_MANUAL_LOCK_VIA_KEYPAD"] error: None result: Result status: Literal["success"] @@ -3428,12 +2837,12 @@ def from_dict(cls, d: Any): @dataclass -class SetSpeakerMutePendingActionAttempt: - """Muting or unmuting the speaker is pending. +class SimulateManualLockViaKeypadPendingActionAttempt: + """Simulating a manual lock action using a keypad is pending. :ivar action_attempt_id: ID of the action attempt. - :ivar action_type: Action attempt to track the status of muting or unmuting a speaker. + :ivar action_type: Action attempt to track the status of simulating a manual lock action using a keypad. :ivar error: Error associated with the action. @@ -3442,7 +2851,7 @@ class SetSpeakerMutePendingActionAttempt: :ivar status:""" action_attempt_id: str - action_type: Literal["SET_SPEAKER_MUTE"] + action_type: Literal["SIMULATE_MANUAL_LOCK_VIA_KEYPAD"] error: None result: None status: Literal["pending"] @@ -3459,12 +2868,12 @@ def from_dict(cls, d: Any): @dataclass -class SetSpeakerMuteErrorActionAttempt: - """Muting or unmuting the speaker is pending. +class SimulateManualLockViaKeypadErrorActionAttempt: + """Simulating a manual lock action using a keypad is pending. :ivar action_attempt_id: ID of the action attempt. - :ivar action_type: Action attempt to track the status of muting or unmuting a speaker. + :ivar action_type: Action attempt to track the status of simulating a manual lock action using a keypad. :ivar error: Error associated with the action. @@ -3491,7 +2900,7 @@ def from_dict(cls, d: Any): ) action_attempt_id: str - action_type: Literal["SET_SPEAKER_MUTE"] + action_type: Literal["SIMULATE_MANUAL_LOCK_VIA_KEYPAD"] error: Error result: None status: Literal["error"] @@ -3508,12 +2917,12 @@ def from_dict(cls, d: Any): @dataclass -class PauseSpeakerPlaybackSuccessActionAttempt: - """Pausing playback on the speaker is pending. +class PushThermostatProgramsSuccessActionAttempt: + """Pushing thermostat weekly programs is pending. :ivar action_attempt_id: ID of the action attempt. - :ivar action_type: Action attempt to track the status of pausing playback on a speaker. + :ivar action_type: Action attempt to track the status of pushing thermostat programs. :ivar error: Error associated with the action. @@ -3523,21 +2932,15 @@ class PauseSpeakerPlaybackSuccessActionAttempt: @dataclass class Result(ResourceMapping): - """Result of the action. - - :ivar affected_device_ids: IDs of the speakers whose playback was paused, including speakers grouped with the requested speaker. - """ - - affected_device_ids: List[str] + """Result of the action.""" @classmethod def from_dict(cls, d: Any): - return cls( - affected_device_ids=d.get("affected_device_ids", None), - ) + # pylint: disable=unused-argument + return cls() action_attempt_id: str - action_type: Literal["PAUSE_SPEAKER_PLAYBACK"] + action_type: Literal["PUSH_THERMOSTAT_PROGRAMS"] error: None result: Result status: Literal["success"] @@ -3554,12 +2957,12 @@ def from_dict(cls, d: Any): @dataclass -class PauseSpeakerPlaybackPendingActionAttempt: - """Pausing playback on the speaker is pending. +class PushThermostatProgramsPendingActionAttempt: + """Pushing thermostat weekly programs is pending. :ivar action_attempt_id: ID of the action attempt. - :ivar action_type: Action attempt to track the status of pausing playback on a speaker. + :ivar action_type: Action attempt to track the status of pushing thermostat programs. :ivar error: Error associated with the action. @@ -3568,7 +2971,7 @@ class PauseSpeakerPlaybackPendingActionAttempt: :ivar status:""" action_attempt_id: str - action_type: Literal["PAUSE_SPEAKER_PLAYBACK"] + action_type: Literal["PUSH_THERMOSTAT_PROGRAMS"] error: None result: None status: Literal["pending"] @@ -3585,12 +2988,12 @@ def from_dict(cls, d: Any): @dataclass -class PauseSpeakerPlaybackErrorActionAttempt: - """Pausing playback on the speaker is pending. +class PushThermostatProgramsErrorActionAttempt: + """Pushing thermostat weekly programs is pending. :ivar action_attempt_id: ID of the action attempt. - :ivar action_type: Action attempt to track the status of pausing playback on a speaker. + :ivar action_type: Action attempt to track the status of pushing thermostat programs. :ivar error: Error associated with the action. @@ -3617,7 +3020,7 @@ def from_dict(cls, d: Any): ) action_attempt_id: str - action_type: Literal["PAUSE_SPEAKER_PLAYBACK"] + action_type: Literal["PUSH_THERMOSTAT_PROGRAMS"] error: Error result: None status: Literal["error"] @@ -3634,12 +3037,12 @@ def from_dict(cls, d: Any): @dataclass -class ResumeSpeakerPlaybackSuccessActionAttempt: - """Resuming playback on the speaker is pending. +class ConfigureAutoLockSuccessActionAttempt: + """Configuring the auto-lock is pending. :ivar action_attempt_id: ID of the action attempt. - :ivar action_type: Action attempt to track the status of resuming playback on a speaker. + :ivar action_type: Action attempt to track the status of configuring the auto-lock on a lock. :ivar error: Error associated with the action. @@ -3649,21 +3052,15 @@ class ResumeSpeakerPlaybackSuccessActionAttempt: @dataclass class Result(ResourceMapping): - """Result of the action. - - :ivar affected_device_ids: IDs of the speakers whose playback was resumed, including speakers grouped with the requested speaker. - """ - - affected_device_ids: List[str] + """Result of the action.""" @classmethod def from_dict(cls, d: Any): - return cls( - affected_device_ids=d.get("affected_device_ids", None), - ) + # pylint: disable=unused-argument + return cls() action_attempt_id: str - action_type: Literal["RESUME_SPEAKER_PLAYBACK"] + action_type: Literal["CONFIGURE_AUTO_LOCK"] error: None result: Result status: Literal["success"] @@ -3680,12 +3077,12 @@ def from_dict(cls, d: Any): @dataclass -class ResumeSpeakerPlaybackPendingActionAttempt: - """Resuming playback on the speaker is pending. +class ConfigureAutoLockPendingActionAttempt: + """Configuring the auto-lock is pending. :ivar action_attempt_id: ID of the action attempt. - :ivar action_type: Action attempt to track the status of resuming playback on a speaker. + :ivar action_type: Action attempt to track the status of configuring the auto-lock on a lock. :ivar error: Error associated with the action. @@ -3694,7 +3091,7 @@ class ResumeSpeakerPlaybackPendingActionAttempt: :ivar status:""" action_attempt_id: str - action_type: Literal["RESUME_SPEAKER_PLAYBACK"] + action_type: Literal["CONFIGURE_AUTO_LOCK"] error: None result: None status: Literal["pending"] @@ -3711,12 +3108,12 @@ def from_dict(cls, d: Any): @dataclass -class ResumeSpeakerPlaybackErrorActionAttempt: - """Resuming playback on the speaker is pending. +class ConfigureAutoLockErrorActionAttempt: + """Configuring the auto-lock is pending. :ivar action_attempt_id: ID of the action attempt. - :ivar action_type: Action attempt to track the status of resuming playback on a speaker. + :ivar action_type: Action attempt to track the status of configuring the auto-lock on a lock. :ivar error: Error associated with the action. @@ -3743,7 +3140,7 @@ def from_dict(cls, d: Any): ) action_attempt_id: str - action_type: Literal["RESUME_SPEAKER_PLAYBACK"] + action_type: Literal["CONFIGURE_AUTO_LOCK"] error: Error result: None status: Literal["error"] @@ -3760,12 +3157,12 @@ def from_dict(cls, d: Any): @dataclass -class PlaySpeakerChimeSuccessActionAttempt: - """Playing a chime on the speaker is pending. +class ConvertAccessCodeToManagedSuccessActionAttempt: + """Converting an unmanaged access code to managed is pending. :ivar action_attempt_id: ID of the action attempt. - :ivar action_type: Action attempt to track the status of playing a chime on a speaker. + :ivar action_type: Action attempt to track the status of converting an unmanaged access code to a managed access code. :ivar error: Error associated with the action. @@ -3783,7 +3180,7 @@ def from_dict(cls, d: Any): return cls() action_attempt_id: str - action_type: Literal["PLAY_SPEAKER_CHIME"] + action_type: Literal["CONVERT_ACCESS_CODE_TO_MANAGED"] error: None result: Result status: Literal["success"] @@ -3800,12 +3197,12 @@ def from_dict(cls, d: Any): @dataclass -class PlaySpeakerChimePendingActionAttempt: - """Playing a chime on the speaker is pending. +class ConvertAccessCodeToManagedPendingActionAttempt: + """Converting an unmanaged access code to managed is pending. :ivar action_attempt_id: ID of the action attempt. - :ivar action_type: Action attempt to track the status of playing a chime on a speaker. + :ivar action_type: Action attempt to track the status of converting an unmanaged access code to a managed access code. :ivar error: Error associated with the action. @@ -3814,7 +3211,7 @@ class PlaySpeakerChimePendingActionAttempt: :ivar status:""" action_attempt_id: str - action_type: Literal["PLAY_SPEAKER_CHIME"] + action_type: Literal["CONVERT_ACCESS_CODE_TO_MANAGED"] error: None result: None status: Literal["pending"] @@ -3831,12 +3228,12 @@ def from_dict(cls, d: Any): @dataclass -class PlaySpeakerChimeErrorActionAttempt: - """Playing a chime on the speaker is pending. +class ConvertAccessCodeToManagedErrorActionAttempt: + """Converting an unmanaged access code to managed is pending. :ivar action_attempt_id: ID of the action attempt. - :ivar action_type: Action attempt to track the status of playing a chime on a speaker. + :ivar action_type: Action attempt to track the status of converting an unmanaged access code to a managed access code. :ivar error: Error associated with the action. @@ -3863,7 +3260,7 @@ def from_dict(cls, d: Any): ) action_attempt_id: str - action_type: Literal["PLAY_SPEAKER_CHIME"] + action_type: Literal["CONVERT_ACCESS_CODE_TO_MANAGED"] error: Error result: None status: Literal["error"] @@ -4788,21 +4185,6 @@ def from_dict(cls, d: Any): ConvertAccessCodeToManagedSuccessActionAttempt, ConvertAccessCodeToManagedPendingActionAttempt, ConvertAccessCodeToManagedErrorActionAttempt, - SetSpeakerVolumeSuccessActionAttempt, - SetSpeakerVolumePendingActionAttempt, - SetSpeakerVolumeErrorActionAttempt, - SetSpeakerMuteSuccessActionAttempt, - SetSpeakerMutePendingActionAttempt, - SetSpeakerMuteErrorActionAttempt, - PauseSpeakerPlaybackSuccessActionAttempt, - PauseSpeakerPlaybackPendingActionAttempt, - PauseSpeakerPlaybackErrorActionAttempt, - ResumeSpeakerPlaybackSuccessActionAttempt, - ResumeSpeakerPlaybackPendingActionAttempt, - ResumeSpeakerPlaybackErrorActionAttempt, - PlaySpeakerChimeSuccessActionAttempt, - PlaySpeakerChimePendingActionAttempt, - PlaySpeakerChimeErrorActionAttempt, SyncAccessCodesSuccessActionAttempt, SyncAccessCodesPendingActionAttempt, SyncAccessCodesErrorActionAttempt, @@ -4922,36 +4304,6 @@ def from_dict(cls, d: Any): ConvertAccessCodeToManagedErrorActionAttempt, ] -SetSpeakerVolumeActionAttempt = Union[ - SetSpeakerVolumeSuccessActionAttempt, - SetSpeakerVolumePendingActionAttempt, - SetSpeakerVolumeErrorActionAttempt, -] - -SetSpeakerMuteActionAttempt = Union[ - SetSpeakerMuteSuccessActionAttempt, - SetSpeakerMutePendingActionAttempt, - SetSpeakerMuteErrorActionAttempt, -] - -PauseSpeakerPlaybackActionAttempt = Union[ - PauseSpeakerPlaybackSuccessActionAttempt, - PauseSpeakerPlaybackPendingActionAttempt, - PauseSpeakerPlaybackErrorActionAttempt, -] - -ResumeSpeakerPlaybackActionAttempt = Union[ - ResumeSpeakerPlaybackSuccessActionAttempt, - ResumeSpeakerPlaybackPendingActionAttempt, - ResumeSpeakerPlaybackErrorActionAttempt, -] - -PlaySpeakerChimeActionAttempt = Union[ - PlaySpeakerChimeSuccessActionAttempt, - PlaySpeakerChimePendingActionAttempt, - PlaySpeakerChimeErrorActionAttempt, -] - SyncAccessCodesActionAttempt = Union[ SyncAccessCodesSuccessActionAttempt, SyncAccessCodesPendingActionAttempt, @@ -5011,11 +4363,6 @@ def from_dict(cls, d: Any): PushThermostatProgramsSuccessActionAttempt, ConfigureAutoLockSuccessActionAttempt, ConvertAccessCodeToManagedSuccessActionAttempt, - SetSpeakerVolumeSuccessActionAttempt, - SetSpeakerMuteSuccessActionAttempt, - PauseSpeakerPlaybackSuccessActionAttempt, - ResumeSpeakerPlaybackSuccessActionAttempt, - PlaySpeakerChimeSuccessActionAttempt, SyncAccessCodesSuccessActionAttempt, CreateAccessCodeSuccessActionAttempt, DeleteAccessCodeSuccessActionAttempt, @@ -5042,11 +4389,6 @@ def from_dict(cls, d: Any): PushThermostatProgramsPendingActionAttempt, ConfigureAutoLockPendingActionAttempt, ConvertAccessCodeToManagedPendingActionAttempt, - SetSpeakerVolumePendingActionAttempt, - SetSpeakerMutePendingActionAttempt, - PauseSpeakerPlaybackPendingActionAttempt, - ResumeSpeakerPlaybackPendingActionAttempt, - PlaySpeakerChimePendingActionAttempt, SyncAccessCodesPendingActionAttempt, CreateAccessCodePendingActionAttempt, DeleteAccessCodePendingActionAttempt, @@ -5073,11 +4415,6 @@ def from_dict(cls, d: Any): PushThermostatProgramsErrorActionAttempt, ConfigureAutoLockErrorActionAttempt, ConvertAccessCodeToManagedErrorActionAttempt, - SetSpeakerVolumeErrorActionAttempt, - SetSpeakerMuteErrorActionAttempt, - PauseSpeakerPlaybackErrorActionAttempt, - ResumeSpeakerPlaybackErrorActionAttempt, - PlaySpeakerChimeErrorActionAttempt, SyncAccessCodesErrorActionAttempt, CreateAccessCodeErrorActionAttempt, DeleteAccessCodeErrorActionAttempt, @@ -5166,21 +4503,6 @@ def from_dict(cls, d: Any): "CONVERT_ACCESS_CODE_TO_MANAGED", "error", ): ConvertAccessCodeToManagedErrorActionAttempt, - ("SET_SPEAKER_VOLUME", "success"): SetSpeakerVolumeSuccessActionAttempt, - ("SET_SPEAKER_VOLUME", "pending"): SetSpeakerVolumePendingActionAttempt, - ("SET_SPEAKER_VOLUME", "error"): SetSpeakerVolumeErrorActionAttempt, - ("SET_SPEAKER_MUTE", "success"): SetSpeakerMuteSuccessActionAttempt, - ("SET_SPEAKER_MUTE", "pending"): SetSpeakerMutePendingActionAttempt, - ("SET_SPEAKER_MUTE", "error"): SetSpeakerMuteErrorActionAttempt, - ("PAUSE_SPEAKER_PLAYBACK", "success"): PauseSpeakerPlaybackSuccessActionAttempt, - ("PAUSE_SPEAKER_PLAYBACK", "pending"): PauseSpeakerPlaybackPendingActionAttempt, - ("PAUSE_SPEAKER_PLAYBACK", "error"): PauseSpeakerPlaybackErrorActionAttempt, - ("RESUME_SPEAKER_PLAYBACK", "success"): ResumeSpeakerPlaybackSuccessActionAttempt, - ("RESUME_SPEAKER_PLAYBACK", "pending"): ResumeSpeakerPlaybackPendingActionAttempt, - ("RESUME_SPEAKER_PLAYBACK", "error"): ResumeSpeakerPlaybackErrorActionAttempt, - ("PLAY_SPEAKER_CHIME", "success"): PlaySpeakerChimeSuccessActionAttempt, - ("PLAY_SPEAKER_CHIME", "pending"): PlaySpeakerChimePendingActionAttempt, - ("PLAY_SPEAKER_CHIME", "error"): PlaySpeakerChimeErrorActionAttempt, ("SYNC_ACCESS_CODES", "success"): SyncAccessCodesSuccessActionAttempt, ("SYNC_ACCESS_CODES", "pending"): SyncAccessCodesPendingActionAttempt, ("SYNC_ACCESS_CODES", "error"): SyncAccessCodesErrorActionAttempt, diff --git a/seam/resources/device.py b/seam/resources/device.py index 0c0ecc34..540e629d 100644 --- a/seam/resources/device.py +++ b/seam/resources/device.py @@ -25,12 +25,6 @@ class Device: :ivar can_hvac_heat_cool: Indicates whether the thermostat supports simultaneous heating and cooling. - :ivar can_mute_speaker: Indicates whether the speaker supports muting and unmuting. - - :ivar can_pause_speaker_playback: Indicates whether the speaker supports pausing and resuming playback. - - :ivar can_play_speaker_chime: Indicates whether the speaker supports playing a chime. - :ivar can_program_offline_access_codes: Indicates whether the device supports programming offline access codes. :ivar can_program_online_access_codes: Indicates whether the device supports programming online access codes. @@ -47,8 +41,6 @@ class Device: :ivar can_run_thermostat_programs: Indicates whether the thermostat supports running climate programs. - :ivar can_set_speaker_volume: Indicates whether the speaker supports setting its volume. - :ivar can_simulate_connection: Indicates whether the device supports simulating connection in a sandbox. :ivar can_simulate_disconnection: Indicates whether the device supports simulating disconnection in a sandbox. @@ -689,8 +681,6 @@ class Properties(ResourceMapping): :ivar smartthings_metadata: Metadata for a SmartThings device. - :ivar sonos_metadata: Metadata for a Sonos speaker. - :ivar tado_metadata: Metadata for a tado° device. :ivar tapo_metadata: Metadata for a Tapo camera. @@ -731,8 +721,6 @@ class Properties(ResourceMapping): :ivar online_time_frame_options: Time frames that may be requested when creating an online access code, expressed as a list of options. The caller picks one option (by matching the requested duration when the options' duration ranges do not overlap, or by ``display_name`` when they do) and satisfies that one option's rules. When ``undefined``, any time frame works. - :ivar speaker: Audio state and capabilities of the speaker. - :ivar supported_code_lengths: Supported code lengths for access codes. :ivar supports_backup_access_code_pool: Indicates whether the device supports a `backup access code pool `_. @@ -2191,7 +2179,7 @@ class SensiMetadata(ResourceMapping): :ivar device_name: Device name for a Sensi device. - :ivar dual_setpoints_not_supported: Set to true when the device does not support the /dual-setpoints API endpoint. + :ivar dual_setpoints_not_supported: Deprecated. Seam no longer sets this field. :ivar product_type: Product type for a Sensi device.""" @@ -2237,44 +2225,6 @@ def from_dict(cls, d: Any): model=d.get("model", None), ) - @dataclass - class SonosMetadata(ResourceMapping): - """Metadata for a Sonos speaker. - - :ivar bonded_member_models: Models of the speakers bonded to this speaker, such as surrounds or a subwoofer. - - :ivar color: Color of the speaker, as reported by Sonos. - - :ivar household_id: ID of the Sonos household that the speaker belongs to. - - :ivar model_display_name: Model name of the speaker, as reported by Sonos. - - :ivar player_id: ID of the Sonos player for the speaker. - - :ivar player_name: Name of the speaker, as set in the Sonos app. - - :ivar software_version: Software version running on the speaker.""" - - bonded_member_models: Optional[List[str]] - color: Optional[str] - household_id: Optional[str] - model_display_name: Optional[str] - player_id: Optional[str] - player_name: Optional[str] - software_version: Optional[str] - - @classmethod - def from_dict(cls, d: Any): - return cls( - bonded_member_models=d.get("bonded_member_models", None), - color=d.get("color", None), - household_id=d.get("household_id", None), - model_display_name=d.get("model_display_name", None), - player_id=d.get("player_id", None), - player_name=d.get("player_name", None), - software_version=d.get("software_version", None), - ) - @dataclass class TadoMetadata(ResourceMapping): """Metadata for a tado° device. @@ -2774,87 +2724,6 @@ def from_dict(cls, d: Any): time_zone=d.get("time_zone", None), ) - @dataclass - class Speaker(ResourceMapping): - """Audio state and capabilities of the speaker. - - :ivar grouped_with_device_ids: IDs of the other speakers that are currently grouped with this speaker. Pausing or resuming playback on a speaker also affects the speakers in its group. - - :ivar has_fixed_volume: Indicates whether the speaker's volume is fixed, for example, because the speaker's line-out level is controlled by an external amplifier. A speaker with a fixed volume cannot have its volume set through Seam. - - :ivar is_muted: Indicates whether the speaker is muted. - - :ivar max_volume: Maximum volume that you can set on the speaker. This is the ceiling of the speaker's native volume scale, not a limit configured for guests. - - :ivar min_volume: Minimum volume that you can set on the speaker. - - :ivar now_playing: Content that is currently playing on the speaker. - - :ivar playback_state: Playback state of the speaker. - - :ivar supports_chime: Indicates whether the speaker can play a chime. - - :ivar volume: Current volume of the speaker, on the speaker's native volume scale from ``min_volume`` to ``max_volume``. This is the native volume setting, not a decibel level. - - :ivar volume_reported_at: Date and time at which the speaker first reported its current volume. - - :ivar volume_step: Increment between the volume values that you can set on the speaker. - """ - - @dataclass - class NowPlaying(ResourceMapping): - """Content that is currently playing on the speaker. - - :ivar album: Album of the content that is currently playing. - - :ivar artist: Artist of the content that is currently playing. - - :ivar title: Title of the content that is currently playing.""" - - album: Optional[str] - artist: Optional[str] - title: Optional[str] - - @classmethod - def from_dict(cls, d: Any): - return cls( - album=d.get("album", None), - artist=d.get("artist", None), - title=d.get("title", None), - ) - - grouped_with_device_ids: List[str] - has_fixed_volume: bool - is_muted: bool - max_volume: float - min_volume: float - now_playing: Optional[NowPlaying] - playback_state: Literal["playing", "paused", "idle", "buffering", "unknown"] - supports_chime: bool - volume: float - volume_reported_at: Optional[str] - volume_step: float - - @classmethod - def from_dict(cls, d: Any): - return cls( - grouped_with_device_ids=d.get("grouped_with_device_ids", None), - has_fixed_volume=d.get("has_fixed_volume", None), - is_muted=d.get("is_muted", None), - max_volume=d.get("max_volume", None), - min_volume=d.get("min_volume", None), - now_playing=( - cls.NowPlaying.from_dict(d.get("now_playing")) - if d.get("now_playing") is not None - else None - ), - playback_state=d.get("playback_state", None), - supports_chime=d.get("supports_chime", None), - volume=d.get("volume", None), - volume_reported_at=d.get("volume_reported_at", None), - volume_step=d.get("volume_step", None), - ) - @dataclass class ActiveThermostatSchedule(ResourceMapping): """Active `thermostat schedule `_. @@ -3443,7 +3312,6 @@ def from_dict(cls, d: Any): seam_bridge_metadata: Optional[SeamBridgeMetadata] sensi_metadata: Optional[SensiMetadata] smartthings_metadata: Optional[SmartthingsMetadata] - sonos_metadata: Optional[SonosMetadata] tado_metadata: Optional[TadoMetadata] tapo_metadata: Optional[TapoMetadata] tedee_metadata: Optional[TedeeMetadata] @@ -3464,7 +3332,6 @@ def from_dict(cls, d: Any): max_active_codes_supported: Optional[float] offline_time_frame_options: Optional[List[OfflineTimeFrameOptions]] online_time_frame_options: Optional[List[OnlineTimeFrameOptions]] - speaker: Optional[Speaker] supported_code_lengths: Optional[List[float]] supports_backup_access_code_pool: Optional[bool] active_thermostat_schedule: Optional[ActiveThermostatSchedule] @@ -3740,11 +3607,6 @@ def from_dict(cls, d: Any): if d.get("smartthings_metadata") is not None else None ), - sonos_metadata=( - cls.SonosMetadata.from_dict(d.get("sonos_metadata")) - if d.get("sonos_metadata") is not None - else None - ), tado_metadata=( cls.TadoMetadata.from_dict(d.get("tado_metadata")) if d.get("tado_metadata") is not None @@ -3816,11 +3678,6 @@ def from_dict(cls, d: Any): cls.OnlineTimeFrameOptions.from_dict(i) for i in d.get("online_time_frame_options") or [] ], - speaker=( - cls.Speaker.from_dict(d.get("speaker")) - if d.get("speaker") is not None - else None - ), supported_code_lengths=d.get("supported_code_lengths", None), supports_backup_access_code_pool=d.get( "supports_backup_access_code_pool", None @@ -4681,9 +4538,6 @@ def from_dict(cls, d: Any): can_hvac_cool: Optional[bool] can_hvac_heat: Optional[bool] can_hvac_heat_cool: Optional[bool] - can_mute_speaker: Optional[bool] - can_pause_speaker_playback: Optional[bool] - can_play_speaker_chime: Optional[bool] can_program_offline_access_codes: Optional[bool] can_program_online_access_codes: Optional[bool] can_program_thermostat_programs_as_different_each_day: Optional[bool] @@ -4692,7 +4546,6 @@ def from_dict(cls, d: Any): can_remotely_lock: Optional[bool] can_remotely_unlock: Optional[bool] can_run_thermostat_programs: Optional[bool] - can_set_speaker_volume: Optional[bool] can_simulate_connection: Optional[bool] can_simulate_disconnection: Optional[bool] can_simulate_hub_connection: Optional[bool] @@ -4780,9 +4633,6 @@ def from_dict(cls, d: Any): can_hvac_cool=d.get("can_hvac_cool", None), can_hvac_heat=d.get("can_hvac_heat", None), can_hvac_heat_cool=d.get("can_hvac_heat_cool", None), - can_mute_speaker=d.get("can_mute_speaker", None), - can_pause_speaker_playback=d.get("can_pause_speaker_playback", None), - can_play_speaker_chime=d.get("can_play_speaker_chime", None), can_program_offline_access_codes=d.get( "can_program_offline_access_codes", None ), @@ -4801,7 +4651,6 @@ def from_dict(cls, d: Any): can_remotely_lock=d.get("can_remotely_lock", None), can_remotely_unlock=d.get("can_remotely_unlock", None), can_run_thermostat_programs=d.get("can_run_thermostat_programs", None), - can_set_speaker_volume=d.get("can_set_speaker_volume", None), can_simulate_connection=d.get("can_simulate_connection", None), can_simulate_disconnection=d.get("can_simulate_disconnection", None), can_simulate_hub_connection=d.get("can_simulate_hub_connection", None), diff --git a/seam/resources/device_provider.py b/seam/resources/device_provider.py index dddc07d8..b640af7a 100644 --- a/seam/resources/device_provider.py +++ b/seam/resources/device_provider.py @@ -18,12 +18,6 @@ class DeviceProvider: :ivar can_hvac_heat_cool: Indicates whether the thermostat supports simultaneous heating and cooling. - :ivar can_mute_speaker: Indicates whether the speaker supports muting and unmuting. - - :ivar can_pause_speaker_playback: Indicates whether the speaker supports pausing and resuming playback. - - :ivar can_play_speaker_chime: Indicates whether the speaker supports playing a chime. - :ivar can_program_offline_access_codes: Indicates whether the device supports programming offline access codes. :ivar can_program_online_access_codes: Indicates whether the device supports programming online access codes. @@ -40,8 +34,6 @@ class DeviceProvider: :ivar can_run_thermostat_programs: Indicates whether the thermostat supports running climate programs. - :ivar can_set_speaker_volume: Indicates whether the speaker supports setting its volume. - :ivar can_simulate_connection: Indicates whether the device supports simulating connection in a sandbox. :ivar can_simulate_disconnection: Indicates whether the device supports simulating disconnection in a sandbox. @@ -74,9 +66,6 @@ class DeviceProvider: can_hvac_cool: Optional[bool] can_hvac_heat: Optional[bool] can_hvac_heat_cool: Optional[bool] - can_mute_speaker: Optional[bool] - can_pause_speaker_playback: Optional[bool] - can_play_speaker_chime: Optional[bool] can_program_offline_access_codes: Optional[bool] can_program_online_access_codes: Optional[bool] can_program_thermostat_programs_as_different_each_day: Optional[bool] @@ -85,7 +74,6 @@ class DeviceProvider: can_remotely_lock: Optional[bool] can_remotely_unlock: Optional[bool] can_run_thermostat_programs: Optional[bool] - can_set_speaker_volume: Optional[bool] can_simulate_connection: Optional[bool] can_simulate_disconnection: Optional[bool] can_simulate_hub_connection: Optional[bool] @@ -189,9 +177,6 @@ def from_dict(cls, d: Any): can_hvac_cool=d.get("can_hvac_cool", None), can_hvac_heat=d.get("can_hvac_heat", None), can_hvac_heat_cool=d.get("can_hvac_heat_cool", None), - can_mute_speaker=d.get("can_mute_speaker", None), - can_pause_speaker_playback=d.get("can_pause_speaker_playback", None), - can_play_speaker_chime=d.get("can_play_speaker_chime", None), can_program_offline_access_codes=d.get( "can_program_offline_access_codes", None ), @@ -210,7 +195,6 @@ def from_dict(cls, d: Any): can_remotely_lock=d.get("can_remotely_lock", None), can_remotely_unlock=d.get("can_remotely_unlock", None), can_run_thermostat_programs=d.get("can_run_thermostat_programs", None), - can_set_speaker_volume=d.get("can_set_speaker_volume", None), can_simulate_connection=d.get("can_simulate_connection", None), can_simulate_disconnection=d.get("can_simulate_disconnection", None), can_simulate_hub_connection=d.get("can_simulate_hub_connection", None), diff --git a/seam/resources/seam_event.py b/seam/resources/seam_event.py index 2fcc17ec..d330d65e 100644 --- a/seam/resources/seam_event.py +++ b/seam/resources/seam_event.py @@ -7032,6 +7032,7 @@ class Reason(ResourceMapping): "too_many_attempts", "blocked_by_privacy_mode", "credential_error", + "connection_error", ] @classmethod diff --git a/seam/resources/unmanaged_access_grant.py b/seam/resources/unmanaged_access_grant.py index f0b4124b..41c7524c 100644 --- a/seam/resources/unmanaged_access_grant.py +++ b/seam/resources/unmanaged_access_grant.py @@ -399,11 +399,13 @@ def from_dict(cls, d: Any): @dataclass class RequestedCodeUnavailableWarning(ResourceMapping): - """Indicates that the requested PIN code was already in use on a device, so a different code was assigned. + """Indicates that the requested PIN code could not be used, so a different code was assigned. For example, the code was already in use on a device, or the access system rejected it because it did not meet its PIN rules. + + :ivar access_method_id: ID of the access method whose requested code was unavailable. Present when an access system, such as Salto KS, assigned a different code. :ivar created_at: Date and time at which Seam created the warning. - :ivar device_id: ID of the device where the requested code was unavailable. + :ivar device_id: ID of the device where the requested code was unavailable. Present when the code was set directly on a device. :ivar message: Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. @@ -414,8 +416,9 @@ class RequestedCodeUnavailableWarning(ResourceMapping): :ivar warning_code: Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. """ + access_method_id: Optional[str] created_at: str - device_id: str + device_id: Optional[str] message: str new_code: str original_code: str @@ -424,6 +427,7 @@ class RequestedCodeUnavailableWarning(ResourceMapping): @classmethod def from_dict(cls, d: Any): return cls( + access_method_id=d.get("access_method_id", None), created_at=d.get("created_at", None), device_id=d.get("device_id", None), message=d.get("message", None), diff --git a/seam/resources/unmanaged_access_method.py b/seam/resources/unmanaged_access_method.py index 3a267b2d..719c971f 100644 --- a/seam/resources/unmanaged_access_method.py +++ b/seam/resources/unmanaged_access_method.py @@ -452,6 +452,37 @@ def from_dict(cls, d: Any): warning_code=d.get("warning_code", None), ) + @dataclass + class RequestedCodeUnavailableWarning(ResourceMapping): + """Indicates that the access system could not use the PIN code requested for this `access method `_, for example because it did not meet the access system's PIN rules, so the access system assigned a different code. Give the recipient the assigned code. + + :ivar created_at: Date and time at which Seam created the warning. + + :ivar message: Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + + :ivar new_code: The PIN code that was assigned instead. + + :ivar original_code: The originally requested PIN code that could not be used. + + :ivar warning_code: Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + """ + + created_at: str + message: str + new_code: str + original_code: str + warning_code: Literal["requested_code_unavailable"] + + @classmethod + def from_dict(cls, d: Any): + return cls( + created_at=d.get("created_at", None), + message=d.get("message", None), + new_code=d.get("new_code", None), + original_code=d.get("original_code", None), + warning_code=d.get("warning_code", None), + ) + Errors = Union[FailedToIssueError, AccessNotProvisionedError] _ErrorsVariants = { "failed_to_issue": FailedToIssueError, @@ -478,6 +509,7 @@ def from_dict(cls, d: Any): DelayInIssuingWarning, UserIdentityMissingEmailAddressWarning, UserIdentityMissingPhoneNumberWarning, + RequestedCodeUnavailableWarning, ] _WarningsVariants = { "being_deleted": BeingDeletedWarning, @@ -486,6 +518,7 @@ def from_dict(cls, d: Any): "delay_in_issuing": DelayInIssuingWarning, "user_identity_missing_email_address": UserIdentityMissingEmailAddressWarning, "user_identity_missing_phone_number": UserIdentityMissingPhoneNumberWarning, + "requested_code_unavailable": RequestedCodeUnavailableWarning, } access_method_id: str diff --git a/seam/resources/unmanaged_device.py b/seam/resources/unmanaged_device.py index b6ba49a6..8cbf8340 100644 --- a/seam/resources/unmanaged_device.py +++ b/seam/resources/unmanaged_device.py @@ -25,12 +25,6 @@ class UnmanagedDevice: :ivar can_hvac_heat_cool: Indicates whether the thermostat supports simultaneous heating and cooling. - :ivar can_mute_speaker: Indicates whether the speaker supports muting and unmuting. - - :ivar can_pause_speaker_playback: Indicates whether the speaker supports pausing and resuming playback. - - :ivar can_play_speaker_chime: Indicates whether the speaker supports playing a chime. - :ivar can_program_offline_access_codes: Indicates whether the device supports programming offline access codes. :ivar can_program_online_access_codes: Indicates whether the device supports programming online access codes. @@ -47,8 +41,6 @@ class UnmanagedDevice: :ivar can_run_thermostat_programs: Indicates whether the thermostat supports running climate programs. - :ivar can_set_speaker_volume: Indicates whether the speaker supports setting its volume. - :ivar can_simulate_connection: Indicates whether the device supports simulating connection in a sandbox. :ivar can_simulate_disconnection: Indicates whether the device supports simulating disconnection in a sandbox. @@ -1444,9 +1436,6 @@ def from_dict(cls, d: Any): can_hvac_cool: Optional[bool] can_hvac_heat: Optional[bool] can_hvac_heat_cool: Optional[bool] - can_mute_speaker: Optional[bool] - can_pause_speaker_playback: Optional[bool] - can_play_speaker_chime: Optional[bool] can_program_offline_access_codes: Optional[bool] can_program_online_access_codes: Optional[bool] can_program_thermostat_programs_as_different_each_day: Optional[bool] @@ -1455,7 +1444,6 @@ def from_dict(cls, d: Any): can_remotely_lock: Optional[bool] can_remotely_unlock: Optional[bool] can_run_thermostat_programs: Optional[bool] - can_set_speaker_volume: Optional[bool] can_simulate_connection: Optional[bool] can_simulate_disconnection: Optional[bool] can_simulate_hub_connection: Optional[bool] @@ -1539,9 +1527,6 @@ def from_dict(cls, d: Any): can_hvac_cool=d.get("can_hvac_cool", None), can_hvac_heat=d.get("can_hvac_heat", None), can_hvac_heat_cool=d.get("can_hvac_heat_cool", None), - can_mute_speaker=d.get("can_mute_speaker", None), - can_pause_speaker_playback=d.get("can_pause_speaker_playback", None), - can_play_speaker_chime=d.get("can_play_speaker_chime", None), can_program_offline_access_codes=d.get( "can_program_offline_access_codes", None ), @@ -1560,7 +1545,6 @@ def from_dict(cls, d: Any): can_remotely_lock=d.get("can_remotely_lock", None), can_remotely_unlock=d.get("can_remotely_unlock", None), can_run_thermostat_programs=d.get("can_run_thermostat_programs", None), - can_set_speaker_volume=d.get("can_set_speaker_volume", None), can_simulate_connection=d.get("can_simulate_connection", None), can_simulate_disconnection=d.get("can_simulate_disconnection", None), can_simulate_hub_connection=d.get("can_simulate_hub_connection", None), diff --git a/seam/routes/customers.py b/seam/routes/customers.py index 17d59ee7..edbd9390 100644 --- a/seam/routes/customers.py +++ b/seam/routes/customers.py @@ -50,7 +50,7 @@ def create_portal( :param exclude_locale_picker: Whether to exclude the option to select a locale within the portal UI. - :param features: + :param features: Features to include in the portal. Settings you omit use the portal's customization profile, then the Seam default. Settings you pass take precedence over the customization profile's, so changing the profile doesn't change them. :param is_embedded: Whether the portal is embedded in another application. @@ -250,7 +250,7 @@ async def create_portal( :param exclude_locale_picker: Whether to exclude the option to select a locale within the portal UI. - :param features: + :param features: Features to include in the portal. Settings you omit use the portal's customization profile, then the Seam default. Settings you pass take precedence over the customization profile's, so changing the profile doesn't change them. :param is_embedded: Whether the portal is embedded in another application. @@ -457,7 +457,7 @@ def create_portal( :param exclude_locale_picker: Whether to exclude the option to select a locale within the portal UI. - :param features: + :param features: Features to include in the portal. Settings you omit use the portal's customization profile, then the Seam default. Settings you pass take precedence over the customization profile's, so changing the profile doesn't change them. :param is_embedded: Whether the portal is embedded in another application. @@ -793,7 +793,7 @@ async def create_portal( :param exclude_locale_picker: Whether to exclude the option to select a locale within the portal UI. - :param features: + :param features: Features to include in the portal. Settings you omit use the portal's customization profile, then the Seam default. Settings you pass take precedence over the customization profile's, so changing the profile doesn't change them. :param is_embedded: Whether the portal is embedded in another application. diff --git a/seam/routes/user_identities.py b/seam/routes/user_identities.py index 2f4b2272..b4dc6fee 100644 --- a/seam/routes/user_identities.py +++ b/seam/routes/user_identities.py @@ -56,6 +56,7 @@ def create( self, *, acs_system_ids: Optional[List[str]] = None, + customer_key: Optional[str] = None, email_address: Optional[Union[str, Null]] = None, full_name: Optional[Union[str, Null]] = None, phone_number: Optional[Union[str, Null]] = None, @@ -65,6 +66,8 @@ def create( :param acs_system_ids: List of access system IDs to associate with the new user identity through access system users. If there's no user with the same email address or phone number in the specified access systems, a new access system user is created. If there is an existing user with the same email or phone number in the specified access systems, the user is linked to the user identity. + :param customer_key: Customer key of the customer that owns the new user identity. Set it when the user identity will be used in access grants created through that customer's client session or Customer Portal. + :param email_address: Unique email address for the new user identity. :param full_name: Full name of the user associated with the new user identity. @@ -300,6 +303,7 @@ async def create( self, *, acs_system_ids: Optional[List[str]] = None, + customer_key: Optional[str] = None, email_address: Optional[Union[str, Null]] = None, full_name: Optional[Union[str, Null]] = None, phone_number: Optional[Union[str, Null]] = None, @@ -309,6 +313,8 @@ async def create( :param acs_system_ids: List of access system IDs to associate with the new user identity through access system users. If there's no user with the same email address or phone number in the specified access systems, a new access system user is created. If there is an existing user with the same email or phone number in the specified access systems, the user is linked to the user identity. + :param customer_key: Customer key of the customer that owns the new user identity. Set it when the user identity will be used in access grants created through that customer's client session or Customer Portal. + :param email_address: Unique email address for the new user identity. :param full_name: Full name of the user associated with the new user identity. @@ -572,6 +578,7 @@ def create( self, *, acs_system_ids: Optional[List[str]] = None, + customer_key: Optional[str] = None, email_address: Optional[Union[str, Null]] = None, full_name: Optional[Union[str, Null]] = None, phone_number: Optional[Union[str, Null]] = None, @@ -581,6 +588,8 @@ def create( :param acs_system_ids: List of access system IDs to associate with the new user identity through access system users. If there's no user with the same email address or phone number in the specified access systems, a new access system user is created. If there is an existing user with the same email or phone number in the specified access systems, the user is linked to the user identity. + :param customer_key: Customer key of the customer that owns the new user identity. Set it when the user identity will be used in access grants created through that customer's client session or Customer Portal. + :param email_address: Unique email address for the new user identity. :param full_name: Full name of the user associated with the new user identity. @@ -594,6 +603,8 @@ def create( if acs_system_ids is not None: json_payload["acs_system_ids"] = acs_system_ids + if customer_key is not None: + json_payload["customer_key"] = customer_key if email_address is not None: json_payload["email_address"] = email_address if full_name is not None: @@ -1100,6 +1111,7 @@ async def create( self, *, acs_system_ids: Optional[List[str]] = None, + customer_key: Optional[str] = None, email_address: Optional[Union[str, Null]] = None, full_name: Optional[Union[str, Null]] = None, phone_number: Optional[Union[str, Null]] = None, @@ -1109,6 +1121,8 @@ async def create( :param acs_system_ids: List of access system IDs to associate with the new user identity through access system users. If there's no user with the same email address or phone number in the specified access systems, a new access system user is created. If there is an existing user with the same email or phone number in the specified access systems, the user is linked to the user identity. + :param customer_key: Customer key of the customer that owns the new user identity. Set it when the user identity will be used in access grants created through that customer's client session or Customer Portal. + :param email_address: Unique email address for the new user identity. :param full_name: Full name of the user associated with the new user identity. @@ -1122,6 +1136,8 @@ async def create( if acs_system_ids is not None: json_payload["acs_system_ids"] = acs_system_ids + if customer_key is not None: + json_payload["customer_key"] = customer_key if email_address is not None: json_payload["email_address"] = email_address if full_name is not None: