@incodetech/core 0.0.0-dev-20260804-177eb012 → 0.0.0-dev-20260806-08b62a2b

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 (63) hide show
  1. package/dist/{BrowserDiagnosticsCryptoProvider-BZqV7sJR.esm.js → BrowserDiagnosticsCryptoProvider-Ch42wEyl.esm.js} +1 -2
  2. package/dist/ae-signature.esm.js +1 -1
  3. package/dist/{apiError-qp8Z828t.esm.js → apiError-BOW2vwsf.esm.js} +1 -1
  4. package/dist/authentication.esm.js +2 -2
  5. package/dist/{authenticationManager-BzFhg9yK.esm.js → authenticationManager-B65U8pcl.esm.js} +2 -2
  6. package/dist/{authenticationStateMachine-C8KY3BQH.esm.js → authenticationStateMachine-B6Ecxprr.esm.js} +2 -2
  7. package/dist/consent.d.ts +1 -1
  8. package/dist/{consentManager-3Pbtj-RV.d.ts → consentManager-uhDPdU6i.d.ts} +4 -4
  9. package/dist/{deepsightLoader-Cdth1XqO.esm.js → deepsightLoader-DK78BV3O.esm.js} +3 -3
  10. package/dist/document-capture.d.ts +1 -1
  11. package/dist/document-upload.d.ts +4 -4
  12. package/dist/{documentCaptureManager-B-J1lXcH.d.ts → documentCaptureManager-pEqMY_Oo.d.ts} +4 -4
  13. package/dist/dynamic-forms.esm.js +2 -2
  14. package/dist/{dynamicFormsManager-ByUTzSNY.esm.js → dynamicFormsManager-Dl6m9k4L.esm.js} +1 -1
  15. package/dist/{dynamicFormsStateMachine-YkxwkKk_.esm.js → dynamicFormsStateMachine-CFYR338Y.esm.js} +1 -1
  16. package/dist/ekyb.esm.js +3 -3
  17. package/dist/{ekybManager-C5YFZvpX.esm.js → ekybManager-DxtCCSlk.esm.js} +1 -1
  18. package/dist/{ekybStateMachine-xKI3fmbD.esm.js → ekybStateMachine-CRizwpjD.esm.js} +1 -1
  19. package/dist/electronic-signature.esm.js +1 -1
  20. package/dist/{electronicSignatureManager-CRsn7IrI.esm.js → electronicSignatureManager-B6dTT_UC.esm.js} +1 -1
  21. package/dist/extensibility.d.ts +3 -3
  22. package/dist/extensibility.esm.js +9 -9
  23. package/dist/{faceCaptureManagerFactory-CYmsy-tv.esm.js → faceCaptureManagerFactory-CBFJA1F-.esm.js} +1 -1
  24. package/dist/{faceCaptureSetup-fbtI2WfQ.esm.js → faceCaptureSetup-zocIFz7T.esm.js} +2 -2
  25. package/dist/flow.esm.js +3 -3
  26. package/dist/{flowCompletionService-C96XV7wT.esm.js → flowCompletionService-CUsvlxGK.esm.js} +1 -1
  27. package/dist/{flowServices-C4_82oGS.esm.js → flowServices-2jYVtGqt.esm.js} +3 -3
  28. package/dist/geolocation.esm.js +2 -2
  29. package/dist/{geolocationManager-DMdsIldY.esm.js → geolocationManager-BYqGd127.esm.js} +1 -1
  30. package/dist/{geolocationStateMachine-WOe8_QgL.esm.js → geolocationStateMachine-DpFd7unq.esm.js} +1 -1
  31. package/dist/id-selfie-flow.d.ts +1 -1
  32. package/dist/id-selfie-flow.esm.js +7 -7
  33. package/dist/id.esm.js +3 -3
  34. package/dist/{idCaptureManager-BIJo891d.esm.js → idCaptureManager-BnMbgEpS.esm.js} +1 -1
  35. package/dist/{idCaptureServices-acrkNUTH.esm.js → idCaptureServices-axBSPSZw.esm.js} +2 -2
  36. package/dist/{idCaptureStateMachine-CoX_o4MR.esm.js → idCaptureStateMachine-B2MKQ3Rr.esm.js} +7 -7
  37. package/dist/index.esm.js +1 -1
  38. package/dist/mandatory-consent.d.ts +1 -1
  39. package/dist/{mandatoryConsentManager-DyPzUmsZ.d.ts → mandatoryConsentManager-B29kR0XA.d.ts} +4 -4
  40. package/dist/{onDeviceFaceResults-CrSi9d8M.esm.js → onDeviceFaceResults-CUPd_2jD.esm.js} +3 -3
  41. package/dist/personhood.esm.js +3 -3
  42. package/dist/qe-signature.esm.js +1 -1
  43. package/dist/{recordingService-w-84scs6.esm.js → recordingService-DK9_-H1q.esm.js} +1 -1
  44. package/dist/{runChildModule-B7TdhdJh.esm.js → runChildModule-7v6tkv4P.esm.js} +1 -1
  45. package/dist/selfie.esm.js +5 -5
  46. package/dist/{selfieErrorUtils-DggLa9pg.esm.js → selfieErrorUtils-EEHiYwTi.esm.js} +11 -2
  47. package/dist/{selfieManager-BjzolRxU.esm.js → selfieManager-lue39e9U.esm.js} +2 -2
  48. package/dist/{selfieStateMachine-CJkfG2Ed.esm.js → selfieStateMachine-CXxoAykj.esm.js} +3 -3
  49. package/dist/{session-CiObMfq3.esm.js → session-Df5wJr9n.esm.js} +4 -4
  50. package/dist/session.esm.js +4 -4
  51. package/dist/{sessionInitializer-B2LGDRyB.esm.js → sessionInitializer-FNV1-S0f.esm.js} +2 -2
  52. package/dist/{setup-EktXQNTl.esm.js → setup-CeTcNm0_.esm.js} +12 -10
  53. package/dist/trueSight-DBFn5PSk.esm.js +1 -0
  54. package/dist/{trueSightService-JQYBE_kV.esm.js → trueSightService-QWtkh-8t.esm.js} +2 -2
  55. package/dist/video-selfie.d.ts +34 -10
  56. package/dist/video-selfie.esm.js +280 -64
  57. package/dist/{videoSelfieCameraWarmer-DyDChaVU.esm.js → videoSelfieCameraWarmer-C8xP4bQI.esm.js} +49 -12
  58. package/dist/{videoSelfieStepDetector-144x423X.d.ts → videoSelfieStepDetector-OoiAbUo2.d.ts} +8 -2
  59. package/dist/wasm.esm.js +1 -1
  60. package/dist/workflow.d.ts +4 -4
  61. package/dist/workflow.esm.js +14 -14
  62. package/package.json +3 -3
  63. package/dist/trueSight-mqjLK_4M.esm.js +0 -1
