Add files via upload
This commit is contained in:
35
types.ts
Normal file
35
types.ts
Normal 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
|
||||
);
|
||||
`;
|
||||
Reference in New Issue
Block a user