@talkfurther/events 0.2.0-rc.0 → 0.2.0-rc.1

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/dist/events.d.ts CHANGED
@@ -1,181 +1,231 @@
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
- };
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
+ readonly event_rsvp: {
182
+ readonly defaultName: "further.event_rsvp";
183
+ readonly description: "Fired when a user RSVPs to a community event";
184
+ readonly schema: z.ZodObject<{
185
+ leadId: z.ZodNumber;
186
+ eventId: z.ZodNumber;
187
+ eventName: z.ZodString;
188
+ channelSource: z.ZodString;
189
+ formId: z.ZodOptional<z.ZodString>;
190
+ formName: z.ZodOptional<z.ZodString>;
191
+ chatId: z.ZodOptional<z.ZodNumber>;
192
+ chatName: z.ZodOptional<z.ZodString>;
193
+ communityId: z.ZodNumber;
194
+ communityName: z.ZodString;
195
+ timestamp: z.ZodString;
196
+ pageUrl: z.ZodString;
197
+ visitorId: z.ZodString;
198
+ visitId: z.ZodString;
199
+ }, "strip", z.ZodTypeAny, {
200
+ timestamp: string;
201
+ pageUrl: string;
202
+ visitorId: string;
203
+ visitId: string;
204
+ communityId: number;
205
+ communityName: string;
206
+ leadId: number;
207
+ channelSource: string;
208
+ eventId: number;
209
+ eventName: string;
210
+ formId?: string | undefined;
211
+ formName?: string | undefined;
212
+ chatId?: number | undefined;
213
+ chatName?: string | undefined;
214
+ }, {
215
+ timestamp: string;
216
+ pageUrl: string;
217
+ visitorId: string;
218
+ visitId: string;
219
+ communityId: number;
220
+ communityName: string;
221
+ leadId: number;
222
+ channelSource: string;
223
+ eventId: number;
224
+ eventName: string;
225
+ formId?: string | undefined;
226
+ formName?: string | undefined;
227
+ chatId?: number | undefined;
228
+ chatName?: string | undefined;
229
+ }>;
230
+ };
231
+ };
package/dist/index.cjs CHANGED
@@ -1,15 +1,5 @@
1
1
  var zod = require('zod');
