@aooth/auth-moost 0.1.6 → 0.1.8

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.
@@ -1,380 +0,0 @@
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 BackupCodeForm = class {
31
- static __is_atscript_annotated_type = true;
32
- static type = {};
33
- static metadata = /* @__PURE__ */ new Map();
34
- static id = "BackupCodeForm";
35
- static toJsonSchema() {
36
- throwFeatureDisabled("JSON Schema", "jsonSchema", "emit.jsonSchema");
37
- }
38
- };
39
- var EmailIdentifierForm = class {
40
- static __is_atscript_annotated_type = true;
41
- static type = {};
42
- static metadata = /* @__PURE__ */ new Map();
43
- static id = "EmailIdentifierForm";
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 InviteEmailForm = class {
67
- static __is_atscript_annotated_type = true;
68
- static type = {};
69
- static metadata = /* @__PURE__ */ new Map();
70
- static id = "InviteEmailForm";
71
- static toJsonSchema() {
72
- throwFeatureDisabled("JSON Schema", "jsonSchema", "emit.jsonSchema");
73
- }
74
- };
75
- var InviteSendModeForm = class {
76
- static __is_atscript_annotated_type = true;
77
- static type = {};
78
- static metadata = /* @__PURE__ */ new Map();
79
- static id = "InviteSendModeForm";
80
- static toJsonSchema() {
81
- throwFeatureDisabled("JSON Schema", "jsonSchema", "emit.jsonSchema");
82
- }
83
- };
84
- var Select2faForm = class {
85
- static __is_atscript_annotated_type = true;
86
- static type = {};
87
- static metadata = /* @__PURE__ */ new Map();
88
- static id = "Select2faForm";
89
- static toJsonSchema() {
90
- throwFeatureDisabled("JSON Schema", "jsonSchema", "emit.jsonSchema");
91
- }
92
- };
93
- var PincodeForm = class {
94
- static __is_atscript_annotated_type = true;
95
- static type = {};
96
- static metadata = /* @__PURE__ */ new Map();
97
- static id = "PincodeForm";
98
- static toJsonSchema() {
99
- throwFeatureDisabled("JSON Schema", "jsonSchema", "emit.jsonSchema");
100
- }
101
- };
102
- var AskEmailForm = class {
103
- static __is_atscript_annotated_type = true;
104
- static type = {};
105
- static metadata = /* @__PURE__ */ new Map();
106
- static id = "AskEmailForm";
107
- static toJsonSchema() {
108
- throwFeatureDisabled("JSON Schema", "jsonSchema", "emit.jsonSchema");
109
- }
110
- };
111
- var AskPhoneForm = class {
112
- static __is_atscript_annotated_type = true;
113
- static type = {};
114
- static metadata = /* @__PURE__ */ new Map();
115
- static id = "AskPhoneForm";
116
- static toJsonSchema() {
117
- throwFeatureDisabled("JSON Schema", "jsonSchema", "emit.jsonSchema");
118
- }
119
- };
120
- var EnrollPickMethodForm = class {
121
- static __is_atscript_annotated_type = true;
122
- static type = {};
123
- static metadata = /* @__PURE__ */ new Map();
124
- static id = "EnrollPickMethodForm";
125
- static toJsonSchema() {
126
- throwFeatureDisabled("JSON Schema", "jsonSchema", "emit.jsonSchema");
127
- }
128
- };
129
- var EnrollAddressForm = class {
130
- static __is_atscript_annotated_type = true;
131
- static type = {};
132
- static metadata = /* @__PURE__ */ new Map();
133
- static id = "EnrollAddressForm";
134
- static toJsonSchema() {
135
- throwFeatureDisabled("JSON Schema", "jsonSchema", "emit.jsonSchema");
136
- }
137
- };
138
- var EnrollConfirmForm = class {
139
- static __is_atscript_annotated_type = true;
140
- static type = {};
141
- static metadata = /* @__PURE__ */ new Map();
142
- static id = "EnrollConfirmForm";
143
- static toJsonSchema() {
144
- throwFeatureDisabled("JSON Schema", "jsonSchema", "emit.jsonSchema");
145
- }
146
- };
147
- var ProfileCompleteForm = class {
148
- static __is_atscript_annotated_type = true;
149
- static type = {};
150
- static metadata = /* @__PURE__ */ new Map();
151
- static id = "ProfileCompleteForm";
152
- static toJsonSchema() {
153
- throwFeatureDisabled("JSON Schema", "jsonSchema", "emit.jsonSchema");
154
- }
155
- };
156
- var TermsBumpForm = class {
157
- static __is_atscript_annotated_type = true;
158
- static type = {};
159
- static metadata = /* @__PURE__ */ new Map();
160
- static id = "TermsBumpForm";
161
- static toJsonSchema() {
162
- throwFeatureDisabled("JSON Schema", "jsonSchema", "emit.jsonSchema");
163
- }
164
- };
165
- var TenantSelectForm = class {
166
- static __is_atscript_annotated_type = true;
167
- static type = {};
168
- static metadata = /* @__PURE__ */ new Map();
169
- static id = "TenantSelectForm";
170
- static toJsonSchema() {
171
- throwFeatureDisabled("JSON Schema", "jsonSchema", "emit.jsonSchema");
172
- }
173
- };
174
- var PersonaSelectForm = class {
175
- static __is_atscript_annotated_type = true;
176
- static type = {};
177
- static metadata = /* @__PURE__ */ new Map();
178
- static id = "PersonaSelectForm";
179
- static toJsonSchema() {
180
- throwFeatureDisabled("JSON Schema", "jsonSchema", "emit.jsonSchema");
181
- }
182
- };
183
- var ConcurrencyLimitForm = class {
184
- static __is_atscript_annotated_type = true;
185
- static type = {};
186
- static metadata = /* @__PURE__ */ new Map();
187
- static id = "ConcurrencyLimitForm";
188
- static toJsonSchema() {
189
- throwFeatureDisabled("JSON Schema", "jsonSchema", "emit.jsonSchema");
190
- }
191
- };
192
- var MagicLinkRequestForm = class {
193
- static __is_atscript_annotated_type = true;
194
- static type = {};
195
- static metadata = /* @__PURE__ */ new Map();
196
- static id = "MagicLinkRequestForm";
197
- static toJsonSchema() {
198
- throwFeatureDisabled("JSON Schema", "jsonSchema", "emit.jsonSchema");
199
- }
200
- };
201
- var RecoveryModeSelectForm = class {
202
- static __is_atscript_annotated_type = true;
203
- static type = {};
204
- static metadata = /* @__PURE__ */ new Map();
205
- static id = "RecoveryModeSelectForm";
206
- static toJsonSchema() {
207
- throwFeatureDisabled("JSON Schema", "jsonSchema", "emit.jsonSchema");
208
- }
209
- };
210
- var RecoveryFactorForm = class {
211
- static __is_atscript_annotated_type = true;
212
- static type = {};
213
- static metadata = /* @__PURE__ */ new Map();
214
- static id = "RecoveryFactorForm";
215
- static toJsonSchema() {
216
- throwFeatureDisabled("JSON Schema", "jsonSchema", "emit.jsonSchema");
217
- }
218
- };
219
- 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", {
220
- name: "pendingConsents",
221
- fn: "(_, _d, ctx) => ctx.pendingConsents"
222
- }, true).annotate("ui.form.grid.colSpan", { desktop: "12" }).$type).annotate("wf.context.pass", "pendingConsents", true).annotate("wf.context.pass", "consentsPersisted", true);
223
- 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", {
224
- id: "forgotPassword",
225
- label: "Forgot password?"
226
- }).annotate("ui.form.fn.hidden", "(_, _d, ctx) => !ctx.altForgotPassword").annotate("wf.action.withData", "forgotPassword").$type).prop("signup", defineAnnotatedType().designType("phantom").tags("action", "ui").annotate("ui.form.order", 30).annotate("ui.form.action", {
227
- id: "signup",
228
- label: "Sign up"
229
- }).annotate("ui.form.fn.hidden", "(_, _d, ctx) => !ctx.altSignup").optional().$type).prop("magicLink", defineAnnotatedType().designType("phantom").tags("action", "ui").annotate("ui.form.order", 40).annotate("ui.form.action", {
230
- id: "magicLink",
231
- label: "Sign in with a magic link"
232
- }).annotate("ui.form.fn.hidden", "(_, _d, ctx) => !ctx.altMagicLink").optional().$type).annotate("wf.context.pass", "altForgotPassword", true).annotate("wf.context.pass", "altSignup", true).annotate("wf.context.pass", "altMagicLink", true).annotate("ui.form.submit.text", "Sign in");
233
- defineAnnotatedType("object", MfaCodeForm).prop("transportHint", defineAnnotatedType().designType("phantom").tags("paragraph", "ui").annotate("ui.form.fn.value", "(_, _d, ctx) => ctx.mfaMethod === \"totp\" ? \"Enter the current 6-digit code from your authenticator app.\" : ctx.mfaMethod ? \"Code sent to \" + (ctx.pinSentTo || \"your \" + ctx.mfaMethod) + \" — check the dev server console for the code.\" : \"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("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", {
234
- id: "useDifferentMethod",
235
- label: "Use a different method"
236
- }).annotate("ui.form.fn.hidden", "(_, _d, ctx) => (ctx.mfaMethodCount ?? 0) < 2").optional().$type).prop("useBackupCode", defineAnnotatedType().designType("phantom").tags("action", "ui").annotate("ui.form.action", {
237
- id: "useBackupCode",
238
- label: "Use backup code"
239
- }).annotate("ui.form.fn.hidden", "(_, _d, ctx) => !ctx.mfaBackupCodes").optional().$type).annotate("wf.context.pass", "mfaMethod", true).annotate("wf.context.pass", "pinSentTo", true).annotate("wf.context.pass", "mfaMethodCount", true).annotate("wf.context.pass", "mfaBackupCodes", true).annotate("ui.form.submit.text", "Verify");
240
- defineAnnotatedType("object", BackupCodeForm).prop("code", defineAnnotatedType().designType("string").tags("string").annotate("ui.form.type", "text").annotate("meta.label", "Backup code").annotate("ui.form.autocomplete", "one-time-code").annotate("meta.required", {}).annotate("expect.minLength", { length: 4 }).annotate("expect.maxLength", { length: 32 }).annotate("expect.pattern", { pattern: "^[A-Z2-9-]+$" }, true).$type);
241
- defineAnnotatedType("object", EmailIdentifierForm).prop("email", defineAnnotatedType().designType("string").tags("email", "string").annotate("ui.form.type", "text").annotate("meta.label", "Email").annotate("ui.form.autocomplete", "email").annotate("meta.required", {}).annotate("expect.pattern", {
242
- pattern: "^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$",
243
- flags: "",
244
- message: "Invalid email format."
245
- }, true).$type).prop("backToLogin", defineAnnotatedType().designType("phantom").tags("action", "ui").annotate("ui.form.action", {
246
- id: "backToLogin",
247
- label: "Back to sign-in"
248
- }).optional().$type).annotate("wf.context.pass", "defaults", true);
249
- 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", {
250
- name: "pendingConsents",
251
- fn: "(_, _d, ctx) => ctx.pendingConsents"
252
- }, true).annotate("ui.form.grid.colSpan", { desktop: "12" }).$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 }).$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", {
253
- name: "policies",
254
- fn: "(_, _d, ctx) => ctx.passwordPolicies"
255
- }, true).annotate("ui.form.fn.attr", {
256
- name: "password",
257
- fn: "(_, data) => data.newPassword"
258
- }, true).annotate("ui.form.grid.colSpan", { desktop: "12" }).$type).prop("logout", defineAnnotatedType().designType("phantom").tags("action", "ui").annotate("ui.form.order", 30).annotate("ui.form.action", {
259
- id: "logout",
260
- label: "Logout"
261
- }).optional().$type).prop("cancel", defineAnnotatedType().designType("phantom").tags("action", "ui").annotate("ui.form.order", 40).annotate("ui.form.action", {
262
- id: "cancel",
263
- label: "Cancel"
264
- }).optional().$type).prop("backToLogin", defineAnnotatedType().designType("phantom").tags("action", "ui").annotate("ui.form.order", 50).annotate("ui.form.action", {
265
- id: "backToLogin",
266
- label: "Back to sign-in"
267
- }).optional().$type).annotate("wf.context.pass", "passwordPolicies", true).annotate("wf.context.pass", "pendingConsents", true).annotate("wf.context.pass", "consentsPersisted", true);
268
- defineAnnotatedType("object", InviteForm).prop("email", defineAnnotatedType().designType("string").tags("email", "string").annotate("ui.form.type", "text").annotate("meta.label", "Email").annotate("ui.form.autocomplete", "email").annotate("meta.required", {}).annotate("expect.pattern", {
269
- pattern: "^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$",
270
- flags: "",
271
- message: "Invalid email format."
272
- }, true).$type).prop("firstName", defineAnnotatedType().designType("string").tags("string").annotate("ui.form.type", "text").annotate("meta.label", "First name").optional().$type).prop("lastName", defineAnnotatedType().designType("string").tags("string").annotate("ui.form.type", "text").annotate("meta.label", "Last name").optional().$type).prop("roles", defineAnnotatedType("array").of(defineAnnotatedType().designType("string").tags("string").$type).annotate("ui.form.type", "select").annotate("ui.form.fn.options", "(_, _data, context) => Array.isArray(context.availableRoles) ? context.availableRoles.map(r => ({ key: r, label: r })) : []").annotate("meta.label", "Roles").optional().$type).prop("cancel", defineAnnotatedType().designType("phantom").tags("action", "ui").annotate("ui.form.action", {
273
- id: "cancel",
274
- label: "Cancel"
275
- }).optional().$type).annotate("wf.context.pass", "availableRoles", true);
276
- defineAnnotatedType("object", InviteEmailForm).prop("email", defineAnnotatedType().designType("string").tags("email", "string").annotate("ui.form.type", "text").annotate("meta.label", "Email").annotate("ui.form.autocomplete", "email").annotate("meta.required", {}).annotate("expect.pattern", {
277
- pattern: "^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$",
278
- flags: "",
279
- message: "Invalid email format."
280
- }, true).$type).prop("cancel", defineAnnotatedType().designType("phantom").tags("action", "ui").annotate("ui.form.action", {
281
- id: "cancel",
282
- label: "Cancel"
283
- }).optional().$type);
284
- defineAnnotatedType("object", InviteSendModeForm).prop("mode", defineAnnotatedType().designType("string").tags("string").annotate("ui.form.type", "radio").annotate("ui.form.options", {
285
- label: "Email",
286
- value: "email"
287
- }, true).annotate("ui.form.options", {
288
- label: "Shareable link",
289
- value: "shareableLink"
290
- }, true).annotate("meta.label", "Delivery mode").annotate("meta.required", {}).$type).prop("cancel", defineAnnotatedType().designType("phantom").tags("action", "ui").annotate("ui.form.action", {
291
- id: "cancel",
292
- label: "Cancel"
293
- }).optional().$type);
294
- defineAnnotatedType("object", Select2faForm).prop("methodName", defineAnnotatedType().designType("string").tags("string").annotate("ui.form.type", "radio").annotate("ui.form.fn.options", "(_, _d, ctx) => Array.isArray(ctx.mfaEnrolledMethods) ? ctx.mfaEnrolledMethods.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("useBackupCode", defineAnnotatedType().designType("phantom").tags("action", "ui").annotate("ui.form.action", {
295
- id: "useBackupCode",
296
- label: "Use backup code"
297
- }).annotate("ui.form.fn.hidden", "(_, _d, ctx) => !ctx.mfaBackupCodes").optional().$type).annotate("wf.context.pass", "mfaBackupCodes", true).annotate("wf.context.pass", "mfaEnrolledMethods", true);
298
- defineAnnotatedType("object", PincodeForm).prop("transportHint", defineAnnotatedType().designType("phantom").tags("paragraph", "ui").annotate("ui.form.fn.value", "(_, _d, ctx) => ctx.mfaMethod === \"totp\" ? \"Enter the current 6-digit code from your authenticator app.\" : ctx.mfaMethod ? \"Code sent to \" + (ctx.pinSentTo || \"your \" + ctx.mfaMethod) + \" — check the dev server console for the code.\" : \"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("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.deviceTrustOptIn").$type).prop("resend", defineAnnotatedType().designType("phantom").tags("action", "ui").annotate("ui.form.action", {
299
- id: "resend",
300
- label: "Resend code"
301
- }).optional().$type).prop("useDifferentMethod", defineAnnotatedType().designType("phantom").tags("action", "ui").annotate("ui.form.action", {
302
- id: "useDifferentMethod",
303
- label: "Use a different method"
304
- }).annotate("ui.form.fn.hidden", "(_, _d, ctx) => (ctx.mfaMethodCount ?? 0) < 2").optional().$type).prop("useBackupCode", defineAnnotatedType().designType("phantom").tags("action", "ui").annotate("ui.form.action", {
305
- id: "useBackupCode",
306
- label: "Use backup code"
307
- }).annotate("ui.form.fn.hidden", "(_, _d, ctx) => !ctx.mfaBackupCodes").optional().$type).prop("backToLogin", defineAnnotatedType().designType("phantom").tags("action", "ui").annotate("ui.form.action", {
308
- id: "backToLogin",
309
- label: "Back to sign-in"
310
- }).optional().$type).prop("useDifferentTransport", defineAnnotatedType().designType("phantom").tags("action", "ui").annotate("ui.form.action", {
311
- id: "useDifferentTransport",
312
- label: "Use a different transport"
313
- }).annotate("ui.form.fn.hidden", "(_, _d, ctx) => (ctx.recoveryTransportCount ?? 0) < 2").optional().$type).annotate("wf.context.pass", "mfaMethod", true).annotate("wf.context.pass", "pinSentTo", true).annotate("wf.context.pass", "mfaMethodCount", true).annotate("wf.context.pass", "mfaBackupCodes", true).annotate("wf.context.pass", "deviceTrustOptIn", true).annotate("wf.context.pass", "recoveryTransportCount", true).annotate("ui.form.submit.text", "Verify");
314
- 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", {
315
- name: "pendingConsents",
316
- fn: "(_, _d, ctx) => ctx.pendingConsents"
317
- }, true).annotate("ui.form.grid.colSpan", { desktop: "12" }).$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", {
318
- pattern: "^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$",
319
- flags: "",
320
- message: "Invalid email format."
321
- }, true).$type).annotate("wf.context.pass", "pendingConsents", true).annotate("wf.context.pass", "consentsPersisted", true).annotate("wf.context.pass", "otpDisclosure", true);
322
- 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", {
323
- name: "pendingConsents",
324
- fn: "(_, _d, ctx) => ctx.pendingConsents"
325
- }, true).annotate("ui.form.grid.colSpan", { desktop: "12" }).$type).prop("phone", defineAnnotatedType().designType("string").tags("string").annotate("ui.form.order", 10).annotate("ui.form.type", "text").annotate("meta.label", "Phone (E.164)").annotate("ui.form.autocomplete", "tel").annotate("meta.required", {}).$type).annotate("wf.context.pass", "pendingConsents", true).annotate("wf.context.pass", "consentsPersisted", true).annotate("wf.context.pass", "otpDisclosure", true);
326
- defineAnnotatedType("object", EnrollPickMethodForm).prop("method", defineAnnotatedType().designType("string").tags("string").annotate("ui.form.type", "radio").annotate("ui.form.fn.options", "(_, _d, ctx) => Array.isArray(ctx.enrollAvailableTransports) ? ctx.enrollAvailableTransports.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", {
327
- id: "skip",
328
- label: "Skip for now"
329
- }).annotate("ui.form.fn.hidden", "(_, _d, ctx) => ctx.enrollMode !== \"optional\"").optional().$type).annotate("wf.context.pass", "enrollAvailableTransports", true).annotate("wf.context.pass", "enrollMode", true);
330
- defineAnnotatedType("object", EnrollAddressForm).prop("address", defineAnnotatedType().designType("string").tags("string").annotate("ui.form.type", "text").annotate("meta.label", "Address").annotate("meta.required", {}).$type).prop("skip", defineAnnotatedType().designType("phantom").tags("action", "ui").annotate("ui.form.action", {
331
- id: "skip",
332
- label: "Skip for now"
333
- }).annotate("ui.form.fn.hidden", "(_, _d, ctx) => ctx.enrollMode !== \"optional\"").optional().$type).prop("useDifferentMethod", defineAnnotatedType().designType("phantom").tags("action", "ui").annotate("ui.form.action", {
334
- id: "useDifferentMethod",
335
- label: "Use a different method"
336
- }).annotate("ui.form.fn.hidden", "(_, _d, ctx) => (ctx.enrollAvailableTransports?.length ?? 0) < 2").optional().$type).annotate("wf.context.pass", "enrollMethod", true).annotate("wf.context.pass", "enrollMode", true).annotate("wf.context.pass", "enrollAvailableTransports", true);
337
- defineAnnotatedType("object", EnrollConfirmForm).prop("transportHint", defineAnnotatedType().designType("phantom").tags("paragraph", "ui").annotate("ui.form.fn.value", "(_, _d, ctx) => ctx.enrollMethod === \"totp\" ? \"Scan the QR with your authenticator app, or enter the secret manually. Then type the 6-digit code it generates.\" : ctx.enrollMethod ? \"Code sent to \" + (ctx.pinSentTo || \"your \" + ctx.enrollMethod) + \". Enter it below to confirm.\" : \"Enter the code to confirm enrollment.\"").optional().$type).prop("code", defineAnnotatedType().designType("string").tags("string").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", {
338
- id: "resend",
339
- label: "Resend code"
340
- }).annotate("ui.form.fn.hidden", "(_, _d, ctx) => ctx.enrollMethod === \"totp\"").optional().$type).prop("useDifferentMethod", defineAnnotatedType().designType("phantom").tags("action", "ui").annotate("ui.form.action", {
341
- id: "useDifferentMethod",
342
- label: "Use a different method"
343
- }).annotate("ui.form.fn.hidden", "(_, _d, ctx) => (ctx.enrollAvailableTransports?.length ?? 0) < 2").optional().$type).prop("skip", defineAnnotatedType().designType("phantom").tags("action", "ui").annotate("ui.form.action", {
344
- id: "skip",
345
- label: "Skip for now"
346
- }).annotate("ui.form.fn.hidden", "(_, _d, ctx) => ctx.enrollMode !== \"optional\"").optional().$type).annotate("wf.context.pass", "enrollMethod", true).annotate("wf.context.pass", "enrollMode", true).annotate("wf.context.pass", "enrollSecret", true).annotate("wf.context.pass", "enrollUri", true).annotate("wf.context.pass", "enrollAvailableTransports", true).annotate("wf.context.pass", "pinSentTo", true).annotate("ui.form.submit.text", "Confirm");
347
- defineAnnotatedType("object", ProfileCompleteForm).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", {
348
- name: "pendingConsents",
349
- fn: "(_, _d, ctx) => ctx.pendingConsents"
350
- }, true).annotate("ui.form.grid.colSpan", { desktop: "12" }).$type).prop("firstName", defineAnnotatedType().designType("string").tags("string").annotate("ui.form.order", 10).annotate("ui.form.type", "text").annotate("meta.label", "First name").optional().$type).prop("lastName", defineAnnotatedType().designType("string").tags("string").annotate("ui.form.order", 20).annotate("ui.form.type", "text").annotate("meta.label", "Last name").optional().$type).annotate("wf.context.pass", "pendingConsents", true).annotate("wf.context.pass", "consentsPersisted", true);
351
- 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", {
352
- name: "pendingConsents",
353
- fn: "(_, _d, ctx) => ctx.pendingConsents"
354
- }, true).annotate("ui.form.grid.colSpan", { desktop: "12" }).$type).annotate("wf.context.pass", "pendingConsents", true).annotate("wf.context.pass", "consentsPersisted", true);
355
- defineAnnotatedType("object", TenantSelectForm).prop("tenantId", defineAnnotatedType().designType("string").tags("string").annotate("ui.form.type", "radio").annotate("ui.form.fn.options", "(_, _d, ctx) => Array.isArray(ctx.availableTenants) ? ctx.availableTenants.map(t => ({ key: t.id, label: t.name })) : []").annotate("meta.label", "Tenant").annotate("meta.required", {}).$type).annotate("wf.context.pass", "availableTenants", true);
356
- defineAnnotatedType("object", PersonaSelectForm).prop("personaId", defineAnnotatedType().designType("string").tags("string").annotate("ui.form.type", "radio").annotate("ui.form.fn.options", "(_, _d, ctx) => Array.isArray(ctx.availablePersonas) ? ctx.availablePersonas.map(p => ({ key: p.id, label: p.label })) : []").annotate("meta.label", "Persona").annotate("meta.required", {}).$type).annotate("wf.context.pass", "availablePersonas", true);
357
- defineAnnotatedType("object", ConcurrencyLimitForm).prop("action", defineAnnotatedType().designType("string").tags("string").annotate("ui.form.type", "text").annotate("meta.label", "Action").annotate("meta.required", {}).annotate("expect.pattern", { pattern: "^(logoutOthers|cancel)$" }, true).$type).prop("cancel", defineAnnotatedType().designType("phantom").tags("action", "ui").annotate("ui.form.action", {
358
- id: "cancel",
359
- label: "Cancel"
360
- }).optional().$type).prop("logoutOthers", defineAnnotatedType().designType("phantom").tags("action", "ui").annotate("ui.form.action", {
361
- id: "logoutOthers",
362
- label: "Log out other sessions"
363
- }).optional().$type);
364
- defineAnnotatedType("object", MagicLinkRequestForm).prop("identifier", defineAnnotatedType().designType("string").tags("string").annotate("ui.form.type", "text").annotate("meta.label", "Email or username").annotate("ui.form.autocomplete", "username").annotate("meta.required", {}).$type);
365
- defineAnnotatedType("object", RecoveryModeSelectForm).prop("mode", defineAnnotatedType().designType("string").tags("string").annotate("ui.form.type", "radio").annotate("ui.form.options", {
366
- label: "Magic link",
367
- value: "magicLink"
368
- }, true).annotate("ui.form.options", {
369
- label: "One-time code",
370
- value: "otp"
371
- }, true).annotate("meta.label", "Recovery method").annotate("meta.required", {}).$type).prop("backToLogin", defineAnnotatedType().designType("phantom").tags("action", "ui").annotate("ui.form.action", {
372
- id: "backToLogin",
373
- label: "Back to sign-in"
374
- }).optional().$type);
375
- defineAnnotatedType("object", RecoveryFactorForm).prop("factor", defineAnnotatedType().designType("string").tags("string").annotate("ui.form.type", "radio").annotate("ui.form.fn.options", "(_, _d, ctx) => Array.isArray(ctx.availableRecoveryFactors) ? ctx.availableRecoveryFactors : []").annotate("meta.label", "Factor").annotate("meta.required", {}).$type).prop("value", defineAnnotatedType().designType("string").tags("string").annotate("ui.form.type", "text").annotate("meta.label", "Value").annotate("meta.required", {}).annotate("expect.minLength", { length: 4 }).annotate("expect.maxLength", { length: 12 }).$type).prop("backToLogin", defineAnnotatedType().designType("phantom").tags("action", "ui").annotate("ui.form.action", {
376
- id: "backToLogin",
377
- label: "Back to sign-in"
378
- }).optional().$type).annotate("wf.context.pass", "availableRecoveryFactors", true);
379
- //#endregion
380
- export { TermsBumpForm as C, TenantSelectForm as S, ProfileCompleteForm as _, EmailIdentifierForm as a, Select2faForm as b, EnrollPickMethodForm as c, InviteSendModeForm as d, LoginCredentialsForm as f, PincodeForm as g, PersonaSelectForm as h, ConcurrencyLimitForm as i, InviteEmailForm as l, MfaCodeForm as m, AskPhoneForm as n, EnrollAddressForm as o, MagicLinkRequestForm as p, BackupCodeForm as r, EnrollConfirmForm as s, AskEmailForm as t, InviteForm as u, RecoveryFactorForm as v, WithInlineConsentForm as w, SetPasswordForm as x, RecoveryModeSelectForm as y };