type Headers = Record; export type ApigenHeaders = Headers | ((method: string, path: string) => Headers | Promise); export interface ApigenConfig { baseUrl: string; headers: ApigenHeaders; } export interface ApigenRequest extends Omit { search?: Record; body?: unknown; } export declare class FreeUseBibleSDK { Config: ApigenConfig; constructor(config?: Partial); ParseError(rep: Response): Promise; PrepareFetchUrl(path: string): URL; Fetch(method: string, path: string, opts?: ApigenRequest): Promise; general: { getAvailableTranslations: () => Promise; getBooksForTranslation: (translation: string) => Promise; getChapterFromTranslation: (translation: string, book: string, chapter: number) => Promise; getAvailableCommentaries: () => Promise; getBooksForCommentary: (commentary: string) => Promise; getChapterFromCommentary: (commentary: string, book: string, chapter: number) => Promise; getProfilesForCommentary: (commentary: string) => Promise; getProfileFromCommentary: (commentary: string, profile: string) => Promise; }; } export type AudioLinks = Record; export type AvailableCommentaries = { commentaries: Commentary[]; }; export type AvailableTranslations = { translations: Translation[]; }; export type ChapterContent = ChapterHeading | ChapterLineBreak | ChapterHebrewSubtitle | ChapterVerse; export type ChapterData = { number: number; content: ChapterContent[]; footnotes: ChapterFootnote[]; }; export type ChapterFootnote = { noteId: number; text: string; reference?: { chapter?: number; verse?: number; } | null; caller: string | null; }; export type ChapterHeading = { type: 'heading'; content: string[]; }; export type ChapterHebrewSubtitle = { type: 'hebrew_subtitle'; content: (string | FormattedText | VerseFootnoteReference)[]; }; export type ChapterLineBreak = { type: 'line_break'; }; export type ChapterVerse = { type: 'verse'; number: number; content: (string | FormattedText | InlineHeading | InlineLineBreak | VerseFootnoteReference)[]; }; export type Commentary = { id: string; name: string; englishName: string; website: string; licenseUrl: string; shortName: string; language: string; languageName?: string | null; languageEnglishName?: string | null; textDirection: 'ltr' | 'rtl'; availableFormats: ('json' | 'usfm')[]; listOfBooksApiLink: string; numberOfBooks: number; totalNumberOfChapters: number; totalNumberOfVerses: number; }; export type CommentaryBook = { id: string; name: string; commonName: string; introduction?: string | null; order: number; firstChapterApiLink: string; lastChapterApiLink: string; numberOfChapters: number; totalNumberOfVerses: number; }; export type CommentaryBookChapter = { commentary: Commentary; book: CommentaryBook; thisChapterLink: string; nextChapterApiLink?: string | null; previousChapterApiLink?: string | null; numberOfVerses: number; chapter: CommentaryChapterData; }; export type CommentaryBooks = { commentary: Commentary; books: CommentaryBook[]; }; export type CommentaryChapterData = { number: number; introduction?: string | null; content: ChapterVerse[]; }; export type CommentaryProfile = { id: string; subject: string; reference?: VerseRef | null; thisProfileLink: string; referenceChapterLink?: string | null; }; export type CommentaryProfileContent = { commentary: Commentary; profile: CommentaryProfile; content: string[]; }; export type CommentaryProfiles = { commentary: Commentary; profiles: CommentaryProfile[]; }; export type FormattedText = { text: string; poem?: number | null; wordsOfJesus?: boolean | null; }; export type InlineHeading = { heading: string; }; export type InlineLineBreak = { lineBreak: boolean; }; export type Translation = { id: string; name: string; englishName: string; website: string; licenseUrl: string; shortName: string; language: string; languageName?: string | null; languageEnglishName?: string | null; textDirection: 'ltr' | 'rtl'; availableFormats: ('json' | 'usfm')[]; listOfBooksApiLink: string; numberOfBooks: number; totalNumberOfChapters: number; totalNumberOfVerses: number; numberOfApocryphalBooks?: number | null; totalNumberOfApocryphalChapters?: number | null; totalNumberOfApocryphalVerses?: number | null; }; export type TranslationBook = { id: string; translationId: string; name: string; commonName: string; title?: string | null; order: number; numberOfChapters: number; firstChapterApiLink: string; lastChapterApiLink: string; totalNumberOfVerses: number; isApocryphal?: boolean | null; }; export type TranslationBookChapter = { translation: Translation; book: TranslationBook; thisChapterLink: string; thisChapterAudioLinks: AudioLinks; nextChapterApiLink?: string | null; nextChapterAudioLinks?: AudioLinks | null; previousChapterApiLink?: string | null; previousChapterAudioLinks?: AudioLinks | null; numberOfVerses: number; chapter: ChapterData; }; export type TranslationBooks = { translation: Translation; books: TranslationBook[]; }; export type VerseFootnoteReference = { noteId: number; }; export type VerseRef = { book: string; chapter: number; verse: number; endChapter?: number | null; endVerse?: number | null; }; export {};