Built motion from commit (unavailable).|2.5.11
[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 _0xe95d=['exports','$LATEST','bluebird','aws-sdk','slots','hasOwnProperty','slot_'];(function(_0x4b7253,_0x40f708){var _0x29f09a=function(_0x18d91c){while(--_0x18d91c){_0x4b7253['push'](_0x4b7253['shift']());}};_0x29f09a(++_0x40f708);}(_0xe95d,0x10c));var _0xde95=function(_0x3c7d53,_0x2826d0){_0x3c7d53=_0x3c7d53-0x0;var _0x2c8387=_0xe95d[_0x3c7d53];return _0x2c8387;};'use strict';var BPromise=require(_0xde95('0x0'));var AWS=require(_0xde95('0x1'));function lexResult(_0x252f8d,_0x58bd10){return new BPromise(function(_0x5ec1f5,_0x58f3e5){_0x252f8d['postText'](_0x58bd10,function(_0x5231df,_0x2fbf9d){if(_0x5231df){_0x58f3e5(_0x5231df);}if(_0x2fbf9d['slots']){for(const _0x324b01 in _0x2fbf9d[_0xde95('0x2')]){if(_0x2fbf9d[_0xde95('0x2')][_0xde95('0x3')](_0x324b01)){var _0x3da40c=_0x2fbf9d[_0xde95('0x2')][_0x324b01];_0x2fbf9d[_0xde95('0x4')+_0x324b01]=_0x3da40c;}}}_0x5ec1f5(_0x2fbf9d);});});}module[_0xde95('0x5')]=function(_0x329a76,_0x3873d6,_0x2811ed,_0x13cbd2,_0x4bc954,_0x49cf63){var _0x3dd728=new AWS['LexRuntime']({'accessKeyId':_0x3873d6,'secretAccessKey':_0x2811ed,'region':_0x13cbd2});var _0xd62d5d={'botAlias':_0xde95('0x6'),'botName':_0x49cf63,'inputText':_0x4bc954,'userId':_0x329a76};return lexResult(_0x3dd728,_0xd62d5d);};