Built motion from commit (unavailable).|2.5.15
[motion2.git] / server / api / smsTransferReport / smsTransferReport.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 _0x6304=['util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','request','then','info','SmsTransferReport,\x20%s,\x20%s','request\x20sent','debug','SmsTransferReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','lodash'];(function(_0x339ee6,_0x1a3bc7){var _0x115a9a=function(_0x56d12b){while(--_0x56d12b){_0x339ee6['push'](_0x339ee6['shift']());}};_0x115a9a(++_0x1a3bc7);}(_0x6304,0xf9));var _0x4630=function(_0x51e8a4,_0x245bca){_0x51e8a4=_0x51e8a4-0x0;var _0x254b5d=_0x6304[_0x51e8a4];return _0x254b5d;};'use strict';var _=require(_0x4630('0x0'));var util=require(_0x4630('0x1'));var moment=require(_0x4630('0x2'));var BPromise=require(_0x4630('0x3'));var rs=require(_0x4630('0x4'));var fs=require('fs');var Redis=require(_0x4630('0x5'));var db=require(_0x4630('0x6'))['db'];var utils=require(_0x4630('0x7'));var logger=require(_0x4630('0x8'))('rpc');var config=require(_0x4630('0x9'));var jayson=require(_0x4630('0xa'));var client=jayson[_0x4630('0xb')]['http']({'port':0x232a});function respondWithRpcPromise(_0x34fd46,_0x4c51a7,_0x3c7863){return new BPromise(function(_0x2daff5,_0x546690){return client[_0x4630('0xc')](_0x34fd46,_0x3c7863)[_0x4630('0xd')](function(_0x2d6015){logger[_0x4630('0xe')](_0x4630('0xf'),_0x4c51a7,_0x4630('0x10'));logger[_0x4630('0x11')](_0x4630('0x12'),_0x4c51a7,_0x4630('0x10'),JSON[_0x4630('0x13')](_0x2d6015));if(_0x2d6015[_0x4630('0x14')]){if(_0x2d6015['error'][_0x4630('0x15')]===0x1f4){logger['error'](_0x4630('0xf'),_0x4c51a7,_0x2d6015[_0x4630('0x14')][_0x4630('0x16')]);return _0x546690(_0x2d6015[_0x4630('0x14')][_0x4630('0x16')]);}logger['error'](_0x4630('0xf'),_0x4c51a7,_0x2d6015['error'][_0x4630('0x16')]);return _0x2daff5(_0x2d6015[_0x4630('0x14')][_0x4630('0x16')]);}else{logger[_0x4630('0xe')]('SmsTransferReport,\x20%s,\x20%s',_0x4c51a7,_0x4630('0x10'));_0x2daff5(_0x2d6015[_0x4630('0x17')][_0x4630('0x16')]);}})[_0x4630('0x18')](function(_0x25ed29){logger[_0x4630('0x14')](_0x4630('0xf'),_0x4c51a7,_0x25ed29);_0x546690(_0x25ed29);});});}