85f19cb8534cdeb83171920981da0f3a3d1371ef
[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 _0xb7e2=['getVoiceQueueHopperHistory','GetVoiceQueueHopperHistory','endOf','day','queue','getCampaignHopperHistory','GetCampaignHopperHistory','../client','createHistory','campaign','Request','CreateCmHopperHistory','avgHandleTime','AvgHandleTime','subtract','format','YYYY-MM-DD\x20HH:mm:ss','GetCmHopperHistory'];(function(_0x19950b,_0x53d0d7){var _0x3c6b41=function(_0x3924ad){while(--_0x3924ad){_0x19950b['push'](_0x19950b['shift']());}};_0x3c6b41(++_0x53d0d7);}(_0xb7e2,0x103));var _0x2b7e=function(_0x9faa02,_0x267bbd){_0x9faa02=_0x9faa02-0x0;var _0x361a0f=_0xb7e2[_0x9faa02];return _0x361a0f;};'use strict';var client=require(_0x2b7e('0x0'));var moment=require('moment');exports[_0x2b7e('0x1')]=function(_0x4f5a36){return function(){_0x4f5a36[_0x2b7e('0x2')]=_0x4f5a36['queue'];return client[_0x2b7e('0x3')]('CreateCmHopperHistory',{'body':_0x4f5a36,'log':_0x2b7e('0x4')});};};exports[_0x2b7e('0x5')]=function(_0x21ccc4){return function(){return client[_0x2b7e('0x3')](_0x2b7e('0x6'),{'options':{'where':{'endtime':{'$between':[moment()[_0x2b7e('0x7')](_0x21ccc4,'minutes')[_0x2b7e('0x8')](_0x2b7e('0x9')),moment()[_0x2b7e('0x8')]('YYYY-MM-DD\x20HH:mm:ss')]}},'raw':![]},'log':_0x2b7e('0xa')});};};exports[_0x2b7e('0xb')]=function(_0x2f5991){return function(){return client[_0x2b7e('0x3')](_0x2b7e('0xc'),{'options':{'where':{'createdAt':{'$between':[moment()['startOf']('day')[_0x2b7e('0x8')](_0x2b7e('0x9')),moment()[_0x2b7e('0xd')](_0x2b7e('0xe'))[_0x2b7e('0x8')](_0x2b7e('0x9'))]},'campaigntype':_0x2b7e('0xf')},'raw':![]},'log':'GetVoiceQueueHopperHistory'});};};exports[_0x2b7e('0x10')]=function(_0x241b9c){return function(){return client[_0x2b7e('0x3')](_0x2b7e('0x11'),{'options':{'where':{'createdAt':{'$between':[moment()['startOf']('day')['format'](_0x2b7e('0x9')),moment()['endOf'](_0x2b7e('0xe'))['format'](_0x2b7e('0x9'))]},'campaigntype':'ivr'},'raw':![]},'log':_0x2b7e('0x11')});};};