Built motion from commit bab6f49e.|2.6.17
[motion2.git] / server / api / intZendeskConfiguration / intZendeskConfiguration.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 _0x420e=['../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','request','then','info','request\x20sent','ZendeskConfiguration,\x20%s,\x20%s,\x20%s','error','code','message','ZendeskConfiguration,\x20%s,\x20%s','result','catch','lodash','util','moment','bluebird','randomstring','ioredis'];(function(_0x434804,_0x415f68){var _0x573fc8=function(_0x3ce265){while(--_0x3ce265){_0x434804['push'](_0x434804['shift']());}};_0x573fc8(++_0x415f68);}(_0x420e,0x1de));var _0xe420=function(_0x35832d,_0x36b57d){_0x35832d=_0x35832d-0x0;var _0x5cbd19=_0x420e[_0x35832d];return _0x5cbd19;};'use strict';var _=require(_0xe420('0x0'));var util=require(_0xe420('0x1'));var moment=require(_0xe420('0x2'));var BPromise=require(_0xe420('0x3'));var rs=require(_0xe420('0x4'));var fs=require('fs');var Redis=require(_0xe420('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0xe420('0x6'));var logger=require(_0xe420('0x7'))(_0xe420('0x8'));var config=require(_0xe420('0x9'));var jayson=require(_0xe420('0xa'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x7de1a8,_0x523090,_0x52c9df){return new BPromise(function(_0x3ab608,_0x1478a7){return client[_0xe420('0xb')](_0x7de1a8,_0x52c9df)[_0xe420('0xc')](function(_0x58998e){logger[_0xe420('0xd')]('ZendeskConfiguration,\x20%s,\x20%s',_0x523090,_0xe420('0xe'));logger['debug'](_0xe420('0xf'),_0x523090,_0xe420('0xe'),JSON['stringify'](_0x58998e));if(_0x58998e[_0xe420('0x10')]){if(_0x58998e[_0xe420('0x10')][_0xe420('0x11')]===0x1f4){logger[_0xe420('0x10')]('ZendeskConfiguration,\x20%s,\x20%s',_0x523090,_0x58998e[_0xe420('0x10')]['message']);return _0x1478a7(_0x58998e[_0xe420('0x10')][_0xe420('0x12')]);}logger[_0xe420('0x10')](_0xe420('0x13'),_0x523090,_0x58998e[_0xe420('0x10')][_0xe420('0x12')]);return _0x3ab608(_0x58998e[_0xe420('0x10')][_0xe420('0x12')]);}else{logger[_0xe420('0xd')](_0xe420('0x13'),_0x523090,_0xe420('0xe'));_0x3ab608(_0x58998e[_0xe420('0x14')][_0xe420('0x12')]);}})[_0xe420('0x15')](function(_0x54863d){logger[_0xe420('0x10')]('ZendeskConfiguration,\x20%s,\x20%s',_0x523090,_0x54863d);_0x1478a7(_0x54863d);});});}