@seamless-auth/types 0.30.0 → 0.31.0
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/CHANGELOG.md +12 -0
- package/dist/schemas/auth/auth.schema.d.ts +87 -0
- package/dist/schemas/auth/auth.schema.d.ts.map +1 -1
- package/dist/schemas/authEvent/schema.d.ts +19 -1
- package/dist/schemas/authEvent/schema.d.ts.map +1 -1
- package/dist/schemas/authEvent/schema.js +6 -0
- package/dist/schemas/authEvent/schema.js.map +1 -1
- package/dist/schemas/enrollment/schema.d.ts +58 -0
- package/dist/schemas/enrollment/schema.d.ts.map +1 -1
- package/dist/schemas/messaging/schema.d.ts +45 -0
- package/dist/schemas/messaging/schema.d.ts.map +1 -1
- package/dist/schemas/messaging/schema.js +31 -0
- package/dist/schemas/messaging/schema.js.map +1 -1
- package/dist/schemas/policy/schema.d.ts +33 -33
- package/dist/schemas/recovery/schema.d.ts +29 -0
- package/dist/schemas/recovery/schema.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/schemas/authEvent/schema.ts +6 -0
- package/src/schemas/messaging/schema.ts +37 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @seamless-auth/types
|
|
2
2
|
|
|
3
|
+
## 0.31.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 6c0cea8: External delivery for account notices, and the missing auth event names.
|
|
8
|
+
|
|
9
|
+
- `AuthDeliverySchema` gains `account_notice_email` and `account_notice_sms`, so a server that owns delivery can send the owner notices the auth API sends directly today. Each carries a `notice` name (`AccountNoticeNameSchema`: `account_recovery_opened`, `account_recovery_completed`, `recovery_code_used`, `identity_changed`), ready-to-send `text` (and `subject` for email), and, for a recovery that has opened, `cancelUrl`, which carries a credential and must reach only `to`.
|
|
10
|
+
- `otp_email` and `otp_sms` take an optional `purpose` (`DeliveryPurposeSchema`, currently `account_recovery`), so a server can word a recovery code as a recovery warning. A server that ignores it still delivers the code.
|
|
11
|
+
- `AUTH_EVENT_TYPES` adds `account_recovery_failed`, `admin_last_admin_change_refused`, `break_glass_enrollment`, `magic_link_confirmation_required`, `session_evicted` and `webauthn_registration_challenge`, which the auth API already emits.
|
|
12
|
+
|
|
13
|
+
Breaking for exhaustive handling: code that switches over every `AuthDeliveryInstruction` kind needs cases for the two new kinds.
|
|
14
|
+
|
|
3
15
|
## 0.30.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
|
@@ -72,10 +72,16 @@ export declare const RegistrationSuccessSchema: z.ZodObject<{
|
|
|
72
72
|
kind: z.ZodLiteral<"otp_email">;
|
|
73
73
|
to: z.ZodString;
|
|
74
74
|
token: z.ZodString;
|
|
75
|
+
purpose: z.ZodOptional<z.ZodEnum<{
|
|
76
|
+
account_recovery: "account_recovery";
|
|
77
|
+
}>>;
|
|
75
78
|
}, z.core.$strip>, z.ZodObject<{
|
|
76
79
|
kind: z.ZodLiteral<"otp_sms">;
|
|
77
80
|
to: z.ZodString;
|
|
78
81
|
token: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
|
|
82
|
+
purpose: z.ZodOptional<z.ZodEnum<{
|
|
83
|
+
account_recovery: "account_recovery";
|
|
84
|
+
}>>;
|
|
79
85
|
}, z.core.$strip>, z.ZodObject<{
|
|
80
86
|
kind: z.ZodLiteral<"magic_link_email">;
|
|
81
87
|
to: z.ZodString;
|
|
@@ -85,6 +91,29 @@ export declare const RegistrationSuccessSchema: z.ZodObject<{
|
|
|
85
91
|
kind: z.ZodLiteral<"enrollment_invite_email">;
|
|
86
92
|
to: z.ZodString;
|
|
87
93
|
signInUrl: z.ZodString;
|
|
94
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
95
|
+
kind: z.ZodLiteral<"account_notice_email">;
|
|
96
|
+
notice: z.ZodEnum<{
|
|
97
|
+
account_recovery_completed: "account_recovery_completed";
|
|
98
|
+
recovery_code_used: "recovery_code_used";
|
|
99
|
+
account_recovery_opened: "account_recovery_opened";
|
|
100
|
+
identity_changed: "identity_changed";
|
|
101
|
+
}>;
|
|
102
|
+
to: z.ZodString;
|
|
103
|
+
subject: z.ZodString;
|
|
104
|
+
text: z.ZodString;
|
|
105
|
+
cancelUrl: z.ZodOptional<z.ZodString>;
|
|
106
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
107
|
+
kind: z.ZodLiteral<"account_notice_sms">;
|
|
108
|
+
notice: z.ZodEnum<{
|
|
109
|
+
account_recovery_completed: "account_recovery_completed";
|
|
110
|
+
recovery_code_used: "recovery_code_used";
|
|
111
|
+
account_recovery_opened: "account_recovery_opened";
|
|
112
|
+
identity_changed: "identity_changed";
|
|
113
|
+
}>;
|
|
114
|
+
to: z.ZodString;
|
|
115
|
+
text: z.ZodString;
|
|
116
|
+
cancelUrl: z.ZodOptional<z.ZodString>;
|
|
88
117
|
}, z.core.$strip>], "kind">>;
|
|
89
118
|
}, z.core.$strip>;
|
|
90
119
|
export type RegistrationSuccessResponse = z.infer<typeof RegistrationSuccessSchema>;
|
|
@@ -99,10 +128,16 @@ export declare const RegisterPhoneSuccessSchema: z.ZodObject<{
|
|
|
99
128
|
kind: z.ZodLiteral<"otp_email">;
|
|
100
129
|
to: z.ZodString;
|
|
101
130
|
token: z.ZodString;
|
|
131
|
+
purpose: z.ZodOptional<z.ZodEnum<{
|
|
132
|
+
account_recovery: "account_recovery";
|
|
133
|
+
}>>;
|
|
102
134
|
}, z.core.$strip>, z.ZodObject<{
|
|
103
135
|
kind: z.ZodLiteral<"otp_sms">;
|
|
104
136
|
to: z.ZodString;
|
|
105
137
|
token: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
|
|
138
|
+
purpose: z.ZodOptional<z.ZodEnum<{
|
|
139
|
+
account_recovery: "account_recovery";
|
|
140
|
+
}>>;
|
|
106
141
|
}, z.core.$strip>, z.ZodObject<{
|
|
107
142
|
kind: z.ZodLiteral<"magic_link_email">;
|
|
108
143
|
to: z.ZodString;
|
|
@@ -112,6 +147,29 @@ export declare const RegisterPhoneSuccessSchema: z.ZodObject<{
|
|
|
112
147
|
kind: z.ZodLiteral<"enrollment_invite_email">;
|
|
113
148
|
to: z.ZodString;
|
|
114
149
|
signInUrl: z.ZodString;
|
|
150
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
151
|
+
kind: z.ZodLiteral<"account_notice_email">;
|
|
152
|
+
notice: z.ZodEnum<{
|
|
153
|
+
account_recovery_completed: "account_recovery_completed";
|
|
154
|
+
recovery_code_used: "recovery_code_used";
|
|
155
|
+
account_recovery_opened: "account_recovery_opened";
|
|
156
|
+
identity_changed: "identity_changed";
|
|
157
|
+
}>;
|
|
158
|
+
to: z.ZodString;
|
|
159
|
+
subject: z.ZodString;
|
|
160
|
+
text: z.ZodString;
|
|
161
|
+
cancelUrl: z.ZodOptional<z.ZodString>;
|
|
162
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
163
|
+
kind: z.ZodLiteral<"account_notice_sms">;
|
|
164
|
+
notice: z.ZodEnum<{
|
|
165
|
+
account_recovery_completed: "account_recovery_completed";
|
|
166
|
+
recovery_code_used: "recovery_code_used";
|
|
167
|
+
account_recovery_opened: "account_recovery_opened";
|
|
168
|
+
identity_changed: "identity_changed";
|
|
169
|
+
}>;
|
|
170
|
+
to: z.ZodString;
|
|
171
|
+
text: z.ZodString;
|
|
172
|
+
cancelUrl: z.ZodOptional<z.ZodString>;
|
|
115
173
|
}, z.core.$strip>], "kind">>;
|
|
116
174
|
}, z.core.$strip>;
|
|
117
175
|
export type RegisterPhoneSuccess = z.infer<typeof RegisterPhoneSuccessSchema>;
|
|
@@ -173,10 +231,16 @@ export declare const AuthMessageResponseSchema: z.ZodObject<{
|
|
|
173
231
|
kind: z.ZodLiteral<"otp_email">;
|
|
174
232
|
to: z.ZodString;
|
|
175
233
|
token: z.ZodString;
|
|
234
|
+
purpose: z.ZodOptional<z.ZodEnum<{
|
|
235
|
+
account_recovery: "account_recovery";
|
|
236
|
+
}>>;
|
|
176
237
|
}, z.core.$strip>, z.ZodObject<{
|
|
177
238
|
kind: z.ZodLiteral<"otp_sms">;
|
|
178
239
|
to: z.ZodString;
|
|
179
240
|
token: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
|
|
241
|
+
purpose: z.ZodOptional<z.ZodEnum<{
|
|
242
|
+
account_recovery: "account_recovery";
|
|
243
|
+
}>>;
|
|
180
244
|
}, z.core.$strip>, z.ZodObject<{
|
|
181
245
|
kind: z.ZodLiteral<"magic_link_email">;
|
|
182
246
|
to: z.ZodString;
|
|
@@ -186,6 +250,29 @@ export declare const AuthMessageResponseSchema: z.ZodObject<{
|
|
|
186
250
|
kind: z.ZodLiteral<"enrollment_invite_email">;
|
|
187
251
|
to: z.ZodString;
|
|
188
252
|
signInUrl: z.ZodString;
|
|
253
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
254
|
+
kind: z.ZodLiteral<"account_notice_email">;
|
|
255
|
+
notice: z.ZodEnum<{
|
|
256
|
+
account_recovery_completed: "account_recovery_completed";
|
|
257
|
+
recovery_code_used: "recovery_code_used";
|
|
258
|
+
account_recovery_opened: "account_recovery_opened";
|
|
259
|
+
identity_changed: "identity_changed";
|
|
260
|
+
}>;
|
|
261
|
+
to: z.ZodString;
|
|
262
|
+
subject: z.ZodString;
|
|
263
|
+
text: z.ZodString;
|
|
264
|
+
cancelUrl: z.ZodOptional<z.ZodString>;
|
|
265
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
266
|
+
kind: z.ZodLiteral<"account_notice_sms">;
|
|
267
|
+
notice: z.ZodEnum<{
|
|
268
|
+
account_recovery_completed: "account_recovery_completed";
|
|
269
|
+
recovery_code_used: "recovery_code_used";
|
|
270
|
+
account_recovery_opened: "account_recovery_opened";
|
|
271
|
+
identity_changed: "identity_changed";
|
|
272
|
+
}>;
|
|
273
|
+
to: z.ZodString;
|
|
274
|
+
text: z.ZodString;
|
|
275
|
+
cancelUrl: z.ZodOptional<z.ZodString>;
|
|
189
276
|
}, z.core.$strip>], "kind">>;
|
|
190
277
|
}, z.core.$strip>;
|
|
191
278
|
export type AuthMessageResponse = z.infer<typeof AuthMessageResponseSchema>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.schema.d.ts","sourceRoot":"","sources":["../../../src/schemas/auth/auth.schema.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAIpB,eAAO,MAAM,oBAAoB;;;EAA6B,CAAC;AAE/D,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE,eAAO,MAAM,kBAAkB;;;iBAG7B,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9D,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;iBAOrC,CAAC;AAEH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE9E,eAAO,MAAM,yBAAyB,gCAAe,CAAC;AAEtD,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE5E,yDAAyD;AACzD,eAAO,MAAM,oBAAoB,gCAA4B,CAAC;AAE9D,mDAAmD;AACnD,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE;;;;GAIG;AACH,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;iBAcvC,CAAC;AAEH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAElF,eAAO,MAAM,iBAAiB;;;EAA8C,CAAC;AAE7E,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE5D,eAAO,MAAM,yBAAyB;;;iBAIpC,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0BAA0B,CAAC,CAAC;AAE9E,kFAAkF;AAClF,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAIpC,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE5E,gFAAgF;AAChF,eAAO,MAAM,sBAAsB;;;;;;;;iBAQjC,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import z from 'zod';
|
|
2
|
-
export declare const AUTH_EVENT_TYPES: readonly ["account_recovery_cancelled", "account_recovery_completed", "account_recovery_started", "account_recovery_verified", "admin_device_replacement_recovery", "admin_enrollment_invite_sent", "admin_oauth_provider_restored", "admin_oauth_provider_retired", "admin_session_revoked", "admin_user_import_completed", "admin_user_imported", "auth_action_incremented", "bearer_token_failed", "bearer_token_success", "bearer_token_suspicious", "break_glass_sign_in", "credentials_deleted", "informational", "internal_user_updated_by_owner", "jwks_failed", "jwks_success", "jwks_suspicious", "login_challenge", "login_failed", "login_success", "login_suspicious", "logout_failed", "logout_success", "logout_suspicious", "magic_link_failed", "magic_link_poll_completed_successfully", "magic_link_requested", "magic_link_success", "mfa_otp_failed", "mfa_otp_success", "mfa_otp_suspicious", "notification_sent", "oauth_login_failed", "oauth_login_started", "oauth_login_success", "otp_failed", "otp_success", "otp_suspicious", "policy_draft_discarded", "policy_draft_saved", "policy_dry_run", "policy_published", "policy_rolled_back", "recovery_code_failed", "recovery_code_used", "recovery_codes_generated", "recovery_otp_failed", "recovery_otp_success", "recovery_otp_suspicious", "refresh_token_failed", "refresh_token_success", "refresh_token_suspicious", "registration_failed", "registration_success", "registration_suspicious", "request_suspicious", "service_token_failed", "service_token_rotated", "service_token_success", "service_token_suspicious", "step_up_challenge", "step_up_failed", "step_up_success", "step_up_suspicious", "system_config_error", "system_config_read", "system_config_updated", "totp_disabled", "totp_enrollment_started", "totp_enrollment_success", "totp_failed", "totp_success", "totp_suspicious", "user_created", "user_data_failed", "user_data_success", "user_data_suspicious", "user_deleted", "verify_otp_failed", "verify_otp_success", "verify_otp_suspicious", "webauthn_login_failed", "webauthn_login_success", "webauthn_login_suspicious", "webauthn_registration_failed", "webauthn_registration_success", "webauthn_registration_suspicious"];
|
|
2
|
+
export declare const AUTH_EVENT_TYPES: readonly ["account_recovery_cancelled", "account_recovery_completed", "account_recovery_failed", "account_recovery_started", "account_recovery_verified", "admin_device_replacement_recovery", "admin_enrollment_invite_sent", "admin_last_admin_change_refused", "admin_oauth_provider_restored", "admin_oauth_provider_retired", "admin_session_revoked", "admin_user_import_completed", "admin_user_imported", "auth_action_incremented", "bearer_token_failed", "bearer_token_success", "bearer_token_suspicious", "break_glass_enrollment", "break_glass_sign_in", "credentials_deleted", "informational", "internal_user_updated_by_owner", "jwks_failed", "jwks_success", "jwks_suspicious", "login_challenge", "login_failed", "login_success", "login_suspicious", "logout_failed", "logout_success", "logout_suspicious", "magic_link_confirmation_required", "magic_link_failed", "magic_link_poll_completed_successfully", "magic_link_requested", "magic_link_success", "mfa_otp_failed", "mfa_otp_success", "mfa_otp_suspicious", "notification_sent", "oauth_login_failed", "oauth_login_started", "oauth_login_success", "otp_failed", "otp_success", "otp_suspicious", "policy_draft_discarded", "policy_draft_saved", "policy_dry_run", "policy_published", "policy_rolled_back", "recovery_code_failed", "recovery_code_used", "recovery_codes_generated", "recovery_otp_failed", "recovery_otp_success", "recovery_otp_suspicious", "refresh_token_failed", "refresh_token_success", "refresh_token_suspicious", "registration_failed", "registration_success", "registration_suspicious", "request_suspicious", "service_token_failed", "service_token_rotated", "service_token_success", "service_token_suspicious", "session_evicted", "step_up_challenge", "step_up_failed", "step_up_success", "step_up_suspicious", "system_config_error", "system_config_read", "system_config_updated", "totp_disabled", "totp_enrollment_started", "totp_enrollment_success", "totp_failed", "totp_success", "totp_suspicious", "user_created", "user_data_failed", "user_data_success", "user_data_suspicious", "user_deleted", "verify_otp_failed", "verify_otp_success", "verify_otp_suspicious", "webauthn_login_failed", "webauthn_login_success", "webauthn_login_suspicious", "webauthn_registration_challenge", "webauthn_registration_failed", "webauthn_registration_success", "webauthn_registration_suspicious"];
|
|
3
3
|
export declare const AuthEventTypeEnum: z.ZodEnum<{
|
|
4
4
|
account_recovery_cancelled: "account_recovery_cancelled";
|
|
5
5
|
account_recovery_completed: "account_recovery_completed";
|
|
6
|
+
account_recovery_failed: "account_recovery_failed";
|
|
6
7
|
account_recovery_started: "account_recovery_started";
|
|
7
8
|
account_recovery_verified: "account_recovery_verified";
|
|
8
9
|
admin_device_replacement_recovery: "admin_device_replacement_recovery";
|
|
9
10
|
admin_enrollment_invite_sent: "admin_enrollment_invite_sent";
|
|
11
|
+
admin_last_admin_change_refused: "admin_last_admin_change_refused";
|
|
10
12
|
admin_oauth_provider_restored: "admin_oauth_provider_restored";
|
|
11
13
|
admin_oauth_provider_retired: "admin_oauth_provider_retired";
|
|
12
14
|
admin_session_revoked: "admin_session_revoked";
|
|
@@ -16,6 +18,7 @@ export declare const AuthEventTypeEnum: z.ZodEnum<{
|
|
|
16
18
|
bearer_token_failed: "bearer_token_failed";
|
|
17
19
|
bearer_token_success: "bearer_token_success";
|
|
18
20
|
bearer_token_suspicious: "bearer_token_suspicious";
|
|
21
|
+
break_glass_enrollment: "break_glass_enrollment";
|
|
19
22
|
break_glass_sign_in: "break_glass_sign_in";
|
|
20
23
|
credentials_deleted: "credentials_deleted";
|
|
21
24
|
informational: "informational";
|
|
@@ -30,6 +33,7 @@ export declare const AuthEventTypeEnum: z.ZodEnum<{
|
|
|
30
33
|
logout_failed: "logout_failed";
|
|
31
34
|
logout_success: "logout_success";
|
|
32
35
|
logout_suspicious: "logout_suspicious";
|
|
36
|
+
magic_link_confirmation_required: "magic_link_confirmation_required";
|
|
33
37
|
magic_link_failed: "magic_link_failed";
|
|
34
38
|
magic_link_poll_completed_successfully: "magic_link_poll_completed_successfully";
|
|
35
39
|
magic_link_requested: "magic_link_requested";
|
|
@@ -66,6 +70,7 @@ export declare const AuthEventTypeEnum: z.ZodEnum<{
|
|
|
66
70
|
service_token_rotated: "service_token_rotated";
|
|
67
71
|
service_token_success: "service_token_success";
|
|
68
72
|
service_token_suspicious: "service_token_suspicious";
|
|
73
|
+
session_evicted: "session_evicted";
|
|
69
74
|
step_up_challenge: "step_up_challenge";
|
|
70
75
|
step_up_failed: "step_up_failed";
|
|
71
76
|
step_up_success: "step_up_success";
|
|
@@ -90,6 +95,7 @@ export declare const AuthEventTypeEnum: z.ZodEnum<{
|
|
|
90
95
|
webauthn_login_failed: "webauthn_login_failed";
|
|
91
96
|
webauthn_login_success: "webauthn_login_success";
|
|
92
97
|
webauthn_login_suspicious: "webauthn_login_suspicious";
|
|
98
|
+
webauthn_registration_challenge: "webauthn_registration_challenge";
|
|
93
99
|
webauthn_registration_failed: "webauthn_registration_failed";
|
|
94
100
|
webauthn_registration_success: "webauthn_registration_success";
|
|
95
101
|
webauthn_registration_suspicious: "webauthn_registration_suspicious";
|
|
@@ -122,10 +128,12 @@ export declare const AuthEventQuerySchema: z.ZodObject<{
|
|
|
122
128
|
type: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
123
129
|
account_recovery_cancelled: "account_recovery_cancelled";
|
|
124
130
|
account_recovery_completed: "account_recovery_completed";
|
|
131
|
+
account_recovery_failed: "account_recovery_failed";
|
|
125
132
|
account_recovery_started: "account_recovery_started";
|
|
126
133
|
account_recovery_verified: "account_recovery_verified";
|
|
127
134
|
admin_device_replacement_recovery: "admin_device_replacement_recovery";
|
|
128
135
|
admin_enrollment_invite_sent: "admin_enrollment_invite_sent";
|
|
136
|
+
admin_last_admin_change_refused: "admin_last_admin_change_refused";
|
|
129
137
|
admin_oauth_provider_restored: "admin_oauth_provider_restored";
|
|
130
138
|
admin_oauth_provider_retired: "admin_oauth_provider_retired";
|
|
131
139
|
admin_session_revoked: "admin_session_revoked";
|
|
@@ -135,6 +143,7 @@ export declare const AuthEventQuerySchema: z.ZodObject<{
|
|
|
135
143
|
bearer_token_failed: "bearer_token_failed";
|
|
136
144
|
bearer_token_success: "bearer_token_success";
|
|
137
145
|
bearer_token_suspicious: "bearer_token_suspicious";
|
|
146
|
+
break_glass_enrollment: "break_glass_enrollment";
|
|
138
147
|
break_glass_sign_in: "break_glass_sign_in";
|
|
139
148
|
credentials_deleted: "credentials_deleted";
|
|
140
149
|
informational: "informational";
|
|
@@ -149,6 +158,7 @@ export declare const AuthEventQuerySchema: z.ZodObject<{
|
|
|
149
158
|
logout_failed: "logout_failed";
|
|
150
159
|
logout_success: "logout_success";
|
|
151
160
|
logout_suspicious: "logout_suspicious";
|
|
161
|
+
magic_link_confirmation_required: "magic_link_confirmation_required";
|
|
152
162
|
magic_link_failed: "magic_link_failed";
|
|
153
163
|
magic_link_poll_completed_successfully: "magic_link_poll_completed_successfully";
|
|
154
164
|
magic_link_requested: "magic_link_requested";
|
|
@@ -185,6 +195,7 @@ export declare const AuthEventQuerySchema: z.ZodObject<{
|
|
|
185
195
|
service_token_rotated: "service_token_rotated";
|
|
186
196
|
service_token_success: "service_token_success";
|
|
187
197
|
service_token_suspicious: "service_token_suspicious";
|
|
198
|
+
session_evicted: "session_evicted";
|
|
188
199
|
step_up_challenge: "step_up_challenge";
|
|
189
200
|
step_up_failed: "step_up_failed";
|
|
190
201
|
step_up_success: "step_up_success";
|
|
@@ -209,16 +220,19 @@ export declare const AuthEventQuerySchema: z.ZodObject<{
|
|
|
209
220
|
webauthn_login_failed: "webauthn_login_failed";
|
|
210
221
|
webauthn_login_success: "webauthn_login_success";
|
|
211
222
|
webauthn_login_suspicious: "webauthn_login_suspicious";
|
|
223
|
+
webauthn_registration_challenge: "webauthn_registration_challenge";
|
|
212
224
|
webauthn_registration_failed: "webauthn_registration_failed";
|
|
213
225
|
webauthn_registration_success: "webauthn_registration_success";
|
|
214
226
|
webauthn_registration_suspicious: "webauthn_registration_suspicious";
|
|
215
227
|
}>, z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodEnum<{
|
|
216
228
|
account_recovery_cancelled: "account_recovery_cancelled";
|
|
217
229
|
account_recovery_completed: "account_recovery_completed";
|
|
230
|
+
account_recovery_failed: "account_recovery_failed";
|
|
218
231
|
account_recovery_started: "account_recovery_started";
|
|
219
232
|
account_recovery_verified: "account_recovery_verified";
|
|
220
233
|
admin_device_replacement_recovery: "admin_device_replacement_recovery";
|
|
221
234
|
admin_enrollment_invite_sent: "admin_enrollment_invite_sent";
|
|
235
|
+
admin_last_admin_change_refused: "admin_last_admin_change_refused";
|
|
222
236
|
admin_oauth_provider_restored: "admin_oauth_provider_restored";
|
|
223
237
|
admin_oauth_provider_retired: "admin_oauth_provider_retired";
|
|
224
238
|
admin_session_revoked: "admin_session_revoked";
|
|
@@ -228,6 +242,7 @@ export declare const AuthEventQuerySchema: z.ZodObject<{
|
|
|
228
242
|
bearer_token_failed: "bearer_token_failed";
|
|
229
243
|
bearer_token_success: "bearer_token_success";
|
|
230
244
|
bearer_token_suspicious: "bearer_token_suspicious";
|
|
245
|
+
break_glass_enrollment: "break_glass_enrollment";
|
|
231
246
|
break_glass_sign_in: "break_glass_sign_in";
|
|
232
247
|
credentials_deleted: "credentials_deleted";
|
|
233
248
|
informational: "informational";
|
|
@@ -242,6 +257,7 @@ export declare const AuthEventQuerySchema: z.ZodObject<{
|
|
|
242
257
|
logout_failed: "logout_failed";
|
|
243
258
|
logout_success: "logout_success";
|
|
244
259
|
logout_suspicious: "logout_suspicious";
|
|
260
|
+
magic_link_confirmation_required: "magic_link_confirmation_required";
|
|
245
261
|
magic_link_failed: "magic_link_failed";
|
|
246
262
|
magic_link_poll_completed_successfully: "magic_link_poll_completed_successfully";
|
|
247
263
|
magic_link_requested: "magic_link_requested";
|
|
@@ -278,6 +294,7 @@ export declare const AuthEventQuerySchema: z.ZodObject<{
|
|
|
278
294
|
service_token_rotated: "service_token_rotated";
|
|
279
295
|
service_token_success: "service_token_success";
|
|
280
296
|
service_token_suspicious: "service_token_suspicious";
|
|
297
|
+
session_evicted: "session_evicted";
|
|
281
298
|
step_up_challenge: "step_up_challenge";
|
|
282
299
|
step_up_failed: "step_up_failed";
|
|
283
300
|
step_up_success: "step_up_success";
|
|
@@ -302,6 +319,7 @@ export declare const AuthEventQuerySchema: z.ZodObject<{
|
|
|
302
319
|
webauthn_login_failed: "webauthn_login_failed";
|
|
303
320
|
webauthn_login_success: "webauthn_login_success";
|
|
304
321
|
webauthn_login_suspicious: "webauthn_login_suspicious";
|
|
322
|
+
webauthn_registration_challenge: "webauthn_registration_challenge";
|
|
305
323
|
webauthn_registration_failed: "webauthn_registration_failed";
|
|
306
324
|
webauthn_registration_success: "webauthn_registration_success";
|
|
307
325
|
webauthn_registration_suspicious: "webauthn_registration_suspicious";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/schemas/authEvent/schema.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAGpB,eAAO,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/schemas/authEvent/schema.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAGpB,eAAO,MAAM,gBAAgB,2yEAmGnB,CAAC;AAEX,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAA2B,CAAC;AAE1D,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAI9D,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;iBAsD1B,CAAC;AAEH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAExD,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAe/B,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;iBAGnC,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC"}
|
|
@@ -3,10 +3,12 @@ import { IsoDate } from '../../shared.js';
|
|
|
3
3
|
export const AUTH_EVENT_TYPES = [
|
|
4
4
|
'account_recovery_cancelled',
|
|
5
5
|
'account_recovery_completed',
|
|
6
|
+
'account_recovery_failed',
|
|
6
7
|
'account_recovery_started',
|
|
7
8
|
'account_recovery_verified',
|
|
8
9
|
'admin_device_replacement_recovery',
|
|
9
10
|
'admin_enrollment_invite_sent',
|
|
11
|
+
'admin_last_admin_change_refused',
|
|
10
12
|
'admin_oauth_provider_restored',
|
|
11
13
|
'admin_oauth_provider_retired',
|
|
12
14
|
'admin_session_revoked',
|
|
@@ -16,6 +18,7 @@ export const AUTH_EVENT_TYPES = [
|
|
|
16
18
|
'bearer_token_failed',
|
|
17
19
|
'bearer_token_success',
|
|
18
20
|
'bearer_token_suspicious',
|
|
21
|
+
'break_glass_enrollment',
|
|
19
22
|
'break_glass_sign_in',
|
|
20
23
|
'credentials_deleted',
|
|
21
24
|
'informational',
|
|
@@ -30,6 +33,7 @@ export const AUTH_EVENT_TYPES = [
|
|
|
30
33
|
'logout_failed',
|
|
31
34
|
'logout_success',
|
|
32
35
|
'logout_suspicious',
|
|
36
|
+
'magic_link_confirmation_required',
|
|
33
37
|
'magic_link_failed',
|
|
34
38
|
'magic_link_poll_completed_successfully',
|
|
35
39
|
'magic_link_requested',
|
|
@@ -66,6 +70,7 @@ export const AUTH_EVENT_TYPES = [
|
|
|
66
70
|
'service_token_rotated',
|
|
67
71
|
'service_token_success',
|
|
68
72
|
'service_token_suspicious',
|
|
73
|
+
'session_evicted',
|
|
69
74
|
'step_up_challenge',
|
|
70
75
|
'step_up_failed',
|
|
71
76
|
'step_up_success',
|
|
@@ -90,6 +95,7 @@ export const AUTH_EVENT_TYPES = [
|
|
|
90
95
|
'webauthn_login_failed',
|
|
91
96
|
'webauthn_login_success',
|
|
92
97
|
'webauthn_login_suspicious',
|
|
98
|
+
'webauthn_registration_challenge',
|
|
93
99
|
'webauthn_registration_failed',
|
|
94
100
|
'webauthn_registration_success',
|
|
95
101
|
'webauthn_registration_suspicious',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../src/schemas/authEvent/schema.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AACpB,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAE1C,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,4BAA4B;IAC5B,4BAA4B;IAC5B,0BAA0B;IAC1B,2BAA2B;IAC3B,mCAAmC;IACnC,8BAA8B;IAC9B,+BAA+B;IAC/B,8BAA8B;IAC9B,uBAAuB;IACvB,6BAA6B;IAC7B,qBAAqB;IACrB,yBAAyB;IACzB,qBAAqB;IACrB,sBAAsB;IACtB,yBAAyB;IACzB,qBAAqB;IACrB,qBAAqB;IACrB,eAAe;IACf,gCAAgC;IAChC,aAAa;IACb,cAAc;IACd,iBAAiB;IACjB,iBAAiB;IACjB,cAAc;IACd,eAAe;IACf,kBAAkB;IAClB,eAAe;IACf,gBAAgB;IA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AAC;IAChC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;CAClB,CAAC,CAAC"}
|
|
@@ -115,10 +115,16 @@ export declare const EnrollmentInviteResultSchema: z.ZodObject<{
|
|
|
115
115
|
kind: z.ZodLiteral<"otp_email">;
|
|
116
116
|
to: z.ZodString;
|
|
117
117
|
token: z.ZodString;
|
|
118
|
+
purpose: z.ZodOptional<z.ZodEnum<{
|
|
119
|
+
account_recovery: "account_recovery";
|
|
120
|
+
}>>;
|
|
118
121
|
}, z.core.$strip>, z.ZodObject<{
|
|
119
122
|
kind: z.ZodLiteral<"otp_sms">;
|
|
120
123
|
to: z.ZodString;
|
|
121
124
|
token: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
|
|
125
|
+
purpose: z.ZodOptional<z.ZodEnum<{
|
|
126
|
+
account_recovery: "account_recovery";
|
|
127
|
+
}>>;
|
|
122
128
|
}, z.core.$strip>, z.ZodObject<{
|
|
123
129
|
kind: z.ZodLiteral<"magic_link_email">;
|
|
124
130
|
to: z.ZodString;
|
|
@@ -128,6 +134,29 @@ export declare const EnrollmentInviteResultSchema: z.ZodObject<{
|
|
|
128
134
|
kind: z.ZodLiteral<"enrollment_invite_email">;
|
|
129
135
|
to: z.ZodString;
|
|
130
136
|
signInUrl: z.ZodString;
|
|
137
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
138
|
+
kind: z.ZodLiteral<"account_notice_email">;
|
|
139
|
+
notice: z.ZodEnum<{
|
|
140
|
+
account_recovery_completed: "account_recovery_completed";
|
|
141
|
+
recovery_code_used: "recovery_code_used";
|
|
142
|
+
account_recovery_opened: "account_recovery_opened";
|
|
143
|
+
identity_changed: "identity_changed";
|
|
144
|
+
}>;
|
|
145
|
+
to: z.ZodString;
|
|
146
|
+
subject: z.ZodString;
|
|
147
|
+
text: z.ZodString;
|
|
148
|
+
cancelUrl: z.ZodOptional<z.ZodString>;
|
|
149
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
150
|
+
kind: z.ZodLiteral<"account_notice_sms">;
|
|
151
|
+
notice: z.ZodEnum<{
|
|
152
|
+
account_recovery_completed: "account_recovery_completed";
|
|
153
|
+
recovery_code_used: "recovery_code_used";
|
|
154
|
+
account_recovery_opened: "account_recovery_opened";
|
|
155
|
+
identity_changed: "identity_changed";
|
|
156
|
+
}>;
|
|
157
|
+
to: z.ZodString;
|
|
158
|
+
text: z.ZodString;
|
|
159
|
+
cancelUrl: z.ZodOptional<z.ZodString>;
|
|
131
160
|
}, z.core.$strip>], "kind">>;
|
|
132
161
|
}, z.core.$strip>;
|
|
133
162
|
export type EnrollmentInviteResult = z.infer<typeof EnrollmentInviteResultSchema>;
|
|
@@ -151,10 +180,16 @@ export declare const EnrollmentInviteResponseSchema: z.ZodObject<{
|
|
|
151
180
|
kind: z.ZodLiteral<"otp_email">;
|
|
152
181
|
to: z.ZodString;
|
|
153
182
|
token: z.ZodString;
|
|
183
|
+
purpose: z.ZodOptional<z.ZodEnum<{
|
|
184
|
+
account_recovery: "account_recovery";
|
|
185
|
+
}>>;
|
|
154
186
|
}, z.core.$strip>, z.ZodObject<{
|
|
155
187
|
kind: z.ZodLiteral<"otp_sms">;
|
|
156
188
|
to: z.ZodString;
|
|
157
189
|
token: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
|
|
190
|
+
purpose: z.ZodOptional<z.ZodEnum<{
|
|
191
|
+
account_recovery: "account_recovery";
|
|
192
|
+
}>>;
|
|
158
193
|
}, z.core.$strip>, z.ZodObject<{
|
|
159
194
|
kind: z.ZodLiteral<"magic_link_email">;
|
|
160
195
|
to: z.ZodString;
|
|
@@ -164,6 +199,29 @@ export declare const EnrollmentInviteResponseSchema: z.ZodObject<{
|
|
|
164
199
|
kind: z.ZodLiteral<"enrollment_invite_email">;
|
|
165
200
|
to: z.ZodString;
|
|
166
201
|
signInUrl: z.ZodString;
|
|
202
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
203
|
+
kind: z.ZodLiteral<"account_notice_email">;
|
|
204
|
+
notice: z.ZodEnum<{
|
|
205
|
+
account_recovery_completed: "account_recovery_completed";
|
|
206
|
+
recovery_code_used: "recovery_code_used";
|
|
207
|
+
account_recovery_opened: "account_recovery_opened";
|
|
208
|
+
identity_changed: "identity_changed";
|
|
209
|
+
}>;
|
|
210
|
+
to: z.ZodString;
|
|
211
|
+
subject: z.ZodString;
|
|
212
|
+
text: z.ZodString;
|
|
213
|
+
cancelUrl: z.ZodOptional<z.ZodString>;
|
|
214
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
215
|
+
kind: z.ZodLiteral<"account_notice_sms">;
|
|
216
|
+
notice: z.ZodEnum<{
|
|
217
|
+
account_recovery_completed: "account_recovery_completed";
|
|
218
|
+
recovery_code_used: "recovery_code_used";
|
|
219
|
+
account_recovery_opened: "account_recovery_opened";
|
|
220
|
+
identity_changed: "identity_changed";
|
|
221
|
+
}>;
|
|
222
|
+
to: z.ZodString;
|
|
223
|
+
text: z.ZodString;
|
|
224
|
+
cancelUrl: z.ZodOptional<z.ZodString>;
|
|
167
225
|
}, z.core.$strip>], "kind">>;
|
|
168
226
|
}, z.core.$strip>>;
|
|
169
227
|
}, z.core.$strip>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/schemas/enrollment/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB;;;;GAIG;AACH,eAAO,MAAM,sBAAsB;;;;EAAyC,CAAC;AAE7E,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAStE,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;iBAMrC,CAAC;AAEH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE9E,eAAO,MAAM,uBAAuB;;;;;iBAKlC,CAAC;AAEH,MAAM,MAAM,iB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BAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE,eAAO,MAAM,oBAAoB;;;;;;;;;;;;iBAQ/B,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE;;;GAGG;AACH,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;iBAIxC,CAAC;AAEH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAEpF,eAAO,MAAM,2BAA2B,MAAM,CAAC;AAE/C;;;;;GAKG;AACH,eAAO,MAAM,6BAA6B;;;;;;;;kBAWtC,CAAC;AAEL,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAEpF,eAAO,MAAM,8BAA8B,mFAKjC,CAAC;AAEX,eAAO,MAAM,gCAAgC;;;;;EAAyC,CAAC;AAEvF,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAC;AAE1F,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAMvC,CAAC;AAEH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAElF,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAMzC,CAAC;AAEH,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC"}
|
|
@@ -55,14 +55,36 @@ export type SendMagicLinkEmailInput = z.infer<typeof SendMagicLinkEmailInputSche
|
|
|
55
55
|
* the message itself when the adopter owns delivery, so this is the contract
|
|
56
56
|
* between the two.
|
|
57
57
|
*/
|
|
58
|
+
/**
|
|
59
|
+
* Why a code was sent, when it is not an ordinary sign-in or verification code. A server
|
|
60
|
+
* that ignores it still delivers the code; one that reads it can warn the owner.
|
|
61
|
+
*/
|
|
62
|
+
export declare const DeliveryPurposeSchema: z.ZodEnum<{
|
|
63
|
+
account_recovery: "account_recovery";
|
|
64
|
+
}>;
|
|
65
|
+
export type DeliveryPurpose = z.infer<typeof DeliveryPurposeSchema>;
|
|
66
|
+
/** The owner notices the auth API sends about something that happened to an account. */
|
|
67
|
+
export declare const AccountNoticeNameSchema: z.ZodEnum<{
|
|
68
|
+
account_recovery_completed: "account_recovery_completed";
|
|
69
|
+
recovery_code_used: "recovery_code_used";
|
|
70
|
+
account_recovery_opened: "account_recovery_opened";
|
|
71
|
+
identity_changed: "identity_changed";
|
|
72
|
+
}>;
|
|
73
|
+
export type AccountNoticeName = z.infer<typeof AccountNoticeNameSchema>;
|
|
58
74
|
export declare const AuthDeliverySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
59
75
|
kind: z.ZodLiteral<"otp_email">;
|
|
60
76
|
to: z.ZodString;
|
|
61
77
|
token: z.ZodString;
|
|
78
|
+
purpose: z.ZodOptional<z.ZodEnum<{
|
|
79
|
+
account_recovery: "account_recovery";
|
|
80
|
+
}>>;
|
|
62
81
|
}, z.core.$strip>, z.ZodObject<{
|
|
63
82
|
kind: z.ZodLiteral<"otp_sms">;
|
|
64
83
|
to: z.ZodString;
|
|
65
84
|
token: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
|
|
85
|
+
purpose: z.ZodOptional<z.ZodEnum<{
|
|
86
|
+
account_recovery: "account_recovery";
|
|
87
|
+
}>>;
|
|
66
88
|
}, z.core.$strip>, z.ZodObject<{
|
|
67
89
|
kind: z.ZodLiteral<"magic_link_email">;
|
|
68
90
|
to: z.ZodString;
|
|
@@ -72,6 +94,29 @@ export declare const AuthDeliverySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
72
94
|
kind: z.ZodLiteral<"enrollment_invite_email">;
|
|
73
95
|
to: z.ZodString;
|
|
74
96
|
signInUrl: z.ZodString;
|
|
97
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
98
|
+
kind: z.ZodLiteral<"account_notice_email">;
|
|
99
|
+
notice: z.ZodEnum<{
|
|
100
|
+
account_recovery_completed: "account_recovery_completed";
|
|
101
|
+
recovery_code_used: "recovery_code_used";
|
|
102
|
+
account_recovery_opened: "account_recovery_opened";
|
|
103
|
+
identity_changed: "identity_changed";
|
|
104
|
+
}>;
|
|
105
|
+
to: z.ZodString;
|
|
106
|
+
subject: z.ZodString;
|
|
107
|
+
text: z.ZodString;
|
|
108
|
+
cancelUrl: z.ZodOptional<z.ZodString>;
|
|
109
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
110
|
+
kind: z.ZodLiteral<"account_notice_sms">;
|
|
111
|
+
notice: z.ZodEnum<{
|
|
112
|
+
account_recovery_completed: "account_recovery_completed";
|
|
113
|
+
recovery_code_used: "recovery_code_used";
|
|
114
|
+
account_recovery_opened: "account_recovery_opened";
|
|
115
|
+
identity_changed: "identity_changed";
|
|
116
|
+
}>;
|
|
117
|
+
to: z.ZodString;
|
|
118
|
+
text: z.ZodString;
|
|
119
|
+
cancelUrl: z.ZodOptional<z.ZodString>;
|
|
75
120
|
}, z.core.$strip>], "kind">;
|
|
76
121
|
export type AuthDeliveryInstruction = z.infer<typeof AuthDeliverySchema>;
|
|
77
122
|
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/schemas/messaging/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,sBAAsB;;;EAA2B,CAAC;AAE/D,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,C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AAM,kBAAkB;;;;;;iBAM7B,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9D,eAAO,MAAM,gBAAgB;;;;iBAI3B,CAAC;AAEH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D,eAAO,MAAM,uBAAuB;;;;;iBAKlC,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE,eAAO,MAAM,qBAAqB;;;;iBAIhC,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE,eAAO,MAAM,6BAA6B;;;;;;iBAMxC,CAAC;AAEH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAEpF;;;;GAIG;AACH;;;GAGG;AACH,eAAO,MAAM,qBAAqB;;EAA+B,CAAC;AAElE,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE,wFAAwF;AACxF,eAAO,MAAM,uBAAuB;;;;;EAKlC,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BA0C7B,CAAC;AAEH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC"}
|
|
@@ -42,16 +42,30 @@ export const SendMagicLinkEmailInputSchema = z.object({
|
|
|
42
42
|
* the message itself when the adopter owns delivery, so this is the contract
|
|
43
43
|
* between the two.
|
|
44
44
|
*/
|
|
45
|
+
/**
|
|
46
|
+
* Why a code was sent, when it is not an ordinary sign-in or verification code. A server
|
|
47
|
+
* that ignores it still delivers the code; one that reads it can warn the owner.
|
|
48
|
+
*/
|
|
49
|
+
export const DeliveryPurposeSchema = z.enum(['account_recovery']);
|
|
50
|
+
/** The owner notices the auth API sends about something that happened to an account. */
|
|
51
|
+
export const AccountNoticeNameSchema = z.enum([
|
|
52
|
+
'account_recovery_opened',
|
|
53
|
+
'account_recovery_completed',
|
|
54
|
+
'recovery_code_used',
|
|
55
|
+
'identity_changed',
|
|
56
|
+
]);
|
|
45
57
|
export const AuthDeliverySchema = z.discriminatedUnion('kind', [
|
|
46
58
|
z.object({
|
|
47
59
|
kind: z.literal('otp_email'),
|
|
48
60
|
to: z.string(),
|
|
49
61
|
token: z.string(),
|
|
62
|
+
purpose: DeliveryPurposeSchema.optional(),
|
|
50
63
|
}),
|
|
51
64
|
z.object({
|
|
52
65
|
kind: z.literal('otp_sms'),
|
|
53
66
|
to: z.string(),
|
|
54
67
|
token: z.union([z.string(), z.number()]),
|
|
68
|
+
purpose: DeliveryPurposeSchema.optional(),
|
|
55
69
|
}),
|
|
56
70
|
z.object({
|
|
57
71
|
kind: z.literal('magic_link_email'),
|
|
@@ -65,5 +79,22 @@ export const AuthDeliverySchema = z.discriminatedUnion('kind', [
|
|
|
65
79
|
// The sign-in page. It carries no credential, so it signs nobody in on its own.
|
|
66
80
|
signInUrl: z.string(),
|
|
67
81
|
}),
|
|
82
|
+
// `subject` and `text` are ready to send as they are; `notice` lets a server use its
|
|
83
|
+
// own template instead. `cancelUrl` carries a credential, so it must reach only `to`.
|
|
84
|
+
z.object({
|
|
85
|
+
kind: z.literal('account_notice_email'),
|
|
86
|
+
notice: AccountNoticeNameSchema,
|
|
87
|
+
to: z.string(),
|
|
88
|
+
subject: z.string(),
|
|
89
|
+
text: z.string(),
|
|
90
|
+
cancelUrl: z.string().optional(),
|
|
91
|
+
}),
|
|
92
|
+
z.object({
|
|
93
|
+
kind: z.literal('account_notice_sms'),
|
|
94
|
+
notice: AccountNoticeNameSchema,
|
|
95
|
+
to: z.string(),
|
|
96
|
+
text: z.string(),
|
|
97
|
+
cancelUrl: z.string().optional(),
|
|
98
|
+
}),
|
|
68
99
|
]);
|
|
69
100
|
//# sourceMappingURL=schema.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../src/schemas/messaging/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC;AAI/D,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE;IACrB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;IACpB,OAAO,EAAE,sBAAsB;IAC/B,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAChC,GAAG,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;CAC5B,CAAC,CAAC;AAIH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC3B,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC5B,CAAC,CAAC;AAIH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,IAAI,EAAE,CAAC,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AAM,EAAE;QAChB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;KACjC,CAAC;IACF,CAAC,CAAC,MAAM,CAAC;QACP,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,oBAAoB,CAAC;QACrC,MAAM,EAAE,uBAAuB;QAC/B,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;QACd,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;QAChB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;KACjC,CAAC;CACH,CAAC,CAAC"}
|
|
@@ -6,6 +6,7 @@ import { z } from 'zod';
|
|
|
6
6
|
*/
|
|
7
7
|
export declare const POLICY_KEYS: readonly ["login_methods", "passkey_login_fallback_enabled", "phishing_resistant_only", "prompt_passkey_enrollment", "authenticator_policy", "lockout_policy", "recovery_codes", "account_recovery"];
|
|
8
8
|
export declare const PolicyKeySchema: z.ZodEnum<{
|
|
9
|
+
account_recovery: "account_recovery";
|
|
9
10
|
login_methods: "login_methods";
|
|
10
11
|
passkey_login_fallback_enabled: "passkey_login_fallback_enabled";
|
|
11
12
|
prompt_passkey_enrollment: "prompt_passkey_enrollment";
|
|
@@ -13,10 +14,13 @@ export declare const PolicyKeySchema: z.ZodEnum<{
|
|
|
13
14
|
lockout_policy: "lockout_policy";
|
|
14
15
|
authenticator_policy: "authenticator_policy";
|
|
15
16
|
recovery_codes: "recovery_codes";
|
|
16
|
-
account_recovery: "account_recovery";
|
|
17
17
|
}>;
|
|
18
18
|
export type PolicyKey = z.infer<typeof PolicyKeySchema>;
|
|
19
19
|
export declare const PolicyDocumentSchema: z.ZodObject<{
|
|
20
|
+
account_recovery: z.ZodDefault<z.ZodObject<{
|
|
21
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
22
|
+
delay: z.ZodDefault<z.ZodString>;
|
|
23
|
+
}, z.core.$strip>>;
|
|
20
24
|
login_methods: z.ZodArray<z.ZodEnum<{
|
|
21
25
|
passkey: "passkey";
|
|
22
26
|
magic_link: "magic_link";
|
|
@@ -60,10 +64,6 @@ export declare const PolicyDocumentSchema: z.ZodObject<{
|
|
|
60
64
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
61
65
|
requireAtEnrollment: z.ZodDefault<z.ZodBoolean>;
|
|
62
66
|
}, z.core.$strip>>;
|
|
63
|
-
account_recovery: z.ZodDefault<z.ZodObject<{
|
|
64
|
-
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
65
|
-
delay: z.ZodDefault<z.ZodString>;
|
|
66
|
-
}, z.core.$strip>>;
|
|
67
67
|
}, z.core.$strip>;
|
|
68
68
|
export type PolicyDocument = z.infer<typeof PolicyDocumentSchema>;
|
|
69
69
|
/**
|
|
@@ -81,6 +81,10 @@ export type PolicyVersionSource = z.infer<typeof PolicyVersionSourceSchema>;
|
|
|
81
81
|
export declare const PolicyVersionSchema: z.ZodObject<{
|
|
82
82
|
version: z.ZodNumber;
|
|
83
83
|
policy: z.ZodObject<{
|
|
84
|
+
account_recovery: z.ZodDefault<z.ZodObject<{
|
|
85
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
86
|
+
delay: z.ZodDefault<z.ZodString>;
|
|
87
|
+
}, z.core.$strip>>;
|
|
84
88
|
login_methods: z.ZodArray<z.ZodEnum<{
|
|
85
89
|
passkey: "passkey";
|
|
86
90
|
magic_link: "magic_link";
|
|
@@ -124,10 +128,6 @@ export declare const PolicyVersionSchema: z.ZodObject<{
|
|
|
124
128
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
125
129
|
requireAtEnrollment: z.ZodDefault<z.ZodBoolean>;
|
|
126
130
|
}, z.core.$strip>>;
|
|
127
|
-
account_recovery: z.ZodDefault<z.ZodObject<{
|
|
128
|
-
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
129
|
-
delay: z.ZodDefault<z.ZodString>;
|
|
130
|
-
}, z.core.$strip>>;
|
|
131
131
|
}, z.core.$strip>;
|
|
132
132
|
source: z.ZodEnum<{
|
|
133
133
|
rollback: "rollback";
|
|
@@ -142,6 +142,10 @@ export declare const PolicyVersionSchema: z.ZodObject<{
|
|
|
142
142
|
export type PolicyVersion = z.infer<typeof PolicyVersionSchema>;
|
|
143
143
|
export declare const PolicyDraftSchema: z.ZodObject<{
|
|
144
144
|
policy: z.ZodObject<{
|
|
145
|
+
account_recovery: z.ZodDefault<z.ZodObject<{
|
|
146
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
147
|
+
delay: z.ZodDefault<z.ZodString>;
|
|
148
|
+
}, z.core.$strip>>;
|
|
145
149
|
login_methods: z.ZodArray<z.ZodEnum<{
|
|
146
150
|
passkey: "passkey";
|
|
147
151
|
magic_link: "magic_link";
|
|
@@ -185,10 +189,6 @@ export declare const PolicyDraftSchema: z.ZodObject<{
|
|
|
185
189
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
186
190
|
requireAtEnrollment: z.ZodDefault<z.ZodBoolean>;
|
|
187
191
|
}, z.core.$strip>>;
|
|
188
|
-
account_recovery: z.ZodDefault<z.ZodObject<{
|
|
189
|
-
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
190
|
-
delay: z.ZodDefault<z.ZodString>;
|
|
191
|
-
}, z.core.$strip>>;
|
|
192
192
|
}, z.core.$strip>;
|
|
193
193
|
basedOnVersion: z.ZodNumber;
|
|
194
194
|
updatedAt: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
@@ -200,6 +200,10 @@ export declare const PolicyStateResponseSchema: z.ZodObject<{
|
|
|
200
200
|
published: z.ZodObject<{
|
|
201
201
|
version: z.ZodNumber;
|
|
202
202
|
policy: z.ZodObject<{
|
|
203
|
+
account_recovery: z.ZodDefault<z.ZodObject<{
|
|
204
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
205
|
+
delay: z.ZodDefault<z.ZodString>;
|
|
206
|
+
}, z.core.$strip>>;
|
|
203
207
|
login_methods: z.ZodArray<z.ZodEnum<{
|
|
204
208
|
passkey: "passkey";
|
|
205
209
|
magic_link: "magic_link";
|
|
@@ -243,10 +247,6 @@ export declare const PolicyStateResponseSchema: z.ZodObject<{
|
|
|
243
247
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
244
248
|
requireAtEnrollment: z.ZodDefault<z.ZodBoolean>;
|
|
245
249
|
}, z.core.$strip>>;
|
|
246
|
-
account_recovery: z.ZodDefault<z.ZodObject<{
|
|
247
|
-
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
248
|
-
delay: z.ZodDefault<z.ZodString>;
|
|
249
|
-
}, z.core.$strip>>;
|
|
250
250
|
}, z.core.$strip>;
|
|
251
251
|
source: z.ZodEnum<{
|
|
252
252
|
rollback: "rollback";
|
|
@@ -260,6 +260,10 @@ export declare const PolicyStateResponseSchema: z.ZodObject<{
|
|
|
260
260
|
}, z.core.$strip>;
|
|
261
261
|
draft: z.ZodNullable<z.ZodObject<{
|
|
262
262
|
policy: z.ZodObject<{
|
|
263
|
+
account_recovery: z.ZodDefault<z.ZodObject<{
|
|
264
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
265
|
+
delay: z.ZodDefault<z.ZodString>;
|
|
266
|
+
}, z.core.$strip>>;
|
|
263
267
|
login_methods: z.ZodArray<z.ZodEnum<{
|
|
264
268
|
passkey: "passkey";
|
|
265
269
|
magic_link: "magic_link";
|
|
@@ -303,10 +307,6 @@ export declare const PolicyStateResponseSchema: z.ZodObject<{
|
|
|
303
307
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
304
308
|
requireAtEnrollment: z.ZodDefault<z.ZodBoolean>;
|
|
305
309
|
}, z.core.$strip>>;
|
|
306
|
-
account_recovery: z.ZodDefault<z.ZodObject<{
|
|
307
|
-
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
308
|
-
delay: z.ZodDefault<z.ZodString>;
|
|
309
|
-
}, z.core.$strip>>;
|
|
310
310
|
}, z.core.$strip>;
|
|
311
311
|
basedOnVersion: z.ZodNumber;
|
|
312
312
|
updatedAt: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
@@ -317,6 +317,10 @@ export type PolicyStateResponse = z.infer<typeof PolicyStateResponseSchema>;
|
|
|
317
317
|
/** `PUT /system-config/policy/draft`. */
|
|
318
318
|
export declare const PolicyDraftSaveRequestSchema: z.ZodObject<{
|
|
319
319
|
policy: z.ZodObject<{
|
|
320
|
+
account_recovery: z.ZodDefault<z.ZodObject<{
|
|
321
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
322
|
+
delay: z.ZodDefault<z.ZodString>;
|
|
323
|
+
}, z.core.$strip>>;
|
|
320
324
|
login_methods: z.ZodArray<z.ZodEnum<{
|
|
321
325
|
passkey: "passkey";
|
|
322
326
|
magic_link: "magic_link";
|
|
@@ -360,10 +364,6 @@ export declare const PolicyDraftSaveRequestSchema: z.ZodObject<{
|
|
|
360
364
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
361
365
|
requireAtEnrollment: z.ZodDefault<z.ZodBoolean>;
|
|
362
366
|
}, z.core.$strip>>;
|
|
363
|
-
account_recovery: z.ZodDefault<z.ZodObject<{
|
|
364
|
-
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
365
|
-
delay: z.ZodDefault<z.ZodString>;
|
|
366
|
-
}, z.core.$strip>>;
|
|
367
367
|
}, z.core.$strip>;
|
|
368
368
|
}, z.core.$strict>;
|
|
369
369
|
export type PolicyDraftSaveRequest = z.infer<typeof PolicyDraftSaveRequestSchema>;
|
|
@@ -387,6 +387,10 @@ export declare const PolicyVersionsResponseSchema: z.ZodObject<{
|
|
|
387
387
|
versions: z.ZodArray<z.ZodObject<{
|
|
388
388
|
version: z.ZodNumber;
|
|
389
389
|
policy: z.ZodObject<{
|
|
390
|
+
account_recovery: z.ZodDefault<z.ZodObject<{
|
|
391
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
392
|
+
delay: z.ZodDefault<z.ZodString>;
|
|
393
|
+
}, z.core.$strip>>;
|
|
390
394
|
login_methods: z.ZodArray<z.ZodEnum<{
|
|
391
395
|
passkey: "passkey";
|
|
392
396
|
magic_link: "magic_link";
|
|
@@ -430,10 +434,6 @@ export declare const PolicyVersionsResponseSchema: z.ZodObject<{
|
|
|
430
434
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
431
435
|
requireAtEnrollment: z.ZodDefault<z.ZodBoolean>;
|
|
432
436
|
}, z.core.$strip>>;
|
|
433
|
-
account_recovery: z.ZodDefault<z.ZodObject<{
|
|
434
|
-
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
435
|
-
delay: z.ZodDefault<z.ZodString>;
|
|
436
|
-
}, z.core.$strip>>;
|
|
437
437
|
}, z.core.$strip>;
|
|
438
438
|
source: z.ZodEnum<{
|
|
439
439
|
rollback: "rollback";
|
|
@@ -452,6 +452,10 @@ export type PolicyVersionsResponse = z.infer<typeof PolicyVersionsResponseSchema
|
|
|
452
452
|
*/
|
|
453
453
|
export declare const PolicyDryRunRequestSchema: z.ZodObject<{
|
|
454
454
|
policy: z.ZodOptional<z.ZodObject<{
|
|
455
|
+
account_recovery: z.ZodDefault<z.ZodObject<{
|
|
456
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
457
|
+
delay: z.ZodDefault<z.ZodString>;
|
|
458
|
+
}, z.core.$strip>>;
|
|
455
459
|
login_methods: z.ZodArray<z.ZodEnum<{
|
|
456
460
|
passkey: "passkey";
|
|
457
461
|
magic_link: "magic_link";
|
|
@@ -495,10 +499,6 @@ export declare const PolicyDryRunRequestSchema: z.ZodObject<{
|
|
|
495
499
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
496
500
|
requireAtEnrollment: z.ZodDefault<z.ZodBoolean>;
|
|
497
501
|
}, z.core.$strip>>;
|
|
498
|
-
account_recovery: z.ZodDefault<z.ZodObject<{
|
|
499
|
-
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
500
|
-
delay: z.ZodDefault<z.ZodString>;
|
|
501
|
-
}, z.core.$strip>>;
|
|
502
502
|
}, z.core.$strip>>;
|
|
503
503
|
days: z.ZodDefault<z.ZodNumber>;
|
|
504
504
|
}, z.core.$strict>;
|
|
@@ -75,10 +75,16 @@ export declare const AccountRecoveryStartResponseSchema: z.ZodObject<{
|
|
|
75
75
|
kind: z.ZodLiteral<"otp_email">;
|
|
76
76
|
to: z.ZodString;
|
|
77
77
|
token: z.ZodString;
|
|
78
|
+
purpose: z.ZodOptional<z.ZodEnum<{
|
|
79
|
+
account_recovery: "account_recovery";
|
|
80
|
+
}>>;
|
|
78
81
|
}, z.core.$strip>, z.ZodObject<{
|
|
79
82
|
kind: z.ZodLiteral<"otp_sms">;
|
|
80
83
|
to: z.ZodString;
|
|
81
84
|
token: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
|
|
85
|
+
purpose: z.ZodOptional<z.ZodEnum<{
|
|
86
|
+
account_recovery: "account_recovery";
|
|
87
|
+
}>>;
|
|
82
88
|
}, z.core.$strip>, z.ZodObject<{
|
|
83
89
|
kind: z.ZodLiteral<"magic_link_email">;
|
|
84
90
|
to: z.ZodString;
|
|
@@ -88,6 +94,29 @@ export declare const AccountRecoveryStartResponseSchema: z.ZodObject<{
|
|
|
88
94
|
kind: z.ZodLiteral<"enrollment_invite_email">;
|
|
89
95
|
to: z.ZodString;
|
|
90
96
|
signInUrl: z.ZodString;
|
|
97
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
98
|
+
kind: z.ZodLiteral<"account_notice_email">;
|
|
99
|
+
notice: z.ZodEnum<{
|
|
100
|
+
account_recovery_completed: "account_recovery_completed";
|
|
101
|
+
recovery_code_used: "recovery_code_used";
|
|
102
|
+
account_recovery_opened: "account_recovery_opened";
|
|
103
|
+
identity_changed: "identity_changed";
|
|
104
|
+
}>;
|
|
105
|
+
to: z.ZodString;
|
|
106
|
+
subject: z.ZodString;
|
|
107
|
+
text: z.ZodString;
|
|
108
|
+
cancelUrl: z.ZodOptional<z.ZodString>;
|
|
109
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
110
|
+
kind: z.ZodLiteral<"account_notice_sms">;
|
|
111
|
+
notice: z.ZodEnum<{
|
|
112
|
+
account_recovery_completed: "account_recovery_completed";
|
|
113
|
+
recovery_code_used: "recovery_code_used";
|
|
114
|
+
account_recovery_opened: "account_recovery_opened";
|
|
115
|
+
identity_changed: "identity_changed";
|
|
116
|
+
}>;
|
|
117
|
+
to: z.ZodString;
|
|
118
|
+
text: z.ZodString;
|
|
119
|
+
cancelUrl: z.ZodOptional<z.ZodString>;
|
|
91
120
|
}, z.core.$strip>], "kind">>;
|
|
92
121
|
}, z.core.$strip>;
|
|
93
122
|
export type AccountRecoveryStartResponse = z.infer<typeof AccountRecoveryStartResponseSchema>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/schemas/recovery/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB;;;GAGG;AACH,eAAO,MAAM,kBAAkB,aAGiD,CAAC;AAEjF,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9D,qFAAqF;AACrF,eAAO,MAAM,yBAAyB;;;;;iBAKpC,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE5E;;;GAGG;AACH,eAAO,MAAM,4BAA4B;;;;iBAIvC,CAAC;AAEH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAElF,4EAA4E;AAC5E,eAAO,MAAM,+BAA+B;;iBAE1C,CAAC;AAEH,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC;AAExF;;;;;;GAMG;AACH,eAAO,M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AAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAEpF,eAAO,MAAM,4BAA4B;;;EAA6B,CAAC;AAEvE,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAElF;;;;GAIG;AACH,eAAO,MAAM,iCAAiC;;;;;iBAE5C,CAAC;AAEH,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iCAAiC,CAAC,CAAC;AAE5F,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAG7C,CAAC;AAEH,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kCAAkC,CAAC,CAAC;AAE9F,kFAAkF;AAClF,eAAO,MAAM,kCAAkC;;iBAE7C,CAAC;AAEH,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kCAAkC,CAAC,CAAC;AAE9F,eAAO,MAAM,0BAA0B;;;;;EAAyD,CAAC;AAEjG,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE9E;;;;GAIG;AACH,eAAO,MAAM,2BAA2B;;;;;;;;;iBAItC,CAAC;AAEH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEhF;;;GAGG;AACH,eAAO,MAAM,kCAAkC;;iBAE7C,CAAC;AAEH,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kCAAkC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -4,10 +4,12 @@ import { IsoDate } from '../../shared.js';
|
|
|
4
4
|
export const AUTH_EVENT_TYPES = [
|
|
5
5
|
'account_recovery_cancelled',
|
|
6
6
|
'account_recovery_completed',
|
|
7
|
+
'account_recovery_failed',
|
|
7
8
|
'account_recovery_started',
|
|
8
9
|
'account_recovery_verified',
|
|
9
10
|
'admin_device_replacement_recovery',
|
|
10
11
|
'admin_enrollment_invite_sent',
|
|
12
|
+
'admin_last_admin_change_refused',
|
|
11
13
|
'admin_oauth_provider_restored',
|
|
12
14
|
'admin_oauth_provider_retired',
|
|
13
15
|
'admin_session_revoked',
|
|
@@ -17,6 +19,7 @@ export const AUTH_EVENT_TYPES = [
|
|
|
17
19
|
'bearer_token_failed',
|
|
18
20
|
'bearer_token_success',
|
|
19
21
|
'bearer_token_suspicious',
|
|
22
|
+
'break_glass_enrollment',
|
|
20
23
|
'break_glass_sign_in',
|
|
21
24
|
'credentials_deleted',
|
|
22
25
|
'informational',
|
|
@@ -31,6 +34,7 @@ export const AUTH_EVENT_TYPES = [
|
|
|
31
34
|
'logout_failed',
|
|
32
35
|
'logout_success',
|
|
33
36
|
'logout_suspicious',
|
|
37
|
+
'magic_link_confirmation_required',
|
|
34
38
|
'magic_link_failed',
|
|
35
39
|
'magic_link_poll_completed_successfully',
|
|
36
40
|
'magic_link_requested',
|
|
@@ -67,6 +71,7 @@ export const AUTH_EVENT_TYPES = [
|
|
|
67
71
|
'service_token_rotated',
|
|
68
72
|
'service_token_success',
|
|
69
73
|
'service_token_suspicious',
|
|
74
|
+
'session_evicted',
|
|
70
75
|
'step_up_challenge',
|
|
71
76
|
'step_up_failed',
|
|
72
77
|
'step_up_success',
|
|
@@ -91,6 +96,7 @@ export const AUTH_EVENT_TYPES = [
|
|
|
91
96
|
'webauthn_login_failed',
|
|
92
97
|
'webauthn_login_success',
|
|
93
98
|
'webauthn_login_suspicious',
|
|
99
|
+
'webauthn_registration_challenge',
|
|
94
100
|
'webauthn_registration_failed',
|
|
95
101
|
'webauthn_registration_success',
|
|
96
102
|
'webauthn_registration_suspicious',
|
|
@@ -64,16 +64,36 @@ export type SendMagicLinkEmailInput = z.infer<typeof SendMagicLinkEmailInputSche
|
|
|
64
64
|
* the message itself when the adopter owns delivery, so this is the contract
|
|
65
65
|
* between the two.
|
|
66
66
|
*/
|
|
67
|
+
/**
|
|
68
|
+
* Why a code was sent, when it is not an ordinary sign-in or verification code. A server
|
|
69
|
+
* that ignores it still delivers the code; one that reads it can warn the owner.
|
|
70
|
+
*/
|
|
71
|
+
export const DeliveryPurposeSchema = z.enum(['account_recovery']);
|
|
72
|
+
|
|
73
|
+
export type DeliveryPurpose = z.infer<typeof DeliveryPurposeSchema>;
|
|
74
|
+
|
|
75
|
+
/** The owner notices the auth API sends about something that happened to an account. */
|
|
76
|
+
export const AccountNoticeNameSchema = z.enum([
|
|
77
|
+
'account_recovery_opened',
|
|
78
|
+
'account_recovery_completed',
|
|
79
|
+
'recovery_code_used',
|
|
80
|
+
'identity_changed',
|
|
81
|
+
]);
|
|
82
|
+
|
|
83
|
+
export type AccountNoticeName = z.infer<typeof AccountNoticeNameSchema>;
|
|
84
|
+
|
|
67
85
|
export const AuthDeliverySchema = z.discriminatedUnion('kind', [
|
|
68
86
|
z.object({
|
|
69
87
|
kind: z.literal('otp_email'),
|
|
70
88
|
to: z.string(),
|
|
71
89
|
token: z.string(),
|
|
90
|
+
purpose: DeliveryPurposeSchema.optional(),
|
|
72
91
|
}),
|
|
73
92
|
z.object({
|
|
74
93
|
kind: z.literal('otp_sms'),
|
|
75
94
|
to: z.string(),
|
|
76
95
|
token: z.union([z.string(), z.number()]),
|
|
96
|
+
purpose: DeliveryPurposeSchema.optional(),
|
|
77
97
|
}),
|
|
78
98
|
z.object({
|
|
79
99
|
kind: z.literal('magic_link_email'),
|
|
@@ -87,6 +107,23 @@ export const AuthDeliverySchema = z.discriminatedUnion('kind', [
|
|
|
87
107
|
// The sign-in page. It carries no credential, so it signs nobody in on its own.
|
|
88
108
|
signInUrl: z.string(),
|
|
89
109
|
}),
|
|
110
|
+
// `subject` and `text` are ready to send as they are; `notice` lets a server use its
|
|
111
|
+
// own template instead. `cancelUrl` carries a credential, so it must reach only `to`.
|
|
112
|
+
z.object({
|
|
113
|
+
kind: z.literal('account_notice_email'),
|
|
114
|
+
notice: AccountNoticeNameSchema,
|
|
115
|
+
to: z.string(),
|
|
116
|
+
subject: z.string(),
|
|
117
|
+
text: z.string(),
|
|
118
|
+
cancelUrl: z.string().optional(),
|
|
119
|
+
}),
|
|
120
|
+
z.object({
|
|
121
|
+
kind: z.literal('account_notice_sms'),
|
|
122
|
+
notice: AccountNoticeNameSchema,
|
|
123
|
+
to: z.string(),
|
|
124
|
+
text: z.string(),
|
|
125
|
+
cancelUrl: z.string().optional(),
|
|
126
|
+
}),
|
|
90
127
|
]);
|
|
91
128
|
|
|
92
129
|
export type AuthDeliveryInstruction = z.infer<typeof AuthDeliverySchema>;
|