Built motion from commit (unavailable).|2.5.9
[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 _0x62c3=['slot_','LexRuntime','bluebird','postText','slots','hasOwnProperty'];(function(_0x77e142,_0x5cb4c0){var _0x2a1ea8=function(_0x387aeb){while(--_0x387aeb){_0x77e142['push'](_0x77e142['shift']());}};_0x2a1ea8(++_0x5cb4c0);}(_0x62c3,0xc8));var _0x362c=function(_0x1f3aec,_0x24c18e){_0x1f3aec=_0x1f3aec-0x0;var _0x409f0d=_0x62c3[_0x1f3aec];return _0x409f0d;};'use strict';var BPromise=require(_0x362c('0x0'));var AWS=require('aws-sdk');function lexResult(_0x4dd941,_0x23b167){return new BPromise(function(_0x26e76f,_0x5b2a0b){_0x4dd941[_0x362c('0x1')](_0x23b167,function(_0x59b923,_0x53c416){if(_0x59b923){_0x5b2a0b(_0x59b923);}if(_0x53c416[_0x362c('0x2')]){for(const _0x5a40fb in _0x53c416[_0x362c('0x2')]){if(_0x53c416['slots'][_0x362c('0x3')](_0x5a40fb)){var _0xb005a3=_0x53c416[_0x362c('0x2')][_0x5a40fb];_0x53c416[_0x362c('0x4')+_0x5a40fb]=_0xb005a3;}}}_0x26e76f(_0x53c416);});});}module['exports']=function(_0x2012f7,_0x111e5b,_0x5d84b8,_0x4a9a80,_0x16ce1d,_0x520fdd){var _0x59ab60=new AWS[(_0x362c('0x5'))]({'accessKeyId':_0x111e5b,'secretAccessKey':_0x5d84b8,'region':_0x4a9a80});var _0x50ecf6={'botAlias':'$LATEST','botName':_0x520fdd,'inputText':_0x16ce1d,'userId':_0x2012f7};return lexResult(_0x59ab60,_0x50ecf6);};