Built motion from commit (unavailable).|2.5.20
[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 _0x850a=['exports','LexRuntime','$LATEST','aws-sdk','slots','hasOwnProperty','slot_'];(function(_0x3fbc5b,_0x3454ef){var _0x24d176=function(_0x36613c){while(--_0x36613c){_0x3fbc5b['push'](_0x3fbc5b['shift']());}};_0x24d176(++_0x3454ef);}(_0x850a,0x6c));var _0xa850=function(_0x38080e,_0x95512d){_0x38080e=_0x38080e-0x0;var _0x4e4c87=_0x850a[_0x38080e];return _0x4e4c87;};'use strict';var BPromise=require('bluebird');var AWS=require(_0xa850('0x0'));function lexResult(_0x48d260,_0x29e23f){return new BPromise(function(_0x4cc7ef,_0x20492e){_0x48d260['postText'](_0x29e23f,function(_0x38b58b,_0x4824d5){if(_0x38b58b){_0x20492e(_0x38b58b);}if(_0x4824d5[_0xa850('0x1')]){for(const _0x4d5ca4 in _0x4824d5['slots']){if(_0x4824d5['slots'][_0xa850('0x2')](_0x4d5ca4)){var _0x131184=_0x4824d5[_0xa850('0x1')][_0x4d5ca4];_0x4824d5[_0xa850('0x3')+_0x4d5ca4]=_0x131184;}}}_0x4cc7ef(_0x4824d5);});});}module[_0xa850('0x4')]=function(_0x2bb7b4,_0x660782,_0x877ecd,_0x4a5472,_0x209a10,_0x46165e){var _0x1d75ac=new AWS[(_0xa850('0x5'))]({'accessKeyId':_0x660782,'secretAccessKey':_0x877ecd,'region':_0x4a5472});var _0x4f20ce={'botAlias':_0xa850('0x6'),'botName':_0x46165e,'inputText':_0x209a10,'userId':_0x2bb7b4};return lexResult(_0x1d75ac,_0x4f20ce);};