@incodetech/core 0.0.0-dev-20260224-1accab3 → 0.0.0-dev-20260224-fd86d93
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.
package/dist/authentication.d.ts
CHANGED
|
@@ -18,7 +18,7 @@ type AuthenticationConfig = FlowModuleConfig['AUTHENTICATION'] & BaseFaceCapture
|
|
|
18
18
|
type CreateAuthenticationActorOptions = {
|
|
19
19
|
config: AuthenticationConfig;
|
|
20
20
|
dependencies?: FaceCaptureDependencies;
|
|
21
|
-
authHint
|
|
21
|
+
authHint?: string;
|
|
22
22
|
};
|
|
23
23
|
type AuthenticationActor = ActorRefFrom<AuthenticationMachine>;
|
|
24
24
|
declare function createAuthenticationActor(options: CreateAuthenticationActorOptions): AuthenticationActor;
|
|
@@ -52,7 +52,7 @@ async function uploadAuthFace(params) {
|
|
|
52
52
|
encrypted: true,
|
|
53
53
|
clientInfo: { deviceClass: getDeviceClass() },
|
|
54
54
|
metadata: params.metadata ?? void 0,
|
|
55
|
-
hint: params.authHint
|
|
55
|
+
...params.authHint !== void 0 && { hint: params.authHint }
|
|
56
56
|
};
|
|
57
57
|
const query = {};
|
|
58
58
|
if (params.recordingId) query.recordingId = params.recordingId;
|
|
@@ -380,7 +380,7 @@ async function getExtraImages(params) {
|
|
|
380
380
|
}
|
|
381
381
|
const getRealQualityValue = (value) => (1 - value) * 100;
|
|
382
382
|
async function uploadIdImage(params) {
|
|
383
|
-
const { type, image, onProgress, signal, metadata, ageAssurance, glare, sharpness, shouldSkipGlareBack, analyticsProvider, imageData, isSecondId } = params;
|
|
383
|
+
const { type, image, onProgress, signal, metadata, ageAssurance, glare, sharpness, shouldSkipGlareBack, analyticsProvider, imageData, isSecondId, onlyFront } = params;
|
|
384
384
|
addEvent({
|
|
385
385
|
code: "captureAttemptFinished",
|
|
386
386
|
module: eventModuleNames.id,
|
|
@@ -407,6 +407,7 @@ async function uploadIdImage(params) {
|
|
|
407
407
|
metadata: finalMetadata
|
|
408
408
|
};
|
|
409
409
|
const queryParams = { imageType: "id" };
|
|
410
|
+
if (onlyFront && type === "front") queryParams.onlyFront = true;
|
|
410
411
|
if (shouldSkipGlareBack && type === "back") queryParams.glare = 0;
|
|
411
412
|
else if (glare !== void 0) queryParams.glare = getRealQualityValue(glare);
|
|
412
413
|
if (sharpness !== void 0) queryParams.sharpness = getRealQualityValue(sharpness);
|
|
@@ -860,7 +861,8 @@ const uploadIdImageActor = fromPromise(async ({ input, signal }) => {
|
|
|
860
861
|
metadata,
|
|
861
862
|
analyticsProvider: input.analyticsProvider,
|
|
862
863
|
imageData,
|
|
863
|
-
isSecondId: input.isSecondId
|
|
864
|
+
isSecondId: input.isSecondId,
|
|
865
|
+
onlyFront: input.onlyFront
|
|
864
866
|
});
|
|
865
867
|
});
|
|
866
868
|
const processIdActor = fromPromise(async ({ input, signal }) => {
|
|
@@ -942,6 +944,14 @@ function performTrackTutorialId() {
|
|
|
942
944
|
});
|
|
943
945
|
}
|
|
944
946
|
function performTrackContinue() {}
|
|
947
|
+
function performTrackCameraId(context) {
|
|
948
|
+
const isBack = context.currentMode === "back";
|
|
949
|
+
addEvent({
|
|
950
|
+
code: isBack ? "cameraBackId" : "cameraFrontId",
|
|
951
|
+
module: eventModuleNames.id,
|
|
952
|
+
payload: isBack ? { cameraBackId: true } : { cameraFrontId: true }
|
|
953
|
+
});
|
|
954
|
+
}
|
|
945
955
|
function performStopMediaRecording(context) {
|
|
946
956
|
if (context.recordingSession) stopRecording(context.recordingSession);
|
|
947
957
|
}
|
|
@@ -1141,7 +1151,7 @@ function getCurrentModeFromEvent(context, event) {
|
|
|
1141
1151
|
//#endregion
|
|
1142
1152
|
//#region src/modules/id/idCaptureGuards.ts
|
|
1143
1153
|
const hasShowTutorialGuard = ({ context }) => context.config.showTutorial;
|
|
1144
|
-
const hasShowDocumentChooserGuard = ({ context }) => context.config.showDocumentChooserScreen ?? false;
|
|
1154
|
+
const hasShowDocumentChooserGuard = ({ context }) => !context.config.onlyBack && (context.config.showDocumentChooserScreen ?? false);
|
|
1145
1155
|
const isPermissionGrantedGuard = ({ event }) => {
|
|
1146
1156
|
if ("output" in event) return event.output === "granted";
|
|
1147
1157
|
return false;
|
|
@@ -1283,6 +1293,9 @@ const _idCaptureMachine = setup({
|
|
|
1283
1293
|
trackContinue: () => {
|
|
1284
1294
|
/* @__PURE__ */ performTrackContinue();
|
|
1285
1295
|
},
|
|
1296
|
+
trackCameraId: ({ context }) => {
|
|
1297
|
+
performTrackCameraId(context);
|
|
1298
|
+
},
|
|
1286
1299
|
resetContext: assign(({ context }) => getResetContextValues(context)),
|
|
1287
1300
|
resetDetection: ({ context }) => {
|
|
1288
1301
|
performResetDetection(context);
|
|
@@ -1647,6 +1660,7 @@ const _idCaptureMachine = setup({
|
|
|
1647
1660
|
},
|
|
1648
1661
|
capture: {
|
|
1649
1662
|
initial: "checkingStream",
|
|
1663
|
+
entry: "trackCameraId",
|
|
1650
1664
|
exit: ["stopMediaRecording", "clearRecordingSession"],
|
|
1651
1665
|
on: { SET_FRAME_RECT: { actions: "setFrameRect" } },
|
|
1652
1666
|
states: {
|
|
@@ -1809,7 +1823,8 @@ const _idCaptureMachine = setup({
|
|
|
1809
1823
|
},
|
|
1810
1824
|
deepsightService: context.deepsightService,
|
|
1811
1825
|
stream: context.stream,
|
|
1812
|
-
isSecondId: context.config.isSecondId ?? false
|
|
1826
|
+
isSecondId: context.config.isSecondId ?? false,
|
|
1827
|
+
onlyFront: context.config.onlyFront
|
|
1813
1828
|
};
|
|
1814
1829
|
},
|
|
1815
1830
|
onDone: {
|
package/dist/id.esm.js
CHANGED
|
@@ -4,7 +4,7 @@ import "./src-t0pt3B2r.esm.js";
|
|
|
4
4
|
import "./endpoints-DXp63GM6.esm.js";
|
|
5
5
|
import "./deepsightService-Bn05rSAa.esm.js";
|
|
6
6
|
import "./api-DlSxxyGw.esm.js";
|
|
7
|
-
import { a as processId, c as stopStream, d as ID_ERROR_CODES, i as initializeIdCapture, l as uploadIdImage, n as createIdCaptureActor, o as startRecordingSession, r as idCaptureMachine, s as stopRecording, t as createIdCaptureManager, u as validateUploadResponse } from "./id-
|
|
7
|
+
import { a as processId, c as stopStream, d as ID_ERROR_CODES, i as initializeIdCapture, l as uploadIdImage, n as createIdCaptureActor, o as startRecordingSession, r as idCaptureMachine, s as stopRecording, t as createIdCaptureManager, u as validateUploadResponse } from "./id-CDh0aJOJ.esm.js";
|
|
8
8
|
import "./stats-GJMiTm5k.esm.js";
|
|
9
9
|
|
|
10
10
|
export { ID_ERROR_CODES, createIdCaptureActor, createIdCaptureManager, idCaptureMachine, initializeIdCapture, processId, startRecordingSession, stopRecording, stopStream, uploadIdImage, validateUploadResponse };
|
package/dist/index.esm.js
CHANGED
|
@@ -4,7 +4,7 @@ import { O as createApi_default, o as warmupWasm, r as WasmUtilProvider } from "
|
|
|
4
4
|
import "./endpoints-DXp63GM6.esm.js";
|
|
5
5
|
import "./deepsightService-Bn05rSAa.esm.js";
|
|
6
6
|
import { a as resetApi, n as getApi, o as setClient, s as setToken, t as api } from "./api-DlSxxyGw.esm.js";
|
|
7
|
-
import { _ as createSession, a as processId, c as stopStream, d as ID_ERROR_CODES, f as getDisableIpify, g as resetSessionInit, h as isSessionInitialized, i as initializeIdCapture, l as uploadIdImage, m as initializeSession, n as createIdCaptureActor, o as startRecordingSession, p as getSessionFeatures, r as idCaptureMachine, s as stopRecording, t as createIdCaptureManager, u as validateUploadResponse } from "./id-
|
|
7
|
+
import { _ as createSession, a as processId, c as stopStream, d as ID_ERROR_CODES, f as getDisableIpify, g as resetSessionInit, h as isSessionInitialized, i as initializeIdCapture, l as uploadIdImage, m as initializeSession, n as createIdCaptureActor, o as startRecordingSession, p as getSessionFeatures, r as idCaptureMachine, s as stopRecording, t as createIdCaptureManager, u as validateUploadResponse } from "./id-CDh0aJOJ.esm.js";
|
|
8
8
|
import "./stats-GJMiTm5k.esm.js";
|
|
9
9
|
|
|
10
10
|
//#region src/setup.ts
|