@seamapi/types 1.1189.0 → 1.1190.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.
- package/lib/seam/connect/models/action-attempts/action-attempt.d.ts +75 -0
- package/lib/seam/connect/models/action-attempts/action-attempt.js +2 -0
- package/lib/seam/connect/models/action-attempts/action-attempt.js.map +1 -1
- package/lib/seam/connect/models/action-attempts/set-pool-heating.d.ts +77 -0
- package/lib/seam/connect/models/action-attempts/set-pool-heating.js +43 -0
- package/lib/seam/connect/models/action-attempts/set-pool-heating.js.map +1 -0
- package/lib/seam/connect/models/connect-webviews/connect-webview.d.ts +3 -3
- package/lib/seam/connect/models/connected-accounts/connected-account.d.ts +3 -3
- package/lib/seam/connect/models/devices/capabilities-supported.d.ts +1 -1
- package/lib/seam/connect/models/devices/capabilities-supported.js +1 -0
- package/lib/seam/connect/models/devices/capabilities-supported.js.map +1 -1
- package/lib/seam/connect/models/devices/device-provider.d.ts +3 -0
- package/lib/seam/connect/models/devices/device-provider.js +1 -0
- package/lib/seam/connect/models/devices/device-provider.js.map +1 -1
- package/lib/seam/connect/models/devices/device-type.d.ts +12 -1
- package/lib/seam/connect/models/devices/device-type.js +15 -0
- package/lib/seam/connect/models/devices/device-type.js.map +1 -1
- package/lib/seam/connect/models/devices/device.d.ts +102 -6
- package/lib/seam/connect/models/devices/device.js +30 -0
- package/lib/seam/connect/models/devices/device.js.map +1 -1
- package/lib/seam/connect/models/devices/index.d.ts +2 -0
- package/lib/seam/connect/models/devices/index.js +2 -0
- package/lib/seam/connect/models/devices/index.js.map +1 -1
- package/lib/seam/connect/models/devices/phone.d.ts +21 -0
- package/lib/seam/connect/models/devices/pool.d.ts +20 -0
- package/lib/seam/connect/models/devices/pool.js +26 -0
- package/lib/seam/connect/models/devices/pool.js.map +1 -0
- package/lib/seam/connect/models/devices/temperature-controller.d.ts +44 -0
- package/lib/seam/connect/models/devices/temperature-controller.js +29 -0
- package/lib/seam/connect/models/devices/temperature-controller.js.map +1 -0
- package/lib/seam/connect/models/devices/unmanaged-device.d.ts +47 -6
- package/lib/seam/connect/models/provider-capability.d.ts +1 -1
- package/lib/seam/connect/models/provider-capability.js +1 -0
- package/lib/seam/connect/models/provider-capability.js.map +1 -1
- package/lib/seam/connect/openapi.js +516 -0
- package/lib/seam/connect/openapi.js.map +1 -1
- package/lib/seam/connect/route-types.d.ts +8983 -796
- package/package.json +1 -1
- package/src/lib/seam/connect/internal/enums.ts +2 -0
- package/src/lib/seam/connect/internal/schemas.ts +1 -0
- package/src/lib/seam/connect/models/action-attempts/action-attempt.ts +2 -0
- package/src/lib/seam/connect/models/action-attempts/set-pool-heating.ts +53 -0
- package/src/lib/seam/connect/models/devices/capabilities-supported.ts +1 -0
- package/src/lib/seam/connect/models/devices/device-provider.ts +1 -0
- package/src/lib/seam/connect/models/devices/device-type.ts +25 -0
- package/src/lib/seam/connect/models/devices/device.ts +31 -0
- package/src/lib/seam/connect/models/devices/index.ts +2 -0
- package/src/lib/seam/connect/models/devices/pool.ts +45 -0
- package/src/lib/seam/connect/models/devices/temperature-controller.ts +50 -0
- package/src/lib/seam/connect/models/provider-capability.ts +1 -0
- package/src/lib/seam/connect/openapi.ts +565 -0
- package/src/lib/seam/connect/route-types.ts +9665 -71
package/package.json
CHANGED
|
@@ -19,6 +19,7 @@ import { scan_credential_action_attempt } from './scan-credential.js'
|
|
|
19
19
|
import { scan_to_assign_credential_action_attempt } from './scan-to-assign-credential.js'
|
|
20
20
|
import { set_fan_mode_action_attempt } from './set-fan-mode.js'
|
|
21
21
|
import { set_hvac_mode_action_attempt } from './set-hvac-mode.js'
|
|
22
|
+
import { set_pool_heating_action_attempt } from './set-pool-heating.js'
|
|
22
23
|
import { set_speaker_mute_action_attempt } from './set-speaker-mute.js'
|
|
23
24
|
import { set_speaker_volume_action_attempt } from './set-speaker-volume.js'
|
|
24
25
|
import { simulate_keypad_code_entry_action_attempt } from './simulate-keypad-code-entry.js'
|
|
@@ -49,6 +50,7 @@ export const action_attempt = z.union([
|
|
|
49
50
|
...play_speaker_chime_action_attempt.options,
|
|
50
51
|
...play_speaker_favorite_action_attempt.options,
|
|
51
52
|
...play_speaker_audio_clip_action_attempt.options,
|
|
53
|
+
...set_pool_heating_action_attempt.options,
|
|
52
54
|
...deprecated_action_attempts,
|
|
53
55
|
]).describe(`
|
|
54
56
|
---
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import * as z from 'zod/v3'
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
common_failed_action_attempt,
|
|
5
|
+
common_pending_action_attempt,
|
|
6
|
+
common_succeeded_action_attempt,
|
|
7
|
+
} from './common.js'
|
|
8
|
+
|
|
9
|
+
const action_type = z.literal('SET_POOL_HEATING').describe(`
|
|
10
|
+
---
|
|
11
|
+
undocumented: Unreleased.
|
|
12
|
+
---
|
|
13
|
+
Action attempt to track the status of heating pool or spa water to a set point, or turning its heating off. The attempt succeeds only once the controller reports the requested state back.
|
|
14
|
+
`)
|
|
15
|
+
|
|
16
|
+
const error = z
|
|
17
|
+
.object({
|
|
18
|
+
type: z.string().describe('Type of the error.'),
|
|
19
|
+
message: z
|
|
20
|
+
.string()
|
|
21
|
+
.describe(
|
|
22
|
+
'Detailed description of the error. Provides insights into the issue and potentially how to rectify it.',
|
|
23
|
+
),
|
|
24
|
+
})
|
|
25
|
+
.describe('Error associated with the action.')
|
|
26
|
+
|
|
27
|
+
const result = z.object({}).describe('Result of the action.')
|
|
28
|
+
|
|
29
|
+
export const set_pool_heating_action_attempt = z.discriminatedUnion('status', [
|
|
30
|
+
common_pending_action_attempt.extend({
|
|
31
|
+
action_type,
|
|
32
|
+
}).describe(`
|
|
33
|
+
---
|
|
34
|
+
undocumented: Unreleased.
|
|
35
|
+
---
|
|
36
|
+
Setting the pool heating is pending. The controller has not yet reported the requested state back.
|
|
37
|
+
`),
|
|
38
|
+
common_succeeded_action_attempt.extend({
|
|
39
|
+
action_type,
|
|
40
|
+
result,
|
|
41
|
+
}).describe(`
|
|
42
|
+
---
|
|
43
|
+
undocumented: Unreleased.
|
|
44
|
+
---
|
|
45
|
+
Setting the pool heating succeeded. The controller reported the requested state back.
|
|
46
|
+
`),
|
|
47
|
+
common_failed_action_attempt.extend({ action_type, error }).describe(`
|
|
48
|
+
---
|
|
49
|
+
undocumented: Unreleased.
|
|
50
|
+
---
|
|
51
|
+
Setting the pool heating failed.
|
|
52
|
+
`),
|
|
53
|
+
])
|
|
@@ -7,6 +7,7 @@ export const capabilities = z.enum([
|
|
|
7
7
|
'thermostat',
|
|
8
8
|
'battery',
|
|
9
9
|
'phone',
|
|
10
|
+
'pool',
|
|
10
11
|
]).describe(`
|
|
11
12
|
Collection of capabilities that the device supports when connected to Seam. **Important:** Superseded by [capability flags](https://www.seam.co/docs/capability-guides/device-and-system-capabilities#capability-flags).
|
|
12
13
|
`)
|
|
@@ -179,6 +179,30 @@ export const sensor_device_type = z
|
|
|
179
179
|
.describe('Device type for environmental sensors.')
|
|
180
180
|
|
|
181
181
|
export type SensorDeviceType = z.infer<typeof sensor_device_type>
|
|
182
|
+
export const POOL_SYSTEM_DEVICE_TYPE = {
|
|
183
|
+
HAYWARD_POOL_SYSTEM: 'hayward_pool_system',
|
|
184
|
+
} as const
|
|
185
|
+
|
|
186
|
+
export const POOL_DEVICE_TYPE = {
|
|
187
|
+
...POOL_SYSTEM_DEVICE_TYPE,
|
|
188
|
+
HAYWARD_POOL: 'hayward_pool',
|
|
189
|
+
} as const
|
|
190
|
+
|
|
191
|
+
type PoolDeviceTypeFromMapping =
|
|
192
|
+
(typeof POOL_DEVICE_TYPE)[keyof typeof POOL_DEVICE_TYPE]
|
|
193
|
+
|
|
194
|
+
export const POOL_DEVICE_TYPE_LIST = Object.values(POOL_DEVICE_TYPE)
|
|
195
|
+
|
|
196
|
+
export const pool_device_type = z.enum(
|
|
197
|
+
Object.values(POOL_DEVICE_TYPE) as [PoolDeviceTypeFromMapping],
|
|
198
|
+
).describe(`
|
|
199
|
+
---
|
|
200
|
+
undocumented: Unreleased.
|
|
201
|
+
---
|
|
202
|
+
Device type for pool controllers, pools, and spas.
|
|
203
|
+
`)
|
|
204
|
+
|
|
205
|
+
export type PoolDeviceType = z.infer<typeof pool_device_type>
|
|
182
206
|
|
|
183
207
|
export const any_device_type = z.union([
|
|
184
208
|
lock_device_type,
|
|
@@ -189,6 +213,7 @@ export const any_device_type = z.union([
|
|
|
189
213
|
camera_device_type,
|
|
190
214
|
speaker_device_type,
|
|
191
215
|
sensor_device_type,
|
|
216
|
+
pool_device_type,
|
|
192
217
|
])
|
|
193
218
|
|
|
194
219
|
export type AnyDeviceType = z.infer<typeof any_device_type>
|
|
@@ -8,6 +8,8 @@ import { capability_properties } from './capability-properties/index.js'
|
|
|
8
8
|
import { device_metadata } from './device-metadata.js'
|
|
9
9
|
import { any_device_type } from './device-type.js'
|
|
10
10
|
import { phone_specific_properties } from './phone-properties.js'
|
|
11
|
+
import { pool_fields, pool_system_fields } from './pool.js'
|
|
12
|
+
import { temperature_controller_fields } from './temperature-controller.js'
|
|
11
13
|
|
|
12
14
|
export const device_capability_flags = z
|
|
13
15
|
.object({
|
|
@@ -159,6 +161,12 @@ export const device_capability_flags = z
|
|
|
159
161
|
---
|
|
160
162
|
Indicates whether the speaker supports playing an audio clip from a URL.
|
|
161
163
|
`),
|
|
164
|
+
can_control_temperature: z.boolean().describe(`
|
|
165
|
+
---
|
|
166
|
+
undocumented: Unreleased.
|
|
167
|
+
---
|
|
168
|
+
Indicates whether the device supports controlling its primary target temperature.
|
|
169
|
+
`),
|
|
162
170
|
})
|
|
163
171
|
.partial()
|
|
164
172
|
|
|
@@ -646,6 +654,16 @@ const hub_required_for_additional_capabilities = common_device_warning.extend({
|
|
|
646
654
|
Indicates that a hub or relay must be connected to unlock additional capabilities such as remote unlock.
|
|
647
655
|
`)
|
|
648
656
|
|
|
657
|
+
const service_mode = common_device_warning.extend({
|
|
658
|
+
warning_code: z.literal('service_mode').describe(warning_code_description),
|
|
659
|
+
}).describe(`
|
|
660
|
+
---
|
|
661
|
+
variant_group_key: pools
|
|
662
|
+
undocumented: Unreleased.
|
|
663
|
+
---
|
|
664
|
+
Indicates that a technician has put the pool controller in service mode. Schedules and remote changes will not run until it is switched back.
|
|
665
|
+
`)
|
|
666
|
+
|
|
649
667
|
const provider_issue = common_device_warning.extend({
|
|
650
668
|
warning_code: z.literal('provider_issue').describe(warning_code_description),
|
|
651
669
|
}).describe(`
|
|
@@ -753,6 +771,7 @@ const device_warning = z.discriminatedUnion('warning_code', [
|
|
|
753
771
|
time_zone_mismatch,
|
|
754
772
|
two_n_device_missing_timezone,
|
|
755
773
|
hub_required_for_additional_capabilities,
|
|
774
|
+
service_mode,
|
|
756
775
|
provider_issue,
|
|
757
776
|
keynest_unsupported_locker,
|
|
758
777
|
accessory_keypad_setup_required,
|
|
@@ -791,6 +810,7 @@ export const device_warning_map = z.object({
|
|
|
791
810
|
two_n_device_missing_timezone: two_n_device_missing_timezone.optional(),
|
|
792
811
|
hub_required_for_additional_capabilities:
|
|
793
812
|
hub_required_for_additional_capabilities.optional(),
|
|
813
|
+
service_mode: service_mode.optional(),
|
|
794
814
|
provider_issue: provider_issue.optional(),
|
|
795
815
|
keynest_unsupported_locker: keynest_unsupported_locker.optional(),
|
|
796
816
|
accessory_keypad_setup_required: accessory_keypad_setup_required.optional(),
|
|
@@ -1340,6 +1360,8 @@ export const device = z
|
|
|
1340
1360
|
name: Hardware
|
|
1341
1361
|
noise_sensors:
|
|
1342
1362
|
name: Noise Sensors
|
|
1363
|
+
pools:
|
|
1364
|
+
name: Pools
|
|
1343
1365
|
phones:
|
|
1344
1366
|
name: Phones
|
|
1345
1367
|
provider_metadata:
|
|
@@ -1360,6 +1382,8 @@ export const device = z
|
|
|
1360
1382
|
name: Hardware
|
|
1361
1383
|
noise_sensors:
|
|
1362
1384
|
name: Noise Sensors
|
|
1385
|
+
pools:
|
|
1386
|
+
name: Pools
|
|
1363
1387
|
phones:
|
|
1364
1388
|
name: Phones
|
|
1365
1389
|
provider_metadata:
|
|
@@ -1389,6 +1413,7 @@ export const device = z
|
|
|
1389
1413
|
Manufacturer of the device. Represents the hardware brand, which may differ from the provider.
|
|
1390
1414
|
`),
|
|
1391
1415
|
...sensor_measurements.shape,
|
|
1416
|
+
...temperature_controller_fields.shape,
|
|
1392
1417
|
named_sensors: z
|
|
1393
1418
|
.array(named_sensor)
|
|
1394
1419
|
.describe(
|
|
@@ -1400,6 +1425,8 @@ export const device = z
|
|
|
1400
1425
|
`,
|
|
1401
1426
|
)
|
|
1402
1427
|
.optional(),
|
|
1428
|
+
...pool_fields.shape,
|
|
1429
|
+
...pool_system_fields.shape,
|
|
1403
1430
|
})
|
|
1404
1431
|
.merge(device_capability_flags).describe(`
|
|
1405
1432
|
---
|
|
@@ -1417,8 +1444,12 @@ export const device = z
|
|
|
1417
1444
|
name: Noise Sensors
|
|
1418
1445
|
sensors:
|
|
1419
1446
|
name: Sensors
|
|
1447
|
+
temperature_controllers:
|
|
1448
|
+
name: Temperature Controllers
|
|
1420
1449
|
speakers:
|
|
1421
1450
|
name: Speakers
|
|
1451
|
+
pools:
|
|
1452
|
+
name: Pools
|
|
1422
1453
|
phones:
|
|
1423
1454
|
name: Phones
|
|
1424
1455
|
provider_metadata:
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import * as z from 'zod/v3'
|
|
2
|
+
|
|
3
|
+
const pool_field_header = `
|
|
4
|
+
---
|
|
5
|
+
property_group_key: pools
|
|
6
|
+
undocumented: Unreleased.
|
|
7
|
+
---
|
|
8
|
+
`
|
|
9
|
+
|
|
10
|
+
const describePoolField = (description: string): string =>
|
|
11
|
+
`${pool_field_header} ${description}
|
|
12
|
+
`
|
|
13
|
+
|
|
14
|
+
export const pool_fields = z.object({
|
|
15
|
+
is_spa: z
|
|
16
|
+
.boolean()
|
|
17
|
+
.optional()
|
|
18
|
+
.describe(
|
|
19
|
+
describePoolField(
|
|
20
|
+
'Indicates whether the device represents spa water rather than pool water. Present only on pool and spa devices.',
|
|
21
|
+
),
|
|
22
|
+
),
|
|
23
|
+
is_water_circulating: z
|
|
24
|
+
.boolean()
|
|
25
|
+
.optional()
|
|
26
|
+
.describe(
|
|
27
|
+
describePoolField(
|
|
28
|
+
'Indicates whether the water is circulating. Temperature readings are only live while it is circulating. Omitted if the controller does not report it.',
|
|
29
|
+
),
|
|
30
|
+
),
|
|
31
|
+
})
|
|
32
|
+
|
|
33
|
+
export const pool_system_fields = z.object({
|
|
34
|
+
salt_ppm: z
|
|
35
|
+
.number()
|
|
36
|
+
.optional()
|
|
37
|
+
.describe(
|
|
38
|
+
describePoolField(
|
|
39
|
+
'Salt level reported by the chlorinator, in parts per million. Omitted if the system has no salt chlorinator.',
|
|
40
|
+
),
|
|
41
|
+
),
|
|
42
|
+
})
|
|
43
|
+
|
|
44
|
+
export type PoolFields = z.infer<typeof pool_fields>
|
|
45
|
+
export type PoolSystemFields = z.infer<typeof pool_system_fields>
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import * as z from 'zod/v3'
|
|
2
|
+
|
|
3
|
+
export const temperature_controller_mode = z
|
|
4
|
+
.enum(['heat', 'off'])
|
|
5
|
+
.describe("Operating mode of the device's primary temperature controller.")
|
|
6
|
+
|
|
7
|
+
export type TemperatureControllerMode = z.infer<
|
|
8
|
+
typeof temperature_controller_mode
|
|
9
|
+
>
|
|
10
|
+
|
|
11
|
+
export const temperature_setting = z.object({
|
|
12
|
+
controller_mode: temperature_controller_mode.describe(
|
|
13
|
+
"Operating mode requested from the device's primary temperature controller.",
|
|
14
|
+
),
|
|
15
|
+
heating_set_point_celsius: z
|
|
16
|
+
.number()
|
|
17
|
+
.optional()
|
|
18
|
+
.describe(
|
|
19
|
+
'Temperature to which the controller should heat, in °C. The controller can retain this value while it is off.',
|
|
20
|
+
),
|
|
21
|
+
heating_set_point_fahrenheit: z
|
|
22
|
+
.number()
|
|
23
|
+
.optional()
|
|
24
|
+
.describe(
|
|
25
|
+
'Temperature to which the controller should heat, in °F. The controller can retain this value while it is off.',
|
|
26
|
+
),
|
|
27
|
+
})
|
|
28
|
+
|
|
29
|
+
export type TemperatureSetting = z.infer<typeof temperature_setting>
|
|
30
|
+
|
|
31
|
+
const temperature_controller_field_header = `
|
|
32
|
+
---
|
|
33
|
+
property_group_key: temperature_controllers
|
|
34
|
+
undocumented: Unreleased.
|
|
35
|
+
---
|
|
36
|
+
`
|
|
37
|
+
|
|
38
|
+
const describeTemperatureControllerField = (description: string): string =>
|
|
39
|
+
`${temperature_controller_field_header} ${description}
|
|
40
|
+
`
|
|
41
|
+
|
|
42
|
+
export const temperature_controller_fields = z.object({
|
|
43
|
+
temperature_setting: temperature_setting
|
|
44
|
+
.optional()
|
|
45
|
+
.describe(
|
|
46
|
+
describeTemperatureControllerField(
|
|
47
|
+
"Current setting of the device's primary temperature controller.",
|
|
48
|
+
),
|
|
49
|
+
),
|
|
50
|
+
})
|
|
@@ -7,6 +7,7 @@ export const provider_capability = z.enum([
|
|
|
7
7
|
'access_control',
|
|
8
8
|
'camera',
|
|
9
9
|
'speaker',
|
|
10
|
+
'pool',
|
|
10
11
|
]).describe(`
|
|
11
12
|
High-level device capabilities that can be restricted in connect webviews.
|
|
12
13
|
These represent the main device categories that customers can opt into.
|