@elastic.io/mcp 1.0.0
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 +191 -0
- package/README.md +171 -0
- package/dist/api/client.d.ts +12 -0
- package/dist/api/client.d.ts.map +1 -0
- package/dist/api/client.js +124 -0
- package/dist/api/client.js.map +1 -0
- package/dist/api/jsonapi.d.ts +28 -0
- package/dist/api/jsonapi.d.ts.map +1 -0
- package/dist/api/jsonapi.js +45 -0
- package/dist/api/jsonapi.js.map +1 -0
- package/dist/api/logger.d.ts +9 -0
- package/dist/api/logger.d.ts.map +1 -0
- package/dist/api/logger.js +46 -0
- package/dist/api/logger.js.map +1 -0
- package/dist/api/samples.d.ts +21 -0
- package/dist/api/samples.d.ts.map +1 -0
- package/dist/api/samples.js +465 -0
- package/dist/api/samples.js.map +1 -0
- package/dist/config.d.ts +16 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +49 -0
- package/dist/config.js.map +1 -0
- package/dist/embeddings/factory.d.ts +7 -0
- package/dist/embeddings/factory.d.ts.map +1 -0
- package/dist/embeddings/factory.js +25 -0
- package/dist/embeddings/factory.js.map +1 -0
- package/dist/embeddings/google.d.ts +19 -0
- package/dist/embeddings/google.d.ts.map +1 -0
- package/dist/embeddings/google.js +132 -0
- package/dist/embeddings/google.js.map +1 -0
- package/dist/embeddings/types.d.ts +27 -0
- package/dist/embeddings/types.d.ts.map +1 -0
- package/dist/embeddings/types.js +2 -0
- package/dist/embeddings/types.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +226 -0
- package/dist/index.js.map +1 -0
- package/dist/paths.d.ts +3 -0
- package/dist/paths.d.ts.map +1 -0
- package/dist/paths.js +10 -0
- package/dist/paths.js.map +1 -0
- package/dist/server.d.ts +29 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +361 -0
- package/dist/server.js.map +1 -0
- package/dist/tools/confirmation.d.ts +41 -0
- package/dist/tools/confirmation.d.ts.map +1 -0
- package/dist/tools/confirmation.js +120 -0
- package/dist/tools/confirmation.js.map +1 -0
- package/dist/tools/constants.d.ts +31 -0
- package/dist/tools/constants.d.ts.map +1 -0
- package/dist/tools/constants.js +85 -0
- package/dist/tools/constants.js.map +1 -0
- package/dist/tools/definitions.d.ts +3 -0
- package/dist/tools/definitions.d.ts.map +1 -0
- package/dist/tools/definitions.js +883 -0
- package/dist/tools/definitions.js.map +1 -0
- package/dist/tools/handlers/auth.d.ts +3 -0
- package/dist/tools/handlers/auth.d.ts.map +1 -0
- package/dist/tools/handlers/auth.js +540 -0
- package/dist/tools/handlers/auth.js.map +1 -0
- package/dist/tools/handlers/component.d.ts +3 -0
- package/dist/tools/handlers/component.d.ts.map +1 -0
- package/dist/tools/handlers/component.js +145 -0
- package/dist/tools/handlers/component.js.map +1 -0
- package/dist/tools/handlers/data-sample.d.ts +3 -0
- package/dist/tools/handlers/data-sample.d.ts.map +1 -0
- package/dist/tools/handlers/data-sample.js +51 -0
- package/dist/tools/handlers/data-sample.js.map +1 -0
- package/dist/tools/handlers/dynamic.d.ts +3 -0
- package/dist/tools/handlers/dynamic.d.ts.map +1 -0
- package/dist/tools/handlers/dynamic.js +110 -0
- package/dist/tools/handlers/dynamic.js.map +1 -0
- package/dist/tools/handlers/flow.d.ts +9 -0
- package/dist/tools/handlers/flow.d.ts.map +1 -0
- package/dist/tools/handlers/flow.js +899 -0
- package/dist/tools/handlers/flow.js.map +1 -0
- package/dist/tools/handlers/log.d.ts +3 -0
- package/dist/tools/handlers/log.d.ts.map +1 -0
- package/dist/tools/handlers/log.js +61 -0
- package/dist/tools/handlers/log.js.map +1 -0
- package/dist/tools/handlers/organization.d.ts +3 -0
- package/dist/tools/handlers/organization.d.ts.map +1 -0
- package/dist/tools/handlers/organization.js +39 -0
- package/dist/tools/handlers/organization.js.map +1 -0
- package/dist/tools/handlers/raw.d.ts +3 -0
- package/dist/tools/handlers/raw.d.ts.map +1 -0
- package/dist/tools/handlers/raw.js +77 -0
- package/dist/tools/handlers/raw.js.map +1 -0
- package/dist/tools/handlers/search.d.ts +3 -0
- package/dist/tools/handlers/search.d.ts.map +1 -0
- package/dist/tools/handlers/search.js +82 -0
- package/dist/tools/handlers/search.js.map +1 -0
- package/dist/tools/handlers/session.d.ts +3 -0
- package/dist/tools/handlers/session.d.ts.map +1 -0
- package/dist/tools/handlers/session.js +15 -0
- package/dist/tools/handlers/session.js.map +1 -0
- package/dist/tools/handlers.d.ts +12 -0
- package/dist/tools/handlers.d.ts.map +1 -0
- package/dist/tools/handlers.js +197 -0
- package/dist/tools/handlers.js.map +1 -0
- package/dist/tools/helpers.d.ts +45 -0
- package/dist/tools/helpers.d.ts.map +1 -0
- package/dist/tools/helpers.js +195 -0
- package/dist/tools/helpers.js.map +1 -0
- package/dist/tools/types.d.ts +32 -0
- package/dist/tools/types.d.ts.map +1 -0
- package/dist/tools/types.js +2 -0
- package/dist/tools/types.js.map +1 -0
- package/dist/tools/validation.d.ts +24 -0
- package/dist/tools/validation.d.ts.map +1 -0
- package/dist/tools/validation.js +748 -0
- package/dist/tools/validation.js.map +1 -0
- package/dist/types/index.d.ts +47 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +2 -0
- package/dist/types/index.js.map +1 -0
- package/dist/vectorstore/factory.d.ts +7 -0
- package/dist/vectorstore/factory.d.ts.map +1 -0
- package/dist/vectorstore/factory.js +25 -0
- package/dist/vectorstore/factory.js.map +1 -0
- package/dist/vectorstore/qdrant.d.ts +11 -0
- package/dist/vectorstore/qdrant.d.ts.map +1 -0
- package/dist/vectorstore/qdrant.js +107 -0
- package/dist/vectorstore/qdrant.js.map +1 -0
- package/dist/vectorstore/types.d.ts +28 -0
- package/dist/vectorstore/types.d.ts.map +1 -0
- package/dist/vectorstore/types.js +2 -0
- package/dist/vectorstore/types.js.map +1 -0
- package/package.json +51 -0
- package/resources/docs/component-test-scenarios.md +2468 -0
- package/resources/docs/credential-validation-gaps.md +35 -0
- package/resources/docs/debug-issues.md +71 -0
- package/resources/docs/deployment-and-scaling.md +136 -0
- package/resources/docs/flow-building-guide.md +565 -0
- package/resources/docs/packaging-plan.md +84 -0
- package/resources/docs/standardized-components-guide.md +66 -0
- package/resources/docs/system-instructions.md +177 -0
- package/resources/docs/unique-components.md +60 -0
- package/resources/docs/verified-creds-flow-ids.md +193 -0
- package/resources/flow-examples/batch-flow-1-collect.json +51 -0
- package/resources/flow-examples/batch-flow-2-process.json +70 -0
- package/resources/flow-examples/code-component-transform.json +65 -0
- package/resources/flow-examples/code-component-trigger.json +52 -0
- package/resources/flow-examples/code-component-with-credentials-trigger.json +53 -0
- package/resources/flow-examples/code-component-with-credentials.json +67 -0
- package/resources/flow-examples/filter-step.json +63 -0
- package/resources/flow-examples/polling-sync-trigger.json +50 -0
- package/resources/flow-examples/router-branching.json +94 -0
- package/resources/flow-examples/splitter-re-assemble.json +72 -0
- package/resources/flow-examples/splitter-split.json +68 -0
- package/resources/flow-examples/timer-query-action-sync.json +68 -0
- package/resources/flow-examples/webhook-async-sync.json +49 -0
- package/resources/flow-examples/webhook-request-reply.json +63 -0
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{
|
|
2
|
+
"data": {
|
|
3
|
+
"type": "flow",
|
|
4
|
+
"attributes": {
|
|
5
|
+
"name": "Abstract Batch Flow 1 - Collect",
|
|
6
|
+
"description": "Flow 1 of the two-flow batching pattern. Webhook receives real-time messages and appends them to a batch using the Add Message to Batch action under a shared Correlation ID.",
|
|
7
|
+
"type": "ordinary",
|
|
8
|
+
"graph": {
|
|
9
|
+
"nodes": [
|
|
10
|
+
{
|
|
11
|
+
"id": "step_1",
|
|
12
|
+
"component_id": "webhook_component_id",
|
|
13
|
+
"command": "elasticio/webhook:receive@latestVersionId",
|
|
14
|
+
"name": "Webhook Trigger"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"id": "step_2",
|
|
18
|
+
"component_id": "batch_component_id",
|
|
19
|
+
"command": "elasticio/batch-component:addToBatch@latestVersionId",
|
|
20
|
+
"name": "Add Message to Batch",
|
|
21
|
+
"fields": {
|
|
22
|
+
"correlationId": "example_orders_batch",
|
|
23
|
+
"maxWaitTime": "600000",
|
|
24
|
+
"maxItemsNumber": "10",
|
|
25
|
+
"maxSize": "100000"
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
],
|
|
29
|
+
"edges": [
|
|
30
|
+
{
|
|
31
|
+
"id": "mapper:step_1:step_2",
|
|
32
|
+
"source": "step_1",
|
|
33
|
+
"target": "step_2",
|
|
34
|
+
"config": {
|
|
35
|
+
"mapper_type": "jsonata",
|
|
36
|
+
"mapper": "{\n \"item\": $getPassthrough().step_1.body\n}"
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
]
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"relationships": {
|
|
43
|
+
"workspace": {
|
|
44
|
+
"data": {
|
|
45
|
+
"type": "workspace",
|
|
46
|
+
"id": "YOUR_WORKSPACE_ID"
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
{
|
|
2
|
+
"data": {
|
|
3
|
+
"type": "flow",
|
|
4
|
+
"attributes": {
|
|
5
|
+
"name": "Abstract Batch Flow 2 - Process",
|
|
6
|
+
"description": "Flow 2 of the two-flow batching pattern. Activates when batch triggers on max records/timeout, generating a CSV attachment and sending it via email.",
|
|
7
|
+
"type": "ordinary",
|
|
8
|
+
"graph": {
|
|
9
|
+
"nodes": [
|
|
10
|
+
{
|
|
11
|
+
"id": "step_1",
|
|
12
|
+
"component_id": "batch_component_id",
|
|
13
|
+
"command": "elasticio/batch-component:getReadyBatches@latestVersionId",
|
|
14
|
+
"name": "Get Ready Batches Trigger",
|
|
15
|
+
"fields": {
|
|
16
|
+
"correlationId": "example_orders_batch",
|
|
17
|
+
"maxWaitTime": "600000",
|
|
18
|
+
"maxItemsNumber": "50",
|
|
19
|
+
"maxSize": "100000"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"id": "step_2",
|
|
24
|
+
"component_id": "csv_component_id",
|
|
25
|
+
"command": "elasticio/csv:generate@latestVersionId",
|
|
26
|
+
"name": "Generate CSV Document",
|
|
27
|
+
"fields": {
|
|
28
|
+
"writeAttachment": true
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"id": "step_3",
|
|
33
|
+
"component_id": "email_component_id",
|
|
34
|
+
"command": "elasticio/email:send@latestVersionId",
|
|
35
|
+
"name": "Email Batch Report",
|
|
36
|
+
"credentials_id": "EMAIL_CREDENTIAL_ID_PLACEHOLDER"
|
|
37
|
+
}
|
|
38
|
+
],
|
|
39
|
+
"edges": [
|
|
40
|
+
{
|
|
41
|
+
"id": "mapper:step_1:step_2",
|
|
42
|
+
"source": "step_1",
|
|
43
|
+
"target": "step_2",
|
|
44
|
+
"config": {
|
|
45
|
+
"mapper_type": "jsonata",
|
|
46
|
+
"mapper": "{\n \"inputArray\": $getPassthrough().step_1.body.batchItems\n}"
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"id": "mapper:step_2:step_3",
|
|
51
|
+
"source": "step_2",
|
|
52
|
+
"target": "step_3",
|
|
53
|
+
"config": {
|
|
54
|
+
"mapper_type": "jsonata",
|
|
55
|
+
"mapper": "{\n \"to\": \"user@example.com\",\n \"subject\": \"Batch Process Report\",\n \"attachments\": [\n $getPassthrough().step_2.body.attachmentUrl\n ]\n}"
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
]
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
"relationships": {
|
|
62
|
+
"workspace": {
|
|
63
|
+
"data": {
|
|
64
|
+
"type": "workspace",
|
|
65
|
+
"id": "YOUR_WORKSPACE_ID"
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
{
|
|
2
|
+
"data": {
|
|
3
|
+
"type": "flow",
|
|
4
|
+
"attributes": {
|
|
5
|
+
"name": "Abstract Code Component Transform",
|
|
6
|
+
"description": "Custom NodeJS Code component for running JavaScript code inside the flow. Ideal for complex data transformations, filtering, and cleaning.",
|
|
7
|
+
"type": "ordinary",
|
|
8
|
+
"graph": {
|
|
9
|
+
"nodes": [
|
|
10
|
+
{
|
|
11
|
+
"id": "step_1",
|
|
12
|
+
"component_id": "webhook_component_id",
|
|
13
|
+
"command": "elasticio/webhook:receive@latestVersionId",
|
|
14
|
+
"name": "Webhook Trigger"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"id": "step_2",
|
|
18
|
+
"component_id": "aaa1111111bbb2222222ccc04",
|
|
19
|
+
"command": "elasticio/code:execute@latestVersionId",
|
|
20
|
+
"name": "JS Data Transformation",
|
|
21
|
+
"fields": {
|
|
22
|
+
"code": "async function run(msg, cfg, snapshot) {\n this.logger.info('Received message:', JSON.stringify(msg));\n const rawData = msg.body;\n if (!rawData || !rawData.items) return;\n \n // Clean and transform data in JavaScript\n const cleanItems = rawData.items\n .filter(item => item.price > 0)\n .map(item => ({\n sku: item.sku.toUpperCase(),\n totalValue: item.quantity * item.price\n }));\n\n await this.emit('data', { body: { items: cleanItems } });\n}"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"id": "step_3",
|
|
27
|
+
"component_id": "generic_target_component_id",
|
|
28
|
+
"command": "generic-target-team/generic-target-repo:upsertObject@latestVersionId",
|
|
29
|
+
"name": "Upsert Data",
|
|
30
|
+
"credentials_id": "TARGET_CREDENTIAL_ID_PLACEHOLDER"
|
|
31
|
+
}
|
|
32
|
+
],
|
|
33
|
+
"edges": [
|
|
34
|
+
{
|
|
35
|
+
"id": "mapper:step_1:step_2",
|
|
36
|
+
"source": "step_1",
|
|
37
|
+
"target": "step_2",
|
|
38
|
+
"config": {
|
|
39
|
+
"mapper": {}
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"id": "mapper:step_2:step_3",
|
|
44
|
+
"source": "step_2",
|
|
45
|
+
"target": "step_3",
|
|
46
|
+
"config": {
|
|
47
|
+
"mapper_type": "jsonata",
|
|
48
|
+
"mapper": {
|
|
49
|
+
"items": "$getPassthrough().step_2.body.items"
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
]
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
"relationships": {
|
|
57
|
+
"workspace": {
|
|
58
|
+
"data": {
|
|
59
|
+
"type": "workspace",
|
|
60
|
+
"id": "YOUR_WORKSPACE_ID"
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"data": {
|
|
3
|
+
"type": "flow",
|
|
4
|
+
"attributes": {
|
|
5
|
+
"name": "Abstract Code Component Trigger",
|
|
6
|
+
"description": "Custom NodeJS Code component trigger for generating events/messages programmatically or on a schedule, and processing them downstream.",
|
|
7
|
+
"type": "ordinary",
|
|
8
|
+
"graph": {
|
|
9
|
+
"nodes": [
|
|
10
|
+
{
|
|
11
|
+
"id": "step_1",
|
|
12
|
+
"component_id": "code_component_id",
|
|
13
|
+
"command": "elasticio/code:executeTrigger@latestVersionId",
|
|
14
|
+
"name": "JS Trigger Execution",
|
|
15
|
+
"fields": {
|
|
16
|
+
"code": "// Please note only Node.js code is supported here\nasync function run(msg, cfg, snapshot) {\n this.logger.info('Running custom code trigger...');\n const body = { \n message: 'Hello from code trigger!',\n timestamp: new Date().toISOString()\n };\n await this.emit('data', { body });\n}"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"id": "step_2",
|
|
21
|
+
"component_id": "generic_target_component_id",
|
|
22
|
+
"command": "generic-target-team/generic-target-repo:createObject@latestVersionId",
|
|
23
|
+
"name": "Create Target Record",
|
|
24
|
+
"credentials_id": "TARGET_CREDENTIAL_ID_PLACEHOLDER"
|
|
25
|
+
}
|
|
26
|
+
],
|
|
27
|
+
"edges": [
|
|
28
|
+
{
|
|
29
|
+
"id": "mapper:step_1:step_2",
|
|
30
|
+
"source": "step_1",
|
|
31
|
+
"target": "step_2",
|
|
32
|
+
"config": {
|
|
33
|
+
"mapper_type": "jsonata",
|
|
34
|
+
"mapper": {
|
|
35
|
+
"recordName": "$getPassthrough().\"step_1\".body.message",
|
|
36
|
+
"details": "$getPassthrough().\"step_1\".body.timestamp"
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
]
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"relationships": {
|
|
44
|
+
"workspace": {
|
|
45
|
+
"data": {
|
|
46
|
+
"type": "workspace",
|
|
47
|
+
"id": "YOUR_WORKSPACE_ID"
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"data": {
|
|
3
|
+
"type": "flow",
|
|
4
|
+
"attributes": {
|
|
5
|
+
"name": "Abstract Code Component with Credentials Trigger",
|
|
6
|
+
"description": "Custom NodeJS Code component trigger with authorization support for generating messages using credentials/API keys.",
|
|
7
|
+
"type": "ordinary",
|
|
8
|
+
"graph": {
|
|
9
|
+
"nodes": [
|
|
10
|
+
{
|
|
11
|
+
"id": "step_1",
|
|
12
|
+
"component_id": "code_with_credentials_component_id",
|
|
13
|
+
"command": "elasticio/code-component-with-credentials:executeTrigger@latestVersionId",
|
|
14
|
+
"name": "JS Trigger with Credentials",
|
|
15
|
+
"credentials_id": "MY_REST_CREDENTIAL_ID_PLACEHOLDER",
|
|
16
|
+
"fields": {
|
|
17
|
+
"code": "// Please note only Node.js code is supported here\nasync function run(msg, cfg, snapshot) {\n this.logger.info('Executing custom code trigger with credentials...');\n \n const headers = {};\n if (cfg.credentials && cfg.credentials.headerName) {\n headers[cfg.credentials.headerName] = cfg.credentials.headerValue;\n }\n\n const url = 'https://api.example.com/v1/trigger-resource';\n const { data } = await axios.get(url, { headers });\n \n await this.emit('data', { body: data });\n}"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"id": "step_2",
|
|
22
|
+
"component_id": "generic_target_component_id",
|
|
23
|
+
"command": "generic-target-team/generic-target-repo:createObject@latestVersionId",
|
|
24
|
+
"name": "Create Record",
|
|
25
|
+
"credentials_id": "TARGET_CREDENTIAL_ID_PLACEHOLDER"
|
|
26
|
+
}
|
|
27
|
+
],
|
|
28
|
+
"edges": [
|
|
29
|
+
{
|
|
30
|
+
"id": "mapper:step_1:step_2",
|
|
31
|
+
"source": "step_1",
|
|
32
|
+
"target": "step_2",
|
|
33
|
+
"config": {
|
|
34
|
+
"mapper_type": "jsonata",
|
|
35
|
+
"mapper": {
|
|
36
|
+
"recordId": "$getPassthrough().\"step_1\".body.id",
|
|
37
|
+
"description": "$getPassthrough().\"step_1\".body.name"
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
]
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"relationships": {
|
|
45
|
+
"workspace": {
|
|
46
|
+
"data": {
|
|
47
|
+
"type": "workspace",
|
|
48
|
+
"id": "YOUR_WORKSPACE_ID"
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
{
|
|
2
|
+
"data": {
|
|
3
|
+
"type": "flow",
|
|
4
|
+
"attributes": {
|
|
5
|
+
"name": "Abstract Code Component with Credentials",
|
|
6
|
+
"description": "Custom NodeJS Code component with authorization support. Shows how to use the pre-injected axios library and dynamic credential values from the cfg.credentials context.",
|
|
7
|
+
"type": "ordinary",
|
|
8
|
+
"graph": {
|
|
9
|
+
"nodes": [
|
|
10
|
+
{
|
|
11
|
+
"id": "step_1",
|
|
12
|
+
"component_id": "aaa1111111bbb2222222ccc01",
|
|
13
|
+
"command": "elasticio/simple-trigger-component:timer@latestVersionId",
|
|
14
|
+
"name": "Timer Trigger"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"id": "step_2",
|
|
18
|
+
"component_id": "aaa1111111bbb2222222ccc07",
|
|
19
|
+
"command": "elasticio/code-component-with-credentials:execute@latestVersionId",
|
|
20
|
+
"name": "Query API with Credentials",
|
|
21
|
+
"credentials_id": "MY_REST_CREDENTIAL_ID_PLACEHOLDER",
|
|
22
|
+
"fields": {
|
|
23
|
+
"code": "async function run(msg, cfg, snapshot) {\n this.logger.info('Executing HTTP Request with credentials...');\n \n // Access credentials dynamically from config context (e.g. API Key parameters)\n const headers = {};\n if (cfg.credentials && cfg.credentials.headerName) {\n headers[cfg.credentials.headerName] = cfg.credentials.headerValue;\n }\n\n const url = 'https://api.example.com/v1/resource';\n \n // Use pre-injected axios library to invoke external API\n const { data } = await axios.get(url, { headers });\n \n await this.emit('data', { body: data });\n}"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"id": "step_3",
|
|
28
|
+
"component_id": "generic_target_component_id",
|
|
29
|
+
"command": "generic-target-team/generic-target-repo:createObject@latestVersionId",
|
|
30
|
+
"name": "Create Record",
|
|
31
|
+
"credentials_id": "TARGET_CREDENTIAL_ID_PLACEHOLDER"
|
|
32
|
+
}
|
|
33
|
+
],
|
|
34
|
+
"edges": [
|
|
35
|
+
{
|
|
36
|
+
"id": "mapper:step_1:step_2",
|
|
37
|
+
"source": "step_1",
|
|
38
|
+
"target": "step_2",
|
|
39
|
+
"config": {
|
|
40
|
+
"mapper": {}
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"id": "mapper:step_2:step_3",
|
|
45
|
+
"source": "step_2",
|
|
46
|
+
"target": "step_3",
|
|
47
|
+
"config": {
|
|
48
|
+
"mapper_type": "jsonata",
|
|
49
|
+
"mapper": {
|
|
50
|
+
"recordId": "$getPassthrough().step_2.body.id",
|
|
51
|
+
"description": "$getPassthrough().step_2.body.name"
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
]
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"relationships": {
|
|
59
|
+
"workspace": {
|
|
60
|
+
"data": {
|
|
61
|
+
"type": "workspace",
|
|
62
|
+
"id": "YOUR_WORKSPACE_ID"
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
{
|
|
2
|
+
"data": {
|
|
3
|
+
"type": "flow",
|
|
4
|
+
"attributes": {
|
|
5
|
+
"name": "Abstract Filter Step",
|
|
6
|
+
"description": "Conditional flow execution using a standalone Filter step component to validate and stop processing when conditions are not met.",
|
|
7
|
+
"type": "ordinary",
|
|
8
|
+
"graph": {
|
|
9
|
+
"nodes": [
|
|
10
|
+
{
|
|
11
|
+
"id": "step_1",
|
|
12
|
+
"component_id": "webhook_component_id",
|
|
13
|
+
"command": "elasticio/webhook:receive@latestVersionId",
|
|
14
|
+
"name": "Webhook Trigger"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"id": "step_2",
|
|
18
|
+
"component_id": "filter_component_id",
|
|
19
|
+
"command": "elasticio/filter:SimpleJSONataFilter@latestVersionId",
|
|
20
|
+
"name": "Validate Modified Date",
|
|
21
|
+
"fields": {
|
|
22
|
+
"expression": "($dateSalesforce := $moment($getPassthrough().step_1.body.sfModified); $dateSQL := $moment($getPassthrough().step_1.body.sqlModified); $dateSalesforce.isBefore($dateSQL))"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"id": "step_3",
|
|
27
|
+
"component_id": "generic_target_component_id",
|
|
28
|
+
"command": "generic-target-team/generic-target-repo:updateObject@latestVersionId",
|
|
29
|
+
"name": "Update CRM Target",
|
|
30
|
+
"credentials_id": "TARGET_CREDENTIAL_ID_PLACEHOLDER"
|
|
31
|
+
}
|
|
32
|
+
],
|
|
33
|
+
"edges": [
|
|
34
|
+
{
|
|
35
|
+
"id": "mapper:step_1:step_2",
|
|
36
|
+
"source": "step_1",
|
|
37
|
+
"target": "step_2",
|
|
38
|
+
"config": {
|
|
39
|
+
"mapper": {}
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"id": "mapper:step_2:step_3",
|
|
44
|
+
"source": "step_2",
|
|
45
|
+
"target": "step_3",
|
|
46
|
+
"config": {
|
|
47
|
+
"mapper_type": "jsonata",
|
|
48
|
+
"mapper": "{\n \"id\": $getPassthrough().step_1.body.id,\n \"name\": $getPassthrough().step_1.body.name\n}"
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
]
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"relationships": {
|
|
55
|
+
"workspace": {
|
|
56
|
+
"data": {
|
|
57
|
+
"type": "workspace",
|
|
58
|
+
"id": "YOUR_WORKSPACE_ID"
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
{
|
|
2
|
+
"data": {
|
|
3
|
+
"type": "flow",
|
|
4
|
+
"attributes": {
|
|
5
|
+
"name": "Abstract Polling Trigger Sync",
|
|
6
|
+
"description": "Sync new or updated items from a source polling trigger directly to a target destination action.",
|
|
7
|
+
"type": "ordinary",
|
|
8
|
+
"cron": "*/15 * * * *",
|
|
9
|
+
"graph": {
|
|
10
|
+
"nodes": [
|
|
11
|
+
{
|
|
12
|
+
"id": "step_1",
|
|
13
|
+
"component_id": "generic_source_component_id",
|
|
14
|
+
"command": "generic-source-team/generic-source-repo:getNewAndUpdatedObjectsPolling@latestVersionId",
|
|
15
|
+
"name": "Source Delta Trigger",
|
|
16
|
+
"fields": {
|
|
17
|
+
"objectType": "Customer"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"id": "step_2",
|
|
22
|
+
"component_id": "generic_target_component_id",
|
|
23
|
+
"command": "generic-target-team/generic-target-repo:upsertObject@latestVersionId",
|
|
24
|
+
"name": "Target Upsert Action",
|
|
25
|
+
"credentials_id": "TARGET_CREDENTIAL_ID_PLACEHOLDER"
|
|
26
|
+
}
|
|
27
|
+
],
|
|
28
|
+
"edges": [
|
|
29
|
+
{
|
|
30
|
+
"id": "mapper:step_1:step_2",
|
|
31
|
+
"source": "step_1",
|
|
32
|
+
"target": "step_2",
|
|
33
|
+
"config": {
|
|
34
|
+
"mapper_type": "jsonata",
|
|
35
|
+
"mapper": "{\n \"externalId\": $getPassthrough().step_1.body.id,\n \"name\": $getPassthrough().step_1.body.firstName & \" \" & $getPassthrough().step_1.body.lastName,\n \"email\": $getPassthrough().step_1.body.emailAddress\n}"
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
]
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"relationships": {
|
|
42
|
+
"workspace": {
|
|
43
|
+
"data": {
|
|
44
|
+
"type": "workspace",
|
|
45
|
+
"id": "YOUR_WORKSPACE_ID"
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
{
|
|
2
|
+
"data": {
|
|
3
|
+
"type": "flow",
|
|
4
|
+
"attributes": {
|
|
5
|
+
"name": "Abstract Router Branching",
|
|
6
|
+
"description": "Content-based routing branching using a router and JSONata edge conditions to execute different paths based on incoming data attributes, including a default fallback branch.",
|
|
7
|
+
"type": "ordinary",
|
|
8
|
+
"graph": {
|
|
9
|
+
"nodes": [
|
|
10
|
+
{
|
|
11
|
+
"id": "step_1",
|
|
12
|
+
"component_id": "webhook_component_id",
|
|
13
|
+
"command": "elasticio/webhook-component:receive@latestVersionId",
|
|
14
|
+
"name": "Event Input"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"id": "step_2",
|
|
18
|
+
"component_id": "router_component_id",
|
|
19
|
+
"command": "elasticio/router:route@latestVersionId",
|
|
20
|
+
"name": "Content Router"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"id": "step_3",
|
|
24
|
+
"component_id": "generic_target_component_id",
|
|
25
|
+
"command": "generic-target-team/generic-target-repo:createObject@latestVersionId",
|
|
26
|
+
"name": "Create Record Branch",
|
|
27
|
+
"credentials_id": "TARGET_CREDENTIAL_ID_PLACEHOLDER"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"id": "step_4",
|
|
31
|
+
"component_id": "generic_target_component_id",
|
|
32
|
+
"command": "generic-target-team/generic-target-repo:updateObject@latestVersionId",
|
|
33
|
+
"name": "Update Record Branch",
|
|
34
|
+
"credentials_id": "TARGET_CREDENTIAL_ID_PLACEHOLDER"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"id": "step_5",
|
|
38
|
+
"component_id": "utility_log_component_id",
|
|
39
|
+
"command": "elasticio/utility-component:log@latestVersionId",
|
|
40
|
+
"name": "Default Fallback Branch"
|
|
41
|
+
}
|
|
42
|
+
],
|
|
43
|
+
"edges": [
|
|
44
|
+
{
|
|
45
|
+
"id": "mapper:step_1:step_2",
|
|
46
|
+
"source": "step_1",
|
|
47
|
+
"target": "step_2",
|
|
48
|
+
"config": {
|
|
49
|
+
"mapper": {}
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"id": "mapper:step_2:step_3",
|
|
54
|
+
"source": "step_2",
|
|
55
|
+
"target": "step_3",
|
|
56
|
+
"config": {
|
|
57
|
+
"mapper_type": "jsonata",
|
|
58
|
+
"mapper": "{\n \"name\": $getPassthrough().step_1.body.name\n}",
|
|
59
|
+
"condition": "$getPassthrough().step_1.body.action = \"create\""
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"id": "mapper:step_2:step_4",
|
|
64
|
+
"source": "step_2",
|
|
65
|
+
"target": "step_4",
|
|
66
|
+
"config": {
|
|
67
|
+
"mapper_type": "jsonata",
|
|
68
|
+
"mapper": "{\n \"id\": $getPassthrough().step_1.body.id,\n \"name\": $getPassthrough().step_1.body.name\n}",
|
|
69
|
+
"condition": "$getPassthrough().step_1.body.action = \"update\""
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"id": "mapper:step_2:step_5",
|
|
74
|
+
"source": "step_2",
|
|
75
|
+
"target": "step_5",
|
|
76
|
+
"config": {
|
|
77
|
+
"mapper_type": "jsonata",
|
|
78
|
+
"mapper": "{\n \"message\": \"No matching routing conditions found for action: \" & $getPassthrough().step_1.body.action\n}",
|
|
79
|
+
"condition": null
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
]
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
"relationships": {
|
|
86
|
+
"workspace": {
|
|
87
|
+
"data": {
|
|
88
|
+
"type": "workspace",
|
|
89
|
+
"id": "YOUR_WORKSPACE_ID"
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
{
|
|
2
|
+
"data": {
|
|
3
|
+
"type": "flow",
|
|
4
|
+
"attributes": {
|
|
5
|
+
"name": "Abstract Splitter Re-Assemble",
|
|
6
|
+
"description": "Aggregating multiple individual events/messages over a specified duration into a single grouped array using the Splitter component's Re-assemble action.",
|
|
7
|
+
"type": "ordinary",
|
|
8
|
+
"graph": {
|
|
9
|
+
"nodes": [
|
|
10
|
+
{
|
|
11
|
+
"id": "step_1",
|
|
12
|
+
"component_id": "webhook_component_id",
|
|
13
|
+
"command": "elasticio/webhook-component:receive@latestVersionId",
|
|
14
|
+
"name": "Webhook Trigger"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"id": "step_2",
|
|
18
|
+
"component_id": "splitter_component_id",
|
|
19
|
+
"command": "elasticio/splitter:reassemble@latestVersionId",
|
|
20
|
+
"name": "Re-assemble Messages",
|
|
21
|
+
"fields": {
|
|
22
|
+
"mode": "groupSize"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"id": "step_3",
|
|
27
|
+
"component_id": "email_component_id",
|
|
28
|
+
"command": "elasticio/email:send@latestVersionId",
|
|
29
|
+
"name": "Send Summary Email",
|
|
30
|
+
"credentials_id": "EMAIL_CREDENTIAL_ID_PLACEHOLDER"
|
|
31
|
+
}
|
|
32
|
+
],
|
|
33
|
+
"edges": [
|
|
34
|
+
{
|
|
35
|
+
"id": "mapper:step_1:step_2",
|
|
36
|
+
"source": "step_1",
|
|
37
|
+
"target": "step_2",
|
|
38
|
+
"config": {
|
|
39
|
+
"mapper_type": "jsonata",
|
|
40
|
+
"mapper": {
|
|
41
|
+
"groupId": "\"my-group-id\"",
|
|
42
|
+
"groupSize": "10",
|
|
43
|
+
"messageData": "$getPassthrough().step_1.body"
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"id": "mapper:step_2:step_3",
|
|
49
|
+
"source": "step_2",
|
|
50
|
+
"target": "step_3",
|
|
51
|
+
"config": {
|
|
52
|
+
"mapper_type": "jsonata",
|
|
53
|
+
"mapper": {
|
|
54
|
+
"to": "\"user@example.com\"",
|
|
55
|
+
"subject": "\"Grouped Messages Summary\"",
|
|
56
|
+
"textBody": "\"Assembled messages: \" & $string($getPassthrough().step_2.body.messageData)"
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
]
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
"relationships": {
|
|
64
|
+
"workspace": {
|
|
65
|
+
"data": {
|
|
66
|
+
"type": "workspace",
|
|
67
|
+
"id": "YOUR_WORKSPACE_ID"
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|