/**
 * 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,
  useQuery
} from '@tanstack/react-query';
import type {
  DataTag,
  DefinedInitialDataOptions,
  DefinedUseInfiniteQueryResult,
  DefinedUseQueryResult,
  InfiniteData,
  QueryClient,
  QueryFunction,
  QueryKey,
  UndefinedInitialDataOptions,
  UseInfiniteQueryOptions,
  UseInfiniteQueryResult,
  UseQueryOptions,
  UseQueryResult
} from '@tanstack/react-query';

import type {
  GetStatisticMemberByMonthParams,
  GetStatisticMembershipFeeByMonthParams,
  GetStatisticSiteAccessParams,
  Response
} from '../models';

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



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



/**
 * Get membership by month of year
 */
export type getStatisticMemberByMonthResponse200 = {
  data: Response
  status: 200
}
    
export type getStatisticMemberByMonthResponseSuccess = (getStatisticMemberByMonthResponse200) & {
  headers: Headers;
};
;

export type getStatisticMemberByMonthResponse = (getStatisticMemberByMonthResponseSuccess)

export const getGetStatisticMemberByMonthUrl = (params: GetStatisticMemberByMonthParams,) => {
  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 ? `/statistic/memberByMonth?${stringifiedParams}` : `/statistic/memberByMonth`
}

export const getStatisticMemberByMonth = async (params: GetStatisticMemberByMonthParams, options?: RequestInit): Promise<getStatisticMemberByMonthResponse> => {
  
  return useCustomClient<getStatisticMemberByMonthResponse>(getGetStatisticMemberByMonthUrl(params),
  {      
    ...options,
    method: 'GET'
    
    
  }
);}





export const getGetStatisticMemberByMonthInfiniteQueryKey = (params?: GetStatisticMemberByMonthParams,) => {
    return [
    'infinite', `/statistic/memberByMonth`, ...(params ? [params]: [])
    ] as const;
    }

export const getGetStatisticMemberByMonthQueryKey = (params?: GetStatisticMemberByMonthParams,) => {
    return [
    `/statistic/memberByMonth`, ...(params ? [params]: [])
    ] as const;
    }

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

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

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

  

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

      

      

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

export type GetStatisticMemberByMonthInfiniteQueryResult = NonNullable<Awaited<ReturnType<typeof getStatisticMemberByMonth>>>
export type GetStatisticMemberByMonthInfiniteQueryError = ErrorType<unknown>


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

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

  const queryOptions = getGetStatisticMemberByMonthInfiniteQueryOptions(params,options)

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

  query.queryKey = queryOptions.queryKey ;

  return query;
}

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

  ): Promise<QueryClient> => {

  const queryOptions = getGetStatisticMemberByMonthInfiniteQueryOptions(params,options)

  await queryClient.prefetchInfiniteQuery(queryOptions);

  return queryClient;
}



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

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

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

  

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

      

      

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

export type GetStatisticMemberByMonthQueryResult = NonNullable<Awaited<ReturnType<typeof getStatisticMemberByMonth>>>
export type GetStatisticMemberByMonthQueryError = ErrorType<unknown>


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

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

  const queryOptions = getGetStatisticMemberByMonthQueryOptions(params,options)

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

  query.queryKey = queryOptions.queryKey ;

  return query;
}

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

  ): Promise<QueryClient> => {

  const queryOptions = getGetStatisticMemberByMonthQueryOptions(params,options)

  await queryClient.prefetchQuery(queryOptions);

  return queryClient;
}



/**
 * Get membership fee by month of year
 */
export type getStatisticMembershipFeeByMonthResponse200 = {
  data: Response
  status: 200
}
    
export type getStatisticMembershipFeeByMonthResponseSuccess = (getStatisticMembershipFeeByMonthResponse200) & {
  headers: Headers;
};
;

export type getStatisticMembershipFeeByMonthResponse = (getStatisticMembershipFeeByMonthResponseSuccess)

