@walkeros/server-destination-tiktok 3.3.0-next-1776098542393
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/LICENSE +21 -0
- package/README.md +95 -0
- package/dist/dev.d.mts +100 -0
- package/dist/dev.d.ts +100 -0
- package/dist/dev.js +1 -0
- package/dist/dev.js.map +1 -0
- package/dist/dev.mjs +1 -0
- package/dist/dev.mjs.map +1 -0
- package/dist/examples/index.d.mts +36 -0
- package/dist/examples/index.d.ts +36 -0
- package/dist/examples/index.js +294 -0
- package/dist/examples/index.mjs +272 -0
- package/dist/index.d.mts +101 -0
- package/dist/index.d.ts +101 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +1 -0
- package/dist/index.mjs.map +1 -0
- package/dist/walkerOS.json +508 -0
- package/package.json +74 -0
|
@@ -0,0 +1,294 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/examples/index.ts
|
|
21
|
+
var examples_exports = {};
|
|
22
|
+
__export(examples_exports, {
|
|
23
|
+
env: () => env_exports,
|
|
24
|
+
step: () => step_exports
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(examples_exports);
|
|
27
|
+
|
|
28
|
+
// src/examples/env.ts
|
|
29
|
+
var env_exports = {};
|
|
30
|
+
__export(env_exports, {
|
|
31
|
+
push: () => push,
|
|
32
|
+
simulation: () => simulation
|
|
33
|
+
});
|
|
34
|
+
async function mockSendServer(url, data, options) {
|
|
35
|
+
return {
|
|
36
|
+
ok: true,
|
|
37
|
+
data: {
|
|
38
|
+
code: 0,
|
|
39
|
+
message: "OK"
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
var push = {
|
|
44
|
+
sendServer: mockSendServer
|
|
45
|
+
};
|
|
46
|
+
var simulation = ["sendServer"];
|
|
47
|
+
|
|
48
|
+
// src/examples/step.ts
|
|
49
|
+
var step_exports = {};
|
|
50
|
+
__export(step_exports, {
|
|
51
|
+
addToCart: () => addToCart,
|
|
52
|
+
lead: () => lead,
|
|
53
|
+
pageView: () => pageView,
|
|
54
|
+
purchase: () => purchase
|
|
55
|
+
});
|
|
56
|
+
var import_core = require("@walkeros/core");
|
|
57
|
+
var purchase = {
|
|
58
|
+
in: (0, import_core.getEvent)("order complete", {
|
|
59
|
+
timestamp: 17000009e5,
|
|
60
|
+
data: { id: "ORD-300", total: 249.99, currency: "EUR" },
|
|
61
|
+
nested: [
|
|
62
|
+
{
|
|
63
|
+
entity: "product",
|
|
64
|
+
data: { id: "SKU-A1", name: "Widget Pro", price: 124.99, quantity: 2 }
|
|
65
|
+
}
|
|
66
|
+
],
|
|
67
|
+
user: { id: "user-123", device: "device-456" },
|
|
68
|
+
source: {
|
|
69
|
+
type: "server",
|
|
70
|
+
id: "https://shop.example.com/checkout/complete",
|
|
71
|
+
previous_id: ""
|
|
72
|
+
}
|
|
73
|
+
}),
|
|
74
|
+
mapping: {
|
|
75
|
+
name: "CompletePayment",
|
|
76
|
+
data: {
|
|
77
|
+
map: {
|
|
78
|
+
value: "data.total",
|
|
79
|
+
currency: { key: "data.currency", value: "EUR" },
|
|
80
|
+
order_id: "data.id",
|
|
81
|
+
content_type: { value: "product" },
|
|
82
|
+
contents: {
|
|
83
|
+
loop: [
|
|
84
|
+
"nested",
|
|
85
|
+
{
|
|
86
|
+
condition: (entity) => (0, import_core.isObject)(entity) && entity.entity === "product",
|
|
87
|
+
map: {
|
|
88
|
+
content_id: "data.id",
|
|
89
|
+
content_name: "data.name",
|
|
90
|
+
quantity: { key: "data.quantity", value: 1 },
|
|
91
|
+
price: "data.price"
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
]
|
|
95
|
+
},
|
|
96
|
+
user_data: {
|
|
97
|
+
map: {
|
|
98
|
+
external_id: "user.id"
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
out: {
|
|
105
|
+
pixel_code: "PIXEL_CODE",
|
|
106
|
+
partner_name: "walkerOS",
|
|
107
|
+
data: [
|
|
108
|
+
{
|
|
109
|
+
event: "CompletePayment",
|
|
110
|
+
event_id: "1700000900000-gr0up-1",
|
|
111
|
+
timestamp: "2023-11-14T22:28:20.000Z",
|
|
112
|
+
context: {
|
|
113
|
+
user: {
|
|
114
|
+
external_id: "user-123"
|
|
115
|
+
},
|
|
116
|
+
page: {
|
|
117
|
+
url: "https://shop.example.com/checkout/complete"
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
properties: {
|
|
121
|
+
value: 249.99,
|
|
122
|
+
currency: "EUR",
|
|
123
|
+
order_id: "ORD-300",
|
|
124
|
+
content_type: "product",
|
|
125
|
+
contents: [
|
|
126
|
+
{
|
|
127
|
+
content_id: "SKU-A1",
|
|
128
|
+
content_name: "Widget Pro",
|
|
129
|
+
quantity: 2,
|
|
130
|
+
price: 124.99
|
|
131
|
+
}
|
|
132
|
+
]
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
]
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
var addToCart = {
|
|
139
|
+
in: (0, import_core.getEvent)("product add", {
|
|
140
|
+
timestamp: 1700000901e3,
|
|
141
|
+
data: {
|
|
142
|
+
id: "SKU-B2",
|
|
143
|
+
name: "Running Shoes",
|
|
144
|
+
price: 89.99,
|
|
145
|
+
color: "blue"
|
|
146
|
+
},
|
|
147
|
+
nested: [
|
|
148
|
+
{
|
|
149
|
+
entity: "product",
|
|
150
|
+
data: {
|
|
151
|
+
id: "SKU-B2",
|
|
152
|
+
name: "Running Shoes",
|
|
153
|
+
price: 89.99,
|
|
154
|
+
quantity: 1
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
],
|
|
158
|
+
source: {
|
|
159
|
+
type: "server",
|
|
160
|
+
id: "https://shop.example.com/products/running-shoes",
|
|
161
|
+
previous_id: ""
|
|
162
|
+
}
|
|
163
|
+
}),
|
|
164
|
+
mapping: {
|
|
165
|
+
name: "AddToCart",
|
|
166
|
+
data: {
|
|
167
|
+
map: {
|
|
168
|
+
content_type: { value: "product" },
|
|
169
|
+
value: "data.price",
|
|
170
|
+
currency: { value: "EUR" },
|
|
171
|
+
contents: {
|
|
172
|
+
loop: [
|
|
173
|
+
"nested",
|
|
174
|
+
{
|
|
175
|
+
condition: (entity) => (0, import_core.isObject)(entity) && entity.entity === "product",
|
|
176
|
+
map: {
|
|
177
|
+
content_id: "data.id",
|
|
178
|
+
content_name: "data.name",
|
|
179
|
+
quantity: { key: "data.quantity", value: 1 },
|
|
180
|
+
price: "data.price"
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
]
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
},
|
|
188
|
+
out: {
|
|
189
|
+
pixel_code: "PIXEL_CODE",
|
|
190
|
+
partner_name: "walkerOS",
|
|
191
|
+
data: [
|
|
192
|
+
{
|
|
193
|
+
event: "AddToCart",
|
|
194
|
+
event_id: "1700000901000-gr0up-1",
|
|
195
|
+
timestamp: "2023-11-14T22:28:21.000Z",
|
|
196
|
+
context: {
|
|
197
|
+
page: {
|
|
198
|
+
url: "https://shop.example.com/products/running-shoes"
|
|
199
|
+
}
|
|
200
|
+
},
|
|
201
|
+
properties: {
|
|
202
|
+
content_type: "product",
|
|
203
|
+
value: 89.99,
|
|
204
|
+
currency: "EUR",
|
|
205
|
+
contents: [
|
|
206
|
+
{
|
|
207
|
+
content_id: "SKU-B2",
|
|
208
|
+
content_name: "Running Shoes",
|
|
209
|
+
quantity: 1,
|
|
210
|
+
price: 89.99
|
|
211
|
+
}
|
|
212
|
+
]
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
]
|
|
216
|
+
}
|
|
217
|
+
};
|
|
218
|
+
var pageView = {
|
|
219
|
+
in: (0, import_core.getEvent)("page view", {
|
|
220
|
+
timestamp: 1700000902e3,
|
|
221
|
+
source: {
|
|
222
|
+
type: "server",
|
|
223
|
+
id: "https://example.com/docs/",
|
|
224
|
+
previous_id: ""
|
|
225
|
+
}
|
|
226
|
+
}),
|
|
227
|
+
mapping: void 0,
|
|
228
|
+
out: {
|
|
229
|
+
pixel_code: "PIXEL_CODE",
|
|
230
|
+
partner_name: "walkerOS",
|
|
231
|
+
data: [
|
|
232
|
+
{
|
|
233
|
+
event: "page view",
|
|
234
|
+
event_id: "1700000902000-gr0up-1",
|
|
235
|
+
timestamp: "2023-11-14T22:28:22.000Z",
|
|
236
|
+
context: {
|
|
237
|
+
page: {
|
|
238
|
+
url: "https://example.com/docs/"
|
|
239
|
+
}
|
|
240
|
+
},
|
|
241
|
+
properties: {}
|
|
242
|
+
}
|
|
243
|
+
]
|
|
244
|
+
}
|
|
245
|
+
};
|
|
246
|
+
var lead = {
|
|
247
|
+
in: (0, import_core.getEvent)("form submit", {
|
|
248
|
+
timestamp: 1700000903e3,
|
|
249
|
+
data: { type: "newsletter" },
|
|
250
|
+
user: { email: "user@example.com" },
|
|
251
|
+
source: {
|
|
252
|
+
type: "server",
|
|
253
|
+
id: "https://example.com/contact",
|
|
254
|
+
previous_id: ""
|
|
255
|
+
}
|
|
256
|
+
}),
|
|
257
|
+
mapping: {
|
|
258
|
+
name: "SubmitForm",
|
|
259
|
+
data: {
|
|
260
|
+
map: {
|
|
261
|
+
user_data: {
|
|
262
|
+
map: {
|
|
263
|
+
email: "user.email"
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
},
|
|
269
|
+
out: {
|
|
270
|
+
pixel_code: "PIXEL_CODE",
|
|
271
|
+
partner_name: "walkerOS",
|
|
272
|
+
data: [
|
|
273
|
+
{
|
|
274
|
+
event: "SubmitForm",
|
|
275
|
+
event_id: "1700000903000-gr0up-1",
|
|
276
|
+
timestamp: "2023-11-14T22:28:23.000Z",
|
|
277
|
+
context: {
|
|
278
|
+
user: {
|
|
279
|
+
email: "user@example.com"
|
|
280
|
+
},
|
|
281
|
+
page: {
|
|
282
|
+
url: "https://example.com/contact"
|
|
283
|
+
}
|
|
284
|
+
},
|
|
285
|
+
properties: {}
|
|
286
|
+
}
|
|
287
|
+
]
|
|
288
|
+
}
|
|
289
|
+
};
|
|
290
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
291
|
+
0 && (module.exports = {
|
|
292
|
+
env,
|
|
293
|
+
step
|
|
294
|
+
});
|
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __export = (target, all) => {
|
|
3
|
+
for (var name in all)
|
|
4
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
// src/examples/env.ts
|
|
8
|
+
var env_exports = {};
|
|
9
|
+
__export(env_exports, {
|
|
10
|
+
push: () => push,
|
|
11
|
+
simulation: () => simulation
|
|
12
|
+
});
|
|
13
|
+
async function mockSendServer(url, data, options) {
|
|
14
|
+
return {
|
|
15
|
+
ok: true,
|
|
16
|
+
data: {
|
|
17
|
+
code: 0,
|
|
18
|
+
message: "OK"
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
var push = {
|
|
23
|
+
sendServer: mockSendServer
|
|
24
|
+
};
|
|
25
|
+
var simulation = ["sendServer"];
|
|
26
|
+
|
|
27
|
+
// src/examples/step.ts
|
|
28
|
+
var step_exports = {};
|
|
29
|
+
__export(step_exports, {
|
|
30
|
+
addToCart: () => addToCart,
|
|
31
|
+
lead: () => lead,
|
|
32
|
+
pageView: () => pageView,
|
|
33
|
+
purchase: () => purchase
|
|
34
|
+
});
|
|
35
|
+
import { getEvent, isObject } from "@walkeros/core";
|
|
36
|
+
var purchase = {
|
|
37
|
+
in: getEvent("order complete", {
|
|
38
|
+
timestamp: 17000009e5,
|
|
39
|
+
data: { id: "ORD-300", total: 249.99, currency: "EUR" },
|
|
40
|
+
nested: [
|
|
41
|
+
{
|
|
42
|
+
entity: "product",
|
|
43
|
+
data: { id: "SKU-A1", name: "Widget Pro", price: 124.99, quantity: 2 }
|
|
44
|
+
}
|
|
45
|
+
],
|
|
46
|
+
user: { id: "user-123", device: "device-456" },
|
|
47
|
+
source: {
|
|
48
|
+
type: "server",
|
|
49
|
+
id: "https://shop.example.com/checkout/complete",
|
|
50
|
+
previous_id: ""
|
|
51
|
+
}
|
|
52
|
+
}),
|
|
53
|
+
mapping: {
|
|
54
|
+
name: "CompletePayment",
|
|
55
|
+
data: {
|
|
56
|
+
map: {
|
|
57
|
+
value: "data.total",
|
|
58
|
+
currency: { key: "data.currency", value: "EUR" },
|
|
59
|
+
order_id: "data.id",
|
|
60
|
+
content_type: { value: "product" },
|
|
61
|
+
contents: {
|
|
62
|
+
loop: [
|
|
63
|
+
"nested",
|
|
64
|
+
{
|
|
65
|
+
condition: (entity) => isObject(entity) && entity.entity === "product",
|
|
66
|
+
map: {
|
|
67
|
+
content_id: "data.id",
|
|
68
|
+
content_name: "data.name",
|
|
69
|
+
quantity: { key: "data.quantity", value: 1 },
|
|
70
|
+
price: "data.price"
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
]
|
|
74
|
+
},
|
|
75
|
+
user_data: {
|
|
76
|
+
map: {
|
|
77
|
+
external_id: "user.id"
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
out: {
|
|
84
|
+
pixel_code: "PIXEL_CODE",
|
|
85
|
+
partner_name: "walkerOS",
|
|
86
|
+
data: [
|
|
87
|
+
{
|
|
88
|
+
event: "CompletePayment",
|
|
89
|
+
event_id: "1700000900000-gr0up-1",
|
|
90
|
+
timestamp: "2023-11-14T22:28:20.000Z",
|
|
91
|
+
context: {
|
|
92
|
+
user: {
|
|
93
|
+
external_id: "user-123"
|
|
94
|
+
},
|
|
95
|
+
page: {
|
|
96
|
+
url: "https://shop.example.com/checkout/complete"
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
properties: {
|
|
100
|
+
value: 249.99,
|
|
101
|
+
currency: "EUR",
|
|
102
|
+
order_id: "ORD-300",
|
|
103
|
+
content_type: "product",
|
|
104
|
+
contents: [
|
|
105
|
+
{
|
|
106
|
+
content_id: "SKU-A1",
|
|
107
|
+
content_name: "Widget Pro",
|
|
108
|
+
quantity: 2,
|
|
109
|
+
price: 124.99
|
|
110
|
+
}
|
|
111
|
+
]
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
]
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
var addToCart = {
|
|
118
|
+
in: getEvent("product add", {
|
|
119
|
+
timestamp: 1700000901e3,
|
|
120
|
+
data: {
|
|
121
|
+
id: "SKU-B2",
|
|
122
|
+
name: "Running Shoes",
|
|
123
|
+
price: 89.99,
|
|
124
|
+
color: "blue"
|
|
125
|
+
},
|
|
126
|
+
nested: [
|
|
127
|
+
{
|
|
128
|
+
entity: "product",
|
|
129
|
+
data: {
|
|
130
|
+
id: "SKU-B2",
|
|
131
|
+
name: "Running Shoes",
|
|
132
|
+
price: 89.99,
|
|
133
|
+
quantity: 1
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
],
|
|
137
|
+
source: {
|
|
138
|
+
type: "server",
|
|
139
|
+
id: "https://shop.example.com/products/running-shoes",
|
|
140
|
+
previous_id: ""
|
|
141
|
+
}
|
|
142
|
+
}),
|
|
143
|
+
mapping: {
|
|
144
|
+
name: "AddToCart",
|
|
145
|
+
data: {
|
|
146
|
+
map: {
|
|
147
|
+
content_type: { value: "product" },
|
|
148
|
+
value: "data.price",
|
|
149
|
+
currency: { value: "EUR" },
|
|
150
|
+
contents: {
|
|
151
|
+
loop: [
|
|
152
|
+
"nested",
|
|
153
|
+
{
|
|
154
|
+
condition: (entity) => isObject(entity) && entity.entity === "product",
|
|
155
|
+
map: {
|
|
156
|
+
content_id: "data.id",
|
|
157
|
+
content_name: "data.name",
|
|
158
|
+
quantity: { key: "data.quantity", value: 1 },
|
|
159
|
+
price: "data.price"
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
]
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
out: {
|
|
168
|
+
pixel_code: "PIXEL_CODE",
|
|
169
|
+
partner_name: "walkerOS",
|
|
170
|
+
data: [
|
|
171
|
+
{
|
|
172
|
+
event: "AddToCart",
|
|
173
|
+
event_id: "1700000901000-gr0up-1",
|
|
174
|
+
timestamp: "2023-11-14T22:28:21.000Z",
|
|
175
|
+
context: {
|
|
176
|
+
page: {
|
|
177
|
+
url: "https://shop.example.com/products/running-shoes"
|
|
178
|
+
}
|
|
179
|
+
},
|
|
180
|
+
properties: {
|
|
181
|
+
content_type: "product",
|
|
182
|
+
value: 89.99,
|
|
183
|
+
currency: "EUR",
|
|
184
|
+
contents: [
|
|
185
|
+
{
|
|
186
|
+
content_id: "SKU-B2",
|
|
187
|
+
content_name: "Running Shoes",
|
|
188
|
+
quantity: 1,
|
|
189
|
+
price: 89.99
|
|
190
|
+
}
|
|
191
|
+
]
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
]
|
|
195
|
+
}
|
|
196
|
+
};
|
|
197
|
+
var pageView = {
|
|
198
|
+
in: getEvent("page view", {
|
|
199
|
+
timestamp: 1700000902e3,
|
|
200
|
+
source: {
|
|
201
|
+
type: "server",
|
|
202
|
+
id: "https://example.com/docs/",
|
|
203
|
+
previous_id: ""
|
|
204
|
+
}
|
|
205
|
+
}),
|
|
206
|
+
mapping: void 0,
|
|
207
|
+
out: {
|
|
208
|
+
pixel_code: "PIXEL_CODE",
|
|
209
|
+
partner_name: "walkerOS",
|
|
210
|
+
data: [
|
|
211
|
+
{
|
|
212
|
+
event: "page view",
|
|
213
|
+
event_id: "1700000902000-gr0up-1",
|
|
214
|
+
timestamp: "2023-11-14T22:28:22.000Z",
|
|
215
|
+
context: {
|
|
216
|
+
page: {
|
|
217
|
+
url: "https://example.com/docs/"
|
|
218
|
+
}
|
|
219
|
+
},
|
|
220
|
+
properties: {}
|
|
221
|
+
}
|
|
222
|
+
]
|
|
223
|
+
}
|
|
224
|
+
};
|
|
225
|
+
var lead = {
|
|
226
|
+
in: getEvent("form submit", {
|
|
227
|
+
timestamp: 1700000903e3,
|
|
228
|
+
data: { type: "newsletter" },
|
|
229
|
+
user: { email: "user@example.com" },
|
|
230
|
+
source: {
|
|
231
|
+
type: "server",
|
|
232
|
+
id: "https://example.com/contact",
|
|
233
|
+
previous_id: ""
|
|
234
|
+
}
|
|
235
|
+
}),
|
|
236
|
+
mapping: {
|
|
237
|
+
name: "SubmitForm",
|
|
238
|
+
data: {
|
|
239
|
+
map: {
|
|
240
|
+
user_data: {
|
|
241
|
+
map: {
|
|
242
|
+
email: "user.email"
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
},
|
|
248
|
+
out: {
|
|
249
|
+
pixel_code: "PIXEL_CODE",
|
|
250
|
+
partner_name: "walkerOS",
|
|
251
|
+
data: [
|
|
252
|
+
{
|
|
253
|
+
event: "SubmitForm",
|
|
254
|
+
event_id: "1700000903000-gr0up-1",
|
|
255
|
+
timestamp: "2023-11-14T22:28:23.000Z",
|
|
256
|
+
context: {
|
|
257
|
+
user: {
|
|
258
|
+
email: "user@example.com"
|
|
259
|
+
},
|
|
260
|
+
page: {
|
|
261
|
+
url: "https://example.com/contact"
|
|
262
|
+
}
|
|
263
|
+
},
|
|
264
|
+
properties: {}
|
|
265
|
+
}
|
|
266
|
+
]
|
|
267
|
+
}
|
|
268
|
+
};
|
|
269
|
+
export {
|
|
270
|
+
env_exports as env,
|
|
271
|
+
step_exports as step
|
|
272
|
+
};
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { Mapping as Mapping$1, Destination as Destination$1 } from '@walkeros/core';
|
|
2
|
+
import { DestinationServer, sendServer } from '@walkeros/server-core';
|
|
3
|
+
|
|
4
|
+
interface Settings {
|
|
5
|
+
pixelCode: string;
|
|
6
|
+
accessToken: string;
|
|
7
|
+
url?: string;
|
|
8
|
+
test_event_code?: string;
|
|
9
|
+
doNotHash?: string[];
|
|
10
|
+
user_data?: Mapping$1.Map;
|
|
11
|
+
partner_name?: string;
|
|
12
|
+
}
|
|
13
|
+
type InitSettings = Partial<Settings>;
|
|
14
|
+
interface Mapping {
|
|
15
|
+
}
|
|
16
|
+
interface Env extends DestinationServer.Env {
|
|
17
|
+
sendServer?: typeof sendServer;
|
|
18
|
+
}
|
|
19
|
+
type Types = Destination$1.Types<Settings, Mapping, Env, InitSettings>;
|
|
20
|
+
interface Destination extends DestinationServer.Destination<Types> {
|
|
21
|
+
init: DestinationServer.InitFn<Types>;
|
|
22
|
+
}
|
|
23
|
+
type Config = {
|
|
24
|
+
settings: Settings;
|
|
25
|
+
} & DestinationServer.Config<Types>;
|
|
26
|
+
type InitFn = DestinationServer.InitFn<Types>;
|
|
27
|
+
type PushFn = DestinationServer.PushFn<Types>;
|
|
28
|
+
type PartialConfig = DestinationServer.PartialConfig<Types>;
|
|
29
|
+
type PushEvents = DestinationServer.PushEvents<Mapping>;
|
|
30
|
+
type Rule = Mapping$1.Rule<Mapping>;
|
|
31
|
+
type Rules = Mapping$1.Rules<Rule>;
|
|
32
|
+
interface RequestBody {
|
|
33
|
+
pixel_code: string;
|
|
34
|
+
partner_name?: string;
|
|
35
|
+
test_event_code?: string;
|
|
36
|
+
data: EventData[];
|
|
37
|
+
}
|
|
38
|
+
interface EventData {
|
|
39
|
+
event: string;
|
|
40
|
+
event_id: string;
|
|
41
|
+
timestamp: string;
|
|
42
|
+
context?: EventContext;
|
|
43
|
+
properties?: Record<string, unknown>;
|
|
44
|
+
}
|
|
45
|
+
interface EventContext {
|
|
46
|
+
ip?: string;
|
|
47
|
+
user_agent?: string;
|
|
48
|
+
user?: UserData;
|
|
49
|
+
page?: PageContext;
|
|
50
|
+
ad?: AdContext;
|
|
51
|
+
}
|
|
52
|
+
interface UserData {
|
|
53
|
+
email?: string;
|
|
54
|
+
phone_number?: string;
|
|
55
|
+
external_id?: string;
|
|
56
|
+
ttp?: string;
|
|
57
|
+
ttclid?: string;
|
|
58
|
+
locale?: string;
|
|
59
|
+
}
|
|
60
|
+
interface PageContext {
|
|
61
|
+
url?: string;
|
|
62
|
+
referrer?: string;
|
|
63
|
+
}
|
|
64
|
+
interface AdContext {
|
|
65
|
+
callback?: string;
|
|
66
|
+
}
|
|
67
|
+
interface ResponseBody {
|
|
68
|
+
code: number;
|
|
69
|
+
message: string;
|
|
70
|
+
data?: Record<string, unknown>;
|
|
71
|
+
}
|
|
72
|
+
type StandardEventName = 'ViewContent' | 'ClickButton' | 'Search' | 'AddToWishlist' | 'AddToCart' | 'InitiateCheckout' | 'AddPaymentInfo' | 'CompletePayment' | 'PlaceAnOrder' | 'Contact' | 'Download' | 'SubmitForm' | 'CompleteRegistration' | 'Subscribe' | (string & {});
|
|
73
|
+
|
|
74
|
+
type index_AdContext = AdContext;
|
|
75
|
+
type index_Config = Config;
|
|
76
|
+
type index_Destination = Destination;
|
|
77
|
+
type index_Env = Env;
|
|
78
|
+
type index_EventContext = EventContext;
|
|
79
|
+
type index_EventData = EventData;
|
|
80
|
+
type index_InitFn = InitFn;
|
|
81
|
+
type index_InitSettings = InitSettings;
|
|
82
|
+
type index_Mapping = Mapping;
|
|
83
|
+
type index_PageContext = PageContext;
|
|
84
|
+
type index_PartialConfig = PartialConfig;
|
|
85
|
+
type index_PushEvents = PushEvents;
|
|
86
|
+
type index_PushFn = PushFn;
|
|
87
|
+
type index_RequestBody = RequestBody;
|
|
88
|
+
type index_ResponseBody = ResponseBody;
|
|
89
|
+
type index_Rule = Rule;
|
|
90
|
+
type index_Rules = Rules;
|
|
91
|
+
type index_Settings = Settings;
|
|
92
|
+
type index_StandardEventName = StandardEventName;
|
|
93
|
+
type index_Types = Types;
|
|
94
|
+
type index_UserData = UserData;
|
|
95
|
+
declare namespace index {
|
|
96
|
+
export type { index_AdContext as AdContext, index_Config as Config, index_Destination as Destination, index_Env as Env, index_EventContext as EventContext, index_EventData as EventData, index_InitFn as InitFn, index_InitSettings as InitSettings, index_Mapping as Mapping, index_PageContext as PageContext, index_PartialConfig as PartialConfig, index_PushEvents as PushEvents, index_PushFn as PushFn, index_RequestBody as RequestBody, index_ResponseBody as ResponseBody, index_Rule as Rule, index_Rules as Rules, index_Settings as Settings, index_StandardEventName as StandardEventName, index_Types as Types, index_UserData as UserData };
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
declare const destinationTikTok: Destination;
|
|
100
|
+
|
|
101
|
+
export { index as DestinationTikTok, destinationTikTok as default, destinationTikTok };
|