gateway/modules/features/graphicalEditor/nodeDefinitions/triggers.py
2026-04-07 00:49:08 +02:00

64 lines
2.4 KiB
Python

# Copyright (c) 2025 Patrick Motsch
# Canvas start nodes — variant reflects workflow configuration (gear in editor).
TRIGGER_NODES = [
{
"id": "trigger.manual",
"category": "trigger",
"label": {"en": "Start", "de": "Start", "fr": "Départ"},
"description": {
"en": "Manual, API, or background triggers (webhook, email, …).",
"de": "Manuell, API oder Hintergrund-Starts (Webhook, E-Mail, …).",
"fr": "Manuel, API ou déclencheurs en arrière-plan.",
},
"parameters": [],
"inputs": 0,
"outputs": 1,
"executor": "trigger",
"meta": {"icon": "mdi-play", "color": "#4CAF50"},
},
{
"id": "trigger.form",
"category": "trigger",
"label": {"en": "Start (form)", "de": "Start (Formular)", "fr": "Départ (formulaire)"},
"description": {
"en": "Form fields are filled at run time; configure fields on this node.",
"de": "Felder werden beim Start befüllt; konfigurieren Sie die Felder auf dieser Node.",
"fr": "Les champs sont remplis au démarrage.",
},
"parameters": [
{
"name": "formFields",
"type": "json",
"required": False,
"description": {"en": "Field definitions", "de": "Felddefinitionen", "fr": "Définitions"},
},
],
"inputs": 0,
"outputs": 1,
"executor": "trigger",
"meta": {"icon": "mdi-form-select", "color": "#9C27B0"},
},
{
"id": "trigger.schedule",
"category": "trigger",
"label": {"en": "Start (schedule)", "de": "Start (Zeitplan)", "fr": "Départ (planification)"},
"description": {
"en": "Cron expression for scheduled runs (configure on this node).",
"de": "Cron-Ausdruck für geplante Läufe.",
"fr": "Expression cron pour les exécutions planifiées.",
},
"parameters": [
{
"name": "cron",
"type": "string",
"required": False,
"description": {"en": "Cron expression", "de": "Cron-Ausdruck", "fr": "Expression cron"},
},
],
"inputs": 0,
"outputs": 1,
"executor": "trigger",
"meta": {"icon": "mdi-clock", "color": "#2196F3"},
},
]