Skip to content

Commit

Permalink
fix: Missing warning type (#1502)
Browse files Browse the repository at this point in the history
  • Loading branch information
seambot authored Jan 30, 2025
1 parent babfe0e commit 166573d
Show file tree
Hide file tree
Showing 3 changed files with 84 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down
30 changes: 30 additions & 0 deletions src/lib/seam/connect/openapi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.',
Expand Down Expand Up @@ -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.',
Expand Down
45 changes: 45 additions & 0 deletions src/lib/seam/connect/route-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down Expand Up @@ -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. */
Expand Down Expand Up @@ -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. */
Expand Down Expand Up @@ -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. */
Expand Down Expand Up @@ -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. */
Expand Down Expand Up @@ -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. */
Expand Down Expand Up @@ -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. */
Expand Down Expand Up @@ -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. */
Expand Down Expand Up @@ -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. */
Expand Down

0 comments on commit 166573d

Please sign in to comment.