@seamapi/types 1.871.0 → 1.873.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seamapi/types",
3
- "version": "1.871.0",
3
+ "version": "1.873.0",
4
4
  "description": "TypeScript types for the Seam API.",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -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('Failed to set code on SmartThings device.')
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,7 +52,14 @@ 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('Failed to set code after multiple retries.')
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
+ )
41
63
 
42
64
  const modified_field = z.object({
43
65
  field: z
@@ -172,7 +194,12 @@ const kwikset_insufficient_permissions = common_access_code_error
172
194
  .describe(error_code_description),
173
195
  })
174
196
  .describe(
175
- '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.',
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
+ `,
176
203
  )
177
204
 
178
205
  const august_lock_invalid_code_length = common_access_code_error
@@ -181,7 +208,14 @@ const august_lock_invalid_code_length = common_access_code_error
181
208
  .literal('august_lock_invalid_code_length')
182
209
  .describe(error_code_description),
183
210
  })
184
- .describe('Invalid code length for August lock.')
211
+ .describe(
212
+ `
213
+ ---
214
+ deprecated: Use \`provider_issue\` instead.
215
+ ---
216
+ Invalid code length for August lock.
217
+ `,
218
+ )
185
219
 
186
220
  const august_lock_temporarily_offline_error = common_access_code_error
187
221
  .extend({
@@ -189,7 +223,14 @@ const august_lock_temporarily_offline_error = common_access_code_error
189
223
  .literal('august_lock_temporarily_offline')
190
224
  .describe(error_code_description),
191
225
  })
192
- .describe('August lock is temporarily offline.')
226
+ .describe(
227
+ `
228
+ ---
229
+ deprecated: Use \`provider_issue\` instead.
230
+ ---
231
+ August lock is temporarily offline.
232
+ `,
233
+ )
193
234
 
194
235
  const august_lock_missing_keypad = common_access_code_error
195
236
  .extend({
@@ -197,7 +238,24 @@ const august_lock_missing_keypad = common_access_code_error
197
238
  .literal('august_lock_missing_keypad')
198
239
  .describe(error_code_description),
199
240
  })
200
- .describe('August lock is missing a keypad.')
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
+ )
201
259
 
202
260
  const salto_ks_user_not_subscribed = common_access_code_error
203
261
  .extend({
@@ -205,7 +263,14 @@ const salto_ks_user_not_subscribed = common_access_code_error
205
263
  .literal('salto_ks_user_not_subscribed')
206
264
  .describe(error_code_description),
207
265
  })
208
- .describe('Salto site user is not subscribed.')
266
+ .describe(
267
+ `
268
+ ---
269
+ deprecated: Use \`access_code_inactive\` instead.
270
+ ---
271
+ Salto site user is not subscribed.
272
+ `,
273
+ )
209
274
 
210
275
  const wyze_duplicate_code_name = common_access_code_error
211
276
  .extend({
@@ -244,7 +309,12 @@ const dormakaba_oracode_invalid_time_range = common_access_code_error
244
309
  .describe(error_code_description),
245
310
  })
246
311
  .describe(
247
- 'No Dormakaba Oracode user levels configured for the requested time range.',
312
+ `
313
+ ---
314
+ deprecated: Use \`provider_issue\` instead.
315
+ ---
316
+ No Dormakaba Oracode user levels configured for the requested time range.
317
+ `,
248
318
  )
249
319
 
250
320
  const keynest_unsupported_third_party_locker = common_access_code_error
@@ -253,7 +323,14 @@ const keynest_unsupported_third_party_locker = common_access_code_error
253
323
  .literal('keynest_unsupported_third_party_locker')
254
324
  .describe(error_code_description),
255
325
  })
256
- .describe('KeyNest locker is not supported.')
326
+ .describe(
327
+ `
328
+ ---
329
+ deprecated: Use \`provider_issue\` instead.
330
+ ---
331
+ KeyNest locker is not supported.
332
+ `,
333
+ )
257
334
 
258
335
  const replaced_by_newer_access_code = common_access_code_error
