85c8ffa20bc578475a18ce54db2784e8fd3ea74f
[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 _0x8e4f=['postText','slots','slot_','exports','LexRuntime','$LATEST','bluebird','aws-sdk'];(function(_0x1a9f6f,_0x73e636){var _0x38ae40=function(_0x1956c5){while(--_0x1956c5){_0x1a9f6f['push'](_0x1a9f6f['shift']());}};_0x38ae40(++_0x73e636);}(_0x8e4f,0x6e));var _0xf8e4=function(_0x37d76d,_0x14ab7e){_0x37d76d=_0x37d76d-0x0;var _0x486c89=_0x8e4f[_0x37d76d];return _0x486c89;};'use strict';var BPromise=require(_0xf8e4('0x0'));var AWS=require(_0xf8e4('0x1'));function lexResult(_0x2c1bd8,_0x48af92){return new BPromise(function(_0x1fe75b,_0x522d67){_0x2c1bd8[_0xf8e4('0x2')](_0x48af92,function(_0x345a98,_0xa136f){if(_0x345a98){_0x522d67(_0x345a98);}if(_0xa136f[_0xf8e4('0x3')]){for(const _0x408499 in _0xa136f[_0xf8e4('0x3')]){if(_0xa136f[_0xf8e4('0x3')]['hasOwnProperty'](_0x408499)){var _0xa3102d=_0xa136f[_0xf8e4('0x3')][_0x408499];_0xa136f[_0xf8e4('0x4')+_0x408499]=_0xa3102d;}}}_0x1fe75b(_0xa136f);});});}module[_0xf8e4('0x5')]=function(_0x4ad712,_0x2713b7,_0x31d0d6,_0xc2f4ad,_0x2311a5,_0x1a9c4e){var _0xde25ae=new AWS[(_0xf8e4('0x6'))]({'accessKeyId':_0x2713b7,'secretAccessKey':_0x31d0d6,'region':_0xc2f4ad});var _0x1a5dff={'botAlias':_0xf8e4('0x7'),'botName':_0x1a9c4e,'inputText':_0x2311a5,'userId':_0x4ad712};return lexResult(_0xde25ae,_0x1a5dff);};