/**
 * SlackUserRegistry — conversational registration + role assignment (Phase 1).
 *
 * Slice 0 made the gate enforce roles; this makes registration first-class:
 *   - admin registers a Slack user with a role ("register Sarah as a developer")
 *   - an unregistered user's request becomes a PENDING registration → admin approval
 *   - approve/deny resolves it (approve creates the UserProfile with the role)
 *
 * All conversational — never a CLI, never asking the user to edit files. Pending
 * registrations are durable so an approval survives restarts. Decoupled from core:
 * depends only on a minimal user-store interface (UserManager satisfies it).
 *
 * Design: docs/specs/SLACK-ORG-INTEGRATION-SPEC.md §6.3.
 */
/** Minimal UserProfile shape the registry creates/updates (UserManager.UserProfile satisfies it). */
export interface RegistryUserProfile {
    id: string;
    name: string;
    channels: Array<{
        type: string;
        identifier: string;
    }>;
    permissions: string[];
    preferences: Record<string, unknown>;
    slackUserId?: string;
    orgRole?: string;
    createdAt?: string;
}
export interface RegistryUserStore {
    resolveFromSlackUserId(slackUserId: string): {
        id: string;
    } | null;
    upsertUser(profile: RegistryUserProfile): void;
}
export interface PendingRegistration {
    slackUserId: string;
    displayName: string;
    requestedAt: string;
    channel?: string;
}
export declare class SlackUserRegistry {
    private readonly users;
    private readonly now;
    private readonly pendingFile;
    constructor(users: RegistryUserStore, stateDir: string, now?: () => string);
    /** Admin-initiated registration: create/assign the role immediately. Throws on invalid role. */
    register(slackUserId: string, displayName: string, role: string): RegistryUserProfile;
    /** True iff this Slack user is already registered. */
    isRegistered(slackUserId: string): boolean;
    /**
     * Self-registration request from an unregistered user → durable PENDING entry for
     * admin approval. No-op (returns existing) if already pending; null if already registered.
     */
    requestRegistration(slackUserId: string, displayName: string, channel?: string): PendingRegistration | null;
    listPending(): PendingRegistration[];
    /** Approve a pending registration with a role → creates the UserProfile, clears the pending entry. */
    approve(slackUserId: string, role: string): RegistryUserProfile;
    /** Deny (drop) a pending registration. Returns true if one was removed. */
    deny(slackUserId: string): boolean;
    private readPending;
    private writePending;
    private removePending;
}
//# sourceMappingURL=SlackUserRegistry.d.ts.map