UserInterface

final class UserInterface : Sendable

UI.

  • Create and returns a View that handles capturing a document.

    Declaration

    Swift

    @MainActor
    public func createCaptureDocumentView(
        cameraToken: String,
        cameraConfig: ALCameraConfiguration,
        overlay: (any View)? = nil,
        onCompletion: @escaping @Sendable (ALCameraResult) -> Void
    ) -> some View

    Parameters

    cameraToken

    The token to authenticate the Camera SDK.

    cameraConfig

    Camera configuration.

    overlay

    Custom overlay view.

    onCompletion

    Completion handler.

    Return Value

    A View instance.

  • Create and returns a View that handles uploading a dossier.

    Declaration

    Swift

    @MainActor
    public func createDossierUploadView(
        token: String,
        cameraToken: String,
        cameraConfigs: [(DocumentType, ALCameraConfiguration)],
        data: AccountDossierUploadRequest,
        overlay: (any View)? = nil,
        loading: (any View)? = nil,
        failure: (any View)? = nil,
        onCompletion: @escaping @Sendable (Result<AccountDossier, ALCameraError>) -> Void
    ) -> some View

    Parameters

    token

    The token to authenticate the SDK.

    cameraToken

    The token to authenticate the Camera SDK.

    cameraConfigs

    Camera configurations.

    data

    The data needed for the request.

    overlay

    Custom overlay view.

    loading

    Custom loading view.

    failure

    Custom failure view.

    onCompletion

    Completion handler.

    Return Value

    A View instance.

  • Create and returns a View that handles uploading a dossier.

    Declaration

    Swift

    @MainActor
    public func createDossierUploadView(
        token: String,
        cameraToken: String,
        documentTypes: [DocumentType],
        data: AccountDossierUploadRequest,
        overlay: (any View)? = nil,
        loading: (any View)? = nil,
        failure: (any View)? = nil,
        onCompletion: @escaping @Sendable (Result<AccountDossier, ALCameraError>) -> Void
    ) -> some View

    Parameters

    token

    The token to authenticate the SDK.

    cameraToken

    The token to authenticate the Camera SDK.

    documentTypes

    The document types to capture.

    data

    The data needed for the request.

    overlay

    Custom overlay view.

    loading

    Custom loading view.

    failure

    Custom failure view.

    onCompletion

    Completion handler.

    Return Value

    A View instance.