2
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
3
  const baseEvent = {
14
4
  timestamp: zod.z.string().datetime().describe("ISO 8601 timestamp of when the event occurred"),
15
5
  pageUrl: zod.z.string().url().describe("URL of the page where the event occurred"),
@@ -24,44 +14,52 @@ const analyticsEvents = {
24
14
  form_viewed: {
25
15
  defaultName: "further.form_viewed",
26
16
  description: "Fired when a form becomes visible to the user",
27
- schema: zod.z.object(_extends({}, baseEvent, {
17
+ schema: zod.z.object({
18
+ ...baseEvent,
28
19
  formId: zod.z.string().describe("Unique identifier of the form"),
29
20
  formName: zod.z.string().describe("Human-readable form name")
30
- }))
21
+ })
31
22
  },
32
23
  form_started: {
33
24
  defaultName: "further.form_started",
34
25
  description: "Fired when the user interacts with a form field for the first time",
35
- schema: zod.z.object(_extends({}, baseEvent, {
26
+ schema: zod.z.object({
27
+ ...baseEvent,
36
28
  formId: zod.z.string().describe("Unique identifier of the form"),
37
29
  formName: zod.z.string().describe("Human-readable form name")
38
- }))
30
+ })
39
31
  },
40
32
  form_submitted: {
41
33
  defaultName: "further.form_submitted",
42
34
  description: "Fired when a form is successfully submitted",
43
- schema: zod.z.object(_extends({}, baseEvent, communityEvent, {
35
+ schema: zod.z.object({
36
+ ...baseEvent,
37
+ ...communityEvent,
44
38
  formId: zod.z.string().describe("Unique identifier of the form"),
45
39
  formName: zod.z.string().describe("Human-readable form name"),
46
40
  fieldCount: zod.z.number().int().describe("Number of fields submitted")
47
- }))
41
+ })
48
42
  },
49
43
  lead_created: {
50
44
  defaultName: "further.lead_created",
51
45
  description: "Fired when a new lead is captured via any channel",
52
- schema: zod.z.object(_extends({}, baseEvent, communityEvent, {
46
+ schema: zod.z.object({
47
+ ...baseEvent,
48
+ ...communityEvent,
53
49
  leadId: zod.z.number().int().describe("Internal lead ID for CRM correlation"),
54
50
  channelSource: zod.z.string().describe("Channel source that captured the lead (e.g. conversational_webform, static_webform, chat_api, conversational_ivr)"),
55
51
  formId: zod.z.string().optional().describe("Form ID, if the lead came from a form"),
56
52
  formName: zod.z.string().optional().describe("Form name, if the lead came from a form"),
57
53
  chatId: zod.z.number().int().optional().describe("Chat/VSA ID, if the lead came from a chat widget"),
58
54
  chatName: zod.z.string().optional().describe("Chat/VSA name, if the lead came from a chat widget")
59
- }))
55
+ })
60
56
  },
61
57
  tour_scheduled: {
62
58
  defaultName: "further.tour_scheduled",
63
59
  description: "Fired when a tour is scheduled via any channel",
64
- schema: zod.z.object(_extends({}, baseEvent, communityEvent, {
60
+ schema: zod.z.object({
61
+ ...baseEvent,
62
+ ...communityEvent,
65
63
  leadId: zod.z.number().int().describe("Internal lead ID for CRM correlation"),
66
64
  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
65
  channelSource: zod.z.string().describe("Channel source that captured the lead (e.g. conversational_webform, static_webform, chat_api, conversational_ivr)"),
@@ -69,7 +67,23 @@ const analyticsEvents = {
69
67
  formName: zod.z.string().optional().describe("Form name, if the tour was scheduled from a form"),
70
68
  chatId: zod.z.number().int().optional().describe("Chat/VSA ID, if the tour was scheduled from a chat widget"),
71
69
  chatName: zod.z.string().optional().describe("Chat/VSA name, if the tour was scheduled from a chat widget")
72
- }))
70
+ })
71
+ },
72
+ event_rsvp: {
73
+ defaultName: "further.event_rsvp",
74
+ description: "Fired when a user RSVPs to a community event",
75
+ schema: zod.z.object({
76
+ ...baseEvent,
77
+ ...communityEvent,
78
+ leadId: zod.z.number().int().describe("Internal lead ID for CRM correlation"),
79
+ eventId: zod.z.number().int().describe("Community event ID"),
80
+ eventName: zod.z.string().describe("Community event name"),
81
+ channelSource: zod.z.string().describe("Channel source (e.g. conversational_webform, static_webform, chat_api, conversational_ivr)"),
82
+ formId: zod.z.string().optional().describe("Form ID, if the RSVP came from a form"),
83
+ formName: zod.z.string().optional().describe("Form name, if the RSVP came from a form"),
84
+ chatId: zod.z.number().int().optional().describe("Chat/VSA ID, if the RSVP came from a chat widget"),
85
+ chatName: zod.z.string().optional().describe("Chat/VSA name, if the RSVP came from a chat widget")
86
+ })
73
87
  }
74
88
  };
75
89
 
@@ -1 +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,CAACE,QAAQ,CAAC,0BAA0B,CAAA;KACzD,CAAA,CAAA;GACF;AAEDmB,EAAAA,YAAY,EAAE;AACZP,IAAAA,WAAW,EAAE,sBAAsB;AACnCC,IAAAA,WAAW,EAAE,oEAAoE;AACjFC,IAAAA,MAAM,EAAEjB,KAAC,CA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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;;;;;"}
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 event_rsvp: {\n defaultName: \"further.event_rsvp\",\n description: \"Fired when a user RSVPs to a community event\",\n schema: z.object({\n ...baseEvent,\n ...communityEvent,\n leadId: z.number().int().describe(\"Internal lead ID for CRM correlation\"),\n eventId: z.number().int().describe(\"Community event ID\"),\n eventName: z.string().describe(\"Community event name\"),\n channelSource: z.string().describe(\"Channel source (e.g. conversational_webform, static_webform, chat_api, conversational_ivr)\"),\n formId: z.string().optional().describe(\"Form ID, if the RSVP came from a form\"),\n formName: z.string().optional().describe(\"Form name, if the RSVP came from a form\"),\n chatId: z.number().int().optional().describe(\"Chat/VSA ID, if the RSVP came from a chat widget\"),\n chatName: z.string().optional().describe(\"Chat/VSA name, if the RSVP came 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","formId","formName","form_started","form_submitted","fieldCount","lead_created","leadId","channelSource","optional","chatId","chatName","tour_scheduled","tourDate","event_rsvp","eventId","eventName","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,oDAA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/dist/index.d.ts CHANGED
@@ -1,10 +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
- }[];
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
+ }[];
@@ -70,6 +70,20 @@ const analyticsEvents = {
70
70
  chatId: z.number().int().optional().describe("Chat/VSA ID, if the tour was scheduled from a chat widget"),
71
71
  chatName: z.string().optional().describe("Chat/VSA name, if the tour was scheduled from a chat widget")
72
72
  }))
