seam 2.0.0b5 → 2.0.0.prerelease.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (156) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +53 -49
  3. data/README.md +3 -323
  4. data/Rakefile +1 -4
  5. data/lib/seam/client.rb +129 -0
  6. data/lib/seam/clients/access_codes.rb +95 -0
  7. data/lib/seam/clients/access_codes_simulate.rb +17 -0
  8. data/lib/seam/clients/access_codes_unmanaged.rb +57 -0
  9. data/lib/seam/clients/acs.rb +35 -0
  10. data/lib/seam/clients/acs_access_groups.rb +57 -0
  11. data/lib/seam/clients/acs_credential_pools.rb +17 -0
  12. data/lib/seam/clients/acs_credential_provisioning_automations.rb +17 -0
  13. data/lib/seam/clients/acs_credentials.rb +77 -0
  14. data/lib/seam/clients/acs_entrances.rb +47 -0
  15. data/lib/seam/clients/acs_systems.rb +27 -0
  16. data/lib/seam/clients/acs_users.rb +117 -0
  17. data/lib/seam/clients/action_attempts.rb +30 -0
  18. data/lib/seam/clients/base_client.rb +21 -0
  19. data/lib/seam/clients/client_sessions.rb +77 -0
  20. data/lib/seam/clients/connect_webviews.rb +47 -0
  21. data/lib/seam/clients/connected_accounts.rb +47 -0
  22. data/lib/seam/clients/devices.rb +65 -0
  23. data/lib/seam/clients/devices_simulate.rb +17 -0
  24. data/lib/seam/clients/devices_unmanaged.rb +37 -0
  25. data/lib/seam/clients/events.rb +27 -0
  26. data/lib/seam/clients/locks.rb +53 -0
  27. data/lib/seam/clients/networks.rb +27 -0
  28. data/lib/seam/clients/noise_sensors.rb +15 -0
  29. data/lib/seam/clients/noise_sensors_noise_thresholds.rb +57 -0
  30. data/lib/seam/clients/noise_sensors_simulate.rb +17 -0
  31. data/lib/seam/clients/phones.rb +31 -0
  32. data/lib/seam/clients/phones_simulate.rb +17 -0
  33. data/lib/seam/clients/thermostats.rb +106 -0
  34. data/lib/seam/clients/thermostats_climate_setting_schedules.rb +57 -0
  35. data/lib/seam/clients/user_identities.rb +131 -0
  36. data/lib/seam/clients/user_identities_enrollment_automations.rb +47 -0
  37. data/lib/seam/clients/webhooks.rb +57 -0
  38. data/lib/seam/clients/workspaces.rb +50 -0
  39. data/lib/seam/logger.rb +12 -0
  40. data/lib/seam/request.rb +51 -84
  41. data/lib/seam/resources/access_code.rb +12 -0
  42. data/lib/seam/resources/acs_access_group.rb +9 -0
  43. data/lib/seam/resources/acs_credential.rb +12 -0
  44. data/lib/seam/resources/acs_credential_pool.rb +9 -0
  45. data/lib/seam/resources/acs_credential_provisioning_automation.rb +9 -0
  46. data/lib/seam/resources/acs_entrance.rb +9 -0
  47. data/lib/seam/resources/acs_system.rb +9 -0
  48. data/lib/seam/resources/acs_user.rb +9 -0
  49. data/lib/seam/resources/action_attempt.rb +46 -0
  50. data/lib/seam/resources/base_resource.rb +58 -0
  51. data/lib/seam/resources/client_session.rb +9 -0
  52. data/lib/seam/resources/climate_setting_schedule.rb +11 -0
  53. data/lib/seam/resources/connect_webview.rb +9 -0
  54. data/lib/seam/resources/connected_account.rb +12 -0
  55. data/lib/seam/resources/device.rb +12 -0
  56. data/lib/seam/resources/device_provider.rb +7 -0
  57. data/lib/seam/resources/enrollment_automation.rb +9 -0
  58. data/lib/seam/resources/event.rb +9 -0
  59. data/lib/seam/resources/network.rb +9 -0
  60. data/lib/seam/resources/noise_threshold.rb +7 -0
  61. data/lib/seam/resources/phone.rb +12 -0
  62. data/lib/seam/resources/resource_error.rb +9 -0
  63. data/lib/seam/resources/resource_errors_support.rb +9 -0
  64. data/lib/seam/resources/resource_warning.rb +9 -0
  65. data/lib/seam/resources/resource_warnings_support.rb +9 -0
  66. data/lib/seam/resources/service_health.rb +7 -0
  67. data/lib/seam/resources/unmanaged_access_code.rb +12 -0
  68. data/lib/seam/resources/unmanaged_device.rb +12 -0
  69. data/lib/seam/resources/user_identity.rb +9 -0
  70. data/lib/seam/resources/webhook.rb +7 -0
  71. data/lib/seam/resources/workspace.rb +7 -0
  72. data/lib/seam/version.rb +1 -1
  73. data/lib/seam.rb +68 -19
  74. metadata +71 -115
  75. data/lib/seam/auth.rb +0 -118
  76. data/lib/seam/base_resource.rb +0 -65
  77. data/lib/seam/deep_hash_accessor.rb +0 -37
  78. data/lib/seam/default_endpoint.rb +0 -5
  79. data/lib/seam/helpers/action_attempt.rb +0 -47
  80. data/lib/seam/http.rb +0 -52
  81. data/lib/seam/http_multi_workspace.rb +0 -66
  82. data/lib/seam/http_single_workspace.rb +0 -46
  83. data/lib/seam/options.rb +0 -64
  84. data/lib/seam/parse_options.rb +0 -23
  85. data/lib/seam/routes/clients/access_codes.rb +0 -74
  86. data/lib/seam/routes/clients/access_codes_simulate.rb +0 -18
  87. data/lib/seam/routes/clients/access_codes_unmanaged.rb +0 -42
  88. data/lib/seam/routes/clients/acs.rb +0 -44
  89. data/lib/seam/routes/clients/acs_access_groups.rb +0 -48
  90. data/lib/seam/routes/clients/acs_access_groups_unmanaged.rb +0 -24
  91. data/lib/seam/routes/clients/acs_credential_pools.rb +0 -18
  92. data/lib/seam/routes/clients/acs_credential_provisioning_automations.rb +0 -18
  93. data/lib/seam/routes/clients/acs_credentials.rb +0 -60
  94. data/lib/seam/routes/clients/acs_credentials_unmanaged.rb +0 -24
  95. data/lib/seam/routes/clients/acs_encoders.rb +0 -36
  96. data/lib/seam/routes/clients/acs_entrances.rb +0 -36
  97. data/lib/seam/routes/clients/acs_systems.rb +0 -30
  98. data/lib/seam/routes/clients/acs_users.rb +0 -78
  99. data/lib/seam/routes/clients/acs_users_unmanaged.rb +0 -24
  100. data/lib/seam/routes/clients/action_attempts.rb +0 -28
  101. data/lib/seam/routes/clients/client_sessions.rb +0 -54
  102. data/lib/seam/routes/clients/connect_webviews.rb +0 -36
  103. data/lib/seam/routes/clients/connected_accounts.rb +0 -36
  104. data/lib/seam/routes/clients/devices.rb +0 -50
  105. data/lib/seam/routes/clients/devices_simulate.rb +0 -30
  106. data/lib/seam/routes/clients/devices_unmanaged.rb +0 -30
  107. data/lib/seam/routes/clients/events.rb +0 -24
  108. data/lib/seam/routes/clients/index.rb +0 -38
  109. data/lib/seam/routes/clients/locks.rb +0 -42
  110. data/lib/seam/routes/clients/networks.rb +0 -24
  111. data/lib/seam/routes/clients/noise_sensors.rb +0 -26
  112. data/lib/seam/routes/clients/noise_sensors_noise_thresholds.rb +0 -42
  113. data/lib/seam/routes/clients/noise_sensors_simulate.rb +0 -18
  114. data/lib/seam/routes/clients/phones.rb +0 -28
  115. data/lib/seam/routes/clients/phones_simulate.rb +0 -18
  116. data/lib/seam/routes/clients/thermostats.rb +0 -108
  117. data/lib/seam/routes/clients/thermostats_schedules.rb +0 -42
  118. data/lib/seam/routes/clients/user_identities.rb +0 -88
  119. data/lib/seam/routes/clients/user_identities_enrollment_automations.rb +0 -36
  120. data/lib/seam/routes/clients/webhooks.rb +0 -42
  121. data/lib/seam/routes/clients/workspaces.rb +0 -40
  122. data/lib/seam/routes/resources/access_code.rb +0 -14
  123. data/lib/seam/routes/resources/acs_access_group.rb +0 -11
  124. data/lib/seam/routes/resources/acs_credential.rb +0 -14
  125. data/lib/seam/routes/resources/acs_credential_pool.rb +0 -11
  126. data/lib/seam/routes/resources/acs_credential_provisioning_automation.rb +0 -11
  127. data/lib/seam/routes/resources/acs_entrance.rb +0 -13
  128. data/lib/seam/routes/resources/acs_system.rb +0 -14
  129. data/lib/seam/routes/resources/acs_user.rb +0 -14
  130. data/lib/seam/routes/resources/action_attempt.rb +0 -9
  131. data/lib/seam/routes/resources/client_session.rb +0 -11
  132. data/lib/seam/routes/resources/connect_webview.rb +0 -11
  133. data/lib/seam/routes/resources/connected_account.rb +0 -14
  134. data/lib/seam/routes/resources/device.rb +0 -14
  135. data/lib/seam/routes/resources/device_provider.rb +0 -9
  136. data/lib/seam/routes/resources/enrollment_automation.rb +0 -11
  137. data/lib/seam/routes/resources/event.rb +0 -11
  138. data/lib/seam/routes/resources/index.rb +0 -33
  139. data/lib/seam/routes/resources/network.rb +0 -11
  140. data/lib/seam/routes/resources/noise_threshold.rb +0 -9
  141. data/lib/seam/routes/resources/phone.rb +0 -14
  142. data/lib/seam/routes/resources/resource_error.rb +0 -11
  143. data/lib/seam/routes/resources/resource_errors_support.rb +0 -11
  144. data/lib/seam/routes/resources/resource_warning.rb +0 -11
  145. data/lib/seam/routes/resources/resource_warnings_support.rb +0 -11
  146. data/lib/seam/routes/resources/service_health.rb +0 -9
  147. data/lib/seam/routes/resources/thermostat_schedule.rb +0 -13
  148. data/lib/seam/routes/resources/unmanaged_access_code.rb +0 -14
  149. data/lib/seam/routes/resources/unmanaged_device.rb +0 -14
  150. data/lib/seam/routes/resources/user_identity.rb +0 -11
  151. data/lib/seam/routes/resources/webhook.rb +0 -9
  152. data/lib/seam/routes/resources/workspace.rb +0 -9
  153. data/lib/seam/routes/routes.rb +0 -94
  154. data/lib/seam/token.rb +0 -53
  155. data/lib/seam/wait_for_action_attempt.rb +0 -32
  156. data/lib/seam/webhook.rb +0 -23
