Built motion from commit (unavailable).|2.4.3
[motion2.git] / server / api / crmActionsList / crmActionsList.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 _0x8765=['message','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','rpc','../../config/environment','request','then','info','CrmActionsList,\x20%s,\x20%s','request\x20sent','CrmActionsList,\x20%s,\x20%s,\x20%s','stringify','error','code'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x8765,0xd5));var _0x5876=function(_0x2d2c16,_0x4e88b6){_0x2d2c16=_0x2d2c16-0x0;var _0x53f2fb=_0x8765[_0x2d2c16];return _0x53f2fb;};'use strict';var _=require(_0x5876('0x0'));var util=require(_0x5876('0x1'));var moment=require(_0x5876('0x2'));var BPromise=require(_0x5876('0x3'));var rs=require(_0x5876('0x4'));var fs=require('fs');var Redis=require(_0x5876('0x5'));var db=require(_0x5876('0x6'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0x5876('0x7'));var config=require(_0x5876('0x8'));var jayson=require('jayson/promise');var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x46d811,_0x2d5cd2,_0x45212f){return new BPromise(function(_0x24c466,_0x2abe89){return client[_0x5876('0x9')](_0x46d811,_0x45212f)[_0x5876('0xa')](function(_0x27f38d){logger[_0x5876('0xb')](_0x5876('0xc'),_0x2d5cd2,_0x5876('0xd'));logger['debug'](_0x5876('0xe'),_0x2d5cd2,_0x5876('0xd'),JSON[_0x5876('0xf')](_0x27f38d));if(_0x27f38d[_0x5876('0x10')]){if(_0x27f38d[_0x5876('0x10')][_0x5876('0x11')]===0x1f4){logger[_0x5876('0x10')](_0x5876('0xc'),_0x2d5cd2,_0x27f38d[_0x5876('0x10')][_0x5876('0x12')]);return _0x2abe89(_0x27f38d[_0x5876('0x10')][_0x5876('0x12')]);}logger[_0x5876('0x10')](_0x5876('0xc'),_0x2d5cd2,_0x27f38d[_0x5876('0x10')][_0x5876('0x12')]);return _0x24c466(_0x27f38d[_0x5876('0x10')][_0x5876('0x12')]);}else{logger['info']('CrmActionsList,\x20%s,\x20%s',_0x2d5cd2,_0x5876('0xd'));_0x24c466(_0x27f38d[_0x5876('0x13')][_0x5876('0x12')]);}})[_0x5876('0x14')](function(_0x307cd0){logger[_0x5876('0x10')](_0x5876('0xc'),_0x2d5cd2,_0x307cd0);_0x2abe89(_0x307cd0);});});}