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