@@ -0,0 +1,58 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Seam
4
+ class BaseResource
5
+ attr_accessor :data, :client
6
+
7
+ def initialize(data, client = nil)
8
+ @data = data
9
+ @client = client
10
+
11
+ @data.each do |key, value|
12
+ instance_variable_set(:"@#{key}", value)
13
+ end
14
+ end
15
+
16
+ def update_from_response(data)
17
+ @data = data
18
+ @data.each do |key, value|
19
+ instance_variable_set(:"@#{key}", value)
20
+ end
21
+ end
22
+
23
+ def self.load_from_response(data, client = nil)
24
+ if data.is_a?(Array)
25
+ data.map { |d| new(d, client) }
26
+ else
27
+ new(data, client)
28
+ end
29
+ end
30
+
31
+ def inspect
32
+ "<#{self.class.name}:#{"0x00%x" % (object_id << 1)}\n" + # rubocop:disable Style/StringConcatenation, Style/FormatString
33
+ instance_variables
34
+ .map { |k| k.to_s.sub("@", "") }
35
+ .filter { |k| k != "data" and k != "client" and respond_to? k }
36
+ .map { |k| " #{k}=#{send(k).inspect}" }
37
+ .join("\n") + ">"
38
+ end
39
+
40
+ def self.date_accessor(*attrs)
41
+ attrs.each do |attr|
42
+ define_method(attr) do
43
+ value = instance_variable_get(:"@#{attr}")
44
+
45
+ raise "No value for #{attr} set" if value.nil?
46
+
47
+ parse_datetime(value)
48
+ end
49
+ end
50
+ end
51
+
52
+ protected
53
+
54
+ def parse_datetime(value)
55
+ Time.parse(value)
56
+ end
57
+ end
58
+ end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Seam
4
+ class ClientSession < BaseResource
5
+ attr_accessor :client_session_id, :connect_webview_ids, :connected_account_ids, :device_count, :token, :user_identifier_key, :user_identity_ids, :workspace_id
6
+
7
+ date_accessor :created_at
8
+ end
9
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Seam
4
+ class ClimateSettingSchedule < BaseResource
5
+ attr_accessor :automatic_cooling_enabled, :automatic_heating_enabled, :climate_setting_schedule_id, :cooling_set_point_celsius, :cooling_set_point_fahrenheit, :device_id, :heating_set_point_celsius, :heating_set_point_fahrenheit, :hvac_mode_setting, :manual_override_allowed, :name, :schedule_ends_at, :schedule_starts_at, :schedule_type
6
+
7
+ date_accessor :created_at
8
+
9
+ include Seam::ResourceErrorsSupport
10
+ end
11
+ end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Seam
4
+ class ConnectWebview < BaseResource
5
+ attr_accessor :accepted_devices, :accepted_providers, :any_device_allowed, :any_provider_allowed, :automatically_manage_new_devices, :connect_webview_id, :connected_account_id, :custom_metadata, :custom_redirect_failure_url, :custom_redirect_url, :device_selection_mode, :login_successful, :selected_provider, :status, :url, :wait_for_device_creation, :workspace_id
6
+
7
+ date_accessor :authorized_at, :created_at
8
+ end
9
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Seam
4
+ class ConnectedAccount < BaseResource
5
+ attr_accessor :account_type, :account_type_display_name, :automatically_manage_new_devices, :connected_account_id, :custom_metadata, :user_identifier
6
+
7
+ date_accessor :created_at
8
+
9
+ include Seam::ResourceErrorsSupport
10
+ include Seam::ResourceWarningsSupport
11
+ end
12
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Seam
4
+ class Device < BaseResource
5
+ attr_accessor :can_program_offline_access_codes, :can_program_online_access_codes, :can_remotely_lock, :can_remotely_unlock, :can_simulate_removal, :capabilities_supported, :connected_account_id, :custom_metadata, :device_id, :device_type, :display_name, :is_managed, :location, :nickname, :properties, :workspace_id
6
+
7
+ date_accessor :created_at
8
+
9
+ include Seam::ResourceErrorsSupport
10
+ include Seam::ResourceWarningsSupport
11
+ end
12
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Seam
4
+ class DeviceProvider < BaseResource
5
+ attr_accessor :device_provider_name, :display_name, :image_url, :provider_categories
6
+ end
7
+ end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Seam
4
+ class EnrollmentAutomation < BaseResource
5
+ attr_accessor :credential_manager_acs_system_id, :enrollment_automation_id, :user_identity_id, :workspace_id
6
+
7
+ date_accessor :created_at
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Seam
4
+ class Event < BaseResource
5
+ attr_accessor :action_attempt_id, :device_id, :event_id, :event_type, :workspace_id
6
+
7
+ date_accessor :created_at, :occurred_at
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Seam
4
+ class Network < BaseResource
5
+ attr_accessor :display_name, :network_id, :workspace_id
6
+
7
+ date_accessor :created_at
8
+ end
9
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Seam
4
+ class NoiseThreshold < BaseResource
5
+ attr_accessor :device_id, :ends_daily_at, :name, :noise_threshold_decibels, :noise_threshold_id, :noise_threshold_nrs, :starts_daily_at
6
+ end
7
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Seam
4
+ class Phone < BaseResource
5
+ attr_accessor :can_program_offline_access_codes, :can_program_online_access_codes, :can_remotely_lock, :can_remotely_unlock, :can_simulate_removal, :capabilities_supported, :custom_metadata, :device_id, :device_type, :display_name, :is_managed, :location, :nickname, :properties, :workspace_id
6
+
7
+ date_accessor :created_at
8
+
9
+ include Seam::ResourceErrorsSupport
10
+ include Seam::ResourceWarningsSupport
11
+ end
12
+ end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Seam
4
+ class ResourceError < BaseResource
5
+ attr_accessor :error_code, :message
6
+
7
+ date_accessor :created_at
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Seam
4
+ module ResourceErrorsSupport
5
+ def errors
6
+ @errors_converted ||= @errors.is_a?(Array) ? Seam::ResourceError.load_from_response(@errors) : []
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Seam
4
+ class ResourceWarning < BaseResource
5
+ attr_accessor :warning_code, :message
6
+
7
+ date_accessor :created_at
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Seam
4
+ module ResourceWarningsSupport
5
+ def warnings
6
+ @warnings_converted ||= @warnings.is_a?(Array) ? Seam::ResourceWarning.load_from_response(@warnings) : []
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Seam
4
+ class ServiceHealth < BaseResource
5
+ attr_accessor :description, :service, :status
6
+ end
7
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Seam
4
+ class UnmanagedAccessCode < BaseResource
5
+ attr_accessor :access_code_id, :code, :device_id, :is_managed, :name, :status, :type
6
+
7
+ date_accessor :created_at, :ends_at, :starts_at
8
+
9
+ include Seam::ResourceErrorsSupport
10
+ include Seam::ResourceWarningsSupport
11
+ end
12
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Seam
4
+ class UnmanagedDevice < BaseResource
5
+ attr_accessor :can_program_offline_access_codes, :can_program_online_access_codes, :can_remotely_lock, :can_remotely_unlock, :can_simulate_removal, :capabilities_supported, :connected_account_id, :device_id, :device_type, :is_managed, :properties, :workspace_id
6
+
7
+ date_accessor :created_at
8
+
9
+ include Seam::ResourceErrorsSupport
10
+ include Seam::ResourceWarningsSupport
11
+ end
12
+ end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Seam
4
+ class UserIdentity < BaseResource
5
+ attr_accessor :display_name, :email_address, :full_name, :phone_number, :user_identity_id, :user_identity_key, :workspace_id
6
+
7
+ date_accessor :created_at
8
+ end
9
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Seam
4
+ class Webhook < BaseResource
5
+ attr_accessor :event_types, :secret, :url, :webhook_id
6
+ end
7
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Seam
4
+ class Workspace < BaseResource
5
+ attr_accessor :connect_partner_name, :is_sandbox, :name, :workspace_id
6
+ end
7
+ end
data/lib/seam/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Seam
4
- VERSION = "2.0.0b5"
4
+ VERSION = "2.0.0.prerelease.1"
5
5
  end
