@seamapi/types 1.110.0 → 1.112.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.
@@ -2207,7 +2207,7 @@ export interface Routes {
2207
2207
  | 'tedee_lock'
2208
2208
  )
2209
2209
  | ('noiseaware_activity_zone' | 'minut_sensor')
2210
- | ('ecobee_thermostat' | 'nest_thermostat')
2210
+ | ('ecobee_thermostat' | 'nest_thermostat' | 'honeywell_thermostat')
2211
2211
  | ('ios_phone' | 'android_phone')
2212
2212
  /** Collection of capabilities that the device supports when connected to Seam. Values are "access_code," which indicates that the device can manage and utilize digital PIN codes for secure access; "lock," which indicates that the device controls a door locking mechanism, enabling the remote opening and closing of doors and other entry points; "noise_detection," which indicates that the device supports monitoring and responding to ambient noise levels; "thermostat," which indicates that the device can regulate and adjust indoor temperatures; and "battery," which indicates that the device can manage battery life and health. */
2213
2213
  capabilities_supported: Array<
@@ -2454,6 +2454,12 @@ export interface Routes {
2454
2454
  device_name: string
2455
2455
  }
2456
2456
  | undefined
2457
+ honeywell_metadata?:
2458
+ | {
2459
+ honeywell_device_id: string
2460
+ device_name: string
2461
+ }
2462
+ | undefined
2457
2463
  hubitat_metadata?:
2458
2464
  | {
2459
2465
  device_id: string
@@ -2842,6 +2848,8 @@ export interface Routes {
2842
2848
  /** Indicates whether Seam manages the device. */
2843
2849
  is_managed: true
2844
2850
  custom_metadata?: Record<string, string | boolean | null> | undefined
2851
+ can_remotely_unlock?: boolean | undefined
2852
+ can_program_online_access_codes?: boolean | undefined
2845
2853
  }
2846
2854
  }
2847
2855
  }
@@ -2886,7 +2894,7 @@ export interface Routes {
2886
2894
  | 'tedee_lock'
2887
2895
  )
2888
2896
  | ('noiseaware_activity_zone' | 'minut_sensor')
2889
- | ('ecobee_thermostat' | 'nest_thermostat')
2897
+ | ('ecobee_thermostat' | 'nest_thermostat' | 'honeywell_thermostat')
2890
2898
  | ('ios_phone' | 'android_phone')
2891
2899
  )
2892
2900
  | undefined
@@ -2921,7 +2929,7 @@ export interface Routes {
2921
2929
  | 'tedee_lock'
2922
2930
  )
2923
2931
  | ('noiseaware_activity_zone' | 'minut_sensor')
2924
- | ('ecobee_thermostat' | 'nest_thermostat')
2932
+ | ('ecobee_thermostat' | 'nest_thermostat' | 'honeywell_thermostat')
2925
2933
  | ('ios_phone' | 'android_phone')
2926
2934
  >
2927
2935
  | undefined
@@ -2960,6 +2968,7 @@ export interface Routes {
2960
2968
  | 'smartthings'
2961
2969
  | 'dormakaba_oracode'
2962
2970
  | 'tedee'
2971
+ | 'honeywell'
2963
2972
  )
2964
2973
  | undefined
2965
2974
  device_ids?: string[] | undefined
@@ -3004,7 +3013,7 @@ export interface Routes {
3004
3013
  | 'tedee_lock'
3005
3014
  )
3006
3015
  | ('noiseaware_activity_zone' | 'minut_sensor')
3007
- | ('ecobee_thermostat' | 'nest_thermostat')
3016
+ | ('ecobee_thermostat' | 'nest_thermostat' | 'honeywell_thermostat')
3008
3017
  | ('ios_phone' | 'android_phone')
