import type { SmokeCmsIntegrityConfig } from '../cms-integrity/types.js'; import type { DiscoveryEndpointResult, DiscoverySmokeConfig, ResolvedDiscoveryConfig } from '../discovery/types.js'; export type { DiscoverySmokeConfig, SmokeCmsIntegrityConfig }; export type SmokeTestCategory = 'home' | 'page' | 'article-type-index' | 'article' | 'person' | 'people-listing' | 'tag' | 'article-type-tag-listing' | 'tags-index' | 'articles-index' | 'custom-type-listing' | 'not-found' | 'probe' | 'discovery'; export interface SmokeTestCase { category: SmokeTestCategory; label: string; pageUrl: string; expectMarkdown: boolean; /** When set, HTML must return exactly this status (e.g. 404 for not-found probes). */ expectHtmlStatus?: number; } /** One row in app-level smoke.cases.json (path is site-relative). */ export interface StaticSmokeCaseDefinition { category: SmokeTestCategory; label: string; path: string; expectMarkdown: boolean; /** When set, HTML must return exactly this status (e.g. 404 for not-found probes). */ expectHtmlStatus?: number; } /** Committed per app; regenerate via se-marketing-sites-smoke-test-setup skill. */ export interface StaticSmokeConfigFile { siteName: string; port: number; cases: StaticSmokeCaseDefinition[]; /** LLM discovery routes — omit for all required; set false to skip (e.g. PointMe before CloudFront). */ discovery?: DiscoverySmokeConfig; minMarkdownLength?: number; requestDelayMs?: number; cmsIntegrity?: SmokeCmsIntegrityConfig; } export type SmokeFailureReason = 'html_non_2xx' | 'markdown_missing' | 'markdown_wrong_content_type' | 'markdown_too_short' | 'discovery_missing' | 'discovery_wrong_content_type' | 'discovery_invalid_content' | 'discovery_broken_link'; export type NextJsCacheStatus = 'HIT' | 'MISS' | 'STALE'; export interface SmokeTestCaseResult { case: SmokeTestCase; htmlStatus: number; markdownStatus: number; markdownLength: number; markdownContentType: string | null; failures: SmokeFailureReason[]; markdownBodySnippet: string | null; /** Discovery content/spot-check detail lines (when category is discovery). */ discoveryDetails?: string[]; htmlNextCache: NextJsCacheStatus | null; markdownNextCache: NextJsCacheStatus | null; durationMs: number; } export interface SmokeTestResult { siteName: string; baseUrl: string; cases: SmokeTestCaseResult[]; discovery: DiscoveryEndpointResult[]; warnings: string[]; errorCount: number; warnCount: number; } export interface SmokeTestRunnerConfig { baseUrl: string; siteName: string; cases: SmokeTestCase[]; discovery?: ResolvedDiscoveryConfig; minMarkdownLength?: number; requestDelayMs?: number; fetch?: typeof fetch; } export interface LoadStaticSmokeConfigOptions { cwd?: string; portOverride?: number; /** Remote base URL (e.g. Vercel preview). When set, `port` in the JSON file is ignored for URL resolution. */ baseUrl?: string; env?: NodeJS.ProcessEnv; } export interface RunStaticSmokeTestOptions extends LoadStaticSmokeConfigOptions { fetch?: typeof fetch; verifyCache?: boolean; } export interface RunPreviewStaticSmokeTestOptions extends RunStaticSmokeTestOptions { /** When true (default), require VERCEL_PROTECTION_BYPASS_TOKEN (or alias) in env. */ requireBypass?: boolean; } export interface SmokeTestCacheVerifyResult { pass1: SmokeTestResult; pass2: SmokeTestResult; pass1DurationMs: number; pass2DurationMs: number; cacheVerifyFailures: string[]; } //# sourceMappingURL=types.d.ts.map