Pagination contract is not standardized across endpoints
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
* TypeScript types for the blocklist management feature.
|
||||
*/
|
||||
|
||||
import type { PaginatedListResponse } from "./response";
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Sources
|
||||
// ---------------------------------------------------------------------------
|
||||
@@ -45,13 +47,7 @@ export interface ImportLogEntry {
|
||||
errors: string | null;
|
||||
}
|
||||
|
||||
export interface ImportLogListResponse {
|
||||
items: ImportLogEntry[];
|
||||
total: number;
|
||||
page: number;
|
||||
page_size: number;
|
||||
total_pages: number;
|
||||
}
|
||||
export interface ImportLogListResponse extends PaginatedListResponse<ImportLogEntry> {}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Schedule
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
* TypeScript types for the ban history API.
|
||||
*/
|
||||
|
||||
import type { PaginatedListResponse } from "./response";
|
||||
import type { TimeRange } from "./ban";
|
||||
|
||||
/** Optional time-range filter for history queries. */
|
||||
@@ -22,12 +23,7 @@ export interface HistoryBanItem {
|
||||
}
|
||||
|
||||
/** Paginated response from GET /api/history */
|
||||
export interface HistoryListResponse {
|
||||
items: HistoryBanItem[];
|
||||
total: number;
|
||||
page: number;
|
||||
page_size: number;
|
||||
}
|
||||
export interface HistoryListResponse extends PaginatedListResponse<HistoryBanItem> {}
|
||||
|
||||
/** A single ban event in a per-IP timeline. */
|
||||
export interface IpTimelineEvent {
|
||||
|
||||
Reference in New Issue
Block a user