Built motion from commit (unavailable).|2.5.4
[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 _0x63ed=['stringify','error','message','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','request','then','info','ServicenowField,\x20%s,\x20%s','debug','ServicenowField,\x20%s,\x20%s,\x20%s','request\x20sent'];(function(_0x3e5021,_0x540817){var _0x3db478=function(_0x15b94a){while(--_0x15b94a){_0x3e5021['push'](_0x3e5021['shift']());}};_0x3db478(++_0x540817);}(_0x63ed,0xff));var _0xd63e=function(_0x5d2803,_0xf375bd){_0x5d2803=_0x5d2803-0x0;var _0xdcad2c=_0x63ed[_0x5d2803];return _0xdcad2c;};'use strict';var _=require(_0xd63e('0x0'));var util=require(_0xd63e('0x1'));var moment=require(_0xd63e('0x2'));var BPromise=require(_0xd63e('0x3'));var rs=require(_0xd63e('0x4'));var fs=require('fs');var Redis=require(_0xd63e('0x5'));var db=require(_0xd63e('0x6'))['db'];var utils=require(_0xd63e('0x7'));var logger=require(_0xd63e('0x8'))(_0xd63e('0x9'));var config=require('../../config/environment');var jayson=require(_0xd63e('0xa'));var client=jayson[_0xd63e('0xb')][_0xd63e('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x54330c,_0x31cf56,_0x198322){return new BPromise(function(_0x24c099,_0x44e8b0){return client[_0xd63e('0xd')](_0x54330c,_0x198322)[_0xd63e('0xe')](function(_0x18da68){logger[_0xd63e('0xf')](_0xd63e('0x10'),_0x31cf56,'request\x20sent');logger[_0xd63e('0x11')](_0xd63e('0x12'),_0x31cf56,_0xd63e('0x13'),JSON[_0xd63e('0x14')](_0x18da68));if(_0x18da68[_0xd63e('0x15')]){if(_0x18da68[_0xd63e('0x15')]['code']===0x1f4){logger[_0xd63e('0x15')]('ServicenowField,\x20%s,\x20%s',_0x31cf56,_0x18da68[_0xd63e('0x15')][_0xd63e('0x16')]);return _0x44e8b0(_0x18da68[_0xd63e('0x15')]['message']);}logger[_0xd63e('0x15')](_0xd63e('0x10'),_0x31cf56,_0x18da68['error'][_0xd63e('0x16')]);return _0x24c099(_0x18da68[_0xd63e('0x15')]['message']);}else{logger[_0xd63e('0xf')](_0xd63e('0x10'),_0x31cf56,_0xd63e('0x13'));_0x24c099(_0x18da68[_0xd63e('0x17')][_0xd63e('0x16')]);}})[_0xd63e('0x18')](function(_0x4e31ae){logger[_0xd63e('0x15')](_0xd63e('0x10'),_0x31cf56,_0x4e31ae);_0x44e8b0(_0x4e31ae);});});}