@seamapi/types 1.223.0 → 1.225.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.223.0",
3
+ "version": "1.225.0",
4
4
  "description": "TypeScript types for the Seam API.",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -7,70 +7,38 @@ import {
7
7
  hvac_mode_setting,
8
8
  } from '../../thermostats/index.js'
9
9
 
10
- const base_thermostat_capability_properties = z.object({
11
- temperature_fahrenheit: z.number(),
12
- temperature_celsius: z.number(),
13
- relative_humidity: z.number().min(0).max(1),
14
- can_enable_automatic_heating: z.boolean(),
15
- can_enable_automatic_cooling: z.boolean(),
16
- available_hvac_mode_settings: z.array(hvac_mode_setting),
17
- is_heating_available: z.literal(false),
18
- is_cooling_available: z.literal(false),
19
- is_heating: z.boolean(),
20
- is_cooling: z.boolean(),
21
- is_fan_running: z.boolean(),
22
- fan_mode_setting,
23
-
24
- /**
25
- * this is true if the current thermostat settings differ that what is on seam, and `current_climate_setting.manual_override_allowed: true`
26
- */
27
- is_temporary_manual_override_active: z.boolean(),
28
-
29
- /**
30
- * can be derived from `default_climate_setting`, or `active_climate_setting_schedule` if one is active
31
- */
32
- current_climate_setting: climate_setting,
33
- default_climate_setting: climate_setting.optional(),
34
- is_climate_setting_schedule_active: z.boolean(),
35
- active_climate_setting_schedule: climate_setting_schedule.optional(),
36
- })
37
-
38
- export const cooling_thermostat_capability_properties =
39
- base_thermostat_capability_properties.merge(
40
- z.object({
41
- min_cooling_set_point_celsius: z.number(),
42
- min_cooling_set_point_fahrenheit: z.number(),
43
- max_cooling_set_point_celsius: z.number(),
44
- max_cooling_set_point_fahrenheit: z.number(),
45
- is_cooling_available: z.literal(true),
46
- }),
47
- )
48
-
49
- export const heating_thermostat_capability_properties =
50
- base_thermostat_capability_properties.merge(
51
- z.object({
52
- min_heating_set_point_celsius: z.number(),
53
- min_heating_set_point_fahrenheit: z.number(),
54
- max_heating_set_point_celsius: z.number(),
55
- max_heating_set_point_fahrenheit: z.number(),
56
- is_heating_available: z.literal(true),
57
- }),
58
- )
59
-
60
- export const heating_cooling_thermostat_capability_properties =
61
- cooling_thermostat_capability_properties
62
- .merge(heating_thermostat_capability_properties)
63
- .merge(
64
- z.object({
65
- is_cooling_available: z.literal(true),
66
- is_heating_available: z.literal(true),
67
- min_heating_cooling_delta_celsius: z.number(),
68
- min_heating_cooling_delta_fahrenheit: z.number(),
69
- }),
70
- )
71
-
72
- export const thermostat_capability_properties = z.union([
73
- heating_cooling_thermostat_capability_properties.partial(),
74
- heating_thermostat_capability_properties.partial(),
75
- cooling_thermostat_capability_properties.partial(),
76
- ])
10
+ export const thermostat_capability_properties = z
11
+ .object({
12
+ temperature_fahrenheit: z.number(),
13
+ temperature_celsius: z.number(),
14
+ relative_humidity: z.number().min(0).max(1),
15
+ available_hvac_mode_settings: z.array(hvac_mode_setting),
16
+ is_heating: z.boolean(),
17
+ is_cooling: z.boolean(),
18
+ is_fan_running: z.boolean(),
19
+ fan_mode_setting,
20
+
21
+ /**
22
+ * this is true if the current thermostat settings differ that what is on seam, and `current_climate_setting.manual_override_allowed: true`
23
+ */
24
+ is_temporary_manual_override_active: z.boolean(),
25
+
26
+ /**
27
+ * can be derived from `default_climate_setting`, or `active_climate_setting_schedule` if one is active
28
+ */
29
+ current_climate_setting: climate_setting,
30
+ default_climate_setting: climate_setting,
31
+ is_climate_setting_schedule_active: z.boolean(),
32
+ active_climate_setting_schedule: climate_setting_schedule,
33
+ min_cooling_set_point_celsius: z.number(),
34
+ min_cooling_set_point_fahrenheit: z.number(),
35
+ max_cooling_set_point_celsius: z.number(),
36
+ max_cooling_set_point_fahrenheit: z.number(),
37
+ min_heating_set_point_celsius: z.number(),
38
+ min_heating_set_point_fahrenheit: z.number(),
39
+ max_heating_set_point_celsius: z.number(),
40
+ max_heating_set_point_fahrenheit: z.number(),
41
+ min_heating_cooling_delta_celsius: z.number(),
42
+ min_heating_cooling_delta_fahrenheit: z.number(),
43
+ })
44
+ .partial()