@seamapi/types 1.724.0 → 1.725.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.
Files changed (127) hide show
  1. package/dist/connect.cjs +8096 -2277
  2. package/dist/connect.cjs.map +1 -1
  3. package/dist/connect.d.cts +21261 -5463
  4. package/dist/index.cjs +8096 -2277
  5. package/dist/index.cjs.map +1 -1
  6. package/lib/seam/connect/models/access-codes/managed-access-code.d.ts +205 -142
  7. package/lib/seam/connect/models/access-codes/managed-access-code.js +57 -22
  8. package/lib/seam/connect/models/access-codes/managed-access-code.js.map +1 -1
  9. package/lib/seam/connect/models/access-codes/unmanaged-access-code.d.ts +95 -52
  10. package/lib/seam/connect/models/access-codes/unmanaged-access-code.js +5 -2
  11. package/lib/seam/connect/models/access-codes/unmanaged-access-code.js.map +1 -1
  12. package/lib/seam/connect/models/access-grants/access-grant.d.ts +721 -12
  13. package/lib/seam/connect/models/access-grants/access-grant.js +75 -1
  14. package/lib/seam/connect/models/access-grants/access-grant.js.map +1 -1
  15. package/lib/seam/connect/models/access-grants/access-method.d.ts +825 -8
  16. package/lib/seam/connect/models/access-grants/access-method.js +123 -1
  17. package/lib/seam/connect/models/access-grants/access-method.js.map +1 -1
  18. package/lib/seam/connect/models/access-grants/index.d.ts +1 -0
  19. package/lib/seam/connect/models/access-grants/index.js +1 -0
  20. package/lib/seam/connect/models/access-grants/index.js.map +1 -1
  21. package/lib/seam/connect/models/access-grants/pending-mutations.d.ts +255 -0
  22. package/lib/seam/connect/models/access-grants/pending-mutations.js +78 -0
  23. package/lib/seam/connect/models/access-grants/pending-mutations.js.map +1 -0
  24. package/lib/seam/connect/models/access-grants/requested-access-method.d.ts +3 -0
  25. package/lib/seam/connect/models/access-grants/requested-access-method.js +6 -0
  26. package/lib/seam/connect/models/access-grants/requested-access-method.js.map +1 -1
  27. package/lib/seam/connect/models/acs/acs-entrance.d.ts +0 -5
  28. package/lib/seam/connect/models/acs/acs-users/acs-user.d.ts +80 -80
  29. package/lib/seam/connect/models/acs/metadata/salto-space.d.ts +0 -3
  30. package/lib/seam/connect/models/acs/metadata/salto-space.js +0 -5
  31. package/lib/seam/connect/models/acs/metadata/salto-space.js.map +1 -1
  32. package/lib/seam/connect/models/action-attempts/action-attempt.d.ts +36 -16
  33. package/lib/seam/connect/models/action-attempts/encode-credential.d.ts +5 -5
  34. package/lib/seam/connect/models/action-attempts/encode-credential.js +5 -5
  35. package/lib/seam/connect/models/action-attempts/encode-credential.js.map +1 -1
  36. package/lib/seam/connect/models/action-attempts/lock-door.d.ts +13 -3
  37. package/lib/seam/connect/models/action-attempts/lock-door.js +8 -1
  38. package/lib/seam/connect/models/action-attempts/lock-door.js.map +1 -1
  39. package/lib/seam/connect/models/action-attempts/scan-credential.d.ts +5 -5
  40. package/lib/seam/connect/models/action-attempts/scan-credential.js +5 -5
  41. package/lib/seam/connect/models/action-attempts/scan-credential.js.map +1 -1
  42. package/lib/seam/connect/models/action-attempts/unlock-door.d.ts +13 -3
  43. package/lib/seam/connect/models/action-attempts/unlock-door.js +8 -1
  44. package/lib/seam/connect/models/action-attempts/unlock-door.js.map +1 -1
  45. package/lib/seam/connect/models/batch.d.ts +3938 -738
  46. package/lib/seam/connect/models/connected-accounts/connected-account.d.ts +58 -0
  47. package/lib/seam/connect/models/connected-accounts/connected-account.js +7 -0
  48. package/lib/seam/connect/models/connected-accounts/connected-account.js.map +1 -1
  49. package/lib/seam/connect/models/customer/access-grant-resources.d.ts +6 -0
  50. package/lib/seam/connect/models/customer/access-grant-resources.js +4 -0
  51. package/lib/seam/connect/models/customer/access-grant-resources.js.map +1 -1
  52. package/lib/seam/connect/models/customer/customer-data.d.ts +5 -0
  53. package/lib/seam/connect/models/customer/customer-portal.d.ts +169 -10
  54. package/lib/seam/connect/models/customer/customer-portal.js +46 -4
  55. package/lib/seam/connect/models/customer/customer-portal.js.map +1 -1
  56. package/lib/seam/connect/models/devices/device-metadata.d.ts +40 -33
  57. package/lib/seam/connect/models/devices/device-metadata.js +25 -8
  58. package/lib/seam/connect/models/devices/device-metadata.js.map +1 -1
  59. package/lib/seam/connect/models/devices/device-provider.d.ts +2 -5
  60. package/lib/seam/connect/models/devices/device-provider.js +2 -3
  61. package/lib/seam/connect/models/devices/device-provider.js.map +1 -1
  62. package/lib/seam/connect/models/devices/device-type.d.ts +0 -2
  63. package/lib/seam/connect/models/devices/device-type.js +0 -2
  64. package/lib/seam/connect/models/devices/device-type.js.map +1 -1
  65. package/lib/seam/connect/models/devices/device.d.ts +196 -45
  66. package/lib/seam/connect/models/devices/device.js +31 -0
  67. package/lib/seam/connect/models/devices/device.js.map +1 -1
  68. package/lib/seam/connect/models/devices/unmanaged-device.d.ts +92 -33
  69. package/lib/seam/connect/models/events/access-codes.d.ts +1390 -0
  70. package/lib/seam/connect/models/events/access-codes.js +41 -11
  71. package/lib/seam/connect/models/events/access-codes.js.map +1 -1
  72. package/lib/seam/connect/models/events/access-methods.d.ts +60 -0
  73. package/lib/seam/connect/models/events/access-methods.js +9 -0
  74. package/lib/seam/connect/models/events/access-methods.js.map +1 -1
  75. package/lib/seam/connect/models/events/acs/index.d.ts +93 -0
  76. package/lib/seam/connect/models/events/acs/systems.d.ts +186 -0
  77. package/lib/seam/connect/models/events/acs/systems.js +19 -2
  78. package/lib/seam/connect/models/events/acs/systems.js.map +1 -1
  79. package/lib/seam/connect/models/events/action-attempts.d.ts +332 -0
  80. package/lib/seam/connect/models/events/action-attempts.js +46 -0
  81. package/lib/seam/connect/models/events/action-attempts.js.map +1 -1
  82. package/lib/seam/connect/models/events/common.d.ts +26 -0
  83. package/lib/seam/connect/models/events/common.js +22 -0
  84. package/lib/seam/connect/models/events/common.js.map +1 -1
  85. package/lib/seam/connect/models/events/connected-accounts.d.ts +140 -272
  86. package/lib/seam/connect/models/events/connected-accounts.js +17 -9
  87. package/lib/seam/connect/models/events/connected-accounts.js.map +1 -1
  88. package/lib/seam/connect/models/events/devices.d.ts +1128 -0
  89. package/lib/seam/connect/models/events/devices.js +39 -11
  90. package/lib/seam/connect/models/events/devices.js.map +1 -1
  91. package/lib/seam/connect/models/events/seam-event.d.ts +1675 -196
  92. package/lib/seam/connect/models/events/spaces.d.ts +12 -12
  93. package/lib/seam/connect/models/phones/phone-session.d.ts +0 -20
  94. package/lib/seam/connect/openapi.d.ts +6483 -2214
  95. package/lib/seam/connect/openapi.js +8921 -3441
  96. package/lib/seam/connect/openapi.js.map +1 -1
  97. package/lib/seam/connect/route-types.d.ts +7194 -1122
  98. package/package.json +1 -1
  99. package/src/lib/seam/connect/internal/model-types.ts +1 -0
  100. package/src/lib/seam/connect/models/access-codes/managed-access-code.ts +76 -24
  101. package/src/lib/seam/connect/models/access-codes/unmanaged-access-code.ts +10 -2
  102. package/src/lib/seam/connect/models/access-grants/access-grant.ts +92 -1
  103. package/src/lib/seam/connect/models/access-grants/access-method.ts +162 -1
  104. package/src/lib/seam/connect/models/access-grants/index.ts +1 -0
  105. package/src/lib/seam/connect/models/access-grants/pending-mutations.ts +101 -0
  106. package/src/lib/seam/connect/models/access-grants/requested-access-method.ts +8 -0
  107. package/src/lib/seam/connect/models/acs/metadata/salto-space.ts +0 -5
  108. package/src/lib/seam/connect/models/action-attempts/encode-credential.ts +5 -5
  109. package/src/lib/seam/connect/models/action-attempts/lock-door.ts +10 -1
  110. package/src/lib/seam/connect/models/action-attempts/scan-credential.ts +5 -5
  111. package/src/lib/seam/connect/models/action-attempts/unlock-door.ts +10 -1
  112. package/src/lib/seam/connect/models/connected-accounts/connected-account.ts +10 -0
  113. package/src/lib/seam/connect/models/customer/access-grant-resources.ts +7 -0
  114. package/src/lib/seam/connect/models/customer/customer-portal.ts +66 -6
  115. package/src/lib/seam/connect/models/devices/device-metadata.ts +35 -9
  116. package/src/lib/seam/connect/models/devices/device-provider.ts +2 -3
  117. package/src/lib/seam/connect/models/devices/device-type.ts +0 -2
  118. package/src/lib/seam/connect/models/devices/device.ts +37 -0
  119. package/src/lib/seam/connect/models/events/access-codes.ts +49 -16
  120. package/src/lib/seam/connect/models/events/access-methods.ts +14 -0
  121. package/src/lib/seam/connect/models/events/acs/systems.ts +21 -3
  122. package/src/lib/seam/connect/models/events/action-attempts.ts +64 -0
  123. package/src/lib/seam/connect/models/events/common.ts +31 -0
  124. package/src/lib/seam/connect/models/events/connected-accounts.ts +23 -11
  125. package/src/lib/seam/connect/models/events/devices.ts +51 -18
  126. package/src/lib/seam/connect/openapi.ts +8973 -2884
  127. package/src/lib/seam/connect/route-types.ts +8104 -1669
