@talkfurther/events 0.2.0-rc.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 ADDED
@@ -0,0 +1,37 @@
1
+ # @talkfurther/events
2
+
3
+ Shared analytics event definitions used across Further's products. Each event is defined with a [zod](https://zod.dev/) schema that documents its fields, types, and descriptions.
4
+
5
+ If you are looking for event documentation please see Analytics Profiles in Further Dashboard settings.
6
+
7
+ ## Usage
8
+
9
+ ```typescript
10
+ import { analyticsEvents, getEventFields } from "@talkfurther/events";
11
+ import type { AnalyticsEventName, AnalyticsEventData } from "@talkfurther/events";
12
+
13
+ // Access an event definition
14
+ const event = analyticsEvents.form_submitted;
15
+ console.log(event.defaultName); // "further.form_submitted"
16
+ console.log(event.description); // "Fired when a form is successfully submitted"
17
+
18
+ // Validate event data against the schema
19
+ const result = event.schema.safeParse(data);
20
+
21
+ // Get field metadata (used by the dashboard to render event docs)
22
+ const fields = getEventFields("form_submitted");
23
+ // [{ name: "formId", description: "...", required: true }, ...]
24
+ ```
25
+
26
+ ## Adding a new event
27
+
28
+ 1. Define the event in `events.ts` with a `defaultName`, `description`, and zod `schema`
29
+ 2. Use `.describe()` on each field — these descriptions are shown in the dashboard profile editor
30
+ 3. Rebuild: `npm run build`
31
+
32
+ ## Building
33
+
34
+ ```
35
+ npm run build # one-time build with microbundle
36
+ npm run dev # watch mode
37
+ ```
@@ -0,0 +1,181 @@
1
+ import { z } from "zod";
2
+ export declare const analyticsEvents: {
3
+ readonly form_viewed: {
4
+ readonly defaultName: "further.form_viewed";
5
+ readonly description: "Fired when a form becomes visible to the user";
6
+ readonly schema: z.ZodObject<{
7
+ formId: z.ZodString;
8
+ formName: z.ZodString;
9
+ timestamp: z.ZodString;
10
+ pageUrl: z.ZodString;
11
+ visitorId: z.ZodString;
12
+ visitId: z.ZodString;
13
+ }, "strip", z.ZodTypeAny, {
14
+ formId: string;
15
+ formName: string;
16
+ timestamp: string;
17
+ pageUrl: string;
18
+ visitorId: string;
19
+ visitId: string;
20
+ }, {
21
+ formId: string;
22
+ formName: string;
23
+ timestamp: string;
24
+ pageUrl: string;
25
+ visitorId: string;
26
+ visitId: string;
27
+ }>;
28
+ };
29
+ readonly form_started: {
30
+ readonly defaultName: "further.form_started";
31
+ readonly description: "Fired when the user interacts with a form field for the first time";
32
+ readonly schema: z.ZodObject<{
33
+ formId: z.ZodString;
34
+ formName: z.ZodString;
35
+ timestamp: z.ZodString;
36
+ pageUrl: z.ZodString;
37
+ visitorId: z.ZodString;
38
+ visitId: z.ZodString;
39
+ }, "strip", z.ZodTypeAny, {
40
+ formId: string;
41
+ formName: string;
42
+ timestamp: string;
43
+ pageUrl: string;
44
+ visitorId: string;
45
+ visitId: string;
46
+ }, {
47
+ formId: string;
48
+ formName: string;
49
+ timestamp: string;
50
+ pageUrl: string;
51
+ visitorId: string;
52
+ visitId: string;
53
+ }>;
54
+ };
55
+ readonly form_submitted: {
56
+ readonly defaultName: "further.form_submitted";
57
+ readonly description: "Fired when a form is successfully submitted";
58
+ readonly schema: z.ZodObject<{
59
+ formId: z.ZodString;
60
+ formName: z.ZodString;
61
+ fieldCount: z.ZodNumber;
62
+ communityId: z.ZodNumber;
63
+ communityName: z.ZodString;
64
+ timestamp: z.ZodString;
65
+ pageUrl: z.ZodString;
66
+ visitorId: z.ZodString;
67
+ visitId: z.ZodString;
68
+ }, "strip", z.ZodTypeAny, {
69
+ formId: string;
70
+ formName: string;
71
+ timestamp: string;
72
+ pageUrl: string;
73
+ visitorId: string;
74
+ visitId: string;
75
+ fieldCount: number;
76
+ communityId: number;
77
+ communityName: string;
78
+ }, {
79
+ formId: string;
80
+ formName: string;
81
+ timestamp: string;
82
+ pageUrl: string;
83
+ visitorId: string;
84
+ visitId: string;
85
+ fieldCount: number;
86
+ communityId: number;
87
+ communityName: string;
88
+ }>;
89
+ };
90
+ readonly lead_created: {
91
+ readonly defaultName: "further.lead_created";
92
+ readonly description: "Fired when a new lead is captured via any channel";
93
+ readonly schema: z.ZodObject<{
94
+ leadId: z.ZodNumber;
95
+ channelSource: z.ZodString;
96
+ formId: z.ZodOptional<z.ZodString>;
97
+ formName: z.ZodOptional<z.ZodString>;
98
+ chatId: z.ZodOptional<z.ZodNumber>;
99
+ chatName: z.ZodOptional<z.ZodString>;
100
+ communityId: z.ZodNumber;
101
+ communityName: z.ZodString;
102
+ timestamp: z.ZodString;
103
+ pageUrl: z.ZodString;
104
+ visitorId: z.ZodString;
105
+ visitId: z.ZodString;
106
+ }, "strip", z.ZodTypeAny, {
107
+ timestamp: string;
108
+ pageUrl: string;
109
+ visitorId: string;
110
+ visitId: string;
111
+ communityId: number;
112
+ communityName: string;
113
+ leadId: number;
114
+ channelSource: string;
115
+ formId?: string | undefined;
116
+ formName?: string | undefined;
117
+ chatId?: number | undefined;
118
+ chatName?: string | undefined;
119
+ }, {
120
+ timestamp: string;
121
+ pageUrl: string;
122
+ visitorId: string;
123
+ visitId: string;
124
+ communityId: number;
125
+ communityName: string;
126
+ leadId: number;
127
+ channelSource: string;
128
+ formId?: string | undefined;
129
+ formName?: string | undefined;
130
+ chatId?: number | undefined;
131
+ chatName?: string | undefined;
132
+ }>;
133
+ };
134
+ readonly tour_scheduled: {
135
+ readonly defaultName: "further.tour_scheduled";
136
+ readonly description: "Fired when a tour is scheduled via any channel";
137
+ readonly schema: z.ZodObject<{
138
+ leadId: z.ZodNumber;
139
+ tourDate: z.ZodOptional<z.ZodString>;
140
+ channelSource: z.ZodString;
141
+ formId: z.ZodOptional<z.ZodString>;
142
+ formName: z.ZodOptional<z.ZodString>;
143
+ chatId: z.ZodOptional<z.ZodNumber>;
144
+ chatName: z.ZodOptional<z.ZodString>;
145
+ communityId: z.ZodNumber;
146
+ communityName: z.ZodString;
147
+ timestamp: z.ZodString;
148
+ pageUrl: z.ZodString;
149
+ visitorId: z.ZodString;
150
+ visitId: z.ZodString;
151
+ }, "strip", z.ZodTypeAny, {
152
+ timestamp: string;
153
+ pageUrl: string;
154
+ visitorId: string;
155
+ visitId: string;
156
+ communityId: number;
157
+ communityName: string;
158
+ leadId: number;
159
+ channelSource: string;
160
+ formId?: string | undefined;
161
+ formName?: string | undefined;
162
+ chatId?: number | undefined;
163
+ chatName?: string | undefined;
164
+ tourDate?: string | undefined;
165
+ }, {
166
+ timestamp: string;
167
+ pageUrl: string;
168
+ visitorId: string;
169
+ visitId: string;
170
+ communityId: number;
171
+ communityName: string;
172
+ leadId: number;
173
+ channelSource: string;
174
+ formId?: string | undefined;
175
+ formName?: string | undefined;
176
+ chatId?: number | undefined;
177
+ chatName?: string | undefined;
178
+ tourDate?: string | undefined;
179
+ }>;
180
+ };
181
+ };
package/dist/index.cjs ADDED
@@ -0,0 +1,90 @@
1
+ var zod = require('zod');
2
+
3
+ function _extends() {
4
+ return _extends = Object.assign ? Object.assign.bind() : function (n) {
5
+ for (var e = 1; e < arguments.length; e++) {
6
+ var t = arguments[e];
7
+ for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
8
+ }
9
+ return n;
10
+ }, _extends.apply(null, arguments);
11
+ }
12
+
13
+ const baseEvent = {
14
+ timestamp: zod.z.string().datetime().describe("ISO 8601 timestamp of when the event occurred"),
15
+ pageUrl: zod.z.string().url().describe("URL of the page where the event occurred"),
16
+ visitorId: zod.z.string().describe("Anonymous visitor UUID for cross-event correlation"),
17
+ visitId: zod.z.string().describe("Visit/session UUID for session-level funnel analysis")
18
+ };
19
+ const communityEvent = {
20
+ communityId: zod.z.number().int().describe("ID of the community associated with the event"),
21
+ communityName: zod.z.string().describe("Name of the community associated with the event")
22
+ };
23
+ const analyticsEvents = {
24
+ form_viewed: {
25
+ defaultName: "further.form_viewed",
26
+ description: "Fired when a form becomes visible to the user",
27
+ schema: zod.z.object(_extends({}, baseEvent, {
28
+ formId: zod.z.string().describe("Unique identifier of the form"),
29
+ formName: zod.z.string().describe("Human-readable form name")
30
+ }))
31
+ },
32
+ form_started: {
33
+ defaultName: "further.form_started",
34
+ description: "Fired when the user interacts with a form field for the first time",
35
+ schema: zod.z.object(_extends({}, baseEvent, {
36
+ formId: zod.z.string().describe("Unique identifier of the form"),
37
+ formName: zod.z.string().describe("Human-readable form name")
38
+ }))
39
+ },
40
+ form_submitted: {
41
+ defaultName: "further.form_submitted",
42
+ description: "Fired when a form is successfully submitted",
43
+ schema: zod.z.object(_extends({}, baseEvent, communityEvent, {
44
+ formId: zod.z.string().describe("Unique identifier of the form"),
45
+ formName: zod.z.string().describe("Human-readable form name"),
46
+ fieldCount: zod.z.number().int().describe("Number of fields submitted")
47
+ }))
48
+ },
49
+ lead_created: {
50
+ defaultName: "further.lead_created",
51
+ description: "Fired when a new lead is captured via any channel",
52
+ schema: zod.z.object(_extends({}, baseEvent, communityEvent, {
53
+ leadId: zod.z.number().int().describe("Internal lead ID for CRM correlation"),
54
+ channelSource: zod.z.string().describe("Channel source that captured the lead (e.g. conversational_webform, static_webform, chat_api, conversational_ivr)"),
55
+ formId: zod.z.string().optional().describe("Form ID, if the lead came from a form"),
56
+ formName: zod.z.string().optional().describe("Form name, if the lead came from a form"),
57
+ chatId: zod.z.number().int().optional().describe("Chat/VSA ID, if the lead came from a chat widget"),
58
+ chatName: zod.z.string().optional().describe("Chat/VSA name, if the lead came from a chat widget")
59
+ }))
60
+ },
61
+ tour_scheduled: {
62
+ defaultName: "further.tour_scheduled",
63
+ description: "Fired when a tour is scheduled via any channel",
64
+ schema: zod.z.object(_extends({}, baseEvent, communityEvent, {
65
+ leadId: zod.z.number().int().describe("Internal lead ID for CRM correlation"),
66
+ tourDate: zod.z.string().optional().describe("ISO 8601 tour start date/time. Optional because the tour date may not always be parseable from user input."),
67
+ channelSource: zod.z.string().describe("Channel source that captured the lead (e.g. conversational_webform, static_webform, chat_api, conversational_ivr)"),
68
+ formId: zod.z.string().optional().describe("Form ID, if the tour was scheduled from a form"),
69
+ formName: zod.z.string().optional().describe("Form name, if the tour was scheduled from a form"),
70
+ chatId: zod.z.number().int().optional().describe("Chat/VSA ID, if the tour was scheduled from a chat widget"),
71
+ chatName: zod.z.string().optional().describe("Chat/VSA name, if the tour was scheduled from a chat widget")
72
+ }))
73
+ }
74
+ };
75
+
76
+ function getEventFields(eventKey) {
77
+ const shape = analyticsEvents[eventKey].schema.shape;
78
+ return Object.entries(shape).map(_ref => {
79
+ let [name, field] = _ref;
80
+ return {
81
+ name,
82
+ description: field.description || "",
83
+ required: !field.isOptional()
84
+ };
85
+ });
86
+ }
87
+
88
+ exports.analyticsEvents = analyticsEvents;
89
+ exports.getEventFields = getEventFields;
90
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","sources":["../events.ts","../index.ts"],"sourcesContent":["import { z } from \"zod\";\n\nconst baseEvent = {\n timestamp: z.string().datetime().describe(\"ISO 8601 timestamp of when the event occurred\"),\n pageUrl: z.string().url().describe(\"URL of the page where the event occurred\"),\n visitorId: z.string().describe(\"Anonymous visitor UUID for cross-event correlation\"),\n visitId: z.string().describe(\"Visit/session UUID for session-level funnel analysis\"),\n};\n\nconst communityEvent = {\n communityId: z.number().int().describe(\"ID of the community associated with the event\"),\n communityName: z.string().describe(\"Name of the community associated with the event\"),\n};\n\nexport const analyticsEvents = {\n form_viewed: {\n defaultName: \"further.form_viewed\",\n description: \"Fired when a form becomes visible to the user\",\n schema: z.object({\n ...baseEvent,\n formId: z.string().describe(\"Unique identifier of the form\"),\n formName: z.string().describe(\"Human-readable form name\"),\n }),\n },\n\n form_started: {\n defaultName: \"further.form_started\",\n description: \"Fired when the user interacts with a form field for the first time\",\n schema: z.object({\n ...baseEvent,\n formId: z.string().describe(\"Unique identifier of the form\"),\n formName: z.string().describe(\"Human-readable form name\"),\n }),\n },\n\n form_submitted: {\n defaultName: \"further.form_submitted\",\n description: \"Fired when a form is successfully submitted\",\n schema: z.object({\n ...baseEvent,\n ...communityEvent,\n formId: z.string().describe(\"Unique identifier of the form\"),\n formName: z.string().describe(\"Human-readable form name\"),\n fieldCount: z.number().int().describe(\"Number of fields submitted\"),\n }),\n },\n\n lead_created: {\n defaultName: \"further.lead_created\",\n description: \"Fired when a new lead is captured via any channel\",\n schema: z.object({\n ...baseEvent,\n ...communityEvent,\n leadId: z.number().int().describe(\"Internal lead ID for CRM correlation\"),\n channelSource: z.string().describe(\"Channel source that captured the lead (e.g. conversational_webform, static_webform, chat_api, conversational_ivr)\"),\n formId: z.string().optional().describe(\"Form ID, if the lead came from a form\"),\n formName: z.string().optional().describe(\"Form name, if the lead came from a form\"),\n chatId: z.number().int().optional().describe(\"Chat/VSA ID, if the lead came from a chat widget\"),\n chatName: z.string().optional().describe(\"Chat/VSA name, if the lead came from a chat widget\"),\n }),\n },\n tour_scheduled: {\n defaultName: \"further.tour_scheduled\",\n description: \"Fired when a tour is scheduled via any channel\",\n schema: z.object({\n ...baseEvent,\n ...communityEvent,\n leadId: z.number().int().describe(\"Internal lead ID for CRM correlation\"),\n tourDate: z.string().optional().describe(\"ISO 8601 tour start date/time. Optional because the tour date may not always be parseable from user input.\"),\n channelSource: z.string().describe(\"Channel source that captured the lead (e.g. conversational_webform, static_webform, chat_api, conversational_ivr)\"),\n formId: z.string().optional().describe(\"Form ID, if the tour was scheduled from a form\"),\n formName: z.string().optional().describe(\"Form name, if the tour was scheduled from a form\"),\n chatId: z.number().int().optional().describe(\"Chat/VSA ID, if the tour was scheduled from a chat widget\"),\n chatName: z.string().optional().describe(\"Chat/VSA name, if the tour was scheduled from a chat widget\"),\n }),\n },\n} as const;\n","import { z } from \"zod\";\nimport { analyticsEvents } from \"./events\";\n\nexport { analyticsEvents } from \"./events\";\n\nexport type AnalyticsEventName = keyof typeof analyticsEvents;\n\nexport type AnalyticsEventData<T extends AnalyticsEventName> = z.infer<(typeof analyticsEvents)[T][\"schema\"]>;\n\nexport function getEventFields(eventKey: AnalyticsEventName) {\n const shape = analyticsEvents[eventKey].schema.shape;\n return Object.entries(shape).map(([name, field]) => ({\n name,\n description: (field as z.ZodTypeAny).description || \"\",\n required: !(field as z.ZodTypeAny).isOptional(),\n }));\n}\n"],"names":["baseEvent","timestamp","z","string","datetime","describe","pageUrl","url","visitorId","visitId","communityEvent","communityId","number","int","communityName","analyticsEvents","form_viewed","defaultName","description","schema","object","_extends","formId","formName","form_started","form_submitted","fieldCount","lead_created","leadId","channelSource","optional","chatId","chatName","tour_scheduled","tourDate","getEventFields","eventKey","shape","Object","entries","map","_ref","name","field","required","isOptional"],"mappings":";;;;;;;;;;;;AAEA,MAAMA,SAAS,GAAG;AAChBC,EAAAA,SAAS,EAAEC,KAAC,CAACC,MAAM,EAAE,CAACC,QAAQ,EAAE,CAACC,QAAQ,CAAC,+CAA+C,CAAC;AAC1FC,EAAAA,OAAO,EAAEJ,KAAC,CAACC,MAAM,EAAE,CAACI,GAAG,EAAE,CAACF,QAAQ,CAAC,0CAA0C,CAAC;EAC9EG,SAAS,EAAEN,KAAC,CAACC,MAAM,EAAE,CAACE,QAAQ,CAAC,oDAAoD,CAAC;EACpFI,OAAO,EAAEP,KAAC,CAACC,MAAM,EAAE,CAACE,QAAQ,CAAC,sDAAsD,CAAA;CACpF,CAAA;AAED,MAAMK,cAAc,GAAG;AACrBC,EAAAA,WAAW,EAAET,KAAC,CAACU,MAAM,EAAE,CAACC,GAAG,EAAE,CAACR,QAAQ,CAAC,+CAA+C,CAAC;EACvFS,aAAa,EAAEZ,KAAC,CAACC,MAAM,EAAE,CAACE,QAAQ,CAAC,iDAAiD,CAAA;CACrF,CAAA;AAEM,MAAMU,eAAe,GAAG;AAC7BC,EAAAA,WAAW,EAAE;AACXC,IAAAA,WAAW,EAAE,qBAAqB;AAClCC,IAAAA,WAAW,EAAE,+CAA+C;AAC5DC,IAAAA,MAAM,EAAEjB,KAAC,CAACkB,MAAM,CAAAC,QAAA,KACXrB,SAAS,EAAA;MACZsB,MAAM,EAAEpB,KAAC,CAACC,MAAM,EAAE,CAACE,QAAQ,CAAC,+BAA+B,CAAC;MAC5DkB,QAAQ,EAAErB,KAAC,CAACC,MAAM,EAAE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AAC,kDAAkD,CAAC;AAC5F0B,MAAAA,MAAM,EAAE7B,KAAC,CAACU,MAAM,EAAE,CAACC,GAAG,EAAE,CAACiB,QAAQ,EAAE,CAACzB,QAAQ,CAAC,2DAA2D,CAAC;AACzG2B,MAAAA,QAAQ,EAAE9B,KAAC,CAACC,MAAM,EAAE,CAAC2B,QAAQ,EAAE,CAACzB,QAAQ,CAAC,6DAA6D,CAAA;KACvG,CAAA,CAAA;AACF,GAAA;;;AClEG,SAAU8B,cAAcA,CAACC,QAA4B,EAAA;EACzD,MAAMC,KAAK,GAAGtB,eAAe,CAACqB,QAAQ,CAAC,CAACjB,MAAM,CAACkB,KAAK,CAAA;EACpD,OAAOC,MAAM,CAACC,OAAO,CAACF,KAAK,CAAC,CAACG,GAAG,CAACC,IAAA,IAAA;AAAA,IAAA,IAAC,CAACC,IAAI,EAAEC,KAAK,CAAC,GAAAF,IAAA,CAAA;IAAA,OAAM;MACnDC,IAAI;AACJxB,MAAAA,WAAW,EAAGyB,KAAsB,CAACzB,WAAW,IAAI,EAAE;AACtD0B,MAAAA,QAAQ,EAAE,CAAED,KAAsB,CAACE,UAAU,EAAE;KAChD,CAAA;AAAA,GAAC,CAAC,CAAA;AACL;;;;;"}
@@ -0,0 +1,10 @@
1
+ import { z } from "zod";
2
+ import { analyticsEvents } from "./events";
3
+ export { analyticsEvents } from "./events";
4
+ export type AnalyticsEventName = keyof typeof analyticsEvents;
5
+ export type AnalyticsEventData<T extends AnalyticsEventName> = z.infer<(typeof analyticsEvents)[T]["schema"]>;
6
+ export declare function getEventFields(eventKey: AnalyticsEventName): {
7
+ name: string;
8
+ description: string;
9
+ required: boolean;
10
+ }[];
@@ -0,0 +1,86 @@
1
+ import { z } from 'zod';
2
+
3
+ function _extends() {
4
+ return _extends = Object.assign ? Object.assign.bind() : function (n) {
5
+ for (var e = 1; e < arguments.length; e++) {
6
+ var t = arguments[e];
7
+ for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
8
+ }
9
+ return n;
10
+ }, _extends.apply(null, arguments);
11
+ }
12
+
13
+ const baseEvent = {
14
+ timestamp: z.string().datetime().describe("ISO 8601 timestamp of when the event occurred"),
15
+ pageUrl: z.string().url().describe("URL of the page where the event occurred"),
16
+ visitorId: z.string().describe("Anonymous visitor UUID for cross-event correlation"),
17
+ visitId: z.string().describe("Visit/session UUID for session-level funnel analysis")
18
+ };
19
+ const communityEvent = {
20
+ communityId: z.number().int().describe("ID of the community associated with the event"),
21
+ communityName: z.string().describe("Name of the community associated with the event")
22
+ };
23
+ const analyticsEvents = {
24
+ form_viewed: {
25
+ defaultName: "further.form_viewed",
26
+ description: "Fired when a form becomes visible to the user",
27
+ schema: z.object(_extends({}, baseEvent, {
28
+ formId: z.string().describe("Unique identifier of the form"),
29
+ formName: z.string().describe("Human-readable form name")
30
+ }))
31
+ },
32
+ form_started: {
33
+ defaultName: "further.form_started",
34
+ description: "Fired when the user interacts with a form field for the first time",
35
+ schema: z.object(_extends({}, baseEvent, {
36
+ formId: z.string().describe("Unique identifier of the form"),
37
+ formName: z.string().describe("Human-readable form name")
38
+ }))
39
+ },
40
+ form_submitted: {
41
+ defaultName: "further.form_submitted",
42
+ description: "Fired when a form is successfully submitted",
43
+ schema: z.object(_extends({}, baseEvent, communityEvent, {
44
+ formId: z.string().describe("Unique identifier of the form"),
45
+ formName: z.string().describe("Human-readable form name"),
46
+ fieldCount: z.number().int().describe("Number of fields submitted")
47
+ }))
48
+ },
49
+ lead_created: {
50
+ defaultName: "further.lead_created",
51
+ description: "Fired when a new lead is captured via any channel",
52
+ schema: z.object(_extends({}, baseEvent, communityEvent, {
53
+ leadId: z.number().int().describe("Internal lead ID for CRM correlation"),
54
+ channelSource: z.string().describe("Channel source that captured the lead (e.g. conversational_webform, static_webform, chat_api, conversational_ivr)"),
55
+ formId: z.string().optional().describe("Form ID, if the lead came from a form"),
56
+ formName: z.string().optional().describe("Form name, if the lead came from a form"),
57
+ chatId: z.number().int().optional().describe("Chat/VSA ID, if the lead came from a chat widget"),
58
+ chatName: z.string().optional().describe("Chat/VSA name, if the lead came from a chat widget")
59
+ }))
60
+ },
61
+ tour_scheduled: {
62
+ defaultName: "further.tour_scheduled",
63
+ description: "Fired when a tour is scheduled via any channel",
64
+ schema: z.object(_extends({}, baseEvent, communityEvent, {
65
+ leadId: z.number().int().describe("Internal lead ID for CRM correlation"),
66
+ tourDate: z.string().optional().describe("ISO 8601 tour start date/time. Optional because the tour date may not always be parseable from user input."),
67
+ channelSource: z.string().describe("Channel source that captured the lead (e.g. conversational_webform, static_webform, chat_api, conversational_ivr)"),
68
+ formId: z.string().optional().describe("Form ID, if the tour was scheduled from a form"),
69
+ formName: z.string().optional().describe("Form name, if the tour was scheduled from a form"),
70
+ chatId: z.number().int().optional().describe("Chat/VSA ID, if the tour was scheduled from a chat widget"),
71
+ chatName: z.string().optional().describe("Chat/VSA name, if the tour was scheduled from a chat widget")
72
+ }))
73
+ }
74
+ };
75
+
76
+ function getEventFields(eventKey) {
77
+ const shape = analyticsEvents[eventKey].schema.shape;
78
+ return Object.entries(shape).map(([name, field]) => ({
79
+ name,
80
+ description: field.description || "",
81
+ required: !field.isOptional()
82
+ }));
83
+ }
84
+
85
+ export { analyticsEvents, getEventFields };
86
+ //# sourceMappingURL=index.modern.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.modern.js","sources":["../events.ts","../index.ts"],"sourcesContent":["import { z } from \"zod\";\n\nconst baseEvent = {\n timestamp: z.string().datetime().describe(\"ISO 8601 timestamp of when the event occurred\"),\n pageUrl: z.string().url().describe(\"URL of the page where the event occurred\"),\n visitorId: z.string().describe(\"Anonymous visitor UUID for cross-event correlation\"),\n visitId: z.string().describe(\"Visit/session UUID for session-level funnel analysis\"),\n};\n\nconst communityEvent = {\n communityId: z.number().int().describe(\"ID of the community associated with the event\"),\n communityName: z.string().describe(\"Name of the community associated with the event\"),\n};\n\nexport const analyticsEvents = {\n form_viewed: {\n defaultName: \"further.form_viewed\",\n description: \"Fired when a form becomes visible to the user\",\n schema: z.object({\n ...baseEvent,\n formId: z.string().describe(\"Unique identifier of the form\"),\n formName: z.string().describe(\"Human-readable form name\"),\n }),\n },\n\n form_started: {\n defaultName: \"further.form_started\",\n description: \"Fired when the user interacts with a form field for the first time\",\n schema: z.object({\n ...baseEvent,\n formId: z.string().describe(\"Unique identifier of the form\"),\n formName: z.string().describe(\"Human-readable form name\"),\n }),\n },\n\n form_submitted: {\n defaultName: \"further.form_submitted\",\n description: \"Fired when a form is successfully submitted\",\n schema: z.object({\n ...baseEvent,\n ...communityEvent,\n formId: z.string().describe(\"Unique identifier of the form\"),\n formName: z.string().describe(\"Human-readable form name\"),\n fieldCount: z.number().int().describe(\"Number of fields submitted\"),\n }),\n },\n\n lead_created: {\n defaultName: \"further.lead_created\",\n description: \"Fired when a new lead is captured via any channel\",\n schema: z.object({\n ...baseEvent,\n ...communityEvent,\n leadId: z.number().int().describe(\"Internal lead ID for CRM correlation\"),\n channelSource: z.string().describe(\"Channel source that captured the lead (e.g. conversational_webform, static_webform, chat_api, conversational_ivr)\"),\n formId: z.string().optional().describe(\"Form ID, if the lead came from a form\"),\n formName: z.string().optional().describe(\"Form name, if the lead came from a form\"),\n chatId: z.number().int().optional().describe(\"Chat/VSA ID, if the lead came from a chat widget\"),\n chatName: z.string().optional().describe(\"Chat/VSA name, if the lead came from a chat widget\"),\n }),\n },\n tour_scheduled: {\n defaultName: \"further.tour_scheduled\",\n description: \"Fired when a tour is scheduled via any channel\",\n schema: z.object({\n ...baseEvent,\n ...communityEvent,\n leadId: z.number().int().describe(\"Internal lead ID for CRM correlation\"),\n tourDate: z.string().optional().describe(\"ISO 8601 tour start date/time. Optional because the tour date may not always be parseable from user input.\"),\n channelSource: z.string().describe(\"Channel source that captured the lead (e.g. conversational_webform, static_webform, chat_api, conversational_ivr)\"),\n formId: z.string().optional().describe(\"Form ID, if the tour was scheduled from a form\"),\n formName: z.string().optional().describe(\"Form name, if the tour was scheduled from a form\"),\n chatId: z.number().int().optional().describe(\"Chat/VSA ID, if the tour was scheduled from a chat widget\"),\n chatName: z.string().optional().describe(\"Chat/VSA name, if the tour was scheduled from a chat widget\"),\n }),\n },\n} as const;\n","import { z } from \"zod\";\nimport { analyticsEvents } from \"./events\";\n\nexport { analyticsEvents } from \"./events\";\n\nexport type AnalyticsEventName = keyof typeof analyticsEvents;\n\nexport type AnalyticsEventData<T extends AnalyticsEventName> = z.infer<(typeof analyticsEvents)[T][\"schema\"]>;\n\nexport function getEventFields(eventKey: AnalyticsEventName) {\n const shape = analyticsEvents[eventKey].schema.shape;\n return Object.entries(shape).map(([name, field]) => ({\n name,\n description: (field as z.ZodTypeAny).description || \"\",\n required: !(field as z.ZodTypeAny).isOptional(),\n }));\n}\n"],"names":["baseEvent","timestamp","z","string","datetime","describe","pageUrl","url","visitorId","visitId","communityEvent","communityId","number","int","communityName","analyticsEvents","form_viewed","defaultName","description","schema","object","_extends","formId","formName","form_started","form_submitted","fieldCount","lead_created","leadId","channelSource","optional","chatId","chatName","tour_scheduled","tourDate","getEventFields","eventKey","shape","Object","entries","map","name","field","required","isOptional"],"mappings":";;;;;;;;;;;;AAEA,MAAMA,SAAS,GAAG;AAChBC,EAAAA,SAAS,EAAEC,CAAC,CAACC,MAAM,EAAE,CAACC,QAAQ,EAAE,CAACC,QAAQ,CAAC,+CAA+C,CAAC;AAC1FC,EAAAA,OAAO,EAAEJ,CAAC,CAACC,MAAM,EAAE,CAACI,GAAG,EAAE,CAACF,QAAQ,CAAC,0CAA0C,CAAC;EAC9EG,SAAS,EAAEN,CAAC,CAACC,MAAM,EAAE,CAACE,QAAQ,CAAC,oDAAoD,CAAC;EACpFI,OAAO,EAAEP,CAAC,CAACC,MAAM,EAAE,CAACE,QAAQ,CAAC,sDAAsD,CAAA;CACpF,CAAA;AAED,MAAMK,cAAc,GAAG;AACrBC,EAAAA,WAAW,EAAET,CAAC,CAACU,MAAM,EAAE,CAACC,GAAG,EAAE,CAACR,QAAQ,CAAC,+CAA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n) {
5
+ for (var e = 1; e < arguments.length; e++) {
6
+ var t = arguments[e];
7
+ for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
8
+ }
9
+ return n;
10
+ }, _extends.apply(null, arguments);
11
+ }
12
+
13
+ const baseEvent = {
14
+ timestamp: z.string().datetime().describe("ISO 8601 timestamp of when the event occurred"),
15
+ pageUrl: z.string().url().describe("URL of the page where the event occurred"),
16
+ visitorId: z.string().describe("Anonymous visitor UUID for cross-event correlation"),
17
+ visitId: z.string().describe("Visit/session UUID for session-level funnel analysis")
18
+ };
19
+ const communityEvent = {
20
+ communityId: z.number().int().describe("ID of the community associated with the event"),
21
+ communityName: z.string().describe("Name of the community associated with the event")
22
+ };
23
+ const analyticsEvents = {
24
+ form_viewed: {
25
+ defaultName: "further.form_viewed",
26
+ description: "Fired when a form becomes visible to the user",
27
+ schema: z.object(_extends({}, baseEvent, {
28
+ formId: z.string().describe("Unique identifier of the form"),
29
+ formName: z.string().describe("Human-readable form name")
30
+ }))
31
+ },
32
+ form_started: {
33
+ defaultName: "further.form_started",
34
+ description: "Fired when the user interacts with a form field for the first time",
35
+ schema: z.object(_extends({}, baseEvent, {
36
+ formId: z.string().describe("Unique identifier of the form"),
37
+ formName: z.string().describe("Human-readable form name")
38
+ }))
39
+ },
40
+ form_submitted: {
41
+ defaultName: "further.form_submitted",
42
+ description: "Fired when a form is successfully submitted",
43
+ schema: z.object(_extends({}, baseEvent, communityEvent, {
44
+ formId: z.string().describe("Unique identifier of the form"),
45
+ formName: z.string().describe("Human-readable form name"),
46
+ fieldCount: z.number().int().describe("Number of fields submitted")
47
+ }))
48
+ },
49
+ lead_created: {
50
+ defaultName: "further.lead_created",
51
+ description: "Fired when a new lead is captured via any channel",
52
+ schema: z.object(_extends({}, baseEvent, communityEvent, {
53
+ leadId: z.number().int().describe("Internal lead ID for CRM correlation"),
54
+ channelSource: z.string().describe("Channel source that captured the lead (e.g. conversational_webform, static_webform, chat_api, conversational_ivr)"),
55
+ formId: z.string().optional().describe("Form ID, if the lead came from a form"),
56
+ formName: z.string().optional().describe("Form name, if the lead came from a form"),
57
+ chatId: z.number().int().optional().describe("Chat/VSA ID, if the lead came from a chat widget"),
58
+ chatName: z.string().optional().describe("Chat/VSA name, if the lead came from a chat widget")
59
+ }))
60
+ },
61
+ tour_scheduled: {
62
+ defaultName: "further.tour_scheduled",
63
+ description: "Fired when a tour is scheduled via any channel",
64
+ schema: z.object(_extends({}, baseEvent, communityEvent, {
65
+ leadId: z.number().int().describe("Internal lead ID for CRM correlation"),
66
+ tourDate: z.string().optional().describe("ISO 8601 tour start date/time. Optional because the tour date may not always be parseable from user input."),
67
+ channelSource: z.string().describe("Channel source that captured the lead (e.g. conversational_webform, static_webform, chat_api, conversational_ivr)"),
68
+ formId: z.string().optional().describe("Form ID, if the tour was scheduled from a form"),
69
+ formName: z.string().optional().describe("Form name, if the tour was scheduled from a form"),
70
+ chatId: z.number().int().optional().describe("Chat/VSA ID, if the tour was scheduled from a chat widget"),
71
+ chatName: z.string().optional().describe("Chat/VSA name, if the tour was scheduled from a chat widget")
72
+ }))
73
+ }
74
+ };
75
+
76
+ function getEventFields(eventKey) {
77
+ const shape = analyticsEvents[eventKey].schema.shape;
78
+ return Object.entries(shape).map(_ref => {
79
+ let [name, field] = _ref;
80
+ return {
81
+ name,
82
+ description: field.description || "",
83
+ required: !field.isOptional()
84
+ };
85
+ });
86
+ }
87
+
88
+ export { analyticsEvents, getEventFields };
89
+ //# sourceMappingURL=index.module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.module.js","sources":["../events.ts","../index.ts"],"sourcesContent":["import { z } from \"zod\";\n\nconst baseEvent = {\n timestamp: z.string().datetime().describe(\"ISO 8601 timestamp of when the event occurred\"),\n pageUrl: z.string().url().describe(\"URL of the page where the event occurred\"),\n visitorId: z.string().describe(\"Anonymous visitor UUID for cross-event correlation\"),\n visitId: z.string().describe(\"Visit/session UUID for session-level funnel analysis\"),\n};\n\nconst communityEvent = {\n communityId: z.number().int().describe(\"ID of the community associated with the event\"),\n communityName: z.string().describe(\"Name of the community associated with the event\"),\n};\n\nexport const analyticsEvents = {\n form_viewed: {\n defaultName: \"further.form_viewed\",\n description: \"Fired when a form becomes visible to the user\",\n schema: z.object({\n ...baseEvent,\n formId: z.string().describe(\"Unique identifier of the form\"),\n formName: z.string().describe(\"Human-readable form name\"),\n }),\n },\n\n form_started: {\n defaultName: \"further.form_started\",\n description: \"Fired when the user interacts with a form field for the first time\",\n schema: z.object({\n ...baseEvent,\n formId: z.string().describe(\"Unique identifier of the form\"),\n formName: z.string().describe(\"Human-readable form name\"),\n }),\n },\n\n form_submitted: {\n defaultName: \"further.form_submitted\",\n description: \"Fired when a form is successfully submitted\",\n schema: z.object({\n ...baseEvent,\n ...communityEvent,\n formId: z.string().describe(\"Unique identifier of the form\"),\n formName: z.string().describe(\"Human-readable form name\"),\n fieldCount: z.number().int().describe(\"Number of fields submitted\"),\n }),\n },\n\n lead_created: {\n defaultName: \"further.lead_created\",\n description: \"Fired when a new lead is captured via any channel\",\n schema: z.object({\n ...baseEvent,\n ...communityEvent,\n leadId: z.number().int().describe(\"Internal lead ID for CRM correlation\"),\n channelSource: z.string().describe(\"Channel source that captured the lead (e.g. conversational_webform, static_webform, chat_api, conversational_ivr)\"),\n formId: z.string().optional().describe(\"Form ID, if the lead came from a form\"),\n formName: z.string().optional().describe(\"Form name, if the lead came from a form\"),\n chatId: z.number().int().optional().describe(\"Chat/VSA ID, if the lead came from a chat widget\"),\n chatName: z.string().optional().describe(\"Chat/VSA name, if the lead came from a chat widget\"),\n }),\n },\n tour_scheduled: {\n defaultName: \"further.tour_scheduled\",\n description: \"Fired when a tour is scheduled via any channel\",\n schema: z.object({\n ...baseEvent,\n ...communityEvent,\n leadId: z.number().int().describe(\"Internal lead ID for CRM correlation\"),\n tourDate: z.string().optional().describe(\"ISO 8601 tour start date/time. Optional because the tour date may not always be parseable from user input.\"),\n channelSource: z.string().describe(\"Channel source that captured the lead (e.g. conversational_webform, static_webform, chat_api, conversational_ivr)\"),\n formId: z.string().optional().describe(\"Form ID, if the tour was scheduled from a form\"),\n formName: z.string().optional().describe(\"Form name, if the tour was scheduled from a form\"),\n chatId: z.number().int().optional().describe(\"Chat/VSA ID, if the tour was scheduled from a chat widget\"),\n chatName: z.string().optional().describe(\"Chat/VSA name, if the tour was scheduled from a chat widget\"),\n }),\n },\n} as const;\n","import { z } from \"zod\";\nimport { analyticsEvents } from \"./events\";\n\nexport { analyticsEvents } from \"./events\";\n\nexport type AnalyticsEventName = keyof typeof analyticsEvents;\n\nexport type AnalyticsEventData<T extends AnalyticsEventName> = z.infer<(typeof analyticsEvents)[T][\"schema\"]>;\n\nexport function getEventFields(eventKey: AnalyticsEventName) {\n const shape = analyticsEvents[eventKey].schema.shape;\n return Object.entries(shape).map(([name, field]) => ({\n name,\n description: (field as z.ZodTypeAny).description || \"\",\n required: !(field as z.ZodTypeAny).isOptional(),\n }));\n}\n"],"names":["baseEvent","timestamp","z","string","datetime","describe","pageUrl","url","visitorId","visitId","communityEvent","communityId","number","int","communityName","analyticsEvents","form_viewed","defaultName","description","schema","object","_extends","formId","formName","form_started","form_submitted","fieldCount","lead_created","leadId","channelSource","optional","chatId","chatName","tour_scheduled","tourDate","getEventFields","eventKey","shape","Object","entries","map","_ref","name","field","required","isOptional"],"mappings":";;;;;;;;;;;;AAEA,MAAMA,SAAS,GAAG;AAChBC,EAAAA,SAAS,EAAEC,CAAC,CAACC,MAAM,EAAE,CAACC,QAAQ,EAAE,CAACC,QAAQ,CAAC,+CAA+C,CAAC;AAC1FC,EAAAA,OAAO,EAAEJ,CAAC,CAACC,MAAM,EAAE,CAACI,GAAG,EAAE,CAACF,QAAQ,CAAC,0CAA0C,CAAC;EAC9EG,SAAS,EAAEN,CAAC,CAACC,MAAM,EAAE,CAACE,QAAQ,CAAC,oDAAoD,CAAC;EACpFI,OAAO,EAAEP,CAAC,CAACC,MAAM,EAAE,CAACE,QAAQ,CAAC,sDAA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AAAA,QAAQ,EAAE,CAAED,KAAsB,CAACE,UAAU,EAAE;KAChD,CAAA;AAAA,GAAC,CAAC,CAAA;AACL;;;;"}
@@ -0,0 +1,95 @@
1
+ (function (global, factory) {
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('zod')) :
3
+ typeof define === 'function' && define.amd ? define(['exports', 'zod'], factory) :
4
+ (global = global || self, factory(global.events = {}, global.zod));
5
+ })(this, (function (exports, zod) {
6
+ function _extends() {
7
+ return _extends = Object.assign ? Object.assign.bind() : function (n) {
8
+ for (var e = 1; e < arguments.length; e++) {
9
+ var t = arguments[e];
10
+ for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
11
+ }
12
+ return n;
13
+ }, _extends.apply(null, arguments);
14
+ }
15
+
16
+ const baseEvent = {
17
+ timestamp: zod.z.string().datetime().describe("ISO 8601 timestamp of when the event occurred"),
18
+ pageUrl: zod.z.string().url().describe("URL of the page where the event occurred"),
19
+ visitorId: zod.z.string().describe("Anonymous visitor UUID for cross-event correlation"),
20
+ visitId: zod.z.string().describe("Visit/session UUID for session-level funnel analysis")
21
+ };
22
+ const communityEvent = {
23
+ communityId: zod.z.number().int().describe("ID of the community associated with the event"),
24
+ communityName: zod.z.string().describe("Name of the community associated with the event")
25
+ };
26
+ const analyticsEvents = {
27
+ form_viewed: {
28
+ defaultName: "further.form_viewed",
29
+ description: "Fired when a form becomes visible to the user",
30
+ schema: zod.z.object(_extends({}, baseEvent, {
31
+ formId: zod.z.string().describe("Unique identifier of the form"),
32
+ formName: zod.z.string().describe("Human-readable form name")
33
+ }))
34
+ },
35
+ form_started: {
36
+ defaultName: "further.form_started",
37
+ description: "Fired when the user interacts with a form field for the first time",
38
+ schema: zod.z.object(_extends({}, baseEvent, {
39
+ formId: zod.z.string().describe("Unique identifier of the form"),
40
+ formName: zod.z.string().describe("Human-readable form name")
41
+ }))
42
+ },
43
+ form_submitted: {
44
+ defaultName: "further.form_submitted",
45
+ description: "Fired when a form is successfully submitted",
46
+ schema: zod.z.object(_extends({}, baseEvent, communityEvent, {
47
+ formId: zod.z.string().describe("Unique identifier of the form"),
48
+ formName: zod.z.string().describe("Human-readable form name"),
49
+ fieldCount: zod.z.number().int().describe("Number of fields submitted")
50
+ }))
51
+ },
52
+ lead_created: {
53
+ defaultName: "further.lead_created",
54
+ description: "Fired when a new lead is captured via any channel",
55
+ schema: zod.z.object(_extends({}, baseEvent, communityEvent, {
56
+ leadId: zod.z.number().int().describe("Internal lead ID for CRM correlation"),
57
+ channelSource: zod.z.string().describe("Channel source that captured the lead (e.g. conversational_webform, static_webform, chat_api, conversational_ivr)"),
58
+ formId: zod.z.string().optional().describe("Form ID, if the lead came from a form"),
59
+ formName: zod.z.string().optional().describe("Form name, if the lead came from a form"),
60
+ chatId: zod.z.number().int().optional().describe("Chat/VSA ID, if the lead came from a chat widget"),
61
+ chatName: zod.z.string().optional().describe("Chat/VSA name, if the lead came from a chat widget")
62
+ }))
63
+ },
64
+ tour_scheduled: {
65
+ defaultName: "further.tour_scheduled",
66
+ description: "Fired when a tour is scheduled via any channel",
67
+ schema: zod.z.object(_extends({}, baseEvent, communityEvent, {
68
+ leadId: zod.z.number().int().describe("Internal lead ID for CRM correlation"),
69
+ tourDate: zod.z.string().optional().describe("ISO 8601 tour start date/time. Optional because the tour date may not always be parseable from user input."),
70
+ channelSource: zod.z.string().describe("Channel source that captured the lead (e.g. conversational_webform, static_webform, chat_api, conversational_ivr)"),
71
+ formId: zod.z.string().optional().describe("Form ID, if the tour was scheduled from a form"),
72
+ formName: zod.z.string().optional().describe("Form name, if the tour was scheduled from a form"),
73
+ chatId: zod.z.number().int().optional().describe("Chat/VSA ID, if the tour was scheduled from a chat widget"),
74
+ chatName: zod.z.string().optional().describe("Chat/VSA name, if the tour was scheduled from a chat widget")
75
+ }))
76
+ }
77
+ };
78
+
79
+ function getEventFields(eventKey) {
80
+ const shape = analyticsEvents[eventKey].schema.shape;
81
+ return Object.entries(shape).map(_ref => {
82
+ let [name, field] = _ref;
83
+ return {
84
+ name,
85
+ description: field.description || "",
86
+ required: !field.isOptional()
87
+ };
88
+ });
89
+ }
90
+
91
+ exports.analyticsEvents = analyticsEvents;
92
+ exports.getEventFields = getEventFields;
93
+
94
+ }));
95
+ //# sourceMappingURL=index.umd.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.umd.js","sources":["../events.ts","../index.ts"],"sourcesContent":["import { z } from \"zod\";\n\nconst baseEvent = {\n timestamp: z.string().datetime().describe(\"ISO 8601 timestamp of when the event occurred\"),\n pageUrl: z.string().url().describe(\"URL of the page where the event occurred\"),\n visitorId: z.string().describe(\"Anonymous visitor UUID for cross-event correlation\"),\n visitId: z.string().describe(\"Visit/session UUID for session-level funnel analysis\"),\n};\n\nconst communityEvent = {\n communityId: z.number().int().describe(\"ID of the community associated with the event\"),\n communityName: z.string().describe(\"Name of the community associated with the event\"),\n};\n\nexport const analyticsEvents = {\n form_viewed: {\n defaultName: \"further.form_viewed\",\n description: \"Fired when a form becomes visible to the user\",\n schema: z.object({\n ...baseEvent,\n formId: z.string().describe(\"Unique identifier of the form\"),\n formName: z.string().describe(\"Human-readable form name\"),\n }),\n },\n\n form_started: {\n defaultName: \"further.form_started\",\n description: \"Fired when the user interacts with a form field for the first time\",\n schema: z.object({\n ...baseEvent,\n formId: z.string().describe(\"Unique identifier of the form\"),\n formName: z.string().describe(\"Human-readable form name\"),\n }),\n },\n\n form_submitted: {\n defaultName: \"further.form_submitted\",\n description: \"Fired when a form is successfully submitted\",\n schema: z.object({\n ...baseEvent,\n ...communityEvent,\n formId: z.string().describe(\"Unique identifier of the form\"),\n formName: z.string().describe(\"Human-readable form name\"),\n fieldCount: z.number().int().describe(\"Number of fields submitted\"),\n }),\n },\n\n lead_created: {\n defaultName: \"further.lead_created\",\n description: \"Fired when a new lead is captured via any channel\",\n schema: z.object({\n ...baseEvent,\n ...communityEvent,\n leadId: z.number().int().describe(\"Internal lead ID for CRM correlation\"),\n channelSource: z.string().describe(\"Channel source that captured the lead (e.g. conversational_webform, static_webform, chat_api, conversational_ivr)\"),\n formId: z.string().optional().describe(\"Form ID, if the lead came from a form\"),\n formName: z.string().optional().describe(\"Form name, if the lead came from a form\"),\n chatId: z.number().int().optional().describe(\"Chat/VSA ID, if the lead came from a chat widget\"),\n chatName: z.string().optional().describe(\"Chat/VSA name, if the lead came from a chat widget\"),\n }),\n },\n tour_scheduled: {\n defaultName: \"further.tour_scheduled\",\n description: \"Fired when a tour is scheduled via any channel\",\n schema: z.object({\n ...baseEvent,\n ...communityEvent,\n leadId: z.number().int().describe(\"Internal lead ID for CRM correlation\"),\n tourDate: z.string().optional().describe(\"ISO 8601 tour start date/time. Optional because the tour date may not always be parseable from user input.\"),\n channelSource: z.string().describe(\"Channel source that captured the lead (e.g. conversational_webform, static_webform, chat_api, conversational_ivr)\"),\n formId: z.string().optional().describe(\"Form ID, if the tour was scheduled from a form\"),\n formName: z.string().optional().describe(\"Form name, if the tour was scheduled from a form\"),\n chatId: z.number().int().optional().describe(\"Chat/VSA ID, if the tour was scheduled from a chat widget\"),\n chatName: z.string().optional().describe(\"Chat/VSA name, if the tour was scheduled from a chat widget\"),\n }),\n },\n} as const;\n","import { z } from \"zod\";\nimport { analyticsEvents } from \"./events\";\n\nexport { analyticsEvents } from \"./events\";\n\nexport type AnalyticsEventName = keyof typeof analyticsEvents;\n\nexport type AnalyticsEventData<T extends AnalyticsEventName> = z.infer<(typeof analyticsEvents)[T][\"schema\"]>;\n\nexport function getEventFields(eventKey: AnalyticsEventName) {\n const shape = analyticsEvents[eventKey].schema.shape;\n return Object.entries(shape).map(([name, field]) => ({\n name,\n description: (field as z.ZodTypeAny).description || \"\",\n required: !(field as z.ZodTypeAny).isOptional(),\n }));\n}\n"],"names":["baseEvent","timestamp","z","string","datetime","describe","pageUrl","url","visitorId","visitId","communityEvent","communityId","number","int","communityName","analyticsEvents","form_viewed","defaultName","description","schema","object","_extends","formId","formName","form_started","form_submitted","fieldCount","lead_created","leadId","channelSource","optional","chatId","chatName","tour_scheduled","tourDate","getEventFields","eventKey","shape","Object","entries","map","_ref","name","field","required","isOptional"],"mappings":";;;;;;;;;;;;;;;EAEA,MAAMA,SAAS,GAAG;EAChBC,EAAAA,SAAS,EAAEC,KAAC,CAACC,MAAM,EAAE,CAACC,QAAQ,EAAE,CAACC,QAAQ,CAAC,+CAA+C,CAAC;EAC1FC,EAAAA,OAAO,EAAEJ,KAAC,CAACC,MAAM,EAAE,CAACI,GAAG,EAAE,CAACF,QAAQ,CAAC,0CAA0C,CAAC;IAC9EG,SAAS,EAAEN,KAAC,CAACC,MAAM,EAAE,CAACE,QAAQ,CAAC,oDAAoD,CAAC;IACpFI,OAAO,EAAEP,KAAC,CAACC,MAAM,EAAE,CAACE,QAAQ,CAAC,sDAAsD,CAAA;GACpF,CAAA;EAED,MAAMK,cAAc,GAAG;EACrBC,EAAAA,WAAW,EAAET,KAAC,CAACU,MAAM,EAAE,CAACC,GAAG,EAAE,CAACR,QAAQ,CAAC,+CAA+C,CAAC;IACvFS,aAAa,EAAEZ,KAAC,CAACC,MAAM,EAAE,CAACE,QAAQ,CAAC,iDAAiD,CAAA;GACrF,CAAA;AAEM,QAAMU,eAAe,GAAG;EAC7BC,EAAAA,WAAW,EAAE;EACXC,IAAAA,WAAW,EAAE,qBAAqB;EAClCC,IAAAA,WAAW,EAAE,+CAA+C;EAC5DC,IAAAA,MAAM,EAAEjB,KAAC,CAACkB,MAAM,CAAAC,QAAA,KACXrB,SAAS,EAAA;QACZsB,MAAM,EAAEpB,KAAC,CAACC,MAAM,EAAE,CAACE,QAAQ,CAAC,+BAA+B,CAAC;QAC5DkB,QAAQ,EAAErB,KAAC,CAACC,MAAM,EAAE,CAACE,QAAQ,CAAC,0BAA0B,CAAA;OACzD,CAAA,CAAA;KACF;EAEDmB,EAAAA,YAAY,EAAE;EACZP,IAAAA,WAAW,EAAE,sBAAsB;EACnCC,IAAAA,WAAW,EAAE,oEAAoE;EACjFC,IAAAA,MA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EAAE9B,KAAC,CAACC,MAAM,EAAE,CAAC2B,QAAQ,EAAE,CAACzB,QAAQ,CAAC,6DAA6D,CAAA;OACvG,CAAA,CAAA;EACF,GAAA;;;EClEG,SAAU8B,cAAcA,CAACC,QAA4B,EAAA;IACzD,MAAMC,KAAK,GAAGtB,eAAe,CAACqB,QAAQ,CAAC,CAACjB,MAAM,CAACkB,KAAK,CAAA;IACpD,OAAOC,MAAM,CAACC,OAAO,CAACF,KAAK,CAAC,CAACG,GAAG,CAACC,IAAA,IAAA;EAAA,IAAA,IAAC,CAACC,IAAI,EAAEC,KAAK,CAAC,GAAAF,IAAA,CAAA;MAAA,OAAM;QACnDC,IAAI;EACJxB,MAAAA,WAAW,EAAGyB,KAAsB,CAACzB,WAAW,IAAI,EAAE;EACtD0B,MAAAA,QAAQ,EAAE,CAAED,KAAsB,CAACE,UAAU,EAAE;OAChD,CAAA;EAAA,GAAC,CAAC,CAAA;EACL;;;;;;;;;"}
package/package.json ADDED
@@ -0,0 +1,29 @@
1
+ {
2
+ "name": "@talkfurther/events",
3
+ "type": "module",
4
+ "version": "0.2.0-rc.0",
5
+ "source": "index.ts",
6
+ "exports": {
7
+ "types": "./dist/index.d.ts",
8
+ "require": "./dist/index.cjs",
9
+ "default": "./dist/index.modern.js"
10
+ },
11
+ "types": "./dist/index.d.ts",
12
+ "main": "./dist/index.cjs",
13
+ "module": "./dist/index.module.js",
14
+ "unpkg": "./dist/index.umd.js",
15
+ "files": [
16
+ "dist"
17
+ ],
18
+ "dependencies": {
19
+ "zod": "^3.23.0"
20
+ },
21
+ "devDependencies": {
22
+ "microbundle": "^0.15.1"
23
+ },
24
+ "scripts": {
25
+ "dev": "microbundle watch --no-compress",
26
+ "build": "microbundle --no-compress",
27
+ "release": "npm run build && npm publish --access public"
28
+ }
29
+ }