Built motion from commit (unavailable).|2.4.20
[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 _0x974e=['../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','info','VtigerConfiguration,\x20%s,\x20%s','debug','VtigerConfiguration,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','message','result','util','bluebird','randomstring','ioredis','../../mysqldb'];(function(_0x2e4e19,_0x493b50){var _0x9ba20b=function(_0x2f6456){while(--_0x2f6456){_0x2e4e19['push'](_0x2e4e19['shift']());}};_0x9ba20b(++_0x493b50);}(_0x974e,0x19d));var _0xe974=function(_0x17d9e3,_0x1f969c){_0x17d9e3=_0x17d9e3-0x0;var _0x14192d=_0x974e[_0x17d9e3];return _0x14192d;};'use strict';var _=require('lodash');var util=require(_0xe974('0x0'));var moment=require('moment');var BPromise=require(_0xe974('0x1'));var rs=require(_0xe974('0x2'));var fs=require('fs');var Redis=require(_0xe974('0x3'));var db=require(_0xe974('0x4'))['db'];var utils=require(_0xe974('0x5'));var logger=require(_0xe974('0x6'))(_0xe974('0x7'));var config=require(_0xe974('0x8'));var jayson=require(_0xe974('0x9'));var client=jayson[_0xe974('0xa')][_0xe974('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x230d25,_0x4fcd9a,_0x18b318){return new BPromise(function(_0x1db4a7,_0x178504){return client[_0xe974('0xc')](_0x230d25,_0x18b318)['then'](function(_0x561bf2){logger[_0xe974('0xd')](_0xe974('0xe'),_0x4fcd9a,'request\x20sent');logger[_0xe974('0xf')](_0xe974('0x10'),_0x4fcd9a,_0xe974('0x11'),JSON[_0xe974('0x12')](_0x561bf2));if(_0x561bf2['error']){if(_0x561bf2['error']['code']===0x1f4){logger[_0xe974('0x13')](_0xe974('0xe'),_0x4fcd9a,_0x561bf2[_0xe974('0x13')][_0xe974('0x14')]);return _0x178504(_0x561bf2[_0xe974('0x13')][_0xe974('0x14')]);}logger[_0xe974('0x13')](_0xe974('0xe'),_0x4fcd9a,_0x561bf2['error'][_0xe974('0x14')]);return _0x1db4a7(_0x561bf2[_0xe974('0x13')][_0xe974('0x14')]);}else{logger[_0xe974('0xd')](_0xe974('0xe'),_0x4fcd9a,'request\x20sent');_0x1db4a7(_0x561bf2[_0xe974('0x15')][_0xe974('0x14')]);}})['catch'](function(_0x5d8226){logger[_0xe974('0x13')](_0xe974('0xe'),_0x4fcd9a,_0x5d8226);_0x178504(_0x5d8226);});});}