UNPKG

autumn-js

Version:
233 lines (230 loc) 7.39 kB
import * as _tanstack_react_query from '@tanstack/react-query'; import { e as ClientListEventsParams, L as ListEventsResponse, w as ListEventsList } from '../params-Bf18ATYi.mjs'; import { AutumnClientError } from '../client/AutumnClientError.mjs'; import { HookParams } from './types.mjs'; import '../plan-CUExbmy9.mjs'; type UseListEventsParams = HookParams<ClientListEventsParams, ListEventsResponse>; declare const useListEvents: (params?: UseListEventsParams) => { list: ListEventsList[] | undefined; hasMore: boolean; hasPrevious: boolean; page: number; nextPage: () => void; prevPage: () => void; goToPage: ({ pageNum }: { pageNum: number; }) => void; resetPagination: () => void; data: NoInfer<ListEventsResponse>; error: AutumnClientError; isError: true; isPending: false; isLoading: false; isLoadingError: false; isRefetchError: true; isSuccess: false; isPlaceholderData: false; status: "error"; dataUpdatedAt: number; errorUpdatedAt: number; failureCount: number; failureReason: AutumnClientError | null; errorUpdateCount: number; isFetched: boolean; isFetchedAfterMount: boolean; isFetching: boolean; isInitialLoading: boolean; isPaused: boolean; isRefetching: boolean; isStale: boolean; isEnabled: boolean; refetch: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult<NoInfer<ListEventsResponse>, AutumnClientError>>; fetchStatus: _tanstack_react_query.FetchStatus; promise: Promise<NoInfer<ListEventsResponse>>; } | { list: ListEventsList[] | undefined; hasMore: boolean; hasPrevious: boolean; page: number; nextPage: () => void; prevPage: () => void; goToPage: ({ pageNum }: { pageNum: number; }) => void; resetPagination: () => void; data: NoInfer<ListEventsResponse>; error: null; isError: false; isPending: false; isLoading: false; isLoadingError: false; isRefetchError: false; isSuccess: true; isPlaceholderData: false; status: "success"; dataUpdatedAt: number; errorUpdatedAt: number; failureCount: number; failureReason: AutumnClientError | null; errorUpdateCount: number; isFetched: boolean; isFetchedAfterMount: boolean; isFetching: boolean; isInitialLoading: boolean; isPaused: boolean; isRefetching: boolean; isStale: boolean; isEnabled: boolean; refetch: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult<NoInfer<ListEventsResponse>, AutumnClientError>>; fetchStatus: _tanstack_react_query.FetchStatus; promise: Promise<NoInfer<ListEventsResponse>>; } | { list: ListEventsList[] | undefined; hasMore: boolean; hasPrevious: boolean; page: number; nextPage: () => void; prevPage: () => void; goToPage: ({ pageNum }: { pageNum: number; }) => void; resetPagination: () => void; data: undefined; error: AutumnClientError; isError: true; isPending: false; isLoading: false; isLoadingError: true; isRefetchError: false; isSuccess: false; isPlaceholderData: false; status: "error"; dataUpdatedAt: number; errorUpdatedAt: number; failureCount: number; failureReason: AutumnClientError | null; errorUpdateCount: number; isFetched: boolean; isFetchedAfterMount: boolean; isFetching: boolean; isInitialLoading: boolean; isPaused: boolean; isRefetching: boolean; isStale: boolean; isEnabled: boolean; refetch: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult<NoInfer<ListEventsResponse>, AutumnClientError>>; fetchStatus: _tanstack_react_query.FetchStatus; promise: Promise<NoInfer<ListEventsResponse>>; } | { list: ListEventsList[] | undefined; hasMore: boolean; hasPrevious: boolean; page: number; nextPage: () => void; prevPage: () => void; goToPage: ({ pageNum }: { pageNum: number; }) => void; resetPagination: () => void; data: undefined; error: null; isError: false; isPending: true; isLoading: true; isLoadingError: false; isRefetchError: false; isSuccess: false; isPlaceholderData: false; status: "pending"; dataUpdatedAt: number; errorUpdatedAt: number; failureCount: number; failureReason: AutumnClientError | null; errorUpdateCount: number; isFetched: boolean; isFetchedAfterMount: boolean; isFetching: boolean; isInitialLoading: boolean; isPaused: boolean; isRefetching: boolean; isStale: boolean; isEnabled: boolean; refetch: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult<NoInfer<ListEventsResponse>, AutumnClientError>>; fetchStatus: _tanstack_react_query.FetchStatus; promise: Promise<NoInfer<ListEventsResponse>>; } | { list: ListEventsList[] | undefined; hasMore: boolean; hasPrevious: boolean; page: number; nextPage: () => void; prevPage: () => void; goToPage: ({ pageNum }: { pageNum: number; }) => void; resetPagination: () => void; data: undefined; error: null; isError: false; isPending: true; isLoadingError: false; isRefetchError: false; isSuccess: false; isPlaceholderData: false; status: "pending"; dataUpdatedAt: number; errorUpdatedAt: number; failureCount: number; failureReason: AutumnClientError | null; errorUpdateCount: number; isFetched: boolean; isFetchedAfterMount: boolean; isFetching: boolean; isLoading: boolean; isInitialLoading: boolean; isPaused: boolean; isRefetching: boolean; isStale: boolean; isEnabled: boolean; refetch: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult<NoInfer<ListEventsResponse>, AutumnClientError>>; fetchStatus: _tanstack_react_query.FetchStatus; promise: Promise<NoInfer<ListEventsResponse>>; } | { list: ListEventsList[] | undefined; hasMore: boolean; hasPrevious: boolean; page: number; nextPage: () => void; prevPage: () => void; goToPage: ({ pageNum }: { pageNum: number; }) => void; resetPagination: () => void; data: NoInfer<ListEventsResponse>; isError: false; error: null; isPending: false; isLoading: false; isLoadingError: false; isRefetchError: false; isSuccess: true; isPlaceholderData: true; status: "success"; dataUpdatedAt: number; errorUpdatedAt: number; failureCount: number; failureReason: AutumnClientError | null; errorUpdateCount: number; isFetched: boolean; isFetchedAfterMount: boolean; isFetching: boolean; isInitialLoading: boolean; isPaused: boolean; isRefetching: boolean; isStale: boolean; isEnabled: boolean; refetch: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult<NoInfer<ListEventsResponse>, AutumnClientError>>; fetchStatus: _tanstack_react_query.FetchStatus; promise: Promise<NoInfer<ListEventsResponse>>; }; export { type UseListEventsParams, useListEvents };