@forgerock/login-widget 1.0.0-alpha.7 → 1.0.0-alpha.9

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/inline.d.ts CHANGED
@@ -540,6 +540,17 @@ interface GetTokensOptions extends ConfigOptions {
540
540
 
541
541
  type Maybe<T> = T | null | undefined;
542
542
 
543
+ interface CallbackMetadata {
544
+ derived: {
545
+ canForceUserInputOptionality: boolean;
546
+ isFirstInvalidInput: boolean;
547
+ isReadyForSubmission: boolean;
548
+ isSelfSubmitting: boolean;
549
+ isUserInputRequired: boolean;
550
+ };
551
+ idx: number;
552
+ platform?: Record<string, unknown>;
553
+ }
543
554
  interface JourneyStoreValue {
544
555
  completed: boolean;
545
556
  error: Maybe<{
@@ -548,20 +559,25 @@ interface JourneyStoreValue {
548
559
  step: Maybe<Step>;
549
560
  }>;
550
561
  loading: boolean;
562
+ metadata: {
563
+ callbacks: CallbackMetadata[];
564
+ step: StepMetadata;
565
+ } | null;
551
566
  step: StepTypes;
552
567
  successful: boolean;
553
568
  response: Maybe<Step>;
554
569
  }
555
- type StepTypes = WidgetStep | FRLoginSuccess | FRLoginFailure | null;
556
- interface WidgetStep extends FRStep {
557
- /**
558
- * TODO: It's complicated, but this `any` is needed for `callback` compatibility with
559
- * the `mapCallbackToComponent`. FRStep types this callback array as `FRCallback[]`
560
- * which is not _exactly_ correct as it's an array of various types of callbacks, all
561
- * which extend FRCallback. So, there are heterogeneous types within the array.
562
- */
563
- callbacks: any[];
570
+ interface StepMetadata {
571
+ derived: {
572
+ isUserInputOptional: boolean;
573
+ isStepSelfSubmittable: boolean;
574
+ numOfCallbacks: number;
575
+ numOfSelfSubmittableCbs: number;
576
+ numOfUserInputCbs: number;
577
+ };
578
+ platform?: Record<string, unknown>;
564
579
  }
580
+ type StepTypes = FRStep | FRLoginSuccess | FRLoginFailure | null;
565
581
 
566
582
  interface OAuthTokenStoreValue {
567
583
  completed: boolean;
@@ -1777,6 +1793,7 @@ declare const partialStringsSchema: ZodObject<{
1777
1793
  dontHaveAnAccount: ZodOptional<ZodString>;
1778
1794
  closeModal: ZodOptional<ZodString>;
1779
1795
  chooseDifferentUsername: ZodOptional<ZodString>;
1796
+ confirmPassword: ZodOptional<ZodString>;
1780
1797
  constraintViolationForPassword: ZodOptional<ZodString>;
1781
1798
  constraintViolationForValue: ZodOptional<ZodString>;
1782
1799
  continueWith: ZodOptional<ZodString>;
@@ -1843,6 +1860,7 @@ declare const partialStringsSchema: ZodObject<{
1843
1860
  dontHaveAnAccount?: string | undefined;
1844
1861
  closeModal?: string | undefined;
1845
1862
  chooseDifferentUsername?: string | undefined;
1863
+ confirmPassword?: string | undefined;
1846
1864
  constraintViolationForPassword?: string | undefined;
1847
1865
  constraintViolationForValue?: string | undefined;
1848
1866
  continueWith?: string | undefined;
@@ -1907,6 +1925,7 @@ declare const partialStringsSchema: ZodObject<{
1907
1925
  dontHaveAnAccount?: string | undefined;
1908
1926
  closeModal?: string | undefined;
1909
1927
  chooseDifferentUsername?: string | undefined;
1928
+ confirmPassword?: string | undefined;
1910
1929
  constraintViolationForPassword?: string | undefined;
1911
1930
  constraintViolationForValue?: string | undefined;
1912
1931
  continueWith?: string | undefined;