import { SearchSentenceProps, SearchSentenceResult, SearchTermResult } from "../search/types.ts"; import { DeepPartial } from "../util/types.ts"; /** @interface serach-related functions */ export interface CoreSearch { terms(term: string): Promise>; sentence(sentence: string, optional?: DeepPartial): Promise; // glossary: (input: string) => Promise; }; /** @interface user management */ export interface CoreUser { // TODO: list // TODO: add // TODO: remove // TODO: get info }; /** @interface dictionary/user data import functions */ export interface CoreImport { // TODO: import dictionary // TODO: import user preferences }; /** @interface dictionary/user data export functions */ export interface CoreExport { // TODO: export dictionary // TODO: export user preferences }; /** * @summary Core interface * * This interface gets implemented by all Core clients, so clients can be * swapped easily. You should probably not directly use any Core, but use the * abstracted API from ../api/ */ export default abstract class Core { /** @summary resolved when ready */ abstract ready: Promise; abstract search: CoreSearch; abstract user: CoreUser; abstract import: CoreImport; abstract export: CoreExport; };