Socket
Socket
Sign inDemoInstall

scandit-cordova-datacapture-id

Package Overview
Dependencies
Maintainers
4
Versions
115
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

scandit-cordova-datacapture-id - npm Package Compare versions

Comparing version 6.11.0 to 6.12.0-beta.1

src/android/actions/ActionVerifyCapturedId.kt

2

package.json
{
"name": "scandit-cordova-datacapture-id",
"version": "6.11.0",
"version": "6.12.0-beta.1",
"description": "Scandit Data Capture SDK for Cordova",

@@ -5,0 +5,0 @@ "license": "Apache-2.0",

"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.RejectedId = exports.LocalizedOnlyId = exports.SouthAfricaDlBarcodeResult = exports.SouthAfricaIdBarcodeResult = exports.ColombiaIdBarcodeResult = exports.ArgentinaIdBarcodeResult = exports.VIZResult = exports.USUniformedServicesBarcodeResult = exports.MRZResult = exports.AAMVABarcodeResult = exports.CapturedId = exports.VehicleRestriction = exports.ProfessionalDrivingPermit = exports.DateResult = void 0;
exports.AamvaVizBarcodeComparisonVerifier = exports.AamvaVizBarcodeComparisonResult = exports.RejectedId = exports.LocalizedOnlyId = exports.SouthAfricaDlBarcodeResult = exports.SouthAfricaIdBarcodeResult = exports.ColombiaIdBarcodeResult = exports.ArgentinaIdBarcodeResult = exports.VIZResult = exports.USUniformedServicesBarcodeResult = exports.MRZResult = exports.AAMVABarcodeResult = exports.CapturedId = exports.VehicleRestriction = exports.ProfessionalDrivingPermit = exports.DateResult = void 0;
/// <amd-module name="scandit-cordova-datacapture-id.CapturedId"/>
// ^ needed because Cordova can't resolve "../xx" style dependencies
const Common_1 = require("scandit-cordova-datacapture-core.Common");
const IdCaptureProxy_1 = require("scandit-cordova-datacapture-id.IdCaptureProxy");
const Serializeable_1 = require("scandit-cordova-datacapture-core.Serializeable");
class DateResult {

@@ -63,2 +71,5 @@ get day() { return this.json.day; }

get capturedResultType() { return this.json.capturedResultType; }
get capturedResultTypes() {
return this.json.capturedResultTypes;
}
get documentType() { return this.json.documentType; }

@@ -250,2 +261,3 @@ get issuingCountryIso() { return this.json.issuingCountryIso; }

get issuingJurisdiction() { return this.json.issuingJurisdiction; }
get issuingJurisdictionIso() { return this.json.issuingJurisdictionIso; }
get maritalStatus() { return this.json.maritalStatus; }

@@ -341,1 +353,92 @@ get personalIdNumber() { return this.json.personalIdNumber; }

exports.RejectedId = RejectedId;
class StringComparisonCheck {
get vizValue() { return this.json.vizValue; }
get aamvaBarcodeValue() { return this.json.aamvaBarcodeValue; }
get checkResult() { return this.json.checkResult; }
get resultDescription() { return this.json.resultDescription; }
static fromJSON(json) {
const result = new StringComparisonCheck();
result.json = json;
return result;
}
}
class DateComparisonCheck {
get vizValue() {
return DateResult.fromJSON(this.json.vizValue);
}
get aamvaBarcodeValue() {
return DateResult.fromJSON(this.json.aamvaBarcodeValue);
}
get checkResult() { return this.json.checkResult; }
get resultDescription() { return this.json.resultDescription; }
static fromJSON(json) {
const result = new DateComparisonCheck();
result.json = json;
return result;
}
}
class AamvaVizBarcodeComparisonResult {
get checksPassed() { return this.json.checksPassed; }
get resultDescription() { return this.json.resultDescription; }
get issuingCountryIsoMatch() {
return StringComparisonCheck
.fromJSON(this.json.issuingCountryIsoMatch);
}
get issuingJurisdictionIsoMatch() {
return StringComparisonCheck
.fromJSON(this.json.issuingJurisdictionIsoMatch);
}
get documentNumbersMatch() {
return StringComparisonCheck
.fromJSON(this.json.documentNumbersMatch);
}
get fullNamesMatch() {
return StringComparisonCheck
.fromJSON(this.json.fullNamesMatch);
}
get datesOfBirthMatch() {
return DateComparisonCheck
.fromJSON(this.json.datesOfBirth);
}
get datesOfExpiryMatch() {
return DateComparisonCheck
.fromJSON(this.json.datesOfExpiry);
}
get datesOfIssueMatch() {
return DateComparisonCheck
.fromJSON(this.json.datesOfIssue);
}
static fromJSON(json) {
const result = new AamvaVizBarcodeComparisonResult();
result.json = json;
return result;
}
}
exports.AamvaVizBarcodeComparisonResult = AamvaVizBarcodeComparisonResult;
class AamvaVizBarcodeComparisonVerifier {
constructor() {
this.proxy = new IdCaptureProxy_1.IdCaptureProxy();
}
static create() {
return new AamvaVizBarcodeComparisonVerifier();
}
verify(capturedId) {
return new Promise((resolve, reject) => {
this.proxy
.verifyCapturedId(JSON.stringify(capturedId))
.then((json) => {
if (!json) {
resolve();
}
else {
resolve(AamvaVizBarcodeComparisonResult
.fromJSON(JSON.parse(json)));
}
}, reject);
});
}
}
__decorate([
Serializeable_1.ignoreFromSerialization
], AamvaVizBarcodeComparisonVerifier.prototype, "proxy", void 0);
exports.AamvaVizBarcodeComparisonVerifier = AamvaVizBarcodeComparisonVerifier;

@@ -10,3 +10,4 @@ /// <amd-module name="scandit-cordova-datacapture-id.Cordova" />

SubscribeIdCaptureListener = "subscribeIdCaptureListener",
ResetIdCapture = "resetIdCapture"
ResetIdCapture = "resetIdCapture",
VerifyCapturedId = "verifyCapturedId"
}

@@ -25,2 +25,3 @@ "use strict";

CordovaFunction["ResetIdCapture"] = "resetIdCapture";
CordovaFunction["VerifyCapturedId"] = "verifyCapturedId";
})(CordovaFunction = exports.CordovaFunction || (exports.CordovaFunction = {}));

