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 _0x55e0=['create','CreateVoiceCallReport','merge','Request','GetVoiceCallReport','outbound','startOf','endOf','disposition','billableseconds','GetVoiceCallReports','util','lodash','../client'];(function(_0x4d0ebd,_0x17ab0b){var _0x594e9c=function(_0x4d22ab){while(--_0x4d22ab){_0x4d0ebd['push'](_0x4d0ebd['shift']());}};_0x594e9c(++_0x17ab0b);}(_0x55e0,0xa5));var _0x055e=function(_0x2358a6,_0x44cfb7){_0x2358a6=_0x2358a6-0x0;var _0x4e6bb6=_0x55e0[_0x2358a6];return _0x4e6bb6;};'use strict';var moment=require('moment');var util=require(_0x055e('0x0'));var _=require(_0x055e('0x1'));var client=require(_0x055e('0x2'));exports[_0x055e('0x3')]=function(_0x4bdc66){return client['Request'](_0x055e('0x4'),{'body':_[_0x055e('0x5')](_0x4bdc66,{'source':_0x4bdc66['calleridnum'],'destinationcontext':_0x4bdc66['context'],'callerid':_0x4bdc66['callerid'],'amaflags':'DOCUMENTATION'}),'log':_0x055e('0x4')});};exports['getVoiceCallReports']=function(){return function(){return client[_0x055e('0x6')](_0x055e('0x7'),{'options':{'where':{'type':[_0x055e('0x8')],'createdAt':{'$between':[moment()[_0x055e('0x9')]('day')['format']('YYYY-MM-DD\x20HH:mm:ss'),moment()[_0x055e('0xa')]('day')['format']('YYYY-MM-DD\x20HH:mm:ss')]}},'attributes':['type',_0x055e('0xb'),'duration',_0x055e('0xc')]},'log':_0x055e('0xd')});};};