68614be2d18bbbcaab6690cb6079e89ef0ac8ba8
[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 _0xb03e=['queue','Request','CreateCmHopperHistory','avgHandleTime','AvgHandleTime','minutes','format','YYYY-MM-DD\x20HH:mm:ss','GetCmHopperHistory','GetVoiceQueueHopperHistory','day','endOf','getCampaignHopperHistory','GetCampaignHopperHistory','startOf','ivr','moment','createHistory','campaign'];(function(_0x2fd69d,_0xeb1037){var _0x5d5ef3=function(_0xa9ea9e){while(--_0xa9ea9e){_0x2fd69d['push'](_0x2fd69d['shift']());}};_0x5d5ef3(++_0xeb1037);}(_0xb03e,0x1eb));var _0xeb03=function(_0xfb3ada,_0x10f36e){_0xfb3ada=_0xfb3ada-0x0;var _0x16a003=_0xb03e[_0xfb3ada];return _0x16a003;};'use strict';var client=require('../client');var moment=require(_0xeb03('0x0'));exports[_0xeb03('0x1')]=function(_0x868905){return function(){_0x868905[_0xeb03('0x2')]=_0x868905[_0xeb03('0x3')];return client[_0xeb03('0x4')](_0xeb03('0x5'),{'body':_0x868905,'log':_0xeb03('0x5')});};};exports[_0xeb03('0x6')]=function(_0x3ba4b0){return function(){return client[_0xeb03('0x4')](_0xeb03('0x7'),{'options':{'where':{'endtime':{'$between':[moment()['subtract'](_0x3ba4b0,_0xeb03('0x8'))[_0xeb03('0x9')](_0xeb03('0xa')),moment()[_0xeb03('0x9')](_0xeb03('0xa'))]}},'raw':![]},'log':_0xeb03('0xb')});};};exports['getVoiceQueueHopperHistory']=function(_0x403b77){return function(){return client[_0xeb03('0x4')](_0xeb03('0xc'),{'options':{'where':{'createdAt':{'$between':[moment()['startOf'](_0xeb03('0xd'))['format'](_0xeb03('0xa')),moment()[_0xeb03('0xe')](_0xeb03('0xd'))[_0xeb03('0x9')](_0xeb03('0xa'))]},'campaigntype':_0xeb03('0x3')},'raw':![]},'log':_0xeb03('0xc')});};};exports[_0xeb03('0xf')]=function(_0x97f46d){return function(){return client[_0xeb03('0x4')](_0xeb03('0x10'),{'options':{'where':{'createdAt':{'$between':[moment()[_0xeb03('0x11')]('day')[_0xeb03('0x9')](_0xeb03('0xa')),moment()[_0xeb03('0xe')](_0xeb03('0xd'))['format'](_0xeb03('0xa'))]},'campaigntype':_0xeb03('0x12')},'raw':![]},'log':_0xeb03('0x10')});};};