# Path: aiohttp_json_api/common.py
# JSONAPI = 'jsonapi'
# JSONAPI_CONTENT_TYPE = 'application/vnd.api+json'
# JSONAPI_CONTENT_TYPE_PARSED = parse_media_range(JSONAPI_CONTENT_TYPE)
# ALLOWED_MEMBER_NAME_RULE = \
#     r'[a-zA-Z0-9]([a-zA-Z0-9\-_]+[a-zA-Z0-9]|[a-zA-Z0-9]?)'
# ALLOWED_MEMBER_NAME_REGEX = re.compile('^' + ALLOWED_MEMBER_NAME_RULE + '$')
#     ASC = '+'
#     DESC = '-'
#     BEFORE_DESERIALIZATION = auto()
#     AFTER_DESERIALIZATION = auto()
#     BEFORE_SERIALIZATION = auto()
#     AFTER_SERIALIZATION = auto()
#     GET = auto()
#     POST = auto()
#     PATCH = auto()
#     DELETE = auto()
#     NEVER = auto()
#     ALWAYS = GET | POST | PATCH | DELETE
#     CREATE = POST
#     UPDATE = PATCH
#     TO_ONE = auto()
#     TO_MANY = auto()
# class SortDirection(Enum):
# class Step(Enum):
# class Event(Flag):
# class Relation(Enum):


from typing import (
    Callable, Coroutine, Dict, MutableMapping, Tuple, Union, Optional
)
from .common import FilterRule, ResourceID, SortDirection
"""Useful typing."""

# pylint: disable=C0103


#: Type for Request filters
RequestFilters = MutableMapping[str, FilterRule]

#: Type for Request fields
RequestFields = MutableMapping[str, Tuple[str, ...]]

#: Type for Request includes (compound documents)
RequestIncludes = Tuple[Tuple[str, ...], ...]

#: Type for Request sorting parameters

# Path: aiohttp_json_api/common.py
# JSONAPI = 'jsonapi'
# JSONAPI_CONTENT_TYPE = 'application/vnd.api+json'
# JSONAPI_CONTENT_TYPE_PARSED = parse_media_range(JSONAPI_CONTENT_TYPE)
# ALLOWED_MEMBER_NAME_RULE = \
#     r'[a-zA-Z0-9]([a-zA-Z0-9\-_]+[a-zA-Z0-9]|[a-zA-Z0-9]?)'
# ALLOWED_MEMBER_NAME_REGEX = re.compile('^' + ALLOWED_MEMBER_NAME_RULE + '$')
#     ASC = '+'
#     DESC = '-'
#     BEFORE_DESERIALIZATION = auto()
#     AFTER_DESERIALIZATION = auto()
#     BEFORE_SERIALIZATION = auto()
#     AFTER_SERIALIZATION = auto()
#     GET = auto()
#     POST = auto()
#     PATCH = auto()
#     DELETE = auto()
#     NEVER = auto()
#     ALWAYS = GET | POST | PATCH | DELETE
#     CREATE = POST
#     UPDATE = PATCH
#     TO_ONE = auto()
#     TO_MANY = auto()
# class SortDirection(Enum):
# class Step(Enum):
# class Event(Flag):
# class Relation(Enum):


# Path: aiohttp_json_api/typings.py
from typing import (
    Callable, Coroutine, Dict, MutableMapping, Tuple, Union, Optional
)
from .common import FilterRule, ResourceID, SortDirection

"""Useful typing."""

# pylint: disable=C0103


#: Type for Request filters
RequestFilters = MutableMapping[str, FilterRule]

#: Type for Request fields
RequestFields = MutableMapping[str, Tuple[str, ...]]

#: Type for Request includes (compound documents)
RequestIncludes = Tuple[Tuple[str, ...], ...]

#: Type for Request sorting parameters

RequestSorting = MutableMapping[Tuple[str, ...], SortDirection]