b022ffc4773151a6d2105e40917e7dec87c62d08
[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 _0xfa2e=['CreateCmHopperHistory','avgHandleTime','AvgHandleTime','minutes','format','YYYY-MM-DD\x20HH:mm:ss','GetCmHopperHistory','getVoiceQueueHopperHistory','GetVoiceQueueHopperHistory','startOf','endOf','getCampaignHopperHistory','day','ivr','GetCampaignHopperHistory','../client','moment','createHistory','campaign','Request'];(function(_0x809b78,_0x5acbbf){var _0x63c016=function(_0x5559a7){while(--_0x5559a7){_0x809b78['push'](_0x809b78['shift']());}};_0x63c016(++_0x5acbbf);}(_0xfa2e,0x127));var _0xefa2=function(_0x356ab2,_0x2f1d77){_0x356ab2=_0x356ab2-0x0;var _0x10c5d4=_0xfa2e[_0x356ab2];return _0x10c5d4;};'use strict';var client=require(_0xefa2('0x0'));var moment=require(_0xefa2('0x1'));exports[_0xefa2('0x2')]=function(_0x1b2f5e){_0x1b2f5e[_0xefa2('0x3')]=_0x1b2f5e['queue'];return client[_0xefa2('0x4')](_0xefa2('0x5'),{'body':_0x1b2f5e,'log':_0xefa2('0x5')});};exports[_0xefa2('0x6')]=function(_0x2126dc){return client[_0xefa2('0x4')](_0xefa2('0x7'),{'options':{'where':{'endtime':{'$between':[moment()['subtract'](_0x2126dc,_0xefa2('0x8'))[_0xefa2('0x9')](_0xefa2('0xa')),moment()[_0xefa2('0x9')](_0xefa2('0xa'))]}},'raw':![]},'log':_0xefa2('0xb')});};exports[_0xefa2('0xc')]=function(){return function(){return client['Request'](_0xefa2('0xd'),{'options':{'where':{'createdAt':{'$between':[moment()[_0xefa2('0xe')]('day')['format'](_0xefa2('0xa')),moment()[_0xefa2('0xf')]('day')['format'](_0xefa2('0xa'))]},'campaigntype':'queue'},'raw':![]},'log':_0xefa2('0xd')});};};exports[_0xefa2('0x10')]=function(){return function(){return client[_0xefa2('0x4')]('GetCampaignHopperHistory',{'options':{'where':{'createdAt':{'$between':[moment()['startOf'](_0xefa2('0x11'))[_0xefa2('0x9')](_0xefa2('0xa')),moment()[_0xefa2('0xf')](_0xefa2('0x11'))[_0xefa2('0x9')](_0xefa2('0xa'))]},'campaigntype':_0xefa2('0x12')},'raw':![]},'log':_0xefa2('0x13')});};};