mirror of
				https://github.com/lingble/chatwoot.git
				synced 2025-10-31 19:17:48 +00:00 
			
		
		
		
	 873cfa08d8
			
		
	
	873cfa08d8
	
	
	
		
			
			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();
 |