scandit-cordova-datacapture-id
Advanced tools
Comparing version 6.13.0-beta.1 to 6.13.0-beta.2
{ | ||
"name": "scandit-cordova-datacapture-id", | ||
"version": "6.13.0-beta.1", | ||
"version": "6.13.0-beta.2", | ||
"description": "Scandit Data Capture SDK for Cordova", | ||
@@ -5,0 +5,0 @@ "license": "Apache-2.0", |
@@ -60,3 +60,3 @@ "use strict"; | ||
exports.VehicleRestriction = VehicleRestriction; | ||
class CapturedId { | ||
class CommonCapturedIdFields { | ||
get firstName() { return this.json.firstName; } | ||
@@ -71,10 +71,6 @@ get lastName() { return this.json.lastName; } | ||
get address() { return this.json.address; } | ||
get capturedResultType() { return this.json.capturedResultType; } | ||
get capturedResultTypes() { | ||
return this.json.capturedResultTypes; | ||
} | ||
get documentType() { return this.json.documentType; } | ||
get documentNumber() { return this.json.documentNumber; } | ||
get issuingCountry() { return this.json.issuingCountry; } | ||
get issuingCountryIso() { return this.json.issuingCountryIso; } | ||
get issuingCountry() { return this.json.issuingCountry; } | ||
get documentNumber() { return this.json.documentNumber; } | ||
get dateOfExpiry() { | ||
@@ -86,2 +82,35 @@ return DateResult.fromJSON(this.json.dateOfExpiry); | ||
} | ||
static fromJSON(json) { | ||
if (json === null) { | ||
return null; | ||
} | ||
const object = new CommonCapturedIdFields(); | ||
object.json = json; | ||
return object; | ||
} | ||
} | ||
class CapturedId { | ||
get firstName() { return this.commonCapturedFields.firstName; } | ||
get lastName() { return this.commonCapturedFields.lastName; } | ||
get fullName() { return this.commonCapturedFields.fullName; } | ||
get sex() { return this.commonCapturedFields.sex; } | ||
get dateOfBirth() { | ||
return DateResult.fromJSON(this.commonCapturedFields.dateOfBirth); | ||
} | ||
get nationality() { return this.commonCapturedFields.nationality; } | ||
get address() { return this.commonCapturedFields.address; } | ||
get capturedResultType() { return this.json.capturedResultType; } | ||
get capturedResultTypes() { | ||
return this.json.capturedResultTypes; | ||
} | ||
get documentType() { return this.commonCapturedFields.documentType; } | ||
get issuingCountryIso() { return this.commonCapturedFields.issuingCountryIso; } | ||
get issuingCountry() { return this.commonCapturedFields.issuingCountry; } | ||
get documentNumber() { return this.commonCapturedFields.documentNumber; } | ||
get dateOfExpiry() { | ||
return DateResult.fromJSON(this.commonCapturedFields.dateOfExpiry); | ||
} | ||
get dateOfIssue() { | ||
return DateResult.fromJSON(this.commonCapturedFields.dateOfIssue); | ||
} | ||
get aamvaBarcodeResult() { | ||
@@ -144,2 +173,26 @@ if (this._aamvaBarcodeResult == null && this.json.aamvaBarcodeResult != null) { | ||
result.json = json; | ||
if (json.aamvaBarcodeResult) { | ||
result.commonCapturedFields = CommonCapturedIdFields.fromJSON(json.aamvaBarcodeResult); | ||
} | ||
if (json.argentinaIdBarcodeResult) { | ||
result.commonCapturedFields = CommonCapturedIdFields.fromJSON(json.argentinaIdBarcodeResult); | ||
} | ||
if (json.colombiaIdBarcodeResult) { | ||
result.commonCapturedFields = CommonCapturedIdFields.fromJSON(json.colombiaIdBarcodeResult); | ||
} | ||
if (json.mrzResult) { | ||
result.commonCapturedFields = CommonCapturedIdFields.fromJSON(json.mrzResult); | ||
} | ||
if (json.southAfricaIdBarcodeResult) { | ||
result.commonCapturedFields = CommonCapturedIdFields.fromJSON(json.southAfricaIdBarcodeResult); | ||
} | ||
if (json.southAfricaDlBarcodeResult) { | ||
result.commonCapturedFields = CommonCapturedIdFields.fromJSON(json.southAfricaDlBarcodeResult); | ||
} | ||
if (json.usUniformedServicesBarcodeResult) { | ||
result.commonCapturedFields = CommonCapturedIdFields.fromJSON(json.usUniformedServicesBarcodeResult); | ||
} | ||
if (json.vizResult) { | ||
result.commonCapturedFields = CommonCapturedIdFields.fromJSON(json.vizResult); | ||
} | ||
return result; | ||
@@ -146,0 +199,0 @@ } |
@@ -23,2 +23,17 @@ /// <amd-module name="scandit-cordova-datacapture-id.SerializedTypes" /> | ||
} | ||
export interface CommonCapturedIdFieldsJSON { | ||
firstName: string | null; | ||
lastName: string | null; | ||
fullName: string; | ||
sex: string | null; | ||
dateOfBirth: DateResultJSON | null; | ||
nationality: string | null; | ||
address: string | null; | ||
documentType: string | null; | ||
documentNumber: string | null; | ||
issuingCountry: string | null; | ||
issuingCountryIso: string | null; | ||
dateOfExpiry: DateResultJSON | null; | ||
dateOfIssue: DateResultJSON | null; | ||
} | ||
export interface CapturedIdJSON { | ||
@@ -25,0 +40,0 @@ capturedResultType: string; |
declare module Scandit { | ||
interface PrivateCommonCapturedIdFields { | ||
fromJSON(json: CommonCapturedIdFieldsJSON | null): CommonCapturedIdFields; | ||
} | ||
interface PrivateDateResult { | ||
@@ -73,5 +76,22 @@ fromJSON(json: DateResultJSON | null): DateResult; | ||
private static fromJSON; | ||
} class CommonCapturedIdFields { | ||
private json; | ||
get firstName(): string | null; | ||
get lastName(): string | null; | ||
get fullName(): string; | ||
get sex(): string | null; | ||
get dateOfBirth(): DateResult | null; | ||
get nationality(): string | null; | ||
get address(): string | null; | ||
get documentType(): string | null; | ||
get documentNumber(): string | null; | ||
get issuingCountry(): string | null; | ||
get issuingCountryIso(): string | null; | ||
get dateOfExpiry(): DateResult | null; | ||
get dateOfIssue(): DateResult | null; | ||
private static fromJSON; | ||
} | ||
export class CapturedId { | ||
private json; | ||
private commonCapturedFields; | ||
get firstName(): string | null; | ||
@@ -78,0 +98,0 @@ get lastName(): string | null; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
149568
1890