/**
 * Task status enum
 */
export enum TaskStatus {
  PENDING = "pending",
  PROCESSING = "processing",
  COMPLETED = "completed",
  FAILED = "failed",
}

/**
 * Task metadata interface
 */
export type TaskMetadata = Record<string, unknown>;

/**
 * Task DTO for queue operations
 */
export interface TaskDto {
  id: string;
  type: string;
  data: TaskMetadata;
  status: TaskStatus;
  error?: string;
  createdAt?: Date;
  updatedAt?: Date;
  completedAt?: Date;
}

/**
 * Enqueue task request DTO
 */
export interface EnqueueTaskDto {
  type: string;
  data: TaskMetadata;
}

/**
 * Update task status DTO
 */
export interface UpdateTaskStatusDto {
  status: TaskStatus;
  error?: string;
  result?: TaskMetadata;
}
