@trpc/react-query 10.0.0-proxy-beta.21

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 (65) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +88 -0
  3. package/dist/createHooksInternal-b47ee704.mjs +392 -0
  4. package/dist/createHooksInternal-e8214d72.js +400 -0
  5. package/dist/createTRPCReact.d.ts +38 -0
  6. package/dist/createTRPCReact.d.ts.map +1 -0
  7. package/dist/getArrayQueryKey-062214e0.mjs +19 -0
  8. package/dist/getArrayQueryKey-a2092b3c.js +21 -0
  9. package/dist/index.d.ts +4 -0
  10. package/dist/index.d.ts.map +1 -0
  11. package/dist/index.js +58 -0
  12. package/dist/index.mjs +47 -0
  13. package/dist/internals/context.d.ts +99 -0
  14. package/dist/internals/context.d.ts.map +1 -0
  15. package/dist/internals/getArrayQueryKey.d.ts +9 -0
  16. package/dist/internals/getArrayQueryKey.d.ts.map +1 -0
  17. package/dist/internals/getQueryKey.d.ts +6 -0
  18. package/dist/internals/getQueryKey.d.ts.map +1 -0
  19. package/dist/interop.d.ts +10 -0
  20. package/dist/interop.d.ts.map +1 -0
  21. package/dist/queryClient-0569f6e0.mjs +7 -0
  22. package/dist/queryClient-83576230.js +9 -0
  23. package/dist/shared/hooks/createHooksInternal.d.ts +115 -0
  24. package/dist/shared/hooks/createHooksInternal.d.ts.map +1 -0
  25. package/dist/shared/index.d.ts +6 -0
  26. package/dist/shared/index.d.ts.map +1 -0
  27. package/dist/shared/index.js +18 -0
  28. package/dist/shared/index.mjs +7 -0
  29. package/dist/shared/proxy/decorationProxy.d.ts +8 -0
  30. package/dist/shared/proxy/decorationProxy.d.ts.map +1 -0
  31. package/dist/shared/proxy/utilsProxy.d.ts +80 -0
  32. package/dist/shared/proxy/utilsProxy.d.ts.map +1 -0
  33. package/dist/shared/queryClient.d.ts +16 -0
  34. package/dist/shared/queryClient.d.ts.map +1 -0
  35. package/dist/shared/types.d.ts +26 -0
  36. package/dist/shared/types.d.ts.map +1 -0
  37. package/dist/ssg/index.d.ts +5 -0
  38. package/dist/ssg/index.d.ts.map +1 -0
  39. package/dist/ssg/index.js +126 -0
  40. package/dist/ssg/index.mjs +121 -0
  41. package/dist/ssg/ssg.d.ts +23 -0
  42. package/dist/ssg/ssg.d.ts.map +1 -0
  43. package/dist/ssg/ssgProxy.d.ts +36 -0
  44. package/dist/ssg/ssgProxy.d.ts.map +1 -0
  45. package/package.json +75 -0
  46. package/shared/index.d.ts +1 -0
  47. package/shared/index.js +1 -0
  48. package/src/createTRPCReact.tsx +164 -0
  49. package/src/index.ts +4 -0
  50. package/src/internals/context.tsx +235 -0
  51. package/src/internals/getArrayQueryKey.test.ts +41 -0
  52. package/src/internals/getArrayQueryKey.ts +18 -0
  53. package/src/internals/getQueryKey.ts +10 -0
  54. package/src/interop.ts +25 -0
  55. package/src/shared/hooks/createHooksInternal.tsx +664 -0
  56. package/src/shared/index.ts +8 -0
  57. package/src/shared/proxy/decorationProxy.ts +33 -0
  58. package/src/shared/proxy/utilsProxy.ts +266 -0
  59. package/src/shared/queryClient.ts +20 -0
  60. package/src/shared/types.ts +27 -0
  61. package/src/ssg/index.ts +4 -0
  62. package/src/ssg/ssg.ts +138 -0
  63. package/src/ssg/ssgProxy.ts +105 -0
  64. package/ssg/index.d.ts +1 -0
  65. package/ssg/index.js +1 -0
