Built motion from commit (unavailable).|2.5.22
[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 _0x2e30=['ServicenowConfiguration,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','lodash','util','bluebird','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','request','then','info','ServicenowConfiguration,\x20%s,\x20%s','request\x20sent','debug'];(function(_0x1b0057,_0x3a98d6){var _0x31a70e=function(_0x1330d8){while(--_0x1330d8){_0x1b0057['push'](_0x1b0057['shift']());}};_0x31a70e(++_0x3a98d6);}(_0x2e30,0x1bc));var _0x02e3=function(_0x7887c3,_0x30c060){_0x7887c3=_0x7887c3-0x0;var _0xc7f10d=_0x2e30[_0x7887c3];return _0xc7f10d;};'use strict';var _=require(_0x02e3('0x0'));var util=require(_0x02e3('0x1'));var moment=require('moment');var BPromise=require(_0x02e3('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x02e3('0x3'))['db'];var utils=require(_0x02e3('0x4'));var logger=require(_0x02e3('0x5'))(_0x02e3('0x6'));var config=require(_0x02e3('0x7'));var jayson=require(_0x02e3('0x8'));var client=jayson[_0x02e3('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x1d95ac,_0x5792ff,_0xe1f5f2){return new BPromise(function(_0x38d695,_0x387826){return client[_0x02e3('0xa')](_0x1d95ac,_0xe1f5f2)[_0x02e3('0xb')](function(_0x3fec70){logger[_0x02e3('0xc')](_0x02e3('0xd'),_0x5792ff,_0x02e3('0xe'));logger[_0x02e3('0xf')](_0x02e3('0x10'),_0x5792ff,_0x02e3('0xe'),JSON[_0x02e3('0x11')](_0x3fec70));if(_0x3fec70['error']){if(_0x3fec70[_0x02e3('0x12')][_0x02e3('0x13')]===0x1f4){logger[_0x02e3('0x12')]('ServicenowConfiguration,\x20%s,\x20%s',_0x5792ff,_0x3fec70[_0x02e3('0x12')][_0x02e3('0x14')]);return _0x387826(_0x3fec70[_0x02e3('0x12')][_0x02e3('0x14')]);}logger[_0x02e3('0x12')](_0x02e3('0xd'),_0x5792ff,_0x3fec70[_0x02e3('0x12')][_0x02e3('0x14')]);return _0x38d695(_0x3fec70[_0x02e3('0x12')]['message']);}else{logger[_0x02e3('0xc')]('ServicenowConfiguration,\x20%s,\x20%s',_0x5792ff,_0x02e3('0xe'));_0x38d695(_0x3fec70[_0x02e3('0x15')][_0x02e3('0x14')]);}})[_0x02e3('0x16')](function(_0x3bb541){logger['error'](_0x02e3('0xd'),_0x5792ff,_0x3bb541);_0x387826(_0x3bb541);});});}