@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.
Files changed (161) hide show
  1. package/dist/_virtual/rolldown_runtime.js +30 -0
  2. package/dist/createTRPCQueryUtils.d.mts +12 -0
  3. package/dist/createTRPCQueryUtils.d.mts.map +1 -0
  4. package/dist/createTRPCQueryUtils.d.ts +11 -3
  5. package/dist/createTRPCQueryUtils.d.ts.map +1 -1
  6. package/dist/createTRPCQueryUtils.js +7 -12
  7. package/dist/createTRPCQueryUtils.mjs +7 -9
  8. package/dist/createTRPCQueryUtils.mjs.map +1 -0
  9. package/dist/createTRPCReact.d.mts +143 -0
  10. package/dist/createTRPCReact.d.mts.map +1 -0
  11. package/dist/createTRPCReact.d.ts +92 -96
  12. package/dist/createTRPCReact.d.ts.map +1 -1
  13. package/dist/createTRPCReact.js +26 -54
  14. package/dist/createTRPCReact.mjs +26 -32
  15. package/dist/createTRPCReact.mjs.map +1 -0
  16. package/dist/index.d.mts +6 -0
  17. package/dist/index.d.ts +6 -6
  18. package/dist/index.js +11 -15
  19. package/dist/index.mjs +7 -4
  20. package/dist/internals/context.d.mts +164 -0
  21. package/dist/internals/context.d.mts.map +1 -0
  22. package/dist/internals/context.d.ts +146 -139
  23. package/dist/internals/context.d.ts.map +1 -1
  24. package/dist/internals/context.js +10 -28
  25. package/dist/internals/context.mjs +8 -5
  26. package/dist/internals/context.mjs.map +1 -0
  27. package/dist/internals/getClientArgs.d.mts +19 -0
  28. package/dist/internals/getClientArgs.d.mts.map +1 -0
  29. package/dist/internals/getClientArgs.d.ts +14 -4
  30. package/dist/internals/getClientArgs.d.ts.map +1 -1
  31. package/dist/internals/getClientArgs.js +18 -20
  32. package/dist/internals/getClientArgs.mjs +18 -18
  33. package/dist/internals/getClientArgs.mjs.map +1 -0
  34. package/dist/internals/getQueryKey.d.mts +45 -0
  35. package/dist/internals/getQueryKey.d.mts.map +1 -0
  36. package/dist/internals/getQueryKey.d.ts +22 -26
  37. package/dist/internals/getQueryKey.d.ts.map +1 -1
  38. package/dist/internals/getQueryKey.js +43 -62
  39. package/dist/internals/getQueryKey.mjs +42 -59
  40. package/dist/internals/getQueryKey.mjs.map +1 -0
  41. package/dist/internals/trpcResult.js +27 -53
  42. package/dist/internals/trpcResult.mjs +26 -31
  43. package/dist/internals/trpcResult.mjs.map +1 -0
  44. package/dist/internals/useQueries.d.mts +57 -0
  45. package/dist/internals/useQueries.d.mts.map +1 -0
  46. package/dist/internals/useQueries.d.ts +23 -24
  47. package/dist/internals/useQueries.d.ts.map +1 -1
  48. package/dist/rsc.d.mts +81 -0
  49. package/dist/rsc.d.mts.map +1 -0
  50. package/dist/rsc.d.ts +57 -56
  51. package/dist/rsc.d.ts.map +1 -1
  52. package/dist/rsc.js +66 -126
  53. package/dist/rsc.mjs +65 -104
  54. package/dist/rsc.mjs.map +1 -0
  55. package/dist/server/index.d.mts +2 -0
  56. package/dist/server/index.d.ts +2 -2
  57. package/dist/server/index.js +2 -6
  58. package/dist/server/index.mjs +3 -1
  59. package/dist/server/ssgProxy.d.mts +33 -0
  60. package/dist/server/ssgProxy.d.mts.map +1 -0
  61. package/dist/server/ssgProxy.d.ts +18 -16
  62. package/dist/server/ssgProxy.d.ts.map +1 -1
  63. package/dist/server/ssgProxy.js +130 -137
  64. package/dist/server/ssgProxy.mjs +129 -134
  65. package/dist/server/ssgProxy.mjs.map +1 -0
  66. package/dist/shared/hooks/createHooksInternal.d.mts +42 -0
  67. package/dist/shared/hooks/createHooksInternal.d.mts.map +1 -0
  68. package/dist/shared/hooks/createHooksInternal.d.ts +33 -22
  69. package/dist/shared/hooks/createHooksInternal.d.ts.map +1 -1
  70. package/dist/shared/hooks/createHooksInternal.js +427 -537
  71. package/dist/shared/hooks/createHooksInternal.mjs +426 -515
  72. package/dist/shared/hooks/createHooksInternal.mjs.map +1 -0
  73. package/dist/shared/hooks/createRootHooks.js +1 -0
  74. package/dist/shared/hooks/createRootHooks.mjs +1 -0
  75. package/dist/shared/hooks/types.d.mts +154 -0
  76. package/dist/shared/hooks/types.d.mts.map +1 -0
  77. package/dist/shared/hooks/types.d.ts +122 -125
  78. package/dist/shared/hooks/types.d.ts.map +1 -1
  79. package/dist/shared/index.d.mts +16 -0
  80. package/dist/shared/index.d.ts +16 -22
  81. package/dist/shared/index.js +17 -21
  82. package/dist/shared/index.mjs +9 -7
  83. package/dist/shared/polymorphism/mutationLike.d.mts +27 -0
  84. package/dist/shared/polymorphism/mutationLike.d.mts.map +1 -0
  85. package/dist/shared/polymorphism/mutationLike.d.ts +16 -6
  86. package/dist/shared/polymorphism/mutationLike.d.ts.map +1 -1
  87. package/dist/shared/polymorphism/queryLike.d.mts +31 -0
  88. package/dist/shared/polymorphism/queryLike.d.mts.map +1 -0
  89. package/dist/shared/polymorphism/queryLike.d.ts +20 -10
  90. package/dist/shared/polymorphism/queryLike.d.ts.map +1 -1
  91. package/dist/shared/polymorphism/routerLike.d.mts +19 -0
  92. package/dist/shared/polymorphism/routerLike.d.mts.map +1 -0
  93. package/dist/shared/polymorphism/routerLike.d.ts +15 -7
  94. package/dist/shared/polymorphism/routerLike.d.ts.map +1 -1
  95. package/dist/shared/polymorphism/utilsLike.d.mts +17 -0
  96. package/dist/shared/polymorphism/utilsLike.d.mts.map +1 -0
  97. package/dist/shared/polymorphism/utilsLike.d.ts +13 -3
  98. package/dist/shared/polymorphism/utilsLike.d.ts.map +1 -1
  99. package/dist/shared/proxy/decorationProxy.d.mts +19 -0
  100. package/dist/shared/proxy/decorationProxy.d.mts.map +1 -0
  101. package/dist/shared/proxy/decorationProxy.d.ts +14 -3
  102. package/dist/shared/proxy/decorationProxy.d.ts.map +1 -1
  103. package/dist/shared/proxy/decorationProxy.js +18 -26
  104. package/dist/shared/proxy/decorationProxy.mjs +17 -23
  105. package/dist/shared/proxy/decorationProxy.mjs.map +1 -0
  106. package/dist/shared/proxy/useQueriesProxy.d.mts +24 -0
  107. package/dist/shared/proxy/useQueriesProxy.d.mts.map +1 -0
  108. package/dist/shared/proxy/useQueriesProxy.d.ts +11 -12
  109. package/dist/shared/proxy/useQueriesProxy.d.ts.map +1 -1
  110. package/dist/shared/proxy/useQueriesProxy.js +25 -23
  111. package/dist/shared/proxy/useQueriesProxy.mjs +24 -20
  112. package/dist/shared/proxy/useQueriesProxy.mjs.map +1 -0
  113. package/dist/shared/proxy/utilsProxy.d.mts +143 -0
  114. package/dist/shared/proxy/utilsProxy.d.mts.map +1 -0
  115. package/dist/shared/proxy/utilsProxy.d.ts +123 -121
  116. package/dist/shared/proxy/utilsProxy.d.ts.map +1 -1
  117. package/dist/shared/proxy/utilsProxy.js +82 -95
  118. package/dist/shared/proxy/utilsProxy.mjs +81 -92
  119. package/dist/shared/proxy/utilsProxy.mjs.map +1 -0
  120. package/dist/shared/queryClient.d.mts +26 -0
  121. package/dist/shared/queryClient.d.mts.map +1 -0
  122. package/dist/shared/queryClient.d.ts +17 -8
  123. package/dist/shared/queryClient.d.ts.map +1 -1
  124. package/dist/shared/queryClient.js +8 -6
  125. package/dist/shared/queryClient.mjs +7 -3
  126. package/dist/shared/queryClient.mjs.map +1 -0
  127. package/dist/shared/types.d.mts +99 -0
  128. package/dist/shared/types.d.mts.map +1 -0
  129. package/dist/shared/types.d.ts +72 -71
  130. package/dist/shared/types.d.ts.map +1 -1
  131. package/dist/utils/createUtilityFunctions.d.mts +24 -0
  132. package/dist/utils/createUtilityFunctions.d.mts.map +1 -0
  133. package/dist/utils/createUtilityFunctions.d.ts +16 -15
  134. package/dist/utils/createUtilityFunctions.d.ts.map +1 -1
  135. package/dist/utils/createUtilityFunctions.js +166 -192
  136. package/dist/utils/createUtilityFunctions.mjs +165 -189
  137. package/dist/utils/createUtilityFunctions.mjs.map +1 -0
  138. package/dist/utils/inferReactQueryProcedure.d.mts +30 -0
  139. package/dist/utils/inferReactQueryProcedure.d.mts.map +1 -0
  140. package/dist/utils/inferReactQueryProcedure.d.ts +17 -12
  141. package/dist/utils/inferReactQueryProcedure.d.ts.map +1 -1
  142. package/package.json +48 -28
  143. package/rsc/package.json +1 -0
  144. package/server/index/package.json +1 -0
  145. package/server/package.json +1 -0
  146. package/shared/index/package.json +1 -0
  147. package/shared/package.json +1 -0
  148. package/src/createTRPCReact.tsx +0 -4
  149. package/src/shared/hooks/createHooksInternal.tsx +2 -0
  150. package/src/shared/hooks/types.ts +0 -2
  151. package/src/shared/proxy/decorationProxy.ts +1 -1
  152. package/src/shared/types.ts +2 -2
  153. package/dist/index.d.ts.map +0 -1
  154. package/dist/internals/trpcResult.d.ts +0 -18
  155. package/dist/internals/trpcResult.d.ts.map +0 -1
  156. package/dist/server/index.d.ts.map +0 -1
  157. package/dist/shared/hooks/createRootHooks.d.ts +0 -2
  158. package/dist/shared/hooks/createRootHooks.d.ts.map +0 -1
  159. package/dist/shared/index.d.ts.map +0 -1
  160. package/dist/shared/polymorphism/index.d.ts +0 -5
  161. 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 };
