diff --git a/package-lock.json b/package-lock.json index 21b41e0b..14f35cb2 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.1129.0", + "@seamapi/types": "1.1132.0", "change-case": "^5.4.4", "prettier": "^3.2.5" }, @@ -853,9 +853,9 @@ } }, "node_modules/@seamapi/types": { - "version": "1.1129.0", - "resolved": "https://registry.npmjs.org/@seamapi/types/-/types-1.1129.0.tgz", - "integrity": "sha512-TlWoYyag1WXGB3CRjI3utqoDcmEvP4bPqCeUc1SXUW1o7bX3k3y+EGr9ZDPKfmMiQkOd6YaC4QgbP7h4hOSn6A==", + "version": "1.1132.0", + "resolved": "https://registry.npmjs.org/@seamapi/types/-/types-1.1132.0.tgz", + "integrity": "sha512-Tezm8KLN1y8mXom5F4K1dIlqICJvAzp5UnwAWupzHuZ4u77ILzEpDItww3qOOmCmFZ5VanUVoUATJ3IEi+vdYw==", "dev": true, "license": "MIT", "engines": { diff --git a/package.json b/package.json index 5e388685..16b9e6d8 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.1129.0", + "@seamapi/types": "1.1132.0", "change-case": "^5.4.4", "prettier": "^3.2.5" } diff --git a/seam/resources/access_code.py b/seam/resources/access_code.py index 760db4a7..9b401c69 100644 --- a/seam/resources/access_code.py +++ b/seam/resources/access_code.py @@ -376,7 +376,7 @@ def from_dict(cls, d: Any): @dataclass class FailedToIssueError(ResourceMapping): - """Seam was unable to issue this access code before its start time, so the recipient may be unable to unlock the device. This usually points to a problem that needs attention, such as an offline or disconnected device. Seam keeps retrying, and this error clears automatically if the access code is eventually issued. + """Seam was unable to issue this access code before its start time, so the recipient may be unable to unlock the device. This usually points to a problem that needs attention, such as an offline or disconnected device. This error clears automatically if the access code is eventually issued. :ivar created_at: Date and time at which Seam created the error. diff --git a/seam/resources/access_grant.py b/seam/resources/access_grant.py index d0363906..3021003a 100644 --- a/seam/resources/access_grant.py +++ b/seam/resources/access_grant.py @@ -506,6 +506,33 @@ def from_dict(cls, d: Any): warning_code=d.get("warning_code", None), ) + @dataclass + class AccessRevokedWarning(ResourceMapping): + """Indicates that one of this access grant's access methods no longer grants access because of a change outside Seam, for example its card was encoded again for another credential. Seam does not replace the access method; issue a new one if the user still needs it. + + :ivar access_method_id: ID of the access method whose access was revoked. + + :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. + """ + + access_method_id: str + created_at: str + message: str + warning_code: Literal["access_revoked"] + + @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), + message=d.get("message", None), + warning_code=d.get("warning_code", None), + ) + Errors = Union[CannotCreateRequestedAccessMethodsError, AccessNotProvisionedError] _ErrorsVariants = { "cannot_create_requested_access_methods": CannotCreateRequestedAccessMethodsError, @@ -528,6 +555,7 @@ def from_dict(cls, d: Any): RequestedCodeUnavailableWarning, DeviceDoesNotSupportAccessCodesWarning, DeviceTimeConstraintsViolatedWarning, + AccessRevokedWarning, ] _WarningsVariants = { "being_deleted": BeingDeletedWarning, @@ -537,6 +565,7 @@ def from_dict(cls, d: Any): "requested_code_unavailable": RequestedCodeUnavailableWarning, "device_does_not_support_access_codes": DeviceDoesNotSupportAccessCodesWarning, "device_time_constraints_violated": DeviceTimeConstraintsViolatedWarning, + "access_revoked": AccessRevokedWarning, } access_grant_id: str diff --git a/seam/resources/unmanaged_access_code.py b/seam/resources/unmanaged_access_code.py index 84fcc942..806ce0b1 100644 --- a/seam/resources/unmanaged_access_code.py +++ b/seam/resources/unmanaged_access_code.py @@ -362,7 +362,7 @@ def from_dict(cls, d: Any): @dataclass class FailedToIssueError(ResourceMapping): - """Seam was unable to issue this access code before its start time, so the recipient may be unable to unlock the device. This usually points to a problem that needs attention, such as an offline or disconnected device. Seam keeps retrying, and this error clears automatically if the access code is eventually issued. + """Seam was unable to issue this access code before its start time, so the recipient may be unable to unlock the device. This usually points to a problem that needs attention, such as an offline or disconnected device. This error clears automatically if the access code is eventually issued. :ivar created_at: Date and time at which Seam created the error. diff --git a/seam/resources/unmanaged_access_grant.py b/seam/resources/unmanaged_access_grant.py index 41c7524c..a880aa44 100644 --- a/seam/resources/unmanaged_access_grant.py +++ b/seam/resources/unmanaged_access_grant.py @@ -496,6 +496,33 @@ def from_dict(cls, d: Any): warning_code=d.get("warning_code", None), ) + @dataclass + class AccessRevokedWarning(ResourceMapping): + """Indicates that one of this access grant's access methods no longer grants access because of a change outside Seam, for example its card was encoded again for another credential. Seam does not replace the access method; issue a new one if the user still needs it. + + :ivar access_method_id: ID of the access method whose access was revoked. + + :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. + """ + + access_method_id: str + created_at: str + message: str + warning_code: Literal["access_revoked"] + + @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), + message=d.get("message", None), + warning_code=d.get("warning_code", None), + ) + Errors = Union[CannotCreateRequestedAccessMethodsError, AccessNotProvisionedError] _ErrorsVariants = { "cannot_create_requested_access_methods": CannotCreateRequestedAccessMethodsError, @@ -518,6 +545,7 @@ def from_dict(cls, d: Any): RequestedCodeUnavailableWarning, DeviceDoesNotSupportAccessCodesWarning, DeviceTimeConstraintsViolatedWarning, + AccessRevokedWarning, ] _WarningsVariants = { "being_deleted": BeingDeletedWarning, @@ -527,6 +555,7 @@ def from_dict(cls, d: Any): "requested_code_unavailable": RequestedCodeUnavailableWarning, "device_does_not_support_access_codes": DeviceDoesNotSupportAccessCodesWarning, "device_time_constraints_violated": DeviceTimeConstraintsViolatedWarning, + "access_revoked": AccessRevokedWarning, } access_grant_id: str