@seamapi/types 1.409.1 → 1.410.1
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.
- package/dist/connect.cjs +38 -10
- package/dist/connect.cjs.map +1 -1
- package/dist/connect.d.cts +30 -1
- package/lib/seam/connect/models/connect-webviews/connect-webview.d.ts +5 -0
- package/lib/seam/connect/models/connect-webviews/connect-webview.js +12 -0
- package/lib/seam/connect/models/connect-webviews/connect-webview.js.map +1 -1
- package/lib/seam/connect/models/devices/device-provider.d.ts +2 -0
- package/lib/seam/connect/models/devices/device-provider.js +8 -0
- package/lib/seam/connect/models/devices/device-provider.js.map +1 -1
- package/lib/seam/connect/openapi.d.ts +18 -0
- package/lib/seam/connect/openapi.js +26 -10
- package/lib/seam/connect/openapi.js.map +1 -1
- package/lib/seam/connect/route-types.d.ts +9 -1
- package/package.json +1 -1
- package/src/lib/seam/connect/models/connect-webviews/connect-webview.ts +20 -0
- package/src/lib/seam/connect/models/devices/device-provider.ts +13 -0
- package/src/lib/seam/connect/openapi.ts +30 -10
- package/src/lib/seam/connect/route-types.ts +17 -1
|
@@ -19051,6 +19051,8 @@ export interface Routes {
|
|
|
19051
19051
|
automatically_manage_new_devices?: boolean;
|
|
19052
19052
|
/** Indicates whether Seam should finish syncing all devices in a newly-connected account before completing the associated Connect Webview. See also: [Customize the Behavior Settings of Your Connect Webviews](https://docs.seam.co/latest/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-behavior-settings-of-your-connect-webviews). */
|
|
19053
19053
|
wait_for_device_creation?: boolean;
|
|
19054
|
+
/** List of accepted device capabilities that restrict the types of devices that can be connected through the Connect Webview. If not provided, defaults will be determined based on the accepted providers. */
|
|
19055
|
+
accepted_capabilities?: Array<'lock' | 'thermostat' | 'noise_sensor' | 'access_control'> | undefined;
|
|
19054
19056
|
};
|
|
19055
19057
|
commonParams: {};
|
|
19056
19058
|
formData: {};
|
|
@@ -19080,6 +19082,8 @@ export interface Routes {
|
|
|
19080
19082
|
device_selection_mode: 'none' | 'single' | 'multiple';
|
|
19081
19083
|
/** List of accepted [provider keys](https://docs.seam.co/latest/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-brands-to-display-in-your-connect-webviews). */
|
|
19082
19084
|
accepted_providers: string[];
|
|
19085
|
+
/** List of accepted device capabilities that restrict the types of devices that can be connected through the Connect Webview. */
|
|
19086
|
+
accepted_capabilities: Array<'lock' | 'thermostat' | 'noise_sensor' | 'access_control'>;
|
|
19083
19087
|
/**
|
|
19084
19088
|
* @deprecated Unused. Will be removed. */
|
|
19085
19089
|
accepted_devices: string[];
|
|
@@ -19157,6 +19161,8 @@ export interface Routes {
|
|
|
19157
19161
|
device_selection_mode: 'none' | 'single' | 'multiple';
|
|
19158
19162
|
/** List of accepted [provider keys](https://docs.seam.co/latest/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-brands-to-display-in-your-connect-webviews). */
|
|
19159
19163
|
accepted_providers: string[];
|
|
19164
|
+
/** List of accepted device capabilities that restrict the types of devices that can be connected through the Connect Webview. */
|
|
19165
|
+
accepted_capabilities: Array<'lock' | 'thermostat' | 'noise_sensor' | 'access_control'>;
|
|
19160
19166
|
/**
|
|
19161
19167
|
* @deprecated Unused. Will be removed. */
|
|
19162
19168
|
accepted_devices: string[];
|
|
@@ -19216,6 +19222,8 @@ export interface Routes {
|
|
|
19216
19222
|
device_selection_mode: 'none' | 'single' | 'multiple';
|
|
19217
19223
|
/** List of accepted [provider keys](https://docs.seam.co/latest/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-brands-to-display-in-your-connect-webviews). */
|
|
19218
19224
|
accepted_providers: string[];
|
|
19225
|
+
/** List of accepted device capabilities that restrict the types of devices that can be connected through the Connect Webview. */
|
|
19226
|
+
accepted_capabilities: Array<'lock' | 'thermostat' | 'noise_sensor' | 'access_control'>;
|
|
19219
19227
|
/**
|
|
19220
19228
|
* @deprecated Unused. Will be removed. */
|
|
19221
19229
|
accepted_devices: string[];
|
|
@@ -55181,7 +55189,7 @@ export interface Routes {
|
|
|
55181
55189
|
heating_set_point_fahrenheit?: number | undefined;
|
|
55182
55190
|
/** Indicates whether a person at the thermostat can change the thermostat's settings. See [Specifying Manual Override Permissions](https://docs.seam.co/latest/capability-guides/thermostats/creating-and-managing-thermostat-schedules#specifying-manual-override-permissions).
|
|
55183
55191
|
* @deprecated Use 'thermostat_schedule.is_override_allowed' */
|
|
55184
|
-
manual_override_allowed
|
|
55192
|
+
manual_override_allowed?: boolean | undefined;
|
|
55185
55193
|
};
|
|
55186
55194
|
commonParams: {};
|
|
55187
55195
|
formData: {};
|
package/package.json
CHANGED
|
@@ -8,6 +8,20 @@ export const connect_webview_device_selection_mode = z.enum([
|
|
|
8
8
|
'multiple',
|
|
9
9
|
])
|
|
10
10
|
|
|
11
|
+
export const connect_webview_accepted_capabilities = z.enum([
|
|
12
|
+
'lock',
|
|
13
|
+
'thermostat',
|
|
14
|
+
'noise_sensor',
|
|
15
|
+
'access_control',
|
|
16
|
+
]).describe(`
|
|
17
|
+
High-level device capabilities that can be restricted in connect webviews.
|
|
18
|
+
These represent the main device categories that customers can opt into.
|
|
19
|
+
`)
|
|
20
|
+
|
|
21
|
+
export type ConnectWebviewAcceptedCapabilities = z.infer<
|
|
22
|
+
typeof connect_webview_accepted_capabilities
|
|
23
|
+
>
|
|
24
|
+
|
|
11
25
|
export const connect_webview = z.object({
|
|
12
26
|
connect_webview_id: z.string().uuid().describe('ID of the Connect Webview.'),
|
|
13
27
|
workspace_id: z
|
|
@@ -42,6 +56,12 @@ export const connect_webview = z.object({
|
|
|
42
56
|
'List of accepted [provider keys](https://docs.seam.co/latest/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-brands-to-display-in-your-connect-webviews).',
|
|
43
57
|
),
|
|
44
58
|
|
|
59
|
+
accepted_capabilities: z
|
|
60
|
+
.array(connect_webview_accepted_capabilities)
|
|
61
|
+
.describe(
|
|
62
|
+
'List of accepted device capabilities that restrict the types of devices that can be connected through the Connect Webview.',
|
|
63
|
+
),
|
|
64
|
+
|
|
45
65
|
accepted_devices: z.array(z.string()).describe(
|
|
46
66
|
`
|
|
47
67
|
---
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod'
|
|
2
2
|
|
|
3
|
+
import type { ConnectWebviewAcceptedCapabilities } from '../connect-webviews/index.js'
|
|
3
4
|
import { device_capability_flags } from './device.js'
|
|
4
5
|
|
|
5
6
|
export const DEVICE_PROVIDERS = {
|
|
@@ -145,3 +146,15 @@ export const device_provider = z
|
|
|
145
146
|
`)
|
|
146
147
|
|
|
147
148
|
export type DeviceProvider = z.infer<typeof device_provider>
|
|
149
|
+
|
|
150
|
+
export const PROVIDER_CATEGORY_CAPABILITY_MAP: Record<
|
|
151
|
+
ProviderCategory,
|
|
152
|
+
ConnectWebviewAcceptedCapabilities[]
|
|
153
|
+
> = {
|
|
154
|
+
stable: ['lock', 'thermostat', 'noise_sensor', 'access_control'],
|
|
155
|
+
consumer_smartlocks: ['lock'],
|
|
156
|
+
thermostats: ['thermostat'],
|
|
157
|
+
noise_sensors: ['noise_sensor'],
|
|
158
|
+
access_control_systems: ['access_control'],
|
|
159
|
+
internal_beta: ['lock', 'thermostat', 'noise_sensor', 'access_control'],
|
|
160
|
+
}
|
|
@@ -7186,6 +7186,17 @@ export default {
|
|
|
7186
7186
|
description:
|
|
7187
7187
|
'Represents a [Connect Webview](https://docs.seam.co/latest/core-concepts/connect-webviews).\n\nConnect 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.\n\nConnect 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.\n\nTo 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.\n\nWhen 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.\n\nTo 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.',
|
|
7188
7188
|
properties: {
|
|
7189
|
+
accepted_capabilities: {
|
|
7190
|
+
description:
|
|
7191
|
+
'List of accepted device capabilities that restrict the types of devices that can be connected through the Connect Webview.',
|
|
7192
|
+
items: {
|
|
7193
|
+
description:
|
|
7194
|
+
'\n High-level device capabilities that can be restricted in connect webviews.\n These represent the main device categories that customers can opt into.\n',
|
|
7195
|
+
enum: ['lock', 'thermostat', 'noise_sensor', 'access_control'],
|
|
7196
|
+
type: 'string',
|
|
7197
|
+
},
|
|
7198
|
+
type: 'array',
|
|
7199
|
+
},
|
|
7189
7200
|
accepted_devices: {
|
|
7190
7201
|
deprecated: true,
|
|
7191
7202
|
items: { type: 'string' },
|
|
@@ -7308,6 +7319,7 @@ export default {
|
|
|
7308
7319
|
'url',
|
|
7309
7320
|
'device_selection_mode',
|
|
7310
7321
|
'accepted_providers',
|
|
7322
|
+
'accepted_capabilities',
|
|
7311
7323
|
'accepted_devices',
|
|
7312
7324
|
'any_device_allowed',
|
|
7313
7325
|
'any_provider_allowed',
|
|
@@ -28645,6 +28657,22 @@ export default {
|
|
|
28645
28657
|
'application/json': {
|
|
28646
28658
|
schema: {
|
|
28647
28659
|
properties: {
|
|
28660
|
+
accepted_capabilities: {
|
|
28661
|
+
description:
|
|
28662
|
+
'List of accepted device capabilities that restrict the types of devices that can be connected through the Connect Webview. If not provided, defaults will be determined based on the accepted providers.',
|
|
28663
|
+
items: {
|
|
28664
|
+
description:
|
|
28665
|
+
'\n High-level device capabilities that can be restricted in connect webviews.\n These represent the main device categories that customers can opt into.\n',
|
|
28666
|
+
enum: [
|
|
28667
|
+
'lock',
|
|
28668
|
+
'thermostat',
|
|
28669
|
+
'noise_sensor',
|
|
28670
|
+
'access_control',
|
|
28671
|
+
],
|
|
28672
|
+
type: 'string',
|
|
28673
|
+
},
|
|
28674
|
+
type: 'array',
|
|
28675
|
+
},
|
|
28648
28676
|
accepted_providers: {
|
|
28649
28677
|
description:
|
|
28650
28678
|
'Accepted device provider keys as an alternative to `provider_category`. Use this parameter to specify accepted providers explicitly. See [Customize the Brands to Display in Your Connect Webviews](https://docs.seam.co/latest/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-brands-to-display-in-your-connect-webviews). To list all provider keys, use [`/devices/list_device_providers`](https://docs.seam.co/latest/api/devices/list_device_providers) with no filters.',
|
|
@@ -37407,11 +37435,7 @@ export default {
|
|
|
37407
37435
|
type: 'string',
|
|
37408
37436
|
},
|
|
37409
37437
|
},
|
|
37410
|
-
required: [
|
|
37411
|
-
'device_id',
|
|
37412
|
-
'climate_preset_key',
|
|
37413
|
-
'manual_override_allowed',
|
|
37414
|
-
],
|
|
37438
|
+
required: ['device_id', 'climate_preset_key'],
|
|
37415
37439
|
type: 'object',
|
|
37416
37440
|
},
|
|
37417
37441
|
},
|
|
@@ -37517,11 +37541,7 @@ export default {
|
|
|
37517
37541
|
type: 'string',
|
|
37518
37542
|
},
|
|
37519
37543
|
},
|
|
37520
|
-
required: [
|
|
37521
|
-
'device_id',
|
|
37522
|
-
'climate_preset_key',
|
|
37523
|
-
'manual_override_allowed',
|
|
37524
|
-
],
|
|
37544
|
+
required: ['device_id', 'climate_preset_key'],
|
|
37525
37545
|
type: 'object',
|
|
37526
37546
|
},
|
|
37527
37547
|
},
|
|
@@ -22096,6 +22096,10 @@ export interface Routes {
|
|
|
22096
22096
|
automatically_manage_new_devices?: boolean
|
|
22097
22097
|
/** Indicates whether Seam should finish syncing all devices in a newly-connected account before completing the associated Connect Webview. See also: [Customize the Behavior Settings of Your Connect Webviews](https://docs.seam.co/latest/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-behavior-settings-of-your-connect-webviews). */
|
|
22098
22098
|
wait_for_device_creation?: boolean
|
|
22099
|
+
/** List of accepted device capabilities that restrict the types of devices that can be connected through the Connect Webview. If not provided, defaults will be determined based on the accepted providers. */
|
|
22100
|
+
accepted_capabilities?:
|
|
22101
|
+
| Array<'lock' | 'thermostat' | 'noise_sensor' | 'access_control'>
|
|
22102
|
+
| undefined
|
|
22099
22103
|
}
|
|
22100
22104
|
commonParams: {}
|
|
22101
22105
|
formData: {}
|
|
@@ -22125,6 +22129,10 @@ export interface Routes {
|
|
|
22125
22129
|
device_selection_mode: 'none' | 'single' | 'multiple'
|
|
22126
22130
|
/** List of accepted [provider keys](https://docs.seam.co/latest/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-brands-to-display-in-your-connect-webviews). */
|
|
22127
22131
|
accepted_providers: string[]
|
|
22132
|
+
/** List of accepted device capabilities that restrict the types of devices that can be connected through the Connect Webview. */
|
|
22133
|
+
accepted_capabilities: Array<
|
|
22134
|
+
'lock' | 'thermostat' | 'noise_sensor' | 'access_control'
|
|
22135
|
+
>
|
|
22128
22136
|
/**
|
|
22129
22137
|
* @deprecated Unused. Will be removed. */
|
|
22130
22138
|
accepted_devices: string[]
|
|
@@ -22202,6 +22210,10 @@ export interface Routes {
|
|
|
22202
22210
|
device_selection_mode: 'none' | 'single' | 'multiple'
|
|
22203
22211
|
/** List of accepted [provider keys](https://docs.seam.co/latest/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-brands-to-display-in-your-connect-webviews). */
|
|
22204
22212
|
accepted_providers: string[]
|
|
22213
|
+
/** List of accepted device capabilities that restrict the types of devices that can be connected through the Connect Webview. */
|
|
22214
|
+
accepted_capabilities: Array<
|
|
22215
|
+
'lock' | 'thermostat' | 'noise_sensor' | 'access_control'
|
|
22216
|
+
>
|
|
22205
22217
|
/**
|
|
22206
22218
|
* @deprecated Unused. Will be removed. */
|
|
22207
22219
|
accepted_devices: string[]
|
|
@@ -22261,6 +22273,10 @@ export interface Routes {
|
|
|
22261
22273
|
device_selection_mode: 'none' | 'single' | 'multiple'
|
|
22262
22274
|
/** List of accepted [provider keys](https://docs.seam.co/latest/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-brands-to-display-in-your-connect-webviews). */
|
|
22263
22275
|
accepted_providers: string[]
|
|
22276
|
+
/** List of accepted device capabilities that restrict the types of devices that can be connected through the Connect Webview. */
|
|
22277
|
+
accepted_capabilities: Array<
|
|
22278
|
+
'lock' | 'thermostat' | 'noise_sensor' | 'access_control'
|
|
22279
|
+
>
|
|
22264
22280
|
/**
|
|
22265
22281
|
* @deprecated Unused. Will be removed. */
|
|
22266
22282
|
accepted_devices: string[]
|
|
@@ -64936,7 +64952,7 @@ export interface Routes {
|
|
|
64936
64952
|
heating_set_point_fahrenheit?: number | undefined
|
|
64937
64953
|
/** Indicates whether a person at the thermostat can change the thermostat's settings. See [Specifying Manual Override Permissions](https://docs.seam.co/latest/capability-guides/thermostats/creating-and-managing-thermostat-schedules#specifying-manual-override-permissions).
|
|
64938
64954
|
* @deprecated Use 'thermostat_schedule.is_override_allowed' */
|
|
64939
|
-
manual_override_allowed
|
|
64955
|
+
manual_override_allowed?: boolean | undefined
|
|
64940
64956
|
}
|
|
64941
64957
|
commonParams: {}
|
|
64942
64958
|
formData: {}
|