Built motion from commit (unavailable).|2.4.4
[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 _0xc7b3=['getCampaignHopperHistory','endOf','ivr','GetCampaignHopperHistory','../client','moment','campaign','queue','Request','CreateCmHopperHistory','AvgHandleTime','minutes','format','YYYY-MM-DD\x20HH:mm:ss','getVoiceQueueHopperHistory','startOf','day','GetVoiceQueueHopperHistory'];(function(_0x2dd6c7,_0x5b5fd2){var _0x56b0f7=function(_0x5101b3){while(--_0x5101b3){_0x2dd6c7['push'](_0x2dd6c7['shift']());}};_0x56b0f7(++_0x5b5fd2);}(_0xc7b3,0x1c6));var _0x3c7b=function(_0x19950b,_0x53d0d7){_0x19950b=_0x19950b-0x0;var _0x3c6b41=_0xc7b3[_0x19950b];return _0x3c6b41;};'use strict';var client=require(_0x3c7b('0x0'));var moment=require(_0x3c7b('0x1'));exports['createHistory']=function(_0x15fff5){return function(){_0x15fff5[_0x3c7b('0x2')]=_0x15fff5[_0x3c7b('0x3')];return client[_0x3c7b('0x4')](_0x3c7b('0x5'),{'body':_0x15fff5,'log':_0x3c7b('0x5')});};};exports['avgHandleTime']=function(_0x12d9a9){return function(){return client[_0x3c7b('0x4')](_0x3c7b('0x6'),{'options':{'where':{'endtime':{'$between':[moment()['subtract'](_0x12d9a9,_0x3c7b('0x7'))[_0x3c7b('0x8')]('YYYY-MM-DD\x20HH:mm:ss'),moment()[_0x3c7b('0x8')](_0x3c7b('0x9'))]}},'raw':![]},'log':'GetCmHopperHistory'});};};exports[_0x3c7b('0xa')]=function(_0x16968c){return function(){return client[_0x3c7b('0x4')]('GetVoiceQueueHopperHistory',{'options':{'where':{'createdAt':{'$between':[moment()[_0x3c7b('0xb')]('day')[_0x3c7b('0x8')](_0x3c7b('0x9')),moment()['endOf'](_0x3c7b('0xc'))[_0x3c7b('0x8')](_0x3c7b('0x9'))]},'campaigntype':_0x3c7b('0x3')},'raw':![]},'log':_0x3c7b('0xd')});};};exports[_0x3c7b('0xe')]=function(_0x5d1ba2){return function(){return client[_0x3c7b('0x4')]('GetCampaignHopperHistory',{'options':{'where':{'createdAt':{'$between':[moment()[_0x3c7b('0xb')](_0x3c7b('0xc'))[_0x3c7b('0x8')](_0x3c7b('0x9')),moment()[_0x3c7b('0xf')](_0x3c7b('0xc'))[_0x3c7b('0x8')](_0x3c7b('0x9'))]},'campaigntype':_0x3c7b('0x10')},'raw':![]},'log':_0x3c7b('0x11')});};};