seam 2.139.0 → 2.141.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 +86 -0
- data/lib/seam/http_without_workspace.rb +4 -4
- data/lib/seam/null.rb +23 -0
- data/lib/seam/paginator.rb +4 -1
- data/lib/seam/request.rb +49 -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/strict_url_search_params_serializer.rb +17 -0
- data/lib/seam/url_search_params.rb +102 -0
- data/lib/seam/url_search_params_serializer.rb +217 -0
- data/lib/seam/version.rb +1 -1
- data/lib/seam.rb +3 -0
- metadata +12 -11
|
@@ -11,18 +11,18 @@ module Seam
|
|
|
11
11
|
end
|
|
12
12
|
|
|
13
13
|
# Returns a specified [access system entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details).
|
|
14
|
-
# @param acs_entrance_id ID of the entrance that you want to get.
|
|
14
|
+
# @param acs_entrance_id [String] ID of the entrance that you want to get.
|
|
15
15
|
# @return [Seam::Resources::AcsEntrance] OK
|
|
16
16
|
def get(acs_entrance_id:)
|
|
17
|
-
res = @client.
|
|
17
|
+
res = @client.get("/acs/entrances/get", {acs_entrance_id: acs_entrance_id}.compact)
|
|
18
18
|
|
|
19
19
|
Seam::Resources::AcsEntrance.load_from_response(res.body["acs_entrance"])
|
|
20
20
|
end
|
|
21
21
|
|
|
22
22
|
# Grants a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) access to a specified [access system entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details).
|
|
23
|
-
# @param acs_entrance_id ID of the entrance to which you want to grant an access system user access.
|
|
24
|
-
# @param acs_user_id ID of the access system user to whom you want to grant access to an entrance. You can only provide one of acs_user_id or user_identity_id.
|
|
25
|
-
# @param user_identity_id ID of the user identity to whom you want to grant access to an entrance. You can only provide one of acs_user_id or user_identity_id. If the ACS system contains an ACS user with the same `email_address` or `phone_number` as the user identity that you specify, they are linked, and the access group membership belongs to the ACS user. If the ACS system does not have a corresponding ACS user, one is created.
|
|
23
|
+
# @param acs_entrance_id [String] ID of the entrance to which you want to grant an access system user access.
|
|
24
|
+
# @param acs_user_id [String, nil] ID of the access system user to whom you want to grant access to an entrance. You can only provide one of acs_user_id or user_identity_id.
|
|
25
|
+
# @param user_identity_id [String, nil] ID of the user identity to whom you want to grant access to an entrance. You can only provide one of acs_user_id or user_identity_id. If the ACS system contains an ACS user with the same `email_address` or `phone_number` as the user identity that you specify, they are linked, and the access group membership belongs to the ACS user. If the ACS system does not have a corresponding ACS user, one is created.
|
|
26
26
|
# @return [nil] OK
|
|
27
27
|
def grant_access(acs_entrance_id:, acs_user_id: nil, user_identity_id: nil)
|
|
28
28
|
@client.post("/acs/entrances/grant_access", {acs_entrance_id: acs_entrance_id, acs_user_id: acs_user_id, user_identity_id: user_identity_id}.compact)
|
|
@@ -31,18 +31,18 @@ module Seam
|
|
|
31
31
|
end
|
|
32
32
|
|
|
33
33
|
# Returns a list of all [access system entrances](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details).
|
|
34
|
-
# @param access_method_id ID of the access method for which you want to retrieve all entrances to which it grants access.
|
|
35
|
-
# @param acs_credential_id ID of the credential for which you want to retrieve all entrances.
|
|
36
|
-
# @param acs_entrance_ids IDs of the entrances for which you want to retrieve all entrances.
|
|
37
|
-
# @param acs_system_id ID of the access system for which you want to retrieve all entrances.
|
|
38
|
-
# @param connected_account_id ID of the connected account for which you want to retrieve all entrances.
|
|
39
|
-
# @param customer_key Customer key for which you want to list entrances.
|
|
40
|
-
# @param limit Maximum number of records to return per page.
|
|
41
|
-
# @param location_id
|
|
34
|
+
# @param access_method_id [String, nil] ID of the access method for which you want to retrieve all entrances to which it grants access.
|
|
35
|
+
# @param acs_credential_id [String, nil] ID of the credential for which you want to retrieve all entrances.
|
|
36
|
+
# @param acs_entrance_ids [Array<String>, nil] IDs of the entrances for which you want to retrieve all entrances.
|
|
37
|
+
# @param acs_system_id [String, nil] ID of the access system for which you want to retrieve all entrances.
|
|
38
|
+
# @param connected_account_id [String, nil] ID of the connected account for which you want to retrieve all entrances.
|
|
39
|
+
# @param customer_key [String, nil] Customer key for which you want to list entrances.
|
|
40
|
+
# @param limit [Integer, nil] Maximum number of records to return per page.
|
|
41
|
+
# @param location_id [String, Seam::Null, nil]
|
|
42
42
|
# @deprecated location_id: Use `space_id`.
|
|
43
|
-
# @param page_cursor Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`.
|
|
44
|
-
# @param search String for which to search. Filters returned entrances to include all records that satisfy a partial match using `display_name`.
|
|
45
|
-
# @param space_id ID of the space for which you want to list entrances.
|
|
43
|
+
# @param page_cursor [String, Seam::Null, nil] Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`.
|
|
44
|
+
# @param search [String, nil] String for which to search. Filters returned entrances to include all records that satisfy a partial match using `display_name`.
|
|
45
|
+
# @param space_id [String, nil] ID of the space for which you want to list entrances.
|
|
46
46
|
# @return [Seam::Resources::AcsEntrance] OK
|
|
47
47
|
def list(access_method_id: nil, acs_credential_id: nil, acs_entrance_ids: nil, acs_system_id: nil, connected_account_id: nil, customer_key: nil, limit: nil, location_id: nil, page_cursor: nil, search: nil, space_id: nil)
|
|
48
48
|
res = @client.post("/acs/entrances/list", {access_method_id: access_method_id, acs_credential_id: acs_credential_id, acs_entrance_ids: acs_entrance_ids, acs_system_id: acs_system_id, connected_account_id: connected_account_id, customer_key: customer_key, limit: limit, location_id: location_id, page_cursor: page_cursor, search: search, space_id: space_id}.compact)
|
|
@@ -51,8 +51,8 @@ module Seam
|
|
|
51
51
|
end
|
|
52
52
|
|
|
53
53
|
# Returns a list of all [credentials](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) with access to a specified [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details).
|
|
54
|
-
# @param acs_entrance_id ID of the entrance for which you want to list all credentials that grant access.
|
|
55
|
-
# @param include_if Conditions that credentials must meet to be included in the returned list.
|
|
54
|
+
# @param acs_entrance_id [String] ID of the entrance for which you want to list all credentials that grant access.
|
|
55
|
+
# @param include_if [Array<String>, nil] Conditions that credentials must meet to be included in the returned list.
|
|
56
56
|
# @return [Seam::Resources::AcsCredential] OK
|
|
57
57
|
def list_credentials_with_access(acs_entrance_id:, include_if: nil)
|
|
58
58
|
res = @client.post("/acs/entrances/list_credentials_with_access", {acs_entrance_id: acs_entrance_id, include_if: include_if}.compact)
|
|
@@ -61,8 +61,8 @@ module Seam
|
|
|
61
61
|
end
|
|
62
62
|
|
|
63
63
|
# Remotely unlocks a specified [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details) using a cloud_key credential. Returns an action attempt that tracks the progress of the unlock operation.
|
|
64
|
-
# @param acs_credential_id ID of the cloud_key credential to use for the unlock operation.
|
|
65
|
-
# @param acs_entrance_id ID of the entrance to unlock.
|
|
64
|
+
# @param acs_credential_id [String] ID of the cloud_key credential to use for the unlock operation.
|
|
65
|
+
# @param acs_entrance_id [String] ID of the entrance to unlock.
|
|
66
66
|
# @return [Seam::Resources::ActionAttempt] OK
|
|
67
67
|
def unlock(acs_credential_id:, acs_entrance_id:, wait_for_action_attempt: nil)
|
|
68
68
|
res = @client.post("/acs/entrances/unlock", {acs_credential_id: acs_credential_id, acs_entrance_id: acs_entrance_id}.compact)
|
|
@@ -9,10 +9,10 @@ module Seam
|
|
|
9
9
|
end
|
|
10
10
|
|
|
11
11
|
# Returns a specified [access system](https://docs.seam.co/low-level-apis/access-systems).
|
|
12
|
-
# @param acs_system_id ID of the access system that you want to get.
|
|
12
|
+
# @param acs_system_id [String] ID of the access system that you want to get.
|
|
13
13
|
# @return [Seam::Resources::AcsSystem] OK
|
|
14
14
|
def get(acs_system_id:)
|
|
15
|
-
res = @client.
|
|
15
|
+
res = @client.get("/acs/systems/get", {acs_system_id: acs_system_id}.compact)
|
|
16
16
|
|
|
17
17
|
Seam::Resources::AcsSystem.load_from_response(res.body["acs_system"])
|
|
18
18
|
end
|
|
@@ -20,12 +20,12 @@ module Seam
|
|
|
20
20
|
# Returns a list of all [access systems](https://docs.seam.co/low-level-apis/access-systems).
|
|
21
21
|
#
|
|
22
22
|
# To filter the list of returned access systems by a specific connected account ID, include the `connected_account_id` in the request body. If you omit the `connected_account_id` parameter, the response includes all access systems connected to your workspace.
|
|
23
|
-
# @param connected_account_id ID of the connected account by which you want to filter the list of access systems.
|
|
24
|
-
# @param customer_key Customer key for which you want to list access systems.
|
|
25
|
-
# @param search String for which to search. Filters returned access systems to include all records that satisfy a partial match using `name` or `acs_system_id`.
|
|
23
|
+
# @param connected_account_id [String, nil] ID of the connected account by which you want to filter the list of access systems.
|
|
24
|
+
# @param customer_key [String, nil] Customer key for which you want to list access systems.
|
|
25
|
+
# @param search [String, nil] String for which to search. Filters returned access systems to include all records that satisfy a partial match using `name` or `acs_system_id`.
|
|
26
26
|
# @return [Seam::Resources::AcsSystem] OK
|
|
27
27
|
def list(connected_account_id: nil, customer_key: nil, search: nil)
|
|
28
|
-
res = @client.
|
|
28
|
+
res = @client.get("/acs/systems/list", {connected_account_id: connected_account_id, customer_key: customer_key, search: search}.compact)
|
|
29
29
|
|
|
30
30
|
Seam::Resources::AcsSystem.load_from_response(res.body["acs_systems"])
|
|
31
31
|
end
|
|
@@ -33,18 +33,18 @@ module Seam
|
|
|
33
33
|
# Returns a list of all credential manager systems that are compatible with a specified [access system](https://docs.seam.co/low-level-apis/access-systems).
|
|
34
34
|
#
|
|
35
35
|
# Specify the access system for which you want to retrieve all compatible credential manager systems by including the corresponding `acs_system_id` in the request body.
|
|
36
|
-
# @param acs_system_id ID of the access system for which you want to retrieve all compatible credential manager systems.
|
|
36
|
+
# @param acs_system_id [String] ID of the access system for which you want to retrieve all compatible credential manager systems.
|
|
37
37
|
# @return [Seam::Resources::AcsSystem] OK
|
|
38
38
|
def list_compatible_credential_manager_acs_systems(acs_system_id:)
|
|
39
|
-
res = @client.
|
|
39
|
+
res = @client.get("/acs/systems/list_compatible_credential_manager_acs_systems", {acs_system_id: acs_system_id}.compact)
|
|
40
40
|
|
|
41
41
|
Seam::Resources::AcsSystem.load_from_response(res.body["acs_systems"])
|
|
42
42
|
end
|
|
43
43
|
|
|
44
44
|
# Reports ACS system device status including encoders and entrances.
|
|
45
|
-
# @param acs_system_id ID of the ACS system to report resources for
|
|
46
|
-
# @param acs_encoders Array of ACS encoders to report
|
|
47
|
-
# @param acs_entrances Array of ACS entrances to report
|
|
45
|
+
# @param acs_system_id [String] ID of the ACS system to report resources for
|
|
46
|
+
# @param acs_encoders [Array<Hash>, nil] Array of ACS encoders to report
|
|
47
|
+
# @param acs_entrances [Array<Hash>, nil] Array of ACS entrances to report
|
|
48
48
|
# @return [nil] OK
|
|
49
49
|
def report_devices(acs_system_id:, acs_encoders: nil, acs_entrances: nil)
|
|
50
50
|
@client.post("/acs/systems/report_devices", {acs_system_id: acs_system_id, acs_encoders: acs_encoders, acs_entrances: acs_entrances}.compact)
|
|
@@ -9,25 +9,25 @@ module Seam
|
|
|
9
9
|
end
|
|
10
10
|
|
|
11
11
|
# Adds a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) to a specified [access group](https://docs.seam.co/low-level-apis/access-systems/user-management/assigning-users-to-access-groups).
|
|
12
|
-
# @param acs_access_group_id ID of the access group to which you want to add an access system user.
|
|
13
|
-
# @param acs_user_id ID of the access system user that you want to add to an access group.
|
|
12
|
+
# @param acs_access_group_id [String] ID of the access group to which you want to add an access system user.
|
|
13
|
+
# @param acs_user_id [String] ID of the access system user that you want to add to an access group.
|
|
14
14
|
# @return [nil] OK
|
|
15
15
|
def add_to_access_group(acs_access_group_id:, acs_user_id:)
|
|
16
|
-
@client.
|
|
16
|
+
@client.put("/acs/users/add_to_access_group", {acs_access_group_id: acs_access_group_id, acs_user_id: acs_user_id}.compact)
|
|
17
17
|
|
|
18
18
|
nil
|
|
19
19
|
end
|
|
20
20
|
|
|
21
21
|
# Creates a new [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management).
|
|
22
|
-
# @param acs_system_id ID of the access system to which you want to add the new access system user.
|
|
23
|
-
# @param full_name Full name of the new access system user.
|
|
24
|
-
# @param access_schedule `starts_at` and `ends_at` timestamps for the new access system user's access. If you specify an `access_schedule`, you may include both `starts_at` and `ends_at`. If you omit `starts_at`, it defaults to the current time. `ends_at` is optional and must be a time in the future and after `starts_at`.
|
|
25
|
-
# @param acs_access_group_ids Array of access group IDs to indicate the access groups to which you want to add the new access system user.
|
|
26
|
-
# @param email
|
|
22
|
+
# @param acs_system_id [String] ID of the access system to which you want to add the new access system user.
|
|
23
|
+
# @param full_name [String] Full name of the new access system user.
|
|
24
|
+
# @param access_schedule [Hash, nil] `starts_at` and `ends_at` timestamps for the new access system user's access. If you specify an `access_schedule`, you may include both `starts_at` and `ends_at`. If you omit `starts_at`, it defaults to the current time. `ends_at` is optional and must be a time in the future and after `starts_at`.
|
|
25
|
+
# @param acs_access_group_ids [Array<String>, nil] Array of access group IDs to indicate the access groups to which you want to add the new access system user.
|
|
26
|
+
# @param email [String, nil]
|
|
27
27
|
# @deprecated email: use email_address.
|
|
28
|
-
# @param email_address Email address of the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management).
|
|
29
|
-
# @param phone_number Phone number of the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) in E.164 format (for example, `+15555550100`).
|
|
30
|
-
# @param user_identity_id ID of the user identity with which you want to associate the new access system user.
|
|
28
|
+
# @param email_address [String, nil] Email address of the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management).
|
|
29
|
+
# @param phone_number [String, nil] Phone number of the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) in E.164 format (for example, `+15555550100`).
|
|
30
|
+
# @param user_identity_id [String, nil] ID of the user identity with which you want to associate the new access system user.
|
|
31
31
|
# @return [Seam::Resources::AcsUser] OK
|
|
32
32
|
def create(acs_system_id:, full_name:, access_schedule: nil, acs_access_group_ids: nil, email: nil, email_address: nil, phone_number: nil, user_identity_id: nil)
|
|
33
33
|
res = @client.post("/acs/users/create", {acs_system_id: acs_system_id, full_name: full_name, access_schedule: access_schedule, acs_access_group_ids: acs_access_group_ids, email: email, email_address: email_address, phone_number: phone_number, user_identity_id: user_identity_id}.compact)
|
|
@@ -36,112 +36,140 @@ module Seam
|
|
|
36
36
|
end
|
|
37
37
|
|
|
38
38
|
# Deletes a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) and invalidates the access system user's [credentials](https://docs.seam.co/low-level-apis/access-systems/managing-credentials).
|
|
39
|
-
# @param acs_system_id ID of the access system that you want to delete. You must provide acs_system_id with user_identity_id.
|
|
40
|
-
# @param acs_user_id ID of the access system user that you want to delete. You must provide either acs_user_id or user_identity_id
|
|
41
|
-
# @param user_identity_id ID of the user identity that you want to delete. You must provide either acs_user_id or user_identity_id. If you provide user_identity_id, you must also provide acs_system_id.
|
|
39
|
+
# @param acs_system_id [String, nil] ID of the access system that you want to delete. You must provide acs_system_id with user_identity_id.
|
|
40
|
+
# @param acs_user_id [String, nil] ID of the access system user that you want to delete. You must provide either acs_user_id or user_identity_id
|
|
41
|
+
# @param user_identity_id [String, nil] ID of the user identity that you want to delete. You must provide either acs_user_id or user_identity_id. If you provide user_identity_id, you must also provide acs_system_id.
|
|
42
42
|
# @return [nil] OK
|
|
43
43
|
def delete(acs_system_id: nil, acs_user_id: nil, user_identity_id: nil)
|
|
44
|
-
|
|
44
|
+
if acs_system_id.nil? && acs_user_id.nil? && user_identity_id.nil?
|
|
45
|
+
raise TypeError, "At least one parameter is required for /acs/users/delete"
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
@client.delete("/acs/users/delete", {acs_system_id: acs_system_id, acs_user_id: acs_user_id, user_identity_id: user_identity_id}.compact)
|
|
45
49
|
|
|
46
50
|
nil
|
|
47
51
|
end
|
|
48
52
|
|
|
49
53
|
# Returns a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management).
|
|
50
|
-
# @param acs_user_id ID of the access system user that you want to get. You can only provide acs_user_id or user_identity_id.
|
|
51
|
-
# @param acs_system_id ID of the access system that you want to get. You can only provide acs_user_id or user_identity_id.
|
|
52
|
-
# @param user_identity_id ID of the user identity that you want to get. You can only provide acs_user_id or user_identity_id.
|
|
54
|
+
# @param acs_user_id [String, nil] ID of the access system user that you want to get. You can only provide acs_user_id or user_identity_id.
|
|
55
|
+
# @param acs_system_id [String, nil] ID of the access system that you want to get. You can only provide acs_user_id or user_identity_id.
|
|
56
|
+
# @param user_identity_id [String, nil] ID of the user identity that you want to get. You can only provide acs_user_id or user_identity_id.
|
|
53
57
|
# @return [Seam::Resources::AcsUser] OK
|
|
54
58
|
def get(acs_user_id: nil, acs_system_id: nil, user_identity_id: nil)
|
|
55
|
-
|
|
59
|
+
if acs_user_id.nil? && acs_system_id.nil? && user_identity_id.nil?
|
|
60
|
+
raise TypeError, "At least one parameter is required for /acs/users/get"
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
res = @client.get("/acs/users/get", {acs_user_id: acs_user_id, acs_system_id: acs_system_id, user_identity_id: user_identity_id}.compact)
|
|
56
64
|
|
|
57
65
|
Seam::Resources::AcsUser.load_from_response(res.body["acs_user"])
|
|
58
66
|
end
|
|
59
67
|
|
|
60
68
|
# Returns a list of all [access system users](https://docs.seam.co/low-level-apis/access-systems/user-management).
|
|
61
|
-
# @param acs_system_id ID of the `acs_system` for which you want to retrieve all access system users.
|
|
62
|
-
# @param created_before Timestamp by which to limit returned access system users. Returns users created before this timestamp.
|
|
63
|
-
# @param limit Maximum number of records to return per page.
|
|
64
|
-
# @param page_cursor Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`.
|
|
65
|
-
# @param search String for which to search. Filters returned access system users to include all records that satisfy a partial match using `full_name`, `phone_number`, `email_address`, `acs_user_id`, `user_identity_id`, `user_identity_full_name` or `user_identity_phone_number`.
|
|
66
|
-
# @param user_identity_email_address Email address of the user identity for which you want to retrieve all access system users.
|
|
67
|
-
# @param user_identity_id ID of the user identity for which you want to retrieve all access system users.
|
|
68
|
-
# @param user_identity_phone_number Phone number of the user identity for which you want to retrieve all access system users, in [E.164 format](https://www.itu.int/rec/T-REC-E.164/en) (for example, `+15555550100`).
|
|
69
|
+
# @param acs_system_id [String, nil] ID of the `acs_system` for which you want to retrieve all access system users.
|
|
70
|
+
# @param created_before [Time, nil] Timestamp by which to limit returned access system users. Returns users created before this timestamp.
|
|
71
|
+
# @param limit [Integer, nil] Maximum number of records to return per page.
|
|
72
|
+
# @param page_cursor [String, Seam::Null, nil] Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`.
|
|
73
|
+
# @param search [String, nil] String for which to search. Filters returned access system users to include all records that satisfy a partial match using `full_name`, `phone_number`, `email_address`, `acs_user_id`, `user_identity_id`, `user_identity_full_name` or `user_identity_phone_number`.
|
|
74
|
+
# @param user_identity_email_address [String, nil] Email address of the user identity for which you want to retrieve all access system users.
|
|
75
|
+
# @param user_identity_id [String, nil] ID of the user identity for which you want to retrieve all access system users.
|
|
76
|
+
# @param user_identity_phone_number [String, nil] Phone number of the user identity for which you want to retrieve all access system users, in [E.164 format](https://www.itu.int/rec/T-REC-E.164/en) (for example, `+15555550100`).
|
|
69
77
|
# @return [Seam::Resources::AcsUser] OK
|
|
70
78
|
def list(acs_system_id: nil, created_before: nil, limit: nil, page_cursor: nil, search: nil, user_identity_email_address: nil, user_identity_id: nil, user_identity_phone_number: nil)
|
|
71
|
-
res = @client.
|
|
79
|
+
res = @client.get("/acs/users/list", {acs_system_id: acs_system_id, created_before: created_before, limit: limit, page_cursor: page_cursor, search: search, user_identity_email_address: user_identity_email_address, user_identity_id: user_identity_id, user_identity_phone_number: user_identity_phone_number}.compact)
|
|
72
80
|
|
|
73
81
|
Seam::Resources::AcsUser.load_from_response(res.body["acs_users"])
|
|
74
82
|
end
|
|
75
83
|
|
|
76
84
|
# Lists the [entrances](https://docs.seam.co/api/acs/entrances) to which a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) has access.
|
|
77
|
-
# @param acs_system_id ID of the access system for which you want to list accessible entrances. You can only provide acs_system_id with user_identity_id.
|
|
78
|
-
# @param acs_user_id ID of the access system user for whom you want to list accessible entrances. You can only provide acs_user_id or user_identity_id.
|
|
79
|
-
# @param user_identity_id ID of the user identity for whom you want to list accessible entrances. You can only provide acs_user_id or user_identity_id.
|
|
85
|
+
# @param acs_system_id [String, nil] ID of the access system for which you want to list accessible entrances. You can only provide acs_system_id with user_identity_id.
|
|
86
|
+
# @param acs_user_id [String, nil] ID of the access system user for whom you want to list accessible entrances. You can only provide acs_user_id or user_identity_id.
|
|
87
|
+
# @param user_identity_id [String, nil] ID of the user identity for whom you want to list accessible entrances. You can only provide acs_user_id or user_identity_id.
|
|
80
88
|
# @return [Seam::Resources::AcsEntrance] OK
|
|
81
89
|
def list_accessible_entrances(acs_system_id: nil, acs_user_id: nil, user_identity_id: nil)
|
|
82
|
-
|
|
90
|
+
if acs_system_id.nil? && acs_user_id.nil? && user_identity_id.nil?
|
|
91
|
+
raise TypeError, "At least one parameter is required for /acs/users/list_accessible_entrances"
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
res = @client.get("/acs/users/list_accessible_entrances", {acs_system_id: acs_system_id, acs_user_id: acs_user_id, user_identity_id: user_identity_id}.compact)
|
|
83
95
|
|
|
84
96
|
Seam::Resources::AcsEntrance.load_from_response(res.body["acs_entrances"])
|
|
85
97
|
end
|
|
86
98
|
|
|
87
99
|
# Removes a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) from a specified [access group](https://docs.seam.co/low-level-apis/access-systems/user-management/assigning-users-to-access-groups).
|
|
88
|
-
# @param acs_access_group_id ID of the access group from which you want to remove an access system user.
|
|
89
|
-
# @param acs_user_id ID of the access system user that you want to remove from an access group. You can only provide acs_user_id or user_identity_id.
|
|
90
|
-
# @param user_identity_id ID of the user identity that you want to remove from an access group. You can only provide acs_user_id or user_identity_id.
|
|
100
|
+
# @param acs_access_group_id [String] ID of the access group from which you want to remove an access system user.
|
|
101
|
+
# @param acs_user_id [String, nil] ID of the access system user that you want to remove from an access group. You can only provide acs_user_id or user_identity_id.
|
|
102
|
+
# @param user_identity_id [String, nil] ID of the user identity that you want to remove from an access group. You can only provide acs_user_id or user_identity_id.
|
|
91
103
|
# @return [nil] OK
|
|
92
104
|
def remove_from_access_group(acs_access_group_id:, acs_user_id: nil, user_identity_id: nil)
|
|
93
|
-
@client.
|
|
105
|
+
@client.delete("/acs/users/remove_from_access_group", {acs_access_group_id: acs_access_group_id, acs_user_id: acs_user_id, user_identity_id: user_identity_id}.compact)
|
|
94
106
|
|
|
95
107
|
nil
|
|
96
108
|
end
|
|
97
109
|
|
|
98
110
|
# Revokes access to all [entrances](https://docs.seam.co/api/acs/entrances) for a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management).
|
|
99
|
-
# @param acs_system_id ID of the access system for which you want to revoke access. You can only provide acs_system_id with user_identity_id.
|
|
100
|
-
# @param acs_user_id ID of the access system user for whom you want to revoke access. You can only provide acs_user_id or user_identity_id.
|
|
101
|
-
# @param user_identity_id ID of the user identity for whom you want to revoke access. You can only provide acs_user_id or user_identity_id.
|
|
111
|
+
# @param acs_system_id [String, nil] ID of the access system for which you want to revoke access. You can only provide acs_system_id with user_identity_id.
|
|
112
|
+
# @param acs_user_id [String, nil] ID of the access system user for whom you want to revoke access. You can only provide acs_user_id or user_identity_id.
|
|
113
|
+
# @param user_identity_id [String, nil] ID of the user identity for whom you want to revoke access. You can only provide acs_user_id or user_identity_id.
|
|
102
114
|
# @return [nil] OK
|
|
103
115
|
def revoke_access_to_all_entrances(acs_system_id: nil, acs_user_id: nil, user_identity_id: nil)
|
|
116
|
+
if acs_system_id.nil? && acs_user_id.nil? && user_identity_id.nil?
|
|
117
|
+
raise TypeError, "At least one parameter is required for /acs/users/revoke_access_to_all_entrances"
|
|
118
|
+
end
|
|
119
|
+
|
|
104
120
|
@client.post("/acs/users/revoke_access_to_all_entrances", {acs_system_id: acs_system_id, acs_user_id: acs_user_id, user_identity_id: user_identity_id}.compact)
|
|
105
121
|
|
|
106
122
|
nil
|
|
107
123
|
end
|
|
108
124
|
|
|
109
125
|
# [Suspends](https://docs.seam.co/low-level-apis/access-systems/user-management/suspending-and-unsuspending-users#suspend-an-acs-user) a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). Suspending an access system user revokes their access temporarily. To restore an access system user's access, you can [unsuspend](https://docs.seam.co/api/acs/users/unsuspend) them.
|
|
110
|
-
# @param acs_system_id ID of the access system that you want to suspend. You can only provide acs_user_id or the combination of acs_system_id and user_identity_id.
|
|
111
|
-
# @param acs_user_id ID of the access system user that you want to suspend. You can only provide acs_user_id or the combination of acs_system_id and user_identity_id.
|
|
112
|
-
# @param user_identity_id ID of the user identity that you want to suspend. You can only provide acs_user_id or the combination of acs_system_id and user_identity_id.
|
|
126
|
+
# @param acs_system_id [String, nil] ID of the access system that you want to suspend. You can only provide acs_user_id or the combination of acs_system_id and user_identity_id.
|
|
127
|
+
# @param acs_user_id [String, nil] ID of the access system user that you want to suspend. You can only provide acs_user_id or the combination of acs_system_id and user_identity_id.
|
|
128
|
+
# @param user_identity_id [String, nil] ID of the user identity that you want to suspend. You can only provide acs_user_id or the combination of acs_system_id and user_identity_id.
|
|
113
129
|
# @return [nil] OK
|
|
114
130
|
def suspend(acs_system_id: nil, acs_user_id: nil, user_identity_id: nil)
|
|
131
|
+
if acs_system_id.nil? && acs_user_id.nil? && user_identity_id.nil?
|
|
132
|
+
raise TypeError, "At least one parameter is required for /acs/users/suspend"
|
|
133
|
+
end
|
|
134
|
+
|
|
115
135
|
@client.post("/acs/users/suspend", {acs_system_id: acs_system_id, acs_user_id: acs_user_id, user_identity_id: user_identity_id}.compact)
|
|
116
136
|
|
|
117
137
|
nil
|
|
118
138
|
end
|
|
119
139
|
|
|
120
140
|
# [Unsuspends](https://docs.seam.co/low-level-apis/access-systems/user-management/suspending-and-unsuspending-users#unsuspend-an-acs-user) a specified suspended [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). While [suspending an access system user](https://docs.seam.co/api/acs/users/suspend) revokes their access temporarily, unsuspending the access system user restores their access.
|
|
121
|
-
# @param acs_system_id ID of the access system of the user that you want to unsuspend. You can only provide acs_system_id with user_identity_id.
|
|
122
|
-
# @param acs_user_id ID of the access system user that you want to unsuspend. You can only provide acs_user_id or the combination of acs_system_id and user_identity_id.
|
|
123
|
-
# @param user_identity_id ID of the user identity that you want to unsuspend. You can only provide acs_user_id or the combination of acs_system_id and user_identity_id.
|
|
141
|
+
# @param acs_system_id [String, nil] ID of the access system of the user that you want to unsuspend. You can only provide acs_system_id with user_identity_id.
|
|
142
|
+
# @param acs_user_id [String, nil] ID of the access system user that you want to unsuspend. You can only provide acs_user_id or the combination of acs_system_id and user_identity_id.
|
|
143
|
+
# @param user_identity_id [String, nil] ID of the user identity that you want to unsuspend. You can only provide acs_user_id or the combination of acs_system_id and user_identity_id.
|
|
124
144
|
# @return [nil] OK
|
|
125
145
|
def unsuspend(acs_system_id: nil, acs_user_id: nil, user_identity_id: nil)
|
|
146
|
+
if acs_system_id.nil? && acs_user_id.nil? && user_identity_id.nil?
|
|
147
|
+
raise TypeError, "At least one parameter is required for /acs/users/unsuspend"
|
|
148
|
+
end
|
|
149
|
+
|
|
126
150
|
@client.post("/acs/users/unsuspend", {acs_system_id: acs_system_id, acs_user_id: acs_user_id, user_identity_id: user_identity_id}.compact)
|
|
127
151
|
|
|
128
152
|
nil
|
|
129
153
|
end
|
|
130
154
|
|
|
131
155
|
# Updates the properties of a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management).
|
|
132
|
-
# @param access_schedule `starts_at` and `ends_at` timestamps for the access system user's access. If you specify an `access_schedule`, you may include both `starts_at` and `ends_at`. If you omit `starts_at`, it defaults to the current time. `ends_at` is optional and must be a time in the future and after `starts_at`.
|
|
133
|
-
# @param acs_system_id ID of the access system that you want to update. You can only provide acs_system_id with user_identity_id.
|
|
134
|
-
# @param acs_user_id ID of the access system user that you want to update. You can only provide acs_user_id or user_identity_id.
|
|
135
|
-
# @param email
|
|
156
|
+
# @param access_schedule [Hash, Seam::Null, nil] `starts_at` and `ends_at` timestamps for the access system user's access. If you specify an `access_schedule`, you may include both `starts_at` and `ends_at`. If you omit `starts_at`, it defaults to the current time. `ends_at` is optional and must be a time in the future and after `starts_at`.
|
|
157
|
+
# @param acs_system_id [String, nil] ID of the access system that you want to update. You can only provide acs_system_id with user_identity_id.
|
|
158
|
+
# @param acs_user_id [String, nil] ID of the access system user that you want to update. You can only provide acs_user_id or user_identity_id.
|
|
159
|
+
# @param email [String, nil]
|
|
136
160
|
# @deprecated email: use email_address.
|
|
137
|
-
# @param email_address Email address of the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management).
|
|
138
|
-
# @param full_name Full name of the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management).
|
|
139
|
-
# @param hid_acs_system_id ID of the HID access control system associated with the user.
|
|
140
|
-
# @param phone_number Phone number of the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) in E.164 format (for example, `+15555550100`).
|
|
141
|
-
# @param user_identity_id ID of the user identity that you want to update. You can only provide acs_user_id or user_identity_id. If you provide user_identity_id, you must also provide acs_system_id.
|
|
161
|
+
# @param email_address [String, nil] Email address of the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management).
|
|
162
|
+
# @param full_name [String, nil] Full name of the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management).
|
|
163
|
+
# @param hid_acs_system_id [String, nil] ID of the HID access control system associated with the user.
|
|
164
|
+
# @param phone_number [String, nil] Phone number of the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) in E.164 format (for example, `+15555550100`).
|
|
165
|
+
# @param user_identity_id [String, nil] ID of the user identity that you want to update. You can only provide acs_user_id or user_identity_id. If you provide user_identity_id, you must also provide acs_system_id.
|
|
142
166
|
# @return [nil] OK
|
|
143
167
|
def update(access_schedule: nil, acs_system_id: nil, acs_user_id: nil, email: nil, email_address: nil, full_name: nil, hid_acs_system_id: nil, phone_number: nil, user_identity_id: nil)
|
|
144
|
-
|
|
168
|
+
if access_schedule.nil? && acs_system_id.nil? && acs_user_id.nil? && email.nil? && email_address.nil? && full_name.nil? && hid_acs_system_id.nil? && phone_number.nil? && user_identity_id.nil?
|
|
169
|
+
raise TypeError, "At least one parameter is required for /acs/users/update"
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
@client.patch("/acs/users/update", {access_schedule: access_schedule, acs_system_id: acs_system_id, acs_user_id: acs_user_id, email: email, email_address: email_address, full_name: full_name, hid_acs_system_id: hid_acs_system_id, phone_number: phone_number, user_identity_id: user_identity_id}.compact)
|
|
145
173
|
|
|
146
174
|
nil
|
|
147
175
|
end
|
|
@@ -11,10 +11,10 @@ module Seam
|
|
|
11
11
|
end
|
|
12
12
|
|
|
13
13
|
# Returns a specified [action attempt](https://docs.seam.co/core-concepts/action-attempts).
|
|
14
|
-
# @param action_attempt_id ID of the action attempt that you want to get.
|
|
14
|
+
# @param action_attempt_id [String] ID of the action attempt that you want to get.
|
|
15
15
|
# @return [Seam::Resources::ActionAttempt] OK
|
|
16
16
|
def get(action_attempt_id:, wait_for_action_attempt: nil)
|
|
17
|
-
res = @client.
|
|
17
|
+
res = @client.get("/action_attempts/get", {action_attempt_id: action_attempt_id}.compact)
|
|
18
18
|
|
|
19
19
|
wait_for_action_attempt = wait_for_action_attempt.nil? ? @defaults.wait_for_action_attempt : wait_for_action_attempt
|
|
20
20
|
|
|
@@ -22,10 +22,10 @@ module Seam
|
|
|
22
22
|
end
|
|
23
23
|
|
|
24
24
|
# Returns a list of the [action attempts](https://docs.seam.co/core-concepts/action-attempts) that you specify as an array of `action_attempt_id`s.
|
|
25
|
-
# @param action_attempt_ids IDs of the action attempts that you want to retrieve.
|
|
26
|
-
# @param device_id ID of the device to filter action attempts by.
|
|
27
|
-
# @param limit Maximum number of records to return per page.
|
|
28
|
-
# @param page_cursor Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`.
|
|
25
|
+
# @param action_attempt_ids [Array<String>, nil] IDs of the action attempts that you want to retrieve.
|
|
26
|
+
# @param device_id [String, nil] ID of the device to filter action attempts by.
|
|
27
|
+
# @param limit [Integer, nil] Maximum number of records to return per page.
|
|
28
|
+
# @param page_cursor [String, Seam::Null, nil] Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`.
|
|
29
29
|
# @return [Seam::Resources::ActionAttempt] OK
|
|
30
30
|
def list(action_attempt_ids: nil, device_id: nil, limit: nil, page_cursor: nil)
|
|
31
31
|
res = @client.post("/action_attempts/list", {action_attempt_ids: action_attempt_ids, device_id: device_id, limit: limit, page_cursor: page_cursor}.compact)
|
|
@@ -9,48 +9,48 @@ module Seam
|
|
|
9
9
|
end
|
|
10
10
|
|
|
11
11
|
# Creates a new [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens).
|
|
12
|
-
# @param connect_webview_ids IDs of the [Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews) for which you want to create a client session.
|
|
13
|
-
# @param connected_account_ids IDs of the [connected accounts](https://docs.seam.co/core-concepts/connected-accounts) for which you want to create a client session.
|
|
14
|
-
# @param customer_id Customer ID that you want to associate with the new client session.
|
|
15
|
-
# @param customer_key Customer key that you want to associate with the new client session.
|
|
16
|
-
# @param expires_at Date and time at which the client session should expire, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format.
|
|
17
|
-
# @param user_identifier_key Your user ID for the user for whom you want to create a client session.
|
|
18
|
-
# @param user_identity_id ID of the [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) for which you want to create a client session.
|
|
19
|
-
# @param user_identity_ids IDs of the [user identities](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) that you want to associate with the client session.
|
|
12
|
+
# @param connect_webview_ids [Array<String>, nil] IDs of the [Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews) for which you want to create a client session.
|
|
13
|
+
# @param connected_account_ids [Array<String>, nil] IDs of the [connected accounts](https://docs.seam.co/core-concepts/connected-accounts) for which you want to create a client session.
|
|
14
|
+
# @param customer_id [String, nil] Customer ID that you want to associate with the new client session.
|
|
15
|
+
# @param customer_key [String, nil] Customer key that you want to associate with the new client session.
|
|
16
|
+
# @param expires_at [Time, nil] Date and time at which the client session should expire, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format.
|
|
17
|
+
# @param user_identifier_key [String, nil] Your user ID for the user for whom you want to create a client session.
|
|
18
|
+
# @param user_identity_id [String, nil] ID of the [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) for which you want to create a client session.
|
|
19
|
+
# @param user_identity_ids [Array<String>, nil] IDs of the [user identities](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) that you want to associate with the client session.
|
|
20
20
|
# @deprecated user_identity_ids: Use `user_identity_id` instead.
|
|
21
21
|
# @return [Seam::Resources::ClientSession] OK
|
|
22
22
|
def create(connect_webview_ids: nil, connected_account_ids: nil, customer_id: nil, customer_key: nil, expires_at: nil, user_identifier_key: nil, user_identity_id: nil, user_identity_ids: nil)
|
|
23
|
-
res = @client.
|
|
23
|
+
res = @client.put("/client_sessions/create", {connect_webview_ids: connect_webview_ids, connected_account_ids: connected_account_ids, customer_id: customer_id, customer_key: customer_key, expires_at: expires_at, user_identifier_key: user_identifier_key, user_identity_id: user_identity_id, user_identity_ids: user_identity_ids}.compact)
|
|
24
24
|
|
|
25
25
|
Seam::Resources::ClientSession.load_from_response(res.body["client_session"])
|
|
26
26
|
end
|
|
27
27
|
|
|
28
28
|
# Deletes a [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens).
|
|
29
|
-
# @param client_session_id ID of the client session that you want to delete.
|
|
29
|
+
# @param client_session_id [String] ID of the client session that you want to delete.
|
|
30
30
|
# @return [nil] OK
|
|
31
31
|
def delete(client_session_id:)
|
|
32
|
-
@client.
|
|
32
|
+
@client.delete("/client_sessions/delete", {client_session_id: client_session_id}.compact)
|
|
33
33
|
|
|
34
34
|
nil
|
|
35
35
|
end
|
|
36
36
|
|
|
37
37
|
# Returns a specified [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens).
|
|
38
|
-
# @param client_session_id ID of the client session that you want to get.
|
|
39
|
-
# @param user_identifier_key User identifier key associated with the client session that you want to get.
|
|
38
|
+
# @param client_session_id [String, nil] ID of the client session that you want to get.
|
|
39
|
+
# @param user_identifier_key [String, nil] User identifier key associated with the client session that you want to get.
|
|
40
40
|
# @return [Seam::Resources::ClientSession] OK
|
|
41
41
|
def get(client_session_id: nil, user_identifier_key: nil)
|
|
42
|
-
res = @client.
|
|
42
|
+
res = @client.get("/client_sessions/get", {client_session_id: client_session_id, user_identifier_key: user_identifier_key}.compact)
|
|
43
43
|
|
|
44
44
|
Seam::Resources::ClientSession.load_from_response(res.body["client_session"])
|
|
45
45
|
end
|
|
46
46
|
|
|
47
47
|
# Returns a [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens) with specific characteristics or creates a new client session with these characteristics if it does not yet exist.
|
|
48
|
-
# @param connect_webview_ids IDs of the [Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews) that you want to associate with the client session (or that are already associated with the existing client session).
|
|
49
|
-
# @param connected_account_ids IDs of the [connected accounts](https://docs.seam.co/api/connected_accounts) that you want to associate with the client session (or that are already associated with the existing client session).
|
|
50
|
-
# @param expires_at Date and time at which the client session should expire in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. If the client session already exists, this will update the expiration before returning it.
|
|
51
|
-
# @param user_identifier_key Your user ID for the user that you want to associate with the client session (or that is already associated with the existing client session).
|
|
52
|
-
# @param user_identity_id ID of the [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) that you want to associate with the client session (or that are already associated with the existing client session).
|
|
53
|
-
# @param user_identity_ids IDs of the [user identities](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) that you want to associate with the client session.
|
|
48
|
+
# @param connect_webview_ids [Array<String>, nil] IDs of the [Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews) that you want to associate with the client session (or that are already associated with the existing client session).
|
|
49
|
+
# @param connected_account_ids [Array<String>, nil] IDs of the [connected accounts](https://docs.seam.co/api/connected_accounts) that you want to associate with the client session (or that are already associated with the existing client session).
|
|
50
|
+
# @param expires_at [Time, nil] Date and time at which the client session should expire in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. If the client session already exists, this will update the expiration before returning it.
|
|
51
|
+
# @param user_identifier_key [String, nil] Your user ID for the user that you want to associate with the client session (or that is already associated with the existing client session).
|
|
52
|
+
# @param user_identity_id [String, nil] ID of the [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) that you want to associate with the client session (or that are already associated with the existing client session).
|
|
53
|
+
# @param user_identity_ids [Array<String>, nil] IDs of the [user identities](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) that you want to associate with the client session.
|
|
54
54
|
# @deprecated user_identity_ids: Use `user_identity_id`.
|
|
55
55
|
# @return [Seam::Resources::ClientSession] OK
|
|
56
56
|
def get_or_create(connect_webview_ids: nil, connected_account_ids: nil, expires_at: nil, user_identifier_key: nil, user_identity_id: nil, user_identity_ids: nil)
|
|
@@ -60,29 +60,33 @@ module Seam
|
|
|
60
60
|
end
|
|
61
61
|
|
|
62
62
|
# Grants a [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens) access to one or more resources, such as [Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews), [user identities](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity), and so on.
|
|
63
|
-
# @param client_session_id ID of the client session to which you want to grant access to resources.
|
|
64
|
-
# @param connect_webview_ids IDs of the [Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews) that you want to associate with the client session.
|
|
65
|
-
# @param connected_account_ids IDs of the [connected accounts](https://docs.seam.co/core-concepts/connected-accounts) that you want to associate with the client session.
|
|
66
|
-
# @param user_identifier_key Your user ID for the user that you want to associate with the client session.
|
|
67
|
-
# @param user_identity_id ID of the [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) that you want to associate with the client session.
|
|
68
|
-
# @param user_identity_ids IDs of the [user identities](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) that you want to associate with the client session.
|
|
63
|
+
# @param client_session_id [String, nil] ID of the client session to which you want to grant access to resources.
|
|
64
|
+
# @param connect_webview_ids [Array<String>, nil] IDs of the [Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews) that you want to associate with the client session.
|
|
65
|
+
# @param connected_account_ids [Array<String>, nil] IDs of the [connected accounts](https://docs.seam.co/core-concepts/connected-accounts) that you want to associate with the client session.
|
|
66
|
+
# @param user_identifier_key [String, nil] Your user ID for the user that you want to associate with the client session.
|
|
67
|
+
# @param user_identity_id [String, nil] ID of the [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) that you want to associate with the client session.
|
|
68
|
+
# @param user_identity_ids [Array<String>, nil] IDs of the [user identities](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) that you want to associate with the client session.
|
|
69
69
|
# @deprecated user_identity_ids: Use `user_identity_id`.
|
|
70
70
|
# @return [nil] OK
|
|
71
71
|
def grant_access(client_session_id: nil, connect_webview_ids: nil, connected_account_ids: nil, user_identifier_key: nil, user_identity_id: nil, user_identity_ids: nil)
|
|
72
|
-
|
|
72
|
+
if client_session_id.nil? && connect_webview_ids.nil? && connected_account_ids.nil? && user_identifier_key.nil? && user_identity_id.nil? && user_identity_ids.nil?
|
|
73
|
+
raise TypeError, "At least one parameter is required for /client_sessions/grant_access"
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
@client.patch("/client_sessions/grant_access", {client_session_id: client_session_id, connect_webview_ids: connect_webview_ids, connected_account_ids: connected_account_ids, user_identifier_key: user_identifier_key, user_identity_id: user_identity_id, user_identity_ids: user_identity_ids}.compact)
|
|
73
77
|
|
|
74
78
|
nil
|
|
75
79
|
end
|
|
76
80
|
|
|
77
81
|
# Returns a list of all [client sessions](https://docs.seam.co/core-concepts/authentication/client-session-tokens).
|
|
78
|
-
# @param client_session_id ID of the client session that you want to retrieve.
|
|
79
|
-
# @param connect_webview_id ID of the [Connect Webview](https://docs.seam.co/core-concepts/connect-webviews) for which you want to retrieve client sessions.
|
|
80
|
-
# @param user_identifier_key Your user ID for the user by which you want to filter client sessions.
|
|
81
|
-
# @param user_identity_id ID of the [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) for which you want to retrieve client sessions.
|
|
82
|
-
# @param without_user_identifier_key Indicates whether to retrieve only client sessions without associated user identifier keys.
|
|
82
|
+
# @param client_session_id [String, nil] ID of the client session that you want to retrieve.
|
|
83
|
+
# @param connect_webview_id [String, nil] ID of the [Connect Webview](https://docs.seam.co/core-concepts/connect-webviews) for which you want to retrieve client sessions.
|
|
84
|
+
# @param user_identifier_key [String, nil] Your user ID for the user by which you want to filter client sessions.
|
|
85
|
+
# @param user_identity_id [String, nil] ID of the [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) for which you want to retrieve client sessions.
|
|
86
|
+
# @param without_user_identifier_key [Boolean, nil] Indicates whether to retrieve only client sessions without associated user identifier keys.
|
|
83
87
|
# @return [Seam::Resources::ClientSession] OK
|
|
84
88
|
def list(client_session_id: nil, connect_webview_id: nil, user_identifier_key: nil, user_identity_id: nil, without_user_identifier_key: nil)
|
|
85
|
-
res = @client.
|
|
89
|
+
res = @client.get("/client_sessions/list", {client_session_id: client_session_id, connect_webview_id: connect_webview_id, user_identifier_key: user_identifier_key, user_identity_id: user_identity_id, without_user_identifier_key: without_user_identifier_key}.compact)
|
|
86
90
|
|
|
87
91
|
Seam::Resources::ClientSession.load_from_response(res.body["client_sessions"])
|
|
88
92
|
end
|
|
@@ -90,7 +94,7 @@ module Seam
|
|
|
90
94
|
# Revokes a [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens).
|
|
91
95
|
#
|
|
92
96
|
# Note that [deleting a client session](https://docs.seam.co/api/client_sessions/delete) is a separate action.
|
|
93
|
-
# @param client_session_id ID of the client session that you want to revoke.
|
|
97
|
+
# @param client_session_id [String] ID of the client session that you want to revoke.
|
|
94
98
|
# @return [nil] OK
|
|
95
99
|
def revoke(client_session_id:)
|
|
96
100
|
@client.post("/client_sessions/revoke", {client_session_id: client_session_id}.compact)
|