@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.
@@ -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: 'POST' | 'PATCH'
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: z.coerce
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