Attachment
Description
The Attachment
type defines a presentational component intended to be
displayed as part of a conversational user interface. The Mindstep User
Interface Guidelines dictate that when an end user
interacts with an attachment the contents of the attachment are display in a
modal view above the active conversation.
Properties
label
(string
, required) - A short text label detailing the attachment.content
(AnyCompletableComponent
, required) - The contents of the attachment
Example
{
"type": "Attachment",
"label": "GAD-7 (Tap to open)",
"content": {
"type": "QuestionPack",
"index": 0,
"cards": [
{
"title": "Feeling afraid as if something awful might happen.",
"question": "Over the last 2 weeks, how often have you been bothered by the above problem?",
"options": {
"type": "OptionGroup",
"maxSelections": 4,
"onSubmit": {
"type": "User.Submitted<Screening.Response>",
"value": {
"key": "anxiety_list_gad_q7",
"type": "Screening.Response"
}
},
"options": [
{
"exclusive": true,
"label": "Not at all",
"value": "Not_At_All"
},
{
"exclusive": true,
"label": "Several days",
"value": "Several_Days"
},
{
"exclusive": true,
"label": "More than half the days",
"value": "More_Than_Half"
},
{
"exclusive": true,
"label": "Nearly everyday",
"value": "Nearly_Everyday"
}
]
}
}
]
}
}