import apiClient from './apiClient' export type DispatchStatus = 'PENDING' | 'SENT' | 'FAILED' export interface DispatchLogResponse { id: string entityId: string entityName: string promptSent: string aiResponse: string emailSubject: string emailBody: string status: DispatchStatus errorMessage: string | null dispatchedAt: string } /** GET /api/v1/dispatch-logs — list all dispatch logs. */ export async function getLogs(): Promise { const response = await apiClient.get('/v1/dispatch-logs') return response.data } /** GET /api/v1/dispatch-logs/entity/:id — list logs for a specific entity. */ export async function getLogsByEntity(entityId: string): Promise { const response = await apiClient.get(`/v1/dispatch-logs/entity/${entityId}`) return response.data }