File size: 3,203 Bytes
a1ddd34
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
fe029e8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
export interface MediaItem {
  name: string;
  type: "image" | "video";
  width: number;
  height: number;
  mtime: number;
  url: string;
  filename?: string;
  thumb?: string;
  prompt?: string | null;
  prompt_id?: string | null;
}

export interface LoraTrainingStatus {
  ok: boolean;
  status: string;
  running?: boolean;
  job_name?: string | null;
  current_step: number;
  total_steps: number;
  progress_percent?: number | null;
  loss?: number | null;
  lr?: number | null;
  elapsed?: string | null;
  eta?: string | null;
  seconds_per_step?: number | null;
  gpu_util?: number | null;
  vram_percent?: number | null;
  updated_at: string;
  error?: string | null;
}

export interface LoraCheckpoint {
  name: string;
  filename?: string;
  step?: number | null;
  path: string;
  size_bytes: number;
  modified_at: string;
  created_at?: string;
}

export interface LoraCheckpointsResponse {
  ok: boolean;
  job_name: string;
  checkpoints: LoraCheckpoint[];
  count: number;
  updated_at: string;
}

export interface JobItem {
  prompt_id: string;
  status: "pending" | "running" | "completed" | "failed" | string;
  mode?: string;
  prompt?: string;
  created_at?: string;
  queue_position?: number | null;
  current_node?: string | null;
  step_value?: number;
  step_max?: number;
  nodes_finished?: number;
  nodes_total?: number;
  progress_percent?: number | null;
  error?: string;
}

export interface Project {
  id: string;
  title: string;
  description: string | null;
  aspect_ratio: string;
  duration_seconds: number | null;
  status: string;
  characters: string[];
  metadata: Record<string, unknown>;
  created_at?: string;
  updated_at?: string;
}

export interface Scene {
  id: string;
  project_id: string;
  scene_number: number;
  heading: string | null;
  summary: string | null;
  location: string | null;
  time_of_day: string | null;
  characters: string[];
  metadata: Record<string, unknown>;
}

export interface Shot {
  id: string;
  project_id: string;
  scene_id: string;
  shot_number: number;
  text: string | null;
  description: string | null;
  voiceover: string | null;
  image_prompt: string | null;
  motion_prompt: string | null;
  camera_motion: string | null;
  characters: string[];
  duration_seconds: number;
  status: string;
  image_file: string | null;
  video_file: string | null;
  image_prompt_id: string | null;
  video_prompt_id: string | null;
  metadata: Record<string, unknown>;
}


export interface ShotVersion {
  id: string;
  project_id: string;
  scene_id: string;
  shot_id: string;
  version_number: number;
  kind: "image" | "video";
  status: string;
  prompt: string | null;
  file: string | null;
  prompt_id: string | null;
  metadata: Record<string, unknown>;
  created_at?: string;
}

export type ProjectPhase = "outline" | "remix";

export interface ProjectModeData {
  project: Project;
  scenes: Scene[];
  shots: Shot[];
  selectedSceneId: string | null;
  selectedShotId: string | null;
  phase: ProjectPhase;
  onSelectScene: (sceneId: string) => void;
  onSelectShot: (shotId: string | null) => void;
  onBack: () => void;
  onRefresh: () => Promise<void> | void;
  onAddScene: () => Promise<void> | void;
}