@regulaforensics/vp-frontend-face-components 2.0.0 → 3.0.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.
Files changed (237) hide show
  1. package/README.md +372 -165
  2. package/dist/main.js +1 -1
  3. package/dist/main.js.LICENSE.txt +30 -0
  4. package/lib/index.d.ts +229 -0
  5. package/package.json +5 -83
  6. package/lib/common/BackCameraIcon.d.ts +0 -6
  7. package/lib/common/Button.d.ts +0 -7
  8. package/lib/common/CameraChangeIcon.d.ts +0 -6
  9. package/lib/common/CameraIcon.d.ts +0 -6
  10. package/lib/common/CheckIcon.d.ts +0 -6
  11. package/lib/common/CrossIcon.d.ts +0 -6
  12. package/lib/common/DocReaderCameraDisabled.d.ts +0 -5
  13. package/lib/common/DocReaderCameraPreparing.d.ts +0 -5
  14. package/lib/common/DocReaderFlip.d.ts +0 -5
  15. package/lib/common/DocReaderProcessing.d.ts +0 -5
  16. package/lib/common/DocReaderProcessingError.d.ts +0 -5
  17. package/lib/common/DocReaderProcessingFinished.d.ts +0 -6
  18. package/lib/common/DocReaderSearch.d.ts +0 -5
  19. package/lib/common/ErrorIcon.d.ts +0 -6
  20. package/lib/common/FromCameraIcon.d.ts +0 -5
  21. package/lib/common/FromGalleryIcon.d.ts +0 -5
  22. package/lib/common/FrontCameraIcon.d.ts +0 -6
  23. package/lib/common/FullscreenExitIcon.d.ts +0 -6
  24. package/lib/common/FullscreenIcon.d.ts +0 -6
  25. package/lib/common/Icon.d.ts +0 -64
  26. package/lib/common/Message.d.ts +0 -8
  27. package/lib/common/NoGlareIconLivenessDetection.d.ts +0 -5
  28. package/lib/common/NoSmilingIconLivenessDetection.d.ts +0 -5
  29. package/lib/common/PortraitOrientationOnlyIcon.d.ts +0 -6
  30. package/lib/common/RegulaLogo.d.ts +0 -6
  31. package/lib/common/RegulaLogoLivenessDetection.d.ts +0 -5
  32. package/lib/common/SnapshotIcon.d.ts +0 -6
  33. package/lib/common/Spinner.d.ts +0 -3
  34. package/lib/common/SquareIcon.d.ts +0 -6
  35. package/lib/common/StopIcon.d.ts +0 -6
  36. package/lib/common/VerifiedIcon.d.ts +0 -6
  37. package/lib/components/ButtonFaceLiveness.d.ts +0 -7
  38. package/lib/components/CameraCapture.d.ts +0 -9
  39. package/lib/components/CameraSnapshot.d.ts +0 -2
  40. package/lib/components/CameraSnapshotFileCapture.d.ts +0 -10
  41. package/lib/components/DocumentCapture.d.ts +0 -11
  42. package/lib/components/DocumentContainer.d.ts +0 -11
  43. package/lib/components/DocumentReader.d.ts +0 -2
  44. package/lib/components/DocumentReaderFileCapture.d.ts +0 -12
  45. package/lib/components/DocumentReaderLayout.d.ts +0 -22
  46. package/lib/components/DocumentReaderStartScreen.d.ts +0 -10
  47. package/lib/components/ErrorBoundary.d.ts +0 -18
  48. package/lib/components/FaceCapture.d.ts +0 -25
  49. package/lib/components/FaceDetection.d.ts +0 -2
  50. package/lib/components/FaceFullScreenOverlay.d.ts +0 -10
  51. package/lib/components/FaceHintAnimaition.d.ts +0 -16
  52. package/lib/components/FaceLayout.d.ts +0 -23
  53. package/lib/components/FaceLiveness.d.ts +0 -2
  54. package/lib/components/InfoScreen.d.ts +0 -11
  55. package/lib/components/InfoScreenFaceLiveness.d.ts +0 -12
  56. package/lib/components/InstructionVideoScreen.d.ts +0 -9
  57. package/lib/components/ProcessScreen.d.ts +0 -6
  58. package/lib/components/ProcessScreenFaceLiveness.d.ts +0 -6
  59. package/lib/components/RetryScreenFaceLiveness.d.ts +0 -7
  60. package/lib/components/SectorAnimationSvg.d.ts +0 -11
  61. package/lib/components/WebCamera.d.ts +0 -19
  62. package/lib/constants.d.ts +0 -686
  63. package/lib/contexts/DocumentAttributesContext.d.ts +0 -25
  64. package/lib/contexts/DocumentSDKContext.d.ts +0 -8
  65. package/lib/contexts/FaceAttributesContext.d.ts +0 -25
  66. package/lib/hoc/withDocumentAttributesContext.d.ts +0 -4
  67. package/lib/hoc/withDocumentSDKContext.d.ts +0 -3
  68. package/lib/hoc/withFaceAttributesContext.d.ts +0 -4
  69. package/lib/hoc/withLocalize.d.ts +0 -8
  70. package/lib/hooks/useDocumentReaderSeries.d.ts +0 -20
  71. package/lib/hooks/useDocumentReaderSingle.d.ts +0 -15
  72. package/lib/hooks/useFaceLiveness.d.ts +0 -41
  73. package/lib/hooks/useImageInputParam.d.ts +0 -7
  74. package/lib/hooks/useOrientationChange.d.ts +0 -10
  75. package/lib/hooks/useStateCallback.d.ts +0 -1
  76. package/lib/hooks/useStream.d.ts +0 -10
  77. package/lib/hooks/useUserAgent.d.ts +0 -3
  78. package/lib/hooks/useWindowBlur.d.ts +0 -2
  79. package/lib/i18n/dictionaries/_dictionaries.d.ts +0 -2275
  80. package/lib/index-document.d.ts +0 -4
  81. package/lib/index-face.d.ts +0 -1
  82. package/lib/media-resources/resourcesBase64.d.ts +0 -7
  83. package/lib/models/CameraModel.d.ts +0 -9
  84. package/lib/models/CustomError.d.ts +0 -7
  85. package/lib/models/DocReaderWebclient/ext/authenticity/authenticity.d.ts +0 -32
  86. package/lib/models/DocReaderWebclient/ext/authenticity/fiber.d.ts +0 -7
  87. package/lib/models/DocReaderWebclient/ext/authenticity/ident.d.ts +0 -8
  88. package/lib/models/DocReaderWebclient/ext/authenticity/image-ident.d.ts +0 -7
  89. package/lib/models/DocReaderWebclient/ext/authenticity/index.d.ts +0 -5
  90. package/lib/models/DocReaderWebclient/ext/authenticity/ocr-security-text.d.ts +0 -7
  91. package/lib/models/DocReaderWebclient/ext/authenticity/security-feature.d.ts +0 -8
  92. package/lib/models/DocReaderWebclient/ext/images.d.ts +0 -16
  93. package/lib/models/DocReaderWebclient/ext/index.d.ts +0 -6
  94. package/lib/models/DocReaderWebclient/ext/process-request-image.d.ts +0 -5
  95. package/lib/models/DocReaderWebclient/ext/process-request.d.ts +0 -38
  96. package/lib/models/DocReaderWebclient/ext/process-response.d.ts +0 -36
  97. package/lib/models/DocReaderWebclient/ext/text-field.d.ts +0 -40
  98. package/lib/models/DocReaderWebclient/ext/text.d.ts +0 -14
  99. package/lib/models/DocReaderWebclient/models/area-array.d.ts +0 -32
  100. package/lib/models/DocReaderWebclient/models/area-container.d.ts +0 -38
  101. package/lib/models/DocReaderWebclient/models/authenticity-check-list.d.ts +0 -31
  102. package/lib/models/DocReaderWebclient/models/authenticity-check-result-item.d.ts +0 -38
  103. package/lib/models/DocReaderWebclient/models/authenticity-check-result.d.ts +0 -43
  104. package/lib/models/DocReaderWebclient/models/authenticity-result-all-of.d.ts +0 -25
  105. package/lib/models/DocReaderWebclient/models/authenticity-result-type.d.ts +0 -33
  106. package/lib/models/DocReaderWebclient/models/authenticity-result.d.ts +0 -18
  107. package/lib/models/DocReaderWebclient/models/bc-pdf417-info.d.ts +0 -54
  108. package/lib/models/DocReaderWebclient/models/bc-roidetect.d.ts +0 -42
  109. package/lib/models/DocReaderWebclient/models/check-diagnose.d.ts +0 -98
  110. package/lib/models/DocReaderWebclient/models/check-result.d.ts +0 -30
  111. package/lib/models/DocReaderWebclient/models/chosen-document-type-result-all-of.d.ts +0 -25
  112. package/lib/models/DocReaderWebclient/models/chosen-document-type-result.d.ts +0 -19
  113. package/lib/models/DocReaderWebclient/models/chosen-document-type.d.ts +0 -74
  114. package/lib/models/DocReaderWebclient/models/container-list.d.ts +0 -45
  115. package/lib/models/DocReaderWebclient/models/critical.d.ts +0 -26
  116. package/lib/models/DocReaderWebclient/models/cross-source-value-comparison.d.ts +0 -38
  117. package/lib/models/DocReaderWebclient/models/data-module.d.ts +0 -48
  118. package/lib/models/DocReaderWebclient/models/details-optical.d.ts +0 -67
  119. package/lib/models/DocReaderWebclient/models/details-rfid.d.ts +0 -61
  120. package/lib/models/DocReaderWebclient/models/device-info.d.ts +0 -54
  121. package/lib/models/DocReaderWebclient/models/doc-bar-code-info-all-of.d.ts +0 -31
  122. package/lib/models/DocReaderWebclient/models/doc-bar-code-info.d.ts +0 -19
  123. package/lib/models/DocReaderWebclient/models/doc-visual-extended-field.d.ts +0 -70
  124. package/lib/models/DocReaderWebclient/models/doc-visual-extended-info.d.ts +0 -25
  125. package/lib/models/DocReaderWebclient/models/document-format.d.ts +0 -70
  126. package/lib/models/DocReaderWebclient/models/document-image-result-all-of.d.ts +0 -25
  127. package/lib/models/DocReaderWebclient/models/document-image-result.d.ts +0 -18
  128. package/lib/models/DocReaderWebclient/models/document-image.d.ts +0 -24
  129. package/lib/models/DocReaderWebclient/models/document-position-result-all-of.d.ts +0 -25
  130. package/lib/models/DocReaderWebclient/models/document-position-result.d.ts +0 -19
  131. package/lib/models/DocReaderWebclient/models/document-position.d.ts +0 -80
  132. package/lib/models/DocReaderWebclient/models/document-type-recognition-result.d.ts +0 -30
  133. package/lib/models/DocReaderWebclient/models/document-type.d.ts +0 -246
  134. package/lib/models/DocReaderWebclient/models/document-types-candidates-list.d.ts +0 -32
  135. package/lib/models/DocReaderWebclient/models/document-types-candidates-result-all-of.d.ts +0 -25
  136. package/lib/models/DocReaderWebclient/models/document-types-candidates-result.d.ts +0 -18
  137. package/lib/models/DocReaderWebclient/models/document-types-candidates.d.ts +0 -32
  138. package/lib/models/DocReaderWebclient/models/encrypted-rclresult-all-of.d.ts +0 -24
  139. package/lib/models/DocReaderWebclient/models/encrypted-rclresult.d.ts +0 -18
  140. package/lib/models/DocReaderWebclient/models/fdsidlist.d.ts +0 -80
  141. package/lib/models/DocReaderWebclient/models/fiber-result-all-of.d.ts +0 -74
  142. package/lib/models/DocReaderWebclient/models/fiber-result.d.ts +0 -18
  143. package/lib/models/DocReaderWebclient/models/graphic-field-type.d.ts +0 -118
  144. package/lib/models/DocReaderWebclient/models/graphic-field.d.ts +0 -63
  145. package/lib/models/DocReaderWebclient/models/graphic-fields-list.d.ts +0 -25
  146. package/lib/models/DocReaderWebclient/models/graphics-result-all-of.d.ts +0 -25
  147. package/lib/models/DocReaderWebclient/models/graphics-result.d.ts +0 -19
  148. package/lib/models/DocReaderWebclient/models/ident-result-all-of.d.ts +0 -65
  149. package/lib/models/DocReaderWebclient/models/ident-result.d.ts +0 -18
  150. package/lib/models/DocReaderWebclient/models/image-data.d.ts +0 -24
  151. package/lib/models/DocReaderWebclient/models/image-qa.d.ts +0 -54
  152. package/lib/models/DocReaderWebclient/models/image-quality-check-list.d.ts +0 -32
  153. package/lib/models/DocReaderWebclient/models/image-quality-check-type.d.ts +0 -50
  154. package/lib/models/DocReaderWebclient/models/image-quality-check.d.ts +0 -64
  155. package/lib/models/DocReaderWebclient/models/image-quality-result-all-of.d.ts +0 -25
  156. package/lib/models/DocReaderWebclient/models/image-quality-result.d.ts +0 -18
  157. package/lib/models/DocReaderWebclient/models/images-available-source.d.ts +0 -31
  158. package/lib/models/DocReaderWebclient/models/images-field-value.d.ts +0 -70
  159. package/lib/models/DocReaderWebclient/models/images-field.d.ts +0 -38
  160. package/lib/models/DocReaderWebclient/models/images-result-all-of.d.ts +0 -25
  161. package/lib/models/DocReaderWebclient/models/images-result.d.ts +0 -18
  162. package/lib/models/DocReaderWebclient/models/images.d.ts +0 -32
  163. package/lib/models/DocReaderWebclient/models/index.d.ts +0 -123
  164. package/lib/models/DocReaderWebclient/models/lcid.d.ts +0 -582
  165. package/lib/models/DocReaderWebclient/models/lexical-analysis-result-all-of.d.ts +0 -25
  166. package/lib/models/DocReaderWebclient/models/lexical-analysis-result.d.ts +0 -19
  167. package/lib/models/DocReaderWebclient/models/license-result-all-of.d.ts +0 -24
  168. package/lib/models/DocReaderWebclient/models/license-result.d.ts +0 -18
  169. package/lib/models/DocReaderWebclient/models/light.d.ts +0 -34
  170. package/lib/models/DocReaderWebclient/models/list-verified-fields.d.ts +0 -25
  171. package/lib/models/DocReaderWebclient/models/log-level.d.ts +0 -23
  172. package/lib/models/DocReaderWebclient/models/measure-system.d.ts +0 -26
  173. package/lib/models/DocReaderWebclient/models/mrzformat.d.ts +0 -24
  174. package/lib/models/DocReaderWebclient/models/ocrsecurity-text-result-all-of.d.ts +0 -81
  175. package/lib/models/DocReaderWebclient/models/ocrsecurity-text-result.d.ts +0 -18
  176. package/lib/models/DocReaderWebclient/models/one-candidate.d.ts +0 -74
  177. package/lib/models/DocReaderWebclient/models/original-symbol.d.ts +0 -37
  178. package/lib/models/DocReaderWebclient/models/parray-field.d.ts +0 -81
  179. package/lib/models/DocReaderWebclient/models/per-document-config.d.ts +0 -30
  180. package/lib/models/DocReaderWebclient/models/photo-ident-result-all-of.d.ts +0 -76
  181. package/lib/models/DocReaderWebclient/models/photo-ident-result.d.ts +0 -18
  182. package/lib/models/DocReaderWebclient/models/point-array.d.ts +0 -25
  183. package/lib/models/DocReaderWebclient/models/point.d.ts +0 -30
  184. package/lib/models/DocReaderWebclient/models/points-container.d.ts +0 -31
  185. package/lib/models/DocReaderWebclient/models/process-params.d.ts +0 -254
  186. package/lib/models/DocReaderWebclient/models/process-request-image.d.ts +0 -38
  187. package/lib/models/DocReaderWebclient/models/process-request.d.ts +0 -60
  188. package/lib/models/DocReaderWebclient/models/process-response.d.ts +0 -66
  189. package/lib/models/DocReaderWebclient/models/process-system-info.d.ts +0 -30
  190. package/lib/models/DocReaderWebclient/models/processing-status.d.ts +0 -30
  191. package/lib/models/DocReaderWebclient/models/raw-image-container-list.d.ts +0 -31
  192. package/lib/models/DocReaderWebclient/models/rectangle-coordinates.d.ts +0 -42
  193. package/lib/models/DocReaderWebclient/models/result-item.d.ts +0 -48
  194. package/lib/models/DocReaderWebclient/models/result.d.ts +0 -98
  195. package/lib/models/DocReaderWebclient/models/rfid-location.d.ts +0 -30
  196. package/lib/models/DocReaderWebclient/models/rfid-origin.d.ts +0 -42
  197. package/lib/models/DocReaderWebclient/models/scenario.d.ts +0 -36
  198. package/lib/models/DocReaderWebclient/models/security-feature-result-all-of.d.ts +0 -59
  199. package/lib/models/DocReaderWebclient/models/security-feature-result.d.ts +0 -18
  200. package/lib/models/DocReaderWebclient/models/security-feature-type.d.ts +0 -49
  201. package/lib/models/DocReaderWebclient/models/source-validity.d.ts +0 -32
  202. package/lib/models/DocReaderWebclient/models/source.d.ts +0 -23
  203. package/lib/models/DocReaderWebclient/models/status-result-all-of.d.ts +0 -25
  204. package/lib/models/DocReaderWebclient/models/status-result.d.ts +0 -18
  205. package/lib/models/DocReaderWebclient/models/status.d.ts +0 -63
  206. package/lib/models/DocReaderWebclient/models/string-recognition-result.d.ts +0 -25
  207. package/lib/models/DocReaderWebclient/models/symbol-candidate.d.ts +0 -30
  208. package/lib/models/DocReaderWebclient/models/symbol-recognition-result.d.ts +0 -32
  209. package/lib/models/DocReaderWebclient/models/text-available-source.d.ts +0 -38
  210. package/lib/models/DocReaderWebclient/models/text-data-result-all-of.d.ts +0 -25
  211. package/lib/models/DocReaderWebclient/models/text-data-result.d.ts +0 -19
  212. package/lib/models/DocReaderWebclient/models/text-field-type.d.ts +0 -2386
  213. package/lib/models/DocReaderWebclient/models/text-field-value.d.ts +0 -70
  214. package/lib/models/DocReaderWebclient/models/text-field.d.ts +0 -84
  215. package/lib/models/DocReaderWebclient/models/text-post-processing.d.ts +0 -22
  216. package/lib/models/DocReaderWebclient/models/text-result-all-of.d.ts +0 -25
  217. package/lib/models/DocReaderWebclient/models/text-result.d.ts +0 -18
  218. package/lib/models/DocReaderWebclient/models/text.d.ts +0 -51
  219. package/lib/models/DocReaderWebclient/models/transaction-info.d.ts +0 -42
  220. package/lib/models/DocReaderWebclient/models/verification-result.d.ts +0 -38
  221. package/lib/models/DocReaderWebclient/models/verified-field-map.d.ts +0 -63
  222. package/lib/models/DocReaderWebclient/models/visibility.d.ts +0 -23
  223. package/lib/models/ImageModel.d.ts +0 -7
  224. package/lib/services/DebugService.d.ts +0 -17
  225. package/lib/services/DocumentReaderProcessor.d.ts +0 -50
  226. package/lib/services/DocumentReaderService.d.ts +0 -57
  227. package/lib/services/EventEmitter.d.ts +0 -9
  228. package/lib/services/FaceLivenessService.d.ts +0 -62
  229. package/lib/services/FaceService.d.ts +0 -39
  230. package/lib/services/StreamRecorderService.d.ts +0 -24
  231. package/lib/types.d.ts +0 -361
  232. package/lib/utils.d.ts +0 -30
  233. package/lib/web-components/CameraSnapshot.d.ts +0 -14
  234. package/lib/web-components/DocumentReader.d.ts +0 -14
  235. package/lib/web-components/FaceDetection.d.ts +0 -11
  236. package/lib/web-components/FaceLiveness.d.ts +0 -17
  237. package/lib/web-components/FullScreenContainer.d.ts +0 -4