@@ -0,0 +1,99 @@
1
+ /// <reference types="react" />
2
+ import { CancelOptions, FetchInfiniteQueryOptions, FetchQueryOptions, InfiniteData, InvalidateOptions, InvalidateQueryFilters, QueryClient, RefetchOptions, RefetchQueryFilters, SetDataOptions, Updater } from '@tanstack/react-query';
3
+ import { TRPCClient, TRPCClientError, TRPCRequestOptions } from '@trpc/client';
4
+ import type { AnyRouter, inferHandlerInput, inferProcedureInput, inferProcedureOutput } from '@trpc/server';
5
+ export interface TRPCFetchQueryOptions<TInput, TError, TOutput> extends FetchQueryOptions<TInput, TError, TOutput>, TRPCRequestOptions {
6
+ }
7
+ export interface TRPCFetchInfiniteQueryOptions<TInput, TError, TOutput> extends FetchInfiniteQueryOptions<TInput, TError, TOutput>, TRPCRequestOptions {
8
+ }
9
+ /** @internal */
10
+ export declare type SSRState = false | 'prepass' | 'mounting' | 'mounted';
11
+ export interface ProxyTRPCContextProps<TRouter extends AnyRouter, TSSRContext> {
12
+ /**
13
+ * The `TRPCClient`
14
+ */
15
+ client: TRPCClient<TRouter>;
16
+ /**
17
+ * The SSR context when server-side rendering
18
+ * @default null
19
+ */
20
+ ssrContext?: TSSRContext | null;
21
+ /**
22
+ * State of SSR hydration.
23
+ * - `false` if not using SSR.
24
+ * - `prepass` when doing a prepass to fetch queries' data
25
+ * - `mounting` before TRPCProvider has been rendered on the client
26
+ * - `mounted` when the TRPCProvider has been rendered on the client
27
+ * @default false
28
+ */
29
+ ssrState?: SSRState;
30
+ /**
31
+ * Abort loading query calls when unmounting a component - usually when navigating to a new page
32
+ * @default false
33
+ */
34
+ abortOnUnmount?: boolean;
35
+ }
36
+ export interface TRPCContextProps<TRouter extends AnyRouter, TSSRContext> extends ProxyTRPCContextProps<TRouter, TSSRContext> {
37
+ /**
38
+ * The react-query `QueryClient`
39
+ */
40
+ queryClient: QueryClient;
41
+ }
42
+ export declare const contextProps: (keyof ProxyTRPCContextProps<any, any>)[];
43
+ /** @internal */
44
+ export interface TRPCContextState<TRouter extends AnyRouter, TSSRContext = undefined> extends Required<TRPCContextProps<TRouter, TSSRContext>> {
45
+ /**
46
+ * @link https://react-query.tanstack.com/guides/prefetching
47
+ */
48
+ fetchQuery<TPath extends keyof TRouter['_def']['queries'] & string, TProcedure extends TRouter['_def']['queries'][TPath], TOutput extends inferProcedureOutput<TProcedure>, TInput extends inferProcedureInput<TProcedure>>(pathAndInput: [path: TPath, ...args: inferHandlerInput<TProcedure>], opts?: TRPCFetchQueryOptions<TInput, TRPCClientError<TRouter>, TOutput>): Promise<TOutput>;
49
+ /**
50
+ * @link https://react-query.tanstack.com/guides/prefetching
51
+ */
52
+ fetchInfiniteQuery<TPath extends keyof TRouter['_def']['queries'] & string, TProcedure extends TRouter['_def']['queries'][TPath], TOutput extends inferProcedureOutput<TProcedure>, TInput extends inferProcedureInput<TProcedure>>(pathAndInput: [path: TPath, ...args: inferHandlerInput<TProcedure>], opts?: TRPCFetchInfiniteQueryOptions<TInput, TRPCClientError<TRouter>, TOutput>): Promise<InfiniteData<TOutput>>;
53
+ /**
54
+ * @link https://react-query.tanstack.com/guides/prefetching
55
+ */
56
+ prefetchQuery<TPath extends keyof TRouter['_def']['queries'] & string, TProcedure extends TRouter['_def']['queries'][TPath], TOutput extends inferProcedureOutput<TProcedure>, TInput extends inferProcedureInput<TProcedure>>(pathAndInput: [path: TPath, ...args: inferHandlerInput<TProcedure>], opts?: TRPCFetchQueryOptions<TInput, TRPCClientError<TRouter>, TOutput>): Promise<void>;
57
+ /**
58
+ * @link https://react-query.tanstack.com/guides/prefetching
59
+ */
60
+ prefetchInfiniteQuery<TPath extends keyof TRouter['_def']['queries'] & string, TProcedure extends TRouter['_def']['queries'][TPath], TOutput extends inferProcedureOutput<TProcedure>, TInput extends inferProcedureInput<TProcedure>>(pathAndInput: [path: TPath, ...args: inferHandlerInput<TProcedure>], opts?: TRPCFetchInfiniteQueryOptions<TInput, TRPCClientError<TRouter>, TOutput>): Promise<void>;
61
+ /**
62
+ * @link https://react-query.tanstack.com/guides/query-invalidation
63
+ */
64
+ invalidateQueries<TPath extends keyof TRouter['_def']['queries'] & string, TInput extends inferProcedureInput<TRouter['_def']['queries'][TPath]>>(pathAndInput?: [TPath, TInput?] | TPath, filters?: InvalidateQueryFilters, options?: InvalidateOptions): Promise<void>;
65
+ /**
66
+ * @link https://react-query.tanstack.com/guides/query-invalidation
67
+ */
68
+ invalidateQueries(filters?: InvalidateQueryFilters, options?: InvalidateOptions): Promise<void>;
69
+ /**
70
+ * @link https://react-query.tanstack.com/reference/QueryClient#queryclientrefetchqueries
71
+ */
72
+ refetchQueries<TPath extends keyof TRouter['_def']['queries'] & string, TInput extends inferProcedureInput<TRouter['_def']['queries'][TPath]>>(pathAndInput: [TPath, TInput?], filters?: RefetchQueryFilters, options?: RefetchOptions): Promise<void>;
73
+ /**
74
+ * @link https://react-query.tanstack.com/reference/QueryClient#queryclientrefetchqueries
75
+ */
76
+ refetchQueries(filters?: RefetchQueryFilters, options?: RefetchOptions): Promise<void>;
77
+ /**
78
+ * @link https://react-query.tanstack.com/guides/query-cancellation
79
+ */
80
+ cancelQuery<TPath extends keyof TRouter['_def']['queries'] & string, TInput extends inferProcedureInput<TRouter['_def']['queries'][TPath]>>(pathAndInput: [TPath, TInput?], options?: CancelOptions): Promise<void>;
81
+ /**
82
+ * @link https://react-query.tanstack.com/reference/QueryClient#queryclientsetquerydata
83
+ */
84
+ setQueryData<TPath extends keyof TRouter['_def']['queries'] & string, TInput extends inferProcedureInput<TRouter['_def']['queries'][TPath]>, TOutput extends inferProcedureOutput<TRouter['_def']['queries'][TPath]>>(pathAndInput: [TPath, TInput?], updater: Updater<TOutput | undefined, TOutput | undefined>, options?: SetDataOptions): void;
85
+ /**
86
+ * @link https://react-query.tanstack.com/reference/QueryClient#queryclientgetquerydata
87
+ */
88
+ getQueryData<TPath extends keyof TRouter['_def']['queries'] & string, TInput extends inferProcedureInput<TRouter['_def']['queries'][TPath]>, TOutput extends inferProcedureOutput<TRouter['_def']['queries'][TPath]>>(pathAndInput: [TPath, TInput?]): TOutput | undefined;
89
+ /**
90
+ * @link https://react-query.tanstack.com/reference/QueryClient#queryclientgetquerydata
91
+ */
92
+ setInfiniteQueryData<TPath extends keyof TRouter['_def']['queries'] & string, TInput extends inferProcedureInput<TRouter['_def']['queries'][TPath]>, TOutput extends inferProcedureOutput<TRouter['_def']['queries'][TPath]>>(pathAndInput: [TPath, TInput?], updater: Updater<InfiniteData<TOutput> | undefined, InfiniteData<TOutput> | undefined>, options?: SetDataOptions): void;
93
+ /**
94
+ * @link https://react-query.tanstack.com/reference/QueryClient#queryclientgetquerydata
95
+ */
96
+ getInfiniteQueryData<TPath extends keyof TRouter['_def']['queries'] & string, TInput extends inferProcedureInput<TRouter['_def']['queries'][TPath]>, TOutput extends inferProcedureOutput<TRouter['_def']['queries'][TPath]>>(pathAndInput: [TPath, TInput?]): InfiniteData<TOutput> | undefined;
97
+ }
98
+ export declare const TRPCContext: import("react").Context<any>;
99
+ //# sourceMappingURL=context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../../packages/react-query/src/internals/context.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,aAAa,EACb,yBAAyB,EACzB,iBAAiB,EACjB,YAAY,EACZ,iBAAiB,EACjB,sBAAsB,EACtB,WAAW,EACX,cAAc,EACd,mBAAmB,EACnB,cAAc,EACd,OAAO,EACR,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAC/E,OAAO,KAAK,EACV,SAAS,EACT,iBAAiB,EACjB,mBAAmB,EACnB,oBAAoB,EACrB,MAAM,cAAc,CAAC;AAGtB,MAAM,WAAW,qBAAqB,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAC5D,SAAQ,iBAAiB,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAChD,kBAAkB;CAAG;AAEzB,MAAM,WAAW,6BAA6B,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CACpE,SAAQ,yBAAyB,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EACxD,kBAAkB;CAAG;AAEzB,gBAAgB;AAChB,oBAAY,QAAQ,GAAG,KAAK,GAAG,SAAS,GAAG,UAAU,GAAG,SAAS,CAAC;AAElE,MAAM,WAAW,qBAAqB,CAAC,OAAO,SAAS,SAAS,EAAE,WAAW;IAC3E;;OAEG;IACH,MAAM,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC;IAC5B;;;OAGG;IACH,UAAU,CAAC,EA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C,KAAK,CAAC,CAAC,EACrE,OAAO,SAAS,oBAAoB,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,CAAC,KAAK,CAAC,CAAC,EAEvE,YAAY,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,EAC9B,OAAO,EAAE,OAAO,CACd,YAAY,CAAC,OAAO,CAAC,GAAG,SAAS,EACjC,YAAY,CAAC,OAAO,CAAC,GAAG,SAAS,CAClC,EACD,OAAO,CAAC,EAAE,cAAc,GACvB,IAAI,CAAC;IACR;;OAEG;IACH,oBAAoB,CAClB,KAAK,SAAS,MAAM,OAAO,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,GAAG,MAAM,EACvD,MAAM,SAAS,mBAAmB,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,CAAC,KAAK,CAAC,CAAC,EACrE,OAAO,SAAS,oBAAoB,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,CAAC,KAAK,CAAC,CAAC,EAEvE,YAAY,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,GAC7B,YAAY,CAAC,OAAO,CAAC,GAAG,SAAS,CAAC;CACtC;AAED,eAAO,MAAM,WAAW,8BAA6B,CAAC"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * To allow easy interactions with groups of related queries, such as
3
+ * invalidating all queries of a router, we use an array as the path when
4
+ * storing in tanstack query. This function converts from the `.` separated
5
+ * path passed around internally by both the legacy and proxy implementation.
6
+ * https://github.com/trpc/trpc/issues/2611
7
+ */
8
+ export declare function getArrayQueryKey(queryKey: string | [string] | [string, ...unknown[]] | unknown[]): [string[]] | [string[], ...unknown[]] | [];
9
+ //# sourceMappingURL=getArrayQueryKey.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getArrayQueryKey.d.ts","sourceRoot":"","sources":["../../../../packages/react-query/src/internals/getArrayQueryKey.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,MAAM,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,EAAE,GAAG,OAAO,EAAE,CAAC,GAAG,OAAO,EAAE,GAC/D,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,MAAM,EAAE,EAAE,GAAG,OAAO,EAAE,CAAC,GAAG,EAAE,CAQ5C"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * We treat `undefined` as an input the same as omitting an `input`
3
+ * https://github.com/trpc/trpc/issues/2290
4
+ */
5
+ export declare function getQueryKey(path: string, input: unknown): [string] | [string, unknown];
6
+ //# sourceMappingURL=getQueryKey.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getQueryKey.d.ts","sourceRoot":"","sources":["../../../../packages/react-query/src/internals/getQueryKey.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,wBAAgB,WAAW,CACzB,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,OAAO,GACb,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAE9B"}
@@ -0,0 +1,10 @@
1
+ import { AnyRouter } from '@trpc/server';
2
+ import { CreateTRPCReact } from './createTRPCReact';
3
+ import { CreateReactQueryHooks } from './shared/hooks/createHooksInternal';
4
+ /**
5
+ * @deprecated use `createTRPCReact` instead
6
+ */
7
+ export declare function createReactQueryHooks<TRouter extends AnyRouter, TSSRContext = unknown>(): CreateReactQueryHooks<TRouter, TSSRContext> & {
8
+ proxy: CreateTRPCReact<TRouter, TSSRContext>;
9
+ };
10
+ //# sourceMappingURL=interop.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interop.d.ts","sourceRoot":"","sources":["../src/interop.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,eAAe,EAA4B,MAAM,mBAAmB,CAAC;AAC9E,OAAO,EACL,qBAAqB,EAEtB,MAAM,oCAAoC,CAAC;AAE5C;;GAEG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,SAAS,SAAS,EACzB,WAAW,GAAG,OAAO,KAClB,qBAAqB,CAAC,OAAO,EAAE,WAAW,CAAC,GAAG;IACjD,KAAK,EAAE,eAAe,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;CAC9C,CAQA"}
@@ -0,0 +1,7 @@
1
+ import { QueryClient } from '@tanstack/react-query';
2
+
3
+ /**
4
+ * @internal
5
+ */ const getQueryClient = (config)=>config.queryClient ?? new QueryClient(config.queryClientConfig);
6
+
7
+ export { getQueryClient as g };
@@ -0,0 +1,9 @@
1
+ 'use strict';
2
+
3
+ var reactQuery = require('@tanstack/react-query');
4
+
5
+ /**
6
+ * @internal
7
+ */ const getQueryClient = (config)=>config.queryClient ?? new reactQuery.QueryClient(config.queryClientConfig);
8
+
9
+ exports.getQueryClient = getQueryClient;
@@ -0,0 +1,115 @@
1
+ import { DehydratedState, UseInfiniteQueryOptions, UseInfiniteQueryResult, UseMutationOptions, UseMutationResult, UseQueryOptions, UseQueryResult } from '@tanstack/react-query';
2
+ import { CreateTRPCClientOptions, TRPCClient, TRPCClientErrorLike, TRPCRequestOptions } from '@trpc/client';
3
+ import type { AnyRouter, ProcedureRecord, inferHandlerInput, inferProcedureClientError, inferProcedureInput, inferProcedureOutput } from '@trpc/server';
4
+ import { inferObservableValue } from '@trpc/server/observable';
5
+ import { ReactNode } from 'react';
6
+ import { TRPCContextProps, TRPCContextState } from '../../internals/context';
7
+ import { CreateTRPCReactOptions } from '../types';
8
+ export declare type OutputWithCursor<TData, TCursor = any> = {
9
+ cursor: TCursor | null;
10
+ data: TData;
11
+ };
12
+ export interface TRPCReactRequestOptions extends Omit<TRPCRequestOptions, 'signal'> {
13
+ /**
14
+ * Opt out of SSR for this query by passing `ssr: false`
15
+ */
16
+ ssr?: boolean;
17
+ /**
18
+ * Opt out or into aborting request on unmount
19
+ */
20
+ abortOnUnmount?: boolean;
21
+ }
22
+ export interface TRPCUseQueryBaseOptions {
23
+ /**
24
+ * tRPC-related options
25
+ */
26
+ trpc?: TRPCReactRequestOptions;
27
+ }
28
+ export type { TRPCContext, TRPCContextState } from '../../internals/context';
29
+ export interface UseTRPCQueryOptions<TPath, TInput, TOutput, TData, TError> extends UseQueryOptions<TOutput, TError, TData, [TPath, TInput]>, TRPCUseQueryBaseOptions {
30
+ }
31
+ export interface UseTRPCInfiniteQueryOptions<TPath, TInput, TOutput, TError> extends UseInfiniteQueryOptions<TOutput, TError, TOutput, TOutput, [
32
+ TPath,
33
+ TInput
34
+ ]>, TRPCUseQueryBaseOptions {
35
+ }
36
+ export interface UseTRPCMutationOptions<TInput, TError, TOutput, TContext = unknown> extends UseMutationOptions<TOutput, TError, TInput, TContext>, TRPCUseQueryBaseOptions {
37
+ }
38
+ export interface UseTRPCSubscriptionOptions<TOutput, TError> {
39
+ enabled?: boolean;
40
+ onStarted?: () => void;
41
+ onData: (data: TOutput) => void;
42
+ onError?: (err: TError) => void;
43
+ }
44
+ declare type inferInfiniteQueryNames<TObj extends ProcedureRecord> = {
45
+ [TPath in keyof TObj]: inferProcedureInput<TObj[TPath]> extends {
46
+ cursor?: any;
47
+ } ? TPath : never;
48
+ }[keyof TObj];
49
+ declare type inferProcedures<TObj extends ProcedureRecord> = {
50
+ [TPath in keyof TObj]: {
51
+ input: inferProcedureInput<TObj[TPath]>;
52
+ output: inferProcedureOutput<TObj[TPath]>;
53
+ };
54
+ };
55
+ export interface TRPCProviderProps<TRouter extends AnyRouter, TSSRContext> extends TRPCContextProps<TRouter, TSSRContext> {
56
+ children: ReactNode;
57
+ }
58
+ export declare type TRPCProvider<TRouter extends AnyRouter, TSSRContext> = (props: TRPCProviderProps<TRouter, TSSRContext>) => JSX.Element;
59
+ export declare type UseDehydratedState<TRouter extends AnyRouter> = (client: TRPCClient<TRouter>, trpcState: DehydratedState | undefined) => DehydratedState | undefined;
60
+ export declare type CreateClient<TRouter extends AnyRouter> = (opts: CreateTRPCClientOptions<TRouter>) => TRPCClient<TRouter>;
61
+ interface TRPCHookResult {
62
+ trpc: {
63
+ path: string;
64
+ };
65
+ }
66
+ /**
67
+ * @internal
68
+ */
69
+ export declare type UseTRPCQueryResult<TData, TError> = UseQueryResult<TData, TError> & TRPCHookResult;
70
+ /**
71
+ * @internal
72
+ */
73
+ export declare type UseTRPCInfiniteQueryResult<TData, TError> = UseInfiniteQueryResult<TData, TError> & TRPCHookResult;
74
+ /**
75
+ * @internal
76
+ */
77
+ export declare type UseTRPCMutationResult<TData, TError, TVariables, TContext> = UseMutationResult<TData, TError, TVariables, TContext> & TRPCHookResult;
78
+ /**
79
+ * Create strongly typed react hooks
80
+ * @internal
81
+ */
82
+ export declare function createHooksInternal<TRouter extends AnyRouter, TSSRContext = unknown>(config?: CreateTRPCReactOptions<TRouter>): {
83
+ Provider: TRPCProvider<TRouter, TSSRContext>;
84
+ createClient: CreateClient<TRouter>;
85
+ useContext: () => TRPCContextState<TRouter, TSSRContext>;
86
+ useQuery: <TPath extends keyof TRouter["_def"]["queries"] & string, TQueryFnData = inferProcedures<TRouter["_def"]["queries"]>[TPath]["output"], TData = inferProcedures<TRouter["_def"]["queries"]>[TPath]["output"]>(pathAndInput: [path: TPath, ...args: import("@trpc/server").ProcedureArgs<import("@trpc/server").inferProcedureParams<TRouter["_def"]["queries"][TPath]>>], opts?: UseTRPCQueryOptions<TPath, inferProcedures<TRouter["_def"]["queries"]>[TPath]["input"], TQueryFnData, TData, TRPCClientErrorLike<TRouter>> | undefined) => UseTRPCQueryResult<TData, TRPCClientErrorLike<TRouter>>;
87
+ useMutation: <TPath_1 extends keyof TRouter["_def"]["mutations"] & string, TContext = unknown>(path: TPath_1 | [TPath_1], opts?: UseTRPCMutationOptions<inferProcedures<TRouter["_def"]["mutations"]>[TPath_1]["input"], TRPCClientErrorLike<TRouter>, inferProcedures<TRouter["_def"]["mutations"]>[TPath_1]["output"], TContext> | undefined) => UseTRPCMutationResult<inferProcedures<TRouter["_def"]["mutations"]>[TPath_1]["output"], TRPCClientErrorLike<TRouter>, inferProcedures<TRouter["_def"]["mutations"]>[TPath_1]["input"], TContext>;
88
+ useSubscription: <TPath_2 extends keyof TRouter["_def"]["subscriptions"] & string, TOutput extends inferObservableValue<inferProcedureOutput<TRouter["_def"]["subscriptions"][TPath_2]>>>(pathAndInput: [path: TPath_2, ...args: import("@trpc/server").ProcedureArgs<import("@trpc/server").inferProcedureParams<TRouter["_def"]["subscriptions"][TPath_2]>>], opts: UseTRPCSubscriptionOptions<inferObservableValue<inferProcedureOutput<TRouter["_def"]["subscriptions"][TPath_2]>>, inferProcedureClientError<TRouter["_def"]["subscriptions"][TPath_2]>>) => void;
89
+ useDehydratedState: UseDehydratedState<TRouter>;
90
+ useInfiniteQuery: <TPath_3 extends inferInfiniteQueryNames<TRouter["_def"]["queries"]> & string>(pathAndInput: [path: TPath_3, input: Omit<inferProcedures<TRouter["_def"]["queries"]>[TPath_3]["input"], "cursor">], opts?: UseTRPCInfiniteQueryOptions<TPath_3, Omit<inferProcedures<TRouter["_def"]["queries"]>[TPath_3]["input"], "cursor">, inferProcedures<TRouter["_def"]["queries"]>[TPath_3]["output"], TRPCClientErrorLike<TRouter>> | undefined) => UseTRPCInfiniteQueryResult<inferProcedures<TRouter["_def"]["queries"]>[TPath_3]["output"], TRPCClientErrorLike<TRouter>>;
91
+ };
92
+ /**
93
+ * Hack to infer the type of `createReactQueryHooks`
94
+ * @link https://stackoverflow.com/a/59072991
95
+ */
96
+ declare class GnClass<TRouter extends AnyRouter, TSSRContext = unknown> {
97
+ fn(): {
98
+ Provider: TRPCProvider<TRouter, TSSRContext>;
99
+ createClient: CreateClient<TRouter>;
100
+ useContext: () => TRPCContextState<TRouter, TSSRContext>;
101
+ useQuery: <TPath extends keyof TRouter["_def"]["queries"] & string, TQueryFnData = inferProcedures<TRouter["_def"]["queries"]>[TPath]["output"], TData = inferProcedures<TRouter["_def"]["queries"]>[TPath]["output"]>(pathAndInput: [path: TPath, ...args: import("@trpc/server").ProcedureArgs<import("@trpc/server").inferProcedureParams<TRouter["_def"]["queries"][TPath]>>], opts?: UseTRPCQueryOptions<TPath, inferProcedures<TRouter["_def"]["queries"]>[TPath]["input"], TQueryFnData, TData, TRPCClientErrorLike<TRouter>> | undefined) => UseTRPCQueryResult<TData, TRPCClientErrorLike<TRouter>>;
102
+ useMutation: <TPath_1 extends keyof TRouter["_def"]["mutations"] & string, TContext = unknown>(path: TPath_1 | [TPath_1], opts?: UseTRPCMutationOptions<inferProcedures<TRouter["_def"]["mutations"]>[TPath_1]["input"], TRPCClientErrorLike<TRouter>, inferProcedures<TRouter["_def"]["mutations"]>[TPath_1]["output"], TContext> | undefined) => UseTRPCMutationResult<inferProcedures<TRouter["_def"]["mutations"]>[TPath_1]["output"], TRPCClientErrorLike<TRouter>, inferProcedures<TRouter["_def"]["mutations"]>[TPath_1]["input"], TContext>;
103
+ useSubscription: <TPath_2 extends keyof TRouter["_def"]["subscriptions"] & string, TOutput extends inferObservableValue<inferProcedureOutput<TRouter["_def"]["subscriptions"][TPath_2]>>>(pathAndInput: [path: TPath_2, ...args: import("@trpc/server").ProcedureArgs<import("@trpc/server").inferProcedureParams<TRouter["_def"]["subscriptions"][TPath_2]>>], opts: UseTRPCSubscriptionOptions<inferObservableValue<inferProcedureOutput<TRouter["_def"]["subscriptions"][TPath_2]>>, inferProcedureClientError<TRouter["_def"]["subscriptions"][TPath_2]>>) => void;
104
+ useDehydratedState: UseDehydratedState<TRouter>;
105
+ useInfiniteQuery: <TPath_3 extends inferInfiniteQueryNames<TRouter["_def"]["queries"]> & string>(pathAndInput: [path: TPath_3, input: Omit<inferProcedures<TRouter["_def"]["queries"]>[TPath_3]["input"], "cursor">], opts?: UseTRPCInfiniteQueryOptions<TPath_3, Omit<inferProcedures<TRouter["_def"]["queries"]>[TPath_3]["input"], "cursor">, inferProcedures<TRouter["_def"]["queries"]>[TPath_3]["output"], TRPCClientErrorLike<TRouter>> | undefined) => UseTRPCInfiniteQueryResult<inferProcedures<TRouter["_def"]["queries"]>[TPath_3]["output"], TRPCClientErrorLike<TRouter>>;
106
+ };
107
+ }
108
+ declare type returnTypeInferer<TType> = TType extends (a: Record<string, string>) => infer U ? U : never;
109
+ declare type fooType<TRouter extends AnyRouter, TSSRContext = unknown> = GnClass<TRouter, TSSRContext>['fn'];
110
+ /**
111
+ * Infer the type of a `createReactQueryHooks` function
112
+ * @internal
113
+ */
114
+ export declare type CreateReactQueryHooks<TRouter extends AnyRouter, TSSRContext = unknown> = returnTypeInferer<fooType<TRouter, TSSRContext>>;
115
+ //# sourceMappingURL=createHooksInternal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createHooksInternal.d.ts","sourceRoot":"","sources":["../../../../../packages/react-query/src/shared/hooks/createHooksInternal.tsx"],"names":[],"mappings":"AACA,OAAO,EACL,eAAe,EACf,uBAAuB,EACvB,sBAAsB,EACtB,kBAAkB,EAClB,iBAAiB,EACjB,eAAe,EACf,cAAc,EAMf,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,uBAAuB,EACvB,UAAU,EACV,mBAAmB,EACnB,kBAAkB,EAEnB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EACV,SAAS,EACT,eAAe,EACf,iBAAiB,EACjB,yBAAyB,EACzB,mBAAmB,EACnB,oBAAoB,EAErB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAc,EACZ,SAAS,EAMV,MAAM,OAAO,CAAC;AACf,OAAO,EAGL,gBAAgB,EAChB,gBAAgB,EACjB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,sBAAsB,EAAuB,MAAM,UAAU,CAAC;AAEvE,oBAAY,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,GAAG,IAAI;IACnD,MAAM,EAAE,OAAO,GAAG,IAAI,CAAC;IACvB,IAAI,EAAE,KAAK,CAAC;CACb,CAAC;AAEF,MAAM,WAAW,u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B,CAAC,KAAK,EAAE,MAAM,IAAI,sBAAsB,CAC5E,KAAK,EACL,MAAM,CACP,GACC,cAAc,CAAC;AAEjB;;GAEG;AACH,oBAAY,qBAAqB,CAAC,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,IACnE,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,CAAC,GAAG,cAAc,CAAC;AAU1E;;;GAGG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,SAAS,SAAS,EACzB,WAAW,GAAG,OAAO,EACrB,MAAM,CAAC,EAAE,sBAAsB,CAAC,OAAO,CAAC;;;;;;;;;EA8bzC;AAED;;;GAGG;AACH,cAAM,OAAO,CAAC,OAAO,SAAS,SAAS,EAAE,WAAW,GAAG,OAAO;IAC5D,EAAE;;;;;;;;;;CAGH;AAED,aAAK,iBAAiB,CAAC,KAAK,IAAI,KAAK,SAAS,CAC5C,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KACtB,MAAM,CAAC,GACR,CAAC,GACD,KAAK,CAAC;AACV,aAAK,OAAO,CAAC,OAAO,SAAS,SAAS,EAAE,WAAW,GAAG,OAAO,IAAI,OAAO,CACtE,OAAO,EACP,WAAW,CACZ,CAAC,IAAI,CAAC,CAAC;AAER;;;GAGG;AACH,oBAAY,qBAAqB,CAC/B,OAAO,SAAS,SAAS,EACzB,WAAW,GAAG,OAAO,IACnB,iBAAiB,CAAC,OAAO,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC,CAAC"}
@@ -0,0 +1,6 @@
1
+ export * from './proxy/decorationProxy';
2
+ export * from './proxy/utilsProxy';
3
+ export type { DecorateProcedure, DecoratedProcedureRecord, } from '../createTRPCReact';
4
+ export * from './hooks/createHooksInternal';
5
+ export * from './queryClient';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../packages/react-query/src/shared/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,YAAY,EACV,iBAAiB,EACjB,wBAAwB,GACzB,MAAM,oBAAoB,CAAC;AAC5B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,eAAe,CAAC"}
@@ -0,0 +1,18 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var createHooksInternal = require('../createHooksInternal-e8214d72.js');
6
+ var queryClient = require('../queryClient-83576230.js');
7
+ require('@trpc/server/shared');
8
+ require('@tanstack/react-query');
9
+ require('@trpc/client');
10
+ require('react');
11
+ require('../getArrayQueryKey-a2092b3c.js');
12
+
13
+
14
+
15
+ exports.createHooksInternal = createHooksInternal.createHooksInternal;
16
+ exports.createReactProxyDecoration = createHooksInternal.createReactProxyDecoration;
17
+ exports.createReactQueryUtilsProxy = createHooksInternal.createReactQueryUtilsProxy;
18
+ exports.getQueryClient = queryClient.getQueryClient;
@@ -0,0 +1,7 @@
1
+ export { c as createHooksInternal, b as createReactProxyDecoration, a as createReactQueryUtilsProxy } from '../createHooksInternal-b47ee704.mjs';
2
+ export { g as getQueryClient } from '../queryClient-0569f6e0.mjs';
3
+ import '@trpc/server/shared';
4
+ import '@tanstack/react-query';
5
+ import '@trpc/client';
6
+ import 'react';
7
+ import '../getArrayQueryKey-062214e0.mjs';
@@ -0,0 +1,8 @@
1
+ import { AnyRouter } from '@trpc/server';
2
+ import { CreateReactQueryHooks } from '../hooks/createHooksInternal';
3
+ /**
4
+ * Create proxy for decorating procedures
5
+ * @internal
6
+ */
7
+ export declare function createReactProxyDecoration<TRouter extends AnyRouter, TSSRContext = unknown>(name: string, hooks: CreateReactQueryHooks<TRouter, TSSRContext>): unknown;
8
+ //# sourceMappingURL=decorationProxy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"decorationProxy.d.ts","sourceRoot":"","sources":["../../../../../packages/react-query/src/shared/proxy/decorationProxy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAGzC,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAErE;;;GAGG;AACH,wBAAgB,0BAA0B,CACxC,OAAO,SAAS,SAAS,EACzB,WAAW,GAAG,OAAO,EACrB,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,qBAAqB,CAAC,OAAO,EAAE,WAAW,CAAC,WAoBjE"}
@@ -0,0 +1,80 @@
1
+ import { CancelOptions, InfiniteData, InvalidateOptions, InvalidateQueryFilters, RefetchOptions, RefetchQueryFilters, SetDataOptions, Updater } from '@tanstack/react-query';
2
+ import { TRPCClientError } from '@trpc/client';
3
+ import { AnyQueryProcedure, AnyRouter, Filter, ProcedureOptions, inferProcedureInput, inferProcedureOutput } from '@trpc/server';
4
+ import { ProxyTRPCContextProps, TRPCContextState, TRPCFetchInfiniteQueryOptions, TRPCFetchQueryOptions } from '../../internals/context';
5
+ declare type DecorateProcedure<TRouter extends AnyRouter, TProcedure extends AnyQueryProcedure> = {
6
+ /**
7
+ * @link https://react-query.tanstack.com/guides/prefetching
8
+ */
9
+ fetch(input: inferProcedureInput<TProcedure>, opts?: TRPCFetchQueryOptions<inferProcedureInput<TProcedure>, TRPCClientError<TRouter>, inferProcedureOutput<TProcedure>>): Promise<inferProcedureOutput<TProcedure>>;
10
+ /**
11
+ * @link https://react-query.tanstack.com/guides/prefetching
12
+ */
13
+ fetchInfinite(input: inferProcedureInput<TProcedure>, opts?: TRPCFetchInfiniteQueryOptions<inferProcedureInput<TProcedure>, TRPCClientError<TRouter>, inferProcedureOutput<TProcedure>>): Promise<InfiniteData<inferProcedureOutput<TProcedure>>>;
14
+ /**
15
+ * @link https://react-query.tanstack.com/guides/prefetching
16
+ */
17
+ prefetch(input: inferProcedureInput<TProcedure>, opts?: TRPCFetchQueryOptions<inferProcedureInput<TProcedure>, TRPCClientError<TRouter>, inferProcedureOutput<TProcedure>>): Promise<void>;
18
+ /**
19
+ * @link https://react-query.tanstack.com/guides/prefetching
20
+ */
21
+ prefetchInfinite(input: inferProcedureInput<TProcedure>, procedureOpts?: ProcedureOptions, opts?: TRPCFetchInfiniteQueryOptions<inferProcedureInput<TProcedure>, TRPCClientError<TRouter>, inferProcedureOutput<TProcedure>>): Promise<void>;
22
+ /**
23
+ * @link https://react-query.tanstack.com/guides/query-invalidation
24
+ */
25
+ invalidate(input?: inferProcedureInput<TProcedure>, filters?: InvalidateQueryFilters, options?: InvalidateOptions): Promise<void>;
26
+ /**
27
+ * @link https://react-query.tanstack.com/reference/QueryClient#queryclientrefetchqueries
28
+ */
29
+ refetch(input?: inferProcedureInput<TProcedure>, filters?: RefetchQueryFilters, options?: RefetchOptions): Promise<void>;
30
+ /**
31
+ * @link https://react-query.tanstack.com/guides/query-cancellation
32
+ */
33
+ cancel(input?: inferProcedureInput<TProcedure>, options?: CancelOptions): Promise<void>;
34
+ /**
35
+ * @link https://react-query.tanstack.com/reference/QueryClient#queryclientsetquerydata
36
+ */
37
+ setData(updater: Updater<inferProcedureOutput<TProcedure> | undefined, inferProcedureOutput<TProcedure> | undefined>, input?: inferProcedureInput<TProcedure>, options?: SetDataOptions): void;
38
+ /**
39
+ * @link https://react-query.tanstack.com/reference/QueryClient#queryclientgetquerydata
40
+ */
41
+ setInfiniteData(updater: Updater<InfiniteData<inferProcedureOutput<TProcedure>> | undefined, InfiniteData<inferProcedureOutput<TProcedure>> | undefined>, input?: inferProcedureInput<TProcedure>, options?: SetDataOptions): void;
42
+ /**
43
+ * @link https://react-query.tanstack.com/reference/QueryClient#queryclientgetquerydata
44
+ */
45
+ getData(input?: inferProcedureInput<TProcedure>): inferProcedureOutput<TProcedure> | undefined;
46
+ /**
47
+ * @link https://react-query.tanstack.com/reference/QueryClient#queryclientgetquerydata
48
+ */
49
+ getInfiniteData(input?: inferProcedureInput<TProcedure>): InfiniteData<inferProcedureOutput<TProcedure>> | undefined;
50
+ };
51
+ /**
52
+ * A type that will traverse all procedures and sub routers of a given router to create a union of
53
+ * their possible input types
54
+ */
55
+ declare type InferAllRouterQueryInputTypes<TRouter extends AnyRouter> = {
56
+ [TKey in keyof Filter<TRouter['_def']['record'], AnyRouter | AnyQueryProcedure>]: TRouter['_def']['record'][TKey] extends AnyQueryProcedure ? inferProcedureInput<TRouter['_def']['record'][TKey]> : InferAllRouterQueryInputTypes<TRouter['_def']['record'][TKey]>;
57
+ }[keyof Filter<TRouter['_def']['record'], AnyRouter | AnyQueryProcedure>];
58
+ /**
59
+ * this is the type that is used to add in procedures that can be used on
60
+ * an entire router
61
+ */
62
+ declare type DecorateRouterProcedure<TRouter extends AnyRouter> = {
63
+ /**
64
+ * @link https://react-query.tanstack.com/guides/query-invalidation
65
+ */
66
+ invalidate(input?: Partial<InferAllRouterQueryInputTypes<TRouter>>, filters?: InvalidateQueryFilters, options?: InvalidateOptions): Promise<void>;
67
+ };
68
+ /**
69
+ * @internal
70
+ */
71
+ export declare type DecoratedProcedureUtilsRecord<TRouter extends AnyRouter> = {
72
+ [TKey in keyof Filter<TRouter['_def']['record'], AnyRouter | AnyQueryProcedure>]: TRouter['_def']['record'][TKey] extends AnyRouter ? DecoratedProcedureUtilsRecord<TRouter['_def']['record'][TKey]> & DecorateRouterProcedure<TRouter['_def']['record'][TKey]> : DecorateProcedure<TRouter, TRouter['_def']['record'][TKey]>;
73
+ } & DecorateRouterProcedure<TRouter>;
74
+ export declare type CreateReactUtilsProxy<TRouter extends AnyRouter, TSSRContext> = DecoratedProcedureUtilsRecord<TRouter> & ProxyTRPCContextProps<TRouter, TSSRContext>;
75
+ /**
76
+ * @internal
77
+ */
78
+ export declare function createReactQueryUtilsProxy<TRouter extends AnyRouter, TSSRContext>(context: TRPCContextState<AnyRouter, unknown>): CreateReactUtilsProxy<TRouter, TSSRContext>;
79
+ export {};
80
+ //# sourceMappingURL=utilsProxy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utilsProxy.d.ts","sourceRoot":"","sources":["../../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GAEG;AACH,oBAAY,6BAA6B,CAAC,OAAO,SAAS,SAAS,IAAI;KACpE,IAAI,IAAI,MAAM,MAAM,CACnB,OAAO,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,EACzB,SAAS,GAAG,iBAAiB,CAC9B,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GACjD,6BAA6B,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,GAC5D,uBAAuB,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,GAE1D,iBAAiB,CAAC,OAAO,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC;CAChE,GAAG,uBAAuB,CAAC,OAAO,CAAC,CAAC;AAIrC,oBAAY,qBAAqB,CAC/B,OAAO,SAAS,SAAS,EACzB,WAAW,IACT,6BAA6B,CAAC,OAAO,CAAC,GACxC,qBAAqB,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;AAE9C;;GAEG;AACH,wBAAgB,0BAA0B,CACxC,OAAO,SAAS,SAAS,EACzB,WAAW,EACX,OAAO,EAAE,gBAAgB,CAAC,SAAS,EAAE,OAAO,CAAC,+CA8D9C"}
@@ -0,0 +1,16 @@
1
+ import { QueryClient, QueryClientConfig } from '@tanstack/react-query';
2
+ /**
3
+ * @internal
4
+ */
5
+ export declare type CreateTRPCReactQueryClientConfig = {
6
+ queryClient?: QueryClient;
7
+ queryClientConfig?: never;
8
+ } | {
9
+ queryClientConfig?: QueryClientConfig;
10
+ queryClient?: never;
11
+ };
12
+ /**
13
+ * @internal
14
+ */
15
+ export declare const getQueryClient: (config: CreateTRPCReactQueryClientConfig) => QueryClient;
16
+ //# sourceMappingURL=queryClient.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"queryClient.d.ts","sourceRoot":"","sources":["../../../../packages/react-query/src/shared/queryClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAEvE;;GAEG;AACH,oBAAY,gCAAgC,GACxC;IACE,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,iBAAiB,CAAC,EAAE,KAAK,CAAC;CAC3B,GACD;IACE,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC,WAAW,CAAC,EAAE,KAAK,CAAC;CACrB,CAAC;AAEN;;GAEG;AACH,eAAO,MAAM,cAAc,WAAY,gCAAgC,gBACN,CAAC"}
@@ -0,0 +1,26 @@
1
+ import { QueryClient } from '@tanstack/react-query';
2
+ import { AnyRouter, MaybePromise } from '@trpc/server';
3
+ /**
4
+ * @internal
5
+ */
6
+ export interface UseMutationOverride {
7
+ onSuccess: (opts: {
8
+ /**
9
+ * Calls the original function that was defined in the query's `onSuccess` option
10
+ */
11
+ originalFn: () => MaybePromise<unknown>;
12
+ queryClient: QueryClient;
13
+ }) => MaybePromise<unknown>;
14
+ }
15
+ /**
16
+ * @internal
17
+ */
18
+ export interface CreateTRPCReactOptions<_TRouter extends AnyRouter> {
19
+ /**
20
+ * Override behaviors of the built-in hooks
21
+ */
22
+ unstable_overrides?: {
23
+ useMutation?: Partial<UseMutationOverride>;
24
+ };
25
+ }
26
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../packages/react-query/src/shared/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAEvD;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,SAAS,EAAE,CAAC,IAAI,EAAE;QAChB;;WAEG;QACH,UAAU,EAAE,MAAM,YAAY,CAAC,OAAO,CAAC,CAAC;QACxC,WAAW,EAAE,WAAW,CAAC;KAC1B,KAAK,YAAY,CAAC,OAAO,CAAC,CAAC;CAC7B;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB,CAAC,QAAQ,SAAS,SAAS;IAChE;;OAEG;IACH,kBAAkB,CAAC,EAAE;QACnB,WAAW,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC,CAAC;KAC5C,CAAC;CACH"}
@@ -0,0 +1,5 @@
1
+ export { createSSGHelpers } from './ssg';
2
+ export type { CreateSSGHelpersOptions } from './ssg';
3
+ export { createProxySSGHelpers } from './ssgProxy';
4
+ export type { DecoratedProcedureSSGRecord } from './ssgProxy';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../packages/react-query/src/ssg/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAC;AACzC,YAAY,EAAE,uBAAuB,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AACnD,YAAY,EAAE,2BAA2B,EAAE,MAAM,YAAY,CAAC"}