@loqate/compose
Version:
Loqate Compose SDK — high-level flows that compose base API clients into easy-to-use sessions.
23 lines (20 loc) • 900 B
TypeScript
type ParsedAVC = {
code: string
matchscore: number
verificationStatus: string
postMatchLevel: number
preMatchLevel: number
parsingStatus: string
lexiconIdentificationMatchLevel: number
contextIdentificationMatchLevel: number
postcodeStatus: string
postcodeStatusNumeric: number
};
declare function parseAVC(code: string): ParsedAVC;
type ComparisonOperator = ">" | ">=" | "<" | "<=" | "===";
type SymbolicTest = { [op in ComparisonOperator]? : string | number };
type AVCField = "matchscore" | "verificationStatus" | "postMatchLevel" | "preMatchLevel" | "parsingStatus" | "lexiconIdentificationMatchLevel" | "contextIdentificationMatchLevel" | "postcodeStatus";
type MatchRule = Partial<Record<AVCField, SymbolicTest>>;
declare const testAVC: (avc: ParsedAVC | string, rules?: MatchRule) => boolean;
export { parseAVC as p, testAVC as t };
export type { MatchRule as M, ParsedAVC as P };