@borealise/api 1.1.9 → 1.1.11
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/dist/index.d.mts +21 -1
- package/dist/index.d.ts +21 -1
- package/dist/index.js +4 -0
- package/dist/index.mjs +4 -0
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -295,6 +295,23 @@ interface RoomBansResponse {
|
|
|
295
295
|
bans: RoomBan[];
|
|
296
296
|
};
|
|
297
297
|
}
|
|
298
|
+
interface RoomMute {
|
|
299
|
+
id: number;
|
|
300
|
+
userId: number;
|
|
301
|
+
modById: number;
|
|
302
|
+
reason: string | null;
|
|
303
|
+
duration: number | null;
|
|
304
|
+
expiresAt: string | null;
|
|
305
|
+
createdAt: string;
|
|
306
|
+
username: string;
|
|
307
|
+
displayName: string | null;
|
|
308
|
+
}
|
|
309
|
+
interface RoomMutesResponse {
|
|
310
|
+
success: boolean;
|
|
311
|
+
data: {
|
|
312
|
+
mutes: RoomMute[];
|
|
313
|
+
};
|
|
314
|
+
}
|
|
298
315
|
interface ModerateUserData {
|
|
299
316
|
reason?: string;
|
|
300
317
|
duration?: number;
|
|
@@ -355,6 +372,8 @@ interface JoinMuteInfo {
|
|
|
355
372
|
expiresAt: string | null;
|
|
356
373
|
/** Seconds remaining until unmute, or null if permanent */
|
|
357
374
|
remainingSeconds: number | null;
|
|
375
|
+
/** Optional reason given by the moderator */
|
|
376
|
+
reason: string | null;
|
|
358
377
|
}
|
|
359
378
|
interface JoinRoomResponse {
|
|
360
379
|
success: boolean;
|
|
@@ -451,6 +470,7 @@ declare class RoomResource extends ApiResource<Room> {
|
|
|
451
470
|
}>>;
|
|
452
471
|
getStaff(slug: string): Promise<ApiResponse<RoomStaffResponse>>;
|
|
453
472
|
getBans(slug: string): Promise<ApiResponse<RoomBansResponse>>;
|
|
473
|
+
getMutes(slug: string): Promise<ApiResponse<RoomMutesResponse>>;
|
|
454
474
|
updateUserRole(slug: string, userId: number, role: RoomRole): Promise<ApiResponse<{
|
|
455
475
|
success: boolean;
|
|
456
476
|
data: {
|
|
@@ -821,4 +841,4 @@ declare class FriendResource extends ApiResource<FriendEntry> {
|
|
|
821
841
|
}
|
|
822
842
|
declare const friendResource: FriendResource;
|
|
823
843
|
|
|
824
|
-
export { type AddMediaData, Api, type ApiConfig, ApiError, ApiResource, type ApiResponse, AuthResource, type AuthResponse, type AuthUser, type AvatarCatalogItem, type AvatarCatalogResponse, type AvatarUnlockType, type BackendErrorResponse, type BanResponse, type BoothDJ, type BoothMedia, type BoothResponse, type BoothState, type ChatMessage, type ChatMessageResponse, type ChatMessagesResponse, ChatResource, type CreateIntentResponse, type CreateRoomData, type EquipAvatarData, type FeaturedRoomsResponse, type FriendActionResponse, type FriendEntry, type FriendList, type FriendListResponse, FriendResource, type FriendStatusResponse, type FriendshipStatus, type GlobalRole, type GrabResponse, type ImportPlaylistData, type ImportPlaylistResponse, type ImportResult, type JoinMuteInfo, type JoinRoomResponse, Logger, type LoginCredentials, type MeResponse, type MediaItem, type MediaItemResponse, type MediaSearchResult, type MediaSource, type ModerateUserData, type MuteResponse, type PaginatedResponse, type PaginationMeta, type PlayHistoryItem, type Playlist, PlaylistResource, type PlaylistResponse, type PlaylistsResponse, type PortalResponse, type RefreshResponse, type RegisterData, type ResourceOptions, type Room, type RoomBan, type RoomBansResponse, type RoomHistoryResponse, type RoomMember, RoomResource, type RoomResponse, type RoomRole, type RoomStaffResponse, type RoomUserState, type RoomsResponse, type SendMessageData, ShopResource, type ShuffleResponse, type SoundCloudSearchResponse, type SoundCloudTrackResponse, SourceResource, type SubscriptionPlan, SubscriptionResource, type SubscriptionStatus, type UpdateProfileData, type UpdateRoomData, type User, UserResource, type UserResponse, type VoteResponse, type WaitlistResponse, type WaitlistUser, type YouTubeSearchResponse, type YouTubeVideoResponse, authResource, chatResource, friendResource, playlistResource, roomResource, shopResource, sourceResource, subscriptionResource, userResource };
|
|
844
|
+
export { type AddMediaData, Api, type ApiConfig, ApiError, ApiResource, type ApiResponse, AuthResource, type AuthResponse, type AuthUser, type AvatarCatalogItem, type AvatarCatalogResponse, type AvatarUnlockType, type BackendErrorResponse, type BanResponse, type BoothDJ, type BoothMedia, type BoothResponse, type BoothState, type ChatMessage, type ChatMessageResponse, type ChatMessagesResponse, ChatResource, type CreateIntentResponse, type CreateRoomData, type EquipAvatarData, type FeaturedRoomsResponse, type FriendActionResponse, type FriendEntry, type FriendList, type FriendListResponse, FriendResource, type FriendStatusResponse, type FriendshipStatus, type GlobalRole, type GrabResponse, type ImportPlaylistData, type ImportPlaylistResponse, type ImportResult, type JoinMuteInfo, type JoinRoomResponse, Logger, type LoginCredentials, type MeResponse, type MediaItem, type MediaItemResponse, type MediaSearchResult, type MediaSource, type ModerateUserData, type MuteResponse, type PaginatedResponse, type PaginationMeta, type PlayHistoryItem, type Playlist, PlaylistResource, type PlaylistResponse, type PlaylistsResponse, type PortalResponse, type RefreshResponse, type RegisterData, type ResourceOptions, type Room, type RoomBan, type RoomBansResponse, type RoomHistoryResponse, type RoomMember, type RoomMute, type RoomMutesResponse, RoomResource, type RoomResponse, type RoomRole, type RoomStaffResponse, type RoomUserState, type RoomsResponse, type SendMessageData, ShopResource, type ShuffleResponse, type SoundCloudSearchResponse, type SoundCloudTrackResponse, SourceResource, type SubscriptionPlan, SubscriptionResource, type SubscriptionStatus, type UpdateProfileData, type UpdateRoomData, type User, UserResource, type UserResponse, type VoteResponse, type WaitlistResponse, type WaitlistUser, type YouTubeSearchResponse, type YouTubeVideoResponse, authResource, chatResource, friendResource, playlistResource, roomResource, shopResource, sourceResource, subscriptionResource, userResource };
|
package/dist/index.d.ts
CHANGED
|
@@ -295,6 +295,23 @@ interface RoomBansResponse {
|
|
|
295
295
|
bans: RoomBan[];
|
|
296
296
|
};
|
|
297
297
|
}
|
|
298
|
+
interface RoomMute {
|
|
299
|
+
id: number;
|
|
300
|
+
userId: number;
|
|
301
|
+
modById: number;
|
|
302
|
+
reason: string | null;
|
|
303
|
+
duration: number | null;
|
|
304
|
+
expiresAt: string | null;
|
|
305
|
+
createdAt: string;
|
|
306
|
+
username: string;
|
|
307
|
+
displayName: string | null;
|
|
308
|
+
}
|
|
309
|
+
interface RoomMutesResponse {
|
|
310
|
+
success: boolean;
|
|
311
|
+
data: {
|
|
312
|
+
mutes: RoomMute[];
|
|
313
|
+
};
|
|
314
|
+
}
|
|
298
315
|
interface ModerateUserData {
|
|
299
316
|
reason?: string;
|
|
300
317
|
duration?: number;
|
|
@@ -355,6 +372,8 @@ interface JoinMuteInfo {
|
|
|
355
372
|
expiresAt: string | null;
|
|
356
373
|
/** Seconds remaining until unmute, or null if permanent */
|
|
357
374
|
remainingSeconds: number | null;
|
|
375
|
+
/** Optional reason given by the moderator */
|
|
376
|
+
reason: string | null;
|
|
358
377
|
}
|
|
359
378
|
interface JoinRoomResponse {
|
|
360
379
|
success: boolean;
|
|
@@ -451,6 +470,7 @@ declare class RoomResource extends ApiResource<Room> {
|
|
|
451
470
|
}>>;
|
|
452
471
|
getStaff(slug: string): Promise<ApiResponse<RoomStaffResponse>>;
|
|
453
472
|
getBans(slug: string): Promise<ApiResponse<RoomBansResponse>>;
|
|
473
|
+
getMutes(slug: string): Promise<ApiResponse<RoomMutesResponse>>;
|
|
454
474
|
updateUserRole(slug: string, userId: number, role: RoomRole): Promise<ApiResponse<{
|
|
455
475
|
success: boolean;
|
|
456
476
|
data: {
|
|
@@ -821,4 +841,4 @@ declare class FriendResource extends ApiResource<FriendEntry> {
|
|
|
821
841
|
}
|
|
822
842
|
declare const friendResource: FriendResource;
|
|
823
843
|
|
|
824
|
-
export { type AddMediaData, Api, type ApiConfig, ApiError, ApiResource, type ApiResponse, AuthResource, type AuthResponse, type AuthUser, type AvatarCatalogItem, type AvatarCatalogResponse, type AvatarUnlockType, type BackendErrorResponse, type BanResponse, type BoothDJ, type BoothMedia, type BoothResponse, type BoothState, type ChatMessage, type ChatMessageResponse, type ChatMessagesResponse, ChatResource, type CreateIntentResponse, type CreateRoomData, type EquipAvatarData, type FeaturedRoomsResponse, type FriendActionResponse, type FriendEntry, type FriendList, type FriendListResponse, FriendResource, type FriendStatusResponse, type FriendshipStatus, type GlobalRole, type GrabResponse, type ImportPlaylistData, type ImportPlaylistResponse, type ImportResult, type JoinMuteInfo, type JoinRoomResponse, Logger, type LoginCredentials, type MeResponse, type MediaItem, type MediaItemResponse, type MediaSearchResult, type MediaSource, type ModerateUserData, type MuteResponse, type PaginatedResponse, type PaginationMeta, type PlayHistoryItem, type Playlist, PlaylistResource, type PlaylistResponse, type PlaylistsResponse, type PortalResponse, type RefreshResponse, type RegisterData, type ResourceOptions, type Room, type RoomBan, type RoomBansResponse, type RoomHistoryResponse, type RoomMember, RoomResource, type RoomResponse, type RoomRole, type RoomStaffResponse, type RoomUserState, type RoomsResponse, type SendMessageData, ShopResource, type ShuffleResponse, type SoundCloudSearchResponse, type SoundCloudTrackResponse, SourceResource, type SubscriptionPlan, SubscriptionResource, type SubscriptionStatus, type UpdateProfileData, type UpdateRoomData, type User, UserResource, type UserResponse, type VoteResponse, type WaitlistResponse, type WaitlistUser, type YouTubeSearchResponse, type YouTubeVideoResponse, authResource, chatResource, friendResource, playlistResource, roomResource, shopResource, sourceResource, subscriptionResource, userResource };
|
|
844
|
+
export { type AddMediaData, Api, type ApiConfig, ApiError, ApiResource, type ApiResponse, AuthResource, type AuthResponse, type AuthUser, type AvatarCatalogItem, type AvatarCatalogResponse, type AvatarUnlockType, type BackendErrorResponse, type BanResponse, type BoothDJ, type BoothMedia, type BoothResponse, type BoothState, type ChatMessage, type ChatMessageResponse, type ChatMessagesResponse, ChatResource, type CreateIntentResponse, type CreateRoomData, type EquipAvatarData, type FeaturedRoomsResponse, type FriendActionResponse, type FriendEntry, type FriendList, type FriendListResponse, FriendResource, type FriendStatusResponse, type FriendshipStatus, type GlobalRole, type GrabResponse, type ImportPlaylistData, type ImportPlaylistResponse, type ImportResult, type JoinMuteInfo, type JoinRoomResponse, Logger, type LoginCredentials, type MeResponse, type MediaItem, type MediaItemResponse, type MediaSearchResult, type MediaSource, type ModerateUserData, type MuteResponse, type PaginatedResponse, type PaginationMeta, type PlayHistoryItem, type Playlist, PlaylistResource, type PlaylistResponse, type PlaylistsResponse, type PortalResponse, type RefreshResponse, type RegisterData, type ResourceOptions, type Room, type RoomBan, type RoomBansResponse, type RoomHistoryResponse, type RoomMember, type RoomMute, type RoomMutesResponse, RoomResource, type RoomResponse, type RoomRole, type RoomStaffResponse, type RoomUserState, type RoomsResponse, type SendMessageData, ShopResource, type ShuffleResponse, type SoundCloudSearchResponse, type SoundCloudTrackResponse, SourceResource, type SubscriptionPlan, SubscriptionResource, type SubscriptionStatus, type UpdateProfileData, type UpdateRoomData, type User, UserResource, type UserResponse, type VoteResponse, type WaitlistResponse, type WaitlistUser, type YouTubeSearchResponse, type YouTubeVideoResponse, authResource, chatResource, friendResource, playlistResource, roomResource, shopResource, sourceResource, subscriptionResource, userResource };
|
package/dist/index.js
CHANGED
|
@@ -420,6 +420,10 @@ var RoomResource = class extends ApiResource {
|
|
|
420
420
|
async getBans(slug) {
|
|
421
421
|
return this.get(`${slug}/bans`);
|
|
422
422
|
}
|
|
423
|
+
// GET /api/rooms/:slug/mutes
|
|
424
|
+
async getMutes(slug) {
|
|
425
|
+
return this.get(`${slug}/mutes`);
|
|
426
|
+
}
|
|
423
427
|
// PATCH /api/rooms/:slug/users/:userId/role
|
|
424
428
|
async updateUserRole(slug, userId, role) {
|
|
425
429
|
return this.api.patch(
|
package/dist/index.mjs
CHANGED
|
@@ -363,6 +363,10 @@ var RoomResource = class extends ApiResource {
|
|
|
363
363
|
async getBans(slug) {
|
|
364
364
|
return this.get(`${slug}/bans`);
|
|
365
365
|
}
|
|
366
|
+
// GET /api/rooms/:slug/mutes
|
|
367
|
+
async getMutes(slug) {
|
|
368
|
+
return this.get(`${slug}/mutes`);
|
|
369
|
+
}
|
|
366
370
|
// PATCH /api/rooms/:slug/users/:userId/role
|
|
367
371
|
async updateUserRole(slug, userId, role) {
|
|
368
372
|
return this.api.patch(
|