-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Description
The Apps Script API (script.googleapis.com) has supporting infrastructure throughout the codebase but is missing from the service registry, making it impossible to use via gws script ....
What exists already
| Component | Location | Status |
|---|---|---|
| API enablement during setup | setup.rs ~L121 (script.googleapis.com) |
✅ Enabled |
ScriptHelper with +push command |
helpers/script.rs |
✅ Implemented |
Helper registration for "script" | "apps-script" |
helpers/mod.rs ~L122 |
✅ Wired up |
| Discovery document | script_v1.json fetches and caches fine |
✅ Works |
Auth scopes (script.projects, script.deployments, script.processes) |
Granted during gws auth login |
✅ Available |
What's missing
A ServiceEntry in crates/google-workspace/src/services.rs:
ServiceEntry {
aliases: &["script", "apps-script"],
api_name: "script",
version: "v1",
description: "Manage Apps Script projects and deployments",
},Without this, resolve_service("script") returns Unknown service and all the existing helper code is dead/unreachable.
Secondary: misleading error message for unlisted APIs
The error message suggests:
Use
<api>:<version>syntax for unlisted APIs.
However, parse_service_and_version() in main.rs splits on : first (L336) but then calls resolve_service() with just the service name (L343), which still rejects it. So the <api>:<version> syntax only overrides the version for already-registered services — it doesn't enable unlisted APIs as the message implies.
Steps to reproduce
gws script projects get --params '{"scriptId": "..."}'
# Error: Unknown service 'script'
gws script:v1 projects get --params '{"scriptId": "..."}'
# Error: Unknown service 'script' (same result)Environment
- gws v0.4.x (npm install)
- macOS (Apple Silicon)
script.googleapis.comenabled in GCP projectscript.projectsscope granted
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels