From 166573d84cf175c185c7aa1d089047102dbe2bfb Mon Sep 17 00:00:00 2001 From: Seam Bot Date: Wed, 29 Jan 2025 21:55:45 -0800 Subject: [PATCH] fix: Missing warning type (#1502) --- .../access-codes/managed-access-code.ts | 9 ++++ src/lib/seam/connect/openapi.ts | 30 +++++++++++++ src/lib/seam/connect/route-types.ts | 45 +++++++++++++++++++ 3 files changed, 84 insertions(+) diff --git a/src/lib/seam/connect/models/access-codes/managed-access-code.ts b/src/lib/seam/connect/models/access-codes/managed-access-code.ts index 031d2ffb..5765416f 100644 --- a/src/lib/seam/connect/models/access-codes/managed-access-code.ts +++ b/src/lib/seam/connect/models/access-codes/managed-access-code.ts @@ -242,6 +242,14 @@ const schlage_creation_outage = common_access_code_warning }) .describe('Received an error when attempting to create this code.') +const salto_office_mode = common_access_code_warning + .extend({ + warning_code: z + .literal('salto_office_mode') + .describe(warning_code_description), + }) + .describe('Lock is in Office Mode. Access Codes will not unlock doors.') + const delay_in_setting_on_device = common_access_code_warning .extend({ warning_code: z @@ -288,6 +296,7 @@ const access_code_warning = z.discriminatedUnion('warning_code', [ smartthings_failed_to_set_access_code_warning, schlage_detected_duplicate, schlage_creation_outage, + salto_office_mode, code_modified_external_to_seam_warning, delay_in_setting_on_device, delay_in_removing_from_device, diff --git a/src/lib/seam/connect/openapi.ts b/src/lib/seam/connect/openapi.ts index db5b5e9e..42383566 100644 --- a/src/lib/seam/connect/openapi.ts +++ b/src/lib/seam/connect/openapi.ts @@ -688,6 +688,21 @@ export default { required: ['message', 'warning_code'], type: 'object', }, + { + description: + 'Lock is in Office Mode. Access Codes will not unlock doors.', + properties: { + message: { type: 'string' }, + warning_code: { + description: + 'Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.', + enum: ['salto_office_mode'], + type: 'string', + }, + }, + required: ['message', 'warning_code'], + type: 'object', + }, { description: 'Code was modified or removed externally after Seam successfully set it on the device.', @@ -13079,6 +13094,21 @@ export default { required: ['message', 'warning_code'], type: 'object', }, + { + description: + 'Lock is in Office Mode. Access Codes will not unlock doors.', + properties: { + message: { type: 'string' }, + warning_code: { + description: + 'Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.', + enum: ['salto_office_mode'], + type: 'string', + }, + }, + required: ['message', 'warning_code'], + type: 'object', + }, { description: 'Code was modified or removed externally after Seam successfully set it on the device.', diff --git a/src/lib/seam/connect/route-types.ts b/src/lib/seam/connect/route-types.ts index a07274ab..a737550d 100644 --- a/src/lib/seam/connect/route-types.ts +++ b/src/lib/seam/connect/route-types.ts @@ -1286,6 +1286,11 @@ export interface Routes { /** Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. */ warning_code: 'schlage_creation_outage' } + | { + message: string + /** Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. */ + warning_code: 'salto_office_mode' + } | { message: string /** Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. */ @@ -1609,6 +1614,11 @@ export interface Routes { /** Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. */ warning_code: 'schlage_creation_outage' } + | { + message: string + /** Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. */ + warning_code: 'salto_office_mode' + } | { message: string /** Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. */ @@ -2973,6 +2983,11 @@ export interface Routes { /** Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. */ warning_code: 'schlage_creation_outage' } + | { + message: string + /** Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. */ + warning_code: 'salto_office_mode' + } | { message: string /** Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. */ @@ -3283,6 +3298,11 @@ export interface Routes { /** Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. */ warning_code: 'schlage_creation_outage' } + | { + message: string + /** Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. */ + warning_code: 'salto_office_mode' + } | { message: string /** Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. */ @@ -3592,6 +3612,11 @@ export interface Routes { /** Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. */ warning_code: 'schlage_creation_outage' } + | { + message: string + /** Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. */ + warning_code: 'salto_office_mode' + } | { message: string /** Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. */ @@ -3889,6 +3914,11 @@ export interface Routes { /** Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. */ warning_code: 'schlage_creation_outage' } + | { + message: string + /** Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. */ + warning_code: 'salto_office_mode' + } | { message: string /** Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. */ @@ -4194,6 +4224,11 @@ export interface Routes { /** Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. */ warning_code: 'schlage_creation_outage' } + | { + message: string + /** Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. */ + warning_code: 'salto_office_mode' + } | { message: string /** Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. */ @@ -5534,6 +5569,11 @@ export interface Routes { /** Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. */ warning_code: 'schlage_creation_outage' } + | { + message: string + /** Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. */ + warning_code: 'salto_office_mode' + } | { message: string /** Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. */ @@ -5821,6 +5861,11 @@ export interface Routes { /** Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. */ warning_code: 'schlage_creation_outage' } + | { + message: string + /** Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. */ + warning_code: 'salto_office_mode' + } | { message: string /** Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. */