@seamapi/types 1.457.0 → 1.457.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/index.cjs CHANGED
@@ -520,220 +520,6 @@ var capability_properties = zod.z.intersection(
520
520
  access_code_capability_properties.partial().merge(lock_capability_properties.partial()),
521
521
  thermostat_capability_properties
522
522
  );
523
-
524
- // src/lib/seam/devicedb/models/index.ts
525
- var models_exports = {};
526
- __export(models_exports, {
527
- base_device_model_v1: () => base_device_model_v1,
528
- device_capability_flags: () => device_capability_flags,
529
- device_category: () => device_category,
530
- device_connection_type: () => device_connection_type,
531
- device_model_category_specific_properties: () => device_model_category_specific_properties,
532
- device_model_v1: () => device_model_v1,
533
- image_reference: () => image_reference,
534
- manufacturer: () => manufacturer,
535
- manufacturer_annotation: () => manufacturer_annotation,
536
- manufacturer_annotation_code: () => manufacturer_annotation_code,
537
- manufacturer_integration_support_level: () => manufacturer_integration_support_level,
538
- thermostat: () => thermostat
539
- });
540
- var device_capability_flags = zod.z.object({
541
- can_remotely_unlock: zod.z.boolean(),
542
- can_remotely_lock: zod.z.boolean(),
543
- can_program_offline_access_codes: zod.z.boolean(),
544
- can_program_online_access_codes: zod.z.boolean(),
545
- can_hvac_heat: zod.z.boolean(),
546
- can_hvac_cool: zod.z.boolean(),
547
- can_hvac_heat_cool: zod.z.boolean(),
548
- can_turn_off_hvac: zod.z.boolean()
549
- }).partial();
550
- var device_model_capability_flags_map = {
551
- can_remotely_lock: zod.z.literal(true),
552
- can_remotely_unlock: zod.z.literal(true),
553
- can_program_offline_access_codes: zod.z.literal(true),
554
- can_program_online_access_codes: zod.z.literal(true),
555
- can_hvac_heat: zod.z.literal(true),
556
- can_hvac_cool: zod.z.literal(true),
557
- can_hvac_heat_cool: zod.z.literal(true),
558
- can_turn_off_hvac: zod.z.literal(true)
559
- };
560
- var device_model_capability_flags = zod.z.object(device_model_capability_flags_map).partial();
561
- var hardware = zod.z.object({
562
- has_physical_key: zod.z.boolean()
563
- }).partial();
564
- var image_reference = zod.z.object({
565
- url: zod.z.string().url(),
566
- width: zod.z.number(),
567
- height: zod.z.number()
568
- });
569
- var manufacturer_integration_support_level = zod.z.enum([
570
- "stable",
571
- "beta",
572
- "planned",
573
- "unsupported",
574
- "inquire"
575
- ]);
576
- var manufacturer_annotation_code = zod.z.enum(["subscription_required"]);
577
- var manufacturer_annotation = zod.z.object({
578
- annotation_code: manufacturer_annotation_code,
579
- message: zod.z.string().trim().nonempty()
580
- });
581
- var manufacturer = zod.z.object({
582
- manufacturer_id: zod.z.string().uuid(),
583
- display_name: zod.z.string(),
584
- logo: image_reference.optional(),
585
- /** @deprecated */
586
- integration: manufacturer_integration_support_level,
587
- integration_support_level: manufacturer_integration_support_level,
588
- is_connect_webview_supported: zod.z.boolean(),
589
- requires_seam_support_to_add_account: zod.z.boolean(),
590
- device_model_count: zod.z.number(),
591
- annotations: zod.z.array(manufacturer_annotation),
592
- website: zod.z.string().url().optional(),
593
- legal_name: zod.z.string().optional(),
594
- parent_organization: zod.z.string().optional(),
595
- headquarters: zod.z.array(zod.z.string()).optional(),
596
- countries_of_origin: zod.z.array(zod.z.string()).optional(),
597
- founding_year: zod.z.string().optional(),
598
- us_customer_support_tel: zod.z.string().optional(),
599
- us_customer_support_email: zod.z.string().email().optional(),
600
- us_customer_support_contact_url: zod.z.string().url().optional(),
601
- seam_api_guide: zod.z.string().optional(),
602
- description: zod.z.string().optional()
603
- });
604
-
605
- // src/lib/seam/devicedb/models/device-model.ts
606
- var device_category = zod.z.enum([
607
- "smartlock",
608
- "sensor",
609
- "thermostat",
610
- "relay",
611
- "intercom",
612
- "accessory"
613
- ]);
614
- var device_connection_type = zod.z.enum([
615
- "wifi",
616
- "zwave",
617
- "zigbee",
618
- "unknown"
619
- ]);
620
- var smartlock = zod.z.object({
621
- main_category: zod.z.literal(device_category.enum.smartlock),
622
- physical_properties: zod.z.object({
623
- lock_type: zod.z.enum([
624
- "deadbolt",
625
- "lever",
626
- "mortise",
627
- "lockbox",
628
- "cylinder",
629
- "padlock",
630
- "locker",
631
- "unknown"
632
- ]),
633
- has_physical_key: zod.z.boolean(),
634
- has_camera: zod.z.boolean()
635
- }),
636
- software_features: zod.z.object({
637
- can_remotely_unlock: zod.z.boolean(),
638
- can_program_access_codes: zod.z.boolean(),
639
- can_program_access_schedules: zod.z.boolean(),
640
- can_program_access_codes_offline: zod.z.boolean()
641
- })
642
- }).merge(
643
- device_model_capability_flags.pick({
644
- can_remotely_lock: true,
645
- can_remotely_unlock: true,
646
- can_program_offline_access_codes: true,
647
- can_program_online_access_codes: true
648
- })
649
- );
650
- var sensor = zod.z.object({
651
- main_category: zod.z.literal(device_category.enum.sensor),
652
- physical_properties: zod.z.object({
653
- has_noise_sensor: zod.z.boolean(),
654
- has_humidity_sensor: zod.z.boolean(),
655
- has_temperature_sensor: zod.z.boolean(),
656
- has_occupancy_detection: zod.z.boolean()
657
- })
658
- });
659
- var thermostat = zod.z.object({
660
- main_category: zod.z.literal(device_category.enum.thermostat),
661
- physical_properties: zod.z.object({
662
- available_modes: zod.z.enum(["heat", "cool", "fan", "eco"]).array(),
663
- is_heat_pump_compatible: zod.z.boolean(),
664
- has_occupancy_detection: zod.z.boolean(),
665
- supports_demand_response: zod.z.boolean(),
666
- has_humidity_sensor: zod.z.boolean(),
667
- has_temperature_sensor: zod.z.boolean(),
668
- supports_emergency_heating_mode: zod.z.boolean()
669
- }),
670
- software_features: zod.z.object({
671
- can_program_climate_schedules: zod.z.boolean()
672
- })
673
- }).merge(
674
- device_model_capability_flags.pick({
675
- can_hvac_heat: true,
676
- can_hvac_cool: true,
677
- can_hvac_heat_cool: true,
678
- can_turn_off_hvac: true
679
- })
680
- );
681
- var relay = zod.z.object({
682
- main_category: zod.z.literal(device_category.enum.relay)
683
- });
684
- var intercom = zod.z.object({
685
- main_category: zod.z.literal(device_category.enum.intercom),
686
- physical_properties: zod.z.object({
687
- has_camera: zod.z.boolean(),
688
- has_rfid_reader: zod.z.boolean().default(false),
689
- has_nfc_reader: zod.z.boolean().default(false),
690
- has_wiegand_interface: zod.z.boolean().default(false)
691
- }),
692
- software_features: zod.z.object({
693
- can_remotely_unlock: zod.z.boolean(),
694
- can_program_access_codes: zod.z.boolean(),
695
- can_unlock_with_face_recognition: zod.z.boolean().default(false),
696
- supports_onvif: zod.z.boolean().default(false)
697
- })
698
- });
699
- var accessory = zod.z.object({
700
- main_category: zod.z.literal(device_category.enum.accessory)
701
- });
702
- var device_model_category_specific_properties = zod.z.discriminatedUnion(
703
- "main_category",
704
- [smartlock, sensor, thermostat, relay, intercom, accessory]
705
- );
706
- var base_device_model_v1 = zod.z.object({
707
- device_model_id: zod.z.string().uuid(),
708
- manufacturer: manufacturer.omit({
709
- device_model_count: true
710
- }),
711
- is_device_supported: zod.z.boolean(),
712
- display_name: zod.z.string(),
713
- description: zod.z.string(),
714
- product_url: zod.z.string().optional(),
715
- main_connection_type: device_connection_type,
716
- hardware,
717
- aesthetic_variants: zod.z.object({
718
- slug: zod.z.string(),
719
- display_name: zod.z.string(),
720
- primary_color_hex: zod.z.string().optional(),
721
- manufacturer_sku: zod.z.string().optional(),
722
- front_image: image_reference.optional(),
723
- back_image: image_reference.optional(),
724
- images: image_reference.array()
725
- }).array(),
726
- power_sources: zod.z.enum([
727
- "battery",
728
- "hardwired",
729
- "mechanical_harvesting",
730
- "wireless",
731
- "ethernet"
732
- ]).array()
733
- });
734
- var device_model_v1 = base_device_model_v1.and(
735
- device_model_category_specific_properties
736
- );
737
523
  zod.z.record(
738
524
  zod.z.string().max(40),
739
525
  zod.z.union([zod.z.string().max(500), zod.z.boolean(), zod.z.null()])
@@ -1324,12 +1110,20 @@ var phone_specific_properties = zod.z.object({
1324
1110
  `);
1325
1111
 
1326
1112
  // src/lib/seam/connect/models/devices/device.ts
1327
- var device_capability_flags2 = models_exports.device_capability_flags.extend({
1328
- can_simulate_removal: zod.z.boolean().optional(),
1329
- can_simulate_connection: zod.z.boolean().optional(),
1330
- can_simulate_disconnection: zod.z.boolean().optional(),
1331
- can_unlock_with_code: zod.z.boolean().optional()
1332
- });
1113
+ var device_capability_flags = zod.z.object({
1114
+ can_remotely_unlock: zod.z.boolean(),
1115
+ can_remotely_lock: zod.z.boolean(),
1116
+ can_program_offline_access_codes: zod.z.boolean(),
1117
+ can_program_online_access_codes: zod.z.boolean(),
1118
+ can_hvac_heat: zod.z.boolean(),
1119
+ can_hvac_cool: zod.z.boolean(),
1120
+ can_hvac_heat_cool: zod.z.boolean(),
1121
+ can_turn_off_hvac: zod.z.boolean(),
1122
+ can_simulate_removal: zod.z.boolean(),
1123
+ can_simulate_connection: zod.z.boolean(),
1124
+ can_simulate_disconnection: zod.z.boolean(),
1125
+ can_unlock_with_code: zod.z.boolean()
1126
+ }).partial();
1333
1127
  var battery_status = zod.z.enum(["critical", "low", "good", "full"]).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.
1334
1128
  `);
1335
1129
  var common_device_error = zod.z.object({
@@ -1878,7 +1672,7 @@ var device = zod.z.object({
1878
1672
  "Indicates whether Seam manages the device. See also [Managed and Unmanaged Devices](https://docs.seam.co/latest/core-concepts/devices/managed-and-unmanaged-devices)."
1879
1673
  ),
1880
1674
  custom_metadata
1881
- }).merge(device_capability_flags2).describe(`
1675
+ }).merge(device_capability_flags).describe(`
1882
1676
  ---
1883
1677
  route_path: /devices
1884
1678
  property_groups:
@@ -2012,7 +1806,7 @@ var device_provider = zod.z.object({
2012
1806
  display_name: zod.z.string(),
2013
1807
  image_url: zod.z.string(),
2014
1808
  provider_categories: zod.z.array(zod.z.enum(PUBLIC_PROVIDER_CATEGORIES))
2015
- }).extend(device_capability_flags2.shape).describe(`
1809
+ }).extend(device_capability_flags.shape).describe(`
2016
1810
  ---
2017
1811
  route_path: /devices
2018
1812
  ---
@@ -2061,7 +1855,7 @@ var unmanaged_device = device.pick({
2061
1855
  ---
2062
1856
  properties of the device.
2063
1857
  `)
2064
- }).merge(device_capability_flags2).describe(`
1858
+ }).merge(device_capability_flags).describe(`
2065
1859
  ---
2066
1860
  route_path: /devices/unmanaged
2067
1861
  property_groups:
@@ -42349,7 +42143,7 @@ var openapi_default = {
42349
42143
  },
42350
42144
  "/devices/simulate/connect_to_hub": {
42351
42145
  post: {
42352
- description: "Simulates bringing the Wi-Fi hub (bridge) back online for a device. \nOnly applicable for [sandbox workspaces](https://docs.seam.co/latest/core-concepts/workspaces#sandbox-workspaces) and August locks today, but designed so we can extend to other providers later. \nThis will clear the `hub_disconnected` error on the device.",
42146
+ description: "Simulates bringing the Wi\u2011Fi hub (bridge) back online for a device.\nOnly applicable for sandbox workspaces and currently\nimplemented for August and TTLock locks.\nThis will clear the corresponding `hub_disconnected` or\n`ttlock_lock_not_paired_to_gateway` error on the device.",
42353
42147
  operationId: "devicesSimulateConnectToHubPost",
42354
42148
  requestBody: {
42355
42149
  content: {