@tramvai/react-query 1.105.2 → 1.106.0
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.
package/lib/baseQuery/types.d.ts
CHANGED
|
@@ -13,10 +13,7 @@ export interface BaseQuery<Options, TCreateQuery, TQuery, TUseQuery> {
|
|
|
13
13
|
[QUERY_PARAMETERS]: TCreateQuery;
|
|
14
14
|
fork(options: TUseQuery): TQuery;
|
|
15
15
|
raw(context: ActionContext, options?: Options): TUseQuery;
|
|
16
|
-
prefetchAction(options?: Options): Action<void, void
|
|
17
|
-
queryClient: typeof QUERY_CLIENT_TOKEN;
|
|
18
|
-
}>;
|
|
19
|
-
fetchAction(options?: Options): Action<void, void, {
|
|
16
|
+
prefetchAction(options?: Options): Action<void, Promise<void>, {
|
|
20
17
|
queryClient: typeof QUERY_CLIENT_TOKEN;
|
|
21
18
|
}>;
|
|
22
19
|
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { ProvideDepsIterator } from '@tinkoff/dippy';
|
|
2
|
-
import type { UseInfiniteQueryOptions } from 'react-query';
|
|
2
|
+
import type { UseInfiniteQueryOptions, InfiniteData } from 'react-query';
|
|
3
|
+
import type { Action } from '@tramvai/core';
|
|
4
|
+
import type { QUERY_CLIENT_TOKEN } from '@tramvai/module-react-query';
|
|
3
5
|
import type { BaseCreateQueryOptions, BaseQuery } from '../baseQuery/types';
|
|
4
6
|
export interface CreateInfiniteQueryOptions<Options, PageParam, Result, Deps> extends BaseCreateQueryOptions<Options, Deps> {
|
|
5
7
|
infiniteQueryOptions?: UseInfiniteQueryOptions<Result, Error>;
|
|
@@ -7,4 +9,8 @@ export interface CreateInfiniteQueryOptions<Options, PageParam, Result, Deps> ex
|
|
|
7
9
|
getNextPageParam?: (lastPage: Result, allPages: Result[]) => PageParam;
|
|
8
10
|
getPreviousPageParam?: (firstPage: Result, allPages: Result[]) => PageParam;
|
|
9
11
|
}
|
|
10
|
-
export declare type InfiniteQuery<Options, PageParam, Result, Deps> = BaseQuery<Options, CreateInfiniteQueryOptions<Options, PageParam, Result, Deps>, InfiniteQuery<Options, PageParam, Result, Deps>, UseInfiniteQueryOptions<Result, Error
|
|
12
|
+
export declare type InfiniteQuery<Options, PageParam, Result, Deps> = BaseQuery<Options, CreateInfiniteQueryOptions<Options, PageParam, Result, Deps>, InfiniteQuery<Options, PageParam, Result, Deps>, UseInfiniteQueryOptions<Result, Error>> & {
|
|
13
|
+
fetchAction(options?: Options): Action<void, Promise<InfiniteData<Result>>, {
|
|
14
|
+
queryClient: typeof QUERY_CLIENT_TOKEN;
|
|
15
|
+
}>;
|
|
16
|
+
};
|
package/lib/query/types.d.ts
CHANGED
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
import type { ProvideDepsIterator } from '@tinkoff/dippy';
|
|
2
2
|
import type { UseQueryOptions } from 'react-query';
|
|
3
|
+
import type { Action } from '@tramvai/core';
|
|
4
|
+
import type { QUERY_CLIENT_TOKEN } from '@tramvai/module-react-query';
|
|
3
5
|
import type { BaseCreateQueryOptions, BaseQuery } from '../baseQuery/types';
|
|
4
6
|
export interface CreateQueryOptions<Options, Result, Deps> extends BaseCreateQueryOptions<Options, Deps> {
|
|
5
7
|
queryOptions?: UseQueryOptions<Result, Error>;
|
|
6
8
|
fn: (options: Options, deps: ProvideDepsIterator<Deps>) => Promise<Result>;
|
|
7
9
|
}
|
|
8
|
-
export declare type Query<Options, Result, Deps> = BaseQuery<Options, CreateQueryOptions<Options, Result, Deps>, Query<Options, Result, Deps>, UseQueryOptions<Result, Error
|
|
10
|
+
export declare type Query<Options, Result, Deps> = BaseQuery<Options, CreateQueryOptions<Options, Result, Deps>, Query<Options, Result, Deps>, UseQueryOptions<Result, Error>> & {
|
|
11
|
+
fetchAction(options?: Options): Action<void, Promise<Result>, {
|
|
12
|
+
queryClient: typeof QUERY_CLIENT_TOKEN;
|
|
13
|
+
}>;
|
|
14
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tramvai/react-query",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.106.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"typings": "lib/index.d.ts",
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@tinkoff/react-hooks": "0.0.26",
|
|
22
|
-
"@tramvai/core": "1.
|
|
23
|
-
"@tramvai/module-react-query": "1.
|
|
24
|
-
"@tramvai/state": "1.
|
|
22
|
+
"@tramvai/core": "1.106.0",
|
|
23
|
+
"@tramvai/module-react-query": "1.106.0",
|
|
24
|
+
"@tramvai/state": "1.106.0"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
27
|
"@tinkoff/dippy": "0.7.41",
|