/** * Data access layer for Easy Journey to Other Planets (EJ). * * Delegates to the generic book data layer which calls the BFF API. */ import { getBookMeta, getIntroSegments, getIntroSegment, getChapter, getContent, getSidebarItems, type BookMeta, type IntroSegment, type Chapter, type SidebarItem, } from "@/lib/books"; const CODE = "ej"; // Re-export types with book-specific names for backwards compatibility export type EjMeta = BookMeta; export type EjChapterEntry = { number: number; title: string }; export type EjIntroSegment = IntroSegment; export type EjChapter = Chapter; export type EjSidebarItem = SidebarItem; export async function getEjMeta(): Promise { return getBookMeta(CODE); } export async function getEjIntroSegments(): Promise { return getIntroSegments(CODE); } export async function getEjIntroSegment( slug: string, ): Promise { return getIntroSegment(CODE, slug); } export async function getEjChapter( chapterNum: number, ): Promise { return getChapter(CODE, String(chapterNum)); } export async function getEjContent( slug: string, ): Promise { return getContent(CODE, slug); } export async function getEjSidebarItems(): Promise { return getSidebarItems(CODE); }