import { Context } from "hono";
import { DataAdapters, LogType } from "@authhero/adapter-interfaces";
import { Variables, Bindings } from "../types";
export type LogParams = {
    type: LogType;
    description?: string;
    userId?: string;
    /**
     * Identifier of the actor when it differs from the subject `userId`
     * (e.g. impersonation). When set, audit events attribute `actor.id` to
     * this value and `target.id` to `userId`, and the event is categorised as
     * `admin_action`.
     */
    actorUserId?: string;
    body?: unknown;
    strategy?: string;
    strategy_type?: string;
    connection?: string;
    audience?: string;
    scope?: string;
    /**
     * Response details to include in the log (for Management API operations)
     */
    response?: {
        statusCode: number;
        body?: unknown;
    };
    /**
     * When provided, replaces the auto-generated details object entirely.
     * Use this to store a compact, pre-built details payload (e.g. for webhook logs)
     * that fits within storage limits (Analytics Engine blob: 1024 bytes).
     */
    details?: Record<string, unknown>;
    /**
     * If true, wait for the log to complete before returning.
     * If false (default), execute logging asynchronously in the background.
     * @default false
     */
    waitForCompletion?: boolean;
    /** Entity state before the mutation (for audit events) */
    beforeState?: Record<string, unknown>;
    /** Entity state after the mutation (for audit events) */
    afterState?: Record<string, unknown>;
    /** Entity type being mutated (e.g. 'user', 'client', 'connection') */
    targetType?: string;
    /** Entity ID being mutated */
    targetId?: string;
};
export declare function logMessage(ctx: Context<{
    Bindings: Bindings;
    Variables: Variables;
}>, tenantId: string, params: LogParams): Promise<void>;
/**
 * Transactional variant of {@link logMessage}. Writes the audit event to the
 * outbox through the caller-provided `trxData` so the insert commits (or rolls
 * back) with the surrounding business write. Returns the event id so the
 * caller can hand it to the outbox middleware for destination delivery.
 *
 * Only intended for outbox-enabled deployments; callers should fall back to
 * `logMessage` when `ctx.env.outbox?.enabled` is false.
 */
export declare function logMessageInTx(ctx: Context<{
    Bindings: Bindings;
    Variables: Variables;
}>, trxData: DataAdapters, tenantId: string, params: LogParams): Promise<string | undefined>;
