import { whopSdk } from "@/lib/whop-sdk";

const result = await whopSdk.courses.createAssessmentQuestion({
	// The correct answer to the assessment question
	correctAnswer: "some string" /* Required! */,

	// The ID of the lesson to create the assessment question in
	lessonId: "lesn_XXXXXXXX" /* Required! */,

	// The text of the question being asked
	questionText: "some string" /* Required! */,

	// The type of the assessment question
	questionType:
		"multiple_choice" /* Valid values: multiple_choice | multiple_select | short_answer | true_false */ /* Required! */,
});

Example output:
const response = {
	// The ID of the assessment question
	id: "xxxxxxxxxxx",

	// The correct answer for the question
	correctAnswer: "some string",

	// Optional image attachment for the question
	image: {
		// The ID of the attachment
		id: "xxxxxxxxxxx",

		// A signed ID of the attachment to directly query the attachment
		signedId: "xxxxxxxxxxx",

		// Whether the attachment has been analyzed
		analyzed: true,

		// The size of the file in bytes
		byteSizeV2: "9999999",

		// The name of the file
		filename: "some string",

		// The attachment's content type (e.g., image/jpg, video/mp4)
		contentType: "some string",

		// The source of the attachment
		source: {
			// The URL to access the attachment
			url: "some string",
		},

		// The blurhash of the image
		blurhash: "some string",

		// The height of the video
		height: 10,

		// The width of the video
		width: 10,

		// The aspect ratio of the video
		aspectRatio: 10,

		// The preview of the video
		preview: {
			// The URL to access the attachment
			url: "some string",
		},

		// The duration of the audio in seconds
		duration: 10,

		// The URL of the waveform for the audio
		waveformUrl: "some string",
	},

	// The answer options for multiple choice/select questions
	options: [
		{
			// The ID of the assessment question option
			id: "xxxxxxxxxxx",

			// Whether this option is a correct answer
			isCorrect: true,

			// The text of the answer option
			optionText: "some string",

			// The order of this option within the question
			order: 10,
		},
	],

	// The order of the question within its lesson
	order: 10,

	// The text of the question
	questionText: "some string",

	// The type of the question
	questionType:
		"multiple_choice" /* Valid values: multiple_choice | multiple_select | short_answer | true_false */,
};