/**
 * 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 {
  DeleteLogoId200,
  GetLogoId200,
  GetLogoParams,
  LogoCreate,
  LogoUpdate,
  PostLogo200,
  PutLogoId200,
  ResponseGetAllData
} 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 a single logo record by its ID
 * @summary Get logo by ID
 */
export type getLogoIdResponse200 = {
  data: GetLogoId200
  status: 200
}

export type getLogoIdResponse404 = {
  data: void
  status: 404
}
    
export type getLogoIdResponseSuccess = (getLogoIdResponse200) & {
  headers: Headers;
};
export type getLogoIdResponseError = (getLogoIdResponse404) & {
  headers: Headers;
};

export type getLogoIdResponse = (getLogoIdResponseSuccess | getLogoIdResponseError)

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


  

  return `/logo/${id}`
}

export const getLogoId = async (id: string, options?: RequestInit): Promise<getLogoIdResponse> => {
  
  return useCustomClient<getLogoIdResponse>(getGetLogoIdUrl(id),
  {      
    ...options,
    method: 'GET'
    
    
  }
);}





export const getGetLogoIdInfiniteQueryKey = (id?: string,) => {
    return [
    'infinite', `/logo/${id}`
    ] as const;
    }

export const getGetLogoIdQueryKey = (id?: string,) => {
    return [
    `/logo/${id}`
    ] as const;
    }

    
export const getGetLogoIdInfiniteQueryOptions = <TData = InfiniteData<Awaited<ReturnType<typeof getLogoId>>>, TError = ErrorType<void>>(id: string, options?: { query?:Partial<UseInfiniteQueryOptions<Awaited<ReturnType<typeof getLogoId>>, TError, TData>>, request?: SecondParameter<typeof useCustomClient>}
) => {

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

  const queryKey =  queryOptions?.queryKey ?? getGetLogoIdInfiniteQueryKey(id);

  

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

      

      

   return  { queryKey, queryFn, enabled: !!(id),  retry: 3, retryDelay: 1000,  ...queryOptions} as UseInfiniteQueryOptions<Awaited<ReturnType<typeof getLogoId>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }
}

export type GetLogoIdInfiniteQueryResult = NonNullable<Awaited<ReturnType<typeof getLogoId>>>
export type GetLogoIdInfiniteQueryError = ErrorType<void>


export function useGetLogoIdInfinite<TData = InfiniteData<Awaited<ReturnType<typeof getLogoId>>>, TError = ErrorType<void>>(
 id: string, options: { query:Partial<UseInfiniteQueryOptions<Awaited<ReturnType<typeof getLogoId>>, TError, TData>> & Pick<
        DefinedInitialDataOptions<
          Awaited<ReturnType<typeof getLogoId>>,
          TError,
          Awaited<ReturnType<typeof getLogoId>>
        > , 'initialData'
      >, request?: SecondParameter<typeof useCustomClient>}
 , queryClient?: QueryClient
  ):  DefinedUseInfiniteQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
export function useGetLogoIdInfinite<TData = InfiniteData<Awaited<ReturnType<typeof getLogoId>>>, TError = ErrorType<void>>(
 id: string, options?: { query?:Partial<UseInfiniteQueryOptions<Awaited<ReturnType<typeof getLogoId>>, TError, TData>> & Pick<
        UndefinedInitialDataOptions<
          Awaited<ReturnType<typeof getLogoId>>,
          TError,
          Awaited<ReturnType<typeof getLogoId>>
        > , 'initialData'
      >, request?: SecondParameter<typeof useCustomClient>}
 , queryClient?: QueryClient
  ):  UseInfiniteQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
export function useGetLogoIdInfinite<TData = InfiniteData<Awaited<ReturnType<typeof getLogoId>>>, TError = ErrorType<void>>(
 id: string, options?: { query?:Partial<UseInfiniteQueryOptions<Awaited<ReturnType<typeof getLogoId>>, TError, TData>>, request?: SecondParameter<typeof useCustomClient>}
 , queryClient?: QueryClient
  ):  UseInfiniteQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
/**
 * @summary Get logo by ID
 */

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

  const queryOptions = getGetLogoIdInfiniteQueryOptions(id,options)

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

  query.queryKey = queryOptions.queryKey ;

  return query;
}

/**
 * @summary Get logo by ID
 */
export const prefetchGetLogoIdInfiniteQuery = async <TData = Awaited<ReturnType<typeof getLogoId>>, TError = ErrorType<void>>(
 queryClient: QueryClient, id: string, options?: { query?:Partial<UseInfiniteQueryOptions<Awaited<ReturnType<typeof getLogoId>>, TError, TData>>, request?: SecondParameter<typeof useCustomClient>}

  ): Promise<QueryClient> => {

  const queryOptions = getGetLogoIdInfiniteQueryOptions(id,options)

  await queryClient.prefetchInfiniteQuery(queryOptions);

  return queryClient;
}



export const getGetLogoIdQueryOptions = <TData = Awaited<ReturnType<typeof getLogoId>>, TError = ErrorType<void>>(id: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getLogoId>>, TError, TData>>, request?: SecondParameter<typeof useCustomClient>}
) => {

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

  const queryKey =  queryOptions?.queryKey ?? getGetLogoIdQueryKey(id);

  

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

      

      

   return  { queryKey, queryFn, enabled: !!(id),  retry: 3, retryDelay: 1000,  ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getLogoId>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }
}

export type GetLogoIdQueryResult = NonNullable<Awaited<ReturnType<typeof getLogoId>>>
export type GetLogoIdQueryError = ErrorType<void>


export function useGetLogoId<TData = Awaited<ReturnType<typeof getLogoId>>, TError = ErrorType<void>>(
 id: string, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getLogoId>>, TError, TData>> & Pick<
        DefinedInitialDataOptions<
          Awaited<ReturnType<typeof getLogoId>>,
          TError,
          Awaited<ReturnType<typeof getLogoId>>
        > , 'initialData'
      >, request?: SecondParameter<typeof useCustomClient>}
 , queryClient?: QueryClient
  ):  DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
export function useGetLogoId<TData = Awaited<ReturnType<typeof getLogoId>>, TError = ErrorType<void>>(
 id: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getLogoId>>, TError, TData>> & Pick<
        UndefinedInitialDataOptions<
          Awaited<ReturnType<typeof getLogoId>>,
          TError,
          Awaited<ReturnType<typeof getLogoId>>
        > , 'initialData'
      >, request?: SecondParameter<typeof useCustomClient>}
 , queryClient?: QueryClient
  ):  UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
export function useGetLogoId<TData = Awaited<ReturnType<typeof getLogoId>>, TError = ErrorType<void>>(
 id: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getLogoId>>, TError, TData>>, request?: SecondParameter<typeof useCustomClient>}
 , queryClient?: QueryClient
  ):  UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
/**
 * @summary Get logo by ID
 */

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

  const queryOptions = getGetLogoIdQueryOptions(id,options)

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

  query.queryKey = queryOptions.queryKey ;

  return query;
}

/**
 * @summary Get logo by ID
 */
export const prefetchGetLogoIdQuery = async <TData = Awaited<ReturnType<typeof getLogoId>>, TError = ErrorType<void>>(
 queryClient: QueryClient, id: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getLogoId>>, TError, TData>>, request?: SecondParameter<typeof useCustomClient>}

  ): Promise<QueryClient> => {

  const queryOptions = getGetLogoIdQueryOptions(id,options)

  await queryClient.prefetchQuery(queryOptions);

  return queryClient;
}



/**
 * Update a single logo record by its ID
 * @summary Update logo by ID
 */
export type putLogoIdResponse200 = {
  data: PutLogoId200
  status: 200
}

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

export type putLogoIdResponse404 = {
  data: void
  status: 404
}

export type putLogoIdResponse409 = {
  data: void
  status: 409
}
    
export type putLogoIdResponseSuccess = (putLogoIdResponse200) & {
  headers: Headers;
};
export type putLogoIdResponseError = (putLogoIdResponse400 | putLogoIdResponse404 | putLogoIdResponse409) & {
  headers: Headers;
};

