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
@@ -17,8 +17,100 @@ module Seam
17
17
  date_accessor :starts_at
18
18
  end
19
19
 
20
+ # Known `error_code` values load as subclasses; unknown values remain Errors instances for forward compatibility.
20
21
  class Errors < BaseResource
22
+ # Indicates that the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) was deleted from the [access system](https://docs.seam.co/low-level-apis/access-systems) outside of Seam.
23
+ class DeletedExternally < Errors
24
+ # @return [String]
25
+ # Known values:
26
+ # - `deleted_externally`
27
+ attr_accessor :error_code
28
+ # Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
29
+ # @return [String]
30
+ attr_accessor :message
31
+ # Date and time at which Seam created the error.
32
+ # @return [Time]
33
+ date_accessor :created_at
34
+ end
35
+
36
+ # Indicates that the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) could not be subscribed on Salto KS because the subscription limit has been exceeded.
37
+ class SaltoKsSubscriptionLimitExceeded < Errors
38
+ # @return [String]
39
+ # Known values:
40
+ # - `salto_ks_subscription_limit_exceeded`
41
+ attr_accessor :error_code
42
+ # Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
43
+ # @return [String]
44
+ attr_accessor :message
45
+ # Date and time at which Seam created the error.
46
+ # @return [Time]
47
+ date_accessor :created_at
48
+ end
49
+
50
+ # Indicates that the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) was not created on the [access system](https://docs.seam.co/low-level-apis/access-systems). This is likely due to an internal unexpected error. Contact Seam [support](mailto:support@seam.co).
51
+ class FailedToCreateOnAcsSystem < Errors
52
+ # @return [String]
53
+ # Known values:
54
+ # - `failed_to_create_on_acs_system`
55
+ attr_accessor :error_code
56
+ # Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
57
+ # @return [String]
58
+ attr_accessor :message
59
+ # Date and time at which Seam created the error.
60
+ # @return [Time]
61
+ date_accessor :created_at
62
+ end
63
+
64
+ # Indicates that the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) was not updated on the [access system](https://docs.seam.co/low-level-apis/access-systems). This is likely due to an internal unexpected error. Contact Seam [support](mailto:support@seam.co).
65
+ class FailedToUpdateOnAcsSystem < Errors
66
+ # @return [String]
67
+ # Known values:
68
+ # - `failed_to_update_on_acs_system`
69
+ attr_accessor :error_code
70
+ # Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
71
+ # @return [String]
72
+ attr_accessor :message
73
+ # Date and time at which Seam created the error.
74
+ # @return [Time]
75
+ date_accessor :created_at
76
+ end
77
+
78
+ # Indicates that the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) was not deleted on the [access system](https://docs.seam.co/low-level-apis/access-systems). This is likely due to an internal unexpected error. Contact Seam [support](mailto:support@seam.co).
79
+ class FailedToDeleteOnAcsSystem < Errors
80
+ # @return [String]
81
+ # Known values:
82
+ # - `failed_to_delete_on_acs_system`
83
+ attr_accessor :error_code
84
+ # Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
85
+ # @return [String]
86
+ attr_accessor :message
87
+ # Date and time at which Seam created the error.
88
+ # @return [Time]
89
+ date_accessor :created_at
90
+ end
91
+
92
+ # Indicates that the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) was created from the Seam API but also exists on Mission Control. This is unsupported. Contact Seam [support](mailto:support@seam.co).
93
+ class LatchConflictWithResidentUser < Errors
94
+ # @return [String]
95
+ # Known values:
96
+ # - `latch_conflict_with_resident_user`
97
+ attr_accessor :error_code
98
+ # Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
99
+ # @return [String]
100
+ attr_accessor :message
101
+ # Date and time at which Seam created the error.
102
+ # @return [Time]
103
+ date_accessor :created_at
104
+ end
105
+
21
106
  # @return [String]
107
+ # Known values:
108
+ # - `deleted_externally`
109
+ # - `salto_ks_subscription_limit_exceeded`
110
+ # - `failed_to_create_on_acs_system`
111
+ # - `failed_to_update_on_acs_system`
112
+ # - `failed_to_delete_on_acs_system`
113
+ # - `latch_conflict_with_resident_user`
22
114
  attr_accessor :error_code
23
115
  # Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
24
116
  # @return [String]
@@ -26,6 +118,15 @@ module Seam
26
118
  # Date and time at which Seam created the error.
27
119
  # @return [Time]
28
120
  date_accessor :created_at
121
+
122
+ discriminated_by :error_code, {
123
+ "deleted_externally" => DeletedExternally,
124
+ "salto_ks_subscription_limit_exceeded" => SaltoKsSubscriptionLimitExceeded,
125
+ "failed_to_create_on_acs_system" => FailedToCreateOnAcsSystem,
126
+ "failed_to_update_on_acs_system" => FailedToUpdateOnAcsSystem,
127
+ "failed_to_delete_on_acs_system" => FailedToDeleteOnAcsSystem,
128
+ "latch_conflict_with_resident_user" => LatchConflictWithResidentUser
129
+ }.freeze
29
130
  end
30
131
 
31
132
  class PendingMutations < BaseResource
@@ -92,9 +193,14 @@ module Seam
92
193
  # @return [String]
93
194
  attr_accessor :message
94
195
  # @return [String]
196
+ # Known values:
197
+ # - `creating`
95
198
  attr_accessor :mutation_code
96
199
  # Whether the user is scheduled to be added to or removed from the access group.
