@orpc/vue-query 0.44.0 → 0.45.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.
- package/dist/index.d.mts +9 -9
- package/dist/index.d.ts +9 -9
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { ClientContext, Client, NestedClient } from '@orpc/client';
|
2
|
-
import { QueryKey, QueryObserverOptions,
|
2
|
+
import { QueryKey, QueryObserverOptions, QueryFunctionContext, UseInfiniteQueryOptions, MutationObserverOptions, InfiniteData } from '@tanstack/vue-query';
|
3
3
|
import { PartialDeep, AnyFunction, SetOptional, MaybeOptionalOptions } from '@orpc/shared';
|
4
4
|
import { MaybeRef, MaybeRefOrGetter, ComputedRef } from 'vue';
|
5
5
|
|
@@ -33,9 +33,9 @@ type QueryOptionsIn<TClientContext extends ClientContext, TInput, TOutput, TErro
|
|
33
33
|
}) & {
|
34
34
|
[P in keyof Omit<QueryObserverOptions<TOutput, TError, TSelectData, TOutput>, 'queryKey' | 'enabled'>]: MaybeRefDeep<QueryObserverOptions<TOutput, TError, TSelectData, TOutput>[P]>;
|
35
35
|
} & {
|
36
|
-
enabled?: MaybeRefOrGetter<
|
37
|
-
queryKey?: MaybeRefDeep<
|
38
|
-
shallow?: boolean
|
36
|
+
enabled?: MaybeRefOrGetter<QueryObserverOptions<TOutput, TError, TSelectData, TOutput>['enabled']>;
|
37
|
+
queryKey?: MaybeRefDeep<QueryObserverOptions<TOutput, TError, TSelectData, TOutput>['queryKey']>;
|
38
|
+
shallow?: MaybeRef<boolean>;
|
39
39
|
};
|
40
40
|
interface QueryOptionsBase<TOutput, TError extends Error> {
|
41
41
|
queryKey: ComputedRef<QueryKey>;
|
@@ -54,12 +54,12 @@ interface InfiniteOptionsBase<TOutput, TError extends Error, TPageParam> {
|
|
54
54
|
queryFn(ctx: QueryFunctionContext<QueryKey, TPageParam>): Promise<TOutput>;
|
55
55
|
retry?(failureCount: number, error: TError): boolean;
|
56
56
|
}
|
57
|
-
type MutationOptionsIn<TClientContext extends ClientContext, TInput, TOutput, TError extends Error> = (Record<never, never> extends TClientContext ? {
|
57
|
+
type MutationOptionsIn<TClientContext extends ClientContext, TInput, TOutput, TError extends Error, TMutationContext> = (Record<never, never> extends TClientContext ? {
|
58
58
|
context?: TClientContext;
|
59
59
|
} : {
|
60
60
|
context: TClientContext;
|
61
61
|
}) & {
|
62
|
-
[P in keyof MutationObserverOptions<TOutput, TError, TInput>]: MaybeRefDeep<MutationObserverOptions<TOutput, TError, TInput>[P]>;
|
62
|
+
[P in keyof MutationObserverOptions<TOutput, TError, TInput, TMutationContext>]: MaybeRefDeep<MutationObserverOptions<TOutput, TError, TInput, TMutationContext>[P]>;
|
63
63
|
} & {
|
64
64
|
shallow?: MaybeRef<boolean>;
|
65
65
|
};
|
@@ -71,9 +71,9 @@ interface MutationOptionsBase<TInput, TOutput, TError extends Error> {
|
|
71
71
|
|
72
72
|
interface ProcedureUtils<TClientContext extends ClientContext, TInput, TOutput, TError extends Error> {
|
73
73
|
call: Client<TClientContext, TInput, TOutput, TError>;
|
74
|
-
queryOptions<U, USelectData = TOutput>(...rest: MaybeOptionalOptions<U & QueryOptionsIn<TClientContext, TInput, TOutput, TError, USelectData>>): NoInfer<U & QueryOptionsBase<TOutput, TError>>;
|
75
|
-
infiniteOptions<U, UPageParam, USelectData = InfiniteData<TOutput, UPageParam>>(options: U & InfiniteOptionsIn<TClientContext, TInput, TOutput, TError, USelectData, UPageParam>): NoInfer<U & InfiniteOptionsBase<TOutput, TError, UPageParam>>;
|
76
|
-
mutationOptions<U>(...rest: MaybeOptionalOptions<U & MutationOptionsIn<TClientContext, TInput, TOutput, TError>>): NoInfer<U & MutationOptionsBase<TInput, TOutput, TError>>;
|
74
|
+
queryOptions<U, USelectData = TOutput>(...rest: MaybeOptionalOptions<U & QueryOptionsIn<TClientContext, TInput, TOutput, TError, USelectData>>): NoInfer<U & Omit<QueryOptionsBase<TOutput, TError>, keyof U>>;
|
75
|
+
infiniteOptions<U, UPageParam, USelectData = InfiniteData<TOutput, UPageParam>>(options: U & InfiniteOptionsIn<TClientContext, TInput, TOutput, TError, USelectData, UPageParam>): NoInfer<U & Omit<InfiniteOptionsBase<TOutput, TError, UPageParam>, keyof U>>;
|
76
|
+
mutationOptions<U, UMutationContext>(...rest: MaybeOptionalOptions<U & MutationOptionsIn<TClientContext, TInput, TOutput, TError, UMutationContext>>): NoInfer<U & Omit<MutationOptionsBase<TInput, TOutput, TError>, keyof U>>;
|
77
77
|
}
|
78
78
|
declare function createProcedureUtils<TClientContext extends ClientContext, TInput, TOutput, TError extends Error>(client: Client<TClientContext, TInput, TOutput, TError>, path: string[]): ProcedureUtils<TClientContext, TInput, TOutput, TError>;
|
79
79
|
|
package/dist/index.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { ClientContext, Client, NestedClient } from '@orpc/client';
|
2
|
-
import { QueryKey, QueryObserverOptions,
|
2
|
+
import { QueryKey, QueryObserverOptions, QueryFunctionContext, UseInfiniteQueryOptions, MutationObserverOptions, InfiniteData } from '@tanstack/vue-query';
|
3
3
|
import { PartialDeep, AnyFunction, SetOptional, MaybeOptionalOptions } from '@orpc/shared';
|
4
4
|
import { MaybeRef, MaybeRefOrGetter, ComputedRef } from 'vue';
|
5
5
|
|
@@ -33,9 +33,9 @@ type QueryOptionsIn<TClientContext extends ClientContext, TInput, TOutput, TErro
|
|
33
33
|
}) & {
|
34
34
|
[P in keyof Omit<QueryObserverOptions<TOutput, TError, TSelectData, TOutput>, 'queryKey' | 'enabled'>]: MaybeRefDeep<QueryObserverOptions<TOutput, TError, TSelectData, TOutput>[P]>;
|
35
35
|
} & {
|
36
|
-
enabled?: MaybeRefOrGetter<
|
37
|
-
queryKey?: MaybeRefDeep<
|
38
|
-
shallow?: boolean
|
36
|
+
enabled?: MaybeRefOrGetter<QueryObserverOptions<TOutput, TError, TSelectData, TOutput>['enabled']>;
|
37
|
+
queryKey?: MaybeRefDeep<QueryObserverOptions<TOutput, TError, TSelectData, TOutput>['queryKey']>;
|
38
|
+
shallow?: MaybeRef<boolean>;
|
39
39
|
};
|
40
40
|
interface QueryOptionsBase<TOutput, TError extends Error> {
|
41
41
|
queryKey: ComputedRef<QueryKey>;
|
@@ -54,12 +54,12 @@ interface InfiniteOptionsBase<TOutput, TError extends Error, TPageParam> {
|
|
54
54
|
queryFn(ctx: QueryFunctionContext<QueryKey, TPageParam>): Promise<TOutput>;
|
55
55
|
retry?(failureCount: number, error: TError): boolean;
|
56
56
|
}
|
57
|
-
type MutationOptionsIn<TClientContext extends ClientContext, TInput, TOutput, TError extends Error> = (Record<never, never> extends TClientContext ? {
|
57
|
+
type MutationOptionsIn<TClientContext extends ClientContext, TInput, TOutput, TError extends Error, TMutationContext> = (Record<never, never> extends TClientContext ? {
|
58
58
|
context?: TClientContext;
|
59
59
|
} : {
|
60
60
|
context: TClientContext;
|
61
61
|
}) & {
|
62
|
-
[P in keyof MutationObserverOptions<TOutput, TError, TInput>]: MaybeRefDeep<MutationObserverOptions<TOutput, TError, TInput>[P]>;
|
62
|
+
[P in keyof MutationObserverOptions<TOutput, TError, TInput, TMutationContext>]: MaybeRefDeep<MutationObserverOptions<TOutput, TError, TInput, TMutationContext>[P]>;
|
63
63
|
} & {
|
64
64
|
shallow?: MaybeRef<boolean>;
|
65
65
|
};
|
@@ -71,9 +71,9 @@ interface MutationOptionsBase<TInput, TOutput, TError extends Error> {
|
|
71
71
|
|
72
72
|
interface ProcedureUtils<TClientContext extends ClientContext, TInput, TOutput, TError extends Error> {
|
73
73
|
call: Client<TClientContext, TInput, TOutput, TError>;
|
74
|
-
queryOptions<U, USelectData = TOutput>(...rest: MaybeOptionalOptions<U & QueryOptionsIn<TClientContext, TInput, TOutput, TError, USelectData>>): NoInfer<U & QueryOptionsBase<TOutput, TError>>;
|
75
|
-
infiniteOptions<U, UPageParam, USelectData = InfiniteData<TOutput, UPageParam>>(options: U & InfiniteOptionsIn<TClientContext, TInput, TOutput, TError, USelectData, UPageParam>): NoInfer<U & InfiniteOptionsBase<TOutput, TError, UPageParam>>;
|
76
|
-
mutationOptions<U>(...rest: MaybeOptionalOptions<U & MutationOptionsIn<TClientContext, TInput, TOutput, TError>>): NoInfer<U & MutationOptionsBase<TInput, TOutput, TError>>;
|
74
|
+
queryOptions<U, USelectData = TOutput>(...rest: MaybeOptionalOptions<U & QueryOptionsIn<TClientContext, TInput, TOutput, TError, USelectData>>): NoInfer<U & Omit<QueryOptionsBase<TOutput, TError>, keyof U>>;
|
75
|
+
infiniteOptions<U, UPageParam, USelectData = InfiniteData<TOutput, UPageParam>>(options: U & InfiniteOptionsIn<TClientContext, TInput, TOutput, TError, USelectData, UPageParam>): NoInfer<U & Omit<InfiniteOptionsBase<TOutput, TError, UPageParam>, keyof U>>;
|
76
|
+
mutationOptions<U, UMutationContext>(...rest: MaybeOptionalOptions<U & MutationOptionsIn<TClientContext, TInput, TOutput, TError, UMutationContext>>): NoInfer<U & Omit<MutationOptionsBase<TInput, TOutput, TError>, keyof U>>;
|
77
77
|
}
|
78
78
|
declare function createProcedureUtils<TClientContext extends ClientContext, TInput, TOutput, TError extends Error>(client: Client<TClientContext, TInput, TOutput, TError>, path: string[]): ProcedureUtils<TClientContext, TInput, TOutput, TError>;
|
79
79
|
|
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.45.1",
|
5
5
|
"license": "MIT",
|
6
6
|
"homepage": "https://orpc.unnoq.com",
|
7
7
|
"repository": {
|
@@ -29,10 +29,10 @@
|
|
29
29
|
"peerDependencies": {
|
30
30
|
"@tanstack/vue-query": ">=5.50.0",
|
31
31
|
"vue": ">=3.3.0",
|
32
|
-
"@orpc/client": "0.
|
32
|
+
"@orpc/client": "0.45.1"
|
33
33
|
},
|
34
34
|
"dependencies": {
|
35
|
-
"@orpc/shared": "0.
|
35
|
+
"@orpc/shared": "0.45.1"
|
36
36
|
},
|
37
37
|
"scripts": {
|
38
38
|
"build": "unbuild",
|