@nxgiang/tiktok-api 1.3.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (122) hide show
  1. package/CHANGELOG.md +492 -0
  2. package/CODE_OF_CONDUCT.md +128 -0
  3. package/CONTRIBUTING.md +95 -0
  4. package/LICENSE +201 -0
  5. package/README.md +1663 -0
  6. package/bun.lock +367 -0
  7. package/helper/signature.js +390 -0
  8. package/helper/webmssdk.js +4586 -0
  9. package/helper/xbogus.js +563 -0
  10. package/install.sh +51 -0
  11. package/lib/cli/index.d.ts +2 -0
  12. package/lib/cli/index.js +809 -0
  13. package/lib/constants/api.d.ts +22 -0
  14. package/lib/constants/api.js +39 -0
  15. package/lib/constants/headers.d.ts +2 -0
  16. package/lib/constants/headers.js +5 -0
  17. package/lib/constants/index.d.ts +23 -0
  18. package/lib/constants/index.js +26 -0
  19. package/lib/constants/params.d.ts +19 -0
  20. package/lib/constants/params.js +531 -0
  21. package/lib/index.d.ts +93 -0
  22. package/lib/index.js +137 -0
  23. package/lib/lib/logger.d.ts +8 -0
  24. package/lib/lib/logger.js +25 -0
  25. package/lib/services/cookieManager.d.ts +10 -0
  26. package/lib/services/cookieManager.js +51 -0
  27. package/lib/services/downloadManager.d.ts +5 -0
  28. package/lib/services/downloadManager.js +188 -0
  29. package/lib/services/tiktokService.d.ts +14 -0
  30. package/lib/services/tiktokService.js +78 -0
  31. package/lib/types/common.d.ts +65 -0
  32. package/lib/types/common.js +2 -0
  33. package/lib/types/cookieManager.d.ts +13 -0
  34. package/lib/types/cookieManager.js +2 -0
  35. package/lib/types/downloader/musicaldownDownloader.d.ts +27 -0
  36. package/lib/types/downloader/musicaldownDownloader.js +2 -0
  37. package/lib/types/downloader/ssstikDownloader.d.ts +30 -0
  38. package/lib/types/downloader/ssstikDownloader.js +2 -0
  39. package/lib/types/downloader/tiktokApiDownloader.d.ts +38 -0
  40. package/lib/types/downloader/tiktokApiDownloader.js +2 -0
  41. package/lib/types/get/getCollection.d.ts +53 -0
  42. package/lib/types/get/getCollection.js +2 -0
  43. package/lib/types/get/getComments.d.ts +26 -0
  44. package/lib/types/get/getComments.js +2 -0
  45. package/lib/types/get/getMusicDetail.d.ts +49 -0
  46. package/lib/types/get/getMusicDetail.js +2 -0
  47. package/lib/types/get/getMusicVideos.d.ts +93 -0
  48. package/lib/types/get/getMusicVideos.js +2 -0
  49. package/lib/types/get/getPlaylist.d.ts +65 -0
  50. package/lib/types/get/getPlaylist.js +2 -0
  51. package/lib/types/get/getProfile.d.ts +71 -0
  52. package/lib/types/get/getProfile.js +2 -0
  53. package/lib/types/get/getTrendings.d.ts +61 -0
  54. package/lib/types/get/getTrendings.js +2 -0
  55. package/lib/types/get/getUserLiked.d.ts +90 -0
  56. package/lib/types/get/getUserLiked.js +2 -0
  57. package/lib/types/get/getUserPosts.d.ts +68 -0
  58. package/lib/types/get/getUserPosts.js +2 -0
  59. package/lib/types/get/getUserReposts.d.ts +104 -0
  60. package/lib/types/get/getUserReposts.js +2 -0
  61. package/lib/types/search/index.d.ts +15 -0
  62. package/lib/types/search/index.js +2 -0
  63. package/lib/types/search/liveSearch.d.ts +48 -0
  64. package/lib/types/search/liveSearch.js +2 -0
  65. package/lib/types/search/userSearch.d.ts +32 -0
  66. package/lib/types/search/userSearch.js +2 -0
  67. package/lib/types/search/videoSearch.d.ts +62 -0
  68. package/lib/types/search/videoSearch.js +2 -0
  69. package/lib/utils/downloader/musicaldownDownloader.d.ts +2 -0
  70. package/lib/utils/downloader/musicaldownDownloader.js +193 -0
  71. package/lib/utils/downloader/ssstikDownloader.d.ts +2 -0
  72. package/lib/utils/downloader/ssstikDownloader.js +177 -0
  73. package/lib/utils/downloader/tiktokAPIDownloader.d.ts +3 -0
  74. package/lib/utils/downloader/tiktokAPIDownloader.js +221 -0
  75. package/lib/utils/get/getCollection.d.ts +7 -0
  76. package/lib/utils/get/getCollection.js +113 -0
  77. package/lib/utils/get/getComments.d.ts +2 -0
  78. package/lib/utils/get/getComments.js +139 -0
  79. package/lib/utils/get/getMusicDetail.d.ts +2 -0
  80. package/lib/utils/get/getMusicDetail.js +68 -0
  81. package/lib/utils/get/getMusicVideos.d.ts +2 -0
  82. package/lib/utils/get/getMusicVideos.js +249 -0
  83. package/lib/utils/get/getPlaylist.d.ts +7 -0
  84. package/lib/utils/get/getPlaylist.js +115 -0
  85. package/lib/utils/get/getProfile.d.ts +2 -0
  86. package/lib/utils/get/getProfile.js +92 -0
  87. package/lib/utils/get/getTrendings.d.ts +7 -0
  88. package/lib/utils/get/getTrendings.js +120 -0
  89. package/lib/utils/get/getUserLiked.d.ts +2 -0
  90. package/lib/utils/get/getUserLiked.js +204 -0
  91. package/lib/utils/get/getUserPosts.d.ts +2 -0
  92. package/lib/utils/get/getUserPosts.js +199 -0
  93. package/lib/utils/get/getUserRepost.d.ts +2 -0
  94. package/lib/utils/get/getUserRepost.js +239 -0
  95. package/lib/utils/search/liveSearch.d.ts +2 -0
  96. package/lib/utils/search/liveSearch.js +99 -0
  97. package/lib/utils/search/userSearch.d.ts +2 -0
  98. package/lib/utils/search/userSearch.js +76 -0
  99. package/lib/utils/search/videoSearch.d.ts +2 -0
  100. package/lib/utils/search/videoSearch.js +140 -0
  101. package/lib/utils/urlExtractors.d.ts +3 -0
  102. package/lib/utils/urlExtractors.js +37 -0
  103. package/lib/utils/validator.d.ts +1 -0
  104. package/lib/utils/validator.js +13 -0
  105. package/package.json +60 -0
  106. package/test/collection-test.ts +73 -0
  107. package/test/comments-test.ts +54 -0
  108. package/test/downloader-v1-test.ts +49 -0
  109. package/test/downloader-v2-test.ts +47 -0
  110. package/test/downloader-v3-test.ts +35 -0
  111. package/test/music-detail-test.ts +97 -0
  112. package/test/music-videos-test.ts +86 -0
  113. package/test/playlist-test.ts +48 -0
  114. package/test/profile-test.ts +49 -0
  115. package/test/search-live-test.ts +42 -0
  116. package/test/search-user-test.ts +46 -0
  117. package/test/search-video-test.ts +53 -0
  118. package/test/trending-test.ts +128 -0
  119. package/test/userliked-test.ts +65 -0
  120. package/test/userposts-test.ts +56 -0
  121. package/test/userreposts-test.ts +57 -0
  122. package/tobyg74-tiktok-api-1.3.7.tgz +0 -0
