Skip to content
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
46 changes: 46 additions & 0 deletions src/lib/seam/connect/models/acs/acs-entrance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,47 @@ import {
} from './metadata/index.js'
import { acs_entrance_salto_space_metadata } from './metadata/salto-space.js'

const warning_code_description =
'Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.'

const common_acs_entrance_warning = z.object({
created_at: z
.string()
.datetime()
.describe('Date and time at which Seam created the warning.'),
message: z
.string()
.describe(
'Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.',
),
})

const salto_ks_entrance_access_code_support_removed =
common_acs_entrance_warning
.extend({
warning_code: z
.literal('salto_ks_entrance_access_code_support_removed')
.describe(warning_code_description),
})
.describe(
'Indicates that a change in the reported device model has been detected for this Salto KS entrance, which may occur after an IQ hub reset. Access code support may be affected. See https://help.getseam.com/articles/5098842588-salto-ks-lock-loses-access-code-support for troubleshooting steps.',
)

const acs_entrance_warning = z
.discriminatedUnion('warning_code', [
salto_ks_entrance_access_code_support_removed,
])
.describe(
'Warning associated with the [entrance](https://docs.seam.co/latest/capability-guides/access-systems/retrieving-entrance-details).',
)

const _acs_entrance_warning_map = z.object({
salto_ks_entrance_access_code_support_removed:
salto_ks_entrance_access_code_support_removed.optional().nullable(),
})

export type AcsEntranceWarningMap = z.infer<typeof _acs_entrance_warning_map>

