Built motion from commit 838c2833.|2.6.24
[motion2.git] / server / api / contactItemType / contactItemType.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 _0xc35f=['rpc','../../config/environment','jayson/promise','http','then','info','ContactItemType,\x20%s,\x20%s','request\x20sent','debug','ContactItemType,\x20%s,\x20%s,\x20%s','error','code','result','message','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger'];(function(_0x2f3722,_0x3702d5){var _0x59b713=function(_0x1546a0){while(--_0x1546a0){_0x2f3722['push'](_0x2f3722['shift']());}};_0x59b713(++_0x3702d5);}(_0xc35f,0x82));var _0xfc35=function(_0x106a93,_0x5e8fd0){_0x106a93=_0x106a93-0x0;var _0x197296=_0xc35f[_0x106a93];return _0x197296;};'use strict';var _=require(_0xfc35('0x0'));var util=require(_0xfc35('0x1'));var moment=require(_0xfc35('0x2'));var BPromise=require(_0xfc35('0x3'));var rs=require(_0xfc35('0x4'));var fs=require('fs');var Redis=require(_0xfc35('0x5'));var db=require(_0xfc35('0x6'))['db'];var utils=require('../../config/utils');var logger=require(_0xfc35('0x7'))(_0xfc35('0x8'));var config=require(_0xfc35('0x9'));var jayson=require(_0xfc35('0xa'));var client=jayson['client'][_0xfc35('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x418304,_0x344788,_0x203a74){return new BPromise(function(_0x104777,_0x38d142){return client['request'](_0x418304,_0x203a74)[_0xfc35('0xc')](function(_0x4ff592){logger[_0xfc35('0xd')](_0xfc35('0xe'),_0x344788,_0xfc35('0xf'));logger[_0xfc35('0x10')](_0xfc35('0x11'),_0x344788,'request\x20sent',JSON['stringify'](_0x4ff592));if(_0x4ff592[_0xfc35('0x12')]){if(_0x4ff592['error'][_0xfc35('0x13')]===0x1f4){logger[_0xfc35('0x12')](_0xfc35('0xe'),_0x344788,_0x4ff592['error']['message']);return _0x38d142(_0x4ff592[_0xfc35('0x12')]['message']);}logger[_0xfc35('0x12')](_0xfc35('0xe'),_0x344788,_0x4ff592[_0xfc35('0x12')]['message']);return _0x104777(_0x4ff592[_0xfc35('0x12')]['message']);}else{logger[_0xfc35('0xd')](_0xfc35('0xe'),_0x344788,'request\x20sent');_0x104777(_0x4ff592[_0xfc35('0x14')][_0xfc35('0x15')]);}})[_0xfc35('0x16')](function(_0x50b05a){logger[_0xfc35('0x12')](_0xfc35('0xe'),_0x344788,_0x50b05a);_0x38d142(_0x50b05a);});});}