@trpc/react-query 11.0.0-alpha-tmp-workflow-merge.250 → 11.0.0-alpha-tmp-01-26-rootconfigtypes.261
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/bundle-analysis.json +36 -36
- package/dist/createTRPCQueryUtils.d.ts +1 -1
- package/dist/createTRPCQueryUtils.d.ts.map +1 -1
- package/dist/createTRPCQueryUtils.js +1 -1
- package/dist/createTRPCQueryUtils.mjs +1 -1
- package/dist/createTRPCReact.d.ts +19 -19
- package/dist/createTRPCReact.d.ts.map +1 -1
- package/dist/createTRPCReact.js +2 -2
- package/dist/createTRPCReact.mjs +1 -1
- package/dist/internals/context.d.ts +1 -1
- package/dist/internals/context.d.ts.map +1 -1
- package/dist/internals/getQueryKey.d.ts +7 -7
- package/dist/internals/getQueryKey.d.ts.map +1 -1
- package/dist/internals/useQueries.d.ts +1 -1
- package/dist/internals/useQueries.d.ts.map +1 -1
- package/dist/server/ssgProxy.d.ts +7 -7
- package/dist/server/ssgProxy.d.ts.map +1 -1
- package/dist/server/ssgProxy.js +4 -4
- package/dist/server/ssgProxy.mjs +1 -1
- package/dist/shared/hooks/createHooksInternal.d.ts +1 -1
- package/dist/shared/hooks/createHooksInternal.d.ts.map +1 -1
- package/dist/shared/hooks/types.d.ts +1 -1
- package/dist/shared/hooks/types.d.ts.map +1 -1
- package/dist/shared/polymorphism/mutationLike.d.ts +4 -4
- package/dist/shared/polymorphism/mutationLike.d.ts.map +1 -1
- package/dist/shared/polymorphism/queryLike.d.ts +5 -5
- package/dist/shared/polymorphism/queryLike.d.ts.map +1 -1
- package/dist/shared/polymorphism/routerLike.d.ts +4 -4
- package/dist/shared/polymorphism/routerLike.d.ts.map +1 -1
- package/dist/shared/polymorphism/utilsLike.d.ts +1 -1
- package/dist/shared/polymorphism/utilsLike.d.ts.map +1 -1
- package/dist/shared/proxy/decorationProxy.d.ts +1 -1
- package/dist/shared/proxy/decorationProxy.d.ts.map +1 -1
- package/dist/shared/proxy/decorationProxy.js +2 -2
- package/dist/shared/proxy/decorationProxy.mjs +1 -1
- package/dist/shared/proxy/useQueriesProxy.d.ts +5 -5
- package/dist/shared/proxy/useQueriesProxy.d.ts.map +1 -1
- package/dist/shared/proxy/useQueriesProxy.js +2 -2
- package/dist/shared/proxy/useQueriesProxy.mjs +1 -1
- package/dist/shared/proxy/utilsProxy.d.ts +13 -13
- package/dist/shared/proxy/utilsProxy.d.ts.map +1 -1
- package/dist/shared/proxy/utilsProxy.js +4 -4
- package/dist/shared/proxy/utilsProxy.mjs +1 -1
- package/dist/shared/types.d.ts +1 -1
- package/dist/shared/types.d.ts.map +1 -1
- package/dist/utils/createUtilityFunctions.d.ts +1 -1
- package/dist/utils/createUtilityFunctions.d.ts.map +1 -1
- package/dist/utils/inferReactQueryProcedure.d.ts +6 -6
- package/dist/utils/inferReactQueryProcedure.d.ts.map +1 -1
- package/package.json +6 -7
- package/src/createTRPCQueryUtils.tsx +1 -1
- package/src/createTRPCReact.tsx +46 -46
- package/src/internals/context.tsx +4 -1
- package/src/internals/getQueryKey.ts +10 -10
- package/src/internals/useQueries.ts +4 -1
- package/src/server/ssgProxy.ts +15 -15
- package/src/shared/hooks/createHooksInternal.tsx +1 -1
- package/src/shared/hooks/types.ts +4 -1
- package/src/shared/polymorphism/mutationLike.ts +7 -7
- package/src/shared/polymorphism/queryLike.ts +9 -9
- package/src/shared/polymorphism/routerLike.ts +7 -7
- package/src/shared/polymorphism/utilsLike.ts +1 -1
- package/src/shared/proxy/decorationProxy.ts +2 -2
- package/src/shared/proxy/useQueriesProxy.ts +17 -17
- package/src/shared/proxy/utilsProxy.ts +28 -25
- package/src/shared/types.ts +4 -1
- package/src/utils/createUtilityFunctions.ts +1 -1
- package/src/utils/inferReactQueryProcedure.ts +24 -18
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { DefinedUseQueryResult, DehydratedState, InfiniteData, InfiniteQueryObserverSuccessResult, InitialDataFunction, QueryObserverSuccessResult, QueryOptions, UseBaseQueryOptions, UseInfiniteQueryOptions, UseInfiniteQueryResult, UseMutationOptions, UseMutationResult, UseQueryResult, UseSuspenseInfiniteQueryOptions, UseSuspenseInfiniteQueryResult, UseSuspenseQueryOptions, UseSuspenseQueryResult } from '@tanstack/react-query';
|
|
2
2
|
import type { CreateTRPCClientOptions, TRPCRequestOptions, TRPCUntypedClient } from '@trpc/client';
|
|
3
|
-
import type { AnyRouter, DistributiveOmit } from '@trpc/core';
|
|
3
|
+
import type { AnyRouter, DistributiveOmit } from '@trpc/server/unstable-core-do-not-import';
|
|
4
4
|
import type { ReactNode } from 'react';
|
|
5
5
|
import type { TRPCContextProps } from '../../internals/context';
|
|
6
6
|
import type { TRPCQueryKey } from '../../internals/getQueryKey';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/shared/hooks/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EACrB,eAAe,EACf,YAAY,EACZ,kCAAkC,EAClC,mBAAmB,EACnB,0BAA0B,EAC1B,YAAY,EACZ,mBAAmB,EACnB,uBAAuB,EACvB,sBAAsB,EACtB,kBAAkB,EAClB,iBAAiB,EACjB,cAAc,EACd,+BAA+B,EAC/B,8BAA8B,EAC9B,uBAAuB,EACvB,sBAAsB,EACvB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EACV,uBAAuB,EACvB,kBAAkB,EAClB,iBAAiB,EAClB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/shared/hooks/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EACrB,eAAe,EACf,YAAY,EACZ,kCAAkC,EAClC,mBAAmB,EACnB,0BAA0B,EAC1B,YAAY,EACZ,mBAAmB,EACnB,uBAAuB,EACvB,sBAAsB,EACtB,kBAAkB,EAClB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K,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,IACnE,cAAc,GAAG,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type { AnyProcedure,
|
|
1
|
+
import type { AnyProcedure, AnyRootTypes, inferProcedureInput, inferTransformedProcedureOutput } from '@trpc/server/unstable-core-do-not-import';
|
|
2
2
|
import type { InferMutationOptions, InferMutationResult } from '../../utils/inferReactQueryProcedure';
|
|
3
3
|
/**
|
|
4
4
|
* Use to describe a mutation route which matches a given mutation procedure's interface
|
|
5
5
|
*/
|
|
6
|
-
export type MutationLike<
|
|
7
|
-
useMutation: (opts?: InferMutationOptions<
|
|
6
|
+
export type MutationLike<TRoot extends AnyRootTypes, TProcedure extends AnyProcedure> = {
|
|
7
|
+
useMutation: (opts?: InferMutationOptions<TRoot, TProcedure>) => InferMutationResult<TRoot, TProcedure>;
|
|
8
8
|
};
|
|
9
9
|
/**
|
|
10
10
|
* Use to unwrap a MutationLike's input
|
|
@@ -13,5 +13,5 @@ export type InferMutationLikeInput<TMutationLike extends MutationLike<any, any>>
|
|
|
13
13
|
/**
|
|
14
14
|
* Use to unwrap a MutationLike's data output
|
|
15
15
|
*/
|
|
16
|
-
export type InferMutationLikeData<TMutationLike extends MutationLike<any, any>> = TMutationLike extends MutationLike<infer
|
|
16
|
+
export type InferMutationLikeData<TMutationLike extends MutationLike<any, any>> = TMutationLike extends MutationLike<infer TRoot, infer TProcedure> ? inferTransformedProcedureOutput<TRoot, TProcedure> : never;
|
|
17
17
|
//# sourceMappingURL=mutationLike.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mutationLike.d.ts","sourceRoot":"","sources":["../../../src/shared/polymorphism/mutationLike.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EACZ,
|
|
1
|
+
{"version":3,"file":"mutationLike.d.ts","sourceRoot":"","sources":["../../../src/shared/polymorphism/mutationLike.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EACZ,YAAY,EACZ,mBAAmB,EACnB,+BAA+B,EAChC,MAAM,0CAA0C,CAAC;AAClD,OAAO,KAAK,EACV,oBAAoB,EACpB,mBAAmB,EACpB,MAAM,sCAAsC,CAAC;AAE9C;;GAEG;AACH,MAAM,MAAM,YAAY,CACtB,KAAK,SAAS,YAAY,EAC1B,UAAU,SAAS,YAAY,IAC7B;IACF,WAAW,EAAE,CACX,IAAI,CAAC,EAAE,oBAAoB,CAAC,KAAK,EAAE,UAAU,CAAC,KAC3C,mBAAmB,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;CAC7C,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,sBAAsB,CAChC,aAAa,SAAS,YAAY,CAAC,GAAG,EAAE,GAAG,CAAC,IAC1C,aAAa,SAAS,YAAY,CAAC,GAAG,EAAE,MAAM,UAAU,CAAC,GACzD,mBAAmB,CAAC,UAAU,CAAC,GAC/B,KAAK,CAAC;AAEV;;GAEG;AACH,MAAM,MAAM,qBAAqB,CAC/B,aAAa,SAAS,YAAY,CAAC,GAAG,EAAE,GAAG,CAAC,IAC1C,aAAa,SAAS,YAAY,CAAC,MAAM,KAAK,EAAE,MAAM,UAAU,CAAC,GACjE,+BAA+B,CAAC,KAAK,EAAE,UAAU,CAAC,GAClD,KAAK,CAAC"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import type { TRPCClientErrorLike } from '@trpc/client';
|
|
2
|
-
import type { AnyProcedure,
|
|
2
|
+
import type { AnyProcedure, AnyRootTypes, inferProcedureInput, inferProcedureOutput, inferTransformedProcedureOutput } from '@trpc/server/unstable-core-do-not-import';
|
|
3
3
|
import type { InferQueryOptions, InferQueryResult } from '../../utils/inferReactQueryProcedure';
|
|
4
4
|
import type { UseTRPCSuspenseQueryResult } from '../hooks/types';
|
|
5
5
|
/**
|
|
6
6
|
* Use to request a query route which matches a given query procedure's interface
|
|
7
7
|
*/
|
|
8
|
-
export type QueryLike<
|
|
9
|
-
useQuery: (variables: inferProcedureInput<TProcedure>, opts?: InferQueryOptions<
|
|
10
|
-
useSuspenseQuery: (variables: inferProcedureInput<TProcedure>, opts?: InferQueryOptions<
|
|
8
|
+
export type QueryLike<TRoot extends AnyRootTypes, TProcedure extends AnyProcedure> = {
|
|
9
|
+
useQuery: (variables: inferProcedureInput<TProcedure>, opts?: InferQueryOptions<TRoot, TProcedure, any>) => InferQueryResult<TRoot, TProcedure>;
|
|
10
|
+
useSuspenseQuery: (variables: inferProcedureInput<TProcedure>, opts?: InferQueryOptions<TRoot, TProcedure, any>) => UseTRPCSuspenseQueryResult<inferProcedureOutput<TProcedure>, TRPCClientErrorLike<TRoot>>;
|
|
11
11
|
};
|
|
12
12
|
/**
|
|
13
13
|
* Use to unwrap a QueryLike's input
|
|
@@ -16,5 +16,5 @@ export type InferQueryLikeInput<TQueryLike extends QueryLike<any, any>> = TQuery
|
|
|
16
16
|
/**
|
|
17
17
|
* Use to unwrap a QueryLike's data output
|
|
18
18
|
*/
|
|
19
|
-
export type InferQueryLikeData<TQueryLike extends QueryLike<any, any>> = TQueryLike extends QueryLike<infer
|
|
19
|
+
export type InferQueryLikeData<TQueryLike extends QueryLike<any, any>> = TQueryLike extends QueryLike<infer TRoot, infer TProcedure> ? inferTransformedProcedureOutput<TRoot, TProcedure> : never;
|
|
20
20
|
//# sourceMappingURL=queryLike.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queryLike.d.ts","sourceRoot":"","sources":["../../../src/shared/polymorphism/queryLike.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,KAAK,EACV,YAAY,EACZ,
|
|
1
|
+
{"version":3,"file":"queryLike.d.ts","sourceRoot":"","sources":["../../../src/shared/polymorphism/queryLike.ts"],"names":[],"mappings":"AAAA,OAAO,KAA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AAK,CAAC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import type { AnyMutationProcedure, AnyProcedure, AnyQueryProcedure,
|
|
1
|
+
import type { AnyMutationProcedure, AnyProcedure, AnyQueryProcedure, AnyRootTypes, AnyRouter } from '@trpc/server/unstable-core-do-not-import';
|
|
2
2
|
import type { MutationLike } from './mutationLike';
|
|
3
3
|
import type { QueryLike } from './queryLike';
|
|
4
4
|
/**
|
|
5
5
|
* Use to describe a route path which matches a given route's interface
|
|
6
6
|
*/
|
|
7
|
-
export type RouterLike<TRouter extends AnyRouter> = RouterLikeInner<TRouter['_def']['_config'], TRouter['_def']['procedures']>;
|
|
8
|
-
export type RouterLikeInner<
|
|
9
|
-
[TKey in keyof TProcedures]: TProcedures[TKey] extends AnyRouter ? RouterLikeInner<
|
|
7
|
+
export type RouterLike<TRouter extends AnyRouter> = RouterLikeInner<TRouter['_def']['_config']['$types'], TRouter['_def']['procedures']>;
|
|
8
|
+
export type RouterLikeInner<TRoot extends AnyRootTypes, TProcedures extends AnyProcedure> = {
|
|
9
|
+
[TKey in keyof TProcedures]: TProcedures[TKey] extends AnyRouter ? RouterLikeInner<TRoot, TProcedures[TKey]['_def']['record']> : TProcedures[TKey] extends AnyQueryProcedure ? QueryLike<TRoot, TProcedures[TKey]> : TProcedures[TKey] extends AnyMutationProcedure ? MutationLike<TRoot, TProcedures[TKey]> : never;
|
|
10
10
|
};
|
|
11
11
|
//# sourceMappingURL=routerLike.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routerLike.d.ts","sourceRoot":"","sources":["../../../src/shared/polymorphism/routerLike.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,oBAAoB,EACpB,YAAY,EACZ,iBAAiB,EACjB,
|
|
1
|
+
{"version":3,"file":"routerLike.d.ts","sourceRoot":"","sources":["../../../src/shared/polymorphism/routerLike.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,oBAAoB,EACpB,YAAY,EACZ,iBAAiB,EACjB,YAAY,EACZ,SAAS,EACV,MAAM,0CAA0C,CAAC;AAClD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C;;GAEG;AACH,MAAM,MAAM,UAAU,CAAC,OAAO,SAAS,SAAS,IAAI,eAAe,CACjE,OAAO,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,EACpC,OAAO,CAAC,MAAM,CAAC,CAAC,YAAY,CAAC,CAC9B,CAAC;AACF,MAAM,MAAM,eAAe,CACzB,KAAK,SAAS,YAAY,EAC1B,WAAW,SAAS,YAAY,IAC9B;KACD,IAAI,IAAI,MAAM,WAAW,GAAG,WAAW,CAAC,IAAI,CAAC,SAAS,SAAS,GAC5D,eAAe,CAAC,KAAK,EAAE,WAAW,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,CAAC,GAC3D,WAAW,CAAC,IAAI,CAAC,SAAS,iBAAiB,GAC3C,SAAS,CAAC,KAAK,EAAE,WAAW,CAAC,IAAI,CAAC,CAAC,GACnC,WAAW,CAAC,IAAI,CAAC,SAAS,oBAAoB,GAC9C,YAAY,CAAC,KAAK,EAAE,WAAW,CAAC,IAAI,CAAC,CAAC,GACtC,KAAK;CACV,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AnyRouter } from '@trpc/core';
|
|
1
|
+
import type { AnyRouter } from '@trpc/server/unstable-core-do-not-import';
|
|
2
2
|
import type { DecoratedProcedureUtilsRecord } from '../proxy/utilsProxy';
|
|
3
3
|
/**
|
|
4
4
|
* Use to describe a Utils/Context path which matches the given route's interface
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utilsLike.d.ts","sourceRoot":"","sources":["../../../src/shared/polymorphism/utilsLike.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"utilsLike.d.ts","sourceRoot":"","sources":["../../../src/shared/polymorphism/utilsLike.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0CAA0C,CAAC;AAC1E,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,qBAAqB,CAAC;AAEzE;;GAEG;AACH,MAAM,MAAM,SAAS,CAAC,OAAO,SAAS,SAAS,IAC7C,6BAA6B,CAAC,OAAO,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decorationProxy.d.ts","sourceRoot":"","sources":["../../../src/shared/proxy/decorationProxy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"decorationProxy.d.ts","sourceRoot":"","sources":["../../../src/shared/proxy/decorationProxy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0CAA0C,CAAC;AAE1E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAE1E;;;GAGG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,SAAS,SAAS,EACzB,WAAW,GAAG,OAAO,EACrB,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,qBAAqB,CAAC,OAAO,EAAE,WAAW,CAAC,WAuBjE"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var unstableCoreDoNotImport = require('@trpc/server/unstable-core-do-not-import');
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Create proxy for decorating procedures
|
|
7
7
|
* @internal
|
|
8
8
|
*/ function createReactDecoration(name, hooks) {
|
|
9
|
-
return
|
|
9
|
+
return unstableCoreDoNotImport.createRecursiveProxy(({ path , args })=>{
|
|
10
10
|
const pathCopy = [
|
|
11
11
|
name,
|
|
12
12
|
...path
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import type { TRPCClientError, TRPCUntypedClient } from '@trpc/client';
|
|
2
|
-
import type { AnyProcedure, AnyQueryProcedure,
|
|
2
|
+
import type { AnyProcedure, AnyQueryProcedure, AnyRootTypes, AnyRouter, Filter, inferProcedureInput, inferTransformedProcedureOutput } from '@trpc/server/unstable-core-do-not-import';
|
|
3
3
|
import type { TrpcQueryOptionsForUseQueries, TrpcQueryOptionsForUseSuspenseQueries } from '../../internals/useQueries';
|
|
4
|
-
type GetQueryOptions<
|
|
4
|
+
type GetQueryOptions<TRoot extends AnyRootTypes, TProcedure extends AnyProcedure> = <TData = inferTransformedProcedureOutput<TRoot, TProcedure>>(input: inferProcedureInput<TProcedure>, opts?: TrpcQueryOptionsForUseQueries<inferTransformedProcedureOutput<TRoot, TProcedure>, TData, TRPCClientError<TRoot>>) => TrpcQueryOptionsForUseQueries<inferTransformedProcedureOutput<TRoot, TProcedure>, TData, TRPCClientError<TRoot>>;
|
|
5
5
|
/**
|
|
6
6
|
* @internal
|
|
7
7
|
*/
|
|
8
8
|
export type UseQueriesProcedureRecord<TRouter extends AnyRouter> = {
|
|
9
|
-
[TKey in keyof Filter<TRouter['_def']['record'], AnyQueryProcedure | AnyRouter>]: TRouter['_def']['record'][TKey] extends AnyRouter ? UseQueriesProcedureRecord<TRouter['_def']['record'][TKey]> : GetQueryOptions<TRouter['_def']['_config'], TRouter['_def']['record'][TKey]>;
|
|
9
|
+
[TKey in keyof Filter<TRouter['_def']['record'], AnyQueryProcedure | AnyRouter>]: TRouter['_def']['record'][TKey] extends AnyRouter ? UseQueriesProcedureRecord<TRouter['_def']['record'][TKey]> : GetQueryOptions<TRouter['_def']['_config']['$types'], TRouter['_def']['record'][TKey]>;
|
|
10
10
|
};
|
|
11
|
-
type GetSuspenseQueryOptions<
|
|
11
|
+
type GetSuspenseQueryOptions<TRoot extends AnyRootTypes, TProcedure extends AnyProcedure> = <TData = inferTransformedProcedureOutput<TRoot, TProcedure>>(input: inferProcedureInput<TProcedure>, opts?: TrpcQueryOptionsForUseSuspenseQueries<inferTransformedProcedureOutput<TRoot, TProcedure>, TData, TRPCClientError<TRoot>>) => TrpcQueryOptionsForUseSuspenseQueries<inferTransformedProcedureOutput<TRoot, TProcedure>, TData, TRPCClientError<TRoot>>;
|
|
12
12
|
/**
|
|
13
13
|
* @internal
|
|
14
14
|
*/
|
|
15
15
|
export type UseSuspenseQueriesProcedureRecord<TRouter extends AnyRouter> = {
|
|
16
|
-
[TKey in keyof Filter<TRouter['_def']['record'], AnyQueryProcedure | AnyRouter>]: TRouter['_def']['record'][TKey] extends AnyRouter ? UseSuspenseQueriesProcedureRecord<TRouter['_def']['record'][TKey]> : GetSuspenseQueryOptions<TRouter['_def']['_config'], TRouter['_def']['record'][TKey]>;
|
|
16
|
+
[TKey in keyof Filter<TRouter['_def']['record'], AnyQueryProcedure | AnyRouter>]: TRouter['_def']['record'][TKey] extends AnyRouter ? UseSuspenseQueriesProcedureRecord<TRouter['_def']['record'][TKey]> : GetSuspenseQueryOptions<TRouter['_def']['_config']['$types'], TRouter['_def']['record'][TKey]>;
|
|
17
17
|
};
|
|
18
18
|
/**
|
|
19
19
|
* Create proxy for `useQueries` options
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useQueriesProxy.d.ts","sourceRoot":"","sources":["../../../src/shared/proxy/useQueriesProxy.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACvE,OAAO,KAAK,EACV,YAAY,EACZ,iBAAiB,EACjB,
|
|
1
|
+
{"version":3,"file":"useQueriesProxy.d.ts","sourceRoot":"","sources":["../../../src/shared/proxy/useQueriesProxy.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACvE,OAAO,KAAK,EACV,YAAY,EACZ,iBAAiB,EACjB,YAAY,E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AAmB,CAAC,UAAU,CAAC,EACtC,IAAI,CAAC,EAAE,qCAAqC,CAC1C,+BAA+B,CAAC,KAAK,EAAE,UAAU,CAAC,EAClD,KAAK,EACL,eAAe,CAAC,KAAK,CAAC,CACvB,KACE,qCAAqC,CACxC,+BAA+B,CAAC,KAAK,EAAE,UAAU,CAAC,EAClD,KAAK,EACL,eAAe,CAAC,KAAK,CAAC,CACvB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,iCAAiC,CAAC,OAAO,SAAS,SAAS,IAAI;KACxE,IAAI,IAAI,MAAM,MAAM,CACnB,OAAO,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,EACzB,iBAAiB,GAAG,SAAS,CAC9B,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GACjD,iCAAiC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,GAClE,uBAAuB,CACrB,OAAO,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,EACpC,OAAO,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,CAChC;CACN,CAAC;AAEF;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,SAAS,SAAS,EACxD,MAAM,EAAE,iBAAiB,CAAC,OAAO,CAAC,sCAoBnC"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var unstableCoreDoNotImport = require('@trpc/server/unstable-core-do-not-import');
|
|
4
4
|
var getQueryKey = require('../../internals/getQueryKey.js');
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Create proxy for `useQueries` options
|
|
8
8
|
* @internal
|
|
9
9
|
*/ function createUseQueries(client) {
|
|
10
|
-
return
|
|
10
|
+
return unstableCoreDoNotImport.createRecursiveProxy((opts)=>{
|
|
11
11
|
const arrayPath = opts.path;
|
|
12
12
|
const dotPath = arrayPath.join('.');
|
|
13
13
|
const [input, _opts] = opts.args;
|
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
import type { CancelOptions, InfiniteData, InvalidateOptions, InvalidateQueryFilters, Query, RefetchOptions, RefetchQueryFilters, ResetOptions, SetDataOptions, Updater } from '@tanstack/react-query';
|
|
2
2
|
import type { TRPCClientError } from '@trpc/client';
|
|
3
|
-
import type { AnyQueryProcedure,
|
|
3
|
+
import type { AnyQueryProcedure, AnyRootTypes, AnyRouter, DeepPartial, Filter, inferProcedureInput, inferTransformedProcedureOutput, ProtectedIntersection } from '@trpc/server/unstable-core-do-not-import';
|
|
4
4
|
import type { DecoratedTRPCContextProps, TRPCContextState, TRPCFetchInfiniteQueryOptions, TRPCFetchQueryOptions, TRPCQueryUtils } from '../../internals/context';
|
|
5
5
|
import type { QueryKeyKnown, QueryType } from '../../internals/getQueryKey';
|
|
6
6
|
import type { ExtractCursorType } from '../hooks/types';
|
|
7
|
-
type DecorateProcedure<
|
|
7
|
+
type DecorateProcedure<TRoot extends AnyRootTypes, TProcedure extends AnyQueryProcedure> = {
|
|
8
8
|
/**
|
|
9
9
|
* @link https://tanstack.com/query/v5/docs/reference/QueryClient#queryclientfetchquery
|
|
10
10
|
*/
|
|
11
|
-
fetch(input: inferProcedureInput<TProcedure>, opts?: TRPCFetchQueryOptions<inferTransformedProcedureOutput<
|
|
11
|
+
fetch(input: inferProcedureInput<TProcedure>, opts?: TRPCFetchQueryOptions<inferTransformedProcedureOutput<TRoot, TProcedure>, TRPCClientError<TRoot>>): Promise<inferTransformedProcedureOutput<TRoot, TProcedure>>;
|
|
12
12
|
/**
|
|
13
13
|
* @link https://tanstack.com/query/v5/docs/reference/QueryClient#queryclientfetchinfinitequery
|
|
14
14
|
*/
|
|
15
|
-
fetchInfinite(input: inferProcedureInput<TProcedure>, opts?: TRPCFetchInfiniteQueryOptions<inferProcedureInput<TProcedure>, inferTransformedProcedureOutput<
|
|
15
|
+
fetchInfinite(input: inferProcedureInput<TProcedure>, opts?: TRPCFetchInfiniteQueryOptions<inferProcedureInput<TProcedure>, inferTransformedProcedureOutput<TRoot, TProcedure>, TRPCClientError<TRoot>>): Promise<InfiniteData<inferTransformedProcedureOutput<TRoot, TProcedure>, NonNullable<ExtractCursorType<inferProcedureInput<TProcedure>>> | null>>;
|
|
16
16
|
/**
|
|
17
17
|
* @link https://tanstack.com/query/v5/docs/reference/QueryClient#queryclientprefetchquery
|
|
18
18
|
*/
|
|
19
|
-
prefetch(input: inferProcedureInput<TProcedure>, opts?: TRPCFetchQueryOptions<inferTransformedProcedureOutput<
|
|
19
|
+
prefetch(input: inferProcedureInput<TProcedure>, opts?: TRPCFetchQueryOptions<inferTransformedProcedureOutput<TRoot, TProcedure>, TRPCClientError<TRoot>>): Promise<void>;
|
|
20
20
|
/**
|
|
21
21
|
* @link https://tanstack.com/query/v5/docs/reference/QueryClient#queryclientprefetchinfinitequery
|
|
22
22
|
*/
|
|
23
|
-
prefetchInfinite(input: inferProcedureInput<TProcedure>, opts?: TRPCFetchInfiniteQueryOptions<inferProcedureInput<TProcedure>, inferTransformedProcedureOutput<
|
|
23
|
+
prefetchInfinite(input: inferProcedureInput<TProcedure>, opts?: TRPCFetchInfiniteQueryOptions<inferProcedureInput<TProcedure>, inferTransformedProcedureOutput<TRoot, TProcedure>, TRPCClientError<TRoot>>): Promise<void>;
|
|
24
24
|
/**
|
|
25
25
|
* @link https://tanstack.com/query/v5/docs/react/reference/QueryClient#queryclientensurequerydata
|
|
26
26
|
*/
|
|
27
|
-
ensureData(input: inferProcedureInput<TProcedure>, opts?: TRPCFetchQueryOptions<inferTransformedProcedureOutput<
|
|
27
|
+
ensureData(input: inferProcedureInput<TProcedure>, opts?: TRPCFetchQueryOptions<inferTransformedProcedureOutput<TRoot, TProcedure>, TRPCClientError<TRoot>>): Promise<inferTransformedProcedureOutput<TRoot, TProcedure>>;
|
|
28
28
|
/**
|
|
29
29
|
* @link https://tanstack.com/query/v5/docs/reference/QueryClient#queryclientinvalidatequeries
|
|
30
30
|
*/
|
|
31
31
|
invalidate(input?: DeepPartial<inferProcedureInput<TProcedure>>, filters?: Omit<InvalidateQueryFilters, 'predicate'> & {
|
|
32
|
-
predicate?: (query: Query<inferProcedureInput<TProcedure>, TRPCClientError<
|
|
32
|
+
predicate?: (query: Query<inferProcedureInput<TProcedure>, TRPCClientError<TRoot>, inferProcedureInput<TProcedure>, QueryKeyKnown<inferProcedureInput<TProcedure>, inferProcedureInput<TProcedure> extends {
|
|
33
33
|
cursor?: any;
|
|
34
34
|
} | void ? 'infinite' : 'query'>>) => boolean;
|
|
35
35
|
}, options?: InvalidateOptions): Promise<void>;
|
|
@@ -52,19 +52,19 @@ type DecorateProcedure<TConfig extends AnyRootConfig, TProcedure extends AnyQuer
|
|
|
52
52
|
/**
|
|
53
53
|
* The input of the procedure
|
|
54
54
|
*/
|
|
55
|
-
input: inferProcedureInput<TProcedure>, updater: Updater<inferTransformedProcedureOutput<
|
|
55
|
+
input: inferProcedureInput<TProcedure>, updater: Updater<inferTransformedProcedureOutput<TRoot, TProcedure> | undefined, inferTransformedProcedureOutput<TRoot, TProcedure> | undefined>, options?: SetDataOptions): void;
|
|
56
56
|
/**
|
|
57
57
|
* @link https://tanstack.com/query/v5/docs/reference/QueryClient#queryclientsetquerydata
|
|
58
58
|
*/
|
|
59
|
-
setInfiniteData(input: inferProcedureInput<TProcedure>, updater: Updater<InfiniteData<inferTransformedProcedureOutput<
|
|
59
|
+
setInfiniteData(input: inferProcedureInput<TProcedure>, updater: Updater<InfiniteData<inferTransformedProcedureOutput<TRoot, TProcedure>, NonNullable<ExtractCursorType<inferProcedureInput<TProcedure>>> | null> | undefined, InfiniteData<inferTransformedProcedureOutput<TRoot, TProcedure>, NonNullable<ExtractCursorType<inferProcedureInput<TProcedure>>> | null> | undefined>, options?: SetDataOptions): void;
|
|
60
60
|
/**
|
|
61
61
|
* @link https://tanstack.com/query/v5/docs/reference/QueryClient#queryclientgetquerydata
|
|
62
62
|
*/
|
|
63
|
-
getData(input?: inferProcedureInput<TProcedure>): inferTransformedProcedureOutput<
|
|
63
|
+
getData(input?: inferProcedureInput<TProcedure>): inferTransformedProcedureOutput<TRoot, TProcedure> | undefined;
|
|
64
64
|
/**
|
|
65
65
|
* @link https://tanstack.com/query/v5/docs/reference/QueryClient#queryclientgetquerydata
|
|
66
66
|
*/
|
|
67
|
-
getInfiniteData(input?: inferProcedureInput<TProcedure>): InfiniteData<inferTransformedProcedureOutput<
|
|
67
|
+
getInfiniteData(input?: inferProcedureInput<TProcedure>): InfiniteData<inferTransformedProcedureOutput<TRoot, TProcedure>, NonNullable<ExtractCursorType<inferProcedureInput<TProcedure>>> | null> | undefined;
|
|
68
68
|
};
|
|
69
69
|
/**
|
|
70
70
|
* this is the type that is used to add in procedures that can be used on
|
|
@@ -82,7 +82,7 @@ type DecorateRouter = {
|
|
|
82
82
|
* @internal
|
|
83
83
|
*/
|
|
84
84
|
export type DecoratedProcedureUtilsRecord<TRouter extends AnyRouter> = DecorateRouter & {
|
|
85
|
-
[TKey in keyof Filter<TRouter['_def']['record'], AnyQueryProcedure | AnyRouter>]: TRouter['_def']['record'][TKey] extends AnyRouter ? DecoratedProcedureUtilsRecord<TRouter['_def']['record'][TKey]> & DecorateRouter : DecorateProcedure<TRouter['_def']['_config'], TRouter['_def']['record'][TKey]>;
|
|
85
|
+
[TKey in keyof Filter<TRouter['_def']['record'], AnyQueryProcedure | AnyRouter>]: TRouter['_def']['record'][TKey] extends AnyRouter ? DecoratedProcedureUtilsRecord<TRouter['_def']['record'][TKey]> & DecorateRouter : DecorateProcedure<TRouter['_def']['_config']['$types'], TRouter['_def']['record'][TKey]>;
|
|
86
86
|
};
|
|
87
87
|
type AnyDecoratedProcedure = DecorateProcedure<any, any>;
|
|
88
88
|
export type CreateReactUtils<TRouter extends AnyRouter, TSSRContext> = ProtectedIntersection<DecoratedTRPCContextProps<TRouter, TSSRContext>, DecoratedProcedureUtilsRecord<TRouter>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utilsProxy.d.ts","sourceRoot":"","sources":["../../../src/shared/proxy/utilsProxy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,YAAY,EACZ,iBAAiB,EACjB,sBAAsB,EACtB,KAAK,EACL,cAAc,EACd,mBAAmB,EACnB,YAAY,EACZ,cAAc,EACd,OAAO,EACR,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAEpD,OAAO,KAAK,EACV,iBAAiB,EACjB,
|
|
1
|
+
{"version":3,"file":"utilsProxy.d.ts","sourceRoot":"","sources":["../../../src/shared/proxy/utilsProxy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,YAAY,EACZ,iBAAiB,EACjB,sBAAsB,EACtB,KAAK,EACL,cAAc,EACd,mBAAmB,EACnB,YAAY,EACZ,cAAc,EACd,OAAO,EACR,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAEpD,OAAO,KAAK,EACV,iBAAiB,EACjB,YAAY,EACZ,SAAS,EACT,WAAW,EACX,MAAM,EACN,mBAAmB,EACnB,+BAA+B,EAC/B,qBAAqB,EACtB,MAAM,0CAA0C,CAAC;AAKlD,OAAO,KAAK,EACV,yBAAyB,EACzB,gBAAgB,EAChB,6BAA6B,EAC7B,qBAAqB,EACrB,cAAc,EACf,MAAM,yBAAyB,CAAC;AAEjC,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAE5E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAExD,KAAK,iBAAiB,CACpB,KAAK,SAAS,YAAY,EAC1B,UAAU,SAAS,iBAAiB,IAClC;IACF;;OAEG;IACH,KAAK,CACH,KAAK,EAAE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
var client = require('@trpc/client');
|
|
4
|
-
var
|
|
4
|
+
var unstableCoreDoNotImport = require('@trpc/server/unstable-core-do-not-import');
|
|
5
5
|
var context = require('../../internals/context.js');
|
|
6
6
|
var getQueryKey = require('../../internals/getQueryKey.js');
|
|
7
7
|
|
|
@@ -28,7 +28,7 @@ const getQueryType = (utilName)=>{
|
|
|
28
28
|
/**
|
|
29
29
|
* @internal
|
|
30
30
|
*/ function createRecursiveUtilsProxy(context, key) {
|
|
31
|
-
return
|
|
31
|
+
return unstableCoreDoNotImport.createRecursiveProxy((opts)=>{
|
|
32
32
|
const path = [
|
|
33
33
|
key,
|
|
34
34
|
...opts.path
|
|
@@ -65,7 +65,7 @@ const getQueryType = (utilName)=>{
|
|
|
65
65
|
/**
|
|
66
66
|
* @internal
|
|
67
67
|
*/ function createReactQueryUtils(context$1) {
|
|
68
|
-
return
|
|
68
|
+
return unstableCoreDoNotImport.createFlatProxy((key)=>{
|
|
69
69
|
const contextName = key;
|
|
70
70
|
if (contextName === 'client') {
|
|
71
71
|
return client.createTRPCClientProxy(context$1.client);
|
|
@@ -79,7 +79,7 @@ const getQueryType = (utilName)=>{
|
|
|
79
79
|
/**
|
|
80
80
|
* @internal
|
|
81
81
|
*/ function createQueryUtilsProxy(context) {
|
|
82
|
-
return
|
|
82
|
+
return unstableCoreDoNotImport.createFlatProxy((key)=>{
|
|
83
83
|
return createRecursiveUtilsProxy(context, key);
|
|
84
84
|
});
|
|
85
85
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createTRPCClientProxy } from '@trpc/client';
|
|
2
|
-
import { createFlatProxy, createRecursiveProxy } from '@trpc/core';
|
|
2
|
+
import { createFlatProxy, createRecursiveProxy } from '@trpc/server/unstable-core-do-not-import';
|
|
3
3
|
import { contextProps } from '../../internals/context.mjs';
|
|
4
4
|
import { getQueryKeyInternal } from '../../internals/getQueryKey.mjs';
|
|
5
5
|
|
package/dist/shared/types.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { QueryClient } from '@tanstack/react-query';
|
|
3
|
-
import type { AnyRouter, MaybePromise } from '@trpc/core';
|
|
3
|
+
import type { AnyRouter, MaybePromise } from '@trpc/server/unstable-core-do-not-import';
|
|
4
4
|
/**
|
|
5
5
|
* @internal
|
|
6
6
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/shared/types.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/shared/types.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,KAAK,EACV,SAAS,EACT,YAAY,EACb,MAAM,0CAA0C,CAAC;AAElD;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,SAAS,EAAE,CAAC,IAAI,EAAE;QAChB;;WAEG;QACH,UAAU,EAAE,MAAM,YAAY,CAAC,OAAO,CAAC,CAAC;QACxC,WAAW,EAAE,WAAW,CAAC;QACzB;;WAEG;QACH,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAC/B,KAAK,YAAY,CAAC,OAAO,CAAC,CAAC;CAC7B;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB,CAAC,QAAQ,SAAS,SAAS;IAChE;;OAEG;IACH,SAAS,CAAC,EAAE;QACV,WAAW,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC,CAAC;KAC5C,CAAC;IAEF;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB;;;OAGG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;CAC9B"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { QueryClient } from '@tanstack/react-query';
|
|
2
2
|
import type { CreateTRPCClient } from '@trpc/client';
|
|
3
3
|
import { TRPCUntypedClient } from '@trpc/client';
|
|
4
|
-
import type { AnyRouter } from '@trpc/core';
|
|
4
|
+
import type { AnyRouter } from '@trpc/server/unstable-core-do-not-import';
|
|
5
5
|
import type { TRPCQueryUtils } from '../shared';
|
|
6
6
|
export interface CreateQueryUtilsOptions<TRouter extends AnyRouter> {
|
|
7
7
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createUtilityFunctions.d.ts","sourceRoot":"","sources":["../../src/utils/createUtilityFunctions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAoB,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACnE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"createUtilityFunctions.d.ts","sourceRoot":"","sources":["../../src/utils/createUtilityFunctions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAoB,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACnE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0CAA0C,CAAC;AAE1E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAEhD,MAAM,WAAW,uBAAuB,CAAC,OAAO,SAAS,SAAS;IAChE;;OAEG;IACH,MAAM,EAAE,gBAAgB,CAAC,OAAO,CAAC,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC;IAC/D;;OAEG;IACH,WAAW,EAAE,WAAW,CAAC;CAC1B;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,SAAS,SAAS,EAC9D,IAAI,EAAE,uBAAuB,CAAC,OAAO,CAAC,GACrC,cAAc,CAAC,OAAO,CAAC,CA8GzB"}
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import type { TRPCClientErrorLike } from '@trpc/client';
|
|
2
|
-
import type { AnyMutationProcedure, AnyProcedure, AnyQueryProcedure,
|
|
2
|
+
import type { AnyMutationProcedure, AnyProcedure, AnyQueryProcedure, AnyRootTypes, AnyRouter, inferProcedureInput, inferTransformedProcedureOutput } from '@trpc/server/unstable-core-do-not-import';
|
|
3
3
|
import type { UseTRPCMutationOptions, UseTRPCMutationResult, UseTRPCQueryOptions, UseTRPCQueryResult } from '../shared';
|
|
4
4
|
/**
|
|
5
5
|
* @internal
|
|
6
6
|
*/
|
|
7
|
-
export type InferQueryOptions<
|
|
7
|
+
export type InferQueryOptions<TRoot extends AnyRootTypes, TProcedure extends AnyProcedure, TData = inferTransformedProcedureOutput<TRoot, TProcedure>> = Omit<UseTRPCQueryOptions<inferTransformedProcedureOutput<TRoot, TProcedure>, inferTransformedProcedureOutput<TRoot, TProcedure>, TRPCClientErrorLike<TRoot>, TData>, 'select'>;
|
|
8
8
|
/**
|
|
9
9
|
* @internal
|
|
10
10
|
*/
|
|
11
|
-
export type InferMutationOptions<
|
|
11
|
+
export type InferMutationOptions<TRoot extends AnyRootTypes, TProcedure extends AnyProcedure> = UseTRPCMutationOptions<inferProcedureInput<TProcedure>, TRPCClientErrorLike<TRoot>, inferTransformedProcedureOutput<TRoot, TProcedure>>;
|
|
12
12
|
/**
|
|
13
13
|
* @internal
|
|
14
14
|
*/
|
|
15
|
-
export type InferQueryResult<
|
|
15
|
+
export type InferQueryResult<TRoot extends AnyRootTypes, TProcedure extends AnyProcedure> = UseTRPCQueryResult<inferTransformedProcedureOutput<TRoot, TProcedure>, TRPCClientErrorLike<TRoot>>;
|
|
16
16
|
/**
|
|
17
17
|
* @internal
|
|
18
18
|
*/
|
|
19
|
-
export type InferMutationResult<
|
|
19
|
+
export type InferMutationResult<TRoot extends AnyRootTypes, TProcedure extends AnyProcedure, TContext = unknown> = UseTRPCMutationResult<inferTransformedProcedureOutput<TRoot, TProcedure>, TRPCClientErrorLike<TRoot>, inferProcedureInput<TProcedure>, TContext>;
|
|
20
20
|
export type inferReactQueryProcedureOptions<TRouter extends AnyRouter> = {
|
|
21
|
-
[TKey in keyof TRouter['_def']['record']]: TRouter['_def']['record'][TKey] extends infer TRouterOrProcedure ? TRouterOrProcedure extends AnyRouter ? inferReactQueryProcedureOptions<TRouterOrProcedure> : TRouterOrProcedure extends AnyMutationProcedure ? InferMutationOptions<TRouter['_def']['_config'], TRouterOrProcedure> : TRouterOrProcedure extends AnyQueryProcedure ? InferQueryOptions<TRouter['_def']['_config'], TRouterOrProcedure> : never : never;
|
|
21
|
+
[TKey in keyof TRouter['_def']['record']]: TRouter['_def']['record'][TKey] extends infer TRouterOrProcedure ? TRouterOrProcedure extends AnyRouter ? inferReactQueryProcedureOptions<TRouterOrProcedure> : TRouterOrProcedure extends AnyMutationProcedure ? InferMutationOptions<TRouter['_def']['_config']['$types'], TRouterOrProcedure> : TRouterOrProcedure extends AnyQueryProcedure ? InferQueryOptions<TRouter['_def']['_config']['$types'], TRouterOrProcedure> : never : never;
|
|
22
22
|
};
|
|
23
23
|
//# sourceMappingURL=inferReactQueryProcedure.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inferReactQueryProcedure.d.ts","sourceRoot":"","sources":["../../src/utils/inferReactQueryProcedure.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,KAAK,EACV,oBAAoB,EACpB,YAAY,EACZ,iBAAiB,EACjB,
|
|
1
|
+
{"version":3,"file":"inferReactQueryProcedure.d.ts","sourceRoot":"","sources":["../../src/utils/inferReactQueryProcedure.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,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mBAAmB,CAAC,UAAU,CAAC,EAC/B,QAAQ,CACT,CAAC;AAEF,MAAM,MAAM,+BAA+B,CAAC,OAAO,SAAS,SAAS,IAAI;KACtE,IAAI,IAAI,MAAM,OAAO,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,SAAS,MAAM,kBAAkB,GACvG,kBAAkB,SAAS,SAAS,GAClC,+BAA+B,CAAC,kBAAkB,CAAC,GACnD,kBAAkB,SAAS,oBAAoB,GAC/C,oBAAoB,CAClB,OAAO,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,EACpC,kBAAkB,CACnB,GACD,kBAAkB,SAAS,iBAAiB,GAC5C,iBAAiB,CACf,OAAO,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,EACpC,kBAAkB,CACnB,GACD,KAAK,GACP,KAAK;CACV,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trpc/react-query",
|
|
3
|
-
"version": "11.0.0-alpha-tmp-
|
|
3
|
+
"version": "11.0.0-alpha-tmp-01-26-rootconfigtypes.261+de5f0b670",
|
|
4
4
|
"description": "The tRPC React library",
|
|
5
5
|
"author": "KATT",
|
|
6
6
|
"license": "MIT",
|
|
@@ -56,18 +56,17 @@
|
|
|
56
56
|
]
|
|
57
57
|
}
|
|
58
58
|
},
|
|
59
|
-
"dependencies": {
|
|
60
|
-
"@trpc/core": "11.0.0-alpha-tmp-workflow-merge.250+8ce2ac869"
|
|
61
|
-
},
|
|
62
59
|
"peerDependencies": {
|
|
63
60
|
"@tanstack/react-query": "^5.0.0",
|
|
64
|
-
"@trpc/client": "11.0.0-alpha-tmp-
|
|
61
|
+
"@trpc/client": "11.0.0-alpha-tmp-01-26-rootconfigtypes.261+de5f0b670",
|
|
62
|
+
"@trpc/server": "11.0.0-alpha-tmp-01-26-rootconfigtypes.261+de5f0b670",
|
|
65
63
|
"react": ">=18.2.0",
|
|
66
64
|
"react-dom": ">=18.2.0"
|
|
67
65
|
},
|
|
68
66
|
"devDependencies": {
|
|
69
67
|
"@tanstack/react-query": "^5.0.0",
|
|
70
|
-
"@trpc/client": "11.0.0-alpha-tmp-
|
|
68
|
+
"@trpc/client": "11.0.0-alpha-tmp-01-26-rootconfigtypes.261+de5f0b670",
|
|
69
|
+
"@trpc/server": "11.0.0-alpha-tmp-01-26-rootconfigtypes.261+de5f0b670",
|
|
71
70
|
"@types/express": "^4.17.17",
|
|
72
71
|
"@types/node": "^20.10.0",
|
|
73
72
|
"@types/react": "^18.2.33",
|
|
@@ -86,5 +85,5 @@
|
|
|
86
85
|
"funding": [
|
|
87
86
|
"https://trpc.io/sponsor"
|
|
88
87
|
],
|
|
89
|
-
"gitHead": "
|
|
88
|
+
"gitHead": "de5f0b6709157c4fd824bde1014d3ca8f7b08d7b"
|
|
90
89
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AnyRouter } from '@trpc/core';
|
|
1
|
+
import type { AnyRouter } from '@trpc/server/unstable-core-do-not-import';
|
|
2
2
|
import { createQueryUtilsProxy } from './shared';
|
|
3
3
|
import type { CreateQueryUtilsOptions } from './utils/createUtilityFunctions';
|
|
4
4
|
import { createUtilityFunctions } from './utils/createUtilityFunctions';
|