ffcc75979e823fc0a0352c8ae29dd0cb5e052933
[motion2.git] / server / services / ami / rpc / voiceCallReport.js
1 // *************************************************************************
2 // *                                                                       *
3 // * xCALLY Motion -  The Omnichannel Contact Center                       *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved                     *
5 // *                                                                       *
6 // *************************************************************************
7 // *                                                                       *
8 // * Email: info@xcally.com                                                *
9 // * Website: https://www.xcally.com                                       *
10 // *                                                                       *
11 // *************************************************************************
12 // *                                                                       *
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.                         *
16 // *                                                                       *
17 // *************************************************************************
18 var _0x41b3=['moment','util','lodash','../client','create','CreateVoiceCallReport','calleridnum','context','callerid','DOCUMENTATION','getVoiceCallReports','Request','GetVoiceCallReport','day','format','YYYY-MM-DD\x20HH:mm:ss','endOf','type','disposition','duration','billableseconds','GetVoiceCallReports'];(function(_0x193e17,_0x47983e){var _0x34a587=function(_0x4cee83){while(--_0x4cee83){_0x193e17['push'](_0x193e17['shift']());}};_0x34a587(++_0x47983e);}(_0x41b3,0x108));var _0x341b=function(_0x4e205b,_0x576979){_0x4e205b=_0x4e205b-0x0;var _0x2caadd=_0x41b3[_0x4e205b];return _0x2caadd;};'use strict';var moment=require(_0x341b('0x0'));var util=require(_0x341b('0x1'));var _=require(_0x341b('0x2'));var client=require(_0x341b('0x3'));exports[_0x341b('0x4')]=function(_0xe87d9){return client['Request'](_0x341b('0x5'),{'body':_['merge'](_0xe87d9,{'source':_0xe87d9[_0x341b('0x6')],'destinationcontext':_0xe87d9[_0x341b('0x7')],'callerid':_0xe87d9[_0x341b('0x8')],'amaflags':_0x341b('0x9')}),'log':'CreateVoiceCallReport'});};exports[_0x341b('0xa')]=function(){return function(){return client[_0x341b('0xb')](_0x341b('0xc'),{'options':{'where':{'type':['outbound'],'createdAt':{'$between':[moment()['startOf'](_0x341b('0xd'))[_0x341b('0xe')](_0x341b('0xf')),moment()[_0x341b('0x10')](_0x341b('0xd'))[_0x341b('0xe')](_0x341b('0xf'))]}},'attributes':[_0x341b('0x11'),_0x341b('0x12'),_0x341b('0x13'),_0x341b('0x14')]},'log':_0x341b('0x15')});};};