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