import {ISearchParams} from "./ISearchParams";

export const TaskTypes = ['detail', 'sold', 'search', 'bid', 'buyItNow'] as const

export type TaskType = (typeof TaskTypes)[number]

export interface ITask {
	/**
	 * 任务 ID
	 */
	id: string | number
	/**
	 * 任务类型
	 */
	type: TaskType
}

export interface ISearchTask extends ITask {
	type: 'search';
	/**
	 * 任务关键字
	 */
	word: string;
	/**
	 * 任务参数
	 */
	params: ISearchParams;
}