@@ -21,7 +21,16 @@ const error = z
21
21
  })
22
22
  .describe('Error associated with the action.')
23
23
 
24
- const result = z.object({}).describe('Result of the action.')
24
+ const result = z
25
+ .object({
26
+ was_confirmed_by_device: z
27
+ .boolean()
28
+ .optional()
29
+ .describe(
30
+ 'Indicates whether the device confirmed that the lock action occurred.',
31
+ ),
32
+ })
33
+ .describe('Result of the action.')
25
34
 
26
35
  export const lock_door_action_attempt = z.discriminatedUnion('status', [
27
36
  common_pending_action_attempt
@@ -31,23 +31,23 @@ const no_credential_on_encoder_error = z
31
31
  })
32
32
  .describe('Error to indicate that there is no credential on the encoder.')
33
33
 
34
- const no_card_on_encoder_error = z
34
+ const encoder_not_online_error = z
35
35
  .object({
36
36
  type: z
37
- .literal('no_card_on_encoder')
38
- .describe('Error type to indicate that there is no card on the encoder.'),
37
+ .literal('encoder_not_online')
38
+ .describe('Error type to indicate that the encoder is not online.'),
39
39
  message: z
40
40
  .string()
41
41
  .describe(
42
42
  'Detailed description of the error. Provides insights into the issue and potentially how to rectify it.',
43
43
  ),
44
44
  })
