interface TempItem {
  id: string;
  name: string;
  url?: string;
  description?: string;
}

interface AppListResult {
  id: string;
  name: string;
}

interface ResultItem {
  key: number;
  role: 'ai' | 'user';
  content: string;
  footer?: any;
}
interface WordFlowItem {
  id: string;
  workflowRunId: string;
  taskId: string;
  userId: string;
  appId: string;
}

interface SpiderItem {
  id: string;
  name: string;
  url?: string;
  description?: string;
}

interface SpiderContext {
  userId: string;
  conversationId: string;
  files: [];
  inputs: Record<string, unknown>;
}
interface SpiderResult {
  data: {
    outputs: {
      result: string;
    };
  };
}

interface ResultItem {
  key: number;
  role: 'ai' | 'user';
  content: string;
  footer?: any;
}

interface Props {
  itemMessage?: ResultItem[];
  temp?: any;
  item?: SpiderItem;
  title: string;
  runSpider?: (context: any) => Promise<SpiderResult>;
  getSpiderStatus?: () => Promise<{
    status: string;
  }>;
  stopSpider?: () => Promise<{
    status: string;
  }>;
  runSpiderGz?: (appId: string, data: SpiderContext) => Promise<any>;
}

export type {
  AppListResult,
  Props,
  ResultItem,
  SpiderContext,
  SpiderResult,
  TempItem,
  WordFlowItem,
};
