-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsearch.ts
118 lines (105 loc) · 1.95 KB
/
search.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
export interface FileSearchIndexName {
Terminus: 'terminus';
Rss: 'rss';
}
export interface FileSearchAddRequest {
index?: FileSearchIndexName;
doc?: string;
path?: string;
filename?: string;
content?: string;
}
export interface FileSearchDeleteRequest {
index?: FileSearchIndexName;
docId?: string;
}
export interface FileSearchQueryRequest {
index?: FileSearchIndexName;
query?: string;
limit?: number;
offset?: number;
}
export interface FileSearchResponseItem {
name: string; //文件名
docId: string; //文件编号
where: string; //路径
type: string; //扩展名
size: number; //字节数
created: number; //创建时间戳
content: string; //文件内容
}
export interface FileSearchResponse {
count: number;
offset: number;
limit: number;
items: FileSearchResponseItem[];
}
export interface FileSearchAIQuestionRequest {
message: string;
callback: string;
conversationId?: string;
path?: string;
}
export interface FileSearchAIQuestionResponse {
messageId: string;
conversationId: string;
}
export interface FileSearchAIQuestionMessage {
messageId: string;
text: string;
model: string;
conversationId: string;
done: boolean;
}
export interface FileSearchRssAddRequest {
name: string;
entry_id: number;
created: number;
feed_infos: [
{
feed_id: number;
feed_name: number;
feed_icon: string;
}
];
borders: [
{
name: string;
id: number;
}
];
content: string;
}
export interface FileSearchRssDeleteRequest {
docId: string;
}
export interface FileSearchRssQueryRequest {
query: string;
limit: number;
}
export interface FileSearchRssResponseItem {
name: string;
entry_id: number;
created: number;
feed_infos: [
{
feed_id: number;
feed_name: number;
feed_icon: string;
}
];
borders: [
{
name: string;
id: number;
}
];
docId: string;
snippet: string;
}
export interface FileSearchRssQueryResponse {
count: 10;
offset: 0;
limit: 10;
items: FileSearchRssResponseItem[];
}