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 _0x9b73=['LexRuntime','$LATEST','postText','slots','slot_','exports'];(function(_0x565cf5,_0x6cd70b){var _0x394f23=function(_0x3ddb89){while(--_0x3ddb89){_0x565cf5['push'](_0x565cf5['shift']());}};_0x394f23(++_0x6cd70b);}(_0x9b73,0x176));var _0x39b7=function(_0x5b644e,_0x2e5e07){_0x5b644e=_0x5b644e-0x0;var _0x49c6bf=_0x9b73[_0x5b644e];return _0x49c6bf;};'use strict';var BPromise=require('bluebird');var AWS=require('aws-sdk');function lexResult(_0x320ccc,_0x3fcab0){return new BPromise(function(_0x486762,_0x42c0f9){_0x320ccc[_0x39b7('0x0')](_0x3fcab0,function(_0x2b88b2,_0x48b9d6){if(_0x2b88b2){_0x42c0f9(_0x2b88b2);}if(_0x48b9d6['slots']){for(const _0x211714 in _0x48b9d6[_0x39b7('0x1')]){if(_0x48b9d6[_0x39b7('0x1')]['hasOwnProperty'](_0x211714)){var _0x9fe2a6=_0x48b9d6['slots'][_0x211714];_0x48b9d6[_0x39b7('0x2')+_0x211714]=_0x9fe2a6;}}}_0x486762(_0x48b9d6);});});}module[_0x39b7('0x3')]=function(_0x5b4743,_0x2fd49d,_0x36e1f6,_0x4f9d76,_0x3810bd,_0x5907b2){var _0x256525=new AWS[(_0x39b7('0x4'))]({'accessKeyId':_0x2fd49d,'secretAccessKey':_0x36e1f6,'region':_0x4f9d76});var _0x1fe486={'botAlias':_0x39b7('0x5'),'botName':_0x5907b2,'inputText':_0x3810bd,'userId':_0x5b4743};return lexResult(_0x256525,_0x1fe486);};