Builds a next() payload from a DaVinci node and form values.
Current DaVinci node. Returns a NO_ACTIVE_CONTINUE_NODE issue when absent.
Form values keyed by collector key.
OptionalhandledCollectorTypes: ReadonlySet<string>Collector types the app has already
processed via native integration (e.g. IdP, FIDO, Protect). Matching
integration_required collectors are excluded from submit issues so
canSubmit reflects true readiness.
OptionalflowKey: stringOptional FlowCollector key to submit immediately.
Submit plan with payload, submit eligibility, and issues.
Basic submit:
const { canSubmit, input, issues } = buildNextInput(node, values);
if (canSubmit) {
await client.next(input);
}
Flow button (bypasses all other field values):
const { input } = buildNextInput(node, values, undefined, 'forgot-password');
await client.next(input);
When flowKey is provided, the payload contains only that single
collector key — all other field values are ignored and no REQUIRED_VALUE_MISSING
issues are produced. This mirrors how FlowCollector advances the flow with
eventType = "action" on the native side.
Integration-required collectors whose type appears in
handledCollectorTypes are silently skipped; those not in the set emit a
non-blocking INTEGRATION_REQUIRED issue and force canSubmit: false.
Headless collector normalisation and submit-planning helpers.