/**
 * Generated by orval v8.0.0-rc.0 🍺
 * Do not edit manually.
 * VCCI
 * Coded by Meu TEAM
 * OpenAPI spec version: 1.0.0
 */
import {
  useMutation
} from '@tanstack/react-query';
import type {
  MutationFunction,
  QueryClient,
  UseMutationOptions,
  UseMutationResult
} from '@tanstack/react-query';

import type {
  Obj2Body,
  PostAuthForgotPasswordBody,
  PutAuthAssignBusinessInterestBody,
  PutAuthUpdatePasswordBody,
  RefreshToken,
  Response,
  UserLogin,
  UserOrg,
  UserRegisterBody,
  UserVerify
} 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];



/**
 * Post
 */
export type putAuthAddUserInfoResponse200 = {
  data: Response
  status: 200
}
    
export type putAuthAddUserInfoResponseSuccess = (putAuthAddUserInfoResponse200) & {
  headers: Headers;
};
;

export type putAuthAddUserInfoResponse = (putAuthAddUserInfoResponseSuccess)

export const getPutAuthAddUserInfoUrl = () => {


  

  return `/auth/addUserInfo`
}

export const putAuthAddUserInfo = async (userRegisterBody: UserRegisterBody, options?: RequestInit): Promise<putAuthAddUserInfoResponse> => {
  
  return useCustomClient<putAuthAddUserInfoResponse>(getPutAuthAddUserInfoUrl(),
  {      
    ...options,
    method: 'PUT',
    headers: { 'Content-Type': 'application/json', ...options?.headers },
    body: JSON.stringify(
      userRegisterBody,)
  }
);}




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

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

          return  putAuthAddUserInfo(data,requestOptions)
        }

        


  return  { mutationFn, ...mutationOptions }}

    export type PutAuthAddUserInfoMutationResult = NonNullable<Awaited<ReturnType<typeof putAuthAddUserInfo>>>
    export type PutAuthAddUserInfoMutationBody = BodyType<UserRegisterBody>
    export type PutAuthAddUserInfoMutationError = ErrorType<unknown>

    export const usePutAuthAddUserInfo = <TError = ErrorType<unknown>,
    TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof putAuthAddUserInfo>>, TError,{data: BodyType<UserRegisterBody>}, TContext>, request?: SecondParameter<typeof useCustomClient>}
 , queryClient?: QueryClient): UseMutationResult<
        Awaited<ReturnType<typeof putAuthAddUserInfo>>,
        TError,
        {data: BodyType<UserRegisterBody>},
        TContext
      > => {

      const mutationOptions = getPutAuthAddUserInfoMutationOptions(options);

      return useMutation(mutationOptions, queryClient);
    }
    /**
 * Post
 */
export type putAuthAddUserInfoAppResponse200 = {
  data: Response
  status: 200
}
    
export type putAuthAddUserInfoAppResponseSuccess = (putAuthAddUserInfoAppResponse200) & {
  headers: Headers;
};
;

export type putAuthAddUserInfoAppResponse = (putAuthAddUserInfoAppResponseSuccess)

export const getPutAuthAddUserInfoAppUrl = () => {


  

  return `/auth/addUserInfoApp`
}

