当前浏览的是 v7 预览版文档(v7 尚未正式发布,API 可能随版本调整)。本页是 v7 新增内容,去 v6 正式版文档首页
@ikenxuan/amagi
类型参考

快手 / 小红书 / 通用响应类型

88 个符号,由 scripts/api-extractor.ts 从 packages/core/src/index.ts 抽取

本页 88 个符号由 packages/core/src/index.ts 的导出面在构建期生成, 签名、参数表与源码位置都取自 TypeScript 编译器对源码的解析。全部导出的索引见 类型索引,同一批能力的 SDK 与 HTTP 形态见 SDK 方法页 与 HTTP 端点参考。

APIErrorType

API请求错误类型 该类型是方法 getXXXData 封装后请求遇到错误时的返回类型

type APIErrorType = { amagiError: ErrorDetail; amagiMessage: string; code: number | string; data: any }

源码:src/types/index.ts

BilibiliDataOptions

type BilibiliDataOptions<T extends keyof BilibiliDataOptionsMap> = OmitMethodType<BilibiliDataOptionsMap[T]["opt"]>

源码:src/types/index.ts

BilibiliDataOptionsMap

type BilibiliDataOptionsMap = { [K in BilibiliMethodType]: { data: BilibiliReturnTypeMap[K]; opt: BilibiliMethodOptMap[K] } }

源码:src/types/index.ts

BilibiliMethodOptMap

B站方法类型到参数的映射

用于根据 methodType 字符串获取对应的参数类型

type BilibiliMethodOptMap = { articleCards: BilibiliMethodOptionsMap["ArticleCardParams"]; articleContent: BilibiliMethodOptionsMap["ArticleParams"]; articleInfo: BilibiliMethodOptionsMap["ArticleInfoParams"]; articleListInfo: BilibiliMethodOptionsMap["ColumnInfoParams"]; avToBv: BilibiliMethodOptionsMap["Av2BvParams"]; bangumiInfo: BilibiliMethodOptionsMap["BangumiInfoParams"]; …其余 21 个成员 }

源码:src/types/BilibiliAPIParams.ts

DouyinDataOptions

type DouyinDataOptions<T extends DouyinMethodType> = OmitMethodType<zod.infer<typeof DouyinValidationSchemas[T]>>

源码:src/types/index.ts

DouyinDataOptionsMap

type DouyinDataOptionsMap = { [K in DouyinMethodType]: { data: DouyinReturnTypeMap[K]; opt: DouyinMethodOptMap[K] } }

源码:src/types/index.ts

DouyinMethodOptMap

抖音方法类型到参数的映射

用于根据 methodType 字符串获取对应的参数类型

type DouyinMethodOptMap = { commentReplies: DouyinMethodOptionsMap["CommentReplyParams"]; comments: DouyinMethodOptionsMap["CommentParams"]; danmakuList: DouyinMethodOptionsMap["DanmakuParams"]; dynamicEmojiList: DouyinMethodOptionsMap["EmojiProParams"]; emojiList: DouyinMethodOptionsMap["EmojiListParams"]; emojiResourceMeta: DouyinMethodOptionsMap["EmojiResourceParams"]; …其余 17 个成员 }

源码:src/types/DouyinAPIParams.ts

HomeFeed

type HomeFeed = HomeFeed_V0

源码:src/types/ReturnDataType/Xiaohongshu/HomeFeed/index.ts

KsBannedStatus

type KsBannedStatus = { banned: boolean; defriend: boolean; isolate: boolean; socialBanned: boolean }

源码:src/types/ReturnDataType/Kuaishou/UserCommon/UserCommon_V0.ts

KsDanmaku

type KsDanmaku = KsDanmaku_V0

源码:src/types/ReturnDataType/Kuaishou/Danmaku/index.ts

KsEmojiList

type KsEmojiList = KsEmojiList_V0

源码:src/types/ReturnDataType/Kuaishou/EmojiList/index.ts

KsLiveRoomInfo

type KsLiveRoomInfo = KsLiveRoomInfo_V0

源码:src/types/ReturnDataType/Kuaishou/LiveRoomDetail/index.ts

KsOneWork