@@ -8,3 +8,4 @@ /// <amd-module name="scandit-cordova-datacapture-id.IdCaptureProxy" />

reset(): Promise<void>;
verifyCapturedId(capturedId: string): Promise<string | null>;
}
export {};

@@ -18,4 +18,11 @@ "use strict";

}
verifyCapturedId(capturedId) {
return new Promise((resolve, reject) => {
IdCaptureProxy.cordovaExec(resolve, reject, Cordova_1.CordovaFunction.VerifyCapturedId, [
capturedId,
]);
});
}
}
exports.IdCaptureProxy = IdCaptureProxy;
IdCaptureProxy.cordovaExec = Cordova_1.Cordova.exec;
/// <amd-module name="scandit-cordova-datacapture-id.SerializedTypes" />
import { QuadrilateralJSON } from 'Common';
import { ComparisonCheckResult } from 'Enums';
export interface DateResultJSON {

@@ -24,2 +25,3 @@ day: number;

capturedResultType: string;
capturedResultTypes: string[];
firstName: string | null;

@@ -155,3 +157,4 @@ lastName: string | null;

issuingAuthority: string | null;
issuingJurisdiction: string | null;
issuingJurisdiction: string;
issuingJurisdictionIso: string;
maritalStatus: string | null;

@@ -184,1 +187,24 @@ personalIdNumber: string | null;

}
export interface ComparisonCheckJSON {
checkResult: ComparisonCheckResult;
resultDescription: string;
}
export interface StringComparisonCheckJSON extends ComparisonCheckJSON {
vizValue: string | null;
aamvaBarcodeValue: string | null;
}
export interface DateComparisonCheckJSON extends ComparisonCheckJSON {
vizValue: DateResultJSON | null;
aamvaBarcodeValue: DateResultJSON | null;
}
export interface AamvaVizBarcodeComparisonResultJSON {
checksPassed: boolean;
resultDescription: string;
issuingCountryIsoMatch: StringComparisonCheckJSON;
issuingJurisdictionIsoMatch: StringComparisonCheckJSON;
documentNumbersMatch: StringComparisonCheckJSON;
fullNamesMatch: StringComparisonCheckJSON;
datesOfBirth: DateComparisonCheckJSON;
datesOfExpiry: DateComparisonCheckJSON;
datesOfIssue: DateComparisonCheckJSON;
}

