/** * Verse query functions. */ import type { Verse } from '../models/types.js'; import { type Scheme, type Ref } from '../versification/index.js'; /** * Options for verse retrieval. */ export interface GetVerseOptions { /** Edition to use (e.g., 'crosswire-KJV') */ edition: string; } /** * Get a single verse. * * @param book - Book name (e.g., 'Genesis', 'Gen') * @param chapter - Chapter number * @param verse - Verse number * @param options - Query options including edition * @returns The requested verse * @throws EditionNotFoundError if edition is not registered * @throws VerseNotFoundError if verse is not found */ export declare function getVerse(book: string, chapter: number, verse: number, options: GetVerseOptions): Promise; /** * Does this edition actually CONTAIN the given verse? * * Verse inventory is edition-specific and not captured by the versification * scheme: e.g. crosswire-KJV (Textus Receptus) has Acts 8:37, but berean-BSB * (critical text) does not — even though both use 'English' numbering. This is * the ground truth, read from the edition's actual data. * * @returns true if the verse exists in the edition, false if it is absent. * Throws EditionNotFoundError if the edition itself is not registered. */ export declare function editionHasVerse(book: string, chapter: number, verse: number, edition: string): Promise; /** * Map a verse reference from one EDITION to another — numbering AND inventory. * * Unlike `mapVerse` (which maps between versification SCHEMES only), this checks * that the target edition actually contains the mapped verse. Returns null when * the verse has no counterpart in the target scheme (e.g. LXX Psalm 151) OR when * it is simply absent from the target edition (e.g. KJV Acts 8:37 mapped into * berean-BSB, which omits it). This is what the site/app should use for * cross-edition navigation so it never points at a verse that isn't there. * * @throws Error if either edition has no known versification scheme. */ export declare function mapVerseToEdition(book: string, chapter: number, verse: number, fromEdition: string, toEdition: string): Promise; /** * Get all verses in a chapter. * * @param book - Book name * @param chapter - Chapter number * @param options - Query options including edition * @returns Array of verses in the chapter */ export declare function getChapter(book: string, chapter: number, options: GetVerseOptions): Promise; /** * Get verses in a range. * * @param book - Book name * @param chapter - Chapter number * @param startVerse - Starting verse number (inclusive) * @param endVerse - Ending verse number (inclusive) * @param options - Query options including edition * @returns Array of verses in the range */ export declare function getVersesInRange(book: string, chapter: number, startVerse: number, endVerse: number, options: GetVerseOptions): Promise; /** * Get the aligned verse from all registered editions. * * The input reference is interpreted in `fromScheme` (default Masoretic) and * mapped into each edition's own versification scheme before lookup, so that * (e.g.) MT Psalm 23 lines up with LXX Psalm 22. See ../versification. * * @param book - Book name * @param chapter - Chapter number (in `fromScheme`) * @param verse - Verse number (in `fromScheme`) * @param fromScheme - Versification scheme of the input reference (default 'MT') * @returns Map of edition to verse */ export declare function getParallelVerses(book: string, chapter: number, verse: number, fromScheme?: Scheme): Promise>; /** * List available books for an edition. * * @param edition - Edition name * @returns Array of book names */ export declare function listBooks(edition: string): string[]; /** * Get the per-book, per-chapter verse-count inventory for an edition. * * Returns `{ book: [ch1Count, ch2Count, ...] }`. This is each edition's OWN * versification inventory — e.g. the OHB/WLC Hebrew edition reports the * Westminster-Leningrad counts (superscriptions as v1, the Decalogue split, * Josh 21:36-37, etc.), NOT a KJV/traditional-Masoretic tally. Consumers that * validate shipped data (verse-count CI gates) or render inventory stats should * derive counts from HERE rather than hardcoding a per-scheme table — the engine * is the single source of truth for versification. * * Chapters are enumerated from 1 upward until a chapter is empty or missing * (scripture editions number chapters contiguously from 1). * * @param edition - Edition identifier (e.g. "openscriptures-OHB", "byztxt-TR") * @returns Map of book name to an array of per-chapter verse counts * @throws EditionNotFoundError if the edition is not registered */ export declare function getVerseCounts(edition: string): Promise>; /** * Total verse count for an edition (sum of {@link getVerseCounts}). * * e.g. the OHB Hebrew edition totals 23,213 (WLC/BHS); a TR Greek NT totals 7,957. * * @param edition - Edition identifier * @returns Total number of verses across all books/chapters * @throws EditionNotFoundError if the edition is not registered */ export declare function getVerseTotal(edition: string): Promise; /** * List all registered editions. */ export declare function listEditions(): string[]; //# sourceMappingURL=verse.d.ts.map