69cdc6a2969dd5e15accdfd2c362cbfb882b9cca
[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 _0xc001=['aws-sdk','postText','slots','hasOwnProperty','slot_','exports','$LATEST','bluebird'];(function(_0x1e0ca5,_0x57fd4f){var _0x410923=function(_0x5bd94d){while(--_0x5bd94d){_0x1e0ca5['push'](_0x1e0ca5['shift']());}};_0x410923(++_0x57fd4f);}(_0xc001,0x11f));var _0x1c00=function(_0x4b477a,_0x36997d){_0x4b477a=_0x4b477a-0x0;var _0x57e310=_0xc001[_0x4b477a];return _0x57e310;};'use strict';var BPromise=require(_0x1c00('0x0'));var AWS=require(_0x1c00('0x1'));function lexResult(_0x18ae14,_0x24ae54){return new BPromise(function(_0x40a43b,_0x1d14d4){_0x18ae14[_0x1c00('0x2')](_0x24ae54,function(_0x3c40c3,_0x439f08){if(_0x3c40c3){_0x1d14d4(_0x3c40c3);}if(_0x439f08[_0x1c00('0x3')]){for(const _0x256d3c in _0x439f08[_0x1c00('0x3')]){if(_0x439f08[_0x1c00('0x3')][_0x1c00('0x4')](_0x256d3c)){var _0x250be1=_0x439f08[_0x1c00('0x3')][_0x256d3c];_0x439f08[_0x1c00('0x5')+_0x256d3c]=_0x250be1;}}}_0x40a43b(_0x439f08);});});}module[_0x1c00('0x6')]=function(_0x687d4a,_0x51e54b,_0x28766b,_0x412680,_0x2e62d4,_0x3f9dc8){var _0x35c271=new AWS['LexRuntime']({'accessKeyId':_0x51e54b,'secretAccessKey':_0x28766b,'region':_0x412680});var _0x152d0a={'botAlias':_0x1c00('0x7'),'botName':_0x3f9dc8,'inputText':_0x2e62d4,'userId':_0x687d4a};return lexResult(_0x35c271,_0x152d0a);};