Built motion from commit (unavailable).|2.0.81
[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 _0x7da6=['getCampaignHopperHistory','GetCampaignHopperHistory','endOf','ivr','createHistory','campaign','queue','CreateCmHopperHistory','avgHandleTime','Request','AvgHandleTime','minutes','format','GetCmHopperHistory','GetVoiceQueueHopperHistory','startOf','day','YYYY-MM-DD\x20HH:mm:ss'];(function(_0x2ffee8,_0x126cdd){var _0x432ebf=function(_0x521355){while(--_0x521355){_0x2ffee8['push'](_0x2ffee8['shift']());}};_0x432ebf(++_0x126cdd);}(_0x7da6,0x124));var _0x67da=function(_0x460150,_0x232949){_0x460150=_0x460150-0x0;var _0x340677=_0x7da6[_0x460150];return _0x340677;};'use strict';var client=require('../client');var moment=require('moment');exports[_0x67da('0x0')]=function(_0x209997){return function(){_0x209997[_0x67da('0x1')]=_0x209997[_0x67da('0x2')];return client['Request'](_0x67da('0x3'),{'body':_0x209997,'log':_0x67da('0x3')});};};exports[_0x67da('0x4')]=function(_0x2d4937){return function(){return client[_0x67da('0x5')](_0x67da('0x6'),{'options':{'where':{'endtime':{'$between':[moment()['subtract'](_0x2d4937,_0x67da('0x7'))['format']('YYYY-MM-DD\x20HH:mm:ss'),moment()[_0x67da('0x8')]('YYYY-MM-DD\x20HH:mm:ss')]}},'raw':![]},'log':_0x67da('0x9')});};};exports['getVoiceQueueHopperHistory']=function(_0x1e8a4c){return function(){return client[_0x67da('0x5')](_0x67da('0xa'),{'options':{'where':{'createdAt':{'$between':[moment()[_0x67da('0xb')](_0x67da('0xc'))[_0x67da('0x8')](_0x67da('0xd')),moment()['endOf'](_0x67da('0xc'))[_0x67da('0x8')](_0x67da('0xd'))]},'campaigntype':_0x67da('0x2')},'raw':![]},'log':_0x67da('0xa')});};};exports[_0x67da('0xe')]=function(_0x483e7f){return function(){return client[_0x67da('0x5')](_0x67da('0xf'),{'options':{'where':{'createdAt':{'$between':[moment()[_0x67da('0xb')](_0x67da('0xc'))[_0x67da('0x8')]('YYYY-MM-DD\x20HH:mm:ss'),moment()[_0x67da('0x10')](_0x67da('0xc'))['format'](_0x67da('0xd'))]},'campaigntype':_0x67da('0x11')},'raw':![]},'log':_0x67da('0xf')});};};