"""Logic for store.""" from typing import Any from store.models import store def get_stores( supports_timed_release: bool | None = None, classification_id: int | None = None, statuses: list[str] | None = None, order_by: str | None = None, order_dir: str | None = None, ) -> list[dict[str, Any]]: """Return stores. Args: supports_timed_release(bool or None): if present, filter result set by whether supports_timed_release is 'Y' or 'N'. If None, do not filter. classification_id(Int or None): if present, filter result set by whether the store has a coresponding store_classification_detail matching the id. statuses(list(string) or None): if present, filter by provided statues order_by(string or None): order_by database column order_dir(string or None): order_dir for database sorting (either 'asc' or 'desc') Returns: list: stores. """ return store.get_stores( supports_timed_release=supports_timed_release, classification_id=classification_id, statuses=statuses, order_by=order_by, order_dir=order_dir, ) def get_stores_by_ids(store_ids: list[int]) -> list[dict[str, Any]]: """Return stores by store IDs. Args: store_ids(list(int)): list of store IDs Returns: list: Response containing the stores. """ return store.get_stores_by_ids(store_ids) def get_store_classifications_by_store_ids( store_ids: list[int], ) -> list[dict[str, Any]]: """Return store classifications by store IDs. Args: store_ids(list(int)): list of store IDs Returns: list: Response containing the classifications for each store. """ return store.get_store_classifications_by_store_ids(store_ids)