@seamless-auth/types 0.30.0 → 0.32.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 CHANGED
@@ -1,5 +1,28 @@
1
1
  # @seamless-auth/types
2
2
 
3
+ ## 0.32.0
4
+
5
+ ### Minor Changes
6
+
7
+ - cf2de06: Shared schemas for the rest of the v0.20 account recovery contract, and a recovery flag on `/users/me`.
8
+
9
+ - `AccountRecoveryRequestSchema` and `AccountRecoveryRequestsResponseSchema` for `GET /recovery/requests`, and `AccountRecoveryRequestIdParamSchema` for `DELETE /recovery/requests/:id`.
10
+ - `AccountRecoveryVerifyResponseSchema`: the status plus the optional `deliveries` returned to a server that owns delivery.
11
+ - `RecoveryErrorCodeSchema`, the `error` values the recovery code and account recovery routes answer with.
12
+ - `MeResponseSchema` gains optional `recovery`, true for a recovery session, so a cookie client can tell after a reload that the user still has to enroll a factor.
13
+
14
+ ## 0.31.0
15
+
16
+ ### Minor Changes
17
+
18
+ - 6c0cea8: External delivery for account notices, and the missing auth event names.
19
+
20
+ - `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`.
21
+ - `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.
22
+ - `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.
23
+
24
+ Breaking for exhaustive handling: code that switches over every `AuthDeliveryInstruction` kind needs cases for the two new kinds.
25
+
3
26
  ## 0.30.0
4
27
 
5
28
  ### 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,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,CA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0BAA0B;;;;;;;;;;;;;;iBAKrC,CAAC;AAEH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,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,ynEA6FnB,CAAC;AAEX,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;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,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;IAChB,mBAAmB;IACnB,mBAAmB;IACnB,wCAAwC;IACxC,sBAAsB;IACtB,oBAAoB;IACpB,gBAAgB;IAChB,iBAAiB;IACjB,oBAAoB;IACpB,mBAAmB;IACnB,oBAAoB;IACpB,qBAAqB;IACrB,qBAAqB;IACrB,YAAY;IACZ,aAA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.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,CAA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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"}
@@ -102,6 +102,7 @@ export declare const MeResponseSchema: z.ZodObject<{
102
102
  memberCount: z.ZodOptional<z.ZodNumber>;
103
103
  retiredOAuthProviders: z.ZodOptional<z.ZodArray<z.ZodString>>;
104
104
  }, z.core.$strip>>>;
105
+ recovery: z.ZodOptional<z.ZodBoolean>;
105
106
  }, z.core.$strip>;
106
107
  export type MeResponse = z.infer<typeof MeResponseSchema>;
107
108
  //# sourceMappingURL=schema.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/schemas/me/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB;;;GAGG;AACH,eAAO,MAAM,YAAY;;;;;;;iBAOvB,CAAC;AAEH,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAElD,sCAAsC;AACtC,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC;AAElC,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAK3B,CAAC;AAEH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/schemas/me/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB;;;GAGG;AACH,eAAO,MAAM,YAAY;;;;;;;iBAOvB,CAAC;AAEH,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAElD,sCAAsC;AACtC,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC;AAElC,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAW3B,CAAC;AAEH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
@@ -20,5 +20,11 @@ export const MeResponseSchema = z.object({
20
20
  credentials: z.array(CredentialResponseSchema),
21
21
  organizations: z.array(OrganizationSchema).optional(),
22
22
  activeOrganization: OrganizationSchema.nullable().optional(),
23
+ /**
24
+ * True for a recovery session, from account recovery or a recovery code: it can only
25
+ * enroll a new passkey or authenticator app until one is enrolled. A cookie client
26
+ * cannot read its access token, so this is how it learns that after a reload.
27
+ */
28
+ recovery: z.boolean().optional(),
23
29
  });
24
30
  //# sourceMappingURL=schema.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../src/schemas/me/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAA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D;;;GAGG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,CAAC,MAAM,CAAC;IACnC,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,KAAK,EAAE,CAAC,CAAC,KAAK,EAAE;IAChB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC5B,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,cAAc,CAAC;IAC9B,SAAS,EAAE,OAAO,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IACxC,oBAAoB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;CACvD,CAAC,CAAC;AAOH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,IAAI,EAAE,YAAY;IAClB,WAAW,EAAE,CAAC,CAAC,KAAK,CAAC,wBAAwB,CAAC;IAC9C,aAAa,EAAE,CAAC,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC,QAAQ,EAAE;IACrD,kBAAkB,EAAE,kBAAkB,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IAC5D;;;;OAIG;IACH,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;CACjC,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,CAAC,CAAC;AAEtE,eAAO,MAAM,oBAAoB;;;;;;;;;iBAM/B,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE,eAAO,MAAM,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,CAA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