Built motion from commit (unavailable).|2.5.21
[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 _0x1446=['exports','LexRuntime','bluebird','aws-sdk','slots','hasOwnProperty'];(function(_0x49d05e,_0x43ab13){var _0x11fbc5=function(_0x45b4ce){while(--_0x45b4ce){_0x49d05e['push'](_0x49d05e['shift']());}};_0x11fbc5(++_0x43ab13);}(_0x1446,0x14c));var _0x6144=function(_0xeae1f5,_0x5deb05){_0xeae1f5=_0xeae1f5-0x0;var _0xf76dea=_0x1446[_0xeae1f5];return _0xf76dea;};'use strict';var BPromise=require(_0x6144('0x0'));var AWS=require(_0x6144('0x1'));function lexResult(_0x236d2e,_0xd89e9c){return new BPromise(function(_0x48caa3,_0x32c27f){_0x236d2e['postText'](_0xd89e9c,function(_0x51ef6d,_0x5546bb){if(_0x51ef6d){_0x32c27f(_0x51ef6d);}if(_0x5546bb[_0x6144('0x2')]){for(const _0x532030 in _0x5546bb['slots']){if(_0x5546bb[_0x6144('0x2')][_0x6144('0x3')](_0x532030)){var _0x2eda41=_0x5546bb['slots'][_0x532030];_0x5546bb['slot_'+_0x532030]=_0x2eda41;}}}_0x48caa3(_0x5546bb);});});}module[_0x6144('0x4')]=function(_0x41e65e,_0x454042,_0x4ead0f,_0x4e1f73,_0x42471a,_0x6e3278){var _0x5bad6f=new AWS[(_0x6144('0x5'))]({'accessKeyId':_0x454042,'secretAccessKey':_0x4ead0f,'region':_0x4e1f73});var _0x4d9de5={'botAlias':'$LATEST','botName':_0x6e3278,'inputText':_0x42471a,'userId':_0x41e65e};return lexResult(_0x5bad6f,_0x4d9de5);};