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