45
- .describe('Error to indicate that there is no card on the encoder.')
45
+ .describe('Error to indicate that the encoder is not online.')
46
46
 
47
47
  const error = z.union([
48
48
  ...common_action_attempt_errors,
49
49
  no_credential_on_encoder_error,
50
- no_card_on_encoder_error,
50
+ encoder_not_online_error,
51
51
  ])
52
52
 
53
53
  const warning = z
@@ -21,7 +21,16 @@ const error = z
21
21
  })
22
22
  .describe('Error associated with the action.')
23
23
 
24
- const result = z.object({}).describe('Result of the action.')
24
+ const result = z
25
+ .object({
26
+ was_confirmed_by_device: z
27
+ .boolean()
28
+ .optional()
29
+ .describe(
30
+ 'Indicates whether the device confirmed that the unlock action occurred.',
31
+ ),
32
+ })
33
+ .describe('Result of the action.')
25
34
 
26
35
  export const unlock_door_action_attempt = z.discriminatedUnion('status', [
27
36
  common_pending_action_attempt
@@ -222,12 +222,21 @@ const account_reauthorization_requested = common_connected_account_warning
222
222
  'Indicates that the Connected Account requires reauthorization using a new Connect Webview. The account is still connected, but cannot access new features. Delaying reauthorization too long will eventually cause the Connected Account to become disconnected.',
223
223
  )
224
224
 
225
+ const being_deleted = common_connected_account_warning
226
+ .extend({
227
+ warning_code: z.literal('being_deleted').describe(warning_code_description),
228
+ })
229
+ .describe(
230
+ 'Indicates that the connected account is currently being deleted. All devices, access codes, and other resources associated with this account are in the process of being removed from Seam.',
231
+ )
232
+
225
233
  const connected_account_warning = z
226
234
  .discriminatedUnion('warning_code', [
227
235
  scheduled_maintenance_window,
228
236
  unknown_issue_with_connected_account,
229
237
  salto_ks_subscription_limit_almost_reached,
230
238
  account_reauthorization_requested,
239
+ being_deleted,
231
240
  ])
232
241
  .describe('Warning associated with the connected account.')
233
242
 
@@ -243,6 +252,7 @@ const _connected_account_warning_map = z.object({
243
252
  account_reauthorization_requested: account_reauthorization_requested
244
253
  .nullable()
245
254
  .optional(),
255
+ being_deleted: being_deleted.nullable().optional(),
246
256
  })
247
257
 
248
258
  export type ConnectedAccountWarningMap = z.infer<
@@ -1,5 +1,7 @@
1
1
  import { z } from 'zod'
2
2
 
3
+ import { custom_metadata_input } from '../custom-metadata.js'
4
+
3
5
  // Base access grant resource with common fields
4
6
  const base_access_grant_resource = z.object({
5
7
  name: z
@@ -96,6 +98,11 @@ export const reservation_resource = base_access_grant_resource
96
98
  message: 'Must not have leading or trailing whitespace',
97
99
  })
98
100
  .describe('Your unique identifier for the reservation.'),
101
+ custom_metadata: custom_metadata_input
102
+ .optional()
103
+ .describe(
104
+ 'Set key:value pairs for filtering reservations by custom criteria.',
105
+ ),
99
106
  })
