import * as cookie from 'cookie'; import { Logger } from '../logger'; export declare const SECURE_CROSSSITE_OPTIONS: { sameSite: string; secure: boolean; }; export declare function getCookieDomain(url: string, logger: Logger): string | null; export declare const getCookieString: (name: string, val: string, options?: cookie.SerializeOptions | undefined) => string; /** * Construct a cookie string to set the OptimizelyOptOut cookie in the opt out * response. * @param {String} cookieDomain * @param {Boolean} [secureCrossSiteCookies false] * @return {String} The opt out response will write to document.cookie. */ export declare function getOptOutCookieString(cookieDomain: string, secureCrossSiteCookies?: boolean): string; /** * Construct a cookie string that instructs the browser to delete the * OptimizelyOptOut cookie (Max-Age=0). Used when the visitor opts back in * via `optimizely_opt_out=false` query parameter. * @param {String} cookieDomain * @return {String} The opt out delete cookie string for the response. */ export declare function getDeleteOptOutCookieString(cookieDomain: string): string; export declare function getSessionCookieString(sessionId: string): string; type CookieAction = 'new' | 'delete'; type CookieOperation = { action: CookieAction; name: string; value?: string; }; export declare function newOrDeleteCookie(header: string): CookieOperation; export declare function safeParseCookie(cookieStr: string, options?: { decode?: (value: string) => string; }): Record; export {};