diff --git a/package-lock.json b/package-lock.json index ea6c8aa3..9d261361 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.1123.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.1123.0", + "resolved": "https://registry.npmjs.org/@seamapi/types/-/types-1.1123.0.tgz", + "integrity": "sha512-hPm/CZuvw4HzvahhAMFe+krDUkJub9z1QOtLXWm0FqTn2i7J8FiH2y8I7dFBjIa4LUURY0Kc5uWB3hF7CVbMNQ==", "dev": true, "license": "MIT", "engines": { diff --git a/package.json b/package.json index d5af60ce..19053c4c 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.1123.0", "change-case": "^5.4.4", "prettier": "^3.2.5" } 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..c0cc0139 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 diff --git a/seam/resources/device.py b/seam/resources/device.py index 0c0ecc34..db6c85a0 100644 --- a/seam/resources/device.py +++ b/seam/resources/device.py @@ -2191,7 +2191,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.""" 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