type KsOneWork = KsOneWork_V0

源码:src/types/ReturnDataType/Kuaishou/OneWork/index.ts

KsUserHomeWork

type KsUserHomeWork = { author: Record<string, any>; counts: Record<string, any>; expTag: string; height: number; id: string; imgSizes: any[]; …其余 9 个成员 }

源码:src/types/ReturnDataType/Kuaishou/UserHomeDetail/UserHomeDetail_V0.ts

KsUserProfile

type KsUserProfile = KsUserProfile_V0

源码:src/types/ReturnDataType/Kuaishou/UserProfile/index.ts

KsUserProfileCounts

type KsUserProfileCounts = { fan: string; follow: string; open: number; photo: number; playback: number; review: number }

源码:src/types/ReturnDataType/Kuaishou/UserCommon/UserCommon_V0.ts

KsUserProfileGameInfo

type KsUserProfileGameInfo = { category: string; coverUrl: string; gameId: number; name: string; type: number }

源码:src/types/ReturnDataType/Kuaishou/UserCommon/UserCommon_V0.ts

KsUserProfileLiveInfo

type KsUserProfileLiveInfo = { author: KsUserProfileUserInfo; caption: string; expTag: string; followed: boolean; gameInfo: KsUserProfileGameInfo; hasBet: boolean; …其余 13 个成员 }

源码:src/types/ReturnDataType/Kuaishou/UserCommon/UserCommon_V0.ts

KsUserProfileSensitiveInfo

type KsUserProfileSensitiveInfo = { cityName: string; constellation: string; counts: KsUserProfileCounts; kwaiId: string; originUserId: number }

源码:src/types/ReturnDataType/Kuaishou/UserCommon/UserCommon_V0.ts

KsUserProfileUserInfo

type KsUserProfileUserInfo = { avatar: string; bannedStatus: KsBannedStatus; cityName: string; constellation: string; counts: Record<string, any>; description: string; …其余 10 个成员 }

源码:src/types/ReturnDataType/Kuaishou/UserCommon/UserCommon_V0.ts

KsUserWorkList

type KsUserWorkList = KsUserWorkList_V0

源码:src/types/ReturnDataType/Kuaishou/UserWorkList/index.ts

KsVerifiedStatus

type KsVerifiedStatus = { description: string; iconUrl: string; new: boolean; type: number; verified: boolean }

源码:src/types/ReturnDataType/Kuaishou/UserCommon/UserCommon_V0.ts

KsWorkComments

type KsWorkComments = KsWorkComments_V0

源码:src/types/ReturnDataType/Kuaishou/WorkComments/index.ts

KuaishouCommentsResponse

type KuaishouCommentsResponse = CommentsSuccess | CommentsError

源码:../response-types/dist/generated/kuaishou/Comments/index.d.ts(无链接)

KuaishouCommentsResponseError

type KuaishouCommentsResponseError = never

源码:../response-types/dist/generated/kuaishou/Comments/index.d.ts(无链接)

KuaishouCommentsResponseSuccess

type KuaishouCommentsResponseSuccess = Comments_V0

源码:../response-types/dist/generated/kuaishou/Comments/index.d.ts(无链接)

KuaishouDanmakuListResponse

type KuaishouDanmakuListResponse = DanmakuListSuccess | DanmakuListError

源码:../response-types/dist/generated/kuaishou/DanmakuList/index.d.ts(无链接)

KuaishouDanmakuListResponseError

type KuaishouDanmakuListResponseError = never

源码:../response-types/dist/generated/kuaishou/DanmakuList/index.d.ts(无链接)

KuaishouDanmakuListResponseSuccess

type KuaishouDanmakuListResponseSuccess = DanmakuList_V0

源码:../response-types/dist/generated/kuaishou/DanmakuList/index.d.ts(无链接)

KuaishouDataOptions

type KuaishouDataOptions<T extends keyof KuaishouDataOptionsMap> = OmitMethodType<KuaishouDataOptionsMap[T]["opt"]>

源码:src/types/index.ts

KuaishouDataOptionsMap

type KuaishouDataOptionsMap = { [K in KuaishouMethodType]: { data: KuaishouReturnTypeMap[K]; opt: KuaishouMethodOptMap[K] } }

