Updated iamge prompt flow adn frotnend backend
This commit is contained in:
@@ -1002,6 +1002,36 @@ export async function fetchTaskImages(filters: TaskImageFilters = {}): Promise<T
|
||||
return fetchAPI(endpoint);
|
||||
}
|
||||
|
||||
// Content Images (grouped by content)
|
||||
export interface ContentImage {
|
||||
id: number;
|
||||
image_type: string;
|
||||
image_url?: string | null;
|
||||
image_path?: string | null;
|
||||
prompt?: string | null;
|
||||
status: string;
|
||||
position: number;
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
}
|
||||
|
||||
export interface ContentImagesGroup {
|
||||
content_id: number;
|
||||
content_title: string;
|
||||
featured_image: ContentImage | null;
|
||||
in_article_images: ContentImage[];
|
||||
overall_status: 'pending' | 'partial' | 'complete' | 'failed';
|
||||
}
|
||||
|
||||
export interface ContentImagesResponse {
|
||||
count: number;
|
||||
results: ContentImagesGroup[];
|
||||
}
|
||||
|
||||
export async function fetchContentImages(): Promise<ContentImagesResponse> {
|
||||
return fetchAPI('/v1/writer/images/content_images/');
|
||||
}
|
||||
|
||||
export async function deleteTaskImage(id: number): Promise<void> {
|
||||
return fetchAPI(`/v1/writer/images/${id}/`, {
|
||||
method: 'DELETE',
|
||||
|
||||
Reference in New Issue
Block a user