/* eslint-disable */ /** * This file was automatically generated by json-schema-to-typescript. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run json-schema-to-typescript to regenerate this file. */ /** * Unique ID of resource */ export type Id = string; export type BotArn = string; /** * Unique name for a resource. */ export type Name = string; /** * A description of the resource */ export type Description = string; /** * The Amazon Resource Name (ARN) of an IAM role that has permission to access the bot. */ export type RoleArn = string; /** * The identifier of the language and locale that the bot will be used in. */ export type LocaleId = string; /** * The specified confidence threshold for inserting the AMAZON.FallbackIntent and AMAZON.KendraSearchIntent intents. */ export type ConfidenceThreshold = number; /** * A unique identifier for the built-in intent to base this intent on. */ export type ParentIntentSignature = string; /** * The sample utterance that Amazon Lex uses to build its machine-learning model to recognize intents/slots. */ export type Utterance = string; /** * A sample utterance that invokes an intent or respond to a slot elicitation prompt. */ export type SampleUtterancesList = SampleUtterance[]; /** * One to 5 message groups that contain update messages. Amazon Lex chooses one of the messages to play to the user. * * @minItems 1 * @maxItems 5 */ export type MessageGroupsList = | [MessageGroup] | [MessageGroup, MessageGroup] | [MessageGroup, MessageGroup, MessageGroup] | [MessageGroup, MessageGroup, MessageGroup, MessageGroup] | [MessageGroup, MessageGroup, MessageGroup, MessageGroup, MessageGroup]; /** * A list of one or more values that the user provided for the slot. For example, for a slot that elicits pizza toppings, the values might be "pepperoni" and "pineapple." */ export type SlotValues = SlotValueOverride[]; /** * A list of conditional branches. A conditional branch is made up of a condition, a response and a next step. The response and next step are executed when the condition is true. * * @minItems 1 * @maxItems 4 */ export type ConditionalBranches = | [ConditionalBranch] | [ConditionalBranch, ConditionalBranch] | [ConditionalBranch, ConditionalBranch, ConditionalBranch] | [ConditionalBranch, ConditionalBranch, ConditionalBranch, ConditionalBranch]; /** * The maximum number of times the bot tries to elicit a response from the user using this prompt. */ export type PromptMaxRetries = number; /** * Indicates how a message is selected from a message group among retries. */ export type MessageSelectionStrategy = "Random" | "Ordered"; /** * The list of input contexts specified for the intent. * * @maxItems 5 */ export type InputContextsList = | [] | [InputContext] | [InputContext, InputContext] | [InputContext, InputContext, InputContext] | [InputContext, InputContext, InputContext, InputContext] | [InputContext, InputContext, InputContext, InputContext, InputContext]; /** * A list of contexts that the intent activates when it is fulfilled. * * @maxItems 10 */ export type OutputContextsList = | [] | [OutputContext] | [OutputContext, OutputContext] | [OutputContext, OutputContext, OutputContext] | [OutputContext, OutputContext, OutputContext, OutputContext] | [OutputContext, OutputContext, OutputContext, OutputContext, OutputContext] | [OutputContext, OutputContext, OutputContext, OutputContext, OutputContext, OutputContext] | [OutputContext, OutputContext, OutputContext, OutputContext, OutputContext, OutputContext, OutputContext] | [ OutputContext, OutputContext, OutputContext, OutputContext, OutputContext, OutputContext, OutputContext, OutputContext ] | [ OutputContext, OutputContext, OutputContext, OutputContext, OutputContext, OutputContext, OutputContext, OutputContext, OutputContext ] | [ OutputContext, OutputContext, OutputContext, OutputContext, OutputContext, OutputContext, OutputContext, OutputContext, OutputContext, OutputContext ]; /** * The amount of time, in seconds, that the output context should remain active. */ export type ContextTimeToLiveInSeconds = number; /** * The number of conversation turns that the output context should remain active. */ export type ContextTurnsToLive = number; /** * The Amazon Resource Name (ARN) of the Amazon Kendra index that you want the AMAZON.KendraSearchIntent intent to search. */ export type KendraIndexArn = string; /** * A query filter that Amazon Lex sends to Amazon Kendra to filter the response from a query. */ export type QueryFilterString = string; /** * The priority that a slot should be elicited. */ export type PriorityValue = number; /** * List for slot priorities */ export type SlotPrioritiesList = SlotPriority[]; /** * The slot type name that is used in the slot. Allows for custom and built-in slot type names */ export type SlotTypeName = string; /** * If you know a specific pattern that users might respond to an Amazon Lex request for a slot value, you can provide those utterances to improve accuracy. */ export type SampleUtterancesList1 = SampleUtterance[]; /** * How often a message should be sent to the user in seconds. */ export type StillWaitingResponseFrequency = number; /** * If Amazon Lex waits longer than this length of time in seconds for a response, it will stop sending messages. */ export type StillWaitingResponseTimeout = number; /** * The built-in slot type used as a parent of this slot type. */ export type ParentSlotTypeSignature = string; /** * Additional values related to the slot type entry. * * @maxItems 10000 */ export type SynonymList = SampleValue[]; /** * A List of slot type values * * @maxItems 10000 */ export type SlotTypeValues = SlotTypeValue[]; export type SlotValueResolutionStrategy = "ORIGINAL_VALUE" | "TOP_RESOLUTION"; /** * Enables using slot values as a custom vocabulary when recognizing user utterances. */ export type AudioRecognitionStrategy = "UseSlotValuesAsCustomVocabulary"; /** * @maxItems 500 */ export type CustomVocabularyItems = CustomVocabularyItem[]; /** * A list of bot alias locale settings to add to the bot alias. * * @maxItems 50 */ export type BotAliasLocaleSettingsList = BotAliasLocaleSettingsItem[]; /** * List of audio log settings that pertain to the conversation log settings for the bot's TestBotAlias. * * @maxItems 1 */ export type AudioLogSettings = [] | [AudioLogSetting]; /** * List of text log settings that pertain to the conversation log settings for the bot's TestBotAlias * * @maxItems 1 */ export type TextLogSettings = [] | [TextLogSetting]; /** * Amazon Lex conversational bot performing automated tasks such as ordering a pizza, booking a hotel, and so on. */ export interface AwsLexBot { Id?: Id; Arn?: BotArn; Name: Name; Description?: Description; RoleArn: RoleArn; /** * Data privacy setting of the Bot. */ DataPrivacy: { ChildDirected: boolean; }; /** * IdleSessionTTLInSeconds of the resource */ IdleSessionTTLInSeconds: number; /** * List of bot locales */ BotLocales?: BotLocale[]; BotFileS3Location?: S3Location; /** * A list of tags to add to the bot, which can only be added at bot creation. * * @maxItems 200 */ BotTags?: Tag[]; /** * A list of tags to add to the test alias for a bot, , which can only be added at bot/bot alias creation. * * @maxItems 200 */ TestBotAliasTags?: Tag[]; /** * Specifies whether to build the bot locales after bot creation completes. */ AutoBuildBotLocales?: boolean; TestBotAliasSettings?: TestBotAliasSettings; } /** * A locale in the bot, which contains the intents and slot types that the bot uses in conversations with users in the specified language and locale. */ export interface BotLocale { LocaleId: LocaleId; Description?: Description; VoiceSettings?: VoiceSettings; NluConfidenceThreshold: ConfidenceThreshold; /** * List of intents * * @maxItems 1000 */ Intents?: Intent[]; /** * List of SlotTypes * * @maxItems 250 */ SlotTypes?: SlotType[]; CustomVocabulary?: CustomVocabulary; } /** * Settings for using an Amazon Polly voice to communicate with a user. */ export interface VoiceSettings { /** * The Amazon Polly voice ID that Amazon Lex uses for voice interaction with the user. */ VoiceId: string; /** * Indicates the type of Amazon Polly voice that Amazon Lex should use for voice interaction with the user. For more information, see the engine parameter of the SynthesizeSpeech operation in the Amazon Polly developer guide. */ Engine?: "standard" | "neural"; } /** * Represents an action that the user wants to perform. */ export interface Intent { /** * Unique name for a resource. */ Name: string; /** * A description of the resource */ Description?: string; ParentIntentSignature?: ParentIntentSignature; SampleUtterances?: SampleUtterancesList; DialogCodeHook?: DialogCodeHookSetting; FulfillmentCodeHook?: FulfillmentCodeHookSetting; IntentConfirmationSetting?: IntentConfirmationSetting; IntentClosingSetting?: IntentClosingSetting; InitialResponseSetting?: InitialResponseSetting; InputContexts?: InputContextsList; OutputContexts?: OutputContextsList; KendraConfiguration?: KendraConfiguration; SlotPriorities?: SlotPrioritiesList; /** * List of slots * * @maxItems 100 */ Slots?: Slot[]; } /** * A sample utterance that invokes an intent or respond to a slot elicitation prompt. */ export interface SampleUtterance { Utterance: Utterance; } /** * Settings that determine the Lambda function that Amazon Lex uses for processing user responses. */ export interface DialogCodeHookSetting { Enabled: boolean; } /** * Settings that determine if a Lambda function should be invoked to fulfill a specific intent. */ export interface FulfillmentCodeHookSetting { FulfillmentUpdatesSpecification?: FulfillmentUpdatesSpecification; PostFulfillmentStatusSpecification?: PostFulfillmentStatusSpecification; Enabled: boolean; /** * Determines whether the fulfillment code hook is used. When active is false, the code hook doesn't run. */ IsActive?: boolean; } /** * Provides information for updating the user on the progress of fulfilling an intent. */ export interface FulfillmentUpdatesSpecification { StartResponse?: FulfillmentStartResponseSpecification; UpdateResponse?: FulfillmentUpdateResponseSpecification; /** * The length of time that the fulfillment Lambda function should run before it times out. */ TimeoutInSeconds?: number; /** * Determines whether fulfillment updates are sent to the user. When this field is true, updates are sent. */ Active: boolean; } /** * Provides settings for a message that is sent to the user when a fulfillment Lambda function starts running. */ export interface FulfillmentStartResponseSpecification { MessageGroups: MessageGroupsList; /** * The delay between when the Lambda fulfillment function starts running and the start message is played. If the Lambda function returns before the delay is over, the start message isn't played. */ DelayInSeconds: number; /** * Determines whether the user can interrupt the start message while it is playing. */ AllowInterrupt?: boolean; } /** * One or more messages that Amazon Lex can send to the user. */ export interface MessageGroup { Message: Message; /** * Message variations to send to the user. * * @maxItems 2 */ Variations?: [] | [Message] | [Message, Message]; } /** * The primary message that Amazon Lex should send to the user. */ export interface Message { PlainTextMessage?: PlainTextMessage; CustomPayload?: CustomPayload; SSMLMessage?: SSMLMessage; ImageResponseCard?: ImageResponseCard; } /** * A message in plain text format. */ export interface PlainTextMessage { /** * The message to send to the user. */ Value: string; } /** * A message in a custom format defined by the client application. */ export interface CustomPayload { /** * The string that is sent to your application. */ Value: string; } /** * A message in Speech Synthesis Markup Language (SSML). */ export interface SSMLMessage { /** * The SSML text that defines the prompt. */ Value: string; } /** * A message that defines a response card that the client application can show to the user. */ export interface ImageResponseCard { /** * The title to display on the response card. */ Title: string; /** * The subtitle to display on the response card. */ Subtitle?: string; /** * The URL of an image to display on the response card. */ ImageUrl?: string; /** * A list of buttons that should be displayed on the response card. * * @maxItems 5 */ Buttons?: | [] | [Button] | [Button, Button] | [Button, Button, Button] | [Button, Button, Button, Button] | [Button, Button, Button, Button, Button]; } /** * A button to use on a response card used to gather slot values from a user. */ export interface Button { /** * The text that appears on the button. */ Text: string; /** * The value returned to Amazon Lex when the user chooses this button. */ Value: string; } /** * Provides settings for a message that is sent periodically to the user while a fulfillment Lambda function is running. */ export interface FulfillmentUpdateResponseSpecification { MessageGroups: MessageGroupsList; /** * The frequency that a message is sent to the user. When the period ends, Amazon Lex chooses a message from the message groups and plays it to the user. If the fulfillment Lambda returns before the first period ends, an update message is not played to the user. */ FrequencyInSeconds: number; /** * Determines whether the user can interrupt an update message while it is playing. */ AllowInterrupt?: boolean; } /** * Provides a setting that determines whether the post-fulfillment response is sent to the user. */ export interface PostFulfillmentStatusSpecification { SuccessResponse?: ResponseSpecification; SuccessNextStep?: DialogState; SuccessConditional?: ConditionalSpecification; FailureResponse?: ResponseSpecification3; FailureNextStep?: DialogState3; FailureConditional?: ConditionalSpecification1; TimeoutResponse?: ResponseSpecification4; TimeoutNextStep?: DialogState4; TimeoutConditional?: ConditionalSpecification2; } /** * Specifies a list of message groups that Amazon Lex uses to respond the user input. */ export interface ResponseSpecification { MessageGroupsList: MessageGroupsList; /** * Indicates whether the user can interrupt a speech prompt from the bot. */ AllowInterrupt?: boolean; } /** * Specifies the next step in the conversation that Amazon Lex invokes when the fulfillment code hook completes successfully. */ export interface DialogState { DialogAction?: DialogAction; Intent?: IntentOverride; /** * List of session attributes to be applied when the conversation reaches this step. */ SessionAttributes?: SessionAttribute[]; } /** * Defines the action that the bot executes at runtime when the conversation reaches this step. */ export interface DialogAction { /** * The action that the bot should execute. */ Type: | "CloseIntent" | "ConfirmIntent" | "ElicitIntent" | "ElicitSlot" | "StartIntent" | "FulfillIntent" | "EndConversation" | "EvaluateConditional" | "InvokeDialogCodeHook"; /** * If the dialog action is ElicitSlot, defines the slot to elicit from the user. */ SlotToElicit?: string; /** * When true the next message for the intent is not used. */ SuppressNextMessage?: boolean; } /** * Override settings to configure the intent state. */ export interface IntentOverride { /** * The name of the intent. Only required when you're switching intents. */ Name?: string; /** * A map of all of the slot value overrides for the intent. */ Slots?: SlotValueOverrideMap[]; } /** * A map of slot names and their overridden values. */ export interface SlotValueOverrideMap { SlotName?: Name; SlotValueOverride?: SlotValueOverride; } /** * The slot values that Amazon Lex uses when it sets slot values in a dialog step. */ export interface SlotValueOverride { /** * When the shape value is List, it indicates that the values field contains a list of slot values. When the value is Scalar, it indicates that the value field contains a single value. */ Shape?: "Scalar" | "List"; Value?: SlotValue; Values?: SlotValues; } /** * The current value of the slot. */ export interface SlotValue { /** * The value that Amazon Lex determines for the slot. */ InterpretedValue?: string; } /** * Key/value pair representing session-specific context information. It contains application information passed between Amazon Lex and a client application. */ export interface SessionAttribute { Key: string; Value?: string; } /** * A list of conditional branches to evaluate after the fulfillment code hook finishes successfully. */ export interface ConditionalSpecification { /** * Determines whether a conditional branch is active. When active is false, the conditions are not evaluated. */ IsActive: boolean; ConditionalBranches: ConditionalBranches; DefaultBranch: DefaultConditionalBranch; } /** * A set of actions that Amazon Lex should run if the condition is matched. */ export interface ConditionalBranch { /** * Unique name for a resource. */ Name: string; Condition: Condition; NextStep: DialogState1; Response?: ResponseSpecification1; } /** * Contains the expression to evaluate. If the condition is true, the branch's actions are taken. */ export interface Condition { /** * The expression string that is evaluated. */ ExpressionString: string; } /** * The next step in the conversation. */ export interface DialogState1 { DialogAction?: DialogAction; Intent?: IntentOverride; /** * List of session attributes to be applied when the conversation reaches this step. */ SessionAttributes?: SessionAttribute[]; } /** * Specifies a list of message groups that Amazon Lex uses to respond the user input. */ export interface ResponseSpecification1 { MessageGroupsList: MessageGroupsList; /** * Indicates whether the user can interrupt a speech prompt from the bot. */ AllowInterrupt?: boolean; } /** * The conditional branch that should be followed when the conditions for other branches are not satisfied. A conditional branch is made up of a condition, a response and a next step. */ export interface DefaultConditionalBranch { NextStep?: DialogState2; Response?: ResponseSpecification2; } /** * The next step in the conversation. */ export interface DialogState2 { DialogAction?: DialogAction; Intent?: IntentOverride; /** * List of session attributes to be applied when the conversation reaches this step. */ SessionAttributes?: SessionAttribute[]; } /** * Specifies a list of message groups that Amazon Lex uses to respond the user input. */ export interface ResponseSpecification2 { MessageGroupsList: MessageGroupsList; /** * Indicates whether the user can interrupt a speech prompt from the bot. */ AllowInterrupt?: boolean; } /** * Specifies a list of message groups that Amazon Lex uses to respond the user input. */ export interface ResponseSpecification3 { MessageGroupsList: MessageGroupsList; /** * Indicates whether the user can interrupt a speech prompt from the bot. */ AllowInterrupt?: boolean; } /** * Specifies the next step the bot runs after the fulfillment code hook throws an exception or returns with the State field of the Intent object set to Failed. */ export interface DialogState3 { DialogAction?: DialogAction; Intent?: IntentOverride; /** * List of session attributes to be applied when the conversation reaches this step. */ SessionAttributes?: SessionAttribute[]; } /** * A list of conditional branches to evaluate after the fulfillment code hook throws an exception or returns with the State field of the Intent object set to Failed. */ export interface ConditionalSpecification1 { /** * Determines whether a conditional branch is active. When active is false, the conditions are not evaluated. */ IsActive: boolean; ConditionalBranches: ConditionalBranches; DefaultBranch: DefaultConditionalBranch; } /** * Specifies a list of message groups that Amazon Lex uses to respond the user input. */ export interface ResponseSpecification4 { MessageGroupsList: MessageGroupsList; /** * Indicates whether the user can interrupt a speech prompt from the bot. */ AllowInterrupt?: boolean; } /** * Specifies the next step that the bot runs when the fulfillment code hook times out. */ export interface DialogState4 { DialogAction?: DialogAction; Intent?: IntentOverride; /** * List of session attributes to be applied when the conversation reaches this step. */ SessionAttributes?: SessionAttribute[]; } /** * A list of conditional branches to evaluate if the fulfillment code hook times out. */ export interface ConditionalSpecification2 { /** * Determines whether a conditional branch is active. When active is false, the conditions are not evaluated. */ IsActive: boolean; ConditionalBranches: ConditionalBranches; DefaultBranch: DefaultConditionalBranch; } /** * Provides a prompt for making sure that the user is ready for the intent to be fulfilled. */ export interface IntentConfirmationSetting { PromptSpecification: PromptSpecification; /** * Specifies whether the intent's confirmation is sent to the user. When this field is false, confirmation and declination responses aren't sent. If the active field isn't specified, the default is true. */ IsActive?: boolean; ConfirmationResponse?: ResponseSpecification5; ConfirmationNextStep?: DialogState5; ConfirmationConditional?: ConditionalSpecification3; DeclinationResponse?: ResponseSpecification6; DeclinationNextStep?: DialogState6; DeclinationConditional?: ConditionalSpecification4; FailureResponse?: ResponseSpecification7; FailureNextStep?: DialogState7; FailureConditional?: ConditionalSpecification5; CodeHook?: DialogCodeHookInvocationSetting; ElicitationCodeHook?: ElicitationCodeHookInvocationSetting; } /** * Prompts the user to confirm the intent. This question should have a yes or no answer. */ export interface PromptSpecification { MessageGroupsList: MessageGroupsList; MaxRetries: PromptMaxRetries; /** * Indicates whether the user can interrupt a speech prompt from the bot. */ AllowInterrupt?: boolean; MessageSelectionStrategy?: MessageSelectionStrategy; /** * Specifies the advanced settings on each attempt of the prompt. */ PromptAttemptsSpecification?: { [k: string]: PromptAttemptSpecification; }; } /** * Specifies the settings on a prompt attempt. * * This interface was referenced by `undefined`'s JSON-Schema definition * via the `patternProperty` "^(Initial|Retry1|Retry2|Retry3|Retry4|Retry5)$". */ export interface PromptAttemptSpecification { AllowedInputTypes: AllowedInputTypes; /** * Indicates whether the user can interrupt a speech prompt attempt from the bot. */ AllowInterrupt?: boolean; AudioAndDTMFInputSpecification?: AudioAndDTMFInputSpecification; TextInputSpecification?: TextInputSpecification; } /** * Specifies the allowed input types. */ export interface AllowedInputTypes { /** * Indicates whether audio input is allowed. */ AllowAudioInput: boolean; /** * Indicates whether DTMF input is allowed. */ AllowDTMFInput: boolean; } /** * Specifies the audio and DTMF input specification. */ export interface AudioAndDTMFInputSpecification { /** * Time for which a bot waits before assuming that the customer isn't going to speak or press a key. This timeout is shared between Audio and DTMF inputs. */ StartTimeoutMs: number; DTMFSpecification?: DTMFSpecification; AudioSpecification?: AudioSpecification; } /** * Specifies the settings on DTMF input. */ export interface DTMFSpecification { /** * The DTMF character that clears the accumulated DTMF digits and immediately ends the input. */ DeletionCharacter: string; /** * The DTMF character that immediately ends input. If the user does not press this character, the input ends after the end timeout. */ EndCharacter: string; /** * How long the bot should wait after the last DTMF character input before assuming that the input has concluded. */ EndTimeoutMs: number; /** * The maximum number of DTMF digits allowed in an utterance. */ MaxLength: number; } /** * Specifies the audio input specifications. */ export interface AudioSpecification { /** * Time for which a bot waits after the customer stops speaking to assume the utterance is finished. */ EndTimeoutMs: number; /** * Time for how long Amazon Lex waits before speech input is truncated and the speech is returned to application. */ MaxLengthMs: number; } /** * Specifies the text input specifications. */ export interface TextInputSpecification { /** * Time for which a bot waits before re-prompting a customer for text input. */ StartTimeoutMs: number; } /** * Specifies a list of message groups that Amazon Lex uses to respond the user input. */ export interface ResponseSpecification5 { MessageGroupsList: MessageGroupsList; /** * Indicates whether the user can interrupt a speech prompt from the bot. */ AllowInterrupt?: boolean; } /** * Specifies the next step that the bot executes when the customer confirms the intent. */ export interface DialogState5 { DialogAction?: DialogAction; Intent?: IntentOverride; /** * List of session attributes to be applied when the conversation reaches this step. */ SessionAttributes?: SessionAttribute[]; } /** * A list of conditional branches to evaluate after the intent is closed. */ export interface ConditionalSpecification3 { /** * Determines whether a conditional branch is active. When active is false, the conditions are not evaluated. */ IsActive: boolean; ConditionalBranches: ConditionalBranches; DefaultBranch: DefaultConditionalBranch; } /** * When the user answers "no" to the question defined in promptSpecification, Amazon Lex responds with this response to acknowledge that the intent was canceled. */ export interface ResponseSpecification6 { MessageGroupsList: MessageGroupsList; /** * Indicates whether the user can interrupt a speech prompt from the bot. */ AllowInterrupt?: boolean; } /** * Specifies the next step that the bot executes when the customer declines the intent. */ export interface DialogState6 { DialogAction?: DialogAction; Intent?: IntentOverride; /** * List of session attributes to be applied when the conversation reaches this step. */ SessionAttributes?: SessionAttribute[]; } /** * A list of conditional branches to evaluate after the intent is declined. */ export interface ConditionalSpecification4 { /** * Determines whether a conditional branch is active. When active is false, the conditions are not evaluated. */ IsActive: boolean; ConditionalBranches: ConditionalBranches; DefaultBranch: DefaultConditionalBranch; } /** * Specifies a list of message groups that Amazon Lex uses to respond the user input. */ export interface ResponseSpecification7 { MessageGroupsList: MessageGroupsList; /** * Indicates whether the user can interrupt a speech prompt from the bot. */ AllowInterrupt?: boolean; } /** * The next step to take in the conversation if the confirmation step fails. */ export interface DialogState7 { DialogAction?: DialogAction; Intent?: IntentOverride; /** * List of session attributes to be applied when the conversation reaches this step. */ SessionAttributes?: SessionAttribute[]; } /** * Provides a list of conditional branches. Branches are evaluated in the order that they are entered in the list. The first branch with a condition that evaluates to true is executed. The last branch in the list is the default branch. The default branch should not have any condition expression. The default branch is executed if no other branch has a matching condition. */ export interface ConditionalSpecification5 { /** * Determines whether a conditional branch is active. When active is false, the conditions are not evaluated. */ IsActive: boolean; ConditionalBranches: ConditionalBranches; DefaultBranch: DefaultConditionalBranch; } /** * The DialogCodeHookInvocationSetting object associated with intent's confirmation step. The dialog code hook is triggered based on these invocation settings when the confirmation next step or declination next step or failure next step is InvokeDialogCodeHook. */ export interface DialogCodeHookInvocationSetting { /** * Indicates whether a Lambda function should be invoked for the dialog. */ EnableCodeHookInvocation: boolean; /** * Determines whether a dialog code hook is used when the intent is activated. */ IsActive: boolean; /** * Unique name for a resource. */ InvocationLabel?: string; PostCodeHookSpecification: PostDialogCodeHookInvocationSpecification; } /** * Contains the responses and actions that Amazon Lex takes after the Lambda function is complete. */ export interface PostDialogCodeHookInvocationSpecification { SuccessResponse?: ResponseSpecification8; SuccessNextStep?: DialogState8; SuccessConditional?: ConditionalSpecification6; FailureResponse?: ResponseSpecification9; FailureNextStep?: DialogState9; FailureConditional?: ConditionalSpecification7; TimeoutResponse?: ResponseSpecification10; TimeoutNextStep?: DialogState10; TimeoutConditional?: ConditionalSpecification8; } /** * Specifies a list of message groups that Amazon Lex uses to respond the user input. */ export interface ResponseSpecification8 { MessageGroupsList: MessageGroupsList; /** * Indicates whether the user can interrupt a speech prompt from the bot. */ AllowInterrupt?: boolean; } /** * Specifics the next step the bot runs after the dialog code hook finishes successfully. */ export interface DialogState8 { DialogAction?: DialogAction; Intent?: IntentOverride; /** * List of session attributes to be applied when the conversation reaches this step. */ SessionAttributes?: SessionAttribute[]; } /** * A list of conditional branches to evaluate after the dialog code hook finishes successfully. */ export interface ConditionalSpecification6 { /** * Determines whether a conditional branch is active. When active is false, the conditions are not evaluated. */ IsActive: boolean; ConditionalBranches: ConditionalBranches; DefaultBranch: DefaultConditionalBranch; } /** * Specifies a list of message groups that Amazon Lex uses to respond the user input. */ export interface ResponseSpecification9 { MessageGroupsList: MessageGroupsList; /** * Indicates whether the user can interrupt a speech prompt from the bot. */ AllowInterrupt?: boolean; } /** * Specifies the next step the bot runs after the dialog code hook throws an exception or returns with the State field of the Intent object set to Failed. */ export interface DialogState9 { DialogAction?: DialogAction; Intent?: IntentOverride; /** * List of session attributes to be applied when the conversation reaches this step. */ SessionAttributes?: SessionAttribute[]; } /** * A list of conditional branches to evaluate after the dialog code hook throws an exception or returns with the State field of the Intent object set to Failed. */ export interface ConditionalSpecification7 { /** * Determines whether a conditional branch is active. When active is false, the conditions are not evaluated. */ IsActive: boolean; ConditionalBranches: ConditionalBranches; DefaultBranch: DefaultConditionalBranch; } /** * Specifies a list of message groups that Amazon Lex uses to respond the user input. */ export interface ResponseSpecification10 { MessageGroupsList: MessageGroupsList; /** * Indicates whether the user can interrupt a speech prompt from the bot. */ AllowInterrupt?: boolean; } /** * Specifies the next step that the bot runs when the code hook times out. */ export interface DialogState10 { DialogAction?: DialogAction; Intent?: IntentOverride; /** * List of session attributes to be applied when the conversation reaches this step. */ SessionAttributes?: SessionAttribute[]; } /** * A list of conditional branches to evaluate if the code hook times out. */ export interface ConditionalSpecification8 { /** * Determines whether a conditional branch is active. When active is false, the conditions are not evaluated. */ IsActive: boolean; ConditionalBranches: ConditionalBranches; DefaultBranch: DefaultConditionalBranch; } /** * The DialogCodeHookInvocationSetting used when the code hook is invoked during confirmation prompt retries. */ export interface ElicitationCodeHookInvocationSetting { /** * Indicates whether a Lambda function should be invoked for the dialog. */ EnableCodeHookInvocation: boolean; /** * Unique name for a resource. */ InvocationLabel?: string; } /** * Provides a statement the Amazon Lex conveys to the user when the intent is successfully fulfilled. */ export interface IntentClosingSetting { ClosingResponse?: ResponseSpecification11; /** * Specifies whether an intent's closing response is used. When this field is false, the closing response isn't sent to the user. If the active field isn't specified, the default is true. */ IsActive?: boolean; Conditional?: ConditionalSpecification9; NextStep?: DialogState11; } /** * The response that Amazon Lex sends to the user when the intent is complete. */ export interface ResponseSpecification11 { MessageGroupsList: MessageGroupsList; /** * Indicates whether the user can interrupt a speech prompt from the bot. */ AllowInterrupt?: boolean; } /** * A list of conditional branches associated with the intent's closing response. These branches are executed when the nextStep attribute is set to EvalutateConditional. */ export interface ConditionalSpecification9 { /** * Determines whether a conditional branch is active. When active is false, the conditions are not evaluated. */ IsActive: boolean; ConditionalBranches: ConditionalBranches; DefaultBranch: DefaultConditionalBranch; } /** * Specifies the next step that the bot executes after playing the intent's closing response. */ export interface DialogState11 { DialogAction?: DialogAction; Intent?: IntentOverride; /** * List of session attributes to be applied when the conversation reaches this step. */ SessionAttributes?: SessionAttribute[]; } /** * Configuration setting for a response sent to the user before Amazon Lex starts eliciting slots. */ export interface InitialResponseSetting { InitialResponse?: ResponseSpecification12; NextStep?: DialogState12; Conditional?: ConditionalSpecification10; CodeHook?: DialogCodeHookInvocationSetting1; } /** * Specifies a list of message groups that Amazon Lex uses to respond the user input. */ export interface ResponseSpecification12 { MessageGroupsList: MessageGroupsList; /** * Indicates whether the user can interrupt a speech prompt from the bot. */ AllowInterrupt?: boolean; } /** * The next step in the conversation. */ export interface DialogState12 { DialogAction?: DialogAction; Intent?: IntentOverride; /** * List of session attributes to be applied when the conversation reaches this step. */ SessionAttributes?: SessionAttribute[]; } /** * Provides a list of conditional branches. Branches are evaluated in the order that they are entered in the list. The first branch with a condition that evaluates to true is executed. The last branch in the list is the default branch. The default branch should not have any condition expression. The default branch is executed if no other branch has a matching condition. */ export interface ConditionalSpecification10 { /** * Determines whether a conditional branch is active. When active is false, the conditions are not evaluated. */ IsActive: boolean; ConditionalBranches: ConditionalBranches; DefaultBranch: DefaultConditionalBranch; } /** * Settings that specify the dialog code hook that is called by Amazon Lex at a step of the conversation. */ export interface DialogCodeHookInvocationSetting1 { /** * Indicates whether a Lambda function should be invoked for the dialog. */ EnableCodeHookInvocation: boolean; /** * Determines whether a dialog code hook is used when the intent is activated. */ IsActive: boolean; /** * Unique name for a resource. */ InvocationLabel?: string; PostCodeHookSpecification: PostDialogCodeHookInvocationSpecification; } /** * InputContext specified for the intent. */ export interface InputContext { /** * Unique name for a resource. */ Name: string; } /** * A session context that is activated when an intent is fulfilled. */ export interface OutputContext { Name: Name; TimeToLiveInSeconds: ContextTimeToLiveInSeconds; TurnsToLive: ContextTurnsToLive; } /** * Configuration for searching a Amazon Kendra index specified for the intent. */ export interface KendraConfiguration { KendraIndex: KendraIndexArn; /** * Determines whether the AMAZON.KendraSearchIntent intent uses a custom query string to query the Amazon Kendra index. */ QueryFilterStringEnabled?: boolean; QueryFilterString?: QueryFilterString; } /** * The priority that Amazon Lex should use when eliciting slot values from a user. */ export interface SlotPriority { Priority: PriorityValue; /** * Unique name for a resource. */ SlotName: string; } /** * A slot is a variable needed to fulfill an intent, where an intent can require zero or more slots. */ export interface Slot { Name: Name; Description?: Description; SlotTypeName: SlotTypeName; ValueElicitationSetting: SlotValueElicitationSetting; ObfuscationSetting?: ObfuscationSetting; MultipleValuesSetting?: MultipleValuesSetting; } /** * Settings that you can use for eliciting a slot value. */ export interface SlotValueElicitationSetting { DefaultValueSpecification?: SlotDefaultValueSpecification; /** * Specifies whether the slot is required or optional. */ SlotConstraint: "Required" | "Optional"; PromptSpecification?: PromptSpecification1; SampleUtterances?: SampleUtterancesList1; WaitAndContinueSpecification?: WaitAndContinueSpecification; SlotCaptureSetting?: SlotCaptureSetting; } /** * A list of default values for a slot. */ export interface SlotDefaultValueSpecification { /** * A list of slot default values * * @maxItems 10 */ DefaultValueList: | [] | [SlotDefaultValue] | [SlotDefaultValue, SlotDefaultValue] | [SlotDefaultValue, SlotDefaultValue, SlotDefaultValue] | [SlotDefaultValue, SlotDefaultValue, SlotDefaultValue, SlotDefaultValue] | [SlotDefaultValue, SlotDefaultValue, SlotDefaultValue, SlotDefaultValue, SlotDefaultValue] | [SlotDefaultValue, SlotDefaultValue, SlotDefaultValue, SlotDefaultValue, SlotDefaultValue, SlotDefaultValue] | [ SlotDefaultValue, SlotDefaultValue, SlotDefaultValue, SlotDefaultValue, SlotDefaultValue, SlotDefaultValue, SlotDefaultValue ] | [ SlotDefaultValue, SlotDefaultValue, SlotDefaultValue, SlotDefaultValue, SlotDefaultValue, SlotDefaultValue, SlotDefaultValue, SlotDefaultValue ] | [ SlotDefaultValue, SlotDefaultValue, SlotDefaultValue, SlotDefaultValue, SlotDefaultValue, SlotDefaultValue, SlotDefaultValue, SlotDefaultValue, SlotDefaultValue ] | [ SlotDefaultValue, SlotDefaultValue, SlotDefaultValue, SlotDefaultValue, SlotDefaultValue, SlotDefaultValue, SlotDefaultValue, SlotDefaultValue, SlotDefaultValue, SlotDefaultValue ]; } /** * The default value to use when a user doesn't provide a value for a slot. */ export interface SlotDefaultValue { /** * The default value to use when a user doesn't provide a value for a slot. */ DefaultValue: string; } /** * The prompt that Amazon Lex uses to elicit the slot value from the user. */ export interface PromptSpecification1 { MessageGroupsList: MessageGroupsList; MaxRetries: PromptMaxRetries; /** * Indicates whether the user can interrupt a speech prompt from the bot. */ AllowInterrupt?: boolean; MessageSelectionStrategy?: MessageSelectionStrategy; /** * Specifies the advanced settings on each attempt of the prompt. */ PromptAttemptsSpecification?: { [k: string]: PromptAttemptSpecification; }; } /** * Specifies the prompts that Amazon Lex uses while a bot is waiting for customer input. */ export interface WaitAndContinueSpecification { WaitingResponse: ResponseSpecification13; ContinueResponse: ResponseSpecification14; StillWaitingResponse?: StillWaitingResponseSpecification; /** * Specifies whether the bot will wait for a user to respond. */ IsActive?: boolean; } /** * The response that Amazon Lex sends to indicate that the bot is waiting for the conversation to continue. */ export interface ResponseSpecification13 { MessageGroupsList: MessageGroupsList; /** * Indicates whether the user can interrupt a speech prompt from the bot. */ AllowInterrupt?: boolean; } /** * The response that Amazon Lex sends to indicate that the bot is ready to continue the conversation. */ export interface ResponseSpecification14 { MessageGroupsList: MessageGroupsList; /** * Indicates whether the user can interrupt a speech prompt from the bot. */ AllowInterrupt?: boolean; } /** * The response that Amazon Lex sends periodically to the user to indicate that the bot is still waiting for input from the user. */ export interface StillWaitingResponseSpecification { MessageGroupsList: MessageGroupsList; FrequencyInSeconds: StillWaitingResponseFrequency; TimeoutInSeconds: StillWaitingResponseTimeout; /** * Indicates whether the user can interrupt a speech prompt from the bot. */ AllowInterrupt?: boolean; } /** * Specifies the next stage in the conversation after capturing the slot. */ export interface SlotCaptureSetting { CaptureResponse?: ResponseSpecification15; CaptureNextStep?: DialogState13; CaptureConditional?: ConditionalSpecification11; FailureResponse?: ResponseSpecification16; FailureNextStep?: DialogState14; FailureConditional?: ConditionalSpecification12; CodeHook?: DialogCodeHookInvocationSetting2; ElicitationCodeHook?: ElicitationCodeHookInvocationSetting1; } /** * Specifies a list of message groups that Amazon Lex uses to respond the user input. */ export interface ResponseSpecification15 { MessageGroupsList: MessageGroupsList; /** * Indicates whether the user can interrupt a speech prompt from the bot. */ AllowInterrupt?: boolean; } /** * Specifies the next step that the bot runs when the slot value is captured before the code hook times out. */ export interface DialogState13 { DialogAction?: DialogAction; Intent?: IntentOverride; /** * List of session attributes to be applied when the conversation reaches this step. */ SessionAttributes?: SessionAttribute[]; } /** * A list of conditional branches to evaluate after the slot value is captured. */ export interface ConditionalSpecification11 { /** * Determines whether a conditional branch is active. When active is false, the conditions are not evaluated. */ IsActive: boolean; ConditionalBranches: ConditionalBranches; DefaultBranch: DefaultConditionalBranch; } /** * Specifies a list of message groups that Amazon Lex uses to respond the user input. */ export interface ResponseSpecification16 { MessageGroupsList: MessageGroupsList; /** * Indicates whether the user can interrupt a speech prompt from the bot. */ AllowInterrupt?: boolean; } /** * Specifies the next step that the bot runs when the slot value code is not recognized. */ export interface DialogState14 { DialogAction?: DialogAction; Intent?: IntentOverride; /** * List of session attributes to be applied when the conversation reaches this step. */ SessionAttributes?: SessionAttribute[]; } /** * A list of conditional branches to evaluate when the slot value isn't captured. */ export interface ConditionalSpecification12 { /** * Determines whether a conditional branch is active. When active is false, the conditions are not evaluated. */ IsActive: boolean; ConditionalBranches: ConditionalBranches; DefaultBranch: DefaultConditionalBranch; } /** * Code hook called after Amazon Lex successfully captures a slot value. */ export interface DialogCodeHookInvocationSetting2 { /** * Indicates whether a Lambda function should be invoked for the dialog. */ EnableCodeHookInvocation: boolean; /** * Determines whether a dialog code hook is used when the intent is activated. */ IsActive: boolean; /** * Unique name for a resource. */ InvocationLabel?: string; PostCodeHookSpecification: PostDialogCodeHookInvocationSpecification; } /** * Code hook called when Amazon Lex doesn't capture a slot value. */ export interface ElicitationCodeHookInvocationSetting1 { /** * Indicates whether a Lambda function should be invoked for the dialog. */ EnableCodeHookInvocation: boolean; /** * Unique name for a resource. */ InvocationLabel?: string; } /** * Determines whether Amazon Lex obscures slot values in conversation logs. */ export interface ObfuscationSetting { /** * Value that determines whether Amazon Lex obscures slot values in conversation logs. The default is to obscure the values. */ ObfuscationSettingType: "None" | "DefaultObfuscation"; } /** * Indicates whether a slot can return multiple values. */ export interface MultipleValuesSetting { AllowMultipleValues?: boolean; } /** * A custom, extended built-in or a grammar slot type. */ export interface SlotType { Name: Name; Description?: Description; ParentSlotTypeSignature?: ParentSlotTypeSignature; SlotTypeValues?: SlotTypeValues; ValueSelectionSetting?: SlotValueSelectionSetting; ExternalSourceSetting?: ExternalSourceSetting; } /** * Value that the slot type can take. */ export interface SlotTypeValue { SampleValue: SampleValue; Synonyms?: SynonymList; } /** * Defines one of the values for a slot type. */ export interface SampleValue { /** * The value that can be used for a slot type. */ Value: string; } /** * Contains settings used by Amazon Lex to select a slot value. */ export interface SlotValueSelectionSetting { ResolutionStrategy: SlotValueResolutionStrategy; RegexFilter?: SlotValueRegexFilter; AdvancedRecognitionSetting?: AdvancedRecognitionSetting; } /** * A regular expression used to validate the value of a slot. */ export interface SlotValueRegexFilter { /** * Regex pattern */ Pattern: string; } /** * Provides settings that enable advanced recognition settings for slot values. */ export interface AdvancedRecognitionSetting { AudioRecognitionStrategy?: AudioRecognitionStrategy; } /** * Provides information about the external source of the slot type's definition. */ export interface ExternalSourceSetting { GrammarSlotTypeSetting?: GrammarSlotTypeSetting; } /** * Settings required for a slot type based on a grammar that you provide. */ export interface GrammarSlotTypeSetting { Source?: GrammarSlotTypeSource; } /** * Describes the Amazon S3 bucket name and location for the grammar that is the source for the slot type. */ export interface GrammarSlotTypeSource { /** * The name of the S3 bucket that contains the grammar source. */ S3BucketName: string; /** * The path to the grammar in the S3 bucket. */ S3ObjectKey: string; /** * The Amazon KMS key required to decrypt the contents of the grammar, if any. */ KmsKeyArn?: string; } /** * A custom vocabulary is a list of specific phrases that you want Amazon Lex V2 to recognize in the audio input. */ export interface CustomVocabulary { CustomVocabularyItems: CustomVocabularyItems; } /** * A custom vocabulary item that contains the phrase to recognize and a weight to give the boost. */ export interface CustomVocabularyItem { /** * Phrase that should be recognized. */ Phrase: string; /** * The degree to which the phrase recognition is boosted. The weight 0 means that no boosting will be applied and the entry will only be used for performing replacements using the displayAs field. */ Weight?: number; /** * Defines how you want your phrase to look in your transcription output. */ DisplayAs?: string; } /** * S3 location of bot definitions zip file, if it's not defined inline in CloudFormation. */ export interface S3Location { /** * An Amazon S3 bucket in the same AWS Region as your function. The bucket can be in a different AWS account. */ S3Bucket: string; /** * The Amazon S3 key of the deployment package. */ S3ObjectKey: string; /** * For versioned objects, the version of the deployment package object to use. If not specified, the current object version will be used. */ S3ObjectVersion?: string; } /** * A key-value pair for tagging Lex resources */ export interface Tag { /** * The key name of the tag. You can specify a value that is 1 to 128 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. */ Key: string; /** * The value for the tag. You can specify a value that is 0 to 256 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. */ Value: string; } /** * Configuring the test bot alias settings for a given bot */ export interface TestBotAliasSettings { BotAliasLocaleSettings?: BotAliasLocaleSettingsList; ConversationLogSettings?: ConversationLogSettings; Description?: Description; /** * Determines whether Amazon Lex will use Amazon Comprehend to detect the sentiment of user utterances. */ SentimentAnalysisSettings?: { /** * Enable to call Amazon Comprehend for Sentiment natively within Lex */ DetectSentiment: boolean; }; } /** * A locale setting in alias */ export interface BotAliasLocaleSettingsItem { /** * A string used to identify the locale */ LocaleId: string; BotAliasLocaleSetting: BotAliasLocaleSettings; } /** * You can use this parameter to specify a specific Lambda function to run different functions in different locales. */ export interface BotAliasLocaleSettings { CodeHookSpecification?: CodeHookSpecification; /** * Whether the Lambda code hook is enabled */ Enabled: boolean; } /** * Contains information about code hooks that Amazon Lex calls during a conversation. */ export interface CodeHookSpecification { LambdaCodeHook: LambdaCodeHook; } /** * Contains information about code hooks that Amazon Lex calls during a conversation. */ export interface LambdaCodeHook { /** * The version of the request-response that you want Amazon Lex to use to invoke your Lambda function. */ CodeHookInterfaceVersion: string; /** * The Amazon Resource Name (ARN) of the Lambda function. */ LambdaArn: string; } /** * Contains information about code hooks that Amazon Lex calls during a conversation. */ export interface ConversationLogSettings { AudioLogSettings?: AudioLogSettings; TextLogSettings?: TextLogSettings; } /** * Settings for logging audio of conversations between Amazon Lex and a user. You specify whether to log audio and the Amazon S3 bucket where the audio file is stored. */ export interface AudioLogSetting { Destination: AudioLogDestination; Enabled: boolean; } /** * The location of audio log files collected when conversation logging is enabled for a bot. */ export interface AudioLogDestination { S3Bucket: S3BucketLogDestination; } /** * Specifies an Amazon S3 bucket for logging audio conversations */ export interface S3BucketLogDestination { /** * The Amazon Resource Name (ARN) of an Amazon S3 bucket where audio log files are stored. */ S3BucketArn: string; /** * The Amazon S3 key of the deployment package. */ LogPrefix: string; /** * The Amazon Resource Name (ARN) of an AWS Key Management Service (KMS) key for encrypting audio log files stored in an S3 bucket. */ KmsKeyArn?: string; } /** * Contains information about code hooks that Amazon Lex calls during a conversation. */ export interface TextLogSetting { Destination: TextLogDestination; Enabled: boolean; } /** * Defines the Amazon CloudWatch Logs destination log group for conversation text logs. */ export interface TextLogDestination { CloudWatch: CloudWatchLogGroupLogDestination; } export interface CloudWatchLogGroupLogDestination { /** * A string used to identify the groupArn for the Cloudwatch Log Group */ CloudWatchLogGroupArn: string; /** * A string containing the value for the Log Prefix */ LogPrefix: string; }