@seamapi/types 1.406.0 → 1.406.1

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 (54) hide show
  1. package/dist/connect.cjs +2065 -559
  2. package/dist/connect.cjs.map +1 -1
  3. package/dist/connect.d.cts +7008 -366
  4. package/lib/seam/connect/models/devices/capabilities-supported.js +3 -1
  5. package/lib/seam/connect/models/devices/capabilities-supported.js.map +1 -1
  6. package/lib/seam/connect/models/devices/capability-properties/access-code.js +53 -21
  7. package/lib/seam/connect/models/devices/capability-properties/access-code.js.map +1 -1
  8. package/lib/seam/connect/models/devices/capability-properties/lock.js +20 -4
  9. package/lib/seam/connect/models/devices/capability-properties/lock.js.map +1 -1
  10. package/lib/seam/connect/models/devices/capability-properties/thermostat.js +175 -31
  11. package/lib/seam/connect/models/devices/capability-properties/thermostat.js.map +1 -1
  12. package/lib/seam/connect/models/devices/device-metadata.js +455 -191
  13. package/lib/seam/connect/models/devices/device-metadata.js.map +1 -1
  14. package/lib/seam/connect/models/devices/device-type.js +8 -6
  15. package/lib/seam/connect/models/devices/device-type.js.map +1 -1
  16. package/lib/seam/connect/models/devices/device.js +171 -80
  17. package/lib/seam/connect/models/devices/device.js.map +1 -1
  18. package/lib/seam/connect/models/devices/phone-properties.js +5 -7
  19. package/lib/seam/connect/models/devices/phone-properties.js.map +1 -1
  20. package/lib/seam/connect/models/devices/phone.js +22 -8
  21. package/lib/seam/connect/models/devices/phone.js.map +1 -1
  22. package/lib/seam/connect/models/devices/unmanaged-device.js +35 -1
  23. package/lib/seam/connect/models/devices/unmanaged-device.js.map +1 -1
  24. package/lib/seam/connect/models/events/devices.d.ts +4 -4
  25. package/lib/seam/connect/models/events/seam-event.d.ts +2 -2
  26. package/lib/seam/connect/models/index.d.ts +1 -0
  27. package/lib/seam/connect/models/index.js +1 -0
  28. package/lib/seam/connect/models/index.js.map +1 -1
  29. package/lib/seam/connect/models/partner/index.d.ts +1 -0
  30. package/lib/seam/connect/models/partner/index.js +2 -0
  31. package/lib/seam/connect/models/partner/index.js.map +1 -0
  32. package/lib/seam/connect/models/partner/resources.d.ts +42 -0
  33. package/lib/seam/connect/models/partner/resources.js +19 -0
  34. package/lib/seam/connect/models/partner/resources.js.map +1 -0
  35. package/lib/seam/connect/openapi.d.ts +782 -50
  36. package/lib/seam/connect/openapi.js +1173 -199
  37. package/lib/seam/connect/openapi.js.map +1 -1
  38. package/lib/seam/connect/route-types.d.ts +6228 -318
  39. package/package.json +2 -2
  40. package/src/lib/seam/connect/models/devices/capabilities-supported.ts +3 -1
  41. package/src/lib/seam/connect/models/devices/capability-properties/access-code.ts +64 -34
  42. package/src/lib/seam/connect/models/devices/capability-properties/lock.ts +20 -4
  43. package/src/lib/seam/connect/models/devices/capability-properties/thermostat.ts +175 -31
  44. package/src/lib/seam/connect/models/devices/device-metadata.ts +457 -193
  45. package/src/lib/seam/connect/models/devices/device-type.ts +10 -6
  46. package/src/lib/seam/connect/models/devices/device.ts +173 -96
  47. package/src/lib/seam/connect/models/devices/phone-properties.ts +34 -36
  48. package/src/lib/seam/connect/models/devices/phone.ts +22 -19
  49. package/src/lib/seam/connect/models/devices/unmanaged-device.ts +35 -1
  50. package/src/lib/seam/connect/models/index.ts +1 -0
  51. package/src/lib/seam/connect/models/partner/index.ts +1 -0
  52. package/src/lib/seam/connect/models/partner/resources.ts +24 -0
  53. package/src/lib/seam/connect/openapi.ts +1417 -204
  54. package/src/lib/seam/connect/route-types.ts +6231 -318
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seamapi/types",
3
- "version": "1.406.0",
3
+ "version": "1.406.1",
4
4
  "description": "TypeScript types for the Seam API.",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -92,7 +92,7 @@
92
92
  "zod": "^3.24.0"
93
93
  },
