@cardscan.ai/insurance-cardscan-react
Version:
A library that makes it easy to add health insurance card scanning to any web application
61 lines (60 loc) • 1.91 kB
TypeScript
import { CardApiResponseSnake, EligibilityApiResponseSnake } from "@cardscan.ai/cardscan-client";
import { CardApiResponse, EligibilityApiResponse, NameCase, CardState } from "./types";
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<Name extends NameCase = "snake"> {
devAPIEndpoint?: boolean | string;
devWSEndpoint?: boolean | string;
debugMenu?: boolean;
webviewVersion?: string;
mobileSdkVersion?: string;
nameCase?: Name;
}
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;
};