diff --git a/src/lib/seam/connect/models/acs/acs-entrance.ts b/src/lib/seam/connect/models/acs/acs-entrance.ts index a157a178..bce3008f 100644 --- a/src/lib/seam/connect/models/acs/acs-entrance.ts +++ b/src/lib/seam/connect/models/acs/acs-entrance.ts @@ -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 + export const acs_entrance_capability_flags = z.object({ can_unlock_with_mobile_key: z .boolean() @@ -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( diff --git a/src/lib/seam/connect/openapi.ts b/src/lib/seam/connect/openapi.ts index 7a9f3713..0823e9a7 100644 --- a/src/lib/seam/connect/openapi.ts +++ b/src/lib/seam/connect/openapi.ts @@ -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', @@ -4660,6 +4697,7 @@ const openapi: OpenAPISpec = { 'display_name', 'connected_account_id', 'errors', + 'warnings', ], type: 'object', 'x-route-path': '/acs/entrances', @@ -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', @@ -25437,6 +25518,7 @@ const openapi: OpenAPISpec = { 'display_name', 'connected_account_id', 'errors', + 'warnings', ], type: 'object', 'x-route-path': '/acs/entrances', diff --git a/src/lib/seam/connect/route-types.ts b/src/lib/seam/connect/route-types.ts index 9b2983df..a38bd918 100644 --- a/src/lib/seam/connect/route-types.ts +++ b/src/lib/seam/connect/route-types.ts @@ -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?: | { @@ -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?: | { @@ -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?: | { @@ -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?: | { @@ -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?: | { @@ -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?: | { @@ -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?: | { @@ -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?: | { @@ -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?: | { @@ -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?: | { @@ -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?: | {