Add study data client adapter
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
import type {
|
||||
AudioBibleContext,
|
||||
AudioBibleSegment,
|
||||
CommentaryEntry,
|
||||
DictionaryEntry,
|
||||
Footnote,
|
||||
LibraryState,
|
||||
MapContext,
|
||||
TranslationResource,
|
||||
Verse,
|
||||
} from './types'
|
||||
|
||||
export type TranslationNotesByVerse = Map<string, { footnotes: Footnote[]; studyNotes: Footnote[] }>
|
||||
|
||||
export type StudyDataClient = {
|
||||
getTranslations(): Promise<TranslationResource[]>
|
||||
getLibraryState(translationId?: string): Promise<LibraryState>
|
||||
getTranslationNotesForVerses(translationId: string, verses: Verse[]): Promise<TranslationNotesByVerse>
|
||||
searchVerses(query: string, translationId?: string): Promise<Verse[]>
|
||||
addTagToVerse(verseId: number, label: string, color: string, translationId?: string): Promise<Verse>
|
||||
getCommentaryForVerse(verse: Verse): Promise<CommentaryEntry[]>
|
||||
getDictionaryEntriesForTerms(terms: string[]): Promise<DictionaryEntry[]>
|
||||
getMapContextForVerses(selectedVerse: Verse, pageVerses: Verse[]): Promise<MapContext>
|
||||
getAudioContextForVerse(translationId: string, verse: Verse): Promise<AudioBibleContext | null>
|
||||
getAudioObjectUrl(segment: AudioBibleSegment): Promise<string>
|
||||
}
|
||||
Reference in New Issue
Block a user