seam 2.167.0 → 2.168.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.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/lib/seam/resources/access_code.rb +4 -2
- data/lib/seam/resources/action_attempt.rb +73 -0
- data/lib/seam/resources/device.rb +12 -4
- data/lib/seam/resources/device_provider.rb +1 -0
- data/lib/seam/resources/event.rb +155 -0
- data/lib/seam/resources/thermostat_schedule.rb +37 -0
- data/lib/seam/resources/unmanaged_access_code.rb +4 -2
- data/lib/seam/resources/unmanaged_device.rb +2 -0
- data/lib/seam/routes/action_attempts.rb +4 -3
- data/lib/seam/routes/devices.rb +4 -2
- data/lib/seam/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8394a614c21d9fd1171d46bbd304407e1896314a84e0cfc3a80b97decb08850b
|
|
4
|
+
data.tar.gz: c835a647217cabb162725f5d6795d225a7dcffeb932ebaeea8cce91ce02bbfe0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f9f3b78e9661eb9f2ccdba4134280d359227f8ea9567bb1e819912c6c6e1caa13d93f4d1187280fee7f20a7acae43fe0577b4fe3a1f0d2b7628507c0bba4a831
|
|
7
|
+
data.tar.gz: b906ef284b4e6717767a49636c6df1650dbc81afc822faa23bb73fd8cdf653d859998cec0651e3e7f837fe0ed0bcd667d43b81177b50e2f9e5a096d7ff6f8929
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
seam (2.
|
|
4
|
+
seam (2.168.0)
|
|
5
5
|
faraday (~> 2.7)
|
|
6
6
|
faraday-retry (~> 2.2)
|
|
7
7
|
svix (~> 1.30)
|
|
@@ -171,7 +171,7 @@ CHECKSUMS
|
|
|
171
171
|
rubocop-ast (1.50.0) sha256=b9ca88300da0803ee222ad20cdb30494c0a784eed06fdc35d254b06d662788db
|
|
172
172
|
rubocop-performance (1.26.1) sha256=cd19b936ff196df85829d264b522fd4f98b6c89ad271fa52744a8c11b8f71834
|
|
173
173
|
ruby-progressbar (1.13.0) sha256=80fc9c47a9b640d6834e0dc7b3c94c9df37f08cb072b7761e4a71e22cff29b33
|
|
174
|
-
seam (2.
|
|
174
|
+
seam (2.168.0)
|
|
175
175
|
simplecov (1.1.1) sha256=25825ef13f0b2e74694d769817dad6ab8e90131dabdaa666e522fea105521e78
|
|
176
176
|
simplecov-console (0.9.5) sha256=b1108bcfff5f210143e2b8301698c367b01586f20d25a73e95475a5df6fc6ff6
|
|
177
177
|
standard (1.56.0) sha256=ae2af4d9669589162ac69ed5ef59dcf9f346d4afc81f7e62b84339310dfcb787
|
|
@@ -154,11 +154,12 @@ module Seam
|
|
|
154
154
|
# List of fields that were changed externally, with their previous and new values.
|
|
155
155
|
# @return [Array<ModifiedFields>]
|
|
156
156
|
resource_list_accessor :modified_fields, ModifiedFields
|
|
157
|
-
# Indicates the type of external modification. `modified` means the code's PIN or schedule was changed. `removed` means the code was deleted from the device.
|
|
157
|
+
# Indicates the type of external modification. `modified` means the code's PIN or schedule was changed. `removed` means the code was deleted from the device. `deactivated` means the code is still on the device but was disabled or suspended.
|
|
158
158
|
# @return [String, nil]
|
|
159
159
|
# Known values:
|
|
160
160
|
# - `modified`
|
|
161
161
|
# - `removed`
|
|
162
|
+
# - `deactivated`
|
|
162
163
|
attr_accessor :change_type
|
|
163
164
|
# Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
|
|
164
165
|
# @return [String]
|
|
@@ -720,11 +721,12 @@ module Seam
|
|
|
720
721
|
# List of fields that were changed externally, with their previous and new values.
|
|
721
722
|
# @return [Array<ModifiedFields>]
|
|
722
723
|
resource_list_accessor :modified_fields, ModifiedFields
|
|
723
|
-
# Indicates the type of external modification. `modified` means the code's PIN or schedule was changed. `removed` means the code was deleted from the device.
|
|
724
|
+
# Indicates the type of external modification. `modified` means the code's PIN or schedule was changed. `removed` means the code was deleted from the device. `deactivated` means the code is still on the device but was disabled or suspended.
|
|
724
725
|
# @return [String, nil]
|
|
725
726
|
# Known values:
|
|
726
727
|
# - `modified`
|
|
727
728
|
# - `removed`
|
|
729
|
+
# - `deactivated`
|
|
728
730
|
attr_accessor :change_type
|
|
729
731
|
# Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
|
|
730
732
|
# @return [String]
|
|
@@ -54,6 +54,9 @@ module Seam
|
|
|
54
54
|
# - `pending`
|
|
55
55
|
# - `error`
|
|
56
56
|
attr_accessor :status
|
|
57
|
+
# Date and time at which the action attempt was created.
|
|
58
|
+
# @return [Time]
|
|
59
|
+
date_accessor :created_at
|
|
57
60
|
end
|
|
58
61
|
|
|
59
62
|
# Unlocking a door is pending.
|
|
@@ -97,6 +100,9 @@ module Seam
|
|
|
97
100
|
# - `pending`
|
|
98
101
|
# - `error`
|
|
99
102
|
attr_accessor :status
|
|
103
|
+
# Date and time at which the action attempt was created.
|
|
104
|
+
# @return [Time]
|
|
105
|
+
date_accessor :created_at
|
|
100
106
|
end
|
|
101
107
|
|
|
102
108
|
# Reading credential data from the physical encoder is pending.
|
|
@@ -430,6 +436,9 @@ module Seam
|
|
|
430
436
|
# - `pending`
|
|
431
437
|
# - `error`
|
|
432
438
|
attr_accessor :status
|
|
439
|
+
# Date and time at which the action attempt was created.
|
|
440
|
+
# @return [Time]
|
|
441
|
+
date_accessor :created_at
|
|
433
442
|
end
|
|
434
443
|
|
|
435
444
|
# Encoding credential data from the physical encoder onto a card is pending.
|
|
@@ -680,6 +689,9 @@ module Seam
|
|
|
680
689
|
# - `pending`
|
|
681
690
|
# - `error`
|
|
682
691
|
attr_accessor :status
|
|
692
|
+
# Date and time at which the action attempt was created.
|
|
693
|
+
# @return [Time]
|
|
694
|
+
date_accessor :created_at
|
|
683
695
|
end
|
|
684
696
|
|
|
685
697
|
# Scanning a physical card and assigning the credential is pending.
|
|
@@ -924,6 +936,9 @@ module Seam
|
|
|
924
936
|
# - `pending`
|
|
925
937
|
# - `error`
|
|
926
938
|
attr_accessor :status
|
|
939
|
+
# Date and time at which the action attempt was created.
|
|
940
|
+
# @return [Time]
|
|
941
|
+
date_accessor :created_at
|
|
927
942
|
end
|
|
928
943
|
|
|
929
944
|
# Assigning a credential to an access method is pending.
|
|
@@ -1115,6 +1130,9 @@ module Seam
|
|
|
1115
1130
|
# - `pending`
|
|
1116
1131
|
# - `error`
|
|
1117
1132
|
attr_accessor :status
|
|
1133
|
+
# Date and time at which the action attempt was created.
|
|
1134
|
+
# @return [Time]
|
|
1135
|
+
date_accessor :created_at
|
|
1118
1136
|
end
|
|
1119
1137
|
|
|
1120
1138
|
# Resetting a sandbox workspace is pending.
|
|
@@ -1155,6 +1173,9 @@ module Seam
|
|
|
1155
1173
|
# - `pending`
|
|
1156
1174
|
# - `error`
|
|
1157
1175
|
attr_accessor :status
|
|
1176
|
+
# Date and time at which the action attempt was created.
|
|
1177
|
+
# @return [Time]
|
|
1178
|
+
date_accessor :created_at
|
|
1158
1179
|
end
|
|
1159
1180
|
|
|
1160
1181
|
# Setting the fan mode is pending.
|
|
@@ -1195,6 +1216,9 @@ module Seam
|
|
|
1195
1216
|
# - `pending`
|
|
1196
1217
|
# - `error`
|
|
1197
1218
|
attr_accessor :status
|
|
1219
|
+
# Date and time at which the action attempt was created.
|
|
1220
|
+
# @return [Time]
|
|
1221
|
+
date_accessor :created_at
|
|
1198
1222
|
end
|
|
1199
1223
|
|
|
1200
1224
|
# Setting the HVAC mode is pending.
|
|
@@ -1235,6 +1259,9 @@ module Seam
|
|
|
1235
1259
|
# - `pending`
|
|
1236
1260
|
# - `error`
|
|
1237
1261
|
attr_accessor :status
|
|
1262
|
+
# Date and time at which the action attempt was created.
|
|
1263
|
+
# @return [Time]
|
|
1264
|
+
date_accessor :created_at
|
|
1238
1265
|
end
|
|
1239
1266
|
|
|
1240
1267
|
# Activating a climate preset is pending.
|
|
@@ -1275,6 +1302,9 @@ module Seam
|
|
|
1275
1302
|
# - `pending`
|
|
1276
1303
|
# - `error`
|
|
1277
1304
|
attr_accessor :status
|
|
1305
|
+
# Date and time at which the action attempt was created.
|
|
1306
|
+
# @return [Time]
|
|
1307
|
+
date_accessor :created_at
|
|
1278
1308
|
end
|
|
1279
1309
|
|
|
1280
1310
|
# Activating the weekly program is pending.
|
|
@@ -1315,6 +1345,9 @@ module Seam
|
|
|
1315
1345
|
# - `pending`
|
|
1316
1346
|
# - `error`
|
|
1317
1347
|
attr_accessor :status
|
|
1348
|
+
# Date and time at which the action attempt was created.
|
|
1349
|
+
# @return [Time]
|
|
1350
|
+
date_accessor :created_at
|
|
1318
1351
|
end
|
|
1319
1352
|
|
|
1320
1353
|
# Simulating a keypad code entry is pending.
|
|
@@ -1355,6 +1388,9 @@ module Seam
|
|
|
1355
1388
|
# - `pending`
|
|
1356
1389
|
# - `error`
|
|
1357
1390
|
attr_accessor :status
|
|
1391
|
+
# Date and time at which the action attempt was created.
|
|
1392
|
+
# @return [Time]
|
|
1393
|
+
date_accessor :created_at
|
|
1358
1394
|
end
|
|
1359
1395
|
|
|
1360
1396
|
# Simulating a manual lock action using a keypad is pending.
|
|
@@ -1395,6 +1431,9 @@ module Seam
|
|
|
1395
1431
|
# - `pending`
|
|
1396
1432
|
# - `error`
|
|
1397
1433
|
attr_accessor :status
|
|
1434
|
+
# Date and time at which the action attempt was created.
|
|
1435
|
+
# @return [Time]
|
|
1436
|
+
date_accessor :created_at
|
|
1398
1437
|
end
|
|
1399
1438
|
|
|
1400
1439
|
# Pushing thermostat weekly programs is pending.
|
|
@@ -1435,6 +1474,9 @@ module Seam
|
|
|
1435
1474
|
# - `pending`
|
|
1436
1475
|
# - `error`
|
|
1437
1476
|
attr_accessor :status
|
|
1477
|
+
# Date and time at which the action attempt was created.
|
|
1478
|
+
# @return [Time]
|
|
1479
|
+
date_accessor :created_at
|
|
1438
1480
|
end
|
|
1439
1481
|
|
|
1440
1482
|
# Configuring the auto-lock is pending.
|
|
@@ -1475,6 +1517,9 @@ module Seam
|
|
|
1475
1517
|
# - `pending`
|
|
1476
1518
|
# - `error`
|
|
1477
1519
|
attr_accessor :status
|
|
1520
|
+
# Date and time at which the action attempt was created.
|
|
1521
|
+
# @return [Time]
|
|
1522
|
+
date_accessor :created_at
|
|
1478
1523
|
end
|
|
1479
1524
|
|
|
1480
1525
|
# Converting an unmanaged access code to managed is pending.
|
|
@@ -1515,6 +1560,9 @@ module Seam
|
|
|
1515
1560
|
# - `pending`
|
|
1516
1561
|
# - `error`
|
|
1517
1562
|
attr_accessor :status
|
|
1563
|
+
# Date and time at which the action attempt was created.
|
|
1564
|
+
# @return [Time]
|
|
1565
|
+
date_accessor :created_at
|
|
1518
1566
|
end
|
|
1519
1567
|
|
|
1520
1568
|
class SyncAccessCodes < ActionAttempt
|
|
@@ -1554,6 +1602,9 @@ module Seam
|
|
|
1554
1602
|
# - `pending`
|
|
1555
1603
|
# - `error`
|
|
1556
1604
|
attr_accessor :status
|
|
1605
|
+
# Date and time at which the action attempt was created.
|
|
1606
|
+
# @return [Time]
|
|
1607
|
+
date_accessor :created_at
|
|
1557
1608
|
end
|
|
1558
1609
|
|
|
1559
1610
|
class CreateAccessCode < ActionAttempt
|
|
@@ -1596,6 +1647,9 @@ module Seam
|
|
|
1596
1647
|
# - `pending`
|
|
1597
1648
|
# - `error`
|
|
1598
1649
|
attr_accessor :status
|
|
1650
|
+
# Date and time at which the action attempt was created.
|
|
1651
|
+
# @return [Time]
|
|
1652
|
+
date_accessor :created_at
|
|
1599
1653
|
end
|
|
1600
1654
|
|
|
1601
1655
|
class DeleteAccessCode < ActionAttempt
|
|
@@ -1635,6 +1689,9 @@ module Seam
|
|
|
1635
1689
|
# - `pending`
|
|
1636
1690
|
# - `error`
|
|
1637
1691
|
attr_accessor :status
|
|
1692
|
+
# Date and time at which the action attempt was created.
|
|
1693
|
+
# @return [Time]
|
|
1694
|
+
date_accessor :created_at
|
|
1638
1695
|
end
|
|
1639
1696
|
|
|
1640
1697
|
class UpdateAccessCode < ActionAttempt
|
|
@@ -1677,6 +1734,9 @@ module Seam
|
|
|
1677
1734
|
# - `pending`
|
|
1678
1735
|
# - `error`
|
|
1679
1736
|
attr_accessor :status
|
|
1737
|
+
# Date and time at which the action attempt was created.
|
|
1738
|
+
# @return [Time]
|
|
1739
|
+
date_accessor :created_at
|
|
1680
1740
|
end
|
|
1681
1741
|
|
|
1682
1742
|
class CreateNoiseThreshold < ActionAttempt
|
|
@@ -1719,6 +1779,9 @@ module Seam
|
|
|
1719
1779
|
# - `pending`
|
|
1720
1780
|
# - `error`
|
|
1721
1781
|
attr_accessor :status
|
|
1782
|
+
# Date and time at which the action attempt was created.
|
|
1783
|
+
# @return [Time]
|
|
1784
|
+
date_accessor :created_at
|
|
1722
1785
|
end
|
|
1723
1786
|
|
|
1724
1787
|
class DeleteNoiseThreshold < ActionAttempt
|
|
@@ -1758,6 +1821,9 @@ module Seam
|
|
|
1758
1821
|
# - `pending`
|
|
1759
1822
|
# - `error`
|
|
1760
1823
|
attr_accessor :status
|
|
1824
|
+
# Date and time at which the action attempt was created.
|
|
1825
|
+
# @return [Time]
|
|
1826
|
+
date_accessor :created_at
|
|
1761
1827
|
end
|
|
1762
1828
|
|
|
1763
1829
|
class UpdateNoiseThreshold < ActionAttempt
|
|
@@ -1800,6 +1866,9 @@ module Seam
|
|
|
1800
1866
|
# - `pending`
|
|
1801
1867
|
# - `error`
|
|
1802
1868
|
attr_accessor :status
|
|
1869
|
+
# Date and time at which the action attempt was created.
|
|
1870
|
+
# @return [Time]
|
|
1871
|
+
date_accessor :created_at
|
|
1803
1872
|
end
|
|
1804
1873
|
|
|
1805
1874
|
# @return [Error, nil]
|
|
@@ -1846,6 +1915,10 @@ module Seam
|
|
|
1846
1915
|
# - `error`
|
|
1847
1916
|
attr_accessor :status
|
|
1848
1917
|
|
|
1918
|
+
# Date and time at which the action attempt was created.
|
|
1919
|
+
# @return [Time]
|
|
1920
|
+
date_accessor :created_at
|
|
1921
|
+
|
|
1849
1922
|
discriminated_by :action_type, {
|
|
1850
1923
|
"LOCK_DOOR" => LockDoor,
|
|
1851
1924
|
"UNLOCK_DOOR" => UnlockDoor,
|
|
@@ -397,9 +397,12 @@ module Seam
|
|
|
397
397
|
# Indicates whether the device detects smoking, if the device measures it.
|
|
398
398
|
# @return [Boolean, nil]
|
|
399
399
|
attr_accessor :is_smoking_detected
|
|
400
|
-
#
|
|
400
|
+
# Display wording for the current mold risk, as reported by the provider or derived by Seam. The values are not stable and are only for display; use mold_risk_index for logic.
|
|
401
401
|
# @return [String, nil]
|
|
402
|
-
attr_accessor :
|
|
402
|
+
attr_accessor :mold_display_risk
|
|
403
|
+
# Mold risk index from 0 (no risk) to 1 (high risk), if the device measures it. Seam defines this scale and maps each provider onto it: 0 = low, 0.5 = medium, 1 = high for providers that report levels.
|
|
404
|
+
# @return [Float, nil]
|
|
405
|
+
attr_accessor :mold_risk_index
|
|
403
406
|
# Noise level in decibels, if the device measures noise.
|
|
404
407
|
# @return [Float, nil]
|
|
405
408
|
attr_accessor :noise_level_decibels
|
|
@@ -2911,7 +2914,9 @@ module Seam
|
|
|
2911
2914
|
# - `sonos_speaker`
|
|
2912
2915
|
# - `alertify_sensor`
|
|
2913
2916
|
# - `hayward_pool_controller`
|
|
2917
|
+
# - `jandy_pool_controller`
|
|
2914
2918
|
# - `hayward_pool`
|
|
2919
|
+
# - `jandy_pool`
|
|
2915
2920
|
attr_accessor :device_type
|
|
2916
2921
|
# 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.
|
|
2917
2922
|
# @return [String]
|
|
@@ -2937,9 +2942,12 @@ module Seam
|
|
|
2937
2942
|
# Indicates whether the device detects smoking, if the device measures it.
|
|
2938
2943
|
# @return [Boolean, nil]
|
|
2939
2944
|
attr_accessor :is_smoking_detected
|
|
2940
|
-
#
|
|
2945
|
+
# Display wording for the current mold risk, as reported by the provider or derived by Seam. The values are not stable and are only for display; use mold_risk_index for logic.
|
|
2941
2946
|
# @return [String, nil]
|
|
2942
|
-
attr_accessor :
|
|
2947
|
+
attr_accessor :mold_display_risk
|
|
2948
|
+
# Mold risk index from 0 (no risk) to 1 (high risk), if the device measures it. Seam defines this scale and maps each provider onto it: 0 = low, 0.5 = medium, 1 = high for providers that report levels.
|
|
2949
|
+
# @return [Float, nil]
|
|
2950
|
+
attr_accessor :mold_risk_index
|
|
2943
2951
|
# Optional nickname to describe the device, settable through Seam.
|
|
2944
2952
|
# @return [String, nil]
|
|
2945
2953
|
attr_accessor :nickname
|
data/lib/seam/resources/event.rb
CHANGED
|
@@ -859,6 +859,9 @@ module Seam
|
|
|
859
859
|
# ID of the connected account associated with the affected access code.
|
|
860
860
|
# @return [String]
|
|
861
861
|
attr_accessor :connected_account_id
|
|
862
|
+
# Human-readable description of the deletion and its source.
|
|
863
|
+
# @return [String, nil]
|
|
864
|
+
attr_accessor :description
|
|
862
865
|
# Custom metadata of the device, present when device_id is provided.
|
|
863
866
|
# @return [Hash{String => String, Boolean}, nil]
|
|
864
867
|
attr_accessor :device_custom_metadata
|
|
@@ -1827,6 +1830,9 @@ module Seam
|
|
|
1827
1830
|
# Known values:
|
|
1828
1831
|
# - `access_method.deleted`
|
|
1829
1832
|
attr_accessor :event_type
|
|
1833
|
+
# IDs of the access codes that were still set on a device when the access method was deleted. Access may still be possible with these codes until Seam removes them from the device. Each access code keeps its own deletion lifecycle, so watch it for `access_code.deleted` or `access_code.failed_to_delete`. Only present when at least one access code was still set on a device.
|
|
1834
|
+
# @return [Array<String>]
|
|
1835
|
+
attr_accessor :failed_to_delete_access_code_ids
|
|
1830
1836
|
# ID of the workspace associated with the event.
|
|
1831
1837
|
# @return [String]
|
|
1832
1838
|
attr_accessor :workspace_id
|
|
@@ -3583,6 +3589,44 @@ module Seam
|
|
|
3583
3589
|
date_accessor :occurred_at
|
|
3584
3590
|
end
|
|
3585
3591
|
|
|
3592
|
+
# A sensor reported smoking. Emitted once when `is_smoking_detected` becomes true. No event is emitted when it returns to false; re-read the device for the current value.
|
|
3593
|
+
class SensorSmokingDetected < SeamEvent
|
|
3594
|
+
# Custom metadata of the connected account, present when connected_account_id is provided.
|
|
3595
|
+
# @return [Hash{String => String, Boolean}, nil]
|
|
3596
|
+
attr_accessor :connected_account_custom_metadata
|
|
3597
|
+
# ID of the connected account associated with the event.
|
|
3598
|
+
# @return [String]
|
|
3599
|
+
attr_accessor :connected_account_id
|
|
3600
|
+
# The customer key associated with the device, if any.
|
|
3601
|
+
# @return [String, nil]
|
|
3602
|
+
attr_accessor :customer_key
|
|
3603
|
+
# Custom metadata of the device, present when device_id is provided.
|
|
3604
|
+
# @return [Hash{String => String, Boolean}, nil]
|
|
3605
|
+
attr_accessor :device_custom_metadata
|
|
3606
|
+
# ID of the affected device.
|
|
3607
|
+
# @return [String]
|
|
3608
|
+
attr_accessor :device_id
|
|
3609
|
+
# Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event.
|
|
3610
|
+
# @return [String]
|
|
3611
|
+
attr_accessor :event_description
|
|
3612
|
+
# ID of the event.
|
|
3613
|
+
# @return [String]
|
|
3614
|
+
attr_accessor :event_id
|
|
3615
|
+
# @return [String]
|
|
3616
|
+
# Known values:
|
|
3617
|
+
# - `sensor.smoking_detected`
|
|
3618
|
+
attr_accessor :event_type
|
|
3619
|
+
# ID of the workspace associated with the event.
|
|
3620
|
+
# @return [String]
|
|
3621
|
+
attr_accessor :workspace_id
|
|
3622
|
+
# Date and time at which the event was created.
|
|
3623
|
+
# @return [Time]
|
|
3624
|
+
date_accessor :created_at
|
|
3625
|
+
# Date and time at which the event occurred.
|
|
3626
|
+
# @return [Time]
|
|
3627
|
+
date_accessor :occurred_at
|
|
3628
|
+
end
|
|
3629
|
+
|
|
3586
3630
|
# A device battery level dropped below the low threshold.
|
|
3587
3631
|
class DeviceLowBattery < SeamEvent
|
|
3588
3632
|
# Number in the range 0 to 1.0 indicating the battery level of the affected device's paired accessory keypad, when the device has one and its level is known.
|
|
@@ -4799,6 +4843,113 @@ module Seam
|
|
|
4799
4843
|
date_accessor :occurred_at
|
|
4800
4844
|
end
|
|
4801
4845
|
|
|
4846
|
+
# A [thermostat](https://www.seam.co/docs/capability-guides/thermostats) may fail to activate a [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) when a [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules) starts or ends, because the thermostat was offline shortly before the scheduled time. While the thermostat stays offline, the thermostat schedule carries a `climate_preset_activation_may_fail` warning until the scheduled time.
|
|
4847
|
+
class ThermostatScheduleClimatePresetActivationMayFail < SeamEvent
|
|
4848
|
+
class ConnectedAccountErrors < BaseResource
|
|
4849
|
+
# Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
|
|
4850
|
+
# @return [String]
|
|
4851
|
+
attr_accessor :error_code
|
|
4852
|
+
# Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
|
|
4853
|
+
# @return [String]
|
|
4854
|
+
attr_accessor :message
|
|
4855
|
+
# Date and time at which Seam created the error.
|
|
4856
|
+
# @return [Time]
|
|
4857
|
+
date_accessor :created_at
|
|
4858
|
+
end
|
|
4859
|
+
|
|
4860
|
+
class ConnectedAccountWarnings < BaseResource
|
|
4861
|
+
# Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
|
|
4862
|
+
# @return [String]
|
|
4863
|
+
attr_accessor :message
|
|
4864
|
+
# Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
|
|
4865
|
+
# @return [String]
|
|
4866
|
+
attr_accessor :warning_code
|
|
4867
|
+
# Date and time at which Seam created the warning.
|
|
4868
|
+
# @return [Time]
|
|
4869
|
+
date_accessor :created_at
|
|
4870
|
+
end
|
|
4871
|
+
|
|
4872
|
+
class DeviceErrors < BaseResource
|
|
4873
|
+
# Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
|
|
4874
|
+
# @return [String]
|
|
4875
|
+
attr_accessor :error_code
|
|
4876
|
+
# Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
|
|
4877
|
+
# @return [String]
|
|
4878
|
+
attr_accessor :message
|
|
4879
|
+
# Date and time at which Seam created the error.
|
|
4880
|
+
# @return [Time]
|
|
4881
|
+
date_accessor :created_at
|
|
4882
|
+
end
|
|
4883
|
+
|
|
4884
|
+
class DeviceWarnings < BaseResource
|
|
4885
|
+
# Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
|
|
4886
|
+
# @return [String]
|
|
4887
|
+
attr_accessor :message
|
|
4888
|
+
# Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
|
|
4889
|
+
# @return [String]
|
|
4890
|
+
attr_accessor :warning_code
|
|
4891
|
+
# Date and time at which Seam created the warning.
|
|
4892
|
+
# @return [Time]
|
|
4893
|
+
date_accessor :created_at
|
|
4894
|
+
end
|
|
4895
|
+
|
|
4896
|
+
# Errors associated with the connected account.
|
|
4897
|
+
# @return [Array<ConnectedAccountErrors>]
|
|
4898
|
+
resource_list_accessor :connected_account_errors, ConnectedAccountErrors
|
|
4899
|
+
# Warnings associated with the connected account.
|
|
4900
|
+
# @return [Array<ConnectedAccountWarnings>]
|
|
4901
|
+
resource_list_accessor :connected_account_warnings, ConnectedAccountWarnings
|
|
4902
|
+
# Errors associated with the device.
|
|
4903
|
+
# @return [Array<DeviceErrors>]
|
|
4904
|
+
resource_list_accessor :device_errors, DeviceErrors
|
|
4905
|
+
# Warnings associated with the device.
|
|
4906
|
+
# @return [Array<DeviceWarnings>]
|
|
4907
|
+
resource_list_accessor :device_warnings, DeviceWarnings
|
|
4908
|
+
# Custom metadata of the connected account, present when connected_account_id is provided.
|
|
4909
|
+
# @return [Hash{String => String, Boolean}, nil]
|
|
4910
|
+
attr_accessor :connected_account_custom_metadata
|
|
4911
|
+
# ID of the connected account associated with the event.
|
|
4912
|
+
# @return [String]
|
|
4913
|
+
attr_accessor :connected_account_id
|
|
4914
|
+
# The customer key associated with the device, if any.
|
|
4915
|
+
# @return [String, nil]
|
|
4916
|
+
attr_accessor :customer_key
|
|
4917
|
+
# Custom metadata of the device, present when device_id is provided.
|
|
4918
|
+
# @return [Hash{String => String, Boolean}, nil]
|
|
4919
|
+
attr_accessor :device_custom_metadata
|
|
4920
|
+
# ID of the affected device.
|
|
4921
|
+
# @return [String]
|
|
4922
|
+
attr_accessor :device_id
|
|
4923
|
+
# Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event.
|
|
4924
|
+
# @return [String]
|
|
4925
|
+
attr_accessor :event_description
|
|
4926
|
+
# ID of the event.
|
|
4927
|
+
# @return [String]
|
|
4928
|
+
attr_accessor :event_id
|
|
4929
|
+
# @return [String]
|
|
4930
|
+
# Known values:
|
|
4931
|
+
# - `thermostat_schedule.climate_preset_activation_may_fail`
|
|
4932
|
+
attr_accessor :event_type
|
|
4933
|
+
# ID of the thermostat schedule whose climate preset activation may fail.
|
|
4934
|
+
# @return [String]
|
|
4935
|
+
attr_accessor :thermostat_schedule_id
|
|
4936
|
+
# ID of the workspace associated with the event.
|
|
4937
|
+
# @return [String]
|
|
4938
|
+
attr_accessor :workspace_id
|
|
4939
|
+
# Date and time at which the event was created.
|
|
4940
|
+
# @return [Time]
|
|
4941
|
+
date_accessor :created_at
|
|
4942
|
+
# Date and time at which the event occurred.
|
|
4943
|
+
# @return [Time]
|
|
4944
|
+
date_accessor :occurred_at
|
|
4945
|
+
# Date and time at which the thermostat schedule ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format.
|
|
4946
|
+
# @return [Time]
|
|
4947
|
+
date_accessor :thermostat_schedule_ends_at
|
|
4948
|
+
# Date and time at which the thermostat schedule starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format.
|
|
4949
|
+
# @return [Time]
|
|
4950
|
+
date_accessor :thermostat_schedule_starts_at
|
|
4951
|
+
end
|
|
4952
|
+
|
|
4802
4953
|
# A [thermostat's](https://www.seam.co/docs/capability-guides/thermostats) temperature reading exceeded the set [threshold](https://www.seam.co/docs/capability-guides/thermostats/setting-and-monitoring-temperature-thresholds).
|
|
4803
4954
|
class ThermostatTemperatureThresholdExceeded < SeamEvent
|
|
4804
4955
|
# Custom metadata of the connected account, present when connected_account_id is provided.
|
|
@@ -5378,6 +5529,7 @@ module Seam
|
|
|
5378
5529
|
# - `device.disconnected`
|
|
5379
5530
|
# - `device.unmanaged.disconnected`
|
|
5380
5531
|
# - `device.tampered`
|
|
5532
|
+
# - `sensor.smoking_detected`
|
|
5381
5533
|
# - `device.low_battery`
|
|
5382
5534
|
# - `device.battery_status_changed`
|
|
5383
5535
|
# - `device.removed`
|
|
@@ -5401,6 +5553,7 @@ module Seam
|
|
|
5401
5553
|
# - `lock.door_closed`
|
|
5402
5554
|
# - `thermostat.climate_preset_activated`
|
|
5403
5555
|
# - `thermostat.manually_adjusted`
|
|
5556
|
+
# - `thermostat_schedule.climate_preset_activation_may_fail`
|
|
5404
5557
|
# - `thermostat.temperature_threshold_exceeded`
|
|
5405
5558
|
# - `thermostat.temperature_threshold_no_longer_exceeded`
|
|
5406
5559
|
# - `thermostat.temperature_reached_set_point`
|
|
@@ -5507,6 +5660,7 @@ module Seam
|
|
|
5507
5660
|
"device.disconnected" => DeviceDisconnected,
|
|
5508
5661
|
"device.unmanaged.disconnected" => DeviceUnmanagedDisconnected,
|
|
5509
5662
|
"device.tampered" => DeviceTampered,
|
|
5663
|
+
"sensor.smoking_detected" => SensorSmokingDetected,
|
|
5510
5664
|
"device.low_battery" => DeviceLowBattery,
|
|
5511
5665
|
"device.battery_status_changed" => DeviceBatteryStatusChanged,
|
|
5512
5666
|
"device.removed" => DeviceRemoved,
|
|
@@ -5530,6 +5684,7 @@ module Seam
|
|
|
5530
5684
|
"lock.door_closed" => LockDoorClosed,
|
|
5531
5685
|
"thermostat.climate_preset_activated" => ThermostatClimatePresetActivated,
|
|
5532
5686
|
"thermostat.manually_adjusted" => ThermostatManuallyAdjusted,
|
|
5687
|
+
"thermostat_schedule.climate_preset_activation_may_fail" => ThermostatScheduleClimatePresetActivationMayFail,
|
|
5533
5688
|
"thermostat.temperature_threshold_exceeded" => ThermostatTemperatureThresholdExceeded,
|
|
5534
5689
|
"thermostat.temperature_threshold_no_longer_exceeded" => ThermostatTemperatureThresholdNoLongerExceeded,
|
|
5535
5690
|
"thermostat.temperature_reached_set_point" => ThermostatTemperatureReachedSetPoint,
|
|
@@ -16,9 +16,46 @@ module Seam
|
|
|
16
16
|
date_accessor :created_at
|
|
17
17
|
end
|
|
18
18
|
|
|
19
|
+
# Known `warning_code` values load as subclasses; unknown values remain Warnings instances for forward compatibility.
|
|
20
|
+
class Warnings < BaseResource
|
|
21
|
+
# Indicates that the [thermostat](https://www.seam.co/docs/capability-guides/thermostats) may fail to activate a climate preset when the [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules) starts or ends. The warning message explains the cause. Currently present while the thermostat is offline and the next start or end of the thermostat schedule is less than an hour away; it clears automatically once the thermostat is back online or that time passes.
|
|
22
|
+
class ClimatePresetActivationMayFail < Warnings
|
|
23
|
+
# Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
|
|
24
|
+
# @return [String]
|
|
25
|
+
attr_accessor :message
|
|
26
|
+
# Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
|
|
27
|
+
# @return [String]
|
|
28
|
+
# Known values:
|
|
29
|
+
# - `climate_preset_activation_may_fail`
|
|
30
|
+
attr_accessor :warning_code
|
|
31
|
+
# Date and time at which Seam created the warning.
|
|
32
|
+
# @return [Time]
|
|
33
|
+
date_accessor :created_at
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
|
|
37
|
+
# @return [String]
|
|
38
|
+
attr_accessor :message
|
|
39
|
+
# Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
|
|
40
|
+
# @return [String]
|
|
41
|
+
# Known values:
|
|
42
|
+
# - `climate_preset_activation_may_fail`
|
|
43
|
+
attr_accessor :warning_code
|
|
44
|
+
# Date and time at which Seam created the warning.
|
|
45
|
+
# @return [Time]
|
|
46
|
+
date_accessor :created_at
|
|
47
|
+
|
|
48
|
+
discriminated_by :warning_code, {
|
|
49
|
+
"climate_preset_activation_may_fail" => ClimatePresetActivationMayFail
|
|
50
|
+
}.freeze
|
|
51
|
+
end
|
|
52
|
+
|
|
19
53
|
# Errors associated with the [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules).
|
|
20
54
|
# @return [Array<Errors>]
|
|
21
55
|
resource_list_accessor :errors, Errors
|
|
56
|
+
# Warnings associated with the [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules).
|
|
57
|
+
# @return [Array<Warnings>]
|
|
58
|
+
resource_list_accessor :warnings, Warnings
|
|
22
59
|
# Key of the [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) to use for the [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules).
|
|
23
60
|
# @return [String]
|
|
24
61
|
attr_accessor :climate_preset_key
|
|
@@ -156,11 +156,12 @@ module Seam
|
|
|
156
156
|
# List of fields that were changed externally, with their previous and new values.
|
|
157
157
|
# @return [Array<ModifiedFields>]
|
|
158
158
|
resource_list_accessor :modified_fields, ModifiedFields
|
|
159
|
-
# Indicates the type of external modification. `modified` means the code's PIN or schedule was changed. `removed` means the code was deleted from the device.
|
|
159
|
+
# Indicates the type of external modification. `modified` means the code's PIN or schedule was changed. `removed` means the code was deleted from the device. `deactivated` means the code is still on the device but was disabled or suspended.
|
|
160
160
|
# @return [String, nil]
|
|
161
161
|
# Known values:
|
|
162
162
|
# - `modified`
|
|
163
163
|
# - `removed`
|
|
164
|
+
# - `deactivated`
|
|
164
165
|
attr_accessor :change_type
|
|
165
166
|
# Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
|
|
166
167
|
# @return [String]
|
|
@@ -669,11 +670,12 @@ module Seam
|
|
|
669
670
|
# List of fields that were changed externally, with their previous and new values.
|
|
670
671
|
# @return [Array<ModifiedFields>]
|
|
671
672
|
resource_list_accessor :modified_fields, ModifiedFields
|
|
672
|
-
# Indicates the type of external modification. `modified` means the code's PIN or schedule was changed. `removed` means the code was deleted from the device.
|
|
673
|
+
# Indicates the type of external modification. `modified` means the code's PIN or schedule was changed. `removed` means the code was deleted from the device. `deactivated` means the code is still on the device but was disabled or suspended.
|
|
673
674
|
# @return [String, nil]
|
|
674
675
|
# Known values:
|
|
675
676
|
# - `modified`
|
|
676
677
|
# - `removed`
|
|
678
|
+
# - `deactivated`
|
|
677
679
|
attr_accessor :change_type
|
|
678
680
|
# Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
|
|
679
681
|
# @return [String]
|
|
@@ -1147,7 +1147,9 @@ module Seam
|
|
|
1147
1147
|
# - `sonos_speaker`
|
|
1148
1148
|
# - `alertify_sensor`
|
|
1149
1149
|
# - `hayward_pool_controller`
|
|
1150
|
+
# - `jandy_pool_controller`
|
|
1150
1151
|
# - `hayward_pool`
|
|
1152
|
+
# - `jandy_pool`
|
|
1151
1153
|
attr_accessor :device_type
|
|
1152
1154
|
# 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.
|
|
1153
1155
|
# @return [String]
|
|
@@ -21,14 +21,15 @@ module Seam
|
|
|
21
21
|
Seam::ActionAttemptResolver.resolve(Seam::Resources::ActionAttempt.from_http_response(res, "action_attempt", "/action_attempts/get"), @client, wait_for_action_attempt)
|
|
22
22
|
end
|
|
23
23
|
|
|
24
|
-
# Returns a list of the [action attempts](https://www.seam.co/docs/core-concepts/action-attempts) that you specify as an array of `action_attempt_id`s.
|
|
24
|
+
# Returns a list of the [action attempts](https://www.seam.co/docs/core-concepts/action-attempts) that you specify as an array of `action_attempt_id`s or by `device_id`, newest first.
|
|
25
25
|
# @param action_attempt_ids [Array<String>, nil] IDs of the action attempts that you want to retrieve.
|
|
26
|
+
# @param action_types [Array<String>, nil] Types of the action attempts that you want to list, such as `LOCK_DOOR` and `UNLOCK_DOOR`.
|
|
26
27
|
# @param device_id [String, nil] ID of the device to filter action attempts by.
|
|
27
28
|
# @param limit [Integer, nil] Maximum number of records to return per page.
|
|
28
29
|
# @param page_cursor [String, Seam::Null, nil] Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`.
|
|
29
30
|
# @return [Seam::Resources::ActionAttempt] OK
|
|
30
|
-
def list(action_attempt_ids: nil, device_id: nil, limit: nil, page_cursor: nil)
|
|
31
|
-
res = @client.get("/action_attempts/list", {action_attempt_ids: action_attempt_ids, device_id: device_id, limit: limit, page_cursor: page_cursor}.compact)
|
|
31
|
+
def list(action_attempt_ids: nil, action_types: nil, device_id: nil, limit: nil, page_cursor: nil)
|
|
32
|
+
res = @client.get("/action_attempts/list", {action_attempt_ids: action_attempt_ids, action_types: action_types, device_id: device_id, limit: limit, page_cursor: page_cursor}.compact)
|
|
32
33
|
|
|
33
34
|
Seam::Resources::ActionAttempt.list_from_http_response(res, "action_attempts", "/action_attempts/list")
|
|
34
35
|
end
|
data/lib/seam/routes/devices.rb
CHANGED
|
@@ -44,6 +44,8 @@ module Seam
|
|
|
44
44
|
# @param device_ids [Array<String>, nil] Array of device IDs for which you want to list devices.
|
|
45
45
|
# @param device_type [String, nil] Device type for which you want to list devices.
|
|
46
46
|
# @param device_types [Array<String>, nil] Array of device types for which you want to list devices.
|
|
47
|
+
# @param has_error_or_warning_codes [Array<String>, nil] Array of error and warning codes. Returns devices that have at least one error or warning with any of these codes.
|
|
48
|
+
# @param has_errors_or_warnings [Boolean, nil] Filters devices by whether they have any errors or warnings. Specify `true` to list only devices with at least one error or warning, or `false` to list only devices with none.
|
|
47
49
|
# @param limit [Float, nil] Numerical limit on the number of devices to return.
|
|
48
50
|
# @param manufacturer [String, nil] Manufacturer for which you want to list devices.
|
|
49
51
|
# @param page_cursor [String, Seam::Null, nil] Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`.
|
|
@@ -51,8 +53,8 @@ module Seam
|
|
|
51
53
|
# @param space_id [String, nil] ID of the space for which you want to list devices.
|
|
52
54
|
# @param user_identifier_key [String, nil] Your own internal user ID for the user for which you want to list devices.
|
|
53
55
|
# @return [Seam::Resources::Device] OK
|
|
54
|
-
def list(connect_webview_id: nil, connected_account_id: nil, connected_account_ids: nil, created_before: nil, custom_metadata_has: nil, customer_key: nil, device_ids: nil, device_type: nil, device_types: nil, limit: nil, manufacturer: nil, page_cursor: nil, search: nil, space_id: nil, user_identifier_key: nil)
|
|
55
|
-
res = @client.get("/devices/list", {connect_webview_id: connect_webview_id, connected_account_id: connected_account_id, connected_account_ids: connected_account_ids, created_before: created_before, custom_metadata_has: custom_metadata_has, customer_key: customer_key, device_ids: device_ids, device_type: device_type, device_types: device_types, limit: limit, manufacturer: manufacturer, page_cursor: page_cursor, search: search, space_id: space_id, user_identifier_key: user_identifier_key}.compact)
|
|
56
|
+
def list(connect_webview_id: nil, connected_account_id: nil, connected_account_ids: nil, created_before: nil, custom_metadata_has: nil, customer_key: nil, device_ids: nil, device_type: nil, device_types: nil, has_error_or_warning_codes: nil, has_errors_or_warnings: nil, limit: nil, manufacturer: nil, page_cursor: nil, search: nil, space_id: nil, user_identifier_key: nil)
|
|
57
|
+
res = @client.get("/devices/list", {connect_webview_id: connect_webview_id, connected_account_id: connected_account_id, connected_account_ids: connected_account_ids, created_before: created_before, custom_metadata_has: custom_metadata_has, customer_key: customer_key, device_ids: device_ids, device_type: device_type, device_types: device_types, has_error_or_warning_codes: has_error_or_warning_codes, has_errors_or_warnings: has_errors_or_warnings, limit: limit, manufacturer: manufacturer, page_cursor: page_cursor, search: search, space_id: space_id, user_identifier_key: user_identifier_key}.compact)
|
|
56
58
|
|
|
57
59
|
Seam::Resources::Device.list_from_http_response(res, "devices", "/devices/list")
|
|
58
60
|
end
|
data/lib/seam/version.rb
CHANGED