@seamapi/types 1.1184.0 → 1.1185.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seamapi/types",
3
- "version": "1.1184.0",
3
+ "version": "1.1185.0",
4
4
  "description": "TypeScript types for the Seam API.",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -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
  ---
@@ -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:
@@ -16685,6 +16685,14 @@ const openapi: OpenAPISpec = {
16685
16685
  type: 'object',
16686
16686
  'x-property-group-key': 'hardware',
16687
16687
  },
16688
+ air_quality_index: {
16689
+ description:
16690
+ 'Air quality index, if the device measures it. `null` until the first value arrives.',
16691
+ format: 'float',
16692
+ nullable: true,
16693
+ type: 'number',
16694
+ 'x-property-group-key': 'sensors',
16695
+ },
16688
16696
  appearance: {
16689
16697
  description:
16690
16698
  'Appearance-related properties, as reported by the device.',
@@ -16731,6 +16739,22 @@ const openapi: OpenAPISpec = {
16731
16739
  type: 'number',
16732
16740
  'x-property-group-key': 'hardware',
16733
16741
  },
16742
+ co2_ppm: {
16743
+ description:
16744
+ 'Carbon dioxide concentration in parts per million, if the device measures it. `null` until the first value arrives.',
16745
+ format: 'float',
16746
+ nullable: true,
16747
+ type: 'number',
16748
+ 'x-property-group-key': 'sensors',
16749
+ },
16750
+ co_ppm: {
16751
+ description:
16752
+ 'Carbon monoxide concentration in parts per million, if the device measures it. `null` until the first value arrives.',
16753
+ format: 'float',
16754
+ nullable: true,
16755
+ type: 'number',
16756
+ 'x-property-group-key': 'sensors',
16757
+ },
16734
16758
  currently_triggering_noise_threshold_ids: {
16735
16759
  description:
16736
16760
  'Array of noise threshold IDs that are currently triggering.',
@@ -16755,6 +16779,20 @@ const openapi: OpenAPISpec = {
16755
16779
  type: 'string',
16756
16780
  'x-property-group-key': 'hardware',
16757
16781
  },
16782
+ is_occupied: {
16783
+ description:
16784
+ 'Indicates whether the device detects that the space is occupied, if the device measures occupancy. `null` until the first value arrives.',
16785
+ nullable: true,
16786
+ type: 'boolean',
16787
+ 'x-property-group-key': 'sensors',
16788
+ },
16789
+ is_smoking_detected: {
16790
+ description:
16791
+ 'Indicates whether the device detects smoking, if the device measures it. `null` until the first value arrives.',
16792
+ nullable: true,
16793
+ type: 'boolean',
16794
+ 'x-property-group-key': 'sensors',
16795
+ },
16758
16796
  manufacturer: {
16759
16797
  description:
16760
16798
  'Manufacturer of the device. When a device, such as a smart lock, is connected through a smart hub, the manufacturer of the device might be different from that of the smart hub.',
@@ -16809,19 +16847,167 @@ const openapi: OpenAPISpec = {
16809
16847
  ],
16810
16848
  type: 'object',
16811
16849
  },
16850
+ mold_risk_level: {
16851
+ description:
16852
+ 'Mold risk level as reported by the device, if the device measures it. `null` until the first value arrives.',
16853
+ nullable: true,
16854
+ type: 'string',
16855
+ 'x-property-group-key': 'sensors',
16856
+ },
16812
16857
  name: {
16813
16858
  deprecated: true,
16814
16859
  description: 'Name of the device.',
16815
16860
  type: 'string',
16816
16861
  'x-deprecated': 'use device.display_name instead',
16817
16862
  },
16863
+ named_sensors: {
16864
+ description:
16865
+ '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.',
16866
+ items: {
16867
+ description:
16868
+ 'A sensor on the device, with the same measurement fields as the device.',
16869
+ properties: {
16870
+ air_quality_index: {
16871
+ description:
16872
+ 'Air quality index, if the device measures it. `null` until the first value arrives.',
16873
+ format: 'float',
16874
+ nullable: true,
16875
+ type: 'number',
16876
+ 'x-property-group-key': 'sensors',
16877
+ },
16878
+ co2_ppm: {
16879
+ description:
16880
+ 'Carbon dioxide concentration in parts per million, if the device measures it. `null` until the first value arrives.',
16881
+ format: 'float',
16882
+ nullable: true,
16883
+ type: 'number',
16884
+ 'x-property-group-key': 'sensors',
16885
+ },
16886
+ co_ppm: {
16887
+ description:
16888
+ 'Carbon monoxide concentration in parts per million, if the device measures it. `null` until the first value arrives.',
16889
+ format: 'float',
16890
+ nullable: true,
16891
+ type: 'number',
16892
+ 'x-property-group-key': 'sensors',
16893
+ },
16894
+ display_name: {
16895
+ description:
16896
+ 'Display name of the sensor. Defaults to `sensor_name`.',
16897
+ type: 'string',
16898
+ 'x-property-group-key': 'sensors',
16899
+ },
16900
+ is_occupied: {
16901
+ description:
16902
+ 'Indicates whether the device detects that the space is occupied, if the device measures occupancy. `null` until the first value arrives.',
16903
+ nullable: true,
16904
+ type: 'boolean',
16905
+ 'x-property-group-key': 'sensors',
16906
+ },
16907
+ is_smoking_detected: {
16908
+ description:
16909
+ 'Indicates whether the device detects smoking, if the device measures it. `null` until the first value arrives.',
16910
+ nullable: true,
16911
+ type: 'boolean',
16912
+ 'x-property-group-key': 'sensors',
16913
+ },
16914
+ mold_risk_level: {
16915
+ description:
16916
+ 'Mold risk level as reported by the device, if the device measures it. `null` until the first value arrives.',
16917
+ nullable: true,
16918
+ type: 'string',
16919
+ 'x-property-group-key': 'sensors',
16920
+ },
16921
+ noise_level_decibels: {
16922
+ description:
16923
+ 'Noise level in decibels. `null` until the first value arrives.',
16924
+ format: 'float',
16925
+ nullable: true,
16926
+ type: 'number',
16927
+ 'x-property-group-key': 'sensors',
16928
+ },
16929
+ noise_level_nrs: {
16930
+ description:
16931
+ 'Noise level as a Noise Risk Score (NRS), if the device reports one. `null` until the first value arrives.',
16932
+ format: 'float',
16933
+ nullable: true,
16934
+ type: 'number',
16935
+ 'x-property-group-key': 'sensors',
16936
+ },
16937
+ occupant_count: {
16938
+ description:
16939
+ 'Number of occupants the device detects, if the device counts occupants. `null` until the first value arrives.',
16940
+ format: 'float',
16941
+ nullable: true,
16942
+ type: 'number',
16943
+ 'x-property-group-key': 'sensors',
16944
+ },
16945
+ relative_humidity: {
16946
+ description:
16947
+ 'Reported relative humidity, as a value between 0 and 1, inclusive. `null` until the first value arrives.',
16948
+ format: 'float',
16949
+ maximum: 1,
16950
+ minimum: 0,
16951
+ nullable: true,
16952
+ type: 'number',
16953
+ 'x-property-group-key': 'sensors',
16954
+ },
16955
+ sensor_name: {
16956
+ description:
16957
+ 'Stable, hardware-defined name of the sensor, such as a port number.',
16958
+ type: 'string',
16959
+ 'x-property-group-key': 'sensors',
16960
+ },
16961
+ temperature_celsius: {
16962
+ description:
16963
+ 'Reported temperature in °C. `null` until the first value arrives.',
16964
+ format: 'float',
16965
+ nullable: true,
16966
+ type: 'number',
16967
+ 'x-property-group-key': 'sensors',
16968
+ },
16969
+ temperature_fahrenheit: {
16970
+ description:
16971
+ 'Reported temperature in °F. `null` until the first value arrives.',
16972
+ format: 'float',
16973
+ nullable: true,
16974
+ type: 'number',
16975
+ 'x-property-group-key': 'sensors',
16976
+ },
16977
+ },
16978
+ required: ['sensor_name', 'display_name'],
16979
+ type: 'object',
16980
+ 'x-property-groups': {
16981
+ sensors: { name: 'Sensors' },
16982
+ },
16983
+ },
16984
+ type: 'array',
16985
+ 'x-property-group-key': 'sensors',
16986
+ },
16818
16987
  noise_level_decibels: {
16819
16988
  description:
16820
16989
  'Indicates current noise level in decibels, if the device supports noise detection.',
16821
16990
  format: 'float',
16991
+ nullable: true,
16822
16992
  type: 'number',
16823
16993
  'x-property-group-key': 'noise_sensors',
16824
16994
  },
16995
+ noise_level_nrs: {
16996
+ description:
16997
+ 'Noise level as a Noise Risk Score (NRS), if the device reports one. `null` until the first value arrives.',
16998
+ format: 'float',
16999
+ nullable: true,
17000
+ type: 'number',
17001
+ 'x-property-group-key': 'sensors',
17002
+ },
17003
+ occupant_count: {
17004
+ description:
17005
+ 'Number of occupants the device detects, if the device counts occupants. `null` until the first value arrives.',
17006
+ format: 'float',
17007
+ nullable: true,
17008
+ type: 'number',
17009
+ 'x-property-group-key': 'sensors',
17010
+ },
16825
17011
  offline_access_codes_enabled: {
16826
17012
  deprecated: true,
16827
17013
  description:
@@ -19591,18 +19777,21 @@ const openapi: OpenAPISpec = {
19591
19777
  format: 'float',
19592
19778
  maximum: 1,
19593
19779
  minimum: 0,
19780
+ nullable: true,
19594
19781
  type: 'number',
19595
19782
  'x-property-group-key': 'thermostats',
19596
19783
  },
19597
19784
  temperature_celsius: {
19598
19785
  description: 'Reported temperature in °C.',
19599
19786
  format: 'float',
19787
+ nullable: true,
19600
19788
  type: 'number',
19601
19789
  'x-property-group-key': 'thermostats',
19602
19790
  },
19603
19791
  temperature_fahrenheit: {
19604
19792
  description: 'Reported temperature in °F.',
19605
19793
  format: 'float',
19794
+ nullable: true,
19606
19795
  type: 'number',
19607
19796
  'x-property-group-key': 'thermostats',
19608
19797
  },
@@ -19823,6 +20012,7 @@ const openapi: OpenAPISpec = {
19823
20012
  noise_sensors: { name: 'Noise Sensors' },
19824
20013
  phones: { name: 'Phones' },
19825
20014
  provider_metadata: { name: 'Provider Metadata' },
20015
+ sensors: { name: 'Sensors' },
19826
20016
  speakers: { name: 'Speakers' },
19827
20017
  thermostats: { name: 'Thermostats' },
19828
20018
  },