aca27a92638d40ce5f0bc26c6cfc30a97060027c
[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 _0x5def=['calleridnum','getVoiceCallReports','GetVoiceCallReport','outbound','startOf','format','YYYY-MM-DD\x20HH:mm:ss','day','duration','billableseconds','GetVoiceCallReports','moment','lodash','../client','create','Request','CreateVoiceCallReport','merge'];(function(_0x5d6456,_0x58ecc7){var _0x4d66c1=function(_0x4335e3){while(--_0x4335e3){_0x5d6456['push'](_0x5d6456['shift']());}};_0x4d66c1(++_0x58ecc7);}(_0x5def,0x77));var _0xf5de=function(_0x337800,_0x1e986e){_0x337800=_0x337800-0x0;var _0x2caa1d=_0x5def[_0x337800];return _0x2caa1d;};'use strict';var moment=require(_0xf5de('0x0'));var util=require('util');var _=require(_0xf5de('0x1'));var client=require(_0xf5de('0x2'));exports[_0xf5de('0x3')]=function(_0x26ee7f){return client[_0xf5de('0x4')](_0xf5de('0x5'),{'body':_[_0xf5de('0x6')](_0x26ee7f,{'source':_0x26ee7f[_0xf5de('0x7')],'destinationcontext':_0x26ee7f['context'],'callerid':_0x26ee7f['callerid'],'amaflags':'DOCUMENTATION'}),'log':'CreateVoiceCallReport'});};exports[_0xf5de('0x8')]=function(){return function(){return client['Request'](_0xf5de('0x9'),{'options':{'where':{'type':[_0xf5de('0xa')],'createdAt':{'$between':[moment()[_0xf5de('0xb')]('day')[_0xf5de('0xc')](_0xf5de('0xd')),moment()['endOf'](_0xf5de('0xe'))[_0xf5de('0xc')](_0xf5de('0xd'))]}},'attributes':['type','disposition',_0xf5de('0xf'),_0xf5de('0x10')]},'log':_0xf5de('0x11')});};};