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