import { DataAdapters, User } from "@authhero/adapter-interfaces";
export interface CommitUserResult {
    user: User;
    created: boolean;
}
export interface CommitUserOptions {
    /**
     * When true, attempt the legacy email-based primary lookup inside the
     * commit transaction. When the user has a verified email and no
     * `linked_to` is already set (e.g. by a pre-user-registration hook), the
     * commit will automatically point `linked_to` at the existing primary
     * user with the same email.
     *
     * Disable this to make linking opt-in via the `account-linking` template
     * hook (the current direction of travel — long-term the legacy lookup
     * goes away entirely).
     */
    resolveEmailLinkedPrimary?: boolean;
}
/**
 * Commits a new user inside a transaction. Validates `linked_to` (if set),
 * runs `rawCreate`, and recovers from concurrent-create races.
 *
 * Optionally performs the legacy email→primary auto-link lookup inside the
 * same transaction (see {@link CommitUserOptions.resolveEmailLinkedPrimary}).
 * Whether it runs is decided by the caller via
 * `builtInUserLinkingEnabled(ctx, tenant_id, client_id)`.
 */
export declare function commitUserHook(data: DataAdapters): (tenant_id: string, user: User, options?: CommitUserOptions) => Promise<CommitUserResult>;
