from typing import Literal
from typing_extensions import TypedDict


COMPARATOR_TYPE_EQUAL_TO = "COMPARATOR_TYPE_EQUAL_TO"
COMPARATOR_TYPE_NOT_EQUAL_TO = "COMPARATOR_TYPE_NOT_EQUAL_TO"
COMPARATOR_TYPE_GREATER_THAN = "COMPARATOR_TYPE_GREATER_THAN"
COMPARATOR_TYPE_LESS_THAN = "COMPARATOR_TYPE_LESS_THAN"
COMPARATOR_TYPE_GREATER_THAN_EQUAL_TO = "COMPARATOR_TYPE_GREATER_THAN_EQUAL_TO"
COMPARATOR_TYPE_LESS_THAN_EQUAL_TO = "COMPARATOR_TYPE_LESS_THAN_EQUAL_TO"
COMPARATOR_TYPE_EXISTS = "COMPARATOR_TYPE_EXISTS"
COMPARATOR_TYPE_NOT_EXISTS = "COMPARATOR_TYPE_NOT_EXISTS"
COMPARATOR_TYPE_LIST_CONTAINS = "COMPARATOR_TYPE_LIST_CONTAINS"
COMPARATOR_TYPE_LIST_NOT_CONTAINS = "COMPARATOR_TYPE_LIST_NOT_CONTAINS"
COMPARATOR_TYPE_STRING_CONTAINS = "COMPARATOR_TYPE_STRING_CONTAINS"
COMPARATOR_TYPE_STRING_NOT_CONTAINS = "COMPARATOR_TYPE_STRING_NOT_CONTAINS"
COMPARATOR_TYPE_ONE_OF_LIST = "COMPARATOR_TYPE_ONE_OF_LIST"
COMPARATOR_TYPE_NONE_OF_LIST = "COMPARATOR_TYPE_NONE_OF_LIST"

COMPARATOR_TYPE = Literal[
    "COMPARATOR_TYPE_EQUAL_TO",
    "COMPARATOR_TYPE_NOT_EQUAL_TO",
    "COMPARATOR_TYPE_GREATER_THAN",
    "COMPARATOR_TYPE_LESS_THAN",
    "COMPARATOR_TYPE_GREATER_THAN_EQUAL_TO",
    "COMPARATOR_TYPE_LESS_THAN_EQUAL_TO",
    "COMPARATOR_TYPE_EXISTS",
    "COMPARATOR_TYPE_NOT_EXISTS",
    "COMPARATOR_TYPE_LIST_CONTAINS",
    "COMPARATOR_TYPE_LIST_NOT_CONTAINS",
    "COMPARATOR_TYPE_STRING_CONTAINS",
    "COMPARATOR_TYPE_STRING_NOT_CONTAINS",
    "COMPARATOR_TYPE_ONE_OF_LIST",
    "COMPARATOR_TYPE_NONE_OF_LIST"
]

PROPERTY_CONSTRAINT_TYPE = "PROPERTY_CONSTRAINT_TYPE"
CLASS_CONSTRAINT_TYPE = "CLASS_CONSTRAINT_TYPE"
VECTOR_CONSTRAINT_TYPE = "VECTOR_CONSTRAINT_TYPE"

CONSTRAINT_TYPE = Literal[
    "PROPERTY_CONSTRAINT_TYPE",
    "CLASS_CONSTRAINT_TYPE",
    "VECTOR_CONSTRAINT_TYPE"
]


class MetaQLConstraint(TypedDict):

    metaql_class: str

    constraint_type: CONSTRAINT_TYPE
