Built motion from commit 58b0471d.|2.6.29
[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 _0xab1e=['ivr','../client','campaign','queue','Request','CreateCmHopperHistory','avgHandleTime','AvgHandleTime','subtract','minutes','YYYY-MM-DD\x20HH:mm:ss','format','GetCmHopperHistory','GetVoiceQueueHopperHistory','day','endOf','getCampaignHopperHistory','GetCampaignHopperHistory'];(function(_0xf978b1,_0x425f52){var _0x10398a=function(_0x302e5a){while(--_0x302e5a){_0xf978b1['push'](_0xf978b1['shift']());}};_0x10398a(++_0x425f52);}(_0xab1e,0x17b));var _0xeab1=function(_0x5d4607,_0x6b5e7b){_0x5d4607=_0x5d4607-0x0;var _0x5e4a86=_0xab1e[_0x5d4607];return _0x5e4a86;};'use strict';var client=require(_0xeab1('0x0'));var moment=require('moment');exports['createHistory']=function(_0x5004a3){_0x5004a3[_0xeab1('0x1')]=_0x5004a3[_0xeab1('0x2')];return client[_0xeab1('0x3')](_0xeab1('0x4'),{'body':_0x5004a3,'log':'CreateCmHopperHistory'});};exports[_0xeab1('0x5')]=function(_0x18a4a0){return client[_0xeab1('0x3')](_0xeab1('0x6'),{'options':{'where':{'endtime':{'$between':[moment()[_0xeab1('0x7')](_0x18a4a0,_0xeab1('0x8'))['format'](_0xeab1('0x9')),moment()[_0xeab1('0xa')](_0xeab1('0x9'))]}},'raw':![]},'log':_0xeab1('0xb')});};exports['getVoiceQueueHopperHistory']=function(){return function(){return client[_0xeab1('0x3')](_0xeab1('0xc'),{'options':{'where':{'createdAt':{'$between':[moment()['startOf'](_0xeab1('0xd'))['format'](_0xeab1('0x9')),moment()[_0xeab1('0xe')](_0xeab1('0xd'))['format'](_0xeab1('0x9'))]},'campaigntype':_0xeab1('0x2')},'raw':![]},'log':_0xeab1('0xc')});};};exports[_0xeab1('0xf')]=function(){return function(){return client['Request'](_0xeab1('0x10'),{'options':{'where':{'createdAt':{'$between':[moment()['startOf'](_0xeab1('0xd'))[_0xeab1('0xa')](_0xeab1('0x9')),moment()[_0xeab1('0xe')]('day')['format'](_0xeab1('0x9'))]},'campaigntype':_0xeab1('0x11')},'raw':![]},'log':'GetCampaignHopperHistory'});};};