Built motion from commit (unavailable).|2.5.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 _0x780d=['slots','hasOwnProperty','exports','$LATEST','aws-sdk','postText'];(function(_0x26464f,_0x3cfeb0){var _0x5dfac8=function(_0x2cc1af){while(--_0x2cc1af){_0x26464f['push'](_0x26464f['shift']());}};_0x5dfac8(++_0x3cfeb0);}(_0x780d,0x136));var _0xd780=function(_0x1bce46,_0x1d6cdc){_0x1bce46=_0x1bce46-0x0;var _0x2a9f8e=_0x780d[_0x1bce46];return _0x2a9f8e;};'use strict';var BPromise=require('bluebird');var AWS=require(_0xd780('0x0'));function lexResult(_0x5ae3a6,_0x244f11){return new BPromise(function(_0x448463,_0x1703c2){_0x5ae3a6[_0xd780('0x1')](_0x244f11,function(_0x32e1d3,_0x1530ae){if(_0x32e1d3){_0x1703c2(_0x32e1d3);}if(_0x1530ae[_0xd780('0x2')]){for(const _0x4fbf77 in _0x1530ae[_0xd780('0x2')]){if(_0x1530ae['slots'][_0xd780('0x3')](_0x4fbf77)){var _0x3c4e49=_0x1530ae[_0xd780('0x2')][_0x4fbf77];_0x1530ae['slot_'+_0x4fbf77]=_0x3c4e49;}}}_0x448463(_0x1530ae);});});}module[_0xd780('0x4')]=function(_0x40823b,_0x2aa344,_0xaecfd7,_0x22ca38,_0x59a32d,_0x1a67b5){var _0x2423a7=new AWS['LexRuntime']({'accessKeyId':_0x2aa344,'secretAccessKey':_0xaecfd7,'region':_0x22ca38});var _0xe8b6f5={'botAlias':_0xd780('0x5'),'botName':_0x1a67b5,'inputText':_0x59a32d,'userId':_0x40823b};return lexResult(_0x2423a7,_0xe8b6f5);};