declare const GSCDUMP_ONBOARDING_CONTRACT_VERSION: "2026-05-11"; declare const GSCDUMP_REQUIRED_ANALYTICS_SCOPE: "https://www.googleapis.com/auth/webmasters.readonly"; declare const GSCDUMP_WRITE_ANALYTICS_SCOPE: "https://www.googleapis.com/auth/webmasters"; declare const GSCDUMP_OPTIONAL_INDEXING_SCOPE: "https://www.googleapis.com/auth/indexing"; type GoogleScopesInput = string | readonly string[] | null | undefined; declare const accountStatuses: readonly ["disconnected", "oauth_received", "scope_missing", "refresh_missing", "db_provisioning", "ready", "reauth_required"]; declare const accountNextActions: readonly ["connect_google", "reconnect_google", "wait_for_provisioning", "none"]; declare const propertyStatuses: readonly ["no_local_site", "no_gsc_property", "unverified_property", "verified_candidate", "registered", "linked"]; declare const propertyNextActions: readonly ["create_site", "verify_gsc_property", "choose_property", "register_site", "none"]; declare const analyticsStatuses: readonly ["not_registered", "queued", "preparing", "syncing", "queryable_live", "queryable_partial", "ready", "failed"]; declare const analyticsNextActions: readonly ["wait_for_sync", "retry_sync", "none"]; declare const querySourceModes: readonly ["none", "live", "d1", "r2", "mixed"]; declare const sitemapStatuses: readonly ["unknown", "discovering", "none_found", "auto_submitted", "syncing", "ready", "failed"]; declare const sitemapNextActions: readonly ["submit_sitemap", "wait_for_sitemaps", "retry_sitemaps", "none"]; declare const indexingStatuses: readonly ["not_requested", "missing_scope", "insufficient_permission", "waiting_for_sitemaps", "discovering", "checking", "ready", "budget_exhausted", "no_urls", "failed"]; declare const indexingNextActions: readonly ["reconnect_google", "fix_gsc_permission", "wait_for_sitemaps", "wait_for_indexing", "retry_indexing", "none"]; declare const lifecycleErrorCodes: readonly ["missing_refresh_token", "missing_analytics_scope", "missing_gsc_read_scope", "token_refresh_failed", "permission_lost", "insufficient_gsc_permission", "gsc_property_not_found", "gsc_property_unverified", "user_database_not_provisioned", "sync_failed", "sitemap_sync_failed", "indexing_failed"]; type AccountStatus = typeof accountStatuses[number]; type AccountNextAction = typeof accountNextActions[number]; type PropertyStatus = typeof propertyStatuses[number]; type PropertyNextAction = typeof propertyNextActions[number]; type AnalyticsStatus = typeof analyticsStatuses[number]; type AnalyticsNextAction = typeof analyticsNextActions[number]; type QuerySourceMode = typeof querySourceModes[number]; type SitemapStatus = typeof sitemapStatuses[number]; type SitemapNextAction = typeof sitemapNextActions[number]; type IndexingStatus = typeof indexingStatuses[number]; type IndexingNextAction = typeof indexingNextActions[number]; type LifecycleWebhookEvent = 'user.lifecycle.changed' | 'site.lifecycle.changed' | 'site.analytics.ready' | 'site.indexing.ready' | 'site.auth.failed' | 'job.failed'; type LifecycleErrorCode = typeof lifecycleErrorCodes[number]; interface LifecycleProgress { completed: number; failed: number; total: number; percent: number; } interface LifecycleError { code: LifecycleErrorCode; message: string; retryable: boolean; } interface PartnerLifecycleAccount { status: AccountStatus; grantedScopes: string[]; missingScopes: string[]; nextAction: AccountNextAction; } interface PartnerLifecycleSite { siteId: string; /** Integer alias (`user_sites.int_id`) — the int JOIN key partners denormalize into their own catalog namespaces. Nullable only for pre-0029 unbackfilled rows. */ intId: number | null; /** Team-scoped catalog identifier (`user_sites.catalog_site_id`). Defaults to `intId` for sites without a caller-supplied catalog ID. */ catalogSiteId: number | null; externalSiteId: string | null; requestedUrl: string; gscPropertyUrl: string | null; permissionLevel: string | null; property: { status: PropertyStatus; nextAction: PropertyNextAction; }; analytics: { status: AnalyticsStatus; progress: LifecycleProgress; queryable: boolean; sourceMode: QuerySourceMode; syncedRange: { oldest: string | null; newest: string | null; }; nextAction: AnalyticsNextAction; }; sitemaps: { status: SitemapStatus; discoveredCount: number; nextAction: SitemapNextAction; }; indexing: { status: IndexingStatus; eligible: boolean; reason: string | null; progress: LifecycleProgress; nextAction: IndexingNextAction; }; latestError: LifecycleError | null; lifecycleRevision: number; updatedAt: string; } interface PartnerLifecycleResponse { contractVersion: typeof GSCDUMP_ONBOARDING_CONTRACT_VERSION; userId: string; partnerId: string | null; currentTeamId: string | null; account: PartnerLifecycleAccount; sites: PartnerLifecycleSite[]; } interface LifecycleWebhookEnvelope = Record> { contractVersion: typeof GSCDUMP_ONBOARDING_CONTRACT_VERSION; deliveryId: string; event: LifecycleWebhookEvent; partnerId: string; userId: string; siteId?: string; externalUserId?: string | null; externalSiteId?: string | null; lifecycleRevision: number; occurredAt: string; data: TData; } declare function parseGrantedScopes(scopes: GoogleScopesInput): string[]; declare function hasRequiredAnalyticsScope(scopes: GoogleScopesInput): boolean; declare function hasOptionalIndexingScope(scopes: GoogleScopesInput): boolean; export { AccountNextAction, AccountStatus, AnalyticsNextAction, AnalyticsStatus, GSCDUMP_ONBOARDING_CONTRACT_VERSION, GSCDUMP_OPTIONAL_INDEXING_SCOPE, GSCDUMP_REQUIRED_ANALYTICS_SCOPE, GSCDUMP_WRITE_ANALYTICS_SCOPE, IndexingNextAction, IndexingStatus, LifecycleError, LifecycleErrorCode, LifecycleProgress, LifecycleWebhookEnvelope, LifecycleWebhookEvent, PartnerLifecycleAccount, PartnerLifecycleResponse, PartnerLifecycleSite, PropertyNextAction, PropertyStatus, QuerySourceMode, SitemapNextAction, SitemapStatus, accountNextActions, accountStatuses, analyticsNextActions, analyticsStatuses, hasOptionalIndexingScope, hasRequiredAnalyticsScope, indexingNextActions, indexingStatuses, lifecycleErrorCodes, parseGrantedScopes, propertyNextActions, propertyStatuses, querySourceModes, sitemapNextActions, sitemapStatuses };