@bpmnkit/core 1.1.0 → 1.3.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/README.md +31 -0
- package/dist/bpmn/bpmn-builder.d.ts +8 -0
- package/dist/bpmn/bpmn-builder.js +6 -2
- package/dist/bpmn/compact.d.ts +37 -5
- package/dist/bpmn/compact.js +218 -30
- package/dist/bpmn/connector-line.d.ts +46 -0
- package/dist/bpmn/connector-line.js +135 -0
- package/dist/bpmn/optimize/patterns.js +4 -3
- package/dist/bpmn/process-delta.d.ts +91 -0
- package/dist/bpmn/process-delta.js +259 -0
- package/dist/bpmn/process-text-writer.d.ts +63 -0
- package/dist/bpmn/process-text-writer.js +202 -0
- package/dist/bpmn/process-text.d.ts +200 -0
- package/dist/bpmn/process-text.js +1568 -0
- package/dist/bpmn/rest-connector.d.ts +6 -0
- package/dist/bpmn/rest-connector.js +6 -0
- package/dist/bpmn/secrets.d.ts +15 -0
- package/dist/bpmn/secrets.js +59 -0
- package/dist/bpmn/utils.js +4 -0
- package/dist/bpmn/zeebe-extensions.d.ts +10 -0
- package/dist/bpmn/zeebe-extensions.js +7 -0
- package/dist/connectors/aliases.d.ts +21 -0
- package/dist/connectors/aliases.js +272 -0
- package/dist/connectors/api.d.ts +118 -0
- package/dist/connectors/api.js +280 -0
- package/dist/connectors/apply-element.d.ts +59 -0
- package/dist/connectors/apply-element.js +385 -0
- package/dist/connectors/apply.d.ts +136 -0
- package/dist/connectors/apply.js +352 -0
- package/dist/connectors/cards.d.ts +96 -0
- package/dist/connectors/cards.js +306 -0
- package/dist/connectors/catalog.d.ts +79 -0
- package/dist/connectors/catalog.js +209 -0
- package/dist/connectors/index.d.ts +33 -0
- package/dist/connectors/index.js +24 -0
- package/dist/connectors/lines.d.ts +108 -0
- package/dist/connectors/lines.js +568 -0
- package/dist/connectors/select.d.ts +85 -0
- package/dist/connectors/select.js +419 -0
- package/dist/connectors/template-types.d.ts +188 -0
- package/dist/connectors/template-types.js +6 -0
- package/dist/connectors/templates/bpmnkit.d.ts +12 -0
- package/dist/connectors/templates/bpmnkit.js +186 -0
- package/dist/connectors/templates/generated.d.ts +3 -0
- package/dist/connectors/templates/generated.js +95885 -0
- package/dist/connectors/validate.d.ts +66 -0
- package/dist/connectors/validate.js +271 -0
- package/dist/index.d.ts +11 -1
- package/dist/index.js +5 -0
- package/package.json +5 -1
|
@@ -37,6 +37,12 @@ export interface RestConnectorConfig {
|
|
|
37
37
|
/** Retry backoff duration (ISO 8601 duration, e.g. "PT0S"). */
|
|
38
38
|
retryBackoff?: string;
|
|
39
39
|
}
|
|
40
|
+
/**
|
|
41
|
+
* Version of the bundled `io.camunda.connectors.HttpJson.v2` template in
|
|
42
|
+
* `@bpmnkit/connectors`. An editor matches a stamped element to its template by
|
|
43
|
+
* id and version, so this must follow the bundled one; a test there checks it.
|
|
44
|
+
*/
|
|
45
|
+
export declare const REST_CONNECTOR_TEMPLATE_VERSION = "18";
|
|
40
46
|
/** Convert a REST connector config into Zeebe IO mapping inputs. */
|
|
41
47
|
export declare function restConnectorToIoMappingInputs(config: RestConnectorConfig): ZeebeIoMappingEntry[];
|
|
42
48
|
/** Get the Zeebe task definition type for REST connectors. */
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
const REST_CONNECTOR_TYPE = "io.camunda:http-json:1";
|
|
2
|
+
/**
|
|
3
|
+
* Version of the bundled `io.camunda.connectors.HttpJson.v2` template in
|
|
4
|
+
* `@bpmnkit/connectors`. An editor matches a stamped element to its template by
|
|
5
|
+
* id and version, so this must follow the bundled one; a test there checks it.
|
|
6
|
+
*/
|
|
7
|
+
export const REST_CONNECTOR_TEMPLATE_VERSION = "18";
|
|
2
8
|
const DEFAULT_TIMEOUT = 20;
|
|
3
9
|
const DEFAULT_RETRIES = "3";
|
|
4
10
|
/** Convert a REST connector config into Zeebe IO mapping inputs. */
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { BpmnDefinitions } from "./bpmn-model.js";
|
|
2
|
+
/** A secret a diagram needs, and the elements that use it. */
|
|
3
|
+
export interface DiagramSecret {
|
|
4
|
+
/** The name to create in the cluster's secrets: `SLACK_TOKEN`. */
|
|
5
|
+
name: string;
|
|
6
|
+
/** Elements whose configuration reads it, in diagram order. */
|
|
7
|
+
elementIds: string[];
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* The secrets a diagram's configuration reads — connector inputs, headers,
|
|
11
|
+
* properties and message subscriptions — so whoever deploys it knows what to
|
|
12
|
+
* create in the cluster first. Sorted by name.
|
|
13
|
+
*/
|
|
14
|
+
export declare function listSecrets(definitions: BpmnDefinitions): DiagramSecret[];
|
|
15
|
+
//# sourceMappingURL=secrets.d.ts.map
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/** `{{secrets.NAME}}`, `camunda.secrets.NAME` and `` camunda.secrets.`NAME` ``. */
|
|
2
|
+
const SECRET = /\{\{\s*secrets\.([\w-]+)\s*\}\}|camunda\.secrets\.(?:([\w-]+)|`([^`]+)`)/g;
|
|
3
|
+
function scan(text, found) {
|
|
4
|
+
if (text === undefined || !text.includes("secrets."))
|
|
5
|
+
return;
|
|
6
|
+
for (const m of text.matchAll(SECRET)) {
|
|
7
|
+
const name = m[1] ?? m[2] ?? m[3];
|
|
8
|
+
if (name)
|
|
9
|
+
found(name);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
function scanXml(elements, found) {
|
|
13
|
+
for (const x of elements) {
|
|
14
|
+
for (const value of Object.values(x.attributes))
|
|
15
|
+
scan(value, found);
|
|
16
|
+
scan(x.text, found);
|
|
17
|
+
scanXml(x.children, found);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* The secrets a diagram's configuration reads — connector inputs, headers,
|
|
22
|
+
* properties and message subscriptions — so whoever deploys it knows what to
|
|
23
|
+
* create in the cluster first. Sorted by name.
|
|
24
|
+
*/
|
|
25
|
+
export function listSecrets(definitions) {
|
|
26
|
+
const byName = new Map();
|
|
27
|
+
const add = (elementId) => (name) => {
|
|
28
|
+
const ids = byName.get(name) ?? new Set();
|
|
29
|
+
ids.add(elementId);
|
|
30
|
+
byName.set(name, ids);
|
|
31
|
+
};
|
|
32
|
+
const messageUsers = new Map();
|
|
33
|
+
const walk = (elements) => {
|
|
34
|
+
for (const el of elements) {
|
|
35
|
+
scanXml(el.extensionElements, add(el.id));
|
|
36
|
+
const ref = "messageRef" in el && typeof el.messageRef === "string"
|
|
37
|
+
? el.messageRef
|
|
38
|
+
: "eventDefinitions" in el
|
|
39
|
+
? el.eventDefinitions.find((d) => d.type === "message")?.messageRef
|
|
40
|
+
: undefined;
|
|
41
|
+
if (ref !== undefined)
|
|
42
|
+
messageUsers.set(ref, [...(messageUsers.get(ref) ?? []), el.id]);
|
|
43
|
+
if ("flowElements" in el && Array.isArray(el.flowElements))
|
|
44
|
+
walk(el.flowElements);
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
for (const process of definitions.processes)
|
|
48
|
+
walk(process.flowElements);
|
|
49
|
+
// A message's correlation key is configured on the message, used by the events that wait for it
|
|
50
|
+
for (const message of definitions.messages) {
|
|
51
|
+
for (const id of messageUsers.get(message.id) ?? [message.id]) {
|
|
52
|
+
scanXml(message.extensionElements ?? [], add(id));
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
return [...byName.entries()]
|
|
56
|
+
.sort(([a], [b]) => a.localeCompare(b))
|
|
57
|
+
.map(([name, ids]) => ({ name, elementIds: [...ids] }));
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=secrets.js.map
|
package/dist/bpmn/utils.js
CHANGED
|
@@ -194,6 +194,10 @@ export function getZeebeExtensions(extensionElements) {
|
|
|
194
194
|
const formDefinition = { formId: formDefEl.attributes.formId ?? "" };
|
|
195
195
|
ext.formDefinition = formDefinition;
|
|
196
196
|
}
|
|
197
|
+
const agentDefEl = findChild(extensionElements, "agentDefinition");
|
|
198
|
+
if (agentDefEl) {
|
|
199
|
+
ext.agentDefinition = { agentType: agentDefEl.attributes.agentType ?? "" };
|
|
200
|
+
}
|
|
197
201
|
const calledDecEl = findChild(extensionElements, "calledDecision");
|
|
198
202
|
if (calledDecEl) {
|
|
199
203
|
const calledDecision = {
|
|
@@ -41,6 +41,14 @@ export interface ZeebeAdHoc {
|
|
|
41
41
|
/** FEEL expression selecting which child element IDs to activate (BPMN-native mode). */
|
|
42
42
|
activeElementsCollection?: string;
|
|
43
43
|
}
|
|
44
|
+
/**
|
|
45
|
+
* Zeebe agent definition (`zeebe:agentDefinition`, Camunda 8.10+): marks a
|
|
46
|
+
* service task or ad-hoc sub-process as an AI agent the engine runs, e.g.
|
|
47
|
+
* `aiAgentTask` or `aiAgentSubProcess`.
|
|
48
|
+
*/
|
|
49
|
+
export interface ZeebeAgentDefinition {
|
|
50
|
+
agentType: string;
|
|
51
|
+
}
|
|
44
52
|
/** Zeebe form definition extension for user tasks. */
|
|
45
53
|
export interface ZeebeFormDefinition {
|
|
46
54
|
/** ID of the Camunda Form linked to this user task. */
|
|
@@ -79,6 +87,8 @@ export interface ZeebeExtensions {
|
|
|
79
87
|
taskHeaders?: ZeebeTaskHeaders;
|
|
80
88
|
properties?: ZeebeProperties;
|
|
81
89
|
adHoc?: ZeebeAdHoc;
|
|
90
|
+
/** AI agent marker (zeebe:agentDefinition). */
|
|
91
|
+
agentDefinition?: ZeebeAgentDefinition;
|
|
82
92
|
/** Camunda Form linked to a user task (zeebe:formDefinition). */
|
|
83
93
|
formDefinition?: ZeebeFormDefinition;
|
|
84
94
|
/** DMN decision invoked by a business rule task (zeebe:calledDecision). */
|
|
@@ -72,6 +72,13 @@ export function zeebeExtensionsToXmlElements(extensions) {
|
|
|
72
72
|
attrs.activeElementsCollection = activeElementsCollection;
|
|
73
73
|
elements.push({ name: "zeebe:adHoc", attributes: attrs, children: [] });
|
|
74
74
|
}
|
|
75
|
+
if (extensions.agentDefinition) {
|
|
76
|
+
elements.push({
|
|
77
|
+
name: "zeebe:agentDefinition",
|
|
78
|
+
attributes: { agentType: extensions.agentDefinition.agentType },
|
|
79
|
+
children: [],
|
|
80
|
+
});
|
|
81
|
+
}
|
|
75
82
|
if (extensions.userTask) {
|
|
76
83
|
elements.push({ name: "zeebe:userTask", attributes: {}, children: [] });
|
|
77
84
|
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A short, stable name for each bundled connector template, and the dropdowns
|
|
3
|
+
* that choose its operation. Both are what a model writes and reads in
|
|
4
|
+
* generation (`slack chat.postMessage`), so they are written down here rather
|
|
5
|
+
* than derived: a template renamed upstream must not change what an old
|
|
6
|
+
* answer means.
|
|
7
|
+
*
|
|
8
|
+
* Tests check that every bundled template has an entry, that aliases are
|
|
9
|
+
* unique, and that every listed dropdown exists. A template added by
|
|
10
|
+
* `pnpm update-connectors` fails that test until it is given an alias here.
|
|
11
|
+
*
|
|
12
|
+
* `operations` lists the dropdowns, outermost first, whose choices make
|
|
13
|
+
* separate operations (GitHub's `operationGroup`, then `issueOperationType`).
|
|
14
|
+
* Dropdowns not listed (authentication type, AI provider) are modes of one
|
|
15
|
+
* operation, not operations. A template without `operations` has one.
|
|
16
|
+
*/
|
|
17
|
+
export declare const CONNECTOR_ALIASES: Readonly<Record<string, {
|
|
18
|
+
alias: string;
|
|
19
|
+
operations?: readonly string[];
|
|
20
|
+
}>>;
|
|
21
|
+
//# sourceMappingURL=aliases.d.ts.map
|
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A short, stable name for each bundled connector template, and the dropdowns
|
|
3
|
+
* that choose its operation. Both are what a model writes and reads in
|
|
4
|
+
* generation (`slack chat.postMessage`), so they are written down here rather
|
|
5
|
+
* than derived: a template renamed upstream must not change what an old
|
|
6
|
+
* answer means.
|
|
7
|
+
*
|
|
8
|
+
* Tests check that every bundled template has an entry, that aliases are
|
|
9
|
+
* unique, and that every listed dropdown exists. A template added by
|
|
10
|
+
* `pnpm update-connectors` fails that test until it is given an alias here.
|
|
11
|
+
*
|
|
12
|
+
* `operations` lists the dropdowns, outermost first, whose choices make
|
|
13
|
+
* separate operations (GitHub's `operationGroup`, then `issueOperationType`).
|
|
14
|
+
* Dropdowns not listed (authentication type, AI provider) are modes of one
|
|
15
|
+
* operation, not operations. A template without `operations` has one.
|
|
16
|
+
*/
|
|
17
|
+
export const CONNECTOR_ALIASES = {
|
|
18
|
+
"io.camunda.connectors.agenticai.a2a.client.v0": { alias: "a2a" },
|
|
19
|
+
"io.camunda.connectors.agenticai.a2a.client.polling.intermediate.v0": {
|
|
20
|
+
alias: "a2a-polling-catch",
|
|
21
|
+
},
|
|
22
|
+
"io.camunda.connectors.agenticai.a2a.client.polling.receive.v0": { alias: "a2a-polling-receive" },
|
|
23
|
+
"io.camunda.connectors.agenticai.a2a.client.webhook.intermediate.v0": {
|
|
24
|
+
alias: "a2a-webhook-catch",
|
|
25
|
+
},
|
|
26
|
+
"io.camunda.connectors.agenticai.a2a.client.webhook.receive.v0": { alias: "a2a-webhook-receive" },
|
|
27
|
+
"io.camunda.connectors.agenticai.adhoctoolsschema.v1": { alias: "adhoc-tools-schema" },
|
|
28
|
+
"io.camunda.connectors.agenticai.adhoctoolsschema.v0": { alias: "adhoc-tools-schema-v0" },
|
|
29
|
+
"io.camunda.connectors.agenticai.ai-agent-task.v2": { alias: "ai-agent" },
|
|
30
|
+
"io.camunda.connectors.agenticai.ai-agent-subprocess.v2": { alias: "ai-agent-subprocess" },
|
|
31
|
+
"io.camunda.connectors.agenticai.aiagent.jobworker.v1": { alias: "ai-agent-subprocess-v1" },
|
|
32
|
+
"io.camunda.connectors.agenticai.aiagent.v0": { alias: "ai-agent-v0" },
|
|
33
|
+
"io.camunda.connectors.agenticai.aiagent.v1": { alias: "ai-agent-v1" },
|
|
34
|
+
"io.camunda.connectors.AppIntegrationsChat.Boundary.v1": { alias: "app-chat-boundary" },
|
|
35
|
+
"io.camunda.connectors.AppIntegrationsChat.Intermediate.v1": { alias: "app-chat-catch" },
|
|
36
|
+
"io.camunda.connectors.AppIntegrationsChat.Receive.v1": { alias: "app-chat-receive" },
|
|
37
|
+
"io.camunda.connectors.AppIntegrationsChat.Start.v1": { alias: "app-chat-start" },
|
|
38
|
+
"io.camunda.connectors.AppIntegrations.v1": {
|
|
39
|
+
alias: "app-integrations",
|
|
40
|
+
operations: ["operation"],
|
|
41
|
+
},
|
|
42
|
+
"io.camunda.connectors.Asana.v1": {
|
|
43
|
+
alias: "asana",
|
|
44
|
+
operations: ["operationGroup", "taskOperation", "projectOperation"],
|
|
45
|
+
},
|
|
46
|
+
"io.camunda.connectors.AutomationAnywhere.v1": {
|
|
47
|
+
alias: "automation-anywhere",
|
|
48
|
+
operations: ["operationType"],
|
|
49
|
+
},
|
|
50
|
+
"io.camunda.connectors.AutomationAnywhere": {
|
|
51
|
+
alias: "automation-anywhere-legacy",
|
|
52
|
+
operations: ["operation.type"],
|
|
53
|
+
},
|
|
54
|
+
"io.camunda.connectors.azure.blobstorage.v1": {
|
|
55
|
+
alias: "azure-blob",
|
|
56
|
+
operations: ["operationDiscriminator"],
|
|
57
|
+
},
|
|
58
|
+
"io.camunda.connectors.AzureOpenAI.outbound.v1": {
|
|
59
|
+
alias: "azure-openai",
|
|
60
|
+
operations: ["operation"],
|
|
61
|
+
},
|
|
62
|
+
"io.camunda.connectors.aws.bedrock.v1": { alias: "bedrock", operations: ["action"] },
|
|
63
|
+
"io.camunda.connectors.aws.bedrock.agentcore.runtime.v1": { alias: "bedrock-agentcore" },
|
|
64
|
+
"io.camunda.connectors.aws.bedrock.codeinterpreter.v1": { alias: "bedrock-code" },
|
|
65
|
+
"io.camunda.connectors.aws.bedrock.knowledgebase.v1": { alias: "bedrock-kb" },
|
|
66
|
+
"io.camunda.connectors.aws.bedrock.agentcore.memory.longterm.v1": {
|
|
67
|
+
alias: "bedrock-memory",
|
|
68
|
+
operations: ["operation.operationDiscriminator"],
|
|
69
|
+
},
|
|
70
|
+
"io.camunda.connectors.BluePrism.v1": { alias: "blueprism", operations: ["operationType"] },
|
|
71
|
+
"io.camunda.connectors.box": { alias: "box", operations: ["operation.type"] },
|
|
72
|
+
"io.camunda.connectors.CamundaOrchestrationCluster.v1": {
|
|
73
|
+
alias: "camunda-api",
|
|
74
|
+
operations: ["input.internal_endpoint"],
|
|
75
|
+
},
|
|
76
|
+
"io.bpmnkit.connectors.CloudflareClef.v1": { alias: "clef" },
|
|
77
|
+
"io.camunda.connectors.AWSCOMPREHEND.v1": { alias: "comprehend", operations: ["input.type"] },
|
|
78
|
+
"io.camunda.connectors.csv": { alias: "csv", operations: ["operation"] },
|
|
79
|
+
"io.camunda.connectors.databricks.rest.v1": {
|
|
80
|
+
alias: "databricks",
|
|
81
|
+
operations: [
|
|
82
|
+
"service",
|
|
83
|
+
"sqlOperation",
|
|
84
|
+
"warehouseOperation",
|
|
85
|
+
"jobsOperation",
|
|
86
|
+
"servingOperation",
|
|
87
|
+
"vectorSearchOperation",
|
|
88
|
+
],
|
|
89
|
+
},
|
|
90
|
+
"io.camunda.connectors.AWSDynamoDB.v1": {
|
|
91
|
+
alias: "dynamodb",
|
|
92
|
+
operations: ["input.operationGroup", "input.tableOperation", "input.itemOperation"],
|
|
93
|
+
},
|
|
94
|
+
"io.camunda.connectors.EasyPost.v1": { alias: "easypost", operations: ["operationType"] },
|
|
95
|
+
"io.camunda.connectors.email.v1": {
|
|
96
|
+
alias: "email",
|
|
97
|
+
operations: [
|
|
98
|
+
"protocol",
|
|
99
|
+
"data.imapActionDiscriminator",
|
|
100
|
+
"data.pop3ActionDiscriminator",
|
|
101
|
+
"data.smtpActionDiscriminator",
|
|
102
|
+
],
|
|
103
|
+
},
|
|
104
|
+
"io.camunda.connectors.inbound.EmailBoundary.v1": { alias: "email-boundary" },
|
|
105
|
+
"io.camunda.connectors.inbound.EmailIntermediate.v1": { alias: "email-catch" },
|
|
106
|
+
"io.camunda.connectors.inbound.EmailMessageStart.v1": { alias: "email-message-start" },
|
|
107
|
+
"io.camunda.connectors.inbound.EmailReceive.v1": { alias: "email-receive" },
|
|
108
|
+
"io.camunda.connectors.AWSEventBridge.v1": { alias: "eventbridge" },
|
|
109
|
+
"io.camunda.connectors.AWSEventBridge.boundary.v1": { alias: "eventbridge-boundary" },
|
|
110
|
+
"io.camunda.connectors.AWSEventBridge.intermediate.v1": { alias: "eventbridge-catch" },
|
|
111
|
+
"io.camunda.connectors.AWSEventBridge.MessageStart.v1": { alias: "eventbridge-message-start" },
|
|
112
|
+
"io.camunda.connectors.AWSEventBridge.receive.v1": { alias: "eventbridge-receive" },
|
|
113
|
+
"io.camunda.connectors.AWSEventBridge.startEvent.v1": { alias: "eventbridge-start" },
|
|
114
|
+
"io.camunda.connectors.google.gcp.v1": { alias: "gcs", operations: ["operationDiscriminator"] },
|
|
115
|
+
"io.camunda.connectors.GoogleGemini.v1": { alias: "gemini" },
|
|
116
|
+
"io.camunda.connectors.GitHub.v1": {
|
|
117
|
+
alias: "github",
|
|
118
|
+
operations: [
|
|
119
|
+
"operationGroup",
|
|
120
|
+
"issueOperationType",
|
|
121
|
+
"releaseOperationType",
|
|
122
|
+
"branchOperationType",
|
|
123
|
+
"reposOperationType",
|
|
124
|
+
"listAlertsOperationType",
|
|
125
|
+
"eventOperationType",
|
|
126
|
+
"referenceOperationType",
|
|
127
|
+
"pullRequestOperationType",
|
|
128
|
+
"listCollaboratorsOperationType",
|
|
129
|
+
"labelOperationType",
|
|
130
|
+
],
|
|
131
|
+
},
|
|
132
|
+
"io.camunda.connectors.webhook.GithubWebhookConnectorBoundary.v1": {
|
|
133
|
+
alias: "github-webhook-boundary",
|
|
134
|
+
},
|
|
135
|
+
"io.camunda.connectors.webhook.GithubWebhookConnectorIntermediate.v1": {
|
|
136
|
+
alias: "github-webhook-catch",
|
|
137
|
+
},
|
|
138
|
+
"io.camunda.connectors.webhook.GithubWebhookConnectorMessageStart.v1": {
|
|
139
|
+
alias: "github-webhook-message-start",
|
|
140
|
+
},
|
|
141
|
+
"io.camunda.connectors.webhook.GithubWebhookConnectorReceive.v1": {
|
|
142
|
+
alias: "github-webhook-receive",
|
|
143
|
+
},
|
|
144
|
+
"io.camunda.connectors.webhook.GithubWebhookConnector.v1": { alias: "github-webhook-start" },
|
|
145
|
+
"io.camunda.connectors.GitLab.v1": {
|
|
146
|
+
alias: "gitlab",
|
|
147
|
+
operations: [
|
|
148
|
+
"operationGroup",
|
|
149
|
+
"issueOperation",
|
|
150
|
+
"releaseOperation",
|
|
151
|
+
"branchOperation",
|
|
152
|
+
"reposOperation",
|
|
153
|
+
"mergeOperation",
|
|
154
|
+
],
|
|
155
|
+
},
|
|
156
|
+
"io.camunda.connectors.GoogleDrive.v1": { alias: "google-drive", operations: ["resource.type"] },
|
|
157
|
+
"io.camunda.connectors.GoogleMapsPlatform.v1": {
|
|
158
|
+
alias: "google-maps",
|
|
159
|
+
operations: ["operationType"],
|
|
160
|
+
},
|
|
161
|
+
"io.camunda.connectors.GoogleSheets.v1": {
|
|
162
|
+
alias: "google-sheets",
|
|
163
|
+
operations: ["operation.type"],
|
|
164
|
+
},
|
|
165
|
+
"io.camunda.connectors.GraphQL.v1": { alias: "graphql" },
|
|
166
|
+
"io.camunda.connectors.HttpJson.v2": { alias: "http" },
|
|
167
|
+
"io.camunda.connectors.http.Polling.Boundary": { alias: "http-polling-boundary" },
|
|
168
|
+
"io.camunda.connectors.http.Polling": { alias: "http-polling-catch" },
|
|
169
|
+
"io.camunda.connectors.HubSpot.v1": {
|
|
170
|
+
alias: "hubspot",
|
|
171
|
+
operations: ["resourceType", "operationId"],
|
|
172
|
+
},
|
|
173
|
+
"io.camunda.connectors.HuggingFace.v1": { alias: "huggingface" },
|
|
174
|
+
"io.camunda.connectors.KAFKA.v1": { alias: "kafka" },
|
|
175
|
+
"io.camunda.connectors.inbound.KafkaBoundary.v1": { alias: "kafka-boundary" },
|
|
176
|
+
"io.camunda.connectors.inbound.KafkaIntermediate.v1": { alias: "kafka-catch" },
|
|
177
|
+
"io.camunda.connectors.inbound.KafkaMessageStart.v1": { alias: "kafka-message-start" },
|
|
178
|
+
"io.camunda.connectors.inbound.KafkaReceive.v1": { alias: "kafka-receive" },
|
|
179
|
+
"io.camunda.connectors.AWSLAMBDA.v2": { alias: "lambda" },
|
|
180
|
+
"io.camunda.connectors.agenticai.mcp.client.v0": { alias: "mcp" },
|
|
181
|
+
"io.camunda.mcp.start-message": { alias: "mcp-message-start" },
|
|
182
|
+
"io.camunda.connectors.agenticai.mcp.remoteclient.v0": { alias: "mcp-remote" },
|
|
183
|
+
"io.camunda.connectors.inbound.MSFT.O365.EmailBoundary.v1": { alias: "o365-email-boundary" },
|
|
184
|
+
"io.camunda.connectors.inbound.MSFT.O365.EmailIntermediate.v1": { alias: "o365-email-catch" },
|
|
185
|
+
"io.camunda.connectors.inbound.MSFT.O365.EmailMessageStart.v1": {
|
|
186
|
+
alias: "o365-email-message-start",
|
|
187
|
+
},
|
|
188
|
+
"io.camunda.connectors.MSFT.O365.Mail.v1": { alias: "o365-mail", operations: ["operationId"] },
|
|
189
|
+
"io.camunda.connectors.OpenAI.v1": { alias: "openai", operations: ["operation"] },
|
|
190
|
+
"io.camunda.connectors.CamundaOperate.v1": {
|
|
191
|
+
alias: "operate",
|
|
192
|
+
operations: ["input.internal_endpoint"],
|
|
193
|
+
},
|
|
194
|
+
"io.camunda.connectors.PowerAutomate.v1": {
|
|
195
|
+
alias: "power-automate",
|
|
196
|
+
operations: ["operationType"],
|
|
197
|
+
},
|
|
198
|
+
"io.camunda.connectors.RabbitMQ.v1": { alias: "rabbitmq" },
|
|
199
|
+
"io.camunda.connectors.inbound.RabbitMQ.Boundary.v1": { alias: "rabbitmq-boundary" },
|
|
200
|
+
"io.camunda.connectors.inbound.RabbitMQ.Intermediate.v1": { alias: "rabbitmq-catch" },
|
|
201
|
+
"io.camunda.connectors.inbound.RabbitMQ.MessageStart.v1": { alias: "rabbitmq-message-start" },
|
|
202
|
+
"io.camunda.connectors.inbound.RabbitMQ.Receive.v1": { alias: "rabbitmq-receive" },
|
|
203
|
+
"io.camunda.connectors.inbound.RabbitMQ.StartEvent.v1": { alias: "rabbitmq-start" },
|
|
204
|
+
"camunda.connectors.rpa": { alias: "rpa" },
|
|
205
|
+
"io.camunda.connectors.aws.s3.v1": { alias: "s3", operations: ["actionDiscriminator"] },
|
|
206
|
+
"io.camunda.connectors.AWSSAGEMAKER.v1": {
|
|
207
|
+
alias: "sagemaker",
|
|
208
|
+
operations: ["input.invocationType"],
|
|
209
|
+
},
|
|
210
|
+
"io.camunda.connectors.Salesforce.v1": {
|
|
211
|
+
alias: "salesforce",
|
|
212
|
+
operations: ["salesforceOperationType"],
|
|
213
|
+
},
|
|
214
|
+
"io.camunda.connectors.message.sendtask.v1": { alias: "send-message" },
|
|
215
|
+
"io.camunda.connectors.message.end.v1": { alias: "send-message-end" },
|
|
216
|
+
"io.camunda.connectors.message.intermediate.v1": { alias: "send-message-throw" },
|
|
217
|
+
"io.camunda.connectors.SendGrid.v2": {
|
|
218
|
+
alias: "sendgrid",
|
|
219
|
+
operations: ["unMappedFieldNotUseInModel.mailType"],
|
|
220
|
+
},
|
|
221
|
+
"io.camunda.connectors.ServiceNow.v1": { alias: "servicenow", operations: ["operationGroup"] },
|
|
222
|
+
"io.camunda.connectors.ServiceNowFlow.v1": { alias: "servicenow-flow" },
|
|
223
|
+
"io.camunda.connectors.ServiceNowIncident.v1": {
|
|
224
|
+
alias: "servicenow-incident",
|
|
225
|
+
operations: ["operationGroup"],
|
|
226
|
+
},
|
|
227
|
+
"io.camunda.connectors.Slack.v1": { alias: "slack", operations: ["method"] },
|
|
228
|
+
"io.camunda.connectors.inbound.Slack.BoundaryEvent.v1": { alias: "slack-boundary" },
|
|
229
|
+
"io.camunda.connectors.inbound.Slack.IntermediateCatchEvent.v1": { alias: "slack-catch" },
|
|
230
|
+
"io.camunda.connectors.inbound.Slack.MessageStartEvent.v1": { alias: "slack-message-start" },
|
|
231
|
+
"io.camunda.connectors.inbound.Slack.ReceiveTask.v1": { alias: "slack-receive" },
|
|
232
|
+
"io.camunda.connectors.inbound.Slack.StartEvent.v1": { alias: "slack-start" },
|
|
233
|
+
"io.camunda.connectors.AWSSNS.v1": { alias: "sns" },
|
|
234
|
+
"io.camunda.connectors.inbound.AWSSNS.Boundary.v1": { alias: "sns-boundary" },
|
|
235
|
+
"io.camunda.connectors.inbound.AWSSNS.IntermediateCatchEvent.v1": { alias: "sns-catch" },
|
|
236
|
+
"io.camunda.connectors.inbound.AWSSNS.MessageStartEvent.v1": { alias: "sns-message-start" },
|
|
237
|
+
"io.camunda.connectors.inbound.AWSSNS.Receive.v1": { alias: "sns-receive" },
|
|
238
|
+
"io.camunda.connectors.inbound.AWSSNS.StartEvent.v1": { alias: "sns-start" },
|
|
239
|
+
"io.camunda:soap": { alias: "soap" },
|
|
240
|
+
"io.camunda.connectors.Jdbc.v1": { alias: "sql" },
|
|
241
|
+
"io.camunda.connectors.AWSSQS.v1": { alias: "sqs" },
|
|
242
|
+
"io.camunda.connectors.AWSSQS.boundary.v1": { alias: "sqs-boundary" },
|
|
243
|
+
"io.camunda.connectors.AWSSQS.intermediate.v1": { alias: "sqs-catch" },
|
|
244
|
+
"io.camunda.connectors.AWSSQS.startmessage.v1": { alias: "sqs-message-start" },
|
|
245
|
+
"io.camunda.connectors.AWSSQS.receive.v1": { alias: "sqs-receive" },
|
|
246
|
+
"io.camunda.connectors.AWSSQS.StartEvent.v1": { alias: "sqs-start" },
|
|
247
|
+
"io.camunda.connectors.MSTeams.v1": {
|
|
248
|
+
alias: "teams",
|
|
249
|
+
operations: ["data.type", "data.chatMethod", "data.channelMethod"],
|
|
250
|
+
},
|
|
251
|
+
"io.camunda.connectors.AWSTEXTRACT.v1": { alias: "textract" },
|
|
252
|
+
"io.camunda.connectors.Twilio.v1": { alias: "twilio", operations: ["operationType"] },
|
|
253
|
+
"io.camunda.connectors.Twilio.Webhook.Boundary.v1": { alias: "twilio-boundary" },
|
|
254
|
+
"io.camunda.connectors.Twilio.Webhook.Intermediate.v1": { alias: "twilio-catch" },
|
|
255
|
+
"io.camunda.connectors.TwilioWebhookMessageStart.v1": { alias: "twilio-message-start" },
|
|
256
|
+
"io.camunda.connectors.Twilio.Webhook.Receive.v1": { alias: "twilio-receive" },
|
|
257
|
+
"io.camunda.connectors.TwilioWebhook.v1": { alias: "twilio-start" },
|
|
258
|
+
"io.camunda.connectors.UIPath.v1": { alias: "uipath", operations: ["operationType"] },
|
|
259
|
+
"io.camunda.connectors.EmbeddingsVectorDB.v1": {
|
|
260
|
+
alias: "vector-db",
|
|
261
|
+
operations: ["vectorDatabaseConnectorOperation.operationType"],
|
|
262
|
+
},
|
|
263
|
+
"io.camunda.connectors.webhook.WebhookConnectorBoundary.v1": { alias: "webhook-boundary" },
|
|
264
|
+
"io.camunda.connectors.webhook.WebhookConnectorIntermediate.v1": { alias: "webhook-catch" },
|
|
265
|
+
"io.camunda.connectors.webhook.WebhookConnectorStartMessage.v1": {
|
|
266
|
+
alias: "webhook-message-start",
|
|
267
|
+
},
|
|
268
|
+
"io.camunda.connectors.webhook.WebhookConnectorReceive.v1": { alias: "webhook-receive" },
|
|
269
|
+
"io.camunda.connectors.webhook.WebhookConnector.v1": { alias: "webhook-start" },
|
|
270
|
+
"io.camunda.connectors.WhatsApp.v1": { alias: "whatsapp", operations: ["messageType"] },
|
|
271
|
+
};
|
|
272
|
+
//# sourceMappingURL=aliases.js.map
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* API cards: the real endpoints of an HTTP API, for the REST connector.
|
|
3
|
+
*
|
|
4
|
+
* A dedicated connector is the first choice for a system. When there is none —
|
|
5
|
+
* Stripe, Notion, most of the long tail — the REST connector can still call
|
|
6
|
+
* the system, but only with the right base URL, path and authentication. These
|
|
7
|
+
* come from an index of the APIs' OpenAPI specs, built offline into
|
|
8
|
+
* `@bpmnkit/connector-gen/api-index`. That index is too large for core, so
|
|
9
|
+
* core has only its shape and works on the services a caller loaded.
|
|
10
|
+
*/
|
|
11
|
+
/** How a service expects its credentials. */
|
|
12
|
+
export type ApiAuth = {
|
|
13
|
+
type: "noAuth" | "bearer" | "basic" | "oauth-client-credentials-flow";
|
|
14
|
+
} | {
|
|
15
|
+
type: "apiKey";
|
|
16
|
+
in: "header" | "query";
|
|
17
|
+
name: string;
|
|
18
|
+
};
|
|
19
|
+
/** One operation of a service. */
|
|
20
|
+
export interface ApiOperation {
|
|
21
|
+
/** Upper-case HTTP method. */
|
|
22
|
+
method: string;
|
|
23
|
+
/** Path below the base URL, with `{param}` placeholders. */
|
|
24
|
+
path: string;
|
|
25
|
+
/** The spec's `operationId`, kept when it has no summary. */
|
|
26
|
+
id?: string;
|
|
27
|
+
summary?: string;
|
|
28
|
+
/** Query parameters, required ones first and marked `*`. */
|
|
29
|
+
query?: string[];
|
|
30
|
+
/** Required headers besides authentication, as `Name` or `Name: value`. */
|
|
31
|
+
headers?: string[];
|
|
32
|
+
/** Top-level body properties, required ones first and marked `*`. */
|
|
33
|
+
body?: string[];
|
|
34
|
+
/** The body is sent form-encoded, not as JSON. */
|
|
35
|
+
form?: true;
|
|
36
|
+
}
|
|
37
|
+
/** A service of the index, operations included. */
|
|
38
|
+
export interface ApiService {
|
|
39
|
+
id: string;
|
|
40
|
+
name: string;
|
|
41
|
+
/** Absent when the spec has no fixed host (a per-tenant domain, say). */
|
|
42
|
+
baseUrl?: string;
|
|
43
|
+
auth: ApiAuth;
|
|
44
|
+
license?: string;
|
|
45
|
+
operations: ApiOperation[];
|
|
46
|
+
}
|
|
47
|
+
/** A service of the index without its operations. */
|
|
48
|
+
export interface ApiServiceSummary {
|
|
49
|
+
id: string;
|
|
50
|
+
name: string;
|
|
51
|
+
description?: string;
|
|
52
|
+
}
|
|
53
|
+
/** A service and the operations picked from it for one task. */
|
|
54
|
+
export interface ApiCard {
|
|
55
|
+
service: ApiService;
|
|
56
|
+
operations: ApiOperation[];
|
|
57
|
+
}
|
|
58
|
+
/** The word that names a service: `twilio-voice` → `twilio`. */
|
|
59
|
+
export declare function apiBrand(id: string): string;
|
|
60
|
+
/**
|
|
61
|
+
* The services a text names, by id: "Charge the card with Stripe" names
|
|
62
|
+
* `stripe`; "Send an SMS via Twilio" names every Twilio service.
|
|
63
|
+
*/
|
|
64
|
+
export declare function apiServicesIn(text: string, services: readonly ApiServiceSummary[]): string[];
|
|
65
|
+
/** An operation with how well it fits, and how many of the task's words (verbs aside) it has. */
|
|
66
|
+
export interface RankedApiOperation {
|
|
67
|
+
op: ApiOperation;
|
|
68
|
+
score: number;
|
|
69
|
+
hits: number;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* The operations of a service that best fit a task name, best first: words of
|
|
73
|
+
* the summary count most, then of the path, then of the operation id, and a
|
|
74
|
+
* verb that asks for the operation's method ("Create" → POST) adds to it, as
|
|
75
|
+
* does a path that ends in a word of the text, and each word of the path the
|
|
76
|
+
* text does not have takes one off. Without a verb, POST is preferred. An operation
|
|
77
|
+
* needs a word other than a verb in common. Shorter paths win ties.
|
|
78
|
+
*/
|
|
79
|
+
export declare function rankApiOperations(service: ApiService, text: string): RankedApiOperation[];
|
|
80
|
+
/** The operations of {@link rankApiOperations}, best first. */
|
|
81
|
+
export declare function findApiOperations(service: ApiService, text: string, options?: {
|
|
82
|
+
limit?: number;
|
|
83
|
+
}): ApiOperation[];
|
|
84
|
+
/** The secret names a service's credentials go by: `STRIPE_TOKEN`. */
|
|
85
|
+
export declare function apiSecretNames(service: ApiService): Record<string, string>;
|
|
86
|
+
/** The REST connector's authentication inputs for a service, credentials as secrets. */
|
|
87
|
+
export declare function apiAuthValues(service: ApiService): Record<string, string>;
|
|
88
|
+
/** One operation as a card line: `POST /v1/customers — Create a customer | form body: name email`. */
|
|
89
|
+
export declare function formatApiOperation(op: ApiOperation): string;
|
|
90
|
+
/**
|
|
91
|
+
* A service and its picked operations as a prompt block:
|
|
92
|
+
*
|
|
93
|
+
* ```
|
|
94
|
+
* api stripe — Stripe API https://api.stripe.com auth=bearer secret=STRIPE_TOKEN
|
|
95
|
+
* POST /v1/customers — Create a customer | form body: name email description
|
|
96
|
+
* ```
|
|
97
|
+
*
|
|
98
|
+
* A service without a fixed host says so: its URL is the reader's to give.
|
|
99
|
+
*/
|
|
100
|
+
export declare function formatApiCard(card: ApiCard): string;
|
|
101
|
+
/**
|
|
102
|
+
* The operation of a service a call names, by method and path. The path may be
|
|
103
|
+
* the spec's (`/repos/{owner}/{repo}/issues`) or filled in (`/repos/acme/web/issues`).
|
|
104
|
+
*/
|
|
105
|
+
export declare function findApiOperation(service: ApiService, method: string, path: string): ApiOperation | undefined;
|
|
106
|
+
/**
|
|
107
|
+
* A URL for the REST connector: the base URL and the path, each `{param}` of
|
|
108
|
+
* the path read from the process variable of the same name —
|
|
109
|
+
* `="https://api.github.com/repos/" + string(owner) + "/" + string(repo) + "/issues"`.
|
|
110
|
+
* A path without parameters stays a literal URL.
|
|
111
|
+
*/
|
|
112
|
+
export declare function apiUrl(baseUrl: string, path: string): string;
|
|
113
|
+
/** The headers an operation needs besides authentication, as a FEEL context; `undefined` when none. */
|
|
114
|
+
export declare function apiHeaders(op: ApiOperation): {
|
|
115
|
+
headers?: string;
|
|
116
|
+
missing: string[];
|
|
117
|
+
};
|
|
118
|
+
//# sourceMappingURL=api.d.ts.map
|