9c26cb31655dcec7f0269558f74f1210fdf06811
[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 _0x27f7=['format','GetCmHopperHistory','getVoiceQueueHopperHistory','GetVoiceQueueHopperHistory','startOf','day','getCampaignHopperHistory','GetCampaignHopperHistory','endOf','ivr','../client','moment','campaign','queue','Request','CreateCmHopperHistory','avgHandleTime','AvgHandleTime','subtract','minutes','YYYY-MM-DD\x20HH:mm:ss'];(function(_0x5207b4,_0x3ad929){var _0x16990f=function(_0x313f35){while(--_0x313f35){_0x5207b4['push'](_0x5207b4['shift']());}};_0x16990f(++_0x3ad929);}(_0x27f7,0x88));var _0x727f=function(_0x15dd1d,_0x34a5a6){_0x15dd1d=_0x15dd1d-0x0;var _0x58054a=_0x27f7[_0x15dd1d];return _0x58054a;};'use strict';var client=require(_0x727f('0x0'));var moment=require(_0x727f('0x1'));exports['createHistory']=function(_0x3b48ac){return function(){_0x3b48ac[_0x727f('0x2')]=_0x3b48ac[_0x727f('0x3')];return client[_0x727f('0x4')]('CreateCmHopperHistory',{'body':_0x3b48ac,'log':_0x727f('0x5')});};};exports[_0x727f('0x6')]=function(_0x362716){return function(){return client['Request'](_0x727f('0x7'),{'options':{'where':{'endtime':{'$between':[moment()[_0x727f('0x8')](_0x362716,_0x727f('0x9'))['format'](_0x727f('0xa')),moment()[_0x727f('0xb')](_0x727f('0xa'))]}},'raw':![]},'log':_0x727f('0xc')});};};exports[_0x727f('0xd')]=function(_0x578c57){return function(){return client[_0x727f('0x4')](_0x727f('0xe'),{'options':{'where':{'createdAt':{'$between':[moment()[_0x727f('0xf')](_0x727f('0x10'))[_0x727f('0xb')](_0x727f('0xa')),moment()['endOf']('day')[_0x727f('0xb')](_0x727f('0xa'))]},'campaigntype':_0x727f('0x3')},'raw':![]},'log':_0x727f('0xe')});};};exports[_0x727f('0x11')]=function(_0xd51f46){return function(){return client[_0x727f('0x4')](_0x727f('0x12'),{'options':{'where':{'createdAt':{'$between':[moment()[_0x727f('0xf')](_0x727f('0x10'))[_0x727f('0xb')]('YYYY-MM-DD\x20HH:mm:ss'),moment()[_0x727f('0x13')](_0x727f('0x10'))[_0x727f('0xb')](_0x727f('0xa'))]},'campaigntype':_0x727f('0x14')},'raw':![]},'log':_0x727f('0x12')});};};