| 1 | import type { ChannelPublishRecordOption } from '@/api/channels/channel.types' |
| 2 | import type { PublishStatus } from './publish.constants' |
| 3 | import type { PlatType } from '@/app/config/platConfig' |
| 4 | |
| 5 | // Source: plat/types/publish.types.ts |
| 6 | |
| 7 | |
| 8 | /** |
| 9 | * PublishRecordItem 数据结构。 |
| 10 | */ |
| 11 | export interface PublishRecordItem { |
| 12 | option: ChannelPublishRecordOption |
| 13 | userId: string |
| 14 | flowId: string |
| 15 | userTaskId: string |
| 16 | taskId: string |
| 17 | taskMaterialId: string |
| 18 | type: string |
| 19 | title: string |
| 20 | desc: string |
| 21 | accountId: string |
| 22 | topics: string[] |
| 23 | accountType: PlatType |
| 24 | uid: string |
| 25 | videoUrl: string |
| 26 | coverUrl: string |
| 27 | imgUrlList: string[] |
| 28 | publishTime: Date |
| 29 | status: PublishStatus |
| 30 | inQueue: boolean |
| 31 | dataId: string |
| 32 | workLink: string |
| 33 | linkStatus?: 'pending' | 'ready' | 'failed' |
| 34 | linkError?: string |
| 35 | linkMeta?: Record<string, unknown> |
| 36 | platformWorkId?: string |
| 37 | createdAt: string |
| 38 | updatedAt: string |
| 39 | id: string |
| 40 | errorMsg: string |
| 41 | engagement?: PublishRecordEngagement |
| 42 | } |
| 43 | |
| 44 | /** |
| 45 | * PublishRecordEngagement 类型。 |
| 46 | */ |
| 47 | export interface PublishRecordEngagement { |
| 48 | viewCount: number |
| 49 | commentCount: number |
| 50 | likeCount: number |
| 51 | shareCount: number |
| 52 | clickCount: number |
| 53 | impressionCount: number |
| 54 | favoriteCount: number |
| 55 | } |
| 56 | |
| 57 | /** |
| 58 | * 发布接口响应包装。 |
| 59 | */ |
| 60 | export type PublishApiResponse<T> = Awaited<ReturnType<typeof import('@/utils/request').request<T>>> |
| 61 |