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