aea7101dcd58c85f01647fb8cf68e3d5ccfb5446
[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 _0x48e4=['endOf','uniqueid','queue','queuecallerjoinAt','queuecallerleaveAt','queuecallercomplete','queuecallercompleteAt','queuecallerexit','queuecallerabandon','queuecallerabandonAt','lodash','../client','Request','CreateVoiceQueueReport','GetVoiceQueueReport','startOf','day','format','YYYY-MM-DD\x20HH:mm:ss'];(function(_0x5c06fe,_0x12193a){var _0xf8ec9a=function(_0x3a7026){while(--_0x3a7026){_0x5c06fe['push'](_0x5c06fe['shift']());}};_0xf8ec9a(++_0x12193a);}(_0x48e4,0xdb));var _0x448e=function(_0x55e73d,_0x3d8e32){_0x55e73d=_0x55e73d-0x0;var _0x39d3cb=_0x48e4[_0x55e73d];return _0x39d3cb;};'use strict';var moment=require('moment');var _=require(_0x448e('0x0'));var client=require(_0x448e('0x1'));exports['create']=function(_0xe8ac2){return client[_0x448e('0x2')]('CreateVoiceQueueReport',{'body':_0xe8ac2,'log':_0x448e('0x3')});};exports['getVoiceQueueReports']=function(){return function(){return client[_0x448e('0x2')](_0x448e('0x4'),{'options':{'where':{'createdAt':{'$between':[moment()[_0x448e('0x5')](_0x448e('0x6'))[_0x448e('0x7')](_0x448e('0x8')),moment()[_0x448e('0x9')](_0x448e('0x6'))[_0x448e('0x7')](_0x448e('0x8'))]}},'attributes':[_0x448e('0xa'),_0x448e('0xb'),_0x448e('0xc'),_0x448e('0xd'),_0x448e('0xe'),_0x448e('0xf'),_0x448e('0x10'),'queuecallerexitAt',_0x448e('0x11'),_0x448e('0x12')]},'log':'GetVoiceQueueReports'});};};