Built motion from commit 9d7072cc.|2.5.39
[motion2.git] / server / services / ami / rpc / cmHopperHistory.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 _0x1394=['getVoiceQueueHopperHistory','GetVoiceQueueHopperHistory','startOf','day','endOf','getCampaignHopperHistory','GetCampaignHopperHistory','../client','moment','createHistory','campaign','queue','Request','CreateCmHopperHistory','avgHandleTime','AvgHandleTime','YYYY-MM-DD\x20HH:mm:ss','format','GetCmHopperHistory'];(function(_0x4571dc,_0x3eba42){var _0x1d9143=function(_0x1c8505){while(--_0x1c8505){_0x4571dc['push'](_0x4571dc['shift']());}};_0x1d9143(++_0x3eba42);}(_0x1394,0x14a));var _0x4139=function(_0x4fc8dd,_0x44239a){_0x4fc8dd=_0x4fc8dd-0x0;var _0xfa6052=_0x1394[_0x4fc8dd];return _0xfa6052;};'use strict';var client=require(_0x4139('0x0'));var moment=require(_0x4139('0x1'));exports[_0x4139('0x2')]=function(_0x47037b){return function(){_0x47037b[_0x4139('0x3')]=_0x47037b[_0x4139('0x4')];return client[_0x4139('0x5')]('CreateCmHopperHistory',{'body':_0x47037b,'log':_0x4139('0x6')});};};exports[_0x4139('0x7')]=function(_0x5efacb){return function(){return client['Request'](_0x4139('0x8'),{'options':{'where':{'endtime':{'$between':[moment()['subtract'](_0x5efacb,'minutes')['format'](_0x4139('0x9')),moment()[_0x4139('0xa')](_0x4139('0x9'))]}},'raw':![]},'log':_0x4139('0xb')});};};exports[_0x4139('0xc')]=function(_0xce696f){return function(){return client['Request'](_0x4139('0xd'),{'options':{'where':{'createdAt':{'$between':[moment()[_0x4139('0xe')](_0x4139('0xf'))['format'](_0x4139('0x9')),moment()[_0x4139('0x10')](_0x4139('0xf'))[_0x4139('0xa')](_0x4139('0x9'))]},'campaigntype':_0x4139('0x4')},'raw':![]},'log':_0x4139('0xd')});};};exports[_0x4139('0x11')]=function(_0xe4432a){return function(){return client[_0x4139('0x5')]('GetCampaignHopperHistory',{'options':{'where':{'createdAt':{'$between':[moment()[_0x4139('0xe')]('day')[_0x4139('0xa')](_0x4139('0x9')),moment()['endOf'](_0x4139('0xf'))[_0x4139('0xa')](_0x4139('0x9'))]},'campaigntype':'ivr'},'raw':![]},'log':_0x4139('0x12')});};};