11// This file is auto-generated by @hey-api/openapi-ts
22
3- import { type DefaultError , queryOptions , type UseMutationOptions } from '@tanstack/preact-query' ;
3+ import { type DefaultError , queryOptions , type UseMutationOptions , useQuery } from '@tanstack/preact-query' ;
44import type { AxiosError } from 'axios' ;
55
66import { client } from '../client.gen' ;
@@ -55,6 +55,13 @@ export const serviceWithEmptyTagOptions = (options?: Options<ServiceWithEmptyTag
5555 queryKey : serviceWithEmptyTagQueryKey ( options )
5656} ) ;
5757
58+ export const useServiceWithEmptyTagQuery = ( options ?: Options < ServiceWithEmptyTagData > & {
59+ queryOptions ?: Partial < Omit < ReturnType < typeof serviceWithEmptyTagOptions > , 'queryKey' | 'queryFn' > > ;
60+ } ) => {
61+ const { queryOptions, ...sdkOptions } = options ?? { } ;
62+ return useQuery ( { ...serviceWithEmptyTagOptions ( sdkOptions ) , ...queryOptions } ) ;
63+ } ;
64+
5865export const patchApiVbyApiVersionNoTagMutation = ( options ?: Partial < Options < PatchApiVbyApiVersionNoTagData > > ) : UseMutationOptions < unknown , AxiosError < DefaultError > , Options < PatchApiVbyApiVersionNoTagData > > => {
5966 const mutationOptions : UseMutationOptions < unknown , AxiosError < DefaultError > , Options < PatchApiVbyApiVersionNoTagData > > = {
6067 mutationFn : async ( fnOptions ) => {
@@ -112,6 +119,13 @@ export const getCallWithoutParametersAndResponseOptions = (options?: Options<Get
112119 queryKey : getCallWithoutParametersAndResponseQueryKey ( options )
113120} ) ;
114121
122+ export const useGetCallWithoutParametersAndResponseQuery = ( options ?: Options < GetCallWithoutParametersAndResponseData > & {
123+ queryOptions ?: Partial < Omit < ReturnType < typeof getCallWithoutParametersAndResponseOptions > , 'queryKey' | 'queryFn' > > ;
124+ } ) => {
125+ const { queryOptions, ...sdkOptions } = options ?? { } ;
126+ return useQuery ( { ...getCallWithoutParametersAndResponseOptions ( sdkOptions ) , ...queryOptions } ) ;
127+ } ;
128+
115129export const patchCallWithoutParametersAndResponseMutation = ( options ?: Partial < Options < PatchCallWithoutParametersAndResponseData > > ) : UseMutationOptions < unknown , AxiosError < DefaultError > , Options < PatchCallWithoutParametersAndResponseData > > => {
116130 const mutationOptions : UseMutationOptions < unknown , AxiosError < DefaultError > , Options < PatchCallWithoutParametersAndResponseData > > = {
117131 mutationFn : async ( fnOptions ) => {
@@ -211,6 +225,13 @@ export const callWithDefaultParametersOptions = (options: Options<CallWithDefaul
211225 queryKey : callWithDefaultParametersQueryKey ( options )
212226} ) ;
213227
228+ export const useCallWithDefaultParametersQuery = ( options : Options < CallWithDefaultParametersData > & {
229+ queryOptions ?: Partial < Omit < ReturnType < typeof callWithDefaultParametersOptions > , 'queryKey' | 'queryFn' > > ;
230+ } ) => {
231+ const { queryOptions, ...sdkOptions } = options ;
232+ return useQuery ( { ...callWithDefaultParametersOptions ( sdkOptions ) , ...queryOptions } ) ;
233+ } ;
234+
214235export const callWithDefaultOptionalParametersMutation = ( options ?: Partial < Options < CallWithDefaultOptionalParametersData > > ) : UseMutationOptions < unknown , AxiosError < DefaultError > , Options < CallWithDefaultOptionalParametersData > > => {
215236 const mutationOptions : UseMutationOptions < unknown , AxiosError < DefaultError > , Options < CallWithDefaultOptionalParametersData > > = {
216237 mutationFn : async ( fnOptions ) => {
@@ -268,6 +289,13 @@ export const duplicateName2Options = (options?: Options<DuplicateName2Data>) =>
268289 queryKey : duplicateName2QueryKey ( options )
269290} ) ;
270291
292+ export const useDuplicateName2Query = ( options ?: Options < DuplicateName2Data > & {
293+ queryOptions ?: Partial < Omit < ReturnType < typeof duplicateName2Options > , 'queryKey' | 'queryFn' > > ;
294+ } ) => {
295+ const { queryOptions, ...sdkOptions } = options ?? { } ;
296+ return useQuery ( { ...duplicateName2Options ( sdkOptions ) , ...queryOptions } ) ;
297+ } ;
298+
271299export const duplicateName3Mutation = ( options ?: Partial < Options < DuplicateName3Data > > ) : UseMutationOptions < unknown , AxiosError < DefaultError > , Options < DuplicateName3Data > > => {
272300 const mutationOptions : UseMutationOptions < unknown , AxiosError < DefaultError > , Options < DuplicateName3Data > > = {
273301 mutationFn : async ( fnOptions ) => {
@@ -311,6 +339,13 @@ export const callWithNoContentResponseOptions = (options?: Options<CallWithNoCon
311339 queryKey : callWithNoContentResponseQueryKey ( options )
312340} ) ;
313341
342+ export const useCallWithNoContentResponseQuery = ( options ?: Options < CallWithNoContentResponseData > & {
343+ queryOptions ?: Partial < Omit < ReturnType < typeof callWithNoContentResponseOptions > , 'queryKey' | 'queryFn' > > ;
344+ } ) => {
345+ const { queryOptions, ...sdkOptions } = options ?? { } ;
346+ return useQuery ( { ...callWithNoContentResponseOptions ( sdkOptions ) , ...queryOptions } ) ;
347+ } ;
348+
314349export const callWithResponseAndNoContentResponseQueryKey = ( options ?: Options < CallWithResponseAndNoContentResponseData > ) => createQueryKey ( 'callWithResponseAndNoContentResponse' , options ) ;
315350
316351export const callWithResponseAndNoContentResponseOptions = ( options ?: Options < CallWithResponseAndNoContentResponseData > ) => queryOptions < CallWithResponseAndNoContentResponseResponse , AxiosError < DefaultError > , CallWithResponseAndNoContentResponseResponse , ReturnType < typeof callWithResponseAndNoContentResponseQueryKey > > ( {
@@ -326,6 +361,13 @@ export const callWithResponseAndNoContentResponseOptions = (options?: Options<Ca
326361 queryKey : callWithResponseAndNoContentResponseQueryKey ( options )
327362} ) ;
328363
364+ export const useCallWithResponseAndNoContentResponseQuery = ( options ?: Options < CallWithResponseAndNoContentResponseData > & {
365+ queryOptions ?: Partial < Omit < ReturnType < typeof callWithResponseAndNoContentResponseOptions > , 'queryKey' | 'queryFn' > > ;
366+ } ) => {
367+ const { queryOptions, ...sdkOptions } = options ?? { } ;
368+ return useQuery ( { ...callWithResponseAndNoContentResponseOptions ( sdkOptions ) , ...queryOptions } ) ;
369+ } ;
370+
329371export const dummyAQueryKey = ( options ?: Options < DummyAData > ) => createQueryKey ( 'dummyA' , options ) ;
330372
331373export const dummyAOptions = ( options ?: Options < DummyAData > ) => queryOptions < unknown , AxiosError < DefaultError > , unknown , ReturnType < typeof dummyAQueryKey > > ( {
@@ -341,6 +383,13 @@ export const dummyAOptions = (options?: Options<DummyAData>) => queryOptions<unk
341383 queryKey : dummyAQueryKey ( options )
342384} ) ;
343385
386+ export const useDummyAQuery = ( options ?: Options < DummyAData > & {
387+ queryOptions ?: Partial < Omit < ReturnType < typeof dummyAOptions > , 'queryKey' | 'queryFn' > > ;
388+ } ) => {
389+ const { queryOptions, ...sdkOptions } = options ?? { } ;
390+ return useQuery ( { ...dummyAOptions ( sdkOptions ) , ...queryOptions } ) ;
391+ } ;
392+
344393export const dummyBQueryKey = ( options ?: Options < DummyBData > ) => createQueryKey ( 'dummyB' , options ) ;
345394
346395export const dummyBOptions = ( options ?: Options < DummyBData > ) => queryOptions < unknown , AxiosError < DefaultError > , unknown , ReturnType < typeof dummyBQueryKey > > ( {
@@ -356,6 +405,13 @@ export const dummyBOptions = (options?: Options<DummyBData>) => queryOptions<unk
356405 queryKey : dummyBQueryKey ( options )
357406} ) ;
358407
408+ export const useDummyBQuery = ( options ?: Options < DummyBData > & {
409+ queryOptions ?: Partial < Omit < ReturnType < typeof dummyBOptions > , 'queryKey' | 'queryFn' > > ;
410+ } ) => {
411+ const { queryOptions, ...sdkOptions } = options ?? { } ;
412+ return useQuery ( { ...dummyBOptions ( sdkOptions ) , ...queryOptions } ) ;
413+ } ;
414+
359415export const callWithResponseQueryKey = ( options ?: Options < CallWithResponseData > ) => createQueryKey ( 'callWithResponse' , options ) ;
360416
361417export const callWithResponseOptions = ( options ?: Options < CallWithResponseData > ) => queryOptions < CallWithResponseResponse , AxiosError < DefaultError > , CallWithResponseResponse , ReturnType < typeof callWithResponseQueryKey > > ( {
@@ -371,6 +427,13 @@ export const callWithResponseOptions = (options?: Options<CallWithResponseData>)
371427 queryKey : callWithResponseQueryKey ( options )
372428} ) ;
373429
430+ export const useCallWithResponseQuery = ( options ?: Options < CallWithResponseData > & {
431+ queryOptions ?: Partial < Omit < ReturnType < typeof callWithResponseOptions > , 'queryKey' | 'queryFn' > > ;
432+ } ) => {
433+ const { queryOptions, ...sdkOptions } = options ?? { } ;
434+ return useQuery ( { ...callWithResponseOptions ( sdkOptions ) , ...queryOptions } ) ;
435+ } ;
436+
374437export const callWithDuplicateResponsesMutation = ( options ?: Partial < Options < CallWithDuplicateResponsesData > > ) : UseMutationOptions < CallWithDuplicateResponsesResponse , AxiosError < CallWithDuplicateResponsesError > , Options < CallWithDuplicateResponsesData > > => {
375438 const mutationOptions : UseMutationOptions < CallWithDuplicateResponsesResponse , AxiosError < CallWithDuplicateResponsesError > , Options < CallWithDuplicateResponsesData > > = {
376439 mutationFn : async ( fnOptions ) => {
@@ -414,6 +477,13 @@ export const collectionFormatOptions = (options: Options<CollectionFormatData>)
414477 queryKey : collectionFormatQueryKey ( options )
415478} ) ;
416479
480+ export const useCollectionFormatQuery = ( options : Options < CollectionFormatData > & {
481+ queryOptions ?: Partial < Omit < ReturnType < typeof collectionFormatOptions > , 'queryKey' | 'queryFn' > > ;
482+ } ) => {
483+ const { queryOptions, ...sdkOptions } = options ;
484+ return useQuery ( { ...collectionFormatOptions ( sdkOptions ) , ...queryOptions } ) ;
485+ } ;
486+
417487export const typesQueryKey = ( options : Options < TypesData > ) => createQueryKey ( 'types' , options ) ;
418488
419489export const typesOptions = ( options : Options < TypesData > ) => queryOptions < TypesResponse , AxiosError < DefaultError > , TypesResponse , ReturnType < typeof typesQueryKey > > ( {
@@ -429,6 +499,13 @@ export const typesOptions = (options: Options<TypesData>) => queryOptions<TypesR
429499 queryKey : typesQueryKey ( options )
430500} ) ;
431501
502+ export const useTypesQuery = ( options : Options < TypesData > & {
503+ queryOptions ?: Partial < Omit < ReturnType < typeof typesOptions > , 'queryKey' | 'queryFn' > > ;
504+ } ) => {
505+ const { queryOptions, ...sdkOptions } = options ;
506+ return useQuery ( { ...typesOptions ( sdkOptions ) , ...queryOptions } ) ;
507+ } ;
508+
432509export const complexTypesQueryKey = ( options : Options < ComplexTypesData > ) => createQueryKey ( 'complexTypes' , options ) ;
433510
434511export const complexTypesOptions = ( options : Options < ComplexTypesData > ) => queryOptions < ComplexTypesResponse , AxiosError < DefaultError > , ComplexTypesResponse , ReturnType < typeof complexTypesQueryKey > > ( {
@@ -444,6 +521,13 @@ export const complexTypesOptions = (options: Options<ComplexTypesData>) => query
444521 queryKey : complexTypesQueryKey ( options )
445522} ) ;
446523
524+ export const useComplexTypesQuery = ( options : Options < ComplexTypesData > & {
525+ queryOptions ?: Partial < Omit < ReturnType < typeof complexTypesOptions > , 'queryKey' | 'queryFn' > > ;
526+ } ) => {
527+ const { queryOptions, ...sdkOptions } = options ;
528+ return useQuery ( { ...complexTypesOptions ( sdkOptions ) , ...queryOptions } ) ;
529+ } ;
530+
447531export const callWithResultFromHeaderMutation = ( options ?: Partial < Options < CallWithResultFromHeaderData > > ) : UseMutationOptions < unknown , AxiosError < DefaultError > , Options < CallWithResultFromHeaderData > > => {
448532 const mutationOptions : UseMutationOptions < unknown , AxiosError < DefaultError > , Options < CallWithResultFromHeaderData > > = {
449533 mutationFn : async ( fnOptions ) => {
0 commit comments