@seamapi/types 1.405.0 → 1.406.1
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.
- package/dist/connect.cjs +2217 -559
- package/dist/connect.cjs.map +1 -1
- package/dist/connect.d.cts +7283 -405
- package/lib/seam/connect/models/devices/capabilities-supported.js +3 -1
- package/lib/seam/connect/models/devices/capabilities-supported.js.map +1 -1
- package/lib/seam/connect/models/devices/capability-properties/access-code.js +53 -21
- package/lib/seam/connect/models/devices/capability-properties/access-code.js.map +1 -1
- package/lib/seam/connect/models/devices/capability-properties/lock.js +20 -4
- package/lib/seam/connect/models/devices/capability-properties/lock.js.map +1 -1
- package/lib/seam/connect/models/devices/capability-properties/thermostat.js +175 -31
- package/lib/seam/connect/models/devices/capability-properties/thermostat.js.map +1 -1
- package/lib/seam/connect/models/devices/device-metadata.js +455 -191
- package/lib/seam/connect/models/devices/device-metadata.js.map +1 -1
- package/lib/seam/connect/models/devices/device-type.js +8 -6
- package/lib/seam/connect/models/devices/device-type.js.map +1 -1
- package/lib/seam/connect/models/devices/device.js +171 -80
- package/lib/seam/connect/models/devices/device.js.map +1 -1
- package/lib/seam/connect/models/devices/phone-properties.js +5 -7
- package/lib/seam/connect/models/devices/phone-properties.js.map +1 -1
- package/lib/seam/connect/models/devices/phone.js +22 -8
- package/lib/seam/connect/models/devices/phone.js.map +1 -1
- package/lib/seam/connect/models/devices/unmanaged-device.js +35 -1
- package/lib/seam/connect/models/devices/unmanaged-device.js.map +1 -1
- package/lib/seam/connect/models/events/devices.d.ts +4 -4
- package/lib/seam/connect/models/events/seam-event.d.ts +2 -2
- package/lib/seam/connect/models/index.d.ts +1 -0
- package/lib/seam/connect/models/index.js +1 -0
- package/lib/seam/connect/models/index.js.map +1 -1
- package/lib/seam/connect/models/partner/index.d.ts +1 -0
- package/lib/seam/connect/models/partner/index.js +2 -0
- package/lib/seam/connect/models/partner/index.js.map +1 -0
- package/lib/seam/connect/models/partner/resources.d.ts +42 -0
- package/lib/seam/connect/models/partner/resources.js +19 -0
- package/lib/seam/connect/models/partner/resources.js.map +1 -0
- package/lib/seam/connect/openapi.d.ts +979 -47
- package/lib/seam/connect/openapi.js +1331 -205
- package/lib/seam/connect/openapi.js.map +1 -1
- package/lib/seam/connect/route-types.d.ts +6264 -318
- package/package.json +2 -2
- package/src/lib/seam/connect/models/devices/capabilities-supported.ts +3 -1
- package/src/lib/seam/connect/models/devices/capability-properties/access-code.ts +64 -34
- package/src/lib/seam/connect/models/devices/capability-properties/lock.ts +20 -4
- package/src/lib/seam/connect/models/devices/capability-properties/thermostat.ts +175 -31
- package/src/lib/seam/connect/models/devices/device-metadata.ts +457 -193
- package/src/lib/seam/connect/models/devices/device-type.ts +10 -6
- package/src/lib/seam/connect/models/devices/device.ts +173 -96
- package/src/lib/seam/connect/models/devices/phone-properties.ts +34 -36
- package/src/lib/seam/connect/models/devices/phone.ts +22 -19
- package/src/lib/seam/connect/models/devices/unmanaged-device.ts +35 -1
- package/src/lib/seam/connect/models/index.ts +1 -0
- package/src/lib/seam/connect/models/partner/index.ts +1 -0
- package/src/lib/seam/connect/models/partner/resources.ts +24 -0
- package/src/lib/seam/connect/openapi.ts +1577 -210
- package/src/lib/seam/connect/route-types.ts +6267 -318
|
@@ -40,7 +40,8 @@ export const LOCK_DEVICE_TYPE_LIST = Object.values(
|
|
|
40
40
|
|
|
41
41
|
export const lock_device_type = z.enum(
|
|
42
42
|
Object.values(LOCK_DEVICE_TYPE) as [LockDeviceTypeFromMapping],
|
|
43
|
-
)
|
|
43
|
+
).describe(`Device type for smartlocks.
|
|
44
|
+
`)
|
|
44
45
|
|
|
45
46
|
export type LockDeviceType = z.infer<typeof lock_device_type>
|
|
46
47
|
|
|
@@ -59,7 +60,8 @@ export const NOISE_SENSOR_DEVICE_TYPE_LIST = Object.values(
|
|
|
59
60
|
|
|
60
61
|
export const noise_sensor_device_type = z.enum(
|
|
61
62
|
Object.values(NOISE_SENSOR_DEVICE_TYPE) as [NoiseSensorDeviceTypeFromMapping],
|
|
62
|
-
)
|
|
63
|
+
).describe(`Device type for noise sensors.
|
|
64
|
+
`)
|
|
63
65
|
|
|
64
66
|
export type NoiseSensorDeviceType = z.infer<typeof noise_sensor_device_type>
|
|
65
67
|
|
|
@@ -82,7 +84,8 @@ export const THERMOSTAT_DEVICE_TYPE_LIST = Object.values(
|
|
|
82
84
|
|
|
83
85
|
export const thermostat_device_type = z.enum(
|
|
84
86
|
Object.values(THERMOSTAT_DEVICE_TYPE) as [ThermostatDeviceTypeFromMapping],
|
|
85
|
-
)
|
|
87
|
+
).describe(`Device type for thermostats.
|
|
88
|
+
`)
|
|
86
89
|
|
|
87
90
|
export type ThermostatDeviceType = z.infer<typeof thermostat_device_type>
|
|
88
91
|
|
|
@@ -99,9 +102,10 @@ export const PHONE_DEVICE_TYPE_LIST = Object.values(
|
|
|
99
102
|
PHONE_DEVICE_TYPE,
|
|
100
103
|
) as PhoneDeviceTypeFromMapping[]
|
|
101
104
|
|
|
102
|
-
export const phone_device_type = z
|
|
103
|
-
|
|
104
|
-
|
|
105
|
+
export const phone_device_type = z.enum(
|
|
106
|
+
Object.values(PHONE_DEVICE_TYPE_LIST) as [PhoneDeviceTypeFromMapping],
|
|
107
|
+
).describe(`Device type for phones.
|
|
108
|
+
`)
|
|
105
109
|
|
|
106
110
|
export type PhoneDeviceType = z.infer<typeof phone_device_type>
|
|
107
111
|
|
|
@@ -18,6 +18,8 @@ export const device_capability_flags =
|
|
|
18
18
|
})
|
|
19
19
|
|
|
20
20
|
export const battery_status = z.enum(['critical', 'low', 'good', 'full'])
|
|
21
|
+
.describe(`Represents the current status of the battery charge level. Values are \`critical\`, which indicates an extremely low level, suggesting imminent shutdown or an urgent need for charging; \`low\`, which signifies that the battery is under the preferred threshold and should be charged soon; \`good\`, which denotes a satisfactory charge level, adequate for normal use without the immediate need for recharging; and \`full\`, which represents a battery that is fully charged, providing the maximum duration of usage.
|
|
22
|
+
`)
|
|
21
23
|
|
|
22
24
|
export type BatteryStatus = z.infer<typeof battery_status>
|
|
23
25
|
|
|
@@ -404,108 +406,136 @@ export const common_device_properties = z.object({
|
|
|
404
406
|
`),
|
|
405
407
|
accessory_keypad: z
|
|
406
408
|
.object({
|
|
407
|
-
is_connected: z
|
|
408
|
-
.
|
|
409
|
-
|
|
410
|
-
'Indicates if the accessory_keypad is connected to the device.',
|
|
411
|
-
),
|
|
409
|
+
is_connected: z.boolean()
|
|
410
|
+
.describe(`Indicates if an accessory keypad is connected to the device.
|
|
411
|
+
`),
|
|
412
412
|
battery: z
|
|
413
413
|
.object({
|
|
414
414
|
level: z.number().min(0).max(1),
|
|
415
415
|
})
|
|
416
|
-
.optional()
|
|
417
|
-
|
|
416
|
+
.optional().describe(`Keypad battery properties.
|
|
417
|
+
`),
|
|
418
418
|
})
|
|
419
|
-
.optional()
|
|
420
|
-
|
|
419
|
+
.optional().describe(`
|
|
420
|
+
---
|
|
421
|
+
property_group_key: hardware
|
|
422
|
+
---
|
|
423
|
+
Accessory keypad properties and state.
|
|
424
|
+
`),
|
|
421
425
|
appearance: z.object({
|
|
422
426
|
name: z
|
|
423
427
|
.string()
|
|
424
428
|
.describe(
|
|
425
429
|
'Name of the device as seen from the provider API and application, not settable through Seam.',
|
|
426
430
|
),
|
|
427
|
-
})
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
.
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
)
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
.
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
)
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
.optional()
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
.
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
has_direct_power: z
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
431
|
+
}).describe(`
|
|
432
|
+
---
|
|
433
|
+
property_group_key: hardware
|
|
434
|
+
---
|
|
435
|
+
Appearance-related properties, as reported by the device.
|
|
436
|
+
`),
|
|
437
|
+
model: z
|
|
438
|
+
.object({
|
|
439
|
+
can_connect_accessory_keypad: z.boolean().optional().describe(`
|
|
440
|
+
Indicates whether the device can connect a accessory keypad.
|
|
441
|
+
`),
|
|
442
|
+
display_name: z.string().describe(`
|
|
443
|
+
Display name of the device model.
|
|
444
|
+
`),
|
|
445
|
+
manufacturer_display_name: z.string().describe(`
|
|
446
|
+
Display name that corresponds to the manufacturer-specific terminology for the device.
|
|
447
|
+
`),
|
|
448
|
+
has_built_in_keypad: z.boolean().optional().describe(`
|
|
449
|
+
Indicates whether the device has a built in accessory keypad.
|
|
450
|
+
`),
|
|
451
|
+
offline_access_codes_supported: z.boolean().optional().describe(`
|
|
452
|
+
---
|
|
453
|
+
deprecated: use device.can_program_offline_access_codes.
|
|
454
|
+
---
|
|
455
|
+
`),
|
|
456
|
+
online_access_codes_supported: z.boolean().optional().describe(`
|
|
457
|
+
---
|
|
458
|
+
deprecated: use device.can_program_online_access_codes.
|
|
459
|
+
---
|
|
460
|
+
`),
|
|
461
|
+
accessory_keypad_supported: z.boolean().optional().describe(`
|
|
462
|
+
---
|
|
463
|
+
deprecated: use device.properties.model.can_connect_accessory_keypad
|
|
464
|
+
---
|
|
465
|
+
`),
|
|
466
|
+
})
|
|
467
|
+
.describe(`Device model-related properties.`),
|
|
468
|
+
has_direct_power: z.boolean().optional().describe(`
|
|
469
|
+
---
|
|
470
|
+
property_group_key: hardware
|
|
471
|
+
---
|
|
472
|
+
Indicates whether the device has direct power.
|
|
473
|
+
`),
|
|
474
|
+
battery_level: z.number().min(0).max(1).optional().describe(`
|
|
475
|
+
---
|
|
476
|
+
property_group_key: hardware
|
|
477
|
+
---
|
|
478
|
+
Indicates the battery level of the device as a decimal value between 0 and 1, inclusive.
|
|
479
|
+
`),
|
|
476
480
|
battery: z
|
|
477
481
|
.object({
|
|
478
|
-
level: z.number().min(0).max(1)
|
|
482
|
+
level: z.number().min(0).max(1)
|
|
483
|
+
.describe(`Battery charge level as a value between 0 and 1, inclusive.
|
|
484
|
+
`),
|
|
479
485
|
status: battery_status,
|
|
480
486
|
})
|
|
481
|
-
.optional()
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
487
|
+
.optional().describe(`
|
|
488
|
+
---
|
|
489
|
+
property_group_key: hardware
|
|
490
|
+
---
|
|
491
|
+
Represents the current status of the battery charge level.
|
|
492
|
+
`),
|
|
485
493
|
// todo: use enum
|
|
486
|
-
manufacturer: z
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
),
|
|
492
|
-
image_url: z.string().url().optional().describe(
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
494
|
+
manufacturer: z.string().optional().describe(`
|
|
495
|
+
---
|
|
496
|
+
property_group_key: hardware
|
|
497
|
+
---
|
|
498
|
+
Manufacturer of the device. When a device, such as a smart lock, is connected through a smart hub, the manufacturer of the device might be different from that of the smart hub.
|
|
499
|
+
`),
|
|
500
|
+
image_url: z.string().url().optional().describe(`
|
|
501
|
+
---
|
|
502
|
+
property_group_key: hardware
|
|
503
|
+
---
|
|
504
|
+
Image URL for the device.
|
|
505
|
+
`),
|
|
506
|
+
image_alt_text: z.string().optional().describe(`
|
|
507
|
+
---
|
|
508
|
+
property_group_key: hardware
|
|
509
|
+
---
|
|
510
|
+
Alt text for the device image.
|
|
511
|
+
`),
|
|
512
|
+
serial_number: z.string().optional().describe(`
|
|
513
|
+
---
|
|
514
|
+
property_group_key: hardware
|
|
515
|
+
---
|
|
516
|
+
Serial number of the device.
|
|
517
|
+
`),
|
|
498
518
|
|
|
499
519
|
online_access_codes_enabled: z
|
|
500
520
|
.boolean()
|
|
501
521
|
.describe(
|
|
502
|
-
|
|
522
|
+
`
|
|
523
|
+
---
|
|
524
|
+
property_group_key: access_codes
|
|
525
|
+
---
|
|
526
|
+
Indicates whether it is currently possible to use online access codes for the device.
|
|
527
|
+
`,
|
|
503
528
|
)
|
|
504
529
|
.optional(),
|
|
505
530
|
offline_access_codes_enabled: z
|
|
506
531
|
.boolean()
|
|
507
532
|
.describe(
|
|
508
|
-
|
|
533
|
+
`
|
|
534
|
+
---
|
|
535
|
+
property_group_key: access_codes
|
|
536
|
+
---
|
|
537
|
+
Indicates whether it is currently possible to use offline access codes for the device.
|
|
538
|
+
`,
|
|
509
539
|
)
|
|
510
540
|
.optional(),
|
|
511
541
|
|
|
@@ -516,6 +546,7 @@ export const common_device_properties = z.object({
|
|
|
516
546
|
`
|
|
517
547
|
---
|
|
518
548
|
deprecated: use device.properties.model.can_connect_accessory_keypad
|
|
549
|
+
property_group_key: access_codes
|
|
519
550
|
---
|
|
520
551
|
`,
|
|
521
552
|
)
|
|
@@ -526,6 +557,7 @@ export const common_device_properties = z.object({
|
|
|
526
557
|
`
|
|
527
558
|
---
|
|
528
559
|
deprecated: use offline_access_codes_enabled
|
|
560
|
+
property_group_key: access_codes
|
|
529
561
|
---
|
|
530
562
|
`,
|
|
531
563
|
)
|
|
@@ -533,12 +565,24 @@ export const common_device_properties = z.object({
|
|
|
533
565
|
noise_level_decibels: z
|
|
534
566
|
.number()
|
|
535
567
|
.describe(
|
|
536
|
-
|
|
568
|
+
`
|
|
569
|
+
---
|
|
570
|
+
property_group_key: noise_sensors
|
|
571
|
+
---
|
|
572
|
+
Indicates current noise level in decibels, if the device supports noise detection.
|
|
573
|
+
`,
|
|
537
574
|
)
|
|
538
575
|
.optional(),
|
|
539
576
|
currently_triggering_noise_threshold_ids: z
|
|
540
577
|
.array(z.string())
|
|
541
|
-
.describe(
|
|
578
|
+
.describe(
|
|
579
|
+
`
|
|
580
|
+
---
|
|
581
|
+
property_group_key: noise_sensors
|
|
582
|
+
---
|
|
583
|
+
Array of noise threshold IDs that are currently triggering.
|
|
584
|
+
`,
|
|
585
|
+
)
|
|
542
586
|
.optional(),
|
|
543
587
|
})
|
|
544
588
|
|
|
@@ -569,30 +613,48 @@ export const device = z
|
|
|
569
613
|
.describe(
|
|
570
614
|
'Display name of the device, defaults to nickname (if it is set) or properties.appearance.name otherwise. Enables administrators and users to identify the device easily, especially when there are numerous devices.',
|
|
571
615
|
),
|
|
572
|
-
capabilities_supported: z
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
'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.',
|
|
576
|
-
),
|
|
616
|
+
capabilities_supported: z.array(capabilities).describe(`
|
|
617
|
+
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; \`battery\`, which indicates that the device can manage battery life and health; and \`phone\`, which indicates that the device is a mobile device, such as a smartphone. **Important:** Superseded by [capability flags](https://docs.seam.co/latest/capability-guides/device-and-system-capabilities#capability-flags).
|
|
618
|
+
`),
|
|
577
619
|
properties: common_device_properties
|
|
578
620
|
.and(phone_specific_properties.partial())
|
|
579
621
|
.and(device_metadata)
|
|
580
|
-
.and(capability_properties)
|
|
581
|
-
|
|
622
|
+
.and(capability_properties).describe(`
|
|
623
|
+
---
|
|
624
|
+
property_groups:
|
|
625
|
+
locks:
|
|
626
|
+
name: Locks
|
|
627
|
+
access_codes:
|
|
628
|
+
name: Access Codes
|
|
629
|
+
thermostats:
|
|
630
|
+
name: Thermostats
|
|
631
|
+
hardware:
|
|
632
|
+
name: Hardware
|
|
633
|
+
noise_sensors:
|
|
634
|
+
name: Noise Sensors
|
|
635
|
+
phones:
|
|
636
|
+
name: Phones
|
|
637
|
+
provider_metadata:
|
|
638
|
+
name: Provider Metadata
|
|
639
|
+
---
|
|
640
|
+
Properties of the device.
|
|
641
|
+
`),
|
|
582
642
|
location: z
|
|
583
643
|
// todo: optional instead of nullable
|
|
584
644
|
.object({
|
|
585
|
-
location_name: z
|
|
586
|
-
.
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
.optional()
|
|
592
|
-
.describe('Time zone of the device location.'),
|
|
645
|
+
location_name: z.string().optional()
|
|
646
|
+
.describe(`Name of the device location.
|
|
647
|
+
`),
|
|
648
|
+
timezone: z.string().optional()
|
|
649
|
+
.describe(`Time zone of the device location.
|
|
650
|
+
`),
|
|
593
651
|
})
|
|
594
|
-
.nullable()
|
|
595
|
-
|
|
652
|
+
.nullable().describe(`
|
|
653
|
+
---
|
|
654
|
+
property_group_key: hardware
|
|
655
|
+
---
|
|
656
|
+
Location information for the device.
|
|
657
|
+
`),
|
|
596
658
|
connected_account_id: z
|
|
597
659
|
.string()
|
|
598
660
|
.uuid()
|
|
@@ -639,6 +701,21 @@ export const device = z
|
|
|
639
701
|
.merge(device_capability_flags).describe(`
|
|
640
702
|
---
|
|
641
703
|
route_path: /devices
|
|
704
|
+
property_groups:
|
|
705
|
+
locks:
|
|
706
|
+
name: Locks
|
|
707
|
+
access_codes:
|
|
708
|
+
name: Access Codes
|
|
709
|
+
thermostats:
|
|
710
|
+
name: Thermostats
|
|
711
|
+
hardware:
|
|
712
|
+
name: Hardware
|
|
713
|
+
noise_sensors:
|
|
714
|
+
name: Noise Sensors
|
|
715
|
+
phones:
|
|
716
|
+
name: Phones
|
|
717
|
+
provider_metadata:
|
|
718
|
+
name: Provider Metadata
|
|
642
719
|
---
|
|
643
720
|
Represents a [device](https://docs.seam.co/latest/core-concepts/devices) that has been connected to Seam.
|
|
644
721
|
`)
|
|
@@ -1,39 +1,37 @@
|
|
|
1
1
|
import { z } from 'zod'
|
|
2
2
|
|
|
3
|
-
export const phone_specific_properties = z
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
.
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
.
|
|
14
|
-
z.
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
})
|
|
25
|
-
.optional()
|
|
26
|
-
.describe('ASSA ABLOY Credential Service metadata for the phone.'),
|
|
3
|
+
export const phone_specific_properties = z.object({
|
|
4
|
+
assa_abloy_credential_service_metadata: z
|
|
5
|
+
.object({
|
|
6
|
+
has_active_endpoint: z
|
|
7
|
+
.boolean()
|
|
8
|
+
.describe(
|
|
9
|
+
'Indicates whether the credential service has active endpoints associated with the phone.',
|
|
10
|
+
),
|
|
11
|
+
endpoints: z
|
|
12
|
+
.array(
|
|
13
|
+
z.object({
|
|
14
|
+
endpoint_id: z.string().describe('ID of the associated endpoint.'),
|
|
15
|
+
is_active: z
|
|
16
|
+
.boolean()
|
|
17
|
+
.describe('Indicated whether the endpoint is active.'),
|
|
18
|
+
}),
|
|
19
|
+
)
|
|
20
|
+
.describe('Endpoints associated with the phone.'),
|
|
21
|
+
})
|
|
22
|
+
.optional()
|
|
23
|
+
.describe('ASSA ABLOY Credential Service metadata for the phone.'),
|
|
27
24
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
25
|
+
salto_space_credential_service_metadata: z
|
|
26
|
+
.object({
|
|
27
|
+
has_active_phone: z
|
|
28
|
+
.boolean()
|
|
29
|
+
.describe(
|
|
30
|
+
'Indicates whether the credential service has an active associated phone.',
|
|
31
|
+
),
|
|
32
|
+
})
|
|
33
|
+
.optional()
|
|
34
|
+
.describe('Salto Space credential service metadata for the phone.'),
|
|
35
|
+
}).describe(`
|
|
36
|
+
Properties of the phone.
|
|
37
|
+
`)
|
|
@@ -16,23 +16,23 @@ const basePhoneDeviceSchema = device.pick({
|
|
|
16
16
|
})
|
|
17
17
|
|
|
18
18
|
export const phone = z.object({
|
|
19
|
-
device_id:
|
|
20
|
-
|
|
21
|
-
nickname: basePhoneDeviceSchema.shape.nickname
|
|
22
|
-
|
|
23
|
-
),
|
|
24
|
-
display_name: basePhoneDeviceSchema.shape.display_name
|
|
25
|
-
|
|
26
|
-
),
|
|
27
|
-
workspace_id: basePhoneDeviceSchema.shape.workspace_id
|
|
28
|
-
|
|
29
|
-
),
|
|
30
|
-
created_at: basePhoneDeviceSchema.shape.created_at
|
|
31
|
-
|
|
32
|
-
),
|
|
33
|
-
custom_metadata: basePhoneDeviceSchema.shape.custom_metadata
|
|
34
|
-
|
|
35
|
-
),
|
|
19
|
+
device_id: basePhoneDeviceSchema.shape.device_id.describe(`ID of the phone.
|
|
20
|
+
`),
|
|
21
|
+
nickname: basePhoneDeviceSchema.shape.nickname
|
|
22
|
+
.describe(`Optional nickname to describe the phone, settable through Seam.
|
|
23
|
+
`),
|
|
24
|
+
display_name: basePhoneDeviceSchema.shape.display_name
|
|
25
|
+
.describe(`Display name of the phone. Defaults to \`nickname\` (if it is set) or \`properties.appearance.name\` otherwise. Enables administrators and users to identify the phone easily, especially when there are numerous phones.
|
|
26
|
+
`),
|
|
27
|
+
workspace_id: basePhoneDeviceSchema.shape.workspace_id
|
|
28
|
+
.describe(`ID of the [workspace](https://docs.seam.co/latest/core-concepts/workspaces) that contains the phone.
|
|
29
|
+
`),
|
|
30
|
+
created_at: basePhoneDeviceSchema.shape.created_at
|
|
31
|
+
.describe(`Date and time at which the phone was created.
|
|
32
|
+
`),
|
|
33
|
+
custom_metadata: basePhoneDeviceSchema.shape.custom_metadata
|
|
34
|
+
.describe(`Optional [custom metadata](https://docs.seam.co/latest/core-concepts/devices/adding-custom-metadata-to-a-device) for the phone.
|
|
35
|
+
`),
|
|
36
36
|
|
|
37
37
|
errors: z
|
|
38
38
|
.array(
|
|
@@ -41,7 +41,7 @@ export const phone = z.object({
|
|
|
41
41
|
message: z.string(),
|
|
42
42
|
}),
|
|
43
43
|
)
|
|
44
|
-
.describe('Errors associated with the
|
|
44
|
+
.describe('Errors associated with the phone.'),
|
|
45
45
|
warnings: z
|
|
46
46
|
.array(
|
|
47
47
|
z.object({
|
|
@@ -49,12 +49,15 @@ export const phone = z.object({
|
|
|
49
49
|
message: z.string(),
|
|
50
50
|
}),
|
|
51
51
|
)
|
|
52
|
-
.describe('Warnings associated with the
|
|
52
|
+
.describe('Warnings associated with the phone.'),
|
|
53
53
|
device_type: phone_device_type,
|
|
54
54
|
properties: phone_specific_properties,
|
|
55
55
|
}).describe(`
|
|
56
56
|
---
|
|
57
57
|
route_path: /phones
|
|
58
|
+
property_groups:
|
|
59
|
+
phones:
|
|
60
|
+
name: Phones
|
|
58
61
|
---
|
|
59
62
|
Represents an app user's mobile phone.
|
|
60
63
|
`)
|
|
@@ -32,11 +32,45 @@ export const unmanaged_device = device
|
|
|
32
32
|
online_access_codes_enabled: true,
|
|
33
33
|
offline_access_codes_enabled: true,
|
|
34
34
|
model: true,
|
|
35
|
-
})
|
|
35
|
+
}).describe(`
|
|
36
|
+
---
|
|
37
|
+
property_groups:
|
|
38
|
+
locks:
|
|
39
|
+
name: locks
|
|
40
|
+
access_codes:
|
|
41
|
+
name: access codes
|
|
42
|
+
thermostats:
|
|
43
|
+
name: thermostats
|
|
44
|
+
hardware:
|
|
45
|
+
name: hardware
|
|
46
|
+
noise_sensors:
|
|
47
|
+
name: noise sensors
|
|
48
|
+
phones:
|
|
49
|
+
name: phones
|
|
50
|
+
provider_metadata:
|
|
51
|
+
name: provider metadata
|
|
52
|
+
---
|
|
53
|
+
properties of the device.
|
|
54
|
+
`),
|
|
36
55
|
})
|
|
37
56
|
.merge(device_capability_flags).describe(`
|
|
38
57
|
---
|
|
39
58
|
route_path: /devices/unmanaged
|
|
59
|
+
property_groups:
|
|
60
|
+
locks:
|
|
61
|
+
name: Locks
|
|
62
|
+
access_codes:
|
|
63
|
+
name: Access Codes
|
|
64
|
+
thermostats:
|
|
65
|
+
name: Thermostats
|
|
66
|
+
hardware:
|
|
67
|
+
name: Hardware
|
|
68
|
+
noise_sensors:
|
|
69
|
+
name: Noise Sensors
|
|
70
|
+
phones:
|
|
71
|
+
name: Phones
|
|
72
|
+
provider_metadata:
|
|
73
|
+
name: Provider Metadata
|
|
40
74
|
---
|
|
41
75
|
Represents an [unmanaged device](https://docs.seam.co/latest/core-concepts/devices/managed-and-unmanaged-devices). An unmanaged device has a limited set of visible properties and a subset of supported events. You cannot control an unmanaged device. Any [access codes](https://docs.seam.co/latest/capability-guides/smart-locks/access-codes/migrating-existing-access-codes) on an unmanaged device are unmanaged. To control an unmanaged device with Seam, [convert it to a managed device](https://docs.seam.co/latest/core-concepts/devices/managed-and-unmanaged-devices#convert-an-unmanaged-device-to-managed).
|
|
42
76
|
`)
|
|
@@ -14,6 +14,7 @@ export * from './instant-keys/index.js'
|
|
|
14
14
|
export * from './locations/index.js'
|
|
15
15
|
export * from './noise-sensors/index.js'
|
|
16
16
|
export * from './pagination.js'
|
|
17
|
+
export * from './partner/index.js'
|
|
17
18
|
export * from './phone-number.js'
|
|
18
19
|
export * from './phones/index.js'
|
|
19
20
|
export * from './thermostats/index.js'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './resources.js'
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { z } from 'zod'
|
|
2
|
+
|
|
3
|
+
export const partner_resource = z.object({
|
|
4
|
+
partner_resource_type: z.string(),
|
|
5
|
+
partner_resource_key: z.string(),
|
|
6
|
+
customer_key: z.string(),
|
|
7
|
+
|
|
8
|
+
// For user identity partner resources
|
|
9
|
+
email_address: z.string().optional(),
|
|
10
|
+
phone_number: z.string().optional(),
|
|
11
|
+
|
|
12
|
+
// For access grant partner resources
|
|
13
|
+
starts_at: z.string().optional(),
|
|
14
|
+
ends_at: z.string().optional(),
|
|
15
|
+
user_identity_key: z.string().optional(),
|
|
16
|
+
location_keys: z.array(z.string()).optional(),
|
|
17
|
+
|
|
18
|
+
// Common
|
|
19
|
+
name: z.string().optional(),
|
|
20
|
+
description: z.string().optional(),
|
|
21
|
+
custom_metadata: z.record(z.string(), z.string()).optional(),
|
|
22
|
+
})
|
|
23
|
+
|
|
24
|
+
export type PartnerResource = z.infer<typeof partner_resource>
|