Built motion from commit e1760111.|2.6.18
[motion2.git] / server / api / intDynamics365Configuration / intDynamics365Configuration.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 _0x2111=['bluebird','randomstring','ioredis','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','debug','Dynamics365Configuration,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','Dynamics365Configuration,\x20%s,\x20%s','message','result','catch','lodash','util','moment'];(function(_0x4384fb,_0x131d4f){var _0x31d0a6=function(_0xf09f61){while(--_0xf09f61){_0x4384fb['push'](_0x4384fb['shift']());}};_0x31d0a6(++_0x131d4f);}(_0x2111,0x7a));var _0x1211=function(_0x3c4e4c,_0x36ff70){_0x3c4e4c=_0x3c4e4c-0x0;var _0x144a87=_0x2111[_0x3c4e4c];return _0x144a87;};'use strict';var _=require(_0x1211('0x0'));var util=require(_0x1211('0x1'));var moment=require(_0x1211('0x2'));var BPromise=require(_0x1211('0x3'));var rs=require(_0x1211('0x4'));var fs=require('fs');var Redis=require(_0x1211('0x5'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0x1211('0x6'))(_0x1211('0x7'));var config=require(_0x1211('0x8'));var jayson=require(_0x1211('0x9'));var client=jayson[_0x1211('0xa')][_0x1211('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x5cf523,_0xe81396,_0x113d64){return new BPromise(function(_0x412abe,_0x1072e8){return client[_0x1211('0xc')](_0x5cf523,_0x113d64)[_0x1211('0xd')](function(_0x4758f3){logger[_0x1211('0xe')]('Dynamics365Configuration,\x20%s,\x20%s',_0xe81396,'request\x20sent');logger[_0x1211('0xf')](_0x1211('0x10'),_0xe81396,_0x1211('0x11'),JSON[_0x1211('0x12')](_0x4758f3));if(_0x4758f3[_0x1211('0x13')]){if(_0x4758f3[_0x1211('0x13')][_0x1211('0x14')]===0x1f4){logger[_0x1211('0x13')](_0x1211('0x15'),_0xe81396,_0x4758f3[_0x1211('0x13')][_0x1211('0x16')]);return _0x1072e8(_0x4758f3[_0x1211('0x13')][_0x1211('0x16')]);}logger[_0x1211('0x13')](_0x1211('0x15'),_0xe81396,_0x4758f3[_0x1211('0x13')][_0x1211('0x16')]);return _0x412abe(_0x4758f3[_0x1211('0x13')][_0x1211('0x16')]);}else{logger[_0x1211('0xe')](_0x1211('0x15'),_0xe81396,'request\x20sent');_0x412abe(_0x4758f3[_0x1211('0x17')][_0x1211('0x16')]);}})[_0x1211('0x18')](function(_0x241bde){logger[_0x1211('0x13')](_0x1211('0x15'),_0xe81396,_0x241bde);_0x1072e8(_0x241bde);});});}