Built motion from commit (unavailable).|2.4.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 _0x351d=['YYYY-MM-DD\x20HH:mm:ss','GetCmHopperHistory','startOf','day','endOf','GetVoiceQueueHopperHistory','getCampaignHopperHistory','GetCampaignHopperHistory','../client','createHistory','campaign','Request','CreateCmHopperHistory','avgHandleTime','AvgHandleTime','subtract','format'];(function(_0x2aecb2,_0x343312){var _0x3ebb80=function(_0x19fab3){while(--_0x19fab3){_0x2aecb2['push'](_0x2aecb2['shift']());}};_0x3ebb80(++_0x343312);}(_0x351d,0x90));var _0xd351=function(_0x53775b,_0x3499d6){_0x53775b=_0x53775b-0x0;var _0x4a6565=_0x351d[_0x53775b];return _0x4a6565;};'use strict';var client=require(_0xd351('0x0'));var moment=require('moment');exports[_0xd351('0x1')]=function(_0x2aa5fd){return function(){_0x2aa5fd[_0xd351('0x2')]=_0x2aa5fd['queue'];return client[_0xd351('0x3')]('CreateCmHopperHistory',{'body':_0x2aa5fd,'log':_0xd351('0x4')});};};exports[_0xd351('0x5')]=function(_0x49610f){return function(){return client[_0xd351('0x3')](_0xd351('0x6'),{'options':{'where':{'endtime':{'$between':[moment()[_0xd351('0x7')](_0x49610f,'minutes')[_0xd351('0x8')](_0xd351('0x9')),moment()['format'](_0xd351('0x9'))]}},'raw':![]},'log':_0xd351('0xa')});};};exports['getVoiceQueueHopperHistory']=function(_0x586c60){return function(){return client[_0xd351('0x3')]('GetVoiceQueueHopperHistory',{'options':{'where':{'createdAt':{'$between':[moment()[_0xd351('0xb')](_0xd351('0xc'))['format'](_0xd351('0x9')),moment()[_0xd351('0xd')]('day')[_0xd351('0x8')]('YYYY-MM-DD\x20HH:mm:ss')]},'campaigntype':'queue'},'raw':![]},'log':_0xd351('0xe')});};};exports[_0xd351('0xf')]=function(_0x23445f){return function(){return client[_0xd351('0x3')]('GetCampaignHopperHistory',{'options':{'where':{'createdAt':{'$between':[moment()[_0xd351('0xb')](_0xd351('0xc'))['format'](_0xd351('0x9')),moment()[_0xd351('0xd')](_0xd351('0xc'))[_0xd351('0x8')](_0xd351('0x9'))]},'campaigntype':'ivr'},'raw':![]},'log':_0xd351('0x10')});};};