@seamapi/types 1.65.0 → 1.67.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 (27) hide show
  1. package/dist/connect.cjs +123 -80
  2. package/dist/connect.cjs.map +1 -1
  3. package/dist/connect.d.cts +317 -320
  4. package/lib/seam/connect/openapi.d.ts +254 -276
  5. package/lib/seam/connect/openapi.js +114 -71
  6. package/lib/seam/connect/openapi.js.map +1 -1
  7. package/lib/seam/connect/route-types.d.ts +62 -43
  8. package/lib/seam/connect/unstable/models/acs/access_group.js +1 -1
  9. package/lib/seam/connect/unstable/models/acs/access_group.js.map +1 -1
  10. package/lib/seam/connect/unstable/models/acs/user.d.ts +15 -6
  11. package/lib/seam/connect/unstable/models/acs/user.js +5 -2
  12. package/lib/seam/connect/unstable/models/acs/user.js.map +1 -1
  13. package/lib/seam/connect/unstable/models/devices/capabilities-supported.d.ts +1 -1
  14. package/lib/seam/connect/unstable/models/devices/capabilities-supported.js +1 -0
  15. package/lib/seam/connect/unstable/models/devices/capabilities-supported.js.map +1 -1
  16. package/lib/seam/connect/unstable/models/devices/device-type.d.ts +10 -1
  17. package/lib/seam/connect/unstable/models/devices/device-type.js +8 -0
  18. package/lib/seam/connect/unstable/models/devices/device-type.js.map +1 -1
  19. package/lib/seam/connect/unstable/models/devices/managed-device.d.ts +6 -6
  20. package/lib/seam/connect/unstable/models/devices/unmanaged-device.d.ts +6 -6
  21. package/package.json +1 -1
  22. package/src/lib/seam/connect/openapi.ts +114 -71
  23. package/src/lib/seam/connect/route-types.ts +129 -43
  24. package/src/lib/seam/connect/unstable/models/acs/access_group.ts +1 -1
  25. package/src/lib/seam/connect/unstable/models/acs/user.ts +5 -2
  26. package/src/lib/seam/connect/unstable/models/devices/capabilities-supported.ts +1 -0
  27. 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
@@ -1542,6 +1552,7 @@ export interface Routes {
1542
1552
  | 'seam_passport'
1543
1553
  | 'visionline'
1544
1554
  | 'assa_abloy_credential_service'
1555
+ | 'seam_bridge'
1545
1556
  | 'yale_access'
1546
1557
  | 'hid_cm'
1547
1558
  >
@@ -1840,9 +1851,15 @@ export interface Routes {
1840
1851
  )
1841
1852
  | ('noiseaware_activity_zone' | 'minut_sensor')
1842
1853
  | ('ecobee_thermostat' | 'nest_thermostat')
1854
+ | ('ios_phone' | 'android_phone')
1843
1855
  /** 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
1856
  capabilities_supported: Array<
1845
- 'access_code' | 'lock' | 'noise_detection' | 'thermostat' | 'battery'
1857
+ | 'access_code'
1858
+ | 'lock'
1859
+ | 'noise_detection'
1860
+ | 'thermostat'
1861
+ | 'battery'
1862
+ | 'phone'
1846
1863
  >
1847
1864
  /** Properties of the device. */
1848
1865
  properties: ({
@@ -2483,6 +2500,7 @@ export interface Routes {
2483
2500
  )
2484
2501
  | ('noiseaware_activity_zone' | 'minut_sensor')
2485
2502
  | ('ecobee_thermostat' | 'nest_thermostat')
2503
+ | ('ios_phone' | 'android_phone')
2486
2504
  )
2487
2505
  | undefined
2488
2506
  device_types?:
@@ -2516,6 +2534,7 @@ export interface Routes {
2516
2534
  )
2517
2535
  | ('noiseaware_activity_zone' | 'minut_sensor')
2518
2536
  | ('ecobee_thermostat' | 'nest_thermostat')
2537
+ | ('ios_phone' | 'android_phone')
2519
2538
  >
2520
2539
  | undefined
2521
2540
  manufacturer?:
@@ -2595,9 +2614,15 @@ export interface Routes {
2595
2614
  )
2596
2615
  | ('noiseaware_activity_zone' | 'minut_sensor')
2597
2616
  | ('ecobee_thermostat' | 'nest_thermostat')
2617
+ | ('ios_phone' | 'android_phone')
2598
2618
  /** 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
2619
  capabilities_supported: Array<
2600
- 'access_code' | 'lock' | 'noise_detection' | 'thermostat' | 'battery'
2620
+ | 'access_code'
2621
+ | 'lock'
2622
+ | 'noise_detection'
2623
+ | 'thermostat'
2624
+ | 'battery'
2625
+ | 'phone'
2601
2626
  >
2602
2627
  /** Properties of the device. */
2603
2628
  properties: ({
@@ -3260,11 +3285,17 @@ export interface Routes {
3260
3285
  )
3261
3286
  | ('noiseaware_activity_zone' | 'minut_sensor')
3262
3287
  | ('ecobee_thermostat' | 'nest_thermostat')
3288
+ | ('ios_phone' | 'android_phone')
3263
3289
  /** Unique identifier for the account associated with the device. */
3264
3290
  connected_account_id: string
3265
3291
  /** 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
3292
  capabilities_supported: Array<
3267
- 'access_code' | 'lock' | 'noise_detection' | 'thermostat' | 'battery'
3293
+ | 'access_code'
3294
+ | 'lock'
3295
+ | 'noise_detection'
3296
+ | 'thermostat'
3297
+ | 'battery'
3298
+ | 'phone'
3268
3299
  >
3269
3300
  /** Unique identifier for the Seam workspace associated with the device. */
3270
3301
  workspace_id: string
@@ -3362,6 +3393,7 @@ export interface Routes {
3362
3393
  )
3363
3394
  | ('noiseaware_activity_zone' | 'minut_sensor')
3364
3395
  | ('ecobee_thermostat' | 'nest_thermostat')
3396
+ | ('ios_phone' | 'android_phone')
3365
3397
  )
3366
3398
  | undefined
3367
3399
  device_types?:
@@ -3395,6 +3427,7 @@ export interface Routes {
3395
3427
  )
3396
3428
  | ('noiseaware_activity_zone' | 'minut_sensor')
3397
3429
  | ('ecobee_thermostat' | 'nest_thermostat')
3430
+ | ('ios_phone' | 'android_phone')
3398
3431
  >
3399
3432
  | undefined
3400
3433
  manufacturer?:
@@ -3474,11 +3507,17 @@ export interface Routes {
3474
3507
  )
3475
3508
  | ('noiseaware_activity_zone' | 'minut_sensor')
3476
3509
  | ('ecobee_thermostat' | 'nest_thermostat')
3510
+ | ('ios_phone' | 'android_phone')
3477
3511
  /** Unique identifier for the account associated with the device. */
3478
3512
  connected_account_id: string
3479
3513
  /** 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
3514
  capabilities_supported: Array<
3481
- 'access_code' | 'lock' | 'noise_detection' | 'thermostat' | 'battery'
3515
+ | 'access_code'
3516
+ | 'lock'
3517
+ | 'noise_detection'
3518
+ | 'thermostat'
3519
+ | 'battery'
3520
+ | 'phone'
3482
3521
  >
3483
3522
  /** Unique identifier for the Seam workspace associated with the device. */
3484
3523
  workspace_id: string
@@ -3835,9 +3874,15 @@ export interface Routes {
3835
3874
  )
3836
3875
  | ('noiseaware_activity_zone' | 'minut_sensor')
3837
3876
  | ('ecobee_thermostat' | 'nest_thermostat')
3877
+ | ('ios_phone' | 'android_phone')
3838
3878
  /** 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
3879
  capabilities_supported: Array<
3840
- 'access_code' | 'lock' | 'noise_detection' | 'thermostat' | 'battery'
3880
+ | 'access_code'
3881
+ | 'lock'
3882
+ | 'noise_detection'
3883
+ | 'thermostat'
3884
+ | 'battery'
3885
+ | 'phone'
3841
3886
  >
3842
3887
  /** Properties of the device. */
3843
3888
  properties: ({
@@ -4469,9 +4514,15 @@ export interface Routes {
4469
4514
  )
4470
4515
  | ('noiseaware_activity_zone' | 'minut_sensor')
4471
4516
  | ('ecobee_thermostat' | 'nest_thermostat')
4517
+ | ('ios_phone' | 'android_phone')
4472
4518
  /** 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
4519
  capabilities_supported: Array<
4474
- 'access_code' | 'lock' | 'noise_detection' | 'thermostat' | 'battery'
4520
+ | 'access_code'
4521
+ | 'lock'
4522
+ | 'noise_detection'
4523
+ | 'thermostat'
4524
+ | 'battery'
4525
+ | 'phone'
4475
4526
  >
4476
4527
  /** Properties of the device. */
4477
4528
  properties: ({
@@ -5112,6 +5163,7 @@ export interface Routes {
5112
5163
  )
5113
5164
  | ('noiseaware_activity_zone' | 'minut_sensor')
5114
5165
  | ('ecobee_thermostat' | 'nest_thermostat')
5166
+ | ('ios_phone' | 'android_phone')
5115
5167
  )
5116
5168
  | undefined
5117
5169
  device_types?:
@@ -5145,6 +5197,7 @@ export interface Routes {
5145
5197
  )
5146
5198
  | ('noiseaware_activity_zone' | 'minut_sensor')
5147
5199
  | ('ecobee_thermostat' | 'nest_thermostat')
5200
+ | ('ios_phone' | 'android_phone')
5148
5201
  >
5149
5202
  | undefined
5150
5203
  manufacturer?:
@@ -5224,9 +5277,15 @@ export interface Routes {
5224
5277
  )
5225
5278
  | ('noiseaware_activity_zone' | 'minut_sensor')
5226
5279
  | ('ecobee_thermostat' | 'nest_thermostat')
5280
+ | ('ios_phone' | 'android_phone')
5227
5281
  /** 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
5282
  capabilities_supported: Array<
5229
- 'access_code' | 'lock' | 'noise_detection' | 'thermostat' | 'battery'
5283
+ | 'access_code'
5284
+ | 'lock'
5285
+ | 'noise_detection'
5286
+ | 'thermostat'
5287
+ | 'battery'
5288
+ | 'phone'
5230
5289
  >
5231
5290
  /** Properties of the device. */
5232
5291
  properties: ({
@@ -5858,9 +5917,15 @@ export interface Routes {
5858
5917
  )
5859
5918
  | ('noiseaware_activity_zone' | 'minut_sensor')
5860
5919
  | ('ecobee_thermostat' | 'nest_thermostat')
5920
+ | ('ios_phone' | 'android_phone')
5861
5921
  /** 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
5922
  capabilities_supported: Array<
5863
- 'access_code' | 'lock' | 'noise_detection' | 'thermostat' | 'battery'
5923
+ | 'access_code'
5924
+ | 'lock'
5925
+ | 'noise_detection'
5926
+ | 'thermostat'
5927
+ | 'battery'
5928
+ | 'phone'
5864
5929
  >
5865
5930
  /** Properties of the device. */
5866
5931
  properties: ({
@@ -6945,9 +7010,15 @@ export interface Routes {
6945
7010
  )
6946
7011
  | ('noiseaware_activity_zone' | 'minut_sensor')
6947
7012
  | ('ecobee_thermostat' | 'nest_thermostat')
7013
+ | ('ios_phone' | 'android_phone')
6948
7014
  /** 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
7015
  capabilities_supported: Array<
6950
- 'access_code' | 'lock' | 'noise_detection' | 'thermostat' | 'battery'
7016
+ | 'access_code'
7017
+ | 'lock'
7018
+ | 'noise_detection'
7019
+ | 'thermostat'
7020
+ | 'battery'
7021
+ | 'phone'
6951
7022
  >
6952
7023
  /** Properties of the device. */
6953
7024
  properties: ({
@@ -7618,6 +7689,7 @@ export interface Routes {
7618
7689
  )
7619
7690
  | ('noiseaware_activity_zone' | 'minut_sensor')
7620
7691
  | ('ecobee_thermostat' | 'nest_thermostat')
7692
+ | ('ios_phone' | 'android_phone')
7621
7693
  )
7622
7694
  | undefined
7623
7695
  device_types?:
@@ -7651,6 +7723,7 @@ export interface Routes {
7651
7723
  )
7652
7724
  | ('noiseaware_activity_zone' | 'minut_sensor')
7653
7725
  | ('ecobee_thermostat' | 'nest_thermostat')
7726
+ | ('ios_phone' | 'android_phone')
7654
7727
  >
7655
7728
  | undefined
7656
7729
  manufacturer?:
@@ -7730,9 +7803,15 @@ export interface Routes {
7730
7803
  )
7731
7804
  | ('noiseaware_activity_zone' | 'minut_sensor')
7732
7805
  | ('ecobee_thermostat' | 'nest_thermostat')
7806
+ | ('ios_phone' | 'android_phone')
7733
7807
  /** 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
7808
  capabilities_supported: Array<
7735
- 'access_code' | 'lock' | 'noise_detection' | 'thermostat' | 'battery'
7809
+ | 'access_code'
7810
+ | 'lock'
7811
+ | 'noise_detection'
7812
+ | 'thermostat'
7813
+ | 'battery'
7814
+ | 'phone'
7736
7815
  >
7737
7816
  /** Properties of the device. */
7738
7817
  properties: ({
@@ -8515,9 +8594,15 @@ export interface Routes {
8515
8594
  )
8516
8595
  | ('noiseaware_activity_zone' | 'minut_sensor')
8517
8596
  | ('ecobee_thermostat' | 'nest_thermostat')
8597
+ | ('ios_phone' | 'android_phone')
8518
8598
  /** 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
8599
  capabilities_supported: Array<
8520
- 'access_code' | 'lock' | 'noise_detection' | 'thermostat' | 'battery'
8600
+ | 'access_code'
8601
+ | 'lock'
8602
+ | 'noise_detection'
8603
+ | 'thermostat'
8604
+ | 'battery'
8605
+ | 'phone'
8521
8606
  >
8522
8607
  /** Properties of the device. */
8523
8608
  properties: ({
@@ -9134,13 +9219,14 @@ export interface Routes {
9134
9219
  workspace_id: string
9135
9220
  created_at: string
9136
9221
  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
9222
+ external_type?:
9223
+ | ('pti_user' | 'brivo_user' | 'hid_cm_user' | 'salto_site_user')
9224
+ | undefined
9225
+ external_type_display_name?: string | undefined
9143
9226
  is_suspended: boolean
9227
+ starts_at?: string | undefined
9228
+ ends_at?: string | undefined
9229
+ is_virtual: boolean
9144
9230
  full_name?: string | undefined
9145
9231
  /** Deprecated: use email_address. */
9146
9232
  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>