@walkeros/server-destination-pinterest 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 +134 -0
- package/dist/dev.d.mts +128 -0
- package/dist/dev.d.ts +128 -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 +38 -0
- package/dist/examples/index.d.ts +38 -0
- package/dist/examples/index.js +317 -0
- package/dist/examples/index.mjs +295 -0
- package/dist/index.d.mts +137 -0
- package/dist/index.d.ts +137 -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 +598 -0
- package/package.json +75 -0
|
@@ -0,0 +1,317 @@
|
|
|
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
|
+
num_events_received: 1,
|
|
39
|
+
num_events_processed: 1,
|
|
40
|
+
events: [{ status: "processed" }]
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
var push = {
|
|
45
|
+
sendServer: mockSendServer
|
|
46
|
+
};
|
|
47
|
+
var simulation = ["sendServer"];
|
|
48
|
+
|
|
49
|
+
// src/examples/step.ts
|
|
50
|
+
var step_exports = {};
|
|
51
|
+
__export(step_exports, {
|
|
52
|
+
addToCart: () => addToCart,
|
|
53
|
+
checkout: () => checkout,
|
|
54
|
+
pageVisit: () => pageVisit,
|
|
55
|
+
search: () => search,
|
|
56
|
+
signup: () => signup
|
|
57
|
+
});
|
|
58
|
+
var import_core = require("@walkeros/core");
|
|
59
|
+
var checkout = {
|
|
60
|
+
in: (0, import_core.getEvent)("order complete", {
|
|
61
|
+
timestamp: 1700000900,
|
|
62
|
+
data: { id: "ORD-300", total: 249.99, currency: "EUR" },
|
|
63
|
+
nested: [
|
|
64
|
+
{
|
|
65
|
+
entity: "product",
|
|
66
|
+
data: {
|
|
67
|
+
id: "SKU-A1",
|
|
68
|
+
name: "Everyday Ruck Snack",
|
|
69
|
+
price: "129.99",
|
|
70
|
+
quantity: 2
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
],
|
|
74
|
+
user: { id: "user-123", device: "device-456" },
|
|
75
|
+
source: { type: "server", id: "https://shop.example.com", previous_id: "" }
|
|
76
|
+
}),
|
|
77
|
+
mapping: {
|
|
78
|
+
name: "checkout",
|
|
79
|
+
data: {
|
|
80
|
+
map: {
|
|
81
|
+
custom_data: {
|
|
82
|
+
map: {
|
|
83
|
+
value: "data.total",
|
|
84
|
+
currency: { key: "data.currency", value: "EUR" },
|
|
85
|
+
order_id: "data.id",
|
|
86
|
+
num_items: {
|
|
87
|
+
fn: (event) => event.nested.filter(
|
|
88
|
+
(item) => item.entity === "product"
|
|
89
|
+
).length
|
|
90
|
+
},
|
|
91
|
+
contents: {
|
|
92
|
+
loop: [
|
|
93
|
+
"nested",
|
|
94
|
+
{
|
|
95
|
+
condition: (entity) => (0, import_core.isObject)(entity) && entity.entity === "product",
|
|
96
|
+
map: {
|
|
97
|
+
id: "data.id",
|
|
98
|
+
item_name: "data.name",
|
|
99
|
+
item_price: "data.price",
|
|
100
|
+
quantity: { key: "data.quantity", value: 1 }
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
]
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
out: {
|
|
111
|
+
data: [
|
|
112
|
+
{
|
|
113
|
+
event_name: "checkout",
|
|
114
|
+
event_time: 1700000900,
|
|
115
|
+
event_id: "1700000900-gr0up-1",
|
|
116
|
+
event_source_url: "https://shop.example.com",
|
|
117
|
+
action_source: "web",
|
|
118
|
+
user_data: {
|
|
119
|
+
external_id: ["user-123"]
|
|
120
|
+
},
|
|
121
|
+
custom_data: {
|
|
122
|
+
value: 249.99,
|
|
123
|
+
currency: "EUR",
|
|
124
|
+
order_id: "ORD-300",
|
|
125
|
+
num_items: 1,
|
|
126
|
+
contents: [
|
|
127
|
+
{
|
|
128
|
+
id: "SKU-A1",
|
|
129
|
+
item_name: "Everyday Ruck Snack",
|
|
130
|
+
item_price: "129.99",
|
|
131
|
+
quantity: 2
|
|
132
|
+
}
|
|
133
|
+
]
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
]
|
|
137
|
+
}
|
|
138
|
+
};
|
|
139
|
+
var addToCart = {
|
|
140
|
+
in: (0, import_core.getEvent)("product add", {
|
|
141
|
+
timestamp: 1700000901,
|
|
142
|
+
data: { id: "SKU-B2", name: "Cool Cap", price: "42.00", quantity: 1 },
|
|
143
|
+
user: { id: "user-456" },
|
|
144
|
+
source: {
|
|
145
|
+
type: "server",
|
|
146
|
+
id: "https://shop.example.com/products",
|
|
147
|
+
previous_id: ""
|
|
148
|
+
}
|
|
149
|
+
}),
|
|
150
|
+
mapping: {
|
|
151
|
+
name: "add_to_cart",
|
|
152
|
+
data: {
|
|
153
|
+
map: {
|
|
154
|
+
custom_data: {
|
|
155
|
+
map: {
|
|
156
|
+
value: "data.price",
|
|
157
|
+
currency: { value: "EUR" },
|
|
158
|
+
contents: {
|
|
159
|
+
set: [
|
|
160
|
+
{
|
|
161
|
+
map: {
|
|
162
|
+
id: "data.id",
|
|
163
|
+
item_name: "data.name",
|
|
164
|
+
item_price: "data.price",
|
|
165
|
+
quantity: { key: "data.quantity", value: 1 }
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
]
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
},
|
|
175
|
+
out: {
|
|
176
|
+
data: [
|
|
177
|
+
{
|
|
178
|
+
event_name: "add_to_cart",
|
|
179
|
+
event_time: 1700000901,
|
|
180
|
+
event_id: "1700000901-gr0up-1",
|
|
181
|
+
event_source_url: "https://shop.example.com/products",
|
|
182
|
+
action_source: "web",
|
|
183
|
+
user_data: {
|
|
184
|
+
external_id: ["user-456"]
|
|
185
|
+
},
|
|
186
|
+
custom_data: {
|
|
187
|
+
value: "42.00",
|
|
188
|
+
currency: "EUR",
|
|
189
|
+
contents: [
|
|
190
|
+
{
|
|
191
|
+
id: "SKU-B2",
|
|
192
|
+
item_name: "Cool Cap",
|
|
193
|
+
item_price: "42.00",
|
|
194
|
+
quantity: 1
|
|
195
|
+
}
|
|
196
|
+
]
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
]
|
|
200
|
+
}
|
|
201
|
+
};
|
|
202
|
+
var pageVisit = {
|
|
203
|
+
in: (0, import_core.getEvent)("page view", {
|
|
204
|
+
timestamp: 1700000902,
|
|
205
|
+
user: { id: "user-789" },
|
|
206
|
+
source: {
|
|
207
|
+
type: "server",
|
|
208
|
+
id: "https://www.example.com/docs/",
|
|
209
|
+
previous_id: ""
|
|
210
|
+
}
|
|
211
|
+
}),
|
|
212
|
+
mapping: {
|
|
213
|
+
name: "page_visit"
|
|
214
|
+
},
|
|
215
|
+
out: {
|
|
216
|
+
data: [
|
|
217
|
+
{
|
|
218
|
+
event_name: "page_visit",
|
|
219
|
+
event_time: 1700000902,
|
|
220
|
+
event_id: "1700000902-gr0up-1",
|
|
221
|
+
event_source_url: "https://www.example.com/docs/",
|
|
222
|
+
action_source: "web",
|
|
223
|
+
user_data: {
|
|
224
|
+
external_id: ["user-789"]
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
]
|
|
228
|
+
}
|
|
229
|
+
};
|
|
230
|
+
var search = {
|
|
231
|
+
in: (0, import_core.getEvent)("entity action", {
|
|
232
|
+
timestamp: 1700000903,
|
|
233
|
+
name: "site search",
|
|
234
|
+
data: { query: "walkerOS destinations" },
|
|
235
|
+
user: { id: "user-101" },
|
|
236
|
+
source: {
|
|
237
|
+
type: "server",
|
|
238
|
+
id: "https://www.example.com/search",
|
|
239
|
+
previous_id: ""
|
|
240
|
+
}
|
|
241
|
+
}),
|
|
242
|
+
mapping: {
|
|
243
|
+
name: "search",
|
|
244
|
+
data: {
|
|
245
|
+
map: {
|
|
246
|
+
custom_data: {
|
|
247
|
+
map: {
|
|
248
|
+
search_string: "data.query"
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
},
|
|
254
|
+
out: {
|
|
255
|
+
data: [
|
|
256
|
+
{
|
|
257
|
+
event_name: "search",
|
|
258
|
+
event_time: 1700000903,
|
|
259
|
+
event_id: "1700000903-gr0up-1",
|
|
260
|
+
event_source_url: "https://www.example.com/search",
|
|
261
|
+
action_source: "web",
|
|
262
|
+
user_data: {
|
|
263
|
+
external_id: ["user-101"]
|
|
264
|
+
},
|
|
265
|
+
custom_data: {
|
|
266
|
+
search_string: "walkerOS destinations"
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
]
|
|
270
|
+
}
|
|
271
|
+
};
|
|
272
|
+
var signup = {
|
|
273
|
+
in: (0, import_core.getEvent)("entity action", {
|
|
274
|
+
timestamp: 1700000904,
|
|
275
|
+
name: "user signup",
|
|
276
|
+
data: { method: "email" },
|
|
277
|
+
user: { id: "new-user-1", email: "new@example.com" },
|
|
278
|
+
source: {
|
|
279
|
+
type: "server",
|
|
280
|
+
id: "https://www.example.com/register",
|
|
281
|
+
previous_id: ""
|
|
282
|
+
}
|
|
283
|
+
}),
|
|
284
|
+
mapping: {
|
|
285
|
+
name: "signup",
|
|
286
|
+
data: {
|
|
287
|
+
map: {
|
|
288
|
+
user_data: {
|
|
289
|
+
map: {
|
|
290
|
+
em: { set: ["user.email"] },
|
|
291
|
+
external_id: { set: ["user.id"] }
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
},
|
|
297
|
+
out: {
|
|
298
|
+
data: [
|
|
299
|
+
{
|
|
300
|
+
event_name: "signup",
|
|
301
|
+
event_time: 1700000904,
|
|
302
|
+
event_id: "1700000904-gr0up-1",
|
|
303
|
+
event_source_url: "https://www.example.com/register",
|
|
304
|
+
action_source: "web",
|
|
305
|
+
user_data: {
|
|
306
|
+
em: ["new@example.com"],
|
|
307
|
+
external_id: ["new-user-1"]
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
]
|
|
311
|
+
}
|
|
312
|
+
};
|
|
313
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
314
|
+
0 && (module.exports = {
|
|
315
|
+
env,
|
|
316
|
+
step
|
|
317
|
+
});
|
|
@@ -0,0 +1,295 @@
|
|
|
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
|
+
num_events_received: 1,
|
|
18
|
+
num_events_processed: 1,
|
|
19
|
+
events: [{ status: "processed" }]
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
var push = {
|
|
24
|
+
sendServer: mockSendServer
|
|
25
|
+
};
|
|
26
|
+
var simulation = ["sendServer"];
|
|
27
|
+
|
|
28
|
+
// src/examples/step.ts
|
|
29
|
+
var step_exports = {};
|
|
30
|
+
__export(step_exports, {
|
|
31
|
+
addToCart: () => addToCart,
|
|
32
|
+
checkout: () => checkout,
|
|
33
|
+
pageVisit: () => pageVisit,
|
|
34
|
+
search: () => search,
|
|
35
|
+
signup: () => signup
|
|
36
|
+
});
|
|
37
|
+
import { getEvent, isObject } from "@walkeros/core";
|
|
38
|
+
var checkout = {
|
|
39
|
+
in: getEvent("order complete", {
|
|
40
|
+
timestamp: 1700000900,
|
|
41
|
+
data: { id: "ORD-300", total: 249.99, currency: "EUR" },
|
|
42
|
+
nested: [
|
|
43
|
+
{
|
|
44
|
+
entity: "product",
|
|
45
|
+
data: {
|
|
46
|
+
id: "SKU-A1",
|
|
47
|
+
name: "Everyday Ruck Snack",
|
|
48
|
+
price: "129.99",
|
|
49
|
+
quantity: 2
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
],
|
|
53
|
+
user: { id: "user-123", device: "device-456" },
|
|
54
|
+
source: { type: "server", id: "https://shop.example.com", previous_id: "" }
|
|
55
|
+
}),
|
|
56
|
+
mapping: {
|
|
57
|
+
name: "checkout",
|
|
58
|
+
data: {
|
|
59
|
+
map: {
|
|
60
|
+
custom_data: {
|
|
61
|
+
map: {
|
|
62
|
+
value: "data.total",
|
|
63
|
+
currency: { key: "data.currency", value: "EUR" },
|
|
64
|
+
order_id: "data.id",
|
|
65
|
+
num_items: {
|
|
66
|
+
fn: (event) => event.nested.filter(
|
|
67
|
+
(item) => item.entity === "product"
|
|
68
|
+
).length
|
|
69
|
+
},
|
|
70
|
+
contents: {
|
|
71
|
+
loop: [
|
|
72
|
+
"nested",
|
|
73
|
+
{
|
|
74
|
+
condition: (entity) => isObject(entity) && entity.entity === "product",
|
|
75
|
+
map: {
|
|
76
|
+
id: "data.id",
|
|
77
|
+
item_name: "data.name",
|
|
78
|
+
item_price: "data.price",
|
|
79
|
+
quantity: { key: "data.quantity", value: 1 }
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
]
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
out: {
|
|
90
|
+
data: [
|
|
91
|
+
{
|
|
92
|
+
event_name: "checkout",
|
|
93
|
+
event_time: 1700000900,
|
|
94
|
+
event_id: "1700000900-gr0up-1",
|
|
95
|
+
event_source_url: "https://shop.example.com",
|
|
96
|
+
action_source: "web",
|
|
97
|
+
user_data: {
|
|
98
|
+
external_id: ["user-123"]
|
|
99
|
+
},
|
|
100
|
+
custom_data: {
|
|
101
|
+
value: 249.99,
|
|
102
|
+
currency: "EUR",
|
|
103
|
+
order_id: "ORD-300",
|
|
104
|
+
num_items: 1,
|
|
105
|
+
contents: [
|
|
106
|
+
{
|
|
107
|
+
id: "SKU-A1",
|
|
108
|
+
item_name: "Everyday Ruck Snack",
|
|
109
|
+
item_price: "129.99",
|
|
110
|
+
quantity: 2
|
|
111
|
+
}
|
|
112
|
+
]
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
]
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
var addToCart = {
|
|
119
|
+
in: getEvent("product add", {
|
|
120
|
+
timestamp: 1700000901,
|
|
121
|
+
data: { id: "SKU-B2", name: "Cool Cap", price: "42.00", quantity: 1 },
|
|
122
|
+
user: { id: "user-456" },
|
|
123
|
+
source: {
|
|
124
|
+
type: "server",
|
|
125
|
+
id: "https://shop.example.com/products",
|
|
126
|
+
previous_id: ""
|
|
127
|
+
}
|
|
128
|
+
}),
|
|
129
|
+
mapping: {
|
|
130
|
+
name: "add_to_cart",
|
|
131
|
+
data: {
|
|
132
|
+
map: {
|
|
133
|
+
custom_data: {
|
|
134
|
+
map: {
|
|
135
|
+
value: "data.price",
|
|
136
|
+
currency: { value: "EUR" },
|
|
137
|
+
contents: {
|
|
138
|
+
set: [
|
|
139
|
+
{
|
|
140
|
+
map: {
|
|
141
|
+
id: "data.id",
|
|
142
|
+
item_name: "data.name",
|
|
143
|
+
item_price: "data.price",
|
|
144
|
+
quantity: { key: "data.quantity", value: 1 }
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
]
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
out: {
|
|
155
|
+
data: [
|
|
156
|
+
{
|
|
157
|
+
event_name: "add_to_cart",
|
|
158
|
+
event_time: 1700000901,
|
|
159
|
+
event_id: "1700000901-gr0up-1",
|
|
160
|
+
event_source_url: "https://shop.example.com/products",
|
|
161
|
+
action_source: "web",
|
|
162
|
+
user_data: {
|
|
163
|
+
external_id: ["user-456"]
|
|
164
|
+
},
|
|
165
|
+
custom_data: {
|
|
166
|
+
value: "42.00",
|
|
167
|
+
currency: "EUR",
|
|
168
|
+
contents: [
|
|
169
|
+
{
|
|
170
|
+
id: "SKU-B2",
|
|
171
|
+
item_name: "Cool Cap",
|
|
172
|
+
item_price: "42.00",
|
|
173
|
+
quantity: 1
|
|
174
|
+
}
|
|
175
|
+
]
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
]
|
|
179
|
+
}
|
|
180
|
+
};
|
|
181
|
+
var pageVisit = {
|
|
182
|
+
in: getEvent("page view", {
|
|
183
|
+
timestamp: 1700000902,
|
|
184
|
+
user: { id: "user-789" },
|
|
185
|
+
source: {
|
|
186
|
+
type: "server",
|
|
187
|
+
id: "https://www.example.com/docs/",
|
|
188
|
+
previous_id: ""
|
|
189
|
+
}
|
|
190
|
+
}),
|
|
191
|
+
mapping: {
|
|
192
|
+
name: "page_visit"
|
|
193
|
+
},
|
|
194
|
+
out: {
|
|
195
|
+
data: [
|
|
196
|
+
{
|
|
197
|
+
event_name: "page_visit",
|
|
198
|
+
event_time: 1700000902,
|
|
199
|
+
event_id: "1700000902-gr0up-1",
|
|
200
|
+
event_source_url: "https://www.example.com/docs/",
|
|
201
|
+
action_source: "web",
|
|
202
|
+
user_data: {
|
|
203
|
+
external_id: ["user-789"]
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
]
|
|
207
|
+
}
|
|
208
|
+
};
|
|
209
|
+
var search = {
|
|
210
|
+
in: getEvent("entity action", {
|
|
211
|
+
timestamp: 1700000903,
|
|
212
|
+
name: "site search",
|
|
213
|
+
data: { query: "walkerOS destinations" },
|
|
214
|
+
user: { id: "user-101" },
|
|
215
|
+
source: {
|
|
216
|
+
type: "server",
|
|
217
|
+
id: "https://www.example.com/search",
|
|
218
|
+
previous_id: ""
|
|
219
|
+
}
|
|
220
|
+
}),
|
|
221
|
+
mapping: {
|
|
222
|
+
name: "search",
|
|
223
|
+
data: {
|
|
224
|
+
map: {
|
|
225
|
+
custom_data: {
|
|
226
|
+
map: {
|
|
227
|
+
search_string: "data.query"
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
},
|
|
233
|
+
out: {
|
|
234
|
+
data: [
|
|
235
|
+
{
|
|
236
|
+
event_name: "search",
|
|
237
|
+
event_time: 1700000903,
|
|
238
|
+
event_id: "1700000903-gr0up-1",
|
|
239
|
+
event_source_url: "https://www.example.com/search",
|
|
240
|
+
action_source: "web",
|
|
241
|
+
user_data: {
|
|
242
|
+
external_id: ["user-101"]
|
|
243
|
+
},
|
|
244
|
+
custom_data: {
|
|
245
|
+
search_string: "walkerOS destinations"
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
]
|
|
249
|
+
}
|
|
250
|
+
};
|
|
251
|
+
var signup = {
|
|
252
|
+
in: getEvent("entity action", {
|
|
253
|
+
timestamp: 1700000904,
|
|
254
|
+
name: "user signup",
|
|
255
|
+
data: { method: "email" },
|
|
256
|
+
user: { id: "new-user-1", email: "new@example.com" },
|
|
257
|
+
source: {
|
|
258
|
+
type: "server",
|
|
259
|
+
id: "https://www.example.com/register",
|
|
260
|
+
previous_id: ""
|
|
261
|
+
}
|
|
262
|
+
}),
|
|
263
|
+
mapping: {
|
|
264
|
+
name: "signup",
|
|
265
|
+
data: {
|
|
266
|
+
map: {
|
|
267
|
+
user_data: {
|
|
268
|
+
map: {
|
|
269
|
+
em: { set: ["user.email"] },
|
|
270
|
+
external_id: { set: ["user.id"] }
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
},
|
|
276
|
+
out: {
|
|
277
|
+
data: [
|
|
278
|
+
{
|
|
279
|
+
event_name: "signup",
|
|
280
|
+
event_time: 1700000904,
|
|
281
|
+
event_id: "1700000904-gr0up-1",
|
|
282
|
+
event_source_url: "https://www.example.com/register",
|
|
283
|
+
action_source: "web",
|
|
284
|
+
user_data: {
|
|
285
|
+
em: ["new@example.com"],
|
|
286
|
+
external_id: ["new-user-1"]
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
]
|
|
290
|
+
}
|
|
291
|
+
};
|
|
292
|
+
export {
|
|
293
|
+
env_exports as env,
|
|
294
|
+
step_exports as step
|
|
295
|
+
};
|