- Updated `generateUUID` function for improved readability and performance. - Deleted `logger.ts`, `other.ts`, `request.ts`, `storage.ts`, `tansParams.ts`, and `validate.ts` as they were no longer needed. - Simplified TypeScript configuration by removing unnecessary paths and aliases. - Enhanced Vite configuration for better project structure and maintainability.
54 lines
978 B
TypeScript
54 lines
978 B
TypeScript
export interface ScriptLastRun {
|
|
time: string;
|
|
success: boolean;
|
|
error?: string;
|
|
}
|
|
|
|
export interface AutomationScript {
|
|
id: string;
|
|
name: string;
|
|
description: string;
|
|
filename: string;
|
|
enabled: boolean;
|
|
channel: string;
|
|
createdAt: string;
|
|
updatedAt: string;
|
|
code?: string;
|
|
lastRun?: ScriptLastRun;
|
|
}
|
|
|
|
export interface ScriptSaveInput {
|
|
id?: string;
|
|
name: string;
|
|
description: string;
|
|
code: string;
|
|
channel: string;
|
|
enabled: boolean;
|
|
}
|
|
|
|
export interface ScriptExecutionResult {
|
|
success: boolean;
|
|
exitCode: number | null;
|
|
stdoutTail: string;
|
|
stderrTail: string;
|
|
error?: string;
|
|
}
|
|
|
|
export type ScriptRecordingStatus = 'idle' | 'recording' | 'stopped';
|
|
|
|
export interface ScriptMetaItem {
|
|
id: string;
|
|
name: string;
|
|
description: string;
|
|
filename: string;
|
|
enabled: boolean;
|
|
channel: string;
|
|
createdAt: string;
|
|
updatedAt: string;
|
|
lastRun?: ScriptLastRun;
|
|
}
|
|
|
|
export interface ScriptsMeta {
|
|
scripts: ScriptMetaItem[];
|
|
}
|