@seamapi/types 1.1209.2 → 1.1211.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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "@seamapi/types",
4
- "version": "1.1209.2",
4
+ "version": "1.1211.0",
5
5
  "description": "TypeScript types for the Seam API.",
6
6
  "type": "module",
7
7
  "main": "index.js",
@@ -1,6 +1,7 @@
1
1
  import * as z from 'zod/v3'
2
2
 
3
3
  import { custom_metadata } from '../custom-metadata.js'
4
+ import { temperature_controller_mode } from '../devices/temperature-controller.js'
4
5
  import { climate_setting } from '../thermostats/climate-preset.js'
5
6
  import {
6
7
  common_event,
@@ -62,7 +63,12 @@ const accessory_keypad_battery_level = z
62
63
  )
63
64
 
64
65
  const disconnection_error_code = z
65
- .enum(['account_disconnected', 'hub_disconnected', 'device_disconnected'])
66
+ .enum([
67
+ 'account_disconnected',
68
+ 'hub_disconnected',
69
+ 'device_disconnected',
70
+ 'bridge_disconnected',
71
+ ])
66
72
  .describe('Error code associated with the disconnection event, if any.')
67
73
 
68
74
  const device_event_issue_properties = {
@@ -855,6 +861,102 @@ export const temperature_changed_event = device_event.extend({
855
861
 
856
862
  export type TemperatureChangedEvent = z.infer<typeof temperature_changed_event>
857
863
 
864
+ export const pool_temperature_changed_event = device_event.extend({
865
+ event_type: z.literal('pool.temperature_changed'),
866
+ temperature_celsius: z
867
+ .number()
868
+ .describe(
869
+ 'Water temperature, in °C, reported by the affected pool or spa.',
870
+ ),
871
+ temperature_fahrenheit: z
872
+ .number()
873
+ .describe(
874
+ 'Water temperature, in °F, reported by the affected pool or spa.',
875
+ ),
876
+ }).describe(`
877
+ ---
878
+ route_path: /pools
879
+ undocumented: Unreleased.
880
+ ---
881
+ The water temperature of a pool or spa changed by at least 1 °C. Seam reports water temperature only while the water is circulating.
882
+ `)
883
+
884
+ export type PoolTemperatureChangedEvent = z.infer<
885
+ typeof pool_temperature_changed_event
886
+ >
887
+
888
+ export const pool_temperature_reached_set_point_event = device_event.extend({
889
+ event_type: z.literal('pool.temperature_reached_set_point'),
890
+ temperature_celsius: z
891
+ .number()
892
+ .describe(
893
+ 'Water temperature, in °C, reported by the affected pool or spa.',
894
+ ),
895
+ temperature_fahrenheit: z
896
+ .number()
897
+ .describe(
898
+ 'Water temperature, in °F, reported by the affected pool or spa.',
899
+ ),
900
+ desired_temperature_celsius: z
901
+ .number()
902
+ .describe(
903
+ 'Desired water temperature, in °C, defined by the heating set point of the affected pool or spa.',
904
+ ),
905
+ desired_temperature_fahrenheit: z
906
+ .number()
907
+ .describe(
908
+ 'Desired water temperature, in °F, defined by the heating set point of the affected pool or spa.',
909
+ ),
910
+ }).describe(`
911
+ ---
912
+ route_path: /pools
913
+ undocumented: Unreleased.
914
+ ---
915
+ A heated pool or spa reached its heating set point: heating is on and the water temperature is within 1 °C of the set point or above it. Fires again only after the water falls more than 1 °C below the set point or heating is turned off.
916
+ `)
917
+
918
+ export type PoolTemperatureReachedSetPointEvent = z.infer<
919
+ typeof pool_temperature_reached_set_point_event
920
+ >
921
+
922
+ export const pool_manually_adjusted_method = z
923
+ .enum(['seam', 'external'])
924
+ .describe(
925
+ "Method used to adjust the affected pool or spa. `seam` indicates that the Seam API, Seam CLI, or Seam Console was used. `external` indicates a change made outside Seam, such as in the manufacturer's app or on the controller panel.",
926
+ )
927
+
928
+ export const pool_manually_adjusted_event = device_event.extend({
929
+ event_type: z.literal('pool.manually_adjusted'),
930
+ method: pool_manually_adjusted_method,
931
+ controller_mode: temperature_controller_mode
932
+ .optional()
933
+ .describe(
934
+ 'New heating mode of the affected pool or spa. Present only if the mode changed.',
935
+ ),
936
+ heating_set_point_celsius: z
937
+ .number()
938
+ .optional()
939
+ .describe(
940
+ 'New heating set point, in °C, of the affected pool or spa. Present only if the set point changed.',
941
+ ),
942
+ heating_set_point_fahrenheit: z
943
+ .number()
944
+ .optional()
945
+ .describe(
946
+ 'New heating set point, in °F, of the affected pool or spa. Present only if the set point changed.',
947
+ ),
948
+ }).describe(`
949
+ ---
950
+ route_path: /pools
951
+ undocumented: Unreleased.
952
+ ---
953
+ The heating mode or heating set point of a pool or spa changed.
954
+ `)
955
+
956
+ export type PoolManuallyAdjustedEvent = z.infer<
957
+ typeof pool_manually_adjusted_event
958
+ >
959
+
858
960
  export const device_name_changed_event = device_event.extend({
859
961
  event_type: z.literal('device.name_changed'),
860
962
  device_name: z.string().describe('The new name of the affected device.'),
@@ -969,6 +1071,9 @@ export const device_events = [
969
1071
  temperature_threshold_no_longer_exceeded_event,
970
1072
  temperature_reached_set_point_event,
971
1073
  temperature_changed_event,
1074
+ pool_temperature_changed_event,
1075
+ pool_temperature_reached_set_point_event,
1076
+ pool_manually_adjusted_event,
972
1077
  device_name_changed_event,
973
1078
  camera_activated_event,
974
1079
  device_doorbell_rang_event,
@@ -29186,6 +29186,7 @@ const openapi: OpenAPISpec = {
29186
29186
  'account_disconnected',
29187
29187
  'hub_disconnected',
29188
29188
  'device_disconnected',
29189
+ 'bridge_disconnected',
29189
29190
  ],
29190
29191
  type: 'string',
29191
29192
  },
@@ -29388,6 +29389,7 @@ const openapi: OpenAPISpec = {
29388
29389
  'account_disconnected',
29389
29390
  'hub_disconnected',
29390
29391
  'device_disconnected',
29392
+ 'bridge_disconnected',
29391
29393
  ],
29392
29394
  type: 'string',
29393
29395
  },
@@ -32415,6 +32417,307 @@ const openapi: OpenAPISpec = {
32415
32417
  type: 'object',
32416
32418
  'x-route-path': '/thermostats',
32417
32419
  },
32420
+ {
32421
+ description:
32422
+ 'The water temperature of a pool or spa changed by at least 1 °C. Seam reports water temperature only while the water is circulating.',
32423
+ properties: {
32424
+ connected_account_custom_metadata: {
32425
+ additionalProperties: {
32426
+ oneOf: [{ type: 'string' }, { type: 'boolean' }],
32427
+ },
32428
+ description:
32429
+ 'Custom metadata of the connected account, present when connected_account_id is provided.',
32430
+ type: 'object',
32431
+ },
32432
+ connected_account_id: {
32433
+ description:
32434
+ 'ID of the connected account associated with the event.',
32435
+ format: 'uuid',
32436
+ type: 'string',
32437
+ },
32438
+ created_at: {
32439
+ description: 'Date and time at which the event was created.',
32440
+ format: 'date-time',
32441
+ type: 'string',
32442
+ },
32443
+ customer_key: {
32444
+ description:
32445
+ 'The customer key associated with the device, if any.',
32446
+ type: 'string',
32447
+ },
32448
+ device_custom_metadata: {
32449
+ additionalProperties: {
32450
+ oneOf: [{ type: 'string' }, { type: 'boolean' }],
32451
+ },
32452
+ description:
32453
+ 'Custom metadata of the device, present when device_id is provided.',
32454
+ type: 'object',
32455
+ },
32456
+ device_id: {
32457
+ description: 'ID of the affected device.',
32458
+ format: 'uuid',
32459
+ type: 'string',
32460
+ },
32461
+ event_description: {
32462
+ description:
32463
+ 'Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event.',
32464
+ type: 'string',
32465
+ },
32466
+ event_id: {
32467
+ description: 'ID of the event.',
32468
+ format: 'uuid',
32469
+ type: 'string',
32470
+ },
32471
+ event_type: {
32472
+ enum: ['pool.temperature_changed'],
32473
+ type: 'string',
32474
+ },
32475
+ occurred_at: {
32476
+ description: 'Date and time at which the event occurred.',
32477
+ format: 'date-time',
32478
+ type: 'string',
32479
+ },
32480
+ temperature_celsius: {
32481
+ description:
32482
+ 'Water temperature, in °C, reported by the affected pool or spa.',
32483
+ format: 'float',
32484
+ type: 'number',
32485
+ },
32486
+ temperature_fahrenheit: {
32487
+ description:
32488
+ 'Water temperature, in °F, reported by the affected pool or spa.',
32489
+ format: 'float',
32490
+ type: 'number',
32491
+ },
32492
+ workspace_id: {
32493
+ description: 'ID of the workspace associated with the event.',
32494
+ format: 'uuid',
32495
+ type: 'string',
32496
+ },
32497
+ },
32498
+ required: [
32499
+ 'event_id',
32500
+ 'workspace_id',
32501
+ 'created_at',
32502
+ 'occurred_at',
32503
+ 'device_id',
32504
+ 'connected_account_id',
32505
+ 'event_type',
32506
+ 'temperature_celsius',
32507
+ 'temperature_fahrenheit',
32508
+ ],
32509
+ type: 'object',
32510
+ 'x-route-path': '/pools',
32511
+ 'x-undocumented': 'Unreleased.',
32512
+ },
32513
+ {
32514
+ description:
32515
+ 'A heated pool or spa reached its heating set point: heating is on and the water temperature is within 1 °C of the set point or above it. Fires again only after the water falls more than 1 °C below the set point or heating is turned off.',
32516
+ properties: {
32517
+ connected_account_custom_metadata: {
32518
+ additionalProperties: {
32519
+ oneOf: [{ type: 'string' }, { type: 'boolean' }],
32520
+ },
32521
+ description:
32522
+ 'Custom metadata of the connected account, present when connected_account_id is provided.',
32523
+ type: 'object',
32524
+ },
32525
+ connected_account_id: {
32526
+ description:
32527
+ 'ID of the connected account associated with the event.',
32528
+ format: 'uuid',
32529
+ type: 'string',
32530
+ },
32531
+ created_at: {
32532
+ description: 'Date and time at which the event was created.',
32533
+ format: 'date-time',
32534
+ type: 'string',
32535
+ },
32536
+ customer_key: {
32537
+ description:
32538
+ 'The customer key associated with the device, if any.',
32539
+ type: 'string',
32540
+ },
32541
+ desired_temperature_celsius: {
32542
+ description:
32543
+ 'Desired water temperature, in °C, defined by the heating set point of the affected pool or spa.',
32544
+ format: 'float',
32545
+ type: 'number',
32546
+ },
32547
+ desired_temperature_fahrenheit: {
32548
+ description:
32549
+ 'Desired water temperature, in °F, defined by the heating set point of the affected pool or spa.',
32550
+ format: 'float',
32551
+ type: 'number',
32552
+ },
32553
+ device_custom_metadata: {
32554
+ additionalProperties: {
32555
+ oneOf: [{ type: 'string' }, { type: 'boolean' }],
32556
+ },
32557
+ description:
32558
+ 'Custom metadata of the device, present when device_id is provided.',
32559
+ type: 'object',
32560
+ },
32561
+ device_id: {
32562
+ description: 'ID of the affected device.',
32563
+ format: 'uuid',
32564
+ type: 'string',
32565
+ },
32566
+ event_description: {
32567
+ description:
32568
+ 'Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event.',
32569
+ type: 'string',
32570
+ },
32571
+ event_id: {
32572
+ description: 'ID of the event.',
32573
+ format: 'uuid',
32574
+ type: 'string',
32575
+ },
32576
+ event_type: {
32577
+ enum: ['pool.temperature_reached_set_point'],
32578
+ type: 'string',
32579
+ },
32580
+ occurred_at: {
32581
+ description: 'Date and time at which the event occurred.',
32582
+ format: 'date-time',
32583
+ type: 'string',
32584
+ },
32585
+ temperature_celsius: {
32586
+ description:
32587
+ 'Water temperature, in °C, reported by the affected pool or spa.',
32588
+ format: 'float',
32589
+ type: 'number',
32590
+ },
32591
+ temperature_fahrenheit: {
32592
+ description:
32593
+ 'Water temperature, in °F, reported by the affected pool or spa.',
32594
+ format: 'float',
32595
+ type: 'number',
32596
+ },
32597
+ workspace_id: {
32598
+ description: 'ID of the workspace associated with the event.',
32599
+ format: 'uuid',
32600
+ type: 'string',
32601
+ },
32602
+ },
32603
+ required: [
32604
+ 'event_id',
32605
+ 'workspace_id',
32606
+ 'created_at',
32607
+ 'occurred_at',
32608
+ 'device_id',
32609
+ 'connected_account_id',
32610
+ 'event_type',
32611
+ 'temperature_celsius',
32612
+ 'temperature_fahrenheit',
32613
+ 'desired_temperature_celsius',
32614
+ 'desired_temperature_fahrenheit',
32615
+ ],
32616
+ type: 'object',
32617
+ 'x-route-path': '/pools',
32618
+ 'x-undocumented': 'Unreleased.',
32619
+ },
32620
+ {
32621
+ description:
32622
+ 'The heating mode or heating set point of a pool or spa changed.',
32623
+ properties: {
32624
+ connected_account_custom_metadata: {
32625
+ additionalProperties: {
32626
+ oneOf: [{ type: 'string' }, { type: 'boolean' }],
32627
+ },
32628
+ description:
32629
+ 'Custom metadata of the connected account, present when connected_account_id is provided.',
32630
+ type: 'object',
32631
+ },
32632
+ connected_account_id: {
32633
+ description:
32634
+ 'ID of the connected account associated with the event.',
32635
+ format: 'uuid',
32636
+ type: 'string',
32637
+ },
32638
+ controller_mode: {
32639
+ description:
32640
+ 'New heating mode of the affected pool or spa. Present only if the mode changed.',
32641
+ enum: ['heat', 'off'],
32642
+ type: 'string',
32643
+ },
32644
+ created_at: {
32645
+ description: 'Date and time at which the event was created.',
32646
+ format: 'date-time',
32647
+ type: 'string',
32648
+ },
32649
+ customer_key: {
32650
+ description:
32651
+ 'The customer key associated with the device, if any.',
32652
+ type: 'string',
32653
+ },
32654
+ device_custom_metadata: {
32655
+ additionalProperties: {
32656
+ oneOf: [{ type: 'string' }, { type: 'boolean' }],
32657
+ },
32658
+ description:
32659
+ 'Custom metadata of the device, present when device_id is provided.',
32660
+ type: 'object',
32661
+ },
32662
+ device_id: {
32663
+ description: 'ID of the affected device.',
32664
+ format: 'uuid',
32665
+ type: 'string',
32666
+ },
32667
+ event_description: {
32668
+ description:
32669
+ 'Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event.',
32670
+ type: 'string',
32671
+ },
32672
+ event_id: {
32673
+ description: 'ID of the event.',
32674
+ format: 'uuid',
32675
+ type: 'string',
32676
+ },
32677
+ event_type: { enum: ['pool.manually_adjusted'], type: 'string' },
32678
+ heating_set_point_celsius: {
32679
+ description:
32680
+ 'New heating set point, in °C, of the affected pool or spa. Present only if the set point changed.',
32681
+ format: 'float',
32682
+ type: 'number',
32683
+ },
32684
+ heating_set_point_fahrenheit: {
32685
+ description:
32686
+ 'New heating set point, in °F, of the affected pool or spa. Present only if the set point changed.',
32687
+ format: 'float',
32688
+ type: 'number',
32689
+ },
32690
+ method: {
32691
+ description:
32692
+ "Method used to adjust the affected pool or spa. `seam` indicates that the Seam API, Seam CLI, or Seam Console was used. `external` indicates a change made outside Seam, such as in the manufacturer's app or on the controller panel.",
32693
+ enum: ['seam', 'external'],
32694
+ type: 'string',
32695
+ },
32696
+ occurred_at: {
32697
+ description: 'Date and time at which the event occurred.',
32698
+ format: 'date-time',
32699
+ type: 'string',
32700
+ },
32701
+ workspace_id: {
32702
+ description: 'ID of the workspace associated with the event.',
32703
+ format: 'uuid',
32704
+ type: 'string',
32705
+ },
32706
+ },
32707
+ required: [
32708
+ 'event_id',
32709
+ 'workspace_id',
32710
+ 'created_at',
32711
+ 'occurred_at',
32712
+ 'device_id',
32713
+ 'connected_account_id',
32714
+ 'event_type',
32715
+ 'method',
32716
+ ],
32717
+ type: 'object',
32718
+ 'x-route-path': '/pools',
32719
+ 'x-undocumented': 'Unreleased.',
32720
+ },
32418
32721
  {
32419
32722
  description: 'The name of a device was changed.',
32420
32723
  properties: {
@@ -60347,6 +60650,9 @@ const openapi: OpenAPISpec = {
60347
60650
  'thermostat.temperature_threshold_no_longer_exceeded',
60348
60651
  'thermostat.temperature_reached_set_point',
60349
60652
  'thermostat.temperature_changed',
60653
+ 'pool.temperature_changed',
60654
+ 'pool.temperature_reached_set_point',
60655
+ 'pool.manually_adjusted',
60350
60656
  'device.name_changed',
60351
60657
  'camera.activated',
60352
60658
  'device.doorbell_rang',
@@ -60475,6 +60781,9 @@ const openapi: OpenAPISpec = {
60475
60781
  'thermostat.temperature_threshold_no_longer_exceeded',
60476
60782
  'thermostat.temperature_reached_set_point',
60477
60783
  'thermostat.temperature_changed',
60784
+ 'pool.temperature_changed',
60785
+ 'pool.temperature_reached_set_point',
60786
+ 'pool.manually_adjusted',
60478
60787
  'device.name_changed',
60479
60788
  'camera.activated',
60480
60789
  'device.doorbell_rang',
@@ -72658,6 +72967,9 @@ const openapi: OpenAPISpec = {
72658
72967
  'thermostat.temperature_threshold_no_longer_exceeded',
72659
72968
  'thermostat.temperature_reached_set_point',
72660
72969
  'thermostat.temperature_changed',
72970
+ 'pool.temperature_changed',
72971
+ 'pool.temperature_reached_set_point',
72972
+ 'pool.manually_adjusted',
72661
72973
  'device.name_changed',
72662
72974
  'camera.activated',
72663
72975
  'device.doorbell_rang',
@@ -72787,6 +73099,9 @@ const openapi: OpenAPISpec = {
72787
73099
  'thermostat.temperature_threshold_no_longer_exceeded',
72788
73100
  'thermostat.temperature_reached_set_point',
72789
73101
  'thermostat.temperature_changed',
73102
+ 'pool.temperature_changed',
73103
+ 'pool.temperature_reached_set_point',
73104
+ 'pool.manually_adjusted',
72790
73105
  'device.name_changed',
72791
73106
  'camera.activated',
72792
73107
  'device.doorbell_rang',
@@ -76495,6 +76810,9 @@ const openapi: OpenAPISpec = {
76495
76810
  'thermostat.temperature_threshold_no_longer_exceeded',
76496
76811
  'thermostat.temperature_reached_set_point',
76497
76812
  'thermostat.temperature_changed',
76813
+ 'pool.temperature_changed',
76814
+ 'pool.temperature_reached_set_point',
76815
+ 'pool.manually_adjusted',
76498
76816
  'device.name_changed',
76499
76817
  'camera.activated',
76500
76818
  'device.doorbell_rang',
@@ -76709,6 +77027,9 @@ const openapi: OpenAPISpec = {
76709
77027
  'thermostat.temperature_threshold_no_longer_exceeded',
76710
77028
  'thermostat.temperature_reached_set_point',
76711
77029
  'thermostat.temperature_changed',
77030
+ 'pool.temperature_changed',
77031
+ 'pool.temperature_reached_set_point',
77032
+ 'pool.manually_adjusted',
76712
77033
  'device.name_changed',
76713
77034
  'camera.activated',
76714
77035
  'device.doorbell_rang',