authhero 9.35.0 → 9.36.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.
Files changed (52) hide show
  1. package/dist/assets/u/widget/index.esm.js +1 -1
  2. package/dist/authhero.cjs +72 -72
  3. package/dist/authhero.d.ts +141 -139
  4. package/dist/authhero.mjs +16605 -16119
  5. package/dist/{mfa-fD5vp7ql.mjs → mfa-B044FRjD.mjs} +22 -22
  6. package/dist/{mfa-XAWdFO9R.js → mfa-DPwn1ajo.js} +1 -1
  7. package/dist/mfa-attempts-BiU_pMOV.js +275 -0
  8. package/dist/{mfa-attempts-CpIqAsQd.mjs → mfa-attempts-DGOLb2oh.mjs} +6294 -6041
  9. package/dist/{passkey-enrollment-BB99mHdQ.js → passkey-enrollment-BDboqoaP.js} +1 -1
  10. package/dist/tsconfig.types.tsbuildinfo +1 -1
  11. package/dist/types/authentication-flows/passwordless.d.ts +5 -2
  12. package/dist/types/errors/management-api-error.d.ts +3 -0
  13. package/dist/types/helpers/database-connection-scope.d.ts +67 -0
  14. package/dist/types/helpers/dcr/metadata-mapping.d.ts +1 -1
  15. package/dist/types/helpers/reserved-claims.d.ts +2 -2
  16. package/dist/types/helpers/sso-access-tickets.d.ts +18 -0
  17. package/dist/types/helpers/users.d.ts +12 -2
  18. package/dist/types/index.d.ts +141 -139
  19. package/dist/types/routes/auth-api/index.d.ts +20 -18
  20. package/dist/types/routes/auth-api/passwordless.d.ts +10 -8
  21. package/dist/types/routes/auth-api/token.d.ts +10 -10
  22. package/dist/types/routes/management-api/action-executions.d.ts +2 -2
  23. package/dist/types/routes/management-api/actions.d.ts +1 -1
  24. package/dist/types/routes/management-api/authentication-methods.d.ts +1 -1
  25. package/dist/types/routes/management-api/branding.d.ts +13 -13
  26. package/dist/types/routes/management-api/client-grants.d.ts +9 -9
  27. package/dist/types/routes/management-api/custom-domains.d.ts +6 -6
  28. package/dist/types/routes/management-api/email-templates.d.ts +18 -18
  29. package/dist/types/routes/management-api/failed-events.d.ts +2 -2
  30. package/dist/types/routes/management-api/guardian.d.ts +5 -5
  31. package/dist/types/routes/management-api/helpers.d.ts +1 -1
  32. package/dist/types/routes/management-api/hook-code.d.ts +2 -2
  33. package/dist/types/routes/management-api/index.d.ts +116 -116
  34. package/dist/types/routes/management-api/keys.d.ts +12 -12
  35. package/dist/types/routes/management-api/log-streams.d.ts +6 -6
  36. package/dist/types/routes/management-api/logs.d.ts +4 -4
  37. package/dist/types/routes/management-api/migration-sources.d.ts +6 -6
  38. package/dist/types/routes/management-api/organizations.d.ts +5 -5
  39. package/dist/types/routes/management-api/prompts.d.ts +6 -6
  40. package/dist/types/routes/management-api/roles.d.ts +1 -1
  41. package/dist/types/routes/management-api/self-service-profiles.d.ts +345 -0
  42. package/dist/types/routes/management-api/tenant-operations.d.ts +10 -10
  43. package/dist/types/routes/management-api/tenants.d.ts +10 -10
  44. package/dist/types/routes/management-api/themes.d.ts +9 -9
  45. package/dist/types/routes/management-api/users.d.ts +17 -17
  46. package/dist/types/routes/universal-login/common.d.ts +8 -6
  47. package/dist/types/routes/universal-login/u2-index.d.ts +5 -5
  48. package/dist/types/routes/universal-login/u2-routes.d.ts +5 -5
  49. package/dist/types/state-machines/login-session.d.ts +1 -1
  50. package/dist/types/utils/username-password-provider.d.ts +14 -3
  51. package/package.json +6 -6
  52. package/dist/mfa-attempts-C7toCIRn.js +0 -275