export type putLogoIdResponse = (putLogoIdResponseSuccess | putLogoIdResponseError)

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


  

  return `/logo/${id}`
}

export const putLogoId = async (id: string,
    logoUpdate: LogoUpdate, options?: RequestInit): Promise<putLogoIdResponse> => {
  
  return useCustomClient<putLogoIdResponse>(getPutLogoIdUrl(id),
  {      
    ...options,
    method: 'PUT',
    headers: { 'Content-Type': 'application/json', ...options?.headers },
    body: JSON.stringify(
      logoUpdate,)
  }
);}




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

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

          return  putLogoId(id,data,requestOptions)
        }

        


  return  { mutationFn, ...mutationOptions }}

    export type PutLogoIdMutationResult = NonNullable<Awaited<ReturnType<typeof putLogoId>>>
    export type PutLogoIdMutationBody = BodyType<LogoUpdate>
    export type PutLogoIdMutationError = ErrorType<void>

    /**
 * @summary Update logo by ID
 */
export const usePutLogoId = <TError = ErrorType<void>,
    TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof putLogoId>>, TError,{id: string;data: BodyType<LogoUpdate>}, TContext>, request?: SecondParameter<typeof useCustomClient>}
 , queryClient?: QueryClient): UseMutationResult<
        Awaited<ReturnType<typeof putLogoId>>,
        TError,
        {id: string;data: BodyType<LogoUpdate>},
        TContext
      > => {

      const mutationOptions = getPutLogoIdMutationOptions(options);

      return useMutation(mutationOptions, queryClient);
    }
    /**
 * Delete a single logo record by its ID
 * @summary Delete logo by ID
 */
export type deleteLogoIdResponse200 = {
  data: DeleteLogoId200
  status: 200
}

export type deleteLogoIdResponse404 = {
  data: void
  status: 404
}

export type deleteLogoIdResponse409 = {
  data: void
  status: 409
}
    
export type deleteLogoIdResponseSuccess = (deleteLogoIdResponse200) & {
  headers: Headers;
};
export type deleteLogoIdResponseError = (deleteLogoIdResponse404 | deleteLogoIdResponse409) & {
  headers: Headers;
};

export type deleteLogoIdResponse = (deleteLogoIdResponseSuccess | deleteLogoIdResponseError)

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


  

  return `/logo/${id}`
}

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




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

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

          return  deleteLogoId(id,requestOptions)
        }

        


  return  { mutationFn, ...mutationOptions }}

    export type DeleteLogoIdMutationResult = NonNullable<Awaited<ReturnType<typeof deleteLogoId>>>
    
    export type DeleteLogoIdMutationError = ErrorType<void>

    /**
 * @summary Delete logo by ID
 */
export const useDeleteLogoId = <TError = ErrorType<void>,
    TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteLogoId>>, TError,{id: string}, TContext>, request?: SecondParameter<typeof useCustomClient>}
 , queryClient?: QueryClient): UseMutationResult<
        Awaited<ReturnType<typeof deleteLogoId>>,
        TError,
        {id: string},
        TContext
      > => {

      const mutationOptions = getDeleteLogoIdMutationOptions(options);

      return useMutation(mutationOptions, queryClient);
    }
    /**
 * Retrieve a list of logos with pagination, filtering and sorting
 * @summary Get all logos
 */
export type getLogoResponse200 = {
  data: ResponseGetAllData
  status: 200
}
    
export type getLogoResponseSuccess = (getLogoResponse200) & {
  headers: Headers;
};
;

export type getLogoResponse = (getLogoResponseSuccess)

export const getGetLogoUrl = (params?: GetLogoParams,) => {
  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 ? `/logo?${stringifiedParams}` : `/logo`
}

export const getLogo = async (params?: GetLogoParams, options?: RequestInit): Promise<getLogoResponse> => {
  
  return useCustomClient<getLogoResponse>(getGetLogoUrl(params),
  {      
    ...options,
    method: 'GET'
    
    
  }
);}





export const getGetLogoInfiniteQueryKey = (params?: GetLogoParams,) => {
    return [
    'infinite', `/logo`, ...(params ? [params]: [])
    ] as const;
    }

