Built motion from commit 10af8726.|2.6.34
[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 _0xe895=['getVoiceQueueHopperHistory','GetVoiceQueueHopperHistory','startOf','day','GetCampaignHopperHistory','ivr','../client','moment','createHistory','campaign','queue','Request','CreateCmHopperHistory','avgHandleTime','AvgHandleTime','subtract','minutes','YYYY-MM-DD\x20HH:mm:ss','format'];(function(_0x4835f2,_0x28ba7){var _0x578ea8=function(_0x328494){while(--_0x328494){_0x4835f2['push'](_0x4835f2['shift']());}};_0x578ea8(++_0x28ba7);}(_0xe895,0x1bb));var _0x5e89=function(_0x40dfda,_0x4cc1b5){_0x40dfda=_0x40dfda-0x0;var _0x4e6be7=_0xe895[_0x40dfda];return _0x4e6be7;};'use strict';var client=require(_0x5e89('0x0'));var moment=require(_0x5e89('0x1'));exports[_0x5e89('0x2')]=function(_0x6bdb4c){_0x6bdb4c[_0x5e89('0x3')]=_0x6bdb4c[_0x5e89('0x4')];return client[_0x5e89('0x5')](_0x5e89('0x6'),{'body':_0x6bdb4c,'log':_0x5e89('0x6')});};exports[_0x5e89('0x7')]=function(_0x1f6e23){return client['Request'](_0x5e89('0x8'),{'options':{'where':{'endtime':{'$between':[moment()[_0x5e89('0x9')](_0x1f6e23,_0x5e89('0xa'))['format'](_0x5e89('0xb')),moment()[_0x5e89('0xc')](_0x5e89('0xb'))]}},'raw':![]},'log':'GetCmHopperHistory'});};exports[_0x5e89('0xd')]=function(){return function(){return client[_0x5e89('0x5')](_0x5e89('0xe'),{'options':{'where':{'createdAt':{'$between':[moment()[_0x5e89('0xf')]('day')[_0x5e89('0xc')]('YYYY-MM-DD\x20HH:mm:ss'),moment()['endOf'](_0x5e89('0x10'))['format'](_0x5e89('0xb'))]},'campaigntype':_0x5e89('0x4')},'raw':![]},'log':_0x5e89('0xe')});};};exports['getCampaignHopperHistory']=function(){return function(){return client[_0x5e89('0x5')](_0x5e89('0x11'),{'options':{'where':{'createdAt':{'$between':[moment()[_0x5e89('0xf')](_0x5e89('0x10'))[_0x5e89('0xc')](_0x5e89('0xb')),moment()['endOf'](_0x5e89('0x10'))['format'](_0x5e89('0xb'))]},'campaigntype':_0x5e89('0x12')},'raw':![]},'log':_0x5e89('0x11')});};};