UNPKG

@scandit/web-datacapture-id

Version:

Scandit Data Capture SDK for the Web

269 lines (268 loc) 9.48 kB
import type { QuadrilateralJSON } from "@scandit/web-datacapture-core"; export interface DateResultJSON { day: number | null; month: number | null; year: number; } export interface ProfessionalDrivingPermitJSON { dateOfExpiry: DateResultJSON; codes: string[]; } export interface VehicleRestrictionJSON { vehicleCode: string; vehicleRestriction: string; dateOfIssue: DateResultJSON; } export interface DrivingLicenseCategoryJSON { code: string; dateOfIssue: DateResultJSON | null; dateOfExpiry: DateResultJSON | null; } export interface DrivingLicenseDetailsJSON { drivingLicenseCategories: DrivingLicenseCategoryJSON[]; restrictions: string | null; endorsements: string | null; } export interface ImageInfoJSON { front: { face: string | null; croppedDocument: string | null; frame: string | null; }; back: { face: string | null; croppedDocument: string | null; frame: string | null; }; } interface CommonFieldsJSON { firstName: string | null; lastName: string | null; secondaryLastName: string | null; fullName: string; sex: string | null; nationality: string | null; address: string | null; issuingCountry: string | null; issuingCountryIso: string | null; documentNumber: string | null; documentAdditionalNumber: string | null; dateOfBirth: DateResultJSON | null; dateOfExpiry: DateResultJSON | null; dateOfIssue: DateResultJSON | null; documentType: string | null; documentSubtype: string | null; } export interface CapturedIdJSON { firstName: string | null; lastName: string | null; secondaryLastName: string | null; fullName: string; sex: string | null; nationality: string | null; address: string | null; issuingCountry: string | null; issuingCountryIso: string | null; documentNumber: string | null; documentAdditionalNumber: string | null; dateOfBirth: DateResultJSON | null; age: number | null; dateOfExpiry: DateResultJSON | null; isExpired: boolean | null; dateOfIssue: DateResultJSON | null; documentType: string | null; documentSubtype: string | null; imageInfo: ImageInfoJSON | null; idVerificationDataComparisonAvailable: boolean; barcodeResult: BarcodeResultJSON | null; mrzResult: MRZResultJSON | null; vizResult: VIZResultJSON | null; } interface RawImageInfo { data: Uint8ClampedArray | null; width: number; height: number; mirrorAxis: number; orientation: number; } export interface CapturedIdJSONWithRawImageInfo extends CapturedIdJSON { rawImageInfo: { front: { face: string | null; croppedDocument: string | null; frame: RawImageInfo; }; back: { face: null; croppedDocument: string | null; frame: RawImageInfo; }; }; } export type CapturedIdCommonFieldsJSON = Pick<CapturedIdJSON, "address" | "age" | "dateOfBirth" | "dateOfExpiry" | "dateOfIssue" | "documentAdditionalNumber" | "documentNumber" | "documentType" | "documentSubtype" | "firstName" | "fullName" | "isExpired" | "issuingCountry" | "issuingCountryIso" | "lastName" | "nationality" | "secondaryLastName" | "sex">; export type VIZResultExtendedJSON = Omit<CapturedIdCommonFieldsJSON & VIZResultJSON, "age" | "isExpired">; interface FieldLocations { frontFieldLocations: Partial<Record<string, QuadrilateralJSON>>; } export type VIZResultExtendedWithFieldLocationsJSON = FieldLocations & VIZResultExtendedJSON; export type CapturedIdWithExtendedVIZJSON = Omit<CapturedIdJSON, keyof CapturedIdCommonFieldsJSON | "idVerificationDataComparisonAvailable"> & { vizResult: VIZResultExtendedJSON; }; export type CapturedIdWithExtendedVIZAndLocationsJSON = Omit<CapturedIdJSON, keyof CapturedIdCommonFieldsJSON> & { vizResult: VIZResultExtendedWithFieldLocationsJSON; }; export interface BarcodeResultJSON extends CommonFieldsJSON { aamvaVersion: number | null; aliasFamilyName: string | null; aliasGivenName: string | null; aliasSuffixName: string | null; barcodeMetadata: BarcodeMetadataJSON | null; bloodType: string | null; branchOfService: string | null; cardInstanceIdentifier: string | null; cardRevisionDate: DateResultJSON | null; categories: string[] | null; champusEffectiveDate: DateResultJSON | null; champusExpiryDate: DateResultJSON | null; citizenshipStatus: string | null; civilianHealthCareFlagCode: string | null; civilianHealthCareFlagDescription: string | null; commissaryFlagCode: string | null; commissaryFlagDescription: string | null; countryOfBirth: string | null; countryOfBirthIso: string | null; deersDependentSuffixCode: number | null; deersDependentSuffixDescription: string | null; directCareFlagCode: string | null; directCareFlagDescription: string | null; documentCopy: string | null; documentDiscriminatorNumber: string | null; driverNamePrefix: string | null; driverNameSuffix: string | null; driverRestrictionCodes: number[] | null; ediPersonIdentifier: string | null; endorsementsCode: string | null; exchangeFlagCode: string | null; exchangeFlagDescription: string | null; eyeColor: string | null; familySequenceNumber: number | null; firstNameTruncation: string | null; firstNameWithoutMiddleName: string | null; formNumber: string | null; genevaConventionCategory: string | null; hairColor: string | null; heightCm: number | null; heightInch: number | null; iin: string | null; identificationType: string | null; issuingJurisdiction: string | null; issuingJurisdictionIso: string | null; jpegData: string | null; jurisdictionVersion: number | null; lastNameTruncation: string | null; licenseCountryOfIssue: string | null; middleName: string | null; middleNameTruncation: string | null; mwrFlagCode: string | null; mwrFlagDescription: string | null; payGrade: string | null; payPlanCode: string | null; payPlanGradeCode: string | null; personDesignatorDocument: number | null; personDesignatorTypeCode: string | null; personMiddleInitial: string | null; personalIdNumber: string | null; personalIdNumberType: string | null; personnelCategoryCode: string | null; personnelEntitlementConditionType: string | null; placeOfBirth: string | null; professionalDrivingPermit: ProfessionalDrivingPermitJSON | null; race: string | null; rank: string | null; rawData: string | null; relationshipCode: string | null; relationshipDescription: string | null; restrictionsCode: string | null; securityCode: string | null; serviceCode: string | null; sponsorFlag: string | null; sponsorName: string | null; sponsorPersonDesignatorIdentifier: number | null; statusCode: string | null; statusCodeDescription: string | null; vehicleClass: string | null; vehicleRestrictions: VehicleRestrictionJSON[] | null; version: string | null; weightKg: number | null; weightLbs: number | null; isRealId: boolean | null; dictionary: Record<string, string>; } export interface MRZResultJSON extends CommonFieldsJSON { documentCode: string; namesAreTruncated: boolean; optional: string | null; optional1: string | null; capturedMrz: string; personalIdNumber: string | null; renewalTimes: number | null; fullNameSimplifiedChinese: string | null; omittedCharacterCountInGbkName: number | null; omittedNameCount: number | null; issuingAuthorityCode: string | null; passportIssuerIso: string | null; passportNumber: string | null; passportDateOfExpiry: DateResultJSON | null; } export interface VIZResultJSON extends CommonFieldsJSON { additionalAddressInformation: string | null; additionalNameInformation: string | null; documentAdditionalNumber: string | null; employer: string | null; issuingAuthority: string | null; issuingJurisdiction: string | null; issuingJurisdictionIso: string | null; maritalStatus: string | null; personalIdNumber: string | null; placeOfBirth: string | null; profession: string | null; race: string | null; religion: string | null; residentialStatus: string | null; mothersName: string | null; fathersName: string | null; capturedSides: string; isBackSideCaptureSupported: boolean; drivingLicenseDetails: DrivingLicenseDetailsJSON | null; bloodType: string | null; sponsor: string | null; visaNumber: string | null; passportNumber: string | null; } export interface IdCaptureErrorJSON { type: string; message: string; } export interface IdCaptureSessionJSON { newlyCapturedId: CapturedIdJSON | null; localizedOnlyId: LocalizedOnlyIdJSON | null; newlyRejectedId: RejectedIdJSON | null; frameSequenceId: number; error: IdCaptureErrorJSON | null; } export interface LocalizedOnlyIdJSON { location: QuadrilateralJSON; } export interface RejectedIdJSON { location: QuadrilateralJSON; rejectionReason: string; } export interface AamvaBarcodeVerificationResultJSON { allChecksPassed: boolean; } export interface BarcodeMetadataJSON { errorCorrection: number; moduleCountX: number; moduleCountY: number; } export {};