更新文档,添加小红书模块描述;重构数据库模式,增加笔记和用户信息字段;优化核心逻辑,增加记录超时处理;更新示例数据。
This commit is contained in:
121
typings/note.d.ts
vendored
121
typings/note.d.ts
vendored
@@ -103,4 +103,125 @@ declare namespace XHS {
|
||||
hasMore: boolean;
|
||||
items: T[];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
declare namespace XHS {
|
||||
/** 分享信息 */
|
||||
export interface ShareInfo {
|
||||
/** 是否不可分享 */
|
||||
un_share: boolean;
|
||||
}
|
||||
|
||||
/** 标签 */
|
||||
export interface Tag {
|
||||
/** 标签ID */
|
||||
id: string;
|
||||
/** 标签名称 */
|
||||
name: string;
|
||||
/** 标签类型(如topic话题) */
|
||||
type: 'topic' | string;
|
||||
}
|
||||
|
||||
/** 完整的笔记交互信息 */
|
||||
export interface FullInteractInfo {
|
||||
/** 分享数 */
|
||||
share_count: string;
|
||||
/** 是否已关注 */
|
||||
followed: boolean;
|
||||
/** 关系(如none无) */
|
||||
relation: 'none' | 'following' | string;
|
||||
/** 是否已点赞 */
|
||||
liked: boolean;
|
||||
/** 点赞数 */
|
||||
liked_count: string;
|
||||
/** 是否已收藏 */
|
||||
collected: boolean;
|
||||
/** 收藏数 */
|
||||
collected_count: string;
|
||||
/** 评论数 */
|
||||
comment_count: string;
|
||||
}
|
||||
|
||||
/** 完整的图片信息 */
|
||||
export interface FullImageInfo {
|
||||
/** 图片场景(如WB_DFT默认、WB_PRV预览) */
|
||||
image_scene: string;
|
||||
/** 图片URL */
|
||||
url: string;
|
||||
}
|
||||
|
||||
/** 完整的笔记图片 */
|
||||
export interface FullImage {
|
||||
/** 图片宽度 */
|
||||
width: number;
|
||||
/** 图片高度 */
|
||||
height: number;
|
||||
/** 图片信息列表(不同场景的URL) */
|
||||
info_list: FullImageInfo[];
|
||||
/** 流信息 */
|
||||
stream: Record<string, unknown>;
|
||||
/** 是否Live Photo */
|
||||
live_photo: boolean;
|
||||
/** 文件ID */
|
||||
file_id: string;
|
||||
/** URL */
|
||||
url: string;
|
||||
/** 追踪ID */
|
||||
trace_id: string;
|
||||
/** 预览URL */
|
||||
url_pre: string;
|
||||
/** 默认URL */
|
||||
url_default: string;
|
||||
}
|
||||
|
||||
/** 完整的笔记卡片 */
|
||||
export interface NoteCardDetail {
|
||||
/** 时间 */
|
||||
time: number;
|
||||
/** 分享信息 */
|
||||
share_info: ShareInfo;
|
||||
/** 描述 */
|
||||
desc: string;
|
||||
/** 用户信息 */
|
||||
user: NoteUser;
|
||||
/** 标签列表 */
|
||||
tag_list: Tag[];
|
||||
/** 交互信息 */
|
||||
interact_info: FullInteractInfo;
|
||||
/** 图片列表 */
|
||||
image_list: FullImage[];
|
||||
/** @用户列表 */
|
||||
at_user_list: unknown[];
|
||||
/** 最后更新时间 */
|
||||
last_update_time: number;
|
||||
/** IP位置 */
|
||||
ip_location: string;
|
||||
/** 笔记ID */
|
||||
note_id: string;
|
||||
/** 类型(如normal普通) */
|
||||
type: 'normal' | 'video' | string;
|
||||
/** 标题 */
|
||||
title: string;
|
||||
}
|
||||
|
||||
/** 笔记详情(Feed中的完整笔记) */
|
||||
export interface NoteDetail {
|
||||
/** 笔记ID */
|
||||
id: string;
|
||||
/** 模型类型(如note笔记) */
|
||||
model_type: 'note' | string;
|
||||
/** 笔记卡片 */
|
||||
note_card: NoteCard;
|
||||
}
|
||||
|
||||
/** Feed响应 */
|
||||
export interface FeedResponse {
|
||||
/** 游标分数 */
|
||||
cursor_score: string;
|
||||
/** 笔记列表 */
|
||||
items: NoteDetail[];
|
||||
/** 当前时间 */
|
||||
current_time: number;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user