@borealise/api 2.0.0-alpha.3 → 2.0.0-alpha.4
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 +19 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.js +2 -1
- package/dist/index.mjs +2 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -422,6 +422,24 @@ interface RoomHistoryResponse {
|
|
|
422
422
|
pagination: PaginationMeta;
|
|
423
423
|
};
|
|
424
424
|
}
|
|
425
|
+
type AuditAction = 'kick' | 'ban' | 'unban' | 'mute' | 'unmute' | 'role_change' | 'waitlist_move' | 'waitlist_remove' | 'track_skip';
|
|
426
|
+
interface RoomAuditLog {
|
|
427
|
+
id: number;
|
|
428
|
+
actorId: number;
|
|
429
|
+
actorUsername: string;
|
|
430
|
+
targetId: number | null;
|
|
431
|
+
targetUsername: string | null;
|
|
432
|
+
action: AuditAction;
|
|
433
|
+
metadata: string | null;
|
|
434
|
+
createdAt: string;
|
|
435
|
+
}
|
|
436
|
+
interface RoomAuditLogResponse {
|
|
437
|
+
success: boolean;
|
|
438
|
+
data: {
|
|
439
|
+
logs: RoomAuditLog[];
|
|
440
|
+
hasMore: boolean;
|
|
441
|
+
};
|
|
442
|
+
}
|
|
425
443
|
interface RoomResource {
|
|
426
444
|
list(): Promise<ApiResponse<RoomsResponse>>;
|
|
427
445
|
featured(): Promise<ApiResponse<FeaturedRoomsResponse>>;
|
|
@@ -508,6 +526,7 @@ interface RoomResource {
|
|
|
508
526
|
vote(slug: string, type: 'woot' | 'meh'): Promise<ApiResponse<VoteResponse>>;
|
|
509
527
|
grabTrack(slug: string, playlistId?: number): Promise<ApiResponse<GrabResponse>>;
|
|
510
528
|
getHistory(slug: string, page?: number, limit?: number): Promise<ApiResponse<RoomHistoryResponse>>;
|
|
529
|
+
getAuditLog(slug: string, limit?: number, before?: string): Promise<ApiResponse<RoomAuditLogResponse>>;
|
|
511
530
|
}
|
|
512
531
|
declare const createRoomResource: (api: Api) => RoomResource;
|
|
513
532
|
|
package/dist/index.d.ts
CHANGED
|
@@ -422,6 +422,24 @@ interface RoomHistoryResponse {
|
|
|
422
422
|
pagination: PaginationMeta;
|
|
423
423
|
};
|
|
424
424
|
}
|
|
425
|
+
type AuditAction = 'kick' | 'ban' | 'unban' | 'mute' | 'unmute' | 'role_change' | 'waitlist_move' | 'waitlist_remove' | 'track_skip';
|
|
426
|
+
interface RoomAuditLog {
|
|
427
|
+
id: number;
|
|
428
|
+
actorId: number;
|
|
429
|
+
actorUsername: string;
|
|
430
|
+
targetId: number | null;
|
|
431
|
+
targetUsername: string | null;
|
|
432
|
+
action: AuditAction;
|
|
433
|
+
metadata: string | null;
|
|
434
|
+
createdAt: string;
|
|
435
|
+
}
|
|
436
|
+
interface RoomAuditLogResponse {
|
|
437
|
+
success: boolean;
|
|
438
|
+
data: {
|
|
439
|
+
logs: RoomAuditLog[];
|
|
440
|
+
hasMore: boolean;
|
|
441
|
+
};
|
|
442
|
+
}
|
|
425
443
|
interface RoomResource {
|
|
426
444
|
list(): Promise<ApiResponse<RoomsResponse>>;
|
|
427
445
|
featured(): Promise<ApiResponse<FeaturedRoomsResponse>>;
|
|
@@ -508,6 +526,7 @@ interface RoomResource {
|
|
|
508
526
|
vote(slug: string, type: 'woot' | 'meh'): Promise<ApiResponse<VoteResponse>>;
|
|
509
527
|
grabTrack(slug: string, playlistId?: number): Promise<ApiResponse<GrabResponse>>;
|
|
510
528
|
getHistory(slug: string, page?: number, limit?: number): Promise<ApiResponse<RoomHistoryResponse>>;
|
|
529
|
+
getAuditLog(slug: string, limit?: number, before?: string): Promise<ApiResponse<RoomAuditLogResponse>>;
|
|
511
530
|
}
|
|
512
531
|
declare const createRoomResource: (api: Api) => RoomResource;
|
|
513
532
|
|
package/dist/index.js
CHANGED
|
@@ -281,7 +281,8 @@ var createRoomResource = (api) => ({
|
|
|
281
281
|
),
|
|
282
282
|
vote: (slug, type) => api.post(`${endpoint3}/${slug}/booth/vote`, { type }),
|
|
283
283
|
grabTrack: (slug, playlistId) => api.post(`${endpoint3}/${slug}/booth/grab`, playlistId ? { playlistId } : {}),
|
|
284
|
-
getHistory: (slug, page = 1, limit = 20) => api.get(`${endpoint3}/${slug}/history`, { params: { page, limit } })
|
|
284
|
+
getHistory: (slug, page = 1, limit = 20) => api.get(`${endpoint3}/${slug}/history`, { params: { page, limit } }),
|
|
285
|
+
getAuditLog: (slug, limit = 50, before) => api.get(`${endpoint3}/${slug}/audit`, { params: before ? { limit, before } : { limit } })
|
|
285
286
|
});
|
|
286
287
|
|
|
287
288
|
// src/resources/chat.ts
|
package/dist/index.mjs
CHANGED
|
@@ -232,7 +232,8 @@ var createRoomResource = (api) => ({
|
|
|
232
232
|
),
|
|
233
233
|
vote: (slug, type) => api.post(`${endpoint3}/${slug}/booth/vote`, { type }),
|
|
234
234
|
grabTrack: (slug, playlistId) => api.post(`${endpoint3}/${slug}/booth/grab`, playlistId ? { playlistId } : {}),
|
|
235
|
-
getHistory: (slug, page = 1, limit = 20) => api.get(`${endpoint3}/${slug}/history`, { params: { page, limit } })
|
|
235
|
+
getHistory: (slug, page = 1, limit = 20) => api.get(`${endpoint3}/${slug}/history`, { params: { page, limit } }),
|
|
236
|
+
getAuditLog: (slug, limit = 50, before) => api.get(`${endpoint3}/${slug}/audit`, { params: before ? { limit, before } : { limit } })
|
|
236
237
|
});
|
|
237
238
|
|
|
238
239
|
// src/resources/chat.ts
|