@reservamos/browser-analytics 0.1.0 → 0.1.3
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/CHANGELOG.md +3 -0
- package/dist/browser-analytics.cjs +3 -3
- package/dist/browser-analytics.d.ts +18 -7
- package/dist/browser-analytics.esm.js +4205 -9
- package/dist/browser-analytics.iife.js +3 -3
- package/package.json +4 -3
- package/src/events/event_schema/PaymentFailedEventSchema.ts +247 -0
- package/src/events/event_schema/PurchaseCompleteEventSchema.ts +62 -0
- package/src/events/event_schema/validationSchema.ts +135 -0
- package/src/init.ts +6 -20
- package/src/track.ts +7 -0
- package/src/utils/validateConfig.ts +0 -16
|
@@ -1,27 +1,38 @@
|
|
|
1
1
|
// Generated by dts-bundle-generator v9.5.1
|
|
2
2
|
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
|
|
3
5
|
/**
|
|
4
6
|
First test event to track, it purpose is to test the tracking library and the identification service.ws
|
|
5
7
|
*/
|
|
6
8
|
export declare function trackTest(): void;
|
|
7
|
-
|
|
8
|
-
* Configuration object for initializing the tracking library.
|
|
9
|
-
*/
|
|
10
|
-
export interface InitConfig {
|
|
9
|
+
declare const InitConfigSchema: z.ZodObject<{
|
|
11
10
|
/**
|
|
12
11
|
* The Mixpanel token used for authenticating API requests.
|
|
13
12
|
*/
|
|
14
|
-
mixpanelToken:
|
|
13
|
+
mixpanelToken: z.ZodString;
|
|
15
14
|
/**
|
|
16
15
|
* Optional flag to enable or disable debug mode.
|
|
17
16
|
* When set to true, additional debug information will be logged.
|
|
18
17
|
*/
|
|
19
|
-
debug
|
|
18
|
+
debug: z.ZodOptional<z.ZodBoolean>;
|
|
20
19
|
/**
|
|
21
20
|
* Key for tracking user identities.
|
|
22
21
|
*/
|
|
22
|
+
identificationKey: z.ZodString;
|
|
23
|
+
}, "strip", z.ZodTypeAny, {
|
|
24
|
+
mixpanelToken: string;
|
|
23
25
|
identificationKey: string;
|
|
24
|
-
|
|
26
|
+
debug?: boolean | undefined;
|
|
27
|
+
}, {
|
|
28
|
+
mixpanelToken: string;
|
|
29
|
+
identificationKey: string;
|
|
30
|
+
debug?: boolean | undefined;
|
|
31
|
+
}>;
|
|
32
|
+
/**
|
|
33
|
+
* Configuration object for initializing the tracking library.
|
|
34
|
+
*/
|
|
35
|
+
export type InitConfig = z.infer<typeof InitConfigSchema>;
|
|
25
36
|
/**
|
|
26
37
|
* Initializes the tracking library with the provided configuration.
|
|
27
38
|
* @param {InitConfig} config - The configuration object for initialization.
|