@ventlio/tanstack-query 0.5.2 → 0.5.3

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.
@@ -10,7 +10,7 @@ export interface IPagination {
10
10
  total: number;
11
11
  }
12
12
  export type TanstackQueryOption<TResponse> = UseQueryOptions<IRequestSuccess<TResponse | undefined>, IRequestError, IRequestSuccess<TResponse | undefined>, Array<any>>;
13
- export type TanstackInfiniteQueryOption<TResponse> = UseInfiniteQueryOptions<IRequestSuccess<TResponse | undefined>, IRequestError, IRequestSuccess<TResponse | undefined>, Array<any>>;
13
+ export type TanstackInfiniteQueryOption<TResponse> = Partial<UseInfiniteQueryOptions<IRequestSuccess<TResponse | undefined>, IRequestError, IRequestSuccess<TResponse | undefined>, Array<any>>>;
14
14
  export interface DefaultRequestOptions {
15
15
  baseUrl?: string;
16
16
  headers?: RawAxiosRequestHeaders;
@@ -1,4 +1,4 @@
1
- import type { InfiniteData, UseQueryOptions } from '@tanstack/react-query';
1
+ import type { InfiniteData, QueryKey, UseQueryOptions } from '@tanstack/react-query';
2
2
  import type { IRequestError, IRequestSuccess } from '../request';
3
3
  import type { DefaultRequestOptions, TanstackInfiniteQueryOption } from './queries.interface';
4
4
  interface Pagination {
@@ -12,9 +12,11 @@ interface Pagination {
12
12
  export declare const useGetInfiniteRequest: <TResponse extends Record<string, any>>({ path, load, queryOptions, keyTracker, baseUrl, headers, }: {
13
13
  path: string;
14
14
  load?: boolean | undefined;
15
- queryOptions?: TanstackInfiniteQueryOption<TResponse & {
15
+ queryOptions?: Partial<import("@tanstack/react-query/build/legacy/types").UseInfiniteQueryOptions<IRequestSuccess<(TResponse & {
16
16
  pagination: Pagination;
17
- }> | undefined;
17
+ }) | undefined>, IRequestError, IRequestSuccess<(TResponse & {
18
+ pagination: Pagination;
19
+ }) | undefined>, any[], QueryKey, unknown>> | undefined;
18
20
  keyTracker?: string | undefined;
19
21
  } & DefaultRequestOptions) => {
20
22
  isLoading: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ventlio/tanstack-query",
3
- "version": "0.5.2",
3
+ "version": "0.5.3",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "contributors": [
@@ -18,11 +18,13 @@ export type TanstackQueryOption<TResponse> = UseQueryOptions<
18
18
  Array<any>
19
19
  >;
20
20
 
21
- export type TanstackInfiniteQueryOption<TResponse> = UseInfiniteQueryOptions<
22
- IRequestSuccess<TResponse | undefined>,
23
- IRequestError,
24
- IRequestSuccess<TResponse | undefined>,
25
- Array<any>
21
+ export type TanstackInfiniteQueryOption<TResponse> = Partial<
22
+ UseInfiniteQueryOptions<
23
+ IRequestSuccess<TResponse | undefined>,
24
+ IRequestError,
25
+ IRequestSuccess<TResponse | undefined>,
26
+ Array<any>
27
+ >
26
28
  >;
27
29
 
28
30
  export interface DefaultRequestOptions {