@reservamos/browser-analytics 0.1.3 → 0.1.4-alpha.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +23 -11
  3. package/dist/browser-analytics.cjs +3 -3
  4. package/dist/browser-analytics.d.ts +478 -13
  5. package/dist/browser-analytics.esm.js +12545 -12412
  6. package/dist/browser-analytics.iife.js +24 -24
  7. package/package.json +1 -1
  8. package/src/constants/ProductTypes.ts +6 -0
  9. package/src/events/identify/identify.ts +83 -0
  10. package/src/events/identify/identifySchema.ts +15 -0
  11. package/src/events/identify/index.ts +3 -0
  12. package/src/events/interestInHome/index.ts +7 -0
  13. package/src/events/interestInHome/interestInHomeSchema.ts +11 -0
  14. package/src/events/interestInHome/trackInterestInHome.ts +14 -0
  15. package/src/events/interestInSearch/index.ts +7 -0
  16. package/src/events/interestInSearch/interestInSearchSchema.ts +10 -0
  17. package/src/events/interestInSearch/trackInterestInSearch.ts +14 -0
  18. package/src/events/passengersCreated/index.ts +7 -0
  19. package/src/events/passengersCreated/passengersCreatedSchema.ts +56 -0
  20. package/src/events/passengersCreated/trackPassengersCreated.ts +10 -0
  21. package/src/events/paymentAttempt/index.ts +7 -0
  22. package/src/events/paymentAttempt/paymentAttemptSchema.ts +53 -0
  23. package/src/events/paymentAttempt/trackPaymentAttempt.ts +10 -0
  24. package/src/events/pickedDeparture/index.ts +7 -0
  25. package/src/events/pickedDeparture/pickedDepartureSchema.ts +40 -0
  26. package/src/events/pickedDeparture/trackPickedDeparture.ts +14 -0
  27. package/src/events/purchaseAttempt/index.ts +7 -0
  28. package/src/events/purchaseAttempt/purchaseAttemptSchema.ts +79 -0
  29. package/src/events/purchaseAttempt/trackPurchaseAttempt.ts +14 -0
  30. package/src/events/search/index.ts +7 -0
  31. package/src/events/search/searchSchema.ts +31 -0
  32. package/src/events/search/trackSearch.ts +14 -0
  33. package/src/events/seatChange/index.ts +7 -0
  34. package/src/events/seatChange/seatChangeSchema.ts +33 -0
  35. package/src/events/seatChange/trackSeatChange.ts +10 -0
  36. package/src/events/test/index.ts +3 -0
  37. package/src/events/{trackTest.ts → test/trackTest.ts} +4 -2
  38. package/src/events/viewResults/index.ts +7 -0
  39. package/src/events/viewResults/trackViewResults.ts +14 -0
  40. package/src/events/viewResults/viewResultsSchema.ts +29 -0
  41. package/src/index.ts +47 -8
  42. package/src/init.ts +6 -8
  43. package/src/{fingerprint.ts → services/fingerprint.ts} +11 -3
  44. package/src/services/mixpanel.ts +89 -0
  45. package/src/services/validator.ts +154 -0
  46. package/src/track.ts +8 -15
  47. package/src/util/dateValidation.ts +26 -0
  48. package/src/util/productValidation.ts +10 -0
  49. package/src/util/userFingerprintValidation.ts +9 -0
  50. package/src/events/event_schema/PaymentFailedEventSchema.ts +0 -247
  51. package/src/events/event_schema/PurchaseCompleteEventSchema.ts +0 -62
  52. package/src/events/event_schema/validationSchema.ts +0 -135
  53. package/src/mixpanel.ts +0 -36
@@ -2,10 +2,468 @@
2
2
 
3
3
  import { z } from 'zod';
4
4
 
