ping-identity
    Preparing search index...

    Type Alias DaVinciFormResult

    Return contract for useDaVinciForm.

    Parallels JourneyFormResult from the Journey package. fields replaces the older collectors name for parity with Journey.

    type DaVinciFormResult = {
        buildInput: (
            overrides?: Partial<DaVinciFormValues>,
        ) => DaVinciBuildNextInputResult;
        canSubmit: boolean;
        clearValue: (key: string) => void;
        fields: DaVinciNormalizedCollector[];
        getField: (key: string) => DaVinciNormalizedCollector | undefined;
        getFieldByType: (
            type: string,
            typeIndex?: number,
        ) => DaVinciNormalizedCollector | undefined;
        getFieldsByType: (type: string) => DaVinciNormalizedCollector[];
        input: DaVinciNextInput;
        issues: DaVinciSubmitIssue[];
        meta: DaVinciFormMeta;
        reset: (nextValues?: DaVinciFormValues) => void;
        setValue: (key: string, value: DaVinciFormValue) => void;
        setValueByType: (
            type: string,
            value: DaVinciFormValue,
            typeIndex?: number,
        ) => boolean;
        setValues: (updater: DaVinciFormValuesUpdater) => void;
        submitFlow: (flowKey: string) => Promise<DaVinciNode>;
        values: DaVinciFormValues;
    }
    Index

    Properties

    buildInput: (
        overrides?: Partial<DaVinciFormValues>,
    ) => DaVinciBuildNextInputResult

    Builds a fresh submit plan for the current node and optional value overrides.

    Type Declaration

    canSubmit: boolean

    Indicates whether input can be safely submitted.

    clearValue: (key: string) => void

    Removes one collector field value from form state.

    Type Declaration

      • (key: string): void
      • Parameters

        • key: string

          Collector key.

        Returns void

    Normalized collector fields for the active ContinueNode.

    getField: (key: string) => DaVinciNormalizedCollector | undefined

    Returns one normalized collector field by key.

    Type Declaration

    getFieldByType: (
        type: string,
        typeIndex?: number,
    ) => DaVinciNormalizedCollector | undefined

    Returns one normalized collector field by type string and per-type index.

    Type Declaration

      • (type: string, typeIndex?: number): DaVinciNormalizedCollector | undefined
      • Parameters

        • type: string

          Collector type string.

        • OptionaltypeIndex: number

          Optional zero-based index within the type group (defaults to 0).

        Returns DaVinciNormalizedCollector | undefined

        Matching field or undefined.

    getFieldsByType: (type: string) => DaVinciNormalizedCollector[]

    Returns all normalized collector fields for a given type string.

    Type Declaration

    Submit payload derived from node + values.

    Planning issues detected for the current submit payload.

    Derived collector execution metadata.

    reset: (nextValues?: DaVinciFormValues) => void

    Resets the full value map and reapplies collector-provided defaults.

    Type Declaration

    setValue: (key: string, value: DaVinciFormValue) => void

    Sets one collector field value.

    Type Declaration

    setValueByType: (
        type: string,
        value: DaVinciFormValue,
        typeIndex?: number,
    ) => boolean

    Sets one field value using collector type string and optional index.

    Type Declaration

      • (type: string, value: DaVinciFormValue, typeIndex?: number): boolean
      • Parameters

        • type: string

          Collector type string.

        • value: DaVinciFormValue

          New field value.

        • OptionaltypeIndex: number

          Optional zero-based index within the type group (defaults to 0).

        Returns boolean

        True when a matching field was found and updated.

    setValues: (updater: DaVinciFormValuesUpdater) => void

    Merges one or more collector field values.

    Type Declaration

    submitFlow: (flowKey: string) => Promise<DaVinciNode>

    Submits a FlowCollector by key, bypassing all other field values.

    Type Declaration

      • (flowKey: string): Promise<DaVinciNode>
      • Parameters

        • flowKey: string

          Flow collector key.

        Returns Promise<DaVinciNode>

        Next flow node.

    When progression fails.

    Current form value map keyed by collector key.