源码:src/types/index.ts

KuaishouEmojiListResponse

type KuaishouEmojiListResponse = EmojiListSuccess | EmojiListError

源码:../response-types/dist/generated/kuaishou/EmojiList/index.d.ts(无链接)

KuaishouEmojiListResponseError

type KuaishouEmojiListResponseError = never

源码:../response-types/dist/generated/kuaishou/EmojiList/index.d.ts(无链接)

KuaishouEmojiListResponseSuccess

type KuaishouEmojiListResponseSuccess = EmojiList_V0

源码:../response-types/dist/generated/kuaishou/EmojiList/index.d.ts(无链接)

KuaishouMethodOptMap

快手方法类型到参数的映射

type KuaishouMethodOptMap = { comments: KuaishouMethodOptionsMap["CommentParams"]; emojiList: KuaishouMethodOptionsMap["EmojiListParams"]; liveRoomInfo: KuaishouMethodOptionsMap["LiveRoomInfoParams"]; userProfile: KuaishouMethodOptionsMap["UserProfileParams"]; userWorkList: KuaishouMethodOptionsMap["UserWorkListParams"]; videoWork: KuaishouMethodOptionsMap["VideoInfoParams"] }

源码:src/types/KuaishouAPIParams.ts

KuaishouVideoWorkResponse

type KuaishouVideoWorkResponse = VideoWorkSuccess | VideoWorkError

源码:../response-types/dist/generated/kuaishou/VideoWork/index.d.ts(无链接)

KuaishouVideoWorkResponseError

type KuaishouVideoWorkResponseError = never

源码:../response-types/dist/generated/kuaishou/VideoWork/index.d.ts(无链接)

KuaishouVideoWorkResponseSuccess

type KuaishouVideoWorkResponseSuccess = VideoWork_V0

源码:../response-types/dist/generated/kuaishou/VideoWork/index.d.ts(无链接)

NetworksConfigType

type NetworksConfigType = { body: object | string; headers: any; method: string; methodType: string; redirect: RequestRedirect; responseType: string; …其余 2 个成员 }

源码:src/types/NetworksConfigType.ts

NoteComments

type NoteComments = NoteComments_V0

源码:src/types/ReturnDataType/Xiaohongshu/NoteComments/index.ts

OmitMethodType

移除methodType字段的工具类型

type OmitMethodType<T> = Omit<T, "methodType">

源码:src/types/index.ts

OneNote

type OneNote = OneNote_V0

源码:src/types/ReturnDataType/Xiaohongshu/OneNote/index.ts

SearchNotes

type SearchNotes = SearchNotes_V0

源码:src/types/ReturnDataType/Xiaohongshu/SearchNotes/index.ts

XiaohongshuDataOptions

type XiaohongshuDataOptions<T extends keyof XiaohongshuDataOptionsMap> = OmitMethodType<XiaohongshuDataOptionsMap[T]["opt"]>

源码:src/types/index.ts

XiaohongshuDataOptionsMap

type XiaohongshuDataOptionsMap = { [K in XiaohongshuMethodType]: { data: XiaohongshuReturnTypeMap[K]; opt: XiaohongshuMethodOptMap[K] } }

源码:src/types/index.ts

XiaohongshuEmojiList

type XiaohongshuEmojiList = XiaohongshuEmojiList_V0

源码:src/types/ReturnDataType/Xiaohongshu/XiaohongshuEmojiList/index.ts

XiaohongshuEmojiListResponse

type XiaohongshuEmojiListResponse = EmojiListSuccess | EmojiListError

源码:../response-types/dist/generated/xiaohongshu/EmojiList/index.d.ts(无链接)

XiaohongshuEmojiListResponseError

type XiaohongshuEmojiListResponseError = never

源码:../response-types/dist/generated/xiaohongshu/EmojiList/index.d.ts(无链接)

XiaohongshuEmojiListResponseSuccess

type XiaohongshuEmojiListResponseSuccess = EmojiList_V0

源码:../response-types/dist/generated/xiaohongshu/EmojiList/index.d.ts(无链接)

