ENUM
HaapiModel.StepFactory
Contents
- Methods
authenticatorOption(title:type:action:)authenticatorSelector(title:authenticators:metadata:actions:messages:links:properties:)interactiveForm(actions:type:metadata:messages:links:properties:)redirection(redirectAction:metadata:actions:properties:)polling(mainAction:cancelAction:metadata:actions:messages:links:properties:)oAuthAuthorization(metadata:messages:links:properties:)continueSame(metadata:messages:properties:)userConsent(metadata:actions:messages:links:properties:)externalBrowserClientOperation(actionModel:metadata:type:actions:properties:)bankIdClientOperation(activationLink:actionModel:metadata:type:actions:messages:links:properties:)encapClientOperation(actionModel:metadata:type:actions:messages:links:properties:)webauthnRegistrationClientOperation(actionModel:metadata:type:actions:messages:links:properties:)webAuthnAuthenticationClientOperation(actionModel:metadata:type:actions:messages:links:properties:)genericClientOperation(actionModel:metadata:type:actions:messages:links:properties:)genericRepresentation(type:metadata:actions:messages:links:properties:)
enum StepFactory
Provides functionality to build instances of Step HaapiRepresentation.
Methods
authenticatorOption(title:type:action:)
public static func authenticatorOption(title: Message,
type: String?,
action: FormAction) -> AuthenticatorSelectorStep.AuthenticatorOption
Creates an instance of AuthenticatorSelectorStep.AuthenticatorOption model.
-
Parameters:
- title: The title of the represented
AuthenticatorOption. - type: The type of the authenticator.
- action: The
FormActionto be used to select the current option.
- title: The title of the represented
-
Returns: A built instance of
AuthenticatorSelectorStep.AuthenticatorOption.
Parameters
| Name | Description |
|---|---|
| title | The title of the represented AuthenticatorOption. |
| type | The type of the authenticator. |
| action | The FormAction to be used to select the current option. |
authenticatorSelector(title:authenticators:metadata:actions:messages:links:properties:)
public static func authenticatorSelector(title: Message, // swiftlint:disable:this function_parameter_count
authenticators: [AuthenticatorSelectorStep.AuthenticatorOption],
metadata: Metadata?,
actions: [Action],
messages: [UserMessage],
links: [Link],
properties: GenericProperties?) -> AuthenticatorSelectorStep
Creates an instance of AuthenticatorSelectorStep model.
-
Parameters:
- title: The title of the represented
Step. - authenticators: An array of
AuthenticatorOptioninstances to choose from. - metadata: Additional information about the
Step. - actions: An array of actions that can be used to move the flow forward.
- messages: An array of messages to be displayed to the user.
- links: An array of
Linkinstances that can be used to choose an alternate path for the flow. - properties: The additional properties JSON representation.
- title: The title of the represented
-
Returns: A built instance of
AuthenticatorSelectorStep.
Parameters
| Name | Description |
|---|---|
| title | The title of the represented Step. |
| authenticators | An array of AuthenticatorOption instances to choose from. |
| metadata | Additional information about the Step. |
| actions | An array of actions that can be used to move the flow forward. |
| messages | An array of messages to be displayed to the user. |
| links | An array of Link instances that can be used to choose an alternate path for the flow. |
| properties | The additional properties JSON representation. |
interactiveForm(actions:type:metadata:messages:links:properties:)
public static func interactiveForm(actions: [FormAction],
type: RepresentationType,
metadata: Metadata?,
messages: [UserMessage],
links: [Link],
properties: GenericProperties?) -> InteractiveFormStep
Creates an instance of InteractiveFormStep model.
-
Parameters:
- actions: An array of
FormActioninstances that can be used to move the flow forward. - type: The type of the modelled
Step. - metadata: Additional information about the
Step. - messages: An array of messages to be displayed to the user.
- links: An array of
Linkinstances that can be used to choose an alternate path for the flow. - properties: The additional properties JSON representation.
- actions: An array of
-
Returns: A built instance of
InteractiveFormStep.
Parameters
| Name | Description |
|---|---|
| actions | An array of FormAction instances that can be used to move the flow forward. |
| type | The type of the modelled Step. |
| metadata | Additional information about the Step. |
| messages | An array of messages to be displayed to the user. |
| links | An array of Link instances that can be used to choose an alternate path for the flow. |
| properties | The additional properties JSON representation. |
redirection(redirectAction:metadata:actions:properties:)
public static func redirection(redirectAction: FormAction,
metadata: Metadata?,
actions: [Action],
properties: GenericProperties?) -> RedirectionStep
Creates an instance of RedirectionStep model.
-
Parameters:
- redirectAction: The
FormActionthat maps theredirectaction kind. - actions: An array of actions that can be used to move the flow forward.
- metadata: Additional information about the
Step. - properties: The additional properties JSON representation.
- redirectAction: The
-
Returns: A built instance of
RedirectionStep.
Parameters
| Name | Description |
|---|---|
| redirectAction | The FormAction that maps the redirect action kind. |
| actions | An array of actions that can be used to move the flow forward. |
| metadata | Additional information about the Step. |
| properties | The additional properties JSON representation. |
polling(mainAction:cancelAction:metadata:actions:messages:links:properties:)
public static func polling(mainAction: FormAction, // swiftlint:disable:this function_parameter_count
cancelAction: FormAction?,
metadata: Metadata?,
actions: [Action],
messages: [UserMessage],
links: [Link],
properties: PollingProperties) -> PollingStep
Creates an instance of PollingStep model.
-
Parameters:
- mainAction: The
FormActionthat maps thepollaction kind. - cancelAction: The
FormActionthat maps thecancelaction kind. - metadata: Additional information about the
Step. - actions: An array of actions that can be used to move the flow forward.
- messages: An array of messages to be displayed to the user.
- links: An array of
Linkinstances that can be used to choose an alternate path for the flow. - properties: The additional
PollingPropertiesJSON representation.
- mainAction: The
-
Returns: A built instance of
RedirectionStep.
Parameters
| Name | Description |
|---|---|
| mainAction | The FormAction that maps the poll action kind. |
| cancelAction | The FormAction that maps the cancel action kind. |
| metadata | Additional information about the Step. |
| actions | An array of actions that can be used to move the flow forward. |
| messages | An array of messages to be displayed to the user. |
| links | An array of Link instances that can be used to choose an alternate path for the flow. |
| properties | The additional PollingProperties JSON representation. |
oAuthAuthorization(metadata:messages:links:properties:)
public static func oAuthAuthorization(metadata: Metadata?,
messages: [UserMessage],
links: [Link],
properties: OAuthAuthorizationResponseProperties) -> OAuthAuthorizationResponseStep // swiftlint:disable:this line_length
Creates an instance of OAuthAuthorizationResponseStep model.
-
Parameters:
- metadata: Additional information about the
Step. - messages: An array of messages to be displayed to the user.
- links: An array of
Linkinstances that can be used to choose an alternate path for the flow. - properties: The additional
OAuthAuthorizationResponsePropertiesJSON representation.
- metadata: Additional information about the
-
Returns: A built instance of
OAuthAuthorizationResponseStep.
Parameters
| Name | Description |
|---|---|
| metadata | Additional information about the Step. |
| messages | An array of messages to be displayed to the user. |
| links | An array of Link instances that can be used to choose an alternate path for the flow. |
| properties | The additional OAuthAuthorizationResponseProperties JSON representation. |
continueSame(metadata:messages:properties:)
public static func continueSame(metadata: Metadata?,
messages: [UserMessage],
properties: GenericProperties?) -> ContinueSameStep
Creates an instance of ContinueSameStep model.
-
Parameters:
- metadata: Additional information about the
Step. - messages: An array of messages to be displayed to the user.
- properties: The additional properties JSON representation.
- metadata: Additional information about the
-
Returns: A built instance of
ContinueSameStep.
Parameters
| Name | Description |
|---|---|
| metadata | Additional information about the Step. |
| messages | An array of messages to be displayed to the user. |
| properties | The additional properties JSON representation. |
userConsent(metadata:actions:messages:links:properties:)
public static func userConsent(metadata: Metadata?,
actions: [Action],
messages: [UserMessage],
links: [Link],
properties: GenericProperties?) -> UserConsentStep
Creates an instance of UserConsentStep model.
-
Parameters:
- metadata: Additional information about the
Step. - actions: An array of actions that can be used to move the flow forward.
- messages: An array of messages to be displayed to the user.
- links: An array of
Linkinstances that can be used to choose an alternate path for the flow. - properties: The additional properties JSON representation.
- metadata: Additional information about the
-
Returns: A built instance of
UserConsentStep.
Parameters
| Name | Description |
|---|---|
| metadata | Additional information about the Step. |
| actions | An array of actions that can be used to move the flow forward. |
| messages | An array of messages to be displayed to the user. |
| links | An array of Link instances that can be used to choose an alternate path for the flow. |
| properties | The additional properties JSON representation. |
externalBrowserClientOperation(actionModel:metadata:type:actions:properties:)
public static func externalBrowserClientOperation(actionModel: ExternalBrowserClientOperationActionModel,
metadata: Metadata?,
type: RepresentationType,
actions: [Action],
properties: GenericProperties?) -> ExternalBrowserClientOperationStep // swiftlint:disable:this line_length
Creates an instance of ExternalBrowserClientOperationStep model.
-
Parameters:
- actionModel: The
ExternalBrowserClientOperationActionModelmodel instance. - metadata: Additional information about the
Step. - type: The
RepresentatioTypevalue for the step. - actions: An array of actions that can be used to move the flow forward.
- properties: The additional properties JSON representation.
- actionModel: The
-
Returns: A built instance of
ExternalBrowserClientOperationStep.
Parameters
| Name | Description |
|---|---|
| actionModel | The ExternalBrowserClientOperationActionModel model instance. |
| metadata | Additional information about the Step. |
| type | The RepresentatioType value for the step. |
| actions | An array of actions that can be used to move the flow forward. |
| properties | The additional properties JSON representation. |
bankIdClientOperation(activationLink:actionModel:metadata:type:actions:messages:links:properties:)
public static func bankIdClientOperation(activationLink: Link?, // swiftlint:disable:this function_parameter_count line_length
actionModel: BankIdClientOperationActionModel,
metadata: Metadata?,
type: RepresentationType,
actions: [Action],
messages: [UserMessage],
links: [Link],
properties: GenericProperties?) -> BankIdClientOperationStep
Creates an instance of BankIdClientOperationStep model.
-
Parameters:
- activationLink: The activation link for BakId. It represents a QRCode image.
- actionModel: The
BankIdClientOperationActionModelmodel instance. - metadata: Additional information about the
Step. - type: The
RepresentatioTypevalue for the step. - actions: An array of actions that can be used to move the flow forward.
- messages: An array of messages to be displayed to the user.
- links: An array of
Linkinstances that can be used to choose an alternate path for the flow. - properties: The additional properties JSON representation.
-
Returns: A built instance of
BankIdClientOperationStep.
Parameters
| Name | Description |
|---|---|
| activationLink | The activation link for BakId. It represents a QRCode image. |
| actionModel | The BankIdClientOperationActionModel model instance. |
| metadata | Additional information about the Step. |
| type | The RepresentatioType value for the step. |
| actions | An array of actions that can be used to move the flow forward. |
| messages | An array of messages to be displayed to the user. |
| links | An array of Link instances that can be used to choose an alternate path for the flow. |
| properties | The additional properties JSON representation. |
encapClientOperation(actionModel:metadata:type:actions:messages:links:properties:)
public static func encapClientOperation(actionModel: EncapAutoActivationClientOperationActionModel, // swiftlint:disable:this function_parameter_count line_length
metadata: Metadata?,
type: RepresentationType,
actions: [Action],
messages: [UserMessage],
links: [Link],
properties: GenericProperties?) -> EncapClientOperationStep
Creates an instance of EncapClientOperationStep model.
-
Parameters:
- actionModel: The
EncapAutoActivationClientOperationActionModelmodel instance. - metadata: Additional information about the
Step. - type: The
RepresentatioTypevalue for the step. - actions: An array of actions that can be used to move the flow forward.
- messages: An array of messages to be displayed to the user.
- links: An array of
Linkinstances that can be used to choose an alternate path for the flow. - properties: The additional properties JSON representation.
- actionModel: The
-
Returns: A built instance of
EncapClientOperationStep.
Parameters
| Name | Description |
|---|---|
| actionModel | The EncapAutoActivationClientOperationActionModel model instance. |
| metadata | Additional information about the Step. |
| type | The RepresentatioType value for the step. |
| actions | An array of actions that can be used to move the flow forward. |
| messages | An array of messages to be displayed to the user. |
| links | An array of Link instances that can be used to choose an alternate path for the flow. |
| properties | The additional properties JSON representation. |
webauthnRegistrationClientOperation(actionModel:metadata:type:actions:messages:links:properties:)
public static func webauthnRegistrationClientOperation(actionModel: WebAuthnRegistrationClientOperationActionModel, // swiftlint:disable:this function_parameter_count line_length
metadata: Metadata?,
type: RepresentationType,
actions: [Action],
messages: [UserMessage],
links: [Link],
properties: GenericProperties?) throws -> WebAuthnRegistrationClientOperationStep // swiftlint:disable:this line_length
Creates an instance of WebAuthnRegistrationClientOperationStep model.
-
Parameters:
- actionModel: The
WebAuthnRegistrationClientOperationActionModelmodel instance. - metadata: Additional information about the
Step. - type: The
RepresentatioTypevalue for the step. - actions: An array of actions that can be used to move the flow forward.
- messages: An array of messages to be displayed to the user.
- links: An array of
Linkinstances that can be used to choose an alternate path for the flow. - properties: The additional properties JSON representation.
- actionModel: The
-
Returns: A built instance of
WebAuthnRegistrationClientOperationStep. -
Throws:
HaapiSdkError.invalidModelif any error occurs when parsing required model data.
Parameters
| Name | Description |
|---|---|
| actionModel | The WebAuthnRegistrationClientOperationActionModel model instance. |
| metadata | Additional information about the Step. |
| type | The RepresentatioType value for the step. |
| actions | An array of actions that can be used to move the flow forward. |
| messages | An array of messages to be displayed to the user. |
| links | An array of Link instances that can be used to choose an alternate path for the flow. |
| properties | The additional properties JSON representation. |
webAuthnAuthenticationClientOperation(actionModel:metadata:type:actions:messages:links:properties:)
public static func webAuthnAuthenticationClientOperation(actionModel: WebAuthnAuthenticationClientOperationActionModel, // swiftlint:disable:this function_parameter_count line_length
metadata: Metadata?,
type: RepresentationType,
actions: [Action],
messages: [UserMessage],
links: [Link],
properties: GenericProperties?) throws -> WebAuthnAuthenticationClientOperationStep // swiftlint:disable:this line_length
Creates an instance of WebAuthnAuthenticationClientOperationStep model.
-
Parameters:
- actionModel: The
WebAuthnAuthenticationClientOperationActionModelmodel instance. - metadata: Additional information about the
Step. - type: The
RepresentatioTypevalue for the step. - actions: An array of actions that can be used to move the flow forward.
- messages: An array of messages to be displayed to the user.
- links: An array of
Linkinstances that can be used to choose an alternate path for the flow. - properties: The additional properties JSON representation.
- actionModel: The
-
Returns: A built instance of
WebAuthnAuthenticationClientOperationStep. -
Throws:
HaapiSdkError.invalidModelif any error occurs when parsing required model data.
Parameters
| Name | Description |
|---|---|
| actionModel | The WebAuthnAuthenticationClientOperationActionModel model instance. |
| metadata | Additional information about the Step. |
| type | The RepresentatioType value for the step. |
| actions | An array of actions that can be used to move the flow forward. |
| messages | An array of messages to be displayed to the user. |
| links | An array of Link instances that can be used to choose an alternate path for the flow. |
| properties | The additional properties JSON representation. |
genericClientOperation(actionModel:metadata:type:actions:messages:links:properties:)
public static func genericClientOperation(actionModel: GenericClientOperationActionModel, // swiftlint:disable:this function_parameter_count line_length
metadata: Metadata?,
type: RepresentationType,
actions: [Action],
messages: [UserMessage],
links: [Link],
properties: GenericProperties?) -> GenericClientOperationStep
Creates an instance of GenericClientOperationStep model.
-
Parameters:
- actionModel: The
GenericClientOperationActionModelmodel instance. - metadata: Additional information about the
Step. - type: The
RepresentatioTypevalue for the step. - actions: An array of actions that can be used to move the flow forward.
- messages: An array of messages to be displayed to the user.
- links: An array of
Linkinstances that can be used to choose an alternate path for the flow. - properties: The additional properties JSON representation.
- actionModel: The
-
Returns: A built instance of
GenericClientOperationStep.
Parameters
| Name | Description |
|---|---|
| actionModel | The GenericClientOperationActionModel model instance. |
| metadata | Additional information about the Step. |
| type | The RepresentatioType value for the step. |
| actions | An array of actions that can be used to move the flow forward. |
| messages | An array of messages to be displayed to the user. |
| links | An array of Link instances that can be used to choose an alternate path for the flow. |
| properties | The additional properties JSON representation. |
genericRepresentation(type:metadata:actions:messages:links:properties:)
public static func genericRepresentation(type: RepresentationType,
metadata: Metadata?,
actions: [Action],
messages: [UserMessage],
links: [Link],
properties: Properties?) -> GenericRepresentationStep
Creates an instance of GenericRepresentationStep model.
-
Parameters:
- type: The
RepresentatioTypevalue for the step. - metadata: Additional information about the
Step. - actions: An array of actions that can be used to move the flow forward.
- messages: An array of messages to be displayed to the user.
- links: An array of
Linkinstances that can be used to choose an alternate path for the flow. - properties: The additional properties JSON representation.
- type: The
-
Returns: A built instance of
GenericRepresentationStep.
Parameters
| Name | Description |
|---|---|
| type | The RepresentatioType value for the step. |
| metadata | Additional information about the Step. |
| actions | An array of actions that can be used to move the flow forward. |
| messages | An array of messages to be displayed to the user. |
| links | An array of Link instances that can be used to choose an alternate path for the flow. |
| properties | The additional properties JSON representation. |