export interface PlansClientConfig {
    readonly cloudUrl: string;
    readonly bearer: string;
}
export declare class PlansClientError extends Error {
    readonly status: number;
    readonly body?: string | undefined;
    constructor(status: number, message: string, body?: string | undefined);
}
/**
 * Resolve cloud config from env + dotfiles. Returns null when no
 * cloud config is present (callers surface that as
 * "olam cloud not configured; run olam auth setup-cloud or set
 * OLAM_CLOUD_URL").
 */
export declare function resolveCloudConfig(): PlansClientConfig | null;
export interface PlanSummary {
    readonly plan_id: string;
    readonly operator_id: string;
    readonly status: 'pending' | 'active' | 'halted' | 'destroyed' | 'requires_reregistration_expired';
    readonly mode: 'cloud' | 'goal';
    readonly created_at: number;
    readonly last_active_at: number | null;
    readonly pinned_until: number | null;
    readonly host_cp_url?: string;
    readonly auth_recovery_callback_url?: string;
    readonly has_recovery_callback: boolean;
}
export declare class PlansClient {
    private readonly cfg;
    constructor(cfg: PlansClientConfig);
    /** Build the showcase Basic-auth header. */
    private authHeader;
    private request;
    list(operator_id: string): Promise<readonly PlanSummary[]>;
    show(plan_id: string, operator_id: string): Promise<PlanSummary>;
    remove(plan_id: string, operator_id: string): Promise<void>;
    /**
     * Pin a plan to skip the TTL pruner until `pinned_until_ms`. Calls
     * /v1/plans/update-urls with a synthetic body — but plans-index
     * doesn't expose a pin path yet. v1 wires this via update-urls
     * with a deliberate empty URL update + a sibling POST that we'll
     * stub here pending B5+ follow-up. For now: throws not_implemented
     * so the operator sees a clear error.
     */
    pin(_plan_id: string, _operator_id: string, _pinned_until_ms: number): Promise<void>;
    unpin(_plan_id: string, _operator_id: string): Promise<void>;
    reregister(plan_id: string, confirmation_token: string): Promise<void>;
    /**
     * C6 — Admin aggregate by operator. Requires admin_secret in
     * X-Admin-Secret header (in addition to the operator's showcase
     * Basic auth at the relay layer).
     */
    adminAggregate(admin_secret: string): Promise<AdminAggregateResponse>;
}
export interface OperatorAggregateRow {
    readonly operator_id: string;
    readonly plan_count: number;
    readonly active_count: number;
    readonly earliest_created_at: number;
    readonly latest_created_at: number;
    readonly usd_lifetime: number;
    readonly days_active: number;
}
export interface AdminAggregateResponse {
    readonly count: number;
    readonly operators: readonly OperatorAggregateRow[];
}
//# sourceMappingURL=plans-client.d.ts.map