@incodetech/core 0.0.0-dev-20261002-1c5da92a → 0.0.0-dev-20261002-7e68ce7a

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 (61) hide show
  1. package/dist/{FaceDetectionProvider-C77quHWy.esm.js → FaceDetectionProvider-BIgdSkHs.esm.js} +85 -5
  2. package/dist/ae-signature.esm.js +1 -1
  3. package/dist/{apiError-ODi1eUB6.esm.js → apiError-B7C2i04b.esm.js} +1 -1
  4. package/dist/authentication.esm.js +2 -2
  5. package/dist/{authenticationManager-CSbijmLC.esm.js → authenticationManager-BboXPVJ4.esm.js} +3 -3
  6. package/dist/{authenticationStateMachine-hQ55SpwE.esm.js → authenticationStateMachine-DvPvONji.esm.js} +3 -3
  7. package/dist/{createCameraCycleOwnership-26-cuXnc.esm.js → createCameraCycleOwnership-CVNcIL95.esm.js} +23 -5
  8. package/dist/{deepsightLoader-BQ8lqtEX.esm.js → deepsightLoader-D9O6b45T.esm.js} +3 -3
  9. package/dist/dynamic-forms.esm.js +2 -2
  10. package/dist/{dynamicFormsManager-CYM906GP.esm.js → dynamicFormsManager-DnCnvG1a.esm.js} +1 -1
  11. package/dist/{dynamicFormsStateMachine-CKkYeozQ.esm.js → dynamicFormsStateMachine-CYXP2bWn.esm.js} +1 -1
  12. package/dist/ekyb.esm.js +3 -3
  13. package/dist/{ekybManager-DHec76Vk.esm.js → ekybManager-q-VSUBUQ.esm.js} +1 -1
  14. package/dist/{ekybStateMachine-BQEEN3Ci.esm.js → ekybStateMachine-Dhio1vn7.esm.js} +1 -1
  15. package/dist/electronic-signature.esm.js +1 -1
  16. package/dist/{electronicSignatureManager-Bfp-HYr_.esm.js → electronicSignatureManager-DydLFTCX.esm.js} +1 -1
  17. package/dist/extensibility.d.ts +3 -3
  18. package/dist/extensibility.esm.js +11 -11
  19. package/dist/{faceCaptureManagerFactory-D_kXgimx.esm.js → faceCaptureManagerFactory-CHNVNEP_.esm.js} +1 -1
  20. package/dist/{faceCaptureSetup-iYTWNwZO.esm.js → faceCaptureSetup-BzG44cuD.esm.js} +12 -9
  21. package/dist/{feature-management-DOFxCZOJ.esm.js → feature-management-DClH0UkN.esm.js} +1 -1
  22. package/dist/feature-management.esm.js +1 -1
  23. package/dist/field-comparison.d.ts +2 -2
  24. package/dist/field-comparison.esm.js +1 -1
  25. package/dist/{fieldComparisonManager-CNULadlv.esm.js → fieldComparisonManager-CEu5az0c.esm.js} +31 -13
  26. package/dist/{fieldComparisonManager-DN9b5rtc.d.ts → fieldComparisonManager-CUX4gza2.d.ts} +4 -1
  27. package/dist/flow.esm.js +3 -3
  28. package/dist/{flowCompletionService-DcsWuQaJ.esm.js → flowCompletionService-DRpB7aag.esm.js} +1 -1
  29. package/dist/{flowServices-Ccug1Ef7.esm.js → flowServices-BABr3Ov8.esm.js} +4 -4
  30. package/dist/geolocation.esm.js +2 -2
  31. package/dist/{geolocationManager-BQbuV_j5.esm.js → geolocationManager-DykhXCSG.esm.js} +1 -1
  32. package/dist/{geolocationStateMachine-CMmO7i7t.esm.js → geolocationStateMachine-DtQJPfbx.esm.js} +1 -1
  33. package/dist/id-selfie-flow.esm.js +7 -8
  34. package/dist/id.esm.js +3 -3
  35. package/dist/{idCaptureDefaults-BWoJ1q9U.esm.js → idCaptureDefaults-BmgACU-z.esm.js} +1 -1
  36. package/dist/{idCaptureManager-yN72O0WY.esm.js → idCaptureManager-CQkzCUxv.esm.js} +3 -3
  37. package/dist/{idCaptureServices-CtRtLJOZ.esm.js → idCaptureServices-BVTu_jJW.esm.js} +3 -3
  38. package/dist/{idCaptureStateMachine-DEdd1aY3.esm.js → idCaptureStateMachine-DfyGv-pZ.esm.js} +10 -10
  39. package/dist/identity-reuse.d.ts +1 -1
  40. package/dist/{identityReuseManager-ooAbp6Kc.d.ts → identityReuseManager-B1birg5X.d.ts} +4 -4
  41. package/dist/index.esm.js +1 -1
  42. package/dist/mandatory-consent.d.ts +1 -1
  43. package/dist/{mandatoryConsentManager-B6glP66e.d.ts → mandatoryConsentManager-CdBVHXGB.d.ts} +4 -4
  44. package/dist/qe-signature.esm.js +1 -1
  45. package/dist/{runChildModule-DFzW2mOZ.esm.js → runChildModule-CZbSjlSO.esm.js} +1 -1
  46. package/dist/{sdkVersion-ChTpPWse.esm.js → sdkVersion-CEzq0bPr.esm.js} +1 -1
  47. package/dist/selfie.esm.js +7 -7
  48. package/dist/selfieErrorUtils-C9O4yx2t.esm.js +21 -0
  49. package/dist/{selfieManager-BzotBa8D.esm.js → selfieManager-B331XzBJ.esm.js} +3 -3
  50. package/dist/{selfieStateMachine-CV48ZQIY.esm.js → selfieStateMachine-DbCcOMzb.esm.js} +3 -3
  51. package/dist/{session-dGK79ZBO.esm.js → session-DHMyVkCm.esm.js} +3 -3
  52. package/dist/session.esm.js +4 -4
  53. package/dist/{sessionInitializer-BQqoLy-T.esm.js → sessionInitializer-Dkb386bz.esm.js} +3 -3
  54. package/dist/{setup-CC9ktDrJ.esm.js → setup-BIKgMZ9N.esm.js} +4 -4
  55. package/dist/{trueSightService-CQWIPXFn.esm.js → trueSightService-DsHApmSr.esm.js} +1 -1
  56. package/dist/video-selfie.esm.js +3 -3
  57. package/dist/{videoSelfieCameraWarmer-D8bllt1g.esm.js → videoSelfieCameraWarmer-Ds3B8RK_.esm.js} +4 -4
  58. package/dist/wasm.esm.js +2 -2
  59. package/dist/workflow.esm.js +14 -14
  60. package/package.json +3 -3
  61. package/dist/selfieErrorUtils-CLXOOKJT.esm.js +0 -90
@@ -1,90 +0,0 @@
1
- import { t as api } from "./api-Bx3gKW_y.esm.js";
2
- import { t as endpoints } from "./endpoints-Bs3D8B_G.esm.js";
3
- import { t as addDeviceStats } from "./stats-Dz3XWA64.esm.js";
4
- import { t as FACE_ERROR_CODES } from "./types-BN5RPPIZ.esm.js";
5
- import { t as getDeviceClass } from "./getDeviceClass-bsWdEDxP.esm.js";
6
- //#region src/modules/selfie/selfieUploadService.ts
7
- /**
8
- * Uploads a selfie image to the backend.
9
- */
10
- async function uploadSelfie({ encryptedBase64Image, faceCoordinates, signal, metadata, recordingId, imageType = "selfie", deepsightService }) {
11
- try {
12
- const payload = {
13
- base64Image: encryptedBase64Image,
14
- faceCoordinates: faceCoordinates ?? void 0,
15
- encrypted: true,
16
- clientInfo: { deviceClass: getDeviceClass() },
17
- metadata: metadata ?? void 0
18
- };
19
- const query = { imageType };
20
- if (recordingId) query.recordingId = recordingId;
21
- const res = await api.post(endpoints.selfie, payload, {
22
- signal,
23
- query
24
- });
25
- if (!res.ok) throw new Error(`POST ${endpoints.selfie} failed: ${res.status} ${res.statusText}`);
26
- if (deepsightService) addDeviceStats({
27
- frontIdStatsAnalysisStatus: "",
28
- backIdStatsAnalysisStatus: "",
29
- selfieStatsAnalysisStatus: deepsightService.getAnalysisStatus(),
30
- motionStatus: deepsightService.getMotionStatus()
31
- });
32
- return res.data;
33
- } catch (error) {
34
- const errorCode = getFaceErrorCodeFromHttpError(error);
35
- throw withTransportStatus(new Error(errorCode ?? FACE_ERROR_CODES.SERVER), error);
36
- }
37
- }
38
- /**
39
- * Copies the HTTP status of `source` onto `target`. The code alone cannot say
40
- * whether the request got a verdict or never reached the backend — a network
41
- * failure and a 5xx both map to `SERVER_ERROR` — so a caller that retries
42
- * transport failures needs the status to survive this mapping.
43
- */
44
- function withTransportStatus(target, source) {
45
- if (typeof source === "object" && source !== null && "status" in source && typeof source.status === "number") return Object.assign(target, { status: source.status });
46
- return target;
47
- }
48
- const getFaceErrorCodeFromHttpError = (error) => {
49
- const err = error;
50
- if (err.ok !== false || typeof err.status !== "number") return;
51
- if (err.status !== 400) return FACE_ERROR_CODES.SERVER;
52
- if (typeof err.data?.status !== "number") return FACE_ERROR_CODES.BAD_REQUEST;
53
- return {
54
- 3004: FACE_ERROR_CODES.FACE_NOT_FOUND,
55
- 3005: FACE_ERROR_CODES.FACE_NOT_FOUND,
56
- 3006: FACE_ERROR_CODES.TOO_BLURRY,
57
- 3007: FACE_ERROR_CODES.TOO_DARK,
58
- 4010: FACE_ERROR_CODES.MULTIPLE_FACES,
59
- 4019: FACE_ERROR_CODES.FACE_NOT_FOUND,
60
- 4077: FACE_ERROR_CODES.BAD_PHOTO_QUALITY,
61
- 4078: FACE_ERROR_CODES.FACE_OCCLUDED
62
- }[err.data.status] ?? FACE_ERROR_CODES.BAD_REQUEST;
63
- };
64
- async function processFace(imageType = "selfie", signal) {
65
- return (await api.post(endpoints.processFace, {}, {
66
- query: { imageType },
67
- signal
68
- })).data;
69
- }
70
- //#endregion
71
- //#region src/modules/selfie/selfieErrorUtils.ts
72
- const FACE_ERROR_CODE_VALUES = Object.values(FACE_ERROR_CODES);
73
- const isFaceErrorCode = (value) => {
74
- return FACE_ERROR_CODE_VALUES.includes(value);
75
- };
76
- const getFaceErrorCodeFromUnknown = (value) => {
77
- if (value instanceof Error && typeof value.message === "string") return isFaceErrorCode(value.message) ? value.message : void 0;
78
- if (typeof value === "string") return isFaceErrorCode(value) ? value : void 0;
79
- };
80
- const validateUploadResponse = ({ config, response }) => {
81
- if (!response) return FACE_ERROR_CODES.SERVER;
82
- if (response.confidence !== 0) return FACE_ERROR_CODES.LIVENESS;
83
- if (config.validateBrightness && !response.isBright) return FACE_ERROR_CODES.BRIGHTNESS;
84
- if (config.validateLenses && response.hasLenses) return FACE_ERROR_CODES.LENSES;
85
- if (config.validateFaceMask && response.hasFaceMask) return FACE_ERROR_CODES.MASK;
86
- if (config.validateClosedEyes && response.hasClosedEyes) return FACE_ERROR_CODES.CLOSED_EYES;
87
- if (config.validateHeadCover && response.hasHeadCover) return FACE_ERROR_CODES.HEAD_COVER;
88
- };
89
- //#endregion
90
- export { uploadSelfie as i, validateUploadResponse as n, processFace as r, getFaceErrorCodeFromUnknown as t };