@mussnad/frappe-react-query
Version:
A React Query SDK for Frappe
15 lines (14 loc) • 642 B
TypeScript
import { FrappeDoc } from '@mussnad/frappe-js-client/dist/frappe/types';
/**
* Hook to validate a link
* @param doctype - the doctype of the document
* @param docname - the name of the document
* @param fields - the fields to validate
*
* @returns Returns an object with the following properties: data, error, isFetching, mutate
*
* @example
*
* const { data, error, isFetching, mutate } = useValidateLink('DocType', 'name', ['field1', 'field2'])
*/
export declare const useValidateLink: <T extends FrappeDoc<object>>(doctype: string, docname: string, fields: string[]) => import('@tanstack/react-query').UseQueryResult<T, Error>;