export interface MetricShiftConfig { projectId: string; apiKey: string; apiUrl?: string; widget?: WidgetConfig; } export type FieldType = 'textarea' | 'text' | 'rating' | 'nps' | 'csat' | 'select' | 'multiselect' | 'boolean'; export interface FieldConfig { id: string; type: FieldType; label: string; placeholder?: string; required?: boolean; options?: string[]; lowLabel?: string; highLabel?: string; emojiScale?: [string, string, string, string, string]; } export declare const NPS_PRESET: FieldConfig[]; export declare const CSAT_PRESET: FieldConfig[]; export declare const GENERAL_PRESET: FieldConfig[]; export type TriggerType = 'manual' | 'auto' | 'delay' | 'scroll' | 'exit-intent' | 'click' | 'event'; export interface TriggerConfig { type: TriggerType; delay?: number; scrollDepth?: number; clicks?: number; event?: string; } export type DisplayMode = 'button' | 'toaster' | 'slide-in' | 'inline' | 'banner'; export type ButtonVariant = 'solid' | 'outline' | 'ghost'; export type WidgetPosition = 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left' | 'inline'; export interface AppearanceConfig { buttonText?: string; subtitleText?: string; variant?: ButtonVariant; primaryColor?: string; buttonTextColor?: string; position?: WidgetPosition; avatarSrc?: string; avatarAlt?: string; avatarSize?: number; welcomeTitle?: string; welcomeSubtitle?: string; successMessage?: string; showBranding?: boolean; } export interface SessionConfig { showOnce?: boolean; cooldown?: number; maxShows?: number; } export interface WidgetConfig { mode?: DisplayMode; trigger?: TriggerConfig; fields?: FieldConfig[]; appearance?: AppearanceConfig; session?: SessionConfig; } export interface FeedbackPayload { project_id: string; fields: Record; page_url?: string; page_title?: string; user_agent?: string; user_identifier?: string; user_email?: string; user_name?: string; source?: 'widget' | 'sdk' | 'qr' | 'csv_import' | 'external_signal'; widget_type?: 'nps' | 'csat' | 'general' | 'custom'; } export interface FeedbackFormData { text: string; rating?: number; feedbackType: 'general' | 'bug' | 'feature_request' | 'question' | 'praise'; userEmail?: string; userName?: string; } export type FieldValue = string | number | boolean | string[]; export type BusEventType = 'open' | 'close' | 'submit' | 'trigger'; export interface BusEvent { type: BusEventType; payload?: { flowId?: string; eventName?: string; }; } export type BusListener = (event: BusEvent) => void; export interface NpsAnalytics { score: number; total: number; promoters: number; passives: number; detractors: number; promoterPct: number; passivePct: number; detractorPct: number; trend: NpsTrendPoint[]; } export interface NpsTrendPoint { period: string; score: number; total: number; } export interface GeneralAnalytics { total_feedback: number; positive_percentage: number; negative_percentage: number; neutral_percentage: number; active_themes: number; sentiment_breakdown: { positive: number; neutral: number; negative: number; }; } export interface AnalyticsResponse { general: GeneralAnalytics; nps?: NpsAnalytics; widget_type?: 'nps' | 'csat' | 'general' | 'mixed'; } //# sourceMappingURL=index.d.ts.map