@aooth/auth-moost 0.1.21 → 0.1.23
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/atscript/index.d.mts +38 -20
- package/dist/atscript/index.mjs +2 -2
- package/dist/{forms-uqegc32h.mjs → forms-xaBNc5Ng.mjs} +19 -3
- package/dist/index.d.mts +267 -21
- package/dist/index.mjs +399 -72
- package/package.json +9 -9
- package/src/atscript/models/forms.as +45 -2
- package/src/atscript/models/forms.as.d.ts +38 -19
|
@@ -138,7 +138,7 @@ declare class Select2faForm {
|
|
|
138
138
|
}
|
|
139
139
|
/**
|
|
140
140
|
* Atscript interface **PincodeForm**
|
|
141
|
-
* @see {@link ./forms.as:
|
|
141
|
+
* @see {@link ./forms.as:421:18}
|
|
142
142
|
*/
|
|
143
143
|
declare class PincodeForm {
|
|
144
144
|
// transportHint: ui.paragraph
|
|
@@ -157,7 +157,7 @@ declare class PincodeForm {
|
|
|
157
157
|
}
|
|
158
158
|
/**
|
|
159
159
|
* Atscript interface **AskEmailForm**
|
|
160
|
-
* @see {@link ./forms.as:
|
|
160
|
+
* @see {@link ./forms.as:460:18}
|
|
161
161
|
*/
|
|
162
162
|
declare class AskEmailForm extends WithInlineConsentForm {
|
|
163
163
|
// disclosure: ui.paragraph
|
|
@@ -174,7 +174,7 @@ declare class AskEmailForm extends WithInlineConsentForm {
|
|
|
174
174
|
}
|
|
175
175
|
/**
|
|
176
176
|
* Atscript interface **AskPhoneForm**
|
|
177
|
-
* @see {@link ./forms.as:
|
|
177
|
+
* @see {@link ./forms.as:490:18}
|
|
178
178
|
*/
|
|
179
179
|
declare class AskPhoneForm extends WithInlineConsentForm {
|
|
180
180
|
// disclosure: ui.paragraph
|
|
@@ -190,7 +190,7 @@ declare class AskPhoneForm extends WithInlineConsentForm {
|
|
|
190
190
|
}
|
|
191
191
|
/**
|
|
192
192
|
* Atscript interface **EnrollPickMethodForm**
|
|
193
|
-
* @see {@link ./forms.as:
|
|
193
|
+
* @see {@link ./forms.as:514:18}
|
|
194
194
|
*/
|
|
195
195
|
declare class EnrollPickMethodForm {
|
|
196
196
|
method: string; // skip: ui.action
|
|
@@ -206,7 +206,7 @@ declare class EnrollPickMethodForm {
|
|
|
206
206
|
}
|
|
207
207
|
/**
|
|
208
208
|
* Atscript interface **EnrollAddressForm**
|
|
209
|
-
* @see {@link ./forms.as:
|
|
209
|
+
* @see {@link ./forms.as:548:18}
|
|
210
210
|
*/
|
|
211
211
|
declare class EnrollAddressForm {
|
|
212
212
|
address: string; // skip: ui.action
|
|
@@ -223,7 +223,7 @@ declare class EnrollAddressForm {
|
|
|
223
223
|
}
|
|
224
224
|
/**
|
|
225
225
|
* Atscript interface **EnrollConfirmForm**
|
|
226
|
-
* @see {@link ./forms.as:
|
|
226
|
+
* @see {@link ./forms.as:594:18}
|
|
227
227
|
*/
|
|
228
228
|
declare class EnrollConfirmForm {
|
|
229
229
|
// transportHint: ui.paragraph
|
|
@@ -242,7 +242,7 @@ declare class EnrollConfirmForm {
|
|
|
242
242
|
}
|
|
243
243
|
/**
|
|
244
244
|
* Atscript interface **EnrollTotpQrForm**
|
|
245
|
-
* @see {@link ./forms.as:
|
|
245
|
+
* @see {@link ./forms.as:644:18}
|
|
246
246
|
*/
|
|
247
247
|
declare class EnrollTotpQrForm {
|
|
248
248
|
// qrCode: ui.paragraph
|
|
@@ -260,10 +260,11 @@ declare class EnrollTotpQrForm {
|
|
|
260
260
|
}
|
|
261
261
|
/**
|
|
262
262
|
* Atscript interface **ManageMfaForm**
|
|
263
|
-
* @see {@link ./forms.as:
|
|
263
|
+
* @see {@link ./forms.as:687:18}
|
|
264
264
|
*/
|
|
265
265
|
declare class ManageMfaForm {
|
|
266
266
|
// lockedNote: ui.paragraph
|
|
267
|
+
// requiredNote: ui.paragraph
|
|
267
268
|
operation: string; // cancel: ui.action
|
|
268
269
|
static __is_atscript_annotated_type: true;
|
|
269
270
|
static type: TAtscriptTypeObject<keyof ManageMfaForm, ManageMfaForm>;
|
|
@@ -276,7 +277,7 @@ declare class ManageMfaForm {
|
|
|
276
277
|
}
|
|
277
278
|
/**
|
|
278
279
|
* Atscript interface **RemoveMfaConfirmForm**
|
|
279
|
-
* @see {@link ./forms.as:
|
|
280
|
+
* @see {@link ./forms.as:721:18}
|
|
280
281
|
*/
|
|
281
282
|
declare class RemoveMfaConfirmForm {
|
|
282
283
|
// notice: ui.paragraph
|
|
@@ -292,7 +293,7 @@ declare class RemoveMfaConfirmForm {
|
|
|
292
293
|
}
|
|
293
294
|
/**
|
|
294
295
|
* Atscript interface **PasswordReauthForm**
|
|
295
|
-
* @see {@link ./forms.as:
|
|
296
|
+
* @see {@link ./forms.as:744:18}
|
|
296
297
|
*/
|
|
297
298
|
declare class PasswordReauthForm {
|
|
298
299
|
password: string; // cancel: ui.action
|
|
@@ -305,9 +306,26 @@ declare class PasswordReauthForm {
|
|
|
305
306
|
/** @deprecated Example Data support is disabled. To enable, set `exampleData: true` in tsPlugin options. */
|
|
306
307
|
static toExampleData?: () => any;
|
|
307
308
|
}
|
|
309
|
+
/**
|
|
310
|
+
* Atscript interface **StepUpConfirmForm**
|
|
311
|
+
* @see {@link ./forms.as:775:18}
|
|
312
|
+
*/
|
|
313
|
+
declare class StepUpConfirmForm {
|
|
314
|
+
// notice: ui.paragraph
|
|
315
|
+
// useDifferentMethod: ui.action
|
|
316
|
+
// cancel: ui.action
|
|
317
|
+
static __is_atscript_annotated_type: true;
|
|
318
|
+
static type: TAtscriptTypeObject<keyof StepUpConfirmForm, StepUpConfirmForm>;
|
|
319
|
+
static metadata: TMetadataMap<AtscriptMetadata>;
|
|
320
|
+
static validator: (opts?: Partial<TValidatorOptions>) => Validator<typeof StepUpConfirmForm>;
|
|
321
|
+
/** @deprecated JSON Schema support is disabled. Calling this method will throw a runtime error. To enable, set `jsonSchema: 'lazy'` or `jsonSchema: 'bundle'` in tsPlugin options, or add `@emit.jsonSchema` annotation to individual interfaces. */
|
|
322
|
+
static toJsonSchema: () => any;
|
|
323
|
+
/** @deprecated Example Data support is disabled. To enable, set `exampleData: true` in tsPlugin options. */
|
|
324
|
+
static toExampleData?: () => any;
|
|
325
|
+
}
|
|
308
326
|
/**
|
|
309
327
|
* Atscript interface **TermsBumpForm**
|
|
310
|
-
* @see {@link ./forms.as:
|
|
328
|
+
* @see {@link ./forms.as:803:18}
|
|
311
329
|
*/
|
|
312
330
|
declare class TermsBumpForm extends WithInlineConsentForm {
|
|
313
331
|
static __is_atscript_annotated_type: true;
|
|
@@ -321,7 +339,7 @@ declare class TermsBumpForm extends WithInlineConsentForm {
|
|
|
321
339
|
}
|
|
322
340
|
/**
|
|
323
341
|
* Atscript interface **ConcurrencyLimitForm**
|
|
324
|
-
* @see {@link ./forms.as:
|
|
342
|
+
* @see {@link ./forms.as:816:18}
|
|
325
343
|
*/
|
|
326
344
|
declare class ConcurrencyLimitForm {
|
|
327
345
|
static __is_atscript_annotated_type: true;
|
|
@@ -335,7 +353,7 @@ declare class ConcurrencyLimitForm {
|
|
|
335
353
|
}
|
|
336
354
|
/**
|
|
337
355
|
* Atscript interface **MagicLinkRequestForm**
|
|
338
|
-
* @see {@link ./forms.as:
|
|
356
|
+
* @see {@link ./forms.as:826:18}
|
|
339
357
|
*/
|
|
340
358
|
declare class MagicLinkRequestForm {
|
|
341
359
|
identifier: string;
|
|
@@ -350,7 +368,7 @@ declare class MagicLinkRequestForm {
|
|
|
350
368
|
}
|
|
351
369
|
/**
|
|
352
370
|
* Atscript interface **RecoveryModeSelectForm**
|
|
353
|
-
* @see {@link ./forms.as:
|
|
371
|
+
* @see {@link ./forms.as:841:18}
|
|
354
372
|
*/
|
|
355
373
|
declare class RecoveryModeSelectForm {
|
|
356
374
|
mode: string;
|
|
@@ -365,7 +383,7 @@ declare class RecoveryModeSelectForm {
|
|
|
365
383
|
}
|
|
366
384
|
/**
|
|
367
385
|
* Atscript interface **RecoveryFactorForm**
|
|
368
|
-
* @see {@link ./forms.as:
|
|
386
|
+
* @see {@link ./forms.as:864:18}
|
|
369
387
|
*/
|
|
370
388
|
declare class RecoveryFactorForm {
|
|
371
389
|
factor: string;
|
|
@@ -381,7 +399,7 @@ declare class RecoveryFactorForm {
|
|
|
381
399
|
}
|
|
382
400
|
/**
|
|
383
401
|
* Atscript interface **ChangePasswordForm**
|
|
384
|
-
* @see {@link ./forms.as:
|
|
402
|
+
* @see {@link ./forms.as:898:18}
|
|
385
403
|
*/
|
|
386
404
|
declare class ChangePasswordForm {
|
|
387
405
|
// intro: ui.paragraph
|
|
@@ -399,7 +417,7 @@ declare class ChangePasswordForm {
|
|
|
399
417
|
}
|
|
400
418
|
/**
|
|
401
419
|
* Atscript interface **ProveControlForm**
|
|
402
|
-
* @see {@link ./forms.as:
|
|
420
|
+
* @see {@link ./forms.as:963:18}
|
|
403
421
|
*/
|
|
404
422
|
declare class ProveControlForm {
|
|
405
423
|
// intro: ui.paragraph
|
|
@@ -415,7 +433,7 @@ declare class ProveControlForm {
|
|
|
415
433
|
}
|
|
416
434
|
/**
|
|
417
435
|
* Atscript interface **ProveControlOtpForm**
|
|
418
|
-
* @see {@link ./forms.as:
|
|
436
|
+
* @see {@link ./forms.as:998:18}
|
|
419
437
|
*/
|
|
420
438
|
declare class ProveControlOtpForm {
|
|
421
439
|
// intro: ui.paragraph
|
|
@@ -432,7 +450,7 @@ declare class ProveControlOtpForm {
|
|
|
432
450
|
}
|
|
433
451
|
/**
|
|
434
452
|
* Atscript interface **AuthorizeConsentForm**
|
|
435
|
-
* @see {@link ./forms.as:
|
|
453
|
+
* @see {@link ./forms.as:1048:18}
|
|
436
454
|
*/
|
|
437
455
|
declare class AuthorizeConsentForm {
|
|
438
456
|
// notice: ui.paragraph
|
|
@@ -447,4 +465,4 @@ declare class AuthorizeConsentForm {
|
|
|
447
465
|
static toExampleData?: () => any;
|
|
448
466
|
}
|
|
449
467
|
//#endregion
|
|
450
|
-
export { AskEmailForm, AskPhoneForm, AuthorizeConsentForm, ChangePasswordForm, ConcurrencyLimitForm, EmailIdentifierForm, EnrollAddressForm, EnrollConfirmForm, EnrollPickMethodForm, EnrollTotpQrForm, InviteForm, LoginCredentialsForm, MagicLinkRequestForm, ManageMfaForm, MfaCodeForm, PasswordReauthForm, PincodeForm, ProveControlForm, ProveControlOtpForm, RecoveryFactorForm, RecoveryModeSelectForm, RemoveMfaConfirmForm, Select2faForm, SetPasswordForm, SignupForm, TermsBumpForm, WithInlineConsentForm };
|
|
468
|
+
export { AskEmailForm, AskPhoneForm, AuthorizeConsentForm, ChangePasswordForm, ConcurrencyLimitForm, EmailIdentifierForm, EnrollAddressForm, EnrollConfirmForm, EnrollPickMethodForm, EnrollTotpQrForm, InviteForm, LoginCredentialsForm, MagicLinkRequestForm, ManageMfaForm, MfaCodeForm, PasswordReauthForm, PincodeForm, ProveControlForm, ProveControlOtpForm, RecoveryFactorForm, RecoveryModeSelectForm, RemoveMfaConfirmForm, Select2faForm, SetPasswordForm, SignupForm, StepUpConfirmForm, TermsBumpForm, WithInlineConsentForm };
|
package/dist/atscript/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { C as Select2faForm, D as
|
|
2
|
-
export { AskEmailForm, AskPhoneForm, AuthorizeConsentForm, ChangePasswordForm, ConcurrencyLimitForm, EmailIdentifierForm, EnrollAddressForm, EnrollConfirmForm, EnrollPickMethodForm, EnrollTotpQrForm, InviteForm, LoginCredentialsForm, MagicLinkRequestForm, ManageMfaForm, MfaCodeForm, PasswordReauthForm, PincodeForm, ProveControlForm, ProveControlOtpForm, RecoveryFactorForm, RecoveryModeSelectForm, RemoveMfaConfirmForm, Select2faForm, SetPasswordForm, SignupForm, TermsBumpForm, WithInlineConsentForm };
|
|
1
|
+
import { C as Select2faForm, D as TermsBumpForm, E as StepUpConfirmForm, O as WithInlineConsentForm, S as RemoveMfaConfirmForm, T as SignupForm, _ as PincodeForm, a as ConcurrencyLimitForm, b as RecoveryFactorForm, c as EnrollConfirmForm, d as InviteForm, f as LoginCredentialsForm, g as PasswordReauthForm, h as MfaCodeForm, i as ChangePasswordForm, l as EnrollPickMethodForm, m as ManageMfaForm, n as AskPhoneForm, o as EmailIdentifierForm, p as MagicLinkRequestForm, r as AuthorizeConsentForm, s as EnrollAddressForm, t as AskEmailForm, u as EnrollTotpQrForm, v as ProveControlForm, w as SetPasswordForm, x as RecoveryModeSelectForm, y as ProveControlOtpForm } from "../forms-xaBNc5Ng.mjs";
|
|
2
|
+
export { AskEmailForm, AskPhoneForm, AuthorizeConsentForm, ChangePasswordForm, ConcurrencyLimitForm, EmailIdentifierForm, EnrollAddressForm, EnrollConfirmForm, EnrollPickMethodForm, EnrollTotpQrForm, InviteForm, LoginCredentialsForm, MagicLinkRequestForm, ManageMfaForm, MfaCodeForm, PasswordReauthForm, PincodeForm, ProveControlForm, ProveControlOtpForm, RecoveryFactorForm, RecoveryModeSelectForm, RemoveMfaConfirmForm, Select2faForm, SetPasswordForm, SignupForm, StepUpConfirmForm, TermsBumpForm, WithInlineConsentForm };
|
|
@@ -162,6 +162,15 @@ var PasswordReauthForm = class {
|
|
|
162
162
|
throwFeatureDisabled("JSON Schema", "jsonSchema", "emit.jsonSchema");
|
|
163
163
|
}
|
|
164
164
|
};
|
|
165
|
+
var StepUpConfirmForm = class {
|
|
166
|
+
static __is_atscript_annotated_type = true;
|
|
167
|
+
static type = {};
|
|
168
|
+
static metadata = /* @__PURE__ */ new Map();
|
|
169
|
+
static id = "StepUpConfirmForm";
|
|
170
|
+
static toJsonSchema() {
|
|
171
|
+
throwFeatureDisabled("JSON Schema", "jsonSchema", "emit.jsonSchema");
|
|
172
|
+
}
|
|
173
|
+
};
|
|
165
174
|
var TermsBumpForm = class {
|
|
166
175
|
static __is_atscript_annotated_type = true;
|
|
167
176
|
static type = {};
|
|
@@ -319,7 +328,7 @@ defineAnnotatedType("object", InviteForm).prop("email", defineAnnotatedType().de
|
|
|
319
328
|
flags: "",
|
|
320
329
|
message: "Invalid email format."
|
|
321
330
|
}, true).$type).prop("roles", defineAnnotatedType("array").of(defineAnnotatedType().designType("string").tags("string").$type).annotate("ui.form.order", 20).annotate("ui.form.type", "select").annotate("ui.form.fn.options", "(_, _data, context) => Array.isArray(context.public?.admin?.availableRoles) ? context.public.admin.availableRoles.map(r => ({ key: r, label: r })) : []").annotate("meta.label", "Roles").$type).annotate("meta.label", "Send an invitation").annotate("meta.description", "Enter the recipient email address and pick the roles to grant on acceptance. They will receive a magic link to set their password.").annotate("wf.context.pass", "public", true);
|
|
322
|
-
defineAnnotatedType("object", Select2faForm).prop("methodName", defineAnnotatedType().designType("string").tags("string").annotate("ui.form.order", 10).annotate("ui.form.type", "radio").annotate("ui.form.fn.options", "(_, _d, ctx) => Array.isArray(ctx.public?.mfa?.enrolledMethods) ? ctx.public.mfa.enrolledMethods.map(m => ({ key: m.methodName, label: m.kind === \"totp\" ? \"TOTP (Authenticator app)\" : m.kind === \"email\" ? \"Email\" : m.kind === \"sms\" ? \"SMS\" : m.kind })) : []").annotate("meta.label", "MFA method").annotate("meta.required", {}).$type).prop("saveAsDefault", defineAnnotatedType().designType("boolean").tags("boolean").annotate("ui.form.type", "checkbox").annotate("meta.label", "Save as default").annotate("meta.default", "false").$type).prop("rememberDevice", defineAnnotatedType().designType("boolean").tags("boolean").annotate("ui.form.type", "checkbox").annotate("meta.label", "Remember this device").annotate("meta.default", "false").annotate("ui.form.fn.hidden", "(_, _d, ctx) => !ctx.public?.trust?.optIn || !!ctx.public?.newPasswordRequired").$type).annotate("meta.label", "Choose a verification method").annotate("meta.description", "Pick how you would like to verify your identity.").annotate("wf.context.pass", "public", true);
|
|
331
|
+
defineAnnotatedType("object", Select2faForm).prop("methodName", defineAnnotatedType().designType("string").tags("string").annotate("ui.form.order", 10).annotate("ui.form.type", "radio").annotate("ui.form.fn.options", "(_, _d, ctx) => Array.isArray(ctx.public?.mfa?.enrolledMethods) ? ctx.public.mfa.enrolledMethods.map(m => ({ key: m.methodName, label: (m.kind === \"totp\" ? \"TOTP (Authenticator app)\" : m.kind === \"email\" ? \"Email\" : m.kind === \"sms\" ? \"SMS\" : m.kind) + (m.masked && (m.kind === \"email\" || m.kind === \"sms\") ? \" (\" + m.masked + \")\" : \"\") })) : []").annotate("meta.label", "MFA method").annotate("meta.required", {}).$type).prop("saveAsDefault", defineAnnotatedType().designType("boolean").tags("boolean").annotate("ui.form.type", "checkbox").annotate("meta.label", "Save as default").annotate("meta.default", "false").$type).prop("rememberDevice", defineAnnotatedType().designType("boolean").tags("boolean").annotate("ui.form.type", "checkbox").annotate("meta.label", "Remember this device").annotate("meta.default", "false").annotate("ui.form.fn.hidden", "(_, _d, ctx) => !ctx.public?.trust?.optIn || !!ctx.public?.newPasswordRequired").$type).annotate("meta.label", "Choose a verification method").annotate("meta.description", "Pick how you would like to verify your identity.").annotate("wf.context.pass", "public", true);
|
|
323
332
|
defineAnnotatedType("object", PincodeForm).prop("transportHint", defineAnnotatedType().designType("phantom").tags("paragraph", "ui").annotate("ui.form.fn.value", "(_, _d, ctx) => ctx.public?.mfa?.method === \"totp\" ? \"Enter the current 6-digit code from your authenticator app.\" : ctx.public?.pincode?.sentTo ? \"Code sent to \" + ctx.public.pincode.sentTo + \".\" : \"Enter your verification code.\"").optional().$type).prop("code", defineAnnotatedType().designType("string").tags("string").annotate("ui.form.type", "text").annotate("meta.label", "Verification code").annotate("ui.form.autocomplete", "one-time-code").annotate("ui.form.fn.attr", {
|
|
324
333
|
name: "maxlength",
|
|
325
334
|
fn: "(_, _d, ctx) => ctx.public?.pincode?.codeLength"
|
|
@@ -394,7 +403,7 @@ defineAnnotatedType("object", EnrollTotpQrForm).prop("qrCode", defineAnnotatedTy
|
|
|
394
403
|
id: "skip",
|
|
395
404
|
label: "Skip for now"
|
|
396
405
|
}).annotate("ui.form.fn.hidden", "(_, _d, ctx) => ctx.public?.mfaEnroll?.mode !== \"optional\"").optional().$type).annotate("meta.label", "Scan this QR code").annotate("meta.description", "Open your authenticator app and scan the code (or enter the key manually), then continue to enter the code it shows.").annotate("wf.context.pass", "public", true).annotate("ui.form.submit.text", "Continue");
|
|
397
|
-
defineAnnotatedType("object", ManageMfaForm).prop("lockedNote", defineAnnotatedType().designType("phantom").tags("paragraph", "ui").annotate("ui.form.order", 5).annotate("ui.form.fn.value", "(_, _d, ctx) => (ctx.public?.manage?.locked?.length ?? 0) > 0 ? \"Some methods are also used to sign in and can’t be changed here.\" : \"\"").annotate("ui.form.fn.hidden", "(_, _d, ctx) => (ctx.public?.manage?.locked?.length ?? 0) === 0").$type).prop("operation", defineAnnotatedType().designType("string").tags("string").annotate("ui.form.order", 10).annotate("ui.form.type", "radio").annotate("ui.form.fn.options", "(_, _d, ctx) => { const lbl = (t) => t === \"totp\" ? \"authenticator app\" : t === \"sms\" ? \"SMS\" : t === \"email\" ? \"email\" : t; const locked = ctx.public?.manage?.locked ?? []; const out = []; for (const t of (ctx.public?.manage?.candidates ?? [])) out.push({ key: \"add:\" + t, label: \"Add \" + lbl(t) }); for (const m of (ctx.public?.mfa?.enrolledMethods ?? [])) { if (locked.includes(m.kind)) continue; out.push({ key: \"replace:\" + m.kind, label: \"Change \" + lbl(m.kind) + (m.masked ? \" (\" + m.masked + \")\" : \"\") }); out.push({ key: \"remove:\" + m.kind, label: \"Remove \" + lbl(m.kind) }); } return out; }").annotate("meta.label", "What would you like to do?").annotate("meta.required", {}).$type).prop("cancel", defineAnnotatedType().designType("phantom").tags("action", "ui").annotate("ui.form.action", {
|
|
406
|
+
defineAnnotatedType("object", ManageMfaForm).prop("lockedNote", defineAnnotatedType().designType("phantom").tags("paragraph", "ui").annotate("ui.form.order", 5).annotate("ui.form.fn.value", "(_, _d, ctx) => (ctx.public?.manage?.locked?.length ?? 0) > 0 ? \"Some methods are also used to sign in and can’t be changed here.\" : \"\"").annotate("ui.form.fn.hidden", "(_, _d, ctx) => (ctx.public?.manage?.locked?.length ?? 0) === 0").$type).prop("requiredNote", defineAnnotatedType().designType("phantom").tags("paragraph", "ui").annotate("ui.form.order", 6).annotate("ui.form.fn.value", "(_, _d, ctx) => ctx.public?.manage?.removeBlocked ? \"Two-factor authentication is required for your account, so your last method can be changed but not removed.\" : \"\"").annotate("ui.form.fn.hidden", "(_, _d, ctx) => !ctx.public?.manage?.removeBlocked").$type).prop("operation", defineAnnotatedType().designType("string").tags("string").annotate("ui.form.order", 10).annotate("ui.form.type", "radio").annotate("ui.form.fn.options", "(_, _d, ctx) => { const lbl = (t) => t === \"totp\" ? \"authenticator app\" : t === \"sms\" ? \"SMS\" : t === \"email\" ? \"email\" : t; const locked = ctx.public?.manage?.locked ?? []; const out = []; for (const t of (ctx.public?.manage?.candidates ?? [])) out.push({ key: \"add:\" + t, label: \"Add \" + lbl(t) }); for (const m of (ctx.public?.mfa?.enrolledMethods ?? [])) { if (locked.includes(m.kind)) continue; out.push({ key: \"replace:\" + m.kind, label: \"Change \" + lbl(m.kind) + (m.masked ? \" (\" + m.masked + \")\" : \"\") }); if (!ctx.public?.manage?.removeBlocked) out.push({ key: \"remove:\" + m.kind, label: \"Remove \" + lbl(m.kind) }); } return out; }").annotate("meta.label", "What would you like to do?").annotate("meta.required", {}).$type).prop("cancel", defineAnnotatedType().designType("phantom").tags("action", "ui").annotate("ui.form.action", {
|
|
398
407
|
id: "cancel",
|
|
399
408
|
label: "Cancel"
|
|
400
409
|
}).annotate("ui.form.fn.hidden", "() => true").optional().$type).annotate("meta.label", "Manage two-factor authentication").annotate("meta.description", "Add, change, or remove a verification method.").annotate("wf.context.pass", "public", true).annotate("ui.form.submit.text", "Continue");
|
|
@@ -406,6 +415,13 @@ defineAnnotatedType("object", PasswordReauthForm).prop("password", defineAnnotat
|
|
|
406
415
|
id: "cancel",
|
|
407
416
|
label: "Cancel"
|
|
408
417
|
}).annotate("ui.form.fn.hidden", "() => true").optional().$type).annotate("meta.label", "Confirm your password").annotate("meta.description", "Re-enter your account password to manage your two-factor methods.").annotate("wf.context.pass", "public", true).annotate("ui.form.submit.text", "Verify");
|
|
418
|
+
defineAnnotatedType("object", StepUpConfirmForm).prop("notice", defineAnnotatedType().designType("phantom").tags("paragraph", "ui").annotate("ui.form.order", 1).annotate("ui.form.fn.value", "(_, _d, ctx) => { const kind = ctx.public?.mfa?.method; const m = (ctx.public?.mfa?.enrolledMethods ?? []).find(e => e.kind === kind); const to = m && m.masked ? \" to \" + m.masked : kind === \"sms\" ? \" to your phone\" : \" to your email\"; return \"To continue, we will send a verification code\" + to + \".\"; }").$type).prop("useDifferentMethod", defineAnnotatedType().designType("phantom").tags("action", "ui").annotate("ui.form.action", {
|
|
419
|
+
id: "useDifferentMethod",
|
|
420
|
+
label: "Use a different method"
|
|
421
|
+
}).annotate("ui.form.fn.hidden", "(_, _d, ctx) => (ctx.public?.mfa?.methodCount ?? 0) < 2").optional().$type).prop("cancel", defineAnnotatedType().designType("phantom").tags("action", "ui").annotate("ui.form.action", {
|
|
422
|
+
id: "cancel",
|
|
423
|
+
label: "Cancel"
|
|
424
|
+
}).annotate("ui.form.fn.hidden", "() => true").optional().$type).annotate("meta.label", "Verify your identity").annotate("wf.context.pass", "public", true).annotate("ui.form.submit.text", "Continue");
|
|
409
425
|
defineAnnotatedType("object", TermsBumpForm).prop("consents", defineAnnotatedType("array").of(defineAnnotatedType().designType("string").tags("string").$type).annotate("meta.label", "Pending consents").annotate("ui.form.component", "AsConsentArray").annotate("ui.form.fn.attr", {
|
|
410
426
|
name: "pendingConsents",
|
|
411
427
|
fn: "(_, _d, ctx) => ctx.public?.consents?.pending"
|
|
@@ -455,4 +471,4 @@ defineAnnotatedType("object", AuthorizeConsentForm).prop("notice", defineAnnotat
|
|
|
455
471
|
value: "center"
|
|
456
472
|
}, true).annotate("ui.form.pushDown", true).optional().$type).annotate("meta.label", "Authorize access").annotate("wf.context.pass", "public", true).annotate("ui.form.submit.text", "Authorize");
|
|
457
473
|
//#endregion
|
|
458
|
-
export { Select2faForm as C,
|
|
474
|
+
export { Select2faForm as C, TermsBumpForm as D, StepUpConfirmForm as E, WithInlineConsentForm as O, RemoveMfaConfirmForm as S, SignupForm as T, PincodeForm as _, ConcurrencyLimitForm as a, RecoveryFactorForm as b, EnrollConfirmForm as c, InviteForm as d, LoginCredentialsForm as f, PasswordReauthForm as g, MfaCodeForm as h, ChangePasswordForm as i, EnrollPickMethodForm as l, ManageMfaForm as m, AskPhoneForm as n, EmailIdentifierForm as o, MagicLinkRequestForm as p, AuthorizeConsentForm as r, EnrollAddressForm as s, AskEmailForm as t, EnrollTotpQrForm as u, ProveControlForm as v, SetPasswordForm as w, RecoveryModeSelectForm as x, ProveControlOtpForm as y };
|