ENUM

HaapiModel.ActionModelFactory

Contents

enum ActionModelFactory

Provides functionality to build instances of RepresentationActionModel.

Methods

form(actionTitle:continueActions:errorActions:fields:type:method:href:)

public static func form(actionTitle: Message?, // swiftlint:disable:this function_parameter_count
                        continueActions: [Action],
                        errorActions: [Action],
                        fields: [FormField],
                        type: String?,
                        method: String,
                        href: String) -> FormActionModel

Creates an instance of FormActionModel model.

Parameters

Name Description
actionTitle The title for the action model.
continueActions An array of actions that can be used to move the flow forward.
errorActions An array of actions that can be used if an error happens.
fields An array of FormField that are relevant for the actions and continuing the flow.
type The media-type used to represent the form’s action content.
method The HTTP method for the action’s target.
href A string representing the target’s URI.

selector(options:)

public static func selector(options: [Action]) -> SelectorActionModel

Creates an instance of SelectorActionModel model.

Parameters

Name Description
options An array of actions that allows the user selecting one to proceed the flow.

clientOperation(arguments:name:continueActions:errorActions:)

public static func clientOperation(arguments: [String: Any],
                                   name: ClientOperationName,
                                   continueActions: [Action],
                                   errorActions: [Action]) -> ClientOperationActionModel

Creates an instance of ClientOperationActionModel model.

Parameters

Name Description
arguments The action’s arguments properties JSON representation.
name The action’s operation name identifier.
continueActions An array of actions that can be used to move the flow forward.
errorActions An array of actions that can be used if an error happens.

externalBrowserClientOperation(arguments:name:continueActions:errorActions:)

public static func externalBrowserClientOperation(arguments: [String: String],
                                                  name: ClientOperationName,
                                                  continueActions: [Action],
                                                  errorActions: [Action]) throws -> ExternalBrowserClientOperationActionModel // swiftlint:disable:this line_length

Creates an instance of ExternalBrowserClientOperationActionModel model.

Parameters

Name Description
arguments The action’s arguments properties JSON representation.
name The action’s operation name identifier.
continueActions An array of actions that can be used to move the flow forward.
errorActions An array of actions that can be used if an error happens.

bankIdClientOperation(arguments:name:continueActions:errorActions:)

public static func bankIdClientOperation(arguments: [String: String],
                                         name: ClientOperationName,
                                         continueActions: [Action],
                                         errorActions: [Action]) throws -> BankIdClientOperationActionModel

Creates an instance of BankIdClientOperationActionModel model.

Parameters

Name Description
arguments The action’s arguments properties JSON representation.
name The action’s operation name identifier.
continueActions An array of actions that can be used to move the flow forward.
errorActions An array of actions that can be used if an error happens.

encapClientOperation(arguments:name:continueActions:errorActions:)

public static func encapClientOperation(arguments: [String: String],
                                        name: ClientOperationName,
                                        continueActions: [Action],
                                        errorActions: [Action]) throws -> EncapAutoActivationClientOperationActionModel // swiftlint:disable:this line_length

Creates an instance of EncapAutoActivationClientOperationActionModel model.

Parameters

Name Description
arguments The action’s arguments properties JSON representation.
name The action’s operation name identifier.
continueActions An array of actions that can be used to move the flow forward.
errorActions An array of actions that can be used if an error happens.

webAuthnRegistrationClientOperation(arguments:name:continueActions:errorActions:)

public static func webAuthnRegistrationClientOperation(arguments: [String: Any],
                                                       name: ClientOperationName,
                                                       continueActions: [Action],
                                                       errorActions: [Action]) throws -> WebAuthnRegistrationClientOperationActionModel // swiftlint:disable:this line_length

Creates an instance of WebAuthnRegistrationClientOperationActionModel model.

Parameters

Name Description
arguments The action’s arguments properties JSON representation. It must model the WebAuthn Registration credential model.
name The action’s operation name identifier.
continueActions An array of actions that can be used to move the flow forward.
errorActions An array of actions that can be used if an error happens.

webauthnAuthenticationClientOperation(arguments:name:continueActions:errorActions:)

public static func webauthnAuthenticationClientOperation(arguments: [String: Any],
                                                         name: ClientOperationName,
                                                         continueActions: [Action],
                                                         errorActions: [Action]) throws -> WebAuthnAuthenticationClientOperationActionModel // swiftlint:disable:this line_length

Creates an instance of WebAuthnAuthenticationClientOperationActionModel model.

Parameters

Name Description
arguments The action’s arguments properties JSON representation. It must model the WebAuthn Authentication credential model.
name The action’s operation name identifier.
continueActions An array of actions that can be used to move the flow forward.
errorActions An array of actions that can be used if an error happens.

genericClientOperation(arguments:name:continueActions:errorActions:)

public static func genericClientOperation(arguments: [String: Any],
                                          name: ClientOperationName,
                                          continueActions: [Action],
                                          errorActions: [Action]) -> GenericClientOperationActionModel

Creates an instance of GenericClientOperationActionModel model.

Parameters

Name Description
arguments The action’s arguments properties JSON representation.
name The action’s operation name identifier.
continueActions An array of actions that can be used to move the flow forward.
errorActions An array of actions that can be used if an error happens.

link(href:rel:title:type:)

public static func link(href: String, rel: String, title: Message?, type: String?) -> Link

Creates an instance of Link model.

Parameters

Name Description
href A string representing the target’s URI.
rel The value for the link relation.
title The title of the link.
type A hint for the link media-type.