seam 2.142.0 → 2.145.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 (47) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +2 -2
  3. data/README.md +11 -7
  4. data/lib/seam/base_resource.rb +24 -3
  5. data/lib/seam/resources/access_code.rb +682 -43
  6. data/lib/seam/resources/access_grant.rb +189 -25
  7. data/lib/seam/resources/access_method.rb +105 -3
  8. data/lib/seam/resources/acs_access_group.rb +52 -0
  9. data/lib/seam/resources/acs_credential.rb +153 -6
  10. data/lib/seam/resources/acs_encoder.rb +2 -0
  11. data/lib/seam/resources/acs_entrance.rb +105 -0
  12. data/lib/seam/resources/acs_system.rb +278 -6
  13. data/lib/seam/resources/acs_user.rb +201 -0
  14. data/lib/seam/resources/action_attempt.rb +1457 -279
  15. data/lib/seam/resources/connect_webview.rb +15 -1
  16. data/lib/seam/resources/connected_account.rb +285 -41
  17. data/lib/seam/resources/device.rb +929 -14
  18. data/lib/seam/resources/device_provider.rb +74 -0
  19. data/lib/seam/resources/event.rb +5205 -316
  20. data/lib/seam/resources/phone.rb +4 -1
  21. data/lib/seam/resources/unmanaged_access_code.rb +677 -43
  22. data/lib/seam/resources/unmanaged_access_grant.rb +189 -25
  23. data/lib/seam/resources/unmanaged_access_method.rb +105 -3
  24. data/lib/seam/resources/unmanaged_device.rb +827 -14
  25. data/lib/seam/resources/unmanaged_user_identity.rb +67 -0
  26. data/lib/seam/resources/user_identity.rb +67 -0
  27. data/lib/seam/resources/workspace.rb +3 -0
  28. data/lib/seam/routes/access_codes.rb +1 -1
  29. data/lib/seam/routes/access_grants.rb +2 -2
  30. data/lib/seam/routes/access_methods.rb +1 -1
  31. data/lib/seam/routes/acs_encoders.rb +1 -1
  32. data/lib/seam/routes/acs_entrances.rb +2 -2
  33. data/lib/seam/routes/action_attempts.rb +1 -1
  34. data/lib/seam/routes/connect_webviews.rb +3 -3
  35. data/lib/seam/routes/connected_accounts.rb +3 -3
  36. data/lib/seam/routes/customers.rb +1 -1
  37. data/lib/seam/routes/devices.rb +3 -3
  38. data/lib/seam/routes/devices_unmanaged.rb +2 -2
  39. data/lib/seam/routes/events.rb +1 -1
  40. data/lib/seam/routes/locks.rb +1 -1
  41. data/lib/seam/routes/noise_sensors.rb +1 -1
  42. data/lib/seam/routes/spaces.rb +3 -3
  43. data/lib/seam/routes/thermostats.rb +1 -1
  44. data/lib/seam/routes/user_identities.rb +1 -1
  45. data/lib/seam/version.rb +1 -1
  46. data/lib/seam/webhook.rb +5 -2
  47. metadata +1 -1
@@ -39,50 +39,483 @@ module Seam
39
39
  attr_accessor :user_level_name
40
40
  end
41
41
 
42
+ # Known `error_code` values load as subclasses; unknown values remain Errors instances for forward compatibility.
42
43
  class Errors < BaseResource
43
- class ModifiedFields < BaseResource
44
- # The name of the field that was changed (e.g. `code`, `starts_at`, `ends_at`).
44
+ # Indicates a provider-specific issue that prevents the access code from being set or managed. Check the error message for details.
45
+ class ProviderIssue < Errors
46
+ # Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
45
47
  # @return [String]
