authhero 8.23.1 → 8.25.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/index.esm.js +1 -1
- package/dist/authhero.cjs +139 -142
- package/dist/authhero.d.ts +1073 -292
- package/dist/authhero.mjs +20321 -15480
- package/dist/tsconfig.types.tsbuildinfo +1 -1
- package/dist/types/adapters/control-plane-custom-domains.d.ts +35 -0
- package/dist/types/authentication-flows/passwordless.d.ts +4 -4
- package/dist/types/helpers/control-plane-client.d.ts +46 -0
- package/dist/types/helpers/control-plane-sync-events.d.ts +12 -28
- package/dist/types/index.d.ts +326 -246
- package/dist/types/routes/auth-api/index.d.ts +28 -28
- package/dist/types/routes/auth-api/passwordless.d.ts +12 -12
- package/dist/types/routes/auth-api/register/index.d.ts +2 -2
- package/dist/types/routes/auth-api/revoke.d.ts +2 -2
- package/dist/types/routes/auth-api/token.d.ts +12 -12
- package/dist/types/routes/management-api/authentication-methods.d.ts +1 -1
- package/dist/types/routes/management-api/clients.d.ts +14 -14
- package/dist/types/routes/management-api/connections.d.ts +16 -16
- package/dist/types/routes/management-api/custom-domains.d.ts +6 -6
- package/dist/types/routes/management-api/email-templates.d.ts +18 -18
- 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/helpers.d.ts +47 -0
- package/dist/types/routes/management-api/index.d.ts +280 -211
- package/dist/types/routes/management-api/logs.d.ts +4 -4
- package/dist/types/routes/management-api/migration-sources.d.ts +6 -6
- package/dist/types/routes/management-api/organizations.d.ts +8 -8
- package/dist/types/routes/management-api/prompts.d.ts +4 -4
- package/dist/types/routes/management-api/roles.d.ts +1 -1
- package/dist/types/routes/management-api/tenant-members.d.ts +304 -0
- package/dist/types/routes/management-api/tenant-members.test.d.ts +1 -0
- package/dist/types/routes/management-api/tenants.d.ts +8 -8
- package/dist/types/routes/management-api/users.d.ts +71 -2
- package/dist/types/routes/proxy-control-plane/custom-domains.d.ts +45 -0
- package/dist/types/routes/proxy-control-plane/index.d.ts +47 -6
- package/dist/types/routes/proxy-control-plane/scopes.d.ts +20 -0
- package/dist/types/routes/proxy-control-plane/tenant-members.d.ts +37 -0
- package/dist/types/routes/proxy-control-plane/verify.d.ts +29 -4
- package/dist/types/routes/proxy-control-plane/verify.test.d.ts +1 -0
- package/dist/types/routes/universal-login/common.d.ts +8 -8
- package/dist/types/routes/universal-login/flow-api.d.ts +12 -12
- package/dist/types/routes/universal-login/identifier.d.ts +2 -2
- package/dist/types/routes/universal-login/index.d.ts +2 -2
- package/dist/types/routes/universal-login/u2-index.d.ts +5 -5
- package/dist/types/routes/universal-login/u2-routes.d.ts +5 -5
- package/dist/types/tenant-members/control-plane-roundtrip.test.d.ts +1 -0
- package/dist/types/tenant-members/local-backend.d.ts +43 -0
- package/dist/types/tenant-members/local-backend.test.d.ts +1 -0
- package/dist/types/tenant-members/remote-backend.d.ts +17 -0
- package/dist/types/tenant-members/types.d.ts +112 -0
- package/dist/types/tenant-members/wire.d.ts +28 -0
- package/dist/types/types/AuthHeroConfig.d.ts +54 -7
- package/dist/types/types/IdToken.d.ts +4 -4
- package/package.json +6 -6
|
@@ -12,7 +12,7 @@ export declare const guardianRoutes: OpenAPIHono<{
|
|
|
12
12
|
};
|
|
13
13
|
};
|
|
14
14
|
output: {
|
|
15
|
-
name: "email" | "sms" | "otp" | "duo" | "
|
|
15
|
+
name: "email" | "sms" | "otp" | "duo" | "push-notification" | "webauthn-roaming" | "webauthn-platform" | "recovery-code";
|
|
16
16
|
enabled: boolean;
|
|
17
17
|
trial_expired?: boolean | undefined;
|
|
18
18
|
}[];
|
|
@@ -167,7 +167,7 @@ export declare const guardianRoutes: OpenAPIHono<{
|
|
|
167
167
|
$get: {
|
|
168
168
|
input: {
|
|
169
169
|
param: {
|
|
170
|
-
factor_name: "email" | "sms" | "otp" | "duo" | "
|
|
170
|
+
factor_name: "email" | "sms" | "otp" | "duo" | "push-notification" | "webauthn-roaming" | "webauthn-platform" | "recovery-code";
|
|
171
171
|
};
|
|
172
172
|
} & {
|
|
173
173
|
header: {
|
|
@@ -175,7 +175,7 @@ export declare const guardianRoutes: OpenAPIHono<{
|
|
|
175
175
|
};
|
|
176
176
|
};
|
|
177
177
|
output: {
|
|
178
|
-
name: "email" | "sms" | "otp" | "duo" | "
|
|
178
|
+
name: "email" | "sms" | "otp" | "duo" | "push-notification" | "webauthn-roaming" | "webauthn-platform" | "recovery-code";
|
|
179
179
|
enabled: boolean;
|
|
180
180
|
trial_expired?: boolean | undefined;
|
|
181
181
|
};
|
|
@@ -188,7 +188,7 @@ export declare const guardianRoutes: OpenAPIHono<{
|
|
|
188
188
|
$put: {
|
|
189
189
|
input: {
|
|
190
190
|
param: {
|
|
191
|
-
factor_name: "email" | "sms" | "otp" | "duo" | "
|
|
191
|
+
factor_name: "email" | "sms" | "otp" | "duo" | "push-notification" | "webauthn-roaming" | "webauthn-platform" | "recovery-code";
|
|
192
192
|
};
|
|
193
193
|
} & {
|
|
194
194
|
header: {
|
|
@@ -200,7 +200,7 @@ export declare const guardianRoutes: OpenAPIHono<{
|
|
|
200
200
|
};
|
|
201
201
|
};
|
|
202
202
|
output: {
|
|
203
|
-
name: "email" | "sms" | "otp" | "duo" | "
|
|
203
|
+
name: "email" | "sms" | "otp" | "duo" | "push-notification" | "webauthn-roaming" | "webauthn-platform" | "recovery-code";
|
|
204
204
|
enabled: boolean;
|
|
205
205
|
trial_expired?: boolean | undefined;
|
|
206
206
|
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { z } from "@hono/zod-openapi";
|
|
2
|
+
/**
|
|
3
|
+
* Returns the tenant id resolved by tenantMiddleware, or throws the
|
|
4
|
+
* management API's standard 400 when the request carries no tenant (no
|
|
5
|
+
* `tenant-id` header, no tenant subdomain/custom domain, and no
|
|
6
|
+
* single-tenant fallback).
|
|
7
|
+
*
|
|
8
|
+
* Structurally typed on purpose: handler contexts are narrowed per-route by
|
|
9
|
+
* `defineRoute`, so accepting the full hono `Context` generic here would
|
|
10
|
+
* force every call site to line up generics for a helper that only reads
|
|
11
|
+
* one variable.
|
|
12
|
+
*/
|
|
13
|
+
export declare function requireTenantId(ctx: {
|
|
14
|
+
var: {
|
|
15
|
+
tenant_id?: string;
|
|
16
|
+
};
|
|
17
|
+
}): string;
|
|
18
|
+
/**
|
|
19
|
+
* Schema factory for the `include_totals` list-response shape:
|
|
20
|
+
* `{ start, limit, length, total?, next?, <resource>: [...] }`.
|
|
21
|
+
*
|
|
22
|
+
* `withTotals({ roles: z.array(roleSchema) })` replaces the
|
|
23
|
+
* `totalsSchema.extend({ roles: z.array(roleSchema) })` pattern repeated
|
|
24
|
+
* across the management-api modules.
|
|
25
|
+
*/
|
|
26
|
+
export declare function withTotals<T extends z.ZodRawShape>(items: T): z.ZodObject<(("length" | "start" | "limit" | "total" | "next") & keyof T extends never ? {
|
|
27
|
+
start: z.ZodNumber;
|
|
28
|
+
limit: z.ZodNumber;
|
|
29
|
+
length: z.ZodNumber;
|
|
30
|
+
total: z.ZodOptional<z.ZodNumber>;
|
|
31
|
+
next: z.ZodOptional<z.ZodString>;
|
|
32
|
+
} & { -readonly [P in keyof T]: T[P]; } : ({
|
|
33
|
+
start: z.ZodNumber;
|
|
34
|
+
limit: z.ZodNumber;
|
|
35
|
+
length: z.ZodNumber;
|
|
36
|
+
total: z.ZodOptional<z.ZodNumber>;
|
|
37
|
+
next: z.ZodOptional<z.ZodString>;
|
|
38
|
+
} extends infer T_2 extends z.core.util.SomeObject ? { [K in keyof T_2 as K extends keyof T ? never : K]: T_2[K]; } : never) & { [K_1 in keyof { -readonly [P in keyof T]: T[P]; }]: { -readonly [P in keyof T]: T[P]; }[K_1]; }) extends infer T_1 ? { [k in keyof T_1]: T_1[k]; } : never, z.core.$strip>;
|
|
39
|
+
/**
|
|
40
|
+
* Picks the list-response body for the `include_totals` branch every list
|
|
41
|
+
* handler repeats: the full totals envelope when `include_totals` is set,
|
|
42
|
+
* otherwise the bare item array under `key`.
|
|
43
|
+
*
|
|
44
|
+
* The caller keeps its own `ctx.json(...)` so hono's per-route response
|
|
45
|
+
* typing still applies.
|
|
46
|
+
*/
|
|
47
|
+
export declare function listResponse<T extends object, K extends keyof T>(include_totals: boolean | undefined, result: T, key: K): T | T[K];
|