Built motion from commit (unavailable).|2.4.4
[motion2.git] / server / api / mailTransferReport / mailTransferReport.rpc.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 _0x331b=['../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','info','MailTransferReport,\x20%s,\x20%s','request\x20sent','debug','MailTransferReport,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','lodash','util','bluebird','../../mysqldb'];(function(_0x45afd6,_0x297b03){var _0x2618bc=function(_0x2bf56c){while(--_0x2bf56c){_0x45afd6['push'](_0x45afd6['shift']());}};_0x2618bc(++_0x297b03);}(_0x331b,0x1ca));var _0xb331=function(_0x248e04,_0xb40f87){_0x248e04=_0x248e04-0x0;var _0x186c85=_0x331b[_0x248e04];return _0x186c85;};'use strict';var _=require(_0xb331('0x0'));var util=require(_0xb331('0x1'));var moment=require('moment');var BPromise=require(_0xb331('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0xb331('0x3'))['db'];var utils=require(_0xb331('0x4'));var logger=require(_0xb331('0x5'))(_0xb331('0x6'));var config=require(_0xb331('0x7'));var jayson=require(_0xb331('0x8'));var client=jayson[_0xb331('0x9')][_0xb331('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x146010,_0x1a35cc,_0x4a1e1f){return new BPromise(function(_0x590314,_0x213f9e){return client[_0xb331('0xb')](_0x146010,_0x4a1e1f)['then'](function(_0x22b264){logger[_0xb331('0xc')](_0xb331('0xd'),_0x1a35cc,_0xb331('0xe'));logger[_0xb331('0xf')](_0xb331('0x10'),_0x1a35cc,_0xb331('0xe'),JSON[_0xb331('0x11')](_0x22b264));if(_0x22b264['error']){if(_0x22b264[_0xb331('0x12')]['code']===0x1f4){logger[_0xb331('0x12')](_0xb331('0xd'),_0x1a35cc,_0x22b264['error'][_0xb331('0x13')]);return _0x213f9e(_0x22b264[_0xb331('0x12')]['message']);}logger[_0xb331('0x12')](_0xb331('0xd'),_0x1a35cc,_0x22b264[_0xb331('0x12')]['message']);return _0x590314(_0x22b264[_0xb331('0x12')][_0xb331('0x13')]);}else{logger[_0xb331('0xc')](_0xb331('0xd'),_0x1a35cc,_0xb331('0xe'));_0x590314(_0x22b264[_0xb331('0x14')]['message']);}})[_0xb331('0x15')](function(_0x5d3eb5){logger[_0xb331('0x12')](_0xb331('0xd'),_0x1a35cc,_0x5d3eb5);_0x213f9e(_0x5d3eb5);});});}