Built motion from commit 9d0783e6.|2.6.13
[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 _0x555f=['createHistory','Request','CreateCmHopperHistory','AvgHandleTime','subtract','minutes','YYYY-MM-DD\x20HH:mm:ss','GetCmHopperHistory','getVoiceQueueHopperHistory','GetVoiceQueueHopperHistory','startOf','format','endOf','day','getCampaignHopperHistory','GetCampaignHopperHistory','ivr','moment'];(function(_0x2d28f5,_0x5112f4){var _0xab5354=function(_0x30076e){while(--_0x30076e){_0x2d28f5['push'](_0x2d28f5['shift']());}};_0xab5354(++_0x5112f4);}(_0x555f,0xfb));var _0xf555=function(_0x21f7d4,_0x3fb9df){_0x21f7d4=_0x21f7d4-0x0;var _0x143fa7=_0x555f[_0x21f7d4];return _0x143fa7;};'use strict';var client=require('../client');var moment=require(_0xf555('0x0'));exports[_0xf555('0x1')]=function(_0x126130){_0x126130['campaign']=_0x126130['queue'];return client[_0xf555('0x2')](_0xf555('0x3'),{'body':_0x126130,'log':_0xf555('0x3')});};exports['avgHandleTime']=function(_0x42ca06){return client['Request'](_0xf555('0x4'),{'options':{'where':{'endtime':{'$between':[moment()[_0xf555('0x5')](_0x42ca06,_0xf555('0x6'))['format'](_0xf555('0x7')),moment()['format'](_0xf555('0x7'))]}},'raw':![]},'log':_0xf555('0x8')});};exports[_0xf555('0x9')]=function(){return function(){return client[_0xf555('0x2')](_0xf555('0xa'),{'options':{'where':{'createdAt':{'$between':[moment()[_0xf555('0xb')]('day')[_0xf555('0xc')](_0xf555('0x7')),moment()[_0xf555('0xd')](_0xf555('0xe'))[_0xf555('0xc')]('YYYY-MM-DD\x20HH:mm:ss')]},'campaigntype':'queue'},'raw':![]},'log':'GetVoiceQueueHopperHistory'});};};exports[_0xf555('0xf')]=function(){return function(){return client[_0xf555('0x2')](_0xf555('0x10'),{'options':{'where':{'createdAt':{'$between':[moment()[_0xf555('0xb')](_0xf555('0xe'))['format']('YYYY-MM-DD\x20HH:mm:ss'),moment()[_0xf555('0xd')](_0xf555('0xe'))[_0xf555('0xc')](_0xf555('0x7'))]},'campaigntype':_0xf555('0x11')},'raw':![]},'log':_0xf555('0x10')});};};