bb0a863e9e0cc3cdc0ad51df8208a95c9c968991
[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 _0x2015=['endOf','getCampaignHopperHistory','GetCampaignHopperHistory','ivr','../client','moment','createHistory','campaign','queue','Request','CreateCmHopperHistory','avgHandleTime','AvgHandleTime','subtract','minutes','format','YYYY-MM-DD\x20HH:mm:ss','getVoiceQueueHopperHistory','GetVoiceQueueHopperHistory','startOf','day'];(function(_0x237181,_0x3e1df9){var _0x489af7=function(_0x333ca0){while(--_0x333ca0){_0x237181['push'](_0x237181['shift']());}};_0x489af7(++_0x3e1df9);}(_0x2015,0x193));var _0x5201=function(_0x511db8,_0x2b062c){_0x511db8=_0x511db8-0x0;var _0x74cffd=_0x2015[_0x511db8];return _0x74cffd;};'use strict';var client=require(_0x5201('0x0'));var moment=require(_0x5201('0x1'));exports[_0x5201('0x2')]=function(_0x12599f){return function(){_0x12599f[_0x5201('0x3')]=_0x12599f[_0x5201('0x4')];return client[_0x5201('0x5')](_0x5201('0x6'),{'body':_0x12599f,'log':'CreateCmHopperHistory'});};};exports[_0x5201('0x7')]=function(_0x2fa026){return function(){return client[_0x5201('0x5')](_0x5201('0x8'),{'options':{'where':{'endtime':{'$between':[moment()[_0x5201('0x9')](_0x2fa026,_0x5201('0xa'))[_0x5201('0xb')](_0x5201('0xc')),moment()[_0x5201('0xb')](_0x5201('0xc'))]}},'raw':![]},'log':'GetCmHopperHistory'});};};exports[_0x5201('0xd')]=function(_0x17d8f3){return function(){return client['Request'](_0x5201('0xe'),{'options':{'where':{'createdAt':{'$between':[moment()[_0x5201('0xf')](_0x5201('0x10'))['format'](_0x5201('0xc')),moment()[_0x5201('0x11')](_0x5201('0x10'))[_0x5201('0xb')](_0x5201('0xc'))]},'campaigntype':_0x5201('0x4')},'raw':![]},'log':_0x5201('0xe')});};};exports[_0x5201('0x12')]=function(_0x2aa01f){return function(){return client[_0x5201('0x5')](_0x5201('0x13'),{'options':{'where':{'createdAt':{'$between':[moment()[_0x5201('0xf')]('day')[_0x5201('0xb')](_0x5201('0xc')),moment()['endOf']('day')[_0x5201('0xb')](_0x5201('0xc'))]},'campaigntype':_0x5201('0x14')},'raw':![]},'log':'GetCampaignHopperHistory'});};};