Implement pagination response handling and related enhancements
- Introduced `@Pagination()` decorator to mark list endpoints for pagination.
- Added `TransformInterceptor` to wrap responses in a standardized format `{ data, meta }`.
- Created pagination-related utility functions and constants for managing pagination logic.
- Defined `PaginationQueryDto` for handling pagination query parameters.
- Established `PaginationMetaDto` for OpenAPI documentation of pagination metadata.
- Updated existing controller and service structures to support pagination in responses.
- Added unit tests for pagination utilities and interceptor to ensure correct functionality.
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
export { PAGINATION_RESPONSE, RAW_RESPONSE } from './constants';
|
||||
export { Pagination, RawResponse } from './pagination.decorator';
|
||||
export type {
|
||||
PaginationMeta,
|
||||
PaginationResponse,
|
||||
SuccessResponse,
|
||||
} from './ok-response.interface';
|
||||
export { PaginationMetaDto } from './pagination-meta.dto';
|
||||
export { TransformInterceptor } from './transform.interceptor';
|
||||
export {
|
||||
createPaginationMeta,
|
||||
createPaginationResponse,
|
||||
resolvePaginationQuery,
|
||||
} from './pagination-meta.helper';
|
||||
export { PaginationQueryDto } from './pagination-query.dto';
|
||||
export {
|
||||
toListPage,
|
||||
type ListPage,
|
||||
type PaginationQueryInput,
|
||||
} from './list-page';
|
||||
export {
|
||||
PAGINATION_DEFAULT_LIMIT,
|
||||
PAGINATION_MAX_LIMIT,
|
||||
} from './pagination.constants';
|
||||
Reference in New Issue
Block a user