@openapi-qraft/tanstack-query-react-types 2.1.0 → 2.1.2
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/CHANGELOG.md +13 -0
- package/dist/types/service-operation/ServiceOperation.d.ts +2 -2
- package/dist/types/service-operation/ServiceOperation.d.ts.map +1 -1
- package/dist/types/service-operation/ServiceOperationCancelQueries.d.ts +2 -2
- package/dist/types/service-operation/ServiceOperationCancelQueries.d.ts.map +1 -1
- package/dist/types/service-operation/ServiceOperationFetchInfiniteQuery.d.ts +4 -4
- package/dist/types/service-operation/ServiceOperationFetchInfiniteQuery.d.ts.map +1 -1
- package/dist/types/service-operation/ServiceOperationFetchQuery.d.ts +4 -4
- package/dist/types/service-operation/ServiceOperationFetchQuery.d.ts.map +1 -1
- package/dist/types/service-operation/ServiceOperationGetInfiniteQueryData.d.ts +2 -2
- package/dist/types/service-operation/ServiceOperationGetInfiniteQueryData.d.ts.map +1 -1
- package/dist/types/service-operation/ServiceOperationGetQueriesData.d.ts +4 -4
- package/dist/types/service-operation/ServiceOperationGetQueriesData.d.ts.map +1 -1
- package/dist/types/service-operation/ServiceOperationGetQueryData.d.ts +2 -2
- package/dist/types/service-operation/ServiceOperationGetQueryData.d.ts.map +1 -1
- package/dist/types/service-operation/ServiceOperationGetQueryState.d.ts +3 -3
- package/dist/types/service-operation/ServiceOperationGetQueryState.d.ts.map +1 -1
- package/dist/types/service-operation/ServiceOperationInvalidateQueries.d.ts +2 -2
- package/dist/types/service-operation/ServiceOperationInvalidateQueries.d.ts.map +1 -1
- package/dist/types/service-operation/ServiceOperationIsFetchingQueries.d.ts +2 -2
- package/dist/types/service-operation/ServiceOperationIsFetchingQueries.d.ts.map +1 -1
- package/dist/types/service-operation/ServiceOperationIsMutatingQueries.d.ts +1 -1
- package/dist/types/service-operation/ServiceOperationIsMutatingQueries.d.ts.map +1 -1
- package/dist/types/service-operation/ServiceOperationQueryFn.d.ts +2 -2
- package/dist/types/service-operation/ServiceOperationQueryFn.d.ts.map +1 -1
- package/dist/types/service-operation/ServiceOperationRefetchQueries.d.ts +2 -2
- package/dist/types/service-operation/ServiceOperationRefetchQueries.d.ts.map +1 -1
- package/dist/types/service-operation/ServiceOperationRemoveQueries.d.ts +2 -2
- package/dist/types/service-operation/ServiceOperationRemoveQueries.d.ts.map +1 -1
- package/dist/types/service-operation/ServiceOperationResetQueries.d.ts +2 -2
- package/dist/types/service-operation/ServiceOperationResetQueries.d.ts.map +1 -1
- package/dist/types/service-operation/ServiceOperationSetInfiniteQueryData.d.ts +2 -2
- package/dist/types/service-operation/ServiceOperationSetInfiniteQueryData.d.ts.map +1 -1
- package/dist/types/service-operation/ServiceOperationSetQueriesData.d.ts +2 -2
- package/dist/types/service-operation/ServiceOperationSetQueriesData.d.ts.map +1 -1
- package/dist/types/service-operation/ServiceOperationSetQueryData.d.ts +2 -2
- package/dist/types/service-operation/ServiceOperationSetQueryData.d.ts.map +1 -1
- package/dist/types/service-operation/ServiceOperationUseInfiniteQuery.d.ts +3 -3
- package/dist/types/service-operation/ServiceOperationUseInfiniteQuery.d.ts.map +1 -1
- package/dist/types/service-operation/ServiceOperationUseIsFetchingQueries.d.ts +2 -2
- package/dist/types/service-operation/ServiceOperationUseIsFetchingQueries.d.ts.map +1 -1
- package/dist/types/service-operation/ServiceOperationUseIsMutating.d.ts +1 -1
- package/dist/types/service-operation/ServiceOperationUseIsMutating.d.ts.map +1 -1
- package/dist/types/service-operation/ServiceOperationUseMutation.d.ts +2 -2
- package/dist/types/service-operation/ServiceOperationUseMutation.d.ts.map +1 -1
- package/dist/types/service-operation/ServiceOperationUseMutationState.d.ts +3 -3
- package/dist/types/service-operation/ServiceOperationUseMutationState.d.ts.map +1 -1
- package/dist/types/service-operation/ServiceOperationUseQueries.d.ts +3 -3
- package/dist/types/service-operation/ServiceOperationUseQueries.d.ts.map +1 -1
- package/dist/types/service-operation/ServiceOperationUseQuery.d.ts +3 -3
- package/dist/types/service-operation/ServiceOperationUseQuery.d.ts.map +1 -1
- package/dist/types/service-operation/ServiceOperationUseSuspenseInfiniteQuery.d.ts +2 -2
- package/dist/types/service-operation/ServiceOperationUseSuspenseInfiniteQuery.d.ts.map +1 -1
- package/dist/types/service-operation/ServiceOperationUseSuspenseQueries.d.ts +3 -3
- package/dist/types/service-operation/ServiceOperationUseSuspenseQueries.d.ts.map +1 -1
- package/dist/types/service-operation/ServiceOperationUseSuspenseQuery.d.ts +2 -2
- package/dist/types/service-operation/ServiceOperationUseSuspenseQuery.d.ts.map +1 -1
- package/dist/types/shared/ServiceOperationFetchInfiniteQueryOptions.d.ts +2 -1
- package/dist/types/shared/ServiceOperationFetchInfiniteQueryOptions.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/service-operation/ServiceOperation.ts +2 -2
- package/src/service-operation/ServiceOperationCancelQueries.ts +3 -3
- package/src/service-operation/ServiceOperationFetchInfiniteQuery.ts +6 -6
- package/src/service-operation/ServiceOperationFetchQuery.ts +9 -9
- package/src/service-operation/ServiceOperationGetInfiniteQueryData.ts +2 -2
- package/src/service-operation/ServiceOperationGetQueriesData.ts +5 -5
- package/src/service-operation/ServiceOperationGetQueryData.ts +2 -2
- package/src/service-operation/ServiceOperationGetQueryState.ts +3 -3
- package/src/service-operation/ServiceOperationInvalidateQueries.ts +2 -2
- package/src/service-operation/ServiceOperationIsFetchingQueries.ts +3 -3
- package/src/service-operation/ServiceOperationIsMutatingQueries.ts +2 -2
- package/src/service-operation/ServiceOperationQueryFn.ts +3 -3
- package/src/service-operation/ServiceOperationRefetchQueries.ts +3 -3
- package/src/service-operation/ServiceOperationRemoveQueries.ts +3 -3
- package/src/service-operation/ServiceOperationResetQueries.ts +3 -3
- package/src/service-operation/ServiceOperationSetInfiniteQueryData.ts +5 -4
- package/src/service-operation/ServiceOperationSetQueriesData.ts +6 -6
- package/src/service-operation/ServiceOperationSetQueryData.ts +4 -4
- package/src/service-operation/ServiceOperationUseInfiniteQuery.ts +16 -14
- package/src/service-operation/ServiceOperationUseIsFetchingQueries.ts +3 -3
- package/src/service-operation/ServiceOperationUseIsMutating.ts +2 -2
- package/src/service-operation/ServiceOperationUseMutation.ts +2 -2
- package/src/service-operation/ServiceOperationUseMutationState.ts +4 -4
- package/src/service-operation/ServiceOperationUseQueries.ts +9 -4
- package/src/service-operation/ServiceOperationUseQuery.ts +5 -5
- package/src/service-operation/ServiceOperationUseSuspenseInfiniteQuery.ts +8 -5
- package/src/service-operation/ServiceOperationUseSuspenseQueries.ts +14 -4
- package/src/service-operation/ServiceOperationUseSuspenseQuery.ts +3 -3
- package/src/shared/ServiceOperationFetchInfiniteQueryOptions.ts +4 -1
|
@@ -14,7 +14,7 @@ import type {
|
|
|
14
14
|
|
|
15
15
|
export interface ServiceOperationUseInfiniteQuery<
|
|
16
16
|
TSchema extends { url: string; method: string },
|
|
17
|
-
|
|
17
|
+
TOperationQueryFnData,
|
|
18
18
|
TParams,
|
|
19
19
|
TError,
|
|
20
20
|
> {
|
|
@@ -22,7 +22,11 @@ export interface ServiceOperationUseInfiniteQuery<
|
|
|
22
22
|
parameters: AreAllOptional<TParams> extends true ? TParams | void : TParams
|
|
23
23
|
): ServiceOperationInfiniteQueryKey<TSchema, TParams>;
|
|
24
24
|
|
|
25
|
-
useInfiniteQuery<
|
|
25
|
+
useInfiniteQuery<
|
|
26
|
+
TPageParam extends TParams,
|
|
27
|
+
TQueryFnData = TOperationQueryFnData,
|
|
28
|
+
TData = OperationInfiniteData<TQueryFnData, TParams>,
|
|
29
|
+
>(
|
|
26
30
|
parameters:
|
|
27
31
|
| ServiceOperationInfiniteQueryKey<TSchema, TParams>
|
|
28
32
|
| (AreAllOptional<TParams> extends true ? TParams | void : TParams),
|
|
@@ -30,7 +34,7 @@ export interface ServiceOperationUseInfiniteQuery<
|
|
|
30
34
|
UndefinedInitialDataInfiniteOptions<
|
|
31
35
|
TQueryFnData,
|
|
32
36
|
TError,
|
|
33
|
-
|
|
37
|
+
TData,
|
|
34
38
|
ServiceOperationInfiniteQueryKey<TSchema, TParams>,
|
|
35
39
|
PartialParameters<TPageParam>
|
|
36
40
|
>,
|
|
@@ -43,12 +47,13 @@ export interface ServiceOperationUseInfiniteQuery<
|
|
|
43
47
|
TQueryFnData,
|
|
44
48
|
PartialParameters<TPageParam>
|
|
45
49
|
>
|
|
46
|
-
): UseInfiniteQueryResult<
|
|
47
|
-
OperationInfiniteData<TData, TParams>,
|
|
48
|
-
TError | Error
|
|
49
|
-
>;
|
|
50
|
+
): UseInfiniteQueryResult<TData, TError | Error>;
|
|
50
51
|
|
|
51
|
-
useInfiniteQuery<
|
|
52
|
+
useInfiniteQuery<
|
|
53
|
+
TPageParam extends TParams,
|
|
54
|
+
TQueryFnData = TOperationQueryFnData,
|
|
55
|
+
TData = OperationInfiniteData<TQueryFnData, TParams>,
|
|
56
|
+
>(
|
|
52
57
|
parameters:
|
|
53
58
|
| ServiceOperationInfiniteQueryKey<TSchema, TParams>
|
|
54
59
|
| (AreAllOptional<TParams> extends true ? TParams | void : TParams),
|
|
@@ -56,7 +61,7 @@ export interface ServiceOperationUseInfiniteQuery<
|
|
|
56
61
|
DefinedInitialDataInfiniteOptions<
|
|
57
62
|
TQueryFnData,
|
|
58
63
|
TError,
|
|
59
|
-
|
|
64
|
+
TData,
|
|
60
65
|
ServiceOperationInfiniteQueryKey<TSchema, TParams>,
|
|
61
66
|
PartialParameters<TPageParam>
|
|
62
67
|
>,
|
|
@@ -66,11 +71,8 @@ export interface ServiceOperationUseInfiniteQuery<
|
|
|
66
71
|
| 'initialPageParam'
|
|
67
72
|
> &
|
|
68
73
|
InfiniteQueryPageParamsOptions<
|
|
69
|
-
|
|
74
|
+
TOperationQueryFnData,
|
|
70
75
|
PartialParameters<TPageParam>
|
|
71
76
|
>
|
|
72
|
-
): DefinedUseInfiniteQueryResult<
|
|
73
|
-
OperationInfiniteData<TData, TParams>,
|
|
74
|
-
TError | Error
|
|
75
|
-
>;
|
|
77
|
+
): DefinedUseInfiniteQueryResult<TData, TError | Error>;
|
|
76
78
|
}
|
|
@@ -5,7 +5,7 @@ import type {
|
|
|
5
5
|
|
|
6
6
|
export interface ServiceOperationUseIsFetchingQueries<
|
|
7
7
|
TSchema extends { url: string; method: string },
|
|
8
|
-
|
|
8
|
+
TOperationQueryFnData,
|
|
9
9
|
TParams,
|
|
10
10
|
TError,
|
|
11
11
|
> {
|
|
@@ -13,14 +13,14 @@ export interface ServiceOperationUseIsFetchingQueries<
|
|
|
13
13
|
filters?:
|
|
14
14
|
| QueryFiltersByParameters<
|
|
15
15
|
TSchema,
|
|
16
|
-
|
|
16
|
+
TOperationQueryFnData,
|
|
17
17
|
TInfinite,
|
|
18
18
|
TParams,
|
|
19
19
|
TError
|
|
20
20
|
>
|
|
21
21
|
| QueryFiltersByQueryKey<
|
|
22
22
|
TSchema,
|
|
23
|
-
|
|
23
|
+
TOperationQueryFnData,
|
|
24
24
|
TInfinite,
|
|
25
25
|
TParams,
|
|
26
26
|
TError
|
|
@@ -16,7 +16,7 @@ export interface ServiceOperationUseIsMutating<
|
|
|
16
16
|
TBody,
|
|
17
17
|
TMutationData,
|
|
18
18
|
TParams,
|
|
19
|
-
TError,
|
|
19
|
+
TError | Error,
|
|
20
20
|
TContext
|
|
21
21
|
>
|
|
22
22
|
| MutationFiltersByMutationKey<
|
|
@@ -24,7 +24,7 @@ export interface ServiceOperationUseIsMutating<
|
|
|
24
24
|
TBody,
|
|
25
25
|
TMutationData,
|
|
26
26
|
TParams,
|
|
27
|
-
TError,
|
|
27
|
+
TError | Error,
|
|
28
28
|
TContext
|
|
29
29
|
>
|
|
30
30
|
): number;
|
|
@@ -24,7 +24,7 @@ export interface ServiceOperationUseMutation<
|
|
|
24
24
|
TMutationData,
|
|
25
25
|
TParams,
|
|
26
26
|
TVariables,
|
|
27
|
-
TError,
|
|
27
|
+
TError | Error,
|
|
28
28
|
TContext
|
|
29
29
|
>
|
|
30
30
|
): UseMutationResult<
|
|
@@ -44,7 +44,7 @@ export interface ServiceOperationUseMutation<
|
|
|
44
44
|
TMutationData,
|
|
45
45
|
TParams,
|
|
46
46
|
TVariables,
|
|
47
|
-
TError,
|
|
47
|
+
TError | Error,
|
|
48
48
|
TContext
|
|
49
49
|
>
|
|
50
50
|
): UseMutationResult<TMutationData, TError | Error, TVariables, TContext>;
|
|
@@ -16,7 +16,7 @@ export interface ServiceOperationUseMutationState<
|
|
|
16
16
|
TContext = unknown,
|
|
17
17
|
TResult = MutationState<
|
|
18
18
|
TMutationData,
|
|
19
|
-
TError,
|
|
19
|
+
TError | Error,
|
|
20
20
|
MutationVariables<TBody, TParams>,
|
|
21
21
|
TContext
|
|
22
22
|
>,
|
|
@@ -26,7 +26,7 @@ export interface ServiceOperationUseMutationState<
|
|
|
26
26
|
TBody,
|
|
27
27
|
TMutationData,
|
|
28
28
|
TParams,
|
|
29
|
-
TError,
|
|
29
|
+
TError | Error,
|
|
30
30
|
TContext
|
|
31
31
|
>
|
|
32
32
|
| MutationFiltersByMutationKey<
|
|
@@ -34,13 +34,13 @@ export interface ServiceOperationUseMutationState<
|
|
|
34
34
|
TBody,
|
|
35
35
|
TMutationData,
|
|
36
36
|
TParams,
|
|
37
|
-
TError,
|
|
37
|
+
TError | Error,
|
|
38
38
|
TContext
|
|
39
39
|
>;
|
|
40
40
|
select?: (
|
|
41
41
|
mutation: Mutation<
|
|
42
42
|
TMutationData,
|
|
43
|
-
TError,
|
|
43
|
+
TError | Error,
|
|
44
44
|
MutationVariables<TBody, TParams>,
|
|
45
45
|
TContext
|
|
46
46
|
>
|
|
@@ -3,19 +3,24 @@ import type { UseQueryResult } from '@tanstack/react-query';
|
|
|
3
3
|
|
|
4
4
|
export interface ServiceOperationUseQueries<
|
|
5
5
|
TSchema extends { url: string; method: string },
|
|
6
|
-
|
|
6
|
+
TOperationQueryFnData,
|
|
7
7
|
TParams,
|
|
8
8
|
TError,
|
|
9
9
|
> {
|
|
10
10
|
useQueries<
|
|
11
11
|
T extends Array<
|
|
12
|
-
UseQueryOptionsForUseQueries<
|
|
12
|
+
UseQueryOptionsForUseQueries<
|
|
13
|
+
TSchema,
|
|
14
|
+
TParams,
|
|
15
|
+
TOperationQueryFnData,
|
|
16
|
+
TError
|
|
17
|
+
>
|
|
13
18
|
>,
|
|
14
|
-
TCombinedResult = Array<UseQueryResult<
|
|
19
|
+
TCombinedResult = Array<UseQueryResult<TOperationQueryFnData, TError>>,
|
|
15
20
|
>(options: {
|
|
16
21
|
queries: T;
|
|
17
22
|
combine?: (
|
|
18
|
-
results: Array<UseQueryResult<
|
|
23
|
+
results: Array<UseQueryResult<TOperationQueryFnData, TError>>
|
|
19
24
|
) => TCombinedResult;
|
|
20
25
|
}): TCombinedResult;
|
|
21
26
|
}
|
|
@@ -11,7 +11,7 @@ import type {
|
|
|
11
11
|
|
|
12
12
|
export interface ServiceOperationUseQuery<
|
|
13
13
|
TSchema extends { url: string; method: string },
|
|
14
|
-
|
|
14
|
+
TOperationQueryFnData,
|
|
15
15
|
TParams,
|
|
16
16
|
TError,
|
|
17
17
|
> {
|
|
@@ -19,13 +19,13 @@ export interface ServiceOperationUseQuery<
|
|
|
19
19
|
parameters: AreAllOptional<TParams> extends true ? TParams | void : TParams
|
|
20
20
|
): ServiceOperationQueryKey<TSchema, TParams>;
|
|
21
21
|
|
|
22
|
-
useQuery<TData =
|
|
22
|
+
useQuery<TData = TOperationQueryFnData>(
|
|
23
23
|
parameters:
|
|
24
24
|
| ServiceOperationQueryKey<TSchema, TParams>
|
|
25
25
|
| (AreAllOptional<TParams> extends true ? TParams | void : TParams),
|
|
26
26
|
options?: Omit<
|
|
27
27
|
UndefinedInitialDataOptions<
|
|
28
|
-
|
|
28
|
+
TOperationQueryFnData,
|
|
29
29
|
TError,
|
|
30
30
|
TData,
|
|
31
31
|
ServiceOperationQueryKey<TSchema, TParams>
|
|
@@ -34,13 +34,13 @@ export interface ServiceOperationUseQuery<
|
|
|
34
34
|
>
|
|
35
35
|
): UseQueryResult<TData, TError | Error>;
|
|
36
36
|
|
|
37
|
-
useQuery<TData =
|
|
37
|
+
useQuery<TData = TOperationQueryFnData>(
|
|
38
38
|
parameters:
|
|
39
39
|
| ServiceOperationQueryKey<TSchema, TParams>
|
|
40
40
|
| (AreAllOptional<TParams> extends true ? TParams | void : TParams),
|
|
41
41
|
options: Omit<
|
|
42
42
|
DefinedInitialDataOptions<
|
|
43
|
-
|
|
43
|
+
TOperationQueryFnData,
|
|
44
44
|
TError,
|
|
45
45
|
TData,
|
|
46
46
|
ServiceOperationQueryKey<TSchema, TParams>
|
|
@@ -12,20 +12,23 @@ import type {
|
|
|
12
12
|
|
|
13
13
|
export interface ServiceOperationUseSuspenseInfiniteQuery<
|
|
14
14
|
TSchema extends { url: string; method: string },
|
|
15
|
-
|
|
15
|
+
TOperationQueryFnData,
|
|
16
16
|
TParams,
|
|
17
17
|
TError,
|
|
18
18
|
> {
|
|
19
|
-
useSuspenseInfiniteQuery<
|
|
19
|
+
useSuspenseInfiniteQuery<
|
|
20
|
+
TPageParam extends TParams,
|
|
21
|
+
TData = TOperationQueryFnData,
|
|
22
|
+
>(
|
|
20
23
|
parameters:
|
|
21
24
|
| ServiceOperationInfiniteQueryKey<TSchema, TParams>
|
|
22
25
|
| (AreAllOptional<TParams> extends true ? TParams | void : TParams),
|
|
23
26
|
options: Omit<
|
|
24
27
|
UseSuspenseInfiniteQueryOptions<
|
|
25
|
-
|
|
28
|
+
TOperationQueryFnData,
|
|
26
29
|
TError,
|
|
27
30
|
OperationInfiniteData<TData, TParams>,
|
|
28
|
-
|
|
31
|
+
TOperationQueryFnData,
|
|
29
32
|
ServiceOperationInfiniteQueryKey<TSchema, TParams>,
|
|
30
33
|
PartialParameters<TPageParam>
|
|
31
34
|
>,
|
|
@@ -35,7 +38,7 @@ export interface ServiceOperationUseSuspenseInfiniteQuery<
|
|
|
35
38
|
| 'initialPageParam'
|
|
36
39
|
> &
|
|
37
40
|
InfiniteQueryPageParamsOptions<
|
|
38
|
-
|
|
41
|
+
TOperationQueryFnData,
|
|
39
42
|
PartialParameters<TPageParam>
|
|
40
43
|
>
|
|
41
44
|
): UseSuspenseInfiniteQueryResult<
|
|
@@ -6,20 +6,30 @@ import type { UseSuspenseQueryResult } from '@tanstack/react-query';
|
|
|
6
6
|
|
|
7
7
|
export interface ServiceOperationUseSuspenseQueries<
|
|
8
8
|
TSchema extends { url: string; method: string },
|
|
9
|
-
|
|
9
|
+
TOperationQueryFnData,
|
|
10
10
|
TParams,
|
|
11
11
|
TError,
|
|
12
12
|
> {
|
|
13
13
|
useSuspenseQueries<
|
|
14
14
|
T extends Array<
|
|
15
|
-
UseQueryOptionsForUseSuspenseQuery<
|
|
15
|
+
UseQueryOptionsForUseSuspenseQuery<
|
|
16
|
+
TSchema,
|
|
17
|
+
TParams,
|
|
18
|
+
TOperationQueryFnData,
|
|
19
|
+
TError
|
|
20
|
+
>
|
|
21
|
+
>,
|
|
22
|
+
TCombinedResult = Array<
|
|
23
|
+
UseSuspenseQueryResult<TOperationQueryFnData, TError>
|
|
16
24
|
>,
|
|
17
|
-
TCombinedResult = Array<UseSuspenseQueryResult<TQueryFnData, TError>>,
|
|
18
25
|
>(options: {
|
|
19
26
|
queries: T;
|
|
20
27
|
combine?: (
|
|
21
28
|
results: Array<
|
|
22
|
-
WithOptional<
|
|
29
|
+
WithOptional<
|
|
30
|
+
UseSuspenseQueryResult<TOperationQueryFnData, TError>,
|
|
31
|
+
'data'
|
|
32
|
+
>
|
|
23
33
|
>
|
|
24
34
|
) => TCombinedResult;
|
|
25
35
|
}): TCombinedResult;
|
|
@@ -9,17 +9,17 @@ import type {
|
|
|
9
9
|
|
|
10
10
|
export interface ServiceOperationUseSuspenseQuery<
|
|
11
11
|
TSchema extends { url: string; method: string },
|
|
12
|
-
|
|
12
|
+
TOperationQueryFnData,
|
|
13
13
|
TParams,
|
|
14
14
|
TError,
|
|
15
15
|
> {
|
|
16
|
-
useSuspenseQuery<TData =
|
|
16
|
+
useSuspenseQuery<TData = TOperationQueryFnData>(
|
|
17
17
|
parameters:
|
|
18
18
|
| ServiceOperationQueryKey<TSchema, TParams>
|
|
19
19
|
| (AreAllOptional<TParams> extends true ? TParams | void : TParams),
|
|
20
20
|
options?: Omit<
|
|
21
21
|
UseSuspenseQueryOptions<
|
|
22
|
-
|
|
22
|
+
TOperationQueryFnData,
|
|
23
23
|
TError,
|
|
24
24
|
TData,
|
|
25
25
|
ServiceOperationQueryKey<TSchema, TParams>
|
|
@@ -8,6 +8,7 @@ import type {
|
|
|
8
8
|
import type { OperationInfiniteData } from './OperationInfiniteData.js';
|
|
9
9
|
import type { PartialParameters } from './PartialParameters.js';
|
|
10
10
|
import type { ServiceOperationInfiniteQueryKey } from './ServiceOperationKey.js';
|
|
11
|
+
import { AreAllOptional } from './AreAllOptional.js';
|
|
11
12
|
import { RequestFn } from './RequestFn.js';
|
|
12
13
|
|
|
13
14
|
export type ServiceOperationFetchInfiniteQueryOptions<
|
|
@@ -96,7 +97,9 @@ type FetchInfiniteQueryOptionsBase<
|
|
|
96
97
|
>,
|
|
97
98
|
'queryKey' | 'initialPageParam'
|
|
98
99
|
> &
|
|
99
|
-
|
|
100
|
+
(AreAllOptional<TParams> extends true
|
|
101
|
+
? Partial<InitialPageParam<PartialParameters<TPageParam>>>
|
|
102
|
+
: InitialPageParam<PartialParameters<TPageParam>>) &
|
|
100
103
|
FetchInfiniteQueryPages<TQueryFnData, TPageParam>;
|
|
101
104
|
|
|
102
105
|
type FetchInfiniteQueryOptionsByQueryKey<
|