@aooth/auth-moost 0.2.4 → 0.2.5
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 +27 -27
- package/dist/atscript/index.mjs +1 -1
- package/dist/{forms-C_VNxSDn.mjs → forms-D-MZTAyd.mjs} +23 -16
- package/dist/index.d.mts +150 -28
- package/dist/index.mjs +360 -173
- package/package.json +24 -24
- package/src/atscript/models/forms.as +29 -24
- package/src/atscript/models/forms.as.d.ts +27 -27
|
@@ -35,7 +35,7 @@ export declare class LoginCredentialsForm {
|
|
|
35
35
|
}
|
|
36
36
|
/**
|
|
37
37
|
* Atscript interface **MfaCodeForm**
|
|
38
|
-
* @see {@link ./forms.as:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
374
|
+
* @see {@link ./forms.as:849:18}
|
|
375
375
|
*/
|
|
376
376
|
export declare class MagicLinkRequestForm {
|
|
377
377
|
identifier: string;
|
|
@@ -386,7 +386,7 @@ export declare class MagicLinkRequestForm {
|
|
|
386
386
|
}
|
|
387
387
|
/**
|
|
388
388
|
* Atscript interface **RecoveryModeSelectForm**
|
|
389
|
-
* @see {@link ./forms.as:
|
|
389
|
+
* @see {@link ./forms.as:864:18}
|
|
390
390
|
*/
|
|
391
391
|
export declare class RecoveryModeSelectForm {
|
|
392
392
|
mode: string;
|
|
@@ -401,7 +401,7 @@ export declare class RecoveryModeSelectForm {
|
|
|
401
401
|
}
|
|
402
402
|
/**
|
|
403
403
|
* Atscript interface **RecoveryFactorForm**
|
|
404
|
-
* @see {@link ./forms.as:
|
|
404
|
+
* @see {@link ./forms.as:889:18}
|
|
405
405
|
*/
|
|
406
406
|
export declare class RecoveryFactorForm {
|
|
407
407
|
factor: string;
|
|
@@ -417,7 +417,7 @@ export declare class RecoveryFactorForm {
|
|
|
417
417
|
}
|
|
418
418
|
/**
|
|
419
419
|
* Atscript interface **ChangePasswordForm**
|
|
420
|
-
* @see {@link ./forms.as:
|
|
420
|
+
* @see {@link ./forms.as:923:18}
|
|
421
421
|
*/
|
|
422
422
|
export declare class ChangePasswordForm {
|
|
423
423
|
// intro: ui.paragraph
|
|
@@ -436,7 +436,7 @@ export declare class ChangePasswordForm {
|
|
|
436
436
|
}
|
|
437
437
|
/**
|
|
438
438
|
* Atscript interface **ProveControlForm**
|
|
439
|
-
* @see {@link ./forms.as:
|
|
439
|
+
* @see {@link ./forms.as:988:18}
|
|
440
440
|
*/
|
|
441
441
|
export declare class ProveControlForm {
|
|
442
442
|
// intro: ui.paragraph
|
|
@@ -453,7 +453,7 @@ export declare class ProveControlForm {
|
|
|
453
453
|
}
|
|
454
454
|
/**
|
|
455
455
|
* Atscript interface **ProveControlOtpForm**
|
|
456
|
-
* @see {@link ./forms.as:
|
|
456
|
+
* @see {@link ./forms.as:1023:18}
|
|
457
457
|
*/
|
|
458
458
|
export declare class ProveControlOtpForm {
|
|
459
459
|
// intro: ui.paragraph
|
|
@@ -471,7 +471,7 @@ export declare class ProveControlOtpForm {
|
|
|
471
471
|
}
|
|
472
472
|
/**
|
|
473
473
|
* Atscript interface **AuthorizeConsentForm**
|
|
474
|
-
* @see {@link ./forms.as:
|
|
474
|
+
* @see {@link ./forms.as:1075:18}
|
|
475
475
|
*/
|
|
476
476
|
export declare class AuthorizeConsentForm {
|
|
477
477
|
// notice: ui.paragraph
|
package/dist/atscript/index.mjs
CHANGED
|
@@ -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-
|
|
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-D-MZTAyd.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;
|
|
@@ -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 \"
|
|
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
|
|
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 =>
|
|
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
|
|
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(
|
|
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
|
|
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 = (
|
|
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
|
|
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);
|
|
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", {
|
|
@@ -436,21 +443,21 @@ defineAnnotatedType("object", RecoveryModeSelectForm).annotate("meta.label", "Ch
|
|
|
436
443
|
value: "otp"
|
|
437
444
|
}, true).annotate("meta.label", "Recovery method").annotate("meta.required", {}).$type);
|
|
438
445
|
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
|
|
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
|
|
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,7 +470,7 @@ 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
|
|
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", {
|