3009
3018
  /** Collection of capabilities that the device supports when connected to Seam. Values are "access_code," which indicates that the device can manage and utilize digital PIN codes for secure access; "lock," which indicates that the device controls a door locking mechanism, enabling the remote opening and closing of doors and other entry points; "noise_detection," which indicates that the device supports monitoring and responding to ambient noise levels; "thermostat," which indicates that the device can regulate and adjust indoor temperatures; and "battery," which indicates that the device can manage battery life and health. */
3010
3019
  capabilities_supported: Array<
@@ -3251,6 +3260,12 @@ export interface Routes {
3251
3260
  device_name: string
3252
3261
  }
3253
3262
  | undefined
3263
+ honeywell_metadata?:
3264
+ | {
3265
+ honeywell_device_id: string
3266
+ device_name: string
3267
+ }
3268
+ | undefined
3254
3269
  hubitat_metadata?:
3255
3270
  | {
3256
3271
  device_id: string
@@ -3639,6 +3654,8 @@ export interface Routes {
3639
3654
  /** Indicates whether Seam manages the device. */
3640
3655
  is_managed: true
3641
3656
  custom_metadata?: Record<string, string | boolean | null> | undefined
3657
+ can_remotely_unlock?: boolean | undefined
3658
+ can_program_online_access_codes?: boolean | undefined
3642
3659
  }>
3643
3660
  }
3644
3661
  }
@@ -3705,7 +3722,7 @@ export interface Routes {
3705
3722
  | 'tedee_lock'
3706
3723
  )
3707
3724
  | ('noiseaware_activity_zone' | 'minut_sensor')
3708
- | ('ecobee_thermostat' | 'nest_thermostat')
3725
+ | ('ecobee_thermostat' | 'nest_thermostat' | 'honeywell_thermostat')
3709
3726
  | ('ios_phone' | 'android_phone')
3710
3727
  /** Unique identifier for the account associated with the device. */
3711
3728
  connected_account_id: string
@@ -3814,7 +3831,7 @@ export interface Routes {
3814
3831
  | 'tedee_lock'
3815
3832
  )
3816
3833
  | ('noiseaware_activity_zone' | 'minut_sensor')
3817
- | ('ecobee_thermostat' | 'nest_thermostat')
3834
+ | ('ecobee_thermostat' | 'nest_thermostat' | 'honeywell_thermostat')
3818
3835
  | ('ios_phone' | 'android_phone')
3819
3836
  )
3820
3837
  | undefined
@@ -3849,7 +3866,7 @@ export interface Routes {
3849
3866
  | 'tedee_lock'
3850
3867
  )
3851
3868
  | ('noiseaware_activity_zone' | 'minut_sensor')
3852
- | ('ecobee_thermostat' | 'nest_thermostat')
3869
+ | ('ecobee_thermostat' | 'nest_thermostat' | 'honeywell_thermostat')
3853
3870
  | ('ios_phone' | 'android_phone')
3854
3871
  >
3855
3872
  | undefined
@@ -3888,6 +3905,7 @@ export interface Routes {
3888
3905
  | 'smartthings'
3889
3906
  | 'dormakaba_oracode'
3890
3907
  | 'tedee'
3908
+ | 'honeywell'
3891
3909
  )
3892
3910
  | undefined
3893
3911
  device_ids?: string[] | undefined
@@ -3932,7 +3950,7 @@ export interface Routes {
3932
3950
  | 'tedee_lock'
3933
3951
  )
3934
3952
  | ('noiseaware_activity_zone' | 'minut_sensor')
3935
- | ('ecobee_thermostat' | 'nest_thermostat')
3953
+ | ('ecobee_thermostat' | 'nest_thermostat' | 'honeywell_thermostat')
3936
3954
  | ('ios_phone' | 'android_phone')
3937
3955
  /** Unique identifier for the account associated with the device. */
3938
3956
  connected_account_id: string
@@ -4302,7 +4320,7 @@ export interface Routes {
4302
4320
  | 'tedee_lock'
4303
4321
  )
4304
4322
  | ('noiseaware_activity_zone' | 'minut_sensor')
