Built motion from commit 9d0783e6.|2.6.13
[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 _0x23be=['Dynamics365Configuration,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','lodash','util','randomstring','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','request','then','info','Dynamics365Configuration,\x20%s,\x20%s','request\x20sent','debug'];(function(_0x1c8c28,_0x3ee093){var _0x1f59b4=function(_0x29bcc0){while(--_0x29bcc0){_0x1c8c28['push'](_0x1c8c28['shift']());}};_0x1f59b4(++_0x3ee093);}(_0x23be,0xd6));var _0xe23b=function(_0x1f8e0c,_0x4579b8){_0x1f8e0c=_0x1f8e0c-0x0;var _0x5e3d67=_0x23be[_0x1f8e0c];return _0x5e3d67;};'use strict';var _=require(_0xe23b('0x0'));var util=require(_0xe23b('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0xe23b('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xe23b('0x3'))['db'];var utils=require(_0xe23b('0x4'));var logger=require('../../config/logger')(_0xe23b('0x5'));var config=require(_0xe23b('0x6'));var jayson=require(_0xe23b('0x7'));var client=jayson[_0xe23b('0x8')][_0xe23b('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x509ec2,_0x2dbb8a,_0x5d1f63){return new BPromise(function(_0xa72556,_0x32dc0e){return client[_0xe23b('0xa')](_0x509ec2,_0x5d1f63)[_0xe23b('0xb')](function(_0x2a9fde){logger[_0xe23b('0xc')](_0xe23b('0xd'),_0x2dbb8a,_0xe23b('0xe'));logger[_0xe23b('0xf')](_0xe23b('0x10'),_0x2dbb8a,_0xe23b('0xe'),JSON[_0xe23b('0x11')](_0x2a9fde));if(_0x2a9fde[_0xe23b('0x12')]){if(_0x2a9fde[_0xe23b('0x12')][_0xe23b('0x13')]===0x1f4){logger[_0xe23b('0x12')]('Dynamics365Configuration,\x20%s,\x20%s',_0x2dbb8a,_0x2a9fde[_0xe23b('0x12')][_0xe23b('0x14')]);return _0x32dc0e(_0x2a9fde[_0xe23b('0x12')][_0xe23b('0x14')]);}logger[_0xe23b('0x12')]('Dynamics365Configuration,\x20%s,\x20%s',_0x2dbb8a,_0x2a9fde[_0xe23b('0x12')][_0xe23b('0x14')]);return _0xa72556(_0x2a9fde[_0xe23b('0x12')][_0xe23b('0x14')]);}else{logger[_0xe23b('0xc')](_0xe23b('0xd'),_0x2dbb8a,_0xe23b('0xe'));_0xa72556(_0x2a9fde[_0xe23b('0x15')][_0xe23b('0x14')]);}})[_0xe23b('0x16')](function(_0x40ec5c){logger['error'](_0xe23b('0xd'),_0x2dbb8a,_0x40ec5c);_0x32dc0e(_0x40ec5c);});});}