/* eslint-disable */ /** * 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 = { chunks: { insert: FunctionReference< "mutation", "internal", { chunks: Array<{ content: { metadata?: Record; text: string }; embedding: Array; searchableText?: string; }>; entryId: string; startOrder: number; }, { status: "pending" | "ready" | "replaced" }, Name >; list: FunctionReference< "query", "internal", { entryId: string; order: "desc" | "asc"; paginationOpts: { cursor: string | null; endCursor?: string | null; id?: number; maximumBytesRead?: number; maximumRowsRead?: number; numItems: number; }; }, { continueCursor: string; isDone: boolean; page: Array<{ metadata?: Record; order: number; state: "pending" | "ready" | "replaced"; text: string; }>; pageStatus?: "SplitRecommended" | "SplitRequired" | null; splitCursor?: string | null; }, Name >; replaceChunksPage: FunctionReference< "mutation", "internal", { entryId: string; startOrder: number }, { nextStartOrder: number; status: "pending" | "ready" | "replaced" }, Name >; }; entries: { add: FunctionReference< "mutation", "internal", { allChunks?: Array<{ content: { metadata?: Record; text: string }; embedding: Array; searchableText?: string; }>; entry: { contentHash?: string; filterValues: Array<{ name: string; value: any }>; importance: number; key?: string; metadata?: Record; namespaceId: string; title?: string; }; onComplete?: string; }, { created: boolean; entryId: string; status: "pending" | "ready" | "replaced"; }, Name >; addAsync: FunctionReference< "mutation", "internal", { chunker: string; entry: { contentHash?: string; filterValues: Array<{ name: string; value: any }>; importance: number; key?: string; metadata?: Record; namespaceId: string; title?: string; }; onComplete?: string; }, { created: boolean; entryId: string; status: "pending" | "ready" }, Name >; deleteAsync: FunctionReference< "mutation", "internal", { entryId: string; startOrder: number }, null, Name >; deleteByKeyAsync: FunctionReference< "mutation", "internal", { beforeVersion?: number; key: string; namespaceId: string }, null, Name >; deleteByKeySync: FunctionReference< "action", "internal", { key: string; namespaceId: string }, null, Name >; deleteSync: FunctionReference< "action", "internal", { entryId: string }, null, Name >; findByContentHash: FunctionReference< "query", "internal", { contentHash: string; dimension: number; filterNames: Array; key: string; modelId: string; namespace: string; }, { contentHash?: string; entryId: string; filterValues: Array<{ name: string; value: any }>; importance: number; key?: string; metadata?: Record; replacedAt?: number; status: "pending" | "ready" | "replaced"; title?: string; } | null, Name >; get: FunctionReference< "query", "internal", { entryId: string }, { contentHash?: string; entryId: string; filterValues: Array<{ name: string; value: any }>; importance: number; key?: string; metadata?: Record; replacedAt?: number; status: "pending" | "ready" | "replaced"; title?: string; } | null, Name >; list: FunctionReference< "query", "internal", { namespaceId?: string; order?: "desc" | "asc"; paginationOpts: { cursor: string | null; endCursor?: string | null; id?: number; maximumBytesRead?: number; maximumRowsRead?: number; numItems: number; }; status: "pending" | "ready" | "replaced"; }, { continueCursor: string; isDone: boolean; page: Array<{ contentHash?: string; entryId: string; filterValues: Array<{ name: string; value: any }>; importance: number; key?: string; metadata?: Record; replacedAt?: number; status: "pending" | "ready" | "replaced"; title?: string; }>; pageStatus?: "SplitRecommended" | "SplitRequired" | null; splitCursor?: string | null; }, Name >; promoteToReady: FunctionReference< "mutation", "internal", { entryId: string }, { replacedEntry: { contentHash?: string; entryId: string; filterValues: Array<{ name: string; value: any }>; importance: number; key?: string; metadata?: Record; replacedAt?: number; status: "pending" | "ready" | "replaced"; title?: string; } | null; }, Name >; }; namespaces: { deleteNamespace: FunctionReference< "mutation", "internal", { namespaceId: string }, { deletedNamespace: null | { createdAt: number; dimension: number; filterNames: Array; modelId: string; namespace: string; namespaceId: string; status: "pending" | "ready" | "replaced"; version: number; }; }, Name >; deleteNamespaceSync: FunctionReference< "action", "internal", { namespaceId: string }, null, Name >; get: FunctionReference< "query", "internal", { dimension: number; filterNames: Array; modelId: string; namespace: string; }, null | { createdAt: number; dimension: number; filterNames: Array; modelId: string; namespace: string; namespaceId: string; status: "pending" | "ready" | "replaced"; version: number; }, Name >; getOrCreate: FunctionReference< "mutation", "internal", { dimension: number; filterNames: Array; modelId: string; namespace: string; onComplete?: string; status: "pending" | "ready"; }, { namespaceId: string; status: "pending" | "ready" }, Name >; list: FunctionReference< "query", "internal", { paginationOpts: { cursor: string | null; endCursor?: string | null; id?: number; maximumBytesRead?: number; maximumRowsRead?: number; numItems: number; }; status: "pending" | "ready" | "replaced"; }, { continueCursor: string; isDone: boolean; page: Array<{ createdAt: number; dimension: number; filterNames: Array; modelId: string; namespace: string; namespaceId: string; status: "pending" | "ready" | "replaced"; version: number; }>; pageStatus?: "SplitRecommended" | "SplitRequired" | null; splitCursor?: string | null; }, Name >; listNamespaceVersions: FunctionReference< "query", "internal", { namespace: string; paginationOpts: { cursor: string | null; endCursor?: string | null; id?: number; maximumBytesRead?: number; maximumRowsRead?: number; numItems: number; }; }, { continueCursor: string; isDone: boolean; page: Array<{ createdAt: number; dimension: number; filterNames: Array; modelId: string; namespace: string; namespaceId: string; status: "pending" | "ready" | "replaced"; version: number; }>; pageStatus?: "SplitRecommended" | "SplitRequired" | null; splitCursor?: string | null; }, Name >; lookup: FunctionReference< "query", "internal", { dimension: number; filterNames: Array; modelId: string; namespace: string; }, null | string, Name >; promoteToReady: FunctionReference< "mutation", "internal", { namespaceId: string }, { replacedNamespace: null | { createdAt: number; dimension: number; filterNames: Array; modelId: string; namespace: string; namespaceId: string; status: "pending" | "ready" | "replaced"; version: number; }; }, Name >; }; search: { search: FunctionReference< "action", "internal", { chunkContext?: { after: number; before: number }; dimension?: number; embedding?: Array; filters: Array<{ name: string; value: any }>; limit: number; modelId: string; namespace: string; searchType?: "vector" | "text" | "hybrid"; textQuery?: string; textWeight?: number; vectorScoreThreshold?: number; vectorWeight?: number; }, { entries: Array<{ contentHash?: string; entryId: string; filterValues: Array<{ name: string; value: any }>; importance: number; key?: string; metadata?: Record; replacedAt?: number; status: "pending" | "ready" | "replaced"; title?: string; }>; results: Array<{ content: Array<{ metadata?: Record; text: string }>; entryId: string; order: number; score: number; startOrder: number; }>; }, Name >; }; };