@seamapi/types 1.11.1 → 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.
@@ -295,6 +295,7 @@ export interface Routes {
295
295
  jsonBody: {};
296
296
  commonParams: {
297
297
  access_code_id: string;
298
+ allow_external_modification?: boolean | undefined;
298
299
  force?: boolean | undefined;
299
300
  sync?: boolean;
300
301
  };
@@ -398,6 +399,7 @@ export interface Routes {
398
399
  commonParams: {
399
400
  access_code_id: string;
400
401
  is_managed: boolean;
402
+ allow_external_modification?: boolean | undefined;
401
403
  force?: boolean | undefined;
402
404
  };
403
405
  formData: {};
@@ -1,4 +1,18 @@
1
1
  import { z } from 'zod';
2
+ export declare const desired_user_properties: z.ZodObject<{
3
+ _desired_full_name: z.ZodString;
4
+ _desired_email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5
+ _desired_phone_number: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodString, string, string>>>;
6
+ }, "strip", z.ZodTypeAny, {
7
+ _desired_full_name: string;
8
+ _desired_email?: string | null | undefined;
9
+ _desired_phone_number?: string | null | undefined;
10
+ }, {
11
+ _desired_full_name: string;
12
+ _desired_email?: string | null | undefined;
13
+ _desired_phone_number?: string | null | undefined;
14
+ }>;
15
+ export type DesiredAcsUserProperties = z.output<typeof desired_user_properties>;
2
16
  export declare const acs_user: z.ZodObject<{
3
17
  workspace_id: z.ZodString;
4
18
  created_at: z.ZodString;
@@ -1,17 +1,22 @@
1
1
  import { z } from 'zod';
2
+ const phone_number = z.coerce
3
+ .string()
4
+ .trim()
5
+ .refine((val) => {
6
+ // https://www.twilio.com/docs/glossary/what-e164
7
+ return /^\+[1-9]\d{1,14}$/.test(val);
8
+ }, {
9
+ message: 'Phone number must be in E.164 format: +14155552671',
10
+ });
11
+ export const desired_user_properties = z.object({
12
+ _desired_full_name: z.string(),
13
+ _desired_email: z.string().email().nullish(),
14
+ _desired_phone_number: phone_number.nullish(),
15
+ });
2
16
  const user_fields = z.object({
3
17
  full_name: z.string().optional(),
4
18
  email: z.string().email().optional(),
5
- phone_number: z.coerce
6
- .string()
7
- .trim()
8
- .refine((val) => {
9
- // https://www.twilio.com/docs/glossary/what-e164
10
- return /^\+[1-9]\d{1,14}$/.test(val);
11
- }, {
12
- message: 'Phone number must be in E.164 format: +14155552671',
13
- })
14
- .optional(),
19
+ phone_number: phone_number.optional(),
15
20
  });
16
21
  export const acs_user = z
17
22
  .object({
@@ -1 +1 @@
1
- {"version":3,"file":"user.js","sourceRoot":"","sources":["../../../../../../src/lib/seam/connect/unstable/models/acs/user.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3B,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAChC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE;IACpC,YAAY,EAAE,CAAC,CAAC,MAAM;SACnB,MAAM,EAAE;SACR,IAAI,EAAE;SACN,MAAM,CACL,CAAC,GAAG,EAAE,EAAE;QACN,iDAAiD;QACjD,OAAO,mBAAmB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;IACtC,CAAC,EACD;QACE,OAAO,EAAE,oDAAoD;KAC9D,CACF;SACA,QAAQ,EAAE;CACd,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC;KACtB,MAAM,CAAC;IACN,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IAC9B,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IAChC,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IAC/B,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACjC,YAAY,EAAE,CAAC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MAAM,EAAE,CAAC,QAAQ,EAAE;IACjC,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE;CACzB,CAAC;KACD,KAAK,CAAC,WAAW,CAAC,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seamapi/types",
3
- "version": "1.11.1",
3
+ "version": "1.12.0",
4
4
  "description": "TypeScript types for the Seam API.",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -2040,6 +2040,7 @@ export default {
2040
2040
  schema: {
2041
2041
  properties: {
2042
2042
  access_code_id: { format: 'uuid', type: 'string' },
2043
+ allow_external_modification: { type: 'boolean' },
2043
2044
  force: { type: 'boolean' },
2044
2045
  sync: { default: false, type: 'boolean' },
2045
2046
  },
@@ -2082,6 +2083,7 @@ export default {
2082
2083
  schema: {
2083
2084
  properties: {
2084
2085
  access_code_id: { format: 'uuid', type: 'string' },
2086
+ allow_external_modification: { type: 'boolean' },
2085
2087
  force: { type: 'boolean' },
2086
2088
  sync: { default: false, type: 'boolean' },
2087
2089
  },
@@ -2351,6 +2353,7 @@ export default {
2351
2353
  schema: {
2352
2354
  properties: {
2353
2355
  access_code_id: { format: 'uuid', type: 'string' },
2356
+ allow_external_modification: { type: 'boolean' },
2354
2357
  force: { type: 'boolean' },
2355
2358
  is_managed: { type: 'boolean' },
2356
2359
  },
@@ -2393,6 +2396,7 @@ export default {
2393
2396
  schema: {
2394
2397
  properties: {
2395
2398
  access_code_id: { format: 'uuid', type: 'string' },
2399
+ allow_external_modification: { type: 'boolean' },
2396
2400
  force: { type: 'boolean' },
2397
2401
  is_managed: { type: 'boolean' },
2398
2402
  },
@@ -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: {}
@@ -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