Built motion from commit 14588770.|2.5.38
[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 _0xfa75=['jayson/promise','client','http','request','then','request\x20sent','DeskConfiguration,\x20%s,\x20%s,\x20%s','stringify','error','code','DeskConfiguration,\x20%s,\x20%s','message','info','result','catch','lodash','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment'];(function(_0x58612a,_0xfe83a){var _0x38801e=function(_0x2707d2){while(--_0x2707d2){_0x58612a['push'](_0x58612a['shift']());}};_0x38801e(++_0xfe83a);}(_0xfa75,0x1ef));var _0x5fa7=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0xfa75[_0x20a584];return _0x4b41a8;};'use strict';var _=require(_0x5fa7('0x0'));var util=require(_0x5fa7('0x1'));var moment=require(_0x5fa7('0x2'));var BPromise=require('bluebird');var rs=require(_0x5fa7('0x3'));var fs=require('fs');var Redis=require(_0x5fa7('0x4'));var db=require(_0x5fa7('0x5'))['db'];var utils=require(_0x5fa7('0x6'));var logger=require('../../config/logger')(_0x5fa7('0x7'));var config=require(_0x5fa7('0x8'));var jayson=require(_0x5fa7('0x9'));var client=jayson[_0x5fa7('0xa')][_0x5fa7('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x548e4e,_0x317893,_0x56ff0a){return new BPromise(function(_0x9543ee,_0x2df4b8){return client[_0x5fa7('0xc')](_0x548e4e,_0x56ff0a)[_0x5fa7('0xd')](function(_0x29b8d0){logger['info']('DeskConfiguration,\x20%s,\x20%s',_0x317893,_0x5fa7('0xe'));logger['debug'](_0x5fa7('0xf'),_0x317893,'request\x20sent',JSON[_0x5fa7('0x10')](_0x29b8d0));if(_0x29b8d0['error']){if(_0x29b8d0[_0x5fa7('0x11')][_0x5fa7('0x12')]===0x1f4){logger['error'](_0x5fa7('0x13'),_0x317893,_0x29b8d0[_0x5fa7('0x11')][_0x5fa7('0x14')]);return _0x2df4b8(_0x29b8d0[_0x5fa7('0x11')][_0x5fa7('0x14')]);}logger[_0x5fa7('0x11')](_0x5fa7('0x13'),_0x317893,_0x29b8d0[_0x5fa7('0x11')][_0x5fa7('0x14')]);return _0x9543ee(_0x29b8d0[_0x5fa7('0x11')][_0x5fa7('0x14')]);}else{logger[_0x5fa7('0x15')]('DeskConfiguration,\x20%s,\x20%s',_0x317893,'request\x20sent');_0x9543ee(_0x29b8d0[_0x5fa7('0x16')][_0x5fa7('0x14')]);}})[_0x5fa7('0x17')](function(_0x6999a0){logger['error']('DeskConfiguration,\x20%s,\x20%s',_0x317893,_0x6999a0);_0x2df4b8(_0x6999a0);});});}