@@ -1,4 +1,4 @@
1
- import { a as QE_CONSENT_KEYS, c as getDefaultConsentChecks, o as areAllConsented, r as electronicSignatureMachine, t as createElectronicSignatureManager } from "./electronicSignatureManager-CRsn7IrI.esm.js";
1
+ import { a as QE_CONSENT_KEYS, c as getDefaultConsentChecks, o as areAllConsented, r as electronicSignatureMachine, t as createElectronicSignatureManager } from "./electronicSignatureManager-B6dTT_UC.esm.js";
2
2
  //#region src/modules/qe-signature/index.ts
3
3
  function createQeSignatureManager(options) {
4
4
  return createElectronicSignatureManager({ config: {
@@ -1,5 +1,5 @@
1
1
  import { t as isAndroid } from "./platform-Cd_yWGNG.esm.js";
2
- import { d as stopRecording, g as uploadDeepsightVideo, u as startRecordingSession } from "./onDeviceFaceResults-CrSi9d8M.esm.js";
2
+ import { d as stopRecording, g as uploadDeepsightVideo, u as startRecordingSession } from "./onDeviceFaceResults-CUPd_2jD.esm.js";
3
3
  import { t as getAdaptiveMediaRecorderOptions } from "./mediaRecorderOptions-CUsftWlH.esm.js";
4
4
  //#region ../infra/src/media/VideoTrimmer.ts
5
5
  async function getDurationBySeek(videoBlob) {
@@ -1,5 +1,5 @@
1
1
  import { t as getTimestamp } from "./IBrowserEnvironmentCapability-DEaRRk-R.esm.js";
2
- import { a as notifyTrueSightManagerStopped, i as notifyTrueSightFlowEvent } from "./trueSightService-JQYBE_kV.esm.js";
2
+ import { a as notifyTrueSightManagerStopped, i as notifyTrueSightFlowEvent } from "./trueSightService-QWtkh-8t.esm.js";
3
3
  import { C as createEventBus } from "./events-ethtfu2b.esm.js";
4
4
  import { o as createActor } from "./xstate.esm-Cf4e0Cfd.esm.js";
5
5
  import { t as fromCallback } from "./xstate-actors.esm-CtI5S0f4.esm.js";
@@ -3,11 +3,11 @@ import { t as BrowserStorageProvider } from "./BrowserStorageProvider-k-FDkC4W.e
3
3
  import { n as eventModuleNames } from "./events-ethtfu2b.esm.js";
4
4
  import { o as createActor, r as assign } from "./xstate.esm-Cf4e0Cfd.esm.js";
5
5
  import { n as fromPromise } from "./xstate-actors.esm-CtI5S0f4.esm.js";
6
- import { t as faceCaptureMachine } from "./faceCaptureSetup-fbtI2WfQ.esm.js";
7
- import { t as createFaceCaptureManagerFromActor } from "./faceCaptureManagerFactory-CYmsy-tv.esm.js";
8
- import { r as processFace } from "./selfieErrorUtils-DggLa9pg.esm.js";
9
- import { t as selfieMachine } from "./selfieStateMachine-CJkfG2Ed.esm.js";
10
- import { n as createSelfieManagerFromActor, t as createSelfieManager } from "./selfieManager-BjzolRxU.esm.js";
6
+ import { t as faceCaptureMachine } from "./faceCaptureSetup-zocIFz7T.esm.js";
7
+ import { t as createFaceCaptureManagerFromActor } from "./faceCaptureManagerFactory-CBFJA1F-.esm.js";
8
+ import { r as processFace } from "./selfieErrorUtils-EEHiYwTi.esm.js";
9
+ import { t as selfieMachine } from "./selfieStateMachine-CXxoAykj.esm.js";
10
+ import { n as createSelfieManagerFromActor, t as createSelfieManager } from "./selfieManager-lue39e9U.esm.js";
11
11
  import { t as invokeOnCaptureCallback } from "./invokeOnCaptureCallback-DVtdZdpI.esm.js";
12
12
  //#region src/modules/selfie/selfieCaptureOnlyStateMachine.ts
13
13
  /**
@@ -32,10 +32,19 @@ async function uploadSelfie({ encryptedBase64Image, faceCoordinates, signal, met
32
32
  return res.data;
33
33
  } catch (error) {
34
34
  const errorCode = getFaceErrorCodeFromHttpError(error);
35
- if (errorCode) throw new Error(errorCode);
36
- throw new Error(FACE_ERROR_CODES.SERVER);
35
+ throw withTransportStatus(new Error(errorCode ?? FACE_ERROR_CODES.SERVER), error);
37
36
  }
38
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
+ }
39
48
  const getFaceErrorCodeFromHttpError = (error) => {
40
49
  const err = error;
41
50
  if (err.ok !== false || typeof err.status !== "number") return;
@@ -2,8 +2,8 @@ import { r as WasmUtilProvider } from "./safeStorage-Ep56I-f_.esm.js";
2
2
  import { t as BrowserStorageProvider } from "./BrowserStorageProvider-k-FDkC4W.esm.js";
3
3
  import { n as eventModuleNames } from "./events-ethtfu2b.esm.js";
4
4
  import { o as createActor } from "./xstate.esm-Cf4e0Cfd.esm.js";
5
- import { t as createFaceCaptureManagerFromActor } from "./faceCaptureManagerFactory-CYmsy-tv.esm.js";
6
- import { t as selfieMachine } from "./selfieStateMachine-CJkfG2Ed.esm.js";
5
+ import { t as createFaceCaptureManagerFromActor } from "./faceCaptureManagerFactory-CBFJA1F-.esm.js";
6
+ import { t as selfieMachine } from "./selfieStateMachine-CXxoAykj.esm.js";
7
7
  //#region src/modules/selfie/selfieActor.ts
8
8
  function createSelfieActor(options) {
9
9
  const dependencies = options.dependencies ?? {
@@ -1,9 +1,9 @@
1
1
  import { r as assign } from "./xstate.esm-Cf4e0Cfd.esm.js";
2
2
  import { n as fromPromise } from "./xstate-actors.esm-CtI5S0f4.esm.js";
3
- import { t as faceCaptureMachine } from "./faceCaptureSetup-fbtI2WfQ.esm.js";
4
- import { i as prepareOnDeviceFaceUpload, n as isOnDeviceMode, r as postOnDeviceFaceResults, t as defaultPrepareFaceUpload } from "./onDeviceFaceResults-CrSi9d8M.esm.js";
3
+ import { t as faceCaptureMachine } from "./faceCaptureSetup-zocIFz7T.esm.js";
4
+ import { i as prepareOnDeviceFaceUpload, n as isOnDeviceMode, r as postOnDeviceFaceResults, t as defaultPrepareFaceUpload } from "./onDeviceFaceResults-CUPd_2jD.esm.js";
5
5
  import { t as FACE_ERROR_CODES } from "./types-BN5RPPIZ.esm.js";
6
- import { i as uploadSelfie, n as validateUploadResponse, r as processFace } from "./selfieErrorUtils-DggLa9pg.esm.js";
6
+ import { i as uploadSelfie, n as validateUploadResponse, r as processFace } from "./selfieErrorUtils-EEHiYwTi.esm.js";
7
7
  /**
8
8
  * The selfie capture state machine.
9
9
  *
@@ -1,9 +1,9 @@
1
1
  import { n as getApi } from "./api-Bx3gKW_y.esm.js";
2
- import { h as noteSessionCreated, l as trueSightLog } from "./trueSightService-JQYBE_kV.esm.js";
3
- import "./sessionInitializer-B2LGDRyB.esm.js";
2
+ import { h as noteSessionCreated, l as trueSightLog } from "./trueSightService-QWtkh-8t.esm.js";
3
+ import "./sessionInitializer-FNV1-S0f.esm.js";
4
4
  import { t as endpoints } from "./endpoints-CCzL3XD_.esm.js";
5
- import "./trueSight-mqjLK_4M.esm.js";
6
- import { r as toIncodeApiError } from "./apiError-qp8Z828t.esm.js";
5
+ import "./trueSight-DBFn5PSk.esm.js";
6
+ import { r as toIncodeApiError } from "./apiError-BOW2vwsf.esm.js";
7
7
  //#region src/internal/session/sessionService.ts
8
8
  /**
9
9
  * HTTP status codes the QR validation endpoint emits, keyed by their semantic
@@ -1,5 +1,5 @@
1
- import { i as initializeSession } from "./sessionInitializer-B2LGDRyB.esm.js";
2
- import { t as IncodeApiError } from "./apiError-qp8Z828t.esm.js";
3
- import { a as refreshQrUrlUuid, i as createSession, n as QrValidationError, o as validateQrUuid, r as bootstrapSession, t as QR_VALIDATION_ERROR_CODES } from "./session-CiObMfq3.esm.js";
4
- import { n as getFinishStatus } from "./flowCompletionService-C96XV7wT.esm.js";
1
+ import { i as initializeSession } from "./sessionInitializer-FNV1-S0f.esm.js";
2
+ import { t as IncodeApiError } from "./apiError-BOW2vwsf.esm.js";
3
+ import { a as refreshQrUrlUuid, i as createSession, n as QrValidationError, o as validateQrUuid, r as bootstrapSession, t as QR_VALIDATION_ERROR_CODES } from "./session-Df5wJr9n.esm.js";
4
+ import { n as getFinishStatus } from "./flowCompletionService-CUsvlxGK.esm.js";
5
5
  export { IncodeApiError, QR_VALIDATION_ERROR_CODES, QrValidationError, bootstrapSession, createSession, getFinishStatus, initializeSession, refreshQrUrlUuid, validateQrUuid };
@@ -1,9 +1,9 @@
1
1
  import { _ as updateFeatureManagementUser } from "./feature-management-CFRmD8Nr.esm.js";
2
2
  import { c as setToken, r as getToken, t as api } from "./api-Bx3gKW_y.esm.js";
3
- import { _ as noteTokenActivated, d as fetchFeatureConfig, f as isFeatureEnabled, l as trueSightLog, m as noteEnvironment, p as resetFeatureConfigCache, s as startTrueSightCollection, v as SDK_VERSION } from "./trueSightService-JQYBE_kV.esm.js";
3
+ import { _ as noteTokenActivated, d as fetchFeatureConfig, f as isFeatureEnabled, l as trueSightLog, m as noteEnvironment, p as resetFeatureConfigCache, s as startTrueSightCollection, v as SDK_VERSION } from "./trueSightService-QWtkh-8t.esm.js";
4
4
  import { v as addEvent, y as getAnalyticsBatcher } from "./events-ethtfu2b.esm.js";
5
5
  import { t as endpoints } from "./endpoints-CCzL3XD_.esm.js";
6
- import "./trueSight-mqjLK_4M.esm.js";
6
+ import "./trueSight-DBFn5PSk.esm.js";
7
7
  import { n as flushDeviceStatsQueue, r as resetDeviceStatsQueue } from "./stats-B0nFKawG.esm.js";
8
8
  import { n as UAParser, t as getParsedUserAgent } from "./getParsedUserAgent-pJjATANs.esm.js";
9
9
  import { r as isIOS } from "./platform-Cd_yWGNG.esm.js";
@@ -5,14 +5,14 @@ import { t as BrowserTimerProvider } from "./BrowserTimerProvider-BXhgNxLt.esm.j
5
5
  import { b as resetEnvironment, d as initializeFeatureManagement, h as resetFeatureManagementProviderInstance, l as getIsFeatureManagementLocked, m as resetFeatureManagement, p as optOutFeatureManagement, v as applyEnvironment, y as getEnvironment } from "./feature-management-CFRmD8Nr.esm.js";
6
6
  import { t as getTimestamp } from "./IBrowserEnvironmentCapability-DEaRRk-R.esm.js";
7
7
  import { a as resetApi, i as isApiConfigured, n as getApi, r as getToken, s as setHttpRequestObserver, t as api } from "./api-Bx3gKW_y.esm.js";
8
- import { C as upgradeToWasmHttpClient$1, S as resetHttpClientState, b as getStoredHttpConfig, g as noteTestingSignals, l as trueSightLog, n as initializeTrueSightDiagnostics, o as resetTrueSight, t as finalizeTrueSight, u as categoryForEndpoint, x as installFreshHttpClient } from "./trueSightService-JQYBE_kV.esm.js";
8
+ import { C as upgradeToWasmHttpClient$1, S as resetHttpClientState, b as getStoredHttpConfig, g as noteTestingSignals, l as trueSightLog, n as initializeTrueSightDiagnostics, o as resetTrueSight, t as finalizeTrueSight, u as categoryForEndpoint, x as installFreshHttpClient } from "./trueSightService-QWtkh-8t.esm.js";
9
9
  import { b as resetAnalyticsBatcher, c as resetExperimentAssignments, x as setAnalyticsBatcher, y as getAnalyticsBatcher } from "./events-ethtfu2b.esm.js";
10
- import { a as resetSessionInit, d as resolveStandaloneFlowPolicy, f as setStandaloneFlowPolicy, i as initializeSession, l as registerFlowPreloader, o as setClientFingerprintEnabled, s as setClientIpLookupEnabled, u as resetStandaloneFlowPolicy, v as BrowserEnvironmentProvider } from "./sessionInitializer-B2LGDRyB.esm.js";
10
+ import { a as resetSessionInit, d as resolveStandaloneFlowPolicy, f as setStandaloneFlowPolicy, i as initializeSession, l as registerFlowPreloader, o as setClientFingerprintEnabled, s as setClientIpLookupEnabled, u as resetStandaloneFlowPolicy, v as BrowserEnvironmentProvider } from "./sessionInitializer-FNV1-S0f.esm.js";
11
11
  import { t as endpoints } from "./endpoints-CCzL3XD_.esm.js";
12
- import "./trueSight-mqjLK_4M.esm.js";
12
+ import "./trueSight-DBFn5PSk.esm.js";
13
13
  import { r as resetDeviceStatsQueue, t as addDeviceStats } from "./stats-B0nFKawG.esm.js";
14
14
  import { a as resetTRI, n as initializeTRI, o as resetTRIProviderInstance } from "./tri-4RsGrIt6.esm.js";
15
- import { n as preloadDashboardFlow, r as resetDashboardFlowCache } from "./flowServices-C4_82oGS.esm.js";
15
+ import { n as preloadDashboardFlow, r as resetDashboardFlowCache } from "./flowServices-2jYVtGqt.esm.js";
16
16
  //#region ../infra/src/providers/browser/BrowserPageLifecycleProvider.ts
17
17
  var BrowserPageLifecycleProvider = class {
18
18
  sendBeacon(url, body, contentType = "application/json") {
@@ -205,15 +205,17 @@ async function uploadVideoSelfiePart(session, partNumber, chunk) {
205
205
  };
206
206
  }
207
207
  /**
208
- * Finalizes the upload. `parts` must be in ascending `partNumber` order, or
209
- * S3 reassembly fails. The service already knows which parts it stored — the
210
- * list sent here is only cross-checked. Returns the server-reported status.
208
+ * Finalizes the upload. The service assembles from the parts it stored; the
209
+ * optional `parts` list is deliberately NOT sent — chunks staged below the
210
+ * S3 minimum are combined and renumbered server-side, so a client-side list
211
+ * could contradict the authoritative one. Safe to repeat if the response
212
+ * was lost. Returns the server-reported status. Rejects with `400` naming a
213
+ * missing part when the sequence has a hole.
211
214
  */
212
- async function completeVideoSelfieUpload(session, parts) {
215
+ async function completeVideoSelfieUpload(session) {
213
216
  return (await api.post(uploadUrl(endpoints.videoSelfieUploadComplete), {
214
217
  uploadId: session.uploadId,
215
- epoch: session.epoch,
216
- parts
218
+ epoch: session.epoch
217
219
  })).data.status;
218
220
  }
219
221
  /**
@@ -0,0 +1 @@
1
+ import "./trueSightService-QWtkh-8t.esm.js";
@@ -727,7 +727,7 @@ function epochMsToIsoString(epochMs) {
727
727
  }
728
728
  //#endregion
729
729
  //#region src/internal/version/sdkVersion.ts
730
- const SDK_VERSION = "0.0.0-dev-20260804-177eb012";
730
+ const SDK_VERSION = "0.0.0-dev-20260806-08b62a2b";
731
731
  //#endregion
732
732
  //#region src/internal/trueSight/recordBuilder.ts
733
733
  /**
@@ -1322,7 +1322,7 @@ let cryptoProviderPromise = null;
1322
1322
  * the service's prewarm).
1323
1323
  */
1324
1324
  function loadDiagnosticsCryptoProvider() {
1325
- cryptoProviderPromise ??= import("./BrowserDiagnosticsCryptoProvider-BZqV7sJR.esm.js").then((module) => new module.BrowserDiagnosticsCryptoProvider());
1325
+ cryptoProviderPromise ??= import("./BrowserDiagnosticsCryptoProvider-Ch42wEyl.esm.js").then((module) => new module.BrowserDiagnosticsCryptoProvider());
1326
1326
  return cryptoProviderPromise;
1327
1327
  }
1328
1328
  /**
@@ -4,12 +4,13 @@ import "./StateMachine-EDpYWy0i.js";
4
4
  import "./Actor-iTq7YY48.js";
5
5
  import { t as CameraStream } from "./camera-9wWD-pwg.js";
6
6
  import { t as DetectionOrientation } from "./IIdCaptureCapability-Cj_aceph.js";
7
- import { a as FacingMode, i as CameraCompositor, n as VideoSelfieDetectionStatus, o as VideoSelfieConfig, r as VideoSelfieValidationFailure, s as VideoSelfieStep, t as StepDetector } from "./videoSelfieStepDetector-144x423X.js";
7
+ import { a as FacingMode, i as CameraCompositor, n as VideoSelfieDetectionStatus, o as VideoSelfieConfig, r as VideoSelfieValidationFailure, s as VideoSelfieStep, t as StepDetector } from "./videoSelfieStepDetector-OoiAbUo2.js";
8
8
  //#region src/internal/recordings/multipartRecordingService.d.ts
9
9
  type MultipartRecordingResult = {
10
10
  /**
11
11
  * The completed upload's id, or `null` if recording produced no parts, a
12
- * part upload failed, or finalization failed.
12
+ * chunk could not be delivered even after the retry rounds, or
13
+ * finalization failed.
13
14
  */
14
15
  recordingId: string | null;
15
16
  };
@@ -23,27 +24,37 @@ type MultipartRecordingResult = {
23
24
  * / `OpenViduRecordingService`) — it is the replacement for server-side
24
25
  * (OpenVidu) recording, not a sibling of it.
25
26
  *
26
- * Parts upload concurrently with recording, so `stop()` only flushes the final
27
- * part and finalizes — keeping the whole session inside the server's
28
- * video-selfie timeout regardless of length, with client memory bounded to
29
- * ~one part. No client-side encryption: video is encrypted at rest server-side
27
+ * Every ~1 s recorder blob uploads as its own chunk, concurrently with
28
+ * recording, through {@link VideoSelfieChunkUploader} (keep-until-ack +
29
+ * retry with backoff — see its doc for the full policy). The service stages
30
+ * sub-5 MiB chunks and combines them server-side, so `stop()` only drains
31
+ * the stragglers and finalizes; client memory holds un-acked chunks only.
32
+ * No client-side encryption: video is encrypted at rest server-side
30
33
  * (S3 SSE-AES-256).
31
34
  */
32
35
  declare class MultipartRecordingService {
33
36
  private recorder;
37
+ private timer;
34
38
  private session;
35
- private parts;
36
- private inflight;
37
- private uploadFailed;
39
+ private uploader;
40
+ private chunksEmitted;
38
41
  get isRecording(): boolean;
39
42
  start(stream: MediaStream): Promise<void>;
40
43
  stop(): Promise<MultipartRecordingResult>;
41
44
  cleanup(): void;
45
+ /**
46
+ * `complete` is idempotent server-side ("safe to repeat if the response
47
+ * was lost"), so transient failures — network errors, 5xx, 429 — retry a
48
+ * couple of times before the recording is declared failed. A 4xx (e.g.
49
+ * `400` naming a missing part) is permanent: after a clean drain every
50
+ * chunk was acked, so a reported hole cannot be filled from here.
51
+ */
52
+ private completeWithRetry;
42
53
  /**
43
54
  * Fire-and-forget abort: the upload can no longer complete, so tell the
44
55
  * backend to fail it immediately rather than at its expiry. Best-effort —
45
56
  * an abort that doesn't land (including a 409 from a newer epoch having
46
- * taken over) just means the server falls back to expiry.
57
+ * taken over) just means the server falls back to expiry or salvage.
47
58
  */
48
59
  private abandonUpload;
49
60
  }
@@ -58,6 +69,13 @@ type VideoSelfieRecordingDependencies = {
58
69
  /** Minimum time to hold the switching-camera screen before resuming capture. */
59
70
  switchingCameraMinDwellMs?: number;
60
71
  };
72
+ /**
73
+ * Why the module errored: `connection` means a transport-level failure the
74
+ * user can fix by getting back online (the UI shows the connection-error
75
+ * copy); `technical` is everything else (raw detail stays in `error` for
76
+ * diagnostics/hosts, the UI shows its generic fallback).
77
+ */
78
+ type VideoSelfieErrorKind = 'connection' | 'technical';
61
79
  //#endregion
62
80
  //#region src/modules/video-selfie/videoSelfieRecordingActor.d.ts
63
81
  type CreateVideoSelfieRecordingActorOptions = {
@@ -100,6 +118,12 @@ type VideoSelfieRecordingState = {
100
118
  recordingId: string | null;
101
119
  /** Failure detail, set when `status === 'error'`. */
102
120
  error: string | undefined;
121
+ /**
122
+ * Why the module errored: `connection` (transport failure — the UI shows
123
+ * the connection-error copy; raw detail stays in `error` for diagnostics)
124
+ * or `technical` (everything else). Set when `status === 'error'`.
125
+ */
126
+ errorKind: VideoSelfieErrorKind | undefined;
103
127
  };
104
128
  /**
105
129
  * Creates a manager for a multi-step, camera-switching Video Selfie recording.