From e2bee055915dd0a6459dd6c8ffdef6a80c6b9c65 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 9 Oct 2026 09:53:03 +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.1096.0 to 1.1100.0 - [Release notes](https://github.com/seamapi/types/releases) - [Commits](https://github.com/seamapi/types/compare/v1.1096.0...v1.1100.0) --- updated-dependencies: - dependency-name: "@seamapi/types" dependency-version: 1.1100.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 178c4443..287ef291 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.1096.0", + "@seamapi/types": "1.1100.0", "change-case": "^5.4.4", "prettier": "^3.2.5" }, @@ -853,9 +853,9 @@ } }, "node_modules/@seamapi/types": { - "version": "1.1096.0", - "resolved": "https://registry.npmjs.org/@seamapi/types/-/types-1.1096.0.tgz", - "integrity": "sha512-JMfk6KOq/U7l3InqXZRKLDrZ+OM/5Vfc+kaeZfkWwXPchBKn7nKBiJgEHQJ6V1BIycelFX+qsUXDju3XHoVN+g==", + "version": "1.1100.0", + "resolved": "https://registry.npmjs.org/@seamapi/types/-/types-1.1100.0.tgz", + "integrity": "sha512-syQWT7HOR5T24hzSAXpcFvWzRUrn+PuObNhiN2xvfxGJUseUvhB0LQGfI7mJY0lxWdBazYJEXLf8M3cqYW7K8g==", "dev": true, "license": "MIT", "engines": { diff --git a/package.json b/package.json index 62f2b4c1..caaac4a7 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.1096.0", + "@seamapi/types": "1.1100.0", "change-case": "^5.4.4", "prettier": "^3.2.5" } From a98afaba2abc1c46e2b60be24d461e0a0ba0a00e Mon Sep 17 00:00:00 2001 From: Seam Bot Date: Fri, 9 Oct 2026 09:53:38 +0000 Subject: [PATCH 2/2] ci: Generate code --- seam/resources/__init__.py | 4 + seam/resources/access_grant.py | 26 +++- seam/resources/access_method.py | 26 +++- seam/resources/action_attempt.py | 146 +++++++++++++++++++++- seam/resources/space.py | 42 +++++++ seam/resources/unmanaged_access_grant.py | 26 +++- seam/resources/unmanaged_access_method.py | 26 +++- 7 files changed, 291 insertions(+), 5 deletions(-) diff --git a/seam/resources/__init__.py b/seam/resources/__init__.py index b765dd08..be829418 100644 --- a/seam/resources/__init__.py +++ b/seam/resources/__init__.py @@ -53,6 +53,9 @@ ConfigureAutoLockSuccessActionAttempt, ConfigureAutoLockPendingActionAttempt, ConfigureAutoLockErrorActionAttempt, + ConvertAccessCodeToManagedSuccessActionAttempt, + ConvertAccessCodeToManagedPendingActionAttempt, + ConvertAccessCodeToManagedErrorActionAttempt, SyncAccessCodesSuccessActionAttempt, SyncAccessCodesPendingActionAttempt, SyncAccessCodesErrorActionAttempt, @@ -89,6 +92,7 @@ SimulateManualLockViaKeypadActionAttempt, PushThermostatProgramsActionAttempt, ConfigureAutoLockActionAttempt, + ConvertAccessCodeToManagedActionAttempt, SyncAccessCodesActionAttempt, CreateAccessCodeActionAttempt, DeleteAccessCodeActionAttempt, diff --git a/seam/resources/access_grant.py b/seam/resources/access_grant.py index db9a5498..ed9b362c 100644 --- a/seam/resources/access_grant.py +++ b/seam/resources/access_grant.py @@ -84,6 +84,29 @@ def from_dict(cls, d: Any): missing_device_ids=d.get("missing_device_ids", None), ) + @dataclass + class AccessNotProvisionedError(ResourceMapping): + """Indicates that the access system rejected the access that Seam tried to set up for this access grant, so its credentials cannot open the affected entrances. For example, a hotel room may already be reserved or checked in for another guest. The message contains the reason that the access system gave. Seam keeps retrying, and this error clears automatically once the access system accepts the access. + + :ivar created_at: Date and time at which Seam created the error. + + :ivar error_code: Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + + :ivar message: Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + """ + + created_at: str + error_code: Literal["access_not_provisioned"] + message: str + + @classmethod + def from_dict(cls, d: Any): + return cls( + created_at=d.get("created_at", None), + error_code=d.get("error_code", None), + message=d.get("message", None), + ) + @dataclass class UpdatingSpacesPendingMutation(ResourceMapping): """Seam is in the process of updating the devices/spaces associated with this access grant. @@ -479,9 +502,10 @@ def from_dict(cls, d: Any): warning_code=d.get("warning_code", None), ) - Errors = Union[CannotCreateRequestedAccessMethodsError] + Errors = Union[CannotCreateRequestedAccessMethodsError, AccessNotProvisionedError] _ErrorsVariants = { "cannot_create_requested_access_methods": CannotCreateRequestedAccessMethodsError, + "access_not_provisioned": AccessNotProvisionedError, } PendingMutations = Union[ diff --git a/seam/resources/access_method.py b/seam/resources/access_method.py index a95bdf87..e916b6eb 100644 --- a/seam/resources/access_method.py +++ b/seam/resources/access_method.py @@ -76,6 +76,29 @@ def from_dict(cls, d: Any): message=d.get("message", None), ) + @dataclass + class AccessNotProvisionedError(ResourceMapping): + """Indicates that the access system rejected the access that Seam tried to set up for this access method, so its credential cannot open the affected entrances, even after it is issued. For example, a hotel room may already be reserved or checked in for another guest. The message contains the reason that the access system gave. Seam keeps retrying, and this error clears automatically once the access system accepts the access. + + :ivar created_at: Date and time at which Seam created the error. + + :ivar error_code: Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + + :ivar message: Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + """ + + created_at: str + error_code: Literal["access_not_provisioned"] + message: str + + @classmethod + def from_dict(cls, d: Any): + return cls( + created_at=d.get("created_at", None), + error_code=d.get("error_code", None), + message=d.get("message", None), + ) + @dataclass class ProvisioningAccessPendingMutation(ResourceMapping): """Seam is in the process of provisioning access for this access method on new devices. @@ -412,9 +435,10 @@ def from_dict(cls, d: Any): warning_code=d.get("warning_code", None), ) - Errors = Union[FailedToIssueError] + Errors = Union[FailedToIssueError, AccessNotProvisionedError] _ErrorsVariants = { "failed_to_issue": FailedToIssueError, + "access_not_provisioned": AccessNotProvisionedError, } PendingMutations = Union[ diff --git a/seam/resources/action_attempt.py b/seam/resources/action_attempt.py index a745735c..cbfb583b 100644 --- a/seam/resources/action_attempt.py +++ b/seam/resources/action_attempt.py @@ -1797,7 +1797,7 @@ class Errors(ResourceMapping): """ created_at: str - error_code: Literal["failed_to_issue"] + error_code: Literal["failed_to_issue", "access_not_provisioned"] message: str @classmethod @@ -3144,6 +3144,126 @@ def from_dict(cls, d: Any): ) +@dataclass +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 converting an unmanaged access code to a managed access code. + + :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["CONVERT_ACCESS_CODE_TO_MANAGED"] + 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 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 converting an unmanaged access code to a managed access code. + + :ivar error: Error associated with the action. + + :ivar result: Result of the action. + + :ivar status:""" + + action_attempt_id: str + action_type: Literal["CONVERT_ACCESS_CODE_TO_MANAGED"] + 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 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 converting an unmanaged access code to a managed access code. + + :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["CONVERT_ACCESS_CODE_TO_MANAGED"] + 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 SyncAccessCodesSuccessActionAttempt: """ @@ -4050,6 +4170,9 @@ def from_dict(cls, d: Any): ConfigureAutoLockSuccessActionAttempt, ConfigureAutoLockPendingActionAttempt, ConfigureAutoLockErrorActionAttempt, + ConvertAccessCodeToManagedSuccessActionAttempt, + ConvertAccessCodeToManagedPendingActionAttempt, + ConvertAccessCodeToManagedErrorActionAttempt, SyncAccessCodesSuccessActionAttempt, SyncAccessCodesPendingActionAttempt, SyncAccessCodesErrorActionAttempt, @@ -4163,6 +4286,12 @@ def from_dict(cls, d: Any): ConfigureAutoLockErrorActionAttempt, ] +ConvertAccessCodeToManagedActionAttempt = Union[ + ConvertAccessCodeToManagedSuccessActionAttempt, + ConvertAccessCodeToManagedPendingActionAttempt, + ConvertAccessCodeToManagedErrorActionAttempt, +] + SyncAccessCodesActionAttempt = Union[ SyncAccessCodesSuccessActionAttempt, SyncAccessCodesPendingActionAttempt, @@ -4221,6 +4350,7 @@ def from_dict(cls, d: Any): SimulateManualLockViaKeypadSuccessActionAttempt, PushThermostatProgramsSuccessActionAttempt, ConfigureAutoLockSuccessActionAttempt, + ConvertAccessCodeToManagedSuccessActionAttempt, SyncAccessCodesSuccessActionAttempt, CreateAccessCodeSuccessActionAttempt, DeleteAccessCodeSuccessActionAttempt, @@ -4246,6 +4376,7 @@ def from_dict(cls, d: Any): SimulateManualLockViaKeypadPendingActionAttempt, PushThermostatProgramsPendingActionAttempt, ConfigureAutoLockPendingActionAttempt, + ConvertAccessCodeToManagedPendingActionAttempt, SyncAccessCodesPendingActionAttempt, CreateAccessCodePendingActionAttempt, DeleteAccessCodePendingActionAttempt, @@ -4271,6 +4402,7 @@ def from_dict(cls, d: Any): SimulateManualLockViaKeypadErrorActionAttempt, PushThermostatProgramsErrorActionAttempt, ConfigureAutoLockErrorActionAttempt, + ConvertAccessCodeToManagedErrorActionAttempt, SyncAccessCodesErrorActionAttempt, CreateAccessCodeErrorActionAttempt, DeleteAccessCodeErrorActionAttempt, @@ -4347,6 +4479,18 @@ def from_dict(cls, d: Any): ("CONFIGURE_AUTO_LOCK", "success"): ConfigureAutoLockSuccessActionAttempt, ("CONFIGURE_AUTO_LOCK", "pending"): ConfigureAutoLockPendingActionAttempt, ("CONFIGURE_AUTO_LOCK", "error"): ConfigureAutoLockErrorActionAttempt, + ( + "CONVERT_ACCESS_CODE_TO_MANAGED", + "success", + ): ConvertAccessCodeToManagedSuccessActionAttempt, + ( + "CONVERT_ACCESS_CODE_TO_MANAGED", + "pending", + ): ConvertAccessCodeToManagedPendingActionAttempt, + ( + "CONVERT_ACCESS_CODE_TO_MANAGED", + "error", + ): ConvertAccessCodeToManagedErrorActionAttempt, ("SYNC_ACCESS_CODES", "success"): SyncAccessCodesSuccessActionAttempt, ("SYNC_ACCESS_CODES", "pending"): SyncAccessCodesPendingActionAttempt, ("SYNC_ACCESS_CODES", "error"): SyncAccessCodesErrorActionAttempt, diff --git a/seam/resources/space.py b/seam/resources/space.py index 5bb3ec7a..1279dadd 100644 --- a/seam/resources/space.py +++ b/seam/resources/space.py @@ -4,6 +4,13 @@ from ..resource_mapping import ResourceMapping +def _from_discriminated_dict( + d: Any, variants: Dict[str, Any], discriminator: str +) -> Any: + variant = variants.get(d.get(discriminator)) + return DeepAttrDict(d) if variant is None else variant.from_dict(d) + + @dataclass class Space: """Represents a space that is a logical grouping of devices and entrances. You can assign access to an entire space, thereby making granting access more efficient. @@ -28,6 +35,8 @@ class Space: :ivar space_key: Unique key for the space within the workspace. + :ivar warnings: Warnings associated with the space. + :ivar workspace_id: ID of the workspace associated with the space.""" @dataclass @@ -74,6 +83,34 @@ def from_dict(cls, d: Any): longitude=d.get("longitude", None), ) + @dataclass + class BeingDeletedWarning(ResourceMapping): + """Indicates that the space is being deleted. Seam removes it, revokes its access grants, and detaches its devices and entrances shortly. + + :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 warning_code: Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + """ + + created_at: str + message: str + warning_code: Literal["being_deleted"] + + @classmethod + def from_dict(cls, d: Any): + return cls( + created_at=d.get("created_at", None), + message=d.get("message", None), + warning_code=d.get("warning_code", None), + ) + + Warnings = Union[BeingDeletedWarning] + _WarningsVariants = { + "being_deleted": BeingDeletedWarning, + } + acs_entrance_count: float created_at: str customer_data: Optional[CustomerData] @@ -84,6 +121,7 @@ def from_dict(cls, d: Any): name: str space_id: str space_key: Optional[str] + warnings: List[Warnings] workspace_id: str @classmethod @@ -107,5 +145,9 @@ def from_dict(cls, d: Any): name=d.get("name", None), space_id=d.get("space_id", None), space_key=d.get("space_key", None), + warnings=[ + _from_discriminated_dict(i, cls._WarningsVariants, "warning_code") + for i in d.get("warnings") or [] + ], workspace_id=d.get("workspace_id", None), ) diff --git a/seam/resources/unmanaged_access_grant.py b/seam/resources/unmanaged_access_grant.py index 52fb3d68..aa4592b1 100644 --- a/seam/resources/unmanaged_access_grant.py +++ b/seam/resources/unmanaged_access_grant.py @@ -74,6 +74,29 @@ def from_dict(cls, d: Any): missing_device_ids=d.get("missing_device_ids", None), ) + @dataclass + class AccessNotProvisionedError(ResourceMapping): + """Indicates that the access system rejected the access that Seam tried to set up for this access grant, so its credentials cannot open the affected entrances. For example, a hotel room may already be reserved or checked in for another guest. The message contains the reason that the access system gave. Seam keeps retrying, and this error clears automatically once the access system accepts the access. + + :ivar created_at: Date and time at which Seam created the error. + + :ivar error_code: Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + + :ivar message: Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + """ + + created_at: str + error_code: Literal["access_not_provisioned"] + message: str + + @classmethod + def from_dict(cls, d: Any): + return cls( + created_at=d.get("created_at", None), + error_code=d.get("error_code", None), + message=d.get("message", None), + ) + @dataclass class UpdatingSpacesPendingMutation(ResourceMapping): """Seam is in the process of updating the devices/spaces associated with this access grant. @@ -469,9 +492,10 @@ def from_dict(cls, d: Any): warning_code=d.get("warning_code", None), ) - Errors = Union[CannotCreateRequestedAccessMethodsError] + Errors = Union[CannotCreateRequestedAccessMethodsError, AccessNotProvisionedError] _ErrorsVariants = { "cannot_create_requested_access_methods": CannotCreateRequestedAccessMethodsError, + "access_not_provisioned": AccessNotProvisionedError, } PendingMutations = Union[ diff --git a/seam/resources/unmanaged_access_method.py b/seam/resources/unmanaged_access_method.py index fdc0d18a..003e35c1 100644 --- a/seam/resources/unmanaged_access_method.py +++ b/seam/resources/unmanaged_access_method.py @@ -70,6 +70,29 @@ def from_dict(cls, d: Any): message=d.get("message", None), ) + @dataclass + class AccessNotProvisionedError(ResourceMapping): + """Indicates that the access system rejected the access that Seam tried to set up for this access method, so its credential cannot open the affected entrances, even after it is issued. For example, a hotel room may already be reserved or checked in for another guest. The message contains the reason that the access system gave. Seam keeps retrying, and this error clears automatically once the access system accepts the access. + + :ivar created_at: Date and time at which Seam created the error. + + :ivar error_code: Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + + :ivar message: Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + """ + + created_at: str + error_code: Literal["access_not_provisioned"] + message: str + + @classmethod + def from_dict(cls, d: Any): + return cls( + created_at=d.get("created_at", None), + error_code=d.get("error_code", None), + message=d.get("message", None), + ) + @dataclass class ProvisioningAccessPendingMutation(ResourceMapping): """Seam is in the process of provisioning access for this access method on new devices. @@ -406,9 +429,10 @@ def from_dict(cls, d: Any): warning_code=d.get("warning_code", None), ) - Errors = Union[FailedToIssueError] + Errors = Union[FailedToIssueError, AccessNotProvisionedError] _ErrorsVariants = { "failed_to_issue": FailedToIssueError, + "access_not_provisioned": AccessNotProvisionedError, } PendingMutations = Union[