export const getGetStatisticMembershipFeeByMonthUrl = (params: GetStatisticMembershipFeeByMonthParams,) => {
  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 ? `/statistic/membershipFeeByMonth?${stringifiedParams}` : `/statistic/membershipFeeByMonth`
}

export const getStatisticMembershipFeeByMonth = async (params: GetStatisticMembershipFeeByMonthParams, options?: RequestInit): Promise<getStatisticMembershipFeeByMonthResponse> => {
  
  return useCustomClient<getStatisticMembershipFeeByMonthResponse>(getGetStatisticMembershipFeeByMonthUrl(params),
  {      
    ...options,
    method: 'GET'
    
    
  }
);}





export const getGetStatisticMembershipFeeByMonthInfiniteQueryKey = (params?: GetStatisticMembershipFeeByMonthParams,) => {
    return [
    'infinite', `/statistic/membershipFeeByMonth`, ...(params ? [params]: [])
    ] as const;
    }

export const getGetStatisticMembershipFeeByMonthQueryKey = (params?: GetStatisticMembershipFeeByMonthParams,) => {
    return [
    `/statistic/membershipFeeByMonth`, ...(params ? [params]: [])
    ] as const;
    }

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

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

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

  

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

      

      

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

export type GetStatisticMembershipFeeByMonthInfiniteQueryResult = NonNullable<Awaited<ReturnType<typeof getStatisticMembershipFeeByMonth>>>
export type GetStatisticMembershipFeeByMonthInfiniteQueryError = ErrorType<unknown>


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

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

  const queryOptions = getGetStatisticMembershipFeeByMonthInfiniteQueryOptions(params,options)

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

  query.queryKey = queryOptions.queryKey ;

  return query;
}

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

  ): Promise<QueryClient> => {

  const queryOptions = getGetStatisticMembershipFeeByMonthInfiniteQueryOptions(params,options)

  await queryClient.prefetchInfiniteQuery(queryOptions);

  return queryClient;
}



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

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

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

  

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

      

      

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

export type GetStatisticMembershipFeeByMonthQueryResult = NonNullable<Awaited<ReturnType<typeof getStatisticMembershipFeeByMonth>>>
export type GetStatisticMembershipFeeByMonthQueryError = ErrorType<unknown>


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

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

  const queryOptions = getGetStatisticMembershipFeeByMonthQueryOptions(params,options)

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

  query.queryKey = queryOptions.queryKey ;

  return query;
}

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

  ): Promise<QueryClient> => {

  const queryOptions = getGetStatisticMembershipFeeByMonthQueryOptions(params,options)

  await queryClient.prefetchQuery(queryOptions);

  return queryClient;
}



/**
 * Verify User
 */
export type getStatisticSiteAccessResponse200 = {
  data: Response
  status: 200
}
    
export type getStatisticSiteAccessResponseSuccess = (getStatisticSiteAccessResponse200) & {
  headers: Headers;
};
;

export type getStatisticSiteAccessResponse = (getStatisticSiteAccessResponseSuccess)

export const getGetStatisticSiteAccessUrl = (params: GetStatisticSiteAccessParams,) => {
  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 ? `/statistic/siteAccess?${stringifiedParams}` : `/statistic/siteAccess`
}

export const getStatisticSiteAccess = async (params: GetStatisticSiteAccessParams, options?: RequestInit): Promise<getStatisticSiteAccessResponse> => {
  
  return useCustomClient<getStatisticSiteAccessResponse>(getGetStatisticSiteAccessUrl(params),
  {      
    ...options,
    method: 'GET'
    
    
  }
);}





export const getGetStatisticSiteAccessInfiniteQueryKey = (params?: GetStatisticSiteAccessParams,) => {
    return [
    'infinite', `/statistic/siteAccess`, ...(params ? [params]: [])
    ] as const;
    }

