ENUM
HaapiModel.StepFactory
Contents
- Methods
authenticatorOption(title:type:action:)authenticatorSelector(title:authenticators:metadata:actions:messages:links:properties:rawJsonString:)interactiveForm(actions:type:metadata:messages:links:properties:rawJsonString:)redirection(redirectAction:metadata:actions:properties:rawJsonString:)polling(mainAction:cancelAction:metadata:actions:messages:links:properties:rawJsonString:)oAuthAuthorization(metadata:messages:links:properties:rawJsonString:)continueSame(metadata:messages:properties:rawJsonString:)userConsent(metadata:actions:messages:links:properties:rawJsonString:)externalBrowserClientOperation(actionModel:metadata:type:actions:properties:rawJsonString:)bankIdClientOperation(activationLink:actionModel:metadata:type:actions:messages:links:properties:rawJsonString:)encapClientOperation(actionModel:metadata:type:actions:messages:links:properties:rawJsonString:)webauthnRegistrationClientOperation(actionModel:metadata:type:actions:messages:links:properties:rawJsonString:)webAuthnAuthenticationClientOperation(actionModel:metadata:type:actions:messages:links:properties:rawJsonString:)genericClientOperation(actionModel:metadata:type:actions:messages:links:properties:rawJsonString:)genericRepresentation(type:metadata:actions:messages:links:properties:rawJsonString:)
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:rawJsonString:)
public static func authenticatorSelector(// swiftlint:disable:this function_parameter_count
title: Message,
authenticators: [AuthenticatorSelectorStep.AuthenticatorOption],
metadata: Metadata?,
actions: [any Action],
messages: [UserMessage],
links: [Link],
properties: GenericProperties?,
rawJsonString: String? = nil
) -> 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.
- rawJsonString: A string representation of the raw model content. Default value is nil.
- 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. |
| rawJsonString | A string representation of the raw model content. Default value is nil. |
interactiveForm(actions:type:metadata:messages:links:properties:rawJsonString:)
public static func interactiveForm(
actions: [FormAction],
type: RepresentationType,
metadata: Metadata?,
messages: [UserMessage],
links: [Link],
properties: GenericProperties?,
rawJsonString: String? = nil
) -> 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.
- rawJsonString: A string representation of the raw model content. Default value is nil.
- 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. |
| rawJsonString | A string representation of the raw model content. Default value is nil. |
redirection(redirectAction:metadata:actions:properties:rawJsonString:)
public static func redirection(
redirectAction: FormAction,
metadata: Metadata?,
actions: [any Action],
properties: GenericProperties?,
rawJsonString: String? = nil
) -> 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.
- rawJsonString: A string representation of the raw model content. Default value is nil.
- 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. |
| rawJsonString | A string representation of the raw model content. Default value is nil. |
polling(mainAction:cancelAction:metadata:actions:messages:links:properties:rawJsonString:)
public static func polling( // swiftlint:disable:this function_parameter_count
mainAction: FormAction,
cancelAction: FormAction?,
metadata: Metadata?,
actions: [any Action],
messages: [UserMessage],
links: [Link],
properties: PollingProperties,
rawJsonString: String? = nil
) -> 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. - rawJsonString: A string representation of the raw model content. Default value is nil.
- 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. |
| rawJsonString | A string representation of the raw model content. Default value is nil. |
oAuthAuthorization(metadata:messages:links:properties:rawJsonString:)
public static func oAuthAuthorization(
metadata: Metadata?,
messages: [UserMessage],
links: [Link],
properties: OAuthAuthorizationResponseProperties,
rawJsonString: String? = nil
) -> OAuthAuthorizationResponseStep
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. - rawJsonString: A string representation of the raw model content. Default value is nil.
- 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. |
| rawJsonString | A string representation of the raw model content. Default value is nil. |
continueSame(metadata:messages:properties:rawJsonString:)
public static func continueSame(
metadata: Metadata?,
messages: [UserMessage],
properties: GenericProperties?,
rawJsonString: String? = nil
) -> 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.
- rawJsonString: A string representation of the raw model content. Default value is nil.
- 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. |
| rawJsonString | A string representation of the raw model content. Default value is nil. |
userConsent(metadata:actions:messages:links:properties:rawJsonString:)
public static func userConsent(
metadata: Metadata?,
actions: [any Action],
messages: [UserMessage],
links: [Link],
properties: GenericProperties?,
rawJsonString: String? = nil
) -> 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.
- rawJsonString: A string representation of the raw model content. Default value is nil.
- 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. |
| rawJsonString | A string representation of the raw model content. Default value is nil. |
externalBrowserClientOperation(actionModel:metadata:type:actions:properties:rawJsonString:)
public static func externalBrowserClientOperation(
actionModel: ExternalBrowserClientOperationActionModel,
metadata: Metadata?,
type: RepresentationType,
actions: [any Action],
properties: GenericProperties?,
rawJsonString: String? = nil
) -> ExternalBrowserClientOperationStep
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.
- rawJsonString: A string representation of the raw model content. Default value is nil.
- 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. |
| rawJsonString | A string representation of the raw model content. Default value is nil. |
bankIdClientOperation(activationLink:actionModel:metadata:type:actions:messages:links:properties:rawJsonString:)
public static func bankIdClientOperation( // swiftlint:disable:this function_parameter_count
activationLink: Link?,
actionModel: BankIdClientOperationActionModel,
metadata: Metadata?,
type: RepresentationType,
actions: [any Action],
messages: [UserMessage],
links: [Link],
properties: GenericProperties?,
rawJsonString: String? = nil
) -> 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.
- rawJsonString: A string representation of the raw model content. Default value is nil.
-
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. |
| rawJsonString | A string representation of the raw model content. Default value is nil. |
encapClientOperation(actionModel:metadata:type:actions:messages:links:properties:rawJsonString:)
public static func encapClientOperation( // swiftlint:disable:this function_parameter_count
actionModel: EncapAutoActivationClientOperationActionModel,
metadata: Metadata?,
type: RepresentationType,
actions: [any Action],
messages: [UserMessage],
links: [Link],
properties: GenericProperties?,
rawJsonString: String? = nil
) -> 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.
- rawJsonString: A string representation of the raw model content. Default value is nil.
- 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. |
| rawJsonString | A string representation of the raw model content. Default value is nil. |
webauthnRegistrationClientOperation(actionModel:metadata:type:actions:messages:links:properties:rawJsonString:)
public static func webauthnRegistrationClientOperation( // swiftlint:disable:this function_parameter_count
actionModel: WebAuthnRegistrationClientOperationActionModel,
metadata: Metadata?,
type: RepresentationType,
actions: [any Action],
messages: [UserMessage],
links: [Link],
properties: GenericProperties?,
rawJsonString: String? = nil
) throws -> WebAuthnRegistrationClientOperationStep
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.
- rawJsonString: A string representation of the raw model content. Default value is nil.
- 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. |
| rawJsonString | A string representation of the raw model content. Default value is nil. |
webAuthnAuthenticationClientOperation(actionModel:metadata:type:actions:messages:links:properties:rawJsonString:)
public static func webAuthnAuthenticationClientOperation( // swiftlint:disable:this function_parameter_count
actionModel: WebAuthnAuthenticationClientOperationActionModel,
metadata: Metadata?,
type: RepresentationType,
actions: [any Action],
messages: [UserMessage],
links: [Link],
properties: GenericProperties?,
rawJsonString: String? = nil
) throws -> WebAuthnAuthenticationClientOperationStep
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.
- rawJsonString: A string representation of the raw model content. Default value is nil.
- 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. |
| rawJsonString | A string representation of the raw model content. Default value is nil. |
genericClientOperation(actionModel:metadata:type:actions:messages:links:properties:rawJsonString:)
public static func genericClientOperation( // swiftlint:disable:this function_parameter_count
actionModel: GenericClientOperationActionModel,
metadata: Metadata?,
type: RepresentationType,
actions: [any Action],
messages: [UserMessage],
links: [Link],
properties: GenericProperties?,
rawJsonString: String? = nil
) -> 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.
- rawJsonString: A string representation of the raw model content. Default value is nil.
- 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. |
| rawJsonString | A string representation of the raw model content. Default value is nil. |
genericRepresentation(type:metadata:actions:messages:links:properties:rawJsonString:)
public static func genericRepresentation(
type: RepresentationType,
metadata: Metadata?,
actions: [any Action],
messages: [UserMessage],
links: [Link],
properties: (any Properties)?,
rawJsonString: String? = nil
) -> 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.
- rawJsonString: A string representation of the raw model content. Default value is nil.
- 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. |
| rawJsonString | A string representation of the raw model content. Default value is nil. |