This commit is contained in:
2025-07-28 15:00:42 +00:00
parent d627bc870e
commit 28a56b87bc
2 changed files with 5 additions and 5 deletions

View File

@@ -5,7 +5,7 @@ export * from './legacy/index.js';
export * from './modern/index.js';
// Core exports for advanced usage
export { SmartResponse, type ICoreRequestOptions, type ICoreResponse } from './core/index.js';
export { CoreResponse, type ICoreRequestOptions, type ICoreResponse } from './core/index.js';
// Default export for easier importing
import { SmartRequestClient } from './modern/smartrequestclient.js';

View File

@@ -1,4 +1,4 @@
import { type SmartResponse } from '../../core/index.js';
import { type CoreResponse } from '../../core/index.js';
/**
* Pagination strategy options
@@ -45,8 +45,8 @@ export interface LinkPaginationConfig {
*/
export interface CustomPaginationConfig {
strategy: PaginationStrategy.CUSTOM;
hasNextPage: (response: SmartResponse<any>) => boolean;
getNextPageParams: (response: SmartResponse<any>, currentParams: Record<string, string>) => Record<string, string>;
hasNextPage: (response: CoreResponse<any>) => boolean;
getNextPageParams: (response: CoreResponse<any>, currentParams: Record<string, string>) => Record<string, string>;
}
/**
@@ -62,5 +62,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: SmartResponse<any>; // Original response
response: CoreResponse<any>; // Original response
}