@seamapi/types 1.1188.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.
Files changed (55) hide show
  1. package/lib/seam/connect/models/action-attempts/action-attempt.d.ts +75 -0
  2. package/lib/seam/connect/models/action-attempts/action-attempt.js +2 -0
  3. package/lib/seam/connect/models/action-attempts/action-attempt.js.map +1 -1
  4. package/lib/seam/connect/models/action-attempts/set-pool-heating.d.ts +77 -0
  5. package/lib/seam/connect/models/action-attempts/set-pool-heating.js +43 -0
  6. package/lib/seam/connect/models/action-attempts/set-pool-heating.js.map +1 -0
  7. package/lib/seam/connect/models/connect-webviews/connect-webview.d.ts +3 -3
  8. package/lib/seam/connect/models/connected-accounts/connected-account.d.ts +3 -3
  9. package/lib/seam/connect/models/devices/capabilities-supported.d.ts +1 -1
  10. package/lib/seam/connect/models/devices/capabilities-supported.js +1 -0
  11. package/lib/seam/connect/models/devices/capabilities-supported.js.map +1 -1
  12. package/lib/seam/connect/models/devices/device-provider.d.ts +3 -0
  13. package/lib/seam/connect/models/devices/device-provider.js +1 -0
  14. package/lib/seam/connect/models/devices/device-provider.js.map +1 -1
  15. package/lib/seam/connect/models/devices/device-type.d.ts +12 -1
  16. package/lib/seam/connect/models/devices/device-type.js +15 -0
  17. package/lib/seam/connect/models/devices/device-type.js.map +1 -1
  18. package/lib/seam/connect/models/devices/device.d.ts +206 -101
  19. package/lib/seam/connect/models/devices/device.js +46 -1
  20. package/lib/seam/connect/models/devices/device.js.map +1 -1
  21. package/lib/seam/connect/models/devices/index.d.ts +2 -0
  22. package/lib/seam/connect/models/devices/index.js +2 -0
  23. package/lib/seam/connect/models/devices/index.js.map +1 -1
  24. package/lib/seam/connect/models/devices/phone.d.ts +21 -0
  25. package/lib/seam/connect/models/devices/pool.d.ts +20 -0
  26. package/lib/seam/connect/models/devices/pool.js +26 -0
  27. package/lib/seam/connect/models/devices/pool.js.map +1 -0
  28. package/lib/seam/connect/models/devices/temperature-controller.d.ts +44 -0
  29. package/lib/seam/connect/models/devices/temperature-controller.js +29 -0
  30. package/lib/seam/connect/models/devices/temperature-controller.js.map +1 -0
  31. package/lib/seam/connect/models/devices/unmanaged-device.d.ts +119 -70
  32. package/lib/seam/connect/models/devices/unmanaged-device.js +5 -2
  33. package/lib/seam/connect/models/devices/unmanaged-device.js.map +1 -1
  34. package/lib/seam/connect/models/provider-capability.d.ts +1 -1
  35. package/lib/seam/connect/models/provider-capability.js +1 -0
  36. package/lib/seam/connect/models/provider-capability.js.map +1 -1
  37. package/lib/seam/connect/openapi.js +536 -2
  38. package/lib/seam/connect/openapi.js.map +1 -1
  39. package/lib/seam/connect/route-types.d.ts +9160 -899
  40. package/package.json +1 -1
  41. package/src/lib/seam/connect/internal/enums.ts +2 -0
  42. package/src/lib/seam/connect/internal/schemas.ts +1 -0
  43. package/src/lib/seam/connect/models/action-attempts/action-attempt.ts +2 -0
  44. package/src/lib/seam/connect/models/action-attempts/set-pool-heating.ts +53 -0
  45. package/src/lib/seam/connect/models/devices/capabilities-supported.ts +1 -0
  46. package/src/lib/seam/connect/models/devices/device-provider.ts +1 -0
  47. package/src/lib/seam/connect/models/devices/device-type.ts +25 -0
  48. package/src/lib/seam/connect/models/devices/device.ts +52 -2
  49. package/src/lib/seam/connect/models/devices/index.ts +2 -0
  50. package/src/lib/seam/connect/models/devices/pool.ts +45 -0
  51. package/src/lib/seam/connect/models/devices/temperature-controller.ts +50 -0
  52. package/src/lib/seam/connect/models/devices/unmanaged-device.ts +21 -14
  53. package/src/lib/seam/connect/models/provider-capability.ts +1 -0
  54. package/src/lib/seam/connect/openapi.ts +585 -2
  55. package/src/lib/seam/connect/route-types.ts +36423 -26133
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seamapi/types",
3
- "version": "1.1188.0",
3
+ "version": "1.1190.0",
4
4
  "description": "TypeScript types for the Seam API.",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -5,6 +5,8 @@ export {
5
5
  NOISE_SENSOR_DEVICE_TYPE,
6
6
  NOISE_SENSOR_DEVICE_TYPE_LIST,
7
7
  PHONE_DEVICE_TYPE,
8
+ POOL_DEVICE_TYPE,
9
+ POOL_DEVICE_TYPE_LIST,
8
10
  PROVIDER_CATEGORIES,
9
11
  PUBLIC_PROVIDER_CATEGORIES,
10
12
  SPEAKER_DEVICE_TYPE,
@@ -75,6 +75,7 @@ export {
75
75
  phone_number,
76
76
  phone_registration,
77
77
  phone_session,
78
+ pool_device_type,
78
79
  portal_configuration,
79
80
  property_resource,
80
81
  provider_capability,
@@ -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
  `)
@@ -250,5 +250,6 @@ export const PROVIDER_CATEGORY_CAPABILITY_MAP: Record<
250
250
  'access_control',
251
251
  'camera',
252
252
  'speaker',
253
+ 'pool',
253
254
  ],
254
255
  }
@@ -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(),
@@ -1239,10 +1259,25 @@ export const device = z
1239
1259
  capabilities_supported: z.array(capabilities).describe(`
1240
1260
  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://www.seam.co/docs/capability-guides/device-and-system-capabilities#capability-flags).
1241
1261
  `),
1262
+ is_online: z.boolean().describe(`
1263
+ ---
1264
+ undocumented: Unreleased.
1265
+ property_group_key: hardware
1266
+ ---
1267
+ Indicates whether the device is online.
1268
+ `),
1269
+ is_door_locked: z.boolean().optional().describe(`
1270
+ ---
1271
+ undocumented: Unreleased.
1272
+ property_group_key: locks
1273
+ ---
1274
+ Indicates whether the lock is locked.
1275
+ `),
1242
1276
  properties: common_device_properties
1243
1277
  .and(phone_specific_properties.partial())
1244
1278
  .and(device_metadata)
1245
- .and(capability_properties).describe(`
1279
+ .and(capability_properties)
1280
+ .optional().describe(`
1246
1281
  ---
1247
1282
  property_groups:
1248
1283
  locks:
@@ -1325,6 +1360,8 @@ export const device = z
1325
1360
  name: Hardware
1326
1361
  noise_sensors:
1327
1362
  name: Noise Sensors
1363
+ pools:
1364
+ name: Pools
1328
1365
  phones:
1329
1366
  name: Phones
1330
1367
  provider_metadata:
@@ -1345,6 +1382,8 @@ export const device = z
1345
1382
  name: Hardware
1346
1383
  noise_sensors:
1347
1384
  name: Noise Sensors
1385
+ pools:
1386
+ name: Pools
1348
1387
  phones:
1349
1388
  name: Phones
1350
1389
  provider_metadata:
@@ -1374,6 +1413,7 @@ export const device = z
1374
1413
  Manufacturer of the device. Represents the hardware brand, which may differ from the provider.
1375
1414
  `),
1376
1415
  ...sensor_measurements.shape,
1416
+ ...temperature_controller_fields.shape,
1377
1417
  named_sensors: z
1378
1418
  .array(named_sensor)
1379
1419
  .describe(
@@ -1385,6 +1425,8 @@ export const device = z
1385
1425
  `,
1386
1426
  )
1387
1427
  .optional(),
1428
+ ...pool_fields.shape,
1429
+ ...pool_system_fields.shape,
1388
1430
  })
1389
1431
  .merge(device_capability_flags).describe(`
1390
1432
  ---
@@ -1402,8 +1444,12 @@ export const device = z
1402
1444
  name: Noise Sensors
1403
1445
  sensors:
1404
1446
  name: Sensors
1447
+ temperature_controllers:
1448
+ name: Temperature Controllers
1405
1449
  speakers:
1406
1450
  name: Speakers
1451
+ pools:
1452
+ name: Pools
1407
1453
  phones:
1408
1454
  name: Phones
1409
1455
  provider_metadata:
@@ -1412,4 +1458,8 @@ export const device = z
1412
1458
  Represents a [device](https://www.seam.co/docs/core-concepts/devices) that has been connected to Seam.
1413
1459
  `)
1414
1460
 
1415
- export type Device = z.infer<typeof device>
1461
+ type DeviceFromSchema = z.infer<typeof device>
1462
+
1463
+ export type Device = Omit<DeviceFromSchema, 'properties'> & {
1464
+ properties: NonNullable<DeviceFromSchema['properties']>
1465
+ }
@@ -5,4 +5,6 @@ export * from './device-metadata.js'
5
5
  export * from './device-provider.js'
6
6
  export * from './device-type.js'
7
7
  export * from './phone.js'
8
+ export * from './pool.js'
9
+ export * from './temperature-controller.js'
8
10
  export * from './unmanaged-device.js'
@@ -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
+ })
@@ -19,24 +19,27 @@ export const unmanaged_device = device
19
19
  created_at: true,
20
20
  custom_metadata: true,
21
21
  display_name: true,
22
+ is_online: true,
22
23
  })
23
24
  .extend({
24
25
  is_managed: z
25
26
  .literal(false)
26
27
  .describe('Indicates that Seam does not manage the device.'),
27
- properties: common_device_properties.pick({
28
- accessory_keypad: true,
29
- name: true,
30
- online: true,
31
- manufacturer: true,
32
- image_url: true,
33
- image_alt_text: true,
34
- battery_level: true,
35
- battery: true,
36
- online_access_codes_enabled: true,
37
- offline_access_codes_enabled: true,
38
- model: true,
39
- }).describe(`
28
+ properties: common_device_properties
29
+ .pick({
30
+ accessory_keypad: true,
31
+ name: true,
32
+ online: true,
33
+ manufacturer: true,
34
+ image_url: true,
35
+ image_alt_text: true,
36
+ battery_level: true,
37
+ battery: true,
38
+ online_access_codes_enabled: true,
39
+ offline_access_codes_enabled: true,
40
+ model: true,
41
+ })
42
+ .optional().describe(`
40
43
  ---
41
44
  property_groups:
42
45
  locks:
@@ -79,4 +82,8 @@ export const unmanaged_device = device
79
82
  Represents an [unmanaged device](https://www.seam.co/docs/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://www.seam.co/docs/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://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices#convert-an-unmanaged-device-to-managed).
80
83
  `)
81
84
 
82
- export type UnmanagedDevice = z.infer<typeof unmanaged_device>
85
+ type UnmanagedDeviceFromSchema = z.infer<typeof unmanaged_device>
86
+
87
+ export type UnmanagedDevice = Omit<UnmanagedDeviceFromSchema, 'properties'> & {
88
+ properties: NonNullable<UnmanagedDeviceFromSchema['properties']>
89
+ }
@@ -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.