4305
- | ('ecobee_thermostat' | 'nest_thermostat')
4323
+ | ('ecobee_thermostat' | 'nest_thermostat' | 'honeywell_thermostat')
4306
4324
  | ('ios_phone' | 'android_phone')
4307
4325
  /** Collection of capabilities that the device supports when connected to Seam. Values are "access_code," which indicates that the device can manage and utilize digital PIN codes for secure access; "lock," which indicates that the device controls a door locking mechanism, enabling the remote opening and closing of doors and other entry points; "noise_detection," which indicates that the device supports monitoring and responding to ambient noise levels; "thermostat," which indicates that the device can regulate and adjust indoor temperatures; and "battery," which indicates that the device can manage battery life and health. */
4308
4326
  capabilities_supported: Array<
@@ -4549,6 +4567,12 @@ export interface Routes {
4549
4567
  device_name: string
4550
4568
  }
4551
4569
  | undefined
4570
+ honeywell_metadata?:
4571
+ | {
4572
+ honeywell_device_id: string
4573
+ device_name: string
4574
+ }
4575
+ | undefined
4552
4576
  hubitat_metadata?:
4553
4577
  | {
4554
4578
  device_id: string
@@ -4937,6 +4961,8 @@ export interface Routes {
4937
4961
  /** Indicates whether Seam manages the device. */
4938
4962
  is_managed: true
4939
4963
  custom_metadata?: Record<string, string | boolean | null> | undefined
4964
+ can_remotely_unlock?: boolean | undefined
4965
+ can_program_online_access_codes?: boolean | undefined
4940
4966
  }
4941
4967
  device: {
4942
4968
  /** Unique identifier for the device. */
@@ -4972,7 +4998,7 @@ export interface Routes {
4972
4998
  | 'tedee_lock'
4973
4999
  )
4974
5000
  | ('noiseaware_activity_zone' | 'minut_sensor')
4975
- | ('ecobee_thermostat' | 'nest_thermostat')
5001
+ | ('ecobee_thermostat' | 'nest_thermostat' | 'honeywell_thermostat')
4976
5002
  | ('ios_phone' | 'android_phone')
4977
5003
  /** Collection of capabilities that the device supports when connected to Seam. Values are "access_code," which indicates that the device can manage and utilize digital PIN codes for secure access; "lock," which indicates that the device controls a door locking mechanism, enabling the remote opening and closing of doors and other entry points; "noise_detection," which indicates that the device supports monitoring and responding to ambient noise levels; "thermostat," which indicates that the device can regulate and adjust indoor temperatures; and "battery," which indicates that the device can manage battery life and health. */
4978
5004
  capabilities_supported: Array<
@@ -5219,6 +5245,12 @@ export interface Routes {
5219
5245
  device_name: string
5220
5246
  }
5221
5247
  | undefined
5248
+ honeywell_metadata?:
5249
+ | {
5250
+ honeywell_device_id: string
5251
+ device_name: string
5252
+ }
5253
+ | undefined
5222
5254
  hubitat_metadata?:
5223
5255
  | {
5224
5256
  device_id: string
@@ -5607,6 +5639,8 @@ export interface Routes {
5607
5639
  /** Indicates whether Seam manages the device. */
5608
5640
  is_managed: true
5609
5641
  custom_metadata?: Record<string, string | boolean | null> | undefined
5642
+ can_remotely_unlock?: boolean | undefined
5643
+ can_program_online_access_codes?: boolean | undefined
5610
5644
  }
5611
5645
  }
5612
5646
  }
@@ -5651,7 +5685,7 @@ export interface Routes {
5651
5685
  | 'tedee_lock'
5652
5686
  )
5653
5687
  | ('noiseaware_activity_zone' | 'minut_sensor')
5654
- | ('ecobee_thermostat' | 'nest_thermostat')
5688
+ | ('ecobee_thermostat' | 'nest_thermostat' | 'honeywell_thermostat')
5655
5689
  | ('ios_phone' | 'android_phone')
5656
5690
  )
