ca5c4bb4322512659388109229bc3e012a66a1b1
[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 _0xcd75=['exports','$LATEST','bluebird','aws-sdk','postText','slots','hasOwnProperty','slot_'];(function(_0x59a383,_0x5afa5e){var _0x3c7638=function(_0x567b48){while(--_0x567b48){_0x59a383['push'](_0x59a383['shift']());}};_0x3c7638(++_0x5afa5e);}(_0xcd75,0x112));var _0x5cd7=function(_0x401706,_0x4afaf1){_0x401706=_0x401706-0x0;var _0x283869=_0xcd75[_0x401706];return _0x283869;};'use strict';var BPromise=require(_0x5cd7('0x0'));var AWS=require(_0x5cd7('0x1'));function lexResult(_0x13b401,_0x4c852b){return new BPromise(function(_0x3bb2ce,_0x360ef6){_0x13b401[_0x5cd7('0x2')](_0x4c852b,function(_0x3dae66,_0xecf1d6){if(_0x3dae66){_0x360ef6(_0x3dae66);}if(_0xecf1d6[_0x5cd7('0x3')]){for(const _0x4cca56 in _0xecf1d6[_0x5cd7('0x3')]){if(_0xecf1d6[_0x5cd7('0x3')][_0x5cd7('0x4')](_0x4cca56)){var _0x4f99f8=_0xecf1d6[_0x5cd7('0x3')][_0x4cca56];_0xecf1d6[_0x5cd7('0x5')+_0x4cca56]=_0x4f99f8;}}}_0x3bb2ce(_0xecf1d6);});});}module[_0x5cd7('0x6')]=function(_0x2b9710,_0x5960ce,_0xd9ceca,_0x2ed83b,_0x4baef0,_0x3a3637){var _0x33430f=new AWS['LexRuntime']({'accessKeyId':_0x5960ce,'secretAccessKey':_0xd9ceca,'region':_0x2ed83b});var _0x39eb79={'botAlias':_0x5cd7('0x7'),'botName':_0x3a3637,'inputText':_0x4baef0,'userId':_0x2b9710};return lexResult(_0x33430f,_0x39eb79);};