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