@walkeros/web-destination-meta 0.3.1 → 0.4.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/dev.d.mts ADDED
@@ -0,0 +1,161 @@
1
+ import * as _walkeros_core_dev from '@walkeros/core/dev';
2
+ import { z } from '@walkeros/core/dev';
3
+ import { Mapping as Mapping$2 } from '@walkeros/core';
4
+ import { DestinationWeb } from '@walkeros/web-core';
5
+
6
+ /**
7
+ * Meta Pixel ID
8
+ * Must be a numeric string (Facebook Pixel IDs are numeric)
9
+ */
10
+ declare const PixelId: z.ZodString;
11
+ /**
12
+ * Meta Pixel Standard Event Names
13
+ * https://developers.facebook.com/docs/meta-pixel/reference
14
+ */
15
+ declare const StandardEventName: z.ZodEnum<{
16
+ PageView: "PageView";
17
+ AddPaymentInfo: "AddPaymentInfo";
18
+ AddToCart: "AddToCart";
19
+ AddToWishlist: "AddToWishlist";
20
+ CompleteRegistration: "CompleteRegistration";
21
+ Contact: "Contact";
22
+ CustomizeProduct: "CustomizeProduct";
23
+ Donate: "Donate";
24
+ FindLocation: "FindLocation";
25
+ InitiateCheckout: "InitiateCheckout";
26
+ Lead: "Lead";
27
+ Purchase: "Purchase";
28
+ Schedule: "Schedule";
29
+ Search: "Search";
30
+ StartTrial: "StartTrial";
31
+ SubmitApplication: "SubmitApplication";
32
+ Subscribe: "Subscribe";
33
+ ViewContent: "ViewContent";
34
+ }>;
35
+ /**
36
+ * Custom Event Name
37
+ * Any string for custom tracking
38
+ */
39
+ declare const CustomEventName: z.ZodString;
40
+
41
+ declare const SettingsSchema: z.ZodObject<{
42
+ pixelId: z.ZodString;
43
+ }, z.core.$strip>;
44
+ type Settings = z.infer<typeof SettingsSchema>;
45
+
46
+ declare const MappingSchema: z.ZodObject<{
47
+ track: z.ZodOptional<z.ZodEnum<{
48
+ PageView: "PageView";
49
+ AddPaymentInfo: "AddPaymentInfo";
50
+ AddToCart: "AddToCart";
51
+ AddToWishlist: "AddToWishlist";
52
+ CompleteRegistration: "CompleteRegistration";
53
+ Contact: "Contact";
54
+ CustomizeProduct: "CustomizeProduct";
55
+ Donate: "Donate";
56
+ FindLocation: "FindLocation";
57
+ InitiateCheckout: "InitiateCheckout";
58
+ Lead: "Lead";
59
+ Purchase: "Purchase";
60
+ Schedule: "Schedule";
61
+ Search: "Search";
62
+ StartTrial: "StartTrial";
63
+ SubmitApplication: "SubmitApplication";
64
+ Subscribe: "Subscribe";
65
+ ViewContent: "ViewContent";
66
+ }>>;
67
+ trackCustom: z.ZodOptional<z.ZodString>;
68
+ }, z.core.$strip>;
69
+ type Mapping$1 = z.infer<typeof MappingSchema>;
70
+
71
+ declare const settings: _walkeros_core_dev.JSONSchema;
72
+ declare const mapping$1: _walkeros_core_dev.JSONSchema;
73
+
74
+ declare const index$1_CustomEventName: typeof CustomEventName;
75
+ declare const index$1_MappingSchema: typeof MappingSchema;
76
+ declare const index$1_PixelId: typeof PixelId;
77
+ type index$1_Settings = Settings;
78
+ declare const index$1_SettingsSchema: typeof SettingsSchema;
79
+ declare const index$1_StandardEventName: typeof StandardEventName;
80
+ declare const index$1_settings: typeof settings;
81
+ declare namespace index$1 {
82
+ export { index$1_CustomEventName as CustomEventName, type Mapping$1 as Mapping, index$1_MappingSchema as MappingSchema, index$1_PixelId as PixelId, type index$1_Settings as Settings, index$1_SettingsSchema as SettingsSchema, index$1_StandardEventName as StandardEventName, mapping$1 as mapping, index$1_settings as settings };
83
+ }
84
+
85
+ declare global {
86
+ interface Window {
87
+ _fbq?: facebook.Pixel.Event;
88
+ fbq?: facebook.Pixel.Event;
89
+ }
90
+ }
91
+ interface Mapping {
92
+ track?: StandardEventNames;
93
+ trackCustom?: string;
94
+ }
95
+ interface Env extends DestinationWeb.Env {
96
+ window: {
97
+ fbq: facebook.Pixel.Event;
98
+ _fbq?: facebook.Pixel.Event;
99
+ };
100
+ document: {
101
+ createElement: (tagName: string) => Element;
102
+ head: {
103
+ appendChild: (node: unknown) => void;
104
+ };
105
+ };
106
+ }
107
+ type Rule = Mapping$2.Rule<Mapping>;
108
+ type StandardEventNames = 'PageView' | 'AddPaymentInfo' | 'AddToCart' | 'AddToWishlist' | 'CompleteRegistration' | 'Contact' | 'CustomizeProduct' | 'Donate' | 'FindLocation' | 'InitiateCheckout' | 'Lead' | 'Purchase' | 'Schedule' | 'Search' | 'StartTrial' | 'SubmitApplication' | 'Subscribe' | 'ViewContent' | string;
109
+
110
+ declare const init: Env | undefined;
111
+ declare const push: Env;
112
+
113
+ declare const env_init: typeof init;
114
+ declare const env_push: typeof push;
115
+ declare namespace env {
116
+ export { env_init as init, env_push as push };
117
+ }
118
+
119
+ declare function Purchase$1(): unknown[];
120
+ declare function AddToCart$1(): unknown[];
121
+ declare function InitiateCheckout$1(): unknown[];
122
+ declare function ViewContent$1(): unknown[];
123
+
124
+ declare namespace events {
125
+ export { AddToCart$1 as AddToCart, InitiateCheckout$1 as InitiateCheckout, Purchase$1 as Purchase, ViewContent$1 as ViewContent };
126
+ }
127
+
128
+ declare const Purchase: Rule;
129
+ declare const AddToCart: Rule;
130
+ declare const InitiateCheckout: Rule;
131
+ declare const ViewContent: Rule;
132
+ declare const config: {
133
+ order: {
134
+ complete: Rule;
135
+ };
136
+ product: {
137
+ view: Rule;
138
+ add: Rule;
139
+ };
140
+ cart: {
141
+ view: Rule;
142
+ };
143
+ };
144
+
145
+ declare const mapping_AddToCart: typeof AddToCart;
146
+ declare const mapping_InitiateCheckout: typeof InitiateCheckout;
147
+ declare const mapping_Purchase: typeof Purchase;
148
+ declare const mapping_ViewContent: typeof ViewContent;
149
+ declare const mapping_config: typeof config;
150
+ declare namespace mapping {
151
+ export { mapping_AddToCart as AddToCart, mapping_InitiateCheckout as InitiateCheckout, mapping_Purchase as Purchase, mapping_ViewContent as ViewContent, mapping_config as config };
152
+ }
153
+
154
+ declare const index_env: typeof env;
155
+ declare const index_events: typeof events;
156
+ declare const index_mapping: typeof mapping;
157
+ declare namespace index {
158
+ export { index_env as env, index_events as events, index_mapping as mapping };
159
+ }
160
+
161
+ export { index as examples, index$1 as schemas };
package/dist/dev.d.ts ADDED
@@ -0,0 +1,161 @@
1
+ import * as _walkeros_core_dev from '@walkeros/core/dev';
2
+ import { z } from '@walkeros/core/dev';
3
+ import { Mapping as Mapping$2 } from '@walkeros/core';
4
+ import { DestinationWeb } from '@walkeros/web-core';
5
+
6
+ /**
7
+ * Meta Pixel ID
8
+ * Must be a numeric string (Facebook Pixel IDs are numeric)
9
+ */
10
+ declare const PixelId: z.ZodString;
11
+ /**
12
+ * Meta Pixel Standard Event Names
13
+ * https://developers.facebook.com/docs/meta-pixel/reference
14
+ */
15
+ declare const StandardEventName: z.ZodEnum<{
16
+ PageView: "PageView";
17
+ AddPaymentInfo: "AddPaymentInfo";
18
+ AddToCart: "AddToCart";
19
+ AddToWishlist: "AddToWishlist";
20
+ CompleteRegistration: "CompleteRegistration";
21
+ Contact: "Contact";
22
+ CustomizeProduct: "CustomizeProduct";
23
+ Donate: "Donate";
24
+ FindLocation: "FindLocation";
25
+ InitiateCheckout: "InitiateCheckout";
26
+ Lead: "Lead";
27
+ Purchase: "Purchase";
28
+ Schedule: "Schedule";
29
+ Search: "Search";
30
+ StartTrial: "StartTrial";
31
+ SubmitApplication: "SubmitApplication";
32
+ Subscribe: "Subscribe";
33
+ ViewContent: "ViewContent";
34
+ }>;
35
+ /**
36
+ * Custom Event Name
37
+ * Any string for custom tracking
38
+ */
39
+ declare const CustomEventName: z.ZodString;
40
+
41
+ declare const SettingsSchema: z.ZodObject<{
42
+ pixelId: z.ZodString;
43
+ }, z.core.$strip>;
44
+ type Settings = z.infer<typeof SettingsSchema>;
45
+
46
+ declare const MappingSchema: z.ZodObject<{
47
+ track: z.ZodOptional<z.ZodEnum<{
48
+ PageView: "PageView";
49
+ AddPaymentInfo: "AddPaymentInfo";
50
+ AddToCart: "AddToCart";
51
+ AddToWishlist: "AddToWishlist";
52
+ CompleteRegistration: "CompleteRegistration";
53
+ Contact: "Contact";
54
+ CustomizeProduct: "CustomizeProduct";
55
+ Donate: "Donate";
56
+ FindLocation: "FindLocation";
57
+ InitiateCheckout: "InitiateCheckout";
58
+ Lead: "Lead";
59
+ Purchase: "Purchase";
60
+ Schedule: "Schedule";
61
+ Search: "Search";
62
+ StartTrial: "StartTrial";
63
+ SubmitApplication: "SubmitApplication";
64
+ Subscribe: "Subscribe";
65
+ ViewContent: "ViewContent";
66
+ }>>;
67
+ trackCustom: z.ZodOptional<z.ZodString>;
68
+ }, z.core.$strip>;
69
+ type Mapping$1 = z.infer<typeof MappingSchema>;
70
+
71
+ declare const settings: _walkeros_core_dev.JSONSchema;
72
+ declare const mapping$1: _walkeros_core_dev.JSONSchema;
73
+
74
+ declare const index$1_CustomEventName: typeof CustomEventName;
75
+ declare const index$1_MappingSchema: typeof MappingSchema;
76
+ declare const index$1_PixelId: typeof PixelId;
77
+ type index$1_Settings = Settings;
78
+ declare const index$1_SettingsSchema: typeof SettingsSchema;
79
+ declare const index$1_StandardEventName: typeof StandardEventName;
80
+ declare const index$1_settings: typeof settings;
81
+ declare namespace index$1 {
82
+ export { index$1_CustomEventName as CustomEventName, type Mapping$1 as Mapping, index$1_MappingSchema as MappingSchema, index$1_PixelId as PixelId, type index$1_Settings as Settings, index$1_SettingsSchema as SettingsSchema, index$1_StandardEventName as StandardEventName, mapping$1 as mapping, index$1_settings as settings };
83
+ }
84
+
85
+ declare global {
86
+ interface Window {
87
+ _fbq?: facebook.Pixel.Event;
88
+ fbq?: facebook.Pixel.Event;
89
+ }
90
+ }
91
+ interface Mapping {
92
+ track?: StandardEventNames;
93
+ trackCustom?: string;
94
+ }
95
+ interface Env extends DestinationWeb.Env {
96
+ window: {
97
+ fbq: facebook.Pixel.Event;
98
+ _fbq?: facebook.Pixel.Event;
99
+ };
100
+ document: {
101
+ createElement: (tagName: string) => Element;
102
+ head: {
103
+ appendChild: (node: unknown) => void;
104
+ };
105
+ };
106
+ }
107
+ type Rule = Mapping$2.Rule<Mapping>;
108
+ type StandardEventNames = 'PageView' | 'AddPaymentInfo' | 'AddToCart' | 'AddToWishlist' | 'CompleteRegistration' | 'Contact' | 'CustomizeProduct' | 'Donate' | 'FindLocation' | 'InitiateCheckout' | 'Lead' | 'Purchase' | 'Schedule' | 'Search' | 'StartTrial' | 'SubmitApplication' | 'Subscribe' | 'ViewContent' | string;
109
+
110
+ declare const init: Env | undefined;
111
+ declare const push: Env;
112
+
113
+ declare const env_init: typeof init;
114
+ declare const env_push: typeof push;
115
+ declare namespace env {
116
+ export { env_init as init, env_push as push };
117
+ }
118
+
119
+ declare function Purchase$1(): unknown[];
120
+ declare function AddToCart$1(): unknown[];
121
+ declare function InitiateCheckout$1(): unknown[];
122
+ declare function ViewContent$1(): unknown[];
123
+
124
+ declare namespace events {
125
+ export { AddToCart$1 as AddToCart, InitiateCheckout$1 as InitiateCheckout, Purchase$1 as Purchase, ViewContent$1 as ViewContent };
126
+ }
127
+
128
+ declare const Purchase: Rule;
129
+ declare const AddToCart: Rule;
130
+ declare const InitiateCheckout: Rule;
131
+ declare const ViewContent: Rule;
132
+ declare const config: {
133
+ order: {
134
+ complete: Rule;
135
+ };
136
+ product: {
137
+ view: Rule;
138
+ add: Rule;
139
+ };
140
+ cart: {
141
+ view: Rule;
142
+ };
143
+ };
144
+
145
+ declare const mapping_AddToCart: typeof AddToCart;
146
+ declare const mapping_InitiateCheckout: typeof InitiateCheckout;
147
+ declare const mapping_Purchase: typeof Purchase;
148
+ declare const mapping_ViewContent: typeof ViewContent;
149
+ declare const mapping_config: typeof config;
150
+ declare namespace mapping {
151
+ export { mapping_AddToCart as AddToCart, mapping_InitiateCheckout as InitiateCheckout, mapping_Purchase as Purchase, mapping_ViewContent as ViewContent, mapping_config as config };
152
+ }
153
+
154
+ declare const index_env: typeof env;
155
+ declare const index_events: typeof events;
156
+ declare const index_mapping: typeof mapping;
157
+ declare namespace index {
158
+ export { index_env as env, index_events as events, index_mapping as mapping };
159
+ }
160
+
161
+ export { index as examples, index$1 as schemas };