Built motion from commit (unavailable).|2.4.14
[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 _0xa8ee=['slots','hasOwnProperty','slot_','exports','LexRuntime','bluebird','aws-sdk'];(function(_0x597106,_0x44de51){var _0x3ca6b5=function(_0x9e6058){while(--_0x9e6058){_0x597106['push'](_0x597106['shift']());}};_0x3ca6b5(++_0x44de51);}(_0xa8ee,0xf3));var _0xea8e=function(_0x394396,_0x3f4f23){_0x394396=_0x394396-0x0;var _0xca0abb=_0xa8ee[_0x394396];return _0xca0abb;};'use strict';var BPromise=require(_0xea8e('0x0'));var AWS=require(_0xea8e('0x1'));function lexResult(_0x33644a,_0xc7818f){return new BPromise(function(_0x1af35b,_0x1a5955){_0x33644a['postText'](_0xc7818f,function(_0x1d69b5,_0x514e67){if(_0x1d69b5){_0x1a5955(_0x1d69b5);}if(_0x514e67[_0xea8e('0x2')]){for(const _0x4e16f8 in _0x514e67[_0xea8e('0x2')]){if(_0x514e67[_0xea8e('0x2')][_0xea8e('0x3')](_0x4e16f8)){var _0x3ec4bd=_0x514e67[_0xea8e('0x2')][_0x4e16f8];_0x514e67[_0xea8e('0x4')+_0x4e16f8]=_0x3ec4bd;}}}_0x1af35b(_0x514e67);});});}module[_0xea8e('0x5')]=function(_0x157676,_0x143944,_0x390d31,_0x3f573f,_0x4fa125,_0x3c1c83){var _0x489473=new AWS[(_0xea8e('0x6'))]({'accessKeyId':_0x143944,'secretAccessKey':_0x390d31,'region':_0x3f573f});var _0x2aa143={'botAlias':'$LATEST','botName':_0x3c1c83,'inputText':_0x4fa125,'userId':_0x157676};return lexResult(_0x489473,_0x2aa143);};