/* eslint-disable @typescript-eslint/no-explicit-any */ /** * Generated by orval 🍺 * Do not edit manually. * API * API documentation for the starter-kit project in NestJS by BinarApps. The API allows management of users, sessions and offers various functions for logged in users. Contains examples of authentication, authorization, and CRUD for selected resources. * OpenAPI spec version: 1.0 */ import { useMutation } from '@tanstack/react-query' import type { MutationFunction, UseMutationOptions, UseMutationResult } from '@tanstack/react-query' import { customInstance } from '../../axios/custom-instance' import type { ErrorType, BodyType } from '../../axios/custom-instance' import type { AppVersionStatusEntity, CheckUpdateDto, ErrorServerEntity, ErrorTooManyRequestsEntity, ErrorValidationEntity, } from '../../types' type SecondParameter any> = Parameters[1] export const systemControllerCheckForAppUpdate = ( checkUpdateDto: BodyType, options?: SecondParameter, signal?: AbortSignal ) => { return customInstance( { url: `/api/v1/system/app-updates/check`, method: 'POST', headers: { 'Content-Type': 'application/json' }, data: checkUpdateDto, signal, }, options ) } export const getSystemControllerCheckForAppUpdateMutationOptions = < TData = Awaited>, TError = ErrorType, TContext = unknown, >(options?: { mutation?: UseMutationOptions }, TContext> request?: SecondParameter }) => { const mutationKey = ['systemControllerCheckForAppUpdate'] 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>, { data: BodyType } > = (props) => { const { data } = props ?? {} return systemControllerCheckForAppUpdate(data, requestOptions) } return { mutationFn, ...mutationOptions } as UseMutationOptions< TData, TError, { data: BodyType }, TContext > } export type SystemControllerCheckForAppUpdateMutationResult = NonNullable< Awaited> > export type SystemControllerCheckForAppUpdateMutationBody = BodyType export type SystemControllerCheckForAppUpdateMutationError = ErrorType< void | ErrorValidationEntity | ErrorTooManyRequestsEntity | ErrorServerEntity > export const useSystemControllerCheckForAppUpdate = < TData = Awaited>, TError = ErrorType, TContext = unknown, >(options?: { mutation?: UseMutationOptions }, TContext> request?: SecondParameter }): UseMutationResult }, TContext> => { const mutationOptions = getSystemControllerCheckForAppUpdateMutationOptions(options) return useMutation(mutationOptions) }