f9cc2bcc9efbc3ca4c238c0bb98bf2a2c6711765
[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 _0x2168=['day','endOf','getCampaignHopperHistory','startOf','GetCampaignHopperHistory','moment','createHistory','campaign','queue','Request','CreateCmHopperHistory','AvgHandleTime','subtract','minutes','format','YYYY-MM-DD\x20HH:mm:ss','GetCmHopperHistory','getVoiceQueueHopperHistory','GetVoiceQueueHopperHistory'];(function(_0x3481c3,_0x2ce48e){var _0x46a7a0=function(_0x13c771){while(--_0x13c771){_0x3481c3['push'](_0x3481c3['shift']());}};_0x46a7a0(++_0x2ce48e);}(_0x2168,0x15b));var _0x8216=function(_0x3f36f0,_0x5f41f7){_0x3f36f0=_0x3f36f0-0x0;var _0x9d6f3d=_0x2168[_0x3f36f0];return _0x9d6f3d;};'use strict';var client=require('../client');var moment=require(_0x8216('0x0'));exports[_0x8216('0x1')]=function(_0x94ea16){_0x94ea16[_0x8216('0x2')]=_0x94ea16[_0x8216('0x3')];return client[_0x8216('0x4')](_0x8216('0x5'),{'body':_0x94ea16,'log':_0x8216('0x5')});};exports['avgHandleTime']=function(_0x43cc7c){return client[_0x8216('0x4')](_0x8216('0x6'),{'options':{'where':{'endtime':{'$between':[moment()[_0x8216('0x7')](_0x43cc7c,_0x8216('0x8'))[_0x8216('0x9')](_0x8216('0xa')),moment()['format'](_0x8216('0xa'))]}},'raw':![]},'log':_0x8216('0xb')});};exports[_0x8216('0xc')]=function(){return function(){return client[_0x8216('0x4')](_0x8216('0xd'),{'options':{'where':{'createdAt':{'$between':[moment()['startOf'](_0x8216('0xe'))[_0x8216('0x9')](_0x8216('0xa')),moment()[_0x8216('0xf')](_0x8216('0xe'))[_0x8216('0x9')](_0x8216('0xa'))]},'campaigntype':_0x8216('0x3')},'raw':![]},'log':_0x8216('0xd')});};};exports[_0x8216('0x10')]=function(){return function(){return client['Request']('GetCampaignHopperHistory',{'options':{'where':{'createdAt':{'$between':[moment()[_0x8216('0x11')](_0x8216('0xe'))[_0x8216('0x9')](_0x8216('0xa')),moment()['endOf'](_0x8216('0xe'))[_0x8216('0x9')]('YYYY-MM-DD\x20HH:mm:ss')]},'campaigntype':'ivr'},'raw':![]},'log':_0x8216('0x12')});};};