1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
| import {ISearchParam} from "./IPage";
|
| export const TaskTypes = ['detail', 'sold', 'search', 'bid', 'buyItNow'] as const
|
| export type TaskType = (typeof TaskTypes)[number]
|
| export interface IResp<T extends ITask = any> {
| id?: number
| code: number
| message: string
| data?: T
| }
|
| export interface ITask {
| id: string | number
| type: TaskType
| word?: string | null
| }
|
| export interface IDetailTask extends ITask {
| type: 'detail' | 'sold'
| }
|
| export interface ISearchTask extends ITask {
| type: 'search'
| word: string
| params?: ISearchParam
| }
|
| export interface IBidParams {
| goodsId: string
| bid: string
| }
|
| export interface IBidTask extends ITask {
| type: 'bid' | 'buyItNow'
| params: IBidParams
| }
|
| export interface IBidTaskResult {
| id: string | number
| results: {
| success?: boolean,
| error?: string
| }
| }
|
|