@seamapi/types 1.248.0 → 1.251.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.
Files changed (39) hide show
  1. package/dist/connect.cjs +64 -13
  2. package/dist/connect.cjs.map +1 -1
  3. package/dist/connect.d.cts +162 -108
  4. package/lib/seam/connect/models/devices/capability-properties/index.d.ts +21 -18
  5. package/lib/seam/connect/models/devices/capability-properties/thermostat.d.ts +21 -18
  6. package/lib/seam/connect/models/devices/capability-properties/thermostat.js +1 -0
  7. package/lib/seam/connect/models/devices/capability-properties/thermostat.js.map +1 -1
  8. package/lib/seam/connect/models/devices/device.d.ts +31 -26
  9. package/lib/seam/connect/models/devices/phone.d.ts +21 -18
  10. package/lib/seam/connect/models/devices/unmanaged-device.d.ts +21 -18
  11. package/lib/seam/connect/models/events/acs/common.d.ts +3 -3
  12. package/lib/seam/connect/models/events/acs/common.js +2 -1
  13. package/lib/seam/connect/models/events/acs/common.js.map +1 -1
  14. package/lib/seam/connect/models/events/acs/credentials.d.ts +6 -6
  15. package/lib/seam/connect/models/events/acs/index.d.ts +35 -9
  16. package/lib/seam/connect/models/events/acs/systems.d.ts +60 -6
  17. package/lib/seam/connect/models/events/acs/systems.js +9 -1
  18. package/lib/seam/connect/models/events/acs/systems.js.map +1 -1
  19. package/lib/seam/connect/models/events/acs/users.d.ts +6 -6
  20. package/lib/seam/connect/models/events/devices.d.ts +86 -0
  21. package/lib/seam/connect/models/events/devices.js +21 -0
  22. package/lib/seam/connect/models/events/devices.js.map +1 -1
  23. package/lib/seam/connect/models/events/seam-event.d.ts +35 -9
  24. package/lib/seam/connect/models/thermostats/climate-preset.d.ts +6 -6
  25. package/lib/seam/connect/models/thermostats/modes.d.ts +3 -1
  26. package/lib/seam/connect/models/thermostats/modes.js +2 -1
  27. package/lib/seam/connect/models/thermostats/modes.js.map +1 -1
  28. package/lib/seam/connect/openapi.d.ts +8 -0
  29. package/lib/seam/connect/openapi.js +34 -10
  30. package/lib/seam/connect/openapi.js.map +1 -1
  31. package/lib/seam/connect/route-types.d.ts +67 -55
  32. package/package.json +1 -1
  33. package/src/lib/seam/connect/models/devices/capability-properties/thermostat.ts +1 -0
  34. package/src/lib/seam/connect/models/events/acs/common.ts +2 -1
  35. package/src/lib/seam/connect/models/events/acs/systems.ts +12 -1
  36. package/src/lib/seam/connect/models/events/devices.ts +33 -0
  37. package/src/lib/seam/connect/models/thermostats/modes.ts +7 -1
  38. package/src/lib/seam/connect/openapi.ts +34 -10
  39. package/src/lib/seam/connect/route-types.ts +139 -53
@@ -1,5 +1,6 @@
1
1
  import { z } from 'zod'
2
2
 
3
+ import { climate_setting } from '../thermostats/climate-preset.js'
3
4
  import { common_event } from './common.js'
4
5
 