5657
5691
  | undefined
@@ -5686,7 +5720,7 @@ export interface Routes {
5686
5720
  | 'tedee_lock'
5687
5721
  )
5688
5722
  | ('noiseaware_activity_zone' | 'minut_sensor')
5689
- | ('ecobee_thermostat' | 'nest_thermostat')
5723
+ | ('ecobee_thermostat' | 'nest_thermostat' | 'honeywell_thermostat')
5690
5724
  | ('ios_phone' | 'android_phone')
5691
5725
  >
5692
5726
  | undefined
@@ -5725,6 +5759,7 @@ export interface Routes {
5725
5759
  | 'smartthings'
5726
5760
  | 'dormakaba_oracode'
5727
5761
  | 'tedee'
5762
+ | 'honeywell'
5728
5763
  )
5729
5764
  | undefined
5730
5765
  device_ids?: string[] | undefined
@@ -5769,7 +5804,7 @@ export interface Routes {
5769
5804
  | 'tedee_lock'
5770
5805
  )
5771
5806
  | ('noiseaware_activity_zone' | 'minut_sensor')
5772
- | ('ecobee_thermostat' | 'nest_thermostat')
5807
+ | ('ecobee_thermostat' | 'nest_thermostat' | 'honeywell_thermostat')
5773
5808
  | ('ios_phone' | 'android_phone')
5774
5809
  /** Collection of capabilities that the device supports when connected to Seam. Values are "access_code," which indicates that the device can manage and utilize digital PIN codes for secure access; "lock," which indicates that the device controls a door locking mechanism, enabling the remote opening and closing of doors and other entry points; "noise_detection," which indicates that the device supports monitoring and responding to ambient noise levels; "thermostat," which indicates that the device can regulate and adjust indoor temperatures; and "battery," which indicates that the device can manage battery life and health. */
5775
5810
  capabilities_supported: Array<
@@ -6016,6 +6051,12 @@ export interface Routes {
6016
6051
  device_name: string
6017
6052
  }
6018
6053
  | undefined
6054
+ honeywell_metadata?:
6055
+ | {
6056
+ honeywell_device_id: string
6057
+ device_name: string
6058
+ }
6059
+ | undefined
6019
6060
  hubitat_metadata?:
6020
6061
  | {
6021
6062
  device_id: string
@@ -6404,6 +6445,8 @@ export interface Routes {
6404
6445
  /** Indicates whether Seam manages the device. */
6405
6446
  is_managed: true
6406
6447
  custom_metadata?: Record<string, string | boolean | null> | undefined
6448
+ can_remotely_unlock?: boolean | undefined
6449
+ can_program_online_access_codes?: boolean | undefined
6407
6450
  }>
6408
6451
  devices: Array<{
6409
6452
  /** Unique identifier for the device. */
@@ -6439,7 +6482,7 @@ export interface Routes {
6439
6482
  | 'tedee_lock'
6440
6483
  )
6441
6484
  | ('noiseaware_activity_zone' | 'minut_sensor')
6442
- | ('ecobee_thermostat' | 'nest_thermostat')
6485
+ | ('ecobee_thermostat' | 'nest_thermostat' | 'honeywell_thermostat')
6443
6486
  | ('ios_phone' | 'android_phone')
6444
6487
  /** Collection of capabilities that the device supports when connected to Seam. Values are "access_code," which indicates that the device can manage and utilize digital PIN codes for secure access; "lock," which indicates that the device controls a door locking mechanism, enabling the remote opening and closing of doors and other entry points; "noise_detection," which indicates that the device supports monitoring and responding to ambient noise levels; "thermostat," which indicates that the device can regulate and adjust indoor temperatures; and "battery," which indicates that the device can manage battery life and health. */
6445
6488
  capabilities_supported: Array<
@@ -6686,6 +6729,12 @@ export interface Routes {
6686
6729
  device_name: string
6687
6730
  }
6688
6731
  | undefined
6732
+ honeywell_metadata?:
6733
+ | {
6734
+ honeywell_device_id: string
6735
+ device_name: string
6736
+ }
6737
+ | undefined
6689
6738
  hubitat_metadata?:
6690
6739
  | {
6691
6740
  device_id: string
@@ -7074,6 +7123,8 @@ export interface Routes {
7074
7123
  /** Indicates whether Seam manages the device. */
7075
7124
  is_managed: true
7076
7125
  custom_metadata?: Record<string, string | boolean | null> | undefined
7126
+ can_remotely_unlock?: boolean | undefined
7127
+ can_program_online_access_codes?: boolean | undefined
7077
7128
  }>
7078
7129
  }
7079
7130
  }
@@ -7445,6 +7496,8 @@ export interface Routes {
7445
7496
  /** Indicates whether Seam manages the device. */
7446
7497
  is_managed: true
7447
7498
  custom_metadata?: Record<string, string | boolean | null> | undefined
7499
+ can_remotely_unlock?: boolean | undefined
7500
+ can_program_online_access_codes?: boolean | undefined
7448
7501
  }>
7449
7502
  }
