Built motion from commit (unavailable).|2.5.14
[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 _0x1b7a=['merge','context','DOCUMENTATION','getVoiceCallReports','GetVoiceCallReport','startOf','day','format','YYYY-MM-DD\x20HH:mm:ss','endOf','type','disposition','duration','billableseconds','GetVoiceCallReports','moment','util','lodash','../client','Request','CreateVoiceCallReport'];(function(_0x350182,_0x2a9feb){var _0x4a0892=function(_0x2c994d){while(--_0x2c994d){_0x350182['push'](_0x350182['shift']());}};_0x4a0892(++_0x2a9feb);}(_0x1b7a,0x174));var _0xa1b7=function(_0x2fa31f,_0x8f8749){_0x2fa31f=_0x2fa31f-0x0;var _0x9a0504=_0x1b7a[_0x2fa31f];return _0x9a0504;};'use strict';var moment=require(_0xa1b7('0x0'));var util=require(_0xa1b7('0x1'));var _=require(_0xa1b7('0x2'));var client=require(_0xa1b7('0x3'));exports['create']=function(_0x26276d){return client[_0xa1b7('0x4')](_0xa1b7('0x5'),{'body':_[_0xa1b7('0x6')](_0x26276d,{'source':_0x26276d['calleridnum'],'destinationcontext':_0x26276d[_0xa1b7('0x7')],'callerid':_0x26276d['callerid'],'amaflags':_0xa1b7('0x8')}),'log':'CreateVoiceCallReport'});};exports[_0xa1b7('0x9')]=function(){return function(){return client[_0xa1b7('0x4')](_0xa1b7('0xa'),{'options':{'where':{'type':['outbound'],'createdAt':{'$between':[moment()[_0xa1b7('0xb')](_0xa1b7('0xc'))[_0xa1b7('0xd')](_0xa1b7('0xe')),moment()[_0xa1b7('0xf')]('day')[_0xa1b7('0xd')](_0xa1b7('0xe'))]}},'attributes':[_0xa1b7('0x10'),_0xa1b7('0x11'),_0xa1b7('0x12'),_0xa1b7('0x13')]},'log':_0xa1b7('0x14')});};};