Add files via upload

This commit is contained in:
fcarraUniSa
2025-12-10 12:10:20 +01:00
committed by GitHub
parent 09e9174e4b
commit 8e7afde9e3
16 changed files with 1453 additions and 2 deletions

35
types.ts Normal file
View File

@@ -0,0 +1,35 @@
export interface EmailTemplate {
id: string;
name: string;
description: string;
subject: string;
header: string;
body: string;
footer: string;
variables: string[]; // List of placeholders found in the text
updatedAt: string;
}
export type ViewState = 'dashboard' | 'editor';
export interface ToastMessage {
id: string;
type: 'success' | 'error' | 'info';
text: string;
}
// Simple schema for n8n SQL generation
export const SQL_SCHEMA = `
CREATE TABLE IF NOT EXISTS email_templates (
id INT AUTO_INCREMENT PRIMARY KEY,
template_key VARCHAR(255) UNIQUE NOT NULL,
subject VARCHAR(255),
header_html TEXT,
body_html TEXT,
footer_html TEXT,
full_html TEXT,
required_variables JSON,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
);
`;