/** * Bilibili API 相关类型定义 */ export interface VideoInfo { title: string; desc: string; pic?: string; owner: { name: string; face: string; }; stat: { view: number; danmaku: number; reply: number; favorite: number; coin: number; share: number; like: number; }; cid: number; duration: number; pubdate: number; tag?: { tag_name: string; }[]; } export interface BilibiliVideoInfoData extends VideoInfo { bvid?: string; aid?: number; need_login_subtitle?: boolean; preview_toast?: string; } export interface BilibiliSubtitleItem { id: number; lan: string; lan_doc: string; subtitle_url: string; } export interface SubtitleInfo { subtitle: { subtitles: BilibiliSubtitleItem[]; }; } export interface SubtitleBodyItem { from: number; to: number; location?: number; content: string; } export interface SubtitleContent { body: SubtitleBodyItem[]; } export interface Comment { rpid: number; member: { uname: string; avatar: string; }; content: { message: string; }; like: number; reply_control?: { sub_reply_entry_text?: string; show_status?: number; }; replies?: Comment[]; } export interface CommentReply { member: { uname: string; avatar: string; }; content: { message: string; }; like: number; } export interface CommentsResponse { replies: Comment[]; page: { num: number; size: number; }; } export interface ProcessedComment { author: string; content: string; likes: number; has_timestamp: boolean; timestamp?: string; replies?: ProcessedComment[]; } export interface VideoSummary { data_source: 'subtitle' | 'ai_subtitle' | 'description'; video_info: { title: string; description: string; tags: string[]; subtitle_text?: string; }; } export interface CommentsSummary { comments: ProcessedComment[]; summary: { total_comments: number; comments_with_timestamp: number; }; } export declare const SUPPORTED_LANGUAGES: readonly ["zh-Hans", "zh-CN", "zh-Hant", "en", "ja", "ko", "ai-zh"]; export type SupportedLanguage = (typeof SUPPORTED_LANGUAGES)[number]; export type CommentDetailLevel = 'brief' | 'detailed'; export type CommentSort = "hot" | "time"; export interface PartInfo { page: number; cid: number; title: string; duration: number; } export interface RawPageEntry { cid: number; page: number; part?: string; duration: number; } export interface ChapterInfo { title: string; start_seconds: number; end_seconds: number; } export interface TranscriptMatch { start_seconds: number; end_seconds: number; content: string; context: string; timestamp_url: string; } export interface VideoTranscriptData { bvid: string; data_source: "subtitle" | "ai_subtitle" | "description" | "asr"; language?: string; transcript: string; title: string; source_url: string; page?: number; query?: string; total_matches?: number; returned_matches?: number; truncated?: boolean; matches?: TranscriptMatch[]; } export interface VideoSearchCandidate { bvid: string; title: string; author: string; duration_seconds: number; published_at: string; view_count: number; description: string; source_url: string; } export interface VideoSearchData { query: string; results: VideoSearchCandidate[]; } export interface CreatorSearchCandidate { mid: number; name: string; bio: string; avatar_url: string; follower_count: number; video_count: number; level: number; source_url: string; } export interface CreatorSearchData { query: string; results: CreatorSearchCandidate[]; } export interface TranscriptSearchOptions { query: string; max_matches: number; context_segments: number; } export interface FavoriteFolder { id: number; title: string; media_count: number; } export interface FavoriteVideo { bvid: string; title: string; author: string; duration_seconds: number; published_at: string; favorited_at: string; source_url: string; } export interface FavoriteVideoPage { folders_total: number; folder?: FavoriteFolder; page?: number; videos: FavoriteVideo[]; skipped_count: number; next_cursor?: string; } export type CreatorContentSection = "overview" | "videos" | "collections" | "series" | "dynamics"; export interface CreatorContentOverview { mid: number; section: "overview"; name: string; bio: string; avatar_url: string; follower_count?: number; level: number; video_count: number; live_state: "live"; } export interface CreatorVideoRow { bvid: string; title: string; description: string; cover_url: string; category_id?: number; category?: string; duration_seconds: number; published_at: string; author: string; view_count?: number; danmaku_count?: number; reply_count?: number; is_charge_video?: boolean; access: "unknown"; source_url: string; } export interface CreatorVideoPage { mid: number; section: "videos"; page: number; videos_total?: number; videos: CreatorVideoRow[]; skipped_count: number; next_cursor?: string; live_state: "live"; } export interface CreatorCollectionContainer { collection_id: number; name: string; description: string; member_count: number; } export interface CreatorCollectionListPage { mid: number; section: "collections"; mode: "containers"; page: number; collections: CreatorCollectionContainer[]; skipped_count: number; next_cursor?: string; live_state: "live"; } export interface CreatorSeriesContainer { series_id: number; name: string; description: string; member_count: number; } export interface CreatorSeriesListPage { mid: number; section: "series"; mode: "containers"; page: number; series: CreatorSeriesContainer[]; skipped_count: number; next_cursor?: string; live_state: "live"; } export interface CreatorContainerVideoRow { bvid: string; title: string; description: string; cover_url: string; duration_seconds: number; published_at: string; view_count?: number; danmaku_count?: number; is_charge_video?: boolean; access: "unknown"; source_url: string; } export interface CreatorCollectionMemberPage { mid: number; section: "collections"; mode: "members"; page: number; selected_collection: CreatorCollectionContainer; members: CreatorContainerVideoRow[]; skipped_count: number; next_cursor?: string; live_state: "live"; } export interface CreatorSeriesMemberPage { mid: number; section: "series"; mode: "members"; page: number; selected_series: CreatorSeriesContainer; members: CreatorContainerVideoRow[]; skipped_count: number; next_cursor?: string; live_state: "live"; } export type CreatorDynamicType = "text" | "image" | "video" | "repost" | "unknown"; export interface CreatorDynamicImage { url: string; width?: number; height?: number; } export interface CreatorDynamicEvidence { dynamic_id: string; type: Exclude; upstream_type: string; text: string; images: CreatorDynamicImage[]; referenced_bvids: string[]; } export interface CreatorDynamicRow extends Omit { type: CreatorDynamicType; published_at: string; original?: CreatorDynamicEvidence; source_url: string; } export interface CreatorDynamicPage { mid: number; section: "dynamics"; dynamics: CreatorDynamicRow[]; skipped_count: number; next_cursor?: string; live_state: "live"; } export interface VideoChaptersData { bvid: string; page: number; cid: number; title: string; chapters: ChapterInfo[]; } export interface VideoMetadataData { bvid: string; title: string; author?: string; duration?: number; pubdate?: string; pubdate_timestamp?: number; description: string; tags: string[]; pages: PartInfo[]; stats: { view?: number; like?: number; coin?: number; favorite?: number; share?: number; reply?: number; danmaku?: number; }; } export interface CommentOptions { detailLevel?: CommentDetailLevel; limit?: number; sort?: CommentSort; includeReplies?: boolean; } export interface APIError { code: number; message: string; } //# sourceMappingURL=types.d.ts.map