seam 2.166.0 → 2.167.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +4 -4
  3. data/README.md +55 -2
  4. data/lib/seam/action_attempt_resolver.rb +77 -7
  5. data/lib/seam/auth.rb +2 -1
  6. data/lib/seam/base_resource.rb +50 -3
  7. data/lib/seam/deep_hash_accessor.rb +11 -15
  8. data/lib/seam/errors.rb +6 -0
  9. data/lib/seam/http.rb +11 -7
  10. data/lib/seam/http_single_workspace.rb +15 -3
  11. data/lib/seam/http_without_workspace.rb +17 -7
  12. data/lib/seam/invalid_response_error.rb +17 -0
  13. data/lib/seam/options.rb +2 -1
  14. data/lib/seam/paginator.rb +34 -29
  15. data/lib/seam/request_parameters.rb +11 -0
  16. data/lib/seam/resources/access_code.rb +46 -3
  17. data/lib/seam/resources/access_grant.rb +38 -4
  18. data/lib/seam/resources/access_method.rb +18 -1
  19. data/lib/seam/resources/acs_access_group.rb +0 -17
  20. data/lib/seam/resources/acs_credential.rb +18 -1
  21. data/lib/seam/resources/acs_entrance.rb +1 -1
  22. data/lib/seam/resources/acs_system.rb +17 -31
  23. data/lib/seam/resources/acs_user.rb +0 -3
  24. data/lib/seam/resources/action_attempt.rb +4 -216
  25. data/lib/seam/resources/batch.rb +1 -1
  26. data/lib/seam/resources/client_session.rb +0 -4
  27. data/lib/seam/resources/connect_webview.rb +1 -0
  28. data/lib/seam/resources/connected_account.rb +1 -21
  29. data/lib/seam/resources/device.rb +354 -311
  30. data/lib/seam/resources/device_provider.rb +11 -13
  31. data/lib/seam/resources/event.rb +372 -151
  32. data/lib/seam/resources/instant_key.rb +1 -1
  33. data/lib/seam/resources/phone.rb +90 -2
  34. data/lib/seam/resources/space.rb +21 -1
  35. data/lib/seam/resources/unmanaged_access_code.rb +44 -4
  36. data/lib/seam/resources/unmanaged_access_grant.rb +38 -4
  37. data/lib/seam/resources/unmanaged_access_method.rb +18 -1
  38. data/lib/seam/resources/unmanaged_device.rb +108 -38
  39. data/lib/seam/resources/workspace.rb +0 -4
  40. data/lib/seam/routes/access_codes.rb +19 -23
  41. data/lib/seam/routes/access_codes_simulate.rb +1 -1
  42. data/lib/seam/routes/access_codes_unmanaged.rb +7 -5
  43. data/lib/seam/routes/access_grants.rb +24 -24
  44. data/lib/seam/routes/access_grants_unmanaged.rb +5 -4
  45. data/lib/seam/routes/access_methods.rb +20 -14
  46. data/lib/seam/routes/access_methods_unmanaged.rb +2 -2
  47. data/lib/seam/routes/acs_access_groups.rb +4 -4
  48. data/lib/seam/routes/acs_credentials.rb +4 -4
  49. data/lib/seam/routes/acs_encoders.rb +5 -5
  50. data/lib/seam/routes/acs_entrances.rb +6 -8
  51. data/lib/seam/routes/acs_systems.rb +3 -3
  52. data/lib/seam/routes/acs_users.rb +44 -34
  53. data/lib/seam/routes/action_attempts.rb +2 -2
  54. data/lib/seam/routes/cameras_live_views.rb +5 -5
  55. data/lib/seam/routes/client_sessions.rb +20 -21
  56. data/lib/seam/routes/connect_webviews.rb +3 -3
  57. data/lib/seam/routes/connected_accounts.rb +7 -5
  58. data/lib/seam/routes/customers.rb +4 -5
  59. data/lib/seam/routes/devices.rb +10 -10
  60. data/lib/seam/routes/devices_unmanaged.rb +7 -5
  61. data/lib/seam/routes/events.rb +16 -12
  62. data/lib/seam/routes/instant_keys.rb +7 -5
  63. data/lib/seam/routes/locks.rb +10 -8
  64. data/lib/seam/routes/locks_simulate.rb +2 -2
  65. data/lib/seam/routes/media.rb +1 -1
  66. data/lib/seam/routes/noise_sensors.rb +1 -1
  67. data/lib/seam/routes/noise_sensors_noise_thresholds.rb +9 -3
  68. data/lib/seam/routes/phones.rb +2 -2
  69. data/lib/seam/routes/phones_simulate.rb +1 -1
  70. data/lib/seam/routes/spaces.rb +18 -13
  71. data/lib/seam/routes/thermostats.rb +14 -18
  72. data/lib/seam/routes/thermostats_daily_programs.rb +2 -2
  73. data/lib/seam/routes/thermostats_schedules.rb +3 -3
  74. data/lib/seam/routes/user_identities.rb +24 -18
  75. data/lib/seam/routes/user_identities_unmanaged.rb +2 -2
  76. data/lib/seam/routes/webhooks.rb +3 -3
  77. data/lib/seam/routes/workspaces.rb +6 -16
  78. data/lib/seam/url_search_params_serializer.rb +2 -1
  79. data/lib/seam/version.rb +1 -1
  80. data/lib/seam/wait_for_action_attempt.rb +3 -1
  81. data/lib/seam/webhook.rb +25 -5
  82. data/lib/seam.rb +12 -6
  83. metadata +5 -2
