ENGLISH·COURSE API
    Preparing search index...
    • Validates the full set of course manifests and returns them in declaration order.

      Parameters

      • raw: readonly unknown[]

        The imported manifest documents, in ladder order

      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 parsed courses, same order

      Uniqueness of slug and sequence is checked here rather than inside CourseManifest, because no single file can see the others. Everything else is a per-file concern and fails during that file's parse.

      InvalidCourseManifestError naming the offending lesson or the colliding courses