Built motion from commit b5413ace.|2.6.9
[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 _0x420e=['Request','CreateCmHopperHistory','AvgHandleTime','subtract','minutes','format','YYYY-MM-DD\x20HH:mm:ss','GetCmHopperHistory','getVoiceQueueHopperHistory','GetVoiceQueueHopperHistory','startOf','day','getCampaignHopperHistory','GetCampaignHopperHistory','endOf','ivr','../client','moment','createHistory','campaign','queue'];(function(_0x12d124,_0x4f6dfe){var _0xcc1815=function(_0x2d6acb){while(--_0x2d6acb){_0x12d124['push'](_0x12d124['shift']());}};_0xcc1815(++_0x4f6dfe);}(_0x420e,0x8e));var _0xe420=function(_0x493b41,_0x346d45){_0x493b41=_0x493b41-0x0;var _0x33f507=_0x420e[_0x493b41];return _0x33f507;};'use strict';var client=require(_0xe420('0x0'));var moment=require(_0xe420('0x1'));exports[_0xe420('0x2')]=function(_0x3a2207){return function(){_0x3a2207[_0xe420('0x3')]=_0x3a2207[_0xe420('0x4')];return client[_0xe420('0x5')](_0xe420('0x6'),{'body':_0x3a2207,'log':_0xe420('0x6')});};};exports['avgHandleTime']=function(_0x584a86){return function(){return client[_0xe420('0x5')](_0xe420('0x7'),{'options':{'where':{'endtime':{'$between':[moment()[_0xe420('0x8')](_0x584a86,_0xe420('0x9'))[_0xe420('0xa')](_0xe420('0xb')),moment()[_0xe420('0xa')]('YYYY-MM-DD\x20HH:mm:ss')]}},'raw':![]},'log':_0xe420('0xc')});};};exports[_0xe420('0xd')]=function(_0x1f002e){return function(){return client[_0xe420('0x5')](_0xe420('0xe'),{'options':{'where':{'createdAt':{'$between':[moment()[_0xe420('0xf')](_0xe420('0x10'))['format'](_0xe420('0xb')),moment()['endOf'](_0xe420('0x10'))[_0xe420('0xa')](_0xe420('0xb'))]},'campaigntype':_0xe420('0x4')},'raw':![]},'log':_0xe420('0xe')});};};exports[_0xe420('0x11')]=function(_0x3708a6){return function(){return client[_0xe420('0x5')](_0xe420('0x12'),{'options':{'where':{'createdAt':{'$between':[moment()[_0xe420('0xf')](_0xe420('0x10'))[_0xe420('0xa')](_0xe420('0xb')),moment()[_0xe420('0x13')]('day')[_0xe420('0xa')]('YYYY-MM-DD\x20HH:mm:ss')]},'campaigntype':_0xe420('0x14')},'raw':![]},'log':_0xe420('0x12')});};};