/**
 * Generated by orval v8.0.0-rc.0 🍺
 * Do not edit manually.
 * VCCI
 * Coded by Meu TEAM
 * OpenAPI spec version: 1.0.0
 */
import {
  useInfiniteQuery,
  useMutation,
  useQuery
} from '@tanstack/react-query';
import type {
  DataTag,
  DefinedInitialDataOptions,
  DefinedUseInfiniteQueryResult,
  DefinedUseQueryResult,
  InfiniteData,
  MutationFunction,
  QueryClient,
  QueryFunction,
  QueryKey,
  UndefinedInitialDataOptions,
  UseInfiniteQueryOptions,
  UseInfiniteQueryResult,
  UseMutationOptions,
  UseMutationResult,
  UseQueryOptions,
  UseQueryResult
} from '@tanstack/react-query';

import type {
  Obj2Body,
  Response
} from '../models';

import { useCustomClient } from '../mutator/custom-client';
import type { ErrorType , BodyType } from '../mutator/custom-client';



type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];



/**
 * Get
 */
export type getPageConfigGetAllLinksResponse200 = {
  data: Response
  status: 200
}
    
export type getPageConfigGetAllLinksResponseSuccess = (getPageConfigGetAllLinksResponse200) & {
  headers: Headers;
};
;

export type getPageConfigGetAllLinksResponse = (getPageConfigGetAllLinksResponseSuccess)

export const getGetPageConfigGetAllLinksUrl = () => {


  

  return `/pageConfig/getAllLinks`
}

export const getPageConfigGetAllLinks = async ( options?: RequestInit): Promise<getPageConfigGetAllLinksResponse> => {
  
  return useCustomClient<getPageConfigGetAllLinksResponse>(getGetPageConfigGetAllLinksUrl(),
  {      
    ...options,
    method: 'GET'
    
    
  }
);}





export const getGetPageConfigGetAllLinksInfiniteQueryKey = () => {
    return [
    'infinite', `/pageConfig/getAllLinks`
    ] as const;
    }

export const getGetPageConfigGetAllLinksQueryKey = () => {
    return [
    `/pageConfig/getAllLinks`
    ] as const;
    }

    
export const getGetPageConfigGetAllLinksInfiniteQueryOptions = <TData = InfiniteData<Awaited<ReturnType<typeof getPageConfigGetAllLinks>>>, TError = ErrorType<unknown>>( options?: { query?:Partial<UseInfiniteQueryOptions<Awaited<ReturnType<typeof getPageConfigGetAllLinks>>, TError, TData>>, request?: SecondParameter<typeof useCustomClient>}
) => {

const {query: queryOptions, request: requestOptions} = options ?? {};

  const queryKey =  queryOptions?.queryKey ?? getGetPageConfigGetAllLinksInfiniteQueryKey();

  

    const queryFn: QueryFunction<Awaited<ReturnType<typeof getPageConfigGetAllLinks>>> = ({ signal }) => getPageConfigGetAllLinks({ signal, ...requestOptions });

      

      

   return  { queryKey, queryFn, ...queryOptions} as UseInfiniteQueryOptions<Awaited<ReturnType<typeof getPageConfigGetAllLinks>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }
}

export type GetPageConfigGetAllLinksInfiniteQueryResult = NonNullable<Awaited<ReturnType<typeof getPageConfigGetAllLinks>>>
export type GetPageConfigGetAllLinksInfiniteQueryError = ErrorType<unknown>


export function useGetPageConfigGetAllLinksInfinite<TData = InfiniteData<Awaited<ReturnType<typeof getPageConfigGetAllLinks>>>, TError = ErrorType<unknown>>(
  options: { query:Partial<UseInfiniteQueryOptions<Awaited<ReturnType<typeof getPageConfigGetAllLinks>>, TError, TData>> & Pick<
        DefinedInitialDataOptions<
          Awaited<ReturnType<typeof getPageConfigGetAllLinks>>,
          TError,
          Awaited<ReturnType<typeof getPageConfigGetAllLinks>>
        > , 'initialData'
      >, request?: SecondParameter<typeof useCustomClient>}
 , queryClient?: QueryClient
  ):  DefinedUseInfiniteQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
export function useGetPageConfigGetAllLinksInfinite<TData = InfiniteData<Awaited<ReturnType<typeof getPageConfigGetAllLinks>>>, TError = ErrorType<unknown>>(
  options?: { query?:Partial<UseInfiniteQueryOptions<Awaited<ReturnType<typeof getPageConfigGetAllLinks>>, TError, TData>> & Pick<
        UndefinedInitialDataOptions<
          Awaited<ReturnType<typeof getPageConfigGetAllLinks>>,
          TError,
          Awaited<ReturnType<typeof getPageConfigGetAllLinks>>
        > , 'initialData'
      >, request?: SecondParameter<typeof useCustomClient>}
 , queryClient?: QueryClient
  ):  UseInfiniteQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
export function useGetPageConfigGetAllLinksInfinite<TData = InfiniteData<Awaited<ReturnType<typeof getPageConfigGetAllLinks>>>, TError = ErrorType<unknown>>(
  options?: { query?:Partial<UseInfiniteQueryOptions<Awaited<ReturnType<typeof getPageConfigGetAllLinks>>, TError, TData>>, request?: SecondParameter<typeof useCustomClient>}
 , queryClient?: QueryClient
  ):  UseInfiniteQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }

export function useGetPageConfigGetAllLinksInfinite<TData = InfiniteData<Awaited<ReturnType<typeof getPageConfigGetAllLinks>>>, TError = ErrorType<unknown>>(
  options?: { query?:Partial<UseInfiniteQueryOptions<Awaited<ReturnType<typeof getPageConfigGetAllLinks>>, TError, TData>>, request?: SecondParameter<typeof useCustomClient>}
 , queryClient?: QueryClient 
 ):  UseInfiniteQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {

  const queryOptions = getGetPageConfigGetAllLinksInfiniteQueryOptions(options)

  const query = useInfiniteQuery(queryOptions, queryClient) as  UseInfiniteQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };

  query.queryKey = queryOptions.queryKey ;

  return query;
}

export const prefetchGetPageConfigGetAllLinksInfiniteQuery = async <TData = Awaited<ReturnType<typeof getPageConfigGetAllLinks>>, TError = ErrorType<unknown>>(
 queryClient: QueryClient,  options?: { query?:Partial<UseInfiniteQueryOptions<Awaited<ReturnType<typeof getPageConfigGetAllLinks>>, TError, TData>>, request?: SecondParameter<typeof useCustomClient>}

  ): Promise<QueryClient> => {

  const queryOptions = getGetPageConfigGetAllLinksInfiniteQueryOptions(options)

  await queryClient.prefetchInfiniteQuery(queryOptions);

  return queryClient;
}



export const getGetPageConfigGetAllLinksQueryOptions = <TData = Awaited<ReturnType<typeof getPageConfigGetAllLinks>>, TError = ErrorType<unknown>>( options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getPageConfigGetAllLinks>>, TError, TData>>, request?: SecondParameter<typeof useCustomClient>}
) => {

const {query: queryOptions, request: requestOptions} = options ?? {};

  const queryKey =  queryOptions?.queryKey ?? getGetPageConfigGetAllLinksQueryKey();

  

    const queryFn: QueryFunction<Awaited<ReturnType<typeof getPageConfigGetAllLinks>>> = ({ signal }) => getPageConfigGetAllLinks({ signal, ...requestOptions });

      

      

   return  { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getPageConfigGetAllLinks>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }
}

export type GetPageConfigGetAllLinksQueryResult = NonNullable<Awaited<ReturnType<typeof getPageConfigGetAllLinks>>>
export type GetPageConfigGetAllLinksQueryError = ErrorType<unknown>


export function useGetPageConfigGetAllLinks<TData = Awaited<ReturnType<typeof getPageConfigGetAllLinks>>, TError = ErrorType<unknown>>(
  options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getPageConfigGetAllLinks>>, TError, TData>> & Pick<
        DefinedInitialDataOptions<
          Awaited<ReturnType<typeof getPageConfigGetAllLinks>>,
          TError,
          Awaited<ReturnType<typeof getPageConfigGetAllLinks>>
        > , 'initialData'
      >, request?: SecondParameter<typeof useCustomClient>}
 , queryClient?: QueryClient
  ):  DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
export function useGetPageConfigGetAllLinks<TData = Awaited<ReturnType<typeof getPageConfigGetAllLinks>>, TError = ErrorType<unknown>>(
  options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getPageConfigGetAllLinks>>, TError, TData>> & Pick<
        UndefinedInitialDataOptions<
          Awaited<ReturnType<typeof getPageConfigGetAllLinks>>,
          TError,
          Awaited<ReturnType<typeof getPageConfigGetAllLinks>>
        > , 'initialData'
      >, request?: SecondParameter<typeof useCustomClient>}
 , queryClient?: QueryClient
  ):  UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
export function useGetPageConfigGetAllLinks<TData = Awaited<ReturnType<typeof getPageConfigGetAllLinks>>, TError = ErrorType<unknown>>(
  options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getPageConfigGetAllLinks>>, TError, TData>>, request?: SecondParameter<typeof useCustomClient>}
 , queryClient?: QueryClient
  ):  UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }

export function useGetPageConfigGetAllLinks<TData = Awaited<ReturnType<typeof getPageConfigGetAllLinks>>, TError = ErrorType<unknown>>(
  options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getPageConfigGetAllLinks>>, TError, TData>>, request?: SecondParameter<typeof useCustomClient>}
 , queryClient?: QueryClient 
 ):  UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {

  const queryOptions = getGetPageConfigGetAllLinksQueryOptions(options)

  const query = useQuery(queryOptions, queryClient) as  UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };

  query.queryKey = queryOptions.queryKey ;

  return query;
}

export const prefetchGetPageConfigGetAllLinksQuery = async <TData = Awaited<ReturnType<typeof getPageConfigGetAllLinks>>, TError = ErrorType<unknown>>(
 queryClient: QueryClient,  options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getPageConfigGetAllLinks>>, TError, TData>>, request?: SecondParameter<typeof useCustomClient>}

  ): Promise<QueryClient> => {

  const queryOptions = getGetPageConfigGetAllLinksQueryOptions(options)

  await queryClient.prefetchQuery(queryOptions);

  return queryClient;
}



