import { type CSSProperties, type JSX } from "react"; import { type FunctionReference } from "convex/server"; type DeploymentInfo = { _id: string; _creationTime: number; currentDeploymentId: string; deployedAt: number; spaFallback?: boolean; } | null; type DeploymentQueryRef = FunctionReference<"query", "public", Record, DeploymentInfo>; /** * Hook to detect when a new deployment is available. * * @param getCurrentDeployment - Optional query reference. Defaults to * `api.staticHosting.getCurrentDeployment` (resolved by path). If you've * re-exported the deployment query under a different module name, pass the * reference explicitly. * * @example * ```tsx * import { useDeploymentUpdates } from "@convex-dev/static-hosting/react"; * * function App() { * const { updateAvailable, reload } = useDeploymentUpdates(); * return updateAvailable ? : null; * } * ``` */ export declare function useDeploymentUpdates(getCurrentDeployment?: DeploymentQueryRef): { updateAvailable: boolean; reload: () => void; dismiss: () => void; deployment: DeploymentInfo; /** * When set, the deployment query isn't exported from the app; the banner * won't work until the user wires it up. The string is suitable to render * during local development so the missing setup is obvious. */ setupError: string | null; }; /** * Ready-to-use banner shown when a new deployment is available. * * @example * ```tsx * import { UpdateBanner } from "@convex-dev/static-hosting/react"; * * ``` */ export declare function UpdateBanner({ getCurrentDeployment, message, buttonText, dismissable, className, style, }?: { getCurrentDeployment?: DeploymentQueryRef; message?: string; buttonText?: string; dismissable?: boolean; className?: string; style?: CSSProperties; }): JSX.Element | null; export {}; //# sourceMappingURL=index.d.ts.map