@tsocial/tvweb-sdk
Version:
TV Web SDK - The Standalone SDK
1,325 lines (1,312 loc) • 70 kB
TypeScript
declare const ErrorDuration: {
readonly SHORT: 500;
readonly LONG: 1500;
readonly TERMINATE: 3000;
};
declare const AlertErrors: {
readonly wrong_orientation: {
readonly code: "wrong_orientation";
readonly msg: {
readonly en: "Please do not change the screen orientation while in progress.";
readonly vi: "Vui lòng không thay đổi hướng xoay màn hình khi đang thực hiện.";
readonly 'es-mx': "Por favor, no cambies la orientación de la pantalla durante el proceso.";
};
};
readonly no_face: {
readonly code: "no_face";
readonly msg: {
readonly en: "Please position your face in the frame";
readonly vi: "Vui lòng đưa khuôn mặt vào trong khung hình";
readonly 'es-mx': "Por favor coloque su cara en el marco";
};
};
readonly partial_face: {
readonly code: "partial_face";
readonly msg: {
readonly en: "Please fit your face completely in frame";
readonly vi: "Vui lòng đặt trọn vẹn khuôn mặt vào trong khung hình";
readonly 'es-mx': "Por favor, ajuste su cara completamente al marco";
};
};
readonly multiple_faces: {
readonly code: "multiple_faces";
readonly msg: {
readonly en: "Multiple faces detected";
readonly vi: "Phát hiện nhiều khuôn mặt trong khung hình";
readonly 'es-mx': "Mas de una cara detectada";
};
};
readonly face_too_small: {
readonly code: "face_too_small";
readonly msg: {
readonly en: "Please move your face closer to the camera";
readonly vi: "Vui lòng đưa mặt lại gần camera hơn";
readonly 'es-mx': "Por favor, acerque su rostro a la camara";
};
};
readonly face_too_large: {
readonly code: "face_too_large";
readonly msg: {
readonly en: "Please move your face further from the camera";
readonly vi: "Vui lòng đưa mặt ra xa camera hơn";
readonly 'es-mx': "Por favor, aleje su rostro de la camara";
};
};
readonly face_out_of_box: {
readonly code: "face_out_of_box";
readonly msg: {
readonly en: "Please fit your face completely in frame";
readonly vi: "Vui lòng đặt trọn vẹn khuôn mặt vào trong khung hình";
readonly 'es-mx': "Por favor, ajuste su cara completamente al marco.";
};
};
readonly liveness_too_fast: {
readonly code: "liveness_too_fast";
readonly msg: {
readonly en: "Please turn your head more slowly";
readonly vi: "Vui lòng xoay khuôn mặt chậm hơn";
readonly 'es-mx': "Por favor, gira la cabeza más lentamente";
};
};
readonly liveness_terminated: {
readonly code: "liveness_terminated";
readonly msg: {
readonly en: "Please try again.";
readonly vi: "Vui lòng thực hiện lại.";
readonly 'es-mx': "Por favor, intente de nuevo";
};
};
readonly liveness_terminated_face_tracking: {
readonly code: "liveness_terminated_face_tracking";
readonly msg: {
readonly en: "You need to turn your face SLOWLY.\nPlease try again.";
readonly vi: "Bạn cần quay CHẬM lại.\nVui lòng thực hiện lại.";
readonly 'es-mx': "Necesita girar su cara lentamente\nPor favor, intente de nuevo";
};
};
readonly liveness_terminated_no_face: {
readonly code: "liveness_terminated_no_face";
readonly msg: {
readonly en: "Your face was missing for too long.\nPlease try again.";
readonly vi: "Khuôn mặt không nằm trong khung hình.\nXin vui lòng thử lại.";
readonly 'es-mx': "Su cara no aparecio por mucho tiempo\nPor favor, intente de nuevo";
};
};
readonly liveness_terminated_time_out: {
readonly code: "liveness_terminated_time_out";
readonly msg: {
readonly en: "You need to complete within <%= x %> seconds.\nPlease try again";
readonly vi: "Bạn cần hoàn thành trong <%= x %> giây.\nXin vui lòng thử lại";
readonly 'es-mx': "Necesita completar el proceso entre <%= x %> segundos.\nPor favor, intente de nuevo";
};
};
readonly liveness_blurry: {
readonly code: "liveness_blurry";
readonly msg: {
readonly en: "Image is too blurry. Please ensure your face is in focus.";
readonly vi: "Hình ảnh bị mờ. Vui lòng đảm bảo khuôn mặt của bạn rõ nét.";
readonly 'es-mx': "La imagen está borrosa.\nMejore la iluminación y estabilice su dispositivo";
};
};
readonly card_sanity_not_good: {
readonly code: "card_sanity_not_good";
readonly msg: {
readonly en: "Card sanity not good";
readonly vi: "Card sanity chưa đạt";
readonly 'es-mx': "La calidad de la imagen de la tarjeta no es buena";
};
};
readonly id_detector_validate_angle_error: {
readonly code: "id_detector_validate_angle_error";
readonly msg: {
readonly en: "Please place ID card straight, not tilted";
readonly vi: "Vui lòng đặt giấy tờ thẳng, không bị nghiêng khi chụp";
readonly 'es-mx': "Sostenga la identificación plana y mirando hacia la cámara";
};
};
readonly client_web_setting_not_found: {
readonly code: "client_web_setting_not_found";
readonly msg: "Client Web Setting Not Found";
};
readonly id_detector_no_cards: {
readonly code: "id_detector_no_cards";
readonly msg: {
readonly en: "Please place the <%= side %> of your ID card\nfully inside the frame";
readonly vi: "Vui lòng đặt toàn bộ mặt <%= side %> GTTT\nvào khung hình";
readonly 'es-mx': "Mantenga el <%= side %> de su identificacion completamente dentro del marco.";
};
};
readonly id_detector_card_too_small: {
readonly code: "id_detector_card_too_small";
readonly msg: {
readonly en: "Please move ID card CLOSER\n (occupy 50-95% of the frame)";
readonly vi: "Vui lòng đưa giấy tờ lại GẦN hơn\n (chiếm 50-95% khung hình)";
readonly 'es-mx': "Por favor, acerque la identificación";
};
};
readonly id_detector_error_incomplete: {
readonly code: "id_detector_error_incomplete";
readonly msg: {
readonly en: "Please move ID card FARTHER\n (occupy 50-95% of the frame)";
readonly vi: "Vui lòng đưa giấy tờ ra XA hơn\n (chiếm 50-95% khung hình)";
readonly 'es-mx': "Por favor, coloque la identificación completamente en el marco";
};
};
readonly glare_detected: {
readonly code: "glare_detected";
readonly msg: {
readonly en: "Glare is detected. Please adjust the shooting angle";
readonly vi: "Ảnh bị chói / lóa. Vui lòng điều chỉnh góc chụp.";
readonly 'es-mx': "Se detectó deslumbramiento.\nIntente inclinar la tarjeta o cambiar el ángulo";
};
};
readonly id_detector_error_front_side_no_faces: {
readonly code: "id_detector_error_front_side_no_faces";
readonly msg: {
readonly en: "Please capture the front side of ID card";
readonly vi: "Vui lòng chụp mặt trước của giấy tờ";
readonly 'es-mx': "Por favor, capture el frente de la identificación";
};
};
readonly id_detector_error_front_side_multiple_faces: {
readonly code: "id_detector_error_front_side_multiple_faces";
readonly msg: {
readonly en: "Please capture the front side of one ID card only (remove other items out of the frame)";
readonly vi: "Vui lòng chụp mặt trước 1 giấy tờ duy nhất";
readonly 'es-mx': "Por favor, asegúrese de que solo haya una identificación dentro del marco";
};
};
readonly id_detector_error_back_side_has_faces: {
readonly code: "id_detector_error_back_side_has_faces";
readonly msg: {
readonly en: "Please capture the back side of ID card";
readonly vi: "Vui lòng chụp mặt sau của giấy tờ";
readonly 'es-mx': "Por favor, capture el reverso de la identificación";
};
};
readonly id_detector_error_blur: {
readonly code: "id_detector_error_blur";
readonly msg: {
readonly en: "Blurry photo detected. Please capture again for a clearer image";
readonly vi: "Ảnh bị mờ. Vui lòng chụp lại để có ảnh rõ nét hơn";
readonly 'es-mx': "Foto borrosa, capture de nuevo para una mejor imagen";
};
};
readonly id_detector_error_blurry: {
readonly code: "id_detector_error_blurry";
readonly msg: {
readonly en: "The image is blurry";
readonly vi: "Ảnh bị mờ, không đọc được chữ";
readonly 'es-mx': "La imagen está borrosa.\nMejore la iluminación y estabilice su dispositivo";
};
};
readonly not_allowed_card_types: {
readonly code: "not_allowed_card_types";
readonly msg: {
readonly en: "Please use the required ID cards";
readonly vi: "Vui lòng sử dụng GTTT được yêu cầu";
readonly 'es-mx': "Por favor, utilice la identificación requerida";
};
};
readonly not_frontal_face: {
readonly code: "not_frontal_face";
readonly msg: {
readonly en: "Please look straight to camera.";
readonly vi: "Vui lòng nhìn thẳng vào camera.";
readonly 'es-mx': "Por favor, mira directamente a la cámara";
};
};
readonly close_eye: {
readonly code: "close_eye";
readonly msg: {
readonly vi: "Vui lòng mở to mắt";
readonly en: "Open your eyes clearly";
readonly 'es-mx': "Por favor, abre bien los ojos";
};
};
};
declare const LicenseErrors: {
readonly license_invalid: {
readonly code: "license_invalid";
readonly msg: {
readonly en: "Invalid license";
readonly vi: "License không hợp lệ";
readonly 'es-mx': "Licencia inválida";
};
};
readonly license_rate_limit_exceeded: {
readonly code: "license_rate_limit_exceeded";
readonly msg: {
readonly en: "Invalid license";
readonly vi: "Quá số lần thử";
};
};
readonly license_internal_server_error: {
readonly code: "license_internal_server_error";
readonly msg: {
readonly en: "Internal server error";
readonly vi: "Lỗi server";
};
};
readonly license_unknown_error: {
readonly code: "license_unknown_error";
readonly msg: {
readonly en: "Unknown error";
readonly vi: "Lỗi không xác định";
};
};
};
declare const BillingErrors: {
readonly billing_invalid_config: {
readonly code: "billing_invalid_config";
readonly msg: {
readonly en: "Invalid billing configuration";
readonly vi: "Cấu hình billing không hợp lệ";
};
};
readonly billing_failed: {
readonly code: "billing_failed";
readonly msg: {
readonly en: "Billing failed";
readonly vi: "Billing không thành công";
};
};
};
declare const Errors: {
readonly billing_invalid_config: {
readonly code: "billing_invalid_config";
readonly msg: {
readonly en: "Invalid billing configuration";
readonly vi: "Cấu hình billing không hợp lệ";
};
};
readonly billing_failed: {
readonly code: "billing_failed";
readonly msg: {
readonly en: "Billing failed";
readonly vi: "Billing không thành công";
};
};
readonly license_invalid: {
readonly code: "license_invalid";
readonly msg: {
readonly en: "Invalid license";
readonly vi: "License không hợp lệ";
readonly 'es-mx': "Licencia inválida";
};
};
readonly license_rate_limit_exceeded: {
readonly code: "license_rate_limit_exceeded";
readonly msg: {
readonly en: "Invalid license";
readonly vi: "Quá số lần thử";
};
};
readonly license_internal_server_error: {
readonly code: "license_internal_server_error";
readonly msg: {
readonly en: "Internal server error";
readonly vi: "Lỗi server";
};
};
readonly license_unknown_error: {
readonly code: "license_unknown_error";
readonly msg: {
readonly en: "Unknown error";
readonly vi: "Lỗi không xác định";
};
};
readonly wrong_orientation: {
readonly code: "wrong_orientation";
readonly msg: {
readonly en: "Please do not change the screen orientation while in progress.";
readonly vi: "Vui lòng không thay đổi hướng xoay màn hình khi đang thực hiện.";
readonly 'es-mx': "Por favor, no cambies la orientación de la pantalla durante el proceso.";
};
};
readonly no_face: {
readonly code: "no_face";
readonly msg: {
readonly en: "Please position your face in the frame";
readonly vi: "Vui lòng đưa khuôn mặt vào trong khung hình";
readonly 'es-mx': "Por favor coloque su cara en el marco";
};
};
readonly partial_face: {
readonly code: "partial_face";
readonly msg: {
readonly en: "Please fit your face completely in frame";
readonly vi: "Vui lòng đặt trọn vẹn khuôn mặt vào trong khung hình";
readonly 'es-mx': "Por favor, ajuste su cara completamente al marco";
};
};
readonly multiple_faces: {
readonly code: "multiple_faces";
readonly msg: {
readonly en: "Multiple faces detected";
readonly vi: "Phát hiện nhiều khuôn mặt trong khung hình";
readonly 'es-mx': "Mas de una cara detectada";
};
};
readonly face_too_small: {
readonly code: "face_too_small";
readonly msg: {
readonly en: "Please move your face closer to the camera";
readonly vi: "Vui lòng đưa mặt lại gần camera hơn";
readonly 'es-mx': "Por favor, acerque su rostro a la camara";
};
};
readonly face_too_large: {
readonly code: "face_too_large";
readonly msg: {
readonly en: "Please move your face further from the camera";
readonly vi: "Vui lòng đưa mặt ra xa camera hơn";
readonly 'es-mx': "Por favor, aleje su rostro de la camara";
};
};
readonly face_out_of_box: {
readonly code: "face_out_of_box";
readonly msg: {
readonly en: "Please fit your face completely in frame";
readonly vi: "Vui lòng đặt trọn vẹn khuôn mặt vào trong khung hình";
readonly 'es-mx': "Por favor, ajuste su cara completamente al marco.";
};
};
readonly liveness_too_fast: {
readonly code: "liveness_too_fast";
readonly msg: {
readonly en: "Please turn your head more slowly";
readonly vi: "Vui lòng xoay khuôn mặt chậm hơn";
readonly 'es-mx': "Por favor, gira la cabeza más lentamente";
};
};
readonly liveness_terminated: {
readonly code: "liveness_terminated";
readonly msg: {
readonly en: "Please try again.";
readonly vi: "Vui lòng thực hiện lại.";
readonly 'es-mx': "Por favor, intente de nuevo";
};
};
readonly liveness_terminated_face_tracking: {
readonly code: "liveness_terminated_face_tracking";
readonly msg: {
readonly en: "You need to turn your face SLOWLY.\nPlease try again.";
readonly vi: "Bạn cần quay CHẬM lại.\nVui lòng thực hiện lại.";
readonly 'es-mx': "Necesita girar su cara lentamente\nPor favor, intente de nuevo";
};
};
readonly liveness_terminated_no_face: {
readonly code: "liveness_terminated_no_face";
readonly msg: {
readonly en: "Your face was missing for too long.\nPlease try again.";
readonly vi: "Khuôn mặt không nằm trong khung hình.\nXin vui lòng thử lại.";
readonly 'es-mx': "Su cara no aparecio por mucho tiempo\nPor favor, intente de nuevo";
};
};
readonly liveness_terminated_time_out: {
readonly code: "liveness_terminated_time_out";
readonly msg: {
readonly en: "You need to complete within <%= x %> seconds.\nPlease try again";
readonly vi: "Bạn cần hoàn thành trong <%= x %> giây.\nXin vui lòng thử lại";
readonly 'es-mx': "Necesita completar el proceso entre <%= x %> segundos.\nPor favor, intente de nuevo";
};
};
readonly liveness_blurry: {
readonly code: "liveness_blurry";
readonly msg: {
readonly en: "Image is too blurry. Please ensure your face is in focus.";
readonly vi: "Hình ảnh bị mờ. Vui lòng đảm bảo khuôn mặt của bạn rõ nét.";
readonly 'es-mx': "La imagen está borrosa.\nMejore la iluminación y estabilice su dispositivo";
};
};
readonly card_sanity_not_good: {
readonly code: "card_sanity_not_good";
readonly msg: {
readonly en: "Card sanity not good";
readonly vi: "Card sanity chưa đạt";
readonly 'es-mx': "La calidad de la imagen de la tarjeta no es buena";
};
};
readonly id_detector_validate_angle_error: {
readonly code: "id_detector_validate_angle_error";
readonly msg: {
readonly en: "Please place ID card straight, not tilted";
readonly vi: "Vui lòng đặt giấy tờ thẳng, không bị nghiêng khi chụp";
readonly 'es-mx': "Sostenga la identificación plana y mirando hacia la cámara";
};
};
readonly client_web_setting_not_found: {
readonly code: "client_web_setting_not_found";
readonly msg: "Client Web Setting Not Found";
};
readonly id_detector_no_cards: {
readonly code: "id_detector_no_cards";
readonly msg: {
readonly en: "Please place the <%= side %> of your ID card\nfully inside the frame";
readonly vi: "Vui lòng đặt toàn bộ mặt <%= side %> GTTT\nvào khung hình";
readonly 'es-mx': "Mantenga el <%= side %> de su identificacion completamente dentro del marco.";
};
};
readonly id_detector_card_too_small: {
readonly code: "id_detector_card_too_small";
readonly msg: {
readonly en: "Please move ID card CLOSER\n (occupy 50-95% of the frame)";
readonly vi: "Vui lòng đưa giấy tờ lại GẦN hơn\n (chiếm 50-95% khung hình)";
readonly 'es-mx': "Por favor, acerque la identificación";
};
};
readonly id_detector_error_incomplete: {
readonly code: "id_detector_error_incomplete";
readonly msg: {
readonly en: "Please move ID card FARTHER\n (occupy 50-95% of the frame)";
readonly vi: "Vui lòng đưa giấy tờ ra XA hơn\n (chiếm 50-95% khung hình)";
readonly 'es-mx': "Por favor, coloque la identificación completamente en el marco";
};
};
readonly glare_detected: {
readonly code: "glare_detected";
readonly msg: {
readonly en: "Glare is detected. Please adjust the shooting angle";
readonly vi: "Ảnh bị chói / lóa. Vui lòng điều chỉnh góc chụp.";
readonly 'es-mx': "Se detectó deslumbramiento.\nIntente inclinar la tarjeta o cambiar el ángulo";
};
};
readonly id_detector_error_front_side_no_faces: {
readonly code: "id_detector_error_front_side_no_faces";
readonly msg: {
readonly en: "Please capture the front side of ID card";
readonly vi: "Vui lòng chụp mặt trước của giấy tờ";
readonly 'es-mx': "Por favor, capture el frente de la identificación";
};
};
readonly id_detector_error_front_side_multiple_faces: {
readonly code: "id_detector_error_front_side_multiple_faces";
readonly msg: {
readonly en: "Please capture the front side of one ID card only (remove other items out of the frame)";
readonly vi: "Vui lòng chụp mặt trước 1 giấy tờ duy nhất";
readonly 'es-mx': "Por favor, asegúrese de que solo haya una identificación dentro del marco";
};
};
readonly id_detector_error_back_side_has_faces: {
readonly code: "id_detector_error_back_side_has_faces";
readonly msg: {
readonly en: "Please capture the back side of ID card";
readonly vi: "Vui lòng chụp mặt sau của giấy tờ";
readonly 'es-mx': "Por favor, capture el reverso de la identificación";
};
};
readonly id_detector_error_blur: {
readonly code: "id_detector_error_blur";
readonly msg: {
readonly en: "Blurry photo detected. Please capture again for a clearer image";
readonly vi: "Ảnh bị mờ. Vui lòng chụp lại để có ảnh rõ nét hơn";
readonly 'es-mx': "Foto borrosa, capture de nuevo para una mejor imagen";
};
};
readonly id_detector_error_blurry: {
readonly code: "id_detector_error_blurry";
readonly msg: {
readonly en: "The image is blurry";
readonly vi: "Ảnh bị mờ, không đọc được chữ";
readonly 'es-mx': "La imagen está borrosa.\nMejore la iluminación y estabilice su dispositivo";
};
};
readonly not_allowed_card_types: {
readonly code: "not_allowed_card_types";
readonly msg: {
readonly en: "Please use the required ID cards";
readonly vi: "Vui lòng sử dụng GTTT được yêu cầu";
readonly 'es-mx': "Por favor, utilice la identificación requerida";
};
};
readonly not_frontal_face: {
readonly code: "not_frontal_face";
readonly msg: {
readonly en: "Please look straight to camera.";
readonly vi: "Vui lòng nhìn thẳng vào camera.";
readonly 'es-mx': "Por favor, mira directamente a la cámara";
};
};
readonly close_eye: {
readonly code: "close_eye";
readonly msg: {
readonly vi: "Vui lòng mở to mắt";
readonly en: "Open your eyes clearly";
readonly 'es-mx': "Por favor, abre bien los ojos";
};
};
readonly not_supported: {
readonly code: "not_supported";
readonly msg: {
readonly en: "Camera is not well-supported on this device/browser. Please try another one.";
readonly vi: "Camera không được hỗ trợ. Vui lòng thử trình duyệt hoặc thiết bị khác.";
};
};
readonly camera_timeout: {
readonly code: "camera_timeout";
readonly msg: {
readonly en: "Can't access camera. Please check camera permission, try again or try another browser/device";
readonly vi: "Không thể truy cập camera. Vui lòng kiểm tra quyền truy cập camera, đóng các tab/app khác đang sử dụng camera hoặc thử lại trên trình duyệt/thiết bị khác.";
};
};
readonly unable_to_load_model: {
readonly code: "unable_to_load_model";
readonly msg: {
readonly en: "Unable to load model on this device/browser. Please try another one.";
readonly vi: "Không thể load model. Vui lòng thử trình duyệt hoặc thiết bị khác.";
};
};
readonly no_permission: {
readonly code: "no_permission";
readonly msg: {
readonly en: "Please grant the permission to access the camera.";
readonly vi: "Vui lòng cấp quyền để truy cập camera.";
};
};
readonly api_call_error: {
readonly code: "api_call_error";
readonly msg: {
readonly en: "Api call error";
readonly vi: "Lỗi call api";
};
};
readonly upload_error: {
readonly code: "upload_error";
readonly msg: {
readonly en: "Upload error";
readonly vi: "Lỗi upload";
};
};
readonly sanity_check_error: {
readonly code: "sanity_check_error";
readonly msg: {
readonly en: "Sanity check error";
readonly vi: "Lỗi check sanity";
};
};
readonly read_id_card_error: {
readonly code: "read_id_card_error";
readonly msg: {
readonly en: "Read id card error";
readonly vi: "Lỗi read id card";
};
};
readonly detect_id_tampering_error: {
readonly code: "detect_id_tampering_error";
readonly msg: {
readonly en: "Detect id tampering error";
readonly vi: "Lỗi detect id tampering";
};
};
readonly detect_id_card_error: {
readonly code: "detect_id_card_error";
readonly msg: {
readonly en: "Can't detect id card type";
readonly vi: "Không thể detect id card type";
};
};
readonly missing_front_id_card: {
readonly code: "missing_front_id_card";
readonly msg: {
readonly en: "Missing front id";
readonly vi: "Không tìm thấy front id";
};
};
readonly server_error: {
readonly code: "server_error";
readonly msg: "Server error";
};
readonly not_readable: {
readonly code: "CameraInUseError";
readonly msg: {
readonly vi: "Camera đang được sử dụng bởi ứng dụng/tab khác.";
readonly en: "Camera already in use by another app/tab.";
};
};
readonly invalid_card_type_config: {
readonly code: "invalid_card_type_config";
readonly msg: {
readonly en: "Invalid card type config";
readonly vi: "Cấu hình loại thẻ không hợp lệ";
};
};
readonly max_retry_reached: {
readonly code: "max_retry_reached";
readonly msg: {
readonly vi: "Đã quá số lần thử";
readonly en: "Maximum retries reached";
};
};
readonly sdk_timeout_reached: {
readonly code: "sdk_timeout_reached";
readonly msg: {
readonly vi: "Đã quá thời gian thực hiện";
readonly en: "SDK timeout reached";
};
};
readonly flashing_color_error: {
readonly code: "flashing_color_error";
readonly msg: {
readonly en: "Flashing color error";
readonly vi: "Lỗi flashing color";
};
};
};
declare const FaceDirection: {
readonly FRONTAL: "frontal";
readonly LEFT: "left";
readonly RIGHT: "right";
readonly UP: "up";
readonly DOWN: "down";
};
declare const FaceAuthenticationMode: {
readonly REGISTRATION: "registration";
readonly AUTHENTICATION: "authentication";
};
declare const FaceAuthMethod: {
readonly STANDARD_AUTHEN: "passive";
readonly ADVANCED_AUTHEN_ACTIVE: "active";
readonly EDGE_AUTHEN: "flash_edge";
readonly ADVANCED_AUTHEN_FLASH: "flash_advanced";
readonly LIGHT_AUTHEN: "light";
readonly FLASH_8: "flash_8";
readonly FLASH_16: "flash_16";
readonly FLASH_32: "flash_32";
readonly PASSIVE_V2: "passive_v2";
};
declare const Mode: {
readonly ACTIVE: "active";
readonly PASSIVE: "passive";
readonly PASSIVE_V2: "passive_v2";
readonly FLASH: "flash";
readonly FLASH_EDGE: "flash_edge";
readonly FLASH_ADVANCED: "flash_advanced";
readonly FLASH_8: "flash_8";
readonly FLASH_16: "flash_16";
readonly FLASH_32: "flash_32";
};
declare const Messages: {
readonly REMAIN_TIME: {
readonly en: "Remaining: <%= x %> second(s)";
readonly vi: "Còn lại: <%= x %> giây";
readonly 'es-mx': "Restante: <%= x %> segundos";
};
};
declare const TrackLivenessEvents: {
readonly start_camera: "user_activity.start";
readonly show_warmup: "user_activity.show";
readonly capture_up_face: "user_activity.up";
readonly capture_left_face: "user_activity.left";
readonly capture_right_face: "user_activity.right";
readonly capture_frontal_face: "user_activity.frontal";
readonly finish_capture: "user_activity";
readonly finish_load_model: "sdk.load_model";
readonly show_alert: "sdk_ui.show_alert";
readonly liveness_detection_done: "sdk_mode.liveness";
};
declare const IDCardSide: {
readonly FRONT: "front";
readonly BACK: "back";
};
declare const IDCardType: {
readonly VN: "vn.national_id";
};
declare const IDCardMessage: {
readonly REMAINING_TIME: {
readonly en: "Remaining: <%= x %> second(s)";
readonly vi: "Còn lại: <%= x %> giây";
};
readonly TIMEOUT_INSTRUCTION: {
readonly en: "You need to take the picture within <%= x %> seconds.\nPlease try again.";
readonly vi: "Bạn cần hoàn thành việc chụp giấy tờ trong <%= x %> giây.\nVui lòng thử lại.";
};
};
declare const IdCardModelName: {
readonly model_vn: "model_vn";
readonly model_ph: "model_ph";
readonly model_vn_1: "model_vn_1";
};
type CardBboxes = {
lapType: 'small' | 'large';
bboxes: [number, number, number, number][];
};
declare const RESIZE_IMAGE_WIDTH = 856;
declare const RESIZE_IMAGE_HEIGHT = 540;
declare const VnCardsBboxes: Record<string, CardBboxes[]>;
type CardType = {
back_qr: {
exist: boolean;
};
code: string;
front_qr: {
exist: boolean;
};
has_back_side: boolean;
front_face: {
exist: boolean;
};
back_face: {
exist: boolean;
};
name: string;
orientation: 'horizontal' | 'vertical';
};
declare const CardTypes: {
VnNationalID: CardType;
VnCMND: CardType;
VnCMNDNew: CardType;
VnCCCD: CardType;
VnCCCDNew: CardType;
VnPassport: CardType;
VnTCC: CardType;
PhNationalID: CardType;
PhNID: CardType;
GlobalPassport: CardType;
VietnameseCards: CardType[];
PhilippinesCards: CardType[];
};
declare function convertStringToCardType(code: string): CardType;
declare const DesignToken: {
readonly Color: {
readonly base: {
readonly white: "#FFFFFF";
readonly blue: "#0276F1";
readonly black: "#0F172A";
};
readonly blue: {
readonly 900: "#0276F1";
readonly 800: "#1B84F2";
readonly 700: "#3591F4";
readonly 600: "#4E9FF5";
readonly 500: "#67ADF7";
readonly 400: "#81BBF8";
readonly 300: "#9AC8F9";
readonly 200: "#B3D6FB";
readonly 100: "#CCE4FC";
readonly 50: "#E6F1FE";
};
readonly neutral: {
readonly 900: "#0F172A";
readonly 800: "#1E293B";
readonly 700: "#334155";
readonly 600: "#475569";
readonly 500: "#64748B";
readonly 400: "#94A3B8";
readonly 300: "#CBD5E1";
readonly 200: "#E2E8F0";
readonly 100: "#F1F5F9";
readonly 50: "#F2F6FA";
};
readonly semantic: {
readonly info: {
readonly 500: "#1A91DC";
readonly 400: "#41A4E9";
readonly 300: "#7EC3F2";
readonly 200: "#BCE0F8";
readonly 100: "#E8F4FC";
};
readonly error: {
readonly 500: "#C00000";
readonly 400: "#E84848";
readonly 300: "#F38B8B";
readonly 200: "#F8C1C1";
readonly 100: "#FCE8E8";
};
readonly success: {
readonly 500: "#008A55";
readonly 400: "#33B179";
readonly 300: "#7FD4A7";
readonly 200: "#C2EDD6";
readonly 100: "#E6F6ED";
};
readonly warning: {
readonly 500: "#FF9900";
readonly 400: "#FFB84D";
readonly 300: "#FFD280";
readonly 200: "#FFE7B3";
readonly 100: "#FFF6E0";
};
};
readonly background: {
readonly primary: "#FFFFFF";
readonly secondary: "#F8FAFC";
readonly tertiary: "#E0E6ED";
readonly disable: "#CBD5E1";
};
readonly mask: {
readonly 70: "rgba(10, 10, 10, 0.7)";
readonly 50: "rgba(10, 10, 10, 0.5)";
readonly 30: "rgba(10, 10, 10, 0.3)";
};
readonly content: {
readonly primary: "#020617";
readonly secondary: "#475569";
readonly tertiary: "#64748B";
readonly 'on-bg-color': "#FFFFFF";
readonly 'on-bg-color-primary': "#FFFFFF";
readonly 'on-bg-color-secondary': "rgba(255, 255, 255, 0.6)";
readonly 'on-bg-color-tertiary': "rgba(255, 255, 255, 0.4)";
};
readonly separators: {
readonly primary: "#94A3B8";
readonly secondary: "#CBD5E1";
readonly tertiary: "#E2E8F0";
};
};
readonly Spacing: {
readonly '3xs': "2px";
readonly '2xs': "4px";
readonly xs: "8px";
readonly sm: "12px";
readonly base: "16px";
readonly lg: "20px";
readonly xl: "24px";
readonly '2xl': "32px";
readonly '3xl': "40px";
readonly '4xl': "48px";
readonly '5xl': "56px";
readonly '6xl': "64px";
readonly '7xl': "72px";
readonly '8xl': "80px";
};
readonly FontSize: {
readonly '5xl': "32px";
readonly '4xl': "28px";
readonly '3xl': "26px";
readonly '2xl': "24px";
readonly xl: "20px";
readonly lg: "18px";
readonly base: "16px";
readonly sm: "14px";
readonly xs: "12px";
};
readonly FontWeight: {
readonly 'semi-bold': 600;
readonly medium: 500;
readonly regular: 400;
};
readonly LineHeight: {
readonly '5xl': "38px";
readonly '4xl': "34px";
readonly '3xl': "31px";
readonly '2xl': "29px";
readonly xl: "24px";
readonly lg: "25px";
readonly base: "22px";
readonly sm: "20px";
readonly xs: "17px";
};
readonly FontFamily: {
readonly inter: "Inter";
};
readonly LetterSpacing: {
readonly xl: "-1.6px";
readonly lg: "-1.2px";
readonly md: "-0.8px";
readonly sm: "-0.4px";
readonly none: "0px";
};
readonly CornerRadius: {
readonly '4xs': "2px";
readonly '3xs': "4px";
readonly '2xs': "6px";
readonly xs: "8px";
readonly sm: "12px";
readonly base: "16px";
readonly lg: "24px";
readonly xl: "32px";
readonly '2xl': "40px";
readonly '3xl': "48px";
readonly full: "9999px";
};
readonly BorderWidth: {
readonly sm: "0.5px";
readonly base: "1px";
readonly lg: "1.5px";
readonly xl: "2px";
readonly '2xl': "2.5px";
readonly '3xl': "3px";
readonly '4xl': "3.5px";
readonly '5xl': "4px";
};
readonly Typography: {
readonly h1: {
readonly fontFamily: "Inter";
readonly fontSize: "32px";
readonly lineHeight: "38px";
readonly fontWeight: 600;
readonly letterSpacing: "-0.4px";
};
readonly h2: {
readonly fontFamily: "Inter";
readonly fontSize: "28px";
readonly lineHeight: "34px";
readonly fontWeight: 600;
readonly letterSpacing: "-0.4px";
};
readonly h3: {
readonly fontFamily: "Inter";
readonly fontSize: "26px";
readonly lineHeight: "31px";
readonly fontWeight: 600;
readonly letterSpacing: "-0.4px";
};
readonly h4: {
readonly fontFamily: "Inter";
readonly fontSize: "24px";
readonly lineHeight: "29px";
readonly fontWeight: 600;
readonly letterSpacing: "-0.4px";
};
readonly h5: {
readonly fontFamily: "Inter";
readonly fontSize: "20px";
readonly lineHeight: "24px";
readonly fontWeight: 500;
readonly letterSpacing: "-0.4px";
};
readonly h6: {
readonly fontFamily: "Inter";
readonly fontSize: "18px";
readonly lineHeight: "25px";
readonly fontWeight: 400;
readonly letterSpacing: "-0.4px";
};
readonly body: {
readonly fontFamily: "Inter";
readonly fontSize: "16px";
readonly lineHeight: "22px";
readonly fontWeight: 400;
readonly letterSpacing: "0px";
};
readonly label: {
readonly fontFamily: "Inter";
readonly fontSize: "14px";
readonly lineHeight: "20px";
readonly fontWeight: 400;
readonly letterSpacing: "0px";
};
readonly caption: {
readonly fontFamily: "Inter";
readonly fontSize: "12px";
readonly lineHeight: "17px";
readonly fontWeight: 400;
readonly letterSpacing: "0px";
};
};
readonly UIText: {
readonly large: {
readonly fontFamily: "Inter";
readonly fontSize: "18px";
readonly fontWeight: 400;
readonly letterSpacing: "0px";
readonly lineHeight: "25px";
};
readonly largeStrong: {
readonly fontFamily: "Inter";
readonly fontSize: "18px";
readonly fontWeight: 500;
readonly letterSpacing: "0px";
readonly lineHeight: "25px";
};
readonly medium: {
readonly fontFamily: "Inter";
readonly fontSize: "16px";
readonly fontWeight: 400;
readonly letterSpacing: "0px";
readonly lineHeight: "22px";
};
readonly mediumStrong: {
readonly fontFamily: "Inter";
readonly fontSize: "16px";
readonly fontWeight: 500;
readonly letterSpacing: "0px";
readonly lineHeight: "22px";
};
readonly small: {
readonly fontFamily: "Inter";
readonly fontSize: "14px";
readonly fontWeight: 400;
readonly letterSpacing: "0px";
readonly lineHeight: "20px";
};
readonly smallStrong: {
readonly fontFamily: "Inter";
readonly fontSize: "14px";
readonly fontWeight: 500;
readonly letterSpacing: "0px";
readonly lineHeight: "20px";
};
};
readonly Height: {
readonly xs: "8px";
readonly sm: "16px";
readonly md: "20px";
readonly lg: "24px";
readonly xl: "32px";
readonly '2xl': "40px";
readonly '3xl': "48px";
readonly '4xl': "56px";
readonly '5xl': "64px";
readonly '6xl': "72px";
readonly '7xl': "80px";
};
};
declare const BillingService: {
readonly selfie: "selfie";
readonly qr: "qr";
readonly idCard: "id";
readonly faceAuth: "face_auth";
};
declare const ErrorsWithoutBilling: readonly ["not_supported", "camera_timeout", "unable_to_load_model", "no_permission"];
declare const BillingStatus: {
readonly success: "success";
readonly fail: "fail";
readonly cancel: "cancel";
};
declare const index$1_AlertErrors: typeof AlertErrors;
declare const index$1_BillingErrors: typeof BillingErrors;
declare const index$1_BillingService: typeof BillingService;
declare const index$1_BillingStatus: typeof BillingStatus;
type index$1_CardType = CardType;
declare const index$1_CardTypes: typeof CardTypes;
declare const index$1_DesignToken: typeof DesignToken;
declare const index$1_ErrorDuration: typeof ErrorDuration;
declare const index$1_Errors: typeof Errors;
declare const index$1_ErrorsWithoutBilling: typeof ErrorsWithoutBilling;
declare const index$1_FaceAuthMethod: typeof FaceAuthMethod;
declare const index$1_FaceAuthenticationMode: typeof FaceAuthenticationMode;
declare const index$1_FaceDirection: typeof FaceDirection;
declare const index$1_IDCardMessage: typeof IDCardMessage;
declare const index$1_IDCardSide: typeof IDCardSide;
declare const index$1_IDCardType: typeof IDCardType;
declare const index$1_IdCardModelName: typeof IdCardModelName;
declare const index$1_LicenseErrors: typeof LicenseErrors;
declare const index$1_Messages: typeof Messages;
declare const index$1_Mode: typeof Mode;
declare const index$1_RESIZE_IMAGE_HEIGHT: typeof RESIZE_IMAGE_HEIGHT;
declare const index$1_RESIZE_IMAGE_WIDTH: typeof RESIZE_IMAGE_WIDTH;
declare const index$1_TrackLivenessEvents: typeof TrackLivenessEvents;
declare const index$1_VnCardsBboxes: typeof VnCardsBboxes;
declare const index$1_convertStringToCardType: typeof convertStringToCardType;
declare namespace index$1 {
export { index$1_AlertErrors as AlertErrors, index$1_BillingErrors as BillingErrors, index$1_BillingService as BillingService, index$1_BillingStatus as BillingStatus, index$1_CardTypes as CardTypes, index$1_DesignToken as DesignToken, index$1_ErrorDuration as ErrorDuration, index$1_Errors as Errors, index$1_ErrorsWithoutBilling as ErrorsWithoutBilling, index$1_FaceAuthMethod as FaceAuthMethod, index$1_FaceAuthenticationMode as FaceAuthenticationMode, index$1_FaceDirection as FaceDirection, index$1_IDCardMessage as IDCardMessage, index$1_IDCardSide as IDCardSide, index$1_IDCardType as IDCardType, index$1_IdCardModelName as IdCardModelName, index$1_LicenseErrors as LicenseErrors, index$1_Messages as Messages, index$1_Mode as Mode, index$1_RESIZE_IMAGE_HEIGHT as RESIZE_IMAGE_HEIGHT, index$1_RESIZE_IMAGE_WIDTH as RESIZE_IMAGE_WIDTH, index$1_TrackLivenessEvents as TrackLivenessEvents, index$1_VnCardsBboxes as VnCardsBboxes, index$1_convertStringToCardType as convertStringToCardType };
export type { index$1_CardType as CardType };
}
declare const _default: {
not_supported: string;
camera_timeout: string;
wrong_orientation: string;
unable_to_load_model: string;
no_permission: string;
not_readable: string;
card_sanity_not_good: string;
api_call_error: string;
upload_error: string;
sanity_check_error: string;
read_id_card_error: string;
detect_id_tampering_error: string;
detect_id_card_error: string;
missing_front_id_card: string;
server_error: string;
client_web_setting_not_found: string;
no_face: string;
partial_face: string;
multiple_faces: string;
face_too_small: string;
face_too_large: string;
face_out_of_box: string;
close_eye: string;
liveness_too_fast: string;
liveness_terminated: string;
liveness_terminated_face_tracking: string;
liveness_terminated_no_face: string;
liveness_terminated_time_out: string;
id_detector_validate_angle_error: string;
id_detector_no_cards: string;
id_detector_front_no_cards: string;
id_detector_back_no_cards: string;
id_detector_card_too_small: string;
id_detector_error_incomplete: string;
glare_detected: string;
id_detector_error_front_side_no_faces: string;
id_detector_error_front_side_multiple_faces: string;
id_detector_error_back_side_has_faces: string;
id_detector_error_blur: string;
id_detector_error_blurry: string;
not_frontal_face: string;
not_allowed_card_types: string;
id_detector_invalid_front_card: string;
id_detector_invalid_back_card: string;
warmup_intro: string;
btn_ok: string;
btn_use_this_picture: string;
btn_try_again: string;
remaining_time: string;
upload_button_label: string;
upload_invalid_file_type: string;
upload_processing_failed: string;
image_preview_unavailable: string;
front_card_title: string;
back_card_title: string;
front_card_description: string;
back_card_description: string;
front: string;
back: string;
timeout_instruction: string;
toggle_id_capture_mode: string;
'id_capture.instruction.hold_still': string;
'id_capture.instruction.capturing_done': string;
qr_title: string;
qr_instructions_title: string;
qr_instructions_text: string;
qr_instructions_start_button: string;
qr_instructions_countdown: string;
confirm_popup_valid_qr: string;
confirm_popup_invalid_qr: string;
qr_invalid_popup_title: string;
qr_invalid_popup_description: string;
qr_invalid_popup_retry_button: string;
qr_invalid_popup_skip_button: string;
qr_tooltip: string;
session_timeout_popup_description: string;
session_timeout_popup_retry_button: string;
session_timeout_popup_skip_button: string;
left: string;
right: string;
up: string;
frontal: string;
'flash_liveness.title': string;
'flash_liveness.instruction.far_step': string;
'flash_liveness.instruction.close_step': string;
'flash_liveness.instruction.flash_step': string;
'flash_liveness.error.no_face': string;
'flash_liveness.processing': string;
'flash_liveness.error.partial_face': string;
'flash_liveness.error.face_too_small': string;
'flash_liveness.error.face_too_large': string;
'flash_liveness.error.close_eye': string;
'flash_liveness.error.face_not_frontal': string;
'flash_liveness.error.multiple_faces': string;
'flash_liveness.error.face_too_high': string;
'flash_liveness.error.face_too_blurry': string;
'flash_liveness.error.face_not_qualified': string;
'flash_liveness.timeout.remaining': string;
'flash_liveness.timeout.expired': string;
'flash_liveness.error.face_too_bright': string;
'flash_liveness.error.face_too_dark': string;
'passive_liveness_v2.instruction.hold_still': string;
'passive_liveness_v2.instruction.capturing_done': string;
};
type Translation = typeof _default;
type CustomTexts = Partial<Translation> & {
[key: string]: string;
};
interface BlazefaceModel {
load(params?: {
modelUrl?: string;
}): Promise<any>;
}
interface TFLite {
loadTFLiteModel(data: Uint8Array, options?: Record<string, any>): Promise<any>;
}
interface TensorFlow {
enableProdMode(): Promise<void>;
setBackend(backend: string): Promise<void>;
ready(): Promise<void>;
}
declare global {
interface Window {
tf: TensorFlow;
blazeface: BlazefaceModel;
tflite: TFLite;
tv_model_backend_init?: string[];
}
}
type NestedPartial<T> = {
[K in keyof T]?: T[K] extends object ? NestedPartial<T[K]> : T[K];
};
type IdCardModelUrlsWithModelName = Record<keyof typeof IdCardModelName, string>;
type TfScriptUrls = {
tfUrl: string;
tfBackendWasmUrl: string;
tfBackendCpuUrl: string;
tfBackendWebGlUrl: string;
tfLiteUrl: string;
blazefaceScriptUrl: string;
};
type ResourceUrls = {
blazefaceModelUrl: string;
opencvUrl: string;
opencvWasmUrl: string;
idCardModelUrl: string;
wechatQRModelsUrl: string;
closeEyesModelUrl: string;
qualifyModelUrl: string;
tfScriptUrls: TfScriptUrls;
idCardModelUrls: IdCardModelUrlsWithModelName;
};
/**
* Interface for configuring service settings. All properties are optional.
*/
interface ServiceSettings {
/** Optionally configures the GetClientSettings service. */
enableGetClientSettings?: boolean;
/** Optionally configures the UploadFrames service. */
enableUploadFrames?: boolean;
/** Optionally configures the UploadImages service. */
enableUploadImages?: boolean;
/** Optionally configures the VerifySanityPortrait service. */
enableVerifySanityPortrait?: boolean;
/** Optionally configures the VerifySanityIDCard service. */
enableVerifySanityIDCard?: boolean;
/** Optionally configures the VerifyFaceLiveness service. */
enableVerifyFaceLiveness?: boolean;
/** Optionally configures the DetectIDCardTampering service. */
enableDetectIDCardTampering?: boolean;
/** Optionally configures the ReadIDCardInfo service. */
enableReadIDCardInfo?: boolean;
/** Optionally configures the RegisterFace service. */
enableRegisterFace?: boolean;
/** Optionally configures the AuthenticateFace service. */
enableAuthenticateFace?: boolean;
}
type CustomErrors = {
[key: string]: {
code: string;
msg: {
[lang: string]: string;
};
};
};
type BaseTVWebSDKProps = {
container: HTMLElement;
lang?: 'vi' | 'en' | 'es-mx' | 'hi';
assetRoot?: string;
resourceRoot?: string;
customUrls?: NestedPartial<ResourceUrls>;
enableAntiDebug?: boolean;
warmupMessage?: string;
baseComponent?: Record<string, any>;
component?: Record<string, any>;
country?: 'vn' | 'ph';
idCardContext?: Record<string, any>;
exifKey?: string;
themeVersion?: 'v1' | 'v2';
enableVoice?: boolean;
uiSettings?: Record<string, any>;
billingSettings?: Record<string, any> | null;
};
type DeviceInfo = {
id: string | null;
udid: string | null;
sn: string | null;
imei: string | null;
manufacturer: string | null;
deviceName: string | null;
wlanMac: string | null;
phoneNumber: string | null;
location: {
latitude: number | null;
lo