/**
 * AI 3D 模块 API 存根文件
 * 原模块已剥离至 competition-management-system-stripped-modules/
 * 仅保留被赛事模块引用的类型和接口定义
 */
import request from "@/utils/request";
import type { PaginationParams } from "@/types/api";

export type AI3DTaskStatus = "pending" | "processing" | "completed" | "failed" | "timeout";
export type AI3DInputType = "text" | "image";

export interface AI3DTask {
  id: number;
  tenantId: number;
  userId: number;
  inputType: AI3DInputType;
  inputContent: string;
  status: AI3DTaskStatus;
  resultUrl?: string;
  previewUrl?: string;
  resultUrls?: string[];
  previewUrls?: string[];
  errorMessage?: string;
  retryCount: number;
  createTime: string;
  completeTime?: string;
  queuePosition?: number;
}

export interface AI3DTaskListResponse {
  list: AI3DTask[];
  total: number;
  page: number;
  pageSize: number;
}

export function getAI3DTasks(params?: PaginationParams & { status?: AI3DTaskStatus }) {
  return request.get<AI3DTaskListResponse>("/ai-3d/tasks", { params });
}
