Built motion from commit (unavailable).|2.5.0
[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 _0x3a18=['postText','slots','hasOwnProperty','LexRuntime','bluebird'];(function(_0x487962,_0x33d062){var _0x23fac1=function(_0x1ff063){while(--_0x1ff063){_0x487962['push'](_0x487962['shift']());}};_0x23fac1(++_0x33d062);}(_0x3a18,0xc7));var _0x83a1=function(_0x1f2c8d,_0x4fbf33){_0x1f2c8d=_0x1f2c8d-0x0;var _0x3f71fa=_0x3a18[_0x1f2c8d];return _0x3f71fa;};'use strict';var BPromise=require(_0x83a1('0x0'));var AWS=require('aws-sdk');function lexResult(_0x2a9638,_0x29eaa4){return new BPromise(function(_0x59d77f,_0x558eac){_0x2a9638[_0x83a1('0x1')](_0x29eaa4,function(_0xf79479,_0x51d268){if(_0xf79479){_0x558eac(_0xf79479);}if(_0x51d268['slots']){for(const _0x2ef877 in _0x51d268[_0x83a1('0x2')]){if(_0x51d268[_0x83a1('0x2')][_0x83a1('0x3')](_0x2ef877)){var _0x2ee469=_0x51d268[_0x83a1('0x2')][_0x2ef877];_0x51d268['slot_'+_0x2ef877]=_0x2ee469;}}}_0x59d77f(_0x51d268);});});}module['exports']=function(_0xbdf6b2,_0x286a5f,_0x444dca,_0xf3a738,_0x40b687,_0x46cc48){var _0x3f2cbe=new AWS[(_0x83a1('0x4'))]({'accessKeyId':_0x286a5f,'secretAccessKey':_0x444dca,'region':_0xf3a738});var _0x4f7f8e={'botAlias':'$LATEST','botName':_0x46cc48,'inputText':_0x40b687,'userId':_0xbdf6b2};return lexResult(_0x3f2cbe,_0x4f7f8e);};