@walkeros/server-destination-slack 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/README.md +132 -0
- package/dist/dev.d.mts +164 -0
- package/dist/dev.d.ts +164 -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 +113 -0
- package/dist/examples/index.d.ts +113 -0
- package/dist/examples/index.js +278 -0
- package/dist/examples/index.mjs +256 -0
- package/dist/index.d.mts +111 -0
- package/dist/index.d.ts +111 -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 +774 -0
- package/package.json +77 -0
|
@@ -0,0 +1,774 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$meta": {
|
|
3
|
+
"package": "@walkeros/server-destination-slack",
|
|
4
|
+
"version": "0.0.1",
|
|
5
|
+
"type": "destination",
|
|
6
|
+
"platform": [
|
|
7
|
+
"server"
|
|
8
|
+
],
|
|
9
|
+
"docs": "https://www.walkeros.io/docs/destinations/server/slack",
|
|
10
|
+
"source": "https://github.com/elbwalker/walkerOS/tree/main/packages/server/destinations/slack/src"
|
|
11
|
+
},
|
|
12
|
+
"schemas": {
|
|
13
|
+
"mapping": {
|
|
14
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
15
|
+
"type": "object",
|
|
16
|
+
"properties": {
|
|
17
|
+
"channel": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"description": "Override the destination channel for this rule. Web API mode only -- ignored in webhook mode."
|
|
20
|
+
},
|
|
21
|
+
"text": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"description": "Override the text template for this rule. Supports `${data.field}` interpolation."
|
|
24
|
+
},
|
|
25
|
+
"blocks": {
|
|
26
|
+
"type": "array",
|
|
27
|
+
"items": {
|
|
28
|
+
"type": "object",
|
|
29
|
+
"propertyNames": {
|
|
30
|
+
"type": "string"
|
|
31
|
+
},
|
|
32
|
+
"additionalProperties": {}
|
|
33
|
+
},
|
|
34
|
+
"description": "Override Block Kit blocks for this rule."
|
|
35
|
+
},
|
|
36
|
+
"threadTs": {
|
|
37
|
+
"type": "string",
|
|
38
|
+
"description": "thread_ts for posting as a reply in a thread."
|
|
39
|
+
},
|
|
40
|
+
"replyBroadcast": {
|
|
41
|
+
"type": "boolean",
|
|
42
|
+
"description": "Also broadcast the threaded reply back to the channel."
|
|
43
|
+
},
|
|
44
|
+
"ephemeral": {
|
|
45
|
+
"type": "boolean",
|
|
46
|
+
"description": "Send via chat.postEphemeral. Requires `user`."
|
|
47
|
+
},
|
|
48
|
+
"user": {
|
|
49
|
+
"type": "string",
|
|
50
|
+
"description": "Slack user ID for ephemeral or DM delivery."
|
|
51
|
+
},
|
|
52
|
+
"dm": {
|
|
53
|
+
"type": "boolean",
|
|
54
|
+
"description": "Send as DM via conversations.open + chat.postMessage. Requires `user`."
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"additionalProperties": false
|
|
58
|
+
},
|
|
59
|
+
"settings": {
|
|
60
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
61
|
+
"type": "object",
|
|
62
|
+
"properties": {
|
|
63
|
+
"token": {
|
|
64
|
+
"type": "string",
|
|
65
|
+
"pattern": "^xoxb-.*",
|
|
66
|
+
"description": "Slack Bot token (xoxb-...). Enables Web API mode. Mutually exclusive with webhookUrl."
|
|
67
|
+
},
|
|
68
|
+
"webhookUrl": {
|
|
69
|
+
"type": "string",
|
|
70
|
+
"format": "uri",
|
|
71
|
+
"description": "Incoming Webhook URL. Enables webhook mode. Mutually exclusive with token."
|
|
72
|
+
},
|
|
73
|
+
"channel": {
|
|
74
|
+
"type": "string",
|
|
75
|
+
"description": "Default Slack channel ID or name (e.g. \"#alerts\" or \"C024BE91L\"). Required for Web API mode unless every rule supplies one. Ignored in webhook mode."
|
|
76
|
+
},
|
|
77
|
+
"text": {
|
|
78
|
+
"type": "string",
|
|
79
|
+
"description": "Default text template. Supports `${data.field}` interpolation against the walkerOS event."
|
|
80
|
+
},
|
|
81
|
+
"blocks": {
|
|
82
|
+
"type": "array",
|
|
83
|
+
"items": {
|
|
84
|
+
"type": "object",
|
|
85
|
+
"propertyNames": {
|
|
86
|
+
"type": "string"
|
|
87
|
+
},
|
|
88
|
+
"additionalProperties": {}
|
|
89
|
+
},
|
|
90
|
+
"description": "Default Block Kit blocks applied when no mapping override is set."
|
|
91
|
+
},
|
|
92
|
+
"includeHeader": {
|
|
93
|
+
"type": "boolean",
|
|
94
|
+
"description": "Auto-add an event-name header block when generating default blocks. Default: true."
|
|
95
|
+
},
|
|
96
|
+
"unfurlLinks": {
|
|
97
|
+
"type": "boolean",
|
|
98
|
+
"description": "Enable link unfurling. Default: false (cleaner for automated alerts)."
|
|
99
|
+
},
|
|
100
|
+
"unfurlMedia": {
|
|
101
|
+
"type": "boolean",
|
|
102
|
+
"description": "Enable media unfurling. Default: false."
|
|
103
|
+
},
|
|
104
|
+
"mrkdwn": {
|
|
105
|
+
"type": "boolean",
|
|
106
|
+
"description": "Use mrkdwn formatting in text. Default: true."
|
|
107
|
+
},
|
|
108
|
+
"threadTs": {
|
|
109
|
+
"type": "string",
|
|
110
|
+
"description": "Static thread_ts for replies (rarely set at destination level)."
|
|
111
|
+
},
|
|
112
|
+
"retryConfig": {
|
|
113
|
+
"type": "string",
|
|
114
|
+
"enum": [
|
|
115
|
+
"default",
|
|
116
|
+
"fiveRetriesInFiveMinutes",
|
|
117
|
+
"none"
|
|
118
|
+
],
|
|
119
|
+
"description": "Retry policy passed to WebClient. Default: \"default\"."
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
"additionalProperties": false
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
"examples": {
|
|
126
|
+
"env": {
|
|
127
|
+
"push": {
|
|
128
|
+
"slackClient": {
|
|
129
|
+
"chat": {
|
|
130
|
+
"postMessage": {
|
|
131
|
+
"$code": "()=>Promise.resolve(m)"
|
|
132
|
+
},
|
|
133
|
+
"postEphemeral": {
|
|
134
|
+
"$code": "()=>Promise.resolve(u)"
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
"conversations": {
|
|
138
|
+
"open": {
|
|
139
|
+
"$code": "()=>Promise.resolve(h)"
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
"sendServer": {
|
|
144
|
+
"$code": "()=>Promise.resolve({ok:!0})"
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
"simulation": [
|
|
148
|
+
"call:slackClient.chat.postMessage",
|
|
149
|
+
"call:slackClient.chat.postEphemeral",
|
|
150
|
+
"call:slackClient.conversations.open",
|
|
151
|
+
"call:sendServer"
|
|
152
|
+
]
|
|
153
|
+
},
|
|
154
|
+
"step": {
|
|
155
|
+
"defaultBlocks": {
|
|
156
|
+
"in": {
|
|
157
|
+
"name": "lead submit",
|
|
158
|
+
"data": {
|
|
159
|
+
"name": "Acme",
|
|
160
|
+
"email": "sales@acme.test"
|
|
161
|
+
},
|
|
162
|
+
"context": {
|
|
163
|
+
"dev": [
|
|
164
|
+
"test",
|
|
165
|
+
1
|
|
166
|
+
]
|
|
167
|
+
},
|
|
168
|
+
"globals": {
|
|
169
|
+
"lang": "elb"
|
|
170
|
+
},
|
|
171
|
+
"custom": {
|
|
172
|
+
"completely": "random"
|
|
173
|
+
},
|
|
174
|
+
"user": {
|
|
175
|
+
"id": "us3r",
|
|
176
|
+
"device": "c00k13",
|
|
177
|
+
"session": "s3ss10n"
|
|
178
|
+
},
|
|
179
|
+
"nested": [
|
|
180
|
+
{
|
|
181
|
+
"entity": "child",
|
|
182
|
+
"data": {
|
|
183
|
+
"is": "subordinated"
|
|
184
|
+
},
|
|
185
|
+
"nested": [],
|
|
186
|
+
"context": {
|
|
187
|
+
"element": [
|
|
188
|
+
"child",
|
|
189
|
+
0
|
|
190
|
+
]
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
],
|
|
194
|
+
"consent": {
|
|
195
|
+
"functional": true
|
|
196
|
+
},
|
|
197
|
+
"id": "1700000600-gr0up-1",
|
|
198
|
+
"trigger": "test",
|
|
199
|
+
"entity": "lead",
|
|
200
|
+
"action": "submit",
|
|
201
|
+
"timestamp": 1700000600,
|
|
202
|
+
"timing": 3.14,
|
|
203
|
+
"group": "gr0up",
|
|
204
|
+
"count": 1,
|
|
205
|
+
"version": {
|
|
206
|
+
"source": "3.2.0",
|
|
207
|
+
"tagging": 1
|
|
208
|
+
},
|
|
209
|
+
"source": {
|
|
210
|
+
"type": "server",
|
|
211
|
+
"id": "crm",
|
|
212
|
+
"previous_id": ""
|
|
213
|
+
}
|
|
214
|
+
},
|
|
215
|
+
"mapping": {
|
|
216
|
+
"settings": {
|
|
217
|
+
"channel": "#growth"
|
|
218
|
+
}
|
|
219
|
+
},
|
|
220
|
+
"out": [
|
|
221
|
+
"slackClient.chat.postMessage",
|
|
222
|
+
{
|
|
223
|
+
"channel": "#growth",
|
|
224
|
+
"text": "lead submit",
|
|
225
|
+
"blocks": [
|
|
226
|
+
{
|
|
227
|
+
"type": "header",
|
|
228
|
+
"text": {
|
|
229
|
+
"type": "plain_text",
|
|
230
|
+
"text": "lead submit"
|
|
231
|
+
}
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
"type": "section",
|
|
235
|
+
"fields": [
|
|
236
|
+
{
|
|
237
|
+
"type": "mrkdwn",
|
|
238
|
+
"text": "*name:*\nAcme"
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
"type": "mrkdwn",
|
|
242
|
+
"text": "*email:*\nsales@acme.test"
|
|
243
|
+
}
|
|
244
|
+
]
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
"type": "context",
|
|
248
|
+
"elements": [
|
|
249
|
+
{
|
|
250
|
+
"type": "mrkdwn",
|
|
251
|
+
"text": "Source: crm"
|
|
252
|
+
}
|
|
253
|
+
]
|
|
254
|
+
}
|
|
255
|
+
],
|
|
256
|
+
"unfurl_links": false,
|
|
257
|
+
"unfurl_media": false,
|
|
258
|
+
"mrkdwn": true
|
|
259
|
+
}
|
|
260
|
+
]
|
|
261
|
+
},
|
|
262
|
+
"deployNotification": {
|
|
263
|
+
"in": {
|
|
264
|
+
"name": "deploy complete",
|
|
265
|
+
"data": {
|
|
266
|
+
"version": "1.4.2",
|
|
267
|
+
"environment": "prod"
|
|
268
|
+
},
|
|
269
|
+
"context": {
|
|
270
|
+
"dev": [
|
|
271
|
+
"test",
|
|
272
|
+
1
|
|
273
|
+
]
|
|
274
|
+
},
|
|
275
|
+
"globals": {
|
|
276
|
+
"lang": "elb"
|
|
277
|
+
},
|
|
278
|
+
"custom": {
|
|
279
|
+
"completely": "random"
|
|
280
|
+
},
|
|
281
|
+
"user": {
|
|
282
|
+
"id": "us3r",
|
|
283
|
+
"device": "c00k13",
|
|
284
|
+
"session": "s3ss10n"
|
|
285
|
+
},
|
|
286
|
+
"nested": [
|
|
287
|
+
{
|
|
288
|
+
"entity": "child",
|
|
289
|
+
"data": {
|
|
290
|
+
"is": "subordinated"
|
|
291
|
+
},
|
|
292
|
+
"nested": [],
|
|
293
|
+
"context": {
|
|
294
|
+
"element": [
|
|
295
|
+
"child",
|
|
296
|
+
0
|
|
297
|
+
]
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
],
|
|
301
|
+
"consent": {
|
|
302
|
+
"functional": true
|
|
303
|
+
},
|
|
304
|
+
"id": "1700000700-gr0up-1",
|
|
305
|
+
"trigger": "test",
|
|
306
|
+
"entity": "deploy",
|
|
307
|
+
"action": "complete",
|
|
308
|
+
"timestamp": 1700000700,
|
|
309
|
+
"timing": 3.14,
|
|
310
|
+
"group": "gr0up",
|
|
311
|
+
"count": 1,
|
|
312
|
+
"version": {
|
|
313
|
+
"source": "3.2.0",
|
|
314
|
+
"tagging": 1
|
|
315
|
+
},
|
|
316
|
+
"source": {
|
|
317
|
+
"type": "web",
|
|
318
|
+
"id": "https://localhost:80",
|
|
319
|
+
"previous_id": "http://remotehost:9001"
|
|
320
|
+
}
|
|
321
|
+
},
|
|
322
|
+
"settings": {
|
|
323
|
+
"webhookUrl": "https://hooks.slack.com/services/T00/B00/xxx"
|
|
324
|
+
},
|
|
325
|
+
"mapping": {
|
|
326
|
+
"settings": {
|
|
327
|
+
"text": ":rocket: Deployment complete: ${data.version} to ${data.environment}"
|
|
328
|
+
}
|
|
329
|
+
},
|
|
330
|
+
"out": [
|
|
331
|
+
"sendServer",
|
|
332
|
+
"https://hooks.slack.com/services/T00/B00/xxx",
|
|
333
|
+
{
|
|
334
|
+
"text": ":rocket: Deployment complete: 1.4.2 to prod",
|
|
335
|
+
"unfurl_links": false,
|
|
336
|
+
"unfurl_media": false,
|
|
337
|
+
"mrkdwn": true
|
|
338
|
+
}
|
|
339
|
+
]
|
|
340
|
+
},
|
|
341
|
+
"ephemeralMessage": {
|
|
342
|
+
"in": {
|
|
343
|
+
"name": "quota warning",
|
|
344
|
+
"data": {
|
|
345
|
+
"remaining": 5
|
|
346
|
+
},
|
|
347
|
+
"context": {
|
|
348
|
+
"dev": [
|
|
349
|
+
"test",
|
|
350
|
+
1
|
|
351
|
+
]
|
|
352
|
+
},
|
|
353
|
+
"globals": {
|
|
354
|
+
"lang": "elb"
|
|
355
|
+
},
|
|
356
|
+
"custom": {
|
|
357
|
+
"completely": "random"
|
|
358
|
+
},
|
|
359
|
+
"user": {
|
|
360
|
+
"id": "us3r",
|
|
361
|
+
"device": "c00k13",
|
|
362
|
+
"session": "s3ss10n"
|
|
363
|
+
},
|
|
364
|
+
"nested": [
|
|
365
|
+
{
|
|
366
|
+
"entity": "child",
|
|
367
|
+
"data": {
|
|
368
|
+
"is": "subordinated"
|
|
369
|
+
},
|
|
370
|
+
"nested": [],
|
|
371
|
+
"context": {
|
|
372
|
+
"element": [
|
|
373
|
+
"child",
|
|
374
|
+
0
|
|
375
|
+
]
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
],
|
|
379
|
+
"consent": {
|
|
380
|
+
"functional": true
|
|
381
|
+
},
|
|
382
|
+
"id": "1700000500-gr0up-1",
|
|
383
|
+
"trigger": "test",
|
|
384
|
+
"entity": "quota",
|
|
385
|
+
"action": "warning",
|
|
386
|
+
"timestamp": 1700000500,
|
|
387
|
+
"timing": 3.14,
|
|
388
|
+
"group": "gr0up",
|
|
389
|
+
"count": 1,
|
|
390
|
+
"version": {
|
|
391
|
+
"source": "3.2.0",
|
|
392
|
+
"tagging": 1
|
|
393
|
+
},
|
|
394
|
+
"source": {
|
|
395
|
+
"type": "web",
|
|
396
|
+
"id": "https://localhost:80",
|
|
397
|
+
"previous_id": "http://remotehost:9001"
|
|
398
|
+
}
|
|
399
|
+
},
|
|
400
|
+
"mapping": {
|
|
401
|
+
"settings": {
|
|
402
|
+
"channel": "#admin",
|
|
403
|
+
"ephemeral": true,
|
|
404
|
+
"user": "U-ADMIN-1",
|
|
405
|
+
"text": "Heads up: ${data.remaining} requests remaining"
|
|
406
|
+
}
|
|
407
|
+
},
|
|
408
|
+
"out": [
|
|
409
|
+
"slackClient.chat.postEphemeral",
|
|
410
|
+
{
|
|
411
|
+
"channel": "#admin",
|
|
412
|
+
"user": "U-ADMIN-1",
|
|
413
|
+
"text": "Heads up: 5 requests remaining",
|
|
414
|
+
"unfurl_links": false,
|
|
415
|
+
"unfurl_media": false,
|
|
416
|
+
"mrkdwn": true
|
|
417
|
+
}
|
|
418
|
+
]
|
|
419
|
+
},
|
|
420
|
+
"errorAlert": {
|
|
421
|
+
"in": {
|
|
422
|
+
"name": "error occur",
|
|
423
|
+
"data": {
|
|
424
|
+
"message": "Payment gateway timeout",
|
|
425
|
+
"code": "PGW_TIMEOUT",
|
|
426
|
+
"severity": "critical"
|
|
427
|
+
},
|
|
428
|
+
"context": {
|
|
429
|
+
"dev": [
|
|
430
|
+
"test",
|
|
431
|
+
1
|
|
432
|
+
]
|
|
433
|
+
},
|
|
434
|
+
"globals": {
|
|
435
|
+
"lang": "elb"
|
|
436
|
+
},
|
|
437
|
+
"custom": {
|
|
438
|
+
"completely": "random"
|
|
439
|
+
},
|
|
440
|
+
"user": {
|
|
441
|
+
"id": "us3r",
|
|
442
|
+
"device": "c00k13",
|
|
443
|
+
"session": "s3ss10n"
|
|
444
|
+
},
|
|
445
|
+
"nested": [
|
|
446
|
+
{
|
|
447
|
+
"entity": "child",
|
|
448
|
+
"data": {
|
|
449
|
+
"is": "subordinated"
|
|
450
|
+
},
|
|
451
|
+
"nested": [],
|
|
452
|
+
"context": {
|
|
453
|
+
"element": [
|
|
454
|
+
"child",
|
|
455
|
+
0
|
|
456
|
+
]
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
],
|
|
460
|
+
"consent": {
|
|
461
|
+
"functional": true
|
|
462
|
+
},
|
|
463
|
+
"id": "1700000200-gr0up-1",
|
|
464
|
+
"trigger": "test",
|
|
465
|
+
"entity": "error",
|
|
466
|
+
"action": "occur",
|
|
467
|
+
"timestamp": 1700000200,
|
|
468
|
+
"timing": 3.14,
|
|
469
|
+
"group": "gr0up",
|
|
470
|
+
"count": 1,
|
|
471
|
+
"version": {
|
|
472
|
+
"source": "3.2.0",
|
|
473
|
+
"tagging": 1
|
|
474
|
+
},
|
|
475
|
+
"source": {
|
|
476
|
+
"type": "web",
|
|
477
|
+
"id": "https://localhost:80",
|
|
478
|
+
"previous_id": "http://remotehost:9001"
|
|
479
|
+
}
|
|
480
|
+
},
|
|
481
|
+
"mapping": {
|
|
482
|
+
"settings": {
|
|
483
|
+
"channel": "#engineering-alerts",
|
|
484
|
+
"text": ":rotating_light: Error: ${data.message}"
|
|
485
|
+
}
|
|
486
|
+
},
|
|
487
|
+
"out": [
|
|
488
|
+
"slackClient.chat.postMessage",
|
|
489
|
+
{
|
|
490
|
+
"channel": "#engineering-alerts",
|
|
491
|
+
"text": ":rotating_light: Error: Payment gateway timeout",
|
|
492
|
+
"unfurl_links": false,
|
|
493
|
+
"unfurl_media": false,
|
|
494
|
+
"mrkdwn": true
|
|
495
|
+
}
|
|
496
|
+
]
|
|
497
|
+
},
|
|
498
|
+
"purchaseAlert": {
|
|
499
|
+
"in": {
|
|
500
|
+
"name": "order complete",
|
|
501
|
+
"data": {
|
|
502
|
+
"id": "ORD-500",
|
|
503
|
+
"total": 299.99,
|
|
504
|
+
"currency": "EUR",
|
|
505
|
+
"product": "Pro Plan"
|
|
506
|
+
},
|
|
507
|
+
"context": {
|
|
508
|
+
"shopping": [
|
|
509
|
+
"complete",
|
|
510
|
+
0
|
|
511
|
+
]
|
|
512
|
+
},
|
|
513
|
+
"globals": {
|
|
514
|
+
"pagegroup": "shop"
|
|
515
|
+
},
|
|
516
|
+
"custom": {
|
|
517
|
+
"completely": "random"
|
|
518
|
+
},
|
|
519
|
+
"user": {
|
|
520
|
+
"id": "buyer-42"
|
|
521
|
+
},
|
|
522
|
+
"nested": [
|
|
523
|
+
{
|
|
524
|
+
"entity": "product",
|
|
525
|
+
"data": {
|
|
526
|
+
"id": "ers",
|
|
527
|
+
"name": "Everyday Ruck Snack",
|
|
528
|
+
"color": "black",
|
|
529
|
+
"size": "l",
|
|
530
|
+
"price": 420
|
|
531
|
+
},
|
|
532
|
+
"context": {
|
|
533
|
+
"shopping": [
|
|
534
|
+
"complete",
|
|
535
|
+
0
|
|
536
|
+
]
|
|
537
|
+
},
|
|
538
|
+
"nested": []
|
|
539
|
+
},
|
|
540
|
+
{
|
|
541
|
+
"entity": "product",
|
|
542
|
+
"data": {
|
|
543
|
+
"id": "cc",
|
|
544
|
+
"name": "Cool Cap",
|
|
545
|
+
"size": "one size",
|
|
546
|
+
"price": 42
|
|
547
|
+
},
|
|
548
|
+
"context": {
|
|
549
|
+
"shopping": [
|
|
550
|
+
"complete",
|
|
551
|
+
0
|
|
552
|
+
]
|
|
553
|
+
},
|
|
554
|
+
"nested": []
|
|
555
|
+
},
|
|
556
|
+
{
|
|
557
|
+
"entity": "gift",
|
|
558
|
+
"data": {
|
|
559
|
+
"name": "Surprise"
|
|
560
|
+
},
|
|
561
|
+
"context": {
|
|
562
|
+
"shopping": [
|
|
563
|
+
"complete",
|
|
564
|
+
0
|
|
565
|
+
]
|
|
566
|
+
},
|
|
567
|
+
"nested": []
|
|
568
|
+
}
|
|
569
|
+
],
|
|
570
|
+
"consent": {
|
|
571
|
+
"functional": true
|
|
572
|
+
},
|
|
573
|
+
"id": "1700000100-gr0up-1",
|
|
574
|
+
"trigger": "load",
|
|
575
|
+
"entity": "order",
|
|
576
|
+
"action": "complete",
|
|
577
|
+
"timestamp": 1700000100,
|
|
578
|
+
"timing": 3.14,
|
|
579
|
+
"group": "gr0up",
|
|
580
|
+
"count": 1,
|
|
581
|
+
"version": {
|
|
582
|
+
"source": "3.2.0",
|
|
583
|
+
"tagging": 1
|
|
584
|
+
},
|
|
585
|
+
"source": {
|
|
586
|
+
"type": "web",
|
|
587
|
+
"id": "https://localhost:80",
|
|
588
|
+
"previous_id": "http://remotehost:9001"
|
|
589
|
+
}
|
|
590
|
+
},
|
|
591
|
+
"mapping": {
|
|
592
|
+
"settings": {
|
|
593
|
+
"channel": "#sales",
|
|
594
|
+
"text": ":moneybag: New order: ${data.id} - ${data.total} ${data.currency}"
|
|
595
|
+
}
|
|
596
|
+
},
|
|
597
|
+
"out": [
|
|
598
|
+
"slackClient.chat.postMessage",
|
|
599
|
+
{
|
|
600
|
+
"channel": "#sales",
|
|
601
|
+
"text": ":moneybag: New order: ORD-500 - 299.99 EUR",
|
|
602
|
+
"unfurl_links": false,
|
|
603
|
+
"unfurl_media": false,
|
|
604
|
+
"mrkdwn": true
|
|
605
|
+
}
|
|
606
|
+
]
|
|
607
|
+
},
|
|
608
|
+
"threadedCheckoutStep": {
|
|
609
|
+
"in": {
|
|
610
|
+
"name": "checkout step",
|
|
611
|
+
"data": {
|
|
612
|
+
"step": "payment",
|
|
613
|
+
"sessionTs": "1700000000.000050"
|
|
614
|
+
},
|
|
615
|
+
"context": {
|
|
616
|
+
"dev": [
|
|
617
|
+
"test",
|
|
618
|
+
1
|
|
619
|
+
]
|
|
620
|
+
},
|
|
621
|
+
"globals": {
|
|
622
|
+
"lang": "elb"
|
|
623
|
+
},
|
|
624
|
+
"custom": {
|
|
625
|
+
"completely": "random"
|
|
626
|
+
},
|
|
627
|
+
"user": {
|
|
628
|
+
"id": "us3r",
|
|
629
|
+
"device": "c00k13",
|
|
630
|
+
"session": "s3ss10n"
|
|
631
|
+
},
|
|
632
|
+
"nested": [
|
|
633
|
+
{
|
|
634
|
+
"entity": "child",
|
|
635
|
+
"data": {
|
|
636
|
+
"is": "subordinated"
|
|
637
|
+
},
|
|
638
|
+
"nested": [],
|
|
639
|
+
"context": {
|
|
640
|
+
"element": [
|
|
641
|
+
"child",
|
|
642
|
+
0
|
|
643
|
+
]
|
|
644
|
+
}
|
|
645
|
+
}
|
|
646
|
+
],
|
|
647
|
+
"consent": {
|
|
648
|
+
"functional": true
|
|
649
|
+
},
|
|
650
|
+
"id": "1700000400-gr0up-1",
|
|
651
|
+
"trigger": "test",
|
|
652
|
+
"entity": "checkout",
|
|
653
|
+
"action": "step",
|
|
654
|
+
"timestamp": 1700000400,
|
|
655
|
+
"timing": 3.14,
|
|
656
|
+
"group": "gr0up",
|
|
657
|
+
"count": 1,
|
|
658
|
+
"version": {
|
|
659
|
+
"source": "3.2.0",
|
|
660
|
+
"tagging": 1
|
|
661
|
+
},
|
|
662
|
+
"source": {
|
|
663
|
+
"type": "web",
|
|
664
|
+
"id": "https://localhost:80",
|
|
665
|
+
"previous_id": "http://remotehost:9001"
|
|
666
|
+
}
|
|
667
|
+
},
|
|
668
|
+
"mapping": {
|
|
669
|
+
"settings": {
|
|
670
|
+
"channel": "#sales",
|
|
671
|
+
"text": "Checkout step: ${data.step}",
|
|
672
|
+
"threadTs": "1700000000.000050",
|
|
673
|
+
"replyBroadcast": true
|
|
674
|
+
}
|
|
675
|
+
},
|
|
676
|
+
"out": [
|
|
677
|
+
"slackClient.chat.postMessage",
|
|
678
|
+
{
|
|
679
|
+
"channel": "#sales",
|
|
680
|
+
"text": "Checkout step: payment",
|
|
681
|
+
"thread_ts": "1700000000.000050",
|
|
682
|
+
"reply_broadcast": true,
|
|
683
|
+
"unfurl_links": false,
|
|
684
|
+
"unfurl_media": false,
|
|
685
|
+
"mrkdwn": true
|
|
686
|
+
}
|
|
687
|
+
]
|
|
688
|
+
},
|
|
689
|
+
"welcomeDM": {
|
|
690
|
+
"in": {
|
|
691
|
+
"name": "user signup",
|
|
692
|
+
"data": {
|
|
693
|
+
"plan": "enterprise"
|
|
694
|
+
},
|
|
695
|
+
"context": {
|
|
696
|
+
"dev": [
|
|
697
|
+
"test",
|
|
698
|
+
1
|
|
699
|
+
]
|
|
700
|
+
},
|
|
701
|
+
"globals": {
|
|
702
|
+
"lang": "elb"
|
|
703
|
+
},
|
|
704
|
+
"custom": {
|
|
705
|
+
"completely": "random"
|
|
706
|
+
},
|
|
707
|
+
"user": {
|
|
708
|
+
"id": "U-NEW-USER"
|
|
709
|
+
},
|
|
710
|
+
"nested": [
|
|
711
|
+
{
|
|
712
|
+
"entity": "child",
|
|
713
|
+
"data": {
|
|
714
|
+
"is": "subordinated"
|
|
715
|
+
},
|
|
716
|
+
"nested": [],
|
|
717
|
+
"context": {
|
|
718
|
+
"element": [
|
|
719
|
+
"child",
|
|
720
|
+
0
|
|
721
|
+
]
|
|
722
|
+
}
|
|
723
|
+
}
|
|
724
|
+
],
|
|
725
|
+
"consent": {
|
|
726
|
+
"functional": true
|
|
727
|
+
},
|
|
728
|
+
"id": "1700000300-gr0up-1",
|
|
729
|
+
"trigger": "test",
|
|
730
|
+
"entity": "user",
|
|
731
|
+
"action": "signup",
|
|
732
|
+
"timestamp": 1700000300,
|
|
733
|
+
"timing": 3.14,
|
|
734
|
+
"group": "gr0up",
|
|
735
|
+
"count": 1,
|
|
736
|
+
"version": {
|
|
737
|
+
"source": "3.2.0",
|
|
738
|
+
"tagging": 1
|
|
739
|
+
},
|
|
740
|
+
"source": {
|
|
741
|
+
"type": "web",
|
|
742
|
+
"id": "https://localhost:80",
|
|
743
|
+
"previous_id": "http://remotehost:9001"
|
|
744
|
+
}
|
|
745
|
+
},
|
|
746
|
+
"mapping": {
|
|
747
|
+
"settings": {
|
|
748
|
+
"dm": true,
|
|
749
|
+
"user": "U-NEW-USER",
|
|
750
|
+
"text": ":wave: Welcome aboard! You signed up for the ${data.plan} plan."
|
|
751
|
+
}
|
|
752
|
+
},
|
|
753
|
+
"out": [
|
|
754
|
+
[
|
|
755
|
+
"slackClient.conversations.open",
|
|
756
|
+
{
|
|
757
|
+
"users": "U-NEW-USER"
|
|
758
|
+
}
|
|
759
|
+
],
|
|
760
|
+
[
|
|
761
|
+
"slackClient.chat.postMessage",
|
|
762
|
+
{
|
|
763
|
+
"channel": "D-MOCK-DM",
|
|
764
|
+
"text": ":wave: Welcome aboard! You signed up for the enterprise plan.",
|
|
765
|
+
"unfurl_links": false,
|
|
766
|
+
"unfurl_media": false,
|
|
767
|
+
"mrkdwn": true
|
|
768
|
+
}
|
|
769
|
+
]
|
|
770
|
+
]
|
|
771
|
+
}
|
|
772
|
+
}
|
|
773
|
+
}
|
|
774
|
+
}
|