UNPKG

biblesdk

Version:

Typescript client for Bible SDK API

570 lines (566 loc) 17.4 kB
/** * This file was auto-generated by openapi-typescript. * Do not make direct changes to the file. */ interface paths { "/api/books": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * List all books * @description Returns a list of all books in the Bible */ get: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description OK */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["routes.BooksListResponse"]; }; }; }; }; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/api/books/{book}": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * Get book metadata * @description Returns metadata for a specific book */ get: { parameters: { query?: never; header?: never; path: { /** @description Book code (e.g. GEN) */ book: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description OK */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["routes.BookDTO"]; }; }; /** @description Not Found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["routes.ErrorResponse"]; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["routes.ErrorResponse"]; }; }; }; }; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/api/books/{book}/chapters": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * List chapters in a book * @description Returns a list of chapters for a given book */ get: { parameters: { query?: never; header?: never; path: { /** @description Book code (e.g. GEN) */ book: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description OK */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["routes.ChaptersListResponse"]; }; }; /** @description Not Found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["routes.ErrorResponse"]; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["routes.ErrorResponse"]; }; }; }; }; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/api/books/{book}/chapters/{chapter}": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * Get chapter metadata * @description Returns metadata for a specific chapter */ get: { parameters: { query?: never; header?: never; path: { /** @description Book code (e.g. GEN) */ book: string; /** @description Chapter number */ chapter: number; }; cookie?: never; }; requestBody?: never; responses: { /** @description OK */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["routes.ChapterDTO"]; }; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["routes.ErrorResponse"]; }; }; /** @description Not Found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["routes.ErrorResponse"]; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["routes.ErrorResponse"]; }; }; }; }; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/api/books/{book}/chapters/{chapter}/verses": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * List phrases in a chapter * @description Returns all phrases for a given book and chapter, with optional concordance data and pagination */ get: { parameters: { query?: { /** @description Number of phrases to return (pagination) */ take?: number; /** @description Cursor for pagination */ cursor?: number; /** @description Include Strong's Concordance */ concordance?: boolean; }; header?: never; path: { /** @description Book code (e.g. GEN) */ book: string; /** @description Chapter number */ chapter: number; }; cookie?: never; }; requestBody?: never; responses: { /** @description OK */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["routes.PhrasesByChapterResponse"]; }; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["routes.ErrorResponse"]; }; }; /** @description Not Found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["routes.ErrorResponse"]; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["routes.ErrorResponse"]; }; }; }; }; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/api/books/{book}/chapters/{chapter}/verses/{verse}": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * List phrases in a verse * @description Returns all phrases for a given book/chapter/verse, with optional concordance data */ get: { parameters: { query?: { /** @description Include Strong's Concordance */ concordance?: boolean; }; header?: never; path: { /** @description Book code (e.g. GEN) */ book: string; /** @description Chapter number */ chapter: number; /** @description Verse number or hypen-separated range (e.g. 1-5 or 1) */ verse: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description OK */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["routes.PhraseDTO"][]; }; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["routes.ErrorResponse"]; }; }; /** @description Not Found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["routes.ErrorResponse"]; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["routes.ErrorResponse"]; }; }; }; }; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/api/search": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * Search verses * @description Returns best matching verses for a query */ get: { parameters: { query: { /** @description Search query */ query: string; }; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description OK */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["routes.SearchResponse"]; }; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["routes.ErrorResponse"]; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["routes.ErrorResponse"]; }; }; }; }; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; } type webhooks = Record<string, never>; interface components { schemas: { "routes.BookDTO": { chapters?: number; code?: string; name?: string; position?: number; }; "routes.BooksListResponse": { books?: components["schemas"]["routes.BookDTO"][]; }; "routes.ChapterDTO": { chapter?: number; position?: number; verses?: number; }; "routes.ChaptersListResponse": { chapters?: components["schemas"]["routes.ChapterDTO"][]; }; /** @description Error response object */ "routes.ErrorResponse": { error?: string; }; "routes.Links": { next?: string; prev?: string; }; "routes.PhraseDTO": { position?: number; text?: string; usfm?: string[]; verse?: number; verse_position?: number; }; "routes.PhrasesByChapterResponse": { links?: components["schemas"]["routes.Links"]; phrases?: components["schemas"]["routes.PhraseDTO"][]; }; "routes.SearchResponse": { matches?: components["schemas"]["routes.VerseMatchDTO"][]; }; "routes.VerseMatchDTO": { book?: string; chapter?: number; score?: number; verse?: number; }; }; responses: never; parameters: never; requestBodies: never; headers: never; pathItems: never; } type $defs = Record<string, never>; type operations = Record<string, never>; type ConcordanceInfo = { strongs_number?: number; strongs_type?: string; transliteration?: string; definition?: string; hebrew_word?: string; greek_word?: string; }; type Book = { chapters: number; code: string; name: string; position: number; }; type Chapter = { book: string; chapter: number; position: number; verses: number; }; type Verse = { book: string; chapter: number; verse: number; text: string; }; type Phrase = { book: string; text: string; usfm: string[]; position: number; chapter: number | null; verse: number | null; verse_position: number | null; }; type PhraseWithConcordanceInfo = Phrase & { strongs_number: number | null; strongs_type: string | null; transliteration: string | null; definition: string | null; hebrew_word: string | null; greek_word: string | null; }; type Reading<T = Phrase> = { phrases: Phrase[]; next: (() => Promise<Reading<T>>) | null; prev: (() => Promise<Reading<T>>) | null; }; type VerseRange = { startVerse: number; endVerse: number; }; type VerseMatch = { book: string; chapter: number; verse: number; score: number; }; export { $defs, Book, Chapter, ConcordanceInfo, Phrase, PhraseWithConcordanceInfo, Reading, Verse, VerseMatch, VerseRange, components, operations, paths, webhooks };