Built motion from commit 2238b68.|1.0.18
[motion.git] / server / config / agi / lib / rpc / index.js
index e8d55e9..abddbee 100644 (file)
@@ -1 +1 @@
-var _0x2ebe=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x6F\x6D\x65\x6E\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x53\x71\x75\x61\x72\x65\x50\x72\x6F\x6A\x65\x63\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x56\x61\x72\x69\x61\x62\x6C\x65","\x53\x71\x75\x61\x72\x65\x4F\x64\x62\x63","\x55\x73\x65\x72","\x54\x72\x75\x6E\x6B","\x53\x6F\x75\x6E\x64","\x49\x6E\x74\x65\x72\x76\x61\x6C","\x52\x65\x70\x6F\x72\x74\x53\x71\x75\x61\x72\x65\x44\x65\x74\x61\x69\x6C","\x52\x65\x70\x6F\x72\x74\x53\x71\x75\x61\x72\x65","\x53\x71\x75\x61\x72\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x54\x65\x6D\x70\x6C\x61\x74\x65","\x53\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74","\x43\x6F\x6E\x74\x61\x63\x74","\x65\x78\x70\x6F\x72\x74\x73","\x70\x72\x6F\x64\x75\x63\x74\x69\x6F\x6E","\x66\x69\x6E\x64","\x6E\x61\x6D\x65","\x64\x73\x6E","\x73\x61\x76\x65\x5F\x6E\x61\x6D\x65","\x73\x75\x62\x69\x6E\x74\x65\x72\x76\x61\x6C\x73","\x73\x63\x6F\x70\x65","\x63\x72\x65\x61\x74\x65","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x61\x72\x67\x5F\x31","\x61\x72\x67\x5F\x32","","\x6D\x65\x72\x67\x65","\x75\x70\x64\x61\x74\x65","\x6C\x6F\x63\x61\x6C\x73\x74\x61\x74\x69\x6F\x6E\x69\x64","\x69\x64","\x61\x64\x64\x72\x65\x73\x73","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x63\x72\x65\x61\x74\x65\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x73\x65\x6E\x64","\x72\x65\x73\x6F\x6C\x76\x65","\x63\x72\x65\x61\x74\x65\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65","\x73\x75\x62\x6A\x65\x63\x74","\x68\x74\x6D\x6C","\x74\x79\x70\x65","\x70\x68\x6F\x6E\x65","\x63\x72\x65\x61\x74\x65\x53\x6D\x73\x4D\x65\x73\x73\x61\x67\x65","\x6D\x69\x6E\x75\x74\x65\x73","\x61\x64\x64"];_0x2ebe[0];var BPromise=require(_0x2ebe[1]);var moment=require(_0x2ebe[2]);var _=require(_0x2ebe[3]);var util=require(_0x2ebe[4]);var SquareProject=require(_0x2ebe[6])[_0x2ebe[5]];var VoiceQueue=require(_0x2ebe[6])[_0x2ebe[7]];var Variable=require(_0x2ebe[6])[_0x2ebe[8]];var SquareOdbc=require(_0x2ebe[6])[_0x2ebe[9]];var User=require(_0x2ebe[6])[_0x2ebe[10]];var Trunk=require(_0x2ebe[6])[_0x2ebe[11]];var Sound=require(_0x2ebe[6])[_0x2ebe[12]];var Interval=require(_0x2ebe[6])[_0x2ebe[13]];var ReportSquareDetail=require(_0x2ebe[6])[_0x2ebe[14]];var ReportSquare=require(_0x2ebe[6])[_0x2ebe[15]];var SquareRecording=require(_0x2ebe[6])[_0x2ebe[16]];var MailServerOut=require(_0x2ebe[6])[_0x2ebe[17]];var MailAccount=require(_0x2ebe[6])[_0x2ebe[18]];var Template=require(_0x2ebe[6])[_0x2ebe[19]];var SmsAccount=require(_0x2ebe[6])[_0x2ebe[20]];var FaxAccount=require(_0x2ebe[6])[_0x2ebe[21]];var Contact=require(_0x2ebe[6])[_0x2ebe[22]];module[_0x2ebe[23]]= function(){return {getSquareProject:function(_0x6b74x16){return SquareProject[_0x2ebe[25]]({where:{name:_0x6b74x16},attributes:[_0x2ebe[24]]})},getSquareProjectById:function(_0x6b74x17){return SquareProject[_0x2ebe[25]]({where:{id:_0x6b74x17},attributes:[_0x2ebe[26]]})},getVoiceQueueById:function(_0x6b74x17){return VoiceQueue[_0x2ebe[25]]({where:{id:_0x6b74x17},attributes:[_0x2ebe[26]]})},getVariableById:function(_0x6b74x17){return Variable[_0x2ebe[25]]({where:{id:_0x6b74x17},attributes:[_0x2ebe[26]]})},getSquareOdbcById:function(_0x6b74x17){return SquareOdbc[_0x2ebe[25]]({where:{id:_0x6b74x17},attributes:[_0x2ebe[27]]})},getUserById:function(_0x6b74x17){return User[_0x2ebe[25]]({where:{id:_0x6b74x17},attributes:[_0x2ebe[26]],raw:true})},getTrunkById:function(_0x6b74x17){return Trunk[_0x2ebe[25]]({where:{id:_0x6b74x17},attributes:[_0x2ebe[26]],raw:true})},getSoundById:function(_0x6b74x17){return Sound[_0x2ebe[25]]({where:{id:_0x6b74x17},attributes:[_0x2ebe[28]],raw:true})},getIntervalById:function(_0x6b74x17){return Interval[_0x2ebe[30]](_0x2ebe[29])[_0x2ebe[25]]({where:{id:_0x6b74x17}})},createSquareDetailsReport:function(_0x6b74x18){return ReportSquareDetail[_0x2ebe[31]](_0x6b74x18,{raw:true})},createSquareReport:function(_0x6b74x18){return ReportSquare[_0x2ebe[31]](_[_0x2ebe[37]](_0x6b74x18,{joinAt:moment()[_0x2ebe[33]](_0x2ebe[32]),project_name:_0x6b74x18[_0x2ebe[34]],prev_project_name:_0x6b74x18[_0x2ebe[35]]|| _0x2ebe[36],is_subproject:_0x6b74x18[_0x2ebe[35]]?true:false}),{raw:true})},updateSquareReport:function(_0x6b74x19,_0x6b74x1a){return ReportSquare[_0x2ebe[38]]({leaveAt:moment()[_0x2ebe[33]](_0x2ebe[32])},{where:{uniqueid:_0x6b74x19,project_name:_0x6b74x1a,leaveAt:null},raw:true,individualHooks:true})},createSquareRecording:function(_0x6b74x18){return SquareRecording[_0x2ebe[31]](_0x6b74x18,{raw:true})},getFaxAccountNumberById:function(_0x6b74x17){return FaxAccount[_0x2ebe[25]]({where:{id:_0x6b74x17},attributes:[_0x2ebe[39]]})},getMailServerOutById:function(_0x6b74x17){return MailAccount[_0x2ebe[25]]({attributes:[_0x2ebe[40],_0x2ebe[41]],include:[{model:MailServerOut,attributes:[_0x2ebe[40],_0x2ebe[42]],where:{id:_0x6b74x17}}]})},createMailMessage:function(_0x6b74x18){process[_0x2ebe[44]]({message:_0x2ebe[43],doc:_0x6b74x18});return BPromise[_0x2ebe[45]]()},createFaxMessage:function(_0x6b74x18){process[_0x2ebe[44]]({message:_0x2ebe[46],doc:_0x6b74x18});return BPromise[_0x2ebe[45]]()},getTemplateById:function(_0x6b74x17){return Template[_0x2ebe[25]]({where:{id:_0x6b74x17},attributes:[_0x2ebe[47],_0x2ebe[48]]})},getSmsAccountById:function(_0x6b74x17){return SmsAccount[_0x2ebe[25]]({where:{id:_0x6b74x17},attributes:[_0x2ebe[49],_0x2ebe[50]]})},createSmsMessage:function(_0x6b74x18){process[_0x2ebe[44]]({message:_0x2ebe[51],doc:_0x6b74x18});return BPromise[_0x2ebe[45]]()},callbackContact:function(_0x6b74x1b,_0x6b74x16,_0x6b74x1c,_0x6b74x1d,_0x6b74x1e,_0x6b74x1f){return Contact[_0x2ebe[31]]({ListId:_0x6b74x1b,firstName:_0x6b74x16,lastName:_0x6b74x1c,phone:_0x6b74x1d,description:_0x6b74x1e,planningtime:moment()[_0x2ebe[53]](_0x6b74x1f|| 5,_0x2ebe[52])[_0x2ebe[33]](_0x2ebe[32])},{raw:true})}}}
\ No newline at end of file
+var _0x8e47=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x6F\x6D\x65\x6E\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x53\x71\x75\x61\x72\x65\x50\x72\x6F\x6A\x65\x63\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x56\x61\x72\x69\x61\x62\x6C\x65","\x53\x71\x75\x61\x72\x65\x4F\x64\x62\x63","\x55\x73\x65\x72","\x54\x72\x75\x6E\x6B","\x53\x6F\x75\x6E\x64","\x49\x6E\x74\x65\x72\x76\x61\x6C","\x52\x65\x70\x6F\x72\x74\x53\x71\x75\x61\x72\x65\x44\x65\x74\x61\x69\x6C","\x52\x65\x70\x6F\x72\x74\x53\x71\x75\x61\x72\x65","\x53\x71\x75\x61\x72\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x54\x65\x6D\x70\x6C\x61\x74\x65","\x53\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74","\x43\x6F\x6E\x74\x61\x63\x74","\x65\x78\x70\x6F\x72\x74\x73","\x70\x72\x6F\x64\x75\x63\x74\x69\x6F\x6E","\x66\x69\x6E\x64","\x6E\x61\x6D\x65","\x64\x73\x6E","\x73\x61\x76\x65\x5F\x6E\x61\x6D\x65","\x73\x75\x62\x69\x6E\x74\x65\x72\x76\x61\x6C\x73","\x73\x63\x6F\x70\x65","\x63\x72\x65\x61\x74\x65","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x61\x72\x67\x5F\x31","\x61\x72\x67\x5F\x32","","\x6D\x65\x72\x67\x65","\x75\x70\x64\x61\x74\x65","\x6C\x6F\x63\x61\x6C\x73\x74\x61\x74\x69\x6F\x6E\x69\x64","\x69\x64","\x61\x64\x64\x72\x65\x73\x73","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x63\x72\x65\x61\x74\x65\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x73\x65\x6E\x64","\x72\x65\x73\x6F\x6C\x76\x65","\x63\x72\x65\x61\x74\x65\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65","\x73\x75\x62\x6A\x65\x63\x74","\x68\x74\x6D\x6C","\x74\x79\x70\x65","\x70\x68\x6F\x6E\x65","\x63\x72\x65\x61\x74\x65\x53\x6D\x73\x4D\x65\x73\x73\x61\x67\x65","\x6D\x69\x6E\x75\x74\x65\x73","\x61\x64\x64"];_0x8e47[0];var BPromise=require(_0x8e47[1]);var moment=require(_0x8e47[2]);var _=require(_0x8e47[3]);var util=require(_0x8e47[4]);var SquareProject=require(_0x8e47[6])[_0x8e47[5]];var VoiceQueue=require(_0x8e47[6])[_0x8e47[7]];var Variable=require(_0x8e47[6])[_0x8e47[8]];var SquareOdbc=require(_0x8e47[6])[_0x8e47[9]];var User=require(_0x8e47[6])[_0x8e47[10]];var Trunk=require(_0x8e47[6])[_0x8e47[11]];var Sound=require(_0x8e47[6])[_0x8e47[12]];var Interval=require(_0x8e47[6])[_0x8e47[13]];var ReportSquareDetail=require(_0x8e47[6])[_0x8e47[14]];var ReportSquare=require(_0x8e47[6])[_0x8e47[15]];var SquareRecording=require(_0x8e47[6])[_0x8e47[16]];var MailServerOut=require(_0x8e47[6])[_0x8e47[17]];var MailAccount=require(_0x8e47[6])[_0x8e47[18]];var Template=require(_0x8e47[6])[_0x8e47[19]];var SmsAccount=require(_0x8e47[6])[_0x8e47[20]];var FaxAccount=require(_0x8e47[6])[_0x8e47[21]];var Contact=require(_0x8e47[6])[_0x8e47[22]];module[_0x8e47[23]]= function(){return {getSquareProject:function(_0x9720x16){return SquareProject[_0x8e47[25]]({where:{name:_0x9720x16},attributes:[_0x8e47[24]]})},getSquareProjectById:function(_0x9720x17){return SquareProject[_0x8e47[25]]({where:{id:_0x9720x17},attributes:[_0x8e47[26]]})},getVoiceQueueById:function(_0x9720x17){return VoiceQueue[_0x8e47[25]]({where:{id:_0x9720x17},attributes:[_0x8e47[26]]})},getVariableById:function(_0x9720x17){return Variable[_0x8e47[25]]({where:{id:_0x9720x17},attributes:[_0x8e47[26]]})},getSquareOdbcById:function(_0x9720x17){return SquareOdbc[_0x8e47[25]]({where:{id:_0x9720x17},attributes:[_0x8e47[27]]})},getUserById:function(_0x9720x17){return User[_0x8e47[25]]({where:{id:_0x9720x17},attributes:[_0x8e47[26]],raw:true})},getTrunkById:function(_0x9720x17){return Trunk[_0x8e47[25]]({where:{id:_0x9720x17},attributes:[_0x8e47[26]],raw:true})},getSoundById:function(_0x9720x17){return Sound[_0x8e47[25]]({where:{id:_0x9720x17},attributes:[_0x8e47[28]],raw:true})},getIntervalById:function(_0x9720x17){return Interval[_0x8e47[30]](_0x8e47[29])[_0x8e47[25]]({where:{id:_0x9720x17}})},createSquareDetailsReport:function(_0x9720x18){return ReportSquareDetail[_0x8e47[31]](_0x9720x18,{raw:true})},createSquareReport:function(_0x9720x18){return ReportSquare[_0x8e47[31]](_[_0x8e47[37]](_0x9720x18,{joinAt:moment()[_0x8e47[33]](_0x8e47[32]),project_name:_0x9720x18[_0x8e47[34]],prev_project_name:_0x9720x18[_0x8e47[35]]|| _0x8e47[36],is_subproject:_0x9720x18[_0x8e47[35]]?true:false}),{raw:true})},updateSquareReport:function(_0x9720x19,_0x9720x1a){return ReportSquare[_0x8e47[38]]({leaveAt:moment()[_0x8e47[33]](_0x8e47[32])},{where:{uniqueid:_0x9720x19,project_name:_0x9720x1a,leaveAt:null},raw:true,individualHooks:true})},createSquareRecording:function(_0x9720x18){return SquareRecording[_0x8e47[31]](_0x9720x18,{raw:true})},getFaxAccountNumberById:function(_0x9720x17){return FaxAccount[_0x8e47[25]]({where:{id:_0x9720x17},attributes:[_0x8e47[39]]})},getMailServerOutById:function(_0x9720x17){return MailAccount[_0x8e47[25]]({attributes:[_0x8e47[40],_0x8e47[41]],include:[{model:MailServerOut,attributes:[_0x8e47[40],_0x8e47[42]],where:{id:_0x9720x17}}]})},createMailMessage:function(_0x9720x18){process[_0x8e47[44]]({message:_0x8e47[43],doc:_0x9720x18});return BPromise[_0x8e47[45]]()},createFaxMessage:function(_0x9720x18){process[_0x8e47[44]]({message:_0x8e47[46],doc:_0x9720x18});return BPromise[_0x8e47[45]]()},getTemplateById:function(_0x9720x17){return Template[_0x8e47[25]]({where:{id:_0x9720x17},attributes:[_0x8e47[47],_0x8e47[48]]})},getSmsAccountById:function(_0x9720x17){return SmsAccount[_0x8e47[25]]({where:{id:_0x9720x17},attributes:[_0x8e47[49],_0x8e47[50]]})},createSmsMessage:function(_0x9720x18){process[_0x8e47[44]]({message:_0x8e47[51],doc:_0x9720x18});return BPromise[_0x8e47[45]]()},callbackContact:function(_0x9720x1b,_0x9720x16,_0x9720x1c,_0x9720x1d,_0x9720x1e,_0x9720x1f){return Contact[_0x8e47[31]]({ListId:_0x9720x1b,firstName:_0x9720x16,lastName:_0x9720x1c,phone:_0x9720x1d,description:_0x9720x1e,planningtime:moment()[_0x8e47[53]](_0x9720x1f|| 5,_0x8e47[52])[_0x8e47[33]](_0x8e47[32])},{raw:true})}}}
\ No newline at end of file