seam 2.166.0 → 2.168.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.
- checksums.yaml +4 -4
- data/Gemfile.lock +4 -4
- data/README.md +55 -2
- data/lib/seam/action_attempt_resolver.rb +77 -7
- data/lib/seam/auth.rb +2 -1
- data/lib/seam/base_resource.rb +50 -3
- data/lib/seam/deep_hash_accessor.rb +11 -15
- data/lib/seam/errors.rb +6 -0
- data/lib/seam/http.rb +11 -7
- data/lib/seam/http_single_workspace.rb +15 -3
- data/lib/seam/http_without_workspace.rb +17 -7
- data/lib/seam/invalid_response_error.rb +17 -0
- data/lib/seam/options.rb +2 -1
- data/lib/seam/paginator.rb +34 -29
- data/lib/seam/request_parameters.rb +11 -0
- data/lib/seam/resources/access_code.rb +50 -5
- data/lib/seam/resources/access_grant.rb +38 -4
- data/lib/seam/resources/access_method.rb +18 -1
- data/lib/seam/resources/acs_access_group.rb +0 -17
- data/lib/seam/resources/acs_credential.rb +18 -1
- data/lib/seam/resources/acs_entrance.rb +1 -1
- data/lib/seam/resources/acs_system.rb +17 -31
- data/lib/seam/resources/acs_user.rb +0 -3
- data/lib/seam/resources/action_attempt.rb +77 -216
- data/lib/seam/resources/batch.rb +1 -1
- data/lib/seam/resources/client_session.rb +0 -4
- data/lib/seam/resources/connect_webview.rb +1 -0
- data/lib/seam/resources/connected_account.rb +1 -21
- data/lib/seam/resources/device.rb +362 -311
- data/lib/seam/resources/device_provider.rb +12 -13
- data/lib/seam/resources/event.rb +527 -151
- data/lib/seam/resources/instant_key.rb +1 -1
- data/lib/seam/resources/phone.rb +90 -2
- data/lib/seam/resources/space.rb +21 -1
- data/lib/seam/resources/thermostat_schedule.rb +37 -0
- data/lib/seam/resources/unmanaged_access_code.rb +48 -6
- data/lib/seam/resources/unmanaged_access_grant.rb +38 -4
- data/lib/seam/resources/unmanaged_access_method.rb +18 -1
- data/lib/seam/resources/unmanaged_device.rb +110 -38
- data/lib/seam/resources/workspace.rb +0 -4
- data/lib/seam/routes/access_codes.rb +19 -23
- data/lib/seam/routes/access_codes_simulate.rb +1 -1
- data/lib/seam/routes/access_codes_unmanaged.rb +7 -5
- data/lib/seam/routes/access_grants.rb +24 -24
- data/lib/seam/routes/access_grants_unmanaged.rb +5 -4
- data/lib/seam/routes/access_methods.rb +20 -14
- data/lib/seam/routes/access_methods_unmanaged.rb +2 -2
- data/lib/seam/routes/acs_access_groups.rb +4 -4
- data/lib/seam/routes/acs_credentials.rb +4 -4
- data/lib/seam/routes/acs_encoders.rb +5 -5
- data/lib/seam/routes/acs_entrances.rb +6 -8
- data/lib/seam/routes/acs_systems.rb +3 -3
- data/lib/seam/routes/acs_users.rb +44 -34
- data/lib/seam/routes/action_attempts.rb +6 -5
- data/lib/seam/routes/cameras_live_views.rb +5 -5
- data/lib/seam/routes/client_sessions.rb +20 -21
- data/lib/seam/routes/connect_webviews.rb +3 -3
- data/lib/seam/routes/connected_accounts.rb +7 -5
- data/lib/seam/routes/customers.rb +4 -5
- data/lib/seam/routes/devices.rb +12 -10
- data/lib/seam/routes/devices_unmanaged.rb +7 -5
- data/lib/seam/routes/events.rb +16 -12
- data/lib/seam/routes/instant_keys.rb +7 -5
- data/lib/seam/routes/locks.rb +10 -8
- data/lib/seam/routes/locks_simulate.rb +2 -2
- data/lib/seam/routes/media.rb +1 -1
- data/lib/seam/routes/noise_sensors.rb +1 -1
- data/lib/seam/routes/noise_sensors_noise_thresholds.rb +9 -3
- data/lib/seam/routes/phones.rb +2 -2
- data/lib/seam/routes/phones_simulate.rb +1 -1
- data/lib/seam/routes/spaces.rb +18 -13
- data/lib/seam/routes/thermostats.rb +14 -18
- data/lib/seam/routes/thermostats_daily_programs.rb +2 -2
- data/lib/seam/routes/thermostats_schedules.rb +3 -3
- data/lib/seam/routes/user_identities.rb +24 -18
- data/lib/seam/routes/user_identities_unmanaged.rb +2 -2
- data/lib/seam/routes/webhooks.rb +3 -3
- data/lib/seam/routes/workspaces.rb +6 -16
- data/lib/seam/url_search_params_serializer.rb +2 -1
- data/lib/seam/version.rb +1 -1
- data/lib/seam/wait_for_action_attempt.rb +3 -1
- data/lib/seam/webhook.rb +25 -5
- data/lib/seam.rb +12 -6
- metadata +5 -2
data/lib/seam/paginator.rb
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
require "faraday"
|
|
4
|
-
require_relative "
|
|
4
|
+
require_relative "invalid_response_error"
|
|
5
5
|
|
|
6
6
|
module Seam
|
|
7
7
|
THREAD_CONTEXT_KEY = :seam_pagination_context
|
|
8
|
-
PaginationContext = Struct.new(:
|
|
8
|
+
PaginationContext = Struct.new(:body, :path)
|
|
9
9
|
|
|
10
10
|
class Paginator
|
|
11
11
|
def initialize(request, params = {})
|
|
@@ -33,40 +33,52 @@ module Seam
|
|
|
33
33
|
end
|
|
34
34
|
|
|
35
35
|
def flatten_to_list
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
all_items.concat(current_items) if current_items
|
|
36
|
+
walk.flat_map { |items, _pagination| items }
|
|
37
|
+
end
|
|
40
38
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
39
|
+
def flatten
|
|
40
|
+
Enumerator.new do |yielder|
|
|
41
|
+
walk.each { |items, _pagination| items.each { |item| yielder << item } }
|
|
44
42
|
end
|
|
45
|
-
|
|
46
|
-
all_items
|
|
47
43
|
end
|
|
48
44
|
|
|
49
|
-
|
|
45
|
+
private
|
|
46
|
+
|
|
47
|
+
def walk
|
|
50
48
|
Enumerator.new do |yielder|
|
|
51
|
-
|
|
52
|
-
|
|
49
|
+
items, pagination = first_page
|
|
50
|
+
yielder << [items || [], pagination]
|
|
51
|
+
|
|
52
|
+
seen_cursors = Set.new
|
|
53
|
+
|
|
54
|
+
while pagination&.has_next_page?
|
|
55
|
+
cursor = pagination.next_page_cursor
|
|
56
|
+
break if cursor.nil? || cursor.empty? || !seen_cursors.add?(cursor)
|
|
53
57
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
current_items&.each { |item| yielder << item }
|
|
58
|
+
items, pagination = next_page(cursor)
|
|
59
|
+
yielder << [items || [], pagination]
|
|
57
60
|
end
|
|
58
61
|
end
|
|
59
62
|
end
|
|
60
63
|
|
|
61
|
-
|
|
64
|
+
def read_pagination(body, path)
|
|
65
|
+
unless body.is_a?(Hash) && body.key?("pagination")
|
|
66
|
+
raise Http::InvalidResponseError.new(path, "pagination", "which the response does not contain")
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
pagination = body["pagination"]
|
|
70
|
+
return pagination if pagination.is_a?(Hash)
|
|
71
|
+
|
|
72
|
+
raise Http::InvalidResponseError.new(path, "pagination", "got #{pagination.class} instead of a pagination object")
|
|
73
|
+
end
|
|
62
74
|
|
|
63
75
|
def fetch_page(params)
|
|
64
|
-
context = PaginationContext.new(nil)
|
|
76
|
+
context = PaginationContext.new(nil, nil)
|
|
65
77
|
Thread.current[THREAD_CONTEXT_KEY] = context
|
|
66
78
|
|
|
67
79
|
begin
|
|
68
80
|
res_data = @request.call(**params)
|
|
69
|
-
pagination_result = Pagination.from_hash(context.
|
|
81
|
+
pagination_result = Pagination.from_hash(read_pagination(context.body, context.path))
|
|
70
82
|
[res_data, pagination_result]
|
|
71
83
|
ensure
|
|
72
84
|
Thread.current[THREAD_CONTEXT_KEY] = nil
|
|
@@ -95,15 +107,8 @@ module Seam
|
|
|
95
107
|
context = Thread.current[THREAD_CONTEXT_KEY]
|
|
96
108
|
return unless context.is_a?(PaginationContext)
|
|
97
109
|
|
|
98
|
-
|
|
99
|
-
context.
|
|
100
|
-
end
|
|
101
|
-
|
|
102
|
-
private
|
|
103
|
-
|
|
104
|
-
def extract_pagination(env)
|
|
105
|
-
body = env[:body]
|
|
106
|
-
body["pagination"] if body.is_a?(Hash) && body.key?("pagination")
|
|
110
|
+
context.body = env[:body]
|
|
111
|
+
context.path = env.url.path
|
|
107
112
|
end
|
|
108
113
|
end
|
|
109
114
|
end
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Seam
|
|
4
|
+
module RequestParameters
|
|
5
|
+
def self.require_at_least_one(path, parameters, parameter_names)
|
|
6
|
+
return if parameter_names.any? { |name| !parameters[name].nil? }
|
|
7
|
+
|
|
8
|
+
raise TypeError, "At least one parameter is required for #{path}"
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
@@ -154,11 +154,12 @@ module Seam
|
|
|
154
154
|
# List of fields that were changed externally, with their previous and new values.
|
|
155
155
|
# @return [Array<ModifiedFields>]
|
|
156
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.
|
|
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. `deactivated` means the code is still on the device but was disabled or suspended.
|
|
158
158
|
# @return [String, nil]
|
|
159
159
|
# Known values:
|
|
160
160
|
# - `modified`
|
|
161
161
|
# - `removed`
|
|
162
|
+
# - `deactivated`
|
|
162
163
|
attr_accessor :change_type
|
|
163
164
|
# Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
|
|
164
165
|
# @return [String]
|
|
@@ -212,7 +213,7 @@ module Seam
|
|
|
212
213
|
date_accessor :created_at
|
|
213
214
|
end
|
|
214
215
|
|
|
215
|
-
# Seam was unable to issue this access code before its start time, so the recipient may be unable to unlock the device. This usually points to a problem that needs attention, such as an offline or disconnected device.
|
|
216
|
+
# Seam was unable to issue this access code before its start time, so the recipient may be unable to unlock the device. This usually points to a problem that needs attention, such as an offline or disconnected device. This error clears automatically if the access code is eventually issued.
|
|
216
217
|
class FailedToIssue < Errors
|
|
217
218
|
# Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
|
|
218
219
|
# @return [String]
|
|
@@ -248,7 +249,7 @@ module Seam
|
|
|
248
249
|
date_accessor :created_at
|
|
249
250
|
end
|
|
250
251
|
|
|
251
|
-
#
|
|
252
|
+
# Seam was unable to remove this access code from the device in time after it was deleted or its `ends_at` passed, so the recipient may still be able to unlock the device. Seam keeps trying to delete it, and this error clears automatically once the access code is no longer usable on the device.
|
|
252
253
|
class FailedToDelete < Errors
|
|
253
254
|
# Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
|
|
254
255
|
# @return [String]
|
|
@@ -458,6 +459,24 @@ module Seam
|
|
|
458
459
|
date_accessor :created_at
|
|
459
460
|
end
|
|
460
461
|
|
|
462
|
+
# Indicates that the lock has about one week, two days, or a critically low amount of battery life remaining. Replace the lock's batteries promptly to avoid losing access.
|
|
463
|
+
class LowBattery < Errors
|
|
464
|
+
# Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
|
|
465
|
+
# @return [String]
|
|
466
|
+
# Known values:
|
|
467
|
+
# - `low_battery`
|
|
468
|
+
attr_accessor :error_code
|
|
469
|
+
# Indicates that the error is a device error.
|
|
470
|
+
# @return [TrueClass]
|
|
471
|
+
attr_accessor :is_device_error
|
|
472
|
+
# Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
|
|
473
|
+
# @return [String]
|
|
474
|
+
attr_accessor :message
|
|
475
|
+
# Date and time at which Seam created the error.
|
|
476
|
+
# @return [Time]
|
|
477
|
+
date_accessor :created_at
|
|
478
|
+
end
|
|
479
|
+
|
|
461
480
|
# Indicates that device credentials are missing.
|
|
462
481
|
class MissingDeviceCredentials < Errors
|
|
463
482
|
# Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
|
|
@@ -557,6 +576,7 @@ module Seam
|
|
|
557
576
|
# - `device_disconnected`
|
|
558
577
|
# - `empty_backup_access_code_pool`
|
|
559
578
|
# - `august_lock_not_authorized`
|
|
579
|
+
# - `low_battery`
|
|
560
580
|
# - `missing_device_credentials`
|
|
561
581
|
# - `auxiliary_heat_running`
|
|
562
582
|
# - `subscription_required`
|
|
@@ -591,6 +611,7 @@ module Seam
|
|
|
591
611
|
"device_disconnected" => DeviceDisconnected,
|
|
592
612
|
"empty_backup_access_code_pool" => EmptyBackupAccessCodePool,
|
|
593
613
|
"august_lock_not_authorized" => AugustLockNotAuthorized,
|
|
614
|
+
"low_battery" => LowBattery,
|
|
594
615
|
"missing_device_credentials" => MissingDeviceCredentials,
|
|
595
616
|
"auxiliary_heat_running" => AuxiliaryHeatRunning,
|
|
596
617
|
"subscription_required" => SubscriptionRequired,
|
|
@@ -633,6 +654,9 @@ module Seam
|
|
|
633
654
|
resource_accessor :from, From
|
|
634
655
|
# @return [To]
|
|
635
656
|
resource_accessor :to, To
|
|
657
|
+
# Indicates whether the access code may still unlock the device while Seam removes it, based on the last state Seam observed. `false` means the device has already stopped accepting the code, for example, because a natively scheduled code passed its `ends_at`, and only cleanup remains.
|
|
658
|
+
# @return [Boolean]
|
|
659
|
+
attr_accessor :is_code_usable
|
|
636
660
|
# Detailed description of the mutation.
|
|
637
661
|
# @return [String]
|
|
638
662
|
attr_accessor :message
|
|
@@ -697,11 +721,12 @@ module Seam
|
|
|
697
721
|
# List of fields that were changed externally, with their previous and new values.
|
|
698
722
|
# @return [Array<ModifiedFields>]
|
|
699
723
|
resource_list_accessor :modified_fields, ModifiedFields
|
|
700
|
-
# 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.
|
|
724
|
+
# 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. `deactivated` means the code is still on the device but was disabled or suspended.
|
|
701
725
|
# @return [String, nil]
|
|
702
726
|
# Known values:
|
|
703
727
|
# - `modified`
|
|
704
728
|
# - `removed`
|
|
729
|
+
# - `deactivated`
|
|
705
730
|
attr_accessor :change_type
|
|
706
731
|
# Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
|
|
707
732
|
# @return [String]
|
|
@@ -821,7 +846,7 @@ module Seam
|
|
|
821
846
|
date_accessor :created_at
|
|
822
847
|
end
|
|
823
848
|
|
|
824
|
-
# Access code is being deleted.
|
|
849
|
+
# Access code is being deleted, because it was deleted or passed its `ends_at`. It can no longer be updated.
|
|
825
850
|
class BeingDeleted < Warnings
|
|
826
851
|
# Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
|
|
827
852
|
# @return [String]
|
|
@@ -836,6 +861,24 @@ module Seam
|
|
|
836
861
|
date_accessor :created_at
|
|
837
862
|
end
|
|
838
863
|
|
|
864
|
+
# Seam had been unable to reach the device for an extended period when this access code was created, so the code is unlikely to be set until the device reconnects. Check the device's connection. This warning clears automatically when the device comes back online or the code is set on the device.
|
|
865
|
+
class DeviceUnreachableForExtendedPeriod < Warnings
|
|
866
|
+
# Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
|
|
867
|
+
# @return [String]
|
|
868
|
+
attr_accessor :message
|
|
869
|
+
# Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
|
|
870
|
+
# @return [String]
|
|
871
|
+
# Known values:
|
|
872
|
+
# - `device_unreachable_for_extended_period`
|
|
873
|
+
attr_accessor :warning_code
|
|
874
|
+
# Date and time at which Seam created the warning.
|
|
875
|
+
# @return [Time, nil]
|
|
876
|
+
date_accessor :created_at
|
|
877
|
+
# Date and time since which Seam has been unable to reach the device.
|
|
878
|
+
# @return [Time]
|
|
879
|
+
date_accessor :device_unreachable_since
|
|
880
|
+
end
|
|
881
|
+
|
|
839
882
|
# An unknown issue occurred with the access code.
|
|
840
883
|
class UnknownIssueWithAccessCode < Warnings
|
|
841
884
|
# Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
|
|
@@ -868,6 +911,7 @@ module Seam
|
|
|
868
911
|
# - `management_transferred`
|
|
869
912
|
# - `using_backup_access_code`
|
|
870
913
|
# - `being_deleted`
|
|
914
|
+
# - `device_unreachable_for_extended_period`
|
|
871
915
|
# - `unknown_issue_with_access_code`
|
|
872
916
|
attr_accessor :warning_code
|
|
873
917
|
# Date and time at which Seam created the warning.
|
|
@@ -886,6 +930,7 @@ module Seam
|
|
|
886
930
|
"management_transferred" => ManagementTransferred,
|
|
887
931
|
"using_backup_access_code" => UsingBackupAccessCode,
|
|
888
932
|
"being_deleted" => BeingDeleted,
|
|
933
|
+
"device_unreachable_for_extended_period" => DeviceUnreachableForExtendedPeriod,
|
|
889
934
|
"unknown_issue_with_access_code" => UnknownIssueWithAccessCode
|
|
890
935
|
}.freeze
|
|
891
936
|
end
|
|
@@ -283,6 +283,39 @@ module Seam
|
|
|
283
283
|
date_accessor :created_at
|
|
284
284
|
end
|
|
285
285
|
|
|
286
|
+
# Indicates that one of this access grant's access methods no longer grants access because of a change outside Seam, for example its card was encoded again for another credential. Seam does not replace the access method; issue a new one if the user still needs it.
|
|
287
|
+
class AccessRevoked < Warnings
|
|
288
|
+
# ID of the access method whose access was revoked.
|
|
289
|
+
# @return [String]
|
|
290
|
+
attr_accessor :access_method_id
|
|
291
|
+
# Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
|
|
292
|
+
# @return [String]
|
|
293
|
+
attr_accessor :message
|
|
294
|
+
# Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
|
|
295
|
+
# @return [String]
|
|
296
|
+
# Known values:
|
|
297
|
+
# - `access_revoked`
|
|
298
|
+
attr_accessor :warning_code
|
|
299
|
+
# Date and time at which Seam created the warning.
|
|
300
|
+
# @return [Time]
|
|
301
|
+
date_accessor :created_at
|
|
302
|
+
end
|
|
303
|
+
|
|
304
|
+
# Indicates that Seam did not issue the mobile key requested for this access grant, because the user's email address or phone number belongs to other user identities and Seam cannot tell which person's app should receive it. The other requested access methods were issued.
|
|
305
|
+
class MobileKeyWithheld < Warnings
|
|
306
|
+
# Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
|
|
307
|
+
# @return [String]
|
|
308
|
+
attr_accessor :message
|
|
309
|
+
# Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
|
|
310
|
+
# @return [String]
|
|
311
|
+
# Known values:
|
|
312
|
+
# - `mobile_key_withheld`
|
|
313
|
+
attr_accessor :warning_code
|
|
314
|
+
# Date and time at which Seam created the warning.
|
|
315
|
+
# @return [Time]
|
|
316
|
+
date_accessor :created_at
|
|
317
|
+
end
|
|
318
|
+
|
|
286
319
|
# Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
|
|
287
320
|
# @return [String]
|
|
288
321
|
attr_accessor :message
|
|
@@ -296,6 +329,8 @@ module Seam
|
|
|
296
329
|
# - `requested_code_unavailable`
|
|
297
330
|
# - `device_does_not_support_access_codes`
|
|
298
331
|
# - `device_time_constraints_violated`
|
|
332
|
+
# - `access_revoked`
|
|
333
|
+
# - `mobile_key_withheld`
|
|
299
334
|
attr_accessor :warning_code
|
|
300
335
|
# Date and time at which Seam created the warning.
|
|
301
336
|
# @return [Time]
|
|
@@ -308,7 +343,9 @@ module Seam
|
|
|
308
343
|
"updating_access_times" => UpdatingAccessTimes,
|
|
309
344
|
"requested_code_unavailable" => RequestedCodeUnavailable,
|
|
310
345
|
"device_does_not_support_access_codes" => DeviceDoesNotSupportAccessCodes,
|
|
311
|
-
"device_time_constraints_violated" => DeviceTimeConstraintsViolated
|
|
346
|
+
"device_time_constraints_violated" => DeviceTimeConstraintsViolated,
|
|
347
|
+
"access_revoked" => AccessRevoked,
|
|
348
|
+
"mobile_key_withheld" => MobileKeyWithheld
|
|
312
349
|
}.freeze
|
|
313
350
|
end
|
|
314
351
|
|
|
@@ -348,9 +385,6 @@ module Seam
|
|
|
348
385
|
# Instant Key URL. Only returned if the Access Grant has a single mobile_key access_method.
|
|
349
386
|
# @return [String, nil]
|
|
350
387
|
attr_accessor :instant_key_url
|
|
351
|
-
# @return [Array<String>]
|
|
352
|
-
# @deprecated Use `space_ids`.
|
|
353
|
-
attr_accessor :location_ids
|
|
354
388
|
# Name of the Access Grant. If not provided, the display name will be computed.
|
|
355
389
|
# @return [String, nil]
|
|
356
390
|
attr_accessor :name
|
|
@@ -210,6 +210,21 @@ module Seam
|
|
|
210
210
|
date_accessor :created_at
|
|
211
211
|
end
|
|
212
212
|
|
|
213
|
+
# Indicates that the access system can only end card access on fixed time marks, so access was extended past `ends_at` to the next mark. The message states when access actually ends.
|
|
214
|
+
class ScheduleRoundedUp < Warnings
|
|
215
|
+
# Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
|
|
216
|
+
# @return [String]
|
|
217
|
+
attr_accessor :message
|
|
218
|
+
# Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
|
|
219
|
+
# @return [String]
|
|
220
|
+
# Known values:
|
|
221
|
+
# - `schedule_rounded_up`
|
|
222
|
+
attr_accessor :warning_code
|
|
223
|
+
# Date and time at which Seam created the warning.
|
|
224
|
+
# @return [Time]
|
|
225
|
+
date_accessor :created_at
|
|
226
|
+
end
|
|
227
|
+
|
|
213
228
|
# Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
|
|
214
229
|
# @return [String]
|
|
215
230
|
attr_accessor :message
|
|
@@ -223,6 +238,7 @@ module Seam
|
|
|
223
238
|
# - `user_identity_missing_email_address`
|
|
224
239
|
# - `user_identity_missing_phone_number`
|
|
225
240
|
# - `requested_code_unavailable`
|
|
241
|
+
# - `schedule_rounded_up`
|
|
226
242
|
attr_accessor :warning_code
|
|
227
243
|
# Date and time at which Seam created the warning.
|
|
228
244
|
# @return [Time]
|
|
@@ -235,7 +251,8 @@ module Seam
|
|
|
235
251
|
"delay_in_issuing" => DelayInIssuing,
|
|
236
252
|
"user_identity_missing_email_address" => UserIdentityMissingEmailAddress,
|
|
237
253
|
"user_identity_missing_phone_number" => UserIdentityMissingPhoneNumber,
|
|
238
|
-
"requested_code_unavailable" => RequestedCodeUnavailable
|
|
254
|
+
"requested_code_unavailable" => RequestedCodeUnavailable,
|
|
255
|
+
"schedule_rounded_up" => ScheduleRoundedUp
|
|
239
256
|
}.freeze
|
|
240
257
|
end
|
|
241
258
|
|
|
@@ -140,23 +140,6 @@ module Seam
|
|
|
140
140
|
# Warnings associated with the `acs_access_group`.
|
|
141
141
|
# @return [Array<Warnings>]
|
|
142
142
|
resource_list_accessor :warnings, Warnings
|
|
143
|
-
# @return [String]
|
|
144
|
-
# Known values:
|
|
145
|
-
# - `pti_unit`
|
|
146
|
-
# - `pti_access_level`
|
|
147
|
-
# - `salto_ks_access_group`
|
|
148
|
-
# - `brivo_group`
|
|
149
|
-
# - `salto_space_group`
|
|
150
|
-
# - `dormakaba_community_access_group`
|
|
151
|
-
# - `dormakaba_ambiance_access_group`
|
|
152
|
-
# - `avigilon_alta_group`
|
|
153
|
-
# - `kisi_access_group`
|
|
154
|
-
# - `akiles_member_group`
|
|
155
|
-
# @deprecated Use `external_type`.
|
|
156
|
-
attr_accessor :access_group_type
|
|
157
|
-
# @return [String]
|
|
158
|
-
# @deprecated Use `external_type_display_name`.
|
|
159
|
-
attr_accessor :access_group_type_display_name
|
|
160
143
|
# ID of the access group.
|
|
161
144
|
# @return [String]
|
|
162
145
|
attr_accessor :acs_access_group_id
|
|
@@ -190,6 +190,21 @@ module Seam
|
|
|
190
190
|
date_accessor :created_at
|
|
191
191
|
end
|
|
192
192
|
|
|
193
|
+
# Indicates that the access system can only end card access on fixed time marks, so access was extended past `ends_at` to the next mark. The message states when access actually ends.
|
|
194
|
+
class ScheduleRoundedUp < Warnings
|
|
195
|
+
# Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
|
|
196
|
+
# @return [String]
|
|
197
|
+
attr_accessor :message
|
|
198
|
+
# Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
|
|
199
|
+
# @return [String]
|
|
200
|
+
# Known values:
|
|
201
|
+
# - `schedule_rounded_up`
|
|
202
|
+
attr_accessor :warning_code
|
|
203
|
+
# Date and time at which Seam created the warning.
|
|
204
|
+
# @return [Time]
|
|
205
|
+
date_accessor :created_at
|
|
206
|
+
end
|
|
207
|
+
|
|
193
208
|
# Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
|
|
194
209
|
# @return [String]
|
|
195
210
|
attr_accessor :message
|
|
@@ -203,6 +218,7 @@ module Seam
|
|
|
203
218
|
# - `unknown_issue_with_acs_credential`
|
|
204
219
|
# - `needs_to_be_reissued`
|
|
205
220
|
# - `requested_code_unavailable`
|
|
221
|
+
# - `schedule_rounded_up`
|
|
206
222
|
attr_accessor :warning_code
|
|
207
223
|
# Date and time at which Seam created the warning.
|
|
208
224
|
# @return [Time]
|
|
@@ -215,7 +231,8 @@ module Seam
|
|
|
215
231
|
"being_deleted" => BeingDeleted,
|
|
216
232
|
"unknown_issue_with_acs_credential" => UnknownIssueWithAcsCredential,
|
|
217
233
|
"needs_to_be_reissued" => NeedsToBeReissued,
|
|
218
|
-
"requested_code_unavailable" => RequestedCodeUnavailable
|
|
234
|
+
"requested_code_unavailable" => RequestedCodeUnavailable,
|
|
235
|
+
"schedule_rounded_up" => ScheduleRoundedUp
|
|
219
236
|
}.freeze
|
|
220
237
|
end
|
|
221
238
|
|
|
@@ -243,7 +243,7 @@ module Seam
|
|
|
243
243
|
|
|
244
244
|
# Known `warning_code` values load as subclasses; unknown values remain Warnings instances for forward compatibility.
|
|
245
245
|
class Warnings < BaseResource
|
|
246
|
-
# Indicates that a change in the reported device model has been detected for this Salto KS entrance, which may occur after an IQ hub reset. Access code support may be affected. See https://
|
|
246
|
+
# Indicates that a change in the reported device model has been detected for this Salto KS entrance, which may occur after an IQ hub reset. Access code support may be affected. See https://www.seam.co/help/salto-ks-lock-loses-access-code-support for troubleshooting steps.
|
|
247
247
|
class SaltoKsEntranceAccessCodeSupportRemoved < Warnings
|
|
248
248
|
# Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
|
|
249
249
|
# @return [String]
|
|
@@ -238,14 +238,26 @@ module Seam
|
|
|
238
238
|
date_accessor :created_at
|
|
239
239
|
end
|
|
240
240
|
|
|
241
|
+
# Indicates that the Salto KS site does not accept custom PIN codes, either because its Salto subscription does not include the Custom PIN feature or because Custom PIN is turned off in the site's settings. Salto KS generates every PIN on the site, so a PIN code requested on an access grant or reservation is replaced with a Salto-generated one. The message says which of the two applies.
|
|
242
|
+
class SaltoKsCustomPinsNotSupported < Warnings
|
|
243
|
+
# Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
|
|
244
|
+
# @return [String]
|
|
245
|
+
attr_accessor :message
|
|
246
|
+
# Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
|
|
247
|
+
# @return [String]
|
|
248
|
+
# Known values:
|
|
249
|
+
# - `salto_ks_custom_pins_not_supported`
|
|
250
|
+
attr_accessor :warning_code
|
|
251
|
+
# Date and time at which Seam created the warning.
|
|
252
|
+
# @return [Time]
|
|
253
|
+
date_accessor :created_at
|
|
254
|
+
end
|
|
255
|
+
|
|
241
256
|
# Indicates the [access control system](https://www.seam.co/docs/low-level-apis/access-systems) time zone could not be determined because the reported physical location does not match the time zone configured on the physical [ACS entrances](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details).
|
|
242
257
|
class TimeZoneDoesNotMatchLocation < Warnings
|
|
243
258
|
# Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
|
|
244
259
|
# @return [String]
|
|
245
260
|
attr_accessor :message
|
|
246
|
-
# @return [Array<String>]
|
|
247
|
-
# @deprecated this field is deprecated.
|
|
248
|
-
attr_accessor :misconfigured_acs_entrance_ids
|
|
249
261
|
# Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
|
|
250
262
|
# @return [String]
|
|
251
263
|
# Known values:
|
|
@@ -293,6 +305,7 @@ module Seam
|
|
|
293
305
|
# @return [String]
|
|
294
306
|
# Known values:
|
|
295
307
|
# - `salto_ks_subscription_limit_almost_reached`
|
|
308
|
+
# - `salto_ks_custom_pins_not_supported`
|
|
296
309
|
# - `time_zone_does_not_match_location`
|
|
297
310
|
# - `setup_required`
|
|
298
311
|
# - `unknown_issue_with_acs_system`
|
|
@@ -303,6 +316,7 @@ module Seam
|
|
|
303
316
|
|
|
304
317
|
discriminated_by :warning_code, {
|
|
305
318
|
"salto_ks_subscription_limit_almost_reached" => SaltoKsSubscriptionLimitAlmostReached,
|
|
319
|
+
"salto_ks_custom_pins_not_supported" => SaltoKsCustomPinsNotSupported,
|
|
306
320
|
"time_zone_does_not_match_location" => TimeZoneDoesNotMatchLocation,
|
|
307
321
|
"setup_required" => SetupRequired,
|
|
308
322
|
"unknown_issue_with_acs_system" => UnknownIssueWithAcsSystem
|
|
@@ -333,10 +347,6 @@ module Seam
|
|
|
333
347
|
# ID of the connected account associated with the [access control system](https://www.seam.co/docs/low-level-apis/access-systems).
|
|
334
348
|
# @return [String]
|
|
335
349
|
attr_accessor :connected_account_id
|
|
336
|
-
# IDs of the [connected accounts](https://www.seam.co/docs/core-concepts/connected-accounts) associated with the [access control system](https://www.seam.co/docs/low-level-apis/access-systems).
|
|
337
|
-
# @return [Array<String>]
|
|
338
|
-
# @deprecated Use `connected_account_id`.
|
|
339
|
-
attr_accessor :connected_account_ids
|
|
340
350
|
# ID of the default credential manager `acs_system` for this [access control system](https://www.seam.co/docs/low-level-apis/access-systems).
|
|
341
351
|
# @return [String, nil]
|
|
342
352
|
attr_accessor :default_credential_manager_acs_system_id
|
|
@@ -376,30 +386,6 @@ module Seam
|
|
|
376
386
|
# Name of the [access control system](https://www.seam.co/docs/low-level-apis/access-systems).
|
|
377
387
|
# @return [String]
|
|
378
388
|
attr_accessor :name
|
|
379
|
-
# @return [String, nil]
|
|
380
|
-
# Known values:
|
|
381
|
-
# - `pti_site`
|
|
382
|
-
# - `avigilon_alta_org`
|
|
383
|
-
# - `salto_ks_site`
|
|
384
|
-
# - `salto_space_system`
|
|
385
|
-
# - `brivo_account`
|
|
386
|
-
# - `hid_credential_manager_organization`
|
|
387
|
-
# - `visionline_system`
|
|
388
|
-
# - `assa_abloy_credential_service`
|
|
389
|
-
# - `latch_building`
|
|
390
|
-
# - `dormakaba_community_site`
|
|
391
|
-
# - `dormakaba_ambiance_site`
|
|
392
|
-
# - `legic_connect_credential_service`
|
|
393
|
-
# - `assa_abloy_vostio`
|
|
394
|
-
# - `assa_abloy_vostio_credential_service`
|
|
395
|
-
# - `hotek_site`
|
|
396
|
-
# - `kisi_organization`
|
|
397
|
-
# - `akiles_organization`
|
|
398
|
-
# @deprecated Use `external_type`.
|
|
399
|
-
attr_accessor :system_type
|
|
400
|
-
# @return [String, nil]
|
|
401
|
-
# @deprecated Use `external_type_display_name`.
|
|
402
|
-
attr_accessor :system_type_display_name
|
|
403
389
|
# ID of the workspace that contains the [access control system](https://www.seam.co/docs/low-level-apis/access-systems).
|
|
404
390
|
# @return [String]
|
|
405
391
|
attr_accessor :workspace_id
|
|
@@ -351,9 +351,6 @@ module Seam
|
|
|
351
351
|
# Display name for the [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management).
|
|
352
352
|
# @return [String]
|
|
353
353
|
attr_accessor :display_name
|
|
354
|
-
# @return [String, nil]
|
|
355
|
-
# @deprecated use email_address.
|
|
356
|
-
attr_accessor :email
|
|
357
354
|
# Email address of the [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management).
|
|
358
355
|
# @return [String, nil]
|
|
359
356
|
attr_accessor :email_address
|