Built motion from commit (unavailable).|2.5.14
[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 _0xa29e=['slot_','exports','$LATEST','aws-sdk','slots','hasOwnProperty'];(function(_0x21aec3,_0x5c97e9){var _0x288bbc=function(_0x2283fe){while(--_0x2283fe){_0x21aec3['push'](_0x21aec3['shift']());}};_0x288bbc(++_0x5c97e9);}(_0xa29e,0xf3));var _0xea29=function(_0x17c10a,_0xc9ee44){_0x17c10a=_0x17c10a-0x0;var _0x149440=_0xa29e[_0x17c10a];return _0x149440;};'use strict';var BPromise=require('bluebird');var AWS=require(_0xea29('0x0'));function lexResult(_0x2285a9,_0x4a72cc){return new BPromise(function(_0x1d750f,_0x12a726){_0x2285a9['postText'](_0x4a72cc,function(_0x4bd71a,_0x28b573){if(_0x4bd71a){_0x12a726(_0x4bd71a);}if(_0x28b573[_0xea29('0x1')]){for(const _0x171256 in _0x28b573[_0xea29('0x1')]){if(_0x28b573[_0xea29('0x1')][_0xea29('0x2')](_0x171256)){var _0x59ceed=_0x28b573[_0xea29('0x1')][_0x171256];_0x28b573[_0xea29('0x3')+_0x171256]=_0x59ceed;}}}_0x1d750f(_0x28b573);});});}module[_0xea29('0x4')]=function(_0x525e70,_0x3ab5f6,_0x3c1dce,_0xd6d373,_0x316cd7,_0x53ebf9){var _0x133b80=new AWS['LexRuntime']({'accessKeyId':_0x3ab5f6,'secretAccessKey':_0x3c1dce,'region':_0xd6d373});var _0x374104={'botAlias':_0xea29('0x5'),'botName':_0x53ebf9,'inputText':_0x316cd7,'userId':_0x525e70};return lexResult(_0x133b80,_0x374104);};