@elastic.io/mcp 1.0.0-beta

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.
Files changed (174) hide show
  1. package/LICENSE +191 -0
  2. package/README.md +173 -0
  3. package/README.npm.md +173 -0
  4. package/dist/api/client.d.ts +12 -0
  5. package/dist/api/client.d.ts.map +1 -0
  6. package/dist/api/client.js +129 -0
  7. package/dist/api/client.js.map +1 -0
  8. package/dist/api/jsonapi.d.ts +21 -0
  9. package/dist/api/jsonapi.d.ts.map +1 -0
  10. package/dist/api/jsonapi.js +32 -0
  11. package/dist/api/jsonapi.js.map +1 -0
  12. package/dist/api/logger.d.ts +8 -0
  13. package/dist/api/logger.d.ts.map +1 -0
  14. package/dist/api/logger.js +43 -0
  15. package/dist/api/logger.js.map +1 -0
  16. package/dist/api/samples.d.ts +15 -0
  17. package/dist/api/samples.d.ts.map +1 -0
  18. package/dist/api/samples.js +465 -0
  19. package/dist/api/samples.js.map +1 -0
  20. package/dist/api/verification.d.ts +6 -0
  21. package/dist/api/verification.d.ts.map +1 -0
  22. package/dist/api/verification.js +71 -0
  23. package/dist/api/verification.js.map +1 -0
  24. package/dist/cli.d.ts +3 -0
  25. package/dist/cli.d.ts.map +1 -0
  26. package/dist/cli.js +9 -0
  27. package/dist/cli.js.map +1 -0
  28. package/dist/config.d.ts +15 -0
  29. package/dist/config.d.ts.map +1 -0
  30. package/dist/config.js +44 -0
  31. package/dist/config.js.map +1 -0
  32. package/dist/embeddings/factory.d.ts +7 -0
  33. package/dist/embeddings/factory.d.ts.map +1 -0
  34. package/dist/embeddings/factory.js +25 -0
  35. package/dist/embeddings/factory.js.map +1 -0
  36. package/dist/embeddings/google.d.ts +19 -0
  37. package/dist/embeddings/google.d.ts.map +1 -0
  38. package/dist/embeddings/google.js +132 -0
  39. package/dist/embeddings/google.js.map +1 -0
  40. package/dist/embeddings/types.d.ts +27 -0
  41. package/dist/embeddings/types.d.ts.map +1 -0
  42. package/dist/embeddings/types.js +2 -0
  43. package/dist/embeddings/types.js.map +1 -0
  44. package/dist/index.d.ts +3 -0
  45. package/dist/index.d.ts.map +1 -0
  46. package/dist/index.js +227 -0
  47. package/dist/index.js.map +1 -0
  48. package/dist/paths.d.ts +2 -0
  49. package/dist/paths.d.ts.map +1 -0
  50. package/dist/paths.js +10 -0
  51. package/dist/paths.js.map +1 -0
  52. package/dist/server.d.ts +29 -0
  53. package/dist/server.d.ts.map +1 -0
  54. package/dist/server.js +385 -0
  55. package/dist/server.js.map +1 -0
  56. package/dist/setup.d.ts +3 -0
  57. package/dist/setup.d.ts.map +1 -0
  58. package/dist/setup.js +338 -0
  59. package/dist/setup.js.map +1 -0
  60. package/dist/tools/confirmation.d.ts +37 -0
  61. package/dist/tools/confirmation.d.ts.map +1 -0
  62. package/dist/tools/confirmation.js +120 -0
  63. package/dist/tools/confirmation.js.map +1 -0
  64. package/dist/tools/constants.d.ts +28 -0
  65. package/dist/tools/constants.d.ts.map +1 -0
  66. package/dist/tools/constants.js +92 -0
  67. package/dist/tools/constants.js.map +1 -0
  68. package/dist/tools/definitions.d.ts +3 -0
  69. package/dist/tools/definitions.d.ts.map +1 -0
  70. package/dist/tools/definitions.js +915 -0
  71. package/dist/tools/definitions.js.map +1 -0
  72. package/dist/tools/flow-build.d.ts +18 -0
  73. package/dist/tools/flow-build.d.ts.map +1 -0
  74. package/dist/tools/flow-build.js +295 -0
  75. package/dist/tools/flow-build.js.map +1 -0
  76. package/dist/tools/flow-evidence.d.ts +62 -0
  77. package/dist/tools/flow-evidence.d.ts.map +1 -0
  78. package/dist/tools/flow-evidence.js +128 -0
  79. package/dist/tools/flow-evidence.js.map +1 -0
  80. package/dist/tools/flow-state-machine.d.ts +69 -0
  81. package/dist/tools/flow-state-machine.d.ts.map +1 -0
  82. package/dist/tools/flow-state-machine.js +292 -0
  83. package/dist/tools/flow-state-machine.js.map +1 -0
  84. package/dist/tools/handlers/auth.d.ts +3 -0
  85. package/dist/tools/handlers/auth.d.ts.map +1 -0
  86. package/dist/tools/handlers/auth.js +410 -0
  87. package/dist/tools/handlers/auth.js.map +1 -0
  88. package/dist/tools/handlers/component.d.ts +3 -0
  89. package/dist/tools/handlers/component.d.ts.map +1 -0
  90. package/dist/tools/handlers/component.js +165 -0
  91. package/dist/tools/handlers/component.js.map +1 -0
  92. package/dist/tools/handlers/data-sample.d.ts +3 -0
  93. package/dist/tools/handlers/data-sample.d.ts.map +1 -0
  94. package/dist/tools/handlers/data-sample.js +83 -0
  95. package/dist/tools/handlers/data-sample.js.map +1 -0
  96. package/dist/tools/handlers/dynamic.d.ts +3 -0
  97. package/dist/tools/handlers/dynamic.d.ts.map +1 -0
  98. package/dist/tools/handlers/dynamic.js +139 -0
  99. package/dist/tools/handlers/dynamic.js.map +1 -0
  100. package/dist/tools/handlers/flow.d.ts +9 -0
  101. package/dist/tools/handlers/flow.d.ts.map +1 -0
  102. package/dist/tools/handlers/flow.js +427 -0
  103. package/dist/tools/handlers/flow.js.map +1 -0
  104. package/dist/tools/handlers/log.d.ts +3 -0
  105. package/dist/tools/handlers/log.d.ts.map +1 -0
  106. package/dist/tools/handlers/log.js +92 -0
  107. package/dist/tools/handlers/log.js.map +1 -0
  108. package/dist/tools/handlers/organization.d.ts +3 -0
  109. package/dist/tools/handlers/organization.d.ts.map +1 -0
  110. package/dist/tools/handlers/organization.js +39 -0
  111. package/dist/tools/handlers/organization.js.map +1 -0
  112. package/dist/tools/handlers/raw.d.ts +3 -0
  113. package/dist/tools/handlers/raw.d.ts.map +1 -0
  114. package/dist/tools/handlers/raw.js +80 -0
  115. package/dist/tools/handlers/raw.js.map +1 -0
  116. package/dist/tools/handlers/search.d.ts +3 -0
  117. package/dist/tools/handlers/search.d.ts.map +1 -0
  118. package/dist/tools/handlers/search.js +105 -0
  119. package/dist/tools/handlers/search.js.map +1 -0
  120. package/dist/tools/handlers/session.d.ts +3 -0
  121. package/dist/tools/handlers/session.d.ts.map +1 -0
  122. package/dist/tools/handlers/session.js +22 -0
  123. package/dist/tools/handlers/session.js.map +1 -0
  124. package/dist/tools/handlers.d.ts +12 -0
  125. package/dist/tools/handlers.d.ts.map +1 -0
  126. package/dist/tools/handlers.js +202 -0
  127. package/dist/tools/handlers.js.map +1 -0
  128. package/dist/tools/helpers.d.ts +44 -0
  129. package/dist/tools/helpers.d.ts.map +1 -0
  130. package/dist/tools/helpers.js +195 -0
  131. package/dist/tools/helpers.js.map +1 -0
  132. package/dist/tools/types.d.ts +39 -0
  133. package/dist/tools/types.d.ts.map +1 -0
  134. package/dist/tools/types.js +2 -0
  135. package/dist/tools/types.js.map +1 -0
  136. package/dist/tools/validation.d.ts +35 -0
  137. package/dist/tools/validation.d.ts.map +1 -0
  138. package/dist/tools/validation.js +800 -0
  139. package/dist/tools/validation.js.map +1 -0
  140. package/dist/types/index.d.ts +47 -0
  141. package/dist/types/index.d.ts.map +1 -0
  142. package/dist/types/index.js +2 -0
  143. package/dist/types/index.js.map +1 -0
  144. package/dist/vectorstore/factory.d.ts +7 -0
  145. package/dist/vectorstore/factory.d.ts.map +1 -0
  146. package/dist/vectorstore/factory.js +25 -0
  147. package/dist/vectorstore/factory.js.map +1 -0
  148. package/dist/vectorstore/qdrant.d.ts +11 -0
  149. package/dist/vectorstore/qdrant.d.ts.map +1 -0
  150. package/dist/vectorstore/qdrant.js +107 -0
  151. package/dist/vectorstore/qdrant.js.map +1 -0
  152. package/dist/vectorstore/types.d.ts +28 -0
  153. package/dist/vectorstore/types.d.ts.map +1 -0
  154. package/dist/vectorstore/types.js +2 -0
  155. package/dist/vectorstore/types.js.map +1 -0
  156. package/package.json +66 -0
  157. package/resources/docs/flow-building-guide.md +581 -0
  158. package/resources/docs/rest-api-pagination.md +58 -0
  159. package/resources/docs/standardized-components-guide.md +66 -0
  160. package/resources/docs/system-instructions.md +207 -0
  161. package/resources/flow-examples/batch-flow-1-collect.json +51 -0
  162. package/resources/flow-examples/batch-flow-2-process.json +70 -0
  163. package/resources/flow-examples/code-component-transform.json +65 -0
  164. package/resources/flow-examples/code-component-trigger.json +52 -0
  165. package/resources/flow-examples/code-component-with-credentials-trigger.json +53 -0
  166. package/resources/flow-examples/code-component-with-credentials.json +67 -0
  167. package/resources/flow-examples/filter-step.json +63 -0
  168. package/resources/flow-examples/polling-sync-trigger.json +50 -0
  169. package/resources/flow-examples/router-branching.json +94 -0
  170. package/resources/flow-examples/splitter-re-assemble.json +72 -0
  171. package/resources/flow-examples/splitter-split.json +68 -0
  172. package/resources/flow-examples/timer-query-action-sync.json +68 -0
  173. package/resources/flow-examples/webhook-async-sync.json +49 -0
  174. package/resources/flow-examples/webhook-request-reply.json +63 -0
