From 7d7685f37237daa5b482f2f6bbd9ed4fd8dcea03 Mon Sep 17 00:00:00 2001 From: Seam Bot Date: Thu, 5 Oct 2023 00:04:11 +0000 Subject: [PATCH] Update via seamapi/devicedb@5774a1bec84066d6f570879d5a9c6d8d01be7996 --- .../devicedb/public-models/device-model-v1.ts | 13 +++++++++++- src/lib/seam/devicedb/route-types.ts | 20 +++++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/src/lib/seam/devicedb/public-models/device-model-v1.ts b/src/lib/seam/devicedb/public-models/device-model-v1.ts index 20b63948..fff66ce1 100644 --- a/src/lib/seam/devicedb/public-models/device-model-v1.ts +++ b/src/lib/seam/devicedb/public-models/device-model-v1.ts @@ -59,9 +59,20 @@ const relay = z.object({ main_category: z.literal('relay'), }) +const intercom = z.object({ + main_category: z.literal('intercom'), + physical_properties: z.object({ + has_camera: z.boolean(), + }), + software_features: z.object({ + can_remotely_unlock: z.boolean(), + can_program_access_codes: z.boolean(), + }), +}) + export const device_model_category_specific_properties = z.discriminatedUnion( 'main_category', - [smartlock, sensor, thermostat, relay], + [smartlock, sensor, thermostat, relay, intercom], ) export const base_device_model_v1 = z.object({ diff --git a/src/lib/seam/devicedb/route-types.ts b/src/lib/seam/devicedb/route-types.ts index 1c4be590..370b4d15 100644 --- a/src/lib/seam/devicedb/route-types.ts +++ b/src/lib/seam/devicedb/route-types.ts @@ -107,6 +107,16 @@ export interface Routes { | { main_category: 'relay' } + | { + main_category: 'intercom' + physical_properties: { + has_camera: boolean + } + software_features: { + can_remotely_unlock: boolean + can_program_access_codes: boolean + } + } ) } } @@ -230,6 +240,16 @@ export interface Routes { | { main_category: 'relay' } + | { + main_category: 'intercom' + physical_properties: { + has_camera: boolean + } + software_features: { + can_remotely_unlock: boolean + can_program_access_codes: boolean + } + } ) > }