@orpc/tanstack-query 1.12.0 → 1.12.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/index.d.mts +30 -30
- package/dist/index.d.ts +30 -30
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<div align="center">
|
|
2
|
-
<image align="center" src="https://orpc.
|
|
2
|
+
<image align="center" src="https://orpc.dev/logo.webp" width=280 alt="oRPC logo" />
|
|
3
3
|
</div>
|
|
4
4
|
|
|
5
5
|
<h1></h1>
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
|
|
46
46
|
## Documentation
|
|
47
47
|
|
|
48
|
-
You can find the full documentation [here](https://orpc.
|
|
48
|
+
You can find the full documentation [here](https://orpc.dev).
|
|
49
49
|
|
|
50
50
|
## Packages
|
|
51
51
|
|
package/dist/index.d.mts
CHANGED
|
@@ -100,7 +100,7 @@ interface GeneralUtils<TInput> {
|
|
|
100
100
|
/**
|
|
101
101
|
* Generate a **partial matching** key for actions like revalidating queries, checking mutation status, etc.
|
|
102
102
|
*
|
|
103
|
-
* @see {@link https://orpc.
|
|
103
|
+
* @see {@link https://orpc.dev/docs/integrations/tanstack-query#query-mutation-key Tanstack Query/Mutation Key Docs}
|
|
104
104
|
*/
|
|
105
105
|
key<TType extends OperationType>(options?: OperationKeyOptions<TType, TInput>): OperationKey<TType, TInput>;
|
|
106
106
|
}
|
|
@@ -112,71 +112,71 @@ interface ProcedureUtils<TClientContext extends ClientContext, TInput, TOutput,
|
|
|
112
112
|
/**
|
|
113
113
|
* Calling corresponding procedure client
|
|
114
114
|
*
|
|
115
|
-
* @see {@link https://orpc.
|
|
115
|
+
* @see {@link https://orpc.dev/docs/integrations/tanstack-query#calling-clients Tanstack Calling Procedure Client Docs}
|
|
116
116
|
*/
|
|
117
117
|
call: Client<TClientContext, TInput, TOutput, TError>;
|
|
118
118
|
/**
|
|
119
|
-
* Generate a **full matching** key for [Query Options](https://orpc.
|
|
119
|
+
* Generate a **full matching** key for [Query Options](https://orpc.dev/docs/integrations/tanstack-query#query-options).
|
|
120
120
|
*
|
|
121
|
-
* @see {@link https://orpc.
|
|
121
|
+
* @see {@link https://orpc.dev/docs/integrations/tanstack-query#query-mutation-key Tanstack Query/Mutation Key Docs}
|
|
122
122
|
*/
|
|
123
123
|
queryKey(...rest: MaybeOptionalOptions<QueryKeyOptions<TInput>>): DataTag<QueryKey, TOutput, TError>;
|
|
124
124
|
/**
|
|
125
125
|
* Generate options used for useQuery/useSuspenseQuery/prefetchQuery/...
|
|
126
126
|
*
|
|
127
|
-
* @see {@link https://orpc.
|
|
127
|
+
* @see {@link https://orpc.dev/docs/integrations/tanstack-query#query-options Tanstack Query Options Utility Docs}
|
|
128
128
|
*/
|
|
129
129
|
queryOptions<U, USelectData = TOutput>(...rest: MaybeOptionalOptions<U & QueryOptionsIn<TClientContext, TInput, TOutput, TError, USelectData>>): NoInfer<U & Omit<QueryOptionsBase<TOutput, TError>, keyof U>>;
|
|
130
130
|
/**
|
|
131
|
-
* Generate a **full matching** key for [Streamed Query Options](https://orpc.
|
|
131
|
+
* Generate a **full matching** key for [Streamed Query Options](https://orpc.dev/docs/integrations/tanstack-query#streamed-query-options).
|
|
132
132
|
*
|
|
133
|
-
* @see {@link https://orpc.
|
|
133
|
+
* @see {@link https://orpc.dev/docs/integrations/tanstack-query#query-mutation-key Tanstack Query/Mutation Key Docs}
|
|
134
134
|
*/
|
|
135
135
|
experimental_streamedKey(...rest: MaybeOptionalOptions<experimental_StreamedKeyOptions<TInput>>): DataTag<QueryKey, experimental_StreamedQueryOutput<TOutput>, TError>;
|
|
136
136
|
/**
|
|
137
|
-
* Configure queries for [Event Iterator](https://orpc.
|
|
137
|
+
* Configure queries for [Event Iterator](https://orpc.dev/docs/event-iterator).
|
|
138
138
|
* This is built on [TanStack Query streamedQuery](https://tanstack.com/query/latest/docs/reference/streamedQuery)
|
|
139
139
|
* and works with hooks like `useQuery`, `useSuspenseQuery`, or `prefetchQuery`.
|
|
140
140
|
*
|
|
141
|
-
* @see {@link https://orpc.
|
|
141
|
+
* @see {@link https://orpc.dev/docs/integrations/tanstack-query#streamed-query-options Tanstack Streamed Query Options Utility Docs}
|
|
142
142
|
*/
|
|
143
143
|
experimental_streamedOptions<U, USelectData = experimental_StreamedQueryOutput<TOutput>>(...rest: MaybeOptionalOptions<U & experimental_StreamedOptionsIn<TClientContext, TInput, experimental_StreamedQueryOutput<TOutput>, TError, USelectData>>): NoInfer<U & Omit<experimental_StreamedOptionsBase<experimental_StreamedQueryOutput<TOutput>, TError>, keyof U>>;
|
|
144
144
|
/**
|
|
145
|
-
* Generate a **full matching** key for [Live Query Options](https://orpc.
|
|
145
|
+
* Generate a **full matching** key for [Live Query Options](https://orpc.dev/docs/integrations/tanstack-query#live-query-options).
|
|
146
146
|
*
|
|
147
|
-
* @see {@link https://orpc.
|
|
147
|
+
* @see {@link https://orpc.dev/docs/integrations/tanstack-query#query-mutation-key Tanstack Query/Mutation Key Docs}
|
|
148
148
|
*/
|
|
149
149
|
experimental_liveKey(...rest: MaybeOptionalOptions<QueryKeyOptions<TInput>>): DataTag<QueryKey, experimental_LiveQueryOutput<TOutput>, TError>;
|
|
150
150
|
/**
|
|
151
|
-
* Configure live queries for [Event Iterator](https://orpc.
|
|
151
|
+
* Configure live queries for [Event Iterator](https://orpc.dev/docs/event-iterator).
|
|
152
152
|
* Unlike `.streamedOptions` which accumulates chunks, live queries replace the entire result with each new chunk received.
|
|
153
153
|
* Works with hooks like `useQuery`, `useSuspenseQuery`, or `prefetchQuery`.
|
|
154
154
|
*
|
|
155
|
-
* @see {@link https://orpc.
|
|
155
|
+
* @see {@link https://orpc.dev/docs/integrations/tanstack-query#live-query-options Tanstack Live Query Options Utility Docs}
|
|
156
156
|
*/
|
|
157
157
|
experimental_liveOptions<U, USelectData = experimental_LiveQueryOutput<TOutput>>(...rest: MaybeOptionalOptions<U & QueryOptionsIn<TClientContext, TInput, experimental_LiveQueryOutput<TOutput>, TError, USelectData>>): NoInfer<U & Omit<QueryOptionsBase<experimental_LiveQueryOutput<TOutput>, TError>, keyof U>>;
|
|
158
158
|
/**
|
|
159
|
-
* Generate a **full matching** key for [Infinite Query Options](https://orpc.
|
|
159
|
+
* Generate a **full matching** key for [Infinite Query Options](https://orpc.dev/docs/integrations/tanstack-query#infinite-query-options).
|
|
160
160
|
*
|
|
161
|
-
* @see {@link https://orpc.
|
|
161
|
+
* @see {@link https://orpc.dev/docs/integrations/tanstack-query#query-mutation-key Tanstack Query/Mutation Key Docs}
|
|
162
162
|
*/
|
|
163
163
|
infiniteKey<UPageParam>(options: Pick<InfiniteOptionsIn<TClientContext, TInput, TOutput, TError, InfiniteData<TOutput, UPageParam>, UPageParam>, 'input' | 'initialPageParam' | 'queryKey'>): DataTag<QueryKey, InfiniteData<TOutput, UPageParam>, TError>;
|
|
164
164
|
/**
|
|
165
165
|
* Generate options used for useInfiniteQuery/useSuspenseInfiniteQuery/prefetchInfiniteQuery/...
|
|
166
166
|
*
|
|
167
|
-
* @see {@link https://orpc.
|
|
167
|
+
* @see {@link https://orpc.dev/docs/integrations/tanstack-query#infinite-query-options Tanstack Infinite Query Options Utility Docs}
|
|
168
168
|
*/
|
|
169
169
|
infiniteOptions<U, UPageParam, USelectData = InfiniteData<TOutput, UPageParam>>(options: U & InfiniteOptionsIn<TClientContext, TInput, TOutput, TError, USelectData, UPageParam>): NoInfer<U & Omit<InfiniteOptionsBase<TOutput, TError, UPageParam>, keyof U>>;
|
|
170
170
|
/**
|
|
171
|
-
* Generate a **full matching** key for [Mutation Options](https://orpc.
|
|
171
|
+
* Generate a **full matching** key for [Mutation Options](https://orpc.dev/docs/integrations/tanstack-query#mutation-options).
|
|
172
172
|
*
|
|
173
|
-
* @see {@link https://orpc.
|
|
173
|
+
* @see {@link https://orpc.dev/docs/integrations/tanstack-query#query-mutation-key Tanstack Query/Mutation Key Docs}
|
|
174
174
|
*/
|
|
175
175
|
mutationKey(options?: Pick<MutationOptionsIn<TClientContext, TInput, TOutput, TError, any>, 'mutationKey'>): DataTag<QueryKey, TOutput, TError>;
|
|
176
176
|
/**
|
|
177
177
|
* Generate options used for useMutation/...
|
|
178
178
|
*
|
|
179
|
-
* @see {@link https://orpc.
|
|
179
|
+
* @see {@link https://orpc.dev/docs/integrations/tanstack-query#mutation-options Tanstack Mutation Options Docs}
|
|
180
180
|
*/
|
|
181
181
|
mutationOptions<UMutationContext>(...rest: MaybeOptionalOptions<MutationOptionsIn<TClientContext, TInput, TOutput, TError, UMutationContext>>): NoInfer<MutationOptions<TInput, TOutput, TError, UMutationContext>>;
|
|
182
182
|
}
|
|
@@ -184,61 +184,61 @@ interface experimental_ProcedureUtilsDefaults<TClientContext extends ClientConte
|
|
|
184
184
|
/**
|
|
185
185
|
* Default options for queryKey utility
|
|
186
186
|
*
|
|
187
|
-
* @see {@link https://orpc.
|
|
187
|
+
* @see {@link https://orpc.dev/docs/integrations/tanstack-query#query-mutation-key Tanstack Query/Mutation Key Docs}
|
|
188
188
|
*/
|
|
189
189
|
queryKey?: Partial<QueryKeyOptions<TInput>>;
|
|
190
190
|
/**
|
|
191
191
|
* Default options for queryOptions utility
|
|
192
192
|
*
|
|
193
|
-
* @see {@link https://orpc.
|
|
193
|
+
* @see {@link https://orpc.dev/docs/integrations/tanstack-query#query-options Tanstack Query Options Utility Docs}
|
|
194
194
|
*/
|
|
195
195
|
queryOptions?: Partial<QueryOptionsIn<TClientContext, TInput, TOutput, TError, unknown>>;
|
|
196
196
|
/**
|
|
197
197
|
* Default options for experimental_streamedKey utility
|
|
198
198
|
*
|
|
199
|
-
* @see {@link https://orpc.
|
|
199
|
+
* @see {@link https://orpc.dev/docs/integrations/tanstack-query#query-mutation-key Tanstack Query/Mutation Key Docs}
|
|
200
200
|
*/
|
|
201
201
|
experimental_streamedKey?: Partial<experimental_StreamedKeyOptions<TInput>>;
|
|
202
202
|
/**
|
|
203
203
|
* Default options for experimental_streamedOptions utility
|
|
204
204
|
*
|
|
205
|
-
* @see {@link https://orpc.
|
|
205
|
+
* @see {@link https://orpc.dev/docs/integrations/tanstack-query#streamed-query-options Tanstack Streamed Query Options Utility Docs}
|
|
206
206
|
*/
|
|
207
207
|
experimental_streamedOptions?: Partial<experimental_StreamedOptionsIn<TClientContext, TInput, experimental_StreamedQueryOutput<TOutput>, TError, unknown>>;
|
|
208
208
|
/**
|
|
209
209
|
* Default options for experimental_liveKey utility
|
|
210
210
|
*
|
|
211
|
-
* @see {@link https://orpc.
|
|
211
|
+
* @see {@link https://orpc.dev/docs/integrations/tanstack-query#query-mutation-key Tanstack Query/Mutation Key Docs}
|
|
212
212
|
*/
|
|
213
213
|
experimental_liveKey?: Partial<QueryKeyOptions<TInput>>;
|
|
214
214
|
/**
|
|
215
215
|
* Default options for experimental_liveOptions utility
|
|
216
216
|
*
|
|
217
|
-
* @see {@link https://orpc.
|
|
217
|
+
* @see {@link https://orpc.dev/docs/integrations/tanstack-query#live-query-options Tanstack Live Query Options Utility Docs}
|
|
218
218
|
*/
|
|
219
219
|
experimental_liveOptions?: Partial<experimental_StreamedOptionsIn<TClientContext, TInput, experimental_LiveQueryOutput<TOutput>, TError, unknown>>;
|
|
220
220
|
/**
|
|
221
221
|
* Default options for infiniteKey utility
|
|
222
222
|
*
|
|
223
|
-
* @see {@link https://orpc.
|
|
223
|
+
* @see {@link https://orpc.dev/docs/integrations/tanstack-query#query-mutation-key Tanstack Query/Mutation Key Docs}
|
|
224
224
|
*/
|
|
225
225
|
infiniteKey?: Partial<Pick<InfiniteOptionsIn<TClientContext, TInput, TOutput, TError, InfiniteData<TOutput, unknown>, unknown>, 'input' | 'initialPageParam' | 'queryKey'>>;
|
|
226
226
|
/**
|
|
227
227
|
* Default options for infiniteOptions utility
|
|
228
228
|
*
|
|
229
|
-
* @see {@link https://orpc.
|
|
229
|
+
* @see {@link https://orpc.dev/docs/integrations/tanstack-query#infinite-query-options Tanstack Infinite Query Options Utility Docs}
|
|
230
230
|
*/
|
|
231
231
|
infiniteOptions?: Partial<InfiniteOptionsIn<TClientContext, TInput, TOutput, TError, unknown, unknown>>;
|
|
232
232
|
/**
|
|
233
233
|
* Default options for mutationKey utility
|
|
234
234
|
*
|
|
235
|
-
* @see {@link https://orpc.
|
|
235
|
+
* @see {@link https://orpc.dev/docs/integrations/tanstack-query#query-mutation-key Tanstack Query/Mutation Key Docs}
|
|
236
236
|
*/
|
|
237
237
|
mutationKey?: Partial<Pick<MutationOptionsIn<TClientContext, TInput, TOutput, TError, any>, 'mutationKey'>>;
|
|
238
238
|
/**
|
|
239
239
|
* Default options for mutationOptions utility
|
|
240
240
|
*
|
|
241
|
-
* @see {@link https://orpc.
|
|
241
|
+
* @see {@link https://orpc.dev/docs/integrations/tanstack-query#mutation-options Tanstack Mutation Options Docs}
|
|
242
242
|
*/
|
|
243
243
|
mutationOptions?: Partial<MutationOptionsIn<TClientContext, TInput, TOutput, TError, unknown>>;
|
|
244
244
|
}
|
|
@@ -268,7 +268,7 @@ interface CreateRouterUtilsOptions<T extends NestedClient<any> = NestedClient<an
|
|
|
268
268
|
* Create a router utils from a client.
|
|
269
269
|
*
|
|
270
270
|
* @info Both client-side and server-side clients are supported.
|
|
271
|
-
* @see {@link https://orpc.
|
|
271
|
+
* @see {@link https://orpc.dev/docs/integrations/tanstack-query Tanstack Query Integration}
|
|
272
272
|
*/
|
|
273
273
|
declare function createRouterUtils<T extends NestedClient<any>>(client: T, options?: CreateRouterUtilsOptions<T>): RouterUtils<T>;
|
|
274
274
|
|
package/dist/index.d.ts
CHANGED
|
@@ -100,7 +100,7 @@ interface GeneralUtils<TInput> {
|
|
|
100
100
|
/**
|
|
101
101
|
* Generate a **partial matching** key for actions like revalidating queries, checking mutation status, etc.
|
|
102
102
|
*
|
|
103
|
-
* @see {@link https://orpc.
|
|
103
|
+
* @see {@link https://orpc.dev/docs/integrations/tanstack-query#query-mutation-key Tanstack Query/Mutation Key Docs}
|
|
104
104
|
*/
|
|
105
105
|
key<TType extends OperationType>(options?: OperationKeyOptions<TType, TInput>): OperationKey<TType, TInput>;
|
|
106
106
|
}
|
|
@@ -112,71 +112,71 @@ interface ProcedureUtils<TClientContext extends ClientContext, TInput, TOutput,
|
|
|
112
112
|
/**
|
|
113
113
|
* Calling corresponding procedure client
|
|
114
114
|
*
|
|
115
|
-
* @see {@link https://orpc.
|
|
115
|
+
* @see {@link https://orpc.dev/docs/integrations/tanstack-query#calling-clients Tanstack Calling Procedure Client Docs}
|
|
116
116
|
*/
|
|
117
117
|
call: Client<TClientContext, TInput, TOutput, TError>;
|
|
118
118
|
/**
|
|
119
|
-
* Generate a **full matching** key for [Query Options](https://orpc.
|
|
119
|
+
* Generate a **full matching** key for [Query Options](https://orpc.dev/docs/integrations/tanstack-query#query-options).
|
|
120
120
|
*
|
|
121
|
-
* @see {@link https://orpc.
|
|
121
|
+
* @see {@link https://orpc.dev/docs/integrations/tanstack-query#query-mutation-key Tanstack Query/Mutation Key Docs}
|
|
122
122
|
*/
|
|
123
123
|
queryKey(...rest: MaybeOptionalOptions<QueryKeyOptions<TInput>>): DataTag<QueryKey, TOutput, TError>;
|
|
124
124
|
/**
|
|
125
125
|
* Generate options used for useQuery/useSuspenseQuery/prefetchQuery/...
|
|
126
126
|
*
|
|
127
|
-
* @see {@link https://orpc.
|
|
127
|
+
* @see {@link https://orpc.dev/docs/integrations/tanstack-query#query-options Tanstack Query Options Utility Docs}
|
|
128
128
|
*/
|
|
129
129
|
queryOptions<U, USelectData = TOutput>(...rest: MaybeOptionalOptions<U & QueryOptionsIn<TClientContext, TInput, TOutput, TError, USelectData>>): NoInfer<U & Omit<QueryOptionsBase<TOutput, TError>, keyof U>>;
|
|
130
130
|
/**
|
|
131
|
-
* Generate a **full matching** key for [Streamed Query Options](https://orpc.
|
|
131
|
+
* Generate a **full matching** key for [Streamed Query Options](https://orpc.dev/docs/integrations/tanstack-query#streamed-query-options).
|
|
132
132
|
*
|
|
133
|
-
* @see {@link https://orpc.
|
|
133
|
+
* @see {@link https://orpc.dev/docs/integrations/tanstack-query#query-mutation-key Tanstack Query/Mutation Key Docs}
|
|
134
134
|
*/
|
|
135
135
|
experimental_streamedKey(...rest: MaybeOptionalOptions<experimental_StreamedKeyOptions<TInput>>): DataTag<QueryKey, experimental_StreamedQueryOutput<TOutput>, TError>;
|
|
136
136
|
/**
|
|
137
|
-
* Configure queries for [Event Iterator](https://orpc.
|
|
137
|
+
* Configure queries for [Event Iterator](https://orpc.dev/docs/event-iterator).
|
|
138
138
|
* This is built on [TanStack Query streamedQuery](https://tanstack.com/query/latest/docs/reference/streamedQuery)
|
|
139
139
|
* and works with hooks like `useQuery`, `useSuspenseQuery`, or `prefetchQuery`.
|
|
140
140
|
*
|
|
141
|
-
* @see {@link https://orpc.
|
|
141
|
+
* @see {@link https://orpc.dev/docs/integrations/tanstack-query#streamed-query-options Tanstack Streamed Query Options Utility Docs}
|
|
142
142
|
*/
|
|
143
143
|
experimental_streamedOptions<U, USelectData = experimental_StreamedQueryOutput<TOutput>>(...rest: MaybeOptionalOptions<U & experimental_StreamedOptionsIn<TClientContext, TInput, experimental_StreamedQueryOutput<TOutput>, TError, USelectData>>): NoInfer<U & Omit<experimental_StreamedOptionsBase<experimental_StreamedQueryOutput<TOutput>, TError>, keyof U>>;
|
|
144
144
|
/**
|
|
145
|
-
* Generate a **full matching** key for [Live Query Options](https://orpc.
|
|
145
|
+
* Generate a **full matching** key for [Live Query Options](https://orpc.dev/docs/integrations/tanstack-query#live-query-options).
|
|
146
146
|
*
|
|
147
|
-
* @see {@link https://orpc.
|
|
147
|
+
* @see {@link https://orpc.dev/docs/integrations/tanstack-query#query-mutation-key Tanstack Query/Mutation Key Docs}
|
|
148
148
|
*/
|
|
149
149
|
experimental_liveKey(...rest: MaybeOptionalOptions<QueryKeyOptions<TInput>>): DataTag<QueryKey, experimental_LiveQueryOutput<TOutput>, TError>;
|
|
150
150
|
/**
|
|
151
|
-
* Configure live queries for [Event Iterator](https://orpc.
|
|
151
|
+
* Configure live queries for [Event Iterator](https://orpc.dev/docs/event-iterator).
|
|
152
152
|
* Unlike `.streamedOptions` which accumulates chunks, live queries replace the entire result with each new chunk received.
|
|
153
153
|
* Works with hooks like `useQuery`, `useSuspenseQuery`, or `prefetchQuery`.
|
|
154
154
|
*
|
|
155
|
-
* @see {@link https://orpc.
|
|
155
|
+
* @see {@link https://orpc.dev/docs/integrations/tanstack-query#live-query-options Tanstack Live Query Options Utility Docs}
|
|
156
156
|
*/
|
|
157
157
|
experimental_liveOptions<U, USelectData = experimental_LiveQueryOutput<TOutput>>(...rest: MaybeOptionalOptions<U & QueryOptionsIn<TClientContext, TInput, experimental_LiveQueryOutput<TOutput>, TError, USelectData>>): NoInfer<U & Omit<QueryOptionsBase<experimental_LiveQueryOutput<TOutput>, TError>, keyof U>>;
|
|
158
158
|
/**
|
|
159
|
-
* Generate a **full matching** key for [Infinite Query Options](https://orpc.
|
|
159
|
+
* Generate a **full matching** key for [Infinite Query Options](https://orpc.dev/docs/integrations/tanstack-query#infinite-query-options).
|
|
160
160
|
*
|
|
161
|
-
* @see {@link https://orpc.
|
|
161
|
+
* @see {@link https://orpc.dev/docs/integrations/tanstack-query#query-mutation-key Tanstack Query/Mutation Key Docs}
|
|
162
162
|
*/
|
|
163
163
|
infiniteKey<UPageParam>(options: Pick<InfiniteOptionsIn<TClientContext, TInput, TOutput, TError, InfiniteData<TOutput, UPageParam>, UPageParam>, 'input' | 'initialPageParam' | 'queryKey'>): DataTag<QueryKey, InfiniteData<TOutput, UPageParam>, TError>;
|
|
164
164
|
/**
|
|
165
165
|
* Generate options used for useInfiniteQuery/useSuspenseInfiniteQuery/prefetchInfiniteQuery/...
|
|
166
166
|
*
|
|
167
|
-
* @see {@link https://orpc.
|
|
167
|
+
* @see {@link https://orpc.dev/docs/integrations/tanstack-query#infinite-query-options Tanstack Infinite Query Options Utility Docs}
|
|
168
168
|
*/
|
|
169
169
|
infiniteOptions<U, UPageParam, USelectData = InfiniteData<TOutput, UPageParam>>(options: U & InfiniteOptionsIn<TClientContext, TInput, TOutput, TError, USelectData, UPageParam>): NoInfer<U & Omit<InfiniteOptionsBase<TOutput, TError, UPageParam>, keyof U>>;
|
|
170
170
|
/**
|
|
171
|
-
* Generate a **full matching** key for [Mutation Options](https://orpc.
|
|
171
|
+
* Generate a **full matching** key for [Mutation Options](https://orpc.dev/docs/integrations/tanstack-query#mutation-options).
|
|
172
172
|
*
|
|
173
|
-
* @see {@link https://orpc.
|
|
173
|
+
* @see {@link https://orpc.dev/docs/integrations/tanstack-query#query-mutation-key Tanstack Query/Mutation Key Docs}
|
|
174
174
|
*/
|
|
175
175
|
mutationKey(options?: Pick<MutationOptionsIn<TClientContext, TInput, TOutput, TError, any>, 'mutationKey'>): DataTag<QueryKey, TOutput, TError>;
|
|
176
176
|
/**
|
|
177
177
|
* Generate options used for useMutation/...
|
|
178
178
|
*
|
|
179
|
-
* @see {@link https://orpc.
|
|
179
|
+
* @see {@link https://orpc.dev/docs/integrations/tanstack-query#mutation-options Tanstack Mutation Options Docs}
|
|
180
180
|
*/
|
|
181
181
|
mutationOptions<UMutationContext>(...rest: MaybeOptionalOptions<MutationOptionsIn<TClientContext, TInput, TOutput, TError, UMutationContext>>): NoInfer<MutationOptions<TInput, TOutput, TError, UMutationContext>>;
|
|
182
182
|
}
|
|
@@ -184,61 +184,61 @@ interface experimental_ProcedureUtilsDefaults<TClientContext extends ClientConte
|
|
|
184
184
|
/**
|
|
185
185
|
* Default options for queryKey utility
|
|
186
186
|
*
|
|
187
|
-
* @see {@link https://orpc.
|
|
187
|
+
* @see {@link https://orpc.dev/docs/integrations/tanstack-query#query-mutation-key Tanstack Query/Mutation Key Docs}
|
|
188
188
|
*/
|
|
189
189
|
queryKey?: Partial<QueryKeyOptions<TInput>>;
|
|
190
190
|
/**
|
|
191
191
|
* Default options for queryOptions utility
|
|
192
192
|
*
|
|
193
|
-
* @see {@link https://orpc.
|
|
193
|
+
* @see {@link https://orpc.dev/docs/integrations/tanstack-query#query-options Tanstack Query Options Utility Docs}
|
|
194
194
|
*/
|
|
195
195
|
queryOptions?: Partial<QueryOptionsIn<TClientContext, TInput, TOutput, TError, unknown>>;
|
|
196
196
|
/**
|
|
197
197
|
* Default options for experimental_streamedKey utility
|
|
198
198
|
*
|
|
199
|
-
* @see {@link https://orpc.
|
|
199
|
+
* @see {@link https://orpc.dev/docs/integrations/tanstack-query#query-mutation-key Tanstack Query/Mutation Key Docs}
|
|
200
200
|
*/
|
|
201
201
|
experimental_streamedKey?: Partial<experimental_StreamedKeyOptions<TInput>>;
|
|
202
202
|
/**
|
|
203
203
|
* Default options for experimental_streamedOptions utility
|
|
204
204
|
*
|
|
205
|
-
* @see {@link https://orpc.
|
|
205
|
+
* @see {@link https://orpc.dev/docs/integrations/tanstack-query#streamed-query-options Tanstack Streamed Query Options Utility Docs}
|
|
206
206
|
*/
|
|
207
207
|
experimental_streamedOptions?: Partial<experimental_StreamedOptionsIn<TClientContext, TInput, experimental_StreamedQueryOutput<TOutput>, TError, unknown>>;
|
|
208
208
|
/**
|
|
209
209
|
* Default options for experimental_liveKey utility
|
|
210
210
|
*
|
|
211
|
-
* @see {@link https://orpc.
|
|
211
|
+
* @see {@link https://orpc.dev/docs/integrations/tanstack-query#query-mutation-key Tanstack Query/Mutation Key Docs}
|
|
212
212
|
*/
|
|
213
213
|
experimental_liveKey?: Partial<QueryKeyOptions<TInput>>;
|
|
214
214
|
/**
|
|
215
215
|
* Default options for experimental_liveOptions utility
|
|
216
216
|
*
|
|
217
|
-
* @see {@link https://orpc.
|
|
217
|
+
* @see {@link https://orpc.dev/docs/integrations/tanstack-query#live-query-options Tanstack Live Query Options Utility Docs}
|
|
218
218
|
*/
|
|
219
219
|
experimental_liveOptions?: Partial<experimental_StreamedOptionsIn<TClientContext, TInput, experimental_LiveQueryOutput<TOutput>, TError, unknown>>;
|
|
220
220
|
/**
|
|
221
221
|
* Default options for infiniteKey utility
|
|
222
222
|
*
|
|
223
|
-
* @see {@link https://orpc.
|
|
223
|
+
* @see {@link https://orpc.dev/docs/integrations/tanstack-query#query-mutation-key Tanstack Query/Mutation Key Docs}
|
|
224
224
|
*/
|
|
225
225
|
infiniteKey?: Partial<Pick<InfiniteOptionsIn<TClientContext, TInput, TOutput, TError, InfiniteData<TOutput, unknown>, unknown>, 'input' | 'initialPageParam' | 'queryKey'>>;
|
|
226
226
|
/**
|
|
227
227
|
* Default options for infiniteOptions utility
|
|
228
228
|
*
|
|
229
|
-
* @see {@link https://orpc.
|
|
229
|
+
* @see {@link https://orpc.dev/docs/integrations/tanstack-query#infinite-query-options Tanstack Infinite Query Options Utility Docs}
|
|
230
230
|
*/
|
|
231
231
|
infiniteOptions?: Partial<InfiniteOptionsIn<TClientContext, TInput, TOutput, TError, unknown, unknown>>;
|
|
232
232
|
/**
|
|
233
233
|
* Default options for mutationKey utility
|
|
234
234
|
*
|
|
235
|
-
* @see {@link https://orpc.
|
|
235
|
+
* @see {@link https://orpc.dev/docs/integrations/tanstack-query#query-mutation-key Tanstack Query/Mutation Key Docs}
|
|
236
236
|
*/
|
|
237
237
|
mutationKey?: Partial<Pick<MutationOptionsIn<TClientContext, TInput, TOutput, TError, any>, 'mutationKey'>>;
|
|
238
238
|
/**
|
|
239
239
|
* Default options for mutationOptions utility
|
|
240
240
|
*
|
|
241
|
-
* @see {@link https://orpc.
|
|
241
|
+
* @see {@link https://orpc.dev/docs/integrations/tanstack-query#mutation-options Tanstack Mutation Options Docs}
|
|
242
242
|
*/
|
|
243
243
|
mutationOptions?: Partial<MutationOptionsIn<TClientContext, TInput, TOutput, TError, unknown>>;
|
|
244
244
|
}
|
|
@@ -268,7 +268,7 @@ interface CreateRouterUtilsOptions<T extends NestedClient<any> = NestedClient<an
|
|
|
268
268
|
* Create a router utils from a client.
|
|
269
269
|
*
|
|
270
270
|
* @info Both client-side and server-side clients are supported.
|
|
271
|
-
* @see {@link https://orpc.
|
|
271
|
+
* @see {@link https://orpc.dev/docs/integrations/tanstack-query Tanstack Query Integration}
|
|
272
272
|
*/
|
|
273
273
|
declare function createRouterUtils<T extends NestedClient<any>>(client: T, options?: CreateRouterUtilsOptions<T>): RouterUtils<T>;
|
|
274
274
|
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orpc/tanstack-query",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.12.
|
|
4
|
+
"version": "1.12.2",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"homepage": "https://orpc.
|
|
6
|
+
"homepage": "https://orpc.dev",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
9
9
|
"url": "git+https://github.com/unnoq/orpc.git",
|
|
@@ -25,10 +25,10 @@
|
|
|
25
25
|
],
|
|
26
26
|
"peerDependencies": {
|
|
27
27
|
"@tanstack/query-core": ">=5.80.2",
|
|
28
|
-
"@orpc/client": "1.12.
|
|
28
|
+
"@orpc/client": "1.12.2"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@orpc/shared": "1.12.
|
|
31
|
+
"@orpc/shared": "1.12.2"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@angular/core": "^20.3.12",
|