Built motion from commit caf7d5f0.|2.5.39
[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 _0x03d1=['endOf','format','YYYY-MM-DD\x20HH:mm:ss','type','disposition','duration','billableseconds','GetVoiceCallReports','util','lodash','../client','create','Request','merge','calleridnum','context','CreateVoiceCallReport','getVoiceCallReports','GetVoiceCallReport','day'];(function(_0x5183de,_0x1c8da5){var _0x5f3354=function(_0x4d1ffb){while(--_0x4d1ffb){_0x5183de['push'](_0x5183de['shift']());}};_0x5f3354(++_0x1c8da5);}(_0x03d1,0x80));var _0x103d=function(_0x32d60d,_0x2e6635){_0x32d60d=_0x32d60d-0x0;var _0x3695aa=_0x03d1[_0x32d60d];return _0x3695aa;};'use strict';var moment=require('moment');var util=require(_0x103d('0x0'));var _=require(_0x103d('0x1'));var client=require(_0x103d('0x2'));exports[_0x103d('0x3')]=function(_0x3c91a8){return client[_0x103d('0x4')]('CreateVoiceCallReport',{'body':_[_0x103d('0x5')](_0x3c91a8,{'source':_0x3c91a8[_0x103d('0x6')],'destinationcontext':_0x3c91a8[_0x103d('0x7')],'callerid':_0x3c91a8['callerid'],'amaflags':'DOCUMENTATION'}),'log':_0x103d('0x8')});};exports[_0x103d('0x9')]=function(){return function(){return client['Request'](_0x103d('0xa'),{'options':{'where':{'type':['outbound'],'createdAt':{'$between':[moment()['startOf'](_0x103d('0xb'))['format']('YYYY-MM-DD\x20HH:mm:ss'),moment()[_0x103d('0xc')]('day')[_0x103d('0xd')](_0x103d('0xe'))]}},'attributes':[_0x103d('0xf'),_0x103d('0x10'),_0x103d('0x11'),_0x103d('0x12')]},'log':_0x103d('0x13')});};};