Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add acs_entrance.added and acs_entrance.removed events #1568

Merged
merged 1 commit into from
Mar 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions src/lib/seam/connect/models/events/acs/entrances.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import { z } from 'zod'

import { common_acs_event } from './common.js'

const acs_entrance_event = common_acs_event
.extend({
acs_entrance_id: z.string().uuid(),
})
.describe(
'ID of the [ACS entrance](https://docs.seam.co/latest/capability-guides/retrieving-entrance-details).',
)

export const acs_entrance_added_event = acs_entrance_event.extend({
event_type: z.literal('acs_entrance.added'),
}).describe(`
---
route_path: /acs/entrances
---
An [ACS entrance](https://docs.seam.co/latest/capability-guides/retrieving-entrance-details) was added.
`)

export const acs_entrance_removed_event = acs_entrance_event.extend({
event_type: z.literal('acs_entrance.removed'),
}).describe(`
---
route_path: /acs/entrances
---
An [ACS entrance](https://docs.seam.co/latest/capability-guides/retrieving-entrance-details) was removed.
`)

export type AcsUserDeletedEvent = z.infer<typeof acs_entrance_removed_event>

export const acs_entrance_events = [
acs_entrance_added_event,
acs_entrance_removed_event,
] as const
2 changes: 2 additions & 0 deletions src/lib/seam/connect/models/events/acs/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { acs_access_group_events } from './access-groups.js'
import { acs_credential_events } from './credentials.js'
import { acs_encoder_events } from './encoders.js'
import { acs_entrance_events } from './entrances.js'
import { acs_system_events } from './systems.js'
import { acs_user_events } from './users.js'

