Built motion from commit (unavailable).|2.6.0
[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 _0x532c=['slot_','exports','LexRuntime','$LATEST','bluebird','aws-sdk','postText','slots','hasOwnProperty'];(function(_0x38da42,_0x443a7d){var _0x4412ea=function(_0x248bd1){while(--_0x248bd1){_0x38da42['push'](_0x38da42['shift']());}};_0x4412ea(++_0x443a7d);}(_0x532c,0x124));var _0xc532=function(_0x5b0fd6,_0x51a24c){_0x5b0fd6=_0x5b0fd6-0x0;var _0x2f6b80=_0x532c[_0x5b0fd6];return _0x2f6b80;};'use strict';var BPromise=require(_0xc532('0x0'));var AWS=require(_0xc532('0x1'));function lexResult(_0x39e2d2,_0x471f1f){return new BPromise(function(_0x4a9d9a,_0x4aee3a){_0x39e2d2[_0xc532('0x2')](_0x471f1f,function(_0x3b087c,_0x44c62c){if(_0x3b087c){_0x4aee3a(_0x3b087c);}if(_0x44c62c[_0xc532('0x3')]){for(const _0x157ba8 in _0x44c62c[_0xc532('0x3')]){if(_0x44c62c[_0xc532('0x3')][_0xc532('0x4')](_0x157ba8)){var _0x5c0629=_0x44c62c[_0xc532('0x3')][_0x157ba8];_0x44c62c[_0xc532('0x5')+_0x157ba8]=_0x5c0629;}}}_0x4a9d9a(_0x44c62c);});});}module[_0xc532('0x6')]=function(_0x374d54,_0x274e48,_0x3a935d,_0x3add3a,_0x437ef8,_0x148c8f){var _0x1411a0=new AWS[(_0xc532('0x7'))]({'accessKeyId':_0x274e48,'secretAccessKey':_0x3a935d,'region':_0x3add3a});var _0x3590a8={'botAlias':_0xc532('0x8'),'botName':_0x148c8f,'inputText':_0x437ef8,'userId':_0x374d54};return lexResult(_0x1411a0,_0x3590a8);};