@seamapi/types 1.291.0 → 1.292.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.291.0",
3
+ "version": "1.292.0",
4
4
  "description": "TypeScript types for the Seam API.",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -3,18 +3,55 @@ import { z } from 'zod'
3
3
  import { fan_mode_setting, hvac_mode_setting } from './modes.js'
4
4
 
5
5
  export const climate_preset = z.object({
6
- climate_preset_key: z.string(),
7
- can_edit: z.boolean(),
8
- can_delete: z.boolean(),
9
- name: z.string().nullable().default(null).optional(),
10
- display_name: z.string(),
11
- fan_mode_setting: fan_mode_setting.optional(),
12
- hvac_mode_setting: hvac_mode_setting.optional(),
13
- cooling_set_point_celsius: z.number().optional(),
14
- heating_set_point_celsius: z.number().optional(),
15
- cooling_set_point_fahrenheit: z.number().optional(),
16
- heating_set_point_fahrenheit: z.number().optional(),
17
- manual_override_allowed: z.boolean(),
6
+ climate_preset_key: z
7
+ .string()
8
+ .describe('Unique key to identify the climate preset.'),
9
+ can_edit: z
10
+ .boolean()
11
+ .describe('Indicates whether this climate preset key can be edited.'),
12
+ can_delete: z
13
+ .boolean()
14
+ .describe('Indicates whether this climate preset key can be deleted.'),
15
+ name: z
16
+ .string()
17
+ .nullable()
18
+ .default(null)
19
+ .optional()
20
+ .describe('User-friendly name to identify the climate preset.'),
21
+ display_name: z.string().describe('Display name for the climate preset.'),
22
+ fan_mode_setting: fan_mode_setting
23
+ .optional()
24
+ .describe(
25
+ 'Desired fan mode setting, such as `on`, `auto`, or `circulate`.',
26
+ ),
27
+ hvac_mode_setting: hvac_mode_setting
28
+ .optional()
29
+ .describe(
30
+ 'Desired [HVAC mode](https://docs.seam.co/latest/capability-guides/thermostats/understanding-thermostat-concepts/hvac-mode) setting, such as `heat`, `cool`, `heat_cool`, or `off`.',
31
+ ),
32
+ cooling_set_point_celsius: z
33
+ .number()
34
+ .optional()
35
+ .describe(
36
+ 'Temperature to which the thermostat should cool (in °C). See also [Set Points](https://docs.seam.co/latest/capability-guides/thermostats/understanding-thermostat-concepts/set-points).',
37
+ ),
38
+ heating_set_point_celsius: z
39
+ .number()
40
+ .optional()
41
+ .describe('Temperature to which the thermostat should heat (in °C).'),
42
+ cooling_set_point_fahrenheit: z
43
+ .number()
44
+ .optional()
45
+ .describe('Temperature to which the thermostat should cool (in °F).'),
46
+ heating_set_point_fahrenheit: z
47
+ .number()
48
+ .optional()
49
+ .describe('Temperature to which the thermostat should heat (in °F).'),
50
+ manual_override_allowed: z
51
+ .boolean()
52
+ .describe(
53
+ "Indicates whether a person at the thermostat can change the thermostat's settings.",
54
+ ),
18
55
  })
19
56
 
20
57
  export type ClimatePreset = z.infer<typeof climate_preset>
@@ -1,18 +1,47 @@
1
1
  import { z } from 'zod'
2
2
 
3
3
  export const thermostat_schedule = z.object({
4
- thermostat_schedule_id: z.string().uuid(),
5
- device_id: z.string().uuid(),
6
- name: z.string().optional(),
7
- climate_preset_key: z.string(),
8
- max_override_period_minutes: z.number().int().nonnegative(),
9
- starts_at: z.string().datetime(),
10
- ends_at: z.string().datetime(),
11
- created_at: z.string().datetime(),
4
+ thermostat_schedule_id: z
5
+ .string()
6
+ .uuid()
7
+ .describe('ID of the climate schedule.'),
8
+ device_id: z.string().uuid().describe('ID of the desired thermostat device.'),
9
+ name: z
10
+ .string()
11
+ .optional()
12
+ .describe('User-friendly name to identify the climate schedule.'),
13
+ climate_preset_key: z
14
+ .string()
15
+ .describe(
16
+ 'Key of the [climate preset](https://docs.seam.co/latest/capability-guides/thermostats/creating-and-managing-climate-presets) to use for the climate schedule.',
17
+ ),
18
+ max_override_period_minutes: z
19
+ .number()
20
+ .int()
21
+ .nonnegative()
22
+ .describe(
23
+ "Number of minutes for which a person at the thermostat can change the thermostat's settings after the activation of the scheduled climate preset. See also [Specifying Manual Override Permissions](https://docs.seam.co/latest/capability-guides/thermostats/creating-and-managing-climate-schedules#specifying-manual-override-permissions).",
24
+ ),
25
+ starts_at: z
26
+ .string()
27
+ .datetime()
28
+ .describe(
29
+ 'Date and time at which the climate schedule starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format.',
30
+ ),
31
+ ends_at: z
32
+ .string()
33
+ .datetime()
34
+ .describe(
35
+ 'Date and time at which the climate schedule ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format.',
36
+ ),
37
+ created_at: z
38
+ .string()
39
+ .datetime()
40
+ .describe('Date and time at which the climate schedule was created.'),
12
41
  errors: z
13
42
  .any()
14
43
  .describe(
15
- 'Collection of errors associated with the thermostat schedule, structured in a dictionary format. A unique "error_code" keys each error. Each error entry is an object containing two fields: "message" and "created_at." "message" is a string that describes the error. "created_at" is a date that indicates when the error was generated. This structure enables detailed tracking and timely response to critical issues.',
44
+ 'Array of errors associated with the climate schedule. Each error object within the array contains two fields: `error_code` and `message`. `error_code` is a string that uniquely identifies the type of error, enabling quick recognition and categorization of the issue. `message` provides a more detailed description of the error, offering insights into the issue and potentially how to rectify it.',
16
45
  ),
17
46
  })
18
47