Skip to content

Commit e09b3b5

Browse files
authored
feat: Sync with Seam API via bae7a9249b017a602c22663f6f5ab4f17a8948af (#2706)
1 parent 366138e commit e09b3b5

3 files changed

Lines changed: 464 additions & 0 deletions

File tree

src/lib/seam/connect/models/events/devices.ts

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -706,6 +706,35 @@ export const device_name_changed_event = device_event.extend({
706706

707707
export type DeviceNameChangedEvent = z.infer<typeof device_name_changed_event>
708708

709+
export const camera_activated_event = device_event.extend({
710+
event_type: z.literal('camera.activated'),
711+
activation_reason: z
712+
.enum(['motion_detected'])
713+
.describe('The reason the camera was activated.'),
714+
motion_sub_type: z
715+
.enum(['human', 'vehicle', 'package', 'other'])
716+
.optional()
717+
.describe('Sub-type of motion detected, if available.'),
718+
}).describe(`
719+
---
720+
route_path: /devices
721+
---
722+
A [camera](https://docs.seam.co/latest/core-concepts/devices) was activated, for example, by motion detection.
723+
`)
724+
725+
export type CameraActivatedEvent = z.infer<typeof camera_activated_event>
726+
727+
export const device_doorbell_rang_event = device_event.extend({
728+
event_type: z.literal('device.doorbell_rang'),
729+
}).describe(`
730+
---
731+
route_path: /devices
732+
---
733+
A doorbell button was pressed on a [device](https://docs.seam.co/latest/core-concepts/devices).
734+
`)
735+
736+
export type DeviceDoorbellRangEvent = z.infer<typeof device_doorbell_rang_event>
737+
709738
export const device_events = [
710739
device_connected_event,
711740
device_added_event,
@@ -740,4 +769,6 @@ export const device_events = [
740769
temperature_reached_set_point_event,
741770
temperature_changed_event,
742771
device_name_changed_event,
772+
camera_activated_event,
773+
device_doorbell_rang_event,
743774
] as const

src/lib/seam/connect/openapi.ts

Lines changed: 169 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23086,6 +23086,159 @@ export default {
2308623086
type: 'object',
2308723087
'x-route-path': '/devices',
2308823088
},
23089+
{
23090+
description:
23091+
'A [camera](https://docs.seam.co/latest/core-concepts/devices) was activated, for example, by motion detection.',
23092+
properties: {
23093+
activation_reason: {
23094+
description: 'The reason the camera was activated.',
23095+
enum: ['motion_detected'],
23096+
type: 'string',
23097+
},
23098+
connected_account_custom_metadata: {
23099+
additionalProperties: {
23100+
oneOf: [{ type: 'string' }, { type: 'boolean' }],
23101+
},
23102+
description:
23103+
'Custom metadata of the connected account, present when connected_account_id is provided.',
23104+
type: 'object',
23105+
},
23106+
connected_account_id: {
23107+
description:
23108+
'ID of the [connected account](https://docs.seam.co/latest/core-concepts/connected-accounts) associated with the event.',
23109+
format: 'uuid',
23110+
type: 'string',
23111+
},
23112+
created_at: {
23113+
description: 'Date and time at which the event was created.',
23114+
format: 'date-time',
23115+
type: 'string',
23116+
},
23117+
customer_key: {
23118+
description:
23119+
'The customer key associated with the device, if any.',
23120+
type: 'string',
23121+
},
23122+
device_custom_metadata: {
23123+
additionalProperties: {
23124+
oneOf: [{ type: 'string' }, { type: 'boolean' }],
23125+
},
23126+
description:
23127+
'Custom metadata of the device, present when device_id is provided.',
23128+
type: 'object',
23129+
},
23130+
device_id: {
23131+
description: 'ID of the affected device.',
23132+
format: 'uuid',
23133+
type: 'string',
23134+
},
23135+
event_id: {
23136+
description: 'ID of the event.',
23137+
format: 'uuid',
23138+
type: 'string',
23139+
},
23140+
event_type: { enum: ['camera.activated'], type: 'string' },
23141+
motion_sub_type: {
23142+
description: 'Sub-type of motion detected, if available.',
23143+
enum: ['human', 'vehicle', 'package', 'other'],
23144+
type: 'string',
23145+
},
23146+
occurred_at: {
23147+
description: 'Date and time at which the event occurred.',
23148+
format: 'date-time',
23149+
type: 'string',
23150+
},
23151+
workspace_id: {
23152+
description:
23153+
'ID of the [workspace](https://docs.seam.co/latest/core-concepts/workspaces) associated with the event.',
23154+
format: 'uuid',
23155+
type: 'string',
23156+
},
23157+
},
23158+
required: [
23159+
'event_id',
23160+
'workspace_id',
23161+
'created_at',
23162+
'occurred_at',
23163+
'device_id',
23164+
'connected_account_id',
23165+
'event_type',
23166+
'activation_reason',
23167+
],
23168+
type: 'object',
23169+
'x-route-path': '/devices',
23170+
},
23171+
{
23172+
description:
23173+
'A doorbell button was pressed on a [device](https://docs.seam.co/latest/core-concepts/devices).',
23174+
properties: {
23175+
connected_account_custom_metadata: {
23176+
additionalProperties: {
23177+
oneOf: [{ type: 'string' }, { type: 'boolean' }],
23178+
},
23179+
description:
23180+
'Custom metadata of the connected account, present when connected_account_id is provided.',
23181+
type: 'object',
23182+
},
23183+
connected_account_id: {
23184+
description:
23185+
'ID of the [connected account](https://docs.seam.co/latest/core-concepts/connected-accounts) associated with the event.',
23186+
format: 'uuid',
23187+
type: 'string',
23188+
},
23189+
created_at: {
23190+
description: 'Date and time at which the event was created.',
23191+
format: 'date-time',
23192+
type: 'string',
23193+
},
23194+
customer_key: {
23195+
description:
23196+
'The customer key associated with the device, if any.',
23197+
type: 'string',
23198+
},
23199+
device_custom_metadata: {
23200+
additionalProperties: {
23201+
oneOf: [{ type: 'string' }, { type: 'boolean' }],
23202+
},
23203+
description:
23204+
'Custom metadata of the device, present when device_id is provided.',
23205+
type: 'object',
23206+
},
23207+
device_id: {
23208+
description: 'ID of the affected device.',
23209+
format: 'uuid',
23210+
type: 'string',
23211+
},
23212+
event_id: {
23213+
description: 'ID of the event.',
23214+
format: 'uuid',
23215+
type: 'string',
23216+
},
23217+
event_type: { enum: ['device.doorbell_rang'], type: 'string' },
23218+
occurred_at: {
23219+
description: 'Date and time at which the event occurred.',
23220+
format: 'date-time',
23221+
type: 'string',
23222+
},
23223+
workspace_id: {
23224+
description:
23225+
'ID of the [workspace](https://docs.seam.co/latest/core-concepts/workspaces) associated with the event.',
23226+
format: 'uuid',
23227+
type: 'string',
23228+
},
23229+
},
23230+
required: [
23231+
'event_id',
23232+
'workspace_id',
23233+
'created_at',
23234+
'occurred_at',
23235+
'device_id',
23236+
'connected_account_id',
23237+
'event_type',
23238+
],
23239+
type: 'object',
23240+
'x-route-path': '/devices',
23241+
},
2308923242
{
2309023243
description:
2309123244
'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 {
5491455067
'thermostat.temperature_reached_set_point',
5491555068
'thermostat.temperature_changed',
5491655069
'device.name_changed',
55070+
'camera.activated',
55071+
'device.doorbell_rang',
5491755072
'enrollment_automation.deleted',
5491855073
'phone.deactivated',
5491955074
'space.device_membership_changed',
@@ -55026,6 +55181,8 @@ export default {
5502655181
'thermostat.temperature_reached_set_point',
5502755182
'thermostat.temperature_changed',
5502855183
'device.name_changed',
55184+
'camera.activated',
55185+
'device.doorbell_rang',
5502955186
'enrollment_automation.deleted',
5503055187
'phone.deactivated',
5503155188
'space.device_membership_changed',
@@ -55471,6 +55628,8 @@ export default {
5547155628
'thermostat.temperature_reached_set_point',
5547255629
'thermostat.temperature_changed',
5547355630
'device.name_changed',
55631+
'camera.activated',
55632+
'device.doorbell_rang',
5547455633
'enrollment_automation.deleted',
5547555634
'phone.deactivated',
5547655635
'space.device_membership_changed',
@@ -55579,6 +55738,8 @@ export default {
5557955738
'thermostat.temperature_reached_set_point',
5558055739
'thermostat.temperature_changed',
5558155740
'device.name_changed',
55741+
'camera.activated',
55742+
'device.doorbell_rang',
5558255743
'enrollment_automation.deleted',
5558355744
'phone.deactivated',
5558455745
'space.device_membership_changed',
@@ -64693,6 +64854,8 @@ export default {
6469364854
'thermostat.temperature_reached_set_point',
6469464855
'thermostat.temperature_changed',
6469564856
'device.name_changed',
64857+
'camera.activated',
64858+
'device.doorbell_rang',
6469664859
'enrollment_automation.deleted',
6469764860
'phone.deactivated',
6469864861
'space.device_membership_changed',
@@ -64806,6 +64969,8 @@ export default {
6480664969
'thermostat.temperature_reached_set_point',
6480764970
'thermostat.temperature_changed',
6480864971
'device.name_changed',
64972+
'camera.activated',
64973+
'device.doorbell_rang',
6480964974
'enrollment_automation.deleted',
6481064975
'phone.deactivated',
6481164976
'space.device_membership_changed',
@@ -64982,6 +65147,8 @@ export default {
6498265147
'thermostat.temperature_reached_set_point',
6498365148
'thermostat.temperature_changed',
6498465149
'device.name_changed',
65150+
'camera.activated',
65151+
'device.doorbell_rang',
6498565152
'enrollment_automation.deleted',
6498665153
'phone.deactivated',
6498765154
'space.device_membership_changed',
@@ -65090,6 +65257,8 @@ export default {
6509065257
'thermostat.temperature_reached_set_point',
6509165258
'thermostat.temperature_changed',
6509265259
'device.name_changed',
65260+
'camera.activated',
65261+
'device.doorbell_rang',
6509365262
'enrollment_automation.deleted',
6509465263
'phone.deactivated',
6509565264
'space.device_membership_changed',

0 commit comments

Comments
 (0)