/**
 * Get
 */
export type getPageConfigResponse200 = {
  data: Response
  status: 200
}
    
export type getPageConfigResponseSuccess = (getPageConfigResponse200) & {
  headers: Headers;
};
;

export type getPageConfigResponse = (getPageConfigResponseSuccess)

export const getGetPageConfigUrl = () => {


  

  return `/pageConfig`
}

export const getPageConfig = async ( options?: RequestInit): Promise<getPageConfigResponse> => {
  
  return useCustomClient<getPageConfigResponse>(getGetPageConfigUrl(),
  {      
    ...options,
    method: 'GET'
    
    
  }
);}





export const getGetPageConfigInfiniteQueryKey = () => {
    return [
    'infinite', `/pageConfig`
    ] as const;
    }

export const getGetPageConfigQueryKey = () => {
    return [
    `/pageConfig`
    ] as const;
    }

    
export const getGetPageConfigInfiniteQueryOptions = <TData = InfiniteData<Awaited<ReturnType<typeof getPageConfig>>>, TError = ErrorType<unknown>>( options?: { query?:Partial<UseInfiniteQueryOptions<Awaited<ReturnType<typeof getPageConfig>>, TError, TData>>, request?: SecondParameter<typeof useCustomClient>}
) => {

const {query: queryOptions, request: requestOptions} = options ?? {};

  const queryKey =  queryOptions?.queryKey ?? getGetPageConfigInfiniteQueryKey();

  

    const queryFn: QueryFunction<Awaited<ReturnType<typeof getPageConfig>>> = ({ signal }) => getPageConfig({ signal, ...requestOptions });

      

      

   return  { queryKey, queryFn, ...queryOptions} as UseInfiniteQueryOptions<Awaited<ReturnType<typeof getPageConfig>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }
}

export type GetPageConfigInfiniteQueryResult = NonNullable<Awaited<ReturnType<typeof getPageConfig>>>
export type GetPageConfigInfiniteQueryError = ErrorType<unknown>


export function useGetPageConfigInfinite<TData = InfiniteData<Awaited<ReturnType<typeof getPageConfig>>>, TError = ErrorType<unknown>>(
  options: { query:Partial<UseInfiniteQueryOptions<Awaited<ReturnType<typeof getPageConfig>>, TError, TData>> & Pick<
        DefinedInitialDataOptions<
          Awaited<ReturnType<typeof getPageConfig>>,
          TError,
          Awaited<ReturnType<typeof getPageConfig>>
        > , 'initialData'
      >, request?: SecondParameter<typeof useCustomClient>}
 , queryClient?: QueryClient
  ):  DefinedUseInfiniteQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
export function useGetPageConfigInfinite<TData = InfiniteData<Awaited<ReturnType<typeof getPageConfig>>>, TError = ErrorType<unknown>>(
  options?: { query?:Partial<UseInfiniteQueryOptions<Awaited<ReturnType<typeof getPageConfig>>, TError, TData>> & Pick<
        UndefinedInitialDataOptions<
          Awaited<ReturnType<typeof getPageConfig>>,
          TError,
          Awaited<ReturnType<typeof getPageConfig>>
        > , 'initialData'
      >, request?: SecondParameter<typeof useCustomClient>}
 , queryClient?: QueryClient
  ):  UseInfiniteQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
export function useGetPageConfigInfinite<TData = InfiniteData<Awaited<ReturnType<typeof getPageConfig>>>, TError = ErrorType<unknown>>(
  options?: { query?:Partial<UseInfiniteQueryOptions<Awaited<ReturnType<typeof getPageConfig>>, TError, TData>>, request?: SecondParameter<typeof useCustomClient>}
 , queryClient?: QueryClient
  ):  UseInfiniteQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }

export function useGetPageConfigInfinite<TData = InfiniteData<Awaited<ReturnType<typeof getPageConfig>>>, TError = ErrorType<unknown>>(
  options?: { query?:Partial<UseInfiniteQueryOptions<Awaited<ReturnType<typeof getPageConfig>>, TError, TData>>, request?: SecondParameter<typeof useCustomClient>}
 , queryClient?: QueryClient 
 ):  UseInfiniteQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {

  const queryOptions = getGetPageConfigInfiniteQueryOptions(options)

  const query = useInfiniteQuery(queryOptions, queryClient) as  UseInfiniteQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };

  query.queryKey = queryOptions.queryKey ;

  return query;
}

export const prefetchGetPageConfigInfiniteQuery = async <TData = Awaited<ReturnType<typeof getPageConfig>>, TError = ErrorType<unknown>>(
 queryClient: QueryClient,  options?: { query?:Partial<UseInfiniteQueryOptions<Awaited<ReturnType<typeof getPageConfig>>, TError, TData>>, request?: SecondParameter<typeof useCustomClient>}

  ): Promise<QueryClient> => {

  const queryOptions = getGetPageConfigInfiniteQueryOptions(options)

  await queryClient.prefetchInfiniteQuery(queryOptions);

  return queryClient;
}



export const getGetPageConfigQueryOptions = <TData = Awaited<ReturnType<typeof getPageConfig>>, TError = ErrorType<unknown>>( options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getPageConfig>>, TError, TData>>, request?: SecondParameter<typeof useCustomClient>}
) => {

const {query: queryOptions, request: requestOptions} = options ?? {};

  const queryKey =  queryOptions?.queryKey ?? getGetPageConfigQueryKey();

  

    const queryFn: QueryFunction<Awaited<ReturnType<typeof getPageConfig>>> = ({ signal }) => getPageConfig({ signal, ...requestOptions });

      

      

   return  { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getPageConfig>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }
}

export type GetPageConfigQueryResult = NonNullable<Awaited<ReturnType<typeof getPageConfig>>>
export type GetPageConfigQueryError = ErrorType<unknown>


export function useGetPageConfig<TData = Awaited<ReturnType<typeof getPageConfig>>, TError = ErrorType<unknown>>(
  options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getPageConfig>>, TError, TData>> & Pick<
        DefinedInitialDataOptions<
          Awaited<ReturnType<typeof getPageConfig>>,
          TError,
          Awaited<ReturnType<typeof getPageConfig>>
        > , 'initialData'
      >, request?: SecondParameter<typeof useCustomClient>}
 , queryClient?: QueryClient
  ):  DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
export function useGetPageConfig<TData = Awaited<ReturnType<typeof getPageConfig>>, TError = ErrorType<unknown>>(
  options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getPageConfig>>, TError, TData>> & Pick<
        UndefinedInitialDataOptions<
          Awaited<ReturnType<typeof getPageConfig>>,
          TError,
          Awaited<ReturnType<typeof getPageConfig>>
        > , 'initialData'
      >, request?: SecondParameter<typeof useCustomClient>}
 , queryClient?: QueryClient
  ):  UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
export function useGetPageConfig<TData = Awaited<ReturnType<typeof getPageConfig>>, TError = ErrorType<unknown>>(
  options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getPageConfig>>, TError, TData>>, request?: SecondParameter<typeof useCustomClient>}
 , queryClient?: QueryClient
  ):  UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }

export function useGetPageConfig<TData = Awaited<ReturnType<typeof getPageConfig>>, TError = ErrorType<unknown>>(
  options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getPageConfig>>, TError, TData>>, request?: SecondParameter<typeof useCustomClient>}
 , queryClient?: QueryClient 
 ):  UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {

  const queryOptions = getGetPageConfigQueryOptions(options)

  const query = useQuery(queryOptions, queryClient) as  UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };

  query.queryKey = queryOptions.queryKey ;

  return query;
}

export const prefetchGetPageConfigQuery = async <TData = Awaited<ReturnType<typeof getPageConfig>>, TError = ErrorType<unknown>>(
 queryClient: QueryClient,  options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getPageConfig>>, TError, TData>>, request?: SecondParameter<typeof useCustomClient>}

  ): Promise<QueryClient> => {

  const queryOptions = getGetPageConfigQueryOptions(options)

  await queryClient.prefetchQuery(queryOptions);

  return queryClient;
}



/**
 * Get
 */
export type getPageConfigTabCodeGetByTabCodeResponse200 = {
  data: Response
  status: 200
}
    
export type getPageConfigTabCodeGetByTabCodeResponseSuccess = (getPageConfigTabCodeGetByTabCodeResponse200) & {
  headers: Headers;
};
;

export type getPageConfigTabCodeGetByTabCodeResponse = (getPageConfigTabCodeGetByTabCodeResponseSuccess)

export const getGetPageConfigTabCodeGetByTabCodeUrl = (code: string,) => {


  

  return `/pageConfig/tab/${code}/getByTabCode`
}

export const getPageConfigTabCodeGetByTabCode = async (code: string, options?: RequestInit): Promise<getPageConfigTabCodeGetByTabCodeResponse> => {
  
  return useCustomClient<getPageConfigTabCodeGetByTabCodeResponse>(getGetPageConfigTabCodeGetByTabCodeUrl(code),
  {      
    ...options,
    method: 'GET'
    
    
  }
);}





export const getGetPageConfigTabCodeGetByTabCodeInfiniteQueryKey = (code?: string,) => {
    return [
    'infinite', `/pageConfig/tab/${code}/getByTabCode`
    ] as const;
    }

export const getGetPageConfigTabCodeGetByTabCodeQueryKey = (code?: string,) => {
    return [
    `/pageConfig/tab/${code}/getByTabCode`
    ] as const;
    }

    
export const getGetPageConfigTabCodeGetByTabCodeInfiniteQueryOptions = <TData = InfiniteData<Awaited<ReturnType<typeof getPageConfigTabCodeGetByTabCode>>>, TError = ErrorType<unknown>>(code: string, options?: { query?:Partial<UseInfiniteQueryOptions<Awaited<ReturnType<typeof getPageConfigTabCodeGetByTabCode>>, TError, TData>>, request?: SecondParameter<typeof useCustomClient>}
) => {

const {query: queryOptions, request: requestOptions} = options ?? {};

  const queryKey =  queryOptions?.queryKey ?? getGetPageConfigTabCodeGetByTabCodeInfiniteQueryKey(code);

  

    const queryFn: QueryFunction<Awaited<ReturnType<typeof getPageConfigTabCodeGetByTabCode>>> = ({ signal }) => getPageConfigTabCodeGetByTabCode(code, { signal, ...requestOptions });

      

      

   return  { queryKey, queryFn, enabled: !!(code), ...queryOptions} as UseInfiniteQueryOptions<Awaited<ReturnType<typeof getPageConfigTabCodeGetByTabCode>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }
}

export type GetPageConfigTabCodeGetByTabCodeInfiniteQueryResult = NonNullable<Awaited<ReturnType<typeof getPageConfigTabCodeGetByTabCode>>>
export type GetPageConfigTabCodeGetByTabCodeInfiniteQueryError = ErrorType<unknown>


export function useGetPageConfigTabCodeGetByTabCodeInfinite<TData = InfiniteData<Awaited<ReturnType<typeof getPageConfigTabCodeGetByTabCode>>>, TError = ErrorType<unknown>>(
 code: string, options: { query:Partial<UseInfiniteQueryOptions<Awaited<ReturnType<typeof getPageConfigTabCodeGetByTabCode>>, TError, TData>> & Pick<
        DefinedInitialDataOptions<
          Awaited<ReturnType<typeof getPageConfigTabCodeGetByTabCode>>,
          TError,
          Awaited<ReturnType<typeof getPageConfigTabCodeGetByTabCode>>
        > , 'initialData'
      >, request?: SecondParameter<typeof useCustomClient>}
 , queryClient?: QueryClient
  ):  DefinedUseInfiniteQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
export function useGetPageConfigTabCodeGetByTabCodeInfinite<TData = InfiniteData<Awaited<ReturnType<typeof getPageConfigTabCodeGetByTabCode>>>, TError = ErrorType<unknown>>(
 code: string, options?: { query?:Partial<UseInfiniteQueryOptions<Awaited<ReturnType<typeof getPageConfigTabCodeGetByTabCode>>, TError, TData>> & Pick<
        UndefinedInitialDataOptions<
          Awaited<ReturnType<typeof getPageConfigTabCodeGetByTabCode>>,
          TError,
          Awaited<ReturnType<typeof getPageConfigTabCodeGetByTabCode>>
        > , 'initialData'
      >, request?: SecondParameter<typeof useCustomClient>}
 , queryClient?: QueryClient
  ):  UseInfiniteQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
export function useGetPageConfigTabCodeGetByTabCodeInfinite<TData = InfiniteData<Awaited<ReturnType<typeof getPageConfigTabCodeGetByTabCode>>>, TError = ErrorType<unknown>>(
 code: string, options?: { query?:Partial<UseInfiniteQueryOptions<Awaited<ReturnType<typeof getPageConfigTabCodeGetByTabCode>>, TError, TData>>, request?: SecondParameter<typeof useCustomClient>}
 , queryClient?: QueryClient
  ):  UseInfiniteQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }

export function useGetPageConfigTabCodeGetByTabCodeInfinite<TData = InfiniteData<Awaited<ReturnType<typeof getPageConfigTabCodeGetByTabCode>>>, TError = ErrorType<unknown>>(
 code: string, options?: { query?:Partial<UseInfiniteQueryOptions<Awaited<ReturnType<typeof getPageConfigTabCodeGetByTabCode>>, TError, TData>>, request?: SecondParameter<typeof useCustomClient>}
 , queryClient?: QueryClient 
 ):  UseInfiniteQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {

  const queryOptions = getGetPageConfigTabCodeGetByTabCodeInfiniteQueryOptions(code,options)

  const query = useInfiniteQuery(queryOptions, queryClient) as  UseInfiniteQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };

  query.queryKey = queryOptions.queryKey ;

  return query;
}

export const prefetchGetPageConfigTabCodeGetByTabCodeInfiniteQuery = async <TData = Awaited<ReturnType<typeof getPageConfigTabCodeGetByTabCode>>, TError = ErrorType<unknown>>(
 queryClient: QueryClient, code: string, options?: { query?:Partial<UseInfiniteQueryOptions<Awaited<ReturnType<typeof getPageConfigTabCodeGetByTabCode>>, TError, TData>>, request?: SecondParameter<typeof useCustomClient>}

  ): Promise<QueryClient> => {

  const queryOptions = getGetPageConfigTabCodeGetByTabCodeInfiniteQueryOptions(code,options)

  await queryClient.prefetchInfiniteQuery(queryOptions);

  return queryClient;
}



export const getGetPageConfigTabCodeGetByTabCodeQueryOptions = <TData = Awaited<ReturnType<typeof getPageConfigTabCodeGetByTabCode>>, TError = ErrorType<unknown>>(code: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getPageConfigTabCodeGetByTabCode>>, TError, TData>>, request?: SecondParameter<typeof useCustomClient>}
) => {

const {query: queryOptions, request: requestOptions} = options ?? {};

  const queryKey =  queryOptions?.queryKey ?? getGetPageConfigTabCodeGetByTabCodeQueryKey(code);

  

    const queryFn: QueryFunction<Awaited<ReturnType<typeof getPageConfigTabCodeGetByTabCode>>> = ({ signal }) => getPageConfigTabCodeGetByTabCode(code, { signal, ...requestOptions });

      

      

   return  { queryKey, queryFn, enabled: !!(code), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getPageConfigTabCodeGetByTabCode>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }
}

