UNPKG

@aws-amplify/interactions

Version:

Interactions category of aws-amplify

1 lines 1.08 kB
{"version":3,"file":"send.mjs","sources":["../../../../src/lex-v1/apis/send.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { resolveBotConfig } from '../utils';\nimport { lexProvider } from '../AWSLexProvider';\nimport { InteractionsValidationErrorCode, assertValidationError, } from '../../errors';\nexport const send = async (input) => {\n const { botName, message } = input;\n const botConfig = resolveBotConfig(botName);\n assertValidationError(!!botConfig, InteractionsValidationErrorCode.NoBotConfig, `Bot ${botName} does not exist.`);\n return lexProvider.sendMessage(botConfig, message);\n};\n"],"names":[],"mappings":";;;;;AAAA;AACA;AAIY,MAAC,IAAI,GAAG,OAAO,KAAK,KAAK;AACrC,IAAI,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;AACvC,IAAI,MAAM,SAAS,GAAG,gBAAgB,CAAC,OAAO,CAAC,CAAC;AAChD,IAAI,qBAAqB,CAAC,CAAC,CAAC,SAAS,EAAE,+BAA+B,CAAC,WAAW,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC;AACtH,IAAI,OAAO,WAAW,CAAC,WAAW,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;AACvD;;;;"}