/**
 * Response retention policies for ServiceResponseStore
 * Controls how long service responses are cached and when they're cleaned up
 *
 * @kosService core.service-request
 */
export declare enum ResponseRetention {
    /**
     * Clear immediately after handler completes
     * Use for one-time operations with no caching needs
     *
     * Note: Response remains available during handler execution (including async handlers).
     * Cleanup happens AFTER the handler returns/resolves via ServiceRequestManager.
     */
    IMMEDIATE = "immediate",
    /**
     * Keep until next response for same path
     * Default behavior - previous response replaced on new request
     */
    SINGLE = "single",
    /**
     * Keep for specified duration (ms)
     * Automatic cleanup after TTL expires
     */
    TTL = "ttl",
    /**
     * Keep until model is destroyed
     * Use for data needed throughout model lifetime
     */
    PERMANENT = "permanent",
    /**
     * Keep until explicitly cleared
     * Manual cleanup required via clearServiceResponse()
     */
    MANUAL = "manual"
}
/**
 * Configuration for response caching behavior
 *
 * @kosService core.service-request
 * @kosApiLevel 15
 */
export interface ResponseCacheConfig {
    /**
     * Retention policy determining when response is cleaned up
     */
    retention: ResponseRetention;
    /**
     * Time-to-live in milliseconds (required for TTL retention)
     */
    ttl?: number;
    /**
     * For TTL retention: extend TTL instead of replacing data on new request
     *
     * When false (default): New request clears old data and stores new data with fresh TTL
     * When true: If cached data exists and hasn't expired, extend TTL without replacing data
     *
     * Use extendOnRefresh=true to avoid re-running expensive operations when cached data is still valid.
     *
     * @default false
     *
     * @example
     * // Replace on each request (default)
     * cache: { retention: ResponseRetention.TTL, ttl: 5 * 60 * 1000 }
     *
     * @example
     * // Extend TTL on refresh - avoid re-fetching if cache valid
     * cache: { retention: ResponseRetention.TTL, ttl: 5 * 60 * 1000, extendOnRefresh: true }
     */
    extendOnRefresh?: boolean;
    /**
     * Maximum number of responses to cache per path (future use)
     */
    maxSize?: number;
}
/**
 * Replay strategy for baseline-delta race condition handling
 * Determines which queued events to replay after baseline loads
 *
 * @kosService core.topic-handler
 */
export declare enum ReplayStrategy {
    /**
     * Replay all queued events
     * Use for: State machines, audit trails requiring complete event history
     */
    ALL = "all",
    /**
     * Replay events received at or after baseline request was sent
     * Use for: High-frequency idempotent updates (quantities, sensor readings, status)
     */
    AFTER_REQUEST = "after-request",
    /**
     * Replay events received at or after baseline response was received
     * Use for: Low-frequency config where baseline likely includes recent changes
     */
    AFTER_RESPONSE = "after-response",
    /**
     * Discard all queued events
     * Use for: Baseline is always complete source of truth
     */
    NONE = "none"
}
/**
 * Baseline dependency configuration for topic handlers
 *
 * @kosService core.topic-handler
 * @kosApiLevel 15
 */
export interface BaselineDependency {
    /**
     * API path of the baseline request this handler depends on
     */
    path: string;
    /**
     * HTTP method of the baseline request
     * @default 'get'
     */
    method?: string;
    /**
     * Strategy for replaying queued events after baseline loads
     * @default ReplayStrategy.AFTER_REQUEST
     */
    replayStrategy?: ReplayStrategy;
}
/**
 * Cached response with metadata
 */
export interface CachedResponse<T = unknown> {
    /**
     * The response data
     */
    data: T;
    /**
     * When the response was cached (timestamp)
     * @deprecated Use requestedAt or receivedAt for temporal comparisons
     */
    timestamp: number;
    /**
     * When the HTTP request was sent (timestamp)
     * Used for baseline-delta temporal filtering
     */
    requestedAt: number;
    /**
     * When the HTTP response was received (timestamp)
     * Used for baseline-delta temporal filtering
     */
    receivedAt: number;
    /**
     * The API path this response came from
     */
    path: string;
    /**
     * The HTTP method used
     */
    method: string;
    /**
     * When this response expires (for TTL retention)
     */
    expiresAt?: number;
}
//# sourceMappingURL=service-response-store.d.ts.map