/**
* @license
* Copyright Stbui All Rights Reserved.
* https://github.com/stbui/prophet
*/
import { FunctionComponent } from 'react';
interface ChildrenFuncParams {
data?: any;
total?: number;
loading?: boolean;
loaded?: boolean;
error?: any;
}
export interface MutationProps {
children: (mutate: (callTimeQuery: any, callTimeOptions: any) => void, params: ChildrenFuncParams) => JSX.Element;
type: string;
resource: string;
payload?: any;
options?: any;
}
/**
*
* @param {Function} children
* @param {string} type
* @param {string} resource
* @param {Object} payload
* @param {Object} options
* @param {string} options.action
* @param {Function} options.onSuccess
* @param {Function} options.onFailure
*
* @example
*
* import { Mutation, UPDATE } from 'prophet-core';
*
* const UserProfile = ({ record }) => (
*
* {([update, { data, loading, error }]) => {
* if (loading) { return 'loading'; }
* if (error) { return error.message; }
*
* return {data.username}
;
* }}
*
* );
*/
export declare const Mutation: FunctionComponent;
export default Mutation;