@@ -1,22 +1,16 @@
1
- export * from './proxy/decorationProxy';
2
- export * from './proxy/utilsProxy';
3
- export * from './proxy/useQueriesProxy';
4
- export type { DecorateRouterRecord, DecorateProcedure, } from '../createTRPCReact';
5
- export type { TRPCUseQueries, TRPCUseSuspenseQueries, } from '../internals/useQueries';
6
- export * from './hooks/createRootHooks';
7
- export * from './queryClient';
8
- export * from './types';
9
- export * from './hooks/types';
10
- export * from './polymorphism';
11
- export {
12
- /**
13
- * @deprecated this is an internal function
14
- */
15
- getClientArgs, } from '../internals/getClientArgs';
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 };
@@ -1,22 +1,18 @@
1
- 'use strict';
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
- var decorationProxy = require('./proxy/decorationProxy.js');
4
- var utilsProxy = require('./proxy/utilsProxy.js');
5
- var useQueriesProxy = require('./proxy/useQueriesProxy.js');
6
- var createHooksInternal = require('./hooks/createHooksInternal.js');
7
- var queryClient = require('./queryClient.js');
8
- var getClientArgs = require('../internals/getClientArgs.js');
9
- var context = require('../internals/context.js');
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;
@@ -1,7 +1,9 @@
1
- export { createReactDecoration } from './proxy/decorationProxy.mjs';
2
- export { createQueryUtilsProxy, createReactQueryUtils, getQueryType } from './proxy/utilsProxy.mjs';
3
- export { createUseQueries } from './proxy/useQueriesProxy.mjs';
4
- export { createRootHooks } from './hooks/createHooksInternal.mjs';
5
- export { getQueryClient } from './queryClient.mjs';
6
- export { getClientArgs } from '../internals/getClientArgs.mjs';
7
- export { TRPCContext, contextProps } from '../internals/context.mjs';
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 type { AnyProcedure, AnyRootTypes, inferProcedureInput, inferTransformedProcedureOutput } from '@trpc/server/unstable-core-do-not-import';
2
- import type { InferMutationOptions, InferMutationResult } from '../../utils/inferReactQueryProcedure';
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
- export type MutationLike<TRoot extends AnyRootTypes, TProcedure extends AnyProcedure> = {
7
- useMutation: (opts?: InferMutationOptions<TRoot, TProcedure>) => InferMutationResult<TRoot, TProcedure>;
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
- export type InferMutationLikeInput<TMutationLike extends MutationLike<any, any>> = TMutationLike extends MutationLike<any, infer $Procedure> ? inferProcedureInput<$Procedure> : never;
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
- export type InferMutationLikeData<TMutationLike extends MutationLike<any, any>> = TMutationLike extends MutationLike<infer TRoot, infer TProcedure> ? inferTransformedProcedureOutput<TRoot, TProcedure> : never;
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","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,IAE5C,aAAa,SAAS,YAAY,CAAC,GAAG,EAAE,MAAM,UAAU,CAAC,GACrD,mBAAmB,CAAC,UAAU,CAAC,GAC/B,KAAK,CAAC;AAEZ;;GAEG;AACH,MAAM,MAAM,qBAAqB,CAC/B,aAAa,SAAS,YAAY,CAAC,GAAG,EAAE,GAAG,CAAC,IAE5C,aAAa,SAAS,YAAY,CAAC,MAAM,KAAK,EAAE,MAAM,UAAU,CAAC,GAC7D,+BAA+B,CAAC,KAAK,EAAE,UAAU,CAAC,GAClD,KAAK,CAAC"}
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 type { TRPCClientErrorLike } from '@trpc/client';
2
- import type { AnyProcedure, AnyRootTypes, inferProcedureInput, inferProcedureOutput, inferTransformedProcedureOutput } from '@trpc/server/unstable-core-do-not-import';
3
- import type { DecoratedQuery } from '../../createTRPCReact';
4
- import type { InferQueryOptions, InferQueryResult } from '../../utils/inferReactQueryProcedure';
5
- import type { UseTRPCSuspenseQueryResult } from '../hooks/types';
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
- export type QueryLike<TRoot extends AnyRootTypes, TProcedure extends AnyProcedure> = {
10
- useQuery: (variables: inferProcedureInput<TProcedure>, opts?: InferQueryOptions<TRoot, TProcedure, any>) => InferQueryResult<TRoot, TProcedure>;
11
- useSuspenseQuery: (variables: inferProcedureInput<TProcedure>, opts?: InferQueryOptions<TRoot, TProcedure, any>) => UseTRPCSuspenseQueryResult<inferProcedureOutput<TProcedure>, TRPCClientErrorLike<TRoot>>;
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
- export type InferQueryLikeInput<TQueryLike> = TQueryLike extends DecoratedQuery<infer $Def> ? $Def['input'] : TQueryLike extends QueryLike<any, infer TProcedure> ? inferProcedureInput<TProcedure> : never;
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
- export type InferQueryLikeData<TQueryLike> = TQueryLike extends DecoratedQuery<infer $Def> ? $Def['output'] : TQueryLike extends QueryLike<infer TRoot, infer TProcedure> ? inferTransformedProcedureOutput<TRoot, TProcedure> : never;
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","sourceRoot":"","sources":["../../../src/shared/polymorphism/queryLike.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,KAAK,EACV,YAAY,EACZ,YAAY,EACZ,mBAAmB,EACnB,oBAAoB,EACpB,+BAA+B,EAChC,MAAM,0CAA0C,CAAC;AAClD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC5D,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,KAAK,SAAS,YAAY,EAC1B,UAAU,SAAS,YAAY,IAC7B;IACF,QAAQ,EAAE,CACR,SAAS,EAAE,mBAAmB,CAAC,UAAU,CAAC,EAC1C,IAAI,CAAC,EAAE,iBAAiB,CAAC,KAAK,EAAE,UAAU,EAAE,GAAG,CAAC,KAC7C,gBAAgB,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;IAEzC,gBAAgB,EAAE,CAChB,SAAS,EAAE,mBAAmB,CAAC,UAAU,CAAC,EAC1C,IAAI,CAAC,EAAE,iBAAiB,CAAC,KAAK,EAAE,UAAU,EAAE,GAAG,CAAC,KAC7C,0BAA0B,CAC7B,oBAAoB,CAAC,UAAU,CAAC,EAChC,mBAAmB,CAAC,KAAK,CAAC,CAC3B,CAAC;CACH,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,mBAAmB,CAAC,UAAU,IACxC,UAAU,SAAS,cAAc,CAAC,MAAM,IAAI,CAAC,GACzC,IAAI,CAAC,OAAO,CAAC,GACb,UAAU,SAAS,SAAS,CAAC,GAAG,EAAE,MAAM,UAAU,CAAC,GACjD,mBAAmB,CAAC,UAAU,CAAC,GAC/B,KAAK,CAAC;AAEd;;GAEG;AACH,MAAM,MAAM,kBAAkB,CAAC,UAAU,IACvC,UAAU,SAAS,cAAc,CAAC,MAAM,IAAI,CAAC,GACzC,IAAI,CAAC,QAAQ,CAAC,GACd,UAAU,SAAS,SAAS,CAAC,MAAM,KAAK,EAAE,MAAM,UAAU,CAAC,GACzD,+BAA+B,CAAC,KAAK,EAAE,UAAU,CAAC,GAClD,KAAK,CAAC"}
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 type { AnyMutationProcedure, AnyQueryProcedure, AnyRootTypes, AnyRouter, RouterRecord } from '@trpc/server/unstable-core-do-not-import';
2
- import type { MutationLike } from './mutationLike';
3
- import type { QueryLike } from './queryLike';
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
- export type RouterLike<TRouter extends AnyRouter> = RouterLikeInner<TRouter['_def']['_config']['$types'], TRouter['_def']['record']>;
8
- export type RouterLikeInner<TRoot extends AnyRootTypes, TRecord extends RouterRecord> = {
9
- [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;
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","sourceRoot":"","sources":["../../../src/shared/polymorphism/routerLike.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,oBAAoB,EACpB,iBAAiB,EACjB,YAAY,EACZ,SAAS,EACT,YAAY,EACb,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,QAAQ,CAAC,CAC1B,CAAC;AACF,MAAM,MAAM,eAAe,CACzB,KAAK,SAAS,YAAY,EAC1B,OAAO,SAAS,YAAY,IAC1B;KACD,IAAI,IAAI,MAAM,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,SAAS,MAAM,MAAM,GACvD,MAAM,SAAS,iBAAiB,GAC9B,SAAS,CAAC,KAAK,EAAE,MAAM,CAAC,GACxB,MAAM,SAAS,oBAAoB,GACjC,YAAY,CAAC,KAAK,EAAE,MAAM,CAAC,GAC3B,MAAM,SAAS,YAAY,GACzB,eAAe,CAAC,KAAK,EAAE,MAAM,CAAC,GAC9B,KAAK,GACX,KAAK;CACV,CAAC"}
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 type { AnyRouter } from '@trpc/server/unstable-core-do-not-import';
2
- import type { DecoratedProcedureUtilsRecord } from '../proxy/utilsProxy';
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
- export type UtilsLike<TRouter extends AnyRouter> = DecoratedProcedureUtilsRecord<TRouter['_def']['_config']['$types'], TRouter['_def']['record']>;
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","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,CAC3B,OAAO,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,EACpC,OAAO,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,CAC1B,CAAC"}
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 type { AnyRouter } from '@trpc/server/unstable-core-do-not-import';
2
- import type { CreateReactQueryHooks } from '../hooks/createHooksInternal';
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
- export declare function createReactDecoration<TRouter extends AnyRouter, TSSRContext = unknown>(hooks: CreateReactQueryHooks<TRouter, TSSRContext>): unknown;
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","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,KAAK,EAAE,qBAAqB,CAAC,OAAO,EAAE,WAAW,CAAC,WAuBnD"}
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
- 'use strict';
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
- * Create proxy for decorating procedures
7
- * @internal
8
- */ function createReactDecoration(hooks) {
9
- return unstableCoreDoNotImport.createRecursiveProxy(({ path, args })=>{
10
- const pathCopy = [
11
- ...path
12
- ];
13
- // The last arg is for instance `.useMutation` or `.useQuery()`
14
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
15
- const lastArg = pathCopy.pop();
16
- if (lastArg === 'useMutation') {
17
- return hooks[lastArg](pathCopy, ...args);
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
- exports.createReactDecoration = createReactDecoration;
21
+ //#endregion
22
+ exports.createReactDecoration = createReactDecoration;
@@ -1,28 +1,22 @@
1
- import { createRecursiveProxy } from '@trpc/server/unstable-core-do-not-import';
1
+ import { createRecursiveProxy } from "@trpc/server/unstable-core-do-not-import";
2
2
 
3
+ //#region src/shared/proxy/decorationProxy.ts
3
4
  /**
4
- * Create proxy for decorating procedures
5
- * @internal
6
- */ function createReactDecoration(hooks) {
7
- return createRecursiveProxy(({ path, args })=>{
8
- const pathCopy = [
9
- ...path
10
- ];
11
- // The last arg is for instance `.useMutation` or `.useQuery()`
12
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
13
- const lastArg = pathCopy.pop();
14
- if (lastArg === 'useMutation') {
15
- return hooks[lastArg](pathCopy, ...args);
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"}