seam 2.165.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 +44 -7
  18. data/lib/seam/resources/access_method.rb +41 -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 +11 -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 +373 -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 +44 -7
  37. data/lib/seam/resources/unmanaged_access_method.rb +41 -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]
@@ -1008,10 +1011,18 @@ module Seam
1008
1011
  # - `delay_in_issuing`
1009
1012
  # - `user_identity_missing_email_address`
1010
1013
  # - `user_identity_missing_phone_number`
1014
+ # - `requested_code_unavailable`
1015
+ # - `schedule_rounded_up`
1011
1016
  attr_accessor :warning_code
1012
1017
  # ID of the original access method from which this backup access method was split, if applicable.
1013
1018
  # @return [String, nil]
1014
1019
  attr_accessor :original_access_method_id
1020
+ # The PIN code that was assigned instead.
1021
+ # @return [String, nil]
1022
+ attr_accessor :new_code
1023
+ # The originally requested PIN code that could not be used.
1024
+ # @return [String, nil]
1025
+ attr_accessor :original_code
1015
1026
  # Date and time at which Seam created the warning.
1016
1027
  # @return [Time]
1017
1028
  date_accessor :created_at
@@ -1506,212 +1517,6 @@ module Seam
1506
1517
  attr_accessor :status
1507
1518
  end
1508
1519
 
1509
- # Setting the speaker volume is pending.
1510
- class SetSpeakerVolume < ActionAttempt
1511
- class Error < BaseResource
1512
- # Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
1513
- # @return [String]
1514
- attr_accessor :message
1515
- # Type of the error.
1516
- # @return [String]
1517
- attr_accessor :type
1518
- end
1519
-
1520
- class Result < BaseResource
1521
- end
1522
-
1523
- # Error associated with the action.
1524
- # @return [Error, nil]
1525
- # Only present when `status` is `error`; `nil` otherwise.
1526
- resource_accessor :error, Error
1527
- available_only_for_statuses :error, ["error"]
1528
- # Result of the action.
1529
- # @return [Result, nil]
1530
- # Only present when `status` is `success`; `nil` otherwise.
1531
- resource_accessor :result, Result
1532
- available_only_for_statuses :result, ["success"]
1533
- # ID of the action attempt.
1534
- # @return [String]
1535
- attr_accessor :action_attempt_id
1536
- # Action attempt to track the status of setting the volume on a speaker.
1537
- # @return [String]
1538
- # Known values:
1539
- # - `SET_SPEAKER_VOLUME`
1540
- attr_accessor :action_type
1541
- # @return [String]
1542
- # Known values:
1543
- # - `success`
1544
- # - `pending`
1545
- # - `error`
1546
- attr_accessor :status
1547
- end
1548
-
1549
- # Muting or unmuting the speaker is pending.
1550
- class SetSpeakerMute < ActionAttempt
1551
- class Error < BaseResource
1552
- # Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
1553
- # @return [String]
1554
- attr_accessor :message
1555
- # Type of the error.
1556
- # @return [String]
1557
- attr_accessor :type
1558
- end
1559
-
1560
- class Result < BaseResource
1561
- end
1562
-
1563
- # Error associated with the action.
1564
- # @return [Error, nil]
1565
- # Only present when `status` is `error`; `nil` otherwise.
1566
- resource_accessor :error, Error
1567
- available_only_for_statuses :error, ["error"]
1568
- # Result of the action.
1569
- # @return [Result, nil]
1570
- # Only present when `status` is `success`; `nil` otherwise.
1571
- resource_accessor :result, Result
1572
- available_only_for_statuses :result, ["success"]
1573
- # ID of the action attempt.
1574
- # @return [String]
1575
- attr_accessor :action_attempt_id
1576
- # Action attempt to track the status of muting or unmuting a speaker.
1577
- # @return [String]
1578
- # Known values:
1579
- # - `SET_SPEAKER_MUTE`
1580
- attr_accessor :action_type
1581
- # @return [String]
1582
- # Known values:
1583
- # - `success`
1584
- # - `pending`
1585
- # - `error`
1586
- attr_accessor :status
1587
- end
1588
-
1589
- # Pausing playback on the speaker is pending.
1590
- class PauseSpeakerPlayback < ActionAttempt
1591
- class Error < BaseResource
1592
- # Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
1593
- # @return [String]
1594
- attr_accessor :message
1595
- # Type of the error.
1596
- # @return [String]
1597
- attr_accessor :type
1598
- end
1599
-
1600
- class Result < BaseResource
1601
- # IDs of the speakers whose playback was paused, including speakers grouped with the requested speaker.
1602
- # @return [Array<String>]
1603
- attr_accessor :affected_device_ids
1604
- end
1605
-
1606
- # Error associated with the action.
1607
- # @return [Error, nil]
1608
- # Only present when `status` is `error`; `nil` otherwise.
1609
- resource_accessor :error, Error
1610
- available_only_for_statuses :error, ["error"]
1611
- # Result of the action.
1612
- # @return [Result, nil]
1613
- # Only present when `status` is `success`; `nil` otherwise.
1614
- resource_accessor :result, Result
1615
- available_only_for_statuses :result, ["success"]
1616
- # ID of the action attempt.
1617
- # @return [String]
1618
- attr_accessor :action_attempt_id
1619
- # Action attempt to track the status of pausing playback on a speaker.
1620
- # @return [String]
1621
- # Known values:
1622
- # - `PAUSE_SPEAKER_PLAYBACK`
1623
- attr_accessor :action_type
1624
- # @return [String]
1625
- # Known values:
1626
- # - `success`
1627
- # - `pending`
1628
- # - `error`
1629
- attr_accessor :status
1630
- end
1631
-
1632
- # Resuming playback on the speaker is pending.
1633
- class ResumeSpeakerPlayback < ActionAttempt
1634
- class Error < BaseResource
1635
- # Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
1636
- # @return [String]
1637
- attr_accessor :message
1638
- # Type of the error.
1639
- # @return [String]
1640
- attr_accessor :type
1641
- end
1642
-
1643
- class Result < BaseResource
1644
- # IDs of the speakers whose playback was resumed, including speakers grouped with the requested speaker.
1645
- # @return [Array<String>]
1646
- attr_accessor :affected_device_ids
1647
- end
1648
-
1649
- # Error associated with the action.
1650
- # @return [Error, nil]
1651
- # Only present when `status` is `error`; `nil` otherwise.
1652
- resource_accessor :error, Error
1653
- available_only_for_statuses :error, ["error"]
1654
- # Result of the action.
1655
- # @return [Result, nil]
1656
- # Only present when `status` is `success`; `nil` otherwise.
1657
- resource_accessor :result, Result
1658
- available_only_for_statuses :result, ["success"]
1659
- # ID of the action attempt.
1660
- # @return [String]
1661
- attr_accessor :action_attempt_id
1662
- # Action attempt to track the status of resuming playback on a speaker.
1663
- # @return [String]
1664
- # Known values:
1665
- # - `RESUME_SPEAKER_PLAYBACK`
1666
- attr_accessor :action_type
1667
- # @return [String]
1668
- # Known values:
1669
- # - `success`
1670
- # - `pending`
1671
- # - `error`
1672
- attr_accessor :status
1673
- end
1674
-
1675
- # Playing a chime on the speaker is pending.
1676
- class PlaySpeakerChime < ActionAttempt
1677
- class Error < BaseResource
1678
- # Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
1679
- # @return [String]
1680
- attr_accessor :message
1681
- # Type of the error.
1682
- # @return [String]
1683
- attr_accessor :type
1684
- end
1685
-
1686
- class Result < BaseResource
1687
- end
1688
-
1689
- # Error associated with the action.
1690
- # @return [Error, nil]
1691
- # Only present when `status` is `error`; `nil` otherwise.
1692
- resource_accessor :error, Error
1693
- available_only_for_statuses :error, ["error"]
1694
- # Result of the action.
1695
- # @return [Result, nil]
1696
- # Only present when `status` is `success`; `nil` otherwise.
1697
- resource_accessor :result, Result
1698
- available_only_for_statuses :result, ["success"]
1699
- # ID of the action attempt.
1700
- # @return [String]
1701
- attr_accessor :action_attempt_id
1702
- # Action attempt to track the status of playing a chime on a speaker.
1703
- # @return [String]
1704
- # Known values:
1705
- # - `PLAY_SPEAKER_CHIME`
1706
- attr_accessor :action_type
1707
- # @return [String]
1708
- # Known values:
1709
- # - `success`
1710
- # - `pending`
1711
- # - `error`
1712
- attr_accessor :status
1713
- end
1714
-
1715
1520
  class SyncAccessCodes < ActionAttempt
