@@ -2,6 +2,7 @@ import type {
22 SeamHttpApiError ,
33 SeamHttpEndpointsWithoutWorkspace ,
44 SeamHttpEndpointWithoutWorkspaceQueryPaths ,
5+ SeamHttpInvalidInputError ,
56} from '@seamapi/http/connect'
67import {
78 useQuery ,
@@ -17,15 +18,15 @@ export type UseSeamQueryWithoutWorkspaceParameters<
1718
1819export type UseSeamQueryWithoutWorkspaceResult <
1920 T extends SeamHttpEndpointWithoutWorkspaceQueryPaths ,
20- > = UseQueryResult < QueryData < T > , SeamHttpApiError >
21+ > = UseQueryResult < QueryData < T > , QueryError >
2122
2223export function useSeamQueryWithoutWorkspace <
2324 T extends SeamHttpEndpointWithoutWorkspaceQueryPaths ,
2425> (
2526 endpointPath : T ,
2627 parameters ?: UseSeamQueryWithoutWorkspaceParameters < T > ,
2728 options : Parameters < SeamHttpEndpointsWithoutWorkspace [ T ] > [ 1 ] &
28- QueryOptions < QueryData < T > , SeamHttpApiError > = { }
29+ QueryOptions < QueryData < T > , QueryError > = { }
2930) : UseSeamQueryWithoutWorkspaceResult < T > {
3031 const { endpointClient : client , queryKeyPrefixes } = useSeamClient ( )
3132 return useQuery ( {
@@ -50,4 +51,6 @@ type QueryData<T extends SeamHttpEndpointWithoutWorkspaceQueryPaths> = Awaited<
5051 ReturnType < SeamHttpEndpointsWithoutWorkspace [ T ] >
5152>
5253
54+ type QueryError = SeamHttpApiError | SeamHttpInvalidInputError
55+
5356type QueryOptions < X , Y > = Omit < UseQueryOptions < X , Y > , 'queryKey' | 'queryFn' >
0 commit comments