
export type TGender = "male" | "female" | "unknown";

export enum EVoiceStatus {
  UNKNOWN = 'unknown',
  DOING = 'doing',
  DONE = 'done',
  FAILED = 'failed'
}
export type TVoiceStatus = EVoiceStatus[keyof EVoiceStatus];



export type TVoiceItem = {
  createTime: string;
  duration: number;
  canDel?: boolean
  failedMsg: string;
  gender: TGender;
  genderDesc: string;
  isSystem: boolean;
  sourceName: string;
  status: TVoiceStatus;
  voiceId: string;
  voiceName: string;
  voiceUrl: string;
};

export type TVoiceCloneResponse = {
  userId: string|number,
  taskId: string,
  status: 'processing'| 'success' |'process_fail',
  message: string,
  data: TVoiceItem  
}

// 分页获取音色列表
export type TPaginatedVoiceResponse<T = TVoiceItem> = {
  data: T[];
  extData: Record<string, unknown> | null; // 明确可能为 null
  pageIndex: number;
  pageSize: number;
  searchKey?: string; // 改为可选
  totalCount: number;
};

export type TPageination = {
  extData: Record<string, unknown> | null; // 明确可能为 null
  pageIndex: number;
  pageSize: number;
  searchKey?: string; // 改为可选
  totalCount: number;
}

export enum EVoiceType {
  MINE = 'mine',
  SYSTEM = 'system'
}

export type TGetMyVoicesParams = {
  pageIndex?: number,
  pageSize?: number,
  type?: EVoiceType,
  gender?: TGender,
  entId: number|string,
}

