@aws-amplify/ui 3.0.9 → 3.0.10

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/index.d.ts CHANGED
@@ -70,6 +70,7 @@ interface ServicesContext {
70
70
  interface BaseFormContext {
71
71
  authAttributes?: Record<string, any>;
72
72
  challengeName?: string;
73
+ requiredAttributes?: Array<string>;
73
74
  formValues?: AuthFormData;
74
75
  touched?: AuthFormData;
75
76
  intent?: string;
@@ -143,6 +144,7 @@ interface AuthEvent {
143
144
  }
144
145
  declare type AuthMachineState = State<AuthContext, AuthEvent>;
145
146
  declare type AuthInterpreter = Interpreter<AuthContext, any, AuthEvent>;
147
+ declare type AuthMachineSend = AuthInterpreter['send'];
146
148
 
147
149
  declare type NoInfer<T> = [T][T extends any ? 0 : never];
148
150
 
@@ -239,6 +241,15 @@ declare const getServiceFacade: ({ send, state }: {
239
241
  toSignUp: (data?: AuthEventData) => void;
240
242
  skipVerification: (data?: AuthEventData) => void;
241
243
  };
244
+ /**
245
+ * Listens to external auth Hub events and sends corresponding event to
246
+ * the `authService` of interest
247
+ *
248
+ * @param send - `send` function associated with the `authService` of interest
249
+ *
250
+ * @returns function that unsubscribes to the hub evenmt
251
+ */
252
+ declare const listenToAuthHub: (send: AuthMachineSend) => () => void;
242
253
 
243
254
  declare type ContactMethod = 'Email' | 'Phone Number';
244
255
  declare const censorAllButFirstAndLast: (value: string) => string;
@@ -830,4 +841,4 @@ declare function createTheme(theme?: Theme, baseTheme?: BaseTheme): WebTheme;
830
841
 
831
842
  declare const defaultTheme: WebTheme;
832
843
 
833
- export { ActorContextWithForms, AuthActorContext, AuthActorState, AuthChallengeNames, AuthContext, AuthEvent, AuthEventData, AuthEventTypes, AuthFieldsWithDefaults, AuthFormData, AuthInputAttributes, AuthInterpreter, AuthMachineState, AuthenticatorMachineOptions, BaseTheme, BorderWidthValue, CognitoUserAmplify, ColorModeOverride, ColorValue, ContactMethod, DefaultTexts, DesignToken, Dict, FederatedIdentityProviders, FontSizeValue, FontValue, FontWeightValue, InputAttributes, InvokeActorEventTypes, LineHeightValue, LoginMechanism, LoginMechanismArray, MediaQueryOverride, NoInfer, OpacityValue, OutlineOffsetValue, OutlineWidthValue, Override, Phrase, RadiusValue, ResetPasswordContext, ResetPasswordState, SelectorOverride, ServicesContext, ShadowValue, SignInContext, SignInResult, SignInState, SignInTypes, SignOutContext, SignOutState, SignUpAttribute, SignUpContext, SignUpFieldsWithDefaults, SignUpFieldsWithoutDefaults, SignUpState, SocialProvider, SpaceValue, Theme, TimeValue, TransformValue, ValidationError, Validator, ValidatorResult, WebDesignToken, WebTheme, authInputAttributes, censorAllButFirstAndLast, censorPhoneNumber, countryDialCodes, createAuthenticatorMachine, createTheme, defaultTheme, getActorContext, getActorState, getAliasInfoFromContext, getConfiguredAliases, getSendEventAliases, getServiceContextFacade, getServiceFacade, hasTranslation, isDesignToken, signUpFieldsWithDefault, signUpFieldsWithoutDefault, translate, translations };
844
+ export { ActorContextWithForms, AuthActorContext, AuthActorState, AuthChallengeNames, AuthContext, AuthEvent, AuthEventData, AuthEventTypes, AuthFieldsWithDefaults, AuthFormData, AuthInputAttributes, AuthInterpreter, AuthMachineSend, AuthMachineState, AuthenticatorMachineOptions, BaseTheme, BorderWidthValue, CognitoUserAmplify, ColorModeOverride, ColorValue, ContactMethod, DefaultTexts, DesignToken, Dict, FederatedIdentityProviders, FontSizeValue, FontValue, FontWeightValue, InputAttributes, InvokeActorEventTypes, LineHeightValue, LoginMechanism, LoginMechanismArray, MediaQueryOverride, NoInfer, OpacityValue, OutlineOffsetValue, OutlineWidthValue, Override, Phrase, RadiusValue, ResetPasswordContext, ResetPasswordState, SelectorOverride, ServicesContext, ShadowValue, SignInContext, SignInResult, SignInState, SignInTypes, SignOutContext, SignOutState, SignUpAttribute, SignUpContext, SignUpFieldsWithDefaults, SignUpFieldsWithoutDefaults, SignUpState, SocialProvider, SpaceValue, Theme, TimeValue, TransformValue, ValidationError, Validator, ValidatorResult, WebDesignToken, WebTheme, authInputAttributes, censorAllButFirstAndLast, censorPhoneNumber, countryDialCodes, createAuthenticatorMachine, createTheme, defaultTheme, getActorContext, getActorState, getAliasInfoFromContext, getConfiguredAliases, getSendEventAliases, getServiceContextFacade, getServiceFacade, hasTranslation, isDesignToken, listenToAuthHub, signUpFieldsWithDefault, signUpFieldsWithoutDefault, translate, translations };