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.
Files changed (87) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +69 -66
  3. data/README.md +86 -0
  4. data/lib/seam/http_without_workspace.rb +4 -4
  5. data/lib/seam/null.rb +23 -0
  6. data/lib/seam/paginator.rb +4 -1
  7. data/lib/seam/request.rb +49 -1
  8. data/lib/seam/resources/access_code.rb +74 -0
  9. data/lib/seam/resources/access_grant.rb +60 -0
  10. data/lib/seam/resources/access_method.rb +39 -0
  11. data/lib/seam/resources/acs_access_group.rb +45 -0
  12. data/lib/seam/resources/acs_credential.rb +67 -0
  13. data/lib/seam/resources/acs_encoder.rb +11 -0
  14. data/lib/seam/resources/acs_entrance.rb +95 -0
  15. data/lib/seam/resources/acs_system.rb +36 -0
  16. data/lib/seam/resources/acs_user.rb +66 -0
  17. data/lib/seam/resources/action_attempt.rb +192 -0
  18. data/lib/seam/resources/batch.rb +24 -0
  19. data/lib/seam/resources/client_session.rb +12 -0
  20. data/lib/seam/resources/connect_webview.rb +19 -0
  21. data/lib/seam/resources/connected_account.rb +50 -0
  22. data/lib/seam/resources/customer_portal.rb +5 -0
  23. data/lib/seam/resources/device.rb +622 -4
  24. data/lib/seam/resources/device_provider.rb +24 -0
  25. data/lib/seam/resources/event.rb +142 -3
  26. data/lib/seam/resources/instant_key.rb +13 -0
  27. data/lib/seam/resources/noise_threshold.rb +7 -0
  28. data/lib/seam/resources/pagination.rb +3 -0
  29. data/lib/seam/resources/phone.rb +29 -0
  30. data/lib/seam/resources/space.rb +19 -0
  31. data/lib/seam/resources/thermostat_daily_program.rb +9 -0
  32. data/lib/seam/resources/thermostat_schedule.rb +15 -0
  33. data/lib/seam/resources/unmanaged_access_code.rb +51 -0
  34. data/lib/seam/resources/unmanaged_access_grant.rb +56 -0
  35. data/lib/seam/resources/unmanaged_access_method.rb +36 -0
  36. data/lib/seam/resources/unmanaged_device.rb +80 -0
  37. data/lib/seam/resources/unmanaged_user_identity.rb +20 -0
  38. data/lib/seam/resources/user_identity.rb +21 -0
  39. data/lib/seam/resources/webhook.rb +4 -0
  40. data/lib/seam/resources/workspace.rb +15 -0
  41. data/lib/seam/routes/access_codes.rb +79 -79
  42. data/lib/seam/routes/access_codes_simulate.rb +3 -3
  43. data/lib/seam/routes/access_codes_unmanaged.rb +27 -23
  44. data/lib/seam/routes/access_grants.rb +57 -45
  45. data/lib/seam/routes/access_grants_unmanaged.rb +13 -13
  46. data/lib/seam/routes/access_methods.rb +32 -24
  47. data/lib/seam/routes/access_methods_unmanaged.rb +7 -7
  48. data/lib/seam/routes/acs_access_groups.rb +21 -21
  49. data/lib/seam/routes/acs_credentials.rb +40 -40
  50. data/lib/seam/routes/acs_encoders.rb +16 -16
  51. data/lib/seam/routes/acs_encoders_simulate.rb +11 -11
  52. data/lib/seam/routes/acs_entrances.rb +20 -20
  53. data/lib/seam/routes/acs_systems.rb +11 -11
  54. data/lib/seam/routes/acs_users.rb +83 -55
  55. data/lib/seam/routes/action_attempts.rb +6 -6
  56. data/lib/seam/routes/client_sessions.rb +38 -34
  57. data/lib/seam/routes/connect_webviews.rb +20 -20
  58. data/lib/seam/routes/connected_accounts.rb +24 -20
  59. data/lib/seam/routes/connected_accounts_simulate.rb +1 -1
  60. data/lib/seam/routes/customers.rb +50 -50
  61. data/lib/seam/routes/devices.rb +33 -29
  62. data/lib/seam/routes/devices_simulate.rb +7 -7
  63. data/lib/seam/routes/devices_unmanaged.rb +25 -26
  64. data/lib/seam/routes/events.rb +40 -32
  65. data/lib/seam/routes/instant_keys.rb +11 -7
  66. data/lib/seam/routes/locks.rb +20 -27
  67. data/lib/seam/routes/locks_simulate.rb +3 -3
  68. data/lib/seam/routes/noise_sensors.rb +8 -19
  69. data/lib/seam/routes/noise_sensors_noise_thresholds.rb +21 -21
  70. data/lib/seam/routes/noise_sensors_simulate.rb +1 -1
  71. data/lib/seam/routes/phones.rb +7 -7
  72. data/lib/seam/routes/phones_simulate.rb +4 -4
  73. data/lib/seam/routes/spaces.rb +53 -45
  74. data/lib/seam/routes/thermostats.rb +75 -86
  75. data/lib/seam/routes/thermostats_daily_programs.rb +9 -9
  76. data/lib/seam/routes/thermostats_schedules.rb +22 -22
  77. data/lib/seam/routes/thermostats_simulate.rb +9 -9
  78. data/lib/seam/routes/user_identities.rb +50 -46
  79. data/lib/seam/routes/user_identities_unmanaged.rb +11 -11
  80. data/lib/seam/routes/webhooks.rb +10 -10
  81. data/lib/seam/routes/workspaces.rb +19 -19
  82. data/lib/seam/strict_url_search_params_serializer.rb +17 -0
  83. data/lib/seam/url_search_params.rb +102 -0
  84. data/lib/seam/url_search_params_serializer.rb +217 -0
  85. data/lib/seam/version.rb +1 -1
  86. data/lib/seam.rb +3 -0
  87. metadata +12 -11
