Built motion from commit (unavailable).|2.5.10
[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 _0x7916=['getVoiceQueueHopperHistory','GetVoiceQueueHopperHistory','startOf','day','YYYY-MM-DD\x20HH:mm:ss','endOf','getCampaignHopperHistory','GetCampaignHopperHistory','../client','createHistory','queue','Request','CreateCmHopperHistory','AvgHandleTime','subtract','format'];(function(_0x4845ee,_0xdbf73f){var _0x3570a5=function(_0xaeeb5c){while(--_0xaeeb5c){_0x4845ee['push'](_0x4845ee['shift']());}};_0x3570a5(++_0xdbf73f);}(_0x7916,0x128));var _0x6791=function(_0x24248d,_0x5d81f2){_0x24248d=_0x24248d-0x0;var _0x4704a7=_0x7916[_0x24248d];return _0x4704a7;};'use strict';var client=require(_0x6791('0x0'));var moment=require('moment');exports[_0x6791('0x1')]=function(_0xdaaf2b){return function(){_0xdaaf2b['campaign']=_0xdaaf2b[_0x6791('0x2')];return client[_0x6791('0x3')](_0x6791('0x4'),{'body':_0xdaaf2b,'log':_0x6791('0x4')});};};exports['avgHandleTime']=function(_0xe98396){return function(){return client['Request'](_0x6791('0x5'),{'options':{'where':{'endtime':{'$between':[moment()[_0x6791('0x6')](_0xe98396,'minutes')[_0x6791('0x7')]('YYYY-MM-DD\x20HH:mm:ss'),moment()[_0x6791('0x7')]('YYYY-MM-DD\x20HH:mm:ss')]}},'raw':![]},'log':'GetCmHopperHistory'});};};exports[_0x6791('0x8')]=function(_0x198a64){return function(){return client['Request'](_0x6791('0x9'),{'options':{'where':{'createdAt':{'$between':[moment()[_0x6791('0xa')](_0x6791('0xb'))['format'](_0x6791('0xc')),moment()[_0x6791('0xd')](_0x6791('0xb'))[_0x6791('0x7')](_0x6791('0xc'))]},'campaigntype':_0x6791('0x2')},'raw':![]},'log':_0x6791('0x9')});};};exports[_0x6791('0xe')]=function(_0x423e22){return function(){return client[_0x6791('0x3')](_0x6791('0xf'),{'options':{'where':{'createdAt':{'$between':[moment()['startOf']('day')[_0x6791('0x7')]('YYYY-MM-DD\x20HH:mm:ss'),moment()[_0x6791('0xd')]('day')[_0x6791('0x7')](_0x6791('0xc'))]},'campaigntype':'ivr'},'raw':![]},'log':_0x6791('0xf')});};};