/**
 * Cloud Auth Middleware
 *
 * Express middleware for gating premium features behind an active
 * CrewlyAI Cloud connection and subscription tier check.
 *
 * @module services/cloud/cloud-auth.middleware
 */
import type { Request, Response, NextFunction } from 'express';
/**
 * Throttle interval for repeated warning logs (5 minutes).
 * Prevents log flooding from high-frequency polling endpoints like /devices.
 */
export declare const WARN_THROTTLE_MS: number;
/**
 * Map tracking last warn timestamps by key (reason:path).
 * Exported for testing purposes.
 */
export declare const _warnTimestamps: Map<string, number>;
/**
 * Check whether the local Crewly instance is connected to CrewlyAI Cloud.
 *
 * @returns true if CloudClientService reports a connected status
 */
export declare function isCloudConnected(): boolean;
/**
 * Express middleware that requires an active cloud connection.
 *
 * Responds with 403 if the instance is not connected.
 *
 * @param req - Express request
 * @param res - Express response
 * @param next - Next middleware
 *
 * @example
 * ```ts
 * router.get('/premium-data', requireCloudConnection, handler);
 * ```
 */
export declare function requireCloudConnection(req: Request, res: Response, next: NextFunction): void;
/**
 * Factory that returns Express middleware requiring a minimum subscription tier.
 *
 * The middleware first checks cloud connectivity, then verifies that the
 * current subscription tier meets or exceeds the required level.
 * Warning logs are throttled to once per 5 minutes per path to prevent
 * log flooding from high-frequency polling endpoints (#212).
 *
 * @param tier - Minimum required tier ('pro' or 'enterprise')
 * @returns Express middleware function
 *
 * @example
 * ```ts
 * router.get('/enterprise-report', requireTier('enterprise'), handler);
 * ```
 */
export declare function requireTier(tier: 'pro' | 'enterprise'): (req: Request, res: Response, next: NextFunction) => void;
//# sourceMappingURL=cloud-auth.middleware.d.ts.map