@innovatrics/dot-auto-capture-ui
Version:
Digital onboarding UI
26 lines (25 loc) • 1.34 kB
TypeScript
import type { AppStateInstruction, CustomizationContextProps, EscalatedInstructions, HTMLElementWithProps, UiProps } from './common';
import type { CustomElement, DeepRequired, SmileEscalatedInstructionCodes, SmileInstructionCode } from '../../../ui-common/src/types';
export * from './common';
declare global {
namespace JSX {
interface IntrinsicElements {
'x-dot-smile-liveness-ui': CustomElement<{
props: SmileLivenessUiProps;
}>;
}
}
}
export type SmileInstructions = Record<SmileInstructionCode, string>;
export type CustomizableSmileInstructions = Omit<SmileInstructions, 'mouth_score_too_high' | 'mouth_score_too_low'>;
export type SmileLivenessUiProps<I = CustomizableSmileInstructions, SI = SmileStateInstructions> = UiProps<I, SI> & EscalatedInstructions<SmileEscalatedInstructionCodes>;
type RequiredUiProps = DeepRequired<UiProps<SmileInstructions>>;
export type SmileProps = CustomizationContextProps<RequiredUiProps> & EscalatedInstructions<SmileEscalatedInstructionCodes>;
export type HTMLSmileLivenessUiElement = HTMLElementWithProps<SmileLivenessUiProps>;
export type SmileStateInstructions = {
done?: AppStateInstruction;
loading?: AppStateInstruction;
};
export type UiSmileStateInstructions = {
[key: string]: DeepRequired<AppStateInstruction>;
};