API Reference
@querry-kit/nest-util exports a small public API from the package root.
ts
import {
ApiErrorResponses,
ApiPaginatedResponse,
ApiParamId,
ApiPropertyId,
EmptyStringToNullPipe,
QueryTransformPipe,
ValidationUtil,
} from '@querry-kit/nest-util';
import { diffObjects, hasObjectDifferences, parseObject } from '@querry-kit/nest-util/object';Exports
| Export | Kind | Description |
|---|---|---|
QueryTransformPipe | Class | NestJS pipe that normalizes query parameter objects. |
EmptyStringToNullPipe | Class | NestJS pipe that trims body strings and maps blank strings to null. |
ApiParamId | Decorator | Swagger decorator for UUID route parameters. |
ApiPropertyId | Decorator | Swagger decorator for DTO ID properties. |
ApiPropertyCreatedAt | Decorator | Swagger decorator for created-at DTO properties. |
ApiPropertyUpdatedAt | Decorator | Swagger decorator for updated-at DTO properties. |
ApiPaginatedResponse | Decorator | Swagger decorator for paginated response schemas. |
ApiErrorResponses | Decorator | Swagger decorator for common error response schemas. |
parseObject | Function | Parses query-like values into JavaScript primitives and nested objects. |
diffObjects | Function | Builds nested old/new diff objects. |
serializeDecimalValues | Function | Recursively serializes Decimal-like object values to numbers. |
hasObjectDifferences | Function | Checks recursively if two values differ. |
ValidationUtil | Class | Maps class-validator errors into nested object shapes. |
isObject | Function | Checks if typeof value === 'object'. |
isNumber | Function | Checks if a value is or can be converted to a number. |
isBoolean | Function | Checks if a value is boolean-like. |
isPlainObject | Function | Checks if a value is a non-array object and not null. |