seam 2.132.0 → 2.133.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 +1 -1
- data/lib/seam/resources/access_code.rb +55 -2
- data/lib/seam/resources/access_grant.rb +39 -2
- data/lib/seam/resources/access_method.rb +34 -2
- data/lib/seam/resources/acs_access_group.rb +32 -1
- data/lib/seam/resources/acs_credential.rb +61 -2
- data/lib/seam/resources/acs_encoder.rb +25 -1
- data/lib/seam/resources/acs_entrance.rb +48 -1
- data/lib/seam/resources/acs_system.rb +41 -1
- data/lib/seam/resources/acs_user.rb +50 -1
- data/lib/seam/resources/action_attempt.rb +10 -1
- data/lib/seam/resources/batch.rb +126 -1
- data/lib/seam/resources/client_session.rb +35 -2
- data/lib/seam/resources/connect_webview.rb +50 -2
- data/lib/seam/resources/connected_account.rb +33 -1
- data/lib/seam/resources/customer_portal.rb +16 -2
- data/lib/seam/resources/device.rb +70 -1
- data/lib/seam/resources/device_provider.rb +48 -1
- data/lib/seam/resources/event.rb +184 -2
- data/lib/seam/resources/instant_key.rb +22 -2
- data/lib/seam/resources/noise_threshold.rb +15 -1
- data/lib/seam/resources/pagination.rb +7 -1
- data/lib/seam/resources/phone.rb +16 -1
- data/lib/seam/resources/space.rb +22 -1
- data/lib/seam/resources/thermostat_daily_program.rb +12 -1
- data/lib/seam/resources/thermostat_schedule.rb +23 -2
- data/lib/seam/resources/unmanaged_access_code.rb +41 -2
- data/lib/seam/resources/unmanaged_access_grant.rb +31 -2
- data/lib/seam/resources/unmanaged_access_method.rb +28 -2
- data/lib/seam/resources/unmanaged_device.rb +60 -1
- data/lib/seam/resources/unmanaged_user_identity.rb +16 -1
- data/lib/seam/resources/user_identity.rb +18 -1
- data/lib/seam/resources/webhook.rb +9 -1
- data/lib/seam/resources/workspace.rb +20 -1
- data/lib/seam/routes/access_codes.rb +147 -0
- data/lib/seam/routes/access_codes_simulate.rb +5 -0
- data/lib/seam/routes/access_codes_unmanaged.rb +34 -0
- data/lib/seam/routes/access_grants.rb +59 -0
- data/lib/seam/routes/access_grants_unmanaged.rb +20 -0
- data/lib/seam/routes/access_methods.rb +35 -0
- data/lib/seam/routes/access_methods_unmanaged.rb +9 -0
- data/lib/seam/routes/acs_access_groups.rb +28 -0
- data/lib/seam/routes/acs_credentials.rb +49 -0
- data/lib/seam/routes/acs_encoders.rb +25 -0
- data/lib/seam/routes/acs_encoders_simulate.rb +19 -0
- data/lib/seam/routes/acs_entrances.rb +30 -0
- data/lib/seam/routes/acs_systems.rb +20 -0
- data/lib/seam/routes/acs_users.rb +72 -0
- data/lib/seam/routes/action_attempts.rb +9 -0
- data/lib/seam/routes/client_sessions.rb +48 -0
- data/lib/seam/routes/connect_webviews.rb +36 -0
- data/lib/seam/routes/connected_accounts.rb +31 -0
- data/lib/seam/routes/connected_accounts_simulate.rb +3 -0
- data/lib/seam/routes/customers.rb +57 -0
- data/lib/seam/routes/devices.rb +45 -0
- data/lib/seam/routes/devices_simulate.rb +28 -0
- data/lib/seam/routes/devices_unmanaged.rb +36 -0
- data/lib/seam/routes/events.rb +35 -0
- data/lib/seam/routes/instant_keys.rb +10 -0
- data/lib/seam/routes/locks.rb +35 -0
- data/lib/seam/routes/locks_simulate.rb +7 -0
- data/lib/seam/routes/noise_sensors.rb +19 -0
- data/lib/seam/routes/noise_sensors_noise_thresholds.rb +27 -0
- data/lib/seam/routes/noise_sensors_simulate.rb +3 -0
- data/lib/seam/routes/phones.rb +10 -0
- data/lib/seam/routes/phones_simulate.rb +6 -0
- data/lib/seam/routes/spaces.rb +61 -0
- data/lib/seam/routes/thermostats.rb +112 -0
- data/lib/seam/routes/thermostats_daily_programs.rb +13 -0
- data/lib/seam/routes/thermostats_schedules.rb +28 -0
- data/lib/seam/routes/thermostats_simulate.rb +13 -0
- data/lib/seam/routes/user_identities.rb +67 -0
- data/lib/seam/routes/user_identities_unmanaged.rb +16 -0
- data/lib/seam/routes/webhooks.rb +16 -0
- data/lib/seam/routes/workspaces.rb +31 -0
- data/lib/seam/version.rb +1 -1
- metadata +2 -2
data/lib/seam/resources/batch.rb
CHANGED
|
@@ -2,8 +2,133 @@
|
|
|
2
2
|
|
|
3
3
|
module Seam
|
|
4
4
|
module Resources
|
|
5
|
+
# A batch of workspace resources.
|
|
5
6
|
class Batch < BaseResource
|
|
6
|
-
|
|
7
|
+
# Represents a smart lock [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes).
|
|
8
|
+
#
|
|
9
|
+
# An access code is a code used for a keypad or pinpad device. Unlike physical keys, which can easily be lost or duplicated, PIN codes can be customized, tracked, and altered on the fly. Using the Seam Access Code API, you can easily generate access codes on the hundreds of door lock models with which we integrate.
|
|
10
|
+
#
|
|
11
|
+
# Seam supports programming two types of access codes: [ongoing](https://docs.seam.co/low-level-apis/smart-locks/access-codes#ongoing-access-codes) and [time-bound](https://docs.seam.co/low-level-apis/smart-locks/access-codes#time-bound-access-codes). To differentiate between the two, refer to the `type` property of the access code. Ongoing codes display as `ongoing`, whereas time-bound codes are labeled `time_bound`. An ongoing access code is active, until it has been removed from the device. To specify an ongoing access code, leave both `starts_at` and `ends_at` empty. A time-bound access code will be programmed at the `starts_at` time and removed at the `ends_at` time.
|
|
12
|
+
#
|
|
13
|
+
# In addition, for certain devices, Seam also supports [offline access codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes#offline-access-codes). Offline access (PIN) codes are designed for door locks that might not always maintain an internet connection. For this type of access code, the device manufacturer uses encryption keys (tokens) to create server-based registries of algorithmically-generated offline PIN codes. Because the tokens remain synchronized with the managed devices, the locks do not require an active internet connection—and you do not need to be near the locks—to create an offline access code. Then, owners or managers can share these offline codes with users through a variety of mechanisms, such as messaging applications. That is, lock users do not need to install a smartphone application to receive an offline access code.
|
|
14
|
+
#
|
|
15
|
+
# For granting a person access to a space, [Access Grants](https://docs.seam.co/use-cases/granting-access) are the default and recommended approach and work across both standalone smart locks and access systems. Use the lower-level Access Codes API directly only when you specifically need to manage individual PIN codes.
|
|
16
|
+
attr_accessor :access_codes
|
|
17
|
+
# Represents an Access Grant. Access Grants enable you to grant a user identity access to spaces, entrances, and devices through one or more access methods, such as mobile keys, plastic cards, and PIN codes. You can create an Access Grant for an existing user identity, or you can create a new user identity *while* creating the new Access Grant.
|
|
18
|
+
attr_accessor :access_grants
|
|
19
|
+
# Represents an access method for an Access Grant. Access methods describe the modes of access, such as PIN codes, plastic cards, and mobile keys. For a mobile key, the access method also stores the URL for the associated Instant Key.
|
|
20
|
+
attr_accessor :access_methods
|
|
21
|
+
# Group that defines the entrances to which a set of users has access and, in some cases, the access schedule for these entrances and users.
|
|
22
|
+
#
|
|
23
|
+
# Some access control systems use [access group](https://docs.seam.co/low-level-apis/access-systems/user-management/assigning-users-to-access-groups), which are sets of users, combined with sets of permissions. These permissions include both the set of areas or assets that the users can access and the schedule during which the users can access these areas or assets. Instead of assigning access rights individually to each access control system user, which can be time-consuming and error-prone, administrators can assign users to an access group, thereby ensuring that the users inherit all the permissions associated with the access group. Using access groups streamlines the process of managing large numbers of access control system users, especially in bigger organizations or complexes.
|
|
24
|
+
#
|
|
25
|
+
# To learn whether your access control system supports access groups, see the corresponding [system integration guide](https://docs.seam.co/device-and-system-integration-guides#access-control-systems).
|
|
26
|
+
attr_accessor :acs_access_groups
|
|
27
|
+
# Means by which an [access control system user](https://docs.seam.co/low-level-apis/access-systems/user-management) gains access at an [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details). The `acs_credential` object represents a [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) that provides an ACS user access within an [access control system](https://docs.seam.co/low-level-apis/access-systems).
|
|
28
|
+
#
|
|
29
|
+
# An access control system generally uses digital means of access to authorize a user trying to get through a specific entrance. Examples of credentials include plastic key cards, mobile keys, biometric identifiers, and PIN codes. The electronic nature of these credentials, as well as the fact that access is centralized, enables both the rapid provisioning and rescinding of access and the ability to compile access audit logs.
|
|
30
|
+
#
|
|
31
|
+
# For each `acs_credential`, you define the access method. You can also specify additional properties, such as a PIN code, depending on the credential type.
|
|
32
|
+
#
|
|
33
|
+
# For granting a person access to a space, [Access Grants](https://docs.seam.co/use-cases/granting-access) are the default and recommended approach. Use the lower-level ACS credential API directly only when you specifically need to manage individual credentials.
|
|
34
|
+
attr_accessor :acs_credentials
|
|
35
|
+
# Represents a hardware device that encodes [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) data onto physical cards within an [access control system](https://docs.seam.co/low-level-apis/access-systems).
|
|
36
|
+
#
|
|
37
|
+
# Some access control systems require credentials to be encoded onto plastic key cards using a card encoder. This process involves the following two key steps:
|
|
38
|
+
#
|
|
39
|
+
# 1. Credential creation
|
|
40
|
+
# Configure the access parameters for the credential.
|
|
41
|
+
# 2. Card encoding
|
|
42
|
+
# Write the credential data onto the card using a compatible card encoder.
|
|
43
|
+
#
|
|
44
|
+
# Separately, the Seam API also supports card scanning, which enables you to scan and read the encoded data on a card. You can use this action to confirm consistency with access control system records or diagnose discrepancies if needed.
|
|
45
|
+
#
|
|
46
|
+
# See [Working with Card Encoders and Scanners](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners).
|
|
47
|
+
#
|
|
48
|
+
# To verify if your access control system requires a card encoder, see the corresponding [system integration guide](https://docs.seam.co/device-and-system-integration-guides#access-control-systems).
|
|
49
|
+
attr_accessor :acs_encoders
|
|
50
|
+
# Represents an [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details) within an [access control system](https://docs.seam.co/low-level-apis/access-systems).
|
|
51
|
+
#
|
|
52
|
+
# In an access control system, an entrance is a secured door, gate, zone, or other method of entry. You can list details for all the `acs_entrance` resources in your workspace or get these details for a specific `acs_entrance`. You can also list all entrances associated with a specific credential, and you can list all credentials associated with a specific entrance.
|
|
53
|
+
attr_accessor :acs_entrances
|
|
54
|
+
# Represents an [access control system](https://docs.seam.co/low-level-apis/access-systems).
|
|
55
|
+
#
|
|
56
|
+
# Within an `acs_system`, create [`acs_user`s](https://docs.seam.co/api/acs/users/object) and [`acs_credential`s](https://docs.seam.co/api/acs/credentials/object) to grant access to the `acs_user`s.
|
|
57
|
+
#
|
|
58
|
+
# For details about the resources associated with an access control system, see the [access control systems namespace](https://docs.seam.co/api/acs).
|
|
59
|
+
attr_accessor :acs_systems
|
|
60
|
+
# Represents a [user](https://docs.seam.co/low-level-apis/access-systems/user-management) in an [access system](https://docs.seam.co/low-level-apis/access-systems).
|
|
61
|
+
#
|
|
62
|
+
# An access system user typically refers to an individual who requires access, like an employee or resident. Each user can possess multiple credentials that serve as their keys or identifiers for access. The type of credential can vary widely. For example, in the Salto system, a user can have a PIN code, a mobile app account, and a fob. In other platforms, it is not uncommon for a user to have more than one of the same credential type, such as multiple key cards. Additionally, these credentials can have a schedule or validity period.
|
|
63
|
+
#
|
|
64
|
+
# For details about how to configure users in your access system, see the corresponding [system integration guide](https://docs.seam.co/device-and-system-integration-guides#access-control-systems).
|
|
65
|
+
attr_accessor :acs_users
|
|
66
|
+
# Represents an action attempt that enables you to keep track of the progress of your action that affects a physical device or system.actions against a device. Action attempts are useful because the physical world is intrinsically asynchronous.
|
|
67
|
+
#
|
|
68
|
+
# When you request for a device to perform an action, the Seam API immediately returns an action attempt object. In the background, the Seam API performs the action.
|
|
69
|
+
#
|
|
70
|
+
# See also [Action Attempts](https://docs.seam.co/core-concepts/action-attempts).
|
|
71
|
+
attr_accessor :action_attempts
|
|
72
|
+
# Represents a [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens). If you want to restrict your users' access to their own devices, use client sessions.
|
|
73
|
+
#
|
|
74
|
+
# You create each client session with a custom `user_identifier_key`. Normally, the `user_identifier_key` is a user ID that your application provides.
|
|
75
|
+
#
|
|
76
|
+
# When calling the Seam API from your backend using an API key, you can pass the `user_identifier_key` as a parameter to limit results to the associated client session. For example, `/devices/list?user_identifier_key=123` only returns devices associated with the client session created with the `user_identifier_key` `123`.
|
|
77
|
+
#
|
|
78
|
+
# A client session has a token that you can use with the Seam JavaScript SDK to make requests from the client (browser) directly to the Seam API. The token restricts the user's access to only the devices that they own.
|
|
79
|
+
#
|
|
80
|
+
# 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).
|
|
81
|
+
attr_accessor :client_sessions
|
|
82
|
+
# Represents a [Connect Webview](https://docs.seam.co/core-concepts/connect-webviews).
|
|
83
|
+
#
|
|
84
|
+
# Connect Webviews are fully-embedded client-side components that you add to your app. Your users interact with your embedded Connect Webviews to link their IoT device or system accounts to Seam. That is, Connect Webviews walk your users through the process of logging in to their device or system accounts. Seam handles all the authentication steps, and—once your user has completed the authorization through your app—you can access and control their devices or systems using the Seam API.
|
|
85
|
+
#
|
|
86
|
+
# Connect Webviews perform credential validation, multifactor authentication (when applicable), and error handling for each brand that Seam supports. Further, Connect Webviews work across all modern browsers and platforms, including Chrome, Safari, and Firefox.
|
|
87
|
+
#
|
|
88
|
+
# To enable a user to connect their device or system account to Seam through your app, first create a `connect_webview`. Once created, this `connect_webview` includes a URL that you can use to open an [iframe](https://www.w3schools.com/html/html_iframe.asp) or new window containing the Connect Webview for your user.
|
|
89
|
+
#
|
|
90
|
+
# When you create a Connect Webview, specify the desired provider category key in the `provider_category` parameter. Alternately, to specify a list of providers explicitly, use the `accepted_providers` parameter with a list of device provider keys.
|
|
91
|
+
#
|
|
92
|
+
# 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.
|
|
93
|
+
attr_accessor :connect_webviews
|
|
94
|
+
# Represents a [connected account](https://docs.seam.co/core-concepts/connected-accounts). A connected account is an external third-party account to which your user has authorized Seam to get access, for example, an August account with a list of door locks.
|
|
95
|
+
attr_accessor :connected_accounts
|
|
96
|
+
# Represents a [device](https://docs.seam.co/core-concepts/devices) that has been connected to Seam.
|
|
97
|
+
attr_accessor :devices
|
|
98
|
+
# Represents an event. Events let you know when something interesting happens in your workspace. For example, when a lock is unlocked, Seam creates a `lock.unlocked` event. When a device's battery level is low, Seam creates a `device.battery_low` event.
|
|
99
|
+
#
|
|
100
|
+
# As with other API resources, you can retrieve an individual event or a list of events. Seam also provides a separate webhook system for sending the event objects directly to an endpoint on your sever. Manage webhooks through [Seam Console](https://console.seam.co). You can also use the webhooks sandbox in Seam Console to see the different payloads for each event and test them against your own endpoints.
|
|
101
|
+
attr_accessor :events
|
|
102
|
+
# Represents a Seam Instant Key. For issuing Bluetooth mobile keys, Instant Keys are the fastest way to share access. With a single API call, you can create a mobile key and send it through text or email or embed it in your own app.
|
|
103
|
+
#
|
|
104
|
+
# There’s no app to install, nor account to create. Your user just taps a link and gets a lightweight, native-feeling experience using iOS App Clip or Instant Apps on Android. Further, Instant Keys work offline, so even in areas with poor cellular or Wi-Fi, like elevator banks or concrete-walled hallways, the Instant Keys still work.
|
|
105
|
+
attr_accessor :instant_keys
|
|
106
|
+
# Represents a [noise threshold](https://docs.seam.co/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://docs.seam.co/capability-guides/noise-sensors). Thresholds represent the limits of noise tolerated at a property, which can be customized for each hour of the day. Each device has its own default thresholds, but you can use the Seam API to modify them.
|
|
107
|
+
attr_accessor :noise_thresholds
|
|
108
|
+
# Represents a space that is a logical grouping of devices and entrances. You can assign access to an entire space, thereby making granting access more efficient.
|
|
109
|
+
attr_accessor :spaces
|
|
110
|
+
# Represents a thermostat daily program, consisting of a set of periods, each of which has a starting time and the key that identifies the climate preset to apply at the starting time.
|
|
111
|
+
attr_accessor :thermostat_daily_programs
|
|
112
|
+
# Represents a [thermostat schedule](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules) that activates a configured [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets) on a [thermostat](https://docs.seam.co/capability-guides/thermostats) at a specified starting time and deactivates the climate preset at a specified ending time.
|
|
113
|
+
attr_accessor :thermostat_schedules
|
|
114
|
+
# Represents an [unmanaged smart lock access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes).
|
|
115
|
+
#
|
|
116
|
+
# An access code is a code used for a keypad or pinpad device. Unlike physical keys, which can easily be lost or duplicated, PIN codes can be customized, tracked, and altered on the fly.
|
|
117
|
+
#
|
|
118
|
+
# When you create an access code on a device in Seam, it is created as a managed access code. Access codes that exist on a device that were not created through Seam are considered unmanaged codes. We strictly limit the operations that can be performed on unmanaged codes.
|
|
119
|
+
#
|
|
120
|
+
# Prior to using Seam to manage your devices, you may have used another lock management system to manage the access codes on your devices. Where possible, we help you keep any existing access codes on devices and transition those codes to ones managed by your Seam workspace.
|
|
121
|
+
#
|
|
122
|
+
# Not all providers support unmanaged access codes. The following providers do not support unmanaged access codes:
|
|
123
|
+
#
|
|
124
|
+
# - [Kwikset](https://docs.seam.co/device-and-system-integration-guides/kwikset-locks)
|
|
125
|
+
attr_accessor :unmanaged_access_codes
|
|
126
|
+
# Represents an [unmanaged device](https://docs.seam.co/core-concepts/devices/managed-and-unmanaged-devices). An unmanaged device has a limited set of visible properties and a subset of supported events. You cannot control an unmanaged device. Any [access codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) on an unmanaged device are unmanaged. To control an unmanaged device with Seam, [convert it to a managed device](https://docs.seam.co/core-concepts/devices/managed-and-unmanaged-devices#convert-an-unmanaged-device-to-managed).
|
|
127
|
+
attr_accessor :unmanaged_devices
|
|
128
|
+
# Represents a [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 an application user account.
|
|
129
|
+
attr_accessor :user_identities
|
|
130
|
+
# Represents a Seam [workspace](https://docs.seam.co/core-concepts/workspaces). A workspace is a top-level entity that encompasses all other resources below it, such as devices, connected accounts, and Connect Webviews. Seam provides two types of workspaces. A [sandbox workspace](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces) is a special type of workspace designed for testing code. Sandbox workspaces offer test device accounts and virtual devices that you can connect and control. This ability to work with virtual devices is quite handy because it removes the need to own physical devices from multiple brands. To connect real devices and systems to Seam, use a [production workspace](https://docs.seam.co/core-concepts/workspaces#production-workspaces).
|
|
131
|
+
attr_accessor :workspaces
|
|
7
132
|
end
|
|
8
133
|
end
|
|
9
134
|
end
|
|
@@ -2,10 +2,43 @@
|
|
|
2
2
|
|
|
3
3
|
module Seam
|
|
4
4
|
module Resources
|
|
5
|
+
# Represents a [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens). If you want to restrict your users' access to their own devices, use client sessions.
|
|
6
|
+
#
|
|
7
|
+
# You create each client session with a custom `user_identifier_key`. Normally, the `user_identifier_key` is a user ID that your application provides.
|
|
8
|
+
#
|
|
9
|
+
# When calling the Seam API from your backend using an API key, you can pass the `user_identifier_key` as a parameter to limit results to the associated client session. For example, `/devices/list?user_identifier_key=123` only returns devices associated with the client session created with the `user_identifier_key` `123`.
|
|
10
|
+
#
|
|
11
|
+
# A client session has a token that you can use with the Seam JavaScript SDK to make requests from the client (browser) directly to the Seam API. The token restricts the user's access to only the devices that they own.
|
|
12
|
+
#
|
|
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).
|
|
5
14
|
class ClientSession < BaseResource
|
|
6
|
-
|
|
15
|
+
# ID of the client session.
|
|
16
|
+
attr_accessor :client_session_id
|
|
17
|
+
# 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).
|
|
18
|
+
attr_accessor :connect_webview_ids
|
|
19
|
+
# 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).
|
|
20
|
+
attr_accessor :connected_account_ids
|
|
21
|
+
# Customer key associated with the [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens).
|
|
22
|
+
attr_accessor :customer_key
|
|
23
|
+
# Number of devices associated with the [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens).
|
|
24
|
+
attr_accessor :device_count
|
|
25
|
+
# Client session token associated with the [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens).
|
|
26
|
+
attr_accessor :token
|
|
27
|
+
# Your user ID for the user associated with the [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens).
|
|
28
|
+
attr_accessor :user_identifier_key
|
|
29
|
+
# 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.
|
|
30
|
+
attr_accessor :user_identity_id
|
|
31
|
+
# 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.
|
|
32
|
+
# @deprecated Use `user_identity_id` instead.
|
|
33
|
+
attr_accessor :user_identity_ids
|
|
34
|
+
# ID of the workspace associated with the client session.
|
|
35
|
+
attr_accessor :workspace_id
|
|
7
36
|
|
|
8
|
-
|
|
37
|
+
# Date and time at which the [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens) was created.
|
|
38
|
+
date_accessor :created_at
|
|
39
|
+
|
|
40
|
+
# Date and time at which the [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens) expires.
|
|
41
|
+
date_accessor :expires_at
|
|
9
42
|
end
|
|
10
43
|
end
|
|
11
44
|
end
|
|
@@ -2,10 +2,58 @@
|
|
|
2
2
|
|
|
3
3
|
module Seam
|
|
4
4
|
module Resources
|
|
5
|
+
# Represents a [Connect Webview](https://docs.seam.co/core-concepts/connect-webviews).
|
|
6
|
+
#
|
|
7
|
+
# Connect Webviews are fully-embedded client-side components that you add to your app. Your users interact with your embedded Connect Webviews to link their IoT device or system accounts to Seam. That is, Connect Webviews walk your users through the process of logging in to their device or system accounts. Seam handles all the authentication steps, and—once your user has completed the authorization through your app—you can access and control their devices or systems using the Seam API.
|
|
8
|
+
#
|
|
9
|
+
# Connect Webviews perform credential validation, multifactor authentication (when applicable), and error handling for each brand that Seam supports. Further, Connect Webviews work across all modern browsers and platforms, including Chrome, Safari, and Firefox.
|
|
10
|
+
#
|
|
11
|
+
# To enable a user to connect their device or system account to Seam through your app, first create a `connect_webview`. Once created, this `connect_webview` includes a URL that you can use to open an [iframe](https://www.w3schools.com/html/html_iframe.asp) or new window containing the Connect Webview for your user.
|
|
12
|
+
#
|
|
13
|
+
# When you create a Connect Webview, specify the desired provider category key in the `provider_category` parameter. Alternately, to specify a list of providers explicitly, use the `accepted_providers` parameter with a list of device provider keys.
|
|
14
|
+
#
|
|
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.
|
|
5
16
|
class ConnectWebview < BaseResource
|
|
6
|
-
|
|
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
|
+
attr_accessor :accepted_capabilities
|
|
19
|
+
# 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).
|
|
20
|
+
attr_accessor :accepted_providers
|
|
21
|
+
# Indicates whether any provider is allowed.
|
|
22
|
+
attr_accessor :any_provider_allowed
|
|
23
|
+
# 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.
|
|
24
|
+
attr_accessor :automatically_manage_new_devices
|
|
25
|
+
# ID of the Connect Webview.
|
|
26
|
+
attr_accessor :connect_webview_id
|
|
27
|
+
# ID of the connected account associated with the Connect Webview.
|
|
28
|
+
attr_accessor :connected_account_id
|
|
29
|
+
# 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.
|
|
30
|
+
attr_accessor :custom_metadata
|
|
31
|
+
# URL to which the Connect Webview should redirect when an unexpected error occurs.
|
|
32
|
+
attr_accessor :custom_redirect_failure_url
|
|
33
|
+
# 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.
|
|
34
|
+
attr_accessor :custom_redirect_url
|
|
35
|
+
# The customer key associated with this webview, if any.
|
|
36
|
+
attr_accessor :customer_key
|
|
37
|
+
# Device selection mode of the Connect Webview. Supported values: `none`, `single`, `multiple`.
|
|
38
|
+
attr_accessor :device_selection_mode
|
|
39
|
+
# Indicates whether the user logged in successfully using the Connect Webview.
|
|
40
|
+
attr_accessor :login_successful
|
|
41
|
+
# 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).
|
|
42
|
+
attr_accessor :selected_provider
|
|
43
|
+
# Status of the Connect Webview. `authorized` indicates that the user has successfully logged into their device or system account, thereby completing the Connect Webview.
|
|
44
|
+
attr_accessor :status
|
|
45
|
+
# URL for the Connect Webview. You use the URL to display the Connect Webview flow to your user.
|
|
46
|
+
attr_accessor :url
|
|
47
|
+
# 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.
|
|
48
|
+
attr_accessor :wait_for_device_creation
|
|
49
|
+
# ID of the workspace that contains the Connect Webview.
|
|
50
|
+
attr_accessor :workspace_id
|
|
7
51
|
|
|
8
|
-
|
|
52
|
+
# Date and time at which the user authorized (through the Connect Webview) the management of their devices.
|
|
53
|
+
date_accessor :authorized_at
|
|
54
|
+
|
|
55
|
+
# Date and time at which the Connect Webview was created.
|
|
56
|
+
date_accessor :created_at
|
|
9
57
|
end
|
|
10
58
|
end
|
|
11
59
|
end
|
|
@@ -2,9 +2,41 @@
|
|
|
2
2
|
|
|
3
3
|
module Seam
|
|
4
4
|
module Resources
|
|
5
|
+
# Represents a [connected account](https://docs.seam.co/core-concepts/connected-accounts). A connected account is an external third-party account to which your user has authorized Seam to get access, for example, an August account with a list of door locks.
|
|
5
6
|
class ConnectedAccount < BaseResource
|
|
6
|
-
|
|
7
|
+
# List of capabilities that were accepted during the account connection process.
|
|
8
|
+
attr_accessor :accepted_capabilities
|
|
9
|
+
# Type of connected account.
|
|
10
|
+
attr_accessor :account_type
|
|
11
|
+
# Display name for the connected account type.
|
|
12
|
+
attr_accessor :account_type_display_name
|
|
13
|
+
# 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.
|
|
14
|
+
attr_accessor :automatically_manage_new_devices
|
|
15
|
+
# ID of the connected account.
|
|
16
|
+
attr_accessor :connected_account_id
|
|
17
|
+
# 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.
|
|
18
|
+
attr_accessor :custom_metadata
|
|
19
|
+
# Your unique key for the customer associated with this connected account.
|
|
20
|
+
attr_accessor :customer_key
|
|
21
|
+
# 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.
|
|
22
|
+
attr_accessor :default_checkin_time
|
|
23
|
+
# Default reservation check-out time for this connected account, as `HH:mm` (24-hour). Sourced from the connector configuration.
|
|
24
|
+
attr_accessor :default_checkout_time
|
|
25
|
+
# Display name for the connected account.
|
|
26
|
+
attr_accessor :display_name
|
|
27
|
+
# 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.
|
|
28
|
+
attr_accessor :ical_feed_origin
|
|
29
|
+
# For iCal connected accounts, the feed URL for the connection. Sourced from the connector configuration.
|
|
30
|
+
attr_accessor :ical_url
|
|
31
|
+
# Logo URL for the connected account provider.
|
|
32
|
+
attr_accessor :image_url
|
|
33
|
+
# IANA time zone (e.g. America/Los_Angeles) for this connected account. Sourced from the connector configuration.
|
|
34
|
+
attr_accessor :time_zone
|
|
35
|
+
# User identifier associated with the connected account.
|
|
36
|
+
# @deprecated Use `display_name` instead.
|
|
37
|
+
attr_accessor :user_identifier
|
|
7
38
|
|
|
39
|
+
# Date and time at which the connected account was created.
|
|
8
40
|
date_accessor :created_at
|
|
9
41
|
|
|
10
42
|
include Seam::Resources::ResourceErrorsSupport
|
|
@@ -2,10 +2,24 @@
|
|
|
2
2
|
|
|
3
3
|
module Seam
|
|
4
4
|
module Resources
|
|
5
|
+
# Represents a Customer Portal. Customer Portal is a hosted, customizable interface for managing device access. It enables you to embed secure, pre-authenticated access flows into your product—either by sharing a link with users or embedding a view in an iframe.
|
|
6
|
+
#
|
|
7
|
+
# With Customer Portal, you no longer need to build out frontend experiences for physical access, thermostats, and sensors. Instead, you can ship enterprise-grade access control experiences in a fraction of the time, while maintaining your product's branding and user experience.
|
|
8
|
+
#
|
|
9
|
+
# Seam hosts these flows, handling everything from account connection and device mapping to full-featured device control.
|
|
5
10
|
class CustomerPortal < BaseResource
|
|
6
|
-
|
|
11
|
+
# Customer key for the customer portal.
|
|
12
|
+
attr_accessor :customer_key
|
|
13
|
+
# URL for the customer portal.
|
|
14
|
+
attr_accessor :url
|
|
15
|
+
# ID of the workspace associated with the customer portal.
|
|
16
|
+
attr_accessor :workspace_id
|
|
7
17
|
|
|
8
|
-
|
|
18
|
+
# Date and time at which the customer portal link was created.
|
|
19
|
+
date_accessor :created_at
|
|
20
|
+
|
|
21
|
+
# Date and time at which the customer portal link expires.
|
|
22
|
+
date_accessor :expires_at
|
|
9
23
|
end
|
|
10
24
|
end
|
|
11
25
|
end
|
|
@@ -2,9 +2,78 @@
|
|
|
2
2
|
|
|
3
3
|
module Seam
|
|
4
4
|
module Resources
|
|
5
|
+
# Represents a [device](https://docs.seam.co/core-concepts/devices) that has been connected to Seam.
|
|
5
6
|
class Device < BaseResource
|
|
6
|
-
|
|
7
|
+
# Indicates whether the lock supports configuring automatic locking.
|
|
8
|
+
attr_accessor :can_configure_auto_lock
|
|
9
|
+
# Indicates whether the thermostat supports cooling.
|
|
10
|
+
attr_accessor :can_hvac_cool
|
|
11
|
+
# Indicates whether the thermostat supports heating.
|
|
12
|
+
attr_accessor :can_hvac_heat
|
|
13
|
+
# Indicates whether the thermostat supports simultaneous heating and cooling.
|
|
14
|
+
attr_accessor :can_hvac_heat_cool
|
|
15
|
+
# Indicates whether the device supports programming offline access codes.
|
|
16
|
+
attr_accessor :can_program_offline_access_codes
|
|
17
|
+
# Indicates whether the device supports programming online access codes.
|
|
18
|
+
attr_accessor :can_program_online_access_codes
|
|
19
|
+
# Indicates whether the thermostat supports different climate programs for each day of the week.
|
|
20
|
+
attr_accessor :can_program_thermostat_programs_as_different_each_day
|
|
21
|
+
# Indicates whether the thermostat supports a single climate program applied to every day.
|
|
22
|
+
attr_accessor :can_program_thermostat_programs_as_same_each_day
|
|
23
|
+
# Indicates whether the thermostat supports weekday/weekend climate programs.
|
|
24
|
+
attr_accessor :can_program_thermostat_programs_as_weekday_weekend
|
|
25
|
+
# Indicates whether the device supports remote locking.
|
|
26
|
+
attr_accessor :can_remotely_lock
|
|
27
|
+
# Indicates whether the device supports remote unlocking.
|
|
28
|
+
attr_accessor :can_remotely_unlock
|
|
29
|
+
# Indicates whether the thermostat supports running climate programs.
|
|
30
|
+
attr_accessor :can_run_thermostat_programs
|
|
31
|
+
# Indicates whether the device supports simulating connection in a sandbox.
|
|
32
|
+
attr_accessor :can_simulate_connection
|
|
33
|
+
# Indicates whether the device supports simulating disconnection in a sandbox.
|
|
34
|
+
attr_accessor :can_simulate_disconnection
|
|
35
|
+
# Indicates whether the hub supports simulating connection in a sandbox.
|
|
36
|
+
attr_accessor :can_simulate_hub_connection
|
|
37
|
+
# Indicates whether the hub supports simulating disconnection in a sandbox.
|
|
38
|
+
attr_accessor :can_simulate_hub_disconnection
|
|
39
|
+
# Indicates whether the device supports simulating a paid subscription in a sandbox.
|
|
40
|
+
attr_accessor :can_simulate_paid_subscription
|
|
41
|
+
# Indicates whether the device supports simulating removal in a sandbox.
|
|
42
|
+
attr_accessor :can_simulate_removal
|
|
43
|
+
# Indicates whether the thermostat can be turned off.
|
|
44
|
+
attr_accessor :can_turn_off_hvac
|
|
45
|
+
# Indicates whether the lock supports unlocking with an access code.
|
|
46
|
+
attr_accessor :can_unlock_with_code
|
|
47
|
+
# Collection of capabilities that the device supports when connected to Seam. Values are `access_code`, which indicates that the device can manage and utilize digital PIN codes for secure access; `lock`, which indicates that the device controls a door locking mechanism, enabling the remote opening and closing of doors and other entry points; `noise_detection`, which indicates that the device supports monitoring and responding to ambient noise levels; `thermostat`, which indicates that the device can regulate and adjust indoor temperatures; `battery`, which indicates that the device can manage battery life and health; and `phone`, which indicates that the device is a mobile device, such as a smartphone. **Important:** Superseded by [capability flags](https://docs.seam.co/capability-guides/device-and-system-capabilities#capability-flags).
|
|
48
|
+
attr_accessor :capabilities_supported
|
|
49
|
+
# Unique identifier for the account associated with the device.
|
|
50
|
+
attr_accessor :connected_account_id
|
|
51
|
+
# 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.
|
|
52
|
+
attr_accessor :custom_metadata
|
|
53
|
+
# ID of the device.
|
|
54
|
+
attr_accessor :device_id
|
|
55
|
+
# Manufacturer of the device. Represents the hardware brand, which may differ from the provider.
|
|
56
|
+
attr_accessor :device_manufacturer
|
|
57
|
+
# Provider of the device. Represents the third-party service through which the device is controlled.
|
|
58
|
+
attr_accessor :device_provider
|
|
59
|
+
# Type of the device.
|
|
60
|
+
attr_accessor :device_type
|
|
61
|
+
# Display name of the device, defaults to nickname (if it is set) or `properties.appearance.name`, otherwise. Enables administrators and users to identify the device easily, especially when there are numerous devices.
|
|
62
|
+
attr_accessor :display_name
|
|
63
|
+
# Indicates whether Seam manages the device. See also [Managed and Unmanaged Devices](https://docs.seam.co/core-concepts/devices/managed-and-unmanaged-devices).
|
|
64
|
+
attr_accessor :is_managed
|
|
65
|
+
# Location information for the device.
|
|
66
|
+
attr_accessor :location
|
|
67
|
+
# Optional nickname to describe the device, settable through Seam.
|
|
68
|
+
attr_accessor :nickname
|
|
69
|
+
# Properties of the device.
|
|
70
|
+
attr_accessor :properties
|
|
71
|
+
# IDs of the spaces the device is in.
|
|
72
|
+
attr_accessor :space_ids
|
|
73
|
+
# Unique identifier for the Seam workspace associated with the device.
|
|
74
|
+
attr_accessor :workspace_id
|
|
7
75
|
|
|
76
|
+
# Date and time at which the device object was created.
|
|
8
77
|
date_accessor :created_at
|
|
9
78
|
|
|
10
79
|
include Seam::Resources::ResourceErrorsSupport
|
|
@@ -3,7 +3,54 @@
|
|
|
3
3
|
module Seam
|
|
4
4
|
module Resources
|
|
5
5
|
class DeviceProvider < BaseResource
|
|
6
|
-
|
|
6
|
+
# Indicates whether the lock supports configuring automatic locking.
|
|
7
|
+
attr_accessor :can_configure_auto_lock
|
|
8
|
+
# Indicates whether the thermostat supports cooling.
|
|
9
|
+
attr_accessor :can_hvac_cool
|
|
10
|
+
# Indicates whether the thermostat supports heating.
|
|
11
|
+
attr_accessor :can_hvac_heat
|
|
12
|
+
# Indicates whether the thermostat supports simultaneous heating and cooling.
|
|
13
|
+
attr_accessor :can_hvac_heat_cool
|
|
14
|
+
# Indicates whether the device supports programming offline access codes.
|
|
15
|
+
attr_accessor :can_program_offline_access_codes
|
|
16
|
+
# Indicates whether the device supports programming online access codes.
|
|
17
|
+
attr_accessor :can_program_online_access_codes
|
|
18
|
+
# Indicates whether the thermostat supports different climate programs for each day of the week.
|
|
19
|
+
attr_accessor :can_program_thermostat_programs_as_different_each_day
|
|
20
|
+
# Indicates whether the thermostat supports a single climate program applied to every day.
|
|
21
|
+
attr_accessor :can_program_thermostat_programs_as_same_each_day
|
|
22
|
+
# Indicates whether the thermostat supports weekday/weekend climate programs.
|
|
23
|
+
attr_accessor :can_program_thermostat_programs_as_weekday_weekend
|
|
24
|
+
# Indicates whether the device supports remote locking.
|
|
25
|
+
attr_accessor :can_remotely_lock
|
|
26
|
+
# Indicates whether the device supports remote unlocking.
|
|
27
|
+
attr_accessor :can_remotely_unlock
|
|
28
|
+
# Indicates whether the thermostat supports running climate programs.
|
|
29
|
+
attr_accessor :can_run_thermostat_programs
|
|
30
|
+
# Indicates whether the device supports simulating connection in a sandbox.
|
|
31
|
+
attr_accessor :can_simulate_connection
|
|
32
|
+
# Indicates whether the device supports simulating disconnection in a sandbox.
|
|
33
|
+
attr_accessor :can_simulate_disconnection
|
|
34
|
+
# Indicates whether the hub supports simulating connection in a sandbox.
|
|
35
|
+
attr_accessor :can_simulate_hub_connection
|
|
36
|
+
# Indicates whether the hub supports simulating disconnection in a sandbox.
|
|
37
|
+
attr_accessor :can_simulate_hub_disconnection
|
|
38
|
+
# Indicates whether the device supports simulating a paid subscription in a sandbox.
|
|
39
|
+
attr_accessor :can_simulate_paid_subscription
|
|
40
|
+
# Indicates whether the device supports simulating removal in a sandbox.
|
|
41
|
+
attr_accessor :can_simulate_removal
|
|
42
|
+
# Indicates whether the thermostat can be turned off.
|
|
43
|
+
attr_accessor :can_turn_off_hvac
|
|
44
|
+
# Indicates whether the lock supports unlocking with an access code.
|
|
45
|
+
attr_accessor :can_unlock_with_code
|
|
46
|
+
# Name of the device provider.
|
|
47
|
+
attr_accessor :device_provider_name
|
|
48
|
+
# Display name for the device provider.
|
|
49
|
+
attr_accessor :display_name
|
|
50
|
+
# Image URL for the device provider.
|
|
51
|
+
attr_accessor :image_url
|
|
52
|
+
# List of provider categories to which the device provider belongs, such as `stable`, `consumer_smartlocks`, `thermostats`, and so on.
|
|
53
|
+
attr_accessor :provider_categories
|
|
7
54
|
end
|
|
8
55
|
end
|
|
9
56
|
end
|