Built motion from commit (unavailable).|2.5.2
[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 _0x413c=['aws-sdk','postText','slots','slot_','exports','LexRuntime','$LATEST','bluebird'];(function(_0x4044fd,_0x57a6c5){var _0x4358d3=function(_0xc14703){while(--_0xc14703){_0x4044fd['push'](_0x4044fd['shift']());}};_0x4358d3(++_0x57a6c5);}(_0x413c,0x167));var _0xc413=function(_0x2399a,_0x3e0d4d){_0x2399a=_0x2399a-0x0;var _0x3ea8df=_0x413c[_0x2399a];return _0x3ea8df;};'use strict';var BPromise=require(_0xc413('0x0'));var AWS=require(_0xc413('0x1'));function lexResult(_0x1d8ade,_0x353fab){return new BPromise(function(_0x5e7d68,_0xe875a0){_0x1d8ade[_0xc413('0x2')](_0x353fab,function(_0x3537d0,_0x71a1){if(_0x3537d0){_0xe875a0(_0x3537d0);}if(_0x71a1[_0xc413('0x3')]){for(const _0x4c0437 in _0x71a1[_0xc413('0x3')]){if(_0x71a1['slots']['hasOwnProperty'](_0x4c0437)){var _0x483adf=_0x71a1[_0xc413('0x3')][_0x4c0437];_0x71a1[_0xc413('0x4')+_0x4c0437]=_0x483adf;}}}_0x5e7d68(_0x71a1);});});}module[_0xc413('0x5')]=function(_0x4c101f,_0x7a0c2e,_0x52c195,_0x1543d4,_0x22b795,_0x42d8c8){var _0x4e2b1f=new AWS[(_0xc413('0x6'))]({'accessKeyId':_0x7a0c2e,'secretAccessKey':_0x52c195,'region':_0x1543d4});var _0x8d17ea={'botAlias':_0xc413('0x7'),'botName':_0x42d8c8,'inputText':_0x22b795,'userId':_0x4c101f};return lexResult(_0x4e2b1f,_0x8d17ea);};