@verifiedinc-public/shared-ui-elements 12.29.0 → 12.29.1-beta.210

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.
Files changed (47) hide show
  1. package/dist/components/NetworkRules/editor/schema.d.ts +14 -110
  2. package/dist/components/NetworkRules/editor/schema.mjs +1 -1
  3. package/dist/components/form/NewOneClickForm/core/fields/address.d.ts +14 -36
  4. package/dist/components/form/NewOneClickForm/core/fields/birthDate.d.ts +1 -1
  5. package/dist/components/form/NewOneClickForm/core/fields/driversLicense.d.ts +32 -102
  6. package/dist/components/form/NewOneClickForm/core/fields/employer.d.ts +9 -101
  7. package/dist/components/form/NewOneClickForm/core/fields/fullName.d.ts +1 -9
  8. package/dist/components/form/NewOneClickForm/core/fields/healthInsurance.d.ts +4 -32
  9. package/dist/components/form/NewOneClickForm/core/fields/index.d.ts +66 -284
  10. package/dist/components/form/NewOneClickForm/core/fields/phone.d.ts +1 -1
  11. package/dist/components/form/NewOneClickForm/core/fields/sex.d.ts +3 -1
  12. package/dist/components/form/NewOneClickForm/core/fields/ssn.d.ts +1 -1
  13. package/dist/components/form/NewOneClickForm/core/form/formField.mjs +1 -1
  14. package/dist/components/form/NewOneClickForm/core/form/formFieldBuilder.mjs +1 -1
  15. package/dist/components/form/NewOneClickForm/core/validations/address/address.schema.d.ts +12 -78
  16. package/dist/components/form/NewOneClickForm/core/validations/address/address.schema.mjs +1 -1
  17. package/dist/components/form/NewOneClickForm/core/validations/address/country.schema.d.ts +1 -1
  18. package/dist/components/form/NewOneClickForm/core/validations/address/state.schema.d.ts +3 -1
  19. package/dist/components/form/NewOneClickForm/core/validations/driversLicense/driversLicense.schema.d.ts +12 -62
  20. package/dist/components/form/NewOneClickForm/core/validations/employer/employer.schema.d.ts +9 -101
  21. package/dist/components/form/NewOneClickForm/core/validations/employer/employer.schema.mjs +1 -1
  22. package/dist/components/form/NewOneClickForm/core/validations/healthInsurance/healthInsurance.schema.d.ts +3 -27
  23. package/dist/components/form/NewOneClickForm/core/validations/healthInsurance/healthInsurance.schema.mjs +1 -1
  24. package/dist/components/form/NewOneClickForm/core/validations/name/fullName.schema.d.ts +1 -9
  25. package/dist/components/form/NewOneClickForm/core/validations/other/birthDate.schema.d.ts +1 -1
  26. package/dist/components/form/NewOneClickForm/core/validations/other/date.schema.d.ts +1 -1
  27. package/dist/components/form/NewOneClickForm/core/validations/other/phone.schema.d.ts +1 -1
  28. package/dist/components/form/NewOneClickForm/core/validations/other/sex.schema.d.ts +3 -1
  29. package/dist/components/form/NewOneClickForm/core/validations/other/sex.schema.mjs +1 -1
  30. package/dist/components/form/NewOneClickForm/core/validations/other/ssn.schema.d.ts +1 -1
  31. package/dist/components/form/NewOneClickForm/react/core/field.hook.mjs +1 -1
  32. package/dist/components/form/NewOneClickForm/react/ui/fields/shared.d.ts +4 -4
  33. package/dist/hooks/useQRCode.mjs +1 -1
  34. package/dist/utils/zod.d.ts +6 -0
  35. package/dist/utils/zod.mjs +1 -0
  36. package/dist/validations/address.schema.d.ts +3 -1
  37. package/dist/validations/date.schema.d.ts +4 -4
  38. package/dist/validations/date.schema.mjs +1 -1
  39. package/dist/validations/email.schema.d.ts +2 -2
  40. package/dist/validations/email.schema.mjs +1 -1
  41. package/dist/validations/field.schema.mjs +1 -1
  42. package/dist/validations/npi.schema.d.ts +1 -1
  43. package/dist/validations/phone.schema.d.ts +1 -1
  44. package/dist/validations/ssn.schema.d.ts +1 -1
  45. package/dist/validations/ssn.schema.mjs +1 -1
  46. package/dist/validations/unix.schema.d.ts +1 -1
  47. package/package.json +14 -19
@@ -1,87 +1,21 @@
1
1
  import { z } from 'zod';
