Built motion from commit 3c2ce842.|2.6.31
[motion2.git] / server / api / intDynamics365Field / intDynamics365Field.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 _0x1bca=['code','message','catch','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','then','info','Dynamics365Field,\x20%s,\x20%s','request\x20sent','debug','Dynamics365Field,\x20%s,\x20%s,\x20%s','error'];(function(_0x187bc4,_0x40cee0){var _0x3a8944=function(_0x32e018){while(--_0x32e018){_0x187bc4['push'](_0x187bc4['shift']());}};_0x3a8944(++_0x40cee0);}(_0x1bca,0x1e6));var _0xa1bc=function(_0x19f716,_0x498681){_0x19f716=_0x19f716-0x0;var _0xfaa946=_0x1bca[_0x19f716];return _0xfaa946;};'use strict';var _=require(_0xa1bc('0x0'));var util=require(_0xa1bc('0x1'));var moment=require('moment');var BPromise=require(_0xa1bc('0x2'));var rs=require(_0xa1bc('0x3'));var fs=require('fs');var Redis=require(_0xa1bc('0x4'));var db=require(_0xa1bc('0x5'))['db'];var utils=require(_0xa1bc('0x6'));var logger=require(_0xa1bc('0x7'))(_0xa1bc('0x8'));var config=require(_0xa1bc('0x9'));var jayson=require(_0xa1bc('0xa'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x10c051,_0x315873,_0x3fc756){return new BPromise(function(_0x9b83e6,_0x2e9fa6){return client['request'](_0x10c051,_0x3fc756)[_0xa1bc('0xb')](function(_0x2381db){logger[_0xa1bc('0xc')](_0xa1bc('0xd'),_0x315873,_0xa1bc('0xe'));logger[_0xa1bc('0xf')](_0xa1bc('0x10'),_0x315873,_0xa1bc('0xe'),JSON['stringify'](_0x2381db));if(_0x2381db[_0xa1bc('0x11')]){if(_0x2381db['error'][_0xa1bc('0x12')]===0x1f4){logger[_0xa1bc('0x11')]('Dynamics365Field,\x20%s,\x20%s',_0x315873,_0x2381db['error'][_0xa1bc('0x13')]);return _0x2e9fa6(_0x2381db[_0xa1bc('0x11')][_0xa1bc('0x13')]);}logger[_0xa1bc('0x11')](_0xa1bc('0xd'),_0x315873,_0x2381db[_0xa1bc('0x11')]['message']);return _0x9b83e6(_0x2381db[_0xa1bc('0x11')][_0xa1bc('0x13')]);}else{logger[_0xa1bc('0xc')]('Dynamics365Field,\x20%s,\x20%s',_0x315873,_0xa1bc('0xe'));_0x9b83e6(_0x2381db['result'][_0xa1bc('0x13')]);}})[_0xa1bc('0x14')](function(_0x545553){logger[_0xa1bc('0x11')](_0xa1bc('0xd'),_0x315873,_0x545553);_0x2e9fa6(_0x545553);});});}