1716
1521
  class Error < BaseResource
1717
1522
  # Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
@@ -2026,11 +1831,6 @@ module Seam
2026
1831
  # - `PUSH_THERMOSTAT_PROGRAMS`
2027
1832
  # - `CONFIGURE_AUTO_LOCK`
2028
1833
  # - `CONVERT_ACCESS_CODE_TO_MANAGED`
2029
- # - `SET_SPEAKER_VOLUME`
2030
- # - `SET_SPEAKER_MUTE`
2031
- # - `PAUSE_SPEAKER_PLAYBACK`
2032
- # - `RESUME_SPEAKER_PLAYBACK`
2033
- # - `PLAY_SPEAKER_CHIME`
2034
1834
  # - `SYNC_ACCESS_CODES`
2035
1835
  # - `CREATE_ACCESS_CODE`
2036
1836
  # - `DELETE_ACCESS_CODE`
@@ -2063,11 +1863,6 @@ module Seam
2063
1863
  "PUSH_THERMOSTAT_PROGRAMS" => PushThermostatPrograms,
2064
1864
  "CONFIGURE_AUTO_LOCK" => ConfigureAutoLock,
2065
1865
  "CONVERT_ACCESS_CODE_TO_MANAGED" => ConvertAccessCodeToManaged,
2066
- "SET_SPEAKER_VOLUME" => SetSpeakerVolume,
2067
- "SET_SPEAKER_MUTE" => SetSpeakerMute,
2068
- "PAUSE_SPEAKER_PLAYBACK" => PauseSpeakerPlayback,
2069
- "RESUME_SPEAKER_PLAYBACK" => ResumeSpeakerPlayback,
2070
- "PLAY_SPEAKER_CHIME" => PlaySpeakerChime,
2071
1866
  "SYNC_ACCESS_CODES" => SyncAccessCodes,
2072
1867
  "CREATE_ACCESS_CODE" => CreateAccessCode,
2073
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]