dcc-decoder
Version:
<img alttext="COVID Green Logo" src="https://raw.githubusercontent.com/lfph/artwork/master/projects/covidgreen/stacked/color/covidgreen-stacked-color.png" width="300" />
47 lines (46 loc) • 1.41 kB
TypeScript
import { RuleSet, ValueSetsComputed } from '../rules-runner/types';
import { CertificateContent, CERT_TYPE, VaccinationGroup, TestGroup, RecoveryGroup } from './hcert';
export type { VaccinationGroup, TestGroup, RecoveryGroup };
export declare type Valueset = {
display: string;
lang: string;
active: boolean;
version: string;
system: string;
};
export declare type Valuesets = {
countryCodes: Record<string, Valueset>;
diseaseAgentTargeted: Record<string, Valueset>;
testManf: Record<string, Valueset>;
testResult: Record<string, Valueset>;
testType: Record<string, Valueset>;
vaccineMahManf: Record<string, Valueset>;
vaccineMedicinalProduct: Record<string, Valueset>;
vaccineProphylaxis: Record<string, Valueset>;
};
export declare type SigningKey = {
kid: string;
x: string;
y: string;
country: string;
pem?: string;
};
export declare type SigningKeys = SigningKey[];
export declare type DCCData = {
signingKeys: SigningKeys;
valueSets?: Valuesets;
ruleSet?: RuleSet;
valuesetsComputed?: ValueSetsComputed;
};
export declare type RuleError = {
id: string;
description: string;
};
export declare type VerificationResult = {
rawCert?: CertificateContent;
cert?: CertificateContent;
ruleErrors?: RuleError[];
type?: CERT_TYPE;
error?: Error;
wrapperData?: Record<string, unknown>;
};