@cardscan.ai/insurance-cardscan-react
Version:
A library that makes it easy to add health insurance card scanning to any web application
71 lines (70 loc) • 2.22 kB
TypeScript
import { CardApiResponseSnake, EligibilityApiResponseSnake } from "@cardscan.ai/cardscan-client";
import { CardApiResponse, EligibilityApiResponse, NameCase, CardState } from "./types";
import { AdaptiveThresholdProps } from "../utils/AdaptiveThreshold";
export interface Messages {
manualCaptureTitle?: string;
frontsideCompletedTitle?: string;
autoCaptureTitle?: string;
processingTitle?: string;
manualProcessingTitle?: string;
completedTitle?: string;
errorTitle?: string;
retryTitle?: string;
cameraErrorTitle?: string;
eligibilityProcessing?: string;
postProcessing?: string;
eligibilityErrorTitle?: string;
}
export interface IndicatorOptions {
name?: "circle" | "ball-spin-fade-loader" | "line-scale" | "line-scale-pulse-out" | "line-spin-fade-loader" | "line-scale-pulse-out";
fadeIn?: "full" | "half" | "quarter" | "none";
color?: string;
}
export interface InternalOptions {
devAPIEndpoint?: boolean | string;
devWSEndpoint?: boolean | string;
debugMenu?: boolean;
webviewVersion?: string;
mobileSdkVersion?: string;
nameCase?: NameCase;
permissionModalDelay?: number;
enableWebcamMocking?: boolean;
mockWebcamSize?: {
width: number;
height: number;
};
mockWebcamFrontUrl?: string;
mockWebcamBackUrl?: string;
adaptiveThresholdConfig?: AdaptiveThresholdProps;
}
export type ResponseTypeMap = {
snake: CardApiResponseSnake;
camel: CardApiResponse;
};
export type TCameraOptions = {
flipHorizontal?: boolean;
flipVertical?: boolean;
};
export type EligibilityResponseTypeMap = {
snake: EligibilityApiResponseSnake;
camel: EligibilityApiResponse;
};
export type ProgressInfoCamel = {
cardId: string;
cardState: CardState;
scanCount: number;
};
export type ProgressInfoSnake = {
card_id: string;
card_state: CardState;
scan_count: number;
};
export type ProgressInfoResponseTypeMap = {
snake: ProgressInfoSnake;
camel: ProgressInfoCamel;
};
export type HealthcarePayerInfoResponse = {
chc_payer_id: string;
chc_payer_name: string;
score: number;
};