@seamapi/types 1.303.1 → 1.305.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.
@@ -10,6 +10,7 @@ import { set_cool_action_attempt } from './set-cool.js'
10
10
  import { set_fan_mode_action_attempt } from './set-fan-mode.js'
11
11
  import { set_heat_action_attempt } from './set-heat.js'
12
12
  import { set_heat_cool_action_attempt } from './set-heat-cool.js'
13
+ import { set_hvac_mode_action_attempt } from './set-hvac-mode.js'
13
14
  import { set_thermostat_off_action_attempt } from './set-thermostat-off.js'
14
15
  import { unlock_door_action_attempt } from './unlock-door.js'
15
16
 
@@ -24,6 +25,7 @@ export const action_attempt = z.union([
24
25
  ...set_heat_cool_action_attempt.options,
25
26
  ...set_fan_mode_action_attempt.options,
26
27
  ...set_thermostat_off_action_attempt.options,
28
+ ...set_hvac_mode_action_attempt.options,
27
29
  ...activate_climate_preset_action_attempt.options,
28
30
  ...deprecated_action_attempts,
29
31
  ])
@@ -0,0 +1,33 @@
1
+ import { z } from 'zod'
2
+
3
+ import {
4
+ common_failed_action_attempt,
5
+ common_pending_action_attempt,
6
+ common_succeeded_action_attempt,
7
+ } from './common.js'
8
+
9
+ const action_type = z.literal('SET_HVAC_MODE')
10
+
11
+ const error = z.object({
12
+ type: z.string(),
13
+ message: z.string(),
14
+ })
15
+
16
+ const result = z.object({})
17
+
18
+ export const set_hvac_mode_action_attempt = z.discriminatedUnion('status', [
19
+ common_pending_action_attempt
20
+ .extend({
21
+ action_type,
22
+ })
23
+ .describe('Setting HVAC mode.'),
24
+ common_succeeded_action_attempt
25
+ .extend({
26
+ action_type,
27
+ result,
28
+ })
29
+ .describe('Setting HVAC mode succeeded.'),
30
+ common_failed_action_attempt
31
+ .extend({ action_type, error })
32
+ .describe('Setting HVAC mode failed.'),
33
+ ])
@@ -12,6 +12,16 @@ export const acs_system_connected_event = acs_system_event
12
12
 
13
13
  export type AcsSystemConnectedEvent = z.infer<typeof acs_system_connected_event>
14
14
 
15
+ export const acs_system_disconnected_event = acs_system_event
16
+ .extend({
17
+ event_type: z.literal('acs_system.disconnected'),
18
+ })
19
+ .describe('An ACS system was disconnected.')
20
+
21
+ export type AcsSystemDisconnectedEvent = z.infer<
22
+ typeof acs_system_disconnected_event
23
+ >
24
+
15
25
  export const acs_system_added_event = acs_system_event
16
26
  .extend({
17
27
  event_type: z.literal('acs_system.added'),
@@ -23,4 +33,5 @@ export type AcsSystemAddedEvent = z.infer<typeof acs_system_added_event>
23
33
  export const acs_system_events = [
24
34
  acs_system_connected_event,
25
35
  acs_system_added_event,
36
+ acs_system_disconnected_event,
26
37
  ] as const
@@ -3488,6 +3488,82 @@ export default {
3488
3488
  ],
3489
3489
  type: 'object',
3490
3490
  },
3491
+ {
3492
+ description: 'Setting HVAC mode.',
3493
+ properties: {
3494
+ action_attempt_id: {
3495
+ description: 'The ID of the action attempt.',
3496
+ format: 'uuid',
3497
+ type: 'string',
3498
+ 'x-title': 'Action Attempt ID',
3499
+ },
3500
+ action_type: { enum: ['SET_HVAC_MODE'], type: 'string' },
3501
+ error: { nullable: true },
3502
+ result: { nullable: true },
3503
+ status: { enum: ['pending'], type: 'string' },
3504
+ },
3505
+ required: [
3506
+ 'action_attempt_id',
3507
+ 'status',
3508
+ 'result',
3509
+ 'error',
3510
+ 'action_type',
3511
+ ],
3512
+ type: 'object',
3513
+ },
3514
+ {
3515
+ description: 'Setting HVAC mode succeeded.',
3516
+ properties: {
3517
+ action_attempt_id: {
3518
+ description: 'The ID of the action attempt.',
3519
+ format: 'uuid',
3520
+ type: 'string',
3521
+ 'x-title': 'Action Attempt ID',
3522
+ },
3523
+ action_type: { enum: ['SET_HVAC_MODE'], type: 'string' },
3524
+ error: { nullable: true },
3525
+ result: { properties: {}, type: 'object' },
3526
+ status: { enum: ['success'], type: 'string' },
3527
+ },
3528
+ required: [
3529
+ 'action_attempt_id',
3530
+ 'status',
3531
+ 'error',
3532
+ 'action_type',
3533
+ 'result',
3534
+ ],
3535
+ type: 'object',
3536
+ },
3537
+ {
3538
+ description: 'Setting HVAC mode failed.',
3539
+ properties: {
3540
+ action_attempt_id: {
3541
+ description: 'The ID of the action attempt.',
3542
+ format: 'uuid',
3543
+ type: 'string',
3544
+ 'x-title': 'Action Attempt ID',
3545
+ },
3546
+ action_type: { enum: ['SET_HVAC_MODE'], type: 'string' },
3547
+ error: {
3548
+ properties: {
3549
+ message: { type: 'string' },
3550
+ type: { type: 'string' },
3551
+ },
3552
+ required: ['type', 'message'],
3553
+ type: 'object',
3554
+ },
3555
+ result: { nullable: true },
3556
+ status: { enum: ['error'], type: 'string' },
3557
+ },
3558
+ required: [
3559
+ 'action_attempt_id',
3560
+ 'status',
3561
+ 'result',
3562
+ 'action_type',
3563
+ 'error',
3564
+ ],
3565
+ type: 'object',
3566
+ },
3491
3567
  {
3492
3568
  description: 'Activating climate preset.',
3493
3569
  properties: {
@@ -15121,6 +15197,7 @@ export default {
15121
15197
  'access_code.backup_access_code_pulled',
15122
15198
  'acs_system.added',
15123
15199
  'acs_system.connected',
15200
+ 'acs_system.disconnected',
15124
15201
  'acs_user.deleted',
15125
15202
  'acs_credential.deleted',
15126
15203
  'acs_credential.issued',
@@ -15197,6 +15274,7 @@ export default {
15197
15274
  'access_code.backup_access_code_pulled',
15198
15275
  'acs_system.added',
15199
15276
  'acs_system.connected',
15277
+ 'acs_system.disconnected',
15200
15278
  'acs_user.deleted',
15201
15279
  'acs_credential.deleted',
15202
15280
  'acs_credential.issued',