@@ -13,31 +13,43 @@ module Seam
13
13
  # See also [Get Started with React](https://docs.seam.co/ui-components/overview/getting-started-with-seam-components/get-started-with-react-components-and-client-session-tokens).
14
14
  class ClientSession < BaseResource
15
15
  # ID of the client session.
16
+ # @return [String]
16
17
  attr_accessor :client_session_id
17
18
  # IDs of the [Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews) associated with the [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens).
19
+ # @return [Array<String>]
18
20
  attr_accessor :connect_webview_ids
19
21
  # IDs of the [connected accounts](https://docs.seam.co/core-concepts/connected-accounts) associated with the [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens).
22
+ # @return [Array<String>]
20
23
  attr_accessor :connected_account_ids
21
24
  # Customer key associated with the [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens).
25
+ # @return [String, nil]
22
26
  attr_accessor :customer_key
23
27
  # Number of devices associated with the [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens).
28
+ # @return [Float]
24
29
  attr_accessor :device_count
25
30
  # Client session token associated with the [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens).
31
+ # @return [String]
26
32
  attr_accessor :token
27
33
  # Your user ID for the user associated with the [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens).
34
+ # @return [String, nil]
28
35
  attr_accessor :user_identifier_key
29
36
  # 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) associated with the client session.
37
+ # @return [String, nil]
30
38
  attr_accessor :user_identity_id
31
39
  # 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) associated with the client session.
40
+ # @return [Array<String>]
32
41
  # @deprecated Use `user_identity_id` instead.
33
42
  attr_accessor :user_identity_ids
34
43
  # ID of the workspace associated with the client session.
44
+ # @return [String]
35
45
  attr_accessor :workspace_id
36
46
 
37
47
  # Date and time at which the [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens) was created.
48
+ # @return [Time]
38
49
  date_accessor :created_at
39
50
 
40
51
  # Date and time at which the [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens) expires.
52
+ # @return [Time]
41
53
  date_accessor :expires_at
42
54
  end
43
55
  end
@@ -15,44 +15,63 @@ module Seam
15
15
  # To list all providers within a category, use `/devices/list_device_providers` with the desired `provider_category` filter. To list all provider keys, use `/devices/list_device_providers` with no filters.
16
16
  class ConnectWebview < BaseResource
17
17
  # High-level device capabilities that the Connect Webview can accept. When creating a Connect Webview, you can specify the types of devices that it can connect to Seam. If you do not set custom `accepted_capabilities`, Seam uses a default set of `accepted_capabilities` for each provider. For example, if you create a Connect Webview that accepts SmartThing devices, without specifying `accepted_capabilities`, Seam accepts only SmartThings locks. To connect SmartThings thermostats and locks to Seam, create a Connect Webview and include both `thermostat` and `lock` in the `accepted_capabilities`.
