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