Interface ApiMutationOptions<TResponse>

interface ApiMutationOptions<TResponse> {
    errorMessage?: ErrorMessageI18nHandler;
    onSuccess?: ((response) => void);
    showToast: ((message) => void);
    successMessage?: string;
}

Type Parameters

  • TResponse

Properties

A function that returns the error message to show when the api call fails

onSuccess?: ((response) => void)

Callback to run on success

Type declaration

    • (response): void
    • Callback to run on success

      Parameters

      Returns void

showToast: ((message) => void)

A function that shows a toast message (required)

Type declaration

    • (message): void
    • A function that shows a toast message (required)

      Parameters

      • message: string

      Returns void

successMessage?: string

A message to show when the api call is successful

Generated using TypeDoc