Protocols

The following protocols are available globally.

  • Protocol representing a Collector. It is a generic protocol that defines the structure for creating different types of collectors. It inherits from the Action protocol and conforms to Identifiable and Sendable protocols.

    See more

    Declaration

    Swift

    public protocol Collector<T> : Action, Identifiable

    Parameters

    T

    The type of the payload that the collector will handle.

    id

    A unique identifier for the collector.

    payload()

    Returns the payload of type T. When payload returns nil, the field will not be posted to server.

  • An interface that should be implemented by classes that need to be aware of the ContinueNode. The continueNode will be injected to the classes that implement this interface.

    See more

    Declaration

    Swift

    public protocol ContinueNodeAware
  • A protocol that defines a type for DaVinciAware. Exposes the davinci property that can be set. This protocol is used to inject the DaVinci instance into Collectors that need it.

    See more

    Declaration

    Swift

    public protocol DaVinciAware
  • Protocol representing a collector. Inherits from Sendable, Collector, Validator.

    • property id: The collector id.
    • function anyPayload: The payload of the collector as Any
    • function initialize: Initializes the collector with the given value.
    See more

    Declaration

    Swift

    public protocol AnyFieldCollector : Collector, Validator
  • A protocol representing a self submittable [Collector].

    See more

    Declaration

    Swift

    public protocol Submittable
  • A protocol for validating objects. This protocol defines a method to validate an object and return an array of validation errors. The validate method should be implemented by conforming types to perform the validation logic.

    See more

    Declaration

    Swift

    public protocol Validator