@seamapi/types 1.1184.0 → 1.1186.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.
- package/lib/seam/connect/models/devices/capability-properties/index.d.ts +9 -9
- package/lib/seam/connect/models/devices/capability-properties/thermostat.d.ts +9 -9
- package/lib/seam/connect/models/devices/capability-properties/thermostat.js +3 -3
- package/lib/seam/connect/models/devices/capability-properties/thermostat.js.map +1 -1
- package/lib/seam/connect/models/devices/device-metadata.d.ts +33 -0
- package/lib/seam/connect/models/devices/device-metadata.js +31 -0
- package/lib/seam/connect/models/devices/device-metadata.js.map +1 -1
- package/lib/seam/connect/models/devices/device-provider.d.ts +2 -1
- package/lib/seam/connect/models/devices/device-provider.js +2 -0
- package/lib/seam/connect/models/devices/device-provider.js.map +1 -1
- package/lib/seam/connect/models/devices/device-type.d.ts +7 -1
- package/lib/seam/connect/models/devices/device-type.js +8 -0
- package/lib/seam/connect/models/devices/device-type.js.map +1 -1
- package/lib/seam/connect/models/devices/device.d.ts +371 -26
- package/lib/seam/connect/models/devices/device.js +159 -0
- package/lib/seam/connect/models/devices/device.js.map +1 -1
- package/lib/seam/connect/models/devices/unmanaged-device.d.ts +205 -16
- package/lib/seam/connect/openapi.js +229 -1
- package/lib/seam/connect/openapi.js.map +1 -1
- package/lib/seam/connect/route-types.d.ts +1117 -97
- package/package.json +1 -1
- package/src/lib/seam/connect/models/devices/capability-properties/thermostat.ts +3 -3
- package/src/lib/seam/connect/models/devices/device-metadata.ts +32 -0
- package/src/lib/seam/connect/models/devices/device-provider.ts +2 -0
- package/src/lib/seam/connect/models/devices/device-type.ts +16 -0
- package/src/lib/seam/connect/models/devices/device.ts +187 -0
- package/src/lib/seam/connect/openapi.ts +257 -1
- package/src/lib/seam/connect/route-types.ts +1240 -69
package/package.json
CHANGED
|
@@ -13,19 +13,19 @@ import {
|
|
|
13
13
|
|
|
14
14
|
export const thermostat_capability_properties = z
|
|
15
15
|
.object({
|
|
16
|
-
temperature_fahrenheit: z.number().describe(`
|
|
16
|
+
temperature_fahrenheit: z.number().nullable().describe(`
|
|
17
17
|
---
|
|
18
18
|
property_group_key: thermostats
|
|
19
19
|
---
|
|
20
20
|
Reported temperature in °F.
|
|
21
21
|
`),
|
|
22
|
-
temperature_celsius: z.number().describe(`
|
|
22
|
+
temperature_celsius: z.number().nullable().describe(`
|
|
23
23
|
---
|
|
24
24
|
property_group_key: thermostats
|
|
25
25
|
---
|
|
26
26
|
Reported temperature in °C.
|
|
27
27
|
`),
|
|
28
|
-
relative_humidity: z.number().min(0).max(1).describe(`
|
|
28
|
+
relative_humidity: z.number().min(0).max(1).nullable().describe(`
|
|
29
29
|
---
|
|
30
30
|
property_group_key: thermostats
|
|
31
31
|
---
|
|
@@ -1241,6 +1241,38 @@ export const device_metadata = z
|
|
|
1241
1241
|
.optional()
|
|
1242
1242
|
.describe('Metadata for a Reolink camera.'),
|
|
1243
1243
|
|
|
1244
|
+
alertify_metadata: z
|
|
1245
|
+
.object({
|
|
1246
|
+
device_id: z
|
|
1247
|
+
.string()
|
|
1248
|
+
.optional()
|
|
1249
|
+
.describe('Device ID reported by Alertify.'),
|
|
1250
|
+
device_name: z
|
|
1251
|
+
.string()
|
|
1252
|
+
.optional()
|
|
1253
|
+
.describe('Device name, as set in the Alertify dashboard.'),
|
|
1254
|
+
unit_id: z
|
|
1255
|
+
.string()
|
|
1256
|
+
.optional()
|
|
1257
|
+
.describe('ID of the Alertify unit where the device is installed.'),
|
|
1258
|
+
unit_name: z
|
|
1259
|
+
.string()
|
|
1260
|
+
.optional()
|
|
1261
|
+
.describe('Name of the Alertify unit where the device is installed.'),
|
|
1262
|
+
building_id: z
|
|
1263
|
+
.string()
|
|
1264
|
+
.nullable()
|
|
1265
|
+
.optional()
|
|
1266
|
+
.describe('ID of the Alertify building that contains the unit.'),
|
|
1267
|
+
})
|
|
1268
|
+
.partial()
|
|
1269
|
+
.optional().describe(`
|
|
1270
|
+
---
|
|
1271
|
+
undocumented: Unreleased.
|
|
1272
|
+
---
|
|
1273
|
+
Metadata for an Alertify sensor.
|
|
1274
|
+
`),
|
|
1275
|
+
|
|
1244
1276
|
unifi_protect_metadata: z
|
|
1245
1277
|
.object({
|
|
1246
1278
|
camera_id: z
|
|
@@ -68,6 +68,7 @@ export const DEVICE_PROVIDERS = {
|
|
|
68
68
|
REOLINK: 'reolink',
|
|
69
69
|
UNIFI_PROTECT: 'unifi_protect',
|
|
70
70
|
YALE_CONNECT: 'yale_connect',
|
|
71
|
+
ALERTIFY: 'alertify',
|
|
71
72
|
ICAL: 'ical',
|
|
72
73
|
LODGIFY: 'lodgify',
|
|
73
74
|
HOSTAWAY: 'hostaway',
|
|
@@ -170,6 +171,7 @@ export const PROVIDER_CATEGORY_MAP = {
|
|
|
170
171
|
'reolink',
|
|
171
172
|
'unifi_protect',
|
|
172
173
|
'yale_connect',
|
|
174
|
+
'alertify',
|
|
173
175
|
],
|
|
174
176
|
|
|
175
177
|
thermostats: [
|
|
@@ -165,6 +165,21 @@ export const speaker_device_type = z
|
|
|
165
165
|
|
|
166
166
|
export type SpeakerDeviceType = z.infer<typeof speaker_device_type>
|
|
167
167
|
|
|
168
|
+
export const SENSOR_DEVICE_TYPE = {
|
|
169
|
+
ALERTIFY_SENSOR: 'alertify_sensor',
|
|
170
|
+
} as const
|
|
171
|
+
|
|
172
|
+
type SensorDeviceTypeFromMapping =
|
|
173
|
+
(typeof SENSOR_DEVICE_TYPE)[keyof typeof SENSOR_DEVICE_TYPE]
|
|
174
|
+
|
|
175
|
+
export const SENSOR_DEVICE_TYPE_LIST = Object.values(SENSOR_DEVICE_TYPE)
|
|
176
|
+
|
|
177
|
+
export const sensor_device_type = z
|
|
178
|
+
.enum(Object.values(SENSOR_DEVICE_TYPE) as [SensorDeviceTypeFromMapping])
|
|
179
|
+
.describe('Device type for environmental sensors.')
|
|
180
|
+
|
|
181
|
+
export type SensorDeviceType = z.infer<typeof sensor_device_type>
|
|
182
|
+
|
|
168
183
|
export const any_device_type = z.union([
|
|
169
184
|
lock_device_type,
|
|
170
185
|
key_device_type,
|
|
@@ -173,6 +188,7 @@ export const any_device_type = z.union([
|
|
|
173
188
|
phone_device_type,
|
|
174
189
|
camera_device_type,
|
|
175
190
|
speaker_device_type,
|
|
191
|
+
sensor_device_type,
|
|
176
192
|
])
|
|
177
193
|
|
|
178
194
|
export type AnyDeviceType = z.infer<typeof any_device_type>
|
|
@@ -853,6 +853,178 @@ export const device_manufacturer_info = z
|
|
|
853
853
|
|
|
854
854
|
export type DeviceManufacturerInfo = z.infer<typeof device_manufacturer_info>
|
|
855
855
|
|
|
856
|
+
const additional_sensor_measurement_properties = z.object({
|
|
857
|
+
noise_level_nrs: z
|
|
858
|
+
.number()
|
|
859
|
+
.nullable()
|
|
860
|
+
.describe(
|
|
861
|
+
`
|
|
862
|
+
---
|
|
863
|
+
property_group_key: sensors
|
|
864
|
+
---
|
|
865
|
+
Noise level as a Noise Risk Score (NRS), if the device reports one. \`null\` until the first value arrives.
|
|
866
|
+
`,
|
|
867
|
+
)
|
|
868
|
+
.optional(),
|
|
869
|
+
co2_ppm: z
|
|
870
|
+
.number()
|
|
871
|
+
.nullable()
|
|
872
|
+
.describe(
|
|
873
|
+
`
|
|
874
|
+
---
|
|
875
|
+
property_group_key: sensors
|
|
876
|
+
---
|
|
877
|
+
Carbon dioxide concentration in parts per million, if the device measures it. \`null\` until the first value arrives.
|
|
878
|
+
`,
|
|
879
|
+
)
|
|
880
|
+
.optional(),
|
|
881
|
+
co_ppm: z
|
|
882
|
+
.number()
|
|
883
|
+
.nullable()
|
|
884
|
+
.describe(
|
|
885
|
+
`
|
|
886
|
+
---
|
|
887
|
+
property_group_key: sensors
|
|
888
|
+
---
|
|
889
|
+
Carbon monoxide concentration in parts per million, if the device measures it. \`null\` until the first value arrives.
|
|
890
|
+
`,
|
|
891
|
+
)
|
|
892
|
+
.optional(),
|
|
893
|
+
air_quality_index: z
|
|
894
|
+
.number()
|
|
895
|
+
.nullable()
|
|
896
|
+
.describe(
|
|
897
|
+
`
|
|
898
|
+
---
|
|
899
|
+
property_group_key: sensors
|
|
900
|
+
---
|
|
901
|
+
Air quality index, if the device measures it. \`null\` until the first value arrives.
|
|
902
|
+
`,
|
|
903
|
+
)
|
|
904
|
+
.optional(),
|
|
905
|
+
mold_risk_level: z
|
|
906
|
+
.string()
|
|
907
|
+
.nullable()
|
|
908
|
+
.describe(
|
|
909
|
+
`
|
|
910
|
+
---
|
|
911
|
+
property_group_key: sensors
|
|
912
|
+
---
|
|
913
|
+
Mold risk level as reported by the device, if the device measures it. \`null\` until the first value arrives.
|
|
914
|
+
`,
|
|
915
|
+
)
|
|
916
|
+
.optional(),
|
|
917
|
+
is_occupied: z
|
|
918
|
+
.boolean()
|
|
919
|
+
.nullable()
|
|
920
|
+
.describe(
|
|
921
|
+
`
|
|
922
|
+
---
|
|
923
|
+
property_group_key: sensors
|
|
924
|
+
---
|
|
925
|
+
Indicates whether the device detects that the space is occupied, if the device measures occupancy. \`null\` until the first value arrives.
|
|
926
|
+
`,
|
|
927
|
+
)
|
|
928
|
+
.optional(),
|
|
929
|
+
occupant_count: z
|
|
930
|
+
.number()
|
|
931
|
+
.nullable()
|
|
932
|
+
.describe(
|
|
933
|
+
`
|
|
934
|
+
---
|
|
935
|
+
property_group_key: sensors
|
|
936
|
+
---
|
|
937
|
+
Number of occupants the device detects, if the device counts occupants. \`null\` until the first value arrives.
|
|
938
|
+
`,
|
|
939
|
+
)
|
|
940
|
+
.optional(),
|
|
941
|
+
is_smoking_detected: z
|
|
942
|
+
.boolean()
|
|
943
|
+
.nullable()
|
|
944
|
+
.describe(
|
|
945
|
+
`
|
|
946
|
+
---
|
|
947
|
+
property_group_key: sensors
|
|
948
|
+
---
|
|
949
|
+
Indicates whether the device detects smoking, if the device measures it. \`null\` until the first value arrives.
|
|
950
|
+
`,
|
|
951
|
+
)
|
|
952
|
+
.optional(),
|
|
953
|
+
})
|
|
954
|
+
|
|
955
|
+
export const named_sensor = z.object({
|
|
956
|
+
sensor_name: z.string().describe(`
|
|
957
|
+
---
|
|
958
|
+
property_group_key: sensors
|
|
959
|
+
---
|
|
960
|
+
Stable, hardware-defined name of the sensor, such as a port number.
|
|
961
|
+
`),
|
|
962
|
+
display_name: z.string().describe(`
|
|
963
|
+
---
|
|
964
|
+
property_group_key: sensors
|
|
965
|
+
---
|
|
966
|
+
Display name of the sensor. Defaults to \`sensor_name\`.
|
|
967
|
+
`),
|
|
968
|
+
temperature_celsius: z
|
|
969
|
+
.number()
|
|
970
|
+
.nullable()
|
|
971
|
+
.describe(
|
|
972
|
+
`
|
|
973
|
+
---
|
|
974
|
+
property_group_key: sensors
|
|
975
|
+
---
|
|
976
|
+
Reported temperature in °C. \`null\` until the first value arrives.
|
|
977
|
+
`,
|
|
978
|
+
)
|
|
979
|
+
.optional(),
|
|
980
|
+
temperature_fahrenheit: z
|
|
981
|
+
.number()
|
|
982
|
+
.nullable()
|
|
983
|
+
.describe(
|
|
984
|
+
`
|
|
985
|
+
---
|
|
986
|
+
property_group_key: sensors
|
|
987
|
+
---
|
|
988
|
+
Reported temperature in °F. \`null\` until the first value arrives.
|
|
989
|
+
`,
|
|
990
|
+
)
|
|
991
|
+
.optional(),
|
|
992
|
+
relative_humidity: z
|
|
993
|
+
.number()
|
|
994
|
+
.min(0)
|
|
995
|
+
.max(1)
|
|
996
|
+
.nullable()
|
|
997
|
+
.describe(
|
|
998
|
+
`
|
|
999
|
+
---
|
|
1000
|
+
property_group_key: sensors
|
|
1001
|
+
---
|
|
1002
|
+
Reported relative humidity, as a value between 0 and 1, inclusive. \`null\` until the first value arrives.
|
|
1003
|
+
`,
|
|
1004
|
+
)
|
|
1005
|
+
.optional(),
|
|
1006
|
+
noise_level_decibels: z
|
|
1007
|
+
.number()
|
|
1008
|
+
.nullable()
|
|
1009
|
+
.describe(
|
|
1010
|
+
`
|
|
1011
|
+
---
|
|
1012
|
+
property_group_key: sensors
|
|
1013
|
+
---
|
|
1014
|
+
Noise level in decibels. \`null\` until the first value arrives.
|
|
1015
|
+
`,
|
|
1016
|
+
)
|
|
1017
|
+
.optional(),
|
|
1018
|
+
...additional_sensor_measurement_properties.shape,
|
|
1019
|
+
}).describe(`
|
|
1020
|
+
---
|
|
1021
|
+
property_groups:
|
|
1022
|
+
sensors:
|
|
1023
|
+
name: Sensors
|
|
1024
|
+
---
|
|
1025
|
+
A sensor on the device, with the same measurement fields as the device.
|
|
1026
|
+
`)
|
|
1027
|
+
|
|
856
1028
|
export const common_device_properties = z.object({
|
|
857
1029
|
online: z.boolean().describe('Indicates whether the device is online.'),
|
|
858
1030
|
name: z.string().describe(`
|
|
@@ -1022,6 +1194,7 @@ export const common_device_properties = z.object({
|
|
|
1022
1194
|
.optional(),
|
|
1023
1195
|
noise_level_decibels: z
|
|
1024
1196
|
.number()
|
|
1197
|
+
.nullable()
|
|
1025
1198
|
.describe(
|
|
1026
1199
|
`
|
|
1027
1200
|
---
|
|
@@ -1042,6 +1215,18 @@ export const common_device_properties = z.object({
|
|
|
1042
1215
|
`,
|
|
1043
1216
|
)
|
|
1044
1217
|
.optional(),
|
|
1218
|
+
...additional_sensor_measurement_properties.shape,
|
|
1219
|
+
named_sensors: z
|
|
1220
|
+
.array(named_sensor)
|
|
1221
|
+
.describe(
|
|
1222
|
+
`
|
|
1223
|
+
---
|
|
1224
|
+
property_group_key: sensors
|
|
1225
|
+
---
|
|
1226
|
+
Additional sensors of the same kind on the device, each with a stable \`sensor_name\`. Present only when the device has more than one sensor of a kind or no single main sensor.
|
|
1227
|
+
`,
|
|
1228
|
+
)
|
|
1229
|
+
.optional(),
|
|
1045
1230
|
})
|
|
1046
1231
|
|
|
1047
1232
|
export const device_and_connected_account_error_options = [
|
|
@@ -1095,6 +1280,8 @@ export const device = z
|
|
|
1095
1280
|
name: Hardware
|
|
1096
1281
|
noise_sensors:
|
|
1097
1282
|
name: Noise Sensors
|
|
1283
|
+
sensors:
|
|
1284
|
+
name: Sensors
|
|
1098
1285
|
speakers:
|
|
1099
1286
|
name: Speakers
|
|
1100
1287
|
phones:
|