data/lib/seam.rb CHANGED
@@ -1,25 +1,74 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require_relative "seam/version"
3
4
  require_relative "seam/lts_version"
4
- require_relative "seam/http"
5
- require_relative "seam/http_multi_workspace"
6
- require_relative "seam/webhook"
7
- require_relative "seam/wait_for_action_attempt"
5
+ require_relative "seam/request"
6
+ require_relative "seam/logger"
7
+ require_relative "seam/client"
8
+ require_relative "seam/clients/base_client"
9
+ require_relative "seam/resources/base_resource"
10
+ require_relative "seam/resources/resource_error"
11
+ require_relative "seam/resources/resource_warning"
12
+ require_relative "seam/resources/resource_errors_support"
13
+ require_relative "seam/resources/resource_warnings_support"
14
+ require_relative "seam/resources/access_code"
15
+ require_relative "seam/resources/acs_access_group"
16
+ require_relative "seam/resources/acs_credential"
17
+ require_relative "seam/resources/acs_credential_pool"
18
+ require_relative "seam/resources/acs_credential_provisioning_automation"
19
+ require_relative "seam/resources/acs_entrance"
20
+ require_relative "seam/resources/acs_system"
21
+ require_relative "seam/resources/acs_user"
22
+ require_relative "seam/resources/action_attempt"
23
+ require_relative "seam/resources/client_session"
24
+ require_relative "seam/resources/climate_setting_schedule"
25
+ require_relative "seam/resources/connect_webview"
26
+ require_relative "seam/resources/connected_account"
27
+ require_relative "seam/resources/device"
28
+ require_relative "seam/resources/device_provider"
29
+ require_relative "seam/resources/enrollment_automation"
30
+ require_relative "seam/resources/event"
31
+ require_relative "seam/resources/network"
32
+ require_relative "seam/resources/noise_threshold"
33
+ require_relative "seam/resources/phone"
34
+ require_relative "seam/resources/service_health"
35
+ require_relative "seam/resources/unmanaged_access_code"
36
+ require_relative "seam/resources/unmanaged_device"
37
+ require_relative "seam/resources/user_identity"
38
+ require_relative "seam/resources/webhook"
39
+ require_relative "seam/resources/workspace"
40
+ require_relative "seam/clients/access_codes"
41
+ require_relative "seam/clients/access_codes_simulate"
42
+ require_relative "seam/clients/access_codes_unmanaged"
43
+ require_relative "seam/clients/acs_access_groups"
44
+ require_relative "seam/clients/acs"
45
+ require_relative "seam/clients/acs_credential_pools"
46
+ require_relative "seam/clients/acs_credential_provisioning_automations"
47
+ require_relative "seam/clients/acs_credentials"
48
+ require_relative "seam/clients/acs_entrances"
49
+ require_relative "seam/clients/acs_systems"
50
+ require_relative "seam/clients/acs_users"
51
+ require_relative "seam/clients/action_attempts"
52
+ require_relative "seam/clients/client_sessions"
53
+ require_relative "seam/clients/connect_webviews"
54
+ require_relative "seam/clients/connected_accounts"
55
+ require_relative "seam/clients/devices"
56
+ require_relative "seam/clients/devices_simulate"
57
+ require_relative "seam/clients/devices_unmanaged"
58
+ require_relative "seam/clients/events"
59
+ require_relative "seam/clients/locks"
60
+ require_relative "seam/clients/networks"
61
+ require_relative "seam/clients/noise_sensors_noise_thresholds"
62
+ require_relative "seam/clients/noise_sensors"
63
+ require_relative "seam/clients/noise_sensors_simulate"
64
+ require_relative "seam/clients/phones"
65
+ require_relative "seam/clients/phones_simulate"
66
+ require_relative "seam/clients/thermostats_climate_setting_schedules"
67
+ require_relative "seam/clients/thermostats"
68
+ require_relative "seam/clients/user_identities"
69
+ require_relative "seam/clients/user_identities_enrollment_automations"
70
+ require_relative "seam/clients/webhooks"
71
+ require_relative "seam/clients/workspaces"
8
72
 