@@ -263,6 +263,7 @@ module Seam
263
263
  # - `unknown_issue_with_acs_credential`
264
264
  # - `needs_to_be_reissued`
265
265
  # - `requested_code_unavailable`
266
+ # - `schedule_rounded_up`
266
267
  attr_accessor :warning_code
267
268
  # The PIN code that was assigned instead.
268
269
  # @return [String, nil]
@@ -535,6 +536,7 @@ module Seam
535
536
  # - `unknown_issue_with_acs_credential`
536
537
  # - `needs_to_be_reissued`
537
538
  # - `requested_code_unavailable`
539
+ # - `schedule_rounded_up`
538
540
  attr_accessor :warning_code
539
541
  # The PIN code that was assigned instead.
540
542
  # @return [String, nil]
@@ -777,6 +779,7 @@ module Seam
777
779
  # - `unknown_issue_with_acs_credential`
778
780
  # - `needs_to_be_reissued`
779
781
  # - `requested_code_unavailable`
782
+ # - `schedule_rounded_up`
780
783
  attr_accessor :warning_code
781
784
  # The PIN code that was assigned instead.
782
785
  # @return [String, nil]
@@ -1009,6 +1012,7 @@ module Seam
1009
1012
  # - `user_identity_missing_email_address`
1010
1013
  # - `user_identity_missing_phone_number`
1011
1014
  # - `requested_code_unavailable`
1015
+ # - `schedule_rounded_up`
1012
1016
  attr_accessor :warning_code
1013
1017
  # ID of the original access method from which this backup access method was split, if applicable.
1014
1018
  # @return [String, nil]
@@ -1513,212 +1517,6 @@ module Seam
1513
1517
  attr_accessor :status
1514
1518
  end
1515
1519
 
