scandit-datacapture-frameworks-id 8.0.0 → 8.1.0

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.
@@ -14,6 +14,6 @@ export declare class Duration extends DefaultSerializeable {
14
14
  get days(): number;
15
15
  get months(): number;
16
16
  get years(): number;
17
- constructor(days: number, months: number, years: number);
18
17
  private static fromJSON;
18
+ constructor(days: number, months: number, years: number);
19
19
  }
@@ -2,11 +2,11 @@ import { ImageInfoJSON } from "../defaults";
2
2
  import { IdSide } from "./IdSide";
3
3
  export declare class IdImages {
4
4
  private json;
5
+ private static fromJSON;
5
6
  get face(): string | null;
6
7
  get frame(): string | null;
7
8
  getFrame(side: IdSide): string | null;
8
9
  getCroppedDocument(side: IdSide): string | null;
9
- private static fromJSON;
10
10
  }
11
11
  export interface PrivateIdImages {
12
12
  fromJSON(json: ImageInfoJSON | null): IdImages;
@@ -12,6 +12,7 @@ export interface CommonIdFieldsJSON {
12
12
  sex: string | null;
13
13
  dateOfBirth: DateResultJSON | null;
14
14
  nationality: string | null;
15
+ nationalityISO: string | null;
15
16
  address: string | null;
16
17
  documentNumber: string | null;
17
18
  dateOfExpiry: DateResultJSON | null;
@@ -70,6 +71,7 @@ export interface MobileDocumentOCRResultJSON {
70
71
  issuingJurisdictionIso: string | null;
71
72
  sex: string | null;
72
73
  nationality: string | null;
74
+ nationalityISO: string | null;
73
75
  address: string | null;
74
76
  documentAdditionalNumber: string | null;
75
77
  dateOfIssue: DateResultJSON | null;
@@ -4,8 +4,8 @@ import { ProfessionalDrivingPermit } from "./ProfessionalDrivingPermit";
4
4
  import { VehicleRestriction } from "./VehicleRestriction";
5
5
  export declare class BarcodeResult {
6
6
  private json;
7
- private constructor();
8
7
  private static fromJSON;
8
+ private constructor();
9
9
  get aamvaVersion(): number | null;
10
10
  get aliasFamilyName(): string | null;
11
11
  get aliasGivenName(): string | null;
@@ -11,22 +11,27 @@ import { MobileDocumentResult } from './MobileDocumentResult';
11
11
  import { VerificationResult } from './VerificationResult';
12
12
  import { IdFieldType } from './IdFieldType';
13
13
  export declare class CapturedId {
14
+ private _mobileDocument;
15
+ private _mobileDocumentOcr;
16
+ private _verificationResult;
14
17
  private json;
18
+ private _document;
19
+ private _barcodeResult;
20
+ private _mrzResult;
21
+ private _vizResult;
22
+ private _images;
23
+ private static fromJSON;
24
+ private static getDocument;
15
25
  get age(): number | null;
16
26
  get isExpired(): boolean | null;
17
27
  get isCitizenPassport(): boolean;
18
- private _document;
19
28
  get document(): IdCaptureDocument | null;
20
29
  get issuingCountryIso(): string | null;
21
30
  get issuingCountry(): IdCaptureRegion;
22
31
  get documentAdditionalNumber(): string | null;
23
- private _barcodeResult;
24
32
  get barcode(): BarcodeResult | null;
25
- private _mrzResult;
26
33
  get mrzResult(): MRZResult | null;
27
- private _vizResult;
28
34
  get vizResult(): VIZResult | null;
29
- private _images;
30
35
  isIdCard(): boolean;
31
36
  get usRealIdStatus(): UsRealIdStatus;
32
37
  isDriverLicense(): boolean;
@@ -42,25 +47,21 @@ export declare class CapturedId {
42
47
  get sex(): string | null;
43
48
  get dateOfBirth(): DateResult | null;
44
49
  get nationality(): string | null;
50
+ get nationalityISO(): string | null;
45
51
  get address(): string | null;
46
52
  get documentNumber(): string | null;
47
53
  get dateOfExpiry(): DateResult | null;
48
54
  get dateOfIssue(): DateResult | null;
49
55
  get sexType(): Sex;
50
- private _mobileDocument;
51
56
  get mobileDocument(): MobileDocumentResult | null;
52
- private _mobileDocumentOcr;
53
57
  /**
54
58
  * The additional information extracted from a mobile document using optical character recognition (OCR).
55
59
  * Returns null if not available.
56
60
  */
57
61
  get mobileDocumentOcr(): MobileDocumentOCRResult | null;
58
- private _verificationResult;
59
62
  get verificationResult(): VerificationResult;
60
63
  get anonymizedFields(): IdFieldType[];
61
64
  isAnonymized(field: IdFieldType): boolean;
62
- private static fromJSON;
63
- private static getDocument;
64
65
  }
65
66
  export interface PrivateCapturedId {
66
67
  fromJSON(json: CapturedIdJSON): CapturedId;
@@ -3,10 +3,10 @@ import { DrivingLicenseCategory } from "./DrivingLicenseCategory";
3
3
  export declare class DrivingLicenseDetails {
4
4
  private json;
5
5
  private _drivingLicenseCategories;
6
+ private static fromJSON;
6
7
  get drivingLicenseCategories(): DrivingLicenseCategory[];
7
8
  get restrictions(): string | null;
8
9
  get endorsements(): string | null;
9
- private static fromJSON;
10
10
  }
11
11
  export interface PrivateDrivingLicenseDetails {
12
12
  fromJSON(json: DrivingLicenseDetailsJSON | null): DrivingLicenseDetails | null;
@@ -3,29 +3,29 @@ import { IdCaptureListener } from "./IdCaptureListener";
3
3
  import { IdCaptureSettings } from "./IdCaptureSettings";
4
4
  import { IdCaptureFeedback } from "./IdCaptureFeedback";
5
5
  export declare class IdCapture extends DefaultSerializeable implements DataCaptureMode {
6
+ protected parentId: number | null;
6
7
  private type;
7
8
  private modeId;
8
- private parentId;
9
9
  private settings;
10
10
  get context(): DataCaptureContext | null;
11
11
  get feedback(): IdCaptureFeedback;
12
12
  set feedback(feedback: IdCaptureFeedback);
13
- static createRecommendedCameraSettings(): CameraSettings;
14
13
  private _isEnabled;
15
- get isEnabled(): boolean;
16
- set isEnabled(isEnabled: boolean);
17
14
  private _externalTransactionId;
18
- get externalTransactionId(): string | null;
19
- set externalTransactionId(externalTransactionId: string | null);
20
15
  private _feedback;
21
16
  private privateContext;
22
- private get _context();
23
- private set _context(value);
24
17
  private listeners;
25
18
  private _hasListeners;
26
19
  private controller;
27
20
  private listenerController;
28
21
  private isInListenerCallback;
22
+ static createRecommendedCameraSettings(): CameraSettings;
23
+ get isEnabled(): boolean;
24
+ set isEnabled(isEnabled: boolean);
25
+ get externalTransactionId(): string | null;
26
+ set externalTransactionId(externalTransactionId: string | null);
27
+ private get _context();
28
+ private set _context(value);
29
29
  private static get idCaptureDefaults();
30
30
  constructor(settings: IdCaptureSettings);
31
31
  applySettings(settings: IdCaptureSettings): Promise<void>;
@@ -13,8 +13,8 @@ export declare class IdCaptureFeedback extends DefaultSerializeable {
13
13
  static get defaultFailureSound(): Sound;
14
14
  private static fromJSON;
15
15
  private static get idDefaults();
16
- private updateFeedback;
17
16
  private constructor();
17
+ private updateFeedback;
18
18
  }
19
19
  export interface PrivateIdCaptureFeedback {
20
20
  controller: IdCaptureController;
@@ -5,9 +5,6 @@ import { IdCaptureScanner } from '../scanner';
5
5
  import { Duration } from '../common/Duration';
6
6
  import { IdFieldType } from '../id/IdFieldType';
7
7
  export declare class IdCaptureSettings extends DefaultSerializeable {
8
- private properties;
9
- private imageToResult;
10
- private anonymizationMap;
11
8
  anonymizationMode: IdAnonymizationMode;
12
9
  rejectVoidedIds: boolean;
13
10
  decodeBackOfEuropeanDrivingLicense: boolean;
@@ -20,6 +17,9 @@ export declare class IdCaptureSettings extends DefaultSerializeable {
20
17
  rejectForgedAamvaBarcodes: boolean;
21
18
  rejectInconsistentData: boolean;
22
19
  rejectHolderBelowAge: number | null;
20
+ private properties;
21
+ private imageToResult;
22
+ private anonymizationMap;
23
23
  constructor();
24
24
  private static get idCaptureDefaults();
25
25
  setProperty(name: string, value: any): void;
@@ -1,15 +1,15 @@
1
- import { BaseNewController } from 'scandit-datacapture-frameworks-core';
1
+ import { BaseController, BaseProxy } from 'scandit-datacapture-frameworks-core';
2
2
  import { IdCapture } from '../IdCapture';
3
3
  import { IdCaptureSettings } from '../IdCaptureSettings';
4
4
  import { IdCaptureFeedback } from '../IdCaptureFeedback';
5
- export interface IdCaptureProxy {
5
+ export interface IdCaptureProxy extends BaseProxy {
6
6
  $resetIdCaptureMode({ modeId }: {
7
7
  modeId: number;
8
8
  }): Promise<void>;
9
9
  $setModeEnabledState({ modeId, enabled }: {
10
10
  modeId: number;
11
11
  enabled: boolean;
12
- }): void;
12
+ }): Promise<void>;
13
13
  $updateIdCaptureMode({ modeJson, modeId }: {
14
14
  modeJson: string;
15
15
  modeId: number;
@@ -23,11 +23,11 @@ export interface IdCaptureProxy {
23
23
  modeId: number;
24
24
  }): Promise<void>;
25
25
  }
26
- export declare class IdCaptureController extends BaseNewController<IdCaptureProxy> {
26
+ export declare class IdCaptureController extends BaseController<IdCaptureProxy> {
27
27
  private idCapture;
28
28
  constructor(idCapture?: IdCapture | null);
29
29
  reset(): Promise<void>;
30
- setModeEnabledState(enabled: boolean): void;
30
+ setModeEnabledState(enabled: boolean): Promise<void>;
31
31
  updateIdCaptureMode(): Promise<void>;
32
32
  applyIdCaptureModeSettings(newSettings: IdCaptureSettings): Promise<void>;
33
33
  updateFeedback(feedback: IdCaptureFeedback): Promise<void>;
@@ -1,42 +1,42 @@
1
- import { BaseNewController, EventEmitter } from 'scandit-datacapture-frameworks-core';
1
+ import { BaseController, BaseProxy } from 'scandit-datacapture-frameworks-core';
2
2
  import { IdCapture } from '../IdCapture';
3
- export interface IdCaptureListenerProxy {
3
+ export interface IdCaptureListenerProxy extends BaseProxy {
4
4
  $finishDidCaptureCallback({ modeId, enabled }: {
5
5
  modeId: number;
6
6
  enabled: boolean;
7
- }): void;
7
+ }): Promise<void>;
8
8
  $finishDidRejectCallback({ modeId, enabled }: {
9
9
  modeId: number;
10
10
  enabled: boolean;
11
- }): void;
12
- $addIdCaptureListener({ modeId }: {
11
+ }): Promise<void>;
12
+ /**
13
+ * Add persistent event listener for ID capture events.
14
+ * Uses `$$` prefix for automatic Cordova event registration detection.
15
+ */
16
+ $$addIdCaptureListener({ modeId }: {
13
17
  modeId: number;
14
18
  }): Promise<void>;
15
19
  $removeIdCaptureListener({ modeId }: {
16
20
  modeId: number;
17
21
  }): Promise<void>;
18
- subscribeForEvents(events: string[]): void;
19
- unsubscribeFromEvents(events: string[]): void;
20
- dispose(): void;
21
- eventEmitter: EventEmitter;
22
22
  }
23
23
  export declare enum IdCaptureListenerEvents {
24
24
  didCapture = "IdCaptureListener.didCaptureId",
25
25
  didReject = "IdCaptureListener.didRejectId"
26
26
  }
27
- export declare class IdCaptureListenerController extends BaseNewController<IdCaptureListenerProxy> {
27
+ export declare class IdCaptureListenerController extends BaseController<IdCaptureListenerProxy> {
28
28
  private idCapture;
29
29
  private hasListeners;
30
30
  constructor(idCapture: IdCapture);
31
- private initialize;
32
31
  subscribeListener(): Promise<void>;
32
+ unsubscribeListener(): Promise<void>;
33
+ dispose(): void;
34
+ private initialize;
33
35
  private handleDidCapture;
34
36
  private handleDidReject;
35
- unsubscribeListener(): Promise<void>;
36
37
  private notifyListenersOfDidCapture;
37
38
  private notifyListenersOfDidReject;
38
39
  private enrichCapturedIdJson;
39
- dispose(): void;
40
40
  private get modeId();
41
41
  private handleDidCaptureWrapper;
42
42
  private handleDidRejectWrapper;
@@ -1,13 +1,11 @@
1
- import { BaseNewController, EventEmitter } from 'scandit-datacapture-frameworks-core';
1
+ import { BaseController, BaseProxy } from 'scandit-datacapture-frameworks-core';
2
2
  import { IdCaptureOverlay } from '../IdCaptureOverlay';
3
- export interface IdCaptureOverlayProxy {
3
+ export interface IdCaptureOverlayProxy extends BaseProxy {
4
4
  $updateIdCaptureOverlay({ overlayJson }: {
5
5
  overlayJson: string;
6
6
  }): Promise<void>;
7
- dispose(): void;
8
- eventEmitter: EventEmitter;
9
7
  }
10
- export declare class IdCaptureOverlayController extends BaseNewController<IdCaptureOverlayProxy> {
8
+ export declare class IdCaptureOverlayController extends BaseController<IdCaptureOverlayProxy> {
11
9
  private overlay;
12
10
  constructor(overlay: IdCaptureOverlay);
13
11
  updateIdCaptureOverlay(overlay: IdCaptureOverlay): Promise<void>;
@@ -4,3 +4,5 @@ export * from './id';
4
4
  export * from './idcapture';
5
5
  export * from './iddocumenttype';
6
6
  export * from './scanner';
7
+ export * from './proxy-types';
8
+ export * from './proxy-registration';
@@ -0,0 +1,2 @@
1
+ import { IdNativeCallerProvider } from './proxy-types';
2
+ export declare function registerIdProxies(provider: IdNativeCallerProvider): void;
@@ -0,0 +1,5 @@
1
+ import { NativeCallerProvider } from 'scandit-datacapture-frameworks-core';
2
+ export declare const ID_PROXY_TYPE_NAMES: readonly ["IdCaptureListenerProxy", "IdCaptureProxy", "IdCaptureOverlayProxy"];
3
+ export type IdProxyType = typeof ID_PROXY_TYPE_NAMES[number];
4
+ export interface IdNativeCallerProvider extends NativeCallerProvider<IdProxyType> {
5
+ }
@@ -1,10 +1,10 @@
1
1
  import { DefaultSerializeable } from "scandit-datacapture-frameworks-core";
2
2
  import { PhysicalDocumentScanner } from "./PhysicalDocumentScanner";
3
3
  export declare class FullDocumentScanner extends DefaultSerializeable implements PhysicalDocumentScanner {
4
- private readonly _isFull;
5
4
  protected readonly _barcode: boolean;
6
5
  protected readonly _machineReadableZone: boolean;
7
6
  protected readonly _visualInspectionZone: boolean;
7
+ private readonly _isFull;
8
8
  private options;
9
9
  constructor();
10
10
  }
@@ -1,10 +1,10 @@
1
1
  import { DefaultSerializeable } from "scandit-datacapture-frameworks-core";
2
2
  import { PhysicalDocumentScanner } from "./PhysicalDocumentScanner";
3
3
  export declare class SingleSideScanner extends DefaultSerializeable implements PhysicalDocumentScanner {
4
- private readonly _isFull;
5
4
  protected readonly _barcode: boolean;
6
5
  protected readonly _machineReadableZone: boolean;
7
6
  protected readonly _visualInspectionZone: boolean;
7
+ private readonly _isFull;
8
8
  private options;
9
9
  constructor(barcode: boolean, machineReadableZone: boolean, visualInspectionZone: boolean);
10
10
  get barcode(): boolean;