type ScaleSurveyQuestion = {
id: string;
question: string;
type: 'multiple-choice'
choices: Array<{label: string; answer: string}>;
};
type FreeformSurveyQuestion = {
id: string;
type: 'freeform';
question: string;
};
type SurveyAnswer = {
id: string;
questionId: string;
userId: string;
answer: string;
};
type SurveyQuestion = ScaleSurveyQuestion | FreeformSurveyQuestion;
// Pre-Workshop survey
{
"questions": [
{
"id": "1",
"question": "How confident are you with the topic?",
"type": "multiple-choice",
"choices": [
{ "value": "1", "title": "True beginner (1)" },
{ "value": "2", "title": "Beginner (2)" },
{ "value": "3", "title": "Advanced beginner (3)" },
{ "value": "4", "title": "Intermediate (4)" },
{ "value": "5", "title": "Advanced (5)" },
{ "value": "6", "title": "Advanced Plus (6)" },
{ "value": "7", "title": "Expert (7)" },
{ "value": "8", "title": "Superior (8)" },
{ "value": "9", "title": "Wizard (9)" },
{ "value": "10", "title": "Diety (10)" }
],
},
{
"id": "2",
"question": "What are you hoping to get out of this workshop?",
"type": "freeform"
},
{
"id": "3",
"question": "What pace are you planning on learning at?",
"type": "multiple-choice",
"choices": [
{ "value": "1", "title": "Very Slow (1)" },
{ "value": "2", "title": "Slow (2)" },
{ "value": "3", "title": "Sort of slow (3)" },
{ "value": "4", "title": "A bit slow (4)" },
{ "value": "5", "title": "Steady (5)" },
{ "value": "6", "title": "A bit fast (6)" },
{ "value": "7", "title": "Sort of fast (7)" },
{ "value": "8", "title": "Fast (8)" },
{ "value": "9", "title": "Very fast (9)" },
{ "value": "10", "title": "Extremely fast (10)" }
],
}
]
}
// End of workshop survey
{
"questions": [
{
"id": "1",
"question": "How confident are you with the topic?",
"type": "multiple-choice",
"choices": [
{ "value": "1", "title": "True beginner (1)" },
{ "value": "2", "title": "Beginner (2)" },
{ "value": "3", "title": "Advanced beginner (3)" },
{ "value": "4", "title": "Intermediate (4)" },
{ "value": "5", "title": "Advanced (5)" },
{ "value": "6", "title": "Advanced Plus (6)" },
{ "value": "7", "title": "Expert (7)" },
{ "value": "8", "title": "Superior (8)" },
{ "value": "9", "title": "Wizard (9)" },
{ "value": "10", "title": "Diety (10)" }
],
},
{
"id": "2",
"question": "What did you get out of this workshop?",
"type": "freeform"
},
{
"id": "3",
"question": "What pace did you learn at?",
"type": "multiple-choice",
"choices": [
{ "value": "1", "title": "Very Slow (1)" },
{ "value": "2", "title": "Slow (2)" },
{ "value": "3", "title": "Sort of slow (3)" },
{ "value": "4", "title": "A bit slow (4)" },
{ "value": "5", "title": "Steady (5)" },
{ "value": "6", "title": "A bit fast (6)" },
{ "value": "7", "title": "Sort of fast (7)" },
{ "value": "8", "title": "Fast (8)" },
{ "value": "9", "title": "Very fast (9)" },
{ "value": "10", "title": "Extremely fast (10)" }
],
},
{
"id": "2",
"question": "How challenging was this workshop for you?",
"type": "multiple-choice",
"choices": [
{ "value": "1", "title": "Very Easy (1)" },
{ "value": "2", "title": "Easy (2)" },
{ "value": "3", "title": "Sort of Easy (3)" },
{ "value": "4", "title": "A bit Easy (4)" },
{ "value": "5", "title": "Neutral (5)" },
{ "value": "6", "title": "A bit Hard (6)" },
{ "value": "7", "title": "Sort of Hard (7)" },
{ "value": "8", "title": "Hard (8)" },
{ "value": "9", "title": "Very Hard (9)" },
{ "value": "10", "title": "Extremely Hard (10)" }
],
},
{
"id": "3",
"question": "How helpful was this workshop for you?",
"type": "multiple-choice",
"choices": [
{ "value": "1", "title": "Very Unhelpful (1)" },
{ "value": "2", "title": "Unhelpful (2)" },
{ "value": "3", "title": "Sort of Unhelpful (3)" },
{ "value": "4", "title": "A bit Unhelpful (4)" },
{ "value": "5", "title": "Neutral (5)" },
{ "value": "6", "title": "A bit Helpful (6)" },
{ "value": "7", "title": "Sort of Helpful (7)" },
{ "value": "8", "title": "Helpful (8)" },
{ "value": "9", "title": "Very Helpful (9)" },
{ "value": "10", "title": "Extremely Helpful (10)" }
],
},
{
"id": "4",
"question": "What feedback do you have on this workshop?",
"type": "freeform"
}
]
}
// End of exercise survey
{
"questions": [
{
"id": "1",
"question": "Elaborate on what you learned from this exercise",
"type": "freeform"
},
{
"id": "2",
"question": "How challenging was this exercise for you?",
"type": "multiple-choice",
"choices": [
{ "value": "1", "title": "Very Easy (1)" },
{ "value": "2", "title": "Easy (2)" },
{ "value": "3", "title": "Sort of Easy (3)" },
{ "value": "4", "title": "A bit Easy (4)" },
{ "value": "5", "title": "Neutral (5)" },
{ "value": "6", "title": "A bit Hard (6)" },
{ "value": "7", "title": "Sort of Hard (7)" },
{ "value": "8", "title": "Hard (8)" },
{ "value": "9", "title": "Very Hard (9)" },
{ "value": "10", "title": "Extremely Hard (10)" }
],
},
{
"id": "3",
"question": "How helpful was this exercise for you?",
"type": "multiple-choice",
"choices": [
{ "value": "1", "title": "Very Unhelpful (1)" },
{ "value": "2", "title": "Unhelpful (2)" },
{ "value": "3", "title": "Sort of Unhelpful (3)" },
{ "value": "4", "title": "A bit Unhelpful (4)" },
{ "value": "5", "title": "Neutral (5)" },
{ "value": "6", "title": "A bit Helpful (6)" },
{ "value": "7", "title": "Sort of Helpful (7)" },
{ "value": "8", "title": "Helpful (8)" },
{ "value": "9", "title": "Very Helpful (9)" },
{ "value": "10", "title": "Extremely Helpful (10)" }
],
},
{
"id": "4",
"question": "What comments or feedback do you have about this exercise?"
}
]
}
Answers POST Example:
// Pre-Workshop survey
{
"workshopName": "Full Stack Foundation",
"answers": [
{
"questionId": "1",
"answer": "5"
},
{
"questionId": "2",
"answer": "I want to learn how to do X"
},
{
"questionId": "3",
"answer": "5"
}
]
}
// Post-Workshop survey
{
"workshopName": "Full Stack Foundation",
"answers": [
{
"questionId": "1",
"answer": "I learned great stuff"
},
{
"questionId": "2",
"answer": "7"
},
{
"questionId": "3",
"answer": "9"
},
{
"questionId": "4",
"answer": "The workshop was great! I really appreciated the hands-on exercises and the clear explanations."
}
]
}
// Post-Exercise survey
{
"workshopName": "Full Stack Foundation",
"exerciseName": "Styling",
"answers": [
{
"questionId": "1",
"answer": "I learned great stuff"
},
{
"questionId": "2",
"answer": "7"
},
{
"questionId": "3",
"answer": "9"
},
{
"questionId": "4",
"answer": "The workshop was great! I really appreciated the hands-on exercises and the clear explanations."
}
]
}