@seamapi/types 1.64.0 → 1.66.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 (32) hide show
  1. package/dist/connect.cjs +122 -80
  2. package/dist/connect.cjs.map +1 -1
  3. package/dist/connect.d.cts +318 -324
  4. package/dist/devicedb.d.cts +2 -22
  5. package/lib/seam/connect/openapi.d.ts +254 -276
  6. package/lib/seam/connect/openapi.js +113 -71
  7. package/lib/seam/connect/openapi.js.map +1 -1
  8. package/lib/seam/connect/route-types.d.ts +61 -42
  9. package/lib/seam/connect/unstable/models/acs/access_group.js +1 -1
  10. package/lib/seam/connect/unstable/models/acs/access_group.js.map +1 -1
  11. package/lib/seam/connect/unstable/models/acs/user.d.ts +15 -6
  12. package/lib/seam/connect/unstable/models/acs/user.js +5 -2
  13. package/lib/seam/connect/unstable/models/acs/user.js.map +1 -1
  14. package/lib/seam/connect/unstable/models/capability-properties/access-code.js +6 -6
  15. package/lib/seam/connect/unstable/models/capability-properties/access-code.js.map +1 -1
  16. package/lib/seam/connect/unstable/models/devices/capabilities-supported.d.ts +1 -1
  17. package/lib/seam/connect/unstable/models/devices/capabilities-supported.js +1 -0
  18. package/lib/seam/connect/unstable/models/devices/capabilities-supported.js.map +1 -1
  19. package/lib/seam/connect/unstable/models/devices/device-metadata.js +1 -1
  20. package/lib/seam/connect/unstable/models/devices/device-metadata.js.map +1 -1
  21. package/lib/seam/connect/unstable/models/devices/device-type.d.ts +10 -1
  22. package/lib/seam/connect/unstable/models/devices/device-type.js +8 -0
  23. package/lib/seam/connect/unstable/models/devices/device-type.js.map +1 -1
  24. package/lib/seam/connect/unstable/models/devices/managed-device.d.ts +6 -6
  25. package/lib/seam/connect/unstable/models/devices/unmanaged-device.d.ts +6 -6
  26. package/package.json +8 -8
  27. package/src/lib/seam/connect/openapi.ts +113 -71
  28. package/src/lib/seam/connect/route-types.ts +128 -43
  29. package/src/lib/seam/connect/unstable/models/acs/access_group.ts +1 -1
  30. package/src/lib/seam/connect/unstable/models/acs/user.ts +5 -2
  31. package/src/lib/seam/connect/unstable/models/devices/capabilities-supported.ts +1 -0
  32. package/src/lib/seam/connect/unstable/models/devices/device-type.ts +20 -0
@@ -19,7 +19,7 @@ export interface Routes {
19
19
  use_offline_access_code?: boolean | undefined
20
20
  is_offline_access_code?: boolean | undefined
21
21
  is_one_time_use?: boolean | undefined
22
- max_time_rounding?: ('1hour' | '1day' | '1h' | '1d') | undefined
22
+ max_time_rounding?: '1hour' | '1day' | '1h' | '1d'
23
23
  }
24
24
  commonParams: {}
25
25
  formData: {}
@@ -116,7 +116,7 @@ export interface Routes {
116
116
  use_offline_access_code?: boolean | undefined
117
117
  is_offline_access_code?: boolean | undefined
118
118
  is_one_time_use?: boolean | undefined
119
- max_time_rounding?: ('1hour' | '1day' | '1h' | '1d') | undefined
119
+ max_time_rounding?: '1hour' | '1day' | '1h' | '1d'
120
120
  }
121
121
  commonParams: {}
122
122
  formData: {}
