@incodetech/welcome 1.85.0-20251120160251.0 → 1.85.0-20251121102600.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.
@@ -537,7 +537,7 @@ tokboxApiKey, darkMode, hostingApp, unsafeMode, customHeaders, fingerprintApiKey
537
537
  getPhone: typeof getPhone;
538
538
  renderCaptureFace: typeof renderCaptureFace;
539
539
  renderAuthFace: typeof renderAuthFace;
540
- executeFlow: ({ element, token, onSuccess, onError, onEvent, flow, uiConfig, config, }: {
540
+ executeFlow: ({ element, token, onSuccess, onError, onEvent, flow, uiConfig, config, authHint, }: {
541
541
  element: HTMLElement;
542
542
  token: string;
543
543
  onSuccess: ({ redirectionUrl }: {
@@ -548,6 +548,7 @@ tokboxApiKey, darkMode, hostingApp, unsafeMode, customHeaders, fingerprintApiKey
548
548
  flow?: import('.').Flow;
549
549
  uiConfig?: import('./ui/types').UiConfig;
550
550
  config?: import('./flow/Flow').FlowConfig;
551
+ authHint?: string;
551
552
  }) => Promise<void>;
552
553
  executeWorkflow: ({ element, token, workflowId, apiURL, customModuleCallback, onSuccess, onError, wfConfig, authHint, qrUuid, uuid, redirectUrl, clientId, showFinishScreen, skipDesktopRedirect, }: import('./workflows/executeWorkflow').WorkflowPropsWithToken | import('./workflows/executeWorkflow').WorkflowPropsWithoutToken) => Promise<void>;
553
554
  getWorkflowConfig: ({ token }: {
@@ -17,5 +17,6 @@ type FlowRendererProps = {
17
17
  flow?: Flow;
18
18
  uiConfig?: UiConfig;
19
19
  config?: FlowConfig;
20
+ authHint?: string;
20
21
  };
21
- export declare function FlowRenderer({ token, onError, onSuccess, onEvent, flow: flowFromProps, uiConfig, config, }: FlowRendererProps): import("react/jsx-runtime").JSX.Element;
22
+ export declare function FlowRenderer({ token, onError, onSuccess, onEvent, flow: flowFromProps, uiConfig, config, authHint, }: FlowRendererProps): import("react/jsx-runtime").JSX.Element;
@@ -14,6 +14,7 @@ type ExecuteFlowProps = {
14
14
  flow?: Flow;
15
15
  uiConfig?: UiConfig;
16
16
  config?: FlowConfig;
17
+ authHint?: string;
17
18
  };
18
- declare const executeFlow: ({ element, token, onSuccess, onError, onEvent, flow, uiConfig, config, }: ExecuteFlowProps) => Promise<void>;
19
+ declare const executeFlow: ({ element, token, onSuccess, onError, onEvent, flow, uiConfig, config, authHint, }: ExecuteFlowProps) => Promise<void>;
19
20
  export default executeFlow;
@@ -1,4 +1,4 @@
1
1
  import { FlowModuleConfig } from '../services/flowService';
2
2
  import { ModuleProps } from './types';
3
3
 
4
- export default function AuthenticationModule({ onSuccess, token, finishWithError, }: ModuleProps<FlowModuleConfig['AUTHENTICATION']>): import("react/jsx-runtime").JSX.Element;
4
+ export default function AuthenticationModule({ onSuccess, token, finishWithError, authHint, }: ModuleProps<FlowModuleConfig['AUTHENTICATION']>): import("react/jsx-runtime").JSX.Element;
@@ -13,6 +13,7 @@ type ModuleRendererProps<K extends keyof FlowModuleConfig> = {
13
13
  flow: Flow;
14
14
  uiConfig?: UiConfig;
15
15
  finishWithError: (err: FlowRendererError) => void;
16
+ authHint?: string;
16
17
  };
17
- declare function ModuleRenderer<K extends keyof FlowModuleConfig>({ module, onSuccess, emit, token, onError, flow, uiConfig, finishWithError, }: ModuleRendererProps<K>): import("react/jsx-runtime").JSX.Element;
18
+ declare function ModuleRenderer<K extends keyof FlowModuleConfig>({ module, onSuccess, emit, token, onError, flow, uiConfig, finishWithError, authHint, }: ModuleRendererProps<K>): import("react/jsx-runtime").JSX.Element;
18
19
  export { ModuleRenderer };
@@ -11,4 +11,5 @@ export type ModuleProps<TConfig> = {
11
11
  flow: Flow;
12
12
  uiConfig?: UiConfig;
13
13
  finishWithError: (err: FlowRendererError) => void;
14
+ authHint?: string;
14
15
  };
@@ -7,6 +7,7 @@ export type FlowRedirectProps = {
7
7
  onSuccess: () => void;
8
8
  onSkip?: () => void;
9
9
  mobileQrRedirectUrl?: string;
10
+ authHint?: string;
10
11
  };
11
12
  declare const FlowRedirect: FC<FlowRedirectProps>;
12
13
  export default FlowRedirect;
@@ -16,6 +16,7 @@ type Props = {
16
16
  qrPhishingResistance?: boolean;
17
17
  url?: string;
18
18
  showFinishScreen?: boolean;
19
+ authHint?: string;
19
20
  };
20
- declare const RedirectToMobile: ({ session, disableSmsOption, skipDesktopRedirect, allowSkipRedirect, expired, allowReEnrollment, displayOnboardingResultOnDesktop, qrPhishingResistance, url, showFinishScreen, }: Props) => import("react/jsx-runtime").JSX.Element;
21
+ declare const RedirectToMobile: ({ session, disableSmsOption, skipDesktopRedirect, allowSkipRedirect, expired, allowReEnrollment, displayOnboardingResultOnDesktop, qrPhishingResistance, url, showFinishScreen, authHint, }: Props) => import("react/jsx-runtime").JSX.Element;
21
22
  export default RedirectToMobile;
@@ -8374,7 +8374,7 @@ class MlWasmJSApi {
8374
8374
  );
8375
8375
  }
8376
8376
  }
8377
- const MlWasmJSApi$1 = MlWasmJSApi.getInstance(), version$4 = "1.85.0-20251120160251.0";
8377
+ const MlWasmJSApi$1 = MlWasmJSApi.getInstance(), version$4 = "1.85.0-20251121102600.0";
8378
8378
  function e$2(Be, Le) {
8379
8379
  return function(Ye, tt) {
8380
8380
  return Object.prototype.hasOwnProperty.call(Ye, tt);
@@ -299482,7 +299482,8 @@ const FlowRedirect = ({
299482
299482
  token: Le,
299483
299483
  onSuccess: Ye,
299484
299484
  onSkip: tt,
299485
- mobileQrRedirectUrl: nt
299485
+ mobileQrRedirectUrl: nt,
299486
+ authHint: ft
299486
299487
  }) => /* @__PURE__ */ jsxRuntimeExports.jsx(
299487
299488
  Redirect,
299488
299489
  {
@@ -299494,7 +299495,8 @@ const FlowRedirect = ({
299494
299495
  allowSkipRedirect: Be.addContinueToDesktop,
299495
299496
  expired: !1,
299496
299497
  url: nt,
299497
- qrPhishingResistance: Be.qrPhishingResistance
299498
+ qrPhishingResistance: Be.qrPhishingResistance,
299499
+ authHint: ft
299498
299500
  }
299499
299501
  ), shouldShowFlowRedirect = (Be) => Be ? Be.redirectDesktopToMobile && mobile.isDesktop() : !1, useFlowRedirect = ({
299500
299502
  flow: Be,
@@ -299853,9 +299855,9 @@ function AntifraudModule({
299853
299855
  function AuthenticationModule({
299854
299856
  onSuccess: Be,
299855
299857
  token: Le,
299856
- finishWithError: Ye
299858
+ finishWithError: Ye,
299859
+ authHint: tt
299857
299860
  }) {
299858
- const nt = new URLSearchParams(window.location.search).get("auth_hint");
299859
299861
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
299860
299862
  AuthFace,
299861
299863
  {
@@ -299867,7 +299869,7 @@ function AuthenticationModule({
299867
299869
  });
299868
299870
  },
299869
299871
  session: { token: Le },
299870
- authHint: nt
299872
+ authHint: tt
299871
299873
  }
299872
299874
  );
299873
299875
  }
@@ -364812,11 +364814,12 @@ function ModuleRenderer({
364812
364814
  onError: nt,
364813
364815
  flow: ft,
364814
364816
  uiConfig: ht,
364815
- finishWithError: gt
364817
+ finishWithError: gt,
364818
+ authHint: At
364816
364819
  }) {
364817
- const At = moduleComponents[Be.key] || SkipModule;
364820
+ const xt = moduleComponents[Be.key] || SkipModule;
364818
364821
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
364819
- At,
364822
+ xt,
364820
364823
  {
364821
364824
  config: Be.configuration,
364822
364825
  onSuccess: Le,
@@ -364825,7 +364828,8 @@ function ModuleRenderer({
364825
364828
  onError: nt,
364826
364829
  flow: ft,
364827
364830
  uiConfig: ht,
364828
- finishWithError: gt
364831
+ finishWithError: gt,
364832
+ authHint: At
364829
364833
  },
364830
364834
  Be.key
364831
364835
  );
@@ -364838,60 +364842,63 @@ function FlowRenderer({
364838
364842
  },
364839
364843
  flow: nt,
364840
364844
  uiConfig: ft,
364841
- config: ht
364845
+ config: ht,
364846
+ authHint: gt
364842
364847
  }) {
364843
- const { flow: gt, loading: At, error: xt } = useFlow(Be, nt), [Et, kt] = useState(0), [Ct, yt] = useState(!1), vt = useMemo(() => new FlowLogger(tt), [tt]), { showRedirect: bt, onSkip: It } = useFlowRedirect({
364844
- flow: gt,
364848
+ const { flow: At, loading: xt, error: Et } = useFlow(Be, nt), [kt, Ct] = useState(0), [yt, vt] = useState(!1), bt = useMemo(() => new FlowLogger(tt), [tt]), { showRedirect: It, onSkip: wt } = useFlowRedirect({
364849
+ flow: At,
364845
364850
  forceSkipRedirect: ht == null ? void 0 : ht.forceSkipRedirect
364846
364851
  });
364847
364852
  if (useEffect(() => {
364848
- gt && (vt.flowStarted(gt.flowModules.length), bt ? vt.flowRedirected() : vt.stepStarted(gt.flowModules[0].key, 0, gt.flowModules.length));
364849
- }, [gt, vt, bt]), At) return null;
364850
- if (xt) {
364851
- const Bt = {
364853
+ At && (bt.flowStarted(At.flowModules.length), It ? bt.flowRedirected() : bt.stepStarted(At.flowModules[0].key, 0, At.flowModules.length));
364854
+ }, [At, bt, It]), xt) return null;
364855
+ if (Et) {
364856
+ const Dt = {
364852
364857
  type: "FLOW_LOAD_FAILED",
364853
- message: xt
364858
+ message: Et
364854
364859
  };
364855
- return Le(Bt), vt.flowError(Bt), null;
364856
- }
364857
- if (!gt) return null;
364858
- const wt = gt.flowModules, Tt = wt[Et], Rt = async () => {
364859
- const Bt = wt.length;
364860
- vt.stepCompleted(Tt.key, Et, Bt);
364861
- const Dt = Et + 1;
364862
- if (Dt < Bt)
364863
- vt.stepStarted(wt[Dt].key, Dt, Bt), kt(Dt);
364860
+ return Le(Dt), bt.flowError(Dt), null;
364861
+ }
364862
+ if (!At) return null;
364863
+ const Tt = At.flowModules, Rt = Tt[kt], Bt = async () => {
364864
+ const Dt = Tt.length;
364865
+ bt.stepCompleted(Rt.key, kt, Dt);
364866
+ const Pt = kt + 1;
364867
+ if (Pt < Dt)
364868
+ bt.stepStarted(Tt[Pt].key, Pt, Dt), Ct(Pt);
364864
364869
  else {
364865
- yt(!0);
364866
- const { redirectionUrl: Pt } = await getFinishStatus(void 0, { token: Be });
364867
- vt.flowCompleted(Bt), Ye({ redirectionUrl: Pt });
364870
+ vt(!0);
364871
+ const { redirectionUrl: Nt } = await getFinishStatus(void 0, { token: Be });
364872
+ bt.flowCompleted(Dt), Ye({ redirectionUrl: Nt });
364868
364873
  }
364869
364874
  };
364870
- return Ct ? /* @__PURE__ */ jsxRuntimeExports.jsx(Spinner$6, {}) : bt ? /* @__PURE__ */ jsxRuntimeExports.jsx(
364875
+ return yt ? /* @__PURE__ */ jsxRuntimeExports.jsx(Spinner$6, {}) : It ? /* @__PURE__ */ jsxRuntimeExports.jsx(
364871
364876
  FlowRedirect,
364872
364877
  {
364873
- flow: gt,
364878
+ flow: At,
364874
364879
  token: Be,
364875
- onSuccess: Rt,
364876
- onSkip: It,
364877
- mobileQrRedirectUrl: ht == null ? void 0 : ht.mobileQrRedirectUrl
364880
+ onSuccess: Bt,
364881
+ onSkip: wt,
364882
+ mobileQrRedirectUrl: ht == null ? void 0 : ht.mobileQrRedirectUrl,
364883
+ authHint: gt
364878
364884
  }
364879
364885
  ) : /* @__PURE__ */ jsxRuntimeExports.jsx(
364880
364886
  App$1,
364881
364887
  {
364882
364888
  token: Be,
364883
- disableUnsupportedBrowserScreen: gt == null ? void 0 : gt.disableUnsupportedBrowserScreen,
364889
+ disableUnsupportedBrowserScreen: At == null ? void 0 : At.disableUnsupportedBrowserScreen,
364884
364890
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(FlowDataProvider, { token: Be, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
364885
364891
  ModuleRenderer,
364886
364892
  {
364887
- module: Tt,
364888
- onSuccess: Rt,
364889
- emit: (Bt) => vt.emit(Bt),
364893
+ module: Rt,
364894
+ onSuccess: Bt,
364895
+ emit: (Dt) => bt.emit(Dt),
364890
364896
  token: Be,
364891
- onError: Rt,
364892
- flow: gt,
364897
+ onError: Bt,
364898
+ flow: At,
364893
364899
  uiConfig: ft,
364894
- finishWithError: (Bt) => Le(Bt)
364900
+ finishWithError: (Dt) => Le(Dt),
364901
+ authHint: gt
364895
364902
  }
364896
364903
  ) })
364897
364904
  }
@@ -364905,9 +364912,10 @@ const executeFlow = async ({
364905
364912
  onEvent: nt,
364906
364913
  flow: ft,
364907
364914
  uiConfig: ht,
364908
- config: gt
364915
+ config: gt,
364916
+ authHint: At
364909
364917
  }) => {
364910
- const At = createRoot$1(Be);
364918
+ const xt = createRoot$1(Be);
364911
364919
  customRender(
364912
364920
  /* @__PURE__ */ jsxRuntimeExports.jsx(
364913
364921
  FlowRenderer,
@@ -364918,11 +364926,12 @@ const executeFlow = async ({
364918
364926
  onEvent: nt,
364919
364927
  flow: ft,
364920
364928
  uiConfig: ht,
364921
- config: gt
364929
+ config: gt,
364930
+ authHint: At
364922
364931
  }
364923
364932
  ),
364924
364933
  Be,
364925
- At
364934
+ xt
364926
364935
  );
364927
364936
  };
364928
364937
  function renderForms(Be, { onSuccess: Le, onError: Ye, token: tt, interviewId: nt, flowId: ft, screens: ht }) {
@@ -374917,30 +374926,32 @@ const RedirectToMobile = ({
374917
374926
  displayOnboardingResultOnDesktop: ht,
374918
374927
  qrPhishingResistance: gt,
374919
374928
  url: At,
374920
- showFinishScreen: xt = !0
374929
+ showFinishScreen: xt = !0,
374930
+ authHint: Et
374921
374931
  }) => {
374922
- const { t: Et } = i18n, { nextStep: kt, currentStep: Ct } = useSteps(), { assets: yt } = useAssets({ startSuccess: !0, token: Be });
374923
- return yt ? /* @__PURE__ */ jsxRuntimeExports.jsxs(Steps, { currentStep: Ct, children: [
374932
+ const { t: kt } = i18n, { nextStep: Ct, currentStep: yt } = useSteps(), { assets: vt } = useAssets({ startSuccess: !0, token: Be });
374933
+ return vt ? /* @__PURE__ */ jsxRuntimeExports.jsxs(Steps, { currentStep: yt, children: [
374924
374934
  /* @__PURE__ */ jsxRuntimeExports.jsx(
374925
374935
  Redirect,
374926
374936
  {
374927
374937
  session: Be,
374928
- onSuccess: xt ? kt : emptyFunc,
374938
+ onSuccess: xt ? Ct : emptyFunc,
374929
374939
  showSms: !Le,
374930
374940
  skipDesktopRedirect: Ye,
374931
374941
  allowSkipRedirect: tt,
374932
374942
  allowReEnrollment: ft,
374933
374943
  expired: nt,
374934
- assets: yt,
374944
+ assets: vt,
374935
374945
  qrPhishingResistance: gt,
374936
- url: At
374946
+ url: At,
374947
+ authHint: Et
374937
374948
  }
374938
374949
  ),
374939
374950
  xt && /* @__PURE__ */ jsxRuntimeExports.jsx(
374940
374951
  RedirectedCallFinished,
374941
374952
  {
374942
- title: Be.endScreenTitle || Et("support.thanks"),
374943
- subtitle: Be.endScreenText || Et("support.successFinish"),
374953
+ title: Be.endScreenTitle || kt("support.thanks"),
374954
+ subtitle: Be.endScreenText || kt("support.successFinish"),
374944
374955
  displayOnboardingResultOnDesktop: ht,
374945
374956
  token: Be.token
374946
374957
  }
@@ -375447,7 +375458,8 @@ const RedirectToMobile = ({
375447
375458
  disableSmsOption: (Tt == null ? void 0 : Tt.disableSmsOption) ?? !1,
375448
375459
  qrPhishingResistance: (Tt == null ? void 0 : Tt.qrPhishingResistance) ?? !1,
375449
375460
  url: gt,
375450
- showFinishScreen: Et
375461
+ showFinishScreen: Et,
375462
+ authHint: ht
375451
375463
  }
375452
375464
  ) : /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: getModule({
375453
375465
  currentNode: It,