Built motion from commit bbec7235.|2.6.20
[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 _0x36bb=['Request','CreateCmHopperHistory','avgHandleTime','subtract','minutes','format','YYYY-MM-DD\x20HH:mm:ss','GetCmHopperHistory','getVoiceQueueHopperHistory','startOf','endOf','day','GetVoiceQueueHopperHistory','GetCampaignHopperHistory','../client','moment','createHistory','campaign','queue'];(function(_0x14a130,_0x31147d){var _0x582b53=function(_0x247530){while(--_0x247530){_0x14a130['push'](_0x14a130['shift']());}};_0x582b53(++_0x31147d);}(_0x36bb,0xdf));var _0xb36b=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x36bb[_0x3dd15e];return _0x231fd0;};'use strict';var client=require(_0xb36b('0x0'));var moment=require(_0xb36b('0x1'));exports[_0xb36b('0x2')]=function(_0x55d26e){_0x55d26e[_0xb36b('0x3')]=_0x55d26e[_0xb36b('0x4')];return client[_0xb36b('0x5')]('CreateCmHopperHistory',{'body':_0x55d26e,'log':_0xb36b('0x6')});};exports[_0xb36b('0x7')]=function(_0x19b4ee){return client[_0xb36b('0x5')]('AvgHandleTime',{'options':{'where':{'endtime':{'$between':[moment()[_0xb36b('0x8')](_0x19b4ee,_0xb36b('0x9'))[_0xb36b('0xa')](_0xb36b('0xb')),moment()[_0xb36b('0xa')](_0xb36b('0xb'))]}},'raw':![]},'log':_0xb36b('0xc')});};exports[_0xb36b('0xd')]=function(){return function(){return client[_0xb36b('0x5')]('GetVoiceQueueHopperHistory',{'options':{'where':{'createdAt':{'$between':[moment()[_0xb36b('0xe')]('day')['format'](_0xb36b('0xb')),moment()[_0xb36b('0xf')](_0xb36b('0x10'))[_0xb36b('0xa')](_0xb36b('0xb'))]},'campaigntype':_0xb36b('0x4')},'raw':![]},'log':_0xb36b('0x11')});};};exports['getCampaignHopperHistory']=function(){return function(){return client['Request'](_0xb36b('0x12'),{'options':{'where':{'createdAt':{'$between':[moment()[_0xb36b('0xe')](_0xb36b('0x10'))[_0xb36b('0xa')]('YYYY-MM-DD\x20HH:mm:ss'),moment()[_0xb36b('0xf')](_0xb36b('0x10'))[_0xb36b('0xa')](_0xb36b('0xb'))]},'campaigntype':'ivr'},'raw':![]},'log':_0xb36b('0x12')});};};