f2174df45fbef4482050b8e42f9f7fc83a7474fc
[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 _0x85b9=['aws-sdk','postText','slots','slot_','exports','LexRuntime','$LATEST','bluebird'];(function(_0x4b0290,_0x188c34){var _0x4bd9f4=function(_0x357f3f){while(--_0x357f3f){_0x4b0290['push'](_0x4b0290['shift']());}};_0x4bd9f4(++_0x188c34);}(_0x85b9,0x127));var _0x985b=function(_0x44946b,_0xf874ec){_0x44946b=_0x44946b-0x0;var _0x249bc4=_0x85b9[_0x44946b];return _0x249bc4;};'use strict';var BPromise=require(_0x985b('0x0'));var AWS=require(_0x985b('0x1'));function lexResult(_0x4971bf,_0x305e83){return new BPromise(function(_0x522307,_0xa420b9){_0x4971bf[_0x985b('0x2')](_0x305e83,function(_0x2eb6c4,_0x20a8ab){if(_0x2eb6c4){_0xa420b9(_0x2eb6c4);}if(_0x20a8ab[_0x985b('0x3')]){for(const _0x137526 in _0x20a8ab[_0x985b('0x3')]){if(_0x20a8ab[_0x985b('0x3')]['hasOwnProperty'](_0x137526)){var _0x4ad2be=_0x20a8ab[_0x985b('0x3')][_0x137526];_0x20a8ab[_0x985b('0x4')+_0x137526]=_0x4ad2be;}}}_0x522307(_0x20a8ab);});});}module[_0x985b('0x5')]=function(_0x237edc,_0x370903,_0x339dde,_0x3540ef,_0x462109,_0xf434b){var _0x592cff=new AWS[(_0x985b('0x6'))]({'accessKeyId':_0x370903,'secretAccessKey':_0x339dde,'region':_0x3540ef});var _0x335cc2={'botAlias':_0x985b('0x7'),'botName':_0xf434b,'inputText':_0x462109,'userId':_0x237edc};return lexResult(_0x592cff,_0x335cc2);};