@aooth/auth-moost 0.2.0 → 0.2.2
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 +30 -33
- package/dist/atscript/index.mjs +1 -2
- package/dist/forms-C_VNxSDn.mjs +473 -0
- package/dist/index.d.mts +126 -134
- package/dist/index.mjs +156 -97
- package/package.json +24 -24
- package/src/atscript/models/forms.as.d.ts +1 -1
- package/dist/forms-C9Wey0e9.mjs +0 -484
|
@@ -0,0 +1,473 @@
|
|
|
1
|
+
import { $ak, $f, $nr, defineAnnotatedType, throwFeatureDisabled } from "@atscript/typescript/utils";
|
|
2
|
+
// src/atscript/models/forms.as
|
|
3
|
+
var WithInlineConsentForm = class {
|
|
4
|
+
static __is_atscript_annotated_type = true;
|
|
5
|
+
static type = {};
|
|
6
|
+
static metadata = /* @__PURE__ */ new Map();
|
|
7
|
+
static id = "WithInlineConsentForm";
|
|
8
|
+
static toJsonSchema() {
|
|
9
|
+
throwFeatureDisabled("JSON Schema", "jsonSchema", "emit.jsonSchema");
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
var LoginCredentialsForm = class {
|
|
13
|
+
static __is_atscript_annotated_type = true;
|
|
14
|
+
static type = {};
|
|
15
|
+
static metadata = /* @__PURE__ */ new Map();
|
|
16
|
+
static id = "LoginCredentialsForm";
|
|
17
|
+
static toJsonSchema() {
|
|
18
|
+
throwFeatureDisabled("JSON Schema", "jsonSchema", "emit.jsonSchema");
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
var MfaCodeForm = class {
|
|
22
|
+
static __is_atscript_annotated_type = true;
|
|
23
|
+
static type = {};
|
|
24
|
+
static metadata = /* @__PURE__ */ new Map();
|
|
25
|
+
static id = "MfaCodeForm";
|
|
26
|
+
static toJsonSchema() {
|
|
27
|
+
throwFeatureDisabled("JSON Schema", "jsonSchema", "emit.jsonSchema");
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
var EmailIdentifierForm = class {
|
|
31
|
+
static __is_atscript_annotated_type = true;
|
|
32
|
+
static type = {};
|
|
33
|
+
static metadata = /* @__PURE__ */ new Map();
|
|
34
|
+
static id = "EmailIdentifierForm";
|
|
35
|
+
static toJsonSchema() {
|
|
36
|
+
throwFeatureDisabled("JSON Schema", "jsonSchema", "emit.jsonSchema");
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
var SignupForm = class {
|
|
40
|
+
static __is_atscript_annotated_type = true;
|
|
41
|
+
static type = {};
|
|
42
|
+
static metadata = /* @__PURE__ */ new Map();
|
|
43
|
+
static id = "SignupForm";
|
|
44
|
+
static toJsonSchema() {
|
|
45
|
+
throwFeatureDisabled("JSON Schema", "jsonSchema", "emit.jsonSchema");
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
var SetPasswordForm = class {
|
|
49
|
+
static __is_atscript_annotated_type = true;
|
|
50
|
+
static type = {};
|
|
51
|
+
static metadata = /* @__PURE__ */ new Map();
|
|
52
|
+
static id = "SetPasswordForm";
|
|
53
|
+
static toJsonSchema() {
|
|
54
|
+
throwFeatureDisabled("JSON Schema", "jsonSchema", "emit.jsonSchema");
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
var InviteForm = class {
|
|
58
|
+
static __is_atscript_annotated_type = true;
|
|
59
|
+
static type = {};
|
|
60
|
+
static metadata = /* @__PURE__ */ new Map();
|
|
61
|
+
static id = "InviteForm";
|
|
62
|
+
static toJsonSchema() {
|
|
63
|
+
throwFeatureDisabled("JSON Schema", "jsonSchema", "emit.jsonSchema");
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
var InviteChooseUsernameForm = class {
|
|
67
|
+
static __is_atscript_annotated_type = true;
|
|
68
|
+
static type = {};
|
|
69
|
+
static metadata = /* @__PURE__ */ new Map();
|
|
70
|
+
static id = "InviteChooseUsernameForm";
|
|
71
|
+
static toJsonSchema() {
|
|
72
|
+
throwFeatureDisabled("JSON Schema", "jsonSchema", "emit.jsonSchema");
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
var Select2faForm = class {
|
|
76
|
+
static __is_atscript_annotated_type = true;
|
|
77
|
+
static type = {};
|
|
78
|
+
static metadata = /* @__PURE__ */ new Map();
|
|
79
|
+
static id = "Select2faForm";
|
|
80
|
+
static toJsonSchema() {
|
|
81
|
+
throwFeatureDisabled("JSON Schema", "jsonSchema", "emit.jsonSchema");
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
var PincodeForm = class {
|
|
85
|
+
static __is_atscript_annotated_type = true;
|
|
86
|
+
static type = {};
|
|
87
|
+
static metadata = /* @__PURE__ */ new Map();
|
|
88
|
+
static id = "PincodeForm";
|
|
89
|
+
static toJsonSchema() {
|
|
90
|
+
throwFeatureDisabled("JSON Schema", "jsonSchema", "emit.jsonSchema");
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
var AskEmailForm = class {
|
|
94
|
+
static __is_atscript_annotated_type = true;
|
|
95
|
+
static type = {};
|
|
96
|
+
static metadata = /* @__PURE__ */ new Map();
|
|
97
|
+
static id = "AskEmailForm";
|
|
98
|
+
static toJsonSchema() {
|
|
99
|
+
throwFeatureDisabled("JSON Schema", "jsonSchema", "emit.jsonSchema");
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
var AskPhoneForm = class {
|
|
103
|
+
static __is_atscript_annotated_type = true;
|
|
104
|
+
static type = {};
|
|
105
|
+
static metadata = /* @__PURE__ */ new Map();
|
|
106
|
+
static id = "AskPhoneForm";
|
|
107
|
+
static toJsonSchema() {
|
|
108
|
+
throwFeatureDisabled("JSON Schema", "jsonSchema", "emit.jsonSchema");
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
var EnrollPickMethodForm = class {
|
|
112
|
+
static __is_atscript_annotated_type = true;
|
|
113
|
+
static type = {};
|
|
114
|
+
static metadata = /* @__PURE__ */ new Map();
|
|
115
|
+
static id = "EnrollPickMethodForm";
|
|
116
|
+
static toJsonSchema() {
|
|
117
|
+
throwFeatureDisabled("JSON Schema", "jsonSchema", "emit.jsonSchema");
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
var EnrollAddressForm = class {
|
|
121
|
+
static __is_atscript_annotated_type = true;
|
|
122
|
+
static type = {};
|
|
123
|
+
static metadata = /* @__PURE__ */ new Map();
|
|
124
|
+
static id = "EnrollAddressForm";
|
|
125
|
+
static toJsonSchema() {
|
|
126
|
+
throwFeatureDisabled("JSON Schema", "jsonSchema", "emit.jsonSchema");
|
|
127
|
+
}
|
|
128
|
+
};
|
|
129
|
+
var EnrollConfirmForm = class {
|
|
130
|
+
static __is_atscript_annotated_type = true;
|
|
131
|
+
static type = {};
|
|
132
|
+
static metadata = /* @__PURE__ */ new Map();
|
|
133
|
+
static id = "EnrollConfirmForm";
|
|
134
|
+
static toJsonSchema() {
|
|
135
|
+
throwFeatureDisabled("JSON Schema", "jsonSchema", "emit.jsonSchema");
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
var EnrollTotpQrForm = class {
|
|
139
|
+
static __is_atscript_annotated_type = true;
|
|
140
|
+
static type = {};
|
|
141
|
+
static metadata = /* @__PURE__ */ new Map();
|
|
142
|
+
static id = "EnrollTotpQrForm";
|
|
143
|
+
static toJsonSchema() {
|
|
144
|
+
throwFeatureDisabled("JSON Schema", "jsonSchema", "emit.jsonSchema");
|
|
145
|
+
}
|
|
146
|
+
};
|
|
147
|
+
var ManageMfaForm = class {
|
|
148
|
+
static __is_atscript_annotated_type = true;
|
|
149
|
+
static type = {};
|
|
150
|
+
static metadata = /* @__PURE__ */ new Map();
|
|
151
|
+
static id = "ManageMfaForm";
|
|
152
|
+
static toJsonSchema() {
|
|
153
|
+
throwFeatureDisabled("JSON Schema", "jsonSchema", "emit.jsonSchema");
|
|
154
|
+
}
|
|
155
|
+
};
|
|
156
|
+
var RemoveMfaConfirmForm = class {
|
|
157
|
+
static __is_atscript_annotated_type = true;
|
|
158
|
+
static type = {};
|
|
159
|
+
static metadata = /* @__PURE__ */ new Map();
|
|
160
|
+
static id = "RemoveMfaConfirmForm";
|
|
161
|
+
static toJsonSchema() {
|
|
162
|
+
throwFeatureDisabled("JSON Schema", "jsonSchema", "emit.jsonSchema");
|
|
163
|
+
}
|
|
164
|
+
};
|
|
165
|
+
var PasswordReauthForm = class {
|
|
166
|
+
static __is_atscript_annotated_type = true;
|
|
167
|
+
static type = {};
|
|
168
|
+
static metadata = /* @__PURE__ */ new Map();
|
|
169
|
+
static id = "PasswordReauthForm";
|
|
170
|
+
static toJsonSchema() {
|
|
171
|
+
throwFeatureDisabled("JSON Schema", "jsonSchema", "emit.jsonSchema");
|
|
172
|
+
}
|
|
173
|
+
};
|
|
174
|
+
var StepUpConfirmForm = class {
|
|
175
|
+
static __is_atscript_annotated_type = true;
|
|
176
|
+
static type = {};
|
|
177
|
+
static metadata = /* @__PURE__ */ new Map();
|
|
178
|
+
static id = "StepUpConfirmForm";
|
|
179
|
+
static toJsonSchema() {
|
|
180
|
+
throwFeatureDisabled("JSON Schema", "jsonSchema", "emit.jsonSchema");
|
|
181
|
+
}
|
|
182
|
+
};
|
|
183
|
+
var TermsBumpForm = class {
|
|
184
|
+
static __is_atscript_annotated_type = true;
|
|
185
|
+
static type = {};
|
|
186
|
+
static metadata = /* @__PURE__ */ new Map();
|
|
187
|
+
static id = "TermsBumpForm";
|
|
188
|
+
static toJsonSchema() {
|
|
189
|
+
throwFeatureDisabled("JSON Schema", "jsonSchema", "emit.jsonSchema");
|
|
190
|
+
}
|
|
191
|
+
};
|
|
192
|
+
var ConcurrencyLimitForm = class {
|
|
193
|
+
static __is_atscript_annotated_type = true;
|
|
194
|
+
static type = {};
|
|
195
|
+
static metadata = /* @__PURE__ */ new Map();
|
|
196
|
+
static id = "ConcurrencyLimitForm";
|
|
197
|
+
static toJsonSchema() {
|
|
198
|
+
throwFeatureDisabled("JSON Schema", "jsonSchema", "emit.jsonSchema");
|
|
199
|
+
}
|
|
200
|
+
};
|
|
201
|
+
var MagicLinkRequestForm = class {
|
|
202
|
+
static __is_atscript_annotated_type = true;
|
|
203
|
+
static type = {};
|
|
204
|
+
static metadata = /* @__PURE__ */ new Map();
|
|
205
|
+
static id = "MagicLinkRequestForm";
|
|
206
|
+
static toJsonSchema() {
|
|
207
|
+
throwFeatureDisabled("JSON Schema", "jsonSchema", "emit.jsonSchema");
|
|
208
|
+
}
|
|
209
|
+
};
|
|
210
|
+
var RecoveryModeSelectForm = class {
|
|
211
|
+
static __is_atscript_annotated_type = true;
|
|
212
|
+
static type = {};
|
|
213
|
+
static metadata = /* @__PURE__ */ new Map();
|
|
214
|
+
static id = "RecoveryModeSelectForm";
|
|
215
|
+
static toJsonSchema() {
|
|
216
|
+
throwFeatureDisabled("JSON Schema", "jsonSchema", "emit.jsonSchema");
|
|
217
|
+
}
|
|
218
|
+
};
|
|
219
|
+
var RecoveryFactorForm = class {
|
|
220
|
+
static __is_atscript_annotated_type = true;
|
|
221
|
+
static type = {};
|
|
222
|
+
static metadata = /* @__PURE__ */ new Map();
|
|
223
|
+
static id = "RecoveryFactorForm";
|
|
224
|
+
static toJsonSchema() {
|
|
225
|
+
throwFeatureDisabled("JSON Schema", "jsonSchema", "emit.jsonSchema");
|
|
226
|
+
}
|
|
227
|
+
};
|
|
228
|
+
var ChangePasswordForm = class {
|
|
229
|
+
static __is_atscript_annotated_type = true;
|
|
230
|
+
static type = {};
|
|
231
|
+
static metadata = /* @__PURE__ */ new Map();
|
|
232
|
+
static id = "ChangePasswordForm";
|
|
233
|
+
static toJsonSchema() {
|
|
234
|
+
throwFeatureDisabled("JSON Schema", "jsonSchema", "emit.jsonSchema");
|
|
235
|
+
}
|
|
236
|
+
};
|
|
237
|
+
var ProveControlForm = class {
|
|
238
|
+
static __is_atscript_annotated_type = true;
|
|
239
|
+
static type = {};
|
|
240
|
+
static metadata = /* @__PURE__ */ new Map();
|
|
241
|
+
static id = "ProveControlForm";
|
|
242
|
+
static toJsonSchema() {
|
|
243
|
+
throwFeatureDisabled("JSON Schema", "jsonSchema", "emit.jsonSchema");
|
|
244
|
+
}
|
|
245
|
+
};
|
|
246
|
+
var ProveControlOtpForm = class {
|
|
247
|
+
static __is_atscript_annotated_type = true;
|
|
248
|
+
static type = {};
|
|
249
|
+
static metadata = /* @__PURE__ */ new Map();
|
|
250
|
+
static id = "ProveControlOtpForm";
|
|
251
|
+
static toJsonSchema() {
|
|
252
|
+
throwFeatureDisabled("JSON Schema", "jsonSchema", "emit.jsonSchema");
|
|
253
|
+
}
|
|
254
|
+
};
|
|
255
|
+
var AuthorizeConsentForm = class {
|
|
256
|
+
static __is_atscript_annotated_type = true;
|
|
257
|
+
static type = {};
|
|
258
|
+
static metadata = /* @__PURE__ */ new Map();
|
|
259
|
+
static id = "AuthorizeConsentForm";
|
|
260
|
+
static toJsonSchema() {
|
|
261
|
+
throwFeatureDisabled("JSON Schema", "jsonSchema", "emit.jsonSchema");
|
|
262
|
+
}
|
|
263
|
+
};
|
|
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
|
+
$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
|
+
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
|
+
name: "pendingConsents",
|
|
268
|
+
fn: "(_, _d, ctx) => ctx.public?.consents?.pending"
|
|
269
|
+
}, true).annotate("ui.form.fn.hidden", "(_, _d, ctx) => ctx.public?.consents?.decidedAt !== undefined || (ctx.public?.consents?.pending?.length ?? 0) === 0").annotate("ui.form.grid.colSpan", { desktop: "12" }).$type);
|
|
270
|
+
defineAnnotatedType("object", LoginCredentialsForm).annotate("meta.label", "Sign in").annotate("wf.context.pass", "public", true).annotate("ui.form.submit.text", "Sign in").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).prop("password", defineAnnotatedType().designType("string").tags("string").annotate("ui.form.order", 20).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 }).annotate("ui.form.action", {
|
|
271
|
+
id: "forgotPassword",
|
|
272
|
+
label: "Forgot password?"
|
|
273
|
+
}).annotate("ui.form.fn.hidden", "(_, _d, ctx) => !ctx.public?.altActions?.forgotPassword").annotate("wf.action.withData", "forgotPassword").$type).prop("signup", defineAnnotatedType().designType("phantom").tags("action", "ui").annotate("ui.form.order", 30).annotate("ui.form.action", {
|
|
274
|
+
id: "signup",
|
|
275
|
+
label: "Sign up"
|
|
276
|
+
}).annotate("ui.form.attr", {
|
|
277
|
+
name: "text",
|
|
278
|
+
value: "Don’t have an account?"
|
|
279
|
+
}, true).annotate("ui.form.attr", {
|
|
280
|
+
name: "align",
|
|
281
|
+
value: "center"
|
|
282
|
+
}, true).annotate("ui.form.pushDown", true).annotate("ui.form.fn.hidden", "(_, _d, ctx) => !ctx.public?.altActions?.signup").optional().$type).prop("magicLink", defineAnnotatedType().designType("phantom").tags("action", "ui").annotate("ui.form.order", 40).annotate("ui.form.action", {
|
|
283
|
+
id: "magicLink",
|
|
284
|
+
label: "Sign in with a magic link"
|
|
285
|
+
}).annotate("ui.form.attr", {
|
|
286
|
+
name: "align",
|
|
287
|
+
value: "center"
|
|
288
|
+
}, 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
|
+
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 })) : []"
|
|
291
|
+
}, 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
|
+
id: "sso",
|
|
293
|
+
label: "Continue"
|
|
294
|
+
}).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", {
|
|
296
|
+
name: "maxlength",
|
|
297
|
+
fn: "(_, _d, ctx) => ctx.public?.pincode?.codeLength"
|
|
298
|
+
}, 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", {
|
|
299
|
+
id: "useDifferentMethod",
|
|
300
|
+
label: "Use a different method"
|
|
301
|
+
}).annotate("ui.form.fn.hidden", "(_, _d, ctx) => (ctx.public?.mfa?.methodCount ?? 0) < 2").optional().$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);
|
|
302
|
+
defineAnnotatedType("object", EmailIdentifierForm).annotate("meta.label", "Forgot your password?").annotate("meta.description", "Enter your account email and we will send you a recovery link.").annotate("wf.context.pass", "public", true).prop("email", defineAnnotatedType().designType("string").tags("email", "string").annotate("ui.form.order", 10).annotate("ui.form.type", "text").annotate("meta.label", "Email").annotate("ui.form.autocomplete", "email").annotate("meta.required", {}).annotate("expect.pattern", {
|
|
303
|
+
pattern: "^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$",
|
|
304
|
+
flags: "",
|
|
305
|
+
message: "Invalid email format."
|
|
306
|
+
}, true).$type).prop("backToLogin", defineAnnotatedType().designType("phantom").tags("action", "ui").annotate("ui.form.order", 20).annotate("ui.form.action", {
|
|
307
|
+
id: "backToLogin",
|
|
308
|
+
label: "Back to sign in"
|
|
309
|
+
}).annotate("ui.form.attr", {
|
|
310
|
+
name: "align",
|
|
311
|
+
value: "center"
|
|
312
|
+
}, true).annotate("ui.form.pushDown", true).optional().$type);
|
|
313
|
+
defineAnnotatedType("object", SignupForm).annotate("meta.label", "Create your account").annotate("meta.description", "Enter your email to get started — we will send you a verification code.").annotate("wf.context.pass", "public", true).prop("email", defineAnnotatedType().designType("string").tags("email", "string").annotate("ui.form.order", 10).annotate("ui.form.type", "text").annotate("meta.label", "Email").annotate("ui.form.autocomplete", "email").annotate("meta.required", {}).annotate("expect.pattern", {
|
|
314
|
+
pattern: "^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$",
|
|
315
|
+
flags: "",
|
|
316
|
+
message: "Invalid email format."
|
|
317
|
+
}, true).$type).prop("backToLogin", defineAnnotatedType().designType("phantom").tags("action", "ui").annotate("ui.form.order", 20).annotate("ui.form.action", {
|
|
318
|
+
id: "backToLogin",
|
|
319
|
+
label: "Sign in"
|
|
320
|
+
}).annotate("ui.form.attr", {
|
|
321
|
+
name: "text",
|
|
322
|
+
value: "Already have an account?"
|
|
323
|
+
}, true).annotate("ui.form.attr", {
|
|
324
|
+
name: "align",
|
|
325
|
+
value: "center"
|
|
326
|
+
}, 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", {
|
|
328
|
+
name: "policies",
|
|
329
|
+
fn: "(_, _d, ctx) => ctx.public?.password?.policies"
|
|
330
|
+
}, true).annotate("ui.form.fn.attr", {
|
|
331
|
+
name: "password",
|
|
332
|
+
fn: "(_, data) => data.newPassword"
|
|
333
|
+
}, true).annotate("ui.form.grid.colSpan", { desktop: "12" }).$type);
|
|
334
|
+
defineAnnotatedType("object", InviteForm).annotate("meta.label", "Send an invitation").annotate("meta.description", "Enter the recipient email address and pick the roles to grant on acceptance. They will receive a magic link to set their password.").annotate("wf.context.pass", "public", true).prop("email", defineAnnotatedType().designType("string").tags("email", "string").annotate("ui.form.order", 10).annotate("ui.form.type", "text").annotate("meta.label", "Email").annotate("ui.form.autocomplete", "email").annotate("meta.required", {}).annotate("expect.pattern", {
|
|
335
|
+
pattern: "^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$",
|
|
336
|
+
flags: "",
|
|
337
|
+
message: "Invalid email format."
|
|
338
|
+
}, 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
|
+
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", {
|
|
342
|
+
name: "maxlength",
|
|
343
|
+
fn: "(_, _d, ctx) => ctx.public?.pincode?.codeLength"
|
|
344
|
+
}, 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", {
|
|
345
|
+
id: "resend",
|
|
346
|
+
label: "Resend code"
|
|
347
|
+
}).annotate("ui.form.fn.attr", {
|
|
348
|
+
name: "available-at",
|
|
349
|
+
fn: "(_, _d, ctx) => ctx.public?.pincode?.resendAllowedAt"
|
|
350
|
+
}, true).optional().$type).prop("useDifferentMethod", defineAnnotatedType().designType("phantom").tags("action", "ui").annotate("ui.form.action", {
|
|
351
|
+
id: "useDifferentMethod",
|
|
352
|
+
label: "Use a different method"
|
|
353
|
+
}).annotate("ui.form.fn.hidden", "(_, _d, ctx) => (ctx.public?.mfa?.methodCount ?? 0) < 2").optional().$type).prop("useDifferentTransport", defineAnnotatedType().designType("phantom").tags("action", "ui").annotate("ui.form.action", {
|
|
354
|
+
id: "useDifferentTransport",
|
|
355
|
+
label: "Use a different transport"
|
|
356
|
+
}).annotate("ui.form.fn.hidden", "(_, _d, ctx) => (ctx.public?.otp?.transportCount ?? 0) < 2").optional().$type);
|
|
357
|
+
defineAnnotatedType("object", AskEmailForm).annotate("meta.label", "Add your email address").annotate("meta.description", "We need a verified email to send security notifications and verification codes.").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("email", defineAnnotatedType().designType("string").tags("email", "string").annotate("ui.form.order", 10).annotate("ui.form.type", "text").annotate("meta.label", "Email").annotate("ui.form.autocomplete", "email").annotate("meta.required", {}).annotate("expect.pattern", {
|
|
358
|
+
pattern: "^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$",
|
|
359
|
+
flags: "",
|
|
360
|
+
message: "Invalid email format."
|
|
361
|
+
}, true).$type);
|
|
362
|
+
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", {
|
|
364
|
+
id: "skip",
|
|
365
|
+
label: "Skip for now"
|
|
366
|
+
}).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
|
+
id: "cancel",
|
|
368
|
+
label: "Cancel"
|
|
369
|
+
}).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", {
|
|
371
|
+
id: "skip",
|
|
372
|
+
label: "Skip for now"
|
|
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", {
|
|
374
|
+
id: "cancel",
|
|
375
|
+
label: "Cancel"
|
|
376
|
+
}).annotate("ui.form.fn.hidden", "() => true").optional().$type).prop("useDifferentMethod", defineAnnotatedType().designType("phantom").tags("action", "ui").annotate("ui.form.action", {
|
|
377
|
+
id: "useDifferentMethod",
|
|
378
|
+
label: "Use a different method"
|
|
379
|
+
}).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", {
|
|
381
|
+
id: "resend",
|
|
382
|
+
label: "Resend code"
|
|
383
|
+
}).annotate("ui.form.fn.attr", {
|
|
384
|
+
name: "available-at",
|
|
385
|
+
fn: "(_, _d, ctx) => ctx.public?.pincode?.resendAllowedAt"
|
|
386
|
+
}, true).annotate("ui.form.fn.hidden", "(_, _d, ctx) => ctx.public?.mfaEnroll?.method === \"totp\"").optional().$type).prop("useDifferentMethod", defineAnnotatedType().designType("phantom").tags("action", "ui").annotate("ui.form.action", {
|
|
387
|
+
id: "useDifferentMethod",
|
|
388
|
+
label: "Use a different method"
|
|
389
|
+
}).annotate("ui.form.fn.hidden", "(_, _d, ctx) => (ctx.public?.mfaEnroll?.availableTransports?.length ?? 0) < 2 || ctx.public?.mfaEnroll?.mode === \"manage\"").optional().$type).prop("cancel", defineAnnotatedType().designType("phantom").tags("action", "ui").annotate("ui.form.action", {
|
|
390
|
+
id: "cancel",
|
|
391
|
+
label: "Cancel"
|
|
392
|
+
}).annotate("ui.form.fn.hidden", "() => true").optional().$type).prop("skip", defineAnnotatedType().designType("phantom").tags("action", "ui").annotate("ui.form.action", {
|
|
393
|
+
id: "skip",
|
|
394
|
+
label: "Skip for now"
|
|
395
|
+
}).annotate("ui.form.fn.hidden", "(_, _d, ctx) => ctx.public?.mfaEnroll?.mode !== \"optional\"").optional().$type);
|
|
396
|
+
defineAnnotatedType("object", EnrollTotpQrForm).annotate("meta.label", "Scan this QR code").annotate("meta.description", "Open your authenticator app and scan the code (or enter the key manually), then continue to enter the code it shows.").annotate("wf.context.pass", "public", true).annotate("ui.form.submit.text", "Continue").prop("qrCode", defineAnnotatedType().designType("phantom").tags("paragraph", "ui").annotate("ui.form.order", 5).annotate("ui.form.component", "AsQrCode").annotate("ui.form.fn.attr", {
|
|
397
|
+
name: "size",
|
|
398
|
+
fn: "() => 180"
|
|
399
|
+
}, true).annotate("ui.form.fn.value", "(_, _d, ctx) => ctx.public?.mfaEnroll?.uri || \"\"").$type).prop("useDifferentMethod", defineAnnotatedType().designType("phantom").tags("action", "ui").annotate("ui.form.action", {
|
|
400
|
+
id: "useDifferentMethod",
|
|
401
|
+
label: "Use a different method"
|
|
402
|
+
}).annotate("ui.form.fn.hidden", "(_, _d, ctx) => (ctx.public?.mfaEnroll?.availableTransports?.length ?? 0) < 2 || ctx.public?.mfaEnroll?.mode === \"manage\"").optional().$type).prop("cancel", defineAnnotatedType().designType("phantom").tags("action", "ui").annotate("ui.form.action", {
|
|
403
|
+
id: "cancel",
|
|
404
|
+
label: "Cancel"
|
|
405
|
+
}).annotate("ui.form.fn.hidden", "() => true").optional().$type).prop("skip", defineAnnotatedType().designType("phantom").tags("action", "ui").annotate("ui.form.action", {
|
|
406
|
+
id: "skip",
|
|
407
|
+
label: "Skip for now"
|
|
408
|
+
}).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", {
|
|
410
|
+
id: "cancel",
|
|
411
|
+
label: "Cancel"
|
|
412
|
+
}).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", {
|
|
414
|
+
id: "cancel",
|
|
415
|
+
label: "Cancel"
|
|
416
|
+
}).annotate("ui.form.fn.hidden", "() => true").optional().$type);
|
|
417
|
+
defineAnnotatedType("object", PasswordReauthForm).annotate("meta.label", "Confirm your password").annotate("meta.description", "Re-enter your account password to manage your two-factor methods.").annotate("wf.context.pass", "public", true).annotate("ui.form.submit.text", "Verify").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.action", {
|
|
418
|
+
id: "cancel",
|
|
419
|
+
label: "Cancel"
|
|
420
|
+
}).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", {
|
|
422
|
+
id: "useDifferentMethod",
|
|
423
|
+
label: "Use a different method"
|
|
424
|
+
}).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", {
|
|
425
|
+
id: "cancel",
|
|
426
|
+
label: "Cancel"
|
|
427
|
+
}).annotate("ui.form.fn.hidden", "() => true").optional().$type);
|
|
428
|
+
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
|
+
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
|
+
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);
|
|
431
|
+
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
|
+
label: "Magic link",
|
|
433
|
+
value: "magicLink"
|
|
434
|
+
}, true).annotate("ui.form.options", {
|
|
435
|
+
label: "One-time code",
|
|
436
|
+
value: "otp"
|
|
437
|
+
}, 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", {
|
|
440
|
+
name: "policies",
|
|
441
|
+
fn: "(_, _d, ctx) => ctx.public?.password?.policies"
|
|
442
|
+
}, true).annotate("ui.form.fn.attr", {
|
|
443
|
+
name: "password",
|
|
444
|
+
fn: "(_, data) => data.newPassword"
|
|
445
|
+
}, 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", {
|
|
447
|
+
id: "cancel",
|
|
448
|
+
label: "Cancel"
|
|
449
|
+
}).annotate("ui.form.attr", {
|
|
450
|
+
name: "align",
|
|
451
|
+
value: "center"
|
|
452
|
+
}, 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", {
|
|
454
|
+
id: "resend",
|
|
455
|
+
label: "Resend code"
|
|
456
|
+
}).annotate("ui.form.fn.attr", {
|
|
457
|
+
name: "available-at",
|
|
458
|
+
fn: "(_, _d, ctx) => ctx.public?.proveControl?.resendAllowedAt"
|
|
459
|
+
}, true).optional().$type).prop("cancel", defineAnnotatedType().designType("phantom").tags("action", "ui").annotate("ui.form.order", 20).annotate("ui.form.action", {
|
|
460
|
+
id: "cancel",
|
|
461
|
+
label: "Cancel"
|
|
462
|
+
}).annotate("ui.form.attr", {
|
|
463
|
+
name: "align",
|
|
464
|
+
value: "center"
|
|
465
|
+
}, 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", {
|
|
467
|
+
id: "deny",
|
|
468
|
+
label: "Deny"
|
|
469
|
+
}).annotate("ui.form.attr", {
|
|
470
|
+
name: "align",
|
|
471
|
+
value: "center"
|
|
472
|
+
}, 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 };
|