refactor: reorganize imports and update type references across services
- Updated import paths for types and utilities in config-service, menu-service, script-execution-service, script-store-service, and window-service to reflect new structure. - Moved utility functions like debounce and cloneDeep to shared utilities. - Created new runtime and script types files to centralize type definitions. - Removed deprecated task-types and locale messages files. - Updated constants to use shared definitions and added new placeholders for providers. - Enhanced provider type information with additional placeholders for different languages.
This commit is contained in:
53
electron/types/script-types.ts
Normal file
53
electron/types/script-types.ts
Normal file
@@ -0,0 +1,53 @@
|
||||
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[];
|
||||
}
|
||||
Reference in New Issue
Block a user