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