UNPKG

@elsikora/nestjs-crud-automator

Version:

A library for automating the creation of CRUD operations in NestJS.

13 lines (12 loc) 942 B
import { Type } from '@nestjs/common'; import { TDtoGenerateGetListResponseResourceClass } from '../../../type/utility'; /** * Generates a DTO for paginated list responses with appropriate metadata. * Creates a class with count, currentPage, items, totalCount, and totalPages properties, * all properly decorated with Swagger and validation decorators. * @param {TDtoGenerateGetListResponseResourceClass} resourceClass - The class representing the entity being listed * @param {TDtoGenerateGetListResponseResourceClass} responseResourceClass - The response DTO class for individual items * @param {string} name - The name for the generated DTO class * @returns {Type<unknown>} A generated DTO class for paginated list responses */ export declare function DtoGenerateGetListResponse(resourceClass: TDtoGenerateGetListResponseResourceClass, responseResourceClass: TDtoGenerateGetListResponseResourceClass, name: string): Type<unknown>;