Skip to content

Commit 397aff6

Browse files
authored
feat: Sync with Seam API via 4d90d9319c0d281248572d1d2056ff9ed7c15507 (#2848)
1 parent a1528a2 commit 397aff6

3 files changed

Lines changed: 372 additions & 3 deletions

File tree

src/lib/seam/connect/models/access-codes/managed-access-code.ts

Lines changed: 46 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,13 +103,30 @@ const no_space_for_access_code_on_device = common_access_code_error
103103
})
104104
.describe('No space for access code on device.')
105105

106+
const access_code_state_unconfirmed = common_access_code_error
107+
.extend({
108+
error_code: z
109+
.literal('access_code_state_unconfirmed')
110+
.describe(error_code_description),
111+
})
112+
.describe(
113+
'Indicates that the provider cannot confirm whether the access code was set or removed on the device.',
114+
)
115+
106116
const kwikset_unable_to_confirm_code = common_access_code_error
107117
.extend({
108118
error_code: z
109119
.literal('kwikset_unable_to_confirm_code')
110120
.describe(error_code_description),
111121
})
112-
.describe('Unable to confirm that the access code is set on Kwikset device.')
122+
.describe(
123+
`
124+
---
125+
deprecated: Use \`access_code_state_unconfirmed\` instead.
126+
---
127+
Unable to confirm that the access code is set on Kwikset device.
128+
`,
129+
)
113130

114131
const kwikset_unable_to_confirm_deletion = common_access_code_error
115132
.extend({
@@ -118,7 +135,12 @@ const kwikset_unable_to_confirm_deletion = common_access_code_error
118135
.describe(error_code_description),
119136
})
120137
.describe(
121-
'Unable to confirm the deletion of the access code on Kwikset device.',
138+
`
139+
---
140+
deprecated: Use \`access_code_state_unconfirmed\` instead.
141+
---
142+
Unable to confirm the deletion of the access code on Kwikset device.
143+
`,
122144
)
123145

124146
const kwikset_insufficient_permissions = common_access_code_error
@@ -230,6 +252,7 @@ const access_code_error = z
230252
duplicate_code_on_device,
231253
duplicate_code_attempt_prevented,
232254
no_space_for_access_code_on_device,
255+
access_code_state_unconfirmed,
233256
kwikset_unable_to_confirm_code,
234257

235258
kwikset_unable_to_confirm_deletion,
@@ -267,6 +290,9 @@ const _access_code_error_map = z.object({
267290
duplicate_code_attempt_prevented: duplicate_code_attempt_prevented
268291
.optional()
269292
.nullable(),
293+
access_code_state_unconfirmed: access_code_state_unconfirmed
294+
.optional()
295+
.nullable(),
270296
kwikset_unable_to_confirm_code: kwikset_unable_to_confirm_code
271297
.optional()
272298
.nullable(),
@@ -432,14 +458,29 @@ const kwikset_unable_to_confirm_code_warning = common_access_code_warning
432458
})
433459
.describe('Unable to confirm that the access code is set on Kwikset device.')
434460

461+
const access_code_inactive = common_access_code_warning
462+
.extend({
463+
warning_code: z
464+
.literal('access_code_inactive')
465+
.describe(warning_code_description),
466+
})
467+
.describe(
468+
'Indicates that the access code is disabled or inactive on the device. The code exists but will not grant access until re-enabled.',
469+
)
470+
435471
const ultraloq_access_code_disabled = common_access_code_warning
436472
.extend({
437473
warning_code: z
438474
.literal('ultraloq_access_code_disabled')
439475
.describe(warning_code_description),
440476
})
441477
.describe(
442-
'Access code is disabled on Ultraloq device. Re-enable through the Ultraloq mobile app.',
478+
`
479+
---
480+
deprecated: Use \`access_code_inactive\` instead.
481+
---
482+
Access code is disabled on Ultraloq device. Re-enable through the Ultraloq mobile app.
483+
`,
443484
)
444485

