/** * Converts a Playwright storageState (the format ZeTa already captures via * session-capture.ts/live-view.ts and stores per-project) into snippets for * other automation frameworks. Playwright's storageState is the de-facto * standard for browser session export — see docs/UNIVERSAL-SESSION-CAPTURE- * STRATEGY.md — so every other framework's import mechanism is a small, * mechanical conversion away, not a new capture flow. * * Pure, dependency-free functions — no I/O, no network, fully unit-testable. */ export interface StorageStateCookie { name: string; value: string; domain: string; path: string; expires?: number; httpOnly?: boolean; secure?: boolean; sameSite?: 'Strict' | 'Lax' | 'None'; } export interface StorageStateOrigin { origin: string; localStorage: Array<{ name: string; value: string; }>; } export interface StorageState { cookies: StorageStateCookie[]; origins: StorageStateOrigin[]; } export type SessionExportFormat = 'cypress' | 'selenium-python' | 'webdriverio'; /** cy.setCookie() + localStorage.setItem() inside a reusable custom command, * following Cypress's documented cy.session() pattern (see references in * docs/UNIVERSAL-SESSION-CAPTURE-STRATEGY.md). */ export declare function toCypressSnippet(state: StorageState): string; /** driver.add_cookie() (Selenium requires the browser already be on the * cookie's domain before adding it) + execute_script() for localStorage, * per Selenium's documented Cookie API. */ export declare function toSeleniumPythonDict(state: StorageState): string; /** browser.setCookies() accepts an array shape very close to Playwright's own * cookie objects (per WebdriverIO's documented API) — closest 1:1 mapping * of the three target formats. */ export declare function toWebdriverIOSnippet(state: StorageState): string; export declare function exportSessionAs(format: SessionExportFormat, state: StorageState): { content: string; filename: string; mimeType: string; };