/** * Google Analytics Admin API (GA4) client factory. * * Wraps the googleapis analyticsadmin v1beta client. Both the read tools (tools/ga4Admin.ts) and the * GATED write tools (tools/ga4AdminWrite.ts) use this client; the write path additionally requires * GA4_MCP_ENABLE_WRITES / GA4_MCP_ENABLE_DELETES, confirm=true, and the analytics.edit scope. The same * OAuth2 credentials used for GTM authorize these calls, provided the `analytics.readonly` scope was * granted during onboarding. */ import { analyticsadmin_v1beta, analyticsadmin_v1alpha } from 'googleapis/build/src/apis/analyticsadmin/index.js'; import { analyticsdata_v1beta } from 'googleapis/build/src/apis/analyticsdata/index.js'; import type { OAuth2Client } from 'google-auth-library'; export type Ga4AdminClient = analyticsadmin_v1beta.Analyticsadmin; export type Ga4AdminAlphaClient = analyticsadmin_v1alpha.Analyticsadmin; export type Ga4DataClient = analyticsdata_v1beta.Analyticsdata; export declare function getGa4AdminClient(auth: OAuth2Client): Ga4AdminClient; /** * v1alpha client — used only for read methods that v1beta does not yet expose * (currently: enhanced measurement settings). Same read-only scope applies. */ export declare function getGa4AdminAlphaClient(auth: OAuth2Client): Ga4AdminAlphaClient; /** * GA4 Data API client (analyticsdata v1beta). Used ONLY for read-only reporting * (`runReport`, `runRealtimeReport`). The same `analytics.readonly` scope that * authorizes the Admin client also authorizes Data API reads — no extra scope. */ export declare function getGa4DataClient(auth: OAuth2Client): Ga4DataClient; /** Reset cached clients (useful in tests). */ export declare function resetGa4AdminClient(): void; //# sourceMappingURL=ga4Client.d.ts.map