@idscan/idvc2 2.5.6 → 2.5.7

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.
Files changed (165) hide show
  1. package/README.md +3 -0
  2. package/dist/types/assets/images/barcode.d.ts +2 -0
  3. package/dist/types/assets/images/face.d.ts +2 -0
  4. package/dist/types/assets/images/front.d.ts +2 -0
  5. package/dist/types/assets/images/mrz.d.ts +2 -0
  6. package/dist/types/assets/images/pdf.d.ts +2 -0
  7. package/dist/types/bl.d.ts +15 -0
  8. package/dist/types/constatnts/camera.d.ts +11 -0
  9. package/dist/types/constatnts/imageProcessing.d.ts +3 -0
  10. package/dist/types/constatnts/pdf.d.ts +1 -0
  11. package/dist/types/context.d.ts +118 -0
  12. package/dist/types/defaultConfig.d.ts +57 -0
  13. package/dist/types/environment/designations.d.ts +5 -0
  14. package/dist/types/environment/documentTypes.d.ts +26 -0
  15. package/dist/types/environment/langs.d.ts +89 -0
  16. package/dist/types/environment/loopResult.d.ts +8 -0
  17. package/dist/types/environment/modalPosition.d.ts +19 -0
  18. package/dist/types/environment/realFaceModes.d.ts +22 -0
  19. package/dist/types/environment/stepsDescription.d.ts +54 -0
  20. package/dist/types/environment/triangulation.d.ts +18 -0
  21. package/dist/types/eventListeners/eventListeners.d.ts +15 -0
  22. package/dist/types/eventListeners/selectDocumentType/selectHandler.d.ts +5 -0
  23. package/dist/types/helpers/apiSupport.d.ts +1 -0
  24. package/dist/types/helpers/canvas.d.ts +34 -0
  25. package/dist/types/helpers/color.d.ts +14 -0
  26. package/dist/types/helpers/dataManipulation.d.ts +27 -0
  27. package/dist/types/helpers/detectLanguage.d.ts +3 -0
  28. package/dist/types/helpers/geometry.d.ts +35 -0
  29. package/dist/types/helpers/html.d.ts +26 -0
  30. package/dist/types/helpers/image.d.ts +36 -0
  31. package/dist/types/helpers/imageprocessing.d.ts +11 -0
  32. package/dist/types/helpers/licenceKeyError.d.ts +6 -0
  33. package/dist/types/helpers/manualUpload.d.ts +7 -0
  34. package/dist/types/helpers/math.d.ts +35 -0
  35. package/dist/types/helpers/mobileChecker.d.ts +15 -0
  36. package/dist/types/helpers/numbers.d.ts +2 -0
  37. package/dist/types/helpers/step-background.d.ts +2 -0
  38. package/dist/types/helpers/strings.d.ts +9 -0
  39. package/dist/types/helpers/time.d.ts +11 -0
  40. package/dist/types/helpers/ts/common.d.ts +17 -0
  41. package/dist/types/helpers/updateSelecetTypes.d.ts +3 -0
  42. package/dist/types/helpers/validators.d.ts +44 -0
  43. package/dist/types/idvc.d.ts +19 -0
  44. package/dist/types/initialize.d.ts +12 -0
  45. package/dist/types/loader/asyncLoader.d.ts +1 -0
  46. package/dist/types/loader/loadAnglesModel.d.ts +2 -0
  47. package/dist/types/loader/loadFrontModels.d.ts +2 -0
  48. package/dist/types/loader/loaderClassLocal.d.ts +2 -0
  49. package/dist/types/loader/loaderFace.d.ts +2 -0
  50. package/dist/types/loader/loaderMRZ.d.ts +4 -0
  51. package/dist/types/loader/loaderMeshFace.d.ts +3 -0
  52. package/dist/types/loader/loaderPDF.d.ts +3 -0
  53. package/dist/types/loader/loaderUploadMode.d.ts +1 -0
  54. package/dist/types/loader/loaderZXing.d.ts +2 -0
  55. package/dist/types/loop.d.ts +13 -0
  56. package/dist/types/loopControl.d.ts +10 -0
  57. package/dist/types/modules/BarcodeModule.d.ts +28 -0
  58. package/dist/types/modules/Config.d.ts +131 -0
  59. package/dist/types/modules/FrontProcessing.d.ts +11 -0
  60. package/dist/types/modules/MetaData.d.ts +10 -0
  61. package/dist/types/modules/MrzModule.d.ts +73 -0
  62. package/dist/types/modules/PdfModule.d.ts +79 -0
  63. package/dist/types/modules/Step.d.ts +69 -0
  64. package/dist/types/modules/blur.d.ts +4 -0
  65. package/dist/types/modules/browwserCompatibilities.d.ts +7 -0
  66. package/dist/types/modules/camera/camera.d.ts +14 -0
  67. package/dist/types/modules/camera/cameraManager.d.ts +9 -0
  68. package/dist/types/modules/face/Face.d.ts +63 -0
  69. package/dist/types/modules/face/MeshFace.d.ts +48 -0
  70. package/dist/types/modules/face/SimpleFace.d.ts +23 -0
  71. package/dist/types/modules/feature-detect/simd.d.ts +2 -0
  72. package/dist/types/modules/frameQuality.d.ts +10 -0
  73. package/dist/types/modules/heic.d.ts +11 -0
  74. package/dist/types/modules/image.d.ts +13 -0
  75. package/dist/types/modules/initErrorHandler.d.ts +10 -0
  76. package/dist/types/modules/licenseKeyChecker.d.ts +1 -0
  77. package/dist/types/modules/manualUpload.d.ts +7 -0
  78. package/dist/types/modules/manualUploadProcessing.d.ts +30 -0
  79. package/dist/types/modules/mediaDevices.d.ts +2 -0
  80. package/dist/types/modules/moduleInitializer.d.ts +8 -0
  81. package/dist/types/modules/step-functions/face.d.ts +2 -0
  82. package/dist/types/modules/step-functions/pdf.d.ts +13 -0
  83. package/dist/types/modules/step-result-processing/barcode.d.ts +2 -0
  84. package/dist/types/modules/step-result-processing/common.d.ts +1 -0
  85. package/dist/types/modules/step-result-processing/mrz.d.ts +2 -0
  86. package/dist/types/modules/step-result-processing/pdf.d.ts +2 -0
  87. package/dist/types/modules/step-result-processing/simpleFace.d.ts +2 -0
  88. package/dist/types/modules/step-result-processing/volumeFace.d.ts +7 -0
  89. package/dist/types/modules/stepFunctions.d.ts +5 -0
  90. package/dist/types/modules/stepResultProcessing.d.ts +9 -0
  91. package/dist/types/modules/ui/Flashlight.d.ts +17 -0
  92. package/dist/types/modules/ui/MaskCapture.d.ts +52 -0
  93. package/dist/types/modules/ui/MessageBox.d.ts +19 -0
  94. package/dist/types/modules/ui/Modal.d.ts +20 -0
  95. package/dist/types/modules/ui/SelectDocumentType.d.ts +37 -0
  96. package/dist/types/modules/ui/canvas.d.ts +48 -0
  97. package/dist/types/modules/ui/forceCaptruringBtn.d.ts +12 -0
  98. package/dist/types/modules/ui/hints.d.ts +17 -0
  99. package/dist/types/modules/ui/limitations.d.ts +2 -0
  100. package/dist/types/modules/ui/manualSwitchBtn.d.ts +30 -0
  101. package/dist/types/modules/ui/selectDocumentType/documentSelectedEvent.d.ts +7 -0
  102. package/dist/types/modules/ui/spinner.d.ts +13 -0
  103. package/dist/types/modules/ui/swiper.d.ts +3 -0
  104. package/dist/types/modules/uploader.d.ts +58 -0
  105. package/dist/types/modules/validation/ValidateBool.d.ts +5 -0
  106. package/dist/types/modules/validation/ValidateDocumentTypes.d.ts +20 -0
  107. package/dist/types/modules/validation/ValidateElement.d.ts +5 -0
  108. package/dist/types/modules/validation/ValidateFunction.d.ts +5 -0
  109. package/dist/types/modules/validation/ValidateNumber.d.ts +5 -0
  110. package/dist/types/modules/validation/ValidateString.d.ts +5 -0
  111. package/dist/types/modules/validation/ValidateStringInArray.d.ts +12 -0
  112. package/dist/types/modules/validation/showValidationError.d.ts +2 -0
  113. package/dist/types/modules/validation/validatorFactory.d.ts +10 -0
  114. package/dist/types/modules/validator.d.ts +12 -0
  115. package/dist/types/neural models/Provider.d.ts +4 -0
  116. package/dist/types/neural models/anglesModel.d.ts +15 -0
  117. package/dist/types/neural models/blazeFaceModel.d.ts +27 -0
  118. package/dist/types/neural models/classLocal/exits.d.ts +3 -0
  119. package/dist/types/neural models/classLocalModel.d.ts +29 -0
  120. package/dist/types/neural models/meshFaceModel.d.ts +17 -0
  121. package/dist/types/neural models/mrzModel.d.ts +20 -0
  122. package/dist/types/neural models/neuralModel.d.ts +18 -0
  123. package/dist/types/neural models/preload.d.ts +7 -0
  124. package/dist/types/stepProcessing.d.ts +27 -0
  125. package/dist/types/types/enums/realFace.d.ts +4 -0
  126. package/dist/types/types/modules/camera.enum.d.ts +18 -0
  127. package/dist/types/ui.d.ts +89 -0
  128. package/dist/types/util.d.ts +34 -0
  129. package/dist/types/workers/blurWorker.d.ts +1 -0
  130. package/dist/types/workers/bubbleWorker.d.ts +1 -0
  131. package/dist/types/workers/loadNetworksWorker.d.ts +0 -0
  132. package/dist/types/workers/mrzWorker.d.ts +1 -0
  133. package/package.json +1 -1
  134. package/dist/css/idvc.css +0 -1
  135. package/dist/idvc.js +0 -1684
  136. package/dist/index.html +0 -114
  137. package/dist/js/defaultConfig.ts +0 -303
  138. package/dist/js/environment/capturingModes.json +0 -4
  139. package/dist/js/environment/cssVariables.json +0 -191
  140. package/dist/js/environment/designations.ts +0 -23
  141. package/dist/js/environment/documentTypes.ts +0 -151
  142. package/dist/js/environment/langs.js +0 -1
  143. package/dist/js/environment/loadModes.json +0 -11
  144. package/dist/js/environment/loopResult.ts +0 -14
  145. package/dist/js/environment/modalPosition.ts +0 -27
  146. package/dist/js/environment/networkNames.json +0 -9
  147. package/dist/js/environment/realFaceModes.ts +0 -24
  148. package/dist/js/environment/stepsDescription.ts +0 -64
  149. package/dist/js/environment/triangulation.ts +0 -188
  150. package/dist/networks/156-9239-chunk.js +0 -1
  151. package/dist/networks/190-77ed-chunk.js +0 -1
  152. package/dist/networks/77-9e2f-chunk.js +0 -1
  153. package/dist/networks/Face-a2b7-chunk.js +0 -1
  154. package/dist/networks/MRZ-7d62-chunk.js +0 -1
  155. package/dist/networks/PDF-78d2-chunk.js +0 -1
  156. package/dist/networks/ZXing-5410-chunk.js +0 -1
  157. package/dist/networks/angle03032023.onnx +0 -0
  158. package/dist/networks/classLocal03032023.onnx +0 -0
  159. package/dist/networks/faceDetection03032023.onnx +0 -0
  160. package/dist/networks/faceLandmark03032023.onnx +0 -0
  161. package/dist/networks/mrz03032023.onnx +0 -0
  162. package/dist/networks/ort-wasm-simd-threaded.wasm +0 -0
  163. package/dist/networks/ort-wasm-simd.wasm +0 -0
  164. package/dist/networks/ort-wasm-threaded.wasm +0 -0
  165. package/dist/networks/ort-wasm.wasm +0 -0
