Types
This commit is contained in:
parent
0b5eb9f21c
commit
1cd3347262
|
@ -2,6 +2,7 @@ import {
|
||||||
Datasource,
|
Datasource,
|
||||||
DocumentType,
|
DocumentType,
|
||||||
FieldType,
|
FieldType,
|
||||||
|
LogicalOperator,
|
||||||
Operation,
|
Operation,
|
||||||
QueryJson,
|
QueryJson,
|
||||||
RelationshipFieldMetadata,
|
RelationshipFieldMetadata,
|
||||||
|
|
|
@ -23,7 +23,16 @@ export enum RangeOperator {
|
||||||
RANGE = "range",
|
RANGE = "range",
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SearchFilterOperator = BasicOperator | ArrayOperator | RangeOperator
|
export enum LogicalOperator {
|
||||||
|
AND = "$and",
|
||||||
|
OR = "$or",
|
||||||
|
}
|
||||||
|
|
||||||
|
export type SearchFilterOperator =
|
||||||
|
| BasicOperator
|
||||||
|
| ArrayOperator
|
||||||
|
| RangeOperator
|
||||||
|
| LogicalOperator
|
||||||
|
|
||||||
export enum InternalSearchFilterOperator {
|
export enum InternalSearchFilterOperator {
|
||||||
COMPLEX_ID_OPERATOR = "_complexIdOperator",
|
COMPLEX_ID_OPERATOR = "_complexIdOperator",
|
||||||
|
@ -76,10 +85,10 @@ export interface SearchFilters {
|
||||||
// specific document type (such as just rows)
|
// specific document type (such as just rows)
|
||||||
documentType?: DocumentType
|
documentType?: DocumentType
|
||||||
|
|
||||||
$and?: {
|
[LogicalOperator.AND]?: {
|
||||||
conditions: SearchFilters[]
|
conditions: SearchFilters[]
|
||||||
}
|
}
|
||||||
$or?: {
|
[LogicalOperator.OR]?: {
|
||||||
conditions: SearchFilters[]
|
conditions: SearchFilters[]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue