/** Long enough for an ordinary working session, short enough that a copied * preview URL dies on its own. The guard shell refreshes itself shortly * before this elapses so a long-lived pane never silently breaks. */ export declare const PREVIEW_CONTENT_CAPABILITY_TTL_MS: number; /** Characters a capability may use inside a URL path segment. */ export declare const PREVIEW_CONTENT_CAPABILITY_PATTERN: RegExp; export interface PreviewContentCapabilityClaims { version: 1; purpose: 'preview-content'; sessionId: string; userId: string; authSessionId: string; capabilityId: string; issuedAt: number; expiresAt: number; } export interface PreviewContentCapabilityIdentity { userId: string; authSessionId: string; /** Authentication expiry of the minting identity; the capability never * outlives the session that created it. */ expiresAt: number; } export type PreviewContentCapabilityVerification = { ok: true; claims: PreviewContentCapabilityClaims; } | { ok: false; reason: 'missing' | 'malformed' | 'invalid' | 'expired' | 'session_mismatch'; }; /** * Mint the capability for one session. Returns null (never a fallback token) * for out-of-shape identities or an already-expired authentication, so the * caller fails closed instead of serving an unauthenticated content path. */ export declare function mintPreviewContentCapability(secret: string, sessionId: string, identity: PreviewContentCapabilityIdentity, now?: number): { token: string; expiresAt: number; } | null; export declare function verifyPreviewContentCapability(secret: string, token: string | undefined, expectedSessionId: string, now?: number): PreviewContentCapabilityVerification; //# sourceMappingURL=preview-content-capability.d.ts.map