2
- export declare const addressSchema: z.ZodEffects<z.ZodObject<{
2
+ export declare const addressSchema: z.ZodObject<{
3
3
  line1: z.ZodOptional<z.ZodString>;
4
4
  line2: z.ZodOptional<z.ZodString>;
5
5
  city: z.ZodOptional<z.ZodString>;
6
- state: z.ZodOptional<z.ZodEnum<[string, ...string[]]>>;
7
- country: z.ZodOptional<z.ZodEffects<z.ZodString, "US", string>>;
6
+ state: z.ZodOptional<z.ZodEnum<{
7
+ [x: string]: string;
8
+ }>>;
9
+ country: z.ZodOptional<z.ZodString & z.ZodType<"US", string, z.core.$ZodTypeInternals<"US", string>>>;
8
10
  zipCode: z.ZodOptional<z.ZodString>;
9
- }, "strip", z.ZodTypeAny, {
10
- line1?: string | undefined;
11
- line2?: string | undefined;
12
- city?: string | undefined;
13
- state?: string | undefined;
14
- country?: "US" | undefined;
15
- zipCode?: string | undefined;
16
- }, {
17
- line1?: string | undefined;
18
- line2?: string | undefined;
19
- city?: string | undefined;
20
- state?: string | undefined;
21
- country?: string | undefined;
22
- zipCode?: string | undefined;
23
- }>, {
24
- line1?: string | undefined;
25
- line2?: string | undefined;
26
- city?: string | undefined;
27
- state?: string | undefined;
28
- country?: "US" | undefined;
29
- zipCode?: string | undefined;
30
- }, {
31
- line1?: string | undefined;
32
- line2?: string | undefined;
33
- city?: string | undefined;
34
- state?: string | undefined;
35
- country?: string | undefined;
36
- zipCode?: string | undefined;
37
- }>;
38
- export declare const requiredAddressSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
11
+ }, z.core.$strip>;
12
+ export declare const requiredAddressSchema: z.ZodObject<{
39
13
  line1: z.ZodOptional<z.ZodString>;
40
14
  line2: z.ZodOptional<z.ZodString>;
41
15
  city: z.ZodOptional<z.ZodString>;
42
- state: z.ZodOptional<z.ZodEnum<[string, ...string[]]>>;
43
- country: z.ZodOptional<z.ZodEffects<z.ZodString, "US", string>>;
16
+ state: z.ZodOptional<z.ZodEnum<{
17
+ [x: string]: string;
18
+ }>>;
19
+ country: z.ZodOptional<z.ZodString & z.ZodType<"US", string, z.core.$ZodTypeInternals<"US", string>>>;
44
20
  zipCode: z.ZodOptional<z.ZodString>;
45
- }, "strip", z.ZodTypeAny, {
46
- line1?: string | undefined;
47
- line2?: string | undefined;
48
- city?: string | undefined;
49
- state?: string | undefined;
50
- country?: "US" | undefined;
51
- zipCode?: string | undefined;
52
- }, {
53
- line1?: string | undefined;
54
- line2?: string | undefined;
55
- city?: string | undefined;
56
- state?: string | undefined;
57
- country?: string | undefined;
58
- zipCode?: string | undefined;
59
- }>, {
60
- line1?: string | undefined;
61
- line2?: string | undefined;
62
- city?: string | undefined;
63
- state?: string | undefined;
64
- country?: "US" | undefined;
65
- zipCode?: string | undefined;
66
- }, {
67
- line1?: string | undefined;
68
- line2?: string | undefined;
69
- city?: string | undefined;
70
- state?: string | undefined;
71
- country?: string | undefined;
72
- zipCode?: string | undefined;
73
- }>, {
74
- line1?: string | undefined;
75
- line2?: string | undefined;
76
- city?: string | undefined;
77
- state?: string | undefined;
78
- country?: "US" | undefined;
79
- zipCode?: string | undefined;
80
- }, {
81
- line1?: string | undefined;
82
- line2?: string | undefined;
83
- city?: string | undefined;
84
- state?: string | undefined;
85
- country?: string | undefined;
86
- zipCode?: string | undefined;
87
- }>;
21
+ }, z.core.$strip>;
@@ -1 +1 @@
1
- "use strict";import{z as s}from"zod";import{line1Schema as a,line1ValidationMessage as r}from"./line1.schema.mjs";import{line2Schema as O}from"./line2.schema.mjs";import{citySchema as c,cityValidationMessage as p}from"./city.schema.mjs";import{stateSchema as i,stateValidationMessage as d}from"./state.schema.mjs";import{countrySchema as l,countryValidationMessage as n}from"./country.schema.mjs";import{zipCodeSchema as y,zipCodeValidationMessage as m}from"./zipcode.schema.mjs";const u=s.object({line1:a.optional(),line2:O.optional(),city:c.optional(),state:i.optional(),country:l.optional(),zipCode:y.optional()}).superRefine((e,t)=>{if(Object.values(e).every(o=>!o))return!0;(Object.prototype.hasOwnProperty.call(e,"line1")||Object.prototype.hasOwnProperty.call(e,"line2")||Object.prototype.hasOwnProperty.call(e,"city")||Object.prototype.hasOwnProperty.call(e,"state")||Object.prototype.hasOwnProperty.call(e,"country")||Object.prototype.hasOwnProperty.call(e,"zipCode"))&&(Object.prototype.hasOwnProperty.call(e,"line1")&&(!e.line1||e.line1.trim()==="")&&(a.safeParse(e.line1).success||t.addIssue({code:s.ZodIssueCode.custom,path:["line1"],message:r})),Object.prototype.hasOwnProperty.call(e,"city")&&(!e.city||e.city.trim()==="")&&(c.safeParse(e.city).success||t.addIssue({code:s.ZodIssueCode.custom,path:["city"],message:p})),Object.prototype.hasOwnProperty.call(e,"state")&&(i.safeParse(e.state).success||t.addIssue({code:s.ZodIssueCode.custom,path:["state"],message:d})),Object.prototype.hasOwnProperty.call(e,"country")&&(l.safeParse(e.country).success||t.addIssue({code:s.ZodIssueCode.custom,path:["country"],message:n})),Object.prototype.hasOwnProperty.call(e,"zipCode")&&(y.safeParse(e.zipCode).success||t.addIssue({code:s.ZodIssueCode.custom,path:["zipCode"],message:m})))}),f=[["line1",r],["city",p],["state",d],["zipCode",m],["country",n]],P=u.superRefine((e,t)=>{f.forEach(([o,h])=>{e[o]||t.addIssue({code:s.ZodIssueCode.custom,path:[o],message:h})})});export{u as addressSchema,P as requiredAddressSchema};
1
+ "use strict";import{z as h}from"zod";import{line1Schema as s,line1ValidationMessage as o}from"./line1.schema.mjs";import{line2Schema as O}from"./line2.schema.mjs";import{citySchema as c,cityValidationMessage as r}from"./city.schema.mjs";import{stateSchema as p,stateValidationMessage as i}from"./state.schema.mjs";import{countrySchema as l,countryValidationMessage as n}from"./country.schema.mjs";import{zipCodeSchema as y,zipCodeValidationMessage as d}from"./zipcode.schema.mjs";const m=h.object({line1:s.optional(),line2:O.optional(),city:c.optional(),state:p.optional(),country:l.optional(),zipCode:y.optional()}).superRefine((e,t)=>{Object.values(e).every(a=>!a)||(Object.prototype.hasOwnProperty.call(e,"line1")||Object.prototype.hasOwnProperty.call(e,"line2")||Object.prototype.hasOwnProperty.call(e,"city")||Object.prototype.hasOwnProperty.call(e,"state")||Object.prototype.hasOwnProperty.call(e,"country")||Object.prototype.hasOwnProperty.call(e,"zipCode"))&&(Object.prototype.hasOwnProperty.call(e,"line1")&&(!e.line1||e.line1.trim()==="")&&(s.safeParse(e.line1).success||t.addIssue({code:"custom",path:["line1"],message:o})),Object.prototype.hasOwnProperty.call(e,"city")&&(!e.city||e.city.trim()==="")&&(c.safeParse(e.city).success||t.addIssue({code:"custom",path:["city"],message:r})),Object.prototype.hasOwnProperty.call(e,"state")&&(p.safeParse(e.state).success||t.addIssue({code:"custom",path:["state"],message:i})),Object.prototype.hasOwnProperty.call(e,"country")&&(l.safeParse(e.country).success||t.addIssue({code:"custom",path:["country"],message:n})),Object.prototype.hasOwnProperty.call(e,"zipCode")&&(y.safeParse(e.zipCode).success||t.addIssue({code:"custom",path:["zipCode"],message:d})))}),f=[["line1",o],["city",r],["state",i],["zipCode",d],["country",n]],P=m.superRefine((e,t)=>{f.forEach(([a,u])=>{e[a]||t.addIssue({code:"custom",path:[a],message:u})})});export{m as addressSchema,P as requiredAddressSchema};
@@ -4,4 +4,4 @@ export declare const countryValidationMessage = "Country must be US";
4
4
  * Validation schema for country
