Built motion from commit (unavailable).|2.5.1
[motion2.git] / server / api / faxInteraction / faxInteraction.rpc.js
index eda1199..53d73d2 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa9f8=['info','FaxInteraction,\x20%s,\x20%s','FaxInteraction,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch','UpdateFaxInteraction','FaxInteraction','options','raw','where','limit','then','debug','AddTagsToFaxInteraction','addTags','body','ids','spread','AddTags','lodash','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','defaults','redis','localhost','socket.io-emitter','register'];(function(_0x5e6ea3,_0x9addd2){var _0x4048b5=function(_0x9092e4){while(--_0x9092e4){_0x5e6ea3['push'](_0x5e6ea3['shift']());}};_0x4048b5(++_0x9addd2);}(_0xa9f8,0x108));var _0x8a9f=function(_0x2db7c7,_0x3b7e79){_0x2db7c7=_0x2db7c7-0x0;var _0x2e8bf0=_0xa9f8[_0x2db7c7];return _0x2e8bf0;};'use strict';var _=require(_0x8a9f('0x0'));var util=require('util');var moment=require(_0x8a9f('0x1'));var BPromise=require(_0x8a9f('0x2'));var rs=require(_0x8a9f('0x3'));var fs=require('fs');var Redis=require(_0x8a9f('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x8a9f('0x5'));var logger=require(_0x8a9f('0x6'))(_0x8a9f('0x7'));var config=require('../../config/environment');var jayson=require(_0x8a9f('0x8'));var client=jayson[_0x8a9f('0x9')][_0x8a9f('0xa')]({'port':0x232a});config['redis']=_[_0x8a9f('0xb')](config[_0x8a9f('0xc')],{'host':_0x8a9f('0xd'),'port':0x18eb});var socket=require(_0x8a9f('0xe'))(new Redis(config[_0x8a9f('0xc')]));require('./faxInteraction.socket')[_0x8a9f('0xf')](socket);function respondWithRpcPromise(_0x439fc4,_0x2dbd9c,_0xf0528f){return new BPromise(function(_0x5764a4,_0x27930b){return client['request'](_0x439fc4,_0xf0528f)['then'](function(_0xc632b5){logger[_0x8a9f('0x10')](_0x8a9f('0x11'),_0x2dbd9c,'request\x20sent');logger['debug'](_0x8a9f('0x12'),_0x2dbd9c,_0x8a9f('0x13'),JSON[_0x8a9f('0x14')](_0xc632b5));if(_0xc632b5[_0x8a9f('0x15')]){if(_0xc632b5[_0x8a9f('0x15')][_0x8a9f('0x16')]===0x1f4){logger[_0x8a9f('0x15')](_0x8a9f('0x11'),_0x2dbd9c,_0xc632b5[_0x8a9f('0x15')]['message']);return _0x27930b(_0xc632b5[_0x8a9f('0x15')][_0x8a9f('0x17')]);}logger[_0x8a9f('0x15')](_0x8a9f('0x11'),_0x2dbd9c,_0xc632b5[_0x8a9f('0x15')][_0x8a9f('0x17')]);return _0x5764a4(_0xc632b5[_0x8a9f('0x15')][_0x8a9f('0x17')]);}else{logger[_0x8a9f('0x10')](_0x8a9f('0x11'),_0x2dbd9c,_0x8a9f('0x13'));_0x5764a4(_0xc632b5[_0x8a9f('0x18')][_0x8a9f('0x17')]);}})[_0x8a9f('0x19')](function(_0x1fa3d5){logger[_0x8a9f('0x15')](_0x8a9f('0x11'),_0x2dbd9c,_0x1fa3d5);_0x27930b(_0x1fa3d5);});});}exports[_0x8a9f('0x1a')]=function(_0x45744d){var _0x717c48=this;return new Promise(function(_0x2d3a64,_0x2a842f){return db[_0x8a9f('0x1b')]['update'](_0x45744d['body'],{'raw':_0x45744d[_0x8a9f('0x1c')]?_0x45744d['options'][_0x8a9f('0x1d')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x45744d[_0x8a9f('0x1c')]?_0x45744d['options'][_0x8a9f('0x1e')]||null:null,'attributes':_0x45744d[_0x8a9f('0x1c')]?_0x45744d[_0x8a9f('0x1c')]['attributes']||null:null,'limit':_0x45744d[_0x8a9f('0x1c')]?_0x45744d[_0x8a9f('0x1c')][_0x8a9f('0x1f')]||null:null})[_0x8a9f('0x20')](function(_0x5f1d8e){logger['info']('UpdateFaxInteraction',_0x45744d);logger[_0x8a9f('0x21')](_0x8a9f('0x1a'),_0x45744d,JSON['stringify'](_0x5f1d8e));_0x2d3a64(_0x5f1d8e);})['catch'](function(_0x1bfa38){logger[_0x8a9f('0x15')](_0x8a9f('0x1a'),_0x1bfa38[_0x8a9f('0x17')],_0x45744d);_0x2a842f(_0x717c48['error'](0x1f4,_0x1bfa38[_0x8a9f('0x17')]));});});};exports[_0x8a9f('0x22')]=function(_0x5c057d){return new Promise(function(_0x16ae92,_0x1e062b){return db['FaxInteraction']['find']({'where':_0x5c057d['options']?_0x5c057d['options'][_0x8a9f('0x1e')]||null:null})[_0x8a9f('0x20')](function(_0x191d40){if(_0x191d40){return _0x191d40[_0x8a9f('0x23')](_0x5c057d[_0x8a9f('0x24')][_0x8a9f('0x25')],_['omit'](_0x5c057d[_0x8a9f('0x24')],['ids','id'])||{});}})[_0x8a9f('0x26')](function(_0x51067b){logger[_0x8a9f('0x10')](_0x8a9f('0x27'),_0x5c057d);logger[_0x8a9f('0x21')](_0x8a9f('0x27'),_0x5c057d,JSON[_0x8a9f('0x14')](_0x51067b));_0x16ae92(_0x51067b);})[_0x8a9f('0x19')](function(_0x4cd47f){logger['error'](_0x8a9f('0x27'),_0x4cd47f[_0x8a9f('0x17')],_0x5c057d);_0x1e062b(_this['error'](0x1f4,_0x4cd47f[_0x8a9f('0x17')]));});});};
\ No newline at end of file
+var _0x9823=['debug','FaxInteraction,\x20%s,\x20%s,\x20%s','stringify','error','message','info','result','catch','UpdateFaxInteraction','FaxInteraction','update','body','options','raw','where','attributes','limit','AddTagsToFaxInteraction','addTags','ids','spread','AddTags','lodash','util','moment','bluebird','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','redis','localhost','socket.io-emitter','register','request','then','FaxInteraction,\x20%s,\x20%s','request\x20sent'];(function(_0x5379a0,_0x4c2d3d){var _0x3e0d08=function(_0x5fd472){while(--_0x5fd472){_0x5379a0['push'](_0x5379a0['shift']());}};_0x3e0d08(++_0x4c2d3d);}(_0x9823,0x187));var _0x3982=function(_0x3ead12,_0x153779){_0x3ead12=_0x3ead12-0x0;var _0x359ebb=_0x9823[_0x3ead12];return _0x359ebb;};'use strict';var _=require(_0x3982('0x0'));var util=require(_0x3982('0x1'));var moment=require(_0x3982('0x2'));var BPromise=require(_0x3982('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0x3982('0x4'));var logger=require(_0x3982('0x5'))(_0x3982('0x6'));var config=require(_0x3982('0x7'));var jayson=require(_0x3982('0x8'));var client=jayson[_0x3982('0x9')][_0x3982('0xa')]({'port':0x232a});config[_0x3982('0xb')]=_['defaults'](config['redis'],{'host':_0x3982('0xc'),'port':0x18eb});var socket=require(_0x3982('0xd'))(new Redis(config[_0x3982('0xb')]));require('./faxInteraction.socket')[_0x3982('0xe')](socket);function respondWithRpcPromise(_0x53b2fc,_0x192dbc,_0x291954){return new BPromise(function(_0x4bf947,_0xf3a06f){return client[_0x3982('0xf')](_0x53b2fc,_0x291954)[_0x3982('0x10')](function(_0x9b89e8){logger['info'](_0x3982('0x11'),_0x192dbc,_0x3982('0x12'));logger[_0x3982('0x13')](_0x3982('0x14'),_0x192dbc,_0x3982('0x12'),JSON[_0x3982('0x15')](_0x9b89e8));if(_0x9b89e8[_0x3982('0x16')]){if(_0x9b89e8[_0x3982('0x16')]['code']===0x1f4){logger[_0x3982('0x16')](_0x3982('0x11'),_0x192dbc,_0x9b89e8[_0x3982('0x16')][_0x3982('0x17')]);return _0xf3a06f(_0x9b89e8[_0x3982('0x16')]['message']);}logger[_0x3982('0x16')](_0x3982('0x11'),_0x192dbc,_0x9b89e8[_0x3982('0x16')][_0x3982('0x17')]);return _0x4bf947(_0x9b89e8[_0x3982('0x16')][_0x3982('0x17')]);}else{logger[_0x3982('0x18')](_0x3982('0x11'),_0x192dbc,_0x3982('0x12'));_0x4bf947(_0x9b89e8[_0x3982('0x19')][_0x3982('0x17')]);}})[_0x3982('0x1a')](function(_0x3dadaf){logger[_0x3982('0x16')](_0x3982('0x11'),_0x192dbc,_0x3dadaf);_0xf3a06f(_0x3dadaf);});});}exports[_0x3982('0x1b')]=function(_0x572411){var _0x1fb870=this;return new Promise(function(_0x582d8c,_0x3ced0b){return db[_0x3982('0x1c')][_0x3982('0x1d')](_0x572411[_0x3982('0x1e')],{'raw':_0x572411[_0x3982('0x1f')]?_0x572411[_0x3982('0x1f')][_0x3982('0x20')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x572411[_0x3982('0x1f')]?_0x572411['options'][_0x3982('0x21')]||null:null,'attributes':_0x572411[_0x3982('0x1f')]?_0x572411[_0x3982('0x1f')][_0x3982('0x22')]||null:null,'limit':_0x572411[_0x3982('0x1f')]?_0x572411[_0x3982('0x1f')][_0x3982('0x23')]||null:null})[_0x3982('0x10')](function(_0x5aedba){logger['info'](_0x3982('0x1b'),_0x572411);logger['debug']('UpdateFaxInteraction',_0x572411,JSON['stringify'](_0x5aedba));_0x582d8c(_0x5aedba);})[_0x3982('0x1a')](function(_0x31c4bd){logger['error'](_0x3982('0x1b'),_0x31c4bd[_0x3982('0x17')],_0x572411);_0x3ced0b(_0x1fb870[_0x3982('0x16')](0x1f4,_0x31c4bd[_0x3982('0x17')]));});});};exports[_0x3982('0x24')]=function(_0x2ec343){return new Promise(function(_0x474878,_0x3d7ca9){return db['FaxInteraction']['find']({'where':_0x2ec343[_0x3982('0x1f')]?_0x2ec343[_0x3982('0x1f')][_0x3982('0x21')]||null:null})[_0x3982('0x10')](function(_0x26d72c){if(_0x26d72c){return _0x26d72c[_0x3982('0x25')](_0x2ec343[_0x3982('0x1e')]['ids'],_['omit'](_0x2ec343[_0x3982('0x1e')],[_0x3982('0x26'),'id'])||{});}})[_0x3982('0x27')](function(_0x4c2fe4){logger[_0x3982('0x18')](_0x3982('0x28'),_0x2ec343);logger[_0x3982('0x13')](_0x3982('0x28'),_0x2ec343,JSON['stringify'](_0x4c2fe4));_0x474878(_0x4c2fe4);})['catch'](function(_0x50663a){logger[_0x3982('0x16')]('AddTags',_0x50663a[_0x3982('0x17')],_0x2ec343);_0x3d7ca9(_this[_0x3982('0x16')](0x1f4,_0x50663a[_0x3982('0x17')]));});});};
\ No newline at end of file