UNPKG

n8n-nodes-nextcloud-tables

Version:

Production-Ready n8n Node für Nextcloud Tables - Vollständige API-Abdeckung mit erweiterten Filtern, Multi-Column-Sorting, CSV-Import und professioneller Datenvalidierung

116 lines (115 loc) 4.23 kB
import { IExecuteFunctions, ILoadOptionsFunctions, IDataObject } from 'n8n-workflow'; import { Column } from '../interfaces'; import { FormatOptions } from './data.formatter'; /** * Zentrale Logging-Klasse für bessere Log-Kennzeichnung und Grep-Fähigkeit */ export declare class NextcloudTablesLogger { private static readonly NODE_PREFIX; /** * Debug-Level Logging (nur in Development/Verbose) */ static debug(context: string, message: string, data?: any): void; /** * Info-Level Logging für wichtige Operationen */ static info(context: string, message: string, data?: any): void; /** * Warning-Level Logging für potentielle Probleme */ static warn(context: string, message: string, data?: any): void; /** * Error-Level Logging für Fehler */ static error(context: string, message: string, error?: any, data?: any): void; /** * API-Request Logging für Debugging */ static apiRequest(method: string, endpoint: string, body?: any): void; /** * API-Response Logging für Debugging */ static apiResponse(method: string, endpoint: string, statusCode?: number, duration?: number): void; /** * Operation-Start Logging */ static operationStart(resource: string, operation: string, context?: any): void; /** * Operation-Success Logging */ static operationSuccess(resource: string, operation: string, duration?: number, result?: any): void; /** * Operation-Error Logging */ static operationError(resource: string, operation: string, error: any, duration?: number): void; /** * Validation-Error Logging */ static validationError(context: string, field: string, value: any, reason: string): void; } export declare class ApiHelper { /** * Macht einen API-Request an die Nextcloud Tables API */ static makeApiRequest<T>(context: IExecuteFunctions | ILoadOptionsFunctions, method: 'GET' | 'POST' | 'PUT' | 'DELETE', endpoint: string, body?: any, useQueryParams?: boolean): Promise<T>; /** * Erstellt die Basis-URL für API-Endpunkte */ static getBaseUrl(serverUrl: string): string; /** * Validiert eine Tabellen-ID */ static validateTableId(tableId: any): number; /** * Validiert eine View-ID */ static validateViewId(viewId: any): number; /** * Validiert eine Spalten-ID */ static validateColumnId(columnId: any): number; /** * Validiert eine Zeilen-ID */ static validateRowId(rowId: any): number; /** * Formatiert Zeilendaten für API-Requests */ static formatRowData(data: Record<string, any>, columns?: Column[], options?: FormatOptions): Record<string, any>; /** * Formatiert Zeilendaten mit einfacher Fallback-Logik (Legacy) */ static formatRowDataSimple(data: Record<string, any>): Record<string, any>; /** * Lädt Spalten-Informationen für eine Tabelle (Helper für Formatierung) */ static getTableColumns(context: IExecuteFunctions | ILoadOptionsFunctions, tableId: number): Promise<Column[]>; /** * Konvertiert Resource Locator zu ID - Production Version */ static getResourceId(resourceLocator: any): number; /** * Prüft ob ein Fehler wiederholbar ist */ private static isNonRetryableError; /** * Sleep-Hilfsfunktion für Retry-Delays */ private static sleep; /** * Verbesserte Fehlerbehandlung mit spezifischen HTTP-Status-Codes */ static handleApiError(error: any): never; /** * Lädt alle verfügbaren Tabellen */ static getTables(context: ILoadOptionsFunctions): Promise<any[]>; /** * Nextcloud Sharee API Request (für Benutzer-/Gruppensuche) */ static nextcloudShareeApiRequest(context: IExecuteFunctions | ILoadOptionsFunctions, method: string, endpoint: string, body?: IDataObject): Promise<IDataObject>; /** * Nextcloud OCS Users API Request (für Benutzer-/Gruppensuche) */ static nextcloudOcsUsersApiRequest(context: IExecuteFunctions | ILoadOptionsFunctions, method: string, endpoint: string, body?: IDataObject): Promise<IDataObject>; }