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