export const putAuthAddUserInfoApp = async (userRegisterBody: UserRegisterBody, options?: RequestInit): Promise<putAuthAddUserInfoAppResponse> => {
  
  return useCustomClient<putAuthAddUserInfoAppResponse>(getPutAuthAddUserInfoAppUrl(),
  {      
    ...options,
    method: 'PUT',
    headers: { 'Content-Type': 'application/json', ...options?.headers },
    body: JSON.stringify(
      userRegisterBody,)
  }
);}




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

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

          return  putAuthAddUserInfoApp(data,requestOptions)
        }

        


  return  { mutationFn, ...mutationOptions }}

    export type PutAuthAddUserInfoAppMutationResult = NonNullable<Awaited<ReturnType<typeof putAuthAddUserInfoApp>>>
    export type PutAuthAddUserInfoAppMutationBody = BodyType<UserRegisterBody>
    export type PutAuthAddUserInfoAppMutationError = ErrorType<unknown>

    export const usePutAuthAddUserInfoApp = <TError = ErrorType<unknown>,
    TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof putAuthAddUserInfoApp>>, TError,{data: BodyType<UserRegisterBody>}, TContext>, request?: SecondParameter<typeof useCustomClient>}
 , queryClient?: QueryClient): UseMutationResult<
        Awaited<ReturnType<typeof putAuthAddUserInfoApp>>,
        TError,
        {data: BodyType<UserRegisterBody>},
        TContext
      > => {

      const mutationOptions = getPutAuthAddUserInfoAppMutationOptions(options);

      return useMutation(mutationOptions, queryClient);
    }
    /**
 * Post
 */
export type putAuthAssignBusinessInterestResponse200 = {
  data: Response
  status: 200
}
    
export type putAuthAssignBusinessInterestResponseSuccess = (putAuthAssignBusinessInterestResponse200) & {
  headers: Headers;
};
;

export type putAuthAssignBusinessInterestResponse = (putAuthAssignBusinessInterestResponseSuccess)

export const getPutAuthAssignBusinessInterestUrl = () => {


  

  return `/auth/assignBusinessInterest`
}

export const putAuthAssignBusinessInterest = async (putAuthAssignBusinessInterestBody: PutAuthAssignBusinessInterestBody, options?: RequestInit): Promise<putAuthAssignBusinessInterestResponse> => {
  
  return useCustomClient<putAuthAssignBusinessInterestResponse>(getPutAuthAssignBusinessInterestUrl(),
  {      
    ...options,
    method: 'PUT',
    headers: { 'Content-Type': 'application/json', ...options?.headers },
    body: JSON.stringify(
      putAuthAssignBusinessInterestBody,)
  }
);}




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

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

          return  putAuthAssignBusinessInterest(data,requestOptions)
        }

        


  return  { mutationFn, ...mutationOptions }}

    export type PutAuthAssignBusinessInterestMutationResult = NonNullable<Awaited<ReturnType<typeof putAuthAssignBusinessInterest>>>
    export type PutAuthAssignBusinessInterestMutationBody = BodyType<PutAuthAssignBusinessInterestBody>
    export type PutAuthAssignBusinessInterestMutationError = ErrorType<unknown>

    export const usePutAuthAssignBusinessInterest = <TError = ErrorType<unknown>,
    TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof putAuthAssignBusinessInterest>>, TError,{data: BodyType<PutAuthAssignBusinessInterestBody>}, TContext>, request?: SecondParameter<typeof useCustomClient>}
 , queryClient?: QueryClient): UseMutationResult<
        Awaited<ReturnType<typeof putAuthAssignBusinessInterest>>,
        TError,
        {data: BodyType<PutAuthAssignBusinessInterestBody>},
        TContext
      > => {

      const mutationOptions = getPutAuthAssignBusinessInterestMutationOptions(options);

      return useMutation(mutationOptions, queryClient);
    }
    /**
 * Post
 */
export type putAuthAssignOrgResponse200 = {
  data: Response
  status: 200
}
    
export type putAuthAssignOrgResponseSuccess = (putAuthAssignOrgResponse200) & {
  headers: Headers;
};
;

export type putAuthAssignOrgResponse = (putAuthAssignOrgResponseSuccess)

export const getPutAuthAssignOrgUrl = () => {


  

  return `/auth/assignOrg`
}

