Built motion from commit da24aabd.|2.6.20
[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 _0xd06e=['minutes','format','YYYY-MM-DD\x20HH:mm:ss','getVoiceQueueHopperHistory','GetVoiceQueueHopperHistory','startOf','endOf','day','queue','GetCampaignHopperHistory','ivr','createHistory','Request','CreateCmHopperHistory','avgHandleTime','AvgHandleTime'];(function(_0x4a9fb1,_0x273043){var _0x348672=function(_0x142b69){while(--_0x142b69){_0x4a9fb1['push'](_0x4a9fb1['shift']());}};_0x348672(++_0x273043);}(_0xd06e,0x16b));var _0xed06=function(_0x11d261,_0xf919b){_0x11d261=_0x11d261-0x0;var _0x51e845=_0xd06e[_0x11d261];return _0x51e845;};'use strict';var client=require('../client');var moment=require('moment');exports[_0xed06('0x0')]=function(_0x22caff){_0x22caff['campaign']=_0x22caff['queue'];return client[_0xed06('0x1')](_0xed06('0x2'),{'body':_0x22caff,'log':_0xed06('0x2')});};exports[_0xed06('0x3')]=function(_0x77e456){return client[_0xed06('0x1')](_0xed06('0x4'),{'options':{'where':{'endtime':{'$between':[moment()['subtract'](_0x77e456,_0xed06('0x5'))[_0xed06('0x6')](_0xed06('0x7')),moment()['format'](_0xed06('0x7'))]}},'raw':![]},'log':'GetCmHopperHistory'});};exports[_0xed06('0x8')]=function(){return function(){return client['Request'](_0xed06('0x9'),{'options':{'where':{'createdAt':{'$between':[moment()[_0xed06('0xa')]('day')[_0xed06('0x6')](_0xed06('0x7')),moment()[_0xed06('0xb')](_0xed06('0xc'))[_0xed06('0x6')](_0xed06('0x7'))]},'campaigntype':_0xed06('0xd')},'raw':![]},'log':_0xed06('0x9')});};};exports['getCampaignHopperHistory']=function(){return function(){return client[_0xed06('0x1')](_0xed06('0xe'),{'options':{'where':{'createdAt':{'$between':[moment()['startOf'](_0xed06('0xc'))[_0xed06('0x6')](_0xed06('0x7')),moment()[_0xed06('0xb')]('day')[_0xed06('0x6')](_0xed06('0x7'))]},'campaigntype':_0xed06('0xf')},'raw':![]},'log':_0xed06('0xe')});};};