Skip to content

Commit

Permalink
feat: moves the types folder
Browse files Browse the repository at this point in the history
  • Loading branch information
TobyG74 committed Mar 29, 2024
1 parent 27bee06 commit 2e15d88
Show file tree
Hide file tree
Showing 5 changed files with 153 additions and 70 deletions.
File renamed without changes.
File renamed without changes.
22 changes: 18 additions & 4 deletions src/types/tiktokApi.ts → src/types/downloader/tiktokApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ export type TiktokAPIResponse = {
id: string
createTime: number
description: string
duration?: string
author: Author
statistics: Statistics
hashtag: string[]
isADS: boolean
cover?: string[]
dynamicCover?: string[]
originCover?: string[]
video?: string[]
video?: Video
images?: string[]
music: Music
}
Expand All @@ -35,12 +35,23 @@ export type Statistics = {
downloadCount: number
shareCount: number
commentCount: number
likeCount: number
favoriteCount: number
diggCount: number
collectCount: number
forwardCount: number
whatsappShareCount: number
loseCount: number
loseCommentCount: number
repostCount: number
}

export type Video = {
ratio: string
duration: number
playAddr: string[]
downloadAddr: string[]
cover: string[]
dynamicCover: string[]
originCover: string[]
}

export type Music = {
Expand All @@ -53,6 +64,9 @@ export type Music = {
coverMedium: string[]
coverThumb: string[]
duration: number
isCommerceMusic: boolean
isOriginalSound: boolean
isAuthorArtist: boolean
}

export type responseParser = {
Expand Down
135 changes: 135 additions & 0 deletions src/types/search/stalker.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
export type StalkResult = {
status: "success" | "error"
message?: string
result?: {
users: Users
stats: Stats
posts: Posts[]
}
}

export type Users = {
id: string
username: string
nickname: string
avatarLarger: string
avatarThumb: string
avatarMedium: string
signature: string
verified: boolean
privateAccount: boolean
region: string
commerceUser: boolean
usernameModifyTime: number
nicknameModifyTime: number
}

export type Stats = {
followerCount: number
followingCount: number
heartCount: number
videoCount: number
likeCount: number
friendCount: number
postCount: number
}

export type Statistics = {
likeCount: number
shareCount: number
commentCount: number
playCount: number
favoriteCount: number
}

export type Video = {
id: string
duration: string
ratio: string
cover: string
originCover: string
dynamicCover: string
playAddr: string
downloadAddr: string
format: string
bitrate: number
}

export type Music = {
id: string
title: string
album: string
playUrl: string
coverLarge: string
coverMedium: string
coverThumb: string
authorName: string
duration: string
}

export type Posts = {
id: string
desc: string
createTime: number
digged: number
duetEnabled: number
forFriend: number
officalItem: number
originalItem: number
privateItem: number
shareEnabled: number
stitchEnabled: number
stats: StatsPost
author: AuthorPost
video?: VideoPost
music: MusicPost
images?: string[]
}

export type StatsPost = {
collectCount: number
commentCount: number
diggCount: number
playCount: number
shareCount: number
}

export type AuthorPost = {
id: string
username: string
nickname: string
avatarLarger: string
avatarThumb: string
avatarMedium: string
signature: string
verified: boolean
openFavorite: boolean
privateAccount: boolean
isADVirtual: boolean
isEmbedBanned: boolean
}

export type VideoPost = {
id: string
duration: number
ratio: string
cover: string
originCover: string
dynamicCover: string
playAddr: string
downloadAddr: string
format: string
bitrate: number
}

export type MusicPost = {
authorName: string
coverLarge: string
coverMedium: string
coverThumb: string
duration: number
id: string
title: string
playUrl: string
original: boolean
}
66 changes: 0 additions & 66 deletions src/types/stalker.ts

This file was deleted.

0 comments on commit 2e15d88

Please sign in to comment.