Built motion from commit (unavailable).|2.5.15
[motion2.git] / server / api / disposition / disposition.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 _0x067e=['../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','Disposition,\x20%s,\x20%s','request\x20sent','debug','Disposition,\x20%s,\x20%s,\x20%s','error','code','message','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils'];(function(_0x5b0c84,_0x52bb22){var _0x5d40f0=function(_0x45a399){while(--_0x45a399){_0x5b0c84['push'](_0x5b0c84['shift']());}};_0x5d40f0(++_0x52bb22);}(_0x067e,0xc8));var _0xe067=function(_0x427ea2,_0x21921c){_0x427ea2=_0x427ea2-0x0;var _0x34e08e=_0x067e[_0x427ea2];return _0x34e08e;};'use strict';var _=require(_0xe067('0x0'));var util=require(_0xe067('0x1'));var moment=require(_0xe067('0x2'));var BPromise=require(_0xe067('0x3'));var rs=require(_0xe067('0x4'));var fs=require('fs');var Redis=require(_0xe067('0x5'));var db=require(_0xe067('0x6'))['db'];var utils=require(_0xe067('0x7'));var logger=require(_0xe067('0x8'))(_0xe067('0x9'));var config=require(_0xe067('0xa'));var jayson=require(_0xe067('0xb'));var client=jayson[_0xe067('0xc')][_0xe067('0xd')]({'port':0x232a});function respondWithRpcPromise(_0x192280,_0x5b96f5,_0x2a9145){return new BPromise(function(_0x266333,_0x46ca99){return client[_0xe067('0xe')](_0x192280,_0x2a9145)[_0xe067('0xf')](function(_0x5e6cca){logger[_0xe067('0x10')](_0xe067('0x11'),_0x5b96f5,_0xe067('0x12'));logger[_0xe067('0x13')](_0xe067('0x14'),_0x5b96f5,_0xe067('0x12'),JSON['stringify'](_0x5e6cca));if(_0x5e6cca[_0xe067('0x15')]){if(_0x5e6cca[_0xe067('0x15')][_0xe067('0x16')]===0x1f4){logger[_0xe067('0x15')](_0xe067('0x11'),_0x5b96f5,_0x5e6cca[_0xe067('0x15')][_0xe067('0x17')]);return _0x46ca99(_0x5e6cca[_0xe067('0x15')][_0xe067('0x17')]);}logger[_0xe067('0x15')](_0xe067('0x11'),_0x5b96f5,_0x5e6cca[_0xe067('0x15')][_0xe067('0x17')]);return _0x266333(_0x5e6cca[_0xe067('0x15')][_0xe067('0x17')]);}else{logger[_0xe067('0x10')](_0xe067('0x11'),_0x5b96f5,_0xe067('0x12'));_0x266333(_0x5e6cca[_0xe067('0x18')][_0xe067('0x17')]);}})[_0xe067('0x19')](function(_0x1706c9){logger[_0xe067('0x15')](_0xe067('0x11'),_0x5b96f5,_0x1706c9);_0x46ca99(_0x1706c9);});});}