@wavezfm/api 0.1.9 → 0.2.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/CHANGELOG.md +22 -0
- package/README.md +31 -9
- package/dist/index.d.ts +216 -30
- package/dist/index.js.map +1 -1
- package/dist/realtime/roomBot.js +39 -0
- package/dist/realtime/roomBot.js.map +1 -1
- package/dist/resources/billing.d.ts +80 -1
- package/dist/resources/billing.js +32 -0
- package/dist/resources/billing.js.map +1 -1
- package/dist/resources/chat.d.ts +3 -1
- package/dist/resources/chat.js +19 -0
- package/dist/resources/chat.js.map +1 -1
- package/dist/resources/friend.d.ts +1 -12
- package/dist/resources/friend.js +3 -18
- package/dist/resources/friend.js.map +1 -1
- package/dist/resources/playlist.d.ts +33 -8
- package/dist/resources/playlist.js +29 -3
- package/dist/resources/playlist.js.map +1 -1
- package/dist/resources/room.d.ts +32 -3
- package/dist/resources/room.js +53 -6
- package/dist/resources/room.js.map +1 -1
- package/dist/resources/roomBot.d.ts +6 -1
- package/dist/resources/roomBot.js +7 -2
- package/dist/resources/roomBot.js.map +1 -1
- package/dist/resources/settings.d.ts +52 -2
- package/dist/resources/settings.js +32 -0
- package/dist/resources/settings.js.map +1 -1
- package/dist/resources/shop.d.ts +5 -0
- package/dist/resources/shop.js +3 -0
- package/dist/resources/shop.js.map +1 -1
- package/dist/resources/source.d.ts +6 -6
- package/dist/resources/source.js +6 -3
- package/dist/resources/source.js.map +1 -1
- package/dist/resources/system.d.ts +3 -1
- package/dist/resources/system.js +6 -0
- package/dist/resources/system.js.map +1 -1
- package/dist/types.d.ts +197 -3
- package/package.json +3 -2
package/dist/types.d.ts
CHANGED
|
@@ -65,6 +65,8 @@ export interface AuthUser {
|
|
|
65
65
|
displayName?: string | null;
|
|
66
66
|
name?: string | null;
|
|
67
67
|
bio?: string | null;
|
|
68
|
+
country?: string | null;
|
|
69
|
+
countryCode?: string | null;
|
|
68
70
|
image?: string | null;
|
|
69
71
|
avatar?: string | null;
|
|
70
72
|
avatarId?: string | null;
|
|
@@ -84,12 +86,22 @@ export interface AuthUser {
|
|
|
84
86
|
colorTheme?: string | null;
|
|
85
87
|
timeFormat?: "12h" | "24h" | string | null;
|
|
86
88
|
notifyChatMentions?: boolean;
|
|
89
|
+
notifyFanToasts?: boolean;
|
|
87
90
|
playMentionSound?: boolean;
|
|
91
|
+
playWhisperSound?: boolean;
|
|
88
92
|
lastFmScrobblingEnabled?: boolean;
|
|
89
93
|
presenceStatus?: string | null;
|
|
90
94
|
selectedBadgeIds?: string[];
|
|
91
95
|
selectedBadges?: BadgeAssignment[];
|
|
92
96
|
showChatBadge?: boolean;
|
|
97
|
+
showFanRelationsOnProfile?: boolean;
|
|
98
|
+
showSuperfansOnProfile?: boolean;
|
|
99
|
+
showOnlineRoomOnProfile?: boolean;
|
|
100
|
+
showLastSeenOnProfile?: boolean;
|
|
101
|
+
blockUnknownWhispers?: boolean;
|
|
102
|
+
autoOpenIncomingWhispers?: boolean;
|
|
103
|
+
sfwMode?: boolean;
|
|
104
|
+
sfwModeAudioEnabled?: boolean;
|
|
93
105
|
subscriptionStatus?: string | null;
|
|
94
106
|
subscriptionCycle?: string | null;
|
|
95
107
|
subscriptionCurrentPeriodStartAt?: string | null;
|
|
@@ -130,6 +142,51 @@ export interface RoomSummary {
|
|
|
130
142
|
} | null;
|
|
131
143
|
[key: string]: unknown;
|
|
132
144
|
}
|
|
145
|
+
export type RoomExternalMediaProvider = "youtube" | "kick" | "google_drive" | "dailymotion" | "direct_mp3" | "direct_mp4" | "direct_m3u" | "direct_m3u8";
|
|
146
|
+
export interface RoomExternalMediaSubtitleTrack {
|
|
147
|
+
label: string;
|
|
148
|
+
language: string;
|
|
149
|
+
url: string;
|
|
150
|
+
filename: string;
|
|
151
|
+
sourceFormat: "srt" | "vtt";
|
|
152
|
+
default?: boolean;
|
|
153
|
+
}
|
|
154
|
+
export interface RoomExternalMediaMetadataResponse {
|
|
155
|
+
success: true;
|
|
156
|
+
data: {
|
|
157
|
+
canonicalUrl: string;
|
|
158
|
+
title: string | null;
|
|
159
|
+
durationMs: number | null;
|
|
160
|
+
subtitles: RoomExternalMediaSubtitleTrack[];
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
export interface RoomExternalMediaValidationResponse {
|
|
164
|
+
success: true;
|
|
165
|
+
data: {
|
|
166
|
+
canonicalUrl: string;
|
|
167
|
+
provider: RoomExternalMediaProvider;
|
|
168
|
+
available: boolean;
|
|
169
|
+
code: string | null;
|
|
170
|
+
live: boolean;
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
export interface RoomPlaybackHistoryEntry {
|
|
174
|
+
id: string;
|
|
175
|
+
trackId: string;
|
|
176
|
+
title: string;
|
|
177
|
+
artist: string;
|
|
178
|
+
djId: string;
|
|
179
|
+
djUsername: string;
|
|
180
|
+
djDisplayUsername: string | null;
|
|
181
|
+
source: "youtube" | "soundcloud";
|
|
182
|
+
sourceId: string;
|
|
183
|
+
thumbnailUrl: string | null;
|
|
184
|
+
durationMs: number;
|
|
185
|
+
woots: number;
|
|
186
|
+
grabs: number;
|
|
187
|
+
mehs: number;
|
|
188
|
+
playedAt: string;
|
|
189
|
+
}
|
|
133
190
|
export interface RoomQueueUser {
|
|
134
191
|
internalId: string;
|
|
135
192
|
publicId?: number | null;
|
|
@@ -216,16 +273,109 @@ export interface PlaylistTrack {
|
|
|
216
273
|
artist?: string;
|
|
217
274
|
durationMs?: number;
|
|
218
275
|
thumbnailUrl?: string | null;
|
|
276
|
+
position?: number;
|
|
277
|
+
isLive?: boolean;
|
|
278
|
+
clipStartMs?: number | null;
|
|
279
|
+
clipEndMs?: number | null;
|
|
219
280
|
[key: string]: unknown;
|
|
220
281
|
}
|
|
282
|
+
export interface PlaylistTrackSearchResult {
|
|
283
|
+
playlist: PlaylistSummary;
|
|
284
|
+
track: PlaylistTrack;
|
|
285
|
+
}
|
|
286
|
+
export interface PlaylistTrackAvailabilityInput {
|
|
287
|
+
source: string;
|
|
288
|
+
sourceId: string;
|
|
289
|
+
}
|
|
290
|
+
export interface PlaylistTrackAvailabilityResult {
|
|
291
|
+
source: "youtube" | "soundcloud";
|
|
292
|
+
sourceId: string;
|
|
293
|
+
status: "available" | "unavailable" | "unknown";
|
|
294
|
+
reason: string | null;
|
|
295
|
+
}
|
|
296
|
+
export interface PlaylistJsonTrack {
|
|
297
|
+
source: "youtube" | "soundcloud";
|
|
298
|
+
sourceId: string;
|
|
299
|
+
title: string;
|
|
300
|
+
artist: string;
|
|
301
|
+
durationMs: number;
|
|
302
|
+
thumbnailUrl: string | null;
|
|
303
|
+
isLive: boolean;
|
|
304
|
+
clipStartMs?: number | null;
|
|
305
|
+
clipEndMs?: number | null;
|
|
306
|
+
}
|
|
307
|
+
export interface PlaylistJsonExport {
|
|
308
|
+
schema: "wavezfm.playlist.v1";
|
|
309
|
+
exportedAt: string;
|
|
310
|
+
playlist: {
|
|
311
|
+
name: string;
|
|
312
|
+
trackCount: number;
|
|
313
|
+
};
|
|
314
|
+
tracks: PlaylistJsonTrack[];
|
|
315
|
+
}
|
|
316
|
+
export interface PlaylistJsonImportResult {
|
|
317
|
+
source: "json";
|
|
318
|
+
playlistId: string;
|
|
319
|
+
playlistName: string;
|
|
320
|
+
sourcePlaylistName: string;
|
|
321
|
+
totalTracks: number;
|
|
322
|
+
importedTracks: number;
|
|
323
|
+
duplicateTracks: number;
|
|
324
|
+
failedTracks: number;
|
|
325
|
+
truncated: boolean;
|
|
326
|
+
}
|
|
221
327
|
export interface MediaSearchResult {
|
|
222
328
|
source: string;
|
|
223
329
|
sourceId: string;
|
|
224
330
|
title: string;
|
|
225
331
|
artist?: string;
|
|
332
|
+
durationMs?: number;
|
|
226
333
|
thumbnailUrl?: string | null;
|
|
334
|
+
isLive?: boolean;
|
|
227
335
|
[key: string]: unknown;
|
|
228
336
|
}
|
|
337
|
+
export interface MediaSearchResponse {
|
|
338
|
+
items: MediaSearchResult[];
|
|
339
|
+
nextPageToken: string | null;
|
|
340
|
+
previousPageToken: string | null;
|
|
341
|
+
}
|
|
342
|
+
export interface ChatMediaPreviewResponse {
|
|
343
|
+
previewUrl: string;
|
|
344
|
+
}
|
|
345
|
+
export interface ChatImageUploadResponse {
|
|
346
|
+
url: string;
|
|
347
|
+
expiresAt: string;
|
|
348
|
+
contentType: "image/gif" | "image/jpeg" | "image/png" | "image/webp";
|
|
349
|
+
size: number;
|
|
350
|
+
}
|
|
351
|
+
export interface GifFavorite {
|
|
352
|
+
id: string;
|
|
353
|
+
title: string;
|
|
354
|
+
previewUrl: string;
|
|
355
|
+
gifUrl: string;
|
|
356
|
+
width: number | null;
|
|
357
|
+
height: number | null;
|
|
358
|
+
addedAt: string;
|
|
359
|
+
}
|
|
360
|
+
export interface LastFmAccountProfile {
|
|
361
|
+
username: string;
|
|
362
|
+
displayName: string | null;
|
|
363
|
+
avatarUrl: string | null;
|
|
364
|
+
}
|
|
365
|
+
export type LastFmLinkStatus = {
|
|
366
|
+
status: "idle" | "pending";
|
|
367
|
+
} | {
|
|
368
|
+
status: "linked";
|
|
369
|
+
username: string;
|
|
370
|
+
} | {
|
|
371
|
+
status: "error";
|
|
372
|
+
error: string;
|
|
373
|
+
};
|
|
374
|
+
export interface LastFmWriteResponse {
|
|
375
|
+
success: boolean;
|
|
376
|
+
skipped?: boolean;
|
|
377
|
+
code?: string;
|
|
378
|
+
}
|
|
229
379
|
export interface ChatMessage {
|
|
230
380
|
id: string;
|
|
231
381
|
userId: string;
|
|
@@ -264,10 +414,27 @@ export interface StoreCatalogResponse {
|
|
|
264
414
|
backgroundSections?: StoreCatalogSection[];
|
|
265
415
|
badgeSections?: StoreCatalogSection[];
|
|
266
416
|
videoFrameSections?: StoreCatalogSection[];
|
|
417
|
+
miscItems?: MiscStoreItem[];
|
|
267
418
|
premiumShopEnabled?: boolean;
|
|
268
419
|
badgeShopEnabled?: boolean;
|
|
269
420
|
videoFrameShopEnabled?: boolean;
|
|
270
421
|
backgroundShopEnabled?: boolean;
|
|
422
|
+
miscShopEnabled?: boolean;
|
|
423
|
+
[key: string]: unknown;
|
|
424
|
+
}
|
|
425
|
+
export interface MiscStoreItem {
|
|
426
|
+
id: string;
|
|
427
|
+
kind: "xp_boost" | "display_name_change" | string;
|
|
428
|
+
name: string;
|
|
429
|
+
namePtBr?: string | null;
|
|
430
|
+
nameEnUs?: string | null;
|
|
431
|
+
description?: string;
|
|
432
|
+
descriptionPtBr?: string | null;
|
|
433
|
+
descriptionEnUs?: string | null;
|
|
434
|
+
currency: "coins" | "diamonds" | string;
|
|
435
|
+
price: number;
|
|
436
|
+
xpMultiplierPercent?: number | null;
|
|
437
|
+
durationMinutes?: number | null;
|
|
271
438
|
[key: string]: unknown;
|
|
272
439
|
}
|
|
273
440
|
export interface StoreCatalogSection {
|
|
@@ -428,6 +595,7 @@ export interface SystemStatus {
|
|
|
428
595
|
badgeShopEnabled: boolean;
|
|
429
596
|
videoFrameShopEnabled: boolean;
|
|
430
597
|
backgroundShopEnabled: boolean;
|
|
598
|
+
miscShopEnabled?: boolean;
|
|
431
599
|
spotifyEnabled: boolean;
|
|
432
600
|
soundcloudEnabled: boolean;
|
|
433
601
|
globalDonationGoal: SystemDonationGoal | null;
|
|
@@ -438,19 +606,43 @@ export interface SystemStatus {
|
|
|
438
606
|
[key: string]: unknown;
|
|
439
607
|
}
|
|
440
608
|
export interface CheckoutSessionResponse {
|
|
441
|
-
|
|
609
|
+
uiMode?: "hosted" | "elements" | "mercadopago" | string;
|
|
610
|
+
checkoutUrl: string | null;
|
|
611
|
+
clientSecret?: string | null;
|
|
612
|
+
publishableKey?: string | null;
|
|
442
613
|
[key: string]: unknown;
|
|
443
614
|
}
|
|
615
|
+
export interface NotificationCenterStatus {
|
|
616
|
+
clearedAt: string | null;
|
|
617
|
+
}
|
|
618
|
+
export interface NotificationCenterClearResponse {
|
|
619
|
+
ok: true;
|
|
620
|
+
clearedAt: string;
|
|
621
|
+
}
|
|
444
622
|
export interface UserSettings {
|
|
623
|
+
userId?: string;
|
|
445
624
|
bio?: string | null;
|
|
446
|
-
|
|
625
|
+
country?: string | null;
|
|
626
|
+
countryCode?: string | null;
|
|
627
|
+
colorTheme?: "wavezfm" | "wavezfm-black" | string | null;
|
|
447
628
|
timeFormat?: "12h" | "24h" | string | null;
|
|
448
629
|
notifyChatMentions?: boolean;
|
|
630
|
+
notifyFanToasts?: boolean;
|
|
449
631
|
playMentionSound?: boolean;
|
|
632
|
+
playWhisperSound?: boolean;
|
|
450
633
|
lastFmScrobblingEnabled?: boolean;
|
|
451
|
-
presenceStatus?: "online" | "busy" | "away" | string | null;
|
|
634
|
+
presenceStatus?: "online" | "busy" | "away" | "invisible" | string | null;
|
|
452
635
|
selectedBadgeIds?: string[];
|
|
453
636
|
showChatBadge?: boolean;
|
|
637
|
+
showFanRelationsOnProfile?: boolean;
|
|
638
|
+
showSuperfansOnProfile?: boolean;
|
|
639
|
+
showOnlineRoomOnProfile?: boolean;
|
|
640
|
+
showLastSeenOnProfile?: boolean;
|
|
641
|
+
blockUnknownWhispers?: boolean;
|
|
642
|
+
autoOpenIncomingWhispers?: boolean;
|
|
643
|
+
sfwMode?: boolean;
|
|
644
|
+
sfwModeAudioEnabled?: boolean;
|
|
645
|
+
activeViolationCount?: number;
|
|
454
646
|
[key: string]: unknown;
|
|
455
647
|
}
|
|
456
648
|
export interface TwoFactorStatus {
|
|
@@ -483,6 +675,8 @@ export interface RoomBotRealtimeOptions {
|
|
|
483
675
|
autoReconnect?: boolean;
|
|
484
676
|
reconnectDelayMs?: number;
|
|
485
677
|
reconnectMaxDelayMs?: number;
|
|
678
|
+
heartbeatIntervalMs?: number;
|
|
679
|
+
heartbeatTimeoutMs?: number;
|
|
486
680
|
logging?: boolean;
|
|
487
681
|
protocols?: string | string[];
|
|
488
682
|
locale?: WavezApiLocale;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wavezfm/api",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Official JavaScript/TypeScript API client for WavezFM.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -10,7 +10,8 @@
|
|
|
10
10
|
"types": "./dist/index.d.ts",
|
|
11
11
|
"files": [
|
|
12
12
|
"dist",
|
|
13
|
-
"README.md"
|
|
13
|
+
"README.md",
|
|
14
|
+
"CHANGELOG.md"
|
|
14
15
|
],
|
|
15
16
|
"scripts": {
|
|
16
17
|
"build": "tsc -p tsconfig.json",
|