46
- attr_accessor :field
47
- # The previous value of the field.
48
+ # Known values:
49
+ # - `provider_issue`
50
+ attr_accessor :error_code
51
+ # Indicates that this is an access code error.
52
+ # @return [TrueClass]
53
+ attr_accessor :is_access_code_error
54
+ # Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
55
+ # @return [String]
56
+ attr_accessor :message
57
+ # Date and time at which Seam created the error.
58
+ # @return [Time, nil]
59
+ date_accessor :created_at
60
+ end
61
+
62
+ # Failed to set code on device.
63
+ class FailedToSetOnDevice < Errors
64
+ # Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
65
+ # @return [String]
66
+ # Known values:
67
+ # - `failed_to_set_on_device`
68
+ attr_accessor :error_code
69
+ # Indicates that this is an access code error.
70
+ # @return [TrueClass]
71
+ attr_accessor :is_access_code_error
72
+ # Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
73
+ # @return [String]
74
+ attr_accessor :message
75
+ # Date and time at which Seam created the error.
76
+ # @return [Time, nil]
77
+ date_accessor :created_at
78
+ end
79
+
80
+ # Failed to remove code from device.
81
+ class FailedToRemoveFromDevice < Errors
82
+ # Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
83
+ # @return [String]
84
+ # Known values:
85
+ # - `failed_to_remove_from_device`
86
+ attr_accessor :error_code
87
+ # Indicates that this is an access code error.
88
+ # @return [TrueClass]
89
+ attr_accessor :is_access_code_error
90
+ # Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
91
+ # @return [String]
92
+ attr_accessor :message
93
+ # Date and time at which Seam created the error.
94
+ # @return [Time, nil]
95
+ date_accessor :created_at
96
+ end
97
+
98
+ # Duplicate access code detected on device.
99
+ class DuplicateCodeOnDevice < Errors
100
+ # Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
101
+ # @return [String]
102
+ # Known values:
103
+ # - `duplicate_code_on_device`
104
+ attr_accessor :error_code
105
+ # Indicates that this is an access code error.
106
+ # @return [TrueClass]
107
+ attr_accessor :is_access_code_error
108
+ # ID of the managed access code that conflicts with this managed access code, when Seam can identify it.
48
109
  # @return [String, nil]
49
- attr_accessor :from
50
- # The new value of the field.
110
+ attr_accessor :managed_access_code_id
111
+ # Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
112
+ # @return [String]
113
+ attr_accessor :message
114
+ # ID of the unmanaged access code that conflicts with this managed access code, when Seam can identify it.
51
115
  # @return [String, nil]
