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 more

    Declaration

    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 more

    Declaration

    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 more

    Declaration

    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.
    See more

    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 more

    Declaration

    Swift

    public class FlowCollector : SingleValueCollector, Submittable, Closeable, @unchecked Sendable
  • Class representing a LABEL type. It conforms to the Collector protocol and displays a label on the form.

    See more

    Declaration

    Swift

    public class LabelCollector : Collector, @unchecked Sendable
  • Class representing CHECKBOX, COMBOBOX type with MULTI_SELECT inputType. Inherits from FieldCollector and is used to collect multiple values from a list of options.

    See more

    Declaration

    Swift

    open class MultiSelectCollector : FieldCollector<[String]>, @unchecked Sendable
  • Class representing a PASSWORD Type. This class inherits from the ValidatedCollector class and implements the Closeable and Collector protocols. It is used to collect password data.

    See more

    Declaration

    Swift

    public class PasswordCollector : ValidatedCollector, ContinueNodeAware, Closeable, @unchecked Sendable
  • A collector for phone number.

    See more

    Declaration

    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 pollChallengeStatus is false or challenge is empty: waits for pollInterval ms, decrements retriesAllowed, emits .complete(status: "continue") while retries remain, and .timedOut when retries are exhausted.

    Challenge Status Polling Mode

    When pollChallengeStatus is true and challenge is non-empty: repeatedly POSTs to {baseUrl}/davinci/user/credentials/challenge/{challenge}/status until the challenge completes, expires, times out, or an error occurs.

    Value Assignment

    The value property 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"
    See more

    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 content field, e.g.: "data:image/png;base64,iVBORw0KGgo..."

    The imageData property exposes the decoded Data after stripping the data URI prefix, allowing the UI layer to render it as a UIImage or SwiftUI.Image.

    The fallbackText property 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 — payload() always returns nil.

    See more

    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:

    {
      "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
    }
    
    See more

    Declaration

    Swift

    public class ReadOnlyTextCollector : Collector, @unchecked Sendable
  • A class representing a DROPDOWN or RADIO type with SINGLE_SELECT inputType. Inherits from ValidatedCollector and is used to collect multiple values from a list of options.

    See more

    Declaration

    Swift

    public class SingleSelectCollector : ValidatedCollector, @unchecked Sendable
  • A class representing a single value collector, Inheriting from FieldCollector and conforming to Collector.

    See more

    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 more

    Declaration

    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 more

    Declaration

    Swift

    open class ValidatedCollector : SingleValueCollector, @unchecked Sendable
  • A module to set the ContinueNode in the FlowContex.

    See more

    Declaration

    Swift

    public class ContinueNodeModule
  • A module that integrates OIDC capabilities into the DaVinci workflow.

    See more

    Declaration

    Swift

    public class OidcModule
  • Module for transforming the response from DaVinci to Node.

    See more

    Declaration

    Swift

    public class NodeTransformModule