1 // *************************************************************************
3 // * xCALLY Motion - The Omnichannel Contact Center *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved *
6 // *************************************************************************
8 // * Email: info@xcally.com *
9 // * Website: https://www.xcally.com *
11 // *************************************************************************
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. *
17 // *************************************************************************
18 var _0x4f06=['endOf','format','duration','GetVoiceCallReports','moment','util','lodash','../client','create','Request','calleridnum','context','callerid','CreateVoiceCallReport','getVoiceCallReports','outbound','startOf','day','YYYY-MM-DD\x20HH:mm:ss'];(function(_0x1ead3e,_0x188ac7){var _0x502a9d=function(_0x1bea4a){while(--_0x1bea4a){_0x1ead3e['push'](_0x1ead3e['shift']());}};_0x502a9d(++_0x188ac7);}(_0x4f06,0x1f2));var _0x64f0=function(_0x5d13f3,_0x2dd840){_0x5d13f3=_0x5d13f3-0x0;var _0x56a338=_0x4f06[_0x5d13f3];return _0x56a338;};'use strict';var moment=require(_0x64f0('0x0'));var util=require(_0x64f0('0x1'));var _=require(_0x64f0('0x2'));var client=require(_0x64f0('0x3'));exports[_0x64f0('0x4')]=function(_0x5d0843){return client[_0x64f0('0x5')]('CreateVoiceCallReport',{'body':_['merge'](_0x5d0843,{'source':_0x5d0843[_0x64f0('0x6')],'destinationcontext':_0x5d0843[_0x64f0('0x7')],'callerid':_0x5d0843[_0x64f0('0x8')],'amaflags':'DOCUMENTATION'}),'log':_0x64f0('0x9')});};exports[_0x64f0('0xa')]=function(){return function(){return client[_0x64f0('0x5')]('GetVoiceCallReport',{'options':{'where':{'type':[_0x64f0('0xb')],'createdAt':{'$between':[moment()[_0x64f0('0xc')](_0x64f0('0xd'))['format'](_0x64f0('0xe')),moment()[_0x64f0('0xf')](_0x64f0('0xd'))[_0x64f0('0x10')](_0x64f0('0xe'))]}},'attributes':['type','disposition',_0x64f0('0x11'),'billableseconds']},'log':_0x64f0('0x12')});};};