XiaohongshuHomeFeedResponse

type XiaohongshuHomeFeedResponse = HomeFeedSuccess | HomeFeedError

源码:../response-types/dist/generated/xiaohongshu/HomeFeed/index.d.ts(无链接)

XiaohongshuHomeFeedResponseError

type XiaohongshuHomeFeedResponseError = never

源码:../response-types/dist/generated/xiaohongshu/HomeFeed/index.d.ts(无链接)

XiaohongshuHomeFeedResponseSuccess

type XiaohongshuHomeFeedResponseSuccess = HomeFeed_V0

源码:../response-types/dist/generated/xiaohongshu/HomeFeed/index.d.ts(无链接)

XiaohongshuLiveRoomResponse

type XiaohongshuLiveRoomResponse = LiveRoomSuccess | LiveRoomError

源码:../response-types/dist/generated/xiaohongshu/LiveRoom/index.d.ts(无链接)

XiaohongshuLiveRoomResponseError

type XiaohongshuLiveRoomResponseError = never

源码:../response-types/dist/generated/xiaohongshu/LiveRoom/index.d.ts(无链接)

XiaohongshuLiveRoomResponseSuccess

type XiaohongshuLiveRoomResponseSuccess = LiveRoom_V0

源码:../response-types/dist/generated/xiaohongshu/LiveRoom/index.d.ts(无链接)

XiaohongshuLiveSquareResponse

type XiaohongshuLiveSquareResponse = LiveSquareSuccess | LiveSquareError

源码:../response-types/dist/generated/xiaohongshu/LiveSquare/index.d.ts(无链接)

XiaohongshuLiveSquareResponseError

type XiaohongshuLiveSquareResponseError = never

源码:../response-types/dist/generated/xiaohongshu/LiveSquare/index.d.ts(无链接)

XiaohongshuLiveSquareResponseSuccess

type XiaohongshuLiveSquareResponseSuccess = LiveSquare_V0

源码:../response-types/dist/generated/xiaohongshu/LiveSquare/index.d.ts(无链接)

XiaohongshuLiveStatusResponse

type XiaohongshuLiveStatusResponse = LiveStatusSuccess | LiveStatusError

源码:../response-types/dist/generated/xiaohongshu/LiveStatus/index.d.ts(无链接)

XiaohongshuLiveStatusResponseError

type XiaohongshuLiveStatusResponseError = never

源码:../response-types/dist/generated/xiaohongshu/LiveStatus/index.d.ts(无链接)

XiaohongshuLiveStatusResponseSuccess

type XiaohongshuLiveStatusResponseSuccess = LiveStatus_V0

源码:../response-types/dist/generated/xiaohongshu/LiveStatus/index.d.ts(无链接)

XiaohongshuMethodOptMap

小红书方法类型到参数的映射

type XiaohongshuMethodOptMap = { emojiList: XiaohongshuMethodOptionsMap["EmojiListParams"]; homeFeed: XiaohongshuMethodOptionsMap["HomeFeedParams"]; noteComments: XiaohongshuMethodOptionsMap["CommentParams"]; noteDetail: XiaohongshuMethodOptionsMap["NoteParams"]; searchNotes: XiaohongshuMethodOptionsMap["SearchNoteParams"]; userNoteList: XiaohongshuMethodOptionsMap["UserNoteParams"]; …其余 1 个成员 }

源码:src/types/XiaohongshuAPIParams.ts

XiaohongshuNoteCommentsResponse

type XiaohongshuNoteCommentsResponse = NoteCommentsSuccess | NoteCommentsError

源码:../response-types/dist/generated/xiaohongshu/NoteComments/index.d.ts(无链接)

XiaohongshuNoteCommentsResponseError

type XiaohongshuNoteCommentsResponseError = never

源码:../response-types/dist/generated/xiaohongshu/NoteComments/index.d.ts(无链接)

XiaohongshuNoteCommentsResponseSuccess

type XiaohongshuNoteCommentsResponseSuccess = NoteComments_V0

源码:../response-types/dist/generated/xiaohongshu/NoteComments/index.d.ts(无链接)

XiaohongshuNoteDetailResponse

