@borealise/api 1.1.5 → 1.1.7
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 +39 -1
- package/dist/index.d.ts +39 -1
- package/dist/index.js +7 -0
- package/dist/index.mjs +7 -0
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -393,6 +393,43 @@ interface GrabResponse {
|
|
|
393
393
|
message: string;
|
|
394
394
|
};
|
|
395
395
|
}
|
|
396
|
+
interface PlayHistoryItem {
|
|
397
|
+
id: number;
|
|
398
|
+
userId: number;
|
|
399
|
+
username: string;
|
|
400
|
+
displayName: string | null;
|
|
401
|
+
avatarId: string;
|
|
402
|
+
media: {
|
|
403
|
+
id: number;
|
|
404
|
+
source: 'youtube' | 'soundcloud';
|
|
405
|
+
sourceId: string;
|
|
406
|
+
title: string;
|
|
407
|
+
artist: string | null;
|
|
408
|
+
duration: number;
|
|
409
|
+
thumbnail: string | null;
|
|
410
|
+
};
|
|
411
|
+
woots: number;
|
|
412
|
+
mehs: number;
|
|
413
|
+
grabs: number;
|
|
414
|
+
skipped: boolean;
|
|
415
|
+
startedAt: string;
|
|
416
|
+
endedAt: string | null;
|
|
417
|
+
}
|
|
418
|
+
interface PaginationMeta {
|
|
419
|
+
page: number;
|
|
420
|
+
limit: number;
|
|
421
|
+
total: number;
|
|
422
|
+
pages: number;
|
|
423
|
+
hasNext: boolean;
|
|
424
|
+
hasPrev: boolean;
|
|
425
|
+
}
|
|
426
|
+
interface RoomHistoryResponse {
|
|
427
|
+
success: boolean;
|
|
428
|
+
data: {
|
|
429
|
+
history: PlayHistoryItem[];
|
|
430
|
+
pagination: PaginationMeta;
|
|
431
|
+
};
|
|
432
|
+
}
|
|
396
433
|
declare class RoomResource extends ApiResource<Room> {
|
|
397
434
|
protected readonly endpoint = "/rooms";
|
|
398
435
|
list(): Promise<ApiResponse<RoomsResponse>>;
|
|
@@ -478,6 +515,7 @@ declare class RoomResource extends ApiResource<Room> {
|
|
|
478
515
|
}>>;
|
|
479
516
|
vote(slug: string, type: 'woot' | 'meh'): Promise<ApiResponse<VoteResponse>>;
|
|
480
517
|
grabTrack(slug: string, playlistId?: number): Promise<ApiResponse<GrabResponse>>;
|
|
518
|
+
getHistory(slug: string, page?: number, limit?: number): Promise<ApiResponse<RoomHistoryResponse>>;
|
|
481
519
|
}
|
|
482
520
|
declare const roomResource: RoomResource;
|
|
483
521
|
|
|
@@ -774,4 +812,4 @@ declare class FriendResource extends ApiResource<FriendEntry> {
|
|
|
774
812
|
}
|
|
775
813
|
declare const friendResource: FriendResource;
|
|
776
814
|
|
|
777
|
-
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 JoinRoomResponse, Logger, type LoginCredentials, type MeResponse, type MediaItem, type MediaItemResponse, type MediaSearchResult, type MediaSource, type ModerateUserData, type MuteResponse, type PaginatedResponse, type Playlist, PlaylistResource, type PlaylistResponse, type PlaylistsResponse, type PortalResponse, type RefreshResponse, type RegisterData, type ResourceOptions, type Room, type RoomBan, type RoomBansResponse, 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 };
|
|
815
|
+
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 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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -393,6 +393,43 @@ interface GrabResponse {
|
|
|
393
393
|
message: string;
|
|
394
394
|
};
|
|
395
395
|
}
|
|
396
|
+
interface PlayHistoryItem {
|
|
397
|
+
id: number;
|
|
398
|
+
userId: number;
|
|
399
|
+
username: string;
|
|
400
|
+
displayName: string | null;
|
|
401
|
+
avatarId: string;
|
|
402
|
+
media: {
|
|
403
|
+
id: number;
|
|
404
|
+
source: 'youtube' | 'soundcloud';
|
|
405
|
+
sourceId: string;
|
|
406
|
+
title: string;
|
|
407
|
+
artist: string | null;
|
|
408
|
+
duration: number;
|
|
409
|
+
thumbnail: string | null;
|
|
410
|
+
};
|
|
411
|
+
woots: number;
|
|
412
|
+
mehs: number;
|
|
413
|
+
grabs: number;
|
|
414
|
+
skipped: boolean;
|
|
415
|
+
startedAt: string;
|
|
416
|
+
endedAt: string | null;
|
|
417
|
+
}
|
|
418
|
+
interface PaginationMeta {
|
|
419
|
+
page: number;
|
|
420
|
+
limit: number;
|
|
421
|
+
total: number;
|
|
422
|
+
pages: number;
|
|
423
|
+
hasNext: boolean;
|
|
424
|
+
hasPrev: boolean;
|
|
425
|
+
}
|
|
426
|
+
interface RoomHistoryResponse {
|
|
427
|
+
success: boolean;
|
|
428
|
+
data: {
|
|
429
|
+
history: PlayHistoryItem[];
|
|
430
|
+
pagination: PaginationMeta;
|
|
431
|
+
};
|
|
432
|
+
}
|
|
396
433
|
declare class RoomResource extends ApiResource<Room> {
|
|
397
434
|
protected readonly endpoint = "/rooms";
|
|
398
435
|
list(): Promise<ApiResponse<RoomsResponse>>;
|
|
@@ -478,6 +515,7 @@ declare class RoomResource extends ApiResource<Room> {
|
|
|
478
515
|
}>>;
|
|
479
516
|
vote(slug: string, type: 'woot' | 'meh'): Promise<ApiResponse<VoteResponse>>;
|
|
480
517
|
grabTrack(slug: string, playlistId?: number): Promise<ApiResponse<GrabResponse>>;
|
|
518
|
+
getHistory(slug: string, page?: number, limit?: number): Promise<ApiResponse<RoomHistoryResponse>>;
|
|
481
519
|
}
|
|
482
520
|
declare const roomResource: RoomResource;
|
|
483
521
|
|
|
@@ -774,4 +812,4 @@ declare class FriendResource extends ApiResource<FriendEntry> {
|
|
|
774
812
|
}
|
|
775
813
|
declare const friendResource: FriendResource;
|
|
776
814
|
|
|
777
|
-
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 JoinRoomResponse, Logger, type LoginCredentials, type MeResponse, type MediaItem, type MediaItemResponse, type MediaSearchResult, type MediaSource, type ModerateUserData, type MuteResponse, type PaginatedResponse, type Playlist, PlaylistResource, type PlaylistResponse, type PlaylistsResponse, type PortalResponse, type RefreshResponse, type RegisterData, type ResourceOptions, type Room, type RoomBan, type RoomBansResponse, 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 };
|
|
815
|
+
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 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 };
|
package/dist/index.js
CHANGED
|
@@ -511,6 +511,13 @@ var RoomResource = class extends ApiResource {
|
|
|
511
511
|
async grabTrack(slug, playlistId) {
|
|
512
512
|
return this.post(`${slug}/booth/grab`, playlistId ? { playlistId } : {});
|
|
513
513
|
}
|
|
514
|
+
// ============================================
|
|
515
|
+
// History methods
|
|
516
|
+
// ============================================
|
|
517
|
+
// GET /api/rooms/:slug/history
|
|
518
|
+
async getHistory(slug, page = 1, limit = 20) {
|
|
519
|
+
return this.get(`${slug}/history?page=${page}&limit=${limit}`);
|
|
520
|
+
}
|
|
514
521
|
};
|
|
515
522
|
var roomResource = new RoomResource();
|
|
516
523
|
|
package/dist/index.mjs
CHANGED
|
@@ -454,6 +454,13 @@ var RoomResource = class extends ApiResource {
|
|
|
454
454
|
async grabTrack(slug, playlistId) {
|
|
455
455
|
return this.post(`${slug}/booth/grab`, playlistId ? { playlistId } : {});
|
|
456
456
|
}
|
|
457
|
+
// ============================================
|
|
458
|
+
// History methods
|
|
459
|
+
// ============================================
|
|
460
|
+
// GET /api/rooms/:slug/history
|
|
461
|
+
async getHistory(slug, page = 1, limit = 20) {
|
|
462
|
+
return this.get(`${slug}/history?page=${page}&limit=${limit}`);
|
|
463
|
+
}
|
|
457
464
|
};
|
|
458
465
|
var roomResource = new RoomResource();
|
|
459
466
|
|