import type { FunctionReference } from 'convex/server'; import type { InterviewContext } from '../types'; /** * Props for the BugReportButton component */ export interface BugReportButtonProps { /** Reporter type: 'staff' for internal users, 'customer' for external users */ reporterType: 'staff' | 'customer'; /** Unique identifier for the reporter */ reporterId: string; /** Reporter's email address */ reporterEmail: string; /** Reporter's display name */ reporterName: string; /** Convex API reference for bug reports */ bugReportApi: { create: FunctionReference<'mutation'>; generateUploadUrl: FunctionReference<'mutation'>; }; /** Convex API reference for feedback */ feedbackApi: { create: FunctionReference<'mutation'>; generateUploadUrl: FunctionReference<'mutation'>; }; /** Position of the floating button */ position?: { bottom?: number; right?: number; top?: number; left?: number; }; /** Button color (default: red) */ buttonColor?: string; /** Show feedback tab in addition to bug reports */ showFeedback?: boolean; /** Callback when submission succeeds */ onSuccess?: (type: 'bug' | 'feedback') => void; /** Callback when submission fails */ onError?: (error: Error, type: 'bug' | 'feedback') => void; /** Enable AI interview mode (requires @convex-dev/agent) */ enableInterview?: boolean; /** Default input mode when interview is enabled */ defaultMode?: 'form' | 'interview'; /** Context to help the AI interviewer ask better questions */ interviewContext?: InterviewContext; /** Convex API reference for interview actions (required if enableInterview is true) */ interviewApi?: { startBugInterview: FunctionReference<'action'>; startFeedbackInterview: FunctionReference<'action'>; continueInterview: FunctionReference<'action'>; getPendingForThread: FunctionReference<'query'>; getSessionByThread: FunctionReference<'query'>; }; } /** * Floating action button for submitting bug reports and feedback. * Captures browser diagnostics, console errors, and optional screenshots. * * @example * ```tsx * import { BugReportButton } from '@convex-dev/feedback/react'; * import { api } from './convex/_generated/api'; * * function App() { * return ( * * ); * } * ``` */ export declare function BugReportButton({ reporterType, reporterId, reporterEmail, reporterName, bugReportApi, feedbackApi, position, buttonColor, showFeedback, onSuccess, onError, enableInterview, defaultMode, interviewContext, interviewApi, }: BugReportButtonProps): import("react/jsx-runtime").JSX.Element; //# sourceMappingURL=BugReportButton.d.ts.map