131 lines
5.8 KiB
Python
131 lines
5.8 KiB
Python
# Copyright (c) 2025 Patrick Motsch
|
|
# SharePoint node definitions - map to methodSharepoint actions.
|
|
|
|
SHAREPOINT_NODES = [
|
|
{
|
|
"id": "sharepoint.findFile",
|
|
"category": "sharepoint",
|
|
"label": "Datei finden",
|
|
"description": "Datei nach Pfad oder Suche finden",
|
|
"parameters": [
|
|
{"name": "connectionReference", "type": "string", "required": True, "frontendType": "userConnection",
|
|
"description": "SharePoint-Verbindung"},
|
|
{"name": "searchQuery", "type": "string", "required": True, "frontendType": "text",
|
|
"description": "Suchanfrage oder Pfad"},
|
|
{"name": "site", "type": "string", "required": False, "frontendType": "text",
|
|
"description": "Optionaler Site-Hinweis", "default": ""},
|
|
{"name": "maxResults", "type": "number", "required": False, "frontendType": "number",
|
|
"description": "Max Ergebnisse", "default": 1000},
|
|
],
|
|
"inputs": 1,
|
|
"outputs": 1,
|
|
"inputPorts": {0: {"accepts": ["Transit"]}},
|
|
"outputPorts": {0: {"schema": "FileList"}},
|
|
"meta": {"icon": "mdi-file-search", "color": "#0078D4"},
|
|
"_method": "sharepoint",
|
|
"_action": "findDocumentPath",
|
|
},
|
|
{
|
|
"id": "sharepoint.readFile",
|
|
"category": "sharepoint",
|
|
"label": "Datei lesen",
|
|
"description": "Inhalt aus Datei extrahieren",
|
|
"parameters": [
|
|
{"name": "connectionReference", "type": "string", "required": True, "frontendType": "userConnection",
|
|
"description": "SharePoint-Verbindung"},
|
|
{"name": "pathQuery", "type": "string", "required": True, "frontendType": "sharepointFile",
|
|
"frontendOptions": {"dependsOn": "connectionReference"},
|
|
"description": "Dateipfad"},
|
|
],
|
|
"inputs": 1,
|
|
"outputs": 1,
|
|
"inputPorts": {0: {"accepts": ["FileList", "Transit"]}},
|
|
"outputPorts": {0: {"schema": "DocumentList"}},
|
|
"meta": {"icon": "mdi-file-document", "color": "#0078D4"},
|
|
"_method": "sharepoint",
|
|
"_action": "readDocuments",
|
|
},
|
|
{
|
|
"id": "sharepoint.uploadFile",
|
|
"category": "sharepoint",
|
|
"label": "Datei hochladen",
|
|
"description": "Datei zu SharePoint hochladen",
|
|
"parameters": [
|
|
{"name": "connectionReference", "type": "string", "required": True, "frontendType": "userConnection",
|
|
"description": "SharePoint-Verbindung"},
|
|
{"name": "pathQuery", "type": "string", "required": True, "frontendType": "sharepointFolder",
|
|
"frontendOptions": {"dependsOn": "connectionReference"},
|
|
"description": "Zielordner-Pfad"},
|
|
],
|
|
"inputs": 1,
|
|
"outputs": 1,
|
|
"inputPorts": {0: {"accepts": ["DocumentList", "Transit"]}},
|
|
"outputPorts": {0: {"schema": "ActionResult"}},
|
|
"meta": {"icon": "mdi-upload", "color": "#0078D4"},
|
|
"_method": "sharepoint",
|
|
"_action": "uploadFile",
|
|
},
|
|
{
|
|
"id": "sharepoint.listFiles",
|
|
"category": "sharepoint",
|
|
"label": "Dateien auflisten",
|
|
"description": "Dateien in Ordner auflisten",
|
|
"parameters": [
|
|
{"name": "connectionReference", "type": "string", "required": True, "frontendType": "userConnection",
|
|
"description": "SharePoint-Verbindung"},
|
|
{"name": "pathQuery", "type": "string", "required": False, "frontendType": "sharepointFolder",
|
|
"frontendOptions": {"dependsOn": "connectionReference"},
|
|
"description": "Ordnerpfad", "default": "/"},
|
|
],
|
|
"inputs": 1,
|
|
"outputs": 1,
|
|
"inputPorts": {0: {"accepts": ["Transit"]}},
|
|
"outputPorts": {0: {"schema": "FileList"}},
|
|
"meta": {"icon": "mdi-folder-open", "color": "#0078D4"},
|
|
"_method": "sharepoint",
|
|
"_action": "listDocuments",
|
|
},
|
|
{
|
|
"id": "sharepoint.downloadFile",
|
|
"category": "sharepoint",
|
|
"label": "Datei herunterladen",
|
|
"description": "Datei vom Pfad herunterladen",
|
|
"parameters": [
|
|
{"name": "connectionReference", "type": "string", "required": True, "frontendType": "userConnection",
|
|
"description": "SharePoint-Verbindung"},
|
|
{"name": "pathQuery", "type": "string", "required": True, "frontendType": "sharepointFile",
|
|
"frontendOptions": {"dependsOn": "connectionReference"},
|
|
"description": "Vollständiger Dateipfad"},
|
|
],
|
|
"inputs": 1,
|
|
"outputs": 1,
|
|
"inputPorts": {0: {"accepts": ["FileList", "Transit"]}},
|
|
"outputPorts": {0: {"schema": "DocumentList"}},
|
|
"meta": {"icon": "mdi-download", "color": "#0078D4"},
|
|
"_method": "sharepoint",
|
|
"_action": "downloadFileByPath",
|
|
},
|
|
{
|
|
"id": "sharepoint.copyFile",
|
|
"category": "sharepoint",
|
|
"label": "Datei kopieren",
|
|
"description": "Datei an Ziel kopieren",
|
|
"parameters": [
|
|
{"name": "connectionReference", "type": "string", "required": True, "frontendType": "userConnection",
|
|
"description": "SharePoint-Verbindung"},
|
|
{"name": "sourcePath", "type": "string", "required": True, "frontendType": "sharepointFile",
|
|
"frontendOptions": {"dependsOn": "connectionReference"},
|
|
"description": "Quelldatei-Pfad"},
|
|
{"name": "destPath", "type": "string", "required": True, "frontendType": "sharepointFolder",
|
|
"frontendOptions": {"dependsOn": "connectionReference"},
|
|
"description": "Zielordner"},
|
|
],
|
|
"inputs": 1,
|
|
"outputs": 1,
|
|
"inputPorts": {0: {"accepts": ["Transit"]}},
|
|
"outputPorts": {0: {"schema": "ActionResult"}},
|
|
"meta": {"icon": "mdi-content-copy", "color": "#0078D4"},
|
|
"_method": "sharepoint",
|
|
"_action": "copyFile",
|
|
},
|
|
]
|