Skip to main content

readTransitionInputs

Reads a host's values against declared transition inputs, the same way CnTransitionInputFields and CnTransitionInputDialog do: whether every shown, required input is filled, and the values to send for the inputs that are asked now.

import { readTransitionInputs } from '@conduction/nextcloud-vue'

const { complete, data } = readTransitionInputs(inputs, values, { context: { pauseReasons } })
ParamTypeDescription
declaredArray<object>The declared inputs.
valuesobjectThe values, keyed by field.
optionsobject{ schema, register, context, now }: the schema, the register reference pickers fall back to, what optionsSource reads, and what counts as today.

Returns { complete, data }. A hidden input and a template are left out of data, a picked "Other" is sent as '', and a number input as a number.