Built motion from commit (unavailable).|2.5.31
[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 _0x446a=['slots','exports','LexRuntime','$LATEST','bluebird','aws-sdk'];(function(_0x32fab5,_0x1c3ea6){var _0x1983ea=function(_0x2c2289){while(--_0x2c2289){_0x32fab5['push'](_0x32fab5['shift']());}};_0x1983ea(++_0x1c3ea6);}(_0x446a,0x1c6));var _0xa446=function(_0x177795,_0x237bd5){_0x177795=_0x177795-0x0;var _0x5c14b9=_0x446a[_0x177795];return _0x5c14b9;};'use strict';var BPromise=require(_0xa446('0x0'));var AWS=require(_0xa446('0x1'));function lexResult(_0x4567e1,_0xd0301){return new BPromise(function(_0x169f4d,_0x20df50){_0x4567e1['postText'](_0xd0301,function(_0x21a416,_0x38d0ce){if(_0x21a416){_0x20df50(_0x21a416);}if(_0x38d0ce['slots']){for(const _0x4fb53c in _0x38d0ce[_0xa446('0x2')]){if(_0x38d0ce[_0xa446('0x2')]['hasOwnProperty'](_0x4fb53c)){var _0x480711=_0x38d0ce[_0xa446('0x2')][_0x4fb53c];_0x38d0ce['slot_'+_0x4fb53c]=_0x480711;}}}_0x169f4d(_0x38d0ce);});});}module[_0xa446('0x3')]=function(_0x2d016f,_0x4d12f8,_0x305d05,_0x864f3,_0x54c0f3,_0x5848af){var _0x337cd9=new AWS[(_0xa446('0x4'))]({'accessKeyId':_0x4d12f8,'secretAccessKey':_0x305d05,'region':_0x864f3});var _0x35c0cd={'botAlias':_0xa446('0x5'),'botName':_0x5848af,'inputText':_0x54c0f3,'userId':_0x2d016f};return lexResult(_0x337cd9,_0x35c0cd);};