@walkeros/cli 1.0.0 → 1.0.1-next-1768820936934

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.
@@ -0,0 +1,571 @@
1
+ {
2
+ "$schema": "https://walkeros.io/schema/flow/v1.json",
3
+ "version": 1,
4
+ "variables": {
5
+ "currency": "EUR",
6
+ "flowVersion": "1.0.0",
7
+ "ga4MeasurementId": "${GA4_MEASUREMENT_ID:G-DEMO123456}",
8
+ "apiUrl": "${API_URL:http://localhost:8080/collect}"
9
+ },
10
+ "definitions": {
11
+ "ga4ItemsLoop": {
12
+ "loop": [
13
+ "nested",
14
+ {
15
+ "map": {
16
+ "item_id": "data.id",
17
+ "item_name": "data.name",
18
+ "price": "data.price",
19
+ "quantity": { "key": "data.quantity", "value": 1 }
20
+ }
21
+ }
22
+ ]
23
+ },
24
+ "metaContentsLoop": {
25
+ "loop": [
26
+ "nested",
27
+ {
28
+ "map": {
29
+ "id": "data.id",
30
+ "item_price": "data.price",
31
+ "quantity": { "key": "data.quantity", "value": 1 }
32
+ }
33
+ }
34
+ ]
35
+ }
36
+ },
37
+ "flows": {
38
+ "web": {
39
+ "web": {
40
+ "windowCollector": "collector",
41
+ "windowElb": "elb"
42
+ },
43
+ "packages": {
44
+ "@walkeros/collector": {},
45
+ "@walkeros/web-source-browser": {},
46
+ "@walkeros/web-source-datalayer": {},
47
+ "@walkeros/source-demo": {},
48
+ "@walkeros/web-destination-gtag": {},
49
+ "@walkeros/web-destination-api": {},
50
+ "@walkeros/transformer-validator": {}
51
+ },
52
+ "sources": {
53
+ "browser": {
54
+ "package": "@walkeros/web-source-browser",
55
+ "primary": true,
56
+ "config": {
57
+ "settings": {
58
+ "prefix": "data-elb",
59
+ "pageview": true,
60
+ "session": {
61
+ "consent": { "marketing": true }
62
+ },
63
+ "elb": "elb",
64
+ "elbLayer": true
65
+ }
66
+ }
67
+ },
68
+ "dataLayer": {
69
+ "package": "@walkeros/web-source-datalayer",
70
+ "next": "dataLayerValidator",
71
+ "config": {
72
+ "settings": {
73
+ "name": "dataLayer",
74
+ "prefix": "gtag"
75
+ },
76
+ "mapping": {
77
+ "add_to_cart": {
78
+ "*": {
79
+ "name": "product add",
80
+ "data": {
81
+ "map": {
82
+ "id": "items.0.item_id",
83
+ "name": "items.0.item_name",
84
+ "price": "items.0.price",
85
+ "currency": "currency",
86
+ "quantity": { "key": "items.0.quantity", "value": 1 }
87
+ }
88
+ }
89
+ }
90
+ },
91
+ "purchase": {
92
+ "*": {
93
+ "name": "order complete",
94
+ "data": {
95
+ "map": {
96
+ "id": "transaction_id",
97
+ "total": "value",
98
+ "currency": "currency",
99
+ "tax": "tax",
100
+ "shipping": "shipping"
101
+ }
102
+ }
103
+ }
104
+ }
105
+ }
106
+ }
107
+ },
108
+ "demo": {
109
+ "package": "@walkeros/source-demo",
110
+ "config": {
111
+ "settings": {
112
+ "events": [
113
+ {
114
+ "name": "page view",
115
+ "data": { "title": "Home", "path": "/" },
116
+ "delay": 0
117
+ },
118
+ {
119
+ "name": "product view",
120
+ "data": {
121
+ "id": "SKU-001",
122
+ "name": "Blue Shirt",
123
+ "price": 49.99,
124
+ "currency": "EUR",
125
+ "category": "Clothing"
126
+ },
127
+ "delay": 300
128
+ },
129
+ {
130
+ "name": "product add",
131
+ "data": {
132
+ "id": "SKU-001",
133
+ "name": "Blue Shirt",
134
+ "price": 49.99,
135
+ "currency": "EUR",
136
+ "quantity": 2
137
+ },
138
+ "delay": 600
139
+ },
140
+ {
141
+ "name": "test debug",
142
+ "data": { "message": "This should be ignored" },
143
+ "delay": 800
144
+ },
145
+ {
146
+ "name": "order complete",
147
+ "data": {
148
+ "id": "ORD-123",
149
+ "total": 149.97,
150
+ "currency": "EUR",
151
+ "tax": 12.5,
152
+ "shipping": 5.99
153
+ },
154
+ "user": {
155
+ "email": "customer@example.com",
156
+ "id": "U-456",
157
+ "device": "d3v1c3",
158
+ "session": "s3ss10n"
159
+ },
160
+ "nested": [
161
+ {
162
+ "entity": "product",
163
+ "data": {
164
+ "id": "SKU-001",
165
+ "name": "Blue Shirt",
166
+ "price": 49.99,
167
+ "quantity": 2
168
+ }
169
+ },
170
+ {
171
+ "entity": "product",
172
+ "data": {
173
+ "id": "SKU-002",
174
+ "name": "Red Cap",
175
+ "price": 24.99,
176
+ "quantity": 1
177
+ }
178
+ }
179
+ ],
180
+ "delay": 1000
181
+ }
182
+ ]
183
+ }
184
+ }
185
+ }
186
+ },
187
+ "transformers": {
188
+ "dataLayerValidator": {
189
+ "package": "@walkeros/transformer-validator",
190
+ "config": {
191
+ "settings": {
192
+ "contract": {
193
+ "product": {
194
+ "add": {
195
+ "schema": {
196
+ "properties": {
197
+ "data": {
198
+ "required": ["id", "name"]
199
+ }
200
+ }
201
+ }
202
+ }
203
+ }
204
+ }
205
+ }
206
+ }
207
+ }
208
+ },
209
+ "destinations": {
210
+ "ga4": {
211
+ "package": "@walkeros/web-destination-gtag",
212
+ "config": {
213
+ "consent": { "marketing": true },
214
+ "settings": {
215
+ "ga4": { "measurementId": "$variables.ga4MeasurementId" }
216
+ },
217
+ "mapping": {
218
+ "page": {
219
+ "view": {
220
+ "name": "page_view",
221
+ "data": {
222
+ "map": {
223
+ "page_title": "data.title",
224
+ "page_location": "data.path"
225
+ }
226
+ }
227
+ }
228
+ },
229
+ "product": {
230
+ "view": {
231
+ "name": "view_item",
232
+ "data": {
233
+ "map": {
234
+ "currency": {
235
+ "key": "data.currency",
236
+ "value": "$variables.currency"
237
+ },
238
+ "value": "data.price",
239
+ "items": {
240
+ "loop": [
241
+ "this",
242
+ {
243
+ "map": {
244
+ "item_id": "data.id",
245
+ "item_name": "data.name",
246
+ "item_category": "data.category",
247
+ "price": "data.price"
248
+ }
249
+ }
250
+ ]
251
+ }
252
+ }
253
+ }
254
+ },
255
+ "add": {
256
+ "name": "add_to_cart",
257
+ "data": {
258
+ "map": {
259
+ "currency": {
260
+ "key": "data.currency",
261
+ "value": "$variables.currency"
262
+ },
263
+ "value": "data.price",
264
+ "items": {
265
+ "loop": [
266
+ "this",
267
+ {
268
+ "map": {
269
+ "item_id": "data.id",
270
+ "item_name": "data.name",
271
+ "quantity": { "key": "data.quantity", "value": 1 }
272
+ }
273
+ }
274
+ ]
275
+ }
276
+ }
277
+ }
278
+ }
279
+ },
280
+ "order": {
281
+ "complete": {
282
+ "name": "purchase",
283
+ "data": {
284
+ "map": {
285
+ "transaction_id": "data.id",
286
+ "value": "data.total",
287
+ "currency": {
288
+ "key": "data.currency",
289
+ "value": "$variables.currency"
290
+ },
291
+ "tax": "data.tax",
292
+ "shipping": "data.shipping",
293
+ "items": { "$ref": "#/definitions/ga4ItemsLoop" }
294
+ }
295
+ }
296
+ }
297
+ },
298
+ "test": {
299
+ "*": {
300
+ "ignore": true
301
+ }
302
+ }
303
+ }
304
+ }
305
+ },
306
+ "api": {
307
+ "package": "@walkeros/web-destination-api",
308
+ "config": {
309
+ "settings": {
310
+ "url": "$variables.apiUrl",
311
+ "batch": 5
312
+ },
313
+ "mapping": {
314
+ "order": {
315
+ "complete": {
316
+ "data": {
317
+ "map": {
318
+ "transaction_id": "data.id",
319
+ "value": "data.total",
320
+ "currency": "data.currency",
321
+ "user_email": {
322
+ "key": "user.email",
323
+ "consent": { "marketing": true }
324
+ },
325
+ "items": { "$ref": "#/definitions/ga4ItemsLoop" }
326
+ }
327
+ }
328
+ }
329
+ },
330
+ "test": {
331
+ "*": {
332
+ "ignore": true
333
+ }
334
+ }
335
+ }
336
+ }
337
+ }
338
+ },
339
+ "collector": {
340
+ "tagging": 1,
341
+ "consent": {
342
+ "functional": true,
343
+ "marketing": false
344
+ },
345
+ "user": {
346
+ "id": "anonymous"
347
+ },
348
+ "globals": {
349
+ "environment": "demo",
350
+ "version": "$variables.flowVersion"
351
+ },
352
+ "custom": {
353
+ "campaign": "flow-demo"
354
+ }
355
+ }
356
+ },
357
+ "server": {
358
+ "server": {},
359
+ "variables": {
360
+ "metaPixelId": "${META_PIXEL_ID:123456789012345}",
361
+ "metaAccessToken": "${META_ACCESS_TOKEN:demo_token}"
362
+ },
363
+ "packages": {
364
+ "@walkeros/collector": {},
365
+ "@walkeros/server-source-express": {},
366
+ "@walkeros/server-destination-meta": {},
367
+ "@walkeros/destination-demo": {},
368
+ "@walkeros/transformer-validator": {},
369
+ "@walkeros/server-transformer-fingerprint": {}
370
+ },
371
+ "sources": {
372
+ "http": {
373
+ "package": "@walkeros/server-source-express",
374
+ "primary": true,
375
+ "config": {
376
+ "settings": {
377
+ "path": "/collect",
378
+ "port": 8080,
379
+ "cors": true,
380
+ "healthCheck": true
381
+ },
382
+ "ingest": {
383
+ "context.ip": "ip",
384
+ "context.userAgent": "headers.user-agent",
385
+ "context.language": "headers.accept-language",
386
+ "context.referer": "headers.referer"
387
+ }
388
+ }
389
+ }
390
+ },
391
+ "transformers": {
392
+ "fingerprint": {
393
+ "package": "@walkeros/server-transformer-fingerprint",
394
+ "next": "serverValidator",
395
+ "config": {
396
+ "settings": {
397
+ "fields": [
398
+ "context.ip",
399
+ "context.userAgent",
400
+ "context.language",
401
+ { "value": "2026-01-16" }
402
+ ],
403
+ "output": "user.hash",
404
+ "length": 16
405
+ }
406
+ }
407
+ },
408
+ "serverValidator": {
409
+ "package": "@walkeros/transformer-validator",
410
+ "config": {
411
+ "settings": {
412
+ "format": true,
413
+ "contract": {
414
+ "product": {
415
+ "*": {
416
+ "schema": {
417
+ "properties": {
418
+ "data": {
419
+ "required": ["id", "name", "price"]
420
+ }
421
+ }
422
+ }
423
+ }
424
+ },
425
+ "order": {
426
+ "complete": {
427
+ "schema": {
428
+ "properties": {
429
+ "data": {
430
+ "required": ["id", "total"]
431
+ }
432
+ }
433
+ }
434
+ }
435
+ }
436
+ }
437
+ }
438
+ }
439
+ }
440
+ },
441
+ "destinations": {
442
+ "meta": {
443
+ "package": "@walkeros/server-destination-meta",
444
+ "before": "fingerprint",
445
+ "config": {
446
+ "settings": {
447
+ "pixelId": "$variables.metaPixelId",
448
+ "accessToken": "$variables.metaAccessToken",
449
+ "user_data": {
450
+ "external_id": {
451
+ "set": ["user.device", "user.session"]
452
+ }
453
+ }
454
+ },
455
+ "policy": {
456
+ "user_data.em": {
457
+ "key": "user.email",
458
+ "consent": { "marketing": true }
459
+ },
460
+ "user_data.external_id": "user.id",
461
+ "custom_data.server_processed": { "value": true },
462
+ "custom_data.request_meta": {
463
+ "map": {
464
+ "ip": "context.ip",
465
+ "ua": "context.userAgent"
466
+ }
467
+ }
468
+ },
469
+ "mapping": {
470
+ "page": {
471
+ "view": {
472
+ "name": "PageView",
473
+ "data": "data"
474
+ }
475
+ },
476
+ "product": {
477
+ "view": {
478
+ "name": "ViewContent",
479
+ "data": {
480
+ "map": {
481
+ "value": "data.price",
482
+ "currency": {
483
+ "key": "data.currency",
484
+ "value": "$variables.currency"
485
+ },
486
+ "content_type": { "value": "product" },
487
+ "content_ids": {
488
+ "set": ["data.id"]
489
+ }
490
+ }
491
+ }
492
+ },
493
+ "add": {
494
+ "name": "AddToCart",
495
+ "data": {
496
+ "map": {
497
+ "value": "data.price",
498
+ "currency": {
499
+ "key": "data.currency",
500
+ "value": "$variables.currency"
501
+ },
502
+ "content_type": { "value": "product" },
503
+ "contents": {
504
+ "loop": [
505
+ "this",
506
+ {
507
+ "map": {
508
+ "id": "data.id",
509
+ "quantity": { "key": "data.quantity", "value": 1 }
510
+ }
511
+ }
512
+ ]
513
+ }
514
+ }
515
+ }
516
+ }
517
+ },
518
+ "order": {
519
+ "complete": {
520
+ "name": "Purchase",
521
+ "data": {
522
+ "map": {
523
+ "value": "data.total",
524
+ "currency": {
525
+ "key": "data.currency",
526
+ "value": "$variables.currency"
527
+ },
528
+ "order_id": "data.id",
529
+ "contents": { "$ref": "#/definitions/metaContentsLoop" }
530
+ }
531
+ }
532
+ }
533
+ },
534
+ "test": {
535
+ "*": {
536
+ "ignore": true
537
+ }
538
+ },
539
+ "*": {
540
+ "click": {
541
+ "name": "CustomEvent",
542
+ "data": "data"
543
+ }
544
+ }
545
+ }
546
+ }
547
+ },
548
+ "demo": {
549
+ "package": "@walkeros/destination-demo",
550
+ "config": {
551
+ "settings": {
552
+ "name": "Server Events",
553
+ "values": ["name", "data", "nested", "user", "consent", "context"]
554
+ }
555
+ }
556
+ }
557
+ },
558
+ "collector": {
559
+ "tagging": 1,
560
+ "consent": {
561
+ "functional": true
562
+ },
563
+ "globals": {
564
+ "environment": "demo",
565
+ "version": "$variables.flowVersion",
566
+ "platform": "server"
567
+ }
568
+ }
569
+ }
570
+ }
571
+ }