Built motion from commit bbec7235.|2.6.20
[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 _0x3efe=['lodash','../client','Request','merge','calleridnum','context','DOCUMENTATION','CreateVoiceCallReport','outbound','startOf','day','format','YYYY-MM-DD\x20HH:mm:ss','endOf','type','disposition','duration','billableseconds','GetVoiceCallReports','moment','util'];(function(_0x17b6e3,_0x4522ed){var _0x3906f3=function(_0x430f87){while(--_0x430f87){_0x17b6e3['push'](_0x17b6e3['shift']());}};_0x3906f3(++_0x4522ed);}(_0x3efe,0x18d));var _0xe3ef=function(_0x4b369d,_0x265eb8){_0x4b369d=_0x4b369d-0x0;var _0x571a98=_0x3efe[_0x4b369d];return _0x571a98;};'use strict';var moment=require(_0xe3ef('0x0'));var util=require(_0xe3ef('0x1'));var _=require(_0xe3ef('0x2'));var client=require(_0xe3ef('0x3'));exports['create']=function(_0x269c6f){return client[_0xe3ef('0x4')]('CreateVoiceCallReport',{'body':_[_0xe3ef('0x5')](_0x269c6f,{'source':_0x269c6f[_0xe3ef('0x6')],'destinationcontext':_0x269c6f[_0xe3ef('0x7')],'callerid':_0x269c6f['callerid'],'amaflags':_0xe3ef('0x8')}),'log':_0xe3ef('0x9')});};exports['getVoiceCallReports']=function(){return function(){return client['Request']('GetVoiceCallReport',{'options':{'where':{'type':[_0xe3ef('0xa')],'createdAt':{'$between':[moment()[_0xe3ef('0xb')](_0xe3ef('0xc'))[_0xe3ef('0xd')](_0xe3ef('0xe')),moment()[_0xe3ef('0xf')](_0xe3ef('0xc'))['format'](_0xe3ef('0xe'))]}},'attributes':[_0xe3ef('0x10'),_0xe3ef('0x11'),_0xe3ef('0x12'),_0xe3ef('0x13')]},'log':_0xe3ef('0x14')});};};