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

fix: Missing warning type #1502

Merged
merged 1 commit into from
Jan 30, 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
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