import type * as Whop from "../index.js"; /** * An individual learning unit within a chapter, which can contain text, video, PDF, or assessment content. */ export interface CourseLesson { /** The list of questions for quiz or knowledge check lessons. Empty for non-assessment lesson types. */ assessment_questions: CourseLesson.AssessmentQuestions.Item[]; /** All supplementary files attached to this lesson returned as a flat array rather than a paginated connection. */ attachments: CourseLesson.Attachments.Item[]; /** The Markdown content body of the lesson. Null if the lesson has no text content. */ content: string | null; /** The datetime the lesson was created. */ created_at: string; /** The number of days after a student starts the course before this lesson becomes accessible. Null if the lesson is available immediately. */ days_from_course_start_until_unlock: number | null; /** The external video identifier for embedded video lessons, such as a YouTube video ID or Loom share ID. Null if the lesson has no embed. */ embed_id: string | null; /** The platform type for the embedded video. One of: youtube, loom. Null if the lesson has no embed. */ embed_type: Whop.EmbedTypes | null; /** The unique identifier for the lesson. */ id: string; /** The content format of this lesson. One of: text, video, pdf, multi, quiz, knowledge_check. */ lesson_type: Whop.LessonTypes; /** The primary PDF document for PDF-type lessons. Null if this lesson is not a PDF lesson or no PDF has been uploaded. */ main_pdf: CourseLesson.MainPdf | null; /** The sort position of this lesson within its parent chapter, starting from zero. */ order: number; /** The thumbnail image displayed on lesson cards and previews. Null if no thumbnail has been uploaded. */ thumbnail: CourseLesson.Thumbnail | null; /** The display name of the lesson shown to students. Maximum 120 characters. */ title: string; /** The Mux video asset for video-type lessons, used for streaming playback. Null if this lesson has no hosted video. */ video_asset: CourseLesson.VideoAsset | null; /** The visibility setting that controls whether this lesson appears to students. One of: visible, hidden. */ visibility: Whop.LessonVisibilities; } export declare namespace CourseLesson { type AssessmentQuestions = AssessmentQuestions.Item[]; namespace AssessmentQuestions { /** * An assessment question in a course quiz or knowledge check */ interface Item { /** The correct answer for the question. Used for short answer questions. Only visible to admins (users with courses:update permission) */ correct_answer: string | null; /** The datetime the assessment question was created. */ created_at: string; /** The unique identifier for the assessment question. */ id: string; /** Optional image attachment for the question */ image: Item.Image | null; /** The answer options for multiple choice/select questions */ options: Item.Options.Item[]; /** The order of the question within its lesson */ order: number; /** The text of the question */ question_text: string; /** The type of the question */ question_type: Whop.CoursesAssessmentQuestionTypes; } namespace Item { /** * Optional image attachment for the question */ interface Image { /** Uploaded file MIME type, such as image/jpeg, video/mp4, or audio/mpeg. */ content_type: string | null; /** The original filename of the uploaded attachment, including its file extension. */ filename: string | null; /** Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) input value will be accepted as an ID. */ id: string; /** A pre-optimized URL for rendering this attachment on the client. This should be used for displaying attachments in apps. */ url: string | null; } type Options = Options.Item[]; namespace Options { /** * An answer option for a multiple choice or multiple select assessment question */ interface Item { /** The unique identifier for the assessment question option. */ id: string; /** Whether this option is a correct answer. Only visible to admins (users with courses:update permission) */ is_correct: boolean | null; /** The text of the answer option */ option_text: string; /** The order of this option within the question */ order: number; } } } } type Attachments = Attachments.Item[]; namespace Attachments { /** * Represents an image attachment */ interface Item { /** Uploaded file MIME type, such as image/jpeg, video/mp4, or audio/mpeg. */ content_type: string | null; /** The original filename of the uploaded attachment, including its file extension. */ filename: string | null; /** Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) input value will be accepted as an ID. */ id: string; /** A pre-optimized URL for rendering this attachment on the client. This should be used for displaying attachments in apps. */ url: string | null; } } /** * The primary PDF document for PDF-type lessons. Null if this lesson is not a PDF lesson or no PDF has been uploaded. */ interface MainPdf { /** Uploaded file MIME type, such as image/jpeg, video/mp4, or audio/mpeg. */ content_type: string | null; /** The original filename of the uploaded attachment, including its file extension. */ filename: string | null; /** Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) input value will be accepted as an ID. */ id: string; /** A pre-optimized URL for rendering this attachment on the client. This should be used for displaying attachments in apps. */ url: string | null; } /** * The thumbnail image displayed on lesson cards and previews. Null if no thumbnail has been uploaded. */ interface Thumbnail { /** A pre-optimized URL for rendering this attachment on the client. This should be used for displaying attachments in apps. */ url: string | null; } /** * The Mux video asset for video-type lessons, used for streaming playback. Null if this lesson has no hosted video. */ interface VideoAsset { /** The Mux-provided ID of the asset */ asset_id: string | null; /** Whether this asset contains only audio */ audio_only: boolean; /** The datetime the mux asset was created. */ created_at: string; /** The duration of the video in seconds */ duration_seconds: number | null; /** The time at which the video finished uploading */ finished_uploading_at: string | null; /** The unique identifier for the mux asset. */ id: string; /** The public playback ID of the Mux asset */ playback_id: string | null; /** The signed playback ID of the Mux asset */ signed_playback_id: string | null; /** The signed storyboard playback token of the Mux asset */ signed_storyboard_playback_token: string | null; /** The signed thumbnail playback token of the Mux asset */ signed_thumbnail_playback_token: string | null; /** The signed video playback token of the Mux asset */ signed_video_playback_token: string | null; /** The status of the Mux asset */ status: Whop.MuxAssetStatuses; /** The datetime the mux asset was last updated. */ updated_at: string; } }