Built motion from commit b0a9a629.|2.6.33
[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 _0xfe42=['YYYY-MM-DD\x20HH:mm:ss','format','getVoiceQueueHopperHistory','GetVoiceQueueHopperHistory','startOf','day','endOf','queue','getCampaignHopperHistory','GetCampaignHopperHistory','../client','moment','createHistory','Request','CreateCmHopperHistory','avgHandleTime','AvgHandleTime','subtract','minutes'];(function(_0x494d1f,_0x3f72ff){var _0x457b6e=function(_0x38cb16){while(--_0x38cb16){_0x494d1f['push'](_0x494d1f['shift']());}};_0x457b6e(++_0x3f72ff);}(_0xfe42,0x101));var _0x2fe4=function(_0x419779,_0x2a3ecc){_0x419779=_0x419779-0x0;var _0x15f3ed=_0xfe42[_0x419779];return _0x15f3ed;};'use strict';var client=require(_0x2fe4('0x0'));var moment=require(_0x2fe4('0x1'));exports[_0x2fe4('0x2')]=function(_0x57ada9){_0x57ada9['campaign']=_0x57ada9['queue'];return client[_0x2fe4('0x3')](_0x2fe4('0x4'),{'body':_0x57ada9,'log':_0x2fe4('0x4')});};exports[_0x2fe4('0x5')]=function(_0x29c866){return client['Request'](_0x2fe4('0x6'),{'options':{'where':{'endtime':{'$between':[moment()[_0x2fe4('0x7')](_0x29c866,_0x2fe4('0x8'))['format'](_0x2fe4('0x9')),moment()[_0x2fe4('0xa')](_0x2fe4('0x9'))]}},'raw':![]},'log':'GetCmHopperHistory'});};exports[_0x2fe4('0xb')]=function(){return function(){return client[_0x2fe4('0x3')](_0x2fe4('0xc'),{'options':{'where':{'createdAt':{'$between':[moment()[_0x2fe4('0xd')](_0x2fe4('0xe'))[_0x2fe4('0xa')](_0x2fe4('0x9')),moment()[_0x2fe4('0xf')](_0x2fe4('0xe'))[_0x2fe4('0xa')](_0x2fe4('0x9'))]},'campaigntype':_0x2fe4('0x10')},'raw':![]},'log':'GetVoiceQueueHopperHistory'});};};exports[_0x2fe4('0x11')]=function(){return function(){return client[_0x2fe4('0x3')](_0x2fe4('0x12'),{'options':{'where':{'createdAt':{'$between':[moment()[_0x2fe4('0xd')](_0x2fe4('0xe'))[_0x2fe4('0xa')](_0x2fe4('0x9')),moment()[_0x2fe4('0xf')](_0x2fe4('0xe'))[_0x2fe4('0xa')]('YYYY-MM-DD\x20HH:mm:ss')]},'campaigntype':'ivr'},'raw':![]},'log':'GetCampaignHopperHistory'});};};