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 _0xcb49=['context','callerid','DOCUMENTATION','getVoiceCallReports','GetVoiceCallReport','outbound','day','format','YYYY-MM-DD\x20HH:mm:ss','endOf','type','disposition','duration','billableseconds','moment','util','lodash','../client','create','Request','CreateVoiceCallReport','calleridnum'];(function(_0x1fe9f8,_0x4a1c3c){var _0x2ddb66=function(_0x28dee6){while(--_0x28dee6){_0x1fe9f8['push'](_0x1fe9f8['shift']());}};_0x2ddb66(++_0x4a1c3c);}(_0xcb49,0x19a));var _0x9cb4=function(_0x6d97b2,_0x3c1332){_0x6d97b2=_0x6d97b2-0x0;var _0x514465=_0xcb49[_0x6d97b2];return _0x514465;};'use strict';var moment=require(_0x9cb4('0x0'));var util=require(_0x9cb4('0x1'));var _=require(_0x9cb4('0x2'));var client=require(_0x9cb4('0x3'));exports[_0x9cb4('0x4')]=function(_0x257091){return client[_0x9cb4('0x5')](_0x9cb4('0x6'),{'body':_['merge'](_0x257091,{'source':_0x257091[_0x9cb4('0x7')],'destinationcontext':_0x257091[_0x9cb4('0x8')],'callerid':_0x257091[_0x9cb4('0x9')],'amaflags':_0x9cb4('0xa')}),'log':'CreateVoiceCallReport'});};exports[_0x9cb4('0xb')]=function(){return function(){return client[_0x9cb4('0x5')](_0x9cb4('0xc'),{'options':{'where':{'type':[_0x9cb4('0xd')],'createdAt':{'$between':[moment()['startOf'](_0x9cb4('0xe'))[_0x9cb4('0xf')](_0x9cb4('0x10')),moment()[_0x9cb4('0x11')]('day')['format'](_0x9cb4('0x10'))]}},'attributes':[_0x9cb4('0x12'),_0x9cb4('0x13'),_0x9cb4('0x14'),_0x9cb4('0x15')]},'log':'GetVoiceCallReports'});};};