import type { MutateOptions, MutationOptions } from '@tanstack/query-core' import { type ShowCallsStatusErrorType, type ShowCallsStatusParameters, type ShowCallsStatusReturnType, showCallsStatus, } from '../actions/showCallsStatus.js' import type { Config } from '../createConfig.js' import type { MutationParameter } from '../types/query.js' import type { Compute } from '../types/utils.js' export type ShowCallsStatusOptions = MutationParameter< ShowCallsStatusData, ShowCallsStatusErrorType, ShowCallsStatusVariables, context > export function showCallsStatusMutationOptions( config: config, options: ShowCallsStatusOptions = {}, ): ShowCallsStatusMutationOptions { return { ...(options.mutation as any), mutationFn(variables) { return showCallsStatus(config, variables) }, mutationKey: ['showCallsStatus'], } } export type ShowCallsStatusMutationOptions = MutationOptions< ShowCallsStatusData, ShowCallsStatusErrorType, ShowCallsStatusVariables > export type ShowCallsStatusData = Compute export type ShowCallsStatusVariables = ShowCallsStatusParameters export type ShowCallsStatusMutate = ( variables: ShowCallsStatusVariables, options?: | Compute< MutateOptions< ShowCallsStatusData, ShowCallsStatusErrorType, Compute, context > > | undefined, ) => void export type ShowCallsStatusMutateAsync = ( variables: ShowCallsStatusVariables, options?: | Compute< MutateOptions< ShowCallsStatusData, ShowCallsStatusErrorType, Compute, context > > | undefined, ) => Promise