@@ -0,0 +1,14 @@
1
+ export interface Color {
2
+ rgbaToGrayscale(pixels: Uint8Array | number[], rgba: number[], nrows: number, ncols: number): void;
3
+ }
4
+ type TypedArray = Uint8Array | Uint8ClampedArray | Float32Array;
5
+ export declare enum Normalization {
6
+ STANDART = 255,
7
+ HALF = 127.5,
8
+ WITHOUT = 1
9
+ }
10
+ export declare const rgbaToGrayscale: (pixels: Uint8Array | number[], rgba: number[], nrows: number, ncols: number) => void;
11
+ export declare const normalize: <T extends TypedArray>(arr: T, normalization?: Normalization) => T;
12
+ export declare const rgbaToRgb: (rgba: ImageData, normalization?: Normalization) => Float32Array;
13
+ declare const _default: Color;
14
+ export default _default;
@@ -0,0 +1,27 @@
1
+ interface Entity {
2
+ value: string;
3
+ name: string;
4
+ status: 'valid' | 'invalid';
5
+ }
6
+ /**
7
+ * convert mrz parsed data to html represent
8
+ * @param {Array} data - mrz parsed data
9
+ */
10
+ export declare const mrzToHtml: (data: Entity[]) => HTMLElement;
11
+ /**
12
+ * convert pdf parsed data to html represent
13
+ * @param {Array} data - pdf parsed data
14
+ */
15
+ export declare const pdfToHtml: (data: Entity[]) => HTMLElement;
16
+ /**
17
+ * convert barcode parsed data to html represent
18
+ * @param {String} data - barcode parsed data
19
+ */
20
+ export declare const barcodeToHtml: (data: string) => HTMLElement;
21
+ /**
22
+ *
23
+ * @param {*} data - data to represent in HTML
24
+ * @param {String} type - type of parsed data maybe mrz|pdf|barcode
25
+ */
26
+ declare const jsonToHtml: (data: string | Entity[], type: 'mrz' | 'pdf' | 'barcode') => false | HTMLElement;
27
+ export default jsonToHtml;
@@ -0,0 +1,3 @@
1
+ import { SupportedLanguage } from '../environment/langs';
2
+ declare const _default: (language?: SupportedLanguage) => void;
3
+ export default _default;
@@ -0,0 +1,35 @@
1
+ export type Point = [number, number];
2
+ export interface ICoord {
3
+ x: number;
4
+ y: number;
5
+ }
6
+ export interface Geometry {
7
+ distanceBetweenPoints(p1: Point, p2: Point): number;
8
+ distanceBetweenPointsX(p1: Point, p2: Point): number;
9
+ distanceBetweenPointsXoR(p1: Point, p2: Point): number;
10
+ sizeByTwoPoints(p1: Point, p2: Point): number;
11
+ rectCenter(start: Point, end: Point): Point;
12
+ angleBetweenTwoVectors(vector1: number[], vector2: number[]): number;
13
+ triangleArea(a: number, b: number, c: number): number;
14
+ }
15
+ /**
16
+ * calculates distance between two points
17
+ * @param {Number[]} p1 - first coord [x1, y1]
18
+ * @param {Number[]} p2 - second coord [x2, y2]
19
+ * @return {number}
20
+ */
21
+ export declare const distanceBetweenPoints: (p1: Point, p2: Point) => number;
22
+ /**
23
+ * calculates distance between two points
24
+ * @param {Number[]} p1 - first coord [x1, y1]
25
+ * @param {Number[]} p2 - second coord [x2, y2]
26
+ * @return {number}
27
+ */
28
+ export declare const distanceBetweenPointsX: (p1: Point, p2: Point) => number;
29
+ export declare const sizeByTwoPoints: (p1: Point, p2: Point) => number;
30
+ export declare const rectCenter: (start: Point, end: Point) => Point;
31
+ export declare const angleBetweenTwoVectors: (vector1: number[], vector2: number[]) => number;
32
+ export declare const distanceBetweenPointsXoR: (p1: Point, p2: Point) => number;
33
+ export declare const triangleArea: (a: number, b: number, c: number) => number;
34
+ declare const geometry: Geometry;
35
+ export default geometry;
@@ -0,0 +1,26 @@
1
+ interface AttributeCollection {
2
+ [name: string]: string | boolean;
3
+ }
4
+ type CreateElement = (tagName?: string, params?: AttributeCollection | null, classNames?: string[], parent?: HTMLElement | null, children?: HTMLElement[]) => HTMLElement;
5
+ /**
6
+ * create and return HTMLElement
7
+ * @param { String } tagName - default 'div'
8
+ * @param { AttributeCollection | null } params
9
+ * @param { Array<String> } classNames - array of class names
10
+ * @param { HTMLElement } parent - element to which needs append created element
11
+ * @param { Array<HTMLElement> } children - elements which will appended to created element
12
+ * @returns { HTMLElement } - created element
13
+ */
14
+ export declare const createElement: CreateElement;
15
+ /**
16
+ * creates a script tag
17
+ * @param {string} scriptUrl - url to remote script
18
+ * @param {'module'} type - create script as module
19
+ * @return {Promise<unknown>}
20
+ */
21
+ export declare const loadScript: (scriptUrl: string) => Promise<unknown>;
22
+ declare const _default: {
23
+ createElement: CreateElement;
24
+ loadScript: (scriptUrl: string) => Promise<unknown>;
25
+ };
26
+ export default _default;
@@ -0,0 +1,36 @@
1
+ import { ICrop } from './ts/common';
2
+ export type Base64Image = string;
3
+ export type RGBAColor = string;
4
+ export type RGBColor8 = Uint8ClampedArray;
5
+ export type RGBColor32 = Float32Array;
6
+ type PixelPosition = number;
7
+ type Segmentize = (binarizedImg: Uint8ClampedArray, width: number) => Set<PixelPosition>[];
8
+ type Binarize = (img: ImageData, threshold?: number) => Uint8ClampedArray;
9
+ type GetResizedSizes = (size: number, baseSize: IBaseSize) => ISize;
10
+ export interface IOffset {
11
+ top: number;
12
+ left: number;
13
+ }
14
+ /**
15
+ * { width: number, height: number }
16
+ */
17
+ export interface ISize {
18
+ width: number;
19
+ height: number;
20
+ }
21
+ interface IBaseSize {
22
+ baseWidth: number;
23
+ baseHeight: number;
24
+ }
25
+ export declare const generateFaceColorFromAngle: (angle: number) => RGBAColor;
26
+ /**
27
+ *
28
+ * @param {ImageData} iData
29
+ * @param {number} threshold
30
+ * @return number[] - black and whited array;
31
+ */
32
+ export declare const binarize: Binarize;
33
+ export declare const segmentize2: Segmentize;
34
+ export declare const getResizedSizes: GetResizedSizes;
35
+ export declare const getCrop: (src: ISize, dst: ISize) => ICrop;
36
+ export {};
@@ -0,0 +1,11 @@
1
+ import { ILoopResult } from '../environment/loopResult';
2
+ declare const _default: {
3
+ processImage4: () => {
4
+ status: boolean;
5
+ cancel: boolean;
6
+ touch: boolean;
7
+ image: ImageData;
8
+ };
9
+ processImage5: (sideDetect?: boolean) => ILoopResult;
10
+ };
11
+ export default _default;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * sets licence key error
3
+ * @param {Number} errorCode
4
+ */
5
+ declare const _default: (errorCode?: number) => void;
6
+ export default _default;
@@ -0,0 +1,7 @@
1
+ export declare const resizeImageForStepProcessing: (data: any) => Promise<ImageData>;
2
+ declare const _default: {
3
+ getSmallImage: (data: string) => Promise<ImageData>;
4
+ setCurrentImage: (data: any) => Promise<void>;
5
+ fixOrientation: (image: HTMLImageElement) => Promise<ImageData>;
6
+ };
7
+ export default _default;
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Compute the mean value of values or a list with values.
3
+ * @param {number[]|number} args - (a, b, c) or []
4
+ * @returns {number}
5
+ */
6
+ export declare const mean: (...args: number[] | [number[]]) => number;
7
+ type NormalizationFunctionNames = 'unbiased' | 'biased' | 'uncorrected';
8
+ export declare const normalizationFunction: {
9
+ unbiased: (arr: number[]) => number;
10
+ biased: (arr: number[]) => number;
11
+ uncorrected: (arr: number[]) => number;
12
+ };
13
+ /**
14
+ * calculate standard deviation or return -1
15
+ * @param {Number[]} vals
16
+ * @param {'unbiased'|'biased'|'uncorrected'} normalization - 'unbiased' - divide by n - 1,
17
+ * 'uncorrected' - divide by n,
18
+ * 'biased' - divide by n + 1. default 'unbiased'.
19
+ * @param {number} fixed - how many digits after the decimal.
20
+ * @return number -1 if input values are wrong
21
+ */
22
+ export declare const STD: (vals: number[], normalization?: NormalizationFunctionNames, fixed?: number) => number;
23
+ /**
24
+ * get random integer number from range, included min and max
25
+ * @param {number} min
26
+ * @param {number} max
27
+ * @return {number}
28
+ */
29
+ export declare const randomIntFromInterval: (min: number, max: number) => number;
30
+ declare const _default: {
31
+ randomIntFromInterval: (min: number, max: number) => number;
32
+ mean: (...args: number[] | [number[]]) => number;
33
+ STD: (vals: number[], normalization?: NormalizationFunctionNames, fixed?: number) => number;
34
+ };
35
+ export default _default;
@@ -0,0 +1,15 @@
1
+ export declare const isiOS: () => boolean;
2
+ export declare const checkTouchPoints: () => boolean;
3
+ export declare const checkIsTouchScreen: () => boolean;
4
+ /**
5
+ *
6
+ * @param {Number} maxWidth - preferable max width device
7
+ */
8
+ export declare const isMobile: () => {
9
+ isMobileUserAgent: () => boolean;
10
+ isTouchable: () => boolean;
11
+ isTouchScreen: () => boolean;
12
+ isSurface: () => boolean;
13
+ };
14
+ declare const checkIfMobile: () => boolean;
15
+ export default checkIfMobile;
@@ -0,0 +1,2 @@
1
+ import { GetRandomNumber } from '../types/helpers/numbers';
2
+ export declare const getRandomNumber: GetRandomNumber;
@@ -0,0 +1,2 @@
1
+ declare const _default: (stepName: string) => string;
2
+ export default _default;
@@ -0,0 +1,9 @@
1
+ import { Base64Image } from './image';
2
+ export declare const encodeMeta: (metadata: any) => string;
3
+ export declare const decodeMeta: (str: string) => any;
4
+ export declare const base64ToArrayBuffer: (base64: string) => Uint8Array;
5
+ export declare const getDataFromBase64Img: (imgString: Base64Image) => string;
6
+ export declare const splitWordByUpperLetters: (word: string) => string[];
7
+ export declare const normalizeCamelCase: (word: string) => string;
8
+ export declare const removeHtmlEntities: (str: string) => string;
9
+ export declare const normalizeString: (str: string) => string;
@@ -0,0 +1,11 @@
1
+ /**
2
+ *
3
+ * @param {number} ms
4
+ * @returns {Promise<>}
5
+ */
6
+ export declare const timeout: (ms: number) => Promise<unknown>;
7
+ export declare const nextFrame: (fn?: () => Promise<any> | void) => Promise<unknown>;
8
+ declare const _default: {
9
+ timeout: (ms: number) => Promise<unknown>;
10
+ };
11
+ export default _default;
@@ -0,0 +1,17 @@
1
+ export type PartialRecord<T extends string, U> = {
2
+ [V in T]?: U;
3
+ };
4
+ export interface IPosition {
5
+ x: number;
6
+ y: number;
7
+ }
8
+ export interface IOffset {
9
+ left: number;
10
+ top: number;
11
+ }
12
+ export interface ISize {
13
+ width: number;
14
+ height: number;
15
+ }
16
+ export interface ICrop extends ISize, IPosition {
17
+ }
@@ -0,0 +1,3 @@
1
+ import SelectDocumentType from '../modules/ui/SelectDocumentType';
2
+ declare const updateSelectTypes: (selectDocumentType: SelectDocumentType) => void;
3
+ export default updateSelectTypes;
@@ -0,0 +1,44 @@
1
+ /**
2
+ * check value to be boolean
3
+ * @param val
4
+ * @return {boolean}
5
+ */
6
+ export declare const isValidBool: (val: any) => boolean;
7
+ /**
8
+ * check value to be object
9
+ * @param val
10
+ * @return {boolean}
11
+ */
12
+ export declare const isValidObject: (val: any) => boolean;
13
+ /**
14
+ * check value to be function
15
+ * @param val
16
+ * @return {boolean}
17
+ */
18
+ export declare const isValidFunction: (val: any) => boolean;
19
+ /**
20
+ * check value to be string
21
+ * @param val
22
+ * @return {boolean}
23
+ */
24
+ export declare const isValidString: (val: any) => boolean;
25
+ /**
26
+ * check value to be finite number
27
+ * @param val
28
+ * @return {boolean}
29
+ */
30
+ export declare const isValidNumber: (val: any) => boolean;
31
+ /**
32
+ * validates string in given array and set its value
33
+ * @param {String[]} availableValues - array of available values
34
+ * @param {String} valueToSet - value that should be set
35
+ */
36
+ export declare const isValidDistinctStringInArray: (availableValues: string[], valueToSet: string) => boolean;
37
+ declare const _default: {
38
+ isValidBool: (val: any) => boolean;
39
+ isValidFunction: (val: any) => boolean;
40
+ isValidString: (val: any) => boolean;
41
+ isValidNumber: (val: any) => boolean;
42
+ isValidDistinctStringInArray: (availableValues: string[], valueToSet: string) => boolean;
43
+ };
44
+ export default _default;
@@ -0,0 +1,19 @@
1
+ import './assets/scss/index.scss';
2
+ import { IConfig } from './modules/Config';
3
+ import { SupportedLanguage } from './environment/langs';
4
+ import { IDocumentTypeConfig } from './modules/validator';
5
+ declare class VideoCapturing {
6
+ constructor(config: IConfig);
7
+ private init;
8
+ /**
9
+ *
10
+ * @param language
11
+ */
12
+ changeLanguage(language: SupportedLanguage): void;
13
+ get version(): string;
14
+ resetAllSteps(): void;
15
+ reloadComponent(newConfig: Partial<IConfig>): void;
16
+ updateDocumentTypes(documentTypes: IDocumentTypeConfig): void;
17
+ showSpinner(val: any): void;
18
+ }
19
+ export default VideoCapturing;
@@ -0,0 +1,12 @@
1
+ export declare const typesInit: () => void;
2
+ declare const _default: {
3
+ typesInit: () => void;
4
+ checkCompatibility: () => void;
5
+ start: () => void;
6
+ isCameraRequired: () => any;
7
+ isUploaderRequired: () => any;
8
+ isCameraNeeded: () => any;
9
+ detectAndSetBrowser: () => void;
10
+ detectAndSetRealFaceMode: () => void;
11
+ };
12
+ export default _default;
@@ -0,0 +1 @@
1
+ export declare const asyncLoader: () => Promise<void>;
@@ -0,0 +1,2 @@
1
+ declare const _default: () => Promise<void>;
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const loadFrontModels: () => Promise<void>;
2
+ export default loadFrontModels;
@@ -0,0 +1,2 @@
1
+ declare const _default: () => Promise<void>;
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const load: () => Promise<void>;
2
+ export default load;
@@ -0,0 +1,4 @@
1
+ declare const _default: ({ commonLicenseKey }: {
2
+ commonLicenseKey: any;
3
+ }) => Promise<void>;
4
+ export default _default;
@@ -0,0 +1,3 @@
1
+ export declare const faceModuleLoader: (core: any) => Promise<void>;
2
+ declare const loadMeshFace: () => Promise<void>;
3
+ export default loadMeshFace;
@@ -0,0 +1,3 @@
1
+ import c from '../context';
2
+ declare const load: ({ pdf417key }: typeof c.keys) => Promise<void>;
3
+ export default load;
@@ -0,0 +1 @@
1
+ export declare const loadNetworksUploadMode: () => Promise<void>;
@@ -0,0 +1,2 @@
1
+ declare const load: () => Promise<void>;
2
+ export default load;
@@ -0,0 +1,13 @@
1
+ import { IMRZLocation } from './modules/manualUploadProcessing';
2
+ import { Cancel } from './types/loop';
3
+ export interface IMrzCoords {
4
+ locations: IMRZLocation;
5
+ color: 'green' | 'yellow';
6
+ }
7
+ export declare const loop: () => Promise<false>;
8
+ declare const _default: {
9
+ loop: () => Promise<false>;
10
+ stopProccesing: () => void;
11
+ cancel: Cancel;
12
+ };
13
+ export default _default;
@@ -0,0 +1,10 @@
1
+ export declare const setIsStarted: (val: boolean) => void;
2
+ export declare const stop: () => void;
3
+ export declare const setVisibleVideo: () => Promise<void>;
4
+ export declare const start: () => Promise<void>;
5
+ declare const _default: {
6
+ start: () => Promise<void>;
7
+ stop: () => void;
8
+ setIsStarted: (val: boolean) => void;
9
+ };
10
+ export default _default;
@@ -0,0 +1,28 @@
1
+ export declare class BarcodeModule {
2
+ private module;
3
+ private isAllocate;
4
+ private buffer;
5
+ private readonly res;
6
+ private stringLib;
7
+ constructor(core: any);
8
+ init(stringLib: any): void;
9
+ allocate(buffer: any): void;
10
+ free(): void;
11
+ result(status?: boolean, image?: any, touch?: boolean, text?: string): {
12
+ status: boolean;
13
+ image: any;
14
+ touch: boolean;
15
+ text: string;
16
+ cancel: boolean;
17
+ type: string;
18
+ };
19
+ process(data: any, origData: any): {
20
+ status: boolean;
21
+ image: any;
22
+ touch: boolean;
23
+ text: string;
24
+ cancel: boolean;
25
+ type: string;
26
+ };
27
+ }
28
+ export default BarcodeModule;
@@ -0,0 +1,131 @@
1
+ import { IStepConfig, ValidationFn } from '../defaultConfig';
2
+ import { RealFaceMode } from '../environment/realFaceModes';
3
+ import { SupportedLanguage } from '../environment/langs';
4
+ import { StepType } from '../environment/stepsDescription';
5
+ import { DocumentTypeName } from '../environment/documentTypes';
6
+ import { IDocumentTypeConfig } from './validator';
7
+ import { IStepCallback } from './Step';
8
+ import { IDataForSubmit } from '../util';
9
+ /**
10
+ * @param {string} el,
11
+ * @param {string} licenseKey,
12
+ * @param {RealFaceMode} realFaceMode,
13
+ * @param {IDocumentTypeConfig | null} documentTypes,
14
+ * @param {boolean} autoContinue?,
15
+ * @param {number} resizeUploadedImage?,
16
+ * @param {boolean} fixFrontOrientAfterUpload?,
17
+ * @param {boolean} useCDN?,
18
+ * @param {string} networkUrl?,
19
+ */
20
+ export interface IConfig {
21
+ /** this is the id of the html tag on the page where the web library will be displayed. Default: videoCapturingEl */
22
+ el: string;
23
+ /** license key for the web library provided for you by Idscan.net */
24
+ licenseKey: string;
25
+ /**
26
+ * an option that enables advanced image capturing with volumetric face detection. Available values: 'auto','all', 'none'
27
+ * - Auto - enable "realFaceMode" only for iPhone
28
+ * - All - enable "realFaceMode" for all devices
29
+ * - None - disable this option
30
+ */
31
+ realFaceMode: RealFaceMode;
32
+ /**
33
+ * the array contains an object per document type that is configured. Each object has the document type listed in the type field and then in its steps array you can configure what steps you want the user to complete and what capture modes you will allow (i.e. uploader and/or video)
34
+ *
35
+ * Available Document Types
36
+ *
37
+ * - ID (1) – USA driver license and USA ID (non-driver license), Canadian driver licenses
38
+ * - Passport (2) – with 2 lines MRZ
39
+ * - PassportCard (3) – with 3 lines MRZ (most European IDs, USA passports/cards)
40
+ * - GreenCard (6) – USA Permanent Resident Cards (only MRZ)
41
+ * - InternationalId (7) – Internationally approved U.S. IDs with 3 lines MRZ
42
+ * - VIN (8) – Vehicle Identification Numbers
43
+ * - Barcode (9) – 1-D and 2-D barcodes
44
+ *
45
+ * Available Step Types
46
+ *
47
+ * - front – capturing the front side of a document
48
+ * - mrz – detection and capturing of the MRZ of a document
49
+ * - pdf – detection and capturing of pdf417 of a document
50
+ * - face – detection and capturing of the end user's face using the front camera
51
+ * - barcode – detection and capturing of 1 dimensional (barcodes) or 2 dimensional (qr codes)
52
+ * - photo – capturing of a vehicle identification number
53
+ *
54
+ * Available Capture Mode
55
+ *
56
+ * - uploader - uploading an image from the file system
57
+ * - video - capturing an image using the auto capture feature
58
+ */
59
+ documentTypes: IDocumentTypeConfig | null;
60
+ /** the setting that enables the automatic transition from one step to the next step. Default */
61
+ autoContinue?: boolean;
62
+ /** sets the maximum size in pixels (of the largest of the height or width) for a manually uploaded picture */
63
+ resizeUploadedImage?: number;
64
+ /** this setting will change the orientation of a front step's image if it is not horizontal when it is uploaded */
65
+ fixFrontOrientAfterUpload?: boolean;
66
+ /** set to true if you prefer to load neural networks from a content delivery network instead of from your web server */
67
+ useCDN?: boolean;
68
+ /** */
69
+ networkUrl?: string;
70
+ /** the web library supports two languages, english and spanish. English uses en and Spanish uses es */
71
+ language?: SupportedLanguage;
72
+ /**
73
+ * Path to the folder with chunks. Specify the path on the server if you need to remove the folder to another location.
74
+ */
75
+ chunkPublicPath?: string;
76
+ /**
77
+ * switches on/off the button to show guide lines
78
+ */
79
+ isShowGuidelinesButton?: boolean;
80
+ /**
81
+ * if only one document type is configured in the documentTypes array AND this setting is set to false the document type dialog will not be displayed to the end user
82
+ */
83
+ isShowDocumentTypeSelect?: boolean;
84
+ /**
85
+ * option to show the button 'submit' after capturing all the images. If the button is turned off, an event will automatically fire that triggers the submit event handler
86
+ */
87
+ showSubmitBtn?: boolean;
88
+ /**
89
+ * This option switches on/off the HEIC image processing (HEIC is Apple’s proprietary version of the Image File format). It’s possible to upload an image of this type only using a Mac/MacBook
90
+ */
91
+ useHeic?: boolean;
92
+ /** callback-function which will be called after guidelines button. */
93
+ clickGuidlines?: () => void;
94
+ /** function which will be called after each step completes */
95
+ onChange?: (data: IStepCallback) => void;
96
+ /**
97
+ * function which will be called after the retake button is clicked
98
+ * @param data - Step object of current step
99
+ */
100
+ onRetakeHook?: (data: IStepCallback) => void;
101
+ /** the function that will be called on the component mounted. */
102
+ onMounted?: () => void;
103
+ /**
104
+ * function which will be called after reset all the steps button is clicked
105
+ * @param data - Step objects of current pipeline
106
+ */
107
+ onReset?: (data: IDataForSubmit) => void;
108
+ /** function which will be called in case the camera is not available */
109
+ onCameraError?: (data: Error) => void;
110
+ /** function which will be called after clicking the submit button */
111
+ submit?: (data: IDataForSubmit) => void;
112
+ }
113
+ declare class Config implements IConfig {
114
+ el: string;
115
+ commonStepTypes: Set<StepType>;
116
+ types: DocumentTypeName[];
117
+ steps: IStepConfig[];
118
+ documentTypes: IDocumentTypeConfig | null;
119
+ licenseKey: string;
120
+ autoContinue: boolean;
121
+ resizeUploadedImage: number;
122
+ fixFrontOrientAfterUpload: boolean;
123
+ useCDN: boolean;
124
+ networkUrl: string;
125
+ realFaceMode: "all" | "auto" | "none";
126
+ language: any;
127
+ constructor(configObject: IConfig);
128
+ getFunction(validationFn: ValidationFn): false | import("./validation/ValidateElement").default | import("./validation/ValidateBool").default | import("./validation/ValidateStringInArray").default | import("./validation/ValidateDocumentTypes").default | import("./validation/ValidateFunction").default | import("./validation/ValidateNumber").default | import("./validation/ValidateString").default;
129
+ validate(configObject: IConfig): void;
130
+ }
131
+ export default Config;
@@ -0,0 +1,11 @@
1
+ import { ClassLocalExitType } from '../neural models/classLocal/exits';
2
+ type Status = 'PENDING' | 'FULFILLED';
3
+ interface FillingQueueResult {
4
+ promise: Promise<ClassLocalExitType>;
5
+ status: Status;
6
+ }
7
+ export declare const clearQueue: () => void;
8
+ export declare const fillingQueue: (smallImage?: ImageData, isUpload?: boolean) => FillingQueueResult;
9
+ export declare const getBestFrame: () => ImageData;
10
+ export declare const dropPromise: () => void;
11
+ export {};
@@ -0,0 +1,10 @@
1
+ export default class MetaData {
2
+ userAgent: string;
3
+ capturedMethod: string;
4
+ version: string;
5
+ logs: Record<string, any>;
6
+ constructor(version?: string);
7
+ captureMethod(steps: any): void;
8
+ getMetaData(steps: any): {};
9
+ prepareMetaDataForSubmit(steps: any): string;
10
+ }