export const putAuthAssignOrg = async (userOrg: UserOrg, options?: RequestInit): Promise<putAuthAssignOrgResponse> => {
  
  return useCustomClient<putAuthAssignOrgResponse>(getPutAuthAssignOrgUrl(),
  {      
    ...options,
    method: 'PUT',
    headers: { 'Content-Type': 'application/json', ...options?.headers },
    body: JSON.stringify(
      userOrg,)
  }
);}




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

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

          return  putAuthAssignOrg(data,requestOptions)
        }

        


  return  { mutationFn, ...mutationOptions }}

    export type PutAuthAssignOrgMutationResult = NonNullable<Awaited<ReturnType<typeof putAuthAssignOrg>>>
    export type PutAuthAssignOrgMutationBody = BodyType<UserOrg>
    export type PutAuthAssignOrgMutationError = ErrorType<unknown>

    export const usePutAuthAssignOrg = <TError = ErrorType<unknown>,
    TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof putAuthAssignOrg>>, TError,{data: BodyType<UserOrg>}, TContext>, request?: SecondParameter<typeof useCustomClient>}
 , queryClient?: QueryClient): UseMutationResult<
        Awaited<ReturnType<typeof putAuthAssignOrg>>,
        TError,
        {data: BodyType<UserOrg>},
        TContext
      > => {

      const mutationOptions = getPutAuthAssignOrgMutationOptions(options);

      return useMutation(mutationOptions, queryClient);
    }
    /**
 * Register new user
 */
export type postAuthForgotPasswordResponse200 = {
  data: Response
  status: 200
}
    
export type postAuthForgotPasswordResponseSuccess = (postAuthForgotPasswordResponse200) & {
  headers: Headers;
};
;

export type postAuthForgotPasswordResponse = (postAuthForgotPasswordResponseSuccess)

export const getPostAuthForgotPasswordUrl = () => {


  

  return `/auth/forgotPassword`
}

export const postAuthForgotPassword = async (postAuthForgotPasswordBody: PostAuthForgotPasswordBody, options?: RequestInit): Promise<postAuthForgotPasswordResponse> => {
  
  return useCustomClient<postAuthForgotPasswordResponse>(getPostAuthForgotPasswordUrl(),
  {      
    ...options,
    method: 'POST',
    headers: { 'Content-Type': 'application/json', ...options?.headers },
    body: JSON.stringify(
      postAuthForgotPasswordBody,)
  }
);}




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

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

          return  postAuthForgotPassword(data,requestOptions)
        }

        


  return  { mutationFn, ...mutationOptions }}

    export type PostAuthForgotPasswordMutationResult = NonNullable<Awaited<ReturnType<typeof postAuthForgotPassword>>>
    export type PostAuthForgotPasswordMutationBody = BodyType<PostAuthForgotPasswordBody>
    export type PostAuthForgotPasswordMutationError = ErrorType<unknown>

    export const usePostAuthForgotPassword = <TError = ErrorType<unknown>,
    TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof postAuthForgotPassword>>, TError,{data: BodyType<PostAuthForgotPasswordBody>}, TContext>, request?: SecondParameter<typeof useCustomClient>}
 , queryClient?: QueryClient): UseMutationResult<
        Awaited<ReturnType<typeof postAuthForgotPassword>>,
        TError,
        {data: BodyType<PostAuthForgotPasswordBody>},
        TContext
      > => {

      const mutationOptions = getPostAuthForgotPasswordMutationOptions(options);

      return useMutation(mutationOptions, queryClient);
    }
    /**
 * refresh new token for user
 */
export type postAuthGenNewAccessTokenResponse200 = {
  data: Response
  status: 200
}
    
export type postAuthGenNewAccessTokenResponseSuccess = (postAuthGenNewAccessTokenResponse200) & {
  headers: Headers;
};
;

export type postAuthGenNewAccessTokenResponse = (postAuthGenNewAccessTokenResponseSuccess)

export const getPostAuthGenNewAccessTokenUrl = () => {


  

  return `/auth/genNewAccessToken`
}

