Built motion from commit (unavailable).|2.5.30
[motion2.git] / server / api / intSalesforceConfiguration / intSalesforceConfiguration.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 _0xf0c1=['error','code','message','catch','lodash','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','info','SalesforceConfiguration,\x20%s,\x20%s','SalesforceConfiguration,\x20%s,\x20%s,\x20%s','request\x20sent','stringify'];(function(_0x55eeba,_0x51de5e){var _0x449c9e=function(_0x1dfe95){while(--_0x1dfe95){_0x55eeba['push'](_0x55eeba['shift']());}};_0x449c9e(++_0x51de5e);}(_0xf0c1,0x138));var _0x1f0c=function(_0x2118ad,_0xe8e3fd){_0x2118ad=_0x2118ad-0x0;var _0x4b5715=_0xf0c1[_0x2118ad];return _0x4b5715;};'use strict';var _=require(_0x1f0c('0x0'));var util=require('util');var moment=require(_0x1f0c('0x1'));var BPromise=require(_0x1f0c('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x1f0c('0x3'));var db=require(_0x1f0c('0x4'))['db'];var utils=require(_0x1f0c('0x5'));var logger=require(_0x1f0c('0x6'))(_0x1f0c('0x7'));var config=require(_0x1f0c('0x8'));var jayson=require(_0x1f0c('0x9'));var client=jayson[_0x1f0c('0xa')][_0x1f0c('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x11bdb1,_0x308232,_0xf05bcc){return new BPromise(function(_0x35c5d0,_0x4a01c2){return client[_0x1f0c('0xc')](_0x11bdb1,_0xf05bcc)['then'](function(_0x19cfb6){logger[_0x1f0c('0xd')](_0x1f0c('0xe'),_0x308232,'request\x20sent');logger['debug'](_0x1f0c('0xf'),_0x308232,_0x1f0c('0x10'),JSON[_0x1f0c('0x11')](_0x19cfb6));if(_0x19cfb6['error']){if(_0x19cfb6[_0x1f0c('0x12')][_0x1f0c('0x13')]===0x1f4){logger[_0x1f0c('0x12')](_0x1f0c('0xe'),_0x308232,_0x19cfb6['error'][_0x1f0c('0x14')]);return _0x4a01c2(_0x19cfb6['error']['message']);}logger[_0x1f0c('0x12')](_0x1f0c('0xe'),_0x308232,_0x19cfb6['error']['message']);return _0x35c5d0(_0x19cfb6[_0x1f0c('0x12')]['message']);}else{logger[_0x1f0c('0xd')]('SalesforceConfiguration,\x20%s,\x20%s',_0x308232,'request\x20sent');_0x35c5d0(_0x19cfb6['result']['message']);}})[_0x1f0c('0x15')](function(_0x5e1f9c){logger[_0x1f0c('0x12')](_0x1f0c('0xe'),_0x308232,_0x5e1f9c);_0x4a01c2(_0x5e1f9c);});});}