52
- attr_accessor :to
116
+ attr_accessor :unmanaged_access_code_id
117
+ # Date and time at which Seam created the error.
118
+ # @return [Time, nil]
119
+ date_accessor :created_at
120
+ end
121
+
122
+ # No space for access code on device.
123
+ class NoSpaceForAccessCodeOnDevice < Errors
124
+ # Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
125
+ # @return [String]
126
+ # Known values:
127
+ # - `no_space_for_access_code_on_device`
128
+ attr_accessor :error_code
129
+ # Indicates that this is an access code error.
130
+ # @return [TrueClass]
131
+ attr_accessor :is_access_code_error
132
+ # Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
133
+ # @return [String]
134
+ attr_accessor :message
135
+ # Date and time at which Seam created the error.
136
+ # @return [Time, nil]
137
+ date_accessor :created_at
138
+ end
139
+
140
+ # Code was modified or removed externally after Seam successfully set it on the device. The external change conflicts with the state that Seam is trying to apply, so Seam will attempt to set the code on the device again.
141
+ class ConflictingExternalModification < Errors
142
+ class ModifiedFields < BaseResource
143
+ # The name of the field that was changed (e.g. `code`, `starts_at`, `ends_at`).
144
+ # @return [String]
145
+ attr_accessor :field
146
+ # The previous value of the field.
147
+ # @return [String, nil]
148
+ attr_accessor :from
149
+ # The new value of the field.
150
+ # @return [String, nil]
151
+ attr_accessor :to
152
+ end
153
+
154
+ # List of fields that were changed externally, with their previous and new values.
155
+ # @return [Array<ModifiedFields>]
156
+ resource_list_accessor :modified_fields, ModifiedFields
157
+ # 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.
158
+ # @return [String, nil]
159
+ # Known values:
160
+ # - `modified`
161
+ # - `removed`
162
+ attr_accessor :change_type
163
+ # Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
164
+ # @return [String]
165
+ # Known values:
166
+ # - `conflicting_external_modification`
167
+ attr_accessor :error_code
168
+ # Indicates that this is an access code error.
169
+ # @return [TrueClass]
170
+ attr_accessor :is_access_code_error
171
+ # Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
172
+ # @return [String]
173
+ attr_accessor :message
174
+ # Date and time at which Seam created the error.
175
+ # @return [Time, nil]
176
+ date_accessor :created_at
177
+ end
178
+
179
+ # Indicates that the access code is disabled or inactive on the device. The code exists but will not grant access until re-enabled.
180
+ class AccessCodeInactive < Errors
181
+ # Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
182
+ # @return [String]
183
+ # Known values:
184
+ # - `access_code_inactive`
185
+ attr_accessor :error_code
186
+ # Indicates that this is an access code error.
187
+ # @return [TrueClass]
188
+ attr_accessor :is_access_code_error
189
+ # Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
190
+ # @return [String]
191
+ attr_accessor :message
192
+ # Date and time at which Seam created the error.
193
+ # @return [Time, nil]
194
+ date_accessor :created_at
195
+ end
196
+
197
+ # Indicates that the account is disconnected.
198
+ class AccountDisconnected < Errors
199
+ # Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
200
+ # @return [String]
201
+ # Known values:
202
+ # - `account_disconnected`
203
+ attr_accessor :error_code
204
+ # Indicates that the error is a [connected account](https://docs.seam.co/api/connected_accounts) error.
205
+ # @return [TrueClass]
206
+ attr_accessor :is_connected_account_error
207
+ # Indicates that the error is not a device error.
208
+ # @return [FalseClass]
209
+ attr_accessor :is_device_error
210
+ # Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
211
+ # @return [String]
212
+ attr_accessor :message
213
+ # Date and time at which Seam created the error.
214
+ # @return [Time]
215
+ date_accessor :created_at
216
+ end
217
+
218
+ # Indicates that the Salto site user limit has been reached.
219
+ class SaltoKsSubscriptionLimitExceeded < Errors
220
+ # Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
221
+ # @return [String]
222
+ # Known values:
223
+ # - `salto_ks_subscription_limit_exceeded`
224
+ attr_accessor :error_code
225
+ # Indicates that the error is a [connected account](https://docs.seam.co/api/connected_accounts) error.
226
+ # @return [TrueClass]
227
+ attr_accessor :is_connected_account_error
228
+ # Indicates that the error is not a device error.
229
+ # @return [FalseClass]
230
+ attr_accessor :is_device_error
231
+ # Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
232
+ # @return [String]
233
+ attr_accessor :message
234
+ # Date and time at which Seam created the error.
235
+ # @return [Time]
236
+ date_accessor :created_at
237
+ end
238
+
239
+ # Indicates that Seam's integration user does not have sufficient permissions on the provider's system to which this device belongs, so Seam cannot manage access codes or unlock the device. See the error message for specifics, then either reauthorize the connected account in Seam or grant the integration user the required permissions in the provider's system.
240
+ class InsufficientPermissions < Errors
241
+ # Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
242
+ # @return [String]
243
+ # Known values:
244
+ # - `insufficient_permissions`
245
+ attr_accessor :error_code
246
+ # Indicates that the error is a [connected account](https://docs.seam.co/api/connected_accounts) error.
247
+ # @return [TrueClass]
248
+ attr_accessor :is_connected_account_error
249
+ # Indicates that the error is not a device error.
250
+ # @return [FalseClass]
251
+ attr_accessor :is_device_error
252
+ # Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
253
+ # @return [String]
254
+ attr_accessor :message
255
+ # Date and time at which Seam created the error.
256
+ # @return [Time]
257
+ date_accessor :created_at
258
+ end
259
+
260
+ # Indicates that one or more dormakaba sites associated with the connected account could not be connected. Contact dormakaba support.
261
+ class DormakabaSitesDisconnected < Errors
262
+ # Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
263
+ # @return [String]
264
+ # Known values:
265
+ # - `dormakaba_sites_disconnected`
266
+ attr_accessor :error_code
267
+ # Indicates that the error is a [connected account](https://docs.seam.co/api/connected_accounts) error.
268
+ # @return [TrueClass]
269
+ attr_accessor :is_connected_account_error
270
+ # Indicates that the error is not a device error.
271
+ # @return [FalseClass]
272
+ attr_accessor :is_device_error
273
+ # Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
274
+ # @return [String]
275
+ attr_accessor :message
276
+ # Date and time at which Seam created the error.
277
+ # @return [Time]
278
+ date_accessor :created_at
279
+ end
280
+
281
+ # Indicates that the device is offline.
282
+ class DeviceOffline < Errors
283
+ # Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
284
+ # @return [String]
285
+ # Known values:
286
+ # - `device_offline`
287
+ attr_accessor :error_code
288
+ # Indicates that the error is a device error.
289
+ # @return [TrueClass]
290
+ attr_accessor :is_device_error
291
+ # Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
292
+ # @return [String]
293
+ attr_accessor :message
294
+ # Date and time at which Seam created the error.
295
+ # @return [Time]
296
+ date_accessor :created_at
297
+ end
298
+
299
+ # Indicates that the device has been removed.
300
+ class DeviceRemoved < Errors
301
+ # Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
302
+ # @return [String]
303
+ # Known values:
304
+ # - `device_removed`
305
+ attr_accessor :error_code
306
+ # Indicates that the error is a device error.
307
+ # @return [TrueClass]
308
+ attr_accessor :is_device_error
309
+ # Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
310
+ # @return [String]
311
+ attr_accessor :message
312
+ # Date and time at which Seam created the error.
313
+ # @return [Time]
314
+ date_accessor :created_at
315
+ end
316
+
317
+ # Indicates that the hub is disconnected.
318
+ class HubDisconnected < Errors
319
+ # Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
320
+ # @return [String]
321
+ # Known values:
322
+ # - `hub_disconnected`
323
+ attr_accessor :error_code
324
+ # Indicates that the error is a device error.
325
+ # @return [TrueClass]
326
+ attr_accessor :is_device_error
327
+ # Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
328
+ # @return [String]
329
+ attr_accessor :message
330
+ # Date and time at which Seam created the error.
331
+ # @return [Time]
332
+ date_accessor :created_at
333
+ end
334
+
335
+ # Indicates that the device is disconnected.
336
+ class DeviceDisconnected < Errors
337
+ # Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
338
+ # @return [String]
339
+ # Known values:
340
+ # - `device_disconnected`
341
+ attr_accessor :error_code
342
+ # Indicates that the error is a device error.
343
+ # @return [TrueClass]
344
+ attr_accessor :is_device_error
345
+ # Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
346
+ # @return [String]
347
+ attr_accessor :message
348
+ # Date and time at which Seam created the error.
349
+ # @return [Time]
350
+ date_accessor :created_at
351
+ end
352
+
353
+ # Indicates that the [backup access code pool](https://docs.seam.co/low-level-apis/smart-locks/access-codes/backup-access-codes) is empty.
354
+ class EmptyBackupAccessCodePool < Errors
355
+ # Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
356
+ # @return [String]
357
+ # Known values:
358
+ # - `empty_backup_access_code_pool`
359
+ attr_accessor :error_code
360
+ # Indicates that the error is a device error.
361
+ # @return [TrueClass]
362
+ attr_accessor :is_device_error
363
+ # Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
364
+ # @return [String]
365
+ attr_accessor :message
366
+ # Date and time at which Seam created the error.
367
+ # @return [Time]
368
+ date_accessor :created_at
369
+ end
370
+
371
+ # Indicates that the user is not authorized to use the August lock.
372
+ class AugustLockNotAuthorized < Errors
373
+ # Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
374
+ # @return [String]
375
+ # Known values:
376
+ # - `august_lock_not_authorized`
377
+ attr_accessor :error_code
378
+ # Indicates that the error is a device error.
379
+ # @return [TrueClass]
380
+ attr_accessor :is_device_error
381
+ # Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
382
+ # @return [String]
383
+ attr_accessor :message
384
+ # Date and time at which Seam created the error.
385
+ # @return [Time]
386
+ date_accessor :created_at
387
+ end
388
+
389
+ # Indicates that device credentials are missing.
390
+ class MissingDeviceCredentials < Errors
391
+ # Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
392
+ # @return [String]
393
+ # Known values:
394
+ # - `missing_device_credentials`
395
+ attr_accessor :error_code
396
+ # Indicates that the error is a device error.
397
+ # @return [TrueClass]
398
+ attr_accessor :is_device_error
399
+ # Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
400
+ # @return [String]
401
+ attr_accessor :message
402
+ # Date and time at which Seam created the error.
403
+ # @return [Time]
404
+ date_accessor :created_at
405
+ end
406
+
407
+ # Indicates that the auxiliary heat is running.
408
+ class AuxiliaryHeatRunning < Errors
409
+ # Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
410
+ # @return [String]
411
+ # Known values:
412
+ # - `auxiliary_heat_running`
413
+ attr_accessor :error_code
414
+ # Indicates that the error is a device error.
415
+ # @return [TrueClass]
416
+ attr_accessor :is_device_error
417
+ # Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
418
+ # @return [String]
419
+ attr_accessor :message
420
+ # Date and time at which Seam created the error.
421
+ # @return [Time]
422
+ date_accessor :created_at
423
+ end
424
+
425
+ # Indicates that a subscription is required to connect.
426
+ class SubscriptionRequired < Errors
427
+ # Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
428
+ # @return [String]
429
+ # Known values:
430
+ # - `subscription_required`
431
+ attr_accessor :error_code
432
+ # Indicates that the error is a device error.
433
+ # @return [TrueClass]
434
+ attr_accessor :is_device_error
435
+ # Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
436
+ # @return [String]
437
+ attr_accessor :message
438
+ # Date and time at which Seam created the error.
439
+ # @return [Time]
440
+ date_accessor :created_at
441
+ end
442
+
443
+ # Indicates that the Seam API cannot communicate with [Seam Bridge](https://docs.seam.co/capability-guides/seam-bridge), for example, if the Seam Bridge executable has stopped or if the computer running the Seam Bridge executable is offline. See also [Troubleshooting Your Access Control System](https://docs.seam.co/low-level-apis/access-systems/troubleshooting-your-access-control-system#acs_system-errors-seam_bridge_disconnected).
444
+ class BridgeDisconnected < Errors
445
+ # Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
446
+ # @return [String]
447
+ # Known values:
448
+ # - `bridge_disconnected`
449
+ attr_accessor :error_code
450
+ # Indicates whether the error is related to [Seam Bridge](https://docs.seam.co/capability-guides/seam-bridge).
451
+ # @return [Boolean, nil]
452
+ attr_accessor :is_bridge_error
453
+ # Indicates whether the error is related specifically to the connected account.
454
+ # @return [Boolean, nil]
455
+ attr_accessor :is_connected_account_error
456
+ # Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
457
+ # @return [String]
458
+ attr_accessor :message
459
+ # Date and time at which Seam created the error.
460
+ # @return [Time]
461
+ date_accessor :created_at
53
462
  end