5
5
  * Currently only supports US
6
6
  */
7
- export declare const countrySchema: z.ZodEffects<z.ZodString, "US", string>;
7
+ export declare const countrySchema: z.ZodString & z.ZodType<"US", string, z.core.$ZodTypeInternals<"US", string>>;
@@ -4,4 +4,6 @@ export declare const stateValidationMessage = "Invalid state";
4
4
  * Validation schema for US state
5
5
  * Validates against US state codes
6
6
  */
7
- export declare const stateSchema: z.ZodEnum<[string, ...string[]]>;
7
+ export declare const stateSchema: z.ZodEnum<{
8
+ [x: string]: string;
9
+ }>;
@@ -1,69 +1,19 @@
1
1
  import { z } from 'zod';
2
2
  export declare const driversLicenseSchema: z.ZodObject<{
3
3
  documentNumber: z.ZodString;
4
- issuanceState: z.ZodEnum<[string, ...string[]]>;
5
- issuanceDate: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
6
- expirationDate: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
7
- address: z.ZodEffects<z.ZodObject<{
4
+ issuanceState: z.ZodEnum<{
5
+ [x: string]: string;
6
+ }>;
7
+ issuanceDate: z.ZodString;
8
+ expirationDate: z.ZodString;
9
+ address: z.ZodObject<{
8
10
  line1: z.ZodOptional<z.ZodString>;
9
11
  line2: z.ZodOptional<z.ZodString>;
10
12
  city: z.ZodOptional<z.ZodString>;
11
- state: z.ZodOptional<z.ZodEnum<[string, ...string[]]>>;
12
- country: z.ZodOptional<z.ZodEffects<z.ZodString, "US", string>>;
13
+ state: z.ZodOptional<z.ZodEnum<{
14
+ [x: string]: string;
15
+ }>>;
16
+ country: z.ZodOptional<z.ZodString & z.ZodType<"US", string, z.core.$ZodTypeInternals<"US", string>>>;
13
17
  zipCode: z.ZodOptional<z.ZodString>;
14
- }, "strip", z.ZodTypeAny, {
15
- line1?: string | undefined;
16
- line2?: string | undefined;
17
- city?: string | undefined;
18
- state?: string | undefined;
19
- country?: "US" | undefined;
20
- zipCode?: string | undefined;
21
- }, {
22
- line1?: string | undefined;
23
- line2?: string | undefined;
24
- city?: string | undefined;
25
- state?: string | undefined;
26
- country?: string | undefined;
27
- zipCode?: string | undefined;
28
- }>, {
29
- line1?: string | undefined;
30
- line2?: string | undefined;
31
- city?: string | undefined;
32
- state?: string | undefined;
33
- country?: "US" | undefined;
34
- zipCode?: string | undefined;
35
- }, {
36
- line1?: string | undefined;
37
- line2?: string | undefined;
38
- city?: string | undefined;
39
- state?: string | undefined;
40
- country?: string | undefined;
41
- zipCode?: string | undefined;
42
- }>;
43
- }, "strip", z.ZodTypeAny, {
44
- address: {
45
- line1?: string | undefined;
46
- line2?: string | undefined;
47
- city?: string | undefined;
48
- state?: string | undefined;
49
- country?: "US" | undefined;
50
- zipCode?: string | undefined;
51
- };
52
- documentNumber: string;
53
- issuanceState: string;
54
- issuanceDate: string;
55
- expirationDate: string;
56
- }, {
57
- address: {
58
- line1?: string | undefined;
59
- line2?: string | undefined;
60
- city?: string | undefined;
61
- state?: string | undefined;
62
- country?: string | undefined;
63
- zipCode?: string | undefined;
64
- };
65
- documentNumber: string;
66
- issuanceState: string;
67
- issuanceDate: string;
68
- expirationDate: string;
69
- }>;
18
+ }, z.core.$strip>;
19
+ }, z.core.$strip>;
@@ -3,109 +3,17 @@ export declare const employerSchema: z.ZodObject<{
3
3
  employer: z.ZodObject<{
4
4
  name: z.ZodString;
5
5
  legalName: z.ZodOptional<z.ZodString>;
6
- address: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodObject<{
6
+ address: z.ZodOptional<z.ZodObject<{
7
7
  line1: z.ZodOptional<z.ZodString>;
8
8
  line2: z.ZodOptional<z.ZodString>;
9
9
  city: z.ZodOptional<z.ZodString>;
10
- state: z.ZodOptional<z.ZodEnum<[string, ...string[]]>>;
11
- country: z.ZodOptional<z.ZodEffects<z.ZodString, "US", string>>;
10
+ state: z.ZodOptional<z.ZodEnum<{
11
+ [x: string]: string;
12
+ }>>;
13
+ country: z.ZodOptional<z.ZodString & z.ZodType<"US", string, z.core.$ZodTypeInternals<"US", string>>>;
12
14
  zipCode: z.ZodOptional<z.ZodString>;
13
- }, "strip", z.ZodTypeAny, {
14
- line1?: string | undefined;
15
- line2?: string | undefined;
16
- city?: string | undefined;
17
- state?: string | undefined;
18
- country?: "US" | undefined;
19
- zipCode?: string | undefined;
20
- }, {
21
- line1?: string | undefined;
22
- line2?: string | undefined;
23
- city?: string | undefined;
24
- state?: string | undefined;
25
- country?: string | undefined;
26
- zipCode?: string | undefined;
27
- }>, {
28
- line1?: string | undefined;
29
- line2?: string | undefined;
30
- city?: string | undefined;
31
- state?: string | undefined;
32
- country?: "US" | undefined;
33
- zipCode?: string | undefined;
34
- }, {
35
- line1?: string | undefined;
36
- line2?: string | undefined;
37
- city?: string | undefined;
38
- state?: string | undefined;
39
- country?: string | undefined;
40
- zipCode?: string | undefined;
41
- }>, {
42
- line1?: string | undefined;
43
- line2?: string | undefined;
44
- city?: string | undefined;
45
- state?: string | undefined;
46
- country?: "US" | undefined;
47
- zipCode?: string | undefined;
48
- }, {
49
- line1?: string | undefined;
50
- line2?: string | undefined;
51
- city?: string | undefined;
52
- state?: string | undefined;
53
- country?: string | undefined;
54
- zipCode?: string | undefined;
55
- }>>;
56
- logoUrl: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodLiteral<"">]>>>;
57
- }, "strip", z.ZodTypeAny, {
58
- name: string;
59
- address?: {
60
- line1?: string | undefined;
61
- line2?: string | undefined;
62
- city?: string | undefined;
63
- state?: string | undefined;
64
- country?: "US" | undefined;
65
- zipCode?: string | undefined;
66
- } | undefined;
67
- logoUrl?: string | null | undefined;
68
- legalName?: string | undefined;
69
- }, {
70
- name: string;
71
- address?: {
72
- line1?: string | undefined;
73
- line2?: string | undefined;
74
- city?: string | undefined;
75
- state?: string | undefined;
76
- country?: string | undefined;
77
- zipCode?: string | undefined;
78
- } | undefined;
79
- logoUrl?: string | null | undefined;
80
- legalName?: string | undefined;
81
- }>;
82
- }, "strip", z.ZodTypeAny, {
83
- employer: {
84
- name: string;
85
- address?: {
86
- line1?: string | undefined;
87
- line2?: string | undefined;
88
- city?: string | undefined;
89
- state?: string | undefined;
90
- country?: "US" | undefined;
91
- zipCode?: string | undefined;
92
- } | undefined;
93
- logoUrl?: string | null | undefined;
94
- legalName?: string | undefined;
95
- };
96
- }, {
97
- employer: {
98
- name: string;
99
- address?: {
100
- line1?: string | undefined;
101
- line2?: string | undefined;
102
- city?: string | undefined;
103
- state?: string | undefined;
104
- country?: string | undefined;
105
- zipCode?: string | undefined;
106
- } | undefined;
107
- logoUrl?: string | null | undefined;
108
- legalName?: string | undefined;
109
- };
110
- }>;
15
+ }, z.core.$strip>>;
16
+ logoUrl: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>>>;
17
+ }, z.core.$strip>;
18
+ }, z.core.$strip>;
111
19
  export type EmployerValue = z.infer<typeof employerSchema>;
