@aooth/auth-moost 0.1.7 → 0.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/atscript/index.d.mts +2 -2
- package/dist/atscript/index.mjs +2 -2
- package/dist/forms-DV4UcC29.mjs +442 -0
- package/dist/index.d.mts +2540 -1682
- package/dist/index.mjs +4993 -3572
- package/package.json +32 -25
- package/src/atscript/models/forms.as +576 -268
- package/src/atscript/models/forms.as.d.ts +140 -100
- package/dist/forms-DtQMdkA_.mjs +0 -380
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { C as
|
|
2
|
-
export { AskEmailForm, AskPhoneForm,
|
|
1
|
+
import { C as SetPasswordForm, E as WithInlineConsentForm, S as Select2faForm, T as TermsBumpForm, _ as ProveControlForm, a as EmailIdentifierForm, b as RecoveryModeSelectForm, c as EnrollPickMethodForm, d as LoginCredentialsForm, f as MagicLinkRequestForm, g as PincodeForm, h as PasswordReauthForm, i as ConcurrencyLimitForm, l as EnrollTotpQrForm, m as MfaCodeForm, n as AskPhoneForm, o as EnrollAddressForm, p as ManageMfaForm, r as ChangePasswordForm, s as EnrollConfirmForm, t as AskEmailForm, u as InviteForm, v as ProveControlOtpForm, w as SignupForm, x as RemoveMfaConfirmForm, y as RecoveryFactorForm } from "../forms-DV4UcC29.mjs";
|
|
2
|
+
export { AskEmailForm, AskPhoneForm, ChangePasswordForm, ConcurrencyLimitForm, EmailIdentifierForm, EnrollAddressForm, EnrollConfirmForm, EnrollPickMethodForm, EnrollTotpQrForm, InviteForm, LoginCredentialsForm, MagicLinkRequestForm, ManageMfaForm, MfaCodeForm, PasswordReauthForm, PincodeForm, ProveControlForm, ProveControlOtpForm, RecoveryFactorForm, RecoveryModeSelectForm, RemoveMfaConfirmForm, Select2faForm, SetPasswordForm, SignupForm, TermsBumpForm, WithInlineConsentForm };
|
package/dist/atscript/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { C as
|
|
2
|
-
export { AskEmailForm, AskPhoneForm,
|
|
1
|
+
import { C as SetPasswordForm, E as WithInlineConsentForm, S as Select2faForm, T as TermsBumpForm, _ as ProveControlForm, a as EmailIdentifierForm, b as RecoveryModeSelectForm, c as EnrollPickMethodForm, d as LoginCredentialsForm, f as MagicLinkRequestForm, g as PincodeForm, h as PasswordReauthForm, i as ConcurrencyLimitForm, l as EnrollTotpQrForm, m as MfaCodeForm, n as AskPhoneForm, o as EnrollAddressForm, p as ManageMfaForm, r as ChangePasswordForm, s as EnrollConfirmForm, t as AskEmailForm, u as InviteForm, v as ProveControlOtpForm, w as SignupForm, x as RemoveMfaConfirmForm, y as RecoveryFactorForm } from "../forms-DV4UcC29.mjs";
|
|
2
|
+
export { AskEmailForm, AskPhoneForm, ChangePasswordForm, ConcurrencyLimitForm, EmailIdentifierForm, EnrollAddressForm, EnrollConfirmForm, EnrollPickMethodForm, EnrollTotpQrForm, InviteForm, LoginCredentialsForm, MagicLinkRequestForm, ManageMfaForm, MfaCodeForm, PasswordReauthForm, PincodeForm, ProveControlForm, ProveControlOtpForm, RecoveryFactorForm, RecoveryModeSelectForm, RemoveMfaConfirmForm, Select2faForm, SetPasswordForm, SignupForm, TermsBumpForm, WithInlineConsentForm };
|
|
@@ -0,0 +1,442 @@
|
|
|
1
|
+
import { defineAnnotatedType, throwFeatureDisabled } from "@atscript/typescript/utils";
|
|
2
|
+
//#region 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 Select2faForm = class {
|
|
67
|
+
static __is_atscript_annotated_type = true;
|
|
68
|
+
static type = {};
|
|
69
|
+
static metadata = /* @__PURE__ */ new Map();
|
|
70
|
+
static id = "Select2faForm";
|
|
71
|
+
static toJsonSchema() {
|
|
72
|
+
throwFeatureDisabled("JSON Schema", "jsonSchema", "emit.jsonSchema");
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
var PincodeForm = class {
|
|
76
|
+
static __is_atscript_annotated_type = true;
|
|
77
|
+
static type = {};
|
|
78
|
+
static metadata = /* @__PURE__ */ new Map();
|
|
79
|
+
static id = "PincodeForm";
|
|
80
|
+
static toJsonSchema() {
|
|
81
|
+
throwFeatureDisabled("JSON Schema", "jsonSchema", "emit.jsonSchema");
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
var AskEmailForm = class {
|
|
85
|
+
static __is_atscript_annotated_type = true;
|
|
86
|
+
static type = {};
|
|
87
|
+
static metadata = /* @__PURE__ */ new Map();
|
|
88
|
+
static id = "AskEmailForm";
|
|
89
|
+
static toJsonSchema() {
|
|
90
|
+
throwFeatureDisabled("JSON Schema", "jsonSchema", "emit.jsonSchema");
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
var AskPhoneForm = class {
|
|
94
|
+
static __is_atscript_annotated_type = true;
|
|
95
|
+
static type = {};
|
|
96
|
+
static metadata = /* @__PURE__ */ new Map();
|
|
97
|
+
static id = "AskPhoneForm";
|
|
98
|
+
static toJsonSchema() {
|
|
99
|
+
throwFeatureDisabled("JSON Schema", "jsonSchema", "emit.jsonSchema");
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
var EnrollPickMethodForm = class {
|
|
103
|
+
static __is_atscript_annotated_type = true;
|
|
104
|
+
static type = {};
|
|
105
|
+
static metadata = /* @__PURE__ */ new Map();
|
|
106
|
+
static id = "EnrollPickMethodForm";
|
|
107
|
+
static toJsonSchema() {
|
|
108
|
+
throwFeatureDisabled("JSON Schema", "jsonSchema", "emit.jsonSchema");
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
var EnrollAddressForm = class {
|
|
112
|
+
static __is_atscript_annotated_type = true;
|
|
113
|
+
static type = {};
|
|
114
|
+
static metadata = /* @__PURE__ */ new Map();
|
|
115
|
+
static id = "EnrollAddressForm";
|
|
116
|
+
static toJsonSchema() {
|
|
117
|
+
throwFeatureDisabled("JSON Schema", "jsonSchema", "emit.jsonSchema");
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
var EnrollConfirmForm = class {
|
|
121
|
+
static __is_atscript_annotated_type = true;
|
|
122
|
+
static type = {};
|
|
123
|
+
static metadata = /* @__PURE__ */ new Map();
|
|
124
|
+
static id = "EnrollConfirmForm";
|
|
125
|
+
static toJsonSchema() {
|
|
126
|
+
throwFeatureDisabled("JSON Schema", "jsonSchema", "emit.jsonSchema");
|
|
127
|
+
}
|
|
128
|
+
};
|
|
129
|
+
var EnrollTotpQrForm = class {
|
|
130
|
+
static __is_atscript_annotated_type = true;
|
|
131
|
+
static type = {};
|
|
132
|
+
static metadata = /* @__PURE__ */ new Map();
|
|
133
|
+
static id = "EnrollTotpQrForm";
|
|
134
|
+
static toJsonSchema() {
|
|
135
|
+
throwFeatureDisabled("JSON Schema", "jsonSchema", "emit.jsonSchema");
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
var ManageMfaForm = class {
|
|
139
|
+
static __is_atscript_annotated_type = true;
|
|
140
|
+
static type = {};
|
|
141
|
+
static metadata = /* @__PURE__ */ new Map();
|
|
142
|
+
static id = "ManageMfaForm";
|
|
143
|
+
static toJsonSchema() {
|
|
144
|
+
throwFeatureDisabled("JSON Schema", "jsonSchema", "emit.jsonSchema");
|
|
145
|
+
}
|
|
146
|
+
};
|
|
147
|
+
var RemoveMfaConfirmForm = class {
|
|
148
|
+
static __is_atscript_annotated_type = true;
|
|
149
|
+
static type = {};
|
|
150
|
+
static metadata = /* @__PURE__ */ new Map();
|
|
151
|
+
static id = "RemoveMfaConfirmForm";
|
|
152
|
+
static toJsonSchema() {
|
|
153
|
+
throwFeatureDisabled("JSON Schema", "jsonSchema", "emit.jsonSchema");
|
|
154
|
+
}
|
|
155
|
+
};
|
|
156
|
+
var PasswordReauthForm = class {
|
|
157
|
+
static __is_atscript_annotated_type = true;
|
|
158
|
+
static type = {};
|
|
159
|
+
static metadata = /* @__PURE__ */ new Map();
|
|
160
|
+
static id = "PasswordReauthForm";
|
|
161
|
+
static toJsonSchema() {
|
|
162
|
+
throwFeatureDisabled("JSON Schema", "jsonSchema", "emit.jsonSchema");
|
|
163
|
+
}
|
|
164
|
+
};
|
|
165
|
+
var TermsBumpForm = class {
|
|
166
|
+
static __is_atscript_annotated_type = true;
|
|
167
|
+
static type = {};
|
|
168
|
+
static metadata = /* @__PURE__ */ new Map();
|
|
169
|
+
static id = "TermsBumpForm";
|
|
170
|
+
static toJsonSchema() {
|
|
171
|
+
throwFeatureDisabled("JSON Schema", "jsonSchema", "emit.jsonSchema");
|
|
172
|
+
}
|
|
173
|
+
};
|
|
174
|
+
var ConcurrencyLimitForm = class {
|
|
175
|
+
static __is_atscript_annotated_type = true;
|
|
176
|
+
static type = {};
|
|
177
|
+
static metadata = /* @__PURE__ */ new Map();
|
|
178
|
+
static id = "ConcurrencyLimitForm";
|
|
179
|
+
static toJsonSchema() {
|
|
180
|
+
throwFeatureDisabled("JSON Schema", "jsonSchema", "emit.jsonSchema");
|
|
181
|
+
}
|
|
182
|
+
};
|
|
183
|
+
var MagicLinkRequestForm = class {
|
|
184
|
+
static __is_atscript_annotated_type = true;
|
|
185
|
+
static type = {};
|
|
186
|
+
static metadata = /* @__PURE__ */ new Map();
|
|
187
|
+
static id = "MagicLinkRequestForm";
|
|
188
|
+
static toJsonSchema() {
|
|
189
|
+
throwFeatureDisabled("JSON Schema", "jsonSchema", "emit.jsonSchema");
|
|
190
|
+
}
|
|
191
|
+
};
|
|
192
|
+
var RecoveryModeSelectForm = class {
|
|
193
|
+
static __is_atscript_annotated_type = true;
|
|
194
|
+
static type = {};
|
|
195
|
+
static metadata = /* @__PURE__ */ new Map();
|
|
196
|
+
static id = "RecoveryModeSelectForm";
|
|
197
|
+
static toJsonSchema() {
|
|
198
|
+
throwFeatureDisabled("JSON Schema", "jsonSchema", "emit.jsonSchema");
|
|
199
|
+
}
|
|
200
|
+
};
|
|
201
|
+
var RecoveryFactorForm = class {
|
|
202
|
+
static __is_atscript_annotated_type = true;
|
|
203
|
+
static type = {};
|
|
204
|
+
static metadata = /* @__PURE__ */ new Map();
|
|
205
|
+
static id = "RecoveryFactorForm";
|
|
206
|
+
static toJsonSchema() {
|
|
207
|
+
throwFeatureDisabled("JSON Schema", "jsonSchema", "emit.jsonSchema");
|
|
208
|
+
}
|
|
209
|
+
};
|
|
210
|
+
var ChangePasswordForm = class {
|
|
211
|
+
static __is_atscript_annotated_type = true;
|
|
212
|
+
static type = {};
|
|
213
|
+
static metadata = /* @__PURE__ */ new Map();
|
|
214
|
+
static id = "ChangePasswordForm";
|
|
215
|
+
static toJsonSchema() {
|
|
216
|
+
throwFeatureDisabled("JSON Schema", "jsonSchema", "emit.jsonSchema");
|
|
217
|
+
}
|
|
218
|
+
};
|
|
219
|
+
var ProveControlForm = class {
|
|
220
|
+
static __is_atscript_annotated_type = true;
|
|
221
|
+
static type = {};
|
|
222
|
+
static metadata = /* @__PURE__ */ new Map();
|
|
223
|
+
static id = "ProveControlForm";
|
|
224
|
+
static toJsonSchema() {
|
|
225
|
+
throwFeatureDisabled("JSON Schema", "jsonSchema", "emit.jsonSchema");
|
|
226
|
+
}
|
|
227
|
+
};
|
|
228
|
+
var ProveControlOtpForm = class {
|
|
229
|
+
static __is_atscript_annotated_type = true;
|
|
230
|
+
static type = {};
|
|
231
|
+
static metadata = /* @__PURE__ */ new Map();
|
|
232
|
+
static id = "ProveControlOtpForm";
|
|
233
|
+
static toJsonSchema() {
|
|
234
|
+
throwFeatureDisabled("JSON Schema", "jsonSchema", "emit.jsonSchema");
|
|
235
|
+
}
|
|
236
|
+
};
|
|
237
|
+
defineAnnotatedType("object", WithInlineConsentForm).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", {
|
|
238
|
+
name: "pendingConsents",
|
|
239
|
+
fn: "(_, _d, ctx) => ctx.public?.consents?.pending"
|
|
240
|
+
}, 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).annotate("wf.context.pass", "public", true);
|
|
241
|
+
defineAnnotatedType("object", LoginCredentialsForm).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 }).$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", {
|
|
242
|
+
id: "forgotPassword",
|
|
243
|
+
label: "Forgot password?"
|
|
244
|
+
}).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", {
|
|
245
|
+
id: "signup",
|
|
246
|
+
label: "Sign up"
|
|
247
|
+
}).annotate("ui.form.attr", {
|
|
248
|
+
name: "text",
|
|
249
|
+
value: "Don’t have an account?"
|
|
250
|
+
}, true).annotate("ui.form.attr", {
|
|
251
|
+
name: "align",
|
|
252
|
+
value: "center"
|
|
253
|
+
}, 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", {
|
|
254
|
+
id: "magicLink",
|
|
255
|
+
label: "Sign in with a magic link"
|
|
256
|
+
}).annotate("ui.form.attr", {
|
|
257
|
+
name: "align",
|
|
258
|
+
value: "center"
|
|
259
|
+
}, 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", {
|
|
260
|
+
name: "providers",
|
|
261
|
+
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 })) : []"
|
|
262
|
+
}, 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", {
|
|
263
|
+
id: "sso",
|
|
264
|
+
label: "Continue"
|
|
265
|
+
}).annotate("wf.action.withData", "sso").annotate("ui.form.grid.colSpan", { desktop: "12" }).optional().$type).annotate("meta.label", "Sign in").annotate("wf.context.pass", "public", true).annotate("ui.form.submit.text", "Sign in");
|
|
266
|
+
defineAnnotatedType("object", MfaCodeForm).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", {
|
|
267
|
+
name: "maxlength",
|
|
268
|
+
fn: "(_, _d, ctx) => ctx.public?.pincode?.codeLength"
|
|
269
|
+
}, 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", {
|
|
270
|
+
id: "useDifferentMethod",
|
|
271
|
+
label: "Use a different method"
|
|
272
|
+
}).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).annotate("meta.label", "Verify your identity").annotate("wf.context.pass", "public", true).annotate("ui.form.submit.text", "Verify");
|
|
273
|
+
defineAnnotatedType("object", EmailIdentifierForm).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", {
|
|
274
|
+
pattern: "^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$",
|
|
275
|
+
flags: "",
|
|
276
|
+
message: "Invalid email format."
|
|
277
|
+
}, true).$type).prop("backToLogin", defineAnnotatedType().designType("phantom").tags("action", "ui").annotate("ui.form.order", 20).annotate("ui.form.action", {
|
|
278
|
+
id: "backToLogin",
|
|
279
|
+
label: "Back to sign in"
|
|
280
|
+
}).annotate("ui.form.attr", {
|
|
281
|
+
name: "align",
|
|
282
|
+
value: "center"
|
|
283
|
+
}, true).annotate("ui.form.pushDown", true).optional().$type).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);
|
|
284
|
+
defineAnnotatedType("object", SignupForm).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", {
|
|
285
|
+
pattern: "^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$",
|
|
286
|
+
flags: "",
|
|
287
|
+
message: "Invalid email format."
|
|
288
|
+
}, true).$type).prop("backToLogin", defineAnnotatedType().designType("phantom").tags("action", "ui").annotate("ui.form.order", 20).annotate("ui.form.action", {
|
|
289
|
+
id: "backToLogin",
|
|
290
|
+
label: "Sign in"
|
|
291
|
+
}).annotate("ui.form.attr", {
|
|
292
|
+
name: "text",
|
|
293
|
+
value: "Already have an account?"
|
|
294
|
+
}, true).annotate("ui.form.attr", {
|
|
295
|
+
name: "align",
|
|
296
|
+
value: "center"
|
|
297
|
+
}, true).annotate("ui.form.pushDown", true).optional().$type).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);
|
|
298
|
+
defineAnnotatedType("object", SetPasswordForm).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", {
|
|
299
|
+
name: "pendingConsents",
|
|
300
|
+
fn: "(_, _d, ctx) => ctx.public?.consents?.pending"
|
|
301
|
+
}, 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).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) => v === data.newPassword || \"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", {
|
|
302
|
+
name: "policies",
|
|
303
|
+
fn: "(_, _d, ctx) => ctx.public?.password?.policies"
|
|
304
|
+
}, true).annotate("ui.form.fn.attr", {
|
|
305
|
+
name: "password",
|
|
306
|
+
fn: "(_, data) => data.newPassword"
|
|
307
|
+
}, true).annotate("ui.form.grid.colSpan", { desktop: "12" }).$type).annotate("ui.form.fn.title", "(_, _d, ctx) => ctx.public?.password?.heading || \"Set your password\"").annotate("wf.context.pass", "public", true);
|
|
308
|
+
defineAnnotatedType("object", InviteForm).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", {
|
|
309
|
+
pattern: "^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$",
|
|
310
|
+
flags: "",
|
|
311
|
+
message: "Invalid email format."
|
|
312
|
+
}, true).$type).prop("roles", defineAnnotatedType("array").of(defineAnnotatedType().designType("string").tags("string").$type).annotate("ui.form.order", 20).annotate("ui.form.type", "select").annotate("ui.form.fn.options", "(_, _data, context) => Array.isArray(context.public?.admin?.availableRoles) ? context.public.admin.availableRoles.map(r => ({ key: r, label: r })) : []").annotate("meta.label", "Roles").$type).annotate("meta.label", "Send an invitation").annotate("meta.description", "Enter the recipient email address and pick the roles to grant on acceptance. They will receive a magic link to set their password.").annotate("wf.context.pass", "public", true);
|
|
313
|
+
defineAnnotatedType("object", Select2faForm).prop("methodName", defineAnnotatedType().designType("string").tags("string").annotate("ui.form.order", 10).annotate("ui.form.type", "radio").annotate("ui.form.fn.options", "(_, _d, ctx) => Array.isArray(ctx.public?.mfa?.enrolledMethods) ? ctx.public.mfa.enrolledMethods.map(m => ({ key: m.methodName, label: m.kind === \"totp\" ? \"TOTP (Authenticator app)\" : m.kind === \"email\" ? \"Email\" : m.kind === \"sms\" ? \"SMS\" : m.kind })) : []").annotate("meta.label", "MFA method").annotate("meta.required", {}).$type).prop("saveAsDefault", defineAnnotatedType().designType("boolean").tags("boolean").annotate("ui.form.type", "checkbox").annotate("meta.label", "Save as default").annotate("meta.default", "false").$type).prop("rememberDevice", defineAnnotatedType().designType("boolean").tags("boolean").annotate("ui.form.type", "checkbox").annotate("meta.label", "Remember this device").annotate("meta.default", "false").annotate("ui.form.fn.hidden", "(_, _d, ctx) => !ctx.public?.trust?.optIn || !!ctx.public?.newPasswordRequired").$type).annotate("meta.label", "Choose a verification method").annotate("meta.description", "Pick how you would like to verify your identity.").annotate("wf.context.pass", "public", true);
|
|
314
|
+
defineAnnotatedType("object", PincodeForm).prop("transportHint", defineAnnotatedType().designType("phantom").tags("paragraph", "ui").annotate("ui.form.fn.value", "(_, _d, ctx) => ctx.public?.mfa?.method === \"totp\" ? \"Enter the current 6-digit code from your authenticator app.\" : ctx.public?.pincode?.sentTo ? \"Code sent to \" + ctx.public.pincode.sentTo + \".\" : \"Enter your verification code.\"").optional().$type).prop("code", defineAnnotatedType().designType("string").tags("string").annotate("ui.form.type", "text").annotate("meta.label", "Verification code").annotate("ui.form.autocomplete", "one-time-code").annotate("ui.form.fn.attr", {
|
|
315
|
+
name: "maxlength",
|
|
316
|
+
fn: "(_, _d, ctx) => ctx.public?.pincode?.codeLength"
|
|
317
|
+
}, 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", {
|
|
318
|
+
id: "resend",
|
|
319
|
+
label: "Resend code"
|
|
320
|
+
}).annotate("ui.form.fn.attr", {
|
|
321
|
+
name: "available-at",
|
|
322
|
+
fn: "(_, _d, ctx) => ctx.public?.pincode?.resendAllowedAt"
|
|
323
|
+
}, true).optional().$type).prop("useDifferentMethod", defineAnnotatedType().designType("phantom").tags("action", "ui").annotate("ui.form.action", {
|
|
324
|
+
id: "useDifferentMethod",
|
|
325
|
+
label: "Use a different method"
|
|
326
|
+
}).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", {
|
|
327
|
+
id: "useDifferentTransport",
|
|
328
|
+
label: "Use a different transport"
|
|
329
|
+
}).annotate("ui.form.fn.hidden", "(_, _d, ctx) => (ctx.public?.otp?.transportCount ?? 0) < 2").optional().$type).annotate("meta.label", "Enter the verification code").annotate("wf.context.pass", "public", true).annotate("ui.form.submit.text", "Verify");
|
|
330
|
+
defineAnnotatedType("object", AskEmailForm).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", {
|
|
331
|
+
name: "pendingConsents",
|
|
332
|
+
fn: "(_, _d, ctx) => ctx.public?.consents?.pending"
|
|
333
|
+
}, 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).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", {
|
|
334
|
+
pattern: "^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$",
|
|
335
|
+
flags: "",
|
|
336
|
+
message: "Invalid email format."
|
|
337
|
+
}, true).$type).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);
|
|
338
|
+
defineAnnotatedType("object", AskPhoneForm).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", {
|
|
339
|
+
name: "pendingConsents",
|
|
340
|
+
fn: "(_, _d, ctx) => ctx.public?.consents?.pending"
|
|
341
|
+
}, 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).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).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);
|
|
342
|
+
defineAnnotatedType("object", EnrollPickMethodForm).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", {
|
|
343
|
+
id: "skip",
|
|
344
|
+
label: "Skip for now"
|
|
345
|
+
}).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", {
|
|
346
|
+
id: "cancel",
|
|
347
|
+
label: "Cancel"
|
|
348
|
+
}).annotate("ui.form.fn.hidden", "(_, _d, ctx) => ctx.public?.mfaEnroll?.mode !== \"manage\"").optional().$type).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");
|
|
349
|
+
defineAnnotatedType("object", EnrollAddressForm).prop("address", defineAnnotatedType().designType("string").tags("string").annotate("ui.form.order", 10).annotate("ui.form.type", "text").annotate("meta.label", "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", {
|
|
350
|
+
id: "skip",
|
|
351
|
+
label: "Skip for now"
|
|
352
|
+
}).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", {
|
|
353
|
+
id: "cancel",
|
|
354
|
+
label: "Cancel"
|
|
355
|
+
}).annotate("ui.form.fn.hidden", "(_, _d, ctx) => ctx.public?.mfaEnroll?.mode !== \"manage\"").optional().$type).prop("useDifferentMethod", defineAnnotatedType().designType("phantom").tags("action", "ui").annotate("ui.form.action", {
|
|
356
|
+
id: "useDifferentMethod",
|
|
357
|
+
label: "Use a different method"
|
|
358
|
+
}).annotate("ui.form.fn.hidden", "(_, _d, ctx) => (ctx.public?.mfaEnroll?.availableTransports?.length ?? 0) < 2 || ctx.public?.mfaEnroll?.mode === \"manage\"").optional().$type).annotate("ui.form.fn.title", "(_, _d, 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");
|
|
359
|
+
defineAnnotatedType("object", EnrollConfirmForm).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", {
|
|
360
|
+
id: "resend",
|
|
361
|
+
label: "Resend code"
|
|
362
|
+
}).annotate("ui.form.fn.attr", {
|
|
363
|
+
name: "available-at",
|
|
364
|
+
fn: "(_, _d, ctx) => ctx.public?.pincode?.resendAllowedAt"
|
|
365
|
+
}, 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", {
|
|
366
|
+
id: "useDifferentMethod",
|
|
367
|
+
label: "Use a different method"
|
|
368
|
+
}).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", {
|
|
369
|
+
id: "cancel",
|
|
370
|
+
label: "Cancel"
|
|
371
|
+
}).annotate("ui.form.fn.hidden", "(_, _d, ctx) => ctx.public?.mfaEnroll?.mode !== \"manage\"").optional().$type).prop("skip", defineAnnotatedType().designType("phantom").tags("action", "ui").annotate("ui.form.action", {
|
|
372
|
+
id: "skip",
|
|
373
|
+
label: "Skip for now"
|
|
374
|
+
}).annotate("ui.form.fn.hidden", "(_, _d, ctx) => ctx.public?.mfaEnroll?.mode !== \"optional\"").optional().$type).annotate("meta.label", "Confirm your verification code").annotate("wf.context.pass", "public", true).annotate("ui.form.submit.text", "Confirm");
|
|
375
|
+
defineAnnotatedType("object", EnrollTotpQrForm).prop("qrCode", defineAnnotatedType().designType("phantom").tags("paragraph", "ui").annotate("ui.form.order", 5).annotate("ui.form.component", "AsQrCode").annotate("ui.form.fn.attr", {
|
|
376
|
+
name: "size",
|
|
377
|
+
fn: "() => 180"
|
|
378
|
+
}, 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", {
|
|
379
|
+
id: "useDifferentMethod",
|
|
380
|
+
label: "Use a different method"
|
|
381
|
+
}).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", {
|
|
382
|
+
id: "cancel",
|
|
383
|
+
label: "Cancel"
|
|
384
|
+
}).annotate("ui.form.fn.hidden", "(_, _d, ctx) => ctx.public?.mfaEnroll?.mode !== \"manage\"").optional().$type).prop("skip", defineAnnotatedType().designType("phantom").tags("action", "ui").annotate("ui.form.action", {
|
|
385
|
+
id: "skip",
|
|
386
|
+
label: "Skip for now"
|
|
387
|
+
}).annotate("ui.form.fn.hidden", "(_, _d, ctx) => ctx.public?.mfaEnroll?.mode !== \"optional\"").optional().$type).annotate("meta.label", "Scan this QR code").annotate("meta.description", "Open your authenticator app and scan the code (or enter the key manually), then continue to enter the code it shows.").annotate("wf.context.pass", "public", true).annotate("ui.form.submit.text", "Continue");
|
|
388
|
+
defineAnnotatedType("object", ManageMfaForm).prop("lockedNote", defineAnnotatedType().designType("phantom").tags("paragraph", "ui").annotate("ui.form.order", 5).annotate("ui.form.fn.value", "(_, _d, ctx) => (ctx.public?.manage?.locked?.length ?? 0) > 0 ? \"Some methods are also used to sign in and can’t be changed here.\" : \"\"").annotate("ui.form.fn.hidden", "(_, _d, ctx) => (ctx.public?.manage?.locked?.length ?? 0) === 0").$type).prop("operation", defineAnnotatedType().designType("string").tags("string").annotate("ui.form.order", 10).annotate("ui.form.type", "radio").annotate("ui.form.fn.options", "(_, _d, ctx) => { const lbl = (t) => t === \"totp\" ? \"authenticator app\" : t === \"sms\" ? \"SMS\" : t === \"email\" ? \"email\" : t; const locked = ctx.public?.manage?.locked ?? []; const out = []; for (const t of (ctx.public?.manage?.candidates ?? [])) out.push({ key: \"add:\" + t, label: \"Add \" + lbl(t) }); for (const m of (ctx.public?.mfa?.enrolledMethods ?? [])) { if (locked.includes(m.kind)) continue; out.push({ key: \"replace:\" + m.kind, label: \"Change \" + lbl(m.kind) + (m.masked ? \" (\" + m.masked + \")\" : \"\") }); out.push({ key: \"remove:\" + m.kind, label: \"Remove \" + lbl(m.kind) }); } return out; }").annotate("meta.label", "What would you like to do?").annotate("meta.required", {}).$type).prop("cancel", defineAnnotatedType().designType("phantom").tags("action", "ui").annotate("ui.form.action", {
|
|
389
|
+
id: "cancel",
|
|
390
|
+
label: "Cancel"
|
|
391
|
+
}).optional().$type).annotate("meta.label", "Manage two-factor authentication").annotate("meta.description", "Add, change, or remove a verification method.").annotate("wf.context.pass", "public", true).annotate("ui.form.submit.text", "Continue");
|
|
392
|
+
defineAnnotatedType("object", RemoveMfaConfirmForm).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", {
|
|
393
|
+
id: "cancel",
|
|
394
|
+
label: "Cancel"
|
|
395
|
+
}).optional().$type).annotate("meta.label", "Remove this method?").annotate("wf.context.pass", "public", true).annotate("ui.form.submit.text", "Remove");
|
|
396
|
+
defineAnnotatedType("object", PasswordReauthForm).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", {
|
|
397
|
+
id: "cancel",
|
|
398
|
+
label: "Cancel"
|
|
399
|
+
}).optional().$type).annotate("meta.label", "Confirm your password").annotate("meta.description", "Re-enter your account password to manage your two-factor methods.").annotate("wf.context.pass", "public", true).annotate("ui.form.submit.text", "Verify");
|
|
400
|
+
defineAnnotatedType("object", TermsBumpForm).prop("consents", defineAnnotatedType("array").of(defineAnnotatedType().designType("string").tags("string").$type).annotate("meta.label", "Pending consents").annotate("ui.form.component", "AsConsentArray").annotate("ui.form.fn.attr", {
|
|
401
|
+
name: "pendingConsents",
|
|
402
|
+
fn: "(_, _d, ctx) => ctx.public?.consents?.pending"
|
|
403
|
+
}, 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).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);
|
|
404
|
+
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");
|
|
405
|
+
defineAnnotatedType("object", MagicLinkRequestForm).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).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.");
|
|
406
|
+
defineAnnotatedType("object", RecoveryModeSelectForm).prop("mode", defineAnnotatedType().designType("string").tags("string").annotate("ui.form.order", 10).annotate("ui.form.type", "radio").annotate("ui.form.options", {
|
|
407
|
+
label: "Magic link",
|
|
408
|
+
value: "magicLink"
|
|
409
|
+
}, true).annotate("ui.form.options", {
|
|
410
|
+
label: "One-time code",
|
|
411
|
+
value: "otp"
|
|
412
|
+
}, true).annotate("meta.label", "Recovery method").annotate("meta.required", {}).$type).annotate("meta.label", "Choose how to verify").annotate("meta.description", "Pick how you would like to recover access.");
|
|
413
|
+
defineAnnotatedType("object", RecoveryFactorForm).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).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);
|
|
414
|
+
defineAnnotatedType("object", ChangePasswordForm).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) => v === data.newPassword || \"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", {
|
|
415
|
+
name: "policies",
|
|
416
|
+
fn: "(_, _d, ctx) => ctx.public?.password?.policies"
|
|
417
|
+
}, true).annotate("ui.form.fn.attr", {
|
|
418
|
+
name: "password",
|
|
419
|
+
fn: "(_, data) => data.newPassword"
|
|
420
|
+
}, true).annotate("ui.form.grid.colSpan", { desktop: "12" }).$type).annotate("ui.form.fn.title", "(_, _d, ctx) => ctx.public?.password?.heading || \"Change your password\"").annotate("ui.form.submit.text", "Change password").annotate("wf.context.pass", "public", true);
|
|
421
|
+
defineAnnotatedType("object", ProveControlForm).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", {
|
|
422
|
+
id: "cancel",
|
|
423
|
+
label: "Cancel"
|
|
424
|
+
}).annotate("ui.form.attr", {
|
|
425
|
+
name: "align",
|
|
426
|
+
value: "center"
|
|
427
|
+
}, true).annotate("ui.form.pushDown", true).optional().$type).annotate("meta.label", "Confirm your identity").annotate("wf.context.pass", "public", true).annotate("ui.form.submit.text", "Verify and link");
|
|
428
|
+
defineAnnotatedType("object", ProveControlOtpForm).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", {
|
|
429
|
+
id: "resend",
|
|
430
|
+
label: "Resend code"
|
|
431
|
+
}).annotate("ui.form.fn.attr", {
|
|
432
|
+
name: "available-at",
|
|
433
|
+
fn: "(_, _d, ctx) => ctx.public?.proveControl?.resendAllowedAt"
|
|
434
|
+
}, true).optional().$type).prop("cancel", defineAnnotatedType().designType("phantom").tags("action", "ui").annotate("ui.form.order", 20).annotate("ui.form.action", {
|
|
435
|
+
id: "cancel",
|
|
436
|
+
label: "Cancel"
|
|
437
|
+
}).annotate("ui.form.attr", {
|
|
438
|
+
name: "align",
|
|
439
|
+
value: "center"
|
|
440
|
+
}, true).annotate("ui.form.pushDown", true).optional().$type).annotate("meta.label", "Confirm your identity").annotate("wf.context.pass", "public", true).annotate("ui.form.submit.text", "Verify and link");
|
|
441
|
+
//#endregion
|
|
442
|
+
export { SetPasswordForm as C, WithInlineConsentForm as E, Select2faForm as S, TermsBumpForm as T, ProveControlForm as _, EmailIdentifierForm as a, RecoveryModeSelectForm as b, EnrollPickMethodForm as c, LoginCredentialsForm as d, MagicLinkRequestForm as f, PincodeForm as g, PasswordReauthForm as h, ConcurrencyLimitForm as i, EnrollTotpQrForm as l, MfaCodeForm as m, AskPhoneForm as n, EnrollAddressForm as o, ManageMfaForm as p, ChangePasswordForm as r, EnrollConfirmForm as s, AskEmailForm as t, InviteForm as u, ProveControlOtpForm as v, SignupForm as w, RemoveMfaConfirmForm as x, RecoveryFactorForm as y };
|