@feathersjs/typebox
Advanced tools
Comparing version 5.0.0-pre.36 to 5.0.0-pre.37
@@ -6,2 +6,8 @@ # Change Log | ||
# [5.0.0-pre.37](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.36...v5.0.0-pre.37) (2023-02-09) | ||
### Bug Fixes | ||
- **typebox:** Allow nested or in and queries ([#3029](https://github.com/feathersjs/feathers/issues/3029)) ([39e0b78](https://github.com/feathersjs/feathers/commit/39e0b785238b809aa9b4dea9b95efc3c188c9baa)) | ||
# [5.0.0-pre.36](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.35...v5.0.0-pre.36) (2023-01-29) | ||
@@ -8,0 +14,0 @@ |
@@ -95,3 +95,3 @@ import { TObject, TInteger, TOptional, TSchema, TIntersect, ObjectOptions } from '@sinclair/typebox'; | ||
$select: import("@sinclair/typebox").TUnsafe<(keyof T["properties"])[]>; | ||
$or: import("@sinclair/typebox").TArray<TOptional<TObject<T["properties"] extends infer T_3 ? { [K_2 in keyof T_3]: TOptional<import("@sinclair/typebox").TUnion<[T["properties"][K_2], import("@sinclair/typebox").TPartial<TIntersect<[TObject<{ | ||
$and: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TUnion<[TOptional<TObject<T["properties"] extends infer T_3 ? { [K_2 in keyof T_3]: TOptional<import("@sinclair/typebox").TUnion<[T["properties"][K_2], import("@sinclair/typebox").TPartial<TIntersect<[TObject<{ | ||
$gt: T["properties"][K_2]; | ||
@@ -104,4 +104,14 @@ $gte: T["properties"][K_2]; | ||
$nin: import("@sinclair/typebox").TArray<T["properties"][K_2]>; | ||
}>, TObject<X[K_2]>]>>]>>; } : never>>>; | ||
$and: import("@sinclair/typebox").TArray<TOptional<TObject<T["properties"] extends infer T_3 ? { [K_2 in keyof T_3]: TOptional<import("@sinclair/typebox").TUnion<[T["properties"][K_2], import("@sinclair/typebox").TPartial<TIntersect<[TObject<{ | ||
}>, TObject<X[K_2]>]>>]>>; } : never>>, TObject<{ | ||
$or: import("@sinclair/typebox").TArray<TOptional<TObject<T["properties"] extends infer T_3 ? { [K_2 in keyof T_3]: TOptional<import("@sinclair/typebox").TUnion<[T["properties"][K_2], import("@sinclair/typebox").TPartial<TIntersect<[TObject<{ | ||
$gt: T["properties"][K_2]; | ||
$gte: T["properties"][K_2]; | ||
$lt: T["properties"][K_2]; | ||
$lte: T["properties"][K_2]; | ||
$ne: T["properties"][K_2]; | ||
$in: import("@sinclair/typebox").TArray<T["properties"][K_2]>; | ||
$nin: import("@sinclair/typebox").TArray<T["properties"][K_2]>; | ||
}>, TObject<X[K_2]>]>>]>>; } : never>>>; | ||
}>]>>; | ||
$or: import("@sinclair/typebox").TArray<TOptional<TObject<T["properties"] extends infer T_3 ? { [K_2 in keyof T_3]: TOptional<import("@sinclair/typebox").TUnion<[T["properties"][K_2], import("@sinclair/typebox").TPartial<TIntersect<[TObject<{ | ||
$gt: T["properties"][K_2]; | ||
@@ -108,0 +118,0 @@ $gte: T["properties"][K_2]; |
@@ -133,2 +133,4 @@ "use strict"; | ||
const propertySchema = (0, exports.queryProperties)(type, extensions); | ||
const $or = typebox_1.Type.Array(propertySchema); | ||
const $and = typebox_1.Type.Array(typebox_1.Type.Union([propertySchema, typebox_1.Type.Object({ $or })])); | ||
return typebox_1.Type.Intersect([ | ||
@@ -140,4 +142,4 @@ typebox_1.Type.Partial(typebox_1.Type.Object({ | ||
$select: arrayOfKeys(type), | ||
$or: typebox_1.Type.Array(propertySchema), | ||
$and: typebox_1.Type.Array(propertySchema) | ||
$and, | ||
$or | ||
}, { additionalProperties: false })), | ||
@@ -144,0 +146,0 @@ propertySchema |
{ | ||
"name": "@feathersjs/typebox", | ||
"description": "TypeBox integration for @feathersjs/schema", | ||
"version": "5.0.0-pre.36", | ||
"version": "5.0.0-pre.37", | ||
"homepage": "https://feathersjs.com", | ||
@@ -57,3 +57,3 @@ "main": "lib/", | ||
"dependencies": { | ||
"@feathersjs/schema": "^5.0.0-pre.36", | ||
"@feathersjs/schema": "^5.0.0-pre.37", | ||
"@sinclair/typebox": "^0.25.21" | ||
@@ -66,5 +66,5 @@ }, | ||
"shx": "^0.3.4", | ||
"typescript": "^4.9.4" | ||
"typescript": "^4.9.5" | ||
}, | ||
"gitHead": "9a107b463cc80d7f3c28553c908987e05b0b634a" | ||
"gitHead": "17a8b3b2614876772472d3cab3d96d45c01db6ed" | ||
} |
@@ -162,2 +162,4 @@ import { Type, TObject, TInteger, TOptional, TSchema, TIntersect, ObjectOptions } from '@sinclair/typebox' | ||
const propertySchema = queryProperties(type, extensions) | ||
const $or = Type.Array(propertySchema) | ||
const $and = Type.Array(Type.Union([propertySchema, Type.Object({ $or })])) | ||
@@ -173,4 +175,4 @@ return Type.Intersect( | ||
$select: arrayOfKeys(type), | ||
$or: Type.Array(propertySchema), | ||
$and: Type.Array(propertySchema) | ||
$and, | ||
$or | ||
}, | ||
@@ -177,0 +179,0 @@ { additionalProperties: false } |
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
50976
753