@aws-amplify/ui 3.0.15 → 3.2.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/dist/index.d.ts CHANGED
@@ -1,9 +1,89 @@
1
1
  import * as amazon_cognito_identity_js from 'amazon-cognito-identity-js';
2
2
  import { CognitoUser, CodeDeliveryDetails } from 'amazon-cognito-identity-js';
3
3
  import * as xstate from 'xstate';
4
- import { State, Interpreter, Sender } from 'xstate';
4
+ import { Interpreter, State, Sender } from 'xstate';
5
5
  import { PartialDeep } from 'type-fest';
6
6
 
7
+ /**
8
+ * Map of each input name to its value
9
+ */
10
+ declare type AuthFormData = Record<string, string>;
11
+ /**
12
+ * List of routes that support custom formFields
13
+ */
14
+ declare type FormFieldComponents = 'signIn' | 'signUp' | 'forceNewPassword' | 'confirmResetPassword' | 'confirmSignIn' | 'confirmSignUp' | 'confirmVerifyUser' | 'resetPassword' | 'setupTOTP';
15
+ /**
16
+ * Used to customize form field attributes for each authenticator screen.
17
+ */
18
+ declare type FormFields = {
19
+ [key in FormFieldComponents]?: FormField;
20
+ };
21
+ /**
22
+ * Override option for each screen. Maps each input to override options.
23
+ */
24
+ interface FormField {
25
+ [key: string]: FormFieldOptions;
26
+ }
27
+ /**
28
+ * Override options for each field
29
+ */
30
+ interface FormFieldOptions {
31
+ /** Will hide the label above the input if set to true */
32
+ labelHidden?: boolean;
33
+ /** Label text */
34
+ label?: string;
35
+ /** Placeholder text */
36
+ placeholder?: string;
37
+ /**
38
+ * @deprecated For internal use only, please use `isRequired` instead.
39
+ */
40
+ required?: boolean;
41
+ /** Whether this field is required for submission */
42
+ isRequired?: boolean;
43
+ /** Default dial code value */
44
+ dialCode?: string;
45
+ /** TOTP issuer to be used in the QR setup */
46
+ totpIssuer?: string;
47
+ /** TOTP username to be used in the QR */
48
+ totpUsername?: string;
49
+ /** List of dial codes you want to show in phone number field */
50
+ dialCodeList?: Array<string>;
51
+ /** Integer that denotes where this field should be positioned in. */
52
+ order?: number;
53
+ }
54
+
55
+ /** Enum of known challenge names */
56
+ declare enum AuthChallengeNames {
57
+ SMS_MFA = "SMS_MFA",
58
+ SOFTWARE_TOKEN_MFA = "SOFTWARE_TOKEN_MFA",
59
+ NEW_PASSWORD_REQUIRED = "NEW_PASSWORD_REQUIRED",
60
+ RESET_REQUIRED = "RESET_REQUIRED",
61
+ MFA_SETUP = "MFA_SETUP"
62
+ }
63
+ /** Contact destinations that we can send user confirmation code to */
64
+ declare type ContactMethod = 'Email' | 'Phone Number';
65
+ /** Federated IDPs that Authenticator supports */
66
+ declare enum FederatedIdentityProviders {
67
+ Apple = "SignInWithApple",
68
+ Amazon = "LoginWithAmazon",
69
+ Facebook = "Facebook",
70
+ Google = "Google"
71
+ }
72
+ /** Known cognito user attributes */
73
+ interface CognitoAttributes {
74
+ email: string;
75
+ phone_number: string;
76
+ [key: string]: string;
77
+ }
78
+ /** Cognito User Interface */
79
+ interface CognitoUserAmplify extends CognitoUser {
80
+ username?: string;
81
+ attributes?: CognitoAttributes;
82
+ }
83
+
84
+ /**
85
+ * Maps each input to its validation error, if any
86
+ */
7
87
  declare type ValidationError = Record<string, string>;
