import { FormData, EmbedFormOptions, GenericObjectType } from '../../types'; import { YepCodeJsonSchemaFormProps } from '../json-schema-form'; export type YepCodeFormOptions = Omit; export interface YepCodeFormProps extends Omit { /** * The host URL for YepCode (optional). */ hostUrl?: string; /** * Headers to be added to form fetch and submit requests. */ headers?: GenericObjectType; /** * The YepCode team slug. */ team: string; /** * The YepCode process ID. */ processId: string; /** * Indicates whether the form should be submitted asynchronously (optional). */ async?: boolean; /** * A function called when the form is successfully submitted. * Receives the following parameters: * - formId: The ID of the form. * - processExecutionResult: The result of the process execution as a generic object. * - formSubmittedData: The data submitted with the form. */ onSuccess?: (formId: string, processExecutionResult: GenericObjectType, formSubmittedData: FormData) => void; /** * A function called when the next step of the form is called. */ onNextStep?: (formId: string, previousProcessExecutionResult: GenericObjectType) => void; /** * A function called when an error occurs during form submission. * Receives the following parameters: * - formId: The ID of the form. * - error: The error that occurred, of unknown type. * - formSubmittedData: The data submitted with the form. */ onError?: (formId: string, error: unknown, formSubmittedData: FormData) => void; /** * The default values for the form. */ defaultValues?: FormData; /** * The options for YepCode form. */ options: YepCodeFormOptions; } export interface YepCodeFormStep { processId: string; data: FormData; result: GenericObjectType; } export interface YepCodeFormState { processId: string; steps: YepCodeFormStep[]; variables: GenericObjectType; } declare const YepCodeForm: { ({ hostUrl, headers, team, processId, onNextStep, onSuccess, onError, defaultValues, async, disabled, readonly, options, ...rest }: YepCodeFormProps): import("react/jsx-runtime").JSX.Element | null; displayName: string; }; export default YepCodeForm;