48 lines
1.1 KiB
TypeScript
48 lines
1.1 KiB
TypeScript
/**
|
|
* Data access layer for Dialectic Spiritualism (DS).
|
|
*
|
|
* Delegates to the generic book data layer which calls the BFF API.
|
|
*/
|
|
|
|
import {
|
|
getBookMeta,
|
|
getIntroSegments,
|
|
getIntroSegment,
|
|
getChapter,
|
|
getContent,
|
|
getSidebarItems,
|
|
getNavigableItems,
|
|
type BookMeta,
|
|
type IntroSegment,
|
|
type Chapter,
|
|
type SidebarItem,
|
|
} from "@/lib/books";
|
|
|
|
const CODE = "ds";
|
|
|
|
export type DsMeta = BookMeta;
|
|
export type DsSubChapterEntry = { slug: string; title: string };
|
|
export type DsIntroSegment = IntroSegment;
|
|
export type DsChapter = Chapter;
|
|
export type DsSidebarItem = SidebarItem;
|
|
|
|
export async function getDsMeta() {
|
|
return getBookMeta(CODE);
|
|
}
|
|
export async function getDsIntroSegments() {
|
|
return getIntroSegments(CODE);
|
|
}
|
|
export async function getDsIntroSegment(slug: string) {
|
|
return getIntroSegment(CODE, slug);
|
|
}
|
|
export async function getDsChapter(slug: string) {
|
|
return getChapter(CODE, slug);
|
|
}
|
|
export async function getDsContent(slug: string) {
|
|
return getContent(CODE, slug);
|
|
}
|
|
export async function getDsSidebarItems() {
|
|
return getSidebarItems(CODE);
|
|
}
|
|
export { getNavigableItems };
|