@seamapi/types 1.362.0 → 1.363.1

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.362.0",
3
+ "version": "1.363.1",
4
4
  "description": "TypeScript types for the Seam API.",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -5,6 +5,7 @@ import { device_and_connected_account_error_options } from '../devices/index.js'
5
5
  const common_access_code_error = z.object({
6
6
  message: z.string(),
7
7
  is_access_code_error: z.literal(true),
8
+ created_at: z.string().datetime().optional(),
8
9
  })
9
10
 
10
11
  const error_code_description =
@@ -192,8 +193,58 @@ const access_code_error = z.discriminatedUnion('error_code', [
192
193
 
193
194
  export type AccessCodeError = z.infer<typeof access_code_error>
194
195
 
196
+ const access_code_error_map = z.object({
197
+ smartthings_failed_to_set_access_code_error:
198
+ smartthings_failed_to_set_access_code_error.optional().nullable(),
199
+ smartthings_failed_to_set_after_multiple_retries:
200
+ smartthings_failed_to_set_after_multiple_retries.optional().nullable(),
201
+ failed_to_set_on_device: failed_to_set_on_device.optional().nullable(),
202
+ failed_to_remove_from_device: failed_to_remove_from_device
203
+ .optional()
204
+ .nullable(),
205
+ duplicate_code_on_device: duplicate_code_on_device.optional().nullable(),
206
+ duplicate_code_attempt_prevented: duplicate_code_attempt_prevented
207
+ .optional()
208
+ .nullable(),
209
+ igloohome_bridge_too_many_pending_jobs: igloohome_bridge_too_many_pending_jobs
210
+ .optional()
211
+ .nullable(),
212
+ igloohome_bridge_offline: igloohome_bridge_offline.optional().nullable(),
213
+ igloohome_offline_access_code_no_variance_available:
214
+ igloohome_offline_access_code_no_variance_available.optional().nullable(),
215
+ kwikset_unable_to_confirm_code: kwikset_unable_to_confirm_code
216
+ .optional()
217
+ .nullable(),
218
+ kwikset_unable_to_confirm_deletion: kwikset_unable_to_confirm_deletion
219
+ .optional()
220
+ .nullable(),
221
+ code_modified_external_to_seam_error: code_modified_external_to_seam_error
222
+ .optional()
223
+ .nullable(),
224
+ august_lock_invalid_code_length: august_lock_invalid_code_length
225
+ .optional()
226
+ .nullable(),
227
+ august_device_programming_delay_error: august_device_programming_delay_error
228
+ .optional()
229
+ .nullable(),
230
+ august_device_slots_full: august_device_slots_full.optional().nullable(),
231
+ august_lock_missing_keypad: august_lock_missing_keypad.optional().nullable(),
232
+ salto_site_user_not_subscribed: salto_site_user_not_subscribed
233
+ .optional()
234
+ .nullable(),
235
+ hubitat_device_programming_delay: hubitat_device_programming_delay
236
+ .optional()
237
+ .nullable(),
238
+ hubitat_no_free_positions_available: hubitat_no_free_positions_available
239
+ .optional()
240
+ .nullable(),
241
+ })
242
+
243
+ export type AccessCodeErrorMap = z.infer<typeof access_code_error_map>
244
+
195
245
  const common_access_code_warning = z.object({
196
246
  message: z.string(),
247
+ created_at: z.string().datetime().optional(),
197
248
  })
198
249
 
199
250
  const warning_code_description =
@@ -316,6 +367,34 @@ const access_code_warning = z.discriminatedUnion('warning_code', [
316
367
 
317
368
  export type AccessCodeWarning = z.infer<typeof access_code_warning>
318
369
 
370
+ const access_code_warning_map = z.object({
371
+ smartthings_failed_to_set_access_code_warning:
372
+ smartthings_failed_to_set_access_code_warning.optional().nullable(),
373
+ schlage_detected_duplicate: schlage_detected_duplicate.optional().nullable(),
374
+ schlage_creation_outage: schlage_creation_outage.optional().nullable(),
375
+ salto_office_mode: salto_office_mode.optional().nullable(),
376
+ code_modified_external_to_seam_warning: code_modified_external_to_seam_warning
377
+ .optional()
378
+ .nullable(),
379
+ delay_in_setting_on_device: delay_in_setting_on_device.optional().nullable(),
380
+ delay_in_removing_from_device: delay_in_removing_from_device
381
+ .optional()
382
+ .nullable(),
383
+ third_party_integration_detected: third_party_integration_detected
384
+ .optional()
385
+ .nullable(),
386
+ august_device_programming_delay_warning:
387
+ august_device_programming_delay_warning.optional().nullable(),
388
+ igloo_algopin_must_be_used_within_24_hours:
389
+ igloo_algopin_must_be_used_within_24_hours.optional().nullable(),
390
+ management_transferred: management_transferred.optional().nullable(),
391
+ kwikset_unable_to_confirm_code_warning: kwikset_unable_to_confirm_code_warning
392
+ .optional()
393
+ .nullable(),
394
+ })
395
+
396
+ export type AccessCodeWarningMap = z.infer<typeof access_code_warning_map>
397
+
319
398
  export const access_code = z.object({
320
399
  common_code_key: z
321
400
  .string()
@@ -0,0 +1,36 @@
1
+ import { z } from 'zod'
2
+
3
+ import { common_acs_event } from './common.js'
4
+
5
+ const acs_entrance_event = common_acs_event
6
+ .extend({
7
+ acs_entrance_id: z.string().uuid(),
8
+ })
9
+ .describe(
10
+ 'ID of the [ACS entrance](https://docs.seam.co/latest/capability-guides/retrieving-entrance-details).',
11
+ )
12
+
13
+ export const acs_entrance_added_event = acs_entrance_event.extend({
14
+ event_type: z.literal('acs_entrance.added'),
15
+ }).describe(`
16
+ ---
17
+ route_path: /acs/entrances
18
+ ---
19
+ An [ACS entrance](https://docs.seam.co/latest/capability-guides/retrieving-entrance-details) was added.
20
+ `)
21
+
22
+ export const acs_entrance_removed_event = acs_entrance_event.extend({
23
+ event_type: z.literal('acs_entrance.removed'),
24
+ }).describe(`
25
+ ---
26
+ route_path: /acs/entrances
27
+ ---
28
+ An [ACS entrance](https://docs.seam.co/latest/capability-guides/retrieving-entrance-details) was removed.
29
+ `)
30
+
31
+ export type AcsUserDeletedEvent = z.infer<typeof acs_entrance_removed_event>
32
+
33
+ export const acs_entrance_events = [
34
+ acs_entrance_added_event,
35
+ acs_entrance_removed_event,
36
+ ] as const
@@ -1,6 +1,7 @@
1
1
  import { acs_access_group_events } from './access-groups.js'
2
2
  import { acs_credential_events } from './credentials.js'
3
3
  import { acs_encoder_events } from './encoders.js'
4
+ import { acs_entrance_events } from './entrances.js'
4
5
  import { acs_system_events } from './systems.js'
5
6
  import { acs_user_events } from './users.js'
6
7
 
@@ -10,4 +11,5 @@ export const acs_events = [
10
11
  ...acs_user_events,
11
12
  ...acs_encoder_events,
12
13
  ...acs_access_group_events,
14
+ ...acs_entrance_events,
13
15
  ] as const