@clipboard-health/json-api-nestjs
Advanced tools
Comparing version 0.7.0 to 0.7.1
{ | ||
"name": "@clipboard-health/json-api-nestjs", | ||
"description": "TypeScript-friendly utilities for adhering to the JSON:API specification with NestJS.", | ||
"version": "0.7.0", | ||
"version": "0.7.1", | ||
"dependencies": { | ||
"@clipboard-health/contract-core": "0.2.0", | ||
"@clipboard-health/contract-core": "0.3.0", | ||
"tslib": "2.8.0", | ||
@@ -12,3 +12,3 @@ "type-fest": "4.26.1", | ||
"devDependencies": { | ||
"@clipboard-health/testing-core": "0.3.0" | ||
"@clipboard-health/testing-core": "0.3.1" | ||
}, | ||
@@ -15,0 +15,0 @@ "keywords": [], |
@@ -56,2 +56,6 @@ # @clipboard-health/json-api-nestjs <!-- omit from toc --> | ||
}, | ||
dateOfBirth: { | ||
filters: ["gte"], | ||
schema: z.coerce.date().min(new Date("1900-01-01")).max(new Date()), | ||
}, | ||
isActive: { | ||
@@ -61,6 +65,2 @@ filters: ["eq"], | ||
}, | ||
dateOfBirth: { | ||
filters: ["gte"], | ||
schema: z.coerce.date().min(new Date("1900-01-01")).max(new Date()), | ||
}, | ||
} as const satisfies FilterMap<UserAttributeFields>; | ||
@@ -79,3 +79,3 @@ | ||
...cursorPaginationQuery(), | ||
...fieldsQuery({ user: userFields, article: articleFields }), | ||
...fieldsQuery({ article: articleFields, user: userFields }), | ||
...filterQuery(userFilterMap), | ||
@@ -82,0 +82,0 @@ ...sortQuery(userFields), |
import { z } from "zod"; | ||
export declare const PAGINATION: { | ||
readonly size: { | ||
readonly default: 20; | ||
readonly maximum: 200; | ||
readonly default: 20; | ||
}; | ||
@@ -19,9 +19,9 @@ }; | ||
size: { | ||
default?: number; | ||
maximum?: number; | ||
default?: number; | ||
}; | ||
}>): { | ||
page: z.ZodDefault<z.ZodObject<{ | ||
cursor: z.ZodOptional<z.ZodString>; | ||
size: z.ZodDefault<z.ZodNumber>; | ||
cursor: z.ZodOptional<z.ZodString>; | ||
}, "strict", z.ZodTypeAny, { | ||
@@ -28,0 +28,0 @@ size: number; |
@@ -9,4 +9,4 @@ "use strict"; | ||
size: { | ||
default: 20, | ||
maximum: 200, | ||
default: 20, | ||
}, | ||
@@ -25,8 +25,8 @@ }; | ||
const { size } = exports.PAGINATION; | ||
const { maximum = size.maximum, default: defaultSize = size.default } = parameters?.size ?? {}; | ||
const { default: defaultSize = size.default, maximum = size.maximum } = parameters?.size ?? {}; | ||
return { | ||
page: zod_1.z | ||
.object({ | ||
cursor: contract_core_1.nonEmptyString.optional(), | ||
size: zod_1.z.coerce.number().int().positive().max(maximum).default(defaultSize), | ||
cursor: contract_core_1.nonEmptyString.optional(), | ||
}) | ||
@@ -33,0 +33,0 @@ .strict() |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
+ Added@clipboard-health/contract-core@0.3.0(transitive)
- Removed@clipboard-health/contract-core@0.2.0(transitive)