/** * Data access layer for On the Way to Kṛṣṇa (OWK). * * 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 = "owk"; // Re-export types with book-specific names for backwards compatibility export type OwkMeta = BookMeta; export type OwkChapterEntry = { number: number; title: string }; export type OwkIntroSegment = IntroSegment; export type OwkChapter = Chapter; export type OwkSidebarItem = SidebarItem; export async function getOwkMeta(): Promise { return getBookMeta(CODE); } export async function getOwkIntroSegments(): Promise { return getIntroSegments(CODE); } export async function getOwkIntroSegment( slug: string, ): Promise { return getIntroSegment(CODE, slug); } export async function getOwkChapter( chapterNum: number, ): Promise { return getChapter(CODE, String(chapterNum)); } export async function getOwkContent( slug: string, ): Promise { return getContent(CODE, slug); } export async function getOwkSidebarItems(): Promise { return getSidebarItems(CODE); }