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