@seamapi/types 1.290.0 → 1.292.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 +688 -193
- package/dist/connect.cjs.map +1 -1
- package/dist/connect.d.cts +1099 -82
- package/lib/seam/connect/models/acs/acs-encoder.d.ts +52 -7
- package/lib/seam/connect/models/acs/acs-encoder.js +28 -4
- package/lib/seam/connect/models/acs/acs-encoder.js.map +1 -1
- package/lib/seam/connect/models/acs/acs-system.js +15 -9
- package/lib/seam/connect/models/acs/acs-system.js.map +1 -1
- package/lib/seam/connect/models/events/acs/encoders.d.ts +126 -0
- package/lib/seam/connect/models/events/acs/encoders.js +20 -0
- package/lib/seam/connect/models/events/acs/encoders.js.map +1 -0
- package/lib/seam/connect/models/events/acs/index.d.ts +60 -0
- package/lib/seam/connect/models/events/acs/index.js +2 -0
- package/lib/seam/connect/models/events/acs/index.js.map +1 -1
- package/lib/seam/connect/models/events/seam-event.d.ts +60 -0
- package/lib/seam/connect/models/thermostats/climate-preset.js +41 -12
- package/lib/seam/connect/models/thermostats/climate-preset.js.map +1 -1
- package/lib/seam/connect/models/thermostats/thermostat-schedule.js +30 -9
- package/lib/seam/connect/models/thermostats/thermostat-schedule.js.map +1 -1
- package/lib/seam/connect/openapi.d.ts +218 -23
- package/lib/seam/connect/openapi.js +598 -133
- package/lib/seam/connect/openapi.js.map +1 -1
- package/lib/seam/connect/route-types.d.ts +803 -52
- package/package.json +1 -1
- package/src/lib/seam/connect/models/acs/acs-encoder.ts +40 -6
- package/src/lib/seam/connect/models/acs/acs-system.ts +29 -21
- package/src/lib/seam/connect/models/events/acs/encoders.ts +28 -0
- package/src/lib/seam/connect/models/events/acs/index.ts +2 -0
- package/src/lib/seam/connect/models/thermostats/climate-preset.ts +49 -12
- package/src/lib/seam/connect/models/thermostats/thermostat-schedule.ts +38 -9
- package/src/lib/seam/connect/openapi.ts +754 -133
- package/src/lib/seam/connect/route-types.ts +805 -50
package/package.json
CHANGED
|
@@ -1,5 +1,42 @@
|
|
|
1
1
|
import { z } from 'zod'
|
|
2
2
|
|
|
3
|
+
const common_acs_encoder_error = z.object({
|
|
4
|
+
created_at: z
|
|
5
|
+
.string()
|
|
6
|
+
.datetime()
|
|
7
|
+
.describe('Date and time at which Seam created the error.'),
|
|
8
|
+
message: z
|
|
9
|
+
.string()
|
|
10
|
+
.describe(
|
|
11
|
+
'Detailed description of the error. Provides insights into the issue and potentially how to rectify it.',
|
|
12
|
+
),
|
|
13
|
+
})
|
|
14
|
+
|
|
15
|
+
const error_code_description =
|
|
16
|
+
'Unique identifier of the type of error. Enables quick recognition and categorization of the issue.'
|
|
17
|
+
|
|
18
|
+
const acs_encoder_removed = common_acs_encoder_error.extend({
|
|
19
|
+
error_code: z.literal('acs_encoder_removed').describe(error_code_description),
|
|
20
|
+
_event_id: z
|
|
21
|
+
.string()
|
|
22
|
+
.uuid()
|
|
23
|
+
.describe(
|
|
24
|
+
'ID of the event that was created when the `acs_encoder` was removed.',
|
|
25
|
+
),
|
|
26
|
+
})
|
|
27
|
+
|
|
28
|
+
const acs_encoder_error =
|
|
29
|
+
// z.union([
|
|
30
|
+
acs_encoder_removed
|
|
31
|
+
// ])
|
|
32
|
+
.describe('Error associated with the `acs_encoder`.')
|
|
33
|
+
|
|
34
|
+
export const acs_encoder_error_map = z.object({
|
|
35
|
+
acs_encoder_removed: acs_encoder_removed.optional().nullable(),
|
|
36
|
+
})
|
|
37
|
+
|
|
38
|
+
export type AcsEncoderErrorMap = z.infer<typeof acs_encoder_error_map>
|
|
39
|
+
|
|
3
40
|
export const acs_encoder = z.object({
|
|
4
41
|
acs_encoder_id: z.string().uuid().describe('ID of the `acs_encoder`.'),
|
|
5
42
|
acs_system_id: z
|
|
@@ -14,12 +51,9 @@ export const acs_encoder = z.object({
|
|
|
14
51
|
.describe(
|
|
15
52
|
'ID of the [workspace](https://docs.seam.co/latest/core-concepts/workspaces) that contains the `acs_system`.',
|
|
16
53
|
),
|
|
17
|
-
errors: z
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
message: z.string(),
|
|
21
|
-
}),
|
|
22
|
-
),
|
|
54
|
+
errors: z
|
|
55
|
+
.array(acs_encoder_error)
|
|
56
|
+
.describe('Errors associated with the `acs_encoder`.'),
|
|
23
57
|
created_at: z
|
|
24
58
|
.string()
|
|
25
59
|
.datetime()
|
|
@@ -75,6 +75,7 @@ const seam_bridge_disconnected = common_acs_system_error.extend({
|
|
|
75
75
|
.describe(`Indicates that the Seam API cannot communicate with the [Seam Bridge](https://docs.seam.co/latest/capability-guides/seam-bridge), for example, if the Seam Bridge executable has stopped or if the computer running the Seam Bridge executable is offline.
|
|
76
76
|
This error might also occur if the Seam Bridge is connected to the wrong [workspace](https://docs.seam.co/latest/core-concepts/workspaces).
|
|
77
77
|
See also [Troubleshooting Your Access Control System](https://docs.seam.co/latest/capability-guides/capability-guides/access-systems/troubleshooting-your-access-control-system#acs_system.errors.seam_bridge_disconnected).`)
|
|
78
|
+
|
|
78
79
|
const visionline_instance_unreachable = common_acs_system_error.extend({
|
|
79
80
|
error_code: z
|
|
80
81
|
.literal('visionline_instance_unreachable')
|
|
@@ -84,29 +85,36 @@ const visionline_instance_unreachable = common_acs_system_error.extend({
|
|
|
84
85
|
For example, the IP address of the on-premises access control system may be set incorrectly within the Seam [workspace](https://docs.seam.co/latest/core-concepts/workspaces).
|
|
85
86
|
See also [Troubleshooting Your Access Control System](https://docs.seam.co/latest/capability-guides/capability-guides/access-systems/troubleshooting-your-access-control-system#acs_system.errors.visionline_instance_unreachable).`)
|
|
86
87
|
|
|
87
|
-
const salto_ks_subscription_limit_exceeded = common_acs_system_error
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
88
|
+
const salto_ks_subscription_limit_exceeded = common_acs_system_error
|
|
89
|
+
.extend({
|
|
90
|
+
error_code: z
|
|
91
|
+
.literal('salto_ks_subscription_limit_exceeded')
|
|
92
|
+
.describe(error_code_description),
|
|
93
|
+
})
|
|
94
|
+
.describe(
|
|
95
|
+
'Indicates that the maximum number of users allowed for the site has been reached. This means that new access codes cannot be created. Contact Salto support to increase the user limit.',
|
|
96
|
+
)
|
|
94
97
|
|
|
95
|
-
const acs_system_disconnected = common_acs_system_error
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
98
|
+
const acs_system_disconnected = common_acs_system_error
|
|
99
|
+
.extend({
|
|
100
|
+
error_code: z
|
|
101
|
+
.literal('acs_system_disconnected')
|
|
102
|
+
.describe(error_code_description),
|
|
103
|
+
})
|
|
104
|
+
.describe(
|
|
105
|
+
'Indicates that the access system has been disconnected. See [this guide](https://docs.seam.co/latest/capability-guides/access-systems/troubleshooting-your-access-control-system guide) to resolve the issue.',
|
|
106
|
+
)
|
|
107
|
+
|
|
108
|
+
const account_disconnected = common_acs_system_error
|
|
109
|
+
.extend({
|
|
110
|
+
error_code: z
|
|
111
|
+
.literal('account_disconnected')
|
|
112
|
+
.describe(error_code_description),
|
|
113
|
+
})
|
|
114
|
+
.describe(
|
|
115
|
+
'Indicates that the login credentials are invalid. Reconnect the account using the Connect Webview to restore access.',
|
|
116
|
+
)
|
|
102
117
|
|
|
103
|
-
const account_disconnected = common_acs_system_error.extend({
|
|
104
|
-
error_code: z
|
|
105
|
-
.literal('account_disconnected')
|
|
106
|
-
.describe(
|
|
107
|
-
'Indicates that the login credentials are invalid. Please reconnect the account using the Connect Webview to restore access.',
|
|
108
|
-
),
|
|
109
|
-
})
|
|
110
118
|
const acs_system_error = z
|
|
111
119
|
.union([
|
|
112
120
|
seam_bridge_disconnected,
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { z } from 'zod'
|
|
2
|
+
|
|
3
|
+
import { common_acs_event } from './common.js'
|
|
4
|
+
|
|
5
|
+
const acs_encoder_event = common_acs_event.extend({
|
|
6
|
+
acs_encoder_id: z.string().uuid().describe('ID of the ACS encoder.'),
|
|
7
|
+
})
|
|
8
|
+
|
|
9
|
+
export const acs_encoder_added_event = acs_encoder_event
|
|
10
|
+
.extend({
|
|
11
|
+
event_type: z.literal('acs_encoder.added'),
|
|
12
|
+
})
|
|
13
|
+
.describe('An ACS encoder was added.')
|
|
14
|
+
|
|
15
|
+
export type AcsEncoderAddedEvent = z.infer<typeof acs_encoder_added_event>
|
|
16
|
+
|
|
17
|
+
export const acs_encoder_removed_event = acs_encoder_event
|
|
18
|
+
.extend({
|
|
19
|
+
event_type: z.literal('acs_encoder.removed'),
|
|
20
|
+
})
|
|
21
|
+
.describe('An ACS encoder was removed.')
|
|
22
|
+
|
|
23
|
+
export type AcsEncoderRemovedEvent = z.infer<typeof acs_encoder_removed_event>
|
|
24
|
+
|
|
25
|
+
export const acs_encoder_events = [
|
|
26
|
+
acs_encoder_added_event,
|
|
27
|
+
acs_encoder_removed_event,
|
|
28
|
+
] as const
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { acs_credential_events } from './credentials.js'
|
|
2
|
+
import { acs_encoder_events } from './encoders.js'
|
|
2
3
|
import { acs_system_events } from './systems.js'
|
|
3
4
|
import { acs_user_events } from './users.js'
|
|
4
5
|
|
|
@@ -6,4 +7,5 @@ export const acs_events = [
|
|
|
6
7
|
...acs_system_events,
|
|
7
8
|
...acs_credential_events,
|
|
8
9
|
...acs_user_events,
|
|
10
|
+
...acs_encoder_events,
|
|
9
11
|
] as const
|
|
@@ -3,18 +3,55 @@ import { z } from 'zod'
|
|
|
3
3
|
import { fan_mode_setting, hvac_mode_setting } from './modes.js'
|
|
4
4
|
|
|
5
5
|
export const climate_preset = z.object({
|
|
6
|
-
climate_preset_key: z
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
6
|
+
climate_preset_key: z
|
|
7
|
+
.string()
|
|
8
|
+
.describe('Unique key to identify the climate preset.'),
|
|
9
|
+
can_edit: z
|
|
10
|
+
.boolean()
|
|
11
|
+
.describe('Indicates whether this climate preset key can be edited.'),
|
|
12
|
+
can_delete: z
|
|
13
|
+
.boolean()
|
|
14
|
+
.describe('Indicates whether this climate preset key can be deleted.'),
|
|
15
|
+
name: z
|
|
16
|
+
.string()
|
|
17
|
+
.nullable()
|
|
18
|
+
.default(null)
|
|
19
|
+
.optional()
|
|
20
|
+
.describe('User-friendly name to identify the climate preset.'),
|
|
21
|
+
display_name: z.string().describe('Display name for the climate preset.'),
|
|
22
|
+
fan_mode_setting: fan_mode_setting
|
|
23
|
+
.optional()
|
|
24
|
+
.describe(
|
|
25
|
+
'Desired fan mode setting, such as `on`, `auto`, or `circulate`.',
|
|
26
|
+
),
|
|
27
|
+
hvac_mode_setting: hvac_mode_setting
|
|
28
|
+
.optional()
|
|
29
|
+
.describe(
|
|
30
|
+
'Desired [HVAC mode](https://docs.seam.co/latest/capability-guides/thermostats/understanding-thermostat-concepts/hvac-mode) setting, such as `heat`, `cool`, `heat_cool`, or `off`.',
|
|
31
|
+
),
|
|
32
|
+
cooling_set_point_celsius: z
|
|
33
|
+
.number()
|
|
34
|
+
.optional()
|
|
35
|
+
.describe(
|
|
36
|
+
'Temperature to which the thermostat should cool (in °C). See also [Set Points](https://docs.seam.co/latest/capability-guides/thermostats/understanding-thermostat-concepts/set-points).',
|
|
37
|
+
),
|
|
38
|
+
heating_set_point_celsius: z
|
|
39
|
+
.number()
|
|
40
|
+
.optional()
|
|
41
|
+
.describe('Temperature to which the thermostat should heat (in °C).'),
|
|
42
|
+
cooling_set_point_fahrenheit: z
|
|
43
|
+
.number()
|
|
44
|
+
.optional()
|
|
45
|
+
.describe('Temperature to which the thermostat should cool (in °F).'),
|
|
46
|
+
heating_set_point_fahrenheit: z
|
|
47
|
+
.number()
|
|
48
|
+
.optional()
|
|
49
|
+
.describe('Temperature to which the thermostat should heat (in °F).'),
|
|
50
|
+
manual_override_allowed: z
|
|
51
|
+
.boolean()
|
|
52
|
+
.describe(
|
|
53
|
+
"Indicates whether a person at the thermostat can change the thermostat's settings.",
|
|
54
|
+
),
|
|
18
55
|
})
|
|
19
56
|
|
|
20
57
|
export type ClimatePreset = z.infer<typeof climate_preset>
|
|
@@ -1,18 +1,47 @@
|
|
|
1
1
|
import { z } from 'zod'
|
|
2
2
|
|
|
3
3
|
export const thermostat_schedule = z.object({
|
|
4
|
-
thermostat_schedule_id: z
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
4
|
+
thermostat_schedule_id: z
|
|
5
|
+
.string()
|
|
6
|
+
.uuid()
|
|
7
|
+
.describe('ID of the climate schedule.'),
|
|
8
|
+
device_id: z.string().uuid().describe('ID of the desired thermostat device.'),
|
|
9
|
+
name: z
|
|
10
|
+
.string()
|
|
11
|
+
.optional()
|
|
12
|
+
.describe('User-friendly name to identify the climate schedule.'),
|
|
13
|
+
climate_preset_key: z
|
|
14
|
+
.string()
|
|
15
|
+
.describe(
|
|
16
|
+
'Key of the [climate preset](https://docs.seam.co/latest/capability-guides/thermostats/creating-and-managing-climate-presets) to use for the climate schedule.',
|
|
17
|
+
),
|
|
18
|
+
max_override_period_minutes: z
|
|
19
|
+
.number()
|
|
20
|
+
.int()
|
|
21
|
+
.nonnegative()
|
|
22
|
+
.describe(
|
|
23
|
+
"Number of minutes for which a person at the thermostat can change the thermostat's settings after the activation of the scheduled climate preset. See also [Specifying Manual Override Permissions](https://docs.seam.co/latest/capability-guides/thermostats/creating-and-managing-climate-schedules#specifying-manual-override-permissions).",
|
|
24
|
+
),
|
|
25
|
+
starts_at: z
|
|
26
|
+
.string()
|
|
27
|
+
.datetime()
|
|
28
|
+
.describe(
|
|
29
|
+
'Date and time at which the climate schedule starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format.',
|
|
30
|
+
),
|
|
31
|
+
ends_at: z
|
|
32
|
+
.string()
|
|
33
|
+
.datetime()
|
|
34
|
+
.describe(
|
|
35
|
+
'Date and time at which the climate schedule ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format.',
|
|
36
|
+
),
|
|
37
|
+
created_at: z
|
|
38
|
+
.string()
|
|
39
|
+
.datetime()
|
|
40
|
+
.describe('Date and time at which the climate schedule was created.'),
|
|
12
41
|
errors: z
|
|
13
42
|
.any()
|
|
14
43
|
.describe(
|
|
15
|
-
'
|
|
44
|
+
'Array of errors associated with the climate schedule. Each error object within the array contains two fields: `error_code` and `message`. `error_code` is a string that uniquely identifies the type of error, enabling quick recognition and categorization of the issue. `message` provides a more detailed description of the error, offering insights into the issue and potentially how to rectify it.',
|
|
16
45
|
),
|
|
17
46
|
})
|
|
18
47
|
|