Expand All @@ -10,4 +11,5 @@ export const acs_events = [
...acs_user_events,
...acs_encoder_events,
...acs_access_group_events,
...acs_entrance_events,
] as const
108 changes: 108 additions & 0 deletions src/lib/seam/connect/openapi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9552,6 +9552,110 @@ export default {
type: 'object',
'x-route-path': '/acs/access_groups',
},
{
description:
'An [ACS entrance](https://docs.seam.co/latest/capability-guides/retrieving-entrance-details) was added.',
properties: {
acs_entrance_id: { format: 'uuid', type: 'string' },
acs_system_id: {
description:
'ID of the [ACS system](https://docs.seam.co/latest/capability-guides/access-systems).',
format: 'uuid',
type: 'string',
},
connected_account_id: {
description:
'ID of the [connected account](https://docs.seam.co/latest/core-concepts/connected-accounts).',
format: 'uuid',
type: 'string',
},
created_at: {
description: 'Date and time at which the event was created.',
format: 'date-time',
type: 'string',
},
event_id: {
description: 'ID of the event.',
format: 'uuid',
type: 'string',
},
event_type: { enum: ['acs_entrance.added'], 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).',
format: 'uuid',
type: 'string',
},
},
required: [
'event_id',
'workspace_id',
'created_at',
'occurred_at',
'acs_system_id',
'acs_entrance_id',
'event_type',
],
type: 'object',
'x-route-path': '/acs/entrances',
},
{
description:
'An [ACS entrance](https://docs.seam.co/latest/capability-guides/retrieving-entrance-details) was removed.',
properties: {
acs_entrance_id: { format: 'uuid', type: 'string' },
acs_system_id: {
description:
'ID of the [ACS system](https://docs.seam.co/latest/capability-guides/access-systems).',
format: 'uuid',
type: 'string',
},
connected_account_id: {
description:
'ID of the [connected account](https://docs.seam.co/latest/core-concepts/connected-accounts).',
format: 'uuid',
type: 'string',
},
created_at: {
description: 'Date and time at which the event was created.',
format: 'date-time',
type: 'string',
},
event_id: {
description: 'ID of the event.',
format: 'uuid',
type: 'string',
},
event_type: { enum: ['acs_entrance.removed'], 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).',
format: 'uuid',
type: 'string',
},
},
required: [
'event_id',
'workspace_id',
'created_at',
'occurred_at',
'acs_system_id',
'acs_entrance_id',
'event_type',
],
type: 'object',
'x-route-path': '/acs/entrances',
},
{
description:
'A [client session](https://docs.seam.co/latest/core-concepts/authentication/client-session-tokens) was deleted.',
Expand Down Expand Up @@ -22742,6 +22846,8 @@ export default {
'acs_encoder.added',
'acs_encoder.removed',
'acs_access_group.deleted',
'acs_entrance.added',
'acs_entrance.removed',
'client_session.deleted',
'connected_account.connected',
'connected_account.created',
Expand Down Expand Up @@ -22824,6 +22930,8 @@ export default {
'acs_encoder.added',
'acs_encoder.removed',
'acs_access_group.deleted',
'acs_entrance.added',
'acs_entrance.removed',
'client_session.deleted',
'connected_account.connected',
'connected_account.created',
Expand Down
68 changes: 68 additions & 0 deletions src/lib/seam/connect/route-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19809,6 +19809,38 @@ export interface Routes {
acs_access_group_id: string
event_type: 'acs_access_group.deleted'
}
| {
/** ID of the event. */
event_id: string
/** ID of the [workspace](https://docs.seam.co/latest/core-concepts/workspaces). */
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 [connected account](https://docs.seam.co/latest/core-concepts/connected-accounts). */
connected_account_id?: string | undefined
/** ID of the [ACS system](https://docs.seam.co/latest/capability-guides/access-systems). */
acs_system_id: string
acs_entrance_id: string
event_type: 'acs_entrance.added'
}
| {
/** ID of the event. */
event_id: string
/** ID of the [workspace](https://docs.seam.co/latest/core-concepts/workspaces). */
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 [connected account](https://docs.seam.co/latest/core-concepts/connected-accounts). */
connected_account_id?: string | undefined
/** ID of the [ACS system](https://docs.seam.co/latest/capability-guides/access-systems). */
acs_system_id: string
acs_entrance_id: string
event_type: 'acs_entrance.removed'
}
| {
/** ID of the event. */
event_id: string
Expand Down Expand Up @@ -20699,6 +20731,8 @@ export interface Routes {
| 'acs_encoder.added'
| 'acs_encoder.removed'
| 'acs_access_group.deleted'
| 'acs_entrance.added'
| 'acs_entrance.removed'
| 'client_session.deleted'
| 'connected_account.connected'
| 'connected_account.created'
Expand Down Expand Up @@ -20779,6 +20813,8 @@ export interface Routes {
| 'acs_encoder.added'
| 'acs_encoder.removed'
| 'acs_access_group.deleted'
| 'acs_entrance.added'
| 'acs_entrance.removed'
| 'client_session.deleted'
| 'connected_account.connected'
| 'connected_account.created'
Expand Down Expand Up @@ -21293,6 +21329,38 @@ export interface Routes {
acs_access_group_id: string
event_type: 'acs_access_group.deleted'
}
| {
/** ID of the event. */
event_id: string
/** ID of the [workspace](https://docs.seam.co/latest/core-concepts/workspaces). */
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 [connected account](https://docs.seam.co/latest/core-concepts/connected-accounts). */
connected_account_id?: string | undefined
/** ID of the [ACS system](https://docs.seam.co/latest/capability-guides/access-systems). */
acs_system_id: string
acs_entrance_id: string
event_type: 'acs_entrance.added'
}
| {
/** ID of the event. */
event_id: string
/** ID of the [workspace](https://docs.seam.co/latest/core-concepts/workspaces). */
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 [connected account](https://docs.seam.co/latest/core-concepts/connected-accounts). */
connected_account_id?: string | undefined
/** ID of the [ACS system](https://docs.seam.co/latest/capability-guides/access-systems). */
acs_system_id: string
acs_entrance_id: string
event_type: 'acs_entrance.removed'
}
| {
/** ID of the event. */
event_id: string
Expand Down