Built motion from commit (unavailable).|2.5.23
[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 _0x474a=['aws-sdk','postText','slots','slot_','exports','LexRuntime','$LATEST','bluebird'];(function(_0xbb0786,_0x5ce283){var _0x2ffc70=function(_0x1862f7){while(--_0x1862f7){_0xbb0786['push'](_0xbb0786['shift']());}};_0x2ffc70(++_0x5ce283);}(_0x474a,0x67));var _0xa474=function(_0x270d0d,_0x3fe5af){_0x270d0d=_0x270d0d-0x0;var _0x1e000b=_0x474a[_0x270d0d];return _0x1e000b;};'use strict';var BPromise=require(_0xa474('0x0'));var AWS=require(_0xa474('0x1'));function lexResult(_0x3feaa8,_0x41bede){return new BPromise(function(_0x5f1de4,_0x452462){_0x3feaa8[_0xa474('0x2')](_0x41bede,function(_0x6a2d7b,_0x59608c){if(_0x6a2d7b){_0x452462(_0x6a2d7b);}if(_0x59608c['slots']){for(const _0x450b39 in _0x59608c[_0xa474('0x3')]){if(_0x59608c[_0xa474('0x3')]['hasOwnProperty'](_0x450b39)){var _0xae08b2=_0x59608c['slots'][_0x450b39];_0x59608c[_0xa474('0x4')+_0x450b39]=_0xae08b2;}}}_0x5f1de4(_0x59608c);});});}module[_0xa474('0x5')]=function(_0x50090a,_0x4f7eb3,_0x21b4a9,_0x5e2a59,_0x4d9c6e,_0x58313c){var _0x36659d=new AWS[(_0xa474('0x6'))]({'accessKeyId':_0x4f7eb3,'secretAccessKey':_0x21b4a9,'region':_0x5e2a59});var _0x40cdb1={'botAlias':_0xa474('0x7'),'botName':_0x58313c,'inputText':_0x4d9c6e,'userId':_0x50090a};return lexResult(_0x36659d,_0x40cdb1);};