@deploybaseline/google
v0.14.0
Published
Google OAuth 2.0 / OpenID Connect + Gmail, Calendar, Drive, Sheets, and Docs emulator: OAuth authorize, token exchange, userinfo, RS256 OIDC discovery and JWKS, token revocation, Gmail messages, drafts, threads, labels, history, and settings, Calendar eve
Readme
@deploybaseline/google
Google OAuth 2.0 / OpenID Connect + Gmail, Calendar, Drive, Sheets, and Docs emulator: OAuth authorize, token exchange, userinfo, RS256 OIDC discovery and JWKS, token revocation, Gmail messages, drafts, threads, labels, history, and settings, Calendar events and free/busy, Drive files, uploads, and export, Sheets values and batchUpdate, and Docs documents and batchUpdate.
Part of Baseline: local drop-in replacement services for CI and no-network sandboxes.
Usage
npx @deploybaseline/cli start --service googleimport { createEmulator } from "@deploybaseline/cli";
const google = await createEmulator({ service: "google" });
// Point googleapis at google.url, e.g. google.sheets({ version: "v4", rootUrl: `${google.url}/` })
await google.close();Every API lives on one port, so pass the emulator URL as rootUrl to each googleapis client. Media uploads ignore a client-level rootUrl; pass { rootUrl } again in the call options of every upload.
Documentation
- Google docs: routes, OAuth and strict scopes, Gmail, Calendar, Drive, Sheets, Docs, and seed config
- API reference:
http://localhost:3999/docs/googlewhile the CLI runs (how it works)
License
Apache-2.0