7450
7503
  }
@@ -7522,6 +7575,8 @@ export interface Routes {
7522
7575
  /** Indicates whether Seam manages the device. */
7523
7576
  is_managed: true
7524
7577
  custom_metadata?: Record<string, string | boolean | null> | undefined
7578
+ can_remotely_unlock?: boolean | undefined
7579
+ can_program_online_access_codes?: boolean | undefined
7525
7580
  }
7526
7581
  }
7527
7582
  }
@@ -7745,7 +7800,7 @@ export interface Routes {
7745
7800
  | 'tedee_lock'
7746
7801
  )
7747
7802
  | ('noiseaware_activity_zone' | 'minut_sensor')
7748
- | ('ecobee_thermostat' | 'nest_thermostat')
7803
+ | ('ecobee_thermostat' | 'nest_thermostat' | 'honeywell_thermostat')
7749
7804
  | ('ios_phone' | 'android_phone')
7750
7805
  /** Collection of capabilities that the device supports when connected to Seam. Values are "access_code," which indicates that the device can manage and utilize digital PIN codes for secure access; "lock," which indicates that the device controls a door locking mechanism, enabling the remote opening and closing of doors and other entry points; "noise_detection," which indicates that the device supports monitoring and responding to ambient noise levels; "thermostat," which indicates that the device can regulate and adjust indoor temperatures; and "battery," which indicates that the device can manage battery life and health. */
7751
7806
  capabilities_supported: Array<
@@ -7992,6 +8047,12 @@ export interface Routes {
7992
8047
  device_name: string
7993
8048
  }
7994
8049
  | undefined
8050
+ honeywell_metadata?:
8051
+ | {
8052
+ honeywell_device_id: string
8053
+ device_name: string
8054
+ }
8055
+ | undefined
7995
8056
  hubitat_metadata?:
7996
8057
  | {
7997
8058
  device_id: string
@@ -8380,6 +8441,8 @@ export interface Routes {
8380
8441
  /** Indicates whether Seam manages the device. */
8381
8442
  is_managed: true
8382
8443
  custom_metadata?: Record<string, string | boolean | null> | undefined
8444
+ can_remotely_unlock?: boolean | undefined
8445
+ can_program_online_access_codes?: boolean | undefined
8383
8446
  }
8384
8447
  }
8385
8448
  }
@@ -8454,7 +8517,7 @@ export interface Routes {
8454
8517
  | 'tedee_lock'
8455
8518
  )
8456
8519
  | ('noiseaware_activity_zone' | 'minut_sensor')
8457
- | ('ecobee_thermostat' | 'nest_thermostat')
8520
+ | ('ecobee_thermostat' | 'nest_thermostat' | 'honeywell_thermostat')
8458
8521
  | ('ios_phone' | 'android_phone')
