@trpc/react-query 11.0.0-alpha-tmp.233 → 11.0.0-alpha-tmp-v11-trpc-sveltekit.191
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/README.md +4 -4
- package/dist/bundle-analysis.json +33 -33
- package/dist/{createHooksInternal-7ec4d77f.js → createHooksInternal-5cb13e16.js} +1 -1
- package/dist/{createHooksInternal-e15b2117.js → createHooksInternal-6c0232d7.js} +1 -1
- package/dist/{createHooksInternal-99f56cf8.mjs → createHooksInternal-df9ecb1f.mjs} +1 -1
- package/dist/createTRPCQueryUtils.d.ts +2 -2
- package/dist/createTRPCQueryUtils.d.ts.map +1 -1
- package/dist/createTRPCReact.d.ts +15 -15
- package/dist/createTRPCReact.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.mjs +3 -3
- package/dist/internals/context.d.ts +5 -6
- package/dist/internals/context.d.ts.map +1 -1
- package/dist/internals/getClientArgs.d.ts +1 -1
- package/dist/internals/getClientArgs.d.ts.map +1 -1
- package/dist/internals/getQueryKey.d.ts +3 -3
- package/dist/internals/getQueryKey.d.ts.map +1 -1
- package/dist/internals/useQueries.d.ts +3 -3
- package/dist/internals/useQueries.d.ts.map +1 -1
- package/dist/server/index.js +2 -2
- package/dist/server/index.mjs +2 -2
- package/dist/server/ssgProxy.d.ts +6 -5
- package/dist/server/ssgProxy.d.ts.map +1 -1
- package/dist/shared/hooks/createHooksInternal.d.ts +5 -5
- package/dist/shared/hooks/createHooksInternal.d.ts.map +1 -1
- package/dist/shared/hooks/types.d.ts +7 -7
- package/dist/shared/hooks/types.d.ts.map +1 -1
- package/dist/shared/index.js +2 -2
- package/dist/shared/index.mjs +2 -2
- package/dist/shared/polymorphism/mutationLike.d.ts +2 -2
- package/dist/shared/polymorphism/mutationLike.d.ts.map +1 -1
- package/dist/shared/polymorphism/queryLike.d.ts +5 -2
- package/dist/shared/polymorphism/queryLike.d.ts.map +1 -1
- package/dist/shared/polymorphism/routerLike.d.ts +3 -3
- package/dist/shared/polymorphism/routerLike.d.ts.map +1 -1
- package/dist/shared/polymorphism/utilsLike.d.ts +2 -2
- package/dist/shared/polymorphism/utilsLike.d.ts.map +1 -1
- package/dist/shared/proxy/decorationProxy.d.ts +2 -2
- package/dist/shared/proxy/decorationProxy.d.ts.map +1 -1
- package/dist/shared/proxy/useQueriesProxy.d.ts +3 -3
- package/dist/shared/proxy/useQueriesProxy.d.ts.map +1 -1
- package/dist/shared/proxy/utilsProxy.d.ts +6 -6
- package/dist/shared/proxy/utilsProxy.d.ts.map +1 -1
- package/dist/shared/queryClient.d.ts +2 -1
- package/dist/shared/queryClient.d.ts.map +1 -1
- package/dist/shared/types.d.ts +2 -2
- package/dist/shared/types.d.ts.map +1 -1
- package/dist/utils/createUtilityFunctions.d.ts +5 -4
- package/dist/utils/createUtilityFunctions.d.ts.map +1 -1
- package/dist/utils/inferReactQueryProcedure.d.ts +3 -3
- package/dist/utils/inferReactQueryProcedure.d.ts.map +1 -1
- package/dist/{utilsProxy-e4c93b46.mjs → utilsProxy-5402e992.mjs} +1 -1
- package/dist/{utilsProxy-003891dc.js → utilsProxy-c08ebe6e.js} +1 -1
- package/dist/{utilsProxy-aa151f2c.js → utilsProxy-f0fe7c68.js} +1 -1
- package/package.json +6 -6
- package/src/createTRPCQueryUtils.tsx +3 -5
- package/src/createTRPCReact.tsx +21 -23
- package/src/internals/context.tsx +5 -6
- package/src/internals/getClientArgs.ts +1 -1
- package/src/internals/getQueryKey.ts +3 -3
- package/src/internals/useQueries.ts +3 -3
- package/src/server/ssgProxy.ts +13 -16
- package/src/shared/hooks/createHooksInternal.tsx +10 -11
- package/src/shared/hooks/types.ts +7 -7
- package/src/shared/polymorphism/mutationLike.ts +2 -2
- package/src/shared/polymorphism/queryLike.ts +13 -2
- package/src/shared/polymorphism/routerLike.ts +3 -3
- package/src/shared/polymorphism/utilsLike.ts +2 -2
- package/src/shared/proxy/decorationProxy.ts +3 -2
- package/src/shared/proxy/useQueriesProxy.ts +6 -6
- package/src/shared/proxy/utilsProxy.ts +10 -13
- package/src/shared/queryClient.ts +2 -1
- package/src/shared/types.ts +2 -2
- package/src/utils/createUtilityFunctions.ts +5 -8
- package/src/utils/inferReactQueryProcedure.ts +3 -3
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { DefinedUseQueryResult, DehydratedState, InfiniteData, InfiniteQueryObserverSuccessResult, InitialDataFunction, QueryObserverSuccessResult, QueryOptions, UseBaseQueryOptions, UseInfiniteQueryOptions, UseInfiniteQueryResult, UseMutationOptions, UseMutationResult, UseQueryResult, UseSuspenseInfiniteQueryOptions, UseSuspenseInfiniteQueryResult, UseSuspenseQueryOptions, UseSuspenseQueryResult } from '@tanstack/react-query';
|
|
2
|
-
import { CreateTRPCClientOptions, TRPCRequestOptions, TRPCUntypedClient } from '@trpc/client';
|
|
3
|
-
import { AnyRouter, DistributiveOmit } from '@trpc/core';
|
|
4
|
-
import { ReactNode } from 'react';
|
|
5
|
-
import { TRPCContextProps } from '../../internals/context';
|
|
6
|
-
import { TRPCQueryKey } from '../../internals/getQueryKey';
|
|
7
|
-
import { TRPCHookResult } from '../../internals/useHookResult';
|
|
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
|
+
import type { CreateTRPCClientOptions, TRPCRequestOptions, TRPCUntypedClient } from '@trpc/client';
|
|
3
|
+
import type { AnyRouter, DistributiveOmit } from '@trpc/core';
|
|
4
|
+
import type { ReactNode } from 'react';
|
|
5
|
+
import type { TRPCContextProps } from '../../internals/context';
|
|
6
|
+
import type { TRPCQueryKey } from '../../internals/getQueryKey';
|
|
7
|
+
import type { TRPCHookResult } from '../../internals/useHookResult';
|
|
8
8
|
export type OutputWithCursor<TData, TCursor = any> = {
|
|
9
9
|
cursor: TCursor | null;
|
|
10
10
|
data: TData;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/shared/hooks/types.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
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,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAEpE,MAAM,MAAM,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,GAAG,IAAI;IACnD,MAAM,EAAE,OAAO,GAAG,IAAI,CAAC;IACvB,IAAI,EAAE,KAAK,CAAC;CACb,CAAC;AAEF,MAAM,WAAW,uBAEf,SAAQ,IAAI,CAAC,kBAAkB,EAAE,QAAQ,CAAC;IAC1C;;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IACjE,kCAAkC,CAChC,YAAY,CAAC,KAAK,EAAE,WAAW,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,GAAG,IAAI,CAAC,EAClE,MAAM,CACP,GACC,cAAc,CAAC;AAEnB;;GAEG;AACH,MAAM,MAAM,kCAAkC,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,IAAI;IACtE,YAAY,CAAC,KAAK,EAAE,WAAW,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,GAAG,IAAI,CAAC;IAClE,8BAA8B,CAC5B,YAAY,CAAC,KAAK,EAAE,WAAW,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,GAAG,IAAI,CAAC,EAClE,MAAM,CACP,GACC,cAAc;CACjB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,qBAAqB,CAAC,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,IACnE,cAAc,GAAG,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC"}
|
package/dist/shared/index.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var createHooksInternal = require('../createHooksInternal-
|
|
6
|
-
var utilsProxy = require('../utilsProxy-
|
|
5
|
+
var createHooksInternal = require('../createHooksInternal-6c0232d7.js');
|
|
6
|
+
var utilsProxy = require('../utilsProxy-f0fe7c68.js');
|
|
7
7
|
var queryClient = require('../queryClient-358a9a75.js');
|
|
8
8
|
require('@trpc/core');
|
|
9
9
|
require('@tanstack/react-query');
|
package/dist/shared/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { a as createReactDecoration, c as createRootHooks, d as createUseQueries, g as getClientArgs } from '../createHooksInternal-
|
|
2
|
-
export { T as TRPCContext, e as contextProps, a as createQueryUtilsProxy, c as createReactQueryUtils, d as getQueryType } from '../utilsProxy-
|
|
1
|
+
export { a as createReactDecoration, c as createRootHooks, d as createUseQueries, g as getClientArgs } from '../createHooksInternal-df9ecb1f.mjs';
|
|
2
|
+
export { T as TRPCContext, e as contextProps, a as createQueryUtilsProxy, c as createReactQueryUtils, d as getQueryType } from '../utilsProxy-5402e992.mjs';
|
|
3
3
|
export { g as getQueryClient } from '../queryClient-4d766c0c.mjs';
|
|
4
4
|
import '@trpc/core';
|
|
5
5
|
import '@tanstack/react-query';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AnyProcedure, AnyRootConfig, inferProcedureInput, inferTransformedProcedureOutput } from '@trpc/core';
|
|
2
|
-
import { InferMutationOptions, InferMutationResult } from '../../utils/inferReactQueryProcedure';
|
|
1
|
+
import type { AnyProcedure, AnyRootConfig, inferProcedureInput, inferTransformedProcedureOutput } from '@trpc/core';
|
|
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
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mutationLike.d.ts","sourceRoot":"","sources":["../../../src/shared/polymorphism/mutationLike.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"mutationLike.d.ts","sourceRoot":"","sources":["../../../src/shared/polymorphism/mutationLike.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EACZ,aAAa,EACb,mBAAmB,EACnB,+BAA+B,EAChC,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EACV,oBAAoB,EACpB,mBAAmB,EACpB,MAAM,sCAAsC,CAAC;AAE9C;;GAEG;AACH,MAAM,MAAM,YAAY,CACtB,OAAO,SAAS,aAAa,EAC7B,UAAU,SAAS,YAAY,IAC7B;IACF,WAAW,EAAE,CACX,IAAI,CAAC,EAAE,oBAAoB,CAAC,OAAO,EAAE,UAAU,CAAC,KAC7C,mBAAmB,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;CAC/C,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,OAAO,EAAE,MAAM,UAAU,CAAC,GACnE,+BAA+B,CAAC,OAAO,EAAE,UAAU,CAAC,GACpD,KAAK,CAAC"}
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { TRPCClientErrorLike } from '@trpc/client';
|
|
2
|
+
import type { AnyProcedure, AnyRootConfig, inferProcedureInput, inferProcedureOutput, inferTransformedProcedureOutput } from '@trpc/core';
|
|
3
|
+
import type { InferQueryOptions, InferQueryResult } from '../../utils/inferReactQueryProcedure';
|
|
4
|
+
import type { UseTRPCSuspenseQueryResult } from '../hooks/types';
|
|
3
5
|
/**
|
|
4
6
|
* Use to request a query route which matches a given query procedure's interface
|
|
5
7
|
*/
|
|
6
8
|
export type QueryLike<TConfig extends AnyRootConfig, TProcedure extends AnyProcedure> = {
|
|
7
9
|
useQuery: (variables: inferProcedureInput<TProcedure>, opts?: InferQueryOptions<TConfig, TProcedure, any>) => InferQueryResult<TConfig, TProcedure>;
|
|
10
|
+
useSuspenseQuery: (variables: inferProcedureInput<TProcedure>, opts?: InferQueryOptions<TConfig, TProcedure, any>) => UseTRPCSuspenseQueryResult<inferProcedureOutput<TProcedure>, TRPCClientErrorLike<TConfig>>;
|
|
8
11
|
};
|
|
9
12
|
/**
|
|
10
13
|
* Use to unwrap a QueryLike's input
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queryLike.d.ts","sourceRoot":"","sources":["../../../src/shared/polymorphism/queryLike.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
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,aAAa,EACb,mBAAmB,EACnB,oBAAoB,EACpB,+BAA+B,EAChC,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EACV,iBAAiB,EACjB,gBAAgB,EACjB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,gBAAgB,CAAC;AAEjE;;GAEG;AACH,MAAM,MAAM,SAAS,CACnB,OAAO,SAAS,aAAa,EAC7B,UAAU,SAAS,YAAY,IAC7B;IACF,QAAQ,EAAE,CACR,SAAS,EAAE,mBAAmB,CAAC,UAAU,CAAC,EAC1C,IAAI,CAAC,EAAE,iBAAiB,CAAC,OAAO,EAAE,UAAU,EAAE,GAAG,CAAC,KAC/C,gBAAgB,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;IAE3C,gBAAgB,EAAE,CAChB,SAAS,EAAE,mBAAmB,CAAC,UAAU,CAAC,EAC1C,IAAI,CAAC,EAAE,iBAAiB,CAAC,OAAO,EAAE,UAAU,EAAE,GAAG,CAAC,KAC/C,0BAA0B,CAC7B,oBAAoB,CAAC,UAAU,CAAC,EAChC,mBAAmB,CAAC,OAAO,CAAC,CAC7B,CAAC;CACH,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,mBAAmB,CAAC,UAAU,SAAS,SAAS,CAAC,GAAG,EAAE,GAAG,CAAC,IACpE,UAAU,SAAS,SAAS,CAAC,GAAG,EAAE,MAAM,UAAU,CAAC,GAC/C,mBAAmB,CAAC,UAAU,CAAC,GAC/B,KAAK,CAAC;AAEZ;;GAEG;AACH,MAAM,MAAM,kBAAkB,CAAC,UAAU,SAAS,SAAS,CAAC,GAAG,EAAE,GAAG,CAAC,IACnE,UAAU,SAAS,SAAS,CAAC,MAAM,OAAO,EAAE,MAAM,UAAU,CAAC,GACzD,+BAA+B,CAAC,OAAO,EAAE,UAAU,CAAC,GACpD,KAAK,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { AnyMutationProcedure, AnyProcedure, AnyQueryProcedure, AnyRootConfig, AnyRouter } from '@trpc/core';
|
|
2
|
-
import { MutationLike } from './mutationLike';
|
|
3
|
-
import { QueryLike } from './queryLike';
|
|
1
|
+
import type { AnyMutationProcedure, AnyProcedure, AnyQueryProcedure, AnyRootConfig, AnyRouter } from '@trpc/core';
|
|
2
|
+
import type { MutationLike } from './mutationLike';
|
|
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
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routerLike.d.ts","sourceRoot":"","sources":["../../../src/shared/polymorphism/routerLike.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
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,aAAa,EACb,SAAS,EACV,MAAM,YAAY,CAAC;AACpB,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,EAC1B,OAAO,CAAC,MAAM,CAAC,CAAC,YAAY,CAAC,CAC9B,CAAC;AACF,MAAM,MAAM,eAAe,CACzB,OAAO,SAAS,aAAa,EAC7B,WAAW,SAAS,YAAY,IAC9B;KACD,IAAI,IAAI,MAAM,WAAW,GAAG,WAAW,CAAC,IAAI,CAAC,SAAS,SAAS,GAC5D,eAAe,CAAC,OAAO,EAAE,WAAW,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,CAAC,GAC7D,WAAW,CAAC,IAAI,CAAC,SAAS,iBAAiB,GAC3C,SAAS,CAAC,OAAO,EAAE,WAAW,CAAC,IAAI,CAAC,CAAC,GACrC,WAAW,CAAC,IAAI,CAAC,SAAS,oBAAoB,GAC9C,YAAY,CAAC,OAAO,EAAE,WAAW,CAAC,IAAI,CAAC,CAAC,GACxC,KAAK;CACV,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AnyRouter } from '@trpc/core';
|
|
2
|
-
import { DecoratedProcedureUtilsRecord } from '../proxy/utilsProxy';
|
|
1
|
+
import type { AnyRouter } from '@trpc/core';
|
|
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
|
|
5
5
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utilsLike.d.ts","sourceRoot":"","sources":["../../../src/shared/polymorphism/utilsLike.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"utilsLike.d.ts","sourceRoot":"","sources":["../../../src/shared/polymorphism/utilsLike.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAC5C,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,5 +1,5 @@
|
|
|
1
|
-
import { AnyRouter } from '@trpc/core';
|
|
2
|
-
import { CreateReactQueryHooks } from '../hooks/createHooksInternal';
|
|
1
|
+
import type { AnyRouter } from '@trpc/core';
|
|
2
|
+
import type { CreateReactQueryHooks } from '../hooks/createHooksInternal';
|
|
3
3
|
/**
|
|
4
4
|
* Create proxy for decorating procedures
|
|
5
5
|
* @internal
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decorationProxy.d.ts","sourceRoot":"","sources":["../../../src/shared/proxy/decorationProxy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,
|
|
1
|
+
{"version":3,"file":"decorationProxy.d.ts","sourceRoot":"","sources":["../../../src/shared/proxy/decorationProxy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAE5C,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,6 +1,6 @@
|
|
|
1
|
-
import { TRPCClientError, TRPCUntypedClient } from '@trpc/client';
|
|
2
|
-
import { AnyProcedure, AnyQueryProcedure, AnyRootConfig, AnyRouter, Filter, inferProcedureInput, inferTransformedProcedureOutput } from '@trpc/core';
|
|
3
|
-
import { TrpcQueryOptionsForUseQueries, TrpcQueryOptionsForUseSuspenseQueries } from '../../internals/useQueries';
|
|
1
|
+
import type { TRPCClientError, TRPCUntypedClient } from '@trpc/client';
|
|
2
|
+
import type { AnyProcedure, AnyQueryProcedure, AnyRootConfig, AnyRouter, Filter, inferProcedureInput, inferTransformedProcedureOutput } from '@trpc/core';
|
|
3
|
+
import type { TrpcQueryOptionsForUseQueries, TrpcQueryOptionsForUseSuspenseQueries } from '../../internals/useQueries';
|
|
4
4
|
type GetQueryOptions<TConfig extends AnyRootConfig, TProcedure extends AnyProcedure> = <TData = inferTransformedProcedureOutput<TConfig, TProcedure>>(input: inferProcedureInput<TProcedure>, opts?: TrpcQueryOptionsForUseQueries<inferTransformedProcedureOutput<TConfig, TProcedure>, TData, TRPCClientError<TConfig>>) => TrpcQueryOptionsForUseQueries<inferTransformedProcedureOutput<TConfig, TProcedure>, TData, TRPCClientError<TConfig>>;
|
|
5
5
|
/**
|
|
6
6
|
* @internal
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useQueriesProxy.d.ts","sourceRoot":"","sources":["../../../src/shared/proxy/useQueriesProxy.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;
|
|
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,aAAa,EACb,SAAS,EACT,MAAM,EACN,mBAAmB,EACnB,+BAA+B,EAChC,MAAM,YAAY,CAAC;AAGpB,OAAO,KAAK,EACV,6BAA6B,EAC7B,qCAAqC,EACtC,MAAM,4BAA4B,CAAC;AAGpC,KAAK,eAAe,CAClB,OAAO,SAAS,aAAa,EAC7B,UAAU,SAAS,YAAY,IAC7B,CAAC,KAAK,GAAG,+BAA+B,CAAC,OAAO,EAAE,UAAU,CAAC,EAC/D,KAAK,EAAE,mBAAmB,CAAC,UAAU,CAAC,EACtC,IAAI,CAAC,EAAE,6BAA6B,CAClC,+BAA+B,CAAC,OAAO,EAAE,UAAU,CAAC,EACpD,KAAK,EACL,eAAe,CAAC,OAAO,CAAC,CACzB,KACE,6BAA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AQ,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,EAC1B,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,9 +1,9 @@
|
|
|
1
|
-
import { CancelOptions, InfiniteData, InvalidateOptions, InvalidateQueryFilters, Query, RefetchOptions, RefetchQueryFilters, ResetOptions, SetDataOptions, Updater } from '@tanstack/react-query';
|
|
2
|
-
import { TRPCClientError } from '@trpc/client';
|
|
3
|
-
import { AnyQueryProcedure, AnyRootConfig, AnyRouter, DeepPartial, Filter, inferProcedureInput, inferTransformedProcedureOutput, ProtectedIntersection } from '@trpc/core';
|
|
4
|
-
import { DecoratedTRPCContextProps, TRPCContextState, TRPCFetchInfiniteQueryOptions, TRPCFetchQueryOptions, TRPCQueryUtils } from '../../internals/context';
|
|
5
|
-
import { QueryKeyKnown, QueryType } from '../../internals/getQueryKey';
|
|
6
|
-
import { ExtractCursorType } from '../hooks/types';
|
|
1
|
+
import type { CancelOptions, InfiniteData, InvalidateOptions, InvalidateQueryFilters, Query, RefetchOptions, RefetchQueryFilters, ResetOptions, SetDataOptions, Updater } from '@tanstack/react-query';
|
|
2
|
+
import type { TRPCClientError } from '@trpc/client';
|
|
3
|
+
import type { AnyQueryProcedure, AnyRootConfig, AnyRouter, DeepPartial, Filter, inferProcedureInput, inferTransformedProcedureOutput, ProtectedIntersection } from '@trpc/core';
|
|
4
|
+
import type { DecoratedTRPCContextProps, TRPCContextState, TRPCFetchInfiniteQueryOptions, TRPCFetchQueryOptions, TRPCQueryUtils } from '../../internals/context';
|
|
5
|
+
import type { QueryKeyKnown, QueryType } from '../../internals/getQueryKey';
|
|
6
|
+
import type { ExtractCursorType } from '../hooks/types';
|
|
7
7
|
type DecorateProcedure<TConfig extends AnyRootConfig, TProcedure extends AnyQueryProcedure> = {
|
|
8
8
|
/**
|
|
9
9
|
* @link https://tanstack.com/query/v5/docs/reference/QueryClient#queryclientfetchquery
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utilsProxy.d.ts","sourceRoot":"","sources":["../../../src/shared/proxy/utilsProxy.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
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,aAAa,EACb,SAAS,EACT,WAAW,EACX,MAAM,EACN,mBAAmB,EACnB,+BAA+B,EAC/B,qBAAqB,EACtB,MAAM,YAAY,CAAC;AAEpB,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,OAAO,SAAS,aAAa,EAC7B,UAAU,SAAS,iBAAiB,IAClC;IACF;;OAEG;IACH,KAAK,CACH,KAAK,EAAE,mBAAmB,CAAC,UA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AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"queryClient.d.ts","sourceRoot":"","sources":["../../src/shared/queryClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEpD;;GAEG;AACH,MAAM,MAAM,gCAAgC,GACxC;IACE,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,iBAAiB,CAAC,EAAE,KAAK,CAAC;CAC3B,GACD;IACE,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC,WAAW,CAAC,EAAE,KAAK,CAAC;CACrB,CAAC;AAEN;;GAEG;AACH,eAAO,MAAM,cAAc,WAAY,gCAAgC,gBACN,CAAC"}
|
package/dist/shared/types.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { QueryClient } from '@tanstack/react-query';
|
|
3
|
-
import { AnyRouter, MaybePromise } from '@trpc/core';
|
|
2
|
+
import type { QueryClient } from '@tanstack/react-query';
|
|
3
|
+
import type { AnyRouter, MaybePromise } from '@trpc/core';
|
|
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,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;
|
|
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,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE1D;;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,8 @@
|
|
|
1
|
-
import { QueryClient } from '@tanstack/react-query';
|
|
2
|
-
import { CreateTRPCClient
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import type { QueryClient } from '@tanstack/react-query';
|
|
2
|
+
import type { CreateTRPCClient } from '@trpc/client';
|
|
3
|
+
import { TRPCUntypedClient } from '@trpc/client';
|
|
4
|
+
import type { AnyRouter } from '@trpc/core';
|
|
5
|
+
import type { TRPCQueryUtils } from '../shared';
|
|
5
6
|
export interface CreateQueryUtilsOptions<TRouter extends AnyRouter> {
|
|
6
7
|
/**
|
|
7
8
|
* The `TRPCClient`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createUtilityFunctions.d.ts","sourceRoot":"","sources":["../../src/utils/createUtilityFunctions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;
|
|
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,YAAY,CAAC;AAE5C,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,6 +1,6 @@
|
|
|
1
|
-
import { TRPCClientErrorLike } from '@trpc/client';
|
|
2
|
-
import { AnyMutationProcedure, AnyProcedure, AnyQueryProcedure, AnyRootConfig, AnyRouter, inferProcedureInput, inferTransformedProcedureOutput } from '@trpc/core';
|
|
3
|
-
import { UseTRPCMutationOptions, UseTRPCMutationResult, UseTRPCQueryOptions, UseTRPCQueryResult } from '../shared';
|
|
1
|
+
import type { TRPCClientErrorLike } from '@trpc/client';
|
|
2
|
+
import type { AnyMutationProcedure, AnyProcedure, AnyQueryProcedure, AnyRootConfig, AnyRouter, inferProcedureInput, inferTransformedProcedureOutput } from '@trpc/core';
|
|
3
|
+
import type { UseTRPCMutationOptions, UseTRPCMutationResult, UseTRPCQueryOptions, UseTRPCQueryResult } from '../shared';
|
|
4
4
|
/**
|
|
5
5
|
* @internal
|
|
6
6
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inferReactQueryProcedure.d.ts","sourceRoot":"","sources":["../../src/utils/inferReactQueryProcedure.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;
|
|
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,aAAa,EACb,SAAS,EACT,mBAAmB,EACnB,+BAA+B,EAChC,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EACV,sBAAsB,EACtB,qBAAqB,EACrB,mBAAmB,EACnB,kBAAkB,EACnB,MAAM,WAAW,CAAC;AAEnB;;GAEG;AACH,MAAM,MAAM,iBAAiB,CAC3B,OAAO,SAAS,aAAa,EAC7B,UAAU,SAAS,YAAY,EAC/B,KAAK,GAAG,+BAA+B,CAAC,OAAO,EAAE,UAAU,CAAC,IAC1D,IAAI,CACN,mBAAmB,CACjB,+BAA+B,CAAC,OAAO,EAAE,UAAU,CAAC,EACpD,+BAA+B,CAAC,OAAO,EAAE,UAAU,CAAC,EACpD,mBAAmB,CAAC,OAAO,CAAC,EAC5B,KAAK,CACN,EACD,QAAQ,CACT,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,oBAAoB,CAC9B,OAAO,SAAS,aAAa,EAC7B,UAAU,SAAS,YAAY,IAC7B,sBAAsB,CACxB,mBAAmB,CAAC,UAAU,CAAC,EAC/B,mBAAmB,CAAC,OAAO,CAAC,EAC5B,+BAA+B,CAAC,OAAO,EAAE,UAAU,CAAC,CACrD,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,gBAAgB,CAC1B,OAAO,SAAS,aAAa,EAC7B,UAAU,SAAS,YAAY,IAC7B,kBAAkB,CACpB,+BAA+B,CAAC,OAAO,EAAE,UAAU,CAAC,EACpD,mBAAmB,CAAC,OAAO,CAAC,CAC7B,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,mBAAmB,CAC7B,OAAO,SAAS,aAAa,EAC7B,UAAU,SAAS,YAAY,EAC/B,QAAQ,GAAG,OAAO,IAChB,qBAAqB,CACvB,+BAA+B,CAAC,OAAO,EAAE,UAAU,CAAC,EACpD,mBAAmB,CAAC,OAAO,CAAC,EAC5B,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,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,EAAE,kBAAkB,CAAC,GACpE,kBAAkB,SAAS,iBAAiB,GAC5C,iBAAiB,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,EAAE,kBAAkB,CAAC,GACjE,KAAK,GACP,KAAK;CACV,CAAC"}
|
|
@@ -34,7 +34,7 @@ import { createContext } from 'react';
|
|
|
34
34
|
* @param procedureOrRouter - procedure or AnyRouter
|
|
35
35
|
* @param input - input to procedureOrRouter
|
|
36
36
|
* @param type - defaults to `any`
|
|
37
|
-
* @link https://trpc.io/docs/getQueryKey
|
|
37
|
+
* @link https://trpc.io/docs/v11/getQueryKey
|
|
38
38
|
*/ function getQueryKey(..._params) {
|
|
39
39
|
const [procedureOrRouter, input, type] = _params;
|
|
40
40
|
// @ts-expect-error - we don't expose _def on the type layer
|
|
@@ -30,7 +30,7 @@ function getQueryKeyInternal(path, input, type) {
|
|
|
30
30
|
* @param procedureOrRouter - procedure or AnyRouter
|
|
31
31
|
* @param input - input to procedureOrRouter
|
|
32
32
|
* @param type - defaults to `any`
|
|
33
|
-
* @link https://trpc.io/docs/getQueryKey
|
|
33
|
+
* @link https://trpc.io/docs/v11/getQueryKey
|
|
34
34
|
*/
|
|
35
35
|
function getQueryKey(..._params) {
|
|
36
36
|
const [procedureOrRouter, input, type] = _params;
|
|
@@ -36,7 +36,7 @@ var React = require('react');
|
|
|
36
36
|
* @param procedureOrRouter - procedure or AnyRouter
|
|
37
37
|
* @param input - input to procedureOrRouter
|
|
38
38
|
* @param type - defaults to `any`
|
|
39
|
-
* @link https://trpc.io/docs/getQueryKey
|
|
39
|
+
* @link https://trpc.io/docs/v11/getQueryKey
|
|
40
40
|
*/ function getQueryKey(..._params) {
|
|
41
41
|
const [procedureOrRouter, input, type] = _params;
|
|
42
42
|
// @ts-expect-error - we don't expose _def on the type layer
|
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-v11-trpc-sveltekit.191+6bef08e75",
|
|
4
4
|
"description": "The tRPC React library",
|
|
5
5
|
"author": "KATT",
|
|
6
6
|
"license": "MIT",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"build": "rollup --config rollup.config.ts --configPlugin rollup-plugin-swc3",
|
|
18
18
|
"dev": "pnpm build --watch",
|
|
19
19
|
"codegen-entrypoints": "tsx entrypoints.script.ts",
|
|
20
|
-
"lint": "eslint --cache --ext \".js,.ts,.tsx\" --ignore-path ../../.gitignore
|
|
20
|
+
"lint": "eslint --cache --ext \".js,.ts,.tsx\" --ignore-path ../../.gitignore src",
|
|
21
21
|
"ts-watch": "tsc --watch"
|
|
22
22
|
},
|
|
23
23
|
"exports": {
|
|
@@ -57,17 +57,17 @@
|
|
|
57
57
|
}
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"@trpc/core": "11.0.0-alpha-tmp.
|
|
60
|
+
"@trpc/core": "11.0.0-alpha-tmp-v11-trpc-sveltekit.191+6bef08e75"
|
|
61
61
|
},
|
|
62
62
|
"peerDependencies": {
|
|
63
63
|
"@tanstack/react-query": "^5.0.0",
|
|
64
|
-
"@trpc/client": "11.0.0-alpha-tmp.
|
|
64
|
+
"@trpc/client": "11.0.0-alpha-tmp-v11-trpc-sveltekit.191+6bef08e75",
|
|
65
65
|
"react": ">=18.2.0",
|
|
66
66
|
"react-dom": ">=18.2.0"
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
69
69
|
"@tanstack/react-query": "^5.0.0",
|
|
70
|
-
"@trpc/client": "11.0.0-alpha-tmp.
|
|
70
|
+
"@trpc/client": "11.0.0-alpha-tmp-v11-trpc-sveltekit.191+6bef08e75",
|
|
71
71
|
"@types/express": "^4.17.17",
|
|
72
72
|
"@types/node": "^20.10.0",
|
|
73
73
|
"@types/react": "^18.2.33",
|
|
@@ -86,5 +86,5 @@
|
|
|
86
86
|
"funding": [
|
|
87
87
|
"https://trpc.io/sponsor"
|
|
88
88
|
],
|
|
89
|
-
"gitHead": "
|
|
89
|
+
"gitHead": "6bef08e7503e2c8bb65cfe6064197f60045a1ffe"
|
|
90
90
|
}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import { AnyRouter } from '@trpc/core';
|
|
1
|
+
import type { AnyRouter } from '@trpc/core';
|
|
2
2
|
import { createQueryUtilsProxy } from './shared';
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
createUtilityFunctions,
|
|
6
|
-
} from './utils/createUtilityFunctions';
|
|
3
|
+
import type { CreateQueryUtilsOptions } from './utils/createUtilityFunctions';
|
|
4
|
+
import { createUtilityFunctions } from './utils/createUtilityFunctions';
|
|
7
5
|
|
|
8
6
|
export function createTRPCQueryUtils<TRouter extends AnyRouter>(
|
|
9
7
|
opts: CreateQueryUtilsOptions<TRouter>,
|
package/src/createTRPCReact.tsx
CHANGED
|
@@ -1,30 +1,28 @@
|
|
|
1
|
-
import { TRPCClientErrorLike } from '@trpc/client';
|
|
2
|
-
import {
|
|
1
|
+
import type { TRPCClientErrorLike } from '@trpc/client';
|
|
2
|
+
import type {
|
|
3
3
|
AnyMutationProcedure,
|
|
4
4
|
AnyProcedure,
|
|
5
5
|
AnyQueryProcedure,
|
|
6
6
|
AnyRootConfig,
|
|
7
7
|
AnyRouter,
|
|
8
8
|
AnySubscriptionProcedure,
|
|
9
|
-
createFlatProxy,
|
|
10
9
|
inferProcedureInput,
|
|
11
10
|
inferTransformedProcedureOutput,
|
|
12
11
|
inferTransformedSubscriptionOutput,
|
|
13
12
|
ProcedureRouterRecord,
|
|
14
13
|
ProtectedIntersection,
|
|
15
14
|
} from '@trpc/core';
|
|
15
|
+
import { createFlatProxy } from '@trpc/core';
|
|
16
16
|
import { useMemo } from 'react';
|
|
17
|
-
import {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
} from './shared';
|
|
23
|
-
import {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
} from './shared/hooks/createHooksInternal';
|
|
27
|
-
import {
|
|
17
|
+
import type {
|
|
18
|
+
TRPCUseQueries,
|
|
19
|
+
TRPCUseSuspenseQueries,
|
|
20
|
+
} from './internals/useQueries';
|
|
21
|
+
import type { CreateReactUtils } from './shared';
|
|
22
|
+
import { createReactDecoration, createReactQueryUtils } from './shared';
|
|
23
|
+
import type { CreateReactQueryHooks } from './shared/hooks/createHooksInternal';
|
|
24
|
+
import { createRootHooks } from './shared/hooks/createHooksInternal';
|
|
25
|
+
import type {
|
|
28
26
|
CreateClient,
|
|
29
27
|
DefinedUseTRPCQueryOptions,
|
|
30
28
|
DefinedUseTRPCQueryResult,
|
|
@@ -42,7 +40,7 @@ import {
|
|
|
42
40
|
UseTRPCSuspenseQueryOptions,
|
|
43
41
|
UseTRPCSuspenseQueryResult,
|
|
44
42
|
} from './shared/hooks/types';
|
|
45
|
-
import { CreateTRPCReactOptions } from './shared/types';
|
|
43
|
+
import type { CreateTRPCReactOptions } from './shared/types';
|
|
46
44
|
|
|
47
45
|
/**
|
|
48
46
|
* @internal
|
|
@@ -100,7 +98,7 @@ export type MaybeDecoratedInfiniteQuery<
|
|
|
100
98
|
> = inferProcedureInput<TProcedure> extends CursorInput
|
|
101
99
|
? {
|
|
102
100
|
/**
|
|
103
|
-
* @
|
|
101
|
+
* @link https://trpc.io/docs/v11/client/react/suspense#useinfinitesuspensequery
|
|
104
102
|
*/
|
|
105
103
|
useInfiniteQuery: (
|
|
106
104
|
input: Omit<inferProcedureInput<TProcedure>, 'cursor'>,
|
|
@@ -115,7 +113,7 @@ export type MaybeDecoratedInfiniteQuery<
|
|
|
115
113
|
inferProcedureInput<TProcedure>
|
|
116
114
|
>;
|
|
117
115
|
/**
|
|
118
|
-
* @
|
|
116
|
+
* @link https://trpc.io/docs/v11/client/react/suspense
|
|
119
117
|
*/
|
|
120
118
|
useSuspenseInfiniteQuery: (
|
|
121
119
|
input: Omit<inferProcedureInput<TProcedure>, 'cursor'>,
|
|
@@ -140,11 +138,11 @@ export type DecoratedQueryMethods<
|
|
|
140
138
|
TProcedure extends AnyProcedure,
|
|
141
139
|
> = {
|
|
142
140
|
/**
|
|
143
|
-
* @
|
|
141
|
+
* @link https://trpc.io/docs/v11/client/react/useQuery
|
|
144
142
|
*/
|
|
145
143
|
useQuery: ProcedureUseQuery<TConfig, TProcedure>;
|
|
146
144
|
/**
|
|
147
|
-
* @
|
|
145
|
+
* @link https://trpc.io/docs/v11/client/react/suspense#usesuspensequery
|
|
148
146
|
*/
|
|
149
147
|
useSuspenseQuery: <
|
|
150
148
|
TQueryFnData extends inferTransformedProcedureOutput<
|
|
@@ -179,7 +177,7 @@ export interface DecoratedMutation<
|
|
|
179
177
|
TProcedure extends AnyProcedure,
|
|
180
178
|
> {
|
|
181
179
|
/**
|
|
182
|
-
* @
|
|
180
|
+
* @link https://trpc.io/docs/v11/client/react/useMutation
|
|
183
181
|
*/
|
|
184
182
|
useMutation: <TContext = unknown>(
|
|
185
183
|
opts?: UseTRPCMutationOptions<
|
|
@@ -210,7 +208,7 @@ export type DecorateProcedure<
|
|
|
210
208
|
: TProcedure extends AnySubscriptionProcedure
|
|
211
209
|
? {
|
|
212
210
|
/**
|
|
213
|
-
* @
|
|
211
|
+
* @link https://trpc.io/docs/v11/subscriptions
|
|
214
212
|
*/
|
|
215
213
|
useSubscription: (
|
|
216
214
|
input: inferProcedureInput<TProcedure>,
|
|
@@ -248,11 +246,11 @@ export type CreateTRPCReactBase<TRouter extends AnyRouter, TSSRContext> = {
|
|
|
248
246
|
/**
|
|
249
247
|
* @deprecated renamed to `useUtils` and will be removed in a future tRPC version
|
|
250
248
|
*
|
|
251
|
-
* @
|
|
249
|
+
* @link https://trpc.io/docs/v11/client/react/useUtils
|
|
252
250
|
*/
|
|
253
251
|
useContext(): CreateReactUtils<TRouter, TSSRContext>;
|
|
254
252
|
/**
|
|
255
|
-
* @
|
|
253
|
+
* @link https://trpc.io/docs/v11/client/react/useUtils
|
|
256
254
|
*/
|
|
257
255
|
useUtils(): CreateReactUtils<TRouter, TSSRContext>;
|
|
258
256
|
Provider: TRPCProvider<TRouter, TSSRContext>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type {
|
|
2
2
|
CancelOptions,
|
|
3
3
|
FetchInfiniteQueryOptions,
|
|
4
4
|
FetchQueryOptions,
|
|
@@ -13,17 +13,16 @@ import {
|
|
|
13
13
|
SetDataOptions,
|
|
14
14
|
Updater,
|
|
15
15
|
} from '@tanstack/react-query';
|
|
16
|
-
import {
|
|
16
|
+
import type {
|
|
17
17
|
CreateTRPCClient,
|
|
18
18
|
TRPCClientError,
|
|
19
19
|
TRPCRequestOptions,
|
|
20
20
|
TRPCUntypedClient,
|
|
21
21
|
} from '@trpc/client';
|
|
22
|
-
import type { AnyRouter } from '@trpc/core';
|
|
23
|
-
import { DistributiveOmit } from '@trpc/core';
|
|
22
|
+
import type { AnyRouter, DistributiveOmit } from '@trpc/core';
|
|
24
23
|
import { createContext } from 'react';
|
|
25
|
-
import { ExtractCursorType } from '../shared';
|
|
26
|
-
import { TRPCQueryKey } from './getQueryKey';
|
|
24
|
+
import type { ExtractCursorType } from '../shared';
|
|
25
|
+
import type { TRPCQueryKey } from './getQueryKey';
|
|
27
26
|
|
|
28
27
|
export type TRPCFetchQueryOptions<TOutput, TError> = DistributiveOmit<
|
|
29
28
|
FetchQueryOptions<TOutput, TError>,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type {
|
|
2
2
|
AnyMutationProcedure,
|
|
3
3
|
AnyQueryProcedure,
|
|
4
4
|
AnyRootConfig,
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
DeepPartial,
|
|
7
7
|
inferProcedureInput,
|
|
8
8
|
} from '@trpc/core';
|
|
9
|
-
import { DecoratedProcedureRecord, DecorateProcedure } from '../shared';
|
|
9
|
+
import type { DecoratedProcedureRecord, DecorateProcedure } from '../shared';
|
|
10
10
|
|
|
11
11
|
export type QueryType = 'any' | 'infinite' | 'query';
|
|
12
12
|
|
|
@@ -104,7 +104,7 @@ type GetQueryKeyParams<
|
|
|
104
104
|
* @param procedureOrRouter - procedure or AnyRouter
|
|
105
105
|
* @param input - input to procedureOrRouter
|
|
106
106
|
* @param type - defaults to `any`
|
|
107
|
-
* @link https://trpc.io/docs/getQueryKey
|
|
107
|
+
* @link https://trpc.io/docs/v11/getQueryKey
|
|
108
108
|
*/
|
|
109
109
|
export function getQueryKey<
|
|
110
110
|
TConfig extends AnyRootConfig,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type {
|
|
2
2
|
QueryKey,
|
|
3
3
|
UseQueryOptions,
|
|
4
4
|
UseSuspenseQueryOptions,
|
|
5
5
|
UseSuspenseQueryResult,
|
|
6
6
|
} from '@tanstack/react-query';
|
|
7
|
-
import { AnyRouter, DistributiveOmit } from '@trpc/core';
|
|
8
|
-
import {
|
|
7
|
+
import type { AnyRouter, DistributiveOmit } from '@trpc/core';
|
|
8
|
+
import type {
|
|
9
9
|
UseQueriesProcedureRecord,
|
|
10
10
|
UseSuspenseQueriesProcedureRecord,
|
|
11
11
|
UseTRPCQueryOptions,
|