9
73
  module Seam
10
- def self.new(**args)
11
- Seam::Http.new(**args)
12
- end
13
-
14
- def self.from_api_key(api_key, endpoint: nil, wait_for_action_attempt: false)
15
- Seam::Http.from_api_key(api_key, endpoint: endpoint, wait_for_action_attempt: wait_for_action_attempt)
16
- end
17
-
18
- def self.from_personal_access_token(personal_access_token, workspace_id, endpoint: nil, wait_for_action_attempt: false)
19
- Seam::Http.from_personal_access_token(personal_access_token, workspace_id, endpoint: endpoint, wait_for_action_attempt: wait_for_action_attempt)
20
- end
21
-
22
- def self.lts_version
23
- Seam::LTS_VERSION
24
- end
25
74
  end
metadata CHANGED
@@ -1,57 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: seam
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0b5
4
+ version: 2.0.0.prerelease.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Seam Labs, Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-11-14 00:00:00.000000000 Z
11
+ date: 2024-05-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: faraday
14
+ name: http
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '2.7'
19
+ version: '5.2'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '2.7'
27
- - !ruby/object:Gem::Dependency
28
- name: faraday-retry
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - "~>"
32
- - !ruby/object:Gem::Version
33
- version: '2.2'
34
- type: :runtime
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - "~>"
39
- - !ruby/object:Gem::Version
40
- version: '2.2'
41
- - !ruby/object:Gem::Dependency
42
- name: svix
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - "~>"
46
- - !ruby/object:Gem::Version
47
- version: '1.30'
48
- type: :runtime
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - "~>"
53
- - !ruby/object:Gem::Version
54
- version: '1.30'
26
+ version: '5.2'
55
27
  - !ruby/object:Gem::Dependency