export const postAuthGenNewAccessToken = async (refreshToken: RefreshToken, options?: RequestInit): Promise<postAuthGenNewAccessTokenResponse> => {
  
  return useCustomClient<postAuthGenNewAccessTokenResponse>(getPostAuthGenNewAccessTokenUrl(),
  {      
    ...options,
    method: 'POST',
    headers: { 'Content-Type': 'application/json', ...options?.headers },
    body: JSON.stringify(
      refreshToken,)
  }
);}




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

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

          return  postAuthGenNewAccessToken(data,requestOptions)
        }

        


  return  { mutationFn, ...mutationOptions }}

    export type PostAuthGenNewAccessTokenMutationResult = NonNullable<Awaited<ReturnType<typeof postAuthGenNewAccessToken>>>
    export type PostAuthGenNewAccessTokenMutationBody = BodyType<RefreshToken>
    export type PostAuthGenNewAccessTokenMutationError = ErrorType<unknown>

    export const usePostAuthGenNewAccessToken = <TError = ErrorType<unknown>,
    TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof postAuthGenNewAccessToken>>, TError,{data: BodyType<RefreshToken>}, TContext>, request?: SecondParameter<typeof useCustomClient>}
 , queryClient?: QueryClient): UseMutationResult<
        Awaited<ReturnType<typeof postAuthGenNewAccessToken>>,
        TError,
        {data: BodyType<RefreshToken>},
        TContext
      > => {

      const mutationOptions = getPostAuthGenNewAccessTokenMutationOptions(options);

      return useMutation(mutationOptions, queryClient);
    }
    /**
 * login user
 */
export type postAuthLoginResponse200 = {
  data: Response
  status: 200
}
    
export type postAuthLoginResponseSuccess = (postAuthLoginResponse200) & {
  headers: Headers;
};
;

export type postAuthLoginResponse = (postAuthLoginResponseSuccess)

export const getPostAuthLoginUrl = () => {


  

  return `/auth/login`
}

export const postAuthLogin = async (userLogin: UserLogin, options?: RequestInit): Promise<postAuthLoginResponse> => {
  
  return useCustomClient<postAuthLoginResponse>(getPostAuthLoginUrl(),
  {      
    ...options,
    method: 'POST',
    headers: { 'Content-Type': 'application/json', ...options?.headers },
    body: JSON.stringify(
      userLogin,)
  }
);}




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

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

          return  postAuthLogin(data,requestOptions)
        }

        


  return  { mutationFn, ...mutationOptions }}

    export type PostAuthLoginMutationResult = NonNullable<Awaited<ReturnType<typeof postAuthLogin>>>
    export type PostAuthLoginMutationBody = BodyType<UserLogin>
    export type PostAuthLoginMutationError = ErrorType<unknown>

    export const usePostAuthLogin = <TError = ErrorType<unknown>,
    TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof postAuthLogin>>, TError,{data: BodyType<UserLogin>}, TContext>, request?: SecondParameter<typeof useCustomClient>}
 , queryClient?: QueryClient): UseMutationResult<
        Awaited<ReturnType<typeof postAuthLogin>>,
        TError,
        {data: BodyType<UserLogin>},
        TContext
      > => {

      const mutationOptions = getPostAuthLoginMutationOptions(options);

      return useMutation(mutationOptions, queryClient);
    }
    /**
 * logout user
 */
export type deleteAuthLogoutResponse200 = {
  data: Response
  status: 200
}
    
export type deleteAuthLogoutResponseSuccess = (deleteAuthLogoutResponse200) & {
  headers: Headers;
};
;

export type deleteAuthLogoutResponse = (deleteAuthLogoutResponseSuccess)

export const getDeleteAuthLogoutUrl = () => {


  

  return `/auth/logout`
}

export const deleteAuthLogout = async ( options?: RequestInit): Promise<deleteAuthLogoutResponse> => {
  
  return useCustomClient<deleteAuthLogoutResponse>(getDeleteAuthLogoutUrl(),
  {      
    ...options,
    method: 'DELETE'
    
    
  }
);}




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

