File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,9 @@ import {
1111
1212import { NullSeamClientError , useSeamClient } from 'lib/seam/use-seam-client.js'
1313
14+ export type UseSeamMutationResult < T extends SeamHttpEndpointMutationPaths > =
15+ UseMutationResult < MutationData < T > , SeamHttpApiError , MutationParameters < T > >
16+
1417export function useSeamMutation < T extends SeamHttpEndpointMutationPaths > (
1518 endpointPath : T ,
1619 options : Parameters < SeamHttpEndpoints [ T ] > [ 1 ] &
@@ -19,7 +22,7 @@ export function useSeamMutation<T extends SeamHttpEndpointMutationPaths>(
1922 SeamHttpApiError ,
2023 MutationParameters < T >
2124 > = { }
22- ) : UseMutationResult < MutationData < T > , SeamHttpApiError , MutationParameters < T > > {
25+ ) : UseSeamMutationResult < T > {
2326 const { endpointClient : client } = useSeamClient ( )
2427 return useMutation ( {
2528 ...options ,
Original file line number Diff line number Diff line change @@ -11,12 +11,15 @@ import {
1111
1212import { useSeamClient } from 'lib/seam/use-seam-client.js'
1313
14+ export type UseSeamQueryResult < T extends SeamHttpEndpointQueryPaths > =
15+ UseQueryResult < QueryData < T > , SeamHttpApiError >
16+
1417export function useSeamQuery < T extends SeamHttpEndpointQueryPaths > (
1518 endpointPath : T ,
1619 parameters ?: Parameters < SeamHttpEndpoints [ T ] > [ 0 ] ,
1720 options : Parameters < SeamHttpEndpoints [ T ] > [ 1 ] &
1821 QueryOptions < QueryData < T > , SeamHttpApiError > = { }
19- ) : UseQueryResult < QueryData < T > , SeamHttpApiError > {
22+ ) : UseSeamQueryResult < T > {
2023 const { endpointClient : client } = useSeamClient ( )
2124 return useQuery ( {
2225 enabled : client != null ,
You can’t perform that action at this time.
0 commit comments