This commit is contained in:
2025-07-28 14:45:47 +00:00
parent 2cded974a8
commit d627bc870e
7 changed files with 34 additions and 34 deletions

View File

@@ -1,11 +1,11 @@
import { type SmartResponse } from '../../core/index.js';
import { type CoreResponse } from '../../core/index.js';
import { type TPaginationConfig, PaginationStrategy, type TPaginatedResponse } from '../types/pagination.js';
/**
* Creates a paginated response from a regular response
*/
export async function createPaginatedResponse<T>(
response: SmartResponse<any>,
response: CoreResponse<any>,
paginationConfig: TPaginationConfig,
queryParams: Record<string, string>,
fetchNextPage: (params: Record<string, string>) => Promise<TPaginatedResponse<T>>