Parameters
- courses: readonly {
id: string & $brand<"CourseId">;
slug: string & $brand<"Slug">;
title: string;
description: string;
language: string;
sequence: number;
draft: boolean;
track: "level" | "reference";
outcomes?: string[];
audience?: string;
highlights?: string[];
sounds?: { vowels: string[]; consonants: string[] };
translations?: Record<
string,
{
description?: string;
outcomes?: string[];
audience?: string;
highlights?: string[];
},
>;
modules: {
id: string & $brand<"ModuleId">;
slug: string & $brand<"Slug">;
title: string;
sequence: number;
lessons: (
| {
id: string & $brand<"LessonId">;
slug: string & $brand<"Slug">;
sequence: number;
title: string;
resources: {
id: string & $brand<(...)>;
title: string;
url: string;
kind: "pdf" | "slides" | "code" | "other";
}[];
kind: "video";
description: string;
source: string;
durationSeconds: number;
poster?: string;
notesKey?: string;
uploadDate?: string;
}
| {
id: string & $brand<"LessonId">;
slug: string & $brand<"Slug">;
sequence: number;
title: string;
resources: {
id: string & $brand<(...)>;
title: string;
url: string;
kind: "pdf" | "slides" | "code" | "other";
}[];
kind: "reading";
body: string;
}
)[];
}[];
}[]
Returns readonly {
id: string & $brand<"CourseId">;
slug: string & $brand<"Slug">;
title: string;
description: string;
language: string;
sequence: number;
draft: boolean;
track: "level" | "reference";
outcomes?: string[];
audience?: string;
highlights?: string[];
sounds?: { vowels: string[]; consonants: string[] };
translations?: Record<
string,
{
description?: string;
outcomes?: string[];
audience?: string;
highlights?: string[];
},
>;
modules: {
id: string & $brand<"ModuleId">;
slug: string & $brand<"Slug">;
title: string;
sequence: number;
lessons: (
| {
id: string & $brand<"LessonId">;
slug: string & $brand<"Slug">;
sequence: number;
title: string;
resources: {
id: string & $brand<(...)>;
title: string;
url: string;
kind: "pdf" | "slides" | "code" | "other";
}[];
kind: "video";
description: string;
source: string;
durationSeconds: number;
poster?: string;
notesKey?: string;
uploadDate?: string;
}
| {
id: string & $brand<"LessonId">;
slug: string & $brand<"Slug">;
sequence: number;
title: string;
resources: {
id: string & $brand<(...)>;
title: string;
url: string;
kind: "pdf" | "slides" | "code" | "other";
}[];
kind: "reading";
body: string;
}
)[];
}[];
}[]
The manifests to serve, order preserved
The course manifests the application serves: every declared course, minus the drafts when shouldShowDraftCourses says to hide them.