import { system } from "@silverbulletmd/silverbullet/syscalls"; import type { ObjectValue } from "../../type/index.ts"; import type { KV, KvQuery } from "../../type/datastore.ts"; export function indexObjects( page: string, objects: ObjectValue[], ): Promise { return system.invokeFunction("index.indexObjects", page, objects); } export function batchSet(page: string, kvs: KV[]): Promise { return system.invokeFunction("index.batchSet", page, kvs); } export function query( query: KvQuery, ): Promise { return system.invokeFunction("index.query", query); } export function getObjectByRef( page: string, tag: string, ref: string, ): Promise { return system.invokeFunction("index.getObjectByRef", page, tag, ref); }