@wavezfm/api 0.7.13 → 0.7.15
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/CHANGELOG.md +15 -0
- package/README.md +137 -0
- package/dist/index.d.ts +52 -20
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/resources/billing.d.ts +1 -0
- package/dist/resources/billing.js.map +1 -1
- package/dist/resources/chat.d.ts +14 -1
- package/dist/resources/chat.js +12 -0
- package/dist/resources/chat.js.map +1 -1
- package/dist/resources/privateMessages.d.ts +9 -0
- package/dist/resources/privateMessages.js +12 -0
- package/dist/resources/privateMessages.js.map +1 -0
- package/dist/resources/room.d.ts +11 -10
- package/dist/resources/room.js.map +1 -1
- package/dist/resources/roomBot.d.ts +12 -10
- package/dist/resources/roomBot.js.map +1 -1
- package/dist/resources/settings.d.ts +8 -1
- package/dist/resources/settings.js +8 -3
- package/dist/resources/settings.js.map +1 -1
- package/dist/resources/system.d.ts +9 -1
- package/dist/resources/system.js +12 -0
- package/dist/resources/system.js.map +1 -1
- package/dist/types.d.ts +193 -4
- package/package.json +5 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
### API synchronization (October 1, after 0.7.14)
|
|
6
|
+
|
|
7
|
+
- Added session-authenticated `client.privateMessages.openConversation()` and `sendMessage()` with typed conversation/message responses and optional `clientMessageId`. Callers reuse the same UUID v4 and content to retry one send; the SDK does not retry automatically.
|
|
8
|
+
- Added admin-session `system.createGlobalAlert()`, `createRoomAlert()` and `createUserAlert()` with typed text responses and appearance inputs, including `iconBeforeTitle`. Chat messages now expose typed `systemColor` and `systemAppearance` fields.
|
|
9
|
+
- Playback timing, literal whole-word blacklist matching, YouTube metadata refresh and Stripe dependency changes retain the existing HTTP routes and response shapes.
|
|
10
|
+
|
|
11
|
+
### API synchronization (September 26–October 1)
|
|
12
|
+
|
|
13
|
+
- Removed `settings.replaceGifFavorites()`: the server rejects legacy whole-list `PUT` requests with `409 GIF_FAVORITES_RELOAD_REQUIRED`. Use `upsertGifFavorite()` and `removeGifFavorite()`; both return the current list. Favorite reads now use `no-store`, and metadata-only updates support `updateExistingOnly`.
|
|
14
|
+
- Added session-authenticated `chat.listLinkReviews()`, `approveLinkReview()`, and `rejectLinkReview()` with the exported `ChatLinkReview` type.
|
|
15
|
+
- Added `post_chat_links`, typed review policy and media cooldown inputs for both user and bot room management, and `RoomLinkFiltersUpdateInput` / `RoomStateSnapshot` exports.
|
|
16
|
+
- Typed custom emoji image replacement and responses through `RoomCustomEmoji`, including the equivalent bot helpers.
|
|
17
|
+
- Added effective/custom room background fields, the `youtubePlayerV2BetaEnabled` system availability flag, and `excludeActiveSubscribers` in room subscription gift checkout.
|
|
18
|
+
- Corrected media preview typing to allow `null` when a supported page has no usable preview.
|
|
19
|
+
|
|
5
20
|
### Build
|
|
6
21
|
|
|
7
22
|
- Build the SDK with TypeScript 7.0.2 while retaining the ES2022 output target and zero runtime dependencies. Validated with the build and 22 tests covering HTTP contracts and private bot commands.
|
package/README.md
CHANGED
|
@@ -104,6 +104,55 @@ npm run typecheck
|
|
|
104
104
|
npm run build
|
|
105
105
|
```
|
|
106
106
|
|
|
107
|
+
## Private-message retries and system alerts
|
|
108
|
+
|
|
109
|
+
The helpers in this section are available in the local SDK build and await the
|
|
110
|
+
next package release. Use a session-authenticated user client with the headers
|
|
111
|
+
required by your deployment for these mutations.
|
|
112
|
+
|
|
113
|
+
```ts
|
|
114
|
+
const { data: conversation } = await client.privateMessages.openConversation({
|
|
115
|
+
recipientUserId: 'recipient-id',
|
|
116
|
+
});
|
|
117
|
+
const input = {
|
|
118
|
+
content: 'Hello!',
|
|
119
|
+
clientMessageId: crypto.randomUUID(),
|
|
120
|
+
};
|
|
121
|
+
const { data } = await client.privateMessages.sendMessage(conversation.id, input);
|
|
122
|
+
console.log(data.message.id);
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
Generate `clientMessageId` once per send and keep the same UUID v4 and content
|
|
126
|
+
when retrying after an uncertain failure. The updated server returns the same
|
|
127
|
+
saved message for the same sender and conversation. Omitting the field keeps
|
|
128
|
+
server-generated IDs. Membership and user-block checks still apply, and an ID
|
|
129
|
+
conflict cannot overwrite another message. The SDK does not retry automatically.
|
|
130
|
+
It also does not generate `clientMessageId`; callers choose whether to provide it.
|
|
131
|
+
|
|
132
|
+
Administrative system alerts accept `appearance.iconBeforeTitle`, which defaults
|
|
133
|
+
to `false`, and preserve the appearance in the realtime payload:
|
|
134
|
+
|
|
135
|
+
```ts
|
|
136
|
+
await client.system.createRoomAlert('room-id', {
|
|
137
|
+
delivery: 'popup',
|
|
138
|
+
message: 'The room will restart shortly.',
|
|
139
|
+
appearance: { icon: 'warning', iconBeforeTitle: true },
|
|
140
|
+
});
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
`createGlobalAlert(input)` and `createRoomAlert(roomId, input)` default to `chat`.
|
|
144
|
+
`createUserAlert(userId, input)` defaults to `popup`; user-targeted chat delivery
|
|
145
|
+
also requires `roomId` in the input. All three require an admin session. Messages
|
|
146
|
+
accept 3–1,000 characters, and optional titles accept 3–80 characters after
|
|
147
|
+
trimming; empty titles use the localized default. With `bilingual: true`, provide
|
|
148
|
+
both `messagePtBr` and `messageEnUs`, with optional localized titles.
|
|
149
|
+
|
|
150
|
+
Appearance colors use six-digit hex strings. Icons accept `info`, `brand`,
|
|
151
|
+
`warning`, `bell`, `gift` or `none`; positions accept `left`, `top` or `right`.
|
|
152
|
+
Integer ranges are 16–96 for `iconSize`, 320–960 for `width`, 14–40 for
|
|
153
|
+
`titleSize`, and 12–24 for `textSize`. HTTP responses return normalized text in
|
|
154
|
+
`{ success, alert }`; color, appearance and delivery are sent through realtime.
|
|
155
|
+
|
|
107
156
|
## License
|
|
108
157
|
|
|
109
158
|
MIT
|
|
@@ -145,6 +194,94 @@ avatar animation rates accept 1–60 FPS per frame count.
|
|
|
145
194
|
|
|
146
195
|
Call `client.room.removeGuestPresence(slug)` when leaving a guest preview. Private room access and banner uploads are available through `verifyPrivateAccess()` and `uploadBanner()`. See the Frontend API reference for validation rules and examples.
|
|
147
196
|
|
|
197
|
+
## GIF favorites
|
|
198
|
+
|
|
199
|
+
Favorites now use individual mutations so a stale tab cannot replace the saved
|
|
200
|
+
list. Migrate calls to the removed `replaceGifFavorites()` helper to
|
|
201
|
+
`upsertGifFavorite()` and `removeGifFavorite()`. The legacy HTTP `PUT` endpoint
|
|
202
|
+
returns `409 GIF_FAVORITES_RELOAD_REQUIRED` without changing saved favorites.
|
|
203
|
+
|
|
204
|
+
```ts
|
|
205
|
+
const { data } = await client.settings.upsertGifFavorite({
|
|
206
|
+
id: 'provider-gif-id',
|
|
207
|
+
title: 'Dance',
|
|
208
|
+
previewUrl: 'https://media.example.com/dance.webp',
|
|
209
|
+
gifUrl: 'https://media.example.com/dance.gif',
|
|
210
|
+
width: 200,
|
|
211
|
+
height: 120,
|
|
212
|
+
addedAt: new Date().toISOString(),
|
|
213
|
+
});
|
|
214
|
+
console.log(data.favorites);
|
|
215
|
+
await client.settings.removeGifFavorite('https://media.example.com/dance.gif');
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
`gifUrl` is the normalized identity. Both mutations return the full current
|
|
219
|
+
`{ favorites }` list; use it as the new local state. Updates preserve existing
|
|
220
|
+
order and `addedAt`, and new entries are limited to 200. Serialize local writes
|
|
221
|
+
when applying each returned list to avoid replacing newer local state with an
|
|
222
|
+
older response. Use
|
|
223
|
+
`upsertGifFavorite(favorite, { updateExistingOnly: true })` for metadata repairs
|
|
224
|
+
that must not restore a favorite removed in another tab. Reads use `no-store`.
|
|
225
|
+
|
|
226
|
+
## Room chat policy and link reviews
|
|
227
|
+
|
|
228
|
+
`post_chat_links` controls ordinary links, while `attach_chat_media` controls
|
|
229
|
+
embedded images and GIFs. Set `chatLinksWithoutPermission` to `review` to hold
|
|
230
|
+
public messages containing ordinary links from users without link permission.
|
|
231
|
+
|
|
232
|
+
```ts
|
|
233
|
+
await client.room.updateLinkFilters(roomId, {
|
|
234
|
+
blockAllLinks: false,
|
|
235
|
+
blockedLinkPatterns: [],
|
|
236
|
+
chatMediaPreviewsEnabled: true,
|
|
237
|
+
chatLinksWithoutPermission: 'review',
|
|
238
|
+
});
|
|
239
|
+
await client.room.updateSettings(roomId, { chatMediaCooldownSeconds: 15 });
|
|
240
|
+
|
|
241
|
+
const { data: pending } = await client.chat.listLinkReviews(roomId);
|
|
242
|
+
if (pending.reviews[0]) {
|
|
243
|
+
await client.chat.approveLinkReview(roomId, pending.reviews[0].id);
|
|
244
|
+
// Or rejectLinkReview(roomId, reviewId).
|
|
245
|
+
}
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
Media cooldown accepts an integer from 0 to 3,600 seconds. These settings are
|
|
249
|
+
also available through `client.roomBot.updateSettings()` and
|
|
250
|
+
`client.roomBot.updateLinkFilters()` with a bot's `manage_room` permission.
|
|
251
|
+
Review endpoints use a user session with `clear_chat` permission. Approval
|
|
252
|
+
rechecks the author's current chat access and content policy, persists the
|
|
253
|
+
message, and returns `{ success: true, message }`. A review already decided by
|
|
254
|
+
another moderator returns `404 ROOM_LINK_REVIEW_NOT_FOUND`. The realtime
|
|
255
|
+
`chat_link_reviews_updated` event carries `{ roomId }` so moderation clients can
|
|
256
|
+
refresh their pending list. A reviewed user's `send_chat` acknowledgement has
|
|
257
|
+
`status: 'pending_review'` and `persisted: false` until approval.
|
|
258
|
+
|
|
259
|
+
## Emoji images, backgrounds, and room gifts
|
|
260
|
+
|
|
261
|
+
Existing emoji helpers now type the image replacement contract:
|
|
262
|
+
|
|
263
|
+
```ts
|
|
264
|
+
await client.room.updateEmoji(roomId, emojiId, {
|
|
265
|
+
shortcode: 'dance',
|
|
266
|
+
imageUrl: 'https://images.example.com/dance.gif',
|
|
267
|
+
});
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
The server imports a changed public image URL to its CDN; retain `shortcode`
|
|
271
|
+
when replacing the image. The bot equivalent is `client.roomBot.updateEmoji()`.
|
|
272
|
+
Room details and bot snapshots expose `adminBackgroundUrl` and the effective
|
|
273
|
+
`backgroundUrl`. Catalog updates emit `room_background_updated` with `roomId`,
|
|
274
|
+
`backgroundId`, `backgroundUrl`, and `action` for affected rooms.
|
|
275
|
+
|
|
276
|
+
Pass `excludeActiveSubscribers: true` to
|
|
277
|
+
`client.billing.createSubscriptionRoomGiftCheckout()` to restrict random room
|
|
278
|
+
subscription gifts to listeners without an active subscription. The default
|
|
279
|
+
is `false`; administrator exclusions are applied by the server.
|
|
280
|
+
|
|
281
|
+
`client.system.status()` exposes `youtubePlayerV2BetaEnabled` as an availability
|
|
282
|
+
flag. Browser opt-in is a local website preference rather than a settings API
|
|
283
|
+
field.
|
|
284
|
+
|
|
148
285
|
## Private commands from users
|
|
149
286
|
|
|
150
287
|
Users can open a multiline command dialog from a bot's profile or with `/bot @Robo`. Private commands have a separate, administrator-configurable limit (8,000 characters by default, up to 10,000). They are forwarded only to the selected bot connected to that room, not broadcast or saved in public chat history. The bot may store or process the command according to its own configuration.
|
package/dist/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export { createRoomResource } from "./resources/room.js";
|
|
|
7
7
|
export { createPlaylistResource } from "./resources/playlist.js";
|
|
8
8
|
export { createSourceResource } from "./resources/source.js";
|
|
9
9
|
export { createChatResource } from "./resources/chat.js";
|
|
10
|
+
export { createPrivateMessagesResource } from "./resources/privateMessages.js";
|
|
10
11
|
export { createFriendResource } from "./resources/friend.js";
|
|
11
12
|
export { createUserBlocksResource } from "./resources/userBlocks.js";
|
|
12
13
|
export { createGiveawaysResource } from "./resources/giveaways.js";
|
|
@@ -18,7 +19,7 @@ export { createRoomBotResource } from "./resources/roomBot.js";
|
|
|
18
19
|
export { parseRoomQueueSnapshot } from "./utils/roomQueue.js";
|
|
19
20
|
export { formatMentionText } from "./utils/chat.js";
|
|
20
21
|
export { createRoomBotRealtimeClient } from "./realtime/roomBot.js";
|
|
21
|
-
export type { BotPrivateCommand, CountryFlagSettings, TeamDirectory, StageHoverSettings, UserProfileOptions, ApiClientConfig, ApiLike, ApiQuery, ApiQueryValue, ApiRequestOptions, ApiSuccessResponse, AuthMode, AuthUser, BadgeAssignment, ChatImageUploadResponse, ChatMediaPreviewResponse, ChatMessage, CheckoutSessionResponse, GifFavorite, Giveaway, GiveawayEntry, GiveawayJoinEligibility, GiveawayListResponse, GiveawayMutationResponse, GiveawayPrizeDeliveryStatus, GiveawayPrizeType, GiveawayScope, GiveawayStatus, InventoryResponse, InventoryCatalogEntry, InventoryCatalogItem, LastFmAccountProfile, LastFmLinkStatus, LastFmWriteResponse, MediaSearchResponse, MediaSearchResult, MiscShopUserState, MiscStoreCurrency, MiscStoreItemKind, MiscStoreRenderMode, NotificationCenterClearResponse, NotificationCenterStatus, PlaylistExternalImportResult, PlaylistExternalImportSource, PlaylistJsonExport, PlaylistJsonImportResult, PlaylistJsonTrack, PlaylistSummary, PlaylistTrack, PlaylistTrackAvailabilityInput, PlaylistTrackAvailabilityResult, PlaylistTrackSearchResult, RoomBotPermission, RoomExternalMediaMetadataResponse, RoomExternalMediaProvider, RoomExternalMediaSubtitleTrack, RoomExternalMediaValidationResponse, RoomActiveUser, RoomGuestPresenceResponse, RoomGuestViewer, RoomGlobalLimits, RoomGlobalLimitsUpdateInput, RoomPlaybackHistoryEntry, RoomPermission, RoomPermissionOverrideMap, RoomQueueEntry, RoomQueuePlayback, RoomQueueSnapshot, RoomQueueStatusResponse, RoomQueueUser, RoomQueueViewerStatus, RoomRoleName, RoomSettingsUpdateInput, RoomBotEditMessageInput, RoomBotChatEmbed, RoomBotMessageReplyInput, RoomBotEventsResponse, RoomPresenceEventFilterType, RoomBotQueueAddResponse, RoomBotRealtimeClient, RoomBotRealtimeSendMessageInput, RoomBotRealtimeOptions, RoomBotSendMessageInput, RoomBotSendMessageResponse, RoomBotState, RoomBotToken, RoomBotSettings, RoomBotSettingsUpdateInput, RoomPresenceEvent, RoomPresenceEventType, RoomSummary, RoomEvent, RoomEventApprovalStatus, RoomEventListResponse, RoomEventMutationResponse, RoomEventScope, RoomEventStatus, RoomEventSubmissionInput, WavezApiLocale, WavezApiMessageKey, WavezApiMessages, WavezApiMessageValues, StoreCatalogResponse, StoreCatalogItem, StoreCatalogSection, MiscStoreItem, AdminSystemHealth, AdminSystemStatus, SystemDonationGoal, SystemHealth, SystemPublicStats, SystemStatus, TwoFactorStatus, UserSettings, UserProfile, UserBlockState, WalletBalance, WebSocketLike, WsPacket, } from "./types.js";
|
|
22
|
+
export type { BotPrivateCommand, CountryFlagSettings, TeamDirectory, StageHoverSettings, UserProfileOptions, ApiClientConfig, ApiLike, ApiQuery, ApiQueryValue, ApiRequestOptions, ApiSuccessResponse, AuthMode, AuthUser, BadgeAssignment, ChatImageUploadResponse, ChatLinkReview, ChatMediaPreviewResponse, ChatMessage, CheckoutSessionResponse, GifFavorite, Giveaway, GiveawayEntry, GiveawayJoinEligibility, GiveawayListResponse, GiveawayMutationResponse, GiveawayPrizeDeliveryStatus, GiveawayPrizeType, GiveawayScope, GiveawayStatus, InventoryResponse, InventoryCatalogEntry, InventoryCatalogItem, LastFmAccountProfile, LastFmLinkStatus, LastFmWriteResponse, MediaSearchResponse, MediaSearchResult, MiscShopUserState, MiscStoreCurrency, MiscStoreItemKind, MiscStoreRenderMode, NotificationCenterClearResponse, NotificationCenterStatus, PlaylistExternalImportResult, PlaylistExternalImportSource, PlaylistJsonExport, PlaylistJsonImportResult, PlaylistJsonTrack, PlaylistSummary, PlaylistTrack, PlaylistTrackAvailabilityInput, PlaylistTrackAvailabilityResult, PlaylistTrackSearchResult, PrivateConversation, PrivateMessage, PrivateMessageCustomEmoji, PrivateMessageReply, PrivateMessageSendInput, PrivateMessageSendResponse, PrivateMessageUser, RoomBotPermission, RoomExternalMediaMetadataResponse, RoomExternalMediaProvider, RoomExternalMediaSubtitleTrack, RoomExternalMediaValidationResponse, RoomActiveUser, RoomCustomEmoji, RoomLinkFiltersUpdateInput, RoomGuestPresenceResponse, RoomGuestViewer, RoomGlobalLimits, RoomGlobalLimitsUpdateInput, RoomPlaybackHistoryEntry, RoomPermission, RoomPermissionOverrideMap, RoomQueueEntry, RoomQueuePlayback, RoomQueueSnapshot, RoomQueueStatusResponse, RoomQueueUser, RoomQueueViewerStatus, RoomRoleName, RoomSettingsUpdateInput, RoomStateSnapshot, RoomBotEditMessageInput, RoomBotChatEmbed, RoomBotMessageReplyInput, RoomBotEventsResponse, RoomPresenceEventFilterType, RoomBotQueueAddResponse, RoomBotRealtimeClient, RoomBotRealtimeSendMessageInput, RoomBotRealtimeOptions, RoomBotSendMessageInput, RoomBotSendMessageResponse, RoomBotState, RoomBotToken, RoomBotSettings, RoomBotSettingsUpdateInput, RoomPresenceEvent, RoomPresenceEventType, RoomSummary, RoomSystemAlert, RoomEvent, RoomEventApprovalStatus, RoomEventListResponse, RoomEventMutationResponse, RoomEventScope, RoomEventStatus, RoomEventSubmissionInput, WavezApiLocale, WavezApiMessageKey, WavezApiMessages, WavezApiMessageValues, StoreCatalogResponse, StoreCatalogItem, StoreCatalogSection, MiscStoreItem, AdminSystemHealth, AdminSystemStatus, SystemDonationGoal, SystemAlert, SystemAlertAppearance, SystemAlertInput, SystemAlertResponse, SystemHealth, SystemPublicStats, SystemStatus, TwoFactorStatus, UserSettings, UserSystemAlert, UserProfile, UserBlockState, WalletBalance, WebSocketLike, WsPacket, } from "./types.js";
|
|
22
23
|
import type { ApiClientConfig } from "./types.js";
|
|
23
24
|
export declare function createApiClient(config: ApiClientConfig): {
|
|
24
25
|
api: import("./core/api.js").WavezApi;
|
|
@@ -87,7 +88,12 @@ export declare function createApiClient(config: ApiClientConfig): {
|
|
|
87
88
|
getGifFavorites(): Promise<import("./types.js").ApiSuccessResponse<{
|
|
88
89
|
favorites: import("./types.js").GifFavorite[];
|
|
89
90
|
}>>;
|
|
90
|
-
|
|
91
|
+
upsertGifFavorite(favorite: import("./types.js").GifFavorite, options?: {
|
|
92
|
+
updateExistingOnly?: boolean;
|
|
93
|
+
}): Promise<import("./types.js").ApiSuccessResponse<{
|
|
94
|
+
favorites: import("./types.js").GifFavorite[];
|
|
95
|
+
}>>;
|
|
96
|
+
removeGifFavorite(gifUrl: string): Promise<import("./types.js").ApiSuccessResponse<{
|
|
91
97
|
favorites: import("./types.js").GifFavorite[];
|
|
92
98
|
}>>;
|
|
93
99
|
getLastFmConnectUrl(options?: {
|
|
@@ -231,7 +237,7 @@ export declare function createApiClient(config: ApiClientConfig): {
|
|
|
231
237
|
}): Promise<import("./types.js").ApiSuccessResponse<import("./types.js").RoomBotToken>>;
|
|
232
238
|
listBots(roomId: string): Promise<import("./types.js").ApiSuccessResponse<import("./types.js").RoomBotSettings[]>>;
|
|
233
239
|
updateBot(roomId: string, tokenId: string, input: import("./types.js").RoomBotSettingsUpdateInput): Promise<import("./types.js").ApiSuccessResponse<import("./types.js").RoomBotSettings>>;
|
|
234
|
-
listEmojis(roomId: string): Promise<import("./types.js").ApiSuccessResponse<
|
|
240
|
+
listEmojis(roomId: string): Promise<import("./types.js").ApiSuccessResponse<import("./types.js").RoomCustomEmoji[]>>;
|
|
235
241
|
listAuditLogs(roomId: string, limit?: number, page?: number): Promise<import("./types.js").ApiSuccessResponse<{
|
|
236
242
|
logs: unknown[];
|
|
237
243
|
}>>;
|
|
@@ -239,12 +245,7 @@ export declare function createApiClient(config: ApiClientConfig): {
|
|
|
239
245
|
updateSettings(roomId: string, input: import("./types.js").RoomSettingsUpdateInput): Promise<import("./types.js").ApiSuccessResponse<{
|
|
240
246
|
room: Record<string, unknown>;
|
|
241
247
|
}>>;
|
|
242
|
-
updateLinkFilters(roomId: string, input: {
|
|
243
|
-
chatMediaPreviewsEnabled?: boolean;
|
|
244
|
-
blockAllLinks: boolean;
|
|
245
|
-
blockedLinkPatterns: string[];
|
|
246
|
-
commandAnnouncement?: Record<string, unknown>;
|
|
247
|
-
}): Promise<import("./types.js").ApiSuccessResponse<{
|
|
248
|
+
updateLinkFilters(roomId: string, input: import("./types.js").RoomLinkFiltersUpdateInput): Promise<import("./types.js").ApiSuccessResponse<{
|
|
248
249
|
room: Record<string, unknown>;
|
|
249
250
|
}>>;
|
|
250
251
|
updateWordFilters(roomId: string, input: {
|
|
@@ -255,8 +256,14 @@ export declare function createApiClient(config: ApiClientConfig): {
|
|
|
255
256
|
setRole(roomId: string, userId: string, role: string): Promise<import("./types.js").ApiSuccessResponse<Record<string, unknown>>>;
|
|
256
257
|
setQueueAccess(roomId: string, userId: string, blocked: boolean, durationMs?: number): Promise<import("./types.js").ApiSuccessResponse<Record<string, unknown>>>;
|
|
257
258
|
unban(roomId: string, userId: string): Promise<import("./types.js").ApiSuccessResponse<Record<string, unknown>>>;
|
|
258
|
-
createEmoji(roomId: string, input:
|
|
259
|
-
|
|
259
|
+
createEmoji(roomId: string, input: {
|
|
260
|
+
shortcode: string;
|
|
261
|
+
imageUrl: string;
|
|
262
|
+
}): Promise<import("./types.js").ApiSuccessResponse<import("./types.js").RoomCustomEmoji>>;
|
|
263
|
+
updateEmoji(roomId: string, emojiId: string, input: {
|
|
264
|
+
shortcode: string;
|
|
265
|
+
imageUrl?: string;
|
|
266
|
+
}): Promise<import("./types.js").ApiSuccessResponse<import("./types.js").RoomCustomEmoji>>;
|
|
260
267
|
deleteEmoji(roomId: string, emojiId: string): Promise<import("./types.js").ApiSuccessResponse<Record<string, unknown>>>;
|
|
261
268
|
};
|
|
262
269
|
playlist: {
|
|
@@ -378,6 +385,16 @@ export declare function createApiClient(config: ApiClientConfig): {
|
|
|
378
385
|
deleteMessage(roomId: string, messageId: string, message?: Record<string, unknown>): Promise<import("./types.js").ApiSuccessResponse<{
|
|
379
386
|
success: true;
|
|
380
387
|
}>>;
|
|
388
|
+
listLinkReviews(roomId: string): Promise<import("./types.js").ApiSuccessResponse<{
|
|
389
|
+
reviews: import("./types.js").ChatLinkReview[];
|
|
390
|
+
}>>;
|
|
391
|
+
approveLinkReview(roomId: string, reviewId: string): Promise<import("./types.js").ApiSuccessResponse<{
|
|
392
|
+
success: true;
|
|
393
|
+
message: import("./types.js").ChatMessage;
|
|
394
|
+
}>>;
|
|
395
|
+
rejectLinkReview(roomId: string, reviewId: string): Promise<import("./types.js").ApiSuccessResponse<{
|
|
396
|
+
success: true;
|
|
397
|
+
}>>;
|
|
381
398
|
updateMessage(roomId: string, messageId: string, input: {
|
|
382
399
|
content: string;
|
|
383
400
|
message?: Record<string, unknown>;
|
|
@@ -394,6 +411,13 @@ export declare function createApiClient(config: ApiClientConfig): {
|
|
|
394
411
|
success: true;
|
|
395
412
|
}>>;
|
|
396
413
|
};
|
|
414
|
+
privateMessages: {
|
|
415
|
+
openConversation(input: {
|
|
416
|
+
recipientUserId?: string | null;
|
|
417
|
+
recipientUsername?: string | null;
|
|
418
|
+
}): Promise<import("./types.js").ApiSuccessResponse<import("./types.js").PrivateConversation>>;
|
|
419
|
+
sendMessage(conversationId: string, input: import("./types.js").PrivateMessageSendInput): Promise<import("./types.js").ApiSuccessResponse<import("./types.js").PrivateMessageSendResponse>>;
|
|
420
|
+
};
|
|
397
421
|
friend: {
|
|
398
422
|
follow(userId: string): Promise<import("./types.js").ApiSuccessResponse<{
|
|
399
423
|
success: true;
|
|
@@ -519,6 +543,7 @@ export declare function createApiClient(config: ApiClientConfig): {
|
|
|
519
543
|
createSubscriptionRoomGiftCheckout(input: {
|
|
520
544
|
roomSlug: string;
|
|
521
545
|
count?: number;
|
|
546
|
+
excludeActiveSubscribers?: boolean;
|
|
522
547
|
currency?: string | null;
|
|
523
548
|
locale?: string | null;
|
|
524
549
|
returnPath?: string | null;
|
|
@@ -558,6 +583,11 @@ export declare function createApiClient(config: ApiClientConfig): {
|
|
|
558
583
|
markGiftSeen(giftId: string): Promise<import("./types.js").ApiSuccessResponse<Record<string, unknown>>>;
|
|
559
584
|
};
|
|
560
585
|
system: {
|
|
586
|
+
createGlobalAlert(input: import("./types.js").SystemAlertInput): Promise<import("./types.js").ApiSuccessResponse<import("./types.js").SystemAlertResponse<import("./types.js").SystemAlert>>>;
|
|
587
|
+
createRoomAlert(roomId: string, input: import("./types.js").SystemAlertInput): Promise<import("./types.js").ApiSuccessResponse<import("./types.js").SystemAlertResponse<import("./types.js").RoomSystemAlert>>>;
|
|
588
|
+
createUserAlert(userId: string, input: import("./types.js").SystemAlertInput & {
|
|
589
|
+
roomId?: string | null;
|
|
590
|
+
}): Promise<import("./types.js").ApiSuccessResponse<import("./types.js").SystemAlertResponse<import("./types.js").UserSystemAlert>>>;
|
|
561
591
|
getTeam(): Promise<import("./types.js").ApiSuccessResponse<import("./types.js").TeamDirectory>>;
|
|
562
592
|
getCountryFlags(): Promise<import("./types.js").ApiSuccessResponse<import("./types.js").CountryFlagSettings>>;
|
|
563
593
|
updateCountryFlags(input: import("./types.js").CountryFlagSettings): Promise<import("./types.js").ApiSuccessResponse<import("./types.js").CountryFlagSettings>>;
|
|
@@ -620,18 +650,14 @@ export declare function createApiClient(config: ApiClientConfig): {
|
|
|
620
650
|
success: true;
|
|
621
651
|
}>>;
|
|
622
652
|
getManagement(roomId: string): Promise<import("./types.js").ApiSuccessResponse<Record<string, unknown>>>;
|
|
623
|
-
listEmojis(roomId: string): Promise<import("./types.js").ApiSuccessResponse<
|
|
653
|
+
listEmojis(roomId: string): Promise<import("./types.js").ApiSuccessResponse<import("./types.js").RoomCustomEmoji[]>>;
|
|
624
654
|
listAuditLogs(roomId: string, limit?: number, page?: number): Promise<import("./types.js").ApiSuccessResponse<{
|
|
625
655
|
logs: unknown[];
|
|
626
656
|
}>>;
|
|
627
|
-
updateSettings(roomId: string, input:
|
|
657
|
+
updateSettings(roomId: string, input: import("./types.js").RoomSettingsUpdateInput): Promise<import("./types.js").ApiSuccessResponse<{
|
|
628
658
|
room: Record<string, unknown>;
|
|
629
659
|
}>>;
|
|
630
|
-
updateLinkFilters(roomId: string, input: {
|
|
631
|
-
blockAllLinks: boolean;
|
|
632
|
-
blockedLinkPatterns: string[];
|
|
633
|
-
commandAnnouncement?: Record<string, unknown>;
|
|
634
|
-
}): Promise<import("./types.js").ApiSuccessResponse<{
|
|
660
|
+
updateLinkFilters(roomId: string, input: import("./types.js").RoomLinkFiltersUpdateInput): Promise<import("./types.js").ApiSuccessResponse<{
|
|
635
661
|
room: Record<string, unknown>;
|
|
636
662
|
}>>;
|
|
637
663
|
updateWordFilters(roomId: string, input: {
|
|
@@ -642,8 +668,14 @@ export declare function createApiClient(config: ApiClientConfig): {
|
|
|
642
668
|
setRole(roomId: string, userId: string, role: string): Promise<import("./types.js").ApiSuccessResponse<Record<string, unknown>>>;
|
|
643
669
|
setQueueAccess(roomId: string, userId: string, blocked: boolean, durationMs?: number): Promise<import("./types.js").ApiSuccessResponse<Record<string, unknown>>>;
|
|
644
670
|
unban(roomId: string, userId: string): Promise<import("./types.js").ApiSuccessResponse<Record<string, unknown>>>;
|
|
645
|
-
createEmoji(roomId: string, input:
|
|
646
|
-
|
|
671
|
+
createEmoji(roomId: string, input: {
|
|
672
|
+
shortcode: string;
|
|
673
|
+
imageUrl: string;
|
|
674
|
+
}): Promise<import("./types.js").ApiSuccessResponse<import("./types.js").RoomCustomEmoji>>;
|
|
675
|
+
updateEmoji(roomId: string, emojiId: string, input: {
|
|
676
|
+
shortcode: string;
|
|
677
|
+
imageUrl?: string;
|
|
678
|
+
}): Promise<import("./types.js").ApiSuccessResponse<import("./types.js").RoomCustomEmoji>>;
|
|
647
679
|
deleteEmoji(roomId: string, emojiId: string): Promise<import("./types.js").ApiSuccessResponse<Record<string, unknown>>>;
|
|
648
680
|
};
|
|
649
681
|
};
|
package/dist/index.js
CHANGED
|
@@ -7,6 +7,7 @@ export { createRoomResource } from "./resources/room.js";
|
|
|
7
7
|
export { createPlaylistResource } from "./resources/playlist.js";
|
|
8
8
|
export { createSourceResource } from "./resources/source.js";
|
|
9
9
|
export { createChatResource } from "./resources/chat.js";
|
|
10
|
+
export { createPrivateMessagesResource } from "./resources/privateMessages.js";
|
|
10
11
|
export { createFriendResource } from "./resources/friend.js";
|
|
11
12
|
export { createUserBlocksResource } from "./resources/userBlocks.js";
|
|
12
13
|
export { createGiveawaysResource } from "./resources/giveaways.js";
|
|
@@ -26,6 +27,7 @@ import { createRoomResource } from "./resources/room.js";
|
|
|
26
27
|
import { createPlaylistResource } from "./resources/playlist.js";
|
|
27
28
|
import { createSourceResource } from "./resources/source.js";
|
|
28
29
|
import { createChatResource } from "./resources/chat.js";
|
|
30
|
+
import { createPrivateMessagesResource } from "./resources/privateMessages.js";
|
|
29
31
|
import { createFriendResource } from "./resources/friend.js";
|
|
30
32
|
import { createUserBlocksResource } from "./resources/userBlocks.js";
|
|
31
33
|
import { createGiveawaysResource } from "./resources/giveaways.js";
|
|
@@ -45,6 +47,7 @@ export function createApiClient(config) {
|
|
|
45
47
|
playlist: createPlaylistResource(api),
|
|
46
48
|
source: createSourceResource(api),
|
|
47
49
|
chat: createChatResource(api),
|
|
50
|
+
privateMessages: createPrivateMessagesResource(api),
|
|
48
51
|
friend: createFriendResource(api),
|
|
49
52
|
userBlocks: createUserBlocksResource(api),
|
|
50
53
|
giveaways: createGiveawaysResource(api),
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBA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ionRoomGiftCheckout(input: {
|
|
85
85
|
roomSlug: string;
|
|
86
86
|
count?: number;
|
|
87
|
+
excludeActiveSubscribers?: boolean;
|
|
87
88
|
currency?: string | null;
|
|
88
89
|
locale?: string | null;
|
|
89
90
|
returnPath?: string | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"billing.js","sourceRoot":"","sources":["../../src/resources/billing.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,qBAAqB,CAAC,GAAY;IAC9C,OAAO;QACH,wBAAwB,CAAC,SAAiB;YACtC,OAAO,GAAG,CAAC,GAAG,CAMX,kCAAkC,EAAE;gBACnC,KAAK,EAAE,EAAE,SAAS,EAAE;aACvB,CAAC,CAAC;QACP,CAAC;QAED,kBAAkB;YACd,OAAO,GAAG,CAAC,IAAI,CACX,8BAA8B,EAC9B,EAAE,CACL,CAAC;QACN,CAAC;QAED,kBAAkB;YACd,OAAO,GAAG,CAAC,IAAI,CACX,8BAA8B,EAC9B,EAAE,CACL,CAAC;QACN,CAAC;QAED,mBAAmB,CAAC,KAAkC;YAClD,OAAO,GAAG,CAAC,IAAI,CACX,+BAA+B,EAC/B,KAAK,IAAI,EAAE,CACd,CAAC;QACN,CAAC;QAED,8BAA8B;YAC1B,OAAO,GAAG,CAAC,GAAG,CACV,uCAAuC,CAC1C,CAAC;QACN,CAAC;QAED,0BAA0B,CAAC,KAO1B;YACG,OAAO,GAAG,CAAC,IAAI,CACX,gCAAgC,EAChC,KAAK,IAAI,EAAE,CACd,CAAC;QACN,CAAC;QAED,qBAAqB,CAAC,KAOrB;YACG,OAAO,GAAG,CAAC,IAAI,CACX,4BAA4B,EAC5B,KAAK,IAAI,EAAE,CACd,CAAC;QACN,CAAC;QAED,sBAAsB,CAAC,KAStB;YACG,OAAO,GAAG,CAAC,IAAI,CACX,8BAA8B,EAC9B,KAAK,CACR,CAAC;QACN,CAAC;QAED,0BAA0B,CACtB,MAAc,EACd,KAOC;YAED,OAAO,GAAG,CAAC,IAAI,CACX,2BAA2B,kBAAkB,CAAC,MAAM,CAAC,WAAW,EAChE,KAAK,IAAI,EAAE,CACd,CAAC;QACN,CAAC;QAED,4BAA4B,CAAC,KAO5B;YACG,OAAO,GAAG,CAAC,IAAI,CACX,mCAAmC,EACnC,KAAK,IAAI,EAAE,CACd,CAAC;QACN,CAAC;QAED,yBAAyB,CAAC,KAWzB;YACG,OAAO,GAAG,CAAC,IAAI,CACX,iCAAiC,EACjC,KAAK,CACR,CAAC;QACN,CAAC;QAED,8BAA8B,CAAC,KAa9B;YACG,OAAO,GAAG,CAAC,IAAI,CACX,qCAAqC,EACrC,KAAK,CACR,CAAC;QACN,CAAC;QAED,kCAAkC,CAAC,
|
|
1
|
+
{"version":3,"file":"billing.js","sourceRoot":"","sources":["../../src/resources/billing.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,qBAAqB,CAAC,GAAY;IAC9C,OAAO;QACH,wBAAwB,CAAC,SAAiB;YACtC,OAAO,GAAG,CAAC,GAAG,CAMX,kCAAkC,EAAE;gBACnC,KAAK,EAAE,EAAE,SAAS,EAAE;aACvB,CAAC,CAAC;QACP,CAAC;QAED,kBAAkB;YACd,OAAO,GAAG,CAAC,IAAI,CACX,8BAA8B,EAC9B,EAAE,CACL,CAAC;QACN,CAAC;QAED,kBAAkB;YACd,OAAO,GAAG,CAAC,IAAI,CACX,8BAA8B,EAC9B,EAAE,CACL,CAAC;QACN,CAAC;QAED,mBAAmB,CAAC,KAAkC;YAClD,OAAO,GAAG,CAAC,IAAI,CACX,+BAA+B,EAC/B,KAAK,IAAI,EAAE,CACd,CAAC;QACN,CAAC;QAED,8BAA8B;YAC1B,OAAO,GAAG,CAAC,GAAG,CACV,uCAAuC,CAC1C,CAAC;QACN,CAAC;QAED,0BAA0B,CAAC,KAO1B;YACG,OAAO,GAAG,CAAC,IAAI,CACX,gCAAgC,EAChC,KAAK,IAAI,EAAE,CACd,CAAC;QACN,CAAC;QAED,qBAAqB,CAAC,KAOrB;YACG,OAA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C,IAAI,CACX,kBAAkB,kBAAkB,CAAC,MAAM,CAAC,OAAO,EACnD,EAAE,CACL,CAAC;QACN,CAAC;KACJ,CAAC;AACN,CAAC"}
|
package/dist/resources/chat.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ApiLike, ChatImageUploadResponse, ChatMediaPreviewResponse, ChatMessage } from "../types.js";
|
|
1
|
+
import type { ApiLike, ChatImageUploadResponse, ChatLinkReview, ChatMediaPreviewResponse, ChatMessage } from "../types.js";
|
|
2
2
|
export declare function createChatResource(api: ApiLike): {
|
|
3
3
|
previewMedia(url: string): Promise<import("../types.js").ApiSuccessResponse<ChatMediaPreviewResponse>>;
|
|
4
4
|
uploadImage(image: Blob | FormData, fileName?: string): Promise<import("../types.js").ApiSuccessResponse<ChatImageUploadResponse>>;
|
|
@@ -11,6 +11,19 @@ export declare function createChatResource(api: ApiLike): {
|
|
|
11
11
|
deleteMessage(roomId: string, messageId: string, message?: Record<string, unknown>): Promise<import("../types.js").ApiSuccessResponse<{
|
|
12
12
|
success: true;
|
|
13
13
|
}>>;
|
|
14
|
+
/** Requires clear_chat permission. Returns pending reviews only. */
|
|
15
|
+
listLinkReviews(roomId: string): Promise<import("../types.js").ApiSuccessResponse<{
|
|
16
|
+
reviews: ChatLinkReview[];
|
|
17
|
+
}>>;
|
|
18
|
+
/** Requires clear_chat permission; the server rechecks author and room policy. */
|
|
19
|
+
approveLinkReview(roomId: string, reviewId: string): Promise<import("../types.js").ApiSuccessResponse<{
|
|
20
|
+
success: true;
|
|
21
|
+
message: ChatMessage;
|
|
22
|
+
}>>;
|
|
23
|
+
/** Requires clear_chat permission. */
|
|
24
|
+
rejectLinkReview(roomId: string, reviewId: string): Promise<import("../types.js").ApiSuccessResponse<{
|
|
25
|
+
success: true;
|
|
26
|
+
}>>;
|
|
14
27
|
updateMessage(roomId: string, messageId: string, input: {
|
|
15
28
|
content: string;
|
|
16
29
|
message?: Record<string, unknown>;
|
package/dist/resources/chat.js
CHANGED
|
@@ -41,6 +41,18 @@ export function createChatResource(api) {
|
|
|
41
41
|
body: message ? { message } : undefined,
|
|
42
42
|
});
|
|
43
43
|
},
|
|
44
|
+
/** Requires clear_chat permission. Returns pending reviews only. */
|
|
45
|
+
listLinkReviews(roomId) {
|
|
46
|
+
return api.get(`/rooms/${encodeURIComponent(roomId)}/chat-link-reviews`);
|
|
47
|
+
},
|
|
48
|
+
/** Requires clear_chat permission; the server rechecks author and room policy. */
|
|
49
|
+
approveLinkReview(roomId, reviewId) {
|
|
50
|
+
return api.post(`/rooms/${encodeURIComponent(roomId)}/chat-link-reviews/${encodeURIComponent(reviewId)}/approve`, {});
|
|
51
|
+
},
|
|
52
|
+
/** Requires clear_chat permission. */
|
|
53
|
+
rejectLinkReview(roomId, reviewId) {
|
|
54
|
+
return api.post(`/rooms/${encodeURIComponent(roomId)}/chat-link-reviews/${encodeURIComponent(reviewId)}/reject`, {});
|
|
55
|
+
},
|
|
44
56
|
updateMessage(roomId, messageId, input) {
|
|
45
57
|
return api.patch(`/rooms/${encodeURIComponent(roomId)}/messages/${encodeURIComponent(messageId)}`, input);
|
|
46
58
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat.js","sourceRoot":"","sources":["../../src/resources/chat.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"chat.js","sourceRoot":"","sources":["../../src/resources/chat.ts"],"names":[],"mappings":"AAQA,SAAS,eAAe,CAAC,KAAc;IACnC,OAAO,OAAO,QAAQ,KAAK,WAAW,IAAI,KAAK,YAAY,QAAQ,CAAC;AACxE,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,GAAY;IAC3C,OAAO;QACH,YAAY,CAAC,GAAW;YACpB,OAAO,GAAG,CAAC,GAAG,CAA2B,qBAAqB,EAAE;gBAC5D,KAAK,EAAE,EAAE,GAAG,EAAE;aACjB,CAAC,CAAC;QACP,CAAC;QAED,WAAW,CAAC,KAAsB,EAAE,QAAiB;YACj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-0,0 +1,9 @@
|
|
|
1
|
+
import type { ApiLike, PrivateConversation, PrivateMessageSendInput, PrivateMessageSendResponse } from "../types.js";
|
|
2
|
+
export declare function createPrivateMessagesResource(api: ApiLike): {
|
|
3
|
+
openConversation(input: {
|
|
4
|
+
recipientUserId?: string | null;
|
|
5
|
+
recipientUsername?: string | null;
|
|
6
|
+
}): Promise<import("../types.js").ApiSuccessResponse<PrivateConversation>>;
|
|
7
|
+
/** Session-authenticated. Retries must reuse the original clientMessageId. */
|
|
8
|
+
sendMessage(conversationId: string, input: PrivateMessageSendInput): Promise<import("../types.js").ApiSuccessResponse<PrivateMessageSendResponse>>;
|
|
9
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export function createPrivateMessagesResource(api) {
|
|
2
|
+
return {
|
|
3
|
+
openConversation(input) {
|
|
4
|
+
return api.post("/private-messages/conversations", input);
|
|
5
|
+
},
|
|
6
|
+
/** Session-authenticated. Retries must reuse the original clientMessageId. */
|
|
7
|
+
sendMessage(conversationId, input) {
|
|
8
|
+
return api.post(`/private-messages/conversations/${encodeURIComponent(conversationId)}/messages`, input);
|
|
9
|
+
},
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=privateMessages.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"privateMessages.js","sourceRoot":"","sources":["../../src/resources/privateMessages.ts"],"names":[],"mappings":"AAOA,MAAM,UAAU,6BAA6B,CAAC,GAAY;IACtD,OAAO;QACH,gBAAgB,CAAC,KAGhB;YACG,OAAO,GAAG,CAAC,IAAI,CACX,iCAAiC,EACjC,KAAK,CACR,CAAC;QACN,CAAC;QAED,8EAA8E;QAC9E,WAAW,CAAC,cAAsB,EAAE,KAA8B;YAC9D,OAAO,GAAG,CAAC,IAAI,CACX,mCAAmC,kBAAkB,CAAC,cAAc,CAAC,WAAW,EAChF,KAAK,CACR,CAAC;QACN,CAAC;KACJ,CAAC;AACN,CAAC"}
|
package/dist/resources/room.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ApiLike, ApiSuccessResponse, RoomBotPermission, RoomExternalMediaMetadataResponse, RoomExternalMediaValidationResponse, RoomGuestPresenceResponse, RoomPlaybackHistoryEntry, RoomQueueSnapshot, RoomQueueStatusResponse, RoomBotToken, RoomBotSettings, RoomBotSettingsUpdateInput, RoomSettingsUpdateInput, RoomSummary } from "../types.js";
|
|
1
|
+
import type { ApiLike, ApiSuccessResponse, RoomBotPermission, RoomExternalMediaMetadataResponse, RoomExternalMediaValidationResponse, RoomGuestPresenceResponse, RoomPlaybackHistoryEntry, RoomQueueSnapshot, RoomQueueStatusResponse, RoomBotToken, RoomBotSettings, RoomBotSettingsUpdateInput, RoomCustomEmoji, RoomLinkFiltersUpdateInput, RoomSettingsUpdateInput, RoomSummary } from "../types.js";
|
|
2
2
|
export declare function createRoomResource(api: ApiLike): {
|
|
3
3
|
list(): Promise<ApiSuccessResponse<RoomSummary[]>>;
|
|
4
4
|
featured(): Promise<{
|
|
@@ -68,7 +68,7 @@ export declare function createRoomResource(api: ApiLike): {
|
|
|
68
68
|
}): Promise<ApiSuccessResponse<RoomBotToken>>;
|
|
69
69
|
listBots(roomId: string): Promise<ApiSuccessResponse<RoomBotSettings[]>>;
|
|
70
70
|
updateBot(roomId: string, tokenId: string, input: RoomBotSettingsUpdateInput): Promise<ApiSuccessResponse<RoomBotSettings>>;
|
|
71
|
-
listEmojis(roomId: string): Promise<ApiSuccessResponse<
|
|
71
|
+
listEmojis(roomId: string): Promise<ApiSuccessResponse<RoomCustomEmoji[]>>;
|
|
72
72
|
listAuditLogs(roomId: string, limit?: number, page?: number): Promise<ApiSuccessResponse<{
|
|
73
73
|
logs: unknown[];
|
|
74
74
|
}>>;
|
|
@@ -76,12 +76,7 @@ export declare function createRoomResource(api: ApiLike): {
|
|
|
76
76
|
updateSettings(roomId: string, input: RoomSettingsUpdateInput): Promise<ApiSuccessResponse<{
|
|
77
77
|
room: Record<string, unknown>;
|
|
78
78
|
}>>;
|
|
79
|
-
updateLinkFilters(roomId: string, input: {
|
|
80
|
-
chatMediaPreviewsEnabled?: boolean;
|
|
81
|
-
blockAllLinks: boolean;
|
|
82
|
-
blockedLinkPatterns: string[];
|
|
83
|
-
commandAnnouncement?: Record<string, unknown>;
|
|
84
|
-
}): Promise<ApiSuccessResponse<{
|
|
79
|
+
updateLinkFilters(roomId: string, input: RoomLinkFiltersUpdateInput): Promise<ApiSuccessResponse<{
|
|
85
80
|
room: Record<string, unknown>;
|
|
86
81
|
}>>;
|
|
87
82
|
updateWordFilters(roomId: string, input: {
|
|
@@ -92,7 +87,13 @@ export declare function createRoomResource(api: ApiLike): {
|
|
|
92
87
|
setRole(roomId: string, userId: string, role: string): Promise<ApiSuccessResponse<Record<string, unknown>>>;
|
|
93
88
|
setQueueAccess(roomId: string, userId: string, blocked: boolean, durationMs?: number): Promise<ApiSuccessResponse<Record<string, unknown>>>;
|
|
94
89
|
unban(roomId: string, userId: string): Promise<ApiSuccessResponse<Record<string, unknown>>>;
|
|
95
|
-
createEmoji(roomId: string, input:
|
|
96
|
-
|
|
90
|
+
createEmoji(roomId: string, input: {
|
|
91
|
+
shortcode: string;
|
|
92
|
+
imageUrl: string;
|
|
93
|
+
}): Promise<ApiSuccessResponse<RoomCustomEmoji>>;
|
|
94
|
+
updateEmoji(roomId: string, emojiId: string, input: {
|
|
95
|
+
shortcode: string;
|
|
96
|
+
imageUrl?: string;
|
|
97
|
+
}): Promise<ApiSuccessResponse<RoomCustomEmoji>>;
|
|
97
98
|
deleteEmoji(roomId: string, emojiId: string): Promise<ApiSuccessResponse<Record<string, unknown>>>;
|
|
98
99
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"room.js","sourceRoot":"","sources":["../../src/resources/room.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,sBAAsB,EAAE,MA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E,OAAe;YACvC,OAAO,GAAG,CAAC,MAAM,CACb,UAAU,kBAAkB,CAAC,MAAM,CAAC,WAAW,kBAAkB,CAAC,OAAO,CAAC,EAAE,CAC/E,CAAC;QACN,CAAC;KACJ,CAAC;AACN,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ApiLike, ApiSuccessResponse, ChatImageUploadResponse, ChatMessage, RoomBotEventsResponse, RoomBotEditMessageInput, RoomBotQueueAddResponse, RoomQueueSnapshot, RoomBotSendMessageInput, RoomBotSendMessageResponse, RoomPresenceEventFilterType, RoomBotState, RoomBotSettings } from "../types.js";
|
|
1
|
+
import type { ApiLike, ApiSuccessResponse, ChatImageUploadResponse, ChatMessage, RoomBotEventsResponse, RoomBotEditMessageInput, RoomBotQueueAddResponse, RoomQueueSnapshot, RoomBotSendMessageInput, RoomBotSendMessageResponse, RoomPresenceEventFilterType, RoomBotState, RoomBotSettings, RoomCustomEmoji, RoomLinkFiltersUpdateInput, RoomSettingsUpdateInput } from "../types.js";
|
|
2
2
|
export declare function createRoomBotResource(api: ApiLike): {
|
|
3
3
|
renameSelf(roomId: string, botName: string): Promise<ApiSuccessResponse<RoomBotSettings>>;
|
|
4
4
|
getState(roomId: string): Promise<ApiSuccessResponse<RoomBotState>>;
|
|
@@ -35,18 +35,14 @@ export declare function createRoomBotResource(api: ApiLike): {
|
|
|
35
35
|
success: true;
|
|
36
36
|
}>>;
|
|
37
37
|
getManagement(roomId: string): Promise<ApiSuccessResponse<Record<string, unknown>>>;
|
|
38
|
-
listEmojis(roomId: string): Promise<ApiSuccessResponse<
|
|
38
|
+
listEmojis(roomId: string): Promise<ApiSuccessResponse<RoomCustomEmoji[]>>;
|
|
39
39
|
listAuditLogs(roomId: string, limit?: number, page?: number): Promise<ApiSuccessResponse<{
|
|
40
40
|
logs: unknown[];
|
|
41
41
|
}>>;
|
|
42
|
-
updateSettings(roomId: string, input:
|
|
42
|
+
updateSettings(roomId: string, input: RoomSettingsUpdateInput): Promise<ApiSuccessResponse<{
|
|
43
43
|
room: Record<string, unknown>;
|
|
44
44
|
}>>;
|
|
45
|
-
updateLinkFilters(roomId: string, input: {
|
|
46
|
-
blockAllLinks: boolean;
|
|
47
|
-
blockedLinkPatterns: string[];
|
|
48
|
-
commandAnnouncement?: Record<string, unknown>;
|
|
49
|
-
}): Promise<ApiSuccessResponse<{
|
|
45
|
+
updateLinkFilters(roomId: string, input: RoomLinkFiltersUpdateInput): Promise<ApiSuccessResponse<{
|
|
50
46
|
room: Record<string, unknown>;
|
|
51
47
|
}>>;
|
|
52
48
|
updateWordFilters(roomId: string, input: {
|
|
@@ -57,7 +53,13 @@ export declare function createRoomBotResource(api: ApiLike): {
|
|
|
57
53
|
setRole(roomId: string, userId: string, role: string): Promise<ApiSuccessResponse<Record<string, unknown>>>;
|
|
58
54
|
setQueueAccess(roomId: string, userId: string, blocked: boolean, durationMs?: number): Promise<ApiSuccessResponse<Record<string, unknown>>>;
|
|
59
55
|
unban(roomId: string, userId: string): Promise<ApiSuccessResponse<Record<string, unknown>>>;
|
|
60
|
-
createEmoji(roomId: string, input:
|
|
61
|
-
|
|
56
|
+
createEmoji(roomId: string, input: {
|
|
57
|
+
shortcode: string;
|
|
58
|
+
imageUrl: string;
|
|
59
|
+
}): Promise<ApiSuccessResponse<RoomCustomEmoji>>;
|
|
60
|
+
updateEmoji(roomId: string, emojiId: string, input: {
|
|
61
|
+
shortcode: string;
|
|
62
|
+
imageUrl?: string;
|
|
63
|
+
}): Promise<ApiSuccessResponse<RoomCustomEmoji>>;
|
|
62
64
|
deleteEmoji(roomId: string, emojiId: string): Promise<ApiSuccessResponse<Record<string, unknown>>>;
|
|
63
65
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"roomBot.js","sourceRoot":"","sources":["../../src/resources/roomBot.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"roomBot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,EACrF,EAAE,OAAO,EAAE,GAAG,CAAC,UAAU,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,EAChE,EAAE,QAAQ,EAAE,UAAU,EAAE,CAC3B,CAAC;QACN,CAAC;QAED,KAAK,CAAC,MAAc,EAAE,MAAc;YAChC,OAAO,GAAG,CAAC,MAAM,CACb,cAAc,kBAAkB,CAAC,MAAM,CAAC,SAAS,kBAAkB,CAAC,MAAM,CAAC,EAAE,EAC7E;gBACI,QAAQ,EAAE,UAAU;aACvB,CACJ,CAAC;QACN,CAAC;QAED,WAAW,CAAC,MAAc,EAAE,KAA8C;YACtE,OAAO,GAAG,CAAC,IAAI,CACX,cAAc,kBAAkB,CAAC,MAAM,CAAC,SAAS,EACjD,KAAK,EACL,EAAE,QAAQ,EAAE,UAAU,EAAE,CAC3B,CAAC;QACN,CAAC;QAED,WAAW,CACP,MAAc,EACd,OAAe,EACf,KAA+C;YAE/C,OAAO,GAAG,CAAC,KAAK,CACZ,cAAc,kBAAkB,CAAC,MAAM,CAAC,WAAW,kBAAkB,CAAC,OAAO,CAAC,EAAE,EAChF,KAAK,EACL,EAAE,QAAQ,EAAE,UAAU,EAAE,CAC3B,CAAC;QACN,CAAC;QAED,WAAW,CAAC,MAAc,EAAE,OAAe;YACvC,OAAO,GAAG,CAAC,MAAM,CACb,cAAc,kBAAkB,CAAC,MAAM,CAAC,WAAW,kBAAkB,CAAC,OAAO,CAAC,EAAE,EAChF;gBACI,QAAQ,EAAE,UAAU;aACvB,CACJ,CAAC;QACN,CAAC;KACJ,CAAC;AACN,CAAC"}
|
|
@@ -29,7 +29,14 @@ export declare function createSettingsResource(api: ApiLike): {
|
|
|
29
29
|
getGifFavorites(): Promise<import("../types.js").ApiSuccessResponse<{
|
|
30
30
|
favorites: GifFavorite[];
|
|
31
31
|
}>>;
|
|
32
|
-
|
|
32
|
+
/** Upsert one favorite by its normalized gifUrl, preserving other favorites. */
|
|
33
|
+
upsertGifFavorite(favorite: GifFavorite, options?: {
|
|
34
|
+
updateExistingOnly?: boolean;
|
|
35
|
+
}): Promise<import("../types.js").ApiSuccessResponse<{
|
|
36
|
+
favorites: GifFavorite[];
|
|
37
|
+
}>>;
|
|
38
|
+
/** Remove one favorite by gifUrl. Repeated removal is safe. */
|
|
39
|
+
removeGifFavorite(gifUrl: string): Promise<import("../types.js").ApiSuccessResponse<{
|
|
33
40
|
favorites: GifFavorite[];
|
|
34
41
|
}>>;
|
|
35
42
|
getLastFmConnectUrl(options?: {
|
|
@@ -7,10 +7,15 @@ export function createSettingsResource(api) {
|
|
|
7
7
|
return api.patch("/settings", input);
|
|
8
8
|
},
|
|
9
9
|
getGifFavorites() {
|
|
10
|
-
return api.get("/settings/gif-favorites");
|
|
10
|
+
return api.get("/settings/gif-favorites", { cache: "no-store" });
|
|
11
11
|
},
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
/** Upsert one favorite by its normalized gifUrl, preserving other favorites. */
|
|
13
|
+
upsertGifFavorite(favorite, options) {
|
|
14
|
+
return api.post("/settings/gif-favorites", { favorite, ...options });
|
|
15
|
+
},
|
|
16
|
+
/** Remove one favorite by gifUrl. Repeated removal is safe. */
|
|
17
|
+
removeGifFavorite(gifUrl) {
|
|
18
|
+
return api.delete("/settings/gif-favorites", { body: { gifUrl } });
|
|
14
19
|
},
|
|
15
20
|
getLastFmConnectUrl(options) {
|
|
16
21
|
return api.get("/settings/lastfm/connect-url", {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings.js","sourceRoot":"","sources":["../../src/resources/settings.ts"],"names":[],"mappings":"AAUA,MAAM,UAAU,sBAAsB,CAAC,GAAY;IAC/C,OAAO;QACH,GAAG;YACC,OAAO,GAAG,CAAC,GAAG,CAAe,WAAW,CAAC,CAAC;QAC9C,CAAC;QAED,MAAM,CAAC,KAwBN;YACG,OAAO,GAAG,CAAC,KAAK,CAAe,WAAW,EAAE,KAAK,CAAC,CAAC;QACvD,CAAC;QAED,eAAe;YACX,OAAO,GAAG,CAAC,GAAG,CACV,yBAAyB,
|
|
1
|
+
{"version":3,"file":"settings.js","sourceRoot":"","sources":["../../src/resources/settings.ts"],"names":[],"mappings":"AAUA,MAAM,UAAU,sBAAsB,CAAC,GAAY;IAC/C,OAAO;QACH,GAAG;YACC,OAAO,GAAG,CAAC,GAAG,CAAe,WAAW,CAAC,CAAC;QAC9C,CAAC;QAED,MAAM,CAAC,KAwBN;YACG,OAAO,GAAG,CAAC,KAAK,CAAe,WAAW,EAAE,KAAK,CAAC,CAAC;QACvD,CAAC;QAED,eAAe;YACX,OAAO,GAAG,CAAC,GAAG,CACV,yBAAyB,EACzB,EAAE,KAAK,EAAE,UAAU,EAAE,CACxB,CAAC;QACN,CAAC;QAED,gFAAgF;QAChF,iBAAiB,CAAC,QAAqB,EAAE,OAA0C;YAC/E,OAAO,GAAG,CAAC,IAAI,CACX,yBAAyB,EACzB,EAAE,QAAQ,EAAE,GAAG,OAAO,EAAE,CAC3B,CAAC;QACN,CAAC;QAED,+DAA+D;QAC/D,iBAAiB,CAAC,MAAc;YAC5B,OAAO,GAAG,CAAC,MAAM,CACb,yBAAyB,EACzB,EAAE,IAAI,EAAE,EAAE,MAAM,EAAE,EAAE,CACvB,CAAC;QACN,CAAC;QAED,mBAAmB,CAAC,OAGnB;YACG,OAAO,GAAG,CAAC,GAAG,CAAkB,8BAA8B,EAAE;gBAC5D,KAAK,EAAE,OAAO;aACjB,CAAC,CAAC;QACP,CAAC;QAED,mBAAmB;YACf,OAAO,GAAG,CAAC,GAAG,CAAmB,8BAA8B,CAAC,CAAC;QACrE,CAAC;QAED,gBAAgB;YACZ,OAAO,GAAG,CAAC,GAAG,CAAuB,0BAA0B,CAAC,CAAC;QACrE,CAAC;QAED,gBAAgB;YACZ,OAAO,GAAG,CAAC,MAAM,CAAoB,kBAAkB,CAAC,CAAC;QAC7D,CAAC;QAED,sBAAsB,CAAC,KAItB;YACG,OAAO,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8B,EAC9B,KAAK,CACR,CAAC;QACN,CAAC;KACJ,CAAC;AACN,CAAC"}
|
|
@@ -1,5 +1,13 @@
|
|
|
1
|
-
import type { AdminSystemHealth, AdminSystemStatus, ApiLike, CountryFlagSettings, StageHoverSettings, TeamDirectory, NotificationCenterClearResponse, NotificationCenterStatus, RoomGlobalLimits, RoomGlobalLimitsUpdateInput, SystemHealth, SystemPublicStats, SystemStatus } from "../types.js";
|
|
1
|
+
import type { AdminSystemHealth, AdminSystemStatus, ApiLike, CountryFlagSettings, StageHoverSettings, TeamDirectory, NotificationCenterClearResponse, NotificationCenterStatus, RoomGlobalLimits, RoomGlobalLimitsUpdateInput, RoomSystemAlert, SystemAlertInput, SystemAlertResponse, SystemHealth, SystemPublicStats, SystemStatus, UserSystemAlert } from "../types.js";
|
|
2
2
|
export declare function createSystemResource(api: ApiLike): {
|
|
3
|
+
/** Requires an admin session. Delivery defaults to room chat. */
|
|
4
|
+
createGlobalAlert(input: SystemAlertInput): Promise<import("../types.js").ApiSuccessResponse<SystemAlertResponse<import("../types.js").SystemAlert>>>;
|
|
5
|
+
/** Requires an admin session. Delivery defaults to room chat. */
|
|
6
|
+
createRoomAlert(roomId: string, input: SystemAlertInput): Promise<import("../types.js").ApiSuccessResponse<SystemAlertResponse<RoomSystemAlert>>>;
|
|
7
|
+
/** Requires an admin session. Defaults to popup; chat requires a roomId. */
|
|
8
|
+
createUserAlert(userId: string, input: SystemAlertInput & {
|
|
9
|
+
roomId?: string | null;
|
|
10
|
+
}): Promise<import("../types.js").ApiSuccessResponse<SystemAlertResponse<UserSystemAlert>>>;
|
|
3
11
|
getTeam(): Promise<import("../types.js").ApiSuccessResponse<TeamDirectory>>;
|
|
4
12
|
getCountryFlags(): Promise<import("../types.js").ApiSuccessResponse<CountryFlagSettings>>;
|
|
5
13
|
updateCountryFlags(input: CountryFlagSettings): Promise<import("../types.js").ApiSuccessResponse<CountryFlagSettings>>;
|
package/dist/resources/system.js
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
export function createSystemResource(api) {
|
|
2
2
|
return {
|
|
3
|
+
/** Requires an admin session. Delivery defaults to room chat. */
|
|
4
|
+
createGlobalAlert(input) {
|
|
5
|
+
return api.post("/admin/system-alerts", input);
|
|
6
|
+
},
|
|
7
|
+
/** Requires an admin session. Delivery defaults to room chat. */
|
|
8
|
+
createRoomAlert(roomId, input) {
|
|
9
|
+
return api.post(`/admin/rooms/${encodeURIComponent(roomId)}/system-alerts`, input);
|
|
10
|
+
},
|
|
11
|
+
/** Requires an admin session. Defaults to popup; chat requires a roomId. */
|
|
12
|
+
createUserAlert(userId, input) {
|
|
13
|
+
return api.post(`/admin/users/${encodeURIComponent(userId)}/system-alerts`, input);
|
|
14
|
+
},
|
|
3
15
|
getTeam() {
|
|
4
16
|
return api.get("/team", { authMode: "none" });
|
|
5
17
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"system.js","sourceRoot":"","sources":["../../src/resources/system.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"system.js","sourceRoot":"","sources":["../../src/resources/system.ts"],"names":[],"mappings":"AAoBA,MAAM,UAAU,oBAAoB,CAAC,GAAY;IAC7C,OAAO;QACH,iEAAiE;QACjE,iBAAiB,CAAC,KAAuB;YACrC,OAAO,GAAG,CAAC,IAAI,CAAsB,sBAAsB,EAAE,KAAK,CAAC,CAAC;QACxE,CAAC;QAED,iEAAiE;QACjE,eAAe,CAAC,MAAc,EAAE,KAAuB;YACnD,OAAO,GAAG,CAAC,IAAI,CACX,gBAAgB,kBAAkB,CAAC,MAAM,CAAC,gBAAgB,EAC1D,KAAK,CACR,CAAC;QACN,CAAC;QAED,4EAA4E;QAC5E,eAAe,CAAC,MAAc,EAAE,KAAoD;YAChF,OAAO,GAAG,CAAC,IAAI,CACX,gBAAgB,kBAAkB,CAAC,MAAM,CAAC,gBAAgB,EAC1D,KAAK,CACR,CAAC;QACN,CAAC;QAED,OAAO;YACH,OAAO,GAA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C;QACP,CAAC;QAED,2BAA2B;YACvB,OAAO,GAAG,CAAC,GAAG,CACV,8BAA8B,CACjC,CAAC;QACN,CAAC;QAED,uBAAuB;YACnB,OAAO,GAAG,CAAC,IAAI,CACX,6BAA6B,EAC7B,EAAE,CACL,CAAC;QACN,CAAC;QAED,MAAM;YACF,OAAO,GAAG,CAAC,GAAG,CAAe,GAAG,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE;gBACpD,QAAQ,EAAE,MAAM;aACnB,CAAC,CAAC;QACP,CAAC;KACJ,CAAC;AACN,CAAC"}
|
package/dist/types.d.ts
CHANGED
|
@@ -238,7 +238,16 @@ export interface RoomSummary {
|
|
|
238
238
|
isFeatured?: boolean;
|
|
239
239
|
isFavorited?: boolean;
|
|
240
240
|
verified?: boolean;
|
|
241
|
+
backgroundId?: string | null;
|
|
242
|
+
backgroundUrl?: string | null;
|
|
243
|
+
adminBackgroundUrl?: string | null;
|
|
244
|
+
blockAllLinks?: boolean;
|
|
245
|
+
chatLinksWithoutPermission?: "block" | "review";
|
|
241
246
|
chatMediaPreviewsEnabled?: boolean;
|
|
247
|
+
chatMediaCooldownSeconds?: number;
|
|
248
|
+
currentDjId?: string | null;
|
|
249
|
+
/** Current DJ's public display name, falling back to their username. */
|
|
250
|
+
currentDjUsername?: string | null;
|
|
242
251
|
messageReactionsEnabled?: boolean;
|
|
243
252
|
rolePermissionOverrides?: RoomPermissionOverrideMap;
|
|
244
253
|
ownerUsername?: string | null;
|
|
@@ -251,13 +260,36 @@ export interface RoomSummary {
|
|
|
251
260
|
[key: string]: unknown;
|
|
252
261
|
}
|
|
253
262
|
export type RoomRoleName = "user" | "resident_dj" | "bouncer" | "manager" | "cohost" | "host";
|
|
254
|
-
export type RoomPermission = "send_chat" | "attach_chat_media" | "join_queue" | "bypass_queue_lock" | "vote" | "skip_self" | "skip_others" | "mute_user" | "ban_user" | "kick_user" | "clear_chat" | "manage_queue" | "manage_external_media" | "manage_custom_theme" | "manage_polls" | "create_events" | "manage_emojis" | "manage_links" | "mention_room" | "manage_roles" | "manage_room" | "create_room_bot" | "view_audit_logs" | "delete_room";
|
|
263
|
+
export type RoomPermission = "send_chat" | "attach_chat_media" | "post_chat_links" | "join_queue" | "bypass_queue_lock" | "vote" | "skip_self" | "skip_others" | "mute_user" | "ban_user" | "kick_user" | "clear_chat" | "manage_queue" | "manage_external_media" | "manage_custom_theme" | "manage_polls" | "create_events" | "manage_emojis" | "manage_links" | "mention_room" | "manage_roles" | "manage_room" | "create_room_bot" | "view_audit_logs" | "delete_room";
|
|
255
264
|
export type RoomPermissionOverrideMap = Partial<Record<RoomRoleName, RoomPermission[]>>;
|
|
256
265
|
export interface RoomSettingsUpdateInput {
|
|
257
266
|
roomBannerUrl?: string | null;
|
|
267
|
+
/** Per-user image/GIF cooldown, an integer from 0 to 3600 seconds. */
|
|
268
|
+
chatMediaCooldownSeconds?: number;
|
|
258
269
|
rolePermissionOverrides?: RoomPermissionOverrideMap;
|
|
259
270
|
[key: string]: unknown;
|
|
260
271
|
}
|
|
272
|
+
export interface RoomCustomEmoji {
|
|
273
|
+
id: string;
|
|
274
|
+
shortcode: string;
|
|
275
|
+
imageUrl: string;
|
|
276
|
+
source?: "room" | "favorite";
|
|
277
|
+
roomId?: string | null;
|
|
278
|
+
roomName?: string | null;
|
|
279
|
+
roomLogoUrl?: string | null;
|
|
280
|
+
roomSlug?: string | null;
|
|
281
|
+
roomIsPrivate?: boolean;
|
|
282
|
+
createdById: string;
|
|
283
|
+
createdByUsername: string | null;
|
|
284
|
+
createdAt: string;
|
|
285
|
+
}
|
|
286
|
+
export interface RoomLinkFiltersUpdateInput {
|
|
287
|
+
chatMediaPreviewsEnabled?: boolean;
|
|
288
|
+
blockAllLinks: boolean;
|
|
289
|
+
chatLinksWithoutPermission?: "block" | "review";
|
|
290
|
+
blockedLinkPatterns: string[];
|
|
291
|
+
commandAnnouncement?: Record<string, unknown>;
|
|
292
|
+
}
|
|
261
293
|
export type RoomExternalMediaProvider = "youtube" | "kick" | "google_drive" | "dailymotion" | "direct_mp3" | "direct_mp4" | "direct_m3u" | "direct_m3u8";
|
|
262
294
|
export interface RoomExternalMediaSubtitleTrack {
|
|
263
295
|
label: string;
|
|
@@ -477,7 +509,21 @@ export interface MediaSearchResponse {
|
|
|
477
509
|
previousPageToken: string | null;
|
|
478
510
|
}
|
|
479
511
|
export interface ChatMediaPreviewResponse {
|
|
480
|
-
previewUrl: string;
|
|
512
|
+
previewUrl: string | null;
|
|
513
|
+
}
|
|
514
|
+
/** Pending public chat message held for moderator approval. */
|
|
515
|
+
export interface ChatLinkReview {
|
|
516
|
+
id: string;
|
|
517
|
+
roomId: string;
|
|
518
|
+
userId: string;
|
|
519
|
+
username: string;
|
|
520
|
+
content: string;
|
|
521
|
+
createdAt: string;
|
|
522
|
+
replyTo: {
|
|
523
|
+
id: string;
|
|
524
|
+
username: string;
|
|
525
|
+
content: string;
|
|
526
|
+
} | null;
|
|
481
527
|
}
|
|
482
528
|
export interface ChatImageUploadResponse {
|
|
483
529
|
url: string;
|
|
@@ -532,8 +578,139 @@ export interface ChatMessage {
|
|
|
532
578
|
targetUserIds?: string[];
|
|
533
579
|
/** Structured card supplied by a room bot, when present. */
|
|
534
580
|
embed?: RoomBotChatEmbed | null;
|
|
581
|
+
systemColor?: string | null;
|
|
582
|
+
systemAppearance?: SystemAlertAppearance | null;
|
|
535
583
|
[key: string]: unknown;
|
|
536
584
|
}
|
|
585
|
+
/** Appearance values accepted by the administrative system-alert endpoints. */
|
|
586
|
+
export interface SystemAlertAppearance {
|
|
587
|
+
background?: string;
|
|
588
|
+
border?: string;
|
|
589
|
+
titleColor?: string;
|
|
590
|
+
textColor?: string;
|
|
591
|
+
iconColor?: string;
|
|
592
|
+
iconBackground?: string;
|
|
593
|
+
iconBackgroundEnabled?: boolean;
|
|
594
|
+
/** Defaults to false. Places the icon before the title when enabled. */
|
|
595
|
+
iconBeforeTitle?: boolean;
|
|
596
|
+
icon?: "info" | "brand" | "warning" | "bell" | "gift" | "none";
|
|
597
|
+
iconPosition?: "left" | "top" | "right";
|
|
598
|
+
iconSize?: number;
|
|
599
|
+
width?: number;
|
|
600
|
+
titleSize?: number;
|
|
601
|
+
textSize?: number;
|
|
602
|
+
}
|
|
603
|
+
export interface SystemAlertInput {
|
|
604
|
+
color?: string;
|
|
605
|
+
appearance?: SystemAlertAppearance | null;
|
|
606
|
+
delivery?: "chat" | "popup";
|
|
607
|
+
bilingual?: boolean;
|
|
608
|
+
fallbackLocale?: string | null;
|
|
609
|
+
title?: string | null;
|
|
610
|
+
message?: string | null;
|
|
611
|
+
titlePtBr?: string | null;
|
|
612
|
+
messagePtBr?: string | null;
|
|
613
|
+
titleEnUs?: string | null;
|
|
614
|
+
messageEnUs?: string | null;
|
|
615
|
+
}
|
|
616
|
+
/** Text returned by HTTP; appearance, color and delivery are realtime fields. */
|
|
617
|
+
export interface SystemAlert {
|
|
618
|
+
bilingual: boolean;
|
|
619
|
+
title: string;
|
|
620
|
+
message: string;
|
|
621
|
+
titlePtBr: string | null;
|
|
622
|
+
messagePtBr: string | null;
|
|
623
|
+
titleEnUs: string | null;
|
|
624
|
+
messageEnUs: string | null;
|
|
625
|
+
}
|
|
626
|
+
export interface RoomSystemAlert extends SystemAlert {
|
|
627
|
+
roomId: string;
|
|
628
|
+
}
|
|
629
|
+
export interface UserSystemAlert extends SystemAlert {
|
|
630
|
+
targetUserId: string;
|
|
631
|
+
targetUsername: string;
|
|
632
|
+
targetDisplayUsername: string;
|
|
633
|
+
roomId: string | null;
|
|
634
|
+
roomName: string | null;
|
|
635
|
+
}
|
|
636
|
+
export interface SystemAlertResponse<TAlert extends SystemAlert = SystemAlert> {
|
|
637
|
+
success: true;
|
|
638
|
+
alert: TAlert;
|
|
639
|
+
}
|
|
640
|
+
export interface PrivateMessageCustomEmoji {
|
|
641
|
+
id: string;
|
|
642
|
+
shortcode: string;
|
|
643
|
+
imageUrl: string;
|
|
644
|
+
source?: "room" | "favorite";
|
|
645
|
+
roomId?: string | null;
|
|
646
|
+
roomName?: string | null;
|
|
647
|
+
roomLogoUrl?: string | null;
|
|
648
|
+
roomSlug?: string | null;
|
|
649
|
+
roomIsPrivate?: boolean;
|
|
650
|
+
createdById?: string | null;
|
|
651
|
+
createdByUsername?: string | null;
|
|
652
|
+
createdAt?: string | null;
|
|
653
|
+
}
|
|
654
|
+
export interface PrivateMessageUser {
|
|
655
|
+
id: string;
|
|
656
|
+
username: string;
|
|
657
|
+
displayUsername: string;
|
|
658
|
+
avatar: string | null;
|
|
659
|
+
platformRole: string;
|
|
660
|
+
platformRoles: string[];
|
|
661
|
+
presenceStatus: "online" | "busy" | "away" | "offline";
|
|
662
|
+
}
|
|
663
|
+
export interface PrivateMessageReply {
|
|
664
|
+
id: string;
|
|
665
|
+
userId: string;
|
|
666
|
+
username: string;
|
|
667
|
+
content: string;
|
|
668
|
+
customEmojis: PrivateMessageCustomEmoji[];
|
|
669
|
+
deleted: boolean;
|
|
670
|
+
}
|
|
671
|
+
export interface PrivateMessage {
|
|
672
|
+
id: string;
|
|
673
|
+
conversationId: string;
|
|
674
|
+
senderUserId: string;
|
|
675
|
+
recipientUserId: string;
|
|
676
|
+
content: string;
|
|
677
|
+
customEmojis: PrivateMessageCustomEmoji[];
|
|
678
|
+
createdAt: string;
|
|
679
|
+
editedAt: string | null;
|
|
680
|
+
originalContent: string | null;
|
|
681
|
+
readAt: string | null;
|
|
682
|
+
replyTo: PrivateMessageReply | null;
|
|
683
|
+
reactions: Array<{
|
|
684
|
+
emoji: string;
|
|
685
|
+
count: number;
|
|
686
|
+
userIds: string[];
|
|
687
|
+
customEmoji?: PrivateMessageCustomEmoji | null;
|
|
688
|
+
}>;
|
|
689
|
+
}
|
|
690
|
+
export interface PrivateConversation {
|
|
691
|
+
id: string;
|
|
692
|
+
participantAId: string;
|
|
693
|
+
participantBId: string;
|
|
694
|
+
createdAt: string;
|
|
695
|
+
updatedAt: string;
|
|
696
|
+
participants: PrivateMessageUser[];
|
|
697
|
+
lastMessage: PrivateMessage | null;
|
|
698
|
+
unreadCount: number;
|
|
699
|
+
}
|
|
700
|
+
export interface PrivateMessageSendInput {
|
|
701
|
+
content: string;
|
|
702
|
+
/** Optional UUID v4. Reuse the same ID and content when retrying a send. */
|
|
703
|
+
clientMessageId?: string;
|
|
704
|
+
roomId?: string | null;
|
|
705
|
+
customEmojiIds?: string[];
|
|
706
|
+
replyTo?: {
|
|
707
|
+
id?: string | null;
|
|
708
|
+
} | null;
|
|
709
|
+
}
|
|
710
|
+
export interface PrivateMessageSendResponse {
|
|
711
|
+
conversation: PrivateConversation;
|
|
712
|
+
message: PrivateMessage;
|
|
713
|
+
}
|
|
537
714
|
export interface WalletBalance {
|
|
538
715
|
coins: number;
|
|
539
716
|
diamonds: number;
|
|
@@ -703,8 +880,19 @@ export interface RoomBotState {
|
|
|
703
880
|
roomRole?: string | null;
|
|
704
881
|
[key: string]: unknown;
|
|
705
882
|
} | null;
|
|
706
|
-
snapshot:
|
|
707
|
-
customEmojis:
|
|
883
|
+
snapshot: RoomStateSnapshot;
|
|
884
|
+
customEmojis: RoomCustomEmoji[];
|
|
885
|
+
}
|
|
886
|
+
/** Extensible room snapshot returned by bot state and room realtime events. */
|
|
887
|
+
export interface RoomStateSnapshot extends Record<string, unknown> {
|
|
888
|
+
roomId?: string;
|
|
889
|
+
backgroundId?: string | null;
|
|
890
|
+
backgroundUrl?: string | null;
|
|
891
|
+
adminBackgroundUrl?: string | null;
|
|
892
|
+
blockAllLinks?: boolean;
|
|
893
|
+
chatLinksWithoutPermission?: "block" | "review";
|
|
894
|
+
chatMediaPreviewsEnabled?: boolean;
|
|
895
|
+
chatMediaCooldownSeconds?: number;
|
|
708
896
|
}
|
|
709
897
|
export type RoomPresenceEventType = "user_joined" | "left" | "waitlist_join";
|
|
710
898
|
export type RoomPresenceEventFilterType = RoomPresenceEventType | "user_left" | "queue_joined";
|
|
@@ -823,6 +1011,7 @@ export interface SystemStatus {
|
|
|
823
1011
|
miscShopEnabled?: boolean;
|
|
824
1012
|
spotifyEnabled: boolean;
|
|
825
1013
|
soundcloudEnabled: boolean;
|
|
1014
|
+
youtubePlayerV2BetaEnabled?: boolean;
|
|
826
1015
|
globalDonationGoal: SystemDonationGoal | null;
|
|
827
1016
|
canBypass?: boolean;
|
|
828
1017
|
[key: string]: unknown;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wavezfm/api",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.15",
|
|
4
4
|
"description": "Official JavaScript/TypeScript API client for WavezFM.",
|
|
5
5
|
"homepage": "https://docs.wavez.fm/docs",
|
|
6
6
|
"repository": {
|
|
@@ -65,6 +65,10 @@
|
|
|
65
65
|
"types": "./dist/resources/chat.d.ts",
|
|
66
66
|
"import": "./dist/resources/chat.js"
|
|
67
67
|
},
|
|
68
|
+
"./resources/private-messages": {
|
|
69
|
+
"types": "./dist/resources/privateMessages.d.ts",
|
|
70
|
+
"import": "./dist/resources/privateMessages.js"
|
|
71
|
+
},
|
|
68
72
|
"./resources/friend": {
|
|
69
73
|
"types": "./dist/resources/friend.d.ts",
|
|
70
74
|
"import": "./dist/resources/friend.js"
|