seam 2.138.0 → 2.140.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 +69 -66
- data/README.md +12 -0
- data/lib/seam/http_single_workspace.rb +34 -2
- data/lib/seam/http_without_workspace.rb +41 -12
- data/lib/seam/paginator.rb +4 -1
- data/lib/seam/request.rb +5 -1
- data/lib/seam/resources/access_code.rb +74 -0
- data/lib/seam/resources/access_grant.rb +60 -0
- data/lib/seam/resources/access_method.rb +39 -0
- data/lib/seam/resources/acs_access_group.rb +45 -0
- data/lib/seam/resources/acs_credential.rb +67 -0
- data/lib/seam/resources/acs_encoder.rb +11 -0
- data/lib/seam/resources/acs_entrance.rb +95 -0
- data/lib/seam/resources/acs_system.rb +36 -0
- data/lib/seam/resources/acs_user.rb +66 -0
- data/lib/seam/resources/action_attempt.rb +192 -0
- data/lib/seam/resources/batch.rb +24 -0
- data/lib/seam/resources/client_session.rb +12 -0
- data/lib/seam/resources/connect_webview.rb +19 -0
- data/lib/seam/resources/connected_account.rb +50 -0
- data/lib/seam/resources/customer_portal.rb +5 -0
- data/lib/seam/resources/device.rb +622 -4
- data/lib/seam/resources/device_provider.rb +24 -0
- data/lib/seam/resources/event.rb +142 -3
- data/lib/seam/resources/instant_key.rb +13 -0
- data/lib/seam/resources/noise_threshold.rb +7 -0
- data/lib/seam/resources/pagination.rb +3 -0
- data/lib/seam/resources/phone.rb +29 -0
- data/lib/seam/resources/space.rb +19 -0
- data/lib/seam/resources/thermostat_daily_program.rb +9 -0
- data/lib/seam/resources/thermostat_schedule.rb +15 -0
- data/lib/seam/resources/unmanaged_access_code.rb +51 -0
- data/lib/seam/resources/unmanaged_access_grant.rb +56 -0
- data/lib/seam/resources/unmanaged_access_method.rb +36 -0
- data/lib/seam/resources/unmanaged_device.rb +80 -0
- data/lib/seam/resources/unmanaged_user_identity.rb +20 -0
- data/lib/seam/resources/user_identity.rb +21 -0
- data/lib/seam/resources/webhook.rb +4 -0
- data/lib/seam/resources/workspace.rb +15 -0
- data/lib/seam/routes/access_codes.rb +79 -79
- data/lib/seam/routes/access_codes_simulate.rb +3 -3
- data/lib/seam/routes/access_codes_unmanaged.rb +27 -23
- data/lib/seam/routes/access_grants.rb +57 -45
- data/lib/seam/routes/access_grants_unmanaged.rb +13 -13
- data/lib/seam/routes/access_methods.rb +32 -24
- data/lib/seam/routes/access_methods_unmanaged.rb +7 -7
- data/lib/seam/routes/acs_access_groups.rb +21 -21
- data/lib/seam/routes/acs_credentials.rb +40 -40
- data/lib/seam/routes/acs_encoders.rb +16 -16
- data/lib/seam/routes/acs_encoders_simulate.rb +11 -11
- data/lib/seam/routes/acs_entrances.rb +20 -20
- data/lib/seam/routes/acs_systems.rb +11 -11
- data/lib/seam/routes/acs_users.rb +83 -55
- data/lib/seam/routes/action_attempts.rb +6 -6
- data/lib/seam/routes/client_sessions.rb +38 -34
- data/lib/seam/routes/connect_webviews.rb +20 -20
- data/lib/seam/routes/connected_accounts.rb +24 -20
- data/lib/seam/routes/connected_accounts_simulate.rb +1 -1
- data/lib/seam/routes/customers.rb +50 -50
- data/lib/seam/routes/devices.rb +33 -29
- data/lib/seam/routes/devices_simulate.rb +7 -7
- data/lib/seam/routes/devices_unmanaged.rb +25 -26
- data/lib/seam/routes/events.rb +40 -32
- data/lib/seam/routes/instant_keys.rb +11 -7
- data/lib/seam/routes/locks.rb +20 -27
- data/lib/seam/routes/locks_simulate.rb +3 -3
- data/lib/seam/routes/noise_sensors.rb +8 -19
- data/lib/seam/routes/noise_sensors_noise_thresholds.rb +21 -21
- data/lib/seam/routes/noise_sensors_simulate.rb +1 -1
- data/lib/seam/routes/phones.rb +7 -7
- data/lib/seam/routes/phones_simulate.rb +4 -4
- data/lib/seam/routes/spaces.rb +53 -45
- data/lib/seam/routes/thermostats.rb +75 -86
- data/lib/seam/routes/thermostats_daily_programs.rb +9 -9
- data/lib/seam/routes/thermostats_schedules.rb +22 -22
- data/lib/seam/routes/thermostats_simulate.rb +9 -9
- data/lib/seam/routes/user_identities.rb +50 -46
- data/lib/seam/routes/user_identities_unmanaged.rb +11 -11
- data/lib/seam/routes/webhooks.rb +10 -10
- data/lib/seam/routes/workspaces.rb +19 -19
- data/lib/seam/version.rb +1 -1
- metadata +8 -11
data/lib/seam/routes/events.rb
CHANGED
|
@@ -9,47 +9,55 @@ module Seam
|
|
|
9
9
|
end
|
|
10
10
|
|
|
11
11
|
# Returns a specified event. This endpoint returns the same event that would be sent to a [webhook](https://docs.seam.co/developer-tools/webhooks), but it enables you to retrieve an event that already took place.
|
|
12
|
-
# @param event_id Unique identifier for the event that you want to get.
|
|
13
|
-
# @param device_id Unique identifier for the device that triggered the event that you want to get.
|
|
14
|
-
# @param event_type Type of the event that you want to get.
|
|
12
|
+
# @param event_id [String, nil] Unique identifier for the event that you want to get.
|
|
13
|
+
# @param device_id [String, nil] Unique identifier for the device that triggered the event that you want to get.
|
|
14
|
+
# @param event_type [String, nil] Type of the event that you want to get.
|
|
15
15
|
# @return [Seam::Resources::SeamEvent] OK
|
|
16
16
|
def get(event_id: nil, device_id: nil, event_type: nil)
|
|
17
|
-
|
|
17
|
+
if event_id.nil? && device_id.nil? && event_type.nil?
|
|
18
|
+
raise TypeError, "At least one parameter is required for /events/get"
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
res = @client.get("/events/get", {event_id: event_id, device_id: device_id, event_type: event_type}.compact)
|
|
18
22
|
|
|
19
23
|
Seam::Resources::SeamEvent.load_from_response(res.body["event"])
|
|
20
24
|
end
|
|
21
25
|
|
|
22
26
|
# Returns a list of all events. This endpoint returns the same events that would be sent to a [webhook](https://docs.seam.co/developer-tools/webhooks), but it enables you to filter or see events that already took place.
|
|
23
|
-
# @param access_code_id ID of the access code for which you want to list events.
|
|
24
|
-
# @param access_code_ids IDs of the access codes for which you want to list events.
|
|
25
|
-
# @param access_grant_id ID of the access grant for which you want to list events.
|
|
26
|
-
# @param access_grant_ids IDs of the access grants for which you want to list events.
|
|
27
|
-
# @param access_method_id ID of the access method for which you want to list events.
|
|
28
|
-
# @param access_method_ids IDs of the access methods for which you want to list events.
|
|
29
|
-
# @param acs_access_group_id ID of the ACS access group for which you want to list events.
|
|
30
|
-
# @param acs_credential_id ID of the ACS credential for which you want to list events.
|
|
31
|
-
# @param acs_encoder_id ID of the ACS encoder for which you want to list events.
|
|
32
|
-
# @param acs_entrance_id ID of the ACS entrance for which you want to list events.
|
|
33
|
-
# @param acs_system_id ID of the access system for which you want to list events.
|
|
34
|
-
# @param acs_system_ids IDs of the access systems for which you want to list events.
|
|
35
|
-
# @param acs_user_id ID of the ACS user for which you want to list events.
|
|
36
|
-
# @param between Lower and upper timestamps to define an exclusive interval containing the events that you want to list. You must include `since` or `between`.
|
|
37
|
-
# @param connect_webview_id ID of the Connect Webview for which you want to list events.
|
|
38
|
-
# @param connected_account_id ID of the connected account for which you want to list events.
|
|
39
|
-
# @param customer_key Customer key for which you want to list events.
|
|
40
|
-
# @param device_id ID of the device for which you want to list events.
|
|
41
|
-
# @param device_ids IDs of the devices for which you want to list events.
|
|
42
|
-
# @param event_ids IDs of the events that you want to list.
|
|
43
|
-
# @param event_type Type of the events that you want to list.
|
|
44
|
-
# @param event_types Types of the events that you want to list.
|
|
45
|
-
# @param limit Numerical limit on the number of events to return.
|
|
46
|
-
# @param since Timestamp to indicate the beginning generation time for the events that you want to list. You must include `since` or `between`.
|
|
47
|
-
# @param space_id ID of the space for which you want to list events.
|
|
48
|
-
# @param space_ids IDs of the spaces for which you want to list events.
|
|
49
|
-
# @param unstable_offset Offset for the events that you want to list.
|
|
50
|
-
# @param user_identity_id ID of the user identity for which you want to list events.
|
|
27
|
+
# @param access_code_id [String, nil] ID of the access code for which you want to list events.
|
|
28
|
+
# @param access_code_ids [Array<String>, nil] IDs of the access codes for which you want to list events.
|
|
29
|
+
# @param access_grant_id [String, nil] ID of the access grant for which you want to list events.
|
|
30
|
+
# @param access_grant_ids [Array<String>, nil] IDs of the access grants for which you want to list events.
|
|
31
|
+
# @param access_method_id [String, nil] ID of the access method for which you want to list events.
|
|
32
|
+
# @param access_method_ids [Array<String>, nil] IDs of the access methods for which you want to list events.
|
|
33
|
+
# @param acs_access_group_id [String, nil] ID of the ACS access group for which you want to list events.
|
|
34
|
+
# @param acs_credential_id [String, nil] ID of the ACS credential for which you want to list events.
|
|
35
|
+
# @param acs_encoder_id [String, nil] ID of the ACS encoder for which you want to list events.
|
|
36
|
+
# @param acs_entrance_id [String, nil] ID of the ACS entrance for which you want to list events.
|
|
37
|
+
# @param acs_system_id [String, nil] ID of the access system for which you want to list events.
|
|
38
|
+
# @param acs_system_ids [Array<String>, nil] IDs of the access systems for which you want to list events.
|
|
39
|
+
# @param acs_user_id [String, nil] ID of the ACS user for which you want to list events.
|
|
40
|
+
# @param between [Array<Time>, nil] Lower and upper timestamps to define an exclusive interval containing the events that you want to list. You must include `since` or `between`.
|
|
41
|
+
# @param connect_webview_id [String, nil] ID of the Connect Webview for which you want to list events.
|
|
42
|
+
# @param connected_account_id [String, nil] ID of the connected account for which you want to list events.
|
|
43
|
+
# @param customer_key [String, nil] Customer key for which you want to list events.
|
|
44
|
+
# @param device_id [String, nil] ID of the device for which you want to list events.
|
|
45
|
+
# @param device_ids [Array<String>, nil] IDs of the devices for which you want to list events.
|
|
46
|
+
# @param event_ids [Array<String>, nil] IDs of the events that you want to list.
|
|
47
|
+
# @param event_type [String, nil] Type of the events that you want to list.
|
|
48
|
+
# @param event_types [Array<String>, nil] Types of the events that you want to list.
|
|
49
|
+
# @param limit [Float, nil] Numerical limit on the number of events to return.
|
|
50
|
+
# @param since [String, nil] Timestamp to indicate the beginning generation time for the events that you want to list. You must include `since` or `between`.
|
|
51
|
+
# @param space_id [String, nil] ID of the space for which you want to list events.
|
|
52
|
+
# @param space_ids [Array<String>, nil] IDs of the spaces for which you want to list events.
|
|
53
|
+
# @param unstable_offset [Float, nil] Offset for the events that you want to list.
|
|
54
|
+
# @param user_identity_id [String, nil] ID of the user identity for which you want to list events.
|
|
51
55
|
# @return [Seam::Resources::SeamEvent] OK
|
|
52
56
|
def list(access_code_id: nil, access_code_ids: nil, access_grant_id: nil, access_grant_ids: nil, access_method_id: nil, access_method_ids: nil, acs_access_group_id: nil, acs_credential_id: nil, acs_encoder_id: nil, acs_entrance_id: nil, acs_system_id: nil, acs_system_ids: nil, acs_user_id: nil, between: nil, connect_webview_id: nil, connected_account_id: nil, customer_key: nil, device_id: nil, device_ids: nil, event_ids: nil, event_type: nil, event_types: nil, limit: nil, since: nil, space_id: nil, space_ids: nil, unstable_offset: nil, user_identity_id: nil)
|
|
57
|
+
if access_code_id.nil? && access_code_ids.nil? && access_grant_id.nil? && access_grant_ids.nil? && access_method_id.nil? && access_method_ids.nil? && acs_access_group_id.nil? && acs_credential_id.nil? && acs_encoder_id.nil? && acs_entrance_id.nil? && acs_system_id.nil? && acs_system_ids.nil? && acs_user_id.nil? && between.nil? && connect_webview_id.nil? && connected_account_id.nil? && customer_key.nil? && device_id.nil? && device_ids.nil? && event_ids.nil? && event_type.nil? && event_types.nil? && limit.nil? && since.nil? && space_id.nil? && space_ids.nil? && unstable_offset.nil? && user_identity_id.nil?
|
|
58
|
+
raise TypeError, "At least one parameter is required for /events/list"
|
|
59
|
+
end
|
|
60
|
+
|
|
53
61
|
res = @client.post("/events/list", {access_code_id: access_code_id, access_code_ids: access_code_ids, access_grant_id: access_grant_id, access_grant_ids: access_grant_ids, access_method_id: access_method_id, access_method_ids: access_method_ids, acs_access_group_id: acs_access_group_id, acs_credential_id: acs_credential_id, acs_encoder_id: acs_encoder_id, acs_entrance_id: acs_entrance_id, acs_system_id: acs_system_id, acs_system_ids: acs_system_ids, acs_user_id: acs_user_id, between: between, connect_webview_id: connect_webview_id, connected_account_id: connected_account_id, customer_key: customer_key, device_id: device_id, device_ids: device_ids, event_ids: event_ids, event_type: event_type, event_types: event_types, limit: limit, since: since, space_id: space_id, space_ids: space_ids, unstable_offset: unstable_offset, user_identity_id: user_identity_id}.compact)
|
|
54
62
|
|
|
55
63
|
Seam::Resources::SeamEvent.load_from_response(res.body["events"])
|
|
@@ -9,29 +9,33 @@ module Seam
|
|
|
9
9
|
end
|
|
10
10
|
|
|
11
11
|
# Deletes a specified [Instant Key](https://docs.seam.co/capability-guides/instant-keys).
|
|
12
|
-
# @param instant_key_id ID of the Instant Key that you want to delete.
|
|
12
|
+
# @param instant_key_id [String] ID of the Instant Key that you want to delete.
|
|
13
13
|
# @return [nil] OK
|
|
14
14
|
def delete(instant_key_id:)
|
|
15
|
-
@client.
|
|
15
|
+
@client.delete("/instant_keys/delete", {instant_key_id: instant_key_id}.compact)
|
|
16
16
|
|
|
17
17
|
nil
|
|
18
18
|
end
|
|
19
19
|
|
|
20
20
|
# Gets an [instant key](https://docs.seam.co/capability-guides/instant-keys).
|
|
21
|
-
# @param instant_key_id ID of the instant key to get.
|
|
22
|
-
# @param instant_key_url URL of the instant key to get.
|
|
21
|
+
# @param instant_key_id [String, nil] ID of the instant key to get.
|
|
22
|
+
# @param instant_key_url [String, nil] URL of the instant key to get.
|
|
23
23
|
# @return [Seam::Resources::InstantKey] OK
|
|
24
24
|
def get(instant_key_id: nil, instant_key_url: nil)
|
|
25
|
-
|
|
25
|
+
if instant_key_id.nil? && instant_key_url.nil?
|
|
26
|
+
raise TypeError, "At least one parameter is required for /instant_keys/get"
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
res = @client.get("/instant_keys/get", {instant_key_id: instant_key_id, instant_key_url: instant_key_url}.compact)
|
|
26
30
|
|
|
27
31
|
Seam::Resources::InstantKey.load_from_response(res.body["instant_key"])
|
|
28
32
|
end
|
|
29
33
|
|
|
30
34
|
# Returns a list of all [instant keys](https://docs.seam.co/capability-guides/instant-keys).
|
|
31
|
-
# @param user_identity_id ID of the user identity by which you want to filter the list of Instant Keys.
|
|
35
|
+
# @param user_identity_id [String, nil] ID of the user identity by which you want to filter the list of Instant Keys.
|
|
32
36
|
# @return [Seam::Resources::InstantKey] OK
|
|
33
37
|
def list(user_identity_id: nil)
|
|
34
|
-
res = @client.
|
|
38
|
+
res = @client.get("/instant_keys/list", {user_identity_id: user_identity_id}.compact)
|
|
35
39
|
|
|
36
40
|
Seam::Resources::InstantKey.load_from_response(res.body["instant_keys"])
|
|
37
41
|
end
|
data/lib/seam/routes/locks.rb
CHANGED
|
@@ -15,9 +15,9 @@ module Seam
|
|
|
15
15
|
end
|
|
16
16
|
|
|
17
17
|
# Configures the auto-lock setting for a specified [lock](https://docs.seam.co/low-level-apis/smart-locks).
|
|
18
|
-
# @param auto_lock_enabled Whether to enable or disable auto-lock.
|
|
19
|
-
# @param device_id ID of the lock for which you want to configure the auto-lock.
|
|
20
|
-
# @param auto_lock_delay_seconds Delay in seconds before the lock automatically locks. Required when enabling auto-lock. Must be between 1 and 60.
|
|
18
|
+
# @param auto_lock_enabled [Boolean] Whether to enable or disable auto-lock.
|
|
19
|
+
# @param device_id [String] ID of the lock for which you want to configure the auto-lock.
|
|
20
|
+
# @param auto_lock_delay_seconds [Float, nil] Delay in seconds before the lock automatically locks. Required when enabling auto-lock. Must be between 1 and 60.
|
|
21
21
|
# @return [Seam::Resources::ActionAttempt] OK
|
|
22
22
|
def configure_auto_lock(auto_lock_enabled:, device_id:, auto_lock_delay_seconds: nil, wait_for_action_attempt: nil)
|
|
23
23
|
res = @client.post("/locks/configure_auto_lock", {auto_lock_enabled: auto_lock_enabled, device_id: device_id, auto_lock_delay_seconds: auto_lock_delay_seconds}.compact)
|
|
@@ -28,43 +28,36 @@ module Seam
|
|
|
28
28
|
end
|
|
29
29
|
|
|
30
30
|
# Returns a specified [lock](https://docs.seam.co/low-level-apis/smart-locks).
|
|
31
|
-
# @param device_id ID of the lock that you want to get.
|
|
32
|
-
# @param name Name of the lock that you want to get.
|
|
31
|
+
# @param device_id [String, nil] ID of the lock that you want to get.
|
|
32
|
+
# @param name [String, nil] Name of the lock that you want to get.
|
|
33
33
|
# @return [Seam::Resources::Device] OK
|
|
34
34
|
# @deprecated Use `/devices/get` instead.
|
|
35
35
|
def get(device_id: nil, name: nil)
|
|
36
|
-
|
|
36
|
+
if device_id.nil? && name.nil?
|
|
37
|
+
raise TypeError, "At least one parameter is required for /locks/get"
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
res = @client.get("/locks/get", {device_id: device_id, name: name}.compact)
|
|
37
41
|
|
|
38
42
|
Seam::Resources::Device.load_from_response(res.body["device"])
|
|
39
43
|
end
|
|
40
44
|
|
|
41
45
|
# Returns a list of all [locks](https://docs.seam.co/low-level-apis/smart-locks).
|
|
42
|
-
# @param connect_webview_id ID of the Connect Webview for which you want to list devices.
|
|
43
|
-
# @param connected_account_id ID of the connected account for which you want to list devices.
|
|
44
|
-
# @param
|
|
45
|
-
# @param
|
|
46
|
-
# @param
|
|
47
|
-
# @param
|
|
48
|
-
# @param device_ids Array of device IDs for which you want to list devices.
|
|
49
|
-
# @param device_type Device type of the locks that you want to list.
|
|
50
|
-
# @param device_types Device types of the locks that you want to list.
|
|
51
|
-
# @param limit Numerical limit on the number of devices to return.
|
|
52
|
-
# @param manufacturer Manufacturer of the locks that you want to list.
|
|
53
|
-
# @param page_cursor Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`.
|
|
54
|
-
# @param search String for which to search. Filters returned devices to include all records that satisfy a partial match using `device_id` (full or partial UUID prefix, minimum 4 characters), `connected_account_id`, `display_name`, `custom_metadata` or `location.location_name`.
|
|
55
|
-
# @param space_id ID of the space for which you want to list devices.
|
|
56
|
-
# @param unstable_location_id
|
|
57
|
-
# @deprecated unstable_location_id: Use `space_id`.
|
|
58
|
-
# @param user_identifier_key Your own internal user ID for the user for which you want to list devices.
|
|
46
|
+
# @param connect_webview_id [String, nil] ID of the Connect Webview for which you want to list devices.
|
|
47
|
+
# @param connected_account_id [String, nil] ID of the connected account for which you want to list devices.
|
|
48
|
+
# @param customer_key [String, nil] Customer key for which you want to list devices.
|
|
49
|
+
# @param device_type [String, nil] Device type of the locks that you want to list.
|
|
50
|
+
# @param device_types [Array<String>, nil] Device types of the locks that you want to list.
|
|
51
|
+
# @param manufacturer [String, nil] Manufacturer of the locks that you want to list.
|
|
59
52
|
# @return [Seam::Resources::Device] OK
|
|
60
|
-
def list(connect_webview_id: nil, connected_account_id: nil,
|
|
61
|
-
res = @client.post("/locks/list", {connect_webview_id: connect_webview_id, connected_account_id: connected_account_id,
|
|
53
|
+
def list(connect_webview_id: nil, connected_account_id: nil, customer_key: nil, device_type: nil, device_types: nil, manufacturer: nil)
|
|
54
|
+
res = @client.post("/locks/list", {connect_webview_id: connect_webview_id, connected_account_id: connected_account_id, customer_key: customer_key, device_type: device_type, device_types: device_types, manufacturer: manufacturer}.compact)
|
|
62
55
|
|
|
63
56
|
Seam::Resources::Device.load_from_response(res.body["devices"])
|
|
64
57
|
end
|
|
65
58
|
|
|
66
59
|
# Locks a [lock](https://docs.seam.co/low-level-apis/smart-locks). See also [Locking and Unlocking Smart Locks](https://docs.seam.co/low-level-apis/smart-locks/lock-and-unlock).
|
|
67
|
-
# @param device_id ID of the lock that you want to lock.
|
|
60
|
+
# @param device_id [String] ID of the lock that you want to lock.
|
|
68
61
|
# @return [Seam::Resources::ActionAttempt] OK
|
|
69
62
|
def lock_door(device_id:, wait_for_action_attempt: nil)
|
|
70
63
|
res = @client.post("/locks/lock_door", {device_id: device_id}.compact)
|
|
@@ -75,7 +68,7 @@ module Seam
|
|
|
75
68
|
end
|
|
76
69
|
|
|
77
70
|
# Unlocks a [lock](https://docs.seam.co/low-level-apis/smart-locks). See also [Locking and Unlocking Smart Locks](https://docs.seam.co/low-level-apis/smart-locks/lock-and-unlock).
|
|
78
|
-
# @param device_id ID of the lock that you want to unlock.
|
|
71
|
+
# @param device_id [String] ID of the lock that you want to unlock.
|
|
79
72
|
# @return [Seam::Resources::ActionAttempt] OK
|
|
80
73
|
def unlock_door(device_id:, wait_for_action_attempt: nil)
|
|
81
74
|
res = @client.post("/locks/unlock_door", {device_id: device_id}.compact)
|
|
@@ -11,8 +11,8 @@ module Seam
|
|
|
11
11
|
end
|
|
12
12
|
|
|
13
13
|
# Simulates the entry of a code on a keypad. You can only perform this action for [August](https://docs.seam.co/device-and-system-integration-guides/august-locks) devices within [sandbox workspaces](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces).
|
|
14
|
-
# @param code Code that you want to simulate entering on a keypad.
|
|
15
|
-
# @param device_id ID of the device for which you want to simulate a keypad code entry.
|
|
14
|
+
# @param code [String] Code that you want to simulate entering on a keypad.
|
|
15
|
+
# @param device_id [String] ID of the device for which you want to simulate a keypad code entry.
|
|
16
16
|
# @return [Seam::Resources::ActionAttempt] OK
|
|
17
17
|
def keypad_code_entry(code:, device_id:, wait_for_action_attempt: nil)
|
|
18
18
|
res = @client.post("/locks/simulate/keypad_code_entry", {code: code, device_id: device_id}.compact)
|
|
@@ -23,7 +23,7 @@ module Seam
|
|
|
23
23
|
end
|
|
24
24
|
|
|
25
25
|
# Simulates a manual lock action using a keypad. You can only perform this action for [August](https://docs.seam.co/device-and-system-integration-guides/august-locks) devices within [sandbox workspaces](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces).
|
|
26
|
-
# @param device_id ID of the device for which you want to simulate a manual lock action using a keypad.
|
|
26
|
+
# @param device_id [String] ID of the device for which you want to simulate a manual lock action using a keypad.
|
|
27
27
|
# @return [Seam::Resources::ActionAttempt] OK
|
|
28
28
|
def manual_lock_via_keypad(device_id:, wait_for_action_attempt: nil)
|
|
29
29
|
res = @client.post("/locks/simulate/manual_lock_via_keypad", {device_id: device_id}.compact)
|
|
@@ -17,26 +17,15 @@ module Seam
|
|
|
17
17
|
end
|
|
18
18
|
|
|
19
19
|
# Returns a list of all [noise sensors](https://docs.seam.co/capability-guides/noise-sensors).
|
|
20
|
-
# @param connect_webview_id ID of the Connect Webview for which you want to list devices.
|
|
21
|
-
# @param connected_account_id ID of the connected account for which you want to list devices.
|
|
22
|
-
# @param
|
|
23
|
-
# @param
|
|
24
|
-
# @param
|
|
25
|
-
# @param
|
|
26
|
-
# @param device_ids Array of device IDs for which you want to list devices.
|
|
27
|
-
# @param device_type Device type of the noise sensors that you want to list.
|
|
28
|
-
# @param device_types Device types of the noise sensors that you want to list.
|
|
29
|
-
# @param limit Numerical limit on the number of devices to return.
|
|
30
|
-
# @param manufacturer Manufacturers of the noise sensors that you want to list.
|
|
31
|
-
# @param page_cursor Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`.
|
|
32
|
-
# @param search String for which to search. Filters returned devices to include all records that satisfy a partial match using `device_id` (full or partial UUID prefix, minimum 4 characters), `connected_account_id`, `display_name`, `custom_metadata` or `location.location_name`.
|
|
33
|
-
# @param space_id ID of the space for which you want to list devices.
|
|
34
|
-
# @param unstable_location_id
|
|
35
|
-
# @deprecated unstable_location_id: Use `space_id`.
|
|
36
|
-
# @param user_identifier_key Your own internal user ID for the user for which you want to list devices.
|
|
20
|
+
# @param connect_webview_id [String, nil] ID of the Connect Webview for which you want to list devices.
|
|
21
|
+
# @param connected_account_id [String, nil] ID of the connected account for which you want to list devices.
|
|
22
|
+
# @param customer_key [String, nil] Customer key for which you want to list devices.
|
|
23
|
+
# @param device_type [String, nil] Device type of the noise sensors that you want to list.
|
|
24
|
+
# @param device_types [Array<String>, nil] Device types of the noise sensors that you want to list.
|
|
25
|
+
# @param manufacturer [String, nil] Manufacturers of the noise sensors that you want to list.
|
|
37
26
|
# @return [Seam::Resources::Device] OK
|
|
38
|
-
def list(connect_webview_id: nil, connected_account_id: nil,
|
|
39
|
-
res = @client.post("/noise_sensors/list", {connect_webview_id: connect_webview_id, connected_account_id: connected_account_id,
|
|
27
|
+
def list(connect_webview_id: nil, connected_account_id: nil, customer_key: nil, device_type: nil, device_types: nil, manufacturer: nil)
|
|
28
|
+
res = @client.post("/noise_sensors/list", {connect_webview_id: connect_webview_id, connected_account_id: connected_account_id, customer_key: customer_key, device_type: device_type, device_types: device_types, manufacturer: manufacturer}.compact)
|
|
40
29
|
|
|
41
30
|
Seam::Resources::Device.load_from_response(res.body["devices"])
|
|
42
31
|
end
|
|
@@ -9,12 +9,12 @@ module Seam
|
|
|
9
9
|
end
|
|
10
10
|
|
|
11
11
|
# Creates a new [noise threshold](https://docs.seam.co/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://docs.seam.co/capability-guides/noise-sensors). Thresholds represent the limits of noise tolerated at a property, which can be customized for each hour of the day. Each device has its own default thresholds, but you can use the Seam API to modify them.
|
|
12
|
-
# @param device_id ID of the device for which you want to create a noise threshold.
|
|
13
|
-
# @param ends_daily_at Time at which the new noise threshold should become inactive daily.
|
|
14
|
-
# @param starts_daily_at Time at which the new noise threshold should become active daily.
|
|
15
|
-
# @param name Name of the new noise threshold.
|
|
16
|
-
# @param noise_threshold_decibels Noise level in decibels for the new noise threshold.
|
|
17
|
-
# @param noise_threshold_nrs Noise level in Noiseaware Noise Risk Score (NRS) for the new noise threshold. This parameter is only relevant for [Noiseaware sensors](https://docs.seam.co/device-and-system-integration-guides/noiseaware-sensors).
|
|
12
|
+
# @param device_id [String] ID of the device for which you want to create a noise threshold.
|
|
13
|
+
# @param ends_daily_at [String] Time at which the new noise threshold should become inactive daily.
|
|
14
|
+
# @param starts_daily_at [String] Time at which the new noise threshold should become active daily.
|
|
15
|
+
# @param name [String, nil] Name of the new noise threshold.
|
|
16
|
+
# @param noise_threshold_decibels [Float, nil] Noise level in decibels for the new noise threshold.
|
|
17
|
+
# @param noise_threshold_nrs [Float, nil] Noise level in Noiseaware Noise Risk Score (NRS) for the new noise threshold. This parameter is only relevant for [Noiseaware sensors](https://docs.seam.co/device-and-system-integration-guides/noiseaware-sensors).
|
|
18
18
|
# @return [Seam::Resources::NoiseThreshold] OK
|
|
19
19
|
def create(device_id:, ends_daily_at:, starts_daily_at:, name: nil, noise_threshold_decibels: nil, noise_threshold_nrs: nil)
|
|
20
20
|
res = @client.post("/noise_sensors/noise_thresholds/create", {device_id: device_id, ends_daily_at: ends_daily_at, starts_daily_at: starts_daily_at, name: name, noise_threshold_decibels: noise_threshold_decibels, noise_threshold_nrs: noise_threshold_nrs}.compact)
|
|
@@ -23,44 +23,44 @@ module Seam
|
|
|
23
23
|
end
|
|
24
24
|
|
|
25
25
|
# Deletes a [noise threshold](https://docs.seam.co/capability-guides/noise-sensors/configure-noise-threshold-settings) from a [noise sensor](https://docs.seam.co/capability-guides/noise-sensors).
|
|
26
|
-
# @param device_id ID of the device that contains the noise threshold that you want to delete.
|
|
27
|
-
# @param noise_threshold_id ID of the noise threshold that you want to delete.
|
|
26
|
+
# @param device_id [String] ID of the device that contains the noise threshold that you want to delete.
|
|
27
|
+
# @param noise_threshold_id [String] ID of the noise threshold that you want to delete.
|
|
28
28
|
# @return [nil] OK
|
|
29
29
|
def delete(device_id:, noise_threshold_id:)
|
|
30
|
-
@client.
|
|
30
|
+
@client.delete("/noise_sensors/noise_thresholds/delete", {device_id: device_id, noise_threshold_id: noise_threshold_id}.compact)
|
|
31
31
|
|
|
32
32
|
nil
|
|
33
33
|
end
|
|
34
34
|
|
|
35
35
|
# Returns a specified [noise threshold](https://docs.seam.co/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://docs.seam.co/capability-guides/noise-sensors).
|
|
36
|
-
# @param noise_threshold_id ID of the noise threshold that you want to get.
|
|
36
|
+
# @param noise_threshold_id [String] ID of the noise threshold that you want to get.
|
|
37
37
|
# @return [Seam::Resources::NoiseThreshold] OK
|
|
38
38
|
def get(noise_threshold_id:)
|
|
39
|
-
res = @client.
|
|
39
|
+
res = @client.get("/noise_sensors/noise_thresholds/get", {noise_threshold_id: noise_threshold_id}.compact)
|
|
40
40
|
|
|
41
41
|
Seam::Resources::NoiseThreshold.load_from_response(res.body["noise_threshold"])
|
|
42
42
|
end
|
|
43
43
|
|
|
44
44
|
# Returns a list of all [noise thresholds](https://docs.seam.co/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://docs.seam.co/capability-guides/noise-sensors).
|
|
45
|
-
# @param device_id ID of the device for which you want to list noise thresholds.
|
|
45
|
+
# @param device_id [String] ID of the device for which you want to list noise thresholds.
|
|
46
46
|
# @return [Seam::Resources::NoiseThreshold] OK
|
|
47
47
|
def list(device_id:)
|
|
48
|
-
res = @client.
|
|
48
|
+
res = @client.get("/noise_sensors/noise_thresholds/list", {device_id: device_id}.compact)
|
|
49
49
|
|
|
50
50
|
Seam::Resources::NoiseThreshold.load_from_response(res.body["noise_thresholds"])
|
|
51
51
|
end
|
|
52
52
|
|
|
53
53
|
# Updates a [noise threshold](https://docs.seam.co/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://docs.seam.co/capability-guides/noise-sensors).
|
|
54
|
-
# @param device_id ID of the device that contains the noise threshold that you want to update.
|
|
55
|
-
# @param noise_threshold_id ID of the noise threshold that you want to update.
|
|
56
|
-
# @param ends_daily_at Time at which the noise threshold should become inactive daily.
|
|
57
|
-
# @param name Name of the noise threshold that you want to update.
|
|
58
|
-
# @param noise_threshold_decibels Noise level in decibels for the noise threshold.
|
|
59
|
-
# @param noise_threshold_nrs Noise level in Noiseaware Noise Risk Score (NRS) for the noise threshold. This parameter is only relevant for [Noiseaware sensors](https://docs.seam.co/device-and-system-integration-guides/noiseaware-sensors).
|
|
60
|
-
# @param starts_daily_at Time at which the noise threshold should become active daily.
|
|
54
|
+
# @param device_id [String] ID of the device that contains the noise threshold that you want to update.
|
|
55
|
+
# @param noise_threshold_id [String] ID of the noise threshold that you want to update.
|
|
56
|
+
# @param ends_daily_at [String, nil] Time at which the noise threshold should become inactive daily.
|
|
57
|
+
# @param name [String, nil] Name of the noise threshold that you want to update.
|
|
58
|
+
# @param noise_threshold_decibels [Float, nil] Noise level in decibels for the noise threshold.
|
|
59
|
+
# @param noise_threshold_nrs [Float, nil] Noise level in Noiseaware Noise Risk Score (NRS) for the noise threshold. This parameter is only relevant for [Noiseaware sensors](https://docs.seam.co/device-and-system-integration-guides/noiseaware-sensors).
|
|
60
|
+
# @param starts_daily_at [String, nil] Time at which the noise threshold should become active daily.
|
|
61
61
|
# @return [nil] OK
|
|
62
62
|
def update(device_id:, noise_threshold_id:, ends_daily_at: nil, name: nil, noise_threshold_decibels: nil, noise_threshold_nrs: nil, starts_daily_at: nil)
|
|
63
|
-
@client.
|
|
63
|
+
@client.put("/noise_sensors/noise_thresholds/update", {device_id: device_id, noise_threshold_id: noise_threshold_id, ends_daily_at: ends_daily_at, name: name, noise_threshold_decibels: noise_threshold_decibels, noise_threshold_nrs: noise_threshold_nrs, starts_daily_at: starts_daily_at}.compact)
|
|
64
64
|
|
|
65
65
|
nil
|
|
66
66
|
end
|
|
@@ -9,7 +9,7 @@ module Seam
|
|
|
9
9
|
end
|
|
10
10
|
|
|
11
11
|
# Simulates the triggering of a [noise threshold](https://docs.seam.co/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://docs.seam.co/capability-guides/noise-sensors) in a [sandbox workspace](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces).
|
|
12
|
-
# @param device_id ID of the device for which you want to simulate the triggering of a noise threshold.
|
|
12
|
+
# @param device_id [String] ID of the device for which you want to simulate the triggering of a noise threshold.
|
|
13
13
|
# @return [nil] OK
|
|
14
14
|
def trigger_noise_threshold(device_id:)
|
|
15
15
|
@client.post("/noise_sensors/simulate/trigger_noise_threshold", {device_id: device_id}.compact)
|
data/lib/seam/routes/phones.rb
CHANGED
|
@@ -13,29 +13,29 @@ module Seam
|
|
|
13
13
|
end
|
|
14
14
|
|
|
15
15
|
# Deactivates a phone, which is useful, for example, if a user has lost their phone. For more information, see [App User Lost Phone Process](https://docs.seam.co/capability-guides/mobile-access/managing-phones-for-a-user-identity#app-user-lost-phone-process).
|
|
16
|
-
# @param device_id Device ID of the phone that you want to deactivate.
|
|
16
|
+
# @param device_id [String] Device ID of the phone that you want to deactivate.
|
|
17
17
|
# @return [nil] OK
|
|
18
18
|
def deactivate(device_id:)
|
|
19
|
-
@client.
|
|
19
|
+
@client.delete("/phones/deactivate", {device_id: device_id}.compact)
|
|
20
20
|
|
|
21
21
|
nil
|
|
22
22
|
end
|
|
23
23
|
|
|
24
24
|
# Returns a specified [phone](https://docs.seam.co/capability-guides/mobile-access/managing-phones-for-a-user-identity).
|
|
25
|
-
# @param device_id Device ID of the phone that you want to get.
|
|
25
|
+
# @param device_id [String] Device ID of the phone that you want to get.
|
|
26
26
|
# @return [Seam::Resources::Phone] OK
|
|
27
27
|
def get(device_id:)
|
|
28
|
-
res = @client.
|
|
28
|
+
res = @client.get("/phones/get", {device_id: device_id}.compact)
|
|
29
29
|
|
|
30
30
|
Seam::Resources::Phone.load_from_response(res.body["phone"])
|
|
31
31
|
end
|
|
32
32
|
|
|
33
33
|
# Returns a list of all [phones](https://docs.seam.co/capability-guides/mobile-access/managing-phones-for-a-user-identity). To filter the list of returned phones by a specific owner user identity or credential, include the `owner_user_identity_id` or `acs_credential_id`, respectively, in the request body.
|
|
34
|
-
# @param acs_credential_id ID of the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) by which you want to filter the list of returned phones.
|
|
35
|
-
# @param owner_user_identity_id ID of the user identity that represents the owner by which you want to filter the list of returned phones.
|
|
34
|
+
# @param acs_credential_id [String, nil] ID of the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) by which you want to filter the list of returned phones.
|
|
35
|
+
# @param owner_user_identity_id [String, nil] ID of the user identity that represents the owner by which you want to filter the list of returned phones.
|
|
36
36
|
# @return [Seam::Resources::Phone] OK
|
|
37
37
|
def list(acs_credential_id: nil, owner_user_identity_id: nil)
|
|
38
|
-
res = @client.
|
|
38
|
+
res = @client.get("/phones/list", {acs_credential_id: acs_credential_id, owner_user_identity_id: owner_user_identity_id}.compact)
|
|
39
39
|
|
|
40
40
|
Seam::Resources::Phone.load_from_response(res.body["phones"])
|
|
41
41
|
end
|
|
@@ -9,10 +9,10 @@ module Seam
|
|
|
9
9
|
end
|
|
10
10
|
|
|
11
11
|
# Creates a new simulated phone in a [sandbox workspace](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). See also [Creating a Simulated Phone for a User Identity](https://docs.seam.co/capability-guides/mobile-access/developing-in-a-sandbox-workspace#creating-a-simulated-phone-for-a-user-identity).
|
|
12
|
-
# @param user_identity_id ID of the user identity that you want to associate with the simulated phone.
|
|
13
|
-
# @param assa_abloy_metadata ASSA ABLOY metadata that you want to associate with the simulated phone.
|
|
14
|
-
# @param custom_sdk_installation_id ID of the custom SDK installation that you want to use for the simulated phone.
|
|
15
|
-
# @param phone_metadata Metadata that you want to associate with the simulated phone.
|
|
12
|
+
# @param user_identity_id [String] ID of the user identity that you want to associate with the simulated phone.
|
|
13
|
+
# @param assa_abloy_metadata [Hash, nil] ASSA ABLOY metadata that you want to associate with the simulated phone.
|
|
14
|
+
# @param custom_sdk_installation_id [String, nil] ID of the custom SDK installation that you want to use for the simulated phone.
|
|
15
|
+
# @param phone_metadata [Hash, nil] Metadata that you want to associate with the simulated phone.
|
|
16
16
|
# @return [Seam::Resources::Phone] OK
|
|
17
17
|
def create_sandbox_phone(user_identity_id:, assa_abloy_metadata: nil, custom_sdk_installation_id: nil, phone_metadata: nil)
|
|
18
18
|
res = @client.post("/phones/simulate/create_sandbox_phone", {user_identity_id: user_identity_id, assa_abloy_metadata: assa_abloy_metadata, custom_sdk_installation_id: custom_sdk_installation_id, phone_metadata: phone_metadata}.compact)
|