@@ -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
+ }
@@ -0,0 +1,68 @@
1
+ {
2
+ "data": {
3
+ "type": "flow",
4
+ "attributes": {
5
+ "name": "Abstract Splitter Split",
6
+ "description": "Splitting a list/array of items into multiple individual messages to process downstream steps one-by-one (looping).",
7
+ "type": "ordinary",
8
+ "graph": {
9
+ "nodes": [
10
+ {
11
+ "id": "step_1",
12
+ "component_id": "generic_source_component_id",
13
+ "command": "generic-source-team/generic-source-repo:listObjects@latestVersionId",
14
+ "name": "Get Customer Array",
15
+ "credentials_id": "SOURCE_CREDENTIAL_ID_PLACEHOLDER"
16
+ },
17
+ {
18
+ "id": "step_2",
19
+ "component_id": "splitter_component_id",
20
+ "command": "elasticio/splitter:splitOnJsonataExpression@latestVersionId",
21
+ "name": "Split List",
22
+ "fields": {
23
+ "expression": "$getPassthrough().step_1.body.customers"
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 Single Contact",
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_type": "jsonata",
41
+ "mapper": {}
42
+ }
43
+ },
44
+ {
45
+ "id": "mapper:step_2:step_3",
46
+ "source": "step_2",
47
+ "target": "step_3",
48
+ "config": {
49
+ "mapper_type": "jsonata",
50
+ "mapper": {
51
+ "name": "$getPassthrough().step_2.body.name",
52
+ "email": "$getPassthrough().step_2.body.email"
53
+ }
54
+ }
55
+ }
56
+ ]
57
+ }
58
+ },
59
+ "relationships": {
60
+ "workspace": {
61
+ "data": {
62
+ "type": "workspace",
63
+ "id": "YOUR_WORKSPACE_ID"
64
+ }
65
+ }
66
+ }
67
+ }
68
+ }
@@ -0,0 +1,68 @@
1
+ {
2
+ "data": {
3
+ "type": "flow",
4
+ "attributes": {
5
+ "name": "Abstract Timer Query Sync",
6
+ "description": "Scheduled sync using Simple Trigger (Timer) passing the lastPoll timestamp to a custom query action (e.g. SQL select).",
7
+ "type": "ordinary",
8
+ "cron": "0 * * * *",
9
+ "graph": {
10
+ "nodes": [
11
+ {
12
+ "id": "step_1",
13
+ "component_id": "aaa1111111bbb2222222ccc01",
14
+ "command": "elasticio/simple-trigger-component:timer@latestVersionId",
15
+ "name": "Timer Schedule"
16
+ },
17
+ {
18
+ "id": "step_2",
19
+ "component_id": "jdbc_component_id",
20
+ "command": "elasticio/jdbc:newSelectAction@latestVersionId",
21
+ "name": "Query Source Database",
22
+ "credentials_id": "DATABASE_CREDENTIAL_ID_PLACEHOLDER",
23
+ "fields": {
24
+ "sqlQuery": "SELECT * FROM customers WHERE updated_at > @last_modified_at:string"
25
+ }
26
+ },
27
+ {
28
+ "id": "step_3",
29
+ "component_id": "generic_target_component_id",
30
+ "command": "generic-target-team/generic-target-repo:upsertObject@latestVersionId",
31
+ "name": "Sync to Target",
32
+ "secret_id": "TARGET_SECRET_ID_PLACEHOLDER"
33
+ }
34
+ ],
35
+ "edges": [
36
+ {
37
+ "id": "mapper:step_1:step_2",
38
+ "source": "step_1",
39
+ "target": "step_2",
40
+ "config": {
41
+ "mapper_type": "jsonata",
42
+ "mapper": {
43
+ "last_modified_at": "$getPassthrough().step_1.body.lastPoll"
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": "{\n \"Name\": $getPassthrough().step_2.body.name,\n \"Email\": $getPassthrough().step_2.body.email,\n \"External_ID__c\": $getPassthrough().step_2.body.id\n}"
54
+ }
55
+ }
56
+ ]
57
+ }
58
+ },
59
+ "relationships": {
60
+ "workspace": {
61
+ "data": {
62
+ "type": "workspace",
63
+ "id": "YOUR_WORKSPACE_ID"
64
+ }
65
+ }
66
+ }
67
+ }
68
+ }
@@ -0,0 +1,49 @@
1
+ {
2
+ "data": {
3
+ "type": "flow",
4
+ "attributes": {
5
+ "name": "Abstract Webhook Async Sync",
6
+ "description": "Asynchronous webhook receiver mapping incoming payloads directly to a target action.",
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 Event Trigger"
15
+ },
16
+ {
17
+ "id": "step_2",
18
+ "component_id": "generic_target_component_id",
19
+ "command": "generic-target-team/generic-target-repo:createObject@latestVersionId",
20
+ "name": "Create Target Record",
21
+ "credentials_id": "TARGET_CREDENTIAL_ID_PLACEHOLDER"
22
+ }
23
+ ],
24
+ "edges": [
25
+ {
26
+ "id": "mapper:step_1:step_2",
27
+ "source": "step_1",
28
+ "target": "step_2",
29
+ "config": {
30
+ "mapper_type": "jsonata",
31
+ "mapper": {
32
+ "recordName": "$getPassthrough().step_1.body.eventName",
33
+ "details": "$getPassthrough().step_1.body.description"
34
+ }
35
+ }
36
+ }
37
+ ]
38
+ }
39
+ },
40
+ "relationships": {
41
+ "workspace": {
42
+ "data": {
43
+ "type": "workspace",
44
+ "id": "YOUR_WORKSPACE_ID"
45
+ }
46
+ }
47
+ }
48
+ }
49
+ }
@@ -0,0 +1,63 @@
1
+ {
2
+ "data": {
3
+ "type": "flow",
4
+ "attributes": {
5
+ "name": "Abstract Webhook Request Reply",
6
+ "description": "Synchronous Request-Reply REST API flow. Starts with a Webhook Trigger, executes query/lookup steps, and sends a custom HTTP response via the HTTP Reply component.",
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": "HTTP API Request"
15
+ },
16
+ {
17
+ "id": "step_2",
18
+ "component_id": "crm_component_id",
19
+ "command": "generic-target-team/generic-target-repo:lookupObjectById@latestVersionId",
20
+ "name": "Lookup CRM Contact",
21
+ "secret_id": "CRM_SECRET_ID_PLACEHOLDER"
22
+ },
23
+ {
24
+ "id": "step_3",
25
+ "component_id": "http_reply_component_id",
26
+ "command": "elasticio/request-reply:reply@latestVersionId",
27
+ "name": "Send API Response"
28
+ }
29
+ ],
30
+ "edges": [
31
+ {
32
+ "id": "mapper:step_1:step_2",
33
+ "source": "step_1",
34
+ "target": "step_2",
35
+ "config": {
36
+ "mapper_type": "jsonata",
37
+ "mapper": {
38
+ "id": "$getPassthrough().step_1.body.query.contactId"
39
+ }
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 \"statusCode\": 200,\n \"contentType\": \"application/json\",\n \"responseBody\": $string({\n \"success\": true,\n \"contact\": {\n \"id\": $getPassthrough().step_2.body.Id,\n \"name\": $getPassthrough().step_2.body.Name,\n \"phone\": $getPassthrough().step_2.body.Phone\n }\n })\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
+ }