54
463
 
55
- # List of fields that were changed externally, with their previous and new values.
56
- # @return [Array<ModifiedFields>]
57
- resource_list_accessor :modified_fields, ModifiedFields
58
- # 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.
59
- # @return [String, nil]
60
- attr_accessor :change_type
61
464
  # Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
62
465
  # @return [String]
466
+ # Known values:
467
+ # - `provider_issue`
468
+ # - `failed_to_set_on_device`
469
+ # - `failed_to_remove_from_device`
470
+ # - `duplicate_code_on_device`
471
+ # - `no_space_for_access_code_on_device`
472
+ # - `conflicting_external_modification`
473
+ # - `access_code_inactive`
474
+ # - `account_disconnected`
475
+ # - `salto_ks_subscription_limit_exceeded`
476
+ # - `insufficient_permissions`
477
+ # - `dormakaba_sites_disconnected`
478
+ # - `device_offline`
479
+ # - `device_removed`
480
+ # - `hub_disconnected`
481
+ # - `device_disconnected`
482
+ # - `empty_backup_access_code_pool`
483
+ # - `august_lock_not_authorized`
484
+ # - `missing_device_credentials`
485
+ # - `auxiliary_heat_running`
486
+ # - `subscription_required`
487
+ # - `bridge_disconnected`
63
488
  attr_accessor :error_code
