//#region src/http-cache-headers.d.ts
/** Directives for one cache audience (browser or CDN). Whole seconds. */
interface CacheDirectives {
  maxAge?: number;
  staleWhileRevalidate?: number;
  staleIfError?: number;
  sMaxage?: number;
  noStore?: boolean;
  noCache?: boolean;
  private?: boolean;
  mustRevalidate?: boolean;
  immutable?: boolean;
}
/** Which CDN header name carries the CDN directives. */
type CdnProfile = 'cloudflare' | 'generic' | 'fastly';
interface CacheHeaderInput {
  browser?: CacheDirectives;
  cdn?: CacheDirectives;
  profile?: CdnProfile;
  tags?: string[];
}
type CacheHeaderErrorCode = 'cdn_smaxage_with_stale_while_revalidate' | 'private_browser_with_cdn' | 'invalid_cache_tag' | 'too_many_cache_tags' | 'cache_tags_too_long' | 'invalid_cache_directive' | 'invalid_cdn_profile';
declare class CacheHeaderError extends Error {
  readonly code: CacheHeaderErrorCode;
  readonly details: Record<string, unknown>;
  constructor(code: CacheHeaderErrorCode, message: string, details?: Record<string, unknown>);
}
declare function cacheHeaders(input: CacheHeaderInput): Record<string, string>;
declare function etagFrom(hash: string, opts?: {
  weak?: boolean;
}): string;
declare function notModified(ifNoneMatch: string | null, etag: string): boolean;
//#endregion
export { CacheDirectives, CacheHeaderError, CacheHeaderErrorCode, CacheHeaderInput, CdnProfile, cacheHeaders, etagFrom, notModified };