LectureAttachment
Defined in: v1/schemas.ts:344
An attachment on a lecture. The shape varies depending on the kind field.
Remarks
Section titled “Remarks”kind values and their behaviour:
| Kind | name | url | text | file_size | quiz |
|---|---|---|---|---|---|
text | null | null | HTML string | null | null |
code_display | null | null | HTML string | null | null |
code_embed | null | null | HTML string | null | null |
native_comments | null | null | null | null | null |
upsell | null | null | null | null | null |
video | filename | CDN URL | null | bytes | null |
audio | filename | CDN URL | null | bytes | null |
image | filename | CDN URL | null | bytes | null |
pdf | filename | CDN URL | null | bytes | null |
quiz | null | null | null | null | quiz object |
text — contains raw HTML for text, code_display, and code_embed kinds.
Sanitise before rendering directly in a browser context.
position — documented as required but may be null in some responses.
url for video kind — points to the original upload URL, not a
streamable URL. Use CoursesAPI.getVideo with the attachment id
to retrieve a playable HLS stream URL.
file_size — documented as file size in bytes for video, audio, image,
and PDF attachments, but observed returning 0 for video files in live
API responses. Do not rely on this value for video attachments.
Extends
Section titled “Extends”output<typeofLectureAttachmentSchema>
Properties
Section titled “Properties”file_extension?
Section titled “file_extension?”
optionalfile_extension?:string|null
Defined in: v1/schemas.ts:305
Inherited from
Section titled “Inherited from”z.infer.file_extension
file_size?
Section titled “file_size?”
optionalfile_size?:number|null
Defined in: v1/schemas.ts:304
Inherited from
Section titled “Inherited from”z.infer.file_size
id:
number
Defined in: v1/schemas.ts:287
Inherited from
Section titled “Inherited from”z.infer.id
kind:
"text"|"native_comments"|"video"|"audio"|"image"|"pdf"|"quiz"|"code_display"|"code_embed"|"upsell"
Defined in: v1/schemas.ts:289
Inherited from
Section titled “Inherited from”z.infer.kind
name:
string|null
Defined in: v1/schemas.ts:288
Inherited from
Section titled “Inherited from”z.infer.name
position
Section titled “position”position:
number|null
Defined in: v1/schemas.ts:303
Inherited from
Section titled “Inherited from”z.infer.position
optionalquiz?: {id:number;questions: {answers:string[];correct_answers:string[];graded:boolean;question:string;question_type:"single"|"multiple"; }[]; } |null
Defined in: v1/schemas.ts:306
Inherited from
Section titled “Inherited from”z.infer.quiz
optionaltext?:string|null
Defined in: v1/schemas.ts:302
Inherited from
Section titled “Inherited from”z.infer.text
optionalurl?:string|null
Defined in: v1/schemas.ts:301
Inherited from
Section titled “Inherited from”z.infer.url