259
336
  .extend({
@@ -267,6 +344,7 @@ const replaced_by_newer_access_code = common_access_code_error
267
344
 
268
345
  const access_code_error = z
269
346
  .discriminatedUnion('error_code', [
347
+ provider_issue,
270
348
  smartthings_failed_to_set_access_code_error,
271
349
  smartthings_failed_to_set_after_multiple_retries,
272
350
  failed_to_set_on_device,
@@ -282,6 +360,7 @@ const access_code_error = z
282
360
  august_lock_invalid_code_length,
283
361
  august_lock_missing_keypad,
284
362
  august_lock_temporarily_offline_error,
363
+ access_code_inactive_error,
285
364
  salto_ks_user_not_subscribed,
286
365
  wyze_duplicate_code_name,
287
366
  wyze_potential_duplicate_code,
@@ -297,6 +376,7 @@ const access_code_error = z
297
376
  export type AccessCodeError = z.infer<typeof access_code_error>
298
377
 
299
378
  const _access_code_error_map = z.object({
379
+ provider_issue: provider_issue.optional().nullable(),
300
380
  smartthings_failed_to_set_access_code:
301
381
  smartthings_failed_to_set_access_code_error.optional().nullable(),
302
382
  smartthings_failed_to_set_after_multiple_retries:
@@ -334,6 +414,7 @@ const _access_code_error_map = z.object({
334
414
  .optional()
335
415
  .nullable(),
336
416
  august_lock_missing_keypad: august_lock_missing_keypad.optional().nullable(),
417
+ access_code_inactive: access_code_inactive_error.optional().nullable(),
337
418
  salto_ks_user_not_subscribed: salto_ks_user_not_subscribed
338
419
  .optional()
339
420
  .nullable(),
@@ -423,13 +504,30 @@ const schlage_detected_duplicate = common_access_code_warning
423
504
  `,
424
505
  )
425
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
+
426
517
  const schlage_creation_outage = common_access_code_warning
427
518
  .extend({
428
519
  warning_code: z
429
520
  .literal('schlage_creation_outage')
430
521
  .describe(warning_code_description),
431
522
  })
432
- .describe('Received an error when attempting to create this code.')
523
+ .describe(
524
+ `
525
+ ---
526
+ deprecated: Use \`provider_issue\` instead.
527
+ ---
528
+ Received an error when attempting to create this code.
529
+ `,
530
+ )
433
531
 
434
532
  const schlage_access_code_ambiguous_timezone_dst_risk =
435
533
  common_access_code_warning
@@ -535,6 +633,7 @@ const being_deleted = common_access_code_warning
535
633
 
536
634
  const access_code_warning = z
537
635
  .discriminatedUnion('warning_code', [
636
+ provider_issue_warning,
538
637
  smartthings_failed_to_set_access_code_warning,
539
638
  schlage_detected_duplicate,
540
639
  schlage_creation_outage,
@@ -559,6 +658,7 @@ const access_code_warning = z
559
658
  export type AccessCodeWarning = z.infer<typeof access_code_warning>
560
659
 
561
660
  const _access_code_warning_map = z.object({
661
+ provider_issue: provider_issue_warning.optional().nullable(),
562
662
  smartthings_failed_to_set_access_code:
563
663
  smartthings_failed_to_set_access_code_warning.optional().nullable(),
564
664
  schlage_detected_duplicate: schlage_detected_duplicate.optional().nullable(),
@@ -59,11 +59,22 @@ const entrance_setup_required = common_acs_entrance_warning
59
59
  'Indicates that this entrance requires additional configuration in the access control system before Seam can fully manage it.',
60
60
  )
61
61
 
62
+ const salto_ks_privacy_mode = common_acs_entrance_warning
63
+ .extend({
64
+ warning_code: z
65
+ .literal('salto_ks_privacy_mode')
66
+ .describe(warning_code_description),
67
+ })
68
+ .describe(
69
+ 'Indicates that this entrance is in privacy mode. When privacy mode is enabled, access codes, mobile keys, and remote unlocks will not work unless the user has admin access.',
70
+ )
71
+
62
72
  const acs_entrance_warning = z
63
73
  .discriminatedUnion('warning_code', [
64
74
  salto_ks_entrance_access_code_support_removed,
65
75
  entrance_shares_zone,
66
76
  entrance_setup_required,
77
+ salto_ks_privacy_mode,
67
78
  ])
68
79
  .describe(
69
80
  'Warning associated with the [entrance](https://docs.seam.co/latest/capability-guides/access-systems/retrieving-entrance-details).',
@@ -74,6 +85,7 @@ const _acs_entrance_warning_map = z.object({
74
85
  salto_ks_entrance_access_code_support_removed.optional().nullable(),
75
86
  entrance_shares_zone: entrance_shares_zone.optional().nullable(),
76
87
  entrance_setup_required: entrance_setup_required.optional().nullable(),
88
+ salto_ks_privacy_mode: salto_ks_privacy_mode.optional().nullable(),
77
89
  })
78
90
 
79
91
  export type AcsEntranceWarningMap = z.infer<typeof _acs_entrance_warning_map>
@@ -218,6 +230,12 @@ export const acs_entrance = z
218
230
  .describe(
219
231
  'Avigilon Alta-specific metadata associated with the [entrance](https://docs.seam.co/latest/capability-guides/access-systems/retrieving-entrance-details).',
220
232
  ),
233
+ is_locked: z
234
+ .boolean()
235
+ .optional()
236
+ .describe(
237
+ 'Indicates whether the [entrance](https://docs.seam.co/latest/capability-guides/access-systems/retrieving-entrance-details) is currently locked.',
238
+ ),
221
239
  })
222
240
  .merge(acs_entrance_capability_flags).describe(`
223
241
  ---