@@ -1,39 +0,0 @@
1
- import { ConfigLivenessParams, FaceLivenessResultType } from '../types';
2
- import CameraModel from '../models/CameraModel';
3
- declare type GetLivenessDetectionResultOptions = {
4
- transactionId: string;
5
- backendURL?: string;
6
- headers?: Record<string, string>;
7
- publicKey: string;
8
- };
9
- declare type DeviceMetadata = {
10
- platform: string;
11
- osVersion: string;
12
- sdkVersion: string;
13
- hostAppId: string;
14
- deviceModel: string;
15
- currentCameraId: string;
16
- cameraState: CameraModel[];
17
- };
18
- declare type InitializedFaceLivenessDataResult = {
19
- config: ConfigLivenessParams;
20
- metadata: {
21
- ctx: {
22
- userIp: string;
23
- };
24
- serverTime: string;
25
- };
26
- publicKey: string;
27
- schema: string;
28
- sessionId: string;
29
- transactionId: string;
30
- };
31
- declare function getLivenessDetectionResult(encryptedBody: Uint8Array, { transactionId, backendURL, headers, publicKey }: GetLivenessDetectionResultOptions): Promise<FaceLivenessResultType>;
32
- declare function getInitialisingData(deviceMetadata: DeviceMetadata, sessionId?: string, backendUrl?: string): Promise<InitializedFaceLivenessDataResult>;
33
- declare function sendVideoData(data: Uint8Array, transactionId: string, backendURL?: string, tag?: string): Promise<void>;
34
- declare const _default: {
35
- getInitialisingData: typeof getInitialisingData;
36
- getLivenessDetectionResult: typeof getLivenessDetectionResult;
37
- sendVideoData: typeof sendVideoData;
38
- };
39
- export default _default;
@@ -1,24 +0,0 @@
1
- import { VideoFinishStatus } from '../constants';
2
- declare class StreamRecorderService {
3
- private chunks;
4
- private recorder;
5
- private mimeType;
6
- private transactionId;
7
- private debug;
8
- private backendUrl;
9
- private finishStatus;
10
- constructor();
11
- init(stream: MediaStream): void;
12
- setParameters({ debug, backendUrl, transactionId, }: {
13
- debug: boolean | undefined;
14
- backendUrl: string | undefined;
15
- transactionId: string;
16
- }): void;
17
- setFinishStatus(status: VideoFinishStatus): void;
18
- stopRecord(): void;
19
- private errorHandle;
20
- private setChunk;
21
- private sendFile;
22
- }
23
- declare const _default: StreamRecorderService;
24
- export default _default;
package/lib/types.d.ts DELETED
@@ -1,361 +0,0 @@
1
- import { Response } from './models/DocReaderWebclient/ext';
2
- import dictionaries from './i18n/dictionaries/_dictionaries';
3
- import { DocumentEventActions, FaceEventActions, InternalScenarios, ResponseCode, StreamStatus, ErrorTypes, CameraFacingMode } from './constants';
4
- import CameraModel from './models/CameraModel';
5
- export declare type DocumentTranslations = {
6
- scanIDInBrowser?: string;
7
- useYourDeviceCamera?: string;
8
- success?: string;
9
- processingFinished?: string;
10
- largeFile?: string;
11
- selectSmallerFile?: string;
12
- versionNotSupported?: string;
13
- updateBrowser?: string;
14
- licenseError?: string;
15
- licenseExpired?: string;
16
- fileCorrupt?: string;
17
- selectAnotherFile?: string;
18
- timeout?: string;
19
- error?: string;
20
- somethingWentWrong?: string;
21
- tryAgain?: string;
22
- fromCamera?: string;
23
- fromGallery?: string;
24
- processing?: string;
25
- preparingService?: string;
26
- detectingDocument?: string;
27
- placeDocumentIntoFrame?: string;
28
- positionDocumentCenter?: string;
29
- noFocus?: string;
30
- moveCloser?: string;
31
- glaresOnDocument?: string;
32
- holdDocumentStraight?: string;
33
- documentProcessing?: string;
34
- flipDocument?: string;
35
- cameraUnavailable?: string;
36
- preparingCamera?: string;
37
- noCameraAvailable?: string;
38
- incorrectCameraId?: string;
39
- allowAccessToCamera?: string;
40
- cameraConnection?: string;
41
- checkCameraId?: string;
42
- verified?: string;
43
- photoCapturedSuccessfully?: string;
44
- uploadPhoto?: string;
45
- useCameraOrGallery?: string;
46
- };
47
- export declare type Locales = keyof typeof dictionaries | string;
48
- export declare type DocumentDictionaries = Partial<Record<Locales, DocumentTranslations>>;
49
- export declare type XY = {
50
- x: number;
51
- y: number;
52
- };
53
- export declare type Oval = {
54
- axisX: number;
55
- axisY: number;
56
- center: XY;
57
- };
58
- export declare type FrameObject = {
59
- left: number;
60
- top: number;
61
- width: number;
62
- height: number;
63
- };
64
- export declare type WidthAndHeight = {
65
- width: number;
66
- height: number;
67
- };
68
- export declare type VideoParamsType = {
69
- videoElement: HTMLVideoElement | null;
70
- videoParams: WidthAndHeight;
71
- videoContainerParams: WidthAndHeight;
72
- };
73
- export declare type FacingModeType = keyof typeof CameraFacingMode;
74
- export declare type VideoStatusParamsType = {
75
- videoStatus: StreamStatus;
76
- camera: CameraTypes;
77
- };
78
- export declare type CaptureFrameType = {
79
- imageData: Array<ImageData>;
80
- raw: string;
81
- mimeType: string;
82
- };
83
- export declare type CaptureType = Array<Omit<CaptureFrameType, 'imageData'>>;
84
- export declare type CodeType = {
85
- code: number;
86
- images?: null;
87
- };
88
- export declare type UserAgentType = {
89
- appCodeName: string;
90
- appName: string;
91
- appVersion: string;
92
- language: string;
93
- languages: readonly string[];
94
- platform: string;
95
- product: string;
96
- productSub: string;
97
- userAgent: string;
98
- vendor: string;
99
- vendorSub: string;
100
- };
101
- export declare type ConfigLivenessParams = {
102
- ballSmoothingWeight: number;
103
- circleRadiusToMinDim: number;
104
- compressDepthMap: boolean;
105
- debugOutput: boolean | undefined;
106
- depthMapBits: number;
107
- distNormalMaxDeviation: number;
108
- dontShowReadinessTimeoutMs: number;
109
- faceBestHeight: number;
110
- fitFaceMultNear: number;
111
- frameHeight: number;
112
- frameWidth: number;
113
- holdStillNearTimeoutMs: number;
114
- holdStillNormalTimeoutMs: number;
115
- maxPitchNear: number;
116
- maxPitchNormal: number;
117
- maxRollNormal: number;
118
- maxYawNear: number;
119
- maxYawNormal: number;
120
- minReadinessNear: number;
121
- minReadinessNormal: number;
122
- moveAwayMultNear: number;
123
- moveCloserMultNear: number;
124
- nearTimeoutMs: number;
125
- normalTimeoutMs: number;
126
- numChannels: number;
127
- numSectors: number;
128
- pin: number[];
129
- resizedFrameHeight: number;
130
- resizedFrameWidth: number;
131
- scenario: number;
132
- showGraySectors: boolean;
133
- showHintDurationMs: number;
134
- showHintTimeoutMs: number;
135
- sizeNormalMaxDeviation: number;
136
- targetSectorRelChange: number;
137
- };
138
- export declare type FaceLivenessResultType = {
139
- code: number;
140
- metadata: {
141
- [key: string]: any;
142
- };
143
- sessionId: string;
144
- status: number;
145
- transactionId: string;
146
- };
147
- export declare type FaceLivenessResponseType = FaceLivenessResultType & {
148
- images: Array<string>;
149
- };
150
- export declare type FaceDetectionResponseType = {
151
- capture: Array<string>;
152
- };
153
- export declare type DocumentReaderResponseType = Response;
154
- export declare type CameraSnapshotResponseType = CaptureType;
155
- export declare type FaceDebugOutput = {
156
- cft: boolean;
157
- face: {
158
- height: number;
159
- landmarks: Array<XY>;
160
- pitch: number;
161
- roll: number;
162
- width: number;
163
- x: number;
164
- y: number;
165
- yaw: number;
166
- };
167
- target: Oval;
168
- };
169
- export declare type ScenarioParamsType = {
170
- UVTorch?: number;
171
- barcodeExt?: number;
172
- caption: string;
173
- desc: string;
174
- faceExt?: number;
175
- frameKWHDoublePageSpreadLandscape: string;
176
- frameKWHDoublePageSpreadPortrait: string;
177
- frameKWHLandscape: string;
178
- frameKWHPortrait: string;
179
- frameOrientation: number;
180
- manualCrop?: number;
181
- multiPageOff?: number;
182
- name: string;
183
- seriesProcessMode?: number;
184
- };
185
- export declare type InitDataType = {
186
- scenario: Array<ScenarioParamsType>;
187
- };
188
- export declare type ImageInputParamType = {
189
- frameBottom: number;
190
- frameLeft: number;
191
- frameRight: number;
192
- frameTop: number;
193
- light: number;
194
- resolutionType: number;
195
- };
196
- export declare type ImageQualityCheck = {
197
- featureType: number;
198
- mean: number;
199
- probability: number;
200
- result: number;
201
- std_dev: number;
202
- type: number;
203
- };
204
- export declare type SupportedBrowserVersions = {
205
- Chrome: number;
206
- Firefox: number;
207
- Safari: number;
208
- Opera?: number;
209
- Edge?: number;
210
- Chromium?: number;
211
- IE?: number;
212
- 'Internet Explorer'?: number;
213
- 'Mobile Safari'?: number;
214
- 'Samsung Browser'?: number;
215
- };
216
- export declare type SupportedBrowserVersionsByOsType = {
217
- iOS: SupportedBrowserVersions;
218
- Android: SupportedBrowserVersions;
219
- desktop: SupportedBrowserVersions;
220
- };
221
- declare type CustomEventDataType<R> = {
222
- status: ResponseCode;
223
- reason?: keyof typeof ErrorTypes;
224
- response?: R;
225
- };
226
- interface DetailEvent<A, R> {
227
- manual: boolean;
228
- action: A;
229
- data: CustomEventDataType<R> | null;
230
- }
231
- export declare type FaceLivenessDetailType = DetailEvent<FaceEventActions, FaceLivenessResponseType>;
232
- export declare type FaceCaptureDetailType = DetailEvent<FaceEventActions, FaceDetectionResponseType>;
233
- export declare type DocumentReaderDetailType = DetailEvent<DocumentEventActions, DocumentReaderResponseType>;
234
- export declare type CameraSnapshotDetailType = DetailEvent<DocumentEventActions, CameraSnapshotResponseType>;
235
- export declare type DocumentReaderImage = {
236
- data: string;
237
- light: number;
238
- pageIdx: number;
239
- };
240
- export declare type DocumentReaderProcessParam = {
241
- returnPackageForReprocess?: boolean;
242
- returnUncroppedImage?: boolean;
243
- scenario?: keyof typeof InternalScenarios;
244
- multipageProcessing?: boolean;
245
- timeout?: number;
246
- timeoutFromFirstDetect?: number;
247
- timeoutFromFirstDocType?: number;
248
- resultTypeOutput?: Array<string>;
249
- customParams?: Record<string, any>;
250
- imageOutputMaxHeight?: number;
251
- imageOutputMaxWidth?: number;
252
- doublePageSpread?: boolean;
253
- generateDoublePageSpreadImage?: boolean;
254
- fieldTypesFilter?: Array<number>;
255
- dateFormat?: string;
256
- measureSystem?: number;
257
- imageDpiOutMax?: number;
258
- alreadyCropped?: boolean;
259
- fastDocDetect?: boolean;
260
- updateOCRValidityByGlare?: boolean;
261
- returnCroppedBarcode?: boolean;
262
- respectImageQuality?: boolean;
263
- forceDocFormat?: number;
264
- noGraphics?: boolean;
265
- documentAreaMin?: number;
266
- depersonalizeLog?: boolean;
267
- multiDocOnImage?: boolean;
268
- shiftExpiryDate?: number;
269
- minimalHolderAge?: number;
270
- mrzFormatsFilter?: Array<string>;
271
- forceReadMrzBeforeLocate?: boolean;
272
- parseBarcodes?: boolean;
273
- splitNames?: boolean;
274
- imageQa?: {
275
- expectedPass?: Array<string>;
276
- dpiThreshold?: number;
277
- glaresCheck?: boolean;
278
- glaresCheckParams?: {
279
- imgMarginPart?: number;
280
- maxGlaringPart?: number;
281
- };
282
- };
283
- };
284
- export declare type ProcessingRequest = {
285
- processParam: DocumentReaderProcessParam;
286
- imagesList?: Array<DocumentReaderImage>;
287
- imageInputParam?: ImageInputParamType;
288
- };
289
- export declare type ImageProcessingRequest = {
290
- processParam: Pick<DocumentReaderProcessParam, 'returnPackageForReprocess' | 'returnUncroppedImage' | 'scenario'>;
291
- };
292
- export declare type DevicesType = {
293
- videoDevices: Array<MediaDeviceInfo>;
294
- isCameraAllowed: boolean;
295
- };
296
- export interface StreamDataType {
297
- status: StreamStatus;
298
- stream: MediaStream | null;
299
- camera: CameraTypes;
300
- }
301
- export declare type StreamParams = {
302
- cameraMode: FacingModeType;
303
- preferredCameraId: string;
304
- resolution: WidthAndHeight;
305
- };
306
- export declare type CameraTypes = {
307
- selectedCamera: CameraModel;
308
- frontCameras: Array<CameraModel>;
309
- backCameras: Array<CameraModel>;
310
- };
311
- export declare type CurrentPage = {
312
- data: Response | null;
313
- startNextPage: () => Promise<void>;
314
- finishRecognition: () => void;
315
- };
316
- declare global {
317
- interface HTMLElementEventMap {
318
- 'face-liveness': CustomEvent<FaceLivenessDetailType>;
319
- 'face-capture': CustomEvent<FaceCaptureDetailType>;
320
- 'document-reader': CustomEvent<DocumentReaderDetailType>;
321
- 'camera-snapshot': CustomEvent<CameraSnapshotDetailType>;
322
- }
323
- }
324
- interface IBaseComponent {
325
- locale?: Locales;
326
- copyright?: boolean;
327
- 'camera-id'?: string;
328
- 'change-camera'?: boolean;
329
- 'start-screen'?: boolean;
330
- }
331
- interface IDocumentBaseComponent extends IBaseComponent {
332
- 'start-screen'?: boolean;
333
- multiple?: boolean;
334
- }
335
- export interface IFaceLiveness extends IBaseComponent {
336
- url?: string;
337
- debug?: boolean;
338
- }
339
- export interface IDocumentReader extends IDocumentBaseComponent {
340
- 'internal-scenario'?: keyof typeof InternalScenarios;
341
- 'multipage-processing'?: boolean;
342
- license?: string;
343
- }
344
- export interface IFaceDetection extends IBaseComponent {
345
- debug?: boolean;
346
- }
347
- export declare type ICameraSnapshot = IDocumentBaseComponent;
348
- export declare type FacePositionLivenessDetection = {
349
- width: number;
350
- height: number;
351
- x: number;
352
- y: number;
353
- };
354
- export { default as DocumentReaderService } from './services/DocumentReaderService';
355
- export { default as DocumentReaderProcessor } from './services/DocumentReaderProcessor';
356
- export { default as DocumentReaderCaptureWebComponent } from './web-components/CameraSnapshot';
357
- export { default as DocumentReaderWebComponent } from './web-components/DocumentReader';
358
- export { default as FaceDetectionWebComponent } from './web-components/FaceDetection';
359
- export { default as FaceLivenessWebComponent } from './web-components/FaceLiveness';
360
- export { default as FullScreenContainer } from './web-components/FullScreenContainer';
361
- export { defineComponents } from './index-document';
package/lib/utils.d.ts DELETED
@@ -1,30 +0,0 @@
1
- import { DocumentCaptureStatus, ImageOutputType, ObjectFit } from './constants';
2
- import CameraModel from './models/CameraModel';
3
- import { CameraTypes, CaptureFrameType, DevicesType, FaceDebugOutput, FacingModeType, FrameObject, StreamDataType, VideoParamsType, WidthAndHeight } from './types';
4
- import { Response } from './models/DocReaderWebclient/ext';
5
- export declare function uint8ArrayToBase64(arr: Uint8ClampedArray, videoFrame: {
6
- width: number;
7
- height: number;
8
- }): string;
9
- export declare function downloadBase64Image(base64: string, name: string | number): void;
10
- export declare function saveByteArray(data: Uint8ClampedArray, name: string | number): void;
11
- export declare const convertBooleanAttributeParam: (attributeValue: string | null) => boolean | undefined;
12
- export declare const convertNumberAttributeParam: (attributeValue: string | null) => number | undefined;
13
- export declare function compose(...argsA: any): any;
14
- export declare function recalculateFrameSizes(videoWidth: number, videoHeight: number, containerWidth: number, containerHeight: number, frameWidth: number, frameHeight: number, frameX: number, frameY: number, objectFit: ObjectFit): FrameObject;
15
- export declare function getByteCount(b64: Array<string> | string): number;
16
- export declare function base64ToArrayBuffer(base64: string): ArrayBuffer;
17
- export declare function getUintImages(files: FileList | Array<Blob>, resizeValue: number, maxBrowserSupportedResolution: number): Promise<Array<Promise<ImageData>>>;
18
- export declare function generateEvent<T>(type: string, detail: T): CustomEvent;
19
- export declare const getAvailableCameras: (cameraPool: CameraModel[], preferredCameraId?: string) => CameraModel | undefined;
20
- export declare function calculateFrame(videoSize: WidthAndHeight, isLandscape: boolean, ratio: number, frameOffset: number): FrameObject;
21
- export declare function getVideosDevices(): Promise<DevicesType>;
22
- export declare function isBackCameraLabel(label: string, keywords: Array<string>): boolean;
23
- export declare function getCameras(preferredCameraType: FacingModeType, mediaDevices: DevicesType, preferredCameraId?: string): Promise<CameraTypes>;
24
- export declare const closeStreamTracks: (stream: MediaStream) => void;
25
- export declare function getVideo(resolution: WidthAndHeight, cameraTypes: CameraTypes, preferredCameraId?: string): Promise<StreamDataType>;
26
- export declare function getImageFromVideo(videoElement: HTMLVideoElement, outputType: ImageOutputType): CaptureFrameType;
27
- export declare function getNextCamera(camerasInfo: CameraTypes): string;
28
- export declare function drawFaceDebugOutput(canvas: HTMLCanvasElement, videoElementParams: VideoParamsType, debugOutput: FaceDebugOutput): void;
29
- export declare function mergeDeep<T, S, R>(target: T, source: S): R | T;
30
- export declare function getStatus(response: Response, pageIdx: number, multipageProcessing?: boolean): DocumentCaptureStatus.FINDING | DocumentCaptureStatus.SUCCESS | DocumentCaptureStatus.RESOLUTION | DocumentCaptureStatus.GLARE | DocumentCaptureStatus.FOCUS | DocumentCaptureStatus.HOLD | DocumentCaptureStatus.START_NEXT_PAGE | DocumentCaptureStatus.TIMEOUT;
@@ -1,14 +0,0 @@
1
- import { DocumentDictionaries } from '../types';
2
- export default class DocumentReaderCaptureWebComponent extends HTMLElement {
3
- private _root;
4
- private _mounted;
5
- private _translations;
6
- constructor();
7
- static get observedAttributes(): Array<string>;
8
- attributeChangedCallback(name: string): void;
9
- connectedCallback(): void;
10
- set translations(dictionary: DocumentDictionaries | null);
11
- get translations(): DocumentDictionaries | null;
12
- render(): void;
13
- disconnectedCallback(): void;
14
- }
@@ -1,14 +0,0 @@
1
- import { DocumentDictionaries } from '../types';
2
- export default class DocumentReaderWebComponent extends HTMLElement {
3
- private _root;
4
- private _mounted;
5
- private _translations;
6
- constructor();
7
- static get observedAttributes(): Array<string>;
8
- attributeChangedCallback(name: string): void;
9
- connectedCallback(): void;
10
- set translations(dictionary: DocumentDictionaries | null);
11
- get translations(): DocumentDictionaries | null;
12
- render(): void;
13
- disconnectedCallback(): void;
14
- }
@@ -1,11 +0,0 @@
1
- export default class FaceDetectionWebComponent extends HTMLElement {
2
- private _root;
3
- private _mounted;
4
- constructor();
5
- static get observedAttributes(): Array<string>;
6
- get version(): string;
7
- attributeChangedCallback(name: string): void;
8
- connectedCallback(): void;
9
- render(): void;
10
- disconnectedCallback(): void;
11
- }
@@ -1,17 +0,0 @@
1
- export default class FaceLivenessWebComponent extends HTMLElement {
2
- private _root;
3
- private _mounted;
4
- private _headers;
5
- private _sessionIdValue;
6
- constructor();
7
- static get observedAttributes(): Array<string>;
8
- attributeChangedCallback(name: string): void;
9
- connectedCallback(): void;
10
- set headers(headersData: Record<string, string>);
11
- get headers(): Record<string, string>;
12
- get version(): string;
13
- set sessionId(id: string);
14
- get sessionId(): string;
15
- render(): void;
16
- disconnectedCallback(): void;
17
- }
@@ -1,4 +0,0 @@
1
- export default class FullScreenContainer extends HTMLElement {
2
- private _root;
3
- constructor();
4
- }