Built motion from commit 13c3002c.|2.6.9
[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 _0xb5d2=['GetCmHopperHistory','getVoiceQueueHopperHistory','GetVoiceQueueHopperHistory','startOf','day','endOf','GetCampaignHopperHistory','../client','moment','createHistory','campaign','queue','Request','CreateCmHopperHistory','avgHandleTime','AvgHandleTime','subtract','minutes','format','YYYY-MM-DD\x20HH:mm:ss'];(function(_0x539602,_0x587053){var _0x17c04e=function(_0x116304){while(--_0x116304){_0x539602['push'](_0x539602['shift']());}};_0x17c04e(++_0x587053);}(_0xb5d2,0x147));var _0x2b5d=function(_0x44a21f,_0x4c3f36){_0x44a21f=_0x44a21f-0x0;var _0x19141e=_0xb5d2[_0x44a21f];return _0x19141e;};'use strict';var client=require(_0x2b5d('0x0'));var moment=require(_0x2b5d('0x1'));exports[_0x2b5d('0x2')]=function(_0x423131){return function(){_0x423131[_0x2b5d('0x3')]=_0x423131[_0x2b5d('0x4')];return client[_0x2b5d('0x5')]('CreateCmHopperHistory',{'body':_0x423131,'log':_0x2b5d('0x6')});};};exports[_0x2b5d('0x7')]=function(_0x23b741){return function(){return client['Request'](_0x2b5d('0x8'),{'options':{'where':{'endtime':{'$between':[moment()[_0x2b5d('0x9')](_0x23b741,_0x2b5d('0xa'))[_0x2b5d('0xb')](_0x2b5d('0xc')),moment()['format']('YYYY-MM-DD\x20HH:mm:ss')]}},'raw':![]},'log':_0x2b5d('0xd')});};};exports[_0x2b5d('0xe')]=function(_0x2c5fe3){return function(){return client['Request'](_0x2b5d('0xf'),{'options':{'where':{'createdAt':{'$between':[moment()[_0x2b5d('0x10')](_0x2b5d('0x11'))[_0x2b5d('0xb')](_0x2b5d('0xc')),moment()[_0x2b5d('0x12')](_0x2b5d('0x11'))['format']('YYYY-MM-DD\x20HH:mm:ss')]},'campaigntype':_0x2b5d('0x4')},'raw':![]},'log':_0x2b5d('0xf')});};};exports['getCampaignHopperHistory']=function(_0x2e1677){return function(){return client[_0x2b5d('0x5')](_0x2b5d('0x13'),{'options':{'where':{'createdAt':{'$between':[moment()[_0x2b5d('0x10')](_0x2b5d('0x11'))[_0x2b5d('0xb')](_0x2b5d('0xc')),moment()[_0x2b5d('0x12')](_0x2b5d('0x11'))[_0x2b5d('0xb')](_0x2b5d('0xc'))]},'campaigntype':'ivr'},'raw':![]},'log':'GetCampaignHopperHistory'});};};