Files
spsays-training/lib/lcl.ts
T
2026-05-10 00:35:14 +05:30

46 lines
1.1 KiB
TypeScript

/**
* Data access layer for Life Comes from Life (LCL).
*
* 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 = "lcl";
export type LclMeta = BookMeta;
export type LclChapterEntry = { number: number; title: string };
export type LclIntroSegment = IntroSegment;
export type LclChapter = Chapter;
export type LclSidebarItem = SidebarItem;
export async function getLclMeta() {
return getBookMeta(CODE);
}
export async function getLclIntroSegments() {
return getIntroSegments(CODE);
}
export async function getLclIntroSegment(slug: string) {
return getIntroSegment(CODE, slug);
}
export async function getLclChapter(chapterNum: number) {
return getChapter(CODE, String(chapterNum));
}
export async function getLclContent(slug: string) {
return getContent(CODE, slug);
}
export async function getLclSidebarItems() {
return getSidebarItems(CODE);
}