scandit-datacapture-frameworks-id 7.6.2 → 8.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dts/common/DataConsistencyCheck.d.ts +9 -0
- package/dist/dts/common/DateResult.d.ts +1 -1
- package/dist/dts/common/RegionSpecificSubtype.d.ts +0 -1
- package/dist/dts/common/Sex.d.ts +5 -0
- package/dist/dts/common/index.d.ts +2 -0
- package/dist/dts/defaults/IdDefaults.d.ts +7 -1
- package/dist/dts/defaults/SerializedTypes.d.ts +68 -33
- package/dist/dts/id/AamvaBarcodeVerificationResult.d.ts +0 -3
- package/dist/dts/id/BarcodeResult.d.ts +10 -0
- package/dist/dts/id/CapturedId.d.ts +29 -13
- package/dist/dts/id/DataConsistencyResult.d.ts +14 -0
- package/dist/dts/id/DrivingLicenseCategory.d.ts +12 -0
- package/dist/dts/id/DrivingLicenseDetails.d.ts +13 -0
- package/dist/dts/id/IdFieldType.d.ts +31 -0
- package/dist/dts/id/MRZResult.d.ts +11 -9
- package/dist/dts/id/MobileDocumentDataElement.d.ts +33 -0
- package/dist/dts/id/MobileDocumentOCRResult.d.ts +22 -0
- package/dist/dts/id/MobileDocumentResult.d.ts +35 -0
- package/dist/dts/id/ProfessionalDrivingPermit.d.ts +1 -1
- package/dist/dts/id/VIZResult.d.ts +12 -3
- package/dist/dts/id/VerificationResult.d.ts +14 -0
- package/dist/dts/id/index.d.ts +10 -4
- package/dist/dts/idcapture/IdCapture.d.ts +11 -21
- package/dist/dts/idcapture/IdCaptureFeedback.d.ts +3 -1
- package/dist/dts/idcapture/IdCaptureOverlay.d.ts +4 -16
- package/dist/dts/idcapture/IdCaptureSettings.d.ts +4 -1
- package/dist/dts/idcapture/controller/IdCaptureController.d.ts +22 -11
- package/dist/dts/idcapture/controller/IdCaptureListenerController.d.ts +34 -5
- package/dist/dts/idcapture/index.d.ts +0 -1
- package/dist/dts/scanner/FullDocumentScanner.d.ts +2 -2
- package/dist/dts/scanner/IdCaptureScanner.d.ts +9 -1
- package/dist/dts/scanner/MobileDocumentScanner.d.ts +11 -0
- package/dist/dts/scanner/PhysicalDocumentScanner.d.ts +2 -0
- package/dist/dts/scanner/SingleSideScanner.d.ts +2 -2
- package/dist/dts/scanner/index.d.ts +2 -0
- package/dist/index.js +755 -481
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
- package/dist/dts/id/AamvaBarcodeVerifier.d.ts +0 -16
- package/dist/dts/id/CommonCapturedIdFields.d.ts +0 -28
- package/dist/dts/idcapture/controller/IdCaptureListenerProxy.d.ts +0 -12
|
@@ -1,50 +1,40 @@
|
|
|
1
1
|
import { DefaultSerializeable, DataCaptureMode, DataCaptureContext, CameraSettings, PrivateDataCaptureMode } from "scandit-datacapture-frameworks-core";
|
|
2
2
|
import { IdCaptureListener } from "./IdCaptureListener";
|
|
3
3
|
import { IdCaptureSettings } from "./IdCaptureSettings";
|
|
4
|
-
import { IdCaptureController } from "./controller/IdCaptureController";
|
|
5
4
|
import { IdCaptureFeedback } from "./IdCaptureFeedback";
|
|
6
5
|
export declare class IdCapture extends DefaultSerializeable implements DataCaptureMode {
|
|
7
6
|
private type;
|
|
8
7
|
private modeId;
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
private parentId;
|
|
9
|
+
private settings;
|
|
11
10
|
get context(): DataCaptureContext | null;
|
|
12
11
|
get feedback(): IdCaptureFeedback;
|
|
13
12
|
set feedback(feedback: IdCaptureFeedback);
|
|
14
13
|
static createRecommendedCameraSettings(): CameraSettings;
|
|
15
|
-
private static _recommendedCameraSettings;
|
|
16
|
-
/**
|
|
17
|
-
* @deprecated Use createRecommendedCameraSettings() instead to get a new instance that can be safely modified.
|
|
18
|
-
*/
|
|
19
|
-
static get recommendedCameraSettings(): CameraSettings;
|
|
20
14
|
private _isEnabled;
|
|
15
|
+
get isEnabled(): boolean;
|
|
16
|
+
set isEnabled(isEnabled: boolean);
|
|
17
|
+
private _externalTransactionId;
|
|
18
|
+
get externalTransactionId(): string | null;
|
|
19
|
+
set externalTransactionId(externalTransactionId: string | null);
|
|
21
20
|
private _feedback;
|
|
22
|
-
private settings;
|
|
23
21
|
private privateContext;
|
|
24
22
|
private get _context();
|
|
25
23
|
private set _context(value);
|
|
26
24
|
private listeners;
|
|
25
|
+
private _hasListeners;
|
|
27
26
|
private controller;
|
|
28
27
|
private listenerController;
|
|
29
28
|
private isInListenerCallback;
|
|
30
29
|
private static get idCaptureDefaults();
|
|
31
|
-
/**
|
|
32
|
-
* @deprecated Since 7.6. This factory will be removed in 8.0.
|
|
33
|
-
* Use the public constructor instead and configure the instance manually:
|
|
34
|
-
* ```ts
|
|
35
|
-
* const idCapture = new IdCapture(settings);
|
|
36
|
-
* context.addMode(idCapture);
|
|
37
|
-
* ```
|
|
38
|
-
*/
|
|
39
|
-
static forContext(context: DataCaptureContext | null, settings: IdCaptureSettings): IdCapture;
|
|
40
30
|
constructor(settings: IdCaptureSettings);
|
|
41
31
|
applySettings(settings: IdCaptureSettings): Promise<void>;
|
|
42
|
-
addListener(listener: IdCaptureListener): void
|
|
43
|
-
removeListener(listener: IdCaptureListener): void
|
|
32
|
+
addListener(listener: IdCaptureListener): Promise<void>;
|
|
33
|
+
removeListener(listener: IdCaptureListener): Promise<void>;
|
|
44
34
|
reset(): Promise<void>;
|
|
45
35
|
}
|
|
46
36
|
export interface PrivateIdCapture extends PrivateDataCaptureMode {
|
|
47
37
|
_context: DataCaptureContext | null;
|
|
48
38
|
listeners: IdCaptureListener[];
|
|
49
|
-
|
|
39
|
+
parentId: number | null;
|
|
50
40
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DefaultSerializeable, Feedback } from "scandit-datacapture-frameworks-core";
|
|
1
|
+
import { DefaultSerializeable, Feedback, Sound } from "scandit-datacapture-frameworks-core";
|
|
2
2
|
import { IdCaptureController } from "./controller/IdCaptureController";
|
|
3
3
|
export declare class IdCaptureFeedback extends DefaultSerializeable {
|
|
4
4
|
private controller;
|
|
@@ -9,6 +9,8 @@ export declare class IdCaptureFeedback extends DefaultSerializeable {
|
|
|
9
9
|
private _idRejected;
|
|
10
10
|
get idRejected(): Feedback;
|
|
11
11
|
set idRejected(idRejected: Feedback);
|
|
12
|
+
static get defaultSuccessSound(): Sound;
|
|
13
|
+
static get defaultFailureSound(): Sound;
|
|
12
14
|
private static fromJSON;
|
|
13
15
|
private static get idDefaults();
|
|
14
16
|
private updateFeedback;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Brush, DataCaptureOverlay,
|
|
2
|
-
import { IdCapture } from './IdCapture';
|
|
1
|
+
import { Brush, DataCaptureOverlay, DefaultSerializeable } from 'scandit-datacapture-frameworks-core';
|
|
3
2
|
import { IdLayoutLineStyle } from './IdLayoutLineStyle';
|
|
4
3
|
import { IdLayoutStyle } from './IdLayoutStyle';
|
|
5
4
|
import { TextHintPosition } from '../common/TextHintPosition';
|
|
5
|
+
import { IdCapture } from './IdCapture';
|
|
6
6
|
export declare class IdCaptureOverlay extends DefaultSerializeable implements DataCaptureOverlay {
|
|
7
7
|
private type;
|
|
8
8
|
private controller;
|
|
@@ -15,6 +15,8 @@ export declare class IdCaptureOverlay extends DefaultSerializeable implements Da
|
|
|
15
15
|
private _textHintPosition;
|
|
16
16
|
private _showTextHints;
|
|
17
17
|
private static get idCaptureDefaults();
|
|
18
|
+
static get defaultIdLayoutStyle(): IdLayoutStyle;
|
|
19
|
+
static get defaultIdLayoutLineStyle(): IdLayoutLineStyle;
|
|
18
20
|
private _defaultCapturedBrush;
|
|
19
21
|
private _defaultLocalizedBrush;
|
|
20
22
|
private _defaultRejectedBrush;
|
|
@@ -23,20 +25,6 @@ export declare class IdCaptureOverlay extends DefaultSerializeable implements Da
|
|
|
23
25
|
private _rejectedBrush;
|
|
24
26
|
private _frontSideTextHint;
|
|
25
27
|
private _backSideTextHint;
|
|
26
|
-
/**
|
|
27
|
-
* @deprecated Since 7.6. These factories will be removed in 8.0.
|
|
28
|
-
* Use the public constructor instead and add the overlay to the view manually:
|
|
29
|
-
* const overlay = new IdCaptureOverlay(idCapture);
|
|
30
|
-
* view.addOverlay(overlay);
|
|
31
|
-
*/
|
|
32
|
-
static withIdCapture(idCapture: IdCapture): IdCaptureOverlay;
|
|
33
|
-
/**
|
|
34
|
-
* @deprecated Since 7.6. These factories will be removed in 8.0.
|
|
35
|
-
* Use the public constructor instead and add the overlay to the view manually:
|
|
36
|
-
* const overlay = new IdCaptureOverlay(idCapture);
|
|
37
|
-
* view.addOverlay(overlay);
|
|
38
|
-
*/
|
|
39
|
-
static withIdCaptureForView(idCapture: IdCapture, view: DataCaptureView | null): IdCaptureOverlay;
|
|
40
28
|
constructor(mode: IdCapture);
|
|
41
29
|
setFrontSideTextHint(text: string): void;
|
|
42
30
|
setBackSideTextHint(text: string): void;
|
|
@@ -3,15 +3,17 @@ import { IdAnonymizationMode, IdImageType } from '../common';
|
|
|
3
3
|
import { IdCaptureDocument } from '../iddocumenttype';
|
|
4
4
|
import { IdCaptureScanner } from '../scanner';
|
|
5
5
|
import { Duration } from '../common/Duration';
|
|
6
|
+
import { IdFieldType } from '../id/IdFieldType';
|
|
6
7
|
export declare class IdCaptureSettings extends DefaultSerializeable {
|
|
7
8
|
private properties;
|
|
8
9
|
private imageToResult;
|
|
10
|
+
private anonymizationMap;
|
|
9
11
|
anonymizationMode: IdAnonymizationMode;
|
|
10
12
|
rejectVoidedIds: boolean;
|
|
11
13
|
decodeBackOfEuropeanDrivingLicense: boolean;
|
|
12
14
|
acceptedDocuments: IdCaptureDocument[];
|
|
13
15
|
rejectedDocuments: IdCaptureDocument[];
|
|
14
|
-
|
|
16
|
+
scanner: IdCaptureScanner;
|
|
15
17
|
rejectExpiredIds: boolean;
|
|
16
18
|
rejectIdsExpiringIn: Duration | null;
|
|
17
19
|
rejectNotRealIdCompliant: boolean;
|
|
@@ -24,4 +26,5 @@ export declare class IdCaptureSettings extends DefaultSerializeable {
|
|
|
24
26
|
getProperty(name: string): any;
|
|
25
27
|
setShouldPassImageTypeToResult(type: IdImageType, shouldPass: boolean): void;
|
|
26
28
|
getShouldPassImageTypeToResult(type: IdImageType): boolean;
|
|
29
|
+
addAnonymizedField(document: IdCaptureDocument, fieldType: IdFieldType): void;
|
|
27
30
|
}
|
|
@@ -1,24 +1,35 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BaseNewController } from 'scandit-datacapture-frameworks-core';
|
|
2
2
|
import { IdCapture } from '../IdCapture';
|
|
3
3
|
import { IdCaptureSettings } from '../IdCaptureSettings';
|
|
4
4
|
import { IdCaptureFeedback } from '../IdCaptureFeedback';
|
|
5
5
|
export interface IdCaptureProxy {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
setModeEnabledState(enabled
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
6
|
+
$resetIdCaptureMode({ modeId }: {
|
|
7
|
+
modeId: number;
|
|
8
|
+
}): Promise<void>;
|
|
9
|
+
$setModeEnabledState({ modeId, enabled }: {
|
|
10
|
+
modeId: number;
|
|
11
|
+
enabled: boolean;
|
|
12
|
+
}): void;
|
|
13
|
+
$updateIdCaptureMode({ modeJson, modeId }: {
|
|
14
|
+
modeJson: string;
|
|
15
|
+
modeId: number;
|
|
16
|
+
}): Promise<void>;
|
|
17
|
+
$applyIdCaptureModeSettings({ settingsJson, modeId }: {
|
|
18
|
+
settingsJson: string;
|
|
19
|
+
modeId: number;
|
|
20
|
+
}): Promise<void>;
|
|
21
|
+
$updateFeedback({ feedbackJson, modeId }: {
|
|
22
|
+
feedbackJson: string;
|
|
23
|
+
modeId: number;
|
|
24
|
+
}): Promise<void>;
|
|
13
25
|
}
|
|
14
|
-
export declare class IdCaptureController extends
|
|
26
|
+
export declare class IdCaptureController extends BaseNewController<IdCaptureProxy> {
|
|
15
27
|
private idCapture;
|
|
16
28
|
constructor(idCapture?: IdCapture | null);
|
|
17
29
|
reset(): Promise<void>;
|
|
18
|
-
createContextForBarcodeVerification(context: DataCaptureContext): Promise<void>;
|
|
19
|
-
verifyCapturedIdAsync(capturedId: string): Promise<string | null>;
|
|
20
30
|
setModeEnabledState(enabled: boolean): void;
|
|
21
31
|
updateIdCaptureMode(): Promise<void>;
|
|
22
32
|
applyIdCaptureModeSettings(newSettings: IdCaptureSettings): Promise<void>;
|
|
23
33
|
updateFeedback(feedback: IdCaptureFeedback): Promise<void>;
|
|
34
|
+
private get modeId();
|
|
24
35
|
}
|
|
@@ -1,14 +1,43 @@
|
|
|
1
|
+
import { BaseNewController, EventEmitter } from 'scandit-datacapture-frameworks-core';
|
|
1
2
|
import { IdCapture } from '../IdCapture';
|
|
2
|
-
export
|
|
3
|
+
export interface IdCaptureListenerProxy {
|
|
4
|
+
$finishDidCaptureCallback({ modeId, enabled }: {
|
|
5
|
+
modeId: number;
|
|
6
|
+
enabled: boolean;
|
|
7
|
+
}): void;
|
|
8
|
+
$finishDidRejectCallback({ modeId, enabled }: {
|
|
9
|
+
modeId: number;
|
|
10
|
+
enabled: boolean;
|
|
11
|
+
}): void;
|
|
12
|
+
$addIdCaptureListener({ modeId }: {
|
|
13
|
+
modeId: number;
|
|
14
|
+
}): Promise<void>;
|
|
15
|
+
$removeIdCaptureListener({ modeId }: {
|
|
16
|
+
modeId: number;
|
|
17
|
+
}): Promise<void>;
|
|
18
|
+
subscribeForEvents(events: string[]): void;
|
|
19
|
+
unsubscribeFromEvents(events: string[]): void;
|
|
20
|
+
dispose(): void;
|
|
21
|
+
eventEmitter: EventEmitter;
|
|
22
|
+
}
|
|
23
|
+
export declare enum IdCaptureListenerEvents {
|
|
24
|
+
didCapture = "IdCaptureListener.didCaptureId",
|
|
25
|
+
didReject = "IdCaptureListener.didRejectId"
|
|
26
|
+
}
|
|
27
|
+
export declare class IdCaptureListenerController extends BaseNewController<IdCaptureListenerProxy> {
|
|
3
28
|
private idCapture;
|
|
4
|
-
private eventEmitter;
|
|
5
29
|
private hasListeners;
|
|
6
|
-
private get _proxy();
|
|
7
30
|
constructor(idCapture: IdCapture);
|
|
8
31
|
private initialize;
|
|
9
|
-
subscribeListener(): void
|
|
10
|
-
|
|
32
|
+
subscribeListener(): Promise<void>;
|
|
33
|
+
private handleDidCapture;
|
|
34
|
+
private handleDidReject;
|
|
35
|
+
unsubscribeListener(): Promise<void>;
|
|
11
36
|
private notifyListenersOfDidCapture;
|
|
12
37
|
private notifyListenersOfDidReject;
|
|
38
|
+
private enrichCapturedIdJson;
|
|
13
39
|
dispose(): void;
|
|
40
|
+
private get modeId();
|
|
41
|
+
private handleDidCaptureWrapper;
|
|
42
|
+
private handleDidRejectWrapper;
|
|
14
43
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export * from './controller/IdCaptureController';
|
|
2
2
|
export * from './controller/IdCaptureListenerController';
|
|
3
|
-
export * from './controller/IdCaptureListenerProxy';
|
|
4
3
|
export * from './controller/IdCaptureOverlayController';
|
|
5
4
|
export * from './IdCapture';
|
|
6
5
|
export * from './IdCaptureFeedback';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DefaultSerializeable } from "scandit-datacapture-frameworks-core";
|
|
2
|
-
import {
|
|
3
|
-
export declare class FullDocumentScanner extends DefaultSerializeable implements
|
|
2
|
+
import { PhysicalDocumentScanner } from "./PhysicalDocumentScanner";
|
|
3
|
+
export declare class FullDocumentScanner extends DefaultSerializeable implements PhysicalDocumentScanner {
|
|
4
4
|
private readonly _isFull;
|
|
5
5
|
protected readonly _barcode: boolean;
|
|
6
6
|
protected readonly _machineReadableZone: boolean;
|
|
@@ -1,2 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
import { DefaultSerializeable } from "scandit-datacapture-frameworks-core";
|
|
2
|
+
import { PhysicalDocumentScanner } from "./PhysicalDocumentScanner";
|
|
3
|
+
import { MobileDocumentScanner } from "./MobileDocumentScanner";
|
|
4
|
+
export declare class IdCaptureScanner extends DefaultSerializeable {
|
|
5
|
+
private readonly _physicalDocumentScanner;
|
|
6
|
+
private readonly _mobileDocumentScanner;
|
|
7
|
+
constructor(physicalDocumentScanner?: PhysicalDocumentScanner, mobileDocumentScanner?: MobileDocumentScanner);
|
|
8
|
+
get physicalDocument(): PhysicalDocumentScanner | null;
|
|
9
|
+
get mobileDocument(): MobileDocumentScanner | null;
|
|
2
10
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { DefaultSerializeable } from "scandit-datacapture-frameworks-core";
|
|
2
|
+
import { MobileDocumentDataElement } from "../id/MobileDocumentDataElement";
|
|
3
|
+
export declare class MobileDocumentScanner extends DefaultSerializeable {
|
|
4
|
+
private readonly _iso180135;
|
|
5
|
+
private readonly _ocr;
|
|
6
|
+
private readonly _elementsToRetain;
|
|
7
|
+
constructor(iso180135: boolean, ocr: boolean, elementsToRetain?: Set<MobileDocumentDataElement>);
|
|
8
|
+
get iso180135(): boolean;
|
|
9
|
+
get ocr(): boolean;
|
|
10
|
+
get elementsToRetain(): Set<MobileDocumentDataElement>;
|
|
11
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DefaultSerializeable } from "scandit-datacapture-frameworks-core";
|
|
2
|
-
import {
|
|
3
|
-
export declare class SingleSideScanner extends DefaultSerializeable implements
|
|
2
|
+
import { PhysicalDocumentScanner } from "./PhysicalDocumentScanner";
|
|
3
|
+
export declare class SingleSideScanner extends DefaultSerializeable implements PhysicalDocumentScanner {
|
|
4
4
|
private readonly _isFull;
|
|
5
5
|
protected readonly _barcode: boolean;
|
|
6
6
|
protected readonly _machineReadableZone: boolean;
|