Skip to content

Commit 2bce59b

Browse files
authored
feat: add allow_external_modification flag (#136)
1 parent 90b5457 commit 2bce59b

File tree

3 files changed

+28
-13
lines changed

3 files changed

+28
-13
lines changed

src/lib/seam/connect/openapi.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2040,6 +2040,7 @@ export default {
20402040
schema: {
20412041
properties: {
20422042
access_code_id: { format: 'uuid', type: 'string' },
2043+
allow_external_modification: { type: 'boolean' },
20432044
force: { type: 'boolean' },
20442045
sync: { default: false, type: 'boolean' },
20452046
},
@@ -2082,6 +2083,7 @@ export default {
20822083
schema: {
20832084
properties: {
20842085
access_code_id: { format: 'uuid', type: 'string' },
2086+
allow_external_modification: { type: 'boolean' },
20852087
force: { type: 'boolean' },
20862088
sync: { default: false, type: 'boolean' },
20872089
},
@@ -2351,6 +2353,7 @@ export default {
23512353
schema: {
23522354
properties: {
23532355
access_code_id: { format: 'uuid', type: 'string' },
2356+
allow_external_modification: { type: 'boolean' },
23542357
force: { type: 'boolean' },
23552358
is_managed: { type: 'boolean' },
23562359
},
@@ -2393,6 +2396,7 @@ export default {
23932396
schema: {
23942397
properties: {
23952398
access_code_id: { format: 'uuid', type: 'string' },
2399+
allow_external_modification: { type: 'boolean' },
23962400
force: { type: 'boolean' },
23972401
is_managed: { type: 'boolean' },
23982402
},

src/lib/seam/connect/route-types.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,7 @@ export interface Routes {
303303
jsonBody: {}
304304
commonParams: {
305305
access_code_id: string
306+
allow_external_modification?: boolean | undefined
306307
force?: boolean | undefined
307308
sync?: boolean
308309
}
@@ -409,6 +410,7 @@ export interface Routes {
409410
commonParams: {
410411
access_code_id: string
411412
is_managed: boolean
413+
allow_external_modification?: boolean | undefined
412414
force?: boolean | undefined
413415
}
414416
formData: {}

src/lib/seam/connect/unstable/models/acs/user.ts

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,30 @@
11
import { z } from 'zod'
22

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+
324
const user_fields = z.object({
425
full_name: z.string().optional(),
526
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(),
1928
})
2029

2130
export const acs_user = z

0 commit comments

Comments
 (0)