A scoped and simplified part of the headless engine that is relevant to the SmartSnippet controller.

interface SmartSnippetState {
    answer: string;
    answerFound: boolean;
    disliked: boolean;
    documentId: QuestionAnswerDocumentIdentifier;
    expanded: boolean;
    feedbackModalOpen: boolean;
    liked: boolean;
    question: string;
    source?: Result;
}

Properties

answer: string

The answer, or snippet, related to the question.

answerFound: boolean

Determines of there is an available answer for the current query.

disliked: boolean

Determines if the snippet was disliked, or downvoted by the end user.

The index identifier for the document that provided the answer.

expanded: boolean

Determines if the snippet is currently expanded.

feedbackModalOpen: boolean

Determines if the feedback modal with the purpose of explaining why the end user disliked the snippet is currently opened.

liked: boolean

Determines if the snippet was liked, or upvoted by the end user.

question: string

The question related to the smart snippet.

source?: Result

Provides the source of the smart snippet.