1 // *************************************************************************
3 // * xCALLY Motion - The Omnichannel Contact Center *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved *
6 // *************************************************************************
8 // * Email: info@xcally.com *
9 // * Website: https://www.xcally.com *
11 // *************************************************************************
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. *
17 // *************************************************************************
18 var _0xd3a7=['queue','Request','CreateCmHopperHistory','avgHandleTime','AvgHandleTime','subtract','minutes','format','YYYY-MM-DD\x20HH:mm:ss','GetCmHopperHistory','getVoiceQueueHopperHistory','GetVoiceQueueHopperHistory','startOf','day','getCampaignHopperHistory','endOf','ivr','GetCampaignHopperHistory','../client','moment','createHistory'];(function(_0x4abecc,_0x1ece1c){var _0x587d3f=function(_0x5d5458){while(--_0x5d5458){_0x4abecc['push'](_0x4abecc['shift']());}};_0x587d3f(++_0x1ece1c);}(_0xd3a7,0x1b6));var _0x7d3a=function(_0xe4c3ed,_0x36adc1){_0xe4c3ed=_0xe4c3ed-0x0;var _0x5f2766=_0xd3a7[_0xe4c3ed];return _0x5f2766;};'use strict';var client=require(_0x7d3a('0x0'));var moment=require(_0x7d3a('0x1'));exports[_0x7d3a('0x2')]=function(_0x331c30){return function(){_0x331c30['campaign']=_0x331c30[_0x7d3a('0x3')];return client[_0x7d3a('0x4')](_0x7d3a('0x5'),{'body':_0x331c30,'log':_0x7d3a('0x5')});};};exports[_0x7d3a('0x6')]=function(_0x361b68){return function(){return client[_0x7d3a('0x4')](_0x7d3a('0x7'),{'options':{'where':{'endtime':{'$between':[moment()[_0x7d3a('0x8')](_0x361b68,_0x7d3a('0x9'))[_0x7d3a('0xa')](_0x7d3a('0xb')),moment()[_0x7d3a('0xa')]('YYYY-MM-DD\x20HH:mm:ss')]}},'raw':![]},'log':_0x7d3a('0xc')});};};exports[_0x7d3a('0xd')]=function(_0x26373b){return function(){return client[_0x7d3a('0x4')](_0x7d3a('0xe'),{'options':{'where':{'createdAt':{'$between':[moment()[_0x7d3a('0xf')](_0x7d3a('0x10'))[_0x7d3a('0xa')]('YYYY-MM-DD\x20HH:mm:ss'),moment()['endOf'](_0x7d3a('0x10'))['format'](_0x7d3a('0xb'))]},'campaigntype':'queue'},'raw':![]},'log':_0x7d3a('0xe')});};};exports[_0x7d3a('0x11')]=function(_0x300a9f){return function(){return client[_0x7d3a('0x4')]('GetCampaignHopperHistory',{'options':{'where':{'createdAt':{'$between':[moment()[_0x7d3a('0xf')]('day')[_0x7d3a('0xa')](_0x7d3a('0xb')),moment()[_0x7d3a('0x12')](_0x7d3a('0x10'))[_0x7d3a('0xa')](_0x7d3a('0xb'))]},'campaigntype':_0x7d3a('0x13')},'raw':![]},'log':_0x7d3a('0x14')});};};