/**
 * @type Filter
 * @description Filter is a single condition filter or a combination of conditions through And or Or filters.
 */
export type Filter = And | Or | Not | Eq | Ne | Lt | Lte | Gt | Gte | HasSome | HasAll | Contains | StartsWith | EndsWith | Urlized;
/**
 * @enum Operator
 * @description Provides values for filter operator.
 * @member and to combine multiple filters with an and.
 * @member or to combine multiple filters with an or.
 * @member not to add filter witch has to be not matched.
 * @member eq to add `equality` condition to filter.
 * @member ne to add `not equal` condition to filter.
 * @member lt to add `les than` condition to filter.
 * @member lte to add `tess than or equal` condition to filter.
 * @member gt to add `greater than` condition to filter.
 * @member gte to add `greater than or equal` condition to filter.
 * @member hasSome to add `has some values of provided` condition to filter.
 * @member hasAll to add `has all values of provided` condition to filter.
 * @member contains to add `field value contains provided value` condition to filter.
 * @member startsWith to add `field value starts with provided value` condition to filter.
 * @member endsWith to add `ends with provided value` condition to filter.
 * @member urlized to add `urlized provided value` condition to filter.
 */
export declare enum Operator {
    and = "$and",
    or = "$or",
    not = "$not",
    eq = "$eq",
    ne = "$ne",
    lt = "$lt",
    lte = "$lte",
    gt = "$gt",
    gte = "$gte",
    hasSome = "$hasSome",
    hasAll = "$hasAll",
    contains = "$contains",
    startsWith = "$startsWith",
    endsWith = "$endsWith",
    urlized = "$urlized"
}
/**
 * @type Literal
 * @description Describes types used in some of filters
 */
export type Literal = string | number | Date | null;
export interface FilterInterface {
    kind: 'filter';
}
/**
 * @interface And
 * @member operator - `and` operator.
 * @member value - `Array` of `Filter`.
 * @description A filter with an `and` returns all the items that match all filters in `and` filter array.
 * @example Filter where `someField` is between 6 and 12
 * const andFilter: And = {
 *   operator: Operator.and,
 *   value: [
 *      {operator: Operator.gt, fieldName: 'someField', value:6},
 *      {operator: Operator.lt, fieldName: 'someField', value:12}
 *   ]
 * }
 */
export interface And extends FilterInterface {
    operator: Operator.and;
    value: Filter[];
}
/**
 * @interface Or
 * @member operator - `or` operator
 * @member value - `Array` of `Filter`.
 * @description A filter with an `or` returns all the items that match at least one filter in `or` filter array.
 * @example Filter where `someField` equals "hi" or "bye"
 * const orFilter: Or = {
 *   operator: Operator.or,
 *   value: [
 *      {operator: Operator.eq, fieldName: 'someField', value:'hi'},
 *      {operator: Operator.eq, fieldName: 'someField', value:'bye'}
 *   ]
 * }
 */
export interface Or extends FilterInterface {
    operator: Operator.or;
    value: Filter[];
}
/**
 * @interface Not
 * @member operator - `not` operator.
 * @member value - `Filter`.
 * @description A query with a `not` returns all the items that match the filter as defined up to the `not`
 * operator, but don't match the filter under the `not` operator.
 * @example Filter where `someField` not equals "hi"
 * const notFilter: Not = {
 *   operator: Operator.not,
 *   value: {operator: Operator.eq, fieldName: 'someField', value: 'hi'}
 * }
 */
export interface Not extends FilterInterface {
    operator: Operator.not;
    value: Filter;
}
/**
 * @interface Eq
 * @member operator - `eq`
 * @member fieldName - field witch has to be equal to `value`
 * @member value - value to match a field value. Value can be any type.
 * @example Filter where `someField` equals "hi"
 * const eq: Eq = {operator: Operator.eq, fieldName: 'someField', value: 'hi'}
 */
export interface Eq extends FilterInterface {
    operator: Operator.eq;
    fieldName: string;
    value: any;
}
/**
 * @interface Ne
 * @member operator - `ne` not equal
 * @member fieldName - field witch has to be not equal to `value`
 * @member value - value to not match a field value. Value can be any type.
 * @example Filter where `someField` not equals "hi"
 * const ne: Ne = {operator: Operator.ne, fieldName: 'someField', value: 'hi'}
 */
export interface Ne extends FilterInterface {
    operator: Operator.ne;
    fieldName: string;
    value: any;
}
/**
 * @interface Lt
 * @member operator - `lt` less than
 * @member fieldName - field witch has to be less than to `value`
 * @member value - value compare field value to.
 * @example Filter where `someField` is less than 6
 * const lt: Lt = {operator: Operator.lt, fieldName: 'someField', value: 6}
 */