64
- # Indicates that this is an access code error.
65
- # @return [TrueClass]
66
- attr_accessor :is_access_code_error
67
- # Indicates whether the error is related to [Seam Bridge](https://docs.seam.co/capability-guides/seam-bridge).
68
- # @return [Boolean, nil]
69
- attr_accessor :is_bridge_error
70
- # @return [Boolean, nil]
71
- attr_accessor :is_connected_account_error
72
- # @return [Boolean]
73
- attr_accessor :is_device_error
74
- # ID of the managed access code that conflicts with this managed access code, when Seam can identify it.
75
- # @return [String, nil]
76
- attr_accessor :managed_access_code_id
77
489
  # Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
78
490
  # @return [String]
79
491
  attr_accessor :message
80
- # ID of the unmanaged access code that conflicts with this managed access code, when Seam can identify it.
81
- # @return [String, nil]
82
- attr_accessor :unmanaged_access_code_id
83
492
  # Date and time at which Seam created the error.
84
493
  # @return [Time, nil]
85
494
  date_accessor :created_at
495
+
496
+ discriminated_by :error_code, {
497
+ "provider_issue" => ProviderIssue,
498
+ "failed_to_set_on_device" => FailedToSetOnDevice,
499
+ "failed_to_remove_from_device" => FailedToRemoveFromDevice,
500
+ "duplicate_code_on_device" => DuplicateCodeOnDevice,
501
+ "no_space_for_access_code_on_device" => NoSpaceForAccessCodeOnDevice,
502
+ "conflicting_external_modification" => ConflictingExternalModification,
503
+ "access_code_inactive" => AccessCodeInactive,
504
+ "account_disconnected" => AccountDisconnected,
505
+ "salto_ks_subscription_limit_exceeded" => SaltoKsSubscriptionLimitExceeded,
506
+ "insufficient_permissions" => InsufficientPermissions,
507
+ "dormakaba_sites_disconnected" => DormakabaSitesDisconnected,
508
+ "device_offline" => DeviceOffline,
509
+ "device_removed" => DeviceRemoved,
510
+ "hub_disconnected" => HubDisconnected,
511
+ "device_disconnected" => DeviceDisconnected,
512
+ "empty_backup_access_code_pool" => EmptyBackupAccessCodePool,
513
+ "august_lock_not_authorized" => AugustLockNotAuthorized,
514
+ "missing_device_credentials" => MissingDeviceCredentials,
515
+ "auxiliary_heat_running" => AuxiliaryHeatRunning,
516
+ "subscription_required" => SubscriptionRequired,
517
+ "bridge_disconnected" => BridgeDisconnected
518
+ }.freeze
86
519
  end
