Built motion from commit (unavailable).|2.4.18
[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 _0x5d10=['LexRuntime','$LATEST','bluebird','postText','slots','hasOwnProperty','exports'];(function(_0x1b932b,_0x2c14fe){var _0x119173=function(_0x381dde){while(--_0x381dde){_0x1b932b['push'](_0x1b932b['shift']());}};_0x119173(++_0x2c14fe);}(_0x5d10,0x159));var _0x05d1=function(_0xf61c79,_0x43c6fa){_0xf61c79=_0xf61c79-0x0;var _0x127d26=_0x5d10[_0xf61c79];return _0x127d26;};'use strict';var BPromise=require(_0x05d1('0x0'));var AWS=require('aws-sdk');function lexResult(_0x386e2c,_0xa012b0){return new BPromise(function(_0x456020,_0x2c37d7){_0x386e2c[_0x05d1('0x1')](_0xa012b0,function(_0x336de3,_0x23f8e2){if(_0x336de3){_0x2c37d7(_0x336de3);}if(_0x23f8e2['slots']){for(const _0x2fbfac in _0x23f8e2['slots']){if(_0x23f8e2[_0x05d1('0x2')][_0x05d1('0x3')](_0x2fbfac)){var _0x15dad2=_0x23f8e2[_0x05d1('0x2')][_0x2fbfac];_0x23f8e2['slot_'+_0x2fbfac]=_0x15dad2;}}}_0x456020(_0x23f8e2);});});}module[_0x05d1('0x4')]=function(_0x33feeb,_0x3bb7d3,_0x2905d9,_0x55e3af,_0x492964,_0x15256f){var _0x4219e5=new AWS[(_0x05d1('0x5'))]({'accessKeyId':_0x3bb7d3,'secretAccessKey':_0x2905d9,'region':_0x55e3af});var _0x5b69df={'botAlias':_0x05d1('0x6'),'botName':_0x15256f,'inputText':_0x492964,'userId':_0x33feeb};return lexResult(_0x4219e5,_0x5b69df);};