b7ec272d13d7903216784401488a081d16b85b39
[motion2.git] / server / services / ami / rpc / voiceQueueReport.js
1 // *************************************************************************
2 // *                                                                       *
3 // * xCALLY Motion -  The Omnichannel Contact Center                       *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved                     *
5 // *                                                                       *
6 // *************************************************************************
7 // *                                                                       *
8 // * Email: info@xcally.com                                                *
9 // * Website: https://www.xcally.com                                       *
10 // *                                                                       *
11 // *************************************************************************
12 // *                                                                       *
13 // * The SOFTWARE PRODUCT is protected by copyright laws and international *
14 // * copyright treaties, as well as other intellectual property laws and   *
15 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                         *
16 // *                                                                       *
17 // *************************************************************************
18 var _0xd758=['endOf','day','YYYY-MM-DD\x20HH:mm:ss','queue','queuecallerjoinAt','queuecallerleaveAt','queuecallercompleteAt','queuecallerexitAt','queuecallerabandon','queuecallerabandonAt','GetVoiceQueueReports','moment','lodash','create','Request','CreateVoiceQueueReport','startOf','format'];(function(_0x96c5b3,_0x1b2612){var _0x428cde=function(_0xe86cf5){while(--_0xe86cf5){_0x96c5b3['push'](_0x96c5b3['shift']());}};_0x428cde(++_0x1b2612);}(_0xd758,0x1df));var _0x8d75=function(_0xa7d4bf,_0xe3c857){_0xa7d4bf=_0xa7d4bf-0x0;var _0x1c65df=_0xd758[_0xa7d4bf];return _0x1c65df;};'use strict';var moment=require(_0x8d75('0x0'));var _=require(_0x8d75('0x1'));var client=require('../client');exports[_0x8d75('0x2')]=function(_0x40ba3f){return client[_0x8d75('0x3')](_0x8d75('0x4'),{'body':_0x40ba3f,'log':_0x8d75('0x4')});};exports['getVoiceQueueReports']=function(){return function(){return client['Request']('GetVoiceQueueReport',{'options':{'where':{'createdAt':{'$between':[moment()[_0x8d75('0x5')]('day')[_0x8d75('0x6')]('YYYY-MM-DD\x20HH:mm:ss'),moment()[_0x8d75('0x7')](_0x8d75('0x8'))['format'](_0x8d75('0x9'))]}},'attributes':['uniqueid',_0x8d75('0xa'),_0x8d75('0xb'),_0x8d75('0xc'),'queuecallercomplete',_0x8d75('0xd'),'queuecallerexit',_0x8d75('0xe'),_0x8d75('0xf'),_0x8d75('0x10')]},'log':_0x8d75('0x11')});};};