Built motion from commit (unavailable).|2.5.14
[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 _0x2032=['CreateCmHopperHistory','avgHandleTime','AvgHandleTime','subtract','minutes','format','YYYY-MM-DD\x20HH:mm:ss','GetVoiceQueueHopperHistory','startOf','day','endOf','ivr','GetCampaignHopperHistory','moment','createHistory','queue','Request'];(function(_0x4dca47,_0x50a7f3){var _0x934c6a=function(_0x6fabaf){while(--_0x6fabaf){_0x4dca47['push'](_0x4dca47['shift']());}};_0x934c6a(++_0x50a7f3);}(_0x2032,0xd9));var _0x2203=function(_0x1abce3,_0xf19eaf){_0x1abce3=_0x1abce3-0x0;var _0x699529=_0x2032[_0x1abce3];return _0x699529;};'use strict';var client=require('../client');var moment=require(_0x2203('0x0'));exports[_0x2203('0x1')]=function(_0xcd892f){return function(){_0xcd892f['campaign']=_0xcd892f[_0x2203('0x2')];return client[_0x2203('0x3')]('CreateCmHopperHistory',{'body':_0xcd892f,'log':_0x2203('0x4')});};};exports[_0x2203('0x5')]=function(_0x44ccfd){return function(){return client[_0x2203('0x3')](_0x2203('0x6'),{'options':{'where':{'endtime':{'$between':[moment()[_0x2203('0x7')](_0x44ccfd,_0x2203('0x8'))[_0x2203('0x9')](_0x2203('0xa')),moment()[_0x2203('0x9')](_0x2203('0xa'))]}},'raw':![]},'log':'GetCmHopperHistory'});};};exports['getVoiceQueueHopperHistory']=function(_0x10f055){return function(){return client['Request'](_0x2203('0xb'),{'options':{'where':{'createdAt':{'$between':[moment()[_0x2203('0xc')](_0x2203('0xd'))['format'](_0x2203('0xa')),moment()['endOf'](_0x2203('0xd'))['format'](_0x2203('0xa'))]},'campaigntype':_0x2203('0x2')},'raw':![]},'log':'GetVoiceQueueHopperHistory'});};};exports['getCampaignHopperHistory']=function(_0x585c76){return function(){return client['Request']('GetCampaignHopperHistory',{'options':{'where':{'createdAt':{'$between':[moment()[_0x2203('0xc')]('day')['format'](_0x2203('0xa')),moment()[_0x2203('0xe')](_0x2203('0xd'))[_0x2203('0x9')](_0x2203('0xa'))]},'campaigntype':_0x2203('0xf')},'raw':![]},'log':_0x2203('0x10')});};};