Built motion from commit (unavailable).|2.5.11
[motion2.git] / server / api / intFreshdeskConfiguration / intFreshdeskConfiguration.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 _0x7a67=['client','http','request','then','info','FreshdeskConfiguration,\x20%s,\x20%s','request\x20sent','debug','FreshdeskConfiguration,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise'];(function(_0x196aed,_0x13a06a){var _0x433140=function(_0x4a8c8d){while(--_0x4a8c8d){_0x196aed['push'](_0x196aed['shift']());}};_0x433140(++_0x13a06a);}(_0x7a67,0xde));var _0x77a6=function(_0x4e8b9c,_0x4b1f43){_0x4e8b9c=_0x4e8b9c-0x0;var _0x576ffe=_0x7a67[_0x4e8b9c];return _0x576ffe;};'use strict';var _=require(_0x77a6('0x0'));var util=require(_0x77a6('0x1'));var moment=require(_0x77a6('0x2'));var BPromise=require(_0x77a6('0x3'));var rs=require(_0x77a6('0x4'));var fs=require('fs');var Redis=require(_0x77a6('0x5'));var db=require(_0x77a6('0x6'))['db'];var utils=require(_0x77a6('0x7'));var logger=require(_0x77a6('0x8'))(_0x77a6('0x9'));var config=require(_0x77a6('0xa'));var jayson=require(_0x77a6('0xb'));var client=jayson[_0x77a6('0xc')][_0x77a6('0xd')]({'port':0x232a});function respondWithRpcPromise(_0x20c981,_0x1b7bbe,_0x57a98){return new BPromise(function(_0x48e44c,_0xd0b4f2){return client[_0x77a6('0xe')](_0x20c981,_0x57a98)[_0x77a6('0xf')](function(_0x2b3ca5){logger[_0x77a6('0x10')](_0x77a6('0x11'),_0x1b7bbe,_0x77a6('0x12'));logger[_0x77a6('0x13')](_0x77a6('0x14'),_0x1b7bbe,_0x77a6('0x12'),JSON[_0x77a6('0x15')](_0x2b3ca5));if(_0x2b3ca5['error']){if(_0x2b3ca5[_0x77a6('0x16')]['code']===0x1f4){logger[_0x77a6('0x16')]('FreshdeskConfiguration,\x20%s,\x20%s',_0x1b7bbe,_0x2b3ca5[_0x77a6('0x16')]['message']);return _0xd0b4f2(_0x2b3ca5['error'][_0x77a6('0x17')]);}logger['error'](_0x77a6('0x11'),_0x1b7bbe,_0x2b3ca5['error'][_0x77a6('0x17')]);return _0x48e44c(_0x2b3ca5[_0x77a6('0x16')][_0x77a6('0x17')]);}else{logger[_0x77a6('0x10')](_0x77a6('0x11'),_0x1b7bbe,_0x77a6('0x12'));_0x48e44c(_0x2b3ca5[_0x77a6('0x18')][_0x77a6('0x17')]);}})[_0x77a6('0x19')](function(_0x47c46d){logger[_0x77a6('0x16')]('FreshdeskConfiguration,\x20%s,\x20%s',_0x1b7bbe,_0x47c46d);_0xd0b4f2(_0x47c46d);});});}