import { IFile } from "../models/file";
import { ISocket } from "../models/socket";
type TCompilationAttempt = {
    source_code: string;
    stdout: string;
    exit_code: number;
    starting_at: number;
    ending_at: number;
};
type TTestAttempt = {
    source_code: string;
    stdout: string;
    exit_code: number;
    starting_at: number;
    ending_at: number;
};
type TAIInteraction = {
    student_message: string;
    source_code: string;
    ai_response: string;
    starting_at: number;
    ending_at: number;
};
type TQuizSelection = {
    question: string;
    answer: string;
    isCorrect: boolean;
};
type TQuizSubmission = {
    quiz_hash: string;
    selections: TQuizSelection[];
    submitted_at: number;
};
export type TStep = {
    slug: string;
    position: number;
    files: IFile[];
    is_testeable: boolean;
    opened_at?: number;
    completed_at?: number;
    compilations: TCompilationAttempt[];
    tests: TTestAttempt[];
    ai_interactions: TAIInteraction[];
    quiz_submissions: TQuizSubmission[];
};
type TWorkoutSession = {
    started_at: number;
    ended_at?: number;
};
export interface ITelemetryJSONSchema {
    telemetry_id?: string;
    version: string;
    user_id?: number | string;
    slug: string;
    agent?: string;
    tutorial_started_at: number;
    last_interaction_at: number;
    steps: Array<TStep>;
    workout_session: TWorkoutSession[];
}
export type TStepEvent = "compile" | "test" | "ai_interaction" | "open_step" | "quiz_submission";
export type TTelemetryUrls = {
    streaming?: string;
    batch?: string;
};
interface ITelemetryManagerCLI {
    configPath: string | null;
    socket: ISocket | null;
    version: string;
    start: (path: string, socket: ISocket) => void;
    registerStepEvent: (stepPosition: number, event: TStepEvent, data: any) => void;
    save: (telemetry: ITelemetryJSONSchema) => void;
    retrieve: () => Promise<ITelemetryJSONSchema | null>;
}
declare const TelemetryManager: ITelemetryManagerCLI;
export default TelemetryManager;
