2024-11-29 06:52:33 -08:00
|
|
|
/**
|
|
|
|
* @category Utils
|
|
|
|
*/
|
2024-11-03 12:05:54 -08:00
|
|
|
interface PaginatedResponse<T, IsArray extends boolean = true> {
|
|
|
|
previous: (() => Promise<PaginatedResponse<T, IsArray>>) | null;
|
|
|
|
next: (() => Promise<PaginatedResponse<T, IsArray>>) | null;
|
|
|
|
items: IsArray extends true ? Array<T> : T;
|
2024-08-28 04:43:23 -07:00
|
|
|
partial: boolean;
|
|
|
|
total?: number;
|
|
|
|
}
|
|
|
|
|
|
|
|
export type {
|
|
|
|
PaginatedResponse,
|
|
|
|
};
|