@idmission/websdk-core 0.1.0-rc.1

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 (416) hide show
  1. package/README.md +66 -0
  2. package/dist/attestation/attestationState.d.ts +24 -0
  3. package/dist/attestation/attestationState.d.ts.map +1 -0
  4. package/dist/attestation/attestationState.js +57 -0
  5. package/dist/attestation/clientAttestation.d.ts +40 -0
  6. package/dist/attestation/clientAttestation.d.ts.map +1 -0
  7. package/dist/attestation/clientAttestation.js +19 -0
  8. package/dist/attestation/collectClientAttestation.d.ts +10 -0
  9. package/dist/attestation/collectClientAttestation.d.ts.map +1 -0
  10. package/dist/attestation/collectClientAttestation.js +18 -0
  11. package/dist/attestation/index.d.ts +5 -0
  12. package/dist/attestation/index.d.ts.map +1 -0
  13. package/dist/attestation/index.js +4 -0
  14. package/dist/attestation/nativeAttestationBridge.d.ts +3 -0
  15. package/dist/attestation/nativeAttestationBridge.d.ts.map +1 -0
  16. package/dist/attestation/nativeAttestationBridge.js +38 -0
  17. package/dist/barcode/AAMVAParser.d.ts +77 -0
  18. package/dist/barcode/AAMVAParser.d.ts.map +1 -0
  19. package/dist/barcode/AAMVAParser.js +422 -0
  20. package/dist/barcode/NativeBarcodeDecoder.d.ts +157 -0
  21. package/dist/barcode/NativeBarcodeDecoder.d.ts.map +1 -0
  22. package/dist/barcode/NativeBarcodeDecoder.js +832 -0
  23. package/dist/barcode/Parse.d.ts +6 -0
  24. package/dist/barcode/Parse.d.ts.map +1 -0
  25. package/dist/barcode/Parse.js +148 -0
  26. package/dist/barcode/decodeSummary.d.ts +45 -0
  27. package/dist/barcode/decodeSummary.d.ts.map +1 -0
  28. package/dist/barcode/decodeSummary.js +23 -0
  29. package/dist/barcode/index.d.ts +5 -0
  30. package/dist/barcode/index.d.ts.map +1 -0
  31. package/dist/barcode/index.js +4 -0
  32. package/dist/camera/Camera.d.ts +37 -0
  33. package/dist/camera/Camera.d.ts.map +1 -0
  34. package/dist/camera/Camera.js +453 -0
  35. package/dist/camera/acquireCamera.d.ts +29 -0
  36. package/dist/camera/acquireCamera.d.ts.map +1 -0
  37. package/dist/camera/acquireCamera.js +224 -0
  38. package/dist/camera/cameraSignals.d.ts +23 -0
  39. package/dist/camera/cameraSignals.d.ts.map +1 -0
  40. package/dist/camera/cameraSignals.js +32 -0
  41. package/dist/camera/getUserMediaIntegrity.d.ts +72 -0
  42. package/dist/camera/getUserMediaIntegrity.d.ts.map +1 -0
  43. package/dist/camera/getUserMediaIntegrity.js +256 -0
  44. package/dist/camera/index.d.ts +6 -0
  45. package/dist/camera/index.d.ts.map +1 -0
  46. package/dist/camera/index.js +5 -0
  47. package/dist/camera/isVirtualCamera.d.ts +10 -0
  48. package/dist/camera/isVirtualCamera.d.ts.map +1 -0
  49. package/dist/camera/isVirtualCamera.js +11 -0
  50. package/dist/client/IdmissionClient.d.ts +151 -0
  51. package/dist/client/IdmissionClient.d.ts.map +1 -0
  52. package/dist/client/IdmissionClient.js +638 -0
  53. package/dist/client/additionalDocument.d.ts +14 -0
  54. package/dist/client/additionalDocument.d.ts.map +1 -0
  55. package/dist/client/additionalDocument.js +24 -0
  56. package/dist/client/artifacts.d.ts +146 -0
  57. package/dist/client/artifacts.d.ts.map +1 -0
  58. package/dist/client/artifacts.js +1 -0
  59. package/dist/client/blobToB64.d.ts +2 -0
  60. package/dist/client/blobToB64.d.ts.map +1 -0
  61. package/dist/client/blobToB64.js +17 -0
  62. package/dist/client/endpoints.d.ts +7 -0
  63. package/dist/client/endpoints.d.ts.map +1 -0
  64. package/dist/client/endpoints.js +59 -0
  65. package/dist/client/errors.d.ts +20 -0
  66. package/dist/client/errors.d.ts.map +1 -0
  67. package/dist/client/errors.js +45 -0
  68. package/dist/client/index.d.ts +23 -0
  69. package/dist/client/index.d.ts.map +1 -0
  70. package/dist/client/index.js +38 -0
  71. package/dist/client/payload.d.ts +36 -0
  72. package/dist/client/payload.d.ts.map +1 -0
  73. package/dist/client/payload.js +397 -0
  74. package/dist/client/sessionMachine.d.ts +26 -0
  75. package/dist/client/sessionMachine.d.ts.map +1 -0
  76. package/dist/client/sessionMachine.js +23 -0
  77. package/dist/client/submissionMetadata.d.ts +31 -0
  78. package/dist/client/submissionMetadata.d.ts.map +1 -0
  79. package/dist/client/submissionMetadata.js +90 -0
  80. package/dist/client/timings.d.ts +49 -0
  81. package/dist/client/timings.d.ts.map +1 -0
  82. package/dist/client/timings.js +32 -0
  83. package/dist/client/types.d.ts +305 -0
  84. package/dist/client/types.d.ts.map +1 -0
  85. package/dist/client/types.js +18 -0
  86. package/dist/client/upload.d.ts +60 -0
  87. package/dist/client/upload.d.ts.map +1 -0
  88. package/dist/client/upload.js +313 -0
  89. package/dist/client/uploadedDocument.d.ts +7 -0
  90. package/dist/client/uploadedDocument.d.ts.map +1 -0
  91. package/dist/client/uploadedDocument.js +4 -0
  92. package/dist/client/urls.d.ts +30 -0
  93. package/dist/client/urls.d.ts.map +1 -0
  94. package/dist/client/urls.js +73 -0
  95. package/dist/client/validateSession.d.ts +7 -0
  96. package/dist/client/validateSession.d.ts.map +1 -0
  97. package/dist/client/validateSession.js +63 -0
  98. package/dist/config/cdn.d.ts +2 -0
  99. package/dist/config/cdn.d.ts.map +1 -0
  100. package/dist/config/cdn.js +1 -0
  101. package/dist/diagnostics/buffer.d.ts +8 -0
  102. package/dist/diagnostics/buffer.d.ts.map +1 -0
  103. package/dist/diagnostics/buffer.js +25 -0
  104. package/dist/diagnostics/envCapability.d.ts +3 -0
  105. package/dist/diagnostics/envCapability.d.ts.map +1 -0
  106. package/dist/diagnostics/envCapability.js +40 -0
  107. package/dist/diagnostics/floodControl.d.ts +6 -0
  108. package/dist/diagnostics/floodControl.d.ts.map +1 -0
  109. package/dist/diagnostics/floodControl.js +29 -0
  110. package/dist/diagnostics/index.d.ts +8 -0
  111. package/dist/diagnostics/index.d.ts.map +1 -0
  112. package/dist/diagnostics/index.js +17 -0
  113. package/dist/diagnostics/install.d.ts +20 -0
  114. package/dist/diagnostics/install.d.ts.map +1 -0
  115. package/dist/diagnostics/install.js +159 -0
  116. package/dist/diagnostics/redaction.d.ts +7 -0
  117. package/dist/diagnostics/redaction.d.ts.map +1 -0
  118. package/dist/diagnostics/redaction.js +73 -0
  119. package/dist/diagnostics/transport.d.ts +15 -0
  120. package/dist/diagnostics/transport.d.ts.map +1 -0
  121. package/dist/diagnostics/transport.js +35 -0
  122. package/dist/diagnostics/types.d.ts +59 -0
  123. package/dist/diagnostics/types.d.ts.map +1 -0
  124. package/dist/diagnostics/types.js +1 -0
  125. package/dist/documentCapture/controller.d.ts +35 -0
  126. package/dist/documentCapture/controller.d.ts.map +1 -0
  127. package/dist/documentCapture/controller.js +254 -0
  128. package/dist/documentCapture/index.d.ts +4 -0
  129. package/dist/documentCapture/index.d.ts.map +1 -0
  130. package/dist/documentCapture/index.js +8 -0
  131. package/dist/documentCapture/reducer.d.ts +31 -0
  132. package/dist/documentCapture/reducer.d.ts.map +1 -0
  133. package/dist/documentCapture/reducer.js +87 -0
  134. package/dist/documentCapture/state.d.ts +49 -0
  135. package/dist/documentCapture/state.d.ts.map +1 -0
  136. package/dist/documentCapture/state.js +36 -0
  137. package/dist/idCapture/controller.d.ts +228 -0
  138. package/dist/idCapture/controller.d.ts.map +1 -0
  139. package/dist/idCapture/controller.js +1453 -0
  140. package/dist/idCapture/errors.d.ts +36 -0
  141. package/dist/idCapture/errors.d.ts.map +1 -0
  142. package/dist/idCapture/errors.js +18 -0
  143. package/dist/idCapture/guidance.d.ts +80 -0
  144. package/dist/idCapture/guidance.d.ts.map +1 -0
  145. package/dist/idCapture/guidance.js +143 -0
  146. package/dist/idCapture/index.d.ts +22 -0
  147. package/dist/idCapture/index.d.ts.map +1 -0
  148. package/dist/idCapture/index.js +46 -0
  149. package/dist/idCapture/phase.d.ts +10 -0
  150. package/dist/idCapture/phase.d.ts.map +1 -0
  151. package/dist/idCapture/phase.js +28 -0
  152. package/dist/idCapture/pipeline.d.ts +176 -0
  153. package/dist/idCapture/pipeline.d.ts.map +1 -0
  154. package/dist/idCapture/pipeline.js +1028 -0
  155. package/dist/idCapture/reducer.d.ts +3 -0
  156. package/dist/idCapture/reducer.d.ts.map +1 -0
  157. package/dist/idCapture/reducer.js +661 -0
  158. package/dist/idCapture/requirements.d.ts +10 -0
  159. package/dist/idCapture/requirements.d.ts.map +1 -0
  160. package/dist/idCapture/requirements.js +43 -0
  161. package/dist/idCapture/stabilizer.d.ts +2 -0
  162. package/dist/idCapture/stabilizer.d.ts.map +1 -0
  163. package/dist/idCapture/stabilizer.js +4 -0
  164. package/dist/idCapture/state.d.ts +426 -0
  165. package/dist/idCapture/state.d.ts.map +1 -0
  166. package/dist/idCapture/state.js +91 -0
  167. package/dist/idCapture/submit.d.ts +33 -0
  168. package/dist/idCapture/submit.d.ts.map +1 -0
  169. package/dist/idCapture/submit.js +105 -0
  170. package/dist/idCapture/types.d.ts +20 -0
  171. package/dist/idCapture/types.d.ts.map +1 -0
  172. package/dist/idCapture/types.js +12 -0
  173. package/dist/index.d.ts +6 -0
  174. package/dist/index.d.ts.map +1 -0
  175. package/dist/index.js +5 -0
  176. package/dist/liveness/challengeGeometry.d.ts +66 -0
  177. package/dist/liveness/challengeGeometry.d.ts.map +1 -0
  178. package/dist/liveness/challengeGeometry.js +226 -0
  179. package/dist/liveness/challengeSequence.d.ts +49 -0
  180. package/dist/liveness/challengeSequence.d.ts.map +1 -0
  181. package/dist/liveness/challengeSequence.js +71 -0
  182. package/dist/liveness/index.d.ts +4 -0
  183. package/dist/liveness/index.d.ts.map +1 -0
  184. package/dist/liveness/index.js +3 -0
  185. package/dist/liveness/livenessResult.d.ts +11 -0
  186. package/dist/liveness/livenessResult.d.ts.map +1 -0
  187. package/dist/liveness/livenessResult.js +16 -0
  188. package/dist/models/BarcodeReadability.d.ts +36 -0
  189. package/dist/models/BarcodeReadability.d.ts.map +1 -0
  190. package/dist/models/BarcodeReadability.js +71 -0
  191. package/dist/models/CapabilityProbing.d.ts +25 -0
  192. package/dist/models/CapabilityProbing.d.ts.map +1 -0
  193. package/dist/models/CapabilityProbing.js +172 -0
  194. package/dist/models/DocumentDetection.d.ts +96 -0
  195. package/dist/models/DocumentDetection.d.ts.map +1 -0
  196. package/dist/models/DocumentDetection.js +257 -0
  197. package/dist/models/FaceDetection.d.ts +21 -0
  198. package/dist/models/FaceDetection.d.ts.map +1 -0
  199. package/dist/models/FaceDetection.js +4 -0
  200. package/dist/models/Focus.d.ts +36 -0
  201. package/dist/models/Focus.d.ts.map +1 -0
  202. package/dist/models/Focus.js +69 -0
  203. package/dist/models/FrameLoop.d.ts +13 -0
  204. package/dist/models/FrameLoop.d.ts.map +1 -0
  205. package/dist/models/FrameLoop.js +56 -0
  206. package/dist/models/VisionRuntime.d.ts +18 -0
  207. package/dist/models/VisionRuntime.d.ts.map +1 -0
  208. package/dist/models/VisionRuntime.js +158 -0
  209. package/dist/models/defaults/BarcodeReadability.d.ts +3 -0
  210. package/dist/models/defaults/BarcodeReadability.d.ts.map +1 -0
  211. package/dist/models/defaults/BarcodeReadability.js +3 -0
  212. package/dist/models/defaults/BarcodeReadabilityLiteRT.d.ts +3 -0
  213. package/dist/models/defaults/BarcodeReadabilityLiteRT.d.ts.map +1 -0
  214. package/dist/models/defaults/BarcodeReadabilityLiteRT.js +3 -0
  215. package/dist/models/defaults/DocumentDetector.d.ts +3 -0
  216. package/dist/models/defaults/DocumentDetector.d.ts.map +1 -0
  217. package/dist/models/defaults/DocumentDetector.js +3 -0
  218. package/dist/models/defaults/DocumentDetectorLiteRT.d.ts +3 -0
  219. package/dist/models/defaults/DocumentDetectorLiteRT.d.ts.map +1 -0
  220. package/dist/models/defaults/DocumentDetectorLiteRT.js +3 -0
  221. package/dist/models/defaults/FaceDetector.d.ts +3 -0
  222. package/dist/models/defaults/FaceDetector.d.ts.map +1 -0
  223. package/dist/models/defaults/FaceDetector.js +3 -0
  224. package/dist/models/defaults/FaceLandmarker.d.ts +3 -0
  225. package/dist/models/defaults/FaceLandmarker.d.ts.map +1 -0
  226. package/dist/models/defaults/FaceLandmarker.js +8 -0
  227. package/dist/models/defaults/FaceLandmarkerLiteRT.d.ts +3 -0
  228. package/dist/models/defaults/FaceLandmarkerLiteRT.d.ts.map +1 -0
  229. package/dist/models/defaults/FaceLandmarkerLiteRT.js +3 -0
  230. package/dist/models/defaults/Focus.d.ts +3 -0
  231. package/dist/models/defaults/Focus.d.ts.map +1 -0
  232. package/dist/models/defaults/Focus.js +3 -0
  233. package/dist/models/defaults/FocusLiteRT.d.ts +3 -0
  234. package/dist/models/defaults/FocusLiteRT.d.ts.map +1 -0
  235. package/dist/models/defaults/FocusLiteRT.js +3 -0
  236. package/dist/models/defaults/index.d.ts +31 -0
  237. package/dist/models/defaults/index.d.ts.map +1 -0
  238. package/dist/models/defaults/index.js +38 -0
  239. package/dist/models/helpers.d.ts +25 -0
  240. package/dist/models/helpers.d.ts.map +1 -0
  241. package/dist/models/helpers.js +98 -0
  242. package/dist/models/index.d.ts +15 -0
  243. package/dist/models/index.d.ts.map +1 -0
  244. package/dist/models/index.js +14 -0
  245. package/dist/models/modelLifecycle.d.ts +26 -0
  246. package/dist/models/modelLifecycle.d.ts.map +1 -0
  247. package/dist/models/modelLifecycle.js +137 -0
  248. package/dist/models/occlusion.d.ts +20 -0
  249. package/dist/models/occlusion.d.ts.map +1 -0
  250. package/dist/models/occlusion.js +109 -0
  251. package/dist/models/passportBooklet.d.ts +34 -0
  252. package/dist/models/passportBooklet.d.ts.map +1 -0
  253. package/dist/models/passportBooklet.js +152 -0
  254. package/dist/models/preloadModels.d.ts +42 -0
  255. package/dist/models/preloadModels.d.ts.map +1 -0
  256. package/dist/models/preloadModels.js +204 -0
  257. package/dist/models/providers/litert/BarcodeReadability.d.ts +11 -0
  258. package/dist/models/providers/litert/BarcodeReadability.d.ts.map +1 -0
  259. package/dist/models/providers/litert/BarcodeReadability.js +135 -0
  260. package/dist/models/providers/litert/CapabilityProbe.d.ts +3 -0
  261. package/dist/models/providers/litert/CapabilityProbe.d.ts.map +1 -0
  262. package/dist/models/providers/litert/CapabilityProbe.js +44 -0
  263. package/dist/models/providers/litert/DocumentDetection.d.ts +18 -0
  264. package/dist/models/providers/litert/DocumentDetection.d.ts.map +1 -0
  265. package/dist/models/providers/litert/DocumentDetection.js +194 -0
  266. package/dist/models/providers/litert/FaceDetection.d.ts +11 -0
  267. package/dist/models/providers/litert/FaceDetection.d.ts.map +1 -0
  268. package/dist/models/providers/litert/FaceDetection.js +204 -0
  269. package/dist/models/providers/litert/FaceLandmarker.d.ts +11 -0
  270. package/dist/models/providers/litert/FaceLandmarker.d.ts.map +1 -0
  271. package/dist/models/providers/litert/FaceLandmarker.js +199 -0
  272. package/dist/models/providers/litert/Focus.d.ts +11 -0
  273. package/dist/models/providers/litert/Focus.d.ts.map +1 -0
  274. package/dist/models/providers/litert/Focus.js +141 -0
  275. package/dist/models/providers/litert/barcodeReadabilityPrePost.d.ts +6 -0
  276. package/dist/models/providers/litert/barcodeReadabilityPrePost.d.ts.map +1 -0
  277. package/dist/models/providers/litert/barcodeReadabilityPrePost.js +68 -0
  278. package/dist/models/providers/litert/blazeFacePrePost.d.ts +30 -0
  279. package/dist/models/providers/litert/blazeFacePrePost.d.ts.map +1 -0
  280. package/dist/models/providers/litert/blazeFacePrePost.js +206 -0
  281. package/dist/models/providers/litert/docDetectPrePost.d.ts +25 -0
  282. package/dist/models/providers/litert/docDetectPrePost.d.ts.map +1 -0
  283. package/dist/models/providers/litert/docDetectPrePost.js +197 -0
  284. package/dist/models/providers/litert/faceMeshPrePost.d.ts +23 -0
  285. package/dist/models/providers/litert/faceMeshPrePost.d.ts.map +1 -0
  286. package/dist/models/providers/litert/faceMeshPrePost.js +86 -0
  287. package/dist/models/providers/litert/focusPrePost.d.ts +6 -0
  288. package/dist/models/providers/litert/focusPrePost.d.ts.map +1 -0
  289. package/dist/models/providers/litert/focusPrePost.js +67 -0
  290. package/dist/models/providers/litert/runtime.d.ts +14 -0
  291. package/dist/models/providers/litert/runtime.d.ts.map +1 -0
  292. package/dist/models/providers/litert/runtime.js +83 -0
  293. package/dist/models/providers/mediapipe/BarcodeReadability.d.ts +11 -0
  294. package/dist/models/providers/mediapipe/BarcodeReadability.d.ts.map +1 -0
  295. package/dist/models/providers/mediapipe/BarcodeReadability.js +68 -0
  296. package/dist/models/providers/mediapipe/CapabilityProbe.d.ts +2 -0
  297. package/dist/models/providers/mediapipe/CapabilityProbe.d.ts.map +1 -0
  298. package/dist/models/providers/mediapipe/CapabilityProbe.js +14 -0
  299. package/dist/models/providers/mediapipe/DocumentDetection.d.ts +12 -0
  300. package/dist/models/providers/mediapipe/DocumentDetection.d.ts.map +1 -0
  301. package/dist/models/providers/mediapipe/DocumentDetection.js +90 -0
  302. package/dist/models/providers/mediapipe/FaceDetection.d.ts +11 -0
  303. package/dist/models/providers/mediapipe/FaceDetection.d.ts.map +1 -0
  304. package/dist/models/providers/mediapipe/FaceDetection.js +93 -0
  305. package/dist/models/providers/mediapipe/FaceLandmarker.d.ts +46 -0
  306. package/dist/models/providers/mediapipe/FaceLandmarker.d.ts.map +1 -0
  307. package/dist/models/providers/mediapipe/FaceLandmarker.js +166 -0
  308. package/dist/models/providers/mediapipe/Focus.d.ts +11 -0
  309. package/dist/models/providers/mediapipe/Focus.d.ts.map +1 -0
  310. package/dist/models/providers/mediapipe/Focus.js +51 -0
  311. package/dist/models/runtimeSelection.d.ts +5 -0
  312. package/dist/models/runtimeSelection.d.ts.map +1 -0
  313. package/dist/models/runtimeSelection.js +21 -0
  314. package/dist/selfieCapture/challengeRunner.d.ts +38 -0
  315. package/dist/selfieCapture/challengeRunner.d.ts.map +1 -0
  316. package/dist/selfieCapture/challengeRunner.js +181 -0
  317. package/dist/selfieCapture/controller.d.ts +166 -0
  318. package/dist/selfieCapture/controller.d.ts.map +1 -0
  319. package/dist/selfieCapture/controller.js +1253 -0
  320. package/dist/selfieCapture/faceTracking.d.ts +67 -0
  321. package/dist/selfieCapture/faceTracking.d.ts.map +1 -0
  322. package/dist/selfieCapture/faceTracking.js +158 -0
  323. package/dist/selfieCapture/guidance.d.ts +24 -0
  324. package/dist/selfieCapture/guidance.d.ts.map +1 -0
  325. package/dist/selfieCapture/guidance.js +41 -0
  326. package/dist/selfieCapture/index.d.ts +18 -0
  327. package/dist/selfieCapture/index.d.ts.map +1 -0
  328. package/dist/selfieCapture/index.js +11 -0
  329. package/dist/selfieCapture/lighting.d.ts +36 -0
  330. package/dist/selfieCapture/lighting.d.ts.map +1 -0
  331. package/dist/selfieCapture/lighting.js +95 -0
  332. package/dist/selfieCapture/livenessMachine.d.ts +66 -0
  333. package/dist/selfieCapture/livenessMachine.d.ts.map +1 -0
  334. package/dist/selfieCapture/livenessMachine.js +137 -0
  335. package/dist/selfieCapture/pipeline.d.ts +42 -0
  336. package/dist/selfieCapture/pipeline.d.ts.map +1 -0
  337. package/dist/selfieCapture/pipeline.js +282 -0
  338. package/dist/selfieCapture/reducer.d.ts +35 -0
  339. package/dist/selfieCapture/reducer.d.ts.map +1 -0
  340. package/dist/selfieCapture/reducer.js +143 -0
  341. package/dist/selfieCapture/state.d.ts +40 -0
  342. package/dist/selfieCapture/state.d.ts.map +1 -0
  343. package/dist/selfieCapture/state.js +36 -0
  344. package/dist/selfieCapture/testing/challengeFixtures.d.ts +43 -0
  345. package/dist/selfieCapture/testing/challengeFixtures.d.ts.map +1 -0
  346. package/dist/selfieCapture/testing/challengeFixtures.js +43 -0
  347. package/dist/signature/frameDecode.d.ts +48 -0
  348. package/dist/signature/frameDecode.d.ts.map +1 -0
  349. package/dist/signature/frameDecode.js +491 -0
  350. package/dist/signature/index.d.ts +5 -0
  351. package/dist/signature/index.d.ts.map +1 -0
  352. package/dist/signature/index.js +4 -0
  353. package/dist/signature/metadata.d.ts +63 -0
  354. package/dist/signature/metadata.d.ts.map +1 -0
  355. package/dist/signature/metadata.js +1 -0
  356. package/dist/signature/quality.d.ts +169 -0
  357. package/dist/signature/quality.d.ts.map +1 -0
  358. package/dist/signature/quality.js +186 -0
  359. package/dist/signature/signatureValidity.d.ts +149 -0
  360. package/dist/signature/signatureValidity.d.ts.map +1 -0
  361. package/dist/signature/signatureValidity.js +305 -0
  362. package/dist/signatureCapture/controller.d.ts +67 -0
  363. package/dist/signatureCapture/controller.d.ts.map +1 -0
  364. package/dist/signatureCapture/controller.js +534 -0
  365. package/dist/signatureCapture/guidance.d.ts +9 -0
  366. package/dist/signatureCapture/guidance.d.ts.map +1 -0
  367. package/dist/signatureCapture/guidance.js +7 -0
  368. package/dist/signatureCapture/index.d.ts +6 -0
  369. package/dist/signatureCapture/index.d.ts.map +1 -0
  370. package/dist/signatureCapture/index.js +5 -0
  371. package/dist/signatureCapture/pipeline.d.ts +111 -0
  372. package/dist/signatureCapture/pipeline.d.ts.map +1 -0
  373. package/dist/signatureCapture/pipeline.js +680 -0
  374. package/dist/signatureCapture/reducer.d.ts +42 -0
  375. package/dist/signatureCapture/reducer.d.ts.map +1 -0
  376. package/dist/signatureCapture/reducer.js +159 -0
  377. package/dist/signatureCapture/state.d.ts +92 -0
  378. package/dist/signatureCapture/state.d.ts.map +1 -0
  379. package/dist/signatureCapture/state.js +24 -0
  380. package/dist/utils/canvas.d.ts +4 -0
  381. package/dist/utils/canvas.d.ts.map +1 -0
  382. package/dist/utils/canvas.js +21 -0
  383. package/dist/utils/cropping.d.ts +8 -0
  384. package/dist/utils/cropping.d.ts.map +1 -0
  385. package/dist/utils/cropping.js +85 -0
  386. package/dist/utils/dataUrlToBase64.d.ts +7 -0
  387. package/dist/utils/dataUrlToBase64.d.ts.map +1 -0
  388. package/dist/utils/dataUrlToBase64.js +67 -0
  389. package/dist/utils/getFrameDimensions.d.ts +3 -0
  390. package/dist/utils/getFrameDimensions.d.ts.map +1 -0
  391. package/dist/utils/getFrameDimensions.js +12 -0
  392. package/dist/utils/isMobile.d.ts +3 -0
  393. package/dist/utils/isMobile.d.ts.map +1 -0
  394. package/dist/utils/isMobile.js +36 -0
  395. package/dist/utils/logger.d.ts +19 -0
  396. package/dist/utils/logger.d.ts.map +1 -0
  397. package/dist/utils/logger.js +25 -0
  398. package/dist/utils/platform.d.ts +4 -0
  399. package/dist/utils/platform.d.ts.map +1 -0
  400. package/dist/utils/platform.js +11 -0
  401. package/dist/utils/stabilizer.d.ts +26 -0
  402. package/dist/utils/stabilizer.d.ts.map +1 -0
  403. package/dist/utils/stabilizer.js +65 -0
  404. package/dist/version.d.ts +2 -0
  405. package/dist/version.d.ts.map +1 -0
  406. package/dist/version.js +1 -0
  407. package/dist/videoIdCapture/controller.d.ts +108 -0
  408. package/dist/videoIdCapture/controller.d.ts.map +1 -0
  409. package/dist/videoIdCapture/controller.js +833 -0
  410. package/dist/videoIdCapture/index.d.ts +5 -0
  411. package/dist/videoIdCapture/index.d.ts.map +1 -0
  412. package/dist/videoIdCapture/index.js +2 -0
  413. package/dist/videoIdCapture/state.d.ts +88 -0
  414. package/dist/videoIdCapture/state.d.ts.map +1 -0
  415. package/dist/videoIdCapture/state.js +67 -0
  416. package/package.json +111 -0
package/README.md ADDED
@@ -0,0 +1,66 @@
1
+ # @idmission/websdk-core
2
+
3
+ Framework-agnostic core engine for the IDmission Web SDK (iteration 3 / SDK 3.0).
4
+ Zero React — enforced by `src/reactFree.test.ts` on every test run.
5
+
6
+ Browser-only: this package drives `getUserMedia`, canvases, and WASM ML
7
+ runtimes. It is framework-agnostic, not environment-agnostic.
8
+
9
+ ## Subpath exports
10
+
11
+ | Import | Contents |
12
+ | --- | --- |
13
+ | `@idmission/websdk-core` | version, CDN config, log level control |
14
+ | `@idmission/websdk-core/barcode` | AAMVA parsing, native barcode decoding |
15
+ | `@idmission/websdk-core/liveness` | liveness challenge geometry + sequence reducer |
16
+ | `@idmission/websdk-core/camera` | getUserMedia wrapper, camera signals, integrity, virtual-camera detection |
17
+ | `@idmission/websdk-core/models` | ML model orchestration: preload, capability probing, runtime selection, LiteRT/MediaPipe providers (providers via deep import) |
18
+ | `@idmission/websdk-core/attestation` | client attestation state + collection |
19
+ | `@idmission/websdk-core/signature` | signature validity, frame decode, quality analysis |
20
+ | `@idmission/websdk-core/client` | session validation, submission, liveness check, tus upload — the framework-agnostic network client |
21
+ | `@idmission/websdk-core/idCapture` | headless ID-capture engine: `createIdCaptureController`, the pure flow reducer (which owns the single-slot guidance stabilizer), guidance derivation, the detection pipeline, and the submit bridge |
22
+
23
+ Build output is bundler-consumable ESM (extensionless relative imports).
24
+
25
+ ### `@idmission/websdk-core/client` usage
26
+
27
+ ```ts
28
+ import { createIdmissionClient, SubmissionAction } from '@idmission/websdk-core/client'
29
+
30
+ const client = createIdmissionClient({ sessionId: 'session-id-from-your-backend' })
31
+
32
+ const checkState = await client.validateSession()
33
+ if (checkState !== 'PASSED') throw new Error(`session invalid: ${checkState}`)
34
+
35
+ const response = await client.submit(
36
+ { id: { frontImage: 'base64...' }, face: { selfieImage: 'base64...' } },
37
+ { action: SubmissionAction.VALIDATE },
38
+ )
39
+ console.log(response.status.statusCode) // '000' on success
40
+ ```
41
+
42
+ ### `@idmission/websdk-core/idCapture` usage
43
+
44
+ ```ts
45
+ import { createIdmissionClient, SubmissionAction } from '@idmission/websdk-core/client'
46
+ import { createIdCaptureController } from '@idmission/websdk-core/idCapture'
47
+
48
+ // authUrl is optional — it defaults to the production portal-api and only
49
+ // needs to be set to reach a different environment; either way it must be
50
+ // one of client/urls.ts's ALLOWED_AUTH_URLS.
51
+ const client = createIdmissionClient({ sessionId: 'session-id-from-your-backend' })
52
+ const ctrl = createIdCaptureController({
53
+ client,
54
+ submission: { action: SubmissionAction.VERIFY },
55
+ })
56
+ const unsub = ctrl.subscribe((s) => {
57
+ // s.guidance is the SINGLE stabilized (debounced + min-held) guidance
58
+ // event; its `satisfied` flag derives from the held code, so text and any
59
+ // green styling always agree. `code === 'NONE'` means show nothing.
60
+ guidanceEl.textContent = s.guidance.code === 'NONE' ? '' : t(s.guidance.code) // your i18n
61
+ progressEl.value = s.progress
62
+ if (s.phase === 'reviewing') showReview(s.capturedDocuments, () => ctrl.actions.submit())
63
+ if (s.phase === 'error') showError(s.error, () => ctrl.actions.retry())
64
+ })
65
+ await ctrl.attach(document.querySelector('video')!)
66
+ ```
@@ -0,0 +1,24 @@
1
+ import type { OsAttestation } from './clientAttestation';
2
+ export declare function getLastSessionNonce(): string | null;
3
+ export declare function getLastOsAttestation(): OsAttestation | null;
4
+ /** Store the freshest server-issued nonce. Last-write-wins (see plan invariant). */
5
+ export declare function captureSessionNonce(nonce: string): void;
6
+ /**
7
+ * Call the native bridge (if any) and stash its result. Never throws.
8
+ * Commits only if the nonce is still current: a newer ingest may have advanced
9
+ * lastSessionNonce during the (up to multi-second) bridge call, and an OS token
10
+ * is bound to the nonce it was challenged with — committing a stale token under
11
+ * a newer nonce would break the anti-replay binding.
12
+ */
13
+ export declare function captureOsAttestation(nonce: string): Promise<void>;
14
+ /**
15
+ * Entry point for the auth layer. Validates the value off the ValidateSession
16
+ * response is a non-empty string, captures it, and fires the (async) OS-bridge
17
+ * collection. A missing/invalid nonce clears the holders so a stale prior-session
18
+ * nonce/token can't ride a submission that has no fresh binding -> envelope
19
+ * falls back to 'none'.
20
+ */
21
+ export declare function ingestSessionAttestation(nonce: unknown): void;
22
+ /** Test-only: clear holders between cases. */
23
+ export declare function resetAttestationState(): void;
24
+ //# sourceMappingURL=attestationState.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attestationState.d.ts","sourceRoot":"","sources":["../../src/attestation/attestationState.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAWxD,wBAAgB,mBAAmB,IAAI,MAAM,GAAG,IAAI,CAEnD;AAED,wBAAgB,oBAAoB,IAAI,aAAa,GAAG,IAAI,CAE3D;AAED,oFAAoF;AACpF,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAEvD;AAED;;;;;;GAMG;AACH,wBAAsB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAKvE;AAED;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAa7D;AAED,8CAA8C;AAC9C,wBAAgB,qBAAqB,IAAI,IAAI,CAG5C"}
@@ -0,0 +1,57 @@
1
+ import { requestOsAttestation } from './nativeAttestationBridge';
2
+ /**
3
+ * Mutable per-session attestation holders, mirroring lib/camera/cameraSignals.
4
+ * The async OS-bridge result is collected ahead of time into a holder so the
5
+ * envelope build at attach time stays synchronous. All writes fail-open.
6
+ */
7
+ let lastSessionNonce = null;
8
+ let lastOsAttestation = null;
9
+ export function getLastSessionNonce() {
10
+ return lastSessionNonce;
11
+ }
12
+ export function getLastOsAttestation() {
13
+ return lastOsAttestation;
14
+ }
15
+ /** Store the freshest server-issued nonce. Last-write-wins (see plan invariant). */
16
+ export function captureSessionNonce(nonce) {
17
+ lastSessionNonce = nonce;
18
+ }
19
+ /**
20
+ * Call the native bridge (if any) and stash its result. Never throws.
21
+ * Commits only if the nonce is still current: a newer ingest may have advanced
22
+ * lastSessionNonce during the (up to multi-second) bridge call, and an OS token
23
+ * is bound to the nonce it was challenged with — committing a stale token under
24
+ * a newer nonce would break the anti-replay binding.
25
+ */
26
+ export async function captureOsAttestation(nonce) {
27
+ const result = await requestOsAttestation(nonce);
28
+ if (lastSessionNonce === nonce) {
29
+ lastOsAttestation = result;
30
+ }
31
+ }
32
+ /**
33
+ * Entry point for the auth layer. Validates the value off the ValidateSession
34
+ * response is a non-empty string, captures it, and fires the (async) OS-bridge
35
+ * collection. A missing/invalid nonce clears the holders so a stale prior-session
36
+ * nonce/token can't ride a submission that has no fresh binding -> envelope
37
+ * falls back to 'none'.
38
+ */
39
+ export function ingestSessionAttestation(nonce) {
40
+ if (typeof nonce !== 'string' || nonce.length === 0) {
41
+ lastSessionNonce = null;
42
+ lastOsAttestation = null;
43
+ return;
44
+ }
45
+ captureSessionNonce(nonce);
46
+ // Invalidate any OS token bound to a prior nonce: it would take up to the
47
+ // bridge timeout for the new token to land, and emitting the old token under
48
+ // the new nonce would break the anti-replay binding. Until the new token
49
+ // arrives the envelope falls back to web-integrity.
50
+ lastOsAttestation = null;
51
+ void captureOsAttestation(nonce);
52
+ }
53
+ /** Test-only: clear holders between cases. */
54
+ export function resetAttestationState() {
55
+ lastSessionNonce = null;
56
+ lastOsAttestation = null;
57
+ }
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Graded client-attestation envelope. SP1 produces it on every session and
3
+ * ships it via additionalData.metadata; SP2 verifies it. Pure, dependency-free
4
+ * leaf so it is unit-testable in isolation.
5
+ */
6
+ export type AssuranceLevel = 'os-attested' | 'web-integrity' | 'none';
7
+ /** OS-tier evidence. `token` is opaque to the SDK; only SP2 verifies it. */
8
+ export type OsAttestation = {
9
+ platform: 'android' | 'ios';
10
+ token: string;
11
+ };
12
+ /** Web-tier evidence: the existing client tamper verdict, reported nonce-bound. */
13
+ export type WebIntegrity = {
14
+ tamperDetected: boolean;
15
+ tamperDetails?: string[];
16
+ };
17
+ export type ClientAttestation = {
18
+ assuranceLevel: AssuranceLevel;
19
+ nonce?: string;
20
+ sdkVersion: string;
21
+ os?: OsAttestation;
22
+ web?: WebIntegrity;
23
+ };
24
+ export type BuildClientAttestationInput = {
25
+ nonce?: string;
26
+ sdkVersion: string;
27
+ web?: WebIntegrity;
28
+ os?: OsAttestation | null;
29
+ };
30
+ /**
31
+ * Grade the envelope from whichever inputs are present:
32
+ * - OS token present -> 'os-attested' (attach `os`)
33
+ * - else nonce present -> 'web-integrity' (attach `web`)
34
+ * - else -> 'none' (omit nonce + web; old SDK / no backend nonce)
35
+ *
36
+ * The web tier requires a nonce to be meaningful (an unbound tamper verdict is
37
+ * replayable), so `web` is only attached at the 'web-integrity' level.
38
+ */
39
+ export declare function buildClientAttestation(input: BuildClientAttestationInput): ClientAttestation;
40
+ //# sourceMappingURL=clientAttestation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clientAttestation.d.ts","sourceRoot":"","sources":["../../src/attestation/clientAttestation.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG,aAAa,GAAG,eAAe,GAAG,MAAM,CAAA;AAErE,4EAA4E;AAC5E,MAAM,MAAM,aAAa,GAAG;IAC1B,QAAQ,EAAE,SAAS,GAAG,KAAK,CAAA;IAC3B,KAAK,EAAE,MAAM,CAAA;CACd,CAAA;AAED,mFAAmF;AACnF,MAAM,MAAM,YAAY,GAAG;IACzB,cAAc,EAAE,OAAO,CAAA;IACvB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAA;CACzB,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC9B,cAAc,EAAE,cAAc,CAAA;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,UAAU,EAAE,MAAM,CAAA;IAClB,EAAE,CAAC,EAAE,aAAa,CAAA;IAClB,GAAG,CAAC,EAAE,YAAY,CAAA;CACnB,CAAA;AAED,MAAM,MAAM,2BAA2B,GAAG;IACxC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,UAAU,EAAE,MAAM,CAAA;IAClB,GAAG,CAAC,EAAE,YAAY,CAAA;IAClB,EAAE,CAAC,EAAE,aAAa,GAAG,IAAI,CAAA;CAC1B,CAAA;AAED;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,2BAA2B,GACjC,iBAAiB,CAUnB"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Grade the envelope from whichever inputs are present:
3
+ * - OS token present -> 'os-attested' (attach `os`)
4
+ * - else nonce present -> 'web-integrity' (attach `web`)
5
+ * - else -> 'none' (omit nonce + web; old SDK / no backend nonce)
6
+ *
7
+ * The web tier requires a nonce to be meaningful (an unbound tamper verdict is
8
+ * replayable), so `web` is only attached at the 'web-integrity' level.
9
+ */
10
+ export function buildClientAttestation(input) {
11
+ const { nonce, sdkVersion, web, os } = input;
12
+ if (os) {
13
+ return { assuranceLevel: 'os-attested', nonce, sdkVersion, os };
14
+ }
15
+ if (nonce) {
16
+ return { assuranceLevel: 'web-integrity', nonce, sdkVersion, web };
17
+ }
18
+ return { assuranceLevel: 'none', sdkVersion };
19
+ }
@@ -0,0 +1,10 @@
1
+ import type { ClientAttestation, WebIntegrity } from './clientAttestation';
2
+ /**
3
+ * Assemble the ClientAttestation envelope from the current per-session state and
4
+ * a supplied web tamper verdict. Pure aside from reading the module-level holders,
5
+ * so it is unit-testable without a DOM. The caller (request assembly, browser-only)
6
+ * supplies `web` from checkGetUserMediaIntegrity; pass undefined if the verdict
7
+ * could not be obtained (fail-open -> the web tier is simply omitted).
8
+ */
9
+ export declare function collectClientAttestation(web: WebIntegrity | undefined): ClientAttestation;
10
+ //# sourceMappingURL=collectClientAttestation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"collectClientAttestation.d.ts","sourceRoot":"","sources":["../../src/attestation/collectClientAttestation.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAG1E;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CACtC,GAAG,EAAE,YAAY,GAAG,SAAS,GAC5B,iBAAiB,CAOnB"}
@@ -0,0 +1,18 @@
1
+ import { webSdkCoreVersion as webSdkVersion } from '../version';
2
+ import { buildClientAttestation } from './clientAttestation';
3
+ import { getLastSessionNonce, getLastOsAttestation } from './attestationState';
4
+ /**
5
+ * Assemble the ClientAttestation envelope from the current per-session state and
6
+ * a supplied web tamper verdict. Pure aside from reading the module-level holders,
7
+ * so it is unit-testable without a DOM. The caller (request assembly, browser-only)
8
+ * supplies `web` from checkGetUserMediaIntegrity; pass undefined if the verdict
9
+ * could not be obtained (fail-open -> the web tier is simply omitted).
10
+ */
11
+ export function collectClientAttestation(web) {
12
+ return buildClientAttestation({
13
+ nonce: getLastSessionNonce() ?? undefined,
14
+ sdkVersion: webSdkVersion,
15
+ web,
16
+ os: getLastOsAttestation(),
17
+ });
18
+ }
@@ -0,0 +1,5 @@
1
+ export * from './attestationState';
2
+ export * from './clientAttestation';
3
+ export * from './nativeAttestationBridge';
4
+ export * from './collectClientAttestation';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/attestation/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA;AAClC,cAAc,qBAAqB,CAAA;AACnC,cAAc,2BAA2B,CAAA;AACzC,cAAc,4BAA4B,CAAA"}
@@ -0,0 +1,4 @@
1
+ export * from './attestationState';
2
+ export * from './clientAttestation';
3
+ export * from './nativeAttestationBridge';
4
+ export * from './collectClientAttestation';
@@ -0,0 +1,3 @@
1
+ import type { OsAttestation } from './clientAttestation';
2
+ export declare function requestOsAttestation(nonce: string, timeoutMs?: number): Promise<OsAttestation | null>;
3
+ //# sourceMappingURL=nativeAttestationBridge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nativeAttestationBridge.d.ts","sourceRoot":"","sources":["../../src/attestation/nativeAttestationBridge.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAqBxD,wBAAsB,oBAAoB,CACxC,KAAK,EAAE,MAAM,EACb,SAAS,GAAE,MAA2B,GACrC,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC,CAyB/B"}
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Host->SDK attestation bridge. A native WebView host assigns
3
+ * `window.IDmissionSDK.attestNative` AFTER the bundle loads (the SDK overwrites
4
+ * the global object on load, so earlier assignment would be clobbered). The SDK
5
+ * only ever reads it. Fail-open: any absence/error/timeout yields null and the
6
+ * caller falls back to the web tier.
7
+ */
8
+ const DEFAULT_TIMEOUT_MS = 3000;
9
+ function isOsAttestation(value) {
10
+ if (typeof value !== 'object' || value === null)
11
+ return false;
12
+ const v = value;
13
+ return ((v.platform === 'android' || v.platform === 'ios') &&
14
+ typeof v.token === 'string' &&
15
+ v.token.length > 0);
16
+ }
17
+ export async function requestOsAttestation(nonce, timeoutMs = DEFAULT_TIMEOUT_MS) {
18
+ let timer;
19
+ try {
20
+ const bridge = globalThis.IDmissionSDK?.attestNative;
21
+ if (typeof bridge !== 'function')
22
+ return null;
23
+ const timeout = new Promise((resolve) => {
24
+ timer = setTimeout(() => resolve(null), timeoutMs);
25
+ });
26
+ const result = await Promise.race([Promise.resolve(bridge(nonce)), timeout]);
27
+ return isOsAttestation(result) ? result : null;
28
+ }
29
+ catch {
30
+ return null;
31
+ }
32
+ finally {
33
+ // Always clear the timer — including when bridge(nonce) rejects — so a
34
+ // pending timeout can't keep the event loop alive past this call.
35
+ if (timer)
36
+ clearTimeout(timer);
37
+ }
38
+ }
@@ -0,0 +1,77 @@
1
+ /**
2
+ * Parser for AAMVA (American Association of Motor Vehicle Administrators)
3
+ * PDF417 barcode data found on US and Canadian driver's licenses.
4
+ */
5
+ export type ParsedAAMVAField = {
6
+ code: string;
7
+ label: string;
8
+ value: string;
9
+ };
10
+ export type ParsedAAMVAData = {
11
+ fields: ParsedAAMVAField[];
12
+ rawData: string;
13
+ aamvaVersion?: number;
14
+ jurisdictionId?: string;
15
+ };
16
+ /**
17
+ * Parses AAMVA PDF417 barcode data into structured fields
18
+ */
19
+ export declare function parseAAMVABarcode(rawData: string): ParsedAAMVAData;
20
+ /**
21
+ * Gets a specific field value from parsed AAMVA data
22
+ */
23
+ export declare function getAAMVAField(parsed: ParsedAAMVAData, code: string): string | undefined;
24
+ /**
25
+ * Gets the full name from parsed AAMVA data
26
+ */
27
+ export declare function getFullName(parsed: ParsedAAMVAData): string;
28
+ /**
29
+ * Gets the full address from parsed AAMVA data
30
+ */
31
+ export declare function getFullAddress(parsed: ParsedAAMVAData): string;
32
+ /**
33
+ * IDData structure for ocrMetadata field in submission API
34
+ */
35
+ export type OCRMetadataIDData = {
36
+ IDCountry?: string;
37
+ IDCountry_ISO2?: string;
38
+ IssuingCountry?: string;
39
+ IDType?: string;
40
+ IDNumber?: string;
41
+ IDNumber2?: string;
42
+ IDState?: string;
43
+ State?: string;
44
+ FirstName?: string;
45
+ MiddleName?: string;
46
+ LastName?: string;
47
+ Gender?: string;
48
+ DateofBirth?: string;
49
+ DateOfExpiry?: string;
50
+ ExpiryDate?: string;
51
+ DateOfIssue?: string;
52
+ IssueDate?: string;
53
+ AddressLine1?: string;
54
+ City?: string;
55
+ ZipCode?: string;
56
+ Country?: string;
57
+ Eyes?: string;
58
+ Under21?: string;
59
+ DocumentTypeCode?: string;
60
+ BarcodeDataParsed?: string;
61
+ BarcodeAttemptCount?: string;
62
+ };
63
+ export type OCRMetadata = {
64
+ IDData: OCRMetadataIDData;
65
+ };
66
+ /**
67
+ * Converts parsed AAMVA barcode data to ocrMetadata format for submission API.
68
+ * Returns the IDData object ready to be stringified for the ocrMetadata field.
69
+ */
70
+ export declare function convertAAMVAToOCRMetadata(parsed: ParsedAAMVAData): OCRMetadata;
71
+ /**
72
+ * Builds the ocrMetadata payload reported when a barcode capture flow ran
73
+ * but no barcode was successfully parsed. Records the attempt count so the
74
+ * backend can distinguish "user never tried" from "user tried N times".
75
+ */
76
+ export declare function buildNoBarcodeOCRMetadata(attemptCount: number): OCRMetadata;
77
+ //# sourceMappingURL=AAMVAParser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AAMVAParser.d.ts","sourceRoot":"","sources":["../../src/barcode/AAMVAParser.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAgGH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;CACd,CAAA;AAED,MAAM,MAAM,eAAe,GAAG;IAC5B,MAAM,EAAE,gBAAgB,EAAE,CAAA;IAC1B,OAAO,EAAE,MAAM,CAAA;IACf,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB,CAAA;AAsJD;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,eAAe,CA8ElE;AAED;;GAEG;AACH,wBAAgB,aAAa,CAC3B,MAAM,EAAE,eAAe,EACvB,IAAI,EAAE,MAAM,GACX,MAAM,GAAG,SAAS,CAGpB;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,eAAe,GAAG,MAAM,CAM3D;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,eAAe,GAAG,MAAM,CAW9D;AAED;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,mBAAmB,CAAC,EAAE,MAAM,CAAA;CAC7B,CAAA;AAED,MAAM,MAAM,WAAW,GAAG;IACxB,MAAM,EAAE,iBAAiB,CAAA;CAC1B,CAAA;AAcD;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,eAAe,GAAG,WAAW,CA0E9E;AAED;;;;GAIG;AACH,wBAAgB,yBAAyB,CAAC,YAAY,EAAE,MAAM,GAAG,WAAW,CAO3E"}