@borealise/api 1.1.6 → 1.1.8
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 +12 -3
- package/dist/index.d.ts +12 -3
- package/dist/index.js +2 -2
- package/dist/index.mjs +2 -2
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -118,6 +118,7 @@ interface RegisterData {
|
|
|
118
118
|
username: string;
|
|
119
119
|
password: string;
|
|
120
120
|
displayName?: string;
|
|
121
|
+
token: string;
|
|
121
122
|
}
|
|
122
123
|
interface AuthResponse {
|
|
123
124
|
success: boolean;
|
|
@@ -415,11 +416,19 @@ interface PlayHistoryItem {
|
|
|
415
416
|
startedAt: string;
|
|
416
417
|
endedAt: string | null;
|
|
417
418
|
}
|
|
419
|
+
interface PaginationMeta {
|
|
420
|
+
page: number;
|
|
421
|
+
limit: number;
|
|
422
|
+
total: number;
|
|
423
|
+
pages: number;
|
|
424
|
+
hasNext: boolean;
|
|
425
|
+
hasPrev: boolean;
|
|
426
|
+
}
|
|
418
427
|
interface RoomHistoryResponse {
|
|
419
428
|
success: boolean;
|
|
420
429
|
data: {
|
|
421
430
|
history: PlayHistoryItem[];
|
|
422
|
-
|
|
431
|
+
pagination: PaginationMeta;
|
|
423
432
|
};
|
|
424
433
|
}
|
|
425
434
|
declare class RoomResource extends ApiResource<Room> {
|
|
@@ -507,7 +516,7 @@ declare class RoomResource extends ApiResource<Room> {
|
|
|
507
516
|
}>>;
|
|
508
517
|
vote(slug: string, type: 'woot' | 'meh'): Promise<ApiResponse<VoteResponse>>;
|
|
509
518
|
grabTrack(slug: string, playlistId?: number): Promise<ApiResponse<GrabResponse>>;
|
|
510
|
-
getHistory(slug: string,
|
|
519
|
+
getHistory(slug: string, page?: number, limit?: number): Promise<ApiResponse<RoomHistoryResponse>>;
|
|
511
520
|
}
|
|
512
521
|
declare const roomResource: RoomResource;
|
|
513
522
|
|
|
@@ -804,4 +813,4 @@ declare class FriendResource extends ApiResource<FriendEntry> {
|
|
|
804
813
|
}
|
|
805
814
|
declare const friendResource: FriendResource;
|
|
806
815
|
|
|
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 };
|
|
816
|
+
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
|
@@ -118,6 +118,7 @@ interface RegisterData {
|
|
|
118
118
|
username: string;
|
|
119
119
|
password: string;
|
|
120
120
|
displayName?: string;
|
|
121
|
+
token: string;
|
|
121
122
|
}
|
|
122
123
|
interface AuthResponse {
|
|
123
124
|
success: boolean;
|
|
@@ -415,11 +416,19 @@ interface PlayHistoryItem {
|
|
|
415
416
|
startedAt: string;
|
|
416
417
|
endedAt: string | null;
|
|
417
418
|
}
|
|
419
|
+
interface PaginationMeta {
|
|
420
|
+
page: number;
|
|
421
|
+
limit: number;
|
|
422
|
+
total: number;
|
|
423
|
+
pages: number;
|
|
424
|
+
hasNext: boolean;
|
|
425
|
+
hasPrev: boolean;
|
|
426
|
+
}
|
|
418
427
|
interface RoomHistoryResponse {
|
|
419
428
|
success: boolean;
|
|
420
429
|
data: {
|
|
421
430
|
history: PlayHistoryItem[];
|
|
422
|
-
|
|
431
|
+
pagination: PaginationMeta;
|
|
423
432
|
};
|
|
424
433
|
}
|
|
425
434
|
declare class RoomResource extends ApiResource<Room> {
|
|
@@ -507,7 +516,7 @@ declare class RoomResource extends ApiResource<Room> {
|
|
|
507
516
|
}>>;
|
|
508
517
|
vote(slug: string, type: 'woot' | 'meh'): Promise<ApiResponse<VoteResponse>>;
|
|
509
518
|
grabTrack(slug: string, playlistId?: number): Promise<ApiResponse<GrabResponse>>;
|
|
510
|
-
getHistory(slug: string,
|
|
519
|
+
getHistory(slug: string, page?: number, limit?: number): Promise<ApiResponse<RoomHistoryResponse>>;
|
|
511
520
|
}
|
|
512
521
|
declare const roomResource: RoomResource;
|
|
513
522
|
|
|
@@ -804,4 +813,4 @@ declare class FriendResource extends ApiResource<FriendEntry> {
|
|
|
804
813
|
}
|
|
805
814
|
declare const friendResource: FriendResource;
|
|
806
815
|
|
|
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 };
|
|
816
|
+
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,
|
|
519
|
-
return this.get(`${slug}/history?
|
|
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,
|
|
462
|
-
return this.get(`${slug}/history?
|
|
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();
|