825544c7334488fba1810fc6111135271923f410
[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 _0x207d=['$LATEST','bluebird','aws-sdk','slots','hasOwnProperty','exports','LexRuntime'];(function(_0x29241f,_0x1845bc){var _0x4b3d06=function(_0x29362b){while(--_0x29362b){_0x29241f['push'](_0x29241f['shift']());}};_0x4b3d06(++_0x1845bc);}(_0x207d,0xa9));var _0xd207=function(_0x8abce8,_0x6d8ddb){_0x8abce8=_0x8abce8-0x0;var _0x3d0c84=_0x207d[_0x8abce8];return _0x3d0c84;};'use strict';var BPromise=require(_0xd207('0x0'));var AWS=require(_0xd207('0x1'));function lexResult(_0x47a6d8,_0x267ec1){return new BPromise(function(_0x545194,_0x9fe611){_0x47a6d8['postText'](_0x267ec1,function(_0x192e17,_0x70c8b0){if(_0x192e17){_0x9fe611(_0x192e17);}if(_0x70c8b0[_0xd207('0x2')]){for(const _0x3cc3e6 in _0x70c8b0[_0xd207('0x2')]){if(_0x70c8b0[_0xd207('0x2')][_0xd207('0x3')](_0x3cc3e6)){var _0x5f360a=_0x70c8b0[_0xd207('0x2')][_0x3cc3e6];_0x70c8b0['slot_'+_0x3cc3e6]=_0x5f360a;}}}_0x545194(_0x70c8b0);});});}module[_0xd207('0x4')]=function(_0x2e426d,_0x1fa014,_0x53cb05,_0x47b28c,_0x20e5af,_0x5f5ba5){var _0x2a7aec=new AWS[(_0xd207('0x5'))]({'accessKeyId':_0x1fa014,'secretAccessKey':_0x53cb05,'region':_0x47b28c});var _0x17e347={'botAlias':_0xd207('0x6'),'botName':_0x5f5ba5,'inputText':_0x20e5af,'userId':_0x2e426d};return lexResult(_0x2a7aec,_0x17e347);};