1516
- # Setting the speaker volume is pending.
1517
- class SetSpeakerVolume < ActionAttempt
1518
- class Error < BaseResource
1519
- # Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
1520
- # @return [String]
1521
- attr_accessor :message
1522
- # Type of the error.
1523
- # @return [String]
1524
- attr_accessor :type
1525
- end
1526
-
1527
- class Result < BaseResource
1528
- end
1529
-
1530
- # Error associated with the action.
1531
- # @return [Error, nil]
1532
- # Only present when `status` is `error`; `nil` otherwise.
1533
- resource_accessor :error, Error
1534
- available_only_for_statuses :error, ["error"]
1535
- # Result of the action.
1536
- # @return [Result, nil]
1537
- # Only present when `status` is `success`; `nil` otherwise.
1538
- resource_accessor :result, Result
1539
- available_only_for_statuses :result, ["success"]
1540
- # ID of the action attempt.
1541
- # @return [String]
1542
- attr_accessor :action_attempt_id
1543
- # Action attempt to track the status of setting the volume on a speaker.
1544
- # @return [String]
1545
- # Known values:
1546
- # - `SET_SPEAKER_VOLUME`
1547
- attr_accessor :action_type
1548
- # @return [String]
1549
- # Known values:
1550
- # - `success`
1551
- # - `pending`
1552
- # - `error`
1553
- attr_accessor :status
1554
- end
1555
-
1556
- # Muting or unmuting the speaker is pending.
1557
- class SetSpeakerMute < ActionAttempt
1558
- class Error < BaseResource
1559
- # Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
1560
- # @return [String]
1561
- attr_accessor :message
1562
- # Type of the error.
1563
- # @return [String]
1564
- attr_accessor :type
1565
- end
1566
-
1567
- class Result < BaseResource
1568
- end
1569
-
1570
- # Error associated with the action.
1571
- # @return [Error, nil]
1572
- # Only present when `status` is `error`; `nil` otherwise.
1573
- resource_accessor :error, Error
1574
- available_only_for_statuses :error, ["error"]
1575
- # Result of the action.
1576
- # @return [Result, nil]
1577
- # Only present when `status` is `success`; `nil` otherwise.
1578
- resource_accessor :result, Result
1579
- available_only_for_statuses :result, ["success"]
1580
- # ID of the action attempt.
1581
- # @return [String]
1582
- attr_accessor :action_attempt_id
1583
- # Action attempt to track the status of muting or unmuting a speaker.
1584
- # @return [String]
1585
- # Known values:
1586
- # - `SET_SPEAKER_MUTE`
1587
- attr_accessor :action_type
1588
- # @return [String]
1589
- # Known values:
1590
- # - `success`
1591
- # - `pending`
1592
- # - `error`
1593
- attr_accessor :status
1594
- end
1595
-
1596
- # Pausing playback on the speaker is pending.
1597
- class PauseSpeakerPlayback < ActionAttempt
1598
- class Error < BaseResource
1599
- # Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
1600
- # @return [String]
1601
- attr_accessor :message
1602
- # Type of the error.
1603
- # @return [String]
1604
- attr_accessor :type
1605
- end
1606
-
1607
- class Result < BaseResource
1608
- # IDs of the speakers whose playback was paused, including speakers grouped with the requested speaker.
1609
- # @return [Array<String>]
1610
- attr_accessor :affected_device_ids
1611
- end
1612
-
1613
- # Error associated with the action.
1614
- # @return [Error, nil]
1615
- # Only present when `status` is `error`; `nil` otherwise.
1616
- resource_accessor :error, Error
1617
- available_only_for_statuses :error, ["error"]
1618
- # Result of the action.
1619
- # @return [Result, nil]
1620
- # Only present when `status` is `success`; `nil` otherwise.
1621
- resource_accessor :result, Result
1622
- available_only_for_statuses :result, ["success"]
1623
- # ID of the action attempt.
1624
- # @return [String]
1625
- attr_accessor :action_attempt_id
1626
- # Action attempt to track the status of pausing playback on a speaker.
1627
- # @return [String]
1628
- # Known values:
1629
- # - `PAUSE_SPEAKER_PLAYBACK`
1630
- attr_accessor :action_type
1631
- # @return [String]
1632
- # Known values:
1633
- # - `success`
1634
- # - `pending`
1635
- # - `error`
1636
- attr_accessor :status
1637
- end
1638
-
1639
- # Resuming playback on the speaker is pending.
1640
- class ResumeSpeakerPlayback < ActionAttempt
1641
- class Error < BaseResource
1642
- # Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
1643
- # @return [String]
1644
- attr_accessor :message
1645
- # Type of the error.
1646
- # @return [String]
1647
- attr_accessor :type
1648
- end
1649
-
1650
- class Result < BaseResource
1651
- # IDs of the speakers whose playback was resumed, including speakers grouped with the requested speaker.
1652
- # @return [Array<String>]
1653
- attr_accessor :affected_device_ids
1654
- end
1655
-
1656
- # Error associated with the action.
1657
- # @return [Error, nil]
1658
- # Only present when `status` is `error`; `nil` otherwise.
1659
- resource_accessor :error, Error
1660
- available_only_for_statuses :error, ["error"]
1661
- # Result of the action.
1662
- # @return [Result, nil]
1663
- # Only present when `status` is `success`; `nil` otherwise.
1664
- resource_accessor :result, Result
1665
- available_only_for_statuses :result, ["success"]
1666
- # ID of the action attempt.
1667
- # @return [String]
1668
- attr_accessor :action_attempt_id
1669
- # Action attempt to track the status of resuming playback on a speaker.
1670
- # @return [String]
1671
- # Known values:
1672
- # - `RESUME_SPEAKER_PLAYBACK`
1673
- attr_accessor :action_type
1674
- # @return [String]
1675
- # Known values:
1676
- # - `success`
1677
- # - `pending`
1678
- # - `error`
1679
- attr_accessor :status
1680
- end
1681
-
1682
- # Playing a chime on the speaker is pending.
1683
- class PlaySpeakerChime < ActionAttempt
1684
- class Error < BaseResource
1685
- # Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
1686
- # @return [String]
1687
- attr_accessor :message
1688
- # Type of the error.
1689
- # @return [String]
1690
- attr_accessor :type
1691
- end
1692
-
1693
- class Result < BaseResource
1694
- end
1695
-
1696
- # Error associated with the action.
1697
- # @return [Error, nil]
1698
- # Only present when `status` is `error`; `nil` otherwise.
1699
- resource_accessor :error, Error
1700
- available_only_for_statuses :error, ["error"]
1701
- # Result of the action.
1702
- # @return [Result, nil]
1703
- # Only present when `status` is `success`; `nil` otherwise.
1704
- resource_accessor :result, Result
1705
- available_only_for_statuses :result, ["success"]
1706
- # ID of the action attempt.
1707
- # @return [String]
1708
- attr_accessor :action_attempt_id
1709
- # Action attempt to track the status of playing a chime on a speaker.
1710
- # @return [String]
1711
- # Known values:
1712
- # - `PLAY_SPEAKER_CHIME`
1713
- attr_accessor :action_type
1714
- # @return [String]
1715
- # Known values:
1716
- # - `success`
1717
- # - `pending`
1718
- # - `error`
1719
- attr_accessor :status
1720
- end
1721
-
1722
1520
  class SyncAccessCodes < ActionAttempt