const mutationKey = ['deleteAuthLogout'];
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 deleteAuthLogout>>, void> = () => {
          

          return  deleteAuthLogout(requestOptions)
        }

        


  return  { mutationFn, ...mutationOptions }}

    export type DeleteAuthLogoutMutationResult = NonNullable<Awaited<ReturnType<typeof deleteAuthLogout>>>
    
    export type DeleteAuthLogoutMutationError = ErrorType<unknown>

    export const useDeleteAuthLogout = <TError = ErrorType<unknown>,
    TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteAuthLogout>>, TError,void, TContext>, request?: SecondParameter<typeof useCustomClient>}
 , queryClient?: QueryClient): UseMutationResult<
        Awaited<ReturnType<typeof deleteAuthLogout>>,
        TError,
        void,
        TContext
      > => {

      const mutationOptions = getDeleteAuthLogoutMutationOptions(options);

      return useMutation(mutationOptions, queryClient);
    }
    /**
 * Register new user
 */
export type postAuthRegisterResponse200 = {
  data: Response
  status: 200
}
    
export type postAuthRegisterResponseSuccess = (postAuthRegisterResponse200) & {
  headers: Headers;
};
;

export type postAuthRegisterResponse = (postAuthRegisterResponseSuccess)

export const getPostAuthRegisterUrl = () => {


  

  return `/auth/register`
}

export const postAuthRegister = async (obj2Body: Obj2Body, options?: RequestInit): Promise<postAuthRegisterResponse> => {
  
  return useCustomClient<postAuthRegisterResponse>(getPostAuthRegisterUrl(),
  {      
    ...options,
    method: 'POST',
    headers: { 'Content-Type': 'application/json', ...options?.headers },
    body: JSON.stringify(
      obj2Body,)
  }
);}




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

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

          return  postAuthRegister(data,requestOptions)
        }

        


  return  { mutationFn, ...mutationOptions }}

    export type PostAuthRegisterMutationResult = NonNullable<Awaited<ReturnType<typeof postAuthRegister>>>
    export type PostAuthRegisterMutationBody = BodyType<Obj2Body>
    export type PostAuthRegisterMutationError = ErrorType<unknown>

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

      const mutationOptions = getPostAuthRegisterMutationOptions(options);

      return useMutation(mutationOptions, queryClient);
    }
    /**
 * create OTP attempt
 */
export type postAuthResendOTPResponse200 = {
  data: Response
  status: 200
}
    
export type postAuthResendOTPResponseSuccess = (postAuthResendOTPResponse200) & {
  headers: Headers;
};
;

export type postAuthResendOTPResponse = (postAuthResendOTPResponseSuccess)

export const getPostAuthResendOTPUrl = () => {


  

  return `/auth/resendOTP`
}

export const postAuthResendOTP = async (obj2Body: Obj2Body, options?: RequestInit): Promise<postAuthResendOTPResponse> => {
  
  return useCustomClient<postAuthResendOTPResponse>(getPostAuthResendOTPUrl(),
  {      
    ...options,
    method: 'POST',
    headers: { 'Content-Type': 'application/json', ...options?.headers },
    body: JSON.stringify(
      obj2Body,)
  }
);}




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

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

          return  postAuthResendOTP(data,requestOptions)
        }

        


  return  { mutationFn, ...mutationOptions }}

    export type PostAuthResendOTPMutationResult = NonNullable<Awaited<ReturnType<typeof postAuthResendOTP>>>
    export type PostAuthResendOTPMutationBody = BodyType<Obj2Body>
    export type PostAuthResendOTPMutationError = ErrorType<unknown>

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

      const mutationOptions = getPostAuthResendOTPMutationOptions(options);

      return useMutation(mutationOptions, queryClient);
    }
    /**
 * Register new user
 */
export type putAuthUpdatePasswordResponse200 = {
  data: Response
  status: 200
}
    
