Built motion from commit (unavailable).|2.5.3
[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 _0x22a1=['bluebird','aws-sdk','postText','slots','hasOwnProperty','slot_','exports','LexRuntime','$LATEST'];(function(_0x41c157,_0x4335a1){var _0x4e62a4=function(_0x192cc4){while(--_0x192cc4){_0x41c157['push'](_0x41c157['shift']());}};_0x4e62a4(++_0x4335a1);}(_0x22a1,0xab));var _0x122a=function(_0x25fa0d,_0x504efe){_0x25fa0d=_0x25fa0d-0x0;var _0x9ef28d=_0x22a1[_0x25fa0d];return _0x9ef28d;};'use strict';var BPromise=require(_0x122a('0x0'));var AWS=require(_0x122a('0x1'));function lexResult(_0xb87e54,_0x24e423){return new BPromise(function(_0x14a608,_0x448c3f){_0xb87e54[_0x122a('0x2')](_0x24e423,function(_0x260556,_0xfe9d6a){if(_0x260556){_0x448c3f(_0x260556);}if(_0xfe9d6a['slots']){for(const _0x43354a in _0xfe9d6a[_0x122a('0x3')]){if(_0xfe9d6a[_0x122a('0x3')][_0x122a('0x4')](_0x43354a)){var _0x52fc96=_0xfe9d6a[_0x122a('0x3')][_0x43354a];_0xfe9d6a[_0x122a('0x5')+_0x43354a]=_0x52fc96;}}}_0x14a608(_0xfe9d6a);});});}module[_0x122a('0x6')]=function(_0x50406a,_0x1cc6f2,_0x305e24,_0x549e49,_0x311ca9,_0x4b4fa4){var _0x29f0aa=new AWS[(_0x122a('0x7'))]({'accessKeyId':_0x1cc6f2,'secretAccessKey':_0x305e24,'region':_0x549e49});var _0x4637ec={'botAlias':_0x122a('0x8'),'botName':_0x4b4fa4,'inputText':_0x311ca9,'userId':_0x50406a};return lexResult(_0x29f0aa,_0x4637ec);};