@smileid/usesmileid 12.0.0-beta01
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/LICENSE +21 -0
- package/README.md +130 -0
- package/dist/camera/camera_configuration.d.ts +31 -0
- package/dist/camera/camera_configuration.d.ts.map +1 -0
- package/dist/camera/camera_configuration.js +2 -0
- package/dist/camera/camera_configuration.js.map +1 -0
- package/dist/camera/camera_defaults.d.ts +25 -0
- package/dist/camera/camera_defaults.d.ts.map +1 -0
- package/dist/camera/camera_defaults.js +22 -0
- package/dist/camera/camera_defaults.js.map +1 -0
- package/dist/camera/camera_lens.d.ts +13 -0
- package/dist/camera/camera_lens.d.ts.map +1 -0
- package/dist/camera/camera_lens.js +12 -0
- package/dist/camera/camera_lens.js.map +1 -0
- package/dist/camera/camera_permissions.d.ts +18 -0
- package/dist/camera/camera_permissions.d.ts.map +1 -0
- package/dist/camera/camera_permissions.js +23 -0
- package/dist/camera/camera_permissions.js.map +1 -0
- package/dist/camera/camera_preview_image.d.ts +18 -0
- package/dist/camera/camera_preview_image.d.ts.map +1 -0
- package/dist/camera/camera_preview_image.js +8 -0
- package/dist/camera/camera_preview_image.js.map +1 -0
- package/dist/camera/document_image_pipeline.d.ts +24 -0
- package/dist/camera/document_image_pipeline.d.ts.map +1 -0
- package/dist/camera/document_image_pipeline.js +70 -0
- package/dist/camera/document_image_pipeline.js.map +1 -0
- package/dist/camera/document_resize_target.d.ts +13 -0
- package/dist/camera/document_resize_target.d.ts.map +1 -0
- package/dist/camera/document_resize_target.js +17 -0
- package/dist/camera/document_resize_target.js.map +1 -0
- package/dist/camera/focus_state.d.ts +31 -0
- package/dist/camera/focus_state.d.ts.map +1 -0
- package/dist/camera/focus_state.js +13 -0
- package/dist/camera/focus_state.js.map +1 -0
- package/dist/camera/frame_processor_plugin.d.ts +28 -0
- package/dist/camera/frame_processor_plugin.d.ts.map +1 -0
- package/dist/camera/frame_processor_plugin.js +21 -0
- package/dist/camera/frame_processor_plugin.js.map +1 -0
- package/dist/camera/orientation_degrees.d.ts +11 -0
- package/dist/camera/orientation_degrees.d.ts.map +1 -0
- package/dist/camera/orientation_degrees.js +21 -0
- package/dist/camera/orientation_degrees.js.map +1 -0
- package/dist/camera/use_smile_id_camera_preview.d.ts +64 -0
- package/dist/camera/use_smile_id_camera_preview.d.ts.map +1 -0
- package/dist/camera/use_smile_id_camera_preview.js +141 -0
- package/dist/camera/use_smile_id_camera_preview.js.map +1 -0
- package/dist/camera/use_smile_id_camera_system.d.ts +97 -0
- package/dist/camera/use_smile_id_camera_system.d.ts.map +1 -0
- package/dist/camera/use_smile_id_camera_system.js +185 -0
- package/dist/camera/use_smile_id_camera_system.js.map +1 -0
- package/dist/camera/use_smile_id_frame_processor.d.ts +38 -0
- package/dist/camera/use_smile_id_frame_processor.d.ts.map +1 -0
- package/dist/camera/use_smile_id_frame_processor.js +2 -0
- package/dist/camera/use_smile_id_frame_processor.js.map +1 -0
- package/dist/camera/use_smile_id_frame_stream.d.ts +70 -0
- package/dist/camera/use_smile_id_frame_stream.d.ts.map +1 -0
- package/dist/camera/use_smile_id_frame_stream.js +93 -0
- package/dist/camera/use_smile_id_frame_stream.js.map +1 -0
- package/dist/core/exception/builder_validation_exception.d.ts +29 -0
- package/dist/core/exception/builder_validation_exception.d.ts.map +1 -0
- package/dist/core/exception/builder_validation_exception.js +37 -0
- package/dist/core/exception/builder_validation_exception.js.map +1 -0
- package/dist/core/exception/capture_validation_exceptions.d.ts +9 -0
- package/dist/core/exception/capture_validation_exceptions.d.ts.map +1 -0
- package/dist/core/exception/capture_validation_exceptions.js +9 -0
- package/dist/core/exception/capture_validation_exceptions.js.map +1 -0
- package/dist/core/exception/consent_validation_exceptions.d.ts +8 -0
- package/dist/core/exception/consent_validation_exceptions.d.ts.map +1 -0
- package/dist/core/exception/consent_validation_exceptions.js +8 -0
- package/dist/core/exception/consent_validation_exceptions.js.map +1 -0
- package/dist/core/exception/duplicate_screen_type_exception.d.ts +13 -0
- package/dist/core/exception/duplicate_screen_type_exception.d.ts.map +1 -0
- package/dist/core/exception/duplicate_screen_type_exception.js +20 -0
- package/dist/core/exception/duplicate_screen_type_exception.js.map +1 -0
- package/dist/core/exception/empty_screens_block_exception.d.ts +11 -0
- package/dist/core/exception/empty_screens_block_exception.d.ts.map +1 -0
- package/dist/core/exception/empty_screens_block_exception.js +17 -0
- package/dist/core/exception/empty_screens_block_exception.js.map +1 -0
- package/dist/core/exception/flow_exceptions.d.ts +27 -0
- package/dist/core/exception/flow_exceptions.d.ts.map +1 -0
- package/dist/core/exception/flow_exceptions.js +37 -0
- package/dist/core/exception/flow_exceptions.js.map +1 -0
- package/dist/core/exception/index.d.ts +41 -0
- package/dist/core/exception/index.d.ts.map +1 -0
- package/dist/core/exception/index.js +53 -0
- package/dist/core/exception/index.js.map +1 -0
- package/dist/core/exception/invalid_consent_config_exception.d.ts +13 -0
- package/dist/core/exception/invalid_consent_config_exception.d.ts.map +1 -0
- package/dist/core/exception/invalid_consent_config_exception.js +18 -0
- package/dist/core/exception/invalid_consent_config_exception.js.map +1 -0
- package/dist/core/exception/invalid_consent_information_exception.d.ts +14 -0
- package/dist/core/exception/invalid_consent_information_exception.d.ts.map +1 -0
- package/dist/core/exception/invalid_consent_information_exception.js +19 -0
- package/dist/core/exception/invalid_consent_information_exception.js.map +1 -0
- package/dist/core/exception/invalid_document_capture_config_exception.d.ts +14 -0
- package/dist/core/exception/invalid_document_capture_config_exception.d.ts.map +1 -0
- package/dist/core/exception/invalid_document_capture_config_exception.js +20 -0
- package/dist/core/exception/invalid_document_capture_config_exception.js.map +1 -0
- package/dist/core/exception/invalid_field_value_exception.d.ts +16 -0
- package/dist/core/exception/invalid_field_value_exception.d.ts.map +1 -0
- package/dist/core/exception/invalid_field_value_exception.js +20 -0
- package/dist/core/exception/invalid_field_value_exception.js.map +1 -0
- package/dist/core/exception/invalid_job_type_screen_config_exception.d.ts +36 -0
- package/dist/core/exception/invalid_job_type_screen_config_exception.d.ts.map +1 -0
- package/dist/core/exception/invalid_job_type_screen_config_exception.js +61 -0
- package/dist/core/exception/invalid_job_type_screen_config_exception.js.map +1 -0
- package/dist/core/exception/invalid_missing_capture_type_exception.d.ts +11 -0
- package/dist/core/exception/invalid_missing_capture_type_exception.d.ts.map +1 -0
- package/dist/core/exception/invalid_missing_capture_type_exception.js +17 -0
- package/dist/core/exception/invalid_missing_capture_type_exception.js.map +1 -0
- package/dist/core/exception/invalid_screen_order_exception.d.ts +17 -0
- package/dist/core/exception/invalid_screen_order_exception.d.ts.map +1 -0
- package/dist/core/exception/invalid_screen_order_exception.js +22 -0
- package/dist/core/exception/invalid_screen_order_exception.js.map +1 -0
- package/dist/core/exception/invalid_selfie_capture_config_exception.d.ts +14 -0
- package/dist/core/exception/invalid_selfie_capture_config_exception.d.ts.map +1 -0
- package/dist/core/exception/invalid_selfie_capture_config_exception.js +20 -0
- package/dist/core/exception/invalid_selfie_capture_config_exception.js.map +1 -0
- package/dist/core/exception/issue_severity.d.ts +14 -0
- package/dist/core/exception/issue_severity.d.ts.map +1 -0
- package/dist/core/exception/issue_severity.js +13 -0
- package/dist/core/exception/issue_severity.js.map +1 -0
- package/dist/core/exception/job_validation_exceptions.d.ts +12 -0
- package/dist/core/exception/job_validation_exceptions.d.ts.map +1 -0
- package/dist/core/exception/job_validation_exceptions.js +12 -0
- package/dist/core/exception/job_validation_exceptions.js.map +1 -0
- package/dist/core/exception/liveness_frame_count_exception.d.ts +15 -0
- package/dist/core/exception/liveness_frame_count_exception.d.ts.map +1 -0
- package/dist/core/exception/liveness_frame_count_exception.js +19 -0
- package/dist/core/exception/liveness_frame_count_exception.js.map +1 -0
- package/dist/core/exception/missing_capture_for_preview_exception.d.ts +14 -0
- package/dist/core/exception/missing_capture_for_preview_exception.d.ts.map +1 -0
- package/dist/core/exception/missing_capture_for_preview_exception.js +22 -0
- package/dist/core/exception/missing_capture_for_preview_exception.js.map +1 -0
- package/dist/core/exception/missing_job_type_exception.d.ts +11 -0
- package/dist/core/exception/missing_job_type_exception.d.ts.map +1 -0
- package/dist/core/exception/missing_job_type_exception.js +17 -0
- package/dist/core/exception/missing_job_type_exception.js.map +1 -0
- package/dist/core/exception/missing_ml_configuration_block_exception.d.ts +11 -0
- package/dist/core/exception/missing_ml_configuration_block_exception.d.ts.map +1 -0
- package/dist/core/exception/missing_ml_configuration_block_exception.js +19 -0
- package/dist/core/exception/missing_ml_configuration_block_exception.js.map +1 -0
- package/dist/core/exception/missing_network_configuration_block_exception.d.ts +11 -0
- package/dist/core/exception/missing_network_configuration_block_exception.d.ts.map +1 -0
- package/dist/core/exception/missing_network_configuration_block_exception.js +19 -0
- package/dist/core/exception/missing_network_configuration_block_exception.js.map +1 -0
- package/dist/core/exception/missing_partner_config_exception.d.ts +18 -0
- package/dist/core/exception/missing_partner_config_exception.d.ts.map +1 -0
- package/dist/core/exception/missing_partner_config_exception.js +35 -0
- package/dist/core/exception/missing_partner_config_exception.js.map +1 -0
- package/dist/core/exception/missing_required_field_exception.d.ts +13 -0
- package/dist/core/exception/missing_required_field_exception.d.ts.map +1 -0
- package/dist/core/exception/missing_required_field_exception.js +18 -0
- package/dist/core/exception/missing_required_field_exception.js.map +1 -0
- package/dist/core/exception/screen_config_validation_exceptions.d.ts +11 -0
- package/dist/core/exception/screen_config_validation_exceptions.d.ts.map +1 -0
- package/dist/core/exception/screen_config_validation_exceptions.js +11 -0
- package/dist/core/exception/screen_config_validation_exceptions.js.map +1 -0
- package/dist/core/exception/use_smile_id_attestation_exception.d.ts +12 -0
- package/dist/core/exception/use_smile_id_attestation_exception.d.ts.map +1 -0
- package/dist/core/exception/use_smile_id_attestation_exception.js +12 -0
- package/dist/core/exception/use_smile_id_attestation_exception.js.map +1 -0
- package/dist/core/exception/use_smile_id_builder_exception.d.ts +19 -0
- package/dist/core/exception/use_smile_id_builder_exception.d.ts.map +1 -0
- package/dist/core/exception/use_smile_id_builder_exception.js +19 -0
- package/dist/core/exception/use_smile_id_builder_exception.js.map +1 -0
- package/dist/core/exception/use_smile_id_camera_exception.d.ts +13 -0
- package/dist/core/exception/use_smile_id_camera_exception.d.ts.map +1 -0
- package/dist/core/exception/use_smile_id_camera_exception.js +13 -0
- package/dist/core/exception/use_smile_id_camera_exception.js.map +1 -0
- package/dist/core/exception/use_smile_id_error_code.d.ts +78 -0
- package/dist/core/exception/use_smile_id_error_code.d.ts.map +1 -0
- package/dist/core/exception/use_smile_id_error_code.js +70 -0
- package/dist/core/exception/use_smile_id_error_code.js.map +1 -0
- package/dist/core/exception/use_smile_id_exception.d.ts +27 -0
- package/dist/core/exception/use_smile_id_exception.d.ts.map +1 -0
- package/dist/core/exception/use_smile_id_exception.js +39 -0
- package/dist/core/exception/use_smile_id_exception.js.map +1 -0
- package/dist/core/exception/use_smile_id_general_exception.d.ts +13 -0
- package/dist/core/exception/use_smile_id_general_exception.d.ts.map +1 -0
- package/dist/core/exception/use_smile_id_general_exception.js +13 -0
- package/dist/core/exception/use_smile_id_general_exception.js.map +1 -0
- package/dist/core/exception/use_smile_id_network_exception.d.ts +117 -0
- package/dist/core/exception/use_smile_id_network_exception.d.ts.map +1 -0
- package/dist/core/exception/use_smile_id_network_exception.js +203 -0
- package/dist/core/exception/use_smile_id_network_exception.js.map +1 -0
- package/dist/core/exception/use_smile_id_validation_exception.d.ts +13 -0
- package/dist/core/exception/use_smile_id_validation_exception.d.ts.map +1 -0
- package/dist/core/exception/use_smile_id_validation_exception.js +13 -0
- package/dist/core/exception/use_smile_id_validation_exception.js.map +1 -0
- package/dist/core/models/config.d.ts +35 -0
- package/dist/core/models/config.d.ts.map +1 -0
- package/dist/core/models/config.js +2 -0
- package/dist/core/models/config.js.map +1 -0
- package/dist/core/models/document_capture_mode.d.ts +34 -0
- package/dist/core/models/document_capture_mode.d.ts.map +1 -0
- package/dist/core/models/document_capture_mode.js +23 -0
- package/dist/core/models/document_capture_mode.js.map +1 -0
- package/dist/core/models/document_type.d.ts +52 -0
- package/dist/core/models/document_type.d.ts.map +1 -0
- package/dist/core/models/document_type.js +45 -0
- package/dist/core/models/document_type.js.map +1 -0
- package/dist/core/models/flow_step.d.ts +10 -0
- package/dist/core/models/flow_step.d.ts.map +1 -0
- package/dist/core/models/flow_step.js +16 -0
- package/dist/core/models/flow_step.js.map +1 -0
- package/dist/core/models/head_turn_direction.d.ts +11 -0
- package/dist/core/models/head_turn_direction.d.ts.map +1 -0
- package/dist/core/models/head_turn_direction.js +14 -0
- package/dist/core/models/head_turn_direction.js.map +1 -0
- package/dist/core/models/job_type.d.ts +34 -0
- package/dist/core/models/job_type.d.ts.map +1 -0
- package/dist/core/models/job_type.js +43 -0
- package/dist/core/models/job_type.js.map +1 -0
- package/dist/core/models/ml_config.d.ts +41 -0
- package/dist/core/models/ml_config.d.ts.map +1 -0
- package/dist/core/models/ml_config.js +27 -0
- package/dist/core/models/ml_config.js.map +1 -0
- package/dist/core/models/network_config.d.ts +127 -0
- package/dist/core/models/network_config.d.ts.map +1 -0
- package/dist/core/models/network_config.js +41 -0
- package/dist/core/models/network_config.js.map +1 -0
- package/dist/core/models/params.d.ts +92 -0
- package/dist/core/models/params.d.ts.map +1 -0
- package/dist/core/models/params.js +5 -0
- package/dist/core/models/params.js.map +1 -0
- package/dist/core/models/result.d.ts +29 -0
- package/dist/core/models/result.d.ts.map +1 -0
- package/dist/core/models/result.js +18 -0
- package/dist/core/models/result.js.map +1 -0
- package/dist/data/api/auth/token_holder.d.ts +40 -0
- package/dist/data/api/auth/token_holder.d.ts.map +1 -0
- package/dist/data/api/auth/token_holder.js +67 -0
- package/dist/data/api/auth/token_holder.js.map +1 -0
- package/dist/data/api/interceptors/gzip_interceptor.d.ts +21 -0
- package/dist/data/api/interceptors/gzip_interceptor.d.ts.map +1 -0
- package/dist/data/api/interceptors/gzip_interceptor.js +29 -0
- package/dist/data/api/interceptors/gzip_interceptor.js.map +1 -0
- package/dist/data/api/interceptors/logging_interceptor.d.ts +26 -0
- package/dist/data/api/interceptors/logging_interceptor.d.ts.map +1 -0
- package/dist/data/api/interceptors/logging_interceptor.js +108 -0
- package/dist/data/api/interceptors/logging_interceptor.js.map +1 -0
- package/dist/data/api/interceptors/sensitive_headers.d.ts +26 -0
- package/dist/data/api/interceptors/sensitive_headers.d.ts.map +1 -0
- package/dist/data/api/interceptors/sensitive_headers.js +42 -0
- package/dist/data/api/interceptors/sensitive_headers.js.map +1 -0
- package/dist/data/api/interceptors/smile_auth_interceptor.d.ts +22 -0
- package/dist/data/api/interceptors/smile_auth_interceptor.d.ts.map +1 -0
- package/dist/data/api/interceptors/smile_auth_interceptor.js +71 -0
- package/dist/data/api/interceptors/smile_auth_interceptor.js.map +1 -0
- package/dist/data/api/interceptors/smile_integrity_interceptor.d.ts +39 -0
- package/dist/data/api/interceptors/smile_integrity_interceptor.d.ts.map +1 -0
- package/dist/data/api/interceptors/smile_integrity_interceptor.js +66 -0
- package/dist/data/api/interceptors/smile_integrity_interceptor.js.map +1 -0
- package/dist/data/api/interceptors/smile_request_mac_interceptor.d.ts +34 -0
- package/dist/data/api/interceptors/smile_request_mac_interceptor.d.ts.map +1 -0
- package/dist/data/api/interceptors/smile_request_mac_interceptor.js +66 -0
- package/dist/data/api/interceptors/smile_request_mac_interceptor.js.map +1 -0
- package/dist/data/api/interceptors/token_refresh_interceptor.d.ts +45 -0
- package/dist/data/api/interceptors/token_refresh_interceptor.d.ts.map +1 -0
- package/dist/data/api/interceptors/token_refresh_interceptor.js +58 -0
- package/dist/data/api/interceptors/token_refresh_interceptor.js.map +1 -0
- package/dist/data/api/smile_id_api.d.ts +124 -0
- package/dist/data/api/smile_id_api.d.ts.map +1 -0
- package/dist/data/api/smile_id_api.js +371 -0
- package/dist/data/api/smile_id_api.js.map +1 -0
- package/dist/data/dsl/builder/cache_config_builder.d.ts +20 -0
- package/dist/data/dsl/builder/cache_config_builder.d.ts.map +1 -0
- package/dist/data/dsl/builder/cache_config_builder.js +23 -0
- package/dist/data/dsl/builder/cache_config_builder.js.map +1 -0
- package/dist/data/dsl/builder/config_builder.d.ts +77 -0
- package/dist/data/dsl/builder/config_builder.d.ts.map +1 -0
- package/dist/data/dsl/builder/config_builder.js +111 -0
- package/dist/data/dsl/builder/config_builder.js.map +1 -0
- package/dist/data/dsl/builder/interceptor_config_builder.d.ts +46 -0
- package/dist/data/dsl/builder/interceptor_config_builder.d.ts.map +1 -0
- package/dist/data/dsl/builder/interceptor_config_builder.js +69 -0
- package/dist/data/dsl/builder/interceptor_config_builder.js.map +1 -0
- package/dist/data/dsl/builder/retry_config_builder.d.ts +21 -0
- package/dist/data/dsl/builder/retry_config_builder.d.ts.map +1 -0
- package/dist/data/dsl/builder/retry_config_builder.js +31 -0
- package/dist/data/dsl/builder/retry_config_builder.js.map +1 -0
- package/dist/data/dsl/builder/timeout_config_builder.d.ts +16 -0
- package/dist/data/dsl/builder/timeout_config_builder.d.ts.map +1 -0
- package/dist/data/dsl/builder/timeout_config_builder.js +22 -0
- package/dist/data/dsl/builder/timeout_config_builder.js.map +1 -0
- package/dist/data/dsl/use_smile_id_network_builder.d.ts +37 -0
- package/dist/data/dsl/use_smile_id_network_builder.d.ts.map +1 -0
- package/dist/data/dsl/use_smile_id_network_builder.js +66 -0
- package/dist/data/dsl/use_smile_id_network_builder.js.map +1 -0
- package/dist/data/factory/networking_factory.d.ts +53 -0
- package/dist/data/factory/networking_factory.d.ts.map +1 -0
- package/dist/data/factory/networking_factory.js +164 -0
- package/dist/data/factory/networking_factory.js.map +1 -0
- package/dist/data/model/image_dimensions.d.ts +16 -0
- package/dist/data/model/image_dimensions.d.ts.map +1 -0
- package/dist/data/model/image_dimensions.js +2 -0
- package/dist/data/model/image_dimensions.js.map +1 -0
- package/dist/data/model/job_request.d.ts +130 -0
- package/dist/data/model/job_request.d.ts.map +1 -0
- package/dist/data/model/job_request.js +2 -0
- package/dist/data/model/job_request.js.map +1 -0
- package/dist/data/model/job_submission_response.d.ts +18 -0
- package/dist/data/model/job_submission_response.d.ts.map +1 -0
- package/dist/data/model/job_submission_response.js +2 -0
- package/dist/data/model/job_submission_response.js.map +1 -0
- package/dist/data/model/sdk_config.d.ts +54 -0
- package/dist/data/model/sdk_config.d.ts.map +1 -0
- package/dist/data/model/sdk_config.js +68 -0
- package/dist/data/model/sdk_config.js.map +1 -0
- package/dist/data/model/sdk_config_capture.d.ts +39 -0
- package/dist/data/model/sdk_config_capture.d.ts.map +1 -0
- package/dist/data/model/sdk_config_capture.js +69 -0
- package/dist/data/model/sdk_config_capture.js.map +1 -0
- package/dist/data/model/sdk_config_source.d.ts +25 -0
- package/dist/data/model/sdk_config_source.d.ts.map +1 -0
- package/dist/data/model/sdk_config_source.js +24 -0
- package/dist/data/model/sdk_config_source.js.map +1 -0
- package/dist/data/repository/use_smile_id_repository.d.ts +19 -0
- package/dist/data/repository/use_smile_id_repository.d.ts.map +1 -0
- package/dist/data/repository/use_smile_id_repository.js +2 -0
- package/dist/data/repository/use_smile_id_repository.js.map +1 -0
- package/dist/data/repository/use_smile_id_repository_impl.d.ts +29 -0
- package/dist/data/repository/use_smile_id_repository_impl.d.ts.map +1 -0
- package/dist/data/repository/use_smile_id_repository_impl.js +75 -0
- package/dist/data/repository/use_smile_id_repository_impl.js.map +1 -0
- package/dist/data/security/request_canonicalizer.d.ts +4 -0
- package/dist/data/security/request_canonicalizer.d.ts.map +1 -0
- package/dist/data/security/request_canonicalizer.js +120 -0
- package/dist/data/security/request_canonicalizer.js.map +1 -0
- package/dist/data/security/request_timestamp.d.ts +11 -0
- package/dist/data/security/request_timestamp.d.ts.map +1 -0
- package/dist/data/security/request_timestamp.js +13 -0
- package/dist/data/security/request_timestamp.js.map +1 -0
- package/dist/data/security/signing_crypto.d.ts +25 -0
- package/dist/data/security/signing_crypto.d.ts.map +1 -0
- package/dist/data/security/signing_crypto.js +145 -0
- package/dist/data/security/signing_crypto.js.map +1 -0
- package/dist/data/security/smile_id_crypto_error.d.ts +11 -0
- package/dist/data/security/smile_id_crypto_error.d.ts.map +1 -0
- package/dist/data/security/smile_id_crypto_error.js +14 -0
- package/dist/data/security/smile_id_crypto_error.js.map +1 -0
- package/dist/data/security/smile_id_crypto_manager.d.ts +30 -0
- package/dist/data/security/smile_id_crypto_manager.d.ts.map +1 -0
- package/dist/data/security/smile_id_crypto_manager.js +40 -0
- package/dist/data/security/smile_id_crypto_manager.js.map +1 -0
- package/dist/data/smile_id_urls.d.ts +12 -0
- package/dist/data/smile_id_urls.d.ts.map +1 -0
- package/dist/data/smile_id_urls.js +14 -0
- package/dist/data/smile_id_urls.js.map +1 -0
- package/dist/data/util/retry_util.d.ts +27 -0
- package/dist/data/util/retry_util.d.ts.map +1 -0
- package/dist/data/util/retry_util.js +68 -0
- package/dist/data/util/retry_util.js.map +1 -0
- package/dist/data/util/use_smile_id_token_decoder.d.ts +33 -0
- package/dist/data/util/use_smile_id_token_decoder.d.ts.map +1 -0
- package/dist/data/util/use_smile_id_token_decoder.js +102 -0
- package/dist/data/util/use_smile_id_token_decoder.js.map +1 -0
- package/dist/index.d.ts +116 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +142 -0
- package/dist/index.js.map +1 -0
- package/dist/l10n/strings_en.d.ts +131 -0
- package/dist/l10n/strings_en.d.ts.map +1 -0
- package/dist/l10n/strings_en.js +141 -0
- package/dist/l10n/strings_en.js.map +1 -0
- package/dist/l10n/use_smile_id_localizations.d.ts +173 -0
- package/dist/l10n/use_smile_id_localizations.d.ts.map +1 -0
- package/dist/l10n/use_smile_id_localizations.js +487 -0
- package/dist/l10n/use_smile_id_localizations.js.map +1 -0
- package/dist/l10n/use_smile_id_localizations_provider.d.ts +26 -0
- package/dist/l10n/use_smile_id_localizations_provider.d.ts.map +1 -0
- package/dist/l10n/use_smile_id_localizations_provider.js +53 -0
- package/dist/l10n/use_smile_id_localizations_provider.js.map +1 -0
- package/dist/metadata/document_image_origin.d.ts +20 -0
- package/dist/metadata/document_image_origin.d.ts.map +1 -0
- package/dist/metadata/document_image_origin.js +19 -0
- package/dist/metadata/document_image_origin.js.map +1 -0
- package/dist/metadata/optional_native_modules.d.ts +85 -0
- package/dist/metadata/optional_native_modules.d.ts.map +1 -0
- package/dist/metadata/optional_native_modules.js +101 -0
- package/dist/metadata/optional_native_modules.js.map +1 -0
- package/dist/metadata/use_smile_id_metadata.d.ts +69 -0
- package/dist/metadata/use_smile_id_metadata.d.ts.map +1 -0
- package/dist/metadata/use_smile_id_metadata.js +116 -0
- package/dist/metadata/use_smile_id_metadata.js.map +1 -0
- package/dist/metadata/use_smile_id_metadata_factory.d.ts +82 -0
- package/dist/metadata/use_smile_id_metadata_factory.d.ts.map +1 -0
- package/dist/metadata/use_smile_id_metadata_factory.js +320 -0
- package/dist/metadata/use_smile_id_metadata_factory.js.map +1 -0
- package/dist/presentation/assets/svg/instruction_svg_strings.d.ts +17 -0
- package/dist/presentation/assets/svg/instruction_svg_strings.d.ts.map +1 -0
- package/dist/presentation/assets/svg/instruction_svg_strings.js +21 -0
- package/dist/presentation/assets/svg/instruction_svg_strings.js.map +1 -0
- package/dist/presentation/assets/svg/svg_strings.d.ts +29 -0
- package/dist/presentation/assets/svg/svg_strings.d.ts.map +1 -0
- package/dist/presentation/assets/svg/svg_strings.js +140 -0
- package/dist/presentation/assets/svg/svg_strings.js.map +1 -0
- package/dist/presentation/components/face_oval_defaults.d.ts +41 -0
- package/dist/presentation/components/face_oval_defaults.d.ts.map +1 -0
- package/dist/presentation/components/face_oval_defaults.js +41 -0
- package/dist/presentation/components/face_oval_defaults.js.map +1 -0
- package/dist/presentation/components/helpers/animated_lottie_view.d.ts +9 -0
- package/dist/presentation/components/helpers/animated_lottie_view.d.ts.map +1 -0
- package/dist/presentation/components/helpers/animated_lottie_view.js +9 -0
- package/dist/presentation/components/helpers/animated_lottie_view.js.map +1 -0
- package/dist/presentation/components/helpers/capture_instruction_animation_spec.d.ts +26 -0
- package/dist/presentation/components/helpers/capture_instruction_animation_spec.d.ts.map +1 -0
- package/dist/presentation/components/helpers/capture_instruction_animation_spec.js +47 -0
- package/dist/presentation/components/helpers/capture_instruction_animation_spec.js.map +1 -0
- package/dist/presentation/components/helpers/enhanced_smart_selfie_animation_frames.d.ts +70 -0
- package/dist/presentation/components/helpers/enhanced_smart_selfie_animation_frames.d.ts.map +1 -0
- package/dist/presentation/components/helpers/enhanced_smart_selfie_animation_frames.js +49 -0
- package/dist/presentation/components/helpers/enhanced_smart_selfie_animation_frames.js.map +1 -0
- package/dist/presentation/components/helpers/scaled_oval_geometry.d.ts +24 -0
- package/dist/presentation/components/helpers/scaled_oval_geometry.d.ts.map +1 -0
- package/dist/presentation/components/helpers/scaled_oval_geometry.js +29 -0
- package/dist/presentation/components/helpers/scaled_oval_geometry.js.map +1 -0
- package/dist/presentation/components/icons/index.d.ts +82 -0
- package/dist/presentation/components/icons/index.d.ts.map +1 -0
- package/dist/presentation/components/icons/index.js +97 -0
- package/dist/presentation/components/icons/index.js.map +1 -0
- package/dist/presentation/components/status_indicator_state.d.ts +20 -0
- package/dist/presentation/components/status_indicator_state.d.ts.map +1 -0
- package/dist/presentation/components/status_indicator_state.js +19 -0
- package/dist/presentation/components/status_indicator_state.js.map +1 -0
- package/dist/presentation/components/use_smile_id_attribution.d.ts +19 -0
- package/dist/presentation/components/use_smile_id_attribution.d.ts.map +1 -0
- package/dist/presentation/components/use_smile_id_attribution.js +25 -0
- package/dist/presentation/components/use_smile_id_attribution.js.map +1 -0
- package/dist/presentation/components/use_smile_id_back_button.d.ts +15 -0
- package/dist/presentation/components/use_smile_id_back_button.d.ts.map +1 -0
- package/dist/presentation/components/use_smile_id_back_button.js +38 -0
- package/dist/presentation/components/use_smile_id_back_button.js.map +1 -0
- package/dist/presentation/components/use_smile_id_button.d.ts +20 -0
- package/dist/presentation/components/use_smile_id_button.d.ts.map +1 -0
- package/dist/presentation/components/use_smile_id_button.js +63 -0
- package/dist/presentation/components/use_smile_id_button.js.map +1 -0
- package/dist/presentation/components/use_smile_id_capture_content.d.ts +58 -0
- package/dist/presentation/components/use_smile_id_capture_content.d.ts.map +1 -0
- package/dist/presentation/components/use_smile_id_capture_content.js +131 -0
- package/dist/presentation/components/use_smile_id_capture_content.js.map +1 -0
- package/dist/presentation/components/use_smile_id_capture_instruction_animation.d.ts +20 -0
- package/dist/presentation/components/use_smile_id_capture_instruction_animation.d.ts.map +1 -0
- package/dist/presentation/components/use_smile_id_capture_instruction_animation.js +50 -0
- package/dist/presentation/components/use_smile_id_capture_instruction_animation.js.map +1 -0
- package/dist/presentation/components/use_smile_id_capture_spinner.d.ts +9 -0
- package/dist/presentation/components/use_smile_id_capture_spinner.d.ts.map +1 -0
- package/dist/presentation/components/use_smile_id_capture_spinner.js +30 -0
- package/dist/presentation/components/use_smile_id_capture_spinner.js.map +1 -0
- package/dist/presentation/components/use_smile_id_captured_document_image.d.ts +23 -0
- package/dist/presentation/components/use_smile_id_captured_document_image.d.ts.map +1 -0
- package/dist/presentation/components/use_smile_id_captured_document_image.js +41 -0
- package/dist/presentation/components/use_smile_id_captured_document_image.js.map +1 -0
- package/dist/presentation/components/use_smile_id_captured_image_oval.d.ts +41 -0
- package/dist/presentation/components/use_smile_id_captured_image_oval.d.ts.map +1 -0
- package/dist/presentation/components/use_smile_id_captured_image_oval.js +63 -0
- package/dist/presentation/components/use_smile_id_captured_image_oval.js.map +1 -0
- package/dist/presentation/components/use_smile_id_card_surface.d.ts +17 -0
- package/dist/presentation/components/use_smile_id_card_surface.d.ts.map +1 -0
- package/dist/presentation/components/use_smile_id_card_surface.js +37 -0
- package/dist/presentation/components/use_smile_id_card_surface.js.map +1 -0
- package/dist/presentation/components/use_smile_id_confirmation_buttons.d.ts +18 -0
- package/dist/presentation/components/use_smile_id_confirmation_buttons.d.ts.map +1 -0
- package/dist/presentation/components/use_smile_id_confirmation_buttons.js +48 -0
- package/dist/presentation/components/use_smile_id_confirmation_buttons.js.map +1 -0
- package/dist/presentation/components/use_smile_id_consent_row.d.ts +18 -0
- package/dist/presentation/components/use_smile_id_consent_row.d.ts.map +1 -0
- package/dist/presentation/components/use_smile_id_consent_row.js +32 -0
- package/dist/presentation/components/use_smile_id_consent_row.js.map +1 -0
- package/dist/presentation/components/use_smile_id_content_card.d.ts +21 -0
- package/dist/presentation/components/use_smile_id_content_card.d.ts.map +1 -0
- package/dist/presentation/components/use_smile_id_content_card.js +41 -0
- package/dist/presentation/components/use_smile_id_content_card.js.map +1 -0
- package/dist/presentation/components/use_smile_id_document_capture_controls.d.ts +27 -0
- package/dist/presentation/components/use_smile_id_document_capture_controls.d.ts.map +1 -0
- package/dist/presentation/components/use_smile_id_document_capture_controls.js +77 -0
- package/dist/presentation/components/use_smile_id_document_capture_controls.js.map +1 -0
- package/dist/presentation/components/use_smile_id_document_frame_glyph.d.ts +17 -0
- package/dist/presentation/components/use_smile_id_document_frame_glyph.d.ts.map +1 -0
- package/dist/presentation/components/use_smile_id_document_frame_glyph.js +17 -0
- package/dist/presentation/components/use_smile_id_document_frame_glyph.js.map +1 -0
- package/dist/presentation/components/use_smile_id_document_overlay.d.ts +25 -0
- package/dist/presentation/components/use_smile_id_document_overlay.d.ts.map +1 -0
- package/dist/presentation/components/use_smile_id_document_overlay.js +118 -0
- package/dist/presentation/components/use_smile_id_document_overlay.js.map +1 -0
- package/dist/presentation/components/use_smile_id_enhanced_smart_selfie_animation.d.ts +24 -0
- package/dist/presentation/components/use_smile_id_enhanced_smart_selfie_animation.d.ts.map +1 -0
- package/dist/presentation/components/use_smile_id_enhanced_smart_selfie_animation.js +91 -0
- package/dist/presentation/components/use_smile_id_enhanced_smart_selfie_animation.js.map +1 -0
- package/dist/presentation/components/use_smile_id_enhanced_smart_selfie_clip.d.ts +24 -0
- package/dist/presentation/components/use_smile_id_enhanced_smart_selfie_clip.d.ts.map +1 -0
- package/dist/presentation/components/use_smile_id_enhanced_smart_selfie_clip.js +74 -0
- package/dist/presentation/components/use_smile_id_enhanced_smart_selfie_clip.js.map +1 -0
- package/dist/presentation/components/use_smile_id_enhanced_smart_selfie_direction_animation.d.ts +25 -0
- package/dist/presentation/components/use_smile_id_enhanced_smart_selfie_direction_animation.d.ts.map +1 -0
- package/dist/presentation/components/use_smile_id_enhanced_smart_selfie_direction_animation.js +21 -0
- package/dist/presentation/components/use_smile_id_enhanced_smart_selfie_direction_animation.js.map +1 -0
- package/dist/presentation/components/use_smile_id_enhanced_smart_selfie_full_animation.d.ts +13 -0
- package/dist/presentation/components/use_smile_id_enhanced_smart_selfie_full_animation.d.ts.map +1 -0
- package/dist/presentation/components/use_smile_id_enhanced_smart_selfie_full_animation.js +14 -0
- package/dist/presentation/components/use_smile_id_enhanced_smart_selfie_full_animation.js.map +1 -0
- package/dist/presentation/components/use_smile_id_expandable_icon.d.ts +22 -0
- package/dist/presentation/components/use_smile_id_expandable_icon.d.ts.map +1 -0
- package/dist/presentation/components/use_smile_id_expandable_icon.js +55 -0
- package/dist/presentation/components/use_smile_id_expandable_icon.js.map +1 -0
- package/dist/presentation/components/use_smile_id_face_oval_image.d.ts +26 -0
- package/dist/presentation/components/use_smile_id_face_oval_image.d.ts.map +1 -0
- package/dist/presentation/components/use_smile_id_face_oval_image.js +41 -0
- package/dist/presentation/components/use_smile_id_face_oval_image.js.map +1 -0
- package/dist/presentation/components/use_smile_id_face_overlay.d.ts +23 -0
- package/dist/presentation/components/use_smile_id_face_overlay.d.ts.map +1 -0
- package/dist/presentation/components/use_smile_id_face_overlay.js +194 -0
- package/dist/presentation/components/use_smile_id_face_overlay.js.map +1 -0
- package/dist/presentation/components/use_smile_id_face_silhouette_overlay.d.ts +15 -0
- package/dist/presentation/components/use_smile_id_face_silhouette_overlay.d.ts.map +1 -0
- package/dist/presentation/components/use_smile_id_face_silhouette_overlay.js +19 -0
- package/dist/presentation/components/use_smile_id_face_silhouette_overlay.js.map +1 -0
- package/dist/presentation/components/use_smile_id_failed_content.d.ts +19 -0
- package/dist/presentation/components/use_smile_id_failed_content.d.ts.map +1 -0
- package/dist/presentation/components/use_smile_id_failed_content.js +44 -0
- package/dist/presentation/components/use_smile_id_failed_content.js.map +1 -0
- package/dist/presentation/components/use_smile_id_guideline_thumbnail.d.ts +12 -0
- package/dist/presentation/components/use_smile_id_guideline_thumbnail.d.ts.map +1 -0
- package/dist/presentation/components/use_smile_id_guideline_thumbnail.js +96 -0
- package/dist/presentation/components/use_smile_id_guideline_thumbnail.js.map +1 -0
- package/dist/presentation/components/use_smile_id_instruction_card.d.ts +31 -0
- package/dist/presentation/components/use_smile_id_instruction_card.d.ts.map +1 -0
- package/dist/presentation/components/use_smile_id_instruction_card.js +43 -0
- package/dist/presentation/components/use_smile_id_instruction_card.js.map +1 -0
- package/dist/presentation/components/use_smile_id_instructions_hero.d.ts +26 -0
- package/dist/presentation/components/use_smile_id_instructions_hero.d.ts.map +1 -0
- package/dist/presentation/components/use_smile_id_instructions_hero.js +144 -0
- package/dist/presentation/components/use_smile_id_instructions_hero.js.map +1 -0
- package/dist/presentation/components/use_smile_id_learn_more_content.d.ts +24 -0
- package/dist/presentation/components/use_smile_id_learn_more_content.d.ts.map +1 -0
- package/dist/presentation/components/use_smile_id_learn_more_content.js +70 -0
- package/dist/presentation/components/use_smile_id_learn_more_content.js.map +1 -0
- package/dist/presentation/components/use_smile_id_loading_content.d.ts +14 -0
- package/dist/presentation/components/use_smile_id_loading_content.d.ts.map +1 -0
- package/dist/presentation/components/use_smile_id_loading_content.js +31 -0
- package/dist/presentation/components/use_smile_id_loading_content.js.map +1 -0
- package/dist/presentation/components/use_smile_id_loading_indicator.d.ts +15 -0
- package/dist/presentation/components/use_smile_id_loading_indicator.d.ts.map +1 -0
- package/dist/presentation/components/use_smile_id_loading_indicator.js +48 -0
- package/dist/presentation/components/use_smile_id_loading_indicator.js.map +1 -0
- package/dist/presentation/components/use_smile_id_oval_border_palette.d.ts +12 -0
- package/dist/presentation/components/use_smile_id_oval_border_palette.d.ts.map +1 -0
- package/dist/presentation/components/use_smile_id_oval_border_palette.js +45 -0
- package/dist/presentation/components/use_smile_id_oval_border_palette.js.map +1 -0
- package/dist/presentation/components/use_smile_id_partner_icon.d.ts +18 -0
- package/dist/presentation/components/use_smile_id_partner_icon.d.ts.map +1 -0
- package/dist/presentation/components/use_smile_id_partner_icon.js +34 -0
- package/dist/presentation/components/use_smile_id_partner_icon.js.map +1 -0
- package/dist/presentation/components/use_smile_id_processing_center_indicator.d.ts +26 -0
- package/dist/presentation/components/use_smile_id_processing_center_indicator.d.ts.map +1 -0
- package/dist/presentation/components/use_smile_id_processing_center_indicator.js +44 -0
- package/dist/presentation/components/use_smile_id_processing_center_indicator.js.map +1 -0
- package/dist/presentation/components/use_smile_id_rounded_checkbox.d.ts +18 -0
- package/dist/presentation/components/use_smile_id_rounded_checkbox.d.ts.map +1 -0
- package/dist/presentation/components/use_smile_id_rounded_checkbox.js +41 -0
- package/dist/presentation/components/use_smile_id_rounded_checkbox.js.map +1 -0
- package/dist/presentation/components/use_smile_id_status_indicator.d.ts +16 -0
- package/dist/presentation/components/use_smile_id_status_indicator.d.ts.map +1 -0
- package/dist/presentation/components/use_smile_id_status_indicator.js +22 -0
- package/dist/presentation/components/use_smile_id_status_indicator.js.map +1 -0
- package/dist/presentation/components/use_smile_id_success_content.d.ts +17 -0
- package/dist/presentation/components/use_smile_id_success_content.d.ts.map +1 -0
- package/dist/presentation/components/use_smile_id_success_content.js +39 -0
- package/dist/presentation/components/use_smile_id_success_content.js.map +1 -0
- package/dist/presentation/flow/analytics/use_smile_id_analytics_event.d.ts +77 -0
- package/dist/presentation/flow/analytics/use_smile_id_analytics_event.d.ts.map +1 -0
- package/dist/presentation/flow/analytics/use_smile_id_analytics_event.js +71 -0
- package/dist/presentation/flow/analytics/use_smile_id_analytics_event.js.map +1 -0
- package/dist/presentation/flow/config/flow_configuration.d.ts +12 -0
- package/dist/presentation/flow/config/flow_configuration.d.ts.map +1 -0
- package/dist/presentation/flow/config/flow_configuration.js +2 -0
- package/dist/presentation/flow/config/flow_configuration.js.map +1 -0
- package/dist/presentation/flow/dsl/builder/config_builder.d.ts +15 -0
- package/dist/presentation/flow/dsl/builder/config_builder.d.ts.map +1 -0
- package/dist/presentation/flow/dsl/builder/config_builder.js +20 -0
- package/dist/presentation/flow/dsl/builder/config_builder.js.map +1 -0
- package/dist/presentation/flow/dsl/builder/ml_builder.d.ts +80 -0
- package/dist/presentation/flow/dsl/builder/ml_builder.d.ts.map +1 -0
- package/dist/presentation/flow/dsl/builder/ml_builder.js +163 -0
- package/dist/presentation/flow/dsl/builder/ml_builder.js.map +1 -0
- package/dist/presentation/flow/dsl/builder/screens_builder.d.ts +122 -0
- package/dist/presentation/flow/dsl/builder/screens_builder.d.ts.map +1 -0
- package/dist/presentation/flow/dsl/builder/screens_builder.js +119 -0
- package/dist/presentation/flow/dsl/builder/screens_builder.js.map +1 -0
- package/dist/presentation/flow/dsl/builder/theme_builder.d.ts +44 -0
- package/dist/presentation/flow/dsl/builder/theme_builder.d.ts.map +1 -0
- package/dist/presentation/flow/dsl/builder/theme_builder.js +70 -0
- package/dist/presentation/flow/dsl/builder/theme_builder.js.map +1 -0
- package/dist/presentation/flow/dsl/flow_build_result.d.ts +35 -0
- package/dist/presentation/flow/dsl/flow_build_result.d.ts.map +1 -0
- package/dist/presentation/flow/dsl/flow_build_result.js +2 -0
- package/dist/presentation/flow/dsl/flow_build_result.js.map +1 -0
- package/dist/presentation/flow/dsl/use_smile_id_builder.d.ts +59 -0
- package/dist/presentation/flow/dsl/use_smile_id_builder.d.ts.map +1 -0
- package/dist/presentation/flow/dsl/use_smile_id_builder.js +49 -0
- package/dist/presentation/flow/dsl/use_smile_id_builder.js.map +1 -0
- package/dist/presentation/flow/dsl/use_smile_id_flow_builder.d.ts +241 -0
- package/dist/presentation/flow/dsl/use_smile_id_flow_builder.d.ts.map +1 -0
- package/dist/presentation/flow/dsl/use_smile_id_flow_builder.js +308 -0
- package/dist/presentation/flow/dsl/use_smile_id_flow_builder.js.map +1 -0
- package/dist/presentation/flow/flow_navigation_context.d.ts +17 -0
- package/dist/presentation/flow/flow_navigation_context.d.ts.map +1 -0
- package/dist/presentation/flow/flow_navigation_context.js +34 -0
- package/dist/presentation/flow/flow_navigation_context.js.map +1 -0
- package/dist/presentation/flow/flow_navigation_manager.d.ts +217 -0
- package/dist/presentation/flow/flow_navigation_manager.d.ts.map +1 -0
- package/dist/presentation/flow/flow_navigation_manager.js +766 -0
- package/dist/presentation/flow/flow_navigation_manager.js.map +1 -0
- package/dist/presentation/flow/graph/screen_renderer.d.ts +16 -0
- package/dist/presentation/flow/graph/screen_renderer.d.ts.map +1 -0
- package/dist/presentation/flow/graph/screen_renderer.js +31 -0
- package/dist/presentation/flow/graph/screen_renderer.js.map +1 -0
- package/dist/presentation/flow/job_submission_state.d.ts +23 -0
- package/dist/presentation/flow/job_submission_state.d.ts.map +1 -0
- package/dist/presentation/flow/job_submission_state.js +2 -0
- package/dist/presentation/flow/job_submission_state.js.map +1 -0
- package/dist/presentation/flow/model/instruction_guideline.d.ts +17 -0
- package/dist/presentation/flow/model/instruction_guideline.d.ts.map +1 -0
- package/dist/presentation/flow/model/instruction_guideline.js +2 -0
- package/dist/presentation/flow/model/instruction_guideline.js.map +1 -0
- package/dist/presentation/flow/model/instructions_defaults.d.ts +27 -0
- package/dist/presentation/flow/model/instructions_defaults.d.ts.map +1 -0
- package/dist/presentation/flow/model/instructions_defaults.js +82 -0
- package/dist/presentation/flow/model/instructions_defaults.js.map +1 -0
- package/dist/presentation/flow/screen/helpers/face_session_config.d.ts +25 -0
- package/dist/presentation/flow/screen/helpers/face_session_config.d.ts.map +1 -0
- package/dist/presentation/flow/screen/helpers/face_session_config.js +65 -0
- package/dist/presentation/flow/screen/helpers/face_session_config.js.map +1 -0
- package/dist/presentation/flow/screen/orchestrated_capture_screen.d.ts +13 -0
- package/dist/presentation/flow/screen/orchestrated_capture_screen.d.ts.map +1 -0
- package/dist/presentation/flow/screen/orchestrated_capture_screen.js +203 -0
- package/dist/presentation/flow/screen/orchestrated_capture_screen.js.map +1 -0
- package/dist/presentation/flow/screen/orchestrated_consent_screen.d.ts +14 -0
- package/dist/presentation/flow/screen/orchestrated_consent_screen.d.ts.map +1 -0
- package/dist/presentation/flow/screen/orchestrated_consent_screen.js +47 -0
- package/dist/presentation/flow/screen/orchestrated_consent_screen.js.map +1 -0
- package/dist/presentation/flow/screen/orchestrated_instructions_screen.d.ts +12 -0
- package/dist/presentation/flow/screen/orchestrated_instructions_screen.d.ts.map +1 -0
- package/dist/presentation/flow/screen/orchestrated_instructions_screen.js +47 -0
- package/dist/presentation/flow/screen/orchestrated_instructions_screen.js.map +1 -0
- package/dist/presentation/flow/screen/orchestrated_preview_screen.d.ts +12 -0
- package/dist/presentation/flow/screen/orchestrated_preview_screen.d.ts.map +1 -0
- package/dist/presentation/flow/screen/orchestrated_preview_screen.js +40 -0
- package/dist/presentation/flow/screen/orchestrated_preview_screen.js.map +1 -0
- package/dist/presentation/flow/screen/orchestrated_processing_screen.d.ts +11 -0
- package/dist/presentation/flow/screen/orchestrated_processing_screen.d.ts.map +1 -0
- package/dist/presentation/flow/screen/orchestrated_processing_screen.js +59 -0
- package/dist/presentation/flow/screen/orchestrated_processing_screen.js.map +1 -0
- package/dist/presentation/flow/screen/use_smile_id_orchestrated_screen_host.d.ts +23 -0
- package/dist/presentation/flow/screen/use_smile_id_orchestrated_screen_host.d.ts.map +1 -0
- package/dist/presentation/flow/screen/use_smile_id_orchestrated_screen_host.js +22 -0
- package/dist/presentation/flow/screen/use_smile_id_orchestrated_screen_host.js.map +1 -0
- package/dist/presentation/flow/screen/validation_error_screen.d.ts +12 -0
- package/dist/presentation/flow/screen/validation_error_screen.d.ts.map +1 -0
- package/dist/presentation/flow/screen/validation_error_screen.js +87 -0
- package/dist/presentation/flow/screen/validation_error_screen.js.map +1 -0
- package/dist/presentation/flow/use_smile_id_flow.d.ts +54 -0
- package/dist/presentation/flow/use_smile_id_flow.d.ts.map +1 -0
- package/dist/presentation/flow/use_smile_id_flow.js +264 -0
- package/dist/presentation/flow/use_smile_id_flow.js.map +1 -0
- package/dist/presentation/flow/validation/flow_validator.d.ts +107 -0
- package/dist/presentation/flow/validation/flow_validator.d.ts.map +1 -0
- package/dist/presentation/flow/validation/flow_validator.js +286 -0
- package/dist/presentation/flow/validation/flow_validator.js.map +1 -0
- package/dist/presentation/flow/validation/job_type_validator.d.ts +124 -0
- package/dist/presentation/flow/validation/job_type_validator.d.ts.map +1 -0
- package/dist/presentation/flow/validation/job_type_validator.js +420 -0
- package/dist/presentation/flow/validation/job_type_validator.js.map +1 -0
- package/dist/presentation/flow/validation/validation_state.d.ts +59 -0
- package/dist/presentation/flow/validation/validation_state.d.ts.map +1 -0
- package/dist/presentation/flow/validation/validation_state.js +23 -0
- package/dist/presentation/flow/validation/validation_state.js.map +1 -0
- package/dist/presentation/screen/helpers/capture_screen_helpers.d.ts +29 -0
- package/dist/presentation/screen/helpers/capture_screen_helpers.d.ts.map +1 -0
- package/dist/presentation/screen/helpers/capture_screen_helpers.js +133 -0
- package/dist/presentation/screen/helpers/capture_screen_helpers.js.map +1 -0
- package/dist/presentation/screen/helpers/capture_ui_state.d.ts +54 -0
- package/dist/presentation/screen/helpers/capture_ui_state.d.ts.map +1 -0
- package/dist/presentation/screen/helpers/capture_ui_state.js +179 -0
- package/dist/presentation/screen/helpers/capture_ui_state.js.map +1 -0
- package/dist/presentation/screen/helpers/consent_screen_helpers.d.ts +39 -0
- package/dist/presentation/screen/helpers/consent_screen_helpers.d.ts.map +1 -0
- package/dist/presentation/screen/helpers/consent_screen_helpers.js +68 -0
- package/dist/presentation/screen/helpers/consent_screen_helpers.js.map +1 -0
- package/dist/presentation/screen/helpers/ess_turn_haptics.d.ts +27 -0
- package/dist/presentation/screen/helpers/ess_turn_haptics.d.ts.map +1 -0
- package/dist/presentation/screen/helpers/ess_turn_haptics.js +53 -0
- package/dist/presentation/screen/helpers/ess_turn_haptics.js.map +1 -0
- package/dist/presentation/screen/helpers/feedback_debouncer.d.ts +37 -0
- package/dist/presentation/screen/helpers/feedback_debouncer.d.ts.map +1 -0
- package/dist/presentation/screen/helpers/feedback_debouncer.js +77 -0
- package/dist/presentation/screen/helpers/feedback_debouncer.js.map +1 -0
- package/dist/presentation/screen/helpers/instructions_screen_helpers.d.ts +43 -0
- package/dist/presentation/screen/helpers/instructions_screen_helpers.d.ts.map +1 -0
- package/dist/presentation/screen/helpers/instructions_screen_helpers.js +50 -0
- package/dist/presentation/screen/helpers/instructions_screen_helpers.js.map +1 -0
- package/dist/presentation/screen/helpers/preview_screen_helpers.d.ts +29 -0
- package/dist/presentation/screen/helpers/preview_screen_helpers.d.ts.map +1 -0
- package/dist/presentation/screen/helpers/preview_screen_helpers.js +27 -0
- package/dist/presentation/screen/helpers/preview_screen_helpers.js.map +1 -0
- package/dist/presentation/screen/helpers/processing_screen_helpers.d.ts +13 -0
- package/dist/presentation/screen/helpers/processing_screen_helpers.d.ts.map +1 -0
- package/dist/presentation/screen/helpers/processing_screen_helpers.js +12 -0
- package/dist/presentation/screen/helpers/processing_screen_helpers.js.map +1 -0
- package/dist/presentation/screen/helpers/scan_state_to_overlay_state.d.ts +21 -0
- package/dist/presentation/screen/helpers/scan_state_to_overlay_state.d.ts.map +1 -0
- package/dist/presentation/screen/helpers/scan_state_to_overlay_state.js +104 -0
- package/dist/presentation/screen/helpers/scan_state_to_overlay_state.js.map +1 -0
- package/dist/presentation/screen/helpers/use_capture_orientation_lock.d.ts +16 -0
- package/dist/presentation/screen/helpers/use_capture_orientation_lock.d.ts.map +1 -0
- package/dist/presentation/screen/helpers/use_capture_orientation_lock.js +37 -0
- package/dist/presentation/screen/helpers/use_capture_orientation_lock.js.map +1 -0
- package/dist/presentation/screen/helpers/use_debounced_feedback_key.d.ts +9 -0
- package/dist/presentation/screen/helpers/use_debounced_feedback_key.d.ts.map +1 -0
- package/dist/presentation/screen/helpers/use_debounced_feedback_key.js +44 -0
- package/dist/presentation/screen/helpers/use_debounced_feedback_key.js.map +1 -0
- package/dist/presentation/screen/helpers/use_document_orientation_lock.d.ts +24 -0
- package/dist/presentation/screen/helpers/use_document_orientation_lock.d.ts.map +1 -0
- package/dist/presentation/screen/helpers/use_document_orientation_lock.js +47 -0
- package/dist/presentation/screen/helpers/use_document_orientation_lock.js.map +1 -0
- package/dist/presentation/screen/use_smile_id_capture_screen.d.ts +71 -0
- package/dist/presentation/screen/use_smile_id_capture_screen.d.ts.map +1 -0
- package/dist/presentation/screen/use_smile_id_capture_screen.js +438 -0
- package/dist/presentation/screen/use_smile_id_capture_screen.js.map +1 -0
- package/dist/presentation/screen/use_smile_id_consent_screen.d.ts +56 -0
- package/dist/presentation/screen/use_smile_id_consent_screen.d.ts.map +1 -0
- package/dist/presentation/screen/use_smile_id_consent_screen.js +175 -0
- package/dist/presentation/screen/use_smile_id_consent_screen.js.map +1 -0
- package/dist/presentation/screen/use_smile_id_document_back_instructions.d.ts +24 -0
- package/dist/presentation/screen/use_smile_id_document_back_instructions.d.ts.map +1 -0
- package/dist/presentation/screen/use_smile_id_document_back_instructions.js +51 -0
- package/dist/presentation/screen/use_smile_id_document_back_instructions.js.map +1 -0
- package/dist/presentation/screen/use_smile_id_document_preview_screen.d.ts +24 -0
- package/dist/presentation/screen/use_smile_id_document_preview_screen.d.ts.map +1 -0
- package/dist/presentation/screen/use_smile_id_document_preview_screen.js +64 -0
- package/dist/presentation/screen/use_smile_id_document_preview_screen.js.map +1 -0
- package/dist/presentation/screen/use_smile_id_instructions_screen.d.ts +39 -0
- package/dist/presentation/screen/use_smile_id_instructions_screen.d.ts.map +1 -0
- package/dist/presentation/screen/use_smile_id_instructions_screen.js +65 -0
- package/dist/presentation/screen/use_smile_id_instructions_screen.js.map +1 -0
- package/dist/presentation/screen/use_smile_id_permission_screen.d.ts +16 -0
- package/dist/presentation/screen/use_smile_id_permission_screen.d.ts.map +1 -0
- package/dist/presentation/screen/use_smile_id_permission_screen.js +28 -0
- package/dist/presentation/screen/use_smile_id_permission_screen.js.map +1 -0
- package/dist/presentation/screen/use_smile_id_preview_screen.d.ts +42 -0
- package/dist/presentation/screen/use_smile_id_preview_screen.d.ts.map +1 -0
- package/dist/presentation/screen/use_smile_id_preview_screen.js +81 -0
- package/dist/presentation/screen/use_smile_id_preview_screen.js.map +1 -0
- package/dist/presentation/screen/use_smile_id_processing_screen.d.ts +55 -0
- package/dist/presentation/screen/use_smile_id_processing_screen.d.ts.map +1 -0
- package/dist/presentation/screen/use_smile_id_processing_screen.js +84 -0
- package/dist/presentation/screen/use_smile_id_processing_screen.js.map +1 -0
- package/dist/presentation/state/processing_state.d.ts +25 -0
- package/dist/presentation/state/processing_state.d.ts.map +1 -0
- package/dist/presentation/state/processing_state.js +2 -0
- package/dist/presentation/state/processing_state.js.map +1 -0
- package/dist/presentation/state/use_smile_id_overlay_state.d.ts +44 -0
- package/dist/presentation/state/use_smile_id_overlay_state.d.ts.map +1 -0
- package/dist/presentation/state/use_smile_id_overlay_state.js +56 -0
- package/dist/presentation/state/use_smile_id_overlay_state.js.map +1 -0
- package/dist/presentation/theme/theme.d.ts +131 -0
- package/dist/presentation/theme/theme.d.ts.map +1 -0
- package/dist/presentation/theme/theme.js +224 -0
- package/dist/presentation/theme/theme.js.map +1 -0
- package/dist/presentation/theme/theme_context.d.ts +14 -0
- package/dist/presentation/theme/theme_context.d.ts.map +1 -0
- package/dist/presentation/theme/theme_context.js +31 -0
- package/dist/presentation/theme/theme_context.js.map +1 -0
- package/dist/presentation/theme/use_smile_id_motion.d.ts +13 -0
- package/dist/presentation/theme/use_smile_id_motion.d.ts.map +1 -0
- package/dist/presentation/theme/use_smile_id_motion.js +13 -0
- package/dist/presentation/theme/use_smile_id_motion.js.map +1 -0
- package/dist/presentation/theme/use_use_smile_id_fonts.d.ts +14 -0
- package/dist/presentation/theme/use_use_smile_id_fonts.d.ts.map +1 -0
- package/dist/presentation/theme/use_use_smile_id_fonts.js +64 -0
- package/dist/presentation/theme/use_use_smile_id_fonts.js.map +1 -0
- package/dist/presentation/utils/force_max_brightness.d.ts +46 -0
- package/dist/presentation/utils/force_max_brightness.d.ts.map +1 -0
- package/dist/presentation/utils/force_max_brightness.js +105 -0
- package/dist/presentation/utils/force_max_brightness.js.map +1 -0
- package/dist/presentation/utils/locale_utils.d.ts +25 -0
- package/dist/presentation/utils/locale_utils.d.ts.map +1 -0
- package/dist/presentation/utils/locale_utils.js +66 -0
- package/dist/presentation/utils/locale_utils.js.map +1 -0
- package/dist/presentation/utils/use_reduced_motion.d.ts +3 -0
- package/dist/presentation/utils/use_reduced_motion.d.ts.map +1 -0
- package/dist/presentation/utils/use_reduced_motion.js +24 -0
- package/dist/presentation/utils/use_reduced_motion.js.map +1 -0
- package/package.json +113 -0
- package/src/__tests__/dsl.test.ts +1115 -0
- package/src/__tests__/enum_parity.test.ts +84 -0
- package/src/__tests__/react_native_mock.tsx +210 -0
- package/src/__tests__/setup_react_native.ts +353 -0
- package/src/__tests__/theme.test.ts +156 -0
- package/src/camera/__tests__/camera_defaults.test.ts +28 -0
- package/src/camera/__tests__/camera_lens.test.ts +18 -0
- package/src/camera/__tests__/document_resize_target.test.ts +44 -0
- package/src/camera/__tests__/focus_state.test.ts +48 -0
- package/src/camera/__tests__/orientation_degrees.test.ts +21 -0
- package/src/camera/__tests__/use_smile_id_frame_stream.test.ts +227 -0
- package/src/camera/camera_configuration.ts +32 -0
- package/src/camera/camera_defaults.ts +23 -0
- package/src/camera/camera_lens.ts +13 -0
- package/src/camera/camera_permissions.ts +36 -0
- package/src/camera/camera_preview_image.ts +19 -0
- package/src/camera/document_image_pipeline.ts +101 -0
- package/src/camera/document_resize_target.ts +22 -0
- package/src/camera/focus_state.ts +26 -0
- package/src/camera/orientation_degrees.ts +22 -0
- package/src/camera/use_smile_id_camera_preview.tsx +256 -0
- package/src/camera/use_smile_id_camera_system.ts +236 -0
- package/src/camera/use_smile_id_frame_stream.ts +189 -0
- package/src/core/exception/__tests__/network_exception_mapper.test.ts +179 -0
- package/src/core/exception/builder_validation_exception.ts +40 -0
- package/src/core/exception/capture_validation_exceptions.ts +8 -0
- package/src/core/exception/consent_validation_exceptions.ts +7 -0
- package/src/core/exception/duplicate_screen_type_exception.ts +22 -0
- package/src/core/exception/empty_screens_block_exception.ts +19 -0
- package/src/core/exception/flow_exceptions.test.ts +39 -0
- package/src/core/exception/flow_exceptions.ts +42 -0
- package/src/core/exception/index.ts +73 -0
- package/src/core/exception/invalid_consent_config_exception.ts +20 -0
- package/src/core/exception/invalid_consent_information_exception.ts +21 -0
- package/src/core/exception/invalid_document_capture_config_exception.ts +22 -0
- package/src/core/exception/invalid_field_value_exception.ts +21 -0
- package/src/core/exception/invalid_job_type_screen_config_exception.ts +70 -0
- package/src/core/exception/invalid_missing_capture_type_exception.ts +19 -0
- package/src/core/exception/invalid_screen_order_exception.ts +28 -0
- package/src/core/exception/invalid_selfie_capture_config_exception.ts +22 -0
- package/src/core/exception/issue_severity.ts +14 -0
- package/src/core/exception/job_validation_exceptions.ts +11 -0
- package/src/core/exception/liveness_frame_count_exception.ts +21 -0
- package/src/core/exception/missing_capture_for_preview_exception.ts +24 -0
- package/src/core/exception/missing_job_type_exception.ts +20 -0
- package/src/core/exception/missing_ml_configuration_block_exception.ts +21 -0
- package/src/core/exception/missing_network_configuration_block_exception.ts +22 -0
- package/src/core/exception/missing_partner_config_exception.ts +38 -0
- package/src/core/exception/missing_required_field_exception.ts +19 -0
- package/src/core/exception/screen_config_validation_exceptions.ts +10 -0
- package/src/core/exception/use_smile_id_attestation_exception.ts +11 -0
- package/src/core/exception/use_smile_id_builder_exception.ts +18 -0
- package/src/core/exception/use_smile_id_camera_exception.ts +12 -0
- package/src/core/exception/use_smile_id_error_code.ts +83 -0
- package/src/core/exception/use_smile_id_exception.ts +52 -0
- package/src/core/exception/use_smile_id_general_exception.ts +12 -0
- package/src/core/exception/use_smile_id_network_exception.ts +279 -0
- package/src/core/exception/use_smile_id_validation_exception.ts +12 -0
- package/src/core/models/__tests__/document_capture_mode.test.ts +43 -0
- package/src/core/models/__tests__/document_type.test.ts +64 -0
- package/src/core/models/__tests__/job_type.test.ts +48 -0
- package/src/core/models/config.ts +36 -0
- package/src/core/models/document_capture_mode.ts +46 -0
- package/src/core/models/document_type.ts +77 -0
- package/src/core/models/flow_step.ts +17 -0
- package/src/core/models/head_turn_direction.ts +15 -0
- package/src/core/models/job_type.ts +53 -0
- package/src/core/models/ml_config.ts +47 -0
- package/src/core/models/network_config.ts +138 -0
- package/src/core/models/params.ts +98 -0
- package/src/core/models/result.test.ts +20 -0
- package/src/core/models/result.ts +32 -0
- package/src/data/api/__tests__/smile_id_api.test.ts +1197 -0
- package/src/data/api/auth/token_holder.ts +72 -0
- package/src/data/api/interceptors/__tests__/logging_interceptor.test.ts +252 -0
- package/src/data/api/interceptors/__tests__/sensitive_headers.test.ts +29 -0
- package/src/data/api/interceptors/__tests__/smile_integrity_interceptor.test.ts +156 -0
- package/src/data/api/interceptors/__tests__/smile_request_mac_interceptor.test.ts +98 -0
- package/src/data/api/interceptors/__tests__/token_refresh_interceptor.test.ts +173 -0
- package/src/data/api/interceptors/gzip_interceptor.ts +31 -0
- package/src/data/api/interceptors/logging_interceptor.ts +155 -0
- package/src/data/api/interceptors/sensitive_headers.ts +46 -0
- package/src/data/api/interceptors/smile_auth_interceptor.ts +88 -0
- package/src/data/api/interceptors/smile_integrity_interceptor.ts +79 -0
- package/src/data/api/interceptors/smile_request_mac_interceptor.ts +93 -0
- package/src/data/api/interceptors/token_refresh_interceptor.ts +122 -0
- package/src/data/api/smile_id_api.ts +488 -0
- package/src/data/dsl/builder/__tests__/interceptor_config_builder.test.ts +173 -0
- package/src/data/dsl/builder/cache_config_builder.ts +26 -0
- package/src/data/dsl/builder/config_builder.ts +125 -0
- package/src/data/dsl/builder/interceptor_config_builder.ts +81 -0
- package/src/data/dsl/builder/retry_config_builder.ts +36 -0
- package/src/data/dsl/builder/timeout_config_builder.ts +24 -0
- package/src/data/dsl/use_smile_id_network_builder.ts +69 -0
- package/src/data/factory/__tests__/networking_factory_order.test.ts +201 -0
- package/src/data/factory/__tests__/signed_job_submission_headers.test.ts +110 -0
- package/src/data/factory/networking_factory.ts +188 -0
- package/src/data/model/__tests__/sdk_config.test.ts +85 -0
- package/src/data/model/__tests__/sdk_config_capture.test.ts +140 -0
- package/src/data/model/image_dimensions.ts +15 -0
- package/src/data/model/job_request.ts +150 -0
- package/src/data/model/job_submission_response.ts +17 -0
- package/src/data/model/sdk_config.ts +74 -0
- package/src/data/model/sdk_config_capture.ts +78 -0
- package/src/data/model/sdk_config_source.ts +26 -0
- package/src/data/repository/__tests__/use_smile_id_repository.test.ts +118 -0
- package/src/data/repository/use_smile_id_repository.ts +19 -0
- package/src/data/repository/use_smile_id_repository_impl.ts +94 -0
- package/src/data/security/__tests__/smile_id_crypto_manager.test.ts +158 -0
- package/src/data/security/request_canonicalizer.ts +148 -0
- package/src/data/security/request_timestamp.ts +12 -0
- package/src/data/security/signing_crypto.ts +219 -0
- package/src/data/security/smile_id_crypto_error.ts +13 -0
- package/src/data/security/smile_id_crypto_manager.ts +46 -0
- package/src/data/smile_id_urls.ts +13 -0
- package/src/data/util/__tests__/retry_util.test.ts +157 -0
- package/src/data/util/__tests__/use_smile_id_token_decoder.test.ts +195 -0
- package/src/data/util/retry_util.ts +72 -0
- package/src/data/util/use_smile_id_token_decoder.ts +138 -0
- package/src/index.ts +512 -0
- package/src/l10n/__tests__/use_smile_id_localizations.test.ts +127 -0
- package/src/l10n/strings_en.ts +171 -0
- package/src/l10n/use_smile_id_localizations.ts +688 -0
- package/src/l10n/use_smile_id_localizations_provider.tsx +71 -0
- package/src/metadata/__tests__/use_smile_id_metadata.test.ts +436 -0
- package/src/metadata/document_image_origin.ts +22 -0
- package/src/metadata/optional_native_modules.ts +120 -0
- package/src/metadata/use_smile_id_metadata.ts +182 -0
- package/src/metadata/use_smile_id_metadata_factory.ts +385 -0
- package/src/presentation/assets/fonts/DMSans-Bold.ttf +0 -0
- package/src/presentation/assets/fonts/DMSans-ExtraBold.ttf +0 -0
- package/src/presentation/assets/fonts/DMSans-Medium.ttf +0 -0
- package/src/presentation/assets/fonts/DMSans-Regular.ttf +0 -0
- package/src/presentation/assets/fonts/DMSans-SemiBold.ttf +0 -0
- package/src/presentation/assets/fonts/OFL.txt +93 -0
- package/src/presentation/assets/si_dark_lighting_animation.json +927 -0
- package/src/presentation/assets/si_device_orientation_animation.json +850 -0
- package/src/presentation/assets/si_document_green_book_hero_animation.json +4668 -0
- package/src/presentation/assets/si_document_hero_animation.json +4799 -0
- package/src/presentation/assets/si_document_hero_back_animation.json +2039 -0
- package/src/presentation/assets/si_document_passport_hero_animation.json +14491 -0
- package/src/presentation/assets/si_ess_animation_all_directions.json +5575 -0
- package/src/presentation/assets/si_selfie_hero_animation.json +1439 -0
- package/src/presentation/assets/si_smile_to_capture_animation.json +1439 -0
- package/src/presentation/assets/svg/instruction_svg_strings.ts +32 -0
- package/src/presentation/assets/svg/si_attribution.svg +19 -0
- package/src/presentation/assets/svg/si_attribution_dark.svg +19 -0
- package/src/presentation/assets/svg/si_checkbox_check.svg +3 -0
- package/src/presentation/assets/svg/si_consent_biometric.svg +9 -0
- package/src/presentation/assets/svg/si_consent_biometric_dark.svg +9 -0
- package/src/presentation/assets/svg/si_consent_contact.svg +8 -0
- package/src/presentation/assets/svg/si_consent_contact_dark.svg +8 -0
- package/src/presentation/assets/svg/si_consent_device.svg +12 -0
- package/src/presentation/assets/svg/si_consent_device_dark.svg +12 -0
- package/src/presentation/assets/svg/si_consent_personal.svg +6 -0
- package/src/presentation/assets/svg/si_consent_personal_dark.svg +6 -0
- package/src/presentation/assets/svg/si_expand_more.svg +3 -0
- package/src/presentation/assets/svg/si_plus.svg +4 -0
- package/src/presentation/assets/svg/si_smile_consent_icon.svg +4 -0
- package/src/presentation/assets/svg/svg_strings.ts +158 -0
- package/src/presentation/components/__tests__/capture_instruction_animation_spec.test.ts +49 -0
- package/src/presentation/components/__tests__/enhanced_smart_selfie_animation_frames.test.ts +91 -0
- package/src/presentation/components/__tests__/use_smile_id_capture_content.test.tsx +348 -0
- package/src/presentation/components/__tests__/use_smile_id_confirmation_buttons.test.tsx +131 -0
- package/src/presentation/components/__tests__/use_smile_id_enhanced_smart_selfie_clip.test.tsx +252 -0
- package/src/presentation/components/__tests__/use_smile_id_enhanced_smart_selfie_direction_animation.test.tsx +138 -0
- package/src/presentation/components/__tests__/use_smile_id_face_overlay.test.tsx +211 -0
- package/src/presentation/components/__tests__/use_smile_id_guideline_thumbnail.test.tsx +79 -0
- package/src/presentation/components/__tests__/use_smile_id_instructions_hero.test.tsx +79 -0
- package/src/presentation/components/__tests__/use_smile_id_loading_indicator.test.tsx +45 -0
- package/src/presentation/components/__tests__/use_smile_id_oval_border_palette.test.ts +101 -0
- package/src/presentation/components/face_oval_defaults.ts +51 -0
- package/src/presentation/components/helpers/__tests__/scaled_oval_geometry.test.ts +69 -0
- package/src/presentation/components/helpers/animated_lottie_view.ts +9 -0
- package/src/presentation/components/helpers/capture_instruction_animation_spec.ts +77 -0
- package/src/presentation/components/helpers/enhanced_smart_selfie_animation_frames.ts +70 -0
- package/src/presentation/components/helpers/scaled_oval_geometry.ts +44 -0
- package/src/presentation/components/icons/index.tsx +287 -0
- package/src/presentation/components/status_indicator_state.ts +21 -0
- package/src/presentation/components/use_smile_id_attribution.tsx +48 -0
- package/src/presentation/components/use_smile_id_back_button.tsx +59 -0
- package/src/presentation/components/use_smile_id_button.tsx +93 -0
- package/src/presentation/components/use_smile_id_capture_content.tsx +344 -0
- package/src/presentation/components/use_smile_id_capture_instruction_animation.tsx +84 -0
- package/src/presentation/components/use_smile_id_capture_spinner.tsx +63 -0
- package/src/presentation/components/use_smile_id_captured_document_image.tsx +86 -0
- package/src/presentation/components/use_smile_id_captured_image_oval.tsx +151 -0
- package/src/presentation/components/use_smile_id_card_surface.tsx +54 -0
- package/src/presentation/components/use_smile_id_confirmation_buttons.tsx +123 -0
- package/src/presentation/components/use_smile_id_consent_row.tsx +58 -0
- package/src/presentation/components/use_smile_id_content_card.tsx +65 -0
- package/src/presentation/components/use_smile_id_document_capture_controls.tsx +155 -0
- package/src/presentation/components/use_smile_id_document_frame_glyph.tsx +162 -0
- package/src/presentation/components/use_smile_id_document_overlay.tsx +245 -0
- package/src/presentation/components/use_smile_id_enhanced_smart_selfie_clip.tsx +152 -0
- package/src/presentation/components/use_smile_id_enhanced_smart_selfie_direction_animation.tsx +46 -0
- package/src/presentation/components/use_smile_id_enhanced_smart_selfie_full_animation.tsx +29 -0
- package/src/presentation/components/use_smile_id_expandable_icon.tsx +102 -0
- package/src/presentation/components/use_smile_id_face_oval_image.tsx +90 -0
- package/src/presentation/components/use_smile_id_face_overlay.tsx +387 -0
- package/src/presentation/components/use_smile_id_face_silhouette_overlay.tsx +27 -0
- package/src/presentation/components/use_smile_id_failed_content.tsx +94 -0
- package/src/presentation/components/use_smile_id_guideline_thumbnail.tsx +134 -0
- package/src/presentation/components/use_smile_id_instructions_hero.tsx +245 -0
- package/src/presentation/components/use_smile_id_learn_more_content.tsx +115 -0
- package/src/presentation/components/use_smile_id_loading_content.tsx +54 -0
- package/src/presentation/components/use_smile_id_loading_indicator.tsx +81 -0
- package/src/presentation/components/use_smile_id_oval_border_palette.ts +60 -0
- package/src/presentation/components/use_smile_id_partner_icon.tsx +56 -0
- package/src/presentation/components/use_smile_id_processing_center_indicator.tsx +77 -0
- package/src/presentation/components/use_smile_id_rounded_checkbox.tsx +67 -0
- package/src/presentation/components/use_smile_id_status_indicator.tsx +44 -0
- package/src/presentation/components/use_smile_id_success_content.tsx +76 -0
- package/src/presentation/flow/__tests__/document_flow_navigation.test.ts +285 -0
- package/src/presentation/flow/__tests__/flow_navigation_manager.test.ts +1163 -0
- package/src/presentation/flow/analytics/__tests__/use_smile_id_analytics_event.test.ts +105 -0
- package/src/presentation/flow/analytics/use_smile_id_analytics_event.ts +83 -0
- package/src/presentation/flow/config/flow_configuration.ts +12 -0
- package/src/presentation/flow/dsl/builder/__tests__/ml_builder.test.ts +161 -0
- package/src/presentation/flow/dsl/builder/__tests__/theme_builder.test.ts +102 -0
- package/src/presentation/flow/dsl/builder/config_builder.ts +22 -0
- package/src/presentation/flow/dsl/builder/ml_builder.ts +201 -0
- package/src/presentation/flow/dsl/builder/screens_builder.ts +180 -0
- package/src/presentation/flow/dsl/builder/theme_builder.ts +102 -0
- package/src/presentation/flow/dsl/flow_build_result.ts +37 -0
- package/src/presentation/flow/dsl/use_smile_id_builder.tsx +123 -0
- package/src/presentation/flow/dsl/use_smile_id_flow_builder.ts +402 -0
- package/src/presentation/flow/flow_navigation_context.tsx +50 -0
- package/src/presentation/flow/flow_navigation_manager.ts +985 -0
- package/src/presentation/flow/graph/screen_renderer.tsx +35 -0
- package/src/presentation/flow/job_submission_state.ts +17 -0
- package/src/presentation/flow/model/instruction_guideline.ts +15 -0
- package/src/presentation/flow/model/instructions_defaults.ts +120 -0
- package/src/presentation/flow/screen/helpers/__tests__/face_session_config.test.ts +115 -0
- package/src/presentation/flow/screen/helpers/face_session_config.ts +77 -0
- package/src/presentation/flow/screen/orchestrated_capture_screen.tsx +296 -0
- package/src/presentation/flow/screen/orchestrated_consent_screen.tsx +66 -0
- package/src/presentation/flow/screen/orchestrated_instructions_screen.tsx +102 -0
- package/src/presentation/flow/screen/orchestrated_preview_screen.tsx +72 -0
- package/src/presentation/flow/screen/orchestrated_processing_screen.tsx +111 -0
- package/src/presentation/flow/screen/use_smile_id_orchestrated_screen_host.tsx +39 -0
- package/src/presentation/flow/screen/validation_error_screen.tsx +147 -0
- package/src/presentation/flow/use_smile_id_flow.tsx +338 -0
- package/src/presentation/flow/validation/__tests__/flow_validator.test.ts +398 -0
- package/src/presentation/flow/validation/__tests__/job_type_validator.test.ts +704 -0
- package/src/presentation/flow/validation/flow_validator.ts +433 -0
- package/src/presentation/flow/validation/job_type_validator.ts +645 -0
- package/src/presentation/flow/validation/validation_state.ts +65 -0
- package/src/presentation/screen/__tests__/capture_screen_helpers.test.ts +112 -0
- package/src/presentation/screen/__tests__/capture_ui_state.test.ts +379 -0
- package/src/presentation/screen/__tests__/consent_screen_helpers.test.ts +63 -0
- package/src/presentation/screen/__tests__/ess_turn_haptics.test.ts +78 -0
- package/src/presentation/screen/__tests__/feedback_debouncer.test.ts +111 -0
- package/src/presentation/screen/__tests__/instructions_screen_helpers.test.ts +142 -0
- package/src/presentation/screen/__tests__/preview_screen_helpers.test.ts +53 -0
- package/src/presentation/screen/__tests__/processing_screen_helpers.test.ts +39 -0
- package/src/presentation/screen/__tests__/scan_state_to_overlay_state.test.ts +203 -0
- package/src/presentation/screen/__tests__/use_smile_id_capture_screen.test.tsx +616 -0
- package/src/presentation/screen/__tests__/use_smile_id_consent_screen.test.tsx +288 -0
- package/src/presentation/screen/__tests__/use_smile_id_document_back_instructions.test.tsx +136 -0
- package/src/presentation/screen/__tests__/use_smile_id_instructions_screen.test.tsx +245 -0
- package/src/presentation/screen/__tests__/use_smile_id_preview_screen.test.tsx +223 -0
- package/src/presentation/screen/__tests__/use_smile_id_processing_screen.test.tsx +333 -0
- package/src/presentation/screen/helpers/capture_screen_helpers.ts +151 -0
- package/src/presentation/screen/helpers/capture_ui_state.ts +298 -0
- package/src/presentation/screen/helpers/consent_screen_helpers.ts +106 -0
- package/src/presentation/screen/helpers/ess_turn_haptics.ts +67 -0
- package/src/presentation/screen/helpers/feedback_debouncer.ts +89 -0
- package/src/presentation/screen/helpers/instructions_screen_helpers.ts +108 -0
- package/src/presentation/screen/helpers/preview_screen_helpers.ts +41 -0
- package/src/presentation/screen/helpers/processing_screen_helpers.ts +27 -0
- package/src/presentation/screen/helpers/scan_state_to_overlay_state.ts +128 -0
- package/src/presentation/screen/helpers/use_capture_orientation_lock.ts +46 -0
- package/src/presentation/screen/helpers/use_debounced_feedback_key.ts +52 -0
- package/src/presentation/screen/use_smile_id_capture_screen.tsx +635 -0
- package/src/presentation/screen/use_smile_id_consent_screen.tsx +382 -0
- package/src/presentation/screen/use_smile_id_document_back_instructions.tsx +134 -0
- package/src/presentation/screen/use_smile_id_document_preview_screen.tsx +142 -0
- package/src/presentation/screen/use_smile_id_instructions_screen.tsx +194 -0
- package/src/presentation/screen/use_smile_id_permission_screen.tsx +52 -0
- package/src/presentation/screen/use_smile_id_preview_screen.tsx +159 -0
- package/src/presentation/screen/use_smile_id_processing_screen.tsx +223 -0
- package/src/presentation/state/__tests__/use_smile_id_overlay_state.test.ts +30 -0
- package/src/presentation/state/processing_state.ts +19 -0
- package/src/presentation/state/use_smile_id_overlay_state.ts +70 -0
- package/src/presentation/theme/theme.ts +399 -0
- package/src/presentation/theme/theme_context.tsx +45 -0
- package/src/presentation/theme/use_smile_id_motion.ts +12 -0
- package/src/presentation/theme/use_use_smile_id_fonts.ts +71 -0
- package/src/presentation/utils/__tests__/force_max_brightness.test.tsx +237 -0
- package/src/presentation/utils/__tests__/locale_utils.test.ts +37 -0
- package/src/presentation/utils/force_max_brightness.tsx +113 -0
- package/src/presentation/utils/locale_utils.ts +71 -0
- package/src/presentation/utils/use_reduced_motion.ts +26 -0
|
@@ -0,0 +1,1163 @@
|
|
|
1
|
+
import { describe, expect, it, vi } from "vitest";
|
|
2
|
+
import {
|
|
3
|
+
FlowNavigationManager,
|
|
4
|
+
type CapturedArtifacts,
|
|
5
|
+
type FlowExitReason,
|
|
6
|
+
type FlowExitHandler,
|
|
7
|
+
} from "../flow_navigation_manager";
|
|
8
|
+
import {
|
|
9
|
+
CaptureType,
|
|
10
|
+
ScreensBuilder,
|
|
11
|
+
type ScreensConfig,
|
|
12
|
+
} from "../dsl/builder/screens_builder";
|
|
13
|
+
import type { FlowConfigurationSnapshot } from "../dsl/use_smile_id_flow_builder";
|
|
14
|
+
import type { JobRequest } from "../../../data/model/job_request";
|
|
15
|
+
import type { UseSmileIDRepository } from "../../../data/repository/use_smile_id_repository";
|
|
16
|
+
import type { JobSubmissionResponse } from "../../../data/model/job_submission_response";
|
|
17
|
+
import {
|
|
18
|
+
failure,
|
|
19
|
+
success,
|
|
20
|
+
type UseSmileIDResult,
|
|
21
|
+
} from "../../../core/models/result";
|
|
22
|
+
import { JobType } from "../../../core/models/job_type";
|
|
23
|
+
import { DocumentType } from "../../../core/models/document_type";
|
|
24
|
+
import { MissingRequiredFieldException } from "../../../core/exception";
|
|
25
|
+
import type { UseSmileIDAnalyticsEvent } from "../analytics/use_smile_id_analytics_event";
|
|
26
|
+
|
|
27
|
+
function buildScreens(block: (s: ScreensBuilder) => void): ScreensConfig {
|
|
28
|
+
const sb = new ScreensBuilder();
|
|
29
|
+
block(sb);
|
|
30
|
+
return sb.build();
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function buildConfig(
|
|
34
|
+
screens: ScreensConfig,
|
|
35
|
+
overrides: Partial<FlowConfigurationSnapshot> = {},
|
|
36
|
+
): FlowConfigurationSnapshot {
|
|
37
|
+
return {
|
|
38
|
+
screens,
|
|
39
|
+
onResult: () => {},
|
|
40
|
+
...overrides,
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function makeManager(
|
|
45
|
+
screens: ScreensConfig,
|
|
46
|
+
onExit: FlowExitHandler = vi.fn(),
|
|
47
|
+
extra: Partial<FlowConfigurationSnapshot> = {},
|
|
48
|
+
repository?: UseSmileIDRepository,
|
|
49
|
+
): FlowNavigationManager {
|
|
50
|
+
return new FlowNavigationManager({
|
|
51
|
+
configuration: buildConfig(screens, extra),
|
|
52
|
+
onExit,
|
|
53
|
+
...(repository ? { repository } : {}),
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
const consentInfo = Object.freeze({
|
|
58
|
+
granted: true,
|
|
59
|
+
grantedAt: "2026-04-30T00:00:00.000Z",
|
|
60
|
+
noticeLanguage: "EN",
|
|
61
|
+
noticePrivacyPolicyUrl: "https://example.test/privacy",
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
const SAMPLE_USER_DETAILS = Object.freeze({
|
|
65
|
+
givenNames: "Jane",
|
|
66
|
+
lastName: "Doe",
|
|
67
|
+
email: "jane@example.test",
|
|
68
|
+
phoneNumber: "+2348000000000",
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
describe("FlowNavigationManager — navigation primitives", () => {
|
|
72
|
+
it("seeds the path with the first configured screen", () => {
|
|
73
|
+
const manager = makeManager(
|
|
74
|
+
buildScreens((screens) => {
|
|
75
|
+
screens.instructions();
|
|
76
|
+
screens.capture((c) => {
|
|
77
|
+
c.captureType = CaptureType.selfie;
|
|
78
|
+
});
|
|
79
|
+
}),
|
|
80
|
+
);
|
|
81
|
+
expect(manager.currentDepth).toBe(0);
|
|
82
|
+
expect(manager.navigationPath.length).toBe(1);
|
|
83
|
+
expect(manager.currentScreen?.kind).toBe("instructions");
|
|
84
|
+
expect(manager.isFirstScreen).toBe(true);
|
|
85
|
+
expect(manager.isLastScreen).toBe(false);
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
it("navigateToNext() pushes the next configured screen onto the path and notifies subscribers", () => {
|
|
89
|
+
const onExit = vi.fn();
|
|
90
|
+
const listener = vi.fn();
|
|
91
|
+
const manager = makeManager(
|
|
92
|
+
buildScreens((screens) => {
|
|
93
|
+
screens.instructions();
|
|
94
|
+
screens.preview();
|
|
95
|
+
screens.processing();
|
|
96
|
+
}),
|
|
97
|
+
onExit,
|
|
98
|
+
);
|
|
99
|
+
manager.subscribe(listener);
|
|
100
|
+
|
|
101
|
+
manager.navigateToNext();
|
|
102
|
+
expect(manager.currentDepth).toBe(1);
|
|
103
|
+
expect(manager.navigationPath.length).toBe(2);
|
|
104
|
+
expect(manager.currentScreen?.kind).toBe("preview");
|
|
105
|
+
expect(listener).toHaveBeenCalledTimes(1);
|
|
106
|
+
|
|
107
|
+
manager.navigateToNext();
|
|
108
|
+
expect(manager.currentDepth).toBe(2);
|
|
109
|
+
expect(manager.navigationPath.length).toBe(3);
|
|
110
|
+
expect(manager.currentScreen?.kind).toBe("processing");
|
|
111
|
+
expect(listener).toHaveBeenCalledTimes(2);
|
|
112
|
+
|
|
113
|
+
expect(onExit).not.toHaveBeenCalled();
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
it("navigateToNext() from the last screen calls onExit with completed reason", () => {
|
|
117
|
+
// Concrete scenario: partner taps "Continue" on the processing
|
|
118
|
+
// screen (the last screen). The orchestrator submits + notifies
|
|
119
|
+
// via onResult — pinned via the `completed` exit reason here.
|
|
120
|
+
const onExit = vi.fn<(reason: FlowExitReason) => void>();
|
|
121
|
+
const manager = makeManager(
|
|
122
|
+
buildScreens((screens) => {
|
|
123
|
+
screens.instructions();
|
|
124
|
+
}),
|
|
125
|
+
onExit,
|
|
126
|
+
);
|
|
127
|
+
manager.navigateToNext();
|
|
128
|
+
// No submission in this flow → empty fields on the carrier; the
|
|
129
|
+
// exit reason still marks the flow as completed.
|
|
130
|
+
expect(onExit).toHaveBeenCalledWith({
|
|
131
|
+
kind: "completed",
|
|
132
|
+
job: { userId: "", jobId: "", status: "", message: "" },
|
|
133
|
+
});
|
|
134
|
+
// Path stays at the last screen — the orchestrator drives
|
|
135
|
+
// unmount, the manager just notifies.
|
|
136
|
+
expect(manager.currentDepth).toBe(0);
|
|
137
|
+
expect(manager.navigationPath.length).toBe(1);
|
|
138
|
+
expect(manager.currentScreen?.kind).toBe("instructions");
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
it("navigateBack() pops the path and notifies subscribers", () => {
|
|
142
|
+
const manager = makeManager(
|
|
143
|
+
buildScreens((screens) => {
|
|
144
|
+
screens.instructions();
|
|
145
|
+
screens.preview();
|
|
146
|
+
}),
|
|
147
|
+
);
|
|
148
|
+
const listener = vi.fn();
|
|
149
|
+
manager.subscribe(listener);
|
|
150
|
+
|
|
151
|
+
manager.navigateToNext(); // path: [instructions, preview]
|
|
152
|
+
listener.mockClear();
|
|
153
|
+
manager.navigateBack();
|
|
154
|
+
|
|
155
|
+
expect(manager.currentDepth).toBe(0);
|
|
156
|
+
expect(manager.navigationPath.length).toBe(1);
|
|
157
|
+
expect(manager.currentScreen?.kind).toBe("instructions");
|
|
158
|
+
expect(listener).toHaveBeenCalledTimes(1);
|
|
159
|
+
});
|
|
160
|
+
|
|
161
|
+
it("navigateBack() from the first screen calls onExit with cancelled reason", () => {
|
|
162
|
+
// Concrete scenario: partner presses Android hardware back on
|
|
163
|
+
// the first screen. The orchestrator pops out of the flow with
|
|
164
|
+
// a cancelled result — partner-app router takes over.
|
|
165
|
+
const onExit = vi.fn<(reason: FlowExitReason) => void>();
|
|
166
|
+
const manager = makeManager(
|
|
167
|
+
buildScreens((screens) => {
|
|
168
|
+
screens.instructions();
|
|
169
|
+
screens.capture((c) => {
|
|
170
|
+
c.captureType = CaptureType.selfie;
|
|
171
|
+
});
|
|
172
|
+
}),
|
|
173
|
+
onExit,
|
|
174
|
+
);
|
|
175
|
+
manager.navigateBack();
|
|
176
|
+
expect(onExit).toHaveBeenCalledWith({ kind: "cancelled" });
|
|
177
|
+
// Path is the source of truth — back at root must leave the path
|
|
178
|
+
// intact (single-element, depth 0). The orchestrator drives
|
|
179
|
+
// unmount; the manager must not pop the path empty.
|
|
180
|
+
expect(manager.currentDepth).toBe(0);
|
|
181
|
+
expect(manager.navigationPath.length).toBe(1);
|
|
182
|
+
expect(manager.currentScreen?.kind).toBe("instructions");
|
|
183
|
+
});
|
|
184
|
+
|
|
185
|
+
it("navigateToStart() collapses the path to just the first configured screen", () => {
|
|
186
|
+
// Concrete scenario: a terminal failure prompts the partner to
|
|
187
|
+
// restart the flow without tearing down the manager (e.g. retry
|
|
188
|
+
// selfie capture from the beginning). The path must reset to a
|
|
189
|
+
// single-element stack pointing at the first configured screen,
|
|
190
|
+
// regardless of how deep the user was.
|
|
191
|
+
const manager = makeManager(
|
|
192
|
+
buildScreens((screens) => {
|
|
193
|
+
screens.instructions();
|
|
194
|
+
screens.preview();
|
|
195
|
+
screens.processing();
|
|
196
|
+
}),
|
|
197
|
+
);
|
|
198
|
+
manager.navigateToNext(); // path: [instructions, preview]
|
|
199
|
+
manager.navigateToNext(); // path: [instructions, preview, processing]
|
|
200
|
+
expect(manager.currentDepth).toBe(2);
|
|
201
|
+
|
|
202
|
+
const listener = vi.fn();
|
|
203
|
+
manager.subscribe(listener);
|
|
204
|
+
manager.navigateToStart();
|
|
205
|
+
|
|
206
|
+
expect(manager.currentDepth).toBe(0);
|
|
207
|
+
expect(manager.navigationPath.length).toBe(1);
|
|
208
|
+
expect(manager.currentScreen?.kind).toBe("instructions");
|
|
209
|
+
expect(listener).toHaveBeenCalledTimes(1);
|
|
210
|
+
});
|
|
211
|
+
|
|
212
|
+
it("navigateToStart() from the first screen is a no-op on path state", () => {
|
|
213
|
+
// Already at the start — calling navigateToStart() must keep the
|
|
214
|
+
// path at a single-element stack pointing at the first screen.
|
|
215
|
+
const manager = makeManager(
|
|
216
|
+
buildScreens((screens) => {
|
|
217
|
+
screens.instructions();
|
|
218
|
+
screens.preview();
|
|
219
|
+
}),
|
|
220
|
+
);
|
|
221
|
+
manager.navigateToStart();
|
|
222
|
+
expect(manager.currentDepth).toBe(0);
|
|
223
|
+
expect(manager.navigationPath.length).toBe(1);
|
|
224
|
+
expect(manager.currentScreen?.kind).toBe("instructions");
|
|
225
|
+
});
|
|
226
|
+
|
|
227
|
+
it("exit() calls onExit immediately with the supplied reason", () => {
|
|
228
|
+
const onExit = vi.fn<(reason: FlowExitReason) => void>();
|
|
229
|
+
const manager = makeManager(
|
|
230
|
+
buildScreens((screens) => {
|
|
231
|
+
screens.processing();
|
|
232
|
+
}),
|
|
233
|
+
onExit,
|
|
234
|
+
);
|
|
235
|
+
const error = new Error("submission failed");
|
|
236
|
+
manager.exit({ kind: "failed", error });
|
|
237
|
+
expect(onExit).toHaveBeenCalledWith({ kind: "failed", error });
|
|
238
|
+
});
|
|
239
|
+
|
|
240
|
+
it("exit() with no argument defaults to cancelled", () => {
|
|
241
|
+
const onExit = vi.fn<(reason: FlowExitReason) => void>();
|
|
242
|
+
const manager = makeManager(
|
|
243
|
+
buildScreens((screens) => {
|
|
244
|
+
screens.instructions();
|
|
245
|
+
}),
|
|
246
|
+
onExit,
|
|
247
|
+
);
|
|
248
|
+
manager.exit();
|
|
249
|
+
expect(onExit).toHaveBeenCalledWith({ kind: "cancelled" });
|
|
250
|
+
});
|
|
251
|
+
});
|
|
252
|
+
|
|
253
|
+
describe("FlowNavigationManager — captured artifacts", () => {
|
|
254
|
+
it("starts with empty livenessPaths and no other artifacts", () => {
|
|
255
|
+
const manager = makeManager(
|
|
256
|
+
buildScreens((screens) => screens.instructions()),
|
|
257
|
+
);
|
|
258
|
+
expect(manager.captured).toEqual<CapturedArtifacts>({
|
|
259
|
+
livenessPaths: [],
|
|
260
|
+
});
|
|
261
|
+
});
|
|
262
|
+
|
|
263
|
+
it("records selfie + liveness paths atomically and freezes the array", () => {
|
|
264
|
+
// Concrete scenario: a future refactor that mutates
|
|
265
|
+
// `livenessPaths` after capture would silently change the
|
|
266
|
+
// submitted images mid-flow. The frozen array is the contract
|
|
267
|
+
// — the orchestrator sees a stable snapshot.
|
|
268
|
+
const manager = makeManager(
|
|
269
|
+
buildScreens((screens) =>
|
|
270
|
+
screens.capture((c) => {
|
|
271
|
+
c.captureType = CaptureType.selfie;
|
|
272
|
+
}),
|
|
273
|
+
),
|
|
274
|
+
);
|
|
275
|
+
const liveness = ["file:///a.jpg", "file:///b.jpg"];
|
|
276
|
+
manager.setCapturedSelfie("file:///selfie.jpg", liveness);
|
|
277
|
+
expect(manager.captured.selfiePath).toBe("file:///selfie.jpg");
|
|
278
|
+
expect(manager.captured.livenessPaths).toEqual(liveness);
|
|
279
|
+
expect(Object.isFrozen(manager.captured.livenessPaths)).toBe(true);
|
|
280
|
+
});
|
|
281
|
+
|
|
282
|
+
it("records front + back document paths separately", () => {
|
|
283
|
+
const manager = makeManager(
|
|
284
|
+
buildScreens((screens) =>
|
|
285
|
+
screens.capture((c) => {
|
|
286
|
+
c.captureType = CaptureType.document;
|
|
287
|
+
}),
|
|
288
|
+
),
|
|
289
|
+
);
|
|
290
|
+
manager.setCapturedFrontDocument("file:///front.jpg");
|
|
291
|
+
expect(manager.captured.frontDocumentPath).toBe("file:///front.jpg");
|
|
292
|
+
expect(manager.captured.backDocumentPath).toBeUndefined();
|
|
293
|
+
manager.setCapturedBackDocument("file:///back.jpg");
|
|
294
|
+
expect(manager.captured.backDocumentPath).toBe("file:///back.jpg");
|
|
295
|
+
// Front not clobbered.
|
|
296
|
+
expect(manager.captured.frontDocumentPath).toBe("file:///front.jpg");
|
|
297
|
+
});
|
|
298
|
+
|
|
299
|
+
it("records consent without affecting other artifacts", () => {
|
|
300
|
+
const manager = makeManager(buildScreens((screens) => screens.consent()));
|
|
301
|
+
manager.setCapturedSelfie("file:///selfie.jpg", []);
|
|
302
|
+
manager.setConsent(consentInfo);
|
|
303
|
+
expect(manager.captured.consentInformation).toEqual(consentInfo);
|
|
304
|
+
expect(manager.captured.selfiePath).toBe("file:///selfie.jpg");
|
|
305
|
+
});
|
|
306
|
+
|
|
307
|
+
it("notifies subscribers on each artifact recording", () => {
|
|
308
|
+
const manager = makeManager(
|
|
309
|
+
buildScreens((screens) =>
|
|
310
|
+
screens.capture((c) => {
|
|
311
|
+
c.captureType = CaptureType.selfie;
|
|
312
|
+
}),
|
|
313
|
+
),
|
|
314
|
+
);
|
|
315
|
+
const listener = vi.fn();
|
|
316
|
+
manager.subscribe(listener);
|
|
317
|
+
manager.setCapturedSelfie("file:///s.jpg", []);
|
|
318
|
+
manager.setCapturedFrontDocument("file:///f.jpg");
|
|
319
|
+
manager.setConsent(consentInfo);
|
|
320
|
+
expect(listener).toHaveBeenCalledTimes(3);
|
|
321
|
+
});
|
|
322
|
+
});
|
|
323
|
+
|
|
324
|
+
describe("FlowNavigationManager — subscribe / dispose", () => {
|
|
325
|
+
it("subscribe() returns an unsubscribe function", () => {
|
|
326
|
+
const manager = makeManager(
|
|
327
|
+
buildScreens((screens) => {
|
|
328
|
+
screens.instructions();
|
|
329
|
+
screens.processing();
|
|
330
|
+
}),
|
|
331
|
+
);
|
|
332
|
+
const listener = vi.fn();
|
|
333
|
+
const unsubscribe = manager.subscribe(listener);
|
|
334
|
+
manager.navigateToNext();
|
|
335
|
+
expect(listener).toHaveBeenCalledTimes(1);
|
|
336
|
+
unsubscribe();
|
|
337
|
+
manager.navigateBack();
|
|
338
|
+
// Listener should NOT fire after unsubscribe.
|
|
339
|
+
expect(listener).toHaveBeenCalledTimes(1);
|
|
340
|
+
});
|
|
341
|
+
|
|
342
|
+
it("dispose() drops all listeners and makes navigation methods no-op", () => {
|
|
343
|
+
// Concrete scenario: the orchestrator unmounts mid-flow (partner
|
|
344
|
+
// navigated away). After dispose, any in-flight async path
|
|
345
|
+
// (camera frame, network response) trying to call `navigateToNext()`
|
|
346
|
+
// must not fire listeners against a stale manager.
|
|
347
|
+
const onExit = vi.fn();
|
|
348
|
+
const manager = makeManager(
|
|
349
|
+
buildScreens((screens) => {
|
|
350
|
+
screens.instructions();
|
|
351
|
+
screens.processing();
|
|
352
|
+
}),
|
|
353
|
+
onExit,
|
|
354
|
+
);
|
|
355
|
+
const listener = vi.fn();
|
|
356
|
+
manager.subscribe(listener);
|
|
357
|
+
manager.dispose();
|
|
358
|
+
|
|
359
|
+
manager.navigateToNext();
|
|
360
|
+
manager.navigateBack();
|
|
361
|
+
manager.exit();
|
|
362
|
+
manager.setCapturedSelfie("file:///s.jpg", []);
|
|
363
|
+
|
|
364
|
+
expect(listener).not.toHaveBeenCalled();
|
|
365
|
+
expect(onExit).not.toHaveBeenCalled();
|
|
366
|
+
});
|
|
367
|
+
|
|
368
|
+
it("listener errors do not break the dispatch chain", () => {
|
|
369
|
+
// Concrete scenario: a partner-supplied listener (custom screen
|
|
370
|
+
// hook) throws on a particular state. The remaining listeners
|
|
371
|
+
// (including the orchestrator's re-render trigger) must still
|
|
372
|
+
// fire so the flow keeps running.
|
|
373
|
+
const manager = makeManager(
|
|
374
|
+
buildScreens((screens) => {
|
|
375
|
+
screens.instructions();
|
|
376
|
+
screens.preview();
|
|
377
|
+
}),
|
|
378
|
+
);
|
|
379
|
+
const buggy = vi.fn(() => {
|
|
380
|
+
throw new Error("partner listener bug");
|
|
381
|
+
});
|
|
382
|
+
const healthy = vi.fn();
|
|
383
|
+
manager.subscribe(buggy);
|
|
384
|
+
manager.subscribe(healthy);
|
|
385
|
+
expect(() => manager.navigateToNext()).not.toThrow();
|
|
386
|
+
expect(buggy).toHaveBeenCalledTimes(1);
|
|
387
|
+
expect(healthy).toHaveBeenCalledTimes(1);
|
|
388
|
+
});
|
|
389
|
+
});
|
|
390
|
+
|
|
391
|
+
// Submission lifecycle ---------------------------------------------------
|
|
392
|
+
|
|
393
|
+
const RESPONSE: JobSubmissionResponse = Object.freeze({
|
|
394
|
+
jobId: "job-1",
|
|
395
|
+
userId: "user-1",
|
|
396
|
+
status: "completed",
|
|
397
|
+
message: "Job completed successfully",
|
|
398
|
+
});
|
|
399
|
+
|
|
400
|
+
class StubRepository implements UseSmileIDRepository {
|
|
401
|
+
readonly received: JobRequest[] = [];
|
|
402
|
+
result: UseSmileIDResult<JobSubmissionResponse> = success(RESPONSE);
|
|
403
|
+
/** Pending promise so tests can drive the async state transition. */
|
|
404
|
+
private _resolver:
|
|
405
|
+
| ((r: UseSmileIDResult<JobSubmissionResponse>) => void)
|
|
406
|
+
| null = null;
|
|
407
|
+
/** When true, `submit` returns a manual-resolve promise instead of `result`. */
|
|
408
|
+
manual = false;
|
|
409
|
+
|
|
410
|
+
submit(
|
|
411
|
+
request: JobRequest,
|
|
412
|
+
): Promise<UseSmileIDResult<JobSubmissionResponse>> {
|
|
413
|
+
this.received.push(request);
|
|
414
|
+
if (this.manual) {
|
|
415
|
+
return new Promise((resolve) => {
|
|
416
|
+
this._resolver = resolve;
|
|
417
|
+
});
|
|
418
|
+
}
|
|
419
|
+
return Promise.resolve(this.result);
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
resolve(result: UseSmileIDResult<JobSubmissionResponse>): void {
|
|
423
|
+
if (!this._resolver) throw new Error("no pending submit to resolve");
|
|
424
|
+
const resolver = this._resolver;
|
|
425
|
+
this._resolver = null;
|
|
426
|
+
resolver(result);
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
describe("FlowNavigationManager — submission lifecycle", () => {
|
|
431
|
+
it("starts in notAttempted state", () => {
|
|
432
|
+
const manager = makeManager(
|
|
433
|
+
buildScreens((screens) => screens.processing()),
|
|
434
|
+
);
|
|
435
|
+
expect(manager.jobSubmissionState.kind).toBe("notAttempted");
|
|
436
|
+
});
|
|
437
|
+
|
|
438
|
+
it("beginSubmissionIfNeeded fails with a configured-message when no repository was supplied", async () => {
|
|
439
|
+
// Concrete scenario: partner mounts <UseSmileIDBuilder> for a
|
|
440
|
+
// capture-only smoke test (no `b.network(...)`). The processing
|
|
441
|
+
// screen surfaces the configuration gap rather than spinning
|
|
442
|
+
// forever.
|
|
443
|
+
const manager = makeManager(
|
|
444
|
+
buildScreens((screens) => screens.processing()),
|
|
445
|
+
);
|
|
446
|
+
manager.beginSubmissionIfNeeded();
|
|
447
|
+
await flushMicrotasks();
|
|
448
|
+
expect(manager.jobSubmissionState.kind).toBe("failure");
|
|
449
|
+
if (manager.jobSubmissionState.kind === "failure") {
|
|
450
|
+
expect(manager.jobSubmissionState.error.message).toMatch(
|
|
451
|
+
/not configured/i,
|
|
452
|
+
);
|
|
453
|
+
}
|
|
454
|
+
});
|
|
455
|
+
|
|
456
|
+
it("beginSubmissionIfNeeded transitions notAttempted → loading → success", async () => {
|
|
457
|
+
const repository = new StubRepository();
|
|
458
|
+
repository.manual = true;
|
|
459
|
+
const manager = makeManager(
|
|
460
|
+
buildScreens((screens) => screens.processing()),
|
|
461
|
+
vi.fn(),
|
|
462
|
+
{
|
|
463
|
+
enhancedKYCParams: {
|
|
464
|
+
idType: "PASSPORT",
|
|
465
|
+
idNumber: "X123",
|
|
466
|
+
country: "NG",
|
|
467
|
+
},
|
|
468
|
+
userDetails: SAMPLE_USER_DETAILS,
|
|
469
|
+
network: {
|
|
470
|
+
config: {
|
|
471
|
+
jobType: JobType.enhancedKyc,
|
|
472
|
+
token: "k",
|
|
473
|
+
partnerConfig: {
|
|
474
|
+
partnerId: "p",
|
|
475
|
+
callbackUrl: "",
|
|
476
|
+
useSandbox: true,
|
|
477
|
+
},
|
|
478
|
+
},
|
|
479
|
+
},
|
|
480
|
+
},
|
|
481
|
+
repository,
|
|
482
|
+
);
|
|
483
|
+
|
|
484
|
+
manager.beginSubmissionIfNeeded();
|
|
485
|
+
// Synchronous transition to loading happens inside the
|
|
486
|
+
// microtask-triggering `_submit` before the first await.
|
|
487
|
+
await flushMicrotasks();
|
|
488
|
+
expect(manager.jobSubmissionState.kind).toBe("loading");
|
|
489
|
+
|
|
490
|
+
repository.resolve(success(RESPONSE));
|
|
491
|
+
await flushMicrotasks();
|
|
492
|
+
|
|
493
|
+
expect(manager.jobSubmissionState.kind).toBe("success");
|
|
494
|
+
expect(repository.received).toHaveLength(1);
|
|
495
|
+
expect(repository.received[0]?.jobType).toBe(JobType.enhancedKyc);
|
|
496
|
+
});
|
|
497
|
+
|
|
498
|
+
it("transitions loading → failure on repository error", async () => {
|
|
499
|
+
const repository = new StubRepository();
|
|
500
|
+
repository.result = failure(new Error("[503] service unavailable"));
|
|
501
|
+
const manager = makeManager(
|
|
502
|
+
buildScreens((screens) => screens.processing()),
|
|
503
|
+
vi.fn(),
|
|
504
|
+
{
|
|
505
|
+
enhancedKYCParams: {
|
|
506
|
+
idType: "BVN",
|
|
507
|
+
idNumber: "1",
|
|
508
|
+
country: "NG",
|
|
509
|
+
},
|
|
510
|
+
userDetails: SAMPLE_USER_DETAILS,
|
|
511
|
+
network: {
|
|
512
|
+
config: {
|
|
513
|
+
jobType: JobType.enhancedKyc,
|
|
514
|
+
token: "k",
|
|
515
|
+
partnerConfig: {
|
|
516
|
+
partnerId: "p",
|
|
517
|
+
callbackUrl: "",
|
|
518
|
+
useSandbox: true,
|
|
519
|
+
},
|
|
520
|
+
},
|
|
521
|
+
},
|
|
522
|
+
},
|
|
523
|
+
repository,
|
|
524
|
+
);
|
|
525
|
+
|
|
526
|
+
manager.beginSubmissionIfNeeded();
|
|
527
|
+
await flushMicrotasks();
|
|
528
|
+
expect(manager.jobSubmissionState.kind).toBe("failure");
|
|
529
|
+
});
|
|
530
|
+
|
|
531
|
+
it("beginSubmissionIfNeeded is idempotent — second call while loading is a no-op", async () => {
|
|
532
|
+
const repository = new StubRepository();
|
|
533
|
+
repository.manual = true;
|
|
534
|
+
const manager = makeManager(
|
|
535
|
+
buildScreens((screens) => screens.processing()),
|
|
536
|
+
vi.fn(),
|
|
537
|
+
{
|
|
538
|
+
enhancedKYCParams: {
|
|
539
|
+
idType: "BVN",
|
|
540
|
+
idNumber: "1",
|
|
541
|
+
country: "NG",
|
|
542
|
+
},
|
|
543
|
+
userDetails: SAMPLE_USER_DETAILS,
|
|
544
|
+
network: {
|
|
545
|
+
config: {
|
|
546
|
+
jobType: JobType.enhancedKyc,
|
|
547
|
+
token: "k",
|
|
548
|
+
partnerConfig: {
|
|
549
|
+
partnerId: "p",
|
|
550
|
+
callbackUrl: "",
|
|
551
|
+
useSandbox: true,
|
|
552
|
+
},
|
|
553
|
+
},
|
|
554
|
+
},
|
|
555
|
+
},
|
|
556
|
+
repository,
|
|
557
|
+
);
|
|
558
|
+
|
|
559
|
+
manager.beginSubmissionIfNeeded();
|
|
560
|
+
manager.beginSubmissionIfNeeded(); // second call must be ignored
|
|
561
|
+
await flushMicrotasks();
|
|
562
|
+
expect(repository.received).toHaveLength(1);
|
|
563
|
+
});
|
|
564
|
+
|
|
565
|
+
it("retrySubmission resets state and re-fires the request", async () => {
|
|
566
|
+
const repository = new StubRepository();
|
|
567
|
+
repository.result = failure(new Error("transient"));
|
|
568
|
+
const manager = makeManager(
|
|
569
|
+
buildScreens((screens) => screens.processing()),
|
|
570
|
+
vi.fn(),
|
|
571
|
+
{
|
|
572
|
+
enhancedKYCParams: {
|
|
573
|
+
idType: "BVN",
|
|
574
|
+
idNumber: "1",
|
|
575
|
+
country: "NG",
|
|
576
|
+
},
|
|
577
|
+
userDetails: SAMPLE_USER_DETAILS,
|
|
578
|
+
network: {
|
|
579
|
+
config: {
|
|
580
|
+
jobType: JobType.enhancedKyc,
|
|
581
|
+
token: "k",
|
|
582
|
+
partnerConfig: {
|
|
583
|
+
partnerId: "p",
|
|
584
|
+
callbackUrl: "",
|
|
585
|
+
useSandbox: true,
|
|
586
|
+
},
|
|
587
|
+
},
|
|
588
|
+
},
|
|
589
|
+
},
|
|
590
|
+
repository,
|
|
591
|
+
);
|
|
592
|
+
|
|
593
|
+
manager.beginSubmissionIfNeeded();
|
|
594
|
+
await flushMicrotasks();
|
|
595
|
+
expect(manager.jobSubmissionState.kind).toBe("failure");
|
|
596
|
+
|
|
597
|
+
repository.result = success(RESPONSE);
|
|
598
|
+
manager.retrySubmission();
|
|
599
|
+
await flushMicrotasks();
|
|
600
|
+
|
|
601
|
+
expect(repository.received).toHaveLength(2);
|
|
602
|
+
expect(manager.jobSubmissionState.kind).toBe("success");
|
|
603
|
+
});
|
|
604
|
+
|
|
605
|
+
it("does not update state if the manager is disposed mid-submission", async () => {
|
|
606
|
+
const repository = new StubRepository();
|
|
607
|
+
repository.manual = true;
|
|
608
|
+
const manager = makeManager(
|
|
609
|
+
buildScreens((screens) => screens.processing()),
|
|
610
|
+
vi.fn(),
|
|
611
|
+
{
|
|
612
|
+
enhancedKYCParams: {
|
|
613
|
+
idType: "BVN",
|
|
614
|
+
idNumber: "1",
|
|
615
|
+
country: "NG",
|
|
616
|
+
},
|
|
617
|
+
userDetails: SAMPLE_USER_DETAILS,
|
|
618
|
+
network: {
|
|
619
|
+
config: {
|
|
620
|
+
jobType: JobType.enhancedKyc,
|
|
621
|
+
token: "k",
|
|
622
|
+
partnerConfig: {
|
|
623
|
+
partnerId: "p",
|
|
624
|
+
callbackUrl: "",
|
|
625
|
+
useSandbox: true,
|
|
626
|
+
},
|
|
627
|
+
},
|
|
628
|
+
},
|
|
629
|
+
},
|
|
630
|
+
repository,
|
|
631
|
+
);
|
|
632
|
+
|
|
633
|
+
manager.beginSubmissionIfNeeded();
|
|
634
|
+
await flushMicrotasks();
|
|
635
|
+
expect(manager.jobSubmissionState.kind).toBe("loading");
|
|
636
|
+
|
|
637
|
+
manager.dispose();
|
|
638
|
+
repository.resolve(success(RESPONSE));
|
|
639
|
+
await flushMicrotasks();
|
|
640
|
+
// State frozen at loading — no use-after-dispose write.
|
|
641
|
+
expect(manager.jobSubmissionState.kind).toBe("loading");
|
|
642
|
+
});
|
|
643
|
+
|
|
644
|
+
it("transitions to failure when the configured job type is unset", async () => {
|
|
645
|
+
const repository = new StubRepository();
|
|
646
|
+
const manager = makeManager(
|
|
647
|
+
buildScreens((screens) => screens.processing()),
|
|
648
|
+
vi.fn(),
|
|
649
|
+
{
|
|
650
|
+
// network present (so repository is wired) but jobType omitted
|
|
651
|
+
network: {
|
|
652
|
+
config: {
|
|
653
|
+
token: "k",
|
|
654
|
+
partnerConfig: {
|
|
655
|
+
partnerId: "p",
|
|
656
|
+
callbackUrl: "",
|
|
657
|
+
useSandbox: true,
|
|
658
|
+
},
|
|
659
|
+
},
|
|
660
|
+
},
|
|
661
|
+
},
|
|
662
|
+
repository,
|
|
663
|
+
);
|
|
664
|
+
manager.beginSubmissionIfNeeded();
|
|
665
|
+
await flushMicrotasks();
|
|
666
|
+
expect(manager.jobSubmissionState.kind).toBe("failure");
|
|
667
|
+
expect(repository.received).toHaveLength(0);
|
|
668
|
+
});
|
|
669
|
+
});
|
|
670
|
+
|
|
671
|
+
describe("FlowNavigationManager — request assembly per JobType", () => {
|
|
672
|
+
function assembleRequest(
|
|
673
|
+
jobType: JobType,
|
|
674
|
+
extraConfig: Partial<FlowConfigurationSnapshot> = {},
|
|
675
|
+
seedManager: (m: FlowNavigationManager) => void = () => {},
|
|
676
|
+
): JobRequest {
|
|
677
|
+
const repository = new StubRepository();
|
|
678
|
+
const manager = makeManager(
|
|
679
|
+
buildScreens((screens) => screens.processing()),
|
|
680
|
+
vi.fn(),
|
|
681
|
+
{
|
|
682
|
+
...extraConfig,
|
|
683
|
+
network: {
|
|
684
|
+
config: {
|
|
685
|
+
jobType,
|
|
686
|
+
token: "k",
|
|
687
|
+
partnerConfig: {
|
|
688
|
+
partnerId: "p",
|
|
689
|
+
callbackUrl: "",
|
|
690
|
+
useSandbox: true,
|
|
691
|
+
},
|
|
692
|
+
},
|
|
693
|
+
},
|
|
694
|
+
},
|
|
695
|
+
repository,
|
|
696
|
+
);
|
|
697
|
+
seedManager(manager);
|
|
698
|
+
manager.beginSubmissionIfNeeded();
|
|
699
|
+
return repository.received[0]!;
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
it("smartSelfieEnrollment uses captured selfie + liveness", () => {
|
|
703
|
+
const request = assembleRequest(
|
|
704
|
+
JobType.smartSelfieEnrollment,
|
|
705
|
+
{ userDetails: SAMPLE_USER_DETAILS },
|
|
706
|
+
(m) => {
|
|
707
|
+
m.setCapturedSelfie("file:///selfie.jpg", ["file:///l1.jpg"]);
|
|
708
|
+
m.setConsent(consentInfo);
|
|
709
|
+
},
|
|
710
|
+
);
|
|
711
|
+
expect(request.jobType).toBe(JobType.smartSelfieEnrollment);
|
|
712
|
+
if (request.jobType === JobType.smartSelfieEnrollment) {
|
|
713
|
+
expect(request.selfieImage).toBe("file:///selfie.jpg");
|
|
714
|
+
expect(request.livenessImages).toEqual(["file:///l1.jpg"]);
|
|
715
|
+
expect(request.consent).toEqual(consentInfo);
|
|
716
|
+
expect(request.userDetails).toEqual(SAMPLE_USER_DETAILS);
|
|
717
|
+
}
|
|
718
|
+
});
|
|
719
|
+
|
|
720
|
+
it("smartSelfieAuthentication uses captured selfie + liveness", () => {
|
|
721
|
+
const request = assembleRequest(
|
|
722
|
+
JobType.smartSelfieAuthentication,
|
|
723
|
+
{ userDetails: SAMPLE_USER_DETAILS, userId: "prior-enrollment-user-id" },
|
|
724
|
+
(m) => m.setCapturedSelfie("file:///s.jpg", []),
|
|
725
|
+
);
|
|
726
|
+
expect(request.jobType).toBe(JobType.smartSelfieAuthentication);
|
|
727
|
+
if (request.jobType === JobType.smartSelfieAuthentication) {
|
|
728
|
+
expect(request.userDetails).toEqual(SAMPLE_USER_DETAILS);
|
|
729
|
+
expect(request.userId).toBe("prior-enrollment-user-id");
|
|
730
|
+
}
|
|
731
|
+
});
|
|
732
|
+
|
|
733
|
+
it("documentVerification carries front + back paths, country, idType, and userDetails", () => {
|
|
734
|
+
const request = assembleRequest(
|
|
735
|
+
JobType.documentVerification,
|
|
736
|
+
{
|
|
737
|
+
documentVerificationParams: { country: "KE", idType: "NATIONAL_ID" },
|
|
738
|
+
userDetails: SAMPLE_USER_DETAILS,
|
|
739
|
+
},
|
|
740
|
+
(m) => {
|
|
741
|
+
m.setCapturedSelfie("file:///s.jpg", []);
|
|
742
|
+
m.setCapturedFrontDocument("file:///front.jpg");
|
|
743
|
+
m.setCapturedBackDocument("file:///back.jpg");
|
|
744
|
+
},
|
|
745
|
+
);
|
|
746
|
+
expect(request.jobType).toBe(JobType.documentVerification);
|
|
747
|
+
if (request.jobType === JobType.documentVerification) {
|
|
748
|
+
expect(request.frontDocument).toBe("file:///front.jpg");
|
|
749
|
+
expect(request.backDocument).toBe("file:///back.jpg");
|
|
750
|
+
expect(request.country).toBe("KE");
|
|
751
|
+
expect(request.idType).toBe("NATIONAL_ID");
|
|
752
|
+
expect(request.userDetails).toEqual(SAMPLE_USER_DETAILS);
|
|
753
|
+
}
|
|
754
|
+
});
|
|
755
|
+
|
|
756
|
+
it("documentVerification omits idType when the params leave it unset", () => {
|
|
757
|
+
const request = assembleRequest(
|
|
758
|
+
JobType.documentVerification,
|
|
759
|
+
{
|
|
760
|
+
documentVerificationParams: { country: "KE" },
|
|
761
|
+
userDetails: SAMPLE_USER_DETAILS,
|
|
762
|
+
},
|
|
763
|
+
(m) => {
|
|
764
|
+
m.setCapturedSelfie("file:///s.jpg", []);
|
|
765
|
+
m.setCapturedFrontDocument("file:///front.jpg");
|
|
766
|
+
},
|
|
767
|
+
);
|
|
768
|
+
expect(request.jobType).toBe(JobType.documentVerification);
|
|
769
|
+
if (request.jobType === JobType.documentVerification) {
|
|
770
|
+
expect(request.idType).toBeUndefined();
|
|
771
|
+
expect(request.country).toBe("KE");
|
|
772
|
+
}
|
|
773
|
+
});
|
|
774
|
+
|
|
775
|
+
it("enhancedDocumentVerification produces a distinct request kind with required idType", () => {
|
|
776
|
+
// Parity with Android / iOS / Flutter — the enhanced variant lands
|
|
777
|
+
// on its own JobRequest kind (and its own repository dispatch case)
|
|
778
|
+
// rather than discriminating via a boolean flag on the base kind.
|
|
779
|
+
const request = assembleRequest(
|
|
780
|
+
JobType.enhancedDocumentVerification,
|
|
781
|
+
{
|
|
782
|
+
enhancedDocumentVerificationParams: {
|
|
783
|
+
country: "ZA",
|
|
784
|
+
idType: "PASSPORT",
|
|
785
|
+
},
|
|
786
|
+
userDetails: SAMPLE_USER_DETAILS,
|
|
787
|
+
},
|
|
788
|
+
(m) => {
|
|
789
|
+
m.setCapturedSelfie("file:///s.jpg", []);
|
|
790
|
+
m.setCapturedFrontDocument("file:///front.jpg");
|
|
791
|
+
},
|
|
792
|
+
);
|
|
793
|
+
expect(request.jobType).toBe(JobType.enhancedDocumentVerification);
|
|
794
|
+
if (request.jobType === JobType.enhancedDocumentVerification) {
|
|
795
|
+
expect(request.frontDocument).toBe("file:///front.jpg");
|
|
796
|
+
expect(request.backDocument).toBeUndefined();
|
|
797
|
+
expect(request.country).toBe("ZA");
|
|
798
|
+
expect(request.idType).toBe("PASSPORT");
|
|
799
|
+
expect(request.userDetails).toEqual(SAMPLE_USER_DETAILS);
|
|
800
|
+
}
|
|
801
|
+
});
|
|
802
|
+
|
|
803
|
+
it("biometricKyc carries id fields and top-level userDetails", () => {
|
|
804
|
+
const request = assembleRequest(
|
|
805
|
+
JobType.biometricKyc,
|
|
806
|
+
{
|
|
807
|
+
biometricKYCParams: {
|
|
808
|
+
idType: "PASSPORT",
|
|
809
|
+
idNumber: "P1",
|
|
810
|
+
country: "NG",
|
|
811
|
+
useEnrolledImage: false,
|
|
812
|
+
},
|
|
813
|
+
userDetails: {
|
|
814
|
+
givenNames: "Jane",
|
|
815
|
+
lastName: "Doe",
|
|
816
|
+
email: "jane@example.test",
|
|
817
|
+
phoneNumber: "+2348000000000",
|
|
818
|
+
},
|
|
819
|
+
},
|
|
820
|
+
(m) => m.setCapturedSelfie("file:///s.jpg", []),
|
|
821
|
+
);
|
|
822
|
+
expect(request.jobType).toBe(JobType.biometricKyc);
|
|
823
|
+
if (request.jobType === JobType.biometricKyc) {
|
|
824
|
+
expect(request.params.idNumber).toBe("P1");
|
|
825
|
+
expect(request.params.country).toBe("NG");
|
|
826
|
+
expect(request.userDetails.givenNames).toBe("Jane");
|
|
827
|
+
expect(request.userDetails.email).toBe("jane@example.test");
|
|
828
|
+
}
|
|
829
|
+
});
|
|
830
|
+
|
|
831
|
+
it("enhancedKyc carries enhancedKYCParams plus top-level userDetails", () => {
|
|
832
|
+
const request = assembleRequest(JobType.enhancedKyc, {
|
|
833
|
+
enhancedKYCParams: {
|
|
834
|
+
idType: "PASSPORT",
|
|
835
|
+
idNumber: "X1",
|
|
836
|
+
country: "NG",
|
|
837
|
+
},
|
|
838
|
+
userDetails: SAMPLE_USER_DETAILS,
|
|
839
|
+
});
|
|
840
|
+
expect(request.jobType).toBe(JobType.enhancedKyc);
|
|
841
|
+
if (request.jobType === JobType.enhancedKyc) {
|
|
842
|
+
expect(request.params.idType).toBe("PASSPORT");
|
|
843
|
+
expect(request.userDetails).toEqual(SAMPLE_USER_DETAILS);
|
|
844
|
+
}
|
|
845
|
+
});
|
|
846
|
+
|
|
847
|
+
it("bvn dispatches through a dedicated `bvn` request variant", () => {
|
|
848
|
+
// Concrete scenario: BVN no longer auto-maps onto the
|
|
849
|
+
// `/v3/enhanced_kyc` endpoint. The flow navigation manager now
|
|
850
|
+
// emits a dedicated `bvn` request kind; the repository rejects it
|
|
851
|
+
// with "BVN submission is not yet supported" until the dedicated
|
|
852
|
+
// endpoint lands.
|
|
853
|
+
const request = assembleRequest(JobType.bvn, {
|
|
854
|
+
enhancedKYCParams: {
|
|
855
|
+
idType: "BVN",
|
|
856
|
+
idNumber: "12345678901",
|
|
857
|
+
country: "NG",
|
|
858
|
+
},
|
|
859
|
+
userDetails: SAMPLE_USER_DETAILS,
|
|
860
|
+
});
|
|
861
|
+
expect(request.jobType).toBe(JobType.bvn);
|
|
862
|
+
if (request.jobType === JobType.bvn) {
|
|
863
|
+
expect(request.params.idType).toBe("BVN");
|
|
864
|
+
expect(request.params.country).toBe("NG");
|
|
865
|
+
}
|
|
866
|
+
});
|
|
867
|
+
|
|
868
|
+
it("captured consent wins over configuration-supplied consent", () => {
|
|
869
|
+
const configured = Object.freeze({
|
|
870
|
+
granted: false,
|
|
871
|
+
grantedAt: "2026-01-01T00:00:00.000Z",
|
|
872
|
+
noticeLanguage: "FR",
|
|
873
|
+
noticePrivacyPolicyUrl: "https://configured.test/privacy",
|
|
874
|
+
});
|
|
875
|
+
const request = assembleRequest(
|
|
876
|
+
JobType.enhancedKyc,
|
|
877
|
+
{
|
|
878
|
+
consentInformation: configured,
|
|
879
|
+
enhancedKYCParams: {
|
|
880
|
+
idType: "BVN",
|
|
881
|
+
idNumber: "1",
|
|
882
|
+
country: "NG",
|
|
883
|
+
},
|
|
884
|
+
userDetails: SAMPLE_USER_DETAILS,
|
|
885
|
+
},
|
|
886
|
+
(m) => m.setConsent(consentInfo),
|
|
887
|
+
);
|
|
888
|
+
expect(request.consent).toEqual(consentInfo);
|
|
889
|
+
});
|
|
890
|
+
});
|
|
891
|
+
|
|
892
|
+
describe("FlowNavigationManager — typed missing-field validation (parity)", () => {
|
|
893
|
+
// Drives a submission to its failure state and returns the surfaced
|
|
894
|
+
// error so we can assert the typed `MissingRequiredFieldException`
|
|
895
|
+
// (with the right `fieldName`) reaches `onResult.failure` — matching
|
|
896
|
+
// the native SDKs, which throw the typed class for every missing field.
|
|
897
|
+
async function failureError(
|
|
898
|
+
jobType: JobType,
|
|
899
|
+
extraConfig: Partial<FlowConfigurationSnapshot> = {},
|
|
900
|
+
seedManager: (m: FlowNavigationManager) => void = () => {},
|
|
901
|
+
): Promise<unknown> {
|
|
902
|
+
const repository = new StubRepository();
|
|
903
|
+
const manager = makeManager(
|
|
904
|
+
buildScreens((screens) => screens.processing()),
|
|
905
|
+
vi.fn(),
|
|
906
|
+
{
|
|
907
|
+
...extraConfig,
|
|
908
|
+
network: {
|
|
909
|
+
config: {
|
|
910
|
+
jobType,
|
|
911
|
+
token: "k",
|
|
912
|
+
partnerConfig: {
|
|
913
|
+
partnerId: "p",
|
|
914
|
+
callbackUrl: "",
|
|
915
|
+
useSandbox: true,
|
|
916
|
+
},
|
|
917
|
+
},
|
|
918
|
+
},
|
|
919
|
+
},
|
|
920
|
+
repository,
|
|
921
|
+
);
|
|
922
|
+
seedManager(manager);
|
|
923
|
+
manager.beginSubmissionIfNeeded();
|
|
924
|
+
await flushMicrotasks();
|
|
925
|
+
const state = manager.jobSubmissionState;
|
|
926
|
+
if (state.kind !== "failure") {
|
|
927
|
+
throw new Error(`expected failure state, got ${state.kind}`);
|
|
928
|
+
}
|
|
929
|
+
expect(repository.received).toHaveLength(0);
|
|
930
|
+
return state.error;
|
|
931
|
+
}
|
|
932
|
+
|
|
933
|
+
it("missing enhancedKYCParams → MissingRequiredFieldException(enhancedKYCParams)", async () => {
|
|
934
|
+
const error = await failureError(JobType.enhancedKyc, {
|
|
935
|
+
userDetails: SAMPLE_USER_DETAILS,
|
|
936
|
+
});
|
|
937
|
+
expect(error).toBeInstanceOf(MissingRequiredFieldException);
|
|
938
|
+
expect((error as MissingRequiredFieldException).errorDetails).toEqual({
|
|
939
|
+
fieldName: "enhancedKYCParams",
|
|
940
|
+
});
|
|
941
|
+
});
|
|
942
|
+
|
|
943
|
+
it("missing userDetails → MissingRequiredFieldException(userDetails)", async () => {
|
|
944
|
+
const error = await failureError(JobType.enhancedKyc, {
|
|
945
|
+
enhancedKYCParams: { idType: "PASSPORT", idNumber: "X1", country: "NG" },
|
|
946
|
+
});
|
|
947
|
+
expect(error).toBeInstanceOf(MissingRequiredFieldException);
|
|
948
|
+
expect((error as MissingRequiredFieldException).errorDetails).toEqual({
|
|
949
|
+
fieldName: "userDetails",
|
|
950
|
+
});
|
|
951
|
+
});
|
|
952
|
+
|
|
953
|
+
it("missing selfie → MissingRequiredFieldException(selfieImage)", async () => {
|
|
954
|
+
const error = await failureError(JobType.biometricKyc, {
|
|
955
|
+
biometricKYCParams: {
|
|
956
|
+
idType: "PASSPORT",
|
|
957
|
+
idNumber: "P1",
|
|
958
|
+
country: "NG",
|
|
959
|
+
useEnrolledImage: false,
|
|
960
|
+
},
|
|
961
|
+
userDetails: SAMPLE_USER_DETAILS,
|
|
962
|
+
});
|
|
963
|
+
expect(error).toBeInstanceOf(MissingRequiredFieldException);
|
|
964
|
+
expect((error as MissingRequiredFieldException).errorDetails).toEqual({
|
|
965
|
+
fieldName: "selfieImage",
|
|
966
|
+
});
|
|
967
|
+
});
|
|
968
|
+
|
|
969
|
+
it("missing front document → MissingRequiredFieldException(frontDocument)", async () => {
|
|
970
|
+
const error = await failureError(JobType.documentVerification, {}, (m) =>
|
|
971
|
+
m.setCapturedSelfie("file:///s.jpg", []),
|
|
972
|
+
);
|
|
973
|
+
expect(error).toBeInstanceOf(MissingRequiredFieldException);
|
|
974
|
+
expect((error as MissingRequiredFieldException).errorDetails).toEqual({
|
|
975
|
+
fieldName: "frontDocument",
|
|
976
|
+
});
|
|
977
|
+
});
|
|
978
|
+
|
|
979
|
+
it("missing documentVerificationParams → MissingRequiredFieldException(documentVerificationParams)", async () => {
|
|
980
|
+
const error = await failureError(
|
|
981
|
+
JobType.documentVerification,
|
|
982
|
+
{ userDetails: SAMPLE_USER_DETAILS },
|
|
983
|
+
(m) => {
|
|
984
|
+
m.setCapturedSelfie("file:///s.jpg", []);
|
|
985
|
+
m.setCapturedFrontDocument("file:///front.jpg");
|
|
986
|
+
},
|
|
987
|
+
);
|
|
988
|
+
expect(error).toBeInstanceOf(MissingRequiredFieldException);
|
|
989
|
+
expect((error as MissingRequiredFieldException).errorDetails).toEqual({
|
|
990
|
+
fieldName: "documentVerificationParams",
|
|
991
|
+
});
|
|
992
|
+
});
|
|
993
|
+
|
|
994
|
+
it("missing enhancedDocumentVerificationParams → MissingRequiredFieldException(enhancedDocumentVerificationParams)", async () => {
|
|
995
|
+
const error = await failureError(
|
|
996
|
+
JobType.enhancedDocumentVerification,
|
|
997
|
+
{ userDetails: SAMPLE_USER_DETAILS },
|
|
998
|
+
(m) => {
|
|
999
|
+
m.setCapturedSelfie("file:///s.jpg", []);
|
|
1000
|
+
m.setCapturedFrontDocument("file:///front.jpg");
|
|
1001
|
+
},
|
|
1002
|
+
);
|
|
1003
|
+
expect(error).toBeInstanceOf(MissingRequiredFieldException);
|
|
1004
|
+
expect((error as MissingRequiredFieldException).errorDetails).toEqual({
|
|
1005
|
+
fieldName: "enhancedDocumentVerificationParams",
|
|
1006
|
+
});
|
|
1007
|
+
});
|
|
1008
|
+
});
|
|
1009
|
+
|
|
1010
|
+
describe("FlowNavigationManager — analytics (parity)", () => {
|
|
1011
|
+
function captureEvents(): {
|
|
1012
|
+
readonly events: UseSmileIDAnalyticsEvent[];
|
|
1013
|
+
readonly manager: FlowNavigationManager;
|
|
1014
|
+
} {
|
|
1015
|
+
const events: UseSmileIDAnalyticsEvent[] = [];
|
|
1016
|
+
const manager = makeManager(
|
|
1017
|
+
buildScreens((screens) => {
|
|
1018
|
+
screens.instructions();
|
|
1019
|
+
screens.capture((c) => {
|
|
1020
|
+
c.captureType = CaptureType.selfie;
|
|
1021
|
+
});
|
|
1022
|
+
screens.processing();
|
|
1023
|
+
}),
|
|
1024
|
+
vi.fn(),
|
|
1025
|
+
{ onAnalyticsEvent: (event) => events.push(event) },
|
|
1026
|
+
);
|
|
1027
|
+
return { events, manager };
|
|
1028
|
+
}
|
|
1029
|
+
|
|
1030
|
+
it("emits flow_started then screen_viewed on construction, each with session_id + timestamp", () => {
|
|
1031
|
+
const { events } = captureEvents();
|
|
1032
|
+
expect(events.map((e) => e.type)).toEqual([
|
|
1033
|
+
"flow_started",
|
|
1034
|
+
"screen_viewed",
|
|
1035
|
+
]);
|
|
1036
|
+
expect(events[0]?.extras.job_type).toBeDefined();
|
|
1037
|
+
expect(events[1]?.extras.screen_name).toBe("instructions");
|
|
1038
|
+
for (const event of events) {
|
|
1039
|
+
expect(event.extras.session_id).toBeTruthy();
|
|
1040
|
+
expect(event.extras.timestamp).toBeTruthy();
|
|
1041
|
+
}
|
|
1042
|
+
});
|
|
1043
|
+
|
|
1044
|
+
it("emits consent_captured / selfie_captured / screen_viewed at the lifecycle points", () => {
|
|
1045
|
+
const { events, manager } = captureEvents();
|
|
1046
|
+
events.length = 0;
|
|
1047
|
+
|
|
1048
|
+
manager.setConsent({
|
|
1049
|
+
granted: true,
|
|
1050
|
+
grantedAt: "2026-01-01T00:00:00.000Z",
|
|
1051
|
+
noticeLanguage: "EN",
|
|
1052
|
+
noticePrivacyPolicyUrl: "",
|
|
1053
|
+
});
|
|
1054
|
+
manager.setCapturedSelfie("file:///s.jpg", [
|
|
1055
|
+
"file:///l1.jpg",
|
|
1056
|
+
"file:///l2.jpg",
|
|
1057
|
+
]);
|
|
1058
|
+
manager.navigateToNext();
|
|
1059
|
+
|
|
1060
|
+
const consent = events.find((e) => e.type === "consent_captured");
|
|
1061
|
+
expect(consent?.extras.decision).toBe("granted");
|
|
1062
|
+
const selfie = events.find((e) => e.type === "selfie_captured");
|
|
1063
|
+
expect(selfie?.extras.liveness_image_count).toBe("2");
|
|
1064
|
+
const viewed = events.find(
|
|
1065
|
+
(e) => e.type === "screen_viewed" && e.extras.screen_name === "capture",
|
|
1066
|
+
);
|
|
1067
|
+
expect(viewed).toBeDefined();
|
|
1068
|
+
});
|
|
1069
|
+
|
|
1070
|
+
it("emits flow_completed=failure with error_message on a failed exit", () => {
|
|
1071
|
+
const { events, manager } = captureEvents();
|
|
1072
|
+
events.length = 0;
|
|
1073
|
+
manager.exit({ kind: "failed", error: new Error("boom") });
|
|
1074
|
+
const completed = events.find((e) => e.type === "flow_completed");
|
|
1075
|
+
expect(completed?.extras.result).toBe("failure");
|
|
1076
|
+
expect(completed?.extras.error_message).toBe("boom");
|
|
1077
|
+
});
|
|
1078
|
+
|
|
1079
|
+
it("emits flow_completed=success with job_id on a completed exit", () => {
|
|
1080
|
+
const { events, manager } = captureEvents();
|
|
1081
|
+
events.length = 0;
|
|
1082
|
+
manager.exit({
|
|
1083
|
+
kind: "completed",
|
|
1084
|
+
job: { userId: "u", jobId: "job-9", status: "ok", message: "" },
|
|
1085
|
+
});
|
|
1086
|
+
const completed = events.find((e) => e.type === "flow_completed");
|
|
1087
|
+
expect(completed?.extras.result).toBe("success");
|
|
1088
|
+
expect(completed?.extras.job_id).toBe("job-9");
|
|
1089
|
+
});
|
|
1090
|
+
|
|
1091
|
+
it("emits no flow_completed on a cancelled exit (parity with native)", () => {
|
|
1092
|
+
const { events, manager } = captureEvents();
|
|
1093
|
+
events.length = 0;
|
|
1094
|
+
manager.exit({ kind: "cancelled" });
|
|
1095
|
+
expect(events.some((e) => e.type === "flow_completed")).toBe(false);
|
|
1096
|
+
});
|
|
1097
|
+
});
|
|
1098
|
+
|
|
1099
|
+
// Microtask flusher — vitest's default scheduler runs Promise.resolve()
|
|
1100
|
+
// jobs synchronously when awaited. Two passes covers chains like
|
|
1101
|
+
// `_submit` (sets loading → awaits repo → sets success), so by the
|
|
1102
|
+
// second flush both transitions have committed.
|
|
1103
|
+
async function flushMicrotasks(): Promise<void> {
|
|
1104
|
+
await Promise.resolve();
|
|
1105
|
+
await Promise.resolve();
|
|
1106
|
+
}
|
|
1107
|
+
|
|
1108
|
+
describe("FlowNavigationManager.enhancedLivenessEnabled", () => {
|
|
1109
|
+
it("is false when no selfie capture step enables enhanced liveness", () => {
|
|
1110
|
+
const manager = makeManager(
|
|
1111
|
+
buildScreens((s) => {
|
|
1112
|
+
s.instructions();
|
|
1113
|
+
s.capture((c) => c.selfie(() => {}));
|
|
1114
|
+
}),
|
|
1115
|
+
);
|
|
1116
|
+
expect(manager.enhancedLivenessEnabled).toBe(false);
|
|
1117
|
+
});
|
|
1118
|
+
|
|
1119
|
+
it("is true when a selfie capture step enables enhanced liveness", () => {
|
|
1120
|
+
const manager = makeManager(
|
|
1121
|
+
buildScreens((s) => {
|
|
1122
|
+
s.capture((c) =>
|
|
1123
|
+
c.selfie((selfie) => {
|
|
1124
|
+
selfie.enableEnhancedLiveness = true;
|
|
1125
|
+
}),
|
|
1126
|
+
);
|
|
1127
|
+
}),
|
|
1128
|
+
);
|
|
1129
|
+
expect(manager.enhancedLivenessEnabled).toBe(true);
|
|
1130
|
+
});
|
|
1131
|
+
|
|
1132
|
+
it("is false for a document-only flow", () => {
|
|
1133
|
+
const manager = makeManager(
|
|
1134
|
+
buildScreens((s) => {
|
|
1135
|
+
s.capture((c) => c.document(() => {}));
|
|
1136
|
+
}),
|
|
1137
|
+
);
|
|
1138
|
+
expect(manager.enhancedLivenessEnabled).toBe(false);
|
|
1139
|
+
});
|
|
1140
|
+
|
|
1141
|
+
it("documentType reflects the document capture step's configured type", () => {
|
|
1142
|
+
const manager = makeManager(
|
|
1143
|
+
buildScreens((s) => {
|
|
1144
|
+
s.capture((c) => {
|
|
1145
|
+
c.captureType = CaptureType.document;
|
|
1146
|
+
c.document((d) => {
|
|
1147
|
+
d.documentType = DocumentType.SouthAfricaGreenBook;
|
|
1148
|
+
});
|
|
1149
|
+
});
|
|
1150
|
+
}),
|
|
1151
|
+
);
|
|
1152
|
+
expect(manager.documentType).toBe(DocumentType.SouthAfricaGreenBook);
|
|
1153
|
+
});
|
|
1154
|
+
|
|
1155
|
+
it("documentType is undefined for a selfie-only flow", () => {
|
|
1156
|
+
const manager = makeManager(
|
|
1157
|
+
buildScreens((s) => {
|
|
1158
|
+
s.capture((c) => c.selfie(() => {}));
|
|
1159
|
+
}),
|
|
1160
|
+
);
|
|
1161
|
+
expect(manager.documentType).toBeUndefined();
|
|
1162
|
+
});
|
|
1163
|
+
});
|