Built motion from commit (unavailable).|2.0.72
[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 _0xce68=['GetCampaignHopperHistory','ivr','../client','createHistory','campaign','queue','Request','CreateCmHopperHistory','avgHandleTime','AvgHandleTime','subtract','YYYY-MM-DD\x20HH:mm:ss','format','GetCmHopperHistory','GetVoiceQueueHopperHistory','startOf','day','endOf','getCampaignHopperHistory'];(function(_0xc06b19,_0x4a4230){var _0x3f0a2f=function(_0x1a1e85){while(--_0x1a1e85){_0xc06b19['push'](_0xc06b19['shift']());}};_0x3f0a2f(++_0x4a4230);}(_0xce68,0x10c));var _0x8ce6=function(_0x479988,_0xe6190d){_0x479988=_0x479988-0x0;var _0x332c92=_0xce68[_0x479988];return _0x332c92;};'use strict';var client=require(_0x8ce6('0x0'));var moment=require('moment');exports[_0x8ce6('0x1')]=function(_0x127429){return function(){_0x127429[_0x8ce6('0x2')]=_0x127429[_0x8ce6('0x3')];return client[_0x8ce6('0x4')]('CreateCmHopperHistory',{'body':_0x127429,'log':_0x8ce6('0x5')});};};exports[_0x8ce6('0x6')]=function(_0x39301d){return function(){return client['Request'](_0x8ce6('0x7'),{'options':{'where':{'endtime':{'$between':[moment()[_0x8ce6('0x8')](_0x39301d,'minutes')['format'](_0x8ce6('0x9')),moment()[_0x8ce6('0xa')](_0x8ce6('0x9'))]}},'raw':![]},'log':_0x8ce6('0xb')});};};exports['getVoiceQueueHopperHistory']=function(_0x417bcf){return function(){return client[_0x8ce6('0x4')](_0x8ce6('0xc'),{'options':{'where':{'createdAt':{'$between':[moment()[_0x8ce6('0xd')](_0x8ce6('0xe'))[_0x8ce6('0xa')](_0x8ce6('0x9')),moment()[_0x8ce6('0xf')](_0x8ce6('0xe'))[_0x8ce6('0xa')](_0x8ce6('0x9'))]},'campaigntype':_0x8ce6('0x3')},'raw':![]},'log':_0x8ce6('0xc')});};};exports[_0x8ce6('0x10')]=function(_0x1e8b85){return function(){return client[_0x8ce6('0x4')](_0x8ce6('0x11'),{'options':{'where':{'createdAt':{'$between':[moment()[_0x8ce6('0xd')]('day')[_0x8ce6('0xa')]('YYYY-MM-DD\x20HH:mm:ss'),moment()[_0x8ce6('0xf')](_0x8ce6('0xe'))[_0x8ce6('0xa')](_0x8ce6('0x9'))]},'campaigntype':_0x8ce6('0x12')},'raw':![]},'log':_0x8ce6('0x11')});};};