import type { ChannelId } from "../channels/plugins/types.public.js";
import type { DaoCoreConfig } from "../config/types.daocore.js";
import { type AccessGroupMembershipResolver } from "./access-groups.js";
import { type DmGroupAccessReasonCode } from "./channel-access-compat.js";
export type { AccessGroupMembershipResolver } from "./access-groups.js";
export type DirectDmCommandAuthorizationRuntime = {
    shouldComputeCommandAuthorized: (rawBody: string, cfg: DaoCoreConfig) => boolean;
    /** @deprecated Command authorization is resolved by channel ingress. Kept for runtime injection compatibility. */
    resolveCommandAuthorizedFromAuthorizers?: (params: {
        useAccessGroups: boolean;
        authorizers: Array<{
            configured: boolean;
            allowed: boolean;
        }>;
        modeWhenAccessGroupsOff?: "allow" | "deny" | "configured";
    }) => boolean;
};
/** @deprecated Use `resolveChannelMessageIngress` from `daocore/plugin-sdk/channel-ingress-runtime`. */
export type ResolvedInboundDirectDmAccess = {
    access: {
        decision: "allow" | "block" | "pairing";
        reasonCode: DmGroupAccessReasonCode;
        reason: string;
        effectiveAllowFrom: string[];
    };
    shouldComputeAuth: boolean;
    senderAllowedForCommands: boolean;
    commandAuthorized: boolean | undefined;
};
/** @deprecated Use `resolveChannelMessageIngress` from `daocore/plugin-sdk/channel-ingress-runtime`. */
export declare function resolveInboundDirectDmAccessWithRuntime(params: {
    cfg: DaoCoreConfig;
    channel: ChannelId;
    accountId: string;
    dmPolicy?: string | null;
    allowFrom?: Array<string | number> | null;
    senderId: string;
    rawBody: string;
    isSenderAllowed: (senderId: string, allowFrom: string[]) => boolean;
    resolveAccessGroupMembership?: AccessGroupMembershipResolver;
    runtime: DirectDmCommandAuthorizationRuntime;
    modeWhenAccessGroupsOff?: "allow" | "deny" | "configured";
    readStoreAllowFrom?: (provider: ChannelId, accountId: string) => Promise<string[]>;
}): Promise<ResolvedInboundDirectDmAccess>;
/** @deprecated Use `resolveChannelMessageIngress` from `daocore/plugin-sdk/channel-ingress-runtime`. */
export declare function createPreCryptoDirectDmAuthorizer(params: {
    resolveAccess: (senderId: string) => Promise<Pick<ResolvedInboundDirectDmAccess, "access"> | ResolvedInboundDirectDmAccess>;
    issuePairingChallenge?: (params: {
        senderId: string;
        reply: (text: string) => Promise<void>;
    }) => Promise<void>;
    onBlocked?: (params: {
        senderId: string;
        reason: string;
        reasonCode: DmGroupAccessReasonCode;
    }) => void;
}): (input: {
    senderId: string;
    reply: (text: string) => Promise<void>;
}) => Promise<"allow" | "block" | "pairing">;
