/** * CookieJar - Automatic Cookie Management * * Supports: * - Storing cookies from Set-Cookie headers * - Domain and path matching * - Cookie expiration (Max-Age, Expires) * - Secure and HttpOnly flags * - SameSite attribute */ export interface Cookie { name: string; value: string; domain: string; path: string; expires?: Date; secure: boolean; httpOnly: boolean; sameSite?: 'Strict' | 'Lax' | 'None'; hostOnly: boolean; } export declare class CookieJar { private cookies; /** * Set a cookie from a Set-Cookie header value */ setCookie(setCookieHeader: string, requestUrl: string): void; /** * Set multiple cookies from an array of Set-Cookie headers */ setCookies(setCookieHeaders: string[], requestUrl: string): void; /** * Get all cookies that match the given URL */ getCookies(requestUrl: string): string[]; /** * Get cookie header string for a request URL */ getCookieHeader(requestUrl: string): string; /** * Get a specific cookie by name for a URL */ getCookieByName(name: string, requestUrl: string): Cookie | undefined; /** * Get all stored cookies */ getAllCookies(): Cookie[]; /** * Clear all cookies */ clear(): void; /** * Clear cookies for a specific domain */ clearDomain(domain: string): void; private parseCookie; private getDefaultPath; private getMatchingCookies; private domainMatches; private pathMatches; private findCookieIndex; private removeCookie; }