interface GscPropertyCandidate { siteUrl?: string | null; permissionLevel?: string | null; } declare function isVerifiedGscProperty(property?: GscPropertyCandidate | null): boolean; declare function isVerifiedGscPermission(level: string | null | undefined): boolean; /** * Does `propertyUrl` cover `targetDomain`? Matches sc-domain (exact or * subdomain) and URL-prefix (host equality) without scheme/www noise. */ declare function gscPropertyMatchesTarget(targetDomain: string, propertyUrl: string | null | undefined): boolean; /** * Convenience: match `siteUrl` against `gscSiteUrl` directly (extracts the * hostname from `siteUrl` first). */ declare function matchGscSite(siteUrl: string | null | undefined, gscSiteUrl: string | null | undefined): boolean; /** * Pick the best GSC property for a hostname from a candidate list. "Best": * 1. Verified Domain property (widest + readable) * 2. Verified URL-prefix property (narrower + readable) * 3. Unverified Domain property (returned as a fallback so callers can * surface the verification gap to the user) * 4. Unverified URL-prefix property (same caveat) * * Without this ranking, naively picking the first match would register an * unverified property and leave the site stuck with zero data. */ declare function pickBestGscProperty(origin: string, availableSites: readonly T[]): T | undefined; /** * Richer best-property selection that also returns the matched domain and * URL candidates separately, so callers can show "we matched on X domain * property and Y URL-prefix property" diagnostics. */ declare function findBestGscProperty(targetDomain: string, properties: readonly T[]): { matchedSite: T | null; domainProperty: T | null; urlProperty: T | null; }; declare function findExactGscProperty(propertyUrl: string, properties: readonly T[]): T | null; declare function formatGscPropertyCandidates(candidates: ReadonlyArray): string; export { GscPropertyCandidate, findBestGscProperty, findExactGscProperty, formatGscPropertyCandidates, gscPropertyMatchesTarget, isVerifiedGscPermission, isVerifiedGscProperty, matchGscSite, pickBestGscProperty };