56
28
  name: bundler
57
29
  requirement: !ruby/object:Gem::Requirement
@@ -190,91 +162,75 @@ files:
190
162
  - README.md
191
163
  - Rakefile
192
164
  - lib/seam.rb
193
- - lib/seam/auth.rb
194
- - lib/seam/base_resource.rb
195
- - lib/seam/deep_hash_accessor.rb
196
- - lib/seam/default_endpoint.rb
197
- - lib/seam/helpers/action_attempt.rb
198
- - lib/seam/http.rb
199
- - lib/seam/http_multi_workspace.rb
200
- - lib/seam/http_single_workspace.rb
165
+ - lib/seam/client.rb
166
+ - lib/seam/clients/access_codes.rb
167
+ - lib/seam/clients/access_codes_simulate.rb
168
+ - lib/seam/clients/access_codes_unmanaged.rb
169
+ - lib/seam/clients/acs.rb
170
+ - lib/seam/clients/acs_access_groups.rb
171
+ - lib/seam/clients/acs_credential_pools.rb
172
+ - lib/seam/clients/acs_credential_provisioning_automations.rb
173
+ - lib/seam/clients/acs_credentials.rb
174
+ - lib/seam/clients/acs_entrances.rb
175
+ - lib/seam/clients/acs_systems.rb
176
+ - lib/seam/clients/acs_users.rb
177
+ - lib/seam/clients/action_attempts.rb
178
+ - lib/seam/clients/base_client.rb
179
+ - lib/seam/clients/client_sessions.rb
180
+ - lib/seam/clients/connect_webviews.rb
181
+ - lib/seam/clients/connected_accounts.rb
182
+ - lib/seam/clients/devices.rb
183
+ - lib/seam/clients/devices_simulate.rb
184
+ - lib/seam/clients/devices_unmanaged.rb
185
+ - lib/seam/clients/events.rb
186
+ - lib/seam/clients/locks.rb
187
+ - lib/seam/clients/networks.rb
188
+ - lib/seam/clients/noise_sensors.rb
189
+ - lib/seam/clients/noise_sensors_noise_thresholds.rb
190
+ - lib/seam/clients/noise_sensors_simulate.rb
191
+ - lib/seam/clients/phones.rb
192
+ - lib/seam/clients/phones_simulate.rb
193
+ - lib/seam/clients/thermostats.rb
194
+ - lib/seam/clients/thermostats_climate_setting_schedules.rb
195
+ - lib/seam/clients/user_identities.rb
196
+ - lib/seam/clients/user_identities_enrollment_automations.rb
197
+ - lib/seam/clients/webhooks.rb
198
+ - lib/seam/clients/workspaces.rb
199
+ - lib/seam/logger.rb
201
200
  - lib/seam/lts_version.rb
