mirror of
				https://github.com/lingble/chatwoot.git
				synced 2025-10-30 18:47:51 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			21 lines
		
	
	
		
			531 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			21 lines
		
	
	
		
			531 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| /* global axios */
 | |
| import ApiClient from './ApiClient';
 | |
| 
 | |
| class LiveReportsAPI extends ApiClient {
 | |
|   constructor() {
 | |
|     super('live_reports', { accountScoped: true, apiVersion: 'v2' });
 | |
|   }
 | |
| 
 | |
|   getConversationMetric(params = {}) {
 | |
|     return axios.get(`${this.url}/conversation_metrics`, { params });
 | |
|   }
 | |
| 
 | |
|   getGroupedConversations({ groupBy } = { groupBy: 'assignee_id' }) {
 | |
|     return axios.get(`${this.url}/grouped_conversation_metrics`, {
 | |
|       params: { group_by: groupBy },
 | |
|     });
 | |
|   }
 | |
| }
 | |
| 
 | |
| export default new LiveReportsAPI();
 | 
