Built motion from commit 9c91e9f5.|2.6.29
[motion2.git] / server / api / intDeskConfiguration / intDeskConfiguration.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 _0xc3f3=['jayson/promise','client','http','request','info','DeskConfiguration,\x20%s,\x20%s','request\x20sent','debug','error','catch','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment'];(function(_0x5cb1af,_0x4bdc8c){var _0x8d7940=function(_0x3db70a){while(--_0x3db70a){_0x5cb1af['push'](_0x5cb1af['shift']());}};_0x8d7940(++_0x4bdc8c);}(_0xc3f3,0xd2));var _0x3c3f=function(_0x5714a3,_0x42660f){_0x5714a3=_0x5714a3-0x0;var _0x186bad=_0xc3f3[_0x5714a3];return _0x186bad;};'use strict';var _=require('lodash');var util=require(_0x3c3f('0x0'));var moment=require(_0x3c3f('0x1'));var BPromise=require(_0x3c3f('0x2'));var rs=require(_0x3c3f('0x3'));var fs=require('fs');var Redis=require(_0x3c3f('0x4'));var db=require(_0x3c3f('0x5'))['db'];var utils=require(_0x3c3f('0x6'));var logger=require(_0x3c3f('0x7'))(_0x3c3f('0x8'));var config=require(_0x3c3f('0x9'));var jayson=require(_0x3c3f('0xa'));var client=jayson[_0x3c3f('0xb')][_0x3c3f('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x6e4104,_0x27ddfa,_0x35e9c7){return new BPromise(function(_0x5ef5f2,_0x252a1b){return client[_0x3c3f('0xd')](_0x6e4104,_0x35e9c7)['then'](function(_0x3e6bbb){logger[_0x3c3f('0xe')](_0x3c3f('0xf'),_0x27ddfa,_0x3c3f('0x10'));logger[_0x3c3f('0x11')]('DeskConfiguration,\x20%s,\x20%s,\x20%s',_0x27ddfa,'request\x20sent',JSON['stringify'](_0x3e6bbb));if(_0x3e6bbb['error']){if(_0x3e6bbb[_0x3c3f('0x12')]['code']===0x1f4){logger[_0x3c3f('0x12')](_0x3c3f('0xf'),_0x27ddfa,_0x3e6bbb['error']['message']);return _0x252a1b(_0x3e6bbb[_0x3c3f('0x12')]['message']);}logger[_0x3c3f('0x12')](_0x3c3f('0xf'),_0x27ddfa,_0x3e6bbb[_0x3c3f('0x12')]['message']);return _0x5ef5f2(_0x3e6bbb[_0x3c3f('0x12')]['message']);}else{logger[_0x3c3f('0xe')](_0x3c3f('0xf'),_0x27ddfa,'request\x20sent');_0x5ef5f2(_0x3e6bbb['result']['message']);}})[_0x3c3f('0x13')](function(_0x106eb0){logger[_0x3c3f('0x12')](_0x3c3f('0xf'),_0x27ddfa,_0x106eb0);_0x252a1b(_0x106eb0);});});}