/**
 * Batch Service
 */

import { api } from '../apiClient';

export interface BatchJob {
  id: string;
  status: 'pending' | 'running' | 'completed' | 'failed';
  total: number;
  processed: number;
  results?: any[];
}

export const BatchService = {
  createJob: async (items: any[]): Promise<BatchJob> => {
    const response = await api.post<BatchJob>('/api/batch', { items });
    return response.data;
  },

  getJob: async (jobId: string): Promise<BatchJob> => {
    const response = await api.get<BatchJob>(`/api/batch/${jobId}`);
    return response.data;
  },
};
