Built motion from commit (unavailable).|2.5.4
[motion2.git] / server / services / agi / scripts / aws / lex / lib / api.js
1 // *************************************************************************
2 // *                                                                       *
3 // * xCALLY Motion -  The Omnichannel Contact Center                       *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved                     *
5 // *                                                                       *
6 // *************************************************************************
7 // *                                                                       *
8 // * Email: info@xcally.com                                                *
9 // * Website: https://www.xcally.com                                       *
10 // *                                                                       *
11 // *************************************************************************
12 // *                                                                       *
13 // * The SOFTWARE PRODUCT is protected by copyright laws and international *
14 // * copyright treaties, as well as other intellectual property laws and   *
15 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                         *
16 // *                                                                       *
17 // *************************************************************************
18 var _0xe14e=['slots','slot_','LexRuntime','$LATEST','bluebird','aws-sdk','postText'];(function(_0x152985,_0x256196){var _0x163470=function(_0x464ba4){while(--_0x464ba4){_0x152985['push'](_0x152985['shift']());}};_0x163470(++_0x256196);}(_0xe14e,0x1a1));var _0xee14=function(_0x40fee8,_0x122f8e){_0x40fee8=_0x40fee8-0x0;var _0x40ab1f=_0xe14e[_0x40fee8];return _0x40ab1f;};'use strict';var BPromise=require(_0xee14('0x0'));var AWS=require(_0xee14('0x1'));function lexResult(_0x3b536f,_0x1cb1b7){return new BPromise(function(_0x16c869,_0x8052aa){_0x3b536f[_0xee14('0x2')](_0x1cb1b7,function(_0x4b96ba,_0x30f4fe){if(_0x4b96ba){_0x8052aa(_0x4b96ba);}if(_0x30f4fe[_0xee14('0x3')]){for(const _0x4e75c7 in _0x30f4fe[_0xee14('0x3')]){if(_0x30f4fe[_0xee14('0x3')]['hasOwnProperty'](_0x4e75c7)){var _0x48ea11=_0x30f4fe[_0xee14('0x3')][_0x4e75c7];_0x30f4fe[_0xee14('0x4')+_0x4e75c7]=_0x48ea11;}}}_0x16c869(_0x30f4fe);});});}module['exports']=function(_0x1f45d4,_0x5a07b9,_0x930de4,_0x3f80ac,_0x33e761,_0x34bf24){var _0x50e4a0=new AWS[(_0xee14('0x5'))]({'accessKeyId':_0x5a07b9,'secretAccessKey':_0x930de4,'region':_0x3f80ac});var _0x31d080={'botAlias':_0xee14('0x6'),'botName':_0x34bf24,'inputText':_0x33e761,'userId':_0x1f45d4};return lexResult(_0x50e4a0,_0x31d080);};