@@ -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 commit comments