@@ -0,0 +1,345 @@
1
+ import { OpenAPIHono } from "@hono/zod-openapi";
2
+ import { Bindings, Variables } from "../../types";
3
+ /**
4
+ * Self-Service SSO (issue #1763): Auth0's nine `/api/v2/self-service-profiles`
5
+ * endpoints with Auth0's paths, scopes and request/response shapes, and no
6
+ * AuthHero-only endpoints.
7
+ *
8
+ * Request bodies are parsed strictly. A field Auth0 does not define, and an
9
+ * Auth0 field AuthHero does not implement yet, is rejected with a 400 naming
10
+ * the field, and nothing is stored. A client written for Auth0 therefore never
11
+ * believes a setting took effect when it did not.
12
+ */
13
+ /** Auth0 caps the number of self-service profiles per tenant. */
14
+ export declare const MAX_SELF_SERVICE_PROFILES = 20;
15
+ export declare const selfServiceProfilesRoutes: OpenAPIHono<{
16
+ Bindings: Bindings;
17
+ Variables: Variables;
18
+ }, {
19
+ "/": {
20
+ $get: {
21
+ input: {
22
+ query: {
23
+ page?: unknown;
24
+ per_page?: unknown;
25
+ include_totals?: "true" | "false" | undefined;
26
+ };
27
+ } & {
28
+ header: {
29
+ "tenant-id"?: string | undefined;
30
+ };
31
+ };
32
+ output: {
33
+ name: string;
34
+ id: string;
35
+ created_at: string;
36
+ updated_at: string;
37
+ description?: string | undefined;
38
+ allowed_strategies?: ("okta" | "oidc" | "samlp" | "waad" | "google-apps" | "adfs" | "auth0-samlp" | "okta-samlp" | "keycloak-samlp" | "pingfederate")[] | undefined;
39
+ user_attributes?: {
40
+ name: string;
41
+ description: string;
42
+ is_optional: boolean;
43
+ }[] | undefined;
44
+ branding?: {
45
+ logo_url?: string | undefined;
46
+ colors?: {
47
+ primary: string;
48
+ } | undefined;
49
+ } | undefined;
50
+ }[] | {
51
+ self_service_profiles: {
52
+ name: string;
53
+ id: string;
54
+ created_at: string;
55
+ updated_at: string;
56
+ description?: string | undefined;
57
+ allowed_strategies?: ("okta" | "oidc" | "samlp" | "waad" | "google-apps" | "adfs" | "auth0-samlp" | "okta-samlp" | "keycloak-samlp" | "pingfederate")[] | undefined;
58
+ user_attributes?: {
59
+ name: string;
60
+ description: string;
61
+ is_optional: boolean;
62
+ }[] | undefined;
63
+ branding?: {
64
+ logo_url?: string | undefined;
65
+ colors?: {
66
+ primary: string;
67
+ } | undefined;
68
+ } | undefined;
69
+ }[];
70
+ start: number;
71
+ limit: number;
72
+ total: number;
73
+ };
74
+ outputFormat: "json";
75
+ status: 200;
76
+ };
77
+ };
78
+ } & {
79
+ "/": {
80
+ $post: {
81
+ input: {
82
+ header: {
83
+ "tenant-id"?: string | undefined;
84
+ };
85
+ } & {
86
+ json: {
87
+ name: string;
88
+ description?: string | undefined;
89
+ branding?: {
90
+ logo_url?: string | undefined;
91
+ colors?: {
92
+ primary: string;
93
+ } | undefined;
94
+ } | undefined;
95
+ allowed_strategies?: ("okta" | "oidc" | "samlp" | "waad" | "google-apps" | "adfs" | "auth0-samlp" | "okta-samlp" | "keycloak-samlp" | "pingfederate")[] | undefined;
96
+ user_attributes?: {
97
+ name: string;
98
+ description: string;
99
+ is_optional: boolean;
100
+ }[] | undefined;
101
+ user_attribute_profile_id?: unknown;
102
+ };
103
+ };
104
+ output: {
105
+ name: string;
106
+ id: string;
107
+ created_at: string;
108
+ updated_at: string;
109
+ description?: string | undefined;
110
+ allowed_strategies?: ("okta" | "oidc" | "samlp" | "waad" | "google-apps" | "adfs" | "auth0-samlp" | "okta-samlp" | "keycloak-samlp" | "pingfederate")[] | undefined;
111
+ user_attributes?: {
112
+ name: string;
113
+ description: string;
114
+ is_optional: boolean;
115
+ }[] | undefined;
116
+ branding?: {
117
+ logo_url?: string | undefined;
118
+ colors?: {
119
+ primary: string;
120
+ } | undefined;
121
+ } | undefined;
122
+ };
123
+ outputFormat: "json";
124
+ status: 201;
125
+ };
126
+ };
127
+ } & {
128
+ "/:id": {
129
+ $get: {
130
+ input: {
131
+ param: {
132
+ id: string;
133
+ };
134
+ } & {
135
+ header: {
136
+ "tenant-id"?: string | undefined;
137
+ };
138
+ };
139
+ output: {
140
+ name: string;
141
+ id: string;
142
+ created_at: string;
143
+ updated_at: string;
144
+ description?: string | undefined;
145
+ allowed_strategies?: ("okta" | "oidc" | "samlp" | "waad" | "google-apps" | "adfs" | "auth0-samlp" | "okta-samlp" | "keycloak-samlp" | "pingfederate")[] | undefined;
146
+ user_attributes?: {
147
+ name: string;
148
+ description: string;
149
+ is_optional: boolean;
150
+ }[] | undefined;
151
+ branding?: {
152
+ logo_url?: string | undefined;
153
+ colors?: {
154
+ primary: string;
155
+ } | undefined;
156
+ } | undefined;
157
+ };
158
+ outputFormat: "json";
159
+ status: 200;
160
+ };
161
+ };
162
+ } & {
163
+ "/:id": {
164
+ $patch: {
165
+ input: {
166
+ param: {
167
+ id: string;
168
+ };
169
+ } & {
170
+ header: {
171
+ "tenant-id"?: string | undefined;
172
+ };
173
+ } & {
174
+ json: {
175
+ name?: string | undefined;
176
+ description?: string | null | undefined;
177
+ branding?: {
178
+ logo_url?: string | undefined;
179
+ colors?: {
180
+ primary: string;
181
+ } | undefined;
182
+ } | null | undefined;
183
+ allowed_strategies?: ("okta" | "oidc" | "samlp" | "waad" | "google-apps" | "adfs" | "auth0-samlp" | "okta-samlp" | "keycloak-samlp" | "pingfederate")[] | undefined;
184
+ user_attributes?: {
185
+ name: string;
186
+ description: string;
187
+ is_optional: boolean;
188
+ }[] | null | undefined;
189
+ user_attribute_profile_id?: unknown;
190
+ };
191
+ };
192
+ output: {
193
+ name: string;
194
+ id: string;
195
+ created_at: string;
196
+ updated_at: string;
197
+ description?: string | undefined;
198
+ allowed_strategies?: ("okta" | "oidc" | "samlp" | "waad" | "google-apps" | "adfs" | "auth0-samlp" | "okta-samlp" | "keycloak-samlp" | "pingfederate")[] | undefined;
199
+ user_attributes?: {
200
+ name: string;
201
+ description: string;
202
+ is_optional: boolean;
203
+ }[] | undefined;
204
+ branding?: {
205
+ logo_url?: string | undefined;
206
+ colors?: {
207
+ primary: string;
208
+ } | undefined;
209
+ } | undefined;
210
+ };
211
+ outputFormat: "json";
212
+ status: 200;
213
+ };
214
+ };
215
+ } & {
216
+ "/:id": {
217
+ $delete: {
218
+ input: {
219
+ param: {
220
+ id: string;
221
+ };
222
+ } & {
223
+ header: {
224
+ "tenant-id"?: string | undefined;
225
+ };
226
+ };
227
+ output: {};
228
+ outputFormat: string;
229
+ status: 204;
230
+ };
231
+ };
232
+ } & {
233
+ "/:id/custom-text/:language/:page": {
234
+ $get: {
235
+ input: {
236
+ param: {
237
+ id: string;
238
+ language: "en";
239
+ page: "get-started";
240
+ };
241
+ } & {
242
+ header: {
243
+ "tenant-id"?: string | undefined;
244
+ };
245
+ };
246
+ output: {
247
+ [x: string]: string;
248
+ };
249
+ outputFormat: "json";
250
+ status: 200;
251
+ };
252
+ };
253
+ } & {
254
+ "/:id/custom-text/:language/:page": {
255
+ $put: {
256
+ input: {
257
+ param: {
258
+ id: string;
259
+ language: "en";
260
+ page: "get-started";
261
+ };
262
+ } & {
263
+ header: {
264
+ "tenant-id"?: string | undefined;
265
+ };
266
+ } & {
267
+ json: Record<string, string>;
268
+ };
269
+ output: {
270
+ [x: string]: string;
271
+ };
272
+ outputFormat: "json";
273
+ status: 200;
274
+ };
275
+ };
276
+ } & {
277
+ "/:id/sso-ticket": {
278
+ $post: {
279
+ input: {
280
+ param: {
281
+ id: string;
282
+ };
283
+ } & {
284
+ header: {
285
+ "tenant-id"?: string | undefined;
286
+ };
287
+ } & {
288
+ json: {
289
+ connection_id?: string | undefined;
290
+ connection_config?: {
291
+ name: string;
292
+ display_name?: string | undefined;
293
+ is_domain_connection?: boolean | undefined;
294
+ show_as_button?: boolean | undefined;
295
+ metadata?: Record<string, string | null> | undefined;
296
+ options?: {
297
+ icon_url?: string | null | undefined;
298
+ domain_aliases?: string[] | null | undefined;
299
+ idpinitiated?: unknown;
300
+ } | null | undefined;
301
+ } | undefined;
302
+ enabled_clients?: string[] | undefined;
303
+ enabled_organizations?: {
304
+ organization_id: string;
305
+ assign_membership_on_login?: boolean | undefined;
306
+ show_as_button?: boolean | undefined;
307
+ }[] | undefined;
308
+ ttl_sec?: number | undefined;
309
+ domain_aliases_config?: {
310
+ domain_verification: "optional" | "none" | "required";
311
+ pending_domains?: unknown;
312
+ } | undefined;
313
+ provisioning_config?: unknown;
314
+ use_for_organization_discovery?: unknown;
315
+ third_party_client_access_config?: unknown;
316
+ universal_logout_config?: unknown;
317
+ enabled_features?: unknown;
318
+ };
319
+ };
320
+ output: {
321
+ ticket: string;
322
+ };
323
+ outputFormat: "json";
324
+ status: 201;
325
+ };
326
+ };
327
+ } & {
328
+ "/:profileId/sso-ticket/:id/revoke": {
329
+ $post: {
330
+ input: {
331
+ param: {
332
+ profileId: string;
333
+ id: string;
334
+ };
335
+ } & {
336
+ header: {
337
+ "tenant-id"?: string | undefined;
338
+ };
339
+ };
340
+ output: {};
341
+ outputFormat: string;
342
+ status: 202;
343
+ };
344
+ };
345
+ }, "/">;
@@ -17,16 +17,16 @@ export declare const operationRoutes: OpenAPIHono<{
17
17
  };
