|
|
@ -1,6 +1,6 @@ |
|
|
import request from '@/utils/request'; |
|
|
import request from '@/utils/request'; |
|
|
import { AxiosPromise } from 'axios'; |
|
|
import { AxiosPromise } from 'axios'; |
|
|
import { matterPage,createDir,matterTreeList,matterInfo} from './type'; |
|
|
import { matterPage,createDir,matterTreeList,apptoken} from './type'; |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 获取空间目录文件 |
|
|
* 获取空间目录文件 |
|
|
@ -11,7 +11,8 @@ export function getSpaceMatterList( uid:string,data?: matterPage): AxiosPromise< |
|
|
method: 'post', |
|
|
method: 'post', |
|
|
headers: { |
|
|
headers: { |
|
|
'Identifier':uid, |
|
|
'Identifier':uid, |
|
|
'Content-Type': 'application/x-www-form-urlencoded' |
|
|
'Content-Type': 'application/x-www-form-urlencoded', |
|
|
|
|
|
'App-Api-Token': apptoken |
|
|
}, |
|
|
}, |
|
|
data: data |
|
|
data: data |
|
|
}); |
|
|
}); |
|
|
@ -26,7 +27,8 @@ export function doCreateSpaceDir(uid:string,data?: createDir){ |
|
|
method: 'post', |
|
|
method: 'post', |
|
|
headers: { |
|
|
headers: { |
|
|
'Identifier':uid, |
|
|
'Identifier':uid, |
|
|
'Content-Type': 'application/x-www-form-urlencoded' |
|
|
'Content-Type': 'application/x-www-form-urlencoded', |
|
|
|
|
|
'App-Api-Token': apptoken |
|
|
}, |
|
|
}, |
|
|
data: data |
|
|
data: data |
|
|
}); |
|
|
}); |
|
|
@ -38,7 +40,8 @@ export function doCreateAiagent(uid:string,data?: {space:string,matter:string}){ |
|
|
method: 'post', |
|
|
method: 'post', |
|
|
headers: { |
|
|
headers: { |
|
|
'Identifier':uid, |
|
|
'Identifier':uid, |
|
|
'Content-Type': 'application/x-www-form-urlencoded' |
|
|
'Content-Type': 'application/x-www-form-urlencoded', |
|
|
|
|
|
'App-Api-Token': apptoken |
|
|
}, |
|
|
}, |
|
|
data: data |
|
|
data: data |
|
|
}); |
|
|
}); |
|
|
@ -53,7 +56,8 @@ export function doAccessManage(uid:string,data?: any){ |
|
|
method: 'post', |
|
|
method: 'post', |
|
|
headers: { |
|
|
headers: { |
|
|
'Identifier':uid, |
|
|
'Identifier':uid, |
|
|
'Content-Type': 'application/x-www-form-urlencoded' |
|
|
'Content-Type': 'application/x-www-form-urlencoded', |
|
|
|
|
|
'App-Api-Token': apptoken |
|
|
}, |
|
|
}, |
|
|
data: data |
|
|
data: data |
|
|
}); |
|
|
}); |
|
|
@ -68,7 +72,8 @@ export function doDelSpace(uid:string,data?: any){ |
|
|
method: 'post', |
|
|
method: 'post', |
|
|
headers: { |
|
|
headers: { |
|
|
'Identifier':uid, |
|
|
'Identifier':uid, |
|
|
'Content-Type': 'application/x-www-form-urlencoded' |
|
|
'Content-Type': 'application/x-www-form-urlencoded', |
|
|
|
|
|
'App-Api-Token': apptoken |
|
|
}, |
|
|
}, |
|
|
data: data |
|
|
data: data |
|
|
}); |
|
|
}); |
|
|
@ -83,7 +88,8 @@ export function spaceMatterRename(uid:string,data?: any){ |
|
|
method: 'post', |
|
|
method: 'post', |
|
|
headers: { |
|
|
headers: { |
|
|
'Identifier':uid, |
|
|
'Identifier':uid, |
|
|
'Content-Type': 'application/x-www-form-urlencoded' |
|
|
'Content-Type': 'application/x-www-form-urlencoded', |
|
|
|
|
|
'App-Api-Token': apptoken |
|
|
}, |
|
|
}, |
|
|
data: data |
|
|
data: data |
|
|
}); |
|
|
}); |
|
|
@ -99,7 +105,8 @@ export function doDelSpaceMatter(uid:string,data?: any){ |
|
|
method: 'post', |
|
|
method: 'post', |
|
|
headers: { |
|
|
headers: { |
|
|
'Identifier':uid, |
|
|
'Identifier':uid, |
|
|
'Content-Type': 'application/x-www-form-urlencoded' |
|
|
'Content-Type': 'application/x-www-form-urlencoded', |
|
|
|
|
|
'App-Api-Token': apptoken |
|
|
}, |
|
|
}, |
|
|
data: data |
|
|
data: data |
|
|
}); |
|
|
}); |
|
|
@ -114,7 +121,8 @@ export function doAiTraining(_url:string,data?: any){ |
|
|
url: '/aibot'+_url, |
|
|
url: '/aibot'+_url, |
|
|
method: 'post', |
|
|
method: 'post', |
|
|
headers: { |
|
|
headers: { |
|
|
'Content-Type': 'application/x-www-form-urlencoded' |
|
|
'Content-Type': 'application/x-www-form-urlencoded', |
|
|
|
|
|
'App-Api-Token': apptoken |
|
|
}, |
|
|
}, |
|
|
data: data |
|
|
data: data |
|
|
}); |
|
|
}); |
|
|
@ -125,7 +133,8 @@ export function doAiDocDels(_url:string,data?: any){ |
|
|
url: '/aibot'+_url, |
|
|
url: '/aibot'+_url, |
|
|
method: 'post', |
|
|
method: 'post', |
|
|
headers: { |
|
|
headers: { |
|
|
'Content-Type': 'application/x-www-form-urlencoded' |
|
|
'Content-Type': 'application/x-www-form-urlencoded', |
|
|
|
|
|
'App-Api-Token': apptoken |
|
|
}, |
|
|
}, |
|
|
data: data |
|
|
data: data |
|
|
}); |
|
|
}); |
|
|
@ -149,7 +158,8 @@ export function doAiChat(_url:string,data: aiChatData,sig?:AbortSignal){ |
|
|
_url,{ |
|
|
_url,{ |
|
|
method: 'post', |
|
|
method: 'post', |
|
|
headers: { |
|
|
headers: { |
|
|
'Content-Type': 'application/json' |
|
|
'Content-Type': 'application/json', |
|
|
|
|
|
'App-Api-Token': apptoken |
|
|
}, |
|
|
}, |
|
|
signal:sig, |
|
|
signal:sig, |
|
|
body: JSON.stringify(data) |
|
|
body: JSON.stringify(data) |
|
|
@ -165,7 +175,8 @@ export function doAiWorkflow(_url:string,data: aiChatData){ |
|
|
_url,{ |
|
|
_url,{ |
|
|
method: 'post', |
|
|
method: 'post', |
|
|
headers: { |
|
|
headers: { |
|
|
'Content-Type': 'application/json' |
|
|
'Content-Type': 'application/json', |
|
|
|
|
|
'App-Api-Token': apptoken |
|
|
}, |
|
|
}, |
|
|
body: JSON.stringify(data) |
|
|
body: JSON.stringify(data) |
|
|
} |
|
|
} |
|
|
@ -180,9 +191,10 @@ export function setAgentQueryURL(uuid:string,data: {urls:string}){ |
|
|
url: `/aibot/agents/${uuid}/query/url`, |
|
|
url: `/aibot/agents/${uuid}/query/url`, |
|
|
method: 'post', |
|
|
method: 'post', |
|
|
headers: { |
|
|
headers: { |
|
|
'Content-Type': 'application/json' |
|
|
'Content-Type': 'application/json', |
|
|
|
|
|
'App-Api-Token': apptoken |
|
|
}, |
|
|
}, |
|
|
data: JSON.stringify(data) |
|
|
data: data |
|
|
} |
|
|
} |
|
|
) |
|
|
) |
|
|
} |
|
|
} |
|
|
@ -207,6 +219,10 @@ export function getAiChatList(data:any){ |
|
|
return request({ |
|
|
return request({ |
|
|
url: '/aibot/chat/list', |
|
|
url: '/aibot/chat/list', |
|
|
method: 'post', |
|
|
method: 'post', |
|
|
|
|
|
headers: { |
|
|
|
|
|
'Content-Type': 'application/json', |
|
|
|
|
|
'App-Api-Token': apptoken |
|
|
|
|
|
}, |
|
|
data: data |
|
|
data: data |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
@ -220,6 +236,10 @@ export function getAiChat(data: any){ |
|
|
return request({ |
|
|
return request({ |
|
|
url: '/aibot/chat', |
|
|
url: '/aibot/chat', |
|
|
method: 'post', |
|
|
method: 'post', |
|
|
|
|
|
headers: { |
|
|
|
|
|
'Content-Type': 'application/json', |
|
|
|
|
|
'App-Api-Token': apptoken |
|
|
|
|
|
}, |
|
|
data: data |
|
|
data: data |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
@ -233,6 +253,10 @@ export function delAiChat(data: any){ |
|
|
return request({ |
|
|
return request({ |
|
|
url: '/aibot/chat/del', |
|
|
url: '/aibot/chat/del', |
|
|
method: 'post', |
|
|
method: 'post', |
|
|
|
|
|
headers: { |
|
|
|
|
|
'Content-Type': 'application/json', |
|
|
|
|
|
'App-Api-Token': apptoken |
|
|
|
|
|
}, |
|
|
data: data |
|
|
data: data |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
@ -246,6 +270,10 @@ export function setAiChat(data: any){ |
|
|
return request({ |
|
|
return request({ |
|
|
url: '/aibot/chat/update', |
|
|
url: '/aibot/chat/update', |
|
|
method: 'post', |
|
|
method: 'post', |
|
|
|
|
|
headers: { |
|
|
|
|
|
'Content-Type': 'application/json', |
|
|
|
|
|
'App-Api-Token': apptoken |
|
|
|
|
|
}, |
|
|
data: data |
|
|
data: data |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
@ -258,6 +286,10 @@ export function getAiagentList(data?: any){ |
|
|
return request({ |
|
|
return request({ |
|
|
url: '/aibot/agent/list', |
|
|
url: '/aibot/agent/list', |
|
|
method: 'post', |
|
|
method: 'post', |
|
|
|
|
|
headers: { |
|
|
|
|
|
'Content-Type': 'application/json', |
|
|
|
|
|
'App-Api-Token': apptoken |
|
|
|
|
|
}, |
|
|
data: data |
|
|
data: data |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
@ -283,6 +315,10 @@ export function newShareChat(data: any){ |
|
|
return request({ |
|
|
return request({ |
|
|
url: '/aibot/chat/share', |
|
|
url: '/aibot/chat/share', |
|
|
method: 'post', |
|
|
method: 'post', |
|
|
|
|
|
headers: { |
|
|
|
|
|
'Content-Type': 'application/json', |
|
|
|
|
|
'App-Api-Token': apptoken |
|
|
|
|
|
}, |
|
|
data: data |
|
|
data: data |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |