/**
 * Generated by orval v8.0.0-rc.0 🍺
 * Do not edit manually.
 * Backend Template
 * 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 {
  GetSiteInformation200,
  GetSiteInformationParams,
  PutSiteInformation200,
  SiteInformationBranchMutate,
  SiteInformationSocialMutate,
  SiteInformationUpdateBody
} 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];



/**
 * Retrieve current public site information configuration.
 * @summary Get current site information
 */
export type getSiteInformationResponse200 = {
  data: GetSiteInformation200
  status: 200
}
    
export type getSiteInformationResponseSuccess = (getSiteInformationResponse200) & {
  headers: Headers;
};
;

export type getSiteInformationResponse = (getSiteInformationResponseSuccess)

export const getGetSiteInformationUrl = (params?: GetSiteInformationParams,) => {
  const normalizedParams = new URLSearchParams();

  Object.entries(params || {}).forEach(([key, value]) => {
    
    if (value !== undefined) {
      normalizedParams.append(key, value === null ? 'null' : value.toString())
    }
  });

  const stringifiedParams = normalizedParams.toString();

  return stringifiedParams.length > 0 ? `/siteInformation?${stringifiedParams}` : `/siteInformation`
}

export const getSiteInformation = async (params?: GetSiteInformationParams, options?: RequestInit): Promise<getSiteInformationResponse> => {
  
  return useCustomClient<getSiteInformationResponse>(getGetSiteInformationUrl(params),
  {      
    ...options,
    method: 'GET'
    
    
  }
);}





export const getGetSiteInformationInfiniteQueryKey = (params?: GetSiteInformationParams,) => {
    return [
    'infinite', `/siteInformation`, ...(params ? [params]: [])
    ] as const;
    }

export const getGetSiteInformationQueryKey = (params?: GetSiteInformationParams,) => {
    return [
    `/siteInformation`, ...(params ? [params]: [])
    ] as const;
    }

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

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

  const queryKey =  queryOptions?.queryKey ?? getGetSiteInformationInfiniteQueryKey(params);

  

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

      

      

   return  { queryKey, queryFn,   retry: 3, retryDelay: 1000,  ...queryOptions} as UseInfiniteQueryOptions<Awaited<ReturnType<typeof getSiteInformation>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }
}

export type GetSiteInformationInfiniteQueryResult = NonNullable<Awaited<ReturnType<typeof getSiteInformation>>>
export type GetSiteInformationInfiniteQueryError = ErrorType<unknown>


export function useGetSiteInformationInfinite<TData = InfiniteData<Awaited<ReturnType<typeof getSiteInformation>>>, TError = ErrorType<unknown>>(
 params: undefined |  GetSiteInformationParams, options: { query:Partial<UseInfiniteQueryOptions<Awaited<ReturnType<typeof getSiteInformation>>, TError, TData>> & Pick<
        DefinedInitialDataOptions<
          Awaited<ReturnType<typeof getSiteInformation>>,
          TError,
          Awaited<ReturnType<typeof getSiteInformation>>
        > , 'initialData'
      >, request?: SecondParameter<typeof useCustomClient>}
 , queryClient?: QueryClient
  ):  DefinedUseInfiniteQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
export function useGetSiteInformationInfinite<TData = InfiniteData<Awaited<ReturnType<typeof getSiteInformation>>>, TError = ErrorType<unknown>>(
 params?: GetSiteInformationParams, options?: { query?:Partial<UseInfiniteQueryOptions<Awaited<ReturnType<typeof getSiteInformation>>, TError, TData>> & Pick<
        UndefinedInitialDataOptions<
          Awaited<ReturnType<typeof getSiteInformation>>,
          TError,
          Awaited<ReturnType<typeof getSiteInformation>>
        > , 'initialData'
      >, request?: SecondParameter<typeof useCustomClient>}
 , queryClient?: QueryClient
  ):  UseInfiniteQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
export function useGetSiteInformationInfinite<TData = InfiniteData<Awaited<ReturnType<typeof getSiteInformation>>>, TError = ErrorType<unknown>>(
 params?: GetSiteInformationParams, options?: { query?:Partial<UseInfiniteQueryOptions<Awaited<ReturnType<typeof getSiteInformation>>, TError, TData>>, request?: SecondParameter<typeof useCustomClient>}
 , queryClient?: QueryClient
  ):  UseInfiniteQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
/**
 * @summary Get current site information
 */

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

  const queryOptions = getGetSiteInformationInfiniteQueryOptions(params,options)

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

  query.queryKey = queryOptions.queryKey ;

  return query;
}

/**
 * @summary Get current site information
 */
export const prefetchGetSiteInformationInfiniteQuery = async <TData = Awaited<ReturnType<typeof getSiteInformation>>, TError = ErrorType<unknown>>(
 queryClient: QueryClient, params?: GetSiteInformationParams, options?: { query?:Partial<UseInfiniteQueryOptions<Awaited<ReturnType<typeof getSiteInformation>>, TError, TData>>, request?: SecondParameter<typeof useCustomClient>}

  ): Promise<QueryClient> => {

  const queryOptions = getGetSiteInformationInfiniteQueryOptions(params,options)

  await queryClient.prefetchInfiniteQuery(queryOptions);

  return queryClient;
}



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

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

  const queryKey =  queryOptions?.queryKey ?? getGetSiteInformationQueryKey(params);

  

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

      

      

   return  { queryKey, queryFn,   retry: 3, retryDelay: 1000,  ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getSiteInformation>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }
}

export type GetSiteInformationQueryResult = NonNullable<Awaited<ReturnType<typeof getSiteInformation>>>
export type GetSiteInformationQueryError = ErrorType<unknown>


export function useGetSiteInformation<TData = Awaited<ReturnType<typeof getSiteInformation>>, TError = ErrorType<unknown>>(
 params: undefined |  GetSiteInformationParams, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getSiteInformation>>, TError, TData>> & Pick<
        DefinedInitialDataOptions<
          Awaited<ReturnType<typeof getSiteInformation>>,
          TError,
          Awaited<ReturnType<typeof getSiteInformation>>
        > , 'initialData'
      >, request?: SecondParameter<typeof useCustomClient>}
 , queryClient?: QueryClient
  ):  DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
export function useGetSiteInformation<TData = Awaited<ReturnType<typeof getSiteInformation>>, TError = ErrorType<unknown>>(
 params?: GetSiteInformationParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getSiteInformation>>, TError, TData>> & Pick<
        UndefinedInitialDataOptions<
          Awaited<ReturnType<typeof getSiteInformation>>,
          TError,
          Awaited<ReturnType<typeof getSiteInformation>>
        > , 'initialData'
      >, request?: SecondParameter<typeof useCustomClient>}
 , queryClient?: QueryClient
  ):  UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
export function useGetSiteInformation<TData = Awaited<ReturnType<typeof getSiteInformation>>, TError = ErrorType<unknown>>(
 params?: GetSiteInformationParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getSiteInformation>>, TError, TData>>, request?: SecondParameter<typeof useCustomClient>}
 , queryClient?: QueryClient
  ):  UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
/**
 * @summary Get current site information
 */

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

  const queryOptions = getGetSiteInformationQueryOptions(params,options)

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

  query.queryKey = queryOptions.queryKey ;

  return query;
}

/**
 * @summary Get current site information
 */
export const prefetchGetSiteInformationQuery = async <TData = Awaited<ReturnType<typeof getSiteInformation>>, TError = ErrorType<unknown>>(
 queryClient: QueryClient, params?: GetSiteInformationParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getSiteInformation>>, TError, TData>>, request?: SecondParameter<typeof useCustomClient>}

  ): Promise<QueryClient> => {

  const queryOptions = getGetSiteInformationQueryOptions(params,options)

  await queryClient.prefetchQuery(queryOptions);

  return queryClient;
}



/**
 * Update current site information configuration
 * @summary Update current site information
 */
export type putSiteInformationResponse200 = {
  data: PutSiteInformation200
  status: 200
}

export type putSiteInformationResponse400 = {
  data: void
  status: 400
}

export type putSiteInformationResponse401 = {
  data: void
  status: 401
}
    
export type putSiteInformationResponseSuccess = (putSiteInformationResponse200) & {
  headers: Headers;
};
export type putSiteInformationResponseError = (putSiteInformationResponse400 | putSiteInformationResponse401) & {
  headers: Headers;
};

export type putSiteInformationResponse = (putSiteInformationResponseSuccess | putSiteInformationResponseError)

export const getPutSiteInformationUrl = () => {


  

  return `/siteInformation`
}

export const putSiteInformation = async (siteInformationUpdateBody: SiteInformationUpdateBody, options?: RequestInit): Promise<putSiteInformationResponse> => {
  
  return useCustomClient<putSiteInformationResponse>(getPutSiteInformationUrl(),
  {      
    ...options,
    method: 'PUT',
    headers: { 'Content-Type': 'application/json', ...options?.headers },
    body: JSON.stringify(
      siteInformationUpdateBody,)
  }
);}




export const getPutSiteInformationMutationOptions = <TError = ErrorType<void>,
    TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof putSiteInformation>>, TError,{data: BodyType<SiteInformationUpdateBody>}, TContext>, request?: SecondParameter<typeof useCustomClient>}
): UseMutationOptions<Awaited<ReturnType<typeof putSiteInformation>>, TError,{data: BodyType<SiteInformationUpdateBody>}, TContext> => {

const mutationKey = ['putSiteInformation'];
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 putSiteInformation>>, {data: BodyType<SiteInformationUpdateBody>}> = (props) => {
          const {data} = props ?? {};

          return  putSiteInformation(data,requestOptions)
        }

        


  return  { mutationFn, ...mutationOptions }}

    export type PutSiteInformationMutationResult = NonNullable<Awaited<ReturnType<typeof putSiteInformation>>>
    export type PutSiteInformationMutationBody = BodyType<SiteInformationUpdateBody>
    export type PutSiteInformationMutationError = ErrorType<void>

    /**
 * @summary Update current site information
 */
export const usePutSiteInformation = <TError = ErrorType<void>,
    TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof putSiteInformation>>, TError,{data: BodyType<SiteInformationUpdateBody>}, TContext>, request?: SecondParameter<typeof useCustomClient>}
 , queryClient?: QueryClient): UseMutationResult<
        Awaited<ReturnType<typeof putSiteInformation>>,
        TError,
        {data: BodyType<SiteInformationUpdateBody>},
        TContext
      > => {

      const mutationOptions = getPutSiteInformationMutationOptions(options);

      return useMutation(mutationOptions, queryClient);
    }
    /**
 * @summary Update fixed site social link
 */
export type patchSiteInformationSocialsIdResponse200 = {
  data: void
  status: 200
}
    
export type patchSiteInformationSocialsIdResponseSuccess = (patchSiteInformationSocialsIdResponse200) & {
  headers: Headers;
};
;

export type patchSiteInformationSocialsIdResponse = (patchSiteInformationSocialsIdResponseSuccess)

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


  

  return `/siteInformation/socials/${id}`
}

export const patchSiteInformationSocialsId = async (id: string,
    siteInformationSocialMutate: SiteInformationSocialMutate, options?: RequestInit): Promise<patchSiteInformationSocialsIdResponse> => {
  
  return useCustomClient<patchSiteInformationSocialsIdResponse>(getPatchSiteInformationSocialsIdUrl(id),
  {      
    ...options,
    method: 'PATCH',
    headers: { 'Content-Type': 'application/json', ...options?.headers },
    body: JSON.stringify(
      siteInformationSocialMutate,)
  }
);}




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

const mutationKey = ['patchSiteInformationSocialsId'];
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 patchSiteInformationSocialsId>>, {id: string;data: BodyType<SiteInformationSocialMutate>}> = (props) => {
          const {id,data} = props ?? {};

          return  patchSiteInformationSocialsId(id,data,requestOptions)
        }

        


  return  { mutationFn, ...mutationOptions }}

    export type PatchSiteInformationSocialsIdMutationResult = NonNullable<Awaited<ReturnType<typeof patchSiteInformationSocialsId>>>
    export type PatchSiteInformationSocialsIdMutationBody = BodyType<SiteInformationSocialMutate>
    export type PatchSiteInformationSocialsIdMutationError = ErrorType<unknown>

    /**
 * @summary Update fixed site social link
 */
export const usePatchSiteInformationSocialsId = <TError = ErrorType<unknown>,
    TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof patchSiteInformationSocialsId>>, TError,{id: string;data: BodyType<SiteInformationSocialMutate>}, TContext>, request?: SecondParameter<typeof useCustomClient>}
 , queryClient?: QueryClient): UseMutationResult<
        Awaited<ReturnType<typeof patchSiteInformationSocialsId>>,
        TError,
        {id: string;data: BodyType<SiteInformationSocialMutate>},
        TContext
      > => {

      const mutationOptions = getPatchSiteInformationSocialsIdMutationOptions(options);

      return useMutation(mutationOptions, queryClient);
    }
    /**
 * @summary Get fixed site social links
 */
export type getSiteInformationSocialsResponse200 = {
  data: void
  status: 200
}
    
export type getSiteInformationSocialsResponseSuccess = (getSiteInformationSocialsResponse200) & {
  headers: Headers;
};
;

export type getSiteInformationSocialsResponse = (getSiteInformationSocialsResponseSuccess)

export const getGetSiteInformationSocialsUrl = () => {


  

  return `/siteInformation/socials`
}

export const getSiteInformationSocials = async ( options?: RequestInit): Promise<getSiteInformationSocialsResponse> => {
  
  return useCustomClient<getSiteInformationSocialsResponse>(getGetSiteInformationSocialsUrl(),
  {      
    ...options,
    method: 'GET'
    
    
  }
);}





export const getGetSiteInformationSocialsInfiniteQueryKey = () => {
    return [
    'infinite', `/siteInformation/socials`
    ] as const;
    }

export const getGetSiteInformationSocialsQueryKey = () => {
    return [
    `/siteInformation/socials`
    ] as const;
    }

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

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

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

  

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

      

      

   return  { queryKey, queryFn,   retry: 3, retryDelay: 1000,  ...queryOptions} as UseInfiniteQueryOptions<Awaited<ReturnType<typeof getSiteInformationSocials>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }
}

export type GetSiteInformationSocialsInfiniteQueryResult = NonNullable<Awaited<ReturnType<typeof getSiteInformationSocials>>>
export type GetSiteInformationSocialsInfiniteQueryError = ErrorType<unknown>


export function useGetSiteInformationSocialsInfinite<TData = InfiniteData<Awaited<ReturnType<typeof getSiteInformationSocials>>>, TError = ErrorType<unknown>>(
  options: { query:Partial<UseInfiniteQueryOptions<Awaited<ReturnType<typeof getSiteInformationSocials>>, TError, TData>> & Pick<
        DefinedInitialDataOptions<
          Awaited<ReturnType<typeof getSiteInformationSocials>>,
          TError,
          Awaited<ReturnType<typeof getSiteInformationSocials>>
        > , 'initialData'
      >, request?: SecondParameter<typeof useCustomClient>}
 , queryClient?: QueryClient
  ):  DefinedUseInfiniteQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
export function useGetSiteInformationSocialsInfinite<TData = InfiniteData<Awaited<ReturnType<typeof getSiteInformationSocials>>>, TError = ErrorType<unknown>>(
  options?: { query?:Partial<UseInfiniteQueryOptions<Awaited<ReturnType<typeof getSiteInformationSocials>>, TError, TData>> & Pick<
        UndefinedInitialDataOptions<
          Awaited<ReturnType<typeof getSiteInformationSocials>>,
          TError,
          Awaited<ReturnType<typeof getSiteInformationSocials>>
        > , 'initialData'
      >, request?: SecondParameter<typeof useCustomClient>}
 , queryClient?: QueryClient
  ):  UseInfiniteQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
export function useGetSiteInformationSocialsInfinite<TData = InfiniteData<Awaited<ReturnType<typeof getSiteInformationSocials>>>, TError = ErrorType<unknown>>(
  options?: { query?:Partial<UseInfiniteQueryOptions<Awaited<ReturnType<typeof getSiteInformationSocials>>, TError, TData>>, request?: SecondParameter<typeof useCustomClient>}
 , queryClient?: QueryClient
  ):  UseInfiniteQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
/**
 * @summary Get fixed site social links
 */

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

  const queryOptions = getGetSiteInformationSocialsInfiniteQueryOptions(options)

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

  query.queryKey = queryOptions.queryKey ;

  return query;
}

/**
 * @summary Get fixed site social links
 */
export const prefetchGetSiteInformationSocialsInfiniteQuery = async <TData = Awaited<ReturnType<typeof getSiteInformationSocials>>, TError = ErrorType<unknown>>(
 queryClient: QueryClient,  options?: { query?:Partial<UseInfiniteQueryOptions<Awaited<ReturnType<typeof getSiteInformationSocials>>, TError, TData>>, request?: SecondParameter<typeof useCustomClient>}

  ): Promise<QueryClient> => {

  const queryOptions = getGetSiteInformationSocialsInfiniteQueryOptions(options)

  await queryClient.prefetchInfiniteQuery(queryOptions);

  return queryClient;
}



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

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

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

  

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

      

      

   return  { queryKey, queryFn,   retry: 3, retryDelay: 1000,  ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getSiteInformationSocials>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }
}

export type GetSiteInformationSocialsQueryResult = NonNullable<Awaited<ReturnType<typeof getSiteInformationSocials>>>
export type GetSiteInformationSocialsQueryError = ErrorType<unknown>


export function useGetSiteInformationSocials<TData = Awaited<ReturnType<typeof getSiteInformationSocials>>, TError = ErrorType<unknown>>(
  options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getSiteInformationSocials>>, TError, TData>> & Pick<
        DefinedInitialDataOptions<
          Awaited<ReturnType<typeof getSiteInformationSocials>>,
          TError,
          Awaited<ReturnType<typeof getSiteInformationSocials>>
        > , 'initialData'
      >, request?: SecondParameter<typeof useCustomClient>}
 , queryClient?: QueryClient
  ):  DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
export function useGetSiteInformationSocials<TData = Awaited<ReturnType<typeof getSiteInformationSocials>>, TError = ErrorType<unknown>>(
  options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getSiteInformationSocials>>, TError, TData>> & Pick<
        UndefinedInitialDataOptions<
          Awaited<ReturnType<typeof getSiteInformationSocials>>,
          TError,
          Awaited<ReturnType<typeof getSiteInformationSocials>>
        > , 'initialData'
      >, request?: SecondParameter<typeof useCustomClient>}
 , queryClient?: QueryClient
  ):  UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
export function useGetSiteInformationSocials<TData = Awaited<ReturnType<typeof getSiteInformationSocials>>, TError = ErrorType<unknown>>(
  options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getSiteInformationSocials>>, TError, TData>>, request?: SecondParameter<typeof useCustomClient>}
 , queryClient?: QueryClient
  ):  UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
/**
 * @summary Get fixed site social links
 */

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

  const queryOptions = getGetSiteInformationSocialsQueryOptions(options)

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

  query.queryKey = queryOptions.queryKey ;

  return query;
}

/**
 * @summary Get fixed site social links
 */
export const prefetchGetSiteInformationSocialsQuery = async <TData = Awaited<ReturnType<typeof getSiteInformationSocials>>, TError = ErrorType<unknown>>(
 queryClient: QueryClient,  options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getSiteInformationSocials>>, TError, TData>>, request?: SecondParameter<typeof useCustomClient>}

  ): Promise<QueryClient> => {

  const queryOptions = getGetSiteInformationSocialsQueryOptions(options)

  await queryClient.prefetchQuery(queryOptions);

  return queryClient;
}



/**
 * @summary Update site information branch
 */
export type patchSiteInformationBranchesIdResponse200 = {
  data: void
  status: 200
}
    
export type patchSiteInformationBranchesIdResponseSuccess = (patchSiteInformationBranchesIdResponse200) & {
  headers: Headers;
};
;

export type patchSiteInformationBranchesIdResponse = (patchSiteInformationBranchesIdResponseSuccess)

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


  

  return `/siteInformation/branches/${id}`
}

export const patchSiteInformationBranchesId = async (id: string,
    siteInformationBranchMutate: SiteInformationBranchMutate, options?: RequestInit): Promise<patchSiteInformationBranchesIdResponse> => {
  
  return useCustomClient<patchSiteInformationBranchesIdResponse>(getPatchSiteInformationBranchesIdUrl(id),
  {      
    ...options,
    method: 'PATCH',
    headers: { 'Content-Type': 'application/json', ...options?.headers },
    body: JSON.stringify(
      siteInformationBranchMutate,)
  }
);}




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

const mutationKey = ['patchSiteInformationBranchesId'];
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 patchSiteInformationBranchesId>>, {id: string;data: BodyType<SiteInformationBranchMutate>}> = (props) => {
          const {id,data} = props ?? {};

          return  patchSiteInformationBranchesId(id,data,requestOptions)
        }

        


  return  { mutationFn, ...mutationOptions }}

    export type PatchSiteInformationBranchesIdMutationResult = NonNullable<Awaited<ReturnType<typeof patchSiteInformationBranchesId>>>
    export type PatchSiteInformationBranchesIdMutationBody = BodyType<SiteInformationBranchMutate>
    export type PatchSiteInformationBranchesIdMutationError = ErrorType<unknown>

    /**
 * @summary Update site information branch
 */
export const usePatchSiteInformationBranchesId = <TError = ErrorType<unknown>,
    TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof patchSiteInformationBranchesId>>, TError,{id: string;data: BodyType<SiteInformationBranchMutate>}, TContext>, request?: SecondParameter<typeof useCustomClient>}
 , queryClient?: QueryClient): UseMutationResult<
        Awaited<ReturnType<typeof patchSiteInformationBranchesId>>,
        TError,
        {id: string;data: BodyType<SiteInformationBranchMutate>},
        TContext
      > => {

      const mutationOptions = getPatchSiteInformationBranchesIdMutationOptions(options);

      return useMutation(mutationOptions, queryClient);
    }
    /**
 * @summary Delete site information branch
 */
export type deleteSiteInformationBranchesIdResponse200 = {
  data: void
  status: 200
}
    
export type deleteSiteInformationBranchesIdResponseSuccess = (deleteSiteInformationBranchesIdResponse200) & {
  headers: Headers;
};
;

export type deleteSiteInformationBranchesIdResponse = (deleteSiteInformationBranchesIdResponseSuccess)

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


  

  return `/siteInformation/branches/${id}`
}

export const deleteSiteInformationBranchesId = async (id: string, options?: RequestInit): Promise<deleteSiteInformationBranchesIdResponse> => {
  
  return useCustomClient<deleteSiteInformationBranchesIdResponse>(getDeleteSiteInformationBranchesIdUrl(id),
  {      
    ...options,
    method: 'DELETE'
    
    
  }
);}




export const getDeleteSiteInformationBranchesIdMutationOptions = <TError = ErrorType<unknown>,
    TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteSiteInformationBranchesId>>, TError,{id: string}, TContext>, request?: SecondParameter<typeof useCustomClient>}
): UseMutationOptions<Awaited<ReturnType<typeof deleteSiteInformationBranchesId>>, TError,{id: string}, TContext> => {

const mutationKey = ['deleteSiteInformationBranchesId'];
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 deleteSiteInformationBranchesId>>, {id: string}> = (props) => {
          const {id} = props ?? {};

          return  deleteSiteInformationBranchesId(id,requestOptions)
        }

        


  return  { mutationFn, ...mutationOptions }}

    export type DeleteSiteInformationBranchesIdMutationResult = NonNullable<Awaited<ReturnType<typeof deleteSiteInformationBranchesId>>>
    
    export type DeleteSiteInformationBranchesIdMutationError = ErrorType<unknown>

    /**
 * @summary Delete site information branch
 */
export const useDeleteSiteInformationBranchesId = <TError = ErrorType<unknown>,
    TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteSiteInformationBranchesId>>, TError,{id: string}, TContext>, request?: SecondParameter<typeof useCustomClient>}
 , queryClient?: QueryClient): UseMutationResult<
        Awaited<ReturnType<typeof deleteSiteInformationBranchesId>>,
        TError,
        {id: string},
        TContext
      > => {

      const mutationOptions = getDeleteSiteInformationBranchesIdMutationOptions(options);

      return useMutation(mutationOptions, queryClient);
    }
    /**
 * @summary Get site information branches
 */
export type getSiteInformationBranchesResponse200 = {
  data: void
  status: 200
}
    
export type getSiteInformationBranchesResponseSuccess = (getSiteInformationBranchesResponse200) & {
  headers: Headers;
};
;

export type getSiteInformationBranchesResponse = (getSiteInformationBranchesResponseSuccess)

export const getGetSiteInformationBranchesUrl = () => {


  

  return `/siteInformation/branches`
}

export const getSiteInformationBranches = async ( options?: RequestInit): Promise<getSiteInformationBranchesResponse> => {
  
  return useCustomClient<getSiteInformationBranchesResponse>(getGetSiteInformationBranchesUrl(),
  {      
    ...options,
    method: 'GET'
    
    
  }
);}





export const getGetSiteInformationBranchesInfiniteQueryKey = () => {
    return [
    'infinite', `/siteInformation/branches`
    ] as const;
    }

export const getGetSiteInformationBranchesQueryKey = () => {
    return [
    `/siteInformation/branches`
    ] as const;
    }

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

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

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

  

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

      

      

   return  { queryKey, queryFn,   retry: 3, retryDelay: 1000,  ...queryOptions} as UseInfiniteQueryOptions<Awaited<ReturnType<typeof getSiteInformationBranches>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }
}

export type GetSiteInformationBranchesInfiniteQueryResult = NonNullable<Awaited<ReturnType<typeof getSiteInformationBranches>>>
export type GetSiteInformationBranchesInfiniteQueryError = ErrorType<unknown>


export function useGetSiteInformationBranchesInfinite<TData = InfiniteData<Awaited<ReturnType<typeof getSiteInformationBranches>>>, TError = ErrorType<unknown>>(
  options: { query:Partial<UseInfiniteQueryOptions<Awaited<ReturnType<typeof getSiteInformationBranches>>, TError, TData>> & Pick<
        DefinedInitialDataOptions<
          Awaited<ReturnType<typeof getSiteInformationBranches>>,
          TError,
          Awaited<ReturnType<typeof getSiteInformationBranches>>
        > , 'initialData'
      >, request?: SecondParameter<typeof useCustomClient>}
 , queryClient?: QueryClient
  ):  DefinedUseInfiniteQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
export function useGetSiteInformationBranchesInfinite<TData = InfiniteData<Awaited<ReturnType<typeof getSiteInformationBranches>>>, TError = ErrorType<unknown>>(
  options?: { query?:Partial<UseInfiniteQueryOptions<Awaited<ReturnType<typeof getSiteInformationBranches>>, TError, TData>> & Pick<
        UndefinedInitialDataOptions<
          Awaited<ReturnType<typeof getSiteInformationBranches>>,
          TError,
          Awaited<ReturnType<typeof getSiteInformationBranches>>
        > , 'initialData'
      >, request?: SecondParameter<typeof useCustomClient>}
 , queryClient?: QueryClient
  ):  UseInfiniteQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
export function useGetSiteInformationBranchesInfinite<TData = InfiniteData<Awaited<ReturnType<typeof getSiteInformationBranches>>>, TError = ErrorType<unknown>>(
  options?: { query?:Partial<UseInfiniteQueryOptions<Awaited<ReturnType<typeof getSiteInformationBranches>>, TError, TData>>, request?: SecondParameter<typeof useCustomClient>}
 , queryClient?: QueryClient
  ):  UseInfiniteQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
/**
 * @summary Get site information branches
 */

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

  const queryOptions = getGetSiteInformationBranchesInfiniteQueryOptions(options)

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

  query.queryKey = queryOptions.queryKey ;

  return query;
}

/**
 * @summary Get site information branches
 */
export const prefetchGetSiteInformationBranchesInfiniteQuery = async <TData = Awaited<ReturnType<typeof getSiteInformationBranches>>, TError = ErrorType<unknown>>(
 queryClient: QueryClient,  options?: { query?:Partial<UseInfiniteQueryOptions<Awaited<ReturnType<typeof getSiteInformationBranches>>, TError, TData>>, request?: SecondParameter<typeof useCustomClient>}

  ): Promise<QueryClient> => {

  const queryOptions = getGetSiteInformationBranchesInfiniteQueryOptions(options)

  await queryClient.prefetchInfiniteQuery(queryOptions);

  return queryClient;
}



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

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

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

  

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

      

      

   return  { queryKey, queryFn,   retry: 3, retryDelay: 1000,  ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getSiteInformationBranches>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }
}

export type GetSiteInformationBranchesQueryResult = NonNullable<Awaited<ReturnType<typeof getSiteInformationBranches>>>
export type GetSiteInformationBranchesQueryError = ErrorType<unknown>


export function useGetSiteInformationBranches<TData = Awaited<ReturnType<typeof getSiteInformationBranches>>, TError = ErrorType<unknown>>(
  options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getSiteInformationBranches>>, TError, TData>> & Pick<
        DefinedInitialDataOptions<
          Awaited<ReturnType<typeof getSiteInformationBranches>>,
          TError,
          Awaited<ReturnType<typeof getSiteInformationBranches>>
        > , 'initialData'
      >, request?: SecondParameter<typeof useCustomClient>}
 , queryClient?: QueryClient
  ):  DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
export function useGetSiteInformationBranches<TData = Awaited<ReturnType<typeof getSiteInformationBranches>>, TError = ErrorType<unknown>>(
  options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getSiteInformationBranches>>, TError, TData>> & Pick<
        UndefinedInitialDataOptions<
          Awaited<ReturnType<typeof getSiteInformationBranches>>,
          TError,
          Awaited<ReturnType<typeof getSiteInformationBranches>>
        > , 'initialData'
      >, request?: SecondParameter<typeof useCustomClient>}
 , queryClient?: QueryClient
  ):  UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
export function useGetSiteInformationBranches<TData = Awaited<ReturnType<typeof getSiteInformationBranches>>, TError = ErrorType<unknown>>(
  options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getSiteInformationBranches>>, TError, TData>>, request?: SecondParameter<typeof useCustomClient>}
 , queryClient?: QueryClient
  ):  UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
/**
 * @summary Get site information branches
 */

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

  const queryOptions = getGetSiteInformationBranchesQueryOptions(options)

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

  query.queryKey = queryOptions.queryKey ;

  return query;
}

/**
 * @summary Get site information branches
 */
export const prefetchGetSiteInformationBranchesQuery = async <TData = Awaited<ReturnType<typeof getSiteInformationBranches>>, TError = ErrorType<unknown>>(
 queryClient: QueryClient,  options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getSiteInformationBranches>>, TError, TData>>, request?: SecondParameter<typeof useCustomClient>}

  ): Promise<QueryClient> => {

  const queryOptions = getGetSiteInformationBranchesQueryOptions(options)

  await queryClient.prefetchQuery(queryOptions);

  return queryClient;
}



/**
 * @summary Create site information branch
 */
export type postSiteInformationBranchesResponse200 = {
  data: void
  status: 200
}
    
export type postSiteInformationBranchesResponseSuccess = (postSiteInformationBranchesResponse200) & {
  headers: Headers;
};
;

export type postSiteInformationBranchesResponse = (postSiteInformationBranchesResponseSuccess)

export const getPostSiteInformationBranchesUrl = () => {


  

  return `/siteInformation/branches`
}

export const postSiteInformationBranches = async (siteInformationBranchMutate: SiteInformationBranchMutate, options?: RequestInit): Promise<postSiteInformationBranchesResponse> => {
  
  return useCustomClient<postSiteInformationBranchesResponse>(getPostSiteInformationBranchesUrl(),
  {      
    ...options,
    method: 'POST',
    headers: { 'Content-Type': 'application/json', ...options?.headers },
    body: JSON.stringify(
      siteInformationBranchMutate,)
  }
);}




export const getPostSiteInformationBranchesMutationOptions = <TError = ErrorType<unknown>,
    TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof postSiteInformationBranches>>, TError,{data: BodyType<SiteInformationBranchMutate>}, TContext>, request?: SecondParameter<typeof useCustomClient>}
): UseMutationOptions<Awaited<ReturnType<typeof postSiteInformationBranches>>, TError,{data: BodyType<SiteInformationBranchMutate>}, TContext> => {

const mutationKey = ['postSiteInformationBranches'];
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 postSiteInformationBranches>>, {data: BodyType<SiteInformationBranchMutate>}> = (props) => {
          const {data} = props ?? {};

          return  postSiteInformationBranches(data,requestOptions)
        }

        


  return  { mutationFn, ...mutationOptions }}

    export type PostSiteInformationBranchesMutationResult = NonNullable<Awaited<ReturnType<typeof postSiteInformationBranches>>>
    export type PostSiteInformationBranchesMutationBody = BodyType<SiteInformationBranchMutate>
    export type PostSiteInformationBranchesMutationError = ErrorType<unknown>

    /**
 * @summary Create site information branch
 */
export const usePostSiteInformationBranches = <TError = ErrorType<unknown>,
    TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof postSiteInformationBranches>>, TError,{data: BodyType<SiteInformationBranchMutate>}, TContext>, request?: SecondParameter<typeof useCustomClient>}
 , queryClient?: QueryClient): UseMutationResult<
        Awaited<ReturnType<typeof postSiteInformationBranches>>,
        TError,
        {data: BodyType<SiteInformationBranchMutate>},
        TContext
      > => {

      const mutationOptions = getPostSiteInformationBranchesMutationOptions(options);

      return useMutation(mutationOptions, queryClient);
    }
    