From f2c3e965f486c389f9e778fd590a7020af327318 Mon Sep 17 00:00:00 2001 From: Sy Bohy Date: Mon, 23 Nov 2026 19:24:55 -0800 Subject: [PATCH 1/2] feat: Update to @seamapi/types@1.1231.0 Co-Authored-By: Claude Fable 5.1 --- 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 5994388..d31c2fc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "@seamapi/blueprint": "^1.13.4", "@seamapi/fake-seam-connect": "2.0.10", "@seamapi/smith": "^1.2.0", - "@seamapi/types": "1.1219.0", + "@seamapi/types": "1.1231.0", "change-case": "^5.4.4", "markdown-toc": "^1.2.0", "prettier": "^3.2.5" @@ -861,9 +861,9 @@ } }, "node_modules/@seamapi/types": { - "version": "1.1219.0", - "resolved": "https://registry.npmjs.org/@seamapi/types/-/types-1.1219.0.tgz", - "integrity": "sha512-Kkvyj/nx9BA+WthNZquD0Q9YatLhnHs06N1Cnieb/EsvoAx3aDZi08uNGmJ8xuYIF+EYZqKk0GdGhyZn6nrTnQ==", + "version": "1.1231.0", + "resolved": "https://registry.npmjs.org/@seamapi/types/-/types-1.1231.0.tgz", + "integrity": "sha512-TLJY/435QDNZzGVg5ALdUkV3Xs77SpnyGP1oHBES+EXW1PYaep1TxwmYFzaow4kEjPAmupuXgq9Pr4h++S/d8Q==", "dev": true, "license": "MIT", "engines": { diff --git a/package.json b/package.json index ff39ed3..9cbfb2e 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "@seamapi/blueprint": "^1.13.4", "@seamapi/fake-seam-connect": "2.0.10", "@seamapi/smith": "^1.2.0", - "@seamapi/types": "1.1219.0", + "@seamapi/types": "1.1231.0", "change-case": "^5.4.4", "markdown-toc": "^1.2.0", "prettier": "^3.2.5" From f6a2fbe240d665b1eb84f1cc5f99b2b6f5a83aa9 Mon Sep 17 00:00:00 2001 From: Seam Bot Date: Tue, 24 Nov 2026 03:25:41 +0000 Subject: [PATCH 2/2] ci: Generate code --- lib/seam/resources/access_code.rb | 24 +++- lib/seam/resources/access_grant.rb | 19 ++- lib/seam/resources/device.rb | 46 +++++++ lib/seam/resources/event.rb | 129 ++++++++++++++++++ lib/seam/resources/phone.rb | 37 +++++ lib/seam/resources/unmanaged_access_code.rb | 24 +++- lib/seam/resources/unmanaged_access_grant.rb | 19 ++- lib/seam/resources/unmanaged_device.rb | 40 ++++++ lib/seam/routes/access_methods.rb | 1 + .../routes/noise_sensors_noise_thresholds.rb | 6 + 10 files changed, 339 insertions(+), 6 deletions(-) diff --git a/lib/seam/resources/access_code.rb b/lib/seam/resources/access_code.rb index a9e4cae..79da3be 100644 --- a/lib/seam/resources/access_code.rb +++ b/lib/seam/resources/access_code.rb @@ -248,7 +248,7 @@ class FailedToUpdate < Errors date_accessor :created_at end - # This access code is still active on the device even though its `ends_at` has passed, so the recipient may still be able to unlock the device after their access window ended. Seam is attempting to delete it, and this error clears automatically once the access code is no longer active. + # Seam was unable to remove this access code from the device in time after it was deleted or its `ends_at` passed, so the recipient may still be able to unlock the device. Seam keeps trying to delete it, and this error clears automatically once the access code is no longer usable on the device. class FailedToDelete < Errors # Unique identifier of the type of error. Enables quick recognition and categorization of the issue. # @return [String] @@ -458,6 +458,24 @@ class AugustLockNotAuthorized < Errors date_accessor :created_at end + # Indicates that the lock has about one week, two days, or a critically low amount of battery life remaining. Replace the lock's batteries promptly to avoid losing access. + class LowBattery < Errors + # Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + # @return [String] + # Known values: + # - `low_battery` + attr_accessor :error_code + # Indicates that the error is a device error. + # @return [TrueClass] + attr_accessor :is_device_error + # Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + # @return [String] + attr_accessor :message + # Date and time at which Seam created the error. + # @return [Time] + date_accessor :created_at + end + # Indicates that device credentials are missing. class MissingDeviceCredentials < Errors # Unique identifier of the type of error. Enables quick recognition and categorization of the issue. @@ -557,6 +575,7 @@ class BridgeDisconnected < Errors # - `device_disconnected` # - `empty_backup_access_code_pool` # - `august_lock_not_authorized` + # - `low_battery` # - `missing_device_credentials` # - `auxiliary_heat_running` # - `subscription_required` @@ -591,6 +610,7 @@ class BridgeDisconnected < Errors "device_disconnected" => DeviceDisconnected, "empty_backup_access_code_pool" => EmptyBackupAccessCodePool, "august_lock_not_authorized" => AugustLockNotAuthorized, + "low_battery" => LowBattery, "missing_device_credentials" => MissingDeviceCredentials, "auxiliary_heat_running" => AuxiliaryHeatRunning, "subscription_required" => SubscriptionRequired, @@ -824,7 +844,7 @@ class UsingBackupAccessCode < Warnings date_accessor :created_at end - # Access code is being deleted. + # Access code is being deleted, because it was deleted or passed its `ends_at`. It can no longer be updated. class BeingDeleted < Warnings # Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. # @return [String] diff --git a/lib/seam/resources/access_grant.rb b/lib/seam/resources/access_grant.rb index 6aacea7..a65a755 100644 --- a/lib/seam/resources/access_grant.rb +++ b/lib/seam/resources/access_grant.rb @@ -301,6 +301,21 @@ class AccessRevoked < Warnings date_accessor :created_at end + # Indicates that Seam did not issue the mobile key requested for this access grant, because the user's email address or phone number belongs to other user identities and Seam cannot tell which person's app should receive it. The other requested access methods were issued. + class MobileKeyWithheld < Warnings + # Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + # @return [String] + attr_accessor :message + # Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + # @return [String] + # Known values: + # - `mobile_key_withheld` + attr_accessor :warning_code + # Date and time at which Seam created the warning. + # @return [Time] + date_accessor :created_at + end + # Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. # @return [String] attr_accessor :message @@ -315,6 +330,7 @@ class AccessRevoked < Warnings # - `device_does_not_support_access_codes` # - `device_time_constraints_violated` # - `access_revoked` + # - `mobile_key_withheld` attr_accessor :warning_code # Date and time at which Seam created the warning. # @return [Time] @@ -328,7 +344,8 @@ class AccessRevoked < Warnings "requested_code_unavailable" => RequestedCodeUnavailable, "device_does_not_support_access_codes" => DeviceDoesNotSupportAccessCodes, "device_time_constraints_violated" => DeviceTimeConstraintsViolated, - "access_revoked" => AccessRevoked + "access_revoked" => AccessRevoked, + "mobile_key_withheld" => MobileKeyWithheld }.freeze end diff --git a/lib/seam/resources/device.rb b/lib/seam/resources/device.rb index 912b5b9..8a97601 100644 --- a/lib/seam/resources/device.rb +++ b/lib/seam/resources/device.rb @@ -225,6 +225,24 @@ class AugustLockNotAuthorized < Errors date_accessor :created_at end + # Indicates that the lock has about one week, two days, or a critically low amount of battery life remaining. Replace the lock's batteries promptly to avoid losing access. + class LowBattery < Errors + # Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + # @return [String] + # Known values: + # - `low_battery` + attr_accessor :error_code + # Indicates that the error is a device error. + # @return [TrueClass] + attr_accessor :is_device_error + # Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + # @return [String] + attr_accessor :message + # Date and time at which Seam created the error. + # @return [Time] + date_accessor :created_at + end + # Indicates that device credentials are missing. class MissingDeviceCredentials < Errors # Unique identifier of the type of error. Enables quick recognition and categorization of the issue. @@ -313,6 +331,7 @@ class BridgeDisconnected < Errors # - `device_disconnected` # - `empty_backup_access_code_pool` # - `august_lock_not_authorized` + # - `low_battery` # - `missing_device_credentials` # - `auxiliary_heat_running` # - `subscription_required` @@ -336,6 +355,7 @@ class BridgeDisconnected < Errors "device_disconnected" => DeviceDisconnected, "empty_backup_access_code_pool" => EmptyBackupAccessCodePool, "august_lock_not_authorized" => AugustLockNotAuthorized, + "low_battery" => LowBattery, "missing_device_credentials" => MissingDeviceCredentials, "auxiliary_heat_running" => AuxiliaryHeatRunning, "subscription_required" => SubscriptionRequired, @@ -2555,6 +2575,21 @@ class AccessoryKeypadLowBattery < Warnings date_accessor :created_at end + # Indicates that the lock has about two weeks of battery life remaining or the provider otherwise recommends replacing the lock's batteries soon. + class BatteryReplacementRecommended < Warnings + # Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + # @return [String] + attr_accessor :message + # Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + # @return [String] + # Known values: + # - `battery_replacement_recommended` + attr_accessor :warning_code + # Date and time at which Seam created the warning. + # @return [Time] + date_accessor :created_at + end + # Indicates that the device may optimistically be reported as online because the provider does not reliably report its online status. class UnreliableOnlineStatus < Warnings # Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. @@ -2654,6 +2689,7 @@ class CloudRecordingNotEnabled < Warnings # - `keynest_unsupported_locker` # - `accessory_keypad_setup_required` # - `accessory_keypad_low_battery` + # - `battery_replacement_recommended` # - `unreliable_online_status` # - `max_access_codes_reached` # - `subscription_required_for_additional_capabilities` @@ -2691,6 +2727,7 @@ class CloudRecordingNotEnabled < Warnings "keynest_unsupported_locker" => KeynestUnsupportedLocker, "accessory_keypad_setup_required" => AccessoryKeypadSetupRequired, "accessory_keypad_low_battery" => AccessoryKeypadLowBattery, + "battery_replacement_recommended" => BatteryReplacementRecommended, "unreliable_online_status" => UnreliableOnlineStatus, "max_access_codes_reached" => MaxAccessCodesReached, "subscription_required_for_additional_capabilities" => SubscriptionRequiredForAdditionalCapabilities, @@ -2882,12 +2919,21 @@ class CloudRecordingNotEnabled < Warnings # Estimated number of occupants detected by the device. # @return [Float, nil] attr_accessor :estimated_occupant_count + # Indicates whether the device was last reported as having its casing opened or tampered with. Omitted when the provider reports no casing state, including when the device does not support casing tamper detection. This is independent of `is_detached_from_mounting_plate`. + # @return [Boolean, nil] + attr_accessor :is_casing_tampered_with + # Indicates whether the device was last reported as detached from its mounting plate. Omitted when Seam has no accepted observation, including when the device does not support mounting plate detection, reports an unknown status, or is offline. This is the last accepted provider observation, not a guarantee of current hardware state; check `is_online` before acting on it. + # @return [Boolean, nil] + attr_accessor :is_detached_from_mounting_plate # Indicates whether Seam manages the device. See also [Managed and Unmanaged Devices](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices). # @return [TrueClass] attr_accessor :is_managed # Indicates whether the device detects occupancy. # @return [Boolean, nil] attr_accessor :is_occupancy_detected + # Indicates whether the device is online. + # @return [Boolean] + attr_accessor :is_online # Indicates whether the device detects smoking, if the device measures it. # @return [Boolean, nil] attr_accessor :is_smoking_detected diff --git a/lib/seam/resources/event.rb b/lib/seam/resources/event.rb index 18acadf..d0c4c49 100644 --- a/lib/seam/resources/event.rb +++ b/lib/seam/resources/event.rb @@ -717,6 +717,134 @@ class DeviceWarnings < BaseResource date_accessor :occurred_at end + # Seam was unable to remove an [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes) from the device in time after it was deleted or its `ends_at` passed, so the recipient may still be able to unlock the device. Seam keeps trying to delete it, and the accompanying `failed_to_delete` error clears automatically once the access code is no longer usable on the device. + class AccessCodeFailedToDelete < SeamEvent + class AccessCodeErrors < BaseResource + # Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + # @return [String] + attr_accessor :error_code + # Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + # @return [String] + attr_accessor :message + # Date and time at which Seam created the error. + # @return [Time] + date_accessor :created_at + end + + class AccessCodeWarnings < BaseResource + # Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + # @return [String] + attr_accessor :message + # Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + # @return [String] + attr_accessor :warning_code + # Date and time at which Seam created the warning. + # @return [Time] + date_accessor :created_at + end + + class ConnectedAccountErrors < BaseResource + # Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + # @return [String] + attr_accessor :error_code + # Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + # @return [String] + attr_accessor :message + # Date and time at which Seam created the error. + # @return [Time] + date_accessor :created_at + end + + class ConnectedAccountWarnings < BaseResource + # Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + # @return [String] + attr_accessor :message + # Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + # @return [String] + attr_accessor :warning_code + # Date and time at which Seam created the warning. + # @return [Time] + date_accessor :created_at + end + + class DeviceErrors < BaseResource + # Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + # @return [String] + attr_accessor :error_code + # Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + # @return [String] + attr_accessor :message + # Date and time at which Seam created the error. + # @return [Time] + date_accessor :created_at + end + + class DeviceWarnings < BaseResource + # Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + # @return [String] + attr_accessor :message + # Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + # @return [String] + attr_accessor :warning_code + # Date and time at which Seam created the warning. + # @return [Time] + date_accessor :created_at + end + + # Errors associated with the access code. + # @return [Array] + resource_list_accessor :access_code_errors, AccessCodeErrors + # Warnings associated with the access code. + # @return [Array] + resource_list_accessor :access_code_warnings, AccessCodeWarnings + # Errors associated with the connected account. + # @return [Array] + resource_list_accessor :connected_account_errors, ConnectedAccountErrors + # Warnings associated with the connected account. + # @return [Array] + resource_list_accessor :connected_account_warnings, ConnectedAccountWarnings + # Errors associated with the device. + # @return [Array] + resource_list_accessor :device_errors, DeviceErrors + # Warnings associated with the device. + # @return [Array] + resource_list_accessor :device_warnings, DeviceWarnings + # ID of the affected access code. + # @return [String] + attr_accessor :access_code_id + # Custom metadata of the connected account, present when connected_account_id is provided. + # @return [Hash{String => String, Boolean}, nil] + attr_accessor :connected_account_custom_metadata + # ID of the connected account associated with the affected access code. + # @return [String] + attr_accessor :connected_account_id + # Custom metadata of the device, present when device_id is provided. + # @return [Hash{String => String, Boolean}, nil] + attr_accessor :device_custom_metadata + # ID of the device associated with the affected access code. + # @return [String] + attr_accessor :device_id + # Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + # @return [String] + attr_accessor :event_description + # ID of the event. + # @return [String] + attr_accessor :event_id + # @return [String] + # Known values: + # - `access_code.failed_to_delete` + attr_accessor :event_type + # ID of the workspace associated with the event. + # @return [String] + attr_accessor :workspace_id + # Date and time at which the event was created. + # @return [Time] + date_accessor :created_at + # Date and time at which the event occurred. + # @return [Time] + date_accessor :occurred_at + end + # An [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes) was deleted. class AccessCodeDeleted < SeamEvent # ID of the affected access code. @@ -5313,6 +5441,7 @@ class SpaceDeleted < SeamEvent "access_code.removed_from_device" => AccessCodeRemovedFromDevice, "access_code.delay_in_setting_on_device" => AccessCodeDelayInSettingOnDevice, "access_code.failed_to_set_on_device" => AccessCodeFailedToSetOnDevice, + "access_code.failed_to_delete" => AccessCodeFailedToDelete, "access_code.deleted" => AccessCodeDeleted, "access_code.delay_in_removing_from_device" => AccessCodeDelayInRemovingFromDevice, "access_code.failed_to_remove_from_device" => AccessCodeFailedToRemoveFromDevice, diff --git a/lib/seam/resources/phone.rb b/lib/seam/resources/phone.rb index 190db77..6cae6b8 100644 --- a/lib/seam/resources/phone.rb +++ b/lib/seam/resources/phone.rb @@ -198,6 +198,24 @@ class AugustLockNotAuthorized < Errors date_accessor :created_at end + # Indicates that the lock has about one week, two days, or a critically low amount of battery life remaining. Replace the lock's batteries promptly to avoid losing access. + class LowBattery < Errors + # Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + # @return [String] + # Known values: + # - `low_battery` + attr_accessor :error_code + # Indicates that the error is a device error. + # @return [TrueClass] + attr_accessor :is_device_error + # Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + # @return [String] + attr_accessor :message + # Date and time at which Seam created the error. + # @return [Time] + date_accessor :created_at + end + # Indicates that device credentials are missing. class MissingDeviceCredentials < Errors # Unique identifier of the type of error. Enables quick recognition and categorization of the issue. @@ -286,6 +304,7 @@ class BridgeDisconnected < Errors # - `device_disconnected` # - `empty_backup_access_code_pool` # - `august_lock_not_authorized` + # - `low_battery` # - `missing_device_credentials` # - `auxiliary_heat_running` # - `subscription_required` @@ -309,6 +328,7 @@ class BridgeDisconnected < Errors "device_disconnected" => DeviceDisconnected, "empty_backup_access_code_pool" => EmptyBackupAccessCodePool, "august_lock_not_authorized" => AugustLockNotAuthorized, + "low_battery" => LowBattery, "missing_device_credentials" => MissingDeviceCredentials, "auxiliary_heat_running" => AuxiliaryHeatRunning, "subscription_required" => SubscriptionRequired, @@ -756,6 +776,21 @@ class AccessoryKeypadLowBattery < Warnings date_accessor :created_at end + # Indicates that the lock has about two weeks of battery life remaining or the provider otherwise recommends replacing the lock's batteries soon. + class BatteryReplacementRecommended < Warnings + # Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + # @return [String] + attr_accessor :message + # Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + # @return [String] + # Known values: + # - `battery_replacement_recommended` + attr_accessor :warning_code + # Date and time at which Seam created the warning. + # @return [Time] + date_accessor :created_at + end + # Indicates that the device may optimistically be reported as online because the provider does not reliably report its online status. class UnreliableOnlineStatus < Warnings # Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. @@ -855,6 +890,7 @@ class CloudRecordingNotEnabled < Warnings # - `keynest_unsupported_locker` # - `accessory_keypad_setup_required` # - `accessory_keypad_low_battery` + # - `battery_replacement_recommended` # - `unreliable_online_status` # - `max_access_codes_reached` # - `subscription_required_for_additional_capabilities` @@ -892,6 +928,7 @@ class CloudRecordingNotEnabled < Warnings "keynest_unsupported_locker" => KeynestUnsupportedLocker, "accessory_keypad_setup_required" => AccessoryKeypadSetupRequired, "accessory_keypad_low_battery" => AccessoryKeypadLowBattery, + "battery_replacement_recommended" => BatteryReplacementRecommended, "unreliable_online_status" => UnreliableOnlineStatus, "max_access_codes_reached" => MaxAccessCodesReached, "subscription_required_for_additional_capabilities" => SubscriptionRequiredForAdditionalCapabilities, diff --git a/lib/seam/resources/unmanaged_access_code.rb b/lib/seam/resources/unmanaged_access_code.rb index e562dc0..49d8478 100644 --- a/lib/seam/resources/unmanaged_access_code.rb +++ b/lib/seam/resources/unmanaged_access_code.rb @@ -250,7 +250,7 @@ class FailedToUpdate < Errors date_accessor :created_at end - # This access code is still active on the device even though its `ends_at` has passed, so the recipient may still be able to unlock the device after their access window ended. Seam is attempting to delete it, and this error clears automatically once the access code is no longer active. + # Seam was unable to remove this access code from the device in time after it was deleted or its `ends_at` passed, so the recipient may still be able to unlock the device. Seam keeps trying to delete it, and this error clears automatically once the access code is no longer usable on the device. class FailedToDelete < Errors # Unique identifier of the type of error. Enables quick recognition and categorization of the issue. # @return [String] @@ -460,6 +460,24 @@ class AugustLockNotAuthorized < Errors date_accessor :created_at end + # Indicates that the lock has about one week, two days, or a critically low amount of battery life remaining. Replace the lock's batteries promptly to avoid losing access. + class LowBattery < Errors + # Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + # @return [String] + # Known values: + # - `low_battery` + attr_accessor :error_code + # Indicates that the error is a device error. + # @return [TrueClass] + attr_accessor :is_device_error + # Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + # @return [String] + attr_accessor :message + # Date and time at which Seam created the error. + # @return [Time] + date_accessor :created_at + end + # Indicates that device credentials are missing. class MissingDeviceCredentials < Errors # Unique identifier of the type of error. Enables quick recognition and categorization of the issue. @@ -559,6 +577,7 @@ class BridgeDisconnected < Errors # - `device_disconnected` # - `empty_backup_access_code_pool` # - `august_lock_not_authorized` + # - `low_battery` # - `missing_device_credentials` # - `auxiliary_heat_running` # - `subscription_required` @@ -593,6 +612,7 @@ class BridgeDisconnected < Errors "device_disconnected" => DeviceDisconnected, "empty_backup_access_code_pool" => EmptyBackupAccessCodePool, "august_lock_not_authorized" => AugustLockNotAuthorized, + "low_battery" => LowBattery, "missing_device_credentials" => MissingDeviceCredentials, "auxiliary_heat_running" => AuxiliaryHeatRunning, "subscription_required" => SubscriptionRequired, @@ -773,7 +793,7 @@ class UsingBackupAccessCode < Warnings date_accessor :created_at end - # Access code is being deleted. + # Access code is being deleted, because it was deleted or passed its `ends_at`. It can no longer be updated. class BeingDeleted < Warnings # Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. # @return [String] diff --git a/lib/seam/resources/unmanaged_access_grant.rb b/lib/seam/resources/unmanaged_access_grant.rb index 4917121..1b54df1 100644 --- a/lib/seam/resources/unmanaged_access_grant.rb +++ b/lib/seam/resources/unmanaged_access_grant.rb @@ -301,6 +301,21 @@ class AccessRevoked < Warnings date_accessor :created_at end + # Indicates that Seam did not issue the mobile key requested for this access grant, because the user's email address or phone number belongs to other user identities and Seam cannot tell which person's app should receive it. The other requested access methods were issued. + class MobileKeyWithheld < Warnings + # Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + # @return [String] + attr_accessor :message + # Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + # @return [String] + # Known values: + # - `mobile_key_withheld` + attr_accessor :warning_code + # Date and time at which Seam created the warning. + # @return [Time] + date_accessor :created_at + end + # Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. # @return [String] attr_accessor :message @@ -315,6 +330,7 @@ class AccessRevoked < Warnings # - `device_does_not_support_access_codes` # - `device_time_constraints_violated` # - `access_revoked` + # - `mobile_key_withheld` attr_accessor :warning_code # Date and time at which Seam created the warning. # @return [Time] @@ -328,7 +344,8 @@ class AccessRevoked < Warnings "requested_code_unavailable" => RequestedCodeUnavailable, "device_does_not_support_access_codes" => DeviceDoesNotSupportAccessCodes, "device_time_constraints_violated" => DeviceTimeConstraintsViolated, - "access_revoked" => AccessRevoked + "access_revoked" => AccessRevoked, + "mobile_key_withheld" => MobileKeyWithheld }.freeze end diff --git a/lib/seam/resources/unmanaged_device.rb b/lib/seam/resources/unmanaged_device.rb index 9bface3..598cafb 100644 --- a/lib/seam/resources/unmanaged_device.rb +++ b/lib/seam/resources/unmanaged_device.rb @@ -198,6 +198,24 @@ class AugustLockNotAuthorized < Errors date_accessor :created_at end + # Indicates that the lock has about one week, two days, or a critically low amount of battery life remaining. Replace the lock's batteries promptly to avoid losing access. + class LowBattery < Errors + # Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + # @return [String] + # Known values: + # - `low_battery` + attr_accessor :error_code + # Indicates that the error is a device error. + # @return [TrueClass] + attr_accessor :is_device_error + # Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + # @return [String] + attr_accessor :message + # Date and time at which Seam created the error. + # @return [Time] + date_accessor :created_at + end + # Indicates that device credentials are missing. class MissingDeviceCredentials < Errors # Unique identifier of the type of error. Enables quick recognition and categorization of the issue. @@ -286,6 +304,7 @@ class BridgeDisconnected < Errors # - `device_disconnected` # - `empty_backup_access_code_pool` # - `august_lock_not_authorized` + # - `low_battery` # - `missing_device_credentials` # - `auxiliary_heat_running` # - `subscription_required` @@ -309,6 +328,7 @@ class BridgeDisconnected < Errors "device_disconnected" => DeviceDisconnected, "empty_backup_access_code_pool" => EmptyBackupAccessCodePool, "august_lock_not_authorized" => AugustLockNotAuthorized, + "low_battery" => LowBattery, "missing_device_credentials" => MissingDeviceCredentials, "auxiliary_heat_running" => AuxiliaryHeatRunning, "subscription_required" => SubscriptionRequired, @@ -809,6 +829,21 @@ class AccessoryKeypadLowBattery < Warnings date_accessor :created_at end + # Indicates that the lock has about two weeks of battery life remaining or the provider otherwise recommends replacing the lock's batteries soon. + class BatteryReplacementRecommended < Warnings + # Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + # @return [String] + attr_accessor :message + # Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + # @return [String] + # Known values: + # - `battery_replacement_recommended` + attr_accessor :warning_code + # Date and time at which Seam created the warning. + # @return [Time] + date_accessor :created_at + end + # Indicates that the device may optimistically be reported as online because the provider does not reliably report its online status. class UnreliableOnlineStatus < Warnings # Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. @@ -908,6 +943,7 @@ class CloudRecordingNotEnabled < Warnings # - `keynest_unsupported_locker` # - `accessory_keypad_setup_required` # - `accessory_keypad_low_battery` + # - `battery_replacement_recommended` # - `unreliable_online_status` # - `max_access_codes_reached` # - `subscription_required_for_additional_capabilities` @@ -945,6 +981,7 @@ class CloudRecordingNotEnabled < Warnings "keynest_unsupported_locker" => KeynestUnsupportedLocker, "accessory_keypad_setup_required" => AccessoryKeypadSetupRequired, "accessory_keypad_low_battery" => AccessoryKeypadLowBattery, + "battery_replacement_recommended" => BatteryReplacementRecommended, "unreliable_online_status" => UnreliableOnlineStatus, "max_access_codes_reached" => MaxAccessCodesReached, "subscription_required_for_additional_capabilities" => SubscriptionRequiredForAdditionalCapabilities, @@ -1118,6 +1155,9 @@ class CloudRecordingNotEnabled < Warnings # Indicates that Seam does not manage the device. # @return [FalseClass] attr_accessor :is_managed + # Indicates whether the device is online. + # @return [Boolean] + attr_accessor :is_online # Unique identifier for the Seam workspace associated with the device. # @return [String] attr_accessor :workspace_id diff --git a/lib/seam/routes/access_methods.rb b/lib/seam/routes/access_methods.rb index 2e427f7..a2d69a2 100644 --- a/lib/seam/routes/access_methods.rb +++ b/lib/seam/routes/access_methods.rb @@ -31,6 +31,7 @@ def assign_card(access_method_id:, card_number:, wait_for_action_attempt: nil) # @param access_method_id [String, nil] ID of access method to delete. # @param reservation_key [String, nil] Reservation key of the access grant whose access methods should be deleted. # @return [nil] OK + # @deprecated Access methods are managed by their access grant. Some workflows still need this endpoint today; access grant routes will replace it for them soon. def delete(access_grant_id: nil, access_method_id: nil, reservation_key: nil) Seam::RequestParameters.require_at_least_one( "/access_methods/delete", diff --git a/lib/seam/routes/noise_sensors_noise_thresholds.rb b/lib/seam/routes/noise_sensors_noise_thresholds.rb index bd6281d..6ef49a6 100644 --- a/lib/seam/routes/noise_sensors_noise_thresholds.rb +++ b/lib/seam/routes/noise_sensors_noise_thresholds.rb @@ -9,6 +9,8 @@ def initialize(client:, defaults:) end # Creates a new [noise threshold](https://www.seam.co/docs/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://www.seam.co/docs/capability-guides/noise-sensors). Thresholds represent the limits of noise tolerated at a property, which can be customized for each hour of the day. Each device has its own default thresholds, but you can use the Seam API to modify them. + # + # For Minut sensors, Seam does not change thresholds that Minut manages through a noise preset, which can be shared across homes. If the home of the sensor is assigned a noise preset, the request fails with a `noise_threshold_managed_by_noise_profile` error; edit the noise preset in the Minut app instead. If Seam cannot check which noise preset applies to the home of the sensor, the request fails with a `noise_profile_assignment_unverified` error and nothing is changed; try again. # @param device_id [String] ID of the device for which you want to create a noise threshold. # @param ends_daily_at [String] Time at which the new noise threshold should become inactive daily. # @param starts_daily_at [String] Time at which the new noise threshold should become active daily. @@ -23,6 +25,8 @@ def create(device_id:, ends_daily_at:, starts_daily_at:, name: nil, noise_thresh end # Deletes a [noise threshold](https://www.seam.co/docs/capability-guides/noise-sensors/configure-noise-threshold-settings) from a [noise sensor](https://www.seam.co/docs/capability-guides/noise-sensors). + # + # For Minut sensors, Seam does not change thresholds that Minut manages through a noise preset, which can be shared across homes. If the home of the sensor is assigned a noise preset, the action attempt ends with a `noise_threshold_managed_by_noise_profile` error; edit the noise preset in the Minut app instead. If Seam cannot check which noise preset applies to the home of the sensor, the action attempt ends with a `noise_profile_assignment_unverified` error and nothing is changed; try again. # @param device_id [String] ID of the device that contains the noise threshold that you want to delete. # @param noise_threshold_id [String] ID of the noise threshold that you want to delete. # @return [nil] OK @@ -51,6 +55,8 @@ def list(device_id:) end # Updates a [noise threshold](https://www.seam.co/docs/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://www.seam.co/docs/capability-guides/noise-sensors). + # + # For Minut sensors, Seam does not change thresholds that Minut manages through a noise preset, which can be shared across homes. If the home of the sensor is assigned a noise preset, the action attempt ends with a `noise_threshold_managed_by_noise_profile` error; edit the noise preset in the Minut app instead. If Seam cannot check which noise preset applies to the home of the sensor, the action attempt ends with a `noise_profile_assignment_unverified` error and nothing is changed; try again. # @param device_id [String] ID of the device that contains the noise threshold that you want to update. # @param noise_threshold_id [String] ID of the noise threshold that you want to update. # @param ends_daily_at [String, nil] Time at which the noise threshold should become inactive daily.