type XiaohongshuNoteDetailResponse = NoteDetailSuccess | NoteDetailError

源码:../response-types/dist/generated/xiaohongshu/NoteDetail/index.d.ts(无链接)

XiaohongshuNoteDetailResponseError

type XiaohongshuNoteDetailResponseError = never

源码:../response-types/dist/generated/xiaohongshu/NoteDetail/index.d.ts(无链接)

XiaohongshuNoteDetailResponseSuccess

type XiaohongshuNoteDetailResponseSuccess = NoteDetail_V0

源码:../response-types/dist/generated/xiaohongshu/NoteDetail/index.d.ts(无链接)

XiaohongshuSearchHotListResponse

type XiaohongshuSearchHotListResponse = SearchHotListSuccess | SearchHotListError

源码:../response-types/dist/generated/xiaohongshu/SearchHotList/index.d.ts(无链接)

XiaohongshuSearchHotListResponseError

type XiaohongshuSearchHotListResponseError = never

源码:../response-types/dist/generated/xiaohongshu/SearchHotList/index.d.ts(无链接)

XiaohongshuSearchHotListResponseSuccess

type XiaohongshuSearchHotListResponseSuccess = SearchHotList_V0

源码:../response-types/dist/generated/xiaohongshu/SearchHotList/index.d.ts(无链接)

XiaohongshuSearchNotesResponse

type XiaohongshuSearchNotesResponse = SearchNotesSuccess | SearchNotesError

源码:../response-types/dist/generated/xiaohongshu/SearchNotes/index.d.ts(无链接)

XiaohongshuSearchNotesResponseError

type XiaohongshuSearchNotesResponseError = never

源码:../response-types/dist/generated/xiaohongshu/SearchNotes/index.d.ts(无链接)

XiaohongshuSearchNotesResponseSuccess

type XiaohongshuSearchNotesResponseSuccess = SearchNotes_V0

源码:../response-types/dist/generated/xiaohongshu/SearchNotes/index.d.ts(无链接)

XiaohongshuSearchUserResponse

type XiaohongshuSearchUserResponse = SearchUserSuccess | SearchUserError

源码:../response-types/dist/generated/xiaohongshu/SearchUser/index.d.ts(无链接)

XiaohongshuSearchUserResponseError

type XiaohongshuSearchUserResponseError = never

源码:../response-types/dist/generated/xiaohongshu/SearchUser/index.d.ts(无链接)

XiaohongshuSearchUserResponseSuccess

type XiaohongshuSearchUserResponseSuccess = SearchUser_V0

源码:../response-types/dist/generated/xiaohongshu/SearchUser/index.d.ts(无链接)

XiaohongshuSubCommentsResponse

type XiaohongshuSubCommentsResponse = SubCommentsSuccess | SubCommentsError

源码:../response-types/dist/generated/xiaohongshu/SubComments/index.d.ts(无链接)

XiaohongshuSubCommentsResponseError

type XiaohongshuSubCommentsResponseError = never

源码:../response-types/dist/generated/xiaohongshu/SubComments/index.d.ts(无链接)

XiaohongshuSubCommentsResponseSuccess

type XiaohongshuSubCommentsResponseSuccess = SubComments_V0

源码:../response-types/dist/generated/xiaohongshu/SubComments/index.d.ts(无链接)

XiaohongshuUserNoteList

type XiaohongshuUserNoteList = XiaohongshuUserNoteList_V0

源码:src/types/ReturnDataType/Xiaohongshu/XiaohongshuUserNoteList/index.ts

XiaohongshuUserNoteListResponse

type XiaohongshuUserNoteListResponse = UserNoteListSuccess | UserNoteListError

源码:../response-types/dist/generated/xiaohongshu/UserNoteList/index.d.ts(无链接)

XiaohongshuUserNoteListResponseError

type XiaohongshuUserNoteListResponseError = never

源码:../response-types/dist/generated/xiaohongshu/UserNoteList/index.d.ts(无链接)

XiaohongshuUserNoteListResponseSuccess

type XiaohongshuUserNoteListResponseSuccess = UserNoteList_V0