94
94
  "devDependencies": {
95
- "@seamapi/blueprint": "^0.43.2",
95
+ "@seamapi/blueprint": "^0.43.5",
96
96
  "@types/node": "^20.8.10",
97
97
  "concurrently": "^8.2.0",
98
98
  "del-cli": "^5.0.0",
@@ -7,6 +7,8 @@ export const capabilities = z.enum([
7
7
  'thermostat',
8
8
  'battery',
9
9
  'phone',
10
- ])
10
+ ]).describe(`
11
+ Collection of capabilities that the device supports when connected to Seam. **Important:** Superseded by [capability flags](https://docs.seam.co/latest/capability-guides/device-and-system-capabilities#capability-flags).
12
+ `)
11
13
 
12
14
  export type Capabilities = z.infer<typeof capabilities>
@@ -1,45 +1,75 @@
1
1
  import { z } from 'zod'
2
2
 
3
- export const access_code_code_constraint = z.object({
4
- constraint_type: z.enum([
5
- 'no_zeros', // Nuki
6
- 'cannot_start_with_12', // Nuki
7
- 'no_triple_consecutive_ints', // Brivo
8
- 'cannot_specify_pin_code', // Dormakaba?
9
- 'pin_code_matches_existing_set', // Salto
10
- 'start_date_in_future', // Kwikset
11
- 'no_ascending_or_descending_sequence', // Tedee
12
- 'at_least_three_unique_digits', // Tedee
13
- 'cannot_contain_089', // TTLock
14
- 'cannot_contain_0789', // TTLock (for some cylinder devices only)
15
- ]),
16
- })
3
+ export const access_code_code_constraint = z
4
+ .object({
5
+ constraint_type: z
6
+ .enum([
7
+ 'no_zeros', // Nuki
8
+ 'cannot_start_with_12', // Nuki
9
+ 'no_triple_consecutive_ints', // Brivo
10
+ 'cannot_specify_pin_code', // Dormakaba?
11
+ 'pin_code_matches_existing_set', // Salto
12
+ 'start_date_in_future', // Kwikset
13
+ 'no_ascending_or_descending_sequence', // Tedee
14
+ 'at_least_three_unique_digits', // Tedee
15
+ 'cannot_contain_089', // TTLock
16
+ 'cannot_contain_0789', // TTLock (for some cylinder devices only)
17
+ ])
18
+ .describe(`Code constraint type for access codes.`),
19
+ })
20
+ .describe(`Code constraint for access codes.`)
17
21
 
18
- export const access_code_name_constraint = z.object({
19
- constraint_type: z.enum(['name_length', 'name_must_be_unique']), // Nuki, Kwikset
20
- min_length: z.number().optional(),
21
- max_length: z.number().optional(),
22
- })
22
+ export const access_code_name_constraint = z
23
+ .object({
24
+ constraint_type: z.enum(['name_length', 'name_must_be_unique']), // Nuki, Kwikset
25
+ min_length: z
26
+ .number()
27
+ .optional()
28
+ .describe(`Minimum name length constraint for access codes.`),
29
+ max_length: z
30
+ .number()
31
+ .optional()
32
+ .describe(`Maximum name length constraint for access codes.`),
33
+ })
34
+ .describe(`Name constraint for access codes.`)
23
35
 
24
- export const access_code_constraint = z.union([
25
- access_code_code_constraint,
26
- access_code_name_constraint,
27
- ])
36
+ export const access_code_constraint = z
37
+ .union([access_code_code_constraint, access_code_name_constraint])
38
+ .describe(`Access code constraint.`)
28
39
 
29
40
  export type AccessCodeConstraint = z.infer<typeof access_code_constraint>
30
41
 
