/**
 * Bulk Operations API Service
 */

import api from './api';
import type { 
  BulkUpdateRequest, 
  BulkPreviewResponse, 
  BulkUpdateResponse 
} from '../types/bulk';

/**
 * Preview bulk update (dry-run)
 */
export async function previewBulkUpdate(request: BulkUpdateRequest): Promise<BulkPreviewResponse> {
  const { data } = await api.post<BulkPreviewResponse>('/bulk/preview', request);
  return data;
}

/**
 * Apply bulk update
 */
export async function applyBulkUpdate(request: BulkUpdateRequest): Promise<BulkUpdateResponse> {
  const { data } = await api.post<BulkUpdateResponse>('/bulk/update', request);
  return data;
}
