Built motion from commit e02f907f.|2.6.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 _0xd958=['YYYY-MM-DD\x20HH:mm:ss','getVoiceQueueHopperHistory','startOf','day','endOf','GetVoiceQueueHopperHistory','getCampaignHopperHistory','GetCampaignHopperHistory','../client','createHistory','queue','Request','CreateCmHopperHistory','avgHandleTime','AvgHandleTime','minutes','format'];(function(_0x536ed3,_0x481b22){var _0x1a3f43=function(_0x30e2f9){while(--_0x30e2f9){_0x536ed3['push'](_0x536ed3['shift']());}};_0x1a3f43(++_0x481b22);}(_0xd958,0x15c));var _0x8d95=function(_0x1b4b23,_0x5dd6d6){_0x1b4b23=_0x1b4b23-0x0;var _0x2a325b=_0xd958[_0x1b4b23];return _0x2a325b;};'use strict';var client=require(_0x8d95('0x0'));var moment=require('moment');exports[_0x8d95('0x1')]=function(_0x5e7179){_0x5e7179['campaign']=_0x5e7179[_0x8d95('0x2')];return client[_0x8d95('0x3')](_0x8d95('0x4'),{'body':_0x5e7179,'log':'CreateCmHopperHistory'});};exports[_0x8d95('0x5')]=function(_0x56c61d){return client[_0x8d95('0x3')](_0x8d95('0x6'),{'options':{'where':{'endtime':{'$between':[moment()['subtract'](_0x56c61d,_0x8d95('0x7'))[_0x8d95('0x8')](_0x8d95('0x9')),moment()[_0x8d95('0x8')](_0x8d95('0x9'))]}},'raw':![]},'log':'GetCmHopperHistory'});};exports[_0x8d95('0xa')]=function(){return function(){return client[_0x8d95('0x3')]('GetVoiceQueueHopperHistory',{'options':{'where':{'createdAt':{'$between':[moment()[_0x8d95('0xb')](_0x8d95('0xc'))[_0x8d95('0x8')](_0x8d95('0x9')),moment()[_0x8d95('0xd')](_0x8d95('0xc'))[_0x8d95('0x8')](_0x8d95('0x9'))]},'campaigntype':'queue'},'raw':![]},'log':_0x8d95('0xe')});};};exports[_0x8d95('0xf')]=function(){return function(){return client[_0x8d95('0x3')]('GetCampaignHopperHistory',{'options':{'where':{'createdAt':{'$between':[moment()[_0x8d95('0xb')]('day')[_0x8d95('0x8')](_0x8d95('0x9')),moment()[_0x8d95('0xd')](_0x8d95('0xc'))[_0x8d95('0x8')](_0x8d95('0x9'))]},'campaigntype':'ivr'},'raw':![]},'log':_0x8d95('0x10')});};};