8
88
  /**
9
89
  * Return type of validator. This is `null` if there are no error, and `ValidationError` otherwise.
@@ -16,6 +96,36 @@ declare type SignInResult = string;
16
96
  declare type Validator = (formData: AuthFormData, touchData?: AuthFormData) => ValidatorResult | Promise<ValidatorResult>;
17
97
  declare type SignInTypes = (user: string, code: string, mfaType: AuthChallengeNames.SMS_MFA | AuthChallengeNames.SOFTWARE_TOKEN_MFA) => SignInResult | Promise<SignInResult>;
18
98
 
99
+ /** Array of auth fields that we supply defaults with */
100
+ declare const signUpFieldsWithDefault: readonly ["birthdate", "email", "family_name", "given_name", "middle_name", "name", "nickname", "phone_number", "preferred_username", "profile", "website"];
101
+ /** Auth fields that we supply defaults with */
102
+ declare type SignUpFieldsWithDefaults = typeof signUpFieldsWithDefault[number];
103
+ /** Array of auth fields that we do not supply defaults with */
104
+ declare const signUpFieldsWithoutDefault: readonly ["address", "gender", "locale", "picture", "updated_at", "zoneinfo"];
105
+ /** Auth fields that we do not supply defaults with */
106
+ declare type SignUpFieldsWithoutDefaults = typeof signUpFieldsWithoutDefault[number];
107
+ /** All known auth fields */
108
+ declare type SignUpAttribute = SignUpFieldsWithDefaults | SignUpFieldsWithoutDefaults;
109
+ /** Fields that are common in all routes */
110
+ declare type CommonFields = 'username' | 'password' | 'confirm_password';
111
+ /** Array of known login mechanisms */
112
+ declare const LoginMechanismArray: readonly ["username", "email", "phone_number"];
113
+ /** Login mechanisms that can be used to sign in */
114
+ declare type LoginMechanism = typeof LoginMechanismArray[number];
115
+ /** List of social provider Authenticator supports */
116
+ declare type SocialProvider = 'amazon' | 'apple' | 'facebook' | 'google';
117
+ /** Input fields that we provide default fields with */
118
+ declare type AuthFieldsWithDefaults = LoginMechanism | SignUpFieldsWithDefaults | 'confirmation_code' | 'password';
119
+ /** Maps default attributes values for an input */
120
+ interface InputAttributeDefaults {
121
+ label: string;
122
+ type: string;
123
+ placeholder: string;
124
+ autocomplete?: string;
125
+ }
126
+ /** Maps default attribute values for each Auth Field */
127
+ declare type AuthInputAttributes = Record<AuthFieldsWithDefaults, InputAttributeDefaults>;
128
+
19
129
  declare const defaultServices: {
20
130
  getAmplifyConfig(): Promise<{}>;
21
131
  getCurrentUser(): Promise<any>;
@@ -44,18 +154,28 @@ declare const defaultServices: {
44
154
  validatePreferredUsername(formData: any, touchData: any): Promise<ValidatorResult>;
45
155
  };
46
156
 
47
- declare type AuthFormData = Record<string, string>;
157
+ /**
158
+ * Data that actor returns when they are done and reach the final state
159
+ */
48
160
  interface ActorDoneData {
161
+ /** Any auth form values that needs to be persisted between the actors */
49
162
  authAttributes?: AuthFormData;
163
+ /** String that indicates where authMachine should next transition to */
50
164
  intent?: string;
165
+ /** User returned by the actor it's done */
51
166
  user?: CognitoUserAmplify;
52
167
  }
168
+ /**
169
+ * Context interface for the top-level machine
170
+ */
53
171
  interface AuthContext {
172
+ /** Reference to the spawned actor */
54
173
  actorRef?: any;
55
174
  config?: {
56
175
  loginMechanisms?: LoginMechanism[];
57
176
  signUpAttributes?: SignUpAttribute[];
58
177
  socialProviders?: SocialProvider[];
178
+ formFields?: FormFields;
59
179
  initialState?: 'signIn' | 'signUp' | 'resetPassword';
60
180
  };
61
181
  services?: Partial<typeof defaultServices>;
@@ -66,107 +186,122 @@ interface AuthContext {
66
186
  mfaType?: AuthChallengeNames.SMS_MFA | AuthChallengeNames.SOFTWARE_TOKEN_MFA;
67
187
  actorDoneData?: Omit<ActorDoneData, 'user'>;
68
188
  }
69
- interface ServicesContext {
70
- username?: string;
71
- password?: string;
72
- user?: string;
73
- code?: string;
74
- mfaType: AuthChallengeNames.SMS_MFA | AuthChallengeNames.SOFTWARE_TOKEN_MFA;
75
- }
189
+ /**
190
+ * Base context for all actors that have auth forms associated
191
+ */
76
192
  interface BaseFormContext {
193
+ /** Any user attributes set that needs to persist between states */
77
194
  authAttributes?: Record<string, any>;
195
+ /** Current challengeName issued by Cognnito */
78
196
  challengeName?: string;
197
+ /** Required attributes for form submission */
79
198
  requiredAttributes?: Array<string>;
199
+ /** Maps each input name to tis value */
80
200
  formValues?: AuthFormData;
201
+ /** Input (names) that has been blurred at least ones */
81
202
  touched?: AuthFormData;
203
+ /** String that indicates where authMachine should next transition to */
82
204
  intent?: string;
205
+ /** Error returned from remote service / API */
83
206
  remoteError?: string;
207
+ /** Current user inteface the actor is working with */
84
208
  user?: CognitoUserAmplify;
209
+ /** Maps each input to its validation error, if any */
85
210
  validationError?: ValidationError;
211
+ /** Denotes where a confirmation code has been sent to */
86
212
  codeDeliveryDetails?: CodeDeliveryDetails;
213
+ /** Default country code for all phone number fields. */
87
214
  country_code?: string;
88
215
  }
89
216
  interface SignInContext extends BaseFormContext {
90
217
  loginMechanisms: Required<AuthContext>['config']['loginMechanisms'];
91
218
  socialProviders: Required<AuthContext>['config']['socialProviders'];
219
+ formFields?: FormFields;
92
220
  attributeToVerify?: string;
93
221
  redirectIntent?: string;
94
222
  unverifiedAttributes?: Record<string, string>;
95
223
  }
96
- declare const signUpFieldsWithDefault: readonly ["birthdate", "email", "family_name", "given_name", "middle_name", "name", "nickname", "phone_number", "preferred_username", "profile", "website"];
97
- declare const signUpFieldsWithoutDefault: readonly ["address", "gender", "locale", "picture", "updated_at", "zoneinfo"];
98
- declare type SignUpFieldsWithDefaults = typeof signUpFieldsWithDefault[number];
99
- declare type SignUpFieldsWithoutDefaults = typeof signUpFieldsWithoutDefault[number];
100
- declare type SignUpAttribute = SignUpFieldsWithDefaults | SignUpFieldsWithoutDefaults;
101
224
  interface SignUpContext extends BaseFormContext {
102
225
  loginMechanisms: Required<AuthContext>['config']['loginMechanisms'];
103
226
  socialProviders: Required<AuthContext>['config']['socialProviders'];
227
+ formFields: FormFields;
104
228
  unverifiedAttributes?: Record<string, string>;
105
229
  }
106
230
  interface ResetPasswordContext extends BaseFormContext {
107
231
  username?: string;
108
232
  unverifiedAttributes?: Record<string, string>;
233
+ formFields?: FormFields;
109
234
  }
110
235
  interface SignOutContext {
111
236
  authAttributes?: Record<string, any>;
112
237
  challengeName?: string;
113
238
  unverifiedAttributes?: Record<string, string>;
114
239
  user?: CognitoUserAmplify;
240
+ formFields?: FormFields;
115
241
  }
242
+ /**
243
+ * Context for actors that have forms
244
+ */
116
245
  declare type ActorContextWithForms = SignInContext | SignUpContext | ResetPasswordContext;
117
- declare type SignInState = State<SignInContext, AuthEvent>;
118
- declare type SignUpState = State<SignUpContext, AuthEvent>;
119
- declare type SignOutState = State<SignOutContext, AuthEvent>;
120
- declare type ResetPasswordState = State<ResetPasswordContext, AuthEvent>;
121
246
  declare type AuthActorContext = ActorContextWithForms | SignOutContext;
122
- declare type AuthActorState = State<AuthActorContext, AuthEvent>;
123
- interface CognitoUserAmplify extends CognitoUser {
124
- username?: string;
125
- attributes?: CognitoAttributes;
126
- }
127
- interface CognitoAttributes {
128
- email: string;
129
- phone_number: string;
130
- [key: string]: string;
131
- }
247
+
248
+ /**
249
+ * Events that occur when actors are done
250
+ */
132
251
  declare type InvokeActorEventTypes = 'done.invoke.signInActor' | 'done.invoke.signUpActor' | 'done.invoke.signOutActor' | 'done.invoke.resetPasswordActor';
252
+ /**
253
+ * All known explicit events for xstate
254
+ */
133
255
  declare type AuthEventTypes = 'CHANGE' | 'BLUR' | 'FEDERATED_SIGN_IN' | 'RESEND' | 'RESET_PASSWORD' | 'SIGN_IN' | 'SIGN_OUT' | 'SIGN_UP' | 'SKIP' | 'SUBMIT' | 'INIT' | InvokeActorEventTypes;
134
- declare enum AuthChallengeNames {
135
- SMS_MFA = "SMS_MFA",
136
- SOFTWARE_TOKEN_MFA = "SOFTWARE_TOKEN_MFA",
137
- NEW_PASSWORD_REQUIRED = "NEW_PASSWORD_REQUIRED",
138
- RESET_REQUIRED = "RESET_REQUIRED",
139
- MFA_SETUP = "MFA_SETUP"
140
- }
141
- interface InputAttributes {
142
- label: string;
143
- type: string;
144
- placeholder: string;
145
- autocomplete?: string;
146
- }
147
- declare const LoginMechanismArray: readonly ["username", "email", "phone_number"];
148
- declare type LoginMechanism = typeof LoginMechanismArray[number];
149
- declare type SocialProvider = 'amazon' | 'apple' | 'facebook' | 'google';
150
- declare type AuthFieldsWithDefaults = LoginMechanism | SignUpFieldsWithDefaults | 'confirmation_code' | 'password';
151
- declare type AuthInputAttributes = Record<AuthFieldsWithDefaults, InputAttributes>;
256
+ /**
257
+ * Data payload for auth events
258
+ */
152
259
  declare type AuthEventData = Record<PropertyKey, any>;
260
+ /** Top-level auth machine event interface */
153
261
  interface AuthEvent {
154
262
  type: AuthEventTypes;
155
263
  data?: AuthEventData;
156
264
  }
157
- declare type AuthMachineState = State<AuthContext, AuthEvent>;
265
+
266
+ /**
267
+ * This files provides types that describe general shape of
268
+ * authenticator machine and its intepreter.
269
+ */
270
+
271
+ /**
272
+ * Intefrace for `authMachine` machine interpreter
273
+ */
158
274
  declare type AuthInterpreter = Interpreter<AuthContext, any, AuthEvent>;
275
+ /**
276
+ * Function type for `send` in `authMachine`
277
+ */
159
278
  declare type AuthMachineSend = AuthInterpreter['send'];
160
279
 
280
+ declare type SignInState = State<SignInContext, AuthEvent>;
281
+ declare type SignUpState = State<SignUpContext, AuthEvent>;
282
+ declare type SignOutState = State<SignOutContext, AuthEvent>;
283
+ declare type ResetPasswordState = State<ResetPasswordContext, AuthEvent>;
284
+ declare type AuthActorState = State<AuthActorContext, AuthEvent>;
285
+ declare type AuthMachineState = State<AuthContext, AuthEvent>;
286
+
161
287
  declare type NoInfer<T> = [T][T extends any ? 0 : never];
162
288
 
163
- declare const authInputAttributes: AuthInputAttributes;
164
- declare enum FederatedIdentityProviders {
165
- Apple = "SignInWithApple",
166
- Amazon = "LoginWithAmazon",
167
- Facebook = "Facebook",
168
- Google = "Google"
169
- }
289
+ /**
290
+ * This file contains helpers that lets you easily access current actor's state
291
+ * and context.
292
+ */
293
+
294
+ /**
295
+ * Get the state of current actor. This is useful for checking which screen
296
+ * to render: e.g. `getActorState(state).matches('confirmSignUp.edit').
297
+ */
298
+ declare const getActorState: (state: AuthMachineState) => AuthActorState;
299
+ /**
300
+ * Get the context of current actor. Useful for getting any nested context
301
+ * like remoteError.
302
+ */
303
+ declare const getActorContext: (state: AuthMachineState) => AuthActorContext;
304
+
170
305
  /**
171
306
  * Given xstate context from AuthMachine, this returns the input label, type,
172
307
  * and error attributes of the configured login_mechanisms. An optional "alias"
@@ -182,19 +317,10 @@ declare const getAliasInfoFromContext: (context: AuthContext, alias?: LoginMecha
182
317
  * secondaryAliases.
183
318
  */
184
319
  declare const getConfiguredAliases: (context: AuthContext) => {
185
- primaryAlias: "username" | "email" | "phone_number";
186
- secondaryAliases: ("username" | "email" | "phone_number")[];
320
+ primaryAlias: "email" | "phone_number" | "username";
321
+ secondaryAliases: ("email" | "phone_number" | "username")[];
187
322
  };
188
- /**
189
- * Get the state of current actor. This is useful for checking which screen
190
- * to render: e.g. `getActorState(state).matches('confirmSignUp.edit').
191
- */
192
- declare const getActorState: (state: AuthMachineState) => AuthActorState;
193
- /**
194
- * Get the context of current actor. Useful for getting any nested context
195
- * like remoteError.
196
- */
197
- declare const getActorContext: (state: AuthMachineState) => AuthActorContext;
323
+
198
324
  /**
199
325
  * Creates public facing auth helpers that abstracts out xstate implementation
200
326
  * detail. Each framework implementation can export these helpers so that
@@ -253,6 +379,24 @@ declare const getServiceFacade: ({ send, state }: {
253
379
  toSignUp: (data?: AuthEventData) => void;
254
380
  skipVerification: (data?: AuthEventData) => void;
255
381
  };
382
+
383
+ /**
384
+ * This file contains helpers related to forms and input attributes.
385
+ */
386
+
387
+ declare const authInputAttributes: AuthInputAttributes;
388
+ declare const getFormDataFromEvent: (event: Event) => {
389
+ [k: string]: FormDataEntryValue;
390
+ };
391
+ declare const setFormOrder: (formOverrides: FormField, fieldNames: Array<SignUpAttribute | CommonFields>) => Array<string | number>;
392
+
393
+ /**
394
+ * This file contains general helpers that state machine or authenticator
395
+ * implementations can use.
396
+ */
397
+
398
+ declare const censorAllButFirstAndLast: (value: string) => string;
399
+ declare const censorPhoneNumber: (val: string) => string;
256
400
  /**
257
401
  * Listens to external auth Hub events and sends corresponding event to
258
402
  * the `authService` of interest
@@ -263,13 +407,6 @@ declare const getServiceFacade: ({ send, state }: {
263
407
  */
264
408
  declare const listenToAuthHub: (send: AuthMachineSend) => () => void;
265
409
 
266
- declare type ContactMethod = 'Email' | 'Phone Number';
267
- declare const censorAllButFirstAndLast: (value: string) => string;
268
- declare const censorPhoneNumber: (val: string) => string;
269
- declare const getFormDataFromEvent: (event: Event) => {
270
- [k: string]: FormDataEntryValue;
271
- };
272
-
273
410
  declare const countryDialCodes: string[];
274
411
 
275
412
  /**
@@ -642,7 +779,7 @@ declare type WebShadows = {
642
779
  [Property in keyof Shadows]: WebDesignToken<ShadowValue>;
643
780
  };
644
781
 
645
- declare type Space = {
782
+ declare type SpaceSizes = {
646
783
  xxxs: DesignToken<SpaceValue>;
647
784
  xxs: DesignToken<SpaceValue>;
648
785
  xs: DesignToken<SpaceValue>;
@@ -652,16 +789,11 @@ declare type Space = {
652
789
  xl: DesignToken<SpaceValue>;
653
790
  xxl: DesignToken<SpaceValue>;
654
791
  xxxl: DesignToken<SpaceValue>;
655
- relative: {
656
- xxxs: DesignToken<SpaceValue>;
657
- xxs: DesignToken<SpaceValue>;
658
- xs: DesignToken<SpaceValue>;
659
- small: DesignToken<SpaceValue>;
660
- medium: DesignToken<SpaceValue>;
661
- large: DesignToken<SpaceValue>;
662
- xl: DesignToken<SpaceValue>;
663
- xxl: DesignToken<SpaceValue>;
664
- xxxl: DesignToken<SpaceValue>;
792
+ };
793
+ declare type Space = SpaceSizes & {
794
+ zero: DesignToken<SpaceValue>;
795
+ relative: SpaceSizes & {
796
+ full: DesignToken<SpaceValue>;
665
797
  };
666
798
  };
667
799
  declare type WebSpace = {
@@ -862,4 +994,4 @@ declare function createTheme(theme?: Theme, baseTheme?: BaseTheme): WebTheme;
862
994
 
863
995
  declare const defaultTheme: WebTheme;
864
996
 
865
- export { ActorContextWithForms, ActorDoneData, AuthActorContext, AuthActorState, AuthChallengeNames, AuthContext, AuthEvent, AuthEventData, AuthEventTypes, AuthFieldsWithDefaults, AuthFormData, AuthInputAttributes, AuthInterpreter, AuthMachineSend, AuthMachineState, AuthenticatorMachineOptions, BaseTheme, BorderWidthValue, CognitoAttributes, 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, getFormDataFromEvent, getSendEventAliases, getServiceContextFacade, getServiceFacade, hasTranslation, isDesignToken, listenToAuthHub, signUpFieldsWithDefault, signUpFieldsWithoutDefault, translate, translations };
997
+ export { ActorContextWithForms, ActorDoneData, AuthActorContext, AuthActorState, AuthChallengeNames, AuthContext, AuthEvent, AuthEventData, AuthEventTypes, AuthFieldsWithDefaults, AuthFormData, AuthInputAttributes, AuthInterpreter, AuthMachineSend, AuthMachineState, AuthenticatorMachineOptions, BaseTheme, BorderWidthValue, CognitoAttributes, CognitoUserAmplify, ColorModeOverride, ColorValue, CommonFields, ContactMethod, DefaultTexts, DesignToken, Dict, FederatedIdentityProviders, FontSizeValue, FontValue, FontWeightValue, FormField, FormFieldComponents, FormFieldOptions, FormFields, InputAttributeDefaults, InvokeActorEventTypes, LineHeightValue, LoginMechanism, LoginMechanismArray, MediaQueryOverride, NoInfer, OpacityValue, OutlineOffsetValue, OutlineWidthValue, Override, Phrase, RadiusValue, ResetPasswordContext, ResetPasswordState, SelectorOverride, 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, getFormDataFromEvent, getSendEventAliases, getServiceContextFacade, getServiceFacade, hasTranslation, isDesignToken, listenToAuthHub, setFormOrder, signUpFieldsWithDefault, signUpFieldsWithoutDefault, translate, translations };