Built motion from commit 8271bb6f.|2.6.28
[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 _0x6688=['format','YYYY-MM-DD\x20HH:mm:ss','GetCmHopperHistory','getVoiceQueueHopperHistory','GetVoiceQueueHopperHistory','endOf','day','GetCampaignHopperHistory','startOf','ivr','../client','moment','createHistory','campaign','queue','Request','CreateCmHopperHistory','avgHandleTime','AvgHandleTime','subtract'];(function(_0x3e9662,_0x5af3b6){var _0x3d4e44=function(_0x1fdcb5){while(--_0x1fdcb5){_0x3e9662['push'](_0x3e9662['shift']());}};_0x3d4e44(++_0x5af3b6);}(_0x6688,0x10e));var _0x8668=function(_0x4172f9,_0x5e8394){_0x4172f9=_0x4172f9-0x0;var _0x457f46=_0x6688[_0x4172f9];return _0x457f46;};'use strict';var client=require(_0x8668('0x0'));var moment=require(_0x8668('0x1'));exports[_0x8668('0x2')]=function(_0x50da57){_0x50da57[_0x8668('0x3')]=_0x50da57[_0x8668('0x4')];return client[_0x8668('0x5')](_0x8668('0x6'),{'body':_0x50da57,'log':_0x8668('0x6')});};exports[_0x8668('0x7')]=function(_0x160305){return client['Request'](_0x8668('0x8'),{'options':{'where':{'endtime':{'$between':[moment()[_0x8668('0x9')](_0x160305,'minutes')[_0x8668('0xa')](_0x8668('0xb')),moment()[_0x8668('0xa')](_0x8668('0xb'))]}},'raw':![]},'log':_0x8668('0xc')});};exports[_0x8668('0xd')]=function(){return function(){return client[_0x8668('0x5')](_0x8668('0xe'),{'options':{'where':{'createdAt':{'$between':[moment()['startOf']('day')['format']('YYYY-MM-DD\x20HH:mm:ss'),moment()[_0x8668('0xf')](_0x8668('0x10'))[_0x8668('0xa')](_0x8668('0xb'))]},'campaigntype':_0x8668('0x4')},'raw':![]},'log':'GetVoiceQueueHopperHistory'});};};exports['getCampaignHopperHistory']=function(){return function(){return client[_0x8668('0x5')](_0x8668('0x11'),{'options':{'where':{'createdAt':{'$between':[moment()[_0x8668('0x12')]('day')[_0x8668('0xa')](_0x8668('0xb')),moment()[_0x8668('0xf')]('day')['format'](_0x8668('0xb'))]},'campaigntype':_0x8668('0x13')},'raw':![]},'log':_0x8668('0x11')});};};