@orpc/vue-query 0.0.0-next.9b3a030 → 0.0.0-next.a2e4a58
Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,4 @@
|
|
1
|
-
import type {
|
1
|
+
import type { Client } from '@orpc/contract';
|
2
2
|
import type { IsEqual } from '@orpc/shared';
|
3
3
|
import type { InfiniteOptionsBase, InfiniteOptionsExtra, MutationOptionsBase, MutationOptionsExtra, QueryOptionsBase, QueryOptionsExtra } from './types';
|
4
4
|
/**
|
@@ -9,5 +9,5 @@ export interface ProcedureUtils<TClientContext, TInput, TOutput, TError extends
|
|
9
9
|
infiniteOptions: <U extends InfiniteOptionsExtra<TClientContext, TInput, TOutput, TError, any>>(options: U) => Omit<InfiniteOptionsBase<TInput, TOutput, TError>, keyof U> & U;
|
10
10
|
mutationOptions: <U extends MutationOptionsExtra<TClientContext, TInput, TOutput, TError>>(...opt: [options: U] | (undefined extends TClientContext ? [] : never)) => IsEqual<U, MutationOptionsExtra<TClientContext, TInput, TOutput, TError>> extends true ? MutationOptionsBase<TInput, TOutput, TError> : Omit<MutationOptionsBase<TInput, TOutput, TError>, keyof U> & U;
|
11
11
|
}
|
12
|
-
export declare function createProcedureUtils<TClientContext, TInput, TOutput, TError extends Error>(client:
|
12
|
+
export declare function createProcedureUtils<TClientContext, TInput, TOutput, TError extends Error>(client: Client<TClientContext, TInput, TOutput, TError>, path: string[]): ProcedureUtils<TClientContext, TInput, TOutput, TError>;
|
13
13
|
//# sourceMappingURL=utils-procedure.d.ts.map
|
@@ -1,12 +1,12 @@
|
|
1
|
-
import type {
|
1
|
+
import type { Client, NestedClient } from '@orpc/contract';
|
2
2
|
import { type GeneralUtils } from './utils-general';
|
3
3
|
import { type ProcedureUtils } from './utils-procedure';
|
4
|
-
export type RouterUtils<T extends
|
5
|
-
[K in keyof T]: T[K] extends
|
4
|
+
export type RouterUtils<T extends NestedClient<any>> = T extends Client<infer TClientContext, infer UInput, infer UOutput, infer UError> ? ProcedureUtils<TClientContext, UInput, UOutput, UError> & GeneralUtils<UInput> : {
|
5
|
+
[K in keyof T]: T[K] extends NestedClient<any> ? RouterUtils<T[K]> : never;
|
6
6
|
} & GeneralUtils<unknown>;
|
7
7
|
/**
|
8
8
|
* @param client - The client create form `@orpc/client`
|
9
9
|
* @param path - The base path for query key
|
10
10
|
*/
|
11
|
-
export declare function createRouterUtils<T extends
|
11
|
+
export declare function createRouterUtils<T extends NestedClient<any>>(client: T, path?: string[]): RouterUtils<T>;
|
12
12
|
//# sourceMappingURL=utils-router.d.ts.map
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@orpc/vue-query",
|
3
3
|
"type": "module",
|
4
|
-
"version": "0.0.0-next.
|
4
|
+
"version": "0.0.0-next.a2e4a58",
|
5
5
|
"license": "MIT",
|
6
6
|
"homepage": "https://orpc.unnoq.com",
|
7
7
|
"repository": {
|
@@ -34,9 +34,8 @@
|
|
34
34
|
"peerDependencies": {
|
35
35
|
"@tanstack/vue-query": ">=5.50.0",
|
36
36
|
"vue": ">=3.3.0",
|
37
|
-
"@orpc/client": "0.0.0-next.
|
38
|
-
"@orpc/contract": "0.0.0-next.
|
39
|
-
"@orpc/server": "0.0.0-next.9b3a030"
|
37
|
+
"@orpc/client": "0.0.0-next.a2e4a58",
|
38
|
+
"@orpc/contract": "0.0.0-next.a2e4a58"
|
40
39
|
},
|
41
40
|
"scripts": {
|
42
41
|
"build": "tsup --clean --sourcemap --entry.index=src/index.ts --format=esm --onSuccess='tsc -b --noCheck'",
|