源码:../response-types/dist/generated/xiaohongshu/UserNoteList/index.d.ts(无链接)

XiaohongshuUserProfile

type XiaohongshuUserProfile = XiaohongshuUserProfile_V0

源码:src/types/ReturnDataType/Xiaohongshu/XiaohongshuUserProfile/index.ts

XiaohongshuUserProfileResponse

type XiaohongshuUserProfileResponse = UserProfileSuccess | UserProfileError

源码:../response-types/dist/generated/xiaohongshu/UserProfile/index.d.ts(无链接)

XiaohongshuUserProfileResponseError

type XiaohongshuUserProfileResponseError = never

源码:../response-types/dist/generated/xiaohongshu/UserProfile/index.d.ts(无链接)

XiaohongshuUserProfileResponseSuccess

type XiaohongshuUserProfileResponseSuccess = UserProfile_V0

源码:../response-types/dist/generated/xiaohongshu/UserProfile/index.d.ts(无链接)

On this page

APIErrorTypeBilibiliDataOptionsBilibiliDataOptionsMapBilibiliMethodOptMapDouyinDataOptionsDouyinDataOptionsMapDouyinMethodOptMapHomeFeedKsBannedStatusKsDanmakuKsEmojiListKsLiveRoomInfoKsOneWorkKsUserHomeWorkKsUserProfileKsUserProfileCountsKsUserProfileGameInfoKsUserProfileLiveInfoKsUserProfileSensitiveInfoKsUserProfileUserInfoKsUserWorkListKsVerifiedStatusKsWorkCommentsKuaishouCommentsResponseKuaishouCommentsResponseErrorKuaishouCommentsResponseSuccessKuaishouDanmakuListResponseKuaishouDanmakuListResponseErrorKuaishouDanmakuListResponseSuccessKuaishouDataOptionsKuaishouDataOptionsMapKuaishouEmojiListResponseKuaishouEmojiListResponseErrorKuaishouEmojiListResponseSuccessKuaishouMethodOptMapKuaishouVideoWorkResponseKuaishouVideoWorkResponseErrorKuaishouVideoWorkResponseSuccessNetworksConfigTypeNoteCommentsOmitMethodTypeOneNoteSearchNotesXiaohongshuDataOptionsXiaohongshuDataOptionsMapXiaohongshuEmojiListXiaohongshuEmojiListResponseXiaohongshuEmojiListResponseErrorXiaohongshuEmojiListResponseSuccessXiaohongshuHomeFeedResponseXiaohongshuHomeFeedResponseErrorXiaohongshuHomeFeedResponseSuccessXiaohongshuLiveRoomResponseXiaohongshuLiveRoomResponseErrorXiaohongshuLiveRoomResponseSuccessXiaohongshuLiveSquareResponseXiaohongshuLiveSquareResponseErrorXiaohongshuLiveSquareResponseSuccessXiaohongshuLiveStatusResponseXiaohongshuLiveStatusResponseErrorXiaohongshuLiveStatusResponseSuccessXiaohongshuMethodOptMapXiaohongshuNoteCommentsResponseXiaohongshuNoteCommentsResponseErrorXiaohongshuNoteCommentsResponseSuccessXiaohongshuNoteDetailResponseXiaohongshuNoteDetailResponseErrorXiaohongshuNoteDetailResponseSuccessXiaohongshuSearchHotListResponseXiaohongshuSearchHotListResponseErrorXiaohongshuSearchHotListResponseSuccessXiaohongshuSearchNotesResponseXiaohongshuSearchNotesResponseErrorXiaohongshuSearchNotesResponseSuccessXiaohongshuSearchUserResponseXiaohongshuSearchUserResponseErrorXiaohongshuSearchUserResponseSuccessXiaohongshuSubCommentsResponseXiaohongshuSubCommentsResponseErrorXiaohongshuSubCommentsResponseSuccessXiaohongshuUserNoteListXiaohongshuUserNoteListResponseXiaohongshuUserNoteListResponseErrorXiaohongshuUserNoteListResponseSuccessXiaohongshuUserProfileXiaohongshuUserProfileResponseXiaohongshuUserProfileResponseErrorXiaohongshuUserProfileResponseSuccess