mirror of
				https://github.com/lingble/chatwoot.git
				synced 2025-11-03 20:48:07 +00:00 
			
		
		
		
	Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com> Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
		
			
				
	
	
		
			51 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			51 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
/* global axios */
 | 
						|
import ApiClient from './ApiClient';
 | 
						|
 | 
						|
class SummaryReportsAPI extends ApiClient {
 | 
						|
  constructor() {
 | 
						|
    super('summary_reports', { accountScoped: true, apiVersion: 'v2' });
 | 
						|
  }
 | 
						|
 | 
						|
  getTeamReports({ since, until, businessHours } = {}) {
 | 
						|
    return axios.get(`${this.url}/team`, {
 | 
						|
      params: {
 | 
						|
        since,
 | 
						|
        until,
 | 
						|
        business_hours: businessHours,
 | 
						|
      },
 | 
						|
    });
 | 
						|
  }
 | 
						|
 | 
						|
  getAgentReports({ since, until, businessHours } = {}) {
 | 
						|
    return axios.get(`${this.url}/agent`, {
 | 
						|
      params: {
 | 
						|
        since,
 | 
						|
        until,
 | 
						|
        business_hours: businessHours,
 | 
						|
      },
 | 
						|
    });
 | 
						|
  }
 | 
						|
 | 
						|
  getInboxReports({ since, until, businessHours } = {}) {
 | 
						|
    return axios.get(`${this.url}/inbox`, {
 | 
						|
      params: {
 | 
						|
        since,
 | 
						|
        until,
 | 
						|
        business_hours: businessHours,
 | 
						|
      },
 | 
						|
    });
 | 
						|
  }
 | 
						|
 | 
						|
  getLabelReports({ since, until, businessHours } = {}) {
 | 
						|
    return axios.get(`${this.url}/label`, {
 | 
						|
      params: {
 | 
						|
        since,
 | 
						|
        until,
 | 
						|
        business_hours: businessHours,
 | 
						|
      },
 | 
						|
    });
 | 
						|
  }
 | 
						|
}
 | 
						|
 | 
						|
export default new SummaryReportsAPI();
 |