Built motion from commit (unavailable).|2.4.18
[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 _0xa963=['hasOwnProperty','slot_','exports','LexRuntime','$LATEST','bluebird','aws-sdk','postText','slots'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xa963,0x164));var _0x3a96=function(_0x22e1cf,_0x44788d){_0x22e1cf=_0x22e1cf-0x0;var _0x258e78=_0xa963[_0x22e1cf];return _0x258e78;};'use strict';var BPromise=require(_0x3a96('0x0'));var AWS=require(_0x3a96('0x1'));function lexResult(_0x16d8a5,_0x2d33ec){return new BPromise(function(_0x43267f,_0x3a63d7){_0x16d8a5[_0x3a96('0x2')](_0x2d33ec,function(_0x4f0cc3,_0xe8e195){if(_0x4f0cc3){_0x3a63d7(_0x4f0cc3);}if(_0xe8e195['slots']){for(const _0x4c374f in _0xe8e195[_0x3a96('0x3')]){if(_0xe8e195[_0x3a96('0x3')][_0x3a96('0x4')](_0x4c374f)){var _0x47d6ad=_0xe8e195[_0x3a96('0x3')][_0x4c374f];_0xe8e195[_0x3a96('0x5')+_0x4c374f]=_0x47d6ad;}}}_0x43267f(_0xe8e195);});});}module[_0x3a96('0x6')]=function(_0x5b9f1f,_0x23a57c,_0x5a0025,_0x344146,_0x2abce6,_0x51793e){var _0x59212c=new AWS[(_0x3a96('0x7'))]({'accessKeyId':_0x23a57c,'secretAccessKey':_0x5a0025,'region':_0x344146});var _0x42b37b={'botAlias':_0x3a96('0x8'),'botName':_0x51793e,'inputText':_0x2abce6,'userId':_0x5b9f1f};return lexResult(_0x59212c,_0x42b37b);};