Built motion from commit 709aa6fb5ed03aa61bc373fcdbf622215d37d30b. Version 3.0.0...
[motion-next.git] / server / services / agi / scripts / sestek / nda / index.js
index 951db4e..f646b99 100644 (file)
@@ -1 +1 @@
-const a1043_0x4f9d=['custom_action','dnid','ndauth_url','../../../../../config/logger','custom_action_data','extension','ndagenerate_audio','/api/NaturalDialogAssistant/v1/Run','channelData','callerid','toString','ndaactivity_type','POST','AudioOutputSettings','URL','uniqueid','CustomActionData','request-promise-native','text','password','username','/token','message','ndassistant_url','Nda','body','project','ProjectName','access_token','audio/wav','url','calleridname','then'];(function(_0x1fd365,_0x4f9d21){const _0x4f5768=function(_0x480f6b){while(--_0x480f6b){_0x1fd365['push'](_0x1fd365['shift']());}};_0x4f5768(++_0x4f9d21);}(a1043_0x4f9d,0x13e));const a1043_0x4f57=function(_0x1fd365,_0x4f9d21){_0x1fd365=_0x1fd365-0x0;let _0x4f5768=a1043_0x4f9d[_0x1fd365];return _0x4f5768;};const _0xac3c97=a1043_0x4f57;'use strict';const rp=require(_0xac3c97('0x1d')),url=require(_0xac3c97('0x9')),logger=require(_0xac3c97('0xf'))('agi');module['exports']=function(_0x480f6b,_0x59e401){const _0x300c6f=_0xac3c97,_0x904b90=new url[(_0x300c6f('0x1a'))](_0x300c6f('0x0'),_0x59e401[_0x300c6f('0xe')])['toString'](),_0x2b07bd={'method':_0x300c6f('0x18'),'uri':_0x904b90,'form':{'grant_type':'password','username':_0x59e401[_0x300c6f('0x20')],'password':_0x59e401[_0x300c6f('0x1f')]},'json':!![]};return rp(_0x2b07bd)[_0x300c6f('0xb')](function(_0x5740f0){const _0x58d031=_0x300c6f,_0x186e25=new url[(_0x58d031('0x1a'))](_0x58d031('0x13'),_0x59e401[_0x58d031('0x2')])[_0x58d031('0x16')](),_0xb21dcc={'method':'POST','uri':_0x186e25,'body':{'type':_0x59e401[_0x58d031('0x17')]||_0x58d031('0x1'),'channelId':_0x58d031('0x3'),'conversation':{'id':_0x480f6b[_0x58d031('0x1b')]},'from':{'id':_0x480f6b[_0x58d031('0x15')],'name':_0x480f6b[_0x58d031('0xa')]},'recipient':{'id':_0x480f6b[_0x58d031('0xd')],'name':_0x480f6b[_0x58d031('0x11')]},'text':_0x59e401[_0x58d031('0x1e')],'channelData':{}},'headers':{'Authorization':'Bearer\x20'+_0x5740f0[_0x58d031('0x7')]},'json':!![]};return _0x59e401['project']&&(_0xb21dcc['body']['channelData'][_0x58d031('0x6')]=_0x59e401[_0x58d031('0x5')]),_0x59e401[_0x58d031('0x12')]=='1'&&(_0xb21dcc[_0x58d031('0x4')][_0x58d031('0x14')][_0x58d031('0x19')]={'Generate':!![],'PutInStructuredPart':![],'ExpectedFormat':_0x58d031('0x8')}),_0x59e401[_0x58d031('0xc')]&&(_0xb21dcc[_0x58d031('0x4')][_0x58d031('0x14')]['CustomAction']=_0x59e401[_0x58d031('0xc')],_0x59e401[_0x58d031('0x10')]&&(_0xb21dcc[_0x58d031('0x4')][_0x58d031('0x14')][_0x58d031('0x1c')]=_0x59e401[_0x58d031('0x10')])),logger['info'](JSON['stringify'](_0xb21dcc)),rp(_0xb21dcc);});};
\ No newline at end of file
+const a1043_0x59b3=['username','POST','URL','ndaactivity_type','/api/NaturalDialogAssistant/v1/Run','info','password','uniqueid','custom_action','project','message','custom_action_data','toString','ndassistant_url','ndagenerate_audio','url','body','callerid','exports','../../../../../config/logger','AudioOutputSettings','/token','then','CustomAction','request-promise-native','dnid','Bearer\x20','text','audio/wav','channelData'];(function(_0x36225a,_0x59b366){const _0x11066b=function(_0x31208f){while(--_0x31208f){_0x36225a['push'](_0x36225a['shift']());}};_0x11066b(++_0x59b366);}(a1043_0x59b3,0xe6));const a1043_0x1106=function(_0x36225a,_0x59b366){_0x36225a=_0x36225a-0x0;let _0x11066b=a1043_0x59b3[_0x36225a];return _0x11066b;};const _0x2ab4e8=a1043_0x1106;'use strict';const rp=require(_0x2ab4e8('0x4')),url=require(_0x2ab4e8('0x19')),logger=require(_0x2ab4e8('0x1d'))('agi');module[_0x2ab4e8('0x1c')]=function(_0x31208f,_0x44d204){const _0x3fbd0a=_0x2ab4e8,_0x86bc29=new url[(_0x3fbd0a('0xc'))](_0x3fbd0a('0x1'),_0x44d204['ndauth_url'])[_0x3fbd0a('0x16')](),_0x31b64c={'method':_0x3fbd0a('0xb'),'uri':_0x86bc29,'form':{'grant_type':_0x3fbd0a('0x10'),'username':_0x44d204[_0x3fbd0a('0xa')],'password':_0x44d204[_0x3fbd0a('0x10')]},'json':!![]};return rp(_0x31b64c)[_0x3fbd0a('0x2')](function(_0x4f0068){const _0x5edcad=_0x3fbd0a,_0x2c1d58=new url[(_0x5edcad('0xc'))](_0x5edcad('0xe'),_0x44d204[_0x5edcad('0x17')])[_0x5edcad('0x16')](),_0x38169d={'method':_0x5edcad('0xb'),'uri':_0x2c1d58,'body':{'type':_0x44d204[_0x5edcad('0xd')]||_0x5edcad('0x14'),'channelId':'Nda','conversation':{'id':_0x31208f[_0x5edcad('0x11')]},'from':{'id':_0x31208f[_0x5edcad('0x1b')],'name':_0x31208f['calleridname']},'recipient':{'id':_0x31208f[_0x5edcad('0x5')],'name':_0x31208f['extension']},'text':_0x44d204[_0x5edcad('0x7')],'channelData':{}},'headers':{'Authorization':_0x5edcad('0x6')+_0x4f0068['access_token']},'json':!![]};return _0x44d204[_0x5edcad('0x13')]&&(_0x38169d[_0x5edcad('0x1a')][_0x5edcad('0x9')]['ProjectName']=_0x44d204[_0x5edcad('0x13')]),_0x44d204[_0x5edcad('0x18')]=='1'&&(_0x38169d[_0x5edcad('0x1a')]['channelData'][_0x5edcad('0x0')]={'Generate':!![],'PutInStructuredPart':![],'ExpectedFormat':_0x5edcad('0x8')}),_0x44d204[_0x5edcad('0x12')]&&(_0x38169d[_0x5edcad('0x1a')][_0x5edcad('0x9')][_0x5edcad('0x3')]=_0x44d204[_0x5edcad('0x12')],_0x44d204['custom_action_data']&&(_0x38169d['body'][_0x5edcad('0x9')]['CustomActionData']=_0x44d204[_0x5edcad('0x15')])),logger[_0x5edcad('0xf')](JSON['stringify'](_0x38169d)),rp(_0x38169d);});};
\ No newline at end of file