@trpc/react-query 11.0.0-next-beta.241 → 11.0.0-next-beta.248

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 (32) hide show
  1. package/dist/bundle-analysis.json +12 -12
  2. package/dist/createTRPCReact.d.ts +5 -5
  3. package/dist/createTRPCReact.d.ts.map +1 -1
  4. package/dist/internals/getQueryKey.d.ts +2 -2
  5. package/dist/internals/getQueryKey.d.ts.map +1 -1
  6. package/dist/internals/useQueries.d.ts +2 -2
  7. package/dist/internals/useQueries.d.ts.map +1 -1
  8. package/dist/server/ssgProxy.d.ts +4 -4
  9. package/dist/server/ssgProxy.d.ts.map +1 -1
  10. package/dist/shared/index.d.ts +1 -1
  11. package/dist/shared/index.d.ts.map +1 -1
  12. package/dist/shared/polymorphism/routerLike.d.ts +3 -3
  13. package/dist/shared/polymorphism/routerLike.d.ts.map +1 -1
  14. package/dist/shared/polymorphism/utilsLike.d.ts +1 -1
  15. package/dist/shared/polymorphism/utilsLike.d.ts.map +1 -1
  16. package/dist/shared/proxy/useQueriesProxy.d.ts +7 -7
  17. package/dist/shared/proxy/useQueriesProxy.d.ts.map +1 -1
  18. package/dist/shared/proxy/utilsProxy.d.ts +6 -6
  19. package/dist/shared/proxy/utilsProxy.d.ts.map +1 -1
  20. package/dist/utils/inferReactQueryProcedure.d.ts +5 -3
  21. package/dist/utils/inferReactQueryProcedure.d.ts.map +1 -1
  22. package/package.json +6 -6
  23. package/src/createTRPCReact.tsx +10 -12
  24. package/src/internals/getQueryKey.ts +2 -2
  25. package/src/internals/useQueries.ts +8 -2
  26. package/src/server/ssgProxy.ts +17 -13
  27. package/src/shared/index.ts +1 -1
  28. package/src/shared/polymorphism/routerLike.ts +10 -8
  29. package/src/shared/polymorphism/utilsLike.ts +4 -1
  30. package/src/shared/proxy/useQueriesProxy.ts +28 -23
  31. package/src/shared/proxy/utilsProxy.ts +21 -16
  32. package/src/utils/inferReactQueryProcedure.ts +18 -14
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "bundleSize": 27639,
3
- "bundleOrigSize": 62828,
4
- "bundleReduction": 56.01,
3
+ "bundleOrigSize": 62859,
4
+ "bundleReduction": 56.03,
5
5
  "modules": [
6
6
  {
7
7
  "id": "/src/shared/hooks/createHooksInternal.tsx",
@@ -20,7 +20,7 @@
20
20
  {
21
21
  "id": "/src/server/ssgProxy.ts",
22
22
  "size": 3693,
23
- "origSize": 7199,
23
+ "origSize": 7240,
24
24
  "renderedExports": [
25
25
  "createServerSideHelpers"
26
26
  ],
@@ -29,7 +29,7 @@
29
29
  "/src/server/index.ts"
30
30
  ],
31
31
  "percent": 13.36,
32
- "reduction": 48.7
32
+ "reduction": 48.99
33
33
  },
34
34
  {
35
35
  "id": "/src/utils/createUtilityFunctions.ts",
@@ -49,7 +49,7 @@
49
49
  {
50
50
  "id": "/src/shared/proxy/utilsProxy.ts",
51
51
  "size": 2745,
52
- "origSize": 10465,
52
+ "origSize": 10534,
53
53
  "renderedExports": [
54
54
  "getQueryType",
55
55
  "createReactQueryUtils",
@@ -60,12 +60,12 @@
60
60
  "/src/shared/index.ts"
61
61
  ],
62
62
  "percent": 9.93,
63
- "reduction": 73.77
63
+ "reduction": 73.94
64
64
  },
65
65
  {
66
66
  "id": "/src/internals/getQueryKey.ts",
67
67
  "size": 1894,
68
- "origSize": 4214,
68
+ "origSize": 4206,
69
69
  "renderedExports": [
70
70
  "getQueryKeyInternal",
71
71
  "getQueryKey"
@@ -79,12 +79,12 @@
79
79
  "/src/shared/hooks/createHooksInternal.tsx"
80
80
  ],
81
81
  "percent": 6.85,
82
- "reduction": 55.05
82
+ "reduction": 54.97
83
83
  },
84
84
  {
85
85
  "id": "/src/createTRPCReact.tsx",
86
86
  "size": 850,
87
- "origSize": 8715,
87
+ "origSize": 8647,
88
88
  "renderedExports": [
89
89
  "createHooksInternal",
90
90
  "createTRPCReact"
@@ -94,7 +94,7 @@
94
94
  "/src/index.ts"
95
95
  ],
96
96
  "percent": 3.08,
97
- "reduction": 90.25
97
+ "reduction": 90.17
98
98
  },
99
99
  {
100
100
  "id": "/src/shared/proxy/decorationProxy.ts",
@@ -113,7 +113,7 @@
113
113
  {
114
114
  "id": "/src/shared/proxy/useQueriesProxy.ts",
115
115
  "size": 569,
116
- "origSize": 3166,
116
+ "origSize": 3167,
117
117
  "renderedExports": [
118
118
  "createUseQueries"
119
119
  ],
@@ -224,7 +224,7 @@
224
224
  {
225
225
  "id": "/src/shared/index.ts",
226
226
  "size": 0,
227
- "origSize": 710,
227
+ "origSize": 706,
228
228
  "renderedExports": [],
229
229
  "removedExports": [],
230
230
  "dependents": [
@@ -1,5 +1,5 @@
1
1
  import type { TRPCClientErrorLike } from '@trpc/client';
2
- import type { AnyMutationProcedure, AnyProcedure, AnyQueryProcedure, AnyRootTypes, AnyRouter, AnySubscriptionProcedure, inferProcedureInput, inferTransformedProcedureOutput, inferTransformedSubscriptionOutput, ProcedureRouterRecord, ProtectedIntersection } from '@trpc/server/unstable-core-do-not-import';
2
+ import type { AnyMutationProcedure, AnyProcedure, AnyQueryProcedure, AnyRootTypes, AnyRouter, AnySubscriptionProcedure, inferProcedureInput, inferTransformedProcedureOutput, inferTransformedSubscriptionOutput, ProtectedIntersection, RouterRecord } from '@trpc/server/unstable-core-do-not-import';
3
3
  import type { TRPCUseQueries, TRPCUseSuspenseQueries } from './internals/useQueries';
4
4
  import type { CreateReactUtils } from './shared';
5
5
  import type { CreateReactQueryHooks } from './shared/hooks/createHooksInternal';
@@ -69,8 +69,8 @@ export type DecorateProcedure<TRoot extends AnyRootTypes, TProcedure extends Any
69
69
  /**
70
70
  * @internal
71
71
  */
72
- export type DecoratedProcedureRecord<TRoot extends AnyRootTypes, TProcedures extends ProcedureRouterRecord, TFlags> = {
73
- [TKey in keyof TProcedures]: TProcedures[TKey] extends AnyRouter ? DecoratedProcedureRecord<TRoot, TProcedures[TKey]['_def']['record'], TFlags> : TProcedures[TKey] extends AnyProcedure ? DecorateProcedure<TRoot, TProcedures[TKey], TFlags> : never;
72
+ export type DecorateRouterRecord<TRoot extends AnyRootTypes, TRecord extends RouterRecord, TFlags> = {
73
+ [TKey in keyof TRecord]: TRecord[TKey] extends infer $Value ? $Value extends RouterRecord ? DecorateRouterRecord<TRoot, $Value, TFlags> : $Value extends AnyProcedure ? DecorateProcedure<TRoot, $Value, TFlags> : never : never;
74
74
  };
75
75
  /**
76
76
  * @internal
@@ -92,11 +92,11 @@ export type CreateTRPCReactBase<TRouter extends AnyRouter, TSSRContext> = {
92
92
  useSuspenseQueries: TRPCUseSuspenseQueries<TRouter>;
93
93
  useDehydratedState: UseDehydratedState<TRouter>;
94
94
  };
95
- export type CreateTRPCReact<TRouter extends AnyRouter, TSSRContext, TFlags> = ProtectedIntersection<CreateTRPCReactBase<TRouter, TSSRContext>, DecoratedProcedureRecord<TRouter['_def']['_config']['$types'], TRouter['_def']['record'], TFlags>>;
95
+ export type CreateTRPCReact<TRouter extends AnyRouter, TSSRContext, TFlags> = ProtectedIntersection<CreateTRPCReactBase<TRouter, TSSRContext>, DecorateRouterRecord<TRouter['_def']['_config']['$types'], TRouter['_def']['record'], TFlags>>;
96
96
  /**
97
97
  * @internal
98
98
  */
99
- export declare function createHooksInternal<TRouter extends AnyRouter, TSSRContext = unknown, TFlags = null>(trpc: CreateReactQueryHooks<TRouter, TSSRContext>): ProtectedIntersection<CreateTRPCReactBase<TRouter, TSSRContext>, DecoratedProcedureRecord<TRouter["_def"]["_config"]["$types"], TRouter["_def"]["record"], TFlags>>;
99
+ export declare function createHooksInternal<TRouter extends AnyRouter, TSSRContext = unknown, TFlags = null>(trpc: CreateReactQueryHooks<TRouter, TSSRContext>): ProtectedIntersection<CreateTRPCReactBase<TRouter, TSSRContext>, DecorateRouterRecord<TRouter["_def"]["_config"]["$types"], TRouter["_def"]["record"], TFlags>>;
100
100
  export declare function createTRPCReact<TRouter extends AnyRouter, TSSRContext = unknown, TFlags = null>(opts?: CreateTRPCReactOptions<TRouter>): CreateTRPCReact<TRouter, TSSRContext, TFlags>;
101
101
  export {};
102
102
  //# sourceMappingURL=createTRPCReact.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"createTRPCReact.d.ts","sourceRoot":"","sources":["../src/createTRPCReact.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,KAAK,EACV,oBAAoB,EACpB,YAAY,EACZ,iBAAiB,EACjB,YAAY,EACZ,SAAS,EACT,wBAAwB,EACxB,mBAAmB,EACnB,+BAA+B,EAC/B,kCAAkC,EAClC,qBAAqB,EACrB,qBAAqB,EACtB,MAAM,0CAA0C,CAAC;AAGlD,OAAO,KAAK,EACV,cAAc,EACd,sBAAsB,EACvB,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAEjD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAEhF,OAAO,KAAK,EACV,YAAY,EACZ,0BAA0B,EAC1B,yBAAyB,EACzB,YAAY,EACZ,kBAAkB,EAClB,2BAA2B,EAC3B,0BAA0B,EAC1B,sBAAsB,EACtB,qBAAqB,EACrB,mBAAmB,EACnB,kBAAkB,EAClB,0BAA0B,EAC1B,mCAAmC,EACnC,kCAAkC,EAClC,2BAA2B,EAC3B,0BAA0B,EAC3B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAE7D;;GAEG;AACH,MAAM,WAAW,iBAAiB,CAChC,KAAK,SAAS,YAAY,EAC1B,UAAU,SAAS,YAAY;IAE/B,CACE,YAAY,SAAS,+BAA+B,CAClD,KAAK,EACL,UAAU,CACX,GAAG,+BAA+B,CAAC,KAAK,EAAE,UAAU,CAAC,EACtD,KAAK,GAAG,YAAY,EAEpB,KAAK,EAAE,mBAAmB,CAAC,UAAU,CAAC,EACtC,IAAI,EAAE,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AAC,OAAO,EAAE,WAAW,CAAC,CAAC;IACrD;;OAEG;IACH,QAAQ,IAAI,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;IACnD,QAAQ,EAAE,YAAY,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;IAC7C,YAAY,EAAE,YAAY,CAAC,OAAO,CAAC,CAAC;IACpC,UAAU,EAAE,cAAc,CAAC,OAAO,CAAC,CAAC;IACpC,kBAAkB,EAAE,sBAAsB,CAAC,OAAO,CAAC,CAAC;IACpD,kBAAkB,EAAE,kBAAkB,CAAC,OAAO,CAAC,CAAC;CACjD,CAAC;AAEF,MAAM,MAAM,eAAe,CACzB,OAAO,SAAS,SAAS,EACzB,WAAW,EACX,MAAM,IACJ,qBAAqB,CACvB,mBAAmB,CAAC,OAAO,EAAE,WAAW,CAAC,EACzC,oBAAoB,CAClB,OAAO,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,EACpC,OAAO,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,EACzB,MAAM,CACP,CACF,CAAC;AAEF;;GAEG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,SAAS,SAAS,EACzB,WAAW,GAAG,OAAO,EACrB,MAAM,GAAG,IAAI,EACb,IAAI,EAAE,qBAAqB,CAAC,OAAO,EAAE,WAAW,CAAC,mKAoBlD;AAED,wBAAgB,eAAe,CAC7B,OAAO,SAAS,SAAS,EACzB,WAAW,GAAG,OAAO,EACrB,MAAM,GAAG,IAAI,EAEb,IAAI,CAAC,EAAE,sBAAsB,CAAC,OAAO,CAAC,GACrC,eAAe,CAAC,OAAO,EAAE,WAAW,EAAE,MAAM,CAAC,CAK/C"}
@@ -1,5 +1,5 @@
1
1
  import type { AnyMutationProcedure, AnyQueryProcedure, AnyRootTypes, AnyRouter, DeepPartial, inferProcedureInput } from '@trpc/server/unstable-core-do-not-import';
2
- import type { DecoratedProcedureRecord, DecorateProcedure } from '../shared';
2
+ import type { DecorateProcedure, DecorateRouterRecord } from '../shared';
3
3
  export type QueryType = 'any' | 'infinite' | 'query';
4
4
  export type TRPCQueryKey = [
5
5
  string[],
@@ -24,7 +24,7 @@ type GetParams<TRoot extends AnyRootTypes, TProcedureOrRouter extends AnyMutatio
24
24
  procedureOrRouter: DecorateProcedure<TRoot, TProcedureOrRouter, TFlags>,
25
25
  ..._params: GetQueryParams<TProcedureOrRouter>
26
26
  ] : TProcedureOrRouter extends AnyMutationProcedure ? [procedureOrRouter: DecorateProcedure<TRoot, TProcedureOrRouter, TFlags>] : TProcedureOrRouter extends AnyRouter ? [
27
- procedureOrRouter: DecoratedProcedureRecord<TRoot, TProcedureOrRouter['_def']['record'], TFlags>
27
+ procedureOrRouter: DecorateRouterRecord<TRoot, TProcedureOrRouter['_def']['record'], TFlags>
28
28
  ] : never;
29
29
  type GetQueryKeyParams<TRoot extends AnyRootTypes, TProcedureOrRouter extends AnyMutationProcedure | AnyQueryProcedure | AnyRouter, TFlags> = GetParams<TRoot, TProcedureOrRouter, TFlags>;
30
30
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"getQueryKey.d.ts","sourceRoot":"","sources":["../../src/internals/getQueryKey.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,oBAAoB,EACpB,iBAAiB,EACjB,YAAY,EACZ,SAAS,EACT,WAAW,EACX,mBAAmB,EACpB,MAAM,0CAA0C,CAAC;AAClD,OAAO,KAAK,EAAE,wBAAwB,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAE7E,MAAM,MAAM,SAAS,GAAG,KAAK,GAAG,UAAU,GAAG,OAAO,CAAC;AAErD,MAAM,MAAM,YAAY,GAAG;IACzB,MAAM,EAAE;IACR;QAAE,KAAK,CAAC,EAAE,OAAO,CAAC;QAAC,IAAI,CAAC,EAAE,OAAO,CAAC,SAAS,EAAE,KAAK,CAAC,CAAA;KAAE,CAAC;CACvD,CAAC;AAEF;;;;IAII;AACJ,wBAAgB,mBAAmB,CACjC,IAAI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SAAS,YAAY,EAC1B,kBAAkB,SACd,oBAAoB,GACpB,iBAAiB,GACjB,SAAS,EACb,MAAM,IACJ,SAAS,CAAC,KAAK,EAAE,kBAAkB,EAAE,MAAM,CAAC,CAAC;AAEjD;;;;;;GAMG;AACH,wBAAgB,WAAW,CACzB,KAAK,SAAS,YAAY,EAC1B,kBAAkB,SACd,oBAAoB,GACpB,iBAAiB,GACjB,SAAS,EACb,MAAM,EACN,GAAG,OAAO,EAAE,iBAAiB,CAAC,KAAK,EAAE,kBAAkB,EAAE,MAAM,CAAC,gBAMjE;AAGD,MAAM,MAAM,aAAa,CAAC,MAAM,EAAE,KAAK,SAAS,OAAO,CAAC,SAAS,EAAE,KAAK,CAAC,IAAI;IAC3E,MAAM,EAAE;IACR;QAAE,KAAK,CAAC,EAAE,sBAAsB,CAAC,MAAM,CAAC,CAAC;QAAC,IAAI,EAAE,KAAK,CAAA;KAAE,CAAC;CACzD,CAAC"}
@@ -47,10 +47,10 @@ export type SuspenseQueriesOptions<TQueriesOptions extends any[], TResult extend
47
47
  /**
48
48
  * @internal
49
49
  */
50
- export type TRPCUseQueries<TRouter extends AnyRouter> = <TQueryOptions extends UseQueryOptionsForUseQueries<any, any, any, any>[]>(queriesCallback: (t: UseQueriesProcedureRecord<TRouter>) => readonly [...QueriesOptions<TQueryOptions>]) => QueriesResults<TQueryOptions>;
50
+ export type TRPCUseQueries<TRouter extends AnyRouter> = <TQueryOptions extends UseQueryOptionsForUseQueries<any, any, any, any>[]>(queriesCallback: (t: UseQueriesProcedureRecord<TRouter['_def']['_config']['$types'], TRouter['_def']['record']>) => readonly [...QueriesOptions<TQueryOptions>]) => QueriesResults<TQueryOptions>;
51
51
  /**
52
52
  * @internal
53
53
  */
54
- export type TRPCUseSuspenseQueries<TRouter extends AnyRouter> = <TQueryOptions extends UseQueryOptionsForUseSuspenseQueries<any, any, any, any>[]>(queriesCallback: (t: UseSuspenseQueriesProcedureRecord<TRouter>) => readonly [...SuspenseQueriesOptions<TQueryOptions>]) => SuspenseQueriesResults<TQueryOptions>;
54
+ export type TRPCUseSuspenseQueries<TRouter extends AnyRouter> = <TQueryOptions extends UseQueryOptionsForUseSuspenseQueries<any, any, any, any>[]>(queriesCallback: (t: UseSuspenseQueriesProcedureRecord<TRouter['_def']['_config']['$types'], TRouter['_def']['record']>) => readonly [...SuspenseQueriesOptions<TQueryOptions>]) => SuspenseQueriesResults<TQueryOptions>;
55
55
  export {};
56
56
  //# sourceMappingURL=useQueries.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useQueries.d.ts","sourceRoot":"","sources":["../../src/internals/useQueries.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,QAAQ,EACR,eAAe,EACf,uBAAuB,EACvB,sBAAsB,EACvB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EACV,SAAS,EACT,gBAAgB,EACjB,MAAM,0CAA0C,CAAC;AAClD,OAAO,KAAK,EACV,yBAAyB,EACzB,iCAAiC,EACjC,mBAAmB,EACnB,kBAAkB,EAClB,2BAA2B,EAC5B,MAAM,WAAW,CAAC;AAEnB;;GAEG;AACH,MAAM,MAAM,4BAA4B,CACtC,YAAY,GAAG,OAAO,EACtB,MAAM,GAAG,OAAO,EAChB,KAAK,GAAG,YAAY,EACpB,SAAS,SAAS,QAAQ,GAAG,QAAQ,IACnC,gBAAgB,CAClB,eAAe,CAAC,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,CAAC,EACvD,UAAU,CACX,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,oCAAoC,CAC9C,YAAY,GAAG,OAAO,EACtB,MAAM,GAAG,OAAO,EAChB,KAAK,GAAG,YAAY,EACpB,SAAS,SAAS,QAAQ,GAAG,QAAQ,IACnC,gBAAgB,CAClB,uBAAuB,CAAC,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,CAAC,EAC/D,UAAU,CACX,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,6BAA6B,CAA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BAA4B,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,EAExE,eAAe,EAAE,CACf,CAAC,EAAE,yBAAyB,CAC1B,OAAO,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,EACpC,OAAO,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,CAC1B,KACE,SAAS,CAAC,GAAG,cAAc,CAAC,aAAa,CAAC,CAAC,KAC7C,cAAc,CAAC,aAAa,CAAC,CAAC;AAEnC;;GAEG;AACH,MAAM,MAAM,sBAAsB,CAAC,OAAO,SAAS,SAAS,IAAI,CAC9D,aAAa,SAAS,oCAAoC,CACxD,GAAG,EACH,GAAG,EACH,GAAG,EACH,GAAG,CACJ,EAAE,EAEH,eAAe,EAAE,CACf,CAAC,EAAE,iCAAiC,CAClC,OAAO,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,EACpC,OAAO,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,CAC1B,KACE,SAAS,CAAC,GAAG,sBAAsB,CAAC,aAAa,CAAC,CAAC,KACrD,sBAAsB,CAAC,aAAa,CAAC,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import type { DehydratedState, DehydrateOptions, InfiniteData, QueryClient } from '@tanstack/react-query';
2
2
  import type { inferRouterClient, TRPCClientError } from '@trpc/client';
3
3
  import { TRPCUntypedClient } from '@trpc/client';
4
- import type { AnyProcedure, AnyQueryProcedure, AnyRootTypes, AnyRouter, DataTransformerOptions, Filter, inferProcedureInput, inferRouterContext, inferTransformedProcedureOutput, ProtectedIntersection } from '@trpc/server/unstable-core-do-not-import';
4
+ import type { AnyProcedure, AnyQueryProcedure, AnyRootTypes, AnyRouter, DataTransformerOptions, inferProcedureInput, inferRouterContext, inferTransformedProcedureOutput, ProtectedIntersection, RouterRecord } from '@trpc/server/unstable-core-do-not-import';
5
5
  import type { CreateTRPCReactQueryClientConfig, ExtractCursorType, TRPCFetchInfiniteQueryOptions, TRPCFetchQueryOptions } from '../shared';
6
6
  interface CreateSSGHelpersInternal<TRouter extends AnyRouter> {
7
7
  router: TRouter;
@@ -33,8 +33,8 @@ type DecorateProcedure<TRoot extends AnyRootTypes, TProcedure extends AnyProcedu
33
33
  /**
34
34
  * @internal
35
35
  */
36
- type DecoratedProcedureSSGRecord<TRouter extends AnyRouter> = {
37
- [TKey in keyof Filter<TRouter['_def']['record'], AnyQueryProcedure | AnyRouter>]: TRouter['_def']['record'][TKey] extends AnyRouter ? DecoratedProcedureSSGRecord<TRouter['_def']['record'][TKey]> : DecorateProcedure<TRouter['_def']['_config']['$types'], TRouter['_def']['record'][TKey]>;
36
+ type DecoratedProcedureSSGRecord<TRoot extends AnyRootTypes, TRecord extends RouterRecord> = {
37
+ [TKey in keyof TRecord]: TRecord[TKey] extends infer $Value ? $Value extends RouterRecord ? DecoratedProcedureSSGRecord<TRoot, $Value> : $Value extends AnyQueryProcedure ? DecorateProcedure<TRoot, $Value> : never : never;
38
38
  };
39
39
  /**
40
40
  * Create functions you can use for server-side rendering / static generation
@@ -43,6 +43,6 @@ type DecoratedProcedureSSGRecord<TRouter extends AnyRouter> = {
43
43
  export declare function createServerSideHelpers<TRouter extends AnyRouter>(opts: CreateServerSideHelpersOptions<TRouter>): ProtectedIntersection<{
44
44
  queryClient: QueryClient;
45
45
  dehydrate: (opts?: DehydrateOptions) => DehydratedState;
46
- }, DecoratedProcedureSSGRecord<TRouter>>;
46
+ }, DecoratedProcedureSSGRecord<TRouter["_def"]["_config"]["$types"], TRouter["_def"]["record"]>>;
47
47
  export {};
48
48
  //# sourceMappingURL=ssgProxy.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ssgProxy.d.ts","sourceRoot":"","sources":["../../src/server/ssgProxy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,gBAAgB,EAChB,YAAY,EACZ,WAAW,EACZ,MAAM,uBAAuB,CAAC;AAE/B,OAAO,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2BAA2B,CAC9B,KAAK,SAAS,YAAY,EAC1B,OAAO,SAAS,YAAY,IAC1B;KACD,IAAI,IAAI,MAAM,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,SAAS,MAAM,MAAM,GACvD,MAAM,SAAS,YAAY,GACzB,2BAA2B,CAAC,KAAK,EAAE,MAAM,CAAC,GAE5C,MAAM,SAAS,iBAAiB,GAC9B,iBAAiB,CAAC,KAAK,EAAE,MAAM,CAAC,GAChC,KAAK,GACP,KAAK;CACV,CAAC;AAIF;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,SAAS,SAAS,EAC/D,IAAI,EAAE,8BAA8B,CAAC,OAAO,CAAC;iBAoD5B,WAAW;uBACL,gBAAgB,KAAK,eAAe;iGA+D5D"}
@@ -1,7 +1,7 @@
1
1
  export * from './proxy/decorationProxy';
2
2
  export * from './proxy/utilsProxy';
3
3
  export * from './proxy/useQueriesProxy';
4
- export type { DecoratedProcedureRecord, DecorateProcedure, } from '../createTRPCReact';
4
+ export type { DecorateRouterRecord, DecorateProcedure, } from '../createTRPCReact';
5
5
  export type { TRPCUseQueries, TRPCUseSuspenseQueries, } from '../internals/useQueries';
6
6
  export * from './hooks/createRootHooks';
7
7
  export * from './queryClient';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/shared/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC;AACxC,YAAY,EACV,wBAAwB,EACxB,iBAAiB,GAClB,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EACV,cAAc,EACd,sBAAsB,GACvB,MAAM,yBAAyB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AACxC,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAE/B,OAAO;AACL;;GAEG;AACH,aAAa,GACd,MAAM,4BAA4B,CAAC;AAEpC,OAAO;AACL;;GAEG;AACH,WAAW,GACZ,MAAM,wBAAwB,CAAC;AAEhC,cAAc,sBAAsB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/shared/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC;AACxC,YAAY,EACV,oBAAoB,EACpB,iBAAiB,GAClB,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EACV,cAAc,EACd,sBAAsB,GACvB,MAAM,yBAAyB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AACxC,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAE/B,OAAO;AACL;;GAEG;AACH,aAAa,GACd,MAAM,4BAA4B,CAAC;AAEpC,OAAO;AACL;;GAEG;AACH,WAAW,GACZ,MAAM,wBAAwB,CAAC;AAEhC,cAAc,sBAAsB,CAAC"}
@@ -1,11 +1,11 @@
1
- import type { AnyMutationProcedure, AnyProcedure, AnyQueryProcedure, AnyRootTypes, AnyRouter } from '@trpc/server/unstable-core-do-not-import';
1
+ import type { AnyMutationProcedure, AnyQueryProcedure, AnyRootTypes, AnyRouter, RouterRecord } from '@trpc/server/unstable-core-do-not-import';
2
2
  import type { MutationLike } from './mutationLike';
3
3
  import type { QueryLike } from './queryLike';
4
4
  /**
5
5
  * Use to describe a route path which matches a given route's interface
6
6
  */
7
7
  export type RouterLike<TRouter extends AnyRouter> = RouterLikeInner<TRouter['_def']['_config']['$types'], TRouter['_def']['procedures']>;
8
- export type RouterLikeInner<TRoot extends AnyRootTypes, TProcedures extends AnyProcedure> = {
9
- [TKey in keyof TProcedures]: TProcedures[TKey] extends AnyRouter ? RouterLikeInner<TRoot, TProcedures[TKey]['_def']['record']> : TProcedures[TKey] extends AnyQueryProcedure ? QueryLike<TRoot, TProcedures[TKey]> : TProcedures[TKey] extends AnyMutationProcedure ? MutationLike<TRoot, TProcedures[TKey]> : never;
8
+ export type RouterLikeInner<TRoot extends AnyRootTypes, TRecord extends RouterRecord> = {
9
+ [TKey in keyof TRecord]: TRecord[TKey] extends infer $Value ? $Value extends RouterRecord ? RouterLikeInner<TRoot, $Value> : $Value extends AnyQueryProcedure ? QueryLike<TRoot, $Value> : $Value extends AnyMutationProcedure ? MutationLike<TRoot, $Value> : never : never;
10
10
  };
11
11
  //# sourceMappingURL=routerLike.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"routerLike.d.ts","sourceRoot":"","sources":["../../../src/shared/polymorphism/routerLike.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,oBAAoB,EACpB,YAAY,EACZ,iBAAiB,EACjB,YAAY,EACZ,SAAS,EACV,MAAM,0CAA0C,CAAC;AAClD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C;;GAEG;AACH,MAAM,MAAM,UAAU,CAAC,OAAO,SAAS,SAAS,IAAI,eAAe,CACjE,OAAO,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,EACpC,OAAO,CAAC,MAAM,CAAC,CAAC,YAAY,CAAC,CAC9B,CAAC;AACF,MAAM,MAAM,eAAe,CACzB,KAAK,SAAS,YAAY,EAC1B,WAAW,SAAS,YAAY,IAC9B;KACD,IAAI,IAAI,MAAM,WAAW,GAAG,WAAW,CAAC,IAAI,CAAC,SAAS,SAAS,GAC5D,eAAe,CAAC,KAAK,EAAE,WAAW,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,CAAC,GAC3D,WAAW,CAAC,IAAI,CAAC,SAAS,iBAAiB,GAC3C,SAAS,CAAC,KAAK,EAAE,WAAW,CAAC,IAAI,CAAC,CAAC,GACnC,WAAW,CAAC,IAAI,CAAC,SAAS,oBAAoB,GAC9C,YAAY,CAAC,KAAK,EAAE,WAAW,CAAC,IAAI,CAAC,CAAC,GACtC,KAAK;CACV,CAAC"}
1
+ {"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,YAAY,CAAC,CAC9B,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,YAAY,GACzB,eAAe,CAAC,KAAK,EAAE,MAAM,CAAC,GAC9B,MAAM,SAAS,iBAAiB,GAChC,SAAS,CAAC,KAAK,EAAE,MAAM,CAAC,GACxB,MAAM,SAAS,oBAAoB,GACnC,YAAY,CAAC,KAAK,EAAE,MAAM,CAAC,GAC3B,KAAK,GACP,KAAK;CACV,CAAC"}
@@ -3,5 +3,5 @@ import type { DecoratedProcedureUtilsRecord } from '../proxy/utilsProxy';
3
3
  /**
4
4
  * Use to describe a Utils/Context path which matches the given route's interface
5
5
  */
6
- export type UtilsLike<TRouter extends AnyRouter> = DecoratedProcedureUtilsRecord<TRouter>;
6
+ export type UtilsLike<TRouter extends AnyRouter> = DecoratedProcedureUtilsRecord<TRouter['_def']['_config']['$types'], TRouter['_def']['record']>;
7
7
  //# 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,CAAC,OAAO,CAAC,CAAC"}
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,24 +1,24 @@
1
1
  import type { TRPCClientError, TRPCUntypedClient } from '@trpc/client';
2
- import type { AnyProcedure, AnyQueryProcedure, AnyRootTypes, AnyRouter, Filter, inferProcedureInput, inferTransformedProcedureOutput } from '@trpc/server/unstable-core-do-not-import';
2
+ import type { AnyProcedure, AnyQueryProcedure, AnyRootTypes, AnyRouter, inferProcedureInput, inferTransformedProcedureOutput, RouterRecord } from '@trpc/server/unstable-core-do-not-import';
3
3
  import type { TrpcQueryOptionsForUseQueries, TrpcQueryOptionsForUseSuspenseQueries } from '../../internals/useQueries';
4
4
  type GetQueryOptions<TRoot extends AnyRootTypes, TProcedure extends AnyProcedure> = <TData = inferTransformedProcedureOutput<TRoot, TProcedure>>(input: inferProcedureInput<TProcedure>, opts?: TrpcQueryOptionsForUseQueries<inferTransformedProcedureOutput<TRoot, TProcedure>, TData, TRPCClientError<TRoot>>) => TrpcQueryOptionsForUseQueries<inferTransformedProcedureOutput<TRoot, TProcedure>, TData, TRPCClientError<TRoot>>;
5
5
  /**
6
6
  * @internal
7
7
  */
8
- export type UseQueriesProcedureRecord<TRouter extends AnyRouter> = {
9
- [TKey in keyof Filter<TRouter['_def']['record'], AnyQueryProcedure | AnyRouter>]: TRouter['_def']['record'][TKey] extends AnyRouter ? UseQueriesProcedureRecord<TRouter['_def']['record'][TKey]> : GetQueryOptions<TRouter['_def']['_config']['$types'], TRouter['_def']['record'][TKey]>;
8
+ export type UseQueriesProcedureRecord<TRoot extends AnyRootTypes, TRecord extends RouterRecord> = {
9
+ [TKey in keyof TRecord]: TRecord[TKey] extends infer $Value ? $Value extends RouterRecord ? UseQueriesProcedureRecord<TRoot, $Value> : $Value extends AnyQueryProcedure ? GetQueryOptions<TRoot, $Value> : never : never;
10
10
  };
11
- type GetSuspenseQueryOptions<TRoot extends AnyRootTypes, TProcedure extends AnyProcedure> = <TData = inferTransformedProcedureOutput<TRoot, TProcedure>>(input: inferProcedureInput<TProcedure>, opts?: TrpcQueryOptionsForUseSuspenseQueries<inferTransformedProcedureOutput<TRoot, TProcedure>, TData, TRPCClientError<TRoot>>) => TrpcQueryOptionsForUseSuspenseQueries<inferTransformedProcedureOutput<TRoot, TProcedure>, TData, TRPCClientError<TRoot>>;
11
+ type GetSuspenseQueryOptions<TRoot extends AnyRootTypes, TProcedure extends AnyQueryProcedure> = <TData = inferTransformedProcedureOutput<TRoot, TProcedure>>(input: inferProcedureInput<TProcedure>, opts?: TrpcQueryOptionsForUseSuspenseQueries<inferTransformedProcedureOutput<TRoot, TProcedure>, TData, TRPCClientError<TRoot>>) => TrpcQueryOptionsForUseSuspenseQueries<inferTransformedProcedureOutput<TRoot, TProcedure>, TData, TRPCClientError<TRoot>>;
12
12
  /**
13
13
  * @internal
14
14
  */
15
- export type UseSuspenseQueriesProcedureRecord<TRouter extends AnyRouter> = {
16
- [TKey in keyof Filter<TRouter['_def']['record'], AnyQueryProcedure | AnyRouter>]: TRouter['_def']['record'][TKey] extends AnyRouter ? UseSuspenseQueriesProcedureRecord<TRouter['_def']['record'][TKey]> : GetSuspenseQueryOptions<TRouter['_def']['_config']['$types'], TRouter['_def']['record'][TKey]>;
15
+ export type UseSuspenseQueriesProcedureRecord<TRoot extends AnyRootTypes, TRecord extends RouterRecord> = {
16
+ [TKey in keyof TRecord]: TRecord[TKey] extends infer $Value ? $Value extends RouterRecord ? UseSuspenseQueriesProcedureRecord<TRoot, $Value> : $Value extends AnyQueryProcedure ? GetSuspenseQueryOptions<TRoot, $Value> : never : never;
17
17
  };
18
18
  /**
19
19
  * Create proxy for `useQueries` options
20
20
  * @internal
21
21
  */
22
- export declare function createUseQueries<TRouter extends AnyRouter>(client: TRPCUntypedClient<TRouter>): UseQueriesProcedureRecord<TRouter>;
22
+ export declare function createUseQueries<TRouter extends AnyRouter>(client: TRPCUntypedClient<TRouter>): UseQueriesProcedureRecord<TRouter["_def"]["_config"]["$types"], TRouter["_def"]["record"]>;
23
23
  export {};
24
24
  //# sourceMappingURL=useQueriesProxy.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useQueriesProxy.d.ts","sourceRoot":"","sources":["../../../src/shared/proxy/useQueriesProxy.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACvE,OAAO,KAAK,EACV,YAAY,EACZ,iBAAiB,EACjB,YAAY,EACZ,SAAS,EACT,MAAM,EACN,mBAAmB,EACnB,+BAA+B,EAChC,MAAM,0CAA0C,CAAC;AAGlD,OAAO,KAAK,EACV,6BAA6B,EAC7B,qCAAqC,EACtC,MAAM,4BAA4B,CAAC;AAGpC,KAAK,eAAe,CACl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iCAAiC,CAAC,KAAK,EAAE,MAAM,CAAC,GAChD,MAAM,SAAS,iBAAiB,GAChC,uBAAuB,CAAC,KAAK,EAAE,MAAM,CAAC,GACtC,KAAK,GACP,KAAK;CACV,CAAC;AAEF;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,SAAS,SAAS,EACxD,MAAM,EAAE,iBAAiB,CAAC,OAAO,CAAC,8FAuBnC"}
@@ -1,6 +1,6 @@
1
1
  import type { CancelOptions, InfiniteData, InvalidateOptions, InvalidateQueryFilters, Query, RefetchOptions, RefetchQueryFilters, ResetOptions, SetDataOptions, Updater } from '@tanstack/react-query';
2
2
  import type { TRPCClientError } from '@trpc/client';
3
- import type { AnyQueryProcedure, AnyRootTypes, AnyRouter, DeepPartial, Filter, inferProcedureInput, inferTransformedProcedureOutput, ProtectedIntersection } from '@trpc/server/unstable-core-do-not-import';
3
+ import type { AnyQueryProcedure, AnyRootTypes, AnyRouter, DeepPartial, inferProcedureInput, inferTransformedProcedureOutput, ProtectedIntersection, RouterRecord } from '@trpc/server/unstable-core-do-not-import';
4
4
  import type { DecoratedTRPCContextProps, TRPCContextState, TRPCFetchInfiniteQueryOptions, TRPCFetchQueryOptions, TRPCQueryUtils } from '../../internals/context';
5
5
  import type { QueryKeyKnown, QueryType } from '../../internals/getQueryKey';
6
6
  import type { ExtractCursorType } from '../hooks/types';
@@ -81,17 +81,17 @@ type DecorateRouter = {
81
81
  /**
82
82
  * @internal
83
83
  */
84
- export type DecoratedProcedureUtilsRecord<TRouter extends AnyRouter> = DecorateRouter & {
85
- [TKey in keyof Filter<TRouter['_def']['record'], AnyQueryProcedure | AnyRouter>]: TRouter['_def']['record'][TKey] extends AnyRouter ? DecoratedProcedureUtilsRecord<TRouter['_def']['record'][TKey]> & DecorateRouter : DecorateProcedure<TRouter['_def']['_config']['$types'], TRouter['_def']['record'][TKey]>;
84
+ export type DecoratedProcedureUtilsRecord<TRoot extends AnyRootTypes, TRecord extends RouterRecord> = DecorateRouter & {
85
+ [TKey in keyof TRecord]: TRecord[TKey] extends infer $Value ? $Value extends RouterRecord ? DecoratedProcedureUtilsRecord<TRoot, $Value> & DecorateRouter : $Value extends AnyQueryProcedure ? DecorateProcedure<TRoot, $Value> : never : never;
86
86
  };
87
87
  type AnyDecoratedProcedure = DecorateProcedure<any, any>;
88
- export type CreateReactUtils<TRouter extends AnyRouter, TSSRContext> = ProtectedIntersection<DecoratedTRPCContextProps<TRouter, TSSRContext>, DecoratedProcedureUtilsRecord<TRouter>>;
89
- export type CreateQueryUtils<TRouter extends AnyRouter> = DecoratedProcedureUtilsRecord<TRouter>;
88
+ export type CreateReactUtils<TRouter extends AnyRouter, TSSRContext> = ProtectedIntersection<DecoratedTRPCContextProps<TRouter, TSSRContext>, DecoratedProcedureUtilsRecord<TRouter['_def']['_config']['$types'], TRouter['_def']['record']>>;
89
+ export type CreateQueryUtils<TRouter extends AnyRouter> = DecoratedProcedureUtilsRecord<TRouter['_def']['_config']['$types'], TRouter['_def']['record']>;
90
90
  export declare const getQueryType: (utilName: keyof AnyDecoratedProcedure) => QueryType;
91
91
  /**
92
92
  * @internal
93
93
  */
94
- export declare function createReactQueryUtils<TRouter extends AnyRouter, TSSRContext>(context: TRPCContextState<AnyRouter, TSSRContext>): ProtectedIntersection<DecoratedTRPCContextProps<TRouter, TSSRContext>, DecoratedProcedureUtilsRecord<TRouter>>;
94
+ export declare function createReactQueryUtils<TRouter extends AnyRouter, TSSRContext>(context: TRPCContextState<AnyRouter, TSSRContext>): ProtectedIntersection<DecoratedTRPCContextProps<TRouter, TSSRContext>, DecoratedProcedureUtilsRecord<TRouter["_def"]["_config"]["$types"], TRouter["_def"]["record"]>>;
95
95
  /**
96
96
  * @internal
97
97
  */
@@ -1 +1 @@
1
- {"version":3,"file":"utilsProxy.d.ts","sourceRoot":"","sources":["../../../src/shared/proxy/utilsProxy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,YAAY,EACZ,iBAAiB,EACjB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WAAW,CAAC,0KAelD;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,SAAS,SAAS,EAC7D,OAAO,EAAE,cAAc,CAAC,OAAO,CAAC,GAC/B,gBAAgB,CAAC,OAAO,CAAC,CAI3B"}
@@ -1,5 +1,5 @@
1
1
  import type { TRPCClientErrorLike } from '@trpc/client';
2
- import type { AnyMutationProcedure, AnyProcedure, AnyQueryProcedure, AnyRootTypes, AnyRouter, inferProcedureInput, inferTransformedProcedureOutput } from '@trpc/server/unstable-core-do-not-import';
2
+ import type { AnyMutationProcedure, AnyProcedure, AnyQueryProcedure, AnyRootTypes, AnyRouter, inferProcedureInput, inferTransformedProcedureOutput, RouterRecord } from '@trpc/server/unstable-core-do-not-import';
3
3
  import type { UseTRPCMutationOptions, UseTRPCMutationResult, UseTRPCQueryOptions, UseTRPCQueryResult } from '../shared';
4
4
  /**
5
5
  * @internal
@@ -17,7 +17,9 @@ export type InferQueryResult<TRoot extends AnyRootTypes, TProcedure extends AnyP
17
17
  * @internal
18
18
  */
19
19
  export type InferMutationResult<TRoot extends AnyRootTypes, TProcedure extends AnyProcedure, TContext = unknown> = UseTRPCMutationResult<inferTransformedProcedureOutput<TRoot, TProcedure>, TRPCClientErrorLike<TRoot>, inferProcedureInput<TProcedure>, TContext>;
20
- export type inferReactQueryProcedureOptions<TRouter extends AnyRouter> = {
21
- [TKey in keyof TRouter['_def']['record']]: TRouter['_def']['record'][TKey] extends infer TRouterOrProcedure ? TRouterOrProcedure extends AnyRouter ? inferReactQueryProcedureOptions<TRouterOrProcedure> : TRouterOrProcedure extends AnyMutationProcedure ? InferMutationOptions<TRouter['_def']['_config']['$types'], TRouterOrProcedure> : TRouterOrProcedure extends AnyQueryProcedure ? InferQueryOptions<TRouter['_def']['_config']['$types'], TRouterOrProcedure> : never : never;
20
+ type inferReactQueryProcedureOptionsInner<TRoot extends AnyRootTypes, TRecord extends RouterRecord> = {
21
+ [TKey in keyof TRecord]: TRecord[TKey] extends infer $Value ? $Value extends RouterRecord ? inferReactQueryProcedureOptionsInner<TRoot, $Value> : $Value extends AnyMutationProcedure ? InferMutationOptions<TRoot, $Value> : $Value extends AnyQueryProcedure ? InferQueryOptions<TRoot, $Value> : never : never;
22
22
  };
23
+ export type inferReactQueryProcedureOptions<TRouter extends AnyRouter> = inferReactQueryProcedureOptionsInner<TRouter['_def']['_config']['$types'], TRouter['_def']['record']>;
24
+ export {};
23
25
  //# sourceMappingURL=inferReactQueryProcedure.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"inferReactQueryProcedure.d.ts","sourceRoot":"","sources":["../../src/utils/inferReactQueryProcedure.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,KAAK,EACV,oBAAoB,EACpB,YAAY,EACZ,iBAAiB,EACjB,YAAY,EACZ,SAAS,EACT,mBAAmB,EACnB,+BAA+B,EAChC,MAAM,0CAA0C,CAAC;AAClD,OAAO,KAAK,EACV,sBAAsB,EACtB,qBAAqB,EACrB,mBAAmB,EACnB,kBAAkB,EACnB,MAAM,WAAW,CAAC;AAEnB;;GAEG;AACH,MAAM,MAAM,iBAAiB,CAC3B,KAAK,SAAS,YAAY,EAC1B,UAAU,SAAS,YAAY,EAC/B,KAAK,GAAG,+BAA+B,CAAC,KAAK,EAAE,UAAU,CAAC,IACxD,IAAI,CACN,mBAAmB,CACjB,+BAA+B,CAAC,KAAK,EAAE,UAAU,CAAC,EAClD,+BAA+B,CAAC,KAAK,EAAE,UAAU,CAAC,EAClD,mBAAmB,CAAC,KAAK,CAAC,EAC1B,KAAK,CACN,EACD,QAAQ,CACT,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,oBAAoB,CAC9B,KAAK,SAAS,YAAY,EAC1B,UAAU,SAAS,YAAY,IAC7B,sBAAsB,CACxB,mBAAmB,CAAC,UAAU,CAAC,EAC/B,mBAAmB,CAAC,KAAK,CAAC,EAC1B,+BAA+B,CAAC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,EAC/B,QAAQ,CACT,CAAC;AAEF,KAAK,oCAAoC,CACvC,KAAK,SAAS,YAAY,EAC1B,OAAO,SAAS,YAAY,IAC1B;KACD,IAAI,IAAI,MAAM,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,SAAS,MAAM,MAAM,GACvD,MAAM,SAAS,YAAY,GACzB,oCAAoC,CAAC,KAAK,EAAE,MAAM,CAAC,GACnD,MAAM,SAAS,oBAAoB,GACnC,oBAAoB,CAAC,KAAK,EAAE,MAAM,CAAC,GACnC,MAAM,SAAS,iBAAiB,GAChC,iBAAiB,CAAC,KAAK,EAAE,MAAM,CAAC,GAChC,KAAK,GACP,KAAK;CACV,CAAC;AAEF,MAAM,MAAM,+BAA+B,CAAC,OAAO,SAAS,SAAS,IACnE,oCAAoC,CAClC,OAAO,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,EACpC,OAAO,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,CAC1B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trpc/react-query",
3
- "version": "11.0.0-next-beta.241+afd416625",
3
+ "version": "11.0.0-next-beta.248+05798dd78",
4
4
  "description": "The tRPC React library",
5
5
  "author": "KATT",
6
6
  "license": "MIT",
@@ -58,15 +58,15 @@
58
58
  },
59
59
  "peerDependencies": {
60
60
  "@tanstack/react-query": "^5.0.0",
61
- "@trpc/client": "11.0.0-next-beta.241+afd416625",
62
- "@trpc/server": "11.0.0-next-beta.241+afd416625",
61
+ "@trpc/client": "11.0.0-next-beta.248+05798dd78",
62
+ "@trpc/server": "11.0.0-next-beta.248+05798dd78",
63
63
  "react": ">=18.2.0",
64
64
  "react-dom": ">=18.2.0"
65
65
  },
66
66
  "devDependencies": {
67
67
  "@tanstack/react-query": "^5.0.0",
68
- "@trpc/client": "11.0.0-next-beta.241+afd416625",
69
- "@trpc/server": "11.0.0-next-beta.241+afd416625",
68
+ "@trpc/client": "11.0.0-next-beta.248+05798dd78",
69
+ "@trpc/server": "11.0.0-next-beta.248+05798dd78",
70
70
  "@types/express": "^4.17.17",
71
71
  "@types/node": "^20.10.0",
72
72
  "@types/react": "^18.2.33",
@@ -85,5 +85,5 @@
85
85
  "funding": [
86
86
  "https://trpc.io/sponsor"
87
87
  ],
88
- "gitHead": "afd4166250f89d213dcdfc3c2fb59ee389e5da6b"
88
+ "gitHead": "05798dd78fd304612172fcccb622559954a0f578"
89
89
  }
@@ -9,8 +9,8 @@ import type {
9
9
  inferProcedureInput,
10
10
  inferTransformedProcedureOutput,
11
11
  inferTransformedSubscriptionOutput,
12
- ProcedureRouterRecord,
13
12
  ProtectedIntersection,
13
+ RouterRecord,
14
14
  } from '@trpc/server/unstable-core-do-not-import';
15
15
  import { createFlatProxy } from '@trpc/server/unstable-core-do-not-import';
16
16
  import * as React from 'react';
@@ -223,19 +223,17 @@ export type DecorateProcedure<
223
223
  /**
224
224
  * @internal
225
225
  */
226
- export type DecoratedProcedureRecord<
226
+ export type DecorateRouterRecord<
227
227
  TRoot extends AnyRootTypes,
228
- TProcedures extends ProcedureRouterRecord,
228
+ TRecord extends RouterRecord,
229
229
  TFlags,
230
230
  > = {
231
- [TKey in keyof TProcedures]: TProcedures[TKey] extends AnyRouter
232
- ? DecoratedProcedureRecord<
233
- TRoot,
234
- TProcedures[TKey]['_def']['record'],
235
- TFlags
236
- >
237
- : TProcedures[TKey] extends AnyProcedure
238
- ? DecorateProcedure<TRoot, TProcedures[TKey], TFlags>
231
+ [TKey in keyof TRecord]: TRecord[TKey] extends infer $Value
232
+ ? $Value extends RouterRecord
233
+ ? DecorateRouterRecord<TRoot, $Value, TFlags>
234
+ : $Value extends AnyProcedure
235
+ ? DecorateProcedure<TRoot, $Value, TFlags>
236
+ : never
239
237
  : never;
240
238
  };
241
239
 
@@ -266,7 +264,7 @@ export type CreateTRPCReact<
266
264
  TFlags,
267
265
  > = ProtectedIntersection<
268
266
  CreateTRPCReactBase<TRouter, TSSRContext>,
269
- DecoratedProcedureRecord<
267
+ DecorateRouterRecord<
270
268
  TRouter['_def']['_config']['$types'],
271
269
  TRouter['_def']['record'],
272
270
  TFlags
@@ -6,7 +6,7 @@ import type {
6
6
  DeepPartial,
7
7
  inferProcedureInput,
8
8
  } from '@trpc/server/unstable-core-do-not-import';
9
- import type { DecoratedProcedureRecord, DecorateProcedure } from '../shared';
9
+ import type { DecorateProcedure, DecorateRouterRecord } from '../shared';
10
10
 
11
11
  export type QueryType = 'any' | 'infinite' | 'query';
12
12
 
@@ -100,7 +100,7 @@ type GetParams<
100
100
  ? [procedureOrRouter: DecorateProcedure<TRoot, TProcedureOrRouter, TFlags>]
101
101
  : TProcedureOrRouter extends AnyRouter
102
102
  ? [
103
- procedureOrRouter: DecoratedProcedureRecord<
103
+ procedureOrRouter: DecorateRouterRecord<
104
104
  TRoot,
105
105
  TProcedureOrRouter['_def']['record'],
106
106
  TFlags
@@ -179,7 +179,10 @@ export type TRPCUseQueries<TRouter extends AnyRouter> = <
179
179
  TQueryOptions extends UseQueryOptionsForUseQueries<any, any, any, any>[],
180
180
  >(
181
181
  queriesCallback: (
182
- t: UseQueriesProcedureRecord<TRouter>,
182
+ t: UseQueriesProcedureRecord<
183
+ TRouter['_def']['_config']['$types'],
184
+ TRouter['_def']['record']
185
+ >,
183
186
  ) => readonly [...QueriesOptions<TQueryOptions>],
184
187
  ) => QueriesResults<TQueryOptions>;
185
188
 
@@ -195,6 +198,9 @@ export type TRPCUseSuspenseQueries<TRouter extends AnyRouter> = <
195
198
  >[],
196
199
  >(
197
200
  queriesCallback: (
198
- t: UseSuspenseQueriesProcedureRecord<TRouter>,
201
+ t: UseSuspenseQueriesProcedureRecord<
202
+ TRouter['_def']['_config']['$types'],
203
+ TRouter['_def']['record']
204
+ >,
199
205
  ) => readonly [...SuspenseQueriesOptions<TQueryOptions>],
200
206
  ) => SuspenseQueriesResults<TQueryOptions>;
@@ -13,12 +13,12 @@ import type {
13
13
  AnyRootTypes,
14
14
  AnyRouter,
15
15
  DataTransformerOptions,
16
- Filter,
17
16
  inferProcedureInput,
18
17
  inferRouterContext,
19
18
  inferTransformedProcedureOutput,
20
19
  Maybe,
21
20
  ProtectedIntersection,
21
+ RouterRecord,
22
22
  } from '@trpc/server/unstable-core-do-not-import';
23
23
  import {
24
24
  callProcedure,
@@ -107,17 +107,18 @@ type DecorateProcedure<
107
107
  /**
108
108
  * @internal
109
109
  */
110
- type DecoratedProcedureSSGRecord<TRouter extends AnyRouter> = {
111
- [TKey in keyof Filter<
112
- TRouter['_def']['record'],
113
- AnyQueryProcedure | AnyRouter
114
- >]: TRouter['_def']['record'][TKey] extends AnyRouter
115
- ? DecoratedProcedureSSGRecord<TRouter['_def']['record'][TKey]>
116
- : // utils only apply to queries
117
- DecorateProcedure<
118
- TRouter['_def']['_config']['$types'],
119
- TRouter['_def']['record'][TKey]
120
- >;
110
+ type DecoratedProcedureSSGRecord<
111
+ TRoot extends AnyRootTypes,
112
+ TRecord extends RouterRecord,
113
+ > = {
114
+ [TKey in keyof TRecord]: TRecord[TKey] extends infer $Value
115
+ ? $Value extends RouterRecord
116
+ ? DecoratedProcedureSSGRecord<TRoot, $Value>
117
+ : // utils only apply to queries
118
+ $Value extends AnyQueryProcedure
119
+ ? DecorateProcedure<TRoot, $Value>
120
+ : never
121
+ : never;
121
122
  };
122
123
 
123
124
  type AnyDecoratedProcedure = DecorateProcedure<any, any>;
@@ -182,7 +183,10 @@ export function createServerSideHelpers<TRouter extends AnyRouter>(
182
183
  queryClient: QueryClient;
183
184
  dehydrate: (opts?: DehydrateOptions) => DehydratedState;
184
185
  },
185
- DecoratedProcedureSSGRecord<TRouter>
186
+ DecoratedProcedureSSGRecord<
187
+ TRouter['_def']['_config']['$types'],
188
+ TRouter['_def']['record']
189
+ >
186
190
  >;
187
191
 
188
192
  return createFlatProxy<CreateSSGHelpers>((key) => {
@@ -2,7 +2,7 @@ export * from './proxy/decorationProxy';
2
2
  export * from './proxy/utilsProxy';
3
3
  export * from './proxy/useQueriesProxy';
4
4
  export type {
5
- DecoratedProcedureRecord,
5
+ DecorateRouterRecord,
6
6
  DecorateProcedure,
7
7
  } from '../createTRPCReact';
8
8
  export type {
@@ -1,9 +1,9 @@
1
1
  import type {
2
2
  AnyMutationProcedure,
3
- AnyProcedure,
4
3
  AnyQueryProcedure,
5
4
  AnyRootTypes,
6
5
  AnyRouter,
6
+ RouterRecord,
7
7
  } from '@trpc/server/unstable-core-do-not-import';
8
8
  import type { MutationLike } from './mutationLike';
9
9
  import type { QueryLike } from './queryLike';
@@ -17,13 +17,15 @@ export type RouterLike<TRouter extends AnyRouter> = RouterLikeInner<
17
17
  >;
18
18
  export type RouterLikeInner<
19
19
  TRoot extends AnyRootTypes,
20
- TProcedures extends AnyProcedure,
20
+ TRecord extends RouterRecord,
21
21
  > = {
22
- [TKey in keyof TProcedures]: TProcedures[TKey] extends AnyRouter
23
- ? RouterLikeInner<TRoot, TProcedures[TKey]['_def']['record']>
24
- : TProcedures[TKey] extends AnyQueryProcedure
25
- ? QueryLike<TRoot, TProcedures[TKey]>
26
- : TProcedures[TKey] extends AnyMutationProcedure
27
- ? MutationLike<TRoot, TProcedures[TKey]>
22
+ [TKey in keyof TRecord]: TRecord[TKey] extends infer $Value
23
+ ? $Value extends RouterRecord
24
+ ? RouterLikeInner<TRoot, $Value>
25
+ : $Value extends AnyQueryProcedure
26
+ ? QueryLike<TRoot, $Value>
27
+ : $Value extends AnyMutationProcedure
28
+ ? MutationLike<TRoot, $Value>
29
+ : never
28
30
  : never;
29
31
  };
@@ -5,4 +5,7 @@ import type { DecoratedProcedureUtilsRecord } from '../proxy/utilsProxy';
5
5
  * Use to describe a Utils/Context path which matches the given route's interface
6
6
  */
7
7
  export type UtilsLike<TRouter extends AnyRouter> =
8
- DecoratedProcedureUtilsRecord<TRouter>;
8
+ DecoratedProcedureUtilsRecord<
9
+ TRouter['_def']['_config']['$types'],
10
+ TRouter['_def']['record']
11
+ >;
@@ -5,9 +5,9 @@ import type {
5
5
  AnyQueryProcedure,
6
6
  AnyRootTypes,
7
7
  AnyRouter,
8
- Filter,
9
8
  inferProcedureInput,
10
9
  inferTransformedProcedureOutput,
10
+ RouterRecord,
11
11
  } from '@trpc/server/unstable-core-do-not-import';
12
12
  import { createRecursiveProxy } from '@trpc/server/unstable-core-do-not-import';
13
13
  import { getQueryKeyInternal } from '../../internals/getQueryKey';
@@ -36,21 +36,22 @@ type GetQueryOptions<
36
36
  /**
37
37
  * @internal
38
38
  */
39
- export type UseQueriesProcedureRecord<TRouter extends AnyRouter> = {
40
- [TKey in keyof Filter<
41
- TRouter['_def']['record'],
42
- AnyQueryProcedure | AnyRouter
43
- >]: TRouter['_def']['record'][TKey] extends AnyRouter
44
- ? UseQueriesProcedureRecord<TRouter['_def']['record'][TKey]>
45
- : GetQueryOptions<
46
- TRouter['_def']['_config']['$types'],
47
- TRouter['_def']['record'][TKey]
48
- >;
39
+ export type UseQueriesProcedureRecord<
40
+ TRoot extends AnyRootTypes,
41
+ TRecord extends RouterRecord,
42
+ > = {
43
+ [TKey in keyof TRecord]: TRecord[TKey] extends infer $Value
44
+ ? $Value extends RouterRecord
45
+ ? UseQueriesProcedureRecord<TRoot, $Value>
46
+ : $Value extends AnyQueryProcedure
47
+ ? GetQueryOptions<TRoot, $Value>
48
+ : never
49
+ : never;
49
50
  };
50
51
 
51
52
  type GetSuspenseQueryOptions<
52
53
  TRoot extends AnyRootTypes,
53
- TProcedure extends AnyProcedure,
54
+ TProcedure extends AnyQueryProcedure,
54
55
  > = <TData = inferTransformedProcedureOutput<TRoot, TProcedure>>(
55
56
  input: inferProcedureInput<TProcedure>,
56
57
  opts?: TrpcQueryOptionsForUseSuspenseQueries<
@@ -67,16 +68,17 @@ type GetSuspenseQueryOptions<
67
68
  /**
68
69
  * @internal
69
70
  */
70
- export type UseSuspenseQueriesProcedureRecord<TRouter extends AnyRouter> = {
71
- [TKey in keyof Filter<
72
- TRouter['_def']['record'],
73
- AnyQueryProcedure | AnyRouter
74
- >]: TRouter['_def']['record'][TKey] extends AnyRouter
75
- ? UseSuspenseQueriesProcedureRecord<TRouter['_def']['record'][TKey]>
76
- : GetSuspenseQueryOptions<
77
- TRouter['_def']['_config']['$types'],
78
- TRouter['_def']['record'][TKey]
79
- >;
71
+ export type UseSuspenseQueriesProcedureRecord<
72
+ TRoot extends AnyRootTypes,
73
+ TRecord extends RouterRecord,
74
+ > = {
75
+ [TKey in keyof TRecord]: TRecord[TKey] extends infer $Value
76
+ ? $Value extends RouterRecord
77
+ ? UseSuspenseQueriesProcedureRecord<TRoot, $Value>
78
+ : $Value extends AnyQueryProcedure
79
+ ? GetSuspenseQueryOptions<TRoot, $Value>
80
+ : never
81
+ : never;
80
82
  };
81
83
 
82
84
  /**
@@ -103,5 +105,8 @@ export function createUseQueries<TRouter extends AnyRouter>(
103
105
  };
104
106
 
105
107
  return options;
106
- }) as UseQueriesProcedureRecord<TRouter>;
108
+ }) as UseQueriesProcedureRecord<
109
+ TRouter['_def']['_config']['$types'],
110
+ TRouter['_def']['record']
111
+ >;
107
112
  }
@@ -17,10 +17,10 @@ import type {
17
17
  AnyRootTypes,
18
18
  AnyRouter,
19
19
  DeepPartial,
20
- Filter,
21
20
  inferProcedureInput,
22
21
  inferTransformedProcedureOutput,
23
22
  ProtectedIntersection,
23
+ RouterRecord,
24
24
  } from '@trpc/server/unstable-core-do-not-import';
25
25
  import {
26
26
  createFlatProxy,
@@ -227,20 +227,19 @@ type DecorateRouter = {
227
227
  /**
228
228
  * @internal
229
229
  */
230
- export type DecoratedProcedureUtilsRecord<TRouter extends AnyRouter> =
231
- DecorateRouter & {
232
- [TKey in keyof Filter<
233
- TRouter['_def']['record'],
234
- AnyQueryProcedure | AnyRouter
235
- >]: TRouter['_def']['record'][TKey] extends AnyRouter
236
- ? DecoratedProcedureUtilsRecord<TRouter['_def']['record'][TKey]> &
237
- DecorateRouter
230
+ export type DecoratedProcedureUtilsRecord<
231
+ TRoot extends AnyRootTypes,
232
+ TRecord extends RouterRecord,
233
+ > = DecorateRouter & {
234
+ [TKey in keyof TRecord]: TRecord[TKey] extends infer $Value
235
+ ? $Value extends RouterRecord
236
+ ? DecoratedProcedureUtilsRecord<TRoot, $Value> & DecorateRouter
238
237
  : // utils only apply to queries
239
- DecorateProcedure<
240
- TRouter['_def']['_config']['$types'],
241
- TRouter['_def']['record'][TKey]
242
- >;
243
- }; // Add functions that should be available at utils root
238
+ $Value extends AnyQueryProcedure
239
+ ? DecorateProcedure<TRoot, $Value>
240
+ : never
241
+ : never;
242
+ }; // Add functions that should be available at utils root
244
243
 
245
244
  type AnyDecoratedProcedure = DecorateProcedure<any, any>;
246
245
 
@@ -249,11 +248,17 @@ export type CreateReactUtils<
249
248
  TSSRContext,
250
249
  > = ProtectedIntersection<
251
250
  DecoratedTRPCContextProps<TRouter, TSSRContext>,
252
- DecoratedProcedureUtilsRecord<TRouter>
251
+ DecoratedProcedureUtilsRecord<
252
+ TRouter['_def']['_config']['$types'],
253
+ TRouter['_def']['record']
254
+ >
253
255
  >;
254
256
 
255
257
  export type CreateQueryUtils<TRouter extends AnyRouter> =
256
- DecoratedProcedureUtilsRecord<TRouter>;
258
+ DecoratedProcedureUtilsRecord<
259
+ TRouter['_def']['_config']['$types'],
260
+ TRouter['_def']['record']
261
+ >;
257
262
 
258
263
  export const getQueryType = (
259
264
  utilName: keyof AnyDecoratedProcedure,
@@ -7,6 +7,7 @@ import type {
7
7
  AnyRouter,
8
8
  inferProcedureInput,
9
9
  inferTransformedProcedureOutput,
10
+ RouterRecord,
10
11
  } from '@trpc/server/unstable-core-do-not-import';
11
12
  import type {
12
13
  UseTRPCMutationOptions,
@@ -69,20 +70,23 @@ export type InferMutationResult<
69
70
  TContext
70
71
  >;
71
72
 
72
- export type inferReactQueryProcedureOptions<TRouter extends AnyRouter> = {
73
- [TKey in keyof TRouter['_def']['record']]: TRouter['_def']['record'][TKey] extends infer TRouterOrProcedure
74
- ? TRouterOrProcedure extends AnyRouter
75
- ? inferReactQueryProcedureOptions<TRouterOrProcedure>
76
- : TRouterOrProcedure extends AnyMutationProcedure
77
- ? InferMutationOptions<
78
- TRouter['_def']['_config']['$types'],
79
- TRouterOrProcedure
80
- >
81
- : TRouterOrProcedure extends AnyQueryProcedure
82
- ? InferQueryOptions<
83
- TRouter['_def']['_config']['$types'],
84
- TRouterOrProcedure
85
- >
73
+ type inferReactQueryProcedureOptionsInner<
74
+ TRoot extends AnyRootTypes,
75
+ TRecord extends RouterRecord,
76
+ > = {
77
+ [TKey in keyof TRecord]: TRecord[TKey] extends infer $Value
78
+ ? $Value extends RouterRecord
79
+ ? inferReactQueryProcedureOptionsInner<TRoot, $Value>
80
+ : $Value extends AnyMutationProcedure
81
+ ? InferMutationOptions<TRoot, $Value>
82
+ : $Value extends AnyQueryProcedure
83
+ ? InferQueryOptions<TRoot, $Value>
86
84
  : never
87
85
  : never;
88
86
  };
87
+
88
+ export type inferReactQueryProcedureOptions<TRouter extends AnyRouter> =
89
+ inferReactQueryProcedureOptionsInner<
90
+ TRouter['_def']['_config']['$types'],
91
+ TRouter['_def']['record']
92
+ >;