06341417735fc410bbf86c127dca4885c6f89ad8
[motion2.git] / server / services / ami / rpc / voiceQueueReport.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 _0x881e=['queuecallerabandon','queuecallerabandonAt','GetVoiceQueueReports','../client','create','Request','CreateVoiceQueueReport','getVoiceQueueReports','GetVoiceQueueReport','day','format','endOf','queue','queuecallerjoinAt','queuecallerleaveAt','queuecallercomplete','queuecallerexit'];(function(_0x1abb09,_0x18ee91){var _0xea1c07=function(_0x38f42c){while(--_0x38f42c){_0x1abb09['push'](_0x1abb09['shift']());}};_0xea1c07(++_0x18ee91);}(_0x881e,0x146));var _0xe881=function(_0x2f4b0d,_0x3920d2){_0x2f4b0d=_0x2f4b0d-0x0;var _0x4382e1=_0x881e[_0x2f4b0d];return _0x4382e1;};'use strict';var moment=require('moment');var _=require('lodash');var client=require(_0xe881('0x0'));exports[_0xe881('0x1')]=function(_0x4ccb34){return client[_0xe881('0x2')]('CreateVoiceQueueReport',{'body':_0x4ccb34,'log':_0xe881('0x3')});};exports[_0xe881('0x4')]=function(){return function(){return client[_0xe881('0x2')](_0xe881('0x5'),{'options':{'where':{'createdAt':{'$between':[moment()['startOf'](_0xe881('0x6'))[_0xe881('0x7')]('YYYY-MM-DD\x20HH:mm:ss'),moment()[_0xe881('0x8')](_0xe881('0x6'))[_0xe881('0x7')]('YYYY-MM-DD\x20HH:mm:ss')]}},'attributes':['uniqueid',_0xe881('0x9'),_0xe881('0xa'),_0xe881('0xb'),_0xe881('0xc'),'queuecallercompleteAt',_0xe881('0xd'),'queuecallerexitAt',_0xe881('0xe'),_0xe881('0xf')]},'log':_0xe881('0x10')});};};