@tanstack/query-core 5.107.2 → 5.108.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (139) hide show
  1. package/build/legacy/{classPrivateFieldSet2-CWIQ5CvM.js → classPrivateFieldSet2-CglF-xxj.js} +5 -5
  2. package/build/legacy/{classPrivateFieldSet2-C_J9s9he.cjs → classPrivateFieldSet2-LWt41url.cjs} +5 -5
  3. package/build/legacy/{classPrivateMethodInitSpec-DipaBicy.js → classPrivateMethodInitSpec-C9TccUj9.js} +2 -2
  4. package/build/legacy/{classPrivateMethodInitSpec-BMGv9vbZ.cjs → classPrivateMethodInitSpec-Dedwf6gV.cjs} +2 -2
  5. package/build/legacy/focusManager.cjs +1 -1
  6. package/build/legacy/focusManager.js +1 -1
  7. package/build/legacy/{hydration-Cbq_heQS.d.ts → hydration-C1yRFalg.d.ts} +26 -25
  8. package/build/legacy/hydration-C1yRFalg.d.ts.map +1 -0
  9. package/build/legacy/{hydration-24GwbSaU.d.cts → hydration-DO-vzqvp.d.cts} +26 -25
  10. package/build/legacy/hydration-DO-vzqvp.d.cts.map +1 -0
  11. package/build/legacy/hydration.d.cts +1 -1
  12. package/build/legacy/hydration.d.ts +1 -1
  13. package/build/legacy/index.cjs +9 -9
  14. package/build/legacy/index.d.cts +2 -2
  15. package/build/legacy/index.d.ts +2 -2
  16. package/build/legacy/index.js +9 -9
  17. package/build/legacy/infiniteQueryBehavior.d.cts +1 -1
  18. package/build/legacy/infiniteQueryBehavior.d.ts +1 -1
  19. package/build/legacy/infiniteQueryObserver.d.cts +1 -1
  20. package/build/legacy/infiniteQueryObserver.d.ts +1 -1
  21. package/build/legacy/mutation.cjs +2 -2
  22. package/build/legacy/mutation.d.cts +1 -1
  23. package/build/legacy/mutation.d.ts +1 -1
  24. package/build/legacy/mutation.js +2 -2
  25. package/build/legacy/mutationCache.cjs +4 -4
  26. package/build/legacy/mutationCache.d.cts +1 -1
  27. package/build/legacy/mutationCache.d.ts +1 -1
  28. package/build/legacy/mutationCache.js +4 -4
  29. package/build/legacy/mutationObserver.cjs +5 -5
  30. package/build/legacy/mutationObserver.d.cts +1 -1
  31. package/build/legacy/mutationObserver.d.ts +1 -1
  32. package/build/legacy/mutationObserver.js +5 -5
  33. package/build/legacy/onlineManager.cjs +1 -1
  34. package/build/legacy/onlineManager.js +1 -1
  35. package/build/legacy/queriesObserver.cjs +4 -4
  36. package/build/legacy/queriesObserver.d.cts +1 -1
  37. package/build/legacy/queriesObserver.d.ts +1 -1
  38. package/build/legacy/queriesObserver.js +4 -4
  39. package/build/legacy/query.cjs +3 -3
  40. package/build/legacy/query.d.cts +1 -1
  41. package/build/legacy/query.d.ts +1 -1
  42. package/build/legacy/query.js +3 -3
  43. package/build/legacy/queryCache.cjs +3 -3
  44. package/build/legacy/queryCache.d.cts +1 -1
  45. package/build/legacy/queryCache.d.ts +1 -1
  46. package/build/legacy/queryCache.js +3 -3
  47. package/build/legacy/queryClient.cjs +16 -15
  48. package/build/legacy/queryClient.cjs.map +1 -1
  49. package/build/legacy/queryClient.d.cts +1 -1
  50. package/build/legacy/queryClient.d.ts +1 -1
  51. package/build/legacy/queryClient.js +16 -15
  52. package/build/legacy/queryClient.js.map +1 -1
  53. package/build/legacy/queryObserver.cjs +5 -5
  54. package/build/legacy/queryObserver.d.cts +1 -1
  55. package/build/legacy/queryObserver.d.ts +1 -1
  56. package/build/legacy/queryObserver.js +5 -5
  57. package/build/legacy/removable.cjs +2 -2
  58. package/build/legacy/removable.js +2 -2
  59. package/build/legacy/retryer.cjs +1 -1
  60. package/build/legacy/retryer.d.cts +1 -1
  61. package/build/legacy/retryer.d.ts +1 -1
  62. package/build/legacy/retryer.js +1 -1
  63. package/build/legacy/streamedQuery.d.cts +1 -1
  64. package/build/legacy/streamedQuery.d.ts +1 -1
  65. package/build/legacy/timeoutManager.cjs +1 -1
  66. package/build/legacy/timeoutManager.js +1 -1
  67. package/build/legacy/types.cjs.map +1 -1
  68. package/build/legacy/types.d.cts +1 -1
  69. package/build/legacy/types.d.ts +1 -1
  70. package/build/legacy/types.js.map +1 -1
  71. package/build/legacy/utils.d.cts +1 -1
  72. package/build/legacy/utils.d.ts +1 -1
  73. package/build/modern/{hydration-Cbq_heQS.d.ts → hydration-C1yRFalg.d.ts} +26 -25
  74. package/build/modern/hydration-C1yRFalg.d.ts.map +1 -0
  75. package/build/modern/{hydration-24GwbSaU.d.cts → hydration-DO-vzqvp.d.cts} +26 -25
  76. package/build/modern/hydration-DO-vzqvp.d.cts.map +1 -0
  77. package/build/modern/hydration.d.cts +1 -1
  78. package/build/modern/hydration.d.ts +1 -1
  79. package/build/modern/index.cjs +9 -9
  80. package/build/modern/index.d.cts +2 -2
  81. package/build/modern/index.d.ts +2 -2
  82. package/build/modern/index.js +9 -9
  83. package/build/modern/infiniteQueryBehavior.d.cts +1 -1
  84. package/build/modern/infiniteQueryBehavior.d.ts +1 -1
  85. package/build/modern/infiniteQueryObserver.d.cts +1 -1
  86. package/build/modern/infiniteQueryObserver.d.ts +1 -1
  87. package/build/modern/mutation.d.cts +1 -1
  88. package/build/modern/mutation.d.ts +1 -1
  89. package/build/modern/mutationCache.cjs +3 -3
  90. package/build/modern/mutationCache.d.cts +1 -1
  91. package/build/modern/mutationCache.d.ts +1 -1
  92. package/build/modern/mutationCache.js +3 -3
  93. package/build/modern/mutationObserver.cjs +3 -3
  94. package/build/modern/mutationObserver.d.cts +1 -1
  95. package/build/modern/mutationObserver.d.ts +1 -1
  96. package/build/modern/mutationObserver.js +3 -3
  97. package/build/modern/queriesObserver.cjs +2 -2
  98. package/build/modern/queriesObserver.d.cts +1 -1
  99. package/build/modern/queriesObserver.d.ts +1 -1
  100. package/build/modern/queriesObserver.js +2 -2
  101. package/build/modern/query.cjs +1 -1
  102. package/build/modern/query.d.cts +1 -1
  103. package/build/modern/query.d.ts +1 -1
  104. package/build/modern/query.js +1 -1
  105. package/build/modern/queryCache.cjs +2 -2
  106. package/build/modern/queryCache.d.cts +1 -1
  107. package/build/modern/queryCache.d.ts +1 -1
  108. package/build/modern/queryCache.js +2 -2
  109. package/build/modern/queryClient.cjs +15 -14
  110. package/build/modern/queryClient.cjs.map +1 -1
  111. package/build/modern/queryClient.d.cts +1 -1
  112. package/build/modern/queryClient.d.ts +1 -1
  113. package/build/modern/queryClient.js +15 -14
  114. package/build/modern/queryClient.js.map +1 -1
  115. package/build/modern/queryObserver.cjs +3 -3
  116. package/build/modern/queryObserver.d.cts +1 -1
  117. package/build/modern/queryObserver.d.ts +1 -1
  118. package/build/modern/queryObserver.js +3 -3
  119. package/build/modern/removable.cjs +1 -1
  120. package/build/modern/removable.js +1 -1
  121. package/build/modern/retryer.cjs +1 -1
  122. package/build/modern/retryer.d.cts +1 -1
  123. package/build/modern/retryer.d.ts +1 -1
  124. package/build/modern/retryer.js +1 -1
  125. package/build/modern/streamedQuery.d.cts +1 -1
  126. package/build/modern/streamedQuery.d.ts +1 -1
  127. package/build/modern/types.cjs.map +1 -1
  128. package/build/modern/types.d.cts +1 -1
  129. package/build/modern/types.d.ts +1 -1
  130. package/build/modern/types.js.map +1 -1
  131. package/build/modern/utils.d.cts +1 -1
  132. package/build/modern/utils.d.ts +1 -1
  133. package/package.json +1 -1
  134. package/src/queryClient.ts +13 -12
  135. package/src/types.ts +19 -19
  136. package/build/legacy/hydration-24GwbSaU.d.cts.map +0 -1
  137. package/build/legacy/hydration-Cbq_heQS.d.ts.map +0 -1
  138. package/build/modern/hydration-24GwbSaU.d.cts.map +0 -1
  139. package/build/modern/hydration-Cbq_heQS.d.ts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","names":[],"sources":["../../src/types.ts"],"sourcesContent":["/* istanbul ignore file */\n\nimport type { DehydrateOptions, HydrateOptions } from './hydration'\nimport type { MutationState } from './mutation'\nimport type { MutationCache } from './mutationCache'\nimport type { FetchDirection, Query, QueryBehavior } from './query'\nimport type { QueryCache } from './queryCache'\nimport type { QueryClient } from './queryClient'\nimport type { RetryDelayValue, RetryValue } from './retryer'\nimport type { QueryFilters, QueryTypeFilter, SkipToken } from './utils'\n\n/**\n * Excludes `undefined` from `T`. Used where a value must be defined, such as the data type that a\n * defined `initialData` resolves to.\n */\nexport type NonUndefinedGuard<T> = T extends undefined ? never : T\n\n/**\n * Like `Omit`, but applied to each member of a union separately, so each member keeps its own keys.\n */\nexport type DistributiveOmit<\n TObject,\n TKey extends keyof TObject,\n> = TObject extends any ? Omit<TObject, TKey> : never\n\n/**\n * Like `Omit`, but by default (`'strictly'`) `TKey` must be a key of `TObject`, so omitting a key\n * that doesn't exist is a type error. Pass `'safely'` to allow other keys too.\n */\nexport type OmitKeyof<\n TObject,\n TKey extends (TStrictly extends 'safely'\n ?\n | keyof TObject\n | (string & Record<never, never>)\n | (number & Record<never, never>)\n | (symbol & Record<never, never>)\n : keyof TObject),\n TStrictly extends 'strictly' | 'safely' = 'strictly',\n> = Omit<TObject, TKey>\n\n/**\n * Replaces the types of the properties of `TTargetA` that also exist in `TTargetB` with their types\n * in `TTargetB`. Properties that only exist in `TTargetB` are not added.\n */\nexport type Override<TTargetA, TTargetB> = {\n [AKey in keyof TTargetA]: AKey extends keyof TTargetB\n ? TTargetB[AKey]\n : TTargetA[AKey]\n}\n\n/**\n * The interface to augment via declaration merging to override Query's default types repository-wide.\n * Each field it declares replaces the default of the matching type: `defaultError` for {@link DefaultError},\n * `queryKey` for {@link QueryKey}, `mutationKey` for {@link MutationKey}, `queryMeta` for {@link QueryMeta} and\n * `mutationMeta` for {@link MutationMeta}. Leave a field out to keep that type's default.\n * Augment the module you install — `@tanstack/react-query`, `@tanstack/vue-query`,\n * `@tanstack/solid-query`, `@tanstack/svelte-query`, `@tanstack/preact-query`,\n * `@tanstack/angular-query-experimental` or `@tanstack/lit-query`. Augmenting `@tanstack/query-core`\n * works too and covers every adapter at once.\n * @example\n * ```ts\n * // Use the module you installed — here, the React adapter.\n * declare module '@tanstack/react-query' {\n * interface Register {\n * defaultError: AxiosError\n * }\n * }\n * ```\n */\nexport interface Register {\n // defaultError: Error\n // queryMeta: Record<string, unknown>\n // mutationMeta: Record<string, unknown>\n // queryKey: ReadonlyArray<unknown>\n // mutationKey: ReadonlyArray<unknown>\n}\n\n/**\n * The error type used wherever an error is not given an explicit type parameter.\n * Defaults to `Error`; declare `defaultError` on {@link Register} to change it everywhere at once.\n */\nexport type DefaultError = Register extends {\n defaultError: infer TError\n}\n ? TError\n : Error\n\n/**\n * The type of a query key — the serializable array that identifies a query in the cache.\n * Defaults to `ReadonlyArray<unknown>`; declare `queryKey` on {@link Register} to narrow it repository-wide.\n */\nexport type QueryKey = Register extends {\n queryKey: infer TQueryKey\n}\n ? TQueryKey extends ReadonlyArray<unknown>\n ? TQueryKey\n : TQueryKey extends Array<unknown>\n ? TQueryKey\n : ReadonlyArray<unknown>\n : ReadonlyArray<unknown>\n\nexport const dataTagSymbol = Symbol()\n/**\n * The type of the `dataTagSymbol` key, under which a {@link DataTag} stores its data type.\n */\nexport type dataTagSymbol = typeof dataTagSymbol\nexport const dataTagErrorSymbol = Symbol()\n/**\n * The type of the `dataTagErrorSymbol` key, under which a {@link DataTag} stores its error type.\n */\nexport type dataTagErrorSymbol = typeof dataTagErrorSymbol\nexport const unsetMarker = Symbol()\n/**\n * The type of `unsetMarker`, the default error type of a {@link DataTag}. It marks that no error\n * type was tagged.\n */\nexport type UnsetMarker = typeof unsetMarker\n/**\n * Matches any type that has been tagged with {@link DataTag}, whatever its data and error types.\n */\nexport type AnyDataTag = {\n /**\n * The data type the key was tagged with.\n */\n [dataTagSymbol]: any\n /**\n * The error type the key was tagged with.\n */\n [dataTagErrorSymbol]: any\n}\n/**\n * Tags `TType` (usually a query key) with a data type and an optional error type, so that APIs that\n * receive it, like `queryClient.getQueryData`, can infer them. A type that is already tagged is\n * returned as is.\n */\nexport type DataTag<\n TType,\n TValue,\n TError = UnsetMarker,\n> = TType extends AnyDataTag\n ? TType\n : TType & {\n [dataTagSymbol]: TValue\n [dataTagErrorSymbol]: TError\n }\n\n/**\n * An object whose `queryKey` is tagged with {@link DataTag}, like the options returned by\n * `queryOptions`.\n */\nexport type QueryKeyWithDataTag<\n TQueryKey extends QueryKey = QueryKey,\n TQueryFnData = unknown,\n TError = DefaultError,\n> = {\n /**\n * The query key, tagged with the query's data and error types.\n */\n queryKey: DataTag<TQueryKey, TQueryFnData, TError>\n}\n\n/**\n * The data type tagged on a query key by {@link DataTag}, or `TQueryFnData` if the key is not\n * tagged.\n */\nexport type InferDataFromTag<TQueryFnData, TTaggedQueryKey extends QueryKey> =\n TTaggedQueryKey extends DataTag<unknown, infer TaggedValue, unknown>\n ? TaggedValue\n : TQueryFnData\n\n/**\n * The error type tagged on a query key by {@link DataTag}, or `TError` if the key is not tagged or\n * was tagged without an error type.\n */\nexport type InferErrorFromTag<TError, TTaggedQueryKey extends QueryKey> =\n TTaggedQueryKey extends DataTag<unknown, unknown, infer TaggedError>\n ? TaggedError extends UnsetMarker\n ? TError\n : TaggedError\n : TError\n\n/** @inline */\nexport type QueryFunction<\n T = unknown,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = never,\n> = (context: QueryFunctionContext<TQueryKey, TPageParam>) => T | Promise<T>\n\n/** @inline */\nexport type StaleTime = number | 'static'\n\n/** @inline */\nexport type StaleTimeFunction<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n> =\n | StaleTime\n | ((query: Query<TQueryFnData, TError, TData, TQueryKey>) => StaleTime)\n\n/** @inline */\nexport type QueryBooleanOption<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n> =\n | boolean\n | ((query: Query<TQueryFnData, TError, TData, TQueryKey>) => boolean)\n\n/** @inline */\nexport type QueryPersister<\n T = unknown,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = never,\n> = [TPageParam] extends [never]\n ? (\n queryFn: QueryFunction<T, TQueryKey, never>,\n context: QueryFunctionContext<TQueryKey>,\n query: Query,\n ) => T | Promise<T>\n : (\n queryFn: QueryFunction<T, TQueryKey, TPageParam>,\n context: QueryFunctionContext<TQueryKey>,\n query: Query,\n ) => T | Promise<T>\n\n/**\n * The object passed to `queryFn`: the `QueryClient`, the `queryKey`, an `AbortSignal` that aborts\n * when the query is cancelled, the query's `meta`, and for infinite queries the `pageParam` of the\n * page being fetched.\n */\nexport type QueryFunctionContext<\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = never,\n> = [TPageParam] extends [never]\n ? {\n client: QueryClient\n queryKey: TQueryKey\n signal: AbortSignal\n meta: QueryMeta | undefined\n pageParam?: unknown\n /**\n * @deprecated\n * if you want access to the direction, you can add it to the pageParam\n */\n direction?: unknown\n }\n : {\n client: QueryClient\n queryKey: TQueryKey\n signal: AbortSignal\n pageParam: TPageParam\n /**\n * @deprecated\n * if you want access to the direction, you can add it to the pageParam\n */\n direction: FetchDirection\n meta: QueryMeta | undefined\n }\n\n/** @inline */\nexport type InitialDataFunction<T> = () => T | undefined\n\n// oxlint-disable-next-line typescript/no-unsafe-function-type -- excludes every function-like value, including constructors, from the value branch\ntype NonFunctionGuard<T> = T extends Function ? never : T\n\n/** @inline */\nexport type PlaceholderDataFunction<\n TQueryFnData = unknown,\n TError = DefaultError,\n TQueryData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n> = (\n previousData: TQueryData | undefined,\n previousQuery: Query<TQueryFnData, TError, TQueryData, TQueryKey> | undefined,\n) => TQueryData | undefined\n\n/**\n * The `placeholderData` function of a query in `useQueries` and its counterparts. Unlike\n * {@link PlaceholderDataFunction}, it receives no previous data or query, because the number of\n * queries can differ between renders.\n */\nexport type QueriesPlaceholderDataFunction<TQueryData> = (\n previousData: undefined,\n previousQuery: undefined,\n) => TQueryData | undefined\n\n/** @inline */\nexport type QueryKeyHashFunction<TQueryKey extends QueryKey> = (\n queryKey: TQueryKey,\n) => string\n\n/** @inline */\nexport type GetPreviousPageParamFunction<TPageParam, TQueryFnData = unknown> = (\n firstPage: TQueryFnData,\n allPages: Array<TQueryFnData>,\n firstPageParam: TPageParam,\n allPageParams: Array<TPageParam>,\n) => TPageParam | undefined | null\n\n/** @inline */\nexport type GetNextPageParamFunction<TPageParam, TQueryFnData = unknown> = (\n lastPage: TQueryFnData,\n allPages: Array<TQueryFnData>,\n lastPageParam: TPageParam,\n allPageParams: Array<TPageParam>,\n) => TPageParam | undefined | null\n\n/**\n * The data shape of an infinite query: every page fetched so far, plus the page param each one was fetched with.\n * `pages` and `pageParams` are index-aligned — `pageParams[i]` is the param that produced `pages[i]`.\n */\nexport interface InfiniteData<TData, TPageParam = unknown> {\n /**\n * The data of every page fetched so far, in order.\n */\n pages: Array<TData>\n /**\n * The page param each page was fetched with, aligned by index with `pages`.\n */\n pageParams: Array<TPageParam>\n}\n\n/**\n * The type of the `meta` object that can be attached to a query and read back from `queryFn`, callbacks and\n * cache-level handlers. Defaults to `Record<string, unknown>`; declare `queryMeta` on {@link Register} to narrow it.\n */\nexport type QueryMeta = Register extends {\n queryMeta: infer TQueryMeta\n}\n ? TQueryMeta extends Record<string, unknown>\n ? TQueryMeta\n : Record<string, unknown>\n : Record<string, unknown>\n\n/** @inline */\nexport type NetworkMode = 'online' | 'always' | 'offlineFirst'\n\n/** @inline */\nexport type NotifyOnChangeProps =\n | Array<keyof InfiniteQueryObserverResult>\n | 'all'\n | undefined\n | (() => Array<keyof InfiniteQueryObserverResult> | 'all' | undefined)\n\n/**\n * The options of a query itself — its `queryKey`, `queryFn`, retries, `gcTime`, `initialData`,\n * `meta`, and so on — shared by observers and the `QueryClient` methods that fetch queries.\n */\nexport interface QueryOptions<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = never,\n> {\n /**\n * If `false`, failed queries will not retry by default.\n * If `true`, failed queries will retry infinitely.\n * If set to an integer number, e.g. 3, failed queries will retry until the failed query count meets that number.\n * If set to a function `(failureCount, error) => boolean` failed queries will retry until the function returns false.\n *\n * Defaults to `3` on the client and `0` on the server.\n */\n retry?: RetryValue<TError>\n /**\n * This function receives a `retryAttempt` integer and the actual Error and returns the delay to apply before the\n * next attempt in milliseconds.\n *\n * A function like `attempt => Math.min(attempt > 1 ? 2 ** attempt * 1000 : 1000, 30 * 1000)` applies exponential\n * backoff.\n *\n * A function like `attempt => attempt * 1000` applies linear backoff.\n *\n * Defaults to a function that applies exponential backoff, capped at 30 seconds.\n */\n retryDelay?: RetryDelayValue<TError>\n /**\n * Controls whether a query is allowed to run based on the current network connectivity.\n * @defaultValue 'online'\n * @see [Network Mode](https://tanstack.com/query/latest/docs/framework/react/guides/network-mode) for more information.\n */\n networkMode?: NetworkMode\n /**\n * The time in milliseconds that unused/inactive cache data remains in memory.\n * When a query's cache becomes unused or inactive, that cache data will be garbage collected after this duration.\n * When different garbage collection times are specified, the longest one will be used.\n * Setting it to `Infinity` will disable garbage collection.\n *\n * Defaults to `5 * 60 * 1000` (5 minutes), or `Infinity` during SSR.\n *\n * Note: the maximum allowed time is about 24 days, imposed by `setTimeout`'s 32-bit signed integer delay — see\n * `timeoutManager.setTimeoutProvider` for a workaround.\n */\n gcTime?: number\n /**\n * The function that the query will use to request data.\n * Required, unless a default query function has been set via `queryClient.setQueryDefaults` or\n * `queryClient.setDefaultOptions`.\n * Receives a {@link QueryFunctionContext}.\n * Must return a promise that will either resolve data or throw an error. The data cannot be `undefined`.\n */\n queryFn?: QueryFunction<TQueryFnData, TQueryKey, TPageParam> | SkipToken\n /**\n * This option can be used to persist the result of a query to an external storage, bypassing the need to actually\n * call the `queryFn`. Useful for persisting a query's data across e.g. server/client boundaries.\n */\n persister?: QueryPersister<TQueryFnData, NoInfer<TQueryKey>, TPageParam>\n /**\n * The hashed form of `queryKey`, computed with `queryKeyHashFn` (or the default hashing function otherwise). Used\n * as the actual cache key internally.\n */\n queryHash?: string\n /**\n * The query key to use for this query.\n *\n * The query key will be hashed into a stable hash. See [Query Keys](https://tanstack.com/query/latest/docs/framework/react/guides/query-keys)\n * for more information.\n *\n * The query will automatically update when this key changes (as long as `enabled` is not set to `false`).\n */\n queryKey?: TQueryKey\n /**\n * If specified, this function is used to hash the `queryKey` to a string.\n */\n queryKeyHashFn?: QueryKeyHashFunction<TQueryKey>\n /**\n * If set, this value will be used as the initial data for the query cache (as long as the query hasn't been\n * created or cached yet).\n * If set to a function, the function will be called **once** during the shared/root query initialization, and be\n * expected to synchronously return the initial data.\n * Initial data is considered stale by default unless a `staleTime` has been set.\n * `initialData` **is persisted** to the cache.\n */\n initialData?: TData | InitialDataFunction<TData>\n /**\n * If set, this value will be used as the time (in milliseconds) of when the `initialData` itself was last updated.\n */\n initialDataUpdatedAt?: number | (() => number | undefined)\n /** @internal */\n behavior?: QueryBehavior<TQueryFnData, TError, TData, TQueryKey>\n /**\n * Set this to `false` to disable structural sharing between query results.\n * Set this to a function which accepts the old and new data and returns resolved data of the same type to implement custom structural sharing logic.\n * @defaultValue true\n */\n structuralSharing?:\n | boolean\n | ((oldData: unknown | undefined, newData: unknown) => unknown)\n /** @internal */\n _defaulted?: boolean\n /** @internal */\n _type?: 'infinite'\n /**\n * Additional payload to be stored on each query.\n * Use this property to pass information that can be used in other places.\n */\n meta?: QueryMeta\n /**\n * Maximum number of pages to store in the data of an infinite query.\n */\n maxPages?: number\n}\n\n/**\n * Holds the `initialPageParam` option that every infinite query requires.\n */\nexport interface InitialPageParam<TPageParam = unknown> {\n /**\n * The page param to start from when an infinite query has no pages yet.\n * It is passed to `queryFn` as `pageParam` for the first page; every page after that gets the\n * value returned by `getNextPageParam` or `getPreviousPageParam`.\n * It only applies while the query has no pages: once a first page exists, refetching starts from\n * that page's own param instead.\n */\n initialPageParam: TPageParam\n}\n\n/**\n * The page param options of an infinite query: `initialPageParam`, and the `getNextPageParam` and\n * `getPreviousPageParam` functions that compute the params of the pages around it.\n */\nexport interface InfiniteQueryPageParamsOptions<\n TQueryFnData = unknown,\n TPageParam = unknown,\n> extends InitialPageParam<TPageParam> {\n /**\n * This function can be set to automatically get the previous cursor for infinite queries.\n * The result will also be used to determine the value of `hasPreviousPage`.\n */\n getPreviousPageParam?: GetPreviousPageParamFunction<TPageParam, TQueryFnData>\n /**\n * This function can be set to automatically get the next cursor for infinite queries.\n * The result will also be used to determine the value of `hasNextPage`.\n */\n getNextPageParam: GetNextPageParamFunction<TPageParam, TQueryFnData>\n}\n\n/** @inline */\nexport type ThrowOnError<\n TQueryFnData,\n TError,\n TQueryData,\n TQueryKey extends QueryKey,\n> =\n | boolean\n | ((\n error: TError,\n query: Query<TQueryFnData, TError, TQueryData, TQueryKey>,\n ) => boolean)\n\n/**\n * The options of a `QueryObserver`, and of the hooks built on it like `useQuery`: the\n * {@link QueryOptions} of the query, plus options that control the observer, such as `enabled`,\n * `staleTime`, `refetchInterval`, `select`, and `placeholderData`.\n */\nexport interface QueryObserverOptions<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = never,\n> extends WithRequired<\n QueryOptions<TQueryFnData, TError, TQueryData, TQueryKey, TPageParam>,\n 'queryKey'\n> {\n /**\n * Set this to `false` or a function that returns `false` to disable automatic refetching when the query mounts or changes query keys.\n * To refetch the query, use the `refetch` method returned from the `useQuery` instance.\n * Accepts a boolean or function that returns a boolean.\n * @defaultValue true\n */\n enabled?: QueryBooleanOption<TQueryFnData, TError, TQueryData, TQueryKey>\n /**\n * The time in milliseconds after data is considered stale.\n * If set to `Infinity`, the data will never be considered stale.\n * If set to `'static'`, the data will never be considered stale.\n * If set to a function, the function will be executed with the query to compute a `staleTime`.\n * @defaultValue 0\n */\n staleTime?: StaleTimeFunction<TQueryFnData, TError, TQueryData, TQueryKey>\n /**\n * If set to a number, the query will continuously refetch at this frequency in milliseconds.\n * If set to a function, the function will be executed with the latest data and query to compute a frequency\n * @defaultValue false\n */\n refetchInterval?:\n | number\n | false\n | ((\n query: Query<TQueryFnData, TError, TQueryData, TQueryKey>,\n ) => number | false | undefined)\n /**\n * If set to `true`, the query will continue to refetch while their tab/window is in the background.\n * @defaultValue false\n */\n refetchIntervalInBackground?: boolean\n /**\n * If set to `true`, the query will refetch on window focus if the data is stale.\n * If set to `false`, the query will not refetch on window focus.\n * If set to `'always'`, the query will always refetch on window focus (except when `staleTime: 'static'` is used).\n * If set to a function, the function will be executed with the latest data and query to compute the value.\n * @defaultValue true\n */\n refetchOnWindowFocus?:\n | boolean\n | 'always'\n | ((\n query: Query<TQueryFnData, TError, TQueryData, TQueryKey>,\n ) => boolean | 'always')\n /**\n * If set to `true`, the query will refetch on reconnect if the data is stale.\n * If set to `false`, the query will not refetch on reconnect.\n * If set to `'always'`, the query will always refetch on reconnect (except when `staleTime: 'static'` is used).\n * If set to a function, the function will be executed with the latest data and query to compute the value.\n *\n * Defaults to `true` unless `networkMode` is `'always'`.\n */\n refetchOnReconnect?:\n | boolean\n | 'always'\n | ((\n query: Query<TQueryFnData, TError, TQueryData, TQueryKey>,\n ) => boolean | 'always')\n /**\n * If set to `true`, the query will refetch on mount if the data is stale.\n * If set to `false`, will disable additional instances of a query to trigger background refetch.\n * If set to `'always'`, the query will always refetch on mount (except when `staleTime: 'static'` is used).\n * If set to a function, the function will be executed with the latest data and query to compute the value\n * @defaultValue true\n */\n refetchOnMount?:\n | boolean\n | 'always'\n | ((\n query: Query<TQueryFnData, TError, TQueryData, TQueryKey>,\n ) => boolean | 'always')\n /**\n * If set to `false`, the query will not be retried on mount if it contains an error.\n * If set to a function, the function will be executed with the query to compute the value.\n * @defaultValue true\n */\n retryOnMount?: QueryBooleanOption<TQueryFnData, TError, TQueryData, TQueryKey>\n /**\n * If set, the component will only re-render if any of the listed properties change.\n * When set to `['data', 'error']`, the component will only re-render when the `data` or `error` properties change.\n * When set to `'all'`, the component will re-render whenever a query is updated.\n * When set to a function, the function will be executed to compute the list of properties.\n *\n * Defaults to `undefined`, in which case property access is tracked automatically, and the\n * component only re-renders when one of the tracked properties changes.\n */\n notifyOnChangeProps?: NotifyOnChangeProps\n /**\n * Whether errors should be thrown instead of setting the `error` property.\n * If set to `true` or `suspense` is `true`, all errors will be thrown to the error boundary.\n * If set to `false` and `suspense` is `false`, errors are returned as state.\n * If set to a function, it will be passed the error and the query, and it should return a boolean indicating whether to show the error in an error boundary (`true`) or return the error as state (`false`).\n * @defaultValue false\n */\n throwOnError?: ThrowOnError<TQueryFnData, TError, TQueryData, TQueryKey>\n /**\n * This option can be used to transform or select a part of the data returned by the query function. It affects\n * the returned `data` value, but does not affect what gets stored in the query cache.\n * The `select` function will only run if `data` changed, or if the reference to the `select` function itself\n * changes. To optimize, memoize the function so its reference stays stable across calls.\n */\n select?: (data: TQueryData) => TData\n /**\n * If set to `true`, the query will suspend when `status === 'pending'`\n * and throw errors when `status === 'error'`.\n * @defaultValue false\n */\n suspense?: boolean\n /**\n * If set, this value will be used as the placeholder data for this particular query observer while the query is still in the `loading` data and no initialData has been provided.\n */\n placeholderData?:\n | NonFunctionGuard<TQueryData>\n | PlaceholderDataFunction<\n NonFunctionGuard<TQueryData>,\n TError,\n NonFunctionGuard<TQueryData>,\n TQueryKey\n >\n\n /** @internal */\n _optimisticResults?: 'optimistic' | 'isRestoring'\n}\n\n/**\n * Makes the `TKey` properties of `TTarget` required and non-nullable.\n */\nexport type WithRequired<TTarget, TKey extends keyof TTarget> = TTarget & {\n [_ in TKey]: {}\n}\n\n/**\n * The {@link QueryObserverOptions} after `QueryClient#defaultQueryOptions` has applied the\n * defaults, so `throwOnError`, `refetchOnReconnect`, and `queryHash` are always set.\n */\nexport type DefaultedQueryObserverOptions<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n> = WithRequired<\n QueryObserverOptions<TQueryFnData, TError, TData, TQueryData, TQueryKey>,\n 'throwOnError' | 'refetchOnReconnect' | 'queryHash'\n>\n\n/**\n * The options of an `InfiniteQueryObserver`: {@link QueryObserverOptions} whose query data is\n * {@link InfiniteData}, plus the page param options.\n */\nexport interface InfiniteQueryObserverOptions<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = unknown,\n>\n extends\n QueryObserverOptions<\n TQueryFnData,\n TError,\n TData,\n InfiniteData<TQueryFnData, TPageParam>,\n TQueryKey,\n TPageParam\n >,\n InfiniteQueryPageParamsOptions<TQueryFnData, TPageParam> {}\n\n/**\n * The {@link InfiniteQueryObserverOptions} after `QueryClient#defaultQueryOptions` has applied the\n * defaults, so `throwOnError`, `refetchOnReconnect`, and `queryHash` are always set.\n */\nexport type DefaultedInfiniteQueryObserverOptions<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = unknown,\n> = WithRequired<\n InfiniteQueryObserverOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n >,\n 'throwOnError' | 'refetchOnReconnect' | 'queryHash'\n>\n\n/**\n * The options of `queryClient.query`: the {@link QueryOptions} of the query, plus a `staleTime`\n * that decides whether cached data is returned instead of fetching, and a `select` that only\n * transforms the value the call resolves with.\n */\nexport interface QueryExecuteOptions<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = never,\n> extends WithRequired<\n QueryOptions<TQueryFnData, TError, TQueryData, TQueryKey, TPageParam>,\n 'queryKey'\n> {\n /**\n * Not allowed here, since `initialPageParam` only applies to infinite queries.\n */\n initialPageParam?: never\n /**\n * This option can be used to transform or select a part of the data returned by the query function. It affects\n * the value this call resolves with, but does not affect what gets stored in the query cache.\n */\n select?: (data: TQueryData) => TData\n /**\n * The time in milliseconds after data is considered stale.\n * If the data is fresh it will be returned from the cache.\n */\n staleTime?: StaleTimeFunction<TQueryFnData, TError, TQueryData, TQueryKey>\n}\n\n/** @deprecated */\nexport interface FetchQueryOptions<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = never,\n> extends WithRequired<\n QueryOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>,\n 'queryKey'\n> {\n /**\n * Not allowed here, since `initialPageParam` only applies to infinite queries.\n */\n initialPageParam?: never\n /**\n * The time in milliseconds after data is considered stale.\n * If the data is fresh it will be returned from the cache.\n */\n staleTime?: StaleTimeFunction<TQueryFnData, TError, TData, TQueryKey>\n}\n\n/** @deprecated */\nexport interface EnsureQueryDataOptions<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = never,\n> extends FetchQueryOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n> {\n /**\n * If `true`, stale cached data is returned and also refetched in the background.\n */\n revalidateIfStale?: boolean\n}\n\n/** @deprecated */\nexport type EnsureInfiniteQueryDataOptions<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = unknown,\n> = FetchInfiniteQueryOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n> & {\n revalidateIfStale?: boolean\n}\n\ntype InfiniteQueryPages<TQueryFnData = unknown, TPageParam = unknown> =\n | { pages?: never }\n | {\n pages: number\n getNextPageParam: GetNextPageParamFunction<TPageParam, TQueryFnData>\n }\n\n/**\n * The options of `queryClient.infiniteQuery`: like {@link QueryExecuteOptions}, with the\n * `initialPageParam`, and optionally `pages` together with `getNextPageParam` to fetch that many\n * pages at once.\n */\nexport type InfiniteQueryExecuteOptions<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = InfiniteData<TQueryFnData>,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = unknown,\n> = Omit<\n QueryExecuteOptions<\n TQueryFnData,\n TError,\n TData,\n InfiniteData<TQueryFnData, TPageParam>,\n TQueryKey,\n TPageParam\n >,\n 'initialPageParam'\n> &\n InitialPageParam<TPageParam> &\n InfiniteQueryPages<TQueryFnData, TPageParam>\n\n/** @deprecated */\nexport type FetchInfiniteQueryOptions<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = unknown,\n> = Omit<\n FetchQueryOptions<\n TQueryFnData,\n TError,\n InfiniteData<TData, TPageParam>,\n TQueryKey,\n TPageParam\n >,\n 'initialPageParam'\n> &\n InitialPageParam<TPageParam> &\n InfiniteQueryPages<TQueryFnData, TPageParam>\n\n/**\n * Options shared by the `QueryClient` and observer methods that refetch queries, controlling\n * whether a failed refetch makes the returned promise reject.\n */\nexport interface ResultOptions {\n /**\n * If set to `true`, the method throws if any of the underlying query refetch tasks fail.\n * If set to `false`, failed refetches are swallowed and not surfaced to the caller.\n * @defaultValue false\n */\n throwOnError?: boolean\n}\n\n/**\n * Options of the methods that refetch queries, like `refetch` and `queryClient.refetchQueries`.\n */\nexport interface RefetchOptions extends ResultOptions {\n /**\n * If set to `true`, a currently running request will be cancelled before a new request is made\n *\n * If set to `false`, no refetch will be made if there is already a request running.\n * @defaultValue true\n */\n cancelRefetch?: boolean\n}\n\n/**\n * The filters of `queryClient.invalidateQueries`: the {@link QueryFilters} that select the queries\n * to invalidate, plus `refetchType` to choose which of them are refetched.\n */\nexport interface InvalidateQueryFilters<\n TQueryKey extends QueryKey = QueryKey,\n> extends QueryFilters<TQueryKey> {\n /**\n * Controls which of the matched (now-invalidated) queries are refetched in the background.\n *\n * - `'active'`: only queries with at least one active observer are refetched.\n * - `'inactive'`: only queries with no active observer are refetched.\n * - `'all'`: every matched query is refetched, active or not.\n * - `'none'`: no query is refetched; matched queries are only marked as invalidated.\n * @defaultValue 'active'\n */\n refetchType?: QueryTypeFilter | 'none'\n}\n\n/**\n * The filters of `queryClient.refetchQueries`, which select the queries to refetch.\n */\nexport interface RefetchQueryFilters<\n TQueryKey extends QueryKey = QueryKey,\n> extends QueryFilters<TQueryKey> {}\n\n/**\n * Options of `queryClient.invalidateQueries`, applied to the refetch that follows the invalidation.\n */\nexport interface InvalidateOptions extends RefetchOptions {}\n/**\n * Options of `queryClient.resetQueries`, applied to the refetch of the active queries after the\n * reset.\n */\nexport interface ResetOptions extends RefetchOptions {}\n\n/**\n * Options of `fetchNextPage` on an infinite query result.\n */\nexport interface FetchNextPageOptions extends ResultOptions {\n /**\n * If set to `true`, calling `fetchNextPage` repeatedly will invoke `queryFn` every time,\n * whether the previous invocation has resolved or not. Also, the result from previous invocations will be ignored.\n *\n * If set to `false`, calling `fetchNextPage` repeatedly won't have any effect until the first invocation has resolved.\n * @defaultValue true\n */\n cancelRefetch?: boolean\n}\n\n/**\n * Options of `fetchPreviousPage` on an infinite query result.\n */\nexport interface FetchPreviousPageOptions extends ResultOptions {\n /**\n * If set to `true`, calling `fetchPreviousPage` repeatedly will invoke `queryFn` every time,\n * whether the previous invocation has resolved or not. Also, the result from previous invocations will be ignored.\n *\n * If set to `false`, calling `fetchPreviousPage` repeatedly won't have any effect until the first invocation has resolved.\n * @defaultValue true\n */\n cancelRefetch?: boolean\n}\n\n/** @inline */\nexport type QueryStatus = 'pending' | 'error' | 'success'\n/** @inline */\nexport type FetchStatus = 'fetching' | 'paused' | 'idle'\n\n/**\n * The properties shared by every state of a query result, like `data`, `error`, `status`, the\n * `is*` flags, and `refetch`. Each `QueryObserver*Result` narrows them for one state.\n */\nexport interface QueryObserverBaseResult<\n TData = unknown,\n TError = DefaultError,\n> {\n /**\n * The last successfully resolved data for the query.\n */\n data: TData | undefined\n /**\n * The timestamp for when the query most recently returned the `status` as `\"success\"`.\n */\n dataUpdatedAt: number\n /**\n * The error object for the query, if an error was thrown.\n * - Defaults to `null`.\n */\n error: TError | null\n /**\n * The timestamp for when the query most recently returned the `status` as `\"error\"`.\n */\n errorUpdatedAt: number\n /**\n * The failure count for the query.\n * - Incremented every time the query fails.\n * - Reset to `0` when the query succeeds.\n */\n failureCount: number\n /**\n * The failure reason for the query retry.\n * - Reset to `null` when the query succeeds.\n */\n failureReason: TError | null\n /**\n * The sum of all errors.\n */\n errorUpdateCount: number\n /**\n * A derived boolean from the `status` variable, provided for convenience.\n * - `true` if the query has an error from a fetch that failed after its retries, or if `select` threw.\n */\n isError: boolean\n /**\n * Will be `true` if the query has been fetched.\n */\n isFetched: boolean\n /**\n * Will be `true` if the query has been fetched after the component mounted.\n * - This property can be used to not show any previously cached data.\n */\n isFetchedAfterMount: boolean\n /**\n * A derived boolean from the `fetchStatus` variable, provided for convenience.\n * - `true` whenever the `queryFn` is executing, which includes initial `pending` as well as background refetch.\n */\n isFetching: boolean\n /**\n * Is `true` whenever the first fetch for a query is in-flight.\n * - Is the same as `isFetching && isPending`.\n */\n isLoading: boolean\n /**\n * Will be `true` if the query has no cached data, no data from `placeholderData` and no error.\n */\n isPending: boolean\n /**\n * Will be `true` if the query has an error and no data to display.\n */\n isLoadingError: boolean\n /**\n * @deprecated `isInitialLoading` is being deprecated in favor of `isLoading`\n * and will be removed in the next major version.\n */\n isInitialLoading: boolean\n /**\n * A derived boolean from the `fetchStatus` variable, provided for convenience.\n * - The query wanted to fetch, but has been `paused`.\n */\n isPaused: boolean\n /**\n * Will be `true` if the data shown is the placeholder data.\n */\n isPlaceholderData: boolean\n /**\n * Will be `true` if the query has an error and still has data to display (for infinite queries, not after a failed page fetch).\n */\n isRefetchError: boolean\n /**\n * Is `true` whenever a background refetch is in-flight, which _does not_ include initial `pending`.\n * - Is the same as `isFetching && !isPending`.\n */\n isRefetching: boolean\n /**\n * Will be `true` if the data in the cache is invalidated or if the data is older than the given `staleTime`.\n */\n isStale: boolean\n /**\n * A derived boolean from the `status` variable, provided for convenience.\n * - `true` if the query has cached data or data from `placeholderData`, and no error.\n */\n isSuccess: boolean\n /**\n * `true` if this observer is enabled, `false` otherwise.\n */\n isEnabled: boolean\n /**\n * A function to manually refetch the query.\n */\n refetch: (\n options?: RefetchOptions,\n ) => Promise<QueryObserverResult<TData, TError>>\n /**\n * The status of the query.\n * - Will be:\n * - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw.\n * - `success` if the query has cached data (even if `select` returns `undefined`) or data from `placeholderData`, and no error.\n * - `pending` otherwise, since the query has no cached data, no data from `placeholderData` and no error.\n */\n status: QueryStatus\n /**\n * The fetch status of the query.\n * - `fetching`: Is `true` whenever the queryFn is executing, which includes initial `pending` as well as background refetch.\n * - `paused`: The query wanted to fetch, but has been `paused`.\n * - `idle`: The query is not fetching.\n * - See [Network Mode](https://tanstack.com/query/latest/docs/framework/react/guides/network-mode) for more information.\n */\n fetchStatus: FetchStatus\n}\n\n/**\n * A query result in the `pending` state: the query has no data yet.\n */\nexport interface QueryObserverPendingResult<\n TData = unknown,\n TError = DefaultError,\n> extends QueryObserverBaseResult<TData, TError> {\n /**\n * `undefined`, since the query has no data yet.\n */\n data: undefined\n /**\n * `null`, since the query isn't in the `error` state.\n */\n error: null\n /**\n * `false`, since the query isn't in the `error` state.\n */\n isError: false\n /**\n * `true`, since the query has no cached data, no data from `placeholderData` and no error.\n */\n isPending: true\n /**\n * `false`, since the query didn't fail while fetching for the first time.\n */\n isLoadingError: false\n /**\n * `false`, since the query didn't fail while refetching.\n */\n isRefetchError: false\n /**\n * `false`, since the query isn't in the `success` state.\n */\n isSuccess: false\n /**\n * `false`, since the data shown isn't the `placeholderData`.\n */\n isPlaceholderData: false\n /**\n * `'pending'`, since the query has no cached data, no data from `placeholderData` and no error.\n */\n status: 'pending'\n}\n\n/**\n * A query result in the `pending` state while the first fetch is in flight, so `isLoading` is\n * `true`.\n */\nexport interface QueryObserverLoadingResult<\n TData = unknown,\n TError = DefaultError,\n> extends QueryObserverBaseResult<TData, TError> {\n /**\n * `undefined`, since the query has no data yet.\n */\n data: undefined\n /**\n * `null`, since the query isn't in the `error` state.\n */\n error: null\n /**\n * `false`, since the query isn't in the `error` state.\n */\n isError: false\n /**\n * `true`, since the query has no cached data, no data from `placeholderData` and no error.\n */\n isPending: true\n /**\n * `true`, since the first fetch is in flight.\n */\n isLoading: true\n /**\n * `false`, since the query didn't fail while fetching for the first time.\n */\n isLoadingError: false\n /**\n * `false`, since the query didn't fail while refetching.\n */\n isRefetchError: false\n /**\n * `false`, since the query isn't in the `success` state.\n */\n isSuccess: false\n /**\n * `false`, since the data shown isn't the `placeholderData`.\n */\n isPlaceholderData: false\n /**\n * `'pending'`, since the query has no cached data, no data from `placeholderData` and no error.\n */\n status: 'pending'\n}\n\n/**\n * A query result in the `error` state with no data to display, since a fetch or `select` failed.\n */\nexport interface QueryObserverLoadingErrorResult<\n TData = unknown,\n TError = DefaultError,\n> extends QueryObserverBaseResult<TData, TError> {\n /**\n * `undefined`, since there was no data to display when a fetch or `select` failed.\n */\n data: undefined\n /**\n * The error the fetch or `select` failed with.\n */\n error: TError\n /**\n * `true`, since the query is in the `error` state.\n */\n isError: true\n /**\n * `false`, since the query has cached data, data from `placeholderData` or an error.\n */\n isPending: false\n /**\n * `false`, since the first fetch isn't in flight.\n */\n isLoading: false\n /**\n * `true`, since the query has an error and no data to display.\n */\n isLoadingError: true\n /**\n * `false`, since the query didn't fail while refetching.\n */\n isRefetchError: false\n /**\n * `false`, since the query isn't in the `success` state.\n */\n isSuccess: false\n /**\n * `false`, since the data shown isn't the `placeholderData`.\n */\n isPlaceholderData: false\n /**\n * `'error'`, since a fetch failed after its retries or `select` threw.\n */\n status: 'error'\n}\n\n/**\n * A query result in the `error` state that keeps the data from before a fetch or `select` failed.\n */\nexport interface QueryObserverRefetchErrorResult<\n TData = unknown,\n TError = DefaultError,\n> extends QueryObserverBaseResult<TData, TError> {\n /**\n * The data from before the fetch or `select` failed, which is kept.\n */\n data: TData\n /**\n * The error the fetch or `select` failed with.\n */\n error: TError\n /**\n * `true`, since the query is in the `error` state.\n */\n isError: true\n /**\n * `false`, since the query has cached data, data from `placeholderData` or an error.\n */\n isPending: false\n /**\n * `false`, since the first fetch isn't in flight.\n */\n isLoading: false\n /**\n * `false`, since the query didn't fail while fetching for the first time.\n */\n isLoadingError: false\n /**\n * `true`, since the query has an error and still has data to display.\n */\n isRefetchError: true\n /**\n * `false`, since the query isn't in the `success` state.\n */\n isSuccess: false\n /**\n * `false`, since the data shown isn't the `placeholderData`.\n */\n isPlaceholderData: false\n /**\n * `'error'`, since a fetch failed after its retries or `select` threw.\n */\n status: 'error'\n}\n\n/**\n * A query result in the `success` state with data from the cache.\n */\nexport interface QueryObserverSuccessResult<\n TData = unknown,\n TError = DefaultError,\n> extends QueryObserverBaseResult<TData, TError> {\n /**\n * The last successfully resolved data for the query.\n */\n data: TData\n /**\n * `null`, since the query isn't in the `error` state.\n */\n error: null\n /**\n * `false`, since the query isn't in the `error` state.\n */\n isError: false\n /**\n * `false`, since the query has cached data, data from `placeholderData` or an error.\n */\n isPending: false\n /**\n * `false`, since the first fetch isn't in flight.\n */\n isLoading: false\n /**\n * `false`, since the query didn't fail while fetching for the first time.\n */\n isLoadingError: false\n /**\n * `false`, since the query didn't fail while refetching.\n */\n isRefetchError: false\n /**\n * `true`, since the query is in the `success` state.\n */\n isSuccess: true\n /**\n * `false`, since the data shown isn't the `placeholderData`.\n */\n isPlaceholderData: false\n /**\n * `'success'`, since the query has cached data and no error from a fetch or from\n * `select`.\n */\n status: 'success'\n}\n\n/**\n * A query result in the `success` state that shows `placeholderData` while the query has no data\n * yet.\n */\nexport interface QueryObserverPlaceholderResult<\n TData = unknown,\n TError = DefaultError,\n> extends QueryObserverBaseResult<TData, TError> {\n /**\n * The `placeholderData` shown while the query has no data yet.\n */\n data: TData\n /**\n * `false`, since the query isn't in the `error` state.\n */\n isError: false\n /**\n * `null`, since the query isn't in the `error` state.\n */\n error: null\n /**\n * `false`, since the query has cached data, data from `placeholderData` or an error.\n */\n isPending: false\n /**\n * `false`, since the first fetch isn't in flight.\n */\n isLoading: false\n /**\n * `false`, since the query didn't fail while fetching for the first time.\n */\n isLoadingError: false\n /**\n * `false`, since the query didn't fail while refetching.\n */\n isRefetchError: false\n /**\n * `true`, since the query is in the `success` state.\n */\n isSuccess: true\n /**\n * `true`, since the data shown is the `placeholderData`.\n */\n isPlaceholderData: true\n /**\n * `'success'`, since the query shows `placeholderData` and has no error from a fetch or\n * from `select`.\n */\n status: 'success'\n}\n\n/**\n * A query result that always has `data`: the success and refetch error states.\n */\nexport type DefinedQueryObserverResult<\n TData = unknown,\n TError = DefaultError,\n> =\n | QueryObserverRefetchErrorResult<TData, TError>\n | QueryObserverSuccessResult<TData, TError>\n\n/**\n * The result of a `QueryObserver`, and of the hooks built on it like `useQuery`. Narrow it by\n * `status` or the `is*` flags to get the type of each state.\n */\nexport type QueryObserverResult<TData = unknown, TError = DefaultError> =\n | DefinedQueryObserverResult<TData, TError>\n | QueryObserverLoadingErrorResult<TData, TError>\n | QueryObserverLoadingResult<TData, TError>\n | QueryObserverPendingResult<TData, TError>\n | QueryObserverPlaceholderResult<TData, TError>\n\n/**\n * The properties shared by every state of an infinite query result: those of\n * {@link QueryObserverBaseResult}, plus `fetchNextPage`, `fetchPreviousPage`, and the flags about\n * them, like `hasNextPage` and `isFetchingNextPage`.\n */\nexport interface InfiniteQueryObserverBaseResult<\n TData = unknown,\n TError = DefaultError,\n> extends QueryObserverBaseResult<TData, TError> {\n /**\n * This function allows you to fetch the next \"page\" of results.\n */\n fetchNextPage: (\n options?: FetchNextPageOptions,\n ) => Promise<InfiniteQueryObserverResult<TData, TError>>\n /**\n * This function allows you to fetch the previous \"page\" of results.\n */\n fetchPreviousPage: (\n options?: FetchPreviousPageOptions,\n ) => Promise<InfiniteQueryObserverResult<TData, TError>>\n /**\n * Will be `true` if there is a next page to be fetched (known via the `getNextPageParam` option).\n */\n hasNextPage: boolean\n /**\n * Will be `true` if there is a previous page to be fetched (known via the `getPreviousPageParam` option).\n */\n hasPreviousPage: boolean\n /**\n * Will be `true` if the query failed while fetching the next page.\n */\n isFetchNextPageError: boolean\n /**\n * Will be `true` while fetching the next page with `fetchNextPage`.\n */\n isFetchingNextPage: boolean\n /**\n * Will be `true` if the query failed while fetching the previous page.\n */\n isFetchPreviousPageError: boolean\n /**\n * Will be `true` while fetching the previous page with `fetchPreviousPage`.\n */\n isFetchingPreviousPage: boolean\n}\n\n/**\n * An infinite query result in the `pending` state: the query has no data yet.\n */\nexport interface InfiniteQueryObserverPendingResult<\n TData = unknown,\n TError = DefaultError,\n> extends InfiniteQueryObserverBaseResult<TData, TError> {\n /**\n * `undefined`, since the query has no data yet.\n */\n data: undefined\n /**\n * `null`, since the query isn't in the `error` state.\n */\n error: null\n /**\n * `false`, since the query isn't in the `error` state.\n */\n isError: false\n /**\n * `true`, since the query has no cached data, no data from `placeholderData` and no error.\n */\n isPending: true\n /**\n * `false`, since the query didn't fail while fetching for the first time.\n */\n isLoadingError: false\n /**\n * `false`, since the query didn't fail while refetching.\n */\n isRefetchError: false\n /**\n * `false`, since fetching the next page didn't fail.\n */\n isFetchNextPageError: false\n /**\n * `false`, since fetching the previous page didn't fail.\n */\n isFetchPreviousPageError: false\n /**\n * `false`, since the query isn't in the `success` state.\n */\n isSuccess: false\n /**\n * `false`, since the data shown isn't the `placeholderData`.\n */\n isPlaceholderData: false\n /**\n * `'pending'`, since the query has no cached data, no data from `placeholderData` and no error.\n */\n status: 'pending'\n}\n\n/**\n * An infinite query result in the `pending` state while the first fetch is in flight, so\n * `isLoading` is `true`.\n */\nexport interface InfiniteQueryObserverLoadingResult<\n TData = unknown,\n TError = DefaultError,\n> extends InfiniteQueryObserverBaseResult<TData, TError> {\n /**\n * `undefined`, since the query has no data yet.\n */\n data: undefined\n /**\n * `null`, since the query isn't in the `error` state.\n */\n error: null\n /**\n * `false`, since the query isn't in the `error` state.\n */\n isError: false\n /**\n * `true`, since the query has no cached data, no data from `placeholderData` and no error.\n */\n isPending: true\n /**\n * `true`, since the first fetch is in flight.\n */\n isLoading: true\n /**\n * `false`, since the query didn't fail while fetching for the first time.\n */\n isLoadingError: false\n /**\n * `false`, since the query didn't fail while refetching.\n */\n isRefetchError: false\n /**\n * `false`, since fetching the next page didn't fail.\n */\n isFetchNextPageError: false\n /**\n * `false`, since fetching the previous page didn't fail.\n */\n isFetchPreviousPageError: false\n /**\n * `false`, since the query isn't in the `success` state.\n */\n isSuccess: false\n /**\n * `false`, since the data shown isn't the `placeholderData`.\n */\n isPlaceholderData: false\n /**\n * `'pending'`, since the query has no cached data, no data from `placeholderData` and no error.\n */\n status: 'pending'\n}\n\n/**\n * An infinite query result in the `error` state with no data to display, since a fetch or `select` failed.\n */\nexport interface InfiniteQueryObserverLoadingErrorResult<\n TData = unknown,\n TError = DefaultError,\n> extends InfiniteQueryObserverBaseResult<TData, TError> {\n /**\n * `undefined`, since there was no data to display when a fetch or `select` failed.\n */\n data: undefined\n /**\n * The error the fetch or `select` failed with.\n */\n error: TError\n /**\n * `true`, since the query is in the `error` state.\n */\n isError: true\n /**\n * `false`, since the query has cached data, data from `placeholderData` or an error.\n */\n isPending: false\n /**\n * `false`, since the first fetch isn't in flight.\n */\n isLoading: false\n /**\n * `true`, since the query has an error and no data to display.\n */\n isLoadingError: true\n /**\n * `false`, since the query didn't fail while refetching.\n */\n isRefetchError: false\n /**\n * `false`, since fetching the next page didn't fail.\n */\n isFetchNextPageError: false\n /**\n * `false`, since fetching the previous page didn't fail.\n */\n isFetchPreviousPageError: false\n /**\n * `false`, since the query isn't in the `success` state.\n */\n isSuccess: false\n /**\n * `false`, since the data shown isn't the `placeholderData`.\n */\n isPlaceholderData: false\n /**\n * `'error'`, since a fetch failed after its retries or `select` threw.\n */\n status: 'error'\n}\n\n/**\n * An infinite query result in the `error` state that keeps the data from before a fetch or `select`\n * failed.\n */\nexport interface InfiniteQueryObserverRefetchErrorResult<\n TData = unknown,\n TError = DefaultError,\n> extends InfiniteQueryObserverBaseResult<TData, TError> {\n /**\n * The data from before the fetch or `select` failed, which is kept.\n */\n data: TData\n /**\n * The error the fetch or `select` failed with.\n */\n error: TError\n /**\n * `true`, since the query is in the `error` state.\n */\n isError: true\n /**\n * `false`, since the query has cached data, data from `placeholderData` or an error.\n */\n isPending: false\n /**\n * `false`, since the first fetch isn't in flight.\n */\n isLoading: false\n /**\n * `false`, since the query didn't fail while fetching for the first time.\n */\n isLoadingError: false\n /**\n * `true`, since the query has an error, still has data to display, and didn't fail fetching a page.\n */\n isRefetchError: true\n /**\n * `false`, since the query isn't in the `success` state.\n */\n isSuccess: false\n /**\n * `false`, since the data shown isn't the `placeholderData`.\n */\n isPlaceholderData: false\n /**\n * `'error'`, since a fetch failed after its retries or `select` threw.\n */\n status: 'error'\n}\n\n/**\n * An infinite query result in the `success` state with data from the cache.\n */\nexport interface InfiniteQueryObserverSuccessResult<\n TData = unknown,\n TError = DefaultError,\n> extends InfiniteQueryObserverBaseResult<TData, TError> {\n /**\n * The last successfully resolved data for the query.\n */\n data: TData\n /**\n * `null`, since the query isn't in the `error` state.\n */\n error: null\n /**\n * `false`, since the query isn't in the `error` state.\n */\n isError: false\n /**\n * `false`, since the query has cached data, data from `placeholderData` or an error.\n */\n isPending: false\n /**\n * `false`, since the first fetch isn't in flight.\n */\n isLoading: false\n /**\n * `false`, since the query didn't fail while fetching for the first time.\n */\n isLoadingError: false\n /**\n * `false`, since the query didn't fail while refetching.\n */\n isRefetchError: false\n /**\n * `false`, since fetching the next page didn't fail.\n */\n isFetchNextPageError: false\n /**\n * `false`, since fetching the previous page didn't fail.\n */\n isFetchPreviousPageError: false\n /**\n * `true`, since the query is in the `success` state.\n */\n isSuccess: true\n /**\n * `false`, since the data shown isn't the `placeholderData`.\n */\n isPlaceholderData: false\n /**\n * `'success'`, since the query has cached data and no error from a fetch or from\n * `select`.\n */\n status: 'success'\n}\n\n/**\n * An infinite query result in the `success` state that shows `placeholderData` while the query has\n * no data yet.\n */\nexport interface InfiniteQueryObserverPlaceholderResult<\n TData = unknown,\n TError = DefaultError,\n> extends InfiniteQueryObserverBaseResult<TData, TError> {\n /**\n * The `placeholderData` shown while the query has no data yet.\n */\n data: TData\n /**\n * `false`, since the query isn't in the `error` state.\n */\n isError: false\n /**\n * `null`, since the query isn't in the `error` state.\n */\n error: null\n /**\n * `false`, since the query has cached data, data from `placeholderData` or an error.\n */\n isPending: false\n /**\n * `false`, since the first fetch isn't in flight.\n */\n isLoading: false\n /**\n * `false`, since the query didn't fail while fetching for the first time.\n */\n isLoadingError: false\n /**\n * `false`, since the query didn't fail while refetching.\n */\n isRefetchError: false\n /**\n * `true`, since the query is in the `success` state.\n */\n isSuccess: true\n /**\n * `true`, since the data shown is the `placeholderData`.\n */\n isPlaceholderData: true\n /**\n * `false`, since fetching the next page didn't fail.\n */\n isFetchNextPageError: false\n /**\n * `false`, since fetching the previous page didn't fail.\n */\n isFetchPreviousPageError: false\n /**\n * `'success'`, since the query shows `placeholderData` and has no error from a fetch or\n * from `select`.\n */\n status: 'success'\n}\n\n/**\n * An infinite query result that always has `data`: the success and refetch error states.\n */\nexport type DefinedInfiniteQueryObserverResult<\n TData = unknown,\n TError = DefaultError,\n> =\n | InfiniteQueryObserverRefetchErrorResult<TData, TError>\n | InfiniteQueryObserverSuccessResult<TData, TError>\n\n/**\n * The result of an `InfiniteQueryObserver`, and of the hooks built on it like `useInfiniteQuery`.\n * Narrow it by `status` or the `is*` flags to get the type of each state.\n */\nexport type InfiniteQueryObserverResult<\n TData = unknown,\n TError = DefaultError,\n> =\n | DefinedInfiniteQueryObserverResult<TData, TError>\n | InfiniteQueryObserverLoadingErrorResult<TData, TError>\n | InfiniteQueryObserverLoadingResult<TData, TError>\n | InfiniteQueryObserverPendingResult<TData, TError>\n | InfiniteQueryObserverPlaceholderResult<TData, TError>\n\n/**\n * The type of a mutation key — the serializable array used to identify and filter mutations.\n * Defaults to `ReadonlyArray<unknown>`; declare `mutationKey` on {@link Register} to narrow it repository-wide.\n */\nexport type MutationKey = Register extends {\n mutationKey: infer TMutationKey\n}\n ? TMutationKey extends ReadonlyArray<unknown>\n ? TMutationKey\n : TMutationKey extends Array<unknown>\n ? TMutationKey\n : ReadonlyArray<unknown>\n : ReadonlyArray<unknown>\n\n/** @inline */\nexport type MutationStatus = 'idle' | 'pending' | 'success' | 'error'\n\n/**\n * Groups mutations so they run one after another instead of in parallel.\n * Mutations that share the same `id` form a queue: while one is running, the others wait in `isPaused: true`\n * state and resume automatically when their turn comes. Mutations with no scope always run in parallel.\n */\nexport type MutationScope = {\n /**\n * The scope's identifier. Mutations with the same `id` run one after another.\n */\n id: string\n}\n\n/**\n * The type of the `meta` object that can be attached to a mutation and read back from `mutationFn`, callbacks and\n * cache-level handlers. Defaults to `Record<string, unknown>`; declare `mutationMeta` on {@link Register} to narrow it.\n */\nexport type MutationMeta = Register extends {\n mutationMeta: infer TMutationMeta\n}\n ? TMutationMeta extends Record<string, unknown>\n ? TMutationMeta\n : Record<string, unknown>\n : Record<string, unknown>\n\n/**\n * The object passed to `mutationFn` and the mutation callbacks: the `QueryClient`, the mutation's\n * `meta`, and its `mutationKey`.\n */\nexport type MutationFunctionContext = {\n /**\n * The `QueryClient` the mutation runs in.\n */\n client: QueryClient\n /**\n * The `meta` of the mutation options.\n */\n meta: MutationMeta | undefined\n /**\n * The `mutationKey` of the mutation options, if set.\n */\n mutationKey?: MutationKey\n}\n\n/** @inline */\nexport type MutationFunction<TData = unknown, TVariables = unknown> = (\n variables: TVariables,\n context: MutationFunctionContext,\n) => Promise<TData>\n\n/**\n * The options of a mutation: its `mutationFn`, `mutationKey`, callbacks, retries, `scope`, and so\n * on.\n */\nexport interface MutationOptions<\n TData = unknown,\n TError = DefaultError,\n TVariables = void,\n TOnMutateResult = unknown,\n> {\n /**\n * The function that performs the asynchronous task this mutation runs.\n * Required, unless a default mutation function has been set for the matching `mutationKey` via\n * `queryClient.setMutationDefaults`.\n * Receives the `variables` passed to `mutate`, and a {@link MutationFunctionContext} holding the\n * `QueryClient`, the `mutationKey` and `meta`.\n * Must return a promise that resolves the mutation's data.\n */\n mutationFn?: MutationFunction<TData, TVariables>\n /**\n * The key to use for this mutation. Optional, but required to inherit defaults registered with\n * `queryClient.setMutationDefaults`, and to match this mutation with `useMutationState` or\n * `queryClient.isMutating`.\n */\n mutationKey?: MutationKey\n /**\n * This function fires before the mutation function runs, and receives the same variables.\n * Useful for optimistic updates applied in the hope that the mutation succeeds.\n * The value it returns is passed to `onSuccess`, `onError` and `onSettled` as `onMutateResult`,\n * which is where an optimistic update is usually rolled back.\n * If a promise is returned, it is awaited before the mutation function runs.\n */\n onMutate?: (\n variables: TVariables,\n context: MutationFunctionContext,\n ) => Promise<TOnMutateResult> | TOnMutateResult\n /**\n * This function fires when the mutation succeeds, and is passed the mutation's result.\n * If a promise is returned, it is awaited before `onSettled` runs.\n */\n onSuccess?: (\n data: TData,\n variables: TVariables,\n onMutateResult: TOnMutateResult,\n context: MutationFunctionContext,\n ) => Promise<unknown> | unknown\n /**\n * This function fires when the mutation encounters an error, and is passed the error.\n * If a promise is returned, it is awaited before `onSettled` runs.\n */\n onError?: (\n error: TError,\n variables: TVariables,\n onMutateResult: TOnMutateResult | undefined,\n context: MutationFunctionContext,\n ) => Promise<unknown> | unknown\n /**\n * This function fires when the mutation either succeeds or errors, and is passed either the data\n * or the error.\n * If a promise is returned, it is awaited before the mutation settles.\n */\n onSettled?: (\n data: TData | undefined,\n error: TError | null,\n variables: TVariables,\n onMutateResult: TOnMutateResult | undefined,\n context: MutationFunctionContext,\n ) => Promise<unknown> | unknown\n /**\n * If `false`, failed mutations will not retry by default.\n * If `true`, failed mutations will retry infinitely.\n * If set to an integer number, e.g. 3, failed mutations will retry until the failed mutation count meets that number.\n * If set to a function `(failureCount, error) => boolean` failed mutations will retry until the function returns false.\n * @defaultValue 0\n */\n retry?: RetryValue<TError>\n /**\n * This function receives a `retryAttempt` integer and the actual Error and returns the delay to apply before the\n * next attempt in milliseconds.\n *\n * Defaults to a function that applies exponential backoff, capped at 30 seconds.\n */\n retryDelay?: RetryDelayValue<TError>\n /**\n * Controls whether a mutation is allowed to run based on the current network connectivity.\n * @defaultValue 'online'\n * @see [Network Mode](https://tanstack.com/query/latest/docs/framework/react/guides/network-mode) for more information.\n */\n networkMode?: NetworkMode\n /**\n * The time in milliseconds that an unused/inactive mutation remains in memory before it is\n * garbage collected.\n *\n * Defaults to `5 * 60 * 1000` (5 minutes), or `Infinity` during SSR.\n */\n gcTime?: number\n /** @internal */\n _defaulted?: boolean\n /**\n * Additional payload to be stored on the mutation cache entry.\n * Use it to pass information that can be read wherever the `mutation` is available, such as the\n * `onError` and `onSuccess` callbacks of the `MutationCache`.\n */\n meta?: MutationMeta\n /**\n * Controls whether this mutation runs alongside others or waits its turn.\n * Mutations sharing the same `scope.id` run serially, in the order they were started.\n * Without a scope, a mutation runs as soon as it is triggered.\n */\n scope?: MutationScope\n}\n\n/**\n * The options of a `MutationObserver`, and of the hooks built on it like `useMutation`: the\n * {@link MutationOptions}, plus `throwOnError`.\n */\nexport interface MutationObserverOptions<\n TData = unknown,\n TError = DefaultError,\n TVariables = void,\n TOnMutateResult = unknown,\n> extends MutationOptions<TData, TError, TVariables, TOnMutateResult> {\n /**\n * Whether errors should be thrown instead of setting the `error` property.\n * If set to `true`, all errors will be thrown to the nearest error boundary.\n * If set to a function, it will be passed the error and should return a boolean indicating whether to throw the\n * error (`true`) or return it as state (`false`).\n * @defaultValue false\n */\n throwOnError?: boolean | ((error: TError) => boolean)\n}\n\n/**\n * The callbacks that can be passed to `mutate` for a single call. They run after the callbacks of\n * the mutation options.\n */\nexport interface MutateOptions<\n TData = unknown,\n TError = DefaultError,\n TVariables = void,\n TOnMutateResult = unknown,\n> {\n /**\n * Called when the mutation of this call succeeds, after the `onSuccess` of the mutation options.\n */\n onSuccess?: (\n data: TData,\n variables: TVariables,\n onMutateResult: TOnMutateResult | undefined,\n context: MutationFunctionContext,\n ) => void\n /**\n * Called when the mutation of this call fails, after the `onError` of the mutation options.\n */\n onError?: (\n error: TError,\n variables: TVariables,\n onMutateResult: TOnMutateResult | undefined,\n context: MutationFunctionContext,\n ) => void\n /**\n * Called when the mutation of this call succeeds or fails, after the `onSettled` of the mutation\n * options.\n */\n onSettled?: (\n data: TData | undefined,\n error: TError | null,\n variables: TVariables,\n onMutateResult: TOnMutateResult | undefined,\n context: MutationFunctionContext,\n ) => void\n}\n\n/**\n * The parameters of {@link MutateFunction}: `variables`, optional when `TVariables` accepts\n * `undefined`, and the {@link MutateOptions} for that call.\n */\nexport type MutateFunctionRest<\n TData = unknown,\n TError = DefaultError,\n TVariables = void,\n TOnMutateResult = unknown,\n> = undefined extends TVariables\n ? [\n variables?: TVariables,\n options?: MutateOptions<TData, TError, TVariables, TOnMutateResult>,\n ]\n : [\n variables: TVariables,\n options?: MutateOptions<TData, TError, TVariables, TOnMutateResult>,\n ]\n\n/**\n * The `mutate` function of a `MutationObserver`: runs the mutation with the given variables and\n * resolves with its data.\n */\nexport type MutateFunction<\n TData = unknown,\n TError = DefaultError,\n TVariables = void,\n TOnMutateResult = unknown,\n> = (\n ...rest: MutateFunctionRest<TData, TError, TVariables, TOnMutateResult>\n) => Promise<TData>\n\n/**\n * The properties shared by every state of a mutation result, like `data`, `error`, `variables`,\n * `status`, the `is*` flags, `mutate`, and `reset`.\n */\nexport interface MutationObserverBaseResult<\n TData = unknown,\n TError = DefaultError,\n TVariables = void,\n TOnMutateResult = unknown,\n> extends MutationState<TData, TError, TVariables, TOnMutateResult> {\n /**\n * The last successfully resolved data for the mutation.\n */\n data: TData | undefined\n /**\n * The variables object passed to the `mutationFn`.\n */\n variables: TVariables | undefined\n /**\n * The error object for the mutation, if an error was encountered.\n * - Defaults to `null`.\n */\n error: TError | null\n /**\n * A boolean variable derived from `status`.\n * - `true` if the last mutation attempt resulted in an error.\n */\n isError: boolean\n /**\n * A boolean variable derived from `status`.\n * - `true` if the mutation is in its initial state prior to executing.\n */\n isIdle: boolean\n /**\n * A boolean variable derived from `status`.\n * - `true` if the mutation is currently executing.\n */\n isPending: boolean\n /**\n * A boolean variable derived from `status`.\n * - `true` if the last mutation attempt was successful.\n */\n isSuccess: boolean\n /**\n * The status of the mutation.\n * - Will be:\n * - `idle` initial status prior to the mutation function executing.\n * - `pending` if the mutation is currently executing.\n * - `error` if the last mutation attempt resulted in an error.\n * - `success` if the last mutation attempt was successful.\n */\n status: MutationStatus\n /**\n * The mutation function you can call with variables to trigger the mutation and optionally hooks on additional callback options.\n * @param variables - The variables object to pass to the `mutationFn`.\n * @param options.onSuccess - This function will fire when the mutation is successful and will be passed the mutation's result.\n * @param options.onError - This function will fire if the mutation encounters an error and will be passed the error.\n * @param options.onSettled - This function will fire when the mutation is either successfully fetched or encounters an error and be passed either the data or error.\n * @remarks\n * - If you make multiple requests, `onSuccess` will fire only after the latest call you've made.\n * - All the callback functions (`onSuccess`, `onError`, `onSettled`) are void functions, and the returned value will be ignored.\n */\n mutate: MutateFunction<TData, TError, TVariables, TOnMutateResult>\n /**\n * A function to clean the mutation internal state (i.e., it resets the mutation to its initial state).\n */\n reset: () => void\n}\n\n/**\n * A mutation result in the `idle` state: the mutation hasn't run yet, or was reset.\n */\nexport interface MutationObserverIdleResult<\n TData = unknown,\n TError = DefaultError,\n TVariables = void,\n TOnMutateResult = unknown,\n> extends MutationObserverBaseResult<\n TData,\n TError,\n TVariables,\n TOnMutateResult\n> {\n /**\n * `undefined`, since the mutation hasn't run.\n */\n data: undefined\n /**\n * `undefined`, since the mutation hasn't run.\n */\n variables: undefined\n /**\n * `null`, since the mutation hasn't failed.\n */\n error: null\n /**\n * `false`, since the mutation hasn't failed.\n */\n isError: false\n /**\n * `true`, since the mutation hasn't run yet or was reset.\n */\n isIdle: true\n /**\n * `false`, since the mutation isn't running.\n */\n isPending: false\n /**\n * `false`, since the mutation hasn't succeeded.\n */\n isSuccess: false\n /**\n * `'idle'`, since the mutation hasn't run yet or was reset.\n */\n status: 'idle'\n}\n\n/**\n * A mutation result in the `pending` state while the mutation runs.\n */\nexport interface MutationObserverLoadingResult<\n TData = unknown,\n TError = DefaultError,\n TVariables = void,\n TOnMutateResult = unknown,\n> extends MutationObserverBaseResult<\n TData,\n TError,\n TVariables,\n TOnMutateResult\n> {\n /**\n * `undefined`, since the mutation hasn't succeeded.\n */\n data: undefined\n /**\n * The variables passed to `mutate` for this mutation.\n */\n variables: TVariables\n /**\n * `null`, since the mutation hasn't failed.\n */\n error: null\n /**\n * `false`, since the mutation hasn't failed.\n */\n isError: false\n /**\n * `false`, since the mutation has run.\n */\n isIdle: false\n /**\n * `true`, since the mutation is running.\n */\n isPending: true\n /**\n * `false`, since the mutation hasn't succeeded.\n */\n isSuccess: false\n /**\n * `'pending'`, since the mutation is running.\n */\n status: 'pending'\n}\n\n/**\n * A mutation result in the `error` state after the mutation failed.\n */\nexport interface MutationObserverErrorResult<\n TData = unknown,\n TError = DefaultError,\n TVariables = void,\n TOnMutateResult = unknown,\n> extends MutationObserverBaseResult<\n TData,\n TError,\n TVariables,\n TOnMutateResult\n> {\n /**\n * `undefined`, since the mutation hasn't succeeded.\n */\n data: undefined\n /**\n * The error the mutation failed with.\n */\n error: TError\n /**\n * The variables passed to `mutate` for this mutation.\n */\n variables: TVariables\n /**\n * `true`, since the mutation failed.\n */\n isError: true\n /**\n * `false`, since the mutation has run.\n */\n isIdle: false\n /**\n * `false`, since the mutation isn't running.\n */\n isPending: false\n /**\n * `false`, since the mutation hasn't succeeded.\n */\n isSuccess: false\n /**\n * `'error'`, since the mutation failed.\n */\n status: 'error'\n}\n\n/**\n * A mutation result in the `success` state after the mutation succeeded.\n */\nexport interface MutationObserverSuccessResult<\n TData = unknown,\n TError = DefaultError,\n TVariables = void,\n TOnMutateResult = unknown,\n> extends MutationObserverBaseResult<\n TData,\n TError,\n TVariables,\n TOnMutateResult\n> {\n /**\n * The data the mutation resolved with.\n */\n data: TData\n /**\n * `null`, since the mutation hasn't failed.\n */\n error: null\n /**\n * The variables passed to `mutate` for this mutation.\n */\n variables: TVariables\n /**\n * `false`, since the mutation hasn't failed.\n */\n isError: false\n /**\n * `false`, since the mutation has run.\n */\n isIdle: false\n /**\n * `false`, since the mutation isn't running.\n */\n isPending: false\n /**\n * `true`, since the mutation succeeded.\n */\n isSuccess: true\n /**\n * `'success'`, since the mutation succeeded.\n */\n status: 'success'\n}\n\n/**\n * The result of a `MutationObserver`, and of the hooks built on it like `useMutation`. Narrow it by\n * `status` or the `is*` flags to get the type of each state.\n */\nexport type MutationObserverResult<\n TData = unknown,\n TError = DefaultError,\n TVariables = void,\n TOnMutateResult = unknown,\n> =\n | MutationObserverIdleResult<TData, TError, TVariables, TOnMutateResult>\n | MutationObserverLoadingResult<TData, TError, TVariables, TOnMutateResult>\n | MutationObserverErrorResult<TData, TError, TVariables, TOnMutateResult>\n | MutationObserverSuccessResult<TData, TError, TVariables, TOnMutateResult>\n\n/**\n * The options of `new QueryClient()`: the `queryCache` and `mutationCache` to use, and the\n * `defaultOptions` for its queries and mutations.\n */\nexport interface QueryClientConfig {\n /** The query cache this client is connected to. A new `QueryCache` is created if not provided. */\n queryCache?: QueryCache\n /**\n * The mutation cache this client is connected to. A new `MutationCache` is created if not\n * provided.\n */\n mutationCache?: MutationCache\n /** Default options for all queries and mutations created through this client. */\n defaultOptions?: DefaultOptions\n}\n\n/**\n * The default options of a `QueryClient`, applied to every query (`queries`), mutation\n * (`mutations`), `hydrate`, and `dehydrate` call unless overridden.\n */\nexport interface DefaultOptions<TError = DefaultError> {\n /** Default options applied to every query, unless overridden per-query. */\n queries?: OmitKeyof<\n QueryObserverOptions<unknown, TError>,\n 'suspense' | 'queryKey'\n >\n /** Default options applied to every mutation, unless overridden per-mutation. */\n mutations?: MutationObserverOptions<unknown, TError, unknown, unknown>\n /** Default options used when hydrating queries and mutations; see {@link HydrateOptions}. */\n hydrate?: HydrateOptions['defaultOptions']\n /** Default options used when dehydrating the client's caches; see {@link DehydrateOptions}. */\n dehydrate?: DehydrateOptions\n}\n\n/**\n * Options for cancelling an in-flight fetch, e.g. via `query.cancel()`.\n * They are carried on the {@link CancelledError} that the cancelled fetch rejects with.\n */\nexport interface CancelOptions {\n /**\n * If `true`, the query goes back to the state it had before the fetch started, instead of getting\n * the cancellation error.\n */\n revert?: boolean\n /**\n * If `true`, the cancellation error isn't surfaced, e.g. because another fetch replaces the\n * cancelled one.\n */\n silent?: boolean\n}\n\n/**\n * Options for writing data into the cache, e.g. via `queryClient.setQueryData()`.\n * `updatedAt` overrides the timestamp the data is recorded with, which is what staleness is measured from;\n * omit it to use the current time.\n */\nexport interface SetDataOptions {\n /**\n * The timestamp to record the data with, instead of the current time. Staleness is measured from\n * it.\n */\n updatedAt?: number\n}\n\n/** @inline */\nexport type NotifyEventType =\n | 'added'\n | 'removed'\n | 'updated'\n | 'observerAdded'\n | 'observerRemoved'\n | 'observerResultsUpdated'\n | 'observerOptionsUpdated'\n\n/**\n * The base shape of the events that the query and mutation caches send to their listeners.\n */\nexport interface NotifyEvent {\n /**\n * The kind of event, e.g. `'added'`, `'removed'`, or `'updated'`.\n */\n type: NotifyEventType\n}\n"],"mappings":";;AAsGA,MAAa,gBAAgB,OAAO;AAKpC,MAAa,qBAAqB,OAAO;AAKzC,MAAa,cAAc,OAAO"}
1
+ {"version":3,"file":"types.js","names":[],"sources":["../../src/types.ts"],"sourcesContent":["/* istanbul ignore file */\n\nimport type { DehydrateOptions, HydrateOptions } from './hydration'\nimport type { MutationState } from './mutation'\nimport type { MutationCache } from './mutationCache'\nimport type { FetchDirection, Query, QueryBehavior } from './query'\nimport type { QueryCache } from './queryCache'\nimport type { QueryClient } from './queryClient'\nimport type { RetryDelayValue, RetryValue } from './retryer'\nimport type { QueryFilters, QueryTypeFilter, SkipToken } from './utils'\n\n/**\n * Excludes `undefined` from `T`. Used where a value must be defined, such as the data type that a\n * defined `initialData` resolves to.\n */\nexport type NonUndefinedGuard<T> = T extends undefined ? never : T\n\n/**\n * Like `Omit`, but applied to each member of a union separately, so each member keeps its own keys.\n */\nexport type DistributiveOmit<\n TObject,\n TKey extends keyof TObject,\n> = TObject extends any ? Omit<TObject, TKey> : never\n\n/**\n * Like `Omit`, but by default (`'strictly'`) `TKey` must be a key of `TObject`, so omitting a key\n * that doesn't exist is a type error. Pass `'safely'` to allow other keys too.\n */\nexport type OmitKeyof<\n TObject,\n TKey extends (TStrictly extends 'safely'\n ? | keyof TObject\n | (string & Record<never, never>)\n | (number & Record<never, never>)\n | (symbol & Record<never, never>)\n : keyof TObject),\n TStrictly extends 'strictly' | 'safely' = 'strictly',\n> = Omit<TObject, TKey>\n\n/**\n * Replaces the types of the properties of `TTargetA` that also exist in `TTargetB` with their types\n * in `TTargetB`. Properties that only exist in `TTargetB` are not added.\n */\nexport type Override<TTargetA, TTargetB> = {\n [AKey in keyof TTargetA]: AKey extends keyof TTargetB\n ? TTargetB[AKey]\n : TTargetA[AKey]\n}\n\n/**\n * The interface to augment via declaration merging to override Query's default types repository-wide.\n * Each field it declares replaces the default of the matching type: `defaultError` for {@link DefaultError},\n * `queryKey` for {@link QueryKey}, `mutationKey` for {@link MutationKey}, `queryMeta` for {@link QueryMeta} and\n * `mutationMeta` for {@link MutationMeta}. Leave a field out to keep that type's default.\n * Augment the module you install — `@tanstack/react-query`, `@tanstack/vue-query`,\n * `@tanstack/solid-query`, `@tanstack/svelte-query`, `@tanstack/preact-query`,\n * `@tanstack/angular-query` or `@tanstack/lit-query`. Augmenting `@tanstack/query-core`\n * works too and covers every adapter at once.\n * @example\n * ```ts\n * // Use the module you installed — here, the React adapter.\n * declare module '@tanstack/react-query' {\n * interface Register {\n * defaultError: AxiosError\n * }\n * }\n * ```\n */\nexport interface Register {\n // defaultError: Error\n // queryMeta: Record<string, unknown>\n // mutationMeta: Record<string, unknown>\n // queryKey: ReadonlyArray<unknown>\n // mutationKey: ReadonlyArray<unknown>\n}\n\n/**\n * The error type used wherever an error is not given an explicit type parameter.\n * Defaults to `Error`; declare `defaultError` on {@link Register} to change it everywhere at once.\n */\nexport type DefaultError = Register extends {\n defaultError: infer TError\n}\n ? TError\n : Error\n\n/**\n * The type of a query key — the serializable array that identifies a query in the cache.\n * Defaults to `ReadonlyArray<unknown>`; declare `queryKey` on {@link Register} to narrow it repository-wide.\n */\nexport type QueryKey = Register extends {\n queryKey: infer TQueryKey\n}\n ? TQueryKey extends ReadonlyArray<unknown>\n ? TQueryKey\n : TQueryKey extends Array<unknown>\n ? TQueryKey\n : ReadonlyArray<unknown>\n : ReadonlyArray<unknown>\n\nexport const dataTagSymbol = Symbol()\n/**\n * The type of the `dataTagSymbol` key, under which a {@link DataTag} stores its data type.\n */\nexport type dataTagSymbol = typeof dataTagSymbol\nexport const dataTagErrorSymbol = Symbol()\n/**\n * The type of the `dataTagErrorSymbol` key, under which a {@link DataTag} stores its error type.\n */\nexport type dataTagErrorSymbol = typeof dataTagErrorSymbol\nexport const unsetMarker = Symbol()\n/**\n * The type of `unsetMarker`, the default error type of a {@link DataTag}. It marks that no error\n * type was tagged.\n */\nexport type UnsetMarker = typeof unsetMarker\n/**\n * Matches any type that has been tagged with {@link DataTag}, whatever its data and error types.\n */\nexport type AnyDataTag = {\n /**\n * The data type the key was tagged with.\n */\n [dataTagSymbol]: any\n /**\n * The error type the key was tagged with.\n */\n [dataTagErrorSymbol]: any\n}\n/**\n * Tags `TType` (usually a query key) with a data type and an optional error type, so that APIs that\n * receive it, like `queryClient.getQueryData`, can infer them. A type that is already tagged is\n * returned as is.\n */\nexport type DataTag<\n TType,\n TValue,\n TError = UnsetMarker,\n> = TType extends AnyDataTag\n ? TType\n : TType & {\n [dataTagSymbol]: TValue\n [dataTagErrorSymbol]: TError\n }\n\n/**\n * An object whose `queryKey` is tagged with {@link DataTag}, like the options returned by\n * `queryOptions`.\n */\nexport type QueryKeyWithDataTag<\n TQueryKey extends QueryKey = QueryKey,\n TQueryFnData = unknown,\n TError = DefaultError,\n> = {\n /**\n * The query key, tagged with the query's data and error types.\n */\n queryKey: DataTag<TQueryKey, TQueryFnData, TError>\n}\n\n/**\n * The data type tagged on a query key by {@link DataTag}, or `TQueryFnData` if the key is not\n * tagged.\n */\nexport type InferDataFromTag<TQueryFnData, TTaggedQueryKey extends QueryKey> =\n TTaggedQueryKey extends DataTag<unknown, infer TaggedValue, unknown>\n ? TaggedValue\n : TQueryFnData\n\n/**\n * The error type tagged on a query key by {@link DataTag}, or `TError` if the key is not tagged or\n * was tagged without an error type.\n */\nexport type InferErrorFromTag<TError, TTaggedQueryKey extends QueryKey> =\n TTaggedQueryKey extends DataTag<unknown, unknown, infer TaggedError>\n ? TaggedError extends UnsetMarker\n ? TError\n : TaggedError\n : TError\n\n/** @inline */\nexport type QueryFunction<\n T = unknown,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = never,\n> = (context: QueryFunctionContext<TQueryKey, TPageParam>) => T | Promise<T>\n\n/** @inline */\nexport type StaleTime = number | 'static'\n\n/** @inline */\nexport type StaleTimeFunction<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n> =\n | StaleTime\n | ((query: Query<TQueryFnData, TError, TData, TQueryKey>) => StaleTime)\n\n/** @inline */\nexport type QueryBooleanOption<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n> =\n | boolean\n | ((query: Query<TQueryFnData, TError, TData, TQueryKey>) => boolean)\n\n/** @inline */\nexport type QueryPersister<\n T = unknown,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = never,\n> = [TPageParam] extends [never]\n ? (\n queryFn: QueryFunction<T, TQueryKey, never>,\n context: QueryFunctionContext<TQueryKey>,\n query: Query,\n ) => T | Promise<T>\n : (\n queryFn: QueryFunction<T, TQueryKey, TPageParam>,\n context: QueryFunctionContext<TQueryKey>,\n query: Query,\n ) => T | Promise<T>\n\n/**\n * The object passed to `queryFn`: the `QueryClient`, the `queryKey`, an `AbortSignal` that aborts\n * when the query is cancelled, the query's `meta`, and for infinite queries the `pageParam` of the\n * page being fetched.\n */\nexport type QueryFunctionContext<\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = never,\n> = [TPageParam] extends [never]\n ? {\n client: QueryClient\n queryKey: TQueryKey\n signal: AbortSignal\n meta: QueryMeta | undefined\n pageParam?: unknown\n /**\n * @deprecated\n * if you want access to the direction, you can add it to the pageParam\n */\n direction?: unknown\n }\n : {\n client: QueryClient\n queryKey: TQueryKey\n signal: AbortSignal\n pageParam: TPageParam\n /**\n * @deprecated\n * if you want access to the direction, you can add it to the pageParam\n */\n direction: FetchDirection\n meta: QueryMeta | undefined\n }\n\n/** @inline */\nexport type InitialDataFunction<T> = () => T | undefined\n\n// oxlint-disable-next-line typescript/no-unsafe-function-type -- excludes every function-like value, including constructors, from the value branch\ntype NonFunctionGuard<T> = T extends Function ? never : T\n\n/** @inline */\nexport type PlaceholderDataFunction<\n TQueryFnData = unknown,\n TError = DefaultError,\n TQueryData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n> = (\n previousData: TQueryData | undefined,\n previousQuery: Query<TQueryFnData, TError, TQueryData, TQueryKey> | undefined,\n) => TQueryData | undefined\n\n/**\n * The `placeholderData` function of a query in `useQueries` and its counterparts. Unlike\n * {@link PlaceholderDataFunction}, it receives no previous data or query, because the number of\n * queries can differ between renders.\n */\nexport type QueriesPlaceholderDataFunction<TQueryData> = (\n previousData: undefined,\n previousQuery: undefined,\n) => TQueryData | undefined\n\n/** @inline */\nexport type QueryKeyHashFunction<TQueryKey extends QueryKey> = (\n queryKey: TQueryKey,\n) => string\n\n/** @inline */\nexport type GetPreviousPageParamFunction<TPageParam, TQueryFnData = unknown> = (\n firstPage: TQueryFnData,\n allPages: Array<TQueryFnData>,\n firstPageParam: TPageParam,\n allPageParams: Array<TPageParam>,\n) => TPageParam | undefined | null\n\n/** @inline */\nexport type GetNextPageParamFunction<TPageParam, TQueryFnData = unknown> = (\n lastPage: TQueryFnData,\n allPages: Array<TQueryFnData>,\n lastPageParam: TPageParam,\n allPageParams: Array<TPageParam>,\n) => TPageParam | undefined | null\n\n/**\n * The data shape of an infinite query: every page fetched so far, plus the page param each one was fetched with.\n * `pages` and `pageParams` are index-aligned — `pageParams[i]` is the param that produced `pages[i]`.\n */\nexport interface InfiniteData<TData, TPageParam = unknown> {\n /**\n * The data of every page fetched so far, in order.\n */\n pages: Array<TData>\n /**\n * The page param each page was fetched with, aligned by index with `pages`.\n */\n pageParams: Array<TPageParam>\n}\n\n/**\n * The type of the `meta` object that can be attached to a query and read back from `queryFn`, callbacks and\n * cache-level handlers. Defaults to `Record<string, unknown>`; declare `queryMeta` on {@link Register} to narrow it.\n */\nexport type QueryMeta = Register extends {\n queryMeta: infer TQueryMeta\n}\n ? TQueryMeta extends Record<string, unknown>\n ? TQueryMeta\n : Record<string, unknown>\n : Record<string, unknown>\n\n/** @inline */\nexport type NetworkMode = 'online' | 'always' | 'offlineFirst'\n\n/** @inline */\nexport type NotifyOnChangeProps =\n | Array<keyof InfiniteQueryObserverResult>\n | 'all'\n | undefined\n | (() => Array<keyof InfiniteQueryObserverResult> | 'all' | undefined)\n\n/**\n * The options of a query itself — its `queryKey`, `queryFn`, retries, `gcTime`, `initialData`,\n * `meta`, and so on — shared by observers and the `QueryClient` methods that fetch queries.\n */\nexport interface QueryOptions<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = never,\n> {\n /**\n * If `false`, failed queries will not retry by default.\n * If `true`, failed queries will retry infinitely.\n * If set to an integer number, e.g. 3, failed queries will retry until the failed query count meets that number.\n * If set to a function `(failureCount, error) => boolean` failed queries will retry until the function returns false.\n *\n * Defaults to `3` on the client and `0` on the server.\n */\n retry?: RetryValue<TError>\n /**\n * This function receives a `retryAttempt` integer and the actual Error and returns the delay to apply before the\n * next attempt in milliseconds.\n *\n * A function like `attempt => Math.min(attempt > 1 ? 2 ** attempt * 1000 : 1000, 30 * 1000)` applies exponential\n * backoff.\n *\n * A function like `attempt => attempt * 1000` applies linear backoff.\n *\n * Defaults to a function that applies exponential backoff, capped at 30 seconds.\n */\n retryDelay?: RetryDelayValue<TError>\n /**\n * Controls whether a query is allowed to run based on the current network connectivity.\n * @defaultValue 'online'\n * @see [Network Mode](https://tanstack.com/query/latest/docs/framework/react/guides/network-mode) for more information.\n */\n networkMode?: NetworkMode\n /**\n * The time in milliseconds that unused/inactive cache data remains in memory.\n * When a query's cache becomes unused or inactive, that cache data will be garbage collected after this duration.\n * When different garbage collection times are specified, the longest one will be used.\n * Setting it to `Infinity` will disable garbage collection.\n *\n * Defaults to `5 * 60 * 1000` (5 minutes), or `Infinity` during SSR.\n *\n * Note: the maximum allowed time is about 24 days, imposed by `setTimeout`'s 32-bit signed integer delay — see\n * `timeoutManager.setTimeoutProvider` for a workaround.\n */\n gcTime?: number\n /**\n * The function that the query will use to request data.\n * Required, unless a default query function has been set via `queryClient.setQueryDefaults` or\n * `queryClient.setDefaultOptions`.\n * Receives a {@link QueryFunctionContext}.\n * Must return a promise that will either resolve data or throw an error. The data cannot be `undefined`.\n */\n queryFn?: QueryFunction<TQueryFnData, TQueryKey, TPageParam> | SkipToken\n /**\n * This option can be used to persist the result of a query to an external storage, bypassing the need to actually\n * call the `queryFn`. Useful for persisting a query's data across e.g. server/client boundaries.\n */\n persister?: QueryPersister<TQueryFnData, NoInfer<TQueryKey>, TPageParam>\n /**\n * The hashed form of `queryKey`, computed with `queryKeyHashFn` (or the default hashing function otherwise). Used\n * as the actual cache key internally.\n */\n queryHash?: string\n /**\n * The query key to use for this query.\n *\n * The query key will be hashed into a stable hash. See [Query Keys](https://tanstack.com/query/latest/docs/framework/react/guides/query-keys)\n * for more information.\n *\n * The query will automatically update when this key changes (as long as `enabled` is not set to `false`).\n */\n queryKey?: TQueryKey\n /**\n * If specified, this function is used to hash the `queryKey` to a string.\n */\n queryKeyHashFn?: QueryKeyHashFunction<TQueryKey>\n /**\n * If set, this value will be used as the initial data for the query cache (as long as the query hasn't been\n * created or cached yet).\n * If set to a function, the function will be called **once** during the shared/root query initialization, and be\n * expected to synchronously return the initial data.\n * Initial data is considered stale by default unless a `staleTime` has been set.\n * `initialData` **is persisted** to the cache.\n */\n initialData?: TData | InitialDataFunction<TData>\n /**\n * If set, this value will be used as the time (in milliseconds) of when the `initialData` itself was last updated.\n */\n initialDataUpdatedAt?: number | (() => number | undefined)\n /** @internal */\n behavior?: QueryBehavior<TQueryFnData, TError, TData, TQueryKey>\n /**\n * Set this to `false` to disable structural sharing between query results.\n * Set this to a function which accepts the old and new data and returns resolved data of the same type to implement custom structural sharing logic.\n * @defaultValue true\n */\n structuralSharing?:\n | boolean\n | ((oldData: unknown | undefined, newData: unknown) => unknown)\n /** @internal */\n _defaulted?: boolean\n /** @internal */\n _type?: 'infinite'\n /**\n * Additional payload to be stored on each query.\n * Use this property to pass information that can be used in other places.\n */\n meta?: QueryMeta\n /**\n * Maximum number of pages to store in the data of an infinite query.\n */\n maxPages?: number\n}\n\n/**\n * Holds the `initialPageParam` option that every infinite query requires.\n */\nexport interface InitialPageParam<TPageParam = unknown> {\n /**\n * The page param to start from when an infinite query has no pages yet.\n * It is passed to `queryFn` as `pageParam` for the first page; every page after that gets the\n * value returned by `getNextPageParam` or `getPreviousPageParam`.\n * It only applies while the query has no pages: once a first page exists, refetching starts from\n * that page's own param instead.\n */\n initialPageParam: TPageParam\n}\n\n/**\n * The page param options of an infinite query: `initialPageParam`, and the `getNextPageParam` and\n * `getPreviousPageParam` functions that compute the params of the pages around it.\n */\nexport interface InfiniteQueryPageParamsOptions<\n TQueryFnData = unknown,\n TPageParam = unknown,\n> extends InitialPageParam<TPageParam> {\n /**\n * This function can be set to automatically get the previous cursor for infinite queries.\n * The result will also be used to determine the value of `hasPreviousPage`.\n */\n getPreviousPageParam?: GetPreviousPageParamFunction<TPageParam, TQueryFnData>\n /**\n * This function can be set to automatically get the next cursor for infinite queries.\n * The result will also be used to determine the value of `hasNextPage`.\n */\n getNextPageParam: GetNextPageParamFunction<TPageParam, TQueryFnData>\n}\n\n/** @inline */\nexport type ThrowOnError<\n TQueryFnData,\n TError,\n TQueryData,\n TQueryKey extends QueryKey,\n> =\n | boolean\n | ((\n error: TError,\n query: Query<TQueryFnData, TError, TQueryData, TQueryKey>,\n ) => boolean)\n\n/**\n * The options of a `QueryObserver`, and of the hooks built on it like `useQuery`: the\n * {@link QueryOptions} of the query, plus options that control the observer, such as `enabled`,\n * `staleTime`, `refetchInterval`, `select`, and `placeholderData`.\n */\nexport interface QueryObserverOptions<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = never,\n> extends WithRequired<\n QueryOptions<TQueryFnData, TError, TQueryData, TQueryKey, TPageParam>,\n 'queryKey'\n> {\n /**\n * Set this to `false` or a function that returns `false` to disable automatic refetching when the query mounts or changes query keys.\n * To refetch the query, use the `refetch` method returned from the `useQuery` instance.\n * Accepts a boolean or function that returns a boolean.\n * @defaultValue true\n */\n enabled?: QueryBooleanOption<TQueryFnData, TError, TQueryData, TQueryKey>\n /**\n * The time in milliseconds after data is considered stale.\n * If set to `Infinity`, the data will never be considered stale.\n * If set to `'static'`, the data will never be considered stale.\n * If set to a function, the function will be executed with the query to compute a `staleTime`.\n * @defaultValue 0\n */\n staleTime?: StaleTimeFunction<TQueryFnData, TError, TQueryData, TQueryKey>\n /**\n * If set to a number, the query will continuously refetch at this frequency in milliseconds.\n * If set to a function, the function will be executed with the latest data and query to compute a frequency\n * @defaultValue false\n */\n refetchInterval?:\n | number\n | false\n | ((\n query: Query<TQueryFnData, TError, TQueryData, TQueryKey>,\n ) => number | false | undefined)\n /**\n * If set to `true`, the query will continue to refetch while their tab/window is in the background.\n * @defaultValue false\n */\n refetchIntervalInBackground?: boolean\n /**\n * If set to `true`, the query will refetch on window focus if the data is stale.\n * If set to `false`, the query will not refetch on window focus.\n * If set to `'always'`, the query will always refetch on window focus (except when `staleTime: 'static'` is used).\n * If set to a function, the function will be executed with the latest data and query to compute the value.\n * @defaultValue true\n */\n refetchOnWindowFocus?:\n | boolean\n | 'always'\n | ((\n query: Query<TQueryFnData, TError, TQueryData, TQueryKey>,\n ) => boolean | 'always')\n /**\n * If set to `true`, the query will refetch on reconnect if the data is stale.\n * If set to `false`, the query will not refetch on reconnect.\n * If set to `'always'`, the query will always refetch on reconnect (except when `staleTime: 'static'` is used).\n * If set to a function, the function will be executed with the latest data and query to compute the value.\n *\n * Defaults to `true` unless `networkMode` is `'always'`.\n */\n refetchOnReconnect?:\n | boolean\n | 'always'\n | ((\n query: Query<TQueryFnData, TError, TQueryData, TQueryKey>,\n ) => boolean | 'always')\n /**\n * If set to `true`, the query will refetch on mount if the data is stale.\n * If set to `false`, will disable additional instances of a query to trigger background refetch.\n * If set to `'always'`, the query will always refetch on mount (except when `staleTime: 'static'` is used).\n * If set to a function, the function will be executed with the latest data and query to compute the value\n * @defaultValue true\n */\n refetchOnMount?:\n | boolean\n | 'always'\n | ((\n query: Query<TQueryFnData, TError, TQueryData, TQueryKey>,\n ) => boolean | 'always')\n /**\n * If set to `false`, the query will not be retried on mount if it contains an error.\n * If set to a function, the function will be executed with the query to compute the value.\n * @defaultValue true\n */\n retryOnMount?: QueryBooleanOption<TQueryFnData, TError, TQueryData, TQueryKey>\n /**\n * If set, the component will only re-render if any of the listed properties change.\n * When set to `['data', 'error']`, the component will only re-render when the `data` or `error` properties change.\n * When set to `'all'`, the component will re-render whenever a query is updated.\n * When set to a function, the function will be executed to compute the list of properties.\n *\n * Defaults to `undefined`, in which case property access is tracked automatically, and the\n * component only re-renders when one of the tracked properties changes.\n */\n notifyOnChangeProps?: NotifyOnChangeProps\n /**\n * Whether errors should be thrown instead of setting the `error` property.\n * If set to `true` or `suspense` is `true`, all errors will be thrown to the error boundary.\n * If set to `false` and `suspense` is `false`, errors are returned as state.\n * If set to a function, it will be passed the error and the query, and it should return a boolean indicating whether to show the error in an error boundary (`true`) or return the error as state (`false`).\n * @defaultValue false\n */\n throwOnError?: ThrowOnError<TQueryFnData, TError, TQueryData, TQueryKey>\n /**\n * This option can be used to transform or select a part of the data returned by the query function. It affects\n * the returned `data` value, but does not affect what gets stored in the query cache.\n * The `select` function will only run if `data` changed, or if the reference to the `select` function itself\n * changes. To optimize, memoize the function so its reference stays stable across calls.\n */\n select?: (data: TQueryData) => TData\n /**\n * If set to `true`, the query will suspend when `status === 'pending'`\n * and throw errors when `status === 'error'`.\n * @defaultValue false\n */\n suspense?: boolean\n /**\n * If set, this value will be used as the placeholder data for this particular query observer while the query is still in the `loading` data and no initialData has been provided.\n */\n placeholderData?:\n | NonFunctionGuard<TQueryData>\n | PlaceholderDataFunction<\n NonFunctionGuard<TQueryData>,\n TError,\n NonFunctionGuard<TQueryData>,\n TQueryKey\n >\n\n /** @internal */\n _optimisticResults?: 'optimistic' | 'isRestoring'\n}\n\n/**\n * Makes the `TKey` properties of `TTarget` required and non-nullable.\n */\nexport type WithRequired<TTarget, TKey extends keyof TTarget> = TTarget & {\n [_ in TKey]: {}\n}\n\n/**\n * The {@link QueryObserverOptions} after `QueryClient#defaultQueryOptions` has applied the\n * defaults, so `throwOnError`, `refetchOnReconnect`, and `queryHash` are always set.\n */\nexport type DefaultedQueryObserverOptions<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n> = WithRequired<\n QueryObserverOptions<TQueryFnData, TError, TData, TQueryData, TQueryKey>,\n 'throwOnError' | 'refetchOnReconnect' | 'queryHash'\n>\n\n/**\n * The options of an `InfiniteQueryObserver`: {@link QueryObserverOptions} whose query data is\n * {@link InfiniteData}, plus the page param options.\n */\nexport interface InfiniteQueryObserverOptions<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = unknown,\n>\n extends\n QueryObserverOptions<\n TQueryFnData,\n TError,\n TData,\n InfiniteData<TQueryFnData, TPageParam>,\n TQueryKey,\n TPageParam\n >,\n InfiniteQueryPageParamsOptions<TQueryFnData, TPageParam> {}\n\n/**\n * The {@link InfiniteQueryObserverOptions} after `QueryClient#defaultQueryOptions` has applied the\n * defaults, so `throwOnError`, `refetchOnReconnect`, and `queryHash` are always set.\n */\nexport type DefaultedInfiniteQueryObserverOptions<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = unknown,\n> = WithRequired<\n InfiniteQueryObserverOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n >,\n 'throwOnError' | 'refetchOnReconnect' | 'queryHash'\n>\n\n/**\n * The options of `queryClient.query`: the {@link QueryOptions} of the query, plus a `staleTime`\n * that decides whether cached data is returned instead of fetching, and a `select` that only\n * transforms the value the call resolves with.\n */\nexport interface QueryExecuteOptions<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = never,\n> extends WithRequired<\n QueryOptions<TQueryFnData, TError, TQueryData, TQueryKey, TPageParam>,\n 'queryKey'\n> {\n /**\n * Not allowed here, since `initialPageParam` only applies to infinite queries.\n */\n initialPageParam?: never\n /**\n * This option can be used to transform or select a part of the data returned by the query function. It affects\n * the value this call resolves with, but does not affect what gets stored in the query cache.\n */\n select?: (data: TQueryData) => TData\n /**\n * The time in milliseconds after data is considered stale.\n * If the data is fresh it will be returned from the cache.\n */\n staleTime?: StaleTimeFunction<TQueryFnData, TError, TQueryData, TQueryKey>\n}\n\n/** @deprecated */\nexport interface FetchQueryOptions<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = never,\n> extends WithRequired<\n QueryOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>,\n 'queryKey'\n> {\n /**\n * Not allowed here, since `initialPageParam` only applies to infinite queries.\n */\n initialPageParam?: never\n /**\n * The time in milliseconds after data is considered stale.\n * If the data is fresh it will be returned from the cache.\n */\n staleTime?: StaleTimeFunction<TQueryFnData, TError, TData, TQueryKey>\n}\n\n/** @deprecated */\nexport interface EnsureQueryDataOptions<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = never,\n> extends FetchQueryOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n> {\n /**\n * If `true`, stale cached data is returned and also refetched in the background.\n */\n revalidateIfStale?: boolean\n}\n\n/** @deprecated */\nexport type EnsureInfiniteQueryDataOptions<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = unknown,\n> = FetchInfiniteQueryOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n> & {\n revalidateIfStale?: boolean\n}\n\ntype InfiniteQueryFetchPageOptions<TQueryFnData, TPageParam> = Pick<\n InfiniteQueryPageParamsOptions<TQueryFnData, TPageParam>,\n 'initialPageParam' | 'getNextPageParam'\n> & {\n /**\n * The number of pages to fetch. Defaults to the number of cached pages,\n * or one page if the cache has no pages.\n */\n pages?: number\n}\n\n/**\n * The options of `queryClient.infiniteQuery`. Extends {@link QueryExecuteOptions}\n * with `initialPageParam`, `getNextPageParam`, and the optional `pages` count.\n */\nexport type InfiniteQueryExecuteOptions<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = InfiniteData<TQueryFnData>,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = unknown,\n> = Omit<\n QueryExecuteOptions<\n TQueryFnData,\n TError,\n TData,\n InfiniteData<TQueryFnData, TPageParam>,\n TQueryKey,\n TPageParam\n >,\n 'initialPageParam'\n> &\n InfiniteQueryFetchPageOptions<TQueryFnData, TPageParam>\n\n/** @deprecated */\nexport type FetchInfiniteQueryOptions<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = unknown,\n> = Omit<\n FetchQueryOptions<\n TQueryFnData,\n TError,\n InfiniteData<TData, TPageParam>,\n TQueryKey,\n TPageParam\n >,\n 'initialPageParam'\n> &\n InfiniteQueryFetchPageOptions<TQueryFnData, TPageParam>\n\n/**\n * Options shared by the `QueryClient` and observer methods that refetch queries, controlling\n * whether a failed refetch makes the returned promise reject.\n */\nexport interface ResultOptions {\n /**\n * If set to `true`, the method throws if any of the underlying query refetch tasks fail.\n * If set to `false`, failed refetches are swallowed and not surfaced to the caller.\n * @defaultValue false\n */\n throwOnError?: boolean\n}\n\n/**\n * Options of the methods that refetch queries, like `refetch` and `queryClient.refetchQueries`.\n */\nexport interface RefetchOptions extends ResultOptions {\n /**\n * If set to `true`, a currently running request will be cancelled before a new request is made\n *\n * If set to `false`, no refetch will be made if there is already a request running.\n * @defaultValue true\n */\n cancelRefetch?: boolean\n}\n\n/**\n * The filters of `queryClient.invalidateQueries`: the {@link QueryFilters} that select the queries\n * to invalidate, plus `refetchType` to choose which of them are refetched.\n */\nexport interface InvalidateQueryFilters<\n TQueryKey extends QueryKey = QueryKey,\n> extends QueryFilters<TQueryKey> {\n /**\n * Controls which of the matched (now-invalidated) queries are refetched in the background.\n *\n * - `'active'`: only queries with at least one active observer are refetched.\n * - `'inactive'`: only queries with no active observer are refetched.\n * - `'all'`: every matched query is refetched, active or not.\n * - `'none'`: no query is refetched; matched queries are only marked as invalidated.\n * @defaultValue 'active'\n */\n refetchType?: QueryTypeFilter | 'none'\n}\n\n/**\n * The filters of `queryClient.refetchQueries`, which select the queries to refetch.\n */\nexport interface RefetchQueryFilters<\n TQueryKey extends QueryKey = QueryKey,\n> extends QueryFilters<TQueryKey> {}\n\n/**\n * Options of `queryClient.invalidateQueries`, applied to the refetch that follows the invalidation.\n */\nexport interface InvalidateOptions extends RefetchOptions {}\n/**\n * Options of `queryClient.resetQueries`, applied to the refetch of the active queries after the\n * reset.\n */\nexport interface ResetOptions extends RefetchOptions {}\n\n/**\n * Options of `fetchNextPage` on an infinite query result.\n */\nexport interface FetchNextPageOptions extends ResultOptions {\n /**\n * If set to `true`, calling `fetchNextPage` repeatedly will invoke `queryFn` every time,\n * whether the previous invocation has resolved or not. Also, the result from previous invocations will be ignored.\n *\n * If set to `false`, calling `fetchNextPage` repeatedly won't have any effect until the first invocation has resolved.\n * @defaultValue true\n */\n cancelRefetch?: boolean\n}\n\n/**\n * Options of `fetchPreviousPage` on an infinite query result.\n */\nexport interface FetchPreviousPageOptions extends ResultOptions {\n /**\n * If set to `true`, calling `fetchPreviousPage` repeatedly will invoke `queryFn` every time,\n * whether the previous invocation has resolved or not. Also, the result from previous invocations will be ignored.\n *\n * If set to `false`, calling `fetchPreviousPage` repeatedly won't have any effect until the first invocation has resolved.\n * @defaultValue true\n */\n cancelRefetch?: boolean\n}\n\n/** @inline */\nexport type QueryStatus = 'pending' | 'error' | 'success'\n/** @inline */\nexport type FetchStatus = 'fetching' | 'paused' | 'idle'\n\n/**\n * The properties shared by every state of a query result, like `data`, `error`, `status`, the\n * `is*` flags, and `refetch`. Each `QueryObserver*Result` narrows them for one state.\n */\nexport interface QueryObserverBaseResult<\n TData = unknown,\n TError = DefaultError,\n> {\n /**\n * The last successfully resolved data for the query.\n */\n data: TData | undefined\n /**\n * The timestamp for when the query most recently returned the `status` as `\"success\"`.\n */\n dataUpdatedAt: number\n /**\n * The error object for the query, if an error was thrown.\n * - Defaults to `null`.\n */\n error: TError | null\n /**\n * The timestamp for when the query most recently returned the `status` as `\"error\"`.\n */\n errorUpdatedAt: number\n /**\n * The failure count for the query.\n * - Incremented every time the query fails.\n * - Reset to `0` when the query succeeds.\n */\n failureCount: number\n /**\n * The failure reason for the query retry.\n * - Reset to `null` when the query succeeds.\n */\n failureReason: TError | null\n /**\n * The sum of all errors.\n */\n errorUpdateCount: number\n /**\n * A derived boolean from the `status` variable, provided for convenience.\n * - `true` if the query has an error from a fetch that failed after its retries, or if `select` threw.\n */\n isError: boolean\n /**\n * Will be `true` if the query has been fetched.\n */\n isFetched: boolean\n /**\n * Will be `true` if the query has been fetched after the component mounted.\n * - This property can be used to not show any previously cached data.\n */\n isFetchedAfterMount: boolean\n /**\n * A derived boolean from the `fetchStatus` variable, provided for convenience.\n * - `true` whenever the `queryFn` is executing, which includes initial `pending` as well as background refetch.\n */\n isFetching: boolean\n /**\n * Is `true` whenever the first fetch for a query is in-flight.\n * - Is the same as `isFetching && isPending`.\n */\n isLoading: boolean\n /**\n * Will be `true` if the query has no cached data, no data from `placeholderData` and no error.\n */\n isPending: boolean\n /**\n * Will be `true` if the query has an error and no data to display.\n */\n isLoadingError: boolean\n /**\n * @deprecated `isInitialLoading` is being deprecated in favor of `isLoading`\n * and will be removed in the next major version.\n */\n isInitialLoading: boolean\n /**\n * A derived boolean from the `fetchStatus` variable, provided for convenience.\n * - The query wanted to fetch, but has been `paused`.\n */\n isPaused: boolean\n /**\n * Will be `true` if the data shown is the placeholder data.\n */\n isPlaceholderData: boolean\n /**\n * Will be `true` if the query has an error and still has data to display (for infinite queries, not after a failed page fetch).\n */\n isRefetchError: boolean\n /**\n * Is `true` whenever a background refetch is in-flight, which _does not_ include initial `pending`.\n * - Is the same as `isFetching && !isPending`.\n */\n isRefetching: boolean\n /**\n * Will be `true` if the data in the cache is invalidated or if the data is older than the given `staleTime`.\n */\n isStale: boolean\n /**\n * A derived boolean from the `status` variable, provided for convenience.\n * - `true` if the query has cached data or data from `placeholderData`, and no error.\n */\n isSuccess: boolean\n /**\n * `true` if this observer is enabled, `false` otherwise.\n */\n isEnabled: boolean\n /**\n * A function to manually refetch the query.\n */\n refetch: (\n options?: RefetchOptions,\n ) => Promise<QueryObserverResult<TData, TError>>\n /**\n * The status of the query.\n * - Will be:\n * - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw.\n * - `success` if the query has cached data (even if `select` returns `undefined`) or data from `placeholderData`, and no error.\n * - `pending` otherwise, since the query has no cached data, no data from `placeholderData` and no error.\n */\n status: QueryStatus\n /**\n * The fetch status of the query.\n * - `fetching`: Is `true` whenever the queryFn is executing, which includes initial `pending` as well as background refetch.\n * - `paused`: The query wanted to fetch, but has been `paused`.\n * - `idle`: The query is not fetching.\n * - See [Network Mode](https://tanstack.com/query/latest/docs/framework/react/guides/network-mode) for more information.\n */\n fetchStatus: FetchStatus\n}\n\n/**\n * A query result in the `pending` state: the query has no data yet.\n */\nexport interface QueryObserverPendingResult<\n TData = unknown,\n TError = DefaultError,\n> extends QueryObserverBaseResult<TData, TError> {\n /**\n * `undefined`, since the query has no data yet.\n */\n data: undefined\n /**\n * `null`, since the query isn't in the `error` state.\n */\n error: null\n /**\n * `false`, since the query isn't in the `error` state.\n */\n isError: false\n /**\n * `true`, since the query has no cached data, no data from `placeholderData` and no error.\n */\n isPending: true\n /**\n * `false`, since the query didn't fail while fetching for the first time.\n */\n isLoadingError: false\n /**\n * `false`, since the query didn't fail while refetching.\n */\n isRefetchError: false\n /**\n * `false`, since the query isn't in the `success` state.\n */\n isSuccess: false\n /**\n * `false`, since the data shown isn't the `placeholderData`.\n */\n isPlaceholderData: false\n /**\n * `'pending'`, since the query has no cached data, no data from `placeholderData` and no error.\n */\n status: 'pending'\n}\n\n/**\n * A query result in the `pending` state while the first fetch is in flight, so `isLoading` is\n * `true`.\n */\nexport interface QueryObserverLoadingResult<\n TData = unknown,\n TError = DefaultError,\n> extends QueryObserverBaseResult<TData, TError> {\n /**\n * `undefined`, since the query has no data yet.\n */\n data: undefined\n /**\n * `null`, since the query isn't in the `error` state.\n */\n error: null\n /**\n * `false`, since the query isn't in the `error` state.\n */\n isError: false\n /**\n * `true`, since the query has no cached data, no data from `placeholderData` and no error.\n */\n isPending: true\n /**\n * `true`, since the first fetch is in flight.\n */\n isLoading: true\n /**\n * `false`, since the query didn't fail while fetching for the first time.\n */\n isLoadingError: false\n /**\n * `false`, since the query didn't fail while refetching.\n */\n isRefetchError: false\n /**\n * `false`, since the query isn't in the `success` state.\n */\n isSuccess: false\n /**\n * `false`, since the data shown isn't the `placeholderData`.\n */\n isPlaceholderData: false\n /**\n * `'pending'`, since the query has no cached data, no data from `placeholderData` and no error.\n */\n status: 'pending'\n}\n\n/**\n * A query result in the `error` state with no data to display, since a fetch or `select` failed.\n */\nexport interface QueryObserverLoadingErrorResult<\n TData = unknown,\n TError = DefaultError,\n> extends QueryObserverBaseResult<TData, TError> {\n /**\n * `undefined`, since there was no data to display when a fetch or `select` failed.\n */\n data: undefined\n /**\n * The error the fetch or `select` failed with.\n */\n error: TError\n /**\n * `true`, since the query is in the `error` state.\n */\n isError: true\n /**\n * `false`, since the query has cached data, data from `placeholderData` or an error.\n */\n isPending: false\n /**\n * `false`, since the first fetch isn't in flight.\n */\n isLoading: false\n /**\n * `true`, since the query has an error and no data to display.\n */\n isLoadingError: true\n /**\n * `false`, since the query didn't fail while refetching.\n */\n isRefetchError: false\n /**\n * `false`, since the query isn't in the `success` state.\n */\n isSuccess: false\n /**\n * `false`, since the data shown isn't the `placeholderData`.\n */\n isPlaceholderData: false\n /**\n * `'error'`, since a fetch failed after its retries or `select` threw.\n */\n status: 'error'\n}\n\n/**\n * A query result in the `error` state that keeps the data from before a fetch or `select` failed.\n */\nexport interface QueryObserverRefetchErrorResult<\n TData = unknown,\n TError = DefaultError,\n> extends QueryObserverBaseResult<TData, TError> {\n /**\n * The data from before the fetch or `select` failed, which is kept.\n */\n data: TData\n /**\n * The error the fetch or `select` failed with.\n */\n error: TError\n /**\n * `true`, since the query is in the `error` state.\n */\n isError: true\n /**\n * `false`, since the query has cached data, data from `placeholderData` or an error.\n */\n isPending: false\n /**\n * `false`, since the first fetch isn't in flight.\n */\n isLoading: false\n /**\n * `false`, since the query didn't fail while fetching for the first time.\n */\n isLoadingError: false\n /**\n * `true`, since the query has an error and still has data to display.\n */\n isRefetchError: true\n /**\n * `false`, since the query isn't in the `success` state.\n */\n isSuccess: false\n /**\n * `false`, since the data shown isn't the `placeholderData`.\n */\n isPlaceholderData: false\n /**\n * `'error'`, since a fetch failed after its retries or `select` threw.\n */\n status: 'error'\n}\n\n/**\n * A query result in the `success` state with data from the cache.\n */\nexport interface QueryObserverSuccessResult<\n TData = unknown,\n TError = DefaultError,\n> extends QueryObserverBaseResult<TData, TError> {\n /**\n * The last successfully resolved data for the query.\n */\n data: TData\n /**\n * `null`, since the query isn't in the `error` state.\n */\n error: null\n /**\n * `false`, since the query isn't in the `error` state.\n */\n isError: false\n /**\n * `false`, since the query has cached data, data from `placeholderData` or an error.\n */\n isPending: false\n /**\n * `false`, since the first fetch isn't in flight.\n */\n isLoading: false\n /**\n * `false`, since the query didn't fail while fetching for the first time.\n */\n isLoadingError: false\n /**\n * `false`, since the query didn't fail while refetching.\n */\n isRefetchError: false\n /**\n * `true`, since the query is in the `success` state.\n */\n isSuccess: true\n /**\n * `false`, since the data shown isn't the `placeholderData`.\n */\n isPlaceholderData: false\n /**\n * `'success'`, since the query has cached data and no error from a fetch or from\n * `select`.\n */\n status: 'success'\n}\n\n/**\n * A query result in the `success` state that shows `placeholderData` while the query has no data\n * yet.\n */\nexport interface QueryObserverPlaceholderResult<\n TData = unknown,\n TError = DefaultError,\n> extends QueryObserverBaseResult<TData, TError> {\n /**\n * The `placeholderData` shown while the query has no data yet.\n */\n data: TData\n /**\n * `false`, since the query isn't in the `error` state.\n */\n isError: false\n /**\n * `null`, since the query isn't in the `error` state.\n */\n error: null\n /**\n * `false`, since the query has cached data, data from `placeholderData` or an error.\n */\n isPending: false\n /**\n * `false`, since the first fetch isn't in flight.\n */\n isLoading: false\n /**\n * `false`, since the query didn't fail while fetching for the first time.\n */\n isLoadingError: false\n /**\n * `false`, since the query didn't fail while refetching.\n */\n isRefetchError: false\n /**\n * `true`, since the query is in the `success` state.\n */\n isSuccess: true\n /**\n * `true`, since the data shown is the `placeholderData`.\n */\n isPlaceholderData: true\n /**\n * `'success'`, since the query shows `placeholderData` and has no error from a fetch or\n * from `select`.\n */\n status: 'success'\n}\n\n/**\n * A query result that always has `data`: the success and refetch error states.\n */\nexport type DefinedQueryObserverResult<\n TData = unknown,\n TError = DefaultError,\n> =\n | QueryObserverRefetchErrorResult<TData, TError>\n | QueryObserverSuccessResult<TData, TError>\n\n/**\n * The result of a `QueryObserver`, and of the hooks built on it like `useQuery`. Narrow it by\n * `status` or the `is*` flags to get the type of each state.\n */\nexport type QueryObserverResult<TData = unknown, TError = DefaultError> =\n | DefinedQueryObserverResult<TData, TError>\n | QueryObserverLoadingErrorResult<TData, TError>\n | QueryObserverLoadingResult<TData, TError>\n | QueryObserverPendingResult<TData, TError>\n | QueryObserverPlaceholderResult<TData, TError>\n\n/**\n * The properties shared by every state of an infinite query result: those of\n * {@link QueryObserverBaseResult}, plus `fetchNextPage`, `fetchPreviousPage`, and the flags about\n * them, like `hasNextPage` and `isFetchingNextPage`.\n */\nexport interface InfiniteQueryObserverBaseResult<\n TData = unknown,\n TError = DefaultError,\n> extends QueryObserverBaseResult<TData, TError> {\n /**\n * This function allows you to fetch the next \"page\" of results.\n */\n fetchNextPage: (\n options?: FetchNextPageOptions,\n ) => Promise<InfiniteQueryObserverResult<TData, TError>>\n /**\n * This function allows you to fetch the previous \"page\" of results.\n */\n fetchPreviousPage: (\n options?: FetchPreviousPageOptions,\n ) => Promise<InfiniteQueryObserverResult<TData, TError>>\n /**\n * Will be `true` if there is a next page to be fetched (known via the `getNextPageParam` option).\n */\n hasNextPage: boolean\n /**\n * Will be `true` if there is a previous page to be fetched (known via the `getPreviousPageParam` option).\n */\n hasPreviousPage: boolean\n /**\n * Will be `true` if the query failed while fetching the next page.\n */\n isFetchNextPageError: boolean\n /**\n * Will be `true` while fetching the next page with `fetchNextPage`.\n */\n isFetchingNextPage: boolean\n /**\n * Will be `true` if the query failed while fetching the previous page.\n */\n isFetchPreviousPageError: boolean\n /**\n * Will be `true` while fetching the previous page with `fetchPreviousPage`.\n */\n isFetchingPreviousPage: boolean\n}\n\n/**\n * An infinite query result in the `pending` state: the query has no data yet.\n */\nexport interface InfiniteQueryObserverPendingResult<\n TData = unknown,\n TError = DefaultError,\n> extends InfiniteQueryObserverBaseResult<TData, TError> {\n /**\n * `undefined`, since the query has no data yet.\n */\n data: undefined\n /**\n * `null`, since the query isn't in the `error` state.\n */\n error: null\n /**\n * `false`, since the query isn't in the `error` state.\n */\n isError: false\n /**\n * `true`, since the query has no cached data, no data from `placeholderData` and no error.\n */\n isPending: true\n /**\n * `false`, since the query didn't fail while fetching for the first time.\n */\n isLoadingError: false\n /**\n * `false`, since the query didn't fail while refetching.\n */\n isRefetchError: false\n /**\n * `false`, since fetching the next page didn't fail.\n */\n isFetchNextPageError: false\n /**\n * `false`, since fetching the previous page didn't fail.\n */\n isFetchPreviousPageError: false\n /**\n * `false`, since the query isn't in the `success` state.\n */\n isSuccess: false\n /**\n * `false`, since the data shown isn't the `placeholderData`.\n */\n isPlaceholderData: false\n /**\n * `'pending'`, since the query has no cached data, no data from `placeholderData` and no error.\n */\n status: 'pending'\n}\n\n/**\n * An infinite query result in the `pending` state while the first fetch is in flight, so\n * `isLoading` is `true`.\n */\nexport interface InfiniteQueryObserverLoadingResult<\n TData = unknown,\n TError = DefaultError,\n> extends InfiniteQueryObserverBaseResult<TData, TError> {\n /**\n * `undefined`, since the query has no data yet.\n */\n data: undefined\n /**\n * `null`, since the query isn't in the `error` state.\n */\n error: null\n /**\n * `false`, since the query isn't in the `error` state.\n */\n isError: false\n /**\n * `true`, since the query has no cached data, no data from `placeholderData` and no error.\n */\n isPending: true\n /**\n * `true`, since the first fetch is in flight.\n */\n isLoading: true\n /**\n * `false`, since the query didn't fail while fetching for the first time.\n */\n isLoadingError: false\n /**\n * `false`, since the query didn't fail while refetching.\n */\n isRefetchError: false\n /**\n * `false`, since fetching the next page didn't fail.\n */\n isFetchNextPageError: false\n /**\n * `false`, since fetching the previous page didn't fail.\n */\n isFetchPreviousPageError: false\n /**\n * `false`, since the query isn't in the `success` state.\n */\n isSuccess: false\n /**\n * `false`, since the data shown isn't the `placeholderData`.\n */\n isPlaceholderData: false\n /**\n * `'pending'`, since the query has no cached data, no data from `placeholderData` and no error.\n */\n status: 'pending'\n}\n\n/**\n * An infinite query result in the `error` state with no data to display, since a fetch or `select` failed.\n */\nexport interface InfiniteQueryObserverLoadingErrorResult<\n TData = unknown,\n TError = DefaultError,\n> extends InfiniteQueryObserverBaseResult<TData, TError> {\n /**\n * `undefined`, since there was no data to display when a fetch or `select` failed.\n */\n data: undefined\n /**\n * The error the fetch or `select` failed with.\n */\n error: TError\n /**\n * `true`, since the query is in the `error` state.\n */\n isError: true\n /**\n * `false`, since the query has cached data, data from `placeholderData` or an error.\n */\n isPending: false\n /**\n * `false`, since the first fetch isn't in flight.\n */\n isLoading: false\n /**\n * `true`, since the query has an error and no data to display.\n */\n isLoadingError: true\n /**\n * `false`, since the query didn't fail while refetching.\n */\n isRefetchError: false\n /**\n * `false`, since fetching the next page didn't fail.\n */\n isFetchNextPageError: false\n /**\n * `false`, since fetching the previous page didn't fail.\n */\n isFetchPreviousPageError: false\n /**\n * `false`, since the query isn't in the `success` state.\n */\n isSuccess: false\n /**\n * `false`, since the data shown isn't the `placeholderData`.\n */\n isPlaceholderData: false\n /**\n * `'error'`, since a fetch failed after its retries or `select` threw.\n */\n status: 'error'\n}\n\n/**\n * An infinite query result in the `error` state that keeps the data from before a fetch or `select`\n * failed.\n */\nexport interface InfiniteQueryObserverRefetchErrorResult<\n TData = unknown,\n TError = DefaultError,\n> extends InfiniteQueryObserverBaseResult<TData, TError> {\n /**\n * The data from before the fetch or `select` failed, which is kept.\n */\n data: TData\n /**\n * The error the fetch or `select` failed with.\n */\n error: TError\n /**\n * `true`, since the query is in the `error` state.\n */\n isError: true\n /**\n * `false`, since the query has cached data, data from `placeholderData` or an error.\n */\n isPending: false\n /**\n * `false`, since the first fetch isn't in flight.\n */\n isLoading: false\n /**\n * `false`, since the query didn't fail while fetching for the first time.\n */\n isLoadingError: false\n /**\n * `true`, since the query has an error, still has data to display, and didn't fail fetching a page.\n */\n isRefetchError: true\n /**\n * `false`, since the query isn't in the `success` state.\n */\n isSuccess: false\n /**\n * `false`, since the data shown isn't the `placeholderData`.\n */\n isPlaceholderData: false\n /**\n * `'error'`, since a fetch failed after its retries or `select` threw.\n */\n status: 'error'\n}\n\n/**\n * An infinite query result in the `success` state with data from the cache.\n */\nexport interface InfiniteQueryObserverSuccessResult<\n TData = unknown,\n TError = DefaultError,\n> extends InfiniteQueryObserverBaseResult<TData, TError> {\n /**\n * The last successfully resolved data for the query.\n */\n data: TData\n /**\n * `null`, since the query isn't in the `error` state.\n */\n error: null\n /**\n * `false`, since the query isn't in the `error` state.\n */\n isError: false\n /**\n * `false`, since the query has cached data, data from `placeholderData` or an error.\n */\n isPending: false\n /**\n * `false`, since the first fetch isn't in flight.\n */\n isLoading: false\n /**\n * `false`, since the query didn't fail while fetching for the first time.\n */\n isLoadingError: false\n /**\n * `false`, since the query didn't fail while refetching.\n */\n isRefetchError: false\n /**\n * `false`, since fetching the next page didn't fail.\n */\n isFetchNextPageError: false\n /**\n * `false`, since fetching the previous page didn't fail.\n */\n isFetchPreviousPageError: false\n /**\n * `true`, since the query is in the `success` state.\n */\n isSuccess: true\n /**\n * `false`, since the data shown isn't the `placeholderData`.\n */\n isPlaceholderData: false\n /**\n * `'success'`, since the query has cached data and no error from a fetch or from\n * `select`.\n */\n status: 'success'\n}\n\n/**\n * An infinite query result in the `success` state that shows `placeholderData` while the query has\n * no data yet.\n */\nexport interface InfiniteQueryObserverPlaceholderResult<\n TData = unknown,\n TError = DefaultError,\n> extends InfiniteQueryObserverBaseResult<TData, TError> {\n /**\n * The `placeholderData` shown while the query has no data yet.\n */\n data: TData\n /**\n * `false`, since the query isn't in the `error` state.\n */\n isError: false\n /**\n * `null`, since the query isn't in the `error` state.\n */\n error: null\n /**\n * `false`, since the query has cached data, data from `placeholderData` or an error.\n */\n isPending: false\n /**\n * `false`, since the first fetch isn't in flight.\n */\n isLoading: false\n /**\n * `false`, since the query didn't fail while fetching for the first time.\n */\n isLoadingError: false\n /**\n * `false`, since the query didn't fail while refetching.\n */\n isRefetchError: false\n /**\n * `true`, since the query is in the `success` state.\n */\n isSuccess: true\n /**\n * `true`, since the data shown is the `placeholderData`.\n */\n isPlaceholderData: true\n /**\n * `false`, since fetching the next page didn't fail.\n */\n isFetchNextPageError: false\n /**\n * `false`, since fetching the previous page didn't fail.\n */\n isFetchPreviousPageError: false\n /**\n * `'success'`, since the query shows `placeholderData` and has no error from a fetch or\n * from `select`.\n */\n status: 'success'\n}\n\n/**\n * An infinite query result that always has `data`: the success and refetch error states.\n */\nexport type DefinedInfiniteQueryObserverResult<\n TData = unknown,\n TError = DefaultError,\n> =\n | InfiniteQueryObserverRefetchErrorResult<TData, TError>\n | InfiniteQueryObserverSuccessResult<TData, TError>\n\n/**\n * The result of an `InfiniteQueryObserver`, and of the hooks built on it like `useInfiniteQuery`.\n * Narrow it by `status` or the `is*` flags to get the type of each state.\n */\nexport type InfiniteQueryObserverResult<\n TData = unknown,\n TError = DefaultError,\n> =\n | DefinedInfiniteQueryObserverResult<TData, TError>\n | InfiniteQueryObserverLoadingErrorResult<TData, TError>\n | InfiniteQueryObserverLoadingResult<TData, TError>\n | InfiniteQueryObserverPendingResult<TData, TError>\n | InfiniteQueryObserverPlaceholderResult<TData, TError>\n\n/**\n * The type of a mutation key — the serializable array used to identify and filter mutations.\n * Defaults to `ReadonlyArray<unknown>`; declare `mutationKey` on {@link Register} to narrow it repository-wide.\n */\nexport type MutationKey = Register extends {\n mutationKey: infer TMutationKey\n}\n ? TMutationKey extends ReadonlyArray<unknown>\n ? TMutationKey\n : TMutationKey extends Array<unknown>\n ? TMutationKey\n : ReadonlyArray<unknown>\n : ReadonlyArray<unknown>\n\n/** @inline */\nexport type MutationStatus = 'idle' | 'pending' | 'success' | 'error'\n\n/**\n * Groups mutations so they run one after another instead of in parallel.\n * Mutations that share the same `id` form a queue: while one is running, the others wait in `isPaused: true`\n * state and resume automatically when their turn comes. Mutations with no scope always run in parallel.\n */\nexport type MutationScope = {\n /**\n * The scope's identifier. Mutations with the same `id` run one after another.\n */\n id: string\n}\n\n/**\n * The type of the `meta` object that can be attached to a mutation and read back from `mutationFn`, callbacks and\n * cache-level handlers. Defaults to `Record<string, unknown>`; declare `mutationMeta` on {@link Register} to narrow it.\n */\nexport type MutationMeta = Register extends {\n mutationMeta: infer TMutationMeta\n}\n ? TMutationMeta extends Record<string, unknown>\n ? TMutationMeta\n : Record<string, unknown>\n : Record<string, unknown>\n\n/**\n * The object passed to `mutationFn` and the mutation callbacks: the `QueryClient`, the mutation's\n * `meta`, and its `mutationKey`.\n */\nexport type MutationFunctionContext = {\n /**\n * The `QueryClient` the mutation runs in.\n */\n client: QueryClient\n /**\n * The `meta` of the mutation options.\n */\n meta: MutationMeta | undefined\n /**\n * The `mutationKey` of the mutation options, if set.\n */\n mutationKey?: MutationKey\n}\n\n/** @inline */\nexport type MutationFunction<TData = unknown, TVariables = unknown> = (\n variables: TVariables,\n context: MutationFunctionContext,\n) => Promise<TData>\n\n/**\n * The options of a mutation: its `mutationFn`, `mutationKey`, callbacks, retries, `scope`, and so\n * on.\n */\nexport interface MutationOptions<\n TData = unknown,\n TError = DefaultError,\n TVariables = void,\n TOnMutateResult = unknown,\n> {\n /**\n * The function that performs the asynchronous task this mutation runs.\n * Required, unless a default mutation function has been set for the matching `mutationKey` via\n * `queryClient.setMutationDefaults`.\n * Receives the `variables` passed to `mutate`, and a {@link MutationFunctionContext} holding the\n * `QueryClient`, the `mutationKey` and `meta`.\n * Must return a promise that resolves the mutation's data.\n */\n mutationFn?: MutationFunction<TData, TVariables>\n /**\n * The key to use for this mutation. Optional, but required to inherit defaults registered with\n * `queryClient.setMutationDefaults`, and to match this mutation with `useMutationState` or\n * `queryClient.isMutating`.\n */\n mutationKey?: MutationKey\n /**\n * This function fires before the mutation function runs, and receives the same variables.\n * Useful for optimistic updates applied in the hope that the mutation succeeds.\n * The value it returns is passed to `onSuccess`, `onError` and `onSettled` as `onMutateResult`,\n * which is where an optimistic update is usually rolled back.\n * If a promise is returned, it is awaited before the mutation function runs.\n */\n onMutate?: (\n variables: TVariables,\n context: MutationFunctionContext,\n ) => Promise<TOnMutateResult> | TOnMutateResult\n /**\n * This function fires when the mutation succeeds, and is passed the mutation's result.\n * If a promise is returned, it is awaited before `onSettled` runs.\n */\n onSuccess?: (\n data: TData,\n variables: TVariables,\n onMutateResult: TOnMutateResult,\n context: MutationFunctionContext,\n ) => Promise<unknown> | unknown\n /**\n * This function fires when the mutation encounters an error, and is passed the error.\n * If a promise is returned, it is awaited before `onSettled` runs.\n */\n onError?: (\n error: TError,\n variables: TVariables,\n onMutateResult: TOnMutateResult | undefined,\n context: MutationFunctionContext,\n ) => Promise<unknown> | unknown\n /**\n * This function fires when the mutation either succeeds or errors, and is passed either the data\n * or the error.\n * If a promise is returned, it is awaited before the mutation settles.\n */\n onSettled?: (\n data: TData | undefined,\n error: TError | null,\n variables: TVariables,\n onMutateResult: TOnMutateResult | undefined,\n context: MutationFunctionContext,\n ) => Promise<unknown> | unknown\n /**\n * If `false`, failed mutations will not retry by default.\n * If `true`, failed mutations will retry infinitely.\n * If set to an integer number, e.g. 3, failed mutations will retry until the failed mutation count meets that number.\n * If set to a function `(failureCount, error) => boolean` failed mutations will retry until the function returns false.\n * @defaultValue 0\n */\n retry?: RetryValue<TError>\n /**\n * This function receives a `retryAttempt` integer and the actual Error and returns the delay to apply before the\n * next attempt in milliseconds.\n *\n * Defaults to a function that applies exponential backoff, capped at 30 seconds.\n */\n retryDelay?: RetryDelayValue<TError>\n /**\n * Controls whether a mutation is allowed to run based on the current network connectivity.\n * @defaultValue 'online'\n * @see [Network Mode](https://tanstack.com/query/latest/docs/framework/react/guides/network-mode) for more information.\n */\n networkMode?: NetworkMode\n /**\n * The time in milliseconds that an unused/inactive mutation remains in memory before it is\n * garbage collected.\n *\n * Defaults to `5 * 60 * 1000` (5 minutes), or `Infinity` during SSR.\n */\n gcTime?: number\n /** @internal */\n _defaulted?: boolean\n /**\n * Additional payload to be stored on the mutation cache entry.\n * Use it to pass information that can be read wherever the `mutation` is available, such as the\n * `onError` and `onSuccess` callbacks of the `MutationCache`.\n */\n meta?: MutationMeta\n /**\n * Controls whether this mutation runs alongside others or waits its turn.\n * Mutations sharing the same `scope.id` run serially, in the order they were started.\n * Without a scope, a mutation runs as soon as it is triggered.\n */\n scope?: MutationScope\n}\n\n/**\n * The options of a `MutationObserver`, and of the hooks built on it like `useMutation`: the\n * {@link MutationOptions}, plus `throwOnError`.\n */\nexport interface MutationObserverOptions<\n TData = unknown,\n TError = DefaultError,\n TVariables = void,\n TOnMutateResult = unknown,\n> extends MutationOptions<TData, TError, TVariables, TOnMutateResult> {\n /**\n * Whether errors should be thrown instead of setting the `error` property.\n * If set to `true`, all errors will be thrown to the nearest error boundary.\n * If set to a function, it will be passed the error and should return a boolean indicating whether to throw the\n * error (`true`) or return it as state (`false`).\n * @defaultValue false\n */\n throwOnError?: boolean | ((error: TError) => boolean)\n}\n\n/**\n * The callbacks that can be passed to `mutate` for a single call. They run after the callbacks of\n * the mutation options.\n */\nexport interface MutateOptions<\n TData = unknown,\n TError = DefaultError,\n TVariables = void,\n TOnMutateResult = unknown,\n> {\n /**\n * Called when the mutation of this call succeeds, after the `onSuccess` of the mutation options.\n */\n onSuccess?: (\n data: TData,\n variables: TVariables,\n onMutateResult: TOnMutateResult | undefined,\n context: MutationFunctionContext,\n ) => void\n /**\n * Called when the mutation of this call fails, after the `onError` of the mutation options.\n */\n onError?: (\n error: TError,\n variables: TVariables,\n onMutateResult: TOnMutateResult | undefined,\n context: MutationFunctionContext,\n ) => void\n /**\n * Called when the mutation of this call succeeds or fails, after the `onSettled` of the mutation\n * options.\n */\n onSettled?: (\n data: TData | undefined,\n error: TError | null,\n variables: TVariables,\n onMutateResult: TOnMutateResult | undefined,\n context: MutationFunctionContext,\n ) => void\n}\n\n/**\n * The parameters of {@link MutateFunction}: `variables`, optional when `TVariables` accepts\n * `undefined`, and the {@link MutateOptions} for that call.\n */\nexport type MutateFunctionRest<\n TData = unknown,\n TError = DefaultError,\n TVariables = void,\n TOnMutateResult = unknown,\n> = undefined extends TVariables\n ? [\n variables?: TVariables,\n options?: MutateOptions<TData, TError, TVariables, TOnMutateResult>,\n ]\n : [\n variables: TVariables,\n options?: MutateOptions<TData, TError, TVariables, TOnMutateResult>,\n ]\n\n/**\n * The `mutate` function of a `MutationObserver`: runs the mutation with the given variables and\n * resolves with its data.\n */\nexport type MutateFunction<\n TData = unknown,\n TError = DefaultError,\n TVariables = void,\n TOnMutateResult = unknown,\n> = (\n ...rest: MutateFunctionRest<TData, TError, TVariables, TOnMutateResult>\n) => Promise<TData>\n\n/**\n * The properties shared by every state of a mutation result, like `data`, `error`, `variables`,\n * `status`, the `is*` flags, `mutate`, and `reset`.\n */\nexport interface MutationObserverBaseResult<\n TData = unknown,\n TError = DefaultError,\n TVariables = void,\n TOnMutateResult = unknown,\n> extends MutationState<TData, TError, TVariables, TOnMutateResult> {\n /**\n * The last successfully resolved data for the mutation.\n */\n data: TData | undefined\n /**\n * The variables object passed to the `mutationFn`.\n */\n variables: TVariables | undefined\n /**\n * The error object for the mutation, if an error was encountered.\n * - Defaults to `null`.\n */\n error: TError | null\n /**\n * A boolean variable derived from `status`.\n * - `true` if the last mutation attempt resulted in an error.\n */\n isError: boolean\n /**\n * A boolean variable derived from `status`.\n * - `true` if the mutation is in its initial state prior to executing.\n */\n isIdle: boolean\n /**\n * A boolean variable derived from `status`.\n * - `true` if the mutation is currently executing.\n */\n isPending: boolean\n /**\n * A boolean variable derived from `status`.\n * - `true` if the last mutation attempt was successful.\n */\n isSuccess: boolean\n /**\n * The status of the mutation.\n * - Will be:\n * - `idle` initial status prior to the mutation function executing.\n * - `pending` if the mutation is currently executing.\n * - `error` if the last mutation attempt resulted in an error.\n * - `success` if the last mutation attempt was successful.\n */\n status: MutationStatus\n /**\n * The mutation function you can call with variables to trigger the mutation and optionally hooks on additional callback options.\n * @param variables - The variables object to pass to the `mutationFn`.\n * @param options.onSuccess - This function will fire when the mutation is successful and will be passed the mutation's result.\n * @param options.onError - This function will fire if the mutation encounters an error and will be passed the error.\n * @param options.onSettled - This function will fire when the mutation is either successfully fetched or encounters an error and be passed either the data or error.\n * @remarks\n * - If you make multiple requests, `onSuccess` will fire only after the latest call you've made.\n * - All the callback functions (`onSuccess`, `onError`, `onSettled`) are void functions, and the returned value will be ignored.\n */\n mutate: MutateFunction<TData, TError, TVariables, TOnMutateResult>\n /**\n * A function to clean the mutation internal state (i.e., it resets the mutation to its initial state).\n */\n reset: () => void\n}\n\n/**\n * A mutation result in the `idle` state: the mutation hasn't run yet, or was reset.\n */\nexport interface MutationObserverIdleResult<\n TData = unknown,\n TError = DefaultError,\n TVariables = void,\n TOnMutateResult = unknown,\n> extends MutationObserverBaseResult<\n TData,\n TError,\n TVariables,\n TOnMutateResult\n> {\n /**\n * `undefined`, since the mutation hasn't run.\n */\n data: undefined\n /**\n * `undefined`, since the mutation hasn't run.\n */\n variables: undefined\n /**\n * `null`, since the mutation hasn't failed.\n */\n error: null\n /**\n * `false`, since the mutation hasn't failed.\n */\n isError: false\n /**\n * `true`, since the mutation hasn't run yet or was reset.\n */\n isIdle: true\n /**\n * `false`, since the mutation isn't running.\n */\n isPending: false\n /**\n * `false`, since the mutation hasn't succeeded.\n */\n isSuccess: false\n /**\n * `'idle'`, since the mutation hasn't run yet or was reset.\n */\n status: 'idle'\n}\n\n/**\n * A mutation result in the `pending` state while the mutation runs.\n */\nexport interface MutationObserverLoadingResult<\n TData = unknown,\n TError = DefaultError,\n TVariables = void,\n TOnMutateResult = unknown,\n> extends MutationObserverBaseResult<\n TData,\n TError,\n TVariables,\n TOnMutateResult\n> {\n /**\n * `undefined`, since the mutation hasn't succeeded.\n */\n data: undefined\n /**\n * The variables passed to `mutate` for this mutation.\n */\n variables: TVariables\n /**\n * `null`, since the mutation hasn't failed.\n */\n error: null\n /**\n * `false`, since the mutation hasn't failed.\n */\n isError: false\n /**\n * `false`, since the mutation has run.\n */\n isIdle: false\n /**\n * `true`, since the mutation is running.\n */\n isPending: true\n /**\n * `false`, since the mutation hasn't succeeded.\n */\n isSuccess: false\n /**\n * `'pending'`, since the mutation is running.\n */\n status: 'pending'\n}\n\n/**\n * A mutation result in the `error` state after the mutation failed.\n */\nexport interface MutationObserverErrorResult<\n TData = unknown,\n TError = DefaultError,\n TVariables = void,\n TOnMutateResult = unknown,\n> extends MutationObserverBaseResult<\n TData,\n TError,\n TVariables,\n TOnMutateResult\n> {\n /**\n * `undefined`, since the mutation hasn't succeeded.\n */\n data: undefined\n /**\n * The error the mutation failed with.\n */\n error: TError\n /**\n * The variables passed to `mutate` for this mutation.\n */\n variables: TVariables\n /**\n * `true`, since the mutation failed.\n */\n isError: true\n /**\n * `false`, since the mutation has run.\n */\n isIdle: false\n /**\n * `false`, since the mutation isn't running.\n */\n isPending: false\n /**\n * `false`, since the mutation hasn't succeeded.\n */\n isSuccess: false\n /**\n * `'error'`, since the mutation failed.\n */\n status: 'error'\n}\n\n/**\n * A mutation result in the `success` state after the mutation succeeded.\n */\nexport interface MutationObserverSuccessResult<\n TData = unknown,\n TError = DefaultError,\n TVariables = void,\n TOnMutateResult = unknown,\n> extends MutationObserverBaseResult<\n TData,\n TError,\n TVariables,\n TOnMutateResult\n> {\n /**\n * The data the mutation resolved with.\n */\n data: TData\n /**\n * `null`, since the mutation hasn't failed.\n */\n error: null\n /**\n * The variables passed to `mutate` for this mutation.\n */\n variables: TVariables\n /**\n * `false`, since the mutation hasn't failed.\n */\n isError: false\n /**\n * `false`, since the mutation has run.\n */\n isIdle: false\n /**\n * `false`, since the mutation isn't running.\n */\n isPending: false\n /**\n * `true`, since the mutation succeeded.\n */\n isSuccess: true\n /**\n * `'success'`, since the mutation succeeded.\n */\n status: 'success'\n}\n\n/**\n * The result of a `MutationObserver`, and of the hooks built on it like `useMutation`. Narrow it by\n * `status` or the `is*` flags to get the type of each state.\n */\nexport type MutationObserverResult<\n TData = unknown,\n TError = DefaultError,\n TVariables = void,\n TOnMutateResult = unknown,\n> =\n | MutationObserverIdleResult<TData, TError, TVariables, TOnMutateResult>\n | MutationObserverLoadingResult<TData, TError, TVariables, TOnMutateResult>\n | MutationObserverErrorResult<TData, TError, TVariables, TOnMutateResult>\n | MutationObserverSuccessResult<TData, TError, TVariables, TOnMutateResult>\n\n/**\n * The options of `new QueryClient()`: the `queryCache` and `mutationCache` to use, and the\n * `defaultOptions` for its queries and mutations.\n */\nexport interface QueryClientConfig {\n /** The query cache this client is connected to. A new `QueryCache` is created if not provided. */\n queryCache?: QueryCache\n /**\n * The mutation cache this client is connected to. A new `MutationCache` is created if not\n * provided.\n */\n mutationCache?: MutationCache\n /** Default options for all queries and mutations created through this client. */\n defaultOptions?: DefaultOptions\n}\n\n/**\n * The default options of a `QueryClient`, applied to every query (`queries`), mutation\n * (`mutations`), `hydrate`, and `dehydrate` call unless overridden.\n */\nexport interface DefaultOptions<TError = DefaultError> {\n /** Default options applied to every query, unless overridden per-query. */\n queries?: OmitKeyof<\n QueryObserverOptions<unknown, TError>,\n 'suspense' | 'queryKey'\n >\n /** Default options applied to every mutation, unless overridden per-mutation. */\n mutations?: MutationObserverOptions<unknown, TError, unknown, unknown>\n /** Default options used when hydrating queries and mutations; see {@link HydrateOptions}. */\n hydrate?: HydrateOptions['defaultOptions']\n /** Default options used when dehydrating the client's caches; see {@link DehydrateOptions}. */\n dehydrate?: DehydrateOptions\n}\n\n/**\n * Options for cancelling an in-flight fetch, e.g. via `query.cancel()`.\n * They are carried on the {@link CancelledError} that the cancelled fetch rejects with.\n */\nexport interface CancelOptions {\n /**\n * If `true`, the query goes back to the state it had before the fetch started, instead of getting\n * the cancellation error.\n */\n revert?: boolean\n /**\n * If `true`, the cancellation error isn't surfaced, e.g. because another fetch replaces the\n * cancelled one.\n */\n silent?: boolean\n}\n\n/**\n * Options for writing data into the cache, e.g. via `queryClient.setQueryData()`.\n * `updatedAt` overrides the timestamp the data is recorded with, which is what staleness is measured from;\n * omit it to use the current time.\n */\nexport interface SetDataOptions {\n /**\n * The timestamp to record the data with, instead of the current time. Staleness is measured from\n * it.\n */\n updatedAt?: number\n}\n\n/** @inline */\nexport type NotifyEventType =\n | 'added'\n | 'removed'\n | 'updated'\n | 'observerAdded'\n | 'observerRemoved'\n | 'observerResultsUpdated'\n | 'observerOptionsUpdated'\n\n/**\n * The base shape of the events that the query and mutation caches send to their listeners.\n */\nexport interface NotifyEvent {\n /**\n * The kind of event, e.g. `'added'`, `'removed'`, or `'updated'`.\n */\n type: NotifyEventType\n}\n"],"mappings":";;AAqGA,MAAa,gBAAgB,OAAO;AAKpC,MAAa,qBAAqB,OAAO;AAKzC,MAAa,cAAc,OAAO"}
@@ -1,2 +1,2 @@
1
- import { An as addToStart, Bn as keepPreviousData, Cn as MutationFilters, Dn as Updater, En as SkipToken, Fn as hashQueryKeyByOptions, Gn as replaceData, Hn as matchQuery, In as isPlainArray, Jn as shallowEqualObjects, Kn as replaceEqualDeep, Ln as isPlainObject, Mn as fetchSignal, Nn as functionalUpdate, On as addConsumeAwareSignal, Pn as hashKey, Qn as timeUntilStale, Rn as isServer, Sn as FetchSignalContext, Tn as QueryTypeFilter, Un as noop, Vn as matchMutation, Wn as partialMatchKey, Xn as skipToken, Yn as shouldThrowError, Zn as sleep, jn as ensureQueryFn, kn as addToEnd, qn as resolveQueryValue, wn as QueryFilters, zn as isValidTimeout } from "./hydration-24GwbSaU.cjs";
1
+ import { An as addToStart, Bn as keepPreviousData, Cn as MutationFilters, Dn as Updater, En as SkipToken, Fn as hashQueryKeyByOptions, Gn as replaceData, Hn as matchQuery, In as isPlainArray, Jn as shallowEqualObjects, Kn as replaceEqualDeep, Ln as isPlainObject, Mn as fetchSignal, Nn as functionalUpdate, On as addConsumeAwareSignal, Pn as hashKey, Qn as timeUntilStale, Rn as isServer, Sn as FetchSignalContext, Tn as QueryTypeFilter, Un as noop, Vn as matchMutation, Wn as partialMatchKey, Xn as skipToken, Yn as shouldThrowError, Zn as sleep, jn as ensureQueryFn, kn as addToEnd, qn as resolveQueryValue, wn as QueryFilters, zn as isValidTimeout } from "./hydration-DO-vzqvp.cjs";
2
2
  export { FetchSignalContext, MutationFilters, QueryFilters, QueryTypeFilter, SkipToken, Updater, addConsumeAwareSignal, addToEnd, addToStart, ensureQueryFn, fetchSignal, functionalUpdate, hashKey, hashQueryKeyByOptions, isPlainArray, isPlainObject, isServer, isValidTimeout, keepPreviousData, matchMutation, matchQuery, noop, partialMatchKey, replaceData, replaceEqualDeep, resolveQueryValue, shallowEqualObjects, shouldThrowError, skipToken, sleep, timeUntilStale };
@@ -1,2 +1,2 @@
1
- import { An as addToStart, Bn as keepPreviousData, Cn as MutationFilters, Dn as Updater, En as SkipToken, Fn as hashQueryKeyByOptions, Gn as replaceData, Hn as matchQuery, In as isPlainArray, Jn as shallowEqualObjects, Kn as replaceEqualDeep, Ln as isPlainObject, Mn as fetchSignal, Nn as functionalUpdate, On as addConsumeAwareSignal, Pn as hashKey, Qn as timeUntilStale, Rn as isServer, Sn as FetchSignalContext, Tn as QueryTypeFilter, Un as noop, Vn as matchMutation, Wn as partialMatchKey, Xn as skipToken, Yn as shouldThrowError, Zn as sleep, jn as ensureQueryFn, kn as addToEnd, qn as resolveQueryValue, wn as QueryFilters, zn as isValidTimeout } from "./hydration-Cbq_heQS.js";
1
+ import { An as addToStart, Bn as keepPreviousData, Cn as MutationFilters, Dn as Updater, En as SkipToken, Fn as hashQueryKeyByOptions, Gn as replaceData, Hn as matchQuery, In as isPlainArray, Jn as shallowEqualObjects, Kn as replaceEqualDeep, Ln as isPlainObject, Mn as fetchSignal, Nn as functionalUpdate, On as addConsumeAwareSignal, Pn as hashKey, Qn as timeUntilStale, Rn as isServer, Sn as FetchSignalContext, Tn as QueryTypeFilter, Un as noop, Vn as matchMutation, Wn as partialMatchKey, Xn as skipToken, Yn as shouldThrowError, Zn as sleep, jn as ensureQueryFn, kn as addToEnd, qn as resolveQueryValue, wn as QueryFilters, zn as isValidTimeout } from "./hydration-C1yRFalg.js";
2
2
  export { FetchSignalContext, MutationFilters, QueryFilters, QueryTypeFilter, SkipToken, Updater, addConsumeAwareSignal, addToEnd, addToStart, ensureQueryFn, fetchSignal, functionalUpdate, hashKey, hashQueryKeyByOptions, isPlainArray, isPlainObject, isServer, isValidTimeout, keepPreviousData, matchMutation, matchQuery, noop, partialMatchKey, replaceData, replaceEqualDeep, resolveQueryValue, shallowEqualObjects, shouldThrowError, skipToken, sleep, timeUntilStale };
@@ -1,5 +1,5 @@
1
- import { t as Subscribable } from "./subscribable-D2lAzdDi.js";
2
1
  import { t as Removable } from "./removable-B1nFbgZm.js";
2
+ import { t as Subscribable } from "./subscribable-D2lAzdDi.js";
3
3
  interface RetryerConfig<TData = unknown, TError = DefaultError> {
4
4
  fn: () => TData | Promise<TData>;
5
5
  initialPromise?: Promise<TData>;
@@ -456,7 +456,7 @@ type Override<TTargetA, TTargetB> = { [AKey in keyof TTargetA]: AKey extends key
456
456
  * `mutationMeta` for {@link MutationMeta}. Leave a field out to keep that type's default.
457
457
  * Augment the module you install — `@tanstack/react-query`, `@tanstack/vue-query`,
458
458
  * `@tanstack/solid-query`, `@tanstack/svelte-query`, `@tanstack/preact-query`,
459
- * `@tanstack/angular-query-experimental` or `@tanstack/lit-query`. Augmenting `@tanstack/query-core`
459
+ * `@tanstack/angular-query` or `@tanstack/lit-query`. Augmenting `@tanstack/query-core`
460
460
  * works too and covers every adapter at once.
461
461
  * @example
462
462
  * ```ts
@@ -926,20 +926,20 @@ interface EnsureQueryDataOptions<TQueryFnData = unknown, TError = DefaultError,
926
926
  type EnsureInfiniteQueryDataOptions<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown> = FetchInfiniteQueryOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam> & {
927
927
  revalidateIfStale?: boolean;
928
928
  };
929
- type InfiniteQueryPages<TQueryFnData = unknown, TPageParam = unknown> = {
930
- pages?: never;
931
- } | {
932
- pages: number;
933
- getNextPageParam: GetNextPageParamFunction<TPageParam, TQueryFnData>;
929
+ type InfiniteQueryFetchPageOptions<TQueryFnData, TPageParam> = Pick<InfiniteQueryPageParamsOptions<TQueryFnData, TPageParam>, 'initialPageParam' | 'getNextPageParam'> & {
930
+ /**
931
+ * The number of pages to fetch. Defaults to the number of cached pages,
932
+ * or one page if the cache has no pages.
933
+ */
934
+ pages?: number;
934
935
  };
935
936
  /**
936
- * The options of `queryClient.infiniteQuery`: like {@link QueryExecuteOptions}, with the
937
- * `initialPageParam`, and optionally `pages` together with `getNextPageParam` to fetch that many
938
- * pages at once.
937
+ * The options of `queryClient.infiniteQuery`. Extends {@link QueryExecuteOptions}
938
+ * with `initialPageParam`, `getNextPageParam`, and the optional `pages` count.
939
939
  */
940
- type InfiniteQueryExecuteOptions<TQueryFnData = unknown, TError = DefaultError, TData = InfiniteData<TQueryFnData>, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown> = Omit<QueryExecuteOptions<TQueryFnData, TError, TData, InfiniteData<TQueryFnData, TPageParam>, TQueryKey, TPageParam>, 'initialPageParam'> & InitialPageParam<TPageParam> & InfiniteQueryPages<TQueryFnData, TPageParam>;
940
+ type InfiniteQueryExecuteOptions<TQueryFnData = unknown, TError = DefaultError, TData = InfiniteData<TQueryFnData>, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown> = Omit<QueryExecuteOptions<TQueryFnData, TError, TData, InfiniteData<TQueryFnData, TPageParam>, TQueryKey, TPageParam>, 'initialPageParam'> & InfiniteQueryFetchPageOptions<TQueryFnData, TPageParam>;
941
941
  /** @deprecated */
942
- type FetchInfiniteQueryOptions<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown> = Omit<FetchQueryOptions<TQueryFnData, TError, InfiniteData<TData, TPageParam>, TQueryKey, TPageParam>, 'initialPageParam'> & InitialPageParam<TPageParam> & InfiniteQueryPages<TQueryFnData, TPageParam>;
942
+ type FetchInfiniteQueryOptions<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown> = Omit<FetchQueryOptions<TQueryFnData, TError, InfiniteData<TData, TPageParam>, TQueryKey, TPageParam>, 'initialPageParam'> & InfiniteQueryFetchPageOptions<TQueryFnData, TPageParam>;
943
943
  /**
944
944
  * Options shared by the `QueryClient` and observer methods that refetch queries, controlling
945
945
  * whether a failed refetch makes the returned promise reject.
@@ -3396,20 +3396,24 @@ declare class QueryClient {
3396
3396
  * Asynchronous method to fetch and cache an infinite query, resolving with an
3397
3397
  * {@link InfiniteData} object or throwing with the error.
3398
3398
  *
3399
- * Behaves like {@link QueryClient#query}, accepting the same options (minus
3400
- * `initialPageParam`), plus the required `initialPageParam`, and an optional `pages` /
3401
- * `getNextPageParam` pair used to refetch a fixed number of pages from the start.
3399
+ * Requires `initialPageParam` and `getNextPageParam`. Use `pages` to specify how many
3400
+ * pages to fetch. If you omit `pages`, the client fetches up to the number of cached
3401
+ * pages, or one page if the cache has no pages.
3402
3402
  *
3403
3403
  * This method replaces the deprecated `fetchInfiniteQuery`, and — combined with
3404
3404
  * `{ staleTime: 'static' }` — the deprecated `ensureInfiniteQueryData`.
3405
- * @param options - The infinite query options, including the `queryKey`, the `queryFn`, and the
3406
- * `initialPageParam`.
3405
+ * @param options - The query to fetch and the options that control which pages to fetch.
3407
3406
  * @returns A promise that resolves to the {@link InfiniteData}, or to the result of `select` if
3408
3407
  * provided. It rejects with the error from the fetch or from `select`.
3409
3408
  * @example
3410
3409
  * ```ts
3411
3410
  * try {
3412
- * const data = await queryClient.infiniteQuery({ queryKey, queryFn, initialPageParam: 0 })
3411
+ * const data = await queryClient.infiniteQuery({
3412
+ * queryKey,
3413
+ * queryFn,
3414
+ * initialPageParam: 0,
3415
+ * getNextPageParam: (lastPage) => lastPage.nextCursor,
3416
+ * })
3413
3417
  * console.log(data.pages)
3414
3418
  * } catch (error) {
3415
3419
  * console.log(error)
@@ -3419,8 +3423,7 @@ declare class QueryClient {
3419
3423
  infiniteQuery<TQueryFnData, TError = DefaultError, TData = InfiniteData<TQueryFnData>, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown>(options: InfiniteQueryExecuteOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>): Promise<Array<TData> extends Array<InfiniteData<TQueryFnData>> ? InfiniteData<TQueryFnData, TPageParam> : TData>;
3420
3424
  /**
3421
3425
  * Fetches and caches an infinite query, or returns its cached data if it isn't stale.
3422
- * @param options - The infinite query options, including the `queryKey`, the `queryFn`, and the
3423
- * `initialPageParam`.
3426
+ * @param options - The infinite query options, including `initialPageParam` and `getNextPageParam`.
3424
3427
  * @returns A promise that resolves to the cached or fetched {@link InfiniteData}, or rejects with
3425
3428
  * the fetch error.
3426
3429
  * @deprecated Use queryClient.infiniteQuery(options) instead. This method will be removed in the next major version.
@@ -3429,8 +3432,7 @@ declare class QueryClient {
3429
3432
  /**
3430
3433
  * Fetches and caches an infinite query like {@link QueryClient#fetchInfiniteQuery}, but ignores
3431
3434
  * the result and any error.
3432
- * @param options - The infinite query options, including the `queryKey`, the `queryFn`, and the
3433
- * `initialPageParam`.
3435
+ * @param options - The infinite query options, including `initialPageParam` and `getNextPageParam`.
3434
3436
  * @returns A promise that resolves once the fetch settles. It never rejects.
3435
3437
  * @deprecated Use queryClient.infiniteQuery(options) instead. You can swallow errors with `.catch(noop)`. This method will be removed in the next major version.
3436
3438
  */
@@ -3438,8 +3440,7 @@ declare class QueryClient {
3438
3440
  /**
3439
3441
  * Returns the cached data of an infinite query, or fetches it if there is none. With
3440
3442
  * `revalidateIfStale`, stale cached data is also refetched in the background.
3441
- * @param options - The infinite query options. If the query has no cached data yet, it is fetched
3442
- * with these options.
3443
+ * @param options - The infinite query options, including `initialPageParam` and `getNextPageParam`.
3443
3444
  * @returns A promise that resolves to the cached {@link InfiniteData}, or to the fetched data if
3444
3445
  * nothing was cached yet.
3445
3446
  * @deprecated Use queryClient.infiniteQuery({ ...options, staleTime: 'static' }) instead. This method will be removed in the next major version.
@@ -4200,4 +4201,4 @@ declare function dehydrate(client: QueryClient, options?: DehydrateOptions): Deh
4200
4201
  */
4201
4202
  declare function hydrate(client: QueryClient, dehydratedState: Partial<DehydratedState>, options?: HydrateOptions): void;
4202
4203
  export { InfiniteData as $, CancelledError as $n, QueryObserverOptions as $t, fetchState as A, addToStart as An, MutationScope as At, DefinedQueryObserverResult as B, keepPreviousData as Bn, QueriesPlaceholderDataFunction as Bt, FetchContext as C, MutationFilters as Cn, MutationObserverErrorResult as Ct, Query as D, Updater as Dn, MutationObserverResult as Dt, FetchOptions as E, SkipToken as En, MutationObserverOptions as Et, DefaultError as F, hashQueryKeyByOptions as Fn, NotifyEventType as Ft, FetchNextPageOptions as G, replaceData as Gn, QueryFunctionContext as Gt, EnsureInfiniteQueryDataOptions as H, matchQuery as Hn, QueryClientConfig as Ht, DefaultOptions as I, isPlainArray as In, NotifyOnChangeProps as It, FetchStatus as J, shallowEqualObjects as Jn, QueryKeyWithDataTag as Jt, FetchPreviousPageOptions as K, replaceEqualDeep as Kn, QueryKey as Kt, DefaultedInfiniteQueryObserverOptions as L, isPlainObject as Ln, OmitKeyof as Lt, AnyDataTag as M, fetchSignal as Mn, NetworkMode as Mt, CancelOptions as N, functionalUpdate as Nn, NonUndefinedGuard as Nt, QueryBehavior as O, addConsumeAwareSignal as On, MutationObserverSuccessResult as Ot, DataTag as P, hashKey as Pn, NotifyEvent as Pt, InferErrorFromTag as Q, timeUntilStale as Qn, QueryObserverLoadingResult as Qt, DefaultedQueryObserverOptions as R, isServer as Rn, Override as Rt, Action$1 as S, FetchSignalContext as Sn, MutationObserverBaseResult as St, FetchMeta as T, QueryTypeFilter as Tn, MutationObserverLoadingResult as Tt, EnsureQueryDataOptions as U, noop as Un, QueryExecuteOptions as Ut, DistributiveOmit as V, matchMutation as Vn, QueryBooleanOption as Vt, FetchInfiniteQueryOptions as W, partialMatchKey as Wn, QueryFunction as Wt, GetPreviousPageParamFunction as X, skipToken as Xn, QueryObserverBaseResult as Xt, GetNextPageParamFunction as Y, shouldThrowError as Yn, QueryMeta as Yt, InferDataFromTag as Z, sleep as Zn, QueryObserverLoadingErrorResult as Zt, QueryClient as _, UnsetMarker as _n, MutateOptions as _t, defaultShouldDehydrateQuery as a, QueryOptions as an, isCancelledError as ar, InfiniteQueryObserverPendingResult as at, QueryCacheNotifyEvent as b, dataTagSymbol as bn, MutationKey as bt, hydrate as c, RefetchOptions as cn, InfiniteQueryObserverResult as ct, MutationState as d, ResetOptions as dn, InitialDataFunction as dt, QueryObserverPendingResult as en, RetryDelayValue as er, InfiniteQueryExecuteOptions as et, getDefaultState as f, ResultOptions as fn, InitialPageParam as ft, MutationObserver as g, ThrowOnError as gn, MutateFunctionRest as gt, MutationCacheNotifyEvent as h, StaleTimeFunction as hn, MutateFunction as ht, defaultShouldDehydrateMutation as i, QueryObserverSuccessResult as in, createRetryer as ir, InfiniteQueryObserverOptions as it, QueryObserver as j, ensureQueryFn as jn, MutationStatus as jt, QueryState as k, addToEnd as kn, MutationOptions as kt, Action as l, RefetchQueryFilters as ln, InfiniteQueryObserverSuccessResult as lt, MutationCacheConfig as m, StaleTime as mn, InvalidateQueryFilters as mt, DehydratedState as n, QueryObserverRefetchErrorResult as nn, Retryer as nr, InfiniteQueryObserverLoadingErrorResult as nt, dehydrate as o, QueryPersister as on, InfiniteQueryObserverPlaceholderResult as ot, MutationCache as p, SetDataOptions as pn, InvalidateOptions as pt, FetchQueryOptions as q, resolveQueryValue as qn, QueryKeyHashFunction as qt, HydrateOptions as r, QueryObserverResult as rn, canFetch as rr, InfiniteQueryObserverLoadingResult as rt, dehydrateQuery as s, QueryStatus as sn, InfiniteQueryObserverRefetchErrorResult as st, DehydrateOptions as t, QueryObserverPlaceholderResult as tn, RetryValue as tr, InfiniteQueryObserverBaseResult as tt, Mutation as u, Register as un, InfiniteQueryPageParamsOptions as ut, QueryCache as v, WithRequired as vn, MutationFunction as vt, FetchDirection as w, QueryFilters as wn, MutationObserverIdleResult as wt, QueryStore as x, unsetMarker as xn, MutationMeta as xt, QueryCacheConfig as y, dataTagErrorSymbol as yn, MutationFunctionContext as yt, DefinedInfiniteQueryObserverResult as z, isValidTimeout as zn, PlaceholderDataFunction as zt };
4203
- //# sourceMappingURL=hydration-Cbq_heQS.d.ts.map
4204
+ //# sourceMappingURL=hydration-C1yRFalg.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hydration-C1yRFalg.d.ts","names":["FailedAction","SuccessAction","ErrorAction","PauseAction","ContinueAction","Action","Action"],"sources":["../../src/retryer.ts","../../src/utils.ts","../../src/types.ts","../../src/queryObserver.ts","../../src/query.ts","../../src/queryCache.ts","../../src/queryClient.ts","../../src/mutationObserver.ts","../../src/mutationCache.ts","../../src/mutation.ts","../../src/hydration.ts"],"mappings":";;UAQU,cAAc,iBAAiB,SAAS;EAChD,UAAU,QAAQ,QAAQ;EAC1B,iBAAiB,QAAQ;EACzB,YAAY,OAAO;EACnB,UAAU,sBAAsB,OAAO;EACvC;EACA;EACA,QAAQ,WAAW;EACnB,aAAa,gBAAgB;EAC7B,aAAa;EACb;;;;;;UAOe,QAAQ;;;;;EAKvB,SAAS,QAAQ;;;;EAIjB,SAAS,gBAAgB;;;;EAIzB,gBAAgB;;;;EAIhB;;;;EAIA;;;;EAIA;;;;EAIA,aAAa,QAAQ;;;;EAIrB;;;KAMU,WAAW,6BAA6B,oBAAoB;;KAGnE,oBAAoB,SAAS,iBAChC,sBACA,OAAO;;KAIG,gBAAgB,mBAAmB,mBAAmB;;KAG7D,mBAAmB,SAAS,iBAC/B,sBACA,OAAO;;;;;;iBAiBO,SAAS,aAAa;;;;;;;;;;;;;;;;;;;cAwBzB,uBAAuB;EAClC;EACA;EACY,YAAA,UAAU;;;;;;;;iBAaR,iBAAiB,aAAa,SAAS;;;;;;;;;;iBAavC,cAAc,iBAAiB,SAAS,cACtD,QAAQ,cAAc,OAAO,UAC5B,QAAQ;KCvIN,SAAS,UAAU,0BAA0B,6BACvC,2BAGM;KAGZ,cAAc,UAAU,0BAA0B,sCAEnD,cAAc,SAAS,MAAM;;;;;UAMhB,aAAa,kBAAkB,WAAW;;;;;EAKzD,OAAO;;;;EAIP;;;;EAIA,aAAa,OAAO;;;;EAIpB,WAAW,YAAY,cAAc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