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 _0xbd6e=['day','format','endOf','type','duration','billableseconds','GetVoiceCallReports','moment','lodash','../client','Request','CreateVoiceCallReport','calleridnum','context','callerid','GetVoiceCallReport','outbound','startOf'];(function(_0x234ae1,_0x42bdd6){var _0x227ba0=function(_0x1f6531){while(--_0x1f6531){_0x234ae1['push'](_0x234ae1['shift']());}};_0x227ba0(++_0x42bdd6);}(_0xbd6e,0xbb));var _0xebd6=function(_0x49e571,_0x4dc9be){_0x49e571=_0x49e571-0x0;var _0xd9cb5=_0xbd6e[_0x49e571];return _0xd9cb5;};'use strict';var moment=require(_0xebd6('0x0'));var util=require('util');var _=require(_0xebd6('0x1'));var client=require(_0xebd6('0x2'));exports['create']=function(_0x547ee1){return client[_0xebd6('0x3')](_0xebd6('0x4'),{'body':_['merge'](_0x547ee1,{'source':_0x547ee1[_0xebd6('0x5')],'destinationcontext':_0x547ee1[_0xebd6('0x6')],'callerid':_0x547ee1[_0xebd6('0x7')],'amaflags':'DOCUMENTATION'}),'log':'CreateVoiceCallReport'});};exports['getVoiceCallReports']=function(){return function(){return client[_0xebd6('0x3')](_0xebd6('0x8'),{'options':{'where':{'type':[_0xebd6('0x9')],'createdAt':{'$between':[moment()[_0xebd6('0xa')](_0xebd6('0xb'))[_0xebd6('0xc')]('YYYY-MM-DD\x20HH:mm:ss'),moment()[_0xebd6('0xd')](_0xebd6('0xb'))[_0xebd6('0xc')]('YYYY-MM-DD\x20HH:mm:ss')]}},'attributes':[_0xebd6('0xe'),'disposition',_0xebd6('0xf'),_0xebd6('0x10')]},'log':_0xebd6('0x11')});};};