From 497d76967946dad673290178016e8a8d2b9e67ed Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 12 Oct 2026 19:26:46 +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.1100.0 to 1.1112.0 - [Release notes](https://github.com/seamapi/types/releases) - [Commits](https://github.com/seamapi/types/compare/v1.1100.0...v1.1112.0) --- updated-dependencies: - dependency-name: "@seamapi/types" dependency-version: 1.1112.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 2bbb8df..2c589e8 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.1100.0", + "@seamapi/types": "1.1112.0", "change-case": "^5.4.4", "markdown-toc": "^1.2.0", "prettier": "^3.2.5" @@ -864,9 +864,9 @@ } }, "node_modules/@seamapi/types": { - "version": "1.1100.0", - "resolved": "https://registry.npmjs.org/@seamapi/types/-/types-1.1100.0.tgz", - "integrity": "sha512-syQWT7HOR5T24hzSAXpcFvWzRUrn+PuObNhiN2xvfxGJUseUvhB0LQGfI7mJY0lxWdBazYJEXLf8M3cqYW7K8g==", + "version": "1.1112.0", + "resolved": "https://registry.npmjs.org/@seamapi/types/-/types-1.1112.0.tgz", + "integrity": "sha512-+hUxlBQNp6EggFS0uAfPWs+ET2D+f//f0R9qvZ6X1jnsLqpRi+TUicZBRCJ1O7ykaH3C95xKjjjY+/Q9NmWwsg==", "dev": true, "license": "MIT", "engines": { diff --git a/package.json b/package.json index 8e9cfdd..a1b5a3f 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.1100.0", + "@seamapi/types": "1.1112.0", "change-case": "^5.4.4", "markdown-toc": "^1.2.0", "prettier": "^3.2.5" From c6ef1c1f26b95e3c46b350a4aa9d8f17452fa003 Mon Sep 17 00:00:00 2001 From: Seam Bot Date: Mon, 12 Oct 2026 19:27:46 +0000 Subject: [PATCH 2/2] ci: Generate code --- lib/seam/resources/access_grant.rb | 4 +- lib/seam/resources/access_method.rb | 2 +- lib/seam/resources/acs_entrance.rb | 22 + lib/seam/resources/acs_system.rb | 17 + lib/seam/resources/action_attempt.rb | 225 ++++- lib/seam/resources/connect_webview.rb | 1 + lib/seam/resources/connected_account.rb | 1 + lib/seam/resources/device.rb | 97 +++ lib/seam/resources/device_provider.rb | 13 + lib/seam/resources/phone.rb | 799 +++++++++++++++++- lib/seam/resources/unmanaged_access_grant.rb | 4 +- lib/seam/resources/unmanaged_access_method.rb | 2 +- lib/seam/resources/unmanaged_device.rb | 13 + lib/seam/routes/customers.rb | 6 +- 14 files changed, 1190 insertions(+), 16 deletions(-) diff --git a/lib/seam/resources/access_grant.rb b/lib/seam/resources/access_grant.rb index c45370e..1c8691b 100644 --- a/lib/seam/resources/access_grant.rb +++ b/lib/seam/resources/access_grant.rb @@ -169,8 +169,10 @@ class FailedDevices < BaseResource # Device whose access code could not be revoked. # @return [String] attr_accessor :device_id - # Reason the access code could not be revoked (e.g. `offline_access_code_not_revocable`). + # Reason the access code could not be revoked. # @return [String] + # Known values: + # - `offline_access_code_not_revocable` attr_accessor :error_code # Human-readable description of why revocation failed. # @return [String] diff --git a/lib/seam/resources/access_method.rb b/lib/seam/resources/access_method.rb index f3e5d04..ce4ef89 100644 --- a/lib/seam/resources/access_method.rb +++ b/lib/seam/resources/access_method.rb @@ -258,7 +258,7 @@ class UserIdentityMissingPhoneNumber < Warnings # Indicates whether the access method is ready for card assignment. This is true when the access method is in card mode, has not yet been issued, and the system supports credential assignment. # @return [Boolean, nil] attr_accessor :is_ready_for_assignment - # Indicates whether the access method is ready to be encoded. This is true when the credential has been created and the card has not yet been issued. + # Indicates whether the access method is ready to be encoded. This is true when the card has not yet been issued and the access system has received all the access the card needs. While it is false, `pending_mutations` contains `waiting_for_access_on_acs_system`. # @return [Boolean, nil] attr_accessor :is_ready_for_encoding # Access method mode. Supported values: `code`, `card`, `mobile_key`, `cloud_key`. diff --git a/lib/seam/resources/acs_entrance.rb b/lib/seam/resources/acs_entrance.rb index a43727e..e6e80c2 100644 --- a/lib/seam/resources/acs_entrance.rb +++ b/lib/seam/resources/acs_entrance.rb @@ -101,9 +101,27 @@ class DormakabaCommunityMetadata < BaseResource attr_accessor :access_point_profile end + # Known `error_code` values load as subclasses; unknown values remain Errors instances for forward compatibility. class Errors < BaseResource + # Indicates that the [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details) was removed from the connected account, so Seam can no longer sync it. + class EntranceRemoved < Errors + # Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + # @return [String] + # Known values: + # - `entrance_removed` + 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 + # Unique identifier of the type of error. Enables quick recognition and categorization of the issue. # @return [String] + # Known values: + # - `entrance_removed` attr_accessor :error_code # Detailed description of the error. Provides insights into the issue and potentially how to rectify it. # @return [String] @@ -111,6 +129,10 @@ class Errors < BaseResource # Date and time at which Seam created the error. # @return [Time] date_accessor :created_at + + discriminated_by :error_code, { + "entrance_removed" => EntranceRemoved + }.freeze end class HotekMetadata < BaseResource diff --git a/lib/seam/resources/acs_system.rb b/lib/seam/resources/acs_system.rb index ad13b30..6a7f4eb 100644 --- a/lib/seam/resources/acs_system.rb +++ b/lib/seam/resources/acs_system.rb @@ -78,6 +78,21 @@ class SaltoKsSubscriptionLimitExceeded < Errors date_accessor :created_at end + # Indicates that the access control system has reached the maximum number of users its license allows, so Seam cannot create new users on it and access for new guests is not provisioned. Remove unused users from the access control system or increase its license. The error clears once Seam can create users again. + class UserLicenseLimitReached < Errors + # Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + # @return [String] + # Known values: + # - `user_license_limit_reached` + 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 + # Indicates that the provider's system backing this [access control system](https://www.seam.co/docs/low-level-apis/access-systems) is not letting Seam act on it, so access cannot be managed until this is resolved. The error message says which of two causes applies. Either Seam's integration user does not have sufficient permissions on the provider's system, or has been suspended there: grant the integration user the required permissions in the provider's system, or reauthorize the connected account in Seam. Or the provider account or site does not have a valid subscription with the provider: set up or renew that subscription with the provider. class InsufficientPermissions < Errors # Unique identifier of the type of error. Enables quick recognition and categorization of the issue. @@ -160,6 +175,7 @@ class ProviderServiceUnavailable < Errors # - `bridge_disconnected` # - `visionline_instance_unreachable` # - `salto_ks_subscription_limit_exceeded` + # - `user_license_limit_reached` # - `insufficient_permissions` # - `acs_system_disconnected` # - `account_disconnected` @@ -178,6 +194,7 @@ class ProviderServiceUnavailable < Errors "bridge_disconnected" => BridgeDisconnected, "visionline_instance_unreachable" => VisionlineInstanceUnreachable, "salto_ks_subscription_limit_exceeded" => SaltoKsSubscriptionLimitExceeded, + "user_license_limit_reached" => UserLicenseLimitReached, "insufficient_permissions" => InsufficientPermissions, "acs_system_disconnected" => AcsSystemDisconnected, "account_disconnected" => AccountDisconnected, diff --git a/lib/seam/resources/action_attempt.rb b/lib/seam/resources/action_attempt.rb index 4b70c7f..875776e 100644 --- a/lib/seam/resources/action_attempt.rb +++ b/lib/seam/resources/action_attempt.rb @@ -974,20 +974,21 @@ class To < BaseResource end # Previous access time configuration. - # @return [From] + # @return [From, nil] resource_accessor :from, From # New access time configuration. - # @return [To] + # @return [To, nil] resource_accessor :to, To # Detailed description of the mutation. # @return [String] attr_accessor :message - # Mutation code to indicate that Seam is in the process of updating the access times for this access method. + # Mutation code to indicate that the access system has not yet received all the access this card needs, so the card is not ready to be encoded. # @return [String] # Known values: # - `provisioning_access` # - `revoking_access` # - `updating_access_times` + # - `waiting_for_access_on_acs_system` attr_accessor :mutation_code # Date and time at which the mutation was created. # @return [Time] @@ -1058,7 +1059,7 @@ class Warnings < BaseResource # Indicates whether the access method is ready for card assignment. This is true when the access method is in card mode, has not yet been issued, and the system supports credential assignment. # @return [Boolean, nil] attr_accessor :is_ready_for_assignment - # Indicates whether the access method is ready to be encoded. This is true when the credential has been created and the card has not yet been issued. + # Indicates whether the access method is ready to be encoded. This is true when the card has not yet been issued and the access system has received all the access the card needs. While it is false, `pending_mutations` contains `waiting_for_access_on_acs_system`. # @return [Boolean, nil] attr_accessor :is_ready_for_encoding # Access method mode. Supported values: `code`, `card`, `mobile_key`, `cloud_key`. @@ -1505,6 +1506,212 @@ class Result < BaseResource attr_accessor :status end + # Setting the speaker volume is pending. + class SetSpeakerVolume < ActionAttempt + class Error < BaseResource + # Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + # @return [String] + attr_accessor :message + # Type of the error. + # @return [String] + attr_accessor :type + end + + class Result < BaseResource + end + + # Error associated with the action. + # @return [Error, nil] + # Only present when `status` is `error`; `nil` otherwise. + resource_accessor :error, Error + available_only_for_statuses :error, ["error"] + # Result of the action. + # @return [Result, nil] + # Only present when `status` is `success`; `nil` otherwise. + resource_accessor :result, Result + available_only_for_statuses :result, ["success"] + # ID of the action attempt. + # @return [String] + attr_accessor :action_attempt_id + # Action attempt to track the status of setting the volume on a speaker. + # @return [String] + # Known values: + # - `SET_SPEAKER_VOLUME` + attr_accessor :action_type + # @return [String] + # Known values: + # - `success` + # - `pending` + # - `error` + attr_accessor :status + end + + # Muting or unmuting the speaker is pending. + class SetSpeakerMute < ActionAttempt + class Error < BaseResource + # Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + # @return [String] + attr_accessor :message + # Type of the error. + # @return [String] + attr_accessor :type + end + + class Result < BaseResource + end + + # Error associated with the action. + # @return [Error, nil] + # Only present when `status` is `error`; `nil` otherwise. + resource_accessor :error, Error + available_only_for_statuses :error, ["error"] + # Result of the action. + # @return [Result, nil] + # Only present when `status` is `success`; `nil` otherwise. + resource_accessor :result, Result + available_only_for_statuses :result, ["success"] + # ID of the action attempt. + # @return [String] + attr_accessor :action_attempt_id + # Action attempt to track the status of muting or unmuting a speaker. + # @return [String] + # Known values: + # - `SET_SPEAKER_MUTE` + attr_accessor :action_type + # @return [String] + # Known values: + # - `success` + # - `pending` + # - `error` + attr_accessor :status + end + + # Pausing playback on the speaker is pending. + class PauseSpeakerPlayback < ActionAttempt + class Error < BaseResource + # Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + # @return [String] + attr_accessor :message + # Type of the error. + # @return [String] + attr_accessor :type + end + + class Result < BaseResource + # IDs of the speakers whose playback was paused, including speakers grouped with the requested speaker. + # @return [Array] + attr_accessor :affected_device_ids + end + + # Error associated with the action. + # @return [Error, nil] + # Only present when `status` is `error`; `nil` otherwise. + resource_accessor :error, Error + available_only_for_statuses :error, ["error"] + # Result of the action. + # @return [Result, nil] + # Only present when `status` is `success`; `nil` otherwise. + resource_accessor :result, Result + available_only_for_statuses :result, ["success"] + # ID of the action attempt. + # @return [String] + attr_accessor :action_attempt_id + # Action attempt to track the status of pausing playback on a speaker. + # @return [String] + # Known values: + # - `PAUSE_SPEAKER_PLAYBACK` + attr_accessor :action_type + # @return [String] + # Known values: + # - `success` + # - `pending` + # - `error` + attr_accessor :status + end + + # Resuming playback on the speaker is pending. + class ResumeSpeakerPlayback < ActionAttempt + class Error < BaseResource + # Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + # @return [String] + attr_accessor :message + # Type of the error. + # @return [String] + attr_accessor :type + end + + class Result < BaseResource + # IDs of the speakers whose playback was resumed, including speakers grouped with the requested speaker. + # @return [Array] + attr_accessor :affected_device_ids + end + + # Error associated with the action. + # @return [Error, nil] + # Only present when `status` is `error`; `nil` otherwise. + resource_accessor :error, Error + available_only_for_statuses :error, ["error"] + # Result of the action. + # @return [Result, nil] + # Only present when `status` is `success`; `nil` otherwise. + resource_accessor :result, Result + available_only_for_statuses :result, ["success"] + # ID of the action attempt. + # @return [String] + attr_accessor :action_attempt_id + # Action attempt to track the status of resuming playback on a speaker. + # @return [String] + # Known values: + # - `RESUME_SPEAKER_PLAYBACK` + attr_accessor :action_type + # @return [String] + # Known values: + # - `success` + # - `pending` + # - `error` + attr_accessor :status + end + + # Playing a chime on the speaker is pending. + class PlaySpeakerChime < ActionAttempt + class Error < BaseResource + # Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + # @return [String] + attr_accessor :message + # Type of the error. + # @return [String] + attr_accessor :type + end + + class Result < BaseResource + end + + # Error associated with the action. + # @return [Error, nil] + # Only present when `status` is `error`; `nil` otherwise. + resource_accessor :error, Error + available_only_for_statuses :error, ["error"] + # Result of the action. + # @return [Result, nil] + # Only present when `status` is `success`; `nil` otherwise. + resource_accessor :result, Result + available_only_for_statuses :result, ["success"] + # ID of the action attempt. + # @return [String] + attr_accessor :action_attempt_id + # Action attempt to track the status of playing a chime on a speaker. + # @return [String] + # Known values: + # - `PLAY_SPEAKER_CHIME` + attr_accessor :action_type + # @return [String] + # Known values: + # - `success` + # - `pending` + # - `error` + attr_accessor :status + end + class SyncAccessCodes < ActionAttempt class Error < BaseResource # Detailed description of the error. Provides insights into the issue and potentially how to rectify it. @@ -1819,6 +2026,11 @@ class Result < BaseResource # - `PUSH_THERMOSTAT_PROGRAMS` # - `CONFIGURE_AUTO_LOCK` # - `CONVERT_ACCESS_CODE_TO_MANAGED` + # - `SET_SPEAKER_VOLUME` + # - `SET_SPEAKER_MUTE` + # - `PAUSE_SPEAKER_PLAYBACK` + # - `RESUME_SPEAKER_PLAYBACK` + # - `PLAY_SPEAKER_CHIME` # - `SYNC_ACCESS_CODES` # - `CREATE_ACCESS_CODE` # - `DELETE_ACCESS_CODE` @@ -1851,6 +2063,11 @@ class Result < BaseResource "PUSH_THERMOSTAT_PROGRAMS" => PushThermostatPrograms, "CONFIGURE_AUTO_LOCK" => ConfigureAutoLock, "CONVERT_ACCESS_CODE_TO_MANAGED" => ConvertAccessCodeToManaged, + "SET_SPEAKER_VOLUME" => SetSpeakerVolume, + "SET_SPEAKER_MUTE" => SetSpeakerMute, + "PAUSE_SPEAKER_PLAYBACK" => PauseSpeakerPlayback, + "RESUME_SPEAKER_PLAYBACK" => ResumeSpeakerPlayback, + "PLAY_SPEAKER_CHIME" => PlaySpeakerChime, "SYNC_ACCESS_CODES" => SyncAccessCodes, "CREATE_ACCESS_CODE" => CreateAccessCode, "DELETE_ACCESS_CODE" => DeleteAccessCode, diff --git a/lib/seam/resources/connect_webview.rb b/lib/seam/resources/connect_webview.rb index ed80f47..672874e 100644 --- a/lib/seam/resources/connect_webview.rb +++ b/lib/seam/resources/connect_webview.rb @@ -22,6 +22,7 @@ class ConnectWebview < BaseResource # - `noise_sensor` # - `access_control` # - `camera` + # - `speaker` attr_accessor :accepted_capabilities # List of accepted [provider keys](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-brands-to-display-in-your-connect-webviews). # @return [Array] diff --git a/lib/seam/resources/connected_account.rb b/lib/seam/resources/connected_account.rb index e76ff63..5723dfc 100644 --- a/lib/seam/resources/connected_account.rb +++ b/lib/seam/resources/connected_account.rb @@ -355,6 +355,7 @@ class DormakabaSitesUnapproved < Warnings # - `noise_sensor` # - `access_control` # - `camera` + # - `speaker` attr_accessor :accepted_capabilities # Type of connected account. # @return [String, nil] diff --git a/lib/seam/resources/device.rb b/lib/seam/resources/device.rb index f62f043..dc5580c 100644 --- a/lib/seam/resources/device.rb +++ b/lib/seam/resources/device.rb @@ -1158,6 +1158,30 @@ class SmartthingsMetadata < BaseResource attr_accessor :model end + class SonosMetadata < BaseResource + # Models of the speakers bonded to this speaker, such as surrounds or a subwoofer. + # @return [Array] + attr_accessor :bonded_member_models + # Color of the speaker, as reported by Sonos. + # @return [String, nil] + attr_accessor :color + # ID of the Sonos household that the speaker belongs to. + # @return [String, nil] + attr_accessor :household_id + # Model name of the speaker, as reported by Sonos. + # @return [String, nil] + attr_accessor :model_display_name + # ID of the Sonos player for the speaker. + # @return [String, nil] + attr_accessor :player_id + # Name of the speaker, as set in the Sonos app. + # @return [String, nil] + attr_accessor :player_name + # Software version running on the speaker. + # @return [String, nil] + attr_accessor :software_version + end + class TadoMetadata < BaseResource # Device type for a tado° device. # @return [String, nil] @@ -1442,6 +1466,60 @@ class TimePairs < BaseResource attr_accessor :time_zone end + class Speaker < BaseResource + class NowPlaying < BaseResource + # Album of the content that is currently playing. + # @return [String, nil] + attr_accessor :album + # Artist of the content that is currently playing. + # @return [String, nil] + attr_accessor :artist + # Title of the content that is currently playing. + # @return [String, nil] + attr_accessor :title + end + + # Content that is currently playing on the speaker. + # @return [NowPlaying, nil] + resource_accessor :now_playing, NowPlaying + # 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. + # @return [Array] + attr_accessor :grouped_with_device_ids + # 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. + # @return [Boolean] + attr_accessor :has_fixed_volume + # Indicates whether the speaker is muted. + # @return [Boolean] + attr_accessor :is_muted + # 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. + # @return [Float] + attr_accessor :max_volume + # Minimum volume that you can set on the speaker. + # @return [Float] + attr_accessor :min_volume + # Playback state of the speaker. + # @return [String] + # Known values: + # - `playing` + # - `paused` + # - `idle` + # - `buffering` + # - `unknown` + attr_accessor :playback_state + # Indicates whether the speaker can play a chime. + # @return [Boolean] + attr_accessor :supports_chime + # 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. + # @return [Float] + attr_accessor :volume + # Increment between the volume values that you can set on the speaker. + # @return [Float] + attr_accessor :volume_step + # Date and time at which the speaker first reported its current volume. + # @return [Time, nil] + date_accessor :volume_reported_at + end + class ActiveThermostatSchedule < BaseResource class Errors < BaseResource # Unique identifier of the type of error. Enables quick recognition and categorization of the issue. @@ -1925,6 +2003,9 @@ class ThermostatWeeklyProgram < BaseResource # Metadata for a SmartThings device. # @return [SmartthingsMetadata, nil] resource_accessor :smartthings_metadata, SmartthingsMetadata + # Metadata for a Sonos speaker. + # @return [SonosMetadata, nil] + resource_accessor :sonos_metadata, SonosMetadata # Metadata for a tado° device. # @return [TadoMetadata, nil] resource_accessor :tado_metadata, TadoMetadata @@ -1955,6 +2036,9 @@ class ThermostatWeeklyProgram < BaseResource # Keypad battery status. # @return [KeypadBattery, nil] resource_accessor :keypad_battery, KeypadBattery + # Audio state and capabilities of the speaker. + # @return [Speaker, nil] + resource_accessor :speaker, Speaker # Active [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules). # @return [ActiveThermostatSchedule, nil] resource_accessor :active_thermostat_schedule, ActiveThermostatSchedule @@ -2689,6 +2773,15 @@ class MaxAccessCodesReached < Warnings # Indicates whether the thermostat supports simultaneous heating and cooling. # @return [Boolean, nil] attr_accessor :can_hvac_heat_cool + # Indicates whether the speaker supports muting and unmuting. + # @return [Boolean, nil] + attr_accessor :can_mute_speaker + # Indicates whether the speaker supports pausing and resuming playback. + # @return [Boolean, nil] + attr_accessor :can_pause_speaker_playback + # Indicates whether the speaker supports playing a chime. + # @return [Boolean, nil] + attr_accessor :can_play_speaker_chime # Indicates whether the device supports programming offline access codes. # @return [Boolean, nil] attr_accessor :can_program_offline_access_codes @@ -2713,6 +2806,9 @@ class MaxAccessCodesReached < Warnings # Indicates whether the thermostat supports running climate programs. # @return [Boolean, nil] attr_accessor :can_run_thermostat_programs + # Indicates whether the speaker supports setting its volume. + # @return [Boolean, nil] + attr_accessor :can_set_speaker_volume # Indicates whether the device supports simulating connection in a sandbox. # @return [Boolean, nil] attr_accessor :can_simulate_connection @@ -2808,6 +2904,7 @@ class MaxAccessCodesReached < Warnings # - `tapo_camera` # - `arlo_camera` # - `reolink_camera` + # - `sonos_speaker` attr_accessor :device_type # Display name of the device, defaults to nickname (if it is set) or `properties.appearance.name`, otherwise. Enables administrators and users to identify the device easily, especially when there are numerous devices. # @return [String] diff --git a/lib/seam/resources/device_provider.rb b/lib/seam/resources/device_provider.rb index 52788f5..9c0ac73 100644 --- a/lib/seam/resources/device_provider.rb +++ b/lib/seam/resources/device_provider.rb @@ -18,6 +18,15 @@ class DeviceProvider < BaseResource # Indicates whether the thermostat supports simultaneous heating and cooling. # @return [Boolean, nil] attr_accessor :can_hvac_heat_cool + # Indicates whether the speaker supports muting and unmuting. + # @return [Boolean, nil] + attr_accessor :can_mute_speaker + # Indicates whether the speaker supports pausing and resuming playback. + # @return [Boolean, nil] + attr_accessor :can_pause_speaker_playback + # Indicates whether the speaker supports playing a chime. + # @return [Boolean, nil] + attr_accessor :can_play_speaker_chime # Indicates whether the device supports programming offline access codes. # @return [Boolean, nil] attr_accessor :can_program_offline_access_codes @@ -42,6 +51,9 @@ class DeviceProvider < BaseResource # Indicates whether the thermostat supports running climate programs. # @return [Boolean, nil] attr_accessor :can_run_thermostat_programs + # Indicates whether the speaker supports setting its volume. + # @return [Boolean, nil] + attr_accessor :can_set_speaker_volume # Indicates whether the device supports simulating connection in a sandbox. # @return [Boolean, nil] attr_accessor :can_simulate_connection @@ -140,6 +152,7 @@ class DeviceProvider < BaseResource # - `omnitec` # - `kisi` # - `aqara` + # - `sonos` attr_accessor :device_provider_name # Display name for the device provider. # @return [String] diff --git a/lib/seam/resources/phone.rb b/lib/seam/resources/phone.rb index 041ffaf..cdc1e6e 100644 --- a/lib/seam/resources/phone.rb +++ b/lib/seam/resources/phone.rb @@ -4,16 +4,316 @@ module Seam module Resources # Represents an app user's mobile phone. class Phone < BaseResource + # Known `error_code` values load as subclasses; unknown values remain Errors instances for forward compatibility. class Errors < BaseResource - # Unique identifier of the type of error. + # Indicates that the account is disconnected. + class AccountDisconnected < Errors + # Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + # @return [String] + # Known values: + # - `account_disconnected` + attr_accessor :error_code + # Indicates that the error is a [connected account](https://www.seam.co/docs/api/connected_accounts/object) error. + # @return [TrueClass] + attr_accessor :is_connected_account_error + # Indicates that the error is not a device error. + # @return [FalseClass] + 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 the Salto site user limit has been reached. + class SaltoKsSubscriptionLimitExceeded < Errors + # Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + # @return [String] + # Known values: + # - `salto_ks_subscription_limit_exceeded` + attr_accessor :error_code + # Indicates that the error is a [connected account](https://www.seam.co/docs/api/connected_accounts/object) error. + # @return [TrueClass] + attr_accessor :is_connected_account_error + # Indicates that the error is not a device error. + # @return [FalseClass] + 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 the provider's system to which this device belongs is not letting Seam act on it, so Seam cannot manage access codes or unlock the device. The error message says which of three causes applies. Seam's integration user may not have sufficient permissions on the provider's system, or may have been suspended there: grant the integration user the required permissions in the provider's system, or reauthorize the connected account in Seam. The provider account or site may not have a valid subscription with the provider: set up or renew that subscription with the provider. Or the provider may have rejected the credential Seam uses to operate the device's hub: contact Seam support to re-activate it. + class InsufficientPermissions < Errors + # Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + # @return [String] + # Known values: + # - `insufficient_permissions` + attr_accessor :error_code + # Indicates that the error is a [connected account](https://www.seam.co/docs/api/connected_accounts/object) error. + # @return [TrueClass] + attr_accessor :is_connected_account_error + # Indicates that the error is not a device error. + # @return [FalseClass] + 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 one or more dormakaba sites associated with the connected account could not be connected. Contact dormakaba support. + class DormakabaSitesDisconnected < Errors + # Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + # @return [String] + # Known values: + # - `dormakaba_sites_disconnected` + attr_accessor :error_code + # Indicates that the error is a [connected account](https://www.seam.co/docs/api/connected_accounts/object) error. + # @return [TrueClass] + attr_accessor :is_connected_account_error + # Indicates that the error is not a device error. + # @return [FalseClass] + 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 the device is offline. + class DeviceOffline < Errors + # Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + # @return [String] + # Known values: + # - `device_offline` + 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 the device has been removed. + class DeviceRemoved < Errors + # Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + # @return [String] + # Known values: + # - `device_removed` + 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 the hub is disconnected. + class HubDisconnected < Errors + # Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + # @return [String] + # Known values: + # - `hub_disconnected` + 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 the device is disconnected. + class DeviceDisconnected < Errors + # Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + # @return [String] + # Known values: + # - `device_disconnected` + 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 the [backup access code pool](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/backup-access-codes) is empty. + class EmptyBackupAccessCodePool < Errors + # Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + # @return [String] + # Known values: + # - `empty_backup_access_code_pool` + 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 the user is not authorized to use the August lock. + class AugustLockNotAuthorized < Errors + # Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + # @return [String] + # Known values: + # - `august_lock_not_authorized` + 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. + # @return [String] + # Known values: + # - `missing_device_credentials` + 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 the auxiliary heat is running. + class AuxiliaryHeatRunning < Errors + # Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + # @return [String] + # Known values: + # - `auxiliary_heat_running` + 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 a subscription is required to connect. + class SubscriptionRequired < Errors + # Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + # @return [String] + # Known values: + # - `subscription_required` + 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 the Seam API cannot communicate with [Seam Bridge](https://www.seam.co/docs/capability-guides/seam-bridge), for example, if the Seam Bridge executable has stopped or if the computer running the Seam Bridge executable is offline. See also [Troubleshooting Your Access Control System](https://www.seam.co/docs/low-level-apis/access-systems/troubleshooting-your-access-control-system#acs_system-errors-seam_bridge_disconnected). + class BridgeDisconnected < Errors + # Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + # @return [String] + # Known values: + # - `bridge_disconnected` + attr_accessor :error_code + # Indicates whether the error is related to [Seam Bridge](https://www.seam.co/docs/capability-guides/seam-bridge). + # @return [Boolean, nil] + attr_accessor :is_bridge_error + # Indicates whether the error is related specifically to the connected account. + # @return [Boolean, nil] + attr_accessor :is_connected_account_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 + + # Unique identifier of the type of error. Enables quick recognition and categorization of the issue. # @return [String] + # Known values: + # - `account_disconnected` + # - `salto_ks_subscription_limit_exceeded` + # - `insufficient_permissions` + # - `dormakaba_sites_disconnected` + # - `device_offline` + # - `device_removed` + # - `hub_disconnected` + # - `device_disconnected` + # - `empty_backup_access_code_pool` + # - `august_lock_not_authorized` + # - `missing_device_credentials` + # - `auxiliary_heat_running` + # - `subscription_required` + # - `bridge_disconnected` attr_accessor :error_code - # Detailed description of the 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 + + discriminated_by :error_code, { + "account_disconnected" => AccountDisconnected, + "salto_ks_subscription_limit_exceeded" => SaltoKsSubscriptionLimitExceeded, + "insufficient_permissions" => InsufficientPermissions, + "dormakaba_sites_disconnected" => DormakabaSitesDisconnected, + "device_offline" => DeviceOffline, + "device_removed" => DeviceRemoved, + "hub_disconnected" => HubDisconnected, + "device_disconnected" => DeviceDisconnected, + "empty_backup_access_code_pool" => EmptyBackupAccessCodePool, + "august_lock_not_authorized" => AugustLockNotAuthorized, + "missing_device_credentials" => MissingDeviceCredentials, + "auxiliary_heat_running" => AuxiliaryHeatRunning, + "subscription_required" => SubscriptionRequired, + "bridge_disconnected" => BridgeDisconnected + }.freeze end class Properties < BaseResource @@ -49,25 +349,512 @@ class SaltoSpaceCredentialServiceMetadata < BaseResource resource_accessor :salto_space_credential_service_metadata, SaltoSpaceCredentialServiceMetadata end + # Known `warning_code` values load as subclasses; unknown values remain Warnings instances for forward compatibility. class Warnings < BaseResource - # Detailed description of the warning. + # Indicates that the backup access code is unhealthy. + class PartialBackupAccessCodePool < 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: + # - `partial_backup_access_code_pool` + attr_accessor :warning_code + # Date and time at which Seam created the warning. + # @return [Time] + date_accessor :created_at + end + + # Indicates that there are too many backup codes. + class ManyActiveBackupCodes < 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: + # - `many_active_backup_codes` + attr_accessor :warning_code + # Date and time at which Seam created the warning. + # @return [Time] + date_accessor :created_at + end + + # Indicates that a third-party integration has been detected. + class ThirdPartyIntegrationDetected < 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: + # - `third_party_integration_detected` + attr_accessor :warning_code + # Date and time at which Seam created the warning. + # @return [Time] + date_accessor :created_at + end + + # Indicates that the Remote Unlock feature is not enabled in the settings." + class TtlockLockGatewayUnlockingNotEnabled < 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: + # - `ttlock_lock_gateway_unlocking_not_enabled` + attr_accessor :warning_code + # Date and time at which Seam created the warning. + # @return [Time] + date_accessor :created_at + end + + # Indicates that the gateway signal is weak. + class TtlockWeakGatewaySignal < 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: + # - `ttlock_weak_gateway_signal` + attr_accessor :warning_code + # Date and time at which Seam created the warning. + # @return [Time] + date_accessor :created_at + end + + # Indicates that the device is in power saving mode and may have limited functionality. + class PowerSavingMode < 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: + # - `power_saving_mode` + attr_accessor :warning_code + # Date and time at which Seam created the warning. + # @return [Time] + date_accessor :created_at + end + + # Indicates that the temperature threshold has been exceeded. + class TemperatureThresholdExceeded < 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: + # - `temperature_threshold_exceeded` + attr_accessor :warning_code + # Date and time at which Seam created the warning. + # @return [Time] + date_accessor :created_at + end + + # Indicates that the device appears to be unresponsive. + class DeviceCommunicationDegraded < 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: + # - `device_communication_degraded` + attr_accessor :warning_code + # Date and time at which Seam created the warning. + # @return [Time] + date_accessor :created_at + end + + # Indicates that a scheduled maintenance window has been detected. + class ScheduledMaintenanceWindow < 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: + # - `scheduled_maintenance_window` + attr_accessor :warning_code + # Date and time at which Seam created the warning. + # @return [Time] + date_accessor :created_at + end + + # Indicates that the device has a flaky connection. + class DeviceHasFlakyConnection < 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: + # - `device_has_flaky_connection` + attr_accessor :warning_code + # Date and time at which Seam created the warning. + # @return [Time] + date_accessor :created_at + end + + # Indicates that the Salto KS lock is in Office Mode. Access Codes will not unlock doors. + class SaltoKsOfficeMode < 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: + # - `salto_ks_office_mode` + attr_accessor :warning_code + # Date and time at which Seam created the warning. + # @return [Time] + date_accessor :created_at + end + + # Indicates that the Salto KS lock is in Privacy Mode. Access Codes will not unlock doors. + class SaltoKsPrivacyMode < 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: + # - `salto_ks_privacy_mode` + attr_accessor :warning_code + # Date and time at which Seam created the warning. + # @return [Time] + date_accessor :created_at + end + + # Indicates that the lock is in Privacy Mode. Access codes and remote unlock are blocked until Privacy Mode is disabled. + class PrivacyMode < 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: + # - `privacy_mode` + attr_accessor :warning_code + # Date and time at which Seam created the warning. + # @return [Time] + date_accessor :created_at + end + + # Indicates that the Salto KS site has exceeded 80% of the maximum number of allowed users. Increase your subscription limit or delete some users from your site. + class SaltoKsSubscriptionLimitAlmostReached < 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: + # - `salto_ks_subscription_limit_almost_reached` + attr_accessor :warning_code + # Date and time at which Seam created the warning. + # @return [Time] + date_accessor :created_at + end + + # Indicates that a change in the reported device model has been detected for this Salto KS lock, which may occur after an IQ hub reset. Access code support may be affected. See https://help.getseam.com/articles/5098842588-salto-ks-lock-loses-access-code-support for troubleshooting steps. + class SaltoKsLockAccessCodeSupportRemoved < 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: + # - `salto_ks_lock_access_code_support_removed` + attr_accessor :warning_code + # Date and time at which Seam created the warning. + # @return [Time] + date_accessor :created_at + end + + # Indicates that an unknown issue occurred while syncing the state of the phone with the provider. This issue may affect the proper functioning of the phone. + class UnknownIssueWithPhone < 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: + # - `unknown_issue_with_phone` + attr_accessor :warning_code + # Date and time at which Seam created the warning. + # @return [Time] + date_accessor :created_at + end + + # Indicates that Seam detected that the Lockly device does not have a time zone configured. Time-bound codes may not work as expected. + class LocklyTimeZoneNotConfigured < 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: + # - `lockly_time_zone_not_configured` + attr_accessor :warning_code + # Date and time at which Seam created the warning. + # @return [Time] + date_accessor :created_at + end + + # Indicates that Seam does not know the time zone of the Ultraloq device. Set a time zone to enable time-bound access codes. + class UltraloqTimeZoneUnknown < 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: + # - `ultraloq_time_zone_unknown` + attr_accessor :warning_code + # Date and time at which Seam created the warning. + # @return [Time] + date_accessor :created_at + end + + # Indicates that Seam does not know the device's time zone. Set a time zone to enable time-bound access codes. + class TimeZoneUnknown < 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: + # - `time_zone_unknown` + attr_accessor :warning_code + # Date and time at which Seam created the warning. + # @return [Time] + date_accessor :created_at + end + + # Indicates that the device's configured time zone does not match its hardware UTC offset. Time-bound access codes may activate at the wrong local time. + class TimeZoneMismatch < 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: + # - `time_zone_mismatch` + attr_accessor :warning_code + # Date and time at which Seam created the warning. + # @return [Time] + date_accessor :created_at + end + + # Indicates that the 2N device does not have a time zone configured. Configure a time zone on the device to enable access codes. + class TwoNDeviceMissingTimezone < 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: + # - `two_n_device_missing_timezone` + attr_accessor :warning_code + # Date and time at which Seam created the warning. + # @return [Time] + date_accessor :created_at + end + + # Indicates that a hub or relay must be connected to unlock additional capabilities such as remote unlock. + class HubRequiredForAdditionalCapabilities < 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: + # - `hub_required_for_additional_capabilities` + attr_accessor :warning_code + # Date and time at which Seam created the warning. + # @return [Time] + date_accessor :created_at + end + + # Indicates a provider-specific issue that may affect device functionality. + class ProviderIssue < 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: + # - `provider_issue` + attr_accessor :warning_code + # Date and time at which Seam created the warning. + # @return [Time] + date_accessor :created_at + end + + # Indicates that the key is in a locker that does not support the access codes API. + class KeynestUnsupportedLocker < 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: + # - `keynest_unsupported_locker` + attr_accessor :warning_code + # Date and time at which Seam created the warning. + # @return [Time] + date_accessor :created_at + end + + # Indicates that the accessory keypad exists, but is not linked to the Igloohome Bridge. Online access code programming will fail until the keypad is linked to the Igloohome Bridge in the Igloohome app. + class AccessoryKeypadSetupRequired < 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: + # - `accessory_keypad_setup_required` + attr_accessor :warning_code + # Date and time at which Seam created the warning. + # @return [Time] + date_accessor :created_at + end + + # Indicates that the accessory keypad paired with this lock has a low or critically low battery. Replace its batteries so guests can keep entering their access codes. + class AccessoryKeypadLowBattery < 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: + # - `accessory_keypad_low_battery` + 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. + # @return [String] + attr_accessor :message + # Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + # @return [String] + # Known values: + # - `unreliable_online_status` + attr_accessor :warning_code + # Date and time at which Seam created the warning. + # @return [Time] + date_accessor :created_at + end + + # Indicates that the device has reached its maximum number of active access codes. Delete existing codes before creating new ones. + class MaxAccessCodesReached < Warnings + # Number of active access codes on the device when the warning was set. + # @return [Integer] + attr_accessor :active_access_code_count + # Maximum number of active access codes supported by the device. + # @return [Integer] + attr_accessor :max_active_access_code_count + # 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: + # - `max_access_codes_reached` + 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 - # Unique identifier of the type of warning. + # Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. # @return [String] + # Known values: + # - `partial_backup_access_code_pool` + # - `many_active_backup_codes` + # - `third_party_integration_detected` + # - `ttlock_lock_gateway_unlocking_not_enabled` + # - `ttlock_weak_gateway_signal` + # - `power_saving_mode` + # - `temperature_threshold_exceeded` + # - `device_communication_degraded` + # - `scheduled_maintenance_window` + # - `device_has_flaky_connection` + # - `salto_ks_office_mode` + # - `salto_ks_privacy_mode` + # - `privacy_mode` + # - `salto_ks_subscription_limit_almost_reached` + # - `salto_ks_lock_access_code_support_removed` + # - `unknown_issue_with_phone` + # - `lockly_time_zone_not_configured` + # - `ultraloq_time_zone_unknown` + # - `time_zone_unknown` + # - `time_zone_mismatch` + # - `two_n_device_missing_timezone` + # - `hub_required_for_additional_capabilities` + # - `provider_issue` + # - `keynest_unsupported_locker` + # - `accessory_keypad_setup_required` + # - `accessory_keypad_low_battery` + # - `unreliable_online_status` + # - `max_access_codes_reached` attr_accessor :warning_code # Date and time at which Seam created the warning. # @return [Time] date_accessor :created_at + + discriminated_by :warning_code, { + "partial_backup_access_code_pool" => PartialBackupAccessCodePool, + "many_active_backup_codes" => ManyActiveBackupCodes, + "third_party_integration_detected" => ThirdPartyIntegrationDetected, + "ttlock_lock_gateway_unlocking_not_enabled" => TtlockLockGatewayUnlockingNotEnabled, + "ttlock_weak_gateway_signal" => TtlockWeakGatewaySignal, + "power_saving_mode" => PowerSavingMode, + "temperature_threshold_exceeded" => TemperatureThresholdExceeded, + "device_communication_degraded" => DeviceCommunicationDegraded, + "scheduled_maintenance_window" => ScheduledMaintenanceWindow, + "device_has_flaky_connection" => DeviceHasFlakyConnection, + "salto_ks_office_mode" => SaltoKsOfficeMode, + "salto_ks_privacy_mode" => SaltoKsPrivacyMode, + "privacy_mode" => PrivacyMode, + "salto_ks_subscription_limit_almost_reached" => SaltoKsSubscriptionLimitAlmostReached, + "salto_ks_lock_access_code_support_removed" => SaltoKsLockAccessCodeSupportRemoved, + "unknown_issue_with_phone" => UnknownIssueWithPhone, + "lockly_time_zone_not_configured" => LocklyTimeZoneNotConfigured, + "ultraloq_time_zone_unknown" => UltraloqTimeZoneUnknown, + "time_zone_unknown" => TimeZoneUnknown, + "time_zone_mismatch" => TimeZoneMismatch, + "two_n_device_missing_timezone" => TwoNDeviceMissingTimezone, + "hub_required_for_additional_capabilities" => HubRequiredForAdditionalCapabilities, + "provider_issue" => ProviderIssue, + "keynest_unsupported_locker" => KeynestUnsupportedLocker, + "accessory_keypad_setup_required" => AccessoryKeypadSetupRequired, + "accessory_keypad_low_battery" => AccessoryKeypadLowBattery, + "unreliable_online_status" => UnreliableOnlineStatus, + "max_access_codes_reached" => MaxAccessCodesReached + }.freeze end # Properties of the phone. # @return [Properties] resource_accessor :properties, Properties - # Errors associated with the phone. + # Array of errors associated with the device. Each error object within the array contains two fields: `error_code` and `message`. `error_code` is a string that uniquely identifies the type of error, enabling quick recognition and categorization of the issue. `message` provides a more detailed description of the error, offering insights into the issue and potentially how to rectify it. # @return [Array] resource_list_accessor :errors, Errors - # Warnings associated with the phone. + # Array of warnings associated with the device. Each warning object within the array contains two fields: `warning_code` and `message`. `warning_code` is a string that uniquely identifies the type of warning, enabling quick recognition and categorization of the issue. `message` provides a more detailed description of the warning, offering insights into the issue and potentially how to rectify it. # @return [Array] resource_list_accessor :warnings, Warnings # Optional [custom metadata](https://www.seam.co/docs/core-concepts/devices/adding-custom-metadata-to-a-device) for the phone. diff --git a/lib/seam/resources/unmanaged_access_grant.rb b/lib/seam/resources/unmanaged_access_grant.rb index 06b2580..ed29b36 100644 --- a/lib/seam/resources/unmanaged_access_grant.rb +++ b/lib/seam/resources/unmanaged_access_grant.rb @@ -169,8 +169,10 @@ class FailedDevices < BaseResource # Device whose access code could not be revoked. # @return [String] attr_accessor :device_id - # Reason the access code could not be revoked (e.g. `offline_access_code_not_revocable`). + # Reason the access code could not be revoked. # @return [String] + # Known values: + # - `offline_access_code_not_revocable` attr_accessor :error_code # Human-readable description of why revocation failed. # @return [String] diff --git a/lib/seam/resources/unmanaged_access_method.rb b/lib/seam/resources/unmanaged_access_method.rb index 51c7b50..e1a386f 100644 --- a/lib/seam/resources/unmanaged_access_method.rb +++ b/lib/seam/resources/unmanaged_access_method.rb @@ -249,7 +249,7 @@ class UserIdentityMissingPhoneNumber < Warnings # Indicates whether the access method is ready for card assignment. This is true when the access method is in card mode, has not yet been issued, and the system supports credential assignment. # @return [Boolean, nil] attr_accessor :is_ready_for_assignment - # Indicates whether the access method is ready to be encoded. This is true when the credential has been created and the card has not yet been issued. + # Indicates whether the access method is ready to be encoded. This is true when the card has not yet been issued and the access system has received all the access the card needs. While it is false, `pending_mutations` contains `waiting_for_access_on_acs_system`. # @return [Boolean, nil] attr_accessor :is_ready_for_encoding # Access method mode. Supported values: `code`, `card`, `mobile_key`, `cloud_key`. diff --git a/lib/seam/resources/unmanaged_device.rb b/lib/seam/resources/unmanaged_device.rb index f1c81db..a6b06d6 100644 --- a/lib/seam/resources/unmanaged_device.rb +++ b/lib/seam/resources/unmanaged_device.rb @@ -949,6 +949,15 @@ class MaxAccessCodesReached < Warnings # Indicates whether the thermostat supports simultaneous heating and cooling. # @return [Boolean, nil] attr_accessor :can_hvac_heat_cool + # Indicates whether the speaker supports muting and unmuting. + # @return [Boolean, nil] + attr_accessor :can_mute_speaker + # Indicates whether the speaker supports pausing and resuming playback. + # @return [Boolean, nil] + attr_accessor :can_pause_speaker_playback + # Indicates whether the speaker supports playing a chime. + # @return [Boolean, nil] + attr_accessor :can_play_speaker_chime # Indicates whether the device supports programming offline access codes. # @return [Boolean, nil] attr_accessor :can_program_offline_access_codes @@ -973,6 +982,9 @@ class MaxAccessCodesReached < Warnings # Indicates whether the thermostat supports running climate programs. # @return [Boolean, nil] attr_accessor :can_run_thermostat_programs + # Indicates whether the speaker supports setting its volume. + # @return [Boolean, nil] + attr_accessor :can_set_speaker_volume # Indicates whether the device supports simulating connection in a sandbox. # @return [Boolean, nil] attr_accessor :can_simulate_connection @@ -1068,6 +1080,7 @@ class MaxAccessCodesReached < Warnings # - `tapo_camera` # - `arlo_camera` # - `reolink_camera` + # - `sonos_speaker` attr_accessor :device_type # Display name of the device, defaults to nickname (if it is set) or `properties.appearance.name`, otherwise. Enables administrators and users to identify the device easily, especially when there are numerous devices. # @return [String] diff --git a/lib/seam/routes/customers.rb b/lib/seam/routes/customers.rb index 3ee789c..f0fc461 100644 --- a/lib/seam/routes/customers.rb +++ b/lib/seam/routes/customers.rb @@ -29,6 +29,7 @@ def create_portal(customer_data: nil, customer_resources_filters: nil, customiza # Deletes customer data including resources like spaces, properties, rooms, users, etc. # This will delete the partner resources and any related Seam resources (user identities, access grants, spaces). + # Space keys also match spaces created directly with a `space_key` (for example, through `/spaces/create`). # @param access_grant_keys [Array, nil] List of access grant keys to delete. # @param booking_keys [Array, nil] List of booking keys to delete. # @param building_keys [Array, nil] List of building keys to delete. @@ -65,6 +66,7 @@ def delete_data(access_grant_keys: nil, booking_keys: nil, building_keys: nil, c # @param facilities [Array, nil] List of gym or fitness facilities. # @param guests [Array, nil] List of guests. # @param listings [Array, nil] List of property listings. + # @param low_battery_alert_threshold [Float, Seam::Null, nil] Battery level, from 0 to 1, at or below which `device.low_battery` events fire for this customer's devices. Overrides the workspace and device defaults. Pass `null` to remove the customer's override. # @param properties [Array, nil] List of short-term rental properties. # @param property_listings [Array, nil] List of property listings. # @param reservations [Array, nil] List of reservations. @@ -78,8 +80,8 @@ def delete_data(access_grant_keys: nil, booking_keys: nil, building_keys: nil, c # @param user_identities [Array, nil] List of user identities. # @param users [Array, nil] List of users. # @return [nil] OK - def push_data(customer_key:, access_grants: nil, bookings: nil, buildings: nil, common_areas: nil, customization_profile_id: nil, facilities: nil, guests: nil, listings: nil, properties: nil, property_listings: nil, reservations: nil, residents: nil, rooms: nil, sites: nil, spaces: nil, staff_members: nil, tenants: nil, units: nil, user_identities: nil, users: nil) - @client.post("/customers/push_data", {customer_key: customer_key, access_grants: access_grants, bookings: bookings, buildings: buildings, common_areas: common_areas, customization_profile_id: customization_profile_id, facilities: facilities, guests: guests, listings: listings, properties: properties, property_listings: property_listings, reservations: reservations, residents: residents, rooms: rooms, sites: sites, spaces: spaces, staff_members: staff_members, tenants: tenants, units: units, user_identities: user_identities, users: users}.compact) + def push_data(customer_key:, access_grants: nil, bookings: nil, buildings: nil, common_areas: nil, customization_profile_id: nil, facilities: nil, guests: nil, listings: nil, low_battery_alert_threshold: nil, properties: nil, property_listings: nil, reservations: nil, residents: nil, rooms: nil, sites: nil, spaces: nil, staff_members: nil, tenants: nil, units: nil, user_identities: nil, users: nil) + @client.post("/customers/push_data", {customer_key: customer_key, access_grants: access_grants, bookings: bookings, buildings: buildings, common_areas: common_areas, customization_profile_id: customization_profile_id, facilities: facilities, guests: guests, listings: listings, low_battery_alert_threshold: low_battery_alert_threshold, properties: properties, property_listings: property_listings, reservations: reservations, residents: residents, rooms: rooms, sites: sites, spaces: spaces, staff_members: staff_members, tenants: tenants, units: units, user_identities: user_identities, users: users}.compact) nil end