202
- - lib/seam/options.rb
203
- - lib/seam/parse_options.rb
204
201
  - lib/seam/request.rb
205
- - lib/seam/routes/clients/access_codes.rb
206
- - lib/seam/routes/clients/access_codes_simulate.rb
207
- - lib/seam/routes/clients/access_codes_unmanaged.rb
208
- - lib/seam/routes/clients/acs.rb
209
- - lib/seam/routes/clients/acs_access_groups.rb
210
- - lib/seam/routes/clients/acs_access_groups_unmanaged.rb
211
- - lib/seam/routes/clients/acs_credential_pools.rb
212
- - lib/seam/routes/clients/acs_credential_provisioning_automations.rb
213
- - lib/seam/routes/clients/acs_credentials.rb
214
- - lib/seam/routes/clients/acs_credentials_unmanaged.rb
215
- - lib/seam/routes/clients/acs_encoders.rb
216
- - lib/seam/routes/clients/acs_entrances.rb
217
- - lib/seam/routes/clients/acs_systems.rb
218
- - lib/seam/routes/clients/acs_users.rb
219
- - lib/seam/routes/clients/acs_users_unmanaged.rb
220
- - lib/seam/routes/clients/action_attempts.rb
221
- - lib/seam/routes/clients/client_sessions.rb
222
- - lib/seam/routes/clients/connect_webviews.rb
223
- - lib/seam/routes/clients/connected_accounts.rb
224
- - lib/seam/routes/clients/devices.rb
225
- - lib/seam/routes/clients/devices_simulate.rb
226
- - lib/seam/routes/clients/devices_unmanaged.rb
227
- - lib/seam/routes/clients/events.rb
228
- - lib/seam/routes/clients/index.rb
229
- - lib/seam/routes/clients/locks.rb
230
- - lib/seam/routes/clients/networks.rb
231
- - lib/seam/routes/clients/noise_sensors.rb
232
- - lib/seam/routes/clients/noise_sensors_noise_thresholds.rb
233
- - lib/seam/routes/clients/noise_sensors_simulate.rb
234
- - lib/seam/routes/clients/phones.rb
235
- - lib/seam/routes/clients/phones_simulate.rb
236
- - lib/seam/routes/clients/thermostats.rb
237
- - lib/seam/routes/clients/thermostats_schedules.rb
238
- - lib/seam/routes/clients/user_identities.rb
239
- - lib/seam/routes/clients/user_identities_enrollment_automations.rb
240
- - lib/seam/routes/clients/webhooks.rb
241
- - lib/seam/routes/clients/workspaces.rb
242
- - lib/seam/routes/resources/access_code.rb
243
- - lib/seam/routes/resources/acs_access_group.rb
244
- - lib/seam/routes/resources/acs_credential.rb
245
- - lib/seam/routes/resources/acs_credential_pool.rb
246
- - lib/seam/routes/resources/acs_credential_provisioning_automation.rb
247
- - lib/seam/routes/resources/acs_entrance.rb
248
- - lib/seam/routes/resources/acs_system.rb
249
- - lib/seam/routes/resources/acs_user.rb
250
- - lib/seam/routes/resources/action_attempt.rb
251
- - lib/seam/routes/resources/client_session.rb
252
- - lib/seam/routes/resources/connect_webview.rb
253
- - lib/seam/routes/resources/connected_account.rb
254
- - lib/seam/routes/resources/device.rb
255
- - lib/seam/routes/resources/device_provider.rb
256
- - lib/seam/routes/resources/enrollment_automation.rb
257
- - lib/seam/routes/resources/event.rb
258
- - lib/seam/routes/resources/index.rb
259
- - lib/seam/routes/resources/network.rb
260
- - lib/seam/routes/resources/noise_threshold.rb
261
- - lib/seam/routes/resources/phone.rb
262
- - lib/seam/routes/resources/resource_error.rb
263
- - lib/seam/routes/resources/resource_errors_support.rb
264
- - lib/seam/routes/resources/resource_warning.rb
265
- - lib/seam/routes/resources/resource_warnings_support.rb
266
- - lib/seam/routes/resources/service_health.rb
267
- - lib/seam/routes/resources/thermostat_schedule.rb
268
- - lib/seam/routes/resources/unmanaged_access_code.rb
269
- - lib/seam/routes/resources/unmanaged_device.rb
270
- - lib/seam/routes/resources/user_identity.rb
271
- - lib/seam/routes/resources/webhook.rb
272
- - lib/seam/routes/resources/workspace.rb
273
- - lib/seam/routes/routes.rb
274
- - lib/seam/token.rb
202
+ - lib/seam/resources/access_code.rb
203
+ - lib/seam/resources/acs_access_group.rb
204
+ - lib/seam/resources/acs_credential.rb
205
+ - lib/seam/resources/acs_credential_pool.rb
206
+ - lib/seam/resources/acs_credential_provisioning_automation.rb
207
+ - lib/seam/resources/acs_entrance.rb
208
+ - lib/seam/resources/acs_system.rb
209
+ - lib/seam/resources/acs_user.rb
210
+ - lib/seam/resources/action_attempt.rb
211
+ - lib/seam/resources/base_resource.rb
212
+ - lib/seam/resources/client_session.rb
213
+ - lib/seam/resources/climate_setting_schedule.rb
214
+ - lib/seam/resources/connect_webview.rb
215
+ - lib/seam/resources/connected_account.rb
216
+ - lib/seam/resources/device.rb
217
+ - lib/seam/resources/device_provider.rb
218
+ - lib/seam/resources/enrollment_automation.rb
219
+ - lib/seam/resources/event.rb
220
+ - lib/seam/resources/network.rb
221
+ - lib/seam/resources/noise_threshold.rb
222
+ - lib/seam/resources/phone.rb
223
+ - lib/seam/resources/resource_error.rb
224
+ - lib/seam/resources/resource_errors_support.rb
225
+ - lib/seam/resources/resource_warning.rb
226
+ - lib/seam/resources/resource_warnings_support.rb
227
+ - lib/seam/resources/service_health.rb
228
+ - lib/seam/resources/unmanaged_access_code.rb
229
+ - lib/seam/resources/unmanaged_device.rb
230
+ - lib/seam/resources/user_identity.rb
231
+ - lib/seam/resources/webhook.rb
232
+ - lib/seam/resources/workspace.rb
275
233
  - lib/seam/version.rb
276
- - lib/seam/wait_for_action_attempt.rb
277
- - lib/seam/webhook.rb
278
234
  homepage: https://github.com/seamapi/ruby-next
279
235
  licenses:
280
236
  - MIT