8459
8522
  )
8460
8523
  | undefined
@@ -8489,7 +8552,7 @@ export interface Routes {
8489
8552
  | 'tedee_lock'
8490
8553
  )
8491
8554
  | ('noiseaware_activity_zone' | 'minut_sensor')
8492
- | ('ecobee_thermostat' | 'nest_thermostat')
8555
+ | ('ecobee_thermostat' | 'nest_thermostat' | 'honeywell_thermostat')
8493
8556
  | ('ios_phone' | 'android_phone')
8494
8557
  >
8495
8558
  | undefined
@@ -8528,6 +8591,7 @@ export interface Routes {
8528
8591
  | 'smartthings'
8529
8592
  | 'dormakaba_oracode'
8530
8593
  | 'tedee'
8594
+ | 'honeywell'
8531
8595
  )
8532
8596
  | undefined
8533
8597
  device_ids?: string[] | undefined
@@ -8572,7 +8636,7 @@ export interface Routes {
8572
8636
  | 'tedee_lock'
8573
8637
  )
8574
8638
  | ('noiseaware_activity_zone' | 'minut_sensor')
8575
- | ('ecobee_thermostat' | 'nest_thermostat')
8639
+ | ('ecobee_thermostat' | 'nest_thermostat' | 'honeywell_thermostat')
8576
8640
  | ('ios_phone' | 'android_phone')
8577
8641
  /** Collection of capabilities that the device supports when connected to Seam. Values are "access_code," which indicates that the device can manage and utilize digital PIN codes for secure access; "lock," which indicates that the device controls a door locking mechanism, enabling the remote opening and closing of doors and other entry points; "noise_detection," which indicates that the device supports monitoring and responding to ambient noise levels; "thermostat," which indicates that the device can regulate and adjust indoor temperatures; and "battery," which indicates that the device can manage battery life and health. */
8578
8642
  capabilities_supported: Array<
@@ -8819,6 +8883,12 @@ export interface Routes {
8819
8883
  device_name: string
8820
8884
  }
8821
8885
  | undefined
8886
+ honeywell_metadata?:
8887
+ | {
8888
+ honeywell_device_id: string
8889
+ device_name: string
8890
+ }
8891
+ | undefined
8822
8892
  hubitat_metadata?:
8823
8893
  | {
8824
8894
  device_id: string
@@ -9207,6 +9277,8 @@ export interface Routes {
9207
9277
  /** Indicates whether Seam manages the device. */
9208
9278
  is_managed: true
9209
9279
  custom_metadata?: Record<string, string | boolean | null> | undefined
9280
+ can_remotely_unlock?: boolean | undefined
9281
+ can_program_online_access_codes?: boolean | undefined
9210
9282
  }>
9211
9283
  }
9212
9284
  }
@@ -9469,7 +9541,7 @@ export interface Routes {
9469
9541
  | 'tedee_lock'
9470
9542
  )
9471
9543
  | ('noiseaware_activity_zone' | 'minut_sensor')
9472
- | ('ecobee_thermostat' | 'nest_thermostat')
9544
+ | ('ecobee_thermostat' | 'nest_thermostat' | 'honeywell_thermostat')
9473
9545
  | ('ios_phone' | 'android_phone')
9474
9546
  /** Collection of capabilities that the device supports when connected to Seam. Values are "access_code," which indicates that the device can manage and utilize digital PIN codes for secure access; "lock," which indicates that the device controls a door locking mechanism, enabling the remote opening and closing of doors and other entry points; "noise_detection," which indicates that the device supports monitoring and responding to ambient noise levels; "thermostat," which indicates that the device can regulate and adjust indoor temperatures; and "battery," which indicates that the device can manage battery life and health. */
9475
9547
  capabilities_supported: Array<
@@ -9716,6 +9788,12 @@ export interface Routes {
9716
9788
  device_name: string
9717
9789
  }
9718
9790
  | undefined
