From 3e8f60ada106dd984e19fee6248015da0daa3410 Mon Sep 17 00:00:00 2001 From: Seam Bot Date: Thu, 12 Mar 2026 20:58:58 +0000 Subject: [PATCH] feat: Sync with Seam API via bae7a9249b017a602c22663f6f5ab4f17a8948af --- src/lib/seam/connect/models/events/devices.ts | 31 ++ src/lib/seam/connect/openapi.ts | 169 +++++++++++ src/lib/seam/connect/route-types.ts | 264 ++++++++++++++++++ 3 files changed, 464 insertions(+) diff --git a/src/lib/seam/connect/models/events/devices.ts b/src/lib/seam/connect/models/events/devices.ts index 5f6fc495..60abc511 100644 --- a/src/lib/seam/connect/models/events/devices.ts +++ b/src/lib/seam/connect/models/events/devices.ts @@ -706,6 +706,35 @@ export const device_name_changed_event = device_event.extend({ export type DeviceNameChangedEvent = z.infer +export const camera_activated_event = device_event.extend({ + event_type: z.literal('camera.activated'), + activation_reason: z + .enum(['motion_detected']) + .describe('The reason the camera was activated.'), + motion_sub_type: z + .enum(['human', 'vehicle', 'package', 'other']) + .optional() + .describe('Sub-type of motion detected, if available.'), +}).describe(` + --- + route_path: /devices + --- + A [camera](https://docs.seam.co/latest/core-concepts/devices) was activated, for example, by motion detection. +`) + +export type CameraActivatedEvent = z.infer + +export const device_doorbell_rang_event = device_event.extend({ + event_type: z.literal('device.doorbell_rang'), +}).describe(` + --- + route_path: /devices + --- + A doorbell button was pressed on a [device](https://docs.seam.co/latest/core-concepts/devices). +`) + +export type DeviceDoorbellRangEvent = z.infer + export const device_events = [ device_connected_event, device_added_event, @@ -740,4 +769,6 @@ export const device_events = [ temperature_reached_set_point_event, temperature_changed_event, device_name_changed_event, + camera_activated_event, + device_doorbell_rang_event, ] as const diff --git a/src/lib/seam/connect/openapi.ts b/src/lib/seam/connect/openapi.ts index 678f1389..03c68322 100644 --- a/src/lib/seam/connect/openapi.ts +++ b/src/lib/seam/connect/openapi.ts @@ -23086,6 +23086,159 @@ export default { type: 'object', 'x-route-path': '/devices', }, + { + description: + 'A [camera](https://docs.seam.co/latest/core-concepts/devices) was activated, for example, by motion detection.', + properties: { + activation_reason: { + description: 'The reason the camera was activated.', + enum: ['motion_detected'], + type: 'string', + }, + connected_account_custom_metadata: { + additionalProperties: { + oneOf: [{ type: 'string' }, { type: 'boolean' }], + }, + description: + 'Custom metadata of the connected account, present when connected_account_id is provided.', + type: 'object', + }, + connected_account_id: { + description: + 'ID of the [connected account](https://docs.seam.co/latest/core-concepts/connected-accounts) associated with the event.', + format: 'uuid', + type: 'string', + }, + created_at: { + description: 'Date and time at which the event was created.', + format: 'date-time', + type: 'string', + }, + customer_key: { + description: + 'The customer key associated with the device, if any.', + type: 'string', + }, + device_custom_metadata: { + additionalProperties: { + oneOf: [{ type: 'string' }, { type: 'boolean' }], + }, + description: + 'Custom metadata of the device, present when device_id is provided.', + type: 'object', + }, + device_id: { + description: 'ID of the affected device.', + format: 'uuid', + type: 'string', + }, + event_id: { + description: 'ID of the event.', + format: 'uuid', + type: 'string', + }, + event_type: { enum: ['camera.activated'], type: 'string' }, + motion_sub_type: { + description: 'Sub-type of motion detected, if available.', + enum: ['human', 'vehicle', 'package', 'other'], + type: 'string', + }, + occurred_at: { + description: 'Date and time at which the event occurred.', + format: 'date-time', + type: 'string', + }, + workspace_id: { + description: + 'ID of the [workspace](https://docs.seam.co/latest/core-concepts/workspaces) associated with the event.', + format: 'uuid', + type: 'string', + }, + }, + required: [ + 'event_id', + 'workspace_id', + 'created_at', + 'occurred_at', + 'device_id', + 'connected_account_id', + 'event_type', + 'activation_reason', + ], + type: 'object', + 'x-route-path': '/devices', + }, + { + description: + 'A doorbell button was pressed on a [device](https://docs.seam.co/latest/core-concepts/devices).', + properties: { + connected_account_custom_metadata: { + additionalProperties: { + oneOf: [{ type: 'string' }, { type: 'boolean' }], + }, + description: + 'Custom metadata of the connected account, present when connected_account_id is provided.', + type: 'object', + }, + connected_account_id: { + description: + 'ID of the [connected account](https://docs.seam.co/latest/core-concepts/connected-accounts) associated with the event.', + format: 'uuid', + type: 'string', + }, + created_at: { + description: 'Date and time at which the event was created.', + format: 'date-time', + type: 'string', + }, + customer_key: { + description: + 'The customer key associated with the device, if any.', + type: 'string', + }, + device_custom_metadata: { + additionalProperties: { + oneOf: [{ type: 'string' }, { type: 'boolean' }], + }, + description: + 'Custom metadata of the device, present when device_id is provided.', + type: 'object', + }, + device_id: { + description: 'ID of the affected device.', + format: 'uuid', + type: 'string', + }, + event_id: { + description: 'ID of the event.', + format: 'uuid', + type: 'string', + }, + event_type: { enum: ['device.doorbell_rang'], type: 'string' }, + occurred_at: { + description: 'Date and time at which the event occurred.', + format: 'date-time', + type: 'string', + }, + workspace_id: { + description: + 'ID of the [workspace](https://docs.seam.co/latest/core-concepts/workspaces) associated with the event.', + format: 'uuid', + type: 'string', + }, + }, + required: [ + 'event_id', + 'workspace_id', + 'created_at', + 'occurred_at', + 'device_id', + 'connected_account_id', + 'event_type', + ], + type: 'object', + 'x-route-path': '/devices', + }, { description: 'An [enrollment automation](https://docs.seam.co/latest/capability-guides/mobile-access/issuing-mobile-credentials-from-an-access-control-system#prepare-the-phones-for-a-user-identity-to-start-receiving-mobile-credentials-using-an-enrollment-aut) was deleted.', @@ -54914,6 +55067,8 @@ export default { 'thermostat.temperature_reached_set_point', 'thermostat.temperature_changed', 'device.name_changed', + 'camera.activated', + 'device.doorbell_rang', 'enrollment_automation.deleted', 'phone.deactivated', 'space.device_membership_changed', @@ -55026,6 +55181,8 @@ export default { 'thermostat.temperature_reached_set_point', 'thermostat.temperature_changed', 'device.name_changed', + 'camera.activated', + 'device.doorbell_rang', 'enrollment_automation.deleted', 'phone.deactivated', 'space.device_membership_changed', @@ -55471,6 +55628,8 @@ export default { 'thermostat.temperature_reached_set_point', 'thermostat.temperature_changed', 'device.name_changed', + 'camera.activated', + 'device.doorbell_rang', 'enrollment_automation.deleted', 'phone.deactivated', 'space.device_membership_changed', @@ -55579,6 +55738,8 @@ export default { 'thermostat.temperature_reached_set_point', 'thermostat.temperature_changed', 'device.name_changed', + 'camera.activated', + 'device.doorbell_rang', 'enrollment_automation.deleted', 'phone.deactivated', 'space.device_membership_changed', @@ -64693,6 +64854,8 @@ export default { 'thermostat.temperature_reached_set_point', 'thermostat.temperature_changed', 'device.name_changed', + 'camera.activated', + 'device.doorbell_rang', 'enrollment_automation.deleted', 'phone.deactivated', 'space.device_membership_changed', @@ -64806,6 +64969,8 @@ export default { 'thermostat.temperature_reached_set_point', 'thermostat.temperature_changed', 'device.name_changed', + 'camera.activated', + 'device.doorbell_rang', 'enrollment_automation.deleted', 'phone.deactivated', 'space.device_membership_changed', @@ -64982,6 +65147,8 @@ export default { 'thermostat.temperature_reached_set_point', 'thermostat.temperature_changed', 'device.name_changed', + 'camera.activated', + 'device.doorbell_rang', 'enrollment_automation.deleted', 'phone.deactivated', 'space.device_membership_changed', @@ -65090,6 +65257,8 @@ export default { 'thermostat.temperature_reached_set_point', 'thermostat.temperature_changed', 'device.name_changed', + 'camera.activated', + 'device.doorbell_rang', 'enrollment_automation.deleted', 'phone.deactivated', 'space.device_membership_changed', diff --git a/src/lib/seam/connect/route-types.ts b/src/lib/seam/connect/route-types.ts index ec00eedf..d758ed66 100644 --- a/src/lib/seam/connect/route-types.ts +++ b/src/lib/seam/connect/route-types.ts @@ -42457,6 +42457,70 @@ export type Routes = { /** The new name of the affected device. */ device_name: string } + | { + /** ID of the event. */ + event_id: string + /** ID of the [workspace](https://docs.seam.co/latest/core-concepts/workspaces) associated with the event. */ + workspace_id: string + /** Date and time at which the event was created. */ + created_at: string + /** Date and time at which the event occurred. */ + occurred_at: string + /** ID of the affected device. */ + device_id: string + /** ID of the [connected account](https://docs.seam.co/latest/core-concepts/connected-accounts) associated with the event. */ + connected_account_id: string + /** The customer key associated with the device, if any. */ + customer_key?: string | undefined + /** Custom metadata of the device, present when device_id is provided. */ + device_custom_metadata?: + | { + [x: string]: string | boolean + } + | undefined + /** Custom metadata of the connected account, present when connected_account_id is provided. */ + connected_account_custom_metadata?: + | { + [x: string]: string | boolean + } + | undefined + event_type: 'camera.activated' + /** The reason the camera was activated. */ + activation_reason: 'motion_detected' + /** Sub-type of motion detected, if available. */ + motion_sub_type?: + | ('human' | 'vehicle' | 'package' | 'other') + | undefined + } + | { + /** ID of the event. */ + event_id: string + /** ID of the [workspace](https://docs.seam.co/latest/core-concepts/workspaces) associated with the event. */ + workspace_id: string + /** Date and time at which the event was created. */ + created_at: string + /** Date and time at which the event occurred. */ + occurred_at: string + /** ID of the affected device. */ + device_id: string + /** ID of the [connected account](https://docs.seam.co/latest/core-concepts/connected-accounts) associated with the event. */ + connected_account_id: string + /** The customer key associated with the device, if any. */ + customer_key?: string | undefined + /** Custom metadata of the device, present when device_id is provided. */ + device_custom_metadata?: + | { + [x: string]: string | boolean + } + | undefined + /** Custom metadata of the connected account, present when connected_account_id is provided. */ + connected_account_custom_metadata?: + | { + [x: string]: string | boolean + } + | undefined + event_type: 'device.doorbell_rang' + } | { /** ID of the event. */ event_id: string @@ -42680,6 +42744,8 @@ export type Routes = { | 'thermostat.temperature_reached_set_point' | 'thermostat.temperature_changed' | 'device.name_changed' + | 'camera.activated' + | 'device.doorbell_rang' | 'enrollment_automation.deleted' | 'phone.deactivated' | 'space.device_membership_changed' @@ -42786,6 +42852,8 @@ export type Routes = { | 'thermostat.temperature_reached_set_point' | 'thermostat.temperature_changed' | 'device.name_changed' + | 'camera.activated' + | 'device.doorbell_rang' | 'enrollment_automation.deleted' | 'phone.deactivated' | 'space.device_membership_changed' @@ -45770,6 +45838,70 @@ export type Routes = { /** The new name of the affected device. */ device_name: string } + | { + /** ID of the event. */ + event_id: string + /** ID of the [workspace](https://docs.seam.co/latest/core-concepts/workspaces) associated with the event. */ + workspace_id: string + /** Date and time at which the event was created. */ + created_at: string + /** Date and time at which the event occurred. */ + occurred_at: string + /** ID of the affected device. */ + device_id: string + /** ID of the [connected account](https://docs.seam.co/latest/core-concepts/connected-accounts) associated with the event. */ + connected_account_id: string + /** The customer key associated with the device, if any. */ + customer_key?: string | undefined + /** Custom metadata of the device, present when device_id is provided. */ + device_custom_metadata?: + | { + [x: string]: string | boolean + } + | undefined + /** Custom metadata of the connected account, present when connected_account_id is provided. */ + connected_account_custom_metadata?: + | { + [x: string]: string | boolean + } + | undefined + event_type: 'camera.activated' + /** The reason the camera was activated. */ + activation_reason: 'motion_detected' + /** Sub-type of motion detected, if available. */ + motion_sub_type?: + | ('human' | 'vehicle' | 'package' | 'other') + | undefined + } + | { + /** ID of the event. */ + event_id: string + /** ID of the [workspace](https://docs.seam.co/latest/core-concepts/workspaces) associated with the event. */ + workspace_id: string + /** Date and time at which the event was created. */ + created_at: string + /** Date and time at which the event occurred. */ + occurred_at: string + /** ID of the affected device. */ + device_id: string + /** ID of the [connected account](https://docs.seam.co/latest/core-concepts/connected-accounts) associated with the event. */ + connected_account_id: string + /** The customer key associated with the device, if any. */ + customer_key?: string | undefined + /** Custom metadata of the device, present when device_id is provided. */ + device_custom_metadata?: + | { + [x: string]: string | boolean + } + | undefined + /** Custom metadata of the connected account, present when connected_account_id is provided. */ + connected_account_custom_metadata?: + | { + [x: string]: string | boolean + } + | undefined + event_type: 'device.doorbell_rang' + } | { /** ID of the event. */ event_id: string @@ -69881,6 +70013,8 @@ export type Routes = { | 'thermostat.temperature_reached_set_point' | 'thermostat.temperature_changed' | 'device.name_changed' + | 'camera.activated' + | 'device.doorbell_rang' | 'enrollment_automation.deleted' | 'phone.deactivated' | 'space.device_membership_changed' @@ -69987,6 +70121,8 @@ export type Routes = { | 'thermostat.temperature_reached_set_point' | 'thermostat.temperature_changed' | 'device.name_changed' + | 'camera.activated' + | 'device.doorbell_rang' | 'enrollment_automation.deleted' | 'phone.deactivated' | 'space.device_membership_changed' @@ -72941,6 +73077,70 @@ export type Routes = { /** The new name of the affected device. */ device_name: string } + | { + /** ID of the event. */ + event_id: string + /** ID of the [workspace](https://docs.seam.co/latest/core-concepts/workspaces) associated with the event. */ + workspace_id: string + /** Date and time at which the event was created. */ + created_at: string + /** Date and time at which the event occurred. */ + occurred_at: string + /** ID of the affected device. */ + device_id: string + /** ID of the [connected account](https://docs.seam.co/latest/core-concepts/connected-accounts) associated with the event. */ + connected_account_id: string + /** The customer key associated with the device, if any. */ + customer_key?: string | undefined + /** Custom metadata of the device, present when device_id is provided. */ + device_custom_metadata?: + | { + [x: string]: string | boolean + } + | undefined + /** Custom metadata of the connected account, present when connected_account_id is provided. */ + connected_account_custom_metadata?: + | { + [x: string]: string | boolean + } + | undefined + event_type: 'camera.activated' + /** The reason the camera was activated. */ + activation_reason: 'motion_detected' + /** Sub-type of motion detected, if available. */ + motion_sub_type?: + | ('human' | 'vehicle' | 'package' | 'other') + | undefined + } + | { + /** ID of the event. */ + event_id: string + /** ID of the [workspace](https://docs.seam.co/latest/core-concepts/workspaces) associated with the event. */ + workspace_id: string + /** Date and time at which the event was created. */ + created_at: string + /** Date and time at which the event occurred. */ + occurred_at: string + /** ID of the affected device. */ + device_id: string + /** ID of the [connected account](https://docs.seam.co/latest/core-concepts/connected-accounts) associated with the event. */ + connected_account_id: string + /** The customer key associated with the device, if any. */ + customer_key?: string | undefined + /** Custom metadata of the device, present when device_id is provided. */ + device_custom_metadata?: + | { + [x: string]: string | boolean + } + | undefined + /** Custom metadata of the connected account, present when connected_account_id is provided. */ + connected_account_custom_metadata?: + | { + [x: string]: string | boolean + } + | undefined + event_type: 'device.doorbell_rang' + } | { /** ID of the event. */ event_id: string @@ -109255,6 +109455,70 @@ export type Routes = { /** The new name of the affected device. */ device_name: string } + | { + /** ID of the event. */ + event_id: string + /** ID of the [workspace](https://docs.seam.co/latest/core-concepts/workspaces) associated with the event. */ + workspace_id: string + /** Date and time at which the event was created. */ + created_at: string + /** Date and time at which the event occurred. */ + occurred_at: string + /** ID of the affected device. */ + device_id: string + /** ID of the [connected account](https://docs.seam.co/latest/core-concepts/connected-accounts) associated with the event. */ + connected_account_id: string + /** The customer key associated with the device, if any. */ + customer_key?: string | undefined + /** Custom metadata of the device, present when device_id is provided. */ + device_custom_metadata?: + | { + [x: string]: string | boolean + } + | undefined + /** Custom metadata of the connected account, present when connected_account_id is provided. */ + connected_account_custom_metadata?: + | { + [x: string]: string | boolean + } + | undefined + event_type: 'camera.activated' + /** The reason the camera was activated. */ + activation_reason: 'motion_detected' + /** Sub-type of motion detected, if available. */ + motion_sub_type?: + | ('human' | 'vehicle' | 'package' | 'other') + | undefined + } + | { + /** ID of the event. */ + event_id: string + /** ID of the [workspace](https://docs.seam.co/latest/core-concepts/workspaces) associated with the event. */ + workspace_id: string + /** Date and time at which the event was created. */ + created_at: string + /** Date and time at which the event occurred. */ + occurred_at: string + /** ID of the affected device. */ + device_id: string + /** ID of the [connected account](https://docs.seam.co/latest/core-concepts/connected-accounts) associated with the event. */ + connected_account_id: string + /** The customer key associated with the device, if any. */ + customer_key?: string | undefined + /** Custom metadata of the device, present when device_id is provided. */ + device_custom_metadata?: + | { + [x: string]: string | boolean + } + | undefined + /** Custom metadata of the connected account, present when connected_account_id is provided. */ + connected_account_custom_metadata?: + | { + [x: string]: string | boolean + } + | undefined + event_type: 'device.doorbell_rang' + } | { /** ID of the event. */ event_id: string