Classes
The following classes are available globally.
-
A collector representing a single checkbox field (e.g., agreement acceptance). The value is a boolean indicating whether the checkbox is checked.
See moreDeclaration
Swift
public class BooleanCollector : FieldCollector<Bool>, @unchecked Sendable -
A collector for device authentication information.
This class is responsible for collecting information about device authentication, including the available devices and the user’s selection.
See moreDeclaration
Swift
open class DeviceAuthenticationCollector : FieldCollector<[String : Any]>, Submittable, Closeable, @unchecked Sendable -
A collector for device registration information.
This class is responsible for collecting information about device registration, including the available devices and the user’s selection.
See moreDeclaration
Swift
open class DeviceRegistrationCollector : FieldCollector<String>, Submittable, Closeable, @unchecked Sendable -
Abstract class representing a field collector.
- property type: The type of the field collector.
- property key: The key of the field collector.
- property label: The label of the field collector.
- property id The UUID of the field collector.
Declaration
Swift
open class FieldCollector<T> : Collector, AnyFieldCollector, Validator, @unchecked Sendable -
A collector for flow control actions, such as buttons or links.
This class is used to handle user interactions that trigger a flow action, like navigating to a different part of the flow.
See moreDeclaration
Swift
public class FlowCollector : SingleValueCollector, Submittable, Closeable, @unchecked Sendable -
Class representing a LABEL type. It conforms to the
See moreCollectorprotocol and displays a label on the form.Declaration
Swift
public class LabelCollector : Collector, @unchecked Sendable -
Class representing CHECKBOX, COMBOBOX type with MULTI_SELECT inputType. Inherits from
See moreFieldCollectorand is used to collect multiple values from a list of options.Declaration
Swift
open class MultiSelectCollector : FieldCollector<[String]>, @unchecked Sendable -
Class representing a PASSWORD Type. This class inherits from the
See moreValidatedCollectorclass and implements theCloseableandCollectorprotocols. It is used to collect password data.Declaration
Swift
public class PasswordCollector : ValidatedCollector, ContinueNodeAware, Closeable, @unchecked Sendable -
A collector for phone number.
See moreDeclaration
Swift
open class PhoneNumberCollector : FieldCollector<[String : Any]>, @unchecked Sendable -
A collector that handles asynchronous polling operations in DaVinci authentication flows.
Used for scenarios that require waiting for user action on another device or channel, such as push notification authentication, QR code scanning, or email verification.
Polling Modes
Simple Polling Mode
When
pollChallengeStatusisfalseorchallengeis empty: waits forpollIntervalms, decrementsretriesAllowed, emits.complete(status: "continue")while retries remain, and.timedOutwhen retries are exhausted.Challenge Status Polling Mode
When
pollChallengeStatusistrueandchallengeis non-empty: repeatedly POSTs to{baseUrl}/davinci/user/credentials/challenge/{challenge}/statusuntil the challenge completes, expires, times out, or an error occurs.Value Assignment
The
valueproperty is updated automatically before each terminal status is yielded:.complete→ the server status string (e.g."approved"or"continue").timedOut→"timedOut".expired→"expired".error→"error".continue→"continue"
Declaration
Swift
public class PollingCollector : SingleValueCollector, Submittable, ContinueNodeAware, DaVinciAware, Closeable, @unchecked Sendable -
A display-only collector that provides a QR code image in DaVinci authentication flows.
The server sends the image as a data URI in the
contentfield, e.g.:"data:image/png;base64,iVBORw0KGgo..."The
imageDataproperty exposes the decodedDataafter stripping the data URI prefix, allowing the UI layer to render it as aUIImageorSwiftUI.Image.The
fallbackTextproperty carries an alternative string (e.g. a manual entry code or a URL) to display if the QR code cannot be rendered or scanned.This collector does not participate in form submission —
See morepayload()always returnsnil.Declaration
Swift
public class QRCodeCollector : Collector, @unchecked Sendable -
This class handles the response from a DaVinci form field of inputType READ_ONLY_TEXT . It displays read-only text content such as agreement/terms-of-service text.
Example JSON:
See more{ "type": "AGREEMENT", "inputType": "READ_ONLY_TEXT", "key": "agreement", "content": "This is example agreement text...", "titleEnabled": true, "title": "Terms of Service Agreement", "agreement": { "id": "6ff30c9e-cd98-4fe5-85ca-01111ca20702", "useDynamicAgreement": false }, "enabled": true }Declaration
Swift
public class ReadOnlyTextCollector : Collector, @unchecked Sendable -
A class representing a DROPDOWN or RADIO type with SINGLE_SELECT inputType. Inherits from
See moreValidatedCollectorand is used to collect multiple values from a list of options.Declaration
Swift
public class SingleSelectCollector : ValidatedCollector, @unchecked Sendable -
A class representing a single value collector, Inheriting from
See moreFieldCollectorand conforming toCollector.Declaration
Swift
open class SingleValueCollector : FieldCollector<String>, @unchecked Sendable -
A collector for form submission actions.
This class is used to handle the submission of a form, triggering the next step in the flow.
See moreDeclaration
Swift
public class SubmitCollector : SingleValueCollector, Submittable, Closeable, @unchecked Sendable -
Class representing a TEXT type. This class inherits from the ValidatedCollector class and implements the Collector protocol. It is used to collect text data.
Declaration
Swift
public class TextCollector : ValidatedCollector, ObservableObject, @unchecked Sendable -
Open class representing a validated collector.
See moreDeclaration
Swift
open class ValidatedCollector : SingleValueCollector, @unchecked Sendable -
A module to set the
See moreContinueNodein theFlowContex.Declaration
Swift
public class ContinueNodeModule -
A module that integrates OIDC capabilities into the DaVinci workflow.
See moreDeclaration
Swift
public class OidcModule -
Module for transforming the response from DaVinci to
See moreNode.Declaration
Swift
public class NodeTransformModule
View on GitHub
Classes Reference