pleroma/packages/pl-api/lib/responses.ts
2024-11-01 23:19:18 +01:00

14 lines
345 B
TypeScript

interface PaginatedSingleResponse<T> {
previous: (() => Promise<PaginatedSingleResponse<T>>) | null;
next: (() => Promise<PaginatedSingleResponse<T>>) | null;
items: T;
partial: boolean;
total?: number;
}
type PaginatedResponse<T> = PaginatedSingleResponse<Array<T>>;
export type {
PaginatedSingleResponse,
PaginatedResponse,
};