/** * Cookie helpers for session-token flows on Workers. * * No external dep — just parse/serialize per RFC 6265 with the modern * attributes we actually use (HttpOnly, Secure, SameSite, Max-Age, Path). */ export interface CookieOptions { maxAge?: number; path?: string; domain?: string; secure?: boolean; httpOnly?: boolean; sameSite?: 'Strict' | 'Lax' | 'None'; expires?: Date; } /** * Build a `Set-Cookie` string. Defaults are tuned for a session cookie: * HttpOnly, Secure, SameSite=Lax, Path=/. */ export declare function serializeCookie(name: string, value: string, opts?: CookieOptions): string; /** * `Set-Cookie` value that clears a previously-set cookie. Pass the same `path` * (and `domain` if any) used when it was set. */ export declare function clearCookie(name: string, opts?: Pick): string; /** Parse a `Cookie` header into a name → value map. Values are URL-decoded. */ export declare function parseCookieHeader(header: string | null | undefined): Record; /** Convenience: pull one cookie value from a `Request`. */ export declare function getCookie(req: Request, name: string): string | undefined; //# sourceMappingURL=cookie.d.ts.map