Built motion from commit (unavailable).|2.4.4
[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 _0x7f17=['slots','hasOwnProperty','slot_','exports','$LATEST','bluebird'];(function(_0x1a7f3f,_0x2a551a){var _0x29f982=function(_0x5a4ce1){while(--_0x5a4ce1){_0x1a7f3f['push'](_0x1a7f3f['shift']());}};_0x29f982(++_0x2a551a);}(_0x7f17,0x101));var _0x77f1=function(_0xe95af,_0x4b849b){_0xe95af=_0xe95af-0x0;var _0x16effb=_0x7f17[_0xe95af];return _0x16effb;};'use strict';var BPromise=require(_0x77f1('0x0'));var AWS=require('aws-sdk');function lexResult(_0x4603b3,_0x3f21c7){return new BPromise(function(_0x350ab8,_0x1b1c30){_0x4603b3['postText'](_0x3f21c7,function(_0x1ac761,_0x2743b7){if(_0x1ac761){_0x1b1c30(_0x1ac761);}if(_0x2743b7[_0x77f1('0x1')]){for(const _0x42218f in _0x2743b7[_0x77f1('0x1')]){if(_0x2743b7[_0x77f1('0x1')][_0x77f1('0x2')](_0x42218f)){var _0x2eb631=_0x2743b7[_0x77f1('0x1')][_0x42218f];_0x2743b7[_0x77f1('0x3')+_0x42218f]=_0x2eb631;}}}_0x350ab8(_0x2743b7);});});}module[_0x77f1('0x4')]=function(_0x57f06f,_0x5c8b41,_0x466d88,_0x11516f,_0x1937be,_0xd091be){var _0x551f56=new AWS['LexRuntime']({'accessKeyId':_0x5c8b41,'secretAccessKey':_0x466d88,'region':_0x11516f});var _0x58d867={'botAlias':_0x77f1('0x5'),'botName':_0xd091be,'inputText':_0x1937be,'userId':_0x57f06f};return lexResult(_0x551f56,_0x58d867);};