@@ -1 +1 @@
1
- "use strict";import{z as e}from"zod";import{employerNameSchema as o}from"./employerName.schema.mjs";import{legalNameSchema as r}from"./legalName.schema.mjs";import{requiredAddressSchema as m}from"../address/address.schema.mjs";const a=e.object({employer:e.object({name:o,legalName:r.optional(),address:m.optional(),logoUrl:e.union([e.string().url(),e.literal("")]).nullish()})});export{a as employerSchema};
1
+ "use strict";import{z as e}from"zod";import{employerNameSchema as o}from"./employerName.schema.mjs";import{legalNameSchema as r}from"./legalName.schema.mjs";import{requiredAddressSchema as a}from"../address/address.schema.mjs";const m=e.object({employer:e.object({name:o,legalName:r.optional(),address:a.optional(),logoUrl:e.union([e.url("Invalid url"),e.literal("")]).nullish()})});export{m as employerSchema};
@@ -5,31 +5,7 @@ export declare const healthInsuranceSchema: z.ZodObject<{
5
5
  payer: z.ZodObject<{
6
6
  verifiedId: z.ZodString;
7
7
  name: z.ZodString;
8
- logoUrl: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodLiteral<"">]>>>;
9
- }, "strip", z.ZodTypeAny, {
10
- name: string;
11
- verifiedId: string;
12
- logoUrl?: string | null | undefined;
13
- }, {
14
- name: string;
15
- verifiedId: string;
16
- logoUrl?: string | null | undefined;
17
- }>;
18
- }, "strip", z.ZodTypeAny, {
19
- memberId: string;
20
- payer: {
21
- name: string;
22
- verifiedId: string;
23
- logoUrl?: string | null | undefined;
24
- };
25
- id?: number | undefined;
26
- }, {
27
- memberId: string;
28
- payer: {
29
- name: string;
30
- verifiedId: string;
31
- logoUrl?: string | null | undefined;
32
- };
33
- id?: number | undefined;
34
- }>;
8
+ logoUrl: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>>>;
9
+ }, z.core.$strip>;
10
+ }, z.core.$strip>;
35
11
  export type HealthInsuranceValue = z.infer<typeof healthInsuranceSchema>;
@@ -1 +1 @@
1
- "use strict";import{z as e}from"zod";import{memberIdSchema as r}from"./memberId.schema.mjs";import{payerNameSchema as m}from"./payerName.schema.mjs";const a=e.object({id:e.number().optional(),memberId:r,payer:e.object({verifiedId:e.string().regex(/^V\d+$/),name:m,logoUrl:e.union([e.string().url(),e.literal("")]).nullish()})});export{a as healthInsuranceSchema};
1
+ "use strict";import{z as e}from"zod";import{memberIdSchema as r}from"./memberId.schema.mjs";import{payerNameSchema as a}from"./payerName.schema.mjs";const m=e.object({id:e.number().optional(),memberId:r,payer:e.object({verifiedId:e.string().regex(/^V\d+$/,"Invalid"),name:a,logoUrl:e.union([e.url("Invalid url"),e.literal("")]).nullish()})});export{m as healthInsuranceSchema};
@@ -3,12 +3,4 @@ export declare const fullNameSchema: z.ZodObject<{
3
3
  firstName: z.ZodString;
4
4
  lastName: z.ZodString;
5
5
  middleName: z.ZodString;
6
- }, "strip", z.ZodTypeAny, {
7
- firstName: string;
8
- lastName: string;
9
- middleName: string;
10
- }, {
11
- firstName: string;
12
- lastName: string;
13
- middleName: string;
14
- }>;
6
+ }, z.core.$strip>;
@@ -1 +1 @@
1
- export declare const birthDateSchema: import('zod').ZodEffects<import('zod').ZodEffects<import('zod').ZodEffects<import('zod').ZodString, string, string>, string, string>, string, string>;
1
+ export declare const birthDateSchema: import('zod').ZodString;
@@ -1 +1 @@
1
- export declare const dateSchema: import('zod').ZodEffects<import('zod').ZodEffects<import('zod').ZodString, string, string>, string, string>;
1
+ export declare const dateSchema: import('zod').ZodString;
@@ -1 +1 @@
1
- export declare const phoneSchema: import('zod').ZodEffects<import('zod').ZodString, string, string>;
1
+ export declare const phoneSchema: import('zod').ZodString;
@@ -16,4 +16,6 @@ export declare const sexOptions: readonly [{
16
16
  * Validation schema for sex selection
17
17
  * Validates against predefined sex options
18
18
  */
19
- export declare const sexSchema: z.ZodEnum<[string, ...string[]]>;
19
+ export declare const sexSchema: z.ZodEnum<{
20
+ [x: string]: string;
21
+ }>;
@@ -1 +1 @@
1
- "use strict";import{z as l}from"zod";const a=[{label:"Male",value:"Male"},{label:"Female",value:"Female"},{label:"Non-Binary",value:"Non-Binary"}],o=l.enum(a.map(e=>e.value));export{a as sexOptions,o as sexSchema};
1
+ "use strict";import{z as l}from"zod";import{zod3EnumError as o}from"../../../../../../utils/zod.mjs";const a=[{label:"Male",value:"Male"},{label:"Female",value:"Female"},{label:"Non-Binary",value:"Non-Binary"}],r=l.enum(a.map(e=>e.value),{error:o});export{a as sexOptions,r as sexSchema};
@@ -3,4 +3,4 @@ import { z } from 'zod';
3
3
  * Validation schema for SSN field in forms
4
4
  * Supports both masked (•••-••-1234 or ***-**-1234) and unmasked (123456789) formats
5
5
  */
6
- export declare const ssnSchema: z.ZodEffects<z.ZodString, string, string>;
6
+ export declare const ssnSchema: z.ZodString;
@@ -1 +1 @@
1
- "use strict";import{useCallback as t}from"react";import{useForm as f}from"./form.context.mjs";import{fieldInputTypes as S}from"../../core/fields/constants.mjs";const y=({key:i,validateOnChange:r=!0,validateOnBlur:u=!0})=>{var s,n,c,v;const{updateFieldValue:e,setFieldTouched:d,getField:p,validateForm:o}=f(),l=p(i),V=t(a=>{e(i,a),r&&o()},[i,e,o,r]),F=t((a,h)=>{e(`${i}.${a}`,h),r&&o()},[i,e,o,r]),T=t(a=>{d(i,a),a&&u&&o()},[i,d,o,u]),g=t(()=>o(),[o]),$=t(a=>{l?.schema.characteristics.inputType===S.composite?Object.keys(l?.children??{}).forEach(h=>{var m;(m=a?.ignoreKeys)!=null&&m.includes(h)||(e(`${i}.${h}`,""),d(`${i}.${h}`,!0))}):(e(i,""),d(i,!0))},[i,l,e,d]),D=t(()=>{l&&(e(i,l.defaultValue),d(i,!1))},[i,l,e,d]),k=((v=(c=(n=(s=l?.errors)==null?void 0:s.error)==null?void 0:n.errors)==null?void 0:c[0])==null?void 0:v.message)??null,C=l?.touched??!1;return{field:l,value:l?.value??"",setValue:V,setChildValue:F,error:k,isDirty:l?.isDirty??!1,isValid:l?.isValid??!0,isTouched:C,setTouched:T,validate:g,reset:D,clear:$}},b=i=>{const r=y(i);return{...r,inputProps:{id:i.key,value:r.value||"",onChange:u=>{r.setValue(u.target.value)},onBlur:()=>{r.setTouched(!0)},"aria-invalid":!r.isValid,"aria-describedby":r.error?`${i.key}-error`:void 0}}},q=i=>{var r,u,s,n,c,v;const e=b(i),{state:{isSubmitting:d,isSubmitSuccess:p}}=f();return{...e,fieldProps:{label:(r=e.field)==null?void 0:r.schema.characteristics.label,placeholder:e.field&&"placeholder"in((u=e.field)==null?void 0:u.schema.characteristics)?(s=e.field)==null?void 0:s.schema.characteristics.placeholder:void 0,required:(n=e.field)==null?void 0:n.isRequired,disabled:d||p||((c=e.field)==null?void 0:c.isDisabled),description:(v=e.field)==null?void 0:v.description,error:e.error,isDirty:e.isDirty,isValid:e.isValid,isTouched:e.isTouched}}};export{y as useField,b as useFieldInput,q as useFormField};
1
+ "use strict";import{useCallback as s}from"react";import{useForm as f}from"./form.context.mjs";import{fieldInputTypes as S}from"../../core/fields/constants.mjs";const y=({key:i,validateOnChange:d=!0,validateOnBlur:u=!0})=>{var t,n,c,v;const{updateFieldValue:e,setFieldTouched:r,getField:p,validateForm:o}=f(),l=p(i),V=s(a=>{e(i,a),d&&o()},[i,e,o,d]),F=s((a,h)=>{e(`${i}.${a}`,h),d&&o()},[i,e,o,d]),T=s(a=>{r(i,a),a&&u&&o()},[i,r,o,u]),g=s(()=>o(),[o]),$=s(a=>{l?.schema.characteristics.inputType===S.composite?Object.keys(l?.children??{}).forEach(h=>{var m;(m=a?.ignoreKeys)!=null&&m.includes(h)||(e(`${i}.${h}`,""),r(`${i}.${h}`,!0))}):(e(i,""),r(i,!0))},[i,l,e,r]),D=s(()=>{l&&(e(i,l.defaultValue),r(i,!1))},[i,l,e,r]),k=((v=(c=(n=(t=l?.errors)==null?void 0:t.error)==null?void 0:n.issues)==null?void 0:c[0])==null?void 0:v.message)??null,C=l?.touched??!1;return{field:l,value:l?.value??"",setValue:V,setChildValue:F,error:k,isDirty:l?.isDirty??!1,isValid:l?.isValid??!0,isTouched:C,setTouched:T,validate:g,reset:D,clear:$}},b=i=>{const d=y(i);return{...d,inputProps:{id:i.key,value:d.value||"",onChange:u=>{d.setValue(u.target.value)},onBlur:()=>{d.setTouched(!0)},"aria-invalid":!d.isValid,"aria-describedby":d.error?`${i.key}-error`:void 0}}},q=i=>{var d,u,t,n,c,v;const e=b(i),{state:{isSubmitting:r,isSubmitSuccess:p}}=f();return{...e,fieldProps:{label:(d=e.field)==null?void 0:d.schema.characteristics.label,placeholder:e.field&&"placeholder"in((u=e.field)==null?void 0:u.schema.characteristics)?(t=e.field)==null?void 0:t.schema.characteristics.placeholder:void 0,required:(n=e.field)==null?void 0:n.isRequired,disabled:r||p||((c=e.field)==null?void 0:c.isDisabled),description:(v=e.field)==null?void 0:v.description,error:e.error,isDirty:e.isDirty,isValid:e.isValid,isTouched:e.isTouched}}};export{y as useField,b as useFieldInput,q as useFormField};
@@ -24,14 +24,15 @@ export declare const makeAttributes: ({ userPrivacyEnabled, field, fieldKey, opt
24
24
  'data-verified-sdk-field-value': string | {
25
25
  memberId: string;
26
26
  payer: {
27
- name: string;
28
27
  verifiedId: string;
28
+ name: string;
29
29
  logoUrl?: string | null | undefined;
30
30
  };
31
31
  id?: number | undefined;
32
32
  } | {
33
33
  employer: {
34
34
  name: string;
35
+ legalName?: string | undefined;
35
36
  address?: {
36
37
  line1?: string | undefined;
37
38
  line2?: string | undefined;
@@ -41,7 +42,6 @@ export declare const makeAttributes: ({ userPrivacyEnabled, field, fieldKey, opt
41
42
  zipCode?: string | undefined;
42
43
  } | undefined;
43
44
  logoUrl?: string | null | undefined;
44
- legalName?: string | undefined;
45
45
  };
46
46
  } | {
47
47
  firstName?: string | undefined;
@@ -76,14 +76,15 @@ export declare function getAutoCompleteAttributeValue(key: string): "off" | "tel
76
76
  export declare const getFieldValue: (field: FormField, options: OneClickFormOptions) => string | {
77
77
  memberId: string;
78
78
  payer: {
79
- name: string;
80
79
  verifiedId: string;
80
+ name: string;
81
81
  logoUrl?: string | null | undefined;
82
82
  };
83
83
  id?: number | undefined;
84
84
  } | {
85
85
  employer: {
86
86
  name: string;
87
+ legalName?: string | undefined;
87
88
  address?: {
88
89
  line1?: string | undefined;
89
90
  line2?: string | undefined;
@@ -93,7 +94,6 @@ export declare const getFieldValue: (field: FormField, options: OneClickFormOpti
93
94
  zipCode?: string | undefined;
94
95
  } | undefined;
95
96
  logoUrl?: string | null | undefined;
96
- legalName?: string | undefined;
97
97
  };
98
98
  } | {
99
99
  firstName?: string | undefined;
@@ -1 +1 @@
1
- "use strict";import{useMemo as $}from"react";import*as d from"qrcode";function f(t){const r=$(()=>d.create(t.data),[t.data]).modules.data;return $(()=>{const s=t.size/Math.sqrt(r.length);let a=`<svg viewBox="0 0 ${t.size} ${t.size}" xmlns="http://www.w3.org/2000/svg">`;const e=t.imageSize,n=(t.size-e)/2,h=(t.size-e)/2;for(let o=0;o<r.length;o++){const i=o%Math.sqrt(r.length)*s,l=Math.floor(o/Math.sqrt(r.length))*s,g=s/2,m=r[o]===1,c=i+s>=n&&i<n+e&&l+s>=h&&l<h+e;!m||c||(a+=`<rect x="${i}" y="${l}" width="${s}" height="${s}" rx="${g}" ry="${g}" fill='${t.fill||"#000000"}' />`)}return a+="</svg>",a},[r,t])}export{f as useQRCode};
1
+ "use strict";import{useMemo as h}from"react";import*as $ from"qrcode";function f(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")}function d(t){const r=h(()=>$.create(t.data),[t.data]).modules.data;return h(()=>{const e=t.size/Math.sqrt(r.length);let o=`<svg viewBox="0 0 ${t.size} ${t.size}" xmlns="http://www.w3.org/2000/svg">`;const a=t.imageSize,i=(t.size-a)/2,n=(t.size-a)/2,p=f(t.fill||"#000000");for(let s=0;s<r.length;s++){const l=s%Math.sqrt(r.length)*e,g=Math.floor(s/Math.sqrt(r.length))*e,c=e/2,m=r[s]===1,u=l+e>=i&&l<i+a&&g+e>=n&&g<n+a;!m||u||(o+=`<rect x="${l}" y="${g}" width="${e}" height="${e}" rx="${c}" ry="${c}" fill='${p}' />`)}return o+="</svg>",o},[r,t])}export{d as useQRCode};
@@ -0,0 +1,6 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * The message zod 3 gave for a value outside an enum. Forms show it as is, so the move to zod 4
4
+ * keeps it word for word (ENG-917).
5
+ */
6
+ export declare const zod3EnumError: (issue: z.core.$ZodRawIssue) => string | undefined;
@@ -0,0 +1 @@
1
+ "use strict";const t=e=>e===null?"null":Array.isArray(e)?"array":typeof e=="number"&&Number.isNaN(e)?"nan":typeof e,u=e=>{if(e.code!=="invalid_value")return;const n=e.values.map(i=>`'${String(i)}'`).join(" | ");return e.input===void 0?"Required":typeof e.input=="string"?`Invalid enum value. Expected ${n}, received '${e.input}'`:`Expected ${n}, received ${t(e.input)}`};export{u as zod3EnumError};
@@ -1,2 +1,4 @@
1
- export declare const stateSchema: import('zod').ZodEnum<[string, ...string[]]>;
1
+ export declare const stateSchema: import('zod').ZodEnum<{
2
+ [x: string]: string;
3
+ }>;
2
4
  export declare const zipCodeSchema: import('zod').ZodString;
@@ -1,11 +1,11 @@
1
1
  import * as zod from 'zod';
2
- export declare const USDateSchema: zod.ZodEffects<zod.ZodString, string, string>;
3
- export declare const getDateSchemaWithPastValidation: (message: string) => zod.ZodEffects<zod.ZodDate, Date, Date>;
2
+ export declare const USDateSchema: zod.ZodString;
3
+ export declare const getDateSchemaWithPastValidation: (message: string) => zod.ZodDate;
4
4
  export declare const validateTimestamp: (timestampString: string) => boolean;
5
5
  export declare const validateMinimumDate1900: (timestampString: string) => boolean;
6
6
  export declare const refineTimestamp: (value: string) => boolean;
7
7
  export declare const refineMinimumDate1900: (value: string) => boolean;
8
8
  export declare const validateAge18Plus: (timestampString: string) => boolean;
9
9
  export declare const refineAge18Plus: (value: string) => boolean;
10
- export declare const dateSchema: zod.ZodEffects<zod.ZodEffects<zod.ZodString, string, string>, string, string>;
11
- export declare const birthDateSchema: zod.ZodEffects<zod.ZodEffects<zod.ZodEffects<zod.ZodString, string, string>, string, string>, string, string>;
10
+ export declare const dateSchema: zod.ZodString;
11
+ export declare const birthDateSchema: zod.ZodString;
@@ -1 +1 @@
1
- "use strict";import*as r from"zod";const l=r.string().refine(e=>{if(/^\d{2}\/\d{2}\/\d{4}$/.test(e)){const t=Date.parse(String(new Date(e)));return!isNaN(t)}return!1},"Date is invalid"),N=e=>r.date().refine(t=>t.getTime()<Date.now(),{message:e}),o=e=>{if(!/^-?\d+$/.test(e)||e==="NaN"||e==="")return!1;const t=parseInt(e,10);if(isNaN(t))return!1;const a=new Date(t);if(isNaN(a.getTime()))return!1;const s=a.getUTCHours(),u=a.getUTCMinutes(),f=a.getUTCSeconds(),c=a.getUTCMilliseconds();return!(s!==12||u!==0||f!==0||c!==0)},d=e=>{if(e==="NaN"||e==="")return!1;const t=parseInt(e,10);if(isNaN(t))return!1;const a=new Date(t);if(isNaN(a.getTime()))return!1;const s=Date.UTC(1900,0,1,0,0,0,0);return t>=s},g=e=>o(e),m=e=>/^-?\d+$/.test(e)?d(e):!1,D=e=>{const t=parseInt(e,10),a=new Date(t),s=new Date,u=new Date(Date.UTC(s.getUTCFullYear()-18,s.getUTCMonth(),s.getUTCDate(),23,59,59,999));return a.getTime()<=u.getTime()},T=e=>D(e),U=/^\d{4}-\d{2}-\d{2}$/,C=/^•{4}-\d{2}-\d{2}$/,n=e=>U.test(e)&&!isNaN(new Date(e).getTime()),i=e=>C.test(e),w=e=>{const t=new Date(e),a=new Date;return a.setUTCFullYear(a.getUTCFullYear()-18),t<=a},p=r.string().refine(e=>i(e)||n(e)||g(e),"").refine(e=>i(e)||n(e)||m(e),""),h=r.string().refine(e=>i(e)||n(e)||g(e),"").refine(e=>i(e)||(n(e)?Number(e.slice(0,4))>=1900:m(e)),"").refine(e=>i(e)?!0:n(e)?w(e):T(e),"Must be 18 years or older");export{l as USDateSchema,h as birthDateSchema,p as dateSchema,N as getDateSchemaWithPastValidation,T as refineAge18Plus,m as refineMinimumDate1900,g as refineTimestamp,D as validateAge18Plus,d as validateMinimumDate1900,o as validateTimestamp};
1
+ "use strict";import*as i from"zod";const l=i.string().refine(e=>{if(/^\d{2}\/\d{2}\/\d{4}$/.test(e)){const t=Date.parse(String(new Date(e)));return!isNaN(t)}return!1},"Date is invalid"),N=e=>i.date().refine(t=>t.getTime()<Date.now(),{message:e}),m=e=>{if(!/^-?\d+$/.test(e)||e==="NaN"||e==="")return!1;const t=parseInt(e,10);if(isNaN(t))return!1;const a=new Date(t);if(isNaN(a.getTime()))return!1;const r=a.getUTCHours(),o=a.getUTCMinutes(),f=a.getUTCSeconds(),c=a.getUTCMilliseconds();return!(r!==12||o!==0||f!==0||c!==0)},d=e=>{if(e==="NaN"||e==="")return!1;const t=parseInt(e,10);if(isNaN(t))return!1;const a=new Date(t);if(isNaN(a.getTime()))return!1;const r=Date.UTC(1900,0,1,0,0,0,0);return t>=r},u=e=>m(e),g=e=>/^-?\d+$/.test(e)?d(e):!1,D=e=>{const t=parseInt(e,10),a=new Date(t),r=new Date,o=new Date(Date.UTC(r.getUTCFullYear()-18,r.getUTCMonth(),r.getUTCDate(),23,59,59,999));return a.getTime()<=o.getTime()},T=e=>D(e),U=/^\d{4}-\d{2}-\d{2}$/,C=/^•{4}-\d{2}-\d{2}$/,s=e=>U.test(e)&&!isNaN(new Date(e).getTime()),n=e=>C.test(e),w=e=>{const t=new Date(e),a=new Date;return a.setUTCFullYear(a.getUTCFullYear()-18),t<=a},p=i.string().refine(e=>n(e)||s(e)||u(e),{error:""}).refine(e=>n(e)||s(e)||g(e),{error:""}),h=i.string().refine(e=>n(e)||s(e)||u(e),{error:""}).refine(e=>n(e)||(s(e)?Number(e.slice(0,4))>=1900:g(e)),{error:""}).refine(e=>n(e)?!0:s(e)?w(e):T(e),"Must be 18 years or older");export{l as USDateSchema,h as birthDateSchema,p as dateSchema,N as getDateSchemaWithPastValidation,T as refineAge18Plus,g as refineMinimumDate1900,u as refineTimestamp,D as validateAge18Plus,d as validateMinimumDate1900,m as validateTimestamp};
@@ -1,3 +1,3 @@
1
1
  import { z } from 'zod';
2
- export declare const emailSchema: z.ZodString;
3
- export declare const businessEmailSchema: z.ZodEffects<z.ZodString, string, string>;
2
+ export declare const emailSchema: z.ZodEmail;
3
+ export declare const businessEmailSchema: z.ZodString;
@@ -1 +1 @@
1
- "use strict";import{z as s}from"zod";import{emailRegexPattern as r}from"../constants/email.mjs";const a=s.string().email(),t=s.string().refine(e=>a.safeParse(e).success&&new RegExp(r).test(e));export{t as businessEmailSchema,a as emailSchema};
1
+ "use strict";import{z as s}from"zod";import{emailRegexPattern as m}from"../constants/email.mjs";const a=s.email("Invalid email"),i=s.string().refine(e=>a.safeParse(e).success&&new RegExp(m).test(e));export{i as businessEmailSchema,a as emailSchema};
@@ -1 +1 @@
1
- "use strict";import{z as i}from"zod";const o=i.string().min(1);export{o as fieldSchema};
1
+ "use strict";import{z as t}from"zod";const a=t.string().min(1,"String must contain at least 1 character(s)");export{a as fieldSchema};
@@ -1,2 +1,2 @@
1
1
  import { z as zod } from 'zod';
2
- export declare const npiSchema: zod.ZodEffects<zod.ZodString, string, string>;
2
+ export declare const npiSchema: zod.ZodString;
@@ -1,2 +1,2 @@
1
1
  import * as zod from 'zod';
2
- export declare const phoneSchema: zod.ZodEffects<zod.ZodString, string, string>;
2
+ export declare const phoneSchema: zod.ZodString;
@@ -5,4 +5,4 @@ export declare const SSNSchema: z.ZodString;
5
5
  * When dealing with masked SSN, in the backend you will need to call 1-Click API GET to get the unmasked version of SSN again.
6
6
  * If this is the user input SSN there will be no need to call the 1-Click API GET.
7
7
  */
8
- export declare const MaskedAndUnmaskedSSNSchema: z.ZodEffects<z.ZodString, string, string>;
8
+ export declare const MaskedAndUnmaskedSSNSchema: z.ZodString;
@@ -1 +1 @@
1
- "use strict";import{z as e}from"zod";const t=/^(?!666|9\d{2})\d{3}(?!00)\d{2}(?!0{4})\d{4}$/,a=e.string().regex(t),d=e.string().refine(s=>/^•••-••-(\d{4})$/.test(s)||t.test(s),{message:"Invalid SSN"});export{d as MaskedAndUnmaskedSSNSchema,a as SSNSchema};
1
+ "use strict";import{z as e}from"zod";const a=/^(?!666|9\d{2})\d{3}(?!00)\d{2}(?!0{4})\d{4}$/,d=e.string().regex(a,"Invalid"),n=e.string().refine(s=>/^•••-••-(\d{4})$/.test(s)||a.test(s),{message:"Invalid SSN"});export{n as MaskedAndUnmaskedSSNSchema,d as SSNSchema};
@@ -1,2 +1,2 @@
1
1
  import { z as zod } from 'zod';
2
- export declare const getUnixSchema: (message?: string) => zod.ZodEffects<zod.ZodString, string, string>;
2
+ export declare const getUnixSchema: (message?: string) => zod.ZodString;