@aooth/auth-moost 0.2.4 → 0.2.6

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.
@@ -35,7 +35,7 @@ export declare class LoginCredentialsForm {
35
35
  }
36
36
  /**
37
37
  * Atscript interface **MfaCodeForm**
38
- * @see {@link ./forms.as:137:18}
38
+ * @see {@link ./forms.as:139:18}
39
39
  */
40
40
  export declare class MfaCodeForm {
41
41
  // transportHint: ui.paragraph
@@ -53,7 +53,7 @@ export declare class MfaCodeForm {
53
53
  }
54
54
  /**
55
55
  * Atscript interface **EmailIdentifierForm**
56
- * @see {@link ./forms.as:174:18}
56
+ * @see {@link ./forms.as:176:18}
57
57
  */
58
58
  export declare class EmailIdentifierForm {
59
59
  email: string; /* email */
@@ -69,7 +69,7 @@ export declare class EmailIdentifierForm {
69
69
  }
70
70
  /**
71
71
  * Atscript interface **SignupForm**
72
- * @see {@link ./forms.as:206:18}
72
+ * @see {@link ./forms.as:208:18}
73
73
  */
74
74
  export declare class SignupForm {
75
75
  email: string; /* email */
@@ -85,7 +85,7 @@ export declare class SignupForm {
85
85
  }
86
86
  /**
87
87
  * Atscript interface **SetPasswordForm**
88
- * @see {@link ./forms.as:264:18}
88
+ * @see {@link ./forms.as:267:18}
89
89
  */
90
90
  export declare class SetPasswordForm extends WithInlineConsentForm {
91
91
  // intro: ui.paragraph
@@ -103,7 +103,7 @@ export declare class SetPasswordForm extends WithInlineConsentForm {
103
103
  }
104
104
  /**
105
105
  * Atscript interface **InviteForm**
106
- * @see {@link ./forms.as:342:18}
106
+ * @see {@link ./forms.as:345:18}
107
107
  */
108
108
  export declare class InviteForm {
109
109
  email: string; /* email */
@@ -119,7 +119,7 @@ export declare class InviteForm {
119
119
  }
120
120
  /**
121
121
  * Atscript interface **InviteChooseUsernameForm**
122
- * @see {@link ./forms.as:367:18}
122
+ * @see {@link ./forms.as:370:18}
123
123
  */
124
124
  export declare class InviteChooseUsernameForm {
125
125
  username: string;
@@ -134,7 +134,7 @@ export declare class InviteChooseUsernameForm {
134
134
  }
135
135
  /**
136
136
  * Atscript interface **Select2faForm**
137
- * @see {@link ./forms.as:391:18}
137
+ * @see {@link ./forms.as:394:18}
138
138
  */
139
139
  export declare class Select2faForm {
140
140
  methodName: string;
@@ -151,7 +151,7 @@ export declare class Select2faForm {
151
151
  }
152
152
  /**
153
153
  * Atscript interface **PincodeForm**
154
- * @see {@link ./forms.as:441:18}
154
+ * @see {@link ./forms.as:444:18}
155
155
  */
156
156
  export declare class PincodeForm {
157
157
  // transportHint: ui.paragraph
@@ -171,7 +171,7 @@ export declare class PincodeForm {
171
171
  }
172
172
  /**
173
173
  * Atscript interface **AskEmailForm**
174
- * @see {@link ./forms.as:480:18}
174
+ * @see {@link ./forms.as:483:18}
175
175
  */
176
176
  export declare class AskEmailForm extends WithInlineConsentForm {
177
177
  // disclosure: ui.paragraph
@@ -187,7 +187,7 @@ export declare class AskEmailForm extends WithInlineConsentForm {
187
187
  }
188
188
  /**
189
189
  * Atscript interface **AskPhoneForm**
190
- * @see {@link ./forms.as:510:18}
190
+ * @see {@link ./forms.as:513:18}
191
191
  */
192
192
  export declare class AskPhoneForm extends WithInlineConsentForm {
193
193
  // disclosure: ui.paragraph
@@ -203,7 +203,7 @@ export declare class AskPhoneForm extends WithInlineConsentForm {
203
203
  }
204
204
  /**
205
205
  * Atscript interface **EnrollPickMethodForm**
206
- * @see {@link ./forms.as:534:18}
206
+ * @see {@link ./forms.as:537:18}
207
207
  */
208
208
  export declare class EnrollPickMethodForm {
209
209
  method: string;
@@ -220,7 +220,7 @@ export declare class EnrollPickMethodForm {
220
220
  }
221
221
  /**
222
222
  * Atscript interface **EnrollAddressForm**
223
- * @see {@link ./forms.as:568:18}
223
+ * @see {@link ./forms.as:571:18}
224
224
  */
225
225
  export declare class EnrollAddressForm {
226
226
  address: string;
@@ -238,7 +238,7 @@ export declare class EnrollAddressForm {
238
238
  }
239
239
  /**
240
240
  * Atscript interface **EnrollConfirmForm**
241
- * @see {@link ./forms.as:614:18}
241
+ * @see {@link ./forms.as:617:18}
242
242
  */
243
243
  export declare class EnrollConfirmForm {
244
244
  // transportHint: ui.paragraph
@@ -258,7 +258,7 @@ export declare class EnrollConfirmForm {
258
258
  }
259
259
  /**
260
260
  * Atscript interface **EnrollTotpQrForm**
261
- * @see {@link ./forms.as:664:18}
261
+ * @see {@link ./forms.as:667:18}
262
262
  */
263
263
  export declare class EnrollTotpQrForm {
264
264
  // qrCode: ui.paragraph
@@ -276,7 +276,7 @@ export declare class EnrollTotpQrForm {
276
276
  }
277
277
  /**
278
278
  * Atscript interface **ManageMfaForm**
279
- * @see {@link ./forms.as:707:18}
279
+ * @see {@link ./forms.as:710:18}
280
280
  */
281
281
  export declare class ManageMfaForm {
282
282
  // lockedNote: ui.paragraph
@@ -294,7 +294,7 @@ export declare class ManageMfaForm {
294
294
  }
295
295
  /**
296
296
  * Atscript interface **RemoveMfaConfirmForm**
297
- * @see {@link ./forms.as:741:18}
297
+ * @see {@link ./forms.as:744:18}
298
298
  */
299
299
  export declare class RemoveMfaConfirmForm {
300
300
  // notice: ui.paragraph
@@ -310,7 +310,7 @@ export declare class RemoveMfaConfirmForm {
310
310
  }
311
311
  /**
312
312
  * Atscript interface **PasswordReauthForm**
313
- * @see {@link ./forms.as:764:18}
313
+ * @see {@link ./forms.as:767:18}
314
314
  */
315
315
  export declare class PasswordReauthForm {
316
316
  password: string;
@@ -326,7 +326,7 @@ export declare class PasswordReauthForm {
326
326
  }
327
327
  /**
328
328
  * Atscript interface **StepUpConfirmForm**
329
- * @see {@link ./forms.as:795:18}
329
+ * @see {@link ./forms.as:798:18}
330
330
  */
331
331
  export declare class StepUpConfirmForm {
332
332
  // notice: ui.paragraph
@@ -343,7 +343,7 @@ export declare class StepUpConfirmForm {
343
343
  }
344
344
  /**
345
345
  * Atscript interface **TermsBumpForm**
346
- * @see {@link ./forms.as:823:18}
346
+ * @see {@link ./forms.as:826:18}
347
347
  */
348
348
  export declare class TermsBumpForm extends WithInlineConsentForm {
349
349
  static __is_atscript_annotated_type: true;
@@ -357,7 +357,7 @@ export declare class TermsBumpForm extends WithInlineConsentForm {
357
357
  }
358
358
  /**
359
359
  * Atscript interface **ConcurrencyLimitForm**
360
- * @see {@link ./forms.as:836:18}
360
+ * @see {@link ./forms.as:839:18}
361
361
  */
362
362
  export declare class ConcurrencyLimitForm {
363
363
  static __is_atscript_annotated_type: true;
@@ -371,7 +371,7 @@ export declare class ConcurrencyLimitForm {
371
371
  }
372
372
  /**
373
373
  * Atscript interface **MagicLinkRequestForm**
374
- * @see {@link ./forms.as:846:18}
374
+ * @see {@link ./forms.as:850:18}
375
375
  */
376
376
  export declare class MagicLinkRequestForm {
377
377
  identifier: string;
@@ -385,31 +385,30 @@ export declare class MagicLinkRequestForm {
385
385
  static toExampleData?: () => any;
386
386
  }
387
387
  /**
388
- * Atscript interface **RecoveryModeSelectForm**
389
- * @see {@link ./forms.as:861:18}
388
+ * Atscript interface **MagicLinkConfirmForm**
389
+ * @see {@link ./forms.as:868:18}
390
390
  */
391
- export declare class RecoveryModeSelectForm {
392
- mode: string;
391
+ export declare class MagicLinkConfirmForm {
392
+ // notice: ui.paragraph
393
393
  static __is_atscript_annotated_type: true;
394
- static type: TAtscriptTypeObject<keyof RecoveryModeSelectForm, RecoveryModeSelectForm>;
394
+ static type: TAtscriptTypeObject<keyof MagicLinkConfirmForm, MagicLinkConfirmForm>;
395
395
  static metadata: TMetadataMap<AtscriptMetadata>;
396
- static validator: (opts?: Partial<TValidatorOptions>) => Validator<typeof RecoveryModeSelectForm>;
396
+ static validator: (opts?: Partial<TValidatorOptions>) => Validator<typeof MagicLinkConfirmForm>;
397
397
  /** @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. */
398
398
  static toJsonSchema: () => any;
399
399
  /** @deprecated Example Data support is disabled. To enable, set `exampleData: true` in tsPlugin options. */
400
400
  static toExampleData?: () => any;
401
401
  }
402
402
  /**
403
- * Atscript interface **RecoveryFactorForm**
404
- * @see {@link ./forms.as:884:18}
403
+ * Atscript interface **RecoveryModeSelectForm**
404
+ * @see {@link ./forms.as:882:18}
405
405
  */
406
- export declare class RecoveryFactorForm {
407
- factor: string;
408
- value: string;
406
+ export declare class RecoveryModeSelectForm {
407
+ mode: string;
409
408
  static __is_atscript_annotated_type: true;
410
- static type: TAtscriptTypeObject<keyof RecoveryFactorForm, RecoveryFactorForm>;
409
+ static type: TAtscriptTypeObject<keyof RecoveryModeSelectForm, RecoveryModeSelectForm>;
411
410
  static metadata: TMetadataMap<AtscriptMetadata>;
412
- static validator: (opts?: Partial<TValidatorOptions>) => Validator<typeof RecoveryFactorForm>;
411
+ static validator: (opts?: Partial<TValidatorOptions>) => Validator<typeof RecoveryModeSelectForm>;
413
412
  /** @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. */
414
413
  static toJsonSchema: () => any;
415
414
  /** @deprecated Example Data support is disabled. To enable, set `exampleData: true` in tsPlugin options. */
@@ -417,7 +416,7 @@ export declare class RecoveryFactorForm {
417
416
  }
418
417
  /**
419
418
  * Atscript interface **ChangePasswordForm**
420
- * @see {@link ./forms.as:918:18}
419
+ * @see {@link ./forms.as:910:18}
421
420
  */
422
421
  export declare class ChangePasswordForm {
423
422
  // intro: ui.paragraph
@@ -436,7 +435,7 @@ export declare class ChangePasswordForm {
436
435
  }
437
436
  /**
438
437
  * Atscript interface **ProveControlForm**
439
- * @see {@link ./forms.as:983:18}
438
+ * @see {@link ./forms.as:975:18}
440
439
  */
441
440
  export declare class ProveControlForm {
442
441
  // intro: ui.paragraph
@@ -453,7 +452,7 @@ export declare class ProveControlForm {
453
452
  }
454
453
  /**
455
454
  * Atscript interface **ProveControlOtpForm**
456
- * @see {@link ./forms.as:1018:18}
455
+ * @see {@link ./forms.as:1010:18}
457
456
  */
458
457
  export declare class ProveControlOtpForm {
459
458
  // intro: ui.paragraph
@@ -471,7 +470,7 @@ export declare class ProveControlOtpForm {
471
470
  }
472
471
  /**
473
472
  * Atscript interface **AuthorizeConsentForm**
474
- * @see {@link ./forms.as:1070:18}
473
+ * @see {@link ./forms.as:1062:18}
475
474
  */
476
475
  export declare class AuthorizeConsentForm {
477
476
  // notice: ui.paragraph
@@ -1 +1 @@
1
- export { t as AskEmailForm, n as AskPhoneForm, r as AuthorizeConsentForm, i as ChangePasswordForm, a as ConcurrencyLimitForm, o as EmailIdentifierForm, s as EnrollAddressForm, c as EnrollConfirmForm, l as EnrollPickMethodForm, u as EnrollTotpQrForm, d as InviteChooseUsernameForm, f as InviteForm, p as LoginCredentialsForm, m as MagicLinkRequestForm, h as ManageMfaForm, g as MfaCodeForm, _ as PasswordReauthForm, v as PincodeForm, y as ProveControlForm, b as ProveControlOtpForm, x as RecoveryFactorForm, S as RecoveryModeSelectForm, C as RemoveMfaConfirmForm, w as Select2faForm, T as SetPasswordForm, E as SignupForm, D as StepUpConfirmForm, O as TermsBumpForm, k as WithInlineConsentForm } from "../forms-C_VNxSDn.mjs";
1
+ export { t as AskEmailForm, n as AskPhoneForm, r as AuthorizeConsentForm, i as ChangePasswordForm, a as ConcurrencyLimitForm, o as EmailIdentifierForm, s as EnrollAddressForm, c as EnrollConfirmForm, l as EnrollPickMethodForm, u as EnrollTotpQrForm, d as InviteChooseUsernameForm, f as InviteForm, p as LoginCredentialsForm, m as MagicLinkConfirmForm, h as MagicLinkRequestForm, g as ManageMfaForm, _ as MfaCodeForm, v as PasswordReauthForm, y as PincodeForm, b as ProveControlForm, x as ProveControlOtpForm, S as RecoveryModeSelectForm, C as RemoveMfaConfirmForm, w as Select2faForm, T as SetPasswordForm, E as SignupForm, D as StepUpConfirmForm, O as TermsBumpForm, k as WithInlineConsentForm } from "../forms-BUF9oMsE.mjs";
@@ -1,4 +1,4 @@
1
- import { $ak, $f, $nr, defineAnnotatedType, throwFeatureDisabled } from "@atscript/typescript/utils";
1
+ import { $ak, $f, $nr, $ut, defineAnnotatedType, throwFeatureDisabled } from "@atscript/typescript/utils";
2
2
  // src/atscript/models/forms.as
3
3
  var WithInlineConsentForm = class {
4
4
  static __is_atscript_annotated_type = true;
@@ -207,20 +207,20 @@ var MagicLinkRequestForm = class {
207
207
  throwFeatureDisabled("JSON Schema", "jsonSchema", "emit.jsonSchema");
208
208
  }
209
209
  };
210
- var RecoveryModeSelectForm = class {
210
+ var MagicLinkConfirmForm = class {
211
211
  static __is_atscript_annotated_type = true;
212
212
  static type = {};
213
213
  static metadata = /* @__PURE__ */ new Map();
214
- static id = "RecoveryModeSelectForm";
214
+ static id = "MagicLinkConfirmForm";
215
215
  static toJsonSchema() {
216
216
  throwFeatureDisabled("JSON Schema", "jsonSchema", "emit.jsonSchema");
217
217
  }
218
218
  };
219
- var RecoveryFactorForm = class {
219
+ var RecoveryModeSelectForm = class {
220
220
  static __is_atscript_annotated_type = true;
221
221
  static type = {};
222
222
  static metadata = /* @__PURE__ */ new Map();
223
- static id = "RecoveryFactorForm";
223
+ static id = "RecoveryModeSelectForm";
224
224
  static toJsonSchema() {
225
225
  throwFeatureDisabled("JSON Schema", "jsonSchema", "emit.jsonSchema");
226
226
  }
@@ -263,6 +263,7 @@ var AuthorizeConsentForm = class {
263
263
  };
264
264
  $ak("expect.pattern", "ui.dict.attr", "ui.form.classes", "ui.form.styles", "ui.form.validate", "ui.literalLabel", "ui.table.classes", "ui.table.selectWith", "ui.table.styles", "wf.context.pass");
265
265
  $nr("meta.default", "meta.id", "meta.readonly", "meta.required", "ui.dict.attr", "ui.dict.descr", "ui.dict.filterable", "ui.dict.label", "ui.dict.searchable", "ui.dict.sortable", "ui.form.disabled", "ui.form.hidden", "ui.form.order", "ui.form.prefix.ref", "ui.form.suffix.ref", "ui.nav.group", "ui.nav.hidden", "ui.nav.order", "ui.table.exclude", "ui.table.order", "ui.table.selectWith", "wf.store.fromContext");
266
+ $ut("ui.form.action:label", "ui.form.fn.attr:fn()", "ui.form.fn.label()", "ui.form.fn.options()", "ui.form.fn.title()", "ui.form.fn.value()", "ui.form.options:label", "ui.form.submit.text", "ui.form.validate()");
266
267
  defineAnnotatedType("object", WithInlineConsentForm).annotate("wf.context.pass", "public", true).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", {
267
268
  name: "pendingConsents",
268
269
  fn: "(_, _d, ctx) => ctx.public?.consents?.pending"
@@ -276,6 +277,9 @@ defineAnnotatedType("object", LoginCredentialsForm).annotate("meta.label", "Sign
276
277
  }).annotate("ui.form.attr", {
277
278
  name: "text",
278
279
  value: "Don’t have an account?"
280
+ }, true).annotate("ui.form.fn.attr", {
281
+ name: "text",
282
+ fn: "(_, _d, _c, _e, t) => t(\"Don’t have an account?\")"
279
283
  }, true).annotate("ui.form.attr", {
280
284
  name: "align",
281
285
  value: "center"
@@ -287,12 +291,12 @@ defineAnnotatedType("object", LoginCredentialsForm).annotate("meta.label", "Sign
287
291
  value: "center"
288
292
  }, true).annotate("ui.form.pushDown", true).annotate("ui.form.fn.hidden", "(_, _d, ctx) => !ctx.public?.altActions?.magicLink").optional().$type).prop("ssoProvider", defineAnnotatedType().designType("string").tags("string").annotate("ui.form.order", 50).annotate("ui.form.component", "AsSsoProviders").annotate("ui.form.fn.attr", {
289
293
  name: "providers",
290
- fn: "(_, _d, ctx) => Array.isArray(ctx.public?.altActions?.ssoProviders) ? ctx.public.altActions.ssoProviders.map((p) => ({ id: p.id, text: \"Continue with \" + p.label, icon: p.icon })) : []"
294
+ fn: "(_, _d, ctx, _e, t) => Array.isArray(ctx.public?.altActions?.ssoProviders) ? ctx.public.altActions.ssoProviders.map((p) => ({ id: p.id, text: t(\"Continue with {provider}\", { provider: p.label }), icon: p.icon })) : []"
291
295
  }, true).annotate("ui.form.fn.hidden", "(_, _d, ctx) => (ctx.public?.altActions?.ssoProviders?.length ?? 0) === 0").annotate("meta.label", "Or sign in with").annotate("ui.form.action", {
292
296
  id: "sso",
293
297
  label: "Continue"
294
298
  }).annotate("wf.action.withData", "sso").annotate("ui.form.grid.colSpan", { desktop: "12" }).optional().$type);
295
- defineAnnotatedType("object", MfaCodeForm).annotate("meta.label", "Verify your identity").annotate("wf.context.pass", "public", true).annotate("ui.form.submit.text", "Verify").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", {
299
+ defineAnnotatedType("object", MfaCodeForm).annotate("meta.label", "Verify your identity").annotate("wf.context.pass", "public", true).annotate("ui.form.submit.text", "Verify").prop("transportHint", defineAnnotatedType().designType("phantom").tags("paragraph", "ui").annotate("ui.form.fn.value", "(_, _d, ctx, _e, t) => ctx.public?.mfa?.method === \"totp\" ? t(\"Enter the current 6-digit code from your authenticator app.\") : ctx.public?.pincode?.sentTo ? t(\"Code sent to {recipient}.\", { recipient: ctx.public.pincode.sentTo }) : t(\"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", {
296
300
  name: "maxlength",
297
301
  fn: "(_, _d, ctx) => ctx.public?.pincode?.codeLength"
298
302
  }, true).annotate("meta.required", {}).annotate("expect.minLength", { length: 4 }).annotate("expect.maxLength", { length: 12 }).annotate("expect.pattern", { pattern: "^[0-9]+$" }, true).$type).prop("useDifferentMethod", defineAnnotatedType().designType("phantom").tags("action", "ui").annotate("ui.form.action", {
@@ -320,11 +324,14 @@ defineAnnotatedType("object", SignupForm).annotate("meta.label", "Create your ac
320
324
  }).annotate("ui.form.attr", {
321
325
  name: "text",
322
326
  value: "Already have an account?"
327
+ }, true).annotate("ui.form.fn.attr", {
328
+ name: "text",
329
+ fn: "(_, _d, _c, _e, t) => t(\"Already have an account?\")"
323
330
  }, true).annotate("ui.form.attr", {
324
331
  name: "align",
325
332
  value: "center"
326
333
  }, true).annotate("ui.form.pushDown", true).optional().$type);
327
- defineAnnotatedType("object", SetPasswordForm).annotate("ui.form.fn.title", "(_, ctx) => ctx.public?.password?.heading || \"Set your password\"").annotate("wf.context.pass", "public", true).prop("consents", $f(WithInlineConsentForm, "consents")).prop("intro", defineAnnotatedType().designType("phantom").tags("paragraph", "ui").annotate("ui.form.order", 5).annotate("ui.form.fn.value", "(_, _d, ctx) => ctx.public?.password?.intro || \"\"").annotate("ui.form.fn.hidden", "(_, _d, ctx) => !ctx.public?.password?.intro").$type).prop("newPassword", defineAnnotatedType().designType("string").tags("string").annotate("ui.form.order", 10).annotate("ui.form.type", "password").annotate("meta.label", "New password").annotate("ui.form.autocomplete", "new-password").annotate("meta.sensitive", true).annotate("meta.required", {}).annotate("expect.minLength", { length: 8 }).$type).prop("confirmPassword", defineAnnotatedType().designType("string").tags("string").annotate("ui.form.order", 20).annotate("ui.form.type", "password").annotate("meta.label", "Confirm password").annotate("ui.form.autocomplete", "new-password").annotate("meta.sensitive", true).annotate("meta.required", {}).annotate("expect.minLength", { length: 8 }).annotate("ui.form.validate", "(v, data, ctx) => v === data.newPassword || ctx?.public?.messages?.PASSWORDS_DO_NOT_MATCH || \"Passwords must match\"", true).$type).prop("passwordRules", defineAnnotatedType().designType("phantom").tags("paragraph", "ui").annotate("ui.form.order", 25).annotate("meta.label", "Password requirements").annotate("ui.form.component", "AsPasswordRules").annotate("ui.form.fn.attr", {
334
+ defineAnnotatedType("object", SetPasswordForm).annotate("ui.form.fn.title", "(_, ctx, t) => ctx.public?.password?.heading || t(\"Set your password\")").annotate("wf.context.pass", "public", true).prop("consents", $f(WithInlineConsentForm, "consents")).prop("intro", defineAnnotatedType().designType("phantom").tags("paragraph", "ui").annotate("ui.form.order", 5).annotate("ui.form.fn.value", "(_, _d, ctx) => ctx.public?.password?.intro || \"\"").annotate("ui.form.fn.hidden", "(_, _d, ctx) => !ctx.public?.password?.intro").$type).prop("newPassword", defineAnnotatedType().designType("string").tags("string").annotate("ui.form.order", 10).annotate("ui.form.type", "password").annotate("meta.label", "New password").annotate("ui.form.autocomplete", "new-password").annotate("meta.sensitive", true).annotate("meta.required", {}).annotate("expect.minLength", { length: 8 }).$type).prop("confirmPassword", defineAnnotatedType().designType("string").tags("string").annotate("ui.form.order", 20).annotate("ui.form.type", "password").annotate("meta.label", "Confirm password").annotate("ui.form.autocomplete", "new-password").annotate("meta.sensitive", true).annotate("meta.required", {}).annotate("expect.minLength", { length: 8 }).annotate("ui.form.validate", "(v, data, ctx, _e, t) => v === data.newPassword || ctx?.public?.messages?.PASSWORDS_DO_NOT_MATCH || t(\"Passwords must match\")", true).$type).prop("passwordRules", defineAnnotatedType().designType("phantom").tags("paragraph", "ui").annotate("ui.form.order", 25).annotate("meta.label", "Password requirements").annotate("ui.form.component", "AsPasswordRules").annotate("ui.form.fn.attr", {
328
335
  name: "policies",
329
336
  fn: "(_, _d, ctx) => ctx.public?.password?.policies"
330
337
  }, true).annotate("ui.form.fn.attr", {
@@ -337,8 +344,8 @@ defineAnnotatedType("object", InviteForm).annotate("meta.label", "Send an invita
337
344
  message: "Invalid email format."
338
345
  }, 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);
339
346
  defineAnnotatedType("object", InviteChooseUsernameForm).annotate("meta.label", "Choose your username").annotate("meta.description", "You will use it to sign in.").annotate("ui.form.submit.text", "Continue").prop("username", defineAnnotatedType().designType("string").tags("string").annotate("ui.form.order", 10).annotate("ui.form.type", "text").annotate("meta.label", "Username").annotate("ui.form.autocomplete", "username").annotate("meta.required", {}).annotate("expect.minLength", { length: 1 }).annotate("expect.maxLength", { length: 256 }).$type);
340
- defineAnnotatedType("object", Select2faForm).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).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);
341
- defineAnnotatedType("object", PincodeForm).annotate("meta.label", "Enter the verification code").annotate("wf.context.pass", "public", true).annotate("ui.form.submit.text", "Verify").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", {
347
+ defineAnnotatedType("object", Select2faForm).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).prop("methodName", defineAnnotatedType().designType("string").tags("string").annotate("ui.form.order", 10).annotate("ui.form.type", "radio").annotate("ui.form.fn.options", "(_, _d, ctx, _e, t) => Array.isArray(ctx.public?.mfa?.enrolledMethods) ? ctx.public.mfa.enrolledMethods.map(m => { const method = m.kind === \"totp\" ? t(\"TOTP (Authenticator app)\") : m.kind === \"email\" ? t(\"Email\") : m.kind === \"sms\" ? t(\"SMS\") : m.kind; return { key: m.methodName, label: m.masked && (m.kind === \"email\" || m.kind === \"sms\") ? t(\"{method} ({recipient})\", { method, recipient: m.masked }) : method }; }) : []").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);
348
+ defineAnnotatedType("object", PincodeForm).annotate("meta.label", "Enter the verification code").annotate("wf.context.pass", "public", true).annotate("ui.form.submit.text", "Verify").prop("transportHint", defineAnnotatedType().designType("phantom").tags("paragraph", "ui").annotate("ui.form.fn.value", "(_, _d, ctx, _e, t) => ctx.public?.mfa?.method === \"totp\" ? t(\"Enter the current 6-digit code from your authenticator app.\") : ctx.public?.pincode?.sentTo ? t(\"Code sent to {recipient}.\", { recipient: ctx.public.pincode.sentTo }) : t(\"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", {
342
349
  name: "maxlength",
343
350
  fn: "(_, _d, ctx) => ctx.public?.pincode?.codeLength"
344
351
  }, true).annotate("meta.required", {}).annotate("expect.minLength", { length: 4 }).annotate("expect.maxLength", { length: 12 }).annotate("expect.pattern", { pattern: "^[0-9]+$" }, true).$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).prop("resend", defineAnnotatedType().designType("phantom").tags("action", "ui").annotate("ui.form.action", {
@@ -360,14 +367,14 @@ defineAnnotatedType("object", AskEmailForm).annotate("meta.label", "Add your ema
360
367
  message: "Invalid email format."
361
368
  }, true).$type);
362
369
  defineAnnotatedType("object", AskPhoneForm).annotate("meta.label", "Add your phone number").annotate("meta.description", "We need a verified phone to send security notifications and verification codes. Include your country code (for example +1 555 555 0100).").annotate("wf.context.pass", "public", true).prop("consents", $f(WithInlineConsentForm, "consents")).prop("disclosure", defineAnnotatedType().designType("phantom").tags("paragraph", "ui").annotate("ui.form.order", 5).annotate("ui.form.fn.value", "(_, _d, ctx) => ctx.public?.channel?.otpDisclosure || \"\"").annotate("ui.form.fn.hidden", "(_, _d, ctx) => !ctx.public?.channel?.otpDisclosure").$type).prop("phone", defineAnnotatedType().designType("string").tags("string").annotate("ui.form.order", 10).annotate("ui.form.type", "text").annotate("meta.label", "Phone number").annotate("ui.form.autocomplete", "tel").annotate("meta.required", {}).$type);
363
- defineAnnotatedType("object", EnrollPickMethodForm).annotate("meta.label", "Set up two-factor authentication").annotate("meta.description", "Pick a method to receive your verification codes.").annotate("wf.context.pass", "public", true).annotate("ui.form.submit.text", "Continue").prop("method", 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?.mfaEnroll?.availableTransports) ? ctx.public.mfaEnroll.availableTransports.map(t => ({ key: t, label: t === \"totp\" ? \"Authenticator app (TOTP)\" : t === \"sms\" ? \"SMS\" : t === \"email\" ? \"Email\" : t })) : []").annotate("meta.label", "Choose a verification method").annotate("meta.required", {}).$type).prop("skip", defineAnnotatedType().designType("phantom").tags("action", "ui").annotate("ui.form.action", {
370
+ defineAnnotatedType("object", EnrollPickMethodForm).annotate("meta.label", "Set up two-factor authentication").annotate("meta.description", "Pick a method to receive your verification codes.").annotate("wf.context.pass", "public", true).annotate("ui.form.submit.text", "Continue").prop("method", defineAnnotatedType().designType("string").tags("string").annotate("ui.form.order", 10).annotate("ui.form.type", "radio").annotate("ui.form.fn.options", "(_, _d, ctx, _e, t) => Array.isArray(ctx.public?.mfaEnroll?.availableTransports) ? ctx.public.mfaEnroll.availableTransports.map(k => ({ key: k, label: k === \"totp\" ? t(\"Authenticator app (TOTP)\") : k === \"sms\" ? t(\"SMS\") : k === \"email\" ? t(\"Email\") : k })) : []").annotate("meta.label", "Choose a verification method").annotate("meta.required", {}).$type).prop("skip", defineAnnotatedType().designType("phantom").tags("action", "ui").annotate("ui.form.action", {
364
371
  id: "skip",
365
372
  label: "Skip for now"
366
373
  }).annotate("ui.form.fn.hidden", "(_, _d, ctx) => ctx.public?.mfaEnroll?.mode !== \"optional\"").optional().$type).prop("cancel", defineAnnotatedType().designType("phantom").tags("action", "ui").annotate("ui.form.action", {
367
374
  id: "cancel",
368
375
  label: "Cancel"
369
376
  }).annotate("ui.form.fn.hidden", "() => true").optional().$type);
370
- defineAnnotatedType("object", EnrollAddressForm).annotate("ui.form.fn.title", "(_, ctx) => ctx.public?.mfaEnroll?.method === \"sms\" ? \"Add your phone number\" : \"Add your email\"").annotate("meta.description", "We will send you a one-time code to confirm.").annotate("wf.context.pass", "public", true).annotate("ui.form.submit.text", "Send code").prop("address", defineAnnotatedType().designType("string").tags("string").annotate("ui.form.order", 10).annotate("ui.form.type", "text").annotate("meta.label", "Address").annotate("ui.form.fn.label", "(_, _d, ctx) => ctx.public?.mfaEnroll?.method === \"sms\" ? \"Phone number\" : ctx.public?.mfaEnroll?.method === \"email\" ? \"Email address\" : \"Address\"").annotate("meta.required", {}).annotate("ui.form.validate", "(v, _d, ctx) => ctx.public?.mfaEnroll?.method !== \"email\" || /^[^@\\s]+@[^@\\s]+\\.[^@\\s]+$/.test(v) || \"Enter a valid email address\"", true).$type).prop("skip", defineAnnotatedType().designType("phantom").tags("action", "ui").annotate("ui.form.action", {
377
+ defineAnnotatedType("object", EnrollAddressForm).annotate("ui.form.fn.title", "(_, ctx, t) => ctx.public?.mfaEnroll?.method === \"sms\" ? t(\"Add your phone number\") : t(\"Add your email\")").annotate("meta.description", "We will send you a one-time code to confirm.").annotate("wf.context.pass", "public", true).annotate("ui.form.submit.text", "Send code").prop("address", defineAnnotatedType().designType("string").tags("string").annotate("ui.form.order", 10).annotate("ui.form.type", "text").annotate("meta.label", "Address").annotate("ui.form.fn.label", "(_, _d, ctx, _e, t) => ctx.public?.mfaEnroll?.method === \"sms\" ? t(\"Phone number\") : ctx.public?.mfaEnroll?.method === \"email\" ? t(\"Email address\") : t(\"Address\")").annotate("meta.required", {}).annotate("ui.form.validate", "(v, _d, ctx, _e, t) => ctx.public?.mfaEnroll?.method !== \"email\" || /^[^@\\s]+@[^@\\s]+\\.[^@\\s]+$/.test(v) || t(\"Enter a valid email address\")", true).$type).prop("skip", defineAnnotatedType().designType("phantom").tags("action", "ui").annotate("ui.form.action", {
371
378
  id: "skip",
372
379
  label: "Skip for now"
373
380
  }).annotate("ui.form.fn.hidden", "(_, _d, ctx) => ctx.public?.mfaEnroll?.mode !== \"optional\"").optional().$type).prop("cancel", defineAnnotatedType().designType("phantom").tags("action", "ui").annotate("ui.form.action", {
@@ -377,7 +384,7 @@ defineAnnotatedType("object", EnrollAddressForm).annotate("ui.form.fn.title", "(
377
384
  id: "useDifferentMethod",
378
385
  label: "Use a different method"
379
386
  }).annotate("ui.form.fn.hidden", "(_, _d, ctx) => (ctx.public?.mfaEnroll?.availableTransports?.length ?? 0) < 2 || ctx.public?.mfaEnroll?.mode === \"manage\"").optional().$type);
380
- defineAnnotatedType("object", EnrollConfirmForm).annotate("meta.label", "Confirm your verification code").annotate("wf.context.pass", "public", true).annotate("ui.form.submit.text", "Confirm").prop("transportHint", defineAnnotatedType().designType("phantom").tags("paragraph", "ui").annotate("ui.form.order", 1).annotate("ui.form.fn.value", "(_, _d, ctx) => ctx.public?.mfaEnroll?.method === \"totp\" ? \"Enter the 6-digit code from your authenticator app.\" : ctx.public?.pincode?.sentTo ? \"Code sent to \" + ctx.public.pincode.sentTo + \". Enter it below to confirm.\" : \"Enter the code to confirm enrollment.\"").optional().$type).prop("code", defineAnnotatedType().designType("string").tags("string").annotate("ui.form.order", 10).annotate("ui.form.type", "text").annotate("meta.label", "Code").annotate("ui.form.autocomplete", "one-time-code").annotate("meta.required", {}).annotate("expect.minLength", { length: 4 }).annotate("expect.maxLength", { length: 12 }).annotate("expect.pattern", { pattern: "^[0-9]+$" }, true).$type).prop("resend", defineAnnotatedType().designType("phantom").tags("action", "ui").annotate("ui.form.action", {
387
+ defineAnnotatedType("object", EnrollConfirmForm).annotate("meta.label", "Confirm your verification code").annotate("wf.context.pass", "public", true).annotate("ui.form.submit.text", "Confirm").prop("transportHint", defineAnnotatedType().designType("phantom").tags("paragraph", "ui").annotate("ui.form.order", 1).annotate("ui.form.fn.value", "(_, _d, ctx, _e, t) => ctx.public?.mfaEnroll?.method === \"totp\" ? t(\"Enter the 6-digit code from your authenticator app.\") : ctx.public?.pincode?.sentTo ? t(\"Code sent to {recipient}. Enter it below to confirm.\", { recipient: ctx.public.pincode.sentTo }) : t(\"Enter the code to confirm enrollment.\")").optional().$type).prop("code", defineAnnotatedType().designType("string").tags("string").annotate("ui.form.order", 10).annotate("ui.form.type", "text").annotate("meta.label", "Code").annotate("ui.form.autocomplete", "one-time-code").annotate("meta.required", {}).annotate("expect.minLength", { length: 4 }).annotate("expect.maxLength", { length: 12 }).annotate("expect.pattern", { pattern: "^[0-9]+$" }, true).$type).prop("resend", defineAnnotatedType().designType("phantom").tags("action", "ui").annotate("ui.form.action", {
381
388
  id: "resend",
382
389
  label: "Resend code"
383
390
  }).annotate("ui.form.fn.attr", {
@@ -406,11 +413,11 @@ defineAnnotatedType("object", EnrollTotpQrForm).annotate("meta.label", "Scan thi
406
413
  id: "skip",
407
414
  label: "Skip for now"
408
415
  }).annotate("ui.form.fn.hidden", "(_, _d, ctx) => ctx.public?.mfaEnroll?.mode !== \"optional\"").optional().$type);
409
- defineAnnotatedType("object", ManageMfaForm).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").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", {
416
+ defineAnnotatedType("object", ManageMfaForm).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").prop("lockedNote", defineAnnotatedType().designType("phantom").tags("paragraph", "ui").annotate("ui.form.order", 5).annotate("ui.form.fn.value", "(_, _d, ctx, _e, t) => (ctx.public?.manage?.locked?.length ?? 0) > 0 ? t(\"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, _e, t) => ctx.public?.manage?.removeBlocked ? t(\"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, _e, t) => { const lbl = (k) => k === \"totp\" ? t(\"authenticator app\") : k === \"sms\" ? t(\"SMS\") : k === \"email\" ? t(\"email\") : k; const locked = ctx.public?.manage?.locked ?? []; const out = []; for (const k of (ctx.public?.manage?.candidates ?? [])) out.push({ key: \"add:\" + k, label: t(\"Add {method}\", { method: lbl(k) }) }); for (const m of (ctx.public?.mfa?.enrolledMethods ?? [])) { if (locked.includes(m.kind)) continue; const method = lbl(m.kind); out.push({ key: \"replace:\" + m.kind, label: m.masked ? t(\"Change {method} ({recipient})\", { method, recipient: m.masked }) : t(\"Change {method}\", { method }) }); if (!ctx.public?.manage?.removeBlocked) out.push({ key: \"remove:\" + m.kind, label: t(\"Remove {method}\", { method }) }); } 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", {
410
417
  id: "cancel",
411
418
  label: "Cancel"
412
419
  }).annotate("ui.form.fn.hidden", "() => true").optional().$type);
413
- defineAnnotatedType("object", RemoveMfaConfirmForm).annotate("meta.label", "Remove this method?").annotate("wf.context.pass", "public", true).annotate("ui.form.submit.text", "Remove").prop("notice", defineAnnotatedType().designType("phantom").tags("paragraph", "ui").annotate("ui.form.order", 1).annotate("ui.form.fn.value", "(_, _d, ctx) => { const t = ctx.public?.mfaEnroll?.method; const lbl = t === \"totp\" ? \"your authenticator app\" : t === \"sms\" ? \"SMS codes\" : t === \"email\" ? \"email codes\" : \"this method\"; return \"Remove \" + lbl + \" as a two-factor method? You can set it up again later.\"; }").$type).prop("cancel", defineAnnotatedType().designType("phantom").tags("action", "ui").annotate("ui.form.action", {
420
+ defineAnnotatedType("object", RemoveMfaConfirmForm).annotate("meta.label", "Remove this method?").annotate("wf.context.pass", "public", true).annotate("ui.form.submit.text", "Remove").prop("notice", defineAnnotatedType().designType("phantom").tags("paragraph", "ui").annotate("ui.form.order", 1).annotate("ui.form.fn.value", "(_, _d, ctx, _e, t) => { const k = ctx.public?.mfaEnroll?.method; return k === \"totp\" ? t(\"Remove your authenticator app as a two-factor method? You can set it up again later.\") : k === \"sms\" ? t(\"Remove SMS codes as a two-factor method? You can set it up again later.\") : k === \"email\" ? t(\"Remove email codes as a two-factor method? You can set it up again later.\") : t(\"Remove this method as a two-factor method? You can set it up again later.\"); }").$type).prop("cancel", defineAnnotatedType().designType("phantom").tags("action", "ui").annotate("ui.form.action", {
414
421
  id: "cancel",
415
422
  label: "Cancel"
416
423
  }).annotate("ui.form.fn.hidden", "() => true").optional().$type);
@@ -418,7 +425,7 @@ defineAnnotatedType("object", PasswordReauthForm).annotate("meta.label", "Confir
418
425
  id: "cancel",
419
426
  label: "Cancel"
420
427
  }).annotate("ui.form.fn.hidden", "() => true").optional().$type);
421
- defineAnnotatedType("object", StepUpConfirmForm).annotate("meta.label", "Verify your identity").annotate("wf.context.pass", "public", true).annotate("ui.form.submit.text", "Continue").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", {
428
+ defineAnnotatedType("object", StepUpConfirmForm).annotate("meta.label", "Verify your identity").annotate("wf.context.pass", "public", true).annotate("ui.form.submit.text", "Continue").prop("notice", defineAnnotatedType().designType("phantom").tags("paragraph", "ui").annotate("ui.form.order", 1).annotate("ui.form.fn.value", "(_, _d, ctx, _e, t) => { const kind = ctx.public?.mfa?.method; const m = (ctx.public?.mfa?.enrolledMethods ?? []).find(e => e.kind === kind); return m && m.masked ? t(\"To continue, we will send a verification code to {recipient}.\", { recipient: m.masked }) : kind === \"sms\" ? t(\"To continue, we will send a verification code to your phone.\") : t(\"To continue, we will send a verification code to your email.\"); }").$type).prop("useDifferentMethod", defineAnnotatedType().designType("phantom").tags("action", "ui").annotate("ui.form.action", {
422
429
  id: "useDifferentMethod",
423
430
  label: "Use a different method"
424
431
  }).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", {
@@ -428,6 +435,7 @@ defineAnnotatedType("object", StepUpConfirmForm).annotate("meta.label", "Verify
428
435
  defineAnnotatedType("object", TermsBumpForm).annotate("meta.label", "Updated terms and policies").annotate("meta.description", "Please review and accept the updated terms to continue.").annotate("wf.context.pass", "public", true).prop("consents", $f(WithInlineConsentForm, "consents"));
429
436
  defineAnnotatedType("object", ConcurrencyLimitForm).annotate("meta.label", "Session limit reached").annotate("meta.description", "You are already signed in elsewhere. Other sessions will be logged out if you proceed to log in.").annotate("ui.form.submit.text", "Login");
430
437
  defineAnnotatedType("object", MagicLinkRequestForm).annotate("meta.label", "Sign in with a magic link").annotate("meta.description", "Enter your account email or username and we will send you a one-time sign-in link.").prop("identifier", defineAnnotatedType().designType("string").tags("string").annotate("ui.form.order", 10).annotate("ui.form.type", "text").annotate("meta.label", "Email or username").annotate("ui.form.autocomplete", "username").annotate("meta.required", {}).$type);
438
+ defineAnnotatedType("object", MagicLinkConfirmForm).annotate("meta.label", "Continue with your link").annotate("wf.context.pass", "public", true).annotate("ui.form.submit.text", "Continue").prop("notice", defineAnnotatedType().designType("phantom").tags("paragraph", "ui").annotate("ui.form.order", 1).annotate("ui.form.fn.value", "(_, _d, ctx, _e, t) => ctx.public?.magicLink?.account ? t(\"Continue as {account}.\", { account: ctx.public.magicLink.account }) : t(\"Continue with the link from your email.\")").$type);
431
439
  defineAnnotatedType("object", RecoveryModeSelectForm).annotate("meta.label", "Choose how to verify").annotate("meta.description", "Pick how you would like to recover access.").prop("mode", defineAnnotatedType().designType("string").tags("string").annotate("ui.form.order", 10).annotate("ui.form.type", "radio").annotate("ui.form.options", {
432
440
  label: "Magic link",
433
441
  value: "magicLink"
@@ -435,22 +443,21 @@ defineAnnotatedType("object", RecoveryModeSelectForm).annotate("meta.label", "Ch
435
443
  label: "One-time code",
436
444
  value: "otp"
437
445
  }, true).annotate("meta.label", "Recovery method").annotate("meta.required", {}).$type);
438
- defineAnnotatedType("object", RecoveryFactorForm).annotate("meta.label", "Verify your identity").annotate("meta.description", "Confirm a detail we have on file before resetting your password.").annotate("wf.context.pass", "public", true).prop("factor", 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?.preReset?.availableRecoveryFactors) ? ctx.public.preReset.availableRecoveryFactors : []").annotate("meta.label", "Factor").annotate("meta.required", {}).$type).prop("value", defineAnnotatedType().designType("string").tags("string").annotate("ui.form.order", 20).annotate("ui.form.type", "text").annotate("meta.label", "Value").annotate("meta.required", {}).annotate("expect.minLength", { length: 4 }).annotate("expect.maxLength", { length: 12 }).$type);
439
- defineAnnotatedType("object", ChangePasswordForm).annotate("ui.form.fn.title", "(_, ctx) => ctx.public?.password?.heading || \"Change your password\"").annotate("ui.form.submit.text", "Change password").annotate("wf.context.pass", "public", true).prop("intro", defineAnnotatedType().designType("phantom").tags("paragraph", "ui").annotate("ui.form.order", 5).annotate("ui.form.fn.value", "(_, _d, ctx) => ctx.public?.password?.intro || \"\"").annotate("ui.form.fn.hidden", "(_, _d, ctx) => !ctx.public?.password?.intro").annotate("ui.form.grid.colSpan", { desktop: "12" }).$type).prop("currentPassword", defineAnnotatedType().designType("string").tags("string").annotate("ui.form.order", 8).annotate("ui.form.type", "password").annotate("meta.label", "Current password").annotate("ui.form.autocomplete", "current-password").annotate("meta.sensitive", true).annotate("meta.required", {}).$type).prop("newPassword", defineAnnotatedType().designType("string").tags("string").annotate("ui.form.order", 10).annotate("ui.form.type", "password").annotate("meta.label", "New password").annotate("ui.form.autocomplete", "new-password").annotate("meta.sensitive", true).annotate("meta.required", {}).annotate("expect.minLength", { length: 8 }).$type).prop("confirmPassword", defineAnnotatedType().designType("string").tags("string").annotate("ui.form.order", 20).annotate("ui.form.type", "password").annotate("meta.label", "Confirm new password").annotate("ui.form.autocomplete", "new-password").annotate("meta.sensitive", true).annotate("meta.required", {}).annotate("expect.minLength", { length: 8 }).annotate("ui.form.validate", "(v, data, ctx) => v === data.newPassword || ctx?.public?.messages?.PASSWORDS_DO_NOT_MATCH || \"Passwords must match\"", true).$type).prop("passwordRules", defineAnnotatedType().designType("phantom").tags("paragraph", "ui").annotate("ui.form.order", 25).annotate("meta.label", "Password requirements").annotate("ui.form.component", "AsPasswordRules").annotate("ui.form.fn.attr", {
446
+ defineAnnotatedType("object", ChangePasswordForm).annotate("ui.form.fn.title", "(_, ctx, t) => ctx.public?.password?.heading || t(\"Change your password\")").annotate("ui.form.submit.text", "Change password").annotate("wf.context.pass", "public", true).prop("intro", defineAnnotatedType().designType("phantom").tags("paragraph", "ui").annotate("ui.form.order", 5).annotate("ui.form.fn.value", "(_, _d, ctx) => ctx.public?.password?.intro || \"\"").annotate("ui.form.fn.hidden", "(_, _d, ctx) => !ctx.public?.password?.intro").annotate("ui.form.grid.colSpan", { desktop: "12" }).$type).prop("currentPassword", defineAnnotatedType().designType("string").tags("string").annotate("ui.form.order", 8).annotate("ui.form.type", "password").annotate("meta.label", "Current password").annotate("ui.form.autocomplete", "current-password").annotate("meta.sensitive", true).annotate("meta.required", {}).$type).prop("newPassword", defineAnnotatedType().designType("string").tags("string").annotate("ui.form.order", 10).annotate("ui.form.type", "password").annotate("meta.label", "New password").annotate("ui.form.autocomplete", "new-password").annotate("meta.sensitive", true).annotate("meta.required", {}).annotate("expect.minLength", { length: 8 }).$type).prop("confirmPassword", defineAnnotatedType().designType("string").tags("string").annotate("ui.form.order", 20).annotate("ui.form.type", "password").annotate("meta.label", "Confirm new password").annotate("ui.form.autocomplete", "new-password").annotate("meta.sensitive", true).annotate("meta.required", {}).annotate("expect.minLength", { length: 8 }).annotate("ui.form.validate", "(v, data, ctx, _e, t) => v === data.newPassword || ctx?.public?.messages?.PASSWORDS_DO_NOT_MATCH || t(\"Passwords must match\")", true).$type).prop("passwordRules", defineAnnotatedType().designType("phantom").tags("paragraph", "ui").annotate("ui.form.order", 25).annotate("meta.label", "Password requirements").annotate("ui.form.component", "AsPasswordRules").annotate("ui.form.fn.attr", {
440
447
  name: "policies",
441
448
  fn: "(_, _d, ctx) => ctx.public?.password?.policies"
442
449
  }, true).annotate("ui.form.fn.attr", {
443
450
  name: "password",
444
451
  fn: "(_, data) => data.newPassword"
445
452
  }, true).annotate("ui.form.grid.colSpan", { desktop: "12" }).$type);
446
- defineAnnotatedType("object", ProveControlForm).annotate("meta.label", "Confirm your identity").annotate("wf.context.pass", "public", true).annotate("ui.form.submit.text", "Verify and link").prop("intro", defineAnnotatedType().designType("phantom").tags("paragraph", "ui").annotate("ui.form.order", 5).annotate("ui.form.fn.value", "(_, _d, ctx) => ctx.public?.proveControl?.hint ? \"An account for \" + ctx.public.proveControl.hint + \" already exists. Enter its password to link this sign-in method.\" : \"Enter your existing account password to link this sign-in method.\"").$type).prop("password", defineAnnotatedType().designType("string").tags("string").annotate("ui.form.order", 10).annotate("ui.form.type", "password").annotate("meta.label", "Password").annotate("ui.form.autocomplete", "current-password").annotate("meta.sensitive", true).annotate("meta.required", {}).annotate("expect.minLength", { length: 1 }).$type).prop("cancel", defineAnnotatedType().designType("phantom").tags("action", "ui").annotate("ui.form.order", 20).annotate("ui.form.action", {
453
+ defineAnnotatedType("object", ProveControlForm).annotate("meta.label", "Confirm your identity").annotate("wf.context.pass", "public", true).annotate("ui.form.submit.text", "Verify and link").prop("intro", defineAnnotatedType().designType("phantom").tags("paragraph", "ui").annotate("ui.form.order", 5).annotate("ui.form.fn.value", "(_, _d, ctx, _e, t) => ctx.public?.proveControl?.hint ? t(\"An account for {account} already exists. Enter its password to link this sign-in method.\", { account: ctx.public.proveControl.hint }) : t(\"Enter your existing account password to link this sign-in method.\")").$type).prop("password", defineAnnotatedType().designType("string").tags("string").annotate("ui.form.order", 10).annotate("ui.form.type", "password").annotate("meta.label", "Password").annotate("ui.form.autocomplete", "current-password").annotate("meta.sensitive", true).annotate("meta.required", {}).annotate("expect.minLength", { length: 1 }).$type).prop("cancel", defineAnnotatedType().designType("phantom").tags("action", "ui").annotate("ui.form.order", 20).annotate("ui.form.action", {
447
454
  id: "cancel",
448
455
  label: "Cancel"
449
456
  }).annotate("ui.form.attr", {
450
457
  name: "align",
451
458
  value: "center"
452
459
  }, true).annotate("ui.form.pushDown", true).optional().$type);
453
- defineAnnotatedType("object", ProveControlOtpForm).annotate("meta.label", "Confirm your identity").annotate("wf.context.pass", "public", true).annotate("ui.form.submit.text", "Verify and link").prop("intro", defineAnnotatedType().designType("phantom").tags("paragraph", "ui").annotate("ui.form.order", 5).annotate("ui.form.fn.value", "(_, _d, ctx) => ctx.public?.proveControl?.sentTo ? \"We sent a verification code to \" + ctx.public.proveControl.sentTo + \". Enter it to link this sign-in method to your existing account.\" : \"Enter the verification code to link this sign-in method to your existing account.\"").$type).prop("code", defineAnnotatedType().designType("string").tags("string").annotate("ui.form.order", 10).annotate("ui.form.type", "text").annotate("meta.label", "Verification code").annotate("ui.form.autocomplete", "one-time-code").annotate("meta.required", {}).annotate("expect.minLength", { length: 4 }).annotate("expect.maxLength", { length: 12 }).annotate("expect.pattern", { pattern: "^[0-9]+$" }, true).$type).prop("resend", defineAnnotatedType().designType("phantom").tags("action", "ui").annotate("ui.form.order", 15).annotate("ui.form.action", {
460
+ defineAnnotatedType("object", ProveControlOtpForm).annotate("meta.label", "Confirm your identity").annotate("wf.context.pass", "public", true).annotate("ui.form.submit.text", "Verify and link").prop("intro", defineAnnotatedType().designType("phantom").tags("paragraph", "ui").annotate("ui.form.order", 5).annotate("ui.form.fn.value", "(_, _d, ctx, _e, t) => ctx.public?.proveControl?.sentTo ? t(\"We sent a verification code to {recipient}. Enter it to link this sign-in method to your existing account.\", { recipient: ctx.public.proveControl.sentTo }) : t(\"Enter the verification code to link this sign-in method to your existing account.\")").$type).prop("code", defineAnnotatedType().designType("string").tags("string").annotate("ui.form.order", 10).annotate("ui.form.type", "text").annotate("meta.label", "Verification code").annotate("ui.form.autocomplete", "one-time-code").annotate("meta.required", {}).annotate("expect.minLength", { length: 4 }).annotate("expect.maxLength", { length: 12 }).annotate("expect.pattern", { pattern: "^[0-9]+$" }, true).$type).prop("resend", defineAnnotatedType().designType("phantom").tags("action", "ui").annotate("ui.form.order", 15).annotate("ui.form.action", {
454
461
  id: "resend",
455
462
  label: "Resend code"
456
463
  }).annotate("ui.form.fn.attr", {
@@ -463,11 +470,11 @@ defineAnnotatedType("object", ProveControlOtpForm).annotate("meta.label", "Confi
463
470
  name: "align",
464
471
  value: "center"
465
472
  }, true).annotate("ui.form.pushDown", true).optional().$type);
466
- defineAnnotatedType("object", AuthorizeConsentForm).annotate("meta.label", "Authorize access").annotate("wf.context.pass", "public", true).annotate("ui.form.submit.text", "Authorize").prop("notice", defineAnnotatedType().designType("phantom").tags("paragraph", "ui").annotate("ui.form.order", 1).annotate("ui.form.fn.value", "(_, _d, ctx) => { const a = ctx.public?.authz; const host = a?.clientName && a?.redirectHost ? \" (\" + a.redirectHost + \")\" : \"\"; const who = a?.clientName ? \"“\" + a.clientName + \"”\" + host : \"A local application\"; const sc = a?.scope ? \" It is requesting access to: \" + a.scope + \".\" : \"\"; return who + \" wants to sign in to your account.\" + sc + \" Authorize this only if you started it.\"; }").$type).prop("signedIn", defineAnnotatedType().designType("phantom").tags("paragraph", "ui").annotate("ui.form.order", 2).annotate("ui.form.fn.hidden", "(_, _d, ctx) => !ctx.public?.authz?.signedInAs").annotate("ui.form.fn.value", "(_, _d, ctx) => \"Signed in as \" + (ctx.public?.authz?.signedInAs || \"\") + \".\"").$type).prop("deny", defineAnnotatedType().designType("phantom").tags("action", "ui").annotate("ui.form.order", 10).annotate("ui.form.action", {
473
+ defineAnnotatedType("object", AuthorizeConsentForm).annotate("meta.label", "Authorize access").annotate("wf.context.pass", "public", true).annotate("ui.form.submit.text", "Authorize").prop("notice", defineAnnotatedType().designType("phantom").tags("paragraph", "ui").annotate("ui.form.order", 1).annotate("ui.form.fn.value", "(_, _d, ctx, _e, t) => { const a = ctx.public?.authz; const who = a?.clientName && a?.redirectHost ? t(\"“{client}” ({host}) wants to sign in to your account.\", { client: a.clientName, host: a.redirectHost }) : a?.clientName ? t(\"“{client}” wants to sign in to your account.\", { client: a.clientName }) : t(\"A local application wants to sign in to your account.\"); const sc = a?.scope ? \" \" + t(\"It is requesting access to: {scope}.\", { scope: a.scope }) : \"\"; return who + sc + \" \" + t(\"Authorize this only if you started it.\"); }").$type).prop("signedIn", defineAnnotatedType().designType("phantom").tags("paragraph", "ui").annotate("ui.form.order", 2).annotate("ui.form.fn.hidden", "(_, _d, ctx) => !ctx.public?.authz?.signedInAs").annotate("ui.form.fn.value", "(_, _d, ctx, _e, t) => t(\"Signed in as {account}.\", { account: ctx.public?.authz?.signedInAs || \"\" })").$type).prop("deny", defineAnnotatedType().designType("phantom").tags("action", "ui").annotate("ui.form.order", 10).annotate("ui.form.action", {
467
474
  id: "deny",
468
475
  label: "Deny"
469
476
  }).annotate("ui.form.attr", {
470
477
  name: "align",
471
478
  value: "center"
472
479
  }, true).annotate("ui.form.pushDown", true).optional().$type);
473
- export { RemoveMfaConfirmForm as C, StepUpConfirmForm as D, SignupForm as E, TermsBumpForm as O, RecoveryModeSelectForm as S, SetPasswordForm as T, PasswordReauthForm as _, ConcurrencyLimitForm as a, ProveControlOtpForm as b, EnrollConfirmForm as c, InviteChooseUsernameForm as d, InviteForm as f, MfaCodeForm as g, ManageMfaForm as h, ChangePasswordForm as i, WithInlineConsentForm as k, EnrollPickMethodForm as l, MagicLinkRequestForm as m, AskPhoneForm as n, EmailIdentifierForm as o, LoginCredentialsForm as p, AuthorizeConsentForm as r, EnrollAddressForm as s, AskEmailForm as t, EnrollTotpQrForm as u, PincodeForm as v, Select2faForm as w, RecoveryFactorForm as x, ProveControlForm as y };
480
+ export { RemoveMfaConfirmForm as C, StepUpConfirmForm as D, SignupForm as E, TermsBumpForm as O, RecoveryModeSelectForm as S, SetPasswordForm as T, MfaCodeForm as _, ConcurrencyLimitForm as a, ProveControlForm as b, EnrollConfirmForm as c, InviteChooseUsernameForm as d, InviteForm as f, ManageMfaForm as g, MagicLinkRequestForm as h, ChangePasswordForm as i, WithInlineConsentForm as k, EnrollPickMethodForm as l, MagicLinkConfirmForm as m, AskPhoneForm as n, EmailIdentifierForm as o, LoginCredentialsForm as p, AuthorizeConsentForm as r, EnrollAddressForm as s, AskEmailForm as t, EnrollTotpQrForm as u, PasswordReauthForm as v, Select2faForm as w, ProveControlOtpForm as x, PincodeForm as y };