@wavezfm/api 0.3.0 → 0.5.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 +20 -0
- package/dist/index.d.ts +35 -2
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -1
- package/dist/resources/events.d.ts +8 -0
- package/dist/resources/events.js +24 -0
- package/dist/resources/events.js.map +1 -0
- package/dist/resources/giveaways.d.ts +6 -0
- package/dist/resources/giveaways.js +16 -0
- package/dist/resources/giveaways.js.map +1 -0
- package/dist/resources/playlist.d.ts +6 -0
- package/dist/resources/playlist.js +3 -0
- package/dist/resources/playlist.js.map +1 -1
- package/dist/resources/room.d.ts +2 -2
- package/dist/resources/room.js.map +1 -1
- package/dist/resources/settings.d.ts +3 -0
- package/dist/resources/settings.js.map +1 -1
- package/dist/resources/shop.d.ts +5 -1
- package/dist/resources/shop.js +3 -0
- package/dist/resources/shop.js.map +1 -1
- package/dist/resources/userBlocks.d.ts +6 -0
- package/dist/resources/userBlocks.js +14 -0
- package/dist/resources/userBlocks.js.map +1 -0
- package/dist/types.d.ts +136 -2
- package/package.json +14 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.5.0
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- Typed user-block state, block, and unblock operations through `client.userBlocks`.
|
|
8
|
+
- Typed room and global giveaway listing, entry, and exit operations through `client.giveaways`.
|
|
9
|
+
- Authenticated Extras Shop user state through `client.shop.getMiscUserState()`.
|
|
10
|
+
- Complete Extras Shop item types for dual-wallet pricing, cooldowns, first-change eligibility, room Custom Themes, and External Media access.
|
|
11
|
+
- Typed room roles, permissions, permission overrides, and the `attach_chat_media` permission.
|
|
12
|
+
|
|
13
|
+
## 0.4.0
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
|
|
17
|
+
- Typed room-event listing, submission, review, and approval responses through `client.events`.
|
|
18
|
+
- Playlist track title and artist overrides through `client.playlist.updateTrackMetadata()`.
|
|
19
|
+
- Pronouns, supporter-badge visibility, and country-flag visibility in account settings.
|
|
20
|
+
- Current Extras Shop inputs for username changes, room-bound purchases, and wallet-currency selection.
|
|
21
|
+
- `customTitle` and `customArtist` fields on playlist tracks.
|
|
22
|
+
|
|
3
23
|
## 0.3.0
|
|
4
24
|
|
|
5
25
|
### Added
|
package/dist/index.d.ts
CHANGED
|
@@ -8,14 +8,17 @@ export { createPlaylistResource } from "./resources/playlist.js";
|
|
|
8
8
|
export { createSourceResource } from "./resources/source.js";
|
|
9
9
|
export { createChatResource } from "./resources/chat.js";
|
|
10
10
|
export { createFriendResource } from "./resources/friend.js";
|
|
11
|
+
export { createUserBlocksResource } from "./resources/userBlocks.js";
|
|
12
|
+
export { createGiveawaysResource } from "./resources/giveaways.js";
|
|
11
13
|
export { createShopResource } from "./resources/shop.js";
|
|
12
14
|
export { createBillingResource } from "./resources/billing.js";
|
|
13
15
|
export { createSystemResource } from "./resources/system.js";
|
|
16
|
+
export { createEventsResource } from "./resources/events.js";
|
|
14
17
|
export { createRoomBotResource } from "./resources/roomBot.js";
|
|
15
18
|
export { parseRoomQueueSnapshot } from "./utils/roomQueue.js";
|
|
16
19
|
export { formatMentionText } from "./utils/chat.js";
|
|
17
20
|
export { createRoomBotRealtimeClient } from "./realtime/roomBot.js";
|
|
18
|
-
export type { ApiClientConfig, ApiLike, ApiQuery, ApiQueryValue, ApiRequestOptions, ApiSuccessResponse, AuthMode, AuthUser, BadgeAssignment, ChatImageUploadResponse, ChatMediaPreviewResponse, ChatMessage, CheckoutSessionResponse, GifFavorite, InventoryResponse, InventoryCatalogEntry, InventoryCatalogItem, LastFmAccountProfile, LastFmLinkStatus, LastFmWriteResponse, MediaSearchResponse, MediaSearchResult, NotificationCenterClearResponse, NotificationCenterStatus, PlaylistJsonExport, PlaylistJsonImportResult, PlaylistJsonTrack, PlaylistSummary, PlaylistTrack, PlaylistTrackAvailabilityInput, PlaylistTrackAvailabilityResult, PlaylistTrackSearchResult, RoomBotPermission, RoomExternalMediaMetadataResponse, RoomExternalMediaProvider, RoomExternalMediaSubtitleTrack, RoomExternalMediaValidationResponse, RoomPlaybackHistoryEntry, RoomQueueEntry, RoomQueuePlayback, RoomQueueSnapshot, RoomQueueStatusResponse, RoomQueueUser, RoomQueueViewerStatus, RoomBotEditMessageInput, RoomBotMessageReplyInput, RoomBotEventsResponse, RoomPresenceEventFilterType, RoomBotQueueAddResponse, RoomBotRealtimeClient, RoomBotRealtimeOptions, RoomBotSendMessageInput, RoomBotSendMessageResponse, RoomBotState, RoomBotToken, RoomPresenceEvent, RoomPresenceEventType, RoomSummary, WavezApiLocale, WavezApiMessageKey, WavezApiMessages, WavezApiMessageValues, StoreCatalogResponse, StoreCatalogItem, StoreCatalogSection, MiscStoreItem, SystemDonationGoal, SystemPublicStats, SystemStatus, TwoFactorStatus, UserSettings, UserProfile, WalletBalance, WebSocketLike, WsPacket, } from "./types.js";
|
|
21
|
+
export type { 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, PlaylistJsonExport, PlaylistJsonImportResult, PlaylistJsonTrack, PlaylistSummary, PlaylistTrack, PlaylistTrackAvailabilityInput, PlaylistTrackAvailabilityResult, PlaylistTrackSearchResult, RoomBotPermission, RoomExternalMediaMetadataResponse, RoomExternalMediaProvider, RoomExternalMediaSubtitleTrack, RoomExternalMediaValidationResponse, RoomPlaybackHistoryEntry, RoomPermission, RoomPermissionOverrideMap, RoomQueueEntry, RoomQueuePlayback, RoomQueueSnapshot, RoomQueueStatusResponse, RoomQueueUser, RoomQueueViewerStatus, RoomRoleName, RoomSettingsUpdateInput, RoomBotEditMessageInput, RoomBotMessageReplyInput, RoomBotEventsResponse, RoomPresenceEventFilterType, RoomBotQueueAddResponse, RoomBotRealtimeClient, RoomBotRealtimeOptions, RoomBotSendMessageInput, RoomBotSendMessageResponse, RoomBotState, RoomBotToken, RoomPresenceEvent, RoomPresenceEventType, RoomSummary, RoomEvent, RoomEventApprovalStatus, RoomEventListResponse, RoomEventMutationResponse, RoomEventScope, RoomEventStatus, RoomEventSubmissionInput, WavezApiLocale, WavezApiMessageKey, WavezApiMessages, WavezApiMessageValues, StoreCatalogResponse, StoreCatalogItem, StoreCatalogSection, MiscStoreItem, SystemDonationGoal, SystemPublicStats, SystemStatus, TwoFactorStatus, UserSettings, UserProfile, UserBlockState, WalletBalance, WebSocketLike, WsPacket, } from "./types.js";
|
|
19
22
|
import type { ApiClientConfig } from "./types.js";
|
|
20
23
|
export declare function createApiClient(config: ApiClientConfig): {
|
|
21
24
|
api: import("./core/api.js").WavezApi;
|
|
@@ -57,6 +60,7 @@ export declare function createApiClient(config: ApiClientConfig): {
|
|
|
57
60
|
get(): Promise<import("./types.js").ApiSuccessResponse<import("./types.js").UserSettings>>;
|
|
58
61
|
update(input: {
|
|
59
62
|
bio?: string;
|
|
63
|
+
pronouns?: string;
|
|
60
64
|
countryCode?: string;
|
|
61
65
|
colorTheme?: "wavezfm" | "wavezfm-black";
|
|
62
66
|
timeFormat?: "12h" | "24h";
|
|
@@ -68,9 +72,11 @@ export declare function createApiClient(config: ApiClientConfig): {
|
|
|
68
72
|
presenceStatus?: "online" | "busy" | "away" | "invisible";
|
|
69
73
|
selectedBadgeIds?: string[];
|
|
70
74
|
showChatBadge?: boolean;
|
|
75
|
+
showSupporterBadges?: boolean;
|
|
71
76
|
showFanRelationsOnProfile?: boolean;
|
|
72
77
|
showSuperfansOnProfile?: boolean;
|
|
73
78
|
showOnlineRoomOnProfile?: boolean;
|
|
79
|
+
showCountryFlag?: boolean;
|
|
74
80
|
showLastSeenOnProfile?: boolean;
|
|
75
81
|
blockUnknownWhispers?: boolean;
|
|
76
82
|
autoOpenIncomingWhispers?: boolean;
|
|
@@ -213,7 +219,7 @@ export declare function createApiClient(config: ApiClientConfig): {
|
|
|
213
219
|
logs: unknown[];
|
|
214
220
|
}>>;
|
|
215
221
|
clearAuditLogs(roomId: string): Promise<import("./types.js").ApiSuccessResponse<Record<string, unknown>>>;
|
|
216
|
-
updateSettings(roomId: string, input:
|
|
222
|
+
updateSettings(roomId: string, input: import("./types.js").RoomSettingsUpdateInput): Promise<import("./types.js").ApiSuccessResponse<{
|
|
217
223
|
room: Record<string, unknown>;
|
|
218
224
|
}>>;
|
|
219
225
|
updateLinkFilters(roomId: string, input: {
|
|
@@ -299,6 +305,12 @@ export declare function createApiClient(config: ApiClientConfig): {
|
|
|
299
305
|
}): Promise<import("./types.js").ApiSuccessResponse<{
|
|
300
306
|
track: import("./types.js").PlaylistTrack;
|
|
301
307
|
}>>;
|
|
308
|
+
updateTrackMetadata(playlistId: string, trackId: string, input: {
|
|
309
|
+
title?: string | null;
|
|
310
|
+
artist?: string | null;
|
|
311
|
+
}): Promise<import("./types.js").ApiSuccessResponse<{
|
|
312
|
+
track: import("./types.js").PlaylistTrack;
|
|
313
|
+
}>>;
|
|
302
314
|
removeTrack(playlistId: string, trackId: string): Promise<import("./types.js").ApiSuccessResponse<{
|
|
303
315
|
success: true;
|
|
304
316
|
}>>;
|
|
@@ -375,9 +387,20 @@ export declare function createApiClient(config: ApiClientConfig): {
|
|
|
375
387
|
following(): Promise<import("./types.js").ApiSuccessResponse<import("./types.js").UserProfile[]>>;
|
|
376
388
|
superfans(): Promise<import("./types.js").ApiSuccessResponse<import("./types.js").UserProfile[]>>;
|
|
377
389
|
};
|
|
390
|
+
userBlocks: {
|
|
391
|
+
getState(userId: string): Promise<import("./types.js").ApiSuccessResponse<import("./types.js").UserBlockState>>;
|
|
392
|
+
block(userId: string): Promise<import("./types.js").ApiSuccessResponse<import("./types.js").UserBlockState>>;
|
|
393
|
+
unblock(userId: string): Promise<import("./types.js").ApiSuccessResponse<import("./types.js").UserBlockState>>;
|
|
394
|
+
};
|
|
395
|
+
giveaways: {
|
|
396
|
+
list(roomId?: string | null): Promise<import("./types.js").ApiSuccessResponse<import("./types.js").GiveawayListResponse>>;
|
|
397
|
+
join(giveawayId: string): Promise<import("./types.js").ApiSuccessResponse<import("./types.js").GiveawayMutationResponse>>;
|
|
398
|
+
leave(giveawayId: string): Promise<import("./types.js").ApiSuccessResponse<import("./types.js").GiveawayMutationResponse>>;
|
|
399
|
+
};
|
|
378
400
|
shop: {
|
|
379
401
|
getCatalog(): Promise<import("./types.js").ApiSuccessResponse<import("./types.js").StoreCatalogResponse>>;
|
|
380
402
|
getWallet(): Promise<import("./types.js").ApiSuccessResponse<import("./types.js").WalletBalance>>;
|
|
403
|
+
getMiscUserState(): Promise<import("./types.js").ApiSuccessResponse<import("./types.js").MiscShopUserState>>;
|
|
381
404
|
purchase(input: {
|
|
382
405
|
itemId: string;
|
|
383
406
|
idempotencyKey?: string;
|
|
@@ -385,7 +408,10 @@ export declare function createApiClient(config: ApiClientConfig): {
|
|
|
385
408
|
purchaseMisc(input: {
|
|
386
409
|
itemId: string;
|
|
387
410
|
idempotencyKey?: string;
|
|
411
|
+
username?: string | null;
|
|
388
412
|
displayUsername?: string | null;
|
|
413
|
+
roomSlug?: string | null;
|
|
414
|
+
walletCurrency?: "coins" | "diamonds" | null;
|
|
389
415
|
}): Promise<import("./types.js").ApiSuccessResponse<Record<string, unknown>>>;
|
|
390
416
|
equip(itemId: string): Promise<import("./types.js").ApiSuccessResponse<Record<string, unknown>>>;
|
|
391
417
|
getInventory(): Promise<import("./types.js").ApiSuccessResponse<import("./types.js").InventoryResponse>>;
|
|
@@ -520,6 +546,13 @@ export declare function createApiClient(config: ApiClientConfig): {
|
|
|
520
546
|
clearNotificationCenter(): Promise<import("./types.js").ApiSuccessResponse<import("./types.js").NotificationCenterClearResponse>>;
|
|
521
547
|
health(): Promise<import("./types.js").ApiSuccessResponse<Record<string, unknown>>>;
|
|
522
548
|
};
|
|
549
|
+
events: {
|
|
550
|
+
list(roomId?: string | null): Promise<import("./types.js").ApiSuccessResponse<import("./types.js").RoomEventListResponse>>;
|
|
551
|
+
listSubmissions(roomId: string): Promise<import("./types.js").ApiSuccessResponse<import("./types.js").RoomEventListResponse>>;
|
|
552
|
+
submit(roomId: string, input: import("./types.js").RoomEventSubmissionInput): Promise<import("./types.js").ApiSuccessResponse<import("./types.js").RoomEventMutationResponse>>;
|
|
553
|
+
listPendingReview(roomId?: string | null): Promise<import("./types.js").ApiSuccessResponse<import("./types.js").RoomEventListResponse>>;
|
|
554
|
+
review(eventId: string, decision: "approved" | "rejected"): Promise<import("./types.js").ApiSuccessResponse<import("./types.js").RoomEventMutationResponse>>;
|
|
555
|
+
};
|
|
523
556
|
roomBot: {
|
|
524
557
|
getState(roomId: string): Promise<import("./types.js").ApiSuccessResponse<import("./types.js").RoomBotState>>;
|
|
525
558
|
getQueueStatus(roomId: string, options?: {
|
package/dist/index.js
CHANGED
|
@@ -8,9 +8,12 @@ export { createPlaylistResource } from "./resources/playlist.js";
|
|
|
8
8
|
export { createSourceResource } from "./resources/source.js";
|
|
9
9
|
export { createChatResource } from "./resources/chat.js";
|
|
10
10
|
export { createFriendResource } from "./resources/friend.js";
|
|
11
|
+
export { createUserBlocksResource } from "./resources/userBlocks.js";
|
|
12
|
+
export { createGiveawaysResource } from "./resources/giveaways.js";
|
|
11
13
|
export { createShopResource } from "./resources/shop.js";
|
|
12
14
|
export { createBillingResource } from "./resources/billing.js";
|
|
13
15
|
export { createSystemResource } from "./resources/system.js";
|
|
16
|
+
export { createEventsResource } from "./resources/events.js";
|
|
14
17
|
export { createRoomBotResource } from "./resources/roomBot.js";
|
|
15
18
|
export { parseRoomQueueSnapshot } from "./utils/roomQueue.js";
|
|
16
19
|
export { formatMentionText } from "./utils/chat.js";
|
|
@@ -24,9 +27,12 @@ import { createPlaylistResource } from "./resources/playlist.js";
|
|
|
24
27
|
import { createSourceResource } from "./resources/source.js";
|
|
25
28
|
import { createChatResource } from "./resources/chat.js";
|
|
26
29
|
import { createFriendResource } from "./resources/friend.js";
|
|
30
|
+
import { createUserBlocksResource } from "./resources/userBlocks.js";
|
|
31
|
+
import { createGiveawaysResource } from "./resources/giveaways.js";
|
|
27
32
|
import { createShopResource } from "./resources/shop.js";
|
|
28
33
|
import { createBillingResource } from "./resources/billing.js";
|
|
29
34
|
import { createSystemResource } from "./resources/system.js";
|
|
35
|
+
import { createEventsResource } from "./resources/events.js";
|
|
30
36
|
import { createRoomBotResource } from "./resources/roomBot.js";
|
|
31
37
|
export function createApiClient(config) {
|
|
32
38
|
const api = createApi(config);
|
|
@@ -40,9 +46,12 @@ export function createApiClient(config) {
|
|
|
40
46
|
source: createSourceResource(api),
|
|
41
47
|
chat: createChatResource(api),
|
|
42
48
|
friend: createFriendResource(api),
|
|
49
|
+
userBlocks: createUserBlocksResource(api),
|
|
50
|
+
giveaways: createGiveawaysResource(api),
|
|
43
51
|
shop: createShopResource(api),
|
|
44
52
|
billing: createBillingResource(api),
|
|
45
53
|
system: createSystemResource(api),
|
|
54
|
+
events: createEventsResource(api),
|
|
46
55
|
roomBot: createRoomBotResource(api),
|
|
47
56
|
};
|
|
48
57
|
}
|
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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oomEventMutationResponse, RoomEventSubmissionInput } from "../types.js";
|
|
2
|
+
export declare function createEventsResource(api: ApiLike): {
|
|
3
|
+
list(roomId?: string | null): Promise<import("../types.js").ApiSuccessResponse<RoomEventListResponse>>;
|
|
4
|
+
listSubmissions(roomId: string): Promise<import("../types.js").ApiSuccessResponse<RoomEventListResponse>>;
|
|
5
|
+
submit(roomId: string, input: RoomEventSubmissionInput): Promise<import("../types.js").ApiSuccessResponse<RoomEventMutationResponse>>;
|
|
6
|
+
listPendingReview(roomId?: string | null): Promise<import("../types.js").ApiSuccessResponse<RoomEventListResponse>>;
|
|
7
|
+
review(eventId: string, decision: "approved" | "rejected"): Promise<import("../types.js").ApiSuccessResponse<RoomEventMutationResponse>>;
|
|
8
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export function createEventsResource(api) {
|
|
2
|
+
return {
|
|
3
|
+
list(roomId) {
|
|
4
|
+
return api.get("/events", {
|
|
5
|
+
query: { roomId: roomId ?? undefined },
|
|
6
|
+
});
|
|
7
|
+
},
|
|
8
|
+
listSubmissions(roomId) {
|
|
9
|
+
return api.get(`/events/submissions/${encodeURIComponent(roomId)}`);
|
|
10
|
+
},
|
|
11
|
+
submit(roomId, input) {
|
|
12
|
+
return api.post(`/events/submissions/${encodeURIComponent(roomId)}`, input);
|
|
13
|
+
},
|
|
14
|
+
listPendingReview(roomId) {
|
|
15
|
+
return api.get("/events/review", {
|
|
16
|
+
query: { roomId: roomId ?? undefined },
|
|
17
|
+
});
|
|
18
|
+
},
|
|
19
|
+
review(eventId, decision) {
|
|
20
|
+
return api.post(`/events/review/${encodeURIComponent(eventId)}`, { decision });
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=events.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"events.js","sourceRoot":"","sources":["../../src/resources/events.ts"],"names":[],"mappings":"AAOA,MAAM,UAAU,oBAAoB,CAAC,GAAY;IAC7C,OAAO;QACH,IAAI,CAAC,MAAsB;YACvB,OAAO,GAAG,CAAC,GAAG,CAAwB,SAAS,EAAE;gBAC7C,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,IAAI,SAAS,EAAE;aACzC,CAAC,CAAC;QACP,CAAC;QAED,eAAe,CAAC,MAAc;YAC1B,OAAO,GAAG,CAAC,GAAG,CACV,uBAAuB,kBAAkB,CAAC,MAAM,CAAC,EAAE,CACtD,CAAC;QACN,CAAC;QAED,MAAM,CAAC,MAAc,EAAE,KAA+B;YAClD,OAAO,GAAG,CAAC,IAAI,CACX,uBAAuB,kBAAkB,CAAC,MAAM,CAAC,EAAE,EACnD,KAAK,CACR,CAAC;QACN,CAAC;QAED,iBAAiB,CAAC,MAAsB;YACpC,OAAO,GAAG,CAAC,GAAG,CAAwB,gBAAgB,EAAE;gBACpD,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,IAAI,SAAS,EAAE;aACzC,CAAC,CAAC;QACP,CAAC;QAED,MAAM,CAAC,OAAe,EAAE,QAAiC;YACrD,OAAO,GAAG,CAAC,IAAI,CACX,kBAAkB,kBAAkB,CAAC,OAAO,CAAC,EAAE,EAC/C,EAAE,QAAQ,EAAE,CACf,CAAC;QACN,CAAC;KACJ,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ApiLike, GiveawayListResponse, GiveawayMutationResponse } from "../types.js";
|
|
2
|
+
export declare function createGiveawaysResource(api: ApiLike): {
|
|
3
|
+
list(roomId?: string | null): Promise<import("../types.js").ApiSuccessResponse<GiveawayListResponse>>;
|
|
4
|
+
join(giveawayId: string): Promise<import("../types.js").ApiSuccessResponse<GiveawayMutationResponse>>;
|
|
5
|
+
leave(giveawayId: string): Promise<import("../types.js").ApiSuccessResponse<GiveawayMutationResponse>>;
|
|
6
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export function createGiveawaysResource(api) {
|
|
2
|
+
return {
|
|
3
|
+
list(roomId) {
|
|
4
|
+
return api.get("/giveaways", {
|
|
5
|
+
query: roomId ? { roomId } : undefined,
|
|
6
|
+
});
|
|
7
|
+
},
|
|
8
|
+
join(giveawayId) {
|
|
9
|
+
return api.post(`/giveaways/${encodeURIComponent(giveawayId)}/entries`, {});
|
|
10
|
+
},
|
|
11
|
+
leave(giveawayId) {
|
|
12
|
+
return api.delete(`/giveaways/${encodeURIComponent(giveawayId)}/entries/me`);
|
|
13
|
+
},
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=giveaways.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"giveaways.js","sourceRoot":"","sources":["../../src/resources/giveaways.ts"],"names":[],"mappings":"AAMA,MAAM,UAAU,uBAAuB,CAAC,GAAY;IAChD,OAAO;QACH,IAAI,CAAC,MAAsB;YACvB,OAAO,GAAG,CAAC,GAAG,CAAuB,YAAY,EAAE;gBAC/C,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,SAAS;aACzC,CAAC,CAAC;QACP,CAAC;QAED,IAAI,CAAC,UAAkB;YACnB,OAAO,GAAG,CAAC,IAAI,CACX,cAAc,kBAAkB,CAAC,UAAU,CAAC,UAAU,EACtD,EAAE,CACL,CAAC;QACN,CAAC;QAED,KAAK,CAAC,UAAkB;YACpB,OAAO,GAAG,CAAC,MAAM,CACb,cAAc,kBAAkB,CAAC,UAAU,CAAC,aAAa,CAC5D,CAAC;QACN,CAAC;KACJ,CAAC;AACN,CAAC"}
|
|
@@ -63,6 +63,12 @@ export declare function createPlaylistResource(api: ApiLike): {
|
|
|
63
63
|
}): Promise<import("../types.js").ApiSuccessResponse<{
|
|
64
64
|
track: PlaylistTrack;
|
|
65
65
|
}>>;
|
|
66
|
+
updateTrackMetadata(playlistId: string, trackId: string, input: {
|
|
67
|
+
title?: string | null;
|
|
68
|
+
artist?: string | null;
|
|
69
|
+
}): Promise<import("../types.js").ApiSuccessResponse<{
|
|
70
|
+
track: PlaylistTrack;
|
|
71
|
+
}>>;
|
|
66
72
|
removeTrack(playlistId: string, trackId: string): Promise<import("../types.js").ApiSuccessResponse<{
|
|
67
73
|
success: true;
|
|
68
74
|
}>>;
|
|
@@ -48,6 +48,9 @@ export function createPlaylistResource(api) {
|
|
|
48
48
|
updateTrackClip(playlistId, trackId, input) {
|
|
49
49
|
return api.put(`/playlists/${encodeURIComponent(playlistId)}/tracks/${encodeURIComponent(trackId)}/clip`, input);
|
|
50
50
|
},
|
|
51
|
+
updateTrackMetadata(playlistId, trackId, input) {
|
|
52
|
+
return api.put(`/playlists/${encodeURIComponent(playlistId)}/tracks/${encodeURIComponent(trackId)}/metadata`, input);
|
|
53
|
+
},
|
|
51
54
|
removeTrack(playlistId, trackId) {
|
|
52
55
|
return api.delete(`/playlists/${encodeURIComponent(playlistId)}/tracks/${encodeURIComponent(trackId)}`);
|
|
53
56
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"playlist.js","sourceRoot":"","sources":["../../src/resources/playlist.ts"],"names":[],"mappings":"AAYA,MAAM,UAAU,sBAAsB,CAAC,GAAY;IAC/C,OAAO;QACH,IAAI;YACA,OAAO,GAAG,CAAC,GAAG,CAAoB,YAAY,CAAC,CAAC;QACpD,CAAC;QAED,YAAY,CAAC,KAAa,EAAE,KAAK,GAAG,EAAE;YAClC,OAAO,GAAG,CAAC,GAAG,CACV,0BAA0B,EAC1B,EAAE,KAAK,EAAE,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,CACjC,CAAC;QACN,CAAC;QAED,MAAM,CAAC,KAAgC;YACnC,OAAO,GAAG,CAAC,IAAI,CACX,YAAY,EACZ,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,KAAK,CACtD,CAAC;QACN,CAAC;QAED,MAAM,CACF,UAAkB,EAClB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AAG,CAAC,EACT,SAAyB;YAEzB,OAAO,GAAG,CAAC,GAAG,CAAsB,eAAe,EAAE;gBACjD,KAAK,EAAE;oBACH,CAAC,EAAE,KAAK;oBACR,MAAM;oBACN,KAAK;oBACL,SAAS,EAAE,SAAS,IAAI,SAAS;iBACpC;aACJ,CAAC,CAAC;QACP,CAAC;KACJ,CAAC;AACN,CAAC"}
|
|
1
|
+
{"version":3,"file":"playlist.js","sourceRoot":"","sources":["../../src/resources/playlist.ts"],"names":[],"mappings":"AAYA,MAAM,UAAU,sBAAsB,CAAC,GAAY;IAC/C,OAAO;QACH,IAAI;YACA,OAAO,GAAG,CAAC,GAAG,CAAoB,YAAY,CAAC,CAAC;QACpD,CAAC;QAED,YAAY,CAAC,KAAa,EAAE,KAAK,GAAG,EAAE;YAClC,OAAO,GAAG,CAAC,GAAG,CACV,0BAA0B,EAC1B,EAAE,KAAK,EAAE,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,CACjC,CAAC;QACN,CAAC;QAED,MAAM,CAAC,KAAgC;YACnC,OAAO,GAAG,CAAC,IAAI,CACX,YAAY,EACZ,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,KAAK,CACtD,CAAC;QACN,CAAC;QAED,MAAM,CACF,UAAkB,EAClB,KAGC;YAED,OAAO,GAAG,CAAC,GAAG,CACV,cAAc,kBAAkB,CAAC,UAAU,CAAC,EAAE,EAC9C,KAAK,CACR,CAAC;QACN,CAAC;QAED,OAAO,CAAC,WAAqB;YACzB,OAAO,GAAG,CAAC,GAAG,CAAoB,oBAAoB,EAAE;gBACpD,WAAW;aACd,CAAC,CAAC;QACP,CAAC;QAED,MAAM,CAAC,UAAkB;YACrB,OAAO,GAAG,CAAC,MAAM,CACb,cAAc,kBAAkB,CAAC,UAAU,CAAC,EAAE,CACjD,CAAC;QACN,CAAC;QAED,SAAS,CACL,UAAkB,EAClB,O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C,CAAC;QACP,CAAC;KACJ,CAAC;AACN,CAAC"}
|
package/dist/resources/room.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ApiLike, ApiSuccessResponse, RoomBotPermission, RoomExternalMediaMetadataResponse, RoomExternalMediaValidationResponse, RoomPlaybackHistoryEntry, RoomQueueSnapshot, RoomQueueStatusResponse, RoomBotToken, RoomSummary } from "../types.js";
|
|
1
|
+
import type { ApiLike, ApiSuccessResponse, RoomBotPermission, RoomExternalMediaMetadataResponse, RoomExternalMediaValidationResponse, RoomPlaybackHistoryEntry, RoomQueueSnapshot, RoomQueueStatusResponse, RoomBotToken, RoomSettingsUpdateInput, RoomSummary } from "../types.js";
|
|
2
2
|
export declare function createRoomResource(api: ApiLike): {
|
|
3
3
|
list(): Promise<ApiSuccessResponse<RoomSummary[]>>;
|
|
4
4
|
featured(): Promise<{
|
|
@@ -60,7 +60,7 @@ export declare function createRoomResource(api: ApiLike): {
|
|
|
60
60
|
logs: unknown[];
|
|
61
61
|
}>>;
|
|
62
62
|
clearAuditLogs(roomId: string): Promise<ApiSuccessResponse<Record<string, unknown>>>;
|
|
63
|
-
updateSettings(roomId: string, input:
|
|
63
|
+
updateSettings(roomId: string, input: RoomSettingsUpdateInput): Promise<ApiSuccessResponse<{
|
|
64
64
|
room: Record<string, unknown>;
|
|
65
65
|
}>>;
|
|
66
66
|
updateLinkFilters(roomId: string, input: {
|
|
@@ -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,MAAM,uBAAuB,CAAC;
|
|
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,sB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AkB,CAAC,MAAM,CAAC,EAAE,EACjF,EAAE,OAAO,EAAE,CACd,CAAC;QACN,CAAC;QAED,KAAK,CAAC,MAAc,EAAE,MAAc;YAChC,OAAO,GAAG,CAAC,MAAM,CACb,UAAU,kBAAkB,CAAC,MAAM,CAAC,SAAS,kBAAkB,CAAC,MAAM,CAAC,EAAE,CAC5E,CAAC;QACN,CAAC;QAED,WAAW,CAAC,MAAc,EAAE,KAA8B;YACtD,OAAO,GAAG,CAAC,IAAI,CACX,UAAU,kBAAkB,CAAC,MAAM,CAAC,SAAS,EAC7C,KAAK,CACR,CAAC;QACN,CAAC;QAED,WAAW,CACP,MAAc,EACd,OAAe,EACf,KAA8B;YAE9B,OAAO,GAAG,CAAC,KAAK,CACZ,UAAU,kBAAkB,CAAC,MAAM,CAAC,WAAW,kBAAkB,CAAC,OAAO,CAAC,EAAE,EAC5E,KAAK,CACR,CAAC;QACN,CAAC;QAED,WAAW,CAAC,MAAc,EAAE,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"}
|
|
@@ -3,6 +3,7 @@ export declare function createSettingsResource(api: ApiLike): {
|
|
|
3
3
|
get(): Promise<import("../types.js").ApiSuccessResponse<UserSettings>>;
|
|
4
4
|
update(input: {
|
|
5
5
|
bio?: string;
|
|
6
|
+
pronouns?: string;
|
|
6
7
|
countryCode?: string;
|
|
7
8
|
colorTheme?: "wavezfm" | "wavezfm-black";
|
|
8
9
|
timeFormat?: "12h" | "24h";
|
|
@@ -14,9 +15,11 @@ export declare function createSettingsResource(api: ApiLike): {
|
|
|
14
15
|
presenceStatus?: "online" | "busy" | "away" | "invisible";
|
|
15
16
|
selectedBadgeIds?: string[];
|
|
16
17
|
showChatBadge?: boolean;
|
|
18
|
+
showSupporterBadges?: boolean;
|
|
17
19
|
showFanRelationsOnProfile?: boolean;
|
|
18
20
|
showSuperfansOnProfile?: boolean;
|
|
19
21
|
showOnlineRoomOnProfile?: boolean;
|
|
22
|
+
showCountryFlag?: boolean;
|
|
20
23
|
showLastSeenOnProfile?: boolean;
|
|
21
24
|
blockUnknownWhispers?: boolean;
|
|
22
25
|
autoOpenIncomingWhispers?: boolean;
|
|
@@ -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,
|
|
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,CAC5B,CAAC;QACN,CAAC;QAED,mBAAmB,CAAC,SAAwB;YACxC,OAAO,GAAG,CAAC,GAAG,CACV,yBAAyB,EACzB,EAAE,SAAS,EAAE,CAChB,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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5B;YACG,OAAO,GAAG,CAAC,IAAI,CACX,mCAAmC,EACnC,KAAK,CACR,CAAC;QACN,CAAC;QAED,gBAAgB,CAAC,KAA2B;YACxC,OAAO,GAAG,CAAC,IAAI,CACX,8BAA8B,EAC9B,KAAK,CACR,CAAC;QACN,CAAC;KACJ,CAAC;AACN,CAAC"}
|
package/dist/resources/shop.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import type { ApiLike, InventoryResponse, StoreCatalogResponse, WalletBalance } from "../types.js";
|
|
1
|
+
import type { ApiLike, InventoryResponse, MiscShopUserState, StoreCatalogResponse, WalletBalance } from "../types.js";
|
|
2
2
|
export declare function createShopResource(api: ApiLike): {
|
|
3
3
|
getCatalog(): Promise<import("../types.js").ApiSuccessResponse<StoreCatalogResponse>>;
|
|
4
4
|
getWallet(): Promise<import("../types.js").ApiSuccessResponse<WalletBalance>>;
|
|
5
|
+
getMiscUserState(): Promise<import("../types.js").ApiSuccessResponse<MiscShopUserState>>;
|
|
5
6
|
purchase(input: {
|
|
6
7
|
itemId: string;
|
|
7
8
|
idempotencyKey?: string;
|
|
@@ -9,7 +10,10 @@ export declare function createShopResource(api: ApiLike): {
|
|
|
9
10
|
purchaseMisc(input: {
|
|
10
11
|
itemId: string;
|
|
11
12
|
idempotencyKey?: string;
|
|
13
|
+
username?: string | null;
|
|
12
14
|
displayUsername?: string | null;
|
|
15
|
+
roomSlug?: string | null;
|
|
16
|
+
walletCurrency?: "coins" | "diamonds" | null;
|
|
13
17
|
}): Promise<import("../types.js").ApiSuccessResponse<Record<string, unknown>>>;
|
|
14
18
|
equip(itemId: string): Promise<import("../types.js").ApiSuccessResponse<Record<string, unknown>>>;
|
|
15
19
|
getInventory(): Promise<import("../types.js").ApiSuccessResponse<InventoryResponse>>;
|
package/dist/resources/shop.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shop.js","sourceRoot":"","sources":["../../src/resources/shop.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"shop.js","sourceRoot":"","sources":["../../src/resources/shop.ts"],"names":[],"mappings":"AAQA,MAAM,UAAU,kBAAkB,CAAC,GAAY;IAC3C,OAAO;QACH,UAAU;YACN,OAAO,GAAG,CAAC,GAAG,CAAuB,QAAQ,EAAE;gBAC3C,QAAQ,EAAE,MAAM;aACnB,CAAC,CAAC;QACP,CAAC;QAED,SAAS;YACL,OAAO,GAAG,CAAC,GAAG,CAAgB,SAAS,CAAC,CAAC;QAC7C,CAAC;QAED,gBAAgB;YACZ,OAAO,GAAG,CAAC,GAAG,CAAoB,wBAAwB,CAAC,CAAC;QAChE,CAAC;QAED,QAAQ,CAAC,KAAkD;YACvD,OAAO,GAAG,CAAC,IAAI,CAA0B,iBAAiB,EAAE,KAAK,CAAC,CAAC;QACvE,CAAC;QAED,YAAY,CAAC,KAOZ;YACG,OAAO,GAAG,CAAC,IAAI,CACX,sBAAsB,EACtB,KAAK,CACR,CAAC;QACN,CAAC;QAED,KAAK,CAAC,MAAc;YAChB,OAAO,GAAG,CAAC,IAAI,CAA0B,cAAc,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;QACzE,CAAC;QAED,YAAY;YACR,OAAO,GAAG,CAAC,GAAG,CAAoB,YAAY,CAAC,CAAC;QACpD,CAAC;KACJ,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ApiLike, UserBlockState } from "../types.js";
|
|
2
|
+
export declare function createUserBlocksResource(api: ApiLike): {
|
|
3
|
+
getState(userId: string): Promise<import("../types.js").ApiSuccessResponse<UserBlockState>>;
|
|
4
|
+
block(userId: string): Promise<import("../types.js").ApiSuccessResponse<UserBlockState>>;
|
|
5
|
+
unblock(userId: string): Promise<import("../types.js").ApiSuccessResponse<UserBlockState>>;
|
|
6
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export function createUserBlocksResource(api) {
|
|
2
|
+
return {
|
|
3
|
+
getState(userId) {
|
|
4
|
+
return api.get(`/user-blocks/${encodeURIComponent(userId)}`);
|
|
5
|
+
},
|
|
6
|
+
block(userId) {
|
|
7
|
+
return api.post(`/user-blocks/${encodeURIComponent(userId)}`, {});
|
|
8
|
+
},
|
|
9
|
+
unblock(userId) {
|
|
10
|
+
return api.delete(`/user-blocks/${encodeURIComponent(userId)}`);
|
|
11
|
+
},
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=userBlocks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"userBlocks.js","sourceRoot":"","sources":["../../src/resources/userBlocks.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,wBAAwB,CAAC,GAAY;IACjD,OAAO;QACH,QAAQ,CAAC,MAAc;YACnB,OAAO,GAAG,CAAC,GAAG,CACV,gBAAgB,kBAAkB,CAAC,MAAM,CAAC,EAAE,CAC/C,CAAC;QACN,CAAC;QAED,KAAK,CAAC,MAAc;YAChB,OAAO,GAAG,CAAC,IAAI,CACX,gBAAgB,kBAAkB,CAAC,MAAM,CAAC,EAAE,EAC5C,EAAE,CACL,CAAC;QACN,CAAC;QAED,OAAO,CAAC,MAAc;YAClB,OAAO,GAAG,CAAC,MAAM,CACb,gBAAgB,kBAAkB,CAAC,MAAM,CAAC,EAAE,CAC/C,CAAC;QACN,CAAC;KACJ,CAAC;AACN,CAAC"}
|
package/dist/types.d.ts
CHANGED
|
@@ -65,6 +65,7 @@ export interface AuthUser {
|
|
|
65
65
|
displayName?: string | null;
|
|
66
66
|
name?: string | null;
|
|
67
67
|
bio?: string | null;
|
|
68
|
+
pronouns?: string | null;
|
|
68
69
|
country?: string | null;
|
|
69
70
|
countryCode?: string | null;
|
|
70
71
|
image?: string | null;
|
|
@@ -94,9 +95,11 @@ export interface AuthUser {
|
|
|
94
95
|
selectedBadgeIds?: string[];
|
|
95
96
|
selectedBadges?: BadgeAssignment[];
|
|
96
97
|
showChatBadge?: boolean;
|
|
98
|
+
showSupporterBadges?: boolean;
|
|
97
99
|
showFanRelationsOnProfile?: boolean;
|
|
98
100
|
showSuperfansOnProfile?: boolean;
|
|
99
101
|
showOnlineRoomOnProfile?: boolean;
|
|
102
|
+
showCountryFlag?: boolean;
|
|
100
103
|
showLastSeenOnProfile?: boolean;
|
|
101
104
|
blockUnknownWhispers?: boolean;
|
|
102
105
|
autoOpenIncomingWhispers?: boolean;
|
|
@@ -113,6 +116,12 @@ export interface AuthUser {
|
|
|
113
116
|
export interface UserProfile extends AuthUser {
|
|
114
117
|
numericId?: number;
|
|
115
118
|
badges?: BadgeAssignment[];
|
|
119
|
+
isBlockedByViewer?: boolean;
|
|
120
|
+
isInteractionBlocked?: boolean;
|
|
121
|
+
}
|
|
122
|
+
export interface UserBlockState {
|
|
123
|
+
isBlockedByViewer: boolean;
|
|
124
|
+
isInteractionBlocked: boolean;
|
|
116
125
|
}
|
|
117
126
|
export interface BadgeAssignment {
|
|
118
127
|
id: string;
|
|
@@ -142,6 +151,13 @@ export interface RoomSummary {
|
|
|
142
151
|
} | null;
|
|
143
152
|
[key: string]: unknown;
|
|
144
153
|
}
|
|
154
|
+
export type RoomRoleName = "user" | "resident_dj" | "bouncer" | "manager" | "cohost" | "host";
|
|
155
|
+
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";
|
|
156
|
+
export type RoomPermissionOverrideMap = Partial<Record<RoomRoleName, RoomPermission[]>>;
|
|
157
|
+
export interface RoomSettingsUpdateInput {
|
|
158
|
+
rolePermissionOverrides?: RoomPermissionOverrideMap;
|
|
159
|
+
[key: string]: unknown;
|
|
160
|
+
}
|
|
145
161
|
export type RoomExternalMediaProvider = "youtube" | "kick" | "google_drive" | "dailymotion" | "direct_mp3" | "direct_mp4" | "direct_m3u" | "direct_m3u8";
|
|
146
162
|
export interface RoomExternalMediaSubtitleTrack {
|
|
147
163
|
label: string;
|
|
@@ -277,6 +293,8 @@ export interface PlaylistTrack {
|
|
|
277
293
|
isLive?: boolean;
|
|
278
294
|
clipStartMs?: number | null;
|
|
279
295
|
clipEndMs?: number | null;
|
|
296
|
+
customTitle?: string | null;
|
|
297
|
+
customArtist?: string | null;
|
|
280
298
|
[key: string]: unknown;
|
|
281
299
|
}
|
|
282
300
|
export interface PlaylistTrackSearchResult {
|
|
@@ -425,21 +443,39 @@ export interface StoreCatalogResponse {
|
|
|
425
443
|
miscShopEnabled?: boolean;
|
|
426
444
|
[key: string]: unknown;
|
|
427
445
|
}
|
|
446
|
+
export type MiscStoreCurrency = "coins" | "diamonds" | "coins_diamonds" | "usd" | "brl" | "eur" | (string & {});
|
|
447
|
+
export type MiscStoreItemKind = "xp_boost" | "display_name_change" | "username_change" | "room_custom_theme_permanent" | "room_custom_theme_monthly" | "room_external_media_permanent" | "room_external_media_monthly" | (string & {});
|
|
448
|
+
export type MiscStoreRenderMode = "icon" | "image";
|
|
428
449
|
export interface MiscStoreItem {
|
|
429
450
|
id: string;
|
|
430
|
-
kind:
|
|
451
|
+
kind: MiscStoreItemKind;
|
|
431
452
|
name: string;
|
|
432
453
|
namePtBr?: string | null;
|
|
433
454
|
nameEnUs?: string | null;
|
|
455
|
+
nameLocales?: Record<string, string>;
|
|
434
456
|
description?: string;
|
|
435
457
|
descriptionPtBr?: string | null;
|
|
436
458
|
descriptionEnUs?: string | null;
|
|
437
|
-
|
|
459
|
+
descriptionLocales?: Record<string, string>;
|
|
460
|
+
renderMode?: MiscStoreRenderMode;
|
|
461
|
+
imageUrl?: string;
|
|
462
|
+
iconKey?: string | null;
|
|
463
|
+
colorHex?: string | null;
|
|
464
|
+
currency: MiscStoreCurrency;
|
|
438
465
|
price: number;
|
|
466
|
+
priceCoins?: number | null;
|
|
467
|
+
priceDiamonds?: number | null;
|
|
468
|
+
isEnabled?: boolean;
|
|
469
|
+
sortOrder?: number;
|
|
439
470
|
xpMultiplierPercent?: number | null;
|
|
440
471
|
durationMinutes?: number | null;
|
|
472
|
+
cooldownHours?: number;
|
|
473
|
+
firstChangeFree?: boolean;
|
|
441
474
|
[key: string]: unknown;
|
|
442
475
|
}
|
|
476
|
+
export interface MiscShopUserState {
|
|
477
|
+
displayNameFirstChangeFreeAvailable: boolean;
|
|
478
|
+
}
|
|
443
479
|
export interface StoreCatalogSection {
|
|
444
480
|
id: string;
|
|
445
481
|
label?: string;
|
|
@@ -635,6 +671,7 @@ export interface NotificationCenterClearResponse {
|
|
|
635
671
|
export interface UserSettings {
|
|
636
672
|
userId?: string;
|
|
637
673
|
bio?: string | null;
|
|
674
|
+
pronouns?: string | null;
|
|
638
675
|
country?: string | null;
|
|
639
676
|
countryCode?: string | null;
|
|
640
677
|
colorTheme?: "wavezfm" | "wavezfm-black" | string | null;
|
|
@@ -647,9 +684,11 @@ export interface UserSettings {
|
|
|
647
684
|
presenceStatus?: "online" | "busy" | "away" | "invisible" | string | null;
|
|
648
685
|
selectedBadgeIds?: string[];
|
|
649
686
|
showChatBadge?: boolean;
|
|
687
|
+
showSupporterBadges?: boolean;
|
|
650
688
|
showFanRelationsOnProfile?: boolean;
|
|
651
689
|
showSuperfansOnProfile?: boolean;
|
|
652
690
|
showOnlineRoomOnProfile?: boolean;
|
|
691
|
+
showCountryFlag?: boolean;
|
|
653
692
|
showLastSeenOnProfile?: boolean;
|
|
654
693
|
blockUnknownWhispers?: boolean;
|
|
655
694
|
autoOpenIncomingWhispers?: boolean;
|
|
@@ -658,6 +697,101 @@ export interface UserSettings {
|
|
|
658
697
|
activeViolationCount?: number;
|
|
659
698
|
[key: string]: unknown;
|
|
660
699
|
}
|
|
700
|
+
export type GiveawayPrizeType = "subscription" | "coins" | "diamonds" | "xp";
|
|
701
|
+
export type GiveawayScope = "global" | "room";
|
|
702
|
+
export type GiveawayStatus = "scheduled" | "active" | "ended" | "cancelled";
|
|
703
|
+
export type GiveawayPrizeDeliveryStatus = "pending" | "delivering" | "partial" | "delivered";
|
|
704
|
+
export type GiveawayJoinEligibility = "eligible" | "active_subscription";
|
|
705
|
+
export interface GiveawayEntry {
|
|
706
|
+
userId: string;
|
|
707
|
+
username: string;
|
|
708
|
+
displayUsername: string;
|
|
709
|
+
avatar: string | null;
|
|
710
|
+
weight: number;
|
|
711
|
+
joinedAt: string;
|
|
712
|
+
}
|
|
713
|
+
export interface Giveaway {
|
|
714
|
+
id: string;
|
|
715
|
+
title: string;
|
|
716
|
+
description: string;
|
|
717
|
+
scope: GiveawayScope;
|
|
718
|
+
roomId: string | null;
|
|
719
|
+
roomName: string | null;
|
|
720
|
+
prizeType: GiveawayPrizeType;
|
|
721
|
+
prizeAmount: number;
|
|
722
|
+
winnerCount: number;
|
|
723
|
+
startAt: string;
|
|
724
|
+
endAt: string;
|
|
725
|
+
vipDoubleEntries: boolean;
|
|
726
|
+
excludeActiveSubscribers: boolean;
|
|
727
|
+
joinEligibility: GiveawayJoinEligibility;
|
|
728
|
+
winnerUserIds: string[];
|
|
729
|
+
prizeDeliveryStatus: GiveawayPrizeDeliveryStatus;
|
|
730
|
+
prizeDeliveredUserIds: string[];
|
|
731
|
+
prizeDeliveryStartedAt: string | null;
|
|
732
|
+
prizeDeliveredAt: string | null;
|
|
733
|
+
prizeDeliveredByUserId: string | null;
|
|
734
|
+
status: GiveawayStatus;
|
|
735
|
+
entryCount: number;
|
|
736
|
+
weightedEntryCount: number;
|
|
737
|
+
joined: boolean;
|
|
738
|
+
entries: GiveawayEntry[];
|
|
739
|
+
createdAt: string;
|
|
740
|
+
updatedAt: string;
|
|
741
|
+
}
|
|
742
|
+
export interface GiveawayListResponse {
|
|
743
|
+
success: true;
|
|
744
|
+
giveaways: Giveaway[];
|
|
745
|
+
}
|
|
746
|
+
export interface GiveawayMutationResponse {
|
|
747
|
+
success: true;
|
|
748
|
+
giveaway: Giveaway;
|
|
749
|
+
}
|
|
750
|
+
export type RoomEventScope = "global" | "room";
|
|
751
|
+
export type RoomEventStatus = "scheduled" | "active" | "ended" | "disabled";
|
|
752
|
+
export type RoomEventApprovalStatus = "pending" | "approved" | "rejected";
|
|
753
|
+
export interface RoomEvent {
|
|
754
|
+
id: string;
|
|
755
|
+
scope: RoomEventScope;
|
|
756
|
+
roomId: string | null;
|
|
757
|
+
roomName: string | null;
|
|
758
|
+
roomSlug: string | null;
|
|
759
|
+
titlePtBr: string;
|
|
760
|
+
titleEnUs: string;
|
|
761
|
+
descriptionPtBr: string;
|
|
762
|
+
descriptionEnUs: string;
|
|
763
|
+
imageUrl: string;
|
|
764
|
+
linkUrl: string;
|
|
765
|
+
startAt: string;
|
|
766
|
+
endAt: string;
|
|
767
|
+
isEnabled: boolean;
|
|
768
|
+
approvalStatus: RoomEventApprovalStatus;
|
|
769
|
+
createdByUserId: string | null;
|
|
770
|
+
reviewedByUserId: string | null;
|
|
771
|
+
reviewedAt: string | null;
|
|
772
|
+
status: RoomEventStatus;
|
|
773
|
+
createdAt: string;
|
|
774
|
+
updatedAt: string;
|
|
775
|
+
}
|
|
776
|
+
export interface RoomEventSubmissionInput {
|
|
777
|
+
scope?: RoomEventScope;
|
|
778
|
+
titlePtBr: string;
|
|
779
|
+
titleEnUs: string;
|
|
780
|
+
descriptionPtBr?: string;
|
|
781
|
+
descriptionEnUs?: string;
|
|
782
|
+
imageUrl?: string;
|
|
783
|
+
linkUrl?: string;
|
|
784
|
+
startAt: string;
|
|
785
|
+
endAt: string;
|
|
786
|
+
}
|
|
787
|
+
export interface RoomEventListResponse {
|
|
788
|
+
success: true;
|
|
789
|
+
events: RoomEvent[];
|
|
790
|
+
}
|
|
791
|
+
export interface RoomEventMutationResponse {
|
|
792
|
+
success: true;
|
|
793
|
+
event: RoomEvent | null;
|
|
794
|
+
}
|
|
661
795
|
export interface TwoFactorStatus {
|
|
662
796
|
email: string;
|
|
663
797
|
emailVerified: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wavezfm/api",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Official JavaScript/TypeScript API client for WavezFM.",
|
|
5
5
|
"homepage": "https://docs.wavez.fm/docs",
|
|
6
6
|
"type": "module",
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
],
|
|
17
17
|
"scripts": {
|
|
18
18
|
"build": "tsc -p tsconfig.json",
|
|
19
|
+
"test": "npm run build && node --test tests/*.test.mjs",
|
|
19
20
|
"typecheck": "tsc -p tsconfig.json --noEmit"
|
|
20
21
|
},
|
|
21
22
|
"publishConfig": {
|
|
@@ -64,6 +65,14 @@
|
|
|
64
65
|
"types": "./dist/resources/friend.d.ts",
|
|
65
66
|
"import": "./dist/resources/friend.js"
|
|
66
67
|
},
|
|
68
|
+
"./resources/user-blocks": {
|
|
69
|
+
"types": "./dist/resources/userBlocks.d.ts",
|
|
70
|
+
"import": "./dist/resources/userBlocks.js"
|
|
71
|
+
},
|
|
72
|
+
"./resources/giveaways": {
|
|
73
|
+
"types": "./dist/resources/giveaways.d.ts",
|
|
74
|
+
"import": "./dist/resources/giveaways.js"
|
|
75
|
+
},
|
|
67
76
|
"./resources/shop": {
|
|
68
77
|
"types": "./dist/resources/shop.d.ts",
|
|
69
78
|
"import": "./dist/resources/shop.js"
|
|
@@ -76,6 +85,10 @@
|
|
|
76
85
|
"types": "./dist/resources/system.d.ts",
|
|
77
86
|
"import": "./dist/resources/system.js"
|
|
78
87
|
},
|
|
88
|
+
"./resources/events": {
|
|
89
|
+
"types": "./dist/resources/events.d.ts",
|
|
90
|
+
"import": "./dist/resources/events.js"
|
|
91
|
+
},
|
|
79
92
|
"./resources/room-bot": {
|
|
80
93
|
"types": "./dist/resources/roomBot.d.ts",
|
|
81
94
|
"import": "./dist/resources/roomBot.js"
|