Built motion from commit (unavailable).|2.5.30
[motion2.git] / server / api / intServicenowConfiguration / intServicenowConfiguration.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 _0xb9fc=['message','catch','lodash','util','moment','bluebird','randomstring','../../config/utils','rpc','jayson/promise','request','info','request\x20sent','debug','stringify','error','code','ServicenowConfiguration,\x20%s,\x20%s'];(function(_0x4de1c0,_0x22bb63){var _0x59c5e0=function(_0x79329b){while(--_0x79329b){_0x4de1c0['push'](_0x4de1c0['shift']());}};_0x59c5e0(++_0x22bb63);}(_0xb9fc,0x146));var _0xcb9f=function(_0x299514,_0x528c25){_0x299514=_0x299514-0x0;var _0xa2c28f=_0xb9fc[_0x299514];return _0xa2c28f;};'use strict';var _=require(_0xcb9f('0x0'));var util=require(_0xcb9f('0x1'));var moment=require(_0xcb9f('0x2'));var BPromise=require(_0xcb9f('0x3'));var rs=require(_0xcb9f('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0xcb9f('0x5'));var logger=require('../../config/logger')(_0xcb9f('0x6'));var config=require('../../config/environment');var jayson=require(_0xcb9f('0x7'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x52c6b4,_0x15e0fd,_0x4d6067){return new BPromise(function(_0x1d9b31,_0x1aa374){return client[_0xcb9f('0x8')](_0x52c6b4,_0x4d6067)['then'](function(_0x55d866){logger[_0xcb9f('0x9')]('ServicenowConfiguration,\x20%s,\x20%s',_0x15e0fd,_0xcb9f('0xa'));logger[_0xcb9f('0xb')]('ServicenowConfiguration,\x20%s,\x20%s,\x20%s',_0x15e0fd,_0xcb9f('0xa'),JSON[_0xcb9f('0xc')](_0x55d866));if(_0x55d866[_0xcb9f('0xd')]){if(_0x55d866[_0xcb9f('0xd')][_0xcb9f('0xe')]===0x1f4){logger[_0xcb9f('0xd')](_0xcb9f('0xf'),_0x15e0fd,_0x55d866['error'][_0xcb9f('0x10')]);return _0x1aa374(_0x55d866[_0xcb9f('0xd')]['message']);}logger[_0xcb9f('0xd')](_0xcb9f('0xf'),_0x15e0fd,_0x55d866[_0xcb9f('0xd')][_0xcb9f('0x10')]);return _0x1d9b31(_0x55d866[_0xcb9f('0xd')][_0xcb9f('0x10')]);}else{logger[_0xcb9f('0x9')](_0xcb9f('0xf'),_0x15e0fd,_0xcb9f('0xa'));_0x1d9b31(_0x55d866['result'][_0xcb9f('0x10')]);}})[_0xcb9f('0x11')](function(_0x14c04b){logger[_0xcb9f('0xd')]('ServicenowConfiguration,\x20%s,\x20%s',_0x15e0fd,_0x14c04b);_0x1aa374(_0x14c04b);});});}