@@ -0,0 +1,65 @@
1
+ export type ResponseStatus = "success" | "error";
2
+ export type BaseResponse = {
3
+ status: ResponseStatus;
4
+ message?: string;
5
+ };
6
+ export type ContentType = "video" | "image" | "music";
7
+ export type Author = {
8
+ avatar?: string;
9
+ nickname?: string;
10
+ signature?: string;
11
+ region?: string;
12
+ url?: string;
13
+ };
14
+ export type Statistics = {
15
+ likeCount?: string | number;
16
+ commentCount?: string | number;
17
+ shareCount?: string | number;
18
+ playCount?: number;
19
+ downloadCount?: number;
20
+ };
21
+ export type Video = {
22
+ ratio?: string;
23
+ duration?: number;
24
+ playAddr?: string[];
25
+ downloadAddr?: string[];
26
+ cover?: string[];
27
+ dynamicCover?: string[];
28
+ originCover?: string[];
29
+ };
30
+ export type Music = {
31
+ id?: number;
32
+ title?: string;
33
+ author?: string;
34
+ album?: string;
35
+ playUrl?: string[];
36
+ coverLarge?: string[];
37
+ coverMedium?: string[];
38
+ coverThumb?: string[];
39
+ duration?: number;
40
+ isCommerceMusic?: boolean;
41
+ isOriginalSound?: boolean;
42
+ isAuthorArtist?: boolean;
43
+ };
44
+ export type Content = {
45
+ type: ContentType;
46
+ id?: string;
47
+ createTime?: number;
48
+ desc?: string;
49
+ author?: Author;
50
+ statistics?: Statistics;
51
+ hashtag?: string[];
52
+ isTurnOffComment?: boolean;
53
+ isADS?: boolean;
54
+ video?: Video;
55
+ images?: string[];
56
+ music?: Music;
57
+ videoHD?: string;
58
+ videoSD?: string;
59
+ videoWatermark?: string;
60
+ direct?: string;
61
+ };
62
+ export type BaseContentResponse = BaseResponse & {
63
+ result?: Content;
64
+ resultNotParsed?: any;
65
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,13 @@
1
+ export interface Cookie {
2
+ name: string;
3
+ value: string;
4
+ domain?: string;
5
+ path?: string;
6
+ expires?: Date;
7
+ secure?: boolean;
8
+ }
9
+ export interface ICookieManager {
10
+ getCookie(): string | null;
11
+ setCookie(value: string): void;
12
+ deleteCookie(): void;
13
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,27 @@
1
+ import { BaseResponse } from "../common";
2
+ export type GetMusicalDownReuqest = BaseResponse & {
3
+ request?: {
4
+ [key: string]: string;
5
+ };
6
+ cookie?: string;
7
+ };
8
+ export type MusicalDownResponse = BaseResponse & {
9
+ result?: ContentMusicalDown;
10
+ };
11
+ export type ContentMusicalDown = {
12
+ type: "video" | "image";
13
+ author?: AuthorMusicalDown;
14
+ desc?: string;
15
+ images?: string[];
16
+ videoHD?: string;
17
+ videoSD?: string;
18
+ videoWatermark?: string;
19
+ music?: string;
20
+ };
21
+ export type AuthorMusicalDown = {
22
+ avatar: string;
23
+ nickname: string;
24
+ };
25
+ export type GetMusicalDownMusic = BaseResponse & {
26
+ result?: string;
27
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,30 @@
1
+ import { BaseResponse } from "../common";
2
+ export type SSSTikFetchTT = BaseResponse & {
3
+ result?: string;
4
+ };
5
+ export type SSSTikResponse = BaseResponse & {
6
+ result?: ResultContentSSSTik;
7
+ };
8
+ export type ResultContentSSSTik = {
9
+ type: "video" | "music" | "image";
10
+ desc?: string;
11
+ author?: AuthorSSSTik;
12
+ statistics?: StatisticsSSSTik;
13
+ video?: {
14
+ playAddr: string[];
15
+ };
16
+ music?: {
17
+ playUrl: string[];
18
+ };
19
+ images?: string[];
20
+ direct?: string;
21
+ };
22
+ export type AuthorSSSTik = {
23
+ avatar: string;
24
+ nickname: string;
25
+ };
26
+ export type StatisticsSSSTik = {
27
+ likeCount: string;
28
+ commentCount: string;
29
+ shareCount: string;
30
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,38 @@
1
+ import { BaseContentResponse, Content, Author, Statistics, Video, Music } from "../common";
2
+ export type TiktokAPIResponse = BaseContentResponse;
3
+ export type AuthorTiktokAPI = Author & {
4
+ uid: string;
5
+ username: string;
6
+ uniqueId: string;
7
+ avatarThumb: string;
8
+ avatarMedium: string;
9
+ url: string;
10
+ };
11
+ export type StatisticsTiktokAPI = Statistics;
12
+ export type VideoTiktokAPI = Video;
13
+ export type MusicTiktokAPI = Music;
14
+ export type ResultTiktokAPI = Content;
15
+ export type ResponseParserTiktokAPI = {
16
+ content?: any;
17
+ statistics?: StatisticsTiktokAPI;
18
+ author?: AuthorTiktokAPI;
19
+ music?: MusicTiktokAPI;
20
+ };
21
+ export type TiktokCollectionResponse = {
22
+ status: "success" | "error";
23
+ message?: string;
24
+ result?: {
25
+ itemList: Array<{
26
+ id: string;
27
+ desc: string;
28
+ createTime: number;
29
+ author: AuthorTiktokAPI;
30
+ statistics: StatisticsTiktokAPI;
31
+ video: VideoTiktokAPI;
32
+ textExtra: Array<{
33
+ hashtagName?: string;
34
+ }>;
35
+ }>;
36
+ hasMore: boolean;
37
+ };
38
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,53 @@
1
+ import { StatisticsTiktokAPI, MusicTiktokAPI, VideoTiktokAPI } from "../downloader/tiktokApiDownloader";
2
+ import { PlaylistAuthor } from "./getPlaylist";
3
+ export interface CollectionItem {
4
+ id: string;
5
+ desc: string;
6
+ createTime: number;
7
+ author: PlaylistAuthor;
8
+ statistics: StatisticsTiktokAPI;
9
+ video: VideoTiktokAPI;
10
+ music: MusicTiktokAPI;
11
+ challenges: Array<{
12
+ id: string;
13
+ title: string;
14
+ desc: string;
15
+ coverLarger: string;
16
+ coverMedium: string;
17
+ coverThumb: string;
18
+ profileLarger: string;
19
+ profileMedium: string;
20
+ profileThumb: string;
21
+ }>;
22
+ collected: boolean;
23
+ digged: boolean;
24
+ duetDisplay: number;
25
+ forFriend: boolean;
26
+ officalItem: boolean;
27
+ originalItem: boolean;
28
+ privateItem: boolean;
29
+ shareEnabled: boolean;
30
+ stitchDisplay: number;
31
+ textExtra: Array<{
32
+ awemeId: string;
33
+ end: number;
34
+ hashtagName: string;
35
+ isCommerce: boolean;
36
+ start: number;
37
+ subType: number;
38
+ type: number;
39
+ }>;
40
+ }
41
+ export interface TiktokCollectionResponse {
42
+ status: "success" | "error";
43
+ message?: string;
44
+ result?: {
45
+ hasMore: boolean;
46
+ itemList: CollectionItem[];
47
+ extra?: {
48
+ fatal_item_ids: string[];
49
+ logid: string;
50
+ now: number;
51
+ };
52
+ };
53
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,26 @@
1
+ export type TiktokVideoCommentsResponse = {
2
+ status: "success" | "error";
3
+ message?: string;
4
+ result?: Comments[];
5
+ totalComments?: number;
6
+ };
7
+ export type Comments = {
8
+ cid: string;
9
+ text: string;
10
+ commentLanguage: string;
11
+ createTime: number;
12
+ likeCount: number;
13
+ isAuthorLiked: boolean;
14
+ isCommentTranslatable: boolean;
15
+ replyCommentTotal: number;
16
+ replyComment: Comments[] | null;
17
+ user: User;
18
+ url: string;
19
+ };
20
+ export type User = {
21
+ uid: string;
22
+ avatarThumb: string[];
23
+ nickname: string;
24
+ username: string;
25
+ isVerified: boolean;
26
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,49 @@
1
+ export interface MusicAuthor {
2
+ id: string;
3
+ nickname: string;
4
+ uniqueId: string;
5
+ signature: string;
6
+ avatarThumb: string;
7
+ avatarMedium: string;
8
+ avatarLarger: string;
9
+ secUid: string;
10
+ privateAccount: boolean;
11
+ ftc: boolean;
12
+ relation: number;
13
+ openFavorite: boolean;
14
+ secret: boolean;
15
+ }
16
+ export interface Music {
17
+ id: string;
18
+ title: string;
19
+ authorName: string;
20
+ original: boolean;
21
+ playUrl: string;
22
+ coverLarge: string;
23
+ coverMedium: string;
24
+ coverThumb: string;
25
+ duration: number;
26
+ private: boolean;
27
+ isCopyrighted: boolean;
28
+ }
29
+ export interface MusicStats {
30
+ videoCount: number;
31
+ }
32
+ export interface MusicInfo {
33
+ author?: MusicAuthor;
34
+ artist?: MusicAuthor;
35
+ music: Music;
36
+ stats: MusicStats;
37
+ }
38
+ export interface ShareMeta {
39
+ title: string;
40
+ desc: string;
41
+ }
42
+ export interface TiktokMusicDetailResponse {
43
+ status: "success" | "error";
44
+ message?: string;
45
+ result?: {
46
+ musicInfo: MusicInfo;
47
+ shareMeta: ShareMeta;
48
+ };
49
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,93 @@
1
+ export type TiktokMusicVideosResponse = {
2
+ status: "success" | "error";
3
+ message?: string;
4
+ result?: {
5
+ music?: MusicInfo;
6
+ videos?: MusicVideo[];
7
+ totalVideos?: number;
8
+ };
9
+ };
10
+ export type MusicInfo = {
11
+ id: string;
12
+ title: string;
13
+ authorName: string;
14
+ author?: string;
15
+ duration?: number;
16
+ original?: boolean;
17
+ playUrl?: string[];
18
+ coverThumb?: string;
19
+ coverLarge?: string;
20
+ coverMedium?: string;
21
+ };
22
+ export type MusicVideo = {
23
+ id: string;
24
+ desc?: string;
25
+ createTime: number;
26
+ digged?: boolean;
27
+ duetEnabled?: boolean;
28
+ forFriend?: boolean;
29
+ officalItem?: boolean;
30
+ originalItem?: boolean;
31
+ privateItem?: boolean;
32
+ shareEnabled?: boolean;
33
+ stitchEnabled?: boolean;
34
+ stats: MusicVideoStats;
35
+ author: MusicVideoAuthor;
36
+ video?: MusicVideoDetails;
37
+ music: MusicVideoMusic;
38
+ imagePost?: string[];
39
+ effectStickers?: EffectSticker[];
40
+ };
41
+ export type MusicVideoStats = {
42
+ collectCount?: number;
43
+ commentCount: number;
44
+ diggCount: number;
45
+ playCount: number;
46
+ shareCount: number;
47
+ };
48
+ export type MusicVideoAuthor = {
49
+ id: string;
50
+ uniqueId: string;
51
+ nickname: string;
52
+ avatarLarger?: string;
53
+ avatarThumb?: string;
54
+ avatarMedium?: string;
55
+ signature?: string;
56
+ verified?: boolean;
57
+ openFavorite?: boolean;
58
+ privateAccount?: boolean;
59
+ isADVirtual?: boolean;
60
+ isEmbedBanned?: boolean;
61
+ };
62
+ export type MusicVideoDetails = {
63
+ id: string;
64
+ duration: number;
65
+ ratio?: string;
66
+ cover?: string;
67
+ originCover?: string;
68
+ dynamicCover?: string;
69
+ playAddr?: string;
70
+ downloadAddr?: string;
71
+ format?: string;
72
+ bitrate?: number;
73
+ };
74
+ export type MusicVideoMusic = {
75
+ id: string;
76
+ title: string;
77
+ authorName: string;
78
+ duration: number;
79
+ playUrl?: string[];
80
+ coverLarge?: string;
81
+ coverMedium?: string;
82
+ coverThumb?: string;
83
+ original?: boolean;
84
+ };
85
+ export type EffectSticker = {
86
+ id: string;
87
+ name: string;
88
+ type?: number;
89
+ };
90
+ export type MusicStats = {
91
+ videoCount?: number;
92
+ viewCount?: number;
93
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,65 @@
1
+ import { AuthorTiktokAPI, MusicTiktokAPI, VideoTiktokAPI } from "../downloader/tiktokApiDownloader";
2
+ export interface PlaylistAuthor extends Omit<AuthorTiktokAPI, "username" | "uid"> {
3
+ avatarLarger: string;
4
+ nickname: string;
5
+ id: string;
6
+ }
7
+ interface Statistics {
8
+ collectCount: number;
9
+ commentCount: number;
10
+ diggCount: number;
11
+ playCount: number;
12
+ shareCount: number;
13
+ }
14
+ export interface PlaylistItem {
15
+ id: string;
16
+ desc: string;
17
+ createTime: number;
18
+ author: PlaylistAuthor;
19
+ stats: Statistics;
20
+ video: VideoTiktokAPI;
21
+ music: MusicTiktokAPI;
22
+ challenges: Array<{
23
+ id: string;
24
+ title: string;
25
+ desc: string;
26
+ coverLarger: string;
27
+ coverMedium: string;
28
+ coverThumb: string;
29
+ profileLarger: string;
30
+ profileMedium: string;
31
+ profileThumb: string;
32
+ }>;
33
+ collected: boolean;
34
+ digged: boolean;
35
+ duetDisplay: number;
36
+ forFriend: boolean;
37
+ officalItem: boolean;
38
+ originalItem: boolean;
39
+ privateItem: boolean;
40
+ shareEnabled: boolean;
41
+ stitchDisplay: number;
42
+ textExtra: Array<{
43
+ awemeId: string;
44
+ end: number;
45
+ hashtagName: string;
46
+ isCommerce: boolean;
47
+ start: number;
48
+ subType: number;
49
+ type: number;
50
+ }>;
51
+ }
52
+ export interface TiktokPlaylistResponse {
53
+ status: "success" | "error";
54
+ message?: string;
55
+ result?: {
56
+ hasMore: boolean;
57
+ itemList: PlaylistItem[];
58
+ extra?: {
59
+ fatal_item_ids: string[];
60
+ logid: string;
61
+ now: number;
62
+ };
63
+ };
64
+ }
65
+ export {};
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,71 @@
1
+ export type TiktokStalkUserResponse = {
2
+ status: "success" | "error";
3
+ message?: string;
4
+ result?: {
5
+ user: UserProfile;
6
+ stats: StatsUserProfile;
7
+ statsV2: StatsV2UserProfile;
8
+ };
9
+ };
10
+ export type UserProfile = {
11
+ uid: string;
12
+ username: string;
13
+ nickname: string;
14
+ avatarLarger: string;
15
+ avatarThumb: string;
16
+ avatarMedium: string;
17
+ signature: string;
18
+ verified: boolean;
19
+ privateAccount: boolean;
20
+ region: string;
21
+ commerceUser: boolean;
22
+ usernameModifyTime: number;
23
+ nicknameModifyTime: number;
24
+ secUid: string;
25
+ };
26
+ export type StatsUserProfile = {
27
+ followerCount: number;
28
+ followingCount: number;
29
+ heartCount: number;
30
+ videoCount: number;
31
+ likeCount: number;
32
+ friendCount: number;
33
+ };
34
+ export type StatsV2UserProfile = {
35
+ followerCount: string;
36
+ followingCount: string;
37
+ heartCount: string;
38
+ videoCount: string;
39
+ likeCount: string;
40
+ friendCount: string;
41
+ };
42
+ export type StatisticsUserProfile = {
43
+ likeCount: number;
44
+ shareCount: number;
45
+ commentCount: number;
46
+ playCount: number;
47
+ favoriteCount: number;
48
+ };
49
+ export type Video = {
50
+ id: string;
51
+ duration: string;
52
+ ratio: string;
53
+ cover: string;
54
+ originCover: string;
55
+ dynamicCover: string;
56
+ playAddr: string;
57
+ downloadAddr: string;
58
+ format: string;
59
+ bitrate: number;
60
+ };
61
+ export type Music = {
62
+ id: string;
63
+ title: string;
64
+ album: string;
65
+ playUrl: string;
66
+ coverLarge: string;
67
+ coverMedium: string;
68
+ coverThumb: string;
69
+ authorName: string;
70
+ duration: string;
71
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,61 @@
1
+ export type TiktokTrendingResponse = {
2
+ status: "success" | "error";
3
+ message?: string;
4
+ result?: TrendingData[];
5
+ };
6
+ export type TrendingData = {
7
+ exploreList: TrendingItem[];
8
+ pageState: PageState;
9
+ };
10
+ export type TrendingItem = {
11
+ cardItem: CardItem;
12
+ };
13
+ export type CardItem = {
14
+ id: string;
15
+ type: number;
16
+ cover: string;
17
+ title: string;
18
+ subTitle: string;
19
+ description: string;
20
+ link: string;
21
+ round: boolean;
22
+ playToken: string;
23
+ keyToken: string;
24
+ extraInfo: ExtraInfo;
25
+ };
26
+ export type ExtraInfo = {
27
+ verified: boolean;
28
+ fans: number;
29
+ likes: number;
30
+ userId: string;
31
+ secUid: string;
32
+ relation: number;
33
+ video: number;
34
+ following: number;
35
+ heart: number;
36
+ digg: number;
37
+ };
38
+ export type PageState = {
39
+ regionAppId: number;
40
+ os: string;
41
+ region: string;
42
+ baseURL: string;
43
+ appType: string;
44
+ fullUrl: string;
45
+ };
46
+ export type TrendingCreator = {
47
+ id: string;
48
+ username: string;
49
+ nickname: string;
50
+ avatarThumb: string;
51
+ description: string;
52
+ verified: boolean;
53
+ followerCount: number;
54
+ likeCount: number;
55
+ videoCount: number;
56
+ followingCount: number;
57
+ heartCount: number;
58
+ diggCount: number;
59
+ secUid: string;
60
+ link: string;
61
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });