Built motion from commit (unavailable).|2.5.30
[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 _0x07fd=['aws-sdk','slots','hasOwnProperty','slot_','LexRuntime','$LATEST','bluebird'];(function(_0x4d01b5,_0x2e1cb8){var _0x444443=function(_0x1d66f9){while(--_0x1d66f9){_0x4d01b5['push'](_0x4d01b5['shift']());}};_0x444443(++_0x2e1cb8);}(_0x07fd,0x99));var _0xd07f=function(_0x1a29f4,_0x1e10b9){_0x1a29f4=_0x1a29f4-0x0;var _0x516e56=_0x07fd[_0x1a29f4];return _0x516e56;};'use strict';var BPromise=require(_0xd07f('0x0'));var AWS=require(_0xd07f('0x1'));function lexResult(_0xf10120,_0x17eeaf){return new BPromise(function(_0x8af3f,_0x548eb5){_0xf10120['postText'](_0x17eeaf,function(_0x5d7e7d,_0x2dc08b){if(_0x5d7e7d){_0x548eb5(_0x5d7e7d);}if(_0x2dc08b[_0xd07f('0x2')]){for(const _0x207bdf in _0x2dc08b[_0xd07f('0x2')]){if(_0x2dc08b['slots'][_0xd07f('0x3')](_0x207bdf)){var _0x1326f5=_0x2dc08b['slots'][_0x207bdf];_0x2dc08b[_0xd07f('0x4')+_0x207bdf]=_0x1326f5;}}}_0x8af3f(_0x2dc08b);});});}module['exports']=function(_0x4ea2c,_0x2b7802,_0x38741f,_0x5a5ae2,_0x1e8e98,_0x14ce08){var _0x396e4b=new AWS[(_0xd07f('0x5'))]({'accessKeyId':_0x2b7802,'secretAccessKey':_0x38741f,'region':_0x5a5ae2});var _0x418cb0={'botAlias':_0xd07f('0x6'),'botName':_0x14ce08,'inputText':_0x1e8e98,'userId':_0x4ea2c};return lexResult(_0x396e4b,_0x418cb0);};