import { HttpCookie } from '../models/HttpCookie.js';
export type SameSiteValue = 'Lax' | 'Strict' | 'None';
/**
 * A class that parses the `set-cookie` header string to a list of cookies.
 */
export declare class CookieParser {
    /**
     * Creates a cookie canonical domain from the full request URL.
     *
     * @param url The HTTP request URL.
     * @returns The canonical domain for the URL.
     */
    static canonicalDomainUrl(url: string): string;
    /**
     * Creates a cookie canonical domain from the host name.
     *
     * @param host The same as `new URL('...').host`.
     * @returns The canonical domain for the URL.
     */
    static canonicalDomain(host: string): string;
    /**
     * Parses the `set-cookie` header value and creates a list of cookies.
     *
     * Notes:
     * - This does not check whether the cookie should be stored in the Cookie Jar
     *   based on the request URL, use `parse()` instead
     * - This will fill up cookies' `domain` and `path` when `requestUrl` is provided.
     *   Otherwise it will leave these fields empty which makes the cookie invalid. Use `parse()` instead
     *
     * @param setCookie The value of the `set-cookie` string.
     * @param requestUrl The HTTP request URL.
     */
    static parseRelaxed(setCookie?: string, requestUrl?: string): HttpCookie[];
    /**
     * Parses the `set-cookie` header value and creates a list of cookies.
     * The cookie configuration must match the `url`. This means that if the cookie has a `host` property
     * this must match the request URL (browsers do not allow setting cookies from one domain for another).
     *
     * When `host` or `path` part is missing from the cookie, the URL values are used.
     *
     * @param requestUrl The HTTP request URL. Cookies must match this URL or will be ignored.
     * @param setCookie The value of the `set-cookie` string.
     */
    static parse(requestUrl: string, setCookie?: string): HttpCookie[];
    /**
     * Filters a list of cookies to match the given `requestUrl`.
     * This means that both the `domain` and the `path` part of the cookie must match the URL.
     *
     * @param cookies The list of cookies to filter.
     * @param requestUrl The request URL to filter against.
     * @returns The filtered list of cookies that can be used with the URL.
     */
    static filterCookies(cookies: HttpCookie[], requestUrl: string): HttpCookie[];
    /**
     * Gets the path for a domain as defined in
     * https://tools.ietf.org/html/rfc6265#section-5.1.4
     */
    static getPath(url: URL): string;
    /**
     * This follows the algorithm defined in https://tools.ietf.org/html/rfc6265#section-5.1.3
     *
     * @param string A string to test whether it matches the domain.
     * @param domain The domain to compare to
     * @return True if domains matches.
     */
    static matchesDomain(string: string, domain: string): boolean;
    /**
     * Checks if paths mach as defined in
     * https://tools.ietf.org/html/rfc6265#section-5.1.4
     *
     * Note: This function will return false if the `this.url` was not set.
     *
     * @param cookiePath Path from the cookie.
     * @param url
     * @return True when paths matches.
     */
    static matchesPath(cookiePath: string, url: URL): boolean;
    protected static _matchesPath(cookiePath: string, requestPath: string): boolean;
    static matchesCookie(c1: HttpCookie, c2: HttpCookie): boolean;
}
//# sourceMappingURL=CookieParser.d.ts.map