@seamapi/types 1.870.0 → 1.872.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/connect.cjs +438 -30
- package/dist/connect.cjs.map +1 -1
- package/dist/connect.d.cts +1314 -0
- package/dist/index.cjs +438 -30
- package/dist/index.cjs.map +1 -1
- package/lib/seam/connect/models/access-codes/managed-access-code.d.ts +414 -10
- package/lib/seam/connect/models/access-codes/managed-access-code.js +108 -10
- package/lib/seam/connect/models/access-codes/managed-access-code.js.map +1 -1
- package/lib/seam/connect/models/access-codes/unmanaged-access-code.d.ts +149 -0
- package/lib/seam/connect/models/batch.d.ts +402 -0
- package/lib/seam/connect/openapi.js +302 -0
- package/lib/seam/connect/openapi.js.map +1 -1
- package/lib/seam/connect/route-types.d.ts +517 -0
- package/package.json +1 -1
- package/src/lib/seam/connect/models/access-codes/managed-access-code.ts +144 -10
- package/src/lib/seam/connect/openapi.ts +346 -0
- package/src/lib/seam/connect/route-types.ts +594 -0
package/package.json
CHANGED
|
@@ -22,13 +22,28 @@ const common_access_code_error = z.object({
|
|
|
22
22
|
const error_code_description =
|
|
23
23
|
'Unique identifier of the type of error. Enables quick recognition and categorization of the issue.'
|
|
24
24
|
|
|
25
|
+
const provider_issue = common_access_code_error
|
|
26
|
+
.extend({
|
|
27
|
+
error_code: z.literal('provider_issue').describe(error_code_description),
|
|
28
|
+
})
|
|
29
|
+
.describe(
|
|
30
|
+
'Indicates a provider-specific issue that prevents the access code from being set or managed. Check the error message for details.',
|
|
31
|
+
)
|
|
32
|
+
|
|
25
33
|
const smartthings_failed_to_set_access_code_error = common_access_code_error
|
|
26
34
|
.extend({
|
|
27
35
|
error_code: z
|
|
28
36
|
.literal('smartthings_failed_to_set_access_code')
|
|
29
37
|
.describe(error_code_description),
|
|
30
38
|
})
|
|
31
|
-
.describe(
|
|
39
|
+
.describe(
|
|
40
|
+
`
|
|
41
|
+
---
|
|
42
|
+
deprecated: Handled by the generic \`failed_to_set_on_device\` system.
|
|
43
|
+
---
|
|
44
|
+
Failed to set code on SmartThings device.
|
|
45
|
+
`,
|
|
46
|
+
)
|
|
32
47
|
|
|
33
48
|
const smartthings_failed_to_set_after_multiple_retries =
|
|
34
49
|
common_access_code_error
|
|
@@ -37,13 +52,42 @@ const smartthings_failed_to_set_after_multiple_retries =
|
|
|
37
52
|
.literal('smartthings_failed_to_set_after_multiple_retries')
|
|
38
53
|
.describe(error_code_description),
|
|
39
54
|
})
|
|
40
|
-
.describe(
|
|
55
|
+
.describe(
|
|
56
|
+
`
|
|
57
|
+
---
|
|
58
|
+
deprecated: Handled by the generic \`failed_to_set_on_device\` system.
|
|
59
|
+
---
|
|
60
|
+
Failed to set code after multiple retries.
|
|
61
|
+
`,
|
|
62
|
+
)
|
|
63
|
+
|
|
64
|
+
const modified_field = z.object({
|
|
65
|
+
field: z
|
|
66
|
+
.string()
|
|
67
|
+
.describe(
|
|
68
|
+
'The name of the field that was changed (e.g. `code`, `starts_at`, `ends_at`).',
|
|
69
|
+
),
|
|
70
|
+
from: z.string().nullable().describe('The previous value of the field.'),
|
|
71
|
+
to: z.string().nullable().describe('The new value of the field.'),
|
|
72
|
+
})
|
|
41
73
|
|
|
42
74
|
const code_modified_external_to_seam_error = common_access_code_error
|
|
43
75
|
.extend({
|
|
44
76
|
error_code: z
|
|
45
77
|
.literal('code_modified_external_to_seam')
|
|
46
78
|
.describe(error_code_description),
|
|
79
|
+
change_type: z
|
|
80
|
+
.enum(['modified', 'removed'])
|
|
81
|
+
.optional()
|
|
82
|
+
.describe(
|
|
83
|
+
"Indicates the type of external modification. `modified` means the code's PIN or schedule was changed. `removed` means the code was deleted from the device.",
|
|
84
|
+
),
|
|
85
|
+
modified_fields: z
|
|
86
|
+
.array(modified_field)
|
|
87
|
+
.optional()
|
|
88
|
+
.describe(
|
|
89
|
+
'List of fields that were changed externally, with their previous and new values.',
|
|
90
|
+
),
|
|
47
91
|
})
|
|
48
92
|
.describe(
|
|
49
93
|
'Code was modified or removed externally after Seam successfully set it on the device.',
|
|
@@ -150,7 +194,12 @@ const kwikset_insufficient_permissions = common_access_code_error
|
|
|
150
194
|
.describe(error_code_description),
|
|
151
195
|
})
|
|
152
196
|
.describe(
|
|
153
|
-
|
|
197
|
+
`
|
|
198
|
+
---
|
|
199
|
+
deprecated: Use \`provider_issue\` instead.
|
|
200
|
+
---
|
|
201
|
+
Admin role required—insufficient permissions to manage PINs on this Kwikset device. Please have a Home Admin update your role in the Kwikset app, or ask them to set the PIN.
|
|
202
|
+
`,
|
|
154
203
|
)
|
|
155
204
|
|
|
156
205
|
const august_lock_invalid_code_length = common_access_code_error
|
|
@@ -159,7 +208,14 @@ const august_lock_invalid_code_length = common_access_code_error
|
|
|
159
208
|
.literal('august_lock_invalid_code_length')
|
|
160
209
|
.describe(error_code_description),
|
|
161
210
|
})
|
|
162
|
-
.describe(
|
|
211
|
+
.describe(
|
|
212
|
+
`
|
|
213
|
+
---
|
|
214
|
+
deprecated: Use \`provider_issue\` instead.
|
|
215
|
+
---
|
|
216
|
+
Invalid code length for August lock.
|
|
217
|
+
`,
|
|
218
|
+
)
|
|
163
219
|
|
|
164
220
|
const august_lock_temporarily_offline_error = common_access_code_error
|
|
165
221
|
.extend({
|
|
@@ -167,7 +223,14 @@ const august_lock_temporarily_offline_error = common_access_code_error
|
|
|
167
223
|
.literal('august_lock_temporarily_offline')
|
|
168
224
|
.describe(error_code_description),
|
|
169
225
|
})
|
|
170
|
-
.describe(
|
|
226
|
+
.describe(
|
|
227
|
+
`
|
|
228
|
+
---
|
|
229
|
+
deprecated: Use \`provider_issue\` instead.
|
|
230
|
+
---
|
|
231
|
+
August lock is temporarily offline.
|
|
232
|
+
`,
|
|
233
|
+
)
|
|
171
234
|
|
|
172
235
|
const august_lock_missing_keypad = common_access_code_error
|
|
173
236
|
.extend({
|
|
@@ -175,7 +238,24 @@ const august_lock_missing_keypad = common_access_code_error
|
|
|
175
238
|
.literal('august_lock_missing_keypad')
|
|
176
239
|
.describe(error_code_description),
|
|
177
240
|
})
|
|
178
|
-
.describe(
|
|
241
|
+
.describe(
|
|
242
|
+
`
|
|
243
|
+
---
|
|
244
|
+
deprecated: Use \`provider_issue\` instead.
|
|
245
|
+
---
|
|
246
|
+
August lock is missing a keypad.
|
|
247
|
+
`,
|
|
248
|
+
)
|
|
249
|
+
|
|
250
|
+
const access_code_inactive_error = common_access_code_error
|
|
251
|
+
.extend({
|
|
252
|
+
error_code: z
|
|
253
|
+
.literal('access_code_inactive')
|
|
254
|
+
.describe(error_code_description),
|
|
255
|
+
})
|
|
256
|
+
.describe(
|
|
257
|
+
'Indicates that the access code is disabled or inactive on the device. The code exists but will not grant access until re-enabled.',
|
|
258
|
+
)
|
|
179
259
|
|
|
180
260
|
const salto_ks_user_not_subscribed = common_access_code_error
|
|
181
261
|
.extend({
|
|
@@ -183,7 +263,14 @@ const salto_ks_user_not_subscribed = common_access_code_error
|
|
|
183
263
|
.literal('salto_ks_user_not_subscribed')
|
|
184
264
|
.describe(error_code_description),
|
|
185
265
|
})
|
|
186
|
-
.describe(
|
|
266
|
+
.describe(
|
|
267
|
+
`
|
|
268
|
+
---
|
|
269
|
+
deprecated: Use \`access_code_inactive\` instead.
|
|
270
|
+
---
|
|
271
|
+
Salto site user is not subscribed.
|
|
272
|
+
`,
|
|
273
|
+
)
|
|
187
274
|
|
|
188
275
|
const wyze_duplicate_code_name = common_access_code_error
|
|
189
276
|
.extend({
|
|
@@ -222,7 +309,12 @@ const dormakaba_oracode_invalid_time_range = common_access_code_error
|
|
|
222
309
|
.describe(error_code_description),
|
|
223
310
|
})
|
|
224
311
|
.describe(
|
|
225
|
-
|
|
312
|
+
`
|
|
313
|
+
---
|
|
314
|
+
deprecated: Use \`provider_issue\` instead.
|
|
315
|
+
---
|
|
316
|
+
No Dormakaba Oracode user levels configured for the requested time range.
|
|
317
|
+
`,
|
|
226
318
|
)
|
|
227
319
|
|
|
228
320
|
const keynest_unsupported_third_party_locker = common_access_code_error
|
|
@@ -231,7 +323,14 @@ const keynest_unsupported_third_party_locker = common_access_code_error
|
|
|
231
323
|
.literal('keynest_unsupported_third_party_locker')
|
|
232
324
|
.describe(error_code_description),
|
|
233
325
|
})
|
|
234
|
-
.describe(
|
|
326
|
+
.describe(
|
|
327
|
+
`
|
|
328
|
+
---
|
|
329
|
+
deprecated: Use \`provider_issue\` instead.
|
|
330
|
+
---
|
|
331
|
+
KeyNest locker is not supported.
|
|
332
|
+
`,
|
|
333
|
+
)
|
|
235
334
|
|
|
236
335
|
const replaced_by_newer_access_code = common_access_code_error
|
|
237
336
|
.extend({
|
|
@@ -245,6 +344,7 @@ const replaced_by_newer_access_code = common_access_code_error
|
|
|
245
344
|
|
|
246
345
|
const access_code_error = z
|
|
247
346
|
.discriminatedUnion('error_code', [
|
|
347
|
+
provider_issue,
|
|
248
348
|
smartthings_failed_to_set_access_code_error,
|
|
249
349
|
smartthings_failed_to_set_after_multiple_retries,
|
|
250
350
|
failed_to_set_on_device,
|
|
@@ -260,6 +360,7 @@ const access_code_error = z
|
|
|
260
360
|
august_lock_invalid_code_length,
|
|
261
361
|
august_lock_missing_keypad,
|
|
262
362
|
august_lock_temporarily_offline_error,
|
|
363
|
+
access_code_inactive_error,
|
|
263
364
|
salto_ks_user_not_subscribed,
|
|
264
365
|
wyze_duplicate_code_name,
|
|
265
366
|
wyze_potential_duplicate_code,
|
|
@@ -275,6 +376,7 @@ const access_code_error = z
|
|
|
275
376
|
export type AccessCodeError = z.infer<typeof access_code_error>
|
|
276
377
|
|
|
277
378
|
const _access_code_error_map = z.object({
|
|
379
|
+
provider_issue: provider_issue.optional().nullable(),
|
|
278
380
|
smartthings_failed_to_set_access_code:
|
|
279
381
|
smartthings_failed_to_set_access_code_error.optional().nullable(),
|
|
280
382
|
smartthings_failed_to_set_after_multiple_retries:
|
|
@@ -312,6 +414,7 @@ const _access_code_error_map = z.object({
|
|
|
312
414
|
.optional()
|
|
313
415
|
.nullable(),
|
|
314
416
|
august_lock_missing_keypad: august_lock_missing_keypad.optional().nullable(),
|
|
417
|
+
access_code_inactive: access_code_inactive_error.optional().nullable(),
|
|
315
418
|
salto_ks_user_not_subscribed: salto_ks_user_not_subscribed
|
|
316
419
|
.optional()
|
|
317
420
|
.nullable(),
|
|
@@ -369,6 +472,18 @@ const code_modified_external_to_seam_warning = common_access_code_warning
|
|
|
369
472
|
warning_code: z
|
|
370
473
|
.literal('code_modified_external_to_seam')
|
|
371
474
|
.describe(warning_code_description),
|
|
475
|
+
change_type: z
|
|
476
|
+
.enum(['modified', 'removed'])
|
|
477
|
+
.optional()
|
|
478
|
+
.describe(
|
|
479
|
+
"Indicates the type of external modification. `modified` means the code's PIN or schedule was changed. `removed` means the code was deleted from the device.",
|
|
480
|
+
),
|
|
481
|
+
modified_fields: z
|
|
482
|
+
.array(modified_field)
|
|
483
|
+
.optional()
|
|
484
|
+
.describe(
|
|
485
|
+
'List of fields that were changed externally, with their previous and new values.',
|
|
486
|
+
),
|
|
372
487
|
})
|
|
373
488
|
.describe(
|
|
374
489
|
'Code was modified or removed externally after Seam successfully set it on the device.',
|
|
@@ -389,13 +504,30 @@ const schlage_detected_duplicate = common_access_code_warning
|
|
|
389
504
|
`,
|
|
390
505
|
)
|
|
391
506
|
|
|
507
|
+
const provider_issue_warning = common_access_code_warning
|
|
508
|
+
.extend({
|
|
509
|
+
warning_code: z
|
|
510
|
+
.literal('provider_issue')
|
|
511
|
+
.describe(warning_code_description),
|
|
512
|
+
})
|
|
513
|
+
.describe(
|
|
514
|
+
'Indicates a provider-specific issue that may affect the access code. Check the warning message for details.',
|
|
515
|
+
)
|
|
516
|
+
|
|
392
517
|
const schlage_creation_outage = common_access_code_warning
|
|
393
518
|
.extend({
|
|
394
519
|
warning_code: z
|
|
395
520
|
.literal('schlage_creation_outage')
|
|
396
521
|
.describe(warning_code_description),
|
|
397
522
|
})
|
|
398
|
-
.describe(
|
|
523
|
+
.describe(
|
|
524
|
+
`
|
|
525
|
+
---
|
|
526
|
+
deprecated: Use \`provider_issue\` instead.
|
|
527
|
+
---
|
|
528
|
+
Received an error when attempting to create this code.
|
|
529
|
+
`,
|
|
530
|
+
)
|
|
399
531
|
|
|
400
532
|
const schlage_access_code_ambiguous_timezone_dst_risk =
|
|
401
533
|
common_access_code_warning
|
|
@@ -501,6 +633,7 @@ const being_deleted = common_access_code_warning
|
|
|
501
633
|
|
|
502
634
|
const access_code_warning = z
|
|
503
635
|
.discriminatedUnion('warning_code', [
|
|
636
|
+
provider_issue_warning,
|
|
504
637
|
smartthings_failed_to_set_access_code_warning,
|
|
505
638
|
schlage_detected_duplicate,
|
|
506
639
|
schlage_creation_outage,
|
|
@@ -525,6 +658,7 @@ const access_code_warning = z
|
|
|
525
658
|
export type AccessCodeWarning = z.infer<typeof access_code_warning>
|
|
526
659
|
|
|
527
660
|
const _access_code_warning_map = z.object({
|
|
661
|
+
provider_issue: provider_issue_warning.optional().nullable(),
|
|
528
662
|
smartthings_failed_to_set_access_code:
|
|
529
663
|
smartthings_failed_to_set_access_code_warning.optional().nullable(),
|
|
530
664
|
schlage_detected_duplicate: schlage_detected_duplicate.optional().nullable(),
|