@borealise/api 1.1.5 → 1.1.6

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 CHANGED
@@ -393,6 +393,35 @@ 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 RoomHistoryResponse {
419
+ success: boolean;
420
+ data: {
421
+ history: PlayHistoryItem[];
422
+ total: number;
423
+ };
424
+ }
396
425
  declare class RoomResource extends ApiResource<Room> {
397
426
  protected readonly endpoint = "/rooms";
398
427
  list(): Promise<ApiResponse<RoomsResponse>>;
@@ -478,6 +507,7 @@ declare class RoomResource extends ApiResource<Room> {
478
507
  }>>;
479
508
  vote(slug: string, type: 'woot' | 'meh'): Promise<ApiResponse<VoteResponse>>;
480
509
  grabTrack(slug: string, playlistId?: number): Promise<ApiResponse<GrabResponse>>;
510
+ getHistory(slug: string, limit?: number, offset?: number): Promise<ApiResponse<RoomHistoryResponse>>;
481
511
  }
482
512
  declare const roomResource: RoomResource;
483
513
 
@@ -774,4 +804,4 @@ declare class FriendResource extends ApiResource<FriendEntry> {
774
804
  }
775
805
  declare const friendResource: FriendResource;
776
806
 
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 };
807
+ 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 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,35 @@ 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 RoomHistoryResponse {
419
+ success: boolean;
420
+ data: {
421
+ history: PlayHistoryItem[];
422
+ total: number;
423
+ };
424
+ }
396
425
  declare class RoomResource extends ApiResource<Room> {
397
426
  protected readonly endpoint = "/rooms";
398
427
  list(): Promise<ApiResponse<RoomsResponse>>;
@@ -478,6 +507,7 @@ declare class RoomResource extends ApiResource<Room> {
478
507
  }>>;
479
508
  vote(slug: string, type: 'woot' | 'meh'): Promise<ApiResponse<VoteResponse>>;
480
509
  grabTrack(slug: string, playlistId?: number): Promise<ApiResponse<GrabResponse>>;
510
+ getHistory(slug: string, limit?: number, offset?: number): Promise<ApiResponse<RoomHistoryResponse>>;
481
511
  }
482
512
  declare const roomResource: RoomResource;
483
513
 
@@ -774,4 +804,4 @@ declare class FriendResource extends ApiResource<FriendEntry> {
774
804
  }
775
805
  declare const friendResource: FriendResource;
776
806
 
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 };
807
+ 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 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, limit = 50, offset = 0) {
519
+ return this.get(`${slug}/history?limit=${limit}&offset=${offset}`);
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, limit = 50, offset = 0) {
462
+ return this.get(`${slug}/history?limit=${limit}&offset=${offset}`);
463
+ }
457
464
  };
458
465
  var roomResource = new RoomResource();
459
466
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@borealise/api",
3
- "version": "1.1.5",
3
+ "version": "1.1.6",
4
4
  "description": "Official API client for Borealise",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",