export const getGetLogoQueryKey = (params?: GetLogoParams,) => {
    return [
    `/logo`, ...(params ? [params]: [])
    ] as const;
    }

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

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

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

  

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

      

      

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

export type GetLogoInfiniteQueryResult = NonNullable<Awaited<ReturnType<typeof getLogo>>>
export type GetLogoInfiniteQueryError = ErrorType<unknown>


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

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

  const queryOptions = getGetLogoInfiniteQueryOptions(params,options)

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

  query.queryKey = queryOptions.queryKey ;

  return query;
}

/**
 * @summary Get all logos
 */
export const prefetchGetLogoInfiniteQuery = async <TData = Awaited<ReturnType<typeof getLogo>>, TError = ErrorType<unknown>>(
 queryClient: QueryClient, params?: GetLogoParams, options?: { query?:Partial<UseInfiniteQueryOptions<Awaited<ReturnType<typeof getLogo>>, TError, TData>>, request?: SecondParameter<typeof useCustomClient>}

  ): Promise<QueryClient> => {

  const queryOptions = getGetLogoInfiniteQueryOptions(params,options)

  await queryClient.prefetchInfiniteQuery(queryOptions);

  return queryClient;
}



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

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

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

  

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

      

      

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

export type GetLogoQueryResult = NonNullable<Awaited<ReturnType<typeof getLogo>>>
export type GetLogoQueryError = ErrorType<unknown>


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

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

  const queryOptions = getGetLogoQueryOptions(params,options)

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

  query.queryKey = queryOptions.queryKey ;

  return query;
}

/**
 * @summary Get all logos
 */
export const prefetchGetLogoQuery = async <TData = Awaited<ReturnType<typeof getLogo>>, TError = ErrorType<unknown>>(
 queryClient: QueryClient, params?: GetLogoParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getLogo>>, TError, TData>>, request?: SecondParameter<typeof useCustomClient>}

  ): Promise<QueryClient> => {

  const queryOptions = getGetLogoQueryOptions(params,options)

  await queryClient.prefetchQuery(queryOptions);

  return queryClient;
}



/**
 * Create a new logo record
 * @summary Create a logo
 */
export type postLogoResponse200 = {
  data: PostLogo200
  status: 200
}

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

export type postLogoResponse404 = {
  data: void
  status: 404
}

export type postLogoResponse409 = {
  data: void
  status: 409
}
    
export type postLogoResponseSuccess = (postLogoResponse200) & {
  headers: Headers;
};
export type postLogoResponseError = (postLogoResponse400 | postLogoResponse404 | postLogoResponse409) & {
  headers: Headers;
};

export type postLogoResponse = (postLogoResponseSuccess | postLogoResponseError)

export const getPostLogoUrl = () => {


  

  return `/logo`
}

export const postLogo = async (logoCreate: LogoCreate, options?: RequestInit): Promise<postLogoResponse> => {
  
  return useCustomClient<postLogoResponse>(getPostLogoUrl(),
  {      
    ...options,
    method: 'POST',
    headers: { 'Content-Type': 'application/json', ...options?.headers },
    body: JSON.stringify(
      logoCreate,)
  }
);}




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

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

          return  postLogo(data,requestOptions)
        }

        


  return  { mutationFn, ...mutationOptions }}

    export type PostLogoMutationResult = NonNullable<Awaited<ReturnType<typeof postLogo>>>
    export type PostLogoMutationBody = BodyType<LogoCreate>
    export type PostLogoMutationError = ErrorType<void>

    /**
 * @summary Create a logo
 */
export const usePostLogo = <TError = ErrorType<void>,
    TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof postLogo>>, TError,{data: BodyType<LogoCreate>}, TContext>, request?: SecondParameter<typeof useCustomClient>}
 , queryClient?: QueryClient): UseMutationResult<
        Awaited<ReturnType<typeof postLogo>>,
        TError,
        {data: BodyType<LogoCreate>},
        TContext
      > => {

      const mutationOptions = getPostLogoMutationOptions(options);

      return useMutation(mutationOptions, queryClient);
    }
    