mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-01 19:48:08 +00:00
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com> Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com> Co-authored-by: iamsivin <iamsivin@gmail.com> Co-authored-by: Shivam Mishra <scm.mymail@gmail.com>
31 lines
670 B
JavaScript
31 lines
670 B
JavaScript
/* global axios */
|
|
import ApiClient from './ApiClient';
|
|
|
|
class AgentBotsAPI extends ApiClient {
|
|
constructor() {
|
|
super('agent_bots', { accountScoped: true });
|
|
}
|
|
|
|
create(data) {
|
|
return axios.post(this.url, data, {
|
|
headers: { 'Content-Type': 'multipart/form-data' },
|
|
});
|
|
}
|
|
|
|
update(id, data) {
|
|
return axios.patch(`${this.url}/${id}`, data, {
|
|
headers: { 'Content-Type': 'multipart/form-data' },
|
|
});
|
|
}
|
|
|
|
deleteAgentBotAvatar(botId) {
|
|
return axios.delete(`${this.url}/${botId}/avatar`);
|
|
}
|
|
|
|
resetAccessToken(botId) {
|
|
return axios.post(`${this.url}/${botId}/reset_access_token`);
|
|
}
|
|
}
|
|
|
|
export default new AgentBotsAPI();
|