Built motion from commit 3c2ce842.|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 _0x4e56=['endOf','getCampaignHopperHistory','GetCampaignHopperHistory','ivr','../client','moment','createHistory','campaign','queue','Request','CreateCmHopperHistory','AvgHandleTime','subtract','format','YYYY-MM-DD\x20HH:mm:ss','GetCmHopperHistory','GetVoiceQueueHopperHistory','startOf','day'];(function(_0x4792d9,_0x131035){var _0x369e3f=function(_0xe1e738){while(--_0xe1e738){_0x4792d9['push'](_0x4792d9['shift']());}};_0x369e3f(++_0x131035);}(_0x4e56,0x89));var _0x64e5=function(_0x514d52,_0x16f59f){_0x514d52=_0x514d52-0x0;var _0x211383=_0x4e56[_0x514d52];return _0x211383;};'use strict';var client=require(_0x64e5('0x0'));var moment=require(_0x64e5('0x1'));exports[_0x64e5('0x2')]=function(_0x47b40c){_0x47b40c[_0x64e5('0x3')]=_0x47b40c[_0x64e5('0x4')];return client[_0x64e5('0x5')](_0x64e5('0x6'),{'body':_0x47b40c,'log':_0x64e5('0x6')});};exports['avgHandleTime']=function(_0x275276){return client[_0x64e5('0x5')](_0x64e5('0x7'),{'options':{'where':{'endtime':{'$between':[moment()[_0x64e5('0x8')](_0x275276,'minutes')[_0x64e5('0x9')](_0x64e5('0xa')),moment()[_0x64e5('0x9')]('YYYY-MM-DD\x20HH:mm:ss')]}},'raw':![]},'log':_0x64e5('0xb')});};exports['getVoiceQueueHopperHistory']=function(){return function(){return client[_0x64e5('0x5')](_0x64e5('0xc'),{'options':{'where':{'createdAt':{'$between':[moment()[_0x64e5('0xd')](_0x64e5('0xe'))[_0x64e5('0x9')](_0x64e5('0xa')),moment()[_0x64e5('0xf')](_0x64e5('0xe'))[_0x64e5('0x9')](_0x64e5('0xa'))]},'campaigntype':_0x64e5('0x4')},'raw':![]},'log':'GetVoiceQueueHopperHistory'});};};exports[_0x64e5('0x10')]=function(){return function(){return client[_0x64e5('0x5')](_0x64e5('0x11'),{'options':{'where':{'createdAt':{'$between':[moment()[_0x64e5('0xd')](_0x64e5('0xe'))[_0x64e5('0x9')](_0x64e5('0xa')),moment()[_0x64e5('0xf')](_0x64e5('0xe'))[_0x64e5('0x9')]('YYYY-MM-DD\x20HH:mm:ss')]},'campaigntype':_0x64e5('0x12')},'raw':![]},'log':_0x64e5('0x11')});};};