100
107
  .merge(user_identity_reference)
101
108
  .merge(location_references)
@@ -1,6 +1,5 @@
1
1
  import { z } from 'zod'
2
2
 
3
- import type { CustomMetadata } from '../custom-metadata.js'
4
3
  import { access_grant_key_aliases } from './access-grant-resources.js'
5
4
  import { location_key_aliases } from './location-resources.js'
6
5
 
@@ -40,6 +39,23 @@ const base_manage_feature = base_feature.extend({
40
39
  .describe(
41
40
  'Indicates whether the customer can manage staff for their properties.',
42
41
  ),
42
+ events: z
43
+ .object({
44
+ allowed_events: z
45
+ .array(z.string())
46
+ .optional()
47
+ .describe(
48
+ 'List of event types to show in the events filter. When set, only these event types will be available. Leave empty to show all events.',
49
+ ),
50
+ default_events: z
51
+ .array(z.string())
52
+ .optional()
53
+ .describe(
54
+ 'List of event types that are pre-selected in the events filter when the user first loads the events tab.',
55
+ ),
56
+ })
57
+ .optional()
58
+ .describe('Configuration for event type filtering in the manage feature.'),
43
59
  })
44
60
 
45
61
  const base_organize_feature = base_feature
@@ -104,16 +120,55 @@ export const portal_configuration_base = z.object({
104
120
  .enum(['en-US', 'pt-PT', 'fr-FR', 'it-IT', 'es-ES'])
105
121
  .optional()
106
122
  .describe('The locale to use for the portal.'),
123
+ exclude_locale_picker: z
124
+ .boolean()
125
+ .default(false)
126
+ .describe(
127
+ 'Whether to exclude the option to select a locale within the portal UI.',
128
+ ),
107
129
  customization_profile_id: z
108
130
  .string()
109
131
  .uuid()
110
132
  .optional()
111
133
  .describe('The ID of the customization profile to use for the portal.'),
112
- property_listing_filter: z
113
- .record(z.string(), z.union([z.string(), z.boolean()]))
134
+ customer_resources_filters: z
135
+ .array(
136
+ z.object({
137
+ field: z
138
+ .string()
139
+ .regex(/^[a-zA-Z_]\w*$/, {
140
+ message:
141
+ 'Field names must start with a letter or underscore and contain only alphanumeric characters and underscores',
142
+ })
143
+ .describe('The custom_metadata field name to filter on.'),
144
+ operation: z
145
+ .literal('=')
146
+ .describe(
147
+ "The comparison operation. Currently only '=' is supported.",
148
+ ),
149
+ value: z
150
+ .union([z.string(), z.boolean()])
151
+ .describe('The value to compare against.'),
152
+ }),
153
+ )
154
+ .optional()
155
+ .describe(
156
+ 'Filter configuration for resources based on their custom_metadata. Each filter specifies a field, operation, and value to match against resource custom_metadata.',
157
+ ),
158
+ navigation_mode: z
159
+ .enum(['full', 'restricted'])
160
+ .default('full')
161
+ .describe(
162
+ "Navigation mode for the portal. 'restricted' tells frontend to hide navigation UI, typically used for embedded deep links.",
163
+ ),
164
+ deep_link: z
165
+ .object({
166
+ resource_type: z.enum(['reservation', 'space']),
167
+ resource_key: z.string(),
168
+ })
114
169
  .optional()
115
170
  .describe(
116
- 'Filter configuration for property listings based on their custom_metadata. Keys and values must match the custom_metadata stored on property listings.',
171
+ 'Deep link target resource for initial redirect. When set, the portal will navigate directly to the specified resource.',
117
172
  ),
118
173
  })
