authhero 8.7.1 → 8.8.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/dist/assets/u/widget/authhero-widget.esm.js +1 -1
- package/dist/assets/u/widget/index.esm.js +1 -1
- package/dist/assets/u/widget/p-52a70476.entry.js +1 -0
- package/dist/authhero.cjs +104 -103
- package/dist/authhero.d.ts +256 -212
- package/dist/authhero.mjs +9669 -9519
- package/dist/stats.html +1 -1
- package/dist/tsconfig.types.tsbuildinfo +1 -1
- package/dist/types/authentication-flows/passwordless.d.ts +4 -3
- package/dist/types/helpers/client.d.ts +1 -0
- package/dist/types/helpers/dcr/metadata-mapping.d.ts +2 -2
- package/dist/types/helpers/mutable-response.d.ts +38 -0
- package/dist/types/index.d.ts +194 -211
- package/dist/types/routes/auth-api/index.d.ts +26 -26
- package/dist/types/routes/auth-api/passwordless.d.ts +8 -8
- package/dist/types/routes/auth-api/register/index.d.ts +2 -2
- package/dist/types/routes/auth-api/revoke.d.ts +6 -6
- package/dist/types/routes/auth-api/token.d.ts +10 -10
- package/dist/types/routes/management-api/authentication-methods.d.ts +1 -1
- package/dist/types/routes/management-api/clients.d.ts +7 -7
- package/dist/types/routes/management-api/connections.d.ts +1 -1
- package/dist/types/routes/management-api/custom-domains.d.ts +6 -6
- package/dist/types/routes/management-api/forms.d.ts +126 -126
- package/dist/types/routes/management-api/guardian.d.ts +5 -5
- package/dist/types/routes/management-api/index.d.ts +162 -162
- package/dist/types/routes/management-api/logs.d.ts +3 -3
- package/dist/types/routes/management-api/migration-sources.d.ts +6 -6
- package/dist/types/routes/management-api/organizations.d.ts +1 -1
- package/dist/types/routes/management-api/prompts.d.ts +4 -4
- package/dist/types/routes/management-api/tenants.d.ts +207 -3
- package/dist/types/routes/management-api/users.d.ts +2 -2
- package/dist/types/routes/universal-login/common.d.ts +6 -2
- package/dist/types/routes/universal-login/flow-api.d.ts +8 -8
- package/dist/types/routes/universal-login/screens/connect-authz.d.ts +41 -0
- package/dist/types/routes/universal-login/u2-index.d.ts +5 -23
- package/dist/types/routes/universal-login/u2-routes.d.ts +5 -23
- package/dist/types/routes/universal-login/u2-widget-page.d.ts +6 -0
- package/dist/types/types/AuthHeroConfig.d.ts +21 -0
- package/dist/types/types/Bindings.d.ts +1 -0
- package/dist/types/types/IdToken.d.ts +2 -2
- package/package.json +5 -5
- package/dist/assets/u/widget/p-5a319adc.entry.js +0 -1
|
@@ -239,6 +239,7 @@ export declare function passwordlessGrantUser(ctx: Context<{
|
|
|
239
239
|
provisioning_state_changed_at?: string | undefined;
|
|
240
240
|
bundle_configuration?: string | undefined;
|
|
241
241
|
worker_version?: string | undefined;
|
|
242
|
+
database_version?: string | undefined;
|
|
242
243
|
worker_script_name?: string | undefined;
|
|
243
244
|
storage_kind?: "own_d1" | "existing_d1" | "shared_planetscale" | undefined;
|
|
244
245
|
d1_database_id?: string | undefined;
|
|
@@ -457,7 +458,7 @@ export declare function passwordlessGrantUser(ctx: Context<{
|
|
|
457
458
|
custom_login_page_preview?: string | undefined;
|
|
458
459
|
form_template?: string | undefined;
|
|
459
460
|
addons?: Record<string, any> | undefined;
|
|
460
|
-
token_endpoint_auth_method?: "
|
|
461
|
+
token_endpoint_auth_method?: "client_secret_post" | "client_secret_basic" | "none" | "client_secret_jwt" | "private_key_jwt" | undefined;
|
|
461
462
|
client_metadata?: Record<string, string> | undefined;
|
|
462
463
|
hide_sign_up_disabled_error?: boolean | undefined;
|
|
463
464
|
mobile?: Record<string, any> | undefined;
|
|
@@ -540,8 +541,8 @@ export declare function passwordlessGrantUser(ctx: Context<{
|
|
|
540
541
|
} | undefined;
|
|
541
542
|
authenticated_at?: string | undefined;
|
|
542
543
|
};
|
|
543
|
-
connectionType: "username" | "
|
|
544
|
-
authConnection: "username" | "
|
|
544
|
+
connectionType: "username" | "email" | "sms";
|
|
545
|
+
authConnection: "username" | "email" | "sms";
|
|
545
546
|
session_id: string | undefined;
|
|
546
547
|
authParams: {
|
|
547
548
|
client_id: string;
|
|
@@ -255,6 +255,7 @@ export declare const enrichedClientSchema: z.ZodObject<{
|
|
|
255
255
|
provisioning_state_changed_at: z.ZodOptional<z.ZodString>;
|
|
256
256
|
bundle_configuration: z.ZodOptional<z.ZodString>;
|
|
257
257
|
worker_version: z.ZodOptional<z.ZodString>;
|
|
258
|
+
database_version: z.ZodOptional<z.ZodString>;
|
|
258
259
|
worker_script_name: z.ZodOptional<z.ZodString>;
|
|
259
260
|
storage_kind: z.ZodOptional<z.ZodEnum<{
|
|
260
261
|
own_d1: "own_d1";
|
|
@@ -23,11 +23,11 @@ export declare const dcrRequestSchema: z.ZodObject<{
|
|
|
23
23
|
grant_types: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
24
24
|
response_types: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
25
25
|
token_endpoint_auth_method: z.ZodOptional<z.ZodEnum<{
|
|
26
|
-
none: "none";
|
|
27
|
-
private_key_jwt: "private_key_jwt";
|
|
28
26
|
client_secret_post: "client_secret_post";
|
|
29
27
|
client_secret_basic: "client_secret_basic";
|
|
28
|
+
none: "none";
|
|
30
29
|
client_secret_jwt: "client_secret_jwt";
|
|
30
|
+
private_key_jwt: "private_key_jwt";
|
|
31
31
|
}>>;
|
|
32
32
|
jwks_uri: z.ZodOptional<z.ZodString>;
|
|
33
33
|
jwks: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Normalizing a response so middleware can write headers onto it.
|
|
3
|
+
*
|
|
4
|
+
* A response that the worker *received* — from `fetch()`, a Workers-for-Platforms
|
|
5
|
+
* dispatch (`DISPATCHER.get(name).fetch()`), the Cache API, or R2 — carries an
|
|
6
|
+
* *immutable* header guard. Calling `headers.set()` / `headers.append()` on it
|
|
7
|
+
* throws `TypeError: Can't modify immutable headers.`. Responses built in-worker
|
|
8
|
+
* (`c.json()`, `c.text()`, `new Response(...)`) are mutable.
|
|
9
|
+
*
|
|
10
|
+
* Any middleware that annotates the response after `next()` (CORS, Server-Timing,
|
|
11
|
+
* `Preference-Applied`, …) must therefore tolerate an immutable response. Rather
|
|
12
|
+
* than guard each write with a try/catch, normalize once: re-wrapping is cheap
|
|
13
|
+
* (the body stream is passed through, not copied) and deterministic, so there is
|
|
14
|
+
* nothing to detect.
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* Return a response whose headers are mutable. A received response is re-wrapped
|
|
18
|
+
* into a fresh `Response` (which has the mutable "response" header guard); an
|
|
19
|
+
* already-mutable response is re-wrapped too, harmlessly, preserving every header
|
|
20
|
+
* already set on it.
|
|
21
|
+
*
|
|
22
|
+
* A `101 Switching Protocols` upgrade is returned untouched: it carries a
|
|
23
|
+
* `webSocket` handle that reconstruction would drop, breaking the upgrade. Its
|
|
24
|
+
* headers stay immutable, so callers must not write to an upgrade response.
|
|
25
|
+
*/
|
|
26
|
+
export declare function toMutableResponse(res: Response): Response;
|
|
27
|
+
/**
|
|
28
|
+
* Ensure `c.res` is safe to write headers onto, re-wrapping a received
|
|
29
|
+
* (immutable) response in place. Typed structurally so it accepts any Hono
|
|
30
|
+
* `Context` regardless of its `Bindings`/`Variables` generics.
|
|
31
|
+
*
|
|
32
|
+
* Note the 101 carve-out in {@link toMutableResponse}: for an upgrade response
|
|
33
|
+
* this is a no-op and the headers remain immutable, so a caller that may face a
|
|
34
|
+
* 101 must still skip its header writes for it.
|
|
35
|
+
*/
|
|
36
|
+
export declare function ensureMutableResponse(c: {
|
|
37
|
+
res: Response;
|
|
38
|
+
}): void;
|