export const acs_entrance_capability_flags = z.object({
can_unlock_with_mobile_key: z
.boolean()
Expand Down Expand Up @@ -98,6 +139,11 @@ export const acs_entrance = z
.describe(
'Errors associated with the [entrance](https://docs.seam.co/latest/capability-guides/access-systems/retrieving-entrance-details).',
),
warnings: z
.array(acs_entrance_warning)
.describe(
'Warnings associated with the [entrance](https://docs.seam.co/latest/capability-guides/access-systems/retrieving-entrance-details).',
),
latch_metadata: acs_entrance_latch_metadata
.optional()
.describe(
Expand Down
82 changes: 82 additions & 0 deletions src/lib/seam/connect/openapi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4651,6 +4651,43 @@ const openapi: OpenAPISpec = {
required: ['door_name', 'door_category'],
type: 'object',
},
warnings: {
description:
'Warnings associated with the [entrance](https://docs.seam.co/latest/capability-guides/access-systems/retrieving-entrance-details).',
items: {
description:
'Warning associated with the [entrance](https://docs.seam.co/latest/capability-guides/access-systems/retrieving-entrance-details).',
discriminator: { propertyName: 'warning_code' },
oneOf: [
{
description:
'Indicates that a change in the reported device model has been detected for this Salto KS entrance, which may occur after an IQ hub reset. Access code support may be affected. See https://help.getseam.com/articles/5098842588-salto-ks-lock-loses-access-code-support for troubleshooting steps.',
properties: {
created_at: {
description:
'Date and time at which Seam created the warning.',
format: 'date-time',
type: 'string',
},
message: {
description:
'Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.',
type: 'string',
},
warning_code: {
description:
'Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.',
enum: ['salto_ks_entrance_access_code_support_removed'],
type: 'string',
},
},
required: ['created_at', 'message', 'warning_code'],
type: 'object',
},
],
},
type: 'array',
},
},
required: [
'acs_system_id',
Expand All @@ -4660,6 +4697,7 @@ const openapi: OpenAPISpec = {
'display_name',
'connected_account_id',
'errors',
'warnings',
],
type: 'object',
'x-route-path': '/acs/entrances',
Expand Down Expand Up @@ -25428,6 +25466,49 @@ const openapi: OpenAPISpec = {
required: ['door_name', 'door_category'],
type: 'object',
},
warnings: {
description:
'Warnings associated with the [entrance](https://docs.seam.co/latest/capability-guides/access-systems/retrieving-entrance-details).',
items: {
description:
'Warning associated with the [entrance](https://docs.seam.co/latest/capability-guides/access-systems/retrieving-entrance-details).',
discriminator: { propertyName: 'warning_code' },
oneOf: [
{
description:
'Indicates that a change in the reported device model has been detected for this Salto KS entrance, which may occur after an IQ hub reset. Access code support may be affected. See https://help.getseam.com/articles/5098842588-salto-ks-lock-loses-access-code-support for troubleshooting steps.',
properties: {
created_at: {
description:
'Date and time at which Seam created the warning.',
format: 'date-time',
type: 'string',
},
message: {
description:
'Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.',
type: 'string',
},
warning_code: {
description:
'Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.',
enum: [
'salto_ks_entrance_access_code_support_removed',
],
type: 'string',
},
},
required: [
'created_at',
'message',
'warning_code',
],
type: 'object',
},
],
},
type: 'array',
},
},
required: [
'acs_system_id',
Expand All @@ -25437,6 +25518,7 @@ const openapi: OpenAPISpec = {
'display_name',
'connected_account_id',
'errors',
'warnings',
],
type: 'object',
'x-route-path': '/acs/entrances',
Expand Down
99 changes: 99 additions & 0 deletions src/lib/seam/connect/route-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14681,6 +14681,15 @@ export type Routes = {
/** Detailed description of the error. Provides insights into the issue and potentially how to rectify it. */
message: string
}[]
/** Warnings associated with the [entrance](https://docs.seam.co/latest/capability-guides/access-systems/retrieving-entrance-details). */
warnings: {
/** Date and time at which Seam created the warning. */
created_at: string
/** Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. */
message: string
/** Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. */
warning_code: 'salto_ks_entrance_access_code_support_removed'
}[]
/** Latch-specific metadata associated with the [entrance](https://docs.seam.co/latest/capability-guides/access-systems/retrieving-entrance-details). */
latch_metadata?:
| {
Expand Down Expand Up @@ -19970,6 +19979,15 @@ export type Routes = {
/** Detailed description of the error. Provides insights into the issue and potentially how to rectify it. */
message: string
}[]
/** Warnings associated with the [entrance](https://docs.seam.co/latest/capability-guides/access-systems/retrieving-entrance-details). */
warnings: {
/** Date and time at which Seam created the warning. */
created_at: string
/** Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. */
message: string
/** Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. */
warning_code: 'salto_ks_entrance_access_code_support_removed'
}[]
/** Latch-specific metadata associated with the [entrance](https://docs.seam.co/latest/capability-guides/access-systems/retrieving-entrance-details). */
latch_metadata?:
| {
Expand Down Expand Up @@ -21562,6 +21580,15 @@ export type Routes = {
/** Detailed description of the error. Provides insights into the issue and potentially how to rectify it. */
message: string
}[]
/** Warnings associated with the [entrance](https://docs.seam.co/latest/capability-guides/access-systems/retrieving-entrance-details). */
warnings: {
/** Date and time at which Seam created the warning. */
created_at: string
/** Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. */
message: string
/** Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. */
warning_code: 'salto_ks_entrance_access_code_support_removed'
}[]
/** Latch-specific metadata associated with the [entrance](https://docs.seam.co/latest/capability-guides/access-systems/retrieving-entrance-details). */
latch_metadata?:
| {
Expand Down Expand Up @@ -23566,6 +23593,15 @@ export type Routes = {
/** Detailed description of the error. Provides insights into the issue and potentially how to rectify it. */
message: string
}[]
/** Warnings associated with the [entrance](https://docs.seam.co/latest/capability-guides/access-systems/retrieving-entrance-details). */
warnings: {
/** Date and time at which Seam created the warning. */
created_at: string
/** Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. */
message: string
/** Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. */
warning_code: 'salto_ks_entrance_access_code_support_removed'
}[]
/** Latch-specific metadata associated with the [entrance](https://docs.seam.co/latest/capability-guides/access-systems/retrieving-entrance-details). */
latch_metadata?:
| {
Expand Down Expand Up @@ -27820,6 +27856,15 @@ export type Routes = {
/** Detailed description of the error. Provides insights into the issue and potentially how to rectify it. */
message: string
}[]
/** Warnings associated with the [entrance](https://docs.seam.co/latest/capability-guides/access-systems/retrieving-entrance-details). */
warnings: {
/** Date and time at which Seam created the warning. */
created_at: string
/** Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. */
message: string
/** Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. */
warning_code: 'salto_ks_entrance_access_code_support_removed'
}[]
/** Latch-specific metadata associated with the [entrance](https://docs.seam.co/latest/capability-guides/access-systems/retrieving-entrance-details). */
latch_metadata?:
| {
Expand Down Expand Up @@ -28049,6 +28094,15 @@ export type Routes = {
/** Detailed description of the error. Provides insights into the issue and potentially how to rectify it. */
message: string
}[]
/** Warnings associated with the [entrance](https://docs.seam.co/latest/capability-guides/access-systems/retrieving-entrance-details). */
warnings: {
/** Date and time at which Seam created the warning. */
created_at: string
/** Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. */
message: string
/** Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. */
warning_code: 'salto_ks_entrance_access_code_support_removed'
}[]
/** Latch-specific metadata associated with the [entrance](https://docs.seam.co/latest/capability-guides/access-systems/retrieving-entrance-details). */
latch_metadata?:
| {
Expand Down Expand Up @@ -31588,6 +31642,15 @@ export type Routes = {
/** Detailed description of the error. Provides insights into the issue and potentially how to rectify it. */
message: string
}[]
/** Warnings associated with the [entrance](https://docs.seam.co/latest/capability-guides/access-systems/retrieving-entrance-details). */
warnings: {
/** Date and time at which Seam created the warning. */
created_at: string
/** Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. */
message: string
/** Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. */
warning_code: 'salto_ks_entrance_access_code_support_removed'
}[]
/** Latch-specific metadata associated with the [entrance](https://docs.seam.co/latest/capability-guides/access-systems/retrieving-entrance-details). */
latch_metadata?:
| {
Expand Down Expand Up @@ -82283,6 +82346,15 @@ export type Routes = {
/** Detailed description of the error. Provides insights into the issue and potentially how to rectify it. */
message: string
}[]
/** Warnings associated with the [entrance](https://docs.seam.co/latest/capability-guides/access-systems/retrieving-entrance-details). */
warnings: {
/** Date and time at which Seam created the warning. */
created_at: string
/** Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. */
message: string
/** Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. */
warning_code: 'salto_ks_entrance_access_code_support_removed'
}[]
/** Latch-specific metadata associated with the [entrance](https://docs.seam.co/latest/capability-guides/access-systems/retrieving-entrance-details). */
latch_metadata?:
| {
Expand Down Expand Up @@ -84523,6 +84595,15 @@ export type Routes = {
/** Detailed description of the error. Provides insights into the issue and potentially how to rectify it. */
message: string
}[]
/** Warnings associated with the [entrance](https://docs.seam.co/latest/capability-guides/access-systems/retrieving-entrance-details). */
warnings: {
/** Date and time at which Seam created the warning. */
created_at: string
/** Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. */
message: string
/** Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. */
warning_code: 'salto_ks_entrance_access_code_support_removed'
}[]
/** Latch-specific metadata associated with the [entrance](https://docs.seam.co/latest/capability-guides/access-systems/retrieving-entrance-details). */
latch_metadata?:
| {
Expand Down Expand Up @@ -108955,6 +109036,15 @@ export type Routes = {
/** Detailed description of the error. Provides insights into the issue and potentially how to rectify it. */
message: string
}[]
/** Warnings associated with the [entrance](https://docs.seam.co/latest/capability-guides/access-systems/retrieving-entrance-details). */
warnings: {
/** Date and time at which Seam created the warning. */
created_at: string
/** Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. */
message: string
/** Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. */
warning_code: 'salto_ks_entrance_access_code_support_removed'
}[]
/** Latch-specific metadata associated with the [entrance](https://docs.seam.co/latest/capability-guides/access-systems/retrieving-entrance-details). */
latch_metadata?:
| {
Expand Down Expand Up @@ -111935,6 +112025,15 @@ export type Routes = {
/** Detailed description of the error. Provides insights into the issue and potentially how to rectify it. */
message: string
}[]
/** Warnings associated with the [entrance](https://docs.seam.co/latest/capability-guides/access-systems/retrieving-entrance-details). */
warnings: {
/** Date and time at which Seam created the warning. */
created_at: string
/** Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. */
message: string
/** Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. */
warning_code: 'salto_ks_entrance_access_code_support_removed'
}[]
/** Latch-specific metadata associated with the [entrance](https://docs.seam.co/latest/capability-guides/access-systems/retrieving-entrance-details). */
latch_metadata?:
| {
Expand Down
Loading