export const getGetStatisticSiteAccessQueryKey = (params?: GetStatisticSiteAccessParams,) => {
    return [
    `/statistic/siteAccess`, ...(params ? [params]: [])
    ] as const;
    }

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

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

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

  

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

      

      

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

export type GetStatisticSiteAccessInfiniteQueryResult = NonNullable<Awaited<ReturnType<typeof getStatisticSiteAccess>>>
export type GetStatisticSiteAccessInfiniteQueryError = ErrorType<unknown>


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

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

  const queryOptions = getGetStatisticSiteAccessInfiniteQueryOptions(params,options)

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

  query.queryKey = queryOptions.queryKey ;

  return query;
}

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

  ): Promise<QueryClient> => {

  const queryOptions = getGetStatisticSiteAccessInfiniteQueryOptions(params,options)

  await queryClient.prefetchInfiniteQuery(queryOptions);

  return queryClient;
}



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

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

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

  

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

      

      

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

export type GetStatisticSiteAccessQueryResult = NonNullable<Awaited<ReturnType<typeof getStatisticSiteAccess>>>
export type GetStatisticSiteAccessQueryError = ErrorType<unknown>


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

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

  const queryOptions = getGetStatisticSiteAccessQueryOptions(params,options)

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

  query.queryKey = queryOptions.queryKey ;

  return query;
}

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

  ): Promise<QueryClient> => {

  const queryOptions = getGetStatisticSiteAccessQueryOptions(params,options)

  await queryClient.prefetchQuery(queryOptions);

  return queryClient;
}



/**
 * Get quantity of member and membership fee
 */
export type getStatisticStatisticMembershipResponse200 = {
  data: Response
  status: 200
}
    
export type getStatisticStatisticMembershipResponseSuccess = (getStatisticStatisticMembershipResponse200) & {
  headers: Headers;
};
;

export type getStatisticStatisticMembershipResponse = (getStatisticStatisticMembershipResponseSuccess)

export const getGetStatisticStatisticMembershipUrl = () => {


  

  return `/statistic/statisticMembership`
}

export const getStatisticStatisticMembership = async ( options?: RequestInit): Promise<getStatisticStatisticMembershipResponse> => {
  
  return useCustomClient<getStatisticStatisticMembershipResponse>(getGetStatisticStatisticMembershipUrl(),
  {      
    ...options,
    method: 'GET'
    
    
  }
);}





export const getGetStatisticStatisticMembershipInfiniteQueryKey = () => {
    return [
    'infinite', `/statistic/statisticMembership`
    ] as const;
    }

export const getGetStatisticStatisticMembershipQueryKey = () => {
    return [
    `/statistic/statisticMembership`
    ] as const;
    }

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

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

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

  

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

      

      

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

export type GetStatisticStatisticMembershipInfiniteQueryResult = NonNullable<Awaited<ReturnType<typeof getStatisticStatisticMembership>>>
export type GetStatisticStatisticMembershipInfiniteQueryError = ErrorType<unknown>


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

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

  const queryOptions = getGetStatisticStatisticMembershipInfiniteQueryOptions(options)

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

  query.queryKey = queryOptions.queryKey ;

  return query;
}

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

  ): Promise<QueryClient> => {

  const queryOptions = getGetStatisticStatisticMembershipInfiniteQueryOptions(options)

  await queryClient.prefetchInfiniteQuery(queryOptions);

  return queryClient;
}



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

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

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

  

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

      

      

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

export type GetStatisticStatisticMembershipQueryResult = NonNullable<Awaited<ReturnType<typeof getStatisticStatisticMembership>>>
export type GetStatisticStatisticMembershipQueryError = ErrorType<unknown>


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

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

  const queryOptions = getGetStatisticStatisticMembershipQueryOptions(options)

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

  query.queryKey = queryOptions.queryKey ;

  return query;
}

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

  ): Promise<QueryClient> => {

  const queryOptions = getGetStatisticStatisticMembershipQueryOptions(options)

  await queryClient.prefetchQuery(queryOptions);

  return queryClient;
}