export type GetPageConfigTabCodeGetByTabCodeQueryResult = NonNullable<Awaited<ReturnType<typeof getPageConfigTabCodeGetByTabCode>>>
export type GetPageConfigTabCodeGetByTabCodeQueryError = ErrorType<unknown>


export function useGetPageConfigTabCodeGetByTabCode<TData = Awaited<ReturnType<typeof getPageConfigTabCodeGetByTabCode>>, TError = ErrorType<unknown>>(
 code: string, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getPageConfigTabCodeGetByTabCode>>, TError, TData>> & Pick<
        DefinedInitialDataOptions<
          Awaited<ReturnType<typeof getPageConfigTabCodeGetByTabCode>>,
          TError,
          Awaited<ReturnType<typeof getPageConfigTabCodeGetByTabCode>>
        > , 'initialData'
      >, request?: SecondParameter<typeof useCustomClient>}
 , queryClient?: QueryClient
  ):  DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
export function useGetPageConfigTabCodeGetByTabCode<TData = Awaited<ReturnType<typeof getPageConfigTabCodeGetByTabCode>>, TError = ErrorType<unknown>>(
 code: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getPageConfigTabCodeGetByTabCode>>, TError, TData>> & Pick<
        UndefinedInitialDataOptions<
          Awaited<ReturnType<typeof getPageConfigTabCodeGetByTabCode>>,
          TError,
          Awaited<ReturnType<typeof getPageConfigTabCodeGetByTabCode>>
        > , 'initialData'
      >, request?: SecondParameter<typeof useCustomClient>}
 , queryClient?: QueryClient
  ):  UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
export function useGetPageConfigTabCodeGetByTabCode<TData = Awaited<ReturnType<typeof getPageConfigTabCodeGetByTabCode>>, TError = ErrorType<unknown>>(
 code: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getPageConfigTabCodeGetByTabCode>>, TError, TData>>, request?: SecondParameter<typeof useCustomClient>}
 , queryClient?: QueryClient
  ):  UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }

export function useGetPageConfigTabCodeGetByTabCode<TData = Awaited<ReturnType<typeof getPageConfigTabCodeGetByTabCode>>, TError = ErrorType<unknown>>(
 code: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getPageConfigTabCodeGetByTabCode>>, TError, TData>>, request?: SecondParameter<typeof useCustomClient>}
 , queryClient?: QueryClient 
 ):  UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {

  const queryOptions = getGetPageConfigTabCodeGetByTabCodeQueryOptions(code,options)

  const query = useQuery(queryOptions, queryClient) as  UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };

  query.queryKey = queryOptions.queryKey ;

  return query;
}

export const prefetchGetPageConfigTabCodeGetByTabCodeQuery = async <TData = Awaited<ReturnType<typeof getPageConfigTabCodeGetByTabCode>>, TError = ErrorType<unknown>>(
 queryClient: QueryClient, code: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getPageConfigTabCodeGetByTabCode>>, TError, TData>>, request?: SecondParameter<typeof useCustomClient>}

  ): Promise<QueryClient> => {

  const queryOptions = getGetPageConfigTabCodeGetByTabCodeQueryOptions(code,options)

  await queryClient.prefetchQuery(queryOptions);

  return queryClient;
}



/**
 * Get
 */
export type getPageConfigTabCodeResponse200 = {
  data: Response
  status: 200
}
    
export type getPageConfigTabCodeResponseSuccess = (getPageConfigTabCodeResponse200) & {
  headers: Headers;
};
;

export type getPageConfigTabCodeResponse = (getPageConfigTabCodeResponseSuccess)

export const getGetPageConfigTabCodeUrl = (code: string,) => {


  

  return `/pageConfig/tab/${code}`
}

export const getPageConfigTabCode = async (code: string, options?: RequestInit): Promise<getPageConfigTabCodeResponse> => {
  
  return useCustomClient<getPageConfigTabCodeResponse>(getGetPageConfigTabCodeUrl(code),
  {      
    ...options,
    method: 'GET'
    
    
  }
);}





export const getGetPageConfigTabCodeInfiniteQueryKey = (code?: string,) => {
    return [
    'infinite', `/pageConfig/tab/${code}`
    ] as const;
    }

export const getGetPageConfigTabCodeQueryKey = (code?: string,) => {
    return [
    `/pageConfig/tab/${code}`
    ] as const;
    }

    
export const getGetPageConfigTabCodeInfiniteQueryOptions = <TData = InfiniteData<Awaited<ReturnType<typeof getPageConfigTabCode>>>, TError = ErrorType<unknown>>(code: string, options?: { query?:Partial<UseInfiniteQueryOptions<Awaited<ReturnType<typeof getPageConfigTabCode>>, TError, TData>>, request?: SecondParameter<typeof useCustomClient>}
) => {

const {query: queryOptions, request: requestOptions} = options ?? {};

  const queryKey =  queryOptions?.queryKey ?? getGetPageConfigTabCodeInfiniteQueryKey(code);

  

    const queryFn: QueryFunction<Awaited<ReturnType<typeof getPageConfigTabCode>>> = ({ signal }) => getPageConfigTabCode(code, { signal, ...requestOptions });

      

      

   return  { queryKey, queryFn, enabled: !!(code), ...queryOptions} as UseInfiniteQueryOptions<Awaited<ReturnType<typeof getPageConfigTabCode>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }
}

