Built motion from commit (unavailable).|2.5.31
[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 _0xfab7=['jayson/promise','http','request','info','ServicenowConfiguration,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','catch','lodash','util','moment','bluebird','randomstring','../../config/utils','../../config/logger','rpc','../../config/environment'];(function(_0x30ebcc,_0x307cf4){var _0x19b3d8=function(_0x315965){while(--_0x315965){_0x30ebcc['push'](_0x30ebcc['shift']());}};_0x19b3d8(++_0x307cf4);}(_0xfab7,0x115));var _0x7fab=function(_0x52c60f,_0x22a85d){_0x52c60f=_0x52c60f-0x0;var _0x2f6191=_0xfab7[_0x52c60f];return _0x2f6191;};'use strict';var _=require(_0x7fab('0x0'));var util=require(_0x7fab('0x1'));var moment=require(_0x7fab('0x2'));var BPromise=require(_0x7fab('0x3'));var rs=require(_0x7fab('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0x7fab('0x5'));var logger=require(_0x7fab('0x6'))(_0x7fab('0x7'));var config=require(_0x7fab('0x8'));var jayson=require(_0x7fab('0x9'));var client=jayson['client'][_0x7fab('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x46e8d0,_0x252fd3,_0x426409){return new BPromise(function(_0x536a13,_0x478356){return client[_0x7fab('0xb')](_0x46e8d0,_0x426409)['then'](function(_0x4b6f90){logger[_0x7fab('0xc')](_0x7fab('0xd'),_0x252fd3,_0x7fab('0xe'));logger[_0x7fab('0xf')]('ServicenowConfiguration,\x20%s,\x20%s,\x20%s',_0x252fd3,_0x7fab('0xe'),JSON[_0x7fab('0x10')](_0x4b6f90));if(_0x4b6f90[_0x7fab('0x11')]){if(_0x4b6f90['error'][_0x7fab('0x12')]===0x1f4){logger['error'](_0x7fab('0xd'),_0x252fd3,_0x4b6f90['error'][_0x7fab('0x13')]);return _0x478356(_0x4b6f90[_0x7fab('0x11')][_0x7fab('0x13')]);}logger[_0x7fab('0x11')](_0x7fab('0xd'),_0x252fd3,_0x4b6f90['error'][_0x7fab('0x13')]);return _0x536a13(_0x4b6f90['error'][_0x7fab('0x13')]);}else{logger['info']('ServicenowConfiguration,\x20%s,\x20%s',_0x252fd3,'request\x20sent');_0x536a13(_0x4b6f90[_0x7fab('0x14')][_0x7fab('0x13')]);}})[_0x7fab('0x15')](function(_0x2f3a41){logger[_0x7fab('0x11')](_0x7fab('0xd'),_0x252fd3,_0x2f3a41);_0x478356(_0x2f3a41);});});}