@forgerock/login-widget 1.0.0-alpha.8 → 1.0.0-beta.1

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/modal.d.ts CHANGED
@@ -562,6 +562,17 @@ interface GetTokensOptions extends ConfigOptions {
562
562
 
563
563
  type Maybe<T> = T | null | undefined;
564
564
 
565
+ interface CallbackMetadata {
566
+ derived: {
567
+ canForceUserInputOptionality: boolean;
568
+ isFirstInvalidInput: boolean;
569
+ isReadyForSubmission: boolean;
570
+ isSelfSubmitting: boolean;
571
+ isUserInputRequired: boolean;
572
+ };
573
+ idx: number;
574
+ platform?: Record<string, unknown>;
575
+ }
565
576
  interface JourneyStoreValue {
566
577
  completed: boolean;
567
578
  error: Maybe<{
@@ -570,20 +581,25 @@ interface JourneyStoreValue {
570
581
  step: Maybe<Step>;
571
582
  }>;
572
583
  loading: boolean;
584
+ metadata: {
585
+ callbacks: CallbackMetadata[];
586
+ step: StepMetadata;
587
+ } | null;
573
588
  step: StepTypes;
574
589
  successful: boolean;
575
590
  response: Maybe<Step>;
576
591
  }
577
- type StepTypes = WidgetStep | FRLoginSuccess | FRLoginFailure | null;
578
- interface WidgetStep extends FRStep {
579
- /**
580
- * TODO: It's complicated, but this `any` is needed for `callback` compatibility with
581
- * the `mapCallbackToComponent`. FRStep types this callback array as `FRCallback[]`
582
- * which is not _exactly_ correct as it's an array of various types of callbacks, all
583
- * which extend FRCallback. So, there are heterogeneous types within the array.
584
- */
585
- callbacks: any[];
592
+ interface StepMetadata {
593
+ derived: {
594
+ isUserInputOptional: boolean;
595
+ isStepSelfSubmittable: boolean;
596
+ numOfCallbacks: number;
597
+ numOfSelfSubmittableCbs: number;
598
+ numOfUserInputCbs: number;
599
+ };
600
+ platform?: Record<string, unknown>;
586
601
  }
602
+ type StepTypes = FRStep | FRLoginSuccess | FRLoginFailure | null;
587
603
 
588
604
  interface OAuthTokenStoreValue {
589
605
  completed: boolean;
@@ -1452,7 +1468,7 @@ declare enum ZodFirstPartyTypeKind {
1452
1468
 
1453
1469
  declare const partialLinksSchema: ZodObject<{
1454
1470
  termsAndConditions: ZodOptional<ZodString>;
1455
- }, "strip", ZodTypeAny, {
1471
+ }, "strict", ZodTypeAny, {
1456
1472
  termsAndConditions?: string | undefined;
1457
1473
  }, {
1458
1474
  termsAndConditions?: string | undefined;
@@ -1799,6 +1815,7 @@ declare const partialStringsSchema: ZodObject<{
1799
1815
  dontHaveAnAccount: ZodOptional<ZodString>;
1800
1816
  closeModal: ZodOptional<ZodString>;
1801
1817
  chooseDifferentUsername: ZodOptional<ZodString>;
1818
+ confirmPassword: ZodOptional<ZodString>;
1802
1819
  constraintViolationForPassword: ZodOptional<ZodString>;
1803
1820
  constraintViolationForValue: ZodOptional<ZodString>;
1804
1821
  continueWith: ZodOptional<ZodString>;
@@ -1865,6 +1882,7 @@ declare const partialStringsSchema: ZodObject<{
1865
1882
  dontHaveAnAccount?: string | undefined;
1866
1883
  closeModal?: string | undefined;
1867
1884
  chooseDifferentUsername?: string | undefined;
1885
+ confirmPassword?: string | undefined;
1868
1886
  constraintViolationForPassword?: string | undefined;
1869
1887
  constraintViolationForValue?: string | undefined;
1870
1888
  continueWith?: string | undefined;
@@ -1929,6 +1947,7 @@ declare const partialStringsSchema: ZodObject<{
1929
1947
  dontHaveAnAccount?: string | undefined;
1930
1948
  closeModal?: string | undefined;
1931
1949
  chooseDifferentUsername?: string | undefined;
1950
+ confirmPassword?: string | undefined;
1932
1951
  constraintViolationForPassword?: string | undefined;
1933
1952
  constraintViolationForValue?: string | undefined;
1934
1953
  continueWith?: string | undefined;
@@ -2014,7 +2033,7 @@ declare const __propDef: {
2014
2033
  config: TypeOf<typeof partialConfigSchema>;
2015
2034
  content: TypeOf<typeof partialStringsSchema>;
2016
2035
  journeys?: TypeOf<typeof journeyConfigSchema> | undefined;
2017
- links: TypeOf<typeof partialLinksSchema>;
2036
+ links?: TypeOf<typeof partialLinksSchema> | undefined;
2018
2037
  style?: Style | undefined;
2019
2038
  };
2020
2039
  events: {