@contember/schema
Advanced tools
Comparing version 0.10.0-alpha.6 to 0.10.0-alpha.7
@@ -69,3 +69,3 @@ import Value from './value'; | ||
by: UniqueWhere<E>; | ||
filter?: Where<Condition<Value.FieldValue<E>>>; | ||
filter?: OptionalWhere<E>; | ||
data: UpdateDataInput<E>; | ||
@@ -78,9 +78,10 @@ } | ||
by: UniqueWhere<E>; | ||
filter?: Where<Condition<Value.FieldValue<E>>>; | ||
filter?: OptionalWhere<E>; | ||
} | ||
interface UniqueQueryInput<E = never> { | ||
by: UniqueWhere<E>; | ||
filter?: OptionalWhere<E>; | ||
} | ||
interface ListQueryInput<E = never> { | ||
filter?: Where<Condition<Value.FieldValue<E>>>; | ||
filter?: OptionalWhere<E>; | ||
orderBy?: OrderBy[]; | ||
@@ -91,3 +92,3 @@ offset?: number; | ||
interface SelectQueryInput<E = never> { | ||
filter?: Where<Condition<Value.FieldValue<E>>>; | ||
filter?: OptionalWhere<E>; | ||
orderBy?: OrderBy[]; | ||
@@ -140,11 +141,12 @@ skip?: number; | ||
} | ||
type ComposedWhere<C> = { | ||
and?: Where<C>[]; | ||
or?: Where<C>[]; | ||
not?: Where<C>; | ||
type ComposedWhere<C, Opt> = { | ||
and?: (Where<C, Opt> | Opt)[]; | ||
or?: (Where<C, Opt> | Opt)[]; | ||
not?: Where<C, Opt>; | ||
}; | ||
interface FieldWhere<C = Condition> { | ||
[name: string]: C | Where<C> | undefined | Where<C>[]; | ||
interface FieldWhere<C, Opt> { | ||
[name: string]: C | Where<C, Opt> | undefined | Where<C, Opt>[]; | ||
} | ||
type Where<C = Condition> = ComposedWhere<C> & FieldWhere<C>; | ||
type Where<C = Condition, Opt = never> = ComposedWhere<C, Opt> & FieldWhere<C, Opt>; | ||
type OptionalWhere<E = never> = Where<Condition<Value.FieldValue<E>>, null | undefined>; | ||
enum FieldMeta { | ||
@@ -151,0 +153,0 @@ readable = "readable", |
{ | ||
"name": "@contember/schema", | ||
"version": "0.10.0-alpha.6", | ||
"version": "0.10.0-alpha.7", | ||
"license": "Apache-2.0", | ||
@@ -5,0 +5,0 @@ "main": "dist/src/index.js", |
@@ -78,3 +78,3 @@ import Value from './value' | ||
by: UniqueWhere<E> | ||
filter?: Where<Condition<Value.FieldValue<E>>> | ||
filter?: OptionalWhere<E> | ||
data: UpdateDataInput<E> | ||
@@ -89,3 +89,3 @@ } | ||
by: UniqueWhere<E> | ||
filter?: Where<Condition<Value.FieldValue<E>>> | ||
filter?: OptionalWhere<E> | ||
} | ||
@@ -95,6 +95,7 @@ | ||
by: UniqueWhere<E> | ||
filter?: OptionalWhere<E> | ||
} | ||
export interface ListQueryInput<E = never> { | ||
filter?: Where<Condition<Value.FieldValue<E>>> | ||
filter?: OptionalWhere<E> | ||
orderBy?: OrderBy[] | ||
@@ -106,3 +107,3 @@ offset?: number | ||
export interface SelectQueryInput<E = never> { | ||
filter?: Where<Condition<Value.FieldValue<E>>> | ||
filter?: OptionalWhere<E> | ||
orderBy?: OrderBy[] | ||
@@ -175,14 +176,16 @@ skip?: number | ||
export type ComposedWhere<C> = { | ||
and?: Where<C>[] | ||
or?: Where<C>[] | ||
not?: Where<C> | ||
export type ComposedWhere<C, Opt> = { | ||
and?: (Where<C, Opt> | Opt)[] | ||
or?: (Where<C, Opt> | Opt)[] | ||
not?: Where<C, Opt> | ||
} | ||
export interface FieldWhere<C = Condition> { | ||
[name: string]: C | Where<C> | undefined | Where<C>[] //last one if for ComposedWhere | ||
export interface FieldWhere<C, Opt> { | ||
[name: string]: C | Where<C, Opt> | undefined | Where<C, Opt>[] //last one if for ComposedWhere | ||
} | ||
export type Where<C = Condition> = ComposedWhere<C> & FieldWhere<C> | ||
export type Where<C = Condition, Opt = never> = ComposedWhere<C, Opt> & FieldWhere<C, Opt> | ||
export type OptionalWhere<E = never> = Where<Condition<Value.FieldValue<E>>, null | undefined> | ||
export enum FieldMeta { | ||
@@ -189,0 +192,0 @@ readable = 'readable', |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
276694
1348