fb9c4752bea44368a81edcf378092f077bf74aa0
[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 _0x7fa2=['getVoiceQueueHopperHistory','startOf','endOf','day','GetVoiceQueueHopperHistory','getCampaignHopperHistory','GetCampaignHopperHistory','ivr','campaign','queue','Request','CreateCmHopperHistory','format','YYYY-MM-DD\x20HH:mm:ss','GetCmHopperHistory'];(function(_0x48e1a2,_0x31be04){var _0x1fff0a=function(_0x4f1936){while(--_0x4f1936){_0x48e1a2['push'](_0x48e1a2['shift']());}};_0x1fff0a(++_0x31be04);}(_0x7fa2,0x1d9));var _0x27fa=function(_0x4c8aed,_0x57a438){_0x4c8aed=_0x4c8aed-0x0;var _0x615f4d=_0x7fa2[_0x4c8aed];return _0x615f4d;};'use strict';var client=require('../client');var moment=require('moment');exports['createHistory']=function(_0x26164a){return function(){_0x26164a[_0x27fa('0x0')]=_0x26164a[_0x27fa('0x1')];return client[_0x27fa('0x2')]('CreateCmHopperHistory',{'body':_0x26164a,'log':_0x27fa('0x3')});};};exports['avgHandleTime']=function(_0x232471){return function(){return client[_0x27fa('0x2')]('AvgHandleTime',{'options':{'where':{'endtime':{'$between':[moment()['subtract'](_0x232471,'minutes')[_0x27fa('0x4')](_0x27fa('0x5')),moment()[_0x27fa('0x4')](_0x27fa('0x5'))]}},'raw':![]},'log':_0x27fa('0x6')});};};exports[_0x27fa('0x7')]=function(_0x2bf73d){return function(){return client[_0x27fa('0x2')]('GetVoiceQueueHopperHistory',{'options':{'where':{'createdAt':{'$between':[moment()[_0x27fa('0x8')]('day')[_0x27fa('0x4')](_0x27fa('0x5')),moment()[_0x27fa('0x9')](_0x27fa('0xa'))[_0x27fa('0x4')](_0x27fa('0x5'))]},'campaigntype':_0x27fa('0x1')},'raw':![]},'log':_0x27fa('0xb')});};};exports[_0x27fa('0xc')]=function(_0x19b6c7){return function(){return client[_0x27fa('0x2')](_0x27fa('0xd'),{'options':{'where':{'createdAt':{'$between':[moment()[_0x27fa('0x8')](_0x27fa('0xa'))[_0x27fa('0x4')](_0x27fa('0x5')),moment()[_0x27fa('0x9')](_0x27fa('0xa'))[_0x27fa('0x4')]('YYYY-MM-DD\x20HH:mm:ss')]},'campaigntype':_0x27fa('0xe')},'raw':![]},'log':_0x27fa('0xd')});};};