import type { DefaultError, FetchQueryOptions, GetNextPageParamFunction, InitialPageParam, QueryFunction } from '@tanstack/react-query'; import type { AreAllOptional } from './AreAllOptional.js'; import type { DeepReadonly } from './DeepReadonly.js'; import type { OperationInfiniteData } from './OperationInfiniteData.js'; import type { PartialParameters } from './PartialParameters.js'; import type { RequestFn } from './RequestFn.js'; import type { ServiceOperationInfiniteQueryKey } from './ServiceOperationKey.js'; export type ServiceOperationFetchInfiniteQueryOptions = (FetchInfiniteQueryOptionsByQueryKey & FetchInfiniteQueryOptionsQueryFn) | (FetchInfiniteQueryOptionsByParameters & FetchInfiniteQueryOptionsQueryFn); export type ServiceOperationEnsureInfiniteQueryDataOptions = ((FetchInfiniteQueryOptionsByQueryKey & FetchInfiniteQueryOptionsQueryFn) & { revalidateIfStale?: boolean; }) | ((FetchInfiniteQueryOptionsByParameters & FetchInfiniteQueryOptionsQueryFn) & { revalidateIfStale?: boolean; }); type FetchInfiniteQueryPages = { pages?: never; } | { pages: number; getNextPageParam: GetNextPageParamFunction>, TQueryFnData>; }; type FetchInfiniteQueryOptionsBase = Omit, ServiceOperationInfiniteQueryKey, TPageParam>, 'queryKey' | 'initialPageParam'> & (AreAllOptional extends true ? Partial>> : InitialPageParam>) & FetchInfiniteQueryPages; type FetchInfiniteQueryOptionsByQueryKey = FetchInfiniteQueryOptionsBase & (AreAllOptional extends true ? Partial> : FetchInfiniteQueryOptionsQueryKey); type FetchInfiniteQueryOptionsQueryKey = { /** * Fetch Queries by query key */ queryKey: ServiceOperationInfiniteQueryKey; parameters?: never; }; type FetchInfiniteQueryOptionsByParameters = FetchInfiniteQueryOptionsBase & (AreAllOptional extends true ? Partial> : FetchInfiniteQueryOptionsParameters); type FetchInfiniteQueryOptionsParameters = { /** * Fetch Queries by parameters */ parameters: DeepReadonly; queryKey?: never; }; type FetchInfiniteQueryOptionsQueryFn = { queryFn: QueryFunction>; } | { /** * Custom request function to use for the query */ requestFn?: RequestFn; /** * Base URL to use for the request (used in the `queryFn`) * @example 'https://api.example.com' */ baseUrl?: string | undefined; queryFn?: never; }; export {}; //# sourceMappingURL=ServiceOperationFetchInfiniteQueryOptions.d.ts.map