UNPKG

@convex-dev/prosemirror-sync

Version:

Sync ProseMirror documents for Tiptap using this Convex component.

77 lines 2.4 kB
/** * Generated `ComponentApi` utility. * * THIS CODE IS AUTOMATICALLY GENERATED. * * To regenerate, run `npx convex dev`. * @module */ import type { FunctionReference } from "convex/server"; /** * A utility for referencing a Convex component's exposed API. * * Useful when expecting a parameter like `components.myComponent`. * Usage: * ```ts * async function myFunction(ctx: QueryCtx, component: ComponentApi) { * return ctx.runQuery(component.someFile.someQuery, { ...args }); * } * ``` */ export type ComponentApi<Name extends string | undefined = string | undefined> = { lib: { deleteDocument: FunctionReference<"mutation", "internal", { id: string; }, null, Name>; deleteSnapshots: FunctionReference<"mutation", "internal", { afterVersion?: number; beforeVersion?: number; id: string; }, null, Name>; deleteSteps: FunctionReference<"mutation", "internal", { afterVersion?: number; beforeTs: number; deleteNewerThanLatestSnapshot?: boolean; id: string; }, null, Name>; getSnapshot: FunctionReference<"query", "internal", { id: string; version?: number; }, { content: null; } | { content: string; version: number; }, Name>; getSteps: FunctionReference<"query", "internal", { id: string; version: number; }, { clientIds: Array<string | number>; steps: Array<string>; version: number; }, Name>; latestVersion: FunctionReference<"query", "internal", { id: string; }, null | number, Name>; submitSnapshot: FunctionReference<"mutation", "internal", { content: string; id: string; pruneSnapshots?: boolean; version: number; }, null, Name>; submitSteps: FunctionReference<"mutation", "internal", { clientId: string | number; id: string; steps: Array<string>; version: number; }, { clientIds: Array<string | number>; status: "needs-rebase"; steps: Array<string>; } | { status: "synced"; }, Name>; }; }; //# sourceMappingURL=component.d.ts.map