Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
seambot committed Oct 4, 2023
1 parent a34fc1a commit ce447fb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
5 changes: 4 additions & 1 deletion src/lib/seam/devicedb/public-models/device-model-v1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const smartlock = z.object({
'cylinder',
'padlock',
'locker',
'unknown',
]),
has_physical_key: z.boolean(),
has_camera: z.boolean(),
Expand Down Expand Up @@ -52,6 +53,8 @@ const thermostat = z.object({
}),
})

export type ThermostatPropertiesV1 = z.infer<typeof thermostat>

const relay = z.object({
main_category: z.literal('relay'),
})
Expand All @@ -74,7 +77,7 @@ export const base_device_model_v1 = z.object({
slug: z.string(),
display_name: z.string(),
primary_color_hex: z.string().optional(),
manufacturer_sku: z.string(),
manufacturer_sku: z.string().optional(),
front_image: image_reference.optional(),
back_image: image_reference.optional(),
})
Expand Down
10 changes: 6 additions & 4 deletions src/lib/seam/devicedb/route-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ export interface Routes {
is_device_supported: boolean
display_name: string
description: string
product_url: string
product_url?: string | undefined
main_connection_type: 'wifi' | 'zwave' | 'zigbee' | 'unknown'
aesthetic_variants: Array<{
slug: string
display_name: string
primary_color_hex?: string | undefined
manufacturer_sku: string
manufacturer_sku?: string | undefined
front_image?:
| {
url: string
Expand Down Expand Up @@ -69,6 +69,7 @@ export interface Routes {
| 'cylinder'
| 'padlock'
| 'locker'
| 'unknown'
has_physical_key: boolean
has_camera: boolean
}
Expand Down Expand Up @@ -150,13 +151,13 @@ export interface Routes {
is_device_supported: boolean
display_name: string
description: string
product_url: string
product_url?: string | undefined
main_connection_type: 'wifi' | 'zwave' | 'zigbee' | 'unknown'
aesthetic_variants: Array<{
slug: string
display_name: string
primary_color_hex?: string | undefined
manufacturer_sku: string
manufacturer_sku?: string | undefined
front_image?:
| {
url: string
Expand Down Expand Up @@ -191,6 +192,7 @@ export interface Routes {
| 'cylinder'
| 'padlock'
| 'locker'
| 'unknown'
has_physical_key: boolean
has_camera: boolean
}
Expand Down

0 comments on commit ce447fb

Please sign in to comment.