tiktok-live-api 1.0.2 → 1.1.0
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.
- package/README.md +2 -0
- package/dist/index.d.mts +20 -0
- package/dist/index.d.ts +20 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
[](https://www.npmjs.com/package/tiktok-live-api)
|
|
7
7
|
[](https://www.typescriptlang.org/)
|
|
8
8
|
[](https://github.com/tiktool/tiktok-live-api/blob/main/LICENSE)
|
|
9
|
+
[](https://discord.gg/y8TwuFBAmD)
|
|
9
10
|
|
|
10
11
|
> This package is **not affiliated with or endorsed by TikTok**. It connects to the [TikTool Live](https://tik.tools) managed API service — 99.9% uptime, no reverse engineering, no maintenance required. Also available for [Python](https://pypi.org/project/tiktok-live-api/) and [any language via WebSocket](https://tik.tools/docs).
|
|
11
12
|
|
|
@@ -181,6 +182,7 @@ client.connect();
|
|
|
181
182
|
| `subscribe` | New subscriber | `user` |
|
|
182
183
|
| `roomUserSeq` | Viewer count | `viewerCount`, `topViewers` |
|
|
183
184
|
| `battle` | Battle event | `type`, `teams`, `scores` |
|
|
185
|
+
| `roomPin` | Pinned/starred message | `user`, `comment`, `action`, `durationSeconds` |
|
|
184
186
|
| `envelope` | Treasure chest | `diamonds`, `user` |
|
|
185
187
|
| `streamEnd` | Stream ended | `reason` |
|
|
186
188
|
| `connected` | Connected | `uniqueId` |
|
package/dist/index.d.mts
CHANGED
|
@@ -60,6 +60,25 @@ interface BattleEvent {
|
|
|
60
60
|
teams: Array<Record<string, unknown>>;
|
|
61
61
|
scores: number[];
|
|
62
62
|
}
|
|
63
|
+
/** Payload for `roomPin` (starred/pinned message) events. */
|
|
64
|
+
interface RoomPinEvent {
|
|
65
|
+
/** User who wrote the pinned message. */
|
|
66
|
+
user: TikTokUser;
|
|
67
|
+
/** The pinned comment text. */
|
|
68
|
+
comment: string;
|
|
69
|
+
/** Pin action: 1 = pin, 2 = unpin. */
|
|
70
|
+
action: number;
|
|
71
|
+
/** How long the message stays pinned (seconds). */
|
|
72
|
+
durationSeconds: number;
|
|
73
|
+
/** Timestamp when the message was pinned (ms). */
|
|
74
|
+
pinnedAt: number;
|
|
75
|
+
/** Original message type (e.g. "WebcastChatMessage"). */
|
|
76
|
+
originalMsgType: string;
|
|
77
|
+
/** Original message ID that was pinned. */
|
|
78
|
+
originalMsgId: string;
|
|
79
|
+
/** User ID of the operator who pinned the message. */
|
|
80
|
+
operatorUserId: string;
|
|
81
|
+
}
|
|
63
82
|
/** Payload for `caption` events from {@link TikTokCaptions}. */
|
|
64
83
|
interface CaptionEvent {
|
|
65
84
|
text: string;
|
|
@@ -104,6 +123,7 @@ interface TikTokLiveEventMap {
|
|
|
104
123
|
subscribe: SocialEvent;
|
|
105
124
|
roomUserSeq: RoomUserSeqEvent;
|
|
106
125
|
battle: BattleEvent;
|
|
126
|
+
roomPin: RoomPinEvent;
|
|
107
127
|
envelope: Record<string, unknown>;
|
|
108
128
|
streamEnd: Record<string, unknown>;
|
|
109
129
|
roomInfo: Record<string, unknown>;
|
package/dist/index.d.ts
CHANGED
|
@@ -60,6 +60,25 @@ interface BattleEvent {
|
|
|
60
60
|
teams: Array<Record<string, unknown>>;
|
|
61
61
|
scores: number[];
|
|
62
62
|
}
|
|
63
|
+
/** Payload for `roomPin` (starred/pinned message) events. */
|
|
64
|
+
interface RoomPinEvent {
|
|
65
|
+
/** User who wrote the pinned message. */
|
|
66
|
+
user: TikTokUser;
|
|
67
|
+
/** The pinned comment text. */
|
|
68
|
+
comment: string;
|
|
69
|
+
/** Pin action: 1 = pin, 2 = unpin. */
|
|
70
|
+
action: number;
|
|
71
|
+
/** How long the message stays pinned (seconds). */
|
|
72
|
+
durationSeconds: number;
|
|
73
|
+
/** Timestamp when the message was pinned (ms). */
|
|
74
|
+
pinnedAt: number;
|
|
75
|
+
/** Original message type (e.g. "WebcastChatMessage"). */
|
|
76
|
+
originalMsgType: string;
|
|
77
|
+
/** Original message ID that was pinned. */
|
|
78
|
+
originalMsgId: string;
|
|
79
|
+
/** User ID of the operator who pinned the message. */
|
|
80
|
+
operatorUserId: string;
|
|
81
|
+
}
|
|
63
82
|
/** Payload for `caption` events from {@link TikTokCaptions}. */
|
|
64
83
|
interface CaptionEvent {
|
|
65
84
|
text: string;
|
|
@@ -104,6 +123,7 @@ interface TikTokLiveEventMap {
|
|
|
104
123
|
subscribe: SocialEvent;
|
|
105
124
|
roomUserSeq: RoomUserSeqEvent;
|
|
106
125
|
battle: BattleEvent;
|
|
126
|
+
roomPin: RoomPinEvent;
|
|
107
127
|
envelope: Record<string, unknown>;
|
|
108
128
|
streamEnd: Record<string, unknown>;
|
|
109
129
|
roomInfo: Record<string, unknown>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tiktok-live-api",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "Unofficial TikTok LIVE API Client — Real-time chat, gifts, viewers, battles, and AI live captions from any TikTok livestream. Managed WebSocket API with 99.9% uptime.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|