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