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 _0xb9a7=['getCampaignHopperHistory','GetCampaignHopperHistory','day','ivr','moment','queue','CreateCmHopperHistory','avgHandleTime','Request','AvgHandleTime','subtract','minutes','format','YYYY-MM-DD\x20HH:mm:ss','GetCmHopperHistory','GetVoiceQueueHopperHistory','startOf','endOf'];(function(_0x41172e,_0x9d4a76){var _0x442586=function(_0x9b8554){while(--_0x9b8554){_0x41172e['push'](_0x41172e['shift']());}};_0x442586(++_0x9d4a76);}(_0xb9a7,0x112));var _0x7b9a=function(_0x346737,_0x3e6081){_0x346737=_0x346737-0x0;var _0x1ade2e=_0xb9a7[_0x346737];return _0x1ade2e;};'use strict';var client=require('../client');var moment=require(_0x7b9a('0x0'));exports['createHistory']=function(_0x563857){return function(){_0x563857['campaign']=_0x563857[_0x7b9a('0x1')];return client['Request'](_0x7b9a('0x2'),{'body':_0x563857,'log':_0x7b9a('0x2')});};};exports[_0x7b9a('0x3')]=function(_0x24cae3){return function(){return client[_0x7b9a('0x4')](_0x7b9a('0x5'),{'options':{'where':{'endtime':{'$between':[moment()[_0x7b9a('0x6')](_0x24cae3,_0x7b9a('0x7'))[_0x7b9a('0x8')](_0x7b9a('0x9')),moment()['format'](_0x7b9a('0x9'))]}},'raw':![]},'log':_0x7b9a('0xa')});};};exports['getVoiceQueueHopperHistory']=function(_0x511e28){return function(){return client['Request'](_0x7b9a('0xb'),{'options':{'where':{'createdAt':{'$between':[moment()[_0x7b9a('0xc')]('day')[_0x7b9a('0x8')]('YYYY-MM-DD\x20HH:mm:ss'),moment()[_0x7b9a('0xd')]('day')[_0x7b9a('0x8')](_0x7b9a('0x9'))]},'campaigntype':_0x7b9a('0x1')},'raw':![]},'log':'GetVoiceQueueHopperHistory'});};};exports[_0x7b9a('0xe')]=function(_0xec5949){return function(){return client['Request'](_0x7b9a('0xf'),{'options':{'where':{'createdAt':{'$between':[moment()[_0x7b9a('0xc')]('day')[_0x7b9a('0x8')](_0x7b9a('0x9')),moment()[_0x7b9a('0xd')](_0x7b9a('0x10'))[_0x7b9a('0x8')](_0x7b9a('0x9'))]},'campaigntype':_0x7b9a('0x11')},'raw':![]},'log':_0x7b9a('0xf')});};};