Built motion from commit 3770a7bd.|2.6.29
[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 _0xe610=['CreateVoiceCallReport','merge','calleridnum','context','DOCUMENTATION','Request','GetVoiceCallReport','outbound','day','format','YYYY-MM-DD\x20HH:mm:ss','endOf','type','disposition','duration','billableseconds','GetVoiceCallReports','moment','lodash','../client','create'];(function(_0x5581c9,_0x2f141b){var _0x404c93=function(_0x511056){while(--_0x511056){_0x5581c9['push'](_0x5581c9['shift']());}};_0x404c93(++_0x2f141b);}(_0xe610,0x1df));var _0x0e61=function(_0x397e5f,_0x454c8f){_0x397e5f=_0x397e5f-0x0;var _0x5302b8=_0xe610[_0x397e5f];return _0x5302b8;};'use strict';var moment=require(_0x0e61('0x0'));var util=require('util');var _=require(_0x0e61('0x1'));var client=require(_0x0e61('0x2'));exports[_0x0e61('0x3')]=function(_0x14c64c){return client['Request'](_0x0e61('0x4'),{'body':_[_0x0e61('0x5')](_0x14c64c,{'source':_0x14c64c[_0x0e61('0x6')],'destinationcontext':_0x14c64c[_0x0e61('0x7')],'callerid':_0x14c64c['callerid'],'amaflags':_0x0e61('0x8')}),'log':_0x0e61('0x4')});};exports['getVoiceCallReports']=function(){return function(){return client[_0x0e61('0x9')](_0x0e61('0xa'),{'options':{'where':{'type':[_0x0e61('0xb')],'createdAt':{'$between':[moment()['startOf'](_0x0e61('0xc'))[_0x0e61('0xd')](_0x0e61('0xe')),moment()[_0x0e61('0xf')](_0x0e61('0xc'))[_0x0e61('0xd')](_0x0e61('0xe'))]}},'attributes':[_0x0e61('0x10'),_0x0e61('0x11'),_0x0e61('0x12'),_0x0e61('0x13')]},'log':_0x0e61('0x14')});};};