Built motion from commit (unavailable).|2.5.26
[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 _0x8463=['info','ZendeskConfiguration,\x20%s,\x20%s','request\x20sent','ZendeskConfiguration,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','request','then'];(function(_0x3bfded,_0x22db94){var _0x26e313=function(_0x1e4d76){while(--_0x1e4d76){_0x3bfded['push'](_0x3bfded['shift']());}};_0x26e313(++_0x22db94);}(_0x8463,0x135));var _0x3846=function(_0x25403c,_0x1e2bae){_0x25403c=_0x25403c-0x0;var _0x45786a=_0x8463[_0x25403c];return _0x45786a;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x3846('0x0'));var BPromise=require(_0x3846('0x1'));var rs=require(_0x3846('0x2'));var fs=require('fs');var Redis=require(_0x3846('0x3'));var db=require(_0x3846('0x4'))['db'];var utils=require(_0x3846('0x5'));var logger=require(_0x3846('0x6'))(_0x3846('0x7'));var config=require(_0x3846('0x8'));var jayson=require(_0x3846('0x9'));var client=jayson[_0x3846('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0x293c48,_0x2fa551,_0x32bb11){return new BPromise(function(_0x4aeca4,_0x258fe2){return client[_0x3846('0xb')](_0x293c48,_0x32bb11)[_0x3846('0xc')](function(_0x13db70){logger[_0x3846('0xd')](_0x3846('0xe'),_0x2fa551,_0x3846('0xf'));logger['debug'](_0x3846('0x10'),_0x2fa551,_0x3846('0xf'),JSON[_0x3846('0x11')](_0x13db70));if(_0x13db70[_0x3846('0x12')]){if(_0x13db70['error'][_0x3846('0x13')]===0x1f4){logger[_0x3846('0x12')](_0x3846('0xe'),_0x2fa551,_0x13db70[_0x3846('0x12')]['message']);return _0x258fe2(_0x13db70[_0x3846('0x12')][_0x3846('0x14')]);}logger[_0x3846('0x12')](_0x3846('0xe'),_0x2fa551,_0x13db70[_0x3846('0x12')][_0x3846('0x14')]);return _0x4aeca4(_0x13db70['error'][_0x3846('0x14')]);}else{logger[_0x3846('0xd')](_0x3846('0xe'),_0x2fa551,_0x3846('0xf'));_0x4aeca4(_0x13db70[_0x3846('0x15')]['message']);}})[_0x3846('0x16')](function(_0x24e809){logger[_0x3846('0x12')](_0x3846('0xe'),_0x2fa551,_0x24e809);_0x258fe2(_0x24e809);});});}