Vue OpenAPI Query Documentation
    Preparing search index...

    Interface MutationReturn<TResponse, TPathParams, TRequest, TQueryParams>

    Return type of useEndpointMutation (the useMutation composable on a generated namespace).

    interface MutationReturn<
        TResponse,
        TPathParams extends Record<string, unknown> = Record<string, never>,
        TRequest = never,
        TQueryParams extends Record<string, unknown> = Record<string, never>,
    > {
        data: ComputedRef<AxiosResponse<TResponse, any, {}> | undefined>;
        error: Ref<Error | null>;
        isPending: Ref<boolean>;
        isSuccess: Ref<boolean>;
        isError: Ref<boolean>;
        mutate: MutateFn<TPathParams, TRequest, TQueryParams>;
        mutateAsync: MutateAsyncFn<TResponse, TPathParams, TRequest, TQueryParams>;
        reset: () => void;
        isEnabled: ComputedRef<boolean>;
        pathParams: ComputedRef<TPathParams>;
        extraPathParams: Ref<TPathParams>;
    }

    Type Parameters

    • TResponse

      Response data type

    • TPathParams extends Record<string, unknown> = Record<string, never>

      Path parameters type (concrete, required values)

    • TRequest = never

      Request body type (never if none)

    • TQueryParams extends Record<string, unknown> = Record<string, never>

      Query parameters type

    Index

    Properties

    data: ComputedRef<AxiosResponse<TResponse, any, {}> | undefined>

    The Axios response (undefined until mutation completes).

    error: Ref<Error | null>

    The error if the mutation failed.

    isPending: Ref<boolean>

    True while the mutation is in progress.

    isSuccess: Ref<boolean>

    True when the mutation succeeded.

    isError: Ref<boolean>

    True when the mutation failed.

    Execute the mutation (non-blocking).

    Execute the mutation and await the response.

    reset: () => void

    Reset the mutation state.

    isEnabled: ComputedRef<boolean>

    Whether the mutation can execute (all required path params are resolved).

    pathParams: ComputedRef<TPathParams>

    The resolved path parameters.

    extraPathParams: Ref<TPathParams>

    Additional path params that can be supplied at mutation time.