18
+ # @return [Array<String>]
18
19
  attr_accessor :accepted_capabilities
19
20
  # List of accepted [provider keys](https://docs.seam.co/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-brands-to-display-in-your-connect-webviews).
21
+ # @return [Array<String>]
20
22
  attr_accessor :accepted_providers
21
23
  # Indicates whether any provider is allowed.
24
+ # @return [Boolean]
22
25
  attr_accessor :any_provider_allowed
23
26
  # Indicates whether Seam should [import all new devices](https://docs.seam.co/core-concepts/connect-webviews/customizing-connect-webviews#automatically_manage_new_devices) for the connected account to make these devices available for use and management by the Seam API.
27
+ # @return [Boolean]
24
28
  attr_accessor :automatically_manage_new_devices
25
29
  # ID of the Connect Webview.
30
+ # @return [String]
26
31
  attr_accessor :connect_webview_id
27
32
  # ID of the connected account associated with the Connect Webview.
33
+ # @return [String, nil]
28
34
  attr_accessor :connected_account_id
29
35
  # Set of key:value pairs. Adding custom metadata to a resource, such as a [Connect Webview](https://docs.seam.co/core-concepts/connect-webviews/attaching-custom-data-to-the-connect-webview), [connected account](https://docs.seam.co/core-concepts/connected-accounts/adding-custom-metadata-to-a-connected-account), or [device](https://docs.seam.co/core-concepts/devices/adding-custom-metadata-to-a-device), enables you to store custom information, like customer details or internal IDs from your application.
36
+ # @return [Hash]
30
37
  attr_accessor :custom_metadata
31
38
  # URL to which the Connect Webview should redirect when an unexpected error occurs.
39
+ # @return [String, nil]
32
40
  attr_accessor :custom_redirect_failure_url
33
41
  # URL to which the Connect Webview should redirect when the user successfully pairs a device or system. If you do not set the `custom_redirect_failure_url`, the Connect Webview redirects to the `custom_redirect_url` when an unexpected error occurs.
42
+ # @return [String, nil]
34
43
  attr_accessor :custom_redirect_url
35
44
  # The customer key associated with this webview, if any.
45
+ # @return [String, nil]
36
46
  attr_accessor :customer_key
37
47
  # Device selection mode of the Connect Webview. Supported values: `none`, `single`, `multiple`.
48
+ # @return [String]
38
49
  attr_accessor :device_selection_mode
39
50
  # Indicates whether the user logged in successfully using the Connect Webview.
51
+ # @return [Boolean]
40
52
  attr_accessor :login_successful
41
53
  # Selected provider of the Connect Webview, one of the [provider keys](https://docs.seam.co/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-brands-to-display-in-your-connect-webviews).
54
+ # @return [String, nil]
42
55
  attr_accessor :selected_provider
43
56
  # Status of the Connect Webview. `authorized` indicates that the user has successfully logged into their device or system account, thereby completing the Connect Webview.
57
+ # @return [String]
44
58
  attr_accessor :status
45
59
  # URL for the Connect Webview. You use the URL to display the Connect Webview flow to your user.
60
+ # @return [String]
46
61
  attr_accessor :url
47
62
  # Indicates whether Seam should [finish syncing all devices](https://docs.seam.co/core-concepts/connect-webviews/customizing-connect-webviews#wait_for_device_creation) in a newly-connected account before completing the associated Connect Webview.
63
+ # @return [Boolean]
48
64
  attr_accessor :wait_for_device_creation
49
65
  # ID of the workspace that contains the Connect Webview.
66
+ # @return [String]
50
67
  attr_accessor :workspace_id
51
68
 
52
69
  # Date and time at which the user authorized (through the Connect Webview) the management of their devices.
70
+ # @return [Time, nil]
53
71
  date_accessor :authorized_at
54
72
 
55
73
  # Date and time at which the Connect Webview was created.
74
+ # @return [Time]
56
75
  date_accessor :created_at
57
76
  end
58
77
  end
@@ -8,41 +8,59 @@ module Seam
8
8
  class SaltoKsMetadata < BaseResource
