f84b79b30cd6f5decd2e09e14b8f1d2626725936
[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 _0x493d=['bluebird','aws-sdk','postText','slots','exports','LexRuntime','$LATEST'];(function(_0x223c84,_0x87fe63){var _0x29108a=function(_0x4c85ef){while(--_0x4c85ef){_0x223c84['push'](_0x223c84['shift']());}};_0x29108a(++_0x87fe63);}(_0x493d,0x93));var _0xd493=function(_0x12d5e9,_0x1decd6){_0x12d5e9=_0x12d5e9-0x0;var _0x343939=_0x493d[_0x12d5e9];return _0x343939;};'use strict';var BPromise=require(_0xd493('0x0'));var AWS=require(_0xd493('0x1'));function lexResult(_0x38635c,_0x46bf0c){return new BPromise(function(_0x2eca7c,_0x1121ba){_0x38635c[_0xd493('0x2')](_0x46bf0c,function(_0x755c83,_0x277056){if(_0x755c83){_0x1121ba(_0x755c83);}if(_0x277056[_0xd493('0x3')]){for(const _0x4c5b5a in _0x277056[_0xd493('0x3')]){if(_0x277056[_0xd493('0x3')]['hasOwnProperty'](_0x4c5b5a)){var _0x2d1393=_0x277056[_0xd493('0x3')][_0x4c5b5a];_0x277056['slot_'+_0x4c5b5a]=_0x2d1393;}}}_0x2eca7c(_0x277056);});});}module[_0xd493('0x4')]=function(_0x16b8d4,_0x2c52f1,_0x578a66,_0x5c8a8f,_0x16013b,_0x1595f0){var _0x3b5afc=new AWS[(_0xd493('0x5'))]({'accessKeyId':_0x2c52f1,'secretAccessKey':_0x578a66,'region':_0x5c8a8f});var _0x503749={'botAlias':_0xd493('0x6'),'botName':_0x1595f0,'inputText':_0x16013b,'userId':_0x16b8d4};return lexResult(_0x3b5afc,_0x503749);};