Built motion from commit (unavailable).|2.5.11
[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 _0xfef3=['Request','subtract','minutes','format','YYYY-MM-DD\x20HH:mm:ss','GetCmHopperHistory','getVoiceQueueHopperHistory','GetVoiceQueueHopperHistory','startOf','day','endOf','getCampaignHopperHistory','ivr','GetCampaignHopperHistory','../client','createHistory','campaign','queue','CreateCmHopperHistory'];(function(_0x5471ec,_0x1ce81a){var _0x121d4c=function(_0xefb655){while(--_0xefb655){_0x5471ec['push'](_0x5471ec['shift']());}};_0x121d4c(++_0x1ce81a);}(_0xfef3,0x118));var _0x3fef=function(_0x393eac,_0x4505f3){_0x393eac=_0x393eac-0x0;var _0x37a891=_0xfef3[_0x393eac];return _0x37a891;};'use strict';var client=require(_0x3fef('0x0'));var moment=require('moment');exports[_0x3fef('0x1')]=function(_0x494ae6){return function(){_0x494ae6[_0x3fef('0x2')]=_0x494ae6[_0x3fef('0x3')];return client['Request'](_0x3fef('0x4'),{'body':_0x494ae6,'log':_0x3fef('0x4')});};};exports['avgHandleTime']=function(_0x2f88b8){return function(){return client[_0x3fef('0x5')]('AvgHandleTime',{'options':{'where':{'endtime':{'$between':[moment()[_0x3fef('0x6')](_0x2f88b8,_0x3fef('0x7'))[_0x3fef('0x8')](_0x3fef('0x9')),moment()[_0x3fef('0x8')](_0x3fef('0x9'))]}},'raw':![]},'log':_0x3fef('0xa')});};};exports[_0x3fef('0xb')]=function(_0x31c30f){return function(){return client[_0x3fef('0x5')](_0x3fef('0xc'),{'options':{'where':{'createdAt':{'$between':[moment()[_0x3fef('0xd')](_0x3fef('0xe'))[_0x3fef('0x8')]('YYYY-MM-DD\x20HH:mm:ss'),moment()[_0x3fef('0xf')](_0x3fef('0xe'))[_0x3fef('0x8')]('YYYY-MM-DD\x20HH:mm:ss')]},'campaigntype':_0x3fef('0x3')},'raw':![]},'log':'GetVoiceQueueHopperHistory'});};};exports[_0x3fef('0x10')]=function(_0x3d2c2d){return function(){return client[_0x3fef('0x5')]('GetCampaignHopperHistory',{'options':{'where':{'createdAt':{'$between':[moment()[_0x3fef('0xd')]('day')[_0x3fef('0x8')](_0x3fef('0x9')),moment()['endOf'](_0x3fef('0xe'))[_0x3fef('0x8')](_0x3fef('0x9'))]},'campaigntype':_0x3fef('0x11')},'raw':![]},'log':_0x3fef('0x12')});};};