Skip to content

Commit

Permalink
Merge pull request #70 from BlinkID/feature/v4.1.0
Browse files Browse the repository at this point in the history
Feature/v4.1.0
  • Loading branch information
juraskrlec authored Aug 16, 2018
2 parents 128400a + 222e165 commit 1102d73
Show file tree
Hide file tree
Showing 62 changed files with 2,916 additions and 740 deletions.
5 changes: 5 additions & 0 deletions BlinkID/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ export * from './recognizers/jordanCombinedRecognizer'
export * from './recognizers/jordanIdBackRecognizer'
export * from './recognizers/jordanIdFrontRecognizer'
export * from './recognizers/malaysiaDlFrontRecognizer'
export * from './recognizers/moroccoIdBackRecognizer'
export * from './recognizers/moroccoIdFrontRecognizer'
export * from './recognizers/mrtdCombinedRecognizer'
export * from './recognizers/mrtdRecognizer'
export * from './recognizers/myKadBackRecognizer'
Expand All @@ -141,7 +143,9 @@ export * from './recognizers/serbiaCombinedRecognizer'
export * from './recognizers/serbiaIdBackRecognizer'
export * from './recognizers/serbiaIdFrontRecognizer'
export * from './recognizers/simNumberRecognizer'
export * from './recognizers/singaporeChangiEmployeeIdRecognizer'
export * from './recognizers/singaporeCombinedRecognizer'
export * from './recognizers/singaporeDlFrontRecognizer'
export * from './recognizers/singaporeIdBackRecognizer'
export * from './recognizers/singaporeIdFrontRecognizer'
export * from './recognizers/slovakiaCombinedRecognizer'
Expand All @@ -151,6 +155,7 @@ export * from './recognizers/sloveniaCombinedRecognizer'
export * from './recognizers/sloveniaIdBackRecognizer'
export * from './recognizers/sloveniaIdFrontRecognizer'
export * from './recognizers/swedenDlFrontRecognizer'
export * from './recognizers/switzerlandDlFrontRecognizer'
export * from './recognizers/switzerlandIdBackRecognizer'
export * from './recognizers/switzerlandIdFrontRecognizer'
export * from './recognizers/switzerlandPassportRecognizer'
Expand Down
6 changes: 6 additions & 0 deletions BlinkID/overlaySettings.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,11 @@ export class OverlaySettings {
this.useFrontCamera = false;
/** whether beep sound will be played on successful scan */
this.enableBeep = false;
/** (optional) if default overlay contains textual information, text will be localized to this language. Otherwise device langauge will be used */
/** example: "en" */
this.language = null;
/** (optional) to be used with language variable, it defines the country locale */
/** example: "US" to use "en_US" on Android and en-US on iOS */
this.country = null;
}
}
2 changes: 1 addition & 1 deletion BlinkID/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "blinkid-react-native",
"version": "4.0.0",
"version": "4.1.0",
"description": "A small and powerful ID card scanning library. Powered by Microblink (www.microblink.com).",
"main": "index.js",
"repository": {
Expand Down
4 changes: 2 additions & 2 deletions BlinkID/recognizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ export const RecognizerResultState = Object.freeze(
{
/** Recognizer result is empty */
empty : 1,
/** Recognizer result contains some values, but is incomplete or it contains all values, but some are not uncertain */
/** Recognizer result contains some values, but is incomplete or it contains all values, but some are uncertain */
uncertain : 2,
/** Recognizer resul contains all required values */
/** Recognizer result contains all required values */
valid : 3
}
);
Expand Down
7 changes: 0 additions & 7 deletions BlinkID/recognizers/barcodeRecognizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,6 @@ export class BarcodeRecognizer extends Recognizer {
*/
this.autoScaleDetection = true;

/**
* Set manatee license key and unlock the aztec scanning feature.
*
*
*/
this.manateeLicenseKey = '';

/**
* Set this to true to scan barcodes which don't have quiet zone (white area) around it
*
Expand Down
47 changes: 37 additions & 10 deletions BlinkID/recognizers/colombiaIdBackRecognizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@ export class ColombiaIdBackRecognizerResult extends RecognizerResult {
super(nativeResult.resultState);

/**
* The blood group of the Colombian ID owner.
* The birth Date of the Colombia Id owner.
*/
this.bloodGroup = nativeResult.bloodGroup;
this.birthDate = nativeResult.birthDate != null ? new Date(nativeResult.birthDate) : null;

/**
* The date of birth of the Colombian ID owner.
* The blood Group of the Colombia Id owner.
*/
this.dateOfBirth = nativeResult.dateOfBirth != null ? new Date(nativeResult.dateOfBirth) : null;
this.bloodGroup = nativeResult.bloodGroup;

/**
* The document number of the Colombian ID card.
* The document Number Colombia Id owner.
*/
this.documentNumber = nativeResult.documentNumber;

Expand All @@ -38,32 +38,52 @@ export class ColombiaIdBackRecognizerResult extends RecognizerResult {
this.fingerprint = nativeResult.fingerprint;

/**
* The first name of the Colombian ID owner.
* The first Name of the Colombia Id owner.
*/
this.firstName = nativeResult.firstName;

/**
* The last name of the Colombian ID owner.
* full document image if enabled with returnFullDocumentImage property.
*/
this.fullDocumentImage = nativeResult.fullDocumentImage;

/**
* The last Name of the Colombia Id owner.
*/
this.lastName = nativeResult.lastName;

/**
* The sex of the Colombian ID owner.
* The sex of the Colombia Id owner.
*/
this.sex = nativeResult.sex;

}
}

/**
* Class for configuring Colombia ID Back Recognizer.
* Class for configuring Colombia Id Back Recognizer.
*
* Colombia ID Back recognizer is used for scanning back side of Colombia ID.
* Colombia Id Back recognizer is used for scanning back side of the Colombia Id.
*/
export class ColombiaIdBackRecognizer extends Recognizer {
constructor() {
super('ColombiaIdBackRecognizer');

/**
* Defines if glare detection should be turned on/off.
*
*
*/
this.detectGlare = true;

/**
* Property for setting DPI for full document images
* Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception
*
*
*/
this.fullDocumentImageDpi = 250;

/**
* Set this to true to scan barcodes which don't have quiet zone (white area) around it
*
Expand All @@ -73,6 +93,13 @@ export class ColombiaIdBackRecognizer extends Recognizer {
*/
this.nullQuietZoneAllowed = true;

/**
* Sets whether full document image of ID card should be extracted.
*
*
*/
this.returnFullDocumentImage = false;

/**
* Set this to true to scan even barcode not compliant with standards
* For example, malformed PDF417 barcodes which were incorrectly encoded
Expand Down
14 changes: 7 additions & 7 deletions BlinkID/recognizers/colombiaIdFrontRecognizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export class ColombiaIdFrontRecognizerResult extends RecognizerResult {
super(nativeResult.resultState);

/**
* The document number of the Colombian ID card.
* The document Number of the Colombia Id.
*/
this.documentNumber = nativeResult.documentNumber;

Expand All @@ -28,7 +28,7 @@ export class ColombiaIdFrontRecognizerResult extends RecognizerResult {
this.faceImage = nativeResult.faceImage;

/**
* The first name of the Colombian ID owner.
* The first Name of the Colombia Id owner.
*/
this.firstName = nativeResult.firstName;

Expand All @@ -38,7 +38,7 @@ export class ColombiaIdFrontRecognizerResult extends RecognizerResult {
this.fullDocumentImage = nativeResult.fullDocumentImage;

/**
* The last name of the Colombian ID owner.
* The last Name of the Colombia Id owner.
*/
this.lastName = nativeResult.lastName;

Expand All @@ -51,9 +51,9 @@ export class ColombiaIdFrontRecognizerResult extends RecognizerResult {
}

/**
* Class for configuring Colombia ID Front Recognizer.
* Class for configuring Colombia Id Front Recognizer.
*
* Colombia ID Front recognizer is used for scanning front side of Colombia ID.
* Colombia Id Front recognizer is used for scanning front side of the Colombia Id.
*/
export class ColombiaIdFrontRecognizer extends Recognizer {
constructor() {
Expand All @@ -67,14 +67,14 @@ export class ColombiaIdFrontRecognizer extends Recognizer {
this.detectGlare = true;

/**
* Defines if owner's first name should be extracted from Colombian ID
* Defines if owner's first name should be extracted from front side of the Colombia Id
*
*
*/
this.extractFirstName = true;

/**
* Defines if owner's last name should be extracted from Colombian ID
* Defines if owner's last name should be extracted from front side of the Colombia Id
*
*
*/
Expand Down
48 changes: 43 additions & 5 deletions BlinkID/recognizers/croatiaIdFrontRecognizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ export class CroatiaIdFrontRecognizerResult extends RecognizerResult {
*/
this.documentBilingual = nativeResult.documentBilingual;

/**
* The document number of the Croatian ID.
*/
this.documentNumber = nativeResult.documentNumber;

/**
* face image from the document if enabled with returnFaceImage property.
*/
Expand All @@ -57,11 +62,6 @@ export class CroatiaIdFrontRecognizerResult extends RecognizerResult {
*/
this.fullDocumentImage = nativeResult.fullDocumentImage;

/**
* The identity card number of Croatian ID.
*/
this.identityCardNumber = nativeResult.identityCardNumber;

/**
* The last name of the Croatian ID owner.
*/
Expand Down Expand Up @@ -118,13 +118,43 @@ export class CroatiaIdFrontRecognizer extends Recognizer {
*/
this.extractDateOfExpiry = true;

/**
* Defines if first name of Croatian ID owner should be extracted
*
*
*/
this.extractFirstName = true;

/**
* Defines if last name of Croatian ID owner should be extracted
*
*
*/
this.extractLastName = true;

/**
* Defines if sex of Croatian ID owner should be extracted
*
*
*/
this.extractSex = true;

/**
* Property for setting DPI for face images
* Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception
*
*
*/
this.faceImageDpi = 250;

/**
* Property for setting DPI for full document images
* Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception
*
*
*/
this.fullDocumentImageDpi = 250;

/**
* Sets whether face image from ID card should be extracted
*
Expand All @@ -146,6 +176,14 @@ export class CroatiaIdFrontRecognizer extends Recognizer {
*/
this.returnSignatureImage = false;

/**
* Property for setting DPI for signature images
* Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception
*
*
*/
this.signatureImageDpi = 250;

this.createResultFromNative = function (nativeResult) { return new CroatiaIdFrontRecognizerResult(nativeResult); }
}
}
28 changes: 28 additions & 0 deletions BlinkID/recognizers/hongKongIdFrontRecognizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ export class HongKongIdFrontRecognizerResult extends RecognizerResult {
*/
this.fullName = nativeResult.fullName;

/**
* The residential status of the Hong Kong ID.
*/
this.residentialStatus = nativeResult.residentialStatus;

/**
* The sex of the Hong Kong ID owner.
*/
Expand Down Expand Up @@ -104,13 +109,36 @@ export class HongKongIdFrontRecognizer extends Recognizer {
*/
this.extractFullName = true;

/**
* Defines if card's residential status should be extracted from Hong Kong ID
*
*
*/
this.extractResidentialStatus = true;

/**
* Defines if owner's sex should be extracted from Hong Kong ID
*
*
*/
this.extractSex = true;

/**
* Property for setting DPI for face images
* Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception
*
*
*/
this.faceImageDpi = 250;

/**
* Property for setting DPI for full document images
* Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception
*
*
*/
this.fullDocumentImageDpi = 250;

/**
* Sets whether face image from ID card should be extracted
*
Expand Down
Loading

0 comments on commit 1102d73

Please sign in to comment.