@walkeros/server-destination-mparticle 3.4.0-next-1776749829492

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,471 @@
1
+ {
2
+ "$meta": {
3
+ "package": "@walkeros/server-destination-mparticle",
4
+ "version": "3.4.0-next-1776749829492",
5
+ "type": "destination",
6
+ "platform": [
7
+ "server"
8
+ ],
9
+ "docs": "https://www.walkeros.io/docs/destinations/server/mparticle",
10
+ "source": "https://github.com/elbwalker/walkerOS/tree/main/packages/server/destinations/mparticle/src"
11
+ },
12
+ "schemas": {
13
+ "mapping": {
14
+ "$schema": "http://json-schema.org/draft-07/schema#",
15
+ "type": "object",
16
+ "properties": {
17
+ "eventType": {
18
+ "type": "string",
19
+ "enum": [
20
+ "custom_event",
21
+ "screen_view",
22
+ "commerce_event"
23
+ ],
24
+ "description": "Per-event mParticle event type. Default: 'custom_event'."
25
+ },
26
+ "customEventType": {
27
+ "type": "string",
28
+ "enum": [
29
+ "navigation",
30
+ "location",
31
+ "search",
32
+ "transaction",
33
+ "user_content",
34
+ "user_preference",
35
+ "social",
36
+ "media",
37
+ "attribution",
38
+ "other"
39
+ ],
40
+ "description": "Custom event type category for 'custom_event'. Default: 'other'."
41
+ },
42
+ "commerce": {
43
+ "description": "Mapping value resolving to the commerce fields (product_action, currency_code, products, ...) for a commerce_event."
44
+ },
45
+ "userIdentities": {
46
+ "type": "object",
47
+ "propertyNames": {
48
+ "type": "string"
49
+ },
50
+ "additionalProperties": {},
51
+ "description": "Per-event override mapping for user_identities. Merged over settings.userIdentities."
52
+ },
53
+ "userAttributes": {
54
+ "description": "Per-event override mapping for user_attributes."
55
+ }
56
+ },
57
+ "additionalProperties": false
58
+ },
59
+ "settings": {
60
+ "$schema": "http://json-schema.org/draft-07/schema#",
61
+ "type": "object",
62
+ "properties": {
63
+ "apiKey": {
64
+ "type": "string",
65
+ "minLength": 1,
66
+ "description": "mParticle input feed API key from the mParticle dashboard (Setup > Inputs > Feeds)."
67
+ },
68
+ "apiSecret": {
69
+ "type": "string",
70
+ "minLength": 1,
71
+ "description": "mParticle input feed API secret paired with apiKey. Used for HTTP Basic auth."
72
+ },
73
+ "pod": {
74
+ "type": "string",
75
+ "enum": [
76
+ "us1",
77
+ "us2",
78
+ "eu1",
79
+ "au1"
80
+ ],
81
+ "description": "mParticle data pod selecting the regional endpoint. Default: 'us1'."
82
+ },
83
+ "environment": {
84
+ "type": "string",
85
+ "enum": [
86
+ "production",
87
+ "development"
88
+ ],
89
+ "description": "Environment the batch targets. Default: 'production'."
90
+ },
91
+ "userIdentities": {
92
+ "type": "object",
93
+ "propertyNames": {
94
+ "type": "string"
95
+ },
96
+ "additionalProperties": {},
97
+ "description": "Mapping that resolves to user_identities per batch. Keys are mParticle identity types (like customer_id, email); values are walkerOS mapping values."
98
+ },
99
+ "userAttributes": {
100
+ "description": "Mapping value that resolves to the user_attributes object placed on the batch."
101
+ },
102
+ "consent": {
103
+ "type": "object",
104
+ "propertyNames": {
105
+ "type": "string"
106
+ },
107
+ "additionalProperties": {},
108
+ "description": "Static consent_state envelope forwarded verbatim on the batch. See mParticle consent_state docs."
109
+ },
110
+ "ip": {
111
+ "description": "Mapping value resolving to the client IP for the batch."
112
+ },
113
+ "sourceRequestId": {
114
+ "description": "Mapping value resolving to the source_request_id for the batch. Falls back to event.id when unset."
115
+ }
116
+ },
117
+ "required": [
118
+ "apiKey",
119
+ "apiSecret"
120
+ ],
121
+ "additionalProperties": false
122
+ }
123
+ },
124
+ "examples": {
125
+ "env": {
126
+ "push": {
127
+ "sendServer": {
128
+ "$code": "async()=>({ok:!0,data:{}})"
129
+ }
130
+ },
131
+ "simulation": [
132
+ "sendServer"
133
+ ]
134
+ },
135
+ "step": {
136
+ "commercePurchase": {
137
+ "in": {
138
+ "name": "order complete",
139
+ "data": {
140
+ "id": "ORD-300",
141
+ "total": 249.99,
142
+ "currency": "EUR"
143
+ },
144
+ "context": {
145
+ "shopping": [
146
+ "complete",
147
+ 0
148
+ ]
149
+ },
150
+ "globals": {
151
+ "pagegroup": "shop"
152
+ },
153
+ "custom": {
154
+ "completely": "random"
155
+ },
156
+ "user": {
157
+ "id": "user-123"
158
+ },
159
+ "nested": [
160
+ {
161
+ "entity": "product",
162
+ "data": {
163
+ "id": "ers",
164
+ "name": "Everyday Ruck Snack",
165
+ "color": "black",
166
+ "size": "l",
167
+ "price": 420
168
+ },
169
+ "context": {
170
+ "shopping": [
171
+ "complete",
172
+ 0
173
+ ]
174
+ },
175
+ "nested": []
176
+ },
177
+ {
178
+ "entity": "product",
179
+ "data": {
180
+ "id": "cc",
181
+ "name": "Cool Cap",
182
+ "size": "one size",
183
+ "price": 42
184
+ },
185
+ "context": {
186
+ "shopping": [
187
+ "complete",
188
+ 0
189
+ ]
190
+ },
191
+ "nested": []
192
+ },
193
+ {
194
+ "entity": "gift",
195
+ "data": {
196
+ "name": "Surprise"
197
+ },
198
+ "context": {
199
+ "shopping": [
200
+ "complete",
201
+ 0
202
+ ]
203
+ },
204
+ "nested": []
205
+ }
206
+ ],
207
+ "consent": {
208
+ "functional": true
209
+ },
210
+ "id": "1700000300000-gr0up-1",
211
+ "trigger": "load",
212
+ "entity": "order",
213
+ "action": "complete",
214
+ "timestamp": 1700000300000,
215
+ "timing": 3.14,
216
+ "group": "gr0up",
217
+ "count": 1,
218
+ "version": {
219
+ "source": "3.4.0-next-1776749829492",
220
+ "tagging": 1
221
+ },
222
+ "source": {
223
+ "type": "server",
224
+ "id": "https://shop.example.com",
225
+ "previous_id": ""
226
+ }
227
+ },
228
+ "mapping": {
229
+ "settings": {
230
+ "eventType": "commerce_event",
231
+ "commerce": {
232
+ "map": {
233
+ "currency_code": "data.currency",
234
+ "product_action": {
235
+ "map": {
236
+ "action": {
237
+ "value": "purchase"
238
+ },
239
+ "transaction_id": "data.id",
240
+ "total_amount": "data.total"
241
+ }
242
+ }
243
+ }
244
+ }
245
+ }
246
+ },
247
+ "out": [
248
+ [
249
+ "sendServer",
250
+ "https://s2s.mparticle.com/v2/events",
251
+ "{\"events\":[{\"event_type\":\"commerce_event\",\"data\":{\"currency_code\":\"EUR\",\"product_action\":{\"action\":\"purchase\",\"transaction_id\":\"ORD-300\",\"total_amount\":249.99},\"timestamp_unixtime_ms\":1700000300000,\"source_message_id\":\"1700000300000-gr0up-1\"}}],\"environment\":\"production\",\"user_identities\":{\"customer_id\":\"user-123\"},\"source_request_id\":\"1700000300000-gr0up-1\"}",
252
+ {
253
+ "headers": {
254
+ "Authorization": "Basic a2V5OnNlY3JldA==",
255
+ "Content-Type": "application/json"
256
+ }
257
+ }
258
+ ]
259
+ ]
260
+ },
261
+ "customEvent": {
262
+ "in": {
263
+ "name": "product view",
264
+ "data": {
265
+ "id": "SKU-A1",
266
+ "name": "Shoe",
267
+ "price": 129.99
268
+ },
269
+ "context": {
270
+ "shopping": [
271
+ "detail",
272
+ 0
273
+ ]
274
+ },
275
+ "globals": {
276
+ "pagegroup": "shop"
277
+ },
278
+ "custom": {
279
+ "completely": "random"
280
+ },
281
+ "user": {
282
+ "id": "user-123"
283
+ },
284
+ "nested": [],
285
+ "consent": {
286
+ "functional": true
287
+ },
288
+ "id": "1700000100000-gr0up-1",
289
+ "trigger": "load",
290
+ "entity": "product",
291
+ "action": "view",
292
+ "timestamp": 1700000100000,
293
+ "timing": 3.14,
294
+ "group": "gr0up",
295
+ "count": 1,
296
+ "version": {
297
+ "source": "3.4.0-next-1776749829492",
298
+ "tagging": 1
299
+ },
300
+ "source": {
301
+ "type": "server",
302
+ "id": "https://shop.example.com",
303
+ "previous_id": ""
304
+ }
305
+ },
306
+ "out": [
307
+ [
308
+ "sendServer",
309
+ "https://s2s.mparticle.com/v2/events",
310
+ "{\"events\":[{\"event_type\":\"custom_event\",\"data\":{\"event_name\":\"product view\",\"custom_event_type\":\"other\",\"timestamp_unixtime_ms\":1700000100000,\"source_message_id\":\"1700000100000-gr0up-1\"}}],\"environment\":\"production\",\"user_identities\":{\"customer_id\":\"user-123\"},\"source_request_id\":\"1700000100000-gr0up-1\"}",
311
+ {
312
+ "headers": {
313
+ "Authorization": "Basic a2V5OnNlY3JldA==",
314
+ "Content-Type": "application/json"
315
+ }
316
+ }
317
+ ]
318
+ ]
319
+ },
320
+ "identityAndAttributes": {
321
+ "in": {
322
+ "name": "form submit",
323
+ "data": {
324
+ "type": "newsletter"
325
+ },
326
+ "context": {
327
+ "dev": [
328
+ "test",
329
+ 1
330
+ ]
331
+ },
332
+ "globals": {
333
+ "lang": "elb"
334
+ },
335
+ "custom": {
336
+ "completely": "random"
337
+ },
338
+ "user": {
339
+ "id": "user-123",
340
+ "email": "user@example.com"
341
+ },
342
+ "nested": [
343
+ {
344
+ "entity": "child",
345
+ "data": {
346
+ "is": "subordinated"
347
+ },
348
+ "nested": [],
349
+ "context": {
350
+ "element": [
351
+ "child",
352
+ 0
353
+ ]
354
+ }
355
+ }
356
+ ],
357
+ "consent": {
358
+ "functional": true
359
+ },
360
+ "id": "1700000400000-gr0up-1",
361
+ "trigger": "test",
362
+ "entity": "form",
363
+ "action": "submit",
364
+ "timestamp": 1700000400000,
365
+ "timing": 3.14,
366
+ "group": "gr0up",
367
+ "count": 1,
368
+ "version": {
369
+ "source": "3.4.0-next-1776749829492",
370
+ "tagging": 1
371
+ },
372
+ "source": {
373
+ "type": "server",
374
+ "id": "https://example.com",
375
+ "previous_id": ""
376
+ }
377
+ },
378
+ "out": [
379
+ [
380
+ "sendServer",
381
+ "https://s2s.mparticle.com/v2/events",
382
+ "{\"events\":[{\"event_type\":\"custom_event\",\"data\":{\"event_name\":\"form submit\",\"custom_event_type\":\"other\",\"timestamp_unixtime_ms\":1700000400000,\"source_message_id\":\"1700000400000-gr0up-1\"}}],\"environment\":\"production\",\"user_identities\":{\"customer_id\":\"user-123\",\"email\":\"user@example.com\"},\"source_request_id\":\"1700000400000-gr0up-1\"}",
383
+ {
384
+ "headers": {
385
+ "Authorization": "Basic a2V5OnNlY3JldA==",
386
+ "Content-Type": "application/json"
387
+ }
388
+ }
389
+ ]
390
+ ]
391
+ },
392
+ "screenView": {
393
+ "in": {
394
+ "name": "page view",
395
+ "data": {
396
+ "title": "Checkout",
397
+ "path": "/checkout"
398
+ },
399
+ "context": {
400
+ "dev": [
401
+ "test",
402
+ 1
403
+ ]
404
+ },
405
+ "globals": {
406
+ "pagegroup": "docs"
407
+ },
408
+ "custom": {
409
+ "completely": "random"
410
+ },
411
+ "user": {
412
+ "id": "user-123"
413
+ },
414
+ "nested": [
415
+ {
416
+ "entity": "child",
417
+ "data": {
418
+ "is": "subordinated"
419
+ },
420
+ "nested": [],
421
+ "context": {
422
+ "element": [
423
+ "child",
424
+ 0
425
+ ]
426
+ }
427
+ }
428
+ ],
429
+ "consent": {
430
+ "functional": true
431
+ },
432
+ "id": "1700000200000-gr0up-1",
433
+ "trigger": "load",
434
+ "entity": "page",
435
+ "action": "view",
436
+ "timestamp": 1700000200000,
437
+ "timing": 3.14,
438
+ "group": "gr0up",
439
+ "count": 1,
440
+ "version": {
441
+ "source": "3.4.0-next-1776749829492",
442
+ "tagging": 1
443
+ },
444
+ "source": {
445
+ "type": "server",
446
+ "id": "https://shop.example.com",
447
+ "previous_id": ""
448
+ }
449
+ },
450
+ "mapping": {
451
+ "settings": {
452
+ "eventType": "screen_view"
453
+ }
454
+ },
455
+ "out": [
456
+ [
457
+ "sendServer",
458
+ "https://s2s.mparticle.com/v2/events",
459
+ "{\"events\":[{\"event_type\":\"screen_view\",\"data\":{\"screen_name\":\"page view\",\"timestamp_unixtime_ms\":1700000200000,\"source_message_id\":\"1700000200000-gr0up-1\"}}],\"environment\":\"production\",\"user_identities\":{\"customer_id\":\"user-123\"},\"source_request_id\":\"1700000200000-gr0up-1\"}",
460
+ {
461
+ "headers": {
462
+ "Authorization": "Basic a2V5OnNlY3JldA==",
463
+ "Content-Type": "application/json"
464
+ }
465
+ }
466
+ ]
467
+ ]
468
+ }
469
+ }
470
+ }
471
+ }
package/package.json ADDED
@@ -0,0 +1,75 @@
1
+ {
2
+ "name": "@walkeros/server-destination-mparticle",
3
+ "description": "mParticle server destination for walkerOS",
4
+ "version": "3.4.0-next-1776749829492",
5
+ "license": "MIT",
6
+ "exports": {
7
+ ".": {
8
+ "types": "./dist/index.d.ts",
9
+ "import": "./dist/index.mjs",
10
+ "require": "./dist/index.js"
11
+ },
12
+ "./dev": {
13
+ "types": "./dist/dev.d.ts",
14
+ "import": "./dist/dev.mjs",
15
+ "require": "./dist/dev.js"
16
+ },
17
+ "./walkerOS.json": "./dist/walkerOS.json",
18
+ "./examples": {
19
+ "types": "./dist/examples/index.d.ts",
20
+ "import": "./dist/examples/index.mjs",
21
+ "require": "./dist/examples/index.js"
22
+ }
23
+ },
24
+ "files": [
25
+ "dist/**"
26
+ ],
27
+ "scripts": {
28
+ "build": "tsup --silent",
29
+ "clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist",
30
+ "dev": "jest --watchAll --colors",
31
+ "typecheck": "tsc --noEmit",
32
+ "lint": "eslint \"**/*.ts*\"",
33
+ "test": "jest",
34
+ "update": "npx npm-check-updates -u && npm update"
35
+ },
36
+ "dependencies": {
37
+ "@walkeros/core": "3.4.0-next-1776749829492",
38
+ "@walkeros/server-core": "3.4.0-next-1776749829492"
39
+ },
40
+ "devDependencies": {
41
+ "@walkeros/collector": "3.4.0-next-1776749829492"
42
+ },
43
+ "repository": {
44
+ "url": "git+https://github.com/elbwalker/walkerOS.git",
45
+ "directory": "packages/server/destinations/mparticle"
46
+ },
47
+ "author": "elbwalker <hello@elbwalker.com>",
48
+ "homepage": "https://github.com/elbwalker/walkerOS#readme",
49
+ "bugs": {
50
+ "url": "https://github.com/elbwalker/walkerOS/issues"
51
+ },
52
+ "walkerOS": {
53
+ "type": "destination",
54
+ "platform": [
55
+ "server"
56
+ ],
57
+ "docs": "https://www.walkeros.io/docs/destinations/server/mparticle"
58
+ },
59
+ "keywords": [
60
+ "walkerOS",
61
+ "walkerOS-destination",
62
+ "destination",
63
+ "server",
64
+ "mparticle",
65
+ "cdp",
66
+ "events-api",
67
+ "customer-data-platform"
68
+ ],
69
+ "funding": [
70
+ {
71
+ "type": "GitHub Sponsors",
72
+ "url": "https://github.com/sponsors/elbwalker"
73
+ }
74
+ ]
75
+ }