castad front 작업

This commit is contained in:
HyeongBaeYang committed 2025-12-23 11:01:31 +09:00
1 parent aa39cde4c6
commit a42562279e
30 files changed
+4332

No files matched your search

+96
View File
@@ -0,0 +1,96 @@
export interface CrawlingResponse {
image_list: string[];
image_count: number;
processed_info: {
customer_name: string;
region: string;
detail_region_info: string;
};
marketing_analysis: {
report: string;
tags: string[];
facilities: string[];
};
}
// URL 이미지 (서버에서 가져온 이미지)
export interface UrlImage {
type: 'url';
url: string;
}
// 업로드된 파일 이미지
export interface FileImage {
type: 'file';
file: File;
preview: string; // createObjectURL로 생성된 미리보기 URL
}
export type ImageItem = UrlImage | FileImage;
// 가사 생성 요청
export interface LyricGenerateRequest {
customer_name: string;
detail_region_info: string;
language: string;
region: string;
}
// 가사 생성 응답
export interface LyricGenerateResponse {
success: boolean;
lyric: string;
language: string;
prompt_used: string;
error_message: string | null;
}
// 노래 생성 요청
export interface SongGenerateRequest {
genre: string;
language: string;
lyrics: string;
}
// 노래 생성 응답
export interface SongGenerateResponse {
success: boolean;
task_id: string;
message: string;
error_message: string | null;
}
// 노래 상태 확인 응답
export interface SongStatusResponse {
success: boolean;
status: string;
message?: string;
clips?: Array<{
id: string;
audio_url: string;
stream_audio_url: string;
image_url: string;
title: string;
status: string | null;
duration: number;
}>;
}
// 노래 다운로드 응답
export interface SongDownloadResponse {
success: boolean;
message: string;
file_path: string;
file_url: string;
error_message: string | null;
}
// 언어 매핑
export const LANGUAGE_MAP: Record<string, string> = {
'한국어': 'Korean',
'English': 'English',
'中文': 'Chinese',
'日本語': 'Japanese',
'ไทย': 'Thai',
'Tiếng Việt': 'Vietnamese',
};