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