Built motion from commit (unavailable).|2.4.19
[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 _0x5a8a=['slot_','exports','LexRuntime','$LATEST','bluebird','postText','slots','hasOwnProperty'];(function(_0xb20a71,_0x118e59){var _0xa67aa2=function(_0x1d271a){while(--_0x1d271a){_0xb20a71['push'](_0xb20a71['shift']());}};_0xa67aa2(++_0x118e59);}(_0x5a8a,0xd4));var _0xa5a8=function(_0x432682,_0x253044){_0x432682=_0x432682-0x0;var _0x463d05=_0x5a8a[_0x432682];return _0x463d05;};'use strict';var BPromise=require(_0xa5a8('0x0'));var AWS=require('aws-sdk');function lexResult(_0x205963,_0xc5376a){return new BPromise(function(_0x17ca61,_0x562deb){_0x205963[_0xa5a8('0x1')](_0xc5376a,function(_0x2250bd,_0x2497f1){if(_0x2250bd){_0x562deb(_0x2250bd);}if(_0x2497f1[_0xa5a8('0x2')]){for(const _0x444e11 in _0x2497f1[_0xa5a8('0x2')]){if(_0x2497f1[_0xa5a8('0x2')][_0xa5a8('0x3')](_0x444e11)){var _0x4bcc4f=_0x2497f1['slots'][_0x444e11];_0x2497f1[_0xa5a8('0x4')+_0x444e11]=_0x4bcc4f;}}}_0x17ca61(_0x2497f1);});});}module[_0xa5a8('0x5')]=function(_0x37819d,_0x35caa4,_0x56d011,_0x4ba500,_0x5f0eb1,_0x1a210b){var _0x1bf91f=new AWS[(_0xa5a8('0x6'))]({'accessKeyId':_0x35caa4,'secretAccessKey':_0x56d011,'region':_0x4ba500});var _0x152ed0={'botAlias':_0xa5a8('0x7'),'botName':_0x1a210b,'inputText':_0x5f0eb1,'userId':_0x37819d};return lexResult(_0x1bf91f,_0x152ed0);};