71 lines
1.1 KiB
TypeScript
71 lines
1.1 KiB
TypeScript
interface TempItem {
|
|
id: string;
|
|
name: string;
|
|
url?: 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;
|
|
}
|
|
|
|
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?: (data: SpiderContext) => Promise<any>;
|
|
}
|
|
|
|
export type {
|
|
Props,
|
|
ResultItem,
|
|
SpiderContext,
|
|
SpiderResult,
|
|
TempItem,
|
|
WordFlowItem,
|
|
};
|