Built motion from commit b387bb7c7.|1.0.28
[motion.git] / server / api / fax_room / fax_room.controller.js
index 919356a..3f64776 100644 (file)
@@ -1 +1 @@
-var _0xc28a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72\x2E\x6A\x73","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x55\x73\x65\x72","\x43\x6F\x6E\x74\x61\x63\x74","\x46\x61\x78\x52\x6F\x6F\x6D","\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74","\x46\x61\x78\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x46\x61\x78\x51\x75\x65\x75\x65","\x46\x61\x78\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x64\x65\x66\x61\x75\x6C\x74","\x73\x63\x6F\x70\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x69\x64","\x6D\x61\x70","\x67\x65\x74\x46\x61\x78\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x66\x69\x6E\x64\x42\x79\x49\x64","\x75\x73\x65\x72","\x72\x6F\x6C\x65","\x70\x65\x6E\x64\x69\x6E\x67","\x50\x45\x4E\x44\x49\x4E\x47","\x64\x61\x79","\x73\x74\x61\x72\x74\x4F\x66","\x6D\x65\x72\x67\x65","\x63\x6F\x75\x6E\x74","\x61\x6C\x6C","\x6E\x65\x77","\x4E\x45\x57","\x6F\x70\x65\x6E","\x4F\x50\x45\x4E","\x63\x6C\x6F\x73\x65\x64","\x43\x4C\x4F\x53\x45\x44","\x69\x6E\x62\x6F\x78","\x53\x45\x4C\x45\x43\x54\x20\x60\x46\x61\x78\x52\x6F\x6F\x6D\x60\x2E\x60\x69\x64\x60\x2C\x20\x60\x46\x61\x78\x52\x6F\x6F\x6D\x60\x2E\x60\x66\x72\x6F\x6D\x60\x2C\x20\x60\x46\x61\x78\x52\x6F\x6F\x6D\x60\x2E\x60\x61\x63\x63\x6F\x75\x6E\x74\x60\x2C\x20\x60\x46\x61\x78\x52\x6F\x6F\x6D\x60\x2E\x60\x73\x74\x61\x74\x75\x73\x60\x2C\x20\x60\x46\x61\x78\x52\x6F\x6F\x6D\x60\x2E\x60\x6C\x61\x73\x74\x45\x76\x65\x6E\x74\x60\x2C\x20\x60\x46\x61\x78\x52\x6F\x6F\x6D\x60\x2E\x60\x75\x70\x64\x61\x74\x65\x64\x41\x74\x60\x20\x46\x52\x4F\x4D\x20\x60\x66\x61\x78\x5F\x72\x6F\x6F\x6D\x73\x60\x20\x41\x53\x20\x60\x46\x61\x78\x52\x6F\x6F\x6D\x60\x20\x4C\x45\x46\x54\x20\x4F\x55\x54\x45\x52\x20\x4A\x4F\x49\x4E\x20\x28\x60\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x66\x61\x78\x5F\x72\x6F\x6F\x6D\x73\x60\x20\x41\x53\x20\x60\x55\x73\x65\x72\x73\x2E\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x66\x61\x78\x5F\x72\x6F\x6F\x6D\x73\x60\x20\x49\x4E\x4E\x45\x52\x20\x4A\x4F\x49\x4E\x20\x60\x75\x73\x65\x72\x73\x60\x20\x41\x53\x20\x60\x55\x73\x65\x72\x73\x60\x20\x4F\x4E\x20\x60\x55\x73\x65\x72\x73\x60\x2E\x60\x69\x64\x60\x20\x3D\x20\x60\x55\x73\x65\x72\x73\x2E\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x66\x61\x78\x5F\x72\x6F\x6F\x6D\x73\x60\x2E\x60\x55\x73\x65\x72\x49\x64\x60\x29\x20\x4F\x4E\x20\x60\x46\x61\x78\x52\x6F\x6F\x6D\x60\x2E\x60\x69\x64\x60\x20\x3D\x20\x60\x55\x73\x65\x72\x73\x2E\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x66\x61\x78\x5F\x72\x6F\x6F\x6D\x73\x60\x2E\x60\x46\x61\x78\x52\x6F\x6F\x6D\x49\x64\x60\x20\x57\x48\x45\x52\x45\x20\x28\x60\x46\x61\x78\x52\x6F\x6F\x6D\x60\x2E\x60\x64\x65\x6C\x65\x74\x65\x64\x41\x74\x60\x20\x49\x53\x20\x4E\x55\x4C\x4C\x20\x41\x4E\x44\x20\x28\x60\x46\x61\x78\x52\x6F\x6F\x6D\x60\x2E\x60\x73\x74\x61\x74\x75\x73\x60\x20\x3D\x20\x3A\x73\x74\x61\x74\x75\x73\x20\x4F\x52\x20\x60\x55\x73\x65\x72\x73\x60\x2E\x60\x69\x64\x60\x20\x3D\x20\x3A\x69\x64\x29\x29","\x55\x4E\x4D\x41\x4E\x41\x47\x45\x44","\x53\x45\x4C\x45\x43\x54","\x51\x75\x65\x72\x79\x54\x79\x70\x65\x73","\x61\x67\x65\x6E\x74","\x53\x45\x4C\x45\x43\x54\x20\x60\x69\x64\x60\x2C\x20\x60\x66\x72\x6F\x6D\x60\x2C\x20\x60\x61\x63\x63\x6F\x75\x6E\x74\x60\x2C\x20\x60\x73\x74\x61\x74\x75\x73\x60\x2C\x20\x60\x6C\x61\x73\x74\x45\x76\x65\x6E\x74\x60\x20\x2C\x60\x75\x70\x64\x61\x74\x65\x64\x41\x74\x60\x20\x46\x52\x4F\x4D\x20\x60\x66\x61\x78\x5F\x72\x6F\x6F\x6D\x73\x60\x20\x57\x48\x45\x52\x45\x20\x60\x66\x61\x78\x5F\x72\x6F\x6F\x6D\x73\x60\x2E\x60\x64\x65\x6C\x65\x74\x65\x64\x41\x74\x60\x20\x49\x53\x20\x4E\x55\x4C\x4C","\x61\x67\x65\x6E\x74\x49\x6E\x64\x65\x78","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x41\x6C\x6C","\x6F\x70\x65\x6E\x52\x6F\x6F\x6D","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x61\x64\x64\x55\x73\x65\x72","\x75\x70\x64\x61\x74\x65","\x73\x68\x6F\x77","\x73\x68\x6F\x77\x41\x67\x65\x6E\x74\x73","\x6E\x61\x6D\x65","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x65\x6D\x61\x69\x6C","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x67\x65\x74\x55\x73\x65\x72\x73","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x63\x72\x65\x61\x74\x65\x4D\x65\x73\x73\x61\x67\x65","\x55\x73\x65\x72\x49\x64","\x46\x61\x78\x52\x6F\x6F\x6D\x49\x64","\x74\x65\x78\x74","\x66\x61\x78\x4D\x65\x73\x73\x61\x67\x65\x41\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x6D\x69","\x6C\x6F\x63\x61\x6C\x73","\x61\x70\x70","\x63\x68\x61\x6E\x67\x65\x64","\x66\x61\x78\x52\x6F\x6F\x6D\x41\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x6A\x6F\x62\x49\x64","\x46\x61\x78\x20\x61\x6C\x72\x65\x61\x64\x79\x20\x61\x73\x73\x69\x67\x6E\x65\x64","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65\x41\x67\x65\x6E\x74\x73","\x61\x67\x65\x6E\x74\x73","\x73\x65\x74\x55\x73\x65\x72\x73","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x75\x70\x64\x61\x74\x65\x50\x61\x74\x63\x68","\x2C","\x73\x70\x6C\x69\x74","\x67\x65\x74\x44\x61\x73\x68\x62\x6F\x61\x72\x64\x56\x61\x6C\x75\x65\x73","\x6B\x65\x79\x42\x79","\x6D\x61\x70\x56\x61\x6C\x75\x65\x73","\x53\x45\x4C\x45\x43\x54\x20\x4C\x4F\x57\x45\x52\x28\x73\x74\x61\x74\x75\x73\x29\x20\x41\x53\x20\x73\x74\x61\x74\x75\x73\x2C\x20\x43\x4F\x55\x4E\x54\x28\x69\x64\x29\x20\x41\x53\x20\x63\x6F\x75\x6E\x74\x20\x46\x52\x4F\x4D\x20\x66\x61\x78\x5F\x72\x6F\x6F\x6D\x73\x20\x57\x48\x45\x52\x45\x20\x64\x65\x6C\x65\x74\x65\x64\x41\x74\x20\x49\x53\x20\x4E\x55\x4C\x4C\x20\x47\x52\x4F\x55\x50\x20\x42\x59\x20\x73\x74\x61\x74\x75\x73","\x67\x65\x74\x52\x6F\x6F\x6D\x42\x79\x4D\x65\x73\x73\x61\x67\x65","\x67\x65\x74\x46\x61\x78\x52\x6F\x6F\x6D"];_0xc28a[0];var _=require(_0xc28a[1]);var util=require(_0xc28a[2]);var Util=require(_0xc28a[3]);var moment=require(_0xc28a[4]);var logger=require(_0xc28a[6])(_0xc28a[5]);var sequelize=require(_0xc28a[8])[_0xc28a[7]];var User=require(_0xc28a[8])[_0xc28a[9]];var Agent=require(_0xc28a[8])[_0xc28a[9]];var Contact=require(_0xc28a[8])[_0xc28a[10]];var FaxRoom=require(_0xc28a[8])[_0xc28a[11]];var FaxMessage=require(_0xc28a[8])[_0xc28a[12]];var FaxAccount=require(_0xc28a[8])[_0xc28a[13]];var FaxApplication=require(_0xc28a[8])[_0xc28a[14]];var FaxQueue=require(_0xc28a[8])[_0xc28a[15]];var FaxAttachment=require(_0xc28a[8])[_0xc28a[16]];exports[_0xc28a[17]]= function(_0x4f0fx10,_0x4f0fx11,_0x4f0fx12){return FaxRoom[_0xc28a[26]](_0xc28a[25])[_0xc28a[24]](Util[_0xc28a[23]](_0x4f0fx10[_0xc28a[22]]))[_0xc28a[21]](function(_0x4f0fx14){return _0x4f0fx11[_0xc28a[20]](200)[_0xc28a[19]](_0x4f0fx14)})[_0xc28a[18]](function(_0x4f0fx13){return handleError(_0x4f0fx11,_0x4f0fx13)})};exports[_0xc28a[27]]= function(_0x4f0fx10,_0x4f0fx11){return FaxRoom[_0xc28a[27]]()[_0xc28a[21]](function(_0x4f0fx15){return _0x4f0fx11[_0xc28a[20]](200)[_0xc28a[19]](_0x4f0fx15)})[_0xc28a[18]](function(_0x4f0fx13){return handleError(_0x4f0fx11,_0x4f0fx13)})};function getFaxQueues(_0x4f0fx17){return function(){switch(_0x4f0fx17[_0xc28a[33]]){case _0xc28a[32]:return User[_0xc28a[31]](_0x4f0fx17[_0xc28a[28]],{attributes:[_0xc28a[28]]})[_0xc28a[21]](Util[_0xc28a[30]]({},{attributes:[_0xc28a[28]]}))[_0xc28a[21]](function(_0x4f0fx18){return {include:{model:FaxAccount,include:{model:FaxApplication,include:{model:FaxQueue,where:{id:_[_0xc28a[29]](_0x4f0fx18,_0xc28a[28])}}}}}});default:return {}}}}exports[_0xc28a[34]]= function(_0x4f0fx10,_0x4f0fx11){return Promise[_0xc28a[40]]([])[_0xc28a[21]](getFaxQueues(_0x4f0fx10[_0xc28a[32]]))[_0xc28a[21]](function(_0x4f0fx1a){return FaxRoom[_0xc28a[39]](_[_0xc28a[38]](Util[_0xc28a[23]](_0x4f0fx10[_0xc28a[22]],{status:_0xc28a[35],updatedAt:{$gte:moment()[_0xc28a[37]](_0xc28a[36])}}),_0x4f0fx1a))})[_0xc28a[21]](function(_0x4f0fx19){return _0x4f0fx11[_0xc28a[20]](200)[_0xc28a[19]]({value:_0x4f0fx19})})[_0xc28a[18]](function(_0x4f0fx13){return handleError(_0x4f0fx11,_0x4f0fx13)})};exports[_0xc28a[41]]= function(_0x4f0fx10,_0x4f0fx11){return Promise[_0xc28a[40]]([])[_0xc28a[21]](getFaxQueues(_0x4f0fx10[_0xc28a[32]]))[_0xc28a[21]](function(_0x4f0fx1a){return FaxRoom[_0xc28a[39]](_[_0xc28a[38]](Util[_0xc28a[23]](_0x4f0fx10[_0xc28a[22]],{status:_0xc28a[42],updatedAt:{$gte:moment()[_0xc28a[37]](_0xc28a[36])}}),_0x4f0fx1a))})[_0xc28a[21]](function(_0x4f0fx19){return _0x4f0fx11[_0xc28a[20]](200)[_0xc28a[19]]({value:_0x4f0fx19})})[_0xc28a[18]](function(_0x4f0fx13){return handleError(_0x4f0fx11,_0x4f0fx13)})};exports[_0xc28a[43]]= function(_0x4f0fx10,_0x4f0fx11){return Promise[_0xc28a[40]]([])[_0xc28a[21]](getFaxQueues(_0x4f0fx10[_0xc28a[32]]))[_0xc28a[21]](function(_0x4f0fx1a){return FaxRoom[_0xc28a[39]](_[_0xc28a[38]](Util[_0xc28a[23]](_0x4f0fx10[_0xc28a[22]],{status:_0xc28a[44],updatedAt:{$gte:moment()[_0xc28a[37]](_0xc28a[36])}}),_0x4f0fx1a))})[_0xc28a[21]](function(_0x4f0fx19){return _0x4f0fx11[_0xc28a[20]](200)[_0xc28a[19]]({value:_0x4f0fx19})})[_0xc28a[18]](function(_0x4f0fx13){return handleError(_0x4f0fx11,_0x4f0fx13)})};exports[_0xc28a[45]]= function(_0x4f0fx10,_0x4f0fx11){return Promise[_0xc28a[40]]([])[_0xc28a[21]](getFaxQueues(_0x4f0fx10[_0xc28a[32]]))[_0xc28a[21]](function(_0x4f0fx1a){return FaxRoom[_0xc28a[39]](_[_0xc28a[38]](Util[_0xc28a[23]](_0x4f0fx10[_0xc28a[22]],{status:_0xc28a[46],updatedAt:{$gte:moment()[_0xc28a[37]](_0xc28a[36])}}),_0x4f0fx1a))})[_0xc28a[21]](function(_0x4f0fx19){return _0x4f0fx11[_0xc28a[20]](200)[_0xc28a[19]]({value:_0x4f0fx19})})[_0xc28a[18]](function(_0x4f0fx13){return handleError(_0x4f0fx11,_0x4f0fx13)})};exports[_0xc28a[47]]= function(_0x4f0fx10,_0x4f0fx11,_0x4f0fx12){switch(_0x4f0fx10[_0xc28a[32]][_0xc28a[33]]){case _0xc28a[52]:return sequelize[_0xc28a[22]](_0xc28a[48],{replacements:{status:_0xc28a[49],id:_0x4f0fx10[_0xc28a[32]][_0xc28a[28]]},type:sequelize[_0xc28a[51]][_0xc28a[50]]})[_0xc28a[21]](function(_0x4f0fx14){return _0x4f0fx11[_0xc28a[20]](200)[_0xc28a[19]](_0x4f0fx14)})[_0xc28a[18]](function(_0x4f0fx13){return handleError(_0x4f0fx11,_0x4f0fx13)});default:return sequelize[_0xc28a[22]](_0xc28a[53],{replacements:{status:_0xc28a[49],id:_0x4f0fx10[_0xc28a[32]][_0xc28a[28]]},type:sequelize[_0xc28a[51]][_0xc28a[50]]})[_0xc28a[21]](function(_0x4f0fx14){return _0x4f0fx11[_0xc28a[20]](200)[_0xc28a[19]](_0x4f0fx14)})[_0xc28a[18]](function(_0x4f0fx13){return handleError(_0x4f0fx11,_0x4f0fx13)})}};exports[_0xc28a[54]]= function(_0x4f0fx10,_0x4f0fx11,_0x4f0fx12){return FaxRoom[_0xc28a[56]]({where:{UserId:_0x4f0fx10[_0xc28a[55]][_0xc28a[28]]},include:[{all:true}]})[_0xc28a[21]](function(_0x4f0fx1b){return _0x4f0fx11[_0xc28a[20]](200)[_0xc28a[19]](_0x4f0fx1b)})[_0xc28a[18]](function(_0x4f0fx13){return handleError(_0x4f0fx11,_0x4f0fx13)})};exports[_0xc28a[57]]= function(_0x4f0fx10,_0x4f0fx11,_0x4f0fx12){var _0x4f0fx1c;if(_0x4f0fx10[_0xc28a[32]][_0xc28a[33]]=== _0xc28a[52]){return FaxRoom[_0xc28a[31]](_0x4f0fx10[_0xc28a[55]][_0xc28a[28]])[_0xc28a[21]](function(_0x4f0fx1d){_0x4f0fx1c= _0x4f0fx1d;if(!_0x4f0fx1c){return _0x4f0fx11[_0xc28a[58]](404)};return _0x4f0fx1c[_0xc28a[60]]({status:_0xc28a[44]},{userId:_0x4f0fx10[_0xc28a[32]][_0xc28a[28]]})})[_0xc28a[21]](function(){return _0x4f0fx1c[_0xc28a[59]](_0x4f0fx10[_0xc28a[32]][_0xc28a[28]])})[_0xc28a[21]](function(){return _0x4f0fx11[_0xc28a[58]](200)})[_0xc28a[18]](function(_0x4f0fx13){return handleError(_0x4f0fx11,_0x4f0fx13)})}};exports[_0xc28a[61]]= function(_0x4f0fx10,_0x4f0fx11,_0x4f0fx12){return FaxRoom[_0xc28a[26]](_0xc28a[25])[_0xc28a[31]](_0x4f0fx10[_0xc28a[55]][_0xc28a[28]])[_0xc28a[21]](function(_0x4f0fx1d){if(!_0x4f0fx1d){return _0x4f0fx11[_0xc28a[58]](404)};return _0x4f0fx11[_0xc28a[19]](_0x4f0fx1d)})[_0xc28a[18]](function(_0x4f0fx13){return handleError(_0x4f0fx11,_0x4f0fx13)})};exports[_0xc28a[62]]= function(_0x4f0fx10,_0x4f0fx11,_0x4f0fx12){return FaxRoom[_0xc28a[31]](_0x4f0fx10[_0xc28a[55]][_0xc28a[28]])[_0xc28a[21]](function(_0x4f0fx1d){if(!_0x4f0fx1d){return _0x4f0fx11[_0xc28a[58]](404)};return _0x4f0fx1d[_0xc28a[67]]({attributes:[_0xc28a[28],_0xc28a[63],_0xc28a[64],_0xc28a[65],_0xc28a[33],_0xc28a[66]]})})[_0xc28a[21]](function(_0x4f0fx1e){return _0x4f0fx11[_0xc28a[19]](_0x4f0fx1e)})[_0xc28a[18]](function(_0x4f0fx13){return handleError(_0x4f0fx11,_0x4f0fx13)})};exports[_0xc28a[68]]= function(_0x4f0fx10,_0x4f0fx11,_0x4f0fx12){return FaxRoom[_0xc28a[68]](_0x4f0fx10[_0xc28a[69]])[_0xc28a[21]](function(_0x4f0fx1d){return _0x4f0fx11[_0xc28a[20]](201)[_0xc28a[19]](_0x4f0fx1d)})[_0xc28a[18]](function(_0x4f0fx13){return handleError(_0x4f0fx11,_0x4f0fx13)})};exports[_0xc28a[70]]= function(_0x4f0fx10,_0x4f0fx11,_0x4f0fx12){_0x4f0fx10[_0xc28a[69]][_0xc28a[71]]= _0x4f0fx10[_0xc28a[32]][_0xc28a[28]];_0x4f0fx10[_0xc28a[69]][_0xc28a[72]]= _0x4f0fx10[_0xc28a[55]][_0xc28a[28]];_0x4f0fx10[_0xc28a[69]][_0xc28a[73]]= _0x4f0fx10[_0xc28a[69]][_0xc28a[73]];return FaxMessage[_0xc28a[68]](_0x4f0fx10[_0xc28a[69]],{include:[{model:FaxAttachment}],user:_0x4f0fx10[_0xc28a[32]]})[_0xc28a[21]](function(_0x4f0fx1f){if(_0x4f0fx1f){_0x4f0fx10[_0xc28a[77]][_0xc28a[76]][_0xc28a[75]][_0xc28a[19]]({message:_0xc28a[74],doc:_0x4f0fx1f,options:{user:_0x4f0fx10[_0xc28a[32]]}})};return _0x4f0fx11[_0xc28a[20]](201)[_0xc28a[19]](_0x4f0fx1f)})[_0xc28a[18]](function(_0x4f0fx13){return handleError(_0x4f0fx11,_0x4f0fx13)})};exports[_0xc28a[60]]= function(_0x4f0fx10,_0x4f0fx11,_0x4f0fx12){return FaxRoom[_0xc28a[31]](_0x4f0fx10[_0xc28a[55]][_0xc28a[28]])[_0xc28a[21]](function(_0x4f0fx1d){if(!_0x4f0fx1d){return _0x4f0fx11[_0xc28a[58]](404)};if(_0x4f0fx1d[_0xc28a[80]]){throw  new Error(_0xc28a[81])};var _0x4f0fx20=_[_0xc28a[38]](_0x4f0fx1d,_0x4f0fx10[_0xc28a[69]]);return _0x4f0fx20[_0xc28a[82]]()})[_0xc28a[21]](function(_0x4f0fx1d){if(_0x4f0fx1d[_0xc28a[78]](_0xc28a[20])&& _0x4f0fx1d[_0xc28a[20]]=== _0xc28a[46]){_0x4f0fx10[_0xc28a[77]][_0xc28a[76]][_0xc28a[75]][_0xc28a[19]]({message:_0xc28a[79],doc:_0x4f0fx1d})};return _0x4f0fx11[_0xc28a[20]](200)[_0xc28a[19]](_0x4f0fx1d)})[_0xc28a[18]](function(_0x4f0fx13){return handleError(_0x4f0fx11,_0x4f0fx13)})};exports[_0xc28a[83]]= function(_0x4f0fx10,_0x4f0fx11,_0x4f0fx12){return FaxRoom[_0xc28a[31]](_0x4f0fx10[_0xc28a[55]][_0xc28a[28]])[_0xc28a[21]](function(_0x4f0fx1d){if(!_0x4f0fx1d){return _0x4f0fx11[_0xc28a[58]](404)};return _0x4f0fx1d[_0xc28a[85]](_0x4f0fx10[_0xc28a[69]][_0xc28a[84]],{individualHooks:true})})[_0xc28a[21]](function(){return _0x4f0fx11[_0xc28a[58]](200)})[_0xc28a[18]](function(_0x4f0fx13){return handleError(_0x4f0fx11,_0x4f0fx13)})};exports[_0xc28a[86]]= function(_0x4f0fx10,_0x4f0fx11,_0x4f0fx12){return FaxRoom[_0xc28a[31]](_0x4f0fx10[_0xc28a[55]][_0xc28a[28]])[_0xc28a[21]](function(_0x4f0fx1d){if(!_0x4f0fx1d){return _0x4f0fx11[_0xc28a[58]](404)};return _0x4f0fx1d[_0xc28a[86]]()})[_0xc28a[21]](function(){return _0x4f0fx11[_0xc28a[58]](204)})[_0xc28a[18]](function(_0x4f0fx13){return handleError(_0x4f0fx11,_0x4f0fx13)})};exports[_0xc28a[87]]= function(_0x4f0fx10,_0x4f0fx11){return FaxRoom[_0xc28a[86]]({where:{id:_0x4f0fx10[_0xc28a[22]][_0xc28a[88]]},individualHooks:true})[_0xc28a[21]](function(){return _0x4f0fx11[_0xc28a[58]](200)})[_0xc28a[18]](function(_0x4f0fx13){return handleError(_0x4f0fx11,_0x4f0fx13)})};function handleError(_0x4f0fx11,_0x4f0fx13){logger[_0xc28a[90]](_0x4f0fx13[_0xc28a[89]]);return _0x4f0fx11[_0xc28a[20]](500)[_0xc28a[19]](_0x4f0fx13)}exports[_0xc28a[91]]= function(_0x4f0fx10,_0x4f0fx11,_0x4f0fx12){var _0x4f0fx22={where:{id:_0x4f0fx10[_0xc28a[55]][_0xc28a[28]][_0xc28a[93]](_0xc28a[92])},user:_0x4f0fx10[_0xc28a[32]],individualHooks:true};return FaxRoom[_0xc28a[60]](_0x4f0fx10[_0xc28a[69]],_0x4f0fx22)[_0xc28a[21]](function(_0x4f0fx23){if(!_0x4f0fx23){return _0x4f0fx11[_0xc28a[58]](404)};return _0x4f0fx23})[_0xc28a[21]](function(_0x4f0fx23){return _0x4f0fx11[_0xc28a[58]](200)})[_0xc28a[18]](function(_0x4f0fx13){return handleError(_0x4f0fx11,_0x4f0fx13)})};exports[_0xc28a[94]]= function(_0x4f0fx10,_0x4f0fx11){return sequelize[_0xc28a[22]](_0xc28a[97],{type:sequelize[_0xc28a[51]][_0xc28a[50]]})[_0xc28a[21]](function(_0x4f0fx24){var _0x4f0fx25=_[_0xc28a[38]]({new:0,open:0,pending:0,closed:0},_[_0xc28a[96]](_[_0xc28a[95]](_0x4f0fx24,_0xc28a[20]),_0xc28a[39]));return _0x4f0fx11[_0xc28a[20]](200)[_0xc28a[19]](_0x4f0fx25)})[_0xc28a[18]](function(_0x4f0fx13){return handleError(_0x4f0fx11,_0x4f0fx13)})};exports[_0xc28a[98]]= function(_0x4f0fx10,_0x4f0fx11,_0x4f0fx12){return FaxMessage[_0xc28a[31]](_0x4f0fx10[_0xc28a[55]][_0xc28a[28]])[_0xc28a[21]](function(_0x4f0fx1f){return _0x4f0fx1f[_0xc28a[99]]({include:[{model:FaxAccount},{model:FaxMessage,include:[{model:FaxAttachment},{model:User,attributes:[_0xc28a[28],_0xc28a[63],_0xc28a[64],_0xc28a[65]]}]},{model:User,attributes:[_0xc28a[28],_0xc28a[63],_0xc28a[64],_0xc28a[65]]}]})})[_0xc28a[21]](function(_0x4f0fx1d){return _0x4f0fx11[_0xc28a[19]](_0x4f0fx1d)})[_0xc28a[18]](function(_0x4f0fx13){return handleError(_0x4f0fx11,_0x4f0fx13)})}
\ No newline at end of file
+var _0xbe36=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72\x2E\x6A\x73","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x55\x73\x65\x72","\x43\x6F\x6E\x74\x61\x63\x74","\x46\x61\x78\x52\x6F\x6F\x6D","\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74","\x46\x61\x78\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x46\x61\x78\x51\x75\x65\x75\x65","\x46\x61\x78\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x64\x65\x66\x61\x75\x6C\x74","\x73\x63\x6F\x70\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x69\x64","\x6D\x61\x70","\x67\x65\x74\x46\x61\x78\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x66\x69\x6E\x64\x42\x79\x49\x64","\x75\x73\x65\x72","\x72\x6F\x6C\x65","\x70\x65\x6E\x64\x69\x6E\x67","\x50\x45\x4E\x44\x49\x4E\x47","\x64\x61\x79","\x73\x74\x61\x72\x74\x4F\x66","\x6D\x65\x72\x67\x65","\x63\x6F\x75\x6E\x74","\x61\x6C\x6C","\x6E\x65\x77","\x4E\x45\x57","\x6F\x70\x65\x6E","\x4F\x50\x45\x4E","\x63\x6C\x6F\x73\x65\x64","\x43\x4C\x4F\x53\x45\x44","\x69\x6E\x62\x6F\x78","\x53\x45\x4C\x45\x43\x54\x20\x60\x46\x61\x78\x52\x6F\x6F\x6D\x60\x2E\x60\x69\x64\x60\x2C\x20\x60\x46\x61\x78\x52\x6F\x6F\x6D\x60\x2E\x60\x66\x72\x6F\x6D\x60\x2C\x20\x60\x46\x61\x78\x52\x6F\x6F\x6D\x60\x2E\x60\x61\x63\x63\x6F\x75\x6E\x74\x60\x2C\x20\x60\x46\x61\x78\x52\x6F\x6F\x6D\x60\x2E\x60\x73\x74\x61\x74\x75\x73\x60\x2C\x20\x60\x46\x61\x78\x52\x6F\x6F\x6D\x60\x2E\x60\x6C\x61\x73\x74\x45\x76\x65\x6E\x74\x60\x2C\x20\x60\x46\x61\x78\x52\x6F\x6F\x6D\x60\x2E\x60\x75\x70\x64\x61\x74\x65\x64\x41\x74\x60\x20\x46\x52\x4F\x4D\x20\x60\x66\x61\x78\x5F\x72\x6F\x6F\x6D\x73\x60\x20\x41\x53\x20\x60\x46\x61\x78\x52\x6F\x6F\x6D\x60\x20\x4C\x45\x46\x54\x20\x4F\x55\x54\x45\x52\x20\x4A\x4F\x49\x4E\x20\x28\x60\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x66\x61\x78\x5F\x72\x6F\x6F\x6D\x73\x60\x20\x41\x53\x20\x60\x55\x73\x65\x72\x73\x2E\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x66\x61\x78\x5F\x72\x6F\x6F\x6D\x73\x60\x20\x49\x4E\x4E\x45\x52\x20\x4A\x4F\x49\x4E\x20\x60\x75\x73\x65\x72\x73\x60\x20\x41\x53\x20\x60\x55\x73\x65\x72\x73\x60\x20\x4F\x4E\x20\x60\x55\x73\x65\x72\x73\x60\x2E\x60\x69\x64\x60\x20\x3D\x20\x60\x55\x73\x65\x72\x73\x2E\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x66\x61\x78\x5F\x72\x6F\x6F\x6D\x73\x60\x2E\x60\x55\x73\x65\x72\x49\x64\x60\x29\x20\x4F\x4E\x20\x60\x46\x61\x78\x52\x6F\x6F\x6D\x60\x2E\x60\x69\x64\x60\x20\x3D\x20\x60\x55\x73\x65\x72\x73\x2E\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x66\x61\x78\x5F\x72\x6F\x6F\x6D\x73\x60\x2E\x60\x46\x61\x78\x52\x6F\x6F\x6D\x49\x64\x60\x20\x57\x48\x45\x52\x45\x20\x28\x60\x46\x61\x78\x52\x6F\x6F\x6D\x60\x2E\x60\x64\x65\x6C\x65\x74\x65\x64\x41\x74\x60\x20\x49\x53\x20\x4E\x55\x4C\x4C\x20\x41\x4E\x44\x20\x28\x60\x46\x61\x78\x52\x6F\x6F\x6D\x60\x2E\x60\x73\x74\x61\x74\x75\x73\x60\x20\x3D\x20\x3A\x73\x74\x61\x74\x75\x73\x20\x4F\x52\x20\x60\x55\x73\x65\x72\x73\x60\x2E\x60\x69\x64\x60\x20\x3D\x20\x3A\x69\x64\x29\x29","\x55\x4E\x4D\x41\x4E\x41\x47\x45\x44","\x53\x45\x4C\x45\x43\x54","\x51\x75\x65\x72\x79\x54\x79\x70\x65\x73","\x61\x67\x65\x6E\x74","\x53\x45\x4C\x45\x43\x54\x20\x60\x69\x64\x60\x2C\x20\x60\x66\x72\x6F\x6D\x60\x2C\x20\x60\x61\x63\x63\x6F\x75\x6E\x74\x60\x2C\x20\x60\x73\x74\x61\x74\x75\x73\x60\x2C\x20\x60\x6C\x61\x73\x74\x45\x76\x65\x6E\x74\x60\x20\x2C\x60\x75\x70\x64\x61\x74\x65\x64\x41\x74\x60\x20\x46\x52\x4F\x4D\x20\x60\x66\x61\x78\x5F\x72\x6F\x6F\x6D\x73\x60\x20\x57\x48\x45\x52\x45\x20\x60\x66\x61\x78\x5F\x72\x6F\x6F\x6D\x73\x60\x2E\x60\x64\x65\x6C\x65\x74\x65\x64\x41\x74\x60\x20\x49\x53\x20\x4E\x55\x4C\x4C","\x61\x67\x65\x6E\x74\x49\x6E\x64\x65\x78","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x41\x6C\x6C","\x6F\x70\x65\x6E\x52\x6F\x6F\x6D","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x61\x64\x64\x55\x73\x65\x72","\x75\x70\x64\x61\x74\x65","\x73\x68\x6F\x77","\x73\x68\x6F\x77\x41\x67\x65\x6E\x74\x73","\x6E\x61\x6D\x65","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x65\x6D\x61\x69\x6C","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x67\x65\x74\x55\x73\x65\x72\x73","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x63\x72\x65\x61\x74\x65\x4D\x65\x73\x73\x61\x67\x65","\x55\x73\x65\x72\x49\x64","\x46\x61\x78\x52\x6F\x6F\x6D\x49\x64","\x74\x65\x78\x74","\x66\x61\x78\x4D\x65\x73\x73\x61\x67\x65\x41\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x6D\x69","\x6C\x6F\x63\x61\x6C\x73","\x61\x70\x70","\x63\x68\x61\x6E\x67\x65\x64","\x66\x61\x78\x52\x6F\x6F\x6D\x41\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x6A\x6F\x62\x49\x64","\x46\x61\x78\x20\x61\x6C\x72\x65\x61\x64\x79\x20\x61\x73\x73\x69\x67\x6E\x65\x64","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65\x41\x67\x65\x6E\x74\x73","\x61\x67\x65\x6E\x74\x73","\x73\x65\x74\x55\x73\x65\x72\x73","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x75\x70\x64\x61\x74\x65\x50\x61\x74\x63\x68","\x2C","\x73\x70\x6C\x69\x74","\x67\x65\x74\x44\x61\x73\x68\x62\x6F\x61\x72\x64\x56\x61\x6C\x75\x65\x73","\x6B\x65\x79\x42\x79","\x6D\x61\x70\x56\x61\x6C\x75\x65\x73","\x53\x45\x4C\x45\x43\x54\x20\x4C\x4F\x57\x45\x52\x28\x73\x74\x61\x74\x75\x73\x29\x20\x41\x53\x20\x73\x74\x61\x74\x75\x73\x2C\x20\x43\x4F\x55\x4E\x54\x28\x69\x64\x29\x20\x41\x53\x20\x63\x6F\x75\x6E\x74\x20\x46\x52\x4F\x4D\x20\x66\x61\x78\x5F\x72\x6F\x6F\x6D\x73\x20\x57\x48\x45\x52\x45\x20\x64\x65\x6C\x65\x74\x65\x64\x41\x74\x20\x49\x53\x20\x4E\x55\x4C\x4C\x20\x47\x52\x4F\x55\x50\x20\x42\x59\x20\x73\x74\x61\x74\x75\x73","\x67\x65\x74\x52\x6F\x6F\x6D\x42\x79\x4D\x65\x73\x73\x61\x67\x65","\x67\x65\x74\x46\x61\x78\x52\x6F\x6F\x6D"];_0xbe36[0];var _=require(_0xbe36[1]);var util=require(_0xbe36[2]);var Util=require(_0xbe36[3]);var moment=require(_0xbe36[4]);var logger=require(_0xbe36[6])(_0xbe36[5]);var sequelize=require(_0xbe36[8])[_0xbe36[7]];var User=require(_0xbe36[8])[_0xbe36[9]];var Agent=require(_0xbe36[8])[_0xbe36[9]];var Contact=require(_0xbe36[8])[_0xbe36[10]];var FaxRoom=require(_0xbe36[8])[_0xbe36[11]];var FaxMessage=require(_0xbe36[8])[_0xbe36[12]];var FaxAccount=require(_0xbe36[8])[_0xbe36[13]];var FaxApplication=require(_0xbe36[8])[_0xbe36[14]];var FaxQueue=require(_0xbe36[8])[_0xbe36[15]];var FaxAttachment=require(_0xbe36[8])[_0xbe36[16]];exports[_0xbe36[17]]= function(_0x47f3x10,_0x47f3x11,_0x47f3x12){return FaxRoom[_0xbe36[26]](_0xbe36[25])[_0xbe36[24]](Util[_0xbe36[23]](_0x47f3x10[_0xbe36[22]]))[_0xbe36[21]](function(_0x47f3x14){return _0x47f3x11[_0xbe36[20]](200)[_0xbe36[19]](_0x47f3x14)})[_0xbe36[18]](function(_0x47f3x13){return handleError(_0x47f3x11,_0x47f3x13)})};exports[_0xbe36[27]]= function(_0x47f3x10,_0x47f3x11){return FaxRoom[_0xbe36[27]]()[_0xbe36[21]](function(_0x47f3x15){return _0x47f3x11[_0xbe36[20]](200)[_0xbe36[19]](_0x47f3x15)})[_0xbe36[18]](function(_0x47f3x13){return handleError(_0x47f3x11,_0x47f3x13)})};function getFaxQueues(_0x47f3x17){return function(){switch(_0x47f3x17[_0xbe36[33]]){case _0xbe36[32]:return User[_0xbe36[31]](_0x47f3x17[_0xbe36[28]],{attributes:[_0xbe36[28]]})[_0xbe36[21]](Util[_0xbe36[30]]({},{attributes:[_0xbe36[28]]}))[_0xbe36[21]](function(_0x47f3x18){return {include:{model:FaxAccount,include:{model:FaxApplication,include:{model:FaxQueue,where:{id:_[_0xbe36[29]](_0x47f3x18,_0xbe36[28])}}}}}});default:return {}}}}exports[_0xbe36[34]]= function(_0x47f3x10,_0x47f3x11){return Promise[_0xbe36[40]]([])[_0xbe36[21]](getFaxQueues(_0x47f3x10[_0xbe36[32]]))[_0xbe36[21]](function(_0x47f3x1a){return FaxRoom[_0xbe36[39]](_[_0xbe36[38]](Util[_0xbe36[23]](_0x47f3x10[_0xbe36[22]],{status:_0xbe36[35],updatedAt:{$gte:moment()[_0xbe36[37]](_0xbe36[36])}}),_0x47f3x1a))})[_0xbe36[21]](function(_0x47f3x19){return _0x47f3x11[_0xbe36[20]](200)[_0xbe36[19]]({value:_0x47f3x19})})[_0xbe36[18]](function(_0x47f3x13){return handleError(_0x47f3x11,_0x47f3x13)})};exports[_0xbe36[41]]= function(_0x47f3x10,_0x47f3x11){return Promise[_0xbe36[40]]([])[_0xbe36[21]](getFaxQueues(_0x47f3x10[_0xbe36[32]]))[_0xbe36[21]](function(_0x47f3x1a){return FaxRoom[_0xbe36[39]](_[_0xbe36[38]](Util[_0xbe36[23]](_0x47f3x10[_0xbe36[22]],{status:_0xbe36[42],updatedAt:{$gte:moment()[_0xbe36[37]](_0xbe36[36])}}),_0x47f3x1a))})[_0xbe36[21]](function(_0x47f3x19){return _0x47f3x11[_0xbe36[20]](200)[_0xbe36[19]]({value:_0x47f3x19})})[_0xbe36[18]](function(_0x47f3x13){return handleError(_0x47f3x11,_0x47f3x13)})};exports[_0xbe36[43]]= function(_0x47f3x10,_0x47f3x11){return Promise[_0xbe36[40]]([])[_0xbe36[21]](getFaxQueues(_0x47f3x10[_0xbe36[32]]))[_0xbe36[21]](function(_0x47f3x1a){return FaxRoom[_0xbe36[39]](_[_0xbe36[38]](Util[_0xbe36[23]](_0x47f3x10[_0xbe36[22]],{status:_0xbe36[44],updatedAt:{$gte:moment()[_0xbe36[37]](_0xbe36[36])}}),_0x47f3x1a))})[_0xbe36[21]](function(_0x47f3x19){return _0x47f3x11[_0xbe36[20]](200)[_0xbe36[19]]({value:_0x47f3x19})})[_0xbe36[18]](function(_0x47f3x13){return handleError(_0x47f3x11,_0x47f3x13)})};exports[_0xbe36[45]]= function(_0x47f3x10,_0x47f3x11){return Promise[_0xbe36[40]]([])[_0xbe36[21]](getFaxQueues(_0x47f3x10[_0xbe36[32]]))[_0xbe36[21]](function(_0x47f3x1a){return FaxRoom[_0xbe36[39]](_[_0xbe36[38]](Util[_0xbe36[23]](_0x47f3x10[_0xbe36[22]],{status:_0xbe36[46],updatedAt:{$gte:moment()[_0xbe36[37]](_0xbe36[36])}}),_0x47f3x1a))})[_0xbe36[21]](function(_0x47f3x19){return _0x47f3x11[_0xbe36[20]](200)[_0xbe36[19]]({value:_0x47f3x19})})[_0xbe36[18]](function(_0x47f3x13){return handleError(_0x47f3x11,_0x47f3x13)})};exports[_0xbe36[47]]= function(_0x47f3x10,_0x47f3x11,_0x47f3x12){switch(_0x47f3x10[_0xbe36[32]][_0xbe36[33]]){case _0xbe36[52]:return sequelize[_0xbe36[22]](_0xbe36[48],{replacements:{status:_0xbe36[49],id:_0x47f3x10[_0xbe36[32]][_0xbe36[28]]},type:sequelize[_0xbe36[51]][_0xbe36[50]]})[_0xbe36[21]](function(_0x47f3x14){return _0x47f3x11[_0xbe36[20]](200)[_0xbe36[19]](_0x47f3x14)})[_0xbe36[18]](function(_0x47f3x13){return handleError(_0x47f3x11,_0x47f3x13)});default:return sequelize[_0xbe36[22]](_0xbe36[53],{replacements:{status:_0xbe36[49],id:_0x47f3x10[_0xbe36[32]][_0xbe36[28]]},type:sequelize[_0xbe36[51]][_0xbe36[50]]})[_0xbe36[21]](function(_0x47f3x14){return _0x47f3x11[_0xbe36[20]](200)[_0xbe36[19]](_0x47f3x14)})[_0xbe36[18]](function(_0x47f3x13){return handleError(_0x47f3x11,_0x47f3x13)})}};exports[_0xbe36[54]]= function(_0x47f3x10,_0x47f3x11,_0x47f3x12){return FaxRoom[_0xbe36[56]]({where:{UserId:_0x47f3x10[_0xbe36[55]][_0xbe36[28]]},include:[{all:true}]})[_0xbe36[21]](function(_0x47f3x1b){return _0x47f3x11[_0xbe36[20]](200)[_0xbe36[19]](_0x47f3x1b)})[_0xbe36[18]](function(_0x47f3x13){return handleError(_0x47f3x11,_0x47f3x13)})};exports[_0xbe36[57]]= function(_0x47f3x10,_0x47f3x11,_0x47f3x12){var _0x47f3x1c;if(_0x47f3x10[_0xbe36[32]][_0xbe36[33]]=== _0xbe36[52]){return FaxRoom[_0xbe36[31]](_0x47f3x10[_0xbe36[55]][_0xbe36[28]])[_0xbe36[21]](function(_0x47f3x1d){_0x47f3x1c= _0x47f3x1d;if(!_0x47f3x1c){return _0x47f3x11[_0xbe36[58]](404)};return _0x47f3x1c[_0xbe36[60]]({status:_0xbe36[44]},{userId:_0x47f3x10[_0xbe36[32]][_0xbe36[28]]})})[_0xbe36[21]](function(){return _0x47f3x1c[_0xbe36[59]](_0x47f3x10[_0xbe36[32]][_0xbe36[28]])})[_0xbe36[21]](function(){return _0x47f3x11[_0xbe36[58]](200)})[_0xbe36[18]](function(_0x47f3x13){return handleError(_0x47f3x11,_0x47f3x13)})}};exports[_0xbe36[61]]= function(_0x47f3x10,_0x47f3x11,_0x47f3x12){return FaxRoom[_0xbe36[26]](_0xbe36[25])[_0xbe36[31]](_0x47f3x10[_0xbe36[55]][_0xbe36[28]])[_0xbe36[21]](function(_0x47f3x1d){if(!_0x47f3x1d){return _0x47f3x11[_0xbe36[58]](404)};return _0x47f3x11[_0xbe36[19]](_0x47f3x1d)})[_0xbe36[18]](function(_0x47f3x13){return handleError(_0x47f3x11,_0x47f3x13)})};exports[_0xbe36[62]]= function(_0x47f3x10,_0x47f3x11,_0x47f3x12){return FaxRoom[_0xbe36[31]](_0x47f3x10[_0xbe36[55]][_0xbe36[28]])[_0xbe36[21]](function(_0x47f3x1d){if(!_0x47f3x1d){return _0x47f3x11[_0xbe36[58]](404)};return _0x47f3x1d[_0xbe36[67]]({attributes:[_0xbe36[28],_0xbe36[63],_0xbe36[64],_0xbe36[65],_0xbe36[33],_0xbe36[66]]})})[_0xbe36[21]](function(_0x47f3x1e){return _0x47f3x11[_0xbe36[19]](_0x47f3x1e)})[_0xbe36[18]](function(_0x47f3x13){return handleError(_0x47f3x11,_0x47f3x13)})};exports[_0xbe36[68]]= function(_0x47f3x10,_0x47f3x11,_0x47f3x12){return FaxRoom[_0xbe36[68]](_0x47f3x10[_0xbe36[69]])[_0xbe36[21]](function(_0x47f3x1d){return _0x47f3x11[_0xbe36[20]](201)[_0xbe36[19]](_0x47f3x1d)})[_0xbe36[18]](function(_0x47f3x13){return handleError(_0x47f3x11,_0x47f3x13)})};exports[_0xbe36[70]]= function(_0x47f3x10,_0x47f3x11,_0x47f3x12){_0x47f3x10[_0xbe36[69]][_0xbe36[71]]= _0x47f3x10[_0xbe36[32]][_0xbe36[28]];_0x47f3x10[_0xbe36[69]][_0xbe36[72]]= _0x47f3x10[_0xbe36[55]][_0xbe36[28]];_0x47f3x10[_0xbe36[69]][_0xbe36[73]]= _0x47f3x10[_0xbe36[69]][_0xbe36[73]];return FaxMessage[_0xbe36[68]](_0x47f3x10[_0xbe36[69]],{include:[{model:FaxAttachment}],user:_0x47f3x10[_0xbe36[32]]})[_0xbe36[21]](function(_0x47f3x1f){if(_0x47f3x1f){_0x47f3x10[_0xbe36[77]][_0xbe36[76]][_0xbe36[75]][_0xbe36[19]]({message:_0xbe36[74],doc:_0x47f3x1f,options:{user:_0x47f3x10[_0xbe36[32]]}})};return _0x47f3x11[_0xbe36[20]](201)[_0xbe36[19]](_0x47f3x1f)})[_0xbe36[18]](function(_0x47f3x13){return handleError(_0x47f3x11,_0x47f3x13)})};exports[_0xbe36[60]]= function(_0x47f3x10,_0x47f3x11,_0x47f3x12){return FaxRoom[_0xbe36[31]](_0x47f3x10[_0xbe36[55]][_0xbe36[28]])[_0xbe36[21]](function(_0x47f3x1d){if(!_0x47f3x1d){return _0x47f3x11[_0xbe36[58]](404)};if(_0x47f3x1d[_0xbe36[80]]){throw  new Error(_0xbe36[81])};var _0x47f3x20=_[_0xbe36[38]](_0x47f3x1d,_0x47f3x10[_0xbe36[69]]);return _0x47f3x20[_0xbe36[82]]()})[_0xbe36[21]](function(_0x47f3x1d){if(_0x47f3x1d[_0xbe36[78]](_0xbe36[20])&& _0x47f3x1d[_0xbe36[20]]=== _0xbe36[46]){_0x47f3x10[_0xbe36[77]][_0xbe36[76]][_0xbe36[75]][_0xbe36[19]]({message:_0xbe36[79],doc:_0x47f3x1d})};return _0x47f3x11[_0xbe36[20]](200)[_0xbe36[19]](_0x47f3x1d)})[_0xbe36[18]](function(_0x47f3x13){return handleError(_0x47f3x11,_0x47f3x13)})};exports[_0xbe36[83]]= function(_0x47f3x10,_0x47f3x11,_0x47f3x12){return FaxRoom[_0xbe36[31]](_0x47f3x10[_0xbe36[55]][_0xbe36[28]])[_0xbe36[21]](function(_0x47f3x1d){if(!_0x47f3x1d){return _0x47f3x11[_0xbe36[58]](404)};return _0x47f3x1d[_0xbe36[85]](_0x47f3x10[_0xbe36[69]][_0xbe36[84]],{individualHooks:true})})[_0xbe36[21]](function(){return _0x47f3x11[_0xbe36[58]](200)})[_0xbe36[18]](function(_0x47f3x13){return handleError(_0x47f3x11,_0x47f3x13)})};exports[_0xbe36[86]]= function(_0x47f3x10,_0x47f3x11,_0x47f3x12){return FaxRoom[_0xbe36[31]](_0x47f3x10[_0xbe36[55]][_0xbe36[28]])[_0xbe36[21]](function(_0x47f3x1d){if(!_0x47f3x1d){return _0x47f3x11[_0xbe36[58]](404)};return _0x47f3x1d[_0xbe36[86]]()})[_0xbe36[21]](function(){return _0x47f3x11[_0xbe36[58]](204)})[_0xbe36[18]](function(_0x47f3x13){return handleError(_0x47f3x11,_0x47f3x13)})};exports[_0xbe36[87]]= function(_0x47f3x10,_0x47f3x11){return FaxRoom[_0xbe36[86]]({where:{id:_0x47f3x10[_0xbe36[22]][_0xbe36[88]]},individualHooks:true})[_0xbe36[21]](function(){return _0x47f3x11[_0xbe36[58]](200)})[_0xbe36[18]](function(_0x47f3x13){return handleError(_0x47f3x11,_0x47f3x13)})};function handleError(_0x47f3x11,_0x47f3x13){logger[_0xbe36[90]](_0x47f3x13[_0xbe36[89]]);return _0x47f3x11[_0xbe36[20]](500)[_0xbe36[19]](_0x47f3x13)}exports[_0xbe36[91]]= function(_0x47f3x10,_0x47f3x11,_0x47f3x12){var _0x47f3x22={where:{id:_0x47f3x10[_0xbe36[55]][_0xbe36[28]][_0xbe36[93]](_0xbe36[92])},user:_0x47f3x10[_0xbe36[32]],individualHooks:true};return FaxRoom[_0xbe36[60]](_0x47f3x10[_0xbe36[69]],_0x47f3x22)[_0xbe36[21]](function(_0x47f3x23){if(!_0x47f3x23){return _0x47f3x11[_0xbe36[58]](404)};return _0x47f3x23})[_0xbe36[21]](function(_0x47f3x23){return _0x47f3x11[_0xbe36[58]](200)})[_0xbe36[18]](function(_0x47f3x13){return handleError(_0x47f3x11,_0x47f3x13)})};exports[_0xbe36[94]]= function(_0x47f3x10,_0x47f3x11){return sequelize[_0xbe36[22]](_0xbe36[97],{type:sequelize[_0xbe36[51]][_0xbe36[50]]})[_0xbe36[21]](function(_0x47f3x24){var _0x47f3x25=_[_0xbe36[38]]({new:0,open:0,pending:0,closed:0},_[_0xbe36[96]](_[_0xbe36[95]](_0x47f3x24,_0xbe36[20]),_0xbe36[39]));return _0x47f3x11[_0xbe36[20]](200)[_0xbe36[19]](_0x47f3x25)})[_0xbe36[18]](function(_0x47f3x13){return handleError(_0x47f3x11,_0x47f3x13)})};exports[_0xbe36[98]]= function(_0x47f3x10,_0x47f3x11,_0x47f3x12){return FaxMessage[_0xbe36[31]](_0x47f3x10[_0xbe36[55]][_0xbe36[28]])[_0xbe36[21]](function(_0x47f3x1f){return _0x47f3x1f[_0xbe36[99]]({include:[{model:FaxAccount},{model:FaxMessage,include:[{model:FaxAttachment},{model:User,attributes:[_0xbe36[28],_0xbe36[63],_0xbe36[64],_0xbe36[65]]}]},{model:User,attributes:[_0xbe36[28],_0xbe36[63],_0xbe36[64],_0xbe36[65]]}]})})[_0xbe36[21]](function(_0x47f3x1d){return _0x47f3x11[_0xbe36[19]](_0x47f3x1d)})[_0xbe36[18]](function(_0x47f3x13){return handleError(_0x47f3x11,_0x47f3x13)})}
\ No newline at end of file