update
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { type CoreResponse } from '../../core_node/index.js';
|
||||
import { type CoreResponse } from '../../core/index.js';
|
||||
import type { ICoreResponse } from '../../core_base/types.js';
|
||||
|
||||
/**
|
||||
* Pagination strategy options
|
||||
@@ -45,8 +46,8 @@ export interface LinkPaginationConfig {
|
||||
*/
|
||||
export interface CustomPaginationConfig {
|
||||
strategy: PaginationStrategy.CUSTOM;
|
||||
hasNextPage: (response: CoreResponse<any>) => boolean;
|
||||
getNextPageParams: (response: CoreResponse<any>, currentParams: Record<string, string>) => Record<string, string>;
|
||||
hasNextPage: (response: ICoreResponse<any>) => boolean;
|
||||
getNextPageParams: (response: ICoreResponse<any>, currentParams: Record<string, string>) => Record<string, string>;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -62,5 +63,5 @@ export interface TPaginatedResponse<T> {
|
||||
hasNextPage: boolean; // Whether there are more pages
|
||||
getNextPage: () => Promise<TPaginatedResponse<T>>; // Function to get the next page
|
||||
getAllPages: () => Promise<T[]>; // Function to get all remaining pages and combine
|
||||
response: CoreResponse<any>; // Original response
|
||||
response: ICoreResponse<any>; // Original response
|
||||
}
|
Reference in New Issue
Block a user