Protocols

The following protocols are available globally.

  • Base protocol for Journey callbacks used as actions in a Journey step.

    Conforms to Action, Identifiable, and Sendable. Each callback must be default-initializable and able to initialize itself from a JSON dictionary. The payload() method returns a serializable representation of the callback to send back to the server.

    See more

    Declaration

    Swift

    public protocol Callback : Action, Identifiable
  • Marker protocol indicating a callback is metadata-only and should not be included in submission payloads.

    Declaration

    Swift

    public protocol MetadataCallbackProtocol
  • Protocol for hidden value callbacks that carry an ID and a value to be returned.

    Conforming callbacks expose a hidden identifier, a value to submit, and a convenience setter.

    See more

    Declaration

    Swift

    public protocol ValueCallbackProtocol
  • A protocol that defines a type for JourneyAware. Exposes the journey property that can be set. This protocol is used to inject the Journey instance into Callbacks that need it.

    See more

    Declaration

    Swift

    public protocol JourneyAware