@bpmnkit/plugins 0.0.19 → 0.0.23

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.
@@ -5,6 +5,20 @@ export declare function xmlLocalName(qname: string): string;
5
5
  export declare function findFlowElement(defs: BpmnDefinitions, id: string): BpmnFlowElement | undefined;
6
6
  export declare function updateFlowElement(defs: BpmnDefinitions, id: string, fn: (el: BpmnFlowElement) => BpmnFlowElement): BpmnDefinitions;
7
7
  export declare function parseZeebeExtensions(extensionElements: XmlElement[]): ZeebeExtensions;
8
+ /** Parsed `zeebe:loopCharacteristics` extension element from a multi-instance loop. */
9
+ export interface ZeebeLoopCharacteristics {
10
+ inputCollection: string;
11
+ inputElement: string;
12
+ outputCollection?: string;
13
+ outputElement?: string;
14
+ }
15
+ /** Read `zeebe:loopCharacteristics` from a `multiInstanceLoopCharacteristics` extensionElements list. */
16
+ export declare function parseZeebeLoopCharacteristics(extensionElements: XmlElement[]): ZeebeLoopCharacteristics | undefined;
17
+ /** Build a `zeebe:loopCharacteristics` XmlElement from collection/element options. */
18
+ export declare function buildZeebeLoopCharacteristics(opts: {
19
+ inputCollection: string;
20
+ inputElement: string;
21
+ }): XmlElement;
8
22
  /** Read the example output JSON string from parsed zeebe extensions. */
9
23
  export declare function getExampleOutputJson(ext: ZeebeExtensions): string;
10
24
  /**
@@ -101,6 +101,27 @@ export function parseZeebeExtensions(extensionElements) {
101
101
  }
102
102
  return ext;
103
103
  }
104
+ /** Read `zeebe:loopCharacteristics` from a `multiInstanceLoopCharacteristics` extensionElements list. */
105
+ export function parseZeebeLoopCharacteristics(extensionElements) {
106
+ const loopEl = extensionElements.find((e) => xmlLocalName(e.name) === "loopCharacteristics");
107
+ if (!loopEl)
108
+ return undefined;
109
+ return {
110
+ inputCollection: loopEl.attributes.inputCollection ?? "",
111
+ inputElement: loopEl.attributes.inputElement ?? "",
112
+ outputCollection: loopEl.attributes.outputCollection,
113
+ outputElement: loopEl.attributes.outputElement,
114
+ };
115
+ }
116
+ /** Build a `zeebe:loopCharacteristics` XmlElement from collection/element options. */
117
+ export function buildZeebeLoopCharacteristics(opts) {
118
+ const attrs = {};
119
+ if (opts.inputCollection)
120
+ attrs.inputCollection = opts.inputCollection;
121
+ if (opts.inputElement)
122
+ attrs.inputElement = opts.inputElement;
123
+ return { name: "zeebe:loopCharacteristics", attributes: attrs, children: [] };
124
+ }
104
125
  const EXAMPLE_OUTPUT_JSON_KEY = "camundaModeler:exampleOutputJson";
105
126
  /** Read the example output JSON string from parsed zeebe extensions. */
