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..96b9f6b4 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,24 @@ 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(), + }), +}) + +const accessory = z.object({ + main_category: z.literal('accessory'), +}) + export const device_model_category_specific_properties = z.discriminatedUnion( 'main_category', - [smartlock, sensor, thermostat, relay], + [smartlock, sensor, thermostat, relay, intercom, accessory], ) 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..8dc818a2 100644 --- a/src/lib/seam/devicedb/route-types.ts +++ b/src/lib/seam/devicedb/route-types.ts @@ -107,6 +107,19 @@ 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 + } + } + | { + main_category: 'accessory' + } ) } } @@ -230,6 +243,19 @@ 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 + } + } + | { + main_category: 'accessory' + } ) > }