28 lines
830 B
TypeScript
28 lines
830 B
TypeScript
import client from './client'
|
|
export * from './channelSubject'
|
|
export * from './channelAccount'
|
|
|
|
export function createConversation(data: any) {
|
|
return client.post('/api/v1/conversation', data)
|
|
}
|
|
|
|
export function listConversations() {
|
|
return client.get('/api/v1/conversation/list')
|
|
}
|
|
|
|
export function updateConversation(id: number, data: any) {
|
|
return client.put(`/api/v1/conversation/${id}`, data)
|
|
}
|
|
|
|
export function deleteConversation(id: number) {
|
|
return client.delete(`/api/v1/conversation/${id}`)
|
|
}
|
|
|
|
export function bindConversationAccount(conversationId: number, data: any) {
|
|
return client.post(`/api/v1/conversation/${conversationId}/bind-account`, data)
|
|
}
|
|
|
|
export function bindConversationTags(conversationId: number, data: any) {
|
|
return client.post(`/api/v1/conversation/${conversationId}/bind-tags`, data)
|
|
}
|