@nodii/onboarding 0.1.0-dev.0 → 0.1.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/README.md +78 -0
- package/dist/chunk-AZE3NPSY.js +186 -0
- package/dist/chunk-AZE3NPSY.js.map +1 -0
- package/dist/{chunk-BQCTDU5V.js → chunk-BMQINH6O.js} +89 -15
- package/dist/chunk-BMQINH6O.js.map +1 -0
- package/dist/{chunk-34BQX2KR.js → chunk-F75ZJERM.js} +41 -6
- package/dist/chunk-F75ZJERM.js.map +1 -0
- package/dist/chunk-FIRSA7EH.js +3 -0
- package/dist/{chunk-ZDY2I6KY.js.map → chunk-FIRSA7EH.js.map} +1 -1
- package/dist/{chunk-SWMIIUXR.js → chunk-IPAKPLIF.js} +590 -92
- package/dist/chunk-IPAKPLIF.js.map +1 -0
- package/dist/chunk-JFDQZ3AC.js +3 -0
- package/dist/chunk-JFDQZ3AC.js.map +1 -0
- package/dist/{chunk-4SWOVHZ2.js → chunk-KQTS47FC.js} +129 -17
- package/dist/chunk-KQTS47FC.js.map +1 -0
- package/dist/chunk-LVJM4CTG.js +306 -0
- package/dist/chunk-LVJM4CTG.js.map +1 -0
- package/dist/chunk-SEKNVHD3.js +59 -0
- package/dist/chunk-SEKNVHD3.js.map +1 -0
- package/dist/chunk-SIMLMQPT.js +37 -0
- package/dist/chunk-SIMLMQPT.js.map +1 -0
- package/dist/chunk-U56GQITG.js +79 -0
- package/dist/chunk-U56GQITG.js.map +1 -0
- package/dist/{chunk-AFCJLUPK.js → chunk-U6AXKGYQ.js} +14 -5
- package/dist/chunk-U6AXKGYQ.js.map +1 -0
- package/dist/{chunk-AW7W3HAC.js → chunk-XJTJPBJB.js} +40 -3
- package/dist/chunk-XJTJPBJB.js.map +1 -0
- package/dist/client-CqE2dF9A.d.ts +86 -0
- package/dist/consent/index.d.ts +59 -0
- package/dist/consent/index.js +7 -0
- package/dist/consent/index.js.map +1 -0
- package/dist/controller-BQb62D0N.d.ts +177 -0
- package/dist/dynamic/index.d.ts +57 -6
- package/dist/dynamic/index.js +4 -2
- package/dist/errors-vJkye4a0.d.ts +110 -0
- package/dist/form/index.d.ts +2 -2
- package/dist/form/index.js +2 -2
- package/dist/index-Dqfa890U.d.ts +83 -0
- package/dist/index.d.ts +12 -6
- package/dist/index.js +12 -8
- package/dist/{model-IEyDI54w.d.ts → model-ESLSEbi0.d.ts} +199 -46
- package/dist/model-mnjAEtKe.d.ts +253 -0
- package/dist/render-DC7P2BGQ.js +5 -0
- package/dist/render-DC7P2BGQ.js.map +1 -0
- package/dist/schema-BrXb9gnh.d.ts +267 -0
- package/dist/{signup-client-Bl6eUrxR.d.ts → signup-client-BL5DfarJ.d.ts} +152 -19
- package/dist/spec/index.d.ts +10 -81
- package/dist/spec/index.js +3 -2
- package/dist/submit/index.d.ts +7 -71
- package/dist/submit/index.js +3 -3
- package/dist/viewer/index.d.ts +4 -0
- package/dist/viewer/index.js +5 -0
- package/dist/viewer/index.js.map +1 -0
- package/dist/widget/index.d.ts +50 -7
- package/dist/widget/index.js +9 -7
- package/package.json +21 -2
- package/dist/chunk-34BQX2KR.js.map +0 -1
- package/dist/chunk-4SWOVHZ2.js.map +0 -1
- package/dist/chunk-AFCJLUPK.js.map +0 -1
- package/dist/chunk-AW7W3HAC.js.map +0 -1
- package/dist/chunk-BIFANV7M.js +0 -22
- package/dist/chunk-BIFANV7M.js.map +0 -1
- package/dist/chunk-BQCTDU5V.js.map +0 -1
- package/dist/chunk-SWMIIUXR.js.map +0 -1
- package/dist/chunk-ZDY2I6KY.js +0 -3
- package/dist/schema-TfyBU6JW.d.ts +0 -107
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod/v3';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Contact-form Zod schema — mirrors the LOCKED hub REST contract exactly:
|
|
5
|
-
* POST /api/v1/public/onboarding/leads
|
|
6
|
-
* Schema: PublicOnboardingLeadsRequest (hub id 8686dd33)
|
|
7
|
-
*
|
|
8
|
-
* Constraints (per hub JSON Schema):
|
|
9
|
-
* name — string, 1-200 chars, required
|
|
10
|
-
* email — email format, required
|
|
11
|
-
* phone — string, optional (no server-side constraint beyond string)
|
|
12
|
-
* message — string, ≤4000 chars, optional
|
|
13
|
-
* botToken — string, required (reCAPTCHA token, D537)
|
|
14
|
-
*
|
|
15
|
-
* additionalProperties: false
|
|
16
|
-
*
|
|
17
|
-
* The schema intentionally does NOT include botToken in the public-facing
|
|
18
|
-
* ContactFormValues type — that field is injected by the submit client right
|
|
19
|
-
* before the POST (the widget/form never exposes it to the user).
|
|
20
|
-
*/
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* The user-visible contact form fields. Validated client-side for UX.
|
|
24
|
-
* Server re-validates authoritatively (D540 §2).
|
|
25
|
-
*/
|
|
26
|
-
declare const contactFormSchema: z.ZodObject<{
|
|
27
|
-
name: z.ZodString;
|
|
28
|
-
email: z.ZodString;
|
|
29
|
-
phone: z.ZodOptional<z.ZodString>;
|
|
30
|
-
message: z.ZodOptional<z.ZodString>;
|
|
31
|
-
}, "strip", z.ZodTypeAny, {
|
|
32
|
-
name: string;
|
|
33
|
-
email: string;
|
|
34
|
-
phone?: string | undefined;
|
|
35
|
-
message?: string | undefined;
|
|
36
|
-
}, {
|
|
37
|
-
name: string;
|
|
38
|
-
email: string;
|
|
39
|
-
phone?: string | undefined;
|
|
40
|
-
message?: string | undefined;
|
|
41
|
-
}>;
|
|
42
|
-
type ContactFormValues = z.infer<typeof contactFormSchema>;
|
|
43
|
-
/**
|
|
44
|
-
* The full wire payload — contactFormSchema + botToken.
|
|
45
|
-
*
|
|
46
|
-
* STRICT mode: unknown keys are REJECTED (not stripped), mirroring the
|
|
47
|
-
* server's `additionalProperties: false`. `submitLead` runs every outgoing
|
|
48
|
-
* payload through this schema before the POST — an extra key never reaches
|
|
49
|
-
* the wire; it fails fast client-side with OnboardingValidationError.
|
|
50
|
-
*/
|
|
51
|
-
declare const leadsWireSchema: z.ZodObject<{
|
|
52
|
-
name: z.ZodString;
|
|
53
|
-
email: z.ZodString;
|
|
54
|
-
phone: z.ZodOptional<z.ZodString>;
|
|
55
|
-
message: z.ZodOptional<z.ZodString>;
|
|
56
|
-
} & {
|
|
57
|
-
botToken: z.ZodString;
|
|
58
|
-
}, "strict", z.ZodTypeAny, {
|
|
59
|
-
name: string;
|
|
60
|
-
email: string;
|
|
61
|
-
botToken: string;
|
|
62
|
-
phone?: string | undefined;
|
|
63
|
-
message?: string | undefined;
|
|
64
|
-
}, {
|
|
65
|
-
name: string;
|
|
66
|
-
email: string;
|
|
67
|
-
botToken: string;
|
|
68
|
-
phone?: string | undefined;
|
|
69
|
-
message?: string | undefined;
|
|
70
|
-
}>;
|
|
71
|
-
type LeadsWirePayload = z.infer<typeof leadsWireSchema>;
|
|
72
|
-
/**
|
|
73
|
-
* Validate user-visible form values (no botToken required here).
|
|
74
|
-
* Returns a Zod SafeParseReturnType (inferred).
|
|
75
|
-
*/
|
|
76
|
-
declare function validateContactForm(values: unknown): z.SafeParseReturnType<{
|
|
77
|
-
name: string;
|
|
78
|
-
email: string;
|
|
79
|
-
phone?: string | undefined;
|
|
80
|
-
message?: string | undefined;
|
|
81
|
-
}, {
|
|
82
|
-
name: string;
|
|
83
|
-
email: string;
|
|
84
|
-
phone?: string | undefined;
|
|
85
|
-
message?: string | undefined;
|
|
86
|
-
}>;
|
|
87
|
-
/**
|
|
88
|
-
* Validate the full wire payload (including botToken) before submission.
|
|
89
|
-
* STRICT: unknown keys are rejected, matching additionalProperties:false.
|
|
90
|
-
* This is the exact validation `submitLead` applies on the wire path.
|
|
91
|
-
* Returns a Zod SafeParseReturnType (inferred).
|
|
92
|
-
*/
|
|
93
|
-
declare function validateLeadsPayload(payload: unknown): z.SafeParseReturnType<{
|
|
94
|
-
name: string;
|
|
95
|
-
email: string;
|
|
96
|
-
botToken: string;
|
|
97
|
-
phone?: string | undefined;
|
|
98
|
-
message?: string | undefined;
|
|
99
|
-
}, {
|
|
100
|
-
name: string;
|
|
101
|
-
email: string;
|
|
102
|
-
botToken: string;
|
|
103
|
-
phone?: string | undefined;
|
|
104
|
-
message?: string | undefined;
|
|
105
|
-
}>;
|
|
106
|
-
|
|
107
|
-
export { type ContactFormValues as C, type LeadsWirePayload as L, validateLeadsPayload as a, contactFormSchema as c, leadsWireSchema as l, validateContactForm as v };
|