119
174
 
@@ -138,11 +193,16 @@ export const portal_configuration = portal_configuration_base
138
193
  },
139
194
  },
140
195
  is_embedded: false,
196
+ exclude_locale_picker: false,
141
197
  locale: undefined,
142
- property_listing_filter: undefined,
198
+ customer_resources_filters: undefined,
143
199
  })
144
200
  .describe(`Configuration for a customer portal`)
145
201
 
146
202
  export type PortalConfiguration = z.infer<typeof portal_configuration>
147
203
 
148
- export type PropertyListingFilter = CustomMetadata
204
+ export type CustomerResourcesFilters = Array<{
205
+ field: string
206
+ operation: '='
207
+ value: string | boolean
208
+ }>
@@ -42,7 +42,7 @@ export const dormakaba_oracode_time_slot = z
42
42
  `Indicates whether a time slot for a dormakaba Oracode device is a master time slot.`,
43
43
  ),
44
44
 
45
- ext_dormakaba_oracode_user_level_prefix: z
45
+ dormakaba_oracode_user_level_prefix: z
46
46
  .number()
47
47
  .describe(`Prefix for a user level for a dormakaba Oracode device.`),
48
48
  dormakaba_oracode_user_level_id: z
@@ -168,6 +168,16 @@ export const device_metadata = z
168
168
  battery_level: z.string().describe(`Battery level for a Salto device.`),
169
169
  locked_state: z.string().describe(`Locked state for a Salto device.`),
170
170
  model: z.string().optional().describe(`Model for a Salto device.`),