31
42
  export const access_code_capability_properties = z.object({
32
43
  _experimental_supported_code_from_access_codes_lengths: z
33
44
  .array(z.number())
34
- .optional(),
35
- code_constraints: z
36
- .array(access_code_constraint)
37
- .optional()
38
- .describe(
39
- 'Constraints on access codes for the device. Seam represents each constraint as an object with a `constraint_type` property. Depending on the constraint type, there may also be additional properties. Note that some constraints are manufacturer- or device-specific.',
40
- ),
41
- supported_code_lengths: z.array(z.number()).optional(),
42
- max_active_codes_supported: z.number().optional(),
43
- supports_backup_access_code_pool: z.boolean().optional(),
44
- has_native_entry_events: z.boolean().optional(),
45
+ .optional().describe(`
46
+ ---
47
+ undocumented: Marked as experimental.
48
+ ---
49
+ `),
50
+ code_constraints: z.array(access_code_constraint).optional().describe(`
51
+ ---
52
+ property_group_key: access_codes
53
+ ---
54
+ Constraints on access codes for the device. Seam represents each constraint as an object with a \`constraint_type\` property. Depending on the constraint type, there may also be additional properties. Note that some constraints are manufacturer- or device-specific.`),
55
+ supported_code_lengths: z.array(z.number()).optional().describe(`
56
+ ---
57
+ property_group_key: access_codes
58
+ ---
59
+ Supported code lengths for access codes.`),
60
+ max_active_codes_supported: z.number().optional().describe(`
61
+ ---
62
+ property_group_key: access_codes
63
+ ---
64
+ Maximum number of active access codes that the device supports.`),
65
+ supports_backup_access_code_pool: z.boolean().optional().describe(`
66
+ ---
67
+ property_group_key: access_codes
68
+ ---
69
+ Indicates whether the device supports a [backup access code pool](https://docs.seam.co/latest/capability-guides/smart-locks/access-codes/backup-access-codes).`),
70
+ has_native_entry_events: z.boolean().optional().describe(`
71
+ ---
72
+ property_group_key: access_codes
73
+ ---
74
+ Indicates whether the device supports native entry events.`),
45
75
  })
@@ -1,11 +1,27 @@
1
1
  import { z } from 'zod'
2
2
 
3
3
  export const lock_capability_properties = z.object({
4
- locked: z.boolean().optional(),
4
+ locked: z.boolean().optional().describe(`
5
+ ---
6
+ property_group_key: locks
7
+ ---
8
+ Indicates whether the lock is locked.
9
+ `),
5
10
  keypad_battery: z
6
11
  .object({
7
- level: z.number(),
12
+ level: z.number().describe(`Keypad battery charge level.
13
+ `),
8
14
  })
9
- .optional(),
10
- door_open: z.boolean().optional(),
15
+ .optional().describe(`
16
+ ---
17
+ property_group_key: access_codes
18
+ ---
19
+ Keypad battery status.
20
+ `),
21
+ door_open: z.boolean().optional().describe(`
22
+ ---
23
+ property_group_key: locks
24
+ ---
25
+ Indicates whether the door is open.
26
+ `),
11
27
  })