445486
const using_backup_access_code = common_access_code_warning
@@ -472,6 +513,7 @@ const access_code_warning = z
472513
igloo_algopin_must_be_used_within_24_hours,
473514
management_transferred,
474515
kwikset_unable_to_confirm_code_warning,
516+
access_code_inactive,
475517
ultraloq_access_code_disabled,
476518
using_backup_access_code,
477519
being_deleted,
@@ -508,6 +550,7 @@ const _access_code_warning_map = z.object({
508550
kwikset_unable_to_confirm_code_warning: kwikset_unable_to_confirm_code_warning
509551
.optional()
510552
.nullable(),
553+
access_code_inactive: access_code_inactive.optional().nullable(),
511554
ultraloq_access_code_disabled: ultraloq_access_code_disabled
512555
.optional()
513556
.nullable(),

src/lib/seam/connect/openapi.ts

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,38 @@ const openapi: OpenAPISpec = {
330330
type: 'object',
331331
},
332332
{
333+
description:
334+
'Indicates that the provider cannot confirm whether the access code was set or removed on the device.',
335+
properties: {
336+
created_at: {
337+
description:
338+
'Date and time at which Seam created the error.',
339+
format: 'date-time',
340+
type: 'string',
341+
},
342+
error_code: {
343+
description:
344+
'Unique identifier of the type of error. Enables quick recognition and categorization of the issue.',
345+
enum: ['access_code_state_unconfirmed'],
346+
type: 'string',
347+
},
348+
is_access_code_error: {
349+
description:
350+
'Indicates that this is an access code error.',
351+
enum: [true],
352+
type: 'boolean',
353+
},
354+
message: {
355+
description:
356+
'Detailed description of the error. Provides insights into the issue and potentially how to rectify it.',
357+
type: 'string',
358+
},
359+
},
360+
required: ['message', 'is_access_code_error', 'error_code'],
361+
type: 'object',
362+
},
363+
{
364+
deprecated: true,
333365
description:
334366
'Unable to confirm that the access code is set on Kwikset device.',
335367
properties: {
@@ -359,8 +391,11 @@ const openapi: OpenAPISpec = {
359391
},
360392
required: ['message', 'is_access_code_error', 'error_code'],
361393
type: 'object',
394+
'x-deprecated':
395+
'Use `access_code_state_unconfirmed` instead.',
362396
},
363397
{
398+
deprecated: true,
364399
description:
365400
'Unable to confirm the deletion of the access code on Kwikset device.',
366401
properties: {
@@ -390,6 +425,8 @@ const openapi: OpenAPISpec = {
390425
},
391426
required: ['message', 'is_access_code_error', 'error_code'],
392427
type: 'object',
428+
'x-deprecated':
429+
'Use `access_code_state_unconfirmed` instead.',
393430
},
394431
{
395432
description:
@@ -1948,6 +1985,32 @@ const openapi: OpenAPISpec = {
19481985
type: 'object',
19491986
},
19501987
{
1988+
description:
1989+
'Indicates that the access code is disabled or inactive on the device. The code exists but will not grant access until re-enabled.',
1990+
properties: {
1991+
created_at: {
1992+
description:
1993+
'Date and time at which Seam created the warning.',
1994+
format: 'date-time',
1995+
type: 'string',
1996+
},
1997+
message: {
1998+
description:
1999+
'Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.',
2000+
type: 'string',
2001+
},
2002+
warning_code: {
2003+
description:
2004+
'Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.',
2005+
enum: ['access_code_inactive'],
2006+
type: 'string',
2007+
},
2008+
},
2009+
required: ['message', 'warning_code'],
2010+
type: 'object',
2011+
},
2012+
{
2013+
deprecated: true,
19512014
description:
19522015
'Access code is disabled on Ultraloq device. Re-enable through the Ultraloq mobile app.',
19532016
properties: {
@@ -1971,6 +2034,7 @@ const openapi: OpenAPISpec = {
19712034
},
19722035
required: ['message', 'warning_code'],
19732036
type: 'object',
2037+
'x-deprecated': 'Use `access_code_inactive` instead.',
19742038
},
19752039
{
19762040
description:
@@ -27575,6 +27639,38 @@ const openapi: OpenAPISpec = {
2757527639
type: 'object',
2757627640
},
2757727641
{
27642+
description:
27643+
'Indicates that the provider cannot confirm whether the access code was set or removed on the device.',
27644+
properties: {
27645+
created_at: {
27646+
description:
27647+
'Date and time at which Seam created the error.',
27648+
format: 'date-time',
27649+
type: 'string',
27650+
},
27651+
error_code: {
27652+
description:
27653+
'Unique identifier of the type of error. Enables quick recognition and categorization of the issue.',
27654+
enum: ['access_code_state_unconfirmed'],
27655+
type: 'string',
27656+
},
27657+
is_access_code_error: {
27658+
description:
27659+
'Indicates that this is an access code error.',
27660+
enum: [true],
27661+
type: 'boolean',
27662+
},
27663+
message: {
27664+
description:
27665+
'Detailed description of the error. Provides insights into the issue and potentially how to rectify it.',
27666+
type: 'string',
27667+
},
27668+
},
27669+
required: ['message', 'is_access_code_error', 'error_code'],
27670+
type: 'object',
27671+
},
27672+
{
27673+
deprecated: true,
2757827674
description:
2757927675
'Unable to confirm that the access code is set on Kwikset device.',
2758027676
properties: {
@@ -27604,8 +27700,11 @@ const openapi: OpenAPISpec = {
2760427700
},
2760527701
required: ['message', 'is_access_code_error', 'error_code'],
2760627702
type: 'object',
27703+
'x-deprecated':
27704+
'Use `access_code_state_unconfirmed` instead.',
2760727705
},
2760827706
{
27707+
deprecated: true,
2760927708
description:
2761027709
'Unable to confirm the deletion of the access code on Kwikset device.',
2761127710
properties: {
@@ -27635,6 +27734,8 @@ const openapi: OpenAPISpec = {
2763527734
},
2763627735
required: ['message', 'is_access_code_error', 'error_code'],
2763727736
type: 'object',
27737+
'x-deprecated':
27738+
'Use `access_code_state_unconfirmed` instead.',
2763827739
},
2763927740
{
2764027741
description:
@@ -28882,6 +28983,32 @@ const openapi: OpenAPISpec = {
2888228983
type: 'object',
2888328984
},
2888428985
{
28986+
description:
28987+
'Indicates that the access code is disabled or inactive on the device. The code exists but will not grant access until re-enabled.',
28988+
properties: {
28989+
created_at: {
28990+
description:
28991+
'Date and time at which Seam created the warning.',
28992+
format: 'date-time',
28993+
type: 'string',
28994+
},
28995+
message: {
28996+
description:
28997+
'Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.',
28998+
type: 'string',
28999+
},
29000+
warning_code: {
29001+
description:
29002+
'Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.',
29003+
enum: ['access_code_inactive'],
29004+
type: 'string',
29005+
},
29006+
},
29007+
required: ['message', 'warning_code'],
29008+
type: 'object',
29009+
},
29010+
{
29011+
deprecated: true,
2888529012
description:
2888629013
'Access code is disabled on Ultraloq device. Re-enable through the Ultraloq mobile app.',
2888729014
properties: {
@@ -28905,6 +29032,7 @@ const openapi: OpenAPISpec = {
2890529032
},
2890629033
required: ['message', 'warning_code'],
2890729034
type: 'object',
29035+
'x-deprecated': 'Use `access_code_inactive` instead.',
2890829036
},
2890929037
{
2891029038
description:

0 commit comments

Comments
 (0)