18
18
  output: {
19
19
  tenant_id: string | null;
20
- kind: "upgrade" | "backup" | "provision" | "seed" | "deprovision" | "users_import" | "sync-defaults" | "detach" | "tenant-members-request";
20
+ kind: "provision" | "seed" | "upgrade" | "backup" | "deprovision" | "users_import" | "sync-defaults" | "detach" | "tenant-members-request";
21
21
  engine: string;
22
22
  id: string;
23
- status: "pending" | "failed" | "succeeded" | "running" | "cancelled";
23
+ status: "pending" | "failed" | "running" | "succeeded" | "cancelled";
24
24
  created_at: string;
25
25
  updated_at: string;
26
26
  events: {
27
27
  operation_id: string;
28
28
  step: string;
29
- outcome: "failed" | "succeeded" | "started" | "retried" | "skipped" | "reconciled";
29
+ outcome: "failed" | "succeeded" | "skipped" | "started" | "retried" | "reconciled";
30
30
  attempt: number;
31
31
  id: string;
32
32
  created_at: string;
@@ -66,8 +66,8 @@ export declare const tenantOperationsRoutes: OpenAPIHono<{
66
66
  query: {
67
67
  page?: unknown;
68
68
  per_page?: unknown;
69
- kind?: "upgrade" | "backup" | "provision" | "seed" | "deprovision" | "users_import" | "sync-defaults" | "detach" | "tenant-members-request" | undefined;
70
- status?: "pending" | "failed" | "succeeded" | "running" | "cancelled" | undefined;
69
+ kind?: "provision" | "seed" | "upgrade" | "backup" | "deprovision" | "users_import" | "sync-defaults" | "detach" | "tenant-members-request" | undefined;
70
+ status?: "pending" | "failed" | "running" | "succeeded" | "cancelled" | undefined;
71
71
  rollout_id?: string | undefined;
72
72
  };
73
73
  } & {
@@ -78,10 +78,10 @@ export declare const tenantOperationsRoutes: OpenAPIHono<{
78
78
  output: {
79
79
  operations: {
80
80
  tenant_id: string | null;
81
- kind: "upgrade" | "backup" | "provision" | "seed" | "deprovision" | "users_import" | "sync-defaults" | "detach" | "tenant-members-request";
81
+ kind: "provision" | "seed" | "upgrade" | "backup" | "deprovision" | "users_import" | "sync-defaults" | "detach" | "tenant-members-request";
82
82
  engine: string;
83
83
  id: string;
84
- status: "pending" | "failed" | "succeeded" | "running" | "cancelled";
84
+ status: "pending" | "failed" | "running" | "succeeded" | "cancelled";
85
85
  created_at: string;
86
86
  updated_at: string;
87
87
  rollout_id?: string | null | undefined;
@@ -118,7 +118,7 @@ export declare const tenantOperationsRoutes: OpenAPIHono<{
118
118
  };
119
119
  } & {
120
120
  json: {
121
- kind: "upgrade" | "backup" | "provision" | "seed" | "deprovision" | "users_import" | "sync-defaults" | "detach" | "tenant-members-request";
121
+ kind: "provision" | "seed" | "upgrade" | "backup" | "deprovision" | "users_import" | "sync-defaults" | "detach" | "tenant-members-request";
122
122
  input?: {
123
123
  dry_run?: boolean | undefined;
124
124
  force?: boolean | undefined;
@@ -129,10 +129,10 @@ export declare const tenantOperationsRoutes: OpenAPIHono<{
129
129
  };
130
130
  output: {
131
131
  tenant_id: string | null;
132
- kind: "upgrade" | "backup" | "provision" | "seed" | "deprovision" | "users_import" | "sync-defaults" | "detach" | "tenant-members-request";
132
+ kind: "provision" | "seed" | "upgrade" | "backup" | "deprovision" | "users_import" | "sync-defaults" | "detach" | "tenant-members-request";
133
133
  engine: string;
134
134
  id: string;
135
- status: "pending" | "failed" | "succeeded" | "running" | "cancelled";
135
+ status: "pending" | "failed" | "running" | "succeeded" | "cancelled";
136
136
  created_at: string;
137
137
  updated_at: string;
138
138
  rollout_id?: string | null | undefined;
@@ -218,17 +218,23 @@ export declare const tenantRoutes: OpenAPIHono<{
218
218
  };
219
219
  } & {
220
220
  json: {
221
- sender_email?: string | null | undefined;
222
- sender_name?: string | undefined;
223
- friendly_name?: string | undefined;
221
+ allowed_logout_urls?: string[] | undefined;
222
+ oidc_logout?: {
223
+ rp_logout_end_session_endpoint_discovery?: boolean | undefined;
224
+ } | undefined;
225
+ default_organization?: string | undefined;
226
+ id?: string | undefined;
227
+ audience?: string | undefined;
224
228
  parent_tenant_id?: string | null | undefined;
225
229
  config_sync?: "inherit-on-read" | "synced" | "detached" | null | undefined;
226
230
  config_sync_hash?: string | null | undefined;
227
231
  config_synced_at?: string | null | undefined;
228
- audience?: string | undefined;
232
+ friendly_name?: string | undefined;
229
233
  picture_url?: string | undefined;
230
234
  support_email?: string | undefined;
231
235
  support_url?: string | undefined;
236
+ sender_email?: string | null | undefined;
237
+ sender_name?: string | undefined;
232
238
  session_lifetime?: number | undefined;
233
239
  idle_session_lifetime?: number | undefined;
234
240
  ephemeral_session_lifetime?: number | undefined;
@@ -236,7 +242,6 @@ export declare const tenantRoutes: OpenAPIHono<{
236
242
  session_cookie?: {
237
243
  mode?: "persistent" | "non-persistent" | undefined;
238
244
  } | undefined;
239
- allowed_logout_urls?: string[] | undefined;
240
245
  default_redirection_uri?: string | undefined;
241
246
  default_client_id?: string | undefined;
242
247
  enabled_locales?: string[] | undefined;
@@ -310,13 +315,9 @@ export declare const tenantRoutes: OpenAPIHono<{
310
315
  } | undefined;
311
316
  } | null | undefined;
312
317
  default_audience?: string | undefined;
313
- default_organization?: string | undefined;
314
318
  sessions?: {
315
319
  oidc_logout_prompt_enabled?: boolean | undefined;
316
320
  } | undefined;
317
- oidc_logout?: {
318
- rp_logout_end_session_endpoint_discovery?: boolean | undefined;
319
- } | undefined;
320
321
  allow_organization_name_in_authentication_api?: boolean | undefined;
321
322
  customize_mfa_in_postlogin_action?: boolean | undefined;
322
323
  acr_values_supported?: string[] | undefined;
@@ -399,7 +400,6 @@ export declare const tenantRoutes: OpenAPIHono<{
399
400
  allow_remember_browser?: boolean | undefined;
400
401
  remember_browser_lifetime_in_days?: number | undefined;
401
402
  } | undefined;
402
- id?: string | undefined;
403
403
  };
404
404
  };
405
405
  output: {
@@ -77,13 +77,13 @@ export declare const themesRoutes: OpenAPIHono<{
77
77
  page_background: {
78
78
  background_color: string;
79
79
  background_image_url: string;
80
- page_layout: "left" | "right" | "center";
80
+ page_layout: "center" | "left" | "right";
81
81
  logo_placement?: "none" | "widget" | "chip" | undefined;
82
82
  };
83
83
  widget: {
84
- header_text_alignment: "left" | "right" | "center";
84
+ header_text_alignment: "center" | "left" | "right";
85
85
  logo_height: number;
86
- logo_position: "none" | "left" | "right" | "center";
86
+ logo_position: "none" | "center" | "left" | "right";
87
87
  logo_url: string;
88
88
  social_buttons_layout: "bottom" | "top";
89
89
  };
@@ -167,13 +167,13 @@ export declare const themesRoutes: OpenAPIHono<{
167
167
  page_background: {
168
168
  background_color: string;
169
169
  background_image_url: string;
170
- page_layout: "left" | "right" | "center";
170
+ page_layout: "center" | "left" | "right";
171
171
  logo_placement?: "none" | "widget" | "chip" | undefined;
172
172
  };
173
173
  widget: {
174
- header_text_alignment: "left" | "right" | "center";
174
+ header_text_alignment: "center" | "left" | "right";
175
175
  logo_height: number;
176
- logo_position: "none" | "left" | "right" | "center";
176
+ logo_position: "none" | "center" | "left" | "right";
177
177
  logo_url: string;
178
178
  social_buttons_layout: "bottom" | "top";
179
179
  };
@@ -246,13 +246,13 @@ export declare const themesRoutes: OpenAPIHono<{
246
246
  page_background: {
247
247
  background_color: string;
248
248
  background_image_url: string;
249
- page_layout: "left" | "right" | "center";
249
+ page_layout: "center" | "left" | "right";
250
250
  logo_placement?: "none" | "widget" | "chip" | undefined;
251
251
  };
252
252
  widget: {
253
- header_text_alignment: "left" | "right" | "center";
253
+ header_text_alignment: "center" | "left" | "right";
254
254
  logo_height: number;
255
- logo_position: "none" | "left" | "right" | "center";
255
+ logo_position: "none" | "center" | "left" | "right";
256
256
  logo_url: string;
257
257
  social_buttons_layout: "bottom" | "top";
258
258
  };