@orpc/vue-query 0.52.0 → 0.54.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/dist/index.d.mts +12 -5
- package/dist/index.d.ts +12 -5
- package/package.json +5 -4
package/dist/index.d.mts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { ClientContext, Client, NestedClient } from '@orpc/client';
|
2
|
-
import { QueryKey, QueryObserverOptions, QueryFunctionContext,
|
3
|
-
import { PartialDeep, AnyFunction,
|
2
|
+
import { QueryKey, QueryObserverOptions, QueryFunctionContext, InfiniteQueryObserverOptions, MutationObserverOptions, InfiniteData } from '@tanstack/vue-query';
|
3
|
+
import { PartialDeep, AnyFunction, MaybeOptionalOptions } from '@orpc/shared';
|
4
4
|
import { MaybeRef, MaybeRefOrGetter, ComputedRef, Ref } from 'vue';
|
5
5
|
|
6
6
|
type KeyType = 'query' | 'infinite' | 'mutation' | undefined;
|
@@ -35,7 +35,7 @@ type QueryOptionsIn<TClientContext extends ClientContext, TInput, TOutput, TErro
|
|
35
35
|
} & {
|
36
36
|
enabled?: MaybeRefOrGetter<QueryObserverOptions<TOutput, TError, TSelectData, TOutput>['enabled']>;
|
37
37
|
queryKey?: MaybeRefDeep<QueryObserverOptions<TOutput, TError, TSelectData, TOutput>['queryKey']>;
|
38
|
-
shallow?:
|
38
|
+
shallow?: boolean;
|
39
39
|
};
|
40
40
|
interface QueryOptionsBase<TOutput, TError> {
|
41
41
|
queryKey: ComputedRef<QueryKey>;
|
@@ -48,7 +48,13 @@ type InfiniteOptionsIn<TClientContext extends ClientContext, TInput, TOutput, TE
|
|
48
48
|
context?: MaybeRefDeep<TClientContext>;
|
49
49
|
} : {
|
50
50
|
context: MaybeRefDeep<TClientContext>;
|
51
|
-
}) &
|
51
|
+
}) & {
|
52
|
+
[Property in keyof Omit<InfiniteQueryObserverOptions<TOutput, TError, TSelectData, TOutput, QueryKey, TPageParam>, 'queryKey' | 'enabled'>]: MaybeRefDeep<InfiniteQueryObserverOptions<TOutput, TError, TSelectData, TOutput, QueryKey, TPageParam>[Property]>;
|
53
|
+
} & {
|
54
|
+
enabled?: MaybeRefOrGetter<InfiniteQueryObserverOptions<TOutput, TError, TSelectData, TOutput, QueryKey, TPageParam>['enabled']>;
|
55
|
+
queryKey?: MaybeRefDeep<InfiniteQueryObserverOptions<TOutput, TError, TSelectData, TOutput, QueryKey, TPageParam>['queryKey']>;
|
56
|
+
shallow?: boolean;
|
57
|
+
};
|
52
58
|
interface InfiniteOptionsBase<TOutput, TError, TPageParam> {
|
53
59
|
queryKey: ComputedRef<QueryKey>;
|
54
60
|
queryFn(ctx: QueryFunctionContext<QueryKey, TPageParam>): Promise<TOutput>;
|
@@ -89,4 +95,5 @@ type UnrefDeep<T> = T extends Ref<infer U> ? UnrefDeep<U> : T extends AnyFunctio
|
|
89
95
|
} : T;
|
90
96
|
declare function unrefDeep<T>(value: T): UnrefDeep<T>;
|
91
97
|
|
92
|
-
export {
|
98
|
+
export { buildKey, createGeneralUtils, createRouterUtils as createORPCVueQueryUtils, createProcedureUtils, createRouterUtils, unrefDeep };
|
99
|
+
export type { BuildKeyOptions, CreateProcedureUtilsOptions, CreateRouterUtilsOptions, GeneralUtils, InfiniteOptionsBase, InfiniteOptionsIn, KeyType, MaybeRefDeep, MutationOptions, MutationOptionsIn, ProcedureUtils, QueryOptionsBase, QueryOptionsIn, RouterUtils, UnrefDeep };
|
package/dist/index.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { ClientContext, Client, NestedClient } from '@orpc/client';
|
2
|
-
import { QueryKey, QueryObserverOptions, QueryFunctionContext,
|
3
|
-
import { PartialDeep, AnyFunction,
|
2
|
+
import { QueryKey, QueryObserverOptions, QueryFunctionContext, InfiniteQueryObserverOptions, MutationObserverOptions, InfiniteData } from '@tanstack/vue-query';
|
3
|
+
import { PartialDeep, AnyFunction, MaybeOptionalOptions } from '@orpc/shared';
|
4
4
|
import { MaybeRef, MaybeRefOrGetter, ComputedRef, Ref } from 'vue';
|
5
5
|
|
6
6
|
type KeyType = 'query' | 'infinite' | 'mutation' | undefined;
|
@@ -35,7 +35,7 @@ type QueryOptionsIn<TClientContext extends ClientContext, TInput, TOutput, TErro
|
|
35
35
|
} & {
|
36
36
|
enabled?: MaybeRefOrGetter<QueryObserverOptions<TOutput, TError, TSelectData, TOutput>['enabled']>;
|
37
37
|
queryKey?: MaybeRefDeep<QueryObserverOptions<TOutput, TError, TSelectData, TOutput>['queryKey']>;
|
38
|
-
shallow?:
|
38
|
+
shallow?: boolean;
|
39
39
|
};
|
40
40
|
interface QueryOptionsBase<TOutput, TError> {
|
41
41
|
queryKey: ComputedRef<QueryKey>;
|
@@ -48,7 +48,13 @@ type InfiniteOptionsIn<TClientContext extends ClientContext, TInput, TOutput, TE
|
|
48
48
|
context?: MaybeRefDeep<TClientContext>;
|
49
49
|
} : {
|
50
50
|
context: MaybeRefDeep<TClientContext>;
|
51
|
-
}) &
|
51
|
+
}) & {
|
52
|
+
[Property in keyof Omit<InfiniteQueryObserverOptions<TOutput, TError, TSelectData, TOutput, QueryKey, TPageParam>, 'queryKey' | 'enabled'>]: MaybeRefDeep<InfiniteQueryObserverOptions<TOutput, TError, TSelectData, TOutput, QueryKey, TPageParam>[Property]>;
|
53
|
+
} & {
|
54
|
+
enabled?: MaybeRefOrGetter<InfiniteQueryObserverOptions<TOutput, TError, TSelectData, TOutput, QueryKey, TPageParam>['enabled']>;
|
55
|
+
queryKey?: MaybeRefDeep<InfiniteQueryObserverOptions<TOutput, TError, TSelectData, TOutput, QueryKey, TPageParam>['queryKey']>;
|
56
|
+
shallow?: boolean;
|
57
|
+
};
|
52
58
|
interface InfiniteOptionsBase<TOutput, TError, TPageParam> {
|
53
59
|
queryKey: ComputedRef<QueryKey>;
|
54
60
|
queryFn(ctx: QueryFunctionContext<QueryKey, TPageParam>): Promise<TOutput>;
|
@@ -89,4 +95,5 @@ type UnrefDeep<T> = T extends Ref<infer U> ? UnrefDeep<U> : T extends AnyFunctio
|
|
89
95
|
} : T;
|
90
96
|
declare function unrefDeep<T>(value: T): UnrefDeep<T>;
|
91
97
|
|
92
|
-
export {
|
98
|
+
export { buildKey, createGeneralUtils, createRouterUtils as createORPCVueQueryUtils, createProcedureUtils, createRouterUtils, unrefDeep };
|
99
|
+
export type { BuildKeyOptions, CreateProcedureUtilsOptions, CreateRouterUtilsOptions, GeneralUtils, InfiniteOptionsBase, InfiniteOptionsIn, KeyType, MaybeRefDeep, MutationOptions, MutationOptionsIn, ProcedureUtils, QueryOptionsBase, QueryOptionsIn, RouterUtils, UnrefDeep };
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@orpc/vue-query",
|
3
3
|
"type": "module",
|
4
|
-
"version": "0.
|
4
|
+
"version": "0.54.0",
|
5
5
|
"license": "MIT",
|
6
6
|
"homepage": "https://orpc.unnoq.com",
|
7
7
|
"repository": {
|
@@ -27,12 +27,13 @@
|
|
27
27
|
"dist"
|
28
28
|
],
|
29
29
|
"peerDependencies": {
|
30
|
-
"@tanstack/vue-query": ">=5.
|
30
|
+
"@tanstack/vue-query": ">=5.55.0",
|
31
31
|
"vue": ">=3.3.0",
|
32
|
-
"@orpc/client": "0.
|
32
|
+
"@orpc/client": "0.54.0"
|
33
33
|
},
|
34
34
|
"dependencies": {
|
35
|
-
"@
|
35
|
+
"@tanstack/vue-query": "^5.72.2",
|
36
|
+
"@orpc/shared": "0.54.0"
|
36
37
|
},
|
37
38
|
"scripts": {
|
38
39
|
"build": "unbuild",
|