The core answer shape and its concrete variants. These come from the underlying runtime but are re-exported by the SDK so you never import @youssefalmia/* directly.
import type { RuntimeAnswer, // union of all answer types ChoiceSetAnswer, BlankChoiceAnswer, TypedBlankAnswer, MatchingSetAnswer, MatchingConnection, OpenResponseAnswer,} from "@edpire/sdk"
RuntimeAnswer[] is what EdpireQuestion’s onAnswersChange gives you and what /check and submit accept.
import type { MountOptions, // options for EdpireAssessment.mount() EmbedInstance, // { unmount() } EmbedResult, // passed to onComplete EmbedError, // passed to onError} from "@edpire/sdk"
import type { FlatStep, // one step from flattenAssessment() ReviewStep, // one question of a finished attempt, from flattenReview() SubmissionReview, // GET /submissions/{id}/review, for review() and flattenReview() ReviewOptions, // options for EdpireAssessment.review() RenderQuestionOptions,// options for renderQuestion() QuestionInstance, // returned by renderQuestion() StoredAnswer, // { exerciseId, questionId, answers: RuntimeAnswer[] }} from "@edpire/sdk"
buildSubmitPayload(stored: StoredAnswer[]) converts a flat array into the nested { exerciseAnswers: [...] } format. (client.submit() also accepts the flat array directly, so you rarely need to call this yourself.)
EmbedResult.exercise_feedback (Embedded Player) is the snake_case equivalent of this same structure. AssessmentShell’s SubmitResult uses camelCase because you construct it in your own onSubmit handler.