export type GetPageConfigTabCodeInfiniteQueryResult = NonNullable<Awaited<ReturnType<typeof getPageConfigTabCode>>>
export type GetPageConfigTabCodeInfiniteQueryError = ErrorType<unknown>


export function useGetPageConfigTabCodeInfinite<TData = InfiniteData<Awaited<ReturnType<typeof getPageConfigTabCode>>>, TError = ErrorType<unknown>>(
 code: string, options: { query:Partial<UseInfiniteQueryOptions<Awaited<ReturnType<typeof getPageConfigTabCode>>, TError, TData>> & Pick<
        DefinedInitialDataOptions<
          Awaited<ReturnType<typeof getPageConfigTabCode>>,
          TError,
          Awaited<ReturnType<typeof getPageConfigTabCode>>
        > , 'initialData'
      >, request?: SecondParameter<typeof useCustomClient>}
 , queryClient?: QueryClient
  ):  DefinedUseInfiniteQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
export function useGetPageConfigTabCodeInfinite<TData = InfiniteData<Awaited<ReturnType<typeof getPageConfigTabCode>>>, TError = ErrorType<unknown>>(
 code: string, options?: { query?:Partial<UseInfiniteQueryOptions<Awaited<ReturnType<typeof getPageConfigTabCode>>, TError, TData>> & Pick<
        UndefinedInitialDataOptions<
          Awaited<ReturnType<typeof getPageConfigTabCode>>,
          TError,
          Awaited<ReturnType<typeof getPageConfigTabCode>>
        > , 'initialData'
      >, request?: SecondParameter<typeof useCustomClient>}
 , queryClient?: QueryClient
  ):  UseInfiniteQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
export function useGetPageConfigTabCodeInfinite<TData = InfiniteData<Awaited<ReturnType<typeof getPageConfigTabCode>>>, TError = ErrorType<unknown>>(
 code: string, options?: { query?:Partial<UseInfiniteQueryOptions<Awaited<ReturnType<typeof getPageConfigTabCode>>, TError, TData>>, request?: SecondParameter<typeof useCustomClient>}
 , queryClient?: QueryClient
  ):  UseInfiniteQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }

export function useGetPageConfigTabCodeInfinite<TData = InfiniteData<Awaited<ReturnType<typeof getPageConfigTabCode>>>, TError = ErrorType<unknown>>(
 code: string, options?: { query?:Partial<UseInfiniteQueryOptions<Awaited<ReturnType<typeof getPageConfigTabCode>>, TError, TData>>, request?: SecondParameter<typeof useCustomClient>}
 , queryClient?: QueryClient 
 ):  UseInfiniteQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {

  const queryOptions = getGetPageConfigTabCodeInfiniteQueryOptions(code,options)

  const query = useInfiniteQuery(queryOptions, queryClient) as  UseInfiniteQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };

  query.queryKey = queryOptions.queryKey ;

  return query;
}

export const prefetchGetPageConfigTabCodeInfiniteQuery = async <TData = Awaited<ReturnType<typeof getPageConfigTabCode>>, TError = ErrorType<unknown>>(
 queryClient: QueryClient, code: string, options?: { query?:Partial<UseInfiniteQueryOptions<Awaited<ReturnType<typeof getPageConfigTabCode>>, TError, TData>>, request?: SecondParameter<typeof useCustomClient>}

  ): Promise<QueryClient> => {

  const queryOptions = getGetPageConfigTabCodeInfiniteQueryOptions(code,options)

  await queryClient.prefetchInfiniteQuery(queryOptions);

  return queryClient;
}



export const getGetPageConfigTabCodeQueryOptions = <TData = Awaited<ReturnType<typeof getPageConfigTabCode>>, TError = ErrorType<unknown>>(code: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getPageConfigTabCode>>, TError, TData>>, request?: SecondParameter<typeof useCustomClient>}
) => {

const {query: queryOptions, request: requestOptions} = options ?? {};

  const queryKey =  queryOptions?.queryKey ?? getGetPageConfigTabCodeQueryKey(code);

  

    const queryFn: QueryFunction<Awaited<ReturnType<typeof getPageConfigTabCode>>> = ({ signal }) => getPageConfigTabCode(code, { signal, ...requestOptions });

      

      

   return  { queryKey, queryFn, enabled: !!(code), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getPageConfigTabCode>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }
}

export type GetPageConfigTabCodeQueryResult = NonNullable<Awaited<ReturnType<typeof getPageConfigTabCode>>>
export type GetPageConfigTabCodeQueryError = ErrorType<unknown>


