/**
 * CLI License Check Utilities
 *
 * Provides functions for verifying user license tier and feature entitlements
 * against the Crewly backend. Used by CLI commands to gate premium features.
 *
 * When the backend is unreachable, defaults to free tier (basic_teams only)
 * to ensure graceful degradation.
 *
 * @module cli/utils/license-check
 */
/**
 * Response shape from the backend license verification endpoint
 */
export interface LicenseVerifyResponse {
    success: boolean;
    data: {
        valid: boolean;
        tier: string;
        features: string[];
    };
}
/**
 * Result of a license check for a specific feature
 */
export interface LicenseCheckResult {
    /** Whether the user is allowed to use the requested feature */
    allowed: boolean;
    /** The user's current license tier (e.g. 'free', 'pro', 'enterprise') */
    tier: string;
    /** Human-readable message explaining the result (present when not allowed) */
    message?: string;
}
/**
 * Checks whether the current user's license allows access to a specific feature.
 *
 * Queries GET /api/cloud/license/verify on the local backend and inspects the
 * returned features array. If the backend is unreachable or returns an error,
 * defaults to free tier (only `basic_teams` allowed).
 *
 * @param requiredFeature - The feature identifier to check (e.g. 'premium_templates', 'cloud_relay')
 * @returns License check result with allowed status, tier, and optional message
 *
 * @example
 * ```typescript
 * const result = await checkLicense('premium_templates');
 * if (!result.allowed) {
 *   console.log(result.message);
 * }
 * ```
 */
export declare function checkLicense(requiredFeature: string): Promise<LicenseCheckResult>;
/**
 * Guards a CLI command by verifying the user has access to a required feature.
 *
 * Calls {@link checkLicense} and, if the feature is not allowed, prints a
 * user-friendly error message using chalk and exits the process with code 1.
 *
 * @param feature - The feature identifier required by the command
 * @throws Exits the process (process.exit(1)) if the feature is not allowed
 *
 * @example
 * ```typescript
 * // At the top of a premium command handler:
 * await requireFeature('premium_templates');
 * // If we reach here, the user has access
 * ```
 */
export declare function requireFeature(feature: string): Promise<void>;
//# sourceMappingURL=license-check.d.ts.map