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