import type * as Whop from "../index.mjs"; /** * A structured learning module containing chapters and lessons, belonging to an experience. */ export interface Course { /** Whether students receive a PDF certificate after completing all lessons in this course. Null if the setting has not been configured. */ certificate_after_completion_enabled: boolean | null; /** An ordered list of all chapters in this course, sorted by their display position. */ chapters: Course.Chapters.Item[]; /** The total number of chapters in this course, including chapters whose lessons are all hidden from the current user. */ chapters_count: number; /** The number of lessons in this course that the current user has marked as completed. Zero when the request is not made on behalf of a user. */ completed_lessons_count: number; /** The URL of the course cover image shown on preview cards. Null if no cover image has been uploaded. */ cover_image: string | null; /** The datetime the course was created. */ created_at: string; /** A brief summary of the course content and objectives. Null if no description has been set. */ description: string | null; /** The unique identifier for the course. */ id: string; /** The spoken language of the video content, used to generate accurate closed captions. One of: en, es, it, pt, de, fr, pl, ru, nl, ca, tr, sv, uk, no, fi, sk, el, cs, hr, da, ro, bg. */ language: Whop.Languages; /** The creation timestamp of the most recently added lesson visible to the current user. Null if the course has no lessons. */ latest_lesson_created_at: string | null; /** The distinct drip schedules, in days after the course start, of lessons visible to the current user. Combine with startedAt to work out which have unlocked. Empty when the user has not started the course or no lesson is on a schedule. */ lesson_unlock_days: number[]; /** The sort position of this course within its parent experience, as a decimal for flexible ordering. */ order: string; /** Whether students must complete each lesson sequentially before advancing to the next one. */ require_completing_lessons_in_order: boolean; /** The lesson the current user should continue from: their first incomplete lesson, or the first lesson when they have finished the course, have not started it, or can edit it. Null if the course has no lessons. */ resume_lesson: Course.ResumeLesson | null; /** The earliest time the current user is known to have started this course. Null if they have not started it. Drip unlock schedules are measured from this point. */ started_at: string | null; /** A short marketing tagline displayed beneath the course title. Null if no tagline has been set. */ tagline: string | null; /** The thumbnail image displayed on course cards and previews. Null if no thumbnail has been uploaded. */ thumbnail: Course.Thumbnail | null; /** The display name of the course shown to students. Null if no title has been set. */ title: string | null; /** The combined duration in seconds of every hosted video across the lessons visible to the current user. */ total_duration_seconds: number; /** The number of lessons in this course visible to the current user. */ total_lessons_count: number; /** The datetime the course was last updated. */ updated_at: string; /** The visibility setting that controls whether this course appears to students. One of: visible, hidden. */ visibility: Whop.CourseVisibilities; } export declare namespace Course { type Chapters = Chapters.Item[]; namespace Chapters { /** * A grouping of related lessons within a course, used to organize content into sections. */ interface Item { /** The unique identifier for the chapter. */ id: string; /** An ordered list of lessons in this chapter, sorted by display position. Hidden lessons are excluded for non-admin users. */ lessons: Item.Lessons.Item[]; /** The sort position of this chapter within its parent course, starting from zero. */ order: number; /** The display name of the chapter shown to students. Maximum 150 characters. */ title: string; } namespace Item { type Lessons = Lessons.Item[]; namespace Lessons { /** * An individual learning unit within a chapter, which can contain text, video, PDF, or assessment content. */ interface Item { /** 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 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: Item.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: Item.VideoAsset | null; } namespace Item { /** * 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 duration of the video in seconds */ duration_seconds: number | null; /** The signed playback ID of the Mux asset */ signed_playback_id: string | null; /** The signed thumbnail playback token of the Mux asset */ signed_thumbnail_playback_token: string | null; } } } } } /** * The lesson the current user should continue from: their first incomplete lesson, or the first lesson when they have finished the course, have not started it, or can edit it. Null if the course has no lessons. */ interface ResumeLesson { /** The unique identifier for the lesson. */ id: string; } /** * The thumbnail image displayed on course cards and previews. Null if no thumbnail has been uploaded. */ interface Thumbnail { /** 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. */ optimized_url: string | null; /** The original source URL of the attachment, such as a direct link to S3. This should never be displayed on the client and should always be passed through an Imgproxy transformer. */ source_url: string | null; } }