@borealise/api 1.1.6 → 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 CHANGED
@@ -415,11 +415,19 @@ interface PlayHistoryItem {
415
415
  startedAt: string;
416
416
  endedAt: string | null;
417
417
  }
418
+ interface PaginationMeta {
419
+ page: number;
420
+ limit: number;
421
+ total: number;
422
+ pages: number;
423
+ hasNext: boolean;
424
+ hasPrev: boolean;
425
+ }
418
426
  interface RoomHistoryResponse {
419
427
  success: boolean;
420
428
  data: {
421
429
  history: PlayHistoryItem[];
422
- total: number;
430
+ pagination: PaginationMeta;
423
431
  };
424
432
  }
425
433
  declare class RoomResource extends ApiResource<Room> {
@@ -507,7 +515,7 @@ declare class RoomResource extends ApiResource<Room> {
507
515
  }>>;
508
516
  vote(slug: string, type: 'woot' | 'meh'): Promise<ApiResponse<VoteResponse>>;
509
517
  grabTrack(slug: string, playlistId?: number): Promise<ApiResponse<GrabResponse>>;
510
- getHistory(slug: string, limit?: number, offset?: number): Promise<ApiResponse<RoomHistoryResponse>>;
518
+ getHistory(slug: string, page?: number, limit?: number): Promise<ApiResponse<RoomHistoryResponse>>;
511
519
  }
512
520
  declare const roomResource: RoomResource;
513
521
 
@@ -804,4 +812,4 @@ declare class FriendResource extends ApiResource<FriendEntry> {
804
812
  }
805
813
  declare const friendResource: FriendResource;
806
814
 
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 };
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
@@ -415,11 +415,19 @@ interface PlayHistoryItem {
415
415
  startedAt: string;
416
416
  endedAt: string | null;
417
417
  }
418
+ interface PaginationMeta {
419
+ page: number;
420
+ limit: number;
421
+ total: number;
422
+ pages: number;
423
+ hasNext: boolean;
424
+ hasPrev: boolean;
425
+ }
418
426
  interface RoomHistoryResponse {
419
427
  success: boolean;
420
428
  data: {
421
429
  history: PlayHistoryItem[];
422
- total: number;
430
+ pagination: PaginationMeta;
423
431
  };
424
432
  }
425
433
  declare class RoomResource extends ApiResource<Room> {
@@ -507,7 +515,7 @@ declare class RoomResource extends ApiResource<Room> {
507
515
  }>>;
508
516
  vote(slug: string, type: 'woot' | 'meh'): Promise<ApiResponse<VoteResponse>>;
509
517
  grabTrack(slug: string, playlistId?: number): Promise<ApiResponse<GrabResponse>>;
510
- getHistory(slug: string, limit?: number, offset?: number): Promise<ApiResponse<RoomHistoryResponse>>;
518
+ getHistory(slug: string, page?: number, limit?: number): Promise<ApiResponse<RoomHistoryResponse>>;
511
519
  }
512
520
  declare const roomResource: RoomResource;
513
521
 
@@ -804,4 +812,4 @@ declare class FriendResource extends ApiResource<FriendEntry> {
804
812
  }
805
813
  declare const friendResource: FriendResource;
806
814
 
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 };
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
@@ -515,8 +515,8 @@ var RoomResource = class extends ApiResource {
515
515
  // History methods
516
516
  // ============================================
517
517
  // GET /api/rooms/:slug/history
518
- async getHistory(slug, limit = 50, offset = 0) {
519
- return this.get(`${slug}/history?limit=${limit}&offset=${offset}`);
518
+ async getHistory(slug, page = 1, limit = 20) {
519
+ return this.get(`${slug}/history?page=${page}&limit=${limit}`);
520
520
  }
521
521
  };
522
522
  var roomResource = new RoomResource();
package/dist/index.mjs CHANGED
@@ -458,8 +458,8 @@ var RoomResource = class extends ApiResource {
458
458
  // History methods
459
459
  // ============================================
460
460
  // GET /api/rooms/:slug/history
461
- async getHistory(slug, limit = 50, offset = 0) {
462
- return this.get(`${slug}/history?limit=${limit}&offset=${offset}`);
461
+ async getHistory(slug, page = 1, limit = 20) {
462
+ return this.get(`${slug}/history?page=${page}&limit=${limit}`);
463
463
  }
464
464
  };
465
465
  var roomResource = new RoomResource();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@borealise/api",
3
- "version": "1.1.6",
3
+ "version": "1.1.7",
4
4
  "description": "Official API client for Borealise",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",