73
+ },
74
+ event_rsvp: {
75
+ defaultName: "further.event_rsvp",
76
+ description: "Fired when a user RSVPs to a community event",
77
+ schema: z.object(_extends({}, baseEvent, communityEvent, {
78
+ leadId: z.number().int().describe("Internal lead ID for CRM correlation"),
79
+ eventId: z.number().int().describe("Community event ID"),
80
+ eventName: z.string().describe("Community event name"),
81
+ channelSource: z.string().describe("Channel source (e.g. conversational_webform, static_webform, chat_api, conversational_ivr)"),
82
+ formId: z.string().optional().describe("Form ID, if the RSVP came from a form"),
83
+ formName: z.string().optional().describe("Form name, if the RSVP came from a form"),
84
+ chatId: z.number().int().optional().describe("Chat/VSA ID, if the RSVP came from a chat widget"),
85
+ chatName: z.string().optional().describe("Chat/VSA name, if the RSVP came from a chat widget")
86
+ }))
73
87
  }
74
88
  };
75
89
 
@@ -1 +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,EA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ACpD,EAAA,OAAOC,MAAM,CAACC,OAAO,CAACF,KAAK,CAAC,CAACG,GAAG,CAAC,CAAC,CAACC,IAAI,EAAEC,KAAK,CAAC,MAAM;IACnDD,IAAI;AACJvB,IAAAA,WAAW,EAAGwB,KAAsB,CAACxB,WAAW,IAAI,EAAE;AACtDyB,IAAAA,QAAQ,EAAE,CAAED,KAAsB,CAACE,UAAU,EAAE;AAChD,GAAA,CAAC,CAAC,CAAA;AACL;;;;"}
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 event_rsvp: {\n defaultName: \"further.event_rsvp\",\n description: \"Fired when a user RSVPs to a community event\",\n schema: z.object({\n ...baseEvent,\n ...communityEvent,\n leadId: z.number().int().describe(\"Internal lead ID for CRM correlation\"),\n eventId: z.number().int().describe(\"Community event ID\"),\n eventName: z.string().describe(\"Community event name\"),\n channelSource: z.string().describe(\"Channel source (e.g. conversational_webform, static_webform, chat_api, conversational_ivr)\"),\n formId: z.string().optional().describe(\"Form ID, if the RSVP came from a form\"),\n formName: z.string().optional().describe(\"Form name, if the RSVP came from a form\"),\n chatId: z.number().int().optional().describe(\"Chat/VSA ID, if the RSVP came from a chat widget\"),\n chatName: z.string().optional().describe(\"Chat/VSA name, if the RSVP came 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","event_rsvp","eventId","eventName","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+C,CAAC;EACvFS,aAAa,EAAEZ,CAAC,CAACC,MAAM,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AChIiB,MAAAA,MAAM,EAAEpB,CAAC,CAACC,MAAM,EAAE,CAAC2B,QAAQ,EAAE,CAACzB,QAAQ,CAAC,uCAAuC,CAAC;AAC/EkB,MAAAA,QAAQ,EAAErB,CAAC,CAACC,MAAM,EAAE,CAAC2B,QAAQ,EAAE,CAACzB,QAAQ,CAAC,yCAAyC,CAAC;AACnF0B,MAAAA,MAAM,EAAE7B,CAAC,CAACU,MAAM,EAAE,CAACC,GAAG,EAAE,CAACiB,QAAQ,EAAE,CAACzB,QAAQ,CAAC,kDAAkD,CAAC;AAChG2B,MAAAA,QAAQ,EAAE9B,CAAC,CAACC,MAAM,EAAE,CAAC2B,QAAQ,EAAE,CAACzB,QAAQ,CAAC,oDAAoD,CAAA;KAC9F,CAAA,CAAA;AACF,GAAA;;;AClFG,SAAUiC,cAAcA,CAACC,QAA4B,EAAA;EACzD,MAAMC,KAAK,GAAGzB,eAAe,CAACwB,QAAQ,CAAC,CAACpB,MAAM,CAACqB,KAAK,CAAA;AACpD,EAAA,OAAOC,MAAM,CAACC,OAAO,CAACF,KAAK,CAAC,CAACG,GAAG,CAAC,CAAC,CAACC,IAAI,EAAEC,KAAK,CAAC,MAAM;IACnDD,IAAI;AACJ1B,IAAAA,WAAW,EAAG2B,KAAsB,CAAC3B,WAAW,IAAI,EAAE;AACtD4B,IAAAA,QAAQ,EAAE,CAAED,KAAsB,CAACE,UAAU,EAAE;AAChD,GAAA,CAAC,CAAC,CAAA;AACL;;;;"}
@@ -1,15 +1,5 @@
1
1
  import { z } from 'zod';