@@ -12,56 +12,200 @@ import {
12
12
 
13
13
  export const thermostat_capability_properties = z
14
14
  .object({
15
- temperature_fahrenheit: z.number(),
16
- temperature_celsius: z.number(),
17
- relative_humidity: z.number().min(0).max(1),
18
- available_hvac_mode_settings: z.array(hvac_mode_setting),
19
- available_fan_mode_settings: z.array(fan_mode_setting),
20
- is_heating: z.boolean(),
21
- is_cooling: z.boolean(),
22
- is_fan_running: z.boolean(),
15
+ temperature_fahrenheit: z.number().describe(`
16
+ ---
17
+ property_group_key: thermostats
18
+ ---
19
+ Reported temperature in °F.
20
+ `),
21
+ temperature_celsius: z.number().describe(`
22
+ ---
23
+ property_group_key: thermostats
24
+ ---
25
+ Reported temperature in °C.
26
+ `),
27
+ relative_humidity: z.number().min(0).max(1).describe(`
28
+ ---
29
+ property_group_key: thermostats
30
+ ---
31
+ Reported relative humidity, as a value between 0 and 1, inclusive.
32
+ `),
33
+ available_hvac_mode_settings: z.array(hvac_mode_setting).describe(`
34
+ ---
35
+ property_group_key: thermostats
36
+ ---
37
+ HVAC mode settings that the thermostat supports.
38
+ `),
39
+ available_fan_mode_settings: z.array(fan_mode_setting).describe(`
40
+ ---
41
+ property_group_key: thermostats
42
+ ---
43
+ Fan mode settings that the thermostat supports.
44
+ `),
45
+ is_heating: z.boolean().describe(`
46
+ ---
47
+ property_group_key: thermostats
48
+ ---
49
+ Indicates whether the connected HVAC system is currently heating, as reported by the thermostat.
50
+ `),
51
+ is_cooling: z.boolean().describe(`
52
+ ---
53
+ property_group_key: thermostats
54
+ ---
55
+ Indicates whether the connected HVAC system is currently cooling, as reported by the thermostat.
56
+ `),
57
+ is_fan_running: z.boolean().describe(`
58
+ ---
59
+ property_group_key: thermostats
60
+ ---
61
+ Indicates whether the fan in the connected HVAC system is currently running, as reported by the thermostat.
62
+ `),
23
63
  fan_mode_setting: fan_mode_setting.describe(`
24
64
  ---
25
- deprecated: use current_climate_setting.fan_mode_setting instead.
65
+ deprecated: Use \`current_climate_setting.fan_mode_setting\` instead.
66
+ property_group_key: thermostats
26
67
  ---
27
68
  `),
28
69
 
29
70
  /**
30
71
  * this is true if the current thermostat settings differ that what is on seam, and `current_climate_setting.manual_override_allowed: true`
31
72
  */
32
- is_temporary_manual_override_active: z.boolean(),
73
+ is_temporary_manual_override_active: z.boolean().describe(`
74
+ ---
75
+ property_group_key: thermostats
76
+ ---
77
+ Indicates whether the current thermostat settings differ from the most recent active program or schedule that Seam activated. For this condition to occur, \`current_climate_setting.manual_override_allowed\` must also be \`true\`.
78
+ `),
33
79
 
34
80
  /**
35
81
  * can be derived from `fallback_climate_preset_key`, or `active_thermostat_schedule` if one is active
36
82
  */
37
- current_climate_setting: climate_setting,
83
+ current_climate_setting: climate_setting.describe(`
84
+ ---
85
+ property_group_key: thermostats
86
+ ---
87
+ Current climate setting.
88
+ `),
38
89
  default_climate_setting: climate_setting.describe(`
39
90
  ---
40
91
  deprecated: use fallback_climate_preset_key to specify a fallback climate preset instead.
92
+ property_group_key: thermostats
41
93
  ---
42
94
  `),
43
- available_climate_presets: z.array(climate_preset),
44
- fallback_climate_preset_key: z.string().min(1).nullable().default(null),
45
- active_thermostat_schedule: thermostat_schedule.nullable().default(null),
46
- thermostat_daily_programs: z.array(thermostat_daily_program).optional(),
47
- thermostat_weekly_program: thermostat_weekly_program.nullable().optional(),
48
- min_cooling_set_point_celsius: z.number(),
49
- min_cooling_set_point_fahrenheit: z.number(),
50
- max_cooling_set_point_celsius: z.number(),
51
- max_cooling_set_point_fahrenheit: z.number(),
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
- min_heating_cooling_delta_celsius: z.number(),
57
- min_heating_cooling_delta_fahrenheit: z.number(),
95
+ available_climate_presets: z.array(climate_preset).describe(`
96
+ ---
97
+ property_group_key: thermostats
98
+ ---
99
+ Available [climate presets](https://docs.seam.co/latest/capability-guides/thermostats/creating-and-managing-climate-presets) for the thermostat.
100
+ `),
101
+ fallback_climate_preset_key: z.string().min(1).nullable().default(null)
102
+ .describe(`
103
+ ---
104
+ property_group_key: thermostats
105
+ ---
106
+ Key of the [fallback climate preset](https://docs.seam.co/latest/capability-guides/thermostats/creating-and-managing-climate-presets/setting-the-fallback-climate-preset) for the thermostat.
107
+ `),
108
+ active_thermostat_schedule: thermostat_schedule.nullable().default(null)
109
+ .describe(`
110
+ ---
111
+ property_group_key: thermostats
112
+ ---
113
+ Active [thermostat schedule](https://docs.seam.co/latest/capability-guides/thermostats/creating-and-managing-thermostat-schedules).
114
+ `),
115
+ thermostat_daily_programs: z.array(thermostat_daily_program).optional()
116
+ .describe(`
117
+ ---
118
+ property_group_key: thermostats
119
+ ---
120
+ Configured [daily programs](https://docs.seam.co/latest/capability-guides/thermostats/creating-and-managing-thermostat-programs) for the thermostat.
121
+ `),
122
+ thermostat_weekly_program: thermostat_weekly_program.nullable().optional()
123
+ .describe(`
124
+ ---
125
+ property_group_key: thermostats
126
+ ---
127
+ Current [weekly program](https://docs.seam.co/latest/capability-guides/thermostats/creating-and-managing-thermostat-programs) for the thermostat.
128
+ `),
129
+ min_cooling_set_point_celsius: z.number().describe(`
130
+ ---
131
+ property_group_key: thermostats
132
+ ---
133
+ Minimum [cooling set point](https://docs.seam.co/latest/capability-guides/thermostats/understanding-thermostat-concepts/set-points#cooling-set-point) in °C.
134
+ `),
135
+ min_cooling_set_point_fahrenheit: z.number().describe(`
136
+ ---
137
+ property_group_key: thermostats
138
+ ---
139
+ Minimum [cooling set point](https://docs.seam.co/latest/capability-guides/thermostats/understanding-thermostat-concepts/set-points#cooling-set-point) in °F.
140
+ `),
141
+ max_cooling_set_point_celsius: z.number().describe(`
142
+ ---
143
+ property_group_key: thermostats
144
+ ---
145
+ Maximum [cooling set point](https://docs.seam.co/latest/capability-guides/thermostats/understanding-thermostat-concepts/set-points#cooling-set-point) in °C.
146
+ `),
147
+ max_cooling_set_point_fahrenheit: z.number().describe(`
148
+ ---
149
+ property_group_key: thermostats
150
+ ---
151
+ Maximum [cooling set point](https://docs.seam.co/latest/capability-guides/thermostats/understanding-thermostat-concepts/set-points#cooling-set-point) in °F.
152
+ `),
153
+ min_heating_set_point_celsius: z.number().describe(`
154
+ ---
155
+ property_group_key: thermostats
156
+ ---
157
+ Minimum [heating set point](https://docs.seam.co/latest/capability-guides/thermostats/understanding-thermostat-concepts/set-points#heating-set-point) in °C.
158
+ `),
159
+ min_heating_set_point_fahrenheit: z.number().describe(`
160
+ ---
161
+ property_group_key: thermostats
162
+ ---
163
+ Minimum [heating set point](https://docs.seam.co/latest/capability-guides/thermostats/understanding-thermostat-concepts/set-points#heating-set-point) in °F.
164
+ `),
165
+ max_heating_set_point_celsius: z.number().describe(`
166
+ ---
167
+ property_group_key: thermostats
168
+ ---
169
+ Maximum [heating set point](https://docs.seam.co/latest/capability-guides/thermostats/understanding-thermostat-concepts/set-points#heating-set-point) in °C.
170
+ `),
171
+ max_heating_set_point_fahrenheit: z.number().describe(`
172
+ ---
173
+ property_group_key: thermostats
174
+ ---
175
+ Maximum [heating set point](https://docs.seam.co/latest/capability-guides/thermostats/understanding-thermostat-concepts/set-points#heating-set-point) in °F.
176
+ `),
177
+ min_heating_cooling_delta_celsius: z.number().describe(`
178
+ ---
179
+ property_group_key: thermostats
180
+ ---
181
+ Minimum [temperature difference](https://docs.seam.co/latest/capability-guides/thermostats/understanding-thermostat-concepts/set-points#minimum-heating-cooling-temperature-delta) in °C between the cooling and heating set points when in heat-cool (auto) mode.
182
+ `),
183
+ min_heating_cooling_delta_fahrenheit: z.number().describe(`
184
+ ---
185
+ property_group_key: thermostats
186
+ ---
187
+ Minimum [temperature difference](https://docs.seam.co/latest/capability-guides/thermostats/understanding-thermostat-concepts/set-points#minimum-heating-cooling-temperature-delta) in °F between the cooling and heating set points when in heat-cool (auto) mode.
188
+ `),
58
189
  temperature_threshold: z
59
190
  .object({
60
- lower_limit_celsius: z.number().nullable(),
61
- lower_limit_fahrenheit: z.number().nullable(),
62
- upper_limit_celsius: z.number().nullable(),
63
- upper_limit_fahrenheit: z.number().nullable(),
191
+ lower_limit_celsius: z.number().nullable()
192
+ .describe(`Lower limit in °C within the current [temperature threshold](https://docs.seam.co/latest/capability-guides/thermostats/setting-and-monitoring-temperature-thresholds) set for the thermostat.
193
+ `),
194
+ lower_limit_fahrenheit: z.number().nullable()
195
+ .describe(`Lower limit in °F within the current [temperature threshold](https://docs.seam.co/latest/capability-guides/thermostats/setting-and-monitoring-temperature-thresholds) set for the thermostat.
196
+ `),
197
+ upper_limit_celsius: z.number().nullable()
198
+ .describe(`Upper limit in °C within the current [temperature threshold](https://docs.seam.co/latest/capability-guides/thermostats/setting-and-monitoring-temperature-thresholds) set for the thermostat.
199
+ `),
200
+ upper_limit_fahrenheit: z.number().nullable()
201
+ .describe(`Upper limit in °F within the current [temperature threshold](https://docs.seam.co/latest/capability-guides/thermostats/setting-and-monitoring-temperature-thresholds) set for the thermostat.
202
+ `),
64
203
  })
65
- .optional(),
204
+ .optional().describe(`
205
+ ---
206
+ property_group_key: thermostats
207
+ ---
208
+ Current [temperature threshold](https://docs.seam.co/latest/capability-guides/thermostats/setting-and-monitoring-temperature-thresholds) set for the thermostat.
209
+ `),
66
210
  })
67
211
  .partial()