feat(openapi): add Google Analytics API presets - #75
Conversation
Expose the GA4 Data and Analytics Admin Discovery APIs as built-in Google integrations while keeping their default OAuth grant read-only.
Greptile SummaryThe PR adds Google Analytics Data and Analytics Admin as built-in Google Discovery presets with read-only OAuth access. It also adds Analytics Admin health-check coverage, but the configured operation name does not match the generated tool path.
Confidence Score: 4/5The Analytics Admin health-check operation mismatch should be fixed before merging because it prevents connection validation from resolving the generated tool. Discovery conversion removes the Files Needing Attention: packages/plugins/openapi/src/providers/google/presets.ts, packages/plugins/openapi/src/providers/google/presets.test.ts
|
| Filename | Overview |
|---|---|
| packages/plugins/openapi/src/providers/google/presets.ts | Adds both Analytics presets, OAuth scopes, and an Analytics Admin health check whose operation name retains a service prefix removed during conversion. |
| packages/plugins/openapi/src/providers/google/presets.test.ts | Adds scope and catalog coverage plus an Admin fixture, but its health-check assertion expects the same incompatible full operation name. |
| packages/plugins/openapi/src/providers/google/snapshots/presets.test.ts.snap | Updates the OAuth-audience snapshot to classify both new presets as standard-user integrations. |
Reviews (1): Last reviewed commit: "feat(openapi): add Google Analytics API ..." | Re-trigger Greptile
| args: { part: "id", mine: true }, | ||
| }, | ||
| "google-search-console": { operation: "webmasters.sites.list" }, | ||
| "google-analytics-admin": { operation: "analyticsadmin.accountSummaries.list" }, |
There was a problem hiding this comment.
Health check uses wrong tool name
When an Analytics Admin connection is checked, conversion strips the analyticsadmin. prefix and generates accountSummaries.list, but this health check searches for analyticsadmin.accountSummaries.list, causing validation to return an unknown “operation not found” result without probing the connection.
Knowledge Base Used: Plugin ecosystem
Add Google Analytics Data and Google Analytics Admin as built-in Google Discovery integrations. Both default to the least-privilege `analytics.readonly` OAuth scope. | Integration | Discovery API | Default access | Health check | | --- | --- | --- | --- | | Google Analytics Data | `analyticsdata.v1beta` | Read-only | None; reports require a property | | Google Analytics Admin | `analyticsadmin.v1beta` | Read-only | `accountSummaries.list` | - `oxfmt --check` on changed files - `oxlint --deny-warnings` on changed TypeScript files - `vitest run` in `@executor-js/plugin-openapi` (270 tests)
Add Google Analytics Data and Google Analytics Admin as built-in Google Discovery integrations. Both default to the least-privilege `analytics.readonly` OAuth scope. | Integration | Discovery API | Default access | Health check | | --- | --- | --- | --- | | Google Analytics Data | `analyticsdata.v1beta` | Read-only | None; reports require a property | | Google Analytics Admin | `analyticsadmin.v1beta` | Read-only | `accountSummaries.list` | - `oxfmt --check` on changed files - `oxlint --deny-warnings` on changed TypeScript files - `vitest run` in `@executor-js/plugin-openapi` (270 tests)
Add Google Analytics Data and Google Analytics Admin as built-in Google Discovery integrations. Both default to the least-privilege `analytics.readonly` OAuth scope. | Integration | Discovery API | Default access | Health check | | --- | --- | --- | --- | | Google Analytics Data | `analyticsdata.v1beta` | Read-only | None; reports require a property | | Google Analytics Admin | `analyticsadmin.v1beta` | Read-only | `accountSummaries.list` | - `oxfmt --check` on changed files - `oxlint --deny-warnings` on changed TypeScript files - `vitest run` in `@executor-js/plugin-openapi` (270 tests)
Add Google Analytics Data and Google Analytics Admin as built-in Google Discovery integrations. Both default to the least-privilege `analytics.readonly` OAuth scope. | Integration | Discovery API | Default access | Health check | | --- | --- | --- | --- | | Google Analytics Data | `analyticsdata.v1beta` | Read-only | None; reports require a property | | Google Analytics Admin | `analyticsadmin.v1beta` | Read-only | `accountSummaries.list` | - `oxfmt --check` on changed files - `oxlint --deny-warnings` on changed TypeScript files - `vitest run` in `@executor-js/plugin-openapi` (270 tests)
Add Google Analytics Data and Google Analytics Admin as built-in Google Discovery integrations. Both default to the least-privilege `analytics.readonly` OAuth scope. | Integration | Discovery API | Default access | Health check | | --- | --- | --- | --- | | Google Analytics Data | `analyticsdata.v1beta` | Read-only | None; reports require a property | | Google Analytics Admin | `analyticsadmin.v1beta` | Read-only | `accountSummaries.list` | - `oxfmt --check` on changed files - `oxlint --deny-warnings` on changed TypeScript files - `vitest run` in `@executor-js/plugin-openapi` (270 tests)
Add Google Analytics Data and Google Analytics Admin as built-in Google Discovery integrations. Both default to the least-privilege `analytics.readonly` OAuth scope. | Integration | Discovery API | Default access | Health check | | --- | --- | --- | --- | | Google Analytics Data | `analyticsdata.v1beta` | Read-only | None; reports require a property | | Google Analytics Admin | `analyticsadmin.v1beta` | Read-only | `accountSummaries.list` | - `oxfmt --check` on changed files - `oxlint --deny-warnings` on changed TypeScript files - `vitest run` in `@executor-js/plugin-openapi` (270 tests)
Summary
Add Google Analytics Data and Google Analytics Admin as built-in Google Discovery integrations. Both default to the least-privilege
analytics.readonlyOAuth scope.API presets
analyticsdata.v1betaanalyticsadmin.v1betaaccountSummaries.listValidation
oxfmt --checkon changed filesoxlint --deny-warningson changed TypeScript filesvitest runin@executor-js/plugin-openapi(270 tests)