@seamapi/types 1.324.0 → 1.326.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/dist/connect.cjs +1078 -52
- package/dist/connect.cjs.map +1 -1
- package/dist/connect.d.cts +3242 -217
- package/lib/seam/connect/models/access-codes/managed-access-code.d.ts +257 -5
- package/lib/seam/connect/models/access-codes/unmanaged-access-code.d.ts +257 -5
- package/lib/seam/connect/models/acs/acs-system.d.ts +10 -10
- package/lib/seam/connect/models/devices/device.d.ts +419 -11
- package/lib/seam/connect/models/devices/device.js +103 -3
- package/lib/seam/connect/models/devices/device.js.map +1 -1
- package/lib/seam/connect/models/devices/phone.d.ts +258 -6
- package/lib/seam/connect/models/devices/unmanaged-device.d.ts +258 -6
- package/lib/seam/connect/models/events/devices.d.ts +78 -0
- package/lib/seam/connect/models/events/devices.js +18 -0
- package/lib/seam/connect/models/events/devices.js.map +1 -1
- package/lib/seam/connect/models/events/seam-event.d.ts +38 -0
- package/lib/seam/connect/openapi.d.ts +272 -79
- package/lib/seam/connect/openapi.js +997 -35
- package/lib/seam/connect/openapi.js.map +1 -1
- package/lib/seam/connect/route-types.d.ts +1677 -47
- package/package.json +1 -1
- package/src/lib/seam/connect/models/devices/device.ts +118 -3
- package/src/lib/seam/connect/models/events/devices.ts +27 -0
- package/src/lib/seam/connect/openapi.ts +1095 -59
- package/src/lib/seam/connect/route-types.ts +2128 -130
package/package.json
CHANGED
|
@@ -26,13 +26,128 @@ const common_device_error = z.object({
|
|
|
26
26
|
is_device_error: z.literal(true),
|
|
27
27
|
})
|
|
28
28
|
|
|
29
|
+
const error_code_description =
|
|
30
|
+
'Unique identifier of the type of error. Enables quick recognition and categorization of the issue.'
|
|
31
|
+
|
|
29
32
|
const common_device_warning = z.object({
|
|
30
33
|
message: z.string(),
|
|
31
34
|
})
|
|
32
35
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
+
const device_offline = common_device_error
|
|
37
|
+
.extend({
|
|
38
|
+
error_code: z.literal('device_offline').describe(error_code_description),
|
|
39
|
+
})
|
|
40
|
+
.describe('Device is offline')
|
|
41
|
+
|
|
42
|
+
const device_removed = common_device_error
|
|
43
|
+
.extend({
|
|
44
|
+
error_code: z.literal('device_removed').describe(error_code_description),
|
|
45
|
+
})
|
|
46
|
+
.describe('Device has been removed')
|
|
47
|
+
|
|
48
|
+
const account_disconnected = common_device_error
|
|
49
|
+
.extend({
|
|
50
|
+
error_code: z
|
|
51
|
+
.literal('account_disconnected')
|
|
52
|
+
.describe(error_code_description),
|
|
53
|
+
})
|
|
54
|
+
.describe('Account is disconnected')
|
|
55
|
+
|
|
56
|
+
const hub_disconnected = common_device_error
|
|
57
|
+
.extend({
|
|
58
|
+
error_code: z.literal('hub_disconnected').describe(error_code_description),
|
|
59
|
+
})
|
|
60
|
+
.describe('Hub is disconnected')
|
|
61
|
+
|
|
62
|
+
const device_disconnected = common_device_error
|
|
63
|
+
.extend({
|
|
64
|
+
error_code: z
|
|
65
|
+
.literal('device_disconnected')
|
|
66
|
+
.describe(error_code_description),
|
|
67
|
+
})
|
|
68
|
+
.describe('Device is disconnected')
|
|
69
|
+
|
|
70
|
+
const empty_backup_access_code_pool = common_device_error
|
|
71
|
+
.extend({
|
|
72
|
+
error_code: z
|
|
73
|
+
.literal('empty_backup_access_code_pool')
|
|
74
|
+
.describe(error_code_description),
|
|
75
|
+
})
|
|
76
|
+
.describe('The backup access code pool is empty.')
|
|
77
|
+
|
|
78
|
+
const august_lock_not_authorized = common_device_error
|
|
79
|
+
.extend({
|
|
80
|
+
error_code: z
|
|
81
|
+
.literal('august_lock_not_authorized')
|
|
82
|
+
.describe(error_code_description),
|
|
83
|
+
})
|
|
84
|
+
.describe('User is not authorized to use the August Lock.')
|
|
85
|
+
|
|
86
|
+
const august_lock_missing_bridge = common_device_error
|
|
87
|
+
.extend({
|
|
88
|
+
error_code: z
|
|
89
|
+
.literal('august_lock_missing_bridge')
|
|
90
|
+
.describe(error_code_description),
|
|
91
|
+
})
|
|
92
|
+
.describe('Lock is not connected to the Seam Bridge.')
|
|
93
|
+
|
|
94
|
+
const salto_site_user_limit_reached = common_device_error
|
|
95
|
+
.extend({
|
|
96
|
+
error_code: z
|
|
97
|
+
.literal('salto_site_user_limit_reached')
|
|
98
|
+
.describe(error_code_description),
|
|
99
|
+
})
|
|
100
|
+
.describe('Salto site user limit reached.')
|
|
101
|
+
|
|
102
|
+
const ttlock_lock_not_paired_to_gateway = common_device_error
|
|
103
|
+
.extend({
|
|
104
|
+
error_code: z
|
|
105
|
+
.literal('ttlock_lock_not_paired_to_gateway')
|
|
106
|
+
.describe(error_code_description),
|
|
107
|
+
})
|
|
108
|
+
.describe('Lock is not paired with a Gateway.')
|
|
109
|
+
|
|
110
|
+
const missing_device_credentials = common_device_error
|
|
111
|
+
.extend({
|
|
112
|
+
error_code: z
|
|
113
|
+
.literal('missing_device_credentials')
|
|
114
|
+
.describe(error_code_description),
|
|
115
|
+
})
|
|
116
|
+
.describe('Missing device credentials.')
|
|
117
|
+
|
|
118
|
+
const auxiliary_heat_running = common_device_error
|
|
119
|
+
.extend({
|
|
120
|
+
error_code: z
|
|
121
|
+
.literal('auxiliary_heat_running')
|
|
122
|
+
.describe(error_code_description),
|
|
123
|
+
})
|
|
124
|
+
.describe('The auxiliary heat is running.')
|
|
125
|
+
|
|
126
|
+
const subscription_required = common_device_error
|
|
127
|
+
.extend({
|
|
128
|
+
error_code: z
|
|
129
|
+
.literal('subscription_required')
|
|
130
|
+
.describe(error_code_description),
|
|
131
|
+
})
|
|
132
|
+
.describe('Subscription required to connect.')
|
|
133
|
+
|
|
134
|
+
export const device_error = z
|
|
135
|
+
.union([
|
|
136
|
+
device_offline,
|
|
137
|
+
device_removed,
|
|
138
|
+
account_disconnected,
|
|
139
|
+
hub_disconnected,
|
|
140
|
+
device_disconnected,
|
|
141
|
+
empty_backup_access_code_pool,
|
|
142
|
+
august_lock_not_authorized,
|
|
143
|
+
august_lock_missing_bridge,
|
|
144
|
+
salto_site_user_limit_reached,
|
|
145
|
+
ttlock_lock_not_paired_to_gateway,
|
|
146
|
+
missing_device_credentials,
|
|
147
|
+
auxiliary_heat_running,
|
|
148
|
+
subscription_required,
|
|
149
|
+
])
|
|
150
|
+
.describe('Error associated with the `device`.')
|
|
36
151
|
|
|
37
152
|
export type DeviceError = z.infer<typeof device_error>
|
|
38
153
|
|
|
@@ -561,6 +561,32 @@ export type TemperatureThresholdNoLongerExceededEvent = z.infer<
|
|
|
561
561
|
typeof temperature_threshold_no_longer_exceeded_event
|
|
562
562
|
>
|
|
563
563
|
|
|
564
|
+
export const temperature_reached_set_point_event = device_event.extend({
|
|
565
|
+
event_type: z.literal('thermostat.temperature_reached_set_point'),
|
|
566
|
+
temperature_celsius: z
|
|
567
|
+
.number()
|
|
568
|
+
.describe('Temperature, in °C, reported by the thermostat.'),
|
|
569
|
+
temperature_fahrenheit: z
|
|
570
|
+
.number()
|
|
571
|
+
.describe('Temperature, in °F, reported by the thermostat.'),
|
|
572
|
+
desired_temperature_celsius: z
|
|
573
|
+
.number()
|
|
574
|
+
.optional()
|
|
575
|
+
.describe(
|
|
576
|
+
"Desired temperature, in °C, set by the thermostat's cooling or heating set point.",
|
|
577
|
+
),
|
|
578
|
+
desired_temperature_fahrenheit: z
|
|
579
|
+
.number()
|
|
580
|
+
.optional()
|
|
581
|
+
.describe(
|
|
582
|
+
"Desired temperature, in °F, set by the thermostat's cooling or heating set point.",
|
|
583
|
+
),
|
|
584
|
+
})
|
|
585
|
+
|
|
586
|
+
export type TemperatureReachedSetPointEvent = z.infer<
|
|
587
|
+
typeof temperature_reached_set_point_event
|
|
588
|
+
>
|
|
589
|
+
|
|
564
590
|
export const device_events = [
|
|
565
591
|
device_connected_event,
|
|
566
592
|
device_added_event,
|
|
@@ -592,4 +618,5 @@ export const device_events = [
|
|
|
592
618
|
thermostat_manually_adjusted_event,
|
|
593
619
|
temperature_threshold_exceeded_event,
|
|
594
620
|
temperature_threshold_no_longer_exceeded_event,
|
|
621
|
+
temperature_reached_set_point_event,
|
|
595
622
|
] as const
|