Feat: Assign conversations to teams. (#1849)
This commit is contained in:
parent
941d4219f0
commit
c99c63cd79
10 changed files with 231 additions and 12 deletions
|
@ -33,12 +33,17 @@ class ConversationApi extends ApiClient {
|
|||
}
|
||||
|
||||
assignAgent({ conversationId, agentId }) {
|
||||
axios.post(
|
||||
return axios.post(
|
||||
`${this.url}/${conversationId}/assignments?assignee_id=${agentId}`,
|
||||
{}
|
||||
);
|
||||
}
|
||||
|
||||
assignTeam({ conversationId, teamId }) {
|
||||
const params = { team_id: teamId };
|
||||
return axios.post(`${this.url}/${conversationId}/assignments`, params);
|
||||
}
|
||||
|
||||
markMessageRead({ id }) {
|
||||
return axios.post(`${this.url}/${id}/update_last_seen`);
|
||||
}
|
||||
|
|
|
@ -11,6 +11,7 @@ describe('#ConversationAPI', () => {
|
|||
expect(conversationAPI).toHaveProperty('delete');
|
||||
expect(conversationAPI).toHaveProperty('toggleStatus');
|
||||
expect(conversationAPI).toHaveProperty('assignAgent');
|
||||
expect(conversationAPI).toHaveProperty('assignTeam');
|
||||
expect(conversationAPI).toHaveProperty('markMessageRead');
|
||||
expect(conversationAPI).toHaveProperty('toggleTyping');
|
||||
expect(conversationAPI).toHaveProperty('mute');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue