UNPKG

dikript-react-identity-comparison-sdk

Version:

A Dikript's React SDK for identity comparison and liveness checks.

40 lines (39 loc) 1.35 kB
import React from 'react'; import { IdentityComparisonResponse } from '../utils/api'; import './IdentityComparisonPopup.css'; /** * Interface for ID type options */ export interface IdType { /** Value to be sent to the API */ value: string; /** Display label for the dropdown */ label: string; } /** * Props for the IdentityComparisonPopup component */ export interface IdentityComparisonPopupProps { /** API key for authentication */ apiKey: string; /** The name of your application */ name: string; /** The URL for the identity comparison API endpoint */ apiUrl: string; /** Callback function called when the popup is closed */ onClose: () => void; /** Callback function called with the result of the identity comparison */ onIdentityComparisonResult: (result: IdentityComparisonResponse) => void; /** Path to the face-api.js models (optional) */ modelPath?: string; /** Array of ID types to display in the dropdown (optional) */ idTypes?: IdType[]; } /** * Identity Comparison Popup Component * * A React component that provides a UI for identity verification using liveness checks * and ID verification. */ declare const IdentityComparisonPopup: React.FC<IdentityComparisonPopupProps>; export default IdentityComparisonPopup;