n8n-nodes-selfhosthub
Version:
Collection of n8n nodes for self-hosted AI services, including Leonardo.ai integration for AI image and content generation capabilities.
43 lines (42 loc) • 1.57 kB
TypeScript
import { TextElementParams, SubtitleElementParams, ExportConfig, ExportDestination } from './schema';
/**
* Validation result interface for consistent error reporting
*/
export interface ValidationResult {
isValid: boolean;
errors: string[];
warnings: string[];
}
/**
* Validate image element with src OR prompt requirement
* Images can use either a source URL or AI generation prompt, but not both
*/
export declare function validateImageElement(element: any, context?: string): string[];
/**
* Validate text element parameters for completeness and format
*/
export declare function validateTextElementParams(params: TextElementParams): string[];
/**
* Validate subtitle element parameters
*/
export declare function validateSubtitleElementParams(params: SubtitleElementParams): string[];
/**
* Validate export configuration according to v2 API rules
*/
export declare function validateExportConfig(exportConfig: ExportConfig, context?: string): string[];
/**
* Validate individual export destination
*/
export declare function validateExportDestination(destination: ExportDestination, context?: string): string[];
/**
* Validate movie-level elements against API rules
*/
export declare function validateMovieElements(elements: any[]): string[];
/**
* Validate scene-level elements against API rules
*/
export declare function validateSceneElements(elements: any[], sceneContext?: string): string[];
/**
* Validate complete JSON2Video request structure
*/
export declare function validateJSON2VideoRequest(request: any): ValidationResult;