@seamapi/types 1.11.0 → 1.12.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 +6048 -6074
- package/dist/connect.cjs.map +1 -1
- package/dist/connect.d.cts +6721 -6762
- package/lib/seam/connect/openapi.d.ts +6721 -6762
- package/lib/seam/connect/openapi.js +5733 -5759
- package/lib/seam/connect/openapi.js.map +1 -1
- package/lib/seam/connect/route-types.d.ts +3 -1
- package/lib/seam/connect/unstable/models/acs/user.d.ts +20 -6
- package/lib/seam/connect/unstable/models/acs/user.js +15 -10
- package/lib/seam/connect/unstable/models/acs/user.js.map +1 -1
- package/lib/seam/connect/unstable/models/capability-properties/index.d.ts +90 -90
- package/lib/seam/connect/unstable/models/capability-properties/thermostat.d.ts +186 -186
- package/lib/seam/connect/unstable/models/device-metadata.d.ts +8 -8
- package/lib/seam/connect/unstable/models/managed-device.d.ts +204 -204
- package/lib/seam/connect/unstable/models/unmanaged-device.d.ts +2 -2
- package/package.json +1 -1
- package/src/lib/seam/connect/openapi.ts +5733 -5759
- package/src/lib/seam/connect/route-types.ts +3 -1
- package/src/lib/seam/connect/unstable/models/acs/user.ts +22 -13
|
@@ -303,6 +303,7 @@ export interface Routes {
|
|
|
303
303
|
jsonBody: {}
|
|
304
304
|
commonParams: {
|
|
305
305
|
access_code_id: string
|
|
306
|
+
allow_external_modification?: boolean | undefined
|
|
306
307
|
force?: boolean | undefined
|
|
307
308
|
sync?: boolean
|
|
308
309
|
}
|
|
@@ -409,6 +410,7 @@ export interface Routes {
|
|
|
409
410
|
commonParams: {
|
|
410
411
|
access_code_id: string
|
|
411
412
|
is_managed: boolean
|
|
413
|
+
allow_external_modification?: boolean | undefined
|
|
412
414
|
force?: boolean | undefined
|
|
413
415
|
}
|
|
414
416
|
formData: {}
|
|
@@ -727,7 +729,7 @@ export interface Routes {
|
|
|
727
729
|
}
|
|
728
730
|
'/acs/users/remove_from_access_group': {
|
|
729
731
|
route: '/acs/users/remove_from_access_group'
|
|
730
|
-
method: '
|
|
732
|
+
method: 'DELETE' | 'POST'
|
|
731
733
|
queryParams: {}
|
|
732
734
|
jsonBody: {}
|
|
733
735
|
commonParams: {
|
|
@@ -1,21 +1,30 @@
|
|
|
1
1
|
import { z } from 'zod'
|
|
2
2
|
|
|
3
|
+
const phone_number = z.coerce
|
|
4
|
+
.string()
|
|
5
|
+
.trim()
|
|
6
|
+
.refine(
|
|
7
|
+
(val) => {
|
|
8
|
+
// https://www.twilio.com/docs/glossary/what-e164
|
|
9
|
+
return /^\+[1-9]\d{1,14}$/.test(val)
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
message: 'Phone number must be in E.164 format: +14155552671',
|
|
13
|
+
},
|
|
14
|
+
)
|
|
15
|
+
|
|
16
|
+
export const desired_user_properties = z.object({
|
|
17
|
+
_desired_full_name: z.string(),
|
|
18
|
+
_desired_email: z.string().email().nullish(),
|
|
19
|
+
_desired_phone_number: phone_number.nullish(),
|
|
20
|
+
})
|
|
21
|
+
|
|
22
|
+
export type DesiredAcsUserProperties = z.output<typeof desired_user_properties>
|
|
23
|
+
|
|
3
24
|
const user_fields = z.object({
|
|
4
25
|
full_name: z.string().optional(),
|
|
5
26
|
email: z.string().email().optional(),
|
|
6
|
-
phone_number:
|
|
7
|
-
.string()
|
|
8
|
-
.trim()
|
|
9
|
-
.refine(
|
|
10
|
-
(val) => {
|
|
11
|
-
// https://www.twilio.com/docs/glossary/what-e164
|
|
12
|
-
return /^\+[1-9]\d{1,14}$/.test(val)
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
message: 'Phone number must be in E.164 format: +14155552671',
|
|
16
|
-
},
|
|
17
|
-
)
|
|
18
|
-
.optional(),
|
|
27
|
+
phone_number: phone_number.optional(),
|
|
19
28
|
})
|
|
20
29
|
|
|
21
30
|
export const acs_user = z
|