106
127
  export function getExampleOutputJson(ext) {
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Static catalog of bpmnkit built-in worker element templates.
3
+ *
4
+ * These are always available in the connector catalog regardless of whether
5
+ * the local proxy is running. They mirror the runtime definitions served by
6
+ * `GET /worker-templates` on the proxy.
7
+ */
8
+ import type { ElementTemplate } from "../config-panel-bpmn/template-types.js";
9
+ export declare const BUILTIN_WORKER_TEMPLATES: ElementTemplate[];
10
+ //# sourceMappingURL=builtin-templates.d.ts.map
@@ -0,0 +1,585 @@
1
+ const CLI_ICON = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"><rect width="16" height="16" rx="3" fill="#1e1e2e"/><text x="3" y="12" font-family="monospace" font-size="10" fill="#cdd6f4">&gt;_</text></svg>`;
2
+ const LLM_ICON = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"><rect width="16" height="16" rx="3" fill="#1e1e2e"/><circle cx="8" cy="8" r="5" fill="none" stroke="#6b9df7" stroke-width="1.5"/><path d="M6 8h4M8 6v4" stroke="#6b9df7" stroke-width="1.5"/></svg>`;
3
+ const FS_ICON = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"><rect width="16" height="16" rx="3" fill="#1e1e2e"/><path d="M3 5h10v8H3z" fill="none" stroke="#2dd4bf" stroke-width="1.5"/><path d="M3 5l2-2h4l2 2" fill="none" stroke="#2dd4bf" stroke-width="1.5"/></svg>`;
4
+ const JS_ICON = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"><rect width="16" height="16" rx="3" fill="#f59e0b"/><text x="2" y="12" font-family="monospace" font-size="9" font-weight="bold" fill="#1e1e2e">JS</text></svg>`;
5
+ const WATCH_ICON = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"><rect width="16" height="16" rx="3" fill="#1e1e2e"/><path d="M3 10V7l5-4 5 4v3" fill="none" stroke="#a78bfa" stroke-width="1.5"/><path d="M5 10h6v4H5z" fill="none" stroke="#a78bfa" stroke-width="1.5"/></svg>`;
6
+ const HTTP_ICON = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"><rect width="16" height="16" rx="3" fill="#1e1e2e"/><circle cx="8" cy="8" r="5" fill="none" stroke="#2dd4bf" stroke-width="1.5"/><path d="M3 8h10M8 3c-2 2-2 8 0 10M8 3c2 2 2 8 0 10" stroke="#2dd4bf" stroke-width="1" fill="none"/></svg>`;
7
+ const EMAIL_ICON = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"><rect width="16" height="16" rx="3" fill="#1e1e2e"/><rect x="2" y="4" width="12" height="8" rx="1" fill="none" stroke="#f59e0b" stroke-width="1.5"/><path d="M2 5l6 4 6-4" stroke="#f59e0b" stroke-width="1.5" fill="none"/></svg>`;
8
+ export const BUILTIN_WORKER_TEMPLATES = [
9
+ // ── CLI Worker ────────────────────────────────────────────────────────────
10
+ {
11
+ id: "io.bpmnkit.cli",
12
+ name: "CLI Command",
13
+ version: 1,
14
+ description: "Run any shell command. Use {{varName}} to interpolate process variables, {{secrets.NAME}} for secrets.",
15
+ appliesTo: ["bpmn:ServiceTask"],
16
+ icon: { contents: CLI_ICON },
17
+ groups: [
18
+ { id: "command", label: "Command" },
19
+ { id: "output", label: "Output" },
20
+ ],
21
+ properties: [
22
+ {
23
+ id: "taskType",
24
+ type: "Hidden",
25
+ value: "io.bpmnkit:cli:1",
26
+ binding: { type: "zeebe:taskDefinition", property: "type" },
27
+ },
28
+ {
29
+ id: "command",
30
+ label: "Command",
31
+ description: "Shell command to run. Use {{varName}} for variables, {{secrets.NAME}} for secrets.",
32
+ type: "Text",
33
+ group: "command",
34
+ constraints: { notEmpty: true },
35
+ binding: { type: "zeebe:taskHeader", key: "command" },
36
+ },
37
+ {
38
+ id: "cwd",
39
+ label: "Working directory",
40
+ description: "Directory to run the command in. Default: home directory (~).",
41
+ type: "String",
42
+ optional: true,
43
+ group: "command",
44
+ binding: { type: "zeebe:taskHeader", key: "cwd" },
45
+ },
46
+ {
47
+ id: "timeout",
48
+ label: "Timeout (seconds)",
49
+ description: "Maximum time to wait before killing the process.",
50
+ type: "Number",
51
+ value: 60,
52
+ group: "command",
53
+ binding: { type: "zeebe:taskHeader", key: "timeout" },
54
+ },
55
+ {
56
+ id: "ignoreExitCode",
57
+ label: "Ignore non-zero exit code",
58
+ description: "Complete the job even when the command exits with a non-zero code.",
59
+ type: "Boolean",
60
+ value: false,
61
+ group: "command",
62
+ binding: { type: "zeebe:taskHeader", key: "ignoreExitCode" },
63
+ },
64
+ {
65
+ id: "resultVariable",
66
+ label: "Result variable",
67
+ description: "Process variable to store { stdout, stderr, exitCode }.",
68
+ type: "String",
69
+ value: "cliResult",
70
+ group: "output",
71
+ binding: { type: "zeebe:taskHeader", key: "resultVariable" },
72
+ },
73
+ ],
74
+ },
75
+ // ── LLM Worker ───────────────────────────────────────────────────────────
76
+ {
77
+ id: "io.bpmnkit.llm",
78
+ name: "LLM Prompt",
79
+ version: 1,
80
+ description: "Call an AI model (Claude, Copilot, or Gemini) with a prompt.",
81
+ appliesTo: ["bpmn:ServiceTask"],
82
+ icon: { contents: LLM_ICON },
83
+ groups: [
84
+ { id: "prompt", label: "Prompt" },
85
+ { id: "model", label: "Model" },
86
+ { id: "output", label: "Output" },
87
+ ],
88
+ properties: [
89
+ {
90
+ id: "taskType",
91
+ type: "Hidden",
92
+ value: "io.bpmnkit:llm:1",
93
+ binding: { type: "zeebe:taskDefinition", property: "type" },
94
+ },
95
+ {
96
+ id: "prompt",
97
+ label: "Prompt",
98
+ description: "The message to send. Use {{varName}} to include process variable values, or = for a FEEL expression.",
99
+ type: "Text",
100
+ feel: "optional",
101
+ group: "prompt",
102
+ constraints: { notEmpty: true },
103
+ binding: { type: "zeebe:input", name: "prompt" },
104
+ },
105
+ {
106
+ id: "system",
107
+ label: "System prompt",
108
+ description: "Optional instruction given to the model before the user message.",
109
+ type: "Text",
110
+ optional: true,
111
+ group: "prompt",
112
+ binding: { type: "zeebe:taskHeader", key: "system" },
113
+ },
114
+ {
115
+ id: "model",
116
+ label: "Model",
117
+ description: "Which LLM to use. Auto-detects the first available adapter if not set.",
118
+ type: "Dropdown",
119
+ optional: true,
120
+ group: "model",
121
+ choices: [
122
+ { name: "Auto-detect", value: "" },
123
+ { name: "Claude", value: "claude" },
124
+ { name: "GitHub Copilot", value: "copilot" },
125
+ { name: "Gemini", value: "gemini" },
126
+ ],
127
+ binding: { type: "zeebe:taskHeader", key: "model" },
128
+ },
129
+ {
130
+ id: "resultVariable",
131
+ label: "Result variable",
132
+ description: "Process variable to store the model's response string.",
133
+ type: "String",
134
+ value: "response",
135
+ group: "output",
136
+ binding: { type: "zeebe:taskHeader", key: "resultVariable" },
137
+ },
138
+ ],
139
+ },
140
+ // ── FS Read ───────────────────────────────────────────────────────────────
141
+ {
142
+ id: "io.bpmnkit.fs.read",
143
+ name: "Read File",
144
+ version: 1,
145
+ description: "Read a file from the local filesystem into a process variable.",
146
+ appliesTo: ["bpmn:ServiceTask"],
147
+ icon: { contents: FS_ICON },
148
+ groups: [
149
+ { id: "file", label: "File" },
150
+ { id: "output", label: "Output" },
151
+ ],
152
+ properties: [
153
+ {
154
+ id: "taskType",
155
+ type: "Hidden",
156
+ value: "io.bpmnkit:fs:read:1",
157
+ binding: { type: "zeebe:taskDefinition", property: "type" },
158
+ },
159
+ {
160
+ id: "path",
161
+ label: "File path",
162
+ description: "Absolute path or ~/relative path. Use = for a FEEL expression.",
163
+ type: "String",
164
+ feel: "optional",
165
+ group: "file",
166
+ constraints: { notEmpty: true },
167
+ binding: { type: "zeebe:input", name: "path" },
168
+ },
169
+ {
170
+ id: "resultVariable",
171
+ label: "Result variable",
172
+ description: "Process variable to store the file content (string).",
173
+ type: "String",
174
+ value: "fileContent",
175
+ group: "output",
176
+ binding: { type: "zeebe:taskHeader", key: "resultVariable" },
177
+ },
178
+ ],
179
+ },
180
+ // ── FS Write ──────────────────────────────────────────────────────────────
181
+ {
182
+ id: "io.bpmnkit.fs.write",
183
+ name: "Write File",
184
+ version: 1,
185
+ description: "Write a process variable to a file. Parent directories are created automatically.",
186
+ appliesTo: ["bpmn:ServiceTask"],
187
+ icon: { contents: FS_ICON },
188
+ groups: [{ id: "file", label: "File" }],
189
+ properties: [
190
+ {
191
+ id: "taskType",
192
+ type: "Hidden",
193
+ value: "io.bpmnkit:fs:write:1",
194
+ binding: { type: "zeebe:taskDefinition", property: "type" },
195
+ },
196
+ {
197
+ id: "path",
198
+ label: "File path",
199
+ description: "Absolute path or ~/relative path to write. Use = for a FEEL expression.",
200
+ type: "String",
201
+ feel: "optional",
202
+ group: "file",
203
+ constraints: { notEmpty: true },
204
+ binding: { type: "zeebe:input", name: "path" },
205
+ },
206
+ {
207
+ id: "content",
208
+ label: "Content",
209
+ description: "The string content to write. Use = for a FEEL expression.",
210
+ type: "String",
211
+ feel: "optional",
212
+ group: "file",
213
+ constraints: { notEmpty: true },
214
+ binding: { type: "zeebe:input", name: "content" },
215
+ },
216
+ ],
217
+ },
218
+ // ── FS Append ─────────────────────────────────────────────────────────────
219
+ {
220
+ id: "io.bpmnkit.fs.append",
221
+ name: "Append to File",
222
+ version: 1,
223
+ description: "Append content to a file. Creates the file if it does not exist.",
224
+ appliesTo: ["bpmn:ServiceTask"],
225
+ icon: { contents: FS_ICON },
226
+ groups: [{ id: "file", label: "File" }],
227
+ properties: [
228
+ {
229
+ id: "taskType",
230
+ type: "Hidden",
231
+ value: "io.bpmnkit:fs:append:1",
232
+ binding: { type: "zeebe:taskDefinition", property: "type" },
233
+ },
234
+ {
235
+ id: "path",
236
+ label: "File path",
237
+ description: "Absolute path or ~/relative path to append to.",
238
+ type: "String",
239
+ feel: "optional",
240
+ group: "file",
241
+ constraints: { notEmpty: true },
242
+ binding: { type: "zeebe:input", name: "path" },
243
+ },
244
+ {
245
+ id: "content",
246
+ label: "Content",
247
+ description: "The string content to append.",
248
+ type: "String",
249
+ feel: "optional",
250
+ group: "file",
251
+ constraints: { notEmpty: true },
252
+ binding: { type: "zeebe:input", name: "content" },
253
+ },
254
+ ],
255
+ },
256
+ // ── FS List ───────────────────────────────────────────────────────────────
257
+ {
258
+ id: "io.bpmnkit.fs.list",
259
+ name: "List Directory",
260
+ version: 1,
261
+ description: "List files in a directory. Returns an array of filenames.",
262
+ appliesTo: ["bpmn:ServiceTask"],
263
+ icon: { contents: FS_ICON },
264
+ groups: [
265
+ { id: "directory", label: "Directory" },
266
+ { id: "output", label: "Output" },
267
+ ],
268
+ properties: [
269
+ {
270
+ id: "taskType",
271
+ type: "Hidden",
272
+ value: "io.bpmnkit:fs:list:1",
273
+ binding: { type: "zeebe:taskDefinition", property: "type" },
274
+ },
275
+ {
276
+ id: "path",
277
+ label: "Directory path",
278
+ description: "Absolute path or ~/relative path to list.",
279
+ type: "String",
280
+ feel: "optional",
281
+ group: "directory",
282
+ constraints: { notEmpty: true },
283
+ binding: { type: "zeebe:input", name: "path" },
284
+ },
285
+ {
286
+ id: "resultVariable",
287
+ label: "Result variable",
288
+ description: "Process variable to store the file list (string array).",
289
+ type: "String",
290
+ value: "files",
291
+ group: "output",
292
+ binding: { type: "zeebe:taskHeader", key: "resultVariable" },
293
+ },
294
+ ],
295
+ },
296
+ // ── JS Eval ───────────────────────────────────────────────────────────────
297
+ {
298
+ id: "io.bpmnkit.js",
299
+ name: "JavaScript Expression",
300
+ version: 1,
301
+ description: "Evaluate a JavaScript expression. All process variables are available via the `variables` object.",
302
+ appliesTo: ["bpmn:ServiceTask"],
303
+ icon: { contents: JS_ICON },
304
+ groups: [
305
+ { id: "expression", label: "Expression" },
306
+ { id: "output", label: "Output" },
307
+ ],
308
+ properties: [
309
+ {
310
+ id: "taskType",
311
+ type: "Hidden",
312
+ value: "io.bpmnkit:js:1",
313
+ binding: { type: "zeebe:taskDefinition", property: "type" },
314
+ },
315
+ {
316
+ id: "expression",
317
+ label: "Expression",
318
+ description: "JavaScript expression returning a value. Use `variables.x` to read process variables.",
319
+ type: "Text",
320
+ group: "expression",
321
+ constraints: { notEmpty: true },
322
+ binding: { type: "zeebe:taskHeader", key: "expression" },
323
+ },
324
+ {
325
+ id: "resultVariable",
326
+ label: "Result variable",
327
+ description: "Process variable to store the expression result.",
328
+ type: "String",
329
+ value: "result",
330
+ group: "output",
331
+ binding: { type: "zeebe:taskHeader", key: "resultVariable" },
332
+ },
333
+ ],
334
+ },
335
+ // ── File Watch Trigger ────────────────────────────────────────────────────
336
+ {
337
+ id: "io.bpmnkit.trigger.file-watch",
338
+ name: "File Watch Trigger",
339
+ version: 1,
340
+ description: "Watch a directory and start a process instance when files are created or changed.",
341
+ appliesTo: ["bpmn:ServiceTask"],
342
+ icon: { contents: WATCH_ICON },
343
+ groups: [
344
+ { id: "watch", label: "Watch" },
345
+ { id: "filter", label: "Filter" },
346
+ ],
347
+ properties: [
348
+ {
349
+ id: "taskType",
350
+ type: "Hidden",
351
+ value: "io.bpmnkit:trigger:file-watch:1",
352
+ binding: { type: "zeebe:taskDefinition", property: "type" },
353
+ },
354
+ {
355
+ id: "watchPath",
356
+ label: "Watch path",
357
+ description: "Directory to watch for file changes. Absolute or ~/relative path.",
358
+ type: "String",
359
+ group: "watch",
360
+ constraints: { notEmpty: true },
361
+ binding: { type: "zeebe:taskHeader", key: "watchPath" },
362
+ },
363
+ {
364
+ id: "events",
365
+ label: "Events",
366
+ description: "Which file system events trigger the process.",
367
+ type: "Dropdown",
368
+ value: "all",
369
+ group: "watch",
370
+ choices: [
371
+ { name: "Add or change (all)", value: "all" },
372
+ { name: "New files only (add)", value: "add" },
373
+ { name: "Modified files only (change)", value: "change" },
374
+ ],
375
+ binding: { type: "zeebe:taskHeader", key: "events" },
376
+ },
377
+ {
378
+ id: "glob",
379
+ label: "File filter (glob)",
380
+ description: "Only trigger for filenames matching this pattern (e.g. *.md, report_*.csv).",
381
+ type: "String",
382
+ optional: true,
383
+ group: "filter",
384
+ binding: { type: "zeebe:taskHeader", key: "glob" },
385
+ },
386
+ ],
387
+ },
388
+ // ── HTTP Scraper ──────────────────────────────────────────────────────────
389
+ {
390
+ id: "io.bpmnkit.http.scrape",
391
+ name: "HTTP Scraper",
392
+ version: 1,
393
+ description: "Fetch a URL and extract its text content and title. Returns { html, text, title, statusCode }.",
394
+ appliesTo: ["bpmn:ServiceTask"],
395
+ icon: { contents: HTTP_ICON },
396
+ groups: [
397
+ { id: "request", label: "Request" },
398
+ { id: "output", label: "Output" },
399
+ ],
400
+ properties: [
401
+ {
402
+ id: "taskType",
403
+ type: "Hidden",
404
+ value: "io.bpmnkit:http:scrape:1",
405
+ binding: { type: "zeebe:taskDefinition", property: "type" },
406
+ },
407
+ {
408
+ id: "url",
409
+ label: "URL",
410
+ description: "URL to fetch. Use {{varName}} for variables or {{secrets.NAME}} for secrets.",
411
+ type: "String",
412
+ feel: "optional",
413
+ group: "request",
414
+ constraints: { notEmpty: true },
415
+ binding: { type: "zeebe:taskHeader", key: "url" },
416
+ },
417
+ {
418
+ id: "timeout",
419
+ label: "Timeout (seconds)",
420
+ type: "Number",
421
+ value: 30,
422
+ group: "request",
423
+ binding: { type: "zeebe:taskHeader", key: "timeout" },
424
+ },
425
+ {
426
+ id: "resultVariable",
427
+ label: "Result variable",
428
+ description: "Process variable to store { url, html, text, title, statusCode }.",
429
+ type: "String",
430
+ value: "scrapeResult",
431
+ group: "output",
432
+ binding: { type: "zeebe:taskHeader", key: "resultVariable" },
433
+ },
434
+ ],
435
+ },
436
+ // ── Email Fetch ───────────────────────────────────────────────────────────
437
+ {
438
+ id: "io.bpmnkit.email.fetch",
439
+ name: "Fetch Emails",
440
+ version: 1,
441
+ description: "Fetch emails from an IMAP mailbox. Returns an array of { uid, subject, from, date, body }.",
442
+ appliesTo: ["bpmn:ServiceTask"],
443
+ icon: { contents: EMAIL_ICON },
444
+ groups: [
445
+ { id: "connection", label: "Connection" },
446
+ { id: "filter", label: "Filter" },
447
+ { id: "output", label: "Output" },
448
+ ],
449
+ properties: [
450
+ {
451
+ id: "taskType",
452
+ type: "Hidden",
453
+ value: "io.bpmnkit:email:fetch:1",
454
+ binding: { type: "zeebe:taskDefinition", property: "type" },
455
+ },
456
+ {
457
+ id: "imapHost",
458
+ label: "IMAP host",
459
+ type: "String",
460
+ group: "connection",
461
+ constraints: { notEmpty: true },
462
+ binding: { type: "zeebe:taskHeader", key: "imapHost" },
463
+ },
464
+ {
465
+ id: "imapPort",
466
+ label: "IMAP port",
467
+ type: "Number",
468
+ value: 993,
469
+ group: "connection",
470
+ binding: { type: "zeebe:taskHeader", key: "imapPort" },
471
+ },
472
+ {
473
+ id: "imapUser",
474
+ label: "Username",
475
+ type: "String",
476
+ group: "connection",
477
+ constraints: { notEmpty: true },
478
+ binding: { type: "zeebe:taskHeader", key: "imapUser" },
479
+ },
480
+ {
481
+ id: "imapPassword",
482
+ label: "Password",
483
+ type: "String",
484
+ group: "connection",
485
+ constraints: { notEmpty: true },
486
+ binding: { type: "zeebe:taskHeader", key: "imapPassword" },
487
+ },
488
+ {
489
+ id: "folder",
490
+ label: "Folder",
491
+ type: "String",
492
+ value: "INBOX",
493
+ group: "filter",
494
+ binding: { type: "zeebe:taskHeader", key: "folder" },
495
+ },
496
+ {
497
+ id: "limit",
498
+ label: "Max messages",
499
+ type: "Number",
500
+ value: 10,
501
+ group: "filter",
502
+ binding: { type: "zeebe:taskHeader", key: "limit" },
503
+ },
504
+ {
505
+ id: "unreadOnly",
506
+ label: "Unread only",
507
+ type: "Boolean",
508
+ value: true,
509
+ group: "filter",
510
+ binding: { type: "zeebe:taskHeader", key: "unreadOnly" },
511
+ },
512
+ {
513
+ id: "resultVariable",
514
+ label: "Result variable",
515
+ type: "String",
516
+ value: "emails",
517
+ group: "output",
518
+ binding: { type: "zeebe:taskHeader", key: "resultVariable" },
519
+ },
520
+ ],
521
+ },
522
+ // ── Email Send ────────────────────────────────────────────────────────────
523
+ {
524
+ id: "io.bpmnkit.email.send",
525
+ name: "Send Email",
526
+ version: 1,
527
+ description: "Send an email via SMTP. Reads to/subject/body from process variables.",
528
+ appliesTo: ["bpmn:ServiceTask"],
529
+ icon: { contents: EMAIL_ICON },
530
+ groups: [
531
+ { id: "connection", label: "Connection" },
532
+ { id: "message", label: "Message" },
533
+ ],
534
+ properties: [
535
+ {
536
+ id: "taskType",
537
+ type: "Hidden",
538
+ value: "io.bpmnkit:email:send:1",
539
+ binding: { type: "zeebe:taskDefinition", property: "type" },
540
+ },
541
+ {
542
+ id: "smtpHost",
543
+ label: "SMTP host",
544
+ type: "String",
545
+ group: "connection",
546
+ constraints: { notEmpty: true },
547
+ binding: { type: "zeebe:taskHeader", key: "smtpHost" },
548
+ },
549
+ {
550
+ id: "smtpPort",
551
+ label: "SMTP port",
552
+ type: "Number",
553
+ value: 587,
554
+ group: "connection",
555
+ binding: { type: "zeebe:taskHeader", key: "smtpPort" },
556
+ },
557
+ {
558
+ id: "smtpUser",
559
+ label: "Username",
560
+ type: "String",
561
+ group: "connection",
562
+ constraints: { notEmpty: true },
563
+ binding: { type: "zeebe:taskHeader", key: "smtpUser" },
564
+ },
565
+ {
566
+ id: "smtpPassword",
567
+ label: "Password",
568
+ type: "String",
569
+ group: "connection",
570
+ constraints: { notEmpty: true },
571
+ binding: { type: "zeebe:taskHeader", key: "smtpPassword" },
572
+ },
573
+ {
574
+ id: "from",
575
+ label: "From address",
576
+ description: "Sender address. Defaults to SMTP username.",
577
+ type: "String",
578
+ optional: true,
579
+ group: "message",
580
+ binding: { type: "zeebe:taskHeader", key: "from" },
581
+ },
582
+ ],
583
+ },
584
+ ];
585
+ //# sourceMappingURL=builtin-templates.js.map