Built motion from commit a679711e.|2.6.15
[motion2.git] / server / api / intVtigerConfiguration / intVtigerConfiguration.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 _0xbd83=['../../config/utils','rpc','jayson/promise','http','request','then','info','VtigerConfiguration,\x20%s,\x20%s','request\x20sent','debug','VtigerConfiguration,\x20%s,\x20%s,\x20%s','error','code','message','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb'];(function(_0x2d8efc,_0x58e635){var _0x4a7f2d=function(_0x5404e7){while(--_0x5404e7){_0x2d8efc['push'](_0x2d8efc['shift']());}};_0x4a7f2d(++_0x58e635);}(_0xbd83,0x180));var _0x3bd8=function(_0x38aeea,_0x57522a){_0x38aeea=_0x38aeea-0x0;var _0x5e8d2c=_0xbd83[_0x38aeea];return _0x5e8d2c;};'use strict';var _=require(_0x3bd8('0x0'));var util=require(_0x3bd8('0x1'));var moment=require(_0x3bd8('0x2'));var BPromise=require(_0x3bd8('0x3'));var rs=require(_0x3bd8('0x4'));var fs=require('fs');var Redis=require(_0x3bd8('0x5'));var db=require(_0x3bd8('0x6'))['db'];var utils=require(_0x3bd8('0x7'));var logger=require('../../config/logger')(_0x3bd8('0x8'));var config=require('../../config/environment');var jayson=require(_0x3bd8('0x9'));var client=jayson['client'][_0x3bd8('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x355d45,_0x16431c,_0x51ea32){return new BPromise(function(_0xd5becd,_0x495348){return client[_0x3bd8('0xb')](_0x355d45,_0x51ea32)[_0x3bd8('0xc')](function(_0x44b60b){logger[_0x3bd8('0xd')](_0x3bd8('0xe'),_0x16431c,_0x3bd8('0xf'));logger[_0x3bd8('0x10')](_0x3bd8('0x11'),_0x16431c,_0x3bd8('0xf'),JSON['stringify'](_0x44b60b));if(_0x44b60b[_0x3bd8('0x12')]){if(_0x44b60b[_0x3bd8('0x12')][_0x3bd8('0x13')]===0x1f4){logger[_0x3bd8('0x12')](_0x3bd8('0xe'),_0x16431c,_0x44b60b['error'][_0x3bd8('0x14')]);return _0x495348(_0x44b60b['error'][_0x3bd8('0x14')]);}logger[_0x3bd8('0x12')](_0x3bd8('0xe'),_0x16431c,_0x44b60b[_0x3bd8('0x12')][_0x3bd8('0x14')]);return _0xd5becd(_0x44b60b[_0x3bd8('0x12')]['message']);}else{logger[_0x3bd8('0xd')](_0x3bd8('0xe'),_0x16431c,_0x3bd8('0xf'));_0xd5becd(_0x44b60b[_0x3bd8('0x15')][_0x3bd8('0x14')]);}})[_0x3bd8('0x16')](function(_0x1e30cb){logger[_0x3bd8('0x12')](_0x3bd8('0xe'),_0x16431c,_0x1e30cb);_0x495348(_0x1e30cb);});});}