@clipboard-health/json-api-nestjs
Advanced tools
Comparing version 0.11.7 to 0.11.8
{ | ||
"name": "@clipboard-health/json-api-nestjs", | ||
"description": "TypeScript-friendly utilities for adhering to the JSON:API specification with NestJS.", | ||
"version": "0.11.7", | ||
"version": "0.11.8", | ||
"dependencies": { | ||
@@ -12,3 +12,3 @@ "@clipboard-health/contract-core": "0.3.0", | ||
"devDependencies": { | ||
"@clipboard-health/testing-core": "0.7.7" | ||
"@clipboard-health/testing-core": "0.7.8" | ||
}, | ||
@@ -15,0 +15,0 @@ "keywords": [], |
@@ -9,6 +9,7 @@ import { z } from "zod"; | ||
} | ||
export type FilterMap<FieldT extends Field = Field> = Record<FieldT, FilterValue>; | ||
export type FilterSchema<MapT extends FilterMap> = { | ||
type InternalFilterMap<FieldT extends Field = Field> = Record<FieldT, FilterValue>; | ||
export type FilterMap<FieldT extends Field = Field> = Partial<InternalFilterMap<FieldT>>; | ||
export type FilterSchema<MapT extends InternalFilterMap> = { | ||
[K in keyof MapT]: z.ZodOptional<z.ZodEffects<z.ZodOptional<z.ZodObject<{ | ||
[F in MapT[K]["filters"][number]]: z.ZodOptional<z.ZodEffects<z.ZodOptional<z.ZodReadonly<z.ZodArray<MapT[K]["schema"]>>>>>; | ||
[F in MapT[K]["filters"][number]]: z.ZodOptional<z.ZodEffects<z.ZodOptional<z.ZodArray<MapT[K]["schema"]>>>>; | ||
}>>>>; | ||
@@ -25,4 +26,5 @@ }; | ||
*/ | ||
export declare function filterQuery<const MapT extends FilterMap>(parameters: Readonly<MapT>): { | ||
export declare function filterQuery<const MapT extends InternalFilterMap>(parameters: Readonly<MapT>): { | ||
filter: z.ZodOptional<z.ZodObject<FilterSchema<MapT>, "strict", z.ZodTypeAny, z.objectUtil.addQuestionMarks<z.baseObjectOutputType<FilterSchema<MapT>>, any> extends infer T ? { [k in keyof T]: z.objectUtil.addQuestionMarks<z.baseObjectOutputType<FilterSchema<MapT>>, any>[k]; } : never, z.baseObjectInputType<FilterSchema<MapT>> extends infer T_1 ? { [k_1 in keyof T_1]: z.baseObjectInputType<FilterSchema<MapT>>[k_1]; } : never>>; | ||
}; | ||
export {}; |
@@ -32,5 +32,3 @@ "use strict"; | ||
filter, | ||
zod_1.z | ||
.preprocess(splitString_1.splitString, schema.array().min(1).max(10_000).readonly().optional()) | ||
.optional(), | ||
zod_1.z.preprocess(splitString_1.splitString, schema.array().min(1).max(10_000).optional()).optional(), | ||
]))) | ||
@@ -37,0 +35,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
27141