import apiClient from './client';

export interface VoiceFeedbackData {
  childId?: string;
  activityId?: string;
  transcript: string;
  language?: string;
  extractedType: string;
  extractedData: Record<string, any>;
  confidence?: number;
  action: 'approved' | 'edited' | 'rejected';
  finalType?: string;
  finalData?: Record<string, any>;
  userNotes?: string;
}

export const voiceApi = {
  async saveFeedback(feedbackData: VoiceFeedbackData) {
    const response = await apiClient.post('/api/v1/voice/feedback', feedbackData);
    return response.data;
  },
};
