Pagination contract is not standardized across endpoints

This commit is contained in:
2026-04-28 21:40:22 +02:00
parent ad21590f60
commit a2129bb9bd
13 changed files with 387 additions and 56 deletions

View File

@@ -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

View File

@@ -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 {