/** * Convex React client surface (`convex.react`). * * Emits typed `useQuery` / `useMutation` wrappers against the generated * `api.queries.*` / `api.mutations.*` symbols from the queries/mutations * surfaces. This is the Manifest frontend contract for Convex apps — not * react-query or openapi (those target HTTP dispatchers). * * Entities gated by read/`all` policies emit `internalQuery` server-side and * are omitted from client hooks (fail-closed; use a policy-enforcing public * wrapper). Mutations remain callable — governance runs inside the mutation. * * When `zodParamsImport` is set, command/create hooks parse Manifest command * params through the bundled Zod module (`zod.schemas`) before calling Convex. */ import type { IR } from '../../ir'; import type { ProjectionDiagnostic } from '../interface'; export declare const SURFACE_REACT: "convex.react"; /** Bundled Zod companion path (zod.schemas surface) — not per-command microfiles. */ export declare const DEFAULT_ZOD_BUNDLE_PATH = "schemas/manifest-schemas.ts"; export interface ConvexReactOptions { /** * Override for the Convex `api` import. When omitted, derived from * {@link output} (or the default client path) relative to * `convex/_generated/api`. */ apiImportPath?: string; /** * Output path hint (default `src/lib/manifest-convex-react.ts`). * Schema-surface `output` values like `convex/schema.ts` are ignored so a * shared options bag cannot mis-place the client artifact. */ output?: string; /** * When set (Convex auth seam), emit useQuery hooks even for read-policy-gated * entities — matching public `query` emission under the same option. */ authContextImport?: string; /** * When set with {@link authContextImport}, read policies that call `flag()` * stay client-readable (same seam as `convex.queries`). */ flagProviderImport?: string; /** * Wire mutation/create hooks to parse command params via the Zod bundle. * - `true` → import from {@link DEFAULT_ZOD_BUNDLE_PATH} relative to the client * - string → explicit module specifier * - omitted/false → raw `useMutation` (no client parse) */ zodParamsImport?: string | boolean; } export declare function resolveZodParamsImportPath(reactPathHint: string, option: string | boolean | undefined): string | undefined; /** * Generate the Convex React client module for persistent, publicly readable * entities + all persistent-entity commands. */ export declare function generateReactClient(ir: IR, rawOptions: Record | undefined): { code: string; diagnostics: ProjectionDiagnostic[]; pathHint: string; }; //# sourceMappingURL=react-client.d.ts.map