seam 2.0.0a2 → 2.0.0b1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +49 -53
- data/README.md +323 -3
- data/Rakefile +4 -1
- data/lib/seam/auth.rb +118 -0
- data/lib/seam/base_resource.rb +63 -0
- data/lib/seam/deep_hash_accessor.rb +37 -0
- data/lib/seam/default_endpoint.rb +5 -0
- data/lib/seam/helpers/action_attempt.rb +45 -0
- data/lib/seam/http.rb +52 -0
- data/lib/seam/http_multi_workspace.rb +62 -0
- data/lib/seam/http_single_workspace.rb +42 -0
- data/lib/seam/options.rb +64 -0
- data/lib/seam/parse_options.rb +23 -0
- data/lib/seam/request.rb +82 -51
- data/lib/seam/routes/clients/access_codes.rb +74 -0
- data/lib/seam/routes/clients/access_codes_simulate.rb +18 -0
- data/lib/seam/routes/clients/access_codes_unmanaged.rb +42 -0
- data/lib/seam/routes/clients/acs.rb +44 -0
- data/lib/seam/routes/clients/acs_access_groups.rb +48 -0
- data/lib/seam/routes/clients/acs_access_groups_unmanaged.rb +24 -0
- data/lib/seam/routes/clients/acs_credential_pools.rb +18 -0
- data/lib/seam/routes/clients/acs_credential_provisioning_automations.rb +18 -0
- data/lib/seam/routes/clients/acs_credentials.rb +60 -0
- data/lib/seam/routes/clients/acs_credentials_unmanaged.rb +24 -0
- data/lib/seam/routes/clients/acs_encoders.rb +36 -0
- data/lib/seam/routes/clients/acs_entrances.rb +36 -0
- data/lib/seam/routes/clients/acs_systems.rb +30 -0
- data/lib/seam/routes/clients/acs_users.rb +78 -0
- data/lib/seam/routes/clients/acs_users_unmanaged.rb +24 -0
- data/lib/seam/routes/clients/action_attempts.rb +28 -0
- data/lib/seam/routes/clients/client_sessions.rb +54 -0
- data/lib/seam/routes/clients/connect_webviews.rb +36 -0
- data/lib/seam/routes/clients/connected_accounts.rb +36 -0
- data/lib/seam/routes/clients/devices.rb +50 -0
- data/lib/seam/routes/clients/devices_simulate.rb +30 -0
- data/lib/seam/routes/clients/devices_unmanaged.rb +30 -0
- data/lib/seam/routes/clients/events.rb +24 -0
- data/lib/seam/routes/clients/index.rb +38 -0
- data/lib/seam/routes/clients/locks.rb +42 -0
- data/lib/seam/routes/clients/networks.rb +24 -0
- data/lib/seam/routes/clients/noise_sensors.rb +26 -0
- data/lib/seam/routes/clients/noise_sensors_noise_thresholds.rb +42 -0
- data/lib/seam/routes/clients/noise_sensors_simulate.rb +18 -0
- data/lib/seam/routes/clients/phones.rb +28 -0
- data/lib/seam/routes/clients/phones_simulate.rb +18 -0
- data/lib/seam/routes/clients/thermostats.rb +108 -0
- data/lib/seam/routes/clients/thermostats_schedules.rb +42 -0
- data/lib/seam/routes/clients/user_identities.rb +88 -0
- data/lib/seam/routes/clients/user_identities_enrollment_automations.rb +36 -0
- data/lib/seam/routes/clients/webhooks.rb +42 -0
- data/lib/seam/routes/clients/workspaces.rb +40 -0
- data/lib/seam/routes/resources/access_code.rb +14 -0
- data/lib/seam/routes/resources/acs_access_group.rb +11 -0
- data/lib/seam/routes/resources/acs_credential.rb +14 -0
- data/lib/seam/routes/resources/acs_credential_pool.rb +11 -0
- data/lib/seam/routes/resources/acs_credential_provisioning_automation.rb +11 -0
- data/lib/seam/routes/resources/acs_entrance.rb +13 -0
- data/lib/seam/routes/resources/acs_system.rb +14 -0
- data/lib/seam/routes/resources/acs_user.rb +14 -0
- data/lib/seam/routes/resources/action_attempt.rb +9 -0
- data/lib/seam/routes/resources/client_session.rb +11 -0
- data/lib/seam/routes/resources/connect_webview.rb +11 -0
- data/lib/seam/routes/resources/connected_account.rb +14 -0
- data/lib/seam/routes/resources/device.rb +14 -0
- data/lib/seam/routes/resources/device_provider.rb +9 -0
- data/lib/seam/routes/resources/enrollment_automation.rb +11 -0
- data/lib/seam/routes/resources/event.rb +11 -0
- data/lib/seam/routes/resources/index.rb +33 -0
- data/lib/seam/routes/resources/network.rb +11 -0
- data/lib/seam/routes/resources/noise_threshold.rb +9 -0
- data/lib/seam/routes/resources/phone.rb +14 -0
- data/lib/seam/routes/resources/resource_error.rb +11 -0
- data/lib/seam/routes/resources/resource_errors_support.rb +11 -0
- data/lib/seam/routes/resources/resource_warning.rb +11 -0
- data/lib/seam/routes/resources/resource_warnings_support.rb +11 -0
- data/lib/seam/routes/resources/service_health.rb +9 -0
- data/lib/seam/routes/resources/thermostat_schedule.rb +13 -0
- data/lib/seam/routes/resources/unmanaged_access_code.rb +14 -0
- data/lib/seam/routes/resources/unmanaged_device.rb +14 -0
- data/lib/seam/routes/resources/user_identity.rb +11 -0
- data/lib/seam/routes/resources/webhook.rb +9 -0
- data/lib/seam/routes/resources/workspace.rb +9 -0
- data/lib/seam/routes/routes.rb +94 -0
- data/lib/seam/token.rb +53 -0
- data/lib/seam/version.rb +1 -1
- data/lib/seam/wait_for_action_attempt.rb +32 -0
- data/lib/seam/webhook.rb +23 -0
- data/lib/seam.rb +19 -68
- metadata +115 -70
- data/lib/seam/client.rb +0 -129
- data/lib/seam/clients/access_codes.rb +0 -95
- data/lib/seam/clients/access_codes_simulate.rb +0 -17
- data/lib/seam/clients/access_codes_unmanaged.rb +0 -57
- data/lib/seam/clients/acs.rb +0 -35
- data/lib/seam/clients/acs_access_groups.rb +0 -57
- data/lib/seam/clients/acs_credential_pools.rb +0 -17
- data/lib/seam/clients/acs_credential_provisioning_automations.rb +0 -17
- data/lib/seam/clients/acs_credentials.rb +0 -77
- data/lib/seam/clients/acs_entrances.rb +0 -47
- data/lib/seam/clients/acs_systems.rb +0 -27
- data/lib/seam/clients/acs_users.rb +0 -117
- data/lib/seam/clients/action_attempts.rb +0 -30
- data/lib/seam/clients/base_client.rb +0 -21
- data/lib/seam/clients/client_sessions.rb +0 -77
- data/lib/seam/clients/connect_webviews.rb +0 -47
- data/lib/seam/clients/connected_accounts.rb +0 -47
- data/lib/seam/clients/devices.rb +0 -65
- data/lib/seam/clients/devices_simulate.rb +0 -17
- data/lib/seam/clients/devices_unmanaged.rb +0 -37
- data/lib/seam/clients/events.rb +0 -27
- data/lib/seam/clients/locks.rb +0 -53
- data/lib/seam/clients/networks.rb +0 -27
- data/lib/seam/clients/noise_sensors.rb +0 -15
- data/lib/seam/clients/noise_sensors_noise_thresholds.rb +0 -57
- data/lib/seam/clients/noise_sensors_simulate.rb +0 -17
- data/lib/seam/clients/phones.rb +0 -31
- data/lib/seam/clients/phones_simulate.rb +0 -17
- data/lib/seam/clients/thermostats.rb +0 -106
- data/lib/seam/clients/thermostats_climate_setting_schedules.rb +0 -57
- data/lib/seam/clients/user_identities.rb +0 -131
- data/lib/seam/clients/user_identities_enrollment_automations.rb +0 -47
- data/lib/seam/clients/webhooks.rb +0 -57
- data/lib/seam/clients/workspaces.rb +0 -50
- data/lib/seam/resources/access_code.rb +0 -12
- data/lib/seam/resources/acs_access_group.rb +0 -9
- data/lib/seam/resources/acs_credential.rb +0 -12
- data/lib/seam/resources/acs_credential_pool.rb +0 -9
- data/lib/seam/resources/acs_credential_provisioning_automation.rb +0 -9
- data/lib/seam/resources/acs_entrance.rb +0 -9
- data/lib/seam/resources/acs_system.rb +0 -9
- data/lib/seam/resources/acs_user.rb +0 -9
- data/lib/seam/resources/action_attempt.rb +0 -46
- data/lib/seam/resources/base_resource.rb +0 -58
- data/lib/seam/resources/client_session.rb +0 -9
- data/lib/seam/resources/climate_setting_schedule.rb +0 -11
- data/lib/seam/resources/connect_webview.rb +0 -9
- data/lib/seam/resources/connected_account.rb +0 -12
- data/lib/seam/resources/device.rb +0 -12
- data/lib/seam/resources/device_provider.rb +0 -7
- data/lib/seam/resources/enrollment_automation.rb +0 -9
- data/lib/seam/resources/event.rb +0 -9
- data/lib/seam/resources/network.rb +0 -9
- data/lib/seam/resources/noise_threshold.rb +0 -7
- data/lib/seam/resources/phone.rb +0 -12
- data/lib/seam/resources/resource_error.rb +0 -9
- data/lib/seam/resources/resource_errors_support.rb +0 -9
- data/lib/seam/resources/resource_warning.rb +0 -9
- data/lib/seam/resources/resource_warnings_support.rb +0 -9
- data/lib/seam/resources/service_health.rb +0 -7
- data/lib/seam/resources/unmanaged_access_code.rb +0 -12
- data/lib/seam/resources/unmanaged_device.rb +0 -12
- data/lib/seam/resources/user_identity.rb +0 -9
- data/lib/seam/resources/webhook.rb +0 -7
- data/lib/seam/resources/workspace.rb +0 -7
@@ -1,57 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Seam
|
4
|
-
module Clients
|
5
|
-
class AccessCodesUnmanaged < BaseClient
|
6
|
-
def convert_to_managed(access_code_id:, allow_external_modification: nil, force: nil, is_external_modification_allowed: nil, sync: nil)
|
7
|
-
request_seam(
|
8
|
-
:post,
|
9
|
-
"/access_codes/unmanaged/convert_to_managed",
|
10
|
-
body: {access_code_id: access_code_id, allow_external_modification: allow_external_modification, force: force, is_external_modification_allowed: is_external_modification_allowed, sync: sync}.compact
|
11
|
-
)
|
12
|
-
|
13
|
-
nil
|
14
|
-
end
|
15
|
-
|
16
|
-
def delete(access_code_id:, sync: nil)
|
17
|
-
request_seam(
|
18
|
-
:post,
|
19
|
-
"/access_codes/unmanaged/delete",
|
20
|
-
body: {access_code_id: access_code_id, sync: sync}.compact
|
21
|
-
)
|
22
|
-
|
23
|
-
nil
|
24
|
-
end
|
25
|
-
|
26
|
-
def get(access_code_id: nil, code: nil, device_id: nil)
|
27
|
-
request_seam_object(
|
28
|
-
:post,
|
29
|
-
"/access_codes/unmanaged/get",
|
30
|
-
Seam::UnmanagedAccessCode,
|
31
|
-
"access_code",
|
32
|
-
body: {access_code_id: access_code_id, code: code, device_id: device_id}.compact
|
33
|
-
)
|
34
|
-
end
|
35
|
-
|
36
|
-
def list(device_id:, user_identifier_key: nil)
|
37
|
-
request_seam_object(
|
38
|
-
:post,
|
39
|
-
"/access_codes/unmanaged/list",
|
40
|
-
Seam::UnmanagedAccessCode,
|
41
|
-
"access_codes",
|
42
|
-
body: {device_id: device_id, user_identifier_key: user_identifier_key}.compact
|
43
|
-
)
|
44
|
-
end
|
45
|
-
|
46
|
-
def update(access_code_id:, is_managed:, allow_external_modification: nil, force: nil, is_external_modification_allowed: nil)
|
47
|
-
request_seam(
|
48
|
-
:post,
|
49
|
-
"/access_codes/unmanaged/update",
|
50
|
-
body: {access_code_id: access_code_id, is_managed: is_managed, allow_external_modification: allow_external_modification, force: force, is_external_modification_allowed: is_external_modification_allowed}.compact
|
51
|
-
)
|
52
|
-
|
53
|
-
nil
|
54
|
-
end
|
55
|
-
end
|
56
|
-
end
|
57
|
-
end
|
data/lib/seam/clients/acs.rb
DELETED
@@ -1,35 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Seam
|
4
|
-
module Clients
|
5
|
-
class Acs < BaseClient
|
6
|
-
def access_groups
|
7
|
-
@access_groups ||= Seam::Clients::AcsAccessGroups.new(self)
|
8
|
-
end
|
9
|
-
|
10
|
-
def credential_pools
|
11
|
-
@credential_pools ||= Seam::Clients::AcsCredentialPools.new(self)
|
12
|
-
end
|
13
|
-
|
14
|
-
def credential_provisioning_automations
|
15
|
-
@credential_provisioning_automations ||= Seam::Clients::AcsCredentialProvisioningAutomations.new(self)
|
16
|
-
end
|
17
|
-
|
18
|
-
def credentials
|
19
|
-
@credentials ||= Seam::Clients::AcsCredentials.new(self)
|
20
|
-
end
|
21
|
-
|
22
|
-
def entrances
|
23
|
-
@entrances ||= Seam::Clients::AcsEntrances.new(self)
|
24
|
-
end
|
25
|
-
|
26
|
-
def systems
|
27
|
-
@systems ||= Seam::Clients::AcsSystems.new(self)
|
28
|
-
end
|
29
|
-
|
30
|
-
def users
|
31
|
-
@users ||= Seam::Clients::AcsUsers.new(self)
|
32
|
-
end
|
33
|
-
end
|
34
|
-
end
|
35
|
-
end
|
@@ -1,57 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Seam
|
4
|
-
module Clients
|
5
|
-
class AcsAccessGroups < BaseClient
|
6
|
-
def add_user(acs_access_group_id:, acs_user_id:)
|
7
|
-
request_seam(
|
8
|
-
:post,
|
9
|
-
"/acs/access_groups/add_user",
|
10
|
-
body: {acs_access_group_id: acs_access_group_id, acs_user_id: acs_user_id}.compact
|
11
|
-
)
|
12
|
-
|
13
|
-
nil
|
14
|
-
end
|
15
|
-
|
16
|
-
def get(acs_access_group_id:)
|
17
|
-
request_seam_object(
|
18
|
-
:post,
|
19
|
-
"/acs/access_groups/get",
|
20
|
-
Seam::AcsAccessGroup,
|
21
|
-
"acs_access_group",
|
22
|
-
body: {acs_access_group_id: acs_access_group_id}.compact
|
23
|
-
)
|
24
|
-
end
|
25
|
-
|
26
|
-
def list(acs_system_id: nil, acs_user_id: nil)
|
27
|
-
request_seam_object(
|
28
|
-
:post,
|
29
|
-
"/acs/access_groups/list",
|
30
|
-
Seam::AcsAccessGroup,
|
31
|
-
"acs_access_groups",
|
32
|
-
body: {acs_system_id: acs_system_id, acs_user_id: acs_user_id}.compact
|
33
|
-
)
|
34
|
-
end
|
35
|
-
|
36
|
-
def list_users(acs_access_group_id:)
|
37
|
-
request_seam_object(
|
38
|
-
:post,
|
39
|
-
"/acs/access_groups/list_users",
|
40
|
-
Seam::AcsUser,
|
41
|
-
"acs_users",
|
42
|
-
body: {acs_access_group_id: acs_access_group_id}.compact
|
43
|
-
)
|
44
|
-
end
|
45
|
-
|
46
|
-
def remove_user(acs_access_group_id:, acs_user_id:)
|
47
|
-
request_seam(
|
48
|
-
:post,
|
49
|
-
"/acs/access_groups/remove_user",
|
50
|
-
body: {acs_access_group_id: acs_access_group_id, acs_user_id: acs_user_id}.compact
|
51
|
-
)
|
52
|
-
|
53
|
-
nil
|
54
|
-
end
|
55
|
-
end
|
56
|
-
end
|
57
|
-
end
|
@@ -1,17 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Seam
|
4
|
-
module Clients
|
5
|
-
class AcsCredentialPools < BaseClient
|
6
|
-
def list(acs_system_id:)
|
7
|
-
request_seam_object(
|
8
|
-
:post,
|
9
|
-
"/acs/credential_pools/list",
|
10
|
-
Seam::AcsCredentialPool,
|
11
|
-
"acs_credential_pools",
|
12
|
-
body: {acs_system_id: acs_system_id}.compact
|
13
|
-
)
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
@@ -1,17 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Seam
|
4
|
-
module Clients
|
5
|
-
class AcsCredentialProvisioningAutomations < BaseClient
|
6
|
-
def launch(credential_manager_acs_system_id:, user_identity_id:, acs_credential_pool_id: nil, create_credential_manager_user: nil, credential_manager_acs_user_id: nil)
|
7
|
-
request_seam_object(
|
8
|
-
:post,
|
9
|
-
"/acs/credential_provisioning_automations/launch",
|
10
|
-
Seam::AcsCredentialProvisioningAutomation,
|
11
|
-
"acs_credential_provisioning_automation",
|
12
|
-
body: {credential_manager_acs_system_id: credential_manager_acs_system_id, user_identity_id: user_identity_id, acs_credential_pool_id: acs_credential_pool_id, create_credential_manager_user: create_credential_manager_user, credential_manager_acs_user_id: credential_manager_acs_user_id}.compact
|
13
|
-
)
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
@@ -1,77 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Seam
|
4
|
-
module Clients
|
5
|
-
class AcsCredentials < BaseClient
|
6
|
-
def assign(acs_credential_id:, acs_user_id:)
|
7
|
-
request_seam(
|
8
|
-
:post,
|
9
|
-
"/acs/credentials/assign",
|
10
|
-
body: {acs_credential_id: acs_credential_id, acs_user_id: acs_user_id}.compact
|
11
|
-
)
|
12
|
-
|
13
|
-
nil
|
14
|
-
end
|
15
|
-
|
16
|
-
def create(access_method:, acs_user_id:, allowed_acs_entrance_ids: nil, code: nil, credential_manager_acs_system_id: nil, ends_at: nil, is_multi_phone_sync_credential: nil, starts_at: nil, visionline_metadata: nil)
|
17
|
-
request_seam_object(
|
18
|
-
:post,
|
19
|
-
"/acs/credentials/create",
|
20
|
-
Seam::AcsCredential,
|
21
|
-
"acs_credential",
|
22
|
-
body: {access_method: access_method, acs_user_id: acs_user_id, allowed_acs_entrance_ids: allowed_acs_entrance_ids, code: code, credential_manager_acs_system_id: credential_manager_acs_system_id, ends_at: ends_at, is_multi_phone_sync_credential: is_multi_phone_sync_credential, starts_at: starts_at, visionline_metadata: visionline_metadata}.compact
|
23
|
-
)
|
24
|
-
end
|
25
|
-
|
26
|
-
def delete(acs_credential_id:)
|
27
|
-
request_seam(
|
28
|
-
:post,
|
29
|
-
"/acs/credentials/delete",
|
30
|
-
body: {acs_credential_id: acs_credential_id}.compact
|
31
|
-
)
|
32
|
-
|
33
|
-
nil
|
34
|
-
end
|
35
|
-
|
36
|
-
def get(acs_credential_id:)
|
37
|
-
request_seam_object(
|
38
|
-
:post,
|
39
|
-
"/acs/credentials/get",
|
40
|
-
Seam::AcsCredential,
|
41
|
-
"acs_credential",
|
42
|
-
body: {acs_credential_id: acs_credential_id}.compact
|
43
|
-
)
|
44
|
-
end
|
45
|
-
|
46
|
-
def list(acs_user_id: nil, acs_system_id: nil, user_identity_id: nil, is_multi_phone_sync_credential: nil)
|
47
|
-
request_seam_object(
|
48
|
-
:post,
|
49
|
-
"/acs/credentials/list",
|
50
|
-
Seam::AcsCredential,
|
51
|
-
"acs_credentials",
|
52
|
-
body: {acs_user_id: acs_user_id, acs_system_id: acs_system_id, user_identity_id: user_identity_id, is_multi_phone_sync_credential: is_multi_phone_sync_credential}.compact
|
53
|
-
)
|
54
|
-
end
|
55
|
-
|
56
|
-
def unassign(acs_credential_id:, acs_user_id:)
|
57
|
-
request_seam(
|
58
|
-
:post,
|
59
|
-
"/acs/credentials/unassign",
|
60
|
-
body: {acs_credential_id: acs_credential_id, acs_user_id: acs_user_id}.compact
|
61
|
-
)
|
62
|
-
|
63
|
-
nil
|
64
|
-
end
|
65
|
-
|
66
|
-
def update(acs_credential_id:, code:)
|
67
|
-
request_seam(
|
68
|
-
:post,
|
69
|
-
"/acs/credentials/update",
|
70
|
-
body: {acs_credential_id: acs_credential_id, code: code}.compact
|
71
|
-
)
|
72
|
-
|
73
|
-
nil
|
74
|
-
end
|
75
|
-
end
|
76
|
-
end
|
77
|
-
end
|
@@ -1,47 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Seam
|
4
|
-
module Clients
|
5
|
-
class AcsEntrances < BaseClient
|
6
|
-
def get(acs_entrance_id:)
|
7
|
-
request_seam_object(
|
8
|
-
:post,
|
9
|
-
"/acs/entrances/get",
|
10
|
-
Seam::AcsEntrance,
|
11
|
-
"acs_entrance",
|
12
|
-
body: {acs_entrance_id: acs_entrance_id}.compact
|
13
|
-
)
|
14
|
-
end
|
15
|
-
|
16
|
-
def grant_access(acs_entrance_id:, acs_user_id:)
|
17
|
-
request_seam(
|
18
|
-
:post,
|
19
|
-
"/acs/entrances/grant_access",
|
20
|
-
body: {acs_entrance_id: acs_entrance_id, acs_user_id: acs_user_id}.compact
|
21
|
-
)
|
22
|
-
|
23
|
-
nil
|
24
|
-
end
|
25
|
-
|
26
|
-
def list(acs_credential_id: nil, acs_system_id: nil)
|
27
|
-
request_seam_object(
|
28
|
-
:post,
|
29
|
-
"/acs/entrances/list",
|
30
|
-
Seam::AcsEntrance,
|
31
|
-
"acs_entrances",
|
32
|
-
body: {acs_credential_id: acs_credential_id, acs_system_id: acs_system_id}.compact
|
33
|
-
)
|
34
|
-
end
|
35
|
-
|
36
|
-
def list_credentials_with_access(acs_entrance_id:, include_if: nil)
|
37
|
-
request_seam_object(
|
38
|
-
:post,
|
39
|
-
"/acs/entrances/list_credentials_with_access",
|
40
|
-
Seam::AcsCredential,
|
41
|
-
"acs_credentials",
|
42
|
-
body: {acs_entrance_id: acs_entrance_id, include_if: include_if}.compact
|
43
|
-
)
|
44
|
-
end
|
45
|
-
end
|
46
|
-
end
|
47
|
-
end
|
@@ -1,27 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Seam
|
4
|
-
module Clients
|
5
|
-
class AcsSystems < BaseClient
|
6
|
-
def get(acs_system_id:)
|
7
|
-
request_seam_object(
|
8
|
-
:post,
|
9
|
-
"/acs/systems/get",
|
10
|
-
Seam::AcsSystem,
|
11
|
-
"acs_system",
|
12
|
-
body: {acs_system_id: acs_system_id}.compact
|
13
|
-
)
|
14
|
-
end
|
15
|
-
|
16
|
-
def list(connected_account_id: nil)
|
17
|
-
request_seam_object(
|
18
|
-
:post,
|
19
|
-
"/acs/systems/list",
|
20
|
-
Seam::AcsSystem,
|
21
|
-
"acs_systems",
|
22
|
-
body: {connected_account_id: connected_account_id}.compact
|
23
|
-
)
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
@@ -1,117 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Seam
|
4
|
-
module Clients
|
5
|
-
class AcsUsers < BaseClient
|
6
|
-
def add_to_access_group(acs_access_group_id:, acs_user_id:)
|
7
|
-
request_seam(
|
8
|
-
:post,
|
9
|
-
"/acs/users/add_to_access_group",
|
10
|
-
body: {acs_access_group_id: acs_access_group_id, acs_user_id: acs_user_id}.compact
|
11
|
-
)
|
12
|
-
|
13
|
-
nil
|
14
|
-
end
|
15
|
-
|
16
|
-
def create(acs_system_id:, access_schedule: nil, acs_access_group_ids: nil, email: nil, email_address: nil, full_name: nil, phone_number: nil, user_identity_id: nil)
|
17
|
-
request_seam_object(
|
18
|
-
:post,
|
19
|
-
"/acs/users/create",
|
20
|
-
Seam::AcsUser,
|
21
|
-
"acs_user",
|
22
|
-
body: {acs_system_id: acs_system_id, access_schedule: access_schedule, acs_access_group_ids: acs_access_group_ids, email: email, email_address: email_address, full_name: full_name, phone_number: phone_number, user_identity_id: user_identity_id}.compact
|
23
|
-
)
|
24
|
-
end
|
25
|
-
|
26
|
-
def delete(acs_user_id:)
|
27
|
-
request_seam(
|
28
|
-
:post,
|
29
|
-
"/acs/users/delete",
|
30
|
-
body: {acs_user_id: acs_user_id}.compact
|
31
|
-
)
|
32
|
-
|
33
|
-
nil
|
34
|
-
end
|
35
|
-
|
36
|
-
def get(acs_user_id:)
|
37
|
-
request_seam_object(
|
38
|
-
:post,
|
39
|
-
"/acs/users/get",
|
40
|
-
Seam::AcsUser,
|
41
|
-
"acs_user",
|
42
|
-
body: {acs_user_id: acs_user_id}.compact
|
43
|
-
)
|
44
|
-
end
|
45
|
-
|
46
|
-
def list(acs_system_id: nil, user_identity_email_address: nil, user_identity_id: nil, user_identity_phone_number: nil)
|
47
|
-
request_seam_object(
|
48
|
-
:post,
|
49
|
-
"/acs/users/list",
|
50
|
-
Seam::AcsUser,
|
51
|
-
"acs_users",
|
52
|
-
body: {acs_system_id: acs_system_id, user_identity_email_address: user_identity_email_address, user_identity_id: user_identity_id, user_identity_phone_number: user_identity_phone_number}.compact
|
53
|
-
)
|
54
|
-
end
|
55
|
-
|
56
|
-
def list_accessible_entrances(acs_user_id:)
|
57
|
-
request_seam_object(
|
58
|
-
:post,
|
59
|
-
"/acs/users/list_accessible_entrances",
|
60
|
-
Seam::AcsEntrance,
|
61
|
-
"acs_entrances",
|
62
|
-
body: {acs_user_id: acs_user_id}.compact
|
63
|
-
)
|
64
|
-
end
|
65
|
-
|
66
|
-
def remove_from_access_group(acs_access_group_id:, acs_user_id:)
|
67
|
-
request_seam(
|
68
|
-
:post,
|
69
|
-
"/acs/users/remove_from_access_group",
|
70
|
-
body: {acs_access_group_id: acs_access_group_id, acs_user_id: acs_user_id}.compact
|
71
|
-
)
|
72
|
-
|
73
|
-
nil
|
74
|
-
end
|
75
|
-
|
76
|
-
def revoke_access_to_all_entrances(acs_user_id:)
|
77
|
-
request_seam(
|
78
|
-
:post,
|
79
|
-
"/acs/users/revoke_access_to_all_entrances",
|
80
|
-
body: {acs_user_id: acs_user_id}.compact
|
81
|
-
)
|
82
|
-
|
83
|
-
nil
|
84
|
-
end
|
85
|
-
|
86
|
-
def suspend(acs_user_id:)
|
87
|
-
request_seam(
|
88
|
-
:post,
|
89
|
-
"/acs/users/suspend",
|
90
|
-
body: {acs_user_id: acs_user_id}.compact
|
91
|
-
)
|
92
|
-
|
93
|
-
nil
|
94
|
-
end
|
95
|
-
|
96
|
-
def unsuspend(acs_user_id:)
|
97
|
-
request_seam(
|
98
|
-
:post,
|
99
|
-
"/acs/users/unsuspend",
|
100
|
-
body: {acs_user_id: acs_user_id}.compact
|
101
|
-
)
|
102
|
-
|
103
|
-
nil
|
104
|
-
end
|
105
|
-
|
106
|
-
def update(acs_user_id:, access_schedule: nil, email: nil, email_address: nil, full_name: nil, hid_acs_system_id: nil, phone_number: nil)
|
107
|
-
request_seam(
|
108
|
-
:post,
|
109
|
-
"/acs/users/update",
|
110
|
-
body: {acs_user_id: acs_user_id, access_schedule: access_schedule, email: email, email_address: email_address, full_name: full_name, hid_acs_system_id: hid_acs_system_id, phone_number: phone_number}.compact
|
111
|
-
)
|
112
|
-
|
113
|
-
nil
|
114
|
-
end
|
115
|
-
end
|
116
|
-
end
|
117
|
-
end
|
@@ -1,30 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Seam
|
4
|
-
module Clients
|
5
|
-
class ActionAttempts < BaseClient
|
6
|
-
def get(action_attempt_id:, wait_for_action_attempt: nil)
|
7
|
-
action_attempt = request_seam_object(
|
8
|
-
:post,
|
9
|
-
"/action_attempts/get",
|
10
|
-
Seam::ActionAttempt,
|
11
|
-
"action_attempt",
|
12
|
-
body: {action_attempt_id: action_attempt_id}.compact
|
13
|
-
)
|
14
|
-
|
15
|
-
action_attempt.decide_and_wait(wait_for_action_attempt)
|
16
|
-
action_attempt
|
17
|
-
end
|
18
|
-
|
19
|
-
def list(action_attempt_ids:)
|
20
|
-
request_seam_object(
|
21
|
-
:post,
|
22
|
-
"/action_attempts/list",
|
23
|
-
Seam::ActionAttempt,
|
24
|
-
"action_attempts",
|
25
|
-
body: {action_attempt_ids: action_attempt_ids}.compact
|
26
|
-
)
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
30
|
-
end
|
@@ -1,21 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Seam
|
4
|
-
module Clients
|
5
|
-
class BaseClient
|
6
|
-
attr_accessor :client
|
7
|
-
|
8
|
-
def initialize(client)
|
9
|
-
@client = client
|
10
|
-
end
|
11
|
-
|
12
|
-
def request_seam_object(*attrs)
|
13
|
-
client.request_seam_object(*attrs)
|
14
|
-
end
|
15
|
-
|
16
|
-
def request_seam(*attrs)
|
17
|
-
client.request_seam(*attrs)
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
@@ -1,77 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Seam
|
4
|
-
module Clients
|
5
|
-
class ClientSessions < BaseClient
|
6
|
-
def create(connect_webview_ids: nil, connected_account_ids: nil, expires_at: nil, user_identifier_key: nil, user_identity_ids: nil)
|
7
|
-
request_seam_object(
|
8
|
-
:post,
|
9
|
-
"/client_sessions/create",
|
10
|
-
Seam::ClientSession,
|
11
|
-
"client_session",
|
12
|
-
body: {connect_webview_ids: connect_webview_ids, connected_account_ids: connected_account_ids, expires_at: expires_at, user_identifier_key: user_identifier_key, user_identity_ids: user_identity_ids}.compact
|
13
|
-
)
|
14
|
-
end
|
15
|
-
|
16
|
-
def delete(client_session_id:)
|
17
|
-
request_seam(
|
18
|
-
:post,
|
19
|
-
"/client_sessions/delete",
|
20
|
-
body: {client_session_id: client_session_id}.compact
|
21
|
-
)
|
22
|
-
|
23
|
-
nil
|
24
|
-
end
|
25
|
-
|
26
|
-
def get(client_session_id: nil, user_identifier_key: nil)
|
27
|
-
request_seam_object(
|
28
|
-
:post,
|
29
|
-
"/client_sessions/get",
|
30
|
-
Seam::ClientSession,
|
31
|
-
"client_session",
|
32
|
-
body: {client_session_id: client_session_id, user_identifier_key: user_identifier_key}.compact
|
33
|
-
)
|
34
|
-
end
|
35
|
-
|
36
|
-
def get_or_create(connect_webview_ids: nil, connected_account_ids: nil, expires_at: nil, user_identifier_key: nil, user_identity_ids: nil)
|
37
|
-
request_seam_object(
|
38
|
-
:post,
|
39
|
-
"/client_sessions/get_or_create",
|
40
|
-
Seam::ClientSession,
|
41
|
-
"client_session",
|
42
|
-
body: {connect_webview_ids: connect_webview_ids, connected_account_ids: connected_account_ids, expires_at: expires_at, user_identifier_key: user_identifier_key, user_identity_ids: user_identity_ids}.compact
|
43
|
-
)
|
44
|
-
end
|
45
|
-
|
46
|
-
def grant_access(client_session_id: nil, connect_webview_ids: nil, connected_account_ids: nil, user_identifier_key: nil, user_identity_ids: nil)
|
47
|
-
request_seam(
|
48
|
-
:post,
|
49
|
-
"/client_sessions/grant_access",
|
50
|
-
body: {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_ids: user_identity_ids}.compact
|
51
|
-
)
|
52
|
-
|
53
|
-
nil
|
54
|
-
end
|
55
|
-
|
56
|
-
def list(client_session_id: nil, connect_webview_id: nil, user_identifier_key: nil, user_identity_id: nil, without_user_identifier_key: nil)
|
57
|
-
request_seam_object(
|
58
|
-
:post,
|
59
|
-
"/client_sessions/list",
|
60
|
-
Seam::ClientSession,
|
61
|
-
"client_sessions",
|
62
|
-
body: {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
|
63
|
-
)
|
64
|
-
end
|
65
|
-
|
66
|
-
def revoke(client_session_id:)
|
67
|
-
request_seam(
|
68
|
-
:post,
|
69
|
-
"/client_sessions/revoke",
|
70
|
-
body: {client_session_id: client_session_id}.compact
|
71
|
-
)
|
72
|
-
|
73
|
-
nil
|
74
|
-
end
|
75
|
-
end
|
76
|
-
end
|
77
|
-
end
|
@@ -1,47 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Seam
|
4
|
-
module Clients
|
5
|
-
class ConnectWebviews < BaseClient
|
6
|
-
def create(accepted_providers: nil, automatically_manage_new_devices: nil, custom_metadata: nil, custom_redirect_failure_url: nil, custom_redirect_url: nil, device_selection_mode: nil, provider_category: nil, wait_for_device_creation: nil)
|
7
|
-
request_seam_object(
|
8
|
-
:post,
|
9
|
-
"/connect_webviews/create",
|
10
|
-
Seam::ConnectWebview,
|
11
|
-
"connect_webview",
|
12
|
-
body: {accepted_providers: accepted_providers, automatically_manage_new_devices: automatically_manage_new_devices, custom_metadata: custom_metadata, custom_redirect_failure_url: custom_redirect_failure_url, custom_redirect_url: custom_redirect_url, device_selection_mode: device_selection_mode, provider_category: provider_category, wait_for_device_creation: wait_for_device_creation}.compact
|
13
|
-
)
|
14
|
-
end
|
15
|
-
|
16
|
-
def delete(connect_webview_id:)
|
17
|
-
request_seam(
|
18
|
-
:post,
|
19
|
-
"/connect_webviews/delete",
|
20
|
-
body: {connect_webview_id: connect_webview_id}.compact
|
21
|
-
)
|
22
|
-
|
23
|
-
nil
|
24
|
-
end
|
25
|
-
|
26
|
-
def get(connect_webview_id:)
|
27
|
-
request_seam_object(
|
28
|
-
:post,
|
29
|
-
"/connect_webviews/get",
|
30
|
-
Seam::ConnectWebview,
|
31
|
-
"connect_webview",
|
32
|
-
body: {connect_webview_id: connect_webview_id}.compact
|
33
|
-
)
|
34
|
-
end
|
35
|
-
|
36
|
-
def list(custom_metadata_has: nil, user_identifier_key: nil)
|
37
|
-
request_seam_object(
|
38
|
-
:post,
|
39
|
-
"/connect_webviews/list",
|
40
|
-
Seam::ConnectWebview,
|
41
|
-
"connect_webviews",
|
42
|
-
body: {custom_metadata_has: custom_metadata_has, user_identifier_key: user_identifier_key}.compact
|
43
|
-
)
|
44
|
-
end
|
45
|
-
end
|
46
|
-
end
|
47
|
-
end
|
@@ -1,47 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Seam
|
4
|
-
module Clients
|
5
|
-
class ConnectedAccounts < BaseClient
|
6
|
-
def delete(connected_account_id:, sync: nil)
|
7
|
-
request_seam(
|
8
|
-
:post,
|
9
|
-
"/connected_accounts/delete",
|
10
|
-
body: {connected_account_id: connected_account_id, sync: sync}.compact
|
11
|
-
)
|
12
|
-
|
13
|
-
nil
|
14
|
-
end
|
15
|
-
|
16
|
-
def get(connected_account_id: nil, email: nil)
|
17
|
-
request_seam_object(
|
18
|
-
:post,
|
19
|
-
"/connected_accounts/get",
|
20
|
-
Seam::ConnectedAccount,
|
21
|
-
"connected_account",
|
22
|
-
body: {connected_account_id: connected_account_id, email: email}.compact
|
23
|
-
)
|
24
|
-
end
|
25
|
-
|
26
|
-
def list(custom_metadata_has: nil)
|
27
|
-
request_seam_object(
|
28
|
-
:post,
|
29
|
-
"/connected_accounts/list",
|
30
|
-
Seam::ConnectedAccount,
|
31
|
-
"connected_accounts",
|
32
|
-
body: {custom_metadata_has: custom_metadata_has}.compact
|
33
|
-
)
|
34
|
-
end
|
35
|
-
|
36
|
-
def update(connected_account_id:, automatically_manage_new_devices: nil, custom_metadata: nil)
|
37
|
-
request_seam_object(
|
38
|
-
:post,
|
39
|
-
"/connected_accounts/update",
|
40
|
-
Seam::ConnectedAccount,
|
41
|
-
"connected_account",
|
42
|
-
body: {connected_account_id: connected_account_id, automatically_manage_new_devices: automatically_manage_new_devices, custom_metadata: custom_metadata}.compact
|
43
|
-
)
|
44
|
-
end
|
45
|
-
end
|
46
|
-
end
|
47
|
-
end
|