Built motion from commit (unavailable).|2.4.18
[motion2.git] / server / api / intServicenowField / intServicenowField.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 _0xa745=['then','info','debug','ServicenowField,\x20%s,\x20%s,\x20%s','request\x20sent','error','code','ServicenowField,\x20%s,\x20%s','message','result','catch','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request'];(function(_0xda06bb,_0x597838){var _0x15c229=function(_0x585b15){while(--_0x585b15){_0xda06bb['push'](_0xda06bb['shift']());}};_0x15c229(++_0x597838);}(_0xa745,0x6f));var _0x5a74=function(_0x17d455,_0x161e69){_0x17d455=_0x17d455-0x0;var _0x35ebf6=_0xa745[_0x17d455];return _0x35ebf6;};'use strict';var _=require(_0x5a74('0x0'));var util=require('util');var moment=require(_0x5a74('0x1'));var BPromise=require(_0x5a74('0x2'));var rs=require(_0x5a74('0x3'));var fs=require('fs');var Redis=require(_0x5a74('0x4'));var db=require(_0x5a74('0x5'))['db'];var utils=require(_0x5a74('0x6'));var logger=require(_0x5a74('0x7'))(_0x5a74('0x8'));var config=require(_0x5a74('0x9'));var jayson=require(_0x5a74('0xa'));var client=jayson[_0x5a74('0xb')][_0x5a74('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x302b56,_0x2b4a6c,_0x43db28){return new BPromise(function(_0x4934d8,_0x578f69){return client[_0x5a74('0xd')](_0x302b56,_0x43db28)[_0x5a74('0xe')](function(_0x3e57f0){logger[_0x5a74('0xf')]('ServicenowField,\x20%s,\x20%s',_0x2b4a6c,'request\x20sent');logger[_0x5a74('0x10')](_0x5a74('0x11'),_0x2b4a6c,_0x5a74('0x12'),JSON['stringify'](_0x3e57f0));if(_0x3e57f0[_0x5a74('0x13')]){if(_0x3e57f0[_0x5a74('0x13')][_0x5a74('0x14')]===0x1f4){logger[_0x5a74('0x13')](_0x5a74('0x15'),_0x2b4a6c,_0x3e57f0[_0x5a74('0x13')][_0x5a74('0x16')]);return _0x578f69(_0x3e57f0['error'][_0x5a74('0x16')]);}logger['error'](_0x5a74('0x15'),_0x2b4a6c,_0x3e57f0['error']['message']);return _0x4934d8(_0x3e57f0[_0x5a74('0x13')]['message']);}else{logger['info'](_0x5a74('0x15'),_0x2b4a6c,'request\x20sent');_0x4934d8(_0x3e57f0[_0x5a74('0x17')][_0x5a74('0x16')]);}})[_0x5a74('0x18')](function(_0x1b8169){logger[_0x5a74('0x13')]('ServicenowField,\x20%s,\x20%s',_0x2b4a6c,_0x1b8169);_0x578f69(_0x1b8169);});});}