@wavezfm/api 0.7.18 → 0.7.20
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 +18 -0
- package/dist/types.d.ts +2 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -342,6 +342,24 @@ bot.on<RoomBotRealtimeEventPayloads['queue_removed']>('queue_removed', packet =>
|
|
|
342
342
|
|
|
343
343
|
`queue_left` remains a general queue notification; explicit departure adds `reason: 'voluntary'`. Forced removals emit `queue_removed` with the resulting `queue`, a cause (`moderator`, `kick`, `ban`, `clearqueue`, `removeghost`, or `queue_restriction`), and preserve the corresponding legacy queue notifications. `queue_restriction` means a queue access block removed an actually queued user. Kicks and bans still emit `user_left` when presence is removed. `message_deleted` and `chat_cleared` identify the action's actor. Explicit role changes enrich `user_updated` with `actor`, `previousRole`, and, when available, `previousCustomRoomRoleId`; other profile updates need not carry these fields.
|
|
344
344
|
|
|
345
|
+
`client.roomBot.clearChat(roomId)` retains its existing HTTP request and
|
|
346
|
+
`{ success: true }` response. On the updated server, a general bot clear removes
|
|
347
|
+
unprotected messages from public and staff chat while preserving messages from
|
|
348
|
+
platform admins, developers, and ambassadors. A bot cannot bypass that protection
|
|
349
|
+
through its owner's admin role or `delete_protected_messages`; that permission
|
|
350
|
+
allows individual message deletion only. Direct actions against protected users
|
|
351
|
+
can still fail with `ROOM_MODERATION_PLATFORM_ROLE_FORBIDDEN`.
|
|
352
|
+
|
|
353
|
+
When a `chat_cleared` event contains `messageIds`, remove only the listed IDs
|
|
354
|
+
from local history. An empty array means no removal. WebSocket `messageCount`
|
|
355
|
+
can be absent or retain the requested deletion limit; the IDs are authoritative.
|
|
356
|
+
HTTP clears emit a separate event for each channel with the actual deleted IDs
|
|
357
|
+
and count, including `[]` and `0`, with normal staff-event access rules.
|
|
358
|
+
Full-clear events without `messageIds` retain their existing channel or
|
|
359
|
+
`clearAllChannels` scope. These fields are already supported by
|
|
360
|
+
`RoomBotChatClearedPayload`; the behavior change requires a server deployment,
|
|
361
|
+
not a new SDK method.
|
|
362
|
+
|
|
345
363
|
`track_skipped` and `queue_reordered` also include `roomId` and `actor`, with typed payloads `RoomBotTrackSkippedPayload` and `RoomBotQueueReorderedPayload`. Legacy `actorUserId` continues to identify the authorizing account, while `actor` distinguishes a bot from its owner. Queue reorders preserve their move/swap positions or bulk-removal details. Assigning the same built-in and custom room roles again does not emit a role-change event.
|
|
346
364
|
|
|
347
365
|
`room_settings_updated` carries `{ roomId, actor, changedFields }`, with changed field names only. `public_room_updated` continues to refresh the public room directory for settings, presence, and playback changes; it does not guarantee an actor or a settings delta.
|
package/dist/types.d.ts
CHANGED
|
@@ -198,6 +198,8 @@ export interface BadgeAssignment {
|
|
|
198
198
|
[key: string]: unknown;
|
|
199
199
|
}
|
|
200
200
|
export interface RoomActiveUser {
|
|
201
|
+
/** Approximate country detected from the current connection IP, never the profile flag. */
|
|
202
|
+
connectionCountryCode?: string | null;
|
|
201
203
|
id: string;
|
|
202
204
|
username: string;
|
|
203
205
|
displayUsername?: string | null;
|