import type { AxiosInstance } from "axios"; import { Client as ClientClass } from "../index.js"; export type Request = AxiosInstance; export interface CommonResponse { code: number; message: string; ttl: number; data: T; } export interface UploadResponse { data: T; } export interface DescV2 { raw_text: string; /** 1:默认,2:@某人,biz_id为相应uid */ type: 1 | 2; biz_id: string; } type RequireAtLeastOne = Pick> & { [K in Keys]-?: Required> & Partial>>; }[Keys]; interface _VideoId { aid?: number; bvid?: string; } export type VideoId = RequireAtLeastOne<_VideoId, "aid" | "bvid">; export interface MediaOptions { /** 封面,如果不是http:,会尝试上传 */ cover?: string; /** 标题 */ title: string; /** 1: 自制,2: 转载,转载必须有source字段,且不能超过200字,3:指定创作声明 */ copyright?: 1 | 2 | 3; /** copyright=2之后必填的字段 */ source?: string; /** 分区id */ tid: number; /** 标签,用逗号分隔,最多12个 */ tag: string; /** 简介 */ desc?: string; /** 简介中的特殊效果 */ desc_v2?: DescV2[]; /** 动态 */ dynamic?: string; /** 杜比音效 */ dolby?: 0 | 1; /** hires音效 */ lossless_music?: 0 | 1; desc_format_id?: number; /** 话题id */ mission_id?: number; /** topic_id,需要和mission_id一起使用,topic_name加在tag参数中 */ topic_id?: number; /** 自制声明 0: 允许转载,1:禁止转载 */ no_reprint?: 0 | 1; /** 是否全景 */ is_360?: -1 | 1; /** 关闭弹幕,编辑应该不生效 */ up_close_danmu?: boolean; /** 关闭评论,编辑应该不生效 */ up_close_reply?: boolean; /** 精选评论,编辑应该不生效 */ up_selection_reply?: boolean; /** 充电面板 0: 关闭,1: 开启,编辑应该不生效 */ open_elec?: 0 | 1; /** 是否允许二创:1:允许,-1:不允许 */ recreate?: 1 | -1; /** 是否推送到动态:0:推送,1:不推送 */ no_disturbance?: 0 | 1; /** 仅自己可见:0:公开可见,1:仅自己可见 */ is_only_self?: 0 | 1; /** 创作者声明 */ neutral_mark?: string; /** 新分区 */ human_type2?: number; /** 定时发布:10位秒级时间戳。必须距离提交时间>7200秒 */ dtime?: number; /** 在个人空间-投稿中隐藏:1:隐藏,2:不隐藏 */ space_hidden?: 1 | 2; /** 添加水印:非转载时有效,缺省值为开启,0:关闭,1 开启 */ watermark?: { state: 0 | 1; }; creation_statement?: { id: number; }; } export interface MediaPartOptions { path: string; title?: string; } export type Client = InstanceType; export {};