kv-app/lib/types/index.ts

84 lines
No EOL
1.6 KiB
TypeScript

export type NodeType = 'idea' | 'script' | 'image' | 'video';
export type NodeStatus = 'idle' | 'pending' | 'running' | 'completed' | 'error';
export interface WorkflowNode {
id: string;
type: NodeType;
data: {
prompt: string;
result?: string;
model?: string;
status: NodeStatus;
error?: string;
duration?: number;
aspectRatio?: string;
seed?: number;
};
position: { x: number; y: number };
}
export interface WorkflowEdge {
id: string;
source: string;
target: string;
type: string;
}
export interface AIWorkflowNode {
type: NodeType;
prompt: string;
model?: string;
options?: {
duration?: number;
aspectRatio?: string;
};
}
export interface TikTokVideo {
id: string;
url: string;
thumbnail: string;
caption: string;
playCount: number;
likeCount: number;
commentCount: number;
shareCount: number;
collectCount: number;
authorMeta: {
name: string;
nickName: string;
avatar: string;
};
musicMeta: {
musicName: string;
musicAuthor: string;
};
datePosted: string;
}
export interface TikTokProduct {
id: string;
title: string;
url: string;
thumbnail: string;
price: number;
originalPrice: number;
discount: number;
soldCount: number;
rating: number;
reviewCount: number;
sellerName: string;
shopUrl: string;
}
export interface AppSettings {
opencodeApiKey: string;
opencodeModel: string;
api34aiKey: string;
api34aiBaseUrl: string;
imageModel: string;
videoModel: string;
defaultDuration: number;
defaultAspectRatio: string;
tiktokCookies: string;
}