@borealise/api 2.1.0-alpha.4 → 2.1.0-alpha.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
@@ -71,6 +71,8 @@ interface AuthUser {
71
71
  subscriptionMonths?: number;
72
72
  subscriptionExpiresAt?: string | null;
73
73
  emailVerified?: boolean;
74
+ twoFactorEnabled?: boolean;
75
+ twoFactorMethod?: 'totp' | 'email' | null;
74
76
  createdAt?: string;
75
77
  }
76
78
  interface LoginCredentials {
@@ -87,6 +89,42 @@ interface RegisterData {
87
89
  interface AuthResponse {
88
90
  success: boolean;
89
91
  message?: string;
92
+ data: {
93
+ user?: AuthUser;
94
+ accessToken?: string;
95
+ refreshToken?: string;
96
+ expiresAt?: string;
97
+ requiresSecondFactor?: boolean;
98
+ secondFactorMethod?: 'totp' | 'email';
99
+ challengeToken?: string;
100
+ challengeExpiresAt?: string;
101
+ };
102
+ }
103
+ interface TwoFactorStatusResponse {
104
+ success: boolean;
105
+ data: {
106
+ enabled: boolean;
107
+ method: 'totp' | 'email' | null;
108
+ };
109
+ }
110
+ interface TwoFactorSetupResponse {
111
+ success: boolean;
112
+ data: {
113
+ method: 'totp' | 'email';
114
+ challengeToken: string;
115
+ challengeExpiresAt: string;
116
+ secret?: string;
117
+ otpauthUrl?: string;
118
+ };
119
+ }
120
+ interface TwoFactorSetupVerifyResponse {
121
+ success: boolean;
122
+ data: {
123
+ backupCodes: string[];
124
+ };
125
+ }
126
+ interface TwoFactorVerifyResponse {
127
+ success: boolean;
90
128
  data: {
91
129
  user: AuthUser;
92
130
  accessToken: string;
@@ -123,6 +161,13 @@ interface AuthResource {
123
161
  resetPassword(token: string, password: string): Promise<ApiResponse<{
124
162
  success: boolean;
125
163
  }>>;
164
+ getTwoFactorStatus(): Promise<ApiResponse<TwoFactorStatusResponse>>;
165
+ startTwoFactorSetup(method: 'totp' | 'email'): Promise<ApiResponse<TwoFactorSetupResponse>>;
166
+ verifyTwoFactorSetup(challengeToken: string, code: string): Promise<ApiResponse<TwoFactorSetupVerifyResponse>>;
167
+ verifySecondFactor(challengeToken: string, code: string, trustDevice?: boolean): Promise<ApiResponse<TwoFactorVerifyResponse>>;
168
+ disableTwoFactor(): Promise<ApiResponse<{
169
+ success: boolean;
170
+ }>>;
126
171
  }
127
172
  declare const createAuthResource: (api: Api) => AuthResource;
128
173
 
@@ -201,6 +246,7 @@ interface UserResource {
201
246
  declare const createUserResource: (api: Api) => UserResource;
202
247
 
203
248
  type RoomRole = 'user' | 'resident_dj' | 'bouncer' | 'manager' | 'cohost' | 'host';
249
+ type RoomMode = 'standard' | 'dj_live';
204
250
  interface Room {
205
251
  id: number;
206
252
  slug: string;
@@ -213,6 +259,7 @@ interface Room {
213
259
  isNsfw: boolean;
214
260
  waitlistLocked: boolean;
215
261
  waitlistCycleEnabled: boolean;
262
+ mode: RoomMode;
216
263
  population: number;
217
264
  totalPlays: number;
218
265
  isFeatured: boolean;
@@ -225,7 +272,7 @@ interface Room {
225
272
  } | null;
226
273
  currentMedia?: {
227
274
  id: number;
228
- source: 'youtube' | 'soundcloud';
275
+ source: 'youtube' | 'soundcloud' | 'hls' | 'mp4';
229
276
  sourceId: string;
230
277
  title: string;
231
278
  artist: string | null;
@@ -257,6 +304,7 @@ interface CreateRoomData {
257
304
  welcomeMessage?: string;
258
305
  isPrivate?: boolean;
259
306
  isNsfw?: boolean;
307
+ mode?: RoomMode;
260
308
  }
261
309
  interface UpdateRoomData {
262
310
  name?: string;
@@ -267,6 +315,7 @@ interface UpdateRoomData {
267
315
  isNsfw?: boolean;
268
316
  waitlistLocked?: boolean;
269
317
  waitlistCycleEnabled?: boolean;
318
+ mode?: RoomMode;
270
319
  }
271
320
  interface RoomResponse {
272
321
  success: boolean;
@@ -373,7 +422,7 @@ interface BoothDJ {
373
422
  }
374
423
  interface BoothMedia {
375
424
  id: number;
376
- source: 'youtube' | 'soundcloud';
425
+ source: 'youtube' | 'soundcloud' | 'hls' | 'mp4';
377
426
  sourceId: string;
378
427
  title: string;
379
428
  artist: string | null;
@@ -401,6 +450,35 @@ interface JoinMuteInfo {
401
450
  remainingSeconds: number | null;
402
451
  reason: string | null;
403
452
  }
453
+ interface RoomLiveStreamStatus {
454
+ status: 'offline' | 'starting' | 'live' | 'error';
455
+ hlsUrl?: string;
456
+ startedAt?: number | null;
457
+ updatedAt?: number;
458
+ reason?: string;
459
+ role?: 'host' | 'cohost';
460
+ }
461
+ interface RoomLiveStatusResponse {
462
+ success: boolean;
463
+ data: {
464
+ roomSlug: string;
465
+ mode: RoomMode;
466
+ canBroadcast: boolean;
467
+ stream: RoomLiveStreamStatus;
468
+ };
469
+ }
470
+ interface RoomLiveStartResponse {
471
+ success: boolean;
472
+ data: {
473
+ roomSlug: string;
474
+ status: 'starting' | 'live';
475
+ ingestUrl: string;
476
+ streamName: string;
477
+ hlsUrl: string;
478
+ streamKey: string;
479
+ role: 'host' | 'cohost';
480
+ };
481
+ }
404
482
  interface JoinRoomResponse {
405
483
  success: boolean;
406
484
  data: {
@@ -410,6 +488,7 @@ interface JoinRoomResponse {
410
488
  name: string;
411
489
  waitlistLocked: boolean;
412
490
  waitlistCycleEnabled: boolean;
491
+ mode: RoomMode;
413
492
  };
414
493
  role: RoomRole;
415
494
  users: RoomUserState[];
@@ -476,7 +555,7 @@ interface PlayHistoryItem {
476
555
  avatarId: string;
477
556
  media: {
478
557
  id: number;
479
- source: 'youtube' | 'soundcloud';
558
+ source: 'youtube' | 'soundcloud' | 'hls' | 'mp4';
480
559
  sourceId: string;
481
560
  title: string;
482
561
  artist: string | null;
@@ -534,7 +613,7 @@ interface DashboardActivityItem {
534
613
  };
535
614
  media: {
536
615
  id: number;
537
- source: 'youtube' | 'soundcloud';
616
+ source: 'youtube' | 'soundcloud' | 'hls' | 'mp4';
538
617
  sourceId: string;
539
618
  title: string;
540
619
  artist: string | null;
@@ -635,6 +714,15 @@ interface RoomResource {
635
714
  }>>;
636
715
  vote(slug: string, type: 'woot' | 'meh'): Promise<ApiResponse<VoteResponse>>;
637
716
  grabTrack(slug: string, playlistId?: number): Promise<ApiResponse<GrabResponse>>;
717
+ startLive(slug: string): Promise<ApiResponse<RoomLiveStartResponse>>;
718
+ stopLive(slug: string): Promise<ApiResponse<{
719
+ success: boolean;
720
+ data: {
721
+ roomSlug: string;
722
+ status: 'offline' | 'error' | 'starting' | 'live';
723
+ };
724
+ }>>;
725
+ getLiveStatus(slug: string): Promise<ApiResponse<RoomLiveStatusResponse>>;
638
726
  getAssets(slug: string): Promise<ApiResponse<RoomAssetsResponse>>;
639
727
  createEmoji(slug: string, data: {
640
728
  name?: string;
@@ -692,9 +780,20 @@ interface ChatMessage {
692
780
  deleted?: boolean;
693
781
  deleted_at?: number | null;
694
782
  deleted_by?: number | null;
783
+ reply_to?: ChatReplyTarget | null;
784
+ }
785
+ interface ChatReplyTarget {
786
+ id: string;
787
+ user_id?: number;
788
+ username?: string;
789
+ display_name?: string | null;
790
+ content: string;
791
+ type?: 'user' | 'system';
792
+ deleted?: boolean;
695
793
  }
696
794
  interface SendMessageData {
697
795
  content: string;
796
+ replyToId?: string;
698
797
  }
699
798
  interface ChatMessagesResponse {
700
799
  success: boolean;
@@ -1143,4 +1242,4 @@ interface ApiClient {
1143
1242
  }
1144
1243
  declare const createApiClient: (config: ApiConfig) => ApiClient;
1145
1244
 
1146
- export { type AccountViolation, type AddMediaData, type AddViolationResponse, type AdminListUsersParams, type AdminResource, type AdminStatsResponse, type AdminStatsRoom, type AdminUserEntry, type AdminUsersResponse, type Api, type ApiClient, type ApiConfig, ApiError, type ApiQueryParams, type ApiRequestConfig, type ApiResponse, type AuditAction, type AuthResource, 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, type ChatResource, type CreateIntentResponse, type CreateRoomData, type DashboardActivityItem, type DashboardActivityResponse, type DashboardActivityType, type EquipAvatarData, type FeaturedRoomsResponse, type FriendActionResponse, type FriendEntry, type FriendList, type FriendListResponse, type FriendResource, type FriendStatusResponse, type FriendshipStatus, type GifSearchItem, type GifSearchResponse, type GlobalRole, type GrabResponse, type ImportPlaylistData, type ImportPlaylistResponse, type ImportResult, type JoinMuteInfo, type JoinRoomResponse, Logger, type MediaItem, type MediaItemResponse, type MediaSearchResult, type MediaSource, type ModerateUserData, type MuteResponse, type MyViolation, type MyViolationsResponse, type PaginationMeta, type PlayHistoryItem, type Playlist, type PlaylistResource, type PlaylistResponse, type PlaylistsResponse, type PortalResponse, type PublicProfileFriend, type PublicUser, type Room, type RoomAssetsResponse, type RoomAuditLog, type RoomBan, type RoomBansResponse, type RoomCustomEmoji, type RoomCustomSticker, type RoomHistoryResponse, type RoomMember, type RoomMute, type RoomMutesResponse, type RoomResource, type RoomResponse, type RoomRole, type RoomStaffResponse, type RoomUserState, type RoomsResponse, type SendMessageData, type ShopResource, type ShuffleResponse, type SoundCloudSearchResponse, type SoundCloudTrackResponse, type SourceResource, type SubscriptionPlan, type SubscriptionResource, type SubscriptionStatus, type UpdateProfileData, type UpdateRoomData, type User, type UserResource, type UserResponse, type UserViolationsResponse, type VoteResponse, type WaitlistResponse, type WaitlistUser, type YouTubeSearchResponse, type YouTubeVideoResponse, createAdminResource, createApi, createApiClient, createAuthResource, createChatResource, createFriendResource, createPlaylistResource, createRoomResource, createShopResource, createSourceResource, createSubscriptionResource, createUserResource };
1245
+ export { type AccountViolation, type AddMediaData, type AddViolationResponse, type AdminListUsersParams, type AdminResource, type AdminStatsResponse, type AdminStatsRoom, type AdminUserEntry, type AdminUsersResponse, type Api, type ApiClient, type ApiConfig, ApiError, type ApiQueryParams, type ApiRequestConfig, type ApiResponse, type AuditAction, type AuthResource, 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, type ChatResource, type CreateIntentResponse, type CreateRoomData, type DashboardActivityItem, type DashboardActivityResponse, type DashboardActivityType, type EquipAvatarData, type FeaturedRoomsResponse, type FriendActionResponse, type FriendEntry, type FriendList, type FriendListResponse, type FriendResource, type FriendStatusResponse, type FriendshipStatus, type GifSearchItem, type GifSearchResponse, type GlobalRole, type GrabResponse, type ImportPlaylistData, type ImportPlaylistResponse, type ImportResult, type JoinMuteInfo, type JoinRoomResponse, Logger, type MediaItem, type MediaItemResponse, type MediaSearchResult, type MediaSource, type ModerateUserData, type MuteResponse, type MyViolation, type MyViolationsResponse, type PaginationMeta, type PlayHistoryItem, type Playlist, type PlaylistResource, type PlaylistResponse, type PlaylistsResponse, type PortalResponse, type PublicProfileFriend, type PublicUser, type Room, type RoomAssetsResponse, type RoomAuditLog, type RoomBan, type RoomBansResponse, type RoomCustomEmoji, type RoomCustomSticker, type RoomHistoryResponse, type RoomLiveStartResponse, type RoomLiveStatusResponse, type RoomLiveStreamStatus, type RoomMember, type RoomMode, type RoomMute, type RoomMutesResponse, type RoomResource, type RoomResponse, type RoomRole, type RoomStaffResponse, type RoomUserState, type RoomsResponse, type SendMessageData, type ShopResource, type ShuffleResponse, type SoundCloudSearchResponse, type SoundCloudTrackResponse, type SourceResource, type SubscriptionPlan, type SubscriptionResource, type SubscriptionStatus, type UpdateProfileData, type UpdateRoomData, type User, type UserResource, type UserResponse, type UserViolationsResponse, type VoteResponse, type WaitlistResponse, type WaitlistUser, type YouTubeSearchResponse, type YouTubeVideoResponse, createAdminResource, createApi, createApiClient, createAuthResource, createChatResource, createFriendResource, createPlaylistResource, createRoomResource, createShopResource, createSourceResource, createSubscriptionResource, createUserResource };
package/dist/index.d.ts CHANGED
@@ -71,6 +71,8 @@ interface AuthUser {
71
71
  subscriptionMonths?: number;
72
72
  subscriptionExpiresAt?: string | null;
73
73
  emailVerified?: boolean;
74
+ twoFactorEnabled?: boolean;
75
+ twoFactorMethod?: 'totp' | 'email' | null;
74
76
  createdAt?: string;
75
77
  }
76
78
  interface LoginCredentials {
@@ -87,6 +89,42 @@ interface RegisterData {
87
89
  interface AuthResponse {
88
90
  success: boolean;
89
91
  message?: string;
92
+ data: {
93
+ user?: AuthUser;
94
+ accessToken?: string;
95
+ refreshToken?: string;
96
+ expiresAt?: string;
97
+ requiresSecondFactor?: boolean;
98
+ secondFactorMethod?: 'totp' | 'email';
99
+ challengeToken?: string;
100
+ challengeExpiresAt?: string;
101
+ };
102
+ }
103
+ interface TwoFactorStatusResponse {
104
+ success: boolean;
105
+ data: {
106
+ enabled: boolean;
107
+ method: 'totp' | 'email' | null;
108
+ };
109
+ }
110
+ interface TwoFactorSetupResponse {
111
+ success: boolean;
112
+ data: {
113
+ method: 'totp' | 'email';
114
+ challengeToken: string;
115
+ challengeExpiresAt: string;
116
+ secret?: string;
117
+ otpauthUrl?: string;
118
+ };
119
+ }
120
+ interface TwoFactorSetupVerifyResponse {
121
+ success: boolean;
122
+ data: {
123
+ backupCodes: string[];
124
+ };
125
+ }
126
+ interface TwoFactorVerifyResponse {
127
+ success: boolean;
90
128
  data: {
91
129
  user: AuthUser;
92
130
  accessToken: string;
@@ -123,6 +161,13 @@ interface AuthResource {
123
161
  resetPassword(token: string, password: string): Promise<ApiResponse<{
124
162
  success: boolean;
125
163
  }>>;
164
+ getTwoFactorStatus(): Promise<ApiResponse<TwoFactorStatusResponse>>;
165
+ startTwoFactorSetup(method: 'totp' | 'email'): Promise<ApiResponse<TwoFactorSetupResponse>>;
166
+ verifyTwoFactorSetup(challengeToken: string, code: string): Promise<ApiResponse<TwoFactorSetupVerifyResponse>>;
167
+ verifySecondFactor(challengeToken: string, code: string, trustDevice?: boolean): Promise<ApiResponse<TwoFactorVerifyResponse>>;
168
+ disableTwoFactor(): Promise<ApiResponse<{
169
+ success: boolean;
170
+ }>>;
126
171
  }
127
172
  declare const createAuthResource: (api: Api) => AuthResource;
128
173
 
@@ -201,6 +246,7 @@ interface UserResource {
201
246
  declare const createUserResource: (api: Api) => UserResource;
202
247
 
203
248
  type RoomRole = 'user' | 'resident_dj' | 'bouncer' | 'manager' | 'cohost' | 'host';
249
+ type RoomMode = 'standard' | 'dj_live';
204
250
  interface Room {
205
251
  id: number;
206
252
  slug: string;
@@ -213,6 +259,7 @@ interface Room {
213
259
  isNsfw: boolean;
214
260
  waitlistLocked: boolean;
215
261
  waitlistCycleEnabled: boolean;
262
+ mode: RoomMode;
216
263
  population: number;
217
264
  totalPlays: number;
218
265
  isFeatured: boolean;
@@ -225,7 +272,7 @@ interface Room {
225
272
  } | null;
226
273
  currentMedia?: {
227
274
  id: number;
228
- source: 'youtube' | 'soundcloud';
275
+ source: 'youtube' | 'soundcloud' | 'hls' | 'mp4';
229
276
  sourceId: string;
230
277
  title: string;
231
278
  artist: string | null;
@@ -257,6 +304,7 @@ interface CreateRoomData {
257
304
  welcomeMessage?: string;
258
305
  isPrivate?: boolean;
259
306
  isNsfw?: boolean;
307
+ mode?: RoomMode;
260
308
  }
261
309
  interface UpdateRoomData {
262
310
  name?: string;
@@ -267,6 +315,7 @@ interface UpdateRoomData {
267
315
  isNsfw?: boolean;
268
316
  waitlistLocked?: boolean;
269
317
  waitlistCycleEnabled?: boolean;
318
+ mode?: RoomMode;
270
319
  }
271
320
  interface RoomResponse {
272
321
  success: boolean;
@@ -373,7 +422,7 @@ interface BoothDJ {
373
422
  }
374
423
  interface BoothMedia {
375
424
  id: number;
376
- source: 'youtube' | 'soundcloud';
425
+ source: 'youtube' | 'soundcloud' | 'hls' | 'mp4';
377
426
  sourceId: string;
378
427
  title: string;
379
428
  artist: string | null;
@@ -401,6 +450,35 @@ interface JoinMuteInfo {
401
450
  remainingSeconds: number | null;
402
451
  reason: string | null;
403
452
  }
453
+ interface RoomLiveStreamStatus {
454
+ status: 'offline' | 'starting' | 'live' | 'error';
455
+ hlsUrl?: string;
456
+ startedAt?: number | null;
457
+ updatedAt?: number;
458
+ reason?: string;
459
+ role?: 'host' | 'cohost';
460
+ }
461
+ interface RoomLiveStatusResponse {
462
+ success: boolean;
463
+ data: {
464
+ roomSlug: string;
465
+ mode: RoomMode;
466
+ canBroadcast: boolean;
467
+ stream: RoomLiveStreamStatus;
468
+ };
469
+ }
470
+ interface RoomLiveStartResponse {
471
+ success: boolean;
472
+ data: {
473
+ roomSlug: string;
474
+ status: 'starting' | 'live';
475
+ ingestUrl: string;
476
+ streamName: string;
477
+ hlsUrl: string;
478
+ streamKey: string;
479
+ role: 'host' | 'cohost';
480
+ };
481
+ }
404
482
  interface JoinRoomResponse {
405
483
  success: boolean;
406
484
  data: {
@@ -410,6 +488,7 @@ interface JoinRoomResponse {
410
488
  name: string;
411
489
  waitlistLocked: boolean;
412
490
  waitlistCycleEnabled: boolean;
491
+ mode: RoomMode;
413
492
  };
414
493
  role: RoomRole;
415
494
  users: RoomUserState[];
@@ -476,7 +555,7 @@ interface PlayHistoryItem {
476
555
  avatarId: string;
477
556
  media: {
478
557
  id: number;
479
- source: 'youtube' | 'soundcloud';
558
+ source: 'youtube' | 'soundcloud' | 'hls' | 'mp4';
480
559
  sourceId: string;
481
560
  title: string;
482
561
  artist: string | null;
@@ -534,7 +613,7 @@ interface DashboardActivityItem {
534
613
  };
535
614
  media: {
536
615
  id: number;
537
- source: 'youtube' | 'soundcloud';
616
+ source: 'youtube' | 'soundcloud' | 'hls' | 'mp4';
538
617
  sourceId: string;
539
618
  title: string;
540
619
  artist: string | null;
@@ -635,6 +714,15 @@ interface RoomResource {
635
714
  }>>;
636
715
  vote(slug: string, type: 'woot' | 'meh'): Promise<ApiResponse<VoteResponse>>;
637
716
  grabTrack(slug: string, playlistId?: number): Promise<ApiResponse<GrabResponse>>;
717
+ startLive(slug: string): Promise<ApiResponse<RoomLiveStartResponse>>;
718
+ stopLive(slug: string): Promise<ApiResponse<{
719
+ success: boolean;
720
+ data: {
721
+ roomSlug: string;
722
+ status: 'offline' | 'error' | 'starting' | 'live';
723
+ };
724
+ }>>;
725
+ getLiveStatus(slug: string): Promise<ApiResponse<RoomLiveStatusResponse>>;
638
726
  getAssets(slug: string): Promise<ApiResponse<RoomAssetsResponse>>;
639
727
  createEmoji(slug: string, data: {
640
728
  name?: string;
@@ -692,9 +780,20 @@ interface ChatMessage {
692
780
  deleted?: boolean;
693
781
  deleted_at?: number | null;
694
782
  deleted_by?: number | null;
783
+ reply_to?: ChatReplyTarget | null;
784
+ }
785
+ interface ChatReplyTarget {
786
+ id: string;
787
+ user_id?: number;
788
+ username?: string;
789
+ display_name?: string | null;
790
+ content: string;
791
+ type?: 'user' | 'system';
792
+ deleted?: boolean;
695
793
  }
696
794
  interface SendMessageData {
697
795
  content: string;
796
+ replyToId?: string;
698
797
  }
699
798
  interface ChatMessagesResponse {
700
799
  success: boolean;
@@ -1143,4 +1242,4 @@ interface ApiClient {
1143
1242
  }
1144
1243
  declare const createApiClient: (config: ApiConfig) => ApiClient;
1145
1244
 
1146
- export { type AccountViolation, type AddMediaData, type AddViolationResponse, type AdminListUsersParams, type AdminResource, type AdminStatsResponse, type AdminStatsRoom, type AdminUserEntry, type AdminUsersResponse, type Api, type ApiClient, type ApiConfig, ApiError, type ApiQueryParams, type ApiRequestConfig, type ApiResponse, type AuditAction, type AuthResource, 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, type ChatResource, type CreateIntentResponse, type CreateRoomData, type DashboardActivityItem, type DashboardActivityResponse, type DashboardActivityType, type EquipAvatarData, type FeaturedRoomsResponse, type FriendActionResponse, type FriendEntry, type FriendList, type FriendListResponse, type FriendResource, type FriendStatusResponse, type FriendshipStatus, type GifSearchItem, type GifSearchResponse, type GlobalRole, type GrabResponse, type ImportPlaylistData, type ImportPlaylistResponse, type ImportResult, type JoinMuteInfo, type JoinRoomResponse, Logger, type MediaItem, type MediaItemResponse, type MediaSearchResult, type MediaSource, type ModerateUserData, type MuteResponse, type MyViolation, type MyViolationsResponse, type PaginationMeta, type PlayHistoryItem, type Playlist, type PlaylistResource, type PlaylistResponse, type PlaylistsResponse, type PortalResponse, type PublicProfileFriend, type PublicUser, type Room, type RoomAssetsResponse, type RoomAuditLog, type RoomBan, type RoomBansResponse, type RoomCustomEmoji, type RoomCustomSticker, type RoomHistoryResponse, type RoomMember, type RoomMute, type RoomMutesResponse, type RoomResource, type RoomResponse, type RoomRole, type RoomStaffResponse, type RoomUserState, type RoomsResponse, type SendMessageData, type ShopResource, type ShuffleResponse, type SoundCloudSearchResponse, type SoundCloudTrackResponse, type SourceResource, type SubscriptionPlan, type SubscriptionResource, type SubscriptionStatus, type UpdateProfileData, type UpdateRoomData, type User, type UserResource, type UserResponse, type UserViolationsResponse, type VoteResponse, type WaitlistResponse, type WaitlistUser, type YouTubeSearchResponse, type YouTubeVideoResponse, createAdminResource, createApi, createApiClient, createAuthResource, createChatResource, createFriendResource, createPlaylistResource, createRoomResource, createShopResource, createSourceResource, createSubscriptionResource, createUserResource };
1245
+ export { type AccountViolation, type AddMediaData, type AddViolationResponse, type AdminListUsersParams, type AdminResource, type AdminStatsResponse, type AdminStatsRoom, type AdminUserEntry, type AdminUsersResponse, type Api, type ApiClient, type ApiConfig, ApiError, type ApiQueryParams, type ApiRequestConfig, type ApiResponse, type AuditAction, type AuthResource, 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, type ChatResource, type CreateIntentResponse, type CreateRoomData, type DashboardActivityItem, type DashboardActivityResponse, type DashboardActivityType, type EquipAvatarData, type FeaturedRoomsResponse, type FriendActionResponse, type FriendEntry, type FriendList, type FriendListResponse, type FriendResource, type FriendStatusResponse, type FriendshipStatus, type GifSearchItem, type GifSearchResponse, type GlobalRole, type GrabResponse, type ImportPlaylistData, type ImportPlaylistResponse, type ImportResult, type JoinMuteInfo, type JoinRoomResponse, Logger, type MediaItem, type MediaItemResponse, type MediaSearchResult, type MediaSource, type ModerateUserData, type MuteResponse, type MyViolation, type MyViolationsResponse, type PaginationMeta, type PlayHistoryItem, type Playlist, type PlaylistResource, type PlaylistResponse, type PlaylistsResponse, type PortalResponse, type PublicProfileFriend, type PublicUser, type Room, type RoomAssetsResponse, type RoomAuditLog, type RoomBan, type RoomBansResponse, type RoomCustomEmoji, type RoomCustomSticker, type RoomHistoryResponse, type RoomLiveStartResponse, type RoomLiveStatusResponse, type RoomLiveStreamStatus, type RoomMember, type RoomMode, type RoomMute, type RoomMutesResponse, type RoomResource, type RoomResponse, type RoomRole, type RoomStaffResponse, type RoomUserState, type RoomsResponse, type SendMessageData, type ShopResource, type ShuffleResponse, type SoundCloudSearchResponse, type SoundCloudTrackResponse, type SourceResource, type SubscriptionPlan, type SubscriptionResource, type SubscriptionStatus, type UpdateProfileData, type UpdateRoomData, type User, type UserResource, type UserResponse, type UserViolationsResponse, type VoteResponse, type WaitlistResponse, type WaitlistUser, type YouTubeSearchResponse, type YouTubeVideoResponse, createAdminResource, createApi, createApiClient, createAuthResource, createChatResource, createFriendResource, createPlaylistResource, createRoomResource, createShopResource, createSourceResource, createSubscriptionResource, createUserResource };
package/dist/index.js CHANGED
@@ -269,7 +269,12 @@ var createAuthResource = (api) => ({
269
269
  logout: () => api.post(`${endpoint}/logout`),
270
270
  me: () => api.get(`${endpoint}/me`),
271
271
  forgotPassword: (email) => api.post(`${endpoint}/forgot-password`, { email }),
272
- resetPassword: (token, password) => api.post(`${endpoint}/reset-password`, { token, password })
272
+ resetPassword: (token, password) => api.post(`${endpoint}/reset-password`, { token, password }),
273
+ getTwoFactorStatus: () => api.get(`${endpoint}/2fa/status`),
274
+ startTwoFactorSetup: (method) => api.post(`${endpoint}/2fa/setup`, { method }),
275
+ verifyTwoFactorSetup: (challengeToken, code) => api.post(`${endpoint}/2fa/setup/verify`, { challengeToken, code }),
276
+ verifySecondFactor: (challengeToken, code, trustDevice = false) => api.post(`${endpoint}/2fa/verify`, { challengeToken, code, trustDevice }),
277
+ disableTwoFactor: () => api.post(`${endpoint}/2fa/disable`)
273
278
  });
274
279
 
275
280
  // src/resources/user.ts
@@ -325,6 +330,9 @@ var createRoomResource = (api) => ({
325
330
  ),
326
331
  vote: (slug, type) => api.post(`${endpoint3}/${slug}/booth/vote`, { type }),
327
332
  grabTrack: (slug, playlistId) => api.post(`${endpoint3}/${slug}/booth/grab`, playlistId ? { playlistId } : {}),
333
+ startLive: (slug) => api.post(`${endpoint3}/${slug}/live/start`),
334
+ stopLive: (slug) => api.post(`${endpoint3}/${slug}/live/stop`),
335
+ getLiveStatus: (slug) => api.get(`${endpoint3}/${slug}/live/status`),
328
336
  getAssets: (slug) => api.get(`${endpoint3}/${slug}/assets`),
329
337
  createEmoji: (slug, data) => {
330
338
  const FormDataCtor = globalThis.FormData;
package/dist/index.mjs CHANGED
@@ -220,7 +220,12 @@ var createAuthResource = (api) => ({
220
220
  logout: () => api.post(`${endpoint}/logout`),
221
221
  me: () => api.get(`${endpoint}/me`),
222
222
  forgotPassword: (email) => api.post(`${endpoint}/forgot-password`, { email }),
223
- resetPassword: (token, password) => api.post(`${endpoint}/reset-password`, { token, password })
223
+ resetPassword: (token, password) => api.post(`${endpoint}/reset-password`, { token, password }),
224
+ getTwoFactorStatus: () => api.get(`${endpoint}/2fa/status`),
225
+ startTwoFactorSetup: (method) => api.post(`${endpoint}/2fa/setup`, { method }),
226
+ verifyTwoFactorSetup: (challengeToken, code) => api.post(`${endpoint}/2fa/setup/verify`, { challengeToken, code }),
227
+ verifySecondFactor: (challengeToken, code, trustDevice = false) => api.post(`${endpoint}/2fa/verify`, { challengeToken, code, trustDevice }),
228
+ disableTwoFactor: () => api.post(`${endpoint}/2fa/disable`)
224
229
  });
225
230
 
226
231
  // src/resources/user.ts
@@ -276,6 +281,9 @@ var createRoomResource = (api) => ({
276
281
  ),
277
282
  vote: (slug, type) => api.post(`${endpoint3}/${slug}/booth/vote`, { type }),
278
283
  grabTrack: (slug, playlistId) => api.post(`${endpoint3}/${slug}/booth/grab`, playlistId ? { playlistId } : {}),
284
+ startLive: (slug) => api.post(`${endpoint3}/${slug}/live/start`),
285
+ stopLive: (slug) => api.post(`${endpoint3}/${slug}/live/stop`),
286
+ getLiveStatus: (slug) => api.get(`${endpoint3}/${slug}/live/status`),
279
287
  getAssets: (slug) => api.get(`${endpoint3}/${slug}/assets`),
280
288
  createEmoji: (slug, data) => {
281
289
  const FormDataCtor = globalThis.FormData;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@borealise/api",
3
- "version": "2.1.0-alpha.4",
3
+ "version": "2.1.0-alpha.6",
4
4
  "description": "Official API client for Borealise",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",