@crvouga/mockingbird-service-google-calendar 3.0.0 → 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changelog — @crvouga/mockingbird-service-google-calendar
2
2
 
3
+ ## 3.2.0 (2026-10-09)
4
+
5
+ ### Features
6
+
7
+ - match Emulate provider coverage ([16b65ce](https://github.com/crvouga/mockingbird/commit/16b65ce791fa216f28ec1521df636f57771d9c5e))
8
+
9
+ ### Dependencies
10
+
11
+ - `@crvouga/mockingbird-service-sqlite`
12
+
13
+ ## 3.1.0 (2026-10-08)
14
+
15
+ ### Features
16
+
17
+ - redesign emulator experience ([d6038c2](https://github.com/crvouga/mockingbird/commit/d6038c27eebbaa1751f02bc9305002a5b1304779))
18
+
3
19
  ## 3.0.0 (2026-10-07)
4
20
 
5
21
  ### ⚠️ Breaking changes
@@ -14,10 +30,6 @@
14
30
  - typecheck the brand gate before builds ([fc36095](https://github.com/crvouga/mockingbird/commit/fc3609514de70ffe3170a5d216fb8a49f9ce7cbb))
15
31
  - format the emulates records query ([8698872](https://github.com/crvouga/mockingbird/commit/8698872509d06002be5a8fcdc85d79f8462320c3))
16
32
 
17
- ### Dependencies
18
-
19
- - `@crvouga/mockingbird-service-sqlite`
20
-
21
33
  ## 2.3.0 (2026-10-04)
22
34
 
23
35
  ### Features
package/DISCOVERY.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # @crvouga/mockingbird-service-google-calendar discovery
2
2
 
3
3
  This is the installed-package index for coding agents and tooling. All relative links resolve
4
- inside `node_modules/@crvouga/mockingbird-service-google-calendar/`; no repository checkout is needed to discover the mock's
4
+ inside `node_modules/@crvouga/mockingbird-service-google-calendar/`; no repository checkout is needed to discover the emulator's
5
5
  supported surface or documented behavior.
6
6
 
7
7
  ## Capability and behavior sources
@@ -48,7 +48,7 @@ designed for assertions and diagnosis by consuming test suites.
48
48
  ## Report a mismatch or missing capability
49
49
 
50
50
  Follow the [agent reporting contract](https://github.com/crvouga/mockingbird/blob/main/docs/REPORTING_ISSUES.md). Include package version,
51
- operation/command, a minimal redacted request, actual mock result, expected oracle result or vendor
51
+ operation/command, a minimal redacted request, actual emulator result, expected oracle result or vendor
52
52
  documentation, and whether the mismatch appears in the matrix. Never include keys, tokens,
53
53
  customer data, prompts, PHI, card data, or unredacted recordings.
54
54
 
package/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # @crvouga/mockingbird-service-google-calendar
2
2
 
3
- > Familiar calls. Faithful echoes. Part of [Mockingbird](https://github.com/crvouga/mockingbird).
3
+ > Local emulators. Real API contracts. Part of [Mockingbird](https://github.com/crvouga/mockingbird).
4
4
 
5
- Stateful mock of **Google Calendar v3** and **Google OAuth 2.0** for test suites, covering what
5
+ Stateful emulator of **Google Calendar v3** and **Google OAuth 2.0** for test suites, covering what
6
6
  our EMR backend calls: `calendarList.list`, `calendars.insert`, `events.list` (time windows,
7
7
  `q`, `orderBy`, paging, incremental sync with 410 `fullSyncRequired`), `events.get/insert/
8
8
  update/delete`, `events.watch` with real push notifications to the channel's address, and
@@ -28,9 +28,9 @@ ESM only. Node >= 22 or Bun >= 1.2. No native dependencies. Serve it with
28
28
  ## Usage
29
29
 
30
30
  Seams (the app hardcodes Google today): give the calendar client a `rootUrl`
31
- (`google.calendar({version: "v3", auth, rootUrl: "<mock>/"})`), give `OAuth2Client`
32
- `endpoints: {oauth2TokenUrl: "<mock>/token", oauth2RevokeUrl: "<mock>/revoke"}`, and point the
33
- userinfo fetch at `<mock>/oauth2/v3/userinfo`. `GOOGLE_WEBHOOK_URL` can stay as it is: the mock
31
+ (`google.calendar({version: "v3", auth, rootUrl: "<emulator>/"})`), give `OAuth2Client`
32
+ `endpoints: {oauth2TokenUrl: "<emulator>/token", oauth2RevokeUrl: "<emulator>/revoke"}`, and point the
33
+ userinfo fetch at `<emulator>/oauth2/v3/userinfo`. `GOOGLE_WEBHOOK_URL` can stay as it is: the emulator
34
34
  posts pushes to whatever `address` the app registers (http is allowed unless
35
35
  `--require-https-webhooks`).
36
36
 
@@ -50,7 +50,7 @@ const oauth = new OAuth2Client({
50
50
  redirectUri: "postmessage",
51
51
  endpoints: { oauth2TokenUrl: `${google.url}/token`, oauth2RevokeUrl: `${google.url}/revoke` },
52
52
  })
53
- // Authorization code "4/mock-<name>" signs in <name>@example.com ("4/mock-<email>" for others).
53
+ // Authorization code "4/emulator-<name>" signs in <name>@example.com ("4/emulator-<email>" for others).
54
54
  const { tokens } = await oauth.getToken("4/mock-dr.house")
55
55
  const client = new auth.OAuth2()
56
56
  client.setCredentials({ access_token: tokens.access_token ?? null })
@@ -102,7 +102,7 @@ Every change to a calendar's events (through the API or the admin plane) posts t
102
102
  channel on that calendar: an empty body with `X-Goog-Channel-ID`, `X-Goog-Channel-Token` (when
103
103
  set), `X-Goog-Channel-Expiration` (RFC 1123), `X-Goog-Message-Number` (1 for `sync`, then +1),
104
104
  `X-Goog-Resource-ID`, `X-Goog-Resource-URI` and `X-Goog-Resource-State` (`sync`, then
105
- `exists`). Stopped or expired (mock clock) channels get nothing. Non-2xx answers are retried
105
+ `exists`). Stopped or expired (emulator clock) channels get nothing. Non-2xx answers are retried
106
106
  (immediately, 1 s, 10 s, 1 min, 10 min). `GET /__admin/webhooks` lists deliveries, and
107
107
  `/__admin/webhooks/events`, `…/replay`, `…/flush` work as usual.
108
108
 
@@ -150,14 +150,14 @@ generated calendar module over googleapis-common 7 / gaxios 6; the full `googlea
150
150
 
151
151
  | Export | Kind | Description |
152
152
  | --- | --- | --- |
153
- | `GoogleCalendarAPI` | class | The in-process mock: `fetch(request)`, `reset()`, `user(email)`, `ensurePrimary(email)`, `resolveCalendar(email, id)`, `createEvent`, `updateEvent`, `deleteEvent`, `findEvent`, `notify(calendarId)`, `channels()`, `events(email?)`, `invalidateSyncTokens()`. Options: `sqlite`, `now`, `namespace`, `settings`, `onPush`, `onChannels`. |
154
- | `createRuntime` | function | The mock with the full service contract and push delivery. Options: `settings`, `push: {retryDelaysMs?, fetch?}`, `clock`, `seed`, `adminKey`, `onLog`, `sqlite`. |
153
+ | `GoogleCalendarAPI` | class | The in-process emulator: `fetch(request)`, `reset()`, `user(email)`, `ensurePrimary(email)`, `resolveCalendar(email, id)`, `createEvent`, `updateEvent`, `deleteEvent`, `findEvent`, `notify(calendarId)`, `channels()`, `events(email?)`, `invalidateSyncTokens()`. Options: `sqlite`, `now`, `namespace`, `settings`, `onPush`, `onChannels`. |
154
+ | `createRuntime` | function | The emulator with the full service contract and push delivery. Options: `settings`, `push: {retryDelaysMs?, fetch?}`, `clock`, `seed`, `adminKey`, `onLog`, `sqlite`. |
155
155
  | `GOOGLE_CALENDAR_PRESETS` | object | Every named fault preset. |
156
156
  | `GOOGLE_CALENDAR_NAMESPACE` | string | The service name, `"google-calendar"`. |
157
157
  | `DEFAULT_SCOPE` | string | The scope the token endpoint reports. |
158
158
  | `pushHeaders` | function | The `X-Goog-*` headers of a push notification. |
159
- | `issueAccessToken` | function | Mint an access token the mock accepts for an email. |
160
- | `parseToken` | function | Decode a mock access or refresh token. |
159
+ | `issueAccessToken` | function | Mint an access token the emulator accepts for an email. |
160
+ | `parseToken` | function | Decode an emulator access or refresh token. |
161
161
  | `accessTokenCredential` | function | The account an access token belongs to (how credentials map to namespaces). |
162
162
  | `emailFromCode` | function | The account a `4/mock-…` authorization code signs in. |
163
163
  | `googleError` | function | Build Google's error envelope. |
package/SUPPORT.md CHANGED
@@ -3,10 +3,10 @@
3
3
  Generated from `openapi.yaml`; do not edit by hand.
4
4
 
5
5
  - operations in spec: **12**
6
- - supported by the mock: **12**
6
+ - supported by the emulator: **12**
7
7
  - parity enabled: **12**
8
8
 
9
- | operationId | route | mock | parity | notes |
9
+ | operationId | route | emulator | parity | notes |
10
10
  | --- | --- | --- | --- | --- |
11
11
  | `OAuthToken` | `POST /token` | ✅ supported | ✅ | |
12
12
  | `OAuthRevoke` | `POST /revoke` | ✅ supported | ✅ | |