import { Event, EventStatus, EventType, RsvpStatus } from "../../interfaces/models/Event"; import { EventDescriptionFilters, EventLocationFilters, EventTitleFilters } from "./useFetchManyEvents"; type EventSortBy = "startTime" | "going"; type EventSortDir = "asc" | "desc"; type EventTimeWindow = "upcoming" | "ongoing" | "past"; export interface UseFetchManyEventsWrapperProps { limit?: number; spaceId?: string | null; hostId?: string | null; type?: EventType | null; status?: EventStatus | null; timeWindow?: EventTimeWindow | null; startsAfter?: string | null; startsBefore?: string | null; myRsvp?: RsvpStatus | RsvpStatus[] | null; locationFilters?: EventLocationFilters | null; titleFilters?: EventTitleFilters | null; descriptionFilters?: EventDescriptionFilters | null; include?: string | string[]; defaultSortBy?: EventSortBy; defaultSortDir?: EventSortDir; } export interface UseFetchManyEventsWrapperValues { events: Event[]; loading: boolean; hasMore: boolean; sortBy: EventSortBy; sortDir: EventSortDir; setSortBy: (newSortBy: EventSortBy) => void; setSortDir: (newSortDir: EventSortDir) => void; loadMore: () => void; /** Re-run the query from page 1 (e.g. after creating/cancelling an event). */ refresh: () => void; } declare function useFetchManyEventsWrapper(props?: UseFetchManyEventsWrapperProps): UseFetchManyEventsWrapperValues; export default useFetchManyEventsWrapper;