171
+ site_id: z
172
+ .string()
173
+ .optional()
174
+ .describe(`Site ID for the Salto KS site to which the device belongs.`),
175
+ site_name: z
176
+ .string()
177
+ .optional()
178
+ .describe(
179
+ `Site name for the Salto KS site to which the device belongs.`,
180
+ ),
171
181
  }).describe(`
172
182
  ---
173
183
  deprecated: Use \`salto_ks_metadata \` instead.
@@ -194,6 +204,18 @@ export const device_metadata = z
194
204
  .describe(
195
205
  `Indicates whether the site has a Salto KS subscription that supports custom PINs.`,
196
206
  ),
207
+ site_id: z
208
+ .string()
209
+ .optional()
210
+ .describe(
211
+ `Site ID for the Salto KS site to which the device belongs.`,
212
+ ),
213
+ site_name: z
214
+ .string()
215
+ .optional()
216
+ .describe(
217
+ `Site name for the Salto KS site to which the device belongs.`,
218
+ ),
197
219
  })
198
220
  .describe(`Metadata for a Salto KS device.`),
199
221
 
@@ -493,14 +515,6 @@ export const device_metadata = z
493
515
  })
494
516
  .describe(`Metadata for a Honeywell Resideo device.`),
495
517
 
496
- hubitat_metadata: z
497
- .object({
498
- device_id: z.string().describe(`Device ID for a Hubitat device.`),
499
- device_name: z.string().describe(`Device name for a Hubitat device.`),
500
- device_label: z.string().describe(`Device label for a Hubitat device.`),
501
- })
502
- .describe(`Metadata for a Hubitat device.`),
503
-
504
518
  dormakaba_oracode_metadata: z
505
519
  .object({
506
520
  door_id: z
@@ -619,6 +633,12 @@ export const device_metadata = z
619
633
  device_id: z.string().describe(`Device ID for a Sensi device.`),
620
634
  device_name: z.string().describe(`Device name for a Sensi device.`),
621
635
  product_type: z.string().describe(`Product type for a Sensi device.`),
636
+ dual_setpoints_not_supported: z
637
+ .boolean()
638
+ .optional()
639
+ .describe(
640
+ `Set to true when the device does not support the /dual-setpoints API endpoint.`,
641
+ ),
622
642
  })
623
643
  .describe(`Metadata for a Sensi device.`),
624
644
 
@@ -723,6 +743,12 @@ export const device_metadata = z
723
743
  wifi_signal_strength: z
724
744
  .number()
725
745
  .describe(`WiFi signal strength (0-1) for a Korelock device.`),
746
+ location_id: z
747
+ .string()
748
+ .nullable()
749
+ .describe(
750
+ `Location ID for a Korelock device. Required for timebound access codes.`,
751
+ ),
726
752
  })
727
753
  .partial()
728
754
  .describe(`Metadata for a Korelock device.`),
@@ -24,7 +24,6 @@ export const DEVICE_PROVIDERS = {
24
24
  LINEAR: 'linear',
25
25
  NOISEAWARE: 'noiseaware',
26
26
  NUKI: 'nuki',
27
- SEAM_RELAY_ADMIN: 'seam_relay_admin',
28
27
  IGLOO: 'igloo',
29
28
  KWIKSET: 'kwikset',
30
29
  MINUT: 'minut',
@@ -33,7 +32,6 @@ export const DEVICE_PROVIDERS = {
33
32
  NEST: 'nest',
34
33
  IGLOOHOME: 'igloohome',
35
34
  ECOBEE: 'ecobee',
36
- HUBITAT: 'hubitat',
37
35
  FOUR_SUITES: 'four_suites',
38
36
  DORMAKABA_ORACODE: 'dormakaba_oracode',
39
37
  PTI: 'pti',
@@ -50,7 +48,6 @@ export const DEVICE_PROVIDERS = {
50
48
  TADO: 'tado',
51
49
  SALTO_SPACE: 'salto_space',
52
50
  SENSI: 'sensi',
53
- KWIKSET2: 'kwikset2',
54
51
  KEYNEST: 'keynest',
55
52
  KORELOCK: 'korelock',
56
53
  DORMAKABA_AMBIANCE: 'dormakaba_ambiance',
@@ -99,6 +96,7 @@ export const PROVIDER_CATEGORY_MAP = {
99
96
  'avigilon_alta',
100
97
  'keynest',
101
98
  'hotek',
99
+ 'ultraloq',
102
100
  ],
103
101
 
104
102
  consumer_smartlocks: [
@@ -114,6 +112,7 @@ export const PROVIDER_CATEGORY_MAP = {
114
112
  'wyze',
115
113
  'lockly',
116
114
  'tedee',
115
+ 'ultraloq',
117
116
  ],
118
117
 
119
118
  beta: ['korelock'],
@@ -16,7 +16,6 @@ export const LOCK_DEVICE_TYPE = {
16
16
  NUKI_LOCK: 'nuki_lock',
17
17
  SALTO_LOCK: 'salto_lock',
18
18
  SCHLAGE_LOCK: 'schlage_lock',
19
- SEAM_RELAY: 'seam_relay',
20
19
  SMARTTHINGS_LOCK: 'smartthings_lock',
21
20
  WYZE_LOCK: 'wyze_lock',
22
21
  YALE_LOCK: 'yale_lock',
@@ -24,7 +23,6 @@ export const LOCK_DEVICE_TYPE = {
24
23
  CONTROLBYWEB_DEVICE: 'controlbyweb_device',
25
24
  TTLOCK_LOCK: 'ttlock_lock',
26
25
  IGLOOHOME_LOCK: 'igloohome_lock',
27
- HUBITAT_LOCK: 'hubitat_lock',
28
26
  FOUR_SUITES_DOOR: 'four_suites_door',
29
27
  DORMAKABA_ORACODE_DOOR: 'dormakaba_oracode_door',
30
28
  TEDEE_LOCK: 'tedee_lock',
@@ -409,6 +409,16 @@ const ultraloq_time_zone_unknown = common_device_warning
409
409
  'Indicates that Seam does not know the time zone of the Ultraloq device. Set a time zone to enable time-bound access codes.',
410
410
  )
411
411
 
412
+ const two_n_device_missing_timezone = common_device_warning
413
+ .extend({
414
+ warning_code: z
415
+ .literal('two_n_device_missing_timezone')
416
+ .describe(warning_code_description),
417
+ })
418
+ .describe(
419
+ 'Indicates that the 2N device does not have a time zone configured. Configure a time zone on the device to enable access codes.',
420
+ )
421
+
412
422
  export const unknown_issue_with_phone = common_device_warning.extend({
413
423
  warning_code: z
414
424
  .literal('unknown_issue_with_phone')
@@ -453,6 +463,27 @@ const accessory_keypad_setup_required = common_device_warning.extend({
453
463
  Indicates that the accessory keypad exists, but is not linked to the Igloohome Bridge. Online access code programming will fail until the keypad is linked to the Igloohome Bridge in the Igloohome app.
454
464
  `)
455
465
 
