@forgerock/login-widget 1.2.0-beta.7 → 1.2.0-beta.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/index.d.ts CHANGED
@@ -169,10 +169,20 @@ declare class FRCallback {
169
169
 
170
170
  type FRCallbackFactory = (callback: Callback) => FRCallback;
171
171
 
172
+ type LogLevel = 'none' | 'info' | 'warn' | 'error' | 'debug';
172
173
  interface Action {
173
174
  type: ActionTypes;
174
175
  payload: any;
175
176
  }
177
+ /**
178
+ * Custom Logger for logger
179
+ */
180
+ interface LoggerFunctions<W = (...msgs: unknown[]) => void, E = (...msgs: unknown[]) => void, L = (...msgs: unknown[]) => void, I = (...msgs: unknown[]) => void> {
181
+ warn?: W;
182
+ error?: E;
183
+ log?: L;
184
+ info?: I;
185
+ }
176
186
  /**
177
187
  * Configuration options.
178
188
  */
@@ -188,6 +198,8 @@ interface ConfigOptions {
188
198
  tree?: string;
189
199
  type?: string;
190
200
  oauthThreshold?: number;
201
+ logLevel?: LogLevel;
202
+ logger?: LoggerFunctions;
191
203
  }
192
204
  /**
193
205
  * Optional configuration for custom paths for actions
@@ -669,6 +681,7 @@ interface StepMetadata {
669
681
  numOfCallbacks: number;
670
682
  numOfSelfSubmittableCbs: number;
671
683
  numOfUserInputCbs: number;
684
+ stageName?: string;
672
685
  };
673
686
  platform?: Record<string, unknown>;
674
687
  }
@@ -1033,6 +1046,7 @@ declare abstract class ZodType<Output = any, Def extends ZodTypeDef = ZodTypeDef
1033
1046
  safeParse(data: unknown, params?: Partial<ParseParams>): SafeParseReturnType<Input, Output>;
1034
1047
  parseAsync(data: unknown, params?: Partial<ParseParams>): Promise<Output>;
1035
1048
  safeParseAsync(data: unknown, params?: Partial<ParseParams>): Promise<SafeParseReturnType<Input, Output>>;
1049
+ /** Alias of safeParseAsync */
1036
1050
  spa: (data: unknown, params?: Partial<ParseParams> | undefined) => Promise<SafeParseReturnType<Input, Output>>;
1037
1051
  refine<RefinedOutput extends Output>(check: (arg: Output) => arg is RefinedOutput, message?: string | CustomErrorParams | ((arg: Output) => CustomErrorParams)): ZodEffects<this, RefinedOutput, Input>;
1038
1052
  refine(check: (arg: Output) => unknown | Promise<unknown>, message?: string | CustomErrorParams | ((arg: Output) => CustomErrorParams)): ZodEffects<this, Output, Input>;
@@ -1142,7 +1156,7 @@ interface ZodStringDef extends ZodTypeDef {
1142
1156
  }
1143
1157
  declare class ZodString extends ZodType<string, ZodStringDef> {
1144
1158
  _parse(input: ParseInput): ParseReturnType<string>;
1145
- protected _regex: (regex: RegExp, validation: StringValidation, message?: errorUtil.ErrMessage | undefined) => ZodEffects<this, string, string>;
1159
+ protected _regex(regex: RegExp, validation: StringValidation, message?: errorUtil.ErrMessage): ZodEffects<this, string, string>;
1146
1160
  _addCheck(check: ZodStringCheck): ZodString;
1147
1161
  email(message?: errorUtil.ErrMessage): ZodString;
1148
1162
  url(message?: errorUtil.ErrMessage): ZodString;
@@ -1170,10 +1184,14 @@ declare class ZodString extends ZodType<string, ZodStringDef> {
1170
1184
  min(minLength: number, message?: errorUtil.ErrMessage): ZodString;
1171
1185
  max(maxLength: number, message?: errorUtil.ErrMessage): ZodString;
1172
1186
  length(len: number, message?: errorUtil.ErrMessage): ZodString;
1173
- nonempty: (message?: errorUtil.ErrMessage | undefined) => ZodString;
1174
- trim: () => ZodString;
1175
- toLowerCase: () => ZodString;
1176
- toUpperCase: () => ZodString;
1187
+ /**
1188
+ * @deprecated Use z.string().min(1) instead.
1189
+ * @see {@link ZodString.min}
1190
+ */
1191
+ nonempty(message?: errorUtil.ErrMessage): ZodString;
1192
+ trim(): ZodString;
1193
+ toLowerCase(): ZodString;
1194
+ toUpperCase(): ZodString;
1177
1195
  get isDatetime(): boolean;
1178
1196
  get isEmail(): boolean;
1179
1197
  get isURL(): boolean;
@@ -1345,9 +1363,21 @@ declare class ZodObject<T extends ZodRawShape, UnknownKeys extends UnknownKeysPa
1345
1363
  strict(message?: errorUtil.ErrMessage): ZodObject<T, "strict", Catchall>;
1346
1364
  strip(): ZodObject<T, "strip", Catchall>;
1347
1365
  passthrough(): ZodObject<T, "passthrough", Catchall>;
1366
+ /**
1367
+ * @deprecated In most cases, this is no longer needed - unknown properties are now silently stripped.
1368
+ * If you want to pass through unknown properties, use `.passthrough()` instead.
1369
+ */
1348
1370
  nonstrict: () => ZodObject<T, "passthrough", Catchall>;
1349
1371
  extend<Augmentation extends ZodRawShape>(augmentation: Augmentation): ZodObject<objectUtil.extendShape<T, Augmentation>, UnknownKeys, Catchall>;
1372
+ /**
1373
+ * @deprecated Use `.extend` instead
1374
+ * */
1350
1375
  augment: <Augmentation extends ZodRawShape>(augmentation: Augmentation) => ZodObject<{ [k in keyof (Omit<T, keyof Augmentation> & Augmentation)]: (Omit<T, keyof Augmentation> & Augmentation)[k]; }, UnknownKeys, Catchall, objectOutputType<{ [k in keyof (Omit<T, keyof Augmentation> & Augmentation)]: (Omit<T, keyof Augmentation> & Augmentation)[k]; }, Catchall, UnknownKeys>, objectInputType<{ [k in keyof (Omit<T, keyof Augmentation> & Augmentation)]: (Omit<T, keyof Augmentation> & Augmentation)[k]; }, Catchall, UnknownKeys>>;
1376
+ /**
1377
+ * Prior to zod@1.0.12 there was a bug in the
1378
+ * inferred type of merged objects. Please
1379
+ * upgrade if you are experiencing issues.
1380
+ */
1351
1381
  merge<Incoming extends AnyZodObject, Augmentation extends Incoming["shape"]>(merging: Incoming): ZodObject<objectUtil.extendShape<T, Augmentation>, Incoming["_def"]["unknownKeys"], Incoming["_def"]["catchall"]>;
1352
1382
  setKey<Key extends string, Schema extends ZodTypeAny>(key: Key, schema: Schema): ZodObject<T & {
1353
1383
  [k in Key]: Schema;
@@ -1359,6 +1389,9 @@ declare class ZodObject<T extends ZodRawShape, UnknownKeys extends UnknownKeysPa
1359
1389
  omit<Mask extends {
1360
1390
  [k in keyof T]?: true;
1361
1391
  }>(mask: Mask): ZodObject<Omit<T, keyof Mask>, UnknownKeys, Catchall>;
1392
+ /**
1393
+ * @deprecated
1394
+ */
1362
1395
  deepPartial(): partialUtil.DeepPartial<this>;
1363
1396
  partial(): ZodObject<{
1364
1397
  [k in keyof T]: ZodOptional<T[k]>;
@@ -1994,12 +2027,15 @@ declare const partialStringsSchema: ZodObject<{
1994
2027
  closeModal: ZodOptional<ZodString>;
1995
2028
  charactersCannotRepeatMoreThan: ZodOptional<ZodString>;
1996
2029
  charactersCannotRepeatMoreThanCaseInsensitive: ZodOptional<ZodString>;
2030
+ checkYourEmail: ZodOptional<ZodString>;
1997
2031
  chooseDifferentUsername: ZodOptional<ZodString>;
1998
2032
  chooseYourDeviceForIdentityVerification: ZodOptional<ZodString>;
1999
2033
  confirmPassword: ZodOptional<ZodString>;
2000
2034
  constraintViolationForPassword: ZodOptional<ZodString>;
2001
2035
  constraintViolationForValue: ZodOptional<ZodString>;
2002
2036
  continueWith: ZodOptional<ZodString>;
2037
+ copyUrl: ZodOptional<ZodString>;
2038
+ copyAndPasteUrlBelow: ZodOptional<ZodString>;
2003
2039
  customSecurityQuestion: ZodOptional<ZodString>;
2004
2040
  dontGetLockedOut: ZodOptional<ZodString>;
2005
2041
  doesNotMeetMinimumCharacterLength: ZodOptional<ZodString>;
@@ -2024,9 +2060,11 @@ declare const partialStringsSchema: ZodObject<{
2024
2060
  minimumNumberOfUppercase: ZodOptional<ZodString>;
2025
2061
  minimumNumberOfSymbols: ZodOptional<ZodString>;
2026
2062
  nameCallback: ZodOptional<ZodString>;
2063
+ next: ZodOptional<ZodString>;
2027
2064
  nextButton: ZodOptional<ZodString>;
2028
2065
  notToExceedMaximumCharacterLength: ZodOptional<ZodString>;
2029
2066
  noLessThanMinimumCharacterLength: ZodOptional<ZodString>;
2067
+ onMobileOpenInAuthenticator: ZodOptional<ZodString>;
2030
2068
  passwordCallback: ZodOptional<ZodString>;
2031
2069
  passwordCannotContainCommonPasswords: ZodOptional<ZodString>;
2032
2070
  passwordCannotContainCommonPasswordsOrBeReversible: ZodOptional<ZodString>;
@@ -2037,6 +2075,9 @@ declare const partialStringsSchema: ZodObject<{
2037
2075
  preferencesMarketing: ZodOptional<ZodString>;
2038
2076
  preferencesUpdates: ZodOptional<ZodString>;
2039
2077
  provideCustomQuestion: ZodOptional<ZodString>;
2078
+ qrCodeNotWorking: ZodOptional<ZodString>;
2079
+ qrCodeFailedToRender: ZodOptional<ZodString>;
2080
+ qrCodeImportFailure: ZodOptional<ZodString>;
2040
2081
  redirectingTo: ZodOptional<ZodString>;
2041
2082
  registerButton: ZodOptional<ZodString>;
2042
2083
  registerHeader: ZodOptional<ZodString>;
@@ -2044,6 +2085,7 @@ declare const partialStringsSchema: ZodObject<{
2044
2085
  registerYourDevice: ZodOptional<ZodString>;
2045
2086
  requiredField: ZodOptional<ZodString>;
2046
2087
  securityAnswer: ZodOptional<ZodString>;
2088
+ scanQrCodeWithAuthenticator: ZodOptional<ZodString>;
2047
2089
  securityQuestions: ZodOptional<ZodString>;
2048
2090
  securityQuestionsPrompt: ZodOptional<ZodString>;
2049
2091
  shouldContainANumber: ZodOptional<ZodString>;
@@ -2052,6 +2094,7 @@ declare const partialStringsSchema: ZodObject<{
2052
2094
  shouldContainASymbol: ZodOptional<ZodString>;
2053
2095
  showPassword: ZodOptional<ZodString>;
2054
2096
  sn: ZodOptional<ZodString>;
2097
+ submit: ZodOptional<ZodString>;
2055
2098
  submitButton: ZodOptional<ZodString>;
2056
2099
  successMessage: ZodOptional<ZodString>;
2057
2100
  termsAndConditions: ZodOptional<ZodString>;
@@ -2063,6 +2106,7 @@ declare const partialStringsSchema: ZodObject<{
2063
2106
  unrecoverableError: ZodOptional<ZodString>;
2064
2107
  unknownLoginError: ZodOptional<ZodString>;
2065
2108
  unknownNetworkError: ZodOptional<ZodString>;
2109
+ url: ZodOptional<ZodString>;
2066
2110
  useDeviceForIdentityVerification: ZodOptional<ZodString>;
2067
2111
  userName: ZodOptional<ZodString>;
2068
2112
  usernameRequirements: ZodOptional<ZodString>;
@@ -2081,12 +2125,15 @@ declare const partialStringsSchema: ZodObject<{
2081
2125
  closeModal?: string | undefined;
2082
2126
  charactersCannotRepeatMoreThan?: string | undefined;
2083
2127
  charactersCannotRepeatMoreThanCaseInsensitive?: string | undefined;
2128
+ checkYourEmail?: string | undefined;
2084
2129
  chooseDifferentUsername?: string | undefined;
2085
2130
  chooseYourDeviceForIdentityVerification?: string | undefined;
2086
2131
  confirmPassword?: string | undefined;
2087
2132
  constraintViolationForPassword?: string | undefined;
2088
2133
  constraintViolationForValue?: string | undefined;
2089
2134
  continueWith?: string | undefined;
2135
+ copyUrl?: string | undefined;
2136
+ copyAndPasteUrlBelow?: string | undefined;
2090
2137
  customSecurityQuestion?: string | undefined;
2091
2138
  dontGetLockedOut?: string | undefined;
2092
2139
  doesNotMeetMinimumCharacterLength?: string | undefined;
@@ -2111,9 +2158,11 @@ declare const partialStringsSchema: ZodObject<{
2111
2158
  minimumNumberOfUppercase?: string | undefined;
2112
2159
  minimumNumberOfSymbols?: string | undefined;
2113
2160
  nameCallback?: string | undefined;
2161
+ next?: string | undefined;
2114
2162
  nextButton?: string | undefined;
2115
2163
  notToExceedMaximumCharacterLength?: string | undefined;
2116
2164
  noLessThanMinimumCharacterLength?: string | undefined;
2165
+ onMobileOpenInAuthenticator?: string | undefined;
2117
2166
  passwordCallback?: string | undefined;
2118
2167
  passwordCannotContainCommonPasswords?: string | undefined;
2119
2168
  passwordCannotContainCommonPasswordsOrBeReversible?: string | undefined;
@@ -2124,6 +2173,9 @@ declare const partialStringsSchema: ZodObject<{
2124
2173
  preferencesMarketing?: string | undefined;
2125
2174
  preferencesUpdates?: string | undefined;
2126
2175
  provideCustomQuestion?: string | undefined;
2176
+ qrCodeNotWorking?: string | undefined;
2177
+ qrCodeFailedToRender?: string | undefined;
2178
+ qrCodeImportFailure?: string | undefined;
2127
2179
  redirectingTo?: string | undefined;
2128
2180
  registerButton?: string | undefined;
2129
2181
  registerHeader?: string | undefined;
@@ -2131,6 +2183,7 @@ declare const partialStringsSchema: ZodObject<{
2131
2183
  registerYourDevice?: string | undefined;
2132
2184
  requiredField?: string | undefined;
2133
2185
  securityAnswer?: string | undefined;
2186
+ scanQrCodeWithAuthenticator?: string | undefined;
2134
2187
  securityQuestions?: string | undefined;
2135
2188
  securityQuestionsPrompt?: string | undefined;
2136
2189
  shouldContainANumber?: string | undefined;
@@ -2139,6 +2192,7 @@ declare const partialStringsSchema: ZodObject<{
2139
2192
  shouldContainASymbol?: string | undefined;
2140
2193
  showPassword?: string | undefined;
2141
2194
  sn?: string | undefined;
2195
+ submit?: string | undefined;
2142
2196
  submitButton?: string | undefined;
2143
2197
  successMessage?: string | undefined;
2144
2198
  termsAndConditions?: string | undefined;
@@ -2150,6 +2204,7 @@ declare const partialStringsSchema: ZodObject<{
2150
2204
  unrecoverableError?: string | undefined;
2151
2205
  unknownLoginError?: string | undefined;
2152
2206
  unknownNetworkError?: string | undefined;
2207
+ url?: string | undefined;
2153
2208
  useDeviceForIdentityVerification?: string | undefined;
2154
2209
  userName?: string | undefined;
2155
2210
  usernameRequirements?: string | undefined;
@@ -2168,12 +2223,15 @@ declare const partialStringsSchema: ZodObject<{
2168
2223
  closeModal?: string | undefined;
2169
2224
  charactersCannotRepeatMoreThan?: string | undefined;
2170
2225
  charactersCannotRepeatMoreThanCaseInsensitive?: string | undefined;
2226
+ checkYourEmail?: string | undefined;
2171
2227
  chooseDifferentUsername?: string | undefined;
2172
2228
  chooseYourDeviceForIdentityVerification?: string | undefined;
2173
2229
  confirmPassword?: string | undefined;
2174
2230
  constraintViolationForPassword?: string | undefined;
2175
2231
  constraintViolationForValue?: string | undefined;
2176
2232
  continueWith?: string | undefined;
2233
+ copyUrl?: string | undefined;
2234
+ copyAndPasteUrlBelow?: string | undefined;
2177
2235
  customSecurityQuestion?: string | undefined;
2178
2236
  dontGetLockedOut?: string | undefined;
2179
2237
  doesNotMeetMinimumCharacterLength?: string | undefined;
@@ -2198,9 +2256,11 @@ declare const partialStringsSchema: ZodObject<{
2198
2256
  minimumNumberOfUppercase?: string | undefined;
2199
2257
  minimumNumberOfSymbols?: string | undefined;
2200
2258
  nameCallback?: string | undefined;
2259
+ next?: string | undefined;
2201
2260
  nextButton?: string | undefined;
2202
2261
  notToExceedMaximumCharacterLength?: string | undefined;
2203
2262
  noLessThanMinimumCharacterLength?: string | undefined;
2263
+ onMobileOpenInAuthenticator?: string | undefined;
2204
2264
  passwordCallback?: string | undefined;
2205
2265
  passwordCannotContainCommonPasswords?: string | undefined;
2206
2266
  passwordCannotContainCommonPasswordsOrBeReversible?: string | undefined;
@@ -2211,6 +2271,9 @@ declare const partialStringsSchema: ZodObject<{
2211
2271
  preferencesMarketing?: string | undefined;
2212
2272
  preferencesUpdates?: string | undefined;
2213
2273
  provideCustomQuestion?: string | undefined;
2274
+ qrCodeNotWorking?: string | undefined;
2275
+ qrCodeFailedToRender?: string | undefined;
2276
+ qrCodeImportFailure?: string | undefined;
2214
2277
  redirectingTo?: string | undefined;
2215
2278
  registerButton?: string | undefined;
2216
2279
  registerHeader?: string | undefined;
@@ -2218,6 +2281,7 @@ declare const partialStringsSchema: ZodObject<{
2218
2281
  registerYourDevice?: string | undefined;
2219
2282
  requiredField?: string | undefined;
2220
2283
  securityAnswer?: string | undefined;
2284
+ scanQrCodeWithAuthenticator?: string | undefined;
2221
2285
  securityQuestions?: string | undefined;
2222
2286
  securityQuestionsPrompt?: string | undefined;
2223
2287
  shouldContainANumber?: string | undefined;
@@ -2226,6 +2290,7 @@ declare const partialStringsSchema: ZodObject<{
2226
2290
  shouldContainASymbol?: string | undefined;
2227
2291
  showPassword?: string | undefined;
2228
2292
  sn?: string | undefined;
2293
+ submit?: string | undefined;
2229
2294
  submitButton?: string | undefined;
2230
2295
  successMessage?: string | undefined;
2231
2296
  termsAndConditions?: string | undefined;
@@ -2237,6 +2302,7 @@ declare const partialStringsSchema: ZodObject<{
2237
2302
  unrecoverableError?: string | undefined;
2238
2303
  unknownLoginError?: string | undefined;
2239
2304
  unknownNetworkError?: string | undefined;
2305
+ url?: string | undefined;
2240
2306
  useDeviceForIdentityVerification?: string | undefined;
2241
2307
  userName?: string | undefined;
2242
2308
  usernameRequirements?: string | undefined;