#!/usr/bin/env node import { type AuthModeSelection } from "./authMode.js"; interface ClientConfig { name: string; folder: string; site_url: string; } interface Config { credentials_file: string; oauth_credentials_file: string; oauth_scope: string; clients: Record; } /** * Decide the runtime auth mode through the shared selectAuthMode() decision * point (NOT an inline `if (credentials_file)` branch). Signals: * - credentialsFile: SA keyfile path (config.json / GOOGLE_APPLICATION_CREDENTIALS) * - refreshToken: env GOOGLE_GSC_REFRESH_TOKEN * - hasStoredCreds: a StoredCredentials file (auth-helper output) exists * Returns "service_account" | "oauth" | "unconfigured". Never silently defaults * to service_account when nothing is configured. */ export interface RuntimeAuthModeOptions { /** Path checked for an existing StoredCredentials file. Defaults to the * per-config path (config.oauth_credentials_file) or the global default. * Injectable so tests can isolate from a real credentials file on the box. */ storedCredsPath?: string; /** Env-like source for the refresh token. Defaults to process.env. */ env?: NodeJS.ProcessEnv; } export declare function resolveRuntimeAuthMode(config: Config, opts?: RuntimeAuthModeOptions): AuthModeSelection; /** Construct a GscManager, surfacing the onboarding error for the unconfigured case. */ export declare function buildGscManager(config: Config, opts?: RuntimeAuthModeOptions): GscManager; declare class GscManager { private config; private service; private authMode; constructor(config: Config, authOpts?: RuntimeAuthModeOptions); private oauthCredsPath; private getService; listSites(): Promise; searchAnalytics(options: { startDate: string; endDate: string; dimensions: string[]; searchType: string; dimensionFilter: string; rowLimit: number; aggregationType: string; siteUrl: string; }): Promise; inspection(url: string, siteUrl: string): Promise; } export {};