87
520
 
88
521
  class PendingMutations < BaseResource
@@ -124,6 +557,8 @@ module Seam
124
557
  # @return [String]
125
558
  attr_accessor :message
126
559
  # @return [String]
560
+ # Known values:
561
+ # - `creating`
127
562
  attr_accessor :mutation_code
128
563
  # Date and time at which the mutation was created.
129
564
  # @return [Time]
@@ -133,34 +568,229 @@ module Seam
133
568
  date_accessor :scheduled_at
134
569
  end
135
570
 
571
+ # Known `warning_code` values load as subclasses; unknown values remain Warnings instances for forward compatibility.
136
572
  class Warnings < BaseResource
137
- class ModifiedFields < BaseResource
138
- # The name of the field that was changed (e.g. `code`, `starts_at`, `ends_at`).
573
+ # The access code's PIN rotates periodically when the code is renewed. Retrieve the latest code before each use.
574
+ class CodeRotatesPeriodically < Warnings
575
+ # Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
139
576
  # @return [String]
140
- attr_accessor :field
141
- # The previous value of the field.
142
- # @return [String, nil]
143
- attr_accessor :from
144
- # The new value of the field.
577
+ attr_accessor :message
578
+ # Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
579
+ # @return [String]
580
+ # Known values:
581
+ # - `code_rotates_periodically`
582
+ attr_accessor :warning_code
583
+ # Date and time at which Seam created the warning.
584
+ # @return [Time, nil]
585
+ date_accessor :created_at
586
+ end
587
+
588
+ # The device's time zone is unknown and this code's time frame crosses a daylight-saving transition in at least one plausible time zone. A 1-hour safety buffer has been applied to the side of the time frame affected by the transition (`ends_at` for spring-forward, `starts_at` for fall-back) so the code stays active through the shift — the code may be usable up to 1 hour beyond your requested window. Set the device's time zone via `/devices/report_provider_metadata` to clear the buffer and guarantee exact handling.
589
+ class TimeFrameAdjustedForUnknownTimeZone < Warnings
590
+ # Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
591
+ # @return [String]
592
+ attr_accessor :message
593
+ # Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
594
+ # @return [String]
595
+ # Known values:
596
+ # - `time_frame_adjusted_for_unknown_time_zone`
597
+ attr_accessor :warning_code
598
+ # Date and time at which Seam created the warning.
599
+ # @return [Time, nil]
600
+ date_accessor :created_at
601
+ end
602
+
603
+ # Code was modified or removed externally after Seam successfully set it on the device. External modification is allowed for this code, so the externally modified state is being honored.
604
+ class ExternalModificationInEffect < Warnings
605
+ class ModifiedFields < BaseResource
606
+ # The name of the field that was changed (e.g. `code`, `starts_at`, `ends_at`).
607
+ # @return [String]
608
+ attr_accessor :field
609
+ # The previous value of the field.
610
+ # @return [String, nil]
611
+ attr_accessor :from
612
+ # The new value of the field.
613
+ # @return [String, nil]
614
+ attr_accessor :to
615
+ end
616
+
617
+ # List of fields that were changed externally, with their previous and new values.
618
+ # @return [Array<ModifiedFields>]
619
+ resource_list_accessor :modified_fields, ModifiedFields
620
+ # 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.
145
621
  # @return [String, nil]