2
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
3
  const baseEvent = {
14
4
  timestamp: z.string().datetime().describe("ISO 8601 timestamp of when the event occurred"),
15
5
  pageUrl: z.string().url().describe("URL of the page where the event occurred"),
@@ -24,44 +14,52 @@ const analyticsEvents = {
24
14
  form_viewed: {
25
15
  defaultName: "further.form_viewed",
26
16
  description: "Fired when a form becomes visible to the user",
27
- schema: z.object(_extends({}, baseEvent, {
17
+ schema: z.object({
18
+ ...baseEvent,
28
19
  formId: z.string().describe("Unique identifier of the form"),
29
20
  formName: z.string().describe("Human-readable form name")
30
- }))
21
+ })
31
22
  },
32
23
  form_started: {
33
24
  defaultName: "further.form_started",
34
25
  description: "Fired when the user interacts with a form field for the first time",
35
- schema: z.object(_extends({}, baseEvent, {
26
+ schema: z.object({
27
+ ...baseEvent,
36
28
  formId: z.string().describe("Unique identifier of the form"),
37
29
  formName: z.string().describe("Human-readable form name")
38
- }))
30
+ })
39
31
  },
40
32
  form_submitted: {
41
33
  defaultName: "further.form_submitted",
42
34
  description: "Fired when a form is successfully submitted",
43
- schema: z.object(_extends({}, baseEvent, communityEvent, {
35
+ schema: z.object({
36
+ ...baseEvent,
37
+ ...communityEvent,
44
38
  formId: z.string().describe("Unique identifier of the form"),
45
39
  formName: z.string().describe("Human-readable form name"),
46
40
  fieldCount: z.number().int().describe("Number of fields submitted")
47
- }))
41
+ })
48
42
  },
49
43
  lead_created: {
50
44
  defaultName: "further.lead_created",
51
45
  description: "Fired when a new lead is captured via any channel",
52
- schema: z.object(_extends({}, baseEvent, communityEvent, {
46
+ schema: z.object({
47
+ ...baseEvent,
48
+ ...communityEvent,
53
49
  leadId: z.number().int().describe("Internal lead ID for CRM correlation"),
54
50
  channelSource: z.string().describe("Channel source that captured the lead (e.g. conversational_webform, static_webform, chat_api, conversational_ivr)"),
55
51
  formId: z.string().optional().describe("Form ID, if the lead came from a form"),
56
52
  formName: z.string().optional().describe("Form name, if the lead came from a form"),
57
53
  chatId: z.number().int().optional().describe("Chat/VSA ID, if the lead came from a chat widget"),
58
54
  chatName: z.string().optional().describe("Chat/VSA name, if the lead came from a chat widget")
59
- }))
55
+ })
60
56
  },
61
57
  tour_scheduled: {
62
58
  defaultName: "further.tour_scheduled",
63
59
  description: "Fired when a tour is scheduled via any channel",
64
- schema: z.object(_extends({}, baseEvent, communityEvent, {
60
+ schema: z.object({
61
+ ...baseEvent,
62
+ ...communityEvent,
65
63
  leadId: z.number().int().describe("Internal lead ID for CRM correlation"),
66
64
  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
65
  channelSource: z.string().describe("Channel source that captured the lead (e.g. conversational_webform, static_webform, chat_api, conversational_ivr)"),
@@ -69,7 +67,23 @@ const analyticsEvents = {
69
67
  formName: z.string().optional().describe("Form name, if the tour was scheduled from a form"),
70
68
  chatId: z.number().int().optional().describe("Chat/VSA ID, if the tour was scheduled from a chat widget"),
71
69
  chatName: z.string().optional().describe("Chat/VSA name, if the tour was scheduled from a chat widget")
72
- }))
70
+ })
71
+ },
72
+ event_rsvp: {
73
+ defaultName: "further.event_rsvp",
74
+ description: "Fired when a user RSVPs to a community event",
75
+ schema: z.object({
76
+ ...baseEvent,
77
+ ...communityEvent,
78
+ leadId: z.number().int().describe("Internal lead ID for CRM correlation"),
79
+ eventId: z.number().int().describe("Community event ID"),
80
+ eventName: z.string().describe("Community event name"),
81
+ channelSource: z.string().describe("Channel source (e.g. conversational_webform, static_webform, chat_api, conversational_ivr)"),
82
+ formId: z.string().optional().describe("Form ID, if the RSVP came from a form"),
83
+ formName: z.string().optional().describe("Form name, if the RSVP came from a form"),
84
+ chatId: z.number().int().optional().describe("Chat/VSA ID, if the RSVP came from a chat widget"),
85
+ chatName: z.string().optional().describe("Chat/VSA name, if the RSVP came from a chat widget")
86
+ })
73
87
  }
74
88
  };
75
89
 
@@ -1 +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,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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;;;;"}
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 event_rsvp: {\n defaultName: \"further.event_rsvp\",\n description: \"Fired when a user RSVPs to a community event\",\n schema: z.object({\n ...baseEvent,\n ...communityEvent,\n leadId: z.number().int().describe(\"Internal lead ID for CRM correlation\"),\n eventId: z.number().int().describe(\"Community event ID\"),\n eventName: z.string().describe(\"Community event name\"),\n channelSource: z.string().describe(\"Channel source (e.g. conversational_webform, static_webform, chat_api, conversational_ivr)\"),\n formId: z.string().optional().describe(\"Form ID, if the RSVP came from a form\"),\n formName: z.string().optional().describe(\"Form name, if the RSVP came from a form\"),\n chatId: z.number().int().optional().describe(\"Chat/VSA ID, if the RSVP came from a chat widget\"),\n chatName: z.string().optional().describe(\"Chat/VSA name, if the RSVP came 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","formId","formName","form_started","form_submitted","fieldCount","lead_created","leadId","channelSource","optional","chatId","chatName","tour_scheduled","tourDate","event_rsvp","eventId","eventName","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,sDAAsD,CAAA;CACpF,CAAA;AAED,MAAMK,cAAc,GAAG;AACrBC,EAAAA,WAAW,EAAET,CAAC,CAACU,MAAM,EAAE,CAACC,GAAG,EAAE,CAACR,QAAQ,CAAC,+CAA+C,CAAC;EACvFS,aAAa,EAAEZ,CAAC,CAACC,MAAM,EAAE,CAACE,QAAQ,CAAC,iDAAiD,CAAA;CACrF,CAAA;AAEM,MAAMU,eAAe,GAAG;AAC7BC,EAAAA,WAAW,EAAE;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,CAAC;AAC/EiB,MAAAA,QAAQ,EAAEpB,CAAC,CAACC,MAAM,EAAE,CAAC0B,QAAQ,EAAE,CAACxB,QAAQ,CAAC,yCAAyC,CAAC;AACnFyB,MAAAA,MAAM,EAAE5B,CAAC,CAACU,MAAM,EAAE,CAACC,GAAG,EAAE,CAACgB,QAAQ,EAAE,CAACxB,QAAQ,CAAC,kDAAkD,CAAC;AAChG0B,MAAAA,QAAQ,EAAE7B,CAAC,CAACC,MAAM,EAAE,CAAC0B,QAAQ,EAAE,CAACxB,QAAQ,CAAC,oDAAoD,CAAA;KAC9F,CAAA;AACF,GAAA;;;AClFG,SAAUgC,cAAcA,CAACC,QAA4B,EAAA;EACzD,MAAMC,KAAK,GAAGxB,eAAe,CAACuB,QAAQ,CAAC,CAACnB,MAAM,CAACoB,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;AACJ1B,MAAAA,WAAW,EAAG2B,KAAsB,CAAC3B,WAAW,IAAI,EAAE;AACtD4B,MAAAA,QAAQ,EAAE,CAAED,KAAsB,CAACE,UAAU,EAAE;KAChD,CAAA;AAAA,GAAC,CAAC,CAAA;AACL;;;;"}
package/dist/index.umd.js CHANGED
@@ -3,16 +3,6 @@
3
3
  typeof define === 'function' && define.amd ? define(['exports', 'zod'], factory) :
4
4
  (global = global || self, factory(global.events = {}, global.zod));
5
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
6
  const baseEvent = {
17
7
  timestamp: zod.z.string().datetime().describe("ISO 8601 timestamp of when the event occurred"),
18
8
  pageUrl: zod.z.string().url().describe("URL of the page where the event occurred"),
@@ -27,44 +17,52 @@
27
17
  form_viewed: {
28
18
  defaultName: "further.form_viewed",
29
19
  description: "Fired when a form becomes visible to the user",
30
- schema: zod.z.object(_extends({}, baseEvent, {
20
+ schema: zod.z.object({
21
+ ...baseEvent,
31
22
  formId: zod.z.string().describe("Unique identifier of the form"),
32
23
  formName: zod.z.string().describe("Human-readable form name")
33
- }))
24
+ })
34
25
  },
35
26
  form_started: {
36
27
  defaultName: "further.form_started",
37
28
  description: "Fired when the user interacts with a form field for the first time",
38
- schema: zod.z.object(_extends({}, baseEvent, {
29
+ schema: zod.z.object({
30
+ ...baseEvent,
39
31
  formId: zod.z.string().describe("Unique identifier of the form"),
40
32
  formName: zod.z.string().describe("Human-readable form name")
41
- }))
33
+ })
42
34
  },
43
35
  form_submitted: {
44
36
  defaultName: "further.form_submitted",
45
37
  description: "Fired when a form is successfully submitted",
46
- schema: zod.z.object(_extends({}, baseEvent, communityEvent, {
38
+ schema: zod.z.object({
39
+ ...baseEvent,
40
+ ...communityEvent,
47
41
  formId: zod.z.string().describe("Unique identifier of the form"),
48
42
  formName: zod.z.string().describe("Human-readable form name"),
49
43
  fieldCount: zod.z.number().int().describe("Number of fields submitted")
50
- }))
44
+ })
51
45
  },
52
46
  lead_created: {
53
47
  defaultName: "further.lead_created",
54
48
  description: "Fired when a new lead is captured via any channel",
55
- schema: zod.z.object(_extends({}, baseEvent, communityEvent, {
49
+ schema: zod.z.object({
50
+ ...baseEvent,
51
+ ...communityEvent,
56
52
  leadId: zod.z.number().int().describe("Internal lead ID for CRM correlation"),
57
53
  channelSource: zod.z.string().describe("Channel source that captured the lead (e.g. conversational_webform, static_webform, chat_api, conversational_ivr)"),
58
54
  formId: zod.z.string().optional().describe("Form ID, if the lead came from a form"),
59
55
  formName: zod.z.string().optional().describe("Form name, if the lead came from a form"),
60
56
  chatId: zod.z.number().int().optional().describe("Chat/VSA ID, if the lead came from a chat widget"),
61
57
  chatName: zod.z.string().optional().describe("Chat/VSA name, if the lead came from a chat widget")
62
- }))
58
+ })
63
59
  },
64
60
  tour_scheduled: {
65
61
  defaultName: "further.tour_scheduled",
66
62
  description: "Fired when a tour is scheduled via any channel",
67
- schema: zod.z.object(_extends({}, baseEvent, communityEvent, {
63
+ schema: zod.z.object({
64
+ ...baseEvent,
65
+ ...communityEvent,
68
66
  leadId: zod.z.number().int().describe("Internal lead ID for CRM correlation"),
69
67
  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
68
  channelSource: zod.z.string().describe("Channel source that captured the lead (e.g. conversational_webform, static_webform, chat_api, conversational_ivr)"),
@@ -72,7 +70,23 @@
72
70
  formName: zod.z.string().optional().describe("Form name, if the tour was scheduled from a form"),
73
71
  chatId: zod.z.number().int().optional().describe("Chat/VSA ID, if the tour was scheduled from a chat widget"),
74
72
  chatName: zod.z.string().optional().describe("Chat/VSA name, if the tour was scheduled from a chat widget")
75
- }))
73
+ })
74
+ },
75
+ event_rsvp: {
76
+ defaultName: "further.event_rsvp",
77
+ description: "Fired when a user RSVPs to a community event",
78
+ schema: zod.z.object({
79
+ ...baseEvent,
80
+ ...communityEvent,
81
+ leadId: zod.z.number().int().describe("Internal lead ID for CRM correlation"),
82
+ eventId: zod.z.number().int().describe("Community event ID"),
83
+ eventName: zod.z.string().describe("Community event name"),
84
+ channelSource: zod.z.string().describe("Channel source (e.g. conversational_webform, static_webform, chat_api, conversational_ivr)"),
85
+ formId: zod.z.string().optional().describe("Form ID, if the RSVP came from a form"),
86
+ formName: zod.z.string().optional().describe("Form name, if the RSVP came from a form"),
87
+ chatId: zod.z.number().int().optional().describe("Chat/VSA ID, if the RSVP came from a chat widget"),
88
+ chatName: zod.z.string().optional().describe("Chat/VSA name, if the RSVP came from a chat widget")
89
+ })
76
90
  }
77
91
  };
78
92
 
@@ -1 +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,+CA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,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;;;;;;;;;"}
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 event_rsvp: {\n defaultName: \"further.event_rsvp\",\n description: \"Fired when a user RSVPs to a community event\",\n schema: z.object({\n ...baseEvent,\n ...communityEvent,\n leadId: z.number().int().describe(\"Internal lead ID for CRM correlation\"),\n eventId: z.number().int().describe(\"Community event ID\"),\n eventName: z.string().describe(\"Community event name\"),\n channelSource: z.string().describe(\"Channel source (e.g. conversational_webform, static_webform, chat_api, conversational_ivr)\"),\n formId: z.string().optional().describe(\"Form ID, if the RSVP came from a form\"),\n formName: z.string().optional().describe(\"Form name, if the RSVP came from a form\"),\n chatId: z.number().int().optional().describe(\"Chat/VSA ID, if the RSVP came from a chat widget\"),\n chatName: z.string().optional().describe(\"Chat/VSA name, if the RSVP came 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","formId","formName","form_started","form_submitted","fieldCount","lead_created","leadId","channelSource","optional","chatId","chatName","tour_scheduled","tourDate","event_rsvp","eventId","eventName","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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Aa,EAAE1B,KAAC,CAACC,MAAM,EAAE,CAACE,QAAQ,CAAC,4FAA4F,CAAC;EAChIgB,MAAAA,MAAM,EAAEnB,KAAC,CAACC,MAAM,EAAE,CAAC0B,QAAQ,EAAE,CAACxB,QAAQ,CAAC,uCAAuC,CAAC;EAC/EiB,MAAAA,QAAQ,EAAEpB,KAAC,CAACC,MAAM,EAAE,CAAC0B,QAAQ,EAAE,CAACxB,QAAQ,CAAC,yCAAyC,CAAC;EACnFyB,MAAAA,MAAM,EAAE5B,KAAC,CAACU,MAAM,EAAE,CAACC,GAAG,EAAE,CAACgB,QAAQ,EAAE,CAACxB,QAAQ,CAAC,kDAAkD,CAAC;EAChG0B,MAAAA,QAAQ,EAAE7B,KAAC,CAACC,MAAM,EAAE,CAAC0B,QAAQ,EAAE,CAACxB,QAAQ,CAAC,oDAAoD,CAAA;OAC9F,CAAA;EACF,GAAA;;;EClFG,SAAUgC,cAAcA,CAACC,QAA4B,EAAA;IACzD,MAAMC,KAAK,GAAGxB,eAAe,CAACuB,QAAQ,CAAC,CAACnB,MAAM,CAACoB,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;EACJ1B,MAAAA,WAAW,EAAG2B,KAAsB,CAAC3B,WAAW,IAAI,EAAE;EACtD4B,MAAAA,QAAQ,EAAE,CAAED,KAAsB,CAACE,UAAU,EAAE;OAChD,CAAA;EAAA,GAAC,CAAC,CAAA;EACL;;;;;;;;;"}
package/package.json CHANGED
@@ -1,9 +1,10 @@
1
1
  {
2
2
  "name": "@talkfurther/events",
3
3
  "type": "module",
4
- "version": "0.2.0-rc.0",
4
+ "version": "0.2.0-rc.1",
5
5
  "source": "index.ts",
6
6
  "exports": {
7
+ "source": "./index.ts",
7
8
  "types": "./dist/index.d.ts",
8
9
  "require": "./dist/index.cjs",
9
10
  "default": "./dist/index.modern.js"