@seamapi/types 0.20.0 → 0.21.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 +1 -5772
- package/dist/connect.cjs.map +1 -1
- package/dist/connect.d.cts +1 -7844
- package/lib/seam/connect/openapi.d.ts +1 -7844
- package/lib/seam/connect/openapi.js +1 -5772
- package/lib/seam/connect/openapi.js.map +1 -1
- package/lib/seam/connect/route-types.d.ts +22 -1
- package/lib/seam/connect/unstable/models/capability-properties/access-code.d.ts +22 -2
- package/lib/seam/connect/unstable/models/capability-properties/access-code.js +5 -5
- package/lib/seam/connect/unstable/models/capability-properties/access-code.js.map +1 -1
- package/lib/seam/connect/unstable/models/capability-properties/index.d.ts +28 -28
- package/lib/seam/connect/unstable/models/capability-properties/index.js +2 -2
- package/lib/seam/connect/unstable/models/capability-properties/index.js.map +1 -1
- package/lib/seam/connect/unstable/models/capability-properties/thermostat.d.ts +35 -34
- package/lib/seam/connect/unstable/models/capability-properties/thermostat.js.map +1 -1
- package/lib/seam/connect/unstable/models/device-metadata.d.ts +4 -4
- package/lib/seam/connect/unstable/models/managed-device.d.ts +49 -49
- package/lib/seam/connect/unstable/models/unmanaged-device.d.ts +6 -6
- package/lib/seam/connect/unstable/schemas.d.ts +1 -1
- package/lib/seam/connect/unstable/schemas.js +1 -1
- package/lib/seam/connect/unstable/schemas.js.map +1 -1
- package/package.json +1 -1
- package/src/lib/seam/connect/openapi.ts +1 -5772
- package/src/lib/seam/connect/route-types.ts +28 -1
- package/src/lib/seam/connect/unstable/models/capability-properties/access-code.ts +5 -5
- package/src/lib/seam/connect/unstable/models/capability-properties/index.ts +6 -2
- package/src/lib/seam/connect/unstable/models/capability-properties/thermostat.ts +2 -0
- package/src/lib/seam/connect/unstable/schemas.ts +1 -0
|
@@ -144,6 +144,34 @@ export interface Routes {
|
|
|
144
144
|
}
|
|
145
145
|
}
|
|
146
146
|
}
|
|
147
|
+
'/access_codes/generate_code': {
|
|
148
|
+
route: '/access_codes/generate_code'
|
|
149
|
+
method: 'GET'
|
|
150
|
+
queryParams: {}
|
|
151
|
+
jsonBody: {}
|
|
152
|
+
commonParams: {
|
|
153
|
+
device_id: string
|
|
154
|
+
}
|
|
155
|
+
formData: {}
|
|
156
|
+
jsonResponse: {
|
|
157
|
+
generated_code: {
|
|
158
|
+
device_id: string
|
|
159
|
+
code: string
|
|
160
|
+
is_valid: true
|
|
161
|
+
conflicts_with_existing_code: false
|
|
162
|
+
violated_code_constraints: []
|
|
163
|
+
passed_code_constraints: Array<{
|
|
164
|
+
constraint_type:
|
|
165
|
+
| 'no_zeros'
|
|
166
|
+
| 'cannot_start_with_12'
|
|
167
|
+
| 'no_triple_consecutive_ints'
|
|
168
|
+
| 'cannot_specify_pin_code'
|
|
169
|
+
| 'pin_code_matches_existing_set'
|
|
170
|
+
| 'start_date_in_future'
|
|
171
|
+
}>
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
147
175
|
'/access_codes/get': {
|
|
148
176
|
route: '/access_codes/get'
|
|
149
177
|
method: 'GET' | 'POST'
|
|
@@ -3583,7 +3611,6 @@ export interface Routes {
|
|
|
3583
3611
|
workspace_id: string
|
|
3584
3612
|
name: string
|
|
3585
3613
|
is_sandbox: boolean
|
|
3586
|
-
connect_partner_name: string | null
|
|
3587
3614
|
}>
|
|
3588
3615
|
}
|
|
3589
3616
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod'
|
|
2
2
|
|
|
3
|
-
const
|
|
3
|
+
export const access_code_code_constraint = z.object({
|
|
4
4
|
constraint_type: z.enum([
|
|
5
5
|
'no_zeros', // Nuki
|
|
6
6
|
'cannot_start_with_12', // Nuki
|
|
@@ -11,15 +11,15 @@ const simple_access_code_constraint = z.object({
|
|
|
11
11
|
]),
|
|
12
12
|
})
|
|
13
13
|
|
|
14
|
-
const
|
|
15
|
-
constraint_type: z.
|
|
14
|
+
export const access_code_name_constraint = z.object({
|
|
15
|
+
constraint_type: z.literal('name_length'), // Nuki, Kwikset
|
|
16
16
|
min_length: z.number().optional(),
|
|
17
17
|
max_length: z.number().optional(),
|
|
18
18
|
})
|
|
19
19
|
|
|
20
20
|
export const access_code_constraint = z.union([
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
access_code_code_constraint,
|
|
22
|
+
access_code_name_constraint,
|
|
23
23
|
])
|
|
24
24
|
|
|
25
25
|
export type AccessCodeConstraint = z.infer<typeof access_code_constraint>
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
access_code_capability_properties,
|
|
3
|
+
access_code_code_constraint,
|
|
4
|
+
} from './access-code.js'
|
|
2
5
|
import { lock_capability_properties } from './lock.js'
|
|
3
6
|
import {
|
|
4
7
|
climate_setting,
|
|
@@ -9,6 +12,7 @@ import {
|
|
|
9
12
|
|
|
10
13
|
export {
|
|
11
14
|
access_code_capability_properties,
|
|
15
|
+
access_code_code_constraint,
|
|
12
16
|
climate_setting,
|
|
13
17
|
climate_setting_schedule,
|
|
14
18
|
hvac_mode_setting,
|
|
@@ -23,4 +27,4 @@ export const capability_properties = access_code_capability_properties
|
|
|
23
27
|
.merge(thermostat_capability_properties.partial())
|
|
24
28
|
|
|
25
29
|
export type { AccessCodeConstraint } from './access-code.js'
|
|
26
|
-
export type { ClimateSetting } from './thermostat.js'
|
|
30
|
+
export type { ClimateSetting, HvacModeSetting } from './thermostat.js'
|
|
@@ -27,6 +27,8 @@ export const climate_setting_schedule = z
|
|
|
27
27
|
|
|
28
28
|
export const hvac_mode_setting = z.enum(['off', 'heat', 'cool', 'heatcool'])
|
|
29
29
|
|
|
30
|
+
export type HvacModeSetting = z.infer<typeof hvac_mode_setting>
|
|
31
|
+
|
|
30
32
|
export const thermostat_capability_properties = z.object({
|
|
31
33
|
temperature_fahrenheit: z.number(),
|
|
32
34
|
temperature_celsius: z.number(),
|