import request, { type RequestOptions } from '/@/utils/request'; export interface StatsParams { pending?: number; verified?: number; rejected?: number; } export interface ImageMaterialItem { id: number; imageId: string; accountId: string; imageUsage?: string; previewUrl?: string; verifyStatus: string; description?: string; } export interface VideoMaterialItem { id: number; videoId: string; accountId: string; previewUrl?: string; verifyStatus: string; description?: string; } export interface VerifyLogItem { id: number; materialType: string; materialId: string; accountId: string; taskId?: string; verifyStatus: string; suggestion?: number; requestParams?: string; responseResult?: string; errorMsg?: string; createdAt: string; } export interface PageParams { page: number; pageSize: number; status?: string; accountId?: string; materialType?: string; verifyStatus?: string; materialId?: string; } export interface ListResponse { code: number; message: string; data: { list: T[]; total: number; }; } export interface StatsResponse { code: number; message: string; data: StatsParams; } export function getImageStats(requestOptions?: RequestOptions) { return request({ url: '/cid/material/verify/controller/stats-image', method: 'get', requestOptions, }) as Promise; } export function getVideoStats(requestOptions?: RequestOptions) { return request({ url: '/cid/material/verify/controller/stats-video', method: 'get', requestOptions, }) as Promise; } export function getImageList(params: PageParams, requestOptions?: RequestOptions) { return request({ url: '/cid/material/verify/controller/list-image', method: 'get', params, requestOptions, }) as Promise>; } export function getVideoList(params: PageParams, requestOptions?: RequestOptions) { return request({ url: '/cid/material/verify/controller/list-video', method: 'get', params, requestOptions, }) as Promise>; } export function getVerifyLogList(params: PageParams, requestOptions?: RequestOptions) { return request({ url: '/cid/material/verify/controller/list-log', method: 'get', params, requestOptions, }) as Promise>; } export function manualVerifyImage(data: { materialId: string }, requestOptions?: RequestOptions) { return request({ url: '/cid/material/verify/controller/manual-verify-image', method: 'post', data, requestOptions, }); } export function manualVerifyVideo(data: { materialId: string }, requestOptions?: RequestOptions) { return request({ url: '/cid/material/verify/controller/manual-verify-video', method: 'post', data, requestOptions, }); } export function pollImageResults(requestOptions?: RequestOptions) { return request({ url: '/cid/yidun/callback/controller/poll-image-results', method: 'post', requestOptions, }); } export function pollVideoResults(requestOptions?: RequestOptions) { return request({ url: '/cid/yidun/callback/controller/poll-video-results', method: 'post', requestOptions, }); } export function batchVerifyImage(requestOptions?: RequestOptions) { return request({ url: '/cid/material/verify/controller/batch-verify-image', method: 'post', requestOptions, }); } export function batchVerifyVideo(requestOptions?: RequestOptions) { return request({ url: '/cid/material/verify/controller/batch-verify-video', method: 'post', requestOptions, }); }