export interface Lt extends FilterInterface {
    operator: Operator.lt;
    fieldName: string;
    value: Literal;
}
/**
 * @interface Lte
 * @member operator - `lte` less than or equal
 * @member fieldName - field witch has to be less than or equal to `value`
 * @member value - value compare field value to.
 * @example Filter where `someField` is less than or equal to 6
 * const lte: Lte = {operator: Operator.lte, fieldName: 'someField', value: 6}
 */
export interface Lte extends FilterInterface {
    operator: Operator.lte;
    fieldName: string;
    value: Literal;
}
/**
 * @interface Gt
 * @member operator - `gt` greater than
 * @member fieldName - field witch has to be greater than to `value`
 * @member value - value compare field value to.
 * @example Filter where `someField` is greater than 6
 * const gt: Gt = {operator: Operator.gt, fieldName: 'someField', value: 6}
 */
export interface Gt extends FilterInterface {
    operator: Operator.gt;
    fieldName: string;
    value: Literal;
}
/**
 * @interface Gte
 * @member operator - `gte` greater than or equal
 * @member fieldName - field witch has to be greater than or equal to `value`
 * @member value - value compare field value to.
 * @example Filter where `someField` is greater than or equal to 6
 * const gte: Gte = {operator: Operator.gte, fieldName: 'someField', value: 6}
 */
export interface Gte extends FilterInterface {
    operator: Operator.gte;
    fieldName: string;
    value: Literal;
}
/**
 * @interface StartsWith
 * @member operator - `startsWith` starts with
 * @member fieldName - field witch has to start with `value`
 * @member value - value compare field value to.
 * @example Filter where `someField` starts with "hel"
 * const startsWith: StartsWith = {operator: Operator.startsWith, fieldName: 'someField', value: 'hel'}
 */
export interface StartsWith extends FilterInterface {
    operator: Operator.startsWith;
    fieldName: string;
    value: string;
}
/**
 * @interface EndsWith
 * @member operator - `endsWith` starts with
 * @member fieldName - field witch has to end with `value`
 * @member value - value compare field value to.
 * @example Filter where `someField` ends with "lo"
 * const endsWith: EndsWith = {operator: Operator.endsWith, fieldName: 'someField', value: 'lo'}
 */
export interface EndsWith extends FilterInterface {
    operator: Operator.endsWith;
    fieldName: string;
    value: string;
}
/**
 * @interface Urlized
 * Tokens should be joined using `-` or ` `. I.e. value ["hello", "world"] matches "hello world" and "hello-world".
 * @member operator - `urlized`
 * @member ignoreCase - case sensative or not
 * @member fieldName - field witch has to match urlized `value`
 * @member value - array of tokens
 * @example Filter where `someField` matches ["hello", "world"]
 * const matches: Matches = {operator: Operator.matches,
 * ignoreCase: true, fieldName: 'someField', value: ['hello', 'world']}
 */
export interface Urlized extends FilterInterface {
    operator: Operator.urlized;
    ignoreCase: boolean;
    fieldName: string;
    value: string[];
}
/**
 * @interface Contains
 * @member operator - `contains`
 * @member fieldName - field witch has to contain `value`
 * @member value - value compare field value to.
 * @example Filter where `someField` contains "ell"
 * const contains: Contains = {operator: Operator.contains, fieldName: 'someField', value: 'ell'}
 */
export interface Contains extends FilterInterface {
    operator: Operator.contains;
    fieldName: string;
    value: string;
}
/**
 * @interface HasSome
 * @member operator - `hasSome`
 * @member fieldName - field witch has to contain some of the values.
 * @member value - values compare field values to.
 * @example Filter where `someField` contains at least one of [1,2,3]
 * const hasSome: HasSome = {operator: Operator.hasSome, fieldName: 'someField', value: [1,2,3]}
 */
export interface HasSome extends FilterInterface {
    operator: Operator.hasSome;
    fieldName: string;
    value: Literal[];
}
/**
 * @interface HasAll
 * @member operator - `hasAll`
 * @member fieldName - field witch has to contain all of the values.
 * @member value - values compare field values to.
 * @example Filter where `someField` contains all of [1,2,3]
 * const hasAll: HasAll = {operator: Operator.hasAll, fieldName: 'someField', value: [1,2,3]}
 */
export interface HasAll extends FilterInterface {
    operator: Operator.hasAll;
    fieldName: string;
    value: Literal[];
}
