Built motion from commit (unavailable).|2.5.11
[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 _0x6a12=['then','info','Dynamics365Configuration,\x20%s,\x20%s','request\x20sent','debug','Dynamics365Configuration,\x20%s,\x20%s,\x20%s','stringify','code','error','message','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','http','request'];(function(_0x5a5d57,_0x10e511){var _0x57b549=function(_0x32db19){while(--_0x32db19){_0x5a5d57['push'](_0x5a5d57['shift']());}};_0x57b549(++_0x10e511);}(_0x6a12,0xbb));var _0x26a1=function(_0x24a754,_0x24f5bf){_0x24a754=_0x24a754-0x0;var _0x233dca=_0x6a12[_0x24a754];return _0x233dca;};'use strict';var _=require(_0x26a1('0x0'));var util=require(_0x26a1('0x1'));var moment=require(_0x26a1('0x2'));var BPromise=require(_0x26a1('0x3'));var rs=require(_0x26a1('0x4'));var fs=require('fs');var Redis=require(_0x26a1('0x5'));var db=require(_0x26a1('0x6'))['db'];var utils=require(_0x26a1('0x7'));var logger=require(_0x26a1('0x8'))(_0x26a1('0x9'));var config=require('../../config/environment');var jayson=require(_0x26a1('0xa'));var client=jayson['client'][_0x26a1('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x5bfdd9,_0x4acd5f,_0x10e823){return new BPromise(function(_0x43e917,_0x2b9c2d){return client[_0x26a1('0xc')](_0x5bfdd9,_0x10e823)[_0x26a1('0xd')](function(_0x4df91a){logger[_0x26a1('0xe')](_0x26a1('0xf'),_0x4acd5f,_0x26a1('0x10'));logger[_0x26a1('0x11')](_0x26a1('0x12'),_0x4acd5f,'request\x20sent',JSON[_0x26a1('0x13')](_0x4df91a));if(_0x4df91a['error']){if(_0x4df91a['error'][_0x26a1('0x14')]===0x1f4){logger[_0x26a1('0x15')](_0x26a1('0xf'),_0x4acd5f,_0x4df91a[_0x26a1('0x15')][_0x26a1('0x16')]);return _0x2b9c2d(_0x4df91a[_0x26a1('0x15')][_0x26a1('0x16')]);}logger['error']('Dynamics365Configuration,\x20%s,\x20%s',_0x4acd5f,_0x4df91a[_0x26a1('0x15')][_0x26a1('0x16')]);return _0x43e917(_0x4df91a[_0x26a1('0x15')][_0x26a1('0x16')]);}else{logger['info']('Dynamics365Configuration,\x20%s,\x20%s',_0x4acd5f,'request\x20sent');_0x43e917(_0x4df91a[_0x26a1('0x17')][_0x26a1('0x16')]);}})[_0x26a1('0x18')](function(_0x9bdfe5){logger[_0x26a1('0x15')](_0x26a1('0xf'),_0x4acd5f,_0x9bdfe5);_0x2b9c2d(_0x9bdfe5);});});}