export type putAuthUpdatePasswordResponseSuccess = (putAuthUpdatePasswordResponse200) & {
  headers: Headers;
};
;

export type putAuthUpdatePasswordResponse = (putAuthUpdatePasswordResponseSuccess)

export const getPutAuthUpdatePasswordUrl = () => {


  

  return `/auth/updatePassword`
}

export const putAuthUpdatePassword = async (putAuthUpdatePasswordBody: PutAuthUpdatePasswordBody, options?: RequestInit): Promise<putAuthUpdatePasswordResponse> => {
  
  return useCustomClient<putAuthUpdatePasswordResponse>(getPutAuthUpdatePasswordUrl(),
  {      
    ...options,
    method: 'PUT',
    headers: { 'Content-Type': 'application/json', ...options?.headers },
    body: JSON.stringify(
      putAuthUpdatePasswordBody,)
  }
);}




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

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

          return  putAuthUpdatePassword(data,requestOptions)
        }

        


  return  { mutationFn, ...mutationOptions }}

    export type PutAuthUpdatePasswordMutationResult = NonNullable<Awaited<ReturnType<typeof putAuthUpdatePassword>>>
    export type PutAuthUpdatePasswordMutationBody = BodyType<PutAuthUpdatePasswordBody>
    export type PutAuthUpdatePasswordMutationError = ErrorType<unknown>

    export const usePutAuthUpdatePassword = <TError = ErrorType<unknown>,
    TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof putAuthUpdatePassword>>, TError,{data: BodyType<PutAuthUpdatePasswordBody>}, TContext>, request?: SecondParameter<typeof useCustomClient>}
 , queryClient?: QueryClient): UseMutationResult<
        Awaited<ReturnType<typeof putAuthUpdatePassword>>,
        TError,
        {data: BodyType<PutAuthUpdatePasswordBody>},
        TContext
      > => {

      const mutationOptions = getPutAuthUpdatePasswordMutationOptions(options);

      return useMutation(mutationOptions, queryClient);
    }
    /**
 * create OTP attempt
 */
export type postAuthVerifyOTPResponse200 = {
  data: Response
  status: 200
}
    
export type postAuthVerifyOTPResponseSuccess = (postAuthVerifyOTPResponse200) & {
  headers: Headers;
};
;

export type postAuthVerifyOTPResponse = (postAuthVerifyOTPResponseSuccess)

export const getPostAuthVerifyOTPUrl = () => {


  

  return `/auth/verifyOTP`
}

export const postAuthVerifyOTP = async (userVerify: UserVerify, options?: RequestInit): Promise<postAuthVerifyOTPResponse> => {
  
  return useCustomClient<postAuthVerifyOTPResponse>(getPostAuthVerifyOTPUrl(),
  {      
    ...options,
    method: 'POST',
    headers: { 'Content-Type': 'application/json', ...options?.headers },
    body: JSON.stringify(
      userVerify,)
  }
);}




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

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

          return  postAuthVerifyOTP(data,requestOptions)
        }

        


  return  { mutationFn, ...mutationOptions }}

    export type PostAuthVerifyOTPMutationResult = NonNullable<Awaited<ReturnType<typeof postAuthVerifyOTP>>>
    export type PostAuthVerifyOTPMutationBody = BodyType<UserVerify>
    export type PostAuthVerifyOTPMutationError = ErrorType<unknown>

    export const usePostAuthVerifyOTP = <TError = ErrorType<unknown>,
    TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof postAuthVerifyOTP>>, TError,{data: BodyType<UserVerify>}, TContext>, request?: SecondParameter<typeof useCustomClient>}
 , queryClient?: QueryClient): UseMutationResult<
        Awaited<ReturnType<typeof postAuthVerifyOTP>>,
        TError,
        {data: BodyType<UserVerify>},
        TContext
      > => {

      const mutationOptions = getPostAuthVerifyOTPMutationOptions(options);

      return useMutation(mutationOptions, queryClient);
    }
    