Built motion from commit 26d08302.|2.6.31
[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 _0xb1e5=['subtract','minutes','YYYY-MM-DD\x20HH:mm:ss','format','GetCmHopperHistory','getVoiceQueueHopperHistory','startOf','day','endOf','GetVoiceQueueHopperHistory','getCampaignHopperHistory','GetCampaignHopperHistory','ivr','../client','moment','campaign','queue','CreateCmHopperHistory','Request','AvgHandleTime'];(function(_0x31d4b7,_0x5ff9da){var _0x3fb36a=function(_0xafb61f){while(--_0xafb61f){_0x31d4b7['push'](_0x31d4b7['shift']());}};_0x3fb36a(++_0x5ff9da);}(_0xb1e5,0x1d9));var _0x5b1e=function(_0x3c5e53,_0x2ccf78){_0x3c5e53=_0x3c5e53-0x0;var _0x2f1b21=_0xb1e5[_0x3c5e53];return _0x2f1b21;};'use strict';var client=require(_0x5b1e('0x0'));var moment=require(_0x5b1e('0x1'));exports['createHistory']=function(_0x47d2bc){_0x47d2bc[_0x5b1e('0x2')]=_0x47d2bc[_0x5b1e('0x3')];return client['Request']('CreateCmHopperHistory',{'body':_0x47d2bc,'log':_0x5b1e('0x4')});};exports['avgHandleTime']=function(_0x256457){return client[_0x5b1e('0x5')](_0x5b1e('0x6'),{'options':{'where':{'endtime':{'$between':[moment()[_0x5b1e('0x7')](_0x256457,_0x5b1e('0x8'))['format'](_0x5b1e('0x9')),moment()[_0x5b1e('0xa')]('YYYY-MM-DD\x20HH:mm:ss')]}},'raw':![]},'log':_0x5b1e('0xb')});};exports[_0x5b1e('0xc')]=function(){return function(){return client['Request']('GetVoiceQueueHopperHistory',{'options':{'where':{'createdAt':{'$between':[moment()[_0x5b1e('0xd')](_0x5b1e('0xe'))[_0x5b1e('0xa')](_0x5b1e('0x9')),moment()[_0x5b1e('0xf')]('day')[_0x5b1e('0xa')](_0x5b1e('0x9'))]},'campaigntype':_0x5b1e('0x3')},'raw':![]},'log':_0x5b1e('0x10')});};};exports[_0x5b1e('0x11')]=function(){return function(){return client[_0x5b1e('0x5')](_0x5b1e('0x12'),{'options':{'where':{'createdAt':{'$between':[moment()[_0x5b1e('0xd')](_0x5b1e('0xe'))[_0x5b1e('0xa')](_0x5b1e('0x9')),moment()[_0x5b1e('0xf')](_0x5b1e('0xe'))[_0x5b1e('0xa')]('YYYY-MM-DD\x20HH:mm:ss')]},'campaigntype':_0x5b1e('0x13')},'raw':![]},'log':_0x5b1e('0x12')});};};