146
- attr_accessor :to
622
+ # Known values:
623
+ # - `modified`
624
+ # - `removed`
625
+ attr_accessor :change_type
626
+ # Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
627
+ # @return [String]
628
+ attr_accessor :message
629
+ # Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
630
+ # @return [String]
631
+ # Known values:
632
+ # - `external_modification_in_effect`
633
+ attr_accessor :warning_code
634
+ # Date and time at which Seam created the warning.
635
+ # @return [Time, nil]
636
+ date_accessor :created_at
637
+ end
638
+
639
+ # Delay in setting code on device.
640
+ class DelayInSettingOnDevice < Warnings
641
+ # Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
642
+ # @return [String]
643
+ attr_accessor :message
644
+ # Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
645
+ # @return [String]
646
+ # Known values:
647
+ # - `delay_in_setting_on_device`
648
+ attr_accessor :warning_code
649
+ # Date and time at which Seam created the warning.
650
+ # @return [Time, nil]
651
+ date_accessor :created_at
652
+ end
653
+
654
+ # Delay in removing code from device.
655
+ class DelayInRemovingFromDevice < Warnings
656
+ # Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
657
+ # @return [String]
658
+ attr_accessor :message
659
+ # Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
660
+ # @return [String]
661
+ # Known values:
662
+ # - `delay_in_removing_from_device`
663
+ attr_accessor :warning_code
664
+ # Date and time at which Seam created the warning.
665
+ # @return [Time, nil]
666
+ date_accessor :created_at
667
+ end
668
+
669
+ # Third-party integration detected that may cause access codes to fail.
670
+ class ThirdPartyIntegrationDetected < Warnings
671
+ # Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
672
+ # @return [String]
673
+ attr_accessor :message
674
+ # Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
675
+ # @return [String]
676
+ # Known values:
677
+ # - `third_party_integration_detected`
678
+ attr_accessor :warning_code
679
+ # Date and time at which Seam created the warning.
680
+ # @return [Time, nil]
681
+ date_accessor :created_at
682
+ end
683
+
684
+ # Algopins must be used within 24 hours.
685
+ class IglooAlgopinMustBeUsedWithinN24Hours < Warnings
686
+ # Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
687
+ # @return [String]
688
+ attr_accessor :message
689
+ # Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
690
+ # @return [String]
691
+ # Known values:
692
+ # - `igloo_algopin_must_be_used_within_24_hours`
693
+ attr_accessor :warning_code
694
+ # Date and time at which Seam created the warning.
695
+ # @return [Time, nil]
696
+ date_accessor :created_at
697
+ end
698
+
699
+ # Management was transferred to another workspace.
700
+ class ManagementTransferred < Warnings
701
+ # Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
702
+ # @return [String]
703
+ attr_accessor :message
704
+ # Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
705
+ # @return [String]
706
+ # Known values:
707
+ # - `management_transferred`
708
+ attr_accessor :warning_code
709
+ # Date and time at which Seam created the warning.
710
+ # @return [Time, nil]
711
+ date_accessor :created_at
712
+ end
713
+
714
+ # A backup access code has been pulled and is being used in place of this access code.
715
+ class UsingBackupAccessCode < Warnings
716
+ # Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
717
+ # @return [String]
718
+ attr_accessor :message
719
+ # Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
720
+ # @return [String]
721
+ # Known values:
722
+ # - `using_backup_access_code`
723
+ attr_accessor :warning_code
724
+ # Date and time at which Seam created the warning.
725
+ # @return [Time, nil]
726
+ date_accessor :created_at
727
+ end
728
+
729
+ # Access code is being deleted.
730
+ class BeingDeleted < Warnings
731
+ # Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
732
+ # @return [String]
733
+ attr_accessor :message
734
+ # Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
735
+ # @return [String]
736
+ # Known values:
737
+ # - `being_deleted`
738
+ attr_accessor :warning_code
739
+ # Date and time at which Seam created the warning.
740
+ # @return [Time, nil]
741
+ date_accessor :created_at
742
+ end
743
+
744
+ # An unknown issue occurred with the access code.
745
+ class UnknownIssueWithAccessCode < Warnings
746
+ # Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
747
+ # @return [String]
748
+ attr_accessor :message
749
+ # Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
750
+ # @return [String]
751
+ # Known values:
752
+ # - `unknown_issue_with_access_code`
753
+ attr_accessor :warning_code
754
+ # Date and time at which Seam created the warning.
755
+ # @return [Time, nil]
756
+ date_accessor :created_at
147
757
  end