9791
+ honeywell_metadata?:
9792
+ | {
9793
+ honeywell_device_id: string
9794
+ device_name: string
9795
+ }
9796
+ | undefined
9719
9797
  hubitat_metadata?:
9720
9798
  | {
9721
9799
  device_id: string
@@ -10104,6 +10182,8 @@ export interface Routes {
10104
10182
  /** Indicates whether Seam manages the device. */
10105
10183
  is_managed: true
10106
10184
  custom_metadata?: Record<string, string | boolean | null> | undefined
10185
+ can_remotely_unlock?: boolean | undefined
10186
+ can_program_online_access_codes?: boolean | undefined
10107
10187
  }>
10108
10188
  }
10109
10189
  }
@@ -174,6 +174,11 @@ export const device_metadata = z
174
174
  device_name: z.string(),
175
175
  }),
176
176
 
177
+ honeywell_metadata: z.object({
178
+ honeywell_device_id: z.string(),
179
+ device_name: z.string(),
180
+ }),
181
+
177
182
  hubitat_metadata: z.object({
178
183
  device_id: z.string(),
179
184
  device_name: z.string(),
@@ -66,6 +66,7 @@ export type NoiseSensorDeviceType = z.infer<typeof noise_sensor_device_type>
66
66
  export const THERMOSTAT_DEVICE_TYPE = {
67
67
  ECOBEE_THERMOSTAT: 'ecobee_thermostat',
68
68
  NEST_THERMOSTAT: 'nest_thermostat',
69
+ HONEYWELL_THERMOSTAT: 'honeywell_thermostat',
69
70
  } as const
70
71
 
71
72
  type ThermostatDeviceTypeFromMapping =
@@ -1,6 +1,8 @@
1
1
  import type { SetRequired, Simplify } from 'type-fest'
2
2
  import { z } from 'zod'
3
3
 
4
+ import { schemas as devicedb_schemas } from '@seamapi/types/devicedb'
5
+
4
6
  import { custom_metadata } from '../../../stable/models/custom-metadata.js'
5
7
  import { capability_properties } from '../capability-properties/index.js'
6
8
  import { capabilities } from './capabilities-supported.js'
@@ -94,72 +96,76 @@ export const common_device_properties = z.object({
94
96
  .optional(),
95
97
  })
96
98
 
97
- export const managed_device = z.object({
98
- device_id: z.string().uuid().describe('Unique identifier for the device.'),
99
- device_type: any_device_type.describe('Type of the device.'),
100
- capabilities_supported: z
101
- .array(capabilities)
102
- .describe(
103
- 'Collection of capabilities that the device supports when connected to Seam. Values are "access_code," which indicates that the device can manage and utilize digital PIN codes for secure access; "lock," which indicates that the device controls a door locking mechanism, enabling the remote opening and closing of doors and other entry points; "noise_detection," which indicates that the device supports monitoring and responding to ambient noise levels; "thermostat," which indicates that the device can regulate and adjust indoor temperatures; and "battery," which indicates that the device can manage battery life and health.',
104
- ),
105
- properties: common_device_properties
106
- .and(phone_specific_properties.partial())
107
- .and(device_metadata)
108
- .and(capability_properties)
109
- .describe('Properties of the device.'),
110
- location: z
111
- // todo: optional instead of nullable
112
- .object({
113
- location_name: z
114
- .string()
115
- .optional()
116
- .describe('Name of the device location.'),
117
- timezone: z
118
- .string()
119
- .optional()
120
- .describe('Time zone of the device location.'),
121
- })
122
- .nullable()
123
- .describe('Location information for the device.'),
124
- connected_account_id: z
125
- .string()
126
- .uuid()
127
- .describe('Unique identifier for the account associated with the device.'),
128
- workspace_id: z
129
- .string()
130
- .uuid()
131
- .describe(
132
- 'Unique identifier for the Seam workspace associated with the device.',
133
- ),
134
- errors: z
135
- .array(
136
- z.object({
137
- error_code: z.string(),
138
- message: z.string(),
139
- }),
140
- )
141
- .describe(
142
- 'Array of errors associated with the device. 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.',
143
- ),
144
- warnings: z
145
- .array(
146
- z.object({
147
- warning_code: z.string(),
148
- message: z.string(),
149
- }),
150
- )
151
- .describe(
152
- 'Array of warnings associated with the device. Each warning object within the array contains two fields: "warning_code" and "message." "warning_code" is a string that uniquely identifies the type of warning, enabling quick recognition and categorization of the issue. "message" provides a more detailed description of the warning, offering insights into the issue and potentially how to rectify it.',
153
- ),
154
- created_at: z
155
- .string()
156
- .datetime()
157
- .describe('Date and time at which the device object was created.'),
158
- is_managed: z
159
- .literal(true)
160
- .describe('Indicates whether Seam manages the device.'),
161
- custom_metadata: custom_metadata.optional(),
162
- })
99
+ export const managed_device = z
100
+ .object({
101
+ device_id: z.string().uuid().describe('Unique identifier for the device.'),
102
+ device_type: any_device_type.describe('Type of the device.'),
103
+ capabilities_supported: z
104
+ .array(capabilities)
105
+ .describe(
106
+ 'Collection of capabilities that the device supports when connected to Seam. Values are "access_code," which indicates that the device can manage and utilize digital PIN codes for secure access; "lock," which indicates that the device controls a door locking mechanism, enabling the remote opening and closing of doors and other entry points; "noise_detection," which indicates that the device supports monitoring and responding to ambient noise levels; "thermostat," which indicates that the device can regulate and adjust indoor temperatures; and "battery," which indicates that the device can manage battery life and health.',
107
+ ),
108
+ properties: common_device_properties
109
+ .and(phone_specific_properties.partial())
110
+ .and(device_metadata)
111
+ .and(capability_properties)
112
+ .describe('Properties of the device.'),
113
+ location: z
114
+ // todo: optional instead of nullable
115
+ .object({
116
+ location_name: z
117
+ .string()
118
+ .optional()
119
+ .describe('Name of the device location.'),
120
+ timezone: z
121
+ .string()
122
+ .optional()
123
+ .describe('Time zone of the device location.'),
124
+ })
125
+ .nullable()
126
+ .describe('Location information for the device.'),
127
+ connected_account_id: z
128
+ .string()
129
+ .uuid()
130
+ .describe(
131
+ 'Unique identifier for the account associated with the device.',
132
+ ),
133
+ workspace_id: z
134
+ .string()
135
+ .uuid()
136
+ .describe(
137
+ 'Unique identifier for the Seam workspace associated with the device.',
138
+ ),
139
+ errors: z
140
+ .array(
141
+ z.object({
142
+ error_code: z.string(),
143
+ message: z.string(),
144
+ }),
145
+ )
146
+ .describe(
147
+ 'Array of errors associated with the device. 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.',
148
+ ),
149
+ warnings: z
150
+ .array(
151
+ z.object({
152
+ warning_code: z.string(),
153
+ message: z.string(),
154
+ }),
155
+ )
156
+ .describe(
157
+ 'Array of warnings associated with the device. Each warning object within the array contains two fields: "warning_code" and "message." "warning_code" is a string that uniquely identifies the type of warning, enabling quick recognition and categorization of the issue. "message" provides a more detailed description of the warning, offering insights into the issue and potentially how to rectify it.',
158
+ ),
159
+ created_at: z
160
+ .string()
161
+ .datetime()
162
+ .describe('Date and time at which the device object was created.'),
163
+ is_managed: z
164
+ .literal(true)
165
+ .describe('Indicates whether Seam manages the device.'),
166
+ custom_metadata: custom_metadata.optional(),
167
+ })
168
+ .merge(devicedb_schemas.device_capability_flags)
163
169
 
164
170
  export type ManagedDevice = z.infer<typeof managed_device>
165
171