5
- /**
6
- First test event to track, it purpose is to test the tracking library and the identification service.ws
7
- */
8
- export declare function trackTest(): void;
5
+ declare const interestInHomeSchema: z.ZodObject<{
6
+ product: z.ZodEffects<z.ZodEnum<[
7
+ "web",
8
+ "web-mobile",
9
+ "ios",
10
+ "android",
11
+ "app"
12
+ ]>, "web" | "web-mobile" | "ios" | "android" | "app", "web" | "web-mobile" | "ios" | "android" | "app">;
13
+ }, "strip", z.ZodTypeAny, {
14
+ product: "web" | "web-mobile" | "ios" | "android" | "app";
15
+ }, {
16
+ product: "web" | "web-mobile" | "ios" | "android" | "app";
17
+ }>;
18
+ export type InterestInHomeProps = z.infer<typeof interestInHomeSchema>;
19
+ declare function trackInterestInHome(eventData: InterestInHomeProps): void;
20
+ declare const interestInSearchSchema: z.ZodObject<{
21
+ product: z.ZodEffects<z.ZodEnum<[
22
+ "web",
23
+ "web-mobile",
24
+ "ios",
25
+ "android",
26
+ "app"
27
+ ]>, "web" | "web-mobile" | "ios" | "android" | "app", "web" | "web-mobile" | "ios" | "android" | "app">;
28
+ }, "strip", z.ZodTypeAny, {
29
+ product: "web" | "web-mobile" | "ios" | "android" | "app";
30
+ }, {
31
+ product: "web" | "web-mobile" | "ios" | "android" | "app";
32
+ }>;
33
+ export type InterestInSearchProps = z.infer<typeof interestInSearchSchema>;
34
+ declare function trackInterestInSearch(eventData: InterestInSearchProps): void;
35
+ declare const passengersCreatedSchema: z.ZodObject<{
36
+ "Departure Arrival": z.ZodEffects<z.ZodString, string, string>;
37
+ "Departure Destination": z.ZodString;
38
+ "Departure Destination Terminal": z.ZodString;
39
+ "Departure Line": z.ZodString;
40
+ "Departure Origin": z.ZodString;
41
+ "Departure Origin Terminal": z.ZodString;
42
+ "Departure Price": z.ZodNumber;
43
+ "Departure Route": z.ZodString;
44
+ "Departure Stops": z.ZodOptional<z.ZodNumber>;
45
+ "Departure Time": z.ZodEffects<z.ZodString, string, string>;
46
+ "Departure Transporter": z.ZodString;
47
+ "Passenger Count": z.ZodNumber;
48
+ "Recommended Trip": z.ZodBoolean;
49
+ "Recommended Trip Type": z.ZodOptional<z.ZodString>;
50
+ Routes: z.ZodNumber;
51
+ Total: z.ZodNumber;
52
+ "Trip Length": z.ZodOptional<z.ZodNumber>;
53
+ product: z.ZodEffects<z.ZodEnum<[
54
+ "web",
55
+ "web-mobile",
56
+ "ios",
57
+ "android",
58
+ "app"
59
+ ]>, "web" | "web-mobile" | "ios" | "android" | "app", "web" | "web-mobile" | "ios" | "android" | "app">;
60
+ }, "strip", z.ZodTypeAny, {
61
+ product: "web" | "web-mobile" | "ios" | "android" | "app";
62
+ "Departure Arrival": string;
63
+ "Departure Destination": string;
64
+ "Departure Destination Terminal": string;
65
+ "Departure Line": string;
66
+ "Departure Origin": string;
67
+ "Departure Origin Terminal": string;
68
+ "Departure Price": number;
69
+ "Departure Route": string;
70
+ "Departure Time": string;
71
+ "Departure Transporter": string;
72
+ "Passenger Count": number;
73
+ "Recommended Trip": boolean;
74
+ Routes: number;
75
+ Total: number;
76
+ "Departure Stops"?: number | undefined;
77
+ "Recommended Trip Type"?: string | undefined;
78
+ "Trip Length"?: number | undefined;
79
+ }, {
80
+ product: "web" | "web-mobile" | "ios" | "android" | "app";
81
+ "Departure Arrival": string;
82
+ "Departure Destination": string;
83
+ "Departure Destination Terminal": string;
84
+ "Departure Line": string;
85
+ "Departure Origin": string;
86
+ "Departure Origin Terminal": string;
87
+ "Departure Price": number;
88
+ "Departure Route": string;
89
+ "Departure Time": string;
90
+ "Departure Transporter": string;
91
+ "Passenger Count": number;
92
+ "Recommended Trip": boolean;
93
+ Routes: number;
94
+ Total: number;
95
+ "Departure Stops"?: number | undefined;
96
+ "Recommended Trip Type"?: string | undefined;
97
+ "Trip Length"?: number | undefined;
98
+ }>;
99
+ export type PassengersCreatedProps = z.infer<typeof passengersCreatedSchema>;
100
+ declare const paymentAttemptSchema: z.ZodObject<{
101
+ "Departure Arrival": z.ZodEffects<z.ZodString, string, string>;
102
+ "Departure Destination": z.ZodString;
103
+ "Departure Destination Terminal": z.ZodString;
104
+ "Departure Line": z.ZodString;
105
+ "Departure Origin": z.ZodString;
106
+ "Departure Origin Terminal": z.ZodString;
107
+ "Departure Price": z.ZodNumber;
108
+ "Departure Route": z.ZodString;
109
+ "Departure Stop Cities": z.ZodOptional<z.ZodString>;
110
+ "Departure Stops": z.ZodOptional<z.ZodNumber>;
111
+ "Departure Time": z.ZodEffects<z.ZodString, string, string>;
112
+ "Departure Transporter": z.ZodString;
113
+ "Passenger Count": z.ZodNumber;
114
+ "Payment Type": z.ZodString;
115
+ "Recommended Trip": z.ZodBoolean;
116
+ "Recommended Trip Type": z.ZodOptional<z.ZodString>;
117
+ Routes: z.ZodNumber;
118
+ Total: z.ZodNumber;
119
+ product: z.ZodEffects<z.ZodEnum<[
120
+ "web",
121
+ "web-mobile",
122
+ "ios",
123
+ "android",
124
+ "app"
125
+ ]>, "web" | "web-mobile" | "ios" | "android" | "app", "web" | "web-mobile" | "ios" | "android" | "app">;
126
+ }, "strip", z.ZodTypeAny, {
127
+ product: "web" | "web-mobile" | "ios" | "android" | "app";
128
+ "Departure Arrival": string;
129
+ "Departure Destination": string;
130
+ "Departure Destination Terminal": string;
131
+ "Departure Line": string;
132
+ "Departure Origin": string;
133
+ "Departure Origin Terminal": string;
134
+ "Departure Price": number;
135
+ "Departure Route": string;
136
+ "Departure Time": string;
137
+ "Departure Transporter": string;
138
+ "Passenger Count": number;
139
+ "Recommended Trip": boolean;
140
+ Routes: number;
141
+ Total: number;
142
+ "Payment Type": string;
143
+ "Departure Stops"?: number | undefined;
144
+ "Recommended Trip Type"?: string | undefined;
145
+ "Departure Stop Cities"?: string | undefined;
146
+ }, {
147
+ product: "web" | "web-mobile" | "ios" | "android" | "app";
148
+ "Departure Arrival": string;
149
+ "Departure Destination": string;
150
+ "Departure Destination Terminal": string;
151
+ "Departure Line": string;
152
+ "Departure Origin": string;
153
+ "Departure Origin Terminal": string;
154
+ "Departure Price": number;
155
+ "Departure Route": string;
156
+ "Departure Time": string;
157
+ "Departure Transporter": string;
158
+ "Passenger Count": number;
159
+ "Recommended Trip": boolean;
160
+ Routes: number;
161
+ Total: number;
162
+ "Payment Type": string;
163
+ "Departure Stops"?: number | undefined;
164
+ "Recommended Trip Type"?: string | undefined;
165
+ "Departure Stop Cities"?: string | undefined;
166
+ }>;
167
+ export type PaymentAttemptProps = z.infer<typeof paymentAttemptSchema>;
168
+ declare const pickedDepartureSchema: z.ZodObject<{
169
+ Arrival: z.ZodEffects<z.ZodString, string, string>;
170
+ Departure: z.ZodEffects<z.ZodString, string, string>;
171
+ Destination: z.ZodString;
172
+ "Destination Terminal": z.ZodString;
173
+ Line: z.ZodOptional<z.ZodString>;
174
+ Origin: z.ZodString;
175
+ "Origin Terminal": z.ZodString;
176
+ Price: z.ZodNumber;
177
+ "Result Position": z.ZodNumber;
178
+ Route: z.ZodString;
179
+ Stops: z.ZodNumber;
180
+ "Transport Type": z.ZodString;
181
+ Transporter: z.ZodString;
182
+ product: z.ZodEffects<z.ZodEnum<[
183
+ "web",
184
+ "web-mobile",
185
+ "ios",
186
+ "android",
187
+ "app"
188
+ ]>, "web" | "web-mobile" | "ios" | "android" | "app", "web" | "web-mobile" | "ios" | "android" | "app">;
189
+ "Recommended Trip": z.ZodEffects<z.ZodBoolean, boolean, boolean>;
190
+ "Recommended Trip Type": z.ZodEffects<z.ZodUnion<[
191
+ z.ZodString,
192
+ z.ZodNull
193
+ ]>, string | null, string | null>;
194
+ }, "strip", z.ZodTypeAny, {
195
+ product: "web" | "web-mobile" | "ios" | "android" | "app";
196
+ "Recommended Trip": boolean;
197
+ "Recommended Trip Type": string | null;
198
+ Arrival: string;
199
+ Departure: string;
200
+ Destination: string;
201
+ "Destination Terminal": string;
202
+ Origin: string;
203
+ "Origin Terminal": string;
204
+ Price: number;
205
+ "Result Position": number;
206
+ Route: string;
207
+ Stops: number;
208
+ "Transport Type": string;
209
+ Transporter: string;
210
+ Line?: string | undefined;
211
+ }, {
212
+ product: "web" | "web-mobile" | "ios" | "android" | "app";
213
+ "Recommended Trip": boolean;
214
+ "Recommended Trip Type": string | null;
215
+ Arrival: string;
216
+ Departure: string;
217
+ Destination: string;
218
+ "Destination Terminal": string;
219
+ Origin: string;
220
+ "Origin Terminal": string;
221
+ Price: number;
222
+ "Result Position": number;
223
+ Route: string;
224
+ Stops: number;
225
+ "Transport Type": string;
226
+ Transporter: string;
227
+ Line?: string | undefined;
228
+ }>;
229
+ export type PickedDepartureProps = z.infer<typeof pickedDepartureSchema>;
230
+ declare function trackSearch(eventData: PickedDepartureProps): void;
231
+ declare const purchaseAttemptSchema: z.ZodObject<{
232
+ "Departure Arrival": z.ZodEffects<z.ZodString, string, string>;
233
+ "Departure Destination": z.ZodEffects<z.ZodString, string, string>;
234
+ "Departure Destination Terminal": z.ZodEffects<z.ZodString, string, string>;
235
+ "Departure Line": z.ZodEffects<z.ZodString, string, string>;
236
+ "Departure Origin": z.ZodEffects<z.ZodString, string, string>;
237
+ "Departure Origin Terminal": z.ZodEffects<z.ZodString, string, string>;
238
+ "Departure Price": z.ZodEffects<z.ZodNumber, number, number>;
239
+ "Departure Route": z.ZodEffects<z.ZodString, string, string>;
240
+ "Departure Stops": z.ZodEffects<z.ZodNumber, number, number>;
241
+ "Departure Time": z.ZodEffects<z.ZodString, string, string>;
242
+ "Departure Transport Type": z.ZodEffects<z.ZodString, string, string>;
243
+ "Departure Transporter": z.ZodEffects<z.ZodString, string, string>;
244
+ "Passenger Count": z.ZodEffects<z.ZodNumber, number, number>;
245
+ "Recommended Trip": z.ZodEffects<z.ZodBoolean, boolean, boolean>;
246
+ "Recommended Trip Type": z.ZodOptional<z.ZodEffects<z.ZodUnion<[
247
+ z.ZodString,
248
+ z.ZodNull
249
+ ]>, string | null, string | null>>;
250
+ Routes: z.ZodEffects<z.ZodNumber, number, number>;
251
+ Total: z.ZodEffects<z.ZodNumber, number, number>;
252
+ product: z.ZodEffects<z.ZodEnum<[
253
+ "web",
254
+ "web-mobile",
255
+ "ios",
256
+ "android",
257
+ "app"
258
+ ]>, "web" | "web-mobile" | "ios" | "android" | "app", "web" | "web-mobile" | "ios" | "android" | "app">;
259
+ "Trip Length": z.ZodOptional<z.ZodNumber>;
260
+ }, "strict", z.ZodTypeAny, {
261
+ product: "web" | "web-mobile" | "ios" | "android" | "app";
262
+ "Departure Arrival": string;
263
+ "Departure Destination": string;
264
+ "Departure Destination Terminal": string;
265
+ "Departure Line": string;
266
+ "Departure Origin": string;
267
+ "Departure Origin Terminal": string;
268
+ "Departure Price": number;
269
+ "Departure Route": string;
270
+ "Departure Stops": number;
271
+ "Departure Time": string;
272
+ "Departure Transporter": string;
273
+ "Passenger Count": number;
274
+ "Recommended Trip": boolean;
275
+ Routes: number;
276
+ Total: number;
277
+ "Departure Transport Type": string;
278
+ "Recommended Trip Type"?: string | null | undefined;
279
+ "Trip Length"?: number | undefined;
280
+ }, {
281
+ product: "web" | "web-mobile" | "ios" | "android" | "app";
282
+ "Departure Arrival": string;
283
+ "Departure Destination": string;
284
+ "Departure Destination Terminal": string;
285
+ "Departure Line": string;
286
+ "Departure Origin": string;
287
+ "Departure Origin Terminal": string;
288
+ "Departure Price": number;
289
+ "Departure Route": string;
290
+ "Departure Stops": number;
291
+ "Departure Time": string;
292
+ "Departure Transporter": string;
293
+ "Passenger Count": number;
294
+ "Recommended Trip": boolean;
295
+ Routes: number;
296
+ Total: number;
297
+ "Departure Transport Type": string;
298
+ "Recommended Trip Type"?: string | null | undefined;
299
+ "Trip Length"?: number | undefined;
300
+ }>;
301
+ export type PurchaseAttemptProps = z.infer<typeof purchaseAttemptSchema>;
302
+ declare function trackSearch$1(eventData: PurchaseAttemptProps): void;
303
+ declare const searchSchema: z.ZodObject<{
304
+ Departure: z.ZodEffects<z.ZodString, string, string>;
305
+ "Departure Delta": z.ZodNumber;
306
+ Destination: z.ZodString;
307
+ "Destination Terminal": z.ZodString;
308
+ Origin: z.ZodString;
309
+ "Origin Terminal": z.ZodString;
310
+ Passengers: z.ZodNumber;
311
+ Return: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
312
+ Route: z.ZodString;
313
+ "Trip Length": z.ZodOptional<z.ZodNumber>;
314
+ product: z.ZodEffects<z.ZodEnum<[
315
+ "web",
316
+ "web-mobile",
317
+ "ios",
318
+ "android",
319
+ "app"
320
+ ]>, "web" | "web-mobile" | "ios" | "android" | "app", "web" | "web-mobile" | "ios" | "android" | "app">;
321
+ }, "strip", z.ZodTypeAny, {
322
+ product: "web" | "web-mobile" | "ios" | "android" | "app";
323
+ Departure: string;
324
+ Destination: string;
325
+ "Destination Terminal": string;
326
+ Origin: string;
327
+ "Origin Terminal": string;
328
+ Route: string;
329
+ "Departure Delta": number;
330
+ Passengers: number;
331
+ "Trip Length"?: number | undefined;
332
+ Return?: string | undefined;
333
+ }, {
334
+ product: "web" | "web-mobile" | "ios" | "android" | "app";
335
+ Departure: string;
336
+ Destination: string;
337
+ "Destination Terminal": string;
338
+ Origin: string;
339
+ "Origin Terminal": string;
340
+ Route: string;
341
+ "Departure Delta": number;
342
+ Passengers: number;
343
+ "Trip Length"?: number | undefined;
344
+ Return?: string | undefined;
345
+ }>;
346
+ export type SearchProps = z.infer<typeof searchSchema>;
347
+ declare function trackSearch$2(eventData: SearchProps): void;
348
+ declare const seatChangeSchema: z.ZodObject<{
349
+ Arrival: z.ZodEffects<z.ZodString, string, string>;
350
+ Departure: z.ZodEffects<z.ZodString, string, string>;
351
+ Destination: z.ZodString;
352
+ "Destination Terminal": z.ZodString;
353
+ Line: z.ZodOptional<z.ZodString>;
354
+ Origin: z.ZodString;
355
+ "Origin Terminal": z.ZodString;
356
+ Price: z.ZodNumber;
357
+ Route: z.ZodString;
358
+ Stops: z.ZodOptional<z.ZodNumber>;
359
+ Tickets: z.ZodNumber;
360
+ Transporter: z.ZodString;
361
+ Way: z.ZodEnum<[
362
+ "Departure",
363
+ "Return"
364
+ ]>;
365
+ product: z.ZodEffects<z.ZodEnum<[
366
+ "web",
367
+ "web-mobile",
368
+ "ios",
369
+ "android",
370
+ "app"
371
+ ]>, "web" | "web-mobile" | "ios" | "android" | "app", "web" | "web-mobile" | "ios" | "android" | "app">;
372
+ }, "strip", z.ZodTypeAny, {
373
+ product: "web" | "web-mobile" | "ios" | "android" | "app";
374
+ Arrival: string;
375
+ Departure: string;
376
+ Destination: string;
377
+ "Destination Terminal": string;
378
+ Origin: string;
379
+ "Origin Terminal": string;
380
+ Price: number;
381
+ Route: string;
382
+ Transporter: string;
383
+ Tickets: number;
384
+ Way: "Departure" | "Return";
385
+ Line?: string | undefined;
386
+ Stops?: number | undefined;
387
+ }, {
388
+ product: "web" | "web-mobile" | "ios" | "android" | "app";
389
+ Arrival: string;
390
+ Departure: string;
391
+ Destination: string;
392
+ "Destination Terminal": string;
393
+ Origin: string;
394
+ "Origin Terminal": string;
395
+ Price: number;
396
+ Route: string;
397
+ Transporter: string;
398
+ Tickets: number;
399
+ Way: "Departure" | "Return";
400
+ Line?: string | undefined;
401
+ Stops?: number | undefined;
402
+ }>;
403
+ export type SeatChangeProps = z.infer<typeof seatChangeSchema>;
404
+ declare const viewResultsSchema: z.ZodObject<{
405
+ "Bus count": z.ZodNumber;
406
+ Departure: z.ZodEffects<z.ZodString, string, string>;
407
+ "Departure Delta": z.ZodOptional<z.ZodNumber>;
408
+ Destination: z.ZodOptional<z.ZodString>;
409
+ "Destination Terminal": z.ZodOptional<z.ZodString>;
410
+ "Has Frequent Buses": z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
411
+ Origin: z.ZodString;
412
+ "Origin Terminal": z.ZodString;
413
+ Route: z.ZodString;
414
+ product: z.ZodEffects<z.ZodEnum<[
415
+ "web",
416
+ "web-mobile",
417
+ "ios",
418
+ "android",
419
+ "app"
420
+ ]>, "web" | "web-mobile" | "ios" | "android" | "app", "web" | "web-mobile" | "ios" | "android" | "app">;
421
+ }, "strip", z.ZodTypeAny, {
422
+ product: "web" | "web-mobile" | "ios" | "android" | "app";
423
+ Departure: string;
424
+ Origin: string;
425
+ "Origin Terminal": string;
426
+ Route: string;
427
+ "Bus count": number;
428
+ Destination?: string | undefined;
429
+ "Destination Terminal"?: string | undefined;
430
+ "Departure Delta"?: number | undefined;
431
+ "Has Frequent Buses"?: boolean | undefined;
432
+ }, {
433
+ product: "web" | "web-mobile" | "ios" | "android" | "app";
434
+ Departure: string;
435
+ Origin: string;
436
+ "Origin Terminal": string;
437
+ Route: string;
438
+ "Bus count": number;
439
+ Destination?: string | undefined;
440
+ "Destination Terminal"?: string | undefined;
441
+ "Departure Delta"?: number | undefined;
442
+ "Has Frequent Buses"?: boolean | undefined;
443
+ }>;
444
+ export type ViewResultsProps = z.infer<typeof viewResultsSchema>;
445
+ declare function trackViewResults(eventData: ViewResultsProps): void;
446
+ declare const IdentifySchema: z.ZodObject<{
447
+ firstName: z.ZodOptional<z.ZodString>;
448
+ lastName: z.ZodOptional<z.ZodString>;
449
+ email: z.ZodOptional<z.ZodString>;
450
+ phone: z.ZodOptional<z.ZodString>;
451
+ }, "strip", z.ZodTypeAny, {
452
+ email?: string | undefined;
453
+ firstName?: string | undefined;
454
+ lastName?: string | undefined;
455
+ phone?: string | undefined;
456
+ }, {
457
+ email?: string | undefined;
458
+ firstName?: string | undefined;
459
+ lastName?: string | undefined;
460
+ phone?: string | undefined;
461
+ }>;
462
+ export type DefaultProperties = z.infer<typeof IdentifySchema>;
463
+ export interface UserProperties extends DefaultProperties, Record<string, string | number | boolean | undefined> {
464
+ }
465
+ declare function identify(userId: string, properties?: UserProperties): Promise<void>;
466
+ declare function trackTest(): void;
9
467
  declare const InitConfigSchema: z.ZodObject<{
10
468
  /**
11
469
  * The Mixpanel token used for authenticating API requests.
@@ -33,19 +491,26 @@ declare const InitConfigSchema: z.ZodObject<{
33
491
  * Configuration object for initializing the tracking library.
34
492
  */
35
493
  export type InitConfig = z.infer<typeof InitConfigSchema>;
36
- /**
37
- * Initializes the tracking library with the provided configuration.
38
- * @param {InitConfig} config - The configuration object for initialization.
39
- * @throws {Error} Throws an error if the configuration is invalid.
40
- */
41
- export declare function init(config: InitConfig): Promise<void>;
42
- declare const tracker: {
494
+ declare function init(config: InitConfig): Promise<void>;
495
+ declare const analytics: {
43
496
  init: typeof init;
44
- trackTest: typeof trackTest;
497
+ identify: typeof identify;
498
+ track: {
499
+ test: typeof trackTest;
500
+ search: typeof trackSearch$2;
501
+ seatChange: (eventProps: SeatChangeProps) => Promise<void>;
502
+ interestInHome: typeof trackInterestInHome;
503
+ interestInSearch: typeof trackInterestInSearch;
504
+ viewResults: typeof trackViewResults;
505
+ passengersCreated: (eventProps: PassengersCreatedProps) => Promise<void>;
506
+ paymentAttempt: (eventProps: PaymentAttemptProps) => Promise<void>;
507
+ purchaseAttempt: typeof trackSearch$1;
508
+ pickedDeparture: typeof trackSearch;
509
+ };
45
510
  };
46
511
 
47
512
  export {
48
- tracker as default,
513
+ analytics as default,
49
514
  };
50
515
 
51
516
  export {};