@@ -733,13 +733,14 @@ export interface Routes {
733
733
  workspace_id: string
734
734
  created_at: string
735
735
  display_name: string
736
- external_type:
737
- | 'pti_user'
738
- | 'brivo_user'
739
- | 'hid_cm_user'
740
- | 'salto_site_user'
741
- external_type_display_name: string
736
+ external_type?:
737
+ | ('pti_user' | 'brivo_user' | 'hid_cm_user' | 'salto_site_user')
738
+ | undefined
739
+ external_type_display_name?: string | undefined
742
740
  is_suspended: boolean
741
+ starts_at?: string | undefined
742
+ ends_at?: string | undefined
743
+ is_virtual: boolean
743
744
  full_name?: string | undefined
744
745
  /** Deprecated: use email_address. */
745
746
  email?: string | undefined
@@ -1123,6 +1124,12 @@ export interface Routes {
1123
1124
  jsonBody: {
1124
1125
  acs_system_id: string
1125
1126
  acs_access_group_ids?: string[]
1127
+ access_schedule?:
1128
+ | {
1129
+ starts_at: string
1130
+ ends_at: string
1131
+ }
1132
+ | undefined
1126
1133
  full_name?: string | undefined
1127
1134
  /** Deprecated: use email_address. */
1128
1135
  email?: string | undefined
@@ -1139,13 +1146,14 @@ export interface Routes {
1139
1146
  workspace_id: string
1140
1147
  created_at: string
1141
1148
  display_name: string
1142
- external_type:
1143
- | 'pti_user'
1144
- | 'brivo_user'
1145
- | 'hid_cm_user'
1146
- | 'salto_site_user'
1147
- external_type_display_name: string
1149
+ external_type?:
1150
+ | ('pti_user' | 'brivo_user' | 'hid_cm_user' | 'salto_site_user')
1151
+ | undefined
1152
+ external_type_display_name?: string | undefined
1148
1153
  is_suspended: boolean
1154
+ starts_at?: string | undefined
1155
+ ends_at?: string | undefined
1156
+ is_virtual: boolean
1149
1157
  full_name?: string | undefined
1150
1158
  /** Deprecated: use email_address. */
1151
1159
  email?: string | undefined
@@ -1182,13 +1190,14 @@ export interface Routes {
1182
1190
  workspace_id: string
1183
1191
  created_at: string
1184
1192
  display_name: string
1185
- external_type:
1186
- | 'pti_user'
1187
- | 'brivo_user'
1188
- | 'hid_cm_user'
1189
- | 'salto_site_user'
1190
- external_type_display_name: string
1193
+ external_type?:
1194
+ | ('pti_user' | 'brivo_user' | 'hid_cm_user' | 'salto_site_user')
1195
+ | undefined
1196
+ external_type_display_name?: string | undefined
1191
1197
  is_suspended: boolean
1198
+ starts_at?: string | undefined
1199
+ ends_at?: string | undefined
1200
+ is_virtual: boolean
1192
1201
  full_name?: string | undefined
1193
1202
  /** Deprecated: use email_address. */
1194
1203
  email?: string | undefined
@@ -1214,13 +1223,14 @@ export interface Routes {
1214
1223
  workspace_id: string
1215
1224
  created_at: string
1216
1225
  display_name: string
1217
- external_type:
1218
- | 'pti_user'
1219
- | 'brivo_user'
1220
- | 'hid_cm_user'
1221
- | 'salto_site_user'
1222
- external_type_display_name: string
1226
+ external_type?:
1227
+ | ('pti_user' | 'brivo_user' | 'hid_cm_user' | 'salto_site_user')
1228
+ | undefined
1229
+ external_type_display_name?: string | undefined
1223
1230
  is_suspended: boolean
1231
+ starts_at?: string | undefined
1232
+ ends_at?: string | undefined
1233
+ is_virtual: boolean
1224
1234
  full_name?: string | undefined
1225
1235
  /** Deprecated: use email_address. */
1226
1236
  email?: string | undefined
@@ -1840,9 +1850,15 @@ export interface Routes {
1840
1850
  )
1841
1851
  | ('noiseaware_activity_zone' | 'minut_sensor')
1842
1852
  | ('ecobee_thermostat' | 'nest_thermostat')
1853
+ | ('ios_phone' | 'android_phone')
1843
1854
  /** 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. */
1844
1855
  capabilities_supported: Array<
1845
- 'access_code' | 'lock' | 'noise_detection' | 'thermostat' | 'battery'
1856
+ | 'access_code'
1857
+ | 'lock'
1858
+ | 'noise_detection'
1859
+ | 'thermostat'
1860
+ | 'battery'
1861
+ | 'phone'
1846
1862
  >
1847
1863
  /** Properties of the device. */
1848
1864
  properties: ({
@@ -2483,6 +2499,7 @@ export interface Routes {
2483
2499
  )
2484
2500
  | ('noiseaware_activity_zone' | 'minut_sensor')
2485
2501
  | ('ecobee_thermostat' | 'nest_thermostat')
2502
+ | ('ios_phone' | 'android_phone')
2486
2503
  )
2487
2504
  | undefined
2488
2505
  device_types?:
@@ -2516,6 +2533,7 @@ export interface Routes {
2516
2533
  )
2517
2534
  | ('noiseaware_activity_zone' | 'minut_sensor')
2518
2535
  | ('ecobee_thermostat' | 'nest_thermostat')
2536
+ | ('ios_phone' | 'android_phone')
2519
2537
  >
2520
2538
  | undefined
2521
2539
  manufacturer?:
@@ -2595,9 +2613,15 @@ export interface Routes {
2595
2613
  )
2596
2614
  | ('noiseaware_activity_zone' | 'minut_sensor')
2597
2615
  | ('ecobee_thermostat' | 'nest_thermostat')
2616
+ | ('ios_phone' | 'android_phone')
2598
2617
  /** 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. */
2599
2618
  capabilities_supported: Array<
2600
- 'access_code' | 'lock' | 'noise_detection' | 'thermostat' | 'battery'
2619
+ | 'access_code'
2620
+ | 'lock'
2621
+ | 'noise_detection'
2622
+ | 'thermostat'
2623
+ | 'battery'
2624
+ | 'phone'
2601
2625
  >
2602
2626
  /** Properties of the device. */
2603
2627
  properties: ({
@@ -3260,11 +3284,17 @@ export interface Routes {
3260
3284
  )
3261
3285
  | ('noiseaware_activity_zone' | 'minut_sensor')
3262
3286
  | ('ecobee_thermostat' | 'nest_thermostat')
3287
+ | ('ios_phone' | 'android_phone')
3263
3288
  /** Unique identifier for the account associated with the device. */
3264
3289
  connected_account_id: string
3265
3290
  /** 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. */
3266
3291
  capabilities_supported: Array<
3267
- 'access_code' | 'lock' | 'noise_detection' | 'thermostat' | 'battery'
3292
+ | 'access_code'
3293
+ | 'lock'
3294
+ | 'noise_detection'
3295
+ | 'thermostat'
3296
+ | 'battery'
3297
+ | 'phone'
3268
3298
  >
3269
3299
  /** Unique identifier for the Seam workspace associated with the device. */
3270
3300
  workspace_id: string
@@ -3362,6 +3392,7 @@ export interface Routes {
3362
3392
  )
3363
3393
  | ('noiseaware_activity_zone' | 'minut_sensor')
3364
3394
  | ('ecobee_thermostat' | 'nest_thermostat')
3395
+ | ('ios_phone' | 'android_phone')
3365
3396
  )
3366
3397
  | undefined
3367
3398
  device_types?:
@@ -3395,6 +3426,7 @@ export interface Routes {
3395
3426
  )
3396
3427
  | ('noiseaware_activity_zone' | 'minut_sensor')
3397
3428
  | ('ecobee_thermostat' | 'nest_thermostat')
3429
+ | ('ios_phone' | 'android_phone')
3398
3430
  >
3399
3431
  | undefined
3400
3432
  manufacturer?:
@@ -3474,11 +3506,17 @@ export interface Routes {
3474
3506
  )
3475
3507
  | ('noiseaware_activity_zone' | 'minut_sensor')
3476
3508
  | ('ecobee_thermostat' | 'nest_thermostat')
3509
+ | ('ios_phone' | 'android_phone')
3477
3510
  /** Unique identifier for the account associated with the device. */
3478
3511
  connected_account_id: string
3479
3512
  /** 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. */
3480
3513
  capabilities_supported: Array<
3481
- 'access_code' | 'lock' | 'noise_detection' | 'thermostat' | 'battery'
3514
+ | 'access_code'
3515
+ | 'lock'
3516
+ | 'noise_detection'
3517
+ | 'thermostat'
3518
+ | 'battery'
3519
+ | 'phone'
3482
3520
  >
3483
3521
  /** Unique identifier for the Seam workspace associated with the device. */
3484
3522
  workspace_id: string
@@ -3835,9 +3873,15 @@ export interface Routes {
3835
3873
  )
3836
3874
  | ('noiseaware_activity_zone' | 'minut_sensor')
3837
3875
  | ('ecobee_thermostat' | 'nest_thermostat')
3876
+ | ('ios_phone' | 'android_phone')
3838
3877
  /** 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. */
3839
3878
  capabilities_supported: Array<
3840
- 'access_code' | 'lock' | 'noise_detection' | 'thermostat' | 'battery'
3879
+ | 'access_code'
3880
+ | 'lock'
3881
+ | 'noise_detection'
3882
+ | 'thermostat'
3883
+ | 'battery'
3884
+ | 'phone'
3841
3885
  >
3842
3886
  /** Properties of the device. */
3843
3887
  properties: ({
@@ -4469,9 +4513,15 @@ export interface Routes {
4469
4513
  )
4470
4514
  | ('noiseaware_activity_zone' | 'minut_sensor')
4471
4515
  | ('ecobee_thermostat' | 'nest_thermostat')
4516
+ | ('ios_phone' | 'android_phone')
4472
4517
  /** 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. */
4473
4518
  capabilities_supported: Array<
4474
- 'access_code' | 'lock' | 'noise_detection' | 'thermostat' | 'battery'
4519
+ | 'access_code'
4520
+ | 'lock'
4521
+ | 'noise_detection'
4522
+ | 'thermostat'
4523
+ | 'battery'
4524
+ | 'phone'
4475
4525
  >
4476
4526
  /** Properties of the device. */
4477
4527
  properties: ({
@@ -5112,6 +5162,7 @@ export interface Routes {
5112
5162
  )
5113
5163
  | ('noiseaware_activity_zone' | 'minut_sensor')
5114
5164
  | ('ecobee_thermostat' | 'nest_thermostat')
5165
+ | ('ios_phone' | 'android_phone')
5115
5166
  )
5116
5167
  | undefined
5117
5168
  device_types?:
@@ -5145,6 +5196,7 @@ export interface Routes {
5145
5196
  )
5146
5197
  | ('noiseaware_activity_zone' | 'minut_sensor')
5147
5198
  | ('ecobee_thermostat' | 'nest_thermostat')
5199
+ | ('ios_phone' | 'android_phone')
5148
5200
  >
5149
5201
  | undefined
5150
5202
  manufacturer?:
@@ -5224,9 +5276,15 @@ export interface Routes {
5224
5276
  )
5225
5277
  | ('noiseaware_activity_zone' | 'minut_sensor')
5226
5278
  | ('ecobee_thermostat' | 'nest_thermostat')
5279
+ | ('ios_phone' | 'android_phone')
5227
5280
  /** 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. */
5228
5281
  capabilities_supported: Array<
5229
- 'access_code' | 'lock' | 'noise_detection' | 'thermostat' | 'battery'
5282
+ | 'access_code'
5283
+ | 'lock'
5284
+ | 'noise_detection'
5285
+ | 'thermostat'
5286
+ | 'battery'
5287
+ | 'phone'
5230
5288
  >
5231
5289
  /** Properties of the device. */
5232
5290
  properties: ({
@@ -5858,9 +5916,15 @@ export interface Routes {
5858
5916
  )
5859
5917
  | ('noiseaware_activity_zone' | 'minut_sensor')
5860
5918
  | ('ecobee_thermostat' | 'nest_thermostat')
5919
+ | ('ios_phone' | 'android_phone')
5861
5920
  /** 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. */
5862
5921
  capabilities_supported: Array<
5863
- 'access_code' | 'lock' | 'noise_detection' | 'thermostat' | 'battery'
5922
+ | 'access_code'
5923
+ | 'lock'
5924
+ | 'noise_detection'
5925
+ | 'thermostat'
5926
+ | 'battery'
5927
+ | 'phone'
5864
5928
  >
5865
5929
  /** Properties of the device. */
5866
5930
  properties: ({
@@ -6945,9 +7009,15 @@ export interface Routes {
6945
7009
  )
6946
7010
  | ('noiseaware_activity_zone' | 'minut_sensor')
6947
7011
  | ('ecobee_thermostat' | 'nest_thermostat')
7012
+ | ('ios_phone' | 'android_phone')
6948
7013
  /** 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. */
6949
7014
  capabilities_supported: Array<
6950
- 'access_code' | 'lock' | 'noise_detection' | 'thermostat' | 'battery'
7015
+ | 'access_code'
7016
+ | 'lock'
7017
+ | 'noise_detection'
7018
+ | 'thermostat'
7019
+ | 'battery'
7020
+ | 'phone'
6951
7021
  >
6952
7022
  /** Properties of the device. */
6953
7023
  properties: ({
@@ -7618,6 +7688,7 @@ export interface Routes {
7618
7688
  )
7619
7689
  | ('noiseaware_activity_zone' | 'minut_sensor')
7620
7690
  | ('ecobee_thermostat' | 'nest_thermostat')
7691
+ | ('ios_phone' | 'android_phone')
7621
7692
  )
7622
7693
  | undefined
7623
7694
  device_types?:
@@ -7651,6 +7722,7 @@ export interface Routes {
7651
7722
  )
7652
7723
  | ('noiseaware_activity_zone' | 'minut_sensor')
7653
7724
  | ('ecobee_thermostat' | 'nest_thermostat')
7725
+ | ('ios_phone' | 'android_phone')
7654
7726
  >
7655
7727
  | undefined
7656
7728
  manufacturer?:
@@ -7730,9 +7802,15 @@ export interface Routes {
7730
7802
  )
7731
7803
  | ('noiseaware_activity_zone' | 'minut_sensor')
7732
7804
  | ('ecobee_thermostat' | 'nest_thermostat')
7805
+ | ('ios_phone' | 'android_phone')
7733
7806
  /** 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. */
7734
7807
  capabilities_supported: Array<
7735
- 'access_code' | 'lock' | 'noise_detection' | 'thermostat' | 'battery'
7808
+ | 'access_code'
7809
+ | 'lock'
7810
+ | 'noise_detection'
7811
+ | 'thermostat'
7812
+ | 'battery'
7813
+ | 'phone'
7736
7814
  >
7737
7815
  /** Properties of the device. */
7738
7816
  properties: ({
@@ -8515,9 +8593,15 @@ export interface Routes {
8515
8593
  )
8516
8594
  | ('noiseaware_activity_zone' | 'minut_sensor')
8517
8595
  | ('ecobee_thermostat' | 'nest_thermostat')
8596
+ | ('ios_phone' | 'android_phone')
8518
8597
  /** 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. */
8519
8598
  capabilities_supported: Array<
8520
- 'access_code' | 'lock' | 'noise_detection' | 'thermostat' | 'battery'
8599
+ | 'access_code'
8600
+ | 'lock'
8601
+ | 'noise_detection'
8602
+ | 'thermostat'
8603
+ | 'battery'
8604
+ | 'phone'
8521
8605
  >
8522
8606
  /** Properties of the device. */
8523
8607
  properties: ({
@@ -9134,13 +9218,14 @@ export interface Routes {
9134
9218
  workspace_id: string
9135
9219
  created_at: string
9136
9220
  display_name: string
9137
- external_type:
9138
- | 'pti_user'
9139
- | 'brivo_user'
9140
- | 'hid_cm_user'
9141
- | 'salto_site_user'
9142
- external_type_display_name: string
9221
+ external_type?:
9222
+ | ('pti_user' | 'brivo_user' | 'hid_cm_user' | 'salto_site_user')
9223
+ | undefined
9224
+ external_type_display_name?: string | undefined
9143
9225
  is_suspended: boolean
9226
+ starts_at?: string | undefined
9227
+ ends_at?: string | undefined
9228
+ is_virtual: boolean
9144
9229
  full_name?: string | undefined
9145
9230
  /** Deprecated: use email_address. */
9146
9231
  email?: string | undefined
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod'
2
2
 
3
- // If changed, update seam.acs_access_group.access_group_type check constraint
3
+ // If changed, update seam.acs_access_group.external_type generated column
4
4
  export const acs_access_group_external_type = z.enum([
5
5
  'pti_unit',
6
6
  'pti_access_level',
@@ -41,9 +41,12 @@ export const acs_user = z
41
41
  workspace_id: z.string().uuid(),
42
42
  created_at: z.string().datetime(),
43
43
  display_name: z.string(),
44
- external_type: acs_user_external_type,
45
- external_type_display_name: z.string(),
44
+ external_type: acs_user_external_type.optional(),
45
+ external_type_display_name: z.string().optional(),
46
46
  is_suspended: z.boolean(),
47
+ starts_at: z.string().datetime().optional(),
48
+ ends_at: z.string().datetime().optional(),
49
+ is_virtual: z.boolean(),
47
50
  })
48
51
  .merge(user_fields)
49
52
 
@@ -6,6 +6,7 @@ export const capabilities = z.enum([
6
6
  'noise_detection',
7
7
  'thermostat',
8
8
  'battery',
9
+ 'phone',
9
10
  ])
10
11
 
11
12
  export type Capabilities = z.infer<typeof capabilities>
@@ -80,10 +80,30 @@ export const thermostat_device_type = z.enum(
80
80
 
81
81
  export type ThermostatDeviceType = z.infer<typeof thermostat_device_type>
82
82
 
83
+ /** Phones */
84
+ export const PHONE_DEVICE_TYPE = {
85
+ IOS_PHONE: 'ios_phone',
86
+ ANDROID_PHONE: 'android_phone',
87
+ } as const
88
+
89
+ type PhoneDeviceTypeFromMapping =
90
+ (typeof PHONE_DEVICE_TYPE)[keyof typeof PHONE_DEVICE_TYPE]
91
+
92
+ export const PHONE_DEVICE_TYPE_LIST = Object.values(
93
+ PHONE_DEVICE_TYPE,
94
+ ) as PhoneDeviceTypeFromMapping[]
95
+
96
+ export const phone_device_type = z.enum(
97
+ Object.values(PHONE_DEVICE_TYPE_LIST) as [PhoneDeviceTypeFromMapping],
98
+ )
99
+
100
+ export type PhoneDeviceType = z.infer<typeof phone_device_type>
101
+
83
102
  export const any_device_type = z.union([
84
103
  lock_device_type,
85
104
  noise_sensor_device_type,
86
105
  thermostat_device_type,
106
+ phone_device_type,
87
107
  ])
88
108
 
89
109
  export type AnyDeviceType = z.infer<typeof any_device_type>