1723
1521
  class Error < BaseResource
1724
1522
  # Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
@@ -2033,11 +1831,6 @@ module Seam
2033
1831
  # - `PUSH_THERMOSTAT_PROGRAMS`
2034
1832
  # - `CONFIGURE_AUTO_LOCK`
2035
1833
  # - `CONVERT_ACCESS_CODE_TO_MANAGED`
2036
- # - `SET_SPEAKER_VOLUME`
2037
- # - `SET_SPEAKER_MUTE`
2038
- # - `PAUSE_SPEAKER_PLAYBACK`
2039
- # - `RESUME_SPEAKER_PLAYBACK`
2040
- # - `PLAY_SPEAKER_CHIME`
2041
1834
  # - `SYNC_ACCESS_CODES`
2042
1835
  # - `CREATE_ACCESS_CODE`
2043
1836
  # - `DELETE_ACCESS_CODE`
@@ -2070,11 +1863,6 @@ module Seam
2070
1863
  "PUSH_THERMOSTAT_PROGRAMS" => PushThermostatPrograms,
2071
1864
  "CONFIGURE_AUTO_LOCK" => ConfigureAutoLock,
2072
1865
  "CONVERT_ACCESS_CODE_TO_MANAGED" => ConvertAccessCodeToManaged,
2073
- "SET_SPEAKER_VOLUME" => SetSpeakerVolume,
2074
- "SET_SPEAKER_MUTE" => SetSpeakerMute,
2075
- "PAUSE_SPEAKER_PLAYBACK" => PauseSpeakerPlayback,
2076
- "RESUME_SPEAKER_PLAYBACK" => ResumeSpeakerPlayback,
2077
- "PLAY_SPEAKER_CHIME" => PlaySpeakerChime,
2078
1866
  "SYNC_ACCESS_CODES" => SyncAccessCodes,
