Files
knowai/types/user/api.ts
2025-11-23 22:26:39 +08:00

31 lines
855 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import type { User } from './base';
// 获取热门作者请求接口
export interface GetHotAuthorsRequest {
limit?: number; // 每页数量
days?: number; // 统计天数默认30天
}
// 获取热门作者响应接口
export interface GetHotAuthorsResponse {
// 其实应该用profile返回的
data: User[]; // 数据列表
total: number; // 总数
}
// 获取作者榜单请求接口
export interface GetAuthorRankingRequest {
limit?: number; // 每页数量
period?: 'day' | 'week' | 'month'; // 统计周期
type?: 'posts' | 'views' | 'likes'; // 排序类型
}
// 获取作者榜单响应接口
export interface GetAuthorRankingResponse {
data: User[]; // 数据列表
total: number; // 总数
// 其实冗余了
period: 'day' | 'week' | 'month'; // 统计周期
type: 'posts' | 'views' | 'likes'; // 排序类型
}