-
Notifications
You must be signed in to change notification settings - Fork 2
/
component.json
71 lines (71 loc) · 4.68 KB
/
component.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
{
"title": "Splitter",
"description": "Splits a message into multiple messages.",
"version": "1.5.1",
"actions": {
"split": {
"deprecated": true,
"title": "Split Message By Array",
"help": {
"description": "This action is deprecated, please use Split on JSONata Expression instead.",
"link": "/components/splitter/index.html#split-message-by-array"
},
"main": "./split.js",
"fields": {
"splitter": {
"label": "Split Property",
"viewClass": "SelectPropertyView",
"required": true
}
}
},
"splitOnJsonataExpression": {
"title": "Split on JSONata Expression",
"help": {
"description": "Evaluates the input based on a JSONata expression. Assuming the evaluation is an array, the array is split and emitted to multiple messages.",
"link": "/components/splitter/index.html#split-on-jsonata-expression"
},
"main": "./lib/actions/splitOnJsonata.js",
"fields": {
"expression": {
"label": "JSONata Expression",
"required": true,
"viewClass": "JSONataView"
}
}
},
"reassemble": {
"title": "Re-assemble Messages",
"help": {
"description": "Inverse operation from split: Re-assemble a group of messages that have previously been split",
"link": "/components/splitter/index.html#re-assemble-messages"
},
"main": "./lib/actions/reassemble.js",
"dynamicMetadata": true,
"fields": {
"mode": {
"viewClass": "SelectView",
"label": "Behavior",
"required": true,
"model": {
"groupSize": "Group on fixed amount of messages",
"timeout": "Group on timeout",
"groupSize&timeout": "Group on amount of messages or timeout"
},
"help": {
"description": "Options description:<br><br><b>Group on fixed amount of messages</b> - Messages keeps collecting continuously. Once the group size is reached, the group is emitted and the new group starts collecting immediately. If the number of incoming messages for a particular group is less than the defined group size, the group will be stored in the internal storage (Maester) and proceed collecting messages into the open group.<br><b>Group on timeout</b> - All incoming messages will be gathered until there are no more incoming messages within the specified timeframe (delay timer), at which point messages will be emitted for each group.<br><b>Group on amount of messages or timeout</b> - Specify both group size and delay timer. Once a group is complete, that group will be emitted. If there are no more incoming messages within the specified timeframe, partially completed groups will also be emitted."
},
"prompt": "Select behavior"
},
"emitAsArray": {
"viewClass": "CheckBoxView",
"label": "Emit result as array",
"prompt": "Select behavior",
"help": {
"description": "If selected, \"messageData\" will be array of messages without messages IDs<br><br>Example with unchecked:<br><div style=\"background-color:#E7E8EB;\">{<div style=\"margin-left:1em;\"><span style=\"color:#1d75b3;\">\"groupSize\":</span> <span style=\"color:#75438a;\">2</span>,<br><span style=\"color:#1d75b3;\">\"groupId\":</span> <span style=\"color:#b35e14;\">\"test22\"</span>,<br><span style=\"color:#1d75b3;\">\"messageData\":</span> {<div style=\"margin-left:1em;\"><span style=\"color:#1d75b3;\">\"d899b000-5455-4c7a-9781-f16203426b93\":</span> {<div style=\"margin-left:1em;\"><span style=\"color:#1d75b3;\">\"dataFromMessage\":</span> <span style=\"color:#b35e14;\">\"Message1\"</span></div>},<br><span style=\"color:#1d75b3;\">\"bdfca2b1-7aa7-444c-916d-3a2c17fc5dd6\":</span> {<div style=\"margin-left:1em;\"><span style=\"color:#1d75b3;\">\"dataFromMessage\":</span> <span style=\"color:#b35e14;\">\"Message2\"</span></div>}</div>}</div>}</div><br><br>Example with checked:<br><div style=\"background-color:#E7E8EB;\">{<div style=\"margin-left:1em;\"><span style=\"color:#1d75b3;\">\"groupSize\":</span> <span style=\"color:#75438a;\">2</span>,<br><span style=\"color:#1d75b3;\">\"groupId\":</span> <span style=\"color:#b35e14;\">\"test22\"</span>,<br><span style=\"color:#1d75b3;\">\"messageData\":</span> [<div style=\"margin-left:1em;\">{<div style=\"margin-left:1em;\"><span style=\"color:#1d75b3;\">\"dataFromMessage\":</span> <span style=\"color:#b35e14;\">\"Message1\"</span></div>},<br>{<div style=\"margin-left:1em;\"><span style=\"color:#1d75b3;\">\"dataFromMessage\":</span> <span style=\"color:#b35e14;\">\"Message2\"</span></div>}</div>]</div>}</div>"
}
}
}
}
}
}