146 lines
6.2 KiB
Python
146 lines
6.2 KiB
Python
# Copyright (c) 2025 Patrick Motsch
|
|
# Input/Human node definitions - nodes that require user action.
|
|
|
|
INPUT_NODES = [
|
|
{
|
|
"id": "input.form",
|
|
"category": "input",
|
|
"label": "Formular",
|
|
"description": "Benutzer füllt ein Formular aus",
|
|
"parameters": [
|
|
{
|
|
"name": "fields",
|
|
"type": "json",
|
|
"required": True,
|
|
"frontendType": "fieldBuilder",
|
|
"description": "Formularfelder",
|
|
"default": [],
|
|
},
|
|
],
|
|
"inputs": 1,
|
|
"outputs": 1,
|
|
"inputPorts": {0: {"accepts": ["Transit"]}},
|
|
"outputPorts": {0: {"schema": "FormPayload", "dynamic": True, "deriveFrom": "fields"}},
|
|
"executor": "input",
|
|
"meta": {"icon": "mdi-form-textbox", "color": "#9C27B0"},
|
|
},
|
|
{
|
|
"id": "input.approval",
|
|
"category": "input",
|
|
"label": "Genehmigung",
|
|
"description": "Benutzer genehmigt oder lehnt ab",
|
|
"parameters": [
|
|
{"name": "title", "type": "string", "required": True, "frontendType": "text",
|
|
"description": "Genehmigungstitel"},
|
|
{"name": "description", "type": "string", "required": False, "frontendType": "textarea",
|
|
"description": "Was genehmigt werden soll"},
|
|
{"name": "approvalType", "type": "string", "required": False, "frontendType": "select",
|
|
"frontendOptions": {"options": ["generic", "document"]},
|
|
"description": "Typ: document oder generic", "default": "generic"},
|
|
],
|
|
"inputs": 1,
|
|
"outputs": 1,
|
|
"inputPorts": {0: {"accepts": ["Transit"]}},
|
|
"outputPorts": {0: {"schema": "BoolResult"}},
|
|
"executor": "input",
|
|
"meta": {"icon": "mdi-check-decagram", "color": "#4CAF50"},
|
|
},
|
|
{
|
|
"id": "input.upload",
|
|
"category": "input",
|
|
"label": "Upload",
|
|
"description": "Benutzer lädt Datei(en) hoch",
|
|
"parameters": [
|
|
{"name": "accept", "type": "string", "required": False, "frontendType": "text",
|
|
"description": "Accept-String", "default": ""},
|
|
{"name": "allowedTypes", "type": "json", "required": False, "frontendType": "multiselect",
|
|
"frontendOptions": {"options": ["pdf", "docx", "xlsx", "pptx", "txt", "csv", "jpg", "png", "gif"]},
|
|
"description": "Ausgewählte Dateitypen", "default": []},
|
|
{"name": "maxSize", "type": "number", "required": False, "frontendType": "number",
|
|
"description": "Max. Dateigröße in MB", "default": 10},
|
|
{"name": "multiple", "type": "boolean", "required": False, "frontendType": "checkbox",
|
|
"description": "Mehrere Dateien erlauben", "default": False},
|
|
],
|
|
"inputs": 1,
|
|
"outputs": 1,
|
|
"inputPorts": {0: {"accepts": ["Transit"]}},
|
|
"outputPorts": {0: {"schema": "DocumentList"}},
|
|
"executor": "input",
|
|
"meta": {"icon": "mdi-upload", "color": "#2196F3"},
|
|
},
|
|
{
|
|
"id": "input.comment",
|
|
"category": "input",
|
|
"label": "Kommentar",
|
|
"description": "Benutzer fügt einen Kommentar hinzu",
|
|
"parameters": [
|
|
{"name": "placeholder", "type": "string", "required": False, "frontendType": "text",
|
|
"description": "Platzhalter", "default": ""},
|
|
{"name": "required", "type": "boolean", "required": False, "frontendType": "checkbox",
|
|
"description": "Kommentar erforderlich", "default": True},
|
|
],
|
|
"inputs": 1,
|
|
"outputs": 1,
|
|
"inputPorts": {0: {"accepts": ["Transit"]}},
|
|
"outputPorts": {0: {"schema": "TextResult"}},
|
|
"executor": "input",
|
|
"meta": {"icon": "mdi-comment-text", "color": "#FF9800"},
|
|
},
|
|
{
|
|
"id": "input.review",
|
|
"category": "input",
|
|
"label": "Prüfung",
|
|
"description": "Benutzer prüft Inhalt",
|
|
"parameters": [
|
|
{"name": "contentRef", "type": "string", "required": True, "frontendType": "text",
|
|
"description": "Referenz auf Inhalt"},
|
|
{"name": "reviewType", "type": "string", "required": False, "frontendType": "select",
|
|
"frontendOptions": {"options": ["generic", "document"]},
|
|
"description": "Art der Prüfung", "default": "generic"},
|
|
],
|
|
"inputs": 1,
|
|
"outputs": 1,
|
|
"inputPorts": {0: {"accepts": ["Transit"]}},
|
|
"outputPorts": {0: {"schema": "BoolResult"}},
|
|
"executor": "input",
|
|
"meta": {"icon": "mdi-magnify-scan", "color": "#673AB7"},
|
|
},
|
|
{
|
|
"id": "input.selection",
|
|
"category": "input",
|
|
"label": "Auswahl",
|
|
"description": "Benutzer wählt aus Optionen",
|
|
"parameters": [
|
|
{"name": "options", "type": "json", "required": True, "frontendType": "keyValueRows",
|
|
"description": "Optionen", "default": []},
|
|
{"name": "multiple", "type": "boolean", "required": False, "frontendType": "checkbox",
|
|
"description": "Mehrfachauswahl erlauben", "default": False},
|
|
],
|
|
"inputs": 1,
|
|
"outputs": 1,
|
|
"inputPorts": {0: {"accepts": ["Transit"]}},
|
|
"outputPorts": {0: {"schema": "TextResult"}},
|
|
"executor": "input",
|
|
"meta": {"icon": "mdi-format-list-checks", "color": "#009688"},
|
|
},
|
|
{
|
|
"id": "input.confirmation",
|
|
"category": "input",
|
|
"label": "Bestätigung",
|
|
"description": "Benutzer bestätigt Ja/Nein",
|
|
"parameters": [
|
|
{"name": "question", "type": "string", "required": True, "frontendType": "text",
|
|
"description": "Zu bestätigende Frage"},
|
|
{"name": "confirmLabel", "type": "string", "required": False, "frontendType": "text",
|
|
"description": "Label für Bestätigen-Button", "default": "Confirm"},
|
|
{"name": "rejectLabel", "type": "string", "required": False, "frontendType": "text",
|
|
"description": "Label für Ablehnen-Button", "default": "Reject"},
|
|
],
|
|
"inputs": 1,
|
|
"outputs": 1,
|
|
"inputPorts": {0: {"accepts": ["Transit"]}},
|
|
"outputPorts": {0: {"schema": "BoolResult"}},
|
|
"executor": "input",
|
|
"meta": {"icon": "mdi-checkbox-marked-circle", "color": "#8BC34A"},
|
|
},
|
|
]
|