2079
1867
  "CREATE_ACCESS_CODE" => CreateAccessCode,
2080
1868
  "DELETE_ACCESS_CODE" => DeleteAccessCode,
@@ -116,7 +116,7 @@ module Seam
116
116
  attr_accessor :events
117
117
  # Represents a Seam Instant Key. For issuing Bluetooth mobile keys, Instant Keys are the fastest way to share access. With a single API call, you can create a mobile key and send it through text or email or embed it in your own app.
118
118
  #
119
- # There’s no app to install, nor account to create. Your user just taps a link and gets a lightweight, native-feeling experience using iOS App Clip or Instant Apps on Android. Further, Instant Keys work offline, so even in areas with poor cellular or Wi-Fi, like elevator banks or concrete-walled hallways, the Instant Keys still work.
119
+ # There’s no account to create. Your user just taps a link and gets a lightweight, native-feeling experience. On iOS, the key opens in an App Clip, so there’s no app to install. On Android, Google has discontinued Google Play Instant, so the first time your user opens an Instant Key they must install the Seam Instant Key app from the Google Play Store. Further, Instant Keys work offline, so even in areas with poor cellular or Wi-Fi, like elevator banks or concrete-walled hallways, the Instant Keys still work.
120
120
  # @return [Hash, nil]
121
121
  attr_accessor :instant_keys
122
122
  # Represents 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). 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.
@@ -36,10 +36,6 @@ module Seam
36
36
  # ID of the [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) associated with the client session.
37
37
  # @return [String, nil]
38
38
  attr_accessor :user_identity_id
39
- # IDs of the [user identities](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) associated with the client session.
40
- # @return [Array<String>]
41
- # @deprecated Use `user_identity_id` instead.
42
- attr_accessor :user_identity_ids
43
39
  # ID of the workspace associated with the client session.
44
40
  # @return [String]
45
41
  attr_accessor :workspace_id
@@ -23,6 +23,7 @@ module Seam
23
23
  # - `access_control`
24
24
  # - `camera`
25
25
  # - `speaker`
26
+ # - `pool`
26
27
  attr_accessor :accepted_capabilities
27
28
  # 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).
28
29
  # @return [Array<String>]
@@ -143,24 +143,6 @@ module Seam
143
143
  }.freeze
144
144
  end
145
145
 
146
- class UserIdentifier < BaseResource
147
- # API URL for the user identifier associated with the connected account.
148
- # @return [String, nil]
149
- attr_accessor :api_url
150
- # Email address of the user identifier associated with the connected account.
151
- # @return [String, nil]
152
- attr_accessor :email
153
- # Indicates whether the user identifier associated with the connected account is exclusive.
154
- # @return [Boolean, nil]
155
- attr_accessor :exclusive
156
- # Phone number of the user identifier associated with the connected account.
157
- # @return [String, nil]
158
- attr_accessor :phone
159
- # Username of the user identifier associated with the connected account.
160
- # @return [String, nil]
161
- attr_accessor :username
162
- end
163
-
164
146
  # Known `warning_code` values load as subclasses; unknown values remain Warnings instances for forward compatibility.
165
147
  class Warnings < BaseResource
166
148
  # Indicates that scheduled downtime is planned for the connected account.
@@ -338,9 +320,6 @@ module Seam
338
320
  }.freeze
339
321
  end
340
322
 
341
- # User identifier associated with the connected account.
342
- # @return [UserIdentifier, nil]
343
- resource_accessor :user_identifier, UserIdentifier
344
323
  # Errors associated with the connected account.
345
324
  # @return [Array<Errors>]
346
325
  resource_list_accessor :errors, Errors
@@ -356,6 +335,7 @@ module Seam
356
335
  # - `access_control`
357
336
  # - `camera`
358
337
  # - `speaker`
338
+ # - `pool`
359
339
  attr_accessor :accepted_capabilities
360
340
  # Type of connected account.
361
341
  # @return [String, nil]