Built motion from commit 092f8824.|2.5.49
[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 _0xf937=['result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','request','then','info','request\x20sent','debug','VtigerConfiguration,\x20%s,\x20%s,\x20%s','error','code','VtigerConfiguration,\x20%s,\x20%s','message'];(function(_0x167cc1,_0x56ef5a){var _0x10bc4b=function(_0xd6a255){while(--_0xd6a255){_0x167cc1['push'](_0x167cc1['shift']());}};_0x10bc4b(++_0x56ef5a);}(_0xf937,0x66));var _0x7f93=function(_0x26a906,_0x3d135c){_0x26a906=_0x26a906-0x0;var _0x495575=_0xf937[_0x26a906];return _0x495575;};'use strict';var _=require(_0x7f93('0x0'));var util=require(_0x7f93('0x1'));var moment=require(_0x7f93('0x2'));var BPromise=require(_0x7f93('0x3'));var rs=require(_0x7f93('0x4'));var fs=require('fs');var Redis=require(_0x7f93('0x5'));var db=require(_0x7f93('0x6'))['db'];var utils=require(_0x7f93('0x7'));var logger=require(_0x7f93('0x8'))(_0x7f93('0x9'));var config=require('../../config/environment');var jayson=require(_0x7f93('0xa'));var client=jayson[_0x7f93('0xb')][_0x7f93('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x584b60,_0x39846d,_0x5aaaa1){return new BPromise(function(_0x41747e,_0xd91822){return client[_0x7f93('0xd')](_0x584b60,_0x5aaaa1)[_0x7f93('0xe')](function(_0x35497f){logger[_0x7f93('0xf')]('VtigerConfiguration,\x20%s,\x20%s',_0x39846d,_0x7f93('0x10'));logger[_0x7f93('0x11')](_0x7f93('0x12'),_0x39846d,'request\x20sent',JSON['stringify'](_0x35497f));if(_0x35497f[_0x7f93('0x13')]){if(_0x35497f[_0x7f93('0x13')][_0x7f93('0x14')]===0x1f4){logger[_0x7f93('0x13')](_0x7f93('0x15'),_0x39846d,_0x35497f['error'][_0x7f93('0x16')]);return _0xd91822(_0x35497f[_0x7f93('0x13')][_0x7f93('0x16')]);}logger[_0x7f93('0x13')](_0x7f93('0x15'),_0x39846d,_0x35497f[_0x7f93('0x13')][_0x7f93('0x16')]);return _0x41747e(_0x35497f[_0x7f93('0x13')][_0x7f93('0x16')]);}else{logger[_0x7f93('0xf')](_0x7f93('0x15'),_0x39846d,_0x7f93('0x10'));_0x41747e(_0x35497f[_0x7f93('0x17')]['message']);}})[_0x7f93('0x18')](function(_0x42543a){logger[_0x7f93('0x13')](_0x7f93('0x15'),_0x39846d,_0x42543a);_0xd91822(_0x42543a);});});}