@aequum/nestjs-paginate-common
v0.27.41
Published
aequum NestJS pagination common components
Downloads
32
Readme
aequum NestJS pagination common components
Common components for pagination in NestJS, used by the
@aequum/nestjs-crudl package.
Components
DTOs
PaginateQueryWithFilterDto(ModelFilterDto): Factory DTO class for pagination query with filter, used to define the structure of the pagination query with filter parameters.PaginatedDto(dto, paginatorDto = PaginatorDto): Factory DTO class for paginated response, used to define the structure of the paginated responseModelDtoindataproperty and pagination metadataPaginatorDtoinpaginatorproperty.PaginatorDto: DTO for pagination metadata, used to define the structure of the pagination metadata in the paginated response.
Interfaces
PaginateRequest: Interface for the pagination request, used to define the structure of the pagination request.
Utils
fillPaginateRequestFromQuery: Utli to fill thePaginateRequestfrom the query filter parameters.@Get() async list( @Query() filter: FilterDtoType, @Req() request: any ): Promise<ListDtoType> { const paginateRequest = fillPaginateRequestFromQuery(filter);
