authhero 9.19.0 → 9.21.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/p-dc0662ad.entry.js +1 -0
- package/dist/authhero.cjs +182 -170
- package/dist/authhero.d.ts +257 -127
- package/dist/authhero.mjs +18457 -15928
- package/dist/tsconfig.types.tsbuildinfo +1 -1
- package/dist/types/authentication-flows/auth0-migration.d.ts +2 -2
- package/dist/types/authentication-flows/email-verification.d.ts +74 -0
- package/dist/types/authentication-flows/password.d.ts +3 -2
- package/dist/types/authentication-flows/passwordless.d.ts +3 -3
- package/dist/types/emails/index.d.ts +27 -1
- package/dist/types/generated/locale-types.d.ts +283 -0
- package/dist/types/helpers/dcr/metadata-mapping.d.ts +1 -1
- package/dist/types/helpers/default-destinations.d.ts +7 -1
- package/dist/types/helpers/outbox-destinations/code-hooks.d.ts +5 -1
- package/dist/types/helpers/request-data.d.ts +24 -0
- package/dist/types/helpers/reserved-claims.d.ts +2 -2
- package/dist/types/helpers/run-outbox-relay.d.ts +7 -1
- package/dist/types/hooks/codehooks.d.ts +14 -1
- package/dist/types/index.d.ts +182 -124
- package/dist/types/routes/auth-api/account.d.ts +2 -2
- package/dist/types/routes/auth-api/index.d.ts +10 -10
- 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/management-api/action-executions.d.ts +2 -2
- package/dist/types/routes/management-api/action-triggers.d.ts +1 -1
- package/dist/types/routes/management-api/actions.d.ts +1 -1
- package/dist/types/routes/management-api/authentication-methods.d.ts +1 -1
- package/dist/types/routes/management-api/branding.d.ts +1 -1
- package/dist/types/routes/management-api/clients.d.ts +14 -14
- package/dist/types/routes/management-api/failed-events.d.ts +51 -1
- package/dist/types/routes/management-api/flows.d.ts +7 -7
- 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 +1 -1
- package/dist/types/routes/management-api/index.d.ts +153 -95
- package/dist/types/routes/management-api/keys.d.ts +8 -8
- package/dist/types/routes/management-api/log-streams.d.ts +6 -6
- package/dist/types/routes/management-api/logs.d.ts +4 -4
- package/dist/types/routes/management-api/organizations.d.ts +3 -3
- package/dist/types/routes/management-api/prompts.d.ts +4 -4
- package/dist/types/routes/management-api/roles.d.ts +11 -3
- package/dist/types/routes/management-api/tenant-export-import.d.ts +5 -5
- package/dist/types/routes/management-api/tenants.d.ts +2 -2
- package/dist/types/routes/management-api/users.d.ts +11 -11
- package/dist/types/routes/universal-login/common.d.ts +8 -8
- package/dist/types/routes/universal-login/error-page.d.ts +9 -2
- package/dist/types/routes/universal-login/flow-api.d.ts +8 -8
- package/dist/types/routes/universal-login/index.d.ts +2 -2
- package/dist/types/routes/universal-login/sanitization-utils.d.ts +7 -0
- package/dist/types/routes/universal-login/screen-prompt-map.d.ts +2 -0
- package/dist/types/routes/universal-login/screens/email-verification.d.ts +29 -0
- package/dist/types/routes/universal-login/screens/handler-error.d.ts +11 -0
- package/dist/types/routes/universal-login/screens/reset-password.d.ts +5 -1
- package/dist/types/routes/universal-login/screens/signup.d.ts +6 -0
- 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/types/AuthError.d.ts +1 -1
- package/dist/types/types/AuthHeroConfig.d.ts +25 -0
- package/dist/types/types/Bindings.d.ts +8 -1
- package/dist/types/types/Variables.d.ts +26 -1
- package/package.json +6 -6
- package/dist/assets/u/widget/p-36898e2d.entry.js +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CodeExecutor, DataAdapters } from "@authhero/adapter-interfaces";
|
|
2
|
-
import type { WebhookInvoker } from "../types/AuthHeroConfig";
|
|
2
|
+
import type { ActionExecutionLogCapture, WebhookInvoker } from "../types/AuthHeroConfig";
|
|
3
3
|
import type { OutboxMetricsSink } from "../types/OutboxMetrics";
|
|
4
4
|
export interface RunOutboxRelayConfig {
|
|
5
5
|
/** Same `DataAdapters` passed to `init()`. Must include `outbox` to drain. */
|
|
@@ -32,6 +32,12 @@ export interface RunOutboxRelayConfig {
|
|
|
32
32
|
* silently skipped.
|
|
33
33
|
*/
|
|
34
34
|
codeExecutor?: CodeExecutor;
|
|
35
|
+
/**
|
|
36
|
+
* Same value as `init({ actionExecutionLogs })`, so code hooks run by this
|
|
37
|
+
* cron drain persist console output the same way as inline deliveries.
|
|
38
|
+
* Defaults to `"full"`.
|
|
39
|
+
*/
|
|
40
|
+
actionExecutionLogs?: ActionExecutionLogCapture;
|
|
35
41
|
/**
|
|
36
42
|
* Optional metrics sink — same shape as `init({ outbox: { metrics } })`.
|
|
37
43
|
* Receives `outbox_events_processed_total`,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Context } from "hono";
|
|
2
2
|
import { ActionExecutionLogs, ActionExecutionResult, CodeExecutionLog, CodeExecutor, DataAdapters, Hook } from "@authhero/adapter-interfaces";
|
|
3
3
|
import { Bindings, Variables } from "../types";
|
|
4
|
+
import type { ActionExecutionLogCapture } from "../types/AuthHeroConfig";
|
|
4
5
|
import { HookEvent, OnExecuteCredentialsExchangeAPI } from "../types/Hooks";
|
|
5
6
|
import { EnrichedClient } from "../helpers/client";
|
|
6
7
|
/**
|
|
@@ -152,12 +153,24 @@ export declare const MAX_PERSISTED_LOG_CHARS = 256;
|
|
|
152
153
|
* output and is not itself charged against the budget.
|
|
153
154
|
*/
|
|
154
155
|
export declare function capActionExecutionLogs(logs: ActionExecutionLogs, budget?: number): ActionExecutionLogs;
|
|
156
|
+
/**
|
|
157
|
+
* Select the outcomes whose console output may be persisted under the
|
|
158
|
+
* configured `actionExecutionLogs` mode. `"errors"` keeps only outcomes that
|
|
159
|
+
* errored or denied access. Any value other than the documented modes (a
|
|
160
|
+
* JS caller passing `"OFF"`, say) fails closed and persists nothing.
|
|
161
|
+
*/
|
|
162
|
+
export declare function selectPersistedLogOutcomes(outcomes: HandleCodeHookOutcome[], logCapture?: ActionExecutionLogCapture): HandleCodeHookOutcome[];
|
|
155
163
|
/**
|
|
156
164
|
* Aggregate per-action outcomes into an Auth0-shape execution record and
|
|
157
165
|
* persist it via the adapter. Returns the generated execution_id (uuid)
|
|
158
166
|
* so the caller can embed it in the surrounding tenant log.
|
|
167
|
+
*
|
|
168
|
+
* `options.logCapture` (from `init({ actionExecutionLogs })`) decides which
|
|
169
|
+
* console output reaches `logs`; the rest of the record is always written.
|
|
159
170
|
*/
|
|
160
|
-
export declare function persistActionExecution(data: Pick<DataAdapters, "actionExecutions">, tenant_id: string, triggerId: string, outcomes: HandleCodeHookOutcome[]
|
|
171
|
+
export declare function persistActionExecution(data: Pick<DataAdapters, "actionExecutions">, tenant_id: string, triggerId: string, outcomes: HandleCodeHookOutcome[], options?: {
|
|
172
|
+
logCapture?: ActionExecutionLogCapture;
|
|
173
|
+
}): Promise<string | null>;
|
|
161
174
|
/**
|
|
162
175
|
* Execute code hooks for the credentials-exchange trigger.
|
|
163
176
|
* Filters enabled code hooks from the provided hooks list and executes them.
|