466
+ const max_access_codes_reached = common_device_warning.extend({
467
+ warning_code: z
468
+ .literal('max_access_codes_reached')
469
+ .describe(warning_code_description),
470
+ active_access_code_count: z
471
+ .number()
472
+ .int()
473
+ .describe(
474
+ 'Number of active access codes on the device when the warning was set.',
475
+ ),
476
+ max_active_access_code_count: z
477
+ .number()
478
+ .int()
479
+ .describe('Maximum number of active access codes supported by the device.'),
480
+ }).describe(`
481
+ ---
482
+ variant_group_key: access_codes
483
+ ---
484
+ Indicates that the device has reached its maximum number of active access codes. Delete existing codes before creating new ones.
485
+ `)
486
+
456
487
  const device_warning = z.discriminatedUnion('warning_code', [
457
488
  partial_backup_access_code_pool,
458
489
  many_active_backup_codes,
@@ -471,9 +502,11 @@ const device_warning = z.discriminatedUnion('warning_code', [
471
502
  unknown_issue_with_phone,
472
503
  lockly_time_zone_not_configured,
473
504
  ultraloq_time_zone_unknown,
505
+ two_n_device_missing_timezone,
474
506
  hub_required_for_additional_capabilities,
475
507
  keynest_unsupported_locker,
476
508
  accessory_keypad_setup_required,
509
+ max_access_codes_reached,
477
510
  ])
478
511
 
479
512
  export type DeviceWarning = z.infer<typeof device_warning>
@@ -518,12 +551,16 @@ const _device_warning_map = z.object({
518
551
  .optional()
519
552
  .nullable(),
520
553
  ultraloq_time_zone_unknown: ultraloq_time_zone_unknown.optional().nullable(),
554
+ two_n_device_missing_timezone: two_n_device_missing_timezone
555
+ .optional()
556
+ .nullable(),
521
557
  hub_required_for_additional_capabilities:
522
558
  hub_required_for_additional_capabilities.optional().nullable(),
523
559
  keynest_unsupported_locker: keynest_unsupported_locker.optional().nullable(),
524
560
  accessory_keypad_setup_required: accessory_keypad_setup_required
525
561
  .optional()
526
562
  .nullable(),
563
+ max_access_codes_reached: max_access_codes_reached.optional().nullable(),
527
564
  })
528
565
 
529
566
  export type DeviceWarningMap = z.infer<typeof _device_warning_map>
@@ -1,7 +1,11 @@
1
1
  import { z } from 'zod'
2
2
 
3
3
  import { custom_metadata } from '../custom-metadata.js'
4
- import { common_event } from './common.js'
4
+ import {
5
+ common_event,
6
+ common_event_error,
7
+ common_event_warning,
8
+ } from './common.js'
5
9
 
6
10
  const access_code_event = common_event.extend({
7
11
  access_code_id: z.string().uuid().describe('ID of the affected access code.'),
@@ -27,6 +31,27 @@ const access_code_event = common_event.extend({
27
31
  ),
28
32
  })
29
33
 
34
+ const access_code_event_issue_properties = {
35
+ connected_account_errors: z
36
+ .array(common_event_error)
37
+ .describe('Errors associated with the connected account.'),
38
+ connected_account_warnings: z
39
+ .array(common_event_warning)
40
+ .describe('Warnings associated with the connected account.'),
41
+ device_errors: z
42
+ .array(common_event_error)
43
+ .describe('Errors associated with the device.'),
44
+ device_warnings: z
45
+ .array(common_event_warning)
46
+ .describe('Warnings associated with the device.'),
47
+ access_code_errors: z
48
+ .array(common_event_error)
49
+ .describe('Errors associated with the access code.'),
50
+ access_code_warnings: z
51
+ .array(common_event_warning)
52
+ .describe('Warnings associated with the access code.'),
53
+ }
54
+
30
55
  const code = z.string().describe('Code for the affected access code.')
31
56
 
32
57
  export const access_code_created_event = access_code_event.extend({
@@ -92,10 +117,11 @@ export type AccessCodeRemovedFromDeviceEvent = z.infer<
92
117
  typeof access_code_removed_from_device_event
93
118
  >
94
119
 
95
- export const access_code_delay_in_setting_on_device_event =
96
- access_code_event.extend({
120
+ export const access_code_delay_in_setting_on_device_event = access_code_event
121
+ .extend({
97
122
  event_type: z.literal('access_code.delay_in_setting_on_device'),
98
- }).describe(`
123
+ })
124
+ .extend(access_code_event_issue_properties).describe(`
99
125
  ---
100
126
  route_path: /access_codes
101
127
  ---
@@ -106,10 +132,11 @@ export type AccessCodeDelayInSettingOnDeviceEvent = z.infer<
106
132
  typeof access_code_delay_in_setting_on_device_event
107
133
  >
108
134
 
109
- export const access_code_failed_to_set_on_device_event =
110
- access_code_event.extend({
135
+ export const access_code_failed_to_set_on_device_event = access_code_event
136
+ .extend({
111
137
  event_type: z.literal('access_code.failed_to_set_on_device'),
112
- }).describe(`
138
+ })
139
+ .extend(access_code_event_issue_properties).describe(`
113
140
  ---
114
141
  route_path: /access_codes
115
142
  ---
@@ -132,10 +159,11 @@ export const access_code_deleted_event = access_code_event.extend({
132
159
 
133
160
  export type AccessCodeDeletedEvent = z.infer<typeof access_code_deleted_event>
134
161
 
135
- export const access_code_delay_in_removing_from_device_event =
136
- access_code_event.extend({
162
+ export const access_code_delay_in_removing_from_device_event = access_code_event
163
+ .extend({
137
164
  event_type: z.literal('access_code.delay_in_removing_from_device'),
138
- }).describe(`
165
+ })
166
+ .extend(access_code_event_issue_properties).describe(`
139
167
  ---
140
168
  route_path: /access_codes
141
169
  ---
@@ -146,10 +174,11 @@ export type AccessCodeDelayInRemovingFromDeviceEvent = z.infer<
146
174
  typeof access_code_delay_in_removing_from_device_event
147
175
  >
148
176
 
149
- export const access_code_failed_to_remove_from_device_event =
150
- access_code_event.extend({
177
+ export const access_code_failed_to_remove_from_device_event = access_code_event
178
+ .extend({
151
179
  event_type: z.literal('access_code.failed_to_remove_from_device'),
152
- }).describe(`
180
+ })
181
+ .extend(access_code_event_issue_properties).describe(`
153
182
  ---
154
183
  route_path: /access_codes
155
184
  ---
@@ -218,9 +247,13 @@ export type UnmanagedAccessCodeConvertedToManagedEvent = z.infer<
218
247
  >
219
248
 
220
249
  export const unmanaged_access_code_failed_to_convert_to_managed_event =
221
- access_code_event.extend({
222
- event_type: z.literal('access_code.unmanaged.failed_to_convert_to_managed'),
223
- }).describe(`
250
+ access_code_event
251
+ .extend({
252
+ event_type: z.literal(
253
+ 'access_code.unmanaged.failed_to_convert_to_managed',
254
+ ),
255
+ })
256
+ .extend(access_code_event_issue_properties).describe(`
224
257
  ---
225
258
  route_path: /access_codes/unmanaged
226
259
  ---
@@ -82,6 +82,19 @@ export const access_method_reissued_event = access_method_issued_event.extend({
82
82
  An access method was reissued.
83
83
  `)
84
84
 
85
+ export const access_method_created_event = access_method_event.extend({
86
+ event_type: z.literal('access_method.created'),
87
+ }).describe(`
88
+ ---
89
+ route_path: /access_methods
90
+ ---
91
+ An access method was created.
92
+ `)
93
+
94
+ export type AccessMethodCreatedEvent = z.infer<
95
+ typeof access_method_created_event
96
+ >
97
+
85
98
  export type AccessMethodRevokedEvent = z.infer<
86
99
  typeof access_method_revoked_event
87
100
  >
@@ -92,4 +105,5 @@ export const access_method_events = [
92
105
  access_method_card_encoding_required_event,
93
106
  access_method_deleted_event,
94
107
  access_method_reissued_event,
108
+ access_method_created_event,
95
109
  ] as const
@@ -1,9 +1,25 @@
1
1
  import { z } from 'zod'
2
2
 
3
+ import { common_event_error, common_event_warning } from '../common.js'
3
4
  import { common_acs_event } from './common.js'
4
5
 
5
6
  const acs_system_event = common_acs_event.extend({})
6
7
 
8
+ const acs_system_event_issue_properties = {
9
+ acs_system_errors: z
10
+ .array(common_event_error)
11
+ .describe('Errors associated with the access control system.'),
12
+ acs_system_warnings: z
13
+ .array(common_event_warning)
14
+ .describe('Warnings associated with the access control system.'),
15
+ connected_account_errors: z
16
+ .array(common_event_error)
17
+ .describe('Errors associated with the connected account.'),
18
+ connected_account_warnings: z
19
+ .array(common_event_warning)
20
+ .describe('Warnings associated with the connected account.'),
21
+ }
22
+
7
23
  export const acs_system_connected_event = acs_system_event.extend({
8
24
  event_type: z.literal('acs_system.connected'),
9
25
  }).describe(`
@@ -15,9 +31,11 @@ export const acs_system_connected_event = acs_system_event.extend({
15
31
 
16
32
  export type AcsSystemConnectedEvent = z.infer<typeof acs_system_connected_event>
17
33
 
18
- export const acs_system_disconnected_event = acs_system_event.extend({
19
- event_type: z.literal('acs_system.disconnected'),
20
- }).describe(`
34
+ export const acs_system_disconnected_event = acs_system_event
35
+ .extend({
36
+ event_type: z.literal('acs_system.disconnected'),
37
+ })
38
+ .extend(acs_system_event_issue_properties).describe(`
21
39
  ---
22
40
  route_path: /acs/systems
23
41
  ---