@trpc/react-query 11.1.2 → 11.1.3-alpha-tmp-tsdown.23
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/_virtual/rolldown_runtime.js +30 -0
- package/dist/createTRPCQueryUtils.d.mts +12 -0
- package/dist/createTRPCQueryUtils.d.mts.map +1 -0
- package/dist/createTRPCQueryUtils.d.ts +11 -3
- package/dist/createTRPCQueryUtils.d.ts.map +1 -1
- package/dist/createTRPCQueryUtils.js +7 -12
- package/dist/createTRPCQueryUtils.mjs +7 -9
- package/dist/createTRPCQueryUtils.mjs.map +1 -0
- package/dist/createTRPCReact.d.mts +143 -0
- package/dist/createTRPCReact.d.mts.map +1 -0
- package/dist/createTRPCReact.d.ts +92 -96
- package/dist/createTRPCReact.d.ts.map +1 -1
- package/dist/createTRPCReact.js +26 -54
- package/dist/createTRPCReact.mjs +26 -32
- package/dist/createTRPCReact.mjs.map +1 -0
- package/dist/index.d.mts +6 -0
- package/dist/index.d.ts +6 -6
- package/dist/index.js +11 -15
- package/dist/index.mjs +7 -4
- package/dist/internals/context.d.mts +164 -0
- package/dist/internals/context.d.mts.map +1 -0
- package/dist/internals/context.d.ts +146 -139
- package/dist/internals/context.d.ts.map +1 -1
- package/dist/internals/context.js +10 -28
- package/dist/internals/context.mjs +8 -5
- package/dist/internals/context.mjs.map +1 -0
- package/dist/internals/getClientArgs.d.mts +19 -0
- package/dist/internals/getClientArgs.d.mts.map +1 -0
- package/dist/internals/getClientArgs.d.ts +14 -4
- package/dist/internals/getClientArgs.d.ts.map +1 -1
- package/dist/internals/getClientArgs.js +18 -20
- package/dist/internals/getClientArgs.mjs +18 -18
- package/dist/internals/getClientArgs.mjs.map +1 -0
- package/dist/internals/getQueryKey.d.mts +45 -0
- package/dist/internals/getQueryKey.d.mts.map +1 -0
- package/dist/internals/getQueryKey.d.ts +22 -26
- package/dist/internals/getQueryKey.d.ts.map +1 -1
- package/dist/internals/getQueryKey.js +43 -62
- package/dist/internals/getQueryKey.mjs +42 -59
- package/dist/internals/getQueryKey.mjs.map +1 -0
- package/dist/internals/trpcResult.js +27 -53
- package/dist/internals/trpcResult.mjs +26 -31
- package/dist/internals/trpcResult.mjs.map +1 -0
- package/dist/internals/useQueries.d.mts +57 -0
- package/dist/internals/useQueries.d.mts.map +1 -0
- package/dist/internals/useQueries.d.ts +23 -24
- package/dist/internals/useQueries.d.ts.map +1 -1
- package/dist/rsc.d.mts +81 -0
- package/dist/rsc.d.mts.map +1 -0
- package/dist/rsc.d.ts +57 -56
- package/dist/rsc.d.ts.map +1 -1
- package/dist/rsc.js +66 -126
- package/dist/rsc.mjs +65 -104
- package/dist/rsc.mjs.map +1 -0
- package/dist/server/index.d.mts +2 -0
- package/dist/server/index.d.ts +2 -2
- package/dist/server/index.js +2 -6
- package/dist/server/index.mjs +3 -1
- package/dist/server/ssgProxy.d.mts +33 -0
- package/dist/server/ssgProxy.d.mts.map +1 -0
- package/dist/server/ssgProxy.d.ts +18 -16
- package/dist/server/ssgProxy.d.ts.map +1 -1
- package/dist/server/ssgProxy.js +130 -137
- package/dist/server/ssgProxy.mjs +129 -134
- package/dist/server/ssgProxy.mjs.map +1 -0
- package/dist/shared/hooks/createHooksInternal.d.mts +42 -0
- package/dist/shared/hooks/createHooksInternal.d.mts.map +1 -0
- package/dist/shared/hooks/createHooksInternal.d.ts +33 -22
- package/dist/shared/hooks/createHooksInternal.d.ts.map +1 -1
- package/dist/shared/hooks/createHooksInternal.js +427 -537
- package/dist/shared/hooks/createHooksInternal.mjs +426 -515
- package/dist/shared/hooks/createHooksInternal.mjs.map +1 -0
- package/dist/shared/hooks/createRootHooks.js +1 -0
- package/dist/shared/hooks/createRootHooks.mjs +1 -0
- package/dist/shared/hooks/types.d.mts +154 -0
- package/dist/shared/hooks/types.d.mts.map +1 -0
- package/dist/shared/hooks/types.d.ts +122 -125
- package/dist/shared/hooks/types.d.ts.map +1 -1
- package/dist/shared/index.d.mts +16 -0
- package/dist/shared/index.d.ts +16 -22
- package/dist/shared/index.js +17 -21
- package/dist/shared/index.mjs +9 -7
- package/dist/shared/polymorphism/mutationLike.d.mts +27 -0
- package/dist/shared/polymorphism/mutationLike.d.mts.map +1 -0
- package/dist/shared/polymorphism/mutationLike.d.ts +16 -6
- package/dist/shared/polymorphism/mutationLike.d.ts.map +1 -1
- package/dist/shared/polymorphism/queryLike.d.mts +31 -0
- package/dist/shared/polymorphism/queryLike.d.mts.map +1 -0
- package/dist/shared/polymorphism/queryLike.d.ts +20 -10
- package/dist/shared/polymorphism/queryLike.d.ts.map +1 -1
- package/dist/shared/polymorphism/routerLike.d.mts +19 -0
- package/dist/shared/polymorphism/routerLike.d.mts.map +1 -0
- package/dist/shared/polymorphism/routerLike.d.ts +15 -7
- package/dist/shared/polymorphism/routerLike.d.ts.map +1 -1
- package/dist/shared/polymorphism/utilsLike.d.mts +17 -0
- package/dist/shared/polymorphism/utilsLike.d.mts.map +1 -0
- package/dist/shared/polymorphism/utilsLike.d.ts +13 -3
- package/dist/shared/polymorphism/utilsLike.d.ts.map +1 -1
- package/dist/shared/proxy/decorationProxy.d.mts +19 -0
- package/dist/shared/proxy/decorationProxy.d.mts.map +1 -0
- package/dist/shared/proxy/decorationProxy.d.ts +14 -3
- package/dist/shared/proxy/decorationProxy.d.ts.map +1 -1
- package/dist/shared/proxy/decorationProxy.js +18 -26
- package/dist/shared/proxy/decorationProxy.mjs +17 -23
- package/dist/shared/proxy/decorationProxy.mjs.map +1 -0
- package/dist/shared/proxy/useQueriesProxy.d.mts +24 -0
- package/dist/shared/proxy/useQueriesProxy.d.mts.map +1 -0
- package/dist/shared/proxy/useQueriesProxy.d.ts +11 -12
- package/dist/shared/proxy/useQueriesProxy.d.ts.map +1 -1
- package/dist/shared/proxy/useQueriesProxy.js +25 -23
- package/dist/shared/proxy/useQueriesProxy.mjs +24 -20
- package/dist/shared/proxy/useQueriesProxy.mjs.map +1 -0
- package/dist/shared/proxy/utilsProxy.d.mts +143 -0
- package/dist/shared/proxy/utilsProxy.d.mts.map +1 -0
- package/dist/shared/proxy/utilsProxy.d.ts +123 -121
- package/dist/shared/proxy/utilsProxy.d.ts.map +1 -1
- package/dist/shared/proxy/utilsProxy.js +82 -95
- package/dist/shared/proxy/utilsProxy.mjs +81 -92
- package/dist/shared/proxy/utilsProxy.mjs.map +1 -0
- package/dist/shared/queryClient.d.mts +26 -0
- package/dist/shared/queryClient.d.mts.map +1 -0
- package/dist/shared/queryClient.d.ts +17 -8
- package/dist/shared/queryClient.d.ts.map +1 -1
- package/dist/shared/queryClient.js +8 -6
- package/dist/shared/queryClient.mjs +7 -3
- package/dist/shared/queryClient.mjs.map +1 -0
- package/dist/shared/types.d.mts +99 -0
- package/dist/shared/types.d.mts.map +1 -0
- package/dist/shared/types.d.ts +72 -71
- package/dist/shared/types.d.ts.map +1 -1
- package/dist/utils/createUtilityFunctions.d.mts +24 -0
- package/dist/utils/createUtilityFunctions.d.mts.map +1 -0
- package/dist/utils/createUtilityFunctions.d.ts +16 -15
- package/dist/utils/createUtilityFunctions.d.ts.map +1 -1
- package/dist/utils/createUtilityFunctions.js +166 -192
- package/dist/utils/createUtilityFunctions.mjs +165 -189
- package/dist/utils/createUtilityFunctions.mjs.map +1 -0
- package/dist/utils/inferReactQueryProcedure.d.mts +30 -0
- package/dist/utils/inferReactQueryProcedure.d.mts.map +1 -0
- package/dist/utils/inferReactQueryProcedure.d.ts +17 -12
- package/dist/utils/inferReactQueryProcedure.d.ts.map +1 -1
- package/package.json +48 -28
- package/rsc/package.json +1 -0
- package/server/index/package.json +1 -0
- package/server/package.json +1 -0
- package/shared/index/package.json +1 -0
- package/shared/package.json +1 -0
- package/src/createTRPCReact.tsx +0 -4
- package/src/shared/hooks/createHooksInternal.tsx +2 -0
- package/src/shared/hooks/types.ts +0 -2
- package/src/shared/proxy/decorationProxy.ts +1 -1
- package/src/shared/types.ts +2 -2
- package/dist/index.d.ts.map +0 -1
- package/dist/internals/trpcResult.d.ts +0 -18
- package/dist/internals/trpcResult.d.ts.map +0 -1
- package/dist/server/index.d.ts.map +0 -1
- package/dist/shared/hooks/createRootHooks.d.ts +0 -2
- package/dist/shared/hooks/createRootHooks.d.ts.map +0 -1
- package/dist/shared/index.d.ts.map +0 -1
- package/dist/shared/polymorphism/index.d.ts +0 -5
- package/dist/shared/polymorphism/index.d.ts.map +0 -1
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { DecoratedTRPCContextProps, SSRState, TRPCContext$1 as TRPCContext, TRPCContextProps, TRPCContextPropsBase, TRPCContextState, TRPCFetchInfiniteQueryOptions, TRPCFetchQueryOptions, TRPCQueryUtils, contextProps$1 as contextProps } from "../internals/context.mjs";
|
|
2
|
+
import { CreateClient, DefinedUseTRPCQueryOptions, DefinedUseTRPCQueryResult, ExtractCursorType, OutputWithCursor, TRPCHookResult, TRPCProvider, TRPCProviderProps, TRPCQueryOptions, TRPCReactRequestOptions, TRPCSubscriptionBaseResult, TRPCSubscriptionConnectingResult, TRPCSubscriptionErrorResult, TRPCSubscriptionIdleResult, TRPCSubscriptionPendingResult, TRPCSubscriptionResult, TRPCUseQueryBaseOptions, UseTRPCInfiniteQueryOptions, UseTRPCInfiniteQueryResult, UseTRPCInfiniteQuerySuccessResult, UseTRPCMutationOptions, UseTRPCMutationResult, UseTRPCPrefetchInfiniteQueryOptions, UseTRPCPrefetchQueryOptions, UseTRPCQueryOptions, UseTRPCQueryResult, UseTRPCQuerySuccessResult, UseTRPCSubscriptionOptions, UseTRPCSuspenseInfiniteQueryOptions, UseTRPCSuspenseInfiniteQueryResult, UseTRPCSuspenseQueryOptions, UseTRPCSuspenseQueryResult } from "./hooks/types.mjs";
|
|
3
|
+
import { CreateTRPCReactOptions, DefinedTRPCInfiniteQueryOptionsIn, DefinedTRPCInfiniteQueryOptionsOut, DefinedTRPCQueryOptionsIn, DefinedTRPCQueryOptionsOut, TRPCQueryBaseOptions, TRPCQueryOptionsResult, UndefinedTRPCInfiniteQueryOptionsIn, UndefinedTRPCInfiniteQueryOptionsOut, UndefinedTRPCQueryOptionsIn, UndefinedTRPCQueryOptionsOut, UnusedSkipTokenTRPCInfiniteQueryOptionsIn, UnusedSkipTokenTRPCInfiniteQueryOptionsOut, UnusedSkipTokenTRPCQueryOptionsIn, UnusedSkipTokenTRPCQueryOptionsOut, UseMutationOverride } from "./types.mjs";
|
|
4
|
+
import { createRootHooks$1 as createRootHooks } from "./hooks/createHooksInternal.mjs";
|
|
5
|
+
import { createReactDecoration$1 as createReactDecoration } from "./proxy/decorationProxy.mjs";
|
|
6
|
+
import { CreateQueryUtils, CreateReactUtils, DecorateQueryProcedure, DecoratedProcedureUtilsRecord, createQueryUtilsProxy$1 as createQueryUtilsProxy, createReactQueryUtils$1 as createReactQueryUtils, getQueryType$1 as getQueryType } from "./proxy/utilsProxy.mjs";
|
|
7
|
+
import { UseQueriesProcedureRecord, UseSuspenseQueriesProcedureRecord, createUseQueries$1 as createUseQueries } from "./proxy/useQueriesProxy.mjs";
|
|
8
|
+
import { CreateTRPCReactQueryClientConfig, getQueryClient$1 as getQueryClient } from "./queryClient.mjs";
|
|
9
|
+
import { InferMutationLikeData, InferMutationLikeInput, MutationLike } from "./polymorphism/mutationLike.mjs";
|
|
10
|
+
import { InferQueryLikeData, InferQueryLikeInput, QueryLike } from "./polymorphism/queryLike.mjs";
|
|
11
|
+
import { RouterLike, RouterLikeInner } from "./polymorphism/routerLike.mjs";
|
|
12
|
+
import { UtilsLike } from "./polymorphism/utilsLike.mjs";
|
|
13
|
+
import { getClientArgs$1 as getClientArgs } from "../internals/getClientArgs.mjs";
|
|
14
|
+
import { TRPCUseQueries, TRPCUseSuspenseQueries } from "../internals/useQueries.mjs";
|
|
15
|
+
import { DecorateProcedure, DecorateRouterRecord } from "../createTRPCReact.mjs";
|
|
16
|
+
export { CreateClient, CreateQueryUtils, CreateReactUtils, CreateTRPCReactOptions, CreateTRPCReactQueryClientConfig, DecorateProcedure, DecorateQueryProcedure, DecorateRouterRecord, DecoratedProcedureUtilsRecord, DecoratedTRPCContextProps, DefinedTRPCInfiniteQueryOptionsIn, DefinedTRPCInfiniteQueryOptionsOut, DefinedTRPCQueryOptionsIn, DefinedTRPCQueryOptionsOut, DefinedUseTRPCQueryOptions, DefinedUseTRPCQueryResult, ExtractCursorType, InferMutationLikeData, InferMutationLikeInput, InferQueryLikeData, InferQueryLikeInput, MutationLike, OutputWithCursor, QueryLike, RouterLike, RouterLikeInner, SSRState, TRPCContext, TRPCContextProps, TRPCContextPropsBase, TRPCContextState, TRPCFetchInfiniteQueryOptions, TRPCFetchQueryOptions, TRPCHookResult, TRPCProvider, TRPCProviderProps, TRPCQueryBaseOptions, TRPCQueryOptions, TRPCQueryOptionsResult, TRPCQueryUtils, TRPCReactRequestOptions, TRPCSubscriptionBaseResult, TRPCSubscriptionConnectingResult, TRPCSubscriptionErrorResult, TRPCSubscriptionIdleResult, TRPCSubscriptionPendingResult, TRPCSubscriptionResult, TRPCUseQueries, TRPCUseQueryBaseOptions, TRPCUseSuspenseQueries, UndefinedTRPCInfiniteQueryOptionsIn, UndefinedTRPCInfiniteQueryOptionsOut, UndefinedTRPCQueryOptionsIn, UndefinedTRPCQueryOptionsOut, UnusedSkipTokenTRPCInfiniteQueryOptionsIn, UnusedSkipTokenTRPCInfiniteQueryOptionsOut, UnusedSkipTokenTRPCQueryOptionsIn, UnusedSkipTokenTRPCQueryOptionsOut, UseMutationOverride, UseQueriesProcedureRecord, UseSuspenseQueriesProcedureRecord, UseTRPCInfiniteQueryOptions, UseTRPCInfiniteQueryResult, UseTRPCInfiniteQuerySuccessResult, UseTRPCMutationOptions, UseTRPCMutationResult, UseTRPCPrefetchInfiniteQueryOptions, UseTRPCPrefetchQueryOptions, UseTRPCQueryOptions, UseTRPCQueryResult, UseTRPCQuerySuccessResult, UseTRPCSubscriptionOptions, UseTRPCSuspenseInfiniteQueryOptions, UseTRPCSuspenseInfiniteQueryResult, UseTRPCSuspenseQueryOptions, UseTRPCSuspenseQueryResult, UtilsLike, contextProps, createQueryUtilsProxy, createReactDecoration, createReactQueryUtils, createRootHooks, createUseQueries, getClientArgs, getQueryClient, getQueryType };
|
package/dist/shared/index.d.ts
CHANGED
|
@@ -1,22 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
export {
|
|
17
|
-
/**
|
|
18
|
-
* @deprecated
|
|
19
|
-
*/
|
|
20
|
-
TRPCContext, } from './../internals/context';
|
|
21
|
-
export * from '../internals/context';
|
|
22
|
-
//# sourceMappingURL=index.d.ts.map
|
|
1
|
+
import { DecoratedTRPCContextProps, SSRState, TRPCContext, TRPCContextProps, TRPCContextPropsBase, TRPCContextState, TRPCFetchInfiniteQueryOptions, TRPCFetchQueryOptions, TRPCQueryUtils, contextProps } from "../internals/context.js";
|
|
2
|
+
import { CreateClient, DefinedUseTRPCQueryOptions, DefinedUseTRPCQueryResult, ExtractCursorType, OutputWithCursor, TRPCHookResult, TRPCProvider, TRPCProviderProps, TRPCQueryOptions, TRPCReactRequestOptions, TRPCSubscriptionBaseResult, TRPCSubscriptionConnectingResult, TRPCSubscriptionErrorResult, TRPCSubscriptionIdleResult, TRPCSubscriptionPendingResult, TRPCSubscriptionResult, TRPCUseQueryBaseOptions, UseTRPCInfiniteQueryOptions, UseTRPCInfiniteQueryResult, UseTRPCInfiniteQuerySuccessResult, UseTRPCMutationOptions, UseTRPCMutationResult, UseTRPCPrefetchInfiniteQueryOptions, UseTRPCPrefetchQueryOptions, UseTRPCQueryOptions, UseTRPCQueryResult, UseTRPCQuerySuccessResult, UseTRPCSubscriptionOptions, UseTRPCSuspenseInfiniteQueryOptions, UseTRPCSuspenseInfiniteQueryResult, UseTRPCSuspenseQueryOptions, UseTRPCSuspenseQueryResult } from "./hooks/types.js";
|
|
3
|
+
import { CreateTRPCReactOptions, DefinedTRPCInfiniteQueryOptionsIn, DefinedTRPCInfiniteQueryOptionsOut, DefinedTRPCQueryOptionsIn, DefinedTRPCQueryOptionsOut, TRPCQueryBaseOptions, TRPCQueryOptionsResult, UndefinedTRPCInfiniteQueryOptionsIn, UndefinedTRPCInfiniteQueryOptionsOut, UndefinedTRPCQueryOptionsIn, UndefinedTRPCQueryOptionsOut, UnusedSkipTokenTRPCInfiniteQueryOptionsIn, UnusedSkipTokenTRPCInfiniteQueryOptionsOut, UnusedSkipTokenTRPCQueryOptionsIn, UnusedSkipTokenTRPCQueryOptionsOut, UseMutationOverride } from "./types.js";
|
|
4
|
+
import { createRootHooks } from "./hooks/createHooksInternal.js";
|
|
5
|
+
import { createReactDecoration } from "./proxy/decorationProxy.js";
|
|
6
|
+
import { CreateQueryUtils, CreateReactUtils, DecorateQueryProcedure, DecoratedProcedureUtilsRecord, createQueryUtilsProxy, createReactQueryUtils, getQueryType } from "./proxy/utilsProxy.js";
|
|
7
|
+
import { UseQueriesProcedureRecord, UseSuspenseQueriesProcedureRecord, createUseQueries } from "./proxy/useQueriesProxy.js";
|
|
8
|
+
import { CreateTRPCReactQueryClientConfig, getQueryClient } from "./queryClient.js";
|
|
9
|
+
import { InferMutationLikeData, InferMutationLikeInput, MutationLike } from "./polymorphism/mutationLike.js";
|
|
10
|
+
import { InferQueryLikeData, InferQueryLikeInput, QueryLike } from "./polymorphism/queryLike.js";
|
|
11
|
+
import { RouterLike, RouterLikeInner } from "./polymorphism/routerLike.js";
|
|
12
|
+
import { UtilsLike } from "./polymorphism/utilsLike.js";
|
|
13
|
+
import { getClientArgs } from "../internals/getClientArgs.js";
|
|
14
|
+
import { TRPCUseQueries, TRPCUseSuspenseQueries } from "../internals/useQueries.js";
|
|
15
|
+
import { DecorateProcedure, DecorateRouterRecord } from "../createTRPCReact.js";
|
|
16
|
+
export { CreateClient, CreateQueryUtils, CreateReactUtils, CreateTRPCReactOptions, CreateTRPCReactQueryClientConfig, DecorateProcedure, DecorateQueryProcedure, DecorateRouterRecord, DecoratedProcedureUtilsRecord, DecoratedTRPCContextProps, DefinedTRPCInfiniteQueryOptionsIn, DefinedTRPCInfiniteQueryOptionsOut, DefinedTRPCQueryOptionsIn, DefinedTRPCQueryOptionsOut, DefinedUseTRPCQueryOptions, DefinedUseTRPCQueryResult, ExtractCursorType, InferMutationLikeData, InferMutationLikeInput, InferQueryLikeData, InferQueryLikeInput, MutationLike, OutputWithCursor, QueryLike, RouterLike, RouterLikeInner, SSRState, TRPCContext, TRPCContextProps, TRPCContextPropsBase, TRPCContextState, TRPCFetchInfiniteQueryOptions, TRPCFetchQueryOptions, TRPCHookResult, TRPCProvider, TRPCProviderProps, TRPCQueryBaseOptions, TRPCQueryOptions, TRPCQueryOptionsResult, TRPCQueryUtils, TRPCReactRequestOptions, TRPCSubscriptionBaseResult, TRPCSubscriptionConnectingResult, TRPCSubscriptionErrorResult, TRPCSubscriptionIdleResult, TRPCSubscriptionPendingResult, TRPCSubscriptionResult, TRPCUseQueries, TRPCUseQueryBaseOptions, TRPCUseSuspenseQueries, UndefinedTRPCInfiniteQueryOptionsIn, UndefinedTRPCInfiniteQueryOptionsOut, UndefinedTRPCQueryOptionsIn, UndefinedTRPCQueryOptionsOut, UnusedSkipTokenTRPCInfiniteQueryOptionsIn, UnusedSkipTokenTRPCInfiniteQueryOptionsOut, UnusedSkipTokenTRPCQueryOptionsIn, UnusedSkipTokenTRPCQueryOptionsOut, UseMutationOverride, UseQueriesProcedureRecord, UseSuspenseQueriesProcedureRecord, UseTRPCInfiniteQueryOptions, UseTRPCInfiniteQueryResult, UseTRPCInfiniteQuerySuccessResult, UseTRPCMutationOptions, UseTRPCMutationResult, UseTRPCPrefetchInfiniteQueryOptions, UseTRPCPrefetchQueryOptions, UseTRPCQueryOptions, UseTRPCQueryResult, UseTRPCQuerySuccessResult, UseTRPCSubscriptionOptions, UseTRPCSuspenseInfiniteQueryOptions, UseTRPCSuspenseInfiniteQueryResult, UseTRPCSuspenseQueryOptions, UseTRPCSuspenseQueryResult, UtilsLike, contextProps, createQueryUtilsProxy, createReactDecoration, createReactQueryUtils, createRootHooks, createUseQueries, getClientArgs, getQueryClient, getQueryType };
|
package/dist/shared/index.js
CHANGED
|
@@ -1,22 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
const require__Users_julius_dev_trpc_packages_react_query_src_shared_proxy_decorationProxy = require('./proxy/decorationProxy.js');
|
|
2
|
+
const require__Users_julius_dev_trpc_packages_react_query_src_internals_context = require('../internals/context.js');
|
|
3
|
+
const require__Users_julius_dev_trpc_packages_react_query_src_shared_proxy_utilsProxy = require('./proxy/utilsProxy.js');
|
|
4
|
+
const require__Users_julius_dev_trpc_packages_react_query_src_shared_proxy_useQueriesProxy = require('./proxy/useQueriesProxy.js');
|
|
5
|
+
const require__Users_julius_dev_trpc_packages_react_query_src_internals_getClientArgs = require('../internals/getClientArgs.js');
|
|
6
|
+
const require__Users_julius_dev_trpc_packages_react_query_src_shared_hooks_createHooksInternal = require('./hooks/createHooksInternal.js');
|
|
7
|
+
const require__Users_julius_dev_trpc_packages_react_query_src_shared_queryClient = require('./queryClient.js');
|
|
2
8
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
exports.createReactDecoration = decorationProxy.createReactDecoration;
|
|
14
|
-
exports.createQueryUtilsProxy = utilsProxy.createQueryUtilsProxy;
|
|
15
|
-
exports.createReactQueryUtils = utilsProxy.createReactQueryUtils;
|
|
16
|
-
exports.getQueryType = utilsProxy.getQueryType;
|
|
17
|
-
exports.createUseQueries = useQueriesProxy.createUseQueries;
|
|
18
|
-
exports.createRootHooks = createHooksInternal.createRootHooks;
|
|
19
|
-
exports.getQueryClient = queryClient.getQueryClient;
|
|
20
|
-
exports.getClientArgs = getClientArgs.getClientArgs;
|
|
21
|
-
exports.TRPCContext = context.TRPCContext;
|
|
22
|
-
exports.contextProps = context.contextProps;
|
|
9
|
+
exports.TRPCContext = require__Users_julius_dev_trpc_packages_react_query_src_internals_context.TRPCContext;
|
|
10
|
+
exports.contextProps = require__Users_julius_dev_trpc_packages_react_query_src_internals_context.contextProps;
|
|
11
|
+
exports.createQueryUtilsProxy = require__Users_julius_dev_trpc_packages_react_query_src_shared_proxy_utilsProxy.createQueryUtilsProxy;
|
|
12
|
+
exports.createReactDecoration = require__Users_julius_dev_trpc_packages_react_query_src_shared_proxy_decorationProxy.createReactDecoration;
|
|
13
|
+
exports.createReactQueryUtils = require__Users_julius_dev_trpc_packages_react_query_src_shared_proxy_utilsProxy.createReactQueryUtils;
|
|
14
|
+
exports.createRootHooks = require__Users_julius_dev_trpc_packages_react_query_src_shared_hooks_createHooksInternal.createRootHooks;
|
|
15
|
+
exports.createUseQueries = require__Users_julius_dev_trpc_packages_react_query_src_shared_proxy_useQueriesProxy.createUseQueries;
|
|
16
|
+
exports.getClientArgs = require__Users_julius_dev_trpc_packages_react_query_src_internals_getClientArgs.getClientArgs;
|
|
17
|
+
exports.getQueryClient = require__Users_julius_dev_trpc_packages_react_query_src_shared_queryClient.getQueryClient;
|
|
18
|
+
exports.getQueryType = require__Users_julius_dev_trpc_packages_react_query_src_shared_proxy_utilsProxy.getQueryType;
|
package/dist/shared/index.mjs
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { createReactDecoration } from "./proxy/decorationProxy.mjs";
|
|
2
|
+
import { TRPCContext, contextProps } from "../internals/context.mjs";
|
|
3
|
+
import { createQueryUtilsProxy, createReactQueryUtils, getQueryType } from "./proxy/utilsProxy.mjs";
|
|
4
|
+
import { createUseQueries } from "./proxy/useQueriesProxy.mjs";
|
|
5
|
+
import { getClientArgs } from "../internals/getClientArgs.mjs";
|
|
6
|
+
import { createRootHooks } from "./hooks/createHooksInternal.mjs";
|
|
7
|
+
import { getQueryClient } from "./queryClient.mjs";
|
|
8
|
+
|
|
9
|
+
export { TRPCContext, contextProps, createQueryUtilsProxy, createReactDecoration, createReactQueryUtils, createRootHooks, createUseQueries, getClientArgs, getQueryClient, getQueryType };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { InferMutationOptions, InferMutationResult } from "../../utils/inferReactQueryProcedure.mjs";
|
|
2
|
+
import { AnyProcedure, AnyRootTypes, inferProcedureInput, inferTransformedProcedureOutput } from "@trpc/server/unstable-core-do-not-import";
|
|
3
|
+
|
|
4
|
+
//#region src/shared/polymorphism/mutationLike.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Use to describe a mutation route which matches a given mutation procedure's interface
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Use to describe a mutation route which matches a given mutation procedure's interface
|
|
10
|
+
*/
|
|
11
|
+
type MutationLike<TRoot extends AnyRootTypes, TProcedure extends AnyProcedure> = {
|
|
12
|
+
useMutation: (opts?: InferMutationOptions<TRoot, TProcedure>) => InferMutationResult<TRoot, TProcedure>;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Use to unwrap a MutationLike's input
|
|
16
|
+
*/
|
|
17
|
+
type InferMutationLikeInput<TMutationLike extends MutationLike<any, any>> = TMutationLike extends MutationLike<any, infer $Procedure> ? inferProcedureInput<$Procedure> : never;
|
|
18
|
+
/**
|
|
19
|
+
* Use to unwrap a MutationLike's data output
|
|
20
|
+
*/
|
|
21
|
+
type InferMutationLikeData<TMutationLike extends MutationLike<any, any>> = TMutationLike extends MutationLike<infer TRoot, infer TProcedure> ? inferTransformedProcedureOutput<TRoot, TProcedure> : never;
|
|
22
|
+
|
|
23
|
+
//#endregion
|
|
24
|
+
//# sourceMappingURL=mutationLike.d.ts.map
|
|
25
|
+
|
|
26
|
+
export { InferMutationLikeData, InferMutationLikeInput, MutationLike };
|
|
27
|
+
//# sourceMappingURL=mutationLike.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mutationLike.d.mts","names":[],"sources":["../../../src/shared/polymorphism/mutationLike.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;KAcY,2BACI,iCACK;uBAGV,qBAAqB,OAAO,gBAChC,oBAAoB,OAAO;AANlC,CAAA;;;;AAKgC,KAOpB,sBAPoB,CAAA,sBAQR,YARQ,CAAA,GAAA,EAAA,GAAA,CAAA,CAAA,GAU9B,aAV8B,SAUR,YAVQ,CAAA,GAAA,EAAA,KAAA,WAAA,CAAA,GAW1B,mBAX0B,CAWN,UAXM,CAAA,GAAA,KAAA;;;;AACE,KAgBtB,qBAhBsB,CAAA,sBAiBV,YAjBU,CAAA,GAAA,EAAA,GAAA,CAAA,CAAA,GAmBhC,aAnBgC,SAmBV,YAnBU,CAAA,KAAA,MAAA,EAAA,KAAA,WAAA,CAAA,GAoB5B,+BApB4B,CAoBI,KApBJ,EAoBW,UApBX,CAAA,GAAA,KAAA"}
|
|
@@ -1,17 +1,27 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { InferMutationOptions, InferMutationResult } from "../../utils/inferReactQueryProcedure.js";
|
|
2
|
+
import { AnyProcedure, AnyRootTypes, inferProcedureInput, inferTransformedProcedureOutput } from "@trpc/server/unstable-core-do-not-import";
|
|
3
|
+
|
|
4
|
+
//#region src/shared/polymorphism/mutationLike.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Use to describe a mutation route which matches a given mutation procedure's interface
|
|
7
|
+
*/
|
|
3
8
|
/**
|
|
4
9
|
* Use to describe a mutation route which matches a given mutation procedure's interface
|
|
5
10
|
*/
|
|
6
|
-
|
|
7
|
-
|
|
11
|
+
type MutationLike<TRoot extends AnyRootTypes, TProcedure extends AnyProcedure> = {
|
|
12
|
+
useMutation: (opts?: InferMutationOptions<TRoot, TProcedure>) => InferMutationResult<TRoot, TProcedure>;
|
|
8
13
|
};
|
|
9
14
|
/**
|
|
10
15
|
* Use to unwrap a MutationLike's input
|
|
11
16
|
*/
|
|
12
|
-
|
|
17
|
+
type InferMutationLikeInput<TMutationLike extends MutationLike<any, any>> = TMutationLike extends MutationLike<any, infer $Procedure> ? inferProcedureInput<$Procedure> : never;
|
|
13
18
|
/**
|
|
14
19
|
* Use to unwrap a MutationLike's data output
|
|
15
20
|
*/
|
|
16
|
-
|
|
21
|
+
type InferMutationLikeData<TMutationLike extends MutationLike<any, any>> = TMutationLike extends MutationLike<infer TRoot, infer TProcedure> ? inferTransformedProcedureOutput<TRoot, TProcedure> : never;
|
|
22
|
+
|
|
23
|
+
//#endregion
|
|
24
|
+
//# sourceMappingURL=mutationLike.d.ts.map
|
|
25
|
+
|
|
26
|
+
export { InferMutationLikeData, InferMutationLikeInput, MutationLike };
|
|
17
27
|
//# sourceMappingURL=mutationLike.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mutationLike.d.ts","
|
|
1
|
+
{"version":3,"file":"mutationLike.d.ts","names":[],"sources":["../../../src/shared/polymorphism/mutationLike.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;KAcY,2BACI,iCACK;uBAGV,qBAAqB,OAAO,gBAChC,oBAAoB,OAAO;AANlC,CAAA;;;;AAKgC,KAOpB,sBAPoB,CAAA,sBAQR,YARQ,CAAA,GAAA,EAAA,GAAA,CAAA,CAAA,GAU9B,aAV8B,SAUR,YAVQ,CAAA,GAAA,EAAA,KAAA,WAAA,CAAA,GAW1B,mBAX0B,CAWN,UAXM,CAAA,GAAA,KAAA;;;;AACE,KAgBtB,qBAhBsB,CAAA,sBAiBV,YAjBU,CAAA,GAAA,EAAA,GAAA,CAAA,CAAA,GAmBhC,aAnBgC,SAmBV,YAnBU,CAAA,KAAA,MAAA,EAAA,KAAA,WAAA,CAAA,GAoB5B,+BApB4B,CAoBI,KApBJ,EAoBW,UApBX,CAAA,GAAA,KAAA"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { UseTRPCSuspenseQueryResult } from "../hooks/types.mjs";
|
|
2
|
+
import { InferQueryOptions, InferQueryResult } from "../../utils/inferReactQueryProcedure.mjs";
|
|
3
|
+
import { DecoratedQuery } from "../../createTRPCReact.mjs";
|
|
4
|
+
import { TRPCClientErrorLike } from "@trpc/client";
|
|
5
|
+
import { AnyProcedure, AnyRootTypes, inferProcedureInput, inferProcedureOutput, inferTransformedProcedureOutput } from "@trpc/server/unstable-core-do-not-import";
|
|
6
|
+
|
|
7
|
+
//#region src/shared/polymorphism/queryLike.d.ts
|
|
8
|
+
/**
|
|
9
|
+
* Use to request a query route which matches a given query procedure's interface
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* Use to request a query route which matches a given query procedure's interface
|
|
13
|
+
*/
|
|
14
|
+
type QueryLike<TRoot extends AnyRootTypes, TProcedure extends AnyProcedure> = {
|
|
15
|
+
useQuery: (variables: inferProcedureInput<TProcedure>, opts?: InferQueryOptions<TRoot, TProcedure, any>) => InferQueryResult<TRoot, TProcedure>;
|
|
16
|
+
useSuspenseQuery: (variables: inferProcedureInput<TProcedure>, opts?: InferQueryOptions<TRoot, TProcedure, any>) => UseTRPCSuspenseQueryResult<inferProcedureOutput<TProcedure>, TRPCClientErrorLike<TRoot>>;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Use to unwrap a QueryLike's input
|
|
20
|
+
*/
|
|
21
|
+
type InferQueryLikeInput<TQueryLike> = TQueryLike extends DecoratedQuery<infer $Def> ? $Def['input'] : TQueryLike extends QueryLike<any, infer TProcedure> ? inferProcedureInput<TProcedure> : never;
|
|
22
|
+
/**
|
|
23
|
+
* Use to unwrap a QueryLike's data output
|
|
24
|
+
*/
|
|
25
|
+
type InferQueryLikeData<TQueryLike> = TQueryLike extends DecoratedQuery<infer $Def> ? $Def['output'] : TQueryLike extends QueryLike<infer TRoot, infer TProcedure> ? inferTransformedProcedureOutput<TRoot, TProcedure> : never;
|
|
26
|
+
|
|
27
|
+
//#endregion
|
|
28
|
+
//# sourceMappingURL=queryLike.d.ts.map
|
|
29
|
+
|
|
30
|
+
export { InferQueryLikeData, InferQueryLikeInput, QueryLike };
|
|
31
|
+
//# sourceMappingURL=queryLike.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"queryLike.d.mts","names":[],"sources":["../../../src/shared/polymorphism/queryLike.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;;KAkBY,wBACI,iCACK;wBAGN,oBAAoB,oBACxB,kBAAkB,OAAO,qBAC7B,iBAAiB,OAAO;EAPnB,gBAAS,EAAA,CAAA,SAAA,EAUN,mBAVM,CAUc,UAVd,CAAA,EAAA,IAAA,CAAA,EAWV,iBAXU,CAWQ,KAXR,EAWe,UAXf,EAAA,GAAA,CAAA,EAAA,GAYd,0BAZc,CAajB,oBAbiB,CAaI,UAbJ,CAAA,EAcjB,mBAdiB,CAcG,KAdH,CAAA,CAAA;CAAA;;;;AAKN,KAgBH,mBAhBG,CAAA,UAAA,CAAA,GAiBb,UAjBa,SAiBM,cAjBN,CAAA,KAAA,KAAA,CAAA,GAkBT,IAlBS,CAAA,OAAA,CAAA,GAmBT,UAnBS,SAmBU,SAnBV,CAAA,GAAA,EAAA,KAAA,WAAA,CAAA,GAoBP,mBApBO,CAoBa,UApBb,CAAA,GAAA,KAAA;;;;AAES,KAwBZ,kBAxBY,CAAA,UAAA,CAAA,GAyBtB,UAzBsB,SAyBH,cAzBG,CAAA,KAAA,KAAA,CAAA,GA0BlB,IA1BkB,CAAA,QAAA,CAAA,GA2BlB,UA3BkB,SA2BC,SA3BD,CAAA,KAAA,MAAA,EAAA,KAAA,WAAA,CAAA,GA4BhB,+BA5BgB,CA4BgB,KA5BhB,EA4BuB,UA5BvB,CAAA,GAAA,KAAA"}
|
|
@@ -1,21 +1,31 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
1
|
+
import { UseTRPCSuspenseQueryResult } from "../hooks/types.js";
|
|
2
|
+
import { InferQueryOptions, InferQueryResult } from "../../utils/inferReactQueryProcedure.js";
|
|
3
|
+
import { DecoratedQuery } from "../../createTRPCReact.js";
|
|
4
|
+
import { TRPCClientErrorLike } from "@trpc/client";
|
|
5
|
+
import { AnyProcedure, AnyRootTypes, inferProcedureInput, inferProcedureOutput, inferTransformedProcedureOutput } from "@trpc/server/unstable-core-do-not-import";
|
|
6
|
+
|
|
7
|
+
//#region src/shared/polymorphism/queryLike.d.ts
|
|
8
|
+
/**
|
|
9
|
+
* Use to request a query route which matches a given query procedure's interface
|
|
10
|
+
*/
|
|
6
11
|
/**
|
|
7
12
|
* Use to request a query route which matches a given query procedure's interface
|
|
8
13
|
*/
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
14
|
+
type QueryLike<TRoot extends AnyRootTypes, TProcedure extends AnyProcedure> = {
|
|
15
|
+
useQuery: (variables: inferProcedureInput<TProcedure>, opts?: InferQueryOptions<TRoot, TProcedure, any>) => InferQueryResult<TRoot, TProcedure>;
|
|
16
|
+
useSuspenseQuery: (variables: inferProcedureInput<TProcedure>, opts?: InferQueryOptions<TRoot, TProcedure, any>) => UseTRPCSuspenseQueryResult<inferProcedureOutput<TProcedure>, TRPCClientErrorLike<TRoot>>;
|
|
12
17
|
};
|
|
13
18
|
/**
|
|
14
19
|
* Use to unwrap a QueryLike's input
|
|
15
20
|
*/
|
|
16
|
-
|
|
21
|
+
type InferQueryLikeInput<TQueryLike> = TQueryLike extends DecoratedQuery<infer $Def> ? $Def['input'] : TQueryLike extends QueryLike<any, infer TProcedure> ? inferProcedureInput<TProcedure> : never;
|
|
17
22
|
/**
|
|
18
23
|
* Use to unwrap a QueryLike's data output
|
|
19
24
|
*/
|
|
20
|
-
|
|
25
|
+
type InferQueryLikeData<TQueryLike> = TQueryLike extends DecoratedQuery<infer $Def> ? $Def['output'] : TQueryLike extends QueryLike<infer TRoot, infer TProcedure> ? inferTransformedProcedureOutput<TRoot, TProcedure> : never;
|
|
26
|
+
|
|
27
|
+
//#endregion
|
|
28
|
+
//# sourceMappingURL=queryLike.d.ts.map
|
|
29
|
+
|
|
30
|
+
export { InferQueryLikeData, InferQueryLikeInput, QueryLike };
|
|
21
31
|
//# sourceMappingURL=queryLike.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queryLike.d.ts","
|
|
1
|
+
{"version":3,"file":"queryLike.d.ts","names":[],"sources":["../../../src/shared/polymorphism/queryLike.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;;KAkBY,wBACI,iCACK;wBAGN,oBAAoB,oBACxB,kBAAkB,OAAO,qBAC7B,iBAAiB,OAAO;EAPnB,gBAAS,EAAA,CAAA,SAAA,EAUN,mBAVM,CAUc,UAVd,CAAA,EAAA,IAAA,CAAA,EAWV,iBAXU,CAWQ,KAXR,EAWe,UAXf,EAAA,GAAA,CAAA,EAAA,GAYd,0BAZc,CAajB,oBAbiB,CAaI,UAbJ,CAAA,EAcjB,mBAdiB,CAcG,KAdH,CAAA,CAAA;CAAA;;;;AAKN,KAgBH,mBAhBG,CAAA,UAAA,CAAA,GAiBb,UAjBa,SAiBM,cAjBN,CAAA,KAAA,KAAA,CAAA,GAkBT,IAlBS,CAAA,OAAA,CAAA,GAmBT,UAnBS,SAmBU,SAnBV,CAAA,GAAA,EAAA,KAAA,WAAA,CAAA,GAoBP,mBApBO,CAoBa,UApBb,CAAA,GAAA,KAAA;;;;AAES,KAwBZ,kBAxBY,CAAA,UAAA,CAAA,GAyBtB,UAzBsB,SAyBH,cAzBG,CAAA,KAAA,KAAA,CAAA,GA0BlB,IA1BkB,CAAA,QAAA,CAAA,GA2BlB,UA3BkB,SA2BC,SA3BD,CAAA,KAAA,MAAA,EAAA,KAAA,WAAA,CAAA,GA4BhB,+BA5BgB,CA4BgB,KA5BhB,EA4BuB,UA5BvB,CAAA,GAAA,KAAA"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { MutationLike } from "./mutationLike.mjs";
|
|
2
|
+
import { QueryLike } from "./queryLike.mjs";
|
|
3
|
+
import { AnyMutationProcedure, AnyQueryProcedure, AnyRootTypes, AnyRouter, RouterRecord } from "@trpc/server/unstable-core-do-not-import";
|
|
4
|
+
|
|
5
|
+
//#region src/shared/polymorphism/routerLike.d.ts
|
|
6
|
+
/**
|
|
7
|
+
* Use to describe a route path which matches a given route's interface
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Use to describe a route path which matches a given route's interface
|
|
11
|
+
*/
|
|
12
|
+
type RouterLike<TRouter extends AnyRouter> = RouterLikeInner<TRouter['_def']['_config']['$types'], TRouter['_def']['record']>;
|
|
13
|
+
type RouterLikeInner<TRoot extends AnyRootTypes, TRecord extends RouterRecord> = { [TKey in keyof TRecord]: TRecord[TKey] extends infer $Value ? $Value extends AnyQueryProcedure ? QueryLike<TRoot, $Value> : $Value extends AnyMutationProcedure ? MutationLike<TRoot, $Value> : $Value extends RouterRecord ? RouterLikeInner<TRoot, $Value> : never : never };
|
|
14
|
+
|
|
15
|
+
//#endregion
|
|
16
|
+
//# sourceMappingURL=routerLike.d.ts.map
|
|
17
|
+
|
|
18
|
+
export { RouterLike, RouterLikeInner };
|
|
19
|
+
//# sourceMappingURL=routerLike.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"routerLike.d.mts","names":[],"sources":["../../../src/shared/polymorphism/routerLike.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;KAaY,2BAA2B,aAAa,gBAClD,sCACA;KAEU,8BACI,8BACE,2BANN,MAQK,OARK,GAQK,OARL,CAQa,IARb,CAAA,SAAA,KAAA,OAAA,GAShB,MATgB,SASD,iBATC,GAUd,SAVc,CAUJ,KAVI,EAUG,MAVH,CAAA,GAWd,MAXc,SAWC,oBAXD,GAYZ,YAZY,CAYC,KAZD,EAYQ,MAZR,CAAA,GAaZ,MAbY,SAaG,YAbH,GAcV,eAdU,CAcM,KAdN,EAca,MAdb,CAAA,GAAA,KAAA,GAAA,KAAA,EAAA"}
|
|
@@ -1,11 +1,19 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { MutationLike } from "./mutationLike.js";
|
|
2
|
+
import { QueryLike } from "./queryLike.js";
|
|
3
|
+
import { AnyMutationProcedure, AnyQueryProcedure, AnyRootTypes, AnyRouter, RouterRecord } from "@trpc/server/unstable-core-do-not-import";
|
|
4
|
+
|
|
5
|
+
//#region src/shared/polymorphism/routerLike.d.ts
|
|
6
|
+
/**
|
|
7
|
+
* Use to describe a route path which matches a given route's interface
|
|
8
|
+
*/
|
|
4
9
|
/**
|
|
5
10
|
* Use to describe a route path which matches a given route's interface
|
|
6
11
|
*/
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
12
|
+
type RouterLike<TRouter extends AnyRouter> = RouterLikeInner<TRouter['_def']['_config']['$types'], TRouter['_def']['record']>;
|
|
13
|
+
type RouterLikeInner<TRoot extends AnyRootTypes, TRecord extends RouterRecord> = { [TKey in keyof TRecord]: TRecord[TKey] extends infer $Value ? $Value extends AnyQueryProcedure ? QueryLike<TRoot, $Value> : $Value extends AnyMutationProcedure ? MutationLike<TRoot, $Value> : $Value extends RouterRecord ? RouterLikeInner<TRoot, $Value> : never : never };
|
|
14
|
+
|
|
15
|
+
//#endregion
|
|
16
|
+
//# sourceMappingURL=routerLike.d.ts.map
|
|
17
|
+
|
|
18
|
+
export { RouterLike, RouterLikeInner };
|
|
11
19
|
//# sourceMappingURL=routerLike.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routerLike.d.ts","
|
|
1
|
+
{"version":3,"file":"routerLike.d.ts","names":[],"sources":["../../../src/shared/polymorphism/routerLike.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;KAaY,2BAA2B,aAAa,gBAClD,sCACA;KAEU,8BACI,8BACE,2BANN,MAQK,OARK,GAQK,OARL,CAQa,IARb,CAAA,SAAA,KAAA,OAAA,GAShB,MATgB,SASD,iBATC,GAUd,SAVc,CAUJ,KAVI,EAUG,MAVH,CAAA,GAWd,MAXc,SAWC,oBAXD,GAYZ,YAZY,CAYC,KAZD,EAYQ,MAZR,CAAA,GAaZ,MAbY,SAaG,YAbH,GAcV,eAdU,CAcM,KAdN,EAca,MAdb,CAAA,GAAA,KAAA,GAAA,KAAA,EAAA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { DecoratedProcedureUtilsRecord } from "../proxy/utilsProxy.mjs";
|
|
2
|
+
import { AnyRouter } from "@trpc/server/unstable-core-do-not-import";
|
|
3
|
+
|
|
4
|
+
//#region src/shared/polymorphism/utilsLike.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Use to describe a Utils/Context path which matches the given route's interface
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Use to describe a Utils/Context path which matches the given route's interface
|
|
10
|
+
*/
|
|
11
|
+
type UtilsLike<TRouter extends AnyRouter> = DecoratedProcedureUtilsRecord<TRouter['_def']['_config']['$types'], TRouter['_def']['record']>;
|
|
12
|
+
|
|
13
|
+
//#endregion
|
|
14
|
+
//# sourceMappingURL=utilsLike.d.ts.map
|
|
15
|
+
|
|
16
|
+
export { UtilsLike };
|
|
17
|
+
//# sourceMappingURL=utilsLike.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utilsLike.d.mts","names":[],"sources":["../../../src/shared/polymorphism/utilsLike.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;KAMY,0BAA0B,aACpC,8BACE,sCACA"}
|
|
@@ -1,7 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { DecoratedProcedureUtilsRecord } from "../proxy/utilsProxy.js";
|
|
2
|
+
import { AnyRouter } from "@trpc/server/unstable-core-do-not-import";
|
|
3
|
+
|
|
4
|
+
//#region src/shared/polymorphism/utilsLike.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Use to describe a Utils/Context path which matches the given route's interface
|
|
7
|
+
*/
|
|
3
8
|
/**
|
|
4
9
|
* Use to describe a Utils/Context path which matches the given route's interface
|
|
5
10
|
*/
|
|
6
|
-
|
|
11
|
+
type UtilsLike<TRouter extends AnyRouter> = DecoratedProcedureUtilsRecord<TRouter['_def']['_config']['$types'], TRouter['_def']['record']>;
|
|
12
|
+
|
|
13
|
+
//#endregion
|
|
14
|
+
//# sourceMappingURL=utilsLike.d.ts.map
|
|
15
|
+
|
|
16
|
+
export { UtilsLike };
|
|
7
17
|
//# sourceMappingURL=utilsLike.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utilsLike.d.ts","
|
|
1
|
+
{"version":3,"file":"utilsLike.d.ts","names":[],"sources":["../../../src/shared/polymorphism/utilsLike.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;KAMY,0BAA0B,aACpC,8BACE,sCACA"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { CreateReactQueryHooks } from "../hooks/createHooksInternal.mjs";
|
|
2
|
+
import { AnyRouter } from "@trpc/server/unstable-core-do-not-import";
|
|
3
|
+
|
|
4
|
+
//#region src/shared/proxy/decorationProxy.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Create proxy for decorating procedures
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Create proxy for decorating procedures
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
|
+
declare function createReactDecoration<TRouter extends AnyRouter, TSSRContext = unknown>(hooks: CreateReactQueryHooks<TRouter, TSSRContext>): unknown;
|
|
14
|
+
|
|
15
|
+
//#endregion
|
|
16
|
+
//# sourceMappingURL=decorationProxy.d.ts.map
|
|
17
|
+
|
|
18
|
+
export { createReactDecoration as createReactDecoration$1 };
|
|
19
|
+
//# sourceMappingURL=decorationProxy.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"decorationProxy.d.mts","names":[],"sources":["../../../src/shared/proxy/decorationProxy.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;iBAQgB,sCACE,yCAET,sBAAsB,SAAS"}
|
|
@@ -1,8 +1,19 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { CreateReactQueryHooks } from "../hooks/createHooksInternal.js";
|
|
2
|
+
import { AnyRouter } from "@trpc/server/unstable-core-do-not-import";
|
|
3
|
+
|
|
4
|
+
//#region src/shared/proxy/decorationProxy.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Create proxy for decorating procedures
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
3
9
|
/**
|
|
4
10
|
* Create proxy for decorating procedures
|
|
5
11
|
* @internal
|
|
6
12
|
*/
|
|
7
|
-
|
|
13
|
+
declare function createReactDecoration<TRouter extends AnyRouter, TSSRContext = unknown>(hooks: CreateReactQueryHooks<TRouter, TSSRContext>): unknown;
|
|
14
|
+
|
|
15
|
+
//#endregion
|
|
16
|
+
//# sourceMappingURL=decorationProxy.d.ts.map
|
|
17
|
+
|
|
18
|
+
export { createReactDecoration };
|
|
8
19
|
//# sourceMappingURL=decorationProxy.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decorationProxy.d.ts","
|
|
1
|
+
{"version":3,"file":"decorationProxy.d.ts","names":[],"sources":["../../../src/shared/proxy/decorationProxy.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;iBAQgB,sCACE,yCAET,sBAAsB,SAAS"}
|
|
@@ -1,30 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var unstableCoreDoNotImport = require('@trpc/server/unstable-core-do-not-import');
|
|
1
|
+
const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.js');
|
|
2
|
+
const __trpc_server_unstable_core_do_not_import = require_rolldown_runtime.__toESM(require("@trpc/server/unstable-core-do-not-import"));
|
|
4
3
|
|
|
4
|
+
//#region src/shared/proxy/decorationProxy.ts
|
|
5
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
if (lastArg === '_def') {
|
|
20
|
-
return {
|
|
21
|
-
path: pathCopy
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
const [input, ...rest] = args;
|
|
25
|
-
const opts = rest[0] || {};
|
|
26
|
-
return hooks[lastArg](pathCopy, input, opts);
|
|
27
|
-
});
|
|
6
|
+
* Create proxy for decorating procedures
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
|
+
function createReactDecoration(hooks) {
|
|
10
|
+
return (0, __trpc_server_unstable_core_do_not_import.createRecursiveProxy)(({ path, args }) => {
|
|
11
|
+
const pathCopy = [...path];
|
|
12
|
+
const lastArg = pathCopy.pop();
|
|
13
|
+
if (lastArg === "useMutation") return hooks[lastArg](pathCopy, ...args);
|
|
14
|
+
if (lastArg === "_def") return { path: pathCopy };
|
|
15
|
+
const [input, ...rest] = args;
|
|
16
|
+
const opts = rest[0] ?? {};
|
|
17
|
+
return hooks[lastArg](pathCopy, input, opts);
|
|
18
|
+
});
|
|
28
19
|
}
|
|
29
20
|
|
|
30
|
-
|
|
21
|
+
//#endregion
|
|
22
|
+
exports.createReactDecoration = createReactDecoration;
|
|
@@ -1,28 +1,22 @@
|
|
|
1
|
-
import { createRecursiveProxy } from
|
|
1
|
+
import { createRecursiveProxy } from "@trpc/server/unstable-core-do-not-import";
|
|
2
2
|
|
|
3
|
+
//#region src/shared/proxy/decorationProxy.ts
|
|
3
4
|
/**
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
if (lastArg === '_def') {
|
|
18
|
-
return {
|
|
19
|
-
path: pathCopy
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
const [input, ...rest] = args;
|
|
23
|
-
const opts = rest[0] || {};
|
|
24
|
-
return hooks[lastArg](pathCopy, input, opts);
|
|
25
|
-
});
|
|
5
|
+
* Create proxy for decorating procedures
|
|
6
|
+
* @internal
|
|
7
|
+
*/
|
|
8
|
+
function createReactDecoration(hooks) {
|
|
9
|
+
return createRecursiveProxy(({ path, args }) => {
|
|
10
|
+
const pathCopy = [...path];
|
|
11
|
+
const lastArg = pathCopy.pop();
|
|
12
|
+
if (lastArg === "useMutation") return hooks[lastArg](pathCopy, ...args);
|
|
13
|
+
if (lastArg === "_def") return { path: pathCopy };
|
|
14
|
+
const [input, ...rest] = args;
|
|
15
|
+
const opts = rest[0] ?? {};
|
|
16
|
+
return hooks[lastArg](pathCopy, input, opts);
|
|
17
|
+
});
|
|
26
18
|
}
|
|
27
19
|
|
|
20
|
+
//#endregion
|
|
28
21
|
export { createReactDecoration };
|
|
22
|
+
//# sourceMappingURL=decorationProxy.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"decorationProxy.mjs","names":["hooks: CreateReactQueryHooks<TRouter, TSSRContext>"],"sources":["../../../src/shared/proxy/decorationProxy.ts"],"sourcesContent":["import type { AnyRouter } from '@trpc/server/unstable-core-do-not-import';\nimport { createRecursiveProxy } from '@trpc/server/unstable-core-do-not-import';\nimport type { CreateReactQueryHooks } from '../hooks/createHooksInternal';\n\n/**\n * Create proxy for decorating procedures\n * @internal\n */\nexport function createReactDecoration<\n TRouter extends AnyRouter,\n TSSRContext = unknown,\n>(hooks: CreateReactQueryHooks<TRouter, TSSRContext>) {\n return createRecursiveProxy(({ path, args }) => {\n const pathCopy = [...path];\n\n // The last arg is for instance `.useMutation` or `.useQuery()`\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const lastArg = pathCopy.pop()!;\n\n if (lastArg === 'useMutation') {\n return (hooks as any)[lastArg](pathCopy, ...args);\n }\n\n if (lastArg === '_def') {\n return {\n path: pathCopy,\n };\n }\n\n const [input, ...rest] = args;\n const opts = rest[0] ?? {};\n\n return (hooks as any)[lastArg](pathCopy, input, opts);\n });\n}\n"],"mappings":";;;;;;;AAQA,SAAgB,sBAGdA,OAAoD;AACpD,QAAO,qBAAqB,CAAC,EAAE,MAAM,MAAM,KAAK;EAC9C,MAAM,WAAW,CAAC,GAAG,IAAK;EAI1B,MAAM,UAAU,SAAS,KAAK;AAE9B,MAAI,YAAY,cACd,QAAO,AAAC,MAAc,SAAS,UAAU,GAAG,KAAK;AAGnD,MAAI,YAAY,OACd,QAAO,EACL,MAAM,SACP;EAGH,MAAM,CAAC,OAAO,GAAG,KAAK,GAAG;EACzB,MAAM,OAAO,KAAK,MAAM,CAAE;AAE1B,SAAO,AAAC,MAAc,SAAS,UAAU,OAAO,KAAK;CACtD,EAAC;AACH"}
|