@@ -5,3 +5,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.IdLayoutLineStyle = exports.IdLayoutStyle = exports.IdLayout = exports.IdImageType = exports.SupportedSides = exports.IdDocumentType = exports.DocumentType = exports.CapturedResultType = void 0;
exports.ComparisonCheckResult = exports.IdLayoutLineStyle = exports.IdLayoutStyle = exports.IdLayout = exports.IdImageType = exports.SupportedSides = exports.IdDocumentType = exports.DocumentType = exports.CapturedResultType = void 0;
var CapturedResultType;

@@ -46,2 +46,5 @@ (function (CapturedResultType) {

DocumentType["Passport"] = "passport";
DocumentType["DiplomaticPassport"] = "diplomaticPassport";
DocumentType["ServicePassport"] = "servicePassport";
DocumentType["TemporaryPassport"] = "temporaryPassport";
DocumentType["Visa"] = "visa";

@@ -117,1 +120,7 @@ DocumentType["SPass"] = "sPass";

})(IdLayoutLineStyle = exports.IdLayoutLineStyle || (exports.IdLayoutLineStyle = {}));
var ComparisonCheckResult;
(function (ComparisonCheckResult) {
ComparisonCheckResult["Passed"] = "Passed";
ComparisonCheckResult["Skipped"] = "Skipped";
ComparisonCheckResult["Failed"] = "Failed";
})(ComparisonCheckResult = exports.ComparisonCheckResult || (exports.ComparisonCheckResult = {}));

@@ -45,2 +45,11 @@ declare module Scandit {

}
interface PrivateStringComparisonCheck {
fromJSON(json: StringComparisonCheckJSON): StringComparisonCheck;
}
interface PrivateDateComparisonCheck {
fromJSON(json: DateComparisonCheckJSON): DateComparisonCheck;
}
interface PrivateAamvaVizBarcodeComparisonResult {
fromJSON(json: AamvaVizBarcodeComparisonResultJSON): AamvaVizBarcodeComparisonResult;
}
export class DateResult {

@@ -76,2 +85,3 @@ private json;

get capturedResultType(): CapturedResultType;
get capturedResultTypes(): CapturedResultType[];
get documentType(): DocumentType;

@@ -194,2 +204,3 @@ get issuingCountryIso(): string | null;

get issuingJurisdiction(): string | null;
get issuingJurisdictionIso(): string | null;
get maritalStatus(): string | null;

@@ -247,2 +258,40 @@ get personalIdNumber(): string | null;

}
export interface ComparisonCheck<T> {
readonly aamvaBarcodeValue: T | null;
readonly checkResult: ComparisonCheckResult;
readonly resultDescription: string;
readonly vizValue: T | null;
} class StringComparisonCheck implements ComparisonCheck<string> {
private json;
get vizValue(): string | null;
get aamvaBarcodeValue(): string | null;
get checkResult(): ComparisonCheckResult;
get resultDescription(): string;
private static fromJSON;
} class DateComparisonCheck implements ComparisonCheck<DateResult> {
private json;
get vizValue(): DateResult | null;
get aamvaBarcodeValue(): DateResult | null;
get checkResult(): ComparisonCheckResult;
get resultDescription(): string;
private static fromJSON;
}
export class AamvaVizBarcodeComparisonResult {
private json;
get checksPassed(): boolean;
get resultDescription(): string;
get issuingCountryIsoMatch(): ComparisonCheck<string>;
get issuingJurisdictionIsoMatch(): ComparisonCheck<string>;
get documentNumbersMatch(): ComparisonCheck<string>;
get fullNamesMatch(): ComparisonCheck<string>;
get datesOfBirthMatch(): ComparisonCheck<DateResult>;
get datesOfExpiryMatch(): ComparisonCheck<DateResult>;
get datesOfIssueMatch(): ComparisonCheck<DateResult>;
private static fromJSON;
}
export class AamvaVizBarcodeComparisonVerifier {
private proxy;
static create(): AamvaVizBarcodeComparisonVerifier;
verify(capturedId: CapturedId): Promise<AamvaVizBarcodeComparisonResult>;
}

@@ -287,2 +336,5 @@

Passport = "passport",
DiplomaticPassport = "diplomaticPassport",
ServicePassport = "servicePassport",
TemporaryPassport = "temporaryPassport",
Visa = "visa",

@@ -352,2 +404,7 @@ SPass = "sPass",

}
export enum ComparisonCheckResult {
Passed = "Passed",
Skipped = "Skipped",
Failed = "Failed"
}

@@ -354,0 +411,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc