@aws-amplify/interactions
Version:
Interactions category of aws-amplify
19 lines (17 loc) • 875 B
JavaScript
;
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
Object.defineProperty(exports, "__esModule", { value: true });
exports.onComplete = onComplete;
const utils_1 = require("@aws-amplify/core/internals/utils");
const utils_2 = require("../utils");
const AWSLexV2Provider_1 = require("../AWSLexV2Provider");
const errors_1 = require("../../errors");
function onComplete(...args) {
const [ctx, input] = (0, utils_1.resolveCtxArgs)(args);
const { botName, callback } = input;
const botConfig = (0, utils_2.resolveBotConfig)(ctx, botName);
(0, errors_1.assertValidationError)(!!botConfig, errors_1.InteractionsValidationErrorCode.NoBotConfig, `Bot ${botName} does not exist.`);
AWSLexV2Provider_1.lexProvider.onComplete(ctx, botConfig, callback);
}
//# sourceMappingURL=onComplete.js.map