97
200
  # @return [String]
201
+ # Known values:
202
+ # - `adding`
203
+ # - `removing`
98
204
  attr_accessor :variant
99
205
  # Date and time at which the mutation was created.
100
206
  # @return [Time]
@@ -119,15 +225,100 @@ module Seam
119
225
  attr_accessor :user_id
120
226
  end
121
227
 
228
+ # Known `warning_code` values load as subclasses; unknown values remain Warnings instances for forward compatibility.
122
229
  class Warnings < BaseResource
230
+ # Indicates that the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) is being deleted from the [access system](https://docs.seam.co/low-level-apis/access-systems). This is a temporary state, and the access system user will be deleted shortly.
231
+ class BeingDeleted < Warnings
232
+ # Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
233
+ # @return [String]
234
+ attr_accessor :message
235
+ # @return [String]
236
+ # Known values:
237
+ # - `being_deleted`
238
+ attr_accessor :warning_code
239
+ # Date and time at which Seam created the warning.
240
+ # @return [Time]
241
+ date_accessor :created_at
242
+ end
243
+
244
+ # Indicates that the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) is not subscribed on Salto KS, so they cannot unlock doors or perform any actions. This occurs when the their access schedule hasn’t started yet, if their access schedule has ended, if the site has reached its limit for active users (subscription slots), or if they have been manually unsubscribed.
245
+ class SaltoKsUserNotSubscribed < Warnings
246
+ # Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
247
+ # @return [String]
248
+ attr_accessor :message
249
+ # @return [String]
250
+ # Known values:
251
+ # - `salto_ks_user_not_subscribed`
252
+ attr_accessor :warning_code
253
+ # Date and time at which Seam created the warning.
254
+ # @return [Time]
255
+ date_accessor :created_at
256
+ end
257
+
258
+ # Indicates that the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) exists but is not currently able to gain access—for example, because their access schedule has not started yet or has ended, the access system has reached its limit for active users, or they have been unsubscribed or deactivated. Refer to the warning message for the provider-specific reason. This is distinct from `is_suspended`, which indicates the user has been explicitly blocked.
259
+ class AcsUserInactive < Warnings
260
+ # Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
261
+ # @return [String]
262
+ attr_accessor :message
263
+ # @return [String]
264
+ # Known values:
265
+ # - `acs_user_inactive`
266
+ attr_accessor :warning_code
267
+ # Date and time at which Seam created the warning.
268
+ # @return [Time]
269
+ date_accessor :created_at
270
+ end
271
+
272
+ # An unknown issue occurred while syncing the state of this [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) with the provider. This issue may affect the proper functioning of this user.
273
+ class UnknownIssueWithAcsUser < Warnings
274
+ # Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
275
+ # @return [String]
276
+ attr_accessor :message
277
+ # @return [String]
278
+ # Known values:
279
+ # - `unknown_issue_with_acs_user`
280
+ attr_accessor :warning_code
281
+ # Date and time at which Seam created the warning.
282
+ # @return [Time]
283
+ date_accessor :created_at
284
+ end
285
+
286
+ # Indicates that the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) was created on Latch Mission Control. Please use the Latch Mission Control to manage this user.
287
+ class LatchResidentUser < Warnings
288
+ # Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
289
+ # @return [String]
290
+ attr_accessor :message
291
+ # @return [String]
292
+ # Known values:
293
+ # - `latch_resident_user`
294
+ attr_accessor :warning_code
295
+ # Date and time at which Seam created the warning.
296
+ # @return [Time]
297
+ date_accessor :created_at
298
+ end
299
+
123
300
  # Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
124
301
  # @return [String]
125
302
  attr_accessor :message
126
303
  # @return [String]
304
+ # Known values:
305
+ # - `being_deleted`
306
+ # - `salto_ks_user_not_subscribed`
307
+ # - `acs_user_inactive`
308
+ # - `unknown_issue_with_acs_user`
309
+ # - `latch_resident_user`
127
310
  attr_accessor :warning_code
128
311
  # Date and time at which Seam created the warning.
129
312
  # @return [Time]
130
313
  date_accessor :created_at
314
+
315
+ discriminated_by :warning_code, {
316
+ "being_deleted" => BeingDeleted,
317
+ "salto_ks_user_not_subscribed" => SaltoKsUserNotSubscribed,
318
+ "acs_user_inactive" => AcsUserInactive,
319
+ "unknown_issue_with_acs_user" => UnknownIssueWithAcsUser,
320
+ "latch_resident_user" => LatchResidentUser
321
+ }.freeze
131
322
  end
132
323
 
133
324
  # `starts_at` and `ends_at` timestamps for the [access system user's](https://docs.seam.co/low-level-apis/access-systems/user-management) access.
@@ -168,6 +359,16 @@ module Seam
168
359
  attr_accessor :email_address
169
360
  # Brand-specific terminology for the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) type.
170
361
  # @return [String, nil]
362
+ # Known values:
363
+ # - `pti_user`
364
+ # - `brivo_user`
365
+ # - `hid_credential_manager_user`
366
+ # - `salto_site_user`
367
+ # - `latch_user`
368
+ # - `dormakaba_community_user`
369
+ # - `salto_space_user`
370
+ # - `avigilon_alta_user`
371
+ # - `kisi_user`
171
372
  attr_accessor :external_type
172
373
  # Display name that corresponds to the brand-specific terminology for the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) type.
173
374
  # @return [String, nil]