diff options
Diffstat (limited to 'core/api.ts')
-rw-r--r-- | core/api.ts | 35 |
1 files changed, 32 insertions, 3 deletions
diff --git a/core/api.ts b/core/api.ts index 0720c8b..77195b2 100644 --- a/core/api.ts +++ b/core/api.ts @@ -1,6 +1,33 @@ -import { InputSentenceProps, ParseResult } from "../language/types.ts"; +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<Array<SearchTermResult>>; + sentence(sentence: string, optional?: DeepPartial<SearchSentenceProps>): Promise<SearchSentenceResult>; + // glossary: (input: string) => Promise<void>; +}; + +/** @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 * @@ -12,7 +39,9 @@ export default abstract class Core { /** @summary resolved when ready */ abstract ready: Promise<void>; - /** @summary parse sentence */ - abstract parseSentence(input: string, options?: DeepPartial<InputSentenceProps>): Promise<ParseResult>; + abstract search: CoreSearch; + abstract user: CoreUser; + abstract import: CoreImport; + abstract export: CoreExport; }; |