Built motion from commit da617fac.|2.6.6
[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 _0xcf7c=['lodash','../client','Request','CreateVoiceCallReport','calleridnum','getVoiceCallReports','GetVoiceCallReport','startOf','format','YYYY-MM-DD\x20HH:mm:ss','endOf','day','type','disposition','billableseconds','GetVoiceCallReports','moment','util'];(function(_0x31615d,_0x54f1b0){var _0x444451=function(_0x5d2b08){while(--_0x5d2b08){_0x31615d['push'](_0x31615d['shift']());}};_0x444451(++_0x54f1b0);}(_0xcf7c,0x1ae));var _0xccf7=function(_0x57eebd,_0x561057){_0x57eebd=_0x57eebd-0x0;var _0x343a79=_0xcf7c[_0x57eebd];return _0x343a79;};'use strict';var moment=require(_0xccf7('0x0'));var util=require(_0xccf7('0x1'));var _=require(_0xccf7('0x2'));var client=require(_0xccf7('0x3'));exports['create']=function(_0x421145){return client[_0xccf7('0x4')](_0xccf7('0x5'),{'body':_['merge'](_0x421145,{'source':_0x421145[_0xccf7('0x6')],'destinationcontext':_0x421145['context'],'callerid':_0x421145['callerid'],'amaflags':'DOCUMENTATION'}),'log':'CreateVoiceCallReport'});};exports[_0xccf7('0x7')]=function(){return function(){return client[_0xccf7('0x4')](_0xccf7('0x8'),{'options':{'where':{'type':['outbound'],'createdAt':{'$between':[moment()[_0xccf7('0x9')]('day')[_0xccf7('0xa')](_0xccf7('0xb')),moment()[_0xccf7('0xc')](_0xccf7('0xd'))['format'](_0xccf7('0xb'))]}},'attributes':[_0xccf7('0xe'),_0xccf7('0xf'),'duration',_0xccf7('0x10')]},'log':_0xccf7('0x11')});};};