Built motion from commit (unavailable).|2.4.4
[motion2.git] / server / services / agi / scripts / sestek / nda / index.js
index a0da938..21740e7 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x029b=['CustomAction','CustomActionData','custom_action_data','info','stringify','request-promise','url','../../../../../config/logger','agi','exports','POST','resolve','ndauth_url','/token','password','username','then','ndassistant_url','/api/NaturalDialogAssistant/v1/Run','ndaactivity_type','message','Nda','uniqueid','calleridname','dnid','extension','text','Bearer\x20','access_token','project','channelData','ProjectName','ndagenerate_audio','body','audio/wav','custom_action'];(function(_0x29d94e,_0xf386d6){var _0x106237=function(_0x327501){while(--_0x327501){_0x29d94e['push'](_0x29d94e['shift']());}};_0x106237(++_0xf386d6);}(_0x029b,0x1b5));var _0xb029=function(_0x2e2f97,_0xbbcc19){_0x2e2f97=_0x2e2f97-0x0;var _0x263ae5=_0x029b[_0x2e2f97];return _0x263ae5;};'use strict';var rp=require(_0xb029('0x0'));var url=require(_0xb029('0x1'));var logger=require(_0xb029('0x2'))(_0xb029('0x3'));module[_0xb029('0x4')]=function(_0x3c8f17,_0x420298){var _0x248215={'method':_0xb029('0x5'),'uri':url[_0xb029('0x6')](_0x420298[_0xb029('0x7')],_0xb029('0x8')),'form':{'grant_type':_0xb029('0x9'),'username':_0x420298[_0xb029('0xa')],'password':_0x420298['password']},'json':!![]};return rp(_0x248215)[_0xb029('0xb')](function(_0x48c474){var _0x315024={'method':_0xb029('0x5'),'uri':url[_0xb029('0x6')](_0x420298[_0xb029('0xc')],_0xb029('0xd')),'body':{'type':_0x420298[_0xb029('0xe')]||_0xb029('0xf'),'channelId':_0xb029('0x10'),'conversation':{'id':_0x3c8f17[_0xb029('0x11')]},'from':{'id':_0x3c8f17['callerid'],'name':_0x3c8f17[_0xb029('0x12')]},'recipient':{'id':_0x3c8f17[_0xb029('0x13')],'name':_0x3c8f17[_0xb029('0x14')]},'text':_0x420298[_0xb029('0x15')],'channelData':{}},'headers':{'Authorization':_0xb029('0x16')+_0x48c474[_0xb029('0x17')]},'json':!![]};if(_0x420298[_0xb029('0x18')]){_0x315024['body'][_0xb029('0x19')][_0xb029('0x1a')]=_0x420298[_0xb029('0x18')];}if(_0x420298[_0xb029('0x1b')]=='1'){_0x315024[_0xb029('0x1c')][_0xb029('0x19')]['AudioOutputSettings']={'Generate':!![],'PutInStructuredPart':![],'ExpectedFormat':_0xb029('0x1d')};}if(_0x420298[_0xb029('0x1e')]){_0x315024[_0xb029('0x1c')][_0xb029('0x19')][_0xb029('0x1f')]=_0x420298[_0xb029('0x1e')];if(_0x420298['custom_action_data']){_0x315024[_0xb029('0x1c')][_0xb029('0x19')][_0xb029('0x20')]=_0x420298[_0xb029('0x21')];}}logger[_0xb029('0x22')](JSON[_0xb029('0x23')](_0x315024));return rp(_0x315024);});};
\ No newline at end of file
+var _0xfbb5=['audio/wav','custom_action','custom_action_data','CustomActionData','info','stringify','request-promise','url','../../../../../config/logger','agi','exports','POST','resolve','password','username','then','ndassistant_url','/api/NaturalDialogAssistant/v1/Run','ndaactivity_type','message','Nda','uniqueid','calleridname','dnid','text','Bearer\x20','access_token','project','body','channelData','ndagenerate_audio','AudioOutputSettings'];(function(_0x2283dc,_0x2fcfc5){var _0x16db90=function(_0x376c35){while(--_0x376c35){_0x2283dc['push'](_0x2283dc['shift']());}};_0x16db90(++_0x2fcfc5);}(_0xfbb5,0xc6));var _0x5fbb=function(_0xe5218c,_0x3cc4c3){_0xe5218c=_0xe5218c-0x0;var _0x32b00e=_0xfbb5[_0xe5218c];return _0x32b00e;};'use strict';var rp=require(_0x5fbb('0x0'));var url=require(_0x5fbb('0x1'));var logger=require(_0x5fbb('0x2'))(_0x5fbb('0x3'));module[_0x5fbb('0x4')]=function(_0x569503,_0x36d801){var _0x4b5fa7={'method':_0x5fbb('0x5'),'uri':url[_0x5fbb('0x6')](_0x36d801['ndauth_url'],'/token'),'form':{'grant_type':_0x5fbb('0x7'),'username':_0x36d801[_0x5fbb('0x8')],'password':_0x36d801[_0x5fbb('0x7')]},'json':!![]};return rp(_0x4b5fa7)[_0x5fbb('0x9')](function(_0x3be9e3){var _0x28507a={'method':_0x5fbb('0x5'),'uri':url[_0x5fbb('0x6')](_0x36d801[_0x5fbb('0xa')],_0x5fbb('0xb')),'body':{'type':_0x36d801[_0x5fbb('0xc')]||_0x5fbb('0xd'),'channelId':_0x5fbb('0xe'),'conversation':{'id':_0x569503[_0x5fbb('0xf')]},'from':{'id':_0x569503['callerid'],'name':_0x569503[_0x5fbb('0x10')]},'recipient':{'id':_0x569503[_0x5fbb('0x11')],'name':_0x569503['extension']},'text':_0x36d801[_0x5fbb('0x12')],'channelData':{}},'headers':{'Authorization':_0x5fbb('0x13')+_0x3be9e3[_0x5fbb('0x14')]},'json':!![]};if(_0x36d801[_0x5fbb('0x15')]){_0x28507a[_0x5fbb('0x16')][_0x5fbb('0x17')]['ProjectName']=_0x36d801[_0x5fbb('0x15')];}if(_0x36d801[_0x5fbb('0x18')]=='1'){_0x28507a[_0x5fbb('0x16')][_0x5fbb('0x17')][_0x5fbb('0x19')]={'Generate':!![],'PutInStructuredPart':![],'ExpectedFormat':_0x5fbb('0x1a')};}if(_0x36d801['custom_action']){_0x28507a[_0x5fbb('0x16')]['channelData']['CustomAction']=_0x36d801[_0x5fbb('0x1b')];if(_0x36d801[_0x5fbb('0x1c')]){_0x28507a[_0x5fbb('0x16')][_0x5fbb('0x17')][_0x5fbb('0x1d')]=_0x36d801[_0x5fbb('0x1c')];}}logger[_0x5fbb('0x1e')](JSON[_0x5fbb('0x1f')](_0x28507a));return rp(_0x28507a);});};
\ No newline at end of file