148
758
 
149
- # List of fields that were changed externally, with their previous and new values.
150
- # @return [Array<ModifiedFields>]
151
- resource_list_accessor :modified_fields, ModifiedFields
152
- # 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.
153
- # @return [String, nil]
154
- attr_accessor :change_type
155
759
  # Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
156
760
  # @return [String]
157
761
  attr_accessor :message
158
762
  # Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
159
763
  # @return [String]
764
+ # Known values:
765
+ # - `code_rotates_periodically`
766
+ # - `time_frame_adjusted_for_unknown_time_zone`
767
+ # - `external_modification_in_effect`
768
+ # - `delay_in_setting_on_device`
769
+ # - `delay_in_removing_from_device`
770
+ # - `third_party_integration_detected`
771
+ # - `igloo_algopin_must_be_used_within_24_hours`
772
+ # - `management_transferred`
773
+ # - `using_backup_access_code`
774
+ # - `being_deleted`
775
+ # - `unknown_issue_with_access_code`
160
776
  attr_accessor :warning_code
161
777
  # Date and time at which Seam created the warning.
162
778
  # @return [Time, nil]
163
779
  date_accessor :created_at
780
+
781
+ discriminated_by :warning_code, {
782
+ "code_rotates_periodically" => CodeRotatesPeriodically,
783
+ "time_frame_adjusted_for_unknown_time_zone" => TimeFrameAdjustedForUnknownTimeZone,
784
+ "external_modification_in_effect" => ExternalModificationInEffect,
785
+ "delay_in_setting_on_device" => DelayInSettingOnDevice,
786
+ "delay_in_removing_from_device" => DelayInRemovingFromDevice,
787
+ "third_party_integration_detected" => ThirdPartyIntegrationDetected,
788
+ "igloo_algopin_must_be_used_within_24_hours" => IglooAlgopinMustBeUsedWithinN24Hours,
789
+ "management_transferred" => ManagementTransferred,
790
+ "using_backup_access_code" => UsingBackupAccessCode,
791
+ "being_deleted" => BeingDeleted,
792
+ "unknown_issue_with_access_code" => UnknownIssueWithAccessCode
793
+ }.freeze
164
794
  end
165
795
 
166
796
  # Metadata for a dormakaba Oracode managed access code. Only present for access codes from dormakaba Oracode devices.
@@ -219,9 +849,18 @@ module Seam
219
849
  attr_accessor :pulled_backup_access_code_id
220
850
  # Current status of the access code within the operational lifecycle. Values are `setting`, a transitional phase that indicates that the code is being configured or activated; `set`, which indicates that the code is active and operational; `unset`, which indicates a deactivated or unused state, either before activation or after deliberate deactivation; `removing`, which indicates a transitional period in which the code is being deleted or made inactive; and `unknown`, which indicates an indeterminate state, due to reasons such as system errors or incomplete data, that highlights a potential need for system review or troubleshooting. See also [Lifecycle of Access Codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes/lifecycle-of-access-codes).
221
851
  # @return [String]
852
+ # Known values:
853
+ # - `setting`
854
+ # - `set`
855
+ # - `unset`
856
+ # - `removing`
857
+ # - `unknown`
222
858
  attr_accessor :status
223
859
  # Type of the access code. `ongoing` access codes are active continuously until deactivated manually. `time_bound` access codes have a specific duration.
224
860
  # @return [String]
861
+ # Known values:
862
+ # - `time_bound`
863
+ # - `ongoing`
225
864
  attr_accessor :type
226
865
  # Unique identifier for the Seam workspace associated with the access code.
227
866
  # @return [String]