export type CookieSameSite = 'Lax' | 'Strict' | 'None' | 'lax' | 'strict' | 'none'; export interface CookieOptions { /** Path attribute. Defaults to `'/'`. Pass `null` to omit. */ path?: string | null; /** Domain attribute. */ domain?: string; /** Lifetime in seconds. Defaults to one year. Pass `null` to omit (session cookie). */ maxAge?: number | null; /** Explicit expiration date. Takes precedence over `maxAge` when both are set. */ expires?: Date; /** Restrict the cookie to HTTPS connections. */ secure?: boolean; /** Same-site policy. Defaults to `'Lax'`. Pass `null` to omit. */ sameSite?: CookieSameSite | null; /** Mark the cookie as partitioned (CHIPS). */ partitioned?: boolean; } /** * Read a cookie by key. * * - On the client, the cookie is read from `document.cookie`. * - On the server, pass the raw `Cookie` request header via `cookieHeader` * (e.g. from `useSSRContext().event.node.req.headers.cookie` in Nuxt) to * resolve the value during SSR. Without it, the function returns `null`. */ export declare function getCookie(key: string, cookieHeader?: string): string | null; /** * Write a cookie via `document.cookie` with full attribute support. * * No-op on the server. `HttpOnly` is intentionally omitted as it cannot be set * from `document.cookie` (browsers reject it). */ export declare function setCookie(key: string, value: string, options?: CookieOptions): void; /** * Delete a cookie by writing `max-age=0`. `path` and `domain` must match the * cookie's original attributes for the browser to actually drop it. */ export declare function deleteCookie(key: string, options?: Pick): void;