Built motion from commit c738b9ac.|2.6.25
[motion2.git] / server / api / whatsappTransferReport / whatsappTransferReport.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 _0x7e8e=['request\x20sent','debug','WhatsappTransferReport,\x20%s,\x20%s,\x20%s','code','error','message','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','http','request','then','info','WhatsappTransferReport,\x20%s,\x20%s'];(function(_0x58ae51,_0x470d39){var _0xfaede0=function(_0x20178d){while(--_0x20178d){_0x58ae51['push'](_0x58ae51['shift']());}};_0xfaede0(++_0x470d39);}(_0x7e8e,0x161));var _0xe7e8=function(_0x31b151,_0x42fc2a){_0x31b151=_0x31b151-0x0;var _0x325470=_0x7e8e[_0x31b151];return _0x325470;};'use strict';var _=require(_0xe7e8('0x0'));var util=require(_0xe7e8('0x1'));var moment=require(_0xe7e8('0x2'));var BPromise=require(_0xe7e8('0x3'));var rs=require(_0xe7e8('0x4'));var fs=require('fs');var Redis=require(_0xe7e8('0x5'));var db=require(_0xe7e8('0x6'))['db'];var utils=require(_0xe7e8('0x7'));var logger=require('../../config/logger')(_0xe7e8('0x8'));var config=require(_0xe7e8('0x9'));var jayson=require('jayson/promise');var client=jayson['client'][_0xe7e8('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x2d19fd,_0x8c54e7,_0x186022){return new BPromise(function(_0x5c3bb5,_0x4cd236){return client[_0xe7e8('0xb')](_0x2d19fd,_0x186022)[_0xe7e8('0xc')](function(_0x1a9d6b){logger[_0xe7e8('0xd')](_0xe7e8('0xe'),_0x8c54e7,_0xe7e8('0xf'));logger[_0xe7e8('0x10')](_0xe7e8('0x11'),_0x8c54e7,_0xe7e8('0xf'),JSON['stringify'](_0x1a9d6b));if(_0x1a9d6b['error']){if(_0x1a9d6b['error'][_0xe7e8('0x12')]===0x1f4){logger[_0xe7e8('0x13')](_0xe7e8('0xe'),_0x8c54e7,_0x1a9d6b[_0xe7e8('0x13')][_0xe7e8('0x14')]);return _0x4cd236(_0x1a9d6b[_0xe7e8('0x13')][_0xe7e8('0x14')]);}logger[_0xe7e8('0x13')]('WhatsappTransferReport,\x20%s,\x20%s',_0x8c54e7,_0x1a9d6b[_0xe7e8('0x13')][_0xe7e8('0x14')]);return _0x5c3bb5(_0x1a9d6b[_0xe7e8('0x13')][_0xe7e8('0x14')]);}else{logger[_0xe7e8('0xd')](_0xe7e8('0xe'),_0x8c54e7,_0xe7e8('0xf'));_0x5c3bb5(_0x1a9d6b[_0xe7e8('0x15')][_0xe7e8('0x14')]);}})[_0xe7e8('0x16')](function(_0x57d9ad){logger[_0xe7e8('0x13')]('WhatsappTransferReport,\x20%s,\x20%s',_0x8c54e7,_0x57d9ad);_0x4cd236(_0x57d9ad);});});}