import type { ListOptions, RuleStore, RulingListOptions, SearchOptions } from "./store.ts"; import type { BanlistEntry, Card, CardName, CardSummary, Corpus, Erratum, Game, PatchNote, Rule, RuleBook, RuleHit, Ruling, SearchAllResult, Section, Term } from "./types.ts"; /** * The corpus, read from a SQLite file. * * Every read is a local query. Nothing here opens a socket, so the assistant * cannot be slower than a disk read and cannot be down because something else * is down. */ export declare class SqliteStore implements RuleStore { #private; private constructor(); /** * Open a built database. Read-only, so two processes can share one file. * * A corpus directory holds JSON, and the database is built from it. The * database is not in version control, so a fresh clone has the JSON and no * database. SQLite reports that as "unable to open database file", which * names no cause and no cure, so this says which file is missing and which * command writes it. */ static open(path: string): SqliteStore; /** Build a database in memory from a corpus. This is what the tests use. */ static fromCorpus(corpus: Corpus): SqliteStore; game(): Promise; listRuleBooks(): Promise; listSections(options?: ListOptions): Promise; getRule(id: string): Promise; getRuleByNumber(ruleNumber: string, options?: { ruleBookId?: string; }): Promise; getRuleBySlug(slug: string, options?: { ruleBookId?: string; }): Promise; listRules(options?: ListOptions): Promise; searchRules(query: string, options?: SearchOptions): Promise; getChildren(id: string): Promise; getParent(id: string): Promise; getSiblings(id: string): Promise; getRelated(id: string, options?: { limit?: number; }): Promise; listTerms(options?: { limit?: number; category?: string; }): Promise; getTerm(idOrSlug: string): Promise; searchTerms(query: string, options?: { limit?: number; }): Promise; listErrata(options?: { cardName?: string; limit?: number; }): Promise; listBanlist(options?: { cardName?: string; format?: string; limit?: number; }): Promise; listPatchNotes(options?: { category?: string; limit?: number; }): Promise; getPatchNote(slugOrId: string): Promise; listRulings(options?: RulingListOptions): Promise; searchRulings(query: string, options?: { limit?: number; }): Promise; getRulingByQuestion(question: string): Promise; searchCards(query: string, options?: { limit?: number; }): Promise; getCards(ids: string[]): Promise; allCardNames(): Promise; searchAll(query: string, options?: { limit?: number; }): Promise; close(): Promise; } //# sourceMappingURL=sqlite-store.d.ts.map