export function useGetPageConfigTabCode<TData = Awaited<ReturnType<typeof getPageConfigTabCode>>, TError = ErrorType<unknown>>(
 code: string, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getPageConfigTabCode>>, TError, TData>> & Pick<
        DefinedInitialDataOptions<
          Awaited<ReturnType<typeof getPageConfigTabCode>>,
          TError,
          Awaited<ReturnType<typeof getPageConfigTabCode>>
        > , 'initialData'
      >, request?: SecondParameter<typeof useCustomClient>}
 , queryClient?: QueryClient
  ):  DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
export function useGetPageConfigTabCode<TData = Awaited<ReturnType<typeof getPageConfigTabCode>>, TError = ErrorType<unknown>>(
 code: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getPageConfigTabCode>>, TError, TData>> & Pick<
        UndefinedInitialDataOptions<
          Awaited<ReturnType<typeof getPageConfigTabCode>>,
          TError,
          Awaited<ReturnType<typeof getPageConfigTabCode>>
        > , 'initialData'
      >, request?: SecondParameter<typeof useCustomClient>}
 , queryClient?: QueryClient
  ):  UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
export function useGetPageConfigTabCode<TData = Awaited<ReturnType<typeof getPageConfigTabCode>>, TError = ErrorType<unknown>>(
 code: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getPageConfigTabCode>>, TError, TData>>, request?: SecondParameter<typeof useCustomClient>}
 , queryClient?: QueryClient
  ):  UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }

export function useGetPageConfigTabCode<TData = Awaited<ReturnType<typeof getPageConfigTabCode>>, TError = ErrorType<unknown>>(
 code: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getPageConfigTabCode>>, TError, TData>>, request?: SecondParameter<typeof useCustomClient>}
 , queryClient?: QueryClient 
 ):  UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {

  const queryOptions = getGetPageConfigTabCodeQueryOptions(code,options)

  const query = useQuery(queryOptions, queryClient) as  UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };

  query.queryKey = queryOptions.queryKey ;

  return query;
}

export const prefetchGetPageConfigTabCodeQuery = async <TData = Awaited<ReturnType<typeof getPageConfigTabCode>>, TError = ErrorType<unknown>>(
 queryClient: QueryClient, code: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getPageConfigTabCode>>, TError, TData>>, request?: SecondParameter<typeof useCustomClient>}

  ): Promise<QueryClient> => {

  const queryOptions = getGetPageConfigTabCodeQueryOptions(code,options)

  await queryClient.prefetchQuery(queryOptions);

  return queryClient;
}



/**
 * Update tab content, only receive content
 */
export type putPageConfigTabIdResponse200 = {
  data: Response
  status: 200
}
    
export type putPageConfigTabIdResponseSuccess = (putPageConfigTabIdResponse200) & {
  headers: Headers;
};
;

export type putPageConfigTabIdResponse = (putPageConfigTabIdResponseSuccess)

export const getPutPageConfigTabIdUrl = (id: string,) => {


  

  return `/pageConfig/tab/${id}`
}

export const putPageConfigTabId = async (id: string,
    obj2Body: Obj2Body, options?: RequestInit): Promise<putPageConfigTabIdResponse> => {
  
  return useCustomClient<putPageConfigTabIdResponse>(getPutPageConfigTabIdUrl(id),
  {      
    ...options,
    method: 'PUT',
    headers: { 'Content-Type': 'application/json', ...options?.headers },
    body: JSON.stringify(
      obj2Body,)
  }
);}




export const getPutPageConfigTabIdMutationOptions = <TError = ErrorType<unknown>,
    TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof putPageConfigTabId>>, TError,{id: string;data: BodyType<Obj2Body>}, TContext>, request?: SecondParameter<typeof useCustomClient>}
): UseMutationOptions<Awaited<ReturnType<typeof putPageConfigTabId>>, TError,{id: string;data: BodyType<Obj2Body>}, TContext> => {

const mutationKey = ['putPageConfigTabId'];
const {mutation: mutationOptions, request: requestOptions} = options ?
      options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey ?
      options
      : {...options, mutation: {...options.mutation, mutationKey}}
      : {mutation: { mutationKey, }, request: undefined};

      


      const mutationFn: MutationFunction<Awaited<ReturnType<typeof putPageConfigTabId>>, {id: string;data: BodyType<Obj2Body>}> = (props) => {
          const {id,data} = props ?? {};

          return  putPageConfigTabId(id,data,requestOptions)
        }

        


  return  { mutationFn, ...mutationOptions }}

    export type PutPageConfigTabIdMutationResult = NonNullable<Awaited<ReturnType<typeof putPageConfigTabId>>>
    export type PutPageConfigTabIdMutationBody = BodyType<Obj2Body>
    export type PutPageConfigTabIdMutationError = ErrorType<unknown>

    export const usePutPageConfigTabId = <TError = ErrorType<unknown>,
    TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof putPageConfigTabId>>, TError,{id: string;data: BodyType<Obj2Body>}, TContext>, request?: SecondParameter<typeof useCustomClient>}
 , queryClient?: QueryClient): UseMutationResult<
        Awaited<ReturnType<typeof putPageConfigTabId>>,
        TError,
        {id: string;data: BodyType<Obj2Body>},
        TContext
      > => {

      const mutationOptions = getPutPageConfigTabIdMutationOptions(options);

      return useMutation(mutationOptions, queryClient);
    }
    