5
6
  const device_event = common_event.extend({
@@ -341,6 +342,36 @@ export const lock_access_denied_event = device_event
341
342
 
342
343
  export type LockAccessDeniedEvent = z.infer<typeof lock_access_denied_event>
343
344
 
345
+ export const thermostat_climate_preset_activated_event = device_event
346
+ .extend({
347
+ event_type: z.literal('thermostat.climate_preset_activated'),
348
+ thermostat_schedule_id: z.string().uuid().nullable(),
349
+ climate_preset_key: z.string(),
350
+ is_fallback_climate_preset: z.boolean(),
351
+ })
352
+ .describe('A thermostat climate preset was activated.')
353
+
354
+ export type ThermostatClimatePresetActivatedEvent = z.infer<
355
+ typeof thermostat_climate_preset_activated_event
356
+ >
357
+
358
+ export const thermostat_manually_adjusted_event = device_event
359
+ .merge(
360
+ climate_setting.pick({
361
+ fan_mode_setting: true,
362
+ hvac_mode_setting: true,
363
+ cooling_set_point_celsius: true,
364
+ heating_set_point_celsius: true,
365
+ cooling_set_point_fahrenheit: true,
366
+ heating_set_point_fahrenheit: true,
367
+ }),
368
+ )
369
+ .describe('A thermostat was manually adjusted.')
370
+
371
+ export type ThermostatManuallyAdjustedEvent = z.infer<
372
+ typeof thermostat_manually_adjusted_event
373
+ >
374
+
344
375
  export const device_events = [
345
376
  device_connected_event,
346
377
  device_converted_to_unmanaged_event,
@@ -367,4 +398,6 @@ export const device_events = [
367
398
  lock_locked_event,
368
399
  lock_unlocked_event,
369
400
  lock_access_denied_event,
401
+ // thermostat_climate_preset_activated_event,
402
+ // thermostat_manually_adjusted_event,
370
403
  ] as const
@@ -4,6 +4,12 @@ export const hvac_mode_setting = z.enum(['off', 'heat', 'cool', 'heat_cool'])
4
4
 
5
5
  export type HvacModeSetting = z.infer<typeof hvac_mode_setting>
6
6
 
7
- export const fan_mode_setting = z.enum(['auto', 'on'])
7
+ export const fan_mode_setting = z.enum(['auto', 'on', 'circulate'])
8
8
 
9
9
  export type FanModeSetting = z.infer<typeof fan_mode_setting>
10
+
11
+ export const available_fan_mode_settings = z.array(fan_mode_setting)
12
+
13
+ export type AvailableFanModeSettings = z.infer<
14
+ typeof available_fan_mode_settings
15
+ >
@@ -2237,7 +2237,10 @@ export default {
2237
2237
  cooling_set_point_celsius: { format: 'float', type: 'number' },
2238
2238
  cooling_set_point_fahrenheit: { format: 'float', type: 'number' },
2239
2239
  display_name: { type: 'string' },
2240
- fan_mode_setting: { enum: ['auto', 'on'], type: 'string' },
2240
+ fan_mode_setting: {
2241
+ enum: ['auto', 'on', 'circulate'],
2242
+ type: 'string',
2243
+ },
2241
2244
  heating_set_point_celsius: { format: 'float', type: 'number' },
2242
2245
  heating_set_point_fahrenheit: { format: 'float', type: 'number' },
2243
2246
  hvac_mode_setting: {
@@ -3376,7 +3379,7 @@ export default {
3376
3379
  },
3377
3380
  display_name: { type: 'string' },
3378
3381
  fan_mode_setting: {
3379
- enum: ['auto', 'on'],
3382
+ enum: ['auto', 'on', 'circulate'],
3380
3383
  type: 'string',
3381
3384
  },
3382
3385
  heating_set_point_celsius: {
@@ -3409,6 +3412,13 @@ export default {
3409
3412
  },
3410
3413
  type: 'array',
3411
3414
  },
3415
+ available_fan_mode_settings: {
3416
+ items: {
3417
+ enum: ['auto', 'on', 'circulate'],
3418
+ type: 'string',
3419
+ },
3420
+ type: 'array',
3421
+ },
3412
3422
  available_hvac_mode_settings: {
3413
3423
  items: {
3414
3424
  enum: ['off', 'heat', 'cool', 'heat_cool'],
@@ -3431,7 +3441,7 @@ export default {
3431
3441
  },
3432
3442
  display_name: { type: 'string' },
3433
3443
  fan_mode_setting: {
3434
- enum: ['auto', 'on'],
3444
+ enum: ['auto', 'on', 'circulate'],
3435
3445
  type: 'string',
3436
3446
  },
3437
3447
  heating_set_point_celsius: {
@@ -3471,7 +3481,7 @@ export default {
3471
3481
  },
3472
3482
  display_name: { type: 'string' },
3473
3483
  fan_mode_setting: {
3474
- enum: ['auto', 'on'],
3484
+ enum: ['auto', 'on', 'circulate'],
3475
3485
  type: 'string',
3476
3486
  },
3477
3487
  heating_set_point_celsius: {
@@ -3505,7 +3515,7 @@ export default {
3505
3515
  },
3506
3516
  fan_mode_setting: {
3507
3517
  deprecated: true,
3508
- enum: ['auto', 'on'],
3518
+ enum: ['auto', 'on', 'circulate'],
3509
3519
  type: 'string',
3510
3520
  'x-deprecated':
3511
3521
  'use current_climate_setting.fan_mode_setting instead.',
@@ -11480,6 +11490,7 @@ export default {
11480
11490
  'connect_webview.login_failed',
11481
11491
  'noise_sensor.noise_threshold_triggered',
11482
11492
  'access_code.backup_access_code_pulled',
11493
+ 'acs_system.added',
11483
11494
  'acs_system.connected',
11484
11495
  'acs_user.deleted',
11485
11496
  'acs_credential.deleted',
@@ -11547,6 +11558,7 @@ export default {
11547
11558
  'connect_webview.login_failed',
11548
11559
  'noise_sensor.noise_threshold_triggered',
11549
11560
  'access_code.backup_access_code_pulled',
11561
+ 'acs_system.added',
11550
11562
  'acs_system.connected',
11551
11563
  'acs_user.deleted',
11552
11564
  'acs_credential.deleted',
@@ -13067,7 +13079,10 @@ export default {
13067
13079
  type: 'number',
13068
13080
  },
13069
13081
  device_id: { format: 'uuid', type: 'string' },
13070
- fan_mode_setting: { enum: ['auto', 'on'], type: 'string' },
13082
+ fan_mode_setting: {
13083
+ enum: ['auto', 'on', 'circulate'],
13084
+ type: 'string',
13085
+ },
13071
13086
  heating_set_point_celsius: {
13072
13087
  format: 'float',
13073
13088
  type: 'number',
@@ -14009,11 +14024,14 @@ export default {
14009
14024
  device_id: { format: 'uuid', type: 'string' },
14010
14025
  fan_mode: {
14011
14026
  deprecated: true,
14012
- enum: ['auto', 'on'],
14027
+ enum: ['auto', 'on', 'circulate'],
14013
14028
  type: 'string',
14014
14029
  'x-deprecated': 'use fan_mode_setting instead.',
14015
14030
  },
14016
- fan_mode_setting: { enum: ['auto', 'on'], type: 'string' },
14031
+ fan_mode_setting: {
14032
+ enum: ['auto', 'on', 'circulate'],
14033
+ type: 'string',
14034
+ },
14017
14035
  sync: { default: false, type: 'boolean' },
14018
14036
  },
14019
14037
  required: ['device_id'],
@@ -14074,7 +14092,10 @@ export default {
14074
14092
  type: 'number',
14075
14093
  },
14076
14094
  device_id: { format: 'uuid', type: 'string' },
14077
- fan_mode_setting: { enum: ['auto', 'on'], type: 'string' },
14095
+ fan_mode_setting: {
14096
+ enum: ['auto', 'on', 'circulate'],
14097
+ type: 'string',
14098
+ },
14078
14099
  heating_set_point_celsius: {
14079
14100
  format: 'float',
14080
14101
  type: 'number',
@@ -14142,7 +14163,10 @@ export default {
14142
14163
  type: 'number',
14143
14164
  },
14144
14165
  device_id: { format: 'uuid', type: 'string' },
14145
- fan_mode_setting: { enum: ['auto', 'on'], type: 'string' },
14166
+ fan_mode_setting: {
14167
+ enum: ['auto', 'on', 'circulate'],
14168
+ type: 'string',
14169
+ },
14146
14170
  heating_set_point_celsius: {
14147
14171
  format: 'float',
14148
14172
  type: 'number',