9
9
  class Sites < BaseResource
10
10
  # ID of a Salto site associated with the connected account that has an error.
11
+ # @return [String, nil]
11
12
  attr_accessor :site_id
12
13
  # Name of a Salto site associated with the connected account that has an error.
14
+ # @return [String, nil]
13
15
  attr_accessor :site_name
14
16
  # Subscription limit of site users for a Salto site associated with the connected account that has an error.
17
+ # @return [Integer, nil]
15
18
  attr_accessor :site_user_subscription_limit
16
19
  # Count of subscribed site users for a Salto site associated with the connected account that has an error.
20
+ # @return [Integer, nil]
17
21
  attr_accessor :subscribed_site_user_count
18
22
  end
19
23
 
24
+ # Salto sites associated with the connected account that has an error.
25
+ # @return [Array<Sites>]
20
26
  resource_list_accessor :sites, Sites
21
27
  end
22
28
 
29
+ # Salto KS metadata associated with the connected account that has an error.
30
+ # @return [SaltoKsMetadata]
23
31
  resource_accessor :salto_ks_metadata, SaltoKsMetadata
24
32
  # Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
33
+ # @return [String]
25
34
  attr_accessor :error_code
26
35
  # Indicates whether the error is related to [Seam Bridge](https://docs.seam.co/capability-guides/seam-bridge).
36
+ # @return [Boolean, nil]
27
37
  attr_accessor :is_bridge_error
28
38
  # Indicates whether the error is related specifically to the connected account.
39
+ # @return [Boolean, nil]
29
40
  attr_accessor :is_connected_account_error
30
41
  # Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
42
+ # @return [String]
31
43
  attr_accessor :message
32
44
  # Date and time at which Seam created the error.
45
+ # @return [Time]
33
46
  date_accessor :created_at
34
47
  end
35
48
 
36
49
  class UserIdentifier < BaseResource
37
50
  # API URL for the user identifier associated with the connected account.
51
+ # @return [String, nil]
38
52
  attr_accessor :api_url
39
53
  # Email address of the user identifier associated with the connected account.
54
+ # @return [String, nil]
40
55
  attr_accessor :email
41
56
  # Indicates whether the user identifier associated with the connected account is exclusive.
57
+ # @return [Boolean, nil]
42
58
  attr_accessor :exclusive
43
59
  # Phone number of the user identifier associated with the connected account.
60
+ # @return [String, nil]
44
61
  attr_accessor :phone
45
62
  # Username of the user identifier associated with the connected account.
63
+ # @return [String, nil]
46
64
  attr_accessor :username
47
65
  end
48
66
 
@@ -50,60 +68,92 @@ module Seam
50
68
  class SaltoKsMetadata < BaseResource
51
69
  class Sites < BaseResource
52
70
  # ID of a Salto site associated with the connected account that has a warning.
71
+ # @return [String, nil]
53
72
  attr_accessor :site_id
54
73
  # Name of a Salto site associated with the connected account that has a warning.
74
+ # @return [String, nil]
55
75
  attr_accessor :site_name
56
76
  # Subscription limit of site users for a Salto site associated with the connected account that has a warning.
77
+ # @return [Integer, nil]
57
78
  attr_accessor :site_user_subscription_limit
58
79
  # Count of subscribed site users for a Salto site associated with the connected account that has a warning.
80
+ # @return [Integer, nil]
59
81
  attr_accessor :subscribed_site_user_count
60
82
  end
61
83
 
84
+ # Salto sites associated with the connected account that has a warning.
85
+ # @return [Array<Sites>]
62
86
  resource_list_accessor :sites, Sites
63
87
  end
64
88
 
89
+ # Salto KS metadata associated with the connected account that has a warning.
90
+ # @return [SaltoKsMetadata]
65
91
  resource_accessor :salto_ks_metadata, SaltoKsMetadata
66
92
  # Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
93
+ # @return [String]
67
94
  attr_accessor :message
68
95
  # Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
96
+ # @return [String]
69
97
  attr_accessor :warning_code
70
98
  # Date and time at which Seam created the warning.
99
+ # @return [Time]
71
100
  date_accessor :created_at
72
101
  end
73
102
 
103
+ # User identifier associated with the connected account.
104
+ # @return [UserIdentifier, nil]
74
105
  resource_accessor :user_identifier, UserIdentifier
106
+ # Errors associated with the connected account.
107
+ # @return [Array<Errors>]
75
108
  resource_list_accessor :errors, Errors
109
+ # Warnings associated with the connected account.
110
+ # @return [Array<Warnings>]
76
111
  resource_list_accessor :warnings, Warnings
77
112
  # List of capabilities that were accepted during the account connection process.
113
+ # @return [Array<String>]
78
114
  attr_accessor :accepted_capabilities
79
115
  # Type of connected account.
116
+ # @return [String, nil]
80
117
  attr_accessor :account_type
81
118
  # Display name for the connected account type.
119
+ # @return [String]
82
120
  attr_accessor :account_type_display_name
83
121
  # Indicates whether Seam should [import all new devices](https://docs.seam.co/core-concepts/connect-webviews/customizing-connect-webviews#automatically_manage_new_devices) for the connected account to make these devices available for management by the Seam API.
122
+ # @return [Boolean]
84
123
  attr_accessor :automatically_manage_new_devices
85
124
  # ID of the connected account.
125
+ # @return [String]
86
126
  attr_accessor :connected_account_id
87
127
  # Set of key:value pairs. Adding custom metadata to a resource, such as a [Connect Webview](https://docs.seam.co/core-concepts/connect-webviews/attaching-custom-data-to-the-connect-webview), [connected account](https://docs.seam.co/core-concepts/connected-accounts/adding-custom-metadata-to-a-connected-account), or [device](https://docs.seam.co/core-concepts/devices/adding-custom-metadata-to-a-device), enables you to store custom information, like customer details or internal IDs from your application.
128
+ # @return [Hash]
88
129
  attr_accessor :custom_metadata
89
130
  # Your unique key for the customer associated with this connected account.
131
+ # @return [String, nil]
90
132
  attr_accessor :customer_key
91
133
  # Default reservation check-in time for this connected account, as `HH:mm` (24-hour). Sourced from the connector configuration — set during the connect_webview for providers like Lodgify whose API does not expose check-in times.
134
+ # @return [String, nil]
92
135
  attr_accessor :default_checkin_time
93
136
  # Default reservation check-out time for this connected account, as `HH:mm` (24-hour). Sourced from the connector configuration.
137
+ # @return [String, nil]
94
138
  attr_accessor :default_checkout_time
95
139
  # Display name for the connected account.
140
+ # @return [String]
96
141
  attr_accessor :display_name
97
142
  # For iCal connected accounts, the platform that produced the feed (for example, `airbnb`, `vrbo`, or `booking`), or `unknown` when it could not be determined. Intended for rendering the source platform's logo.
143
+ # @return [String, nil]
98
144
  attr_accessor :ical_feed_origin
99
145
  # For iCal connected accounts, the feed URL for the connection. Sourced from the connector configuration.
146
+ # @return [String, nil]
100
147
  attr_accessor :ical_url
101
148
  # Logo URL for the connected account provider.
149
+ # @return [String, nil]
102
150
  attr_accessor :image_url
103
151
  # IANA time zone (e.g. America/Los_Angeles) for this connected account. Sourced from the connector configuration.
152
+ # @return [String, nil]
104
153
  attr_accessor :time_zone
105
154
 
106
155
  # Date and time at which the connected account was created.
156
+ # @return [Time, nil]
107
157
  date_accessor :created_at
108
158
  end
109
159
  end
@@ -9,16 +9,21 @@ module Seam
9
9
  # Seam hosts these flows, handling everything from account connection and device mapping to full-featured device control.
10
10
  class CustomerPortal < BaseResource
11
11
  # Customer key for the customer portal.
12
+ # @return [String]
12
13
  attr_accessor :customer_key
13
14
  # URL for the customer portal.
15
+ # @return [String]
14
16
  attr_accessor :url
15
17
  # ID of the workspace associated with the customer portal.
18
+ # @return [String]
16
19
  attr_accessor :workspace_id
17
20
 
18
21
  # Date and time at which the customer portal link was created.
22
+ # @return [Time]
19
23
  date_accessor :created_at
20
24
 
21
25
  # Date and time at which the customer portal link expires.
26
+ # @return [Time]
22
27
  date_accessor :expires_at
23
28
  end
24
29
  end