@seamapi/types 1.241.0 → 1.242.1
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 +281 -137
- package/dist/connect.cjs.map +1 -1
- package/dist/connect.d.cts +370 -182
- package/dist/devicedb.cjs +9 -6
- package/dist/devicedb.cjs.map +1 -1
- package/dist/devicedb.d.cts +123 -70
- package/lib/seam/connect/models/acs/acs-system.d.ts +86 -42
- package/lib/seam/connect/models/acs/acs-system.js +23 -20
- package/lib/seam/connect/models/acs/acs-system.js.map +1 -1
- package/lib/seam/connect/models/acs/acs-user.d.ts +169 -140
- package/lib/seam/connect/models/acs/acs-user.js +32 -30
- package/lib/seam/connect/models/acs/acs-user.js.map +1 -1
- package/lib/seam/connect/models/devices/capability-properties/index.d.ts +5 -5
- package/lib/seam/connect/models/devices/capability-properties/thermostat.d.ts +5 -5
- package/lib/seam/connect/models/devices/device.d.ts +6 -6
- package/lib/seam/connect/models/devices/phone.d.ts +5 -5
- package/lib/seam/connect/models/devices/unmanaged-device.d.ts +5 -5
- package/lib/seam/connect/models/thermostats/climate-preset.d.ts +3 -3
- package/lib/seam/connect/models/thermostats/climate-preset.js +1 -1
- package/lib/seam/connect/models/thermostats/climate-preset.js.map +1 -1
- package/lib/seam/connect/models/thermostats/index.d.ts +1 -1
- package/lib/seam/connect/models/thermostats/index.js +1 -1
- package/lib/seam/connect/models/thermostats/index.js.map +1 -1
- package/lib/seam/connect/models/thermostats/{climate-setting-schedule.js → thermostat-schedule.js} +1 -1
- package/lib/seam/connect/models/thermostats/thermostat-schedule.js.map +1 -0
- package/lib/seam/connect/openapi.d.ts +45 -18
- package/lib/seam/connect/openapi.js +219 -90
- package/lib/seam/connect/openapi.js.map +1 -1
- package/lib/seam/connect/route-types.d.ts +176 -78
- package/lib/seam/devicedb/models/device-model.d.ts +59 -24
- package/lib/seam/devicedb/models/device-model.js +9 -6
- package/lib/seam/devicedb/models/device-model.js.map +1 -1
- package/lib/seam/devicedb/route-specs.d.ts +56 -38
- package/lib/seam/devicedb/route-types.d.ts +8 -8
- package/package.json +1 -1
- package/src/lib/seam/connect/models/acs/acs-system.ts +32 -24
- package/src/lib/seam/connect/models/acs/acs-user.ts +41 -35
- package/src/lib/seam/connect/models/thermostats/climate-preset.ts +1 -1
- package/src/lib/seam/connect/models/thermostats/index.ts +1 -1
- package/src/lib/seam/connect/openapi.ts +249 -90
- package/src/lib/seam/connect/route-types.ts +187 -78
- package/src/lib/seam/devicedb/models/device-model.ts +24 -19
- package/src/lib/seam/devicedb/route-types.ts +8 -8
- package/lib/seam/connect/models/thermostats/climate-setting-schedule.js.map +0 -1
- /package/lib/seam/connect/models/thermostats/{climate-setting-schedule.d.ts → thermostat-schedule.d.ts} +0 -0
- /package/src/lib/seam/connect/models/thermostats/{climate-setting-schedule.ts → thermostat-schedule.ts} +0 -0
|
@@ -25,12 +25,12 @@ const common_acs_user_error = z.object({
|
|
|
25
25
|
),
|
|
26
26
|
})
|
|
27
27
|
|
|
28
|
-
const
|
|
28
|
+
const acs_users_deleted_externally = common_acs_user_error
|
|
29
29
|
.extend({
|
|
30
|
-
error_code: z.literal('
|
|
30
|
+
error_code: z.literal('deleted_externally'),
|
|
31
31
|
})
|
|
32
32
|
.describe(
|
|
33
|
-
`Indicates that the user was deleted from the ACS system outside of Seam.`,
|
|
33
|
+
`Indicates that the ACS user was deleted from the ACS system outside of Seam.`,
|
|
34
34
|
)
|
|
35
35
|
|
|
36
36
|
const acs_users_salto_ks_subscription_limit_exceeded = common_acs_user_error
|
|
@@ -41,37 +41,63 @@ const acs_users_salto_ks_subscription_limit_exceeded = common_acs_user_error
|
|
|
41
41
|
`Indicates that the user could not be subscribed on Salto KS because the subscription limit has been exceeded.`,
|
|
42
42
|
)
|
|
43
43
|
|
|
44
|
-
const
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
const acs_users_failed_to_create_on_acs_system = common_acs_user_error
|
|
45
|
+
.extend({
|
|
46
|
+
warning_code: z.literal('failed_to_create_on_acs_system'),
|
|
47
|
+
})
|
|
48
|
+
.describe(
|
|
49
|
+
`Indicates that the user was not created on the ACS system. This is likely due to an internal unexpected error. Please contact Seam's support if you encounter this.`,
|
|
50
|
+
)
|
|
51
|
+
|
|
52
|
+
const acs_users_failed_to_update_on_acs_system = common_acs_user_error
|
|
53
|
+
.extend({
|
|
54
|
+
warning_code: z.literal('failed_to_update_on_acs_system'),
|
|
55
|
+
})
|
|
56
|
+
.describe(
|
|
57
|
+
`Indicates that the user was not updated on the ACS system. This is likely due to an internal unexpected error. Please contact Seam's support if you encounter this.`,
|
|
58
|
+
)
|
|
59
|
+
|
|
60
|
+
const acs_users_failed_to_delete_on_acs_system = common_acs_user_error
|
|
61
|
+
.extend({
|
|
62
|
+
warning_code: z.literal('failed_to_delete_on_acs_system'),
|
|
63
|
+
})
|
|
64
|
+
.describe(
|
|
65
|
+
`Indicates that the user was not deleted on the ACS system. This is likely due to an internal unexpected error. Please contact Seam's support if you encounter this.`,
|
|
66
|
+
)
|
|
47
67
|
|
|
48
68
|
const acs_user_errors = z
|
|
49
69
|
.union([
|
|
50
|
-
|
|
70
|
+
acs_users_deleted_externally,
|
|
51
71
|
acs_users_salto_ks_subscription_limit_exceeded,
|
|
52
|
-
|
|
72
|
+
acs_users_failed_to_create_on_acs_system,
|
|
73
|
+
acs_users_failed_to_update_on_acs_system,
|
|
74
|
+
acs_users_failed_to_delete_on_acs_system,
|
|
53
75
|
])
|
|
54
76
|
.describe('Error associated with the `acs_user`.')
|
|
55
77
|
|
|
56
78
|
export const acs_users_error_map = z.object({
|
|
57
|
-
|
|
58
|
-
.optional()
|
|
59
|
-
.nullable(),
|
|
79
|
+
deleted_externally: acs_users_deleted_externally.optional().nullable(),
|
|
60
80
|
salto_ks_subscription_limit_exceeded:
|
|
61
81
|
acs_users_salto_ks_subscription_limit_exceeded.optional().nullable(),
|
|
62
|
-
|
|
82
|
+
failed_to_create_on_acs_system: acs_users_failed_to_create_on_acs_system
|
|
83
|
+
.optional()
|
|
84
|
+
.nullable(),
|
|
85
|
+
failed_to_update_on_acs_system: acs_users_failed_to_update_on_acs_system
|
|
86
|
+
.optional()
|
|
87
|
+
.nullable(),
|
|
88
|
+
failed_to_delete_on_acs_system: acs_users_failed_to_delete_on_acs_system
|
|
63
89
|
.optional()
|
|
64
90
|
.nullable(),
|
|
65
91
|
})
|
|
66
92
|
|
|
67
93
|
export type AcsUsersErrorMap = z.infer<typeof acs_users_error_map>
|
|
68
94
|
|
|
69
|
-
const
|
|
95
|
+
const common_acs_user_warning = z.object({
|
|
70
96
|
created_at: z.string().datetime(),
|
|
71
97
|
message: z.string(),
|
|
72
98
|
})
|
|
73
99
|
|
|
74
|
-
const acs_users_being_deleted =
|
|
100
|
+
const acs_users_being_deleted = common_acs_user_warning
|
|
75
101
|
.extend({
|
|
76
102
|
warning_code: z.literal('being_deleted'),
|
|
77
103
|
})
|
|
@@ -79,7 +105,7 @@ const acs_users_being_deleted = common_acs_users_warning
|
|
|
79
105
|
`Indicates that the user is being deleted from the ACS system. This is a temporary state, and the user will be deleted shortly.`,
|
|
80
106
|
)
|
|
81
107
|
|
|
82
|
-
const acs_users_salto_ks_user_not_subscribed =
|
|
108
|
+
const acs_users_salto_ks_user_not_subscribed = common_acs_user_warning
|
|
83
109
|
.extend({
|
|
84
110
|
warning_code: z.literal('salto_ks_user_not_subscribed'),
|
|
85
111
|
})
|
|
@@ -87,30 +113,11 @@ const acs_users_salto_ks_user_not_subscribed = common_acs_users_warning
|
|
|
87
113
|
`Indicates that the user is not subscribed on the Salto KS, so they cannot unlock doors or perform any actions. This occur when the their access schedule hasn’t started yet, or if their access schedule has ended, or if the site has reached its limit for active users (subscription slots), or if they have been manually unsubscribed.`,
|
|
88
114
|
)
|
|
89
115
|
|
|
90
|
-
const acs_users_failed_to_update_on_acs_system = common_acs_users_warning
|
|
91
|
-
.extend({
|
|
92
|
-
warning_code: z.literal('failed_to_update_on_acs_system'),
|
|
93
|
-
})
|
|
94
|
-
.describe(
|
|
95
|
-
`Indicates that the user was not updated on the ACS system. This is likely due to an internal unexpected error. Please contact Seam's support if you encounter this.`,
|
|
96
|
-
)
|
|
97
|
-
|
|
98
|
-
// TODO: Some acs_users already have this warning, so we need to keep it here until we migrate
|
|
99
|
-
const acs_users_salto_site_user_suspended = common_acs_users_warning.extend({
|
|
100
|
-
warning_code: z.literal('salto_site_user_suspended'),
|
|
101
|
-
})
|
|
102
|
-
|
|
103
116
|
export const acs_users_warning_map = z.object({
|
|
104
117
|
being_deleted: acs_users_being_deleted.optional().nullable(),
|
|
105
|
-
failed_to_update_on_acs_system: acs_users_failed_to_update_on_acs_system
|
|
106
|
-
.optional()
|
|
107
|
-
.nullable(),
|
|
108
118
|
salto_ks_user_not_subscribed: acs_users_salto_ks_user_not_subscribed
|
|
109
119
|
.optional()
|
|
110
120
|
.nullable(),
|
|
111
|
-
salto_site_user_suspended: acs_users_salto_site_user_suspended
|
|
112
|
-
.optional()
|
|
113
|
-
.nullable(),
|
|
114
121
|
})
|
|
115
122
|
|
|
116
123
|
export const acs_users_warnings = z
|
|
@@ -118,7 +125,6 @@ export const acs_users_warnings = z
|
|
|
118
125
|
acs_users_being_deleted,
|
|
119
126
|
acs_users_failed_to_update_on_acs_system,
|
|
120
127
|
acs_users_salto_ks_user_not_subscribed,
|
|
121
|
-
acs_users_salto_site_user_suspended,
|
|
122
128
|
])
|
|
123
129
|
.describe('Warning associated with the `acs_user`.')
|
|
124
130
|
|
|
@@ -6,7 +6,7 @@ export const climate_preset = z.object({
|
|
|
6
6
|
climate_preset_key: z.string(),
|
|
7
7
|
can_edit: z.boolean(),
|
|
8
8
|
can_delete: z.boolean(),
|
|
9
|
-
name: z.string().nullable(),
|
|
9
|
+
name: z.string().nullable().default(null),
|
|
10
10
|
display_name: z.string(),
|
|
11
11
|
fan_mode_setting: fan_mode_setting.optional(),
|
|
12
12
|
hvac_mode_setting: hvac_mode_setting.optional(),
|