STRUCT
PollingStep
Contents
- Properties
mainActioncancelActionmetadataactionsmessageslinkspollingPropertiestypeproperties
public struct PollingStep: HaapiRepresentation
A step that requires a client to poll while an operation is completed out-of-band.
The client may use a polling interval of its choosing, usually a few seconds. While polling, the client should display any links or messages provided in the response from the server, as well as a visual indicator to make it clear that it is waiting for some external action to be completed.
The status of the polling can be obtained via the pollingProperties. The mainAction always allows the client to progress:
if the polling is pending, the action polls again; otherwise, it continues the flow.
Properties
mainAction
public let mainAction: FormAction
The action to poll or to move forward in the flow.
cancelAction
public let cancelAction: FormAction?
An action to cancel the ongoing operation, when supported. Only applicable if the polling is pending.
metadata
public let metadata: Metadata?
actions
public let actions: [Action]
Possible actions a user or the client may choose to take to continue the flow.
messages
public let messages: [UserMessage]
links
public let links: [Link]
pollingProperties
public